@gientech/modual 2.2.38 → 2.2.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/oprecords.js CHANGED
@@ -1 +1,282 @@
1
- import"react/jsx-runtime";import"react";import"styled-components";import"antd";import{O as s}from"./assets/index-Bz8GGyJk.js";import"dayjs";import"@mxmweb/zui";import"./assets/search-CEuIa9-_.js";import"axios";import"./assets/createLucideIcon-Bj5DlX2s.js";export{s as default};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./assets/client-BNiIqwJU.js","./assets/AntdIcon-BRbA9Wz8.js"])))=>i.map(i=>d[i]);
2
+ import{jsx as It,jsxs as Hn,Fragment as xW}from"react/jsx-runtime";import*as ao from"react";import Zn,{Component as _W,Fragment as wW,useRef as Lu,useEffect as yp,forwardRef as hP,createContext as OW,useContext as SW,useMemo as mp,useState as Fi}from"react";import Fv from"styled-components";import{Timeline as EW,Avatar as kW,Spin as pP,Row as MW,Col as oy,Card as qd,Statistic as sy,DatePicker as AW,Input as TW,ConfigProvider as PW,Radio as ly}from"antd";import{g as Bv,E as zv,a as Wv,j as CW,i as bp,h as LW,o as ce,s as NW,z as te,d as ht,e as pt,n as Kt,A as Zs,k as Ut,f as Et,C as Fo,D as yr,G as Kd}from"./assets/AntdIcon-BRbA9Wz8.js";import $l from"dayjs";import{DashboardContainer as RW}from"@mxmweb/zui";import IW from"axios";import{c as Db}from"./assets/createLucideIcon-Bj5DlX2s.js";import{S as DW}from"./assets/search-CEuIa9-_.js";/**
3
+ * @license lucide-react v0.456.0 - ISC
4
+ *
5
+ * This source code is licensed under the ISC license.
6
+ * See the LICENSE file in the root directory of this source tree.
7
+ */const $W=Db("ChartColumn",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/**
8
+ * @license lucide-react v0.456.0 - ISC
9
+ *
10
+ * This source code is licensed under the ISC license.
11
+ * See the LICENSE file in the root directory of this source tree.
12
+ */const jW=Db("List",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]]);/**
13
+ * @license lucide-react v0.456.0 - ISC
14
+ *
15
+ * This source code is licensed under the ISC license.
16
+ * See the LICENSE file in the root directory of this source tree.
17
+ */const vP=Db("MonitorCog",[["path",{d:"M12 17v4",key:"1riwvh"}],["path",{d:"m15.2 4.9-.9-.4",key:"12wd2u"}],["path",{d:"m15.2 7.1-.9.4",key:"1r2vl7"}],["path",{d:"m16.9 3.2-.4-.9",key:"3zbo91"}],["path",{d:"m16.9 8.8-.4.9",key:"1qr2dn"}],["path",{d:"m19.5 2.3-.4.9",key:"1rjrkq"}],["path",{d:"m19.5 9.7-.4-.9",key:"heryx5"}],["path",{d:"m21.7 4.5-.9.4",key:"17fqt1"}],["path",{d:"m21.7 7.5-.9-.4",key:"14zyni"}],["path",{d:"M22 13v2a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7",key:"1tnzv8"}],["path",{d:"M8 21h8",key:"1ev6f3"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}]]);var Vc={},cy={exports:{}},bS;function Gv(){return bS||(bS=1,(function(t){function n(e){return e&&e.__esModule?e:{default:e}}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports})(cy)),cy.exports}var Xc={},xS;function FW(){if(xS)return Xc;xS=1,Object.defineProperty(Xc,"__esModule",{value:!0}),Xc.default=void 0;var t={items_per_page:"\u6761/\u9875",jump_to:"\u8DF3\u81F3",jump_to_confirm:"\u786E\u5B9A",page:"\u9875",prev_page:"\u4E0A\u4E00\u9875",next_page:"\u4E0B\u4E00\u9875",prev_5:"\u5411\u524D 5 \u9875",next_5:"\u5411\u540E 5 \u9875",prev_3:"\u5411\u524D 3 \u9875",next_3:"\u5411\u540E 3 \u9875",page_size:"\u9875\u7801"};return Xc.default=t,Xc}var qc={},Kc={},Zc={},uy={exports:{}},fy={exports:{}},dy={exports:{}},hy={exports:{}},_S;function gP(){return _S||(_S=1,(function(t){function n(e){"@babel/helpers - typeof";return t.exports=n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},t.exports.__esModule=!0,t.exports.default=t.exports,n(e)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports})(hy)),hy.exports}var py={exports:{}},wS;function BW(){return wS||(wS=1,(function(t){var n=gP().default;function e(r,i){if(n(r)!="object"||!r)return r;var a=r[Symbol.toPrimitive];if(a!==void 0){var o=a.call(r,i||"default");if(n(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(r)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports})(py)),py.exports}var OS;function zW(){return OS||(OS=1,(function(t){var n=gP().default,e=BW();function r(i){var a=e(i,"string");return n(a)=="symbol"?a:a+""}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports})(dy)),dy.exports}var SS;function WW(){return SS||(SS=1,(function(t){var n=zW();function e(r,i,a){return(i=n(i))in r?Object.defineProperty(r,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[i]=a,r}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports})(fy)),fy.exports}var ES;function GW(){return ES||(ES=1,(function(t){var n=WW();function e(i,a){var o=Object.keys(i);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(i);a&&(s=s.filter(function(l){return Object.getOwnPropertyDescriptor(i,l).enumerable})),o.push.apply(o,s)}return o}function r(i){for(var a=1;a<arguments.length;a++){var o=arguments[a]!=null?arguments[a]:{};a%2?e(Object(o),!0).forEach(function(s){n(i,s,o[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(o)):e(Object(o)).forEach(function(s){Object.defineProperty(i,s,Object.getOwnPropertyDescriptor(o,s))})}return i}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports})(uy)),uy.exports}var Qc={},kS;function YW(){return kS||(kS=1,Object.defineProperty(Qc,"__esModule",{value:!0}),Qc.commonLocale=void 0,Qc.commonLocale={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:!0}),Qc}var MS;function HW(){if(MS)return Zc;MS=1;var t=Gv().default;Object.defineProperty(Zc,"__esModule",{value:!0}),Zc.default=void 0;var n=t(GW()),e=YW(),r=(0,n.default)((0,n.default)({},e.commonLocale),{},{locale:"zh_CN",today:"\u4ECA\u5929",now:"\u6B64\u523B",backToToday:"\u8FD4\u56DE\u4ECA\u5929",ok:"\u786E\u5B9A",timeSelect:"\u9009\u62E9\u65F6\u95F4",dateSelect:"\u9009\u62E9\u65E5\u671F",weekSelect:"\u9009\u62E9\u5468",clear:"\u6E05\u9664",week:"\u5468",month:"\u6708",year:"\u5E74",previousMonth:"\u4E0A\u4E2A\u6708 (\u7FFB\u9875\u4E0A\u952E)",nextMonth:"\u4E0B\u4E2A\u6708 (\u7FFB\u9875\u4E0B\u952E)",monthSelect:"\u9009\u62E9\u6708\u4EFD",yearSelect:"\u9009\u62E9\u5E74\u4EFD",decadeSelect:"\u9009\u62E9\u5E74\u4EE3",previousYear:"\u4E0A\u4E00\u5E74 (Control\u952E\u52A0\u5DE6\u65B9\u5411\u952E)",nextYear:"\u4E0B\u4E00\u5E74 (Control\u952E\u52A0\u53F3\u65B9\u5411\u952E)",previousDecade:"\u4E0A\u4E00\u5E74\u4EE3",nextDecade:"\u4E0B\u4E00\u5E74\u4EE3",previousCentury:"\u4E0A\u4E00\u4E16\u7EAA",nextCentury:"\u4E0B\u4E00\u4E16\u7EAA",yearFormat:"YYYY\u5E74",cellDateFormat:"D",monthBeforeYear:!1});return Zc.default=r,Zc}var Jc={},AS;function yP(){if(AS)return Jc;AS=1,Object.defineProperty(Jc,"__esModule",{value:!0}),Jc.default=void 0;const t={placeholder:"\u8BF7\u9009\u62E9\u65F6\u95F4",rangePlaceholder:["\u5F00\u59CB\u65F6\u95F4","\u7ED3\u675F\u65F6\u95F4"]};return Jc.default=t,Jc}var TS;function mP(){if(TS)return Kc;TS=1;var t=Gv().default;Object.defineProperty(Kc,"__esModule",{value:!0}),Kc.default=void 0;var n=t(HW()),e=t(yP());const r={lang:Object.assign({placeholder:"\u8BF7\u9009\u62E9\u65E5\u671F",yearPlaceholder:"\u8BF7\u9009\u62E9\u5E74\u4EFD",quarterPlaceholder:"\u8BF7\u9009\u62E9\u5B63\u5EA6",monthPlaceholder:"\u8BF7\u9009\u62E9\u6708\u4EFD",weekPlaceholder:"\u8BF7\u9009\u62E9\u5468",rangePlaceholder:["\u5F00\u59CB\u65E5\u671F","\u7ED3\u675F\u65E5\u671F"],rangeYearPlaceholder:["\u5F00\u59CB\u5E74\u4EFD","\u7ED3\u675F\u5E74\u4EFD"],rangeMonthPlaceholder:["\u5F00\u59CB\u6708\u4EFD","\u7ED3\u675F\u6708\u4EFD"],rangeQuarterPlaceholder:["\u5F00\u59CB\u5B63\u5EA6","\u7ED3\u675F\u5B63\u5EA6"],rangeWeekPlaceholder:["\u5F00\u59CB\u5468","\u7ED3\u675F\u5468"]},n.default),timePickerLocale:Object.assign({},e.default)};return r.lang.ok="\u786E\u5B9A",Kc.default=r,Kc}var PS;function UW(){if(PS)return qc;PS=1;var t=Gv().default;Object.defineProperty(qc,"__esModule",{value:!0}),qc.default=void 0;var n=t(mP());return qc.default=n.default,qc}var CS;function VW(){if(CS)return Vc;CS=1;var t=Gv().default;Object.defineProperty(Vc,"__esModule",{value:!0}),Vc.default=void 0;var n=t(FW()),e=t(UW()),r=t(mP()),i=t(yP());const a="${label}\u4E0D\u662F\u4E00\u4E2A\u6709\u6548\u7684${type}",o={locale:"zh-cn",Pagination:n.default,DatePicker:r.default,TimePicker:i.default,Calendar:e.default,global:{placeholder:"\u8BF7\u9009\u62E9",close:"\u5173\u95ED"},Table:{filterTitle:"\u7B5B\u9009",filterConfirm:"\u786E\u5B9A",filterReset:"\u91CD\u7F6E",filterEmptyText:"\u65E0\u7B5B\u9009\u9879",filterCheckAll:"\u5168\u9009",filterSearchPlaceholder:"\u5728\u7B5B\u9009\u9879\u4E2D\u641C\u7D22",emptyText:"\u6682\u65E0\u6570\u636E",selectAll:"\u5168\u9009\u5F53\u9875",selectInvert:"\u53CD\u9009\u5F53\u9875",selectNone:"\u6E05\u7A7A\u6240\u6709",selectionAll:"\u5168\u9009\u6240\u6709",sortTitle:"\u6392\u5E8F",expand:"\u5C55\u5F00\u884C",collapse:"\u5173\u95ED\u884C",triggerDesc:"\u70B9\u51FB\u964D\u5E8F",triggerAsc:"\u70B9\u51FB\u5347\u5E8F",cancelSort:"\u53D6\u6D88\u6392\u5E8F"},Modal:{okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",justOkText:"\u77E5\u9053\u4E86"},Tour:{Next:"\u4E0B\u4E00\u6B65",Previous:"\u4E0A\u4E00\u6B65",Finish:"\u7ED3\u675F\u5BFC\u89C8"},Popconfirm:{cancelText:"\u53D6\u6D88",okText:"\u786E\u5B9A"},Transfer:{titles:["",""],searchPlaceholder:"\u8BF7\u8F93\u5165\u641C\u7D22\u5185\u5BB9",itemUnit:"\u9879",itemsUnit:"\u9879",remove:"\u5220\u9664",selectCurrent:"\u5168\u9009\u5F53\u9875",removeCurrent:"\u5220\u9664\u5F53\u9875",selectAll:"\u5168\u9009\u6240\u6709",deselectAll:"\u53D6\u6D88\u5168\u9009",removeAll:"\u5220\u9664\u5168\u90E8",selectInvert:"\u53CD\u9009\u5F53\u9875"},Upload:{uploading:"\u6587\u4EF6\u4E0A\u4F20\u4E2D",removeFile:"\u5220\u9664\u6587\u4EF6",uploadError:"\u4E0A\u4F20\u9519\u8BEF",previewFile:"\u9884\u89C8\u6587\u4EF6",downloadFile:"\u4E0B\u8F7D\u6587\u4EF6"},Empty:{description:"\u6682\u65E0\u6570\u636E"},Icon:{icon:"\u56FE\u6807"},Text:{edit:"\u7F16\u8F91",copy:"\u590D\u5236",copied:"\u590D\u5236\u6210\u529F",expand:"\u5C55\u5F00",collapse:"\u6536\u8D77"},Form:{optional:"\uFF08\u53EF\u9009\uFF09",defaultValidateMessages:{default:"\u5B57\u6BB5\u9A8C\u8BC1\u9519\u8BEF${label}",required:"\u8BF7\u8F93\u5165${label}",enum:"${label}\u5FC5\u987B\u662F\u5176\u4E2D\u4E00\u4E2A[${enum}]",whitespace:"${label}\u4E0D\u80FD\u4E3A\u7A7A\u5B57\u7B26",date:{format:"${label}\u65E5\u671F\u683C\u5F0F\u65E0\u6548",parse:"${label}\u4E0D\u80FD\u8F6C\u6362\u4E3A\u65E5\u671F",invalid:"${label}\u662F\u4E00\u4E2A\u65E0\u6548\u65E5\u671F"},types:{string:a,method:a,array:a,object:a,number:a,date:a,boolean:a,integer:a,float:a,regexp:a,email:a,url:a,hex:a},string:{len:"${label}\u987B\u4E3A${len}\u4E2A\u5B57\u7B26",min:"${label}\u6700\u5C11${min}\u4E2A\u5B57\u7B26",max:"${label}\u6700\u591A${max}\u4E2A\u5B57\u7B26",range:"${label}\u987B\u5728${min}-${max}\u5B57\u7B26\u4E4B\u95F4"},number:{len:"${label}\u5FC5\u987B\u7B49\u4E8E${len}",min:"${label}\u6700\u5C0F\u503C\u4E3A${min}",max:"${label}\u6700\u5927\u503C\u4E3A${max}",range:"${label}\u987B\u5728${min}-${max}\u4E4B\u95F4"},array:{len:"\u987B\u4E3A${len}\u4E2A${label}",min:"\u6700\u5C11${min}\u4E2A${label}",max:"\u6700\u591A${max}\u4E2A${label}",range:"${label}\u6570\u91CF\u987B\u5728${min}-${max}\u4E4B\u95F4"},pattern:{mismatch:"${label}\u4E0E\u6A21\u5F0F\u4E0D\u5339\u914D${pattern}"}}},Image:{preview:"\u9884\u89C8"},QRCode:{expired:"\u4E8C\u7EF4\u7801\u8FC7\u671F",refresh:"\u70B9\u51FB\u5237\u65B0",scanned:"\u5DF2\u626B\u63CF"},ColorPicker:{presetEmpty:"\u6682\u65E0",transparent:"\u65E0\u8272",singleColor:"\u5355\u8272",gradientColor:"\u6E10\u53D8\u8272"}};return Vc.default=o,Vc}var vy,LS;function XW(){return LS||(LS=1,vy=VW()),vy}var qW=XW();const KW=Bv(qW);var Zh={exports:{}},ZW=Zh.exports,NS;function QW(){return NS||(NS=1,(function(t,n){(function(e,r){t.exports=r($l)})(ZW,(function(e){function r(o){return o&&typeof o=="object"&&"default"in o?o:{default:o}}var i=r(e),a={name:"zh-cn",weekdays:"\u661F\u671F\u65E5_\u661F\u671F\u4E00_\u661F\u671F\u4E8C_\u661F\u671F\u4E09_\u661F\u671F\u56DB_\u661F\u671F\u4E94_\u661F\u671F\u516D".split("_"),weekdaysShort:"\u5468\u65E5_\u5468\u4E00_\u5468\u4E8C_\u5468\u4E09_\u5468\u56DB_\u5468\u4E94_\u5468\u516D".split("_"),weekdaysMin:"\u65E5_\u4E00_\u4E8C_\u4E09_\u56DB_\u4E94_\u516D".split("_"),months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u56DB\u6708_\u4E94\u6708_\u516D\u6708_\u4E03\u6708_\u516B\u6708_\u4E5D\u6708_\u5341\u6708_\u5341\u4E00\u6708_\u5341\u4E8C\u6708".split("_"),monthsShort:"1\u6708_2\u6708_3\u6708_4\u6708_5\u6708_6\u6708_7\u6708_8\u6708_9\u6708_10\u6708_11\u6708_12\u6708".split("_"),ordinal:function(o,s){return s==="W"?o+"\u5468":o+"\u65E5"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY\u5E74M\u6708D\u65E5",LLL:"YYYY\u5E74M\u6708D\u65E5Ah\u70B9mm\u5206",LLLL:"YYYY\u5E74M\u6708D\u65E5ddddAh\u70B9mm\u5206",l:"YYYY/M/D",ll:"YYYY\u5E74M\u6708D\u65E5",lll:"YYYY\u5E74M\u6708D\u65E5 HH:mm",llll:"YYYY\u5E74M\u6708D\u65E5dddd HH:mm"},relativeTime:{future:"%s\u5185",past:"%s\u524D",s:"\u51E0\u79D2",m:"1 \u5206\u949F",mm:"%d \u5206\u949F",h:"1 \u5C0F\u65F6",hh:"%d \u5C0F\u65F6",d:"1 \u5929",dd:"%d \u5929",M:"1 \u4E2A\u6708",MM:"%d \u4E2A\u6708",y:"1 \u5E74",yy:"%d \u5E74"},meridiem:function(o,s){var l=100*o+s;return l<600?"\u51CC\u6668":l<900?"\u65E9\u4E0A":l<1100?"\u4E0A\u5348":l<1300?"\u4E2D\u5348":l<1800?"\u4E0B\u5348":"\u665A\u4E0A"}};return i.default.locale(a,null,!0),a}))})(Zh)),Zh.exports}QW();const xp={dashboard:{title:"\u7528\u6237\u64CD\u4F5C\u8BB0\u5F55",description:"\u8BB0\u5F55\u7528\u6237\u64CD\u4F5C\u884C\u4E3A\u548C\u7ED3\u679C"},toolbar:{keywordPlaceholder:"\u641C\u7D22\u7528\u6237",dataSourceLabel:"\u6570\u636E\u6765\u6E90"},stats:{totalCount:"\u603B\u64CD\u4F5C\u6B21\u6570",totalFailCount:"\u5931\u8D25\u6B21\u6570",groupRows:"\u805A\u5408\u6761\u76EE\u6570",suffixTimes:"\u6B21",suffixRows:"\u6761"},sections:{dailyTotal:"\u6BCF\u65E5\u5408\u8BA1\uFF08\u8FC7\u6EE4\u540E\uFF09",opTop:"\u64CD\u4F5C Top 20\uFF08\u8FC7\u6EE4\u540E\uFF09",detailTable:"\u6309\u5929 + \u64CD\u4F5C\u540D\u660E\u7EC6"},table:{date:"\u65E5\u671F",opName:"\u64CD\u4F5C\u540D\u79F0",count:"\u6B21\u6570",dailyCount:"\u5408\u8BA1\u6B21\u6570"},error:{requestFailed:"\u83B7\u53D6\u64CD\u4F5C\u8BB0\u5F55\u5931\u8D25",networkError:"\u7F51\u7EDC\u9519\u8BEF"},server:{requestError:"\u8BF7\u6C42\u51FA\u9519\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5",noPermission:"\u6CA1\u6709\u8DB3\u591F\u6743\u9650",notLoggedIn:"\u672A\u767B\u5F55\u6216token\u5DF2\u8FC7\u671F"}},JW={dashboard:{title:"User operations",description:"Aggregated user operations (by day + action)"},toolbar:{keywordPlaceholder:"Filter by action name",dataSourceLabel:"Data source"},stats:{totalCount:"Total",totalFailCount:"Failed",groupRows:"Grouped rows",suffixTimes:"times",suffixRows:"rows"},sections:{dailyTotal:"Daily total (filtered)",opTop:"Top actions (filtered)",detailTable:"Daily + action detail"},table:{date:"Date",opName:"Action",count:"Count",dailyCount:"Daily total"},error:{requestFailed:"Failed to fetch user operations",networkError:"Network error"},server:{requestError:"Request failed, please try again later",noPermission:"No permission",notLoggedIn:"Not logged in or token expired"}},tG={dashboard:{title:"\u30E6\u30FC\u30B6\u30FC\u64CD\u4F5C",description:"\u30E6\u30FC\u30B6\u30FC\u64CD\u4F5C\u3092\u96C6\u8A08\uFF08\u65E5\u6642 + \u64CD\u4F5C\u540D\uFF09"},toolbar:{keywordPlaceholder:"\u64CD\u4F5C\u540D\u3067\u30D5\u30A3\u30EB\u30BF",dataSourceLabel:"\u30C7\u30FC\u30BF\u30BD\u30FC\u30B9"},stats:{totalCount:"\u5408\u8A08",totalFailCount:"\u5931\u6557",groupRows:"\u96C6\u8A08\u884C\u6570",suffixTimes:"\u56DE",suffixRows:"\u884C"},sections:{dailyTotal:"\u65E5\u5225\u5408\u8A08\uFF08\u30D5\u30A3\u30EB\u30BF\u5F8C\uFF09",opTop:"Top \u64CD\u4F5C\uFF08\u30D5\u30A3\u30EB\u30BF\u5F8C\uFF09",detailTable:"\u65E5\u4ED8 + \u64CD\u4F5C\u540D\u306E\u8A73\u7D30"},table:{date:"\u65E5\u4ED8",opName:"\u64CD\u4F5C\u540D",count:"\u56DE\u6570",dailyCount:"\u5408\u8A08\u56DE\u6570"},error:{requestFailed:"\u30E6\u30FC\u30B6\u30FC\u64CD\u4F5C\u306E\u53D6\u5F97\u306B\u5931\u6557\u3057\u307E\u3057\u305F",networkError:"\u30CD\u30C3\u30C8\u30EF\u30FC\u30AF\u30A8\u30E9\u30FC"},server:{requestError:"\u30EA\u30AF\u30A8\u30B9\u30C8\u306B\u5931\u6557\u3057\u307E\u3057\u305F",noPermission:"\u6A29\u9650\u304C\u3042\u308A\u307E\u305B\u3093",notLoggedIn:"\u672A\u30ED\u30B0\u30A4\u30F3\u3001\u307E\u305F\u306F\u30C8\u30FC\u30AF\u30F3\u304C\u671F\u9650\u5207\u308C\u3067\u3059"}},eG={zh:xp,en:JW,ja:tG};function nG(t,n){const e=eG[t]??xp;return n?{...e,...n}:e}function bP(t,n){const e=n.split(".");let r=t;for(const i of e)r=r==null?void 0:r[i];return typeof r=="string"?r:n}const xP=Zn.createContext({locale:"zh",messages:xp,getMessage:t=>bP(xp,t)});function rG(){return Zn.useContext(xP)}function iG({locale:t,messages:n,children:e}){const r=Zn.useMemo(()=>{const i=nG(t,n);return{locale:t,messages:i,getMessage:a=>bP(i,a)}},[t,n]);return Zn.createElement(xP.Provider,{value:r},e)}function aG({url:t,token:n,role:e,eventsEmit:r,getMessage:i}){const a=(c,u)=>i?i(c):u,o=IW.create({baseURL:t,timeout:15e3});return o.interceptors.request.use(c=>{const u=n;return u?(c.headers.Authorization=u||"",c.headers.userName=e==="\u672A\u767B\u5F55\u7528\u6237"?"":e,c):(r&&r("request:error_auth",{errorMsg:a("server.notLoggedIn","\u672A\u767B\u5F55\u6216token\u5DF2\u8FC7\u671F"),redirect:"/login"}),Promise.reject(new Error(a("server.notLoggedIn","\u672A\u767B\u5F55\u6216token\u5DF2\u8FC7\u671F"))))}),o.interceptors.response.use(c=>{const u=c.data;if(u&&typeof u=="object"&&"success"in u){if(u.success)return u;if(r)return r("request:error_business",{errorCode:u.errorCode,errorMsg:u.errorMsg||a("server.requestError","\u8BF7\u6C42\u51FA\u9519\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5"),response:u}),u}return u},c=>{var u;if((c==null?void 0:c.message)==="canceled")return Promise.reject(c);if(r){let f="request:error_network",d={errorMsg:a("server.requestError","\u7F51\u7EDC\u8BF7\u6C42\u5931\u8D25"),error:c};((u=c==null?void 0:c.response)==null?void 0:u.status)===401&&(f="request:error_auth",d={errorMsg:a("server.noPermission","\u6CA1\u6709\u8DB3\u591F\u6743\u9650"),error:c,redirect:"/login"}),r(f,d)}return Promise.reject(c)}),{getStatisticsOperateRecords:async c=>{try{const u=await o.get("/auth/userOperate/getUserOperate",{params:c}),{success:f,data:d}=u;if(f)return d}catch(u){console.log("getStatisticsOperateRecords error:",u)}},getTimelineOperateRecords:async c=>{try{const u=await o.get("auth/userOperate",{params:c}),{success:f,data:d}=u;if(f)return d}catch(u){console.log("getTimelineOperateRecords error:",u)}}}}/*! *****************************************************************************
18
+ Copyright (c) Microsoft Corporation. All rights reserved.
19
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
20
+ this file except in compliance with the License. You may obtain a copy of the
21
+ License at http://www.apache.org/licenses/LICENSE-2.0
22
+
23
+ THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
24
+ KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
25
+ WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
26
+ MERCHANTABLITY OR NON-INFRINGEMENT.
27
+
28
+ See the Apache Version 2.0 License for specific language governing permissions
29
+ and limitations under the License.
30
+ ***************************************************************************** */var Ym=function(t,n){return Ym=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var i in r)r.hasOwnProperty(i)&&(e[i]=r[i])},Ym(t,n)};function oG(t,n){Ym(t,n);function e(){this.constructor=t}t.prototype=n===null?Object.create(n):(e.prototype=n.prototype,new e)}var Nu=function(){return Nu=Object.assign||function(n){for(var e,r=1,i=arguments.length;r<i;r++){e=arguments[r];for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(n[a]=e[a])}return n},Nu.apply(this,arguments)};function sG(t,n,e,r){var i,a=!1,o=0;function s(){i&&clearTimeout(i)}function l(){s(),a=!0}typeof n!="boolean"&&(r=e,e=n,n=void 0);function c(){var u=this,f=Date.now()-o,d=arguments;if(a)return;function h(){o=Date.now(),e.apply(u,d)}function p(){i=void 0}r&&!i&&h(),s(),r===void 0&&f>t?h():n!==!0&&(i=setTimeout(r?p:h,r===void 0?t-f:t))}return c.cancel=l,c}var jl={Pixel:"Pixel",Percent:"Percent"},RS={unit:jl.Percent,value:.8};function IS(t){return typeof t=="number"?{unit:jl.Percent,value:t*100}:typeof t=="string"?t.match(/^(\d*(\.\d+)?)px$/)?{unit:jl.Pixel,value:parseFloat(t)}:t.match(/^(\d*(\.\d+)?)%$/)?{unit:jl.Percent,value:parseFloat(t)}:(console.warn('scrollThreshold format is invalid. Valid formats: "120px", "50%"...'),RS):(console.warn("scrollThreshold should be string or number"),RS)}var lG=(function(t){oG(n,t);function n(e){var r=t.call(this,e)||this;return r.lastScrollTop=0,r.actionTriggered=!1,r.startY=0,r.currentY=0,r.dragging=!1,r.maxPullDownDistance=0,r.getScrollableTarget=function(){return r.props.scrollableTarget instanceof HTMLElement?r.props.scrollableTarget:typeof r.props.scrollableTarget=="string"?document.getElementById(r.props.scrollableTarget):(r.props.scrollableTarget===null&&console.warn(`You are trying to pass scrollableTarget but it is null. This might
31
+ happen because the element may not have been added to DOM yet.
32
+ See https://github.com/ankeetmaini/react-infinite-scroll-component/issues/59 for more info.
33
+ `),null)},r.onStart=function(i){r.lastScrollTop||(r.dragging=!0,i instanceof MouseEvent?r.startY=i.pageY:i instanceof TouchEvent&&(r.startY=i.touches[0].pageY),r.currentY=r.startY,r._infScroll&&(r._infScroll.style.willChange="transform",r._infScroll.style.transition="transform 0.2s cubic-bezier(0,0,0.31,1)"))},r.onMove=function(i){r.dragging&&(i instanceof MouseEvent?r.currentY=i.pageY:i instanceof TouchEvent&&(r.currentY=i.touches[0].pageY),!(r.currentY<r.startY)&&(r.currentY-r.startY>=Number(r.props.pullDownToRefreshThreshold)&&r.setState({pullToRefreshThresholdBreached:!0}),!(r.currentY-r.startY>r.maxPullDownDistance*1.5)&&r._infScroll&&(r._infScroll.style.overflow="visible",r._infScroll.style.transform="translate3d(0px, "+(r.currentY-r.startY)+"px, 0px)")))},r.onEnd=function(){r.startY=0,r.currentY=0,r.dragging=!1,r.state.pullToRefreshThresholdBreached&&(r.props.refreshFunction&&r.props.refreshFunction(),r.setState({pullToRefreshThresholdBreached:!1})),requestAnimationFrame(function(){r._infScroll&&(r._infScroll.style.overflow="auto",r._infScroll.style.transform="none",r._infScroll.style.willChange="unset")})},r.onScrollListener=function(i){typeof r.props.onScroll=="function"&&setTimeout(function(){return r.props.onScroll&&r.props.onScroll(i)},0);var a=r.props.height||r._scrollableNode?i.target:document.documentElement.scrollTop?document.documentElement:document.body;if(!r.actionTriggered){var o=r.props.inverse?r.isElementAtTop(a,r.props.scrollThreshold):r.isElementAtBottom(a,r.props.scrollThreshold);o&&r.props.hasMore&&(r.actionTriggered=!0,r.setState({showLoader:!0}),r.props.next&&r.props.next()),r.lastScrollTop=a.scrollTop}},r.state={showLoader:!1,pullToRefreshThresholdBreached:!1,prevDataLength:e.dataLength},r.throttledOnScrollListener=sG(150,r.onScrollListener).bind(r),r.onStart=r.onStart.bind(r),r.onMove=r.onMove.bind(r),r.onEnd=r.onEnd.bind(r),r}return n.prototype.componentDidMount=function(){if(typeof this.props.dataLength>"u")throw new Error('mandatory prop "dataLength" is missing. The prop is needed when loading more content. Check README.md for usage');if(this._scrollableNode=this.getScrollableTarget(),this.el=this.props.height?this._infScroll:this._scrollableNode||window,this.el&&this.el.addEventListener("scroll",this.throttledOnScrollListener),typeof this.props.initialScrollY=="number"&&this.el&&this.el instanceof HTMLElement&&this.el.scrollHeight>this.props.initialScrollY&&this.el.scrollTo(0,this.props.initialScrollY),this.props.pullDownToRefresh&&this.el&&(this.el.addEventListener("touchstart",this.onStart),this.el.addEventListener("touchmove",this.onMove),this.el.addEventListener("touchend",this.onEnd),this.el.addEventListener("mousedown",this.onStart),this.el.addEventListener("mousemove",this.onMove),this.el.addEventListener("mouseup",this.onEnd),this.maxPullDownDistance=this._pullDown&&this._pullDown.firstChild&&this._pullDown.firstChild.getBoundingClientRect().height||0,this.forceUpdate(),typeof this.props.refreshFunction!="function"))throw new Error(`Mandatory prop "refreshFunction" missing.
34
+ Pull Down To Refresh functionality will not work
35
+ as expected. Check README.md for usage'`)},n.prototype.componentWillUnmount=function(){this.el&&(this.el.removeEventListener("scroll",this.throttledOnScrollListener),this.props.pullDownToRefresh&&(this.el.removeEventListener("touchstart",this.onStart),this.el.removeEventListener("touchmove",this.onMove),this.el.removeEventListener("touchend",this.onEnd),this.el.removeEventListener("mousedown",this.onStart),this.el.removeEventListener("mousemove",this.onMove),this.el.removeEventListener("mouseup",this.onEnd)))},n.prototype.componentDidUpdate=function(e){this.props.dataLength!==e.dataLength&&(this.actionTriggered=!1,this.setState({showLoader:!1}))},n.getDerivedStateFromProps=function(e,r){var i=e.dataLength!==r.prevDataLength;return i?Nu(Nu({},r),{prevDataLength:e.dataLength}):null},n.prototype.isElementAtTop=function(e,r){r===void 0&&(r=.8);var i=e===document.body||e===document.documentElement?window.screen.availHeight:e.clientHeight,a=IS(r);return a.unit===jl.Pixel?e.scrollTop<=a.value+i-e.scrollHeight+1:e.scrollTop<=a.value/100+i-e.scrollHeight+1},n.prototype.isElementAtBottom=function(e,r){r===void 0&&(r=.8);var i=e===document.body||e===document.documentElement?window.screen.availHeight:e.clientHeight,a=IS(r);return a.unit===jl.Pixel?e.scrollTop+i>=e.scrollHeight-a.value:e.scrollTop+i>=a.value/100*e.scrollHeight},n.prototype.render=function(){var e=this,r=Nu({height:this.props.height||"auto",overflow:"auto",WebkitOverflowScrolling:"touch"},this.props.style),i=this.props.hasChildren||!!(this.props.children&&this.props.children instanceof Array&&this.props.children.length),a=this.props.pullDownToRefresh&&this.props.height?{overflow:"auto"}:{};return Zn.createElement("div",{style:a,className:"infinite-scroll-component__outerdiv"},Zn.createElement("div",{className:"infinite-scroll-component "+(this.props.className||""),ref:function(o){return e._infScroll=o},style:r},this.props.pullDownToRefresh&&Zn.createElement("div",{style:{position:"relative"},ref:function(o){return e._pullDown=o}},Zn.createElement("div",{style:{position:"absolute",left:0,right:0,top:-1*this.maxPullDownDistance}},this.state.pullToRefreshThresholdBreached?this.props.releaseToRefreshContent:this.props.pullDownToRefreshContent)),this.props.children,!this.state.showLoader&&!i&&this.props.hasMore&&this.props.loader,this.state.showLoader&&this.props.hasMore&&this.props.loader,!this.props.hasMore&&this.props.endMessage))},n})(_W),cG={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"check-circle",theme:"outlined"},uG=function(n,e){return ao.createElement(zv,Wv({},n,{ref:e,icon:cG}))},fG=ao.forwardRef(uG),dG={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm0 76c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm128.01 198.83c.03 0 .05.01.09.06l45.02 45.01a.2.2 0 01.05.09.12.12 0 010 .07c0 .02-.01.04-.05.08L557.25 512l127.87 127.86a.27.27 0 01.05.06v.02a.12.12 0 010 .07c0 .03-.01.05-.05.09l-45.02 45.02a.2.2 0 01-.09.05.12.12 0 01-.07 0c-.02 0-.04-.01-.08-.05L512 557.25 384.14 685.12c-.04.04-.06.05-.08.05a.12.12 0 01-.07 0c-.03 0-.05-.01-.09-.05l-45.02-45.02a.2.2 0 01-.05-.09.12.12 0 010-.07c0-.02.01-.04.06-.08L466.75 512 338.88 384.14a.27.27 0 01-.05-.06l-.01-.02a.12.12 0 010-.07c0-.03.01-.05.05-.09l45.02-45.02a.2.2 0 01.09-.05.12.12 0 01.07 0c.02 0 .04.01.08.06L512 466.75l127.86-127.86c.04-.05.06-.06.08-.06a.12.12 0 01.07 0z"}}]},name:"close-circle",theme:"outlined"},hG=function(n,e){return ao.createElement(zv,Wv({},n,{ref:e,icon:dG}))},pG=ao.forwardRef(hG),vG={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.4 800.9c.2-.3.5-.6.7-.9C920.6 722.1 960 621.7 960 512s-39.4-210.1-104.8-288c-.2-.3-.5-.5-.7-.8-1.1-1.3-2.1-2.5-3.2-3.7-.4-.5-.8-.9-1.2-1.4l-4.1-4.7-.1-.1c-1.5-1.7-3.1-3.4-4.6-5.1l-.1-.1c-3.2-3.4-6.4-6.8-9.7-10.1l-.1-.1-4.8-4.8-.3-.3c-1.5-1.5-3-2.9-4.5-4.3-.5-.5-1-1-1.6-1.5-1-1-2-1.9-3-2.8-.3-.3-.7-.6-1-1C736.4 109.2 629.5 64 512 64s-224.4 45.2-304.3 119.2c-.3.3-.7.6-1 1-1 .9-2 1.9-3 2.9-.5.5-1 1-1.6 1.5-1.5 1.4-3 2.9-4.5 4.3l-.3.3-4.8 4.8-.1.1c-3.3 3.3-6.5 6.7-9.7 10.1l-.1.1c-1.6 1.7-3.1 3.4-4.6 5.1l-.1.1c-1.4 1.5-2.8 3.1-4.1 4.7-.4.5-.8.9-1.2 1.4-1.1 1.2-2.1 2.5-3.2 3.7-.2.3-.5.5-.7.8C103.4 301.9 64 402.3 64 512s39.4 210.1 104.8 288c.2.3.5.6.7.9l3.1 3.7c.4.5.8.9 1.2 1.4l4.1 4.7c0 .1.1.1.1.2 1.5 1.7 3 3.4 4.6 5l.1.1c3.2 3.4 6.4 6.8 9.6 10.1l.1.1c1.6 1.6 3.1 3.2 4.7 4.7l.3.3c3.3 3.3 6.7 6.5 10.1 9.6 80.1 74 187 119.2 304.5 119.2s224.4-45.2 304.3-119.2a300 300 0 0010-9.6l.3-.3c1.6-1.6 3.2-3.1 4.7-4.7l.1-.1c3.3-3.3 6.5-6.7 9.6-10.1l.1-.1c1.5-1.7 3.1-3.3 4.6-5 0-.1.1-.1.1-.2 1.4-1.5 2.8-3.1 4.1-4.7.4-.5.8-.9 1.2-1.4a99 99 0 003.3-3.7zm4.1-142.6c-13.8 32.6-32 62.8-54.2 90.2a444.07 444.07 0 00-81.5-55.9c11.6-46.9 18.8-98.4 20.7-152.6H887c-3 40.9-12.6 80.6-28.5 118.3zM887 484H743.5c-1.9-54.2-9.1-105.7-20.7-152.6 29.3-15.6 56.6-34.4 81.5-55.9A373.86 373.86 0 01887 484zM658.3 165.5c39.7 16.8 75.8 40 107.6 69.2a394.72 394.72 0 01-59.4 41.8c-15.7-45-35.8-84.1-59.2-115.4 3.7 1.4 7.4 2.9 11 4.4zm-90.6 700.6c-9.2 7.2-18.4 12.7-27.7 16.4V697a389.1 389.1 0 01115.7 26.2c-8.3 24.6-17.9 47.3-29 67.8-17.4 32.4-37.8 58.3-59 75.1zm59-633.1c11 20.6 20.7 43.3 29 67.8A389.1 389.1 0 01540 327V141.6c9.2 3.7 18.5 9.1 27.7 16.4 21.2 16.7 41.6 42.6 59 75zM540 640.9V540h147.5c-1.6 44.2-7.1 87.1-16.3 127.8l-.3 1.2A445.02 445.02 0 00540 640.9zm0-156.9V383.1c45.8-2.8 89.8-12.5 130.9-28.1l.3 1.2c9.2 40.7 14.7 83.5 16.3 127.8H540zm-56 56v100.9c-45.8 2.8-89.8 12.5-130.9 28.1l-.3-1.2c-9.2-40.7-14.7-83.5-16.3-127.8H484zm-147.5-56c1.6-44.2 7.1-87.1 16.3-127.8l.3-1.2c41.1 15.6 85 25.3 130.9 28.1V484H336.5zM484 697v185.4c-9.2-3.7-18.5-9.1-27.7-16.4-21.2-16.7-41.7-42.7-59.1-75.1-11-20.6-20.7-43.3-29-67.8 37.2-14.6 75.9-23.3 115.8-26.1zm0-370a389.1 389.1 0 01-115.7-26.2c8.3-24.6 17.9-47.3 29-67.8 17.4-32.4 37.8-58.4 59.1-75.1 9.2-7.2 18.4-12.7 27.7-16.4V327zM365.7 165.5c3.7-1.5 7.3-3 11-4.4-23.4 31.3-43.5 70.4-59.2 115.4-21-12-40.9-26-59.4-41.8 31.8-29.2 67.9-52.4 107.6-69.2zM165.5 365.7c13.8-32.6 32-62.8 54.2-90.2 24.9 21.5 52.2 40.3 81.5 55.9-11.6 46.9-18.8 98.4-20.7 152.6H137c3-40.9 12.6-80.6 28.5-118.3zM137 540h143.5c1.9 54.2 9.1 105.7 20.7 152.6a444.07 444.07 0 00-81.5 55.9A373.86 373.86 0 01137 540zm228.7 318.5c-39.7-16.8-75.8-40-107.6-69.2 18.5-15.8 38.4-29.7 59.4-41.8 15.7 45 35.8 84.1 59.2 115.4-3.7-1.4-7.4-2.9-11-4.4zm292.6 0c-3.7 1.5-7.3 3-11 4.4 23.4-31.3 43.5-70.4 59.2-115.4 21 12 40.9 26 59.4 41.8a373.81 373.81 0 01-107.6 69.2z"}}]},name:"global",theme:"outlined"},gG=function(n,e){return ao.createElement(zv,Wv({},n,{ref:e,icon:vG}))},yG=ao.forwardRef(gG),mG={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z"}}]},name:"user",theme:"outlined"},bG=function(n,e){return ao.createElement(zv,Wv({},n,{ref:e,icon:mG}))},xG=ao.forwardRef(bG);const _P={DEPARTMENT:"linear-gradient(135deg, #22C55E 0%, #16A34A 100%)",GROUP:"linear-gradient(135deg, #0EA5E9 0%, #22D3EE 100%)",MEMBER:"linear-gradient(135deg, #F97316 0%, #FB923C 100%)",BUTTON:"linear-gradient(99.9deg, #2b69ff -4.18%, #8f91ff 106.52%)"},Ls={AVATAR:{size:28,className:"flex items-center justify-center mr-[8px]",style:{display:"flex",alignItems:"center",justifyContent:"center"}},ICON:{size:14,style:{fontSize:"12px"}},ROUNDED_CONTAINER:{className:"w-8 h-8 rounded-lg flex items-center justify-center",style:{display:"flex",alignItems:"center",justifyContent:"center"}}},_G=t=>({size:Ls.AVATAR.size,className:Ls.AVATAR.className,style:{...Ls.AVATAR.style,background:_P[t]}}),Qh=()=>({size:Ls.ICON.size,style:Ls.ICON.style}),wP=t=>({className:Ls.ROUNDED_CONTAINER.className,style:{...Ls.ROUNDED_CONTAINER.style,background:_P[t]}}),wG=({records:t,loadMore:n,hasMore:e,loadingMore:r})=>{const i=s=>{try{let l;if(s.startsWith("[")||s.startsWith("{"))l=JSON.parse(s);else{const u=s.match(/\((.*)\)/);if(u){const f={};u[1].split(", ").forEach(d=>{const[h,p]=d.split("=");h&&p!==void 0&&(f[h]=p)}),l=f}else return s}const c=u=>u===null?"null":u===void 0?"undefined":Array.isArray(u)?`[
36
+ ${u.map(f=>` ${c(f)}`).join(`,
37
+ `)}
38
+ ]`:typeof u=="object"?`{
39
+ ${Object.entries(u).map(([f,d])=>` ${f}: ${c(d)}`).join(`,
40
+ `)}
41
+ }`:u.toString();return c(l)}catch{return s}},a=s=>{if(!s)return null;const l=$l(s);return Hn("div",{className:"text-gray-500 text-xs",children:[It("div",{children:l.format("YYYY-MM-DD")}),It("div",{children:l.format("HH:mm:ss")})]})},o=s=>{var c;return(((c=s.split("/").pop())==null?void 0:c.split("?")[0])||"").replace(/([A-Z])/g," $1").replace(/^./,u=>u.toUpperCase()).trim()};return It("div",{id:"scrollableDiv",className:"userOperate",style:{height:"calc(100% - 64px)",overflow:"auto",padding:"0 16px"},children:It(lG,{dataLength:t.length,next:n,hasMore:e,loader:It("div",{className:"text-center py-4",children:r?It(pP,{}):null}),scrollableTarget:"scrollableDiv",endMessage:It("div",{className:"text-center text-gray-500 py-4",children:"\u6CA1\u6709\u66F4\u591A\u6570\u636E\u4E86"}),children:It(EW,{mode:"left",style:{padding:"0 8px"},items:t.map(s=>({key:s.id,color:s.success?"green":"red",label:a(s.startTime||s.gmtCreated),children:Hn("div",{className:"bg-white p-4 rounded-lg shadow-sm mb-4 hover:shadow-md transition-shadow ml-2",children:[It("div",{className:"flex justify-between items-start mb-3",children:Hn("div",{className:"flex items-center",children:[It(kW,{icon:It(xG,{...Qh()}),..._G("MEMBER")}),It("span",{className:"font-medium mr-4",children:s.userName||"\u672A\u77E5\u7528\u6237"}),Hn("span",{className:"text-gray-400 flex items-center",children:[It("div",{...wP("GROUP"),className:"w-6 h-6 flex items-center justify-center mr-1",children:It(yG,{...Qh(),className:"text-white text-xs"})}),s.ip]})]})}),It("div",{className:"flex items-center justify-between",children:Hn("div",{className:"flex items-center",children:[Hn("div",{className:"mr-4 flex items-center",children:[It("div",{className:"w-6 h-6 flex items-center justify-center",children:It(vP,{...Qh(),className:" text-xs"})}),It("span",{className:"font-medium",children:s.name||o(s.url)})]}),Hn("div",{className:`flex items-center ${s.success?"text-green-500":"text-red-500"}`,children:[It("div",{className:"w-6 h-6 flex items-center justify-center rounded-lg",children:s.success===1?It(fG,{style:{color:s.success===1?"linear-gradient(135deg, #22C55E 0%, #16A34A 100%)":"linear-gradient(135deg, #EF4444 0%, #DC2626 100%)"},className:" text-xs"}):It(pG,{style:{color:s.success===1?"linear-gradient(135deg, #22C55E 0%, #16A34A 100%)":"linear-gradient(135deg, #EF4444 0%, #DC2626 100%)"},className:" text-xs"})}),It("span",{children:s.success===1?"\u64CD\u4F5C\u6210\u529F":"\u64CD\u4F5C\u5931\u8D25"})]})]})}),s.params&&Hn("div",{className:"mt-3 text-gray-500 text-sm bg-gray-50 p-3 rounded",children:[It("div",{className:"font-medium mb-2",children:"\u8BF7\u6C42\u53C2\u6570\uFF1A"}),It("div",{className:"whitespace-pre font-mono text-xs overflow-x-auto bg-white p-2 rounded border border-gray-100",children:i(s.params)})]}),s.url&&Hn("div",{className:"mt-2 text-gray-400 text-xs",children:[It("span",{className:"font-medium",children:"\u8BF7\u6C42\u8DEF\u5F84\uFF1A"}),s.url]})]},s.id)}))})})})},OP=()=>[["cartesian"]];OP.props={};function OG(t,n){return t=t%(2*Math.PI),n=n%(2*Math.PI),t<0&&(t=2*Math.PI+t),n<0&&(n=2*Math.PI+n),t>=n&&(n=n+2*Math.PI),{startAngle:t,endAngle:n}}const SP=(t={})=>{const n={startAngle:-Math.PI/2,endAngle:Math.PI*3/2,innerRadius:0,outerRadius:1},e=Object.assign(Object.assign({},n),t);return Object.assign(Object.assign({},e),OG(e.startAngle,e.endAngle))},Rf=t=>{const{startAngle:n,endAngle:e,innerRadius:r,outerRadius:i}=SP(t);return[["translate",0,.5],["reflect.y"],["translate",0,-.5],["polar",n,e,r,i]]};Rf.props={};const EP=({startAngle:t=0,endAngle:n=Math.PI*6,innerRadius:e=0,outerRadius:r=1})=>[["translate",.5,.5],["reflect.y"],["translate",-.5,-.5],["helix",t,n,e,r]];EP.props={};const $b=()=>[["transpose"],["translate",.5,.5],["reflect.x"],["translate",-.5,-.5]];$b.props={transform:!0};const SG=(t={})=>{const n={startAngle:-Math.PI/2,endAngle:Math.PI*3/2,innerRadius:0,outerRadius:1};return Object.assign(Object.assign({},n),t)},kP=t=>{const{startAngle:n,endAngle:e,innerRadius:r,outerRadius:i}=SG(t);return[...$b(),...Rf({startAngle:n,endAngle:e,innerRadius:r,outerRadius:i})]};kP.props={};const MP=(t={})=>{const n={startAngle:-Math.PI/2,endAngle:Math.PI*3/2,innerRadius:0,outerRadius:1};return Object.assign(Object.assign({},n),t)},jb=t=>{const{startAngle:n,endAngle:e,innerRadius:r,outerRadius:i}=MP(t);return[["transpose"],["translate",.5,.5],["reflect"],["translate",-.5,-.5],...Rf({startAngle:n,endAngle:e,innerRadius:r,outerRadius:i})]};jb.props={};const Fb=()=>[["parallel",0,1,0,1]];Fb.props={};const AP=({focusX:t=0,focusY:n=0,distortionX:e=2,distortionY:r=2,visual:i=!1})=>[["fisheye",t,n,e,r,i]];AP.props={transform:!0};const TP=t=>{const{startAngle:n=-Math.PI/2,endAngle:e=Math.PI*3/2,innerRadius:r=0,outerRadius:i=1}=t;return[...Fb(),...Rf({startAngle:n,endAngle:e,innerRadius:r,outerRadius:i})]};TP.props={};const PP=({value:t})=>n=>n.map(()=>t);PP.props={};const CP=({value:t})=>n=>n.map(t);CP.props={};const LP=({value:t})=>n=>n.map(e=>e[t]);LP.props={};const NP=({value:t})=>()=>t;NP.props={};var js=function(t){return t!==null&&typeof t!="function"&&isFinite(t.length)},RP=function(t,n){if(!js(t))return t;for(var e=[],r=0;r<t.length;r++){var i=t[r];n(i,r)&&e.push(i)}return e};function Xn(t){return typeof t=="function"}function Dt(t){return t==null}function Cn(t){return Array.isArray(t)}const If=(function(t){var n=typeof t;return t!==null&&n==="object"||n==="function"});function Bb(t,n){if(t){var e;if(Cn(t))for(var r=0,i=t.length;r<i&&(e=n(t[r],r),e!==!1);r++);else if(If(t)){for(var a in t)if(t.hasOwnProperty(a)&&(e=n(t[a],a),e===!1))break}}}var Yv=Object.keys?function(t){return Object.keys(t)}:function(t){var n=[];return Bb(t,function(e,r){Xn(t)&&r==="prototype"||n.push(r)}),n};function EG(t,n){var e=Yv(n),r=e.length;if(Dt(t))return!r;for(var i=0;i<r;i+=1){var a=e[i];if(n[a]!==t[a]||!(a in t))return!1}return!0}var Hm=function(t){return typeof t=="object"&&t!==null},kG={}.toString,IP=function(t,n){return kG.call(t)==="[object "+n+"]"},Ja=function(t){if(!Hm(t)||!IP(t,"Object"))return!1;if(Object.getPrototypeOf(t)===null)return!0;for(var n=t;Object.getPrototypeOf(n)!==null;)n=Object.getPrototypeOf(n);return Object.getPrototypeOf(t)===n};function Ql(t,n){if(!Cn(t))return null;var e;if(Xn(n)&&(e=n),Ja(n)&&(e=function(i){return EG(i,n)}),e){for(var r=0;r<t.length;r+=1)if(e(t[r]))return t[r]}return null}var MG=function(t){if(!Cn(t))return[];for(var n=[],e=0;e<t.length;e++)n=n.concat(t[e]);return n};function _p(t){if(!Array.isArray(t))return-1/0;var n=t.length;if(!n)return-1/0;for(var e=t[0],r=1;r<n;r++)e=Math.max(e,t[r]);return e}const wp=(function(t){if(Cn(t))return t.reduce(function(n,e){return Math.min(n,e)},t[0])});var DP=function(t,n,e){if(!Cn(t)&&!Ja(t))return t;var r=e;return Bb(t,function(i,a){r=n(r,i,a)}),r};function tn(t){return typeof t=="string"}function AG(t){if(js(t))return t[0]}function Qr(t){if(js(t)){var n=t;return n[n.length-1]}}var kn=function(t,n,e){return t<n?n:t>e?e:t};function Qe(t){return typeof t=="number"}var TG=1e-5;function Ru(t,n,e){return e===void 0&&(e=TG),t===n||Math.abs(t-n)<e}const PG=(function(t,n){if(Cn(t)){for(var e,r=-1/0,i=0;i<t.length;i++){var a=t[i],o=Xn(n)?n(a):a[n];o>r&&(e=a,r=o)}return e}}),CG=(function(t,n){if(Cn(t)){for(var e,r=1/0,i=0;i<t.length;i++){var a=t[i],o=Xn(n)?n(a):a[n];o<r&&(e=a,r=o)}return e}});var $P=function(t,n){return(t%n+n)%n};const jP=(function(t){return Dt(t)?"":t.toString()});var FP=function(t){var n=jP(t);return n.charAt(0).toLowerCase()+n.substring(1)};function LG(t,n){return!t||!n?t:t.replace(/\\?\{([^{}]+)\}/g,function(e,r){return e.charAt(0)==="\\"?e.slice(1):n[r]===void 0?"":n[r]})}var Uo=function(t){var n=jP(t);return n.charAt(0).toUpperCase()+n.substring(1)},DS=function(t){return IP(t,"Boolean")};function BP(t){return t===null}var Be=function(t){return t===void 0};function NG(t){return t instanceof Element||t instanceof Document}function $S(t,n){for(var e in n)n.hasOwnProperty(e)&&e!=="constructor"&&n[e]!==void 0&&(t[e]=n[e])}function zP(t,n,e,r){return n&&$S(t,n),e&&$S(t,e),t}var Ku=function(t){if(typeof t!="object"||t===null)return t;var n;if(Cn(t)){n=[];for(var e=0,r=t.length;e<r;e++)typeof t[e]=="object"&&t[e]!=null?n[e]=Ku(t[e]):n[e]=t[e]}else{n={};for(var i in t)typeof t[i]=="object"&&t[i]!=null?n[i]=Ku(t[i]):n[i]=t[i]}return n};function WP(t,n,e){var r;return function(){var i=this,a=arguments,o=function(){r=null,t.apply(i,a)};clearTimeout(r),r=setTimeout(o,n)}}function RG(t){var n,e,r,i=t;function a(s,l){++n>i&&(r=e,o(1),++n),e[s]=l}function o(s){n=0,e=Object.create(null),s||(r=Object.create(null))}return o(),{clear:o,has:function(s){return e[s]!==void 0||r[s]!==void 0},get:function(s){var l=e[s];if(l!==void 0)return l;if((l=r[s])!==void 0)return a(s,l),l},set:function(s,l){e[s]!==void 0?e[s]=l:a(s,l)}}}var gy=new Map;function IG(t,n,e){var r=function(){for(var i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];var o=n?n.apply(this,i):i[0];gy.has(t)||gy.set(t,RG(e));var s=gy.get(t);if(s.has(o))return s.get(o);var l=t.apply(this,i);return s.set(o,l),l};return r}var DG=5;function $G(t,n){if(Object.hasOwn)return Object.hasOwn(t,n);if(t==null)throw new TypeError("Cannot convert undefined or null to object");return Object.prototype.hasOwnProperty.call(Object(t),n)}function GP(t,n,e,r){e=e||0,r=r||DG;for(var i in n)if($G(n,i)){var a=n[i];a!==null&&Ja(a)?(Ja(t[i])||(t[i]={}),e<r?GP(t[i],a,e+1,r):t[i]=n[i]):Cn(a)?(t[i]=[],t[i]=t[i].concat(a)):a!==void 0&&(t[i]=a)}}var at=function(t){for(var n=[],e=1;e<arguments.length;e++)n[e-1]=arguments[e];for(var r=0;r<n.length;r+=1)GP(t,n[r]);return t},YP=function(t,n){if(!js(t))return-1;var e=Array.prototype.indexOf;if(e)return e.call(t,n);for(var r=-1,i=0;i<t.length;i++)if(t[i]===n){r=i;break}return r},Zu=function(t,n){if(t===n)return!0;if(!t||!n||tn(t)||tn(n))return!1;if(js(t)||js(n)){if(t.length!==n.length)return!1;for(var e=!0,r=0;r<t.length&&(e=Zu(t[r],n[r]),!!e);r++);return e}if(Hm(t)||Hm(n)){var i=Object.keys(t),a=Object.keys(n);if(i.length!==a.length)return!1;for(var e=!0,r=0;r<i.length&&(e=Zu(t[i[r]],n[i[r]]),!!e);r++);return e}return!1},jG=function(t){return t};const FG=(function(t,n){n===void 0&&(n=jG);var e={};return If(t)&&!Dt(t)&&Object.keys(t).forEach(function(r){e[r]=n(t[r],r)}),e}),zt=(function(t,n,e){for(var r=0,i=tn(n)?n.split("."):n;t&&r<i.length;)t=t[i[r++]];return t===void 0||r<i.length?e:t}),Hv=(function(t,n,e){var r=t,i=tn(n)?n.split("."):n;return i.forEach(function(a,o){o<i.length-1?(If(r[a])||(r[a]=Qe(i[o+1])?[]:{}),r=r[a]):r[a]=e}),t});var BG=Object.prototype.hasOwnProperty;const Df=(function(t,n){if(t===null||!Ja(t))return{};var e={};return Bb(n,function(r){BG.call(t,r)&&(e[r]=t[r])}),e}),zb=(function(t,n){return DP(t,function(e,r,i){return n.includes(i)||(e[i]=r),e},{})}),Fs=(function(t,n,e){var r,i,a,o,s=0;e||(e={});var l=function(){s=e.leading===!1?0:Date.now(),r=null,o=t.apply(i,a),r||(i=a=null)},c=function(){var u=Date.now();!s&&e.leading===!1&&(s=u);var f=n-(u-s);return i=this,a=arguments,f<=0||f>n?(r&&(clearTimeout(r),r=null),s=u,o=t.apply(i,a),r||(i=a=null)):!r&&e.trailing!==!1&&(r=setTimeout(l,f)),o};return c.cancel=function(){clearTimeout(r),s=0,r=i=a=null},c}),yy=(function(){}),_a=(function(t){return t});function Qu(t){return Dt(t)?0:js(t)?t.length:Object.keys(t).length}var un=1e-6,zn=typeof Float32Array<"u"?Float32Array:Array,zG="zyx";function xc(){var t=new zn(9);return zn!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}function WG(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[4],t[4]=n[5],t[5]=n[6],t[6]=n[8],t[7]=n[9],t[8]=n[10],t}function GG(t){var n=new zn(9);return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n[6]=t[6],n[7]=t[7],n[8]=t[8],n}function YG(t,n,e,r,i,a,o,s,l){var c=new zn(9);return c[0]=t,c[1]=n,c[2]=e,c[3]=r,c[4]=i,c[5]=a,c[6]=o,c[7]=s,c[8]=l,c}function HG(t,n){var e=n[0],r=n[1],i=n[2],a=n[3],o=n[4],s=n[5],l=n[6],c=n[7],u=n[8],f=u*o-s*c,d=-u*a+s*l,h=c*a-o*l,p=e*f+r*d+i*h;return p?(p=1/p,t[0]=f*p,t[1]=(-u*r+i*c)*p,t[2]=(s*r-i*o)*p,t[3]=d*p,t[4]=(u*e-i*l)*p,t[5]=(-s*e+i*a)*p,t[6]=h*p,t[7]=(-c*e+r*l)*p,t[8]=(o*e-r*a)*p,t):null}function UG(t,n,e){var r=n[0],i=n[1],a=n[2],o=n[3],s=n[4],l=n[5],c=n[6],u=n[7],f=n[8],d=e[0],h=e[1],p=e[2],g=e[3],y=e[4],m=e[5],x=e[6],_=e[7],w=e[8];return t[0]=d*r+h*o+p*c,t[1]=d*i+h*s+p*u,t[2]=d*a+h*l+p*f,t[3]=g*r+y*o+m*c,t[4]=g*i+y*s+m*u,t[5]=g*a+y*l+m*f,t[6]=x*r+_*o+w*c,t[7]=x*i+_*s+w*u,t[8]=x*a+_*l+w*f,t}function VG(t,n){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=n[0],t[7]=n[1],t[8]=1,t}function XG(t,n){var e=Math.sin(n),r=Math.cos(n);return t[0]=r,t[1]=e,t[2]=0,t[3]=-e,t[4]=r,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}function qG(t,n){return t[0]=n[0],t[1]=0,t[2]=0,t[3]=0,t[4]=n[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}var KG=UG;function Ne(){var t=new zn(16);return zn!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t}function Wb(t){var n=new zn(16);return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n[6]=t[6],n[7]=t[7],n[8]=t[8],n[9]=t[9],n[10]=t[10],n[11]=t[11],n[12]=t[12],n[13]=t[13],n[14]=t[14],n[15]=t[15],n}function Jl(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],t}function HP(t,n,e,r,i,a,o,s,l,c,u,f,d,h,p,g){var y=new zn(16);return y[0]=t,y[1]=n,y[2]=e,y[3]=r,y[4]=i,y[5]=a,y[6]=o,y[7]=s,y[8]=l,y[9]=c,y[10]=u,y[11]=f,y[12]=d,y[13]=h,y[14]=p,y[15]=g,y}function Um(t,n,e,r,i,a,o,s,l,c,u,f,d,h,p,g,y){return t[0]=n,t[1]=e,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=l,t[8]=c,t[9]=u,t[10]=f,t[11]=d,t[12]=h,t[13]=p,t[14]=g,t[15]=y,t}function Bo(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function UP(t,n){if(t===n){var e=n[1],r=n[2],i=n[3],a=n[6],o=n[7],s=n[11];t[1]=n[4],t[2]=n[8],t[3]=n[12],t[4]=e,t[6]=n[9],t[7]=n[13],t[8]=r,t[9]=a,t[11]=n[14],t[12]=i,t[13]=o,t[14]=s}else t[0]=n[0],t[1]=n[4],t[2]=n[8],t[3]=n[12],t[4]=n[1],t[5]=n[5],t[6]=n[9],t[7]=n[13],t[8]=n[2],t[9]=n[6],t[10]=n[10],t[11]=n[14],t[12]=n[3],t[13]=n[7],t[14]=n[11],t[15]=n[15];return t}function Yi(t,n){var e=n[0],r=n[1],i=n[2],a=n[3],o=n[4],s=n[5],l=n[6],c=n[7],u=n[8],f=n[9],d=n[10],h=n[11],p=n[12],g=n[13],y=n[14],m=n[15],x=e*s-r*o,_=e*l-i*o,w=e*c-a*o,O=r*l-i*s,S=r*c-a*s,E=i*c-a*l,M=u*g-f*p,A=u*y-d*p,T=u*m-h*p,P=f*y-d*g,N=f*m-h*g,C=d*m-h*y,R=x*C-_*N+w*P+O*T-S*A+E*M;return R?(R=1/R,t[0]=(s*C-l*N+c*P)*R,t[1]=(i*N-r*C-a*P)*R,t[2]=(g*E-y*S+m*O)*R,t[3]=(d*S-f*E-h*O)*R,t[4]=(l*T-o*C-c*A)*R,t[5]=(e*C-i*T+a*A)*R,t[6]=(y*w-p*E-m*_)*R,t[7]=(u*E-d*w+h*_)*R,t[8]=(o*N-s*T+c*M)*R,t[9]=(r*T-e*N-a*M)*R,t[10]=(p*S-g*w+m*x)*R,t[11]=(f*w-u*S-h*x)*R,t[12]=(s*A-o*P-l*M)*R,t[13]=(e*P-r*A+i*M)*R,t[14]=(g*_-p*O-y*x)*R,t[15]=(u*O-f*_+d*x)*R,t):null}function ZG(t,n){var e=n[0],r=n[1],i=n[2],a=n[3],o=n[4],s=n[5],l=n[6],c=n[7],u=n[8],f=n[9],d=n[10],h=n[11],p=n[12],g=n[13],y=n[14],m=n[15],x=e*s-r*o,_=e*l-i*o,w=e*c-a*o,O=r*l-i*s,S=r*c-a*s,E=i*c-a*l,M=u*g-f*p,A=u*y-d*p,T=u*m-h*p,P=f*y-d*g,N=f*m-h*g,C=d*m-h*y;return t[0]=s*C-l*N+c*P,t[1]=i*N-r*C-a*P,t[2]=g*E-y*S+m*O,t[3]=d*S-f*E-h*O,t[4]=l*T-o*C-c*A,t[5]=e*C-i*T+a*A,t[6]=y*w-p*E-m*_,t[7]=u*E-d*w+h*_,t[8]=o*N-s*T+c*M,t[9]=r*T-e*N-a*M,t[10]=p*S-g*w+m*x,t[11]=f*w-u*S-h*x,t[12]=s*A-o*P-l*M,t[13]=e*P-r*A+i*M,t[14]=g*_-p*O-y*x,t[15]=u*O-f*_+d*x,t}function VP(t){var n=t[0],e=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],l=t[7],c=t[8],u=t[9],f=t[10],d=t[11],h=t[12],p=t[13],g=t[14],y=t[15],m=n*o-e*a,x=n*s-r*a,_=e*s-r*o,w=c*p-u*h,O=c*g-f*h,S=u*g-f*p,E=n*S-e*O+r*w,M=a*S-o*O+s*w,A=c*_-u*x+f*m,T=h*_-p*x+g*m;return l*E-i*M+y*A-d*T}function mr(t,n,e){var r=n[0],i=n[1],a=n[2],o=n[3],s=n[4],l=n[5],c=n[6],u=n[7],f=n[8],d=n[9],h=n[10],p=n[11],g=n[12],y=n[13],m=n[14],x=n[15],_=e[0],w=e[1],O=e[2],S=e[3];return t[0]=_*r+w*s+O*f+S*g,t[1]=_*i+w*l+O*d+S*y,t[2]=_*a+w*c+O*h+S*m,t[3]=_*o+w*u+O*p+S*x,_=e[4],w=e[5],O=e[6],S=e[7],t[4]=_*r+w*s+O*f+S*g,t[5]=_*i+w*l+O*d+S*y,t[6]=_*a+w*c+O*h+S*m,t[7]=_*o+w*u+O*p+S*x,_=e[8],w=e[9],O=e[10],S=e[11],t[8]=_*r+w*s+O*f+S*g,t[9]=_*i+w*l+O*d+S*y,t[10]=_*a+w*c+O*h+S*m,t[11]=_*o+w*u+O*p+S*x,_=e[12],w=e[13],O=e[14],S=e[15],t[12]=_*r+w*s+O*f+S*g,t[13]=_*i+w*l+O*d+S*y,t[14]=_*a+w*c+O*h+S*m,t[15]=_*o+w*u+O*p+S*x,t}function Fl(t,n,e){var r=e[0],i=e[1],a=e[2],o,s,l,c,u,f,d,h,p,g,y,m;return n===t?(t[12]=n[0]*r+n[4]*i+n[8]*a+n[12],t[13]=n[1]*r+n[5]*i+n[9]*a+n[13],t[14]=n[2]*r+n[6]*i+n[10]*a+n[14],t[15]=n[3]*r+n[7]*i+n[11]*a+n[15]):(o=n[0],s=n[1],l=n[2],c=n[3],u=n[4],f=n[5],d=n[6],h=n[7],p=n[8],g=n[9],y=n[10],m=n[11],t[0]=o,t[1]=s,t[2]=l,t[3]=c,t[4]=u,t[5]=f,t[6]=d,t[7]=h,t[8]=p,t[9]=g,t[10]=y,t[11]=m,t[12]=o*r+u*i+p*a+n[12],t[13]=s*r+f*i+g*a+n[13],t[14]=l*r+d*i+y*a+n[14],t[15]=c*r+h*i+m*a+n[15]),t}function XP(t,n,e){var r=e[0],i=e[1],a=e[2];return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=n[3]*r,t[4]=n[4]*i,t[5]=n[5]*i,t[6]=n[6]*i,t[7]=n[7]*i,t[8]=n[8]*a,t[9]=n[9]*a,t[10]=n[10]*a,t[11]=n[11]*a,t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],t}function QG(t,n,e,r){var i=r[0],a=r[1],o=r[2],s=Math.sqrt(i*i+a*a+o*o),l,c,u,f,d,h,p,g,y,m,x,_,w,O,S,E,M,A,T,P,N,C,R,D;return s<un?null:(s=1/s,i*=s,a*=s,o*=s,l=Math.sin(e),c=Math.cos(e),u=1-c,f=n[0],d=n[1],h=n[2],p=n[3],g=n[4],y=n[5],m=n[6],x=n[7],_=n[8],w=n[9],O=n[10],S=n[11],E=i*i*u+c,M=a*i*u+o*l,A=o*i*u-a*l,T=i*a*u-o*l,P=a*a*u+c,N=o*a*u+i*l,C=i*o*u+a*l,R=a*o*u-i*l,D=o*o*u+c,t[0]=f*E+g*M+_*A,t[1]=d*E+y*M+w*A,t[2]=h*E+m*M+O*A,t[3]=p*E+x*M+S*A,t[4]=f*T+g*P+_*N,t[5]=d*T+y*P+w*N,t[6]=h*T+m*P+O*N,t[7]=p*T+x*P+S*N,t[8]=f*C+g*R+_*D,t[9]=d*C+y*R+w*D,t[10]=h*C+m*R+O*D,t[11]=p*C+x*R+S*D,n!==t&&(t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15]),t)}function qP(t,n,e){var r=Math.sin(e),i=Math.cos(e),a=n[4],o=n[5],s=n[6],l=n[7],c=n[8],u=n[9],f=n[10],d=n[11];return n!==t&&(t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15]),t[4]=a*i+c*r,t[5]=o*i+u*r,t[6]=s*i+f*r,t[7]=l*i+d*r,t[8]=c*i-a*r,t[9]=u*i-o*r,t[10]=f*i-s*r,t[11]=d*i-l*r,t}function KP(t,n,e){var r=Math.sin(e),i=Math.cos(e),a=n[0],o=n[1],s=n[2],l=n[3],c=n[8],u=n[9],f=n[10],d=n[11];return n!==t&&(t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15]),t[0]=a*i-c*r,t[1]=o*i-u*r,t[2]=s*i-f*r,t[3]=l*i-d*r,t[8]=a*r+c*i,t[9]=o*r+u*i,t[10]=s*r+f*i,t[11]=l*r+d*i,t}function JG(t,n,e){var r=Math.sin(e),i=Math.cos(e),a=n[0],o=n[1],s=n[2],l=n[3],c=n[4],u=n[5],f=n[6],d=n[7];return n!==t&&(t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15]),t[0]=a*i+c*r,t[1]=o*i+u*r,t[2]=s*i+f*r,t[3]=l*i+d*r,t[4]=c*i-a*r,t[5]=u*i-o*r,t[6]=f*i-s*r,t[7]=d*i-l*r,t}function Wa(t,n){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function Eo(t,n){return t[0]=n[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=n[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=n[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function ZP(t,n,e){var r=e[0],i=e[1],a=e[2],o=Math.sqrt(r*r+i*i+a*a),s,l,c;return o<un?null:(o=1/o,r*=o,i*=o,a*=o,s=Math.sin(n),l=Math.cos(n),c=1-l,t[0]=r*r*c+l,t[1]=i*r*c+a*s,t[2]=a*r*c-i*s,t[3]=0,t[4]=r*i*c-a*s,t[5]=i*i*c+l,t[6]=a*i*c+r*s,t[7]=0,t[8]=r*a*c+i*s,t[9]=i*a*c-r*s,t[10]=a*a*c+l,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)}function QP(t,n){var e=Math.sin(n),r=Math.cos(n);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=r,t[6]=e,t[7]=0,t[8]=0,t[9]=-e,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function JP(t,n){var e=Math.sin(n),r=Math.cos(n);return t[0]=r,t[1]=0,t[2]=-e,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=e,t[9]=0,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function Vm(t,n){var e=Math.sin(n),r=Math.cos(n);return t[0]=r,t[1]=e,t[2]=0,t[3]=0,t[4]=-e,t[5]=r,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function tC(t,n,e){var r=n[0],i=n[1],a=n[2],o=n[3],s=r+r,l=i+i,c=a+a,u=r*s,f=r*l,d=r*c,h=i*l,p=i*c,g=a*c,y=o*s,m=o*l,x=o*c;return t[0]=1-(h+g),t[1]=f+x,t[2]=d-m,t[3]=0,t[4]=f-x,t[5]=1-(u+g),t[6]=p+y,t[7]=0,t[8]=d+m,t[9]=p-y,t[10]=1-(u+h),t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function tY(t,n){var e=new zn(3),r=-n[0],i=-n[1],a=-n[2],o=n[3],s=n[4],l=n[5],c=n[6],u=n[7],f=r*r+i*i+a*a+o*o;return f>0?(e[0]=(s*o+u*r+l*a-c*i)*2/f,e[1]=(l*o+u*i+c*r-s*a)*2/f,e[2]=(c*o+u*a+s*i-l*r)*2/f):(e[0]=(s*o+u*r+l*a-c*i)*2,e[1]=(l*o+u*i+c*r-s*a)*2,e[2]=(c*o+u*a+s*i-l*r)*2),tC(t,n,e),t}function Op(t,n){return t[0]=n[12],t[1]=n[13],t[2]=n[14],t}function tc(t,n){var e=n[0],r=n[1],i=n[2],a=n[4],o=n[5],s=n[6],l=n[8],c=n[9],u=n[10];return t[0]=Math.sqrt(e*e+r*r+i*i),t[1]=Math.sqrt(a*a+o*o+s*s),t[2]=Math.sqrt(l*l+c*c+u*u),t}function Sp(t,n){var e=new zn(3);tc(e,n);var r=1/e[0],i=1/e[1],a=1/e[2],o=n[0]*r,s=n[1]*i,l=n[2]*a,c=n[4]*r,u=n[5]*i,f=n[6]*a,d=n[8]*r,h=n[9]*i,p=n[10]*a,g=o+u+p,y=0;return g>0?(y=Math.sqrt(g+1)*2,t[3]=.25*y,t[0]=(f-h)/y,t[1]=(d-l)/y,t[2]=(s-c)/y):o>u&&o>p?(y=Math.sqrt(1+o-u-p)*2,t[3]=(f-h)/y,t[0]=.25*y,t[1]=(s+c)/y,t[2]=(d+l)/y):u>p?(y=Math.sqrt(1+u-o-p)*2,t[3]=(d-l)/y,t[0]=(s+c)/y,t[1]=.25*y,t[2]=(f+h)/y):(y=Math.sqrt(1+p-o-u)*2,t[3]=(s-c)/y,t[0]=(d+l)/y,t[1]=(f+h)/y,t[2]=.25*y),t}function eY(t,n,e,r){n[0]=r[12],n[1]=r[13],n[2]=r[14];var i=r[0],a=r[1],o=r[2],s=r[4],l=r[5],c=r[6],u=r[8],f=r[9],d=r[10];e[0]=Math.sqrt(i*i+a*a+o*o),e[1]=Math.sqrt(s*s+l*l+c*c),e[2]=Math.sqrt(u*u+f*f+d*d);var h=1/e[0],p=1/e[1],g=1/e[2],y=i*h,m=a*p,x=o*g,_=s*h,w=l*p,O=c*g,S=u*h,E=f*p,M=d*g,A=y+w+M,T=0;return A>0?(T=Math.sqrt(A+1)*2,t[3]=.25*T,t[0]=(O-E)/T,t[1]=(S-x)/T,t[2]=(m-_)/T):y>w&&y>M?(T=Math.sqrt(1+y-w-M)*2,t[3]=(O-E)/T,t[0]=.25*T,t[1]=(m+_)/T,t[2]=(S+x)/T):w>M?(T=Math.sqrt(1+w-y-M)*2,t[3]=(S-x)/T,t[0]=(m+_)/T,t[1]=.25*T,t[2]=(O+E)/T):(T=Math.sqrt(1+M-y-w)*2,t[3]=(m-_)/T,t[0]=(S+x)/T,t[1]=(O+E)/T,t[2]=.25*T),t}function nY(t,n,e,r){var i=n[0],a=n[1],o=n[2],s=n[3],l=i+i,c=a+a,u=o+o,f=i*l,d=i*c,h=i*u,p=a*c,g=a*u,y=o*u,m=s*l,x=s*c,_=s*u,w=r[0],O=r[1],S=r[2];return t[0]=(1-(p+y))*w,t[1]=(d+_)*w,t[2]=(h-x)*w,t[3]=0,t[4]=(d-_)*O,t[5]=(1-(f+y))*O,t[6]=(g+m)*O,t[7]=0,t[8]=(h+x)*S,t[9]=(g-m)*S,t[10]=(1-(f+p))*S,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function Iu(t,n,e,r,i){var a=n[0],o=n[1],s=n[2],l=n[3],c=a+a,u=o+o,f=s+s,d=a*c,h=a*u,p=a*f,g=o*u,y=o*f,m=s*f,x=l*c,_=l*u,w=l*f,O=r[0],S=r[1],E=r[2],M=i[0],A=i[1],T=i[2],P=(1-(g+m))*O,N=(h+w)*O,C=(p-_)*O,R=(h-w)*S,D=(1-(d+m))*S,F=(y+x)*S,j=(p+_)*E,I=(y-x)*E,$=(1-(d+g))*E;return t[0]=P,t[1]=N,t[2]=C,t[3]=0,t[4]=R,t[5]=D,t[6]=F,t[7]=0,t[8]=j,t[9]=I,t[10]=$,t[11]=0,t[12]=e[0]+M-(P*M+R*A+j*T),t[13]=e[1]+A-(N*M+D*A+I*T),t[14]=e[2]+T-(C*M+F*A+$*T),t[15]=1,t}function Gb(t,n){var e=n[0],r=n[1],i=n[2],a=n[3],o=e+e,s=r+r,l=i+i,c=e*o,u=r*o,f=r*s,d=i*o,h=i*s,p=i*l,g=a*o,y=a*s,m=a*l;return t[0]=1-f-p,t[1]=u+m,t[2]=d-y,t[3]=0,t[4]=u-m,t[5]=1-c-p,t[6]=h+g,t[7]=0,t[8]=d+y,t[9]=h-g,t[10]=1-c-f,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function rY(t,n,e,r,i,a,o){var s=1/(e-n),l=1/(i-r),c=1/(a-o);return t[0]=a*2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a*2*l,t[6]=0,t[7]=0,t[8]=(e+n)*s,t[9]=(i+r)*l,t[10]=(o+a)*c,t[11]=-1,t[12]=0,t[13]=0,t[14]=o*a*2*c,t[15]=0,t}function eC(t,n,e,r,i){var a=1/Math.tan(n/2);if(t[0]=a/e,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,i!=null&&i!==1/0){var o=1/(r-i);t[10]=(i+r)*o,t[14]=2*i*r*o}else t[10]=-1,t[14]=-2*r;return t}var iY=eC;function aY(t,n,e,r,i){var a=1/Math.tan(n/2);if(t[0]=a/e,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,i!=null&&i!==1/0){var o=1/(r-i);t[10]=i*o,t[14]=i*r*o}else t[10]=-1,t[14]=-r;return t}function oY(t,n,e,r){var i=Math.tan(n.upDegrees*Math.PI/180),a=Math.tan(n.downDegrees*Math.PI/180),o=Math.tan(n.leftDegrees*Math.PI/180),s=Math.tan(n.rightDegrees*Math.PI/180),l=2/(o+s),c=2/(i+a);return t[0]=l,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=c,t[6]=0,t[7]=0,t[8]=-((o-s)*l*.5),t[9]=(i-a)*c*.5,t[10]=r/(e-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*e/(e-r),t[15]=0,t}function nC(t,n,e,r,i,a,o){var s=1/(n-e),l=1/(r-i),c=1/(a-o);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*c,t[11]=0,t[12]=(n+e)*s,t[13]=(i+r)*l,t[14]=(o+a)*c,t[15]=1,t}var rC=nC;function iC(t,n,e,r,i,a,o){var s=1/(n-e),l=1/(r-i),c=1/(a-o);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=c,t[11]=0,t[12]=(n+e)*s,t[13]=(i+r)*l,t[14]=a*c,t[15]=1,t}function aC(t,n,e,r){var i,a,o,s,l,c,u,f,d,h,p=n[0],g=n[1],y=n[2],m=r[0],x=r[1],_=r[2],w=e[0],O=e[1],S=e[2];return Math.abs(p-w)<un&&Math.abs(g-O)<un&&Math.abs(y-S)<un?Bo(t):(u=p-w,f=g-O,d=y-S,h=1/Math.sqrt(u*u+f*f+d*d),u*=h,f*=h,d*=h,i=x*d-_*f,a=_*u-m*d,o=m*f-x*u,h=Math.sqrt(i*i+a*a+o*o),h?(h=1/h,i*=h,a*=h,o*=h):(i=0,a=0,o=0),s=f*o-d*a,l=d*i-u*o,c=u*a-f*i,h=Math.sqrt(s*s+l*l+c*c),h?(h=1/h,s*=h,l*=h,c*=h):(s=0,l=0,c=0),t[0]=i,t[1]=s,t[2]=u,t[3]=0,t[4]=a,t[5]=l,t[6]=f,t[7]=0,t[8]=o,t[9]=c,t[10]=d,t[11]=0,t[12]=-(i*p+a*g+o*y),t[13]=-(s*p+l*g+c*y),t[14]=-(u*p+f*g+d*y),t[15]=1,t)}function sY(t,n,e,r){var i=n[0],a=n[1],o=n[2],s=r[0],l=r[1],c=r[2],u=i-e[0],f=a-e[1],d=o-e[2],h=u*u+f*f+d*d;h>0&&(h=1/Math.sqrt(h),u*=h,f*=h,d*=h);var p=l*d-c*f,g=c*u-s*d,y=s*f-l*u;return h=p*p+g*g+y*y,h>0&&(h=1/Math.sqrt(h),p*=h,g*=h,y*=h),t[0]=p,t[1]=g,t[2]=y,t[3]=0,t[4]=f*y-d*g,t[5]=d*p-u*y,t[6]=u*g-f*p,t[7]=0,t[8]=u,t[9]=f,t[10]=d,t[11]=0,t[12]=i,t[13]=a,t[14]=o,t[15]=1,t}function lY(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"}function cY(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]+t[3]*t[3]+t[4]*t[4]+t[5]*t[5]+t[6]*t[6]+t[7]*t[7]+t[8]*t[8]+t[9]*t[9]+t[10]*t[10]+t[11]*t[11]+t[12]*t[12]+t[13]*t[13]+t[14]*t[14]+t[15]*t[15])}function uY(t,n,e){return t[0]=n[0]+e[0],t[1]=n[1]+e[1],t[2]=n[2]+e[2],t[3]=n[3]+e[3],t[4]=n[4]+e[4],t[5]=n[5]+e[5],t[6]=n[6]+e[6],t[7]=n[7]+e[7],t[8]=n[8]+e[8],t[9]=n[9]+e[9],t[10]=n[10]+e[10],t[11]=n[11]+e[11],t[12]=n[12]+e[12],t[13]=n[13]+e[13],t[14]=n[14]+e[14],t[15]=n[15]+e[15],t}function oC(t,n,e){return t[0]=n[0]-e[0],t[1]=n[1]-e[1],t[2]=n[2]-e[2],t[3]=n[3]-e[3],t[4]=n[4]-e[4],t[5]=n[5]-e[5],t[6]=n[6]-e[6],t[7]=n[7]-e[7],t[8]=n[8]-e[8],t[9]=n[9]-e[9],t[10]=n[10]-e[10],t[11]=n[11]-e[11],t[12]=n[12]-e[12],t[13]=n[13]-e[13],t[14]=n[14]-e[14],t[15]=n[15]-e[15],t}function fY(t,n,e){return t[0]=n[0]*e,t[1]=n[1]*e,t[2]=n[2]*e,t[3]=n[3]*e,t[4]=n[4]*e,t[5]=n[5]*e,t[6]=n[6]*e,t[7]=n[7]*e,t[8]=n[8]*e,t[9]=n[9]*e,t[10]=n[10]*e,t[11]=n[11]*e,t[12]=n[12]*e,t[13]=n[13]*e,t[14]=n[14]*e,t[15]=n[15]*e,t}function dY(t,n,e,r){return t[0]=n[0]+e[0]*r,t[1]=n[1]+e[1]*r,t[2]=n[2]+e[2]*r,t[3]=n[3]+e[3]*r,t[4]=n[4]+e[4]*r,t[5]=n[5]+e[5]*r,t[6]=n[6]+e[6]*r,t[7]=n[7]+e[7]*r,t[8]=n[8]+e[8]*r,t[9]=n[9]+e[9]*r,t[10]=n[10]+e[10]*r,t[11]=n[11]+e[11]*r,t[12]=n[12]+e[12]*r,t[13]=n[13]+e[13]*r,t[14]=n[14]+e[14]*r,t[15]=n[15]+e[15]*r,t}function Xm(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]&&t[4]===n[4]&&t[5]===n[5]&&t[6]===n[6]&&t[7]===n[7]&&t[8]===n[8]&&t[9]===n[9]&&t[10]===n[10]&&t[11]===n[11]&&t[12]===n[12]&&t[13]===n[13]&&t[14]===n[14]&&t[15]===n[15]}function hY(t,n){var e=t[0],r=t[1],i=t[2],a=t[3],o=t[4],s=t[5],l=t[6],c=t[7],u=t[8],f=t[9],d=t[10],h=t[11],p=t[12],g=t[13],y=t[14],m=t[15],x=n[0],_=n[1],w=n[2],O=n[3],S=n[4],E=n[5],M=n[6],A=n[7],T=n[8],P=n[9],N=n[10],C=n[11],R=n[12],D=n[13],F=n[14],j=n[15];return Math.abs(e-x)<=un*Math.max(1,Math.abs(e),Math.abs(x))&&Math.abs(r-_)<=un*Math.max(1,Math.abs(r),Math.abs(_))&&Math.abs(i-w)<=un*Math.max(1,Math.abs(i),Math.abs(w))&&Math.abs(a-O)<=un*Math.max(1,Math.abs(a),Math.abs(O))&&Math.abs(o-S)<=un*Math.max(1,Math.abs(o),Math.abs(S))&&Math.abs(s-E)<=un*Math.max(1,Math.abs(s),Math.abs(E))&&Math.abs(l-M)<=un*Math.max(1,Math.abs(l),Math.abs(M))&&Math.abs(c-A)<=un*Math.max(1,Math.abs(c),Math.abs(A))&&Math.abs(u-T)<=un*Math.max(1,Math.abs(u),Math.abs(T))&&Math.abs(f-P)<=un*Math.max(1,Math.abs(f),Math.abs(P))&&Math.abs(d-N)<=un*Math.max(1,Math.abs(d),Math.abs(N))&&Math.abs(h-C)<=un*Math.max(1,Math.abs(h),Math.abs(C))&&Math.abs(p-R)<=un*Math.max(1,Math.abs(p),Math.abs(R))&&Math.abs(g-D)<=un*Math.max(1,Math.abs(g),Math.abs(D))&&Math.abs(y-F)<=un*Math.max(1,Math.abs(y),Math.abs(F))&&Math.abs(m-j)<=un*Math.max(1,Math.abs(m),Math.abs(j))}var Yb=mr,pY=oC;const vY=Object.freeze(Object.defineProperty({__proto__:null,add:uY,adjoint:ZG,clone:Wb,copy:Jl,create:Ne,decompose:eY,determinant:VP,equals:hY,exactEquals:Xm,frob:cY,fromQuat:Gb,fromQuat2:tY,fromRotation:ZP,fromRotationTranslation:tC,fromRotationTranslationScale:nY,fromRotationTranslationScaleOrigin:Iu,fromScaling:Eo,fromTranslation:Wa,fromValues:HP,fromXRotation:QP,fromYRotation:JP,fromZRotation:Vm,frustum:rY,getRotation:Sp,getScaling:tc,getTranslation:Op,identity:Bo,invert:Yi,lookAt:aC,mul:Yb,multiply:mr,multiplyScalar:fY,multiplyScalarAndAdd:dY,ortho:rC,orthoNO:nC,orthoZO:iC,perspective:iY,perspectiveFromFieldOfView:oY,perspectiveNO:eC,perspectiveZO:aY,rotate:QG,rotateX:qP,rotateY:KP,rotateZ:JG,scale:XP,set:Um,str:lY,sub:pY,subtract:oC,targetTo:sY,translate:Fl,transpose:UP},Symbol.toStringTag,{value:"Module"}));function fe(){var t=new zn(3);return zn!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function za(t){var n=new zn(3);return n[0]=t[0],n[1]=t[1],n[2]=t[2],n}function Ga(t){var n=t[0],e=t[1],r=t[2];return Math.sqrt(n*n+e*e+r*r)}function ke(t,n,e){var r=new zn(3);return r[0]=t,r[1]=n,r[2]=e,r}function fa(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t}function gr(t,n,e,r){return t[0]=n,t[1]=e,t[2]=r,t}function Ro(t,n,e){return t[0]=n[0]+e[0],t[1]=n[1]+e[1],t[2]=n[2]+e[2],t}function qm(t,n,e){return t[0]=n[0]-e[0],t[1]=n[1]-e[1],t[2]=n[2]-e[2],t}function gY(t,n,e){return t[0]=n[0]*e[0],t[1]=n[1]*e[1],t[2]=n[2]*e[2],t}function yY(t,n,e){return t[0]=Math.min(n[0],e[0]),t[1]=Math.min(n[1],e[1]),t[2]=Math.min(n[2],e[2]),t}function mY(t,n,e){return t[0]=Math.max(n[0],e[0]),t[1]=Math.max(n[1],e[1]),t[2]=Math.max(n[2],e[2]),t}function Ep(t,n,e){return t[0]=n[0]*e,t[1]=n[1]*e,t[2]=n[2]*e,t}function bY(t,n){var e=n[0]-t[0],r=n[1]-t[1],i=n[2]-t[2];return Math.sqrt(e*e+r*r+i*i)}function Ns(t,n){var e=n[0],r=n[1],i=n[2],a=e*e+r*r+i*i;return a>0&&(a=1/Math.sqrt(a)),t[0]=n[0]*a,t[1]=n[1]*a,t[2]=n[2]*a,t}function da(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function Jh(t,n,e){var r=n[0],i=n[1],a=n[2],o=e[0],s=e[1],l=e[2];return t[0]=i*l-a*s,t[1]=a*o-r*l,t[2]=r*s-i*o,t}function Km(t,n,e,r){var i=n[0],a=n[1],o=n[2];return t[0]=i+r*(e[0]-i),t[1]=a+r*(e[1]-a),t[2]=o+r*(e[2]-o),t}function wn(t,n,e){var r=n[0],i=n[1],a=n[2],o=e[3]*r+e[7]*i+e[11]*a+e[15];return o=o||1,t[0]=(e[0]*r+e[4]*i+e[8]*a+e[12])/o,t[1]=(e[1]*r+e[5]*i+e[9]*a+e[13])/o,t[2]=(e[2]*r+e[6]*i+e[10]*a+e[14])/o,t}function sC(t,n,e){var r=n[0],i=n[1],a=n[2];return t[0]=r*e[0]+i*e[3]+a*e[6],t[1]=r*e[1]+i*e[4]+a*e[7],t[2]=r*e[2]+i*e[5]+a*e[8],t}function xY(t,n,e){var r=e[0],i=e[1],a=e[2],o=e[3],s=n[0],l=n[1],c=n[2],u=i*c-a*l,f=a*s-r*c,d=r*l-i*s;return u=u+u,f=f+f,d=d+d,t[0]=s+o*u+i*d-a*f,t[1]=l+o*f+a*u-r*d,t[2]=c+o*d+r*f-i*u,t}function tu(t,n){var e=t[0],r=t[1],i=t[2],a=n[0],o=n[1],s=n[2];return Math.abs(e-a)<=un*Math.max(1,Math.abs(e),Math.abs(a))&&Math.abs(r-o)<=un*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(i-s)<=un*Math.max(1,Math.abs(i),Math.abs(s))}var _Y=qm,jS=bY,lC=Ga;(function(){var t=fe();return function(n,e,r,i,a,o){var s,l;for(e||(e=3),r||(r=0),i?l=Math.min(i*e+r,n.length):l=n.length,s=r;s<l;s+=e)t[0]=n[s],t[1]=n[s+1],t[2]=n[s+2],a(t,t,o),n[s]=t[0],n[s+1]=t[1],n[s+2]=t[2];return n}})();function ha(){var t=new zn(4);return zn!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}function pu(t,n,e,r){var i=new zn(4);return i[0]=t,i[1]=n,i[2]=e,i[3]=r,i}function wY(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t}function OY(t,n,e,r,i){return t[0]=n,t[1]=e,t[2]=r,t[3]=i,t}function SY(t,n){var e=n[0],r=n[1],i=n[2],a=n[3],o=e*e+r*r+i*i+a*a;return o>0&&(o=1/Math.sqrt(o)),t[0]=e*o,t[1]=r*o,t[2]=i*o,t[3]=a*o,t}function pa(t,n,e){var r=n[0],i=n[1],a=n[2],o=n[3];return t[0]=e[0]*r+e[4]*i+e[8]*a+e[12]*o,t[1]=e[1]*r+e[5]*i+e[9]*a+e[13]*o,t[2]=e[2]*r+e[6]*i+e[10]*a+e[14]*o,t[3]=e[3]*r+e[7]*i+e[11]*a+e[15]*o,t}(function(){var t=ha();return function(n,e,r,i,a,o){var s,l;for(e||(e=4),r||(r=0),i?l=Math.min(i*e+r,n.length):l=n.length,s=r;s<l;s+=e)t[0]=n[s],t[1]=n[s+1],t[2]=n[s+2],t[3]=n[s+3],a(t,t,o),n[s]=t[0],n[s+1]=t[1],n[s+2]=t[2],n[s+3]=t[3];return n}})();function Vn(){var t=new zn(4);return zn!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function Mo(t,n,e){e=e*.5;var r=Math.sin(e);return t[0]=r*n[0],t[1]=r*n[1],t[2]=r*n[2],t[3]=Math.cos(e),t}function Io(t,n,e){var r=n[0],i=n[1],a=n[2],o=n[3],s=e[0],l=e[1],c=e[2],u=e[3];return t[0]=r*u+o*s+i*c-a*l,t[1]=i*u+o*l+a*s-r*c,t[2]=a*u+o*c+r*l-i*s,t[3]=o*u-r*s-i*l-a*c,t}function my(t,n,e,r){var i=n[0],a=n[1],o=n[2],s=n[3],l=e[0],c=e[1],u=e[2],f=e[3],d,h,p,g,y;return h=i*l+a*c+o*u+s*f,h<0&&(h=-h,l=-l,c=-c,u=-u,f=-f),1-h>un?(d=Math.acos(h),p=Math.sin(d),g=Math.sin((1-r)*d)/p,y=Math.sin(r*d)/p):(g=1-r,y=r),t[0]=g*i+y*l,t[1]=g*a+y*c,t[2]=g*o+y*u,t[3]=g*s+y*f,t}function by(t,n){var e=n[0],r=n[1],i=n[2],a=n[3],o=e*e+r*r+i*i+a*a,s=o?1/o:0;return t[0]=-e*s,t[1]=-r*s,t[2]=-i*s,t[3]=a*s,t}function EY(t,n){var e=n[0]+n[4]+n[8],r;if(e>0)r=Math.sqrt(e+1),t[3]=.5*r,r=.5/r,t[0]=(n[5]-n[7])*r,t[1]=(n[6]-n[2])*r,t[2]=(n[1]-n[3])*r;else{var i=0;n[4]>n[0]&&(i=1),n[8]>n[i*3+i]&&(i=2);var a=(i+1)%3,o=(i+2)%3;r=Math.sqrt(n[i*3+i]-n[a*3+a]-n[o*3+o]+1),t[i]=.5*r,r=.5/r,t[3]=(n[a*3+o]-n[o*3+a])*r,t[a]=(n[a*3+i]+n[i*3+a])*r,t[o]=(n[o*3+i]+n[i*3+o])*r}return t}function Zd(t,n,e,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:zG,a=Math.PI/360;n*=a,r*=a,e*=a;var o=Math.sin(n),s=Math.cos(n),l=Math.sin(e),c=Math.cos(e),u=Math.sin(r),f=Math.cos(r);switch(i){case"xyz":t[0]=o*c*f+s*l*u,t[1]=s*l*f-o*c*u,t[2]=s*c*u+o*l*f,t[3]=s*c*f-o*l*u;break;case"xzy":t[0]=o*c*f-s*l*u,t[1]=s*l*f-o*c*u,t[2]=s*c*u+o*l*f,t[3]=s*c*f+o*l*u;break;case"yxz":t[0]=o*c*f+s*l*u,t[1]=s*l*f-o*c*u,t[2]=s*c*u-o*l*f,t[3]=s*c*f+o*l*u;break;case"yzx":t[0]=o*c*f+s*l*u,t[1]=s*l*f+o*c*u,t[2]=s*c*u-o*l*f,t[3]=s*c*f-o*l*u;break;case"zxy":t[0]=o*c*f-s*l*u,t[1]=s*l*f+o*c*u,t[2]=s*c*u+o*l*f,t[3]=s*c*f-o*l*u;break;case"zyx":t[0]=o*c*f-s*l*u,t[1]=s*l*f+o*c*u,t[2]=s*c*u-o*l*f,t[3]=s*c*f+o*l*u;break;default:throw new Error("Unknown angle order "+i)}return t}var kY=pu,Qd=wY,cC=OY,FS=Io,kp=SY;(function(){var t=fe(),n=ke(1,0,0),e=ke(0,1,0);return function(r,i,a){var o=da(i,a);return o<-.999999?(Jh(t,n,i),lC(t)<1e-6&&Jh(t,e,i),Ns(t,t),Mo(r,t,Math.PI),r):o>.999999?(r[0]=0,r[1]=0,r[2]=0,r[3]=1,r):(Jh(t,i,a),r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=1+o,kp(r,r))}})();(function(){var t=Vn(),n=Vn();return function(e,r,i,a,o,s){return my(t,r,o,s),my(n,i,a,s),my(e,t,n,2*s*(1-s)),e}})();(function(){var t=xc();return function(n,e,r,i){return t[0]=r[0],t[3]=r[1],t[6]=r[2],t[1]=i[0],t[4]=i[1],t[7]=i[2],t[2]=-e[0],t[5]=-e[1],t[8]=-e[2],kp(n,EY(n,t))}})();function Hb(){var t=new zn(2);return zn!=Float32Array&&(t[0]=0,t[1]=0),t}function MY(t,n){return t[0]=n[0],t[1]=n[1],t}function AY(t,n,e){return t[0]=n,t[1]=e,t}function TY(t,n){var e=n[0],r=n[1],i=e*e+r*r;return i>0&&(i=1/Math.sqrt(i)),t[0]=n[0]*i,t[1]=n[1]*i,t}function PY(t,n){return t[0]*n[0]+t[1]*n[1]}function CY(t,n){return t[0]===n[0]&&t[1]===n[1]}(function(){var t=Hb();return function(n,e,r,i,a,o){var s,l;for(e||(e=2),r||(r=0),i?l=Math.min(i*e+r,n.length):l=n.length,s=r;s<l;s+=e)t[0]=n[s],t[1]=n[s+1],a(t,t,o),n[s]=t[0],n[s+1]=t[1];return n}})();var Zm=function(t,n){return Zm=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])},Zm(t,n)};function ln(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");Zm(t,n);function e(){this.constructor=t}t.prototype=n===null?Object.create(n):(e.prototype=n.prototype,new e)}var ut=function(){return ut=Object.assign||function(n){for(var e,r=1,i=arguments.length;r<i;r++){e=arguments[r];for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(n[a]=e[a])}return n},ut.apply(this,arguments)};function Bn(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e}function $f(t){var n=typeof Symbol=="function"&&Symbol.iterator,e=n&&t[n],r=0;if(e)return e.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function U(t,n){var e=typeof Symbol=="function"&&t[Symbol.iterator];if(!e)return t;var r=e.call(t),i,a=[],o;try{for(;(n===void 0||n-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(o)throw o.error}}return a}function Lt(t,n,e){if(e||arguments.length===2)for(var r=0,i=n.length,a;r<i;r++)(a||!(r in n))&&(a||(a=Array.prototype.slice.call(n,0,r)),a[r]=n[r]);return t.concat(a||Array.prototype.slice.call(n))}function xy(t,n,e,r){if(e==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof n=="function"?t!==n||!r:!n.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e==="m"?r:e==="a"?r.call(t):r?r.value:n.get(t)}var uC={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null};function LY(t,n,e){if(t[e].length>7){t[e].shift();for(var r=t[e],i=e;r.length;)n[e]="A",t.splice(i+=1,0,["C"].concat(r.splice(0,6)));t.splice(e,1)}}var Du={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0};function fC(t){return Array.isArray(t)&&t.every(function(n){var e=n[0].toLowerCase();return Du[e]===n.length-1&&"achlmqstvz".includes(e)})}function dC(t){return fC(t)&&t.every(function(n){var e=n[0];return e===e.toUpperCase()})}function hC(t){return dC(t)&&t.every(function(n){var e=n[0];return"ACLMQZ".includes(e)})}function BS(t){for(var n=t.pathValue[t.segmentStart],e=n.toLowerCase(),r=t.data;r.length>=Du[e]&&(e==="m"&&r.length>2?(t.segments.push([n].concat(r.splice(0,2))),e="l",n=n==="m"?"l":"L"):t.segments.push([n].concat(r.splice(0,Du[e]))),!!Du[e]););}function NY(t){var n=t.index,e=t.pathValue,r=e.charCodeAt(n);if(r===48){t.param=0,t.index+=1;return}if(r===49){t.param=1,t.index+=1;return}t.err='[path-util]: invalid Arc flag "'.concat(e[n],'", expecting 0 or 1 at index ').concat(n)}function RY(t){return t>=48&&t<=57||t===43||t===45||t===46}function _l(t){return t>=48&&t<=57}function IY(t){var n=t.max,e=t.pathValue,r=t.index,i=r,a=!1,o=!1,s=!1,l=!1,c;if(i>=n){t.err="[path-util]: Invalid path value at index ".concat(i,', "pathValue" is missing param');return}if(c=e.charCodeAt(i),(c===43||c===45)&&(i+=1,c=e.charCodeAt(i)),!_l(c)&&c!==46){t.err="[path-util]: Invalid path value at index ".concat(i,', "').concat(e[i],'" is not a number');return}if(c!==46){if(a=c===48,i+=1,c=e.charCodeAt(i),a&&i<n&&c&&_l(c)){t.err="[path-util]: Invalid path value at index ".concat(r,', "').concat(e[r],'" illegal number');return}for(;i<n&&_l(e.charCodeAt(i));)i+=1,o=!0;c=e.charCodeAt(i)}if(c===46){for(l=!0,i+=1;_l(e.charCodeAt(i));)i+=1,s=!0;c=e.charCodeAt(i)}if(c===101||c===69){if(l&&!o&&!s){t.err="[path-util]: Invalid path value at index ".concat(i,', "').concat(e[i],'" invalid float exponent');return}if(i+=1,c=e.charCodeAt(i),(c===43||c===45)&&(i+=1),i<n&&_l(e.charCodeAt(i)))for(;i<n&&_l(e.charCodeAt(i));)i+=1;else{t.err="[path-util]: Invalid path value at index ".concat(i,', "').concat(e[i],'" invalid integer exponent');return}}t.index=i,t.param=+t.pathValue.slice(r,i)}function DY(t){var n=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];return t===10||t===13||t===8232||t===8233||t===32||t===9||t===11||t===12||t===160||t>=5760&&n.includes(t)}function tp(t){for(var n=t.pathValue,e=t.max;t.index<e&&DY(n.charCodeAt(t.index));)t.index+=1}function $Y(t){switch(t|32){case 109:case 122:case 108:case 104:case 118:case 99:case 115:case 113:case 116:case 97:return!0;default:return!1}}function jY(t){return(t|32)===97}function FY(t){var n=t.max,e=t.pathValue,r=t.index,i=e.charCodeAt(r),a=Du[e[r].toLowerCase()];if(t.segmentStart=r,!$Y(i)){t.err='[path-util]: Invalid path value "'.concat(e[r],'" is not a path command');return}if(t.index+=1,tp(t),t.data=[],!a){BS(t);return}for(;;){for(var o=a;o>0;o-=1){if(jY(i)&&(o===3||o===4)?NY(t):IY(t),t.err.length)return;t.data.push(t.param),tp(t),t.index<n&&e.charCodeAt(t.index)===44&&(t.index+=1,tp(t))}if(t.index>=t.max||!RY(e.charCodeAt(t.index)))break}BS(t)}var BY=(function(){function t(n){this.pathValue=n,this.segments=[],this.max=n.length,this.index=0,this.param=0,this.segmentStart=0,this.data=[],this.err=""}return t})();function zY(t){if(fC(t))return[].concat(t);var n=new BY(t);for(tp(n);n.index<n.max&&!n.err.length;)FY(n);return n.err?n.err:n.segments}function WY(t){if(dC(t))return[].concat(t);var n=zY(t),e=0,r=0,i=0,a=0;return n.map(function(o){var s=o.slice(1).map(Number),l=o[0],c=l.toUpperCase();if(l==="M")return e=s[0],r=s[1],i=e,a=r,["M",e,r];var u;if(l!==c)switch(c){case"A":u=[c,s[0],s[1],s[2],s[3],s[4],s[5]+e,s[6]+r];break;case"V":u=[c,s[0]+r];break;case"H":u=[c,s[0]+e];break;default:{var f=s.map(function(h,p){return h+(p%2?r:e)});u=[c].concat(f)}}else u=[c].concat(s);var d=u.length;switch(c){case"Z":e=i,r=a;break;case"H":e=u[1];break;case"V":r=u[1];break;default:e=u[d-2],r=u[d-1],c==="M"&&(i=e,a=r)}return u})}function GY(t,n){var e=t[0],r=n.x1,i=n.y1,a=n.x2,o=n.y2,s=t.slice(1).map(Number),l=t;if("TQ".includes(e)||(n.qx=null,n.qy=null),e==="H")l=["L",t[1],i];else if(e==="V")l=["L",r,t[1]];else if(e==="S"){var c=r*2-a,u=i*2-o;n.x1=c,n.y1=u,l=["C",c,u].concat(s)}else if(e==="T"){var f=r*2-n.qx,d=i*2-n.qy;n.qx=f,n.qy=d,l=["Q",f,d].concat(s)}else if(e==="Q"){var h=s[0],p=s[1];n.qx=h,n.qy=p}return l}function Mp(t){if(hC(t))return[].concat(t);for(var n=WY(t),e=ut({},uC),r=0;r<n.length;r+=1){n[r]=GY(n[r],e);var i=n[r],a=i.length;e.x1=+i[a-2],e.y1=+i[a-1],e.x2=+i[a-4]||e.x1,e.y2=+i[a-3]||e.y1}return n}function YY(t){return hC(t)&&t.every(function(n){var e=n[0];return"MC".includes(e)})}function Jd(t,n,e){var r=t*Math.cos(e)-n*Math.sin(e),i=t*Math.sin(e)+n*Math.cos(e);return{x:r,y:i}}function Ub(t,n,e,r,i,a,o,s,l,c){var u=t,f=n,d=e,h=r,p=s,g=l,y=Math.PI*120/180,m=Math.PI/180*(+i||0),x=[],_,w,O,S,E;if(c)w=c[0],O=c[1],S=c[2],E=c[3];else{_=Jd(u,f,-m),u=_.x,f=_.y,_=Jd(p,g,-m),p=_.x,g=_.y;var M=(u-p)/2,A=(f-g)/2,T=M*M/(d*d)+A*A/(h*h);T>1&&(T=Math.sqrt(T),d*=T,h*=T);var P=d*d,N=h*h,C=(a===o?-1:1)*Math.sqrt(Math.abs((P*N-P*A*A-N*M*M)/(P*A*A+N*M*M)));S=C*d*A/h+(u+p)/2,E=C*-h*M/d+(f+g)/2,w=Math.asin(((f-E)/h*Math.pow(10,9)>>0)/Math.pow(10,9)),O=Math.asin(((g-E)/h*Math.pow(10,9)>>0)/Math.pow(10,9)),w=u<S?Math.PI-w:w,O=p<S?Math.PI-O:O,w<0&&(w=Math.PI*2+w),O<0&&(O=Math.PI*2+O),o&&w>O&&(w-=Math.PI*2),!o&&O>w&&(O-=Math.PI*2)}var R=O-w;if(Math.abs(R)>y){var D=O,F=p,j=g;O=w+y*(o&&O>w?1:-1),p=S+d*Math.cos(O),g=E+h*Math.sin(O),x=Ub(p,g,d,h,i,0,o,F,j,[O,D,S,E])}R=O-w;var I=Math.cos(w),$=Math.sin(w),z=Math.cos(O),Y=Math.sin(O),H=Math.tan(R/4),V=4/3*d*H,Z=4/3*h*H,q=[u,f],J=[u+V*$,f-Z*I],rt=[p+V*Y,g-Z*z],K=[p,g];if(J[0]=2*q[0]-J[0],J[1]=2*q[1]-J[1],c)return J.concat(rt,K,x);x=J.concat(rt,K,x);for(var ot=[],vt=0,yt=x.length;vt<yt;vt+=1)ot[vt]=vt%2?Jd(x[vt-1],x[vt],m).y:Jd(x[vt],x[vt+1],m).x;return ot}function HY(t,n,e,r,i,a){var o=.3333333333333333,s=2/3;return[o*t+s*e,o*n+s*r,o*i+s*e,o*a+s*r,i,a]}function wo(t,n,e){var r=t[0],i=t[1],a=n[0],o=n[1];return[r+(a-r)*e,i+(o-i)*e]}var zS=function(t,n,e,r){var i=.5,a=wo([t,n],[e,r],i);return Lt(Lt([],a,!0),[e,r,e,r],!1)};function UY(t,n){var e=t[0],r=t.slice(1).map(Number),i=r[0],a=r[1],o,s=n.x1,l=n.y1,c=n.x,u=n.y;switch("TQ".includes(e)||(n.qx=null,n.qy=null),e){case"M":return n.x=i,n.y=a,t;case"A":return o=[s,l].concat(r),["C"].concat(Ub(o[0],o[1],o[2],o[3],o[4],o[5],o[6],o[7],o[8],o[9]));case"Q":return n.qx=i,n.qy=a,o=[s,l].concat(r),["C"].concat(HY(o[0],o[1],o[2],o[3],o[4],o[5]));case"L":return["C"].concat(zS(s,l,i,a));case"Z":return s===c&&l===u?["C",s,l,c,u,c,u]:["C"].concat(zS(s,l,c,u))}return t}function Qm(t,n){if(n===void 0&&(n=!1),YY(t)){var e=[].concat(t);return n?[e,[]]:e}for(var r=Mp(t),i=ut({},uC),a=[],o="",s=r.length,l,c,u=[],f=0;f<s;f+=1){r[f]&&(o=r[f][0]),a[f]=o;var d=UY(r[f],i);r[f]=d,LY(r,a,f),s=r.length,o==="Z"&&u.push(f),l=r[f],c=l.length,i.x1=+l[c-2],i.y1=+l[c-1],i.x2=+l[c-4]||i.x1,i.y2=+l[c-3]||i.y1}return n?[r,u]:r}function VY(t){return t.map(function(n){return Array.isArray(n)?[].concat(n):n})}function XY(t){var n=t.slice(1).map(function(e,r,i){return r?i[r-1].slice(-2).concat(e.slice(1)):t[0].slice(1).concat(e.slice(1))}).map(function(e){return e.map(function(r,i){return e[e.length-i-2*(1-i%2)]})}).reverse();return[["M"].concat(n[0].slice(0,2))].concat(n.map(function(e){return["C"].concat(e.slice(2))}))}function Fr(t,n){return Math.sqrt((t[0]-n[0])*(t[0]-n[0])+(t[1]-n[1])*(t[1]-n[1]))}function Jm(t,n,e,r,i){var a=Fr([t,n],[e,r]),o={x:0,y:0};if(typeof i=="number")if(i<=0)o={x:t,y:n};else if(i>=a)o={x:e,y:r};else{var s=wo([t,n],[e,r],i/a),l=s[0],c=s[1];o={x:l,y:c}}return{length:a,point:o,min:{x:Math.min(t,e),y:Math.min(n,r)},max:{x:Math.max(t,e),y:Math.max(n,r)}}}function WS(t,n){var e=t.x,r=t.y,i=n.x,a=n.y,o=e*i+r*a,s=Math.sqrt((Math.pow(e,2)+Math.pow(r,2))*(Math.pow(i,2)+Math.pow(a,2))),l=e*a-r*i<0?-1:1,c=l*Math.acos(o/s);return c}function qY(t,n,e,r,i,a,o,s,l,c){var u=Math.abs,f=Math.sin,d=Math.cos,h=Math.sqrt,p=Math.PI,g=u(e),y=u(r),m=(i%360+360)%360,x=m*(p/180);if(t===s&&n===l)return{x:t,y:n};if(g===0||y===0)return Jm(t,n,s,l,c).point;var _=(t-s)/2,w=(n-l)/2,O={x:d(x)*_+f(x)*w,y:-f(x)*_+d(x)*w},S=Math.pow(O.x,2)/Math.pow(g,2)+Math.pow(O.y,2)/Math.pow(y,2);S>1&&(g*=h(S),y*=h(S));var E=Math.pow(g,2)*Math.pow(y,2)-Math.pow(g,2)*Math.pow(O.y,2)-Math.pow(y,2)*Math.pow(O.x,2),M=Math.pow(g,2)*Math.pow(O.y,2)+Math.pow(y,2)*Math.pow(O.x,2),A=E/M;A=A<0?0:A;var T=(a!==o?1:-1)*h(A),P={x:T*(g*O.y/y),y:T*(-(y*O.x)/g)},N={x:d(x)*P.x-f(x)*P.y+(t+s)/2,y:f(x)*P.x+d(x)*P.y+(n+l)/2},C={x:(O.x-P.x)/g,y:(O.y-P.y)/y},R=WS({x:1,y:0},C),D={x:(-O.x-P.x)/g,y:(-O.y-P.y)/y},F=WS(C,D);!o&&F>0?F-=2*p:o&&F<0&&(F+=2*p),F%=2*p;var j=R+F*c,I=g*d(j),$=y*f(j),z={x:d(x)*I-f(x)*$+N.x,y:f(x)*I+d(x)*$+N.y};return z}function KY(t,n,e,r,i,a,o,s,l,c,u){var f,d=u.bbox,h=d===void 0?!0:d,p=u.length,g=p===void 0?!0:p,y=u.sampleSize,m=y===void 0?30:y,x=typeof c=="number",_=t,w=n,O=0,S=[_,w,O],E=[_,w],M=0,A={x:0,y:0},T=[{x:_,y:w}];x&&c<=0&&(A={x:_,y:w});for(var P=0;P<=m;P+=1){if(M=P/m,f=qY(t,n,e,r,i,a,o,s,l,M),_=f.x,w=f.y,h&&T.push({x:_,y:w}),g&&(O+=Fr(E,[_,w])),E=[_,w],x&&O>=c&&c>S[2]){var N=(O-c)/(O-S[2]);A={x:E[0]*(1-N)+S[0]*N,y:E[1]*(1-N)+S[1]*N}}S=[_,w,O]}return x&&c>=O&&(A={x:s,y:l}),{length:O,point:A,min:{x:Math.min.apply(null,T.map(function(C){return C.x})),y:Math.min.apply(null,T.map(function(C){return C.y}))},max:{x:Math.max.apply(null,T.map(function(C){return C.x})),y:Math.max.apply(null,T.map(function(C){return C.y}))}}}function ZY(t,n,e,r,i,a,o,s,l){var c=1-l;return{x:Math.pow(c,3)*t+3*Math.pow(c,2)*l*e+3*c*Math.pow(l,2)*i+Math.pow(l,3)*o,y:Math.pow(c,3)*n+3*Math.pow(c,2)*l*r+3*c*Math.pow(l,2)*a+Math.pow(l,3)*s}}function pC(t,n,e,r,i,a,o,s,l,c){var u,f=c.bbox,d=f===void 0?!0:f,h=c.length,p=h===void 0?!0:h,g=c.sampleSize,y=g===void 0?10:g,m=typeof l=="number",x=t,_=n,w=0,O=[x,_,w],S=[x,_],E=0,M={x:0,y:0},A=[{x,y:_}];m&&l<=0&&(M={x,y:_});for(var T=0;T<=y;T+=1){if(E=T/y,u=ZY(t,n,e,r,i,a,o,s,E),x=u.x,_=u.y,d&&A.push({x,y:_}),p&&(w+=Fr(S,[x,_])),S=[x,_],m&&w>=l&&l>O[2]){var P=(w-l)/(w-O[2]);M={x:S[0]*(1-P)+O[0]*P,y:S[1]*(1-P)+O[1]*P}}O=[x,_,w]}return m&&l>=w&&(M={x:o,y:s}),{length:w,point:M,min:{x:Math.min.apply(null,A.map(function(N){return N.x})),y:Math.min.apply(null,A.map(function(N){return N.y}))},max:{x:Math.max.apply(null,A.map(function(N){return N.x})),y:Math.max.apply(null,A.map(function(N){return N.y}))}}}function QY(t,n,e,r,i,a,o){var s=1-o;return{x:Math.pow(s,2)*t+2*s*o*e+Math.pow(o,2)*i,y:Math.pow(s,2)*n+2*s*o*r+Math.pow(o,2)*a}}function JY(t,n,e,r,i,a,o,s){var l,c=s.bbox,u=c===void 0?!0:c,f=s.length,d=f===void 0?!0:f,h=s.sampleSize,p=h===void 0?10:h,g=typeof o=="number",y=t,m=n,x=0,_=[y,m,x],w=[y,m],O=0,S={x:0,y:0},E=[{x:y,y:m}];g&&o<=0&&(S={x:y,y:m});for(var M=0;M<=p;M+=1){if(O=M/p,l=QY(t,n,e,r,i,a,O),y=l.x,m=l.y,u&&E.push({x:y,y:m}),d&&(x+=Fr(w,[y,m])),w=[y,m],g&&x>=o&&o>_[2]){var A=(x-o)/(x-_[2]);S={x:w[0]*(1-A)+_[0]*A,y:w[1]*(1-A)+_[1]*A}}_=[y,m,x]}return g&&o>=x&&(S={x:i,y:a}),{length:x,point:S,min:{x:Math.min.apply(null,E.map(function(T){return T.x})),y:Math.min.apply(null,E.map(function(T){return T.y}))},max:{x:Math.max.apply(null,E.map(function(T){return T.x})),y:Math.max.apply(null,E.map(function(T){return T.y}))}}}function vC(t,n,e){for(var r,i,a,o,s,l,c=Mp(t),u=typeof n=="number",f,d=[],h,p=0,g=0,y=0,m=0,x,_=[],w=[],O=0,S={x:0,y:0},E=S,M=S,A=S,T=0,P=0,N=c.length;P<N;P+=1)x=c[P],h=x[0],f=h==="M",d=f?d:[p,g].concat(x.slice(1)),f?(y=x[1],m=x[2],S={x:y,y:m},E=S,O=0,u&&n<.001&&(A=S)):h==="L"?(r=Jm(d[0],d[1],d[2],d[3],(n||0)-T),O=r.length,S=r.min,E=r.max,M=r.point):h==="A"?(i=KY(d[0],d[1],d[2],d[3],d[4],d[5],d[6],d[7],d[8],(n||0)-T,e||{}),O=i.length,S=i.min,E=i.max,M=i.point):h==="C"?(a=pC(d[0],d[1],d[2],d[3],d[4],d[5],d[6],d[7],(n||0)-T,e||{}),O=a.length,S=a.min,E=a.max,M=a.point):h==="Q"?(o=JY(d[0],d[1],d[2],d[3],d[4],d[5],(n||0)-T,e||{}),O=o.length,S=o.min,E=o.max,M=o.point):h==="Z"&&(d=[p,g,y,m],s=Jm(d[0],d[1],d[2],d[3],(n||0)-T),O=s.length,S=s.min,E=s.max,M=s.point),u&&T<n&&T+O>=n&&(A=M),w.push(E),_.push(S),T+=O,l=h!=="Z"?x.slice(-2):[y,m],p=l[0],g=l[1];return u&&n>=T&&(A={x:p,y:g}),{length:T,point:A,min:{x:Math.min.apply(null,_.map(function(C){return C.x})),y:Math.min.apply(null,_.map(function(C){return C.y}))},max:{x:Math.max.apply(null,w.map(function(C){return C.x})),y:Math.max.apply(null,w.map(function(C){return C.y}))}}}function tH(t,n){return vC(t,void 0,ut(ut({},n),{bbox:!1,length:!0})).length}function eH(t){var n=t.length,e=n-1;return t.map(function(r,i){return t.map(function(a,o){var s=i+o,l;return o===0||t[s]&&t[s][0]==="M"?(l=t[s],["M"].concat(l.slice(-2))):(s>=n&&(s-=e),t[s])})})}function nH(t,n){var e=t.length-1,r=[],i=0,a=0,o=eH(t);return o.forEach(function(s,l){t.slice(1).forEach(function(c,u){a+=Fr(t[(l+u)%e].slice(-2),n[u%e].slice(-2))}),r[l]=a,a=0}),i=r.indexOf(Math.min.apply(null,r)),o[i]}function rH(t,n,e,r,i,a,o,s){return 3*((s-n)*(e+i)-(o-t)*(r+a)+r*(t-i)-e*(n-a)+s*(i+t/3)-o*(a+n/3))/20}function iH(t){var n=0,e=0,r=0;return Qm(t).map(function(i){var a;switch(i[0]){case"M":return n=i[1],e=i[2],0;default:var o=i.slice(1),s=o[0],l=o[1],c=o[2],u=o[3],f=o[4],d=o[5];return r=rH(n,e,s,l,c,u,f,d),a=i.slice(-2),n=a[0],e=a[1],r}}).reduce(function(i,a){return i+a},0)}function GS(t){return iH(t)>=0}function aH(t,n,e){return vC(t,n,ut(ut({},e),{bbox:!1,length:!0})).point}var oH=50;function sH(t,n){n===void 0&&(n=.5);var e=t.slice(0,2),r=t.slice(2,4),i=t.slice(4,6),a=t.slice(6,8),o=wo(e,r,n),s=wo(r,i,n),l=wo(i,a,n),c=wo(o,s,n),u=wo(s,l,n),f=wo(c,u,n);return[["C"].concat(o,c,f),["C"].concat(u,l,a)]}function YS(t){return t.map(function(n,e,r){var i=e&&r[e-1].slice(-2).concat(n.slice(1)),a=e?pC(i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7],i[8],{bbox:!1}).length:0,o;return e?o=a?sH(i):[n,n]:o=[n],{s:n,ss:o,l:a}})}function gC(t,n,e,r){if(r===void 0&&(r=0),r>oH)return console.warn("Maximum recursion depth reached in equalizeSegments"),[t,n];var i=YS(t),a=YS(n),o=i.length,s=a.length,l=i.filter(function(m){return m.l}).length,c=a.filter(function(m){return m.l}).length,u=i.filter(function(m){return m.l}).reduce(function(m,x){var _=x.l;return m+_},0)/l||0,f=a.filter(function(m){return m.l}).reduce(function(m,x){var _=x.l;return m+_},0)/c||0,d=e||Math.max(o,s),h=[u,f],p=[d-o,d-s],g=0,y=[i,a].map(function(m,x){return m.l===d?m.map(function(_){return _.s}):m.map(function(_,w){return g=w&&p[x]&&_.l>=h[x],p[x]-=g?1:0,g?_.ss:[_.s]}).flat()});return y[0].length===y[1].length?y:gC(y[0],y[1],d,r+1)}function HS(t){var n=document.createElement("div");n.innerHTML=t;var e=n.childNodes[0];return e&&n.contains(e)&&n.removeChild(e),e}function Ve(t,n){if(t!==null)return{type:"column",value:t,field:n}}function Ju(t,n){const e=Ve(t,n);return Object.assign(Object.assign({},e),{inferred:!0})}function Ap(t,n){if(t!==null)return{type:"column",value:t,field:n,visual:!0}}function lH(t,n){const e=Ve(t,n);return Object.assign(Object.assign({},e),{constant:!1})}function Do(t,n){const e=[];for(const r of t)e[r]=n;return e}function be(t,n){const e=t[n];if(!e)return[null,null];const{value:r,field:i=null}=e;return[r,i]}function Tp(t,...n){for(const e of n)if(typeof e=="string"){const[r,i]=be(t,e);if(r!==null)return[r,i]}else return[e,null];return[null,null]}function jf(t){return t instanceof Date?!1:typeof t=="object"}const Ff=()=>(t,n)=>{const{encode:e}=n,{y1:r}=e;return r!==void 0?[t,n]:[t,at({},n,{encode:{y1:Ju(Do(t,0))}})]};Ff.props={};function _n(t,n){return t==null||n==null?NaN:t<n?-1:t>n?1:t>=n?0:NaN}function cH(t,n){return t==null||n==null?NaN:n<t?-1:n>t?1:n>=t?0:NaN}function Xa(t){let n,e,r;t.length!==2?(n=_n,e=(s,l)=>_n(t(s),l),r=(s,l)=>t(s)-l):(n=t===_n||t===cH?t:uH,e=t,r=t);function i(s,l,c=0,u=s.length){if(c<u){if(n(l,l)!==0)return u;do{const f=c+u>>>1;e(s[f],l)<0?c=f+1:u=f}while(c<u)}return c}function a(s,l,c=0,u=s.length){if(c<u){if(n(l,l)!==0)return u;do{const f=c+u>>>1;e(s[f],l)<=0?c=f+1:u=f}while(c<u)}return c}function o(s,l,c=0,u=s.length){const f=i(s,l,c,u-1);return f>c&&r(s[f-1],l)>-r(s[f],l)?f-1:f}return{left:i,center:o,right:a}}function uH(){return 0}function t1(t){return t===null?NaN:+t}function*fH(t,n){if(n===void 0)for(let e of t)e!=null&&(e=+e)>=e&&(yield e);else{let e=-1;for(let r of t)(r=n(r,++e,t))!=null&&(r=+r)>=r&&(yield r)}}const yC=Xa(_n),dH=yC.right,hH=yC.left,pH=Xa(t1).center;function mC(t,n){let e=0;for(let r of t)r!=null&&(r=+r)>=r&&++e;return e}function vH(t,n){let e=0,r,i=0,a=0;if(n===void 0)for(let o of t)o!=null&&(o=+o)>=o&&(r=o-i,i+=r/++e,a+=r*(o-i));else{let o=-1;for(let s of t)(s=n(s,++o,t))!=null&&(s=+s)>=s&&(r=s-i,i+=r/++e,a+=r*(s-i))}if(e>1)return a/(e-1)}function bC(t,n){const e=vH(t,n);return e&&Math.sqrt(e)}function qa(t,n){let e,r;if(n===void 0)for(const i of t)i!=null&&(e===void 0?i>=i&&(e=r=i):(e>i&&(e=i),r<i&&(r=i)));else{let i=-1;for(let a of t)(a=n(a,++i,t))!=null&&(e===void 0?a>=a&&(e=r=a):(e>a&&(e=a),r<a&&(r=a)))}return[e,r]}class Bs{constructor(){this._partials=new Float64Array(32),this._n=0}add(n){const e=this._partials;let r=0;for(let i=0;i<this._n&&i<32;i++){const a=e[i],o=n+a,s=Math.abs(n)<Math.abs(a)?n-(o-a):a-(o-n);s&&(e[r++]=s),n=o}return e[r]=n,this._n=r+1,this}valueOf(){const n=this._partials;let e=this._n,r,i,a,o=0;if(e>0){for(o=n[--e];e>0&&(r=o,i=n[--e],o=r+i,a=i-(o-r),!a););e>0&&(a<0&&n[e-1]<0||a>0&&n[e-1]>0)&&(i=a*2,r=o+i,i==r-o&&(o=r))}return o}}let gH=class extends Map{constructor(n,e=bH){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),n!=null)for(const[r,i]of n)this.set(r,i)}get(n){return super.get(US(this,n))}has(n){return super.has(US(this,n))}set(n,e){return super.set(yH(this,n),e)}delete(n){return super.delete(mH(this,n))}};function US({_intern:t,_key:n},e){const r=n(e);return t.has(r)?t.get(r):e}function yH({_intern:t,_key:n},e){const r=n(e);return t.has(r)?t.get(r):(t.set(r,e),e)}function mH({_intern:t,_key:n},e){const r=n(e);return t.has(r)&&(e=t.get(r),t.delete(r)),e}function bH(t){return t!==null&&typeof t=="object"?t.valueOf():t}function tf(t){return t}function Ue(t,...n){return Uv(t,tf,tf,n)}function Vb(t,...n){return Uv(t,Array.from,tf,n)}function Xb(t,n,...e){return Uv(t,tf,n,e)}function qb(t,n,...e){return Uv(t,Array.from,n,e)}function Uv(t,n,e,r){return(function i(a,o){if(o>=r.length)return e(a);const s=new gH,l=r[o++];let c=-1;for(const u of a){const f=l(u,++c,a),d=s.get(f);d?d.push(u):s.set(f,[u])}for(const[u,f]of s)s.set(u,i(f,o));return n(s)})(t,0)}function xH(t,n){return Array.from(n,e=>t[e])}function Hi(t,...n){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");t=Array.from(t);let[e]=n;if(e&&e.length!==2||n.length>1){const r=Uint32Array.from(t,(i,a)=>a);return n.length>1?(n=n.map(i=>t.map(i)),r.sort((i,a)=>{for(const o of n){const s=ef(o[i],o[a]);if(s)return s}})):(e=t.map(e),r.sort((i,a)=>ef(e[i],e[a]))),xH(t,r)}return t.sort(xC(e))}function xC(t=_n){if(t===_n)return ef;if(typeof t!="function")throw new TypeError("compare is not a function");return(n,e)=>{const r=t(n,e);return r||r===0?r:(t(e,e)===0)-(t(n,n)===0)}}function ef(t,n){return(t==null||!(t>=t))-(n==null||!(n>=n))||(t<n?-1:t>n?1:0)}function _H(t,n,e){return(n.length!==2?Hi(Xb(t,n,e),(([r,i],[a,o])=>_n(i,o)||_n(r,a))):Hi(Ue(t,e),(([r,i],[a,o])=>n(i,o)||_n(r,a)))).map(([r])=>r)}var wH=Array.prototype,OH=wH.slice;function _y(t){return()=>t}const SH=Math.sqrt(50),EH=Math.sqrt(10),kH=Math.sqrt(2);function Pp(t,n,e){const r=(n-t)/Math.max(0,e),i=Math.floor(Math.log10(r)),a=r/Math.pow(10,i),o=a>=SH?10:a>=EH?5:a>=kH?2:1;let s,l,c;return i<0?(c=Math.pow(10,-i)/o,s=Math.round(t*c),l=Math.round(n*c),s/c<t&&++s,l/c>n&&--l,c=-c):(c=Math.pow(10,i)*o,s=Math.round(t/c),l=Math.round(n/c),s*c<t&&++s,l*c>n&&--l),l<s&&.5<=e&&e<2?Pp(t,n,e*2):[s,l,c]}function MH(t,n,e){if(n=+n,t=+t,e=+e,!(e>0))return[];if(t===n)return[t];const r=n<t,[i,a,o]=r?Pp(n,t,e):Pp(t,n,e);if(!(a>=i))return[];const s=a-i+1,l=new Array(s);if(r)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;else if(o<0)for(let c=0;c<s;++c)l[c]=(i+c)/-o;else for(let c=0;c<s;++c)l[c]=(i+c)*o;return l}function e1(t,n,e){return n=+n,t=+t,e=+e,Pp(t,n,e)[2]}function AH(t,n,e){let r;for(;;){const i=e1(t,n,e);if(i===r||i===0||!isFinite(i))return[t,n];i>0?(t=Math.floor(t/i)*i,n=Math.ceil(n/i)*i):i<0&&(t=Math.ceil(t*i)/i,n=Math.floor(n*i)/i),r=i}}function TH(t){return Math.max(1,Math.ceil(Math.log(mC(t))/Math.LN2)+1)}function PH(){var t=tf,n=qa,e=TH;function r(i){Array.isArray(i)||(i=Array.from(i));var a,o=i.length,s,l,c=new Array(o);for(a=0;a<o;++a)c[a]=t(i[a],a,i);var u=n(c),f=u[0],d=u[1],h=e(c,f,d);if(!Array.isArray(h)){const _=d,w=+h;if(n===qa&&([f,d]=AH(f,d,w)),h=MH(f,d,w),h[0]<=f&&(l=e1(f,d,w)),h[h.length-1]>=d)if(_>=d&&n===qa){const O=e1(f,d,w);isFinite(O)&&(O>0?d=(Math.floor(d/O)+1)*O:O<0&&(d=(Math.ceil(d*-O)+1)/-O))}else h.pop()}for(var p=h.length,g=0,y=p;h[g]<=f;)++g;for(;h[y-1]>d;)--y;(g||y<p)&&(h=h.slice(g,y),p=y-g);var m=new Array(p+1),x;for(a=0;a<=p;++a)x=m[a]=[],x.x0=a>0?h[a-1]:f,x.x1=a<p?h[a]:d;if(isFinite(l)){if(l>0)for(a=0;a<o;++a)(s=c[a])!=null&&f<=s&&s<=d&&m[Math.min(p,Math.floor((s-f)/l))].push(i[a]);else if(l<0){for(a=0;a<o;++a)if((s=c[a])!=null&&f<=s&&s<=d){const _=Math.floor((f-s)*l);m[Math.min(p,_+(h[_]<=s))].push(i[a])}}}else for(a=0;a<o;++a)(s=c[a])!=null&&f<=s&&s<=d&&m[dH(h,s,0,p)].push(i[a]);return m}return r.value=function(i){return arguments.length?(t=typeof i=="function"?i:_y(i),r):t},r.domain=function(i){return arguments.length?(n=typeof i=="function"?i:_y([i[0],i[1]]),r):n},r.thresholds=function(i){return arguments.length?(e=typeof i=="function"?i:_y(Array.isArray(i)?OH.call(i):i),r):e},r}function Re(t,n){let e;if(n===void 0)for(const r of t)r!=null&&(e<r||e===void 0&&r>=r)&&(e=r);else{let r=-1;for(let i of t)(i=n(i,++r,t))!=null&&(e<i||e===void 0&&i>=i)&&(e=i)}return e}function _c(t,n){let e,r=-1,i=-1;if(n===void 0)for(const a of t)++i,a!=null&&(e<a||e===void 0&&a>=a)&&(e=a,r=i);else for(let a of t)(a=n(a,++i,t))!=null&&(e<a||e===void 0&&a>=a)&&(e=a,r=i);return r}function ti(t,n){let e;if(n===void 0)for(const r of t)r!=null&&(e>r||e===void 0&&r>=r)&&(e=r);else{let r=-1;for(let i of t)(i=n(i,++r,t))!=null&&(e>i||e===void 0&&i>=i)&&(e=i)}return e}function Bf(t,n){let e,r=-1,i=-1;if(n===void 0)for(const a of t)++i,a!=null&&(e>a||e===void 0&&a>=a)&&(e=a,r=i);else for(let a of t)(a=n(a,++i,t))!=null&&(e>a||e===void 0&&a>=a)&&(e=a,r=i);return r}function Kb(t,n,e=0,r=1/0,i){if(n=Math.floor(n),e=Math.floor(Math.max(0,e)),r=Math.floor(Math.min(t.length-1,r)),!(e<=n&&n<=r))return t;for(i=i===void 0?ef:xC(i);r>e;){if(r-e>600){const l=r-e+1,c=n-e+1,u=Math.log(l),f=.5*Math.exp(2*u/3),d=.5*Math.sqrt(u*f*(l-f)/l)*(c-l/2<0?-1:1),h=Math.max(e,Math.floor(n-c*f/l+d)),p=Math.min(r,Math.floor(n+(l-c)*f/l+d));Kb(t,n,h,p,i)}const a=t[n];let o=e,s=r;for(eu(t,e,n),i(t[r],a)>0&&eu(t,e,r);o<s;){for(eu(t,o,s),++o,--s;i(t[o],a)<0;)++o;for(;i(t[s],a)>0;)--s}i(t[e],a)===0?eu(t,e,s):(++s,eu(t,s,r)),s<=n&&(e=s+1),n<=s&&(r=s-1)}return t}function eu(t,n,e){const r=t[n];t[n]=t[e],t[e]=r}function CH(t,n=_n){let e,r=!1;if(n.length===1){let i;for(const a of t){const o=n(a);(r?_n(o,i)>0:_n(o,o)===0)&&(e=a,i=o,r=!0)}}else for(const i of t)(r?n(i,e)>0:n(i,i)===0)&&(e=i,r=!0);return e}function Vv(t,n,e){if(t=Float64Array.from(fH(t,e)),!(!(r=t.length)||isNaN(n=+n))){if(n<=0||r<2)return ti(t);if(n>=1)return Re(t);var r,i=(r-1)*n,a=Math.floor(i),o=Re(Kb(t,a).subarray(0,a+1)),s=ti(t.subarray(a+1));return o+(s-o)*(i-a)}}function LH(t,n,e=t1){if(!isNaN(n=+n)){if(r=Float64Array.from(t,(s,l)=>t1(e(t[l],l,t))),n<=0)return Bf(r);if(n>=1)return _c(r);var r,i=Uint32Array.from(t,(s,l)=>l),a=r.length-1,o=Math.floor(a*n);return Kb(i,o,0,a,(s,l)=>ef(r[s],r[l])),o=CH(i.subarray(0,o+1),s=>r[s]),o>=0?o:-1}}function NH(t,n,e){const r=mC(t),i=bC(t);return r&&i?Math.ceil((e-n)*Math.cbrt(r)/(3.49*i)):1}function nf(t,n){let e=0,r=0;if(n===void 0)for(let i of t)i!=null&&(i=+i)>=i&&(++e,r+=i);else{let i=-1;for(let a of t)(a=n(a,++i,t))!=null&&(a=+a)>=a&&(++e,r+=a)}if(e)return r/e}function Zb(t,n){return Vv(t,.5,n)}function RH(t,n){return LH(t,.5,n)}function*IH(t){for(const n of t)yield*n}function _C(t){return Array.from(IH(t))}function Ll(t,n,e){t=+t,n=+n,e=(i=arguments.length)<2?(n=t,t=0,1):i<3?1:+e;for(var r=-1,i=Math.max(0,Math.ceil((n-t)/e))|0,a=new Array(i);++r<i;)a[r]=t+r*e;return a}function Oi(t,n){let e=0;if(n===void 0)for(let r of t)(r=+r)&&(e+=r);else{let r=-1;for(let i of t)(i=+n(i,++r,t))&&(e+=i)}return e}function ec(t,...n){return n.reduce((e,r)=>i=>e(r(i)),t)}function Cp(t,n){return n-t?e=>(e-t)/(n-t):e=>.5}function DH(t,n){const e=n<t?n:t,r=t>n?t:n;return i=>Math.min(Math.max(e,i),r)}function Qb(t,n,e,r,i){let a=e||0,o=r||t.length;const s=i||(l=>l);for(;a<o;){const l=Math.floor((a+o)/2);s(t[l])>n?o=l:a=l+1}return a}const n1=Math.sqrt(50),r1=Math.sqrt(10),i1=Math.sqrt(2);function ep(t,n,e){const r=(n-t)/Math.max(0,e),i=Math.floor(Math.log(r)/Math.LN10),a=r/10**i;return i>=0?(a>=n1?10:a>=r1?5:a>=i1?2:1)*10**i:-(10**-i)/(a>=n1?10:a>=r1?5:a>=i1?2:1)}function VS(t,n,e){const r=Math.abs(n-t)/Math.max(0,e);let i=10**Math.floor(Math.log(r)/Math.LN10);const a=r/i;return a>=n1?i*=10:a>=r1?i*=5:a>=i1&&(i*=2),n<t?-i:i}const Jb=(t,n,e=5)=>{const r=[t,n];let i=0,a=r.length-1,o=r[i],s=r[a],l;return s<o&&([o,s]=[s,o],[i,a]=[a,i]),l=ep(o,s,e),l>0?(o=Math.floor(o/l)*l,s=Math.ceil(s/l)*l,l=ep(o,s,e)):l<0&&(o=Math.ceil(o*l)/l,s=Math.floor(s*l)/l,l=ep(o,s,e)),l>0?(r[i]=Math.floor(o/l)*l,r[a]=Math.ceil(s/l)*l):l<0&&(r[i]=Math.ceil(o*l)/l,r[a]=Math.floor(s*l)/l),r},rf=1e3,af=rf*60,of=af*60,zs=of*24,$u=zs*7,wC=zs*30,OC=zs*365;function xr(t,n,e,r){const i=(c,u)=>{const f=h=>r(h)%u===0;let d=u;for(;d&&!f(c);)e(c,-1),d-=1;return c},a=(c,u)=>{u&&i(c,u),n(c)},o=(c,u)=>{const f=new Date(+c);return a(f,u),f},s=(c,u)=>{const f=new Date(+c-1);return a(f,u),e(f,u),a(f),f};return{ceil:s,floor:o,range:(c,u,f,d)=>{const h=[],p=Math.floor(f),g=d?s(c,f):s(c);for(let y=g;y<u;e(y,p),a(y))h.push(new Date(+y));return h},duration:t}}const $H=xr(1,t=>t,(t,n=1)=>{t.setTime(+t+n)},t=>t.getTime()),jH=xr(rf,t=>{t.setMilliseconds(0)},(t,n=1)=>{t.setTime(+t+rf*n)},t=>t.getSeconds()),FH=xr(af,t=>{t.setSeconds(0,0)},(t,n=1)=>{t.setTime(+t+af*n)},t=>t.getMinutes()),BH=xr(of,t=>{t.setMinutes(0,0,0)},(t,n=1)=>{t.setTime(+t+of*n)},t=>t.getHours()),zH=xr(zs,t=>{t.setHours(0,0,0,0)},(t,n=1)=>{t.setTime(+t+zs*n)},t=>t.getDate()-1),SC=xr(wC,t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,n=1)=>{const e=t.getMonth();t.setMonth(e+n)},t=>t.getMonth()),WH=xr($u,t=>{t.setDate(t.getDate()-t.getDay()%7),t.setHours(0,0,0,0)},(t,n=1)=>{t.setDate(t.getDate()+7*n)},t=>{const n=SC.floor(t),e=new Date(+t);return Math.floor((+e-+n)/$u)}),GH=xr(OC,t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n=1)=>{const e=t.getFullYear();t.setFullYear(e+n)},t=>t.getFullYear()),EC={millisecond:$H,second:jH,minute:FH,hour:BH,day:zH,week:WH,month:SC,year:GH},YH=xr(1,t=>t,(t,n=1)=>{t.setTime(+t+n)},t=>t.getTime()),HH=xr(rf,t=>{t.setUTCMilliseconds(0)},(t,n=1)=>{t.setTime(+t+rf*n)},t=>t.getUTCSeconds()),UH=xr(af,t=>{t.setUTCSeconds(0,0)},(t,n=1)=>{t.setTime(+t+af*n)},t=>t.getUTCMinutes()),VH=xr(of,t=>{t.setUTCMinutes(0,0,0)},(t,n=1)=>{t.setTime(+t+of*n)},t=>t.getUTCHours()),XH=xr(zs,t=>{t.setUTCHours(0,0,0,0)},(t,n=1)=>{t.setTime(+t+zs*n)},t=>t.getUTCDate()-1),kC=xr(wC,t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,n=1)=>{const e=t.getUTCMonth();t.setUTCMonth(e+n)},t=>t.getUTCMonth()),qH=xr($u,t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7)%7),t.setUTCHours(0,0,0,0)},(t,n=1)=>{t.setTime(+t+$u*n)},t=>{const n=kC.floor(t),e=new Date(+t);return Math.floor((+e-+n)/$u)}),KH=xr(OC,t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n=1)=>{const e=t.getUTCFullYear();t.setUTCFullYear(e+n)},t=>t.getUTCFullYear()),MC={millisecond:YH,second:HH,minute:UH,hour:VH,day:XH,week:qH,month:kC,year:KH};function ZH(t){const n=t?MC:EC,{year:e,month:r,week:i,day:a,hour:o,minute:s,second:l,millisecond:c}=n;return{tickIntervals:[[l,1],[l,5],[l,15],[l,30],[s,1],[s,5],[s,15],[s,30],[o,1],[o,3],[o,6],[o,12],[a,1],[a,2],[i,1],[r,1],[r,3],[e,1]],year:e,millisecond:c}}function AC(t,n,e,r,i){const a=+t,o=+n,{tickIntervals:s,year:l,millisecond:c}=ZH(i),u=([y,m])=>y.duration*m,f=r?(o-a)/r:e||5,d=r||(o-a)/f,h=s.length,p=Qb(s,d,0,h,u);let g;if(p===h){const y=VS(a/l.duration,o/l.duration,f);g=[l,y]}else if(p){const y=d/u(s[p-1])<u(s[p])/d,[m,x]=y?s[p-1]:s[p],_=r?Math.ceil(r/m.duration):x;g=[m,_]}else{const y=Math.max(VS(a,o,f),1);g=[c,y]}return g}const QH=(t,n,e,r,i)=>{const a=t>n,o=a?n:t,s=a?t:n,[l,c]=AC(o,s,e,r,i),u=[l.floor(o,c),l.ceil(s,c)];return a?u.reverse():u};function Lp(t){return!Be(t)&&!BP(t)&&!Number.isNaN(t)}const TC=t=>n=>-t(-n),tx=(t,n)=>{const e=Math.log(t),r=t===Math.E?Math.log:t===10?Math.log10:t===2?Math.log2:i=>Math.log(i)/e;return n?TC(r):r},ex=(t,n)=>{const e=t===Math.E?Math.exp:r=>t**r;return n?TC(e):e},JH=(t,n,e,r)=>{const i=t<0,a=tx(r,i),o=ex(r,i),s=t>n,l=s?n:t,c=s?t:n,u=[o(Math.floor(a(l))),o(Math.ceil(a(c)))];return s?u.reverse():u},tU=t=>n=>{const e=t(n);return Qe(e)?Math.round(e):e};function eU(t,n){return e=>{e.prototype.rescale=function(){this.initRange(),this.nice();const[r]=this.chooseTransforms();this.composeOutput(r,this.chooseClamp(r))},e.prototype.initRange=function(){const{interpolator:r}=this.options;this.options.range=t(r)},e.prototype.composeOutput=function(r,i){const{domain:a,interpolator:o,round:s}=this.getOptions(),l=n(a.map(r)),c=s?tU(o):o;this.output=ec(c,l,i,r)},e.prototype.invert=void 0}}var wy={exports:{}},Oy,XS;function nU(){return XS||(XS=1,Oy={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}),Oy}var Sy={exports:{}},Ey,qS;function rU(){return qS||(qS=1,Ey=function(n){return!n||typeof n=="string"?!1:n instanceof Array||Array.isArray(n)||n.length>=0&&(n.splice instanceof Function||Object.getOwnPropertyDescriptor(n,n.length-1)&&n.constructor.name!=="String")}),Ey}var KS;function iU(){if(KS)return Sy.exports;KS=1;var t=rU(),n=Array.prototype.concat,e=Array.prototype.slice,r=Sy.exports=function(a){for(var o=[],s=0,l=a.length;s<l;s++){var c=a[s];t(c)?o=n.call(o,e.call(c)):o.push(c)}return o};return r.wrap=function(i){return function(){return i(r(arguments))}},Sy.exports}var ZS;function aU(){if(ZS)return wy.exports;ZS=1;var t=nU(),n=iU(),e=Object.hasOwnProperty,r=Object.create(null);for(var i in t)e.call(t,i)&&(r[t[i]]=i);var a=wy.exports={to:{},get:{}};a.get=function(l){var c=l.substring(0,3).toLowerCase(),u,f;switch(c){case"hsl":u=a.get.hsl(l),f="hsl";break;case"hwb":u=a.get.hwb(l),f="hwb";break;default:u=a.get.rgb(l),f="rgb";break}return u?{model:f,value:u}:null},a.get.rgb=function(l){if(!l)return null;var c=/^#([a-f0-9]{3,4})$/i,u=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,f=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,d=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,h=/^(\w+)$/,p=[0,0,0,1],g,y,m;if(g=l.match(u)){for(m=g[2],g=g[1],y=0;y<3;y++){var x=y*2;p[y]=parseInt(g.slice(x,x+2),16)}m&&(p[3]=parseInt(m,16)/255)}else if(g=l.match(c)){for(g=g[1],m=g[3],y=0;y<3;y++)p[y]=parseInt(g[y]+g[y],16);m&&(p[3]=parseInt(m+m,16)/255)}else if(g=l.match(f)){for(y=0;y<3;y++)p[y]=parseInt(g[y+1],0);g[4]&&(g[5]?p[3]=parseFloat(g[4])*.01:p[3]=parseFloat(g[4]))}else if(g=l.match(d)){for(y=0;y<3;y++)p[y]=Math.round(parseFloat(g[y+1])*2.55);g[4]&&(g[5]?p[3]=parseFloat(g[4])*.01:p[3]=parseFloat(g[4]))}else return(g=l.match(h))?g[1]==="transparent"?[0,0,0,0]:e.call(t,g[1])?(p=t[g[1]],p[3]=1,p):null:null;for(y=0;y<3;y++)p[y]=o(p[y],0,255);return p[3]=o(p[3],0,1),p},a.get.hsl=function(l){if(!l)return null;var c=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,u=l.match(c);if(u){var f=parseFloat(u[4]),d=(parseFloat(u[1])%360+360)%360,h=o(parseFloat(u[2]),0,100),p=o(parseFloat(u[3]),0,100),g=o(isNaN(f)?1:f,0,1);return[d,h,p,g]}return null},a.get.hwb=function(l){if(!l)return null;var c=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,u=l.match(c);if(u){var f=parseFloat(u[4]),d=(parseFloat(u[1])%360+360)%360,h=o(parseFloat(u[2]),0,100),p=o(parseFloat(u[3]),0,100),g=o(isNaN(f)?1:f,0,1);return[d,h,p,g]}return null},a.to.hex=function(){var l=n(arguments);return"#"+s(l[0])+s(l[1])+s(l[2])+(l[3]<1?s(Math.round(l[3]*255)):"")},a.to.rgb=function(){var l=n(arguments);return l.length<4||l[3]===1?"rgb("+Math.round(l[0])+", "+Math.round(l[1])+", "+Math.round(l[2])+")":"rgba("+Math.round(l[0])+", "+Math.round(l[1])+", "+Math.round(l[2])+", "+l[3]+")"},a.to.rgb.percent=function(){var l=n(arguments),c=Math.round(l[0]/255*100),u=Math.round(l[1]/255*100),f=Math.round(l[2]/255*100);return l.length<4||l[3]===1?"rgb("+c+"%, "+u+"%, "+f+"%)":"rgba("+c+"%, "+u+"%, "+f+"%, "+l[3]+")"},a.to.hsl=function(){var l=n(arguments);return l.length<4||l[3]===1?"hsl("+l[0]+", "+l[1]+"%, "+l[2]+"%)":"hsla("+l[0]+", "+l[1]+"%, "+l[2]+"%, "+l[3]+")"},a.to.hwb=function(){var l=n(arguments),c="";return l.length>=4&&l[3]!==1&&(c=", "+l[3]),"hwb("+l[0]+", "+l[1]+"%, "+l[2]+"%"+c+")"},a.to.keyword=function(l){return r[l.slice(0,3)]};function o(l,c,u){return Math.min(Math.max(c,l),u)}function s(l){var c=Math.round(l).toString(16).toUpperCase();return c.length<2?"0"+c:c}return wy.exports}var oU=aU();const PC=Bv(oU);function ky(t,n,e){let r=e;return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(n-t)*6*r:r<1/2?n:r<2/3?t+(n-t)*(2/3-r)*6:t}function sU(t){const n=t[0]/360,e=t[1]/100,r=t[2]/100,i=t[3];if(e===0)return[r*255,r*255,r*255,i];const a=r<.5?r*(1+e):r+e-r*e,o=2*r-a,s=ky(o,a,n+1/3),l=ky(o,a,n),c=ky(o,a,n-1/3);return[s*255,l*255,c*255,i]}function QS(t){const n=PC.get(t);if(!n)return null;const{model:e,value:r}=n;return e==="rgb"?r:e==="hsl"?sU(r):null}const nc=(t,n)=>e=>t*(1-e)+n*e,lU=(t,n)=>{const e=QS(t),r=QS(n);return e===null||r===null?e?()=>t:()=>n:i=>{const a=new Array(4);for(let u=0;u<4;u+=1){const f=e[u],d=r[u];a[u]=f*(1-i)+d*i}const[o,s,l,c]=a;return`rgba(${Math.round(o)}, ${Math.round(s)}, ${Math.round(l)}, ${c})`}},zf=(t,n)=>typeof t=="number"&&typeof n=="number"?nc(t,n):typeof t=="string"&&typeof n=="string"?lU(t,n):()=>t,cU=(t,n)=>{const e=nc(t,n);return r=>Math.round(e(r))};function uU(t,n){const{second:e,minute:r,hour:i,day:a,week:o,month:s,year:l}=n;return e.floor(t)<t?".SSS":r.floor(t)<t?":ss":i.floor(t)<t?"hh:mm":a.floor(t)<t?"hh A":s.floor(t)<t?o.floor(t)<t?"MMM DD":"ddd DD":l.floor(t)<t?"MMMM":"YYYY"}function JS({map:t,initKey:n},e){const r=n(e);return t.has(r)?t.get(r):e}function fU({map:t,initKey:n},e){const r=n(e);return t.has(r)?t.get(r):(t.set(r,e),e)}function dU({map:t,initKey:n},e){const r=n(e);return t.has(r)&&(e=t.get(r),t.delete(r)),e}function hU(t){return typeof t=="object"?t.valueOf():t}let tE=class extends Map{constructor(n){if(super(),this.map=new Map,this.initKey=hU,n!==null)for(const[e,r]of n)this.set(e,r)}get(n){return super.get(JS({map:this.map,initKey:this.initKey},n))}has(n){return super.has(JS({map:this.map,initKey:this.initKey},n))}set(n,e){return super.set(fU({map:this.map,initKey:this.initKey},n),e)}delete(n){return super.delete(dU({map:this.map,initKey:this.initKey},n))}},Wf=class{transformBreaks(n){return n}constructor(n){var e;this.options=at({},this.getDefaultOptions()),this.update(!((e=n==null?void 0:n.breaks)===null||e===void 0)&&e.length?this.transformBreaks(n):n)}getOptions(){return this.options}update(n={}){const e=n.breaks?this.transformBreaks(n):n;this.options=at({},this.options,e),this.rescale(e)}rescale(n){}};const Xv=Symbol("defaultUnknown");function eE(t,n,e){for(let r=0;r<n.length;r+=1)t.has(n[r])||t.set(e(n[r]),r)}function nE(t){const{value:n,from:e,to:r,mapper:i,notFoundReturn:a}=t;let o=i.get(n);if(o===void 0){if(a!==Xv)return a;o=e.push(n)-1,i.set(n,o)}return r[o%r.length]}function rE(t){return t instanceof Date?n=>`${n}`:typeof t=="object"?n=>JSON.stringify(n):n=>n}let CC=class LC extends Wf{getDefaultOptions(){return{domain:[],range:[],unknown:Xv}}constructor(n){super(n)}map(n){return this.domainIndexMap.size===0&&eE(this.domainIndexMap,this.getDomain(),this.domainKey),nE({value:this.domainKey(n),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(n){return this.rangeIndexMap.size===0&&eE(this.rangeIndexMap,this.getRange(),this.rangeKey),nE({value:this.rangeKey(n),mapper:this.rangeIndexMap,from:this.getRange(),to:this.getDomain(),notFoundReturn:this.options.unknown})}rescale(n){const[e]=this.options.domain,[r]=this.options.range;if(this.domainKey=rE(e),this.rangeKey=rE(r),!this.rangeIndexMap){this.rangeIndexMap=new Map,this.domainIndexMap=new Map;return}(!n||n.range)&&this.rangeIndexMap.clear(),(!n||n.domain||n.compare)&&(this.domainIndexMap.clear(),this.sortedDomain=void 0)}clone(){return new LC(this.options)}getRange(){return this.options.range}getDomain(){if(this.sortedDomain)return this.sortedDomain;const{domain:n,compare:e}=this.options;return this.sortedDomain=e?[...n].sort(e):n,this.sortedDomain}};function pU(t){const n=t.reduce((e,r)=>Math.min(e,r),1/0);return n===1/0?[]:t.map(e=>e/n)}function vU(t,n){const e=t.length,r=n-e;return r>0?[...t,...new Array(r).fill(1)]:r<0?t.slice(0,n):t}function gU(t){return Math.round(t*1e12)/1e12}function yU(t){const{domain:n,range:e,paddingOuter:r,paddingInner:i,flex:a,round:o,align:s}=t,l=n.length,c=vU(a,l),[u,f]=e,d=f-u,h=2/l*r+1-1/l*i,p=d/h,g=p*i/l,y=p-l*g,m=pU(c),x=m.reduce((N,C)=>N+C),_=y/x,w=new tE(n.map((N,C)=>{const R=m[C]*_;return[N,o?Math.floor(R):R]})),O=new tE(n.map((N,C)=>{const D=m[C]*_+g;return[N,o?Math.floor(D):D]})),S=Array.from(O.values()).reduce((N,C)=>N+C),M=(d-(S-S/l*i))*s,A=u+M;let T=o?Math.round(A):A;const P=new Array(l);for(let N=0;N<l;N+=1){P[N]=gU(T);const C=n[N];T+=O.get(C)}return{valueBandWidth:w,valueStep:O,adjustedRange:P}}function mU(t){var n;const{domain:e}=t,r=e.length;if(r===0)return{valueBandWidth:void 0,valueStep:void 0,adjustedRange:[]};if(!!(!((n=t.flex)===null||n===void 0)&&n.length))return yU(t);const{range:a,paddingOuter:o,paddingInner:s,round:l,align:c}=t;let u,f,d=a[0];const p=a[1]-d,g=o*2,y=r-s;u=p/Math.max(1,g+y),l&&(u=Math.floor(u)),d+=(p-u*(r-s))*c,f=u*(1-s),l&&(d=Math.round(d),f=Math.round(f));const m=new Array(r).fill(0).map((x,_)=>d+_*u);return{valueStep:u,valueBandWidth:f,adjustedRange:m}}let sf=class NC extends CC{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:Xv,flex:[]}}constructor(n){super(n)}clone(){return new NC(this.options)}getStep(n){return this.valueStep===void 0?1:typeof this.valueStep=="number"?this.valueStep:n===void 0?Array.from(this.valueStep.values())[0]:this.valueStep.get(n)}getBandWidth(n){return this.valueBandWidth===void 0?1:typeof this.valueBandWidth=="number"?this.valueBandWidth:n===void 0?Array.from(this.valueBandWidth.values())[0]:this.valueBandWidth.get(n)}getRange(){return this.adjustedRange}getPaddingInner(){const{padding:n,paddingInner:e}=this.options;return n>0?n:e}getPaddingOuter(){const{padding:n,paddingOuter:e}=this.options;return n>0?n:e}rescale(){super.rescale();const{align:n,domain:e,range:r,round:i,flex:a}=this.options,{adjustedRange:o,valueBandWidth:s,valueStep:l}=mU({align:n,range:r,round:i,flex:a,paddingInner:this.getPaddingInner(),paddingOuter:this.getPaddingOuter(),domain:e});this.valueStep=l,this.valueBandWidth=s,this.adjustedRange=o}};const bU=(t,n)=>{if(!(n!=null&&n.length))return t;const e=[...t,...n.flatMap(a=>[a.start,a.end])],i=Array.from(new Set(e)).sort((a,o)=>a-o).filter(a=>!n.some(({start:o,end:s})=>a>o&&a<s));return i.length?i:t},zo=(t,n,e,r)=>{let i,a,o=t,s=n;if(o===s&&e>0)return[o];let l=ep(o,s,e);if(l===0||!Number.isFinite(l))return[];if(l>0){o=Math.ceil(o/l),s=Math.floor(s/l),a=new Array(i=Math.ceil(s-o+1));for(let c=0;c<i;c+=1)a[c]=(o+c)*l}else{l=-l,o=Math.ceil(o*l),s=Math.floor(s*l),a=new Array(i=Math.ceil(s-o+1));for(let c=0;c<i;c+=1)a[c]=(o+c)/l}return bU(a,r)};let nx=class RC extends Wf{getDefaultOptions(){return{range:[0],domain:[0,1],unknown:void 0,tickCount:5,tickMethod:zo}}map(n){const[e]=this.options.range;return e!==void 0?e:this.options.unknown}invert(n){const[e]=this.options.range;return n===e&&e!==void 0?this.options.domain:[]}getTicks(){const{tickMethod:n,domain:e,tickCount:r}=this.options,[i,a]=e;return!Qe(i)||!Qe(a)?[]:n(i,a,r)}clone(){return new RC(this.options)}};function nu(t){return Math.abs(t)<1e-14?t:parseFloat(t.toFixed(14))}const xU=[1,5,2,2.5,4,3],iE=Number.EPSILON*100;function _U(t,n){return(t%n+n)%n}function wU(t){return Math.round(t*1e12)/1e12}function OU(t,n,e,r,i,a){const o=Qu(n),s=YP(n,t);let l=0;const c=_U(r,a);return(c<iE||a-c<iE)&&r<=0&&i>=0&&(l=1),1-s/(o-1)-e+l}function SU(t,n,e){const r=Qu(n);return 1-YP(n,t)/(r-1)-e+1}function EU(t,n,e,r,i,a){const o=(t-1)/(a-i),s=(n-1)/(Math.max(a,r)-Math.min(e,i));return 2-Math.max(o/s,s/o)}function kU(t,n){return t>=n?2-(t-1)/(n-1):1}function MU(t,n,e,r){const i=n-t;return 1-.5*((n-r)**2+(t-e)**2)/(.1*i)**2}function AU(t,n,e){const r=n-t;return e>r?1-((e-r)/2)**2/(.1*r)**2:1}function TU(){return 1}const rx=(t,n,e=5,r=!0,i=xU,a=[.25,.2,.5,.05])=>{const o=e<0?0:Math.round(e);if(Number.isNaN(t)||Number.isNaN(n)||typeof t!="number"||typeof n!="number"||!o)return[];if(n-t<1e-15||o===1)return[t];const s={score:-2,lmin:0,lmax:0,lstep:0};let l=1;for(;l<1/0;){for(let p=0;p<i.length;p+=1){const g=i[p],y=SU(g,i,l);if(a[0]*y+a[1]+a[2]+a[3]<s.score){l=1/0;break}let m=2;for(;m<1/0;){const x=kU(m,o);if(a[0]*y+a[1]+a[2]*x+a[3]<s.score)break;const _=(n-t)/(m+1)/l/g;let w=Math.ceil(Math.log10(_));for(;w<1/0;){const O=l*g*10**w,S=AU(t,n,O*(m-1));if(a[0]*y+a[1]*S+a[2]*x+a[3]<s.score)break;const E=Math.floor(n/O)*l-(m-1)*l,M=Math.ceil(t/O)*l;if(E<=M){const A=M-E;for(let T=0;T<=A;T+=1){const N=(E+T)*(O/l),C=N+O*(m-1),R=O,D=OU(g,i,l,N,C,R),F=MU(t,n,N,C),j=EU(m,o,t,n,N,C),I=TU(),$=a[0]*D+a[1]*F+a[2]*j+a[3]*I;$>s.score&&(!r||N<=t&&C>=n)&&(s.lmin=N,s.lmax=C,s.lstep=R,s.score=$)}}w+=1}m+=1}}l+=1}const c=nu(s.lmax),u=nu(s.lmin),f=nu(s.lstep),d=Math.floor(wU((c-u)/f))+1,h=new Array(d);h[0]=nu(u);for(let p=1;p<d;p+=1)h[p]=nu(h[p-1]+f);return h};let IC=class DC extends Wf{getDefaultOptions(){return{domain:[0,1],range:[0,1],tickCount:5,unknown:void 0,tickMethod:rx}}map(n){return Lp(n)?n:this.options.unknown}invert(n){return this.map(n)}clone(){return new DC(this.options)}getTicks(){const{domain:n,tickCount:e,tickMethod:r}=this.options,[i,a]=n;return!Qe(i)||!Qe(a)?[]:r(i,a,e)}};const PU=(t,n,e)=>{const[r,i]=t,[a,o]=n;let s,l;return r<i?(s=Cp(r,i),l=e(a,o)):(s=Cp(i,r),l=e(o,a)),ec(l,s)},CU=(t,n,e)=>{const r=Math.min(t.length,n.length)-1,i=new Array(r),a=new Array(r),o=t[0]>t[r],s=o?[...t].reverse():t,l=o?[...n].reverse():n;for(let c=0;c<r;c+=1)i[c]=Cp(s[c],s[c+1]),a[c]=e(l[c],l[c+1]);return c=>{const u=Qb(t,c,1,r)-1,f=i[u],d=a[u];return ec(d,f)(c)}},aE=(t,n,e,r)=>(Math.min(t.length,n.length)>2?CU:PU)(t,n,r?cU:e);let qv=class extends Wf{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:nc,tickCount:5}}map(n){return Lp(n)?this.output(n):this.options.unknown}invert(n){return Lp(n)?this.input(n):this.options.unknown}nice(){if(!this.options.nice||Cn(this.options.breaks))return;const[n,e,r,...i]=this.getTickMethodOptions();this.options.domain=this.chooseNice()(n,e,r,...i)}getTicks(){const{tickMethod:n}=this.options,[e,r,i,...a]=this.getTickMethodOptions();return n(e,r,i,...a)}getTickMethodOptions(){const{domain:n,tickCount:e}=this.options,r=n[0],i=n[n.length-1];return[r,i,e]}chooseNice(){return Jb}rescale(){this.nice();const[n,e]=this.chooseTransforms();this.composeOutput(n,this.chooseClamp(n)),this.composeInput(n,e,this.chooseClamp(e))}chooseClamp(n){const{clamp:e,range:r}=this.options,i=this.options.domain.map(n),a=Math.min(i.length,r.length);return e?DH(i[0],i[a-1]):_a}composeOutput(n,e){const{domain:r,range:i,round:a,interpolate:o}=this.options,s=aE(r.map(n),i,o,a);this.output=ec(s,e,n)}composeInput(n,e,r){const{domain:i,range:a}=this.options,o=aE(a,i.map(n),nc);this.input=ec(e,r,o)}},to=class $C extends qv{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:zf,tickMethod:zo,tickCount:5}}removeUnsortedValues(n,e,r){let i=-1/0;return e.reduce((o,s,l)=>{if(l===0)return o;const c=i>0?i:s;return i>0&&(r?s>i:s<i)?o.push(l):(c-e[l-1])*(r?-1:1)<0?(i<0&&(i=e[l-1]),o.push(l)):i=-1/0,o},[]).slice().reverse().forEach(o=>{n.splice(o,1),e.splice(o,1)}),{breaksDomain:n,breaksRange:e}}transformDomain(n){const e=[.2,.8],r=.03,{domain:i=[],range:a=[1,0],breaks:o=[],tickCount:s=5,nice:l}=n,[c,u]=[Math.min(...i),Math.max(...i)];let f=c,d=u;if(l&&o.length<2){const A=this.chooseNice()(c,u,s);f=A[0],d=A[A.length-1]}const h=Math.min(f,c);let p=Math.max(d,u);const g=o.filter(({end:A})=>A<p).sort((A,T)=>A.start-T.start),y=zo(h,p,s,g);if(Qr(y)<p){const A=Jb(0,p-Qr(y),3);y.push(Qr(y)+Qr(A)),p=Qr(y)}const[m,x]=[a[0],Qr(a)],_=p-h,w=Math.abs(x-m),O=m>x,S=y.map(A=>{const T=(A-h)/_;return O?m-T*w:m+T*w}),[E,M]=e;return g.forEach(({start:A,end:T,gap:P=r,compress:N="middle"})=>{const C=y.indexOf(A),R=y.indexOf(T);let D=(S[C]+S[R])/2;N==="start"&&(D=S[C]),N==="end"&&(D=S[R]);const F=P*w/2;let j=O?D+F:D-F,I=O?D-F:D+F;j<E&&(I+=E-j,j=E),I>M&&(j-=I-M,I=M),j>M&&(I-=j-M,j=M),I<E&&(j+=E-I,I=E),S[C]=j,S[R]=I}),this.removeUnsortedValues(y,S,O)}transformBreaks(n){const{domain:e,breaks:r=[]}=n;if(!Cn(n.breaks))return n;const i=Math.max(...e),a=r.filter(({end:c})=>c<i),o={...n,breaks:a},{breaksDomain:s,breaksRange:l}=this.transformDomain(o);return{...n,domain:s,range:l,breaks:a,tickMethod:()=>[...s]}}chooseTransforms(){return[_a,_a]}clone(){return new $C(this.options)}},LU=class jC extends sf{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,padding:0,unknown:Xv,paddingInner:1,paddingOuter:0}}constructor(n){super(n)}getPaddingInner(){return 1}clone(){return new jC(this.options)}update(n){super.update(n)}getPaddingOuter(){return this.options.padding}};const NU=t=>n=>n<0?-((-n)**t):n**t,RU=t=>n=>n<0?-((-n)**(1/t)):n**(1/t),IU=t=>t<0?-Math.sqrt(-t):Math.sqrt(t);let FC=class BC extends qv{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,exponent:2,interpolate:zf,tickMethod:zo,tickCount:5}}constructor(n){super(n)}chooseTransforms(){const{exponent:n}=this.options;if(n===1)return[_a,_a];const e=n===.5?IU:NU(n),r=RU(n);return[e,r]}clone(){return new BC(this.options)}},DU=class zC extends FC{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:zf,tickMethod:zo,tickCount:5,exponent:.5}}constructor(n){super(n)}update(n){super.update(n)}clone(){return new zC(this.options)}},Kv=class WC extends Wf{getDefaultOptions(){return{domain:[.5],range:[0,1]}}constructor(n){super(n)}map(n){if(!Lp(n))return this.options.unknown;const e=Qb(this.thresholds,n,0,this.n);return this.options.range[e]}invert(n){const{range:e}=this.options,r=e.indexOf(n),i=this.thresholds;return[i[r-1],i[r]]}clone(){return new WC(this.options)}rescale(){const{domain:n,range:e}=this.options;this.n=Math.min(n.length,e.length-1),this.thresholds=n}};const $U=(t,n,e,r=10)=>{const i=t<0,a=ex(r,i),o=tx(r,i),s=n<t,l=s?n:t,c=s?t:n;let u=o(l),f=o(c),d=[];if(!(r%1)&&f-u<e){if(u=Math.floor(u),f=Math.ceil(f),i)for(;u<=f;u+=1){const h=a(u);for(let p=r-1;p>=1;p-=1){const g=h*p;if(g>c)break;g>=l&&d.push(g)}}else for(;u<=f;u+=1){const h=a(u);for(let p=1;p<r;p+=1){const g=h*p;if(g>c)break;g>=l&&d.push(g)}}d.length*2<e&&(d=zo(l,c,e))}else{const h=e===-1?f-u:Math.min(f-u,e);d=zo(u,f,h).map(a)}return s?d.reverse():d};let jU=class GC extends qv{getDefaultOptions(){return{domain:[1,10],range:[0,1],base:10,interpolate:zf,tickMethod:$U,tickCount:5}}chooseNice(){return JH}getTickMethodOptions(){const{domain:n,tickCount:e,base:r}=this.options,i=n[0],a=n[n.length-1];return[i,a,e,r]}chooseTransforms(){const{base:n,domain:e}=this.options,r=e[0]<0;return[tx(n,r),ex(n,r)]}clone(){return new GC(this.options)}},YC=class HC extends Kv{getDefaultOptions(){return{domain:[0,1],range:[.5],nice:!1,tickCount:5,tickMethod:rx}}constructor(n){super(n)}nice(){const{nice:n}=this.options;if(n){const[e,r,i]=this.getTickMethodOptions();this.options.domain=Jb(e,r,i)}}getTicks(){const{tickMethod:n}=this.options,[e,r,i]=this.getTickMethodOptions();return n(e,r,i)}getTickMethodOptions(){const{domain:n,tickCount:e}=this.options,r=n[0],i=n[n.length-1];return[r,i,e]}rescale(){this.nice();const{range:n,domain:e}=this.options,[r,i]=e;this.n=n.length-1,this.thresholds=new Array(this.n);for(let a=0;a<this.n;a+=1)this.thresholds[a]=((a+1)*i-(a-this.n)*r)/(this.n+1)}invert(n){const[e,r]=super.invert(n),[i,a]=this.options.domain;return e===void 0&&r===void 0?[e,r]:[e||i,r||a]}getThresholds(){return this.thresholds}clone(){return new HC(this.options)}};function FU(t,n){const e=t.length;if(!e)return;if(e<2)return t[e-1];const r=(e-1)*n,i=Math.floor(r),a=t[i],o=t[i+1];return a+(o-a)*(r-i)}function BU(t,n,e=!1){const r=t;e||r.sort((a,o)=>a-o);const i=[];for(let a=1;a<n;a+=1)i.push(FU(r,a/n));return i}let UC=class VC extends Kv{getDefaultOptions(){return{domain:[],range:[],tickCount:5,unknown:void 0,tickMethod:rx}}constructor(n){super(n)}rescale(){const{domain:n,range:e}=this.options;this.n=e.length-1,this.thresholds=BU(n,this.n+1,!1)}invert(n){const[e,r]=super.invert(n),{domain:i}=this.options,a=i[0],o=i[i.length-1];return e===void 0&&r===void 0?[e,r]:[e||a,r||o]}getThresholds(){return this.thresholds}clone(){return new VC(this.options)}getTicks(){const{tickCount:n,domain:e,tickMethod:r}=this.options,i=e.length-1,a=e[0],o=e[i];return r(a,o,n)}};var zU=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,WU=/\[([^]*?)\]/gm;function XC(t,n){for(var e=[],r=0,i=t.length;r<i;r++)e.push(t[r].substr(0,n));return e}function a1(t){for(var n=[],e=1;e<arguments.length;e++)n[e-1]=arguments[e];for(var r=0,i=n;r<i.length;r++){var a=i[r];for(var o in a)t[o]=a[o]}return t}var qC=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],KC=["January","February","March","April","May","June","July","August","September","October","November","December"],GU=XC(KC,3),YU=XC(qC,3),HU={dayNamesShort:YU,dayNames:qC,monthNamesShort:GU,monthNames:KC,amPm:["am","pm"],DoFn:function(t){return t+["th","st","nd","rd"][t%10>3?0:(t-t%10!==10?1:0)*t%10]}},UU=a1({},HU),Dr=function(t,n){for(n===void 0&&(n=2),t=String(t);t.length<n;)t="0"+t;return t},VU={D:function(t){return String(t.getDate())},DD:function(t){return Dr(t.getDate())},Do:function(t,n){return n.DoFn(t.getDate())},d:function(t){return String(t.getDay())},dd:function(t){return Dr(t.getDay())},ddd:function(t,n){return n.dayNamesShort[t.getDay()]},dddd:function(t,n){return n.dayNames[t.getDay()]},M:function(t){return String(t.getMonth()+1)},MM:function(t){return Dr(t.getMonth()+1)},MMM:function(t,n){return n.monthNamesShort[t.getMonth()]},MMMM:function(t,n){return n.monthNames[t.getMonth()]},YY:function(t){return Dr(String(t.getFullYear()),4).substr(2)},YYYY:function(t){return Dr(t.getFullYear(),4)},h:function(t){return String(t.getHours()%12||12)},hh:function(t){return Dr(t.getHours()%12||12)},H:function(t){return String(t.getHours())},HH:function(t){return Dr(t.getHours())},m:function(t){return String(t.getMinutes())},mm:function(t){return Dr(t.getMinutes())},s:function(t){return String(t.getSeconds())},ss:function(t){return Dr(t.getSeconds())},S:function(t){return String(Math.round(t.getMilliseconds()/100))},SS:function(t){return Dr(Math.round(t.getMilliseconds()/10),2)},SSS:function(t){return Dr(t.getMilliseconds(),3)},a:function(t,n){return t.getHours()<12?n.amPm[0]:n.amPm[1]},A:function(t,n){return t.getHours()<12?n.amPm[0].toUpperCase():n.amPm[1].toUpperCase()},ZZ:function(t){var n=t.getTimezoneOffset();return(n>0?"-":"+")+Dr(Math.floor(Math.abs(n)/60)*100+Math.abs(n)%60,4)},Z:function(t){var n=t.getTimezoneOffset();return(n>0?"-":"+")+Dr(Math.floor(Math.abs(n)/60),2)+":"+Dr(Math.abs(n)%60,2)}},oE={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},XU=function(t,n,e){if(n===void 0&&(n=oE.default),e===void 0&&(e={}),typeof t=="number"&&(t=new Date(t)),Object.prototype.toString.call(t)!=="[object Date]"||isNaN(t.getTime()))throw new Error("Invalid Date pass to format");n=oE[n]||n;var r=[];n=n.replace(WU,function(a,o){return r.push(o),"@@@"});var i=a1(a1({},UU),e);return n=n.replace(zU,function(a){return VU[a](t,i)}),n.replace(/@@@/g,function(){return r.shift()})};const qU=(t,n,e,r,i)=>{const a=t>n,o=a?n:t,s=a?t:n,[l,c]=AC(o,s,e,r,i),u=l.range(o,new Date(+s+1),c,!0);return a?u.reverse():u};function KU(t){const n=t.getTimezoneOffset(),e=new Date(t);return e.setMinutes(e.getMinutes()+n,e.getSeconds(),e.getMilliseconds()),e}let ZU=class ZC extends qv{getDefaultOptions(){return{domain:[new Date(2e3,0,1),new Date(2e3,0,2)],range:[0,1],nice:!1,tickCount:5,tickInterval:void 0,unknown:void 0,clamp:!1,tickMethod:qU,interpolate:nc,mask:void 0,utc:!1}}chooseTransforms(){return[r=>+r,r=>new Date(r)]}chooseNice(){return QH}getTickMethodOptions(){const{domain:n,tickCount:e,tickInterval:r,utc:i}=this.options,a=n[0],o=n[n.length-1];return[a,o,e,r,i]}getFormatter(){const{mask:n,utc:e}=this.options,r=e?MC:EC,i=e?KU:_a;return a=>XU(i(a),n||uU(a,r))}clone(){return new ZC(this.options)}};var QU=function(t,n,e,r){var i=arguments.length,a=i<3?n:r===null?r=Object.getOwnPropertyDescriptor(n,e):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,n,e,r);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(n,e,a):o(n,e))||a);return i>3&&a&&Object.defineProperty(n,e,a),a},o1;function JU(t){return[t(0),t(1)]}const tV=t=>{const[n,e]=t;return ec(nc(0,1),Cp(n,e))};let s1=o1=class extends to{getDefaultOptions(){return{domain:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:_a,tickMethod:zo,tickCount:5}}constructor(n){super(n)}clone(){return new o1(this.options)}};s1=o1=QU([eU(JU,tV)],s1);var eV=function(t,n,e,r){function i(a){return a instanceof e?a:new e(function(o){o(a)})}return new(e||(e=Promise))(function(a,o){function s(u){try{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?a(u.value):i(u.value).then(s,l)}c((r=r.apply(t,n||[])).next())})};function nV(t){var n;let e=t;for(;e;){if(((n=e.attributes)===null||n===void 0?void 0:n.class)==="view")return e;e=e.parentNode}return null}function Zv(t){const{markType:n,nodeName:e}=t;return n==="heatmap"&&e==="image"}function ix(t,n){const e=n??nV(t).__data__,r=t.__data__,{markKey:i,index:a,seriesIndex:o,normalized:s={x:0}}=r,{markState:l}=e,c=Array.from(l.keys()).find(u=>u.key===i);if(c)return o?o.map(u=>c.data[u]):Zv(t)?c.data[Math.round(c.data.length*s.x)]:c.data[a]}function rV(t,n){var e,r,i,a;const o=(e=n.markKey)!==null&&e!==void 0?e:(i=(r=n.element)===null||r===void 0?void 0:r.__data__)===null||i===void 0?void 0:i.markKey,s=Object.keys(t).find(l=>{if(l.startsWith("series")){const c=t[l].getOptions();return c.name==="series"&&c.markKey===o}});return(a=t[s])!==null&&a!==void 0?a:t.series}function iV(t,n){const{color:e,facet:r=!1}=t,{color:i,series:a}=n,o=rV(t,n),s=l=>l&&l.invert&&!(l instanceof sf)&&!(l instanceof nx);if(s(o))return o.clone().invert(a);if(a&&o instanceof sf&&o.invert(a)!==i&&!r)return o.invert(a);if(s(e)){const l=e.invert(i);return Array.isArray(l)?null:l}return null}function Ws(t){return t}function ax(t){return t.reduce((n,e)=>(r,...i)=>e(n(r,...i),...i),Ws)}function aV(t){return t.reduce((n,e)=>r=>eV(this,void 0,void 0,function*(){const i=yield n(r);return e(i)}),Ws)}function ox(t){return t.replace(/( |^)[a-z]/g,n=>n.toUpperCase())}function rc(t=""){throw new Error(t)}function Qv(t,n){const{attributes:e}=n,r=new Set(["id","className"]);for(const[i,a]of Object.entries(e))r.has(i)||t.attr(i,a)}function Xe(t){return t!=null&&!Number.isNaN(t)}function oV(t){const n=new Map;return e=>{if(n.has(e))return n.get(e);const r=t(e);return n.set(e,r),r}}function sV(t,n){const{transform:e}=t.style,i=(a=>a==="none"||a===void 0)(e)?"":e;t.style.transform=`${i} ${n}`.trimStart()}function bt(t,n){return QC(t,n)||{}}function QC(t,n){const e=Object.entries(t||{}).filter(([r])=>r.startsWith(n)).map(([r,i])=>[FP(r.replace(n,"").trim()),i]).filter(([r])=>!!r);return e.length===0?null:Object.fromEntries(e)}function lV(t,n){return Object.fromEntries(Object.entries(t).filter(([e])=>n.find(r=>e.startsWith(r))))}function np(t,...n){return Object.fromEntries(Object.entries(t).filter(([e])=>n.every(r=>!e.startsWith(r))))}function sE(t,n){if(t===void 0)return null;if(typeof t=="number")return t;const e=+t.replace("%","");return Number.isNaN(e)?null:e/100*n}function ic(t){return typeof t=="object"&&!(t instanceof Date)&&t!==null&&!Array.isArray(t)}function eo(t){return t===null||t===!1}function JC(t,n,e=5,r=0){if(!(r>=e)){for(const i of Object.keys(n)){const a=n[i];!Ja(a)||!Ja(t[i])?t[i]=a:JC(t[i],a,e,r+1)}return t}}function wa(t,n){return Object.entries(t).reduce((e,[r,i])=>(e[r]=n(i,r,t),e),{})}function Qs(t){return t.map((n,e)=>e)}function cV(t){return t[0]}function t3(t){return t[t.length-1]}function uV(t){return Array.from(new Set(t))}function e3(t,n){const e=[[],[]];return t.forEach(r=>{e[n(r)?0:1].push(r)}),e}function n3(t,n=t.length){if(n===1)return t.map(r=>[r]);const e=[];for(let r=0;r<t.length;r++){const i=t.slice(r+1);n3(i,n-1).forEach(o=>{e.push([t[r],...o])})}return e}function fV(t){if(t.length===1)return[t];const n=[];for(let e=1;e<=t.length;e++)n.push(...n3(t,e));return n}function Vo(t,n,e){const{encode:r}=e;if(t===null)return[n];const i=dV(t).map(o=>{var s;return[o,(s=be(r,o))===null||s===void 0?void 0:s[0]]}).filter(([,o])=>Xe(o));return Array.from(Ue(n,o=>i.map(([,s])=>s[o]).join("-")).values())}function r3(t){return Array.isArray(t)?vV(t):typeof t=="function"?pV(t):t==="series"?hV:t==="value"?gV:t==="sum"?yV:t==="maxIndex"?mV:null}function i3(t,n){for(const e of t)e.sort(n)}function a3(t,n){return(n==null?void 0:n.domain)||Array.from(new Set(t))}function dV(t){return Array.isArray(t)?t:[t]}function hV(t,n,e){return Gf(r=>e[r])}function pV(t){return(n,e,r)=>Gf(i=>t(n[i]))}function vV(t){return(n,e,r)=>(i,a)=>t.reduce((o,s)=>o!==0?o:_n(n[i][s],n[a][s]),0)}function gV(t,n,e){return Gf(r=>n[r])}function yV(t,n,e){const r=Qs(t),i=Array.from(Ue(r,o=>e[+o]).entries()),a=new Map(i.map(([o,s])=>[o,s.reduce((l,c)=>l+ +n[c])]));return Gf(o=>a.get(e[o]))}function mV(t,n,e){const r=Qs(t),i=Array.from(Ue(r,o=>e[+o]).entries()),a=new Map(i.map(([o,s])=>[o,_c(s,l=>n[l])]));return Gf(o=>a.get(e[o]))}function Gf(t){return(n,e)=>_n(t(n),t(e))}const o3=(t={})=>{const{groupBy:n="x",orderBy:e=null,reverse:r=!1,y:i="y",y1:a="y1",series:o=!0}=t;return(s,l)=>{var c;const{data:u,encode:f,style:d={}}=l,[h,p]=be(f,"y"),[g,y]=be(f,"y1"),[m]=o?Tp(f,"series","color"):be(f,"color"),x=Vo(n,s,l),w=((c=r3(e))!==null&&c!==void 0?c:(()=>null))(u,h,m);w&&i3(x,w);const O=new Array(s.length),S=new Array(s.length),E=new Array(s.length),M=[],A=[];for(const D of x){r&&D.reverse();const F=g?+g[D[0]]:0,j=[],I=[];for(const q of D){const J=E[q]=+h[q]-F;J<0?I.push(q):J>=0&&j.push(q)}const $=j.length>0?j:I,z=I.length>0?I:j;let Y=j.length-1,H=0;for(;Y>0&&h[$[Y]]===0;)Y--;for(;H<z.length-1&&h[z[H]]===0;)H++;M.push($[Y]),A.push(z[H]);let V=F;for(const q of I.reverse()){const J=E[q];V=O[q]=(S[q]=V)+J}let Z=F;for(const q of j){const J=E[q];J>0?Z=O[q]=(S[q]=Z)+J:O[q]=S[q]=Z}}const T=new Set(M),P=new Set(A),N=i==="y"?O:S,C=a==="y"?O:S;let R;return l.type==="point"?R={y0:Ju(h,p),y:Ve(N,p)}:R={y0:Ju(h,p),y:Ve(N,p),y1:Ve(C,y)},[s,at({},l,{encode:Object.assign({},R),style:Object.assign({first:(D,F)=>T.has(F),last:(D,F)=>P.has(F)},d)})]}};o3.props={};function ru(t){return Math.abs(t)>10?String(t):t.toString().padStart(2,"0")}function bV(t){const n=t.getFullYear(),e=ru(t.getMonth()+1),r=ru(t.getDate()),i=`${n}-${e}-${r}`,a=t.getHours(),o=t.getMinutes(),s=t.getSeconds();return a||o||s?`${i} ${ru(a)}:${ru(o)}:${ru(s)}`:i}const Jv=(t={})=>{const{channel:n="x"}=t;return(e,r)=>{const{encode:i}=r,{tooltip:a}=r;if(eo(a))return[e,r];const{title:o}=a;if(o!==void 0)return[e,r];const s=Object.keys(i).filter(c=>c.startsWith(n)).filter(c=>!i[c].inferred).map(c=>be(i,c)).filter(([c])=>c).map(c=>c[0]);if(s.length===0)return[e,r];const l=[];for(const c of e)l[c]={value:s.map(u=>u[c]instanceof Date?bV(u[c]):u[c]).join(", ")};return[e,at({},r,{tooltip:{title:l}})]}};Jv.props={};const Xo=()=>(t,n)=>{const{encode:e}=n,{x:r}=e;return r!==void 0?[t,n]:[t,at({},n,{encode:{x:Ju(Do(t,0))},scale:{x:{guide:null}}})]};Xo.props={};const Yf=()=>(t,n)=>{const{encode:e}=n,{y:r}=e;return r!==void 0?[t,n]:[t,at({},n,{encode:{y:Ju(Do(t,0))},scale:{y:{guide:null}}})]};Yf.props={};const sx=()=>(t,n)=>{const{encode:e}=n,{size:r}=e;return r!==void 0?[t,n]:[t,at({},n,{encode:{size:Ap(Do(t,3))}})]};sx.props={};var xV=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};const s3=()=>(t,n)=>{const{encode:e}=n,{key:r}=e,i=xV(e,["key"]);if(r!==void 0)return[t,n];const a=Object.values(i).map(({value:s})=>s),o=t.map(s=>a.filter(Array.isArray).map(l=>l[s]).join("-"));return[t,at({},n,{encode:{key:Ve(o)}})]};s3.props={};const lx=()=>(t,n)=>{const{encode:e}=n,{series:r,color:i}=e;if(r!==void 0||i===void 0)return[t,n];const[a,o]=be(e,"color");return[t,at({},n,{encode:{series:Ve(a,o)}})]};lx.props={};const l3=()=>(t,n)=>{const{data:e}=n;return!Array.isArray(e)||e.some(jf)?[t,n]:[t,at({},n,{encode:{y:Ve(e)}})]};l3.props={};const c3=()=>(t,n)=>{const{data:e}=n;return!Array.isArray(e)||e.some(jf)?[t,n]:[t,at({},n,{encode:{x:Ve(e)}})]};c3.props={};const u3=()=>(t,n)=>{const{encode:e}=n,{y1:r}=e;if(r)return[t,n];const[i]=be(e,"y");return[t,at({},n,{encode:{y1:Ve([...i])}})]};u3.props={};const f3=()=>(t,n)=>{const{encode:e}=n,{x1:r}=e;if(r)return[t,n];const[i]=be(e,"x");return[t,at({},n,{encode:{x1:Ve([...i])}})]};f3.props={};const d3=()=>(t,n)=>{const{data:e}=n;if(Array.isArray(e)&&(e.every(Array.isArray)||!e.some(jf))){const r=(i,a)=>Array.isArray(i[0])?i.map(o=>o[a]):[i[a]];return[t,at({},n,{encode:{x:Ve(r(e,0)),x1:Ve(r(e,1))}})]}return[t,n]};d3.props={};const h3=()=>(t,n)=>{const{data:e}=n;if(Array.isArray(e)&&(e.every(Array.isArray)||!e.some(jf))){const r=(i,a)=>Array.isArray(i[0])?i.map(o=>o[a]):[i[a]];return[t,at({},n,{encode:{y:Ve(r(e,0)),y1:Ve(r(e,1))}})]}return[t,n]};h3.props={};const t0=t=>{const{channel:n}=t;return(e,r)=>{const{encode:i,tooltip:a}=r;if(eo(a))return[e,r];const{items:o=[]}=a;if(!o||o.length>0)return[e,r];const l=(Array.isArray(n)?n:[n]).flatMap(c=>Object.keys(i).filter(u=>u.startsWith(c)).map(u=>{const{field:f,value:d,inferred:h=!1,aggregate:p}=i[u];return h?null:p&&d?{channel:u}:f?{field:f}:d?{channel:u}:null}).filter(u=>u!==null));return[e,at({},r,{tooltip:{items:l}})]}};t0.props={};const cx=()=>(t,n)=>[t,at({scale:{x:{padding:0},y:{padding:0}}},n)];cx.props={};var lE=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};const e0=()=>(t,n)=>{const{data:e,style:r={}}=n,i=lE(n,["data","style"]),{x:a,y:o}=r,s=lE(r,["x","y"]);if(a==null||o==null)return[t,n];const l=a||0,c=o||0;return[[0],at({},i,{data:[0],cartesian:!0,encode:{x:Ve([l]),y:Ve([c])},scale:{x:{type:"identity",independent:!0,guide:null},y:{type:"identity",independent:!0,guide:null}},style:s})]};e0.props={};const p3=()=>(t,n)=>{const{style:e={}}=n;return[t,at({},n,{style:Object.assign(Object.assign({},e),Object.fromEntries(Object.entries(e).filter(([,r])=>typeof r=="function").map(([r,i])=>[r,()=>i])))})]};p3.props={};const n0=()=>(t,n)=>{const{data:e}=n;if(!Array.isArray(e)||e.some(jf))return[t,n];const r=Array.isArray(e[0])?e:[e],i=r.map(o=>o[0]),a=r.map(o=>o[1]);return[t,at({},n,{encode:{x:Ve(i),y:Ve(a)}})]};n0.props={};const v3=()=>(t,n)=>{const{style:e={},encode:r}=n,{series:i}=r,{gradient:a}=e;return!a||i?[t,n]:[t,at({},n,{encode:{series:Ap(Do(t,void 0))}})]};v3.props={};var _V=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};const g3=(t={})=>{const{groupBy:n="x",reverse:e=!1,orderBy:r,padding:i}=t;return _V(t,["groupBy","reverse","orderBy","padding"]),(a,o)=>{const{data:s,encode:l,scale:c}=o,{series:u}=c,[f]=be(l,"y"),[d]=Tp(l,"series","color"),h=a3(d,u),p=at({},o,{scale:{series:{domain:h,paddingInner:i}}}),g=Vo(n,a,o),y=r3(r);if(!y)return[a,at(p,{encode:{series:Ve(d)}})];const m=y(s,f,d);m&&i3(g,m);const x=new Array(a.length);for(const _ of g){e&&_.reverse();for(let w=0;w<_.length;w++)x[_[w]]=h[w]}return[a,at(p,{encode:{series:Ve(r?x:d)}})]}};g3.props={};const y3=t=>{const{groupBy:n=["x"],reducer:e=(o,s)=>s[o[0]],orderBy:r=null,reverse:i=!1,duration:a}=t;return(o,s)=>{const{encode:l}=s,u=(Array.isArray(n)?n:[n]).map(y=>[y,be(l,y)[0]]);if(u.length===0)return[o,s];let f=[o];for(const[,y]of u){const m=[];for(const x of f){const _=Array.from(Ue(x,w=>y[w]).values());m.push(..._)}f=m}if(r){const[y]=be(l,r);y&&f.sort((m,x)=>e(m,y)-e(x,y)),i&&f.reverse()}const d=(a||3e3)/f.length,[h]=a?[Do(o,d)]:Tp(l,"enterDuration",Do(o,d)),[p]=Tp(l,"enterDelay",Do(o,0)),g=new Array(o.length);for(let y=0,m=0;y<f.length;y++){const x=f[y],_=Re(x,w=>+h[w]);for(const w of x)g[w]=+p[w]+m;m+=_}return[o,at({},s,{encode:{enterDuration:Ap(h),enterDelay:Ap(g)}})]}};y3.props={};var wV=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};function OV(t){return typeof t=="function"?t:{min:(e,r)=>ti(e,i=>r[+i]),max:(e,r)=>Re(e,i=>r[+i]),first:(e,r)=>r[e[0]],last:(e,r)=>r[e[e.length-1]],mean:(e,r)=>nf(e,i=>r[+i]),median:(e,r)=>Zb(e,i=>r[+i]),sum:(e,r)=>Oi(e,i=>r[+i]),deviation:(e,r)=>bC(e,i=>r[+i])}[t]||Re}const m3=(t={})=>{const{groupBy:n="x",basis:e="max"}=t;return(r,i)=>{const{encode:a,tooltip:o}=i,{x:s}=a,l=wV(a,["x"]),c=Object.entries(l).filter(([g])=>g.startsWith("y")).map(([g])=>[g,be(a,g)[0]]),[,u]=c.find(([g])=>g==="y"),f=c.map(([g])=>[g,new Array(r.length)]),d=Vo(n,r,i),h=OV(e);for(const g of d){const y=h(g,u);for(const m of g)for(let x=0;x<c.length;x++){const[,_]=c[x],[,w]=f[x];w[m]=+_[m]/y}}const p=eo(o)||(o==null?void 0:o.items)&&(o==null?void 0:o.items.length)!==0;return[r,at({},i,Object.assign({encode:Object.fromEntries(f.map(([g,y])=>[g,Ve(y,be(a,g)[1])]))},!p&&a.y0&&{tooltip:{items:[{channel:"y0"}]}}))]}};m3.props={};function Np(t,n,e){if(t===null)return[-.5,.5];const r=a3(t,n),a=new sf({domain:r,range:[0,1],padding:e}).getBandWidth();return[-a/2,a/2]}function Rp(t,n,e){return n*(1-t)+e*t}const b3=(t={})=>{const{padding:n=0,paddingX:e=n,paddingY:r=n,random:i=Math.random}=t;return(a,o)=>{const{encode:s,scale:l}=o,{x:c,y:u}=l,[f]=be(s,"x"),[d]=be(s,"y"),h=Np(f,c,e),p=Np(d,u,r),g=a.map(()=>Rp(i(),...p)),y=a.map(()=>Rp(i(),...h));return[a,at({scale:{x:{padding:.5},y:{padding:.5}}},o,{encode:{dy:Ve(g),dx:Ve(y)}})]}};b3.props={};const x3=(t={})=>{const{padding:n=0,random:e=Math.random}=t;return(r,i)=>{const{encode:a,scale:o}=i,{x:s}=o,[l]=be(a,"x"),c=Np(l,s,n),u=r.map(()=>Rp(e(),...c));return[r,at({scale:{x:{padding:.5}}},i,{encode:{dx:Ve(u)}})]}};x3.props={};const _3=(t={})=>{const{padding:n=0,random:e=Math.random}=t;return(r,i)=>{const{encode:a,scale:o}=i,{y:s}=o,[l]=be(a,"y"),c=Np(l,s,n),u=r.map(()=>Rp(e(),...c));return[r,at({scale:{y:{padding:.5}}},i,{encode:{dy:Ve(u)}})]}};_3.props={};var SV=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};const w3=(t={})=>{const{groupBy:n="x"}=t;return(e,r)=>{const{encode:i,style:a={}}=r,{x:o}=i,s=SV(i,["x"]),l=Object.entries(s).filter(([h])=>h.startsWith("y")).map(([h])=>[h,be(i,h)[0]]),c=l.map(([h])=>[h,new Array(e.length)]),u=Vo(n,e,r),f=new Array(u.length);for(let h=0;h<u.length;h++){const g=u[h].flatMap(x=>l.map(([,_])=>+_[x])),[y,m]=qa(g);f[h]=(y+m)/2}const d=Math.max(...f);for(let h=0;h<u.length;h++){const p=d-f[h],g=u[h];for(const y of g)for(let m=0;m<l.length;m++){const[,x]=l[m],[,_]=c[m];_[y]=+x[y]+p}}return[e,at({},r,{encode:Object.fromEntries(c.map(([h,p])=>[h,Ve(p,be(i,h)[1])])),style:Object.assign({first:(h,p)=>p===0,last:(h,p)=>p===u.length-1},a)})]}};w3.props={};const O3=(t={})=>{const{groupBy:n="x"}=t;return(e,r)=>{const{encode:i}=r,[a]=be(i,"y"),[o,s]=be(i,"y1"),l=Vo(n,e,r),c=new Array(e.length);for(const u of l){const f=u.map(d=>+a[d]);for(let d=0;d<u.length;d++){const h=u[d],p=Math.max(...f.filter((g,y)=>y!==d));c[h]=+a[h]>p?p:a[h]}}return[e,at({},r,{encode:{y1:Ve(c,s)}})]}};O3.props={};function cE(t,n){return[t[0]]}function EV(t,n){const e=t.length-1;return[t[e]]}function kV(t,n){const e=_c(t,r=>n[r]);return[t[e]]}function MV(t,n){const e=Bf(t,r=>n[r]);return[t[e]]}function AV(t){return typeof t=="function"?t:{first:cE,last:EV,max:kV,min:MV}[t]||cE}const r0=(t={})=>{const{groupBy:n="series",channel:e,selector:r}=t;return(i,a)=>{const{encode:o}=a,s=Vo(n,i,a),[l]=be(o,e),c=AV(r);return[s.flatMap(u=>c(u,l)),a]}};r0.props={};var TV=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};const S3=(t={})=>{const{selector:n}=t,e=TV(t,["selector"]);return r0(Object.assign({channel:"x",selector:n},e))};S3.props={};var PV=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};const E3=(t={})=>{const{selector:n}=t,e=PV(t,["selector"]);return r0(Object.assign({channel:"y",selector:n},e))};E3.props={};var CV=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};function qo(t){return n=>n===null?t:`${t} of ${n}`}function LV(t){if(typeof t=="function")return[t,null];const e={mean:NV,max:IV,count:$V,first:FV,last:BV,sum:jV,min:DV,median:RV}[t];if(!e)throw new Error(`Unknown reducer: ${t}.`);return e()}function NV(){const t=(e,r)=>nf(e,i=>+r[i]),n=qo("mean");return[t,n]}function RV(){const t=(e,r)=>Zb(e,i=>+r[i]),n=qo("median");return[t,n]}function IV(){const t=(e,r)=>Re(e,i=>+r[i]),n=qo("max");return[t,n]}function DV(){const t=(e,r)=>ti(e,i=>+r[i]),n=qo("min");return[t,n]}function $V(){const t=(e,r)=>e.length,n=qo("count");return[t,n]}function jV(){const t=(e,r)=>Oi(e,i=>+r[i]),n=qo("sum");return[t,n]}function FV(){const t=(e,r)=>r[e[0]],n=qo("first");return[t,n]}function BV(){const t=(e,r)=>r[e[e.length-1]],n=qo("last");return[t,n]}const ux=(t={})=>{const{groupBy:n}=t,e=CV(t,["groupBy"]);return(r,i)=>{const{data:a,encode:o}=i,s=n(r,i);if(!s)return[r,i];const l=(h,p)=>{if(h)return h;const{from:g}=p;if(!g)return h;const[,y]=be(o,g);return y},c=Object.entries(e).map(([h,p])=>{const[g,y]=LV(p),[m,x]=be(o,h),_=l(x,p),w=s.map(O=>g(O,m??a));return[h,Object.assign(Object.assign({},lH(w,(y==null?void 0:y(_))||_)),{aggregate:!0})]}),u=Object.keys(o).map(h=>{const[p,g]=be(o,h),y=s.map(m=>p[m[0]]);return[h,Ve(y,g)]}),f=s.map(h=>a[h[0]]);return[Qs(s),at({},i,{data:f,encode:Object.fromEntries([...u,...c])})]}};ux.props={};var zV=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};const Hf=(t={})=>{const{channels:n=["x","y"]}=t,e=zV(t,["channels"]),r=(i,a)=>Vo(n,i,a);return ux(Object.assign(Object.assign({},e),{groupBy:r}))};Hf.props={};const k3=(t={})=>Hf(Object.assign(Object.assign({},t),{channels:["x","color","series"]}));k3.props={};const M3=(t={})=>Hf(Object.assign(Object.assign({},t),{channels:["y","color","series"]}));M3.props={};const A3=(t={})=>Hf(Object.assign(Object.assign({},t),{channels:["color"]}));A3.props={};function WV(t,n,e){const{by:r=t,reducer:i="max"}=n,[a]=be(e,r);if(typeof i=="function")return o=>i(o,a);if(i==="max")return o=>Re(o,s=>+a[s]);if(i==="min")return o=>ti(o,s=>+a[s]);if(i==="sum")return o=>Oi(o,s=>+a[s]);if(i==="median")return o=>Zb(o,s=>+a[s]);if(i==="mean")return o=>nf(o,s=>+a[s]);if(i==="first")return o=>a[o[0]];if(i==="last")return o=>a[o[o.length-1]];throw new Error(`Unknown reducer: ${i}`)}function GV(t,n,e){if(!Array.isArray(e))return t;const r=new Set(e);return t.filter(i=>r.has(n[i]))}const i0=(t={})=>(n,e)=>{const{reverse:r,slice:i,channel:a,by:o,ordinal:s=!0,reducer:l}=t,{encode:c,scale:u={}}=e,f=u[a].domain,[d]=be(c,o??a),[h]=be(c,a),p=WV(a,{by:o,reducer:l},c),g=GV(n,h,f),y=_H(g,p,w=>h[w]),m=s?n:Hi(n,w=>d[w]);r&&(!s&&m.reverse(),y.reverse());const x=typeof i=="number"?[0,i]:i,_=i?y.slice(...x):y;return[m,at(e,{scale:{[a]:{domain:_}}})]};i0.props={};const T3=(t={})=>i0(Object.assign(Object.assign({},t),{channel:"x"}));T3.props={};const P3=(t={})=>i0(Object.assign(Object.assign({},t),{channel:"color"}));P3.props={};const C3=(t={})=>i0(Object.assign(Object.assign({},t),{channel:"y"}));C3.props={};function YV(t,n){return typeof n=="string"?t.map(e=>e[n]):t.map(n)}function HV(t,n){if(typeof t=="function")return e=>t(e,n);if(t==="sum")return e=>Oi(e,r=>+n[r]);throw new Error(`Unknown reducer: ${t}`)}const L3=(t={})=>{const{field:n,channel:e="y",reducer:r="sum"}=t;return(i,a)=>{const{data:o,encode:s}=a,[l]=be(s,"x"),c=n?YV(o,n):be(s,e)[0],u=HV(r,c),f=qb(i,u,d=>l[d]).map(d=>d[1]);return[i,at({},a,{scale:{x:{flex:f}}})]}};L3.props={};function On([t,n],[e,r]){return[t-e,n-r]}function th([t,n],[e,r]){return[t+e,n+r]}function vn([t,n],[e,r]){return Math.sqrt(Math.pow(t-e,2)+Math.pow(n-r,2))}function Ei([t,n]){return Math.atan2(n,t)}function ac([t,n]){return Ei([t,n])+Math.PI/2}function N3(t,n){const e=Ei(t),r=Ei(n);return e<r?r-e:Math.PI*2-(e-r)}function fx(t){let n=1/0,e=-1/0,r=1/0,i=-1/0;for(const[s,l]of t)n=Math.min(s,n),e=Math.max(s,e),r=Math.min(l,r),i=Math.max(l,i);const a=e-n,o=i-r;return[n,r,a,o]}function R3([t,n],[e,r]){return[(t+e)/2,(n+r)/2]}function UV(t){const{padding:n=0,direction:e="col"}=t;return(r,i,a)=>{const o=r.length;if(o===0)return[];const{innerWidth:s,innerHeight:l}=a,c=l/s;let u=Math.ceil(Math.sqrt(i/c)),f=s/u,d=Math.ceil(i/u),h=d*f;for(;h>l;)u=u+1,f=s/u,d=Math.ceil(i/u),h=d*f;const p=l-d*f,g=d<=1?0:p/(d-1),[y,m]=d<=1?[(s-o*f)/(o-1),(l-f)/2]:[0,0];return r.map((x,_)=>{const[w,O,S,E]=fx(x),M=e==="col"?_%u:Math.floor(_/d),A=e==="col"?Math.floor(_/u):_%d,T=M*f,P=(d-A-1)*f+p,N=(f-n)/S,C=(f-n)/E,R=T-w+y*M+1/2*n,D=P-O-g*A-m+1/2*n;return`translate(${R}, ${D}) scale(${N}, ${C})`})}}const I3=t=>(n,e)=>[n,at({},e,{modifier:UV(t),axis:!1})];I3.props={};var VV=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};const uE="thresholds";function XV(t){const[n,e]=qa(t);return Math.min(200,NH(t,n,e))}const dx=(t={})=>{const{groupChannels:n=["color"],binChannels:e=["x","y"]}=t,r=VV(t,["groupChannels","binChannels"]),i={},a=(o,s)=>{const{encode:l}=s,c=e.map(p=>{const[g]=be(l,p);return g}),u=bt(r,uE),f=o.filter(p=>c.every(g=>Xe(g[p]))),d=[...n.map(p=>{const[g]=be(l,p);return g}).filter(Xe).map(p=>g=>p[g]),...e.map((p,g)=>{const y=c[g],m=u[p]||XV(y),x=PH().thresholds(m).value(w=>+y[w])(f),_=new Map(x.flatMap(w=>{const{x0:O,x1:S}=w,E=`${O},${S}`;return w.map(M=>[M,E])}));return i[p]=_,w=>_.get(w)})];return Array.from(Ue(f,p=>d.map(g=>g(p)).join("-")).values())};return ux(Object.assign(Object.assign(Object.assign({},Object.fromEntries(Object.entries(r).filter(([o])=>!o.startsWith(uE)))),Object.fromEntries(e.flatMap(o=>{const s=([c])=>+i[o].get(c).split(",")[0],l=([c])=>+i[o].get(c).split(",")[1];return l.from=o,[[o,s],[`${o}1`,l]]}))),{groupBy:a}))};dx.props={};const D3=(t={})=>{const{thresholds:n}=t;return dx(Object.assign(Object.assign({},t),{thresholdsX:n,groupChannels:["color"],binChannels:["x"]}))};D3.props={};function qV(t,n,e,r){const i=t.length;if(r>=i||r===0)return t;const a=h=>n[t[h]]*1,o=h=>e[t[h]]*1,s=[],l=(i-2)/(r-2);let c=0,u,f,d;s.push(c);for(let h=0;h<r-2;h++){let p=0,g=0,y=Math.floor((h+1)*l)+1,m=Math.floor((h+2)*l)+1;m=Math.min(m,i);const x=m-y;for(;y<m;y++)p+=a(y),g+=o(y);p/=x,g/=x;let _=Math.floor((h+0)*l)+1;const w=Math.floor((h+1)*l)+1,O=[a(c),o(c)];for(u=f=-1;_<w;_++)f=Math.abs((O[0]-p)*(a(_)-O[1])-(O[0]-o(_))*(g-O[0]))*.5,f>u&&(u=f,d=_);s.push(d),c=d}return s.push(i-1),s.map(h=>t[h])}function KV(t){if(typeof t=="function")return t;if(t==="lttb")return qV;const n={first:r=>[r[0]],last:r=>[r[r.length-1]],min:(r,i,a)=>[r[Bf(r,o=>a[o])]],max:(r,i,a)=>[r[_c(r,o=>a[o])]],median:(r,i,a)=>[r[RH(r,o=>a[o])]]},e=n[t]||n.median;return(r,i,a,o)=>{const s=Math.max(1,Math.floor(r.length/o));return ZV(r,s).flatMap(c=>e(c,i,a))}}function ZV(t,n){const e=t.length,r=[];let i=0;for(;i<e;)r.push(t.slice(i,i+=n));return r}const $3=(t={})=>{const{strategy:n="median",thresholds:e=2e3,groupBy:r=["series","color"]}=t,i=KV(n);return(a,o)=>{const{encode:s}=o,l=Vo(r,a,o),[c]=be(s,"x"),[u]=be(s,"y");return[l.flatMap(f=>i(f,c,u,e)),o]}};$3.props={};function QV(t){return typeof t=="object"?[t.value,t.ordinal]:[t,!0]}function JV(t){var n;const{encode:e}=t,r=Object.assign(Object.assign({},t),{encode:Object.assign(Object.assign({},t.encode),{y:Object.assign(Object.assign({},t.encode.y),{value:[]})})}),i=(n=e==null?void 0:e.color)===null||n===void 0?void 0:n.field;if(!e||!i)return r;let a;for(const[o,s]of Object.entries(e))(o==="x"||o==="y")&&s.field===i&&(a=Object.assign(Object.assign({},a),{[o]:Object.assign(Object.assign({},s),{value:[]})}));return a?Object.assign(Object.assign({},t),{encode:Object.assign(Object.assign({},t.encode),a)}):r}const j3=(t={})=>(n,e)=>{const{encode:r,data:i}=e,a=Object.keys(t).length>0,o=Object.entries(t).map(([f,d])=>{const[h]=be(r,f);if(!h)return null;const[p,g=!0]=QV(d);if(typeof p=="function")return y=>p(h[y]);if(g){const y=Array.isArray(p)?p:[p];return y.length===0?null:m=>y.includes(h[m])}else{const[y,m]=p;return x=>h[x]>=y&&h[x]<=m}}).filter(Xe),s=f=>o.every(d=>d(f)),l=n.filter(s),c=l.map((f,d)=>d);if(o.length===0&&a){const f=JV(e);return[[],f]}const u=Object.entries(r).map(([f,d])=>[f,Object.assign(Object.assign({},d),{value:c.map(h=>d.value[l[h]]).filter(h=>h!==void 0)})]);return[c,at({},e,{encode:Object.fromEntries(u),data:l.map(f=>i[f])})]};j3.props={};function sn(t){return function(){return t}}const fE=Math.abs,hr=Math.atan2,ds=Math.cos,tX=Math.max,My=Math.min,ta=Math.sin,Nl=Math.sqrt,pr=1e-12,lf=Math.PI,Ip=lf/2,eX=2*lf;function nX(t){return t>1?0:t<-1?lf:Math.acos(t)}function dE(t){return t>=1?Ip:t<=-1?-Ip:Math.asin(t)}const l1=Math.PI,c1=2*l1,Os=1e-6,rX=c1-Os;function F3(t){this._+=t[0];for(let n=1,e=t.length;n<e;++n)this._+=arguments[n]+t[n]}function iX(t){let n=Math.floor(t);if(!(n>=0))throw new Error(`invalid digits: ${t}`);if(n>15)return F3;const e=10**n;return function(r){this._+=r[0];for(let i=1,a=r.length;i<a;++i)this._+=Math.round(arguments[i]*e)/e+r[i]}}let hx=class{constructor(n){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=n==null?F3:iX(n)}moveTo(n,e){this._append`M${this._x0=this._x1=+n},${this._y0=this._y1=+e}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(n,e){this._append`L${this._x1=+n},${this._y1=+e}`}quadraticCurveTo(n,e,r,i){this._append`Q${+n},${+e},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(n,e,r,i,a,o){this._append`C${+n},${+e},${+r},${+i},${this._x1=+a},${this._y1=+o}`}arcTo(n,e,r,i,a){if(n=+n,e=+e,r=+r,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let o=this._x1,s=this._y1,l=r-n,c=i-e,u=o-n,f=s-e,d=u*u+f*f;if(this._x1===null)this._append`M${this._x1=n},${this._y1=e}`;else if(d>Os)if(!(Math.abs(f*l-c*u)>Os)||!a)this._append`L${this._x1=n},${this._y1=e}`;else{let h=r-o,p=i-s,g=l*l+c*c,y=h*h+p*p,m=Math.sqrt(g),x=Math.sqrt(d),_=a*Math.tan((l1-Math.acos((g+d-y)/(2*m*x)))/2),w=_/x,O=_/m;Math.abs(w-1)>Os&&this._append`L${n+w*u},${e+w*f}`,this._append`A${a},${a},0,0,${+(f*h>u*p)},${this._x1=n+O*l},${this._y1=e+O*c}`}}arc(n,e,r,i,a,o){if(n=+n,e=+e,r=+r,o=!!o,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(i),l=r*Math.sin(i),c=n+s,u=e+l,f=1^o,d=o?i-a:a-i;this._x1===null?this._append`M${c},${u}`:(Math.abs(this._x1-c)>Os||Math.abs(this._y1-u)>Os)&&this._append`L${c},${u}`,r&&(d<0&&(d=d%c1+c1),d>rX?this._append`A${r},${r},0,1,${f},${n-s},${e-l}A${r},${r},0,1,${f},${this._x1=c},${this._y1=u}`:d>Os&&this._append`A${r},${r},0,${+(d>=l1)},${f},${this._x1=n+r*Math.cos(a)},${this._y1=e+r*Math.sin(a)}`)}rect(n,e,r,i){this._append`M${this._x0=this._x1=+n},${this._y0=this._y1=+e}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}};function Ai(){return new hx}Ai.prototype=hx.prototype;function px(t){let n=3;return t.digits=function(e){if(!arguments.length)return n;if(e==null)n=null;else{const r=Math.floor(e);if(!(r>=0))throw new RangeError(`invalid digits: ${e}`);n=r}return t},()=>new hx(n)}function aX(t){return t.innerRadius}function oX(t){return t.outerRadius}function sX(t){return t.startAngle}function lX(t){return t.endAngle}function cX(t){return t&&t.padAngle}function uX(t,n,e,r,i,a,o,s){var l=e-t,c=r-n,u=o-i,f=s-a,d=f*l-u*c;if(!(d*d<pr))return d=(u*(n-a)-f*(t-i))/d,[t+d*l,n+d*c]}function eh(t,n,e,r,i,a,o){var s=t-e,l=n-r,c=(o?a:-a)/Nl(s*s+l*l),u=c*l,f=-c*s,d=t+u,h=n+f,p=e+u,g=r+f,y=(d+p)/2,m=(h+g)/2,x=p-d,_=g-h,w=x*x+_*_,O=i-a,S=d*g-p*h,E=(_<0?-1:1)*Nl(tX(0,O*O*w-S*S)),M=(S*_-x*E)/w,A=(-S*x-_*E)/w,T=(S*_+x*E)/w,P=(-S*x+_*E)/w,N=M-y,C=A-m,R=T-y,D=P-m;return N*N+C*C>R*R+D*D&&(M=T,A=P),{cx:M,cy:A,x01:-u,y01:-f,x11:M*(i/O-1),y11:A*(i/O-1)}}function vx(){var t=aX,n=oX,e=sn(0),r=null,i=sX,a=lX,o=cX,s=null,l=px(c);function c(){var u,f,d=+t.apply(this,arguments),h=+n.apply(this,arguments),p=i.apply(this,arguments)-Ip,g=a.apply(this,arguments)-Ip,y=fE(g-p),m=g>p;if(s||(s=u=l()),h<d&&(f=h,h=d,d=f),!(h>pr))s.moveTo(0,0);else if(y>eX-pr)s.moveTo(h*ds(p),h*ta(p)),s.arc(0,0,h,p,g,!m),d>pr&&(s.moveTo(d*ds(g),d*ta(g)),s.arc(0,0,d,g,p,m));else{var x=p,_=g,w=p,O=g,S=y,E=y,M=o.apply(this,arguments)/2,A=M>pr&&(r?+r.apply(this,arguments):Nl(d*d+h*h)),T=My(fE(h-d)/2,+e.apply(this,arguments)),P=T,N=T,C,R;if(A>pr){var D=dE(A/d*ta(M)),F=dE(A/h*ta(M));(S-=D*2)>pr?(D*=m?1:-1,w+=D,O-=D):(S=0,w=O=(p+g)/2),(E-=F*2)>pr?(F*=m?1:-1,x+=F,_-=F):(E=0,x=_=(p+g)/2)}var j=h*ds(x),I=h*ta(x),$=d*ds(O),z=d*ta(O);if(T>pr){var Y=h*ds(_),H=h*ta(_),V=d*ds(w),Z=d*ta(w),q;if(y<lf)if(q=uX(j,I,V,Z,Y,H,$,z)){var J=j-q[0],rt=I-q[1],K=Y-q[0],ot=H-q[1],vt=1/ta(nX((J*K+rt*ot)/(Nl(J*J+rt*rt)*Nl(K*K+ot*ot)))/2),yt=Nl(q[0]*q[0]+q[1]*q[1]);P=My(T,(d-yt)/(vt-1)),N=My(T,(h-yt)/(vt+1))}else P=N=0}E>pr?N>pr?(C=eh(V,Z,j,I,h,N,m),R=eh(Y,H,$,z,h,N,m),s.moveTo(C.cx+C.x01,C.cy+C.y01),N<T?s.arc(C.cx,C.cy,N,hr(C.y01,C.x01),hr(R.y01,R.x01),!m):(s.arc(C.cx,C.cy,N,hr(C.y01,C.x01),hr(C.y11,C.x11),!m),s.arc(0,0,h,hr(C.cy+C.y11,C.cx+C.x11),hr(R.cy+R.y11,R.cx+R.x11),!m),s.arc(R.cx,R.cy,N,hr(R.y11,R.x11),hr(R.y01,R.x01),!m))):(s.moveTo(j,I),s.arc(0,0,h,x,_,!m)):s.moveTo(j,I),!(d>pr)||!(S>pr)?s.lineTo($,z):P>pr?(C=eh($,z,Y,H,d,-P,m),R=eh(j,I,V,Z,d,-P,m),s.lineTo(C.cx+C.x01,C.cy+C.y01),P<T?s.arc(C.cx,C.cy,P,hr(C.y01,C.x01),hr(R.y01,R.x01),!m):(s.arc(C.cx,C.cy,P,hr(C.y01,C.x01),hr(C.y11,C.x11),!m),s.arc(0,0,d,hr(C.cy+C.y11,C.cx+C.x11),hr(R.cy+R.y11,R.cx+R.x11),m),s.arc(R.cx,R.cy,P,hr(R.y11,R.x11),hr(R.y01,R.x01),!m))):s.arc(0,0,d,O,w,m)}if(s.closePath(),u)return s=null,u+""||null}return c.centroid=function(){var u=(+t.apply(this,arguments)+ +n.apply(this,arguments))/2,f=(+i.apply(this,arguments)+ +a.apply(this,arguments))/2-lf/2;return[ds(f)*u,ta(f)*u]},c.innerRadius=function(u){return arguments.length?(t=typeof u=="function"?u:sn(+u),c):t},c.outerRadius=function(u){return arguments.length?(n=typeof u=="function"?u:sn(+u),c):n},c.cornerRadius=function(u){return arguments.length?(e=typeof u=="function"?u:sn(+u),c):e},c.padRadius=function(u){return arguments.length?(r=u==null?null:typeof u=="function"?u:sn(+u),c):r},c.startAngle=function(u){return arguments.length?(i=typeof u=="function"?u:sn(+u),c):i},c.endAngle=function(u){return arguments.length?(a=typeof u=="function"?u:sn(+u),c):a},c.padAngle=function(u){return arguments.length?(o=typeof u=="function"?u:sn(+u),c):o},c.context=function(u){return arguments.length?(s=u??null,c):s},c}function B3(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function z3(t){this._context=t}z3.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(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:this._context.lineTo(t,n);break}}};function Uf(t){return new z3(t)}function W3(t){return t[0]}function G3(t){return t[1]}function Js(t,n){var e=sn(!0),r=null,i=Uf,a=null,o=px(s);t=typeof t=="function"?t:t===void 0?W3:sn(t),n=typeof n=="function"?n:n===void 0?G3:sn(n);function s(l){var c,u=(l=B3(l)).length,f,d=!1,h;for(r==null&&(a=i(h=o())),c=0;c<=u;++c)!(c<u&&e(f=l[c],c,l))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+t(f,c,l),+n(f,c,l));if(h)return a=null,h+""||null}return s.x=function(l){return arguments.length?(t=typeof l=="function"?l:sn(+l),s):t},s.y=function(l){return arguments.length?(n=typeof l=="function"?l:sn(+l),s):n},s.defined=function(l){return arguments.length?(e=typeof l=="function"?l:sn(!!l),s):e},s.curve=function(l){return arguments.length?(i=l,r!=null&&(a=i(r)),s):i},s.context=function(l){return arguments.length?(l==null?r=a=null:a=i(r=l),s):r},s}function u1(t,n,e){var r=null,i=sn(!0),a=null,o=Uf,s=null,l=px(c);t=typeof t=="function"?t:t===void 0?W3:sn(+t),n=typeof n=="function"?n:sn(n===void 0?0:+n),e=typeof e=="function"?e:e===void 0?G3:sn(+e);function c(f){var d,h,p,g=(f=B3(f)).length,y,m=!1,x,_=new Array(g),w=new Array(g);for(a==null&&(s=o(x=l())),d=0;d<=g;++d){if(!(d<g&&i(y=f[d],d,f))===m)if(m=!m)h=d,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),p=d-1;p>=h;--p)s.point(_[p],w[p]);s.lineEnd(),s.areaEnd()}m&&(_[d]=+t(y,d,f),w[d]=+n(y,d,f),s.point(r?+r(y,d,f):_[d],e?+e(y,d,f):w[d]))}if(x)return s=null,x+""||null}function u(){return Js().defined(i).curve(o).context(a)}return c.x=function(f){return arguments.length?(t=typeof f=="function"?f:sn(+f),r=null,c):t},c.x0=function(f){return arguments.length?(t=typeof f=="function"?f:sn(+f),c):t},c.x1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:sn(+f),c):r},c.y=function(f){return arguments.length?(n=typeof f=="function"?f:sn(+f),e=null,c):n},c.y0=function(f){return arguments.length?(n=typeof f=="function"?f:sn(+f),c):n},c.y1=function(f){return arguments.length?(e=f==null?null:typeof f=="function"?f:sn(+f),c):e},c.lineX0=c.lineY0=function(){return u().x(t).y(n)},c.lineY1=function(){return u().x(t).y(e)},c.lineX1=function(){return u().x(r).y(n)},c.defined=function(f){return arguments.length?(i=typeof f=="function"?f:sn(!!f),c):i},c.curve=function(f){return arguments.length?(o=f,a!=null&&(s=o(a)),c):o},c.context=function(f){return arguments.length?(f==null?a=s=null:s=o(a=f),c):a},c}var Y3=gx(Uf);function H3(t){this._curve=t}H3.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,n){this._curve.point(n*Math.sin(t),n*-Math.cos(t))}};function gx(t){function n(e){return new H3(t(e))}return n._curve=t,n}function vu(t){var n=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(e){return arguments.length?n(gx(e)):n()._curve},t}function fX(){return vu(Js().curve(Y3))}function dX(){var t=u1().curve(Y3),n=t.curve,e=t.lineX0,r=t.lineX1,i=t.lineY0,a=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return vu(e())},delete t.lineX0,t.lineEndAngle=function(){return vu(r())},delete t.lineX1,t.lineInnerRadius=function(){return vu(i())},delete t.lineY0,t.lineOuterRadius=function(){return vu(a())},delete t.lineY1,t.curve=function(o){return arguments.length?n(gx(o)):n()._curve},t}function oc(){}function f1(t,n,e){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-n),t._y2+t._k*(t._y1-e),t._x2,t._y2)}function yx(t,n){this._context=t,this._k=(1-n)/6}yx.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:f1(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2,this._x1=t,this._y1=n;break;case 2:this._point=3;default:f1(this,t,n);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};(function t(n){function e(r){return new yx(r,n)}return e.tension=function(r){return t(+r)},e})(0);function mx(t,n){this._context=t,this._k=(1-n)/6}mx.prototype={areaStart:oc,areaEnd:oc,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(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:f1(this,t,n);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};(function t(n){function e(r){return new mx(r,n)}return e.tension=function(r){return t(+r)},e})(0);function U3(t,n,e){var r=t._x1,i=t._y1,a=t._x2,o=t._y2;if(t._l01_a>pr){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,l=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>pr){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,u=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*c+t._x1*t._l23_2a-n*t._l12_2a)/u,o=(o*c+t._y1*t._l23_2a-e*t._l12_2a)/u}t._context.bezierCurveTo(r,i,a,o,t._x2,t._y2)}function V3(t,n){this._context=t,this._alpha=n}V3.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(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3;default:U3(this,t,n);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=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};(function t(n){function e(r){return n?new V3(r,n):new yx(r,0)}return e.alpha=function(r){return t(+r)},e})(.5);function X3(t,n){this._context=t,this._alpha=n}X3.prototype={areaStart:oc,areaEnd:oc,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(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:U3(this,t,n);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=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};const q3=(function t(n){function e(r){return n?new X3(r,n):new mx(r,0)}return e.alpha=function(r){return t(+r)},e})(.5);function K3(t){this._context=t}K3.prototype={areaStart:oc,areaEnd:oc,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,n){t=+t,n=+n,this._point?this._context.lineTo(t,n):(this._point=1,this._context.moveTo(t,n))}};function bx(t){return new K3(t)}function hE(t){return t<0?-1:1}function pE(t,n,e){var r=t._x1-t._x0,i=n-t._x1,a=(t._y1-t._y0)/(r||i<0&&-0),o=(e-t._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(hE(a)+hE(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function vE(t,n){var e=t._x1-t._x0;return e?(3*(t._y1-t._y0)/e-n)/2:n}function Ay(t,n,e){var r=t._x0,i=t._y0,a=t._x1,o=t._y1,s=(a-r)/3;t._context.bezierCurveTo(r+s,i+s*n,a-s,o-s*e,a,o)}function Dp(t){this._context=t}Dp.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:Ay(this,this._t0,vE(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){var e=NaN;if(t=+t,n=+n,!(t===this._x1&&n===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3,Ay(this,vE(this,e=pE(this,t,n)),e);break;default:Ay(this,this._t0,e=pE(this,t,n));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n,this._t0=e}}};function Z3(t){this._context=new Q3(t)}(Z3.prototype=Object.create(Dp.prototype)).point=function(t,n){Dp.prototype.point.call(this,n,t)};function Q3(t){this._context=t}Q3.prototype={moveTo:function(t,n){this._context.moveTo(n,t)},closePath:function(){this._context.closePath()},lineTo:function(t,n){this._context.lineTo(n,t)},bezierCurveTo:function(t,n,e,r,i,a){this._context.bezierCurveTo(n,t,r,e,a,i)}};function J3(t){return new Dp(t)}function t5(t){return new Z3(t)}function a0(t,n){this._context=t,this._t=n}a0.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(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,n),this._context.lineTo(t,n);else{var e=this._x*(1-this._t)+t*this._t;this._context.lineTo(e,this._y),this._context.lineTo(e,n)}break}}this._x=t,this._y=n}};function e5(t){return new a0(t,.5)}function n5(t){return new a0(t,0)}function r5(t){return new a0(t,1)}function Ze(t){const{transformations:n}=t.getOptions();return n.map(([r])=>r).filter(r=>r==="transpose").length%2!==0}function Ie(t){const{transformations:n}=t.getOptions();return n.some(([e])=>e==="polar")}function o0(t){const{transformations:n}=t.getOptions();return n.some(([e])=>e==="reflect")&&n.some(([e])=>e.startsWith("transpose"))}function i5(t){const{transformations:n}=t.getOptions();return n.some(([e])=>e==="helix")}function s0(t){const{transformations:n}=t.getOptions();return n.some(([e])=>e==="parallel")}function a5(t){const{transformations:n}=t.getOptions();return n.some(([e])=>e==="fisheye")}function hX(t){return s0(t)&&Ie(t)}function wc(t){return i5(t)||Ie(t)}function pX(t){return Ie(t)&&Ze(t)}function vX(t){if(wc(t)){const[n,e]=t.getSize(),r=t.getOptions().transformations.find(i=>i[0]==="polar");if(r)return Math.max(n,e)/2*r[4]}return 0}function l0(t){const{transformations:n}=t.getOptions(),[,,,e,r]=n.find(i=>i[0]==="polar");return[+e,+r]}function xx(t,n=!0){const{transformations:e}=t.getOptions(),[,r,i]=e.find(a=>a[0]==="polar");return n?[+r*180/Math.PI,+i*180/Math.PI]:[r,i]}function gX(t,n){const{transformations:e}=t.getOptions(),[,...r]=e.find(i=>i[0]===n);return r}function ee(t,n,e){return n=bp(n),CW(t,LW()?Reflect.construct(n,e||[],bp(t).constructor):n.apply(t,e))}var Ty={exports:{}},gE;function yX(){return gE||(gE=1,(function(t){var n=Object.prototype.hasOwnProperty,e="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(e=!1));function i(l,c,u){this.fn=l,this.context=c,this.once=u||!1}function a(l,c,u,f,d){if(typeof u!="function")throw new TypeError("The listener must be a function");var h=new i(u,f||l,d),p=e?e+c:c;return l._events[p]?l._events[p].fn?l._events[p]=[l._events[p],h]:l._events[p].push(h):(l._events[p]=h,l._eventsCount++),l}function o(l,c){--l._eventsCount===0?l._events=new r:delete l._events[c]}function s(){this._events=new r,this._eventsCount=0}s.prototype.eventNames=function(){var c=[],u,f;if(this._eventsCount===0)return c;for(f in u=this._events)n.call(u,f)&&c.push(e?f.slice(1):f);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(u)):c},s.prototype.listeners=function(c){var u=e?e+c:c,f=this._events[u];if(!f)return[];if(f.fn)return[f.fn];for(var d=0,h=f.length,p=new Array(h);d<h;d++)p[d]=f[d].fn;return p},s.prototype.listenerCount=function(c){var u=e?e+c:c,f=this._events[u];return f?f.fn?1:f.length:0},s.prototype.emit=function(c,u,f,d,h,p){var g=e?e+c:c;if(!this._events[g])return!1;var y=this._events[g],m=arguments.length,x,_;if(y.fn){switch(y.once&&this.removeListener(c,y.fn,void 0,!0),m){case 1:return y.fn.call(y.context),!0;case 2:return y.fn.call(y.context,u),!0;case 3:return y.fn.call(y.context,u,f),!0;case 4:return y.fn.call(y.context,u,f,d),!0;case 5:return y.fn.call(y.context,u,f,d,h),!0;case 6:return y.fn.call(y.context,u,f,d,h,p),!0}for(_=1,x=new Array(m-1);_<m;_++)x[_-1]=arguments[_];y.fn.apply(y.context,x)}else{var w=y.length,O;for(_=0;_<w;_++)switch(y[_].once&&this.removeListener(c,y[_].fn,void 0,!0),m){case 1:y[_].fn.call(y[_].context);break;case 2:y[_].fn.call(y[_].context,u);break;case 3:y[_].fn.call(y[_].context,u,f);break;case 4:y[_].fn.call(y[_].context,u,f,d);break;default:if(!x)for(O=1,x=new Array(m-1);O<m;O++)x[O-1]=arguments[O];y[_].fn.apply(y[_].context,x)}}return!0},s.prototype.on=function(c,u,f){return a(this,c,u,f,!1)},s.prototype.once=function(c,u,f){return a(this,c,u,f,!0)},s.prototype.removeListener=function(c,u,f,d){var h=e?e+c:c;if(!this._events[h])return this;if(!u)return o(this,h),this;var p=this._events[h];if(p.fn)p.fn===u&&(!d||p.once)&&(!f||p.context===f)&&o(this,h);else{for(var g=0,y=[],m=p.length;g<m;g++)(p[g].fn!==u||d&&!p[g].once||f&&p[g].context!==f)&&y.push(p[g]);y.length?this._events[h]=y.length===1?y[0]:y:o(this,h)}return this},s.prototype.removeAllListeners=function(c){var u;return c?(u=e?e+c:c,this._events[u]&&o(this,u)):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=e,s.EventEmitter=s,t.exports=s})(Ty)),Ty.exports}var mX=yX();const o5=Bv(mX);function bX(t,n){for(;!{}.hasOwnProperty.call(t,n)&&(t=bp(t))!==null;);return t}function d1(){return d1=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(t,n,e){var r=bX(t,n);if(r){var i=Object.getOwnPropertyDescriptor(r,n);return i.get?i.get.call(arguments.length<3?t:e):i.value}},d1.apply(null,arguments)}function yE(t,n,e,r){var i=d1(bp(t.prototype),n,e);return typeof i=="function"?function(a){return i.apply(e,a)}:i}/*!
42
+ * @antv/g-math
43
+ * @description Geometry util
44
+ * @version 3.0.1
45
+ * @date 5/9/2025, 8:18:51 AM
46
+ * @author AntVis
47
+ * @docs https://g.antv.antgroup.com/
48
+ */function Ka(t,n,e,r){var i=t-e,a=n-r;return Math.sqrt(i*i+a*a)}function s5(t,n){var e=Math.min.apply(Math,ce(t)),r=Math.min.apply(Math,ce(n)),i=Math.max.apply(Math,ce(t)),a=Math.max.apply(Math,ce(n));return{x:e,y:r,width:i-e,height:a-r}}function xX(t,n,e){return Math.atan(-n/t*Math.tan(e))}function _X(t,n,e){return Math.atan(n/(t*Math.tan(e)))}function wX(t,n,e,r,i,a){return e*Math.cos(i)*Math.cos(a)-r*Math.sin(i)*Math.sin(a)+t}function OX(t,n,e,r,i,a){return e*Math.sin(i)*Math.cos(a)+r*Math.cos(i)*Math.sin(a)+n}function SX(t,n,e,r,i,a,o){for(var s=xX(e,r,i),l=1/0,c=-1/0,u=[a,o],f=-Math.PI*2;f<=Math.PI*2;f+=Math.PI){var d=s+f;a<o?a<d&&d<o&&u.push(d):o<d&&d<a&&u.push(d)}for(var h=0;h<u.length;h++){var p=wX(t,n,e,r,i,u[h]);p<l&&(l=p),p>c&&(c=p)}for(var g=_X(e,r,i),y=1/0,m=-1/0,x=[a,o],_=-Math.PI*2;_<=Math.PI*2;_+=Math.PI){var w=g+_;a<o?a<w&&w<o&&x.push(w):o<w&&w<a&&x.push(w)}for(var O=0;O<x.length;O++){var S=OX(t,n,e,r,i,x[O]);S<y&&(y=S),S>m&&(m=S)}return{x:l,y,width:c-l,height:m-y}}var EX=1e-4;function l5(t,n,e,r,i,a){var o=-1,s=1/0,l=[e,r],c=20;a&&a>200&&(c=a/10);for(var u=1/c,f=u/10,d=0;d<=c;d++){var h=d*u,p=[i.apply(void 0,ce(t.concat([h]))),i.apply(void 0,ce(n.concat([h])))],g=Ka(l[0],l[1],p[0],p[1]);g<s&&(o=h,s=g)}if(o===0)return{x:t[0],y:n[0]};if(o===1){var y=t.length;return{x:t[y-1],y:n[y-1]}}s=1/0;for(var m=0;m<32&&!(f<EX);m++){var x=o-f,_=o+f,w=[i.apply(void 0,ce(t.concat([x]))),i.apply(void 0,ce(n.concat([x])))],O=Ka(l[0],l[1],w[0],w[1]);if(x>=0&&O<s)o=x,s=O;else{var S=[i.apply(void 0,ce(t.concat([_]))),i.apply(void 0,ce(n.concat([_])))],E=Ka(l[0],l[1],S[0],S[1]);_<=1&&E<s?(o=_,s=E):f*=.5}}return{x:i.apply(void 0,ce(t.concat([o]))),y:i.apply(void 0,ce(n.concat([o])))}}function c5(t,n,e,r){return Ka(t,n,e,r)}function u5(t,n,e,r,i){return{x:(1-i)*t+i*e,y:(1-i)*n+i*r}}function kX(t,n,e,r,i,a){var o=[e-t,r-n];if(CY(o,[0,0]))return Math.sqrt((i-t)*(i-t)+(a-n)*(a-n));var s=[-o[1],o[0]];TY(s,s);var l=[i-t,a-n];return Math.abs(PY(l,s))}function h1(t,n,e,r,i){var a=1-i;return a*a*a*t+3*n*i*a*a+3*e*i*i*a+r*i*i*i}function mE(t,n,e,r){var i=-3*t+9*n-9*e+3*r,a=6*t-12*n+6*e,o=3*n-3*t,s=[],l,c,u;if(Ru(i,0))Ru(a,0)||(l=-o/a,l>=0&&l<=1&&s.push(l));else{var f=a*a-4*i*o;Ru(f,0)?s.push(-a/(2*i)):f>0&&(u=Math.sqrt(f),l=(-a+u)/(2*i),c=(-a-u)/(2*i),l>=0&&l<=1&&s.push(l),c>=0&&c<=1&&s.push(c))}return s}function MX(t,n,e,r,i,a,o,s){for(var l=[t,o],c=[n,s],u=mE(t,e,i,o),f=mE(n,r,a,s),d=0;d<u.length;d++)l.push(h1(t,e,i,o,u[d]));for(var h=0;h<f.length;h++)c.push(h1(n,r,a,s,f[h]));return s5(l,c)}function AX(t,n,e,r,i,a,o,s,l,c,u){return l5([t,e,i,o],[n,r,a,s],l,c,h1,u)}function bE(t,n,e,r,i,a,o,s,l,c,u){var f=AX(t,n,e,r,i,a,o,s,l,c,u);return Ka(f.x,f.y,l,c)}function TX(t){if(t.length<2)return 0;for(var n=0,e=0;e<t.length-1;e++){var r=t[e],i=t[e+1];n+=Ka(r[0],r[1],i[0],i[1])}return n}function PX(t){return TX(t)}function p1(t,n,e,r){var i=1-r;return i*i*t+2*r*i*n+r*r*e}function xE(t,n,e){var r=t+e-2*n;if(Ru(r,0))return[.5];var i=(t-n)/r;return i<=1&&i>=0?[i]:[]}function CX(t,n,e,r,i,a){var o=xE(t,e,i)[0],s=xE(n,r,a)[0],l=[t,i],c=[n,a];return o!==void 0&&l.push(p1(t,e,i,o)),s!==void 0&&c.push(p1(n,r,a,s)),s5(l,c)}function LX(t,n,e,r,i,a,o,s){return l5([t,e,i],[n,r,a],o,s,p1)}function NX(t,n,e,r,i,a,o,s){var l=LX(t,n,e,r,i,a,o,s);return Ka(l.x,l.y,o,s)}function Ss(t,n){var e=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=NW(t))||n){e&&(t=e);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(c){throw c},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
49
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){e=e.call(t)},n:function(){var c=e.next();return o=c.done,c},e:function(c){s=!0,a=c},f:function(){try{o||e.return==null||e.return()}finally{if(s)throw a}}}}/*!
50
+ * @antv/g-lite
51
+ * @description A core module for rendering engine implements DOM API.
52
+ * @version 2.3.2
53
+ * @date 7/30/2025, 1:34:19 PM
54
+ * @author AntVis
55
+ * @docs https://g.antv.antgroup.com/
56
+ */var RX=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},f5={exports:{}};(function(t,n){(function(e,r){t.exports=r()})(RX,function(){function e(O,S,E,M,A){r(O,S,E||0,M||O.length-1,A||a)}function r(O,S,E,M,A){for(;M>E;){if(M-E>600){var T=M-E+1,P=S-E+1,N=Math.log(T),C=.5*Math.exp(2*N/3),R=.5*Math.sqrt(N*C*(T-C)/T)*(P-T/2<0?-1:1),D=Math.max(E,Math.floor(S-P*C/T+R)),F=Math.min(M,Math.floor(S+(T-P)*C/T+R));r(O,S,D,F,A)}var j=O[S],I=E,$=M;for(i(O,E,S),A(O[M],j)>0&&i(O,E,M);I<$;){for(i(O,I,$),I++,$--;A(O[I],j)<0;)I++;for(;A(O[$],j)>0;)$--}A(O[E],j)===0?i(O,E,$):($++,i(O,$,M)),$<=S&&(E=$+1),S<=$&&(M=$-1)}}function i(O,S,E){var M=O[S];O[S]=O[E],O[E]=M}function a(O,S){return O<S?-1:O>S?1:0}var o=function(S){S===void 0&&(S=9),this._maxEntries=Math.max(4,S),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()};o.prototype.all=function(){return this._all(this.data,[])},o.prototype.search=function(S){var E=this.data,M=[];if(!x(S,E))return M;for(var A=this.toBBox,T=[];E;){for(var P=0;P<E.children.length;P++){var N=E.children[P],C=E.leaf?A(N):N;x(S,C)&&(E.leaf?M.push(N):m(S,C)?this._all(N,M):T.push(N))}E=T.pop()}return M},o.prototype.collides=function(S){var E=this.data;if(!x(S,E))return!1;for(var M=[];E;){for(var A=0;A<E.children.length;A++){var T=E.children[A],P=E.leaf?this.toBBox(T):T;if(x(S,P)){if(E.leaf||m(S,P))return!0;M.push(T)}}E=M.pop()}return!1},o.prototype.load=function(S){if(!(S&&S.length))return this;if(S.length<this._minEntries){for(var E=0;E<S.length;E++)this.insert(S[E]);return this}var M=this._build(S.slice(),0,S.length-1,0);if(!this.data.children.length)this.data=M;else if(this.data.height===M.height)this._splitRoot(this.data,M);else{if(this.data.height<M.height){var A=this.data;this.data=M,M=A}this._insert(M,this.data.height-M.height-1,!0)}return this},o.prototype.insert=function(S){return S&&this._insert(S,this.data.height-1),this},o.prototype.clear=function(){return this.data=_([]),this},o.prototype.remove=function(S,E){if(!S)return this;for(var M=this.data,A=this.toBBox(S),T=[],P=[],N,C,R;M||T.length;){if(M||(M=T.pop(),C=T[T.length-1],N=P.pop(),R=!0),M.leaf){var D=s(S,M.children,E);if(D!==-1)return M.children.splice(D,1),T.push(M),this._condense(T),this}!R&&!M.leaf&&m(M,A)?(T.push(M),P.push(N),N=0,C=M,M=M.children[0]):C?(N++,M=C.children[N],R=!1):M=null}return this},o.prototype.toBBox=function(S){return S},o.prototype.compareMinX=function(S,E){return S.minX-E.minX},o.prototype.compareMinY=function(S,E){return S.minY-E.minY},o.prototype.toJSON=function(){return this.data},o.prototype.fromJSON=function(S){return this.data=S,this},o.prototype._all=function(S,E){for(var M=[];S;)S.leaf?E.push.apply(E,S.children):M.push.apply(M,S.children),S=M.pop();return E},o.prototype._build=function(S,E,M,A){var T=M-E+1,P=this._maxEntries,N;if(T<=P)return N=_(S.slice(E,M+1)),l(N,this.toBBox),N;A||(A=Math.ceil(Math.log(T)/Math.log(P)),P=Math.ceil(T/Math.pow(P,A-1))),N=_([]),N.leaf=!1,N.height=A;var C=Math.ceil(T/P),R=C*Math.ceil(Math.sqrt(P));w(S,E,M,R,this.compareMinX);for(var D=E;D<=M;D+=R){var F=Math.min(D+R-1,M);w(S,D,F,C,this.compareMinY);for(var j=D;j<=F;j+=C){var I=Math.min(j+C-1,F);N.children.push(this._build(S,j,I,A-1))}}return l(N,this.toBBox),N},o.prototype._chooseSubtree=function(S,E,M,A){for(;A.push(E),!(E.leaf||A.length-1===M);){for(var T=1/0,P=1/0,N=void 0,C=0;C<E.children.length;C++){var R=E.children[C],D=h(R),F=g(S,R)-D;F<P?(P=F,T=D<T?D:T,N=R):F===P&&D<T&&(T=D,N=R)}E=N||E.children[0]}return E},o.prototype._insert=function(S,E,M){var A=M?S:this.toBBox(S),T=[],P=this._chooseSubtree(A,this.data,E,T);for(P.children.push(S),u(P,A);E>=0&&T[E].children.length>this._maxEntries;)this._split(T,E),E--;this._adjustParentBBoxes(A,T,E)},o.prototype._split=function(S,E){var M=S[E],A=M.children.length,T=this._minEntries;this._chooseSplitAxis(M,T,A);var P=this._chooseSplitIndex(M,T,A),N=_(M.children.splice(P,M.children.length-P));N.height=M.height,N.leaf=M.leaf,l(M,this.toBBox),l(N,this.toBBox),E?S[E-1].children.push(N):this._splitRoot(M,N)},o.prototype._splitRoot=function(S,E){this.data=_([S,E]),this.data.height=S.height+1,this.data.leaf=!1,l(this.data,this.toBBox)},o.prototype._chooseSplitIndex=function(S,E,M){for(var A,T=1/0,P=1/0,N=E;N<=M-E;N++){var C=c(S,0,N,this.toBBox),R=c(S,N,M,this.toBBox),D=y(C,R),F=h(C)+h(R);D<T?(T=D,A=N,P=F<P?F:P):D===T&&F<P&&(P=F,A=N)}return A||M-E},o.prototype._chooseSplitAxis=function(S,E,M){var A=S.leaf?this.compareMinX:f,T=S.leaf?this.compareMinY:d,P=this._allDistMargin(S,E,M,A),N=this._allDistMargin(S,E,M,T);P<N&&S.children.sort(A)},o.prototype._allDistMargin=function(S,E,M,A){S.children.sort(A);for(var T=this.toBBox,P=c(S,0,E,T),N=c(S,M-E,M,T),C=p(P)+p(N),R=E;R<M-E;R++){var D=S.children[R];u(P,S.leaf?T(D):D),C+=p(P)}for(var F=M-E-1;F>=E;F--){var j=S.children[F];u(N,S.leaf?T(j):j),C+=p(N)}return C},o.prototype._adjustParentBBoxes=function(S,E,M){for(var A=M;A>=0;A--)u(E[A],S)},o.prototype._condense=function(S){for(var E=S.length-1,M=void 0;E>=0;E--)S[E].children.length===0?E>0?(M=S[E-1].children,M.splice(M.indexOf(S[E]),1)):this.clear():l(S[E],this.toBBox)};function s(O,S,E){if(!E)return S.indexOf(O);for(var M=0;M<S.length;M++)if(E(O,S[M]))return M;return-1}function l(O,S){c(O,0,O.children.length,S,O)}function c(O,S,E,M,A){A||(A=_(null)),A.minX=1/0,A.minY=1/0,A.maxX=-1/0,A.maxY=-1/0;for(var T=S;T<E;T++){var P=O.children[T];u(A,O.leaf?M(P):P)}return A}function u(O,S){return O.minX=Math.min(O.minX,S.minX),O.minY=Math.min(O.minY,S.minY),O.maxX=Math.max(O.maxX,S.maxX),O.maxY=Math.max(O.maxY,S.maxY),O}function f(O,S){return O.minX-S.minX}function d(O,S){return O.minY-S.minY}function h(O){return(O.maxX-O.minX)*(O.maxY-O.minY)}function p(O){return O.maxX-O.minX+(O.maxY-O.minY)}function g(O,S){return(Math.max(S.maxX,O.maxX)-Math.min(S.minX,O.minX))*(Math.max(S.maxY,O.maxY)-Math.min(S.minY,O.minY))}function y(O,S){var E=Math.max(O.minX,S.minX),M=Math.max(O.minY,S.minY),A=Math.min(O.maxX,S.maxX),T=Math.min(O.maxY,S.maxY);return Math.max(0,A-E)*Math.max(0,T-M)}function m(O,S){return O.minX<=S.minX&&O.minY<=S.minY&&S.maxX<=O.maxX&&S.maxY<=O.maxY}function x(O,S){return S.minX<=O.maxX&&S.minY<=O.maxY&&S.maxX>=O.minX&&S.maxY>=O.minY}function _(O){return{children:O,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function w(O,S,E,M,A){for(var T=[S,E];T.length;)if(E=T.pop(),S=T.pop(),!(E-S<=M)){var P=S+Math.ceil((E-S)/M/2)*M;e(O,P,S,E,A),T.push(S,P,P,E)}}return o})})(f5);var IX=f5.exports,it=(function(t){return t.GROUP="g",t.FRAGMENT="fragment",t.CIRCLE="circle",t.ELLIPSE="ellipse",t.IMAGE="image",t.RECT="rect",t.LINE="line",t.POLYLINE="polyline",t.POLYGON="polygon",t.TEXT="text",t.PATH="path",t.HTML="html",t.MESH="mesh",t})({}),rp=(function(t){return t[t.ZERO=0]="ZERO",t[t.NEGATIVE_ONE=1]="NEGATIVE_ONE",t})({}),Ko=(function(){function t(){pt(this,t),this.plugins=[]}return ht(t,[{key:"addRenderingPlugin",value:function(e){this.plugins.push(e),this.context.renderingPlugins.push(e)}},{key:"removeAllRenderingPlugins",value:function(){var e=this;this.plugins.forEach(function(r){var i=e.context.renderingPlugins.indexOf(r);i>=0&&e.context.renderingPlugins.splice(i,1)})}}])})(),DX=(function(){function t(n){pt(this,t),this.clipSpaceNearZ=rp.NEGATIVE_ONE,this.plugins=[],this.config=Kt({enableDirtyCheck:!0,enableCulling:!1,enableAutoRendering:!0,enableDirtyRectangleRendering:!0,enableDirtyRectangleRenderingDebug:!1,enableSizeAttenuation:!0,enableRenderingOptimization:!1},n)}return ht(t,[{key:"registerPlugin",value:function(e){var r=this.plugins.findIndex(function(i){return i===e});r===-1&&this.plugins.push(e)}},{key:"unregisterPlugin",value:function(e){var r=this.plugins.findIndex(function(i){return i===e});r>-1&&this.plugins.splice(r,1)}},{key:"getPlugins",value:function(){return this.plugins}},{key:"getPlugin",value:function(e){return this.plugins.find(function(r){return r.name===e})}},{key:"getConfig",value:function(){return this.config}},{key:"setConfig",value:function(e){Object.assign(this.config,e)}}])})(),Py=Ro,wl=fa,$X=mY,jX=yY,_E=Ep,Cy=_Y,Fn=(function(){function t(){pt(this,t),this.center=[0,0,0],this.halfExtents=[0,0,0],this.min=[0,0,0],this.max=[0,0,0]}return ht(t,[{key:"update",value:function(e,r){wl(this.center,e),wl(this.halfExtents,r),Cy(this.min,this.center,this.halfExtents),Py(this.max,this.center,this.halfExtents)}},{key:"setMinMax",value:function(e,r){Py(this.center,r,e),_E(this.center,this.center,.5),Cy(this.halfExtents,r,e),_E(this.halfExtents,this.halfExtents,.5),wl(this.min,e),wl(this.max,r)}},{key:"getMin",value:function(){return this.min}},{key:"getMax",value:function(){return this.max}},{key:"add",value:function(e){if(!t.isEmpty(e)){if(t.isEmpty(this)){this.setMinMax(e.getMin(),e.getMax());return}var r=this.center,i=r[0],a=r[1],o=r[2],s=this.halfExtents,l=s[0],c=s[1],u=s[2],f=i-l,d=i+l,h=a-c,p=a+c,g=o-u,y=o+u,m=e.center,x=m[0],_=m[1],w=m[2],O=e.halfExtents,S=O[0],E=O[1],M=O[2],A=x-S,T=x+S,P=_-E,N=_+E,C=w-M,R=w+M;A<f&&(f=A),T>d&&(d=T),P<h&&(h=P),N>p&&(p=N),C<g&&(g=C),R>y&&(y=R),r[0]=(f+d)*.5,r[1]=(h+p)*.5,r[2]=(g+y)*.5,s[0]=(d-f)*.5,s[1]=(p-h)*.5,s[2]=(y-g)*.5,this.min[0]=f,this.min[1]=h,this.min[2]=g,this.max[0]=d,this.max[1]=p,this.max[2]=y}}},{key:"setFromTransformedAABB",value:function(e,r){var i=this.center,a=this.halfExtents,o=e.center,s=e.halfExtents,l=r[0],c=r[4],u=r[8],f=r[1],d=r[5],h=r[9],p=r[2],g=r[6],y=r[10],m=Math.abs(l),x=Math.abs(c),_=Math.abs(u),w=Math.abs(f),O=Math.abs(d),S=Math.abs(h),E=Math.abs(p),M=Math.abs(g),A=Math.abs(y);i[0]=r[12]+l*o[0]+c*o[1]+u*o[2],i[1]=r[13]+f*o[0]+d*o[1]+h*o[2],i[2]=r[14]+p*o[0]+g*o[1]+y*o[2],a[0]=m*s[0]+x*s[1]+_*s[2],a[1]=w*s[0]+O*s[1]+S*s[2],a[2]=E*s[0]+M*s[1]+A*s[2],Cy(this.min,i,a),Py(this.max,i,a)}},{key:"intersects",value:function(e){var r=this.getMax(),i=this.getMin(),a=e.getMax(),o=e.getMin();return i[0]<=a[0]&&r[0]>=o[0]&&i[1]<=a[1]&&r[1]>=o[1]&&i[2]<=a[2]&&r[2]>=o[2]}},{key:"intersection",value:function(e){if(!this.intersects(e))return null;var r=new t,i=$X([0,0,0],this.getMin(),e.getMin()),a=jX([0,0,0],this.getMax(),e.getMax());return r.setMinMax(i,a),r}},{key:"getNegativeFarPoint",value:function(e){return e.pnVertexFlag===273?wl([0,0,0],this.min):e.pnVertexFlag===272?[this.min[0],this.min[1],this.max[2]]:e.pnVertexFlag===257?[this.min[0],this.max[1],this.min[2]]:e.pnVertexFlag===256?[this.min[0],this.max[1],this.max[2]]:e.pnVertexFlag===17?[this.max[0],this.min[1],this.min[2]]:e.pnVertexFlag===16?[this.max[0],this.min[1],this.max[2]]:e.pnVertexFlag===1?[this.max[0],this.max[1],this.min[2]]:[this.max[0],this.max[1],this.max[2]]}},{key:"getPositiveFarPoint",value:function(e){return e.pnVertexFlag===273?wl([0,0,0],this.max):e.pnVertexFlag===272?[this.max[0],this.max[1],this.min[2]]:e.pnVertexFlag===257?[this.max[0],this.min[1],this.max[2]]:e.pnVertexFlag===256?[this.max[0],this.min[1],this.min[2]]:e.pnVertexFlag===17?[this.min[0],this.max[1],this.max[2]]:e.pnVertexFlag===16?[this.min[0],this.max[1],this.min[2]]:e.pnVertexFlag===1?[this.min[0],this.min[1],this.max[2]]:[this.min[0],this.min[1],this.min[2]]}}],[{key:"isEmpty",value:function(e){return!e||e.halfExtents[0]===0&&e.halfExtents[1]===0&&e.halfExtents[2]===0}}])})(),FX=(function(){function t(n,e){pt(this,t),this.distance=n||0,this.normal=e||ke(0,1,0),this.updatePNVertexFlag()}return ht(t,[{key:"updatePNVertexFlag",value:function(){this.pnVertexFlag=(+(this.normal[0]>=0)<<8)+(+(this.normal[1]>=0)<<4)+ +(this.normal[2]>=0)}},{key:"distanceToPoint",value:function(e){return da(e,this.normal)-this.distance}},{key:"normalize",value:function(){var e=1/lC(this.normal);Ep(this.normal,this.normal,e),this.distance*=e}},{key:"intersectsLine",value:function(e,r,i){var a=this.distanceToPoint(e),o=this.distanceToPoint(r),s=a/(a-o),l=s>=0&&s<=1;return l&&i&&Km(i,e,r,s),l}}])})(),Ol=(function(t){return t[t.OUTSIDE=4294967295]="OUTSIDE",t[t.INSIDE=0]="INSIDE",t[t.INDETERMINATE=2147483647]="INDETERMINATE",t})({}),BX=(function(){function t(n){if(pt(this,t),this.planes=[],n)this.planes=n;else for(var e=0;e<6;e++)this.planes.push(new FX)}return ht(t,[{key:"extractFromVPMatrix",value:function(e){var r=Ut(e,16),i=r[0],a=r[1],o=r[2],s=r[3],l=r[4],c=r[5],u=r[6],f=r[7],d=r[8],h=r[9],p=r[10],g=r[11],y=r[12],m=r[13],x=r[14],_=r[15];gr(this.planes[0].normal,s-i,f-l,g-d),this.planes[0].distance=_-y,gr(this.planes[1].normal,s+i,f+l,g+d),this.planes[1].distance=_+y,gr(this.planes[2].normal,s+a,f+c,g+h),this.planes[2].distance=_+m,gr(this.planes[3].normal,s-a,f-c,g-h),this.planes[3].distance=_-m,gr(this.planes[4].normal,s-o,f-u,g-p),this.planes[4].distance=_-x,gr(this.planes[5].normal,s+o,f+u,g+p),this.planes[5].distance=_+x,this.planes.forEach(function(w){w.normalize(),w.updatePNVertexFlag()})}}])})(),lr=(function(){function t(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;pt(this,t),this.x=0,this.y=0,this.x=n,this.y=e}return ht(t,[{key:"clone",value:function(){return new t(this.x,this.y)}},{key:"copyFrom",value:function(e){this.x=e.x,this.y=e.y}}])})(),sc=(function(){function t(n,e,r,i){pt(this,t),this.x=n,this.y=e,this.width=r,this.height=i,this.left=n,this.right=n+r,this.top=e,this.bottom=e+i}return ht(t,[{key:"toJSON",value:function(){}}],[{key:"fromRect",value:function(e){return new t(e.x,e.y,e.width,e.height)}},{key:"applyTransform",value:function(e,r){var i=pu(e.x,e.y,0,1),a=pu(e.x+e.width,e.y,0,1),o=pu(e.x,e.y+e.height,0,1),s=pu(e.x+e.width,e.y+e.height,0,1),l=ha(),c=ha(),u=ha(),f=ha();pa(l,i,r),pa(c,a,r),pa(u,o,r),pa(f,s,r);var d=Math.min(l[0],c[0],u[0],f[0]),h=Math.min(l[1],c[1],u[1],f[1]),p=Math.max(l[0],c[0],u[0],f[0]),g=Math.max(l[1],c[1],u[1],f[1]);return t.fromRect({x:d,y:h,width:p-d,height:g-h})}}])})(),Ge="Method not implemented.",Sl="Use document.documentElement instead.",zX="Cannot append a destroyed element.";function Bl(t){return t===void 0?0:t>360||t<-360?t%360:t}var Ly=fe();function Mr(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;return Array.isArray(t)&&t.length===3?r?za(t):fa(Ly,t):Qe(t)?r?ke(t,n,e):gr(Ly,t,n,e):r?ke(t[0],t[1]||n,t[2]||e):gr(Ly,t[0],t[1]||n,t[2]||e)}var WX=Math.PI/180;function He(t){return t*WX}var GX=180/Math.PI;function gi(t){return t*GX}function YX(t){return 360*t}var $p=Math.PI/2;function HX(t,n){var e=n[0],r=n[1],i=n[2],a=n[3],o=e*e,s=r*r,l=i*i,c=a*a,u=o+s+l+c,f=e*a-r*i;return f>.499995*u?(t[0]=$p,t[1]=2*Math.atan2(r,e),t[2]=0):f<-.499995*u?(t[0]=-$p,t[1]=2*Math.atan2(r,e),t[2]=0):(t[0]=Math.asin(2*(e*i-a*r)),t[1]=Math.atan2(2*(e*a+r*i),1-2*(l+c)),t[2]=Math.atan2(2*(e*r+i*a),1-2*(s+l))),t}function UX(t,n){var e,r,i=tc(fe(),n),a=Ut(i,3),o=a[0],s=a[1],l=a[2],c=Math.asin(-n[2]/o);return c<$p?c>-$p?(e=Math.atan2(n[6]/s,n[10]/l),r=Math.atan2(n[1]/o,n[0]/o)):(r=0,e=-Math.atan2(n[4]/s,n[5]/s)):(r=0,e=Math.atan2(n[4]/s,n[5]/s)),t[0]=e,t[1]=c,t[2]=r,t}function Ny(t,n){return n.length===16?UX(t,n):HX(t,n)}function VX(t,n,e,r,i){var a=Math.cos(t),o=Math.sin(t);return YG(r*a,i*o,0,-r*o,i*a,0,n,e,1)}function XX(t,n,e,r,i,a,o){var s=arguments.length>7&&arguments[7]!==void 0?arguments[7]:!1,l=2*a,c=e-n,u=r-i,f=l/c,d=l/u,h=(e+n)/c,p=(r+i)/u,g,y,m=o-a,x=o*a;return s?(g=-o/m,y=-x/m):(g=-(o+a)/m,y=-2*x/m),t[0]=f,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=d,t[6]=0,t[7]=0,t[8]=h,t[9]=p,t[10]=g,t[11]=-1,t[12]=0,t[13]=0,t[14]=y,t[15]=0,t}function wE(t){var n=t[0],e=t[1],r=t[3],i=t[4],a=Math.sqrt(n*n+e*e),o=Math.sqrt(r*r+i*i),s=n*i-e*r;if(s<0&&(n<i?a=-a:o=-o),a){var l=1/a;n*=l,e*=l}if(o){var c=1/o;r*=c,i*=c}var u=Math.atan2(e,n),f=gi(u);return[t[6],t[7],a,o,f]}var ea=Ne(),ji=Ne(),iu=ha(),Gt=[fe(),fe(),fe()],OE=fe();function qX(t,n,e,r,i,a){if(!KX(ea,t)||(Jl(ji,ea),ji[3]=0,ji[7]=0,ji[11]=0,ji[15]=1,Math.abs(VP(ji))<1e-8))return!1;var o=ea[3],s=ea[7],l=ea[11],c=ea[12],u=ea[13],f=ea[14],d=ea[15];if(o!==0||s!==0||l!==0){iu[0]=o,iu[1]=s,iu[2]=l,iu[3]=d;var h=Yi(ji,ji);if(!h)return!1;UP(ji,ji),pa(i,iu,ji)}else i[0]=i[1]=i[2]=0,i[3]=1;if(n[0]=c,n[1]=u,n[2]=f,ZX(Gt,ea),e[0]=Ga(Gt[0]),Ns(Gt[0],Gt[0]),r[0]=da(Gt[0],Gt[1]),Ry(Gt[1],Gt[1],Gt[0],1,-r[0]),e[1]=Ga(Gt[1]),Ns(Gt[1],Gt[1]),r[0]/=e[1],r[1]=da(Gt[0],Gt[2]),Ry(Gt[2],Gt[2],Gt[0],1,-r[1]),r[2]=da(Gt[1],Gt[2]),Ry(Gt[2],Gt[2],Gt[1],1,-r[2]),e[2]=Ga(Gt[2]),Ns(Gt[2],Gt[2]),r[1]/=e[2],r[2]/=e[2],Jh(OE,Gt[1],Gt[2]),da(Gt[0],OE)<0)for(var p=0;p<3;p++)e[p]*=-1,Gt[p][0]*=-1,Gt[p][1]*=-1,Gt[p][2]*=-1;return a[0]=.5*Math.sqrt(Math.max(1+Gt[0][0]-Gt[1][1]-Gt[2][2],0)),a[1]=.5*Math.sqrt(Math.max(1-Gt[0][0]+Gt[1][1]-Gt[2][2],0)),a[2]=.5*Math.sqrt(Math.max(1-Gt[0][0]-Gt[1][1]+Gt[2][2],0)),a[3]=.5*Math.sqrt(Math.max(1+Gt[0][0]+Gt[1][1]+Gt[2][2],0)),Gt[2][1]>Gt[1][2]&&(a[0]=-a[0]),Gt[0][2]>Gt[2][0]&&(a[1]=-a[1]),Gt[1][0]>Gt[0][1]&&(a[2]=-a[2]),!0}function KX(t,n){var e=n[15];if(e===0)return!1;for(var r=1/e,i=0;i<16;i++)t[i]=n[i]*r;return!0}function ZX(t,n){t[0][0]=n[0],t[0][1]=n[1],t[0][2]=n[2],t[1][0]=n[4],t[1][1]=n[5],t[1][2]=n[6],t[2][0]=n[8],t[2][1]=n[9],t[2][2]=n[10]}function Ry(t,n,e,r,i){t[0]=n[0]*r+e[0]*i,t[1]=n[1]*r+e[1]*i,t[2]=n[2]*r+e[2]*i}var We=(function(t){return t[t.ORBITING=0]="ORBITING",t[t.EXPLORING=1]="EXPLORING",t[t.TRACKING=2]="TRACKING",t})({}),v1=(function(t){return t[t.DEFAULT=0]="DEFAULT",t[t.ROTATIONAL=1]="ROTATIONAL",t[t.TRANSLATIONAL=2]="TRANSLATIONAL",t[t.CINEMATIC=3]="CINEMATIC",t})({}),hi=(function(t){return t[t.ORTHOGRAPHIC=0]="ORTHOGRAPHIC",t[t.PERSPECTIVE=1]="PERSPECTIVE",t})({}),d5={UPDATED:"updated"},SE=2e-4,h5=(function(){function t(){pt(this,t),this.clipSpaceNearZ=rp.NEGATIVE_ONE,this.eventEmitter=new o5,this.matrix=Ne(),this.right=ke(1,0,0),this.up=ke(0,1,0),this.forward=ke(0,0,1),this.position=ke(0,0,1),this.focalPoint=ke(0,0,0),this.distanceVector=ke(0,0,-1),this.distance=1,this.azimuth=0,this.elevation=0,this.roll=0,this.relAzimuth=0,this.relElevation=0,this.relRoll=0,this.dollyingStep=0,this.maxDistance=1/0,this.minDistance=-1/0,this.zoom=1,this.rotateWorld=!1,this.fov=30,this.near=.1,this.far=1e3,this.aspect=1,this.projectionMatrix=Ne(),this.projectionMatrixInverse=Ne(),this.jitteredProjectionMatrix=void 0,this.enableUpdate=!0,this.type=We.EXPLORING,this.trackingMode=v1.DEFAULT,this.projectionMode=hi.PERSPECTIVE,this.frustum=new BX,this.orthoMatrix=Ne()}return ht(t,[{key:"isOrtho",value:function(){return this.projectionMode===hi.ORTHOGRAPHIC}},{key:"getProjectionMode",value:function(){return this.projectionMode}},{key:"getPerspective",value:function(){return this.jitteredProjectionMatrix||this.projectionMatrix}},{key:"getPerspectiveInverse",value:function(){return this.projectionMatrixInverse}},{key:"getFrustum",value:function(){return this.frustum}},{key:"getPosition",value:function(){return this.position}},{key:"getFocalPoint",value:function(){return this.focalPoint}},{key:"getDollyingStep",value:function(){return this.dollyingStep}},{key:"getNear",value:function(){return this.near}},{key:"getFar",value:function(){return this.far}},{key:"getZoom",value:function(){return this.zoom}},{key:"getOrthoMatrix",value:function(){return this.orthoMatrix}},{key:"getView",value:function(){return this.view}},{key:"setEnableUpdate",value:function(e){this.enableUpdate=e}},{key:"setType",value:function(e,r){return this.type=e,this.type===We.EXPLORING?this.setWorldRotation(!0):this.setWorldRotation(!1),this._getAngles(),this.type===We.TRACKING&&r!==void 0&&this.setTrackingMode(r),this}},{key:"setProjectionMode",value:function(e){return this.projectionMode=e,this}},{key:"setTrackingMode",value:function(e){if(this.type!==We.TRACKING)throw new Error("Impossible to set a tracking mode if the camera is not of tracking type");return this.trackingMode=e,this}},{key:"setWorldRotation",value:function(e){return this.rotateWorld=e,this._getAngles(),this}},{key:"getViewTransform",value:function(){return Yi(Ne(),this.matrix)}},{key:"getWorldTransform",value:function(){return this.matrix}},{key:"jitterProjectionMatrix",value:function(e,r){var i=Wa(Ne(),[e,r,0]);this.jitteredProjectionMatrix=mr(Ne(),i,this.projectionMatrix)}},{key:"clearJitterProjectionMatrix",value:function(){this.jitteredProjectionMatrix=void 0}},{key:"setMatrix",value:function(e){return this.matrix=e,this._update(),this}},{key:"setProjectionMatrix",value:function(e){this.projectionMatrix=e}},{key:"setFov",value:function(e){return this.setPerspective(this.near,this.far,e,this.aspect),this}},{key:"setAspect",value:function(e){return this.setPerspective(this.near,this.far,this.fov,e),this}},{key:"setNear",value:function(e){return this.projectionMode===hi.PERSPECTIVE?this.setPerspective(e,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,e,this.far),this}},{key:"setFar",value:function(e){return this.projectionMode===hi.PERSPECTIVE?this.setPerspective(this.near,e,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,e),this}},{key:"setViewOffset",value:function(e,r,i,a,o,s){return this.aspect=e/r,this.view===void 0&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=r,this.view.offsetX=i,this.view.offsetY=a,this.view.width=o,this.view.height=s,this.projectionMode===hi.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this}},{key:"clearViewOffset",value:function(){return this.view!==void 0&&(this.view.enabled=!1),this.projectionMode===hi.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this}},{key:"setZoom",value:function(e){return this.zoom=e,this.projectionMode===hi.ORTHOGRAPHIC?this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far):this.projectionMode===hi.PERSPECTIVE&&this.setPerspective(this.near,this.far,this.fov,this.aspect),this}},{key:"setZoomByViewportPoint",value:function(e,r){var i=this.canvas.viewport2Canvas({x:r[0],y:r[1]}),a=i.x,o=i.y,s=this.roll;this.rotate(0,0,-s),this.setPosition(a,o),this.setFocalPoint(a,o),this.setZoom(e),this.rotate(0,0,s);var l=this.canvas.viewport2Canvas({x:r[0],y:r[1]}),c=l.x,u=l.y,f=ke(c-a,u-o,0),d=da(f,this.right)/Ga(this.right),h=da(f,this.up)/Ga(this.up),p=this.getPosition(),g=Ut(p,2),y=g[0],m=g[1],x=this.getFocalPoint(),_=Ut(x,2),w=_[0],O=_[1];return this.setPosition(y-d,m-h),this.setFocalPoint(w-d,O-h),this}},{key:"setPerspective",value:function(e,r,i,a){var o;this.projectionMode=hi.PERSPECTIVE,this.fov=i,this.near=e,this.far=r,this.aspect=a;var s=this.near*Math.tan(He(.5*this.fov))/this.zoom,l=2*s,c=this.aspect*l,u=-.5*c;if((o=this.view)!==null&&o!==void 0&&o.enabled){var f=this.view.fullWidth,d=this.view.fullHeight;u+=this.view.offsetX*c/f,s-=this.view.offsetY*l/d,c*=this.view.width/f,l*=this.view.height/d}return XX(this.projectionMatrix,u,u+c,s-l,s,e,this.far,this.clipSpaceNearZ===rp.ZERO),Yi(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this}},{key:"setOrthographic",value:function(e,r,i,a,o,s){var l;this.projectionMode=hi.ORTHOGRAPHIC,this.rright=r,this.left=e,this.top=i,this.bottom=a,this.near=o,this.far=s;var c=(this.rright-this.left)/(2*this.zoom),u=(this.top-this.bottom)/(2*this.zoom),f=(this.rright+this.left)/2,d=(this.top+this.bottom)/2,h=f-c,p=f+c,g=d+u,y=d-u;if((l=this.view)!==null&&l!==void 0&&l.enabled){var m=(this.rright-this.left)/this.view.fullWidth/this.zoom,x=(this.top-this.bottom)/this.view.fullHeight/this.zoom;h+=m*this.view.offsetX,p=h+m*this.view.width,g-=x*this.view.offsetY,y=g-x*this.view.height}return this.clipSpaceNearZ===rp.NEGATIVE_ONE?rC(this.projectionMatrix,h,p,g,y,o,s):iC(this.projectionMatrix,h,p,g,y,o,s),Yi(this.projectionMatrixInverse,this.projectionMatrix),this._getOrthoMatrix(),this.triggerUpdate(),this}},{key:"setPosition",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.position[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.position[2],a=Mr(e,r,i);return this._setPosition(a),this.setFocalPoint(this.focalPoint),this.triggerUpdate(),this}},{key:"setFocalPoint",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.focalPoint[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.focalPoint[2],a=ke(0,1,0);if(this.focalPoint=Mr(e,r,i),this.trackingMode===v1.CINEMATIC){var o=qm(fe(),this.focalPoint,this.position);e=o[0],r=o[1],i=o[2];var s=Ga(o),l=gi(Math.asin(r/s)),c=90+gi(Math.atan2(i,e)),u=Ne();KP(u,u,He(c)),qP(u,u,He(l)),a=wn(fe(),[0,1,0],u)}return Yi(this.matrix,aC(Ne(),this.position,this.focalPoint,a)),this._getAxes(),this._getDistance(),this._getAngles(),this.triggerUpdate(),this}},{key:"getDistance",value:function(){return this.distance}},{key:"getDistanceVector",value:function(){return this.distanceVector}},{key:"setDistance",value:function(e){if(this.distance===e||e<0)return this;this.distance=e,this.distance<SE&&(this.distance=SE),this.dollyingStep=this.distance/100;var r=fe();e=this.distance;var i=this.forward,a=this.focalPoint;return r[0]=e*i[0]+a[0],r[1]=e*i[1]+a[1],r[2]=e*i[2]+a[2],this._setPosition(r),this.triggerUpdate(),this}},{key:"setMaxDistance",value:function(e){return this.maxDistance=e,this}},{key:"setMinDistance",value:function(e){return this.minDistance=e,this}},{key:"setAzimuth",value:function(e){return this.azimuth=Bl(e),this.computeMatrix(),this._getAxes(),this.type===We.ORBITING||this.type===We.EXPLORING?this._getPosition():this.type===We.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this}},{key:"getAzimuth",value:function(){return this.azimuth}},{key:"setElevation",value:function(e){return this.elevation=Bl(e),this.computeMatrix(),this._getAxes(),this.type===We.ORBITING||this.type===We.EXPLORING?this._getPosition():this.type===We.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this}},{key:"getElevation",value:function(){return this.elevation}},{key:"setRoll",value:function(e){return this.roll=Bl(e),this.computeMatrix(),this._getAxes(),this.type===We.ORBITING||this.type===We.EXPLORING?this._getPosition():this.type===We.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this}},{key:"getRoll",value:function(){return this.roll}},{key:"_update",value:function(){this._getAxes(),this._getPosition(),this._getDistance(),this._getAngles(),this._getOrthoMatrix(),this.triggerUpdate()}},{key:"computeMatrix",value:function(){var e=Mo(Vn(),[0,0,1],He(this.roll));Bo(this.matrix);var r=Mo(Vn(),[1,0,0],He((this.rotateWorld&&this.type!==We.TRACKING||this.type===We.TRACKING?1:-1)*this.elevation)),i=Mo(Vn(),[0,1,0],He((this.rotateWorld&&this.type!==We.TRACKING||this.type===We.TRACKING?1:-1)*this.azimuth)),a=Io(Vn(),i,r);a=Io(Vn(),a,e);var o=Gb(Ne(),a);this.type===We.ORBITING||this.type===We.EXPLORING?(Fl(this.matrix,this.matrix,this.focalPoint),mr(this.matrix,this.matrix,o),Fl(this.matrix,this.matrix,[0,0,this.distance])):this.type===We.TRACKING&&(Fl(this.matrix,this.matrix,this.position),mr(this.matrix,this.matrix,o))}},{key:"_setPosition",value:function(e,r,i){this.position=Mr(e,r,i);var a=this.matrix;a[12]=this.position[0],a[13]=this.position[1],a[14]=this.position[2],a[15]=1,this._getOrthoMatrix()}},{key:"_getAxes",value:function(){fa(this.right,Mr(pa(ha(),[1,0,0,0],this.matrix))),fa(this.up,Mr(pa(ha(),[0,1,0,0],this.matrix))),fa(this.forward,Mr(pa(ha(),[0,0,1,0],this.matrix))),Ns(this.right,this.right),Ns(this.up,this.up),Ns(this.forward,this.forward)}},{key:"_getAngles",value:function(){var e=this.distanceVector[0],r=this.distanceVector[1],i=this.distanceVector[2],a=Ga(this.distanceVector);if(a===0){this.elevation=0,this.azimuth=0;return}this.type===We.TRACKING?(this.elevation=gi(Math.asin(r/a)),this.azimuth=gi(Math.atan2(-e,-i))):this.rotateWorld?(this.elevation=gi(Math.asin(r/a)),this.azimuth=gi(Math.atan2(-e,-i))):(this.elevation=-gi(Math.asin(r/a)),this.azimuth=-gi(Math.atan2(-e,-i)))}},{key:"_getPosition",value:function(){fa(this.position,Mr(pa(ha(),[0,0,0,1],this.matrix))),this._getDistance()}},{key:"_getFocalPoint",value:function(){sC(this.distanceVector,[0,0,-this.distance],WG(xc(),this.matrix)),Ro(this.focalPoint,this.position,this.distanceVector),this._getDistance()}},{key:"_getDistance",value:function(){this.distanceVector=qm(fe(),this.focalPoint,this.position),this.distance=Ga(this.distanceVector),this.dollyingStep=this.distance/100}},{key:"_getOrthoMatrix",value:function(){if(this.projectionMode===hi.ORTHOGRAPHIC){var e=this.position,r=Mo(Vn(),[0,0,1],-this.roll*Math.PI/180);Iu(this.orthoMatrix,r,ke((this.rright-this.left)/2-e[0],(this.top-this.bottom)/2-e[1],0),ke(this.zoom,this.zoom,1),e)}}},{key:"triggerUpdate",value:function(){if(this.enableUpdate){var e=this.getViewTransform(),r=mr(Ne(),this.getPerspective(),e);this.getFrustum().extractFromVPMatrix(r),this.eventEmitter.emit(d5.UPDATED)}}},{key:"rotate",value:function(e,r,i){throw new Error(Ge)}},{key:"pan",value:function(e,r){throw new Error(Ge)}},{key:"dolly",value:function(e){throw new Error(Ge)}},{key:"createLandmark",value:function(e,r){throw new Error(Ge)}},{key:"gotoLandmark",value:function(e,r){throw new Error(Ge)}},{key:"cancelLandmarkAnimation",value:function(){throw new Error(Ge)}}])})(),QX=(function(t){return t[t.Standard=0]="Standard",t})({}),jp=(function(t){return t[t.ADDED=0]="ADDED",t[t.REMOVED=1]="REMOVED",t[t.Z_INDEX_CHANGED=2]="Z_INDEX_CHANGED",t})({}),JX=fe(),au=Ne(),tq=Vn();function EE(t){if(t.localDirtyFlag){var n=t.localSkew[0]!==0||t.localSkew[1]!==0;if(n){Iu(t.localTransform,t.localRotation,t.localPosition,ke(1,1,1),t.origin),(t.localSkew[0]!==0||t.localSkew[1]!==0)&&(Bo(au),au[4]=Math.tan(t.localSkew[0]),au[1]=Math.tan(t.localSkew[1]),mr(t.localTransform,t.localTransform,au));var e=Iu(au,cC(tq,0,0,0,1),gr(JX,1,1,1),t.localScale,t.origin);mr(t.localTransform,t.localTransform,e)}else{var r=t.localTransform,i=t.localPosition,a=t.localRotation,o=t.localScale,s=t.origin,l=i[0]!==0||i[1]!==0||i[2]!==0,c=a[3]!==1||a[0]!==0||a[1]!==0||a[2]!==0,u=o[0]!==1||o[1]!==1||o[2]!==1,f=s[0]!==0||s[1]!==0||s[2]!==0;!c&&!u&&!f?l?Wa(r,i):Bo(r):Iu(r,a,i,o,s)}t.localDirtyFlag=!1}}function eq(t,n){t.dirtyFlag&&(n?mr(t.worldTransform,n.worldTransform,t.localTransform):Jl(t.worldTransform,t.localTransform),t.dirtyFlag=!1)}var p5={absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new sc(0,0,0,0)},xt=(function(t){return t.COORDINATE="<coordinate>",t.COLOR="<color>",t.PAINT="<paint>",t.NUMBER="<number>",t.ANGLE="<angle>",t.OPACITY_VALUE="<opacity-value>",t.SHADOW_BLUR="<shadow-blur>",t.LENGTH="<length>",t.PERCENTAGE="<percentage>",t.LENGTH_PERCENTAGE="<length> | <percentage>",t.LENGTH_PERCENTAGE_12="[<length> | <percentage>]{1,2}",t.LENGTH_PERCENTAGE_14="[<length> | <percentage>]{1,4}",t.LIST_OF_POINTS="<list-of-points>",t.PATH="<path>",t.FILTER="<filter>",t.Z_INDEX="<z-index>",t.OFFSET_DISTANCE="<offset-distance>",t.DEFINED_PATH="<defined-path>",t.MARKER="<marker>",t.TRANSFORM="<transform>",t.TRANSFORM_ORIGIN="<transform-origin>",t.TEXT="<text>",t.TEXT_TRANSFORM="<text-transform>",t})({});function _x(t,n,e){t.prototype=n.prototype=e,e.constructor=t}function v5(t,n){var e=Object.create(t.prototype);for(var r in n)e[r]=n[r];return e}function Vf(){}var cf=.7,Fp=1/cf,zl="\\s*([+-]?\\d+)\\s*",uf="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ga="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",nq=/^#([0-9a-f]{3,8})$/,rq=new RegExp(`^rgb\\(${zl},${zl},${zl}\\)$`),iq=new RegExp(`^rgb\\(${ga},${ga},${ga}\\)$`),aq=new RegExp(`^rgba\\(${zl},${zl},${zl},${uf}\\)$`),oq=new RegExp(`^rgba\\(${ga},${ga},${ga},${uf}\\)$`),sq=new RegExp(`^hsl\\(${uf},${ga},${ga}\\)$`),lq=new RegExp(`^hsla\\(${uf},${ga},${ga},${uf}\\)$`),kE={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};_x(Vf,c0,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:ME,formatHex:ME,formatHex8:cq,formatHsl:uq,formatRgb:AE,toString:AE});function ME(){return this.rgb().formatHex()}function cq(){return this.rgb().formatHex8()}function uq(){return g5(this).formatHsl()}function AE(){return this.rgb().formatRgb()}function c0(t){var n,e;return t=(t+"").trim().toLowerCase(),(n=nq.exec(t))?(e=n[1].length,n=parseInt(n[1],16),e===6?TE(n):e===3?new zr(n>>8&15|n>>4&240,n>>4&15|n&240,(n&15)<<4|n&15,1):e===8?nh(n>>24&255,n>>16&255,n>>8&255,(n&255)/255):e===4?nh(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|n&240,((n&15)<<4|n&15)/255):null):(n=rq.exec(t))?new zr(n[1],n[2],n[3],1):(n=iq.exec(t))?new zr(n[1]*255/100,n[2]*255/100,n[3]*255/100,1):(n=aq.exec(t))?nh(n[1],n[2],n[3],n[4]):(n=oq.exec(t))?nh(n[1]*255/100,n[2]*255/100,n[3]*255/100,n[4]):(n=sq.exec(t))?LE(n[1],n[2]/100,n[3]/100,1):(n=lq.exec(t))?LE(n[1],n[2]/100,n[3]/100,n[4]):kE.hasOwnProperty(t)?TE(kE[t]):t==="transparent"?new zr(NaN,NaN,NaN,0):null}function TE(t){return new zr(t>>16&255,t>>8&255,t&255,1)}function nh(t,n,e,r){return r<=0&&(t=n=e=NaN),new zr(t,n,e,r)}function fq(t){return t instanceof Vf||(t=c0(t)),t?(t=t.rgb(),new zr(t.r,t.g,t.b,t.opacity)):new zr}function dq(t,n,e,r){return arguments.length===1?fq(t):new zr(t,n,e,r??1)}function zr(t,n,e,r){this.r=+t,this.g=+n,this.b=+e,this.opacity=+r}_x(zr,dq,v5(Vf,{brighter(t){return t=t==null?Fp:Math.pow(Fp,t),new zr(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?cf:Math.pow(cf,t),new zr(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new zr(Rs(this.r),Rs(this.g),Rs(this.b),Bp(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:PE,formatHex:PE,formatHex8:hq,formatRgb:CE,toString:CE}));function PE(){return`#${ks(this.r)}${ks(this.g)}${ks(this.b)}`}function hq(){return`#${ks(this.r)}${ks(this.g)}${ks(this.b)}${ks((isNaN(this.opacity)?1:this.opacity)*255)}`}function CE(){const t=Bp(this.opacity);return`${t===1?"rgb(":"rgba("}${Rs(this.r)}, ${Rs(this.g)}, ${Rs(this.b)}${t===1?")":`, ${t})`}`}function Bp(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Rs(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function ks(t){return t=Rs(t),(t<16?"0":"")+t.toString(16)}function LE(t,n,e,r){return r<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new Wi(t,n,e,r)}function g5(t){if(t instanceof Wi)return new Wi(t.h,t.s,t.l,t.opacity);if(t instanceof Vf||(t=c0(t)),!t)return new Wi;if(t instanceof Wi)return t;t=t.rgb();var n=t.r/255,e=t.g/255,r=t.b/255,i=Math.min(n,e,r),a=Math.max(n,e,r),o=NaN,s=a-i,l=(a+i)/2;return s?(n===a?o=(e-r)/s+(e<r)*6:e===a?o=(r-n)/s+2:o=(n-e)/s+4,s/=l<.5?a+i:2-a-i,o*=60):s=l>0&&l<1?0:o,new Wi(o,s,l,t.opacity)}function pq(t,n,e,r){return arguments.length===1?g5(t):new Wi(t,n,e,r??1)}function Wi(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}_x(Wi,pq,v5(Vf,{brighter(t){return t=t==null?Fp:Math.pow(Fp,t),new Wi(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?cf:Math.pow(cf,t),new Wi(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,n=isNaN(t)||isNaN(this.s)?0:this.s,e=this.l,r=e+(e<.5?e:1-e)*n,i=2*e-r;return new zr(Iy(t>=240?t-240:t+120,i,r),Iy(t,i,r),Iy(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new Wi(NE(this.h),rh(this.s),rh(this.l),Bp(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 t=Bp(this.opacity);return`${t===1?"hsl(":"hsla("}${NE(this.h)}, ${rh(this.s)*100}%, ${rh(this.l)*100}%${t===1?")":`, ${t})`}`}}));function NE(t){return t=(t||0)%360,t<0?t+360:t}function rh(t){return Math.max(0,Math.min(1,t||0))}function Iy(t,n,e){return(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)*255}function Wn(t,n){if(typeof t!="function"||n!=null&&typeof n!="function")throw new TypeError("Expected a function");var e=function(){for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];var s=n?n.apply(this,a):a[0],l=e.cache;if(l.has(s))return l.get(s);var c=t.apply(this,a);return e.cache=l.set(s,c)||l,c};return e.cache=new(Wn.Cache||Map),Wn.cacheList.push(e.cache),e}Wn.Cache=Map;Wn.cacheList=[];Wn.clearCache=function(){Wn.cacheList.forEach(function(t){return t.clear()})};var _t=(function(t){return t[t.kUnknown=0]="kUnknown",t[t.kNumber=1]="kNumber",t[t.kPercentage=2]="kPercentage",t[t.kEms=3]="kEms",t[t.kPixels=4]="kPixels",t[t.kRems=5]="kRems",t[t.kDegrees=6]="kDegrees",t[t.kRadians=7]="kRadians",t[t.kGradians=8]="kGradians",t[t.kTurns=9]="kTurns",t[t.kMilliseconds=10]="kMilliseconds",t[t.kSeconds=11]="kSeconds",t[t.kInteger=12]="kInteger",t})({}),zi=(function(t){return t[t.kUNumber=0]="kUNumber",t[t.kUPercent=1]="kUPercent",t[t.kULength=2]="kULength",t[t.kUAngle=3]="kUAngle",t[t.kUTime=4]="kUTime",t[t.kUOther=5]="kUOther",t})({}),vq=(function(t){return t[t.kYes=0]="kYes",t[t.kNo=1]="kNo",t})({}),gq=(function(t){return t[t.kYes=0]="kYes",t[t.kNo=1]="kNo",t})({}),yq=[{name:"em",unit_type:_t.kEms},{name:"px",unit_type:_t.kPixels},{name:"deg",unit_type:_t.kDegrees},{name:"rad",unit_type:_t.kRadians},{name:"grad",unit_type:_t.kGradians},{name:"ms",unit_type:_t.kMilliseconds},{name:"s",unit_type:_t.kSeconds},{name:"rem",unit_type:_t.kRems},{name:"turn",unit_type:_t.kTurns}],lc=(function(t){return t[t.kUnknownType=0]="kUnknownType",t[t.kUnparsedType=1]="kUnparsedType",t[t.kKeywordType=2]="kKeywordType",t[t.kUnitType=3]="kUnitType",t[t.kSumType=4]="kSumType",t[t.kProductType=5]="kProductType",t[t.kNegateType=6]="kNegateType",t[t.kInvertType=7]="kInvertType",t[t.kMinType=8]="kMinType",t[t.kMaxType=9]="kMaxType",t[t.kClampType=10]="kClampType",t[t.kTransformType=11]="kTransformType",t[t.kPositionType=12]="kPositionType",t[t.kURLImageType=13]="kURLImageType",t[t.kColorType=14]="kColorType",t[t.kUnsupportedColorType=15]="kUnsupportedColorType",t})({}),mq=function(n){return yq.find(function(e){return e.name===n}).unit_type},bq=function(n){return n?n==="number"?_t.kNumber:n==="percent"||n==="%"?_t.kPercentage:mq(n):_t.kUnknown},xq=function(n){switch(n){case _t.kNumber:case _t.kInteger:return zi.kUNumber;case _t.kPercentage:return zi.kUPercent;case _t.kPixels:return zi.kULength;case _t.kMilliseconds:case _t.kSeconds:return zi.kUTime;case _t.kDegrees:case _t.kRadians:case _t.kGradians:case _t.kTurns:return zi.kUAngle;default:return zi.kUOther}},_q=function(n){switch(n){case zi.kUNumber:return _t.kNumber;case zi.kULength:return _t.kPixels;case zi.kUPercent:return _t.kPercentage;case zi.kUTime:return _t.kSeconds;case zi.kUAngle:return _t.kDegrees;default:return _t.kUnknown}},RE=function(n){var e=1;switch(n){case _t.kPixels:case _t.kDegrees:case _t.kSeconds:break;case _t.kMilliseconds:e=.001;break;case _t.kRadians:e=180/Math.PI;break;case _t.kGradians:e=.9;break;case _t.kTurns:e=360;break}return e},g1=function(n){switch(n){case _t.kNumber:case _t.kInteger:return"";case _t.kPercentage:return"%";case _t.kEms:return"em";case _t.kRems:return"rem";case _t.kPixels:return"px";case _t.kDegrees:return"deg";case _t.kRadians:return"rad";case _t.kGradians:return"grad";case _t.kMilliseconds:return"ms";case _t.kSeconds:return"s";case _t.kTurns:return"turn"}return""},u0=(function(){function t(){pt(this,t)}return ht(t,[{key:"toString",value:function(){return this.buildCSSText(vq.kNo,gq.kNo,"")}},{key:"isNumericValue",value:function(){return this.getType()>=lc.kUnitType&&this.getType()<=lc.kClampType}}],[{key:"isAngle",value:function(e){return e===_t.kDegrees||e===_t.kRadians||e===_t.kGradians||e===_t.kTurns}},{key:"isLength",value:function(e){return e>=_t.kEms&&e<_t.kDegrees}},{key:"isRelativeUnit",value:function(e){return e===_t.kPercentage||e===_t.kEms||e===_t.kRems}},{key:"isTime",value:function(e){return e===_t.kSeconds||e===_t.kMilliseconds}}])})(),wq=(function(t){function n(e){var r;return pt(this,n),r=ee(this,n),r.colorSpace=e,r}return te(n,t),ht(n,[{key:"getType",value:function(){return lc.kColorType}},{key:"to",value:function(r){return this}}])})(u0),Ao=(function(t){return t[t.Constant=0]="Constant",t[t.LinearGradient=1]="LinearGradient",t[t.RadialGradient=2]="RadialGradient",t})({}),ih=(function(t){function n(e,r){var i;return pt(this,n),i=ee(this,n),i.type=e,i.value=r,i}return te(n,t),ht(n,[{key:"clone",value:function(){return new n(this.type,this.value)}},{key:"buildCSSText",value:function(r,i,a){return a}},{key:"getType",value:function(){return lc.kColorType}}])})(u0),Ti=(function(t){function n(e){var r;return pt(this,n),r=ee(this,n),r.value=e,r}return te(n,t),ht(n,[{key:"clone",value:function(){return new n(this.value)}},{key:"getType",value:function(){return lc.kKeywordType}},{key:"buildCSSText",value:function(r,i,a){return a+this.value}}])})(u0),Oq=function(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",r="";return Number.isFinite(n)?r="NaN":n>0?r="infinity":r="-infinity",r+=e},y1=function(n){return _q(xq(n))},Ye=(function(t){function n(e){var r,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:_t.kNumber;pt(this,n),r=ee(this,n);var a;return typeof i=="string"?a=bq(i):a=i,r.unit=a,r.value=e,r}return te(n,t),ht(n,[{key:"clone",value:function(){return new n(this.value,this.unit)}},{key:"equals",value:function(r){var i=r;return this.value===i.value&&this.unit===i.unit}},{key:"getType",value:function(){return lc.kUnitType}},{key:"convertTo",value:function(r){if(this.unit===r)return new n(this.value,this.unit);var i=y1(this.unit);if(i!==y1(r)||i===_t.kUnknown)return null;var a=RE(this.unit)/RE(r);return new n(this.value*a,r)}},{key:"buildCSSText",value:function(r,i,a){var o;switch(this.unit){case _t.kUnknown:break;case _t.kInteger:o=Number(this.value).toFixed(0);break;case _t.kNumber:case _t.kPercentage:case _t.kEms:case _t.kRems:case _t.kPixels:case _t.kDegrees:case _t.kRadians:case _t.kGradians:case _t.kMilliseconds:case _t.kSeconds:case _t.kTurns:{var s=-999999,l=999999,c=this.value,u=g1(this.unit);if(c<s||c>l){var f=g1(this.unit);!Number.isFinite(c)||Number.isNaN(c)?o=Oq(c,f):o=c+(f||"")}else o="".concat(c).concat(u)}}return a+=o,a}}])})(u0),Bi=new Ye(0,"px");new Ye(1,"px");var Gs=new Ye(0,"deg"),wx=(function(t){function n(e,r,i){var a,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;return pt(this,n),a=ee(this,n,["rgb"]),a.r=e,a.g=r,a.b=i,a.alpha=o,a.isNone=s,a}return te(n,t),ht(n,[{key:"clone",value:function(){return new n(this.r,this.g,this.b,this.alpha)}},{key:"buildCSSText",value:function(r,i,a){return"".concat(a,"rgba(").concat(this.r,",").concat(this.g,",").concat(this.b,",").concat(this.alpha,")")}}])})(wq),IE=new Ti("unset"),Sq=new Ti("initial"),Eq=new Ti("inherit"),Dy={"":IE,unset:IE,initial:Sq,inherit:Eq},kq=function(n){return Dy[n]||(Dy[n]=new Ti(n)),Dy[n]},y5=new wx(0,0,0,0,!0),m5=new wx(0,0,0,0),Mq=Wn(function(t,n,e,r){return new wx(t,n,e,r)},function(t,n,e,r){return"rgba(".concat(t,",").concat(n,",").concat(e,",").concat(r,")")}),dn=function(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:_t.kNumber;return new Ye(n,e)};new Ye(50,"%");function Aq(t){var n=t.type,e=t.value;return n==="hex"?"#".concat(e):n==="literal"?e:n==="rgb"?"rgb(".concat(e.join(","),")"):"rgba(".concat(e.join(","),")")}var Tq=(function(){var t={linearGradient:/^(linear\-gradient)/i,repeatingLinearGradient:/^(repeating\-linear\-gradient)/i,radialGradient:/^(radial\-gradient)/i,repeatingRadialGradient:/^(repeating\-radial\-gradient)/i,conicGradient:/^(conic\-gradient)/i,sideOrCorner:/^to (left (top|bottom)|right (top|bottom)|top (left|right)|bottom (left|right)|left|right|top|bottom)/i,extentKeywords:/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,positionKeywords:/^(left|center|right|top|bottom)/i,pixelValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,percentageValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,emValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,angleValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,startCall:/^\(/,endCall:/^\)/,comma:/^,/,hexColor:/^\#([0-9a-fA-F]+)/,literalColor:/^([a-zA-Z]+)/,rgbColor:/^rgb/i,rgbaColor:/^rgba/i,number:/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/},n="";function e(j){throw new Error("".concat(n,": ").concat(j))}function r(){var j=i();return n.length>0&&e("Invalid input not EOF"),j}function i(){return _(a)}function a(){return o("linear-gradient",t.linearGradient,l)||o("repeating-linear-gradient",t.repeatingLinearGradient,l)||o("radial-gradient",t.radialGradient,f)||o("repeating-radial-gradient",t.repeatingRadialGradient,f)||o("conic-gradient",t.conicGradient,f)}function o(j,I,$){return s(I,function(z){var Y=$();return Y&&(D(t.comma)||e("Missing comma before color stops")),{type:j,orientation:Y,colorStops:_(w)}})}function s(j,I){var $=D(j);if($){D(t.startCall)||e("Missing (");var z=I($);return D(t.endCall)||e("Missing )"),z}}function l(){return c()||u()}function c(){return R("directional",t.sideOrCorner,1)}function u(){return R("angular",t.angleValue,1)}function f(){var j,I=d(),$;return I&&(j=[],j.push(I),$=n,D(t.comma)&&(I=d(),I?j.push(I):n=$)),j}function d(){var j=h()||p();if(j)j.at=y();else{var I=g();if(I){j=I;var $=y();$&&(j.at=$)}else{var z=m();z&&(j={type:"default-radial",at:z})}}return j}function h(){var j=R("shape",/^(circle)/i,0);return j&&(j.style=C()||g()),j}function p(){var j=R("shape",/^(ellipse)/i,0);return j&&(j.style=P()||g()),j}function g(){return R("extent-keyword",t.extentKeywords,1)}function y(){if(R("position",/^at/,0)){var j=m();return j||e("Missing positioning value"),j}}function m(){var j=x();if(j.x||j.y)return{type:"position",value:j}}function x(){return{x:P(),y:P()}}function _(j){var I=j(),$=[];if(I)for($.push(I);D(t.comma);)I=j(),I?$.push(I):e("One extra comma");return $}function w(){var j=O();return j||e("Expected color definition"),j.length=P(),j}function O(){return E()||A()||M()||S()}function S(){return R("literal",t.literalColor,0)}function E(){return R("hex",t.hexColor,1)}function M(){return s(t.rgbColor,function(){return{type:"rgb",value:_(T)}})}function A(){return s(t.rgbaColor,function(){return{type:"rgba",value:_(T)}})}function T(){return D(t.number)[1]}function P(){return R("%",t.percentageValue,1)||N()||C()}function N(){return R("position-keyword",t.positionKeywords,1)}function C(){return R("px",t.pixelValue,1)||R("em",t.emValue,1)}function R(j,I,$){var z=D(I);if(z)return{type:j,value:z[$]}}function D(j){var I=/^[\n\r\t\s]+/.exec(n);I&&F(I[0].length);var $=j.exec(n);return $&&F($[0].length),$}function F(j){n=n.substring(j)}return function(j){return n=j,r()}})();function Pq(t,n,e,r){var i=He(r.value),a=0,o=0,s=a+n/2,l=o+e/2,c=Math.abs(n*Math.cos(i))+Math.abs(e*Math.sin(i)),u=t[0]+s-Math.cos(i)*c/2,f=t[1]+l-Math.sin(i)*c/2,d=t[0]+s+Math.cos(i)*c/2,h=t[1]+l+Math.sin(i)*c/2;return{x1:u,y1:f,x2:d,y2:h}}function Cq(t,n,e,r,i,a){var o=r.value,s=i.value;r.unit===_t.kPercentage&&(o=r.value/100*n),i.unit===_t.kPercentage&&(s=i.value/100*e);var l=Math.max(Fr([0,0],[o,s]),Fr([0,e],[o,s]),Fr([n,e],[o,s]),Fr([n,0],[o,s]));return a&&(a instanceof Ye?l=a.value:a instanceof Ti&&(a.value==="closest-side"?l=Math.min(o,n-o,s,e-s):a.value==="farthest-side"?l=Math.max(o,n-o,s,e-s):a.value==="closest-corner"&&(l=Math.min(Fr([0,0],[o,s]),Fr([0,e],[o,s]),Fr([n,e],[o,s]),Fr([n,0],[o,s]))))),{x:o+t[0],y:s+t[1],r:l}}var Lq=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,Nq=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,Rq=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,b5=/[\d.]+:(#[^\s]+|[^\)]+\))/gi;function Iq(t){var n,e=t.length;if(t[e-1].length=(n=t[e-1].length)!==null&&n!==void 0?n:{type:"%",value:"100"},e>1){var r;t[0].length=(r=t[0].length)!==null&&r!==void 0?r:{type:"%",value:"0"}}for(var i=0,a=Number(t[0].length.value),o=1;o<e;o++){var s,l=(s=t[o].length)===null||s===void 0?void 0:s.value;if(!Dt(l)&&!Dt(a)){for(var c=1;c<o-i;c++)t[i+c].length={type:"%",value:"".concat(a+(Number(l)-a)*c/(o-i))};i=o,a=Number(l)}}}var Dq={left:180,top:-90,bottom:90,right:0,"left top":225,"top left":225,"left bottom":135,"bottom left":135,"right top":-45,"top right":-45,"right bottom":45,"bottom right":45},$q=Wn(function(t){var n;return t.type==="angular"?n=Number(t.value):n=Dq[t.value]||0,dn(n,"deg")}),jq=Wn(function(t){var n=50,e=50,r="%",i="%";if((t==null?void 0:t.type)==="position"){var a=t.value,o=a.x,s=a.y;(o==null?void 0:o.type)==="position-keyword"&&(o.value==="left"?n=0:o.value==="center"?n=50:o.value==="right"?n=100:o.value==="top"?e=0:o.value==="bottom"&&(e=100)),(s==null?void 0:s.type)==="position-keyword"&&(s.value==="left"?n=0:s.value==="center"?e=50:s.value==="right"?n=100:s.value==="top"?e=0:s.value==="bottom"&&(e=100)),((o==null?void 0:o.type)==="px"||(o==null?void 0:o.type)==="%"||(o==null?void 0:o.type)==="em")&&(r=o==null?void 0:o.type,n=Number(o.value)),((s==null?void 0:s.type)==="px"||(s==null?void 0:s.type)==="%"||(s==null?void 0:s.type)==="em")&&(i=s==null?void 0:s.type,e=Number(s.value))}return{cx:dn(n,r),cy:dn(e,i)}}),Fq=Wn(function(t){if(t.indexOf("linear")>-1||t.indexOf("radial")>-1){var n=Tq(t);return n.map(function(s){var l=s.type,c=s.orientation,u=s.colorStops;Iq(u);var f=u.map(function(_){return{offset:dn(Number(_.length.value),"%"),color:Aq(_)}});if(l==="linear-gradient")return new ih(Ao.LinearGradient,{angle:c?$q(c):Gs,steps:f});if(l==="radial-gradient"&&(c||(c=[{type:"shape",value:"circle"}]),c[0].type==="shape"&&c[0].value==="circle")){var d=jq(c[0].at),h=d.cx,p=d.cy,g;if(c[0].style){var y=c[0].style,m=y.type,x=y.value;m==="extent-keyword"?g=kq(x):g=dn(x,m)}return new ih(Ao.RadialGradient,{cx:h,cy:p,size:g,steps:f})}})}var e=t[0];if(t[1]==="("||t[2]==="("){if(e==="l"){var r=Lq.exec(t);if(r){var i,a=((i=r[2].match(b5))===null||i===void 0?void 0:i.map(function(s){return s.split(":")}))||[];return[new ih(Ao.LinearGradient,{angle:dn(parseFloat(r[1]),"deg"),steps:a.map(function(s){var l=Ut(s,2),c=l[0],u=l[1];return{offset:dn(Number(c)*100,"%"),color:u}})})]}}else if(e==="r"){var o=Bq(t);if(o)if(tn(o))t=o;else return[new ih(Ao.RadialGradient,o)]}else if(e==="p")return zq(t)}});function Bq(t){var n=Nq.exec(t);if(n){var e,r=((e=n[4].match(b5))===null||e===void 0?void 0:e.map(function(i){return i.split(":")}))||[];return{cx:dn(50,"%"),cy:dn(50,"%"),steps:r.map(function(i){var a=Ut(i,2),o=a[0],s=a[1];return{offset:dn(Number(o)*100,"%"),color:s}})}}return null}function zq(t){var n=Rq.exec(t);if(n){var e=n[1],r=n[2];switch(e){case"a":e="repeat";break;case"x":e="repeat-x";break;case"y":e="repeat-y";break;case"n":e="no-repeat";break;default:e="no-repeat"}return{image:r,repetition:e}}return null}function Ys(t){return t&&!!t.image}function zp(t){return t&&!Dt(t.r)&&!Dt(t.g)&&!Dt(t.b)}var $o=Wn(function(t){if(Ys(t))return Kt({repetition:"repeat"},t);if(Dt(t)&&(t=""),t==="transparent")return m5;if(t==="currentColor")t="black";else if(t==="none")return y5;var n=Fq(t);if(n)return n;var e=c0(t),r=[0,0,0,0];return e!==null&&(r[0]=e.r||0,r[1]=e.g||0,r[2]=e.b||0,r[3]=e.opacity),Mq.apply(void 0,r)});function Wq(t,n){if(!(!zp(t)||!zp(n)))return[[Number(t.r),Number(t.g),Number(t.b),Number(t.alpha)],[Number(n.r),Number(n.g),Number(n.b),Number(n.alpha)],function(e){var r=e.slice();if(r[3])for(var i=0;i<3;i++)r[i]=Math.round(kn(r[i],0,255));return r[3]=kn(r[3],0,1),"rgba(".concat(r.join(","),")")}]}function Xf(t,n){if(Dt(n))return dn(0,"px");if(n="".concat(n).trim().toLowerCase(),isFinite(Number(n))){if("px".search(t)>=0)return dn(Number(n),"px");if("deg".search(t)>=0)return dn(Number(n),"deg")}var e=[];n=n.replace(t,function(i){return e.push(i),"U".concat(i)});var r="U(".concat(t.source,")");return e.map(function(i){return dn(Number(n.replace(new RegExp("U".concat(i),"g"),"").replace(new RegExp(r,"g"),"*0")),i)})[0]}var x5=function(n){return Xf(new RegExp("px","g"),n)},Gq=Wn(x5),Yq=function(n){return Xf(new RegExp("%","g"),n)};Wn(Yq);var _5=function(n){return Qe(n)||isFinite(Number(n))?dn(Number(n)||0,"px"):Xf(new RegExp("px|%|em|rem","g"),n)},m1=Wn(_5),w5=function(n){return Xf(new RegExp("deg|rad|grad|turn","g"),n)},Hq=Wn(w5);function Uq(t,n,e,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,a="",o=t.value||0,s=n.value||0,l=y1(t.unit),c=t.convertTo(l),u=n.convertTo(l);return c&&u?(o=c.value,s=u.value,a=g1(t.unit)):(Ye.isLength(t.unit)||Ye.isLength(n.unit))&&(o=Zr(t,i,e),s=Zr(n,i,e),a="px"),[o,s,function(f){return f+a}]}function Br(t){var n=0;return t.unit===_t.kDegrees?n=t.value:t.unit===_t.kRadians?n=gi(Number(t.value)):t.unit===_t.kTurns?n=YX(Number(t.value)):t.value&&(n=t.value),n}function DE(t,n){var e;return Array.isArray(t)?e=t.map(function(r){return Number(r)}):tn(t)?e=t.split(" ").map(function(r){return Number(r)}):Qe(t)&&(e=[t]),n===2?e.length===1?[e[0],e[0]]:[e[0],e[1]]:n===4?e.length===1?[e[0],e[0],e[0],e[0]]:e.length===2?[e[0],e[1],e[0],e[1]]:e.length===3?[e[0],e[1],e[2],e[1]]:[e[0],e[1],e[2],e[3]]:n==="even"&&e.length%2===1?[].concat(ce(e),ce(e)):e}function Zr(t,n,e){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(t.unit===_t.kPixels)return Number(t.value);if(t.unit===_t.kPercentage&&e){var i=e.nodeName===it.GROUP?e.getLocalBounds():e.getGeometryBounds();return(r?i.min[n]:0)+t.value/100*i.halfExtents[n]*2}return 0}var Vq=function(n){return Xf(/deg|rad|grad|turn|px|%/g,n)},Xq=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function qq(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";if(t=t.toLowerCase().trim(),t==="none")return[];for(var n=/\s*([\w-]+)\(([^)]*)\)/g,e=[],r,i=0;r=n.exec(t);){if(r.index!==i)return[];if(i=r.index+r[0].length,Xq.indexOf(r[1])>-1&&e.push({name:r[1],params:r[2].split(" ").map(function(a){return Vq(a)||$o(a)})}),n.lastIndex===t.length)return e}return[]}function O5(t){return t.toString()}var S5=function(n){return typeof n=="number"?dn(n):/^\s*[-+]?(\d*\.)?\d+\s*$/.test(n)?dn(Number(n)):dn(0)},b1=Wn(S5);Wn(function(t){return tn(t)?t.split(" ").map(b1):t.map(b1)});function Ox(t,n){return[t,n,O5]}function Sx(t,n){return function(e,r){return[e,r,function(i){return O5(kn(i,t,n))}]}}function E5(t,n){if(t.length===n.length)return[t,n,function(e){return e}]}function x1(t){return t.parsedStyle.d.totalLength===0&&(t.parsedStyle.d.totalLength=tH(t.parsedStyle.d.absolutePath)),t.parsedStyle.d.totalLength}function Kq(t){return t.parsedStyle.points.totalLength===0&&(t.parsedStyle.points.totalLength=PX(t.parsedStyle.points.points)),t.parsedStyle.points.totalLength}function Zq(t){for(var n=0;n<t.length;n++){var e=t[n-1],r=t[n],i=r[0];if(i==="M"&&e){var a=e[0],o=[r[1],r[2]],s=void 0;a==="L"||a==="M"?s=[e[1],e[2]]:(a==="C"||a==="A"||a==="Q")&&(s=[e[e.length-2],e[e.length-1]]),s&&Wp(o,s)&&(t.splice(n,1),n--)}}}function Qq(t){for(var n=!1,e=t.length,r=0;r<e;r++){var i=t[r],a=i[0];if(a==="C"||a==="A"||a==="Q"){n=!0;break}}return n}function Jq(t){for(var n=[],e=[],r=[],i=0;i<t.length;i++){var a=t[i],o=a[0];o==="M"?(r.length&&(e.push(r),r=[]),r.push([a[1],a[2]])):o==="Z"?r.length&&(n.push(r),r=[]):r.push([a[1],a[2]])}return r.length>0&&e.push(r),{polygons:n,polylines:e}}function Wp(t,n){return t[0]===n[0]&&t[1]===n[1]}function tK(t,n){for(var e=[],r=[],i=[],a=0;a<t.length;a++){var o=t[a],s=o.currentPoint,l=o.params,c=o.prePoint,u=void 0;switch(o.command){case"Q":u=CX(c[0],c[1],l[1],l[2],l[3],l[4]);break;case"C":u=MX(c[0],c[1],l[1],l[2],l[3],l[4],l[5],l[6]);break;case"A":var f=o.arcParams;u=SX(f.cx,f.cy,f.rx,f.ry,f.xRotation,f.startAngle,f.endAngle);break;default:e.push(s[0]),r.push(s[1]);break}u&&(o.box=u,e.push(u.x,u.x+u.width),r.push(u.y,u.y+u.height))}e=e.filter(function(w){return!Number.isNaN(w)&&w!==1/0&&w!==-1/0}),r=r.filter(function(w){return!Number.isNaN(w)&&w!==1/0&&w!==-1/0});var d=wp(e),h=wp(r),p=_p(e),g=_p(r);if(i.length===0)return{x:d,y:h,width:p-d,height:g-h};for(var y=0;y<i.length;y++){var m=i[y],x=m.currentPoint,_=void 0;x[0]===d?(_=ah(m,n),d-=_.xExtra):x[0]===p&&(_=ah(m,n),p+=_.xExtra),x[1]===h?(_=ah(m,n),h-=_.yExtra):x[1]===g&&(_=ah(m,n),g+=_.yExtra)}return{x:d,y:h,width:p-d,height:g-h}}function ah(t,n){var e=t.prePoint,r=t.currentPoint,i=t.nextPoint,a=Math.pow(r[0]-e[0],2)+Math.pow(r[1]-e[1],2),o=Math.pow(r[0]-i[0],2)+Math.pow(r[1]-i[1],2),s=Math.pow(e[0]-i[0],2)+Math.pow(e[1]-i[1],2),l=Math.acos((a+o-s)/(2*Math.sqrt(a)*Math.sqrt(o)));if(!l||Math.sin(l)===0||Ru(l,0))return{xExtra:0,yExtra:0};var c=Math.abs(Math.atan2(i[1]-r[1],i[0]-r[0])),u=Math.abs(Math.atan2(i[0]-r[0],i[1]-r[1]));c=c>Math.PI/2?Math.PI-c:c,u=u>Math.PI/2?Math.PI-u:u;var f={xExtra:Math.cos(l/2-c)*(n/2*(1/Math.sin(l/2)))-n/2||0,yExtra:Math.cos(u-l/2)*(n/2*(1/Math.sin(l/2)))-n/2||0};return f}function $E(t,n){return[n[0]+(n[0]-t[0]),n[1]+(n[1]-t[1])]}var jE=function(n,e){var r=n.x*e.x+n.y*e.y,i=Math.sqrt((Math.pow(n.x,2)+Math.pow(n.y,2))*(Math.pow(e.x,2)+Math.pow(e.y,2))),a=n.x*e.y-n.y*e.x<0?-1:1,o=a*Math.acos(r/i);return o},FE=function(n,e,r,i,a,o,s,l){e=Math.abs(e),r=Math.abs(r),i=$P(i,360);var c=He(i);if(n.x===s.x&&n.y===s.y)return{x:n.x,y:n.y,ellipticalArcAngle:0};if(e===0||r===0)return{x:0,y:0,ellipticalArcAngle:0};var u=(n.x-s.x)/2,f=(n.y-s.y)/2,d={x:Math.cos(c)*u+Math.sin(c)*f,y:-Math.sin(c)*u+Math.cos(c)*f},h=Math.pow(d.x,2)/Math.pow(e,2)+Math.pow(d.y,2)/Math.pow(r,2);h>1&&(e*=Math.sqrt(h),r*=Math.sqrt(h));var p=Math.pow(e,2)*Math.pow(r,2)-Math.pow(e,2)*Math.pow(d.y,2)-Math.pow(r,2)*Math.pow(d.x,2),g=Math.pow(e,2)*Math.pow(d.y,2)+Math.pow(r,2)*Math.pow(d.x,2),y=p/g;y=y<0?0:y;var m=(a!==o?1:-1)*Math.sqrt(y),x={x:m*(e*d.y/r),y:m*(-(r*d.x)/e)},_={x:Math.cos(c)*x.x-Math.sin(c)*x.y+(n.x+s.x)/2,y:Math.sin(c)*x.x+Math.cos(c)*x.y+(n.y+s.y)/2},w={x:(d.x-x.x)/e,y:(d.y-x.y)/r},O=jE({x:1,y:0},w),S={x:(-d.x-x.x)/e,y:(-d.y-x.y)/r},E=jE(w,S);!o&&E>0?E-=2*Math.PI:o&&E<0&&(E+=2*Math.PI),E%=2*Math.PI;var M=O+E*l,A=e*Math.cos(M),T=r*Math.sin(M),P={x:Math.cos(c)*A-Math.sin(c)*T+_.x,y:Math.sin(c)*A+Math.cos(c)*T+_.y,ellipticalArcStartAngle:O,ellipticalArcEndAngle:O+E,ellipticalArcAngle:M,ellipticalArcCenter:_,resultantRx:e,resultantRy:r};return P};function eK(t){for(var n=[],e=null,r=null,i=null,a=0,o=t.length,s=0;s<o;s++){var l=t[s];r=t[s+1];var c=l[0],u={command:c,prePoint:e,params:l,startTangent:null,endTangent:null,currentPoint:null,nextPoint:null,arcParams:null,box:null,cubicParams:null};switch(c){case"M":i=[l[1],l[2]],a=s;break;case"A":var f=nK(e,l);u.arcParams=f;break}if(c==="Z")e=i,r=t[a+1];else{var d=l.length;e=[l[d-2],l[d-1]]}r&&r[0]==="Z"&&(r=t[a],n[a]&&(n[a].prePoint=e)),u.currentPoint=e,n[a]&&Wp(e,n[a].currentPoint)&&(n[a].prePoint=u.prePoint);var h=r?[r[r.length-2],r[r.length-1]]:null;u.nextPoint=h;var p=u.prePoint;if(["L","H","V"].includes(c))u.startTangent=[p[0]-e[0],p[1]-e[1]],u.endTangent=[e[0]-p[0],e[1]-p[1]];else if(c==="Q"){var g=[l[1],l[2]];u.startTangent=[p[0]-g[0],p[1]-g[1]],u.endTangent=[e[0]-g[0],e[1]-g[1]]}else if(c==="T"){var y=n[s-1],m=$E(y.currentPoint,p);y.command==="Q"?(u.command="Q",u.startTangent=[p[0]-m[0],p[1]-m[1]],u.endTangent=[e[0]-m[0],e[1]-m[1]]):(u.command="TL",u.startTangent=[p[0]-e[0],p[1]-e[1]],u.endTangent=[e[0]-p[0],e[1]-p[1]])}else if(c==="C"){var x=[l[1],l[2]],_=[l[3],l[4]];u.startTangent=[p[0]-x[0],p[1]-x[1]],u.endTangent=[e[0]-_[0],e[1]-_[1]],u.startTangent[0]===0&&u.startTangent[1]===0&&(u.startTangent=[x[0]-_[0],x[1]-_[1]]),u.endTangent[0]===0&&u.endTangent[1]===0&&(u.endTangent=[_[0]-x[0],_[1]-x[1]])}else if(c==="S"){var w=n[s-1],O=$E(w.currentPoint,p),S=[l[1],l[2]];w.command==="C"?(u.command="C",u.startTangent=[p[0]-O[0],p[1]-O[1]],u.endTangent=[e[0]-S[0],e[1]-S[1]]):(u.command="SQ",u.startTangent=[p[0]-S[0],p[1]-S[1]],u.endTangent=[e[0]-S[0],e[1]-S[1]])}else if(c==="A"){var E=BE(u,0),M=E.x,A=E.y,T=BE(u,1,!1),P=T.x,N=T.y;u.startTangent=[M,A],u.endTangent=[P,N]}n.push(u)}return n}function BE(t,n){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,r=t.arcParams,i=r.rx,a=i===void 0?0:i,o=r.ry,s=o===void 0?0:o,l=r.xRotation,c=r.arcFlag,u=r.sweepFlag,f=FE({x:t.prePoint[0],y:t.prePoint[1]},a,s,l,!!c,!!u,{x:t.currentPoint[0],y:t.currentPoint[1]},n),d=FE({x:t.prePoint[0],y:t.prePoint[1]},a,s,l,!!c,!!u,{x:t.currentPoint[0],y:t.currentPoint[1]},e?n+.005:n-.005),h=d.x-f.x,p=d.y-f.y,g=Math.sqrt(h*h+p*p);return{x:-h/g,y:-p/g}}function oh(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function _1(t,n){return oh(t)*oh(n)?(t[0]*n[0]+t[1]*n[1])/(oh(t)*oh(n)):1}function zE(t,n){return(t[0]*n[1]<t[1]*n[0]?-1:1)*Math.acos(_1(t,n))}function nK(t,n){var e=n[1],r=n[2],i=$P(He(n[3]),Math.PI*2),a=n[4],o=n[5],s=t[0],l=t[1],c=n[6],u=n[7],f=Math.cos(i)*(s-c)/2+Math.sin(i)*(l-u)/2,d=-1*Math.sin(i)*(s-c)/2+Math.cos(i)*(l-u)/2,h=f*f/(e*e)+d*d/(r*r);h>1&&(e*=Math.sqrt(h),r*=Math.sqrt(h));var p=e*e*(d*d)+r*r*(f*f),g=p?Math.sqrt((e*e*(r*r)-p)/p):1;a===o&&(g*=-1),isNaN(g)&&(g=0);var y=r?g*e*d/r:0,m=e?g*-r*f/e:0,x=(s+c)/2+Math.cos(i)*y-Math.sin(i)*m,_=(l+u)/2+Math.sin(i)*y+Math.cos(i)*m,w=[(f-y)/e,(d-m)/r],O=[(-1*f-y)/e,(-1*d-m)/r],S=zE([1,0],w),E=zE(w,O);return _1(w,O)<=-1&&(E=Math.PI),_1(w,O)>=1&&(E=0),o===0&&E>0&&(E-=2*Math.PI),o===1&&E<0&&(E+=2*Math.PI),{cx:x,cy:_,rx:Wp(t,[c,u])?0:e,ry:Wp(t,[c,u])?0:r,startAngle:S,endAngle:S+E,xRotation:i,arcFlag:a,sweepFlag:o}}function rK(t,n,e){return t.reduce(function(r,i){var a="";if(i[0]==="M"||i[0]==="L"){var o=ke(i[1],i[2],0);e&&wn(o,o,e),a="".concat(i[0]).concat(o[0],",").concat(o[1])}else if(i[0]==="Z")a=i[0];else if(i[0]==="C"){var s=ke(i[1],i[2],0),l=ke(i[3],i[4],0),c=ke(i[5],i[6],0);e&&(wn(s,s,e),wn(l,l,e),wn(c,c,e)),a="".concat(i[0]).concat(s[0],",").concat(s[1],",").concat(l[0],",").concat(l[1],",").concat(c[0],",").concat(c[1])}else if(i[0]==="A"){var u=ke(i[6],i[7],0);e&&wn(u,u,e),a="".concat(i[0]).concat(i[1],",").concat(i[2],",").concat(i[3],",").concat(i[4],",").concat(i[5],",").concat(u[0],",").concat(u[1])}else if(i[0]==="Q"){var f=ke(i[1],i[2],0),d=ke(i[3],i[4],0);e&&(wn(f,f,e),wn(d,d,e)),a="".concat(i[0]).concat(i[1],",").concat(i[2],",").concat(i[3],",").concat(i[4],"}")}return r+=a},"")}function iK(t,n,e,r){return[["M",t,n],["L",e,r]]}function WE(t,n,e,r){var i=(-1+Math.sqrt(2))/3*4,a=t*i,o=n*i,s=e-t,l=e+t,c=r-n,u=r+n;return[["M",s,r],["C",s,r-o,e-a,c,e,c],["C",e+a,c,l,r-o,l,r],["C",l,r+o,e+a,u,e,u],["C",e-a,u,s,r+o,s,r],["Z"]]}function aK(t,n){var e=t.map(function(r,i){return[i===0?"M":"L",r[0],r[1]]});return n&&e.push(["Z"]),e}function oK(t,n,e,r,i){if(i){var a=Ut(i,4),o=a[0],s=a[1],l=a[2],c=a[3],u=t>0?1:-1,f=n>0?1:-1,d=u+f!==0?1:0;return[["M",u*o+e,r],["L",t-u*s+e,r],s?["A",s,s,0,0,d,t+e,f*s+r]:null,["L",t+e,n-f*l+r],l?["A",l,l,0,0,d,t+e-u*l,n+r]:null,["L",e+u*c,n+r],c?["A",c,c,0,0,d,e,n+r-f*c]:null,["L",e,f*o+r],o?["A",o,o,0,0,d,u*o+e,r]:null,["Z"]].filter(function(h){return h})}return[["M",e,r],["L",e+t,r],["L",e+t,r+n],["L",e,r+n],["Z"]]}function sK(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t.getLocalTransform(),e=[];switch(t.nodeName){case it.LINE:var r=t.parsedStyle,i=r.x1,a=i===void 0?0:i,o=r.y1,s=o===void 0?0:o,l=r.x2,c=l===void 0?0:l,u=r.y2,f=u===void 0?0:u;e=iK(a,s,c,f);break;case it.CIRCLE:{var d=t.parsedStyle,h=d.r,p=h===void 0?0:h,g=d.cx,y=g===void 0?0:g,m=d.cy,x=m===void 0?0:m;e=WE(p,p,y,x);break}case it.ELLIPSE:{var _=t.parsedStyle,w=_.rx,O=w===void 0?0:w,S=_.ry,E=S===void 0?0:S,M=_.cx,A=M===void 0?0:M,T=_.cy,P=T===void 0?0:T;e=WE(O,E,A,P);break}case it.POLYLINE:case it.POLYGON:var N=t.parsedStyle.points;e=aK(N.points,t.nodeName===it.POLYGON);break;case it.RECT:var C=t.parsedStyle,R=C.width,D=R===void 0?0:R,F=C.height,j=F===void 0?0:F,I=C.x,$=I===void 0?0:I,z=C.y,Y=z===void 0?0:z,H=C.radius,V=H&&H.some(function(q){return q!==0});e=oK(D,j,$,Y,V&&H.map(function(q){return kn(q,0,Math.min(Math.abs(D)/2,Math.abs(j)/2))}));break;case it.PATH:var Z=t.parsedStyle.d.absolutePath;e=ce(Z);break}if(e.length)return rK(e,t,n)}var k5=function(n){if(n===""||Array.isArray(n)&&n.length===0)return{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:{x:0,y:0,width:0,height:0}};var e;try{e=Mp(n)}catch{e=Mp(""),console.error("[g]: Invalid SVG Path definition: ".concat(n))}Zq(e);var r=Qq(e),i=Jq(e),a=i.polygons,o=i.polylines,s=eK(e),l=tK(s,0),c=l.x,u=l.y,f=l.width,d=l.height;return{absolutePath:e,hasArc:r,segments:s,polygons:a,polylines:o,totalLength:0,rect:{x:Number.isFinite(c)?c:0,y:Number.isFinite(u)?u:0,width:Number.isFinite(f)?f:0,height:Number.isFinite(d)?d:0}}},lK=Wn(k5);function M5(t){return tn(t)?lK(t):k5(t)}function cK(t,n,e){var r=t.curve,i=n.curve;(!r||r.length===0)&&(r=Qm(t.absolutePath,!1),t.curve=r),(!i||i.length===0)&&(i=Qm(n.absolutePath,!1),n.curve=i);var a=[r,i];r.length!==i.length&&(a=gC(r,i));var o=GS(a[0])!==GS(a[1])?XY(a[0]):VY(a[0]);return[o,nH(a[1],o),function(s){return s}]}function uK(t,n){var e;return tn(t)?e=t.split(" ").map(function(r){var i=r.split(","),a=Ut(i,2),o=a[0],s=a[1];return[Number(o),Number(s)]}):e=t,{points:e,totalLength:0,segments:[]}}function fK(t,n){return[t.points,n.points,function(e){return e}]}var mn=null,Wl=/\s*(\w+)\(([^)]*)\)/g;function $r(t){return function(n){var e=0;return t.map(function(r){return r===mn?n[e++]:r})}}function hs(t){return t}var ff={matrix:["NNNNNN",[mn,mn,0,0,mn,mn,0,0,0,0,1,0,mn,mn,0,1],hs],matrix3d:["NNNNNNNNNNNNNNNN",hs],rotate:["A"],rotateX:["A"],rotateY:["A"],rotateZ:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",$r([mn,mn,new Ye(1)]),hs],scaleX:["N",$r([mn,new Ye(1),new Ye(1)]),$r([mn,new Ye(1)])],scaleY:["N",$r([new Ye(1),mn,new Ye(1)]),$r([new Ye(1),mn])],scaleZ:["N",$r([new Ye(1),new Ye(1),mn])],scale3d:["NNN",hs],skew:["Aa",null,hs],skewX:["A",null,$r([mn,Gs])],skewY:["A",null,$r([Gs,mn])],translate:["Tt",$r([mn,mn,Bi]),hs],translateX:["T",$r([mn,Bi,Bi]),$r([mn,Bi])],translateY:["T",$r([Bi,mn,Bi]),$r([Bi,mn])],translateZ:["L",$r([Bi,Bi,mn])],translate3d:["TTL",hs]};function A5(t){for(var n=[],e=t.length,r=0;r<e;r++){var i=t[r],a=i[0],o=i.slice(1);a==="translate"||a==="skew"?o.length===1&&o.push(0):a==="scale"&&o.length===1&&o.push(o[0]);var s=ff[a];if(!s)return[];var l=o.map(function(c){return dn(c)});n.push({t:a,d:l})}return n}function T5(t){if(Array.isArray(t))return A5(t);if(t=(t||"none").trim(),t==="none")return[];var n=[],e,r=0;for(Wl.lastIndex=0;e=Wl.exec(t);){if(e.index!==r)return[];r=e.index+e[0].length;var i=e[1],a=ff[i];if(!a)return[];var o=e[2].split(","),s=a[0];if(s.length<o.length)return[];for(var l=[],c=0;c<s.length;c++){var u=o[c],f=s[c],d=void 0;if(u?d={A:function(p){return p.trim()==="0"?Gs:Hq(p)},N:b1,T:m1,L:Gq}[f.toUpperCase()](u):d={a:Gs,n:l[0],t:Bi}[f],d===void 0)return[];l.push(d)}if(n.push({t:i,d:l}),Wl.lastIndex===t.length)return n}return[]}function dK(t){if(Array.isArray(t))return A5(t);if(t=(t||"none").trim(),t==="none")return[];var n=[],e,r=0;for(Wl.lastIndex=0;e=Wl.exec(t);){if(e.index!==r)return[];r=e.index+e[0].length;var i=e[1],a=ff[i];if(!a)return[];var o=e[2].split(","),s=a[0];if(s.length<o.length)return[];for(var l=[],c=0;c<s.length;c++){var u=o[c],f=s[c],d=void 0;if(u?d={A:function(p){return p.trim()==="0"?Gs:w5(p)},N:S5,T:_5,L:x5}[f.toUpperCase()](u):d={a:Gs,n:l[0],t:Bi}[f],d===void 0)return[];l.push(d)}if(n.push({t:i,d:l}),Wl.lastIndex===t.length)return n}return[]}function hK(t){var n,e,r,i;switch(t.t){case"rotateX":return i=He(Br(t.d[0])),[1,0,0,0,0,Math.cos(i),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1];case"rotateY":return i=He(Br(t.d[0])),[Math.cos(i),0,-Math.sin(i),0,0,1,0,0,Math.sin(i),0,Math.cos(i),0,0,0,0,1];case"rotate":case"rotateZ":return i=He(Br(t.d[0])),[Math.cos(i),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1,0,0,0,0,1];case"rotate3d":n=t.d[0].value,e=t.d[1].value,r=t.d[2].value,i=He(Br(t.d[3]));var a=n*n+e*e+r*r;if(a===0)n=1,e=0,r=0;else if(a!==1){var o=Math.sqrt(a);n/=o,e/=o,r/=o}var s=Math.sin(i/2),l=s*Math.cos(i/2),c=s*s;return[1-2*(e*e+r*r)*c,2*(n*e*c+r*l),2*(n*r*c-e*l),0,2*(n*e*c-r*l),1-2*(n*n+r*r)*c,2*(e*r*c+n*l),0,2*(n*r*c+e*l),2*(e*r*c-n*l),1-2*(n*n+e*e)*c,0,0,0,0,1];case"scale":return[t.d[0].value,0,0,0,0,t.d[1].value,0,0,0,0,1,0,0,0,0,1];case"scaleX":return[t.d[0].value,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"scaleY":return[1,0,0,0,0,t.d[0].value,0,0,0,0,1,0,0,0,0,1];case"scaleZ":return[1,0,0,0,0,1,0,0,0,0,t.d[0].value,0,0,0,0,1];case"scale3d":return[t.d[0].value,0,0,0,0,t.d[1].value,0,0,0,0,t.d[2].value,0,0,0,0,1];case"skew":var u=He(Br(t.d[0])),f=He(Br(t.d[1]));return[1,Math.tan(f),0,0,Math.tan(u),1,0,0,0,0,1,0,0,0,0,1];case"skewX":return i=He(Br(t.d[0])),[1,0,0,0,Math.tan(i),1,0,0,0,0,1,0,0,0,0,1];case"skewY":return i=He(Br(t.d[0])),[1,Math.tan(i),0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"translate":return n=Zr(t.d[0],0,null)||0,e=Zr(t.d[1],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,n,e,0,1];case"translateX":return n=Zr(t.d[0],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,n,0,0,1];case"translateY":return e=Zr(t.d[0],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,0,e,0,1];case"translateZ":return r=Zr(t.d[0],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,0,0,r,1];case"translate3d":return n=Zr(t.d[0],0,null)||0,e=Zr(t.d[1],0,null)||0,r=Zr(t.d[2],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,n,e,r,1];case"perspective":var d=Zr(t.d[0],0,null)||0,h=d?-1/d:0;return[1,0,0,0,0,1,0,0,0,0,1,h,0,0,0,1];case"matrix":return[t.d[0].value,t.d[1].value,0,0,t.d[2].value,t.d[3].value,0,0,0,0,1,0,t.d[4].value,t.d[5].value,0,1];case"matrix3d":return t.d.map(function(p){return p.value})}}function pK(t,n){return[t[0]*n[0]+t[4]*n[1]+t[8]*n[2]+t[12]*n[3],t[1]*n[0]+t[5]*n[1]+t[9]*n[2]+t[13]*n[3],t[2]*n[0]+t[6]*n[1]+t[10]*n[2]+t[14]*n[3],t[3]*n[0]+t[7]*n[1]+t[11]*n[2]+t[15]*n[3],t[0]*n[4]+t[4]*n[5]+t[8]*n[6]+t[12]*n[7],t[1]*n[4]+t[5]*n[5]+t[9]*n[6]+t[13]*n[7],t[2]*n[4]+t[6]*n[5]+t[10]*n[6]+t[14]*n[7],t[3]*n[4]+t[7]*n[5]+t[11]*n[6]+t[15]*n[7],t[0]*n[8]+t[4]*n[9]+t[8]*n[10]+t[12]*n[11],t[1]*n[8]+t[5]*n[9]+t[9]*n[10]+t[13]*n[11],t[2]*n[8]+t[6]*n[9]+t[10]*n[10]+t[14]*n[11],t[3]*n[8]+t[7]*n[9]+t[11]*n[10]+t[15]*n[11],t[0]*n[12]+t[4]*n[13]+t[8]*n[14]+t[12]*n[15],t[1]*n[12]+t[5]*n[13]+t[9]*n[14]+t[13]*n[15],t[2]*n[12]+t[6]*n[13]+t[10]*n[14]+t[14]*n[15],t[3]*n[12]+t[7]*n[13]+t[11]*n[14]+t[15]*n[15]]}function vK(t){return t.length===0?[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]:t.map(hK).reduce(pK)}function GE(t){var n=[0,0,0],e=[1,1,1],r=[0,0,0],i=[0,0,0,1],a=[0,0,0,1];return qX(vK(t),n,e,r,i,a),[[n,e,r,a,i]]}var gK=(function(){function t(r,i){for(var a=[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],o=0;o<4;o++)for(var s=0;s<4;s++)for(var l=0;l<4;l++)a[o][s]+=i[o][l]*r[l][s];return a}function n(r){return r[0][2]===0&&r[0][3]===0&&r[1][2]===0&&r[1][3]===0&&r[2][0]===0&&r[2][1]===0&&r[2][2]===1&&r[2][3]===0&&r[3][2]===0&&r[3][3]===1}function e(r,i,a,o,s){for(var l=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],c=0;c<4;c++)l[c][3]=s[c];for(var u=0;u<3;u++)for(var f=0;f<3;f++)l[3][u]+=r[f]*l[f][u];var d=o[0],h=o[1],p=o[2],g=o[3],y=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];y[0][0]=1-2*(h*h+p*p),y[0][1]=2*(d*h-p*g),y[0][2]=2*(d*p+h*g),y[1][0]=2*(d*h+p*g),y[1][1]=1-2*(d*d+p*p),y[1][2]=2*(h*p-d*g),y[2][0]=2*(d*p-h*g),y[2][1]=2*(h*p+d*g),y[2][2]=1-2*(d*d+h*h),l=t(l,y);var m=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];a[2]&&(m[2][1]=a[2],l=t(l,m)),a[1]&&(m[2][1]=0,m[2][0]=a[0],l=t(l,m)),a[0]&&(m[2][0]=0,m[1][0]=a[0],l=t(l,m));for(var x=0;x<3;x++)for(var _=0;_<3;_++)l[x][_]*=i[x];return n(l)?[l[0][0],l[0][1],l[1][0],l[1][1],l[3][0],l[3][1]]:l[0].concat(l[1],l[2],l[3])}return e})();function yK(t){return t.toFixed(6).replace(".000000","")}function $y(t,n){var e,r;return t.decompositionPair!==n&&(t.decompositionPair=n,e=GE(t)),n.decompositionPair!==t&&(n.decompositionPair=t,r=GE(n)),e[0]===null||r[0]===null?[[!1],[!0],function(i){return i?n[0].d:t[0].d}]:(e[0].push(0),r[0].push(1),[e,r,function(i){var a=bK(e[0][3],r[0][3],i[5]),o=gK(i[0],i[1],i[2],a,i[4]),s=o.map(yK).join(",");return s}])}function mK(t,n){for(var e=0,r=0;r<t.length;r++)e+=t[r]*n[r];return e}function bK(t,n,e){var r=mK(t,n);r=kn(r,-1,1);var i=[];if(r===1)i=t;else for(var a=Math.acos(r),o=Math.sin(e*a)*1/Math.sqrt(1-r*r),s=0;s<4;s++)i.push(t[s]*(Math.cos(e*a)-r*o)+n[s]*o);return i}function jy(t){return t.replace(/[XY]/,"")}function Fy(t){return t.replace(/(X|Y|Z|3d)?$/,"3d")}var xK=function(n,e){return n==="perspective"&&e==="perspective"||(n==="matrix"||n==="matrix3d")&&(e==="matrix"||e==="matrix3d")};function _K(t,n,e){var r=!1;if(!t.length||!n.length){t.length||(r=!0,t=n,n=[]);for(var i=function(){var P=t[a],N=P.t,C=P.d,R=N.substring(0,5)==="scale"?1:0;n.push({t:N,d:C.map(function(D){return typeof D=="number"?dn(R):dn(R,D.unit)})})},a=0;a<t.length;a++)i()}var o=[],s=[],l=[];if(t.length!==n.length){var c=$y(t,n);o=[c[0]],s=[c[1]],l=[["matrix",[c[2]]]]}else for(var u=0;u<t.length;u++){var f=t[u].t,d=n[u].t,h=t[u].d,p=n[u].d,g=ff[f],y=ff[d],m=void 0;if(xK(f,d)){var x=$y([t[u]],[n[u]]);o.push(x[0]),s.push(x[1]),l.push(["matrix",[x[2]]]);continue}else if(f===d)m=f;else if(g[2]&&y[2]&&jy(f)===jy(d))m=jy(f),h=g[2](h),p=y[2](p);else if(g[1]&&y[1]&&Fy(f)===Fy(d))m=Fy(f),h=g[1](h),p=y[1](p);else{var _=$y(t,n);o=[_[0]],s=[_[1]],l=[["matrix",[_[2]]]];break}for(var w=[],O=[],S=[],E=0;E<h.length;E++){var M=Uq(h[E],p[E],e,!1,E);w[E]=M[0],O[E]=M[1],S.push(M[2])}o.push(w),s.push(O),l.push([m,S])}if(r){var A=o;o=s,s=A}return[o,s,function(T){return T.map(function(P,N){var C=P.map(function(R,D){return l[N][1][D](R)}).join(",");return l[N][0]==="matrix"&&C.split(",").length===16&&(l[N][0]="matrix3d"),l[N][0]==="matrix3d"&&C.split(",").length===6&&(l[N][0]="matrix"),"".concat(l[N][0],"(").concat(C,")")}).join(" ")}]}var wK=Wn(function(t){if(tn(t)){if(t==="text-anchor")return[dn(0,"px"),dn(0,"px")];var n=t.split(" ");return n.length===1&&(n[0]==="top"||n[0]==="bottom"?(n[1]=n[0],n[0]="center"):n[1]="center"),n.length!==2?null:[m1(YE(n[0])),m1(YE(n[1]))]}return[dn(t[0]||0,"px"),dn(t[1]||0,"px")]});function YE(t){return t==="center"?"50%":t==="left"||t==="top"?"0%":t==="right"||t==="bottom"?"100%":t}var Ex=[{n:"display",k:["none"]},{n:"opacity",int:!0,inh:!0,d:"1",syntax:xt.OPACITY_VALUE},{n:"fillOpacity",int:!0,inh:!0,d:"1",syntax:xt.OPACITY_VALUE},{n:"strokeOpacity",int:!0,inh:!0,d:"1",syntax:xt.OPACITY_VALUE},{n:"fill",int:!0,k:["none"],d:"none",syntax:xt.PAINT},{n:"fillRule",k:["nonzero","evenodd"],d:"nonzero"},{n:"stroke",int:!0,k:["none"],d:"none",syntax:xt.PAINT,l:!0},{n:"shadowType",k:["inner","outer","both"],d:"outer",l:!0},{n:"shadowColor",int:!0,syntax:xt.COLOR},{n:"shadowOffsetX",int:!0,l:!0,d:"0",syntax:xt.LENGTH_PERCENTAGE},{n:"shadowOffsetY",int:!0,l:!0,d:"0",syntax:xt.LENGTH_PERCENTAGE},{n:"shadowBlur",int:!0,l:!0,d:"0",syntax:xt.SHADOW_BLUR},{n:"lineWidth",int:!0,inh:!0,d:"1",l:!0,a:["strokeWidth"],syntax:xt.LENGTH_PERCENTAGE},{n:"increasedLineWidthForHitTesting",inh:!0,d:"0",l:!0,syntax:xt.LENGTH_PERCENTAGE},{n:"lineJoin",inh:!0,l:!0,a:["strokeLinejoin"],k:["miter","bevel","round"],d:"miter"},{n:"lineCap",inh:!0,l:!0,a:["strokeLinecap"],k:["butt","round","square"],d:"butt"},{n:"lineDash",int:!0,inh:!0,k:["none"],a:["strokeDasharray"],syntax:xt.LENGTH_PERCENTAGE_12},{n:"lineDashOffset",int:!0,inh:!0,d:"0",a:["strokeDashoffset"],syntax:xt.LENGTH_PERCENTAGE},{n:"offsetPath",syntax:xt.DEFINED_PATH},{n:"offsetDistance",int:!0,syntax:xt.OFFSET_DISTANCE},{n:"dx",int:!0,l:!0,d:"0",syntax:xt.LENGTH_PERCENTAGE},{n:"dy",int:!0,l:!0,d:"0",syntax:xt.LENGTH_PERCENTAGE},{n:"zIndex",ind:!0,int:!0,d:"0",k:["auto"],syntax:xt.Z_INDEX},{n:"visibility",k:["visible","hidden"],ind:!0,inh:!0,int:!0,d:"visible"},{n:"pointerEvents",inh:!0,k:["none","auto","stroke","fill","painted","visible","visiblestroke","visiblefill","visiblepainted","all"],d:"auto"},{n:"filter",ind:!0,l:!0,k:["none"],d:"none",syntax:xt.FILTER},{n:"clipPath",syntax:xt.DEFINED_PATH},{n:"textPath",syntax:xt.DEFINED_PATH},{n:"textPathSide",k:["left","right"],d:"left"},{n:"textPathStartOffset",l:!0,d:"0",syntax:xt.LENGTH_PERCENTAGE},{n:"transform",p:100,int:!0,k:["none"],d:"none",syntax:xt.TRANSFORM},{n:"transformOrigin",p:100,d:"0 0",l:!0,syntax:xt.TRANSFORM_ORIGIN},{n:"cx",int:!0,l:!0,d:"0",syntax:xt.COORDINATE},{n:"cy",int:!0,l:!0,d:"0",syntax:xt.COORDINATE},{n:"cz",int:!0,l:!0,d:"0",syntax:xt.COORDINATE},{n:"r",int:!0,l:!0,d:"0",syntax:xt.LENGTH_PERCENTAGE},{n:"rx",int:!0,l:!0,d:"0",syntax:xt.LENGTH_PERCENTAGE},{n:"ry",int:!0,l:!0,d:"0",syntax:xt.LENGTH_PERCENTAGE},{n:"x",int:!0,l:!0,d:"0",syntax:xt.COORDINATE},{n:"y",int:!0,l:!0,d:"0",syntax:xt.COORDINATE},{n:"z",int:!0,l:!0,d:"0",syntax:xt.COORDINATE},{n:"width",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:xt.LENGTH_PERCENTAGE},{n:"height",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:xt.LENGTH_PERCENTAGE},{n:"radius",int:!0,l:!0,d:"0",syntax:xt.LENGTH_PERCENTAGE_14},{n:"x1",int:!0,l:!0,syntax:xt.COORDINATE},{n:"y1",int:!0,l:!0,syntax:xt.COORDINATE},{n:"z1",int:!0,l:!0,syntax:xt.COORDINATE},{n:"x2",int:!0,l:!0,syntax:xt.COORDINATE},{n:"y2",int:!0,l:!0,syntax:xt.COORDINATE},{n:"z2",int:!0,l:!0,syntax:xt.COORDINATE},{n:"d",int:!0,l:!0,d:"",syntax:xt.PATH,p:50},{n:"points",int:!0,l:!0,syntax:xt.LIST_OF_POINTS,p:50},{n:"text",l:!0,d:"",syntax:xt.TEXT,p:50},{n:"textTransform",l:!0,inh:!0,k:["capitalize","uppercase","lowercase","none"],d:"none",syntax:xt.TEXT_TRANSFORM,p:51},{n:"font",l:!0},{n:"fontSize",int:!0,inh:!0,d:"16px",l:!0,syntax:xt.LENGTH_PERCENTAGE},{n:"fontFamily",l:!0,inh:!0,d:"sans-serif"},{n:"fontStyle",l:!0,inh:!0,k:["normal","italic","oblique"],d:"normal"},{n:"fontWeight",l:!0,inh:!0,k:["normal","bold","bolder","lighter"],d:"normal"},{n:"fontVariant",l:!0,inh:!0,k:["normal","small-caps"],d:"normal"},{n:"lineHeight",l:!0,syntax:xt.LENGTH,int:!0,d:"0"},{n:"letterSpacing",l:!0,syntax:xt.LENGTH,int:!0,d:"0"},{n:"miterLimit",l:!0,syntax:xt.NUMBER,d:function(n){return n===it.PATH||n===it.POLYGON||n===it.POLYLINE?"4":"10"}},{n:"wordWrap",l:!0},{n:"wordWrapWidth",l:!0},{n:"maxLines",l:!0},{n:"textOverflow",l:!0,d:"clip"},{n:"leading",l:!0},{n:"textBaseline",l:!0,inh:!0,k:["top","hanging","middle","alphabetic","ideographic","bottom"],d:"alphabetic"},{n:"textAlign",l:!0,inh:!0,k:["start","center","middle","end","left","right"],d:"start"},{n:"markerStart",syntax:xt.MARKER},{n:"markerEnd",syntax:xt.MARKER},{n:"markerMid",syntax:xt.MARKER},{n:"markerStartOffset",syntax:xt.LENGTH,l:!0,int:!0,d:"0"},{n:"markerEndOffset",syntax:xt.LENGTH,l:!0,int:!0,d:"0"}],OK=new Set(Ex.filter(function(t){return!!t.l}).map(function(t){return t.n})),P5={},SK=(function(){function t(n){var e=this;pt(this,t),this.runtime=n,Ex.forEach(function(r){e.registerMetadata(r)})}return ht(t,[{key:"registerMetadata",value:function(e){[e.n].concat(ce(e.a||[])).forEach(function(r){P5[r]=e})}},{key:"getPropertySyntax",value:function(e){return this.runtime.CSSPropertySyntaxFactory[e]}},{key:"processProperties",value:function(e,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{forceUpdateGeometry:!1};Object.assign(e.attributes,r);var a=e.parsedStyle.clipPath,o=e.parsedStyle.offsetPath;EK(e,r);var s=!!i.forceUpdateGeometry;if(!s){for(var l in r)if(OK.has(l)){s=!0;break}}var c=C5(e);c.has("fill")&&r.fill&&(e.parsedStyle.fill=$o(r.fill)),c.has("stroke")&&r.stroke&&(e.parsedStyle.stroke=$o(r.stroke)),c.has("shadowColor")&&r.shadowColor&&(e.parsedStyle.shadowColor=$o(r.shadowColor)),c.has("filter")&&r.filter&&(e.parsedStyle.filter=qq(r.filter)),c.has("radius")&&!Dt(r.radius)&&(e.parsedStyle.radius=DE(r.radius,4)),c.has("lineDash")&&!Dt(r.lineDash)&&(e.parsedStyle.lineDash=DE(r.lineDash,"even")),c.has("points")&&r.points&&(e.parsedStyle.points=uK(r.points)),c.has("d")&&r.d===""&&(e.parsedStyle.d=Kt({},p5)),c.has("d")&&r.d&&(e.parsedStyle.d=M5(r.d)),c.has("textTransform")&&r.textTransform&&this.runtime.CSSPropertySyntaxFactory[xt.TEXT_TRANSFORM].calculator(null,null,{value:r.textTransform},e,null),c.has("clipPath")&&!Be(r.clipPath)&&this.runtime.CSSPropertySyntaxFactory[xt.DEFINED_PATH].calculator("clipPath",a,r.clipPath,e,this.runtime),c.has("offsetPath")&&r.offsetPath&&this.runtime.CSSPropertySyntaxFactory[xt.DEFINED_PATH].calculator("offsetPath",o,r.offsetPath,e,this.runtime),c.has("transform")&&r.transform&&(e.parsedStyle.transform=T5(r.transform)),c.has("transformOrigin")&&r.transformOrigin&&(e.parsedStyle.transformOrigin=wK(r.transformOrigin)),c.has("markerStart")&&r.markerStart&&(e.parsedStyle.markerStart=this.runtime.CSSPropertySyntaxFactory[xt.MARKER].calculator(null,r.markerStart,r.markerStart,null,null)),c.has("markerEnd")&&r.markerEnd&&(e.parsedStyle.markerEnd=this.runtime.CSSPropertySyntaxFactory[xt.MARKER].calculator(null,r.markerEnd,r.markerEnd,null,null)),c.has("markerMid")&&r.markerMid&&(e.parsedStyle.markerMid=this.runtime.CSSPropertySyntaxFactory[xt.MARKER].calculator("",r.markerMid,r.markerMid,null,null)),c.has("zIndex")&&!Dt(r.zIndex)&&this.runtime.CSSPropertySyntaxFactory[xt.Z_INDEX].postProcessor(e),c.has("offsetDistance")&&!Dt(r.offsetDistance)&&this.runtime.CSSPropertySyntaxFactory[xt.OFFSET_DISTANCE].postProcessor(e),c.has("transform")&&r.transform&&this.runtime.CSSPropertySyntaxFactory[xt.TRANSFORM].postProcessor(e),c.has("transformOrigin")&&r.transformOrigin&&this.runtime.CSSPropertySyntaxFactory[xt.TRANSFORM_ORIGIN].postProcessor(e),s&&(e.geometry.dirty=!0,e.dirty(!0,!0),i.forceUpdateGeometry||this.runtime.sceneGraphService.dirtyToRoot(e))}},{key:"updateGeometry",value:function(e){var r=e.nodeName,i=this.runtime.geometryUpdaterFactory[r];if(i){var a=e.geometry;a.contentBounds||(a.contentBounds=new Fn),a.renderBounds||(a.renderBounds=new Fn);var o=e.parsedStyle,s=i.update(o,e),l=s.cx,c=l===void 0?0:l,u=s.cy,f=u===void 0?0:u,d=s.cz,h=d===void 0?0:d,p=s.hwidth,g=p===void 0?0:p,y=s.hheight,m=y===void 0?0:y,x=s.hdepth,_=x===void 0?0:x,w=[Math.abs(g),Math.abs(m),_],O=o.stroke,S=o.lineWidth,E=S===void 0?1:S,M=o.increasedLineWidthForHitTesting,A=M===void 0?0:M,T=o.shadowType,P=T===void 0?"outer":T,N=o.shadowColor,C=o.filter,R=C===void 0?[]:C,D=o.transformOrigin,F=[c,f,h];a.contentBounds.update(F,w);var j=r===it.POLYLINE||r===it.POLYGON||r===it.PATH?Math.SQRT2:.5,I=O&&!O.isNone;if(I){var $=((E||0)+(A||0))*j;w[0]+=$,w[1]+=$}if(a.renderBounds.update(F,w),N&&P&&P!=="inner"){var z=a.renderBounds,Y=z.min,H=z.max,V=o.shadowBlur,Z=o.shadowOffsetX,q=o.shadowOffsetY,J=V||0,rt=Z||0,K=q||0,ot=Y[0]-J+rt,vt=H[0]+J+rt,yt=Y[1]-J+K,mt=H[1]+J+K;Y[0]=Math.min(Y[0],ot),H[0]=Math.max(H[0],vt),Y[1]=Math.min(Y[1],yt),H[1]=Math.max(H[1],mt),a.renderBounds.setMinMax(Y,H)}R.forEach(function(kt){var Mt=kt.name,Ct=kt.params;if(Mt==="blur"){var ve=Ct[0].value;a.renderBounds.update(a.renderBounds.center,Ro(a.renderBounds.halfExtents,a.renderBounds.halfExtents,[ve,ve,0]))}else if(Mt==="drop-shadow"){var ne=Ct[0].value,Zt=Ct[1].value,Pe=Ct[2].value,qe=a.renderBounds,Se=qe.min,ge=qe.max,Ee=Se[0]-Pe+ne,Ke=ge[0]+Pe+ne,$e=Se[1]-Pe+Zt,we=ge[1]+Pe+Zt;Se[0]=Math.min(Se[0],Ee),ge[0]=Math.max(ge[0],Ke),Se[1]=Math.min(Se[1],$e),ge[1]=Math.max(ge[1],we),a.renderBounds.setMinMax(Se,ge)}}),e.geometry.dirty=!1;var wt=g<0,Ot=m<0,At=(wt?-1:1)*(D?Zr(D[0],0,e,!0):0),$t=(Ot?-1:1)*(D?Zr(D[1],1,e,!0):0);(At||$t)&&e.setOrigin(At,$t)}}},{key:"updateSizeAttenuation",value:function(e,r){e.style.isSizeAttenuation?(e.style.rawLineWidth||(e.style.rawLineWidth=e.style.lineWidth),e.style.lineWidth=(e.style.rawLineWidth||1)/r,e.nodeName===it.CIRCLE&&(e.style.rawR||(e.style.rawR=e.style.r),e.style.r=(e.style.rawR||1)/r)):(e.style.rawLineWidth&&(e.style.lineWidth=e.style.rawLineWidth,delete e.style.rawLineWidth),e.nodeName===it.CIRCLE&&e.style.rawR&&(e.style.r=e.style.rawR,delete e.style.rawR))}}])})();function EK(t,n){var e=C5(t);for(var r in n)e.has(r)&&(t.parsedStyle[r]=n[r])}function C5(t){return t.constructor.PARSED_STYLE_LIST}var kK=(function(){function t(){pt(this,t),this.mixer=Ox}return ht(t,[{key:"calculator",value:function(e,r,i,a){return Br(i)}}])})(),MK=(function(){function t(){pt(this,t)}return ht(t,[{key:"calculator",value:function(e,r,i,a,o){return i instanceof Ti&&(i=null),o.sceneGraphService.updateDisplayObjectDependency(e,r,i,a),e==="clipPath"&&a.forEach(function(s){s.childNodes.length===0&&o.sceneGraphService.dirtyToRoot(s)}),i}}])})(),AK=(function(){function t(){pt(this,t),this.parser=$o,this.mixer=Wq}return ht(t,[{key:"calculator",value:function(e,r,i,a){return i instanceof Ti?i.value==="none"?y5:m5:i}}])})(),TK=(function(){function t(){pt(this,t)}return ht(t,[{key:"calculator",value:function(e,r,i){return i instanceof Ti?[]:i}}])})();function HE(t){var n=t.parsedStyle,e=n.fontSize;return Dt(e)?null:e}var w1=(function(){function t(){pt(this,t),this.mixer=Ox}return ht(t,[{key:"calculator",value:function(e,r,i,a,o){if(Qe(i))return i;if(Ye.isRelativeUnit(i.unit)){if(i.unit===_t.kPercentage)return 0;if(i.unit===_t.kEms){if(a.parentNode){var s=HE(a.parentNode);if(s)return s*=i.value,s}return 0}if(i.unit===_t.kRems){var l;if(a!=null&&(l=a.ownerDocument)!==null&&l!==void 0&&l.documentElement){var c=HE(a.ownerDocument.documentElement);if(c)return c*=i.value,c}return 0}}else return i.value}}])})(),PK=(function(){function t(){pt(this,t),this.mixer=E5}return ht(t,[{key:"calculator",value:function(e,r,i){return i.map(function(a){return a.value})}}])})(),CK=(function(){function t(){pt(this,t),this.mixer=E5}return ht(t,[{key:"calculator",value:function(e,r,i){return i.map(function(a){return a.value})}}])})(),LK=(function(){function t(){pt(this,t)}return ht(t,[{key:"calculator",value:function(e,r,i,a){var o;i instanceof Ti&&(i=null);var s=(o=i)===null||o===void 0?void 0:o.cloneNode(!0);return s&&(s.style.isMarker=!0),s}}])})(),NK=(function(){function t(){pt(this,t),this.mixer=Ox}return ht(t,[{key:"calculator",value:function(e,r,i){return i.value}}])})(),RK=(function(){function t(){pt(this,t),this.mixer=Sx(0,1)}return ht(t,[{key:"calculator",value:function(e,r,i){return i.value}},{key:"postProcessor",value:function(e){var r=e.parsedStyle,i=r.offsetPath,a=r.offsetDistance;if(i){var o=i.nodeName;if(o===it.LINE||o===it.PATH||o===it.POLYLINE){var s=i.getPoint(a);s&&e.setLocalPosition(s.x,s.y)}}}}])})(),IK=(function(){function t(){pt(this,t),this.mixer=Sx(0,1)}return ht(t,[{key:"calculator",value:function(e,r,i){return i.value}}])})(),DK=(function(){function t(){pt(this,t),this.parser=M5,this.mixer=cK}return ht(t,[{key:"calculator",value:function(e,r,i){return i instanceof Ti&&i.value==="unset"?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new sc(0,0,0,0)}:i}}])})(),$K=ht(function t(){pt(this,t),this.mixer=fK}),jK=(function(t){function n(){var e;pt(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=ee(this,n,[].concat(i)),e.mixer=Sx(0,1/0),e}return te(n,t),ht(n)})(w1),FK=(function(){function t(){pt(this,t)}return ht(t,[{key:"calculator",value:function(e,r,i,a){return i instanceof Ti?i.value==="unset"?"":i.value:"".concat(i)}},{key:"postProcessor",value:function(e){e.nodeValue="".concat(e.parsedStyle.text)||""}}])})(),BK=(function(){function t(){pt(this,t)}return ht(t,[{key:"calculator",value:function(e,r,i,a){var o=a.getAttribute("text");if(o){var s=o;i.value==="capitalize"?s=o.charAt(0).toUpperCase()+o.slice(1):i.value==="lowercase"?s=o.toLowerCase():i.value==="uppercase"&&(s=o.toUpperCase()),a.parsedStyle.text=s}return i.value}}])})(),By=new WeakMap;function zK(t,n,e){if(t){var r=typeof t=="string"?document.getElementById(t):t;By.has(r)&&By.get(r).destroy(e),By.set(r,n)}}var kx=typeof window<"u"&&typeof window.document<"u";function WK(t){return!!t.getAttribute}function GK(t,n){for(var e=0,r=t.length;e<r;){var i=e+r>>>1;L5(t[i],n)<0?e=i+1:r=i}return e}function L5(t,n){var e=Number(t.parsedStyle.zIndex||0),r=Number(n.parsedStyle.zIndex||0);if(e===r){var i=t.parentNode;if(i){var a=i.childNodes||[];return a.indexOf(t)-a.indexOf(n)}}return e-r}function N5(t){var n=t;do{var e,r=(e=n.parsedStyle)===null||e===void 0?void 0:e.clipPath;if(r)return n;n=n.parentElement}while(n!==null);return null}var UE="px";function YK(t,n,e){kx&&t.style&&(t.style.width=n+UE,t.style.height=e+UE)}function R5(t,n){if(kx)return document.defaultView.getComputedStyle(t,null).getPropertyValue(n)}function HK(t){var n=R5(t,"width");return n==="auto"?t.offsetWidth:parseFloat(n)}function UK(t){var n=R5(t,"height");return n==="auto"?t.offsetHeight:parseFloat(n)}var VK=1,XK={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"},O1=typeof performance=="object"&&performance.now?performance:Date;function Gp(t){return t.nodeName===it.FRAGMENT?!0:t.getRootNode().nodeName===it.FRAGMENT}function tl(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"auto",n=arguments.length>1?arguments[1]:void 0,e=arguments.length>2?arguments[2]:void 0,r=!1,i=!1,a=!!n&&!n.isNone,o=!!e&&!e.isNone;return t==="visiblepainted"||t==="painted"||t==="auto"?(r=a,i=o):t==="visiblefill"||t==="fill"?r=!0:t==="visiblestroke"||t==="stroke"?i=!0:(t==="visible"||t==="all")&&(r=!0,i=!0),[r,i]}var qK=1,KK=function(){return qK++},ya=typeof self=="object"&&self.self===self?self:typeof global=="object"&&global.global===global?global:{},ZK=Date.now(),QK=function(){return ya.performance&&typeof ya.performance.now=="function"?ya.performance.now():Date.now()-ZK},gu={},VE=Date.now(),JK=function(n){if(typeof n!="function")throw new TypeError("".concat(n," is not a function"));var e=Date.now(),r=e-VE,i=r>16?0:16-r,a=KK();return gu[a]=n,Object.keys(gu).length>1||setTimeout(function(){VE=e;var o=gu;gu={},Object.keys(o).forEach(function(s){return o[s](QK())})},i),a},tZ=function(n){delete gu[n]},eZ=["","webkit","moz","ms","o"],I5=function(n){return typeof n!="string"?JK:n===""?ya.requestAnimationFrame:ya["".concat(n,"RequestAnimationFrame")]},nZ=function(n){return typeof n!="string"?tZ:n===""?ya.cancelAnimationFrame:ya["".concat(n,"CancelAnimationFrame")]||ya["".concat(n,"CancelRequestAnimationFrame")]},rZ=function(n,e){for(var r=0;n[r]!==void 0;){if(e(n[r]))return n[r];r+=1}},D5=rZ(eZ,function(t){return!!I5(t)}),Mx=I5(D5),$5=nZ(D5);ya.requestAnimationFrame=Mx;ya.cancelAnimationFrame=$5;var iZ=(function(){function t(){pt(this,t),this.callbacks=[]}return ht(t,[{key:"getCallbacksNum",value:function(){return this.callbacks.length}},{key:"tapPromise",value:function(e,r){this.callbacks.push(r)}},{key:"promise",value:function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];return Promise.all(this.callbacks.map(function(a){return a.apply(void 0,r)}))}}])})(),aZ=(function(){function t(){pt(this,t),this.callbacks=[]}return ht(t,[{key:"tapPromise",value:function(e,r){this.callbacks.push(r)}},{key:"promise",value:(function(){var n=Fo(yr().mark(function r(){var i,a,o,s,l=arguments;return yr().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:if(!this.callbacks.length){c.next=6;break}return c.next=1,(i=this.callbacks)[0].apply(i,l);case 1:a=c.sent,o=0;case 2:if(!(o<this.callbacks.length-1)){c.next=5;break}return s=this.callbacks[o],c.next=3,s(a);case 3:a=c.sent;case 4:o++,c.next=2;break;case 5:return c.abrupt("return",a);case 6:return c.abrupt("return",null);case 7:case"end":return c.stop()}},r,this)}));function e(){return n.apply(this,arguments)}return e})()}])})(),Er=(function(){function t(){pt(this,t),this.callbacks=[]}return ht(t,[{key:"tap",value:function(e,r){this.callbacks.push(r)}},{key:"call",value:function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];var a=arguments;this.callbacks.forEach(function(o){o.apply(void 0,a)})}}])})(),zy=(function(){function t(){pt(this,t),this.callbacks=[]}return ht(t,[{key:"tap",value:function(e,r){this.callbacks.push(r)}},{key:"call",value:function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];if(this.callbacks.length){for(var a=arguments,o=this.callbacks[0].apply(void 0,a),s=0;s<this.callbacks.length-1;s++){var l=this.callbacks[s];o=l(o)}return o}return null}}])})(),oZ=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],sZ=/([\"\'])[^\'\"]+\1/;function XE(t){var n=t.fontSize,e=n===void 0?16:n,r=t.fontFamily,i=r===void 0?"sans-serif":r,a=t.fontStyle,o=a===void 0?"normal":a,s=t.fontVariant,l=s===void 0?"normal":s,c=t.fontWeight,u=c===void 0?"normal":c;return{fontSize:e,fontFamily:i,fontStyle:o,fontVariant:l,fontWeight:u}}var qE=Wn(function(n){for(var e=XE(n),r=e.fontSize,i=e.fontFamily,a=e.fontStyle,o=e.fontVariant,s=e.fontWeight,l=Qe(r)&&"".concat(r,"px")||"16px",c=i.split(","),u=c.length-1;u>=0;u--){var f=c[u].trim();!sZ.test(f)&&oZ.indexOf(f)<0&&(f='"'.concat(f,'"')),c[u]=f}return"".concat(a," ").concat(o," ").concat(s," ").concat(l," ").concat(c.join(","))},function(t){var n=XE(t),e=n.fontSize,r=n.fontFamily,i=n.fontStyle,a=n.fontVariant,o=n.fontWeight;return"".concat(i,"_").concat(a,"_").concat(o,"_").concat(e,"_").concat(r)}),lZ=1e-6,ou=function(n){return Math.max(n,lZ)};function Wy(t,n,e){return Bo(t),t[4]=Math.tan(n),t[1]=Math.tan(e),t}var $n=Ne(),cZ=Ne(),uZ={scale:function(n){Eo($n,[n[0].value,n[1].value,1].map(function(e){return ou(e)}))},scaleX:function(n){Eo($n,[n[0].value,1,1].map(function(e){return ou(e)}))},scaleY:function(n){Eo($n,[1,n[0].value,1].map(function(e){return ou(e)}))},scaleZ:function(n){Eo($n,[1,1,n[0].value].map(function(e){return ou(e)}))},scale3d:function(n){Eo($n,[n[0].value,n[1].value,n[2].value].map(function(e){return ou(e)}))},translate:function(n){Wa($n,[n[0].value,n[1].value,0])},translateX:function(n){Wa($n,[n[0].value,0,0])},translateY:function(n){Wa($n,[0,n[0].value,0])},translateZ:function(n){Wa($n,[0,0,n[0].value])},translate3d:function(n){Wa($n,[n[0].value,n[1].value,n[2].value])},rotate:function(n){Vm($n,He(Br(n[0])))},rotateX:function(n){QP($n,He(Br(n[0])))},rotateY:function(n){JP($n,He(Br(n[0])))},rotateZ:function(n){Vm($n,He(Br(n[0])))},rotate3d:function(n){ZP($n,He(Br(n[3])),[n[0].value,n[1].value,n[2].value])},skew:function(n){Wy($n,He(n[0].value),He(n[1].value))},skewX:function(n){Wy($n,He(n[0].value),0)},skewY:function(n){Wy($n,0,He(n[0].value))},matrix:function(n){Um($n,n[0].value,n[1].value,0,0,n[2].value,n[3].value,0,0,0,0,1,0,n[4].value,n[5].value,0,1)},matrix3d:function(n){Um.apply(vY,[$n].concat(ce(n.map(function(e){return e.value}))))}},fZ=ke(1,1,1),dZ=fe(),KE={translate:function(n,e){dt.sceneGraphService.setLocalScale(n,fZ,!1),dt.sceneGraphService.setLocalEulerAngles(n,dZ,void 0,void 0,!1),dt.sceneGraphService.setLocalPosition(n,[e[0].value,e[1].value,0],!1),dt.sceneGraphService.dirtyLocalTransform(n,n.transformable)}};function j5(t,n){if(t.length){if(t.length===1&&KE[t[0].t]){KE[t[0].t](n,t[0].d);return}for(var e=Bo(cZ),r=0;r<t.length;r++){var i=t[r],a=i.t,o=i.d,s=uZ[a];s&&(s(o),Yb(e,e,$n))}n.setLocalTransform(e)}else n.resetLocalTransform();return n.getLocalTransform()}var hZ=(function(){function t(){pt(this,t),this.parser=dK,this.mixer=_K}return ht(t,[{key:"calculator",value:function(e,r,i,a){return i instanceof Ti?[]:i}},{key:"postProcessor",value:function(e){j5(e.parsedStyle.transform,e)}}])})(),pZ=(function(){function t(){pt(this,t)}return ht(t,[{key:"postProcessor",value:function(e){var r=e.parsedStyle.transformOrigin;r[0].unit===_t.kPixels&&r[1].unit===_t.kPixels?e.setOrigin(r[0].value,r[1].value):e.getGeometryBounds()}}])})(),vZ=(function(){function t(){pt(this,t)}return ht(t,[{key:"calculator",value:function(e,r,i,a){return i.value}},{key:"postProcessor",value:function(e){if(e.parentNode){var r=e.parentNode,i=r.renderable,a=r.sortable;i&&r.dirty(),a&&(a.dirty=!0,a.dirtyReason=jp.Z_INDEX_CHANGED)}}}])})(),gZ=(function(){function t(){pt(this,t)}return ht(t,[{key:"update",value:function(e,r){var i=e.cx,a=i===void 0?0:i,o=e.cy,s=o===void 0?0:o,l=e.r,c=l===void 0?0:l;return{cx:a,cy:s,hwidth:c,hheight:c}}}])})(),yZ=(function(){function t(){pt(this,t)}return ht(t,[{key:"update",value:function(e,r){var i=e.cx,a=i===void 0?0:i,o=e.cy,s=o===void 0?0:o,l=e.rx,c=l===void 0?0:l,u=e.ry,f=u===void 0?0:u;return{cx:a,cy:s,hwidth:c,hheight:f}}}])})(),mZ=(function(){function t(){pt(this,t)}return ht(t,[{key:"update",value:function(e){var r=e.x1,i=e.y1,a=e.x2,o=e.y2,s=Math.min(r,a),l=Math.max(r,a),c=Math.min(i,o),u=Math.max(i,o),f=l-s,d=u-c,h=f/2,p=d/2;return{cx:s+h,cy:c+p,hwidth:h,hheight:p}}}])})(),bZ=(function(){function t(){pt(this,t)}return ht(t,[{key:"update",value:function(e){var r=e.d,i=r.rect,a=i.x,o=i.y,s=i.width,l=i.height,c=s/2,u=l/2;return{cx:a+c,cy:o+u,hwidth:c,hheight:u}}}])})(),xZ=(function(){function t(){pt(this,t)}return ht(t,[{key:"update",value:function(e){if(e.points&&Cn(e.points.points)){var r=e.points.points,i=Math.min.apply(Math,ce(r.map(function(d){return d[0]}))),a=Math.max.apply(Math,ce(r.map(function(d){return d[0]}))),o=Math.min.apply(Math,ce(r.map(function(d){return d[1]}))),s=Math.max.apply(Math,ce(r.map(function(d){return d[1]}))),l=a-i,c=s-o,u=l/2,f=c/2;return{cx:i+u,cy:o+f,hwidth:u,hheight:f}}return{cx:0,cy:0,hwidth:0,hheight:0}}}])})(),_Z=(function(){function t(){pt(this,t)}return ht(t,[{key:"update",value:function(e,r){var i=e.x,a=i===void 0?0:i,o=e.y,s=o===void 0?0:o,l=e.src,c=e.width,u=c===void 0?0:c,f=e.height,d=f===void 0?0:f,h=u,p=d;return l&&!tn(l)&&(h||(h=l.width,e.width=h),p||(p=l.height,e.height=p)),{cx:a+h/2,cy:s+p/2,hwidth:h/2,hheight:p/2}}}])})(),wZ=(function(){function t(n){pt(this,t),this.globalRuntime=n}return ht(t,[{key:"isReadyToMeasure",value:function(e,r){var i=e.text;return i}},{key:"update",value:function(e,r){var i,a=e.text,o=e.textAlign,s=o===void 0?"start":o,l=e.lineWidth,c=l===void 0?1:l,u=e.textBaseline,f=u===void 0?"alphabetic":u,d=e.dx,h=d===void 0?0:d,p=e.dy,g=p===void 0?0:p,y=e.x,m=y===void 0?0:y,x=e.y,_=x===void 0?0:x;if(!this.isReadyToMeasure(e,r))return e.metrics={font:"",width:0,height:0,lines:[],lineWidths:[],lineHeight:0,maxLineWidth:0,fontProperties:{ascent:0,descent:0,fontSize:0},lineMetrics:[]},{hwidth:0,hheight:0,cx:0,cy:0};var w=(r==null||(i=r.ownerDocument)===null||i===void 0||(i=i.defaultView)===null||i===void 0?void 0:i.getConfig())||{},O=w.offscreenCanvas,S=this.globalRuntime.textService.measureText(a,e,O);e.metrics=S;var E=S.width,M=S.height,A=E/2,T=M/2,P=m+A;s==="center"||s==="middle"?P+=c/2-A:(s==="right"||s==="end")&&(P+=c-A*2);var N=_-T;return f==="middle"?N+=T:f==="top"||f==="hanging"?N+=T*2:f==="alphabetic"||(f==="bottom"||f==="ideographic")&&(N+=0),h&&(P+=h),g&&(N+=g),{cx:P,cy:N,hwidth:A,hheight:T}}}])})(),OZ=(function(){function t(){pt(this,t)}return ht(t,[{key:"update",value:function(e,r){return{cx:0,cy:0,hwidth:0,hheight:0}}}])})(),SZ=(function(){function t(){pt(this,t)}return ht(t,[{key:"update",value:function(e,r){var i=e.x,a=i===void 0?0:i,o=e.y,s=o===void 0?0:o,l=e.width,c=l===void 0?0:l,u=e.height,f=u===void 0?0:u;return{cx:a+c/2,cy:s+f/2,hwidth:c/2,hheight:f/2}}}])})(),f0=(function(){function t(n){pt(this,t),this.eventPhase=t.prototype.NONE,this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.defaultPrevented=!1,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.layer=new lr,this.page=new lr,this.canvas=new lr,this.viewport=new lr,this.composed=!1,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=n}return ht(t,[{key:"name",get:function(){return this.type}},{key:"layerX",get:function(){return this.layer.x}},{key:"layerY",get:function(){return this.layer.y}},{key:"pageX",get:function(){return this.page.x}},{key:"pageY",get:function(){return this.page.y}},{key:"x",get:function(){return this.canvas.x}},{key:"y",get:function(){return this.canvas.y}},{key:"canvasX",get:function(){return this.canvas.x}},{key:"canvasY",get:function(){return this.canvas.y}},{key:"viewportX",get:function(){return this.viewport.x}},{key:"viewportY",get:function(){return this.viewport.y}},{key:"composedPath",value:function(){return this.manager&&(!this.path||this.path[0]!==this.target)&&(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path}},{key:"propagationPath",get:function(){return this.composedPath()}},{key:"preventDefault",value:function(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0}},{key:"stopImmediatePropagation",value:function(){this.propagationImmediatelyStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"initEvent",value:function(){}},{key:"initUIEvent",value:function(){}},{key:"clone",value:function(){throw new Error(Ge)}}])})(),F5=(function(t){function n(){var e;pt(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=ee(this,n,[].concat(i)),e.client=new lr,e.movement=new lr,e.offset=new lr,e.global=new lr,e.screen=new lr,e}return te(n,t),ht(n,[{key:"clientX",get:function(){return this.client.x}},{key:"clientY",get:function(){return this.client.y}},{key:"movementX",get:function(){return this.movement.x}},{key:"movementY",get:function(){return this.movement.y}},{key:"offsetX",get:function(){return this.offset.x}},{key:"offsetY",get:function(){return this.offset.y}},{key:"globalX",get:function(){return this.global.x}},{key:"globalY",get:function(){return this.global.y}},{key:"screenX",get:function(){return this.screen.x}},{key:"screenY",get:function(){return this.screen.y}},{key:"getModifierState",value:function(r){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(r)}},{key:"initMouseEvent",value:function(){throw new Error(Ge)}}])})(f0),S1=(function(t){function n(){var e;pt(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=ee(this,n,[].concat(i)),e.width=0,e.height=0,e.isPrimary=!1,e}return te(n,t),ht(n,[{key:"getCoalescedEvents",value:function(){return this.type==="pointermove"||this.type==="mousemove"||this.type==="touchmove"?[this]:[]}},{key:"getPredictedEvents",value:function(){throw new Error("getPredictedEvents is not supported!")}},{key:"clone",value:function(){return this.manager.clonePointerEvent(this)}}])})(F5),E1=(function(t){function n(){return pt(this,n),ee(this,n,arguments)}return te(n,t),ht(n,[{key:"clone",value:function(){return this.manager.cloneWheelEvent(this)}}])})(F5),ze=(function(t){function n(e,r){var i;return pt(this,n),i=ee(this,n,[null]),i.type=e,i.detail=r,Object.assign(i,r),i}return te(n,t),ht(n)})(f0),B5=(function(){function t(){pt(this,t),this.emitter=new o5}return ht(t,[{key:"on",value:function(e,r,i){return this.addEventListener(e,r,i),this}},{key:"addEventListener",value:function(e,r,i){var a=!1,o=!1;if(DS(i))a=i;else if(i){var s=i.capture;a=s===void 0?!1:s;var l=i.once;o=l===void 0?!1:l}a&&(e+="capture"),r=Xn(r)?r:r.handleEvent;var c=Xn(r)?void 0:r;return o?this.emitter.once(e,r,c):this.emitter.on(e,r,c),this}},{key:"off",value:function(e,r,i){return e?this.removeEventListener(e,r,i):this.removeAllEventListeners(),this}},{key:"removeAllEventListeners",value:function(){var e;(e=this.emitter)===null||e===void 0||e.removeAllListeners()}},{key:"removeEventListener",value:function(e,r,i){var a;if(!this.emitter)return this;var o=DS(i)?i:i==null?void 0:i.capture;o&&(e+="capture"),r=Xn(r)?r:(a=r)===null||a===void 0?void 0:a.handleEvent;var s=Xn(r)?void 0:r;return this.emitter.off(e,r,s),this}},{key:"emit",value:function(e,r){this.dispatchEvent(new ze(e,r))}},{key:"dispatchEventToSelf",value:function(e){e.target||(e.target=this),e.currentTarget=this,this.emitter.emit(e.type,e)}},{key:"dispatchEvent",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=arguments.length>2?arguments[2]:void 0;if(i)return this.dispatchEventToSelf(e),!0;var a;if(this.document)a=this;else if(this.defaultView)a=this.defaultView;else{var o;a=(o=this.ownerDocument)===null||o===void 0?void 0:o.defaultView}if(a){if(e.manager=a.getEventService(),!e.manager)return!1;e.defaultPrevented=!1,e.path?e.path.length=0:e.page=[],r||(e.target=this),e.manager.dispatchEvent(e,e.type,r)}else this.dispatchEventToSelf(e);return!e.defaultPrevented}}])})(),pn=(function(t){function n(){var e;pt(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=ee(this,n,[].concat(i)),e.shadow=!1,e.ownerDocument=null,e.isConnected=!1,e.baseURI="",e.childNodes=[],e.nodeType=0,e.nodeName="",e.nodeValue=null,e.parentNode=null,e.destroyed=!1,e}return te(n,t),ht(n,[{key:"textContent",get:function(){var r="";this.nodeName===it.TEXT&&(r+=this.style.text);var i=Ss(this.childNodes),a;try{for(i.s();!(a=i.n()).done;){var o=a.value;o.nodeName===it.TEXT?r+=o.nodeValue:r+=o.textContent}}catch(s){i.e(s)}finally{i.f()}return r},set:function(r){var i=this;this.childNodes.slice().forEach(function(a){i.removeChild(a)}),this.nodeName===it.TEXT&&(this.style.text="".concat(r))}},{key:"getRootNode",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.parentNode?this.parentNode.getRootNode(r):r.composed&&this.host?this.host.getRootNode(r):this}},{key:"hasChildNodes",value:function(){return this.childNodes.length>0}},{key:"isDefaultNamespace",value:function(r){throw new Error(Ge)}},{key:"lookupNamespaceURI",value:function(r){throw new Error(Ge)}},{key:"lookupPrefix",value:function(r){throw new Error(Ge)}},{key:"normalize",value:function(){throw new Error(Ge)}},{key:"isEqualNode",value:function(r){return this===r}},{key:"isSameNode",value:function(r){return this.isEqualNode(r)}},{key:"parent",get:function(){return this.parentNode}},{key:"parentElement",get:function(){return null}},{key:"nextSibling",get:function(){return null}},{key:"previousSibling",get:function(){return null}},{key:"firstChild",get:function(){return this.childNodes.length>0?this.childNodes[0]:null}},{key:"lastChild",get:function(){return this.childNodes.length>0?this.childNodes[this.childNodes.length-1]:null}},{key:"compareDocumentPosition",value:function(r){if(r===this)return 0;for(var i=r,a=this,o=[i],s=[a];(l=i.parentNode)!==null&&l!==void 0?l:a.parentNode;){var l;i=i.parentNode?(o.push(i.parentNode),i.parentNode):i,a=a.parentNode?(s.push(a.parentNode),a.parentNode):a}if(i!==a)return n.DOCUMENT_POSITION_DISCONNECTED|n.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|n.DOCUMENT_POSITION_PRECEDING;var c=o.length>s.length?o:s,u=c===o?s:o;if(c[c.length-u.length]===u[0])return c===o?n.DOCUMENT_POSITION_CONTAINED_BY|n.DOCUMENT_POSITION_FOLLOWING:n.DOCUMENT_POSITION_CONTAINS|n.DOCUMENT_POSITION_PRECEDING;for(var f=c.length-u.length,d=u.length-1;d>=0;d--){var h=u[d],p=c[f+d];if(p!==h){var g=h.parentNode.childNodes;return g.indexOf(h)<g.indexOf(p)?u===o?n.DOCUMENT_POSITION_PRECEDING:n.DOCUMENT_POSITION_FOLLOWING:c===o?n.DOCUMENT_POSITION_PRECEDING:n.DOCUMENT_POSITION_FOLLOWING}}return n.DOCUMENT_POSITION_FOLLOWING}},{key:"contain",value:function(r){return this.contains(r)}},{key:"contains",value:function(r){for(var i=r;i&&this!==i;)i=i.parentNode;return!!i}},{key:"getAncestor",value:function(r){for(var i=this;r>0&&i;)i=i.parentNode,r--;return i}},{key:"forEach",value:function(r){for(var i=[this];i.length>0;){var a=i.pop(),o=r(a);if(o===!1)break;for(var s=a.childNodes.length-1;s>=0;s--)i.push(a.childNodes[s])}}}],[{key:"isNode",value:function(r){return!!r.childNodes}}])})(B5);pn.DOCUMENT_POSITION_DISCONNECTED=1;pn.DOCUMENT_POSITION_PRECEDING=2;pn.DOCUMENT_POSITION_FOLLOWING=4;pn.DOCUMENT_POSITION_CONTAINS=8;pn.DOCUMENT_POSITION_CONTAINED_BY=16;pn.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32;var EZ=2048,kZ=(function(){function t(n,e){var r=this;pt(this,t),this.nativeHTMLMap=new WeakMap,this.cursor="default",this.mappingTable={},this.mappingState={trackingData:{}},this.eventPool=new Map,this.tmpMatrix=Ne(),this.tmpVec3=fe(),this.onPointerDown=function(i){var a=r.createPointerEvent(i);if(r.dispatchEvent(a,"pointerdown"),a.pointerType==="touch")r.dispatchEvent(a,"touchstart");else if(a.pointerType==="mouse"||a.pointerType==="pen"){var o=a.button===2;r.dispatchEvent(a,o?"rightdown":"mousedown")}var s=r.trackingData(i.pointerId);s.pressTargetsByButton[i.button]=a.composedPath(),r.freeEvent(a)},this.onPointerUp=function(i){var a=O1.now(),o=r.createPointerEvent(i,void 0,void 0,r.context.config.alwaysTriggerPointerEventOnCanvas?r.rootTarget:void 0);if(r.dispatchEvent(o,"pointerup"),o.pointerType==="touch")r.dispatchEvent(o,"touchend");else if(o.pointerType==="mouse"||o.pointerType==="pen"){var s=o.button===2;r.dispatchEvent(o,s?"rightup":"mouseup")}var l=r.trackingData(i.pointerId),c=r.findMountedTarget(l.pressTargetsByButton[i.button]),u=c;if(c&&!o.composedPath().includes(c)){for(var f=c;f&&!o.composedPath().includes(f);){if(o.currentTarget=f,r.notifyTarget(o,"pointerupoutside"),o.pointerType==="touch")r.notifyTarget(o,"touchendoutside");else if(o.pointerType==="mouse"||o.pointerType==="pen"){var d=o.button===2;r.notifyTarget(o,d?"rightupoutside":"mouseupoutside")}pn.isNode(f)&&(f=f.parentNode)}delete l.pressTargetsByButton[i.button],u=f}if(u){var h,p=r.clonePointerEvent(o,"click");p.target=u,p.path=[],l.clicksByButton[i.button]||(l.clicksByButton[i.button]={clickCount:0,target:p.target,timeStamp:a});var g=r.context.renderingContext.root.ownerDocument.defaultView,y=l.clicksByButton[i.button];y.target===p.target&&a-y.timeStamp<g.getConfig().dblClickSpeed?++y.clickCount:y.clickCount=1,y.target=p.target,y.timeStamp=a,p.detail=y.clickCount,(h=o.detail)!==null&&h!==void 0&&h.preventClick||(!r.context.config.useNativeClickEvent&&(p.pointerType==="mouse"||p.pointerType==="touch")&&r.dispatchEvent(p,"click"),r.dispatchEvent(p,"pointertap")),r.freeEvent(p)}r.freeEvent(o)},this.onPointerMove=function(i){var a=r.createPointerEvent(i,void 0,void 0,r.context.config.alwaysTriggerPointerEventOnCanvas?r.rootTarget:void 0),o=a.pointerType==="mouse"||a.pointerType==="pen",s=r.trackingData(i.pointerId),l=r.findMountedTarget(s.overTargets);if(s.overTargets&&l!==a.target){var c=i.type==="mousemove"?"mouseout":"pointerout",u=r.createPointerEvent(i,c,l||void 0);if(r.dispatchEvent(u,"pointerout"),o&&r.dispatchEvent(u,"mouseout"),!a.composedPath().includes(l)){var f=r.createPointerEvent(i,"pointerleave",l||void 0);for(f.eventPhase=f.AT_TARGET;f.target&&!a.composedPath().includes(f.target);)f.currentTarget=f.target,r.notifyTarget(f),o&&r.notifyTarget(f,"mouseleave"),pn.isNode(f.target)&&(f.target=f.target.parentNode);r.freeEvent(f)}r.freeEvent(u)}if(l!==a.target){var d=i.type==="mousemove"?"mouseover":"pointerover",h=r.clonePointerEvent(a,d);r.dispatchEvent(h,"pointerover"),o&&r.dispatchEvent(h,"mouseover");for(var p=l&&pn.isNode(l)&&l.parentNode;p&&p!==(pn.isNode(r.rootTarget)&&r.rootTarget.parentNode)&&p!==a.target;)p=p.parentNode;var g=!p||p===(pn.isNode(r.rootTarget)&&r.rootTarget.parentNode);if(g){var y=r.clonePointerEvent(a,"pointerenter");for(y.eventPhase=y.AT_TARGET;y.target&&y.target!==l&&y.target!==(pn.isNode(r.rootTarget)&&r.rootTarget.parentNode);)y.currentTarget=y.target,r.notifyTarget(y),o&&r.notifyTarget(y,"mouseenter"),pn.isNode(y.target)&&(y.target=y.target.parentNode);r.freeEvent(y)}r.freeEvent(h)}r.dispatchEvent(a,"pointermove"),a.pointerType==="touch"&&r.dispatchEvent(a,"touchmove"),o&&(r.dispatchEvent(a,"mousemove"),r.cursor=r.getCursor(a.target)),s.overTargets=a.composedPath(),r.freeEvent(a)},this.onPointerOut=function(i){var a=r.trackingData(i.pointerId);if(a.overTargets){var o=i.pointerType==="mouse"||i.pointerType==="pen",s=r.findMountedTarget(a.overTargets),l=r.createPointerEvent(i,"pointerout",s||void 0);r.dispatchEvent(l),o&&r.dispatchEvent(l,"mouseout");var c=r.createPointerEvent(i,"pointerleave",s||void 0);for(c.eventPhase=c.AT_TARGET;c.target&&c.target!==(pn.isNode(r.rootTarget)&&r.rootTarget.parentNode);)c.currentTarget=c.target,r.notifyTarget(c),o&&r.notifyTarget(c,"mouseleave"),pn.isNode(c.target)&&(c.target=c.target.parentNode);a.overTargets=null,r.freeEvent(l),r.freeEvent(c)}r.cursor=null},this.onPointerOver=function(i){var a=r.trackingData(i.pointerId),o=r.createPointerEvent(i),s=o.pointerType==="mouse"||o.pointerType==="pen";r.dispatchEvent(o,"pointerover"),s&&r.dispatchEvent(o,"mouseover"),o.pointerType==="mouse"&&(r.cursor=r.getCursor(o.target));var l=r.clonePointerEvent(o,"pointerenter");for(l.eventPhase=l.AT_TARGET;l.target&&l.target!==(pn.isNode(r.rootTarget)&&r.rootTarget.parentNode);)l.currentTarget=l.target,r.notifyTarget(l),s&&r.notifyTarget(l,"mouseenter"),pn.isNode(l.target)&&(l.target=l.target.parentNode);a.overTargets=o.composedPath(),r.freeEvent(o),r.freeEvent(l)},this.onPointerUpOutside=function(i){var a=r.trackingData(i.pointerId),o=r.findMountedTarget(a.pressTargetsByButton[i.button]),s=r.createPointerEvent(i);if(o){for(var l=o;l;)s.currentTarget=l,r.notifyTarget(s,"pointerupoutside"),s.pointerType==="touch"||(s.pointerType==="mouse"||s.pointerType==="pen")&&r.notifyTarget(s,s.button===2?"rightupoutside":"mouseupoutside"),pn.isNode(l)&&(l=l.parentNode);delete a.pressTargetsByButton[i.button]}r.freeEvent(s)},this.onWheel=function(i){var a=r.createWheelEvent(i);r.dispatchEvent(a),r.freeEvent(a)},this.onClick=function(i){if(r.context.config.useNativeClickEvent){var a=r.createPointerEvent(i);r.dispatchEvent(a),r.freeEvent(a)}},this.onPointerCancel=function(i){var a=r.createPointerEvent(i,void 0,void 0,r.context.config.alwaysTriggerPointerEventOnCanvas?r.rootTarget:void 0);r.dispatchEvent(a),r.freeEvent(a)},this.globalRuntime=n,this.context=e}return ht(t,[{key:"init",value:function(){this.rootTarget=this.context.renderingContext.root.parentNode,this.addEventMapping("pointerdown",this.onPointerDown),this.addEventMapping("pointerup",this.onPointerUp),this.addEventMapping("pointermove",this.onPointerMove),this.addEventMapping("pointerout",this.onPointerOut),this.addEventMapping("pointerleave",this.onPointerOut),this.addEventMapping("pointercancel",this.onPointerCancel),this.addEventMapping("pointerover",this.onPointerOver),this.addEventMapping("pointerupoutside",this.onPointerUpOutside),this.addEventMapping("wheel",this.onWheel),this.addEventMapping("click",this.onClick)}},{key:"destroy",value:function(){this.mappingTable={},this.mappingState={},this.eventPool.clear()}},{key:"getScale",value:function(){var e=this.context.contextService.getBoundingClientRect(),r=1,i=1,a=this.context.contextService.getDomElement();if(a&&e){var o=a.offsetWidth,s=a.offsetHeight;o&&s&&(r=e.width/o,i=e.height/s)}return{scaleX:r,scaleY:i,bbox:e}}},{key:"client2Viewport",value:function(e){var r=this.getScale(),i=r.scaleX,a=r.scaleY,o=r.bbox;return new lr((e.x-((o==null?void 0:o.left)||0))/i,(e.y-((o==null?void 0:o.top)||0))/a)}},{key:"viewport2Client",value:function(e){var r=this.getScale(),i=r.scaleX,a=r.scaleY,o=r.bbox;return new lr((e.x+((o==null?void 0:o.left)||0))*i,(e.y+((o==null?void 0:o.top)||0))*a)}},{key:"viewport2Canvas",value:function(e){var r=e.x,i=e.y,a=this.rootTarget.defaultView,o=a.getCamera(),s=this.context.config,l=s.width,c=s.height,u=o.getPerspectiveInverse(),f=o.getWorldTransform(),d=mr(this.tmpMatrix,f,u),h=gr(this.tmpVec3,r/l*2-1,(1-i/c)*2-1,0);return wn(h,h,d),new lr(h[0],h[1])}},{key:"canvas2Viewport",value:function(e){var r=this.rootTarget.defaultView,i=r.getCamera(),a=i.getPerspective(),o=i.getViewTransform(),s=mr(this.tmpMatrix,a,o),l=gr(this.tmpVec3,e.x,e.y,0);wn(this.tmpVec3,this.tmpVec3,s);var c=this.context.config,u=c.width,f=c.height;return new lr((l[0]+1)/2*u,(1-(l[1]+1)/2)*f)}},{key:"setPickHandler",value:function(e){this.pickHandler=e}},{key:"addEventMapping",value:function(e,r){this.mappingTable[e]||(this.mappingTable[e]=[]),this.mappingTable[e].push({fn:r,priority:0}),this.mappingTable[e].sort(function(i,a){return i.priority-a.priority})}},{key:"mapEvent",value:function(e){if(this.rootTarget){var r=this.mappingTable[e.type];if(r)for(var i=0,a=r.length;i<a;i++)r[i].fn(e);else console.warn("[EventService]: Event mapping not defined for ".concat(e.type))}}},{key:"dispatchEvent",value:function(e,r,i){if(!i)e.propagationStopped=!1,e.propagationImmediatelyStopped=!1,this.propagate(e,r);else{e.eventPhase=e.AT_TARGET;var a=this.rootTarget.defaultView||null;e.currentTarget=a,this.notifyListeners(e,r)}}},{key:"propagate",value:function(e,r){if(e.target){var i=e.composedPath();e.eventPhase=e.CAPTURING_PHASE;for(var a=i.length-1;a>=1;a--)if(e.currentTarget=i[a],this.notifyTarget(e,r),e.propagationStopped||e.propagationImmediatelyStopped)return;if(e.eventPhase=e.AT_TARGET,e.currentTarget=e.target,this.notifyTarget(e,r),!(e.propagationStopped||e.propagationImmediatelyStopped)){var o=i.indexOf(e.currentTarget);e.eventPhase=e.BUBBLING_PHASE;for(var s=o+1;s<i.length;s++)if(e.currentTarget=i[s],this.notifyTarget(e,r),e.propagationStopped||e.propagationImmediatelyStopped)return}}}},{key:"propagationPath",value:function(e){var r=[e],i=this.rootTarget.defaultView||null;if(i&&i===e)return r.unshift(i.document),r;for(var a=0;a<EZ&&e!==this.rootTarget;a++)pn.isNode(e)&&e.parentNode&&(r.push(e.parentNode),e=e.parentNode);return i&&r.push(i),r}},{key:"hitTest",value:function(e){var r=e.viewportX,i=e.viewportY,a=this.context.config,o=a.width,s=a.height,l=a.disableHitTesting;return r<0||i<0||r>o||i>s?null:!l&&this.pickHandler(e)||this.rootTarget||null}},{key:"isNativeEventFromCanvas",value:function(e,r){var i,a=r==null?void 0:r.target;if((i=a)!==null&&i!==void 0&&i.shadowRoot&&(a=r.composedPath()[0]),a){if(a===e)return!0;if(e&&e.contains)return e.contains(a)}return r!=null&&r.composedPath?r.composedPath().indexOf(e)>-1:!1}},{key:"getExistedHTML",value:function(e){if(e.nativeEvent.composedPath)for(var r=0,i=e.nativeEvent.composedPath();r<i.length;r++){var a=i[r],o=this.nativeHTMLMap.get(a);if(o)return o}return null}},{key:"pickTarget",value:function(e){return this.hitTest({clientX:e.clientX,clientY:e.clientY,viewportX:e.viewportX,viewportY:e.viewportY,x:e.canvasX,y:e.canvasY})}},{key:"createPointerEvent",value:function(e,r,i,a){var o=this.allocateEvent(S1);this.copyPointerData(e,o),this.copyMouseData(e,o),this.copyData(e,o),o.nativeEvent=e.nativeEvent,o.originalEvent=e;var s=this.getExistedHTML(o),l=this.context.contextService.getDomElement();return o.target=i??(s||this.isNativeEventFromCanvas(l,o.nativeEvent)&&this.pickTarget(o)||a),typeof r=="string"&&(o.type=r),o}},{key:"createWheelEvent",value:function(e){var r=this.allocateEvent(E1);this.copyWheelData(e,r),this.copyMouseData(e,r),this.copyData(e,r),r.nativeEvent=e.nativeEvent,r.originalEvent=e;var i=this.getExistedHTML(r),a=this.context.contextService.getDomElement();return r.target=i||this.isNativeEventFromCanvas(a,r.nativeEvent)&&this.pickTarget(r),r}},{key:"trackingData",value:function(e){return this.mappingState.trackingData[e]||(this.mappingState.trackingData[e]={pressTargetsByButton:{},clicksByButton:{},overTarget:null}),this.mappingState.trackingData[e]}},{key:"cloneWheelEvent",value:function(e){var r=this.allocateEvent(E1);return r.nativeEvent=e.nativeEvent,r.originalEvent=e.originalEvent,this.copyWheelData(e,r),this.copyMouseData(e,r),this.copyData(e,r),r.target=e.target,r.path=e.composedPath().slice(),r.type=e.type,r}},{key:"clonePointerEvent",value:function(e,r){var i=this.allocateEvent(S1);return i.nativeEvent=e.nativeEvent,i.originalEvent=e.originalEvent,this.copyPointerData(e,i),this.copyMouseData(e,i),this.copyData(e,i),i.target=e.target,i.path=e.composedPath().slice(),i.type=r??i.type,i}},{key:"copyPointerData",value:function(e,r){r.pointerId=e.pointerId,r.width=e.width,r.height=e.height,r.isPrimary=e.isPrimary,r.pointerType=e.pointerType,r.pressure=e.pressure,r.tangentialPressure=e.tangentialPressure,r.tiltX=e.tiltX,r.tiltY=e.tiltY,r.twist=e.twist}},{key:"copyMouseData",value:function(e,r){r.altKey=e.altKey,r.button=e.button,r.buttons=e.buttons,r.ctrlKey=e.ctrlKey,r.metaKey=e.metaKey,r.shiftKey=e.shiftKey,r.client.copyFrom(e.client),r.movement.copyFrom(e.movement),r.canvas.copyFrom(e.canvas),r.screen.copyFrom(e.screen),r.global.copyFrom(e.global),r.offset.copyFrom(e.offset)}},{key:"copyWheelData",value:function(e,r){r.deltaMode=e.deltaMode,r.deltaX=e.deltaX,r.deltaY=e.deltaY,r.deltaZ=e.deltaZ}},{key:"copyData",value:function(e,r){r.isTrusted=e.isTrusted,r.timeStamp=O1.now(),r.type=e.type,r.detail=e.detail,r.view=e.view,r.page.copyFrom(e.page),r.viewport.copyFrom(e.viewport)}},{key:"allocateEvent",value:function(e){this.eventPool.has(e)||this.eventPool.set(e,[]);var r=this.eventPool.get(e).pop()||new e(this);return r.eventPhase=r.NONE,r.currentTarget=null,r.path=[],r.target=null,r}},{key:"freeEvent",value:function(e){if(e.manager!==this)throw new Error("It is illegal to free an event not managed by this EventBoundary!");var r=e.constructor;this.eventPool.has(r)||this.eventPool.set(r,[]),this.eventPool.get(r).push(e)}},{key:"notifyTarget",value:function(e,r){r=r??e.type;var i=e.eventPhase===e.CAPTURING_PHASE||e.eventPhase===e.AT_TARGET?"".concat(r,"capture"):r;this.notifyListeners(e,i),e.eventPhase===e.AT_TARGET&&this.notifyListeners(e,r)}},{key:"notifyListeners",value:function(e,r){var i=e.currentTarget.emitter,a=i._events[r];if(a)if("fn"in a)a.once&&i.removeListener(r,a.fn,void 0,!0),a.fn.call(e.currentTarget||a.context,e);else for(var o=0;o<a.length&&!e.propagationImmediatelyStopped;o++)a[o].once&&i.removeListener(r,a[o].fn,void 0,!0),a[o].fn.call(e.currentTarget||a[o].context,e)}},{key:"findMountedTarget",value:function(e){if(!e)return null;for(var r=e[e.length-1],i=e.length-2;i>=0;i--){var a=e[i];if(a===this.rootTarget||pn.isNode(a)&&a.parentNode===r)r=e[i];else break}return r}},{key:"getCursor",value:function(e){for(var r=e;r;){var i=WK(r)&&r.getAttribute("cursor");if(i)return i;r=pn.isNode(r)&&r.parentNode}}}])})(),Ax=(function(){function t(){pt(this,t)}return ht(t,[{key:"getOrCreateCanvas",value:function(e,r){if(this.canvas)return this.canvas;if(e||dt.offscreenCanvas)this.canvas=e||dt.offscreenCanvas,this.context=this.canvas.getContext("2d",Kt({willReadFrequently:!0},r));else try{this.canvas=new window.OffscreenCanvas(0,0),this.context=this.canvas.getContext("2d",Kt({willReadFrequently:!0},r)),(!this.context||!this.context.measureText)&&(this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"))}catch{this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d",Kt({willReadFrequently:!0},r))}return this.canvas.width=10,this.canvas.height=10,this.canvas}},{key:"getOrCreateContext",value:function(e,r){return this.context?this.context:(this.getOrCreateCanvas(e,r),this.context)}}],[{key:"createCanvas",value:function(){try{return new window.OffscreenCanvas(0,0)}catch{}try{return document.createElement("canvas")}catch{}return null}}])})(),Gl=(function(t){return t[t.CAMERA_CHANGED=0]="CAMERA_CHANGED",t[t.DISPLAY_OBJECT_CHANGED=1]="DISPLAY_OBJECT_CHANGED",t[t.NONE=2]="NONE",t})({}),MZ=(function(){function t(n,e){pt(this,t),this.inited=!1,this.stats={total:0,rendered:0},this.zIndexCounter=0,this.hooks={init:new Er,initAsync:new iZ,dirtycheck:new zy,cull:new zy,beginFrame:new Er,beforeRender:new Er,render:new Er,afterRender:new Er,endFrame:new Er,destroy:new Er,pick:new aZ,pickSync:new zy,pointerDown:new Er,pointerUp:new Er,pointerMove:new Er,pointerOut:new Er,pointerOver:new Er,pointerWheel:new Er,pointerCancel:new Er,click:new Er},this.globalRuntime=n,this.context=e}return ht(t,[{key:"init",value:function(e){var r=this,i=Kt(Kt({},this.globalRuntime),this.context);this.context.renderingPlugins.forEach(function(a){a.apply(i,r.globalRuntime)}),this.hooks.init.call(),this.hooks.initAsync.getCallbacksNum()===0?(this.inited=!0,e()):this.hooks.initAsync.promise().then(function(){r.inited=!0,e()}).catch(function(a){})}},{key:"getStats",value:function(){return this.stats}},{key:"disableDirtyRectangleRendering",value:function(){var e=this.context.config.renderer,r=e.getConfig(),i=r.enableDirtyRectangleRendering;return!i||this.context.renderingContext.renderReasons.has(Gl.CAMERA_CHANGED)}},{key:"render",value:function(e,r,i){var a=this;this.stats.total=0,this.stats.rendered=0,this.zIndexCounter=0;var o=this.context.renderingContext;if(this.globalRuntime.sceneGraphService.syncHierarchy(o.root),this.globalRuntime.sceneGraphService.triggerPendingEvents(),o.renderReasons.size&&this.inited){o.dirtyRectangleRenderingDisabled=this.disableDirtyRectangleRendering();var s=o.renderReasons.size===1&&o.renderReasons.has(Gl.CAMERA_CHANGED),l=!e.disableRenderHooks||!s;l&&this.renderDisplayObject(o.root,e,o),this.hooks.beginFrame.call(r),l&&o.renderListCurrentFrame.forEach(function(c){a.hooks.beforeRender.call(c),a.hooks.render.call(c),a.hooks.afterRender.call(c)}),this.hooks.endFrame.call(r),o.renderListCurrentFrame=[],o.renderReasons.clear(),i()}}},{key:"renderDisplayObject",value:function(e,r,i){var a=this,o=r.renderer.getConfig(),s=o.enableDirtyCheck,l=o.enableCulling;function c(g){var y=g.renderable,m=g.sortable,x=s?y.dirty||i.dirtyRectangleRenderingDisabled?g:null:g,_=null;x&&(_=l?a.hooks.cull.call(x,a.context.camera):x,_&&(a.stats.rendered+=1,i.renderListCurrentFrame.push(_))),g.dirty(!1),m.renderOrder=a.zIndexCounter,a.zIndexCounter+=1,a.stats.total+=1,m.dirty&&(a.sort(g,m),m.dirty=!1,m.dirtyChildren=[],m.dirtyReason=void 0)}for(var u=[e];u.length>0;){var f,d=u.pop();c(d);for(var h=((f=d.sortable)===null||f===void 0||(f=f.sorted)===null||f===void 0?void 0:f.length)>0?d.sortable.sorted:d.childNodes,p=h.length-1;p>=0;p--)u.push(h[p])}}},{key:"sort",value:function(e,r){var i,a;(r==null||(i=r.sorted)===null||i===void 0?void 0:i.length)>0&&r.dirtyReason!==jp.Z_INDEX_CHANGED?r.dirtyChildren.forEach(function(o){var s=r.sorted.indexOf(o);s>-1&&r.sorted.splice(s,1);var l=e.childNodes.indexOf(o);if(l>-1)if(r.sorted.length===0)r.sorted.push(o);else{var c=GK(r.sorted,o);r.sorted.splice(c,0,o)}}):r.sorted=e.childNodes.slice().sort(L5),((a=r.sorted)===null||a===void 0?void 0:a.length)>0&&e.childNodes.filter(function(o){return o.parsedStyle.zIndex}).length===0&&(r.sorted=[])}},{key:"destroy",value:function(){this.inited=!1,this.hooks.destroy.call(),this.globalRuntime.sceneGraphService.clearPendingEvents()}},{key:"dirtify",value:function(){this.context.renderingContext.renderReasons.add(Gl.DISPLAY_OBJECT_CHANGED)}}])})(),AZ=/\[\s*(.*)=(.*)\s*\]/,TZ=(function(){function t(){pt(this,t)}return ht(t,[{key:"selectOne",value:function(e,r){var i=this;if(e.startsWith("."))return r.find(function(l){return((l==null?void 0:l.classList)||[]).indexOf(i.getIdOrClassname(e))>-1});if(e.startsWith("#"))return r.find(function(l){return l.id===i.getIdOrClassname(e)});if(e.startsWith("[")){var a=this.getAttribute(e),o=a.name,s=a.value;return o?r.find(function(l){return r!==l&&(o==="name"?l.name===s:i.attributeToString(l,o)===s)}):null}return r.find(function(l){return r!==l&&l.nodeName===e})}},{key:"selectAll",value:function(e,r){var i=this;if(e.startsWith("."))return r.findAll(function(l){return r!==l&&((l==null?void 0:l.classList)||[]).indexOf(i.getIdOrClassname(e))>-1});if(e.startsWith("#"))return r.findAll(function(l){return r!==l&&l.id===i.getIdOrClassname(e)});if(e.startsWith("[")){var a=this.getAttribute(e),o=a.name,s=a.value;return o?r.findAll(function(l){return r!==l&&(o==="name"?l.name===s:i.attributeToString(l,o)===s)}):[]}return r.findAll(function(l){return r!==l&&l.nodeName===e})}},{key:"is",value:function(e,r){if(e.startsWith("."))return r.className===this.getIdOrClassname(e);if(e.startsWith("#"))return r.id===this.getIdOrClassname(e);if(e.startsWith("[")){var i=this.getAttribute(e),a=i.name,o=i.value;return a==="name"?r.name===o:this.attributeToString(r,a)===o}return r.nodeName===e}},{key:"getIdOrClassname",value:function(e){return e.substring(1)}},{key:"getAttribute",value:function(e){var r=e.match(AZ),i="",a="";return r&&r.length>2&&(i=r[1].replace(/"/g,""),a=r[2].replace(/"/g,"")),{name:i,value:a}}},{key:"attributeToString",value:function(e,r){if(!e.getAttribute)return"";var i=e.getAttribute(r);return Dt(i)?"":i.toString?i.toString():""}}])})(),re=(function(t){return t.ATTR_MODIFIED="DOMAttrModified",t.INSERTED="DOMNodeInserted",t.MOUNTED="DOMNodeInsertedIntoDocument",t.REMOVED="removed",t.UNMOUNTED="DOMNodeRemovedFromDocument",t.REPARENT="reparent",t.DESTROY="destroy",t.BOUNDS_CHANGED="bounds-changed",t.CULLED="culled",t})({}),Oa=(function(t){function n(e,r,i,a,o,s,l,c){var u;return pt(this,n),u=ee(this,n,[null]),u.relatedNode=r,u.prevValue=i,u.newValue=a,u.attrName=o,u.attrChange=s,u.prevParsedValue=l,u.newParsedValue=c,u.type=e,u}return te(n,t),ht(n)})(f0);Oa.ADDITION=2;Oa.MODIFICATION=1;Oa.REMOVAL=3;var PZ=new Oa(re.REPARENT,null,"","","",0,"",""),CZ=Hb(),sh=fe(),LZ=ke(1,1,1),NZ=Ne(),RZ=Hb(),ps=fe(),IZ=Ne(),vs=Vn(),DZ=fe(),$Z=Vn(),jZ=fe(),su=fe(),gs=fe(),lh=Ne(),ZE=Vn(),QE=Vn(),ch=Vn(),uh={affectChildren:!0},FZ=(function(){function t(n){pt(this,t),this.pendingEvents=new Map,this.boundsChangedEvent=new ze(re.BOUNDS_CHANGED),this.displayObjectDependencyMap=new WeakMap,this.runtime=n}return ht(t,[{key:"matches",value:function(e,r){return this.runtime.sceneGraphSelector.is(e,r)}},{key:"querySelector",value:function(e,r){return this.runtime.sceneGraphSelector.selectOne(e,r)}},{key:"querySelectorAll",value:function(e,r){return this.runtime.sceneGraphSelector.selectAll(e,r)}},{key:"attach",value:function(e,r,i){var a,o=!1;e.parentNode&&(o=e.parentNode!==r,this.detach(e));var s=e.nodeName===it.FRAGMENT,l=Gp(r);e.parentNode=r;var c=s?e.childNodes:[e];Qe(i)?c.forEach(function(g){r.childNodes.splice(i,0,g),g.parentNode=r}):c.forEach(function(g){r.childNodes.push(g),g.parentNode=r});var u=r,f=u.sortable;if((f!=null&&(a=f.sorted)!==null&&a!==void 0&&a.length||f.dirty||e.parsedStyle.zIndex)&&(f.dirtyChildren.indexOf(e)===-1&&f.dirtyChildren.push(e),f.dirty=!0,f.dirtyReason=jp.ADDED),!l){if(s)this.dirtifyFragment(e);else{var d=e.transformable;d&&this.dirtyWorldTransform(e,d)}if(o){var h,p=((h=r.ownerDocument)===null||h===void 0||(h=h.defaultView)===null||h===void 0||(h=h.getConfig())===null||h===void 0||(h=h.future)===null||h===void 0?void 0:h.experimentalCancelEventPropagation)===!0;e.dispatchEvent(PZ,p,p)}}}},{key:"detach",value:function(e){var r,i;if(e.parentNode){var a=e.transformable,o=e.parentNode,s=o.sortable;(s!=null&&(r=s.sorted)!==null&&r!==void 0&&r.length||(i=e.style)!==null&&i!==void 0&&i.zIndex)&&(s.dirtyChildren.indexOf(e)===-1&&s.dirtyChildren.push(e),s.dirty=!0,s.dirtyReason=jp.REMOVED);var l=e.parentNode.childNodes.indexOf(e);l>-1&&e.parentNode.childNodes.splice(l,1),a&&this.dirtyWorldTransform(e,a),e.parentNode=null}}},{key:"getLocalPosition",value:function(e){return e.transformable.localPosition}},{key:"getLocalRotation",value:function(e){return e.transformable.localRotation}},{key:"getLocalScale",value:function(e){return e.transformable.localScale}},{key:"getLocalSkew",value:function(e){return e.transformable.localSkew}},{key:"getLocalTransform",value:function(e){var r=e.transformable;return EE(r),r.localTransform}},{key:"setLocalPosition",value:function(e,r){var i,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=e.transformable;su[0]=r[0],su[1]=r[1],su[2]=(i=r[2])!==null&&i!==void 0?i:0,!tu(o.localPosition,su)&&(fa(o.localPosition,su),a&&this.dirtyLocalTransform(e,o))}},{key:"translateLocal",value:function(e,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof r=="number"&&(r=ke(r,i,a));var o=e.transformable;tu(r,sh)||(xY(r,r,o.localRotation),Ro(o.localPosition,o.localPosition,r),this.dirtyLocalTransform(e,o))}},{key:"setLocalRotation",value:function(e,r,i,a,o){var s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;typeof r=="number"&&(r=cC(vs,r,i,a,o));var l=e.transformable;Qd(l.localRotation,r),s&&this.dirtyLocalTransform(e,l)}},{key:"rotateLocal",value:function(e,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof r=="number"&&(r=ke(r,i,a));var o=e.transformable;Zd(QE,r[0],r[1],r[2]),FS(o.localRotation,o.localRotation,QE),this.dirtyLocalTransform(e,o)}},{key:"setLocalScale",value:function(e,r){var i,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=e.transformable;gr(ps,r[0],r[1],(i=r[2])!==null&&i!==void 0?i:o.localScale[2]),!tu(ps,o.localScale)&&(fa(o.localScale,ps),a&&this.dirtyLocalTransform(e,o))}},{key:"scaleLocal",value:function(e,r){var i,a=e.transformable;gY(a.localScale,a.localScale,gr(ps,r[0],r[1],(i=r[2])!==null&&i!==void 0?i:1)),this.dirtyLocalTransform(e,a)}},{key:"setLocalSkew",value:function(e,r,i){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;typeof r=="number"&&(r=AY(RZ,r,i));var o=e.transformable;MY(o.localSkew,r),a&&this.dirtyLocalTransform(e,o)}},{key:"setLocalEulerAngles",value:function(e,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;typeof r=="number"&&(r=ke(r,i,a));var s=e.transformable;Zd(s.localRotation,r[0],r[1],r[2]),o&&this.dirtyLocalTransform(e,s)}},{key:"setLocalTransform",value:function(e,r){var i=Op(DZ,r),a=Sp($Z,r),o=tc(jZ,r);this.setLocalScale(e,o,!1),this.setLocalPosition(e,i,!1),this.setLocalRotation(e,a,void 0,void 0,void 0,!1),this.dirtyLocalTransform(e,e.transformable)}},{key:"resetLocalTransform",value:function(e){this.setLocalScale(e,LZ,!1),this.setLocalPosition(e,sh,!1),this.setLocalEulerAngles(e,sh,void 0,void 0,!1),this.setLocalSkew(e,CZ,void 0,!1),this.dirtyLocalTransform(e,e.transformable)}},{key:"getPosition",value:function(e){var r=e.transformable;return Op(r.position,this.getWorldTransform(e,r))}},{key:"getRotation",value:function(e){var r=e.transformable;return Sp(r.rotation,this.getWorldTransform(e,r))}},{key:"getScale",value:function(e){var r=e.transformable;return tc(r.scaling,this.getWorldTransform(e,r))}},{key:"getOrigin",value:function(e){return e.getGeometryBounds(),e.transformable.origin}},{key:"getWorldTransform",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e.transformable;return!r.localDirtyFlag&&!r.dirtyFlag||(e.parentNode&&e.parentNode.transformable&&this.getWorldTransform(e.parentNode),this.internalUpdateTransform(e)),r.worldTransform}},{key:"setPosition",value:function(e,r){var i,a=e.transformable;if(gs[0]=r[0],gs[1]=r[1],gs[2]=(i=r[2])!==null&&i!==void 0?i:0,!tu(this.getPosition(e),gs)){if(fa(a.position,gs),e.parentNode===null||!e.parentNode.transformable)fa(a.localPosition,gs);else{var o=e.parentNode.transformable;Jl(lh,o.worldTransform),Yi(lh,lh),wn(a.localPosition,gs,lh)}this.dirtyLocalTransform(e,a)}}},{key:"translate",value:function(e,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof r=="number"&&(r=gr(ps,r,i,a)),!tu(r,sh)&&(Ro(ps,this.getPosition(e),r),this.setPosition(e,ps))}},{key:"setRotation",value:function(e,r,i,a,o){var s=e.transformable;if(typeof r=="number"&&(r=kY(r,i,a,o)),e.parentNode===null||!e.parentNode.transformable)this.setLocalRotation(e,r);else{var l=this.getRotation(e.parentNode);Qd(vs,l),by(vs,vs),Io(s.localRotation,vs,r),kp(s.localRotation,s.localRotation),this.dirtyLocalTransform(e,s)}}},{key:"rotate",value:function(e,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof r=="number"&&(r=ke(r,i,a));var o=e.transformable;if(e.parentNode===null||!e.parentNode.transformable)this.rotateLocal(e,r);else{var s=vs;Zd(s,r[0],r[1],r[2]);var l=this.getRotation(e),c=this.getRotation(e.parentNode);Qd(ch,c),by(ch,ch),Io(s,ch,s),Io(o.localRotation,s,l),kp(o.localRotation,o.localRotation),this.dirtyLocalTransform(e,o)}}},{key:"setOrigin",value:function(e,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof r=="number"&&(r=[r,i,a]);var o=e.transformable;if(!(r[0]===o.origin[0]&&r[1]===o.origin[1]&&r[2]===o.origin[2])){var s=o.origin;s[0]=r[0],s[1]=r[1],s[2]=r[2]||0,this.dirtyLocalTransform(e,o)}}},{key:"setEulerAngles",value:function(e,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof r=="number"&&(r=ke(r,i,a));var o=e.transformable;if(e.parentNode===null||!e.parentNode.transformable)this.setLocalEulerAngles(e,r);else{Zd(o.localRotation,r[0],r[1],r[2]);var s=this.getRotation(e.parentNode);Qd(ZE,by(vs,s)),FS(o.localRotation,o.localRotation,ZE),this.dirtyLocalTransform(e,o)}}},{key:"getTransformedGeometryBounds",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=arguments.length>2?arguments[2]:void 0,a=this.getGeometryBounds(e,r);if(!Fn.isEmpty(a)){var o=i||new Fn;return o.setFromTransformedAABB(a,this.getWorldTransform(e)),o}return null}},{key:"getGeometryBounds",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=e,a=i.geometry;a.dirty&&dt.styleValueRegistry.updateGeometry(e);var o=r?a.renderBounds:a.contentBounds||null;return o||new Fn}},{key:"getBounds",value:function(e){var r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=e,o=a.renderable;if(!o.boundsDirty&&!i&&o.bounds)return o.bounds;if(!o.renderBoundsDirty&&i&&o.renderBounds)return o.renderBounds;var s=i?o.renderBounds:o.bounds,l=this.getTransformedGeometryBounds(e,i,s),c=e.childNodes;if(c.forEach(function(d){var h=r.getBounds(d,i);h&&(l?l.add(h):(l=s||new Fn,l.update(h.center,h.halfExtents)))}),l||(l=new Fn),i){var u=N5(e);if(u){var f=u.parsedStyle.clipPath.getBounds(i);l?f&&(l=f.intersection(l)):l.update(f.center,f.halfExtents)}}return i?(o.renderBounds=l,o.renderBoundsDirty=!1):(o.bounds=l,o.boundsDirty=!1),l}},{key:"getLocalBounds",value:function(e){if(e.parentNode){var r=NZ;e.parentNode.transformable&&(r=Yi(IZ,this.getWorldTransform(e.parentNode)));var i=this.getBounds(e);if(!Fn.isEmpty(i)){var a=new Fn;return a.setFromTransformedAABB(i,r),a}}return this.getBounds(e)}},{key:"getBoundingClientRect",value:function(e){var r,i,a=this.getGeometryBounds(e);Fn.isEmpty(a)||(i=new Fn,i.setFromTransformedAABB(a,this.getWorldTransform(e)));var o=(r=e.ownerDocument)===null||r===void 0||(r=r.defaultView)===null||r===void 0?void 0:r.getContextService().getBoundingClientRect();if(i){var s=i.getMin(),l=Ut(s,2),c=l[0],u=l[1],f=i.getMax(),d=Ut(f,2),h=d[0],p=d[1];return new sc(c+((o==null?void 0:o.left)||0),u+((o==null?void 0:o.top)||0),h-c,p-u)}return new sc((o==null?void 0:o.left)||0,(o==null?void 0:o.top)||0,0,0)}},{key:"internalUpdateTransform",value:function(e){var r,i=(r=e.parentNode)===null||r===void 0?void 0:r.transformable;EE(e.transformable),eq(e.transformable,i)}},{key:"internalUpdateElement",value:function(e,r){var i,a,o,s,l=((i=e.ownerDocument)===null||i===void 0||(i=i.defaultView)===null||i===void 0||(i=i.getConfig())===null||i===void 0||(i=i.future)===null||i===void 0?void 0:i.experimentalAttributeUpdateOptimization)===!0,c=r[r.length-1],u=(c==null?void 0:c.transformDirty)||((a=e.transformable)===null||a===void 0?void 0:a.localDirtyFlag);if(e.transformable){var f;(f=e.transformable).dirtyFlag||(f.dirtyFlag=u)}if(this.internalUpdateTransform(e),u){var d;(d=e.dirty)===null||d===void 0||d.call(e,!0,!0)}var h=((o=e.renderable)===null||o===void 0?void 0:o.boundsDirty)||((s=e.renderable)===null||s===void 0?void 0:s.renderBoundsDirty);if((u||h)&&(c==null?void 0:c.shapeUpdated)===!1&&l)for(var p=r.length-1;p>=0;){var g,y,m=r[p];if(m.shapeUpdated)break;(g=(y=m.node).dirty)===null||g===void 0||g.call(y,!0,!0),m.shapeUpdated=!0,p-=1}return u}},{key:"syncHierarchy",value:function(e){for(var r,i,a=[e],o=e.parentNode?[{node:e.parentNode,transformDirty:((r=e.parentNode.transformable)===null||r===void 0?void 0:r.localDirtyFlag)||((i=e.parentNode.transformable)===null||i===void 0?void 0:i.dirtyFlag),shapeUpdated:!1}]:[];a.length>0;){for(var s=a.pop(),l=o[o.length-1];o.length>0&&s.parentNode!==l.node;)l=o.pop();var c=this.internalUpdateElement(s,o);if(s.childNodes.length>0){for(var u=s.childNodes.length-1;u>=0;u--)a.push(s.childNodes[u]);o.push({node:s,transformDirty:c,shapeUpdated:!1})}}}},{key:"dirtyLocalTransform",value:function(e,r){Gp(e)||r.localDirtyFlag||(r.localDirtyFlag=!0,r.dirtyFlag||this.dirtyWorldTransform(e,r))}},{key:"dirtyWorldTransform",value:function(e,r){this.dirtifyWorldInternal(e,r),this.dirtyToRoot(e,!0)}},{key:"dirtifyWorldInternal",value:function(e,r){var i,a=this,o=((i=e.ownerDocument)===null||i===void 0||(i=i.defaultView)===null||i===void 0||(i=i.getConfig())===null||i===void 0||(i=i.future)===null||i===void 0?void 0:i.experimentalAttributeUpdateOptimization)===!0;r.dirtyFlag||(r.dirtyFlag=!0,e.dirty(!0,!0),o||e.childNodes.forEach(function(s){var l=s.transformable;a.dirtifyWorldInternal(s,l)}))}},{key:"dirtyToRoot",value:function(e){for(var r,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=e,o=((r=e.ownerDocument)===null||r===void 0||(r=r.defaultView)===null||r===void 0||(r=r.getConfig())===null||r===void 0||(r=r.future)===null||r===void 0?void 0:r.experimentalAttributeUpdateOptimization)===!0;a;){var s,l;if((s=(l=a).dirty)===null||s===void 0||s.call(l,!0,!0),o)break;a=a.parentNode}i&&e.forEach(function(c){var u;(u=c.dirty)===null||u===void 0||u.call(c,!0,!0)}),this.informDependentDisplayObjects(e),this.pendingEvents.set(e,i)}},{key:"dirtifyFragment",value:function(e){var r,i,a=e.transformable;a&&(a.dirtyFlag=!0,a.localDirtyFlag=!0),(r=(i=e).dirty)===null||r===void 0||r.call(i,!0,!0);for(var o=e.childNodes.length,s=0;s<o;s++)this.dirtifyFragment(e.childNodes[s]);e.nodeName===it.FRAGMENT&&this.pendingEvents.set(e,!1)}},{key:"triggerPendingEvents",value:function(){var e=this,r=new Set,i,a,o=function(l,c){if(!(!l.isConnected||r.has(l)||l.nodeName===it.FRAGMENT)){if(e.boundsChangedEvent.detail=c,e.boundsChangedEvent.target=l,l.isMutationObserved)l.dispatchEvent(e.boundsChangedEvent);else{if(i===void 0){var u;i=((u=l.ownerDocument.defaultView)===null||u===void 0||(u=u.getConfig())===null||u===void 0||(u=u.future)===null||u===void 0?void 0:u.experimentalCancelEventPropagation)===!0}l.ownerDocument.defaultView.dispatchEvent(e.boundsChangedEvent,!0,i)}r.add(l)}};this.pendingEvents.forEach(function(s,l){if(l.nodeName!==it.FRAGMENT){if(a===void 0){var c;a=((c=l.ownerDocument)===null||c===void 0||(c=c.defaultView)===null||c===void 0||(c=c.getConfig())===null||c===void 0||(c=c.future)===null||c===void 0?void 0:c.experimentalAttributeUpdateOptimization)===!0}uh.affectChildren=s,a?o(l,uh):s?l.forEach(function(u){o(u,uh)}):o(l,uh)}}),r.clear(),this.clearPendingEvents()}},{key:"clearPendingEvents",value:function(){this.pendingEvents.clear()}},{key:"updateDisplayObjectDependency",value:function(e,r,i,a){if(r&&r!==i){var o=this.displayObjectDependencyMap.get(r);if(o&&o[e]){var s=o[e].indexOf(a);o[e].splice(s,1)}}if(i){var l=this.displayObjectDependencyMap.get(i);l||(this.displayObjectDependencyMap.set(i,{}),l=this.displayObjectDependencyMap.get(i)),l[e]||(l[e]=[]),l[e].push(a)}}},{key:"informDependentDisplayObjects",value:function(e){var r,i=this,a=this.displayObjectDependencyMap.get(e);if(a){var o=(r=e.ownerDocument)===null||r===void 0||(r=r.defaultView)===null||r===void 0||(r=r.getConfig())===null||r===void 0||(r=r.future)===null||r===void 0?void 0:r.experimentalCancelEventPropagation;Object.keys(a).forEach(function(s){a[s].forEach(function(l){i.dirtyToRoot(l,!0),l.dispatchEvent(new Oa(re.ATTR_MODIFIED,l,i,i,s,Oa.MODIFICATION,i,i),o,o),l.isCustomElement&&l.isConnected&&l.attributeChangedCallback&&l.attributeChangedCallback(s,i,i)})})}}}])})(),JE=(function(){function t(n){if(pt(this,t),n<=0)throw new Error("LRU capacity must be a positive number.");this.capacity=n,this.cache=new Map}return ht(t,[{key:"get",value:function(e){if(this.cache.has(e)){var r=this.cache.get(e);return this.cache.delete(e),this.cache.set(e,r),r}}},{key:"put",value:function(e,r){if(this.cache.has(e)&&this.cache.delete(e),this.cache.set(e,r),this.cache.size>this.capacity){var i=this.cache.keys().next().value;this.cache.delete(i)}}},{key:"len",value:function(){return this.cache.size}},{key:"clear",value:function(){this.cache.clear()}}])})(),ys={MetricsString:"|\xC9q\xC5",BaselineSymbol:"M",BaselineMultiplier:1.4,HeightMultiplier:2,Newlines:[10,13],BreakingSpaces:[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288]},tk=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,BZ=/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/,zZ=/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/,WZ=/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹓﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/,GZ=/[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/,YZ=/[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/,HZ=/[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/,UZ=/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/,VZ=/[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/,XZ=new RegExp("".concat(BZ.source,"|").concat(WZ.source,"|").concat(YZ.source,"|").concat(UZ.source)),qZ=new RegExp("".concat(zZ.source,"|").concat(GZ.source,"|").concat(HZ.source,"|").concat(VZ.source)),KZ=(function(){function t(n){var e=this;pt(this,t),this.fontMetricsCache={},this.shouldBreakByKinsokuShorui=function(r,i){return e.isBreakingSpace(i)?!1:!!(r&&(qZ.exec(i)||XZ.exec(r)))},this.trimByKinsokuShorui=function(r){var i=ce(r),a=i[i.length-2];if(!a)return r;var o=a[a.length-1];return i[i.length-2]=a.slice(0,-1),i[i.length-1]=o+i[i.length-1],i},this.runtime=n,this.charWidthCache=new JE(100)}return ht(t,[{key:"measureFont",value:function(e,r){if(this.fontMetricsCache[e])return this.fontMetricsCache[e];var i={ascent:0,descent:0,fontSize:0},a=this.runtime.offscreenCanvasCreator.getOrCreateCanvas(r),o=this.runtime.offscreenCanvasCreator.getOrCreateContext(r,{willReadFrequently:!0});o.font=e;var s=ys.MetricsString+ys.BaselineSymbol,l=Math.ceil(o.measureText(s).width),c=Math.ceil(o.measureText(ys.BaselineSymbol).width),u=ys.HeightMultiplier*c;c=c*ys.BaselineMultiplier|0,a.width=l,a.height=u,o.fillStyle="#f00",o.fillRect(0,0,l,u),o.font=e,o.textBaseline="alphabetic",o.fillStyle="#000",o.fillText(s,0,c);var f=o.getImageData(0,0,l||1,u||1).data,d=f.length,h=l*4,p=0,g=0,y=!1;for(p=0;p<c;++p){for(var m=0;m<h;m+=4)if(f[g+m]!==255){y=!0;break}if(!y)g+=h;else break}for(i.ascent=c-p,g=d-h,y=!1,p=u;p>c;--p){for(var x=0;x<h;x+=4)if(f[g+x]!==255){y=!0;break}if(!y)g-=h;else break}return i.descent=p-c,i.fontSize=i.ascent+i.descent,this.fontMetricsCache[e]=i,i}},{key:"measureText",value:function(e,r,i){var a=r.fontSize,o=a===void 0?16:a,s=r.wordWrap,l=s===void 0?!1:s,c=r.lineHeight,u=r.lineWidth,f=u===void 0?1:u,d=r.textBaseline,h=d===void 0?"alphabetic":d,p=r.textAlign,g=p===void 0?"start":p,y=r.letterSpacing,m=y===void 0?0:y,x=r.textPath;r.textPathSide,r.textPathStartOffset;var _=r.leading,w=_===void 0?0:_,O=qE(r),S=this.measureFont(O,i);S.fontSize===0&&(S.fontSize=o,S.ascent=o);var E=this.runtime.offscreenCanvasCreator.getOrCreateContext(i);E.font=O,r.isOverflowing=!1;var M=l?this.wordWrap(e,r,i):e,A=M.split(/(?:\r\n|\r|\n)/),T=new Array(A.length),P=0;if(x){x.getTotalLength();for(var N=0;N<A.length;N++)E.measureText(A[N]).width+(A[N].length-1)*m}else{for(var C=0;C<A.length;C++){var R=E.measureText(A[C]).width+(A[C].length-1)*m;T[C]=R,P=Math.max(P,R)}var D=P+f,F=c||S.fontSize+f,j=Math.max(F,S.fontSize+f)+(A.length-1)*(F+w);F+=w;var I=0;return h==="middle"?I=-j/2:h==="bottom"||h==="alphabetic"||h==="ideographic"?I=-j:(h==="top"||h==="hanging")&&(I=0),{font:O,width:D,height:j,lines:A,lineWidths:T,lineHeight:F,maxLineWidth:P,fontProperties:S,lineMetrics:T.map(function($,z){var Y=0;return g==="center"||g==="middle"?Y-=$/2:(g==="right"||g==="end")&&(Y-=$),new sc(Y-f/2,I+z*F,$+f,F)})}}}},{key:"wordWrap",value:function(e,r,i){var a=this,o=Array.from(e);if(o.length===0)return"";var s=this,l=r.wordWrapWidth,c=l===void 0?0:l,u=r.letterSpacing,f=u===void 0?0:u,d=r.maxLines,h=d===void 0?1/0:d,p=r.textOverflow,g=this.runtime.offscreenCanvasCreator.getOrCreateContext(i),y=c+f,m="";p==="ellipsis"?m="...":p&&p!=="clip"&&(m=p);var x=[""],_=0,w=0,O=-1,S=qE(r),E=this.charWidthCache.get(S);E||(E=new JE(500),this.charWidthCache.put(S,E));var M=function($){return a.getFromCache($,f,E,g)},A=M(m);function T(I,$,z,Y){for(;M(I)<Y&&$<o.length-1&&!s.isNewline(o[$+1]);)$+=1,I+=o[$];for(;M(I)>Y&&$>=z;)$-=1,I=I.slice(0,-1);return{lineTxt:I,txtLastCharIndex:$}}function P(I,$){if(!(A<=0||A>y)){if(!x[I]){x[I]=m;return}var z=T(x[I],$,O+1,y-A);x[I]=z.lineTxt+m}}for(var N=0;N<o.length;N++){var C=o[N],R=o[N-1],D=o[N+1],F=M(C);if(this.isNewline(C)){if(_+1>=h){N<o.length-1&&P(_,N-1),r.isOverflowing=!0;break}O=N-1,_+=1,w=0,x[_]="";continue}if(F>y){P(_,N-1),r.isOverflowing=!0;break}if(w>0&&w+F>y){var j=T(x[_],N-1,O+1,y);if(j.txtLastCharIndex!==N-1){if(x[_]=j.lineTxt,j.txtLastCharIndex===o.length-1)break;N=j.txtLastCharIndex+1,C=o[N],R=o[N-1],D=o[N+1],F=M(C)}if(_+1>=h){P(_,N-1),r.isOverflowing=!0;break}if(O=N-1,_+=1,w=0,x[_]="",this.isBreakingSpace(C))continue;this.canBreakInLastChar(C)||(x=this.trimToBreakable(x),w=this.sumTextWidthByCache(x[_]||"",M)),this.shouldBreakByKinsokuShorui(C,D)&&(x=this.trimByKinsokuShorui(x),w+=M(R||""))}w+=F,x[_]+=C}return x.join(`
57
+ `)}},{key:"isBreakingSpace",value:function(e){return typeof e!="string"?!1:ys.BreakingSpaces.indexOf(e.charCodeAt(0))>=0}},{key:"isNewline",value:function(e){return typeof e!="string"?!1:ys.Newlines.indexOf(e.charCodeAt(0))>=0}},{key:"trimToBreakable",value:function(e){var r=ce(e),i=r[r.length-2],a=this.findBreakableIndex(i);if(a===-1||!i)return r;var o=i.slice(a,a+1),s=this.isBreakingSpace(o),l=a+1,c=a+(s?0:1);return r[r.length-1]+=i.slice(l,i.length),r[r.length-2]=i.slice(0,c),r}},{key:"canBreakInLastChar",value:function(e){return!(e&&tk.test(e))}},{key:"sumTextWidthByCache",value:function(e,r){return e.split("").reduce(function(i,a){return i+r(a)},0)}},{key:"findBreakableIndex",value:function(e){for(var r=e.length-1;r>=0;r--)if(!tk.test(e[r]))return r;return-1}},{key:"getFromCache",value:function(e,r,i,a){var o=i.get(e);if(typeof o!="number"){var s=e.length*r,l=a.measureText(e);o=l.width+s,i.put(e,o)}return o}},{key:"clearCache",value:function(){this.fontMetricsCache={},this.charWidthCache.clear()}}])})(),dt={},ZZ=(function(t){var n=new _Z,e=new xZ;return t={},Et(Et(Et(Et(Et(Et(Et(Et(Et(Et(t,it.FRAGMENT,null),it.CIRCLE,new gZ),it.ELLIPSE,new yZ),it.RECT,n),it.IMAGE,n),it.GROUP,new OZ),it.LINE,new mZ),it.TEXT,new wZ(dt)),it.POLYLINE,e),it.POLYGON,e),Et(Et(Et(t,it.PATH,new bZ),it.HTML,new SZ),it.MESH,null)})(),QZ=(function(t){var n=new AK,e=new w1;return t={},Et(Et(Et(Et(Et(Et(Et(Et(Et(Et(t,xt.PERCENTAGE,null),xt.NUMBER,new NK),xt.ANGLE,new kK),xt.DEFINED_PATH,new MK),xt.PAINT,n),xt.COLOR,n),xt.FILTER,new TK),xt.LENGTH,e),xt.LENGTH_PERCENTAGE,e),xt.LENGTH_PERCENTAGE_12,new PK),Et(Et(Et(Et(Et(Et(Et(Et(Et(Et(t,xt.LENGTH_PERCENTAGE_14,new CK),xt.COORDINATE,new w1),xt.OFFSET_DISTANCE,new RK),xt.OPACITY_VALUE,new IK),xt.PATH,new DK),xt.LIST_OF_POINTS,new $K),xt.SHADOW_BLUR,new jK),xt.TEXT,new FK),xt.TEXT_TRANSFORM,new BK),xt.TRANSFORM,new hZ),Et(Et(Et(t,xt.TRANSFORM_ORIGIN,new pZ),xt.Z_INDEX,new vZ),xt.MARKER,new LK)})(),JZ=function(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}};dt.CameraContribution=h5;dt.AnimationTimeline=null;dt.EasingFunction=null;dt.offscreenCanvasCreator=new Ax;dt.sceneGraphSelector=new TZ;dt.sceneGraphService=new FZ(dt);dt.textService=new KZ(dt);dt.geometryUpdaterFactory=ZZ;dt.CSSPropertySyntaxFactory=QZ;dt.styleValueRegistry=new SK(dt);dt.layoutRegistry=null;dt.globalThis=JZ();dt.enableStyleSyntax=!0;dt.enableSizeAttenuation=!1;var tQ=0,k1=new Oa(re.INSERTED,null,"","","",0,"",""),M1=new Oa(re.REMOVED,null,"","","",0,"",""),z5=new ze(re.DESTROY),eQ=(function(t){function n(){var e;pt(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=ee(this,n,[].concat(i)),e.entity=tQ++,e.transformable={dirtyFlag:!1,localDirtyFlag:!1,localPosition:[0,0,0],localRotation:[0,0,0,1],localScale:[1,1,1],localTransform:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],localSkew:[0,0],position:[0,0,0],rotation:[0,0,0,1],scaling:[1,1,1],worldTransform:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],origin:[0,0,0]},e.renderable={bounds:void 0,boundsDirty:!0,renderBounds:void 0,renderBoundsDirty:!0,dirtyRenderBounds:void 0,dirty:!1},e.geometry={contentBounds:void 0,renderBounds:void 0,dirty:!0},e.cullable={strategy:QX.Standard,visibilityPlaneMask:-1,visible:!0,enable:!0},e.sortable={dirty:!1,sorted:void 0,renderOrder:0,dirtyChildren:[],dirtyReason:void 0},e.rBushNode={aabb:void 0},e.namespaceURI="g",e.scrollLeft=0,e.scrollTop=0,e.clientTop=0,e.clientLeft=0,e.style={},e.computedStyle={},e.parsedStyle={},e.attributes={},e}return te(n,t),ht(n,[{key:"dirty",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;this.renderable.dirty=r,i&&(this.renderable.boundsDirty=r,this.renderable.renderBoundsDirty=r)}},{key:"className",get:function(){return this.getAttribute("class")||""},set:function(r){this.setAttribute("class",r)}},{key:"classList",get:function(){return this.className.split(" ").filter(function(r){return r!==""})}},{key:"tagName",get:function(){return this.nodeName}},{key:"children",get:function(){return this.childNodes}},{key:"childElementCount",get:function(){return this.childNodes.length}},{key:"firstElementChild",get:function(){return this.firstChild}},{key:"lastElementChild",get:function(){return this.lastChild}},{key:"parentElement",get:function(){return this.parentNode}},{key:"nextSibling",get:function(){if(this.parentNode){var r=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[r+1]||null}return null}},{key:"previousSibling",get:function(){if(this.parentNode){var r=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[r-1]||null}return null}},{key:"cloneNode",value:function(r){throw new Error(Ge)}},{key:"appendChild",value:function(r,i){var a;if(r.destroyed)throw new Error(zX);return dt.sceneGraphService.attach(r,this,i),(a=this.ownerDocument)!==null&&a!==void 0&&a.defaultView&&(!Gp(this)&&r.nodeName===it.FRAGMENT?this.ownerDocument.defaultView.mountFragment(r):this.ownerDocument.defaultView.mountChildren(r)),this.isMutationObserved&&(k1.relatedNode=this,r.dispatchEvent(k1)),r}},{key:"insertBefore",value:function(r,i){if(!i)this.appendChild(r);else{r.parentElement&&r.parentElement.removeChild(r);var a=this.childNodes.indexOf(i);a===-1?this.appendChild(r):this.appendChild(r,a)}return r}},{key:"replaceChild",value:function(r,i){var a=this.childNodes.indexOf(i);return this.removeChild(i),this.appendChild(r,a),i}},{key:"removeChild",value:function(r){var i,a,o=((i=this.ownerDocument)===null||i===void 0||(i=i.defaultView)===null||i===void 0||(i=i.getConfig().future)===null||i===void 0?void 0:i.experimentalCancelEventPropagation)===!0;return M1.relatedNode=this,r.dispatchEvent(M1,o,o),(a=r.ownerDocument)!==null&&a!==void 0&&a.defaultView&&r.ownerDocument.defaultView.unmountChildren(r),dt.sceneGraphService.detach(r),r}},{key:"removeChildren",value:function(){for(var r=this.childNodes.length-1;r>=0;r--){var i=this.childNodes[r];this.removeChild(i)}}},{key:"destroyChildren",value:function(){for(var r=this.childNodes.length-1;r>=0;r--){var i=this.childNodes[r];i.childNodes.length>0&&i.destroyChildren(),i.destroy()}}},{key:"matches",value:function(r){return dt.sceneGraphService.matches(r,this)}},{key:"getElementById",value:function(r){return dt.sceneGraphService.querySelector("#".concat(r),this)}},{key:"getElementsByName",value:function(r){return dt.sceneGraphService.querySelectorAll('[name="'.concat(r,'"]'),this)}},{key:"getElementsByClassName",value:function(r){return dt.sceneGraphService.querySelectorAll(".".concat(r),this)}},{key:"getElementsByTagName",value:function(r){return dt.sceneGraphService.querySelectorAll(r,this)}},{key:"querySelector",value:function(r){return dt.sceneGraphService.querySelector(r,this)}},{key:"querySelectorAll",value:function(r){return dt.sceneGraphService.querySelectorAll(r,this)}},{key:"closest",value:function(r){var i=this;do{if(dt.sceneGraphService.matches(r,i))return i;i=i.parentElement}while(i!==null);return null}},{key:"find",value:function(r){var i=this,a=null;return this.forEach(function(o){return o!==i&&r(o)?(a=o,!1):!0}),a}},{key:"findAll",value:function(r){var i=this,a=[];return this.forEach(function(o){o!==i&&r(o)&&a.push(o)}),a}},{key:"after",value:function(){var r=this;if(this.parentNode){for(var i=this.parentNode.childNodes.indexOf(this),a=arguments.length,o=new Array(a),s=0;s<a;s++)o[s]=arguments[s];o.forEach(function(l,c){var u;return(u=r.parentNode)===null||u===void 0?void 0:u.appendChild(l,i+c+1)})}}},{key:"before",value:function(){if(this.parentNode){for(var r,i=this.parentNode.childNodes.indexOf(this),a=arguments.length,o=new Array(a),s=0;s<a;s++)o[s]=arguments[s];var l=o[0],c=o.slice(1);this.parentNode.appendChild(l,i),(r=l).after.apply(r,ce(c))}}},{key:"replaceWith",value:function(){this.after.apply(this,arguments),this.remove()}},{key:"append",value:function(){for(var r=this,i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];a.forEach(function(s){return r.appendChild(s)})}},{key:"prepend",value:function(){for(var r=this,i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];a.forEach(function(s,l){return r.appendChild(s,l)})}},{key:"replaceChildren",value:function(){for(;this.childNodes.length&&this.firstChild;)this.removeChild(this.firstChild);this.append.apply(this,arguments)}},{key:"remove",value:function(){return this.parentNode?this.parentNode.removeChild(this):this}},{key:"destroy",value:function(){var r,i=((r=this.ownerDocument)===null||r===void 0||(r=r.defaultView)===null||r===void 0||(r=r.getConfig().future)===null||r===void 0?void 0:r.experimentalCancelEventPropagation)===!0;this.destroyChildren(),this.dispatchEvent(z5,i,i),this.remove(),this.emitter.removeAllListeners(),this.destroyed=!0}},{key:"getGeometryBounds",value:function(){return dt.sceneGraphService.getGeometryBounds(this)}},{key:"getRenderBounds",value:function(){return dt.sceneGraphService.getBounds(this,!0)}},{key:"getBounds",value:function(){return dt.sceneGraphService.getBounds(this)}},{key:"getLocalBounds",value:function(){return dt.sceneGraphService.getLocalBounds(this)}},{key:"getBoundingClientRect",value:function(){return dt.sceneGraphService.getBoundingClientRect(this)}},{key:"getClientRects",value:function(){return[this.getBoundingClientRect()]}},{key:"computedStyleMap",value:function(){return new Map(Object.entries(this.computedStyle))}},{key:"getAttributeNames",value:function(){return Object.keys(this.attributes)}},{key:"getAttribute",value:function(r){if(typeof r!="symbol"){var i=this.attributes[r];return i}}},{key:"hasAttribute",value:function(r){return this.getAttributeNames().includes(r)}},{key:"hasAttributes",value:function(){return!!this.getAttributeNames().length}},{key:"removeAttribute",value:function(r){this.setAttribute(r,null),delete this.attributes[r]}},{key:"setAttribute",value:function(r,i,a,o){this.attributes[r]=i}},{key:"getAttributeNS",value:function(r,i){throw new Error(Ge)}},{key:"getAttributeNode",value:function(r){throw new Error(Ge)}},{key:"getAttributeNodeNS",value:function(r,i){throw new Error(Ge)}},{key:"hasAttributeNS",value:function(r,i){throw new Error(Ge)}},{key:"removeAttributeNS",value:function(r,i){throw new Error(Ge)}},{key:"removeAttributeNode",value:function(r){throw new Error(Ge)}},{key:"setAttributeNS",value:function(r,i,a){throw new Error(Ge)}},{key:"setAttributeNode",value:function(r){throw new Error(Ge)}},{key:"setAttributeNodeNS",value:function(r){throw new Error(Ge)}},{key:"toggleAttribute",value:function(r,i){throw new Error(Ge)}}])})(pn);function Oe(t){return!!(t!=null&&t.nodeName)}var nQ=dt.globalThis.Proxy?dt.globalThis.Proxy:function(){},ia=new Oa(re.ATTR_MODIFIED,null,null,null,null,Oa.MODIFICATION,null,null),lu=fe(),rQ=Vn(),nn=(function(t){function n(e){var r;return pt(this,n),r=ee(this,n),r.isCustomElement=!1,r.isMutationObserved=!1,r.activeAnimations=[],r.config=e,r.id=e.id||"",r.name=e.name||"",(e.className||e.class)&&(r.className=e.className||e.class),r.nodeName=e.type||it.GROUP,e.initialParsedStyle&&Object.assign(r.parsedStyle,e.initialParsedStyle),r.initAttributes(e.style),dt.enableStyleSyntax&&(r.style=new nQ({setProperty:function(a,o){r.setAttribute(a,o)},getPropertyValue:function(a){return r.getAttribute(a)},removeProperty:function(a){r.removeAttribute(a)},item:function(){return""}},{get:function(a,o){return a[o]!==void 0?a[o]:r.getAttribute(o)},set:function(a,o,s){return r.setAttribute(o,s),!0}})),r}return te(n,t),ht(n,[{key:"destroy",value:function(){yE(n,"destroy",this)([]),this.getAnimations().forEach(function(r){r.cancel()})}},{key:"cloneNode",value:function(r,i){var a=Kt({},this.attributes);for(var o in a){var s=a[o];Oe(s)&&o!=="clipPath"&&o!=="offsetPath"&&o!=="textPath"&&(a[o]=s.cloneNode(r)),i&&(a[o]=i(o,s))}var l=new this.constructor(Kt(Kt({},this.config),{},{style:a}));return l.setLocalTransform(this.getLocalTransform()),r&&this.children.forEach(function(c){if(!c.style.isMarker){var u=c.cloneNode(r);l.appendChild(u)}}),l}},{key:"initAttributes",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i={forceUpdateGeometry:!0};dt.styleValueRegistry.processProperties(this,r,i),this.dirty()}},{key:"setAttribute",value:function(r,i){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;Be(i)||(a||i!==this.attributes[r])&&(this.internalSetAttribute(r,i,{memoize:o}),yE(n,"setAttribute",this)([r,i]))}},{key:"internalSetAttribute",value:function(r,i){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=this.attributes[r],s=this.parsedStyle[r];dt.styleValueRegistry.processProperties(this,Et({},r,i),a),this.dirty();var l=this.parsedStyle[r];if(this.isConnected)if(ia.relatedNode=this,ia.prevValue=o,ia.newValue=i,ia.attrName=r,ia.prevParsedValue=s,ia.newParsedValue=l,this.isMutationObserved)this.dispatchEvent(ia);else{var c,u=((c=this.ownerDocument.defaultView.getConfig().future)===null||c===void 0?void 0:c.experimentalCancelEventPropagation)===!0;ia.target=this,this.ownerDocument.defaultView.dispatchEvent(ia,!0,u)}if(this.isCustomElement&&this.isConnected||!this.isCustomElement){var f,d;(f=(d=this).attributeChangedCallback)===null||f===void 0||f.call(d,r,o,i,s,l)}}},{key:"getBBox",value:function(){var r=this.getBounds(),i=r.getMin(),a=Ut(i,2),o=a[0],s=a[1],l=r.getMax(),c=Ut(l,2),u=c[0],f=c[1];return new sc(o,s,u-o,f-s)}},{key:"setOrigin",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return dt.sceneGraphService.setOrigin(this,Mr(r,i,a,!1)),this}},{key:"getOrigin",value:function(){return dt.sceneGraphService.getOrigin(this)}},{key:"setPosition",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return dt.sceneGraphService.setPosition(this,Mr(r,i,a,!1)),this}},{key:"setLocalPosition",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return dt.sceneGraphService.setLocalPosition(this,Mr(r,i,a,!1)),this}},{key:"translate",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return dt.sceneGraphService.translate(this,Mr(r,i,a,!1)),this}},{key:"translateLocal",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return dt.sceneGraphService.translateLocal(this,Mr(r,i,a,!1)),this}},{key:"getPosition",value:function(){return dt.sceneGraphService.getPosition(this)}},{key:"getLocalPosition",value:function(){return dt.sceneGraphService.getLocalPosition(this)}},{key:"scale",value:function(r,i,a){return this.scaleLocal(r,i,a)}},{key:"scaleLocal",value:function(r,i,a){return typeof r=="number"&&(i=i||r,a=a||r,r=Mr(r,i,a,!1)),dt.sceneGraphService.scaleLocal(this,r),this}},{key:"setLocalScale",value:function(r,i,a){return typeof r=="number"&&(i=i||r,a=a||r,r=Mr(r,i,a,!1)),dt.sceneGraphService.setLocalScale(this,r),this}},{key:"getLocalScale",value:function(){return dt.sceneGraphService.getLocalScale(this)}},{key:"getScale",value:function(){return dt.sceneGraphService.getScale(this)}},{key:"getEulerAngles",value:function(){var r=Ny(lu,dt.sceneGraphService.getWorldTransform(this)),i=Ut(r,3),a=i[2];return gi(a)}},{key:"getLocalEulerAngles",value:function(){var r=Ny(lu,dt.sceneGraphService.getLocalRotation(this)),i=Ut(r,3),a=i[2];return gi(a)}},{key:"setEulerAngles",value:function(r){return dt.sceneGraphService.setEulerAngles(this,0,0,r),this}},{key:"setLocalEulerAngles",value:function(r){return dt.sceneGraphService.setLocalEulerAngles(this,0,0,r),this}},{key:"rotateLocal",value:function(r,i,a){return Dt(i)&&Dt(a)?dt.sceneGraphService.rotateLocal(this,0,0,r):dt.sceneGraphService.rotateLocal(this,r,i,a),this}},{key:"rotate",value:function(r,i,a){return Dt(i)&&Dt(a)?dt.sceneGraphService.rotate(this,0,0,r):dt.sceneGraphService.rotate(this,r,i,a),this}},{key:"setRotation",value:function(r,i,a,o){return dt.sceneGraphService.setRotation(this,r,i,a,o),this}},{key:"setLocalRotation",value:function(r,i,a,o){return dt.sceneGraphService.setLocalRotation(this,r,i,a,o),this}},{key:"setLocalSkew",value:function(r,i){return dt.sceneGraphService.setLocalSkew(this,r,i),this}},{key:"getRotation",value:function(){return dt.sceneGraphService.getRotation(this)}},{key:"getLocalRotation",value:function(){return dt.sceneGraphService.getLocalRotation(this)}},{key:"getLocalSkew",value:function(){return dt.sceneGraphService.getLocalSkew(this)}},{key:"getLocalTransform",value:function(){return dt.sceneGraphService.getLocalTransform(this)}},{key:"getWorldTransform",value:function(){return dt.sceneGraphService.getWorldTransform(this)}},{key:"setLocalTransform",value:function(r){return dt.sceneGraphService.setLocalTransform(this,r),this}},{key:"resetLocalTransform",value:function(){dt.sceneGraphService.resetLocalTransform(this)}},{key:"getAnimations",value:function(){return this.activeAnimations}},{key:"animate",value:function(r,i){var a,o=(a=this.ownerDocument)===null||a===void 0?void 0:a.timeline;return o?o.play(this,r,i):null}},{key:"isVisible",value:function(){var r;return((r=this.parsedStyle)===null||r===void 0?void 0:r.visibility)!=="hidden"}},{key:"interactive",get:function(){return this.isInteractive()},set:function(r){this.style.pointerEvents=r?"auto":"none"}},{key:"isInteractive",value:function(){var r;return((r=this.parsedStyle)===null||r===void 0?void 0:r.pointerEvents)!=="none"}},{key:"isCulled",value:function(){return!!(this.cullable&&this.cullable.enable&&!this.cullable.visible)}},{key:"toFront",value:function(){return this.parentNode&&(this.style.zIndex=Math.max.apply(Math,ce(this.parentNode.children.map(function(r){return Number(r.style.zIndex)})))+1),this}},{key:"toBack",value:function(){return this.parentNode&&(this.style.zIndex=Math.min.apply(Math,ce(this.parentNode.children.map(function(r){return Number(r.style.zIndex)})))-1),this}},{key:"getConfig",value:function(){return this.config}},{key:"attr",value:function(){for(var r=this,i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];var s=a[0],l=a[1];return s?If(s)?(Object.keys(s).forEach(function(c){r.setAttribute(c,s[c])}),this):a.length===2?(this.setAttribute(s,l),this):this.attributes[s]:this.attributes}},{key:"getMatrix",value:function(r){var i=r||this.getWorldTransform(),a=Op(lu,i),o=Ut(a,2),s=o[0],l=o[1],c=tc(lu,i),u=Ut(c,2),f=u[0],d=u[1],h=Sp(rQ,i),p=Ny(lu,h),g=Ut(p,3),y=g[0],m=g[2];return VX(y||m,s,l,f,d)}},{key:"getLocalMatrix",value:function(){return this.getMatrix(this.getLocalTransform())}},{key:"setMatrix",value:function(r){var i=wE(r),a=Ut(i,5),o=a[0],s=a[1],l=a[2],c=a[3],u=a[4];this.setEulerAngles(u).setPosition(o,s).setLocalScale(l,c)}},{key:"setLocalMatrix",value:function(r){var i=wE(r),a=Ut(i,5),o=a[0],s=a[1],l=a[2],c=a[3],u=a[4];this.setLocalEulerAngles(u).setLocalPosition(o,s).setLocalScale(l,c)}},{key:"show",value:function(){this.forEach(function(r){r.style.visibility="visible"})}},{key:"hide",value:function(){this.forEach(function(r){r.style.visibility="hidden"})}},{key:"getCount",value:function(){return this.childElementCount}},{key:"getParent",value:function(){return this.parentElement}},{key:"getChildren",value:function(){return this.children}},{key:"getFirst",value:function(){return this.firstElementChild}},{key:"getLast",value:function(){return this.lastElementChild}},{key:"getChildByIndex",value:function(r){return this.children[r]||null}},{key:"add",value:function(r,i){return this.appendChild(r,i)}},{key:"set",value:function(r,i){this.config[r]=i}},{key:"get",value:function(r){return this.config[r]}},{key:"moveTo",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return this.setPosition(r,i,a),this}},{key:"move",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return this.setPosition(r,i,a),this}},{key:"setZIndex",value:function(r){return this.style.zIndex=r,this}}])})(eQ);nn.PARSED_STYLE_LIST=new Set(["class","className","clipPath","cursor","display","draggable","droppable","fill","fillOpacity","fillRule","filter","increasedLineWidthForHitTesting","lineCap","lineDash","lineDashOffset","lineJoin","lineWidth","miterLimit","hitArea","offsetDistance","offsetPath","offsetX","offsetY","opacity","pointerEvents","shadowColor","shadowType","shadowBlur","shadowOffsetX","shadowOffsetY","stroke","strokeOpacity","strokeWidth","strokeLinecap","strokeLineJoin","strokeDasharray","strokeDashoffset","transform","transformOrigin","textTransform","visibility","zIndex"]);var Sa=(function(t){function n(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return pt(this,n),ee(this,n,[Kt({type:it.CIRCLE},e)])}return te(n,t),ht(n)})(nn);Sa.PARSED_STYLE_LIST=new Set([].concat(ce(nn.PARSED_STYLE_LIST),["cx","cy","cz","r","isBillboard","isSizeAttenuation"]));var iQ=["style"],qf=(function(t){function n(){var e,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=r.style,a=Zs(r,iQ);return pt(this,n),e=ee(this,n,[Kt({style:i},a)]),e.isCustomElement=!0,e}return te(n,t),ht(n)})(nn);qf.PARSED_STYLE_LIST=new Set(["class","className","clipPath","cursor","draggable","droppable","opacity","pointerEvents","transform","transformOrigin","zIndex","visibility"]);var d0=(function(t){function n(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return pt(this,n),ee(this,n,[Kt({type:it.ELLIPSE},e)])}return te(n,t),ht(n)})(nn);d0.PARSED_STYLE_LIST=new Set([].concat(ce(nn.PARSED_STYLE_LIST),["cx","cy","cz","rx","ry","isBillboard","isSizeAttenuation"]));var aQ=(function(t){function n(){return pt(this,n),ee(this,n,[{type:it.FRAGMENT}])}return te(n,t),ht(n)})(nn);aQ.PARSED_STYLE_LIST=new Set(["class","className"]);var Qn=(function(t){function n(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return pt(this,n),ee(this,n,[Kt({type:it.GROUP},e)])}return te(n,t),ht(n)})(nn);Qn.PARSED_STYLE_LIST=new Set(["class","className","clipPath","cursor","draggable","droppable","opacity","pointerEvents","transform","transformOrigin","zIndex","visibility"]);var oQ=["style"],el=(function(t){function n(){var e,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=r.style,a=Zs(r,oQ);return pt(this,n),e=ee(this,n,[Kt({type:it.HTML,style:i},a)]),e.cullable.enable=!1,e}return te(n,t),ht(n,[{key:"getDomElement",value:function(){return this.parsedStyle.$el}},{key:"getClientRects",value:function(){return[this.getBoundingClientRect()]}},{key:"getLocalBounds",value:function(){if(this.parentNode){var r=Yi(Ne(),this.parentNode.getWorldTransform()),i=this.getBounds();if(!Fn.isEmpty(i)){var a=new Fn;return a.setFromTransformedAABB(i,r),a}}return this.getBounds()}}])})(nn);el.PARSED_STYLE_LIST=new Set([].concat(ce(nn.PARSED_STYLE_LIST),["x","y","$el","innerHTML","width","height"]));var h0=(function(t){function n(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return pt(this,n),ee(this,n,[Kt({type:it.IMAGE},e)])}return te(n,t),ht(n)})(nn);h0.PARSED_STYLE_LIST=new Set([].concat(ce(nn.PARSED_STYLE_LIST),["x","y","z","src","width","height","isBillboard","billboardRotation","isSizeAttenuation","keepAspectRatio"]));var sQ=["style"],nl=(function(t){function n(){var e,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=r.style,a=Zs(r,sQ);pt(this,n),e=ee(this,n,[Kt({type:it.LINE,style:Kt({x1:0,y1:0,x2:0,y2:0,z1:0,z2:0},i)},a)]),e.markerStartAngle=0,e.markerEndAngle=0;var o=e.parsedStyle,s=o.markerStart,l=o.markerEnd;return s&&Oe(s)&&(e.markerStartAngle=s.getLocalEulerAngles(),e.appendChild(s)),l&&Oe(l)&&(e.markerEndAngle=l.getLocalEulerAngles(),e.appendChild(l)),e.transformMarker(!0),e.transformMarker(!1),e}return te(n,t),ht(n,[{key:"attributeChangedCallback",value:function(r,i,a,o,s){r==="x1"||r==="y1"||r==="x2"||r==="y2"||r==="markerStartOffset"||r==="markerEndOffset"?(this.transformMarker(!0),this.transformMarker(!1)):r==="markerStart"?(o&&Oe(o)&&(this.markerStartAngle=0,o.remove()),s&&Oe(s)&&(this.markerStartAngle=s.getLocalEulerAngles(),this.appendChild(s),this.transformMarker(!0))):r==="markerEnd"&&(o&&Oe(o)&&(this.markerEndAngle=0,o.remove()),s&&Oe(s)&&(this.markerEndAngle=s.getLocalEulerAngles(),this.appendChild(s),this.transformMarker(!1)))}},{key:"transformMarker",value:function(r){var i=this.parsedStyle,a=i.markerStart,o=i.markerEnd,s=i.markerStartOffset,l=i.markerEndOffset,c=i.x1,u=i.x2,f=i.y1,d=i.y2,h=r?a:o;if(!(!h||!Oe(h))){var p=0,g,y,m,x,_,w;r?(m=c,x=f,g=u-c,y=d-f,_=s||0,w=this.markerStartAngle):(m=u,x=d,g=c-u,y=f-d,_=l||0,w=this.markerEndAngle),p=Math.atan2(y,g),h.setLocalEulerAngles(p*180/Math.PI+w),h.setLocalPosition(m+Math.cos(p)*_,x+Math.sin(p)*_)}}},{key:"getPoint",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=this.parsedStyle,o=a.x1,s=a.y1,l=a.x2,c=a.y2,u=u5(o,s,l,c,r),f=u.x,d=u.y,h=wn(fe(),ke(f,d,0),i?this.getWorldTransform():this.getLocalTransform());return new lr(h[0],h[1])}},{key:"getPointAtLength",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return this.getPoint(r/this.getTotalLength(),i)}},{key:"getTotalLength",value:function(){var r=this.parsedStyle,i=r.x1,a=r.y1,o=r.x2,s=r.y2;return c5(i,a,o,s)}}])})(nn);nl.PARSED_STYLE_LIST=new Set([].concat(ce(nn.PARSED_STYLE_LIST),["x1","y1","x2","y2","z1","z2","isBillboard","isSizeAttenuation","markerStart","markerEnd","markerStartOffset","markerEndOffset"]));var lQ=["style"],ur=(function(t){function n(){var e,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=r.style,a=Zs(r,lQ);pt(this,n),e=ee(this,n,[Kt({type:it.PATH,style:i,initialParsedStyle:{miterLimit:4,d:Kt({},p5)}},a)]),e.markerStartAngle=0,e.markerEndAngle=0,e.markerMidList=[];var o=e.parsedStyle,s=o.markerStart,l=o.markerEnd,c=o.markerMid;return s&&Oe(s)&&(e.markerStartAngle=s.getLocalEulerAngles(),e.appendChild(s)),c&&Oe(c)&&e.placeMarkerMid(c),l&&Oe(l)&&(e.markerEndAngle=l.getLocalEulerAngles(),e.appendChild(l)),e.transformMarker(!0),e.transformMarker(!1),e}return te(n,t),ht(n,[{key:"attributeChangedCallback",value:function(r,i,a,o,s){r==="d"?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):r==="markerStartOffset"||r==="markerEndOffset"?(this.transformMarker(!0),this.transformMarker(!1)):r==="markerStart"?(o&&Oe(o)&&(this.markerStartAngle=0,o.remove()),s&&Oe(s)&&(this.markerStartAngle=s.getLocalEulerAngles(),this.appendChild(s),this.transformMarker(!0))):r==="markerEnd"?(o&&Oe(o)&&(this.markerEndAngle=0,o.remove()),s&&Oe(s)&&(this.markerEndAngle=s.getLocalEulerAngles(),this.appendChild(s),this.transformMarker(!1))):r==="markerMid"&&this.placeMarkerMid(s)}},{key:"transformMarker",value:function(r){var i=this.parsedStyle,a=i.markerStart,o=i.markerEnd,s=i.markerStartOffset,l=i.markerEndOffset,c=r?a:o;if(!(!c||!Oe(c))){var u=0,f,d,h,p,g,y;if(r){var m=this.getStartTangent(),x=Ut(m,2),_=x[0],w=x[1];h=w[0],p=w[1],f=_[0]-w[0],d=_[1]-w[1],g=s||0,y=this.markerStartAngle}else{var O=this.getEndTangent(),S=Ut(O,2),E=S[0],M=S[1];h=M[0],p=M[1],f=E[0]-M[0],d=E[1]-M[1],g=l||0,y=this.markerEndAngle}u=Math.atan2(d,f),c.setLocalEulerAngles(u*180/Math.PI+y),c.setLocalPosition(h+Math.cos(u)*g,p+Math.sin(u)*g)}}},{key:"placeMarkerMid",value:function(r){var i=this.parsedStyle.d.segments;if(this.markerMidList.forEach(function(u){u.remove()}),r&&Oe(r))for(var a=1;a<i.length-1;a++){var o=Ut(i[a].currentPoint,2),s=o[0],l=o[1],c=a===1?r:r.cloneNode(!0);this.markerMidList.push(c),this.appendChild(c),c.setLocalPosition(s,l)}}},{key:"getTotalLength",value:function(){return x1(this)}},{key:"getPointAtLength",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=this.parsedStyle.d.absolutePath,o=aH(a,r),s=o.x,l=o.y,c=wn(fe(),ke(s,l,0),i?this.getWorldTransform():this.getLocalTransform());return new lr(c[0],c[1])}},{key:"getPoint",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return this.getPointAtLength(r*x1(this),i)}},{key:"getStartTangent",value:function(){var r=this.parsedStyle.d.segments,i=[];if(r.length>1){var a=r[0].currentPoint,o=r[1].currentPoint,s=r[1].startTangent;i=[],s?(i.push([a[0]-s[0],a[1]-s[1]]),i.push([a[0],a[1]])):(i.push([o[0],o[1]]),i.push([a[0],a[1]]))}return i}},{key:"getEndTangent",value:function(){var r=this.parsedStyle.d.segments,i=r.length,a=[];if(i>1){var o=r[i-2].currentPoint,s=r[i-1].currentPoint,l=r[i-1].endTangent;a=[],l?(a.push([s[0]-l[0],s[1]-l[1]]),a.push([s[0],s[1]])):(a.push([o[0],o[1]]),a.push([s[0],s[1]]))}return a}}])})(nn);ur.PARSED_STYLE_LIST=new Set([].concat(ce(nn.PARSED_STYLE_LIST),["d","markerStart","markerMid","markerEnd","markerStartOffset","markerEndOffset","isBillboard","isSizeAttenuation"]));var cQ=["style"],rl=(function(t){function n(){var e,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=r.style,a=Zs(r,cQ);pt(this,n),e=ee(this,n,[Kt({type:it.POLYGON,style:i,initialParsedStyle:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:!0}},a)]),e.markerStartAngle=0,e.markerEndAngle=0,e.markerMidList=[];var o=e.parsedStyle,s=o.markerStart,l=o.markerEnd,c=o.markerMid;return s&&Oe(s)&&(e.markerStartAngle=s.getLocalEulerAngles(),e.appendChild(s)),c&&Oe(c)&&e.placeMarkerMid(c),l&&Oe(l)&&(e.markerEndAngle=l.getLocalEulerAngles(),e.appendChild(l)),e.transformMarker(!0),e.transformMarker(!1),e}return te(n,t),ht(n,[{key:"attributeChangedCallback",value:function(r,i,a,o,s){r==="points"?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):r==="markerStartOffset"||r==="markerEndOffset"?(this.transformMarker(!0),this.transformMarker(!1)):r==="markerStart"?(o&&Oe(o)&&(this.markerStartAngle=0,o.remove()),s&&Oe(s)&&(this.markerStartAngle=s.getLocalEulerAngles(),this.appendChild(s),this.transformMarker(!0))):r==="markerEnd"?(o&&Oe(o)&&(this.markerEndAngle=0,o.remove()),s&&Oe(s)&&(this.markerEndAngle=s.getLocalEulerAngles(),this.appendChild(s),this.transformMarker(!1))):r==="markerMid"&&this.placeMarkerMid(s)}},{key:"transformMarker",value:function(r){var i=this.parsedStyle,a=i.markerStart,o=i.markerEnd,s=i.markerStartOffset,l=i.markerEndOffset,c=i.points,u=c||{},f=u.points,d=r?a:o;if(!(!d||!Oe(d)||!f)){var h=0,p,g,y,m,x,_;if(y=f[0][0],m=f[0][1],r)p=f[1][0]-f[0][0],g=f[1][1]-f[0][1],x=s||0,_=this.markerStartAngle;else{var w=f.length;this.parsedStyle.isClosed?(p=f[w-1][0]-f[0][0],g=f[w-1][1]-f[0][1]):(y=f[w-1][0],m=f[w-1][1],p=f[w-2][0]-f[w-1][0],g=f[w-2][1]-f[w-1][1]),x=l||0,_=this.markerEndAngle}h=Math.atan2(g,p),d.setLocalEulerAngles(h*180/Math.PI+_),d.setLocalPosition(y+Math.cos(h)*x,m+Math.sin(h)*x)}}},{key:"placeMarkerMid",value:function(r){var i=this.parsedStyle.points,a=i||{},o=a.points;if(this.markerMidList.forEach(function(f){f.remove()}),this.markerMidList=[],r&&Oe(r)&&o)for(var s=1;s<(this.parsedStyle.isClosed?o.length:o.length-1);s++){var l=o[s][0],c=o[s][1],u=s===1?r:r.cloneNode(!0);this.markerMidList.push(u),this.appendChild(u),u.setLocalPosition(l,c)}}}])})(nn);rl.PARSED_STYLE_LIST=new Set([].concat(ce(nn.PARSED_STYLE_LIST),["points","markerStart","markerMid","markerEnd","markerStartOffset","markerEndOffset","isClosed","isBillboard","isSizeAttenuation"]));var uQ=["style"],p0=(function(t){function n(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=e.style,i=Zs(e,uQ);return pt(this,n),ee(this,n,[Kt({type:it.POLYLINE,style:r,initialParsedStyle:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:!1}},i)])}return te(n,t),ht(n,[{key:"getTotalLength",value:function(){return Kq(this)}},{key:"getPointAtLength",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return this.getPoint(r/this.getTotalLength(),i)}},{key:"getPoint",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=this.parsedStyle.points.points;if(this.parsedStyle.points.segments.length===0){var o=[],s=0,l,c,u=this.getTotalLength();a.forEach(function(m,x){a[x+1]&&(l=[0,0],l[0]=s/u,c=c5(m[0],m[1],a[x+1][0],a[x+1][1]),s+=c,l[1]=s/u,o.push(l))}),this.parsedStyle.points.segments=o}var f=0,d=0;this.parsedStyle.points.segments.forEach(function(m,x){r>=m[0]&&r<=m[1]&&(f=(r-m[0])/(m[1]-m[0]),d=x)});var h=u5(a[d][0],a[d][1],a[d+1][0],a[d+1][1],f),p=h.x,g=h.y,y=wn(fe(),ke(p,g,0),i?this.getWorldTransform():this.getLocalTransform());return new lr(y[0],y[1])}},{key:"getStartTangent",value:function(){var r=this.parsedStyle.points.points,i=[];return i.push([r[1][0],r[1][1]]),i.push([r[0][0],r[0][1]]),i}},{key:"getEndTangent",value:function(){var r=this.parsedStyle.points.points,i=r.length-1,a=[];return a.push([r[i-1][0],r[i-1][1]]),a.push([r[i][0],r[i][1]]),a}}])})(rl);p0.PARSED_STYLE_LIST=new Set([].concat(ce(rl.PARSED_STYLE_LIST),["points","markerStart","markerMid","markerEnd","markerStartOffset","markerEndOffset","isBillboard"]));var Zo=(function(t){function n(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return pt(this,n),ee(this,n,[Kt({type:it.RECT},e)])}return te(n,t),ht(n)})(nn);Zo.PARSED_STYLE_LIST=new Set([].concat(ce(nn.PARSED_STYLE_LIST),["x","y","z","width","height","isBillboard","isSizeAttenuation","radius"]));var fQ=["style"],ki=(function(t){function n(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=e.style,i=Zs(e,fQ);return pt(this,n),ee(this,n,[Kt({type:it.TEXT,style:Kt({fill:"black"},r)},i)])}return te(n,t),ht(n,[{key:"getComputedTextLength",value:function(){var r;return this.getGeometryBounds(),((r=this.parsedStyle.metrics)===null||r===void 0?void 0:r.maxLineWidth)||0}},{key:"getLineBoundingRects",value:function(){var r;return this.getGeometryBounds(),((r=this.parsedStyle.metrics)===null||r===void 0?void 0:r.lineMetrics)||[]}},{key:"isOverflowing",value:function(){return this.getGeometryBounds(),!!this.parsedStyle.isOverflowing}}])})(nn);ki.PARSED_STYLE_LIST=new Set([].concat(ce(nn.PARSED_STYLE_LIST),["x","y","z","isBillboard","billboardRotation","isSizeAttenuation","text","textAlign","textBaseline","fontStyle","fontSize","fontFamily","fontWeight","fontVariant","lineHeight","letterSpacing","leading","wordWrap","wordWrapWidth","maxLines","textOverflow","isOverflowing","textPath","textDecorationLine","textDecorationColor","textDecorationStyle","textPathSide","textPathStartOffset","metrics","dx","dy"]));var dQ=(function(){function t(){pt(this,t),this.registry={},this.define(it.CIRCLE,Sa),this.define(it.ELLIPSE,d0),this.define(it.RECT,Zo),this.define(it.IMAGE,h0),this.define(it.LINE,nl),this.define(it.GROUP,Qn),this.define(it.PATH,ur),this.define(it.POLYGON,rl),this.define(it.POLYLINE,p0),this.define(it.TEXT,ki),this.define(it.HTML,el)}return ht(t,[{key:"define",value:function(e,r){this.registry[e]=r}},{key:"get",value:function(e){return this.registry[e]}}])})(),W5={number:function(n){return new Ye(n)},percent:function(n){return new Ye(n,"%")},px:function(n){return new Ye(n,"px")},em:function(n){return new Ye(n,"em")},rem:function(n){return new Ye(n,"rem")},deg:function(n){return new Ye(n,"deg")},grad:function(n){return new Ye(n,"grad")},rad:function(n){return new Ye(n,"rad")},turn:function(n){return new Ye(n,"turn")},s:function(n){return new Ye(n,"s")},ms:function(n){return new Ye(n,"ms")},registerProperty:function(n){var e=n.name,r=n.inherits,i=n.interpolable,a=n.initialValue,o=n.syntax;dt.styleValueRegistry.registerMetadata({n:e,inh:r,int:i,d:a,syntax:o})},registerLayout:function(n,e){dt.layoutRegistry.registerLayout(n,e)}},hQ=(function(t){function n(){var e;pt(this,n),e=ee(this,n),e.defaultView=null,e.ownerDocument=null,e.nodeName="document";try{e.timeline=new dt.AnimationTimeline(e)}catch{}var r={};return Ex.forEach(function(i){var a=i.n,o=i.inh,s=i.d;o&&s&&(r[a]=Xn(s)?s(it.GROUP):s)}),e.documentElement=new Qn({id:"g-root",style:r}),e.documentElement.ownerDocument=e,e.documentElement.parentNode=e,e.childNodes=[e.documentElement],e}return te(n,t),ht(n,[{key:"children",get:function(){return this.childNodes}},{key:"childElementCount",get:function(){return this.childNodes.length}},{key:"firstElementChild",get:function(){return this.firstChild}},{key:"lastElementChild",get:function(){return this.lastChild}},{key:"createElement",value:function(r,i){if(r==="svg")return this.documentElement;var a=this.defaultView.customElements.get(r);a||(console.warn("Unsupported tagName: ",r),a=r==="tspan"?ki:Qn);var o=new a(i);return o.ownerDocument=this,o}},{key:"createElementNS",value:function(r,i,a){return this.createElement(i,a)}},{key:"cloneNode",value:function(r){throw new Error(Ge)}},{key:"destroy",value:function(){try{this.documentElement.destroyChildren(),this.timeline.destroy()}catch{}}},{key:"elementsFromBBox",value:function(r,i,a,o){var s=this.defaultView.context.rBushRoot,l=s.search({minX:r,minY:i,maxX:a,maxY:o}),c=[];return l.forEach(function(u){var f=u.displayObject,d=f.parsedStyle.pointerEvents,h=d===void 0?"auto":d,p=["auto","visiblepainted","visiblefill","visiblestroke","visible"].includes(h);(!p||p&&f.isVisible())&&!f.isCulled()&&f.isInteractive()&&c.push(f)}),c.sort(function(u,f){return f.sortable.renderOrder-u.sortable.renderOrder}),c}},{key:"elementFromPointSync",value:function(r,i){var a=this.defaultView.canvas2Viewport({x:r,y:i}),o=a.x,s=a.y,l=this.defaultView.getConfig(),c=l.width,u=l.height;if(o<0||s<0||o>c||s>u)return null;var f=this.defaultView.viewport2Client({x:o,y:s}),d=f.x,h=f.y,p=this.defaultView.getRenderingService().hooks.pickSync.call({topmost:!0,position:{x:r,y:i,viewportX:o,viewportY:s,clientX:d,clientY:h},picked:[]}),g=p.picked;return g&&g[0]||this.documentElement}},{key:"elementFromPoint",value:(function(){var e=Fo(yr().mark(function i(a,o){var s,l,c,u,f,d,h,p,g,y,m;return yr().wrap(function(x){for(;;)switch(x.prev=x.next){case 0:if(s=this.defaultView.canvas2Viewport({x:a,y:o}),l=s.x,c=s.y,u=this.defaultView.getConfig(),f=u.width,d=u.height,!(l<0||c<0||l>f||c>d)){x.next=1;break}return x.abrupt("return",null);case 1:return h=this.defaultView.viewport2Client({x:l,y:c}),p=h.x,g=h.y,x.next=2,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!0,position:{x:a,y:o,viewportX:l,viewportY:c,clientX:p,clientY:g},picked:[]});case 2:return y=x.sent,m=y.picked,x.abrupt("return",m&&m[0]||this.documentElement);case 3:case"end":return x.stop()}},i,this)}));function r(i,a){return e.apply(this,arguments)}return r})()},{key:"elementsFromPointSync",value:function(r,i){var a=this.defaultView.canvas2Viewport({x:r,y:i}),o=a.x,s=a.y,l=this.defaultView.getConfig(),c=l.width,u=l.height;if(o<0||s<0||o>c||s>u)return[];var f=this.defaultView.viewport2Client({x:o,y:s}),d=f.x,h=f.y,p=this.defaultView.getRenderingService().hooks.pickSync.call({topmost:!1,position:{x:r,y:i,viewportX:o,viewportY:s,clientX:d,clientY:h},picked:[]}),g=p.picked;return g[g.length-1]!==this.documentElement&&g.push(this.documentElement),g}},{key:"elementsFromPoint",value:(function(){var e=Fo(yr().mark(function i(a,o){var s,l,c,u,f,d,h,p,g,y,m;return yr().wrap(function(x){for(;;)switch(x.prev=x.next){case 0:if(s=this.defaultView.canvas2Viewport({x:a,y:o}),l=s.x,c=s.y,u=this.defaultView.getConfig(),f=u.width,d=u.height,!(l<0||c<0||l>f||c>d)){x.next=1;break}return x.abrupt("return",[]);case 1:return h=this.defaultView.viewport2Client({x:l,y:c}),p=h.x,g=h.y,x.next=2,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!1,position:{x:a,y:o,viewportX:l,viewportY:c,clientX:p,clientY:g},picked:[]});case 2:return y=x.sent,m=y.picked,m[m.length-1]!==this.documentElement&&m.push(this.documentElement),x.abrupt("return",m);case 3:case"end":return x.stop()}},i,this)}));function r(i,a){return e.apply(this,arguments)}return r})()},{key:"appendChild",value:function(r,i){throw new Error(Sl)}},{key:"insertBefore",value:function(r,i){throw new Error(Sl)}},{key:"removeChild",value:function(r,i){throw new Error(Sl)}},{key:"replaceChild",value:function(r,i,a){throw new Error(Sl)}},{key:"append",value:function(){throw new Error(Sl)}},{key:"prepend",value:function(){throw new Error(Sl)}},{key:"getElementById",value:function(r){return this.documentElement.getElementById(r)}},{key:"getElementsByName",value:function(r){return this.documentElement.getElementsByName(r)}},{key:"getElementsByTagName",value:function(r){return this.documentElement.getElementsByTagName(r)}},{key:"getElementsByClassName",value:function(r){return this.documentElement.getElementsByClassName(r)}},{key:"querySelector",value:function(r){return this.documentElement.querySelector(r)}},{key:"querySelectorAll",value:function(r){return this.documentElement.querySelectorAll(r)}},{key:"find",value:function(r){return this.documentElement.find(r)}},{key:"findAll",value:function(r){return this.documentElement.findAll(r)}}])})(pn),G5=(function(){function t(n){pt(this,t),this.strategies=n}return ht(t,[{key:"apply",value:function(e){var r=e.config,i=e.camera,a=e.renderingService,o=e.renderingContext,s=this.strategies;a.hooks.cull.tap(t.tag,function(l){if(l){var c,u=l.cullable;if(s.length===0?u.visible=o.unculledEntities.indexOf(l.entity)>-1:u.visible=s.every(function(d){return d.isVisible(i,l)}),!l.isCulled()&&l.isVisible())return l;var f=((c=r.future)===null||c===void 0?void 0:c.experimentalCancelEventPropagation)===!0;return l.dispatchEvent(new ze(re.CULLED),f,f),null}return l}),a.hooks.afterRender.tap(t.tag,function(l){l.cullable.visibilityPlaneMask=-1})}}])})();G5.tag="Culling";var Y5=(function(){function t(){var n=this;pt(this,t),this.autoPreventDefault=!1,this.rootPointerEvent=new S1(null),this.rootWheelEvent=new E1(null),this.onPointerMove=function(e){var r,i=(r=n.context.renderingContext.root)===null||r===void 0||(r=r.ownerDocument)===null||r===void 0?void 0:r.defaultView;if(!(i.supportsTouchEvents&&e.pointerType==="touch")){var a=n.normalizeToPointerEvent(e,i),o=Ss(a),s;try{for(o.s();!(s=o.n()).done;){var l=s.value,c=n.bootstrapEvent(n.rootPointerEvent,l,i,e);n.context.eventService.mapEvent(c)}}catch(u){o.e(u)}finally{o.f()}n.setCursor(n.context.eventService.cursor)}},this.onClick=function(e){var r,i=(r=n.context.renderingContext.root)===null||r===void 0||(r=r.ownerDocument)===null||r===void 0?void 0:r.defaultView,a=n.normalizeToPointerEvent(e,i),o=Ss(a),s;try{for(o.s();!(s=o.n()).done;){var l=s.value,c=n.bootstrapEvent(n.rootPointerEvent,l,i,e);n.context.eventService.mapEvent(c)}}catch(u){o.e(u)}finally{o.f()}n.setCursor(n.context.eventService.cursor)}}return ht(t,[{key:"apply",value:function(e){var r=this;this.context=e;var i=e.renderingService,a=this.context.renderingContext.root.ownerDocument.defaultView;this.context.eventService.setPickHandler(function(o){var s=r.context.renderingService.hooks.pickSync.call({position:o,picked:[],topmost:!0}),l=s.picked;return l[0]||null}),i.hooks.pointerWheel.tap(t.tag,function(o){var s=r.normalizeWheelEvent(o);r.context.eventService.mapEvent(s)}),i.hooks.pointerDown.tap(t.tag,function(o){if(!(a.supportsTouchEvents&&o.pointerType==="touch")){var s=r.normalizeToPointerEvent(o,a);if(r.autoPreventDefault&&s[0].isNormalized){var l=o.cancelable||!("cancelable"in o);l&&o.preventDefault()}var c=Ss(s),u;try{for(c.s();!(u=c.n()).done;){var f=u.value,d=r.bootstrapEvent(r.rootPointerEvent,f,a,o);r.context.eventService.mapEvent(d)}}catch(h){c.e(h)}finally{c.f()}r.setCursor(r.context.eventService.cursor)}}),i.hooks.pointerUp.tap(t.tag,function(o){if(!(a.supportsTouchEvents&&o.pointerType==="touch")){var s=r.context.contextService.getDomElement(),l=r.context.eventService.isNativeEventFromCanvas(s,o),c=l?"":"outside",u=r.normalizeToPointerEvent(o,a),f=Ss(u),d;try{for(f.s();!(d=f.n()).done;){var h=d.value,p=r.bootstrapEvent(r.rootPointerEvent,h,a,o);p.type+=c,r.context.eventService.mapEvent(p)}}catch(g){f.e(g)}finally{f.f()}r.setCursor(r.context.eventService.cursor)}}),i.hooks.pointerMove.tap(t.tag,this.onPointerMove),i.hooks.pointerOver.tap(t.tag,this.onPointerMove),i.hooks.pointerOut.tap(t.tag,this.onPointerMove),i.hooks.click.tap(t.tag,this.onClick),i.hooks.pointerCancel.tap(t.tag,function(o){var s=r.normalizeToPointerEvent(o,a),l=Ss(s),c;try{for(l.s();!(c=l.n()).done;){var u=c.value,f=r.bootstrapEvent(r.rootPointerEvent,u,a,o);r.context.eventService.mapEvent(f)}}catch(d){l.e(d)}finally{l.f()}r.setCursor(r.context.eventService.cursor)})}},{key:"bootstrapEvent",value:function(e,r,i,a){e.view=i,e.originalEvent=null,e.nativeEvent=a,e.pointerId=r.pointerId,e.width=r.width,e.height=r.height,e.isPrimary=r.isPrimary,e.pointerType=r.pointerType,e.pressure=r.pressure,e.tangentialPressure=r.tangentialPressure,e.tiltX=r.tiltX,e.tiltY=r.tiltY,e.twist=r.twist,this.transferMouseData(e,r);var o=this.context.eventService.client2Viewport({x:r.clientX,y:r.clientY}),s=o.x,l=o.y;e.viewport.x=s,e.viewport.y=l;var c=this.context.eventService.viewport2Canvas(e.viewport),u=c.x,f=c.y;return e.canvas.x=u,e.canvas.y=f,e.global.copyFrom(e.canvas),e.offset.copyFrom(e.canvas),e.isTrusted=a.isTrusted,e.type==="pointerleave"&&(e.type="pointerout"),e.type.startsWith("mouse")&&(e.type=e.type.replace("mouse","pointer")),e.type.startsWith("touch")&&(e.type=XK[e.type]||e.type),e}},{key:"normalizeWheelEvent",value:function(e){var r=this.rootWheelEvent;this.transferMouseData(r,e),r.deltaMode=e.deltaMode,r.deltaX=e.deltaX,r.deltaY=e.deltaY,r.deltaZ=e.deltaZ;var i=this.context.eventService.client2Viewport({x:e.clientX,y:e.clientY}),a=i.x,o=i.y;r.viewport.x=a,r.viewport.y=o;var s=this.context.eventService.viewport2Canvas(r.viewport),l=s.x,c=s.y;return r.canvas.x=l,r.canvas.y=c,r.global.copyFrom(r.canvas),r.offset.copyFrom(r.canvas),r.nativeEvent=e,r.type=e.type,r}},{key:"transferMouseData",value:function(e,r){e.isTrusted=r.isTrusted,e.srcElement=r.srcElement,e.timeStamp=O1.now(),e.type=r.type,e.altKey=r.altKey,e.metaKey=r.metaKey,e.shiftKey=r.shiftKey,e.ctrlKey=r.ctrlKey,e.button=r.button,e.buttons=r.buttons,e.client.x=r.clientX,e.client.y=r.clientY,e.movement.x=r.movementX,e.movement.y=r.movementY,e.page.x=r.pageX,e.page.y=r.pageY,e.screen.x=r.screenX,e.screen.y=r.screenY,e.relatedTarget=null}},{key:"setCursor",value:function(e){this.context.contextService.applyCursorStyle(e||this.context.config.cursor||"default")}},{key:"normalizeToPointerEvent",value:function(e,r){var i=[];if(r.isTouchEvent(e))for(var a=0;a<e.changedTouches.length;a++){var o=e.changedTouches[a];Be(o.button)&&(o.button=0),Be(o.buttons)&&(o.buttons=1),Be(o.isPrimary)&&(o.isPrimary=e.touches.length===1&&e.type==="touchstart"),Be(o.width)&&(o.width=o.radiusX||1),Be(o.height)&&(o.height=o.radiusY||1),Be(o.tiltX)&&(o.tiltX=0),Be(o.tiltY)&&(o.tiltY=0),Be(o.pointerType)&&(o.pointerType="touch"),Be(o.pointerId)&&(o.pointerId=o.identifier||0),Be(o.pressure)&&(o.pressure=o.force||.5),Be(o.twist)&&(o.twist=0),Be(o.tangentialPressure)&&(o.tangentialPressure=0),o.isNormalized=!0,o.type=e.type,i.push(o)}else if(r.isMouseEvent(e)){var s=e;Be(s.isPrimary)&&(s.isPrimary=!0),Be(s.width)&&(s.width=1),Be(s.height)&&(s.height=1),Be(s.tiltX)&&(s.tiltX=0),Be(s.tiltY)&&(s.tiltY=0),Be(s.pointerType)&&(s.pointerType="mouse"),Be(s.pointerId)&&(s.pointerId=VK),Be(s.pressure)&&(s.pressure=.5),Be(s.twist)&&(s.twist=0),Be(s.tangentialPressure)&&(s.tangentialPressure=0),s.isNormalized=!0,i.push(s)}else i.push(e);return i}}])})();Y5.tag="Event";var pQ=[it.CIRCLE,it.ELLIPSE,it.IMAGE,it.RECT,it.LINE,it.POLYLINE,it.POLYGON,it.TEXT,it.PATH,it.HTML],vQ=(function(){function t(){pt(this,t)}return ht(t,[{key:"isVisible",value:function(e,r){var i,a=r.cullable;if(!a.enable)return!0;var o=r.getRenderBounds();if(Fn.isEmpty(o))return!1;var s=e.getFrustum(),l=(i=r.parentNode)===null||i===void 0||(i=i.cullable)===null||i===void 0?void 0:i.visibilityPlaneMask;return a.visibilityPlaneMask=this.computeVisibilityWithPlaneMask(r,o,l||Ol.INDETERMINATE,s.planes),a.visible=a.visibilityPlaneMask!==Ol.OUTSIDE,a.visible}},{key:"computeVisibilityWithPlaneMask",value:function(e,r,i,a){if(i===Ol.OUTSIDE||i===Ol.INSIDE)return i;for(var o=Ol.INSIDE,s=pQ.indexOf(e.nodeName)>-1,l=0,c=a.length;l<c;++l){var u=1<<l;if((i&u)!==0&&!(s&&(l===4||l===5))){var f=a[l],d=f.normal,h=f.distance;if(da(d,r.getPositiveFarPoint(a[l]))+h<0)return Ol.OUTSIDE;da(d,r.getNegativeFarPoint(a[l]))+h<0&&(o|=u)}}return o}}])})(),H5=(function(){function t(){pt(this,t),this.syncTasks=new Map,this.isFirstTimeRendering=!0,this.syncing=!1,this.isFirstTimeRenderingFinished=!1}return ht(t,[{key:"apply",value:function(e){var r=this,i,a,o=e.config,s=e.renderingService,l=e.renderingContext,c=e.rBushRoot,u=l.root.ownerDocument.defaultView;this.rBush=c;var f=function(x){s.dirtify()},d=function(x){r.syncTasks.set(x.target,x.detail.affectChildren),s.dirtify()},h=function(x){var _=x.target;dt.enableSizeAttenuation&&dt.styleValueRegistry.updateSizeAttenuation(_,u.getCamera().getZoom())},p=function(x){var _=x.target,w=_.rBushNode;w!=null&&w.aabb&&r.rBush.remove(w.aabb),r.syncTasks.delete(_),dt.sceneGraphService.dirtyToRoot(_),s.dirtify()};s.hooks.init.tap(t.tag,function(){u.addEventListener(re.MOUNTED,h),u.addEventListener(re.UNMOUNTED,p),u.addEventListener(re.ATTR_MODIFIED,f),u.addEventListener(re.BOUNDS_CHANGED,d)}),s.hooks.destroy.tap(t.tag,function(){u.removeEventListener(re.MOUNTED,h),u.removeEventListener(re.UNMOUNTED,p),u.removeEventListener(re.ATTR_MODIFIED,f),u.removeEventListener(re.BOUNDS_CHANGED,d),r.syncTasks.clear()});var g=(i=dt.globalThis.requestIdleCallback)!==null&&i!==void 0?i:Mx.bind(dt.globalThis),y=((a=o.future)===null||a===void 0?void 0:a.experimentalRICSyncRTree)===!0;s.hooks.endFrame.tap(t.tag,function(){r.isFirstTimeRendering?(r.isFirstTimeRendering=!1,r.syncing=!0,g(function(){r.syncRTree(!0),r.isFirstTimeRenderingFinished=!0})):y&&dt.globalThis.requestIdleCallback&&dt.globalThis.cancelIdleCallback?(dt.globalThis.cancelIdleCallback(r.ricSyncRTreeId),r.ricSyncRTreeId=dt.globalThis.requestIdleCallback(function(){return r.syncRTree()})):r.syncRTree()})}},{key:"syncNode",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(e.isConnected){var i=e.rBushNode;i.aabb&&this.rBush.remove(i.aabb);var a=e.getRenderBounds();if(a){var o=e.renderable;r&&(o.dirtyRenderBounds||(o.dirtyRenderBounds=new Fn),o.dirtyRenderBounds.update(a.center,a.halfExtents));var s=a.getMin(),l=Ut(s,2),c=l[0],u=l[1],f=a.getMax(),d=Ut(f,2),h=d[0],p=d[1];i.aabb||(i.aabb={}),i.aabb.displayObject=e,i.aabb.minX=c,i.aabb.minY=u,i.aabb.maxX=h,i.aabb.maxY=p}if(i.aabb&&!isNaN(i.aabb.maxX)&&!isNaN(i.aabb.maxX)&&!isNaN(i.aabb.minX)&&!isNaN(i.aabb.minY))return i.aabb}}},{key:"syncRTree",value:function(){var e=this,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(!(!r&&(this.syncing||this.syncTasks.size===0))){this.syncing=!0;var i=[],a=new Set,o=function(l){if(!a.has(l)&&l.renderable){var c=e.syncNode(l,r);c&&(i.push(c),a.add(l))}};this.syncTasks.forEach(function(s,l){s&&l.forEach(o);for(var c=l;c;)o(c),c=c.parentElement}),this.rBush.load(i),i.length=0,this.syncing=!1}}}])})();H5.tag="Prepare";var mi=(function(t){return t.READY="ready",t.BEFORE_RENDER="beforerender",t.RERENDER="rerender",t.AFTER_RENDER="afterrender",t.BEFORE_DESTROY="beforedestroy",t.AFTER_DESTROY="afterdestroy",t.RESIZE="resize",t.DIRTY_RECTANGLE="dirtyrectangle",t.RENDERER_CHANGED="rendererchanged",t})({}),ek=500,gQ=.1,yQ=1e3,fh=new ze(re.MOUNTED),dh=new ze(re.UNMOUNTED),Gy=new ze(mi.BEFORE_RENDER),nk=new ze(mi.RERENDER),Yy=new ze(mi.AFTER_RENDER),U5=(function(t){function n(e){var r;pt(this,n),r=ee(this,n),r.Element=nn,r.inited=!1,r.context={};var i=e.container,a=e.canvas,o=e.renderer,s=e.width,l=e.height,c=e.background,u=e.cursor,f=e.supportsMutipleCanvasesInOneContainer,d=e.cleanUpOnDestroy,h=d===void 0?!0:d,p=e.offscreenCanvas,g=e.devicePixelRatio,y=e.requestAnimationFrame,m=e.cancelAnimationFrame,x=e.createImage,_=e.supportsTouchEvents,w=e.supportsPointerEvents,O=e.isTouchEvent,S=e.isMouseEvent,E=e.dblClickSpeed,M=s,A=l,T=g||kx&&window.devicePixelRatio||1;return T=T>=1?Math.ceil(T):1,a&&(M=s||HK(a)||a.width/T,A=l||UK(a)||a.height/T),r.customElements=new dQ,r.devicePixelRatio=T,r.requestAnimationFrame=y??Mx.bind(dt.globalThis),r.cancelAnimationFrame=m??$5.bind(dt.globalThis),r.createImage=x??function(){return new window.Image},r.supportsTouchEvents=_??"ontouchstart"in dt.globalThis,r.supportsPointerEvents=w??!!dt.globalThis.PointerEvent,r.isTouchEvent=O??function(P){return r.supportsTouchEvents&&P instanceof dt.globalThis.TouchEvent},r.isMouseEvent=S??function(P){return!dt.globalThis.MouseEvent||P instanceof dt.globalThis.MouseEvent&&(!r.supportsPointerEvents||!(P instanceof dt.globalThis.PointerEvent))},p&&(dt.offscreenCanvas=p),r.document=new hQ,r.document.defaultView=r,f||zK(i,r,h),r.initRenderingContext(Kt(Kt({},e),{},{width:M,height:A,background:c??"transparent",cursor:u??"default",cleanUpOnDestroy:h,devicePixelRatio:T,requestAnimationFrame:r.requestAnimationFrame,cancelAnimationFrame:r.cancelAnimationFrame,createImage:r.createImage,supportsTouchEvents:r.supportsTouchEvents,supportsPointerEvents:r.supportsPointerEvents,isTouchEvent:r.isTouchEvent,isMouseEvent:r.isMouseEvent,dblClickSpeed:E??200})),r.initDefaultCamera(M,A,o.clipSpaceNearZ),r.initRenderer(o,!0),r}return te(n,t),ht(n,[{key:"initRenderingContext",value:function(r){this.context.config=r,this.context.renderingContext={root:this.document.documentElement,unculledEntities:[],renderListCurrentFrame:[],renderReasons:new Set,force:!1,dirty:!1}}},{key:"initDefaultCamera",value:function(r,i,a){var o=this,s=new dt.CameraContribution;s.clipSpaceNearZ=a,s.setType(We.EXPLORING,v1.DEFAULT).setPosition(r/2,i/2,ek).setFocalPoint(r/2,i/2,0).setOrthographic(r/-2,r/2,i/2,i/-2,gQ,yQ),s.canvas=this,s.eventEmitter.on(d5.UPDATED,function(){o.context.renderingContext.renderReasons.add(Gl.CAMERA_CHANGED),dt.enableSizeAttenuation&&o.getConfig().renderer.getConfig().enableSizeAttenuation&&o.updateSizeAttenuation()}),this.context.camera=s}},{key:"updateSizeAttenuation",value:function(){var r=this.getCamera().getZoom();this.document.documentElement.forEach(function(i){dt.styleValueRegistry.updateSizeAttenuation(i,r)})}},{key:"getConfig",value:function(){return this.context.config}},{key:"getRoot",value:function(){return this.document.documentElement}},{key:"getCamera",value:function(){return this.context.camera}},{key:"getContextService",value:function(){return this.context.contextService}},{key:"getEventService",value:function(){return this.context.eventService}},{key:"getRenderingService",value:function(){return this.context.renderingService}},{key:"getRenderingContext",value:function(){return this.context.renderingContext}},{key:"getStats",value:function(){return this.getRenderingService().getStats()}},{key:"ready",get:function(){var r=this;return this.readyPromise||(this.readyPromise=new Promise(function(i){r.resolveReadyPromise=function(){i(r)}}),this.inited&&this.resolveReadyPromise()),this.readyPromise}},{key:"destroy",value:function(){var r,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,a=arguments.length>1?arguments[1]:void 0;Wn.clearCache();var o=((r=this.getConfig().future)===null||r===void 0?void 0:r.experimentalCancelEventPropagation)===!0;a||this.dispatchEvent(new ze(mi.BEFORE_DESTROY),o,o),this.frameId&&this.cancelAnimationFrame(this.frameId);var s=this.getRoot();i&&(this.unmountChildren(s),this.document.destroy(),this.getEventService().destroy()),this.getRenderingService().destroy(),this.getContextService().destroy(),this.context.rBushRoot&&this.context.rBushRoot.clear(),a||this.dispatchEvent(new ze(mi.AFTER_DESTROY),o,o);var l=function(u){u.currentTarget=null,u.manager=null,u.target=null,u.relatedNode=null};l(fh),l(dh),l(Gy),l(nk),l(Yy),l(ia),l(k1),l(M1),l(z5),dt.textService.clearCache()}},{key:"changeSize",value:function(r,i){this.resize(r,i)}},{key:"resize",value:function(r,i){var a,o=this.context.config;o.width=r,o.height=i,this.getContextService().resize(r,i);var s=this.context.camera,l=s.getProjectionMode();s.setPosition(r/2,i/2,ek).setFocalPoint(r/2,i/2,0),l===hi.ORTHOGRAPHIC?s.setOrthographic(r/-2,r/2,i/2,i/-2,s.getNear(),s.getFar()):s.setAspect(r/i);var c=((a=o.future)===null||a===void 0?void 0:a.experimentalCancelEventPropagation)===!0;this.dispatchEvent(new ze(mi.RESIZE,{width:r,height:i}),c,c)}},{key:"appendChild",value:function(r,i){return this.document.documentElement.appendChild(r,i)}},{key:"insertBefore",value:function(r,i){return this.document.documentElement.insertBefore(r,i)}},{key:"removeChild",value:function(r){return this.document.documentElement.removeChild(r)}},{key:"removeChildren",value:function(){this.document.documentElement.removeChildren()}},{key:"destroyChildren",value:function(){this.document.documentElement.destroyChildren()}},{key:"render",value:function(r){var i,a=this;r&&(Gy.detail=r,Yy.detail=r);var o=((i=this.getConfig().future)===null||i===void 0?void 0:i.experimentalCancelEventPropagation)===!0;this.dispatchEvent(Gy,o,o);var s=this.getRenderingService();s.render(this.getConfig(),r,function(){a.dispatchEvent(nk,o,o)}),this.dispatchEvent(Yy,o,o)}},{key:"run",value:function(){var r=this,i=function(o,s){r.render(s),r.frameId=r.requestAnimationFrame(i)};i()}},{key:"initRenderer",value:function(r){var i=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(!r)throw new Error("Renderer is required.");this.inited=!1,this.readyPromise=void 0,this.context.rBushRoot=new IX,this.context.renderingPlugins=[],this.context.renderingPlugins.push(new Y5,new H5,new G5([new vQ])),this.loadRendererContainerModule(r),this.context.contextService=new this.context.ContextService(Kt(Kt({},dt),this.context)),this.context.renderingService=new MZ(dt,this.context),this.context.eventService=new kZ(dt,this.context),this.context.eventService.init(),this.context.contextService.init?(this.context.contextService.init(),this.initRenderingService(r,a,!0)):this.context.contextService.initAsync().then(function(){i.initRenderingService(r,a)}).catch(function(o){console.error(o)})}},{key:"initRenderingService",value:function(r){var i=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this.context.renderingService.init(function(){var s;i.inited=!0;var l=((s=i.getConfig().future)===null||s===void 0?void 0:s.experimentalCancelEventPropagation)===!0;a?o?i.requestAnimationFrame(function(){i.dispatchEvent(new ze(mi.READY),l,l)}):i.dispatchEvent(new ze(mi.READY),l,l):i.dispatchEvent(new ze(mi.RENDERER_CHANGED),l,l),i.readyPromise&&i.resolveReadyPromise(),a||i.getRoot().forEach(function(c){var u,f;(u=(f=c).dirty)===null||u===void 0||u.call(f,!0,!0)}),i.mountChildren(i.getRoot()),r.getConfig().enableAutoRendering&&i.run()})}},{key:"loadRendererContainerModule",value:function(r){var i=this,a=r.getPlugins();a.forEach(function(o){o.context=i.context,o.init(dt)})}},{key:"setRenderer",value:function(r){var i=this.getConfig();if(i.renderer!==r){var a=i.renderer;i.renderer=r,this.destroy(!1,!0),ce((a==null?void 0:a.getPlugins())||[]).reverse().forEach(function(o){o.destroy(dt)}),this.initRenderer(r)}}},{key:"setCursor",value:function(r){var i=this.getConfig();i.cursor=r,this.getContextService().applyCursorStyle(r)}},{key:"unmountChildren",value:function(r){var i=this;if(r.childNodes.forEach(function(s){i.unmountChildren(s)}),this.inited){if(r.isMutationObserved)r.dispatchEvent(dh);else{var a,o=((a=this.getConfig().future)===null||a===void 0?void 0:a.experimentalCancelEventPropagation)===!0;dh.target=r,this.dispatchEvent(dh,!0,o)}r!==this.document.documentElement&&(r.ownerDocument=null),r.isConnected=!1}r.isCustomElement&&r.disconnectedCallback&&r.disconnectedCallback()}},{key:"mountChildren",value:function(r){var i=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Gp(r);if(this.inited){if(!r.isConnected&&(r.ownerDocument=this.document,r.isConnected=!0,!a))if(r.isMutationObserved)r.dispatchEvent(fh);else{var o,s=((o=this.getConfig().future)===null||o===void 0?void 0:o.experimentalCancelEventPropagation)===!0;fh.target=r,this.dispatchEvent(fh,!0,s)}}else console.warn("[g]: You are trying to call `canvas.appendChild` before canvas' initialization finished. You can either await `canvas.ready` or listen to `CanvasEvent.READY` manually.","appended child: ",r.nodeName);r.childNodes.forEach(function(l){i.mountChildren(l,a)}),r.isCustomElement&&r.connectedCallback&&r.connectedCallback()}},{key:"mountFragment",value:function(r){this.mountChildren(r,!1)}},{key:"client2Viewport",value:function(r){return this.getEventService().client2Viewport(r)}},{key:"viewport2Client",value:function(r){return this.getEventService().viewport2Client(r)}},{key:"viewport2Canvas",value:function(r){return this.getEventService().viewport2Canvas(r)}},{key:"canvas2Viewport",value:function(r){return this.getEventService().canvas2Viewport(r)}},{key:"getPointByClient",value:function(r,i){return this.client2Viewport({x:r,y:i})}},{key:"getClientByPoint",value:function(r,i){return this.viewport2Client({x:r,y:i})}}])})(B5);/*!
58
+ * @antv/g-camera-api
59
+ * @description A simple implementation of Camera API.
60
+ * @version 2.0.41
61
+ * @date 7/30/2025, 1:34:37 PM
62
+ * @author AntVis
63
+ * @docs https://g.antv.antgroup.com/
64
+ */var mQ=(function(t){function n(){var e;pt(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=ee(this,n,[].concat(i)),e.landmarks=[],e}return te(n,t),ht(n,[{key:"rotate",value:function(r,i,a){if(this.relElevation=Bl(i),this.relAzimuth=Bl(r),this.relRoll=Bl(a),this.elevation+=this.relElevation,this.azimuth+=this.relAzimuth,this.roll+=this.relRoll,this.type===We.EXPLORING){var o=Mo(Vn(),[1,0,0],He((this.rotateWorld?1:-1)*this.relElevation)),s=Mo(Vn(),[0,1,0],He((this.rotateWorld?1:-1)*this.relAzimuth)),l=Mo(Vn(),[0,0,1],He(this.relRoll)),c=Io(Vn(),s,o);c=Io(Vn(),c,l);var u=Gb(Ne(),c);Fl(this.matrix,this.matrix,[0,0,-this.distance]),mr(this.matrix,this.matrix,u),Fl(this.matrix,this.matrix,[0,0,this.distance])}else{if(Math.abs(this.elevation)>90)return this;this.computeMatrix()}return this._getAxes(),this.type===We.ORBITING||this.type===We.EXPLORING?this._getPosition():this.type===We.TRACKING&&this._getFocalPoint(),this._update(),this}},{key:"pan",value:function(r,i){var a=Mr(r,i,0),o=za(this.position);return Ro(o,o,Ep(fe(),this.right,a[0])),Ro(o,o,Ep(fe(),this.up,a[1])),this._setPosition(o),this.triggerUpdate(),this}},{key:"dolly",value:function(r){var i=this.forward,a=za(this.position),o=r*this.dollyingStep,s=this.distance+r*this.dollyingStep;return o=Math.max(Math.min(s,this.maxDistance),this.minDistance)-this.distance,a[0]+=o*i[0],a[1]+=o*i[1],a[2]+=o*i[2],this._setPosition(a),this.type===We.ORBITING||this.type===We.EXPLORING?this._getDistance():this.type===We.TRACKING&&Ro(this.focalPoint,a,this.distanceVector),this.triggerUpdate(),this}},{key:"cancelLandmarkAnimation",value:function(){this.landmarkAnimationID!==void 0&&this.canvas.cancelAnimationFrame(this.landmarkAnimationID)}},{key:"createLandmark",value:function(r){var i,a,o,s,l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=l.position,u=c===void 0?this.position:c,f=l.focalPoint,d=f===void 0?this.focalPoint:f,h=l.roll,p=l.zoom,g=new dt.CameraContribution;g.setType(this.type,void 0),g.setPosition(u[0],(i=u[1])!==null&&i!==void 0?i:this.position[1],(a=u[2])!==null&&a!==void 0?a:this.position[2]),g.setFocalPoint(d[0],(o=d[1])!==null&&o!==void 0?o:this.focalPoint[1],(s=d[2])!==null&&s!==void 0?s:this.focalPoint[2]),g.setRoll(h??this.roll),g.setZoom(p??this.zoom);var y={name:r,matrix:Wb(g.getWorldTransform()),right:za(g.right),up:za(g.up),forward:za(g.forward),position:za(g.getPosition()),focalPoint:za(g.getFocalPoint()),distanceVector:za(g.getDistanceVector()),distance:g.getDistance(),dollyingStep:g.getDollyingStep(),azimuth:g.getAzimuth(),elevation:g.getElevation(),roll:g.getRoll(),relAzimuth:g.relAzimuth,relElevation:g.relElevation,relRoll:g.relRoll,zoom:g.getZoom()};return this.landmarks.push(y),y}},{key:"gotoLandmark",value:function(r){var i=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=tn(r)?this.landmarks.find(function(P){return P.name===r}):r;if(o){var s=Qe(a)?{duration:a}:a,l=s.easing,c=l===void 0?"linear":l,u=s.duration,f=u===void 0?100:u,d=s.easingFunction,h=d===void 0?void 0:d,p=s.onfinish,g=p===void 0?void 0:p,y=s.onframe,m=y===void 0?void 0:y,x=.01;this.cancelLandmarkAnimation();var _=o.position,w=o.focalPoint,O=o.zoom,S=o.roll,E=h||dt.EasingFunction(c),M,A=function(){i.setFocalPoint(w),i.setPosition(_),i.setRoll(S),i.setZoom(O),i.computeMatrix(),i.triggerUpdate(),g==null||g()};if(f===0)return A();var T=function(N){M===void 0&&(M=N);var C=N-M;if(C>=f){A();return}var R=E(C/f),D=fe(),F=fe(),j=1,I=0;Km(D,i.focalPoint,w,R),Km(F,i.position,_,R),I=i.roll*(1-R)+S*R,j=i.zoom*(1-R)+O*R,i.setFocalPoint(D),i.setPosition(F),i.setRoll(I),i.setZoom(j);var $=jS(D,w)+jS(F,_);if($<=x&&O===void 0&&S===void 0)return A();i.computeMatrix(),i.triggerUpdate(),C<f&&(m==null||m(R),i.landmarkAnimationID=i.canvas.requestAnimationFrame(T))};this.canvas.requestAnimationFrame(T)}}}])})(h5);dt.CameraContribution=mQ;/*!
65
+ * @antv/g-web-animations-api
66
+ * @description A simple implementation of Web Animations API.
67
+ * @version 2.1.28
68
+ * @date 7/30/2025, 1:36:24 PM
69
+ * @author AntVis
70
+ * @docs https://g.antv.antgroup.com/
71
+ */var Hy=(function(t){function n(e,r,i,a){var o;return pt(this,n),o=ee(this,n,[e]),o.currentTime=i,o.timelineTime=a,o.target=r,o.type="finish",o.bubbles=!1,o.currentTarget=r,o.defaultPrevented=!1,o.eventPhase=o.AT_TARGET,o.timeStamp=Date.now(),o.currentTime=i,o.timelineTime=a,o}return te(n,t),ht(n)})(f0),bQ=0,xQ=(function(){function t(n,e){var r;pt(this,t),this.currentTimePending=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this._currentTime=0,this._playbackRate=1,this._inTimeline=!0,this.effect=n,n.animation=this,this.timeline=e,this.id="".concat(bQ++),this._inEffect=!!this.effect.update(0),this._totalDuration=Number((r=this.effect)===null||r===void 0?void 0:r.getComputedTiming().endTime),this._holdTime=0,this._paused=!1,this.oldPlayState="idle",this.updatePromises()}return ht(t,[{key:"pending",get:function(){return this._startTime===null&&!this._paused&&this.playbackRate!==0||this.currentTimePending}},{key:"playState",get:function(){return this._idle?"idle":this._isFinished?"finished":this._paused?"paused":"running"}},{key:"ready",get:function(){var e=this;return this.readyPromise||(this.timeline.animationsWithPromises.indexOf(this)===-1&&this.timeline.animationsWithPromises.push(this),this.readyPromise=new Promise(function(r,i){e.resolveReadyPromise=function(){r(e)},e.rejectReadyPromise=function(){i(new Error)}}),this.pending||this.resolveReadyPromise()),this.readyPromise}},{key:"finished",get:function(){var e=this;return this.finishedPromise||(this.timeline.animationsWithPromises.indexOf(this)===-1&&this.timeline.animationsWithPromises.push(this),this.finishedPromise=new Promise(function(r,i){e.resolveFinishedPromise=function(){r(e)},e.rejectFinishedPromise=function(){i(new Error)}}),this.playState==="finished"&&this.resolveFinishedPromise()),this.finishedPromise}},{key:"currentTime",get:function(){return this.updatePromises(),this._idle||this.currentTimePending?null:this._currentTime},set:function(e){if(e=Number(e),!isNaN(e)){if(this.timeline.restart(),!this._paused&&this._startTime!==null){var r;this._startTime=Number((r=this.timeline)===null||r===void 0?void 0:r.currentTime)-e/this.playbackRate}this.currentTimePending=!1,this._currentTime!==e&&(this._idle&&(this._idle=!1,this._paused=!0),this.tickCurrentTime(e,!0),this.timeline.applyDirtiedAnimation(this))}}},{key:"startTime",get:function(){return this._startTime},set:function(e){if(e!==null){if(this.updatePromises(),e=Number(e),isNaN(e)||this._paused||this._idle)return;this._startTime=e,this.tickCurrentTime((Number(this.timeline.currentTime)-this._startTime)*this.playbackRate),this.timeline.applyDirtiedAnimation(this),this.updatePromises()}}},{key:"playbackRate",get:function(){return this._playbackRate},set:function(e){if(e!==this._playbackRate){this.updatePromises();var r=this.currentTime;this._playbackRate=e,this.startTime=null,this.playState!=="paused"&&this.playState!=="idle"&&(this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this)),r!==null&&(this.currentTime=r),this.updatePromises()}}},{key:"_isFinished",get:function(){return!this._idle&&(this._playbackRate>0&&Number(this._currentTime)>=this._totalDuration||this._playbackRate<0&&Number(this._currentTime)<=0)}},{key:"totalDuration",get:function(){return this._totalDuration}},{key:"_needsTick",get:function(){return this.pending||this.playState==="running"||!this._finishedFlag}},{key:"updatePromises",value:function(){var e;if((e=this.effect.target)!==null&&e!==void 0&&e.destroyed)return this.readyPromise=void 0,this.finishedPromise=void 0,!1;var r=this.oldPlayState,i=this.pending?"pending":this.playState;return this.readyPromise&&i!==r&&(i==="idle"?(this.rejectReadyPromise(),this.readyPromise=void 0):r==="pending"?this.resolveReadyPromise():i==="pending"&&(this.readyPromise=void 0)),this.finishedPromise&&i!==r&&(i==="idle"?(this.rejectFinishedPromise(),this.finishedPromise=void 0):i==="finished"?this.resolveFinishedPromise():r==="finished"&&(this.finishedPromise=void 0)),this.oldPlayState=i,this.readyPromise||this.finishedPromise}},{key:"play",value:function(){this.updatePromises(),this._paused=!1,(this._isFinished||this._idle)&&(this.rewind(),this._startTime=null),this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this),this.timeline.animations.indexOf(this)===-1&&this.timeline.animations.push(this),this.updatePromises()}},{key:"pause",value:function(){this.updatePromises(),this.currentTime&&(this._holdTime=this.currentTime),!this._isFinished&&!this._paused&&!this._idle?this.currentTimePending=!0:this._idle&&(this.rewind(),this._idle=!1),this._startTime=null,this._paused=!0,this.updatePromises()}},{key:"finish",value:function(){this.updatePromises(),!this._idle&&(this.currentTime=this._playbackRate>0?this._totalDuration:0,this._startTime=this._totalDuration-this.currentTime,this.currentTimePending=!1,this.timeline.applyDirtiedAnimation(this),this.updatePromises())}},{key:"cancel",value:function(){var e=this;if(this.updatePromises(),!!this._inEffect&&(this._inEffect=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this._currentTime=0,this._startTime=null,this.effect.update(null),this.timeline.applyDirtiedAnimation(this),this.updatePromises(),this.oncancel)){var r=new Hy(null,this,this.currentTime,null);setTimeout(function(){e.oncancel(r)})}}},{key:"reverse",value:function(){this.updatePromises();var e=this.currentTime;this.playbackRate*=-1,this.play(),e!==null&&(this.currentTime=e),this.updatePromises()}},{key:"updatePlaybackRate",value:function(e){this.playbackRate=e}},{key:"targetAnimations",value:function(){var e,r=(e=this.effect)===null||e===void 0?void 0:e.target;return r.getAnimations()}},{key:"markTarget",value:function(){var e=this.targetAnimations();e.indexOf(this)===-1&&e.push(this)}},{key:"unmarkTarget",value:function(){var e=this.targetAnimations(),r=e.indexOf(this);r!==-1&&e.splice(r,1)}},{key:"tick",value:function(e,r){!this._idle&&!this._paused&&(this._startTime===null?r&&(this.startTime=e-this._currentTime/this.playbackRate):this._isFinished||this.tickCurrentTime((e-this._startTime)*this.playbackRate)),r&&(this.currentTimePending=!1,this.fireEvents(e))}},{key:"rewind",value:function(){if(this.playbackRate>=0)this.currentTime=0;else if(this._totalDuration<1/0)this.currentTime=this._totalDuration;else throw new Error("Unable to rewind negative playback rate animation with infinite duration")}},{key:"persist",value:function(){throw new Error(Ge)}},{key:"addEventListener",value:function(e,r,i){throw new Error(Ge)}},{key:"removeEventListener",value:function(e,r,i){throw new Error(Ge)}},{key:"dispatchEvent",value:function(e){throw new Error(Ge)}},{key:"commitStyles",value:function(){throw new Error(Ge)}},{key:"ensureAlive",value:function(){if(this.playbackRate<0&&this.currentTime===0){var e;this._inEffect=!!((e=this.effect)!==null&&e!==void 0&&e.update(-1))}else{var r;this._inEffect=!!((r=this.effect)!==null&&r!==void 0&&r.update(this.currentTime))}!this._inTimeline&&(this._inEffect||!this._finishedFlag)&&(this._inTimeline=!0,this.timeline.animations.push(this))}},{key:"tickCurrentTime",value:function(e,r){e!==this._currentTime&&(this._currentTime=e,this._isFinished&&!r&&(this._currentTime=this._playbackRate>0?this._totalDuration:0),this.ensureAlive())}},{key:"fireEvents",value:function(e){var r=this;if(this._isFinished){if(!this._finishedFlag){if(this.onfinish){var i=new Hy(null,this,this.currentTime,e);setTimeout(function(){r.onfinish&&r.onfinish(i)})}this._finishedFlag=!0}}else{if(this.onframe&&this.playState==="running"){var a=new Hy(null,this,this.currentTime,e);this.onframe(a)}this._finishedFlag=!1}}}])})(),_Q=4,wQ=.001,OQ=1e-7,SQ=10,yu=11,hh=1/(yu-1),EQ=typeof Float32Array=="function",V5=function(n,e){return 1-3*e+3*n},X5=function(n,e){return 3*e-6*n},q5=function(n){return 3*n},Yp=function(n,e,r){return((V5(e,r)*n+X5(e,r))*n+q5(e))*n},K5=function(n,e,r){return 3*V5(e,r)*n*n+2*X5(e,r)*n+q5(e)},kQ=function(n,e,r,i,a){var o,s,l=0;do s=e+(r-e)/2,o=Yp(s,i,a)-n,o>0?r=s:e=s;while(Math.abs(o)>OQ&&++l<SQ);return s},MQ=function(n,e,r,i){for(var a=0;a<_Q;++a){var o=K5(e,r,i);if(o===0)return e;var s=Yp(e,r,i)-n;e-=s/o}return e},Tx=function(n,e,r,i){if(!(n>=0&&n<=1&&r>=0&&r<=1))throw new Error("bezier x values must be in [0, 1] range");if(n===e&&r===i)return function(l){return l};for(var a=EQ?new Float32Array(yu):new Array(yu),o=0;o<yu;++o)a[o]=Yp(o*hh,n,r);var s=function(c){for(var u=0,f=1,d=yu-1;f!==d&&a[f]<=c;++f)u+=hh;--f;var h=(c-a[f])/(a[f+1]-a[f]),p=u+h*hh,g=K5(p,n,r);return g>=wQ?MQ(c,p,n,r):g===0?p:kQ(c,u,u+hh,n,r)};return function(l){return l===0||l===1?l:Yp(s(l),e,i)}},AQ=function(n){return n=n.replace(/([A-Z])/g,function(e){return"-".concat(e.toLowerCase())}),n.charAt(0)==="-"?n.substring(1):n},ph=function(n){return Math.pow(n,2)},vh=function(n){return Math.pow(n,3)},gh=function(n){return Math.pow(n,4)},yh=function(n){return Math.pow(n,5)},mh=function(n){return Math.pow(n,6)},bh=function(n){return 1-Math.cos(n*Math.PI/2)},xh=function(n){return 1-Math.sqrt(1-n*n)},_h=function(n){return n*n*(3*n-2)},wh=function(n){for(var e,r=4;n<((e=Math.pow(2,--r))-1)/11;);return 1/Math.pow(4,3-r)-7.5625*Math.pow((e*3-2)/22-n,2)},Oh=function(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=Ut(e,2),i=r[0],a=i===void 0?1:i,o=r[1],s=o===void 0?.5:o,l=kn(Number(a),1,10),c=kn(Number(s),.1,2);return n===0||n===1?n:-l*Math.pow(2,10*(n-1))*Math.sin((n-1-c/(Math.PI*2)*Math.asin(1/l))*(Math.PI*2)/c)},cu=function(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0,i=Ut(e,4),a=i[0],o=a===void 0?1:a,s=i[1],l=s===void 0?100:s,c=i[2],u=c===void 0?10:c,f=i[3],d=f===void 0?0:f;o=kn(o,.1,1e3),l=kn(l,.1,1e3),u=kn(u,.1,1e3),d=kn(d,.1,1e3);var h=Math.sqrt(l/o),p=u/(2*Math.sqrt(l*o)),g=p<1?h*Math.sqrt(1-p*p):0,y=1,m=p<1?(p*h+-d)/g:-d+h,x=r?r*n/1e3:n;return p<1?x=Math.exp(-x*p*h)*(y*Math.cos(g*x)+m*Math.sin(g*x)):x=(y+m*x)*Math.exp(-x*h),n===0||n===1?n:1-x},Uy=function(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=e,i=Ut(r,2),a=i[0],o=a===void 0?10:a,s=i[1],l=s==="start"?Math.ceil:Math.floor;return l(kn(n,0,1)*o)/o},rk=function(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=Ut(e,4),i=r[0],a=r[1],o=r[2],s=r[3];return Tx(i,a,o,s)(n)},Sh=Tx(.42,0,1,1),ui=function(n){return function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0;return 1-n(1-e,r,i)}},fi=function(n){return function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0;return e<.5?n(e*2,r,i)/2:1-n(e*-2+2,r,i)/2}},di=function(n){return function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0;return e<.5?(1-n(1-e*2,r,i))/2:(n(e*2-1,r,i)+1)/2}},ik={steps:Uy,"step-start":function(n){return Uy(n,[1,"start"])},"step-end":function(n){return Uy(n,[1,"end"])},linear:function(n){return n},"cubic-bezier":rk,ease:function(n){return rk(n,[.25,.1,.25,1])},in:Sh,out:ui(Sh),"in-out":fi(Sh),"out-in":di(Sh),"in-quad":ph,"out-quad":ui(ph),"in-out-quad":fi(ph),"out-in-quad":di(ph),"in-cubic":vh,"out-cubic":ui(vh),"in-out-cubic":fi(vh),"out-in-cubic":di(vh),"in-quart":gh,"out-quart":ui(gh),"in-out-quart":fi(gh),"out-in-quart":di(gh),"in-quint":yh,"out-quint":ui(yh),"in-out-quint":fi(yh),"out-in-quint":di(yh),"in-expo":mh,"out-expo":ui(mh),"in-out-expo":fi(mh),"out-in-expo":di(mh),"in-sine":bh,"out-sine":ui(bh),"in-out-sine":fi(bh),"out-in-sine":di(bh),"in-circ":xh,"out-circ":ui(xh),"in-out-circ":fi(xh),"out-in-circ":di(xh),"in-back":_h,"out-back":ui(_h),"in-out-back":fi(_h),"out-in-back":di(_h),"in-bounce":wh,"out-bounce":ui(wh),"in-out-bounce":fi(wh),"out-in-bounce":di(wh),"in-elastic":Oh,"out-elastic":ui(Oh),"in-out-elastic":fi(Oh),"out-in-elastic":di(Oh),spring:cu,"spring-in":cu,"spring-out":ui(cu),"spring-in-out":fi(cu),"spring-out-in":di(cu)},TQ=function(n){return AQ(n).replace(/^ease-/,"").replace(/(\(|\s).+/,"").toLowerCase().trim()},PQ=function(n){return ik[TQ(n)]||ik.linear},CQ=function(n){return n},LQ=1,NQ=.5,ak=0;function ok(t,n){return function(e){if(e>=1)return 1;var r=1/t;return e+=n*r,e-e%r}}var Eh="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",RQ=new RegExp("cubic-bezier\\(".concat(Eh,",").concat(Eh,",").concat(Eh,",").concat(Eh,"\\)")),IQ=/steps\(\s*(\d+)\s*\)/,DQ=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/;function Px(t){var n=RQ.exec(t);if(n)return Tx.apply(void 0,ce(n.slice(1).map(Number)));var e=IQ.exec(t);if(e)return ok(Number(e[1]),ak);var r=DQ.exec(t);return r?ok(Number(r[1]),{start:LQ,middle:NQ,end:ak}[r[2]]):PQ(t)}function $Q(t){return Math.abs(jQ(t)/(t.playbackRate||1))}function jQ(t){var n;return t.duration===0||t.iterations===0?0:(t.duration==="auto"?0:Number(t.duration))*((n=t.iterations)!==null&&n!==void 0?n:1)}var Z5=0,Cx=1,v0=2,Q5=3;function FQ(t,n,e){if(n===null)return Z5;var r=e.endTime;return n<Math.min(e.delay,r)?Cx:n>=Math.min(e.delay+t+e.endDelay,r)?v0:Q5}function BQ(t,n,e,r,i){switch(r){case Cx:return n==="backwards"||n==="both"?0:null;case Q5:return e-i;case v0:return n==="forwards"||n==="both"?t:null;case Z5:return null}}function zQ(t,n,e,r,i){var a=i;return t===0?n!==Cx&&(a+=e):a+=r/t,a}function WQ(t,n,e,r,i,a){var o=t===1/0?n%1:t%1;return o===0&&e===v0&&r!==0&&(i!==0||a===0)&&(o=1),o}function GQ(t,n,e,r){return t===v0&&n===1/0?1/0:e===1?Math.floor(r)-1:Math.floor(r)}function YQ(t,n,e){var r=t;if(t!=="normal"&&t!=="reverse"){var i=n;t==="alternate-reverse"&&(i+=1),r="normal",i!==1/0&&i%2!==0&&(r="reverse")}return r==="normal"?e:1-e}function HQ(t,n,e){var r=FQ(t,n,e),i=BQ(t,e.fill,n,r,e.delay);if(i===null)return null;var a=e.duration==="auto"?0:e.duration,o=zQ(a,r,e.iterations,i,e.iterationStart),s=WQ(o,e.iterationStart,r,e.iterations,i,a),l=GQ(r,e.iterations,s,o),c=YQ(e.direction,l,s);return e.currentIteration=l,e.progress=c,e.easingFunction(c)}function UQ(t,n,e){var r=VQ(t,n),i=XQ(r,e);return function(a,o){if(o!==null)i.filter(function(l){return o>=l.applyFrom&&o<l.applyTo}).forEach(function(l){var c=o-l.startOffset,u=l.endOffset-l.startOffset,f=u===0?0:c/u;a.setAttribute(l.property,l.interpolation(f),!1,!1)});else for(var s in r)J5(s)&&a.setAttribute(s,null)}}function J5(t){return t!=="offset"&&t!=="easing"&&t!=="composite"&&t!=="computedOffset"}function VQ(t,n){for(var e={},r=0;r<t.length;r++)for(var i in t[r])if(J5(i)){var a={offset:t[r].offset,computedOffset:t[r].computedOffset,easing:t[r].easing,easingFunction:Px(t[r].easing)||n.easingFunction,value:t[r][i]};e[i]=e[i]||[],e[i].push(a)}return e}function XQ(t,n){var e=[];for(var r in t)for(var i=t[r],a=0;a<i.length-1;a++){var o=a,s=a+1,l=i[o].computedOffset,c=i[s].computedOffset,u=l,f=c;a===0&&(u=-1/0,c===0&&(s=o)),a===i.length-2&&(f=1/0,l===1&&(o=s)),e.push({applyFrom:u,applyTo:f,startOffset:i[o].computedOffset,endOffset:i[s].computedOffset,easingFunction:i[o].easingFunction,property:r,interpolation:qQ(r,i[o].value,i[s].value,n)})}return e.sort(function(d,h){return d.startOffset-h.startOffset}),e}var sk=function(n,e,r){return function(i){var a=tL(n,e,i);return Qe(a)?a:r(a)}};function qQ(t,n,e,r){var i=P5[t];if(i&&i.syntax&&i.int){var a=dt.styleValueRegistry.getPropertySyntax(i.syntax);if(a){var o=a.parser,s=o?o(n,r):n,l=o?o(e,r):e,c=a.mixer(s,l,r);if(c){var u=sk.apply(void 0,ce(c));return function(f){return f===0?n:f===1?e:u(f)}}}}return sk(!1,!0,function(f){return f?e:n})}function tL(t,n,e){if(typeof t=="number"&&typeof n=="number")return t*(1-e)+n*e;if(typeof t=="boolean"&&typeof n=="boolean"||typeof t=="string"&&typeof n=="string")return e<.5?t:n;if(Array.isArray(t)&&Array.isArray(n)){for(var r=t.length,i=n.length,a=Math.max(r,i),o=[],s=0;s<a;s++)o.push(tL(t[s<r?s:r-1],n[s<i?s:i-1],e));return o}throw new Error("Mismatched interpolation arguments ".concat(t,":").concat(n))}var KQ=(function(){function t(){pt(this,t),this.delay=0,this.direction="normal",this.duration="auto",this._easing="linear",this.easingFunction=CQ,this.endDelay=0,this.fill="auto",this.iterationStart=0,this.iterations=1,this.currentIteration=null,this.progress=null}return ht(t,[{key:"easing",get:function(){return this._easing},set:function(e){this.easingFunction=Px(e),this._easing=e}}])})();function ZQ(t){var n=[];for(var e in t)if(!(e in["easing","offset","composite"])){var r=t[e];Array.isArray(r)||(r=[r]);for(var i=r.length,a=0;a<i;a++){if(!n[a]){var o={};"offset"in t&&(o.offset=Number(t.offset)),"easing"in t&&(o.easing=t.easing),"composite"in t&&(o.composite=t.composite),n[a]=o}r[a]!==void 0&&r[a]!==null&&(n[a][e]=r[a])}}return n.sort(function(s,l){return(s.computedOffset||0)-(l.computedOffset||0)}),n}function lk(t,n){if(t===null)return[];Array.isArray(t)||(t=ZQ(t));for(var e=t.map(function(l){var c={};n!=null&&n.composite&&(c.composite="auto");for(var u in l){var f=l[u];if(u==="offset"){if(f!==null){if(f=Number(f),!isFinite(f))throw new Error("Keyframe offsets must be numbers.");if(f<0||f>1)throw new Error("Keyframe offsets must be between 0 and 1.");c.computedOffset=f}}else if(u==="composite"&&["replace","add","accumulate","auto"].indexOf(f)===-1)throw new Error("".concat(f," compositing is not supported"));c[u]=f}return c.offset===void 0&&(c.offset=null),c.easing===void 0&&(c.easing=(n==null?void 0:n.easing)||"linear"),c.composite===void 0&&(c.composite="auto"),c}),r=!0,i=-1/0,a=0;a<e.length;a++){var o=e[a].offset;if(Dt(o))r=!1;else{if(o<i)throw new TypeError("Keyframes are not loosely sorted by offset. Sort or specify offsets.");i=o}}e=e.filter(function(l){return Number(l.offset)>=0&&Number(l.offset)<=1});function s(){var l,c=e,u=c.length;if(e[u-1].computedOffset=Number((l=e[u-1].offset)!==null&&l!==void 0?l:1),u>1){var f;e[0].computedOffset=Number((f=e[0].offset)!==null&&f!==void 0?f:0)}for(var d=0,h=Number(e[0].computedOffset),p=1;p<u;p++){var g=e[p].computedOffset;if(!Dt(g)&&!Dt(h)){for(var y=1;y<p-d;y++)e[d+y].computedOffset=h+(Number(g)-h)*y/(p-d);d=p,h=Number(g)}}}return r||s(),e}var QQ="backwards|forwards|both|none".split("|"),JQ="reverse|alternate|alternate-reverse".split("|");function tJ(t,n){var e=new KQ;return typeof t=="number"&&!isNaN(t)?e.duration=t:t!==void 0&&Object.keys(t).forEach(function(r){if(t[r]!==void 0&&t[r]!==null&&t[r]!=="auto"){if((typeof e[r]=="number"||r==="duration")&&(typeof t[r]!="number"||isNaN(t[r]))||r==="fill"&&QQ.indexOf(t[r])===-1||r==="direction"&&JQ.indexOf(t[r])===-1)return;e[r]=t[r]}}),e}function eJ(t,n){return t=nJ(t??{duration:"auto"}),tJ(t)}function nJ(t){return typeof t=="number"&&(isNaN(t)?t={duration:"auto"}:t={duration:t}),t}var rJ=(function(){function t(n,e,r){var i=this;pt(this,t),this.composite="replace",this.iterationComposite="replace",this.target=n,this.timing=eJ(r),this.timing.effect=this,this.timing.activeDuration=$Q(this.timing),this.timing.endTime=Math.max(0,this.timing.delay+this.timing.activeDuration+this.timing.endDelay),this.normalizedKeyframes=lk(e,this.timing),this.interpolations=UQ(this.normalizedKeyframes,this.timing,this.target);var a=dt.globalThis.Proxy;this.computedTiming=a?new a(this.timing,{get:function(s,l){return l==="duration"?s.duration==="auto"?0:s.duration:l==="fill"?s.fill==="auto"?"none":s.fill:l==="localTime"?i.animation&&i.animation.currentTime||null:l==="currentIteration"?!i.animation||i.animation.playState!=="running"?null:s.currentIteration||0:l==="progress"?!i.animation||i.animation.playState!=="running"?null:s.progress||0:s[l]},set:function(){return!0}}):this.timing}return ht(t,[{key:"applyInterpolations",value:function(){this.interpolations(this.target,Number(this.timeFraction))}},{key:"update",value:function(e){return e===null?!1:(this.timeFraction=HQ(this.timing.activeDuration,e,this.timing),this.timeFraction!==null)}},{key:"getKeyframes",value:function(){return this.normalizedKeyframes}},{key:"setKeyframes",value:function(e){this.normalizedKeyframes=lk(e)}},{key:"getComputedTiming",value:function(){return this.computedTiming}},{key:"getTiming",value:function(){return this.timing}},{key:"updateTiming",value:function(e){var r=this;Object.keys(e||{}).forEach(function(i){r.timing[i]=e[i]})}}])})();function ck(t,n){return Number(t.id)-Number(n.id)}var iJ=(function(){function t(n){var e=this;pt(this,t),this.animations=[],this.ticking=!1,this.timelineTicking=!1,this.hasRestartedThisFrame=!1,this.animationsWithPromises=[],this.inTick=!1,this.pendingEffects=[],this.currentTime=null,this.rafId=0,this.rafCallbacks=[],this.webAnimationsNextTick=function(r){e.currentTime=r,e.discardAnimations(),e.animations.length===0?e.timelineTicking=!1:e.requestAnimationFrame(e.webAnimationsNextTick)},this.processRafCallbacks=function(r){var i=e.rafCallbacks;e.rafCallbacks=[],r<Number(e.currentTime)&&(r=Number(e.currentTime)),e.animations.sort(ck),e.animations=e.tick(r,!0,e.animations)[0],i.forEach(function(a){a[1](r)}),e.applyPendingEffects()},this.document=n}return ht(t,[{key:"getAnimations",value:function(){return this.discardAnimations(),this.animations.slice()}},{key:"isTicking",value:function(){return this.inTick}},{key:"play",value:function(e,r,i){var a=new rJ(e,r,i),o=new xQ(a,this);return this.animations.push(o),this.restartWebAnimationsNextTick(),o.updatePromises(),o.play(),o.updatePromises(),o}},{key:"applyDirtiedAnimation",value:function(e){var r=this;if(!this.inTick){e.markTarget();var i=e.targetAnimations();i.sort(ck);var a=this.tick(Number(this.currentTime),!1,i.slice())[1];a.forEach(function(o){var s=r.animations.indexOf(o);s!==-1&&r.animations.splice(s,1)}),this.applyPendingEffects()}}},{key:"restart",value:function(){return this.ticking||(this.ticking=!0,this.requestAnimationFrame(function(){}),this.hasRestartedThisFrame=!0),this.hasRestartedThisFrame}},{key:"destroy",value:function(){this.document.defaultView.cancelAnimationFrame(this.frameId)}},{key:"applyPendingEffects",value:function(){this.pendingEffects.forEach(function(e){e==null||e.applyInterpolations()}),this.pendingEffects=[]}},{key:"updateAnimationsPromises",value:function(){this.animationsWithPromises=this.animationsWithPromises.filter(function(e){return e.updatePromises()})}},{key:"discardAnimations",value:function(){this.updateAnimationsPromises(),this.animations=this.animations.filter(function(e){return e.playState!=="finished"&&e.playState!=="idle"})}},{key:"restartWebAnimationsNextTick",value:function(){this.timelineTicking||(this.timelineTicking=!0,this.requestAnimationFrame(this.webAnimationsNextTick))}},{key:"rAF",value:function(e){var r=this.rafId++;return this.rafCallbacks.length===0&&(this.frameId=this.document.defaultView.requestAnimationFrame(this.processRafCallbacks)),this.rafCallbacks.push([r,e]),r}},{key:"requestAnimationFrame",value:function(e){var r=this;return this.rAF(function(i){r.updateAnimationsPromises(),e(i),r.updateAnimationsPromises()})}},{key:"tick",value:function(e,r,i){var a=this,o,s;this.inTick=!0,this.hasRestartedThisFrame=!1,this.currentTime=e,this.ticking=!1;var l=[],c=[],u=[],f=[];return i.forEach(function(d){d.tick(e,r),d._inEffect?(c.push(d.effect),d.markTarget()):(l.push(d.effect),d.unmarkTarget()),d._needsTick&&(a.ticking=!0);var h=d._inEffect||d._needsTick;d._inTimeline=h,h?u.push(d):f.push(d)}),(o=this.pendingEffects).push.apply(o,l),(s=this.pendingEffects).push.apply(s,c),this.ticking&&this.requestAnimationFrame(function(){}),this.inTick=!1,[u,f]}}])})();dt.EasingFunction=Px;dt.AnimationTimeline=iJ;function Rt(t){return new Hp([t],null,t,t.ownerDocument)}let Hp=class or{constructor(n=null,e=null,r=null,i=null,a=[null,null,null,null,null],o=[],s=[]){this._elements=Array.from(n),this._data=e,this._parent=r,this._document=i,this._enter=a[0],this._update=a[1],this._exit=a[2],this._merge=a[3],this._split=a[4],this._transitions=o,this._facetElements=s}selectAll(n){const e=typeof n=="string"?this._parent.querySelectorAll(n):n;return new or(e,null,this._elements[0],this._document)}selectFacetAll(n){const e=typeof n=="string"?this._parent.querySelectorAll(n):n;return new or(this._elements,null,this._parent,this._document,void 0,void 0,e)}select(n){const e=typeof n=="string"?this._parent.querySelectorAll(n)[0]||null:n;return new or([e],null,e,this._document)}append(n){const e=typeof n=="function"?n:()=>this.createElement(n),r=[];if(this._data!==null){for(let i=0;i<this._data.length;i++){const a=this._data[i],[o,s]=Array.isArray(a)?a:[a,null],l=e(o,i);l.__data__=o,s!==null&&(l.__fromElements__=s),this._parent.appendChild(l),r.push(l)}return new or(r,null,this._parent,this._document)}else{for(let i=0;i<this._elements.length;i++){const a=this._elements[i],o=a.__data__,s=e(o,i);a.appendChild(s),r.push(s)}return new or(r,null,r[0],this._document)}}maybeAppend(n,e,r){const i=this._elements[0],a=i.getElementById(n);if(a)return new or([a],null,this._parent,this._document);const o=typeof e=="string"?this.createElement(e):e();return o.id=n,r&&(o.className=r),i.appendChild(o),new or([o],null,this._parent,this._document)}data(n,e=i=>i,r=()=>null){const i=[],a=[],o=new Set(this._elements),s=[],l=new Set,c=new Map(this._elements.map((h,p)=>[e(h.__data__,p),h])),u=new Map(this._facetElements.map((h,p)=>[e(h.__data__,p),h])),f=Ue(this._elements,h=>r(h.__data__));for(let h=0;h<n.length;h++){const p=n[h],g=e(p,h),y=r(p,h);if(c.has(g)){const m=c.get(g);m.__data__=p,m.__facet__=!1,a.push(m),o.delete(m),c.delete(g)}else if(u.has(g)){const m=u.get(g);m.__data__=p,m.__facet__=!0,a.push(m),u.delete(g)}else if(f.has(g)){const m=f.get(g);s.push([p,m]);for(const x of m)o.delete(x);f.delete(g)}else if(c.has(y)){const m=c.get(y);m.__toData__?m.__toData__.push(p):m.__toData__=[p],l.add(m),o.delete(m)}else i.push(p)}const d=[new or([],i,this._parent,this._document),new or(a,null,this._parent,this._document),new or(o,null,this._parent,this._document),new or([],s,this._parent,this._document),new or(l,null,this._parent,this._document)];return new or(this._elements,null,this._parent,this._document,d)}merge(n){const e=[...this._elements,...n._elements],r=[...this._transitions,...n._transitions];return new or(e,null,this._parent,this._document,void 0,r)}createElement(n){if(this._document)return this._document.createElement(n,{});const e=or.registry[n];return e?new e:rc(`Unknown node type: ${n}`)}join(n=o=>o,e=o=>o,r=o=>o.remove(),i=o=>o,a=o=>o.remove()){const o=n(this._enter),s=e(this._update),l=r(this._exit),c=i(this._merge),u=a(this._split);return s.merge(o).merge(l).merge(c).merge(u)}remove(){for(let n=0;n<this._elements.length;n++){const e=this._transitions[n];if(this._elements[n].__removed__=!0,e){const r=Array.isArray(e)?e:[e];Promise.all(r.map(i=>i.finished)).then(()=>{const i=this._elements[n];i.__removed__&&i.remove()})}else{const r=this._elements[n];r.__removed__&&r.remove()}}return new or([],null,this._parent,this._document,void 0,this._transitions)}each(n){for(let e=0;e<this._elements.length;e++){const r=this._elements[e],i=r.__data__;n(i,e,r)}return this}attr(n,e){const r=typeof e!="function"?()=>e:e;return this.each(function(i,a,o){e!==void 0&&(o[n]=r(i,a,o))})}style(n,e){const r=typeof e!="function"?()=>e:e;return this.each(function(i,a,o){e!==void 0&&(o.style[n]=r(i,a,o))})}transition(n){const e=typeof n!="function"?()=>n:n,{_transitions:r}=this;return this.each(function(i,a,o){r[a]=e(i,a,o)})}on(n,e){return this.each(function(r,i,a){a.addEventListener(n,e)}),this}call(n,...e){return n(this,...e),this}node(){return this._elements[0]}nodes(){return this._elements}transitions(){return this._transitions}parent(){return this._parent}};Hp.registry={g:Qn,rect:Zo,circle:Sa,path:ur,text:ki,ellipse:d0,image:h0,line:nl,polygon:rl,polyline:p0,html:el};function kh(t,n,e){return Math.max(n,Math.min(t,e))}function Up(t,n=10){return typeof t!="number"||Math.abs(t)<1e-15?t:parseFloat(t.toFixed(n))}function Pt(t,n){for(const[e,r]of Object.entries(n))t.style(e,r)}function aJ(t,n){return n.forEach((e,r)=>r===0?t.moveTo(e[0],e[1]):t.lineTo(e[0],e[1])),t.closePath(),t}function oJ(t,n,e){const{arrowSize:r}=e,i=typeof r=="string"?+parseFloat(r)/100*vn(t,n):r,a=Math.PI/6,o=Math.atan2(n[1]-t[1],n[0]-t[0]),s=Math.PI/2-o-a,l=[n[0]-i*Math.sin(s),n[1]-i*Math.cos(s)],c=o-a,u=[n[0]-i*Math.cos(c),n[1]-i*Math.sin(c)];return[l,u]}function df(t,n,e,r,i){const a=Ei(On(r,n))+Math.PI,o=Ei(On(r,e))+Math.PI;return t.arc(r[0],r[1],i,a,o,o-a<0),t}function eL(t,n,e,r="y",i="between",a=!1){const o=(y,m)=>y==="y"||y===!0?m?180:90:m?90:0,s=r==="y"||r===!0?e:n,l=o(r,a),c=Qs(s),[u,f]=qa(c,y=>s[y]),d=new to({domain:[u,f],range:[0,100]}),h=y=>Qe(s[y])&&!Number.isNaN(s[y])?d.map(s[y]):0,p={between:y=>`${t[y]} ${h(y)}%`,start:y=>y===0?`${t[y]} ${h(y)}%`:`${t[y-1]} ${h(y)}%, ${t[y]} ${h(y)}%`,end:y=>y===t.length-1?`${t[y]} ${h(y)}%`:`${t[y]} ${h(y)}%, ${t[y+1]} ${h(y)}%`},g=c.sort((y,m)=>h(y)-h(m)).map(p[i]||p.between).join(",");return`linear-gradient(${l}deg, ${g})`}function g0(t){const[n,e,r,i]=t;return[i,n,e,r]}function il(t,n,e){const[r,i,,a]=Ze(t)?g0(n):n,[o,s]=e,l=t.getCenter(),c=ac(On(r,l)),u=ac(On(i,l)),f=u===c&&o!==s?u+Math.PI*2:u,d=1e-4;return{startAngle:c+d,endAngle:(f-c>=0?f:Math.PI*2+f)-d,innerRadius:vn(a,l),outerRadius:vn(r,l)}}function Lx(t){const{colorAttribute:n,opacityAttribute:e=n}=t;return`${e}Opacity`}function nL(t,n){if(!Ie(t))return"";const e=t.getCenter(),{transform:r}=n;return`translate(${e[0]}, ${e[1]}) ${r||""}`}function Nx(t){if(t.length===1)return t[0];const[[n,e,r=0],[i,a,o=0]]=t;return[(n+i)/2,(e+a)/2,(r+o)/2]}var ip=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};function rL(t,n,e,r,i={}){const{inset:a=0,radius:o=0,insetLeft:s=a,insetTop:l=a,insetRight:c=a,insetBottom:u=a,radiusBottomLeft:f=o,radiusBottomRight:d=o,radiusTopLeft:h=o,radiusTopRight:p=o,minWidth:g=-1/0,maxWidth:y=1/0,minHeight:m=-1/0}=i,x=ip(i,["inset","radius","insetLeft","insetTop","insetRight","insetBottom","radiusBottomLeft","radiusBottomRight","radiusTopLeft","radiusTopRight","minWidth","maxWidth","minHeight"]);if(!Ie(r)&&!i5(r)){const M=!!Ze(r),[A,,T]=M?g0(n):n,[P,N]=A,[C,R]=On(T,A),D=C>0?P:P+C,F=R>0?N:N+R,j=Math.abs(C),I=Math.abs(R),$=D+s,z=F+l,Y=j-(s+c),H=I-(l+u),V=M?kh(Y,m,1/0):kh(Y,g,y),Z=M?kh(H,g,y):kh(H,m,1/0),q=M?$:$-(V-Y)/2,J=M?z-(Z-H)/2:z-(Z-H);return Rt(t.createElement("rect",{})).style("x",q).style("y",J).style("width",V).style("height",Z).style("radius",[h,p,d,f]).call(Pt,x).node()}const{y:_,y1:w}=e,O=r.getCenter(),S=il(r,n,[_,w]),E=vx().cornerRadius(o).padAngle(a*Math.PI/180);return Rt(t.createElement("path",{})).style("d",E(S)).style("transform",`translate(${O[0]}, ${O[1]})`).style("radius",o).style("inset",a).call(Pt,x).node()}const Kf=(t,n)=>{const{colorAttribute:e,opacityAttribute:r="fill",first:i=!0,last:a=!0}=t,o=ip(t,["colorAttribute","opacityAttribute","first","last"]),{coordinate:s,document:l}=n;return(c,u,f)=>{const{color:d,radius:h=0}=f,p=ip(f,["color","radius"]),g=p.lineWidth||1,{stroke:y,radius:m=h,radiusTopLeft:x=m,radiusTopRight:_=m,radiusBottomRight:w=m,radiusBottomLeft:O=m,innerRadius:S=0,innerRadiusTopLeft:E=S,innerRadiusTopRight:M=S,innerRadiusBottomRight:A=S,innerRadiusBottomLeft:T=S,lineWidth:P=e==="stroke"||y?g:0,inset:N=0,insetLeft:C=N,insetRight:R=N,insetBottom:D=N,insetTop:F=N,minWidth:j,maxWidth:I,minHeight:$}=o,z=ip(o,["stroke","radius","radiusTopLeft","radiusTopRight","radiusBottomRight","radiusBottomLeft","innerRadius","innerRadiusTopLeft","innerRadiusTopRight","innerRadiusBottomRight","innerRadiusBottomLeft","lineWidth","inset","insetLeft","insetRight","insetBottom","insetTop","minWidth","maxWidth","minHeight"]),{color:Y=d,opacity:H}=u,V=[i?x:E,i?_:M,a?w:A,a?O:T],Z=["radiusTopLeft","radiusTopRight","radiusBottomRight","radiusBottomLeft"];Ze(s)&&Z.push(Z.shift());const q=Object.assign(Object.assign({radius:m},Object.fromEntries(Z.map((J,rt)=>[J,V[rt]]))),{inset:N,insetLeft:C,insetRight:R,insetBottom:D,insetTop:F,minWidth:j,maxWidth:I,minHeight:$});return Rt(rL(l,c,u,s,q)).call(Pt,p).style("fill","transparent").style(e,Y).style(Lx(t),H).style("lineWidth",P).style("stroke",y===void 0?Y:y).call(Pt,z).node()}};Kf.props={defaultEnterAnimation:"scaleInY",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const al=(t,n)=>Kf(Object.assign({colorAttribute:"fill"},t),n);al.props=Object.assign(Object.assign({},Kf.props),{defaultMarker:"square"});const y0=(t,n)=>Kf(Object.assign({colorAttribute:"stroke"},t),n);y0.props=Object.assign(Object.assign({},Kf.props),{defaultMarker:"hollowSquare"});var uk=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};function sJ(t,n,e,r,i){const[a,o,s,l]=t;if(Ze(r)){if(i){const h=[e?e[1][0]:a[0],a[1]],p=[e?e[2][0]:l[0],l[1]];return[h,o,s,p]}const f=[n?n[0][0]:o[0],o[1]],d=[n?n[3][0]:s[0],s[1]];return[a,f,d,l]}if(i){const f=[a[0],e?e[1][1]:a[1]],d=[l[0],e?e[2][1]:l[1]];return[f,o,s,d]}const c=[o[0],n?n[0][1]:o[1]],u=[s[0],n?n[3][1]:s[1]];return[a,c,u,l]}const lJ=(t,n,e)=>{const r=Math.cos(t)*n,i=Math.sin(t)*n;return{x:r*e,y:i}},Mh=(t,n)=>n/Math.tan(t/2);function cJ(t,n){const[e,r,i,a]=t,[o,s,l,c]=n,u=r[0]-e[0]>i[0]-a[0],f=Math.atan2(Math.abs(r[1]-i[1]),Math.abs(r[0]-i[0])),d=u?[Mh(f,o),Mh(f,s),l,c]:[o,s,Mh(f,l),Mh(f,c)],h=u?1:-1,p=d.map(g=>lJ(f,g,h));return[`M${e[0]+d[0]} ${e[1]}`,`L${r[0]-d[1]} ${r[1]}`,`Q${r[0]} ${r[1]} ${r[0]-p[1].x} ${r[1]+p[1].y}`,`L${i[0]+p[2].x} ${i[1]-p[2].y}`,`Q${i[0]} ${i[1]} ${i[0]-d[2]} ${i[1]}`,`L${a[0]+d[3]} ${a[1]}`,`Q${a[0]} ${a[1]} ${a[0]-p[3].x} ${a[1]-p[3].y}`,`L${e[0]+p[0].x} ${e[1]+p[0].y}`,`Q${e[0]} ${e[1]} ${e[0]+d[0]} ${e[1]}`,"Z"].join(" ")}const Rx=(t,n)=>{const{adjustPoints:e=sJ,radius:r,radiusTopLeft:i=r,radiusTopRight:a=r,radiusBottomRight:o=r,radiusBottomLeft:s=r,innerRadius:l=0,innerRadiusTopLeft:c=l,innerRadiusTopRight:u=l,innerRadiusBottomRight:f=l,innerRadiusBottomLeft:d=l,first:h=!0,last:p=!0}=t,g=uk(t,["adjustPoints","radius","radiusTopLeft","radiusTopRight","radiusBottomRight","radiusBottomLeft","innerRadius","innerRadiusTopLeft","innerRadiusTopRight","innerRadiusBottomRight","innerRadiusBottomLeft","first","last"]),{coordinate:y,document:m}=n;return(x,_,w,O)=>{const{index:S}=_,{color:E}=w,M=uk(w,["color"]),A=O[S+1],T=O[S-1],P=e(x,A,T,y,g.reverse),N=!!Ze(y),[C,R,D,F]=N?g0(P):P,{color:j=E,opacity:I}=_,$=[h?i??c:c,h?a??u:u,p?o??f:f,p?s??d:d],z=$.find(Y=>Y>0)?cJ([C,R,D,F],$):Js().curve(bx)([C,R,D,F]);return Rt(m.createElement("path",{})).call(Pt,M).style("d",z).style("fill",j).style("fillOpacity",I).call(Pt,g).node()}};Rx.props={defaultMarker:"square"};function uJ(t,n,e,r,i){const[a,o,s,l]=t;if(Ze(r)){if(i){const h=[e?e[1][0]:(a[0]+l[0])/2,a[1]],p=[e?e[2][0]:(a[0]+l[0])/2,l[1]];return[h,o,s,p]}const f=[n?n[0][0]:(o[0]+s[0])/2,o[1]],d=[n?n[3][0]:(o[0]+s[0])/2,s[1]];return[a,f,d,l]}if(i){const f=[a[0],e?e[1][1]:(a[1]+l[1])/2],d=[l[0],e?e[2][1]:(a[1]+l[1])/2];return[f,o,s,d]}const c=[o[0],n?n[0][1]:(o[1]+s[1])/2],u=[s[0],n?n[3][1]:(o[1]+s[1])/2];return[a,c,u,l]}const iL=(t,n)=>Rx(Object.assign({adjustPoints:uJ},t),n);iL.props={defaultMarker:"square"};function cc(t){const n=typeof t=="function"?t:t.render;return class extends qf{connectedCallback(){this.draw()}attributeChangedCallback(){this.draw()}draw(){n(this)}}}var fk=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};const fJ=cc(t=>{const{d1:n,d2:e,style1:r,style2:i}=t.attributes,a=t.ownerDocument;Rt(t).maybeAppend("line",()=>a.createElement("path",{})).style("d",n).call(Pt,r),Rt(t).maybeAppend("line1",()=>a.createElement("path",{})).style("d",e).call(Pt,i)});function dJ(t,n){const e=[],r=[];let i=!1,a=null;for(const o of t)!n(o[0])||!n(o[1])?i=!0:(e.push(o),i&&(i=!1,r.push([a,o])),a=o);return[e,r]}const Pi=(t,n)=>{const{curve:e,gradient:r=!1,gradientColor:i="between",defined:a=u=>!Number.isNaN(u)&&u!==void 0&&u!==null,connect:o=!1}=t,s=fk(t,["curve","gradient","gradientColor","defined","connect"]),{coordinate:l,document:c}=n;return(u,f,d)=>{const{color:h,lineWidth:p}=d,g=fk(d,["color","lineWidth"]),{color:y=h,size:m=p,seriesColor:x,seriesX:_,seriesY:w}=f,O=nL(l,f),S=Ze(l),E=r&&x?eL(x,_,w,r,i,S):y,M=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},g),E&&{stroke:E}),m&&{lineWidth:m}),O&&{transform:O}),s);let A;if(Ie(l)){const D=l.getCenter();A=F=>fX().angle((j,I)=>ac(On(F[I],D))).radius((j,I)=>vn(F[I],D)).defined(([j,I])=>a(j)&&a(I)).curve(e)(F)}else A=Js().x(D=>D[0]).y(D=>D[1]).defined(([D,F])=>a(D)&&a(F)).curve(e);const[T,P]=dJ(u,a),N=bt(M,"connect"),C=!!P.length;if(!C||o&&!Object.keys(N).length)return Rt(c.createElement("path",{})).style("d",A(T)||[]).call(Pt,M).node();if(C&&!o)return Rt(c.createElement("path",{})).style("d",A(u)).call(Pt,M).node();const R=D=>D.map(A).join(",");return Rt(new fJ).style("style1",Object.assign(Object.assign({},M),N)).style("style2",M).style("d1",R(P)).style("d2",A(u)).node()}};Pi.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const aL=(t,n)=>{const{coordinate:e}=n;return(...r)=>{const i=Ie(e)?bx:Uf;return Pi(Object.assign({curve:i},t),n)(...r)}};aL.props=Object.assign(Object.assign({},Pi.props),{defaultMarker:"line"});var hJ=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};const oL=(t,n)=>{const e=hJ(t,[]),{coordinate:r}=n;return(...i)=>{const a=Ie(r)?q3:Ze(r)?t5:J3;return Pi(Object.assign({curve:a},e),n)(...i)}};oL.props=Object.assign(Object.assign({},Pi.props),{defaultMarker:"smooth"});const sL=(t,n)=>Pi(Object.assign({curve:r5},t),n);sL.props=Object.assign(Object.assign({},Pi.props),{defaultMarker:"hv"});const lL=(t,n)=>Pi(Object.assign({curve:n5},t),n);lL.props=Object.assign(Object.assign({},Pi.props),{defaultMarker:"vh"});const cL=(t,n)=>Pi(Object.assign({curve:e5},t),n);cL.props=Object.assign(Object.assign({},Pi.props),{defaultMarker:"hvh"});var pJ=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};function vJ(t,n,e,r,i){const a=On(e,n),o=Ei(a),s=o+Math.PI/2,l=[r/2*Math.cos(s),r/2*Math.sin(s)],c=[i/2*Math.cos(s),i/2*Math.sin(s)],u=[i/2*Math.cos(o),i/2*Math.sin(o)],f=[r/2*Math.cos(o),r/2*Math.sin(o)],d=th(n,l),h=th(e,c),p=th(h,u),g=th(e,u),y=On(g,c),m=On(e,c),x=On(n,l),_=On(x,f),w=On(n,f),O=On(d,f);t.moveTo(...d),t.lineTo(...h),t.arcTo(...p,...g,i/2),t.arcTo(...y,...m,i/2),t.lineTo(...x),t.arcTo(..._,...w,r/2),t.arcTo(...O,...d,r/2),t.closePath()}const uL=(t,n)=>{const{document:e}=n;return(r,i,a)=>{const{seriesSize:o,color:s}=i,{color:l}=a,c=pJ(a,["color"]),u=Ai();for(let f=0;f<r.length-1;f++){const d=r[f],h=r[f+1],p=o[f],g=o[f+1];[...d,...h].every(Xe)&&vJ(u,d,h,p,g)}return Rt(e.createElement("path",{})).call(Pt,c).style("fill",s||l).style("d",u.toString()).call(Pt,t).node()}};uL.props=Object.assign(Object.assign({},Pi.props),{defaultMarker:"line"});var gJ=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};const Ix=(t,n,e)=>[["M",t-e,n],["A",e,e,0,1,0,t+e,n],["A",e,e,0,1,0,t-e,n],["Z"]];Ix.style=["fill"];const fL=Ix.bind(void 0);fL.style=["stroke","lineWidth"];const m0=(t,n,e)=>[["M",t-e,n-e],["L",t+e,n-e],["L",t+e,n+e],["L",t-e,n+e],["Z"]];m0.style=["fill"];const dL=m0.bind(void 0);dL.style=["fill"];const hL=m0.bind(void 0);hL.style=["stroke","lineWidth"];const Dx=(t,n,e)=>{const r=e*.618;return[["M",t-r,n],["L",t,n-e],["L",t+r,n],["L",t,n+e],["Z"]]};Dx.style=["fill"];const pL=Dx.bind(void 0);pL.style=["stroke","lineWidth"];const $x=(t,n,e)=>{const r=e*Math.sin(.3333333333333333*Math.PI);return[["M",t-e,n+r],["L",t,n-r],["L",t+e,n+r],["Z"]]};$x.style=["fill"];const vL=$x.bind(void 0);vL.style=["stroke","lineWidth"];const jx=(t,n,e)=>{const r=e*Math.sin(.3333333333333333*Math.PI);return[["M",t-e,n-r],["L",t+e,n-r],["L",t,n+r],["Z"]]};jx.style=["fill"];const gL=jx.bind(void 0);gL.style=["stroke","lineWidth"];const Fx=(t,n,e)=>{const r=e/2*Math.sqrt(3);return[["M",t,n-e],["L",t+r,n-e/2],["L",t+r,n+e/2],["L",t,n+e],["L",t-r,n+e/2],["L",t-r,n-e/2],["Z"]]};Fx.style=["fill"];const yL=Fx.bind(void 0);yL.style=["stroke","lineWidth"];const Bx=(t,n,e)=>{const r=e-1.5;return[["M",t-e,n-r],["L",t+e,n+r],["L",t+e,n-r],["L",t-e,n+r],["Z"]]};Bx.style=["fill"];const mL=Bx.bind(void 0);mL.style=["stroke","lineWidth"];const bL=(t,n,e)=>[["M",t,n+e],["L",t,n-e]];bL.style=["stroke","lineWidth"];const xL=(t,n,e)=>[["M",t-e,n-e],["L",t+e,n+e],["M",t+e,n-e],["L",t-e,n+e]];xL.style=["stroke","lineWidth"];const _L=(t,n,e)=>[["M",t-e/2,n-e],["L",t+e/2,n-e],["M",t,n-e],["L",t,n+e],["M",t-e/2,n+e],["L",t+e/2,n+e]];_L.style=["stroke","lineWidth"];const wL=(t,n,e)=>[["M",t-e,n],["L",t+e,n],["M",t,n-e],["L",t,n+e]];wL.style=["stroke","lineWidth"];const OL=(t,n,e)=>[["M",t-e,n],["L",t+e,n]];OL.style=["stroke","lineWidth"];const zx=(t,n,e)=>[["M",t-e,n],["L",t+e,n]];zx.style=["stroke","lineWidth"];const SL=zx.bind(void 0);SL.style=["stroke","lineWidth"];const EL=(t,n,e)=>[["M",t-e,n],["A",e/2,e/2,0,1,1,t,n],["A",e/2,e/2,0,1,0,t+e,n]];EL.style=["stroke","lineWidth"];const kL=(t,n,e)=>[["M",t-e-1,n-2.5],["L",t,n-2.5],["L",t,n+2.5],["L",t+e+1,n+2.5]];kL.style=["stroke","lineWidth"];const ML=(t,n,e)=>[["M",t-e-1,n+2.5],["L",t,n+2.5],["L",t,n-2.5],["L",t+e+1,n-2.5]];ML.style=["stroke","lineWidth"];const AL=(t,n,e)=>[["M",t-(e+1),n+2.5],["L",t-e/2,n+2.5],["L",t-e/2,n-2.5],["L",t+e/2,n-2.5],["L",t+e/2,n+2.5],["L",t+e+1,n+2.5]];AL.style=["stroke","lineWidth"];const TL=(t,n,e)=>[["M",t-5,n+2.5],["L",t-5,n],["L",t,n],["L",t,n-3],["L",t,n+3],["L",t+6.5,n+3]];TL.style=["stroke","lineWidth"];const hf=new Map([["bowtie",Bx],["cross",xL],["dash",SL],["diamond",Dx],["dot",zx],["hexagon",Fx],["hollowBowtie",mL],["hollowDiamond",pL],["hollowHexagon",yL],["hollowPoint",fL],["hollowSquare",hL],["hollowTriangle",vL],["hollowTriangleDown",gL],["hv",kL],["hvh",AL],["hyphen",OL],["line",bL],["plus",wL],["point",Ix],["rect",dL],["smooth",EL],["square",m0],["tick",_L],["triangleDown",jx],["triangle",$x],["vh",ML],["vhv",TL]]);function yJ(t,n){var{d:e,fill:r,lineWidth:i,path:a,stroke:o,color:s}=n,l=gJ(n,["d","fill","lineWidth","path","stroke","color"]);const c=hf.get(t)||hf.get("point");return(...u)=>new ur({style:Object.assign(Object.assign({},l),{d:c(...u),stroke:c.style.includes("stroke")?s||o:"",fill:c.style.includes("fill")?s||r:"",lineWidth:c.style.includes("lineWidth")?i||i||2:0})})}function mJ(t,n){hf.set(t,n)}function Wx(t){return t.replace(/-(\w)/g,function(n,e){return e.toUpperCase()})}function bJ(t){return t.replace(/([A-Z])/g,"-$1").toLowerCase()}var xJ=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};function PL(t,n,e,r){if(n.length===1)return;const{size:i}=e;if(t==="fixed")return i;if(t==="normal"||a5(r)){const[[a,o],[s,l]]=n,c=Math.abs((s-a)/2),u=Math.abs((l-o)/2);return Math.max(0,(c+u)/2)}return i}const he=(t,n)=>{const{colorAttribute:e,symbol:r,mode:i="auto"}=t,a=xJ(t,["colorAttribute","symbol","mode"]),o=hf.get(Wx(r))||hf.get("point"),{coordinate:s,document:l}=n;return(c,u,f)=>{const{lineWidth:d,color:h}=f,p=a.stroke?d||1:d,{color:g=h,transform:y,opacity:m}=u,[x,_]=Nx(c),O=PL(i,c,u,s)||a.r||f.r;return Rt(l.createElement("path",{})).call(Pt,f).style("fill","transparent").style("d",o(x,_,O)).style("lineWidth",p).style("transform",y).style("transformOrigin",`${x-O} ${_-O}`).style("stroke",g).style(Lx(t),m).style(e,g).call(Pt,a).node()}};he.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const Gx=(t,n)=>he(Object.assign({colorAttribute:"stroke",symbol:"bowtie"},t),n);Gx.props=Object.assign({defaultMarker:"hollowBowtie"},he.props);const Yx=(t,n)=>he(Object.assign({colorAttribute:"stroke",symbol:"diamond"},t),n);Yx.props=Object.assign({defaultMarker:"hollowDiamond"},he.props);const Hx=(t,n)=>he(Object.assign({colorAttribute:"stroke",symbol:"hexagon"},t),n);Hx.props=Object.assign({defaultMarker:"hollowHexagon"},he.props);const Ux=(t,n)=>he(Object.assign({colorAttribute:"stroke",symbol:"point"},t),n);Ux.props=Object.assign({defaultMarker:"hollowPoint"},he.props);const Vx=(t,n)=>he(Object.assign({colorAttribute:"stroke",symbol:"square"},t),n);Vx.props=Object.assign({defaultMarker:"hollowSquare"},he.props);const Xx=(t,n)=>he(Object.assign({colorAttribute:"stroke",symbol:"triangle"},t),n);Xx.props=Object.assign({defaultMarker:"hollowTriangle"},he.props);const qx=(t,n)=>he(Object.assign({colorAttribute:"stroke",symbol:"triangle-down"},t),n);qx.props=Object.assign({defaultMarker:"hollowTriangleDown"},he.props);var _J=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};const CL=(t,n)=>{const{colorAttribute:e,mode:r="auto"}=t,i=_J(t,["colorAttribute","mode"]),{coordinate:a,document:o}=n;return(s,l,c)=>{const{lineWidth:u,color:f}=c,d=i.stroke?u||1:u,{color:h=f,transform:p,opacity:g}=l,[y,m]=Nx(s),_=PL(r,s,l,a)||i.r||c.r;return Rt(o.createElement("circle",{})).call(Pt,c).style("fill","transparent").style("cx",y).style("cy",m).style("r",_).style("lineWidth",d).style("transform",p).style("transformOrigin",`${y} ${m}`).style("stroke",h).style(Lx(t),g).style(e,h).call(Pt,i).node()}},b0=(t,n)=>CL(Object.assign({colorAttribute:"fill"},t),n);b0.props={defaultMarker:"circle",defaultEnterAnimation:"fadeIn",defaultExitAnimation:"fadeOut"};const Kx=(t,n)=>CL(Object.assign({colorAttribute:"stroke"},t),n);Kx.props=Object.assign({defaultMarker:"hollowPoint"},b0.props);const Zx=(t,n)=>he(Object.assign({colorAttribute:"fill",symbol:"bowtie"},t),n);Zx.props=Object.assign({defaultMarker:"bowtie"},he.props);const Qx=(t,n)=>he(Object.assign({colorAttribute:"stroke",symbol:"cross"},t),n);Qx.props=Object.assign({defaultMarker:"cross"},he.props);const Jx=(t,n)=>he(Object.assign({colorAttribute:"fill",symbol:"diamond"},t),n);Jx.props=Object.assign({defaultMarker:"diamond"},he.props);const t2=(t,n)=>he(Object.assign({colorAttribute:"fill",symbol:"hexagon"},t),n);t2.props=Object.assign({defaultMarker:"hexagon"},he.props);const e2=(t,n)=>he(Object.assign({colorAttribute:"stroke",symbol:"hyphen"},t),n);e2.props=Object.assign({defaultMarker:"hyphen"},he.props);const n2=(t,n)=>he(Object.assign({colorAttribute:"stroke",symbol:"line"},t),n);n2.props=Object.assign({defaultMarker:"line"},he.props);const r2=(t,n)=>he(Object.assign({colorAttribute:"stroke",symbol:"plus"},t),n);r2.props=Object.assign({defaultMarker:"plus"},he.props);const i2=(t,n)=>he(Object.assign({colorAttribute:"fill",symbol:"point"},t),n);i2.props=Object.assign({defaultMarker:"point"},he.props);const a2=(t,n)=>he(Object.assign({colorAttribute:"fill",symbol:"square"},t),n);a2.props=Object.assign({defaultMarker:"square"},he.props);const o2=(t,n)=>he(Object.assign({colorAttribute:"stroke",symbol:"tick"},t),n);o2.props=Object.assign({defaultMarker:"tick"},he.props);const s2=(t,n)=>he(Object.assign({colorAttribute:"fill",symbol:"triangle"},t),n);s2.props=Object.assign({defaultMarker:"triangle"},he.props);const l2=(t,n)=>he(Object.assign({colorAttribute:"fill",symbol:"triangle-down"},t),n);l2.props=Object.assign({defaultMarker:"triangleDown"},he.props);var dk=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};const c2=(t,n)=>{const{arrow:e=!0,arrowSize:r="40%"}=t,i=dk(t,["arrow","arrowSize"]),{document:a}=n;return(o,s,l)=>{const{defaultColor:c}=l,u=dk(l,["defaultColor"]),{color:f=c,transform:d}=s,[h,p]=o,g=Ai();if(g.moveTo(...h),g.lineTo(...p),e){const[y,m]=oJ(h,p,{arrowSize:r});g.moveTo(...y),g.lineTo(...p),g.lineTo(...m)}return Rt(a.createElement("path",{})).call(Pt,u).style("d",g.toString()).style("stroke",f).style("transform",d).call(Pt,i).node()}};c2.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};function LL(t,n){n(t),t.children&&t.children.forEach(function(e){e&&LL(e,n)})}function Zf(t){x0(t,!0)}function Qo(t){x0(t,!1)}function x0(t,n){var e=n?"visible":"hidden";LL(t,function(r){r.attr("visibility",e)})}var wJ=(function(t){ln(n,t);function n(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var i=t.apply(this,Lt([],U(e),!1))||this;return i.isMutationObserved=!0,i.addEventListener(re.INSERTED,function(){Qo(i)}),i}return n})(Qn);function NL(t){var n=t.appendChild(new wJ({class:"offscreen"}));return Qo(n),n}function OJ(t){for(var n=t;n;){if(n.className==="offscreen")return!0;n=n.parent}return!1}var u2=(function(t){ln(n,t);function n(e){e===void 0&&(e={});var r=e.style,i=Bn(e,["style"]);return t.call(this,ut({style:ut({text:"",fill:"black",fontFamily:"sans-serif",fontSize:16,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",lineWidth:1,textAlign:"start",textBaseline:"middle"},r)},i))||this}return Object.defineProperty(n.prototype,"offscreenGroup",{get:function(){return this._offscreen||(this._offscreen=NL(this)),this._offscreen},enumerable:!1,configurable:!0}),n.prototype.disconnectedCallback=function(){var e;(e=this._offscreen)===null||e===void 0||e.destroy()},n})(ki);function uc(t){return t*Math.PI/180}function RL(t){return Number((t*180/Math.PI).toPrecision(5))}var fn=(function(){function t(n,e,r,i){n===void 0&&(n=0),e===void 0&&(e=0),r===void 0&&(r=0),i===void 0&&(i=0),this.x=0,this.y=0,this.width=0,this.height=0,this.x=n,this.y=e,this.width=r,this.height=i}return Object.defineProperty(t.prototype,"bottom",{get:function(){return this.y+this.height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"left",{get:function(){return this.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){return this.x+this.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"top",{get:function(){return this.y},enumerable:!1,configurable:!0}),t.fromRect=function(n){return new t(n.x,n.y,n.width,n.height)},t.prototype.toJSON=function(){return{x:this.x,y:this.y,width:this.width,height:this.height,top:this.top,right:this.right,bottom:this.bottom,left:this.left}},t.prototype.isPointIn=function(n,e){return n>=this.left&&n<=this.right&&e>=this.top&&e<=this.bottom},t})();function Wr(t,n){return Xn(t)?t.apply(void 0,Lt([],U(n),!1)):t}var Ci=function(t,n){var e=function(i){return"".concat(n,"-").concat(i)},r=Object.fromEntries(Object.entries(t).map(function(i){var a=U(i,2),o=a[0],s=a[1],l=e(s);return[o,{name:l,class:".".concat(l),id:"#".concat(l),toString:function(){return l}}]}));return Object.assign(r,{prefix:e}),r},SJ=5,IL=function(t,n,e,r){e===void 0&&(e=0),r===void 0&&(r=SJ),Object.entries(n).forEach(function(i){var a=U(i,2),o=a[0],s=a[1],l=t;Object.prototype.hasOwnProperty.call(n,o)&&(s?Ja(s)?(Ja(t[o])||(l[o]={}),e<r?IL(t[o],s,e+1,r):l[o]=n[o]):Cn(s)?(l[o]=[],l[o]=l[o].concat(s)):l[o]=s:l[o]=s)})},Vi=function(t){for(var n=[],e=1;e<arguments.length;e++)n[e-1]=arguments[e];for(var r=0;r<n.length;r+=1)IL(t,n[r]);return t},EJ=function(t){return t!==void 0&&t!=null&&!Number.isNaN(t)},Ah,DL=IG(function(t,n){var e=n.fontSize,r=n.fontFamily,i=n.fontWeight,a=n.fontStyle,o=n.fontVariant;return Ah||(Ah=dt.offscreenCanvasCreator.getOrCreateContext(void 0)),Ah.font=[a,o,i,"".concat(e,"px"),r].join(" "),Ah.measureText(t).width},function(t,n){return[t,Object.values(n||$L(t)).join()].join("")},4096),$L=function(t){var n=t.style.fontFamily||"sans-serif",e=t.style.fontWeight||"normal",r=t.style.fontStyle||"normal",i=t.style.fontVariant,a=t.style.fontSize;return a=typeof a=="object"?a.value:a,{fontSize:a,fontFamily:n,fontWeight:e,fontStyle:r,fontVariant:i}};function jL(t){return t.nodeName==="text"?t:t.nodeName==="g"&&t.children.length===1&&t.children[0].nodeName==="text"?t.children[0]:null}function FL(t,n){var e=jL(t);e&&e.attr(n)}function A1(t,n,e){e===void 0&&(e="..."),FL(t,{wordWrap:!0,wordWrapWidth:n,maxLines:1,textOverflow:e})}function kJ(t,n,e,r){e===void 0&&(e=2),r===void 0&&(r="top"),FL(t,{wordWrap:!0,wordWrapWidth:n,maxLines:e,textBaseline:r})}function BL(t){var n=t.canvas,e=t.touches,r=t.offsetX,i=t.offsetY;if(n){var a=n.x,o=n.y;return[a,o]}if(e){var s=e[0],l=s.clientX,c=s.clientY;return[l,c]}return r&&i?[r,i]:[0,0]}function hk(t){var n=t.nativeEvent,e=t.touches,r=t.clientX,i=t.clientY;if(n)return[n.clientX,n.clientY];if(e){var a=e[0],o=a.clientX,s=a.clientY;return[o,s]}return typeof r=="number"&&typeof i=="number"?[r,i]:[0,0]}function Hs(t){return typeof t=="function"?t():tn(t)||Qe(t)?new u2({style:{text:String(t)}}):t}function MJ(t,n){return typeof t=="function"?t():tn(t)||Qe(t)?new el({style:ut(ut({pointerEvents:"auto"},n),{innerHTML:t})}):t}function AJ(t,n){return t.reduce(function(e,r){return(e[r[n]]=e[r[n]]||[]).push(r),e},{})}function Pr(t,n,e,r,i){return r===void 0&&(r=!0),i===void 0&&(i=function(a){a.node().removeChildren()}),t?e(n):(r&&i(n),null)}function sr(t,n,e,r,i){return r===void 0&&(r=!0),i===void 0&&(i=!1),r&&t===n||i&&t===e?!0:t>n&&t<e}var TJ=function(t,n){return function(e){return t*(1-e)+n*e}};function PJ(t,n){var e=n?n.length:0,r=t?Math.min(e,t.length):0;return function(i){var a=new Array(r),o=new Array(e),s=0;for(s=0;s<r;++s)a[s]=f2(t[s],n[s]);for(;s<e;++s)o[s]=n[s];for(s=0;s<r;++s)o[s]=a[s](i);return o}}function CJ(t,n){t===void 0&&(t={}),n===void 0&&(n={});var e={},r={};return Object.entries(n).forEach(function(i){var a=U(i,2),o=a[0],s=a[1];o in t?e[o]=f2(t[o],s):r[o]=s}),function(i){return Object.entries(e).forEach(function(a){var o=U(a,2),s=o[0],l=o[1];return r[s]=l(i)}),r}}function f2(t,n){return typeof t=="number"&&typeof n=="number"?TJ(t,n):Array.isArray(t)&&Array.isArray(n)?PJ(t,n):typeof t=="object"&&typeof n=="object"?CJ(t,n):(function(e){return t})}function LJ(t,n,e,r){if(!r)return t.attr("__keyframe_data__",e),null;var i=r.duration,a=i===void 0?0:i,o=f2(n,e),s=Math.ceil(+a/16),l=new Array(s).fill(0).map(function(c,u,f){return{__keyframe_data__:o(u/(f.length-1))}});return t.animate(l,ut({fill:"both"},r))}function pk(t){for(var n=1/0,e=1/0,r=-1/0,i=-1/0,a=0;a<t.length;a++){var o=t[a],s=o.x,l=o.y,c=o.width,u=o.height,f=U([s+c,l+u],2),d=f[0],h=f[1];s<n&&(n=s),l<e&&(e=l),d>r&&(r=d),h>i&&(i=h)}return new fn(n,e,r-n,i-e)}var NJ=function(t,n,e){var r=t.width,i=t.height,a=e.flexDirection,o=a===void 0?"row":a;e.flexWrap;var s=e.justifyContent,l=s===void 0?"flex-start":s;e.alignContent;var c=e.alignItems,u=c===void 0?"flex-start":c,f=o==="row",d=o==="row"||o==="column",h=f?d?[1,0]:[-1,0]:d?[0,1]:[0,-1],p=U([0,0],2),g=p[0],y=p[1],m=n.map(function(M){var A,T=M.width,P=M.height,N=U([g,y],2),C=N[0],R=N[1];return A=U([g+T*h[0],y+P*h[1]],2),g=A[0],y=A[1],new fn(C,R,T,P)}),x=pk(m),_={"flex-start":0,"flex-end":f?r-x.width:i-x.height,center:f?(r-x.width)/2:(i-x.height)/2},w=m.map(function(M){var A=M.x,T=M.y,P=fn.fromRect(M);return P.x=f?A+_[l]:A,P.y=f?T:T+_[l],P});pk(w);var O=function(M){var A=U(f?["height",i]:["width",r],2),T=A[0],P=A[1];switch(u){case"flex-start":return 0;case"flex-end":return P-M[T];case"center":return P/2-M[T]/2;default:return 0}},S=w.map(function(M){var A=M.x,T=M.y,P=fn.fromRect(M);return P.x=f?A:A+O(P),P.y=f?T+O(P):T,P}),E=S.map(function(M){var A,T,P=fn.fromRect(M);return P.x+=(A=t.x)!==null&&A!==void 0?A:0,P.y+=(T=t.y)!==null&&T!==void 0?T:0,P});return E},RJ=function(t,n,e){return[]};const IJ=(function(t,n,e){if(n.length===0)return[];var r={flex:NJ,grid:RJ},i=e.display in r?r[e.display]:null;return(i==null?void 0:i.call(null,t,n,e))||[]});function Ya(t,n){return[t[0]*n,t[1]*n]}function mu(t,n){return[t[0]+n[0],t[1]+n[1]]}function Vy(t,n){return[t[0]-n[0],t[1]-n[1]]}function ms(t,n){return[Math.min(t[0],n[0]),Math.min(t[1],n[1])]}function bs(t,n){return[Math.max(t[0],n[0]),Math.max(t[1],n[1])]}function pf(t,n){return Math.sqrt(Math.pow(t[0]-n[0],2)+Math.pow(t[1]-n[1],2))}function zL(t){if(t[0]===0&&t[1]===0)return[0,0];var n=Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2));return[t[0]/n,t[1]/n]}function DJ(t,n){return n?[t[1],-t[0]]:[-t[1],t[0]]}function T1(t,n){return+t.toPrecision(n)}function P1(t,n){var e={},r=Array.isArray(n)?n:[n];for(var i in t)r.includes(i)||(e[i]=t[i]);return e}function $J(t,n,e,r){var i,a=[],o=!!r,s,l,c=[1/0,1/0],u=[-1/0,-1/0],f,d,h;if(o){i=U(r,2),c=i[0],u=i[1];for(var p=0,g=t.length;p<g;p+=1){var y=t[p];c=ms(c,y),u=bs(u,y)}}for(var p=0,m=t.length;p<m;p+=1){var y=t[p];if(p===0)h=y;else if(p===m-1)d=y,a.push(h),a.push(d);else{var x=[p?p-1:m-1,p-1][1];s=t[x],l=t[p+1];var _=[0,0];_=Vy(l,s),_=Ya(_,n);var w=pf(y,s),O=pf(y,l),S=w+O;S!==0&&(w/=S,O/=S);var E=Ya(_,-w),M=Ya(_,O);d=mu(y,E),f=mu(y,M),f=ms(f,bs(l,y)),f=bs(f,ms(l,y)),E=Vy(f,y),E=Ya(E,-w/O),d=mu(y,E),d=ms(d,bs(s,y)),d=bs(d,ms(s,y)),M=Vy(y,d),M=Ya(M,O/w),f=mu(y,M),o&&(d=bs(d,c),d=ms(d,u),f=bs(f,c),f=ms(f,u)),a.push(h),a.push(d),h=f}}return a}function jJ(t,n,e){e===void 0&&(e=[[0,0],[1,1]]);for(var r=!1,i=[],a=0,o=t.length;a<o;a+=2)i.push([t[a],t[a+1]]);for(var s=$J(i,.4,r,e),l=i.length,c=[],u,f,d,a=0;a<l-1;a+=1)u=s[a*2],f=s[a*2+1],d=i[a+1],c.push(["C",u[0],u[1],f[0],f[1],d[0],d[1]]);return c}var FJ=["$el","cx","cy","d","dx","dy","fill","fillOpacity","filter","fontFamily","fontSize","fontStyle","fontVariant","fontWeight","height","img","increasedLineWidthForHitTesting","innerHTML","isBillboard","billboardRotation","isSizeAttenuation","isClosed","isOverflowing","leading","letterSpacing","lineDash","lineHeight","lineWidth","markerEnd","markerEndOffset","markerMid","markerStart","markerStartOffset","maxLines","metrics","miterLimit","offsetX","offsetY","opacity","path","points","r","radius","rx","ry","shadowColor","src","stroke","strokeOpacity","text","textAlign","textBaseline","textDecorationColor","textDecorationLine","textDecorationStyle","textOverflow","textPath","textPathSide","textPathStartOffset","transform","transformOrigin","visibility","width","wordWrap","wordWrapWidth","x","x1","x2","y","y1","y2","z1","z2","zIndex"];function BJ(t){return FJ.includes(t)}function vk(t){var n={};for(var e in t)BJ(e)&&(n[e]=t[e]);return n}function zJ(t,n){if(t.length<=n)return t;for(var e=Math.floor(t.length/n),r=[],i=0;i<t.length;i+=e)r.push(t[i]);return r}function d2(t,n,e){var r=t.getBBox(),i=r.width,a=r.height,o=n/Math.max(i,a);return t.style.transform="scale(".concat(o,")"),o}function WJ(t,n){var e=new Map;return t.forEach(function(r){var i=n(r);e.has(i)||e.set(i,[]),e.get(i).push(r)}),e}function GJ(t){throw new Error(t)}var YJ=(function(){function t(i,a,o,s,l,c,u){i===void 0&&(i=null),a===void 0&&(a=null),o===void 0&&(o=null),s===void 0&&(s=null),l===void 0&&(l=[null,null,null,null,null]),c===void 0&&(c=[]),u===void 0&&(u=[]),n.add(this),this._elements=Array.from(i),this._data=a,this._parent=o,this._document=s,this._enter=l[0],this._update=l[1],this._exit=l[2],this._merge=l[3],this._split=l[4],this._transitions=c,this._facetElements=u}t.prototype.selectAll=function(i){var a=typeof i=="string"?this._parent.querySelectorAll(i):i;return new e(a,null,this._elements[0],this._document)},t.prototype.selectFacetAll=function(i){var a=typeof i=="string"?this._parent.querySelectorAll(i):i;return new e(this._elements,null,this._parent,this._document,void 0,void 0,a)},t.prototype.select=function(i){var a=typeof i=="string"?this._parent.querySelectorAll(i)[0]||null:i;return new e([a],null,a,this._document)},t.prototype.append=function(i){var a=this,o=typeof i=="function"?i:function(){return a.createElement(i)},s=[];if(this._data!==null){for(var l=0;l<this._data.length;l++){var c=this._data[l],u=U(Array.isArray(c)?c:[c,null],2),f=u[0],d=u[1],h=o(f,l);h.__data__=f,d!==null&&(h.__fromElements__=d),this._parent.appendChild(h),s.push(h)}return new e(s,null,this._parent,this._document)}for(var l=0;l<this._elements.length;l++){var p=this._elements[l],f=p.__data__,h=o(f,l);p.appendChild(h),s.push(h)}return new e(s,null,s[0],this._document)},t.prototype.maybeAppend=function(i,a){var o=xy(this,n,"m",r).call(this,i[0]==="#"?i:"#".concat(i),a);return o.attr("id",i),o},t.prototype.maybeAppendByClassName=function(i,a){var o=i.toString(),s=xy(this,n,"m",r).call(this,o[0]==="."?o:".".concat(o),a);return s.attr("className",o),s},t.prototype.maybeAppendByName=function(i,a){var o=xy(this,n,"m",r).call(this,'[name="'.concat(i,'"]'),a);return o.attr("name",i),o},t.prototype.data=function(i,a,o){var s,l;a===void 0&&(a=function(T){return T}),o===void 0&&(o=function(){return null});for(var c=[],u=[],f=new Set(this._elements),d=[],h=new Set,p=new Map(this._elements.map(function(T,P){return[a(T.__data__,P),T]})),g=new Map(this._facetElements.map(function(T,P){return[a(T.__data__,P),T]})),y=WJ(this._elements,function(T){return o(T.__data__)}),m=0;m<i.length;m++){var x=i[m],_=a(x,m),w=o(x,m);if(p.has(_)){var O=p.get(_);O.__data__=x,O.__facet__=!1,u.push(O),f.delete(O),p.delete(_)}else if(g.has(_)){var O=g.get(_);O.__data__=x,O.__facet__=!0,u.push(O),g.delete(_)}else if(y.has(_)){var S=y.get(_);d.push([x,S]);try{for(var E=(s=void 0,$f(S)),M=E.next();!M.done;M=E.next()){var O=M.value;f.delete(O)}}catch(T){s={error:T}}finally{try{M&&!M.done&&(l=E.return)&&l.call(E)}finally{if(s)throw s.error}}y.delete(_)}else if(p.has(w)){var O=p.get(w);O.__toData__?O.__toData__.push(x):O.__toData__=[x],h.add(O),f.delete(O)}else c.push(x)}var A=[new e([],c,this._parent,this._document),new e(u,null,this._parent,this._document),new e(f,null,this._parent,this._document),new e([],d,this._parent,this._document),new e(h,null,this._parent,this._document)];return new e(this._elements,null,this._parent,this._document,A)},t.prototype.merge=function(i){var a=Lt(Lt([],U(this._elements),!1),U(i._elements),!1),o=Lt(Lt([],U(this._transitions),!1),U(i._transitions),!1);return new e(a,null,this._parent,this._document,void 0,o)},t.prototype.createElement=function(i){if(this._document)return this._document.createElement(i,{});var a=e.registry[i];return a?new a:GJ("Unknown node type: ".concat(i))},t.prototype.join=function(i,a,o,s,l){i===void 0&&(i=function(p){return p}),a===void 0&&(a=function(p){return p}),o===void 0&&(o=function(p){return p.remove()}),s===void 0&&(s=function(p){return p}),l===void 0&&(l=function(p){return p.remove()});var c=i(this._enter),u=a(this._update),f=o(this._exit),d=s(this._merge),h=l(this._split);return u.merge(c).merge(f).merge(d).merge(h)},t.prototype.remove=function(){for(var i=function(s){var l=a._elements[s],c=a._transitions[s];c?c.then(function(){return l.remove()}):l.remove()},a=this,o=0;o<this._elements.length;o++)i(o);return new e([],null,this._parent,this._document,void 0,this._transitions)},t.prototype.each=function(i){for(var a=0;a<this._elements.length;a++){var o=this._elements[a],s=o.__data__;i.call(o,s,a)}return this},t.prototype.attr=function(i,a){var o=typeof a!="function"?function(){return a}:a;return this.each(function(s,l){a!==void 0&&(this[i]=o.call(this,s,l))})},t.prototype.style=function(i,a,o){o===void 0&&(o=!0);var s=typeof a!="function"||!o?function(){return a}:a;return this.each(function(l,c){a!==void 0&&(this.style[i]=s.call(this,l,c))})},t.prototype.styles=function(i,a){return i===void 0&&(i={}),a===void 0&&(a=!0),this.each(function(o,s){var l=this;Object.entries(i).forEach(function(c){var u=U(c,2),f=u[0],d=u[1],h=typeof d!="function"||!a?function(){return d}:d;d!==void 0&&l.attr(f,h.call(l,o,s))})})},t.prototype.update=function(i,a){a===void 0&&(a=!0);var o=typeof i!="function"||!a?function(){return i}:i;return this.each(function(s,l){i&&this.update&&this.update(o.call(this,s,l))})},t.prototype.maybeUpdate=function(i,a){a===void 0&&(a=!0);var o=typeof i!="function"||!a?function(){return i}:i;return this.each(function(s,l){i&&this.update&&this.update(o.call(this,s,l))})},t.prototype.transition=function(i){this._transitions;var a=new Array(this._elements.length);return this.each(function(o,s){a[s]=i.call(this,o,s)}),this._transitions=MG(a),this},t.prototype.on=function(i,a){return this.each(function(){this.addEventListener(i,a)}),this},t.prototype.call=function(i){for(var a=[],o=1;o<arguments.length;o++)a[o-1]=arguments[o];return i.call.apply(i,Lt([this._parent,this],U(a),!1)),this},t.prototype.node=function(){return this._elements[0]},t.prototype.nodes=function(){return this._elements},t.prototype.transitions=function(){return this._transitions.filter(function(i){return!!i})},t.prototype.parent=function(){return this._parent};var n,e,r;return e=t,n=new WeakSet,r=function(a,o){var s=this._elements[0],l=s.querySelector(a);if(l)return new e([l],null,this._parent,this._document);var c=typeof o=="string"?this.createElement(o):o();return s.appendChild(c),new e([c],null,this._parent,this._document)},t.registry={g:Qn,rect:Zo,circle:Sa,path:ur,text:u2,ellipse:d0,image:h0,line:nl,polygon:rl,polyline:p0,html:el},t})();function Ht(t){return new YJ([t],null,t,t.ownerDocument)}function HJ(t,n,e){return t.querySelector(n)?Ht(t).select(n):Ht(t).append(e)}function cr(t){if(Qe(t))return[t,t,t,t];if(Cn(t)){var n=t.length;if(n===1)return[t[0],t[0],t[0],t[0]];if(n===2)return[t[0],t[1],t[0],t[1]];if(n===3)return[t[0],t[1],t[2],t[1]];if(n===4)return t}return[0,0,0,0]}function gk(t){var n=t.getLocalBounds(),e=n.min,r=n.max,i=U([e,r],2),a=U(i[0],2),o=a[0],s=a[1],l=U(i[1],2),c=l[0],u=l[1];return{x:o,y:s,width:c-o,height:u-s,left:o,bottom:u,top:s,right:c}}function UJ(t,n){var e=U(t,2),r=e[0],i=e[1],a=U(n,2),o=a[0],s=a[1];return r!==o&&i===s}function VJ(t,n){var e,r,i=n.attributes;try{for(var a=$f(Object.entries(i)),o=a.next();!o.done;o=a.next()){var s=U(o.value,2),l=s[0],c=s[1];l!=="id"&&l!=="className"&&t.attr(l,c)}}catch(u){e={error:u}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(e)throw e.error}}}function h2(t){return t.toString().charAt(0).toUpperCase()+t.toString().slice(1)}function XJ(t){return t.toString().charAt(0).toLowerCase()+t.toString().slice(1)}function qJ(t,n){return"".concat(n).concat(h2(t))}function yk(t,n,e){var r;e===void 0&&(e=!0);var i=n||((r=t.match(/^([a-z][a-z0-9]+)/))===null||r===void 0?void 0:r[0])||"",a=t.replace(new RegExp("^(".concat(i,")")),"");return e?XJ(a):a}function KJ(t,n){Object.entries(n).forEach(function(e){var r=U(e,2),i=r[0],a=r[1];Lt([t],U(t.querySelectorAll(i)),!1).filter(function(o){return o.matches(i)}).forEach(function(o){if(o){var s=o;s.style.cssText+=Object.entries(a).reduce(function(l,c){return"".concat(l).concat(c.join(":"),";")},"")}})})}var Th=function(t,n){if(!(t!=null&&t.startsWith(n)))return!1;var e=t[n.length];return e>="A"&&e<="Z"};function ie(t,n,e){e===void 0&&(e=!1);var r={};return Object.entries(t).forEach(function(i){var a=U(i,2),o=a[0],s=a[1];if(!(o==="className"||o==="class")){if(Th(o,"show")&&Th(yk(o,"show"),n)!==e)o===qJ(n,"show")?r[o]=s:r[o.replace(new RegExp(h2(n)),"")]=s;else if(!Th(o,"show")&&Th(o,n)!==e){var l=yk(o,n);l==="filter"&&typeof s=="function"||(r[l]=s)}}}),r}function sa(t,n){return Object.entries(t).reduce(function(e,r){var i=U(r,2),a=i[0],o=i[1];return a.startsWith("show")?e["show".concat(n).concat(a.slice(4))]=o:e["".concat(n).concat(h2(a))]=o,e},{})}function no(t,n){n===void 0&&(n=["x","y","class","className"]);var e=["transform","transformOrigin","anchor","visibility","pointerEvents","zIndex","cursor","clipPath","clipPathTargets","offsetPath","offsetPathTargets","offsetDistance","draggable","droppable"],r={},i={};return Object.entries(t).forEach(function(a){var o=U(a,2),s=o[0],l=o[1];n.includes(s)||(e.indexOf(s)!==-1?i[s]=l:r[s]=l)}),[r,i]}function ZJ(t,n,e){var r=t.getBBox(),i=r.width,a=r.height,o=U([n,e].map(function(c,u){var f;return c.includes("%")?parseFloat(((f=c.match(/[+-]?([0-9]*[.])?[0-9]+/))===null||f===void 0?void 0:f[0])||"0")/100*(u===0?i:a):c}),2),s=o[0],l=o[1];return[s,l]}function WL(t,n){if(n)try{var e=/translate\(([+-]*[\d]+[%]*),[ ]*([+-]*[\d]+[%]*)\)/g,r=n.replace(e,function(i,a,o){return"translate(".concat(ZJ(t,a,o),")")});t.attr("transform",r)}catch{}}function QJ(t){var n;return((n=t[0])===null||n===void 0?void 0:n.map(function(e,r){return t.map(function(i){return i[r]})}))||[]}var mk=function(t,n){if(n==null){t.innerHTML="";return}t.replaceChildren?Array.isArray(n)?t.replaceChildren.apply(t,Lt([],U(n),!1)):t.replaceChildren(n):(t.innerHTML="",Array.isArray(n)?n.forEach(function(e){return t.appendChild(e)}):t.appendChild(n))};function _0(t){return/\S+-\S+/g.test(t)?t.split("-").map(function(n){return n[0]}):t.length>2?[t[0]]:t.split("")}var JJ=function(t){var n=new DOMParser,e=n.parseFromString(t,"text/html"),r=e.body.firstElementChild;if(console.log(r==null?void 0:r.getClientRects(),11),!r)return 0;var i=r.getAttribute("style")||"",a=Object.fromEntries(i.split(";").map(function(y){return y.trim()}).filter(function(y){return y.includes(":")}).map(function(y){var m=U(y.split(":").map(function(w){return w.trim()}),2),x=m[0],_=m[1];return[x.toLowerCase(),_]})),o=function(y){if(!y)return 0;var m=y.match(/([\d.]+)px/);return m?parseFloat(m[1]):0};if(a.height)return o(a.height);var s=o(a["font-size"])||16,l=a["line-height"],c;!l||l==="normal"?c=1.2*s:l.endsWith("px")?c=o(l):/^[\d.]+$/.test(l)?c=parseFloat(l)*s:c=s;var u=o(a["padding-top"]),f=o(a["padding-bottom"]);if(a.padding){var d=a.padding.split(/\s+/).map(o);d.length===1||d.length===2?(u=d[0],f=d[0]):(d.length===3||d.length===4)&&(u=d[0],f=d[2])}var h=o(a["border-top-width"]),p=o(a["border-bottom-width"]);if(a.border){var g=a.border.match(/([\d.]+)px/);g&&(h=parseFloat(g[1]),p=parseFloat(g[1]))}if(a["border-width"]){var d=a["border-width"].split(/\s+/).map(o);d.length===1||d.length===2?(h=d[0],p=d[0]):(d.length===3||d.length===4)&&(h=d[0],p=d[2])}return c+u+f+h+p};function ttt(){x0(this,this.attributes.visibility!=="hidden")}var Jn=(function(t){ln(n,t);function n(e,r){r===void 0&&(r={});var i=t.call(this,Vi({},{style:r},e))||this;return i.initialized=!1,i._defaultOptions=r,i}return Object.defineProperty(n.prototype,"offscreenGroup",{get:function(){return this._offscreen||(this._offscreen=NL(this)),this._offscreen},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"defaultOptions",{get:function(){return this._defaultOptions},enumerable:!1,configurable:!0}),n.prototype.connectedCallback=function(){this.render(this.attributes,this),this.bindEvents(this.attributes,this),this.initialized=!0},n.prototype.disconnectedCallback=function(){var e;(e=this._offscreen)===null||e===void 0||e.destroy()},n.prototype.attributeChangedCallback=function(e){e==="visibility"&&ttt.call(this)},n.prototype.update=function(e,r){var i;return this.attr(Vi({},this.attributes,e||{})),(i=this.render)===null||i===void 0?void 0:i.call(this,this.attributes,this,r)},n.prototype.clear=function(){this.removeChildren()},n.prototype.bindEvents=function(e,r){},n.prototype.getSubShapeStyle=function(e){e.x,e.y,e.transform,e.transformOrigin,e.class,e.className,e.zIndex;var r=Bn(e,["x","y","transform","transformOrigin","class","className","zIndex"]);return r},n})(qf),GL=function(t,n,e){return[["M",t-e,n],["A",e,e,0,1,0,t+e,n],["A",e,e,0,1,0,t-e,n],["Z"]]},ett=GL,ntt=function(t,n,e){return[["M",t-e,n-e],["L",t+e,n-e],["L",t+e,n+e],["L",t-e,n+e],["Z"]]},rtt=function(t,n,e){return[["M",t-e,n],["L",t,n-e],["L",t+e,n],["L",t,n+e],["Z"]]},itt=function(t,n,e){var r=e*Math.sin(.3333333333333333*Math.PI);return[["M",t-e,n+r],["L",t,n-r],["L",t+e,n+r],["Z"]]},att=function(t,n,e){var r=e*Math.sin(.3333333333333333*Math.PI);return[["M",t-e,n-r],["L",t+e,n-r],["L",t,n+r],["Z"]]},ott=function(t,n,e){var r=e/2*Math.sqrt(3);return[["M",t,n-e],["L",t+r,n-e/2],["L",t+r,n+e/2],["L",t,n+e],["L",t-r,n+e/2],["L",t-r,n-e/2],["Z"]]},stt=function(t,n,e){var r=e-1.5;return[["M",t-e,n-r],["L",t+e,n+r],["L",t+e,n-r],["L",t-e,n+r],["Z"]]},YL=function(t,n,e){return[["M",t,n+e],["L",t,n-e]]},ltt=function(t,n,e){return[["M",t-e,n-e],["L",t+e,n+e],["M",t+e,n-e],["L",t-e,n+e]]},ctt=function(t,n,e){return[["M",t-e/2,n-e],["L",t+e/2,n-e],["M",t,n-e],["L",t,n+e],["M",t-e/2,n+e],["L",t+e/2,n+e]]},utt=function(t,n,e){return[["M",t-e,n],["L",t+e,n],["M",t,n-e],["L",t,n+e]]},ftt=function(t,n,e){return[["M",t-e,n],["L",t+e,n]]},HL=function(t,n,e){return[["M",t-e,n],["L",t+e,n]]},dtt=HL,htt=function(t,n,e){return[["M",t-e,n],["A",e/2,e/2,0,1,1,t,n],["A",e/2,e/2,0,1,0,t+e,n]]},ptt=function(t,n,e){return[["M",t-e-1,n-2.5],["L",t,n-2.5],["L",t,n+2.5],["L",t+e+1,n+2.5]]},vtt=function(t,n,e){return[["M",t-e-1,n+2.5],["L",t,n+2.5],["L",t,n-2.5],["L",t+e+1,n-2.5]]},gtt=function(t,n,e){return[["M",t-(e+1),n+2.5],["L",t-e/2,n+2.5],["L",t-e/2,n-2.5],["L",t+e/2,n-2.5],["L",t+e/2,n+2.5],["L",t+e+1,n+2.5]]};function ytt(t,n){return[["M",t-5,n+2.5],["L",t-5,n],["L",t,n],["L",t,n-3],["L",t,n+3],["L",t+6.5,n+3]]}var mtt=function(t,n,e){return[["M",t-e,n-e],["L",t+e,n],["L",t-e,n+e],["Z"]]},btt=function(t,n,e){var r=e,i=e*.2,a=e*.7;return[["M",t-r,n],["A",r,r,0,1,0,t+r,n],["A",r,r,0,1,0,t-r,n],["Z"],["M",t-a,n],["L",t-i,n],["M",t+i,n],["L",t+a,n],["M",t,n-a],["L",t,n-i],["M",t,n+i],["L",t,n+a]]};function xtt(t){var n="default";if(If(t)&&t instanceof Image)n="image";else if(Xn(t))n="symbol";else if(tn(t)){var e=new RegExp("data:(image|text)");t.match(e)?n="base64":/^(https?:\/\/(([a-zA-Z0-9]+-?)+[a-zA-Z0-9]+\.)+[a-zA-Z]+)(:\d+)?(\/.*)?(\?.*)?(#.*)?$/.test(t)?n="url":n="symbol"}return n}function _tt(t){var n=xtt(t);return["base64","url","image"].includes(n)?"image":t&&n==="symbol"?"path":null}var _e=(function(t){ln(n,t);function n(){return t!==null&&t.apply(this,arguments)||this}return n.prototype.render=function(e,r){var i=e.x,a=i===void 0?0:i,o=e.y,s=o===void 0?0:o,l=this.getSubShapeStyle(e),c=l.symbol,u=l.size,f=u===void 0?16:u,d=Bn(l,["symbol","size"]),h=_tt(c);Pr(!!h,Ht(r),function(p){p.maybeAppendByClassName("marker",h).attr("className","marker ".concat(h,"-marker")).call(function(g){if(h==="image"){var y=f*2;g.styles({img:c,width:y,height:y,x:a-f,y:s-f})}else{var y=f/2,m=Xn(c)?c:n.getSymbol(c);g.styles(ut({d:m==null?void 0:m(a,s,y)},d))}})})},n.MARKER_SYMBOL_MAP=new Map,n.registerSymbol=function(e,r){n.MARKER_SYMBOL_MAP.set(e,r)},n.getSymbol=function(e){return n.MARKER_SYMBOL_MAP.get(e)},n.getSymbols=function(){return Array.from(n.MARKER_SYMBOL_MAP.keys())},n})(Jn);_e.registerSymbol("cross",ltt);_e.registerSymbol("hyphen",ftt);_e.registerSymbol("line",YL);_e.registerSymbol("plus",utt);_e.registerSymbol("tick",ctt);_e.registerSymbol("circle",GL);_e.registerSymbol("point",ett);_e.registerSymbol("bowtie",stt);_e.registerSymbol("hexagon",ott);_e.registerSymbol("square",ntt);_e.registerSymbol("diamond",rtt);_e.registerSymbol("triangle",itt);_e.registerSymbol("triangle-down",att);_e.registerSymbol("line",YL);_e.registerSymbol("dot",HL);_e.registerSymbol("dash",dtt);_e.registerSymbol("smooth",htt);_e.registerSymbol("hv",ptt);_e.registerSymbol("vh",vtt);_e.registerSymbol("hvh",gtt);_e.registerSymbol("vhv",ytt);_e.registerSymbol("focus",btt);function Vp(t,...n){return n.reduce((e,r)=>i=>e(r(i)),t)}function C1(t,n){return n-t?e=>(e-t)/(n-t):e=>.5}function wtt(t,n){const e=n<t?n:t,r=t>n?t:n;return i=>Math.min(Math.max(e,i),r)}function Ott(t,n,e,r,i){let a=e,o=r||t.length;const s=(l=>l);for(;a<o;){const l=Math.floor((a+o)/2);s(t[l])>n?o=l:a=l+1}return a}const bk=Math.sqrt(50),xk=Math.sqrt(10),_k=Math.sqrt(2);function ap(t,n,e){const r=(n-t)/Math.max(0,e),i=Math.floor(Math.log(r)/Math.LN10),a=r/10**i;return i>=0?(a>=bk?10:a>=xk?5:a>=_k?2:1)*10**i:-(10**-i)/(a>=bk?10:a>=xk?5:a>=_k?2:1)}const Stt=(t,n,e=5)=>{const r=[t,n];let i=0,a=r.length-1,o=r[i],s=r[a],l;return s<o&&([o,s]=[s,o],[i,a]=[a,i]),l=ap(o,s,e),l>0?(o=Math.floor(o/l)*l,s=Math.ceil(s/l)*l,l=ap(o,s,e)):l<0&&(o=Math.ceil(o*l)/l,s=Math.floor(s*l)/l,l=ap(o,s,e)),l>0?(r[i]=Math.floor(o/l)*l,r[a]=Math.ceil(s/l)*l):l<0&&(r[i]=Math.ceil(o*l)/l,r[a]=Math.floor(s*l)/l),r};function wk(t){return!Be(t)&&!BP(t)&&!Number.isNaN(t)}function Xy(t,n,e){let r=e;return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(n-t)*6*r:r<1/2?n:r<2/3?t+(n-t)*(2/3-r)*6:t}function Ett(t){const n=t[0]/360,e=t[1]/100,r=t[2]/100,i=t[3];if(e===0)return[r*255,r*255,r*255,i];const a=r<.5?r*(1+e):r+e-r*e,o=2*r-a,s=Xy(o,a,n+1/3),l=Xy(o,a,n),c=Xy(o,a,n-1/3);return[s*255,l*255,c*255,i]}function Ok(t){const n=PC.get(t);if(!n)return null;const{model:e,value:r}=n;return e==="rgb"?r:e==="hsl"?Ett(r):null}const Xp=(t,n)=>e=>t*(1-e)+n*e,ktt=(t,n)=>{const e=Ok(t),r=Ok(n);return e===null||r===null?e?()=>t:()=>n:i=>{const a=new Array(4);for(let u=0;u<4;u+=1){const f=e[u],d=r[u];a[u]=f*(1-i)+d*i}const[o,s,l,c]=a;return`rgba(${Math.round(o)}, ${Math.round(s)}, ${Math.round(l)}, ${c})`}},Mtt=(t,n)=>typeof t=="number"&&typeof n=="number"?Xp(t,n):typeof t=="string"&&typeof n=="string"?ktt(t,n):()=>t,Att=(t,n)=>{const e=Xp(t,n);return r=>Math.round(e(r))};function Sk({map:t,initKey:n},e){const r=n(e);return t.has(r)?t.get(r):e}function Ttt({map:t,initKey:n},e){const r=n(e);return t.has(r)?t.get(r):(t.set(r,e),e)}function Ptt({map:t,initKey:n},e){const r=n(e);return t.has(r)&&(e=t.get(r),t.delete(r)),e}function Ctt(t){return typeof t=="object"?t.valueOf():t}class Ek extends Map{constructor(n){if(super(),this.map=new Map,this.initKey=Ctt,n!==null)for(const[e,r]of n)this.set(e,r)}get(n){return super.get(Sk({map:this.map,initKey:this.initKey},n))}has(n){return super.has(Sk({map:this.map,initKey:this.initKey},n))}set(n,e){return super.set(Ttt({map:this.map,initKey:this.initKey},n),e)}delete(n){return super.delete(Ptt({map:this.map,initKey:this.initKey},n))}}let UL=class{constructor(n){this.options=at({},this.getDefaultOptions()),this.update(n)}getOptions(){return this.options}update(n={}){this.options=at({},this.options,n),this.rescale(n)}rescale(n){}};const w0=Symbol("defaultUnknown");function kk(t,n,e){for(let r=0;r<n.length;r+=1)t.has(n[r])||t.set(e(n[r]),r)}function Mk(t){const{value:n,from:e,to:r,mapper:i,notFoundReturn:a}=t;let o=i.get(n);if(o===void 0){if(a!==w0)return a;o=e.push(n)-1,i.set(n,o)}return r[o%r.length]}function Ak(t){return t instanceof Date?n=>`${n}`:typeof t=="object"?n=>JSON.stringify(n):n=>n}let Ltt=class VL extends UL{getDefaultOptions(){return{domain:[],range:[],unknown:w0}}constructor(n){super(n)}map(n){return this.domainIndexMap.size===0&&kk(this.domainIndexMap,this.getDomain(),this.domainKey),Mk({value:this.domainKey(n),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(n){return this.rangeIndexMap.size===0&&kk(this.rangeIndexMap,this.getRange(),this.rangeKey),Mk({value:this.rangeKey(n),mapper:this.rangeIndexMap,from:this.getRange(),to:this.getDomain(),notFoundReturn:this.options.unknown})}rescale(n){const[e]=this.options.domain,[r]=this.options.range;if(this.domainKey=Ak(e),this.rangeKey=Ak(r),!this.rangeIndexMap){this.rangeIndexMap=new Map,this.domainIndexMap=new Map;return}(!n||n.range)&&this.rangeIndexMap.clear(),(!n||n.domain||n.compare)&&(this.domainIndexMap.clear(),this.sortedDomain=void 0)}clone(){return new VL(this.options)}getRange(){return this.options.range}getDomain(){if(this.sortedDomain)return this.sortedDomain;const{domain:n,compare:e}=this.options;return this.sortedDomain=e?[...n].sort(e):n,this.sortedDomain}};function Ntt(t){const n=Math.min(...t);return t.map(e=>e/n)}function Rtt(t,n){const e=t.length,r=n-e;return r>0?[...t,...new Array(r).fill(1)]:r<0?t.slice(0,n):t}function Itt(t){return Math.round(t*1e12)/1e12}function Dtt(t){const{domain:n,range:e,paddingOuter:r,paddingInner:i,flex:a,round:o,align:s}=t,l=n.length,c=Rtt(a,l),[u,f]=e,d=f-u,h=2/l*r+1-1/l*i,p=d/h,g=p*i/l,y=p-l*g,m=Ntt(c),x=m.reduce((N,C)=>N+C),_=y/x,w=new Ek(n.map((N,C)=>{const R=m[C]*_;return[N,o?Math.floor(R):R]})),O=new Ek(n.map((N,C)=>{const D=m[C]*_+g;return[N,o?Math.floor(D):D]})),S=Array.from(O.values()).reduce((N,C)=>N+C),M=(d-(S-S/l*i))*s,A=u+M;let T=o?Math.round(A):A;const P=new Array(l);for(let N=0;N<l;N+=1){P[N]=Itt(T);const C=n[N];T+=O.get(C)}return{valueBandWidth:w,valueStep:O,adjustedRange:P}}function $tt(t){var n;const{domain:e}=t,r=e.length;if(r===0)return{valueBandWidth:void 0,valueStep:void 0,adjustedRange:[]};if(!!(!((n=t.flex)===null||n===void 0)&&n.length))return Dtt(t);const{range:a,paddingOuter:o,paddingInner:s,round:l,align:c}=t;let u,f,d=a[0];const p=a[1]-d,g=o*2,y=r-s;u=p/Math.max(1,g+y),l&&(u=Math.floor(u)),d+=(p-u*(r-s))*c,f=u*(1-s),l&&(d=Math.round(d),f=Math.round(f));const m=new Array(r).fill(0).map((x,_)=>d+_*u);return{valueStep:u,valueBandWidth:f,adjustedRange:m}}let XL=class qL extends Ltt{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:w0,flex:[]}}constructor(n){super(n)}clone(){return new qL(this.options)}getStep(n){return this.valueStep===void 0?1:typeof this.valueStep=="number"?this.valueStep:n===void 0?Array.from(this.valueStep.values())[0]:this.valueStep.get(n)}getBandWidth(n){return this.valueBandWidth===void 0?1:typeof this.valueBandWidth=="number"?this.valueBandWidth:n===void 0?Array.from(this.valueBandWidth.values())[0]:this.valueBandWidth.get(n)}getRange(){return this.adjustedRange}getPaddingInner(){const{padding:n,paddingInner:e}=this.options;return n>0?n:e}getPaddingOuter(){const{padding:n,paddingOuter:e}=this.options;return n>0?n:e}rescale(){super.rescale();const{align:n,domain:e,range:r,round:i,flex:a}=this.options,{adjustedRange:o,valueBandWidth:s,valueStep:l}=$tt({align:n,range:r,round:i,flex:a,paddingInner:this.getPaddingInner(),paddingOuter:this.getPaddingOuter(),domain:e});this.valueStep=l,this.valueBandWidth=s,this.adjustedRange=o}};const jtt=(t,n,e)=>{let r,i,a=t,o=n;if(a===o&&e>0)return[a];let s=ap(a,o,e);if(s===0||!Number.isFinite(s))return[];if(s>0){a=Math.ceil(a/s),o=Math.floor(o/s),i=new Array(r=Math.ceil(o-a+1));for(let l=0;l<r;l+=1)i[l]=(a+l)*s}else{s=-s,a=Math.ceil(a*s),o=Math.floor(o*s),i=new Array(r=Math.ceil(o-a+1));for(let l=0;l<r;l+=1)i[l]=(a+l)/s}return i},Ftt=(t,n,e)=>{const[r,i]=t,[a,o]=n;let s,l;return r<i?(s=C1(r,i),l=e(a,o)):(s=C1(i,r),l=e(o,a)),Vp(l,s)},Btt=(t,n,e)=>{const r=Math.min(t.length,n.length)-1,i=new Array(r),a=new Array(r),o=t[0]>t[r],s=o?[...t].reverse():t,l=o?[...n].reverse():n;for(let c=0;c<r;c+=1)i[c]=C1(s[c],s[c+1]),a[c]=e(l[c],l[c+1]);return c=>{const u=Ott(t,c,1,r)-1,f=i[u],d=a[u];return Vp(d,f)(c)}},Tk=(t,n,e,r)=>(Math.min(t.length,n.length)>2?Btt:Ftt)(t,n,r?Att:e);let ztt=class extends UL{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:Xp,tickCount:5}}map(n){return wk(n)?this.output(n):this.options.unknown}invert(n){return wk(n)?this.input(n):this.options.unknown}nice(){if(!this.options.nice)return;const[n,e,r,...i]=this.getTickMethodOptions();this.options.domain=this.chooseNice()(n,e,r,...i)}getTicks(){const{tickMethod:n}=this.options,[e,r,i,...a]=this.getTickMethodOptions();return n(e,r,i,...a)}getTickMethodOptions(){const{domain:n,tickCount:e}=this.options,r=n[0],i=n[n.length-1];return[r,i,e]}chooseNice(){return Stt}rescale(){this.nice();const[n,e]=this.chooseTransforms();this.composeOutput(n,this.chooseClamp(n)),this.composeInput(n,e,this.chooseClamp(e))}chooseClamp(n){const{clamp:e,range:r}=this.options,i=this.options.domain.map(n),a=Math.min(i.length,r.length);return e?wtt(i[0],i[a-1]):_a}composeOutput(n,e){const{domain:r,range:i,round:a,interpolate:o}=this.options,s=Tk(r.map(n),i,o,a);this.output=Vp(s,e,n)}composeInput(n,e,r){const{domain:i,range:a}=this.options,o=Tk(a,i.map(n),Xp);this.input=Vp(e,r,o)}},nr=class KL extends ztt{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:Mtt,tickMethod:jtt,tickCount:5}}chooseTransforms(){return[_a,_a]}clone(){return new KL(this.options)}},Wtt=class ZL extends XL{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,padding:0,unknown:w0,paddingInner:1,paddingOuter:0}}constructor(n){super(n)}getPaddingInner(){return 1}clone(){return new ZL(this.options)}update(n){super.update(n)}getPaddingOuter(){return this.options.padding}};var Gtt=(function(t){ln(n,t);function n(e){var r=this,i=e.style,a=Bn(e,["style"]);return r=t.call(this,at({},{type:"column"},ut({style:i},a)))||this,r.columnsGroup=new Qn({name:"columns"}),r.appendChild(r.columnsGroup),r.render(),r}return n.prototype.render=function(){var e=this.attributes,r=e.columns,i=e.x,a=e.y;this.columnsGroup.style.transform="translate(".concat(i,", ").concat(a,")"),Ht(this.columnsGroup).selectAll(".column").data(r.flat()).join(function(o){return o.append("rect").attr("className","column").each(function(s){this.attr(s)})},function(o){return o.each(function(s){this.attr(s)})},function(o){return o.remove()})},n.prototype.update=function(e){this.attr(Vi({},this.attributes,e)),this.render()},n.prototype.clear=function(){this.removeChildren()},n})(nn),Ytt=(function(t){ln(n,t);function n(e){var r=this,i=e.style,a=Bn(e,["style"]);return r=t.call(this,at({},{type:"lines"},ut({style:i},a)))||this,r.linesGroup=r.appendChild(new Qn),r.areasGroup=r.appendChild(new Qn),r.render(),r}return n.prototype.render=function(){var e=this.attributes,r=e.lines,i=e.areas,a=e.x,o=e.y;this.style.transform="translate(".concat(a,", ").concat(o,")"),r&&this.renderLines(r),i&&this.renderAreas(i)},n.prototype.clear=function(){this.linesGroup.removeChildren(),this.areasGroup.removeChildren()},n.prototype.update=function(e){this.attr(Vi({},this.attributes,e)),this.render()},n.prototype.renderLines=function(e){Ht(this.linesGroup).selectAll(".line").data(e).join(function(r){return r.append("path").attr("className","line").each(function(i){this.attr(i)})},function(r){return r.each(function(i){this.attr(i)})},function(r){return r.remove()})},n.prototype.renderAreas=function(e){Ht(this.linesGroup).selectAll(".area").data(e).join(function(r){return r.append("path").attr("className","area").each(function(i){this.attr(i)})},function(r){return r.each(function(i){this.style(i)})},function(r){return r.remove()})},n})(nn);function Htt(t,n){var e,r=n.x,i=n.y,a=U(i.getOptions().range||[0,0],2),o=a[0],s=a[1];return s>o&&(e=U([o,s],2),s=e[0],o=e[1]),t.map(function(l){var c=l.map(function(u,f){return[r.map(f),kn(i.map(u),s,o)]});return c})}function vf(t,n){n===void 0&&(n=!1);var e=n?t.length-1:0,r=t.map(function(i,a){return Lt([a===e?"M":"L"],U(i),!1)});return n?r.reverse():r}function qp(t,n){if(n===void 0&&(n=!1),t.length<=2)return vf(t);for(var e=[],r=t.length,i=0;i<r;i+=1){var a=n?t[r-i-1]:t[i];Zu(a,e.slice(-2))||e.push.apply(e,Lt([],U(a),!1))}var o=jJ(e);return n?o.unshift(Lt(["M"],U(t[r-1]),!1)):o.unshift(Lt(["M"],U(t[0]),!1)),o}function p2(t,n,e){var r=Ku(t);return r.push(["L",n,e],["L",0,e],["Z"]),r}function Utt(t,n,e,r){return t.map(function(i){return p2(n?qp(i):vf(i),e,r)})}function Vtt(t,n,e){for(var r=[],i=t.length-1;i>=0;i-=1){var a=t[i],o=vf(a),s=void 0;if(i===0)s=p2(o,n,e);else{var l=t[i-1],c=vf(l,!0);c[0][0]="L",s=Lt(Lt(Lt([],U(o),!1),U(c),!1),[["Z"]],!1)}r.push(s)}return r}function Xtt(t,n,e){for(var r=[],i=t.length-1;i>=0;i-=1){var a=t[i],o=qp(a),s=void 0;if(i===0)s=p2(o,n,e);else{var l=t[i-1],c=qp(l,!0),u=a[0];c[0][0]="L",s=Lt(Lt(Lt([],U(o),!1),U(c),!1),[Lt(["M"],U(u),!1),["Z"]],!1)}r.push(s)}return r}function Pk(t){return t.length===0?[0,0]:[wp(CG(t,function(n){return wp(n)||0})),_p(PG(t,function(n){return _p(n)||0}))]}function Ck(t){for(var n=Ku(t),e=n[0].length,r=U([Array(e).fill(0),Array(e).fill(0)],2),i=r[0],a=r[1],o=0;o<n.length;o+=1)for(var s=n[o],l=0;l<e;l+=1)s[l]>=0?(s[l]+=i[l],i[l]=s[l]):(s[l]+=a[l],a[l]=s[l]);return n}var qtt=(function(t){ln(n,t);function n(e){return t.call(this,e,{type:"line",x:0,y:0,width:200,height:20,isStack:!1,color:["#83daad","#edbf45","#d2cef9","#e290b3","#6f63f4"],smooth:!0,lineLineWidth:1,areaOpacity:0,isGroup:!1,columnLineWidth:1,columnStroke:"#fff",scale:1,spacing:0})||this}return Object.defineProperty(n.prototype,"rawData",{get:function(){var e=this.attributes.data;if(!e||(e==null?void 0:e.length)===0)return[[]];var r=Ku(e);return Qe(r[0])?[r]:r},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"data",{get:function(){return this.attributes.isStack?Ck(this.rawData):this.rawData},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"scales",{get:function(){return this.createScales(this.data)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"baseline",{get:function(){var e=this.scales.y,r=U(e.getOptions().domain||[0,0],2),i=r[0],a=r[1];return a<0?e.map(a):e.map(i<0?0:i)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"containerShape",{get:function(){var e=this.attributes,r=e.width,i=e.height;return{width:r,height:i}},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"linesStyle",{get:function(){var e=this,r=this.attributes,i=r.type,a=r.isStack,o=r.smooth;if(i!=="line")throw new Error("linesStyle can only be used in line type");var s=ie(this.attributes,"area"),l=ie(this.attributes,"line"),c=this.containerShape.width,u=this.data;if(u[0].length===0)return{lines:[],areas:[]};var f=this.scales,d=f.x,h=f.y,p=Htt(u,{x:d,y:h}),g=[];if(s){var y=this.baseline;a?g=o?Xtt(p,c,y):Vtt(p,c,y):g=Utt(p,o,c,y)}return{lines:p.map(function(m,x){return ut({stroke:e.getColor(x),d:o?qp(m):vf(m)},l)}),areas:g.map(function(m,x){return ut({d:m,fill:e.getColor(x)},s)})}},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"columnsStyle",{get:function(){var e=this,r=ie(this.attributes,"column"),i=this.attributes,a=i.isStack,o=i.type,s=i.scale;if(o!=="column")throw new Error("columnsStyle can only be used in column type");var l=this.containerShape.height,c=this.rawData;if(!c)return{columns:[]};a&&(c=Ck(c));var u=this.createScales(c),f=u.x,d=u.y,h=U(Pk(c),2),p=h[0],g=h[1],y=new nr({domain:[0,g-(p>0?0:p)],range:[0,l*s]}),m=f.getBandWidth(),x=this.rawData;return{columns:c.map(function(_,w){return _.map(function(O,S){var E=m/c.length,M=function(){return{x:f.map(S)+E*w,y:O>=0?d.map(O):d.map(0),width:E,height:y.map(Math.abs(O))}},A=function(){return{x:f.map(S),y:d.map(O),width:m,height:y.map(x[w][S])}};return ut(ut({fill:e.getColor(w)},r),a?A():M())})})}},enumerable:!1,configurable:!0}),n.prototype.render=function(e,r){HJ(r,".container","rect").attr("className","container").node();var i=e.type,a=e.x,o=e.y,s="spark".concat(i),l=ut({x:a,y:o},i==="line"?this.linesStyle:this.columnsStyle);Ht(r).selectAll(".spark").data([i]).join(function(c){return c.append(function(u){return u==="line"?new Ytt({className:s,style:l}):new Gtt({className:s,style:l})}).attr("className","spark ".concat(s))},function(c){return c.update(l)},function(c){return c.remove()})},n.prototype.getColor=function(e){var r=this.attributes.color;return Cn(r)?r[e%r.length]:Xn(r)?r.call(null,e):r},n.prototype.createScales=function(e){var r,i,a=this.attributes,o=a.type,s=a.scale,l=a.range,c=l===void 0?[]:l,u=a.spacing,f=this.containerShape,d=f.width,h=f.height,p=U(Pk(e),2),g=p[0],y=p[1],m=new nr({domain:[(r=c[0])!==null&&r!==void 0?r:g,(i=c[1])!==null&&i!==void 0?i:y],range:[h,h*(1-s)]});return o==="line"?{type:o,x:new nr({domain:[0,e[0].length-1],range:[0,d]}),y:m}:{type:o,x:new XL({domain:e[0].map(function(x,_){return _}),range:[0,d],paddingInner:u,paddingOuter:u/2,align:.5}),y:m}},n.tag="sparkline",n})(Jn);function Ktt(t){return typeof t=="boolean"?!1:"enter"in t&&"update"in t&&"exit"in t}function Lk(t){if(!t)return{enter:!1,update:!1,exit:!1};var n=["enter","update","exit"],e=Object.fromEntries(Object.entries(t).filter(function(r){var i=U(r,1),a=i[0];return!n.includes(a)}));return Object.fromEntries(n.map(function(r){return Ktt(t)?t[r]===!1?[r,!1]:[r,ut(ut({},t[r]),e)]:[r,e]}))}function Oc(t,n){t?t.finished.then(n):n()}function Ztt(t,n){t.length===0?n():Promise.all(t.map(function(e){return e==null?void 0:e.finished})).then(n)}function QL(t,n){"update"in t?t.update(n):t.attr(n)}function JL(t,n,e){if(n.length===0)return null;if(!e){var r=n.slice(-1)[0];return QL(t,{style:r}),null}return t.animate(n,e)}function Qtt(t,n){return!(t.nodeName!=="text"||n.nodeName!=="text"||t.attributes.text!==n.attributes.text)}function Jtt(t,n,e,r){if(r===void 0&&(r="destroy"),Qtt(t,n))return t.remove(),[null];var i=function(){r==="destroy"?t.destroy():r==="hide"&&Qo(t),n.isVisible()&&Zf(n)};if(!e)return i(),[null];var a=e.duration,o=a===void 0?0:a,s=e.delay,l=s===void 0?0:s,c=Math.ceil(+o/2),u=+o/4,f=U(t.getGeometryBounds().center,2),d=f[0],h=f[1],p=U(n.getGeometryBounds().center,2),g=p[0],y=p[1],m=U([(d+g)/2-d,(h+y)/2-h],2),x=m[0],_=m[1],w=t.style.opacity,O=w===void 0?1:w,S=n.style.opacity,E=S===void 0?1:S,M=t.style.transform||"",A=n.style.transform||"",T=t.animate([{opacity:O,transform:"translate(0, 0) ".concat(M)},{opacity:0,transform:"translate(".concat(x,", ").concat(_,") ").concat(M)}],ut(ut({fill:"both"},e),{duration:l+c+u})),P=n.animate([{opacity:0,transform:"translate(".concat(-x,", ").concat(-_,") ").concat(A),offset:.01},{opacity:E,transform:"translate(0, 0) ".concat(A)}],ut(ut({fill:"both"},e),{duration:c+u,delay:l+c-u}));return Oc(P,i),[T,P]}function Ui(t,n,e){var r={},i={};return Object.entries(n).forEach(function(a){var o=U(a,2),s=o[0],l=o[1];if(!Dt(l)){var c=t.style[s]||t.parsedStyle[s]||0;c!==l&&(r[s]=c,i[s]=l)}}),e?JL(t,[r,i],ut({fill:"both"},e)):(QL(t,i),null)}function O0(t,n){return t.style.opacity||(t.style.opacity=1),Ui(t,{opacity:0},n)}var tN={fill:"#fff",lineWidth:1,radius:2,size:10,stroke:"#bfbfbf",strokeOpacity:1,zIndex:0},eN={fill:"#000",fillOpacity:.45,fontSize:12,textAlign:"center",textBaseline:"middle",zIndex:1},nN={x:0,y:0,orientation:"horizontal",showLabel:!0,type:"start"},na=Ci({foreground:"foreground",handle:"handle",selection:"selection",sparkline:"sparkline",sparklineGroup:"sparkline-group",track:"track",brushArea:"brush-area"},"slider"),yi=Ci({labelGroup:"label-group",label:"label",iconGroup:"icon-group",icon:"icon",iconRect:"icon-rect",iconLine:"icon-line"},"handle"),tet=(function(t){ln(n,t);function n(){return t!==null&&t.apply(this,arguments)||this}return n.prototype.render=function(e,r){var i=e.x,a=e.y,o=e.size,s=o===void 0?10:o,l=e.radius,c=l===void 0?s/4:l,u=e.orientation,f=e.classNamePrefix,d=Bn(e,["x","y","size","radius","orientation","classNamePrefix"]),h=s,p=h*2.4,g=f?"".concat(yi.iconRect.name," ").concat(f,"handle-icon-rect"):yi.iconRect.name,y=function(S){return f?"".concat(yi.iconLine,"-").concat(S," ").concat(f,"handle-icon-line"):"".concat(yi.iconLine,"-").concat(S)},m=Ht(r).maybeAppendByClassName(yi.iconRect,"rect").attr("className",g).styles(ut(ut({},d),{width:h,height:p,radius:c,x:i-h/2,y:a-p/2,transformOrigin:"center"})),x=i+1/3*h-h/2,_=i+2/3*h-h/2,w=a+1/4*p-p/2,O=a+3/4*p-p/2;m.maybeAppendByClassName("".concat(yi.iconLine,"-1"),"line").attr("className",y(1)).styles(ut({x1:x,x2:x,y1:w,y2:O},d)),m.maybeAppendByClassName("".concat(yi.iconLine,"-2"),"line").attr("className",y(2)).styles(ut({x1:_,x2:_,y1:w,y2:O},d)),u==="vertical"&&(m.node().style.transform="rotate(90)")},n})(Jn),rN=(function(t){ln(n,t);function n(e){return t.call(this,e,nN)||this}return n.prototype.renderLabel=function(e){var r=this,i=this.attributes,a=i.x,o=i.y,s=i.showLabel,l=ie(this.attributes,"label"),c=l.x,u=c===void 0?0:c,f=l.y,d=f===void 0?0:f,h=l.transform,p=l.transformOrigin,g=Bn(l,["x","y","transform","transformOrigin"]),y=U(no(g,[]),2),m=y[0],x=y[1],_=Ht(e).maybeAppendByClassName(yi.labelGroup,"g").styles(x),w=ut(ut({},eN),m),O=w.text,S=Bn(w,["text"]);Pr(!!s,_,function(E){r.label=E.maybeAppendByClassName(yi.label,"text").styles(ut(ut({},S),{x:a+u,y:o+d,transform:h,transformOrigin:p,text:"".concat(O)})),r.label.on("mousedown",function(M){M.stopPropagation()}),r.label.on("touchstart",function(M){M.stopPropagation()})})},n.prototype.renderIcon=function(e){var r=this.attributes,i=r.x,a=r.y,o=r.orientation,s=r.type,l=r.classNamePrefix,c=ut(ut({x:i,y:a,orientation:o,classNamePrefix:l},tN),ie(this.attributes,"icon")),u=this.attributes.iconShape,f=u===void 0?function(){return new tet({style:c})}:u,d=Ht(e).maybeAppendByClassName(yi.iconGroup,"g");d.selectAll(yi.icon.class).data([f]).join(function(h){return h.append(typeof f=="string"?f:function(){return f(s)}).attr("className",yi.icon.name)},function(h){return h.update(c)},function(h){return h.remove()})},n.prototype.render=function(e,r){this.renderIcon(r),this.renderLabel(r)},n})(Jn),iN=(function(t){ln(n,t);function n(e){var r=t.call(this,e,ut(ut(ut({x:0,y:0,animate:{duration:100,fill:"both"},brushable:!0,formatter:function(i){return i.toString()},handleSpacing:2,orientation:"horizontal",padding:0,autoFitLabel:!0,scrollable:!0,selectionFill:"#5B8FF9",selectionFillOpacity:.45,selectionZIndex:2,showHandle:!0,showLabel:!0,slidable:!0,trackFill:"#416180",trackLength:200,trackOpacity:.05,trackSize:20,trackZIndex:-1,values:[0,1],type:"range",selectionType:"select",handleIconOffset:0},sa(nN,"handle")),sa(tN,"handleIcon")),sa(eN,"handleLabel")))||this;return r.range=[0,1],r.onDragStart=function(i){return function(a){a.stopPropagation(),r.target=i,r.prevPos=r.getOrientVal(hk(a));var o=r.availableSpace,s=o.x,l=o.y,c=r.getBBox(),u=c.x,f=c.y;r.selectionStartPos=r.getRatio(r.prevPos-r.getOrientVal([s,l])-r.getOrientVal([+u,+f])),r.selectionWidth=0,document.addEventListener("pointermove",r.onDragging),document.addEventListener("pointerup",r.onDragEnd)}},r.onDragging=function(i){var a=r.attributes,o=a.slidable,s=a.brushable,l=a.type;i.stopPropagation();var c=r.getOrientVal(hk(i)),u=c-r.prevPos;if(u){var f=r.getRatio(u);switch(r.target){case"start":o&&r.setValuesOffset(f);break;case"end":o&&r.setValuesOffset(0,f);break;case"selection":o&&r.setValuesOffset(f,f);break;case"track":if(!s)return;r.selectionWidth+=f,l==="range"?r.innerSetValues([r.selectionStartPos,r.selectionStartPos+r.selectionWidth].sort(),!0):r.innerSetValues([0,r.selectionStartPos+r.selectionWidth],!0);break}r.prevPos=c}},r.onDragEnd=function(){document.removeEventListener("pointermove",r.onDragging),document.removeEventListener("pointermove",r.onDragging),document.removeEventListener("pointerup",r.onDragEnd),r.target="",r.updateHandlesPosition(!1)},r.onValueChange=function(i){var a=r.attributes,o=a.onChange,s=a.type,l=s==="range"?i:i[1],c=s==="range"?r.getValues():r.getValues()[1],u=new ze("valuechange",{detail:{oldValue:l,value:c}});r.dispatchEvent(u),o==null||o(c)},r.selectionStartPos=0,r.selectionWidth=0,r.prevPos=0,r.target="",r}return Object.defineProperty(n.prototype,"values",{get:function(){return this.attributes.values},set:function(e){this.attributes.values=this.clampValues(e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"sparklineStyle",{get:function(){var e=this.attributes.orientation;if(e!=="horizontal")return null;var r=ie(this.attributes,"sparkline");return ut(ut({zIndex:0},this.availableSpace),r)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"shape",{get:function(){var e=this.attributes,r=e.trackLength,i=e.trackSize,a=U(this.getOrientVal([[r,i],[i,r]]),2),o=a[0],s=a[1];return{width:o,height:s}},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"availableSpace",{get:function(){var e=this.attributes;e.x,e.y;var r=e.padding,i=U(cr(r),4),a=i[0],o=i[1],s=i[2],l=i[3],c=this.shape,u=c.width,f=c.height;return{x:l,y:a,width:u-(l+o),height:f-(a+s)}},enumerable:!1,configurable:!0}),n.prototype.getValues=function(){return this.values},n.prototype.setValues=function(e,r){e===void 0&&(e=[0,0]),r===void 0&&(r=!1),this.attributes.values=e;var i=r===!1?!1:this.attributes.animate;this.updateSelectionArea(i),this.updateHandlesPosition(i)},n.prototype.updateSelectionArea=function(e){var r=this.calcSelectionArea();this.foregroundGroup.selectAll(na.selection.class).each(function(i,a){Ui(this,r[a],e)})},n.prototype.updateHandlesPosition=function(e){this.attributes.showHandle&&(this.startHandle&&Ui(this.startHandle,this.getHandleStyle("start"),e),this.endHandle&&Ui(this.endHandle,this.getHandleStyle("end"),e))},n.prototype.innerSetValues=function(e,r){e===void 0&&(e=[0,0]),r===void 0&&(r=!1);var i=this.values,a=this.clampValues(e);this.attributes.values=a,this.setValues(a),r&&this.onValueChange(i)},n.prototype.renderTrack=function(e){var r=this.attributes,i=r.x,a=r.y,o=ie(this.attributes,"track");this.trackShape=Ht(e).maybeAppendByClassName(na.track,"rect").styles(ut(ut({x:i,y:a},this.shape),o))},n.prototype.renderBrushArea=function(e){var r=this.attributes,i=r.x,a=r.y,o=r.brushable;this.brushArea=Ht(e).maybeAppendByClassName(na.brushArea,"rect").styles(ut({x:i,y:a,fill:"transparent",cursor:o?"crosshair":"default"},this.shape))},n.prototype.renderSparkline=function(e){var r=this,i=this.attributes,a=i.x,o=i.y,s=i.orientation,l=Ht(e).maybeAppendByClassName(na.sparklineGroup,"g");Pr(s==="horizontal",l,function(c){var u=ut(ut({},r.sparklineStyle),{x:a,y:o});c.maybeAppendByClassName(na.sparkline,function(){return new qtt({style:u})}).update(u)})},n.prototype.renderHandles=function(){var e=this,r,i=this.attributes,a=i.showHandle,o=i.type,s=o==="range"?["start","end"]:["end"],l=a?s:[],c=this;(r=this.foregroundGroup)===null||r===void 0||r.selectAll(na.handle.class).data(l.map(function(u){return{type:u}}),function(u){return u.type}).join(function(u){return u.append(function(f){var d=f.type;return new rN({style:e.getHandleStyle(d)})}).each(function(f){var d=f.type;this.attr("class","".concat(na.handle.name," ").concat(d,"-handle"));var h="".concat(d,"Handle");c[h]=this,this.addEventListener("pointerdown",c.onDragStart(d))})},function(u){return u.each(function(f){var d=f.type;this.update(c.getHandleStyle(d))})},function(u){return u.each(function(f){var d=f.type,h="".concat(d,"Handle");c[h]=void 0}).remove()})},n.prototype.renderSelection=function(e){var r=this.attributes,i=r.x,a=r.y,o=r.type,s=r.selectionType;this.foregroundGroup=Ht(e).maybeAppendByClassName(na.foreground,"g");var l=ie(this.attributes,"selection"),c=function(f){return f.style("visibility",function(d){return d.show?"visible":"hidden"}).style("cursor",function(d){return s==="select"?"grab":s==="invert"?"crosshair":"default"}).styles(ut(ut({},l),{transform:"translate(".concat(i,", ").concat(a,")")}))},u=this;this.foregroundGroup.selectAll(na.selection.class).data(o==="value"?[]:this.calcSelectionArea().map(function(f,d){return{style:ut({},f),index:d,show:s==="select"?d===1:d!==1}}),function(f){return f.index}).join(function(f){return f.append("rect").attr("className",na.selection.name).call(c).each(function(d,h){var p=this;h===1?(u.selectionShape=Ht(this),this.on("pointerdown",function(g){p.attr("cursor","grabbing"),u.onDragStart("selection")(g)}),u.dispatchCustomEvent(this,"pointerenter","selectionMouseenter"),u.dispatchCustomEvent(this,"pointerleave","selectionMouseleave"),u.dispatchCustomEvent(this,"click","selectionClick"),this.addEventListener("pointerdown",function(){p.attr("cursor","grabbing")}),this.addEventListener("pointerup",function(){p.attr("cursor","pointer")}),this.addEventListener("pointerover",function(){p.attr("cursor","pointer")})):this.on("pointerdown",u.onDragStart("track"))})},function(f){return f.call(c)},function(f){return f.remove()}),this.updateSelectionArea(!1),this.renderHandles()},n.prototype.render=function(e,r){this.renderTrack(r),this.renderSparkline(r),this.renderBrushArea(r),this.renderSelection(r)},n.prototype.clampValues=function(e,r){var i;r===void 0&&(r=4);var a=U(this.range,2),o=a[0],s=a[1],l=U(this.getValues().map(function(y){return T1(y,r)}),2),c=l[0],u=l[1],f=Array.isArray(e)?e:[c,e??u],d=U((f||[c,u]).map(function(y){return T1(y,r)}),2),h=d[0],p=d[1];if(this.attributes.type==="value")return[0,kn(p,o,s)];h>p&&(i=U([p,h],2),h=i[0],p=i[1]);var g=p-h;return g>s-o?[o,s]:h<o?c===o&&u===p?[o,p]:[o,g+o]:p>s?u===s&&c===h?[h,s]:[s-g,s]:[h,p]},n.prototype.calcSelectionArea=function(e){var r=U(this.clampValues(e),2),i=r[0],a=r[1],o=this.availableSpace,s=o.x,l=o.y,c=o.width,u=o.height;return this.getOrientVal([[{y:l,height:u,x:s,width:i*c},{y:l,height:u,x:i*c+s,width:(a-i)*c},{y:l,height:u,x:a*c,width:(1-a)*c}],[{x:s,width:c,y:l,height:i*u},{x:s,width:c,y:i*u+l,height:(a-i)*u},{x:s,width:c,y:a*u,height:(1-a)*u}]])},n.prototype.calcHandlePosition=function(e){var r=this.attributes.handleIconOffset,i=this.availableSpace,a=i.x,o=i.y,s=i.width,l=i.height,c=U(this.clampValues(),2),u=c[0],f=c[1],d=e==="start"?-r:r,h=(e==="start"?u:f)*this.getOrientVal([s,l])+d;return{x:a+this.getOrientVal([h,s/2]),y:o+this.getOrientVal([l/2,h])}},n.prototype.inferTextStyle=function(e){var r=this.attributes.orientation;return r==="horizontal"?{}:e==="start"?{transformOrigin:"left center",transform:"rotate(90)",textAlign:"start"}:e==="end"?{transformOrigin:"right center",transform:"rotate(90)",textAlign:"end"}:{}},n.prototype.calcHandleText=function(e){var r,i=this.attributes,a=i.type,o=i.orientation,s=i.formatter,l=i.autoFitLabel,c=ie(this.attributes,"handle"),u=ie(c,"label"),f=c.spacing,d=this.getHandleSize(),h=this.clampValues(),p=e==="start"?h[0]:h[1],g=s(p),y=new u2({style:ut(ut(ut({},u),this.inferTextStyle(e)),{text:g})}),m=y.getBBox(),x=m.width,_=m.height;if(y.destroy(),!l){if(a==="value")return{text:g,x:0,y:-_-f};var w=f+d+(o==="horizontal"?x/2:0);return r={text:g},r[o==="horizontal"?"x":"y"]=e==="start"?-w:w,r}var O=0,S=0,E=this.availableSpace,M=E.width,A=E.height,T=this.calcSelectionArea()[1],P=T.x,N=T.y,C=T.width,R=T.height,D=f+d;if(o==="horizontal"){var F=D+x/2;if(e==="start"){var j=P-D-x;O=j>0?-F:F}else{var I=M-P-C-D>x;O=I?F:-F}}else{var $=D,z=_+D;e==="start"?S=N-d>_?-z:$:S=A-(N+R)-d>_?z:-$}return{x:O,y:S,text:g}},n.prototype.getHandleLabelStyle=function(e){var r=ie(this.attributes,"handleLabel");return ut(ut(ut({},r),this.calcHandleText(e)),this.inferTextStyle(e))},n.prototype.getHandleIconStyle=function(){var e=this.attributes.handleIconShape,r=ie(this.attributes,"handleIcon"),i=this.getOrientVal(["ew-resize","ns-resize"]),a=this.getHandleSize();return ut({cursor:i,shape:e,size:a},r)},n.prototype.getHandleStyle=function(e){var r=this.attributes,i=r.x,a=r.y,o=r.showLabel,s=r.showLabelOnInteraction,l=r.orientation,c=this.calcHandlePosition(e),u=c.x,f=c.y,d=this.calcHandleText(e),h=o;return!o&&s&&(this.target?h=!0:h=!1),ut(ut(ut({},sa(this.getHandleIconStyle(),"icon")),sa(ut(ut({},this.getHandleLabelStyle(e)),d),"label")),{transform:"translate(".concat(u+i,", ").concat(f+a,")"),orientation:l,showLabel:h,type:e,zIndex:3})},n.prototype.getHandleSize=function(){var e=this.attributes,r=e.handleIconSize,i=e.width,a=e.height;return r||Math.floor((this.getOrientVal([+a,+i])+4)/2.4)},n.prototype.getOrientVal=function(e){var r=U(e,2),i=r[0],a=r[1],o=this.attributes.orientation;return o==="horizontal"?i:a},n.prototype.setValuesOffset=function(e,r){r===void 0&&(r=0);var i=this.attributes.type,a=U(this.getValues(),2),o=a[0],s=a[1],l=i==="range"?e:0,c=[o+l,s+r].sort();this.innerSetValues(c,!0)},n.prototype.getRatio=function(e){var r=this.availableSpace,i=r.width,a=r.height;return e/this.getOrientVal([i,a])},n.prototype.dispatchCustomEvent=function(e,r,i){var a=this;e.on(r,function(o){o.stopPropagation(),a.dispatchEvent(new ze(i,{detail:o}))})},n.prototype.bindEvents=function(){this.addEventListener("wheel",this.onScroll);var e=this.brushArea;this.dispatchCustomEvent(e,"click","trackClick"),this.dispatchCustomEvent(e,"pointerenter","trackMouseenter"),this.dispatchCustomEvent(e,"pointerleave","trackMouseleave"),e.on("pointerdown",this.onDragStart("track"))},n.prototype.onScroll=function(e){var r=this.attributes.scrollable;if(r){var i=e.deltaX,a=e.deltaY,o=a||i,s=this.getRatio(o);this.setValuesOffset(s,s)}},n.tag="slider",n})(Jn),eet=(function(t){ln(n,t);function n(e){var r=t.call(this,e,{x:0,y:0,isRound:!0,orientation:"vertical",padding:[2,2,2,2],scrollable:!0,slidable:!0,thumbCursor:"default",trackSize:10,value:0})||this;return r.range=[0,1],r.onValueChange=function(i){var a=r.attributes.value;if(i!==a){var o={detail:{oldValue:i,value:a}};r.dispatchEvent(new ze("scroll",o)),r.dispatchEvent(new ze("valuechange",o))}},r.onTrackClick=function(i){var a=r.attributes.slidable;if(a){var o=U(r.getLocalPosition(),2),s=o[0],l=o[1],c=U(r.padding,4),u=c[0],f=c[3],d=r.getOrientVal([s+f,l+u]),h=r.getOrientVal(BL(i)),p=(h-d)/r.trackLength;r.setValue(p,!0)}},r.onThumbMouseenter=function(i){r.dispatchEvent(new ze("thumbMouseenter",{detail:i.detail}))},r.onTrackMouseenter=function(i){r.dispatchEvent(new ze("trackMouseenter",{detail:i.detail}))},r.onThumbMouseleave=function(i){r.dispatchEvent(new ze("thumbMouseleave",{detail:i.detail}))},r.onTrackMouseleave=function(i){r.dispatchEvent(new ze("trackMouseleave",{detail:i.detail}))},r}return Object.defineProperty(n.prototype,"padding",{get:function(){var e=this.attributes.padding;return cr(e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"value",{get:function(){var e=this.attributes.value,r=U(this.range,2),i=r[0],a=r[1];return kn(e,i,a)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"trackLength",{get:function(){var e=this.attributes,r=e.viewportLength,i=e.trackLength,a=i===void 0?r:i;return a},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"availableSpace",{get:function(){var e=this.attributes.trackSize,r=this.trackLength,i=U(this.padding,4),a=i[0],o=i[1],s=i[2],l=i[3],c=U(this.getOrientVal([[r,e],[e,r]]),2),u=c[0],f=c[1];return{x:l,y:a,width:+u-(l+o),height:+f-(a+s)}},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"trackRadius",{get:function(){var e=this.attributes,r=e.isRound,i=e.trackSize;return r?i/2:0},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"thumbRadius",{get:function(){var e=this.attributes,r=e.isRound,i=e.thumbRadius;if(!r)return 0;var a=this.availableSpace,o=a.width,s=a.height;return i||this.getOrientVal([s,o])/2},enumerable:!1,configurable:!0}),n.prototype.getValues=function(e){e===void 0&&(e=this.value);var r=this.attributes,i=r.viewportLength,a=r.contentLength,o=i/a,s=U(this.range,2),l=s[0],c=s[1],u=e*(c-l-o);return[u,u+o]},n.prototype.getValue=function(){return this.value},n.prototype.renderSlider=function(e){var r=this.attributes,i=r.x,a=r.y,o=r.orientation,s=r.trackSize,l=r.padding,c=r.slidable,u=ie(this.attributes,"track"),f=ie(this.attributes,"thumb"),d=ut(ut({x:i,y:a,brushable:!1,orientation:o,padding:l,selectionRadius:this.thumbRadius,showHandle:!1,slidable:c,trackLength:this.trackLength,trackRadius:this.trackRadius,trackSize:s,values:this.getValues()},sa(u,"track")),sa(f,"selection"));this.slider=Ht(e).maybeAppendByClassName("scrollbar",function(){return new iN({style:d})}).update(d).node()},n.prototype.render=function(e,r){this.renderSlider(r)},n.prototype.setValue=function(e,r){r===void 0&&(r=!1);var i=this.attributes.value,a=U(this.range,2),o=a[0],s=a[1];this.slider.setValues(this.getValues(kn(e,o,s)),r),this.onValueChange(i)},n.prototype.bindEvents=function(){var e=this;this.slider.addEventListener("trackClick",function(r){r.stopPropagation(),e.onTrackClick(r.detail)}),this.onHover()},n.prototype.getOrientVal=function(e){var r=this.attributes.orientation;return r==="horizontal"?e[0]:e[1]},n.prototype.onHover=function(){this.slider.addEventListener("selectionMouseenter",this.onThumbMouseenter),this.slider.addEventListener("trackMouseenter",this.onTrackMouseenter),this.slider.addEventListener("selectionMouseleave",this.onThumbMouseleave),this.slider.addEventListener("trackMouseleave",this.onTrackMouseleave)},n.tag="scrollbar",n})(Jn),Le={gridGroup:"grid-group",mainGroup:"main-group",lineGroup:"line-group",tickGroup:"tick-group",labelGroup:"label-group",titleGroup:"title-group",grid:"grid",line:"line",lineFirst:"line-first",lineSecond:"line-second",tick:"tick",tickItem:"tick-item",label:"label",labelItem:"label-item",title:"title"},v2={data:[],animate:{enter:!1,update:{duration:100,easing:"ease-in-out-sine",fill:"both"},exit:{duration:100,fill:"both"}},showArrow:!0,showGrid:!0,showLabel:!0,showLine:!0,showTick:!0,showTitle:!0,showTrunc:!1,dataThreshold:100,lineLineWidth:1,lineStroke:"black",crossPadding:10,titleFill:"black",titleFontSize:12,titlePosition:"lb",titleSpacing:0,titleTextAlign:"center",titleTextBaseline:"middle",lineArrow:function(){return new ur({style:{d:[["M",10,10],["L",-10,0],["L",10,-10],["L",0,0],["L",10,10],["Z"]],fill:"black",transformOrigin:"center"}})},labelAlign:"parallel",labelDirection:"positive",labelFontSize:12,labelSpacing:0,gridConnect:"line",gridControlAngles:[],gridDirection:"positive",gridLength:0,gridType:"segment",lineArrowOffset:15,lineArrowSize:10,tickDirection:"positive",tickLength:5,tickLineWidth:1,tickStroke:"black",labelOverlap:[]};at({},v2,{style:{type:"arc"}});at({},v2,{style:{}});var Yt=Ci({mainGroup:Le.mainGroup,gridGroup:Le.gridGroup,grid:Le.grid,lineGroup:Le.lineGroup,line:Le.line,tickGroup:Le.tickGroup,tick:Le.tick,tickItem:Le.tickItem,labelGroup:Le.labelGroup,label:Le.label,labelItem:Le.labelItem,titleGroup:Le.titleGroup,title:Le.title,lineFirst:Le.lineFirst,lineSecond:Le.lineSecond},"axis"),fc=Ci({lineGroup:"line-group",line:"line",regionGroup:"region-group",region:"region"},"grid");function aN(t){return t.reduce(function(n,e,r){return n.push(Lt([r===0?"M":"L"],U(e),!1)),n},[])}function net(t,n,e){var r=n.connect,i=r===void 0?"line":r,a=n.center;if(i==="line")return aN(t);if(!a)return[];var o=pf(t[0],a),s=e?0:1;return t.reduce(function(l,c,u){return u===0?l.push(Lt(["M"],U(c),!1)):l.push(Lt(["A",o,o,0,0,s],U(c),!1)),l},[])}function L1(t,n,e){return n.type==="surround"?net(t,n,e):aN(t)}function ret(t,n,e){var r=e.type,i=e.connect,a=e.center,o=e.closed,s=o?[["Z"]]:[],l=U([L1(t,e),L1(n.slice().reverse(),e,!0)],2),c=l[0],u=l[1],f=U([t[0],n.slice(-1)[0]],2),d=f[0],h=f[1],p=function(x,_){return[c,x,u,_,s].flat()};if(i==="line"||r==="surround")return p([Lt(["L"],U(h),!1)],[Lt(["L"],U(d),!1)]);if(!a)throw new Error("Arc grid need to specified center");var g=U([pf(h,a),pf(d,a)],2),y=g[0],m=g[1];return p([Lt(["A",y,y,0,0,1],U(h),!1),Lt(["L"],U(h),!1)],[Lt(["A",m,m,0,0,0],U(d),!1),Lt(["L"],U(d),!1)])}function iet(t,n,e,r){var i=e.animate,a=e.isBillboard,o=n.map(function(s,l){return{id:s.id||"grid-line-".concat(l),d:L1(s.points,e)}});return t.selectAll(fc.line.class).data(o,function(s){return s.id}).join(function(s){return s.append("path").each(function(l,c){var u=Wr(vk(ut({d:l.d},r)),[l,c,o]);this.attr(ut({class:fc.line.name,stroke:"#D9D9D9",lineWidth:1,lineDash:[4,4],isBillboard:a},u))})},function(s){return s.transition(function(l,c){var u=Wr(vk(ut({d:l.d},r)),[l,c,o]);return Ui(this,u,i.update)})},function(s){return s.transition(function(){var l=this,c=O0(this,i.exit);return Oc(c,function(){return l.remove()}),c})}).transitions()}function aet(t,n,e){var r=e.animate,i=e.connect,a=e.areaFill;if(n.length<2||!a||!i)return[];for(var o=Array.isArray(a)?a:[a,"transparent"],s=function(p){return o[p%o.length]},l=[],c=0;c<n.length-1;c++){var u=U([n[c].points,n[c+1].points],2),f=u[0],d=u[1],h=ret(f,d,e);l.push({d:h,fill:s(c)})}return t.selectAll(fc.region.class).data(l,function(p,g){return g}).join(function(p){return p.append("path").each(function(g,y){var m=Wr(g,[g,y,l]);this.attr(m)}).attr("className",fc.region.name)},function(p){return p.transition(function(g,y){var m=Wr(g,[g,y,l]);return Ui(this,m,r.update)})},function(p){return p.transition(function(){var g=this,y=O0(this,r.exit);return Oc(y,function(){return g.remove()}),y})}).transitions()}function oet(t){var n=t.data,e=n===void 0?[]:n,r=t.closed;return r?e.map(function(i){var a=i.points,o=U(a,1),s=o[0];return ut(ut({},i),{points:Lt(Lt([],U(a),!1),[s],!1)})}):e}var set=(function(t){ln(n,t);function n(){return t!==null&&t.apply(this,arguments)||this}return n.prototype.render=function(e,r){e.type,e.center,e.areaFill,e.closed;var i=Bn(e,["type","center","areaFill","closed"]),a=oet(e),o=Ht(r).maybeAppendByClassName(fc.lineGroup,"g"),s=Ht(r).maybeAppendByClassName(fc.regionGroup,"g"),l=iet(o,a,e,i),c=aet(s,a,e);return Lt(Lt([],U(l),!1),U(c),!1)},n})(Jn);function oN(t,n){return Object.fromEntries(Object.entries(t).map(function(e){var r=U(e,2),i=r[0],a=r[1];return[i,Wr(a,n)]}))}function g2(t,n){return n&&Xn(n)?t.filter(n):t}function sN(t,n){var e=n.startAngle,r=n.endAngle;return(r-e)*t+e}function S0(t,n){if(n.type==="linear"){var e=U(n.startPos,2),r=e[0],i=e[1],a=U(n.endPos,2),o=a[0],s=a[1],l=U([o-r,s-i],2),c=l[0],u=l[1];return zL([c,u])}var f=uc(sN(t,n));return[-Math.sin(f),Math.cos(f)]}function y2(t,n,e){var r=S0(t,e);return DJ(r,n!=="positive")}function Sc(t,n){return y2(t,n.labelDirection,n)}function op(t,n,e){return e?"".concat(t," ").concat(e,"axis-").concat(n):t}function Jr(t,n,e,r){return r&&t.attr("className",op(n.name,e,r)),t}function cet(t,n){var e=U(n.startPos,2),r=e[0],i=e[1],a=U(n.endPos,2),o=a[0],s=a[1],l=U([o-r,s-i],2),c=l[0],u=l[1];return[r+c*t,i+u*t]}function uet(t,n){var e=n.radius,r=U(n.center,2),i=r[0],a=r[1],o=uc(sN(t,n));return[i+e*Math.cos(o),a+e*Math.sin(o)]}function E0(t,n){return n.type==="linear"?cet(t,n):uet(t,n)}function m2(t){return S0(0,t)[1]===0}function lN(t){return S0(0,t)[0]===0}function cN(t,n){return n-t===360}function Nk(t,n,e,r,i){var a=n-t,o=U([i,i],2),s=o[0],l=o[1],c=U([uc(t),uc(n)],2),u=c[0],f=c[1],d=function(A){return[e+i*Math.cos(A),r+i*Math.sin(A)]},h=U(d(u),2),p=h[0],g=h[1],y=U(d(f),2),m=y[0],x=y[1];if(cN(t,n)){var _=(f+u)/2,w=U(d(_),2),O=w[0],S=w[1];return[["M",p,g],["A",s,l,0,1,0,O,S],["A",s,l,0,1,0,m,x]]}var E=a>180?1:0,M=t>n?0:1;return"M".concat(p,",").concat(g,",A").concat(s,",").concat(l,",0,").concat(E,",").concat(M,",").concat(m,",").concat(x)}function fet(t){var n=t.attributes,e=n.startAngle,r=n.endAngle,i=n.center,a=n.radius;return Lt(Lt([e,r],U(i),!1),[a],!1)}function det(t,n,e,r){var i=n.startAngle,a=n.endAngle,o=n.center,s=n.radius,l=n.classNamePrefix;return t.selectAll(Yt.line.class).data([{d:Nk.apply(void 0,Lt(Lt([i,a],U(o),!1),[s],!1))}],function(c,u){return u}).join(function(c){var u=c.append("path").attr("className",Yt.line.name).styles(n).styles({d:function(f){return f.d}});return Jr(u,Yt.line,Le.line,l),u},function(c){return c.transition(function(){var u=this,f=LJ(this,fet(this),Lt(Lt([i,a],U(o),!1),[s],!1),r.update);if(f){var d=function(){var h=zt(u.attributes,"__keyframe_data__");u.style.d=Nk.apply(void 0,Lt([],U(h),!1))};f.onframe=d,f.onfinish=d}return f}).styles(n)},function(c){return c.remove()}).styles(e).transitions()}function het(t,n){n.truncRange,n.truncShape,n.lineExtension}function pet(t,n,e){e===void 0&&(e=[0,0]);var r=U([t,n,e],3),i=U(r[0],2),a=i[0],o=i[1],s=U(r[1],2),l=s[0],c=s[1],u=U(r[2],2),f=u[0],d=u[1],h=U([l-a,c-o],2),p=h[0],g=h[1],y=Math.sqrt(Math.pow(p,2)+Math.pow(g,2)),m=U([-f/y,d/y],2),x=m[0],_=m[1];return[x*p,x*g,_*p,_*g]}function Rk(t){var n=U(t,2),e=U(n[0],2),r=e[0],i=e[1],a=U(n[1],2),o=a[0],s=a[1];return{x1:r,y1:i,x2:o,y2:s}}function vet(t,n,e,r){var i=n.showTrunc,a=n.startPos,o=n.endPos,s=n.truncRange,l=n.lineExtension,c=n.classNamePrefix,u=U([a,o],2),f=U(u[0],2),d=f[0],h=f[1],p=U(u[1],2),g=p[0],y=p[1],m=U(l?pet(a,o,l):new Array(4).fill(0),4),x=m[0],_=m[1],w=m[2],O=m[3],S=function($){return t.selectAll(Yt.line.class).data($,function(z,Y){return Y}).join(function(z){var Y=z.append("line").styles(e).transition(function(H){return Ui(this,Rk(H.line),!1)});return Y.attr("className",function(H){if(!c)return"".concat(Yt.line.name," ").concat(H.className);var V=op(Yt.line.name,Le.line,c);if(H.className===Yt.lineFirst.name){var Z=op(Yt.lineFirst.name,Le.lineFirst,c);return"".concat(V," ").concat(Z)}if(H.className===Yt.lineSecond.name){var Z=op(Yt.lineSecond.name,Le.lineSecond,c);return"".concat(V," ").concat(Z)}return V}),Y},function(z){return z.styles(e).transition(function(Y){var H=Y.line;return Ui(this,Rk(H),r.update)})},function(z){return z.remove()}).transitions()};if(!i||!s)return S([{line:[[d+x,h+_],[g+w,y+O]],className:Yt.line.name}]);var E=U(s,2),M=E[0],A=E[1],T=g-d,P=y-h,N=U([d+T*M,h+P*M],2),C=N[0],R=N[1],D=U([d+T*A,h+P*A],2),F=D[0],j=D[1],I=S([{line:[[d+x,h+_],[C,R]],className:Yt.lineFirst.name},{line:[[F,j],[g+w,y+O]],className:Yt.lineSecond.name}]);return het(t,n),I}function get(t,n,e,r){var i=e.showArrow,a=e.showTrunc,o=e.lineArrow,s=e.lineArrowOffset,l=e.lineArrowSize,c;if(n==="arc"?c=t.select(Yt.line.class):a?c=t.select(Yt.lineSecond.class):c=t.select(Yt.line.class),!i||!o||e.type==="arc"&&cN(e.startAngle,e.endAngle)){var u=c.node();u&&(u.style.markerEnd=void 0);return}var f=Hs(o);f.attr(r),d2(f,l),c.style("markerEnd",f).style("markerEndOffset",-s)}function yet(t,n,e){var r=n.type,i,a=ie(n,"line");return r==="linear"?i=vet(t,n,P1(a,"arrow"),e):i=det(t,n,P1(a,"arrow"),e),get(t,r,n,a),i}function met(t,n){return y2(t,n.gridDirection,n)}function uN(t){var n=t.type,e=t.gridCenter;return n==="linear"?e:e||t.center}function bet(t,n){var e=n.gridLength;return t.map(function(r,i){var a=r.value,o=U(E0(a,n),2),s=o[0],l=o[1],c=U(Ya(met(a,n),e),2),u=c[0],f=c[1];return{id:i,points:[[s,l],[s+u,l+f]]}})}function xet(t,n){var e=n.gridControlAngles,r=uN(n);if(!r)throw new Error("grid center is not provide");if(t.length<2)throw new Error("Invalid grid data");if(!e||e.length===0)throw new Error("Invalid gridControlAngles");var i=U(r,2),a=i[0],o=i[1];return t.map(function(s,l){var c=s.value,u=U(E0(c,n),2),f=u[0],d=u[1],h=U([f-a,d-o],2),p=h[0],g=h[1],y=[];return e.forEach(function(m){var x=uc(m),_=U([Math.cos(x),Math.sin(x)],2),w=_[0],O=_[1],S=p*w-g*O+a,E=p*O+g*w+o;y.push([S,E])}),{points:y,id:l}})}function _et(t,n,e,r){var i=e.classNamePrefix,a=ie(e,"grid"),o=a.type,s=a.areaFill,l=uN(e),c=g2(n,e.gridFilter),u=o==="segment"?bet(c,e):xet(c,e),f=ut(ut({},a),{center:l,areaFill:Xn(s)?c.map(function(d,h){return Wr(s,[d,h,c])}):s,animate:r,data:u});return t.selectAll(Yt.grid.class).data([1]).join(function(d){var h=d.append(function(){return new set({style:f})}).attr("className",Yt.grid.name);return Jr(h,Yt.grid,Le.grid,i),h},function(d){return d.transition(function(){return this.update(f)})},function(d){return d.remove()}).transitions()}var N1=(function(){function t(n,e,r,i){this.set(n,e,r,i)}return Object.defineProperty(t.prototype,"left",{get:function(){return this.x1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"top",{get:function(){return this.y1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){return this.x2},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bottom",{get:function(){return this.y2},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this.defined("x2")&&this.defined("x1")?this.x2-this.x1:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.defined("y2")&&this.defined("y1")?this.y2-this.y1:void 0},enumerable:!1,configurable:!0}),t.prototype.rotatedPoints=function(n,e,r){var i=this,a=i.x1,o=i.y1,s=i.x2,l=i.y2,c=Math.cos(n),u=Math.sin(n),f=e-e*c+r*u,d=r-e*u-r*c,h=[[c*a-u*l+f,u*a+c*l+d],[c*s-u*l+f,u*s+c*l+d],[c*a-u*o+f,u*a+c*o+d],[c*s-u*o+f,u*s+c*o+d]];return h},t.prototype.set=function(n,e,r,i){return r<n?(this.x2=n,this.x1=r):(this.x1=n,this.x2=r),i<e?(this.y2=e,this.y1=i):(this.y1=e,this.y2=i),this},t.prototype.defined=function(n){return this[n]!==Number.MAX_VALUE&&this[n]!==-Number.MAX_VALUE},t})();function R1(t,n){var e=t.getEulerAngles()||0;t.setEulerAngles(0);var r=t.getBounds(),i=U(r.min,2),a=i[0],o=i[1],s=U(r.max,2),l=s[0],c=s[1],u=t.getBBox(),f=u.width,d=u.height,h=d,p=0,g=0,y=a,m=o,x=jL(t);if(x){h-=1.5;var _=x.style.textAlign,w=x.style.textBaseline;_==="center"?y=(a+l)/2:(_==="right"||_==="end")&&(y=l),w==="middle"?m=(o+c)/2:w==="bottom"&&(m=c)}var O=U(cr(n),4),S=O[0],E=S===void 0?0:S,M=O[1],A=M===void 0?0:M,T=O[2],P=T===void 0?E:T,N=O[3],C=N===void 0?A:N,R=new N1((p+=a)-C,(g+=o)-E,p+f+A,g+h+P);return t.setEulerAngles(e),R.rotatedPoints(uc(e),y,m)}function bu(t,n){return n[0]<=Math.max(t[0][0],t[1][0])&&n[0]<=Math.min(t[0][0],t[1][0])&&n[1]<=Math.max(t[0][1],t[1][1])&&n[1]<=Math.min(t[0][1],t[1][1])}function xu(t,n,e){var r=(n[1]-t[1])*(e[0]-n[0])-(n[0]-t[0])*(e[1]-n[1]);return r===0?0:r<0?2:1}function wet(t,n){var e=xu(t[0],t[1],n[0]),r=xu(t[0],t[1],n[1]),i=xu(n[0],n[1],t[0]),a=xu(n[0],n[1],t[1]);return!!(e!==r&&i!==a||e===0&&bu(t,n[0])||r===0&&bu(t,n[1])||i===0&&bu(n,t[0])||a===0&&bu(n,t[1]))}function Oet(t,n){var e=t.length;if(e<3)return!1;var r=[n,[9999,n[1]]],i=0,a=0;do{var o=[t[a],t[(a+1)%e]];if(wet(o,r)){if(xu(o[0],n,o[1])===0)return bu(o,n);i++}a=(a+1)%e}while(a!==0);return!!(i&1)}function Eet(t,n){return n.every(function(e){return Oet(t,e)})}function ket(t,n,e){var r=t.x1,i=t.x2,a=t.y1,o=t.y2,s=[[r,a],[i,a],[i,o],[r,o]],l=R1(n,e);return Eet(s,l)}function Met(t,n){var e=U(t,4),r=e[0],i=e[1],a=e[2],o=e[3],s=U(n,4),l=s[0],c=s[1],u=s[2],f=s[3],d=a-r,h=o-i,p=u-l,g=f-c,y=d*g-p*h;if(y===0)return!1;var m=y>0,x=r-l,_=i-c,w=d*_-h*x;if(w<0===m)return!1;var O=p*_-g*x;return!(O<0===m||w>y===m||O>y===m)}function Aet(t,n){var e=[[t[0],t[1],t[2],t[3]],[t[2],t[3],t[4],t[5]],[t[4],t[5],t[6],t[7]],[t[6],t[7],t[0],t[1]]];return e.some(function(r){return Met(n,r)})}function Tet(t,n,e){var r,i,a=R1(t,e).flat(1),o=R1(n,e).flat(1),s=[[a[0],a[1],a[2],a[3]],[a[0],a[1],a[4],a[5]],[a[4],a[5],a[6],a[7]],[a[2],a[3],a[6],a[7]]];try{for(var l=$f(s),c=l.next();!c.done;c=l.next()){var u=c.value;if(Aet(o,u))return!0}}catch(f){r={error:f}}finally{try{c&&!c.done&&(i=l.return)&&i.call(l)}finally{if(r)throw r.error}}return!1}function Pet(t,n){var e=t.type,r=t.labelDirection,i=t.crossSize;if(!i)return!1;if(e==="arc"){var a=t.center,o=t.radius,s=U(a,2),l=s[0],c=s[1],u=r==="negative"?0:i,f=-o-u,d=o+u,h=U(cr(n),4),p=h[0],g=h[1],y=h[2],m=h[3];return new N1(l+f-m,c+f-p,l+d+g,c+d+y)}var x=U(t.startPos,2),_=x[0],w=x[1],O=U(t.endPos,2),S=O[0],E=O[1],M=U(lN(t)?[-n,0,n,0]:[0,n,0,-n],4),A=M[0],T=M[1],P=M[2],N=M[3],C=Sc(0,t),R=Ya(C,i),D=new N1(_,w,S,E);return D.x1+=N,D.y1+=A,D.x2+=T+R[0],D.y2+=P+R[1],D}function k0(t,n,e){var r,i,a=n.crossPadding,o=new Set,s=null,l=Pet(n,a),c=function(p){return l?ket(l,p):!0},u=function(p,g){return!p||!p.firstChild?!0:!Tet(p.firstChild,g.firstChild,cr(e))};try{for(var f=$f(t),d=f.next();!d.done;d=f.next()){var h=d.value;c(h)?!s||u(s,h)?s=h:(o.add(s),o.add(h)):o.add(h)}}catch(p){r={error:p}}finally{try{d&&!d.done&&(i=f.return)&&i.call(f)}finally{if(r)throw r.error}}return Array.from(o)}function qy(t,n){return n===void 0&&(n={}),Dt(t)?0:typeof t=="number"?t:Math.floor(DL(t,n))}function Cet(t,n,e,r){if(!(t.length<=0)){var i=n.suffix,a=i===void 0?"...":i,o=n.minLength,s=n.maxLength,l=s===void 0?1/0:s,c=n.step,u=c===void 0?" ":c,f=n.margin,d=f===void 0?[0,0,0,0]:f,h=$L(r.getTextShape(t[0])),p=qy(u,h),g=o?qy(o,h):p,y=qy(l,h);(Dt(y)||y===1/0)&&(y=Math.max.apply(null,t.map(function(S){return S.getBBox().width})));var m=t.slice(),x=U(d,4);x[0],x[1],x[2],x[3];for(var _=function(S){if(m.forEach(function(E){r.ellipsis(r.getTextShape(E),S,a)}),m=k0(t,e,d),m.length<1)return{value:void 0}},w=y;w>g+p;w-=p){var O=_(w);if(typeof O=="object")return O.value}}}var Let={parity:function(t,n){var e=n.seq,r=e===void 0?2:e;return t.filter(function(i,a){return a%r?(Qo(i),!1):!0})}},Net=function(t){return t.filter(EJ)};function Ret(t,n,e,r){var i=t.length,a=n.keepHeader,o=n.keepTail;if(!(i<=1||i===2&&a&&o)){var s=Let.parity,l=function(_){return _.forEach(r.show),_},c=2,u=t.slice(),f=t.slice(),d=Math.min.apply(Math,Lt([1],U(t.map(function(_){return _.getBBox().width})),!1));if(e.type==="linear"&&(m2(e)||lN(e))){var h=gk(t[0]).left,p=gk(t[i-1]).right,g=Math.abs(p-h)||1;c=Math.max(Math.floor(i*d/g),c)}var y,m;for(a&&(y=u.splice(0,1)[0]),o&&(m=u.splice(-1,1)[0],u.reverse()),l(u);c<t.length&&k0(Net(m?Lt(Lt([m],U(f),!1),[y],!1):Lt([y],U(f),!1)),e,n==null?void 0:n.margin).length;){if(m&&!y&&c%2===0){var x=u.splice(0,1);x.forEach(r.hide)}else if(m&&y){var x=u.splice(0,1);x.forEach(r.hide)}f=s(l(u),{seq:c}),c++}}}function Iet(t,n,e,r){var i,a,o=n.optionalAngles,s=o===void 0?[0,45,90]:o,l=n.margin,c=n.recoverWhenFailed,u=c===void 0?!0:c,f=t.map(function(m){return m.getLocalEulerAngles()}),d=function(){return k0(t,e,l).length<1},h=function(m){return t.forEach(function(x,_){var w=Array.isArray(m)?m[_]:m;r.rotate(x,+w)})};try{for(var p=$f(s),g=p.next();!g.done;g=p.next()){var y=g.value;if(h(y),d())return}}catch(m){i={error:m}}finally{try{g&&!g.done&&(a=p.return)&&a.call(p)}finally{if(i)throw i.error}}u&&h(f)}function Det(t){var n=t.type,e=t.labelDirection;return n==="linear"&&m2(t)?e==="negative"?"bottom":"top":"middle"}function $et(t,n,e,r,i){var a,o=n.maxLines,s=o===void 0?3:o,l=n.recoverWhenFailed,c=l===void 0?!0:l,u=n.margin,f=u===void 0?[0,0,0,0]:u,d=Wr((a=n.wordWrapWidth)!==null&&a!==void 0?a:50,[i]),h=t.map(function(_){return _.attr("maxLines")||1}),p=Math.min.apply(Math,Lt([],U(h),!1)),g=function(){return k0(t,e,f).length<1},y=Det(e),m=function(_){return t.forEach(function(w,O){var S=Array.isArray(_)?_[O]:_;r.wrap(w,d,S,y)})};if(!(p>s)){if(e.type==="linear"&&m2(e)){if(m(s),g())return}else for(var x=p;x<=s;x++)if(m(x),g())return;c&&m(h)}}var jet=new Map([["hide",Ret],["rotate",Iet],["ellipsis",Cet],["wrap",$et]]);function Fet(t,n,e){return n.labelOverlap.length<1?!1:e==="hide"?!OJ(t[0]):e==="rotate"?!t.some(function(r){var i;return!!(!((i=r.attr("transform"))===null||i===void 0)&&i.includes("rotate"))}):e==="ellipsis"||e==="wrap"?t.filter(function(r){return r.querySelector("text")}).length>=1:!0}function Bet(t,n,e,r){var i=n.labelOverlap,a=i===void 0?[]:i;a.length&&a.forEach(function(o){var s=o.type,l=jet.get(s);Fet(t,n,s)&&(l==null||l(t,o,n,r,e))})}function zet(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var e=function(r){return r==="positive"?-1:1};return t.reduce(function(r,i){return r*e(i)},1)}function Ik(t){for(var n=t;n<0;)n+=360;return Math.round(n%360)}function I1(t,n){var e=U(t,2),r=e[0],i=e[1],a=U(n,2),o=a[0],s=a[1],l=U([r*o+i*s,r*s-i*o],2),c=l[0],u=l[1];return Math.atan2(u,c)}function Wet(t){var n=(t+360)%180;return sr(n,-90,90)||(n+=180),n}function Get(t,n,e){var r,i=e.labelAlign,a=(r=n.style.transform)===null||r===void 0?void 0:r.includes("rotate");if(a)return n.getLocalEulerAngles();var o=0,s=Sc(t.value,e),l=S0(t.value,e);return i==="horizontal"?0:(i==="perpendicular"?o=I1([1,0],s):o=I1([l[0]<0?-1:1,0],l),Wet(RL(o)))}function fN(t,n,e){var r=e.type,i=e.labelAlign,a=Sc(t,e),o=Ik(n),s=Ik(RL(I1([1,0],a))),l="center",c="middle";return r==="linear"?[90,270].includes(s)&&o===0?(l="center",c=a[1]===1?"top":"bottom"):!(s%180)&&[90,270].includes(o)?l="center":s===0?(sr(o,0,90,!1,!0)||sr(o,0,90)||sr(o,270,360))&&(l="start"):s===90?sr(o,0,90,!1,!0)?l="start":(sr(o,90,180)||sr(o,270,360))&&(l="end"):s===270?sr(o,0,90,!1,!0)?l="end":(sr(o,90,180)||sr(o,270,360))&&(l="start"):s===180&&(o===90?l="start":(sr(o,0,90)||sr(o,270,360))&&(l="end")):i==="parallel"?sr(s,0,180,!0)?c="top":c="bottom":i==="horizontal"?sr(s,90,270,!1)?l="end":(sr(s,270,360,!1)||sr(s,0,90))&&(l="start"):i==="perpendicular"&&(sr(s,90,270)?l="end":l="start"),{textAlign:l,textBaseline:c}}function Yet(t,n,e){n.setLocalEulerAngles(t);var r=n.__data__.value,i=fN(r,t,e),a=n.querySelector(Yt.labelItem.class);a&&dN(a,i)}function Dk(t,n,e){var r=e.showTick,i=e.tickLength,a=e.tickDirection,o=e.labelDirection,s=e.labelSpacing,l=n.indexOf(t),c=Wr(s,[t,l,n]),u=U([Sc(t.value,e),zet(o,a)],2),f=u[0],d=u[1],h=d===1?Wr(r?i:0,[t,l,n]):0,p=U(mu(Ya(f,c+h),E0(t.value,e)),2),g=p[0],y=p[1];return{x:g,y}}function Het(t,n,e,r){var i=r.labelFormatter,a=Xn(i)?function(){return Hs(Wr(i,[t,n,e,Sc(t.value,r)]))}:function(){return Hs(t.label||"")};return a}function Uet(t,n,e,r){var i=r.labelRender,a=(zt(r,"endPos.0",400)-zt(r,"startPos.0",0))/e.length,o=Xn(i)?Wr(i,[t,n,e,Sc(t.value,r)]):t.label||"",s=JJ(o)||30;return function(){return MJ(o,{width:a,height:s})}}var Vet={html:["fill"],text:[]};function dN(t,n){["text","html"].includes(t.nodeName)&&t.attr(P1(n,Vet[t.nodeName]))}function Xet(t,n){Bet(this.node().childNodes,t,n,{hide:Qo,show:Zf,rotate:function(e,r){Yet(+r,e,t)},ellipsis:function(e,r,i){e&&A1(e,r||1/0,i)},wrap:function(e,r,i){e&&kJ(e,r,i)},getTextShape:function(e){return e.querySelector(Yt.labelItem.class)}})}function $k(t,n,e,r,i){var a=e.indexOf(n),o=i.labelRender,s=i.classNamePrefix,l=Ht(t).append(o?Uet(n,a,e,i):Het(n,a,e,i)).attr("className",Yt.labelItem.name).node();Jr(Ht(l),Yt.labelItem,Le.labelItem,s);var c=U(no(oN(r,[n,a,e])),2),u=c[0],f=c[1],d=f.transform,h=Bn(f,["transform"]);WL(l,d);var p=Get(n,l,i);if(l.getLocalEulerAngles()||l.setLocalEulerAngles(p),dN(l,ut(ut({},fN(n.value,p,i)),u)),l.nodeName==="html"){var g=l.getBBox(),y=l.style.x||0;l.attr("x",y-g.width/2)}return t.attr(h),l}function qet(t,n,e,r,i){var a=e.classNamePrefix,o=g2(n,e.labelFilter),s=ie(e,"label"),l,c=t.selectAll(Yt.label.class).data(o,function(u,f){return f}).join(function(u){var f=u.append("g").attr("className",Yt.label.name).transition(function(d){$k(this,d,n,s,e);var h=Dk(d,n,e),p=h.x,g=h.y;return this.style.transform="translate(".concat(p,", ").concat(g,")"),null});return Jr(f,Yt.label,Le.label,a),f},function(u){return u.transition(function(f){var d=this.querySelector(Yt.labelItem.class),h=$k(this,f,n,s,e),p=Jtt(d,h,r.update),g=Dk(f,n,e),y=g.x,m=g.y,x=Ui(this,{transform:"translate(".concat(y,", ").concat(m,")")},r.update);return Lt(Lt([],U(p),!1),[x],!1)})},function(u){return l=u,u.transition(function(){var f=this,d=O0(this.childNodes[0],r.exit);return Oc(d,function(){return Ht(f).remove()}),d}),l}).transitions();return Ztt(c,function(){Xet.call(t,e,i)}),c}function hN(t,n){return y2(t,n.tickDirection,n)}function Ket(t,n){var e=U(t,2),r=e[0],i=e[1];return[[0,0],[r*n,i*n]]}function Zet(t,n,e,r,i){var a=i.tickLength,o=U(Ket(r,Wr(a,[t,n,e])),2),s=U(o[0],2),l=s[0],c=s[1],u=U(o[1],2),f=u[0],d=u[1];return{x1:l,x2:f,y1:c,y2:d}}function Qet(t,n,e,r,i){var a=i.tickFormatter,o=i.classNamePrefix,s=hN(n.value,i),l="line";Xn(a)&&(l=function(){return Wr(a,[n,e,r,s])});var c=t.append(l).attr("className",Yt.tickItem.name);return Jr(c,Yt.tickItem,Le.tickItem,o),c}function Jet(t,n,e,r,i,a,o){var s=hN(t.value,a),l=Zet(t,n,e,s,a),c=l.x1,u=l.x2,f=l.y1,d=l.y2,h=U(no(oN(o,[t,n,e,s])),2),p=h[0],g=h[1];r.node().nodeName==="line"&&r.styles(ut({x1:c,x2:u,y1:f,y2:d},p)),i.attr(g),r.styles(p)}function jk(t,n,e,r,i,a){var o=Qet(Ht(this),t,n,e,r);Jet(t,n,e,o,this,r,i);var s=U(E0(t.value,r),2),l=s[0],c=s[1];return Ui(this,{transform:"translate(".concat(l,", ").concat(c,")")},a)}function tnt(t,n,e,r){var i=e.classNamePrefix,a=g2(n,e.tickFilter),o=ie(e,"tick");return t.selectAll(Yt.tick.class).data(a,function(s){return s.id||s.label}).join(function(s){var l=s.append("g").attr("className",Yt.tick.name).transition(function(c,u){return jk.call(this,c,u,a,e,o,!1)});return Jr(l,Yt.tick,Le.tick,i),l},function(s){return s.transition(function(l,c){return this.removeChildren(),jk.call(this,l,c,a,e,o,r.update)})},function(s){return s.transition(function(){var l=this,c=O0(this.childNodes[0],r.exit);return Oc(c,function(){return l.remove()}),c})}).transitions()}function ent(t,n,e){var r=e.titlePosition,i=r===void 0?"lb":r,a=e.titleSpacing,o=_0(i),s=t.node().getLocalBounds(),l=U(s.min,2),c=l[0],u=l[1],f=U(s.halfExtents,2),d=f[0],h=f[1],p=U(n.node().getLocalBounds().halfExtents,2),g=p[0],y=p[1],m=U([c+d,u+h],2),x=m[0],_=m[1],w=U(cr(a),4),O=w[0],S=w[1],E=w[2],M=w[3];if(["start","end"].includes(i)&&e.type==="linear"){var A=e.startPos,T=e.endPos,P=U(i==="start"?[A,T]:[T,A],2),N=P[0],C=P[1],R=zL([-C[0]+N[0],-C[1]+N[1]]),D=U(Ya(R,O),2),F=D[0],j=D[1];return{x:N[0]+F,y:N[1]+j}}return o.includes("t")&&(_-=h+y+O),o.includes("r")&&(x+=d+g+S),o.includes("l")&&(x-=d+g+M),o.includes("b")&&(_+=h+y+E),{x,y:_}}function nnt(t,n,e){var r=t.getGeometryBounds().halfExtents,i=r[1]*2;if(n==="vertical"){if(e==="left")return"rotate(-90) translate(0, ".concat(i/2,")");if(e==="right")return"rotate(-90) translate(0, -".concat(i/2,")")}return""}function Fk(t,n,e,r,i){var a=ie(r,"title"),o=U(no(a),2),s=o[0],l=o[1],c=l.transform,u=l.transformOrigin,f=Bn(l,["transform","transformOrigin"]);n.styles(f);var d=c||nnt(t.node(),s.direction,s.position);t.styles(ut(ut({},s),{transformOrigin:u})),WL(t.node(),d);var h=ent(Ht(e._offscreen||e.querySelector(Yt.mainGroup.class)),n,r),p=h.x,g=h.y,y=Ui(n.node(),{transform:"translate(".concat(p,", ").concat(g,")")},i);return y}function rnt(t,n,e,r){var i=e.titleText,a=e.classNamePrefix;return t.selectAll(Yt.title.class).data([{title:i}].filter(function(o){return!!o.title}),function(o,s){return o.title}).join(function(o){var s=o.append(function(){return Hs(i)}).attr("className",Yt.title.name).transition(function(){return Fk(Ht(this),t,n,e,r.enter)});return Jr(s,Yt.title,Le.title,a),s},function(o){return o.transition(function(){return Fk(Ht(this),t,n,e,r.update)})},function(o){return o.remove()}).transitions()}function Bk(t,n,e,r){var i=t.showLine,a=t.showTick,o=t.showLabel,s=t.classNamePrefix,l=n.maybeAppendByClassName(Yt.lineGroup,"g");Jr(l,Yt.lineGroup,Le.lineGroup,s);var c=Pr(i,l,function(p){return yet(p,t,r)})||[],u=n.maybeAppendByClassName(Yt.tickGroup,"g");Jr(u,Yt.tickGroup,Le.tickGroup,s);var f=Pr(a,u,function(p){return tnt(p,e,t,r)})||[],d=n.maybeAppendByClassName(Yt.labelGroup,"g");Jr(d,Yt.labelGroup,Le.labelGroup,s);var h=Pr(o,d,function(p){return qet(p,e,t,r,n.node())})||[];return Lt(Lt(Lt([],U(c),!1),U(f),!1),U(h),!1).filter(function(p){return!!p})}var b2=(function(t){ln(n,t);function n(e){return t.call(this,e,v2)||this}return n.prototype.render=function(e,r,i){var a=this,o=e.titleText,s=e.data,l=e.animate,c=e.showTitle,u=e.showGrid,f=e.dataThreshold,d=e.truncRange,h=e.classNamePrefix,p=r.className||"axis";h?r.attr("className","".concat(p," ").concat(h,"axis")):r.className||r.attr("className","axis");var g=zJ(s,f).filter(function(E){var M=E.value;return!(d&&M>d[0]&&M<d[1])}),y=Lk(i===void 0?l:i),m=Ht(r).maybeAppendByClassName(Yt.gridGroup,"g");Jr(m,Yt.gridGroup,Le.gridGroup,h);var x=Pr(u,m,function(E){return _et(E,g,e,y)})||[],_=Ht(r).maybeAppendByClassName(Yt.mainGroup,"g");Jr(_,Yt.mainGroup,Le.mainGroup,h),o&&(!this.initialized&&y.enter||this.initialized&&y.update)&&Bk(e,Ht(this.offscreenGroup),g,Lk(!1));var w=Bk(e,Ht(_.node()),g,y),O=Ht(r).maybeAppendByClassName(Yt.titleGroup,"g");Jr(O,Yt.titleGroup,Le.titleGroup,h);var S=Pr(c,O,function(E){return rnt(E,a,e,y)})||[];return Lt(Lt(Lt([],U(x),!1),U(w),!1),U(S),!1).flat().filter(function(E){return!!E})},n})(Jn);function Sn(t,n,e){return e?"".concat(t," ").concat(e,"legend-").concat(n):t}function int(t,n,e){var r=Math.round((t-e)/n);return e+r*n}function ant(t,n,e){var r=1.4,i=r*e;return[["M",t-e,n-i],["L",t+e,n-i],["L",t+e,n+i],["L",t-e,n+i],["Z"]]}var pN=1.4,vN=.4;function ont(t,n,e){var r=e,i=r*pN,a=r/2,o=r/6,s=t+i*vN;return[["M",t,n],["L",s,n+a],["L",t+i,n+a],["L",t+i,n-a],["L",s,n-a],["Z"],["M",s,n+o],["L",t+i-2,n+o],["M",s,n-o],["L",t+i-2,n-o]]}function snt(t,n,e){var r=e,i=r*pN,a=r/2,o=r/6,s=n+i*vN;return[["M",t,n],["L",t-a,s],["L",t-a,n+i],["L",t+a,n+i],["L",t+a,s],["Z"],["M",t-o,s],["L",t-o,n+i-2],["M",t+o,s],["L",t+o,n+i-2]]}_e.registerSymbol("hiddenHandle",ant);_e.registerSymbol("verticalHandle",ont);_e.registerSymbol("horizontalHandle",snt);function lnt(t,n,e,r){var i,a=U(t,2),o=a[0],s=a[1],l=U(n,2),c=l[0],u=l[1],f=U(e,2),d=f[0],h=f[1],p=U([c,u],2),g=p[0],y=p[1],m=y-g;return g>y&&(i=U([y,g],2),g=i[0],y=i[1]),m>s-o?[o,s]:g<o?d===o&&h===y?[o,y]:[o,m+o]:y>s?h===s&&d===g?[g,s]:[s-m,s]:[g,y]}function va(t,n,e){return t===void 0&&(t="horizontal"),t==="horizontal"?n:e}var En={title:"title",item:"item",marker:"marker",label:"label",value:"value",focusIcon:"focus-icon",background:"background",ribbon:"ribbon",track:"track",selection:"selection",handle:"handle",handleMarker:"handle-marker",handleLabel:"handle-label",indicator:"indicator",prevBtn:"prev-btn",nextBtn:"next-btn",pageInfo:"page-info"},xs=Ci({markerGroup:"marker-group",marker:"marker",labelGroup:"label-group",label:"label"},"handle"),gN={showLabel:!0,formatter:function(t){return t.toString()},markerSize:25,markerStroke:"#c5c5c5",markerFill:"#fff",markerLineWidth:1,labelFontSize:12,labelFill:"#c5c5c5",labelText:"",orientation:"vertical",spacing:0},cnt=(function(t){ln(n,t);function n(e){return t.call(this,e,gN)||this}return n.prototype.render=function(e,r){var i=Ht(r).maybeAppendByClassName(xs.markerGroup,"g");this.renderMarker(i);var a=Ht(r).maybeAppendByClassName(xs.labelGroup,"g");this.renderLabel(a)},n.prototype.renderMarker=function(e){var r=this,i=this.attributes,a=i.orientation,o=i.classNamePrefix,s=i.markerSymbol,l=s===void 0?va(a,"horizontalHandle","verticalHandle"):s;Pr(!!l,e,function(c){var u=ie(r.attributes,"marker"),f=ut({symbol:l},u),d=Sn(xs.marker.name,En.handleMarker,o);if(r.marker=c.maybeAppendByClassName(xs.marker,function(){return new _e({style:f,className:d})}).update(f),o){var h=r.marker.node().querySelector(".marker");if(h){var p=h.getAttribute("class")||"",g=p.split(" ")[0],y=Sn(g,En.handleMarker,o);h.setAttribute("class",y)}}})},n.prototype.renderLabel=function(e){var r=this,i=this.attributes,a=i.showLabel,o=i.orientation,s=i.spacing,l=s===void 0?0:s,c=i.formatter,u=i.classNamePrefix;Pr(a,e,function(f){var d,h=ie(r.attributes,"label"),p=h.text,g=Bn(h,["text"]),y=((d=f.select(xs.marker.class))===null||d===void 0?void 0:d.node().getBBox())||{},m=y.width,x=m===void 0?0:m,_=y.height,w=_===void 0?0:_,O=U(va(o,[0,w+l,"center","top"],[x+l,0,"start","middle"]),4),S=O[0],E=O[1],M=O[2],A=O[3],T=Sn(xs.label.name,En.handleLabel,u);f.maybeAppendByClassName(xs.label,"text").attr("className",T).styles(ut(ut({},g),{x:S,y:E,text:c(p).toString(),textAlign:M,textBaseline:A}))})},n})(Jn),yN={showTitle:!0,padding:0,orientation:"horizontal",backgroundFill:"transparent",titleText:"",titleSpacing:4,titlePosition:"top-left",titleFill:"#2C3542",titleFontWeight:"bold",titleFontFamily:"sans-serif",titleFontSize:12},unt=Vi({},yN,{}),fnt=Vi({},yN,sa(gN,"handle"),{color:["#d0e3fa","#acc7f6","#8daaf2","#6d8eea","#4d73cd","#325bb1","#5a3e75","#8c3c79","#e23455","#e7655b"],indicatorBackgroundFill:"#262626",indicatorLabelFill:"white",indicatorLabelFontSize:12,indicatorVisibility:"hidden",labelAlign:"value",labelDirection:"positive",labelSpacing:5,showHandle:!0,showIndicator:!0,showLabel:!0,slidable:!0,titleText:"",type:"continuous"}),dnt=.01,jn=Ci({title:"title",html:"html",titleGroup:"title-group",items:"items",itemsGroup:"items-group",contentGroup:"content-group",ribbonGroup:"ribbon-group",ribbon:"ribbon",handlesGroup:"handles-group",handle:"handle",startHandle:"start-handle",endHandle:"end-handle",labelGroup:"label-group",label:"label",indicator:"indicator"},"legend"),Ky=Ci({text:"text"},"title");function hnt(t,n){var e=t.attributes,r=e.position,i=e.spacing,a=e.inset,o=e.text,s=t.getBBox(),l=n.getBBox(),c=_0(r),u=U(cr(o?i:0),4),f=u[0],d=u[1],h=u[2],p=u[3],g=U(cr(a),4),y=g[0],m=g[1],x=g[2],_=g[3],w=U([p+d,f+h],2),O=w[0],S=w[1],E=U([_+m,y+x],2),M=E[0],A=E[1];if(c[0]==="l")return new fn(s.x,s.y,l.width+s.width+O+M,Math.max(l.height+A,s.height));if(c[0]==="t")return new fn(s.x,s.y,Math.max(l.width+M,s.width),l.height+s.height+S+A);var T=U([n.attributes.width||l.width,n.attributes.height||l.height],2),P=T[0],N=T[1];return new fn(l.x,l.y,P+s.width+O+M,N+s.height+S+A)}function pnt(t,n){var e=Object.entries(n).reduce(function(r,i){var a=U(i,2),o=a[0],s=a[1],l=t.node().attr(o);return l||(r[o]=s),r},{});t.styles(e)}function vnt(t){var n,e,r,i,a=t,o=a.width,s=a.height,l=a.position,c=U([+o/2,+s/2],2),u=c[0],f=c[1],d=U([+u,+f,"center","middle"],4),h=d[0],p=d[1],g=d[2],y=d[3],m=_0(l);return m.includes("l")&&(n=U([0,"start"],2),h=n[0],g=n[1]),m.includes("r")&&(e=U([+o,"end"],2),h=e[0],g=e[1]),m.includes("t")&&(r=U([0,"top"],2),p=r[0],y=r[1]),m.includes("b")&&(i=U([+s,"bottom"],2),p=i[0],y=i[1]),{x:h,y:p,textAlign:g,textBaseline:y}}var mN=(function(t){ln(n,t);function n(e){return t.call(this,e,{text:"",width:0,height:0,fill:"#4a505a",fontWeight:"bold",fontSize:12,fontFamily:"sans-serif",inset:0,spacing:0,position:"top-left"})||this}return n.prototype.getAvailableSpace=function(){var e=this,r=this.attributes,i=r.width,a=r.height,o=r.position,s=r.spacing,l=r.inset,c=e.querySelector(Ky.text.class);if(!c)return new fn(0,0,+i,+a);var u=c.getBBox(),f=u.width,d=u.height,h=U(cr(s),4),p=h[0],g=h[1],y=h[2],m=h[3],x=U([0,0,+i,+a],4),_=x[0],w=x[1],O=x[2],S=x[3],E=_0(o);if(E.includes("i"))return new fn(_,w,O,S);E.forEach(function(F,j){var I,$,z,Y;F==="t"&&(I=U(j===0?[d+y,+a-d-y]:[0,+a],2),w=I[0],S=I[1]),F==="r"&&($=U([+i-f-m],1),O=$[0]),F==="b"&&(z=U([+a-d-p],1),S=z[0]),F==="l"&&(Y=U(j===0?[f+g,+i-f-g]:[0,+i],2),_=Y[0],O=Y[1])});var M=U(cr(l),4),A=M[0],T=M[1],P=M[2],N=M[3],C=U([N+T,A+P],2),R=C[0],D=C[1];return new fn(_+N,w+A,O-R,S-D)},n.prototype.getBBox=function(){return this.title?this.title.getBBox():new fn(0,0,0,0)},n.prototype.render=function(e,r){var i=this;e.width,e.height,e.position,e.spacing;var a=e.classNamePrefix,o=Bn(e,["width","height","position","spacing","classNamePrefix"]),s=U(no(o),1),l=s[0],c=vnt(e),u=c.x,f=c.y,d=c.textAlign,h=c.textBaseline;Pr(!!o.text,Ht(r),function(p){var g=Sn(Ky.text.name,En.title,a);i.title=p.maybeAppendByClassName(Ky.text,"text").attr("className",g).styles(l).call(pnt,{x:u,y:f,textAlign:d,textBaseline:h}).node()})},n})(Jn),kr=Ci({prevBtnGroup:"prev-btn-group",prevBtn:"prev-btn",nextBtnGroup:"next-btn-group",nextBtn:"next-btn",pageInfoGroup:"page-info-group",pageInfo:"page-info",playWindow:"play-window",contentGroup:"content-group",controller:"controller",clipPath:"clip-path"},"navigator"),gnt=(function(t){ln(n,t);function n(e){var r=t.call(this,e,{x:0,y:0,animate:{easing:"linear",duration:200,fill:"both"},buttonCursor:"pointer",buttonFill:"black",buttonD:mtt(0,0,6),buttonSize:12,controllerPadding:5,controllerSpacing:5,formatter:function(i,a){return"".concat(i,"/").concat(a)},defaultPage:0,loop:!1,orientation:"horizontal",pageNumFill:"black",pageNumFontSize:12,pageNumTextAlign:"start",pageNumTextBaseline:"middle"})||this;return r.playState="idle",r.contentGroup=r.appendChild(new Qn({class:kr.contentGroup.name})),r.playWindow=r.contentGroup.appendChild(new Qn({class:kr.playWindow.name})),r.innerCurrPage=r.defaultPage,r}return Object.defineProperty(n.prototype,"defaultPage",{get:function(){var e=this.attributes.defaultPage;return kn(e,0,Math.max(this.pageViews.length-1,0))},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"pageViews",{get:function(){return this.playWindow.children},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"controllerShape",{get:function(){return this.totalPages>1?{width:55,height:0}:{width:0,height:0}},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"pageShape",{get:function(){var e=this.pageViews,r=U(QJ(e.map(function(f){var d=f.getBBox(),h=d.width,p=d.height;return[h,p]})).map(function(f){return Math.max.apply(Math,Lt([],U(f),!1))}),2),i=r[0],a=r[1],o=this.attributes,s=o.pageWidth,l=s===void 0?i:s,c=o.pageHeight,u=c===void 0?a:c;return{pageWidth:l,pageHeight:u}},enumerable:!1,configurable:!0}),n.prototype.getContainer=function(){return this.playWindow},Object.defineProperty(n.prototype,"totalPages",{get:function(){return this.pageViews.length},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"currPage",{get:function(){return this.innerCurrPage},enumerable:!1,configurable:!0}),n.prototype.getBBox=function(){var e=t.prototype.getBBox.call(this),r=e.x,i=e.y,a=this.controllerShape,o=this.pageShape,s=o.pageWidth,l=o.pageHeight;return new fn(r,i,s+a.width,l)},n.prototype.goTo=function(e){var r=this,i=this.attributes.animate,a=this,o=a.currPage,s=a.playState,l=a.playWindow,c=a.pageViews;if(s!=="idle"||e<0||c.length<=0||e>=c.length)return null;c[o].setLocalPosition(0,0),this.prepareFollowingPage(e);var u=U(this.getFollowingPageDiff(e),2),f=u[0],d=u[1];this.playState="running";var h=JL(l,[{transform:"translate(0, 0)"},{transform:"translate(".concat(-f,", ").concat(-d,")")}],i);return Oc(h,function(){r.innerCurrPage=e,r.playState="idle",r.setVisiblePages([e]),r.updatePageInfo()}),h},n.prototype.prev=function(){var e=this.attributes.loop,r=this.pageViews.length,i=this.currPage;if(!e&&i<=0)return null;var a=e?(i-1+r)%r:kn(i-1,0,r);return this.goTo(a)},n.prototype.next=function(){var e=this.attributes.loop,r=this.pageViews.length,i=this.currPage;if(!e&&i>=r-1)return null;var a=e?(i+1)%r:kn(i+1,0,r);return this.goTo(a)},n.prototype.renderClipPath=function(e){var r=this.pageShape,i=r.pageWidth,a=r.pageHeight;if(!i||!a){this.contentGroup.style.clipPath=void 0;return}this.clipPath=e.maybeAppendByClassName(kr.clipPath,"rect").styles({width:i,height:a}),this.contentGroup.attr("clipPath",this.clipPath.node())},n.prototype.setVisiblePages=function(e){this.playWindow.children.forEach(function(r,i){e.includes(i)?Zf(r):Qo(r)})},n.prototype.adjustControllerLayout=function(){var e=this,r=e.prevBtnGroup,i=e.nextBtnGroup,a=e.pageInfoGroup,o=this.attributes,s=o.orientation,l=o.controllerPadding,c=a.getBBox(),u=c.width;c.height;var f=U(s==="horizontal"?[-180,0]:[-90,90],2),d=f[0],h=f[1];r.setLocalEulerAngles(d),i.setLocalEulerAngles(h);var p=r.getBBox(),g=p.width,y=p.height,m=i.getBBox(),x=m.width,_=m.height,w=Math.max(g,u,x),O=s==="horizontal"?{offset:[[0,0],[g/2+l,0],[g+u+l*2,0]],textAlign:"start"}:{offset:[[w/2,-y-l],[w/2,0],[w/2,_+l]],textAlign:"center"},S=U(O.offset,3),E=U(S[0],2),M=E[0],A=E[1],T=U(S[1],2),P=T[0],N=T[1],C=U(S[2],2),R=C[0],D=C[1],F=O.textAlign,j=a.querySelector("text");j&&(j.style.textAlign=F),r.setLocalPosition(M,A),a.setLocalPosition(P,N),i.setLocalPosition(R,D)},n.prototype.updatePageInfo=function(){var e,r=this,i=r.currPage,a=r.pageViews,o=r.attributes.formatter;a.length<2||((e=this.pageInfoGroup.querySelector(kr.pageInfo.class))===null||e===void 0||e.attr("text",o(i+1,a.length)),this.adjustControllerLayout())},n.prototype.getFollowingPageDiff=function(e){var r=this.currPage;if(r===e)return[0,0];var i=this.attributes.orientation,a=this.pageShape,o=a.pageWidth,s=a.pageHeight,l=e<r?-1:1;return i==="horizontal"?[l*o,0]:[0,l*s]},n.prototype.prepareFollowingPage=function(e){var r=this,i=r.currPage,a=r.pageViews;if(this.setVisiblePages([e,i]),e!==i){var o=U(this.getFollowingPageDiff(e),2),s=o[0],l=o[1];a[e].setLocalPosition(s,l)}},n.prototype.renderController=function(e){var r=this,i=this.attributes,a=i.controllerSpacing,o=i.classNamePrefix,s=o===void 0?"":o,l=this.pageShape,c=l.pageWidth,u=l.pageHeight,f=this.pageViews.length>=2,d=e.maybeAppendByClassName(kr.controller,"g");if(x0(d.node(),f),!!f){var h=ie(this.attributes,"button"),p=ie(this.attributes,"pageNum"),g=U(no(h),2),y=g[0],m=g[1],x=y.size,_=Bn(y,["size"]),w=!d.select(kr.prevBtnGroup.class).node(),O=d.maybeAppendByClassName(kr.prevBtnGroup,"g").styles(m);this.prevBtnGroup=O.node();var S=O.maybeAppendByClassName(kr.prevBtn,"path");if(s){var E=Sn(kr.prevBtn.name,En.prevBtn,s);S.node().setAttribute("class",E)}var M=d.maybeAppendByClassName(kr.nextBtnGroup,"g").styles(m);this.nextBtnGroup=M.node();var A=M.maybeAppendByClassName(kr.nextBtn,"path");if(s){var T=Sn(kr.nextBtn.name,En.nextBtn,s);A.node().setAttribute("class",T)}[S,A].forEach(function(R){R.styles(ut(ut({},_),{transformOrigin:"center"})),d2(R.node(),x)});var P=d.maybeAppendByClassName(kr.pageInfoGroup,"g");this.pageInfoGroup=P.node();var N=P.maybeAppendByClassName(kr.pageInfo,"text");if(N.styles(p),s){var C=Sn(kr.pageInfo.name,En.pageInfo,s);N.node().setAttribute("class",C)}this.updatePageInfo(),d.node().setLocalPosition(c+a,u/2),w&&(this.prevBtnGroup.addEventListener("click",function(){r.prev()}),this.nextBtnGroup.addEventListener("click",function(){r.next()}))}},n.prototype.render=function(e,r){var i=e.x,a=i===void 0?0:i,o=e.y,s=o===void 0?0:o;this.attr("transform","translate(".concat(a,", ").concat(s,")"));var l=Ht(r);this.renderClipPath(l),this.renderController(l),this.setVisiblePages([this.defaultPage]),this.goTo(this.defaultPage)},n.prototype.bindEvents=function(){var e=this,r=WP(function(){return e.render(e.attributes,e)},50);this.playWindow.addEventListener(re.INSERTED,r),this.playWindow.addEventListener(re.REMOVED,r)},n})(Jn),se,ynt="component-poptip",qt={CONTAINER:"component-poptip",ARROW:"component-poptip-arrow",TEXT:"component-poptip-text"},zk=(se={},se[".".concat(qt.CONTAINER)]={visibility:"visible",position:"absolute","background-color":"rgba(0, 0, 0)","box-shadow":"0px 0px 10px #aeaeae","border-radius":"3px",color:"#fff",opacity:.8,"font-size":"12px",padding:"4px 6px",display:"flex","justify-content":"center","align-items":"center","z-index":8,transition:"visibility 50ms"},se[".".concat(qt.TEXT)]={"text-align":"center"},se[".".concat(qt.CONTAINER,"[data-position='top']")]={transform:"translate(-50%, -100%)"},se[".".concat(qt.CONTAINER,"[data-position='left']")]={transform:"translate(-100%, -50%)"},se[".".concat(qt.CONTAINER,"[data-position='right']")]={transform:"translate(0, -50%)"},se[".".concat(qt.CONTAINER,"[data-position='bottom']")]={transform:"translate(-50%, 0)"},se[".".concat(qt.CONTAINER,"[data-position='top-left']")]={transform:"translate(0,-100%)"},se[".".concat(qt.CONTAINER,"[data-position='top-right']")]={transform:"translate(-100%,-100%)"},se[".".concat(qt.CONTAINER,"[data-position='left-top']")]={transform:"translate(-100%, 0)"},se[".".concat(qt.CONTAINER,"[data-position='left-bottom']")]={transform:"translate(-100%, -100%)"},se[".".concat(qt.CONTAINER,"[data-position='right-top']")]={transform:"translate(0, 0)"},se[".".concat(qt.CONTAINER,"[data-position='right-bottom']")]={transform:"translate(0, -100%)"},se[".".concat(qt.CONTAINER,"[data-position='bottom-left']")]={transform:"translate(0, 0)"},se[".".concat(qt.CONTAINER,"[data-position='bottom-right']")]={transform:"translate(-100%, 0)"},se[".".concat(qt.ARROW)]={width:"4px",height:"4px",transform:"rotate(45deg)","background-color":"rgba(0, 0, 0)",position:"absolute","z-index":-1},se[".".concat(qt.CONTAINER,"[data-position='top']")]={transform:"translate(-50%, calc(-100% - 5px))"},se["[data-position='top'] .".concat(qt.ARROW)]={bottom:"-2px"},se[".".concat(qt.CONTAINER,"[data-position='left']")]={transform:"translate(calc(-100% - 5px), -50%)"},se["[data-position='left'] .".concat(qt.ARROW)]={right:"-2px"},se[".".concat(qt.CONTAINER,"[data-position='right']")]={transform:"translate(5px, -50%)"},se["[data-position='right'] .".concat(qt.ARROW)]={left:"-2px"},se[".".concat(qt.CONTAINER,"[data-position='bottom']")]={transform:"translate(-50%, 5px)"},se["[data-position='bottom'] .".concat(qt.ARROW)]={top:"-2px"},se[".".concat(qt.CONTAINER,"[data-position='top-left']")]={transform:"translate(0, calc(-100% - 5px))"},se["[data-position='top-left'] .".concat(qt.ARROW)]={left:"10px",bottom:"-2px"},se[".".concat(qt.CONTAINER,"[data-position='top-right']")]={transform:"translate(-100%, calc(-100% - 5px))"},se["[data-position='top-right'] .".concat(qt.ARROW)]={right:"10px",bottom:"-2px"},se[".".concat(qt.CONTAINER,"[data-position='left-top']")]={transform:"translate(calc(-100% - 5px), 0)"},se["[data-position='left-top'] .".concat(qt.ARROW)]={right:"-2px",top:"8px"},se[".".concat(qt.CONTAINER,"[data-position='left-bottom']")]={transform:"translate(calc(-100% - 5px), -100%)"},se["[data-position='left-bottom'] .".concat(qt.ARROW)]={right:"-2px",bottom:"8px"},se[".".concat(qt.CONTAINER,"[data-position='right-top']")]={transform:"translate(5px, 0)"},se["[data-position='right-top'] .".concat(qt.ARROW)]={left:"-2px",top:"8px"},se[".".concat(qt.CONTAINER,"[data-position='right-bottom']")]={transform:"translate(5px, -100%)"},se["[data-position='right-bottom'] .".concat(qt.ARROW)]={left:"-2px",bottom:"8px"},se[".".concat(qt.CONTAINER,"[data-position='bottom-left']")]={transform:"translate(0, 5px)"},se["[data-position='bottom-left'] .".concat(qt.ARROW)]={top:"-2px",left:"8px"},se[".".concat(qt.CONTAINER,"[data-position='bottom-right']")]={transform:"translate(-100%, 5px)"},se["[data-position='bottom-right'] .".concat(qt.ARROW)]={top:"-2px",right:"8px"},se),mnt=void 0;function bnt(t,n,e,r,i,a){if(i===void 0&&(i=!1),a===void 0&&(a=!1),a)return[t,n];var o=e.getBoundingClientRect(),s=o.x,l=o.y,c=o.width,u=o.height;switch(r){case"top":return i?[s+c/2,l]:[t,l];case"left":return i?[s,l+u/2]:[s,n];case"bottom":return i?[s+c/2,l+u]:[t,l+u];case"right":return i?[s+c,l+u/2]:[s+c,n];case"top-right":case"right-top":return[s+c,l];case"left-bottom":case"bottom-left":return[s,l+u];case"right-bottom":case"bottom-right":return[s+c,l+u];case"top-left":case"left-top":default:return[s,l]}}var xnt=function(t){var n;return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return n||(n=t.apply(mnt,e)),n}};function _nt(t){var n=t&&document.getElementById(t);return n||(n=document.createElement("div"),n.setAttribute("id",t),document.body.appendChild(n)),n}function wnt(t){var n=xnt(_nt)(t);return n}var Ont=(function(t){ln(n,t);function n(e){var r=t.call(this,at({style:{id:ynt}},n.defaultOptions,e))||this;return r.visibility="visible",r.map=new Map,r.domStyles="",r.initShape(),r.render(r.attributes,r),r}return Object.defineProperty(n.prototype,"visible",{get:function(){return this.visibility==="visible"},enumerable:!1,configurable:!0}),n.prototype.render=function(e,r){this.visibility=this.style.visibility,this.updatePoptipElement()},n.prototype.update=function(e){this.attr(at({},this.style,e)),this.render(this.attributes,this)},n.prototype.bind=function(e,r){var i=this;if(e){var a=this.style.text,o=function(l){var c=e,u=i.style,f=a;if(r){var d=typeof r=="function"?r.call(null,l):r,h=d.html,p=d.target,g=Bn(d,["html","target"]);u=zP({},i.style,g),(p||p===!1)&&(c=p),typeof h=="string"&&(f=h)}var y=u.position,m=u.arrowPointAtCenter,x=u.follow,_=u.offset;if(c){var w=l,O=w.clientX,S=w.clientY,E=U(bnt(O,S,c,y,m,x),2),M=E[0],A=E[1];i.showTip(M,A,{text:f,position:y,offset:_})}else i.hideTip()},s=function(){i.hideTip()};e.addEventListener("mousemove",o),e.addEventListener("mouseleave",s),this.map.set(e,[o,s])}},n.prototype.unbind=function(e){if(this.map.has(e)){var r=U(this.map.get(e)||[],2),i=r[0],a=r[1];i&&e.removeEventListener("mousemove",i),a&&e.removeEventListener("mouseleave",a),this.map.delete(e)}},n.prototype.clear=function(){this.container.innerHTML=""},n.prototype.destroy=function(){var e=this,r;Lt([],U(this.map.keys()),!1).forEach(function(i){return e.unbind(i)}),(r=this.container)===null||r===void 0||r.remove(),t.prototype.destroy.call(this)},n.prototype.showTip=function(e,r,i){var a=zt(i,"text");if(!(a&&typeof a!="string")&&(this.applyStyles(),e&&r&&i)){var o=i.offset,s=i.position;if(s&&this.container.setAttribute("data-position",s),this.setOffsetPosition(e,r,o),typeof a=="string"){var l=this.container.querySelector(".".concat(qt.TEXT));l&&(l.innerHTML=a)}this.visibility="visible",this.container.style.visibility="visible"}},n.prototype.hideTip=function(){this.visibility="hidden",this.container.style.visibility="hidden"},n.prototype.getContainer=function(){return this.container},n.prototype.getClassName=function(){var e=this.style.containerClassName;return"".concat(qt.CONTAINER).concat(e?" ".concat(e):"")},n.prototype.initShape=function(){var e=this,r=this.style.id;this.container=wnt(r),this.container.className=this.getClassName(),this.container.addEventListener("mousemove",function(){return e.showTip()}),this.container.addEventListener("mouseleave",function(){return e.hideTip()})},n.prototype.updatePoptipElement=function(){var e=this.container;this.clear();var r=this.style,i=r.id,a=r.template,o=r.text;this.container.setAttribute("id",i),this.container.className=this.getClassName();var s='<span class="'.concat(qt.ARROW,'"></span>');e.innerHTML=s,tn(a)?e.innerHTML+=a:a&&NG(a)&&e.appendChild(a),o&&(e.getElementsByClassName(qt.TEXT)[0].textContent=o),this.applyStyles(),this.container.style.visibility=this.visibility},n.prototype.applyStyles=function(){var e=Vi({},zk,this.style.domStyles),r=Object.entries(e).reduce(function(a,o){var s=U(o,2),l=s[0],c=s[1],u=Object.entries(c).reduce(function(f,d){var h=U(d,2),p=h[0],g=h[1];return"".concat(f).concat(p,": ").concat(g,";")},"");return"".concat(a).concat(l,"{").concat(u,"}")},"");if(this.domStyles!==r){this.domStyles=r;var i=this.container.querySelector("style");i&&this.container.removeChild(i),i=document.createElement("style"),i.innerHTML=r,this.container.appendChild(i)}},n.prototype.setOffsetPosition=function(e,r,i){i===void 0&&(i=this.style.offset);var a=U(i,2),o=a[0],s=o===void 0?0:o,l=a[1],c=l===void 0?0:l;this.container.style.left="".concat(e+s,"px"),this.container.style.top="".concat(r+c,"px")},n.tag="poptip",n.defaultOptions={style:{x:0,y:0,width:0,height:0,target:null,visibility:"hidden",text:"",position:"top",follow:!1,offset:[0,0],domStyles:zk,template:'<div class="'.concat(qt.TEXT,'"></div>')}},n})(Jn),Gn=Ci({layout:"flex",markerGroup:"marker-group",marker:"marker",labelGroup:"label-group",label:"label",valueGroup:"value-group",focusGroup:"focus-group",focus:"focus",value:"value",backgroundGroup:"background-group",background:"background"},"legend-category-item"),Snt={offset:[0,20],domStyles:{".component-poptip":{opacity:"1",padding:"8px 12px",background:"#fff",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.15)"},".component-poptip-arrow":{display:"none"},".component-poptip-text":{color:"#000",lineHeight:"20px"}}};function Ent(t){var n=t.querySelector(Gn.marker.class);return n?n.style:{}}var knt=(function(t){ln(n,t);function n(e,r){var i=t.call(this,e,{span:[1,1],marker:function(){return new Sa({style:{r:6}})},markerSize:10,labelFill:"#646464",valueFill:"#646464",labelFontSize:12,valueFontSize:12,labelTextBaseline:"middle",valueTextBaseline:"middle"})||this;return i.keyFields={},i.keyFields=r||{},i}return Object.defineProperty(n.prototype,"showValue",{get:function(){var e=this.attributes.valueText;return e?typeof e=="string"||typeof e=="number"?e!=="":typeof e=="function"?!0:e.attr("text")!=="":!1},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"actualSpace",{get:function(){var e=this.labelGroup,r=this.valueGroup,i=this.attributes,a=i.markerSize,o=i.focus,s=i.focusMarkerSize,l=e.node().getBBox(),c=l.width,u=l.height,f=r.node().getBBox(),d=f.width,h=f.height,p=o?s??12:0;return{markerWidth:a,labelWidth:c,valueWidth:d,focusWidth:p,height:Math.max(a,u,h)}},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"span",{get:function(){var e=this.attributes.span;if(!e)return[1,1];var r=U(cr(e),2),i=r[0],a=r[1],o=this.showValue?a:0,s=i+o;return[i/s,o/s]},enumerable:!1,configurable:!0}),n.prototype.setAttribute=function(e,r){t.prototype.setAttribute.call(this,e,r)},Object.defineProperty(n.prototype,"shape",{get:function(){var e,r=this.attributes,i=r.markerSize,a=r.width,o=this.actualSpace,s=o.markerWidth,l=o.focusWidth,c=o.height,u=this.actualSpace,f=u.labelWidth,d=u.valueWidth,h=U(this.spacing,3),p=h[0],g=h[1],y=h[2];if(a){var m=a-i-p-g-l-y,x=U(this.span,2),_=x[0],w=x[1];e=U([_*m,w*m],2),f=e[0],d=e[1]}var O=s+f+d+p+g+l+y;return{width:O,height:c,markerWidth:s,labelWidth:f,valueWidth:d,focusWidth:l}},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"spacing",{get:function(){var e=this.attributes,r=e.spacing,i=e.focus;if(!r)return[0,0,0];var a=U(cr(r),3),o=a[0],s=a[1],l=a[2];return[o,this.showValue?s:0,i?l:0]},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"layout",{get:function(){var e=this.shape,r=e.markerWidth,i=e.labelWidth,a=e.valueWidth,o=e.focusWidth,s=e.width,l=e.height,c=U(this.spacing,3),u=c[0],f=c[1],d=c[2];return{height:l,width:s,markerWidth:r,labelWidth:i,valueWidth:a,focusWidth:o,position:[r/2,r+u,r+i+u+f,r+i+a+u+f+d+o/2]}},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"scaleSize",{get:function(){var e=Ent(this.markerGroup.node()),r=this.attributes,i=r.markerSize,a=r.markerStrokeWidth,o=a===void 0?e.strokeWidth:a,s=r.markerLineWidth,l=s===void 0?e.lineWidth:s,c=r.markerStroke,u=c===void 0?e.stroke:c,f=+(o||l||(u?1:0))*Math.sqrt(2),d=this.markerGroup.node().getBBox(),h=d.width,p=d.height;return(1-f/Math.max(h,p))*i},enumerable:!1,configurable:!0}),n.prototype.renderMarker=function(e){var r=this,i=this.attributes,a=i.marker,o=i.classNamePrefix,s=ie(this.attributes,"marker");this.markerGroup=e.maybeAppendByClassName(Gn.markerGroup,"g").style("zIndex",0),Pr(!!a,this.markerGroup,function(){var l,c=r.markerGroup.node(),u=(l=c.childNodes)===null||l===void 0?void 0:l[0],f=Sn(Gn.marker.name,En.marker,o),d=typeof a=="string"?new _e({style:{symbol:a},className:f}):a();if(u)if(d.nodeName===u.nodeName)u instanceof _e?u.update(ut(ut({},s),{symbol:a})):(VJ(u,d),Ht(u).styles(s));else{if(u.remove(),!(d instanceof _e)){var p=Sn(Gn.marker.name,En.marker,o);d.className=p}Ht(d).styles(s),c.appendChild(d)}else{if(!(d instanceof _e)){var h=Sn(Gn.marker.name,En.marker,o);d.className=h,Ht(d).styles(s)}c.appendChild(d)}r.markerGroup.node().scale(1/r.markerGroup.node().getScale()[0]);var g=d2(r.markerGroup.node(),r.scaleSize);r.markerGroup.node().style._transform="scale(".concat(g,")")})},n.prototype.renderLabel=function(e){var r=ie(this.attributes,"label"),i=r.text,a=Bn(r,["text"]),o=this.attributes.classNamePrefix;this.labelGroup=e.maybeAppendByClassName(Gn.labelGroup,"g").style("zIndex",0);var s=Sn(Gn.label.name,En.label,o),l=this.labelGroup.maybeAppendByClassName(Gn.label,function(){return Hs(i)});l.node().setAttribute("class",s),l.styles(a)},n.prototype.renderValue=function(e){var r=this,i=ie(this.attributes,"value"),a=i.text,o=Bn(i,["text"]),s=this.attributes.classNamePrefix;this.valueGroup=e.maybeAppendByClassName(Gn.valueGroup,"g").style("zIndex",0),Pr(this.showValue,this.valueGroup,function(){var l=Sn(Gn.value.name,En.value,s),c=r.valueGroup.maybeAppendByClassName(Gn.value,function(){return Hs(a)});c.node().setAttribute("class",l),c.styles(o)})},n.prototype.createPoptip=function(){var e=this.attributes.poptip,r=e||{};r.render;var i=Bn(r,["render"]),a=new Ont({style:Vi(Snt,i)});return this.poptipGroup=a,a},n.prototype.bindPoptip=function(e){var r=this,i=this.attributes.poptip;if(i){var a=this.poptipGroup||this.createPoptip();a.bind(e,function(){var o=r.attributes,s=o.labelText,l=o.valueText,c=o.markerFill,u=typeof s=="string"?s:s==null?void 0:s.attr("text"),f=typeof l=="string"?l:l==null?void 0:l.attr("text");if(typeof i.render=="function")return{html:i.render(ut(ut({},r.keyFields),{label:u,value:f,color:c}))};var d="";return(typeof u=="string"||typeof u=="number")&&(d+='<div class="component-poptip-label">'.concat(u,"</div>")),(typeof f=="string"||typeof f=="number")&&(d+='<div class="component-poptip-value">'.concat(f,"</div>")),{html:d}})}},n.prototype.renderFocus=function(e){var r=this,i=this.attributes,a=i.focus,o=i.focusMarkerSize,s=i.classNamePrefix,l={x:0,y:0,size:o,opacity:.6,symbol:"focus",stroke:"#aaaaaa",lineWidth:1};Be(a)||(this.focusGroup=e.maybeAppendByClassName(Gn.focusGroup,"g").style("zIndex",0),Pr(a,this.focusGroup,function(){var c=Sn(Gn.focus.name,En.focusIcon,s),u=new _e({style:ut(ut({},l),{symbol:"focus"}),className:c}),f=new Sa({style:{r:l.size/2,fill:"transparent"}}),d=r.focusGroup.node();d.appendChild(f),d.appendChild(u),u.update({opacity:0}),e.node().addEventListener("pointerenter",function(){u.update({opacity:1})}),e.node().addEventListener("pointerleave",function(){u.update({opacity:0})})}))},n.prototype.renderPoptip=function(e){var r=this,i=this.attributes.poptip;if(i){var a=e.maybeAppendByClassName(Gn.value,"g").node(),o=e.maybeAppendByClassName(Gn.label,"g").node();[a,o].forEach(function(s){s&&r.bindPoptip(s)})}},n.prototype.renderBackground=function(e){var r=this.shape,i=r.width,a=r.height,o=ie(this.attributes,"background");this.background=e.maybeAppendByClassName(Gn.backgroundGroup,"g").style("zIndex",-1);var s=this.background.maybeAppendByClassName(Gn.background,"rect");s.styles(ut({width:i,height:a},o));var l=this.attributes.classNamePrefix,c=l===void 0?"":l;if(c){var u=Sn(Gn.background.name,En.background,c);s.node().setAttribute("class",u)}},n.prototype.adjustLayout=function(){var e=this.layout,r=e.labelWidth,i=e.valueWidth,a=e.height,o=U(e.position,4),s=o[0],l=o[1],c=o[2],u=o[3],f=a/2;this.markerGroup.styles({transform:"translate(".concat(s,", ").concat(f,")").concat(this.markerGroup.node().style._transform)}),this.labelGroup.styles({transform:"translate(".concat(l,", ").concat(f,")")}),this.focusGroup&&this.focusGroup.styles({transform:"translate(".concat(u,", ").concat(f,")")}),A1(this.labelGroup.select(Gn.label.class).node(),Math.ceil(r)),this.showValue&&(this.valueGroup.styles({transform:"translate(".concat(c,", ").concat(f,")")}),A1(this.valueGroup.select(Gn.value.class).node(),Math.ceil(i)))},n.prototype.render=function(e,r){var i=Ht(r),a=e.x,o=a===void 0?0:a,s=e.y,l=s===void 0?0:s;i.styles({transform:"translate(".concat(o,", ").concat(l,")")}),this.renderMarker(i),this.renderLabel(i),this.renderValue(i),this.renderBackground(i),this.renderPoptip(i),this.renderFocus(i),this.adjustLayout()},n})(Jn),_s=Ci({page:"item-page",navigator:"navigator",item:"item"},"items"),Wk=function(t,n,e){return e===void 0&&(e=!0),t?n(t):e},Mnt=(function(t){ln(n,t);function n(e){var r=t.call(this,e,{data:[],gridRow:1/0,gridCol:void 0,padding:0,width:1e3,height:100,rowPadding:0,colPadding:0,layout:"flex",orientation:"horizontal",click:yy,mouseenter:yy,mouseleave:yy})||this;return r.navigatorShape=[0,0],r}return Object.defineProperty(n.prototype,"pageViews",{get:function(){return this.navigator.getContainer()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"grid",{get:function(){var e=this.attributes,r=e.gridRow,i=e.gridCol,a=e.data;if(!r&&!i)throw new Error("gridRow and gridCol can not be set null at the same time");return r&&i?[r,i]:r?[r,a.length]:[a.length,i]},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"renderData",{get:function(){var e=this.attributes,r=e.data,i=e.layout,a=e.poptip,o=e.focus,s=e.focusMarkerSize,l=e.classNamePrefix,c=ie(this.attributes,"item"),u=r.map(function(f,d){var h=f.id,p=h===void 0?d:h,g=f.label,y=f.value;return{id:"".concat(p),index:d,style:ut({layout:i,labelText:g,valueText:y,poptip:a,focus:o,focusMarkerSize:s,classNamePrefix:l},Object.fromEntries(Object.entries(c).map(function(m){var x=U(m,2),_=x[0],w=x[1];return[_,Wr(w,[f,d,r])]})))}});return u},enumerable:!1,configurable:!0}),n.prototype.getGridLayout=function(){var e=this,r=this.attributes,i=r.orientation,a=r.width,o=r.rowPadding,s=r.colPadding,l=U(this.navigatorShape,1),c=l[0],u=U(this.grid,2),f=u[0],d=u[1],h=d*f,p=0;return this.pageViews.children.map(function(g,y){var m,x,_=Math.floor(y/h),w=y%h,O=e.ifHorizontal(d,f),S=[Math.floor(w/O),w%O];i==="vertical"&&S.reverse();var E=U(S,2),M=E[0],A=E[1],T=(a-c-(d-1)*s)/d,P=g.getBBox().height,N=U([0,0],2),C=N[0],R=N[1];return i==="horizontal"?(m=U([p,M*(P+o)],2),C=m[0],R=m[1],p=A===d-1?0:p+T+s):(x=U([A*(T+s),p],2),C=x[0],R=x[1],p=M===f-1?0:p+P+o),{page:_,index:y,row:M,col:A,pageIndex:w,width:T,height:P,x:C,y:R}})},n.prototype.getFlexLayout=function(){var e=this.attributes,r=e.width,i=e.height,a=e.rowPadding,o=e.colPadding,s=U(this.navigatorShape,1),l=s[0],c=U(this.grid,2),u=c[0],f=c[1],d=U([r-l,i],2),h=d[0],p=d[1],g=U([0,0,0,0,0,0,0,0],8),y=g[0],m=g[1],x=g[2],_=g[3],w=g[4],O=g[5],S=g[6],E=g[7];return this.pageViews.children.map(function(M,A){var T,P,N,C,R=M.getBBox(),D=R.width,F=R.height,j=S===0?0:o,I=S+j+D;if(I<=h&&Wk(w,function(z){return z<f}))return T=U([S+j,E,I],3),y=T[0],m=T[1],S=T[2],{width:D,height:F,x:y,y:m,page:x,index:A,pageIndex:_++,row:O,col:w++};P=U([O+1,0,0,E+F+a],4),O=P[0],w=P[1],S=P[2],E=P[3];var $=E+F;return $<=p&&Wk(O,function(z){return z<u})?(N=U([S,E,D],3),y=N[0],m=N[1],S=N[2],{width:D,height:F,x:y,y:m,page:x,index:A,pageIndex:_++,row:O,col:w++}):(C=U([0,0,D,0,x+1,0,0,0],8),y=C[0],m=C[1],S=C[2],E=C[3],x=C[4],_=C[5],O=C[6],w=C[7],{width:D,height:F,x:y,y:m,page:x,index:A,pageIndex:_++,row:O,col:w++})})},Object.defineProperty(n.prototype,"itemsLayout",{get:function(){this.navigatorShape=[0,0];var e=this.attributes.layout==="grid"?this.getGridLayout:this.getFlexLayout,r=e.call(this);return r.slice(-1)[0].page>0?(this.navigatorShape=[55,0],e.call(this)):r},enumerable:!1,configurable:!0}),n.prototype.ifHorizontal=function(e,r){var i=this.attributes.orientation;return va(i,e,r)},n.prototype.flattenPage=function(e){e.querySelectorAll(_s.item.class).forEach(function(r){e.appendChild(r)}),e.querySelectorAll(_s.page.class).forEach(function(r){var i=e.removeChild(r);i.destroy()})},n.prototype.renderItems=function(e){var r=this.attributes,i=r.click,a=r.mouseenter,o=r.mouseleave,s=r.classNamePrefix;this.flattenPage(e);var l=this.dispatchCustomEvent.bind(this),c=Sn(_s.item.name,En.item,s);Ht(e).selectAll(_s.item.class).data(this.renderData,function(u){return u.id}).join(function(u){return u.append(function(f){var d=f.style,h=Bn(f,["style"]);return new knt({style:d},h)}).attr("className",c).on("click",function(){i==null||i(this),l("itemClick",{item:this})}).on("pointerenter",function(){a==null||a(this),l("itemMouseenter",{item:this})}).on("pointerleave",function(){o==null||o(this),l("itemMouseleave",{item:this})})},function(u){return u.each(function(f){var d=f.style;this.update(d)})},function(u){return u.remove()})},n.prototype.relayoutNavigator=function(){var e,r=this.attributes,i=r.layout,a=r.width,o=((e=this.pageViews.children[0])===null||e===void 0?void 0:e.getBBox().height)||0,s=U(this.navigatorShape,2),l=s[0],c=s[1];this.navigator.update(i==="grid"?{pageWidth:a-l,pageHeight:o-c}:{})},n.prototype.adjustLayout=function(){var e=this,r=Object.entries(AJ(this.itemsLayout,"page")).map(function(a){var o=U(a,2),s=o[0],l=o[1];return{page:s,layouts:l}}),i=Lt([],U(this.navigator.getContainer().children),!1);r.forEach(function(a){var o=a.layouts,s=e.pageViews.appendChild(new Qn({className:_s.page.name}));o.forEach(function(l){var c=l.x,u=l.y,f=l.index,d=l.width,h=l.height,p=i[f];s.appendChild(p),Hv(p,"__layout__",l),p.update({x:c,y:u,width:d,height:h})})}),this.relayoutNavigator()},n.prototype.renderNavigator=function(e){var r=this.attributes,i=r.orientation,a=r.classNamePrefix,o=ie(this.attributes,"nav"),s=Vi({orientation:i,classNamePrefix:a},o),l=this;return e.selectAll(_s.navigator.class).data(["nav"]).join(function(c){return c.append(function(){return new gnt({style:s})}).attr("className",_s.navigator.name).each(function(){l.navigator=this})},function(c){return c.each(function(){this.update(s)})},function(c){return c.remove()}),this.navigator},n.prototype.getBBox=function(){return this.navigator.getBBox()},n.prototype.render=function(e,r){var i=this.attributes.data;if(!(!i||i.length===0)){var a=this.renderNavigator(Ht(r));this.renderItems(a.getContainer()),this.adjustLayout()}},n.prototype.dispatchCustomEvent=function(e,r){var i=new ze(e,{detail:r});this.dispatchEvent(i)},n})(Jn),Ant=(function(t){ln(n,t);function n(){return t!==null&&t.apply(this,arguments)||this}return n.prototype.update=function(e){this.attr(e)},n})(el),Gk=(function(t){ln(n,t);function n(e){return t.call(this,e,unt)||this}return n.prototype.renderTitle=function(e,r,i){var a=this.attributes,o=a.showTitle,s=a.titleText,l=a.classNamePrefix,c=ie(this.attributes,"title"),u=U(no(c),2),f=u[0],d=u[1];this.titleGroup=e.maybeAppendByClassName(jn.titleGroup,"g").styles(d);var h=ut(ut({width:r,height:i},f),{text:o?s:"",classNamePrefix:l});this.title=this.titleGroup.maybeAppendByClassName(jn.title,function(){return new mN({style:h})}).update(h)},n.prototype.renderCustom=function(e){var r=this.attributes.data,i={innerHTML:this.attributes.render(r),pointerEvents:"auto"};e.maybeAppendByClassName(jn.html,function(){return new Ant({className:jn.html.name,style:i})}).update(i)},n.prototype.renderItems=function(e,r){var i=r.x,a=r.y,o=r.width,s=r.height,l=ie(this.attributes,"title",!0),c=U(no(l),2),u=c[0],f=c[1],d=ut(ut({},u),{width:o,height:s,x:0,y:0});this.itemsGroup=e.maybeAppendByClassName(jn.itemsGroup,"g").styles(ut(ut({},f),{transform:"translate(".concat(i,", ").concat(a,")")}));var h=this;this.itemsGroup.selectAll(jn.items.class).data(["items"]).join(function(p){return p.append(function(){return new Mnt({style:d})}).attr("className",jn.items.name).each(function(){h.items=Ht(this)})},function(p){return p.update(d)},function(p){return p.remove()})},n.prototype.adjustLayout=function(){var e=this.attributes.showTitle;if(e){var r=this.title.node().getAvailableSpace(),i=r.x,a=r.y;this.itemsGroup.node().style.transform="translate(".concat(i,", ").concat(a,")")}},Object.defineProperty(n.prototype,"availableSpace",{get:function(){var e=this.attributes,r=e.showTitle,i=e.width,a=e.height;return r?this.title.node().getAvailableSpace():new fn(0,0,i,a)},enumerable:!1,configurable:!0}),n.prototype.getBBox=function(){var e,r,i=(e=this.title)===null||e===void 0?void 0:e.node(),a=(r=this.items)===null||r===void 0?void 0:r.node();return!i||!a?t.prototype.getBBox.call(this):hnt(i,a)},n.prototype.render=function(e,r){var i=this.attributes,a=i.width,o=i.height,s=i.x,l=s===void 0?0:s,c=i.y,u=c===void 0?0:c,f=i.classNamePrefix,d=i.render,h=Ht(r),p=r.className||"legend-category";f?r.attr("className","".concat(p," ").concat(f,"legend")):r.className||r.attr("className","legend-category"),r.style.transform="translate(".concat(l,", ").concat(u,")"),d?this.renderCustom(h):(this.renderTitle(h,a,o),this.renderItems(h,this.availableSpace),this.adjustLayout())},n})(Jn),Tnt={backgroundFill:"#262626",backgroundLineCap:"round",backgroundLineWidth:1,backgroundStroke:"#333",backgroundZIndex:-1,formatter:function(t){return t.toString()},labelFill:"#fff",labelFontSize:12,labelTextBaseline:"middle",padding:[2,4],position:"right",radius:0,zIndex:999},Zy=Ci({background:"background",labelGroup:"label-group",label:"label"},"indicator"),Pnt=(function(t){ln(n,t);function n(e){var r=t.call(this,e,Tnt)||this;return r.point=[0,0],r.group=r.appendChild(new Qn({})),r.isMutationObserved=!0,r}return n.prototype.renderBackground=function(){if(this.label){var e=this.attributes,r=e.position,i=e.padding,a=U(cr(i),4),o=a[0],s=a[1],l=a[2],c=a[3],u=this.label.node().getLocalBounds(),f=u.min,d=u.max,h=new fn(f[0]-c,f[1]-o,d[0]+s-f[0]+c,d[1]+l-f[1]+o),p=this.getPath(r,h),g=ie(this.attributes,"background");this.background=Ht(this.group).maybeAppendByClassName(Zy.background,"path").styles(ut(ut({},g),{d:p})),this.group.appendChild(this.label.node())}},n.prototype.renderLabel=function(){var e=this.attributes,r=e.formatter,i=e.labelText,a=ie(this.attributes,"label"),o=U(no(a),2),s=o[0],l=o[1];s.text;var c=Bn(s,["text"]);if(this.label=Ht(this.group).maybeAppendByClassName(Zy.labelGroup,"g").styles(l),!!i){var u=this.label.maybeAppendByClassName(Zy.label,function(){return Hs(r(i))}).style("text",r(i).toString());u.selectAll("text").styles(c)}},n.prototype.adjustLayout=function(){var e=U(this.point,2),r=e[0],i=e[1],a=this.attributes,o=a.x,s=a.y;this.group.attr("transform","translate(".concat(o-r,", ").concat(s-i,")"))},n.prototype.getPath=function(e,r){var i=this.attributes.radius,a=r.x,o=r.y,s=r.width,l=r.height,c=[["M",a+i,o],["L",a+s-i,o],["A",i,i,0,0,1,a+s,o+i],["L",a+s,o+l-i],["A",i,i,0,0,1,a+s-i,o+l],["L",a+i,o+l],["A",i,i,0,0,1,a,o+l-i],["L",a,o+i],["A",i,i,0,0,1,a+i,o],["Z"]],u={top:4,right:6,bottom:0,left:2},f=u[e],d=this.createCorner([c[f].slice(-2),c[f+1].slice(-2)]);return c.splice.apply(c,Lt([f+1,1],U(d),!1)),c[0][0]="M",c},n.prototype.createCorner=function(e,r){r===void 0&&(r=10);var i=.8,a=UJ.apply(void 0,Lt([],U(e),!1)),o=U(e,2),s=U(o[0],2),l=s[0],c=s[1],u=U(o[1],2),f=u[0],d=u[1],h=U(a?[f-l,[l,f]]:[d-c,[c,d]],2),p=h[0],g=U(h[1],2),y=g[0],m=g[1],x=p/2,_=p/Math.abs(p),w=r*_,O=w/2,S=w*Math.sqrt(3)/2*i,E=U([y,y+x-O,y+x,y+x+O,m],5),M=E[0],A=E[1],T=E[2],P=E[3],N=E[4];return a?(this.point=[T,c-S],[["L",M,c],["L",A,c],["L",T,c-S],["L",P,c],["L",N,c]]):(this.point=[l+S,T],[["L",l,M],["L",l,A],["L",l+S,T],["L",l,P],["L",l,N]])},n.prototype.applyVisibility=function(){var e=this.attributes.visibility;e==="hidden"?Qo(this):Zf(this)},n.prototype.bindEvents=function(){this.label.on(re.BOUNDS_CHANGED,this.renderBackground)},n.prototype.render=function(){this.renderLabel(),this.renderBackground(),this.adjustLayout(),this.applyVisibility()},n})(Jn);function Cnt(t,n){for(var e=1;e<t.length;e+=1){var r=t[e-1],i=t[e];if(n>=r&&n<=i)return[r,i]}return[n,n]}function Lnt(t,n,e){var r=Array.from(n),i=t.length;return new Array(i).fill(0).reduce(function(a,o,s){var l=r[s%r.length];return a+=" ".concat(t[s],":").concat(l).concat(s<i-1?" ".concat(t[s+1],":").concat(l):"")},"l(".concat(e==="horizontal"?"0":"270",")"))}function Yk(t,n){var e=U(Cnt(t,n),2),r=e[0],i=e[1];return{tick:n>(r+i)/2?i:r,range:[r,i]}}var Is=Ci({trackGroup:"background-group",track:"background",selectionGroup:"ribbon-group",selection:"ribbon",clipPath:"clip-path"},"ribbon");function bN(t){var n=t.orientation,e=t.size,r=t.length;return va(n,[r,e],[e,r])}function xN(t){var n=t.type,e=U(bN(t),2),r=e[0],i=e[1];return n==="size"?[["M",0,i],["L",0+r,0],["L",0+r,i],["Z"]]:[["M",0,i],["L",0,0],["L",0+r,0],["L",0+r,i],["Z"]]}function Nnt(t){return xN(t)}function Rnt(t){var n=t.orientation,e=t.color,r=t.block,i=t.partition,a;if(Xn(e)){var o=20;a=new Array(o).fill(0).map(function(c,u,f){return e(u/(f.length-1))})}else a=e;var s=a.length,l=a.map(function(c){return $o(c).toString()});return s?s===1?l[0]:r?Lnt(i,l,n):l.reduce(function(c,u,f){return c+=" ".concat(f/(s-1),":").concat(u)},"l(".concat(va(n,"0","270"),")")):""}function Int(t){var n=t.orientation,e=t.range;if(!e)return[];var r=U(bN(t),2),i=r[0],a=r[1],o=U(e,2),s=o[0],l=o[1],c=va(n,s*i,0),u=va(n,0,s*a),f=va(n,l*i,i),d=va(n,a,l*a);return[["M",c,u],["L",c,d],["L",f,d],["L",f,u],["Z"]]}function Dnt(t,n){var e=ie(n,"track"),r=n.classNamePrefix,i=Sn(Is.track.name,En.track,r);t.maybeAppendByClassName(Is.track,"path").attr("className",i).styles(ut({d:xN(n)},e))}function $nt(t,n){var e=ie(n,"selection"),r=Rnt(n),i=n.classNamePrefix,a=Sn(Is.selection.name,En.selection,i),o=t.maybeAppendByClassName(Is.selection,"path").attr("className",a).styles(ut({d:Nnt(n),fill:r},e)),s=o.maybeAppendByClassName(Is.clipPath,"path").styles({d:Int(n)}).node();o.style("clipPath",s)}var jnt=(function(t){ln(n,t);function n(e){return t.call(this,e,{type:"color",orientation:"horizontal",size:30,range:[0,1],length:200,block:!1,partition:[],color:["#fff","#000"],trackFill:"#e5e5e5"})||this}return n.prototype.render=function(e,r){var i=Ht(r).maybeAppendByClassName(Is.trackGroup,"g");Dnt(i,e);var a=Ht(r).maybeAppendByClassName(Is.selectionGroup,"g");$nt(a,e)},n})(Jn);function Fnt(t){return{min:Math.min.apply(Math,Lt([],U(t.map(function(n){return n.value})),!1)),max:Math.max.apply(Math,Lt([],U(t.map(function(n){return n.value})),!1))}}var Bnt=(function(t){ln(n,t);function n(e){var r=t.call(this,e,fnt)||this;return r.eventToOffsetScale=new nr({}),r.innerRibbonScale=new nr({}),r.cacheLabelBBox=null,r.cacheHandleBBox=null,r.onHovering=function(i){var a=r.attributes,o=a.data,s=a.block;i.stopPropagation();var l=r.getValueByCanvasPoint(i);if(s){var c=Yk(o.map(function(d){var h=d.value;return h}),l).range,u=r.getRealSelection(c);r.showIndicator((c[0]+c[1])/2,"".concat(u[0],"-").concat(u[1])),r.dispatchIndicated(l,c)}else{var f=r.getTickValue(l);r.showIndicator(f,"".concat(r.getRealValue(f))),r.dispatchIndicated(f)}},r.onDragStart=function(i){return function(a){a.stopPropagation(),r.attributes.slidable&&(r.target=i,r.prevValue=r.getTickValue(r.getValueByCanvasPoint(a)),document.addEventListener("mousemove",r.onDragging),document.addEventListener("touchmove",r.onDragging),document.addEventListener("mouseleave",r.onDragEnd),document.addEventListener("mouseup",r.onDragEnd),document.addEventListener("mouseup",r.onDragEnd),document.addEventListener("touchend",r.onDragEnd))}},r.onDragging=function(i){var a=r.target;r.updateMouse();var o=U(r.selection,2),s=o[0],l=o[1],c=r.getTickValue(r.getValueByCanvasPoint(i)),u=c-r.prevValue;a==="start"?s!==c&&r.updateSelection(c,l):a==="end"?l!==c&&r.updateSelection(s,c):a==="ribbon"&&u!==0&&(r.prevValue=c,r.updateSelection(u,u,!0))},r.onDragEnd=function(){r.style.cursor="pointer",document.removeEventListener("mousemove",r.onDragging),document.removeEventListener("touchmove",r.onDragging),document.removeEventListener("mouseup",r.onDragEnd),document.removeEventListener("touchend",r.onDragEnd)},r}return Object.defineProperty(n.prototype,"handleOffsetRatio",{get:function(){return this.ifHorizontal(.5,.5)},enumerable:!1,configurable:!0}),n.prototype.getBBox=function(){var e=this.attributes,r=e.width,i=e.height;return new fn(0,0,r,i)},n.prototype.render=function(e,r){var i=this,a=e.classNamePrefix,o=r.className||"legend-continuous";a?r.attr("className","".concat(o," ").concat(a,"legend")):r.className||r.attr("className","legend-continuous");var s=e.showLabel;this.renderTitle(Ht(r));var l=this.availableSpace,c=l.x,u=l.y,f=Ht(r).maybeAppendByClassName(jn.contentGroup,"g").styles({transform:"translate(".concat(c,", ").concat(u,")")}),d=f.maybeAppendByClassName(jn.labelGroup,"g").styles({zIndex:1});Pr(!!s,d,function(p){i.renderLabel(p)});var h=f.maybeAppendByClassName(jn.ribbonGroup,"g").styles({zIndex:0});this.handlesGroup=f.maybeAppendByClassName(jn.handlesGroup,"g").styles({zIndex:2}),this.renderHandles(),this.renderRibbon(h),this.renderIndicator(f),this.adjustLabel(),this.adjustHandles()},Object.defineProperty(n.prototype,"range",{get:function(){var e=this.attributes,r=e.data,i=e.domain;return i?{min:i[0],max:i[1]}:Fnt(r)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"ribbonScale",{get:function(){var e=this.range,r=e.min,i=e.max;return this.innerRibbonScale.update({domain:[r,i],range:[0,1]}),this.innerRibbonScale},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"ribbonRange",{get:function(){var e=U(this.selection,2),r=e[0],i=e[1],a=this.ribbonScale;return[a.map(r),a.map(i)]},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"selection",{get:function(){var e=this.range,r=e.min,i=e.max,a=this.attributes.defaultValue,o=a===void 0?[r,i]:a,s=U(o,2),l=s[0],c=s[1];return[l,c]},enumerable:!1,configurable:!0}),n.prototype.ifHorizontal=function(e,r){return va(this.attributes.orientation,typeof e=="function"?e():e,typeof r=="function"?r():r)},n.prototype.renderTitle=function(e){var r=this.attributes,i=r.showTitle,a=r.titleText,o=r.width,s=r.height,l=r.classNamePrefix,c=ie(this.attributes,"title"),u=ut(ut({},c),{width:o,height:s,text:a,classNamePrefix:l}),f=this;e.selectAll(jn.title.class).data(i?[a]:[]).join(function(d){return d.append(function(){return new mN({style:u})}).attr("className",jn.title.name).each(function(){f.title=this})},function(d){return d.update(u)},function(d){return d.each(function(){f.title=void 0}).remove()})},Object.defineProperty(n.prototype,"availableSpace",{get:function(){if(this.title)return this.title.getAvailableSpace();var e=this.attributes,r=e.width,i=e.height;return new fn(0,0,r,i)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"labelFixedSpacing",{get:function(){var e=this.attributes.showTick;return e?5:0},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"labelPosition",{get:function(){var e=this.attributes,r=e.orientation,i=e.labelDirection,a={vertical:{positive:"right",negative:"left"},horizontal:{positive:"bottom",negative:"top"}};return a[r][i]},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"labelBBox",{get:function(){var e,r=this.attributes.showLabel;if(!r)return new fn(0,0,0,0);if(this.cacheLabelBBox)return this.cacheLabelBBox;var i=((e=this.label.querySelector(Yt.labelGroup.class))===null||e===void 0?void 0:e.children.slice(-1)[0]).getBBox(),a=i.width,o=i.height;return this.cacheLabelBBox=new fn(0,0,a,o),this.cacheLabelBBox},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"labelShape",{get:function(){var e=this.attributes,r=e.showLabel,i=e.labelSpacing,a=i===void 0?0:i;if(!r)return{width:0,height:0,size:0,length:0};var o=this.labelBBox,s=o.width,l=o.height,c=this.ifHorizontal(l,s)+a+this.labelFixedSpacing,u=this.ifHorizontal(s,l);return{width:s,height:l,size:c,length:u}},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"ribbonBBox",{get:function(){var e=this.attributes,r=e.showHandle,i=e.ribbonSize,a=this.availableSpace,o=a.width,s=a.height,l=this.labelShape,c=l.size,u=l.length,f=U(this.ifHorizontal([s,o],[o,s]),2),d=f[0],h=f[1],p=r?this.handleShape:{size:0,length:0},g=p.size,y=p.length,m=this.handleOffsetRatio,x=0,_=this.labelPosition;i?x=i:["bottom","right"].includes(_)?x=Math.min(d-c,(d-g)/m):d*(1-m)>g?x=Math.max(d-c,0):x=Math.max((d-c-g)/m,0);var w=Math.max(y,u),O=h-w,S=U(this.ifHorizontal([O,x],[x,O]),2),E=S[0],M=S[1],A=["top","left"].includes(_)?c:0,T=U(this.ifHorizontal([w/2,A],[A,w/2]),2),P=T[0],N=T[1];return new fn(P,N,E,M)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"ribbonShape",{get:function(){var e=this.ribbonBBox,r=e.width,i=e.height;return this.ifHorizontal({size:i,length:r},{size:r,length:i})},enumerable:!1,configurable:!0}),n.prototype.renderRibbon=function(e){var r=this.attributes,i=r.data,a=r.type,o=r.orientation,s=r.color,l=r.block,c=r.classNamePrefix,u=ie(this.attributes,"ribbon"),f=this.range,d=f.min,h=f.max,p=this.ribbonBBox,g=p.x,y=p.y,m=this.ribbonShape,x=m.length,_=m.size,w=Vi({transform:"translate(".concat(g,", ").concat(y,")"),length:x,size:_,type:a,orientation:o,color:s,block:l,partition:i.map(function(S){return(S.value-d)/(h-d)}),range:this.ribbonRange,classNamePrefix:c},u),O=Sn(jn.ribbon.name,En.ribbon,c);this.ribbon=e.maybeAppendByClassName(jn.ribbon,function(){return new jnt({style:w,className:O})}).update(w)},n.prototype.getHandleClassName=function(e){return"".concat(jn.prefix("".concat(e,"-handle")))},n.prototype.renderHandles=function(){var e=this.attributes,r=e.showHandle,i=e.orientation,a=e.classNamePrefix,o=ie(this.attributes,"handle"),s=U(this.selection,2),l=s[0],c=s[1],u=ut(ut({},o),{orientation:i,classNamePrefix:a}),f=o.shape,d=f===void 0?"slider":f,h=d==="basic"?cnt:rN,p=this,g=Sn(jn.handle.name,En.handle,a);this.handlesGroup.selectAll(jn.handle.class).data(r?[{value:l,type:"start"},{value:c,type:"end"}]:[],function(y){return y.type}).join(function(y){return y.append(function(){return new h({style:u,className:g})}).attr("className",function(m){var x=m.type;return"".concat(g," ").concat(p.getHandleClassName(x))}).each(function(m){var x=m.type,_=m.value;this.update({labelText:_});var w="".concat(x,"Handle");p[w]=this,this.addEventListener("pointerdown",p.onDragStart(x))})},function(y){return y.update(u).each(function(m){var x=m.value;this.update({labelText:x})})},function(y){return y.each(function(m){var x=m.type,_="".concat(x,"Handle");p[_]=void 0}).remove()})},n.prototype.adjustHandles=function(){var e=U(this.selection,2),r=e[0],i=e[1];this.setHandlePosition("start",r),this.setHandlePosition("end",i);var a=this.attributes,o=a.classNamePrefix,s=a.showHandle,l=ie(this.attributes,"handle").shape,c=l===void 0?"slider":l;s&&c==="slider"&&o&&(this.startHandle&&this.updateSliderHandleClassNames(this.startHandle,o),this.endHandle&&this.updateSliderHandleClassNames(this.endHandle,o))},n.prototype.updateSliderHandleClassNames=function(e,r){var i=e.container||e,a=i.querySelector(".handle-icon-rect");if(a){var o=Sn("handle-icon-rect",En.handleMarker,r);a.setAttribute("class",o);var s=a.querySelectorAll("line");s.forEach(function(u){var f=u.getAttribute("class")||"",d=f.split(" ")[0],h=Sn(d,En.handleMarker,r);u.setAttribute("class",h)})}var l=i.querySelector(".handle-label");if(l){var c=Sn("handle-label",En.handleLabel,r);l.setAttribute("class",c)}},Object.defineProperty(n.prototype,"handleBBox",{get:function(){if(this.cacheHandleBBox)return this.cacheHandleBBox;if(!this.attributes.showHandle)return new fn(0,0,0,0);var e=this.startHandle.getBBox(),r=e.width,i=e.height,a=this.endHandle.getBBox(),o=a.width,s=a.height,l=U([Math.max(r,o),Math.max(i,s)],2),c=l[0],u=l[1];return this.cacheHandleBBox=new fn(0,0,c,u),this.cacheHandleBBox},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"handleShape",{get:function(){var e=this.handleBBox,r=e.width,i=e.height,a=U(this.ifHorizontal([i,r],[r,i]),2),o=a[0],s=a[1];return{width:r,height:i,size:o,length:s}},enumerable:!1,configurable:!0}),n.prototype.setHandlePosition=function(e,r){var i=this.attributes.handleFormatter,a=this.ribbonBBox,o=a.x,s=a.y,l=this.ribbonShape.size,c=this.getOffset(r),u=U(this.ifHorizontal([o+c,s+l*this.handleOffsetRatio],[o+l*this.handleOffsetRatio,s+c]),2),f=u[0],d=u[1],h=this.handlesGroup.select(".".concat(this.getHandleClassName(e))).node();h==null||h.update({transform:"translate(".concat(f,", ").concat(d,")"),formatter:i})},n.prototype.renderIndicator=function(e){var r=this.attributes.classNamePrefix,i=ie(this.attributes,"indicator"),a=Sn(jn.indicator.name,En.indicator,r);this.indicator=e.maybeAppendByClassName(jn.indicator,function(){return new Pnt({style:i,className:a})}).update(i)},Object.defineProperty(n.prototype,"labelData",{get:function(){var e=this,r=this.attributes.data;return r.reduce(function(i,a,o,s){var l,c,u=(l=a==null?void 0:a.id)!==null&&l!==void 0?l:o.toString();if(i.push(ut(ut({},a),{id:u,index:o,type:"value",label:(c=a==null?void 0:a.label)!==null&&c!==void 0?c:a.value.toString(),value:e.ribbonScale.map(a.value)})),o<s.length-1){var f=s[o+1],d=U([a.value,f.value],2),h=d[0],p=d[1],g=(h+p)/2;i.push(ut(ut({},a),{id:u,index:o,type:"range",range:[h,p],label:[h,p].join("~"),value:e.ribbonScale.map(g)}))}return i},[])},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"labelStyle",{get:function(){var e=U(["center","middle"],2),r=e[0],i=e[1],a=this.labelPosition;return a==="top"?i="bottom":a==="bottom"?i="top":a==="left"?r="end":a==="right"&&(r="start"),{labelTextAlign:r,labelTextBaseline:i}},enumerable:!1,configurable:!0}),n.prototype.renderLabel=function(e){var r=this.attributes,i=r.showTick,a=i===void 0?!1:i,o=r.labelFilter,s=r.labelFormatter,l=ie(this.attributes,"tick"),c=ie(this.attributes,"label"),u=c.align,f=Vi(ut({showLine:!1,showGrid:!1,showTick:a,type:"linear",startPos:[0,0],endPos:[0,0],tickDirection:"negative",labelTransform:"rotate(0)"},this.labelStyle),sa(l,"tick"),sa(c,"label"),{data:this.labelData}),d={tickFilter:function(p,g,y){return(p==null?void 0:p.type)!=="value"?!1:o?o(p,p.index,y.filter(function(m){return m.type!=="value"})):!0},labelFilter:function(p,g,y){return(p==null?void 0:p.type)!==u?!1:o?o(p,p.index,y.filter(function(m){return m.type===u})):!0},labelFormatter:s},h=ut(ut(ut({},f),d),{labelOverlap:[{type:"hide"}]});this.label=e.maybeAppendByClassName(jn.label,function(){return new b2({style:h})}).node(),this.label.update(h,!1)},Object.defineProperty(n.prototype,"labelAxisStyle",{get:function(){var e=this.attributes,r=e.showTick,i=e.labelDirection,a=e.labelSpacing,o=e.tickLength,s=this.ribbonShape.size,l=this.labelPosition,c=this.labelFixedSpacing,u=U([0,0,0],3),f=u[0],d=u[1],h=u[2],p=o??s;return r?(h=p,d=c,i==="positive"?l==="right"?(f=p,h=p):l==="bottom"&&(f=h):i==="negative"&&(l==="top"||l==="left")&&(f=s)):i==="positive"?l==="right"?d=p:l==="bottom"&&(f=s+c,d=a):i==="negative"&&(l==="left"||l==="top")&&(d=a),{offset:f,spacing:d,tickLength:h}},enumerable:!1,configurable:!0}),n.prototype.adjustLabel=function(){var e=this.attributes.showLabel;if(e){var r=this.ribbonBBox,i=r.x,a=r.y,o=r.width,s=r.height,l=this.labelAxisStyle,c=l.offset,u=l.spacing,f=l.tickLength,d=U(this.ifHorizontal([[i,a+c],[i+o,a+c]],[[i+c,a+s],[i+c,a]]),2),h=d[0],p=d[1];this.label.update({startPos:h,endPos:p,tickLength:f,labelSpacing:u},!1)}},n.prototype.bindEvents=function(){this.style.cursor="pointer",this.ribbon.on("pointerdown",this.onDragStart("ribbon")),this.ribbon.on("pointermove",this.onHovering),this.addEventListener("pointerout",this.hideIndicator)},n.prototype.showIndicator=function(e,r){r===void 0&&(r="".concat(e));var i=this.attributes.showIndicator;if(!i||typeof e!="number"){this.hideIndicator();return}var a=this.range,o=a.min,s=a.max,l=this.ribbonBBox,c=l.x,u=l.y,f=kn(e,o,s),d=this.getOffset(f),h=this.ifHorizontal([d+c,u],[c,d+u]);this.indicator.update({x:h[0],y:h[1],position:this.ifHorizontal("top","left"),labelText:r}),Zf(this.indicator.node())},n.prototype.hideIndicator=function(){Qo(this.indicator.node())},n.prototype.updateMouse=function(){this.attributes.slidable&&(this.style.cursor="grabbing")},n.prototype.setSelection=function(e,r){this.updateSelection(e,r)},n.prototype.updateSelection=function(e,r,i){var a;i===void 0&&(i=!1);var o=U(this.selection,2),s=o[0],l=o[1],c=U([e,r],2),u=c[0],f=c[1];i&&(u+=s,f+=l);var d=this.range,h=d.min,p=d.max;a=U(lnt([h,p],[u,f],this.selection),2),u=a[0],f=a[1],this.update({defaultValue:[u,f]}),this.dispatchSelection()},Object.defineProperty(n.prototype,"step",{get:function(){var e=this.attributes.step,r=e===void 0?1:e,i=this.range,a=i.min,o=i.max;return Be(r)?T1((o-a)*dnt,0):r},enumerable:!1,configurable:!0}),n.prototype.getTickValue=function(e){var r=this.attributes,i=r.data,a=r.block,o=this.range.min;return a?Yk(i.map(function(s){var l=s.value;return l}),e).tick:int(e,this.step,o)},n.prototype.getValueByCanvasPoint=function(e){var r=this.range,i=r.min,a=r.max,o=U(this.ribbon.node().getPosition(),2),s=o[0],l=o[1],c=this.ifHorizontal(s,l),u=this.ifHorizontal.apply(this,Lt([],U(BL(e)),!1)),f=u-c,d=kn(this.getOffset(f,!0),i,a);return d},n.prototype.getOffset=function(e,r){r===void 0&&(r=!1);var i=this.range,a=i.min,o=i.max,s=this.ribbonShape.length,l=this.eventToOffsetScale;return l.update({domain:[a,o],range:[0,s]}),r?l.invert(e):l.map(e)},n.prototype.getRealSelection=function(e){var r=this.range.max,i=U(e,2),a=i[0],o=i[1];return this.ifHorizontal([a,o],[r-o,r-a])},n.prototype.getRealValue=function(e){var r=this.range.max;return this.ifHorizontal(e,r-e)},n.prototype.dispatchSelection=function(){var e=this.getRealSelection(this.selection),r=new ze("valuechange",{detail:{value:e}});this.dispatchEvent(r)},n.prototype.dispatchIndicated=function(e,r){var i=this,a=this.range.max,o=this.ifHorizontal(function(){return{value:e,range:r}},function(){return{value:a-e,range:r?i.getRealSelection(r):void 0}}),s=new ze("indicate",{detail:o});this.dispatchEvent(s)},n})(Jn);function D1(t){return t===void 0&&(t=""),{CONTAINER:"".concat(t,"tooltip"),TITLE:"".concat(t,"tooltip-title"),LIST:"".concat(t,"tooltip-list"),LIST_ITEM:"".concat(t,"tooltip-list-item"),NAME:"".concat(t,"tooltip-list-item-name"),MARKER:"".concat(t,"tooltip-list-item-marker"),NAME_LABEL:"".concat(t,"tooltip-list-item-name-label"),VALUE:"".concat(t,"tooltip-list-item-value"),CROSSHAIR_X:"".concat(t,"tooltip-crosshair-x"),CROSSHAIR_Y:"".concat(t,"tooltip-crosshair-y")}}var Hk={overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"};function znt(t){var n;t===void 0&&(t="");var e=D1(t);return n={},n[".".concat(e.CONTAINER)]={position:"absolute",visibility:"visible","z-index":8,transition:"visibility 0.2s cubic-bezier(0.23, 1, 0.32, 1), left 0.4s cubic-bezier(0.23, 1, 0.32, 1), top 0.4s cubic-bezier(0.23, 1, 0.32, 1)","background-color":"rgba(255, 255, 255, 0.96)","box-shadow":"0 6px 12px 0 rgba(0, 0, 0, 0.12)","border-radius":"4px",color:"rgba(0, 0, 0, 0.65)","font-size":"12px","line-height":"20px",padding:"12px","min-width":"120px","max-width":"360px","font-family":"Roboto-Regular"},n[".".concat(e.TITLE)]={color:"rgba(0, 0, 0, 0.45)"},n[".".concat(e.LIST)]={margin:"0px","list-style-type":"none",padding:"0px"},n[".".concat(e.LIST_ITEM)]={"list-style-type":"none",display:"flex","line-height":"2em","align-items":"center","justify-content":"space-between","white-space":"nowrap"},n[".".concat(e.MARKER)]={width:"8px",height:"8px","border-radius":"50%",display:"inline-block","margin-right":"4px"},n[".".concat(e.NAME)]={display:"flex","align-items":"center","max-width":"216px"},n[".".concat(e.NAME_LABEL)]=ut({flex:1},Hk),n[".".concat(e.VALUE)]=ut({display:"inline-block",float:"right",flex:1,"text-align":"right","min-width":"28px","margin-left":"30px",color:"rgba(0, 0, 0, 0.85)"},Hk),n[".".concat(e.CROSSHAIR_X)]={position:"absolute",width:"1px","background-color":"rgba(0, 0, 0, 0.25)"},n[".".concat(e.CROSSHAIR_Y)]={position:"absolute",height:"1px","background-color":"rgba(0, 0, 0, 0.25)"},n}var Wnt=(function(t){ln(n,t);function n(e){var r=this,i,a,o=(a=(i=e.style)===null||i===void 0?void 0:i.template)===null||a===void 0?void 0:a.prefixCls,s=D1(o);return r=t.call(this,e,{data:[],x:0,y:0,visibility:"visible",title:"",position:"bottom-right",offset:[5,5],enterable:!1,container:{x:0,y:0},bounding:null,template:{prefixCls:"",container:'<div class="'.concat(s.CONTAINER,'"></div>'),title:'<div class="'.concat(s.TITLE,'"></div>'),item:'<li class="'.concat(s.LIST_ITEM,`" data-index={index}>
72
+ <span class="`).concat(s.NAME,`">
73
+ <span class="`).concat(s.MARKER,`" style="background:{color}"></span>
74
+ <span class="`).concat(s.NAME_LABEL,`" title="{name}">{name}</span>
75
+ </span>
76
+ <span class="`).concat(s.VALUE,`" title="{value}">{value}</span>
77
+ </li>`)},style:znt(o)})||this,r.timestamp=-1,r.prevCustomContentKey=r.attributes.contentKey,r.initShape(),r.render(r.attributes,r),r}return Object.defineProperty(n.prototype,"HTMLTooltipElement",{get:function(){return this.element},enumerable:!1,configurable:!0}),n.prototype.getContainer=function(){return this.element},Object.defineProperty(n.prototype,"elementSize",{get:function(){var e=this.element.offsetWidth,r=this.element.offsetHeight;return{width:e,height:r}},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"HTMLTooltipItemsElements",{get:function(){var e=this.attributes,r=e.data,i=e.template;return r.map(function(a,o){var s=a.name,l=s===void 0?"":s,c=a.color,u=c===void 0?"black":c,f=a.index,d=Bn(a,["name","color","index"]),h=ut({name:l,color:u,index:f??o},d);return HS(LG(i.item,h))})},enumerable:!1,configurable:!0}),n.prototype.render=function(e,r){this.renderHTMLTooltipElement(),this.updatePosition()},n.prototype.destroy=function(){var e;(e=this.element)===null||e===void 0||e.remove(),t.prototype.destroy.call(this)},n.prototype.show=function(e,r){var i=this;if(e!==void 0&&r!==void 0){var a=this.element.style.visibility==="hidden",o=function(){i.attributes.x=e??i.attributes.x,i.attributes.y=r??i.attributes.y,i.updatePosition()};a?this.closeTransition(o):o()}this.element.style.visibility="visible"},n.prototype.hide=function(e,r){e===void 0&&(e=0),r===void 0&&(r=0);var i=this.attributes.enterable;i&&this.isCursorEntered(e,r)||(this.element.style.visibility="hidden")},n.prototype.initShape=function(){var e=this.attributes.template;this.element=HS(e.container),this.id&&this.element.setAttribute("id",this.id)},n.prototype.renderCustomContent=function(){if(!(this.prevCustomContentKey!==void 0&&this.prevCustomContentKey===this.attributes.contentKey)){this.prevCustomContentKey=this.attributes.contentKey;var e=this.attributes.content;e&&(typeof e=="string"?this.element.innerHTML=e:mk(this.element,e))}},n.prototype.renderHTMLTooltipElement=function(){var e,r,i=this.attributes,a=i.template,o=i.title,s=i.enterable,l=i.style,c=i.content,u=D1(a.prefixCls),f=this.element;if(this.element.style.pointerEvents=s?"auto":"none",c)this.renderCustomContent();else{o?(f.innerHTML=a.title,f.getElementsByClassName(u.TITLE)[0].innerHTML=o):(r=(e=f.getElementsByClassName(u.TITLE))===null||e===void 0?void 0:e[0])===null||r===void 0||r.remove();var d=this.HTMLTooltipItemsElements,h=document.createElement("ul");h.className=u.LIST,mk(h,d);var p=this.element.querySelector(".".concat(u.LIST));p?p.replaceWith(h):f.appendChild(h)}KJ(f,l)},n.prototype.getRelativeOffsetFromCursor=function(e){var r=this.attributes,i=r.position,a=r.offset,o=e||i,s=o.split("-"),l={left:[-1,0],right:[1,0],top:[0,-1],bottom:[0,1]},c=this.elementSize,u=c.width,f=c.height,d=[-u/2,-f/2];return s.forEach(function(h){var p=U(d,2),g=p[0],y=p[1],m=U(l[h],2),x=m[0],_=m[1];d=[g+(u/2+a[0])*x,y+(f/2+a[1])*_]}),d},n.prototype.setOffsetPosition=function(e){var r=U(e,2),i=r[0],a=r[1],o=this.attributes,s=o.x,l=s===void 0?0:s,c=o.y,u=c===void 0?0:c,f=o.container,d=f.x,h=f.y;this.element.style.left="".concat(+l+d+i,"px"),this.element.style.top="".concat(+u+h+a,"px")},n.prototype.updatePosition=function(){var e=this.attributes.showDelay,r=e===void 0?60:e,i=Date.now();this.timestamp>0&&i-this.timestamp<r||(this.timestamp=i,this.setOffsetPosition(this.autoPosition(this.getRelativeOffsetFromCursor())))},n.prototype.autoPosition=function(e){var r=U(e,2),i=r[0],a=r[1],o=this.attributes,s=o.x,l=o.y,c=o.bounding,u=o.position;if(!c)return[i,a];var f=this.element,d=f.offsetWidth,h=f.offsetHeight,p=U([+s+i,+l+a],2),g=p[0],y=p[1],m={left:"right",right:"left",top:"bottom",bottom:"top"},x=c.x,_=c.y,w=c.width,O=c.height,S={left:g<x,right:g+d>x+w,top:y<_,bottom:y+h>_+O},E=[];u.split("-").forEach(function(A){S[A]?E.push(m[A]):E.push(A)});var M=E.join("-");return this.getRelativeOffsetFromCursor(M)},n.prototype.isCursorEntered=function(e,r){if(this.element){var i=this.element.getBoundingClientRect(),a=i.x,o=i.y,s=i.width,l=i.height;return new fn(a,o,s,l).isPointIn(e,r)}return!1},n.prototype.closeTransition=function(e){var r=this,i=this.element.style.transition;this.element.style.transition="none",e(),setTimeout(function(){r.element.style.transition=i},10)},n.tag="tooltip",n})(Jn),Gnt=(function(t){ln(n,t);function n(e){var r=t.call(this,e)||this;r.layoutEvents=[re.BOUNDS_CHANGED,re.INSERTED,re.REMOVED],r.$margin=cr(0),r.$padding=cr(0);var i=e.style||{},a=i.margin,o=a===void 0?0:a,s=i.padding,l=s===void 0?0:s;return r.margin=o,r.padding=l,r.isMutationObserved=!0,r.bindEvents(),r}return Object.defineProperty(n.prototype,"margin",{get:function(){return this.$margin},set:function(e){this.$margin=cr(e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"padding",{get:function(){return this.$padding},set:function(e){this.$padding=cr(e)},enumerable:!1,configurable:!0}),n.prototype.getBBox=function(){var e=this.attributes,r=e.x,i=r===void 0?0:r,a=e.y,o=a===void 0?0:a,s=e.width,l=e.height,c=U(this.$margin,4),u=c[0],f=c[1],d=c[2],h=c[3];return new fn(i-h,o-u,s+h+f,l+u+d)},n.prototype.appendChild=function(e,r){return e.isMutationObserved=!0,t.prototype.appendChild.call(this,e,r),e},n.prototype.getAvailableSpace=function(){var e=this.attributes,r=e.width,i=e.height,a=U(this.$padding,4),o=a[0],s=a[1],l=a[2],c=a[3],u=U(this.$margin,4),f=u[0],d=u[3];return new fn(c+d,o+f,r-c-s,i-o-l)},n.prototype.layout=function(){if(!(!this.attributes.display||!this.isConnected)&&!this.children.some(function(o){return!o.isConnected}))try{var e=this.attributes,r=e.x,i=e.y;this.style.transform="translate(".concat(r,", ").concat(i,")");var a=IJ(this.getAvailableSpace(),this.children.map(function(o){return o.getBBox()}),this.attributes);this.children.forEach(function(o,s){var l=a[s],c=l.x,u=l.y;o.style.transform="translate(".concat(c,", ").concat(u,")")})}catch{}},n.prototype.bindEvents=function(){var e=this;this.layoutEvents.forEach(function(r){e.addEventListener(r,function(i){i.target&&(i.target.isMutationObserved=!0,e.layout())})})},n.prototype.attributeChangedCallback=function(e,r,i){e==="margin"?this.margin=i:e==="padding"&&(this.padding=i),this.layout()},n})(Qn),Qy=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};function Ynt(t){const{min:[n,e],max:[r,i]}=t.getLocalBounds();let a=0,o=0;return n>0&&(a=n),r<0&&(a=r),e>0&&(o=e),i<0&&(o=i),[a,o]}function Hnt(t,n=[]){const[e=0,r=0,i=e,a=r]=n,o=t.parentNode,s=o.getEulerAngles();o.setEulerAngles(0);const{min:l,halfExtents:c}=t.getLocalBounds(),[u,f]=l,[d,h]=c;return o.setEulerAngles(s),{x:u-a,y:f-e,width:d*2+a+r,height:h*2+e+i}}function Unt(t,n,e,r,i=!0,a=!0){const o=f=>Js()(f);if(!n[0]&&!n[1])return o([Ynt(t),n]);if(!e.length)return o([[0,0],n]);const[s,l]=e,c=[...l],u=[...s];if(l[0]!==s[0]){const f=i?-4:4;c[1]=l[1],a&&!i&&(c[0]=Math.max(s[0],l[0]-f),l[1]<s[1]?u[1]=c[1]:(u[1]=s[1],u[0]=Math.max(u[0],c[0]-f))),!a&&!i&&(c[0]=Math.max(s[0],l[0]-f),l[1]>s[1]?u[1]=c[1]:(u[1]=s[1],u[0]=Math.max(u[0],c[0]-f))),!a&&i&&(c[0]=Math.min(s[0],l[0]-f),l[1]>s[1]?u[1]=c[1]:(u[1]=s[1],u[0]=Math.min(u[0],c[0]-f))),a&&i&&(c[0]=Math.min(s[0],l[0]-f),l[1]<s[1]?u[1]=c[1]:(u[1]=s[1],u[0]=Math.min(u[0],c[0]-f)))}return o([l,c,u,s,n])}const _N=cc(t=>{const n=t.attributes,{className:e,class:r,transform:i,rotate:a,labelTransform:o,labelTransformOrigin:s,x:l,y:c,x0:u=l,y0:f=c,text:d,background:h,connector:p,startMarker:g,endMarker:y,coordCenter:m,innerHTML:x}=n,_=Qy(n,["className","class","transform","rotate","labelTransform","labelTransformOrigin","x","y","x0","y0","text","background","connector","startMarker","endMarker","coordCenter","innerHTML"]);if(t.style.transform=`translate(${l}, ${c})`,[l,c,u,f].some(I=>!Qe(I))){t.children.forEach(I=>I.remove());return}const w=bt(_,"background"),{padding:O}=w,S=Qy(w,["padding"]),E=bt(_,"connector"),{points:M=[]}=E,A=Qy(E,["points"]);let T;x?T=Rt(t).maybeAppend("html","html",e).style("zIndex",0).style("innerHTML",x).call(Pt,Object.assign({transform:o,transformOrigin:s},_)).node():T=Rt(t).maybeAppend("text","text").style("zIndex",0).style("text",d).call(Pt,Object.assign({textBaseline:"middle",transform:o,transformOrigin:s},_)).node();const P=Rt(t).maybeAppend("background","rect").style("zIndex",-1).call(Pt,Hnt(T,O)).call(Pt,h?S:{}).node(),N=+u<m[0],C=+f<m[1],R=[+u-+l,+f-+c],D=Unt(P,R,M,m,N,C),F=g&&new _e({id:"startMarker",style:Object.assign({x:0,y:0},bt(_,"startMarker"))}),j=y&&new _e({id:"endMarker",style:Object.assign({x:0,y:0},bt(_,"endMarker"))});Rt(t).maybeAppend("connector","path").style("zIndex",0).style("d",D).style("markerStart",F).style("markerEnd",j).call(Pt,p?A:{})}),wN=(t,n)=>{const{coordinate:e}=n;return(r,i,a)=>{const{color:o,text:s="",fontSize:l,rotate:c=0,transform:u=""}=i,f={text:String(s),stroke:o,fill:o,fontSize:l},[[d,h]]=r;return Rt(new _N).style("x",d).style("y",h).call(Pt,a).style("transform",`${u}rotate(${+c})`).style("coordCenter",e.getCenter()).call(Pt,f).call(Pt,t).node()}};wN.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var $1=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};function Vnt(t){const n=t/Math.sqrt(2),e=t*Math.sqrt(2),[r,i]=[-n,n-e],[a,o]=[0,0],[s,l]=[n,n-e];return[["M",r,i],["A",t,t,0,1,1,s,l],["L",a,o],["Z"]]}function Xnt(t){const{min:n,max:e}=t.getLocalBounds();return[(n[0]+e[0])*.5,(n[1]+e[1])*.5]}const qnt=cc(t=>{const n=t.attributes,{class:e,x:r,y:i,transform:a}=n,o=$1(n,["class","x","y","transform"]),s=bt(o,"marker"),{size:l=24}=s,c=()=>Vnt(l/2),u=Rt(t).maybeAppend("marker",()=>new _e({})).call(h=>h.node().update(Object.assign({symbol:c},s))).node(),[f,d]=Xnt(u);Rt(t).maybeAppend("text","text").style("x",f).style("y",d).call(Pt,o)}),ON=(t,n)=>{const e=$1(t,[]);return(r,i,a)=>{const{color:o}=a,s=$1(a,["color"]),{color:l=o,text:c=""}=i,u={text:String(c),stroke:l,fill:l},[[f,d]]=r;return Rt(new qnt).call(Pt,s).style("transform",`translate(${f},${d})`).call(Pt,u).call(Pt,e).node()}};ON.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const SN=(t,n)=>{const{coordinate:e}=n;return(r,i,a)=>{const{color:o,text:s="",fontSize:l,rotate:c=0,transform:u=""}=i,f={text:String(s),stroke:o,fill:o,fontSize:l,textAlign:"center",textBaseline:"middle"},[[d,h]]=r;return Rt(new ki).style("x",d).style("y",h).call(Pt,a).style("transformOrigin","center center").style("transform",`${u}rotate(${c}deg)`).style("coordCenter",e.getCenter()).call(Pt,f).call(Pt,t).node()}};SN.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var Knt=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};function Znt(t,n){const e=[],r=[],i=[];let a=!1,o=null;const s=t.length/2;for(let l=0;l<s;l++){const c=t[l],u=t[l+s];if([...c,...u].some(f=>!n(f)))a=!0;else{if(e.push(c),r.push(u),a&&o){a=!1;const[f,d]=o;i.push([f,c,d,u])}o=[c,u]}}return[e.concat(r),i]}const Uk=cc(t=>{const{areaPath:n,connectPath:e,areaStyle:r,connectStyle:i}=t.attributes,a=t.ownerDocument;Rt(t).maybeAppend("connect-path",()=>a.createElement("path",{})).style("d",e).call(Pt,i),Rt(t).maybeAppend("area-path",()=>a.createElement("path",{})).style("d",n).call(Pt,r)}),qi=(t,n)=>{const{curve:e,gradient:r=!1,defined:i=c=>!Number.isNaN(c)&&c!==void 0&&c!==null,connect:a=!1}=t,o=Knt(t,["curve","gradient","defined","connect"]),{coordinate:s,document:l}=n;return(c,u,f)=>{const{color:d}=f,{color:h=d,seriesColor:p,seriesX:g,seriesY:y}=u,m=Ze(s),x=nL(s,u),_=r&&p?eL(p,g,y,r,void 0,m):h,w=Object.assign(Object.assign(Object.assign(Object.assign({},f),{stroke:_,fill:_}),x&&{transform:x}),o),[O,S]=Znt(c,i),E=bt(w,"connect"),M=!!S.length,A=T=>Rt(l.createElement("path",{})).style("d",T||"").call(Pt,w).node();if(Ie(s)){const T=P=>{const N=s.getCenter(),C=P.slice(0,P.length/2),R=P.slice(P.length/2);return dX().angle((D,F)=>ac(On(C[F],N))).outerRadius((D,F)=>vn(C[F],N)).innerRadius((D,F)=>vn(R[F],N)).defined((D,F)=>[...C[F],...R[F]].every(i)).curve(e)(R)};return!M||a&&!Object.keys(E).length?A(T(O)):M&&!a?A(T(c)):Rt(new Uk).style("areaStyle",w).style("connectStyle",Object.assign(Object.assign({},E),o)).style("areaPath",T(c)).style("connectPath",S.map(T).join("")).node()}else{const T=P=>{const N=P.slice(0,P.length/2),C=P.slice(P.length/2);return m?u1().y((R,D)=>N[D][1]).x1((R,D)=>N[D][0]).x0((R,D)=>C[D][0]).defined((R,D)=>[...N[D],...C[D]].every(i)).curve(e)(N):u1().x((R,D)=>N[D][0]).y1((R,D)=>N[D][1]).y0((R,D)=>C[D][1]).defined((R,D)=>[...N[D],...C[D]].every(i)).curve(e)(N)};return!M||a&&!Object.keys(E).length?A(T(O)):M&&!a?A(T(c)):Rt(new Uk).style("areaStyle",w).style("connectStyle",Object.assign(Object.assign({},E),o)).style("areaPath",T(c)).style("connectPath",S.map(T).join("")).node()}}};qi.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const EN=(t,n)=>{const{coordinate:e}=n;return(...r)=>{const i=Ie(e)?bx:Uf;return qi(Object.assign({curve:i},t),n)(...r)}};EN.props=Object.assign(Object.assign({},qi.props),{defaultMarker:"square"});var Qnt=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};const kN=(t,n)=>{const e=Qnt(t,[]),{coordinate:r}=n;return(...i)=>{const a=Ie(r)?q3:Ze(r)?t5:J3;return qi(Object.assign({curve:a},e),n)(...i)}};kN.props=Object.assign(Object.assign({},qi.props),{defaultMarker:"smooth"});const MN=(t,n)=>(...e)=>qi(Object.assign({curve:e5},t),n)(...e);MN.props=Object.assign(Object.assign({},qi.props),{defaultMarker:"hvh"});const AN=(t,n)=>(...e)=>qi(Object.assign({curve:n5},t),n)(...e);AN.props=Object.assign(Object.assign({},qi.props),{defaultMarker:"vh"});const TN=(t,n)=>(...e)=>qi(Object.assign({curve:r5},t),n)(...e);TN.props=Object.assign(Object.assign({},qi.props),{defaultMarker:"hv"});const PN=(t,n)=>{const{arrow:e=!1}=t;return(...r)=>c2(Object.assign(Object.assign({},t),{arrow:e}),n)(...r)};PN.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var Vk=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};const CN=(t,n)=>{const e=Vk(t,[]),{document:r}=n;return(i,a,o)=>{const{color:s}=o,l=Vk(o,["color"]),{color:c=s,transform:u}=a,[f,d]=i,h=Ai();return h.moveTo(f[0],f[1]),h.bezierCurveTo(f[0]/2+d[0]/2,f[1],f[0]/2+d[0]/2,d[1],d[0],d[1]),Rt(r.createElement("path",{})).call(Pt,l).style("d",h.toString()).style("stroke",c).style("transform",u).call(Pt,e).node()}};CN.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var Xk=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};function Jnt(t,n,e,r){const i=Ai();if(Ie(e)){const a=e.getCenter(),o=vn(t,a),l=(vn(n,a)-o)*r+o;return i.moveTo(t[0],t[1]),df(i,t,n,a,l),i.lineTo(n[0],n[1]),i}return Ze(e)?(i.moveTo(t[0],t[1]),i.lineTo(t[0]+(n[0]-t[0])*r,t[1]),i.lineTo(t[0]+(n[0]-t[0])*r,n[1]),i.lineTo(n[0],n[1]),i):(i.moveTo(t[0],t[1]),i.lineTo(t[0],t[1]+(n[1]-t[1])*r),i.lineTo(n[0],t[1]+(n[1]-t[1])*r),i.lineTo(n[0],n[1]),i)}const LN=(t,n)=>{const{cornerRatio:e=1/3}=t,r=Xk(t,["cornerRatio"]),{coordinate:i,document:a}=n;return(o,s,l)=>{const{defaultColor:c}=l,u=Xk(l,["defaultColor"]),{color:f=c,transform:d}=s,[h,p]=o,g=Jnt(h,p,i,e);return Rt(a.createElement("path",{})).call(Pt,u).style("d",g.toString()).style("stroke",f).style("transform",d).call(Pt,r).node()}};LN.props={defaultMarker:"vhv",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var qk=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};const NN=(t,n)=>{const e=qk(t,[]),{coordinate:r,document:i}=n;return(a,o,s)=>{const{color:l}=s,c=qk(s,["color"]),{color:u=l,transform:f}=o,[d,h]=a,p=Ai();if(p.moveTo(d[0],d[1]),Ie(r)){const g=r.getCenter();p.quadraticCurveTo(g[0],g[1],h[0],h[1])}else{const g=R3(d,h),y=vn(d,h)/2;df(p,d,h,g,y)}return Rt(i.createElement("path",{})).call(Pt,c).style("d",p.toString()).style("stroke",u).style("transform",f).call(Pt,e).node()}};NN.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};function RN(t={}){const{shapes:n}=t;return[{name:"color"},{name:"opacity"},{name:"shape",range:n},{name:"enterType"},{name:"enterDelay",scaleKey:"enter"},{name:"enterDuration",scaleKey:"enter"},{name:"enterEasing"},{name:"key",scale:"identity"},{name:"groupKey",scale:"identity"},{name:"label",scale:"identity"}]}function _r(t={}){return[...RN(t),{name:"title",scale:"identity"}]}function oo(){return[{type:Jv,channel:"color"},{type:t0,channel:["x","y"]}]}function Ec(){return[{type:Jv,channel:"x"},{type:t0,channel:["y"]}]}function trt(){return[{type:Jv,channel:"color"},{type:t0,channel:["position"]}]}function kc(t={}){return RN(t)}function Mn(){return[{type:s3}]}function Ln(){return[]}function Jy(t,n){return t.getBandWidth(t.invert(n))}function Jo(t,n,e={}){const{x:r,y:i,series:a}=n,{x:o,y:s,series:l}=t,{style:{bandOffset:c=l?0:.5,bandOffsetX:u=c,bandOffsetY:f=c}={}}=e,d=!!(o!=null&&o.getBandWidth),h=!!(s!=null&&s.getBandWidth),p=!!(l!=null&&l.getBandWidth);return!d&&!h?g=>g:(g,y)=>{const m=d?Jy(o,r[y]):0,x=h?Jy(s,i[y]):0,w=p&&a?(Jy(l,a[y])/2+ +a[y])*m:0,[O,S]=g;return[O+u*m+w,S+f*x]}}function Kp(t){return parseFloat(t)/100}function x2(t,n,e,r){const{x:i,y:a}=e,{innerWidth:o,innerHeight:s}=r.getOptions(),l=Array.from(t,c=>{const u=i[c],f=a[c],d=typeof u=="string"?Kp(u)*o:+u,h=typeof f=="string"?Kp(f)*s:+f;return[[d,h]]});return[t,l]}function ma(t){return typeof t=="function"?t:n=>n[t]}function tm(t,n){return Array.from(t,ma(n))}function ert(t){return Array.isArray(t)?{links:t}:t&&typeof t=="object"?{links:t.links||[],nodes:t.nodes}:{links:[]}}function _2(t,n){const e=ert(t),{source:r=f=>f.source,target:i=f=>f.target,value:a=f=>f.value}=n,{links:o,nodes:s}=e;if(!o.length)return{links:[],nodes:s||[]};const l=tm(o,r),c=tm(o,i),u=tm(o,a);return{links:o.map((f,d)=>({target:c[d],source:l[d],value:u[d]})),nodes:s||Array.from(new Set([...l,...c]),f=>({key:f}))}}var nrt=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};const IN=(t,n)=>{const{coordinate:e,document:r}=n;return(i,a,o)=>{const{color:s}=o,l=nrt(o,["color"]),{color:c=s,src:u="",size:f=32,transform:d=""}=a;let{width:h=f,height:p=f}=t;const[[g,y]]=i,[m,x]=e.getSize();h=typeof h=="string"?Kp(h)*m:h,p=typeof p=="string"?Kp(p)*x:p;const _=g-Number(h)/2,w=y-Number(p)/2;return Rt(r.createElement("image",{})).call(Pt,l).style("x",_).style("y",w).style("src",u).style("stroke",c).style("transform",d).call(Pt,t).style("width",h).style("height",p).node()}};IN.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var rrt=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};function irt(t,n){const e=Ai();if(Ie(n)){const r=n.getCenter(),i=[...t,t[0]],a=i.map(o=>vn(o,r));return i.forEach((o,s)=>{if(s===0){e.moveTo(o[0],o[1]);return}const l=a[s],c=t[s-1],u=a[s-1];u!==void 0&&Math.abs(l-u)<1e-10?df(e,c,o,r,l):e.lineTo(o[0],o[1])}),e.closePath(),e}return aJ(e,t)}const DN=(t,n)=>{const{coordinate:e,document:r}=n;return(i,a,o)=>{const{color:s}=o,l=rrt(o,["color"]),{color:c=s,transform:u}=a,f=irt(i,e);return Rt(r.createElement("path",{})).call(Pt,l).style("d",f.toString()).style("stroke",c).style("fill",c).style("transform",u).call(Pt,t).node()}};DN.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var Kk=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};function art(t,n){const[e,r,i,a]=t,o=Ai();if(Ie(n)){const s=n.getCenter(),l=vn(s,e);return o.moveTo(e[0],e[1]),o.quadraticCurveTo(s[0],s[1],i[0],i[1]),df(o,i,a,s,l),o.quadraticCurveTo(s[0],s[1],r[0],r[1]),df(o,r,e,s,l),o.closePath(),o}return o.moveTo(e[0],e[1]),o.bezierCurveTo(e[0]/2+i[0]/2,e[1],e[0]/2+i[0]/2,i[1],i[0],i[1]),o.lineTo(a[0],a[1]),o.bezierCurveTo(a[0]/2+r[0]/2,a[1],a[0]/2+r[0]/2,r[1],r[0],r[1]),o.lineTo(e[0],e[1]),o.closePath(),o}const $N=(t,n)=>{const e=Kk(t,[]),{coordinate:r,document:i}=n;return(a,o,s)=>{const{color:l}=s,c=Kk(s,["color"]),{color:u=l,transform:f}=o,d=art(a,r);return Rt(i.createElement("path",{})).call(Pt,c).style("d",d.toString()).style("fill",u||l).style("stroke",u||l).style("transform",f).call(Pt,e).node()}};$N.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var ort=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};function srt(t,n){const e=Ai();if(!Ie(n))e.moveTo(...t[0]),e.lineTo(...t[1]),e.moveTo(...t[2]),e.lineTo(...t[3]),e.moveTo(...t[4]),e.lineTo(...t[5]),e.lineTo(...t[6]),e.lineTo(...t[7]),e.closePath(),e.moveTo(...t[8]),e.lineTo(...t[9]),e.moveTo(...t[10]),e.lineTo(...t[11]),e.moveTo(...t[12]),e.lineTo(...t[13]);else{const r=n.getCenter(),[i,a]=r,o=Ei(On(t[0],r)),s=Ei(On(t[1],r)),l=vn(r,t[2]),c=vn(r,t[3]),u=vn(r,t[8]),f=vn(r,t[10]),d=vn(r,t[11]);e.moveTo(...t[0]),e.arc(i,a,l,o,s),e.arc(i,a,l,s,o,!0),e.moveTo(...t[2]),e.lineTo(...t[3]),e.moveTo(...t[4]),e.arc(i,a,c,o,s),e.lineTo(...t[6]),e.arc(i,a,f,s,o,!0),e.closePath(),e.moveTo(...t[8]),e.arc(i,a,u,o,s),e.arc(i,a,u,s,o,!0),e.moveTo(...t[10]),e.lineTo(...t[11]),e.moveTo(...t[12]),e.arc(i,a,d,o,s),e.arc(i,a,d,s,o,!0)}return e}const jN=(t,n)=>{const{coordinate:e,document:r}=n;return(i,a,o)=>{const{color:s,transform:l}=a,{color:c,fill:u=c,stroke:f=c}=o,d=ort(o,["color","fill","stroke"]),h=srt(i,e);return Rt(r.createElement("path",{})).call(Pt,d).style("d",h.toString()).style("stroke",f).style("fill",s||u).style("transform",l).call(Pt,t).node()}};jN.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var lrt=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};function crt(t,n,e=4){const r=Ai();if(!Ie(n))return r.moveTo(...t[2]),r.lineTo(...t[3]),r.lineTo(t[3][0]-e,t[3][1]),r.lineTo(t[10][0]-e,t[10][1]),r.lineTo(t[10][0]+e,t[10][1]),r.lineTo(t[3][0]+e,t[3][1]),r.lineTo(...t[3]),r.closePath(),r.moveTo(...t[10]),r.lineTo(...t[11]),r.moveTo(t[3][0]+e/2,t[8][1]),r.arc(t[3][0],t[8][1],e/2,0,Math.PI*2),r.closePath(),r;const i=n.getCenter(),[a,o]=i,s=vn(i,t[3]),l=vn(i,t[8]),c=vn(i,t[10]),u=Ei(On(t[2],i)),f=Math.asin(e/l),d=u-f,h=u+f;r.moveTo(...t[2]),r.lineTo(...t[3]),r.moveTo(Math.cos(d)*s+a,Math.sin(d)*s+o),r.arc(a,o,s,d,h),r.lineTo(Math.cos(h)*c+a,Math.sin(h)*c+o),r.arc(a,o,c,h,d,!0),r.lineTo(Math.cos(d)*s+a,Math.sin(d)*s+o),r.closePath(),r.moveTo(...t[10]),r.lineTo(...t[11]);const p=(d+h)/2;return r.moveTo(Math.cos(p)*(l+e/2)+a,Math.sin(p)*(l+e/2)+o),r.arc(Math.cos(p)*l+a,Math.sin(p)*l+o,e/2,p,Math.PI*2+p),r.closePath(),r}const FN=(t,n)=>{const{coordinate:e,document:r}=n;return(i,a,o)=>{const{color:s,transform:l}=a,c=4,{color:u,fill:f=u,stroke:d=u}=o,h=lrt(o,["color","fill","stroke"]),p=crt(i,e,c);return Rt(r.createElement("path",{})).call(Pt,h).style("d",p.toString()).style("stroke",d).style("fill",s||f).style("transform",l).call(Pt,t).node()}};FN.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var Zk=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};function urt(t,n,e){return t.createElement("path",{style:Object.assign({d:`M ${n},${n} L -${n},0 L ${n},-${n} L 0,0 Z`,transformOrigin:"center"},e)})}function frt(t,n){if(!Ie(n))return Js().x(r=>r[0]).y(r=>r[1])(t);const e=n.getCenter();return vx()({startAngle:0,endAngle:Math.PI*2,outerRadius:vn(t[0],e),innerRadius:vn(t[1],e)})}function drt(t,n){if(!Ie(t))return n;const[e,r]=t.getCenter();return`translate(${e}, ${r}) ${n||""}`}const w2=(t,n)=>{const{arrow:e,arrowSize:r=4}=t,i=Zk(t,["arrow","arrowSize"]),{coordinate:a,document:o}=n;return(s,l,c)=>{const{color:u,lineWidth:f}=c,d=Zk(c,["color","lineWidth"]),{color:h=u,size:p=f}=l,g=e?urt(o,r,Object.assign({fill:i.stroke||h,stroke:i.stroke||h},bt(i,"arrow"))):null,y=frt(s,a),m=drt(a,l.transform);return Rt(o.createElement("path",{})).call(Pt,d).style("d",y).style("stroke",h).style("lineWidth",p).style("transform",m).style("markerEnd",g).call(Pt,i).node()}};w2.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var Qk=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};function hrt(t,n,e){return[["M",t,n],["L",t+2*e,n-e],["L",t+2*e,n+e],["Z"]]}function prt(t){return Js().x(n=>n[0]).y(n=>n[1])(t)}function vrt(t,n,e,r,i,a,o=0){const[[s,l],[c,u]]=n;if(Ze(t)){const y=s+e,m=c+r,x=y+o,_=l+i,w=u+a;return[[y,_],[x,_],[x,w],[m,w]]}const f=l-e,d=u-r,h=f-o,p=s-i,g=c-a;return[[p,f],[p,h],[g,h],[g,d]]}const BN=(t,n)=>{const{offsetX:e=0,sourceOffsetX:r=e,targetOffsetX:i=e,offsetY:a=0,sourceOffsetY:o=a,targetOffsetY:s=a,connectLength1:l,endMarker:c=!0}=t,u=Qk(t,["offsetX","sourceOffsetX","targetOffsetX","offsetY","sourceOffsetY","targetOffsetY","connectLength1","endMarker"]),{coordinate:f}=n;return(d,h,p)=>{const{color:g,connectLength1:y}=p,m=Qk(p,["color","connectLength1"]),{color:x,transform:_}=h,w=vrt(f,d,o,s,r,i,l??y),O=bt(Object.assign(Object.assign({},u),p),"endMarker");return Rt(new ur).call(Pt,m).style("d",prt(w)).style("stroke",x||g).style("transform",_).style("markerEnd",c?new _e({className:"marker",style:Object.assign(Object.assign({},O),{symbol:hrt})}):null).call(Pt,u).node()}};BN.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};function grt(t,n,e,r){const i=n.length/2,a=n.slice(0,i),o=n.slice(i);let s=_c(a,(h,p)=>Math.abs(h[1]-o[p][1]));s=Math.max(Math.min(s,i-2),1);const l=h=>[a[h][0],(a[h][1]+o[h][1])/2],c=l(s),u=l(s-1),f=l(s+1),d=Ei(On(f,u))/Math.PI*180;return{x:c[0],y:c[1],transform:`rotate(${d})`,textAlign:"center",textBaseline:"middle"}}function zN(t,n,e,r){const{bounds:i}=e,[[a,o],[s,l]]=i,c=s-a,u=l-o,f=d=>{const{x:h,y:p}=d,g=sE(e.x,c),y=sE(e.y,u);return Object.assign(Object.assign({},d),{x:(g||h)+a,y:(y||p)+o})};return f(t==="left"?{x:0,y:u/2,textAlign:"start",textBaseline:"middle"}:t==="right"?{x:c,y:u/2,textAlign:"end",textBaseline:"middle"}:t==="top"?{x:c/2,y:0,textAlign:"center",textBaseline:"top"}:t==="bottom"?{x:c/2,y:u,textAlign:"center",textBaseline:"bottom"}:t==="top-left"?{x:0,y:0,textAlign:"start",textBaseline:"top"}:t==="top-right"?{x:c,y:0,textAlign:"end",textBaseline:"top"}:t==="bottom-left"?{x:0,y:u,textAlign:"start",textBaseline:"bottom"}:t==="bottom-right"?{x:c,y:u,textAlign:"end",textBaseline:"bottom"}:{x:c/2,y:u/2,textAlign:"center",textBaseline:"middle"})}function WN(t,n,e,r){const{y:i,y1:a,autoRotate:o,rotateToAlignArc:s}=e,l=r.getCenter(),c=il(r,n,[i,a]),{innerRadius:u,outerRadius:f,startAngle:d,endAngle:h}=c,p=t==="inside"?(d+h)/2:h,g=O2(p,o,s),y=(()=>{const[m,x]=n,_=u+(f-u)*.5,[w,O]=t==="inside"?gf(l,p,_):R3(m,x);return{x:w,y:O}})();return Object.assign(Object.assign({},y),{textAlign:t==="inside"?"center":"start",textBaseline:"middle",rotate:g})}function gf(t,n,e){return[t[0]+Math.sin(n)*e,t[1]-Math.cos(n)*e]}function O2(t,n,e){if(!n)return 0;const r=e?0:Math.sin(t)<0?90:-90;return t/Math.PI*180+r}function yrt(t,n,e,r){const{y:i,y1:a,autoRotate:o,rotateToAlignArc:s,radius:l=.5,offset:c=0}=e,u=il(r,n,[i,a]),{startAngle:f,endAngle:d}=u,h=r.getCenter(),p=(f+d)/2,y={textAlign:"center",textBaseline:"middle",rotate:O2(p,o,s)},{innerRadius:m,outerRadius:x}=u,w=m+(x-m)*l+c,[O,S]=gf(h,p,w);return Object.assign({x:O,y:S},y)}function Jk(t){return t===void 0?null:t}function GN(t,n,e,r){const{bounds:i}=e,[a]=i;return{x:Jk(a[0]),y:Jk(a[1])}}function ja(t,n,e,r){const{bounds:i}=e;return i.length===1?GN(t,n,e):(o0(r)?WN:wc(r)?yrt:zN)(t,n,e,r)}function mrt(t,n,e,r,i){const[a,o]=gf(t,n,e),[s,l]=gf(t,n,r),c=Math.sin(n)>0?1:-1;return[[a,o],[s,l],[s+c*i,l]]}function YN(t,n,e){const r=il(e,t,[n.y,n.y1]),{innerRadius:i,outerRadius:a}=r;return i+(a-i)}function HN(t,n,e){const r=il(e,t,[n.y,n.y1]),{startAngle:i,endAngle:a}=r;return(i+a)/2}function S2(t,n,e,r){const{autoRotate:i,rotateToAlignArc:a,offset:o=0,connector:s=!0,connectorLength:l=o,connectorLength2:c=0,connectorDistance:u=0}=e,f=r.getCenter(),d=HN(n,e,r),h=Math.sin(d)>0?1:-1,p=O2(d,i,a),g={textAlign:h>0||o0(r)?"start":"end",textBaseline:"middle",rotate:p},y=YN(n,e,r),m=y+(s?l:o),[[x,_],[w,O],[S,E]]=mrt(f,d,y,m,s?c:0),M=s?+u*h:0,A=S+M,T=E,P={connector:s,connectorPoints:[[w-A,O-T],[S-A,E-T]]};return Object.assign(Object.assign({x0:x,y0:_,x:S+M,y:E},g),P)}function brt(t,n,e,r){const{bounds:i}=e;return i.length===1?GN(t,n,e):(o0(r)?WN:wc(r)?S2:zN)(t,n,e,r)}function tM(t,n={}){const{labelHeight:e=14,height:r}=n,i=Hi(t,c=>c.y),a=i.length,o=new Array(a);for(let c=0;c<a;c++){const u=i[c],{y:f}=u;o[c]={y:f,y1:f+e,labels:[f]}}let s=!0;for(;s;){s=!1;for(let c=o.length-1;c>0;c--){const u=o[c],f=o[c-1];if(f.y1>u.y){s=!0,f.labels.push(...u.labels),o.splice(c,1),f.y1+=u.y1-u.y;const d=f.y1-f.y;f.y1=Math.max(Math.min(f.y1,r),d),f.y=f.y1-d}}}let l=0;for(const c of o){const{y:u,labels:f}=c;let d=u-e;for(const h of f){const p=i[l++],y=d+e-h;p.connectorPoints[0][1]-=y,p.y=d+e,d+=e}}}function eM(t,n){const e=Hi(t,s=>s.y),{height:r,labelHeight:i=14}=n,a=Math.ceil(r/i);if(e.length<=a)return tM(e,n);const o=[];for(let s=0;s<e.length;s++)s<e.length-a?(e[s].opacity=0,e[s].connector=!1):o.push(e[s]);tM(o,n)}var xrt=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};const Ph=new WeakMap;function _rt(t,n,e){const{connectorLength:r,connectorLength2:i,connectorDistance:a}=n,o=xrt(S2("outside",t,n,e),[]),s=e.getCenter(),l=YN(t,n,e),c=HN(t,n,e),u=l+r+i,f=Math.sin(c)>0?1:-1,d=s[0]+(u+ +a)*f,{x:h}=o,p=d-h;return o.x+=p,o.connectorPoints[0][0]-=p,o}function wrt(t,n,e,r,i,a){if(!wc(r))return{};if(Ph.has(n))return Ph.get(n);const o=a.map(d=>_rt(d,e,r)),{width:s,height:l}=r.getOptions(),c=o.filter(d=>d.x<s/2),u=o.filter(d=>d.x>=s/2),f=Object.assign(Object.assign({},i),{height:l});return eM(c,f),eM(u,f),o.forEach((d,h)=>Ph.set(a[h],d)),Ph.get(n)}var Ort=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};function Srt(t,n,e,r){if(!wc(r))return{};const{connectorLength:i,connectorLength2:a,connectorDistance:o}=e,s=Ort(S2("outside",n,e,r),[]),{x0:l,y0:c}=s,u=r.getCenter(),d=vX(r)+i,h=ac([l-u[0],c-u[1]]),p=Math.sin(h)>0?1:-1,[g,y]=gf(u,h,d);return s.x=g+(a+o)*p,s.y=y,s}const Ert=Object.freeze(Object.defineProperty({__proto__:null,area:grt,bottom:ja,bottomLeft:ja,bottomRight:ja,inside:ja,left:ja,outside:brt,right:ja,spider:wrt,surround:Srt,top:ja,topLeft:ja,topRight:ja},Symbol.toStringTag,{value:"Module"}));var nM=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};function krt(t,n){return t!==void 0?t:wc(n)?"inside":Ze(n)?"right":"top"}function Mrt(t,n,e,r,i,a){const{position:o}=n,{render:s}=i,l=krt(o,e),u=r[s?"htmlLabel":l==="inside"?"innerLabel":"label"],f=Object.assign({},u,n),d=Ert[Wx(l)];if(!d)throw new Error(`Unknown position: ${l}`);return Object.assign(Object.assign({},u),d(l,t,f,e,i,a))}const UN=(t,n)=>{const{coordinate:e,theme:r}=n,{render:i}=t;return(a,o,s,l)=>{const{text:c,x:u,y:f,transform:d="",transformOrigin:h,className:p=""}=o,g=nM(o,["text","x","y","transform","transformOrigin","className"]),y=Mrt(a,o,e,r,t,l),{rotate:m=0,transform:x=""}=y,_=nM(y,["rotate","transform"]);return Rt(new _N).call(Pt,_).style("text",`${c}`).style("className",`${p} g2-label`).style("innerHTML",i?i(c,o.datum,o.index):void 0).style("labelTransform",`${x} rotate(${+m}) ${d}`.trim()).style("labelTransformOrigin",h).style("coordCenter",e.getCenter()).call(Pt,g).node()}};UN.props={defaultMarker:"point"};var rM=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};const E2=(t,n)=>{const{arrow:e,colorAttribute:r}=t,i=rM(t,["arrow","colorAttribute"]),{coordinate:a,document:o}=n;return(s,l,c)=>{const{color:u,stroke:f}=c,d=rM(c,["color","stroke"]),{d:h,color:p=u}=l,[g,y]=a.getSize();return Rt(o.createElement("path",{})).call(Pt,d).style("d",typeof h=="function"?h({width:g,height:y}):h).style(r,p).call(Pt,i).node()}};E2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const VN=(t,n)=>E2(Object.assign({colorAttribute:"fill"},t),n);VN.props={defaultMarker:"hvh",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const XN=(t,n)=>E2(Object.assign({fill:"none",colorAttribute:"stroke"},t),n);XN.props={defaultMarker:"hvh",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var Art=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};const qN=(t,n)=>{const{document:e}=n;return(r,i,a)=>{const{transform:o}=i,{color:s}=a,l=Art(a,["color"]),{color:c=s}=i,[u,...f]=r,d=Ai();return d.moveTo(...u),f.forEach(([h,p])=>{d.lineTo(h,p)}),d.closePath(),Rt(e.createElement("path",{})).call(Pt,l).style("d",d.toString()).style("stroke",c||s).style("fill",c||s).style("fillOpacity",.4).style("transform",o).call(Pt,t).node()}};qN.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};function KN(t){var n,e,r,i=t||1;function a(s,l){++n>i&&(r=e,o(1),++n),e[s]=l}function o(s){n=0,e=Object.create(null),s||(r=Object.create(null))}return o(),{clear:o,has:function(s){return e[s]!==void 0||r[s]!==void 0},get:function(s){var l=e[s];if(l!==void 0)return l;if((l=r[s])!==void 0)return a(s,l),l},set:function(s,l){e[s]!==void 0?e[s]=l:a(s,l)}}}KN(3);function ZN(t,n=(...r)=>`${r[0]}`,e=16){const r=KN(e);return(...i)=>{const a=n(...i);let o=r.get(a);return r.has(a)?r.get(a):(o=t(...i),r.set(a,o),o)}}function Trt(t){return typeof t=="string"?t.split(" ").map(n=>{const[e,r]=n.split(":");return[+e,r]}):t}function Zp(t,n,e){const r=t?t():document.createElement("canvas");return r.width=n,r.height=e,r}const Prt=ZN((t,n,e)=>{const r=Zp(e,t*2,t*2),i=r.getContext("2d"),a=t,o=t;if(n===1)i.beginPath(),i.arc(a,o,t,0,2*Math.PI,!1),i.fillStyle="rgba(0,0,0,1)",i.fill();else{const s=i.createRadialGradient(a,o,t*n,a,o,t);s.addColorStop(0,"rgba(0,0,0,1)"),s.addColorStop(1,"rgba(0,0,0,0)"),i.fillStyle=s,i.fillRect(0,0,2*t,2*t)}return r},t=>`${t}`);function Crt(t,n){const r=Zp(n,256,1).getContext("2d"),i=r.createLinearGradient(0,0,256,1);return Trt(t).forEach(([a,o])=>{i.addColorStop(a,o)}),r.fillStyle=i,r.fillRect(0,0,256,1),r.getImageData(0,0,256,1).data}function Lrt(t,n,e,r,i,a){const{blur:o}=i;let s=r.length;for(;s--;){const{x:l,y:c,value:u,radius:f}=r[s],d=Math.min(u,e),h=l-f,p=c-f,g=Prt(f,1-o,a),y=(d-n)/(e-n);t.globalAlpha=Math.max(y,.001),t.drawImage(g,h,p)}return t}function Nrt(t,n,e,r,i){const{minOpacity:a,opacity:o,maxOpacity:s,useGradientOpacity:l}=i,c=0,u=0,f=n,d=e,h=t.getImageData(c,u,f,d),p=h.data,g=p.length;for(let y=3;y<g;y+=4){const m=p[y],x=m*4;if(!x)continue;const _=o||Math.max(0,Math.min(s,Math.max(a,m)));p[y-3]=r[x],p[y-2]=r[x+1],p[y-1]=r[x+2],p[y]=l?r[x+3]:_}return h}function Rrt(t,n,e,r,i,a,o){const s=Object.assign({blur:.85,minOpacity:0,opacity:.6,maxOpacity:1,gradient:[[.25,"rgb(0,0,255)"],[.55,"rgb(0,255,0)"],[.85,"yellow"],[1,"rgb(255,0,0)"]]},a);s.minOpacity*=255,s.opacity*=255,s.maxOpacity*=255;const c=Zp(o,t,n).getContext("2d"),u=Crt(s.gradient,o);c.clearRect(0,0,t,n),Lrt(c,e,r,i,s,o);const f=Nrt(c,t,n,u,s),h=Zp(o,t,n).getContext("2d");return h.putImageData(f,0,0),h}var Irt=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};function Drt(t,n){return Object.keys(t).reduce((e,r)=>{const i=t[r];return n(i,r)||(e[r]=i),e},{})}const QN=(t,n)=>{const{gradient:e,opacity:r,maxOpacity:i,minOpacity:a,blur:o,useGradientOpacity:s}=t,l=Irt(t,["gradient","opacity","maxOpacity","minOpacity","blur","useGradientOpacity"]),{coordinate:c,createCanvas:u,document:f}=n;return(d,h,p)=>{const{transform:g}=h,[y,m]=c.getSize(),x=d.map(E=>({x:E[0],y:E[1],value:E[2],radius:E[3]})),_=ti(d,E=>E[2]),w=Re(d,E=>E[2]),S=y&&m?Rrt(y,m,_,w,x,Drt({gradient:e,opacity:r,minOpacity:a,maxOpacity:i,blur:o,useGradientOpacity:s},E=>E===void 0),u):{canvas:null};return Rt(f.createElement("image",{})).call(Pt,p).style("x",0).style("y",0).style("width",y).style("height",m).style("src",S.canvas.toDataURL()).style("transform",g).call(Pt,l).node()}};QN.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var $rt=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};const JN=(t,n)=>{const{render:e}=t,r=$rt(t,["render"]);return i=>{const[[a,o]]=i;return e(Object.assign(Object.assign({},r),{x:a,y:o}),n)}};JN.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const iM=5e3;function aM(t,n,e){return t+(n-t)*e}function jrt(t,n,e,r){return n===0?[[t+1/2*e/Math.PI/2,r/2],[t+1/2*e/Math.PI,r],[t+e/4,r]]:n===1?[[t+1/2*e/Math.PI/2*(Math.PI-2),r],[t+1/2*e/Math.PI/2*(Math.PI-1),r/2],[t+e/4,0]]:n===2?[[t+1/2*e/Math.PI/2,-r/2],[t+1/2*e/Math.PI,-r],[t+e/4,-r]]:[[t+1/2*e/Math.PI/2*(Math.PI-2),-r],[t+1/2*e/Math.PI/2*(Math.PI-1),-r/2],[t+e/4,0]]}function Frt(t,n,e,r,i,a,o){const s=Math.ceil(2*t/e*4)*4,l=[];let c=r;for(;c<-Math.PI*2;)c+=Math.PI*2;for(;c>0;)c-=Math.PI*2;c=c/Math.PI/2*e;const u=a-t+c-t*2;l.push(["M",u,n]);let f=0;for(let d=0;d<s;++d){const h=d%4,p=jrt(d*e/4,h,e,i);l.push(["C",p[0][0]+u,-p[0][1]+n,p[1][0]+u,-p[1][1]+n,p[2][0]+u,-p[2][1]+n]),d===s-1&&(f=p[2][0])}return l.push(["L",f+u,o+t]),l.push(["L",u,o+t]),l.push(["Z"]),l}function Brt(t,n,e,r,i,a,o,s,l,c,u){const{fill:f,fillOpacity:d,opacity:h}=i;for(let p=0;p<r;p++){const g=r<=1?1:p/(r-1),y=Frt(s,o+s*e,l,0,s/40,t,n),m=u.createElement("path",{style:{d:y,fill:f,opacity:aM(.2,.9,g)*Number(h||d)}});a.appendChild(m);try{const x=[{transform:"translate(0, 0)"},{transform:`translate(${l*2}, 0)`}];m.animate(x,{duration:aM(.5*iM,iM,g)*2,iterations:1/0})}catch{console.warn("off-screen group animate error!")}}}function zrt(t,n,e){return`
78
+ M ${t} ${n-e}
79
+ a ${e} ${e} 0 1 0 0 ${e*2}
80
+ a ${e} ${e} 0 1 0 0 ${-e*2}
81
+ Z
82
+ `}function Wrt(t,n,e){const i=e*.618;return`
83
+ M ${t-i} ${n-e}
84
+ L ${t+i} ${n-e}
85
+ L ${t+i} ${n+e}
86
+ L ${t-i} ${n+e}
87
+ Z
88
+ `}function Grt(t,n,e){return`
89
+ M ${t} ${n-e}
90
+ L ${t+e} ${n}
91
+ L ${t} ${n+e}
92
+ L ${t-e} ${n}
93
+ Z
94
+ `}function Yrt(t,n,e){return`
95
+ M ${t} ${n-e}
96
+ L ${t+e} ${n+e}
97
+ L ${t-e} ${n+e}
98
+ Z
99
+ `}function Hrt(t,n,e){const r=e*4/3,i=Math.max(r,e*2),a=r/2,o=t,s=a+n-i/2,l=Math.asin(a/((i-a)*.85)),c=Math.sin(l)*a,u=Math.cos(l)*a,f=o-u,d=s+c,h=t,p=s+a/Math.sin(l);return`
100
+ M ${f} ${d}
101
+ A ${a} ${a} 0 1 1 ${f+u*2} ${d}
102
+ Q ${h} ${p} ${t} ${n+i/2}
103
+ Q ${h} ${p} ${f} ${d}
104
+ Z
105
+ `}const oM={pin:Hrt,rect:Wrt,circle:zrt,diamond:Grt,triangle:Yrt};var sM=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};const Urt=(t="circle")=>oM[t]||oM.circle,tR=(t,n)=>{if(!n)return;const{coordinate:e}=n,{liquidOptions:r,styleOptions:i}=t,{liquidShape:a,percent:o}=r,{background:s,outline:l={},wave:c={}}=i,u=sM(i,["background","outline","wave"]),{border:f=2,distance:d=0}=l,h=sM(l,["border","distance"]),{length:p=192,count:g=3}=c;return(y,m,x)=>{const{document:_}=n.canvas,{color:w,fillOpacity:O}=x,S=Object.assign(Object.assign({fill:w},x),u),E=_.createElement("g",{}),[M,A]=e.getCenter(),T=e.getSize(),P=Math.min(...T)/2,N=Xn(a)?a:Urt(a),C=N(M,A,P,...T),R=N(M,A,P+f/2,...T);if(Object.keys(s).length){const j=_.createElement("path",{style:Object.assign({d:C,fill:"#fff"},s)});E.appendChild(j)}if(o>0){const j=_.createElement("path",{style:{d:R}});E.appendChild(j),E.style.clipPath=j,Brt(M,A,1-o,g,S,E,j.getBBox().y,P*2,p,!0,_)}const D=_.createElement("path",{style:{d:C,fill:"transparent",lineWidth:f+2*d,stroke:"#fff"}}),F=_.createElement("path",{style:Object.assign(Object.assign(Object.assign({d:C,stroke:w,strokeOpacity:O,lineWidth:f},S),h),{fill:"transparent"})});return E.appendChild(D),E.appendChild(F),E}};tR.props={};const lM=(t,n)=>Math.sqrt(Math.pow(t[0]-n[0],2)+Math.pow(t[1]-n[1],2))/2,Vrt=(t,n,e)=>{const r=Math.atan2(t[1]-e[1],t[0]-e[0]);let a=Math.atan2(n[1]-e[1],n[0]-e[0])-r;return a<0&&(a+=Math.PI*2),a},Xrt=(t,n)=>{if(!n)return;const{coordinate:e}=n;if(!(e!=null&&e.getCenter))return;const r=e.getCenter();return(i,a,o)=>{const{document:s}=n.canvas,{color:l,index:c}=a,u=s.createElement("g",{}),f=lM(i[0],i[1]),d=lM(i[0],r)*2,h=Vrt(i[3],i[0],r)>Math.PI,p=s.createElement("path",{style:Object.assign(Object.assign(Object.assign({d:[["M",...i[0]],["A",f,f,0,1,0,...i[1]],["A",d+f*2,d+f*2,0,h?1:0,0,...i[2]],["A",f,f,0,1,c===0?0:1,...i[3]],["A",d,d,0,h?1:0,1,...i[0]],["Z"]]},o),zb(t,["shape","last","first"])),{fill:l||o.color})});return u.appendChild(p),u}},cM="main-layer",j1="label-layer",oa="element",Qp="view",Wo="plot",uM="component",F1="label",fM="area",em="axis-breaks",eR="axis-breaks-group";var Ch=function(t,n,e,r){function i(a){return a instanceof e?a:new e(function(o){o(a)})}return new(e||(e=Promise))(function(a,o){function s(u){try{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?a(u.value):i(u.value).then(s,l)}c((r=r.apply(t,n||[])).next())})},qrt=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};const Krt=.03,Zrt={fill:"#fff",stroke:"#aaa",lineDash:"4 3",lineWidth:.5,fillOpacity:1,strokeOpacity:1},ws=0,Qrt=(t,n,e,r,i,a)=>{const o=[],s=[],l=r-1;for(let c=1;c<l;c++){const u=c/l*n,f=t+(c%2===0?e:-e);o.push(`${u},${f}`),s.push(`${u},${i?f-a:f+a}`)}return o.push(`${n},${t}`),s.push(`${n+a},${t}`),[o,s]},nR=(t,n)=>{const{context:e,selection:r,view:i}=n,a=r.select(`.${Wo}`).node(),{document:o}=e.canvas,{scale:s}=i,l=new Map,c=(f,d,h)=>Ch(void 0,void 0,void 0,function*(){const{update:p,setState:g}=e.externals;g("options",y=>{const{marks:m}=y;if(!m||!m.length)return y;const x=m.map(_=>{const w=zt(_,"scale.y.breaks",[]),O=w.filter(S=>S.start!==d&&S.end!==h&&!S.collapsed);return w.forEach(S=>{S.start===d&&S.end===h&&(S.collapsed=!0)}),console.log("breaks group:",w,O),at({},_,{scale:{y:{breaks:O}}})});return l.set(f,{start:d,end:h}),Object.assign(Object.assign({},y),{marks:x})}),yield p()}),u=()=>Ch(void 0,void 0,void 0,function*(){if(!l.size)return;const{update:f,setState:d}=e.externals;d("options",h=>{const{marks:p}=h,g=p.map(y=>{const m=zt(y,"scale.y.breaks",[]);return Hv(y,"scale.y.breaks",m.map(x=>Object.assign(Object.assign({},x),{collapsed:!1}))),y});return l.clear(),Object.assign(Object.assign({},h),{marks:g})}),yield f()});return f=>{const{key:d,start:h,end:p,gap:g=Krt,vertices:y=50,lineWidth:m=.5,verticeOffset:x=3}=f,_=qrt(f,["key","start","end","gap","vertices","lineWidth","verticeOffset"]),w=o.createElement("g",{id:`break-group-${d}`,className:eR}),O=zt(s,"x.sortedDomain",[]),S=s.y.getOptions(),{range:E,domain:M}=S,A=M.indexOf(h),T=M.indexOf(p),{width:P,height:N}=a.getBBox();if(A===-1||T===-1||!O.length)return w;const C=E[0]>E[1],R=E[A]*N,D=E[T]*N;let F="",j="";for(const[$,{y:z,isLower:Y}]of[{y:D,isLower:!1},{y:R,isLower:!0}].entries()){const H=C?m:-m,[V,Z]=Qrt(z,P-ws,x,y,Y,H);$===0?(F=`M ${ws},${z} L ${V.join(" L ")} `,j=`M ${ws-m},${z+H} L ${Z.join(" L ")} `):(F+=`L ${P-ws},${z} L ${[...V].reverse().join(" L ")} L ${ws},${z} Z`,j+=`L ${P-ws+m+2},${z-H} L ${[...Z].reverse().join(" L ")} L ${ws-m},${z-H} Z`)}const I=Object.assign(Object.assign({},Zrt),_);try{const $=new ur({style:Object.assign(Object.assign({},I),{d:F})}),z=new ur({style:Object.assign(Object.assign({},I),{d:j,lineWidth:0,cursor:"pointer"})});z.addEventListener("click",Y=>Ch(void 0,void 0,void 0,function*(){Y.stopPropagation(),Y.detail===2&&(yield c(d,h,p))})),w.appendChild($),w.appendChild(z),a.addEventListener("click",Y=>Ch(void 0,void 0,void 0,function*(){Y.detail===2&&(yield u())})),a.appendChild(w)}catch($){console.error("Failed to create break path:",$)}return w}};nR.props={};function dM(t,n){return t.getBandWidth(t.invert(n))}const hM={rect:al,hollow:y0,funnel:Rx,pyramid:iL},rR=()=>(t,n,e,r)=>{const{x:i,y1:a,series:o,size:s}=e;let{y:l}=e;l=l.map(g=>g!==void 0?g:1);const c=n.x,u=n.series,[f]=r.getSize(),d=s?s.map(g=>+g/f):null,h=s?(g,y,m)=>{const x=g+y/2,_=d[m];return[x-_/2,x+_/2]}:(g,y,m)=>[g,g+y],p=Array.from(t,g=>{const y=dM(c,i[g]),m=u?dM(u,o==null?void 0:o[g]):1,x=y*m,_=(+(o==null?void 0:o[g])||0)*y,w=+i[g]+_,[O,S]=h(w,x,g),E=+l[g],M=+a[g];return[[O,E],[S,E],[S,M],[O,M]].map(C=>r.map(C))});return[t,p]};rR.props={defaultShape:"rect",defaultLabelShape:"label",composite:!1,shape:hM,channels:[..._r({shapes:Object.keys(hM)}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"},{name:"size"}],preInference:[...Mn(),{type:Ff},{type:Xo}],postInference:[...Ln(),...Ec()],interaction:{shareTooltip:!0}};const pM={rect:al,hollow:y0},iR=()=>(t,n,e,r)=>{const{x:i,x1:a,y:o,y1:s}=e,l=Array.from(t,c=>{const u=[+i[c],+o[c]],f=[+a[c],+o[c]],d=[+a[c],+s[c]],h=[+i[c],+s[c]];return[u,f,d,h].map(p=>r.map(p))});return[t,l]};iR.props={defaultShape:"rect",defaultLabelShape:"label",composite:!1,shape:pM,channels:[..._r({shapes:Object.keys(pM)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...Mn(),{type:Ff}],postInference:[...Ln(),...Ec()],interaction:{shareTooltip:!0}};const vM={line:aL,smooth:oL,hv:sL,vh:lL,hvh:cL,trail:uL},Jrt=(t,n,e,r)=>{var i,a;const{series:o,x:s,y:l}=e,{x:c,y:u}=n;if(s===void 0||l===void 0)throw new Error("Missing encode for x or y channel.");const f=o?Array.from(Ue(t,y=>o[y]).values()):[t],d=f.map(y=>y[0]).filter(y=>y!==void 0),h=(((i=c==null?void 0:c.getBandWidth)===null||i===void 0?void 0:i.call(c))||0)/2,p=(((a=u==null?void 0:u.getBandWidth)===null||a===void 0?void 0:a.call(u))||0)/2,g=Array.from(f,y=>y.map(m=>r.map([+s[m]+h,+l[m]+p])));return[d,g,f]},tit=(t,n,e,r)=>{const i=Object.entries(e).filter(([o])=>o.startsWith("position")).map(([,o])=>o);if(i.length===0)throw new Error("Missing encode for position channel.");Ie(r)&&i.push(i[0]);const a=Array.from(t,o=>{const s=i.map(u=>+u[o]),l=r.map(s),c=[];for(let u=0;u<l.length;u+=2)c.push([l[u],l[u+1]]);return c});return[t,a]},aR=()=>(t,n,e,r)=>(s0(r)?tit:Jrt)(t,n,e,r);aR.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,shape:vM,channels:[..._r({shapes:Object.keys(vM)}),{name:"x"},{name:"y"},{name:"position",independent:!0},{name:"size"},{name:"series",scale:"band"}],preInference:[...Mn(),{type:v3},{type:lx}],postInference:[...Ln(),...Ec(),...trt()],interaction:{shareTooltip:!0,seriesTooltip:!0,crosshairs:!0}};const gM={hollow:Ux,hollowDiamond:Yx,hollowHexagon:Hx,hollowSquare:Vx,hollowTriangleDown:qx,hollowTriangle:Xx,hollowBowtie:Gx,hollowCircle:Kx,point:i2,plus:r2,diamond:Jx,square:a2,triangle:s2,hexagon:t2,cross:Qx,bowtie:Zx,hyphen:e2,line:n2,tick:o2,triangleDown:l2,circle:b0},oR=t=>(n,e,r,i)=>{const{x:a,y:o,x1:s,y1:l,size:c,dx:u,dy:f}=r,[d,h]=i.getSize(),p=Jo(e,r,t),g=m=>{const x=+((u==null?void 0:u[m])||0),_=+((f==null?void 0:f[m])||0),w=s?(+a[m]+ +s[m])/2:+a[m],O=l?(+o[m]+ +l[m])/2:+o[m],S=w+x,E=O+_;return[S,E]},y=c?Array.from(n,m=>{const[x,_]=g(m),w=+c[m],O=w/d,S=w/h,E=[x-O,_-S],M=[x+O,_+S];return[i.map(p(E,m)),i.map(p(M,m))]}):Array.from(n,m=>[i.map(p(g(m),m))]);return[n,y]};oR.props={defaultShape:"hollow",defaultLabelShape:"label",composite:!1,shape:gM,channels:[..._r({shapes:Object.keys(gM)}),{name:"x",required:!0},{name:"y",required:!0},{name:"series",scale:"band"},{name:"size",quantitative:"sqrt"},{name:"dx",scale:"identity"},{name:"dy",scale:"identity"}],preInference:[...Mn(),{type:Xo},{type:Yf}],postInference:[...Ln(),{type:sx},...oo()]};const yM={text:wN,badge:ON,tag:SN},sR=t=>{const{cartesian:n=!1}=t;return n?x2:((e,r,i,a)=>{const{x:o,y:s}=i,l=Jo(r,i,t),c=Array.from(e,u=>{const f=[+o[u],+s[u]];return[a.map(l(f,u))]});return[e,c]})};sR.props={defaultShape:"text",defaultLabelShape:"label",composite:!1,shape:yM,channels:[..._r({shapes:Object.keys(yM)}),{name:"x",required:!0},{name:"y",required:!0},{name:"text",scale:"identity"},{name:"fontSize",scale:"identity"},{name:"rotate",scale:"identity"}],preInference:[...Mn(),{type:n0},{type:e0}],postInference:[...Ln(),...oo()]};const mM={cell:al,hollow:y0},lR=()=>(t,n,e,r)=>{const{x:i,y:a}=e,o=n.x,s=n.y,l=Array.from(t,c=>{const u=o.getBandWidth(o.invert(+i[c])),f=s.getBandWidth(s.invert(+a[c])),d=+i[c],h=+a[c],p=[d,h],g=[d+u,h],y=[d+u,h+f],m=[d,h+f];return[p,g,y,m].map(x=>r.map(x))});return[t,l]};lR.props={defaultShape:"cell",defaultLabelShape:"label",shape:mM,composite:!1,channels:[..._r({shapes:Object.keys(mM)}),{name:"x",required:!0,scale:"band"},{name:"y",required:!0,scale:"band"}],preInference:[...Mn(),{type:Xo},{type:Yf},{type:cx}],postInference:[...Ln(),...oo()]};const bM={area:EN,smooth:kN,hvh:MN,vh:AN,hv:TN},cR=()=>(t,n,e,r)=>{var i,a;const{x:o,y:s,y1:l,series:c}=e,{x:u,y:f}=n,d=c?Array.from(Ue(t,m=>c[m]).values()):[t],h=d.map(m=>m[0]).filter(m=>m!==void 0),p=(((i=u==null?void 0:u.getBandWidth)===null||i===void 0?void 0:i.call(u))||0)/2,g=(((a=f==null?void 0:f.getBandWidth)===null||a===void 0?void 0:a.call(f))||0)/2,y=Array.from(d,m=>{const x=m.length,_=new Array(x*2);for(let w=0;w<m.length;w++){const O=m[w];_[w]=r.map([+o[O]+p,+s[O]+g]),_[x+w]=r.map([+o[O]+p,+l[O]+g])}return _});return[h,y,d]};cR.props={defaultShape:"area",defaultLabelShape:"label",composite:!1,shape:bM,channels:[..._r({shapes:Object.keys(bM)}),{name:"x",required:!0},{name:"y",required:!0},{name:"size"},{name:"series",scale:"band"}],preInference:[...Mn(),{type:lx},{type:Ff},{type:cx}],postInference:[...Ln(),...Ec()],interaction:{shareTooltip:!0,seriesTooltip:!0,crosshairs:!0}};const xM={link:PN,arc:NN,smooth:CN,vhv:LN},k2=t=>(n,e,r,i)=>{const{x:a,y:o,x1:s=a,y1:l=o}=r,c=Jo(e,r,t),u=n.map(f=>[i.map(c([+a[f],+o[f]],f)),i.map(c([+s[f],+l[f]],f))]);return[n,u]};k2.props={defaultShape:"link",defaultLabelShape:"label",composite:!1,shape:xM,channels:[..._r({shapes:Object.keys(xM)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...Mn(),{type:u3},{type:f3}],postInference:[...Ln(),...oo()]};const _M={image:IN},uR=t=>{const{cartesian:n}=t;return n?x2:(e,r,i,a)=>{const{x:o,y:s}=i,l=Jo(r,i,t),c=Array.from(e,u=>{const f=[+o[u],+s[u]];return[a.map(l(f,u))]});return[e,c]}};uR.props={defaultShape:"image",defaultLabelShape:"label",composite:!1,shape:_M,channels:[..._r({shapes:Object.keys(_M)}),{name:"x",required:!0},{name:"y",required:!0},{name:"src",scale:"identity"},{name:"size"}],preInference:[...Mn(),{type:n0},{type:e0}],postInference:[...Ln(),...oo()]};const wM={polygon:DN,ribbon:$N},fR=()=>(t,n,e,r)=>{const i=Object.entries(e).filter(([s])=>s.startsWith("x")).map(([,s])=>s),a=Object.entries(e).filter(([s])=>s.startsWith("y")).map(([,s])=>s),o=t.map(s=>{const l=[];for(let c=0;c<i.length;c++){const u=i[c][s];if(u===void 0)break;const f=a[c][s];l.push(r.map([+u,+f]))}return l});return[t,o]};fR.props={defaultShape:"polygon",defaultLabelShape:"label",composite:!1,shape:wM,channels:[..._r({shapes:Object.keys(wM)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...Mn()],postInference:[...Ln(),...oo()]};const OM={box:jN,violin:FN},dR=()=>(t,n,e,r)=>{const{x:i,y:a,y1:o,y2:s,y3:l,y4:c,series:u}=e,f=n.x,d=n.series,h=Array.from(t,p=>{const g=f.getBandWidth(f.invert(+i[p])),y=d?d.getBandWidth(d.invert(+(u==null?void 0:u[p]))):1,m=g*y,x=(+(u==null?void 0:u[p])||0)*g,_=+i[p]+x+m/2,[w,O,S,E,M]=[+a[p],+o[p],+s[p],+l[p],+c[p]];return[[_-m/2,M],[_+m/2,M],[_,M],[_,E],[_-m/2,E],[_+m/2,E],[_+m/2,O],[_-m/2,O],[_-m/2,S],[_+m/2,S],[_,O],[_,w],[_-m/2,w],[_+m/2,w]].map(T=>r.map(T))});return[t,h]};dR.props={defaultShape:"box",defaultLabelShape:"label",composite:!1,shape:OM,channels:[..._r({shapes:Object.keys(OM)}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"}],preInference:[...Mn(),{type:Xo}],postInference:[...Ln(),...Ec()],interaction:{shareTooltip:!0}};const SM={vector:c2},hR=()=>(t,n,e,r)=>{const{x:i,y:a,size:o,rotate:s}=e,[l,c]=r.getSize(),u=t.map(f=>{const d=+s[f]/180*Math.PI,h=+o[f],p=h/l,g=h/c,y=p*Math.cos(d),m=-g*Math.sin(d);return[r.map([+i[f]-y/2,+a[f]-m/2]),r.map([+i[f]+y/2,+a[f]+m/2])]});return[t,u]};hR.props={defaultShape:"vector",defaultLabelShape:"label",composite:!1,shape:SM,channels:[..._r({shapes:Object.keys(SM)}),{name:"x",required:!0},{name:"y",required:!0},{name:"rotate",required:!0,scale:"identity"},{name:"size",required:!0}],preInference:[...Mn()],postInference:[...Ln(),...oo()]};const EM={line:w2},pR=t=>(n,e,r,i)=>{const{y:a}=r,o=Jo(e,r,at({style:{bandOffset:0}},t)),s=Array.from(n,l=>{const c=[0,a[l]],u=[1,a[l]];return[c,u].map(f=>i.map(o(f,l)))});return[n,s]};pR.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,shape:EM,channels:[...kc({shapes:Object.keys(EM)}),{name:"y",required:!0}],preInference:[...Mn(),{type:l3}],postInference:[...Ln()]};const kM={line:w2},vR=t=>(n,e,r,i)=>{const{x:a}=r,o=Jo(e,r,at({style:{bandOffset:0}},t)),s=Array.from(n,l=>{const c=[a[l],1],u=[a[l],0];return[c,u].map(f=>i.map(o(f,l)))});return[n,s]};vR.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,shape:kM,channels:[...kc({shapes:Object.keys(kM)}),{name:"x",required:!0}],preInference:[...Mn(),{type:c3}],postInference:[...Ln()]};const MM={connector:BN},gR=(...t)=>k2(...t);gR.props={defaultShape:"connector",defaultLabelShape:"label",composite:!1,shape:MM,channels:[...kc({shapes:Object.keys(MM)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...Mn()],postInference:[...Ln()]};function AM(t,n,e,r){if(n)return()=>[0,1];const{[t]:i,[`${t}1`]:a}=e;return o=>{var s;const l=((s=r.getBandWidth)===null||s===void 0?void 0:s.call(r,r.invert(+a[o])))||0;return[i[o],a[o]+l]}}function M2(t={}){const{extendX:n=!1,extendY:e=!1}=t;return(r,i,a,o)=>{const s=AM("x",n,a,i.x),l=AM("y",e,a,i.y),c=Array.from(r,u=>{const[f,d]=s(u),[h,p]=l(u);return[[f,h],[d,h],[d,p],[f,p]].map(_=>o.map(_))});return[r,c]}}const TM={range:al},yR=()=>M2();yR.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,shape:TM,channels:[...kc({shapes:Object.keys(TM)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...Mn()],postInference:[...Ln()]};const PM={range:al},mR=()=>M2({extendY:!0});mR.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,shape:PM,channels:[...kc({shapes:Object.keys(PM)}),{name:"x",required:!0}],preInference:[...Mn(),{type:d3}],postInference:[...Ln()]};const CM={range:al},bR=()=>M2({extendX:!0});bR.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,shape:CM,channels:[...kc({shapes:Object.keys(CM)}),{name:"y",required:!0}],preInference:[...Mn(),{type:h3}],postInference:[...Ln()]};function eit(t){return t.target.depth}function nit(t){return t.depth}function rit(t,n){return n-1-t.height}function Jp(t,n){return t.sourceLinks.length?t.depth:n-1}function iit(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?ti(t.sourceLinks,eit)-1:0}function Lh(t){return function(){return t}}function LM(t,n){return tv(t.source,n.source)||t.index-n.index}function NM(t,n){return tv(t.target,n.target)||t.index-n.index}function tv(t,n){return t.y0-n.y0}function nm(t){return t.value}function ait(t){return t.index}function oit(t){return t.nodes}function sit(t){return t.links}function RM(t,n){const e=t.get(n);if(!e)throw new Error("missing: "+n);return e}function IM({nodes:t}){for(const n of t){let e=n.y0,r=e;for(const i of n.sourceLinks)i.y0=e+i.width/2,e+=i.width;for(const i of n.targetLinks)i.y1=r+i.width/2,r+=i.width}}function lit(){let t=0,n=0,e=1,r=1,i=24,a=8,o,s=ait,l=Jp,c,u,f,d=oit,h=sit,p=6;function g(F){const j={nodes:d(F),links:h(F)};return y(j),m(j),x(j),_(j),S(j),IM(j),j}g.update=function(F){return IM(F),F},g.nodeId=function(F){return arguments.length?(s=typeof F=="function"?F:Lh(F),g):s},g.nodeAlign=function(F){return arguments.length?(l=typeof F=="function"?F:Lh(F),g):l},g.nodeDepth=function(F){return arguments.length?(c=F,g):c},g.nodeSort=function(F){return arguments.length?(u=F,g):u},g.nodeWidth=function(F){return arguments.length?(i=+F,g):i},g.nodePadding=function(F){return arguments.length?(a=o=+F,g):a},g.nodes=function(F){return arguments.length?(d=typeof F=="function"?F:Lh(F),g):d},g.links=function(F){return arguments.length?(h=typeof F=="function"?F:Lh(F),g):h},g.linkSort=function(F){return arguments.length?(f=F,g):f},g.size=function(F){return arguments.length?(t=n=0,e=+F[0],r=+F[1],g):[e-t,r-n]},g.extent=function(F){return arguments.length?(t=+F[0][0],e=+F[1][0],n=+F[0][1],r=+F[1][1],g):[[t,n],[e,r]]},g.iterations=function(F){return arguments.length?(p=+F,g):p};function y({nodes:F,links:j}){F.forEach(($,z)=>{$.index=z,$.sourceLinks=[],$.targetLinks=[]});const I=new Map(F.map($=>[s($),$]));if(j.forEach(($,z)=>{$.index=z;let{source:Y,target:H}=$;typeof Y!="object"&&(Y=$.source=RM(I,Y)),typeof H!="object"&&(H=$.target=RM(I,H)),Y.sourceLinks.push($),H.targetLinks.push($)}),f!=null)for(const{sourceLinks:$,targetLinks:z}of F)$.sort(f),z.sort(f)}function m({nodes:F}){for(const j of F)j.value=j.fixedValue===void 0?Math.max(Oi(j.sourceLinks,nm),Oi(j.targetLinks,nm)):j.fixedValue}function x({nodes:F}){const j=F.length;let I=new Set(F),$=new Set,z=0;for(;I.size;){if(I.forEach(Y=>{Y.depth=z;for(const{target:H}of Y.sourceLinks)$.add(H)}),++z>j)throw new Error("circular link");I=$,$=new Set}if(c){const Y=Math.max(Re(F,V=>V.depth)+1,0);let H;for(let V=0;V<F.length;V++)H=F[V],H.depth=c.call(null,H,Y)}}function _({nodes:F}){const j=F.length;let I=new Set(F),$=new Set,z=0;for(;I.size;){if(I.forEach(Y=>{Y.height=z;for(const{source:H}of Y.targetLinks)$.add(H)}),++z>j)throw new Error("circular link");I=$,$=new Set}}function w({nodes:F}){const j=Math.max(Re(F,z=>z.depth)+1,0),I=(e-t-i)/(j-1),$=new Array(j).fill(0).map(()=>[]);for(const z of F){const Y=Math.max(0,Math.min(j-1,Math.floor(l.call(null,z,j))));z.layer=Y,z.x0=t+Y*I,z.x1=z.x0+i,$[Y]?$[Y].push(z):$[Y]=[z]}if(u)for(const z of $)z.sort(u);return $}function O(F){const j=ti(F,I=>(r-n-(I.length-1)*o)/Oi(I,nm));for(const I of F){let $=n;for(const z of I){z.y0=$,z.y1=$+z.value*j,$=z.y1+o;for(const Y of z.sourceLinks)Y.width=Y.value*j}$=(r-$+o)/(I.length+1);for(let z=0;z<I.length;++z){const Y=I[z];Y.y0+=$*(z+1),Y.y1+=$*(z+1)}C(I)}}function S(F){const j=w(F);o=Math.min(a,(r-n)/(Re(j,I=>I.length)-1)),O(j);for(let I=0;I<p;++I){const $=Math.pow(.99,I),z=Math.max(1-$,(I+1)/p);M(j,$,z),E(j,$,z)}}function E(F,j,I){for(let $=1,z=F.length;$<z;++$){const Y=F[$];for(const H of Y){let V=0,Z=0;for(const{source:J,value:rt}of H.targetLinks){const K=rt*(H.layer-J.layer);V+=R(J,H)*K,Z+=K}if(!(Z>0))continue;const q=(V/Z-H.y0)*j;H.y0+=q,H.y1+=q,N(H)}u===void 0&&Y.sort(tv),Y.length&&A(Y,I)}}function M(F,j,I){for(let $=F.length,z=$-2;z>=0;--z){const Y=F[z];for(const H of Y){let V=0,Z=0;for(const{target:J,value:rt}of H.sourceLinks){const K=rt*(J.layer-H.layer);V+=D(H,J)*K,Z+=K}if(!(Z>0))continue;const q=(V/Z-H.y0)*j;H.y0+=q,H.y1+=q,N(H)}u===void 0&&Y.sort(tv),Y.length&&A(Y,I)}}function A(F,j){const I=F.length>>1,$=F[I];P(F,$.y0-o,I-1,j),T(F,$.y1+o,I+1,j),P(F,r,F.length-1,j),T(F,n,0,j)}function T(F,j,I,$){for(;I<F.length;++I){const z=F[I],Y=(j-z.y0)*$;Y>1e-6&&(z.y0+=Y,z.y1+=Y),j=z.y1+o}}function P(F,j,I,$){for(;I>=0;--I){const z=F[I],Y=(z.y1-j)*$;Y>1e-6&&(z.y0-=Y,z.y1-=Y),j=z.y0-o}}function N({sourceLinks:F,targetLinks:j}){if(f===void 0){for(const{source:{sourceLinks:I}}of j)I.sort(NM);for(const{target:{targetLinks:I}}of F)I.sort(LM)}}function C(F){if(f===void 0)for(const{sourceLinks:j,targetLinks:I}of F)j.sort(NM),I.sort(LM)}function R(F,j){let I=F.y0-(F.sourceLinks.length-1)*o/2;for(const{target:$,width:z}of F.sourceLinks){if($===j)break;I+=z+o}for(const{source:$,width:z}of j.targetLinks){if($===F)break;I-=z}return I}function D(F,j){let I=j.y0-(j.targetLinks.length-1)*o/2;for(const{source:$,width:z}of j.targetLinks){if($===F)break;I+=z+o}for(const{target:$,width:z}of F.sourceLinks){if($===j)break;I-=z}return I}return g}const cit={nodeAlign:"justify",nodeWidth:.008,nodePadding:.03,nodes:t=>t.nodes,links:t=>t.links,nodeSort:void 0,linkSort:void 0,iterations:6},uit={left:nit,right:rit,center:iit,justify:Jp};function fit(t){const n=typeof t;return n==="string"?uit[t]||Jp:n==="function"?t:Jp}const xR=t=>n=>{const{nodeId:e,nodeSort:r,nodeAlign:i,nodeWidth:a,nodePadding:o,nodeDepth:s,nodes:l,links:c,linkSort:u,iterations:f}=Object.assign({},cit,t),d=lit().nodeSort(r).linkSort(u).links(c).nodes(l).nodeWidth(a).nodePadding(o).nodeDepth(s).nodeAlign(fit(i)).iterations(f).extent([[0,0],[1,1]]);typeof e=="function"&&d.nodeId(e);const h=d(n),{nodes:p,links:g}=h,y=p.map(x=>{const{x0:_,x1:w,y0:O,y1:S}=x;return Object.assign(Object.assign({},x),{x:[_,w,w,_],y:[O,O,S,S]})}),m=g.map(x=>{const{source:_,target:w}=x,O=_.x1,S=w.x0,E=x.width/2;return Object.assign(Object.assign({},x),{x:[O,O,S,S],y:[x.y0+E,x.y0-E,x.y1+E,x.y1-E]})});return{nodes:y,links:m}};xR.props={};function Ea(t,n,e={},r=!1){if(eo(t)||Array.isArray(t)&&r)return t;const i=bt(t,n);return at(e,i)}function ev(t,n={}){return eo(t)||Array.isArray(t)||!_R(t)?t:at(n,t)}function _R(t){if(Object.keys(t).length===0)return!0;const{title:n,items:e}=t;return n!==void 0||e!==void 0}function ka(t,n){return typeof t=="object"?bt(t,n):t}var dit=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};const hit={nodeId:t=>t.key,nodeWidth:.02,nodePadding:.02},DM={type:"polygon",axis:!1,legend:!1,encode:{shape:"polygon",x:"x",y:"y"},scale:{x:{type:"identity"},y:{type:"identity"}},style:{stroke:"#000"}},$M={type:"polygon",axis:!1,legend:!1,encode:{shape:"ribbon",x:"x",y:"y"},style:{fillOpacity:.5,stroke:void 0}},pit={textAlign:t=>t.x[0]<.5?"start":"end",position:t=>t.x[0]<.5?"right":"left",fontSize:10},wR=t=>{const{data:n,encode:e={},scale:r,style:i={},layout:a={},nodeLabels:o=[],linkLabels:s=[],animate:l={},tooltip:c={},interaction:u,state:f={},viewStyle:d={}}=t,{links:h,nodes:p}=_2(n,e);if(!h||h.length===0)return[at({},DM,{data:[],encode:{},scale:r,style:bt(i,"node"),viewStyle:d,labels:[],tooltip:!1,animate:!1,axis:!1,interaction:u,state:{}}),at({},$M,{data:[],encode:{},labels:[],style:bt(i,"link"),tooltip:!1,animate:!1,interaction:u,state:{}})];const g=bt(e,"node"),y=bt(e,"link"),{key:m=R=>R.key,color:x=m}=g,{links:_,nodes:w}=xR(Object.assign(Object.assign(Object.assign({},hit),{nodeId:ma(m)}),a))({links:h,nodes:p}),O=bt(i,"label"),{text:S=m,spacing:E=5}=O,M=dit(O,["text","spacing"]),A=ma(m),T=Ea(c,"node",{title:A,items:[{field:"value"}]},!0),P=Ea(c,"link",{title:"",items:[R=>({name:"source",value:A(R.source)}),R=>({name:"target",value:A(R.target)})]}),[N,C]=Object.entries(f).reduce((R,[D,F])=>{const j=np(F,"node","link"),I=bt(F,"node");R[0][D]=Object.assign(Object.assign({},j),I);const $=bt(F,"link");return R[1][D]=Object.assign(Object.assign({},j),$),R},[{},{}]);return[at({},DM,{data:w,encode:Object.assign(Object.assign({},g),{color:x}),scale:r,style:bt(i,"node"),viewStyle:d,labels:[Object.assign(Object.assign(Object.assign({},pit),{text:S,dx:R=>R.x[0]<.5?E:-E}),M),...o],tooltip:T,animate:ka(l,"node"),axis:!1,interaction:u,state:N}),at({},$M,{data:_,encode:y,labels:s,style:Object.assign({fill:y.color?void 0:"#aaa",lineWidth:0},bt(i,"link")),tooltip:P,animate:ka(l,"link"),interaction:u,state:C})]};wR.props={};function vit(t,n){return n.value-t.value}function git(t,n){return n.frequency-t.frequency}function yit(t,n){return`${t.id}`.localeCompare(`${n.id}`)}function mit(t,n){return`${t.name}`.localeCompare(`${n.name}`)}const bit=Object.freeze(Object.defineProperty({__proto__:null,frequency:git,id:yit,name:mit,weight:vit},Symbol.toStringTag,{value:"Module"})),xit={y:0,thickness:.05,weight:!1,marginRatio:.1,id:t=>t.id,source:t=>t.source,target:t=>t.target,sourceWeight:t=>t.value||1,targetWeight:t=>t.value||1,sortBy:null};function _it(t){const{y:n,thickness:e,weight:r,marginRatio:i,id:a,source:o,target:s,sourceWeight:l,targetWeight:c,sortBy:u}=Object.assign(Object.assign({},xit),t);function f(y){const m=y.nodes.map(_=>Object.assign({},_)),x=y.edges.map(_=>Object.assign({},_));return d(m,x),h(m),p(m,x),g(m,x),{nodes:m,edges:x}}function d(y,m){m.forEach(w=>{w.source=o(w),w.target=s(w),w.sourceWeight=l(w),w.targetWeight=c(w)});const x=Ue(m,w=>w.source),_=Ue(m,w=>w.target);return y.forEach(w=>{w.id=a(w);const O=x.has(w.id)?x.get(w.id):[],S=_.has(w.id)?_.get(w.id):[];w.frequency=O.length+S.length,w.value=Oi(O,E=>E.sourceWeight)+Oi(S,E=>E.targetWeight)}),{nodes:y,edges:m}}function h(y,m){const x=typeof u=="function"?u:bit[u];x&&y.sort(x)}function p(y,m){const x=y.length;if(!x)throw rc("Invalid nodes: it's empty!");if(!r){const O=1/x;return y.forEach((S,E)=>{S.x=(E+.5)*O,S.y=n}),{nodes:y,edges:m}}const _=i/(2*x),w=y.reduce((O,S)=>O+=S.value,0);return y.reduce((O,S)=>{S.weight=S.value/w,S.width=S.weight*(1-i),S.height=e;const E=_+O,M=E+S.width,A=n-e/2,T=A+e;return S.x=[E,M,M,E],S.y=[A,A,T,T],O+S.width+2*_},0),{nodes:y,edges:m}}function g(y,m){const x=new Map(y.map(O=>[O.id,O]));if(!r)return m.forEach(O=>{const S=o(O),E=s(O),M=x.get(S),A=x.get(E);M&&A&&(O.x=[M.x,A.x],O.y=[M.y,A.y])}),{nodes:y,edges:m};m.forEach(O=>{O.x=[0,0,0,0],O.y=[n,n,n,n]});const _=Ue(m,O=>O.source),w=Ue(m,O=>O.target);y.forEach(O=>{const{edges:S,width:E,x:M,y:A,value:T,id:P}=O,N=_.get(P)||[],C=w.get(P)||[];let R=0;N.map(D=>{const F=D.sourceWeight/T*E;D.x[0]=M[0]+R,D.x[1]=M[0]+R+F,R+=F}),C.forEach(D=>{const F=D.targetWeight/T*E;D.x[3]=M[0]+R,D.x[2]=M[0]+R+F,R+=F})})}return f}const A2=t=>n=>_it(t)(n);A2.props={};var jM=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};const rm={y:0,thickness:.05,marginRatio:.1,id:t=>t.key,source:t=>t.source,target:t=>t.target,sourceWeight:t=>t.value||1,targetWeight:t=>t.value||1,sortBy:null},wit={type:"polygon",axis:!1,legend:!1,encode:{shape:"polygon",x:"x",y:"y"},scale:{x:{type:"identity"},y:{type:"identity"}},style:{opacity:1,fillOpacity:1,lineWidth:1}},Oit={type:"polygon",axis:!1,legend:!1,encode:{shape:"ribbon",x:"x",y:"y"},style:{opacity:.5,lineWidth:1}},Sit={position:"outside",fontSize:10},OR=(t,n)=>{const{data:e,encode:r={},scale:i,style:a={},layout:o={},nodeLabels:s=[],linkLabels:l=[],animate:c={},tooltip:u={}}=t,{nodes:f,links:d}=_2(e,r),h=bt(r,"node"),p=bt(r,"link"),{key:g=D=>D.key,color:y=g}=h,{linkEncodeColor:m=D=>D.source}=p,{nodeWidthRatio:x=rm.thickness,nodePaddingRatio:_=rm.marginRatio}=o,w=jM(o,["nodeWidthRatio","nodePaddingRatio"]),{nodes:O,edges:S}=A2(Object.assign(Object.assign(Object.assign(Object.assign({},rm),{id:ma(g),thickness:x,marginRatio:_}),w),{weight:!0}))({nodes:f,edges:d}),E=bt(a,"label"),{text:M=g}=E,A=jM(E,["text"]),T=Ea(u,"node",{title:"",items:[D=>({name:D.key,value:D.value})]},!0),P=Ea(u,"link",{title:"",items:[D=>({name:`${D.source} -> ${D.target}`,value:D.value})]}),{height:N,width:C}=n,R=Math.min(N,C);return[at({},Oit,{data:S,encode:Object.assign(Object.assign({},p),{color:m}),labels:l,style:Object.assign({fill:m?void 0:"#aaa"},bt(a,"link")),tooltip:P,animate:ka(c,"link")}),at({},wit,{data:O,encode:Object.assign(Object.assign({},h),{color:y}),scale:i,style:bt(a,"node"),coordinate:{type:"polar",outerRadius:(R-20)/R,startAngle:-Math.PI*2,endAngle:0},labels:[Object.assign(Object.assign(Object.assign({},Sit),{text:M}),A),...s],tooltip:T,animate:ka(c,"node"),axis:!1})]};OR.props={};const FM={path:VN,hollow:XN},SR=t=>(n,e,r,i)=>[n,n.map(()=>[[0,0]])];SR.props={defaultShape:"path",defaultLabelShape:"label",shape:FM,composite:!1,channels:[..._r({shapes:Object.keys(FM)}),{name:"d",scale:"identity"}],preInference:[...Mn()],postInference:[...Ln()]};function Eit(t,n){return t.parent===n.parent?1:2}function kit(t){return t.reduce(Mit,0)/t.length}function Mit(t,n){return t+n.x}function Ait(t){return 1+t.reduce(Tit,0)}function Tit(t,n){return Math.max(t,n.y)}function Pit(t){for(var n;n=t.children;)t=n[0];return t}function Cit(t){for(var n;n=t.children;)t=n[n.length-1];return t}function Lit(){var t=Eit,n=1,e=1,r=!1;function i(a){var o,s=0;a.eachAfter(function(d){var h=d.children;h?(d.x=kit(h),d.y=Ait(h)):(d.x=o?s+=t(d,o):0,d.y=0,o=d)});var l=Pit(a),c=Cit(a),u=l.x-t(l,c)/2,f=c.x+t(c,l)/2;return a.eachAfter(r?function(d){d.x=(d.x-a.x)*n,d.y=(a.y-d.y)*e}:function(d){d.x=(d.x-u)/(f-u)*n,d.y=(1-(a.y?d.y/a.y:1))*e})}return i.separation=function(a){return arguments.length?(t=a,i):t},i.size=function(a){return arguments.length?(r=!1,n=+a[0],e=+a[1],i):r?null:[n,e]},i.nodeSize=function(a){return arguments.length?(r=!0,n=+a[0],e=+a[1],i):r?[n,e]:null},i}function Nit(t){var n=0,e=t.children,r=e&&e.length;if(!r)n=1;else for(;--r>=0;)n+=e[r].value;t.value=n}function Rit(){return this.eachAfter(Nit)}function Iit(t,n){let e=-1;for(const r of this)t.call(n,r,++e,this);return this}function Dit(t,n){for(var e=this,r=[e],i,a,o=-1;e=r.pop();)if(t.call(n,e,++o,this),i=e.children)for(a=i.length-1;a>=0;--a)r.push(i[a]);return this}function $it(t,n){for(var e=this,r=[e],i=[],a,o,s,l=-1;e=r.pop();)if(i.push(e),a=e.children)for(o=0,s=a.length;o<s;++o)r.push(a[o]);for(;e=i.pop();)t.call(n,e,++l,this);return this}function jit(t,n){let e=-1;for(const r of this)if(t.call(n,r,++e,this))return r}function Fit(t){return this.eachAfter(function(n){for(var e=+t(n.data)||0,r=n.children,i=r&&r.length;--i>=0;)e+=r[i].value;n.value=e})}function Bit(t){return this.eachBefore(function(n){n.children&&n.children.sort(t)})}function zit(t){for(var n=this,e=Wit(n,t),r=[n];n!==e;)n=n.parent,r.push(n);for(var i=r.length;t!==e;)r.splice(i,0,t),t=t.parent;return r}function Wit(t,n){if(t===n)return t;var e=t.ancestors(),r=n.ancestors(),i=null;for(t=e.pop(),n=r.pop();t===n;)i=t,t=e.pop(),n=r.pop();return i}function Git(){for(var t=this,n=[t];t=t.parent;)n.push(t);return n}function Yit(){return Array.from(this)}function Hit(){var t=[];return this.eachBefore(function(n){n.children||t.push(n)}),t}function Uit(){var t=this,n=[];return t.each(function(e){e!==t&&n.push({source:e.parent,target:e})}),n}function*Vit(){var t=this,n,e=[t],r,i,a;do for(n=e.reverse(),e=[];t=n.pop();)if(yield t,r=t.children)for(i=0,a=r.length;i<a;++i)e.push(r[i]);while(e.length)}function Mc(t,n){t instanceof Map?(t=[void 0,t],n===void 0&&(n=Kit)):n===void 0&&(n=qit);for(var e=new dc(t),r,i=[e],a,o,s,l;r=i.pop();)if((o=n(r.data))&&(l=(o=Array.from(o)).length))for(r.children=o,s=l-1;s>=0;--s)i.push(a=o[s]=new dc(o[s])),a.parent=r,a.depth=r.depth+1;return e.eachBefore(ER)}function Xit(){return Mc(this).eachBefore(Zit)}function qit(t){return t.children}function Kit(t){return Array.isArray(t)?t[1]:null}function Zit(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function ER(t){var n=0;do t.height=n;while((t=t.parent)&&t.height<++n)}function dc(t){this.data=t,this.depth=this.height=0,this.parent=null}dc.prototype=Mc.prototype={constructor:dc,count:Rit,each:Iit,eachAfter:$it,eachBefore:Dit,find:jit,sum:Fit,sort:Bit,path:zit,ancestors:Git,descendants:Yit,leaves:Hit,links:Uit,copy:Xit,[Symbol.iterator]:Vit};function sp(t){return t==null?null:kR(t)}function kR(t){if(typeof t!="function")throw new Error;return t}function Es(){return 0}function Pl(t){return function(){return t}}const Qit=1664525,Jit=1013904223,BM=4294967296;function tat(){let t=1;return()=>(t=(Qit*t+Jit)%BM)/BM}function eat(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function nat(t,n){let e=t.length,r,i;for(;e;)i=n()*e--|0,r=t[e],t[e]=t[i],t[i]=r;return t}function rat(t,n){for(var e=0,r=(t=nat(Array.from(t),n)).length,i=[],a,o;e<r;)a=t[e],o&&MR(o,a)?++e:(o=aat(i=iat(i,a)),e=0);return o}function iat(t,n){var e,r;if(im(n,t))return[n];for(e=0;e<t.length;++e)if(Nh(n,t[e])&&im(_u(t[e],n),t))return[t[e],n];for(e=0;e<t.length-1;++e)for(r=e+1;r<t.length;++r)if(Nh(_u(t[e],t[r]),n)&&Nh(_u(t[e],n),t[r])&&Nh(_u(t[r],n),t[e])&&im(AR(t[e],t[r],n),t))return[t[e],t[r],n];throw new Error}function Nh(t,n){var e=t.r-n.r,r=n.x-t.x,i=n.y-t.y;return e<0||e*e<r*r+i*i}function MR(t,n){var e=t.r-n.r+Math.max(t.r,n.r,1)*1e-9,r=n.x-t.x,i=n.y-t.y;return e>0&&e*e>r*r+i*i}function im(t,n){for(var e=0;e<n.length;++e)if(!MR(t,n[e]))return!1;return!0}function aat(t){switch(t.length){case 1:return oat(t[0]);case 2:return _u(t[0],t[1]);case 3:return AR(t[0],t[1],t[2])}}function oat(t){return{x:t.x,y:t.y,r:t.r}}function _u(t,n){var e=t.x,r=t.y,i=t.r,a=n.x,o=n.y,s=n.r,l=a-e,c=o-r,u=s-i,f=Math.sqrt(l*l+c*c);return{x:(e+a+l/f*u)/2,y:(r+o+c/f*u)/2,r:(f+i+s)/2}}function AR(t,n,e){var r=t.x,i=t.y,a=t.r,o=n.x,s=n.y,l=n.r,c=e.x,u=e.y,f=e.r,d=r-o,h=r-c,p=i-s,g=i-u,y=l-a,m=f-a,x=r*r+i*i-a*a,_=x-o*o-s*s+l*l,w=x-c*c-u*u+f*f,O=h*p-d*g,S=(p*w-g*_)/(O*2)-r,E=(g*y-p*m)/O,M=(h*_-d*w)/(O*2)-i,A=(d*m-h*y)/O,T=E*E+A*A-1,P=2*(a+S*E+M*A),N=S*S+M*M-a*a,C=-(Math.abs(T)>1e-6?(P+Math.sqrt(P*P-4*T*N))/(2*T):N/P);return{x:r+S+E*C,y:i+M+A*C,r:C}}function zM(t,n,e){var r=t.x-n.x,i,a,o=t.y-n.y,s,l,c=r*r+o*o;c?(a=n.r+e.r,a*=a,l=t.r+e.r,l*=l,a>l?(i=(c+l-a)/(2*c),s=Math.sqrt(Math.max(0,l/c-i*i)),e.x=t.x-i*r-s*o,e.y=t.y-i*o+s*r):(i=(c+a-l)/(2*c),s=Math.sqrt(Math.max(0,a/c-i*i)),e.x=n.x+i*r-s*o,e.y=n.y+i*o+s*r)):(e.x=n.x+e.r,e.y=n.y)}function WM(t,n){var e=t.r+n.r-1e-6,r=n.x-t.x,i=n.y-t.y;return e>0&&e*e>r*r+i*i}function GM(t){var n=t._,e=t.next._,r=n.r+e.r,i=(n.x*e.r+e.x*n.r)/r,a=(n.y*e.r+e.y*n.r)/r;return i*i+a*a}function Rh(t){this._=t,this.next=null,this.previous=null}function sat(t,n){if(!(a=(t=eat(t)).length))return 0;var e,r,i,a,o,s,l,c,u,f,d;if(e=t[0],e.x=0,e.y=0,!(a>1))return e.r;if(r=t[1],e.x=-r.r,r.x=e.r,r.y=0,!(a>2))return e.r+r.r;zM(r,e,i=t[2]),e=new Rh(e),r=new Rh(r),i=new Rh(i),e.next=i.previous=r,r.next=e.previous=i,i.next=r.previous=e;t:for(l=3;l<a;++l){zM(e._,r._,i=t[l]),i=new Rh(i),c=r.next,u=e.previous,f=r._.r,d=e._.r;do if(f<=d){if(WM(c._,i._)){r=c,e.next=r,r.previous=e,--l;continue t}f+=c._.r,c=c.next}else{if(WM(u._,i._)){e=u,e.next=r,r.previous=e,--l;continue t}d+=u._.r,u=u.previous}while(c!==u.next);for(i.previous=e,i.next=r,e.next=r.previous=r=i,o=GM(e);(i=i.next)!==r;)(s=GM(i))<o&&(e=i,o=s);r=e.next}for(e=[r._],i=r;(i=i.next)!==r;)e.push(i._);for(i=rat(e,n),l=0;l<a;++l)e=t[l],e.x-=i.x,e.y-=i.y;return i.r}function lat(t){return Math.sqrt(t.value)}function cat(){var t=null,n=1,e=1,r=Es;function i(a){const o=tat();return a.x=n/2,a.y=e/2,t?a.eachBefore(YM(t)).eachAfter(am(r,.5,o)).eachBefore(HM(1)):a.eachBefore(YM(lat)).eachAfter(am(Es,1,o)).eachAfter(am(r,a.r/Math.min(n,e),o)).eachBefore(HM(Math.min(n,e)/(2*a.r))),a}return i.radius=function(a){return arguments.length?(t=sp(a),i):t},i.size=function(a){return arguments.length?(n=+a[0],e=+a[1],i):[n,e]},i.padding=function(a){return arguments.length?(r=typeof a=="function"?a:Pl(+a),i):r},i}function YM(t){return function(n){n.children||(n.r=Math.max(0,+t(n)||0))}}function am(t,n,e){return function(r){if(i=r.children){var i,a,o=i.length,s=t(r)*n||0,l;if(s)for(a=0;a<o;++a)i[a].r+=s;if(l=sat(i,e),s)for(a=0;a<o;++a)i[a].r-=s;r.r=l+s}}}function HM(t){return function(n){var e=n.parent;n.r*=t,e&&(n.x=e.x+t*n.x,n.y=e.y+t*n.y)}}function TR(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function Qf(t,n,e,r,i){for(var a=t.children,o,s=-1,l=a.length,c=t.value&&(r-n)/t.value;++s<l;)o=a[s],o.y0=e,o.y1=i,o.x0=n,o.x1=n+=o.value*c}function uat(){var t=1,n=1,e=0,r=!1;function i(o){var s=o.height+1;return o.x0=o.y0=e,o.x1=t,o.y1=n/s,o.eachBefore(a(n,s)),r&&o.eachBefore(TR),o}function a(o,s){return function(l){l.children&&Qf(l,l.x0,o*(l.depth+1)/s,l.x1,o*(l.depth+2)/s);var c=l.x0,u=l.y0,f=l.x1-e,d=l.y1-e;f<c&&(c=f=(c+f)/2),d<u&&(u=d=(u+d)/2),l.x0=c,l.y0=u,l.x1=f,l.y1=d}}return i.round=function(o){return arguments.length?(r=!!o,i):r},i.size=function(o){return arguments.length?(t=+o[0],n=+o[1],i):[t,n]},i.padding=function(o){return arguments.length?(e=+o,i):e},i}var fat={depth:-1},UM={},om={};function dat(t){return t.id}function hat(t){return t.parentId}function B1(){var t=dat,n=hat,e;function r(i){var a=Array.from(i),o=t,s=n,l,c,u,f,d,h,p,g,y=new Map;if(e!=null){const m=a.map((w,O)=>pat(e(w,O,i))),x=m.map(VM),_=new Set(m).add("");for(const w of x)_.has(w)||(_.add(w),m.push(w),x.push(VM(w)),a.push(om));o=(w,O)=>m[O],s=(w,O)=>x[O]}for(u=0,l=a.length;u<l;++u)c=a[u],h=a[u]=new dc(c),(p=o(c,u,i))!=null&&(p+="")&&(g=h.id=p,y.set(g,y.has(g)?UM:h)),(p=s(c,u,i))!=null&&(p+="")&&(h.parent=p);for(u=0;u<l;++u)if(h=a[u],p=h.parent){if(d=y.get(p),!d)throw new Error("missing: "+p);if(d===UM)throw new Error("ambiguous: "+p);d.children?d.children.push(h):d.children=[h],h.parent=d}else{if(f)throw new Error("multiple roots");f=h}if(!f)throw new Error("no root");if(e!=null){for(;f.data===om&&f.children.length===1;)f=f.children[0],--l;for(let m=a.length-1;m>=0&&(h=a[m],h.data===om);--m)h.data=null}if(f.parent=fat,f.eachBefore(function(m){m.depth=m.parent.depth+1,--l}).eachBefore(ER),f.parent=null,l>0)throw new Error("cycle");return f}return r.id=function(i){return arguments.length?(t=sp(i),r):t},r.parentId=function(i){return arguments.length?(n=sp(i),r):n},r.path=function(i){return arguments.length?(e=sp(i),r):e},r}function pat(t){t=`${t}`;let n=t.length;return z1(t,n-1)&&!z1(t,n-2)&&(t=t.slice(0,-1)),t[0]==="/"?t:`/${t}`}function VM(t){let n=t.length;if(n<2)return"";for(;--n>1&&!z1(t,n););return t.slice(0,n)}function z1(t,n){if(t[n]==="/"){let e=0;for(;n>0&&t[--n]==="\\";)++e;if((e&1)===0)return!0}return!1}function vat(t,n){return t.parent===n.parent?1:2}function sm(t){var n=t.children;return n?n[0]:t.t}function lm(t){var n=t.children;return n?n[n.length-1]:t.t}function gat(t,n,e){var r=e/(n.i-t.i);n.c-=r,n.s+=e,t.c+=r,n.z+=e,n.m+=e}function yat(t){for(var n=0,e=0,r=t.children,i=r.length,a;--i>=0;)a=r[i],a.z+=n,a.m+=n,n+=a.s+(e+=a.c)}function mat(t,n,e){return t.a.parent===n.parent?t.a:e}function lp(t,n){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=n}lp.prototype=Object.create(dc.prototype);function bat(t){for(var n=new lp(t,0),e,r=[n],i,a,o,s;e=r.pop();)if(a=e._.children)for(e.children=new Array(s=a.length),o=s-1;o>=0;--o)r.push(i=e.children[o]=new lp(a[o],o)),i.parent=e;return(n.parent=new lp(null,0)).children=[n],n}function xat(){var t=vat,n=1,e=1,r=null;function i(c){var u=bat(c);if(u.eachAfter(a),u.parent.m=-u.z,u.eachBefore(o),r)c.eachBefore(l);else{var f=c,d=c,h=c;c.eachBefore(function(x){x.x<f.x&&(f=x),x.x>d.x&&(d=x),x.depth>h.depth&&(h=x)});var p=f===d?1:t(f,d)/2,g=p-f.x,y=n/(d.x+p+g),m=e/(h.depth||1);c.eachBefore(function(x){x.x=(x.x+g)*y,x.y=x.depth*m})}return c}function a(c){var u=c.children,f=c.parent.children,d=c.i?f[c.i-1]:null;if(u){yat(c);var h=(u[0].z+u[u.length-1].z)/2;d?(c.z=d.z+t(c._,d._),c.m=c.z-h):c.z=h}else d&&(c.z=d.z+t(c._,d._));c.parent.A=s(c,d,c.parent.A||f[0])}function o(c){c._.x=c.z+c.parent.m,c.m+=c.parent.m}function s(c,u,f){if(u){for(var d=c,h=c,p=u,g=d.parent.children[0],y=d.m,m=h.m,x=p.m,_=g.m,w;p=lm(p),d=sm(d),p&&d;)g=sm(g),h=lm(h),h.a=c,w=p.z+x-d.z-y+t(p._,d._),w>0&&(gat(mat(p,c,f),c,w),y+=w,m+=w),x+=p.m,y+=d.m,_+=g.m,m+=h.m;p&&!lm(h)&&(h.t=p,h.m+=x-m),d&&!sm(g)&&(g.t=d,g.m+=y-_,f=c)}return f}function l(c){c.x*=n,c.y=c.depth*e}return i.separation=function(c){return arguments.length?(t=c,i):t},i.size=function(c){return arguments.length?(r=!1,n=+c[0],e=+c[1],i):r?null:[n,e]},i.nodeSize=function(c){return arguments.length?(r=!0,n=+c[0],e=+c[1],i):r?[n,e]:null},i}function M0(t,n,e,r,i){for(var a=t.children,o,s=-1,l=a.length,c=t.value&&(i-e)/t.value;++s<l;)o=a[s],o.x0=n,o.x1=r,o.y0=e,o.y1=e+=o.value*c}var PR=(1+Math.sqrt(5))/2;function CR(t,n,e,r,i,a){for(var o=[],s=n.children,l,c,u=0,f=0,d=s.length,h,p,g=n.value,y,m,x,_,w,O,S;u<d;){h=i-e,p=a-r;do y=s[f++].value;while(!y&&f<d);for(m=x=y,O=Math.max(p/h,h/p)/(g*t),S=y*y*O,w=Math.max(x/S,S/m);f<d;++f){if(y+=c=s[f].value,c<m&&(m=c),c>x&&(x=c),S=y*y*O,_=Math.max(x/S,S/m),_>w){y-=c;break}w=_}o.push(l={value:y,dice:h<p,children:s.slice(u,f)}),l.dice?Qf(l,e,r,i,g?r+=p*y/g:a):M0(l,e,r,g?e+=h*y/g:i,a),g-=y,u=f}return o}const LR=(function t(n){function e(r,i,a,o,s){CR(n,r,i,a,o,s)}return e.ratio=function(r){return t((r=+r)>1?r:1)},e})(PR);function _at(){var t=LR,n=!1,e=1,r=1,i=[0],a=Es,o=Es,s=Es,l=Es,c=Es;function u(d){return d.x0=d.y0=0,d.x1=e,d.y1=r,d.eachBefore(f),i=[0],n&&d.eachBefore(TR),d}function f(d){var h=i[d.depth],p=d.x0+h,g=d.y0+h,y=d.x1-h,m=d.y1-h;y<p&&(p=y=(p+y)/2),m<g&&(g=m=(g+m)/2),d.x0=p,d.y0=g,d.x1=y,d.y1=m,d.children&&(h=i[d.depth+1]=a(d)/2,p+=c(d)-h,g+=o(d)-h,y-=s(d)-h,m-=l(d)-h,y<p&&(p=y=(p+y)/2),m<g&&(g=m=(g+m)/2),t(d,p,g,y,m))}return u.round=function(d){return arguments.length?(n=!!d,u):n},u.size=function(d){return arguments.length?(e=+d[0],r=+d[1],u):[e,r]},u.tile=function(d){return arguments.length?(t=kR(d),u):t},u.padding=function(d){return arguments.length?u.paddingInner(d).paddingOuter(d):u.paddingInner()},u.paddingInner=function(d){return arguments.length?(a=typeof d=="function"?d:Pl(+d),u):a},u.paddingOuter=function(d){return arguments.length?u.paddingTop(d).paddingRight(d).paddingBottom(d).paddingLeft(d):u.paddingTop()},u.paddingTop=function(d){return arguments.length?(o=typeof d=="function"?d:Pl(+d),u):o},u.paddingRight=function(d){return arguments.length?(s=typeof d=="function"?d:Pl(+d),u):s},u.paddingBottom=function(d){return arguments.length?(l=typeof d=="function"?d:Pl(+d),u):l},u.paddingLeft=function(d){return arguments.length?(c=typeof d=="function"?d:Pl(+d),u):c},u}function wat(t,n,e,r,i){var a=t.children,o,s=a.length,l,c=new Array(s+1);for(c[0]=l=o=0;o<s;++o)c[o+1]=l+=a[o].value;u(0,s,t.value,n,e,r,i);function u(f,d,h,p,g,y,m){if(f>=d-1){var x=a[f];x.x0=p,x.y0=g,x.x1=y,x.y1=m;return}for(var _=c[f],w=h/2+_,O=f+1,S=d-1;O<S;){var E=O+S>>>1;c[E]<w?O=E+1:S=E}w-c[O-1]<c[O]-w&&f+1<O&&--O;var M=c[O]-_,A=h-M;if(y-p>m-g){var T=h?(p*A+y*M)/h:y;u(f,O,M,p,g,T,m),u(O,d,A,T,g,y,m)}else{var P=h?(g*A+m*M)/h:m;u(f,O,M,p,g,y,P),u(O,d,A,p,P,y,m)}}}function Oat(t,n,e,r,i){(t.depth&1?M0:Qf)(t,n,e,r,i)}const Sat=(function t(n){function e(r,i,a,o,s){if((l=r._squarify)&&l.ratio===n)for(var l,c,u,f,d=-1,h,p=l.length,g=r.value;++d<p;){for(c=l[d],u=c.children,f=c.value=0,h=u.length;f<h;++f)c.value+=u[f].value;c.dice?Qf(c,i,a,o,g?a+=(s-a)*c.value/g:s):M0(c,i,a,g?i+=(o-i)*c.value/g:o,s),g-=c.value}else r._squarify=l=CR(n,r,i,a,o,s),l.ratio=n}return e.ratio=function(r){return t((r=+r)>1?r:1)},e})(PR);function Eat(t,n){return Array.isArray(t)?typeof n=="function"?B1().path(n)(t):B1()(t):Mc(t)}function NR(t,n=[t.data.name]){t.id=t.id||t.data.name,t.path=n,t.children&&t.children.forEach(e=>{e.id=`${t.id}/${e.data.name}`,e.path=[...n,e.data.name],NR(e,e.path)})}function RR(t){const n=zt(t,["data","name"]);n.replaceAll&&(t.path=n.replaceAll(".","/").split("/")),t.children&&t.children.forEach(e=>{RR(e)})}function kat(t,n){const e={treemapBinary:wat,treemapDice:Qf,treemapSlice:M0,treemapSliceDice:Oat,treemapSquarify:LR,treemapResquarify:Sat},r=t==="treemapSquarify"?e[t].ratio(n):e[t];if(!r)throw new TypeError("Invalid tile method!");return r}function IR(t,n,e){const{value:r}=e,i=kat(n.tile,n.ratio),a=Eat(t,n.path);Cn(t)?RR(a):NR(a),r?a.sum(l=>n.ignoreParentValue&&l.children?0:ma(r)(l)).sort(n.sort):a.count(),_at().tile(i).size(n.size).round(n.round).paddingInner(n.paddingInner).paddingOuter(n.paddingOuter).paddingTop(n.paddingTop).paddingRight(n.paddingRight).paddingBottom(n.paddingBottom).paddingLeft(n.paddingLeft)(a);const o=a.descendants().map(l=>Object.assign(l,{id:l.id.replace(/^\//,""),x:[l.x0,l.x1],y:[l.y0,l.y1]}));return[o.filter(typeof n.layer=="function"?n.layer:l=>l.height===n.layer),o]}var Mat=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};const Aat=(t,n)=>({tile:"treemapSquarify",ratio:.5*(1+Math.sqrt(5)),size:[t,n],round:!1,ignoreParentValue:!0,padding:0,paddingInner:0,paddingOuter:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,sort:(e,r)=>r.value-e.value,layer:0}),Tat=(t,n)=>({type:"rect",axis:!1,encode:{x:"x",y:"y",key:"id",color:e=>e.path[1]},scale:{x:{domain:[0,t],range:[0,1]},y:{domain:[0,n],range:[0,1]}},style:{stroke:"#fff"},state:{active:{opacity:.6},inactive:{opacity:1}}}),Pat={fontSize:10,text:t=>Qr(t.path),position:"inside",fill:"#000",textOverflow:"clip",wordWrap:!0,maxLines:1,wordWrapWidth:t=>t.x1-t.x0,isTreemapLabel:!0},Cat={title:t=>{var n,e;return(e=(n=t.path)===null||n===void 0?void 0:n.join)===null||e===void 0?void 0:e.call(n,".")},items:[{field:"value"}]},Lat={title:t=>Qr(t.path),items:[{field:"value"}]},DR=(t,n)=>{const{width:e,height:r,options:i}=n,{data:a,encode:o={},scale:s,style:l={},layout:c={},labels:u=[],tooltip:f={}}=t,d=Mat(t,["data","encode","scale","style","layout","labels","tooltip"]),h=zt(i,["interaction","treemapDrillDown"])||zt(i,["marks",0,"interaction","treemapDrillDown"]),p=at({},Aat(e,r),c,{layer:h?x=>x.depth===1:c.layer}),[g,y]=IR(a,p,o),m=bt(l,"label");return at({},Tat(e,r),Object.assign(Object.assign({data:g,scale:s,style:l,labels:[Object.assign(Object.assign(Object.assign({},Pat),m),h&&{cursor:"pointer"}),...u]},d),{encode:o,tooltip:ev(f,Cat),axis:!1}),h?{interaction:Object.assign(Object.assign({},d.interaction),{treemapDrillDown:h?Object.assign(Object.assign({},h),{originData:y,layout:p}):void 0}),encode:Object.assign({color:x=>Qr(x.path)},o),tooltip:ev(f,Lat)}:{})};DR.props={};var Nat=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};const Rat=(t,n)=>({size:[t,n],padding:0,sort:(e,r)=>r.value-e.value}),Iat=(t,n,e)=>({type:"point",axis:!1,legend:!1,scale:{x:{domain:[0,t]},y:{domain:[0,n]},size:{type:"identity"}},encode:{x:"x",y:"y",size:"r",shape:"point"},style:{fill:e.color?void 0:r=>r.height===0?"#ddd":"#fff",stroke:e.color?void 0:r=>r.height===0?"":"#000"}}),Dat={text:"",position:"inside",textOverflow:"clip",wordWrap:!0,maxLines:1,wordWrapWidth:t=>t.r*2},$at={title:t=>t.data.name,items:[{field:"value"}]},jat=(t,n,e)=>{const{value:r}=e,i=Cn(t)?B1().path(n.path)(t):Mc(t);return r?i.sum(a=>ma(r)(a)).sort(n.sort):i.count(),cat().size(n.size).padding(n.padding)(i),i.descendants()},$R=(t,n)=>{const{width:e,height:r}=n,{data:i,encode:a={},scale:o={},style:s={},layout:l={},labels:c=[],tooltip:u={}}=t,f=Nat(t,["data","encode","scale","style","layout","labels","tooltip"]),d=Iat(e,r,a),h=jat(i,at({},Rat(e,r),l),at({},d.encode,a)),p=bt(s,"label");return at({},d,Object.assign(Object.assign({data:h,encode:a,scale:o,style:s,labels:[Object.assign(Object.assign({},Dat),p),...c]},f),{tooltip:ev(u,$at),axis:!1}))};$R.props={};var XM=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};function Fat(t,n){return ti(t,e=>n[e])}function Bat(t,n){return Re(t,e=>n[e])}function jR(t,n){const e=T2(t,n)*2.5-P2(t,n)*1.5;return ti(t,r=>n[r]>=e?n[r]:NaN)}function T2(t,n){return Vv(t,.25,e=>n[e])}function zat(t,n){return Vv(t,.5,e=>n[e])}function P2(t,n){return Vv(t,.75,e=>n[e])}function FR(t,n){const e=P2(t,n)*2.5-T2(t,n)*1.5;return Re(t,r=>n[r]<=e?n[r]:NaN)}function Wat(){return(t,n)=>{const{encode:e}=n,{y:r,x:i}=e,{value:a}=r,{value:o}=i;return[Array.from(Ue(t,c=>o[+c]).values()).flatMap(c=>{const u=jR(c,a),f=FR(c,a);return c.filter(d=>a[d]<u||a[d]>f)}),n]}}const BR=t=>{const{data:n,encode:e,style:r={},tooltip:i={},transform:a,animate:o}=t,s=XM(t,["data","encode","style","tooltip","transform","animate"]),{point:l=!0}=r,c=XM(r,["point"]),{y:u}=e,f={y:u,y1:u,y2:u,y3:u,y4:u},d={y1:T2,y2:zat,y3:P2},h=Ea(i,"box",{items:[{channel:"y",name:"min"},{channel:"y1",name:"q1"},{channel:"y2",name:"q2"},{channel:"y3",name:"q3"},{channel:"y4",name:"max"}]},!0),p=Ea(i,"point",{title:{channel:"x"},items:[{name:"outlier",channel:"y"}]});if(!l)return Object.assign({type:"box",data:n,transform:[Object.assign(Object.assign({type:"groupX",y:Fat},d),{y4:Bat})],encode:Object.assign(Object.assign({},e),f),style:c,tooltip:h},s);const g=bt(c,"box"),y=bt(c,"point");return[Object.assign({type:"box",data:n,transform:[Object.assign(Object.assign({type:"groupX",y:jR},d),{y4:FR})],encode:Object.assign(Object.assign({},e),f),style:g,tooltip:h,animate:ka(o,"box")},s),{type:"point",data:n,transform:[{type:Wat}],encode:e,style:Object.assign({},y),tooltip:p,animate:ka(o,"point")}]};BR.props={};const Gat={shape:JN},zR=t=>{const{cartesian:n}=t;return n?x2:(e,r,i,a)=>{const{x:o,y:s}=i,l=Jo(r,i,t),c=Array.from(e,u=>{const f=[+o[u],+s[u]];return[a.map(l(f,u))]});return[e,c]}};zR.props={defaultShape:"shape",defaultLabelShape:"label",composite:!1,shape:Gat,channels:[{name:"x",required:!0},{name:"y",required:!0}],preInference:[...Mn(),{type:n0},{type:e0},{type:p3}]};function Yat(t,n){var e,r=1;t==null&&(t=0),n==null&&(n=0);function i(){var a,o=e.length,s,l=0,c=0;for(a=0;a<o;++a)s=e[a],l+=s.x,c+=s.y;for(l=(l/o-t)*r,c=(c/o-n)*r,a=0;a<o;++a)s=e[a],s.x-=l,s.y-=c}return i.initialize=function(a){e=a},i.x=function(a){return arguments.length?(t=+a,i):t},i.y=function(a){return arguments.length?(n=+a,i):n},i.strength=function(a){return arguments.length?(r=+a,i):r},i}function Hat(t){const n=+this._x.call(null,t),e=+this._y.call(null,t);return WR(this.cover(n,e),n,e,t)}function WR(t,n,e,r){if(isNaN(n)||isNaN(e))return t;var i,a=t._root,o={data:r},s=t._x0,l=t._y0,c=t._x1,u=t._y1,f,d,h,p,g,y,m,x;if(!a)return t._root=o,t;for(;a.length;)if((g=n>=(f=(s+c)/2))?s=f:c=f,(y=e>=(d=(l+u)/2))?l=d:u=d,i=a,!(a=a[m=y<<1|g]))return i[m]=o,t;if(h=+t._x.call(null,a.data),p=+t._y.call(null,a.data),n===h&&e===p)return o.next=a,i?i[m]=o:t._root=o,t;do i=i?i[m]=new Array(4):t._root=new Array(4),(g=n>=(f=(s+c)/2))?s=f:c=f,(y=e>=(d=(l+u)/2))?l=d:u=d;while((m=y<<1|g)===(x=(p>=d)<<1|h>=f));return i[x]=a,i[m]=o,t}function Uat(t){var n,e,r=t.length,i,a,o=new Array(r),s=new Array(r),l=1/0,c=1/0,u=-1/0,f=-1/0;for(e=0;e<r;++e)isNaN(i=+this._x.call(null,n=t[e]))||isNaN(a=+this._y.call(null,n))||(o[e]=i,s[e]=a,i<l&&(l=i),i>u&&(u=i),a<c&&(c=a),a>f&&(f=a));if(l>u||c>f)return this;for(this.cover(l,c).cover(u,f),e=0;e<r;++e)WR(this,o[e],s[e],t[e]);return this}function Vat(t,n){if(isNaN(t=+t)||isNaN(n=+n))return this;var e=this._x0,r=this._y0,i=this._x1,a=this._y1;if(isNaN(e))i=(e=Math.floor(t))+1,a=(r=Math.floor(n))+1;else{for(var o=i-e||1,s=this._root,l,c;e>t||t>=i||r>n||n>=a;)switch(c=(n<r)<<1|t<e,l=new Array(4),l[c]=s,s=l,o*=2,c){case 0:i=e+o,a=r+o;break;case 1:e=i-o,a=r+o;break;case 2:i=e+o,r=a-o;break;case 3:e=i-o,r=a-o;break}this._root&&this._root.length&&(this._root=s)}return this._x0=e,this._y0=r,this._x1=i,this._y1=a,this}function Xat(){var t=[];return this.visit(function(n){if(!n.length)do t.push(n.data);while(n=n.next)}),t}function qat(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function Ar(t,n,e,r,i){this.node=t,this.x0=n,this.y0=e,this.x1=r,this.y1=i}function Kat(t,n,e){var r,i=this._x0,a=this._y0,o,s,l,c,u=this._x1,f=this._y1,d=[],h=this._root,p,g;for(h&&d.push(new Ar(h,i,a,u,f)),e==null?e=1/0:(i=t-e,a=n-e,u=t+e,f=n+e,e*=e);p=d.pop();)if(!(!(h=p.node)||(o=p.x0)>u||(s=p.y0)>f||(l=p.x1)<i||(c=p.y1)<a))if(h.length){var y=(o+l)/2,m=(s+c)/2;d.push(new Ar(h[3],y,m,l,c),new Ar(h[2],o,m,y,c),new Ar(h[1],y,s,l,m),new Ar(h[0],o,s,y,m)),(g=(n>=m)<<1|t>=y)&&(p=d[d.length-1],d[d.length-1]=d[d.length-1-g],d[d.length-1-g]=p)}else{var x=t-+this._x.call(null,h.data),_=n-+this._y.call(null,h.data),w=x*x+_*_;if(w<e){var O=Math.sqrt(e=w);i=t-O,a=n-O,u=t+O,f=n+O,r=h.data}}return r}function Zat(t){if(isNaN(u=+this._x.call(null,t))||isNaN(f=+this._y.call(null,t)))return this;var n,e=this._root,r,i,a,o=this._x0,s=this._y0,l=this._x1,c=this._y1,u,f,d,h,p,g,y,m;if(!e)return this;if(e.length)for(;;){if((p=u>=(d=(o+l)/2))?o=d:l=d,(g=f>=(h=(s+c)/2))?s=h:c=h,n=e,!(e=e[y=g<<1|p]))return this;if(!e.length)break;(n[y+1&3]||n[y+2&3]||n[y+3&3])&&(r=n,m=y)}for(;e.data!==t;)if(i=e,!(e=e.next))return this;return(a=e.next)&&delete e.next,i?(a?i.next=a:delete i.next,this):n?(a?n[y]=a:delete n[y],(e=n[0]||n[1]||n[2]||n[3])&&e===(n[3]||n[2]||n[1]||n[0])&&!e.length&&(r?r[m]=e:this._root=e),this):(this._root=a,this)}function Qat(t){for(var n=0,e=t.length;n<e;++n)this.remove(t[n]);return this}function Jat(){return this._root}function tot(){var t=0;return this.visit(function(n){if(!n.length)do++t;while(n=n.next)}),t}function eot(t){var n=[],e,r=this._root,i,a,o,s,l;for(r&&n.push(new Ar(r,this._x0,this._y0,this._x1,this._y1));e=n.pop();)if(!t(r=e.node,a=e.x0,o=e.y0,s=e.x1,l=e.y1)&&r.length){var c=(a+s)/2,u=(o+l)/2;(i=r[3])&&n.push(new Ar(i,c,u,s,l)),(i=r[2])&&n.push(new Ar(i,a,u,c,l)),(i=r[1])&&n.push(new Ar(i,c,o,s,u)),(i=r[0])&&n.push(new Ar(i,a,o,c,u))}return this}function not(t){var n=[],e=[],r;for(this._root&&n.push(new Ar(this._root,this._x0,this._y0,this._x1,this._y1));r=n.pop();){var i=r.node;if(i.length){var a,o=r.x0,s=r.y0,l=r.x1,c=r.y1,u=(o+l)/2,f=(s+c)/2;(a=i[0])&&n.push(new Ar(a,o,s,u,f)),(a=i[1])&&n.push(new Ar(a,u,s,l,f)),(a=i[2])&&n.push(new Ar(a,o,f,u,c)),(a=i[3])&&n.push(new Ar(a,u,f,l,c))}e.push(r)}for(;r=e.pop();)t(r.node,r.x0,r.y0,r.x1,r.y1);return this}function rot(t){return t[0]}function iot(t){return arguments.length?(this._x=t,this):this._x}function aot(t){return t[1]}function oot(t){return arguments.length?(this._y=t,this):this._y}function C2(t,n,e){var r=new L2(n??rot,e??aot,NaN,NaN,NaN,NaN);return t==null?r:r.addAll(t)}function L2(t,n,e,r,i,a){this._x=t,this._y=n,this._x0=e,this._y0=r,this._x1=i,this._y1=a,this._root=void 0}function qM(t){for(var n={data:t.data},e=n;t=t.next;)e=e.next={data:t.data};return n}var Cr=C2.prototype=L2.prototype;Cr.copy=function(){var t=new L2(this._x,this._y,this._x0,this._y0,this._x1,this._y1),n=this._root,e,r;if(!n)return t;if(!n.length)return t._root=qM(n),t;for(e=[{source:n,target:t._root=new Array(4)}];n=e.pop();)for(var i=0;i<4;++i)(r=n.source[i])&&(r.length?e.push({source:r,target:n.target[i]=new Array(4)}):n.target[i]=qM(r));return t};Cr.add=Hat;Cr.addAll=Uat;Cr.cover=Vat;Cr.data=Xat;Cr.extent=qat;Cr.find=Kat;Cr.remove=Zat;Cr.removeAll=Qat;Cr.root=Jat;Cr.size=tot;Cr.visit=eot;Cr.visitAfter=not;Cr.x=iot;Cr.y=oot;function Tr(t){return function(){return t}}function To(t){return(t()-.5)*1e-6}function sot(t){return t.x+t.vx}function lot(t){return t.y+t.vy}function cot(t){var n,e,r,i=1,a=1;typeof t!="function"&&(t=Tr(t==null?1:+t));function o(){for(var c,u=n.length,f,d,h,p,g,y,m=0;m<a;++m)for(f=C2(n,sot,lot).visitAfter(s),c=0;c<u;++c)d=n[c],g=e[d.index],y=g*g,h=d.x+d.vx,p=d.y+d.vy,f.visit(x);function x(_,w,O,S,E){var M=_.data,A=_.r,T=g+A;if(M){if(M.index>d.index){var P=h-M.x-M.vx,N=p-M.y-M.vy,C=P*P+N*N;C<T*T&&(P===0&&(P=To(r),C+=P*P),N===0&&(N=To(r),C+=N*N),C=(T-(C=Math.sqrt(C)))/C*i,d.vx+=(P*=C)*(T=(A*=A)/(y+A)),d.vy+=(N*=C)*T,M.vx-=P*(T=1-T),M.vy-=N*T)}return}return w>h+T||S<h-T||O>p+T||E<p-T}}function s(c){if(c.data)return c.r=e[c.data.index];for(var u=c.r=0;u<4;++u)c[u]&&c[u].r>c.r&&(c.r=c[u].r)}function l(){if(n){var c,u=n.length,f;for(e=new Array(u),c=0;c<u;++c)f=n[c],e[f.index]=+t(f,c,n)}}return o.initialize=function(c,u){n=c,r=u,l()},o.iterations=function(c){return arguments.length?(a=+c,o):a},o.strength=function(c){return arguments.length?(i=+c,o):i},o.radius=function(c){return arguments.length?(t=typeof c=="function"?c:Tr(+c),l(),o):t},o}function uot(t){return t.index}function KM(t,n){var e=t.get(n);if(!e)throw new Error("node not found: "+n);return e}function fot(t){var n=uot,e=f,r,i=Tr(30),a,o,s,l,c,u=1;t==null&&(t=[]);function f(y){return 1/Math.min(s[y.source.index],s[y.target.index])}function d(y){for(var m=0,x=t.length;m<u;++m)for(var _=0,w,O,S,E,M,A,T;_<x;++_)w=t[_],O=w.source,S=w.target,E=S.x+S.vx-O.x-O.vx||To(c),M=S.y+S.vy-O.y-O.vy||To(c),A=Math.sqrt(E*E+M*M),A=(A-a[_])/A*y*r[_],E*=A,M*=A,S.vx-=E*(T=l[_]),S.vy-=M*T,O.vx+=E*(T=1-T),O.vy+=M*T}function h(){if(o){var y,m=o.length,x=t.length,_=new Map(o.map((O,S)=>[n(O,S,o),O])),w;for(y=0,s=new Array(m);y<x;++y)w=t[y],w.index=y,typeof w.source!="object"&&(w.source=KM(_,w.source)),typeof w.target!="object"&&(w.target=KM(_,w.target)),s[w.source.index]=(s[w.source.index]||0)+1,s[w.target.index]=(s[w.target.index]||0)+1;for(y=0,l=new Array(x);y<x;++y)w=t[y],l[y]=s[w.source.index]/(s[w.source.index]+s[w.target.index]);r=new Array(x),p(),a=new Array(x),g()}}function p(){if(o)for(var y=0,m=t.length;y<m;++y)r[y]=+e(t[y],y,t)}function g(){if(o)for(var y=0,m=t.length;y<m;++y)a[y]=+i(t[y],y,t)}return d.initialize=function(y,m){o=y,c=m,h()},d.links=function(y){return arguments.length?(t=y,h(),d):t},d.id=function(y){return arguments.length?(n=y,d):n},d.iterations=function(y){return arguments.length?(u=+y,d):u},d.strength=function(y){return arguments.length?(e=typeof y=="function"?y:Tr(+y),p(),d):e},d.distance=function(y){return arguments.length?(i=typeof y=="function"?y:Tr(+y),g(),d):i},d}var dot={value:()=>{}};function GR(){for(var t=0,n=arguments.length,e={},r;t<n;++t){if(!(r=arguments[t]+"")||r in e||/[\s.]/.test(r))throw new Error("illegal type: "+r);e[r]=[]}return new cp(e)}function cp(t){this._=t}function hot(t,n){return t.trim().split(/^|\s+/).map(function(e){var r="",i=e.indexOf(".");if(i>=0&&(r=e.slice(i+1),e=e.slice(0,i)),e&&!n.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:r}})}cp.prototype=GR.prototype={constructor:cp,on:function(t,n){var e=this._,r=hot(t+"",e),i,a=-1,o=r.length;if(arguments.length<2){for(;++a<o;)if((i=(t=r[a]).type)&&(i=pot(e[i],t.name)))return i;return}if(n!=null&&typeof n!="function")throw new Error("invalid callback: "+n);for(;++a<o;)if(i=(t=r[a]).type)e[i]=ZM(e[i],t.name,n);else if(n==null)for(i in e)e[i]=ZM(e[i],t.name,null);return this},copy:function(){var t={},n=this._;for(var e in n)t[e]=n[e].slice();return new cp(t)},call:function(t,n){if((i=arguments.length-2)>0)for(var e=new Array(i),r=0,i,a;r<i;++r)e[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=this._[t],r=0,i=a.length;r<i;++r)a[r].value.apply(n,e)},apply:function(t,n,e){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,a=r.length;i<a;++i)r[i].value.apply(n,e)}};function pot(t,n){for(var e=0,r=t.length,i;e<r;++e)if((i=t[e]).name===n)return i.value}function ZM(t,n,e){for(var r=0,i=t.length;r<i;++r)if(t[r].name===n){t[r]=dot,t=t.slice(0,r).concat(t.slice(r+1));break}return e!=null&&t.push({name:n,value:e}),t}var hc=0,wu=0,uu=0,YR=1e3,nv,Ou,rv=0,Us=0,A0=0,yf=typeof performance=="object"&&performance.now?performance:Date,HR=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function UR(){return Us||(HR(vot),Us=yf.now()+A0)}function vot(){Us=0}function W1(){this._call=this._time=this._next=null}W1.prototype=VR.prototype={constructor:W1,restart:function(t,n,e){if(typeof t!="function")throw new TypeError("callback is not a function");e=(e==null?UR():+e)+(n==null?0:+n),!this._next&&Ou!==this&&(Ou?Ou._next=this:nv=this,Ou=this),this._call=t,this._time=e,G1()},stop:function(){this._call&&(this._call=null,this._time=1/0,G1())}};function VR(t,n,e){var r=new W1;return r.restart(t,n,e),r}function got(){UR(),++hc;for(var t=nv,n;t;)(n=Us-t._time)>=0&&t._call.call(void 0,n),t=t._next;--hc}function QM(){Us=(rv=yf.now())+A0,hc=wu=0;try{got()}finally{hc=0,mot(),Us=0}}function yot(){var t=yf.now(),n=t-rv;n>YR&&(A0-=n,rv=t)}function mot(){for(var t,n=nv,e,r=1/0;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:nv=e);Ou=t,G1(r)}function G1(t){if(!hc){wu&&(wu=clearTimeout(wu));var n=t-Us;n>24?(t<1/0&&(wu=setTimeout(QM,t-yf.now()-A0)),uu&&(uu=clearInterval(uu))):(uu||(rv=yf.now(),uu=setInterval(yot,YR)),hc=1,HR(QM))}}const bot=1664525,xot=1013904223,JM=4294967296;function _ot(){let t=1;return()=>(t=(bot*t+xot)%JM)/JM}function wot(t){return t.x}function Oot(t){return t.y}var Sot=10,Eot=Math.PI*(3-Math.sqrt(5));function XR(t){var n,e=1,r=.001,i=1-Math.pow(r,1/300),a=0,o=.6,s=new Map,l=VR(f),c=GR("tick","end"),u=_ot();t==null&&(t=[]);function f(){d(),c.call("tick",n),e<r&&(l.stop(),c.call("end",n))}function d(g){var y,m=t.length,x;g===void 0&&(g=1);for(var _=0;_<g;++_)for(e+=(a-e)*i,s.forEach(function(w){w(e)}),y=0;y<m;++y)x=t[y],x.fx==null?x.x+=x.vx*=o:(x.x=x.fx,x.vx=0),x.fy==null?x.y+=x.vy*=o:(x.y=x.fy,x.vy=0);return n}function h(){for(var g=0,y=t.length,m;g<y;++g){if(m=t[g],m.index=g,m.fx!=null&&(m.x=m.fx),m.fy!=null&&(m.y=m.fy),isNaN(m.x)||isNaN(m.y)){var x=Sot*Math.sqrt(.5+g),_=g*Eot;m.x=x*Math.cos(_),m.y=x*Math.sin(_)}(isNaN(m.vx)||isNaN(m.vy))&&(m.vx=m.vy=0)}}function p(g){return g.initialize&&g.initialize(t,u),g}return h(),n={tick:d,restart:function(){return l.restart(f),n},stop:function(){return l.stop(),n},nodes:function(g){return arguments.length?(t=g,h(),s.forEach(p),n):t},alpha:function(g){return arguments.length?(e=+g,n):e},alphaMin:function(g){return arguments.length?(r=+g,n):r},alphaDecay:function(g){return arguments.length?(i=+g,n):+i},alphaTarget:function(g){return arguments.length?(a=+g,n):a},velocityDecay:function(g){return arguments.length?(o=1-g,n):1-o},randomSource:function(g){return arguments.length?(u=g,s.forEach(p),n):u},force:function(g,y){return arguments.length>1?(y==null?s.delete(g):s.set(g,p(y)),n):s.get(g)},find:function(g,y,m){var x=0,_=t.length,w,O,S,E,M;for(m==null?m=1/0:m*=m,x=0;x<_;++x)E=t[x],w=g-E.x,O=y-E.y,S=w*w+O*O,S<m&&(M=E,m=S);return M},on:function(g,y){return arguments.length>1?(c.on(g,y),n):c.on(g)}}}function kot(){var t,n,e,r,i=Tr(-30),a,o=1,s=1/0,l=.81;function c(h){var p,g=t.length,y=C2(t,wot,Oot).visitAfter(f);for(r=h,p=0;p<g;++p)n=t[p],y.visit(d)}function u(){if(t){var h,p=t.length,g;for(a=new Array(p),h=0;h<p;++h)g=t[h],a[g.index]=+i(g,h,t)}}function f(h){var p=0,g,y,m=0,x,_,w;if(h.length){for(x=_=w=0;w<4;++w)(g=h[w])&&(y=Math.abs(g.value))&&(p+=g.value,m+=y,x+=y*g.x,_+=y*g.y);h.x=x/m,h.y=_/m}else{g=h,g.x=g.data.x,g.y=g.data.y;do p+=a[g.data.index];while(g=g.next)}h.value=p}function d(h,p,g,y){if(!h.value)return!0;var m=h.x-n.x,x=h.y-n.y,_=y-p,w=m*m+x*x;if(_*_/l<w)return w<s&&(m===0&&(m=To(e),w+=m*m),x===0&&(x=To(e),w+=x*x),w<o&&(w=Math.sqrt(o*w)),n.vx+=m*h.value*r/w,n.vy+=x*h.value*r/w),!0;if(h.length||w>=s)return;(h.data!==n||h.next)&&(m===0&&(m=To(e),w+=m*m),x===0&&(x=To(e),w+=x*x),w<o&&(w=Math.sqrt(o*w)));do h.data!==n&&(_=a[h.data.index]*r/w,n.vx+=m*_,n.vy+=x*_);while(h=h.next)}return c.initialize=function(h,p){t=h,e=p,u()},c.strength=function(h){return arguments.length?(i=typeof h=="function"?h:Tr(+h),u(),c):i},c.distanceMin=function(h){return arguments.length?(o=h*h,c):Math.sqrt(o)},c.distanceMax=function(h){return arguments.length?(s=h*h,c):Math.sqrt(s)},c.theta=function(h){return arguments.length?(l=h*h,c):Math.sqrt(l)},c}function qR(t){var n=Tr(.1),e,r,i;typeof t!="function"&&(t=Tr(t==null?0:+t));function a(s){for(var l=0,c=e.length,u;l<c;++l)u=e[l],u.vx+=(i[l]-u.x)*r[l]*s}function o(){if(e){var s,l=e.length;for(r=new Array(l),i=new Array(l),s=0;s<l;++s)r[s]=isNaN(i[s]=+t(e[s],s,e))?0:+n(e[s],s,e)}}return a.initialize=function(s){e=s,o()},a.strength=function(s){return arguments.length?(n=typeof s=="function"?s:Tr(+s),o(),a):n},a.x=function(s){return arguments.length?(t=typeof s=="function"?s:Tr(+s),o(),a):t},a}function KR(t){var n=Tr(.1),e,r,i;typeof t!="function"&&(t=Tr(t==null?0:+t));function a(s){for(var l=0,c=e.length,u;l<c;++l)u=e[l],u.vy+=(i[l]-u.y)*r[l]*s}function o(){if(e){var s,l=e.length;for(r=new Array(l),i=new Array(l),s=0;s<l;++s)r[s]=isNaN(i[s]=+t(e[s],s,e))?0:+n(e[s],s,e)}}return a.initialize=function(s){e=s,o()},a.strength=function(s){return arguments.length?(n=typeof s=="function"?s:Tr(+s),o(),a):n},a.y=function(s){return arguments.length?(t=typeof s=="function"?s:Tr(+s),o(),a):t},a}var Mot=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};const Aot={joint:!0},Tot={type:"link",axis:!1,legend:!1,encode:{x:[t=>t.source.x,t=>t.target.x],y:[t=>t.source.y,t=>t.target.y]},style:{stroke:"#999",strokeOpacity:.6}},Pot={type:"point",axis:!1,legend:!1,encode:{x:"x",y:"y",size:5,color:"group",shape:"point"},style:{stroke:"#fff"}},Cot={text:""};function Lot(t,n,e){const{nodes:r,links:i}=t,{joint:a,nodeStrength:o,linkStrength:s}=n,{nodeKey:l=p=>p.id,linkKey:c=p=>p.id}=e,u=kot(),f=fot(i).id(ma(c));typeof o=="function"&&u.strength(o),typeof s=="function"&&f.strength(s);const d=XR(r).force("link",f).force("charge",u);a?d.force("center",Yat()):d.force("x",qR()).force("y",KR()),d.stop();const h=Math.ceil(Math.log(d.alphaMin())/Math.log(1-d.alphaDecay()));for(let p=0;p<h;p++)d.tick();return{nodesData:r,linksData:i}}const ZR=t=>{const{data:n,encode:e={},scale:r,style:i={},layout:a={},nodeLabels:o=[],linkLabels:s=[],animate:l={},tooltip:c={}}=t,{nodeKey:u=S=>S.id,linkKey:f=S=>S.id}=e,d=Mot(e,["nodeKey","linkKey"]),h=Object.assign({nodeKey:u,linkKey:f},d),p=bt(h,"node"),g=bt(h,"link"),{links:y,nodes:m}=_2(n,h),{nodesData:x,linksData:_}=Lot({links:y,nodes:m},at({},Aot,a),h),w=Ea(c,"link",{items:[S=>({name:"source",value:ma(f)(S.source)}),S=>({name:"target",value:ma(f)(S.target)})]}),O=Ea(c,"node",{items:[S=>({name:"key",value:ma(u)(S)})]},!0);return[at({},Tot,{data:_,encode:g,labels:s,style:bt(i,"link"),tooltip:w,animate:ka(l,"link")}),at({},Pot,{data:x,encode:Object.assign({},p),scale:r,style:bt(i,"node"),tooltip:O,labels:[Object.assign(Object.assign({},Cot),bt(i,"label")),...o],animate:ka(l,"link")})]};ZR.props={};const QR=t=>n=>e=>{const{field:r="value",nodeSize:i,separation:a,sortBy:o,as:s=["x","y"]}=n,[l,c]=s,u=Mc(e,p=>p.children).sum(p=>p[r]).sort(o),f=t();f.size([1,1]),i&&f.nodeSize(i),a&&f.separation(a),f(u);const d=[];u.each(p=>{p[l]=p.x,p[c]=p.y,p.name=p.data.name,d.push(p)});const h=u.links();return h.forEach(p=>{p[l]=[p.source[l],p.target[l]],p[c]=[p.source[c],p.target[c]]}),{nodes:d,edges:h}},JR=t=>QR(Lit)(t);JR.props={};const t4=t=>QR(xat)(t);t4.props={};const Not={sortBy:(t,n)=>n.value-t.value},Rot={axis:!1,legend:!1,type:"point",encode:{x:"x",y:"y",size:2,shape:"point"}},Iot={type:"link",encode:{x:"x",y:"y",shape:"smooth"}},Dot={text:"",fontSize:10},e4=t=>{const{data:n,encode:e={},scale:r={},style:i={},layout:a={},nodeLabels:o=[],linkLabels:s=[],animate:l={},tooltip:c={}}=t,u=e==null?void 0:e.value,{nodes:f,edges:d}=t4(Object.assign(Object.assign(Object.assign({},Not),a),{field:u}))(n),h=Ea(c,"node",{title:"name",items:["value"]},!0),p=Ea(c,"link",{title:"",items:[g=>({name:"source",value:g.source.name}),g=>({name:"target",value:g.target.name})]});return[at({},Iot,{data:d,encode:bt(e,"link"),scale:bt(r,"link"),labels:s,style:Object.assign({stroke:"#999"},bt(i,"link")),tooltip:p,animate:ka(l,"link")}),at({},Rot,{data:f,scale:bt(r,"node"),encode:bt(e,"node"),labels:[Object.assign(Object.assign({},Dot),bt(i,"label")),...o],style:Object.assign({},bt(i,"node")),tooltip:h,animate:ka(l,"node")})]};e4.props={};var $ot=function(t,n,e,r){function i(a){return a instanceof e?a:new e(function(o){o(a)})}return new(e||(e=Promise))(function(a,o){function s(u){try{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?a(u.value):i(u.value).then(s,l)}c((r=r.apply(t,n||[])).next())})},jot=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};function Fot(t,n){const{text:e="text",value:r="value"}=n;return t.map(i=>Object.assign(Object.assign({},i),{text:i[e],value:i[r]}))}const Bot=()=>({axis:!1,type:"text",encode:{x:"x",y:"y",text:"text",rotate:"rotate",fontSize:"size",shape:"tag"},scale:{x:{range:[0,1]},y:{range:[0,1]}},style:{fontFamily:t=>t.fontFamily},tooltip:{items:[t=>({name:t.text,value:t.value})]}}),N2=(t,n)=>$ot(void 0,void 0,void 0,function*(){const{width:e,height:r}=n,{data:i,encode:a={},scale:o,style:s={},layout:l={}}=t,c=jot(t,["data","encode","scale","style","layout"]),u=Fot(i,a);return at({},Bot(),Object.assign(Object.assign({data:{value:u,transform:[Object.assign({type:"wordCloud",size:[e,r]},l)]},encode:a,scale:o,style:s},c),{axis:!1}))});N2.props={};var ju=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};const zot=(t,n)=>{const{shape:e,radius:r}=t,i=ju(t,["shape","radius"]),a=bt(i,"pointer"),o=bt(i,"pin"),{shape:s}=a,l=ju(a,["shape"]),{shape:c}=o,u=ju(o,["shape"]),{coordinate:f,theme:d}=n;return(h,p)=>{const g=h.map(R=>f.invert(R)),[y,m,x]=gX(f,"polar"),_=f.clone(),{color:w}=p,O=jb({startAngle:y,endAngle:m,innerRadius:x,outerRadius:r});O.push(["cartesian"]),_.update({transformations:O});const S=g.map(R=>_.map(R)),[E,M]=Nx(S),[A,T]=f.getCenter(),P=Object.assign(Object.assign({x1:E,y1:M,x2:A,y2:T,stroke:w},l),i),N=Object.assign(Object.assign({cx:A,cy:T,stroke:w},u),i),C=Rt(new Qn);return eo(s)||(typeof s=="function"?C.append(()=>s(S,p,_,d)):C.append("line").call(Pt,P).node()),eo(c)||(typeof c=="function"?C.append(()=>c(S,p,_,d)):C.append("circle").call(Pt,N).node()),C.node()}},tA={coordinate:{type:"radial",innerRadius:.9,outerRadius:1,startAngle:-11/10*Math.PI,endAngle:1/10*Math.PI},axis:{x:!1},legend:!1,tooltip:!1,encode:{x:"x",y:"y",color:"color"},scale:{color:{range:["#30BF78","#D0D0D0"]}}},Wot={style:{shape:zot,lineWidth:4,pointerLineCap:"round",pinR:10,pinFill:"#fff",radius:.6}},Got={type:"text",style:{x:"50%",y:"60%",textAlign:"center",textBaseline:"middle",fontSize:20,fontWeight:800,fill:"#888"},tooltip:!1};function Yot(t){if(Qe(t)){const n=Math.max(0,Math.min(t,1));return{percent:n,target:n,total:1}}return t}function Hot(t,n){const{name:e="score",target:r,total:i,percent:a,thresholds:o=[]}=Yot(t),s=a||r,l=a?1:i,c=Object.assign({y:{domain:[0,l]}},n);return o.length?{targetData:[{x:e,y:s,color:"target"}],totalData:o.map((u,f)=>({x:e,y:f>=1?u-o[f-1]:u,color:f})),target:s,total:l,scale:c}:{targetData:[{x:e,y:s,color:"target"}],totalData:[{x:e,y:s,color:"target"},{x:e,y:l-s,color:"total"}],target:s,total:l,scale:c}}function Uot(t,{target:n,total:e}){const{content:r}=t;return r?r(n,e):n.toString()}const n4=t=>{const{data:n={},scale:e={},style:r={},animate:i={},transform:a=[]}=t,o=ju(t,["data","scale","style","animate","transform"]),{targetData:s,totalData:l,target:c,total:u,scale:f}=Hot(n,e),d=bt(r,"text"),{tooltip:h}=d,p=ju(d,["tooltip"]),g=lV(r,["pointer","pin"]),y=bt(r,"arc"),m=y.shape;return[at({},tA,Object.assign({type:"interval",transform:[{type:"stackY"}],data:l,scale:f,style:m==="round"?Object.assign(Object.assign({},y),{shape:Xrt}):y,animate:typeof i=="object"?bt(i,"arc"):i},o)),at({},tA,Wot,Object.assign({type:"point",data:s,scale:f,style:g,animate:typeof i=="object"?bt(i,"indicator"):i},o)),at({},Got,{style:Object.assign({text:Uot(p,{target:c,total:u})},p),tooltip:h,animate:typeof i=="object"?bt(i,"text"):i})]};n4.props={};const eA={density:qN},r4=()=>(t,n,e,r)=>{const{x:i,series:a}=e,o=Object.entries(e).filter(([f])=>f.startsWith("y")).map(([,f])=>f),s=Object.entries(e).filter(([f])=>f.startsWith("size")).map(([,f])=>f);if(i===void 0||o===void 0||s===void 0)throw new Error("Missing encode for x or y or size channel.");const l=n.x,c=n.series,u=Array.from(t,f=>{const d=l.getBandWidth(l.invert(+i[f])),h=c?c.getBandWidth(c.invert(+(a==null?void 0:a[f]))):1,p=d*h,g=(+(a==null?void 0:a[f])||0)*d,y=+i[f]+g+p/2;return[...o.map((x,_)=>[y+ +s[_][f]/t.length,+o[_][f]]),...o.map((x,_)=>[y-+s[_][f]/t.length,+o[_][f]]).reverse()].map(x=>r.map(x))});return[t,u]};r4.props={defaultShape:"density",defaultLabelShape:"label",composite:!1,shape:eA,channels:[..._r({shapes:Object.keys(eA)}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"size",required:!0},{name:"series",scale:"band"},{name:"size",required:!0,scale:"identity"}],preInference:[...Mn(),{type:Ff},{type:Xo}],postInference:[...Ln(),...Ec()],interaction:{shareTooltip:!0}};const nA={heatmap:QN},i4=t=>(n,e,r,i)=>{const{x:a,y:o,size:s,color:l}=r,c=Array.from(n,u=>{const f=s?+s[u]:40;return[...i.map([+a[u],+o[u]]),l[u],f]});return[[0],[c]]};i4.props={defaultShape:"heatmap",defaultLabelShape:"label",composite:!1,shape:nA,channels:[..._r({shapes:Object.keys(nA)}),{name:"x",required:!0},{name:"y",required:!0},{name:"color",scale:"identity",required:!0},{name:"size"}],preInference:[...Mn(),{type:Xo},{type:Yf}],postInference:[...Ln(),...oo()]};var Vot=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};const Xot={axis:{x:!1,y:!1},legend:!1,tooltip:!1,encode:{x:"type",y:"percent"},scale:{y:{domain:[0,1]}},style:{shape:tR},animate:{enter:{type:"fadeIn"}}},qot={type:"text",style:{x:"50%",y:"50%",textAlign:"center",textBaseline:"middle",fontSize:20,fontWeight:800,fill:"#888"},animate:{enter:{type:"fadeIn"}}},a4=t=>{const{data:n={},style:e={},animate:r}=t,i=Vot(t,["data","style","animate"]),a=Math.max(0,Qe(n)?n:n==null?void 0:n.percent),o=[{percent:a,type:"liquid"}],s=Object.assign(Object.assign({},bt(e,"text")),bt(e,"content")),l=bt(e,"outline"),c=bt(e,"wave"),u=bt(e,"background");return[at({},Xot,Object.assign({type:"interval",data:o,style:{liquidOptions:{percent:a,liquidShape:e==null?void 0:e.shape},styleOptions:Object.assign(Object.assign({},e),{outline:l,wave:c,background:u})},animate:r},i)),at({},qot,{style:Object.assign({text:`${Up(a*100)} %`},s),animate:r})]};a4.props={};const rA={hollow:Ux,hollowDiamond:Yx,hollowHexagon:Hx,hollowSquare:Vx,hollowTriangleDown:qx,hollowTriangle:Xx,hollowBowtie:Gx,hollowCircle:Kx,point:i2,plus:r2,diamond:Jx,square:a2,triangle:s2,hexagon:t2,cross:Qx,bowtie:Zx,hyphen:e2,line:n2,tick:o2,triangleDown:l2,circle:b0},Kot=4,Zot=200,o4=t=>(n,e,r,i)=>{const{x:a,y:o,size:s}=r;if(!a.length||!o.length)return[n,o.map(()=>[[]])];const[l,c]=i.getSize(),u=Jo(e,r,t),f=Array.from(n,g=>{const y=+a[g]*l,m=+o[g]*c,x=+s[g]||Kot;return{i:g,x:y,y:m,r:x}}),d=XR(f).stop().force("collide",cot().radius(g=>g.r+1).strength(1));d.force("x",qR(g=>g.x).strength(0)),d.force("y",KR(g=>g.y).strength(5));for(let g=0;g<Zot;g++)d.tick();d.stop();const h=g=>{const y=f.find(m=>m.i===g);return[y.x/l,y.y/c]},p=s?Array.from(n,g=>{const[y,m]=h(g),x=+s[g],_=x/l,w=x/c,O=[y-_,m-w],S=[y+_,m+w];return[i.map(u(O,g)),i.map(u(S,g))]}):Array.from(n,g=>[i.map(u(h(g),g))]);return[n,p]};o4.props={defaultShape:"point",defaultLabelShape:"label",composite:!1,shape:rA,channels:[..._r({shapes:Object.keys(rA)}),{name:"x",required:!0},{name:"y",required:!0},{name:"series",scale:"band"},{name:"size",quantitative:"sqrt"}],preInference:[...Mn(),{type:Xo},{type:Yf}],postInference:[...Ln(),{type:sx},...oo()]};var Qot=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};function Jot(t,n={}){const{valueField:e="value",sort:r,fillParent:i=!0,nameField:a="name"}=n;if(!t||t.length===0)return[];const o=(c,u=null,f=0)=>{const d={data:c,depth:f,parent:u,children:[],x0:0,x1:0,value:c[e]||0};return c.children&&c.children.length>0&&(d.children=c.children.map(h=>o(h,d,f+1))),d},s=[];let l=0;return t.forEach(c=>{const u=o(c),f=(p,g=0,y=!1,m=0)=>{if(y||p.depth===0)p.x0=y?g:0,p.x1=p.x0+p.value;else if(p.x0=g,i&&m>0){const O=p.parent?p.parent.children.reduce((M,A)=>M+A.value,0):p.value,S=p.parent?p.parent.children.length:1,E=O>0?p.value/O:1/S;p.x1=g+m*E}else p.x1=g+p.value;let x=p.x0;const _=p.x1-p.x0,w=r?[...p.children].sort((O,S)=>r(O.data,S.data)):p.children;if(i&&w.length>0){const O=p.children.reduce((S,E)=>S+E.value,0);w.forEach(S=>{f(S,x,!1,_);const E=O>0?S.value/O:1/w.length;x+=_*E})}else w.forEach(O=>{f(O,x,!1,0),x+=O.x1-O.x0})};f(u,l,!0),l+=u.value;const d=p=>{var g,y,m;const x=O=>{var S;return(S=O[a])!==null&&S!==void 0?S:O.name},_=[x(p.data)];let w=p;for(;w.parent;)_.unshift(x(w.parent.data)),w=w.parent;return Object.assign(Object.assign({},Df(p.data,[e])),{[s4]:_,[I2]:(m=(y=(g=w.parent)===null||g===void 0?void 0:g.data)===null||y===void 0?void 0:y[a])!==null&&m!==void 0?m:p.data[a],name:p.data[a],depth:p.depth,value:p.value,x:[p.x0,p.x1],y:[p.depth,p.depth+1],[iv]:p.children.length})},h=p=>{s.push(d(p)),p.children.forEach(h)};h(u)}),s}const Yl="partition",R2="markType",s4="path",I2="ancestor-node",iv="childNodeCount";function tst(t){const{data:n,encode:e,fillParent:r,sort:i}=t,{color:a,value:o,name:s}=e;return Jot(n,{valueField:o,fillParent:r,nameField:s,sort:i}).map(c=>{const u=Object.assign({},c);return a&&a!==I2&&(u[a]=c[a]),u})}const iA={id:Yl,encode:{x:"x",y:"y",key:s4,color:I2,value:"value",name:"name"},labels:[{style:{pointerEvents:"none"},text:"value",position:"inside",transform:[{type:"overflowHide"}]}],axis:{x:{title:"Time/Order",label:!0},y:!1},style:{[R2]:Yl,[iv]:"childNodeCount"},state:{active:{zIndex:2},inactive:{zIndex:1}},legend:!1,coordinate:{type:"cartesian",grid:!1},interaction:{drillDown:!0}},l4=t=>{const{encode:n,data:e=[],layout:r={}}=t,i=Qot(t,["encode","data","layout"]),{fillParent:a=!0,sort:o}=r,s=Object.assign(Object.assign({},iA.encode),n),{value:l}=s,c=tst({encode:s,data:e,fillParent:a,sort:o});return[at({},iA,Object.assign({type:"rect",data:c,encode:s,tooltip:{title:"path",items:[u=>({name:l,value:u[l]})]},interaction:{elementHighlight:!0}},i))]};l4.props={};const c4=()=>["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#6F5EF9","#6DC8EC","#945FB9","#FF9845","#1E9493","#FF99C3"];c4.props={};const u4=()=>["#5B8FF9","#CDDDFD","#5AD8A6","#CDF3E4","#5D7092","#CED4DE","#F6BD16","#FCEBB9","#6F5EF9","#D3CEFD","#6DC8EC","#D3EEF9","#945FB9","#DECFEA","#FF9845","#FFE0C7","#1E9493","#BBDEDE","#FF99C3","#FFE0ED"];u4.props={};const f4=t=>new sf(t);f4.props={};const d4=t=>new to(t);d4.props={};const h4=t=>new CC(t);h4.props={};const p4=t=>new IC(t);p4.props={};const v4=t=>new LU(t);v4.props={};const g4=t=>new ZU(t);g4.props={};const y4=t=>new jU(t);y4.props={};const m4=t=>new FC(t);m4.props={};const b4=t=>new Kv(t);b4.props={};const x4=t=>new UC(t);x4.props={};const _4=t=>new YC(t);_4.props={};const w4=t=>new DU(t);w4.props={};const O4=t=>new s1(t);O4.props={};const S4=t=>new nx(t);S4.props={};const so="g2-";function Ms(t){return`.${so}${t}`}const est=[["legendCategory",[[["color","discrete"],["opacity","discrete"],["shape","discrete"],["size","constant"]],[["color","discrete"],["opacity","constant"],["shape","discrete"],["size","constant"]],[["color","discrete"],["opacity","discrete"],["shape","constant"],["size","constant"]],[["color","discrete"],["opacity","constant"],["shape","constant"],["size","constant"]],[["color","constant"],["opacity","discrete"],["shape","discrete"],["size","constant"]],[["color","constant"],["opacity","constant"],["shape","discrete"],["size","constant"]],[["color","constant"],["opacity","discrete"],["shape","constant"],["size","constant"]],[["color","discrete"],["shape","discrete"],["size","constant"]],[["color","discrete"],["opacity","discrete"],["shape","discrete"]],[["color","discrete"],["opacity","discrete"],["size","constant"]],[["color","discrete"],["opacity","constant"],["shape","discrete"]],[["color","discrete"],["opacity","constant"],["size","constant"]],[["color","discrete"],["shape","constant"],["size","constant"]],[["color","discrete"],["opacity","discrete"],["shape","constant"]],[["color","discrete"],["opacity","constant"],["shape","constant"]],[["color","constant"],["shape","discrete"],["size","constant"]],[["color","constant"],["opacity","discrete"],["shape","discrete"]],[["color","constant"],["opacity","discrete"],["size","constant"]],[["color","constant"],["opacity","constant"],["shape","discrete"]],[["color","constant"],["opacity","discrete"],["shape","constant"]],[["color","discrete"],["shape","discrete"]],[["color","discrete"],["size","constant"]],[["color","discrete"],["opacity","discrete"]],[["color","discrete"],["opacity","constant"]],[["color","discrete"],["shape","constant"]],[["color","constant"],["shape","discrete"]],[["color","constant"],["size","constant"]],[["color","constant"],["opacity","discrete"]],[["color","discrete"]]]],["legendContinuousSize",[[["color","continuous"],["opacity","continuous"],["size","continuous"]],[["color","constant"],["opacity","continuous"],["size","continuous"]],[["color","continuous"],["size","continuous"]],[["color","constant"],["size","continuous"]],[["size","continuous"],["opacity","continuous"]],[["size","continuous"]]]],["legendContinuousBlockSize",[[["color","distribution"],["opacity","distribution"],["size","distribution"]],[["color","distribution"],["size","distribution"]]]],["legendContinuousBlock",[[["color","distribution"],["opacity","continuous"]],[["color","distribution"]]]],["legendContinuous",[[["color","continuous"],["opacity","continuous"]],[["color","continuous"]],[["opacity","continuous"]]]]],D2=["lineX","lineY","rangeX","rangeY","range","connector"];function $2({colorDefault:t,colorBlack:n,colorWhite:e,colorStroke:r,colorBackground:i,padding1:a,padding2:o,padding3:s,alpha90:l,alpha65:c,alpha45:u,alpha25:f,alpha10:d,category10:h,category20:p,sizeDefault:g=1,padding:y="auto",margin:m=16}){return{padding:y,margin:m,size:g,color:t,category10:h,category20:p,enter:{duration:300,fill:"both",delay:0},update:{duration:300,fill:"both",delay:0},exit:{duration:300,fill:"both",delay:0},view:{viewFill:i,plotFill:"transparent",mainFill:"transparent",contentFill:"transparent"},line:{line:{fill:"",strokeOpacity:1,lineWidth:1,lineCap:"round"}},point:{point:{r:3,fillOpacity:.95,lineWidth:0},hollow:{r:3,strokeOpacity:.95,lineWidth:1},plus:{r:3,strokeOpacity:.95,lineWidth:3},diamond:{r:3,strokeOpacity:.95,lineWidth:1}},interval:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},area:{area:{fillOpacity:.85,lineWidth:0}},polygon:{polygon:{fillOpacity:.95}},cell:{cell:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},rect:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},link:{link:{fill:"",strokeOpacity:1}},vector:{vector:{fillOpacity:1}},box:{box:{fillOpacity:.95,stroke:n,lineWidth:1}},text:{text:{fill:"#1D2129",fontSize:12,lineWidth:0,connectorStroke:r,connectorStrokeOpacity:.45,connectorLineWidth:1,backgroundFill:r,backgroundFillOpacity:.15,backgroundPadding:[2,4],startMarkerSymbol:"circle",startMarkerSize:4,endMarkerSymbol:"circle",endMarkerSize:4},badge:{fill:"#1D2129",fillOpacity:.65,lineWidth:0,fontSize:10,textAlign:"center",textBaseline:"middle",markerFill:r,markerFillOpacity:.25,markerStrokeOpacity:0}},lineX:{line:{stroke:r,strokeOpacity:.45,lineWidth:1}},lineY:{line:{stroke:r,strokeOpacity:.45,lineWidth:1}},rangeX:{range:{fill:r,fillOpacity:.15,lineWidth:0}},rangeY:{range:{fill:r,fillOpacity:.15,lineWidth:0}},connector:{connector:{stroke:r,strokeOpacity:.45,lineWidth:1,connectLength1:12,endMarker:!0,endMarkerSize:6,endMarkerFill:r,endMarkerFillOpacity:.95}},axis:{arrow:!1,gridLineDash:[3,4],gridLineWidth:.5,gridStroke:n,gridStrokeOpacity:d,labelAlign:"horizontal",labelFill:n,labelOpacity:u,labelFontSize:12,labelFontWeight:"normal",labelSpacing:a,line:!1,lineLineWidth:.5,lineStroke:n,lineStrokeOpacity:u,tickLength:4,tickLineWidth:1,tickStroke:n,tickOpacity:u,titleFill:n,titleOpacity:l,titleFontSize:12,titleFontWeight:"normal",titleSpacing:12,titleTransformOrigin:"center",lineArrowOffset:6,lineArrowSize:6},axisTop:{gridDirection:"positive",labelDirection:"negative",tickDirection:"negative",titlePosition:"top",titleSpacing:12,labelSpacing:4,titleTextBaseline:"middle"},axisBottom:{gridDirection:"negative",labelDirection:"positive",tickDirection:"positive",titlePosition:"bottom",titleSpacing:12,labelSpacing:4,titleTextBaseline:"bottom",titleTransform:"translate(0, 8)"},axisLeft:{gridDirection:"positive",labelDirection:"negative",labelSpacing:4,tickDirection:"negative",titlePosition:"left",titleSpacing:12,titleTextBaseline:"middle",titleDirection:"vertical",titleTransform:"rotate(-90) translate(0, -8)",titleTransformOrigin:"center"},axisRight:{gridDirection:"negative",labelDirection:"positive",labelSpacing:4,tickDirection:"positive",titlePosition:"right",titleSpacing:12,titleTextBaseline:"top",titleDirection:"vertical",titleTransformOrigin:"center"},axisLinear:{girdClosed:!0,gridConnect:"arc",gridDirection:"negative",gridType:"surround",titlePosition:"top",titleSpacing:0},axisArc:{title:!1,titlePosition:"inner",line:!1,tick:!0,labelSpacing:4},axisRadar:{girdClosed:!0,gridStrokeOpacity:.3,gridType:"surround",tick:!1,titlePosition:"start"},legendCategory:{backgroundFill:"transparent",itemBackgroundFill:"transparent",itemLabelFill:n,itemLabelFillOpacity:l,itemLabelFontSize:12,itemLabelFontWeight:"normal",itemMarkerFillOpacity:1,itemMarkerSize:8,focusMarkerSize:12,itemSpacing:[a,a,a/2],itemValueFill:n,itemValueFillOpacity:.65,itemValueFontSize:12,itemValueFontWeight:"normal",navButtonFill:n,navButtonFillOpacity:.65,navPageNumFill:n,navPageNumFillOpacity:.45,navPageNumFontSize:12,padding:8,title:!1,titleFill:n,titleFillOpacity:.65,titleFontSize:12,titleFontWeight:"normal",titleSpacing:4,tickStroke:n,tickStrokeOpacity:.25,rowPadding:a,colPadding:o,maxRows:3,maxCols:3},legendContinuous:{handleHeight:12,handleLabelFill:n,handleLabelFillOpacity:u,handleLabelFontSize:12,handleLabelFontWeight:"normal",handleMarkerFill:n,handleMarkerFillOpacity:.6,handleMarkerLineWidth:1,handleMarkerStroke:n,handleMarkerStrokeOpacity:.25,handleWidth:10,labelFill:n,labelFillOpacity:u,labelFontSize:12,labelFontWeight:"normal",labelSpacing:3,tick:!0,tickLength:12,ribbonSize:12,ribbonFill:"#aaa",handle:!0,handleLabel:!1,handleShape:"slider",handleIconSize:12/1.8,indicator:!1,titleFontSize:12,titleSpacing:4,titleFontWeight:"normal",titleFillOpacity:l,tickStroke:n,tickStrokeOpacity:u},label:{fill:n,fillOpacity:.65,fontSize:12,fontWeight:"normal",stroke:void 0,offset:12,connectorStroke:n,connectorStrokeOpacity:.45,connectorLineWidth:1,connectorLength:12,connectorLength2:8,connectorDistance:4},innerLabel:{fill:e,fontSize:12,fillOpacity:.85,fontWeight:"normal",stroke:void 0,offset:0},htmlLabel:{fontSize:12,opacity:.65,color:n,fontWeight:"normal"},slider:{trackSize:16,trackFill:r,trackFillOpacity:1,selectionFill:t,selectionFillOpacity:.15,handleIconSize:10,handleIconFill:"#f7f7f7",handleIconFillOpacity:1,handleIconStroke:n,handleIconStrokeOpacity:.25,handleIconLineWidth:1,handleIconRadius:2,handleLabelFill:n,handleLabelFillOpacity:.45,handleLabelFontSize:12,handleLabelFontWeight:"normal"},scrollbar:{padding:[0,0,0,0],trackSize:6,isRound:!0,slidable:!0,scrollable:!0,trackFill:"#e5e5e5",trackFillOpacity:0,thumbFill:"#000",thumbFillOpacity:.15,thumbHighlightedFillOpacity:.2},title:{spacing:8,titleFill:n,titleFillOpacity:l,titleFontSize:16,titleFontWeight:"bold",titleTextBaseline:"top",subtitleFill:n,subtitleFillOpacity:c,subtitleFontSize:12,subtitleFontWeight:"normal",subtitleTextBaseline:"top"},tooltip:{css:{[Ms("tooltip")]:{"font-family":"sans-serif"}}}}}const nst={colorBlack:"#1D2129",colorWhite:"#ffffff",colorStroke:"#416180",colorDefault:"#1783FF",colorBackground:"transparent",category10:["#1783FF","#00C9C9","#F0884D","#D580FF","#7863FF","#60C42D","#BD8F24","#FF80CA","#2491B3","#17C76F"],category20:["#1783FF","#00C9C9","#F0884D","#D580FF","#7863FF","#60C42D","#BD8F24","#FF80CA","#2491B3","#17C76F","#AABA01","#BC7CFC","#237CBC","#2DE379","#CE8032","#FF7AF4","#545FD3","#AFE410","#D8C608","#FFA1E0"],padding1:8,padding2:12,padding3:20,alpha90:.9,alpha65:.65,alpha45:.45,alpha25:.25,alpha10:.1},rst=$2(nst),j2=t=>at({},rst,t);j2.props={};const E4=t=>at({},j2(),{category10:"category10",category20:"category20"},t);E4.props={};const ist={colorBlack:"#fff",colorWhite:"#000",colorStroke:"#416180",colorDefault:"#1783FF",colorBackground:"transparent",category10:["#1783FF","#00C9C9","#F0884D","#D580FF","#7863FF","#60C42D","#BD8F24","#FF80CA","#2491B3","#17C76F"],category20:["#1783FF","#00C9C9","#F0884D","#D580FF","#7863FF","#60C42D","#BD8F24","#FF80CA","#2491B3","#17C76F","#AABA01","#BC7CFC","#237CBC","#2DE379","#CE8032","#FF7AF4","#545FD3","#AFE410","#D8C608","#FFA1E0"],padding1:8,padding2:12,padding3:20,alpha90:.9,alpha65:.65,alpha45:.45,alpha25:.25,alpha10:.25},ast=$2(ist),k4=t=>at({},ast,{tooltip:{crosshairsStroke:"#fff",crosshairsLineWidth:1,crosshairsStrokeOpacity:.25,css:{[Ms("tooltip")]:{background:"#1f1f1f",opacity:.95},[Ms("tooltip-title")]:{color:"#A6A6A6"},[Ms("tooltip-list-item-name-label")]:{color:"#A6A6A6"},[Ms("tooltip-list-item-value")]:{color:"#A6A6A6"}}}},t),M4=t=>Object.assign({},k4(),{category10:"category10",category20:"category20"},t);M4.props={};const ost={colorBlack:"#000",colorWhite:"#fff",colorStroke:"#888",colorDefault:"#4e79a7",colorBackground:"transparent",category10:["#4e79a7","#f28e2c","#e15759","#76b7b2","#59a14f","#edc949","#af7aa1","#ff9da7","#9c755f","#bab0ab"],category20:["#4e79a7","#f28e2c","#e15759","#76b7b2","#59a14f","#edc949","#af7aa1","#ff9da7","#9c755f","#bab0ab"],padding1:8,padding2:12,padding3:20,alpha90:.9,alpha65:.65,alpha45:.45,alpha25:.25,alpha10:.1},sst=$2(ost),A4=t=>at({},sst,{text:{text:{fontSize:10}},axis:{gridLineDash:[0,0],gridLineWidth:1,gridStroke:"#ddd",gridStrokeOpacity:1,labelOpacity:1,labelStrokeOpacity:1,labelFontSize:10,line:!0,lineLineWidth:1,lineStroke:"#888",lineStrokeOpacity:1,tickLength:5,tickStrokeOpacity:1,titleOpacity:1,titleStrokeOpacity:1,titleFillOpacity:1,titleFontSize:11,titleFontWeight:"bold"},axisLeft:{gridFilter:(n,e)=>e!==0},axisRight:{gridFilter:(n,e)=>e!==0},legendCategory:{itemLabelFillOpacity:1,itemLabelFontSize:10,itemValueFillOpacity:1,itemValueFontSize:10,titleFillOpacity:1,titleFontSize:11,titleFontWeight:"bold"},legendContinuous:{handleLabelFontSize:10,labelFillOpacity:.45,labelFontSize:10},label:{fontSize:10},innerLabel:{fontSize:10},htmlLabel:{fontSize:10},slider:{handleLabelFontSize:10,trackFillOpacity:.05}},t);A4.props={};function lst(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function av(t,n){if((e=(t=n?t.toExponential(n-1):t.toExponential()).indexOf("e"))<0)return null;var e,r=t.slice(0,e);return[r.length>1?r[0]+r.slice(2):r,+t.slice(e+1)]}function cst(t){return t=av(Math.abs(t)),t?t[1]:NaN}function ust(t,n){return function(e,r){for(var i=e.length,a=[],o=0,s=t[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),a.push(e.substring(i-=s,i+s)),!((l+=s+1)>r));)s=t[o=(o+1)%t.length];return a.reverse().join(n)}}function fst(t){return function(n){return n.replace(/[0-9]/g,function(e){return t[+e]})}}var dst=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Y1(t){if(!(n=dst.exec(t)))throw new Error("invalid format: "+t);var n;return new F2({fill:n[1],align:n[2],sign:n[3],symbol:n[4],zero:n[5],width:n[6],comma:n[7],precision:n[8]&&n[8].slice(1),trim:n[9],type:n[10]})}Y1.prototype=F2.prototype;function F2(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}F2.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 hst(t){t:for(var n=t.length,e=1,r=-1,i;e<n;++e)switch(t[e]){case".":r=i=e;break;case"0":r===0&&(r=e),i=e;break;default:if(!+t[e])break t;r>0&&(r=0);break}return r>0?t.slice(0,r)+t.slice(i+1):t}var T4;function pst(t,n){var e=av(t,n);if(!e)return t+"";var r=e[0],i=e[1],a=i-(T4=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+av(t,Math.max(0,n+a-1))[0]}function aA(t,n){var e=av(t,n);if(!e)return t+"";var r=e[0],i=e[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const oA={"%":(t,n)=>(t*100).toFixed(n),b:t=>Math.round(t).toString(2),c:t=>t+"",d:lst,e:(t,n)=>t.toExponential(n),f:(t,n)=>t.toFixed(n),g:(t,n)=>t.toPrecision(n),o:t=>Math.round(t).toString(8),p:(t,n)=>aA(t*100,n),r:aA,s:pst,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function sA(t){return t}var lA=Array.prototype.map,cA=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function vst(t){var n=t.grouping===void 0||t.thousands===void 0?sA:ust(lA.call(t.grouping,Number),t.thousands+""),e=t.currency===void 0?"":t.currency[0]+"",r=t.currency===void 0?"":t.currency[1]+"",i=t.decimal===void 0?".":t.decimal+"",a=t.numerals===void 0?sA:fst(lA.call(t.numerals,String)),o=t.percent===void 0?"%":t.percent+"",s=t.minus===void 0?"\u2212":t.minus+"",l=t.nan===void 0?"NaN":t.nan+"";function c(f){f=Y1(f);var d=f.fill,h=f.align,p=f.sign,g=f.symbol,y=f.zero,m=f.width,x=f.comma,_=f.precision,w=f.trim,O=f.type;O==="n"?(x=!0,O="g"):oA[O]||(_===void 0&&(_=12),w=!0,O="g"),(y||d==="0"&&h==="=")&&(y=!0,d="0",h="=");var S=g==="$"?e:g==="#"&&/[boxX]/.test(O)?"0"+O.toLowerCase():"",E=g==="$"?r:/[%p]/.test(O)?o:"",M=oA[O],A=/[defgprs%]/.test(O);_=_===void 0?6:/[gprs]/.test(O)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_));function T(P){var N=S,C=E,R,D,F;if(O==="c")C=M(P)+C,P="";else{P=+P;var j=P<0||1/P<0;if(P=isNaN(P)?l:M(Math.abs(P),_),w&&(P=hst(P)),j&&+P==0&&p!=="+"&&(j=!1),N=(j?p==="("?p:s:p==="-"||p==="("?"":p)+N,C=(O==="s"?cA[8+T4/3]:"")+C+(j&&p==="("?")":""),A){for(R=-1,D=P.length;++R<D;)if(F=P.charCodeAt(R),48>F||F>57){C=(F===46?i+P.slice(R+1):P.slice(R))+C,P=P.slice(0,R);break}}}x&&!y&&(P=n(P,1/0));var I=N.length+P.length+C.length,$=I<m?new Array(m-I+1).join(d):"";switch(x&&y&&(P=n($+P,$.length?m-C.length:1/0),$=""),h){case"<":P=N+P+C+$;break;case"=":P=N+$+P+C;break;case"^":P=$.slice(0,I=$.length>>1)+N+P+C+$.slice(I);break;default:P=$+N+P+C;break}return a(P)}return T.toString=function(){return f+""},T}function u(f,d){var h=c((f=Y1(f),f.type="f",f)),p=Math.max(-8,Math.min(8,Math.floor(cst(d)/3)))*3,g=Math.pow(10,-p),y=cA[8+p/3];return function(m){return h(g*m)+y}}return{format:c,formatPrefix:u}}var Ih,lo;gst({thousands:",",grouping:[3],currency:["$",""]});function gst(t){return Ih=vst(t),lo=Ih.format,Ih.formatPrefix,Ih}var yst=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};function mst(t){return class extends qf{constructor(n){super(n),this.descriptor=t}connectedCallback(){var n,e;(e=(n=this.descriptor).render)===null||e===void 0||e.call(n,this.attributes,this)}update(n={}){var e,r;this.attr(at({},this.attributes,n)),(r=(e=this.descriptor).render)===null||r===void 0||r.call(e,this.attributes,this)}}}function uA(t,n,e){return t.querySelector(n)?Rt(t).select(n):Rt(t).append(e)}function T0(t){return Array.isArray(t)?t.join(", "):`${t||""}`}function P4(t,n){const e={flexDirection:"row",justifyContent:"flex-start",alignItems:"center"};let{flexDirection:r,justifyContent:i,alignItems:a}=e;const o={top:["row","flex-start","center"],bottom:["row","flex-start","center"],left:["column","flex-start","center"],right:["column","flex-start","center"],center:["column","center","center"]};return t in o&&([r,i,a]=o[t]),Object.assign({display:"flex",flexDirection:r,justifyContent:i,alignItems:a},n)}class C4 extends Gnt{get child(){var n;return(n=this.children)===null||n===void 0?void 0:n[0]}update(n){var e;const{subOptions:r}=n;(e=this.child)===null||e===void 0||e.update(r),this.attr(n)}}class bst extends C4{update(n){var e;const{subOptions:r}=n;(e=this.child)===null||e===void 0||e.update(r),this.attr(n)}}function ba(t,n){var e;return(e=t.filter(r=>r.getOptions().name===n))===null||e===void 0?void 0:e[0]}function xst(t){return t==="horizontal"||t===0}function _st(t){return t==="vertical"||t===-Math.PI/2}function L4(t,n,e){const{bbox:r}=t,{position:i="top",size:a,length:o}=n,s=["top","bottom","center"].includes(i),[l,c]=s?[r.height,r.width]:[r.width,r.height],{defaultSize:u,defaultLength:f}=e.props,d=a||u||l,h=o||f||c,p=s?"horizontal":"vertical",[g,y]=s?[h,d]:[d,h];return{orientation:p,width:g,height:y,size:d,length:h}}function wst(t){return t.find(n=>n.getOptions().domain.length>0).getOptions().domain}function P0(t){const n=["arrow","crosshairs","grid","handle","handleLabel","indicator","label","line","tick","tip","title","trunc"],{style:e}=t,r=yst(t,["style"]),i={};return Object.entries(r).forEach(([a,o])=>{n.includes(a)?i[`show${Uo(a)}`]=o:i[a]=o}),Object.assign(Object.assign({},i),e)}var N4=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};function R4(t,n){const{eulerAngles:e,origin:r}=n;r&&t.setOrigin(r),e&&t.rotate(e[0],e[1],e[2])}function I4(t){const{innerWidth:n,innerHeight:e,depth:r}=t.getOptions();return[n,e,r]}function Ost(t,n){const{width:e,height:r}=n.getOptions();return i=>{if(!a5(n))return i;const a=t==="bottom"?[i,1]:[0,i],o=n.map(a);if(t==="bottom"){const s=o[0];return new to({domain:[0,e],range:[0,1]}).map(s)}else if(t==="left"){const s=o[1];return new to({domain:[0,r],range:[0,1]}).map(s)}return i}}function Sst(t,n,e){if(t.getTicks)return t.getTicks();if(!e)return n;const[r,i]=qa(n,o=>+o),{tickCount:a}=t.getOptions();return e(r,i,a)}function Est(t,n){if(Ie(n))return h=>h;const e=n.getOptions(),{innerWidth:r,innerHeight:i,insetTop:a,insetBottom:o,insetLeft:s,insetRight:l}=e,[c,u,f]=t==="left"||t==="right"?[a,o,i]:[s,l,r],d=new to({domain:[0,1],range:[c/f,1-u/f]});return h=>d.map(h)}function D4(t,n,e,r,i,a,o,s){var l;(e!==void 0||a!==void 0)&&t.update(Object.assign(Object.assign({},e&&{tickCount:e}),a&&{tickMethod:a}));const c=Sst(t,n,a),u=i?c.filter(i):c,f=m=>m instanceof Date?String(m):typeof m=="object"&&m?m:String(m),d=r||((l=t.getFormatter)===null||l===void 0?void 0:l.call(t))||f,h=Est(o,s),p=Ost(o,s),g=m=>["top","bottom","center","outer"].includes(m),y=m=>["left","right"].includes(m);return Ie(s)||Ze(s)?u.map((m,x,_)=>{var w,O;const S=((w=t.getBandWidth)===null||w===void 0?void 0:w.call(t,m))/2||0,E=h(t.map(m)+S);return{value:o0(s)&&o==="center"||Ze(s)&&((O=t.getTicks)===null||O===void 0?void 0:O.call(t))&&g(o)||Ze(s)&&y(o)?1-E:E,label:f(d(Up(m),x,_)),id:String(x)}}):u.map((m,x,_)=>{var w;const O=((w=t.getBandWidth)===null||w===void 0?void 0:w.call(t,m))/2||0,S=p(h(t.map(m)+O));return{value:y(o)?1-S:S,label:f(d(Up(m),x,_)),id:String(x)}})}function kst(t,n,e="xy"){const[r,i,a]=I4(n);return e==="xy"?t.includes("bottom")||t.includes("top")?i:r:e==="xz"?t.includes("bottom")||t.includes("top")?a:r:t.includes("bottom")||t.includes("top")?i:a}function Mst(t=[],n){if(t.length>0)return t;const{labelAutoRotate:e,labelAutoHide:r,labelAutoEllipsis:i,labelAutoWrap:a}=n,o=[],s=(l,c)=>{c&&o.push(Object.assign(Object.assign({},l),c))};return s({type:"rotate",optionalAngles:[0,15,30,45,60,90]},e),s({type:"ellipsis",minLength:20},i),s({type:"hide"},r),s({type:"wrap",wordWrapWidth:100,maxLines:3,recoveryWhenFail:!0},a),o}function Ast(t,n,e,r,i){const{x:a,y:o,width:s,height:l}=n,c=[a+s/2,o+l/2],u=Math.min(s,l)/2,[f,d]=xx(i),[h,p]=I4(i),g=Math.min(h,p)/2,y={center:c,radius:u,startAngle:f,endAngle:d,gridLength:(r-e)*g};if(t==="inner"){const{insetLeft:m,insetTop:x}=i.getOptions();return Object.assign(Object.assign({},y),{center:[c[0]-m,c[1]-x],labelAlign:"perpendicular",labelDirection:"positive",tickDirection:"positive",gridDirection:"negative"})}return Object.assign(Object.assign({},y),{labelAlign:"parallel",labelDirection:"negative",tickDirection:"negative",gridDirection:"positive"})}function Tst(t,n,e){return pX(n)||s0(n)?!1:t===void 0?!!e.getTicks:t}function Pst(t){const{depth:n}=t.getOptions();return n?{tickIsBillboard:!0,lineIsBillboard:!0,labelIsBillboard:!0,titleIsBillboard:!0,gridIsBillboard:!0}:{}}function Cst(t,n,e,r,i){const{x:a,y:o,width:s,height:l}=e;if(t==="bottom")return{startPos:[a,o],endPos:[a+s,o]};if(t==="left")return{startPos:[a+s,o+l],endPos:[a+s,o]};if(t==="right")return{startPos:[a,o+l],endPos:[a,o]};if(t==="top")return{startPos:[a,o+l],endPos:[a+s,o+l]};if(t==="center"){if(n==="vertical")return{startPos:[a,o],endPos:[a,o+l]};if(n==="horizontal")return{startPos:[a,o],endPos:[a+s,o]};if(typeof n=="number"){const[c,u]=r.getCenter(),[f,d]=l0(r),[h,p]=xx(r),g=Math.min(s,l)/2,{insetLeft:y,insetTop:m}=r.getOptions(),x=f*g,_=d*g,[w,O]=[c+a-y,u+o-m],[S,E]=[Math.cos(n),Math.sin(n)],M=[w+_*S,O+_*E],A=[w+x*S,O+x*E],T=()=>{const{domain:N}=i.getOptions();return N.length},P=Ie(r)&&i?T():3;return{startPos:M,endPos:A,gridClosed:Math.abs(p-h-360)<1e-6,gridCenter:[w,O],gridControlAngles:new Array(P).fill(0).map((N,C,R)=>(p-h)/P*C)}}}return{}}const Lst=t=>{const{order:n,size:e,position:r,orientation:i,labelFormatter:a,tickFilter:o,tickCount:s,tickMethod:l,tickLength:c,important:u={},style:f={},indexBBox:d,title:h,grid:p=!1}=t,g=N4(t,["order","size","position","orientation","labelFormatter","tickFilter","tickCount","tickMethod","tickLength","important","style","indexBBox","title","grid"]);return({scales:[y],value:m,coordinate:x,theme:_})=>{const{bbox:w}=m,{domain:O}=y.getOptions(),S=D4(y,O,s,a,o,l,r,x),E=d?S.map((R,D)=>{const F=d.get(D);return!F||F[0]!==R.label?R:Object.assign(Object.assign({},R),{bbox:F[1]})}):S,[M,A]=l0(x),T=Ast(r,w,M,A,x),{axis:P,axisArc:N={}}=_,C=P0(at({},P,N,T,Object.assign(Object.assign(Object.assign({type:"arc",data:E,titleText:T0(h),grid:p,classNamePrefix:so},c!==void 0?{tickLength:c}:null),g),u)));return new b2({style:zb(C,["transform"])})}};function Nst(t,n,e,r,i,a){const o=e.axis,s=["top","right","bottom","left"].includes(i)?e[`axis${ox(i)}`]:e.axisLinear,l=t.getOptions().name,c=e[`axis${Uo(l)}`]||{};return Object.assign({},o,s,c)}function Rst(t,n,e,r,i,a){const o=Nst(t,n,e,r,i);return i==="center"?Object.assign(Object.assign(Object.assign(Object.assign({},o),{labelDirection:r==="right"?"negative":"positive"}),r==="center"?{labelTransform:"translate(50%,0)"}:null),{tickDirection:r==="right"?"negative":"positive",labelSpacing:r==="center"?0:4,titleSpacing:_st(a)?10:0,tick:r==="center"?!1:void 0}):o}const Ist=t=>{const{direction:n="left",important:e={},labelFormatter:r,order:i,orientation:a,actualPosition:o,position:s,size:l,style:c={},title:u,tickCount:f,tickFilter:d,tickMethod:h,tickLength:p,transform:g,indexBBox:y}=t,m=N4(t,["direction","important","labelFormatter","order","orientation","actualPosition","position","size","style","title","tickCount","tickFilter","tickMethod","tickLength","transform","indexBBox"]);return({scales:x,value:_,coordinate:w,theme:O})=>{const{bbox:S}=_,[E]=x,{domain:M,xScale:A}=E.getOptions(),T=Rst(E,w,O,n,s,a),P=Object.assign(Object.assign(Object.assign({},T),c),m),N=kst(o||s,w,t.plane),C=Cst(s,a,S,w,A),R=Pst(w),D=D4(E,M,f,r,d,h,s,w),F=y?D.map(($,z)=>{const Y=y.get(z);return!Y||Y[0]!==$.label?$:Object.assign(Object.assign({},$),{bbox:Y[1]})}):D,j=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},P),{type:"linear",data:F,crossSize:l,titleText:T0(u),labelOverlap:Mst(g,P),grid:Tst(P.grid,w,E),gridLength:N,line:!0,indexBBox:y,classNamePrefix:so}),p!==void 0?{tickLength:p}:null),P.line?null:{lineOpacity:0}),C),R),e);return j.labelOverlap.find($=>$.type==="hide")&&(j.crossSize=!1),new b2({className:"axis",style:P0(j)})}},$4=t=>n=>{const{labelFormatter:e,labelFilter:r=()=>!0}=n;return i=>{var a;const{scales:[o]}=i,s=((a=o.getTicks)===null||a===void 0?void 0:a.call(o))||o.getOptions().domain,l=typeof e=="string"?lo(e):e,c=(f,d,h)=>r(s[d],d,s),u=Object.assign(Object.assign({},n),{labelFormatter:l,labelFilter:c,scale:o});return t(u)(i)}},ts=$4(Ist),j4=$4(Lst);ts.props={defaultPosition:"center",defaultSize:45,defaultOrder:0,defaultCrossPadding:[12,12],defaultPadding:[12,12]};j4.props={defaultPosition:"outer",defaultOrientation:"vertical",defaultSize:45,defaultOrder:0,defaultCrossPadding:[12,12],defaultPadding:[12,12]};const F4=t=>(...n)=>{const e=ts(Object.assign({},{crossPadding:50},t))(...n);return R4(e,t),e};F4.props=Object.assign(Object.assign({},ts.props),{defaultPosition:"bottom"});const B4=t=>(...n)=>{const e=ts(Object.assign({},{crossPadding:10},t))(...n);return R4(e,t),e};B4.props=Object.assign(Object.assign({},ts.props),{defaultPosition:"left"});var Dst=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};function $st(t){const n=t%(Math.PI*2);return n===Math.PI/2?{titleTransform:"translate(0, 50%)"}:n>-Math.PI/2&&n<Math.PI/2?{titleTransform:"translate(50%, 0)"}:n>Math.PI/2&&n<Math.PI*3/2?{titleTransform:"translate(-50%, 0)"}:{}}function jst(t,n,e,r){const{radar:i}=t,[a]=r,o=a.getOptions().name,[s,l]=xx(e),{axisRadar:c={}}=n;return Object.assign(Object.assign({},c),{grid:o==="position",gridConnect:"line",gridControlAngles:new Array(i.count).fill(0).map((u,f)=>(l-s)/i.count*f)})}const z4=t=>{const{important:n={}}=t,e=Dst(t,["important"]);return r=>{const{theme:i,coordinate:a,scales:o}=r;return ts(Object.assign(Object.assign(Object.assign({},e),$st(t.orientation)),{important:Object.assign(Object.assign({},jst(t,i,a,o)),n)}))(r)}};z4.props=Object.assign(Object.assign({},ts.props),{defaultPosition:"center"});/*!
106
+ * @antv/g-plugin-canvas-path-generator
107
+ * @description A G plugin of path generator with Canvas2D API
108
+ * @version 2.1.22
109
+ * @date 7/30/2025, 1:35:25 PM
110
+ * @author AntVis
111
+ * @docs https://g.antv.antgroup.com/
112
+ */function Fst(t,n){var e=n.cx,r=e===void 0?0:e,i=n.cy,a=i===void 0?0:i,o=n.r;t.arc(r,a,o,0,Math.PI*2,!1)}function Bst(t,n){var e=n.cx,r=e===void 0?0:e,i=n.cy,a=i===void 0?0:i,o=n.rx,s=n.ry;if(t.ellipse)t.ellipse(r,a,o,s,0,0,Math.PI*2,!1);else{var l=o>s?o:s,c=o>s?1:o/s,u=o>s?s/o:1;t.save(),t.scale(c,u),t.arc(r,a,l,0,Math.PI*2)}}function zst(t,n){var e=n.x1,r=n.y1,i=n.x2,a=n.y2,o=n.markerStart,s=n.markerEnd,l=n.markerStartOffset,c=n.markerEndOffset,u=0,f=0,d=0,h=0,p=0,g,y;o&&Oe(o)&&l&&(g=i-e,y=a-r,p=Math.atan2(y,g),u=Math.cos(p)*(l||0),f=Math.sin(p)*(l||0)),s&&Oe(s)&&c&&(g=e-i,y=r-a,p=Math.atan2(y,g),d=Math.cos(p)*(c||0),h=Math.sin(p)*(c||0)),t.moveTo(e+u,r+f),t.lineTo(i+d,a+h)}function Wst(t,n){var e=n.markerStart,r=n.markerEnd,i=n.markerStartOffset,a=n.markerEndOffset,o=n.d,s=o.absolutePath,l=o.segments,c=0,u=0,f=0,d=0,h=0,p,g;if(e&&Oe(e)&&i){var y=e.parentNode.getStartTangent(),m=Ut(y,2),x=m[0],_=m[1];p=x[0]-_[0],g=x[1]-_[1],h=Math.atan2(g,p),c=Math.cos(h)*(i||0),u=Math.sin(h)*(i||0)}if(r&&Oe(r)&&a){var w=r.parentNode.getEndTangent(),O=Ut(w,2),S=O[0],E=O[1];p=S[0]-E[0],g=S[1]-E[1],h=Math.atan2(g,p),f=Math.cos(h)*(a||0),d=Math.sin(h)*(a||0)}for(var M=0;M<s.length;M++){var A=s[M],T=A[0],P=s[M+1],N=M===0&&(c!==0||u!==0),C=(M===s.length-1||P&&(P[0]==="M"||P[0]==="Z"))&&f!==0&&d!==0,R=N?[c,u]:[0,0],D=Ut(R,2),F=D[0],j=D[1],I=C?[f,d]:[0,0],$=Ut(I,2),z=$[0],Y=$[1];switch(T){case"M":t.moveTo(A[1]+F,A[2]+j);break;case"L":t.lineTo(A[1]+z,A[2]+Y);break;case"Q":t.quadraticCurveTo(A[1],A[2],A[3]+z,A[4]+Y);break;case"C":t.bezierCurveTo(A[1],A[2],A[3],A[4],A[5]+z,A[6]+Y);break;case"A":{var H=l[M].arcParams,V=H.cx,Z=H.cy,q=H.rx,J=H.ry,rt=H.startAngle,K=H.endAngle,ot=H.xRotation,vt=H.sweepFlag;if(t.ellipse)t.ellipse(V,Z,q,J,ot,rt,K,!!(1-vt));else{var yt=q>J?q:J,mt=q>J?1:q/J,wt=q>J?J/q:1;t.translate(V,Z),t.rotate(ot),t.scale(mt,wt),t.arc(0,0,yt,rt,K,!!(1-vt)),t.scale(1/mt,1/wt),t.rotate(-ot),t.translate(-V,-Z)}C&&t.lineTo(A[6]+f,A[7]+d);break}case"Z":t.closePath();break}}}function Gst(t,n){var e=n.markerStart,r=n.markerEnd,i=n.markerStartOffset,a=n.markerEndOffset,o=n.points.points,s=o.length,l=o[0][0],c=o[0][1],u=o[s-1][0],f=o[s-1][1],d=0,h=0,p=0,g=0,y=0,m,x;e&&Oe(e)&&i&&(m=o[1][0]-o[0][0],x=o[1][1]-o[0][1],y=Math.atan2(x,m),d=Math.cos(y)*(i||0),h=Math.sin(y)*(i||0)),r&&Oe(r)&&a&&(m=o[s-1][0]-o[0][0],x=o[s-1][1]-o[0][1],y=Math.atan2(x,m),p=Math.cos(y)*(a||0),g=Math.sin(y)*(a||0)),t.moveTo(l+(d||p),c+(h||g));for(var _=1;_<s-1;_++){var w=o[_];t.lineTo(w[0],w[1])}t.lineTo(u,f)}function Yst(t,n){var e=n.markerStart,r=n.markerEnd,i=n.markerStartOffset,a=n.markerEndOffset,o=n.points.points,s=o.length,l=o[0][0],c=o[0][1],u=o[s-1][0],f=o[s-1][1],d=0,h=0,p=0,g=0,y=0,m,x;e&&Oe(e)&&i&&(m=o[1][0]-o[0][0],x=o[1][1]-o[0][1],y=Math.atan2(x,m),d=Math.cos(y)*(i||0),h=Math.sin(y)*(i||0)),r&&Oe(r)&&a&&(m=o[s-2][0]-o[s-1][0],x=o[s-2][1]-o[s-1][1],y=Math.atan2(x,m),p=Math.cos(y)*(a||0),g=Math.sin(y)*(a||0)),t.moveTo(l+d,c+h);for(var _=1;_<s-1;_++){var w=o[_];t.lineTo(w[0],w[1])}t.lineTo(u+p,f+g)}function Hst(t,n){var e=n.x,r=e===void 0?0:e,i=n.y,a=i===void 0?0:i,o=n.radius,s=n.width,l=n.height,c=s,u=l,f=o&&o.some(function(O){return O!==0});if(!f)t.rect(r,a,c,u);else{var d=s>0?1:-1,h=l>0?1:-1,p=d+h===0,g=o.map(function(O){return kn(O,0,Math.min(Math.abs(c)/2,Math.abs(u)/2))}),y=Ut(g,4),m=y[0],x=y[1],_=y[2],w=y[3];t.moveTo(d*m+r,a),t.lineTo(c-d*x+r,a),x!==0&&t.arc(c-d*x+r,h*x+a,x,-h*Math.PI/2,d>0?0:Math.PI,p),t.lineTo(c+r,u-h*_+a),_!==0&&t.arc(c-d*_+r,u-h*_+a,_,d>0?0:Math.PI,h>0?Math.PI/2:1.5*Math.PI,p),t.lineTo(d*w+r,u+a),w!==0&&t.arc(d*w+r,u-h*w+a,w,h>0?Math.PI/2:-Math.PI/2,d>0?Math.PI:0,p),t.lineTo(r,h*m+a),m!==0&&t.arc(d*m+r,h*m+a,m,d>0?Math.PI:0,h>0?Math.PI*1.5:Math.PI/2,p)}}var Ust=(function(t){function n(){var e;pt(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=ee(this,n,[].concat(i)),e.name="canvas-path-generator",e}return te(n,t),ht(n,[{key:"init",value:function(){var r,i=(r={},Et(Et(Et(Et(Et(Et(Et(Et(Et(Et(r,it.CIRCLE,Fst),it.ELLIPSE,Bst),it.RECT,Hst),it.LINE,zst),it.POLYLINE,Yst),it.POLYGON,Gst),it.PATH,Wst),it.TEXT,void 0),it.GROUP,void 0),it.IMAGE,void 0),Et(Et(Et(r,it.HTML,void 0),it.MESH,void 0),it.FRAGMENT,void 0));this.context.pathGeneratorFactory=i}},{key:"destroy",value:function(){delete this.context.pathGeneratorFactory}}])})(Ko);/*!
113
+ * @antv/g-plugin-canvas-picker
114
+ * @description A G plugin for picking in canvas
115
+ * @version 2.1.27
116
+ * @date 7/30/2025, 1:37:32 PM
117
+ * @author AntVis
118
+ * @docs https://g.antv.antgroup.com/
119
+ */var Vst=fe(),Xst=fe(),qst=fe(),Kst=Ne(),W4=(function(){function t(){var n=this;pt(this,t),this.isHit=function(e,r,i,a){var o=n.context.pointInPathPickerFactory[e.nodeName];if(o){var s=Yi(Kst,i),l=wn(Xst,gr(qst,r[0],r[1],0),s);if(o(e,new lr(l[0],l[1]),a,n.isPointInPath,n.context,n.runtime))return!0}return!1},this.isPointInPath=function(e,r){var i=n.runtime.offscreenCanvasCreator.getOrCreateContext(n.context.config.offscreenCanvas),a=n.context.pathGeneratorFactory[e.nodeName];return a&&(i.beginPath(),a(i,e.parsedStyle),i.closePath()),i.isPointInPath(r.x,r.y)}}return ht(t,[{key:"apply",value:function(e,r){var i,a=this,o=e.renderingService,s=e.renderingContext;this.context=e,this.runtime=r;var l=(i=s.root)===null||i===void 0?void 0:i.ownerDocument;o.hooks.pick.tapPromise(t.tag,(function(){var c=Fo(yr().mark(function u(f){return yr().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.abrupt("return",a.pick(l,f));case 1:case"end":return d.stop()}},u)}));return function(u){return c.apply(this,arguments)}})()),o.hooks.pickSync.tap(t.tag,function(c){return a.pick(l,c)})}},{key:"pick",value:function(e,r){var i=r.topmost,a=r.position,o=a.x,s=a.y,l=gr(Vst,o,s,0),c=e.elementsFromBBox(l[0],l[1],l[0],l[1]),u=[],f=Ss(c),d;try{for(f.s();!(d=f.n()).done;){var h=d.value,p=h.getWorldTransform(),g=this.isHit(h,l,p,!1);if(g){var y=N5(h);if(y){var m=y.parsedStyle.clipPath,x=this.isHit(m,l,m.getWorldTransform(),!0);if(x){if(i)return r.picked=[h],r;u.push(h)}}else{if(i)return r.picked=[h],r;u.push(h)}}}}catch(_){f.e(_)}finally{f.f()}return r.picked=u,r}}])})();W4.tag="CanvasPicker";function Zst(t,n,e){var r=t.parsedStyle,i=r.cx,a=i===void 0?0:i,o=r.cy,s=o===void 0?0:o,l=r.r,c=r.fill,u=r.stroke,f=r.lineWidth,d=f===void 0?1:f,h=r.increasedLineWidthForHitTesting,p=h===void 0?0:h,g=r.pointerEvents,y=g===void 0?"auto":g,m=(d+p)/2,x=Ka(a,s,n.x,n.y),_=tl(y,c,u),w=Ut(_,2),O=w[0],S=w[1];return O&&S||e?x<=l+m:O?x<=l:S?x>=l-m&&x<=l+m:!1}function Dh(t,n,e,r){return t/(e*e)+n/(r*r)}function Qst(t,n,e){var r=t.parsedStyle,i=r.cx,a=i===void 0?0:i,o=r.cy,s=o===void 0?0:o,l=r.rx,c=r.ry,u=r.fill,f=r.stroke,d=r.lineWidth,h=d===void 0?1:d,p=r.increasedLineWidthForHitTesting,g=p===void 0?0:p,y=r.pointerEvents,m=y===void 0?"auto":y,x=n.x,_=n.y,w=tl(m,u,f),O=Ut(w,2),S=O[0],E=O[1],M=(h+g)/2,A=(x-a)*(x-a),T=(_-s)*(_-s);return S&&E||e?Dh(A,T,l+M,c+M)<=1:S?Dh(A,T,l,c)<=1:E?Dh(A,T,l-M,c-M)>=1&&Dh(A,T,l+M,c+M)<=1:!1}function As(t,n,e,r,i,a){return i>=t&&i<=t+e&&a>=n&&a<=n+r}function Jst(t,n,e,r,i,a,o){var s=i/2;return As(t-s,n-s,e,i,a,o)||As(t+e-s,n-s,i,r,a,o)||As(t+s,n+r-s,e,i,a,o)||As(t-s,n+s,i,r,a,o)}function $h(t,n,e,r,i,a,o,s){var l=(Math.atan2(s-n,o-t)+Math.PI*2)%(Math.PI*2),c={x:t+e*Math.cos(l),y:n+e*Math.sin(l)};return Ka(c.x,c.y,o,s)<=a/2}function Po(t,n,e,r,i,a,o){var s=Math.min(t,e),l=Math.max(t,e),c=Math.min(n,r),u=Math.max(n,r),f=i/2;return a>=s-f&&a<=l+f&&o>=c-f&&o<=u+f?kX(t,n,e,r,a,o)<=i/2:!1}function G4(t,n,e,r,i){var a=t.length;if(a<2)return!1;for(var o=0;o<a-1;o++){var s=t[o][0],l=t[o][1],c=t[o+1][0],u=t[o+1][1];if(Po(s,l,c,u,n,e,r))return!0}if(i){var f=t[0],d=t[a-1];if(Po(f[0],f[1],d[0],d[1],n,e,r))return!0}return!1}var tlt=1e-6;function cm(t){return Math.abs(t)<tlt?0:t<0?-1:1}function elt(t,n,e){return(e[0]-t[0])*(n[1]-t[1])===(n[0]-t[0])*(e[1]-t[1])&&Math.min(t[0],n[0])<=e[0]&&e[0]<=Math.max(t[0],n[0])&&Math.min(t[1],n[1])<=e[1]&&e[1]<=Math.max(t[1],n[1])}function Y4(t,n,e){var r=!1,i=t.length;if(i<=2)return!1;for(var a=0;a<i;a++){var o=t[a],s=t[(a+1)%i];if(elt(o,s,[n,e]))return!0;cm(o[1]-e)>0!=cm(s[1]-e)>0&&cm(n-(e-o[1])*(o[0]-s[0])/(o[1]-s[1])-o[0])<0&&(r=!r)}return r}function fA(t,n,e){for(var r=!1,i=0;i<t.length;i++){var a=t[i];if(r=Y4(a,n,e),r)break}return r}function nlt(t,n,e){var r=t.parsedStyle,i=r.x1,a=r.y1,o=r.x2,s=r.y2,l=r.lineWidth,c=l===void 0?1:l,u=r.increasedLineWidthForHitTesting,f=u===void 0?0:u,d=r.pointerEvents,h=d===void 0?"auto":d,p=r.fill,g=r.stroke,y=tl(h,p,g),m=Ut(y,2),x=m[1];return!x&&!e||!c?!1:Po(i,a,o,s,c+f,n.x,n.y)}function rlt(t,n,e,r,i){for(var a=!1,o=n/2,s=0;s<t.length;s++){var l=t[s],c=l.currentPoint,u=l.params,f=l.prePoint,d=l.box;if(!(d&&!As(d.x-o,d.y-o,d.width+n,d.height+n,e,r)))switch(l.command){case"L":case"Z":if(a=Po(f[0],f[1],c[0],c[1],n,e,r),a)return!0;break;case"Q":var h=NX(f[0],f[1],u[1],u[2],u[3],u[4],e,r);if(a=h<=n/2,a)return!0;break;case"C":var p=bE(f[0],f[1],u[1],u[2],u[3],u[4],u[5],u[6],e,r,i);if(a=p<=n/2,a)return!0;break;case"A":l.cubicParams||(l.cubicParams=Ub(f[0],f[1],u[1],u[2],u[3],u[4],u[5],u[6],u[7],void 0));for(var g=l.cubicParams,y=f,m=0;m<g.length;m+=6){var x=bE(y[0],y[1],g[m],g[m+1],g[m+2],g[m+3],g[m+4],g[m+5],e,r,i);if(y=[g[m+4],g[m+5]],a=x<=n/2,a)return!0}break}}return a}function ilt(t,n,e,r,i,a){var o=t.parsedStyle,s=o.lineWidth,l=s===void 0?1:s,c=o.increasedLineWidthForHitTesting,u=c===void 0?0:c,f=o.stroke,d=o.fill,h=o.d,p=o.pointerEvents,g=p===void 0?"auto":p,y=h.segments,m=h.hasArc,x=h.polylines,_=h.polygons,w=tl(g,(_==null?void 0:_.length)&&d,f),O=Ut(w,2),S=O[0],E=O[1],M=x1(t),A=!1;return S||e?(m?A=r(t,n):A=fA(_,n.x,n.y)||fA(x,n.x,n.y),A):((E||e)&&(A=rlt(y,l+u,n.x,n.y,M)),A)}function alt(t,n,e){var r=t.parsedStyle,i=r.stroke,a=r.fill,o=r.lineWidth,s=o===void 0?1:o,l=r.increasedLineWidthForHitTesting,c=l===void 0?0:l,u=r.points,f=r.pointerEvents,d=f===void 0?"auto":f,h=tl(d,a,i),p=Ut(h,2),g=p[0],y=p[1],m=!1;return(y||e)&&(m=G4(u.points,s+c,n.x,n.y,!0)),!m&&(g||e)&&(m=Y4(u.points,n.x,n.y)),m}function olt(t,n,e){var r=t.parsedStyle,i=r.lineWidth,a=i===void 0?1:i,o=r.increasedLineWidthForHitTesting,s=o===void 0?0:o,l=r.points,c=r.pointerEvents,u=c===void 0?"auto":c,f=r.fill,d=r.stroke,h=tl(u,f,d),p=Ut(h,2),g=p[1];return!g&&!e||!a?!1:G4(l.points,a+s,n.x,n.y,!1)}function slt(t,n,e,r,i){var a=t.parsedStyle,o=a.radius,s=a.fill,l=a.stroke,c=a.lineWidth,u=c===void 0?1:c,f=a.increasedLineWidthForHitTesting,d=f===void 0?0:f,h=a.x,p=h===void 0?0:h,g=a.y,y=g===void 0?0:g,m=a.width,x=a.height,_=a.pointerEvents,w=_===void 0?"auto":_,O=tl(w,s,l),S=Ut(O,2),E=S[0],M=S[1],A=o&&o.some(function(C){return C!==0}),T=u+d;if(A){var N=!1;return(M||e)&&(N=llt(p,y,m,x,o.map(function(C){return kn(C,0,Math.min(Math.abs(m)/2,Math.abs(x)/2))}),T,n.x,n.y)),!N&&(E||e)&&(N=r(t,n)),N}else{var P=T/2;if(E&&M||e)return As(p-P,y-P,m+P,x+P,n.x,n.y);if(E)return As(p,y,m,x,n.x,n.y);if(M)return Jst(p,y,m,x,T,n.x,n.y)}return!1}function llt(t,n,e,r,i,a,o,s){var l=Ut(i,4),c=l[0],u=l[1],f=l[2],d=l[3];return Po(t+c,n,t+e-u,n,a,o,s)||Po(t+e,n+u,t+e,n+r-f,a,o,s)||Po(t+e-f,n+r,t+d,n+r,a,o,s)||Po(t,n+r-d,t,n+c,a,o,s)||$h(t+e-u,n+u,u,1.5*Math.PI,2*Math.PI,a,o,s)||$h(t+e-f,n+r-f,f,0,.5*Math.PI,a,o,s)||$h(t+d,n+r-d,d,.5*Math.PI,Math.PI,a,o,s)||$h(t+c,n+c,c,Math.PI,1.5*Math.PI,a,o,s)}function clt(t,n,e,r,i,a){var o=t.parsedStyle,s=o.pointerEvents,l=s===void 0?"auto":s,c=o.x,u=c===void 0?0:c,f=o.y,d=f===void 0?0:f,h=o.width,p=o.height;if(l==="non-transparent-pixel"){var g=i.config.offscreenCanvas,y=a.offscreenCanvasCreator.getOrCreateCanvas(g),m=a.offscreenCanvasCreator.getOrCreateContext(g,{willReadFrequently:!0});y.width=h,y.height=p,i.defaultStyleRendererFactory[it.IMAGE].render(m,Kt(Kt({},t.parsedStyle),{},{x:0,y:0}),t,void 0,void 0,void 0);var x=m.getImageData(n.x-u,n.y-d,1,1).data;return x.every(function(_){return _!==0})}return!0}function ult(t,n,e,r){var i=t.getGeometryBounds();return n.x>=i.min[0]&&n.y>=i.min[1]&&n.x<=i.max[0]&&n.y<=i.max[1]}var flt=(function(t){function n(){var e;pt(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=ee(this,n,[].concat(i)),e.name="canvas-picker",e}return te(n,t),ht(n,[{key:"init",value:function(){var r,i=(r={},Et(Et(Et(Et(Et(Et(Et(Et(Et(Et(r,it.CIRCLE,Zst),it.ELLIPSE,Qst),it.RECT,slt),it.LINE,nlt),it.POLYLINE,olt),it.POLYGON,alt),it.PATH,ilt),it.TEXT,ult),it.GROUP,null),it.IMAGE,clt),Et(Et(r,it.HTML,null),it.MESH,null));this.context.pointInPathPickerFactory=i,this.addRenderingPlugin(new W4)}},{key:"destroy",value:function(){delete this.context.pointInPathPickerFactory,this.removeAllRenderingPlugins()}}])})(Ko);function ra(t,n){if(!{}.hasOwnProperty.call(t,n))throw new TypeError("attempted to use private field on non-instance");return t}var dlt=0;function hlt(t){return"__private_"+dlt+++"_"+t}/*!
120
+ * @antv/g-plugin-image-loader
121
+ * @description A G plugin for loading image
122
+ * @version 2.1.26
123
+ * @date 7/30/2025, 1:35:52 PM
124
+ * @author AntVis
125
+ * @docs https://g.antv.antgroup.com/
126
+ */var plt=(function(){function t(){pt(this,t),this.cacheStore=new Map}return ht(t,[{key:"onRefAdded",value:function(e){}},{key:"has",value:function(e){return this.cacheStore.has(e)}},{key:"put",value:function(e,r,i){return this.cacheStore.has(e)?!1:(this.cacheStore.set(e,{value:r,counter:new Set([i.entity])}),this.onRefAdded(i),!0)}},{key:"get",value:function(e,r){var i=this.cacheStore.get(e);return i?(i.counter.has(r.entity)||(i.counter.add(r.entity),this.onRefAdded(r)),i.value):null}},{key:"update",value:function(e,r,i){var a=this.cacheStore.get(e);return a?(a.value=Kt(Kt({},a.value),r),a.counter.has(i.entity)||(a.counter.add(i.entity),this.onRefAdded(i)),!0):!1}},{key:"release",value:function(e,r){var i=this.cacheStore.get(e);return i?(i.counter.delete(r.entity),i.counter.size<=0&&this.cacheStore.delete(e),!0):!1}},{key:"releaseRef",value:function(e){var r=this;Array.from(this.cacheStore.keys()).forEach(function(i){r.release(i,e)})}},{key:"getSize",value:function(){return this.cacheStore.size}},{key:"clear",value:function(){this.cacheStore.clear()}}])})(),um=[],fm=[],H1=(function(){function t(){pt(this,t)}return ht(t,null,[{key:"stop",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:t.api;t.rafId&&(e.cancelAnimationFrame(t.rafId),t.rafId=null)}},{key:"executeTask",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:t.api;um.length<=0&&fm.length<=0||(fm.forEach(function(r){return r()}),fm=um.splice(0,t.TASK_NUM_PER_FRAME),t.rafId=e.requestAnimationFrame(function(){t.executeTask(e)}))}},{key:"sliceImage",value:function(e,r,i,a){for(var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:t.api,l=e.naturalWidth||e.width,c=e.naturalHeight||e.height,u=r-o,f=i-o,d=Math.ceil(l/u),h=Math.ceil(c/f),p={tileSize:[r,i],gridSize:[h,d],tiles:Array(h).fill(null).map(function(){return Array(d).fill(null)})},g=function(x){for(var _=function(S){um.push(function(){var E=S*u,M=x*f,A=[Math.min(r,l-E),Math.min(i,c-M)],T=A[0],P=A[1],N=s.createCanvas();N.width=r,N.height=i;var C=N.getContext("2d");C.drawImage(e,E,M,T,P,0,0,T,P),p.tiles[x][S]={x:E,y:M,tileX:S,tileY:x,data:N},a()})},w=0;w<d;w++)_(w)},y=0;y<h;y++)g(y);return t.stop(),t.executeTask(),p}}])})();H1.TASK_NUM_PER_FRAME=10;var Kr=new plt;Kr.onRefAdded=function(n){var e=this;n.addEventListener(re.DESTROY,function(){e.releaseRef(n)},{once:!0})};var B2=(function(){function t(n,e){pt(this,t),this.gradientCache={},this.patternCache={},this.context=n,this.runtime=e}return ht(t,[{key:"getImageSync",value:function(e,r,i){var a=tn(e)?e:e.src;if(Kr.has(a)){var o=Kr.get(a,r);if(o.img.complete)return i==null||i(o),o}return this.getOrCreateImage(e,r).then(function(s){i==null||i(s)}).catch(function(s){console.error(s)}),null}},{key:"getOrCreateImage",value:function(e,r){var i=this,a=tn(e)?e:e.src;if(!tn(e)&&!Kr.has(a)){var o={img:e,size:[e.naturalWidth||e.width,e.naturalHeight||e.height],tileSize:jh(e)};Kr.put(a,o,r)}if(Kr.has(a)){var s=Kr.get(a,r);return s.img.complete?Promise.resolve(s):new Promise(function(l,c){s.img.addEventListener("load",function(){s.size=[s.img.naturalWidth||s.img.width,s.img.naturalHeight||s.img.height],s.tileSize=jh(s.img),l(s)}),s.img.addEventListener("error",function(u){c(u)})})}return new Promise(function(l,c){var u=i.context.config.createImage();if(u){var f={img:u,size:[0,0],tileSize:jh(u)};Kr.put(a,f,r),u.onload=function(){f.size=[u.naturalWidth||u.width,u.naturalHeight||u.height],f.tileSize=jh(f.img),l(f)},u.onerror=function(d){c(d)},u.crossOrigin="Anonymous",u.src=a}})}},{key:"createDownSampledImage",value:(function(){var n=Fo(yr().mark(function r(i,a){var o,s,l,c,u,f,d,h,p,g,y,m,x,_;return yr().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:return w.next=1,this.getOrCreateImage(i,a);case 1:if(o=w.sent,!(typeof o.downSamplingRate<"u")){w.next=2;break}return w.abrupt("return",o);case 2:if(s=this.context.config.enableLargeImageOptimization,l=typeof s=="boolean"?{}:s,c=l.maxDownSampledImageSize,u=c===void 0?2048:c,f=l.downSamplingRateThreshold,d=f===void 0?.5:f,h=this.runtime.globalThis.createImageBitmap,p=Ut(o.size,2),g=p[0],y=p[1],m=o.img,x=Math.min((u+u)/(g+y),Math.max(.01,Math.min(d,.5))),_=Kt(Kt({},o),{},{downSamplingRate:x}),Kr.update(o.img.src,_,a),!h){w.next=7;break}return w.prev=3,w.next=4,h(o.img,{resizeWidth:g*x,resizeHeight:y*x});case 4:m=w.sent,w.next=6;break;case 5:w.prev=5,w.catch(3),x=1;case 6:w.next=8;break;case 7:x=1;case 8:return _=Kt(Kt({},this.getImageSync(i,a)),{},{downSampled:m,downSamplingRate:x}),Kr.update(o.img.src,_,a),w.abrupt("return",_);case 9:case"end":return w.stop()}},r,this,[[3,5]])}));function e(r,i){return n.apply(this,arguments)}return e})()},{key:"createImageTiles",value:(function(){var n=Fo(yr().mark(function r(i,a,o,s){var l,c,u,f,d;return yr().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:return h.next=1,this.getOrCreateImage(i,s);case 1:return l=h.sent,c=s.ownerDocument.defaultView,u=c.requestAnimationFrame,f=c.cancelAnimationFrame,H1.api={requestAnimationFrame:u,cancelAnimationFrame:f,createCanvas:function(){return Ax.createCanvas()}},d=Kt(Kt({},l),H1.sliceImage(l.img,l.tileSize[0],l.tileSize[0],o)),Kr.update(l.img.src,d,s),h.abrupt("return",d);case 2:case"end":return h.stop()}},r,this)}));function e(r,i,a,o){return n.apply(this,arguments)}return e})()},{key:"releaseImage",value:function(e,r){Kr.release(tn(e)?e:e.src,r)}},{key:"releaseImageRef",value:function(e){Kr.releaseRef(e)}},{key:"getOrCreatePatternSync",value:function(e,r,i,a,o,s,l){var c=this.generatePatternKey(r);if(c&&this.patternCache[c])return this.patternCache[c];var u=r.image,f=r.repetition,d=r.transform,h,p=!1;if(tn(u)){var g=this.getImageSync(u,e,l);h=g==null?void 0:g.img}else a?(h=a,p=!0):h=u;var y=h&&i.createPattern(h,f);if(y){var m;d?m=j5(T5(d),new nn({})):m=Bo(Ne()),p&&XP(m,m,[1/o,1/o,1]),y.setTransform({a:m[0],b:m[1],c:m[4],d:m[5],e:m[12]+s[0],f:m[13]+s[1]})}return c&&y&&(this.patternCache[c]=y),y}},{key:"getOrCreateGradient",value:function(e,r){var i=this.generateGradientKey(e),a=e.type,o=e.steps,s=e.min,l=e.width,c=e.height,u=e.angle,f=e.cx,d=e.cy,h=e.size;if(this.gradientCache[i])return this.gradientCache[i];var p=null;if(a===Ao.LinearGradient){var g=Pq(s,l,c,u),y=g.x1,m=g.y1,x=g.x2,_=g.y2;p=r.createLinearGradient(y,m,x,_)}else if(a===Ao.RadialGradient){var w=Cq(s,l,c,f,d,h),O=w.x,S=w.y,E=w.r;p=r.createRadialGradient(O,S,0,O,S,E)}return p&&(o.forEach(function(M){var A=M.offset,T=M.color;if(A.unit===_t.kPercentage){var P;(P=p)===null||P===void 0||P.addColorStop(A.value/100,T.toString())}}),this.gradientCache[i]=p),this.gradientCache[i]}},{key:"generateGradientKey",value:function(e){var r=e.type,i=e.min,a=e.width,o=e.height,s=e.steps,l=e.angle,c=e.cx,u=e.cy,f=e.size;return"gradient-".concat(r,"-").concat((l==null?void 0:l.toString())||0,"-").concat((c==null?void 0:c.toString())||0,"-").concat((u==null?void 0:u.toString())||0,"-").concat((f==null?void 0:f.toString())||0,"-").concat(i[0],"-").concat(i[1],"-").concat(a,"-").concat(o,"-").concat(s.map(function(d){var h=d.offset,p=d.color;return"".concat(h).concat(p)}).join("-"))}},{key:"generatePatternKey",value:function(e){var r=e.image,i=e.repetition;if(tn(r))return"pattern-".concat(r,"-").concat(i);if(r.nodeName==="rect")return"pattern-".concat(r.entity,"-").concat(i)}}])})();B2.isSupportTile=!!Ax.createCanvas();function jh(t){if(!t.complete)return[0,0];var n=t.naturalWidth||t.width,e=t.naturalHeight||t.height,r=256;return[256,512].forEach(function(i){var a=Math.ceil(e/i),o=Math.ceil(n/i);a*o<1e3&&(r=i)}),[r,r]}var H4=(function(){function t(){pt(this,t)}return ht(t,[{key:"apply",value:function(e){var r=e.renderingService,i=e.renderingContext,a=e.imagePool,o=i.root.ownerDocument.defaultView,s=function(f,d,h){var p=f.parsedStyle,g=p.width,y=p.height;g&&!y?f.setAttribute("height",h/d*g):!g&&y&&f.setAttribute("width",d/h*y)},l=function(f){var d=f.target,h=d.nodeName,p=d.attributes;if(h===it.IMAGE){var g=p.src,y=p.keepAspectRatio;a.getImageSync(g,d,function(m){var x=m.img,_=x.width,w=x.height;y&&s(d,_,w),d.renderable.dirty=!0,r.dirtify()})}},c=function(f){var d=f.target,h=f.attrName,p=f.prevValue,g=f.newValue;d.nodeName!==it.IMAGE||h!=="src"||(p!==g&&a.releaseImage(p,d),tn(g)&&a.getOrCreateImage(g,d).then(function(y){var m=y.img,x=m.width,_=m.height;d.attributes.keepAspectRatio&&s(d,x,_),d.renderable.dirty=!0,r.dirtify()}).catch(function(){}))};r.hooks.init.tap(t.tag,function(){o.addEventListener(re.MOUNTED,l),o.addEventListener(re.ATTR_MODIFIED,c)}),r.hooks.destroy.tap(t.tag,function(){o.removeEventListener(re.MOUNTED,l),o.removeEventListener(re.ATTR_MODIFIED,c)})}}])})();H4.tag="LoadImage";var vlt=(function(t){function n(){var e;pt(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=ee(this,n,[].concat(i)),e.name="image-loader",e}return te(n,t),ht(n,[{key:"init",value:function(r){this.context.imagePool=new B2(this.context,r),this.addRenderingPlugin(new H4)}},{key:"destroy",value:function(){this.removeAllRenderingPlugins()}}])})(Ko);/*!
127
+ * @antv/g-plugin-canvas-renderer
128
+ * @description A G plugin of renderer implementation with Canvas2D API
129
+ * @version 2.3.3
130
+ * @date 7/30/2025, 1:36:40 PM
131
+ * @author AntVis
132
+ * @docs https://g.antv.antgroup.com/
133
+ */var Dn=hlt("renderState"),U4=(function(){function t(n){pt(this,t),this.removedRBushNodeAABBs=[],this.renderQueue=[],Object.defineProperty(this,Dn,{writable:!0,value:{restoreStack:[],prevObject:null,currentContext:new Map}}),this.clearFullScreenLastFrame=!1,this.clearFullScreen=!1,this.vpMatrix=Ne(),this.dprMatrix=Ne(),this.tmpMat4=Ne(),this.vec3a=fe(),this.vec3b=fe(),this.vec3c=fe(),this.vec3d=fe(),this.canvasRendererPluginOptions=n}return ht(t,[{key:"apply",value:function(e,r){var i=this;this.context=e;var a=this.context,o=a.config,s=a.camera,l=a.renderingService,c=a.renderingContext,u=a.rBushRoot,f=a.pathGeneratorFactory,d=o.renderer.getConfig().enableRenderingOptimization;o.renderer.getConfig().enableDirtyCheck=!1,o.renderer.getConfig().enableDirtyRectangleRendering=!1,this.rBush=u,this.pathGeneratorFactory=f;var h=e.contextService,p=c.root.ownerDocument.defaultView,g=function(w){var O=w.target,S=O.rBushNode;S!=null&&S.aabb&&i.removedRBushNodeAABBs.push(S.aabb)},y=function(w){var O=w.target,S=O.rBushNode;S.aabb&&i.removedRBushNodeAABBs.push(S.aabb)};l.hooks.init.tap(t.tag,function(){p.addEventListener(re.UNMOUNTED,g),p.addEventListener(re.CULLED,y);var _=h.getDPR(),w=o.width,O=o.height,S=h.getContext();i.clearRect(S,0,0,w*_,O*_,o.background)}),l.hooks.destroy.tap(t.tag,function(){p.removeEventListener(re.UNMOUNTED,g),p.removeEventListener(re.CULLED,y),i.renderQueue=[],i.removedRBushNodeAABBs=[],ra(i,Dn)[Dn]={restoreStack:[],prevObject:null,currentContext:null}});var m=function(){var w,O=h.getContext(),S=h.getDPR(),E=o.width,M=o.height,A=i.canvasRendererPluginOptions,T=A.dirtyObjectNumThreshold,P=A.dirtyObjectRatioThreshold,N=l.getStats(),C=N.total,R=N.rendered,D=R/C;i.clearFullScreen=i.clearFullScreenLastFrame||!((w=p.context.renderingPlugins[1])!==null&&w!==void 0&&w.isFirstTimeRenderingFinished)||l.disableDirtyRectangleRendering()||R>T&&D>P,O&&(typeof O.resetTransform=="function"?O.resetTransform():O.setTransform(1,0,0,1,0,0),i.clearFullScreen&&i.clearRect(O,0,0,E*S,M*S,o.background))},x=function(w,O){for(var S=[w];S.length>0;){var E,M=S.pop();M.isVisible()&&!M.isCulled()&&(d?i.renderDisplayObjectOptimized(M,O,i.context,ra(i,Dn)[Dn],r):i.renderDisplayObject(M,O,i.context,ra(i,Dn)[Dn],r));for(var A=((E=M.sortable)===null||E===void 0||(E=E.sorted)===null||E===void 0?void 0:E.length)>0?M.sortable.sorted:M.childNodes,T=A.length-1;T>=0;T--)S.push(A[T])}};l.hooks.endFrame.tap(t.tag,function(){if(m(),c.root.childNodes.length===0){i.clearFullScreenLastFrame=!0;return}d=o.renderer.getConfig().enableRenderingOptimization,ra(i,Dn)[Dn]={restoreStack:[],prevObject:null,currentContext:ra(i,Dn)[Dn].currentContext},ra(i,Dn)[Dn].currentContext.clear(),i.clearFullScreenLastFrame=!1;var _=h.getContext(),w=h.getDPR();if(Eo(i.dprMatrix,[w,w,1]),mr(i.vpMatrix,i.dprMatrix,s.getOrthoMatrix()),i.clearFullScreen)d?(_.save(),x(c.root,_),_.restore()):x(c.root,_),i.removedRBushNodeAABBs=[];else{var O=i.safeMergeAABB.apply(i,[i.mergeDirtyAABBs(i.renderQueue)].concat(ce(i.removedRBushNodeAABBs.map(function(J){var rt=J.minX,K=J.minY,ot=J.maxX,vt=J.maxY,yt=new Fn;return yt.setMinMax([rt,K,0],[ot,vt,0]),yt}))));if(i.removedRBushNodeAABBs=[],Fn.isEmpty(O)){i.renderQueue=[];return}var S=i.convertAABB2Rect(O),E=S.x,M=S.y,A=S.width,T=S.height,P=wn(i.vec3a,[E,M,0],i.vpMatrix),N=wn(i.vec3b,[E+A,M,0],i.vpMatrix),C=wn(i.vec3c,[E,M+T,0],i.vpMatrix),R=wn(i.vec3d,[E+A,M+T,0],i.vpMatrix),D=Math.min(P[0],N[0],R[0],C[0]),F=Math.min(P[1],N[1],R[1],C[1]),j=Math.max(P[0],N[0],R[0],C[0]),I=Math.max(P[1],N[1],R[1],C[1]),$=Math.floor(D),z=Math.floor(F),Y=Math.ceil(j-D),H=Math.ceil(I-F);_.save(),i.clearRect(_,$,z,Y,H,o.background),_.beginPath(),_.rect($,z,Y,H),_.clip(),_.setTransform(i.vpMatrix[0],i.vpMatrix[1],i.vpMatrix[4],i.vpMatrix[5],i.vpMatrix[12],i.vpMatrix[13]);var V=o.renderer.getConfig(),Z=V.enableDirtyRectangleRenderingDebug;Z&&p.dispatchEvent(new ze(mi.DIRTY_RECTANGLE,{dirtyRect:{x:$,y:z,width:Y,height:H}}));var q=i.searchDirtyObjects(O);q.sort(function(J,rt){return J.sortable.renderOrder-rt.sortable.renderOrder}).forEach(function(J){J&&J.isVisible()&&!J.isCulled()&&i.renderDisplayObject(J,_,i.context,ra(i,Dn)[Dn],r)}),_.restore(),i.renderQueue.forEach(function(J){i.saveDirtyAABB(J)}),i.renderQueue=[]}ra(i,Dn)[Dn].restoreStack.forEach(function(){_.restore()}),ra(i,Dn)[Dn].restoreStack=[]}),l.hooks.render.tap(t.tag,function(_){i.clearFullScreen||i.renderQueue.push(_)})}},{key:"clearRect",value:function(e,r,i,a,o,s){e.clearRect(r,i,a,o),s&&(e.fillStyle=s,e.fillRect(r,i,a,o))}},{key:"renderDisplayObjectOptimized",value:function(e,r,i,a,o){var s=e.nodeName,l=!1,c=!1,u=this.context.styleRendererFactory[s],f=this.pathGeneratorFactory[s],d=e.parsedStyle.clipPath;if(d){l=!a.prevObject||!Xm(d.getWorldTransform(),a.prevObject.getWorldTransform()),l&&(this.applyWorldTransform(r,d),a.prevObject=null);var h=this.pathGeneratorFactory[d.nodeName];h&&(r.save(),c=!0,r.beginPath(),h(r,d.parsedStyle),r.closePath(),r.clip())}if(u){l=!a.prevObject||!Xm(e.getWorldTransform(),a.prevObject.getWorldTransform()),l&&this.applyWorldTransform(r,e);var p=!a.prevObject;if(!p){var g=a.prevObject.nodeName;s===it.TEXT?p=g!==it.TEXT:s===it.IMAGE?p=g!==it.IMAGE:p=g===it.TEXT||g===it.IMAGE}u.applyStyleToContext(r,e,p,a),a.prevObject=e}f&&(r.beginPath(),f(r,e.parsedStyle),s!==it.LINE&&s!==it.PATH&&s!==it.POLYLINE&&r.closePath()),u&&u.drawToContext(r,e,ra(this,Dn)[Dn],this,o),c&&r.restore(),e.dirty(!1)}},{key:"renderDisplayObject",value:function(e,r,i,a,o){var s=e.nodeName,l=a.restoreStack[a.restoreStack.length-1];l&&!(e.compareDocumentPosition(l)&pn.DOCUMENT_POSITION_CONTAINS)&&(r.restore(),a.restoreStack.pop());var c=this.context.styleRendererFactory[s],u=this.pathGeneratorFactory[s],f=e.parsedStyle.clipPath;if(f){this.applyWorldTransform(r,f);var d=this.pathGeneratorFactory[f.nodeName];d&&(r.save(),a.restoreStack.push(e),r.beginPath(),d(r,f.parsedStyle),r.closePath(),r.clip())}c&&(this.applyWorldTransform(r,e),r.save(),this.applyAttributesToContext(r,e)),u&&(r.beginPath(),u(r,e.parsedStyle),s!==it.LINE&&s!==it.PATH&&s!==it.POLYLINE&&r.closePath()),c&&(c.render(r,e.parsedStyle,e,i,this,o),r.restore()),e.dirty(!1)}},{key:"applyAttributesToContext",value:function(e,r){var i=r.parsedStyle,a=i.stroke,o=i.fill,s=i.opacity,l=i.lineDash,c=i.lineDashOffset;l&&e.setLineDash(l),Dt(c)||(e.lineDashOffset=c),Dt(s)||(e.globalAlpha*=s),!Dt(a)&&!Array.isArray(a)&&!a.isNone&&(e.strokeStyle=r.attributes.stroke),!Dt(o)&&!Array.isArray(o)&&!o.isNone&&(e.fillStyle=r.attributes.fill)}},{key:"convertAABB2Rect",value:function(e){var r=e.getMin(),i=e.getMax(),a=Math.floor(r[0]),o=Math.floor(r[1]),s=Math.ceil(i[0]),l=Math.ceil(i[1]),c=s-a,u=l-o;return{x:a,y:o,width:c,height:u}}},{key:"mergeDirtyAABBs",value:function(e){var r=new Fn;return e.forEach(function(i){var a=i.getRenderBounds();r.add(a);var o=i.renderable.dirtyRenderBounds;o&&r.add(o)}),r}},{key:"searchDirtyObjects",value:function(e){var r=e.getMin(),i=Ut(r,2),a=i[0],o=i[1],s=e.getMax(),l=Ut(s,2),c=l[0],u=l[1],f=this.rBush.search({minX:a,minY:o,maxX:c,maxY:u});return f.map(function(d){var h=d.displayObject;return h})}},{key:"saveDirtyAABB",value:function(e){var r=e.renderable;r.dirtyRenderBounds||(r.dirtyRenderBounds=new Fn);var i=e.getRenderBounds();i&&r.dirtyRenderBounds.update(i.center,i.halfExtents)}},{key:"applyWorldTransform",value:function(e,r,i){i?(Jl(this.tmpMat4,r.getLocalTransform()),mr(this.tmpMat4,i,this.tmpMat4),mr(this.tmpMat4,this.vpMatrix,this.tmpMat4)):(Jl(this.tmpMat4,r.getWorldTransform()),mr(this.tmpMat4,this.vpMatrix,this.tmpMat4)),e.setTransform(this.tmpMat4[0],this.tmpMat4[1],this.tmpMat4[4],this.tmpMat4[5],this.tmpMat4[12],this.tmpMat4[13])}},{key:"safeMergeAABB",value:function(){for(var e=new Fn,r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return i.forEach(function(o){e.add(o)}),e}}])})();U4.tag="CanvasRenderer";function ov(t,n,e,r,i,a,o){var s,l;if(t.image.nodeName==="rect"){var c=t.image.parsedStyle,u=c.width,f=c.height;l=r.contextService.getDPR();var d=r.config.offscreenCanvas;s=a.offscreenCanvasCreator.getOrCreateCanvas(d),s.width=u*l,s.height=f*l;var h=a.offscreenCanvasCreator.getOrCreateContext(d),p={restoreStack:[],prevObject:null,currentContext:new Map};t.image.forEach(function(y){i.renderDisplayObject(y,h,r,p,a)}),p.restoreStack.forEach(function(){h.restore()})}var g=o.getOrCreatePatternSync(n,t,e,s,l,n.getGeometryBounds().min,function(){n.dirty(),r.renderingService.dirtify()});return g}function sv(t,n,e,r){var i;if(t.type===Ao.LinearGradient||t.type===Ao.RadialGradient){var a=n.getGeometryBounds(),o=a&&a.halfExtents[0]*2||1,s=a&&a.halfExtents[1]*2||1,l=a&&a.min||[0,0];i=r.getOrCreateGradient(Kt(Kt({type:t.type},t.value),{},{min:l,width:o,height:s}),e)}return i}var Fh=["shadowBlur","shadowOffsetX","shadowOffsetY"],dA=["lineCap","lineJoin","miterLimit"],Yn={globalAlpha:1,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",filter:"none",globalCompositeOperation:"source-over",strokeStyle:"#000",strokeOpacity:1,lineWidth:1,lineDash:[],lineDashOffset:0,lineCap:"butt",lineJoin:"miter",miterLimit:10,fillStyle:"#000",fillOpacity:1},hA={};function yn(t,n,e,r){var i=r.has(n)?r.get(n):Yn[n];return i!==e&&(n==="lineDash"?t.setLineDash(e):t[n]=e,r.set(n,e)),i}var glt=(function(){function t(n){pt(this,t),this.imagePool=n}return ht(t,[{key:"applyAttributesToContext",value:function(e,r){}},{key:"render",value:function(e,r,i,a,o,s){}},{key:"applyCommonStyleToContext",value:function(e,r,i,a){var o=i?hA:a.prevObject.parsedStyle,s=r.parsedStyle;(i||s.opacity!==o.opacity)&&yn(e,"globalAlpha",Dt(s.opacity)?Yn.globalAlpha:s.opacity,a.currentContext),(i||s.blend!==o.blend)&&yn(e,"globalCompositeOperation",Dt(s.blend)?Yn.globalCompositeOperation:s.blend,a.currentContext)}},{key:"applyStrokeFillStyleToContext",value:function(e,r,i,a){var o=i?hA:a.prevObject.parsedStyle,s=r.parsedStyle,l=s.lineWidth,c=l===void 0?Yn.lineWidth:l,u=s.fill&&!s.fill.isNone,f=s.stroke&&!s.stroke.isNone&&c>0;if(f){if(i||r.attributes.stroke!==a.prevObject.attributes.stroke){var d=!Dt(s.stroke)&&!Array.isArray(s.stroke)&&!s.stroke.isNone?r.attributes.stroke:Yn.strokeStyle;yn(e,"strokeStyle",d,a.currentContext)}(i||s.lineWidth!==o.lineWidth)&&yn(e,"lineWidth",Dt(s.lineWidth)?Yn.lineWidth:s.lineWidth,a.currentContext),(i||s.lineDash!==o.lineDash)&&yn(e,"lineDash",s.lineDash||Yn.lineDash,a.currentContext),(i||s.lineDashOffset!==o.lineDashOffset)&&yn(e,"lineDashOffset",Dt(s.lineDashOffset)?Yn.lineDashOffset:s.lineDashOffset,a.currentContext);for(var h=0;h<dA.length;h++){var p=dA[h];(i||s[p]!==o[p])&&yn(e,p,Dt(s[p])?Yn[p]:s[p],a.currentContext)}}if(u&&(i||r.attributes.fill!==a.prevObject.attributes.fill)){var g=!Dt(s.fill)&&!Array.isArray(s.fill)&&!s.fill.isNone?r.attributes.fill:Yn.fillStyle;yn(e,"fillStyle",g,a.currentContext)}}},{key:"applyStyleToContext",value:function(e,r,i,a){var o=r.nodeName;this.applyCommonStyleToContext(e,r,i,a),o===it.IMAGE||this.applyStrokeFillStyleToContext(e,r,i,a)}},{key:"applyShadowAndFilterStyleToContext",value:function(e,r,i,a){var o=r.parsedStyle;if(i){yn(e,"shadowColor",o.shadowColor.toString(),a.currentContext);for(var s=0;s<Fh.length;s++){var l=Fh[s];yn(e,l,o[l]||Yn[l],a.currentContext)}}o.filter&&o.filter.length&&yn(e,"filter",r.attributes.filter,a.currentContext)}},{key:"clearShadowAndFilterStyleForContext",value:function(e,r,i,a){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(r){yn(e,"shadowColor",Yn.shadowColor,a.currentContext);for(var s=0;s<Fh.length;s++){var l=Fh[s];yn(e,l,Yn[l],a.currentContext)}}if(i)if(r&&o){var c=e.filter;!Dt(c)&&c.indexOf("drop-shadow")>-1&&yn(e,"filter",c.replace(/drop-shadow\([^)]*\)/,"").trim()||Yn.filter,a.currentContext)}else yn(e,"filter",Yn.filter,a.currentContext)}},{key:"fillToContext",value:function(e,r,i,a,o){var s=this,l=r.parsedStyle,c=l.fill,u=l.fillRule,f=null;if(Array.isArray(c)&&c.length>0)c.forEach(function(h){var p=yn(e,"fillStyle",sv(h,r,e,s.imagePool),i.currentContext);f=f??p,u?e.fill(u):e.fill()});else{if(Ys(c)){var d=ov(c,r,e,r.ownerDocument.defaultView.context,a,o,this.imagePool);d&&(e.fillStyle=d,f=!0)}u?e.fill(u):e.fill()}f!==null&&yn(e,"fillStyle",f,i.currentContext)}},{key:"strokeToContext",value:function(e,r,i,a,o){var s=this,l=r.parsedStyle.stroke,c=null;if(Array.isArray(l)&&l.length>0)l.forEach(function(d){var h=yn(e,"strokeStyle",sv(d,r,e,s.imagePool),i.currentContext);c=c??h,e.stroke()});else{if(Ys(l)){var u=ov(l,r,e,r.ownerDocument.defaultView.context,a,o,this.imagePool);if(u){var f=yn(e,"strokeStyle",u,i.currentContext);c=c??f}}e.stroke()}c!==null&&yn(e,"strokeStyle",c,i.currentContext)}},{key:"drawToContext",value:function(e,r,i,a,o){var s,l=r.nodeName,c=r.parsedStyle,u=c.opacity,f=u===void 0?Yn.globalAlpha:u,d=c.fillOpacity,h=d===void 0?Yn.fillOpacity:d,p=c.strokeOpacity,g=p===void 0?Yn.strokeOpacity:p,y=c.lineWidth,m=y===void 0?Yn.lineWidth:y,x=c.fill&&!c.fill.isNone,_=c.stroke&&!c.stroke.isNone&&m>0;if(!(!x&&!_)){var w=!Dt(c.shadowColor)&&c.shadowBlur>0,O=c.shadowType==="inner",S=((s=c.fill)===null||s===void 0?void 0:s.alpha)===0,E=!!(c.filter&&c.filter.length),M=w&&_&&(l===it.PATH||l===it.LINE||l===it.POLYLINE||S||O),A=null;if(x){M||this.applyShadowAndFilterStyleToContext(e,r,w,i);var T=f*h;A=yn(e,"globalAlpha",T,i.currentContext),this.fillToContext(e,r,i,a,o),M||this.clearShadowAndFilterStyleForContext(e,w,E,i)}if(_){var P=!1,N=f*g,C=yn(e,"globalAlpha",N,i.currentContext);if(A=x?A:C,M&&(this.applyShadowAndFilterStyleToContext(e,r,w,i),P=!0,O)){var R=e.globalCompositeOperation;e.globalCompositeOperation="source-atop",this.strokeToContext(e,r,i,a,o),e.globalCompositeOperation=R,this.clearShadowAndFilterStyleForContext(e,w,E,i,!0)}this.strokeToContext(e,r,i,a,o),P&&this.clearShadowAndFilterStyleForContext(e,w,E,i)}A!==null&&yn(e,"globalAlpha",A,i.currentContext)}}}])})(),z2=(function(t){function n(){return pt(this,n),ee(this,n,arguments)}return te(n,t),ht(n,[{key:"render",value:function(r,i,a,o,s,l){var c=i.fill,u=i.fillRule,f=i.opacity,d=f===void 0?1:f,h=i.fillOpacity,p=h===void 0?1:h,g=i.stroke,y=i.strokeOpacity,m=y===void 0?1:y,x=i.lineWidth,_=x===void 0?1:x,w=i.lineCap,O=i.lineJoin,S=i.shadowType,E=i.shadowColor,M=i.shadowBlur,A=i.filter,T=i.miterLimit,P=c&&!c.isNone,N=g&&!g.isNone&&_>0,C=(c==null?void 0:c.alpha)===0,R=!!(A&&A.length),D=!Dt(E)&&M>0,F=a.nodeName,j=S==="inner",I=N&&D&&(F===it.PATH||F===it.LINE||F===it.POLYLINE||C||j);P&&(r.globalAlpha=d*p,I||lv(a,r,D),V4(r,a,c,u,o,s,l,this.imagePool),I||this.clearShadowAndFilter(r,R,D)),N&&(r.globalAlpha=d*m,r.lineWidth=_,Dt(T)||(r.miterLimit=T),Dt(w)||(r.lineCap=w),Dt(O)||(r.lineJoin=O),I&&(j&&(r.globalCompositeOperation="source-atop"),lv(a,r,!0),j&&(U1(r,a,g,o,s,l,this.imagePool),r.globalCompositeOperation=Yn.globalCompositeOperation,this.clearShadowAndFilter(r,R,!0))),U1(r,a,g,o,s,l,this.imagePool))}},{key:"clearShadowAndFilter",value:function(r,i,a){if(a&&(r.shadowColor="transparent",r.shadowBlur=0),i){var o=r.filter;!Dt(o)&&o.indexOf("drop-shadow")>-1&&(r.filter=o.replace(/drop-shadow\([^)]*\)/,"").trim()||"none")}}}])})(glt);function lv(t,n,e){var r=t.parsedStyle,i=r.filter,a=r.shadowColor,o=r.shadowBlur,s=r.shadowOffsetX,l=r.shadowOffsetY;i&&i.length&&(n.filter=t.style.filter),e&&(n.shadowColor=a.toString(),n.shadowBlur=o||0,n.shadowOffsetX=s||0,n.shadowOffsetY=l||0)}function V4(t,n,e,r,i,a,o,s){var l=arguments.length>8&&arguments[8]!==void 0?arguments[8]:!1;Array.isArray(e)?e.forEach(function(c){t.fillStyle=sv(c,n,t,s),l||(r?t.fill(r):t.fill())}):(Ys(e)&&(t.fillStyle=ov(e,n,t,i,a,o,s)),l||(r?t.fill(r):t.fill()))}function U1(t,n,e,r,i,a,o){var s=arguments.length>7&&arguments[7]!==void 0?arguments[7]:!1;Array.isArray(e)?e.forEach(function(l){t.strokeStyle=sv(l,n,t,o),s||t.stroke()}):(Ys(e)&&(t.strokeStyle=ov(e,n,t,r,i,a,o)),s||t.stroke())}function ylt(t,n){var e=Ut(t,4),r=e[0],i=e[1],a=e[2],o=e[3],s=Ut(n,4),l=s[0],c=s[1],u=s[2],f=s[3],d=Math.max(r,l),h=Math.max(i,c),p=Math.min(r+a,l+u),g=Math.min(i+o,c+f);return p<=d||g<=h?null:[d,h,p-d,g-h]}function mlt(t,n){var e=wn(fe(),[t[0],t[1],0],n),r=wn(fe(),[t[0]+t[2],t[1],0],n),i=wn(fe(),[t[0],t[1]+t[3],0],n),a=wn(fe(),[t[0]+t[2],t[1]+t[3],0],n);return[Math.min(e[0],r[0],i[0],a[0]),Math.min(e[1],r[1],i[1],a[1]),Math.max(e[0],r[0],i[0],a[0])-Math.min(e[0],r[0],i[0],a[0]),Math.max(e[1],r[1],i[1],a[1])-Math.min(e[1],r[1],i[1],a[1])]}var blt=(function(t){function n(){return pt(this,n),ee(this,n,arguments)}return te(n,t),ht(n,[{key:"renderDownSampled",value:function(r,i,a,o){var s=o.src,l=o.imageCache;if(!l.downSampled){this.imagePool.createDownSampledImage(s,a).then(function(){a.ownerDocument&&(a.dirty(),a.ownerDocument.defaultView.context.renderingService.dirtify())}).catch(function(c){console.error(c)});return}r.drawImage(l.downSampled,Math.floor(o.drawRect[0]),Math.floor(o.drawRect[1]),Math.ceil(o.drawRect[2]),Math.ceil(o.drawRect[3]))}},{key:"renderTile",value:function(r,i,a,o){var s=o.src,l=o.imageCache,c=o.imageRect,u=o.drawRect,f=l.size,d=r.getTransform(),h=d.a,p=d.b,g=d.c,y=d.d,m=d.e,x=d.f;if(r.resetTransform(),!(l!=null&&l.gridSize)){this.imagePool.createImageTiles(s,[],function(){a.ownerDocument&&(a.dirty(),a.ownerDocument.defaultView.context.renderingService.dirtify())},a).catch(function(D){console.error(D)});return}for(var _=[f[0]/c[2],f[1]/c[3]],w=[l.tileSize[0]/_[0],l.tileSize[1]/_[1]],O=[Math.floor((u[0]-c[0])/w[0]),Math.ceil((u[0]+u[2]-c[0])/w[0])],S=O[0],E=O[1],M=[Math.floor((u[1]-c[1])/w[1]),Math.ceil((u[1]+u[3]-c[1])/w[1])],A=M[0],T=M[1],P=A;P<=T;P++)for(var N=S;N<=E;N++){var C=l.tiles[P][N];if(C){var R=[Math.floor(c[0]+C.tileX*w[0]),Math.floor(c[1]+C.tileY*w[1]),Math.ceil(w[0]),Math.ceil(w[1])];r.drawImage(C.data,R[0],R[1],R[2],R[3])}}r.setTransform(h,p,g,y,m,x)}},{key:"render",value:function(r,i,a){var o=i.x,s=o===void 0?0:o,l=i.y,c=l===void 0?0:l,u=i.width,f=i.height,d=i.src,h=i.shadowColor,p=i.shadowBlur,g=this.imagePool.getImageSync(d,a),y=g==null?void 0:g.img,m=u,x=f;if(y){m||(m=y.width),x||(x=y.height);var _=!Dt(h)&&p>0;lv(a,r,_);try{var w=a.ownerDocument.defaultView.getContextService().getDomElement(),O=w.width,S=w.height,E=r.getTransform(),M=E.a,A=E.b,T=E.c,P=E.d,N=E.e,C=E.f,R=HP(M,T,0,0,A,P,0,0,0,0,1,0,N,C,0,1),D=mlt([s,c,m,x],R),F=ylt([0,0,O,S],D);if(!F)return;if(!a.ownerDocument.defaultView.getConfig().enableLargeImageOptimization){n.renderFull(r,i,a,{image:y,drawRect:[s,c,m,x]});return}var j=D[2]/g.size[0];if(j<(g.downSamplingRate||.5)){this.renderDownSampled(r,i,a,{src:d,imageCache:g,drawRect:[s,c,m,x]});return}if(!B2.isSupportTile){n.renderFull(r,i,a,{image:y,drawRect:[s,c,m,x]});return}this.renderTile(r,i,a,{src:d,imageCache:g,imageRect:D,drawRect:F})}catch{}}}},{key:"drawToContext",value:function(r,i,a,o,s){this.render(r,i.parsedStyle,i)}}],[{key:"renderFull",value:function(r,i,a,o){r.drawImage(o.image,Math.floor(o.drawRect[0]),Math.floor(o.drawRect[1]),Math.ceil(o.drawRect[2]),Math.ceil(o.drawRect[3]))}}])})(z2),xlt=(function(t){function n(){return pt(this,n),ee(this,n,arguments)}return te(n,t),ht(n,[{key:"render",value:function(r,i,a,o,s,l){a.getBounds();var c=i.lineWidth,u=c===void 0?1:c,f=i.textAlign,d=f===void 0?"start":f,h=i.textBaseline,p=h===void 0?"alphabetic":h,g=i.lineJoin,y=g===void 0?"miter":g,m=i.miterLimit,x=m===void 0?10:m,_=i.letterSpacing,w=_===void 0?0:_,O=i.stroke,S=i.fill,E=i.fillRule,M=i.fillOpacity,A=M===void 0?1:M,T=i.strokeOpacity,P=T===void 0?1:T,N=i.opacity,C=N===void 0?1:N,R=i.metrics,D=i.x,F=D===void 0?0:D,j=i.y,I=j===void 0?0:j,$=i.dx,z=i.dy,Y=i.shadowColor,H=i.shadowBlur,V=R.font,Z=R.lines,q=R.height,J=R.lineHeight,rt=R.lineMetrics;r.font=V,r.lineWidth=u,r.textAlign=d==="middle"?"center":d;var K=p;K==="alphabetic"&&(K="bottom"),r.lineJoin=y,Dt(x)||(r.miterLimit=x);var ot=I;p==="middle"?ot+=-q/2-J/2:p==="bottom"||p==="alphabetic"||p==="ideographic"?ot+=-q:(p==="top"||p==="hanging")&&(ot+=-J);var vt=F+($||0);ot+=z||0,Z.length===1&&(K==="bottom"?(K="middle",ot-=.5*q):K==="top"&&(K="middle",ot+=.5*q)),r.textBaseline=K;var yt=!Dt(Y)&&H>0;lv(a,r,yt);for(var mt=0;mt<Z.length;mt++){var wt=u/2+vt;ot+=J,!Dt(O)&&!O.isNone&&u&&this.drawLetterSpacing(r,a,Z[mt],rt[mt],d,wt,ot,w,S,E,A,O,P,C,!0,o,s,l),Dt(S)||this.drawLetterSpacing(r,a,Z[mt],rt[mt],d,wt,ot,w,S,E,A,O,P,C,!1,o,s,l)}}},{key:"drawLetterSpacing",value:function(r,i,a,o,s,l,c,u,f,d,h,p,g,y,m,x,_,w){if(u===0){m?this.strokeText(r,i,a,l,c,p,g,x,_,w):this.fillText(r,i,a,l,c,f,d,h,y,x,_,w);return}var O=r.textAlign;r.textAlign="left";var S=l;s==="center"||s==="middle"?S=l-o.width/2:(s==="right"||s==="end")&&(S=l-o.width);for(var E=Array.from(a),M=r.measureText(a).width,A=0,T=0;T<E.length;++T){var P=E[T];m?this.strokeText(r,i,P,S,c,p,g,x,_,w):this.fillText(r,i,P,S,c,f,d,h,y,x,_,w),A=r.measureText(a.substring(T+1)).width,S+=M-A+u,M=A}r.textAlign=O}},{key:"fillText",value:function(r,i,a,o,s,l,c,u,f,d,h,p){V4(r,i,l,c,d,h,p,this.imagePool,!0);var g,y=!Dt(u)&&u!==1;y&&(g=r.globalAlpha,r.globalAlpha=u*f),r.fillText(a,o,s),y&&(r.globalAlpha=g)}},{key:"strokeText",value:function(r,i,a,o,s,l,c,u,f,d){U1(r,i,l,u,f,d,this.imagePool,!0);var h,p=!Dt(c)&&c!==1;p&&(h=r.globalAlpha,r.globalAlpha=c),r.strokeText(a,o,s),p&&(r.globalAlpha=h)}},{key:"drawToContext",value:function(r,i,a,o,s){this.render(r,i.parsedStyle,i,i.ownerDocument.defaultView.context,o,s)}}])})(z2),_lt=(function(t){function n(){var e,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return pt(this,n),e=ee(this,n),e.name="canvas-renderer",e.options=r,e}return te(n,t),ht(n,[{key:"init",value:function(){var r,i=Kt({dirtyObjectNumThreshold:500,dirtyObjectRatioThreshold:.8},this.options),a=this.context.imagePool,o=new z2(a),s=(r={},Et(Et(Et(Et(Et(Et(Et(Et(Et(Et(r,it.CIRCLE,o),it.ELLIPSE,o),it.RECT,o),it.IMAGE,new blt(a)),it.TEXT,new xlt(a)),it.LINE,o),it.POLYLINE,o),it.POLYGON,o),it.PATH,o),it.GROUP,void 0),Et(Et(Et(r,it.HTML,void 0),it.MESH,void 0),it.FRAGMENT,void 0));this.context.defaultStyleRendererFactory=s,this.context.styleRendererFactory=s,this.addRenderingPlugin(new U4(i))}},{key:"destroy",value:function(){this.removeAllRenderingPlugins(),delete this.context.defaultStyleRendererFactory,delete this.context.styleRendererFactory}}])})(Ko);/*!
134
+ * @antv/g-plugin-dom-interaction
135
+ * @description A G plugin
136
+ * @version 2.1.27
137
+ * @date 7/30/2025, 1:35:38 PM
138
+ * @author AntVis
139
+ * @docs https://g.antv.antgroup.com/
140
+ */var X4=(function(){function t(){pt(this,t)}return ht(t,[{key:"apply",value:function(e,r){var i=this,a=e.renderingService,o=e.renderingContext,s=e.config;this.context=e;var l=o.root.ownerDocument.defaultView,c=function(M){a.hooks.pointerMove.call(M)},u=function(M){a.hooks.pointerUp.call(M)},f=function(M){a.hooks.pointerDown.call(M)},d=function(M){a.hooks.pointerOver.call(M)},h=function(M){a.hooks.pointerOut.call(M)},p=function(M){a.hooks.pointerCancel.call(M)},g=function(M){a.hooks.pointerWheel.call(M)},y=function(M){a.hooks.click.call(M)},m=function(M){r.globalThis.document.addEventListener("pointermove",c,!0),M.addEventListener("pointerdown",f,!0),M.addEventListener("pointerleave",h,!0),M.addEventListener("pointerover",d,!0),r.globalThis.addEventListener("pointerup",u,!0),r.globalThis.addEventListener("pointercancel",p,!0)},x=function(M){M.addEventListener("touchstart",f,!0),M.addEventListener("touchend",u,!0),M.addEventListener("touchmove",c,!0),M.addEventListener("touchcancel",p,!0)},_=function(M){r.globalThis.document.addEventListener("mousemove",c,!0),M.addEventListener("mousedown",f,!0),M.addEventListener("mouseout",h,!0),M.addEventListener("mouseover",d,!0),r.globalThis.addEventListener("mouseup",u,!0)},w=function(M){r.globalThis.document.removeEventListener("pointermove",c,!0),M.removeEventListener("pointerdown",f,!0),M.removeEventListener("pointerleave",h,!0),M.removeEventListener("pointerover",d,!0),r.globalThis.removeEventListener("pointerup",u,!0),r.globalThis.removeEventListener("pointercancel",p,!0)},O=function(M){M.removeEventListener("touchstart",f,!0),M.removeEventListener("touchend",u,!0),M.removeEventListener("touchmove",c,!0),M.removeEventListener("touchcancel",p,!0)},S=function(M){r.globalThis.document.removeEventListener("mousemove",c,!0),M.removeEventListener("mousedown",f,!0),M.removeEventListener("mouseout",h,!0),M.removeEventListener("mouseover",d,!0),r.globalThis.removeEventListener("mouseup",u,!0)};a.hooks.init.tap(t.tag,function(){var E=i.context.contextService.getDomElement();r.globalThis.navigator.msPointerEnabled?(E.style.msContentZooming="none",E.style.msTouchAction="none"):l.supportsPointerEvents&&(E.style.touchAction="none"),l.supportsPointerEvents?m(E):_(E),l.supportsTouchEvents&&x(E),s.useNativeClickEvent&&E.addEventListener("click",y,!0),E.addEventListener("wheel",g,{passive:!0,capture:!0})}),a.hooks.destroy.tap(t.tag,function(){var E=i.context.contextService.getDomElement();r.globalThis.navigator.msPointerEnabled?(E.style.msContentZooming="",E.style.msTouchAction=""):l.supportsPointerEvents&&(E.style.touchAction=""),l.supportsPointerEvents?w(E):S(E),l.supportsTouchEvents&&O(E),s.useNativeClickEvent&&E.removeEventListener("click",y,!0),E.removeEventListener("wheel",g,!0)})}}])})();X4.tag="DOMInteraction";var wlt=(function(t){function n(){var e;pt(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=ee(this,n,[].concat(i)),e.name="dom-interaction",e}return te(n,t),ht(n,[{key:"init",value:function(){this.addRenderingPlugin(new X4)}},{key:"destroy",value:function(){this.removeAllRenderingPlugins()}}])})(Ko);/*!
141
+ * @antv/g-plugin-html-renderer
142
+ * @description A G plugin for rendering HTML
143
+ * @version 2.1.27
144
+ * @date 7/30/2025, 1:35:48 PM
145
+ * @author AntVis
146
+ * @docs https://g.antv.antgroup.com/
147
+ */var Olt="g-canvas-camera",q4=(function(){function t(){pt(this,t),this.displayObjectHTMLElementMap=new WeakMap}return ht(t,[{key:"joinTransformMatrix",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[0,0,0];return"matrix(".concat([e[0],e[1],e[4],e[5],e[12]+r[0],e[13]+r[1]].join(","),")")}},{key:"apply",value:function(e,r){var i=this,a=e.camera,o=e.renderingContext,s=e.renderingService;this.context=e;var l=o.root.ownerDocument.defaultView,c=l.context.eventService.nativeHTMLMap,u=function(m,x){x.style.transform=i.joinTransformMatrix(m.getWorldTransform(),m.getOrigin())},f=function(m){var x=m.target;if(x.nodeName===it.HTML){i.$camera||(i.$camera=i.createCamera(a));var _=i.getOrCreateEl(x);i.$camera.appendChild(_),Object.keys(x.attributes).forEach(function(w){i.updateAttribute(w,x)}),u(x,_),c.set(_,x)}},d=function(m){var x=m.target;if(x.nodeName===it.HTML&&i.$camera){var _=i.getOrCreateEl(x);_&&(_.remove(),c.delete(_))}},h=function(m){var x=m.target;if(x.nodeName===it.HTML){var _=m.attrName;i.updateAttribute(_,x)}},p=function(m){var x=m.target,_=x.nodeName===it.FRAGMENT?x.childNodes:[x];_.forEach(function(w){if(w.nodeName===it.HTML){var O=i.getOrCreateEl(w);u(w,O)}})},g=function(){if(i.$camera){var m=i.context.config,x=m.width,_=m.height;i.$camera.parentElement.style.width="".concat(x||0,"px"),i.$camera.parentElement.style.height="".concat(_||0,"px")}};s.hooks.init.tap(t.tag,function(){l.addEventListener(mi.RESIZE,g),l.addEventListener(re.MOUNTED,f),l.addEventListener(re.UNMOUNTED,d),l.addEventListener(re.ATTR_MODIFIED,h),l.addEventListener(re.BOUNDS_CHANGED,p)}),s.hooks.endFrame.tap(t.tag,function(){i.$camera&&o.renderReasons.has(Gl.CAMERA_CHANGED)&&(i.$camera.style.transform=i.joinTransformMatrix(a.getOrthoMatrix()))}),s.hooks.destroy.tap(t.tag,function(){i.$camera&&i.$camera.remove(),l.removeEventListener(mi.RESIZE,g),l.removeEventListener(re.MOUNTED,f),l.removeEventListener(re.UNMOUNTED,d),l.removeEventListener(re.ATTR_MODIFIED,h),l.removeEventListener(re.BOUNDS_CHANGED,p)})}},{key:"createCamera",value:function(e){var r=this.context.config,i=r.document,a=r.width,o=r.height,s=this.context.contextService.getDomElement(),l=s.parentNode;if(l){var c=Olt,u=l.querySelector("#".concat(c));if(!u){var f=(i||document).createElement("div");f.style.overflow="hidden",f.style.pointerEvents="none",f.style.position="absolute",f.style.left="0px",f.style.top="0px",f.style.width="".concat(a||0,"px"),f.style.height="".concat(o||0,"px");var d=(i||document).createElement("div");u=d,d.id=c,d.style.position="absolute",d.style.left="".concat(s.offsetLeft||0,"px"),d.style.top="".concat(s.offsetTop||0,"px"),d.style.transformOrigin="left top",d.style.transform=this.joinTransformMatrix(e.getOrthoMatrix()),d.style.pointerEvents="none",d.style.width="100%",d.style.height="100%",f.appendChild(d),l.appendChild(f)}return u}return null}},{key:"getOrCreateEl",value:function(e){var r=this.context.config.document,i=this.displayObjectHTMLElementMap.get(e);return i||(i=(r||document).createElement("div"),e.parsedStyle.$el=i,this.displayObjectHTMLElementMap.set(e,i),e.id&&(i.id=e.id),e.name&&i.setAttribute("name",e.name),e.className&&(i.className=e.className),i.style.position="absolute",i.style["will-change"]="transform",i.style.transform=this.joinTransformMatrix(e.getWorldTransform(),e.getOrigin())),i}},{key:"updateAttribute",value:function(e,r){var i=this.getOrCreateEl(r);switch(e){case"innerHTML":var a=r.parsedStyle.innerHTML;tn(a)?i.innerHTML=a:(i.innerHTML="",i.appendChild(a));break;case"x":i.style.left="".concat(r.parsedStyle.x,"px");break;case"y":i.style.top="".concat(r.parsedStyle.y,"px");break;case"transformOrigin":var o=r.parsedStyle.transformOrigin;i.style["transform-origin"]="".concat(o[0].buildCSSText(null,null,"")," ").concat(o[1].buildCSSText(null,null,""));break;case"width":var s=r.parsedStyle.width;i.style.width=Qe(s)?"".concat(s,"px"):s.toString();break;case"height":var l=r.parsedStyle.height;i.style.height=Qe(l)?"".concat(l,"px"):l.toString();break;case"zIndex":var c=r.parsedStyle.zIndex;i.style["z-index"]="".concat(c);break;case"visibility":var u=r.parsedStyle.visibility;i.style.visibility=u;break;case"pointerEvents":var f=r.parsedStyle.pointerEvents,d=f===void 0?"auto":f;i.style.pointerEvents=d;break;case"opacity":var h=r.parsedStyle.opacity;i.style.opacity="".concat(h);break;case"fill":var p=r.parsedStyle.fill,g="";zp(p)?p.isNone?g="transparent":g=r.getAttribute("fill"):Array.isArray(p)?g=r.getAttribute("fill"):Ys(p),i.style.background=g;break;case"stroke":var y=r.parsedStyle.stroke,m="";zp(y)?y.isNone?m="transparent":m=r.getAttribute("stroke"):Array.isArray(y)?m=r.getAttribute("stroke"):Ys(y),i.style["border-color"]=m,i.style["border-style"]="solid";break;case"lineWidth":var x=r.parsedStyle.lineWidth;i.style["border-width"]="".concat(x||0,"px");break;case"lineDash":i.style["border-style"]="dashed";break;case"filter":var _=r.style.filter;i.style.filter=_;break;default:!Dt(r.style[e])&&r.style[e]!==""&&(i.style[e]=r.style[e])}}}])})();q4.tag="HTMLRendering";var Slt=(function(t){function n(){var e;pt(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=ee(this,n,[].concat(i)),e.name="html-renderer",e}return te(n,t),ht(n,[{key:"init",value:function(){this.addRenderingPlugin(new q4)}},{key:"destroy",value:function(){this.removeAllRenderingPlugins()}}])})(Ko);/*!
148
+ * @antv/g-canvas
149
+ * @description A renderer implemented by Canvas 2D API
150
+ * @version 2.0.48
151
+ * @date 7/30/2025, 1:38:18 PM
152
+ * @author AntVis
153
+ * @docs https://g.antv.antgroup.com/
154
+ */var Elt=(function(){function t(n){pt(this,t),this.renderingContext=n.renderingContext,this.canvasConfig=n.config}return ht(t,[{key:"init",value:function(){var e=this.canvasConfig,r=e.container,i=e.canvas;if(i)this.$canvas=i,r&&i.parentElement!==r&&r.appendChild(i),this.$container=i.parentElement,this.canvasConfig.container=this.$container;else if(r&&(this.$container=tn(r)?document.getElementById(r):r,this.$container)){var a=document.createElement("canvas");this.$container.appendChild(a),this.$container.style.position||(this.$container.style.position="relative"),this.$canvas=a}this.context=this.$canvas.getContext("2d"),this.resize(this.canvasConfig.width,this.canvasConfig.height)}},{key:"getContext",value:function(){return this.context}},{key:"getDomElement",value:function(){return this.$canvas}},{key:"getDPR",value:function(){return this.dpr}},{key:"getBoundingClientRect",value:function(){if(this.$canvas.getBoundingClientRect)return this.$canvas.getBoundingClientRect()}},{key:"destroy",value:function(){this.$container&&this.$canvas&&this.$canvas.parentNode&&this.$container.removeChild(this.$canvas)}},{key:"resize",value:function(e,r){var i=this.canvasConfig.devicePixelRatio;this.dpr=i,this.$canvas&&(this.$canvas.width=this.dpr*e,this.$canvas.height=this.dpr*r,YK(this.$canvas,e,r)),this.renderingContext.renderReasons.add(Gl.CAMERA_CHANGED)}},{key:"applyCursorStyle",value:function(e){this.$container&&this.$container.style&&(this.$container.style.cursor=e)}},{key:"toDataURL",value:(function(){var n=Fo(yr().mark(function r(){var i,a,o,s=arguments;return yr().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return i=s.length>0&&s[0]!==void 0?s[0]:{},a=i.type,o=i.encoderOptions,l.abrupt("return",this.context.canvas.toDataURL(a,o));case 1:case"end":return l.stop()}},r,this)}));function e(){return n.apply(this,arguments)}return e})()}])})(),klt=(function(t){function n(){var e;pt(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=ee(this,n,[].concat(i)),e.name="canvas-context-register",e}return te(n,t),ht(n,[{key:"init",value:function(){this.context.ContextService=Elt}},{key:"destroy",value:function(){delete this.context.ContextService}}])})(Ko),K4=(function(t){function n(e){var r;return pt(this,n),r=ee(this,n,[e]),r.registerPlugin(new klt),r.registerPlugin(new vlt),r.registerPlugin(new Ust),r.registerPlugin(new _lt),r.registerPlugin(new wlt),r.registerPlugin(new flt),r.registerPlugin(new Slt),r}return te(n,t),ht(n)})(DX);/*!
155
+ * @antv/g-plugin-dragndrop
156
+ * @description A G plugin for Drag n Drop implemented with PointerEvents
157
+ * @version 2.0.38
158
+ * @date 7/30/2025, 1:35:41 PM
159
+ * @author AntVis
160
+ * @docs https://g.antv.antgroup.com/
161
+ */var Z4=(function(){function t(n){pt(this,t),this.dragndropPluginOptions=n}return ht(t,[{key:"apply",value:function(e){var r=this,i=e.renderingService,a=e.renderingContext,o=a.root.ownerDocument,s=o.defaultView,l=function(u){var f=u.target,d=f===o,h=d&&r.dragndropPluginOptions.isDocumentDraggable?o:f.closest&&f.closest("[draggable=true]");if(h){var p=!1,g=u.timeStamp,y=[u.clientX,u.clientY],m=null,x=[u.clientX,u.clientY],_=(function(){var O=Fo(yr().mark(function S(E){var M,A,T,P,N,C;return yr().wrap(function(R){for(;;)switch(R.prev=R.next){case 0:if(p){R.next=2;break}if(M=E.timeStamp-g,A=Fr([E.clientX,E.clientY],y),!(M<=r.dragndropPluginOptions.dragstartTimeThreshold||A<=r.dragndropPluginOptions.dragstartDistanceThreshold)){R.next=1;break}return R.abrupt("return");case 1:E.type="dragstart",h.dispatchEvent(E),p=!0;case 2:if(E.type="drag",E.dx=E.clientX-x[0],E.dy=E.clientY-x[1],h.dispatchEvent(E),x=[E.clientX,E.clientY],d){R.next=4;break}return T=r.dragndropPluginOptions.overlap==="pointer"?[E.canvasX,E.canvasY]:f.getBounds().center,R.next=3,o.elementsFromPoint(T[0],T[1]);case 3:P=R.sent,N=P[P.indexOf(f)+1],C=(N==null?void 0:N.closest("[droppable=true]"))||(r.dragndropPluginOptions.isDocumentDroppable?o:null),m!==C&&(m&&(E.type="dragleave",E.target=m,m.dispatchEvent(E)),C&&(E.type="dragenter",E.target=C,C.dispatchEvent(E)),m=C,m&&(E.type="dragover",E.target=m,m.dispatchEvent(E)));case 4:case"end":return R.stop()}},S)}));return function(E){return O.apply(this,arguments)}})();s.addEventListener("pointermove",_);var w=function(S){if(p){S.detail={preventClick:!0};var E=S.clone();m&&(E.type="drop",E.target=m,m.dispatchEvent(E)),E.type="dragend",h.dispatchEvent(E),p=!1}s.removeEventListener("pointermove",_)};f.addEventListener("pointerup",w,{once:!0}),f.addEventListener("pointerupoutside",w,{once:!0})}};i.hooks.init.tap(t.tag,function(){s.addEventListener("pointerdown",l)}),i.hooks.destroy.tap(t.tag,function(){s.removeEventListener("pointerdown",l)})}}])})();Z4.tag="Dragndrop";var Q4=(function(t){function n(){var e,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return pt(this,n),e=ee(this,n),e.name="dragndrop",e.options=r,e}return te(n,t),ht(n,[{key:"init",value:function(){this.addRenderingPlugin(new Z4(Kt({overlap:"pointer",isDocumentDraggable:!1,isDocumentDroppable:!1,dragstartDistanceThreshold:0,dragstartTimeThreshold:0},this.options)))}},{key:"destroy",value:function(){this.removeAllRenderingPlugins()}},{key:"setOptions",value:function(r){Object.assign(this.plugins[0].dragndropPluginOptions,r)}}])})(Ko),Mlt="*",W2=(function(){function t(){this._events={}}return t.prototype.on=function(n,e,r){return this._events[n]||(this._events[n]=[]),this._events[n].push({callback:e,once:!!r}),this},t.prototype.once=function(n,e){return this.on(n,e,!0)},t.prototype.emit=function(n){for(var e=this,r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];var a=this._events[n]||[],o=this._events[Mlt]||[],s=function(l){for(var c=l.length,u=0;u<c;u++)if(l[u]){var f=l[u],d=f.callback,h=f.once;h&&(l.splice(u,1),l.length===0&&delete e._events[n],c--,u--),d.apply(e,r)}};s(a),s(o)},t.prototype.off=function(n,e){if(!n)this._events={};else if(!e)delete this._events[n];else{for(var r=this._events[n]||[],i=r.length,a=0;a<i;a++)r[a].callback===e&&(r.splice(a,1),i--,a--);r.length===0&&delete this._events[n]}return this},t.prototype.getEvents=function(){return this._events},t})();const Ae={BEFORE_RENDER:"beforerender",AFTER_RENDER:"afterrender",BEFORE_PAINT:"beforepaint",AFTER_PAINT:"afterpaint",BEFORE_CLEAR:"beforeclear",AFTER_CLEAR:"afterclear",BEFORE_DESTROY:"beforedestroy",AFTER_DESTROY:"afterdestroy",BEFORE_CHANGE_SIZE:"beforechangesize",AFTER_CHANGE_SIZE:"afterchangesize",POINTER_TAP:"pointertap",POINTER_DOWN:"pointerdown",POINTER_UP:"pointerup",POINTER_OVER:"pointerover",POINTER_OUT:"pointerout",POINTER_MOVE:"pointermove",POINTER_ENTER:"pointerenter",POINTER_LEAVE:"pointerleave",POINTER_UPOUTSIDE:"pointerupoutside",DRAG_START:"dragstart",DRAG:"drag",DRAG_END:"dragend",DRAG_ENTER:"dragenter",DRAG_LEAVE:"dragleave",DRAG_OVER:"dragover",DROP:"DROP",CLICK:"click",DBLCLICK:"dblclick"},Alt={abs:Math.abs,ceil:Math.ceil,floor:Math.floor,max:Math.max,min:Math.min,round:Math.round,sqrt:Math.sqrt,pow:Math.pow};class Un extends Error{constructor(n,e,r){super(n),this.position=e,this.token=r,this.name="ExpressionError"}}var Vt;(function(t){t[t.STRING=0]="STRING",t[t.NUMBER=1]="NUMBER",t[t.BOOLEAN=2]="BOOLEAN",t[t.NULL=3]="NULL",t[t.IDENTIFIER=4]="IDENTIFIER",t[t.OPERATOR=5]="OPERATOR",t[t.FUNCTION=6]="FUNCTION",t[t.DOT=7]="DOT",t[t.BRACKET_LEFT=8]="BRACKET_LEFT",t[t.BRACKET_RIGHT=9]="BRACKET_RIGHT",t[t.PAREN_LEFT=10]="PAREN_LEFT",t[t.PAREN_RIGHT=11]="PAREN_RIGHT",t[t.COMMA=12]="COMMA",t[t.QUESTION=13]="QUESTION",t[t.COLON=14]="COLON",t[t.DOLLAR=15]="DOLLAR"})(Vt||(Vt={}));const Tlt=new Set([32,9,10,13]),Plt=new Set([43,45,42,47,37,33,38,124,61,60,62]),Clt=new Map([["true",Vt.BOOLEAN],["false",Vt.BOOLEAN],["null",Vt.NULL]]),dm=new Map([["===",!0],["!==",!0],["<=",!0],[">=",!0],["&&",!0],["||",!0],["+",!0],["-",!0],["*",!0],["/",!0],["%",!0],["!",!0],["<",!0],[">",!0]]),Llt=new Map([[46,Vt.DOT],[91,Vt.BRACKET_LEFT],[93,Vt.BRACKET_RIGHT],[40,Vt.PAREN_LEFT],[41,Vt.PAREN_RIGHT],[44,Vt.COMMA],[63,Vt.QUESTION],[58,Vt.COLON],[36,Vt.DOLLAR]]),J4=new Map;for(const[t,n]of Llt.entries())J4.set(t,{type:n,value:String.fromCharCode(t)});function Su(t){return t>=48&&t<=57}function V1(t){return t>=97&&t<=122||t>=65&&t<=90||t===95}function pA(t){return V1(t)||Su(t)}function Nlt(t){return Plt.has(t)}var bn;(function(t){t[t.Program=0]="Program",t[t.Literal=1]="Literal",t[t.Identifier=2]="Identifier",t[t.MemberExpression=3]="MemberExpression",t[t.CallExpression=4]="CallExpression",t[t.BinaryExpression=5]="BinaryExpression",t[t.UnaryExpression=6]="UnaryExpression",t[t.ConditionalExpression=7]="ConditionalExpression"})(bn||(bn={}));const Rlt=new Map([["||",2],["&&",3],["===",4],["!==",4],[">",5],[">=",5],["<",5],["<=",5],["+",6],["-",6],["*",7],["/",7],["%",7],["!",8]]),Ilt={type:bn.Literal,value:null},Dlt={type:bn.Literal,value:!0},$lt={type:bn.Literal,value:!1},jlt=t=>{let n=0;const e=t.length,r=()=>n>=e?null:t[n],i=()=>t[n++],a=f=>{const d=r();return d!==null&&d.type===f},o=f=>f.type===Vt.OPERATOR?Rlt.get(f.value)||-1:f.type===Vt.DOT||f.type===Vt.BRACKET_LEFT?9:f.type===Vt.QUESTION?1:-1,s=f=>{let d,h;if(i().type===Vt.DOT){if(!a(Vt.IDENTIFIER)){const g=r();throw new Un("Expected property name",n,g?g.value:"<end of input>")}const p=i();d={type:bn.Identifier,name:p.value},h=!1}else{if(d=c(0),!a(Vt.BRACKET_RIGHT)){const p=r();throw new Un("Expected closing bracket",n,p?p.value:"<end of input>")}i(),h=!0}return{type:bn.MemberExpression,object:f,property:d,computed:h}},l=()=>{const f=r();if(!f)throw new Un("Unexpected end of input",n,"<end of input>");if(f.type===Vt.OPERATOR&&(f.value==="!"||f.value==="-")){i();const d=l();return{type:bn.UnaryExpression,operator:f.value,argument:d,prefix:!0}}switch(f.type){case Vt.NUMBER:return i(),{type:bn.Literal,value:Number(f.value)};case Vt.STRING:return i(),{type:bn.Literal,value:f.value};case Vt.BOOLEAN:return i(),f.value==="true"?Dlt:$lt;case Vt.NULL:return i(),Ilt;case Vt.IDENTIFIER:return i(),{type:bn.Identifier,name:f.value};case Vt.FUNCTION:return(()=>{const d=i(),h=[];if(!a(Vt.PAREN_LEFT)){const p=r();throw new Un("Expected opening parenthesis after function name",n,p?p.value:"<end of input>")}for(i();;){if(a(Vt.PAREN_RIGHT)){i();break}if(!r()){const g=r();throw new Un("Expected closing parenthesis",n,g?g.value:"<end of input>")}if(h.length>0){if(!a(Vt.COMMA)){const g=r();throw new Un("Expected comma between function arguments",n,g?g.value:"<end of input>")}i()}const p=c(0);h.push(p)}return{type:bn.CallExpression,callee:{type:bn.Identifier,name:d.value},arguments:h}})();case Vt.PAREN_LEFT:{i();const d=c(0);if(!a(Vt.PAREN_RIGHT)){const h=r();throw new Un("Expected closing parenthesis",n,h?h.value:"<end of input>")}return i(),d}default:throw new Un(`Unexpected token: ${f.type}`,n,f.value)}},c=(f=0)=>{let d=l();for(;n<e;){const h=t[n],p=o(h);if(p<=f)break;if(h.type!==Vt.QUESTION)if(h.type!==Vt.OPERATOR){if(h.type!==Vt.DOT&&h.type!==Vt.BRACKET_LEFT)break;d=s(d)}else{i();const g=c(p);d={type:bn.BinaryExpression,operator:h.value,left:d,right:g}}else{i();const g=c(0);if(!a(Vt.COLON)){const m=r();throw new Un("Expected : in conditional expression",n,m?m.value:"<end of input>")}i();const y=c(0);d={type:bn.ConditionalExpression,test:d,consequent:g,alternate:y}}}return d},u=c();return{type:bn.Program,body:u}},Flt=(t,n,e)=>{let r=n;e&&(r={...n,context:{...n.context,...e}});const i=a=>{switch(a.type){case bn.Literal:return(o=>o.value)(a);case bn.Identifier:return(o=>{if(!(o.name in r.context))throw new Un(`Undefined variable: ${o.name}`);return r.context[o.name]})(a);case bn.MemberExpression:return(o=>{const s=i(o.object);if(s==null)throw new Un("Cannot access property of null or undefined");return s[o.computed?i(o.property):o.property.name]})(a);case bn.CallExpression:return(o=>{const s=r.functions[o.callee.name];if(!s)throw new Un(`Undefined function: ${o.callee.name}`);return s(...o.arguments.map((l=>i(l))))})(a);case bn.BinaryExpression:return(o=>{if(o.operator==="&&"){const c=i(o.left);return c&&i(o.right)}if(o.operator==="||")return i(o.left)||i(o.right);const s=i(o.left),l=i(o.right);switch(o.operator){case"+":return s+l;case"-":return s-l;case"*":return s*l;case"/":return s/l;case"%":return s%l;case"===":return s===l;case"!==":return s!==l;case">":return s>l;case">=":return s>=l;case"<":return s<l;case"<=":return s<=l;default:throw new Un(`Unknown operator: ${o.operator}`)}})(a);case bn.UnaryExpression:return(o=>{const s=i(o.argument);if(o.prefix)switch(o.operator){case"!":return!s;case"-":if(typeof s!="number")throw new Un(`Cannot apply unary - to non-number: ${s}`);return-s;default:throw new Un(`Unknown operator: ${o.operator}`)}throw new Un(`Postfix operators are not supported: ${o.operator}`)})(a);case bn.ConditionalExpression:return(o=>{const s=i(o.test);return i(s?o.consequent:o.alternate)})(a);default:throw new Un(`Evaluation error: Unsupported node type: ${a.type}`)}};return i(t.body)};function Blt(t){const n=(i=>{const a=i,o=a.length,s=new Array(Math.ceil(o/3));let l=0,c=0;function u(y){const m=c+1;c++;let x="",_=!1;for(;c<o;){const w=a.charCodeAt(c);if(w===y)return _||(x=a.substring(m,c)),c++,{type:Vt.STRING,value:x};w===92?(_||(x=a.substring(m,c),_=!0),c++,x+=a[c]):_&&(x+=a[c]),c++}throw new Un(`Unterminated string starting with ${String.fromCharCode(y)}`,c,a.substring(Math.max(0,c-10),c))}function f(){const y=c;for(a.charCodeAt(c)===45&&c++;c<o&&Su(a.charCodeAt(c));)c++;if(c<o&&a.charCodeAt(c)===46)for(c++;c<o&&Su(a.charCodeAt(c));)c++;const m=a.slice(y,c);return{type:Vt.NUMBER,value:m}}function d(){c++;const y=c;if(c<o&&V1(a.charCodeAt(c)))for(c++;c<o&&pA(a.charCodeAt(c));)c++;const m=a.slice(y,c);return{type:Vt.FUNCTION,value:m}}function h(){const y=c++;for(;c<o&&pA(a.charCodeAt(c));)c++;const m=a.slice(y,c),x=Clt.get(m);return x?{type:x,value:m}:{type:Vt.IDENTIFIER,value:m}}function p(){if(c+2<o){const m=a.substring(c,c+3);if(dm.has(m))return c+=3,{type:Vt.OPERATOR,value:m}}if(c+1<o){const m=a.substring(c,c+2);if(dm.has(m))return c+=2,{type:Vt.OPERATOR,value:m}}const y=a[c];if(dm.has(y))return c++,{type:Vt.OPERATOR,value:y};throw new Un(`Unknown operator at position ${c}: ${a.substring(c,c+1)}`,c,a.substring(Math.max(0,c-10),c))}for(;c<o;){const y=a.charCodeAt(c);if(g=y,Tlt.has(g)){c++;continue}const m=J4.get(y);if(m)s[l++]=m,c++;else if(y!==34&&y!==39)if(Su(y)||y===45&&c+1<o&&Su(a.charCodeAt(c+1)))s[l++]=f();else if(y!==64)if(V1(y))s[l++]=h();else{if(!Nlt(y))throw new Un(`Unexpected character: ${a[c]}`,c,a.substring(Math.max(0,c-10),c));s[l++]=p()}else s[l++]=d();else s[l++]=u(y)}var g;return l===s.length?s:s.slice(0,l)})(t),e=jlt(n),r=((i={},a={})=>({context:i,functions:a}))({},Alt);return(i={})=>Flt(e,r,i)}const zlt=["style","encode","labels","children"],Wlt=ZN(t=>{const n=Blt(t);return(...e)=>{const r=Array.from({length:e.length},(a,o)=>String.fromCharCode(97+o)),i=Object.fromEntries(e.map((a,o)=>[r[o],a]));return n(Object.assign(Object.assign({},i),{global:Object.assign({},i)}))}},t=>t,128);function up(t,n=!0){if(Array.isArray(t))return t.map((e,r)=>up(t[r],n));if(typeof t=="object"&&t)return FG(t,(e,r)=>n&&zlt.includes(r)?up(e,r==="children"):n?e:up(e,!1));if(typeof t=="string"){const e=t.trim();if(e.startsWith("{")&&e.endsWith("}"))return Wlt(e.slice(1,-1))}return t}var Glt={}.toString,tI=function(t,n){return Glt.call(t)==="[object "+n+"]"};const Ylt=(function(t){return Array.isArray?Array.isArray(t):tI(t,"Array")});var Hlt=function(t){return typeof t=="object"&&t!==null},vA=function(t){if(!Hlt(t)||!tI(t,"Object"))return!1;if(Object.getPrototypeOf(t)===null)return!0;for(var n=t;Object.getPrototypeOf(n)!==null;)n=Object.getPrototypeOf(n);return Object.getPrototypeOf(t)===n},Ult=5;function eI(t,n,e,r){e=e||0,r=r||Ult;for(var i in n)if(n.hasOwnProperty(i)){var a=n[i];a!==null&&vA(a)?(vA(t[i])||(t[i]={}),e<r?eI(t[i],a,e+1,r):t[i]=n[i]):Ylt(a)?(t[i]=[],t[i]=t[i].concat(a)):a!==void 0&&(t[i]=a)}}var nI=function(t){for(var n=[],e=1;e<arguments.length;e++)n[e-1]=arguments[e];for(var r=0;r<n.length;r+=1)eI(t,n[r]);return t};const G2=(function(t){return t});function rI(t){for(var n=[],e=1;e<arguments.length;e++)n[e-1]=arguments[e];return t?n.reduce(function(r,i){return function(a){return i(r(a))}},t):G2}function iI(t){return t instanceof Float32Array||t instanceof Array}var aI=function(t,n){var e=typeof Symbol=="function"&&t[Symbol.iterator];if(!e)return t;var r=e.call(t),i,a=[],o;try{for(;(n===void 0||n-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(o)throw o.error}}return a},oI=function(t,n,e){if(e||arguments.length===2)for(var r=0,i=n.length,a;r<i;r++)(a||!(r in n))&&(a||(a=Array.prototype.slice.call(n,0,r)),a[r]=n[r]);return t.concat(a||Array.prototype.slice.call(n))};function Vlt(t){return function(n){for(var e=[],r=0;r<n.length-1;r+=2){var i=[n[r],n[r+1]],a=t(i);e.push.apply(e,oI([],aI(a),!1))}return e}}function Xlt(t){return function(n){for(var e=[],r=0;r<n.length-1;r+=3){var i=[n[r],n[r+1],n[r+2]],a=t(i);e.push.apply(e,oI([],aI(a),!1))}return e}}function sI(t,n,e){for(;t<n;)t+=Math.PI*2;for(;t>e;)t-=Math.PI*2;return t}var qlt=function(t,n){var e=typeof Symbol=="function"&&t[Symbol.iterator];if(!e)return t;var r=e.call(t),i,a=[],o;try{for(;(n===void 0||n-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(o)throw o.error}}return a},Klt=function(t,n,e,r,i){var a=qlt(t,2),o=a[0],s=a[1],l=xc();return VG(l,[o,s])},gA=function(t,n){var e=typeof Symbol=="function"&&t[Symbol.iterator];if(!e)return t;var r=e.call(t),i,a=[],o;try{for(;(n===void 0||n-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(o)throw o.error}}return a},Zlt=function(t,n,e,r,i){var a=new nr({range:[n,n+r]}),o=new nr({range:[e,e+i]});return{transform:function(s){var l=gA(s,2),c=l[0],u=l[1];return[a.map(c),o.map(u)]},untransform:function(s){var l=gA(s,2),c=l[0],u=l[1];return[a.invert(c),o.invert(u)]}}},Qlt=function(t,n){var e=typeof Symbol=="function"&&t[Symbol.iterator];if(!e)return t;var r=e.call(t),i,a=[],o;try{for(;(n===void 0||n-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(o)throw o.error}}return a},Jlt=function(t,n,e,r,i){var a=Qlt(t,1),o=a[0];return o(n,e,r,i)},tct=function(t,n){var e=typeof Symbol=="function"&&t[Symbol.iterator];if(!e)return t;var r=e.call(t),i,a=[],o;try{for(;(n===void 0||n-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(o)throw o.error}}return a},ect=function(t,n,e,r,i){var a=tct(t,1),o=a[0];return o},hm=function(t,n){var e=typeof Symbol=="function"&&t[Symbol.iterator];if(!e)return t;var r=e.call(t),i,a=[],o;try{for(;(n===void 0||n-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(o)throw o.error}}return a},nct=function(t,n,e,r,i){var a=hm(t,4),o=a[0],s=a[1],l=a[2],c=a[3],u=new nr({range:[l,c]}),f=new nr({range:[o,s]}),d=i/r,h=d>1?1:d,p=d>1?1/d:1;return{transform:function(g){var y=hm(g,2),m=y[0],x=y[1],_=f.map(m),w=u.map(x),O=w*Math.cos(_)*h,S=w*Math.sin(_)*p,E=O*.5+.5,M=S*.5+.5;return[E,M]},untransform:function(g){var y=hm(g,2),m=y[0],x=y[1],_=(m-.5)*2/h,w=(x-.5)*2/p,O=Math.sqrt(Math.pow(_,2)+Math.pow(w,2)),S=Math.atan2(w,_),E=sI(S,o,s),M=f.invert(E),A=u.invert(O);return[M,A]}}},yA=function(t,n){var e=typeof Symbol=="function"&&t[Symbol.iterator];if(!e)return t;var r=e.call(t),i,a=[],o;try{for(;(n===void 0||n-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(o)throw o.error}}return a},rct=function(t,n,e,r,i){return{transform:function(a){var o=yA(a,2),s=o[0],l=o[1];return[l,s]},untransform:function(a){var o=yA(a,2),s=o[0],l=o[1];return[l,s]}}},ict=function(t,n){var e=typeof Symbol=="function"&&t[Symbol.iterator];if(!e)return t;var r=e.call(t),i,a=[],o;try{for(;(n===void 0||n-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(o)throw o.error}}return a},C0=function(t,n,e,r,i){var a=ict(t,2),o=a[0],s=a[1],l=xc();return qG(l,[o,s])},Y2=function(t,n){var e=typeof Symbol=="function"&&t[Symbol.iterator];if(!e)return t;var r=e.call(t),i,a=[],o;try{for(;(n===void 0||n-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(o)throw o.error}}return a},H2=function(t,n,e){if(e||arguments.length===2)for(var r=0,i=n.length,a;r<i;r++)(a||!(r in n))&&(a||(a=Array.prototype.slice.call(n,0,r)),a[r]=n[r]);return t.concat(a||Array.prototype.slice.call(n))},act=function(t){for(var n=[],e=1;e<arguments.length;e++)n[e-1]=arguments[e];return C0.apply(void 0,H2([[-1,-1]],Y2(n),!1))},oct=function(t){for(var n=[],e=1;e<arguments.length;e++)n[e-1]=arguments[e];return C0.apply(void 0,H2([[-1,1]],Y2(n),!1))},sct=function(t){for(var n=[],e=1;e<arguments.length;e++)n[e-1]=arguments[e];return C0.apply(void 0,H2([[1,-1]],Y2(n),!1))},lct=function(t,n){var e=typeof Symbol=="function"&&t[Symbol.iterator];if(!e)return t;var r=e.call(t),i,a=[],o;try{for(;(n===void 0||n-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(o)throw o.error}}return a},cct=function(t,n,e,r,i){var a=lct(t,1),o=a[0],s=xc();return XG(s,o)},pm=function(t,n){var e=typeof Symbol=="function"&&t[Symbol.iterator];if(!e)return t;var r=e.call(t),i,a=[],o;try{for(;(n===void 0||n-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(o)throw o.error}}return a},uct=function(t,n,e,r,i){var a=pm(t,4),o=a[0],s=a[1],l=a[2],c=a[3],u=(s-0)/(2*Math.PI)+1,f=(c-l)/u,d=f/(Math.PI*2),h=new nr({range:[l,l+f*.99]}),p=new nr({range:[o,s]}),g=i/r,y=g>1?1:g,m=g>1?1/g:1;return{transform:function(x){var _=pm(x,2),w=_[0],O=_[1],S=p.map(w),E=h.map(O),M=Math.cos(S)*(d*S+E)*y,A=Math.sin(S)*(d*S+E)*m,T=M*.5+.5,P=A*.5+.5;return[T,P]},untransform:function(x){var _=pm(x,2),w=_[0],O=_[1],S=(w-.5)*2/y,E=(O-.5)*2/m,M=Math.sqrt(Math.pow(S,2)+Math.pow(E,2)),A=Math.atan2(E,S)+Math.floor(M/f)*Math.PI*2,T=sI(A,o,s),P=M-d*T,N=p.invert(T),C=h.invert(P);return[N,C]}}},fct=function(t,n){var e=typeof Symbol=="function"&&t[Symbol.iterator];if(!e)return t;var r=e.call(t),i,a=[],o;try{for(;(n===void 0||n-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(o)throw o.error}}return a},dct=function(t,n,e,r,i){var a=fct(t,4),o=a[0],s=a[1],l=a[2],c=a[3],u=new nr({range:[l,c]});return{transform:function(f){for(var d=[],h=f.length,p=new Wtt({domain:new Array(h).fill(0).map(function(_,w){return w}),range:[o,s]}),g=0;g<h;g++){var y=f[g],m=p.map(g),x=u.map(y);d.push(m,x)}return d},untransform:function(f){for(var d=[],h=0;h<f.length;h+=2){var p=f[h+1];d.push(u.invert(p))}return d}}},Hl=function(t,n){var e=typeof Symbol=="function"&&t[Symbol.iterator];if(!e)return t;var r=e.call(t),i,a=[],o;try{for(;(n===void 0||n-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(o)throw o.error}}return a};function lI(t){return 1/Math.tan(t)}var hct=function(t,n,e,r,i){var a=Hl(t,1),o=a[0],s=lI(o);return{transform:function(l){var c=Hl(l,2),u=c[0],f=c[1],d=u+f*s;return[d,f]},untransform:function(l){var c=Hl(l,2),u=c[0],f=c[1],d=u-f*s;return[d,f]}}},pct=function(t,n,e,r,i){var a=Hl(t,1),o=a[0],s=lI(o);return{transform:function(l){var c=Hl(l,2),u=c[0],f=c[1],d=f+u*s;return[u,d]},untransform:function(l){var c=Hl(l,2),u=c[0],f=c[1],d=f-u*s;return[u,d]}}},Si=function(t,n){var e=typeof Symbol=="function"&&t[Symbol.iterator];if(!e)return t;var r=e.call(t),i,a=[],o;try{for(;(n===void 0||n-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(o)throw o.error}}return a};function mf(t,n,e,r,i){var a=t<n,o=(a?n-r:i-n)||i-r,s=a?-1:1;return s*o*(e+1)/(e+o/((t-n)*s))+n}function bf(t,n,e,r,i){var a=t<n,o=(a?n-r:i-n)||i-r,s=a?-1:1;return o/(o*(e+1)/(t-n)-e*s)+n}function cv(t,n,e){if(!e)return t;var r=new nr({range:[0,1],domain:[0,n]});return r.map(t)}var vct=function(t,n,e,r,i){var a=Si(t,3),o=a[0],s=a[1],l=a[2],c=l===void 0?!1:l,u=cv(o,r,c);return{transform:function(f){var d=Si(f,2),h=d[0],p=d[1],g=mf(h,u,s,0,1);return[g,p]},untransform:function(f){var d=Si(f,2),h=d[0],p=d[1],g=bf(h,u,s,0,1);return[g,p]}}},gct=function(t,n,e,r,i){var a=Si(t,3),o=a[0],s=a[1],l=a[2],c=l===void 0?!1:l,u=cv(o,i,c);return{transform:function(f){var d=Si(f,2),h=d[0],p=d[1],g=mf(p,u,s,0,1);return[h,g]},untransform:function(f){var d=Si(f,2),h=d[0],p=d[1],g=bf(p,u,s,0,1);return[h,g]}}},yct=function(t,n,e,r,i){var a=Si(t,5),o=a[0],s=a[1],l=a[2],c=a[3],u=a[4],f=u===void 0?!1:u,d=cv(o,r,f),h=cv(s,i,f);return{transform:function(p){var g=Si(p,2),y=g[0],m=g[1],x=mf(y,d,l,0,1),_=mf(m,h,c,0,1);return[x,_]},untransform:function(p){var g=Si(p,2),y=g[0],m=g[1],x=bf(y,d,l,0,1),_=bf(m,h,c,0,1);return[x,_]}}},mct=function(t,n,e,r,i){var a=Si(t,5),o=a[0],s=a[1],l=a[2],c=a[3],u=a[4],f=u===void 0?!1:u,d=new nr({range:[0,r]}),h=new nr({range:[0,i]}),p=f?o:d.map(o),g=f?s:h.map(s);return{transform:function(y){var m=Si(y,2),x=m[0],_=m[1],w=d.map(x)-p,O=h.map(_)-g,S=Math.sqrt(w*w+O*O);if(S>l)return[x,_];var E=mf(S,0,c,0,l),M=Math.atan2(O,w),A=p+E*Math.cos(M),T=g+E*Math.sin(M);return[d.invert(A),h.invert(T)]},untransform:function(y){var m=Si(y,2),x=m[0],_=m[1],w=d.map(x)-p,O=h.map(_)-g,S=Math.sqrt(w*w+O*O);if(S>l)return[x,_];var E=bf(S,0,c,0,l),M=Math.atan2(O,w),A=p+E*Math.cos(M),T=g+E*Math.sin(M);return[d.invert(A),h.invert(T)]}}},mA=function(t,n){var e=typeof Symbol=="function"&&t[Symbol.iterator];if(!e)return t;var r=e.call(t),i,a=[],o;try{for(;(n===void 0||n-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(o)throw o.error}}return a},bct=function(t,n,e,r,i,a,o){var s=new nr({range:[n,n+i]}),l=new nr({range:[e,e+a]}),c=new nr({range:[r,r+o]});return{transform:function(u){var f=mA(u,3),d=f[0],h=f[1],p=f[2];return[s.map(d),l.map(h),c.map(p)]},untransform:function(u){var f=mA(u,3),d=f[0],h=f[1],p=f[2];return[s.invert(d),l.invert(h),c.invert(p)]}}},xct=function(t,n){var e=typeof Symbol=="function"&&t[Symbol.iterator];if(!e)return t;var r=e.call(t),i,a=[],o;try{for(;(n===void 0||n-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(o)throw o.error}}return a},_ct=function(t,n,e,r,i,a,o){var s=xct(t,3),l=s[0],c=s[1],u=s[2];return Wa(Ne(),[l,c,u])},bA=function(t,n){var e=typeof Symbol=="function"&&t[Symbol.iterator];if(!e)return t;var r=e.call(t),i,a=[],o;try{for(;(n===void 0||n-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(o)throw o.error}}return a},wct=function(t,n,e,r,i,a,o){return{transform:function(s){var l=bA(s,3),c=l[0],u=l[1],f=l[2];return[u,c,f]},untransform:function(s){var l=bA(s,3),c=l[0],u=l[1],f=l[2];return[u,c,f]}}},Oct=function(t,n){var e=typeof Symbol=="function"&&t[Symbol.iterator];if(!e)return t;var r=e.call(t),i,a=[],o;try{for(;(n===void 0||n-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(o)throw o.error}}return a},Sct=function(t,n,e,r,i,a,o){var s=Oct(t,3),l=s[0],c=s[1],u=s[2];return Eo(Ne(),[l,c,u])},El=function(t,n){var e=typeof Symbol=="function"&&t[Symbol.iterator];if(!e)return t;var r=e.call(t),i,a=[],o;try{for(;(n===void 0||n-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(o)throw o.error}}return a},kl=function(t,n,e){if(e||arguments.length===2)for(var r=0,i=n.length,a;r<i;r++)(a||!(r in n))&&(a||(a=Array.prototype.slice.call(n,0,r)),a[r]=n[r]);return t.concat(a||Array.prototype.slice.call(n))},Ect=function(t){var n=typeof Symbol=="function"&&Symbol.iterator,e=n&&t[n],r=0;if(e)return e.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")},kct=(function(){function t(n){this.options={x:0,y:0,width:300,height:150,transformations:[]},this.transformers={cartesian:Zlt,translate:Klt,custom:Jlt,matrix:ect,polar:nct,transpose:rct,scale:C0,"shear.x":hct,"shear.y":pct,reflect:act,"reflect.x":oct,"reflect.y":sct,rotate:cct,helix:uct,parallel:dct,fisheye:yct,"fisheye.x":vct,"fisheye.y":gct,"fisheye.circular":mct},this.update(n)}return t.prototype.update=function(n){this.options=nI({},this.options,n),this.recoordinate()},t.prototype.clone=function(){return new t(this.options)},t.prototype.getOptions=function(){return this.options},t.prototype.clear=function(){this.update({transformations:[]})},t.prototype.getSize=function(){var n=this.options,e=n.width,r=n.height;return[e,r]},t.prototype.getCenter=function(){var n=this.options,e=n.x,r=n.y,i=n.width,a=n.height;return[(e*2+i)/2,(r*2+a)/2]},t.prototype.transform=function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];var r=this.options.transformations;return this.update({transformations:kl(kl([],El(r),!1),[kl([],El(n),!1)],!1)}),this},t.prototype.map=function(n){return this.output(n)},t.prototype.invert=function(n){return this.input(n)},t.prototype.recoordinate=function(){this.output=this.compose(),this.input=this.compose(!0)},t.prototype.compose=function(n){var e,r;n===void 0&&(n=!1);var i=n?kl([],El(this.options.transformations),!1).reverse():this.options.transformations,a=n?function(E){return E.untransform}:function(E){return E.transform},o=[],s=[],l=function(E,M){return M===void 0&&(M=!0),s.push(M?Vlt(E):E)};try{for(var c=Ect(i),u=c.next();!u.done;u=c.next()){var f=El(u.value),d=f[0],h=f.slice(1),p=this.transformers[d];if(p){var g=this.options,y=g.x,m=g.y,x=g.width,_=g.height,w=p(kl([],El(h),!1),y,m,x,_);if(iI(w))o.push(w);else{if(o.length){var O=this.createMatrixTransform(o,n);l(O),o.splice(0,o.length)}var S=a(w)||G2;l(S,d!=="parallel")}}}}catch(E){e={error:E}}finally{try{u&&!u.done&&(r=c.return)&&r.call(c)}finally{if(e)throw e.error}}if(o.length){var S=this.createMatrixTransform(o,n);l(S)}return rI.apply(void 0,kl([],El(s),!1))},t.prototype.createMatrixTransform=function(n,e){var r=xc();return e&&n.reverse(),n.forEach(function(i){return KG(r,r,i)}),e&&HG(r,GG(r)),function(i){var a=[i[0],i[1],1];return sC(a,a,r),[a[0],a[1]]}},t})(),Ml=function(t,n){var e=typeof Symbol=="function"&&t[Symbol.iterator];if(!e)return t;var r=e.call(t),i,a=[],o;try{for(;(n===void 0||n-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(o)throw o.error}}return a},Al=function(t,n,e){if(e||arguments.length===2)for(var r=0,i=n.length,a;r<i;r++)(a||!(r in n))&&(a||(a=Array.prototype.slice.call(n,0,r)),a[r]=n[r]);return t.concat(a||Array.prototype.slice.call(n))},Mct=function(t){var n=typeof Symbol=="function"&&Symbol.iterator,e=n&&t[n],r=0;if(e)return e.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")},Act=(function(){function t(n){this.options={x:0,y:0,z:0,width:300,height:150,depth:150,transformations:[]},this.transformers={cartesian3D:bct,translate3D:_ct,scale3D:Sct,transpose3D:wct},this.update(n)}return t.prototype.update=function(n){this.options=nI({},this.options,n),this.recoordinate()},t.prototype.clone=function(){return new t(this.options)},t.prototype.getOptions=function(){return this.options},t.prototype.clear=function(){this.update({transformations:[]})},t.prototype.getSize=function(){var n=this.options,e=n.width,r=n.height,i=n.depth;return[e,r,i]},t.prototype.getCenter=function(){var n=this.options,e=n.x,r=n.y,i=n.z,a=n.width,o=n.height,s=n.depth;return[(e*2+a)/2,(r*2+o)/2,(i*2+s)/2]},t.prototype.transform=function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];var r=this.options.transformations;return this.update({transformations:Al(Al([],Ml(r),!1),[Al([],Ml(n),!1)],!1)}),this},t.prototype.map=function(n){return this.output(n)},t.prototype.invert=function(n){return this.input(n)},t.prototype.recoordinate=function(){this.output=this.compose(),this.input=this.compose(!0)},t.prototype.compose=function(n){var e,r;n===void 0&&(n=!1);var i=n?Al([],Ml(this.options.transformations),!1).reverse():this.options.transformations,a=n?function(A){return A.untransform}:function(A){return A.transform},o=[],s=[],l=function(A,T){return T===void 0&&(T=!0),s.push(T?Xlt(A):A)};try{for(var c=Mct(i),u=c.next();!u.done;u=c.next()){var f=Ml(u.value),d=f[0],h=f.slice(1),p=this.transformers[d];if(p){var g=this.options,y=g.x,m=g.y,x=g.z,_=g.width,w=g.height,O=g.depth,S=p(Al([],Ml(h),!1),y,m,x,_,w,O);if(iI(S))o.push(S);else{if(o.length){var E=this.createMatrixTransform(o,n);l(E),o.splice(0,o.length)}var M=a(S)||G2;l(M,!0)}}}}catch(A){e={error:A}}finally{try{u&&!u.done&&(r=c.return)&&r.call(c)}finally{if(e)throw e.error}}if(o.length){var M=this.createMatrixTransform(o,n);l(M)}return rI.apply(void 0,Al([],Ml(s),!1))},t.prototype.createMatrixTransform=function(n,e){var r=Ne();return e&&n.reverse(),n.forEach(function(i){return Yb(r,r,i)}),e&&Yi(r,Wb(r)),function(i){var a=[i[0],i[1],i[2],1];return pa(a,a,r),[a[0],a[1],a[2]]}},t})(),Tct=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};function Jf(t){return(n,...e)=>at({},t(n,...e),n)}function ol(t){return(n,...e)=>at({},n,t(n,...e))}function Pct(t){return t instanceof Date?!1:typeof t=="object"}function L0(t,n){if(!t)return n;if(Array.isArray(t))return t;if(Pct(t)){const{value:e=n}=t,r=Tct(t,["value"]);return Object.assign(Object.assign({},r),{value:e})}return t}var Cct=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};const cI=()=>t=>{const{children:n}=t;if(!Array.isArray(n))return[];const{x:e=0,y:r=0,width:i,height:a,data:o}=t;return n.map(s=>{var{data:l,x:c,y:u,width:f,height:d}=s,h=Cct(s,["data","x","y","width","height"]);return Object.assign(Object.assign({},h),{data:L0(l,o),x:c??e,y:u??r,width:f??i,height:d??a})})};cI.props={};var Lct=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};const uI=()=>t=>{const{children:n}=t;if(!Array.isArray(n))return[];const{direction:e="row",ratio:r=n.map(()=>1),padding:i=0,data:a}=t,[o,s,l,c]=e==="col"?["y","height","width","x"]:["x","width","height","y"],u=r.reduce((g,y)=>g+y),f=t[s]-i*(n.length-1),d=r.map(g=>f*(g/u)),h=[];let p=t[o]||0;for(let g=0;g<d.length;g+=1){const y=n[g],{data:m}=y,x=Lct(y,["data"]),_=L0(m,a);h.push(Object.assign({[o]:p,[s]:d[g],[c]:t[c]||0,[l]:t[l],data:_},x)),p+=d[g]+i}return h};uI.props={};var vm=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};const fI=()=>t=>{const{children:n}=t,e=vm(t,["children"]);if(!Array.isArray(n))return[];const{data:r,scale:i={},axis:a={},legend:o={},encode:s={},transform:l=[],slider:c={}}=e,u=vm(e,["data","scale","axis","legend","encode","transform","slider"]),f=n.map(d=>{var{data:h,scale:p={},axis:g={},legend:y={},encode:m={},transform:x=[],slider:_={}}=d,w=vm(d,["data","scale","axis","legend","encode","transform","slider"]);return Object.assign({data:L0(h,r),scale:at({},i,p),encode:at({},s,m),transform:[...l,...x],axis:g&&a?at({},a,g):!1,legend:y&&o?at({},o,y):!1,slider:at({},c,_)},w)});return[Object.assign(Object.assign({},u),{marks:f,type:"standardView",slider:c})]};fI.props={};var Nct=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};const dI=({static:t=!1}={})=>n=>{const{width:e,height:r,depth:i,paddingLeft:a,paddingRight:o,paddingTop:s,paddingBottom:l,padding:c,inset:u,insetLeft:f,insetTop:d,insetRight:h,insetBottom:p,margin:g,marginLeft:y,marginBottom:m,marginTop:x,marginRight:_,data:w,coordinate:O,theme:S,component:E,interaction:M,x:A,y:T,z:P,key:N,frame:C,labelTransform:R,parentKey:D,clip:F,viewStyle:j,title:I}=n,$=Nct(n,["width","height","depth","paddingLeft","paddingRight","paddingTop","paddingBottom","padding","inset","insetLeft","insetTop","insetRight","insetBottom","margin","marginLeft","marginBottom","marginTop","marginRight","data","coordinate","theme","component","interaction","x","y","z","key","frame","labelTransform","parentKey","clip","viewStyle","title"]);return[Object.assign(Object.assign({type:"standardView",x:A,y:T,z:P,key:N,width:e,height:r,depth:i,padding:c,paddingLeft:a,paddingRight:o,paddingTop:s,inset:u,insetLeft:f,insetTop:d,insetRight:h,insetBottom:p,paddingBottom:l,theme:S,coordinate:O,component:E,interaction:M,frame:C,labelTransform:R,margin:g,marginLeft:y,marginBottom:m,marginTop:x,marginRight:_,parentKey:D,clip:F,style:j},!t&&{title:I}),{marks:[Object.assign(Object.assign(Object.assign({},$),{key:`${N}-0`,data:w}),t&&{title:I})]})]};dI.props={};class td{constructor(n){this.$value=n}static of(n){return new td(n)}call(n,...e){return this.$value=n(this.$value,...e),this}value(){return this.$value}}var Rct=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};const Ict=Jf(t=>{const{encode:n,data:e,scale:r,shareSize:i=!1}=t,{x:a,y:o}=n,s=(l,c)=>{var u;if(l===void 0||!i)return{};const f=Ue(e,p=>p[l]),d=((u=r==null?void 0:r[c])===null||u===void 0?void 0:u.domain)||Array.from(f.keys()),h=d.map(p=>f.has(p)?f.get(p).length:1);return{domain:d,flex:h}};return{scale:{x:Object.assign(Object.assign({paddingOuter:0,paddingInner:.1,guide:a===void 0?null:{position:"top"}},a===void 0&&{paddingInner:0}),s(a,"x")),y:Object.assign(Object.assign({range:[0,1],paddingOuter:0,paddingInner:.1,guide:o===void 0?null:{position:"right"}},o===void 0&&{paddingInner:0}),s(o,"y"))}}}),U2=ol(t=>{const{data:n,scale:e,legend:r}=t,i=[t];let a,o,s;for(;i.length;){const d=i.shift(),{children:h,encode:p={},scale:g={},legend:y={}}=d,{color:m}=p,{color:x}=g,{color:_}=y;m!==void 0&&(a=m),x!==void 0&&(o=x),_!==void 0&&(s=_),Array.isArray(h)&&i.push(...h)}const l=()=>{var d;const h=(d=e==null?void 0:e.color)===null||d===void 0?void 0:d.domain;if(h!==void 0)return[h];if(a===void 0)return[void 0];const p=typeof a=="function"?a:y=>y[a],g=n.map(p);return g.some(y=>typeof y=="number")?[qa(g)]:[Array.from(new Set(g)),"ordinal"]},c=typeof a=="string"?a:"",[u,f]=l();return Object.assign({encode:{color:{type:"column",value:u??[]}},scale:{color:at({},o,{domain:u,type:f})}},r===void 0&&{legend:{color:at({title:c},s)}})}),V2=Jf(()=>({animate:{enterType:"fadeIn"}})),X2=ol(()=>({frame:!1,encode:{shape:"hollow"},style:{lineWidth:0}})),q2=ol(()=>({type:"cell"})),hI=ol(t=>{const{data:n}=t;return{data:{type:"inline",value:n,transform:[{type:"custom",callback:()=>{const{data:r,encode:i}=t,{x:a,y:o}=i,s=a?Array.from(new Set(r.map(u=>u[a]))):[],l=o?Array.from(new Set(r.map(u=>u[o]))):[];return(()=>{if(s.length&&l.length){const u=[];for(const f of s)for(const d of l)u.push({[a]:f,[o]:d});return u}if(s.length)return s.map(u=>({[a]:u}));if(l.length)return l.map(u=>({[o]:u}))})()}}]}}}),pI=ol((t,n=Dct,e=$ct,r=jct,i={})=>{const{data:a,encode:o,children:s,scale:l,x:c=0,y:u=0,shareData:f=!1,key:d}=t,{value:h}=a,{x:p,y:g}=o,{color:y}=l,{domain:m}=y;return{children:(_,w,O)=>{const{x:S,y:E}=w,{paddingLeft:M,paddingTop:A,marginLeft:T,marginTop:P}=O,{domain:N}=S.getOptions(),{domain:C}=E.getOptions(),R=Qs(_),D=_.map(n),F=_.map(({x:H,y:V})=>[S.invert(H),E.invert(V)]),I=F.map(([H,V])=>Z=>{const{[p]:q,[g]:J}=Z;return(p!==void 0?q===H:!0)&&(g!==void 0?J===V:!0)}).map(H=>h.filter(H)),$=f?Re(I,H=>H.length):void 0,z=F.map(([H,V])=>({columnField:p,columnIndex:N.indexOf(H),columnValue:H,columnValuesLength:N.length,rowField:g,rowIndex:C.indexOf(V),rowValue:V,rowValuesLength:C.length})),Y=z.map(H=>Array.isArray(s)?s:[s(H)].flat(1));return R.flatMap(H=>{const[V,Z,q,J]=D[H],rt=z[H],K=I[H];return Y[H].map(vt=>{var yt,mt,{scale:wt,key:Ot,facet:At=!0,axis:$t={},legend:kt={}}=vt,Mt=Rct(vt,["scale","key","facet","axis","legend"]);const Ct=((yt=wt==null?void 0:wt.y)===null||yt===void 0?void 0:yt.guide)||$t.y,ve=((mt=wt==null?void 0:wt.x)===null||mt===void 0?void 0:mt.guide)||$t.x,ne={x:{tickCount:p?5:void 0},y:{tickCount:g?5:void 0}},Zt=At?K:K.length===0?[]:h,Pe={color:{domain:m}},qe={x:xA(ve,e)(rt,Zt),y:xA(Ct,r)(rt,Zt)};return Object.assign(Object.assign({key:`${Ot}-${H}`,data:Zt,margin:0,x:V+M+c+T,y:Z+A+u+P,parentKey:d,width:q,height:J,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!!Zt.length,dataDomain:$,scale:at(ne,wt,Pe),axis:at({},$t,qe),legend:!1},Mt),i)})})}}});function Dct(t){const{points:n}=t;return fx(n)}function N0(t,n){return n.length?at({title:!1,tick:null,label:null},t):at({title:!1,tick:null,label:null,grid:null},t)}function $ct(t){return(n,e)=>{const{rowIndex:r,rowValuesLength:i,columnIndex:a,columnValuesLength:o}=n;if(r!==i-1)return N0(t,e);const s=a!==o-1?!1:void 0,l=e.length?void 0:null;return at({title:s,grid:l},t)}}function jct(t){return(n,e)=>{const{rowIndex:r,columnIndex:i}=n;if(i!==0)return N0(t,e);const a=r!==0?!1:void 0,o=e.length?void 0:null;return at({title:a,grid:o},t)}}function xA(t,n){return typeof t=="function"?t:t===null||t===!1?()=>null:n(t)}const vI=()=>t=>[td.of(t).call(q2).call(U2).call(V2).call(Ict).call(X2).call(hI).call(pI).value()];vI.props={};var X1=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};const Fct=Jf(t=>({scale:{x:{guide:null,paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}})),Bct=ol(t=>{const{data:n,children:e,x:r=0,y:i=0,key:a}=t;return{children:(s,l,c)=>{const{x:u,y:f}=l,{paddingLeft:d,paddingTop:h,marginLeft:p,marginTop:g}=c,{domain:y}=u.getOptions(),{domain:m}=f.getOptions(),x=Qs(s),_=s.map(({points:E})=>fx(E)),w=s.map(({x:E,y:M})=>[u.invert(E),f.invert(M)]),O=w.map(([E,M])=>({columnField:E,columnIndex:y.indexOf(E),columnValue:E,columnValuesLength:y.length,rowField:M,rowIndex:m.indexOf(M),rowValue:M,rowValuesLength:m.length})),S=O.map(E=>Array.isArray(e)?e:[e(E)].flat(1));return x.flatMap(E=>{const[M,A,T,P]=_[E],[N,C]=w[E],R=O[E];return S[E].map(F=>{var j,I;const{scale:$,key:z,encode:Y,axis:H,interaction:V}=F,Z=X1(F,["scale","key","encode","axis","interaction"]),q=(j=$==null?void 0:$.y)===null||j===void 0?void 0:j.guide,J=(I=$==null?void 0:$.x)===null||I===void 0?void 0:I.guide,rt={x:{facet:!1},y:{facet:!1}},K={x:Wct(J)(R,n),y:Gct(q)(R,n)},ot={x:{tickCount:5},y:{tickCount:5}};return Object.assign({data:n,parentKey:a,key:`${z}-${E}`,x:M+d+r+p,y:A+h+i+g,width:T,height:P,margin:0,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!0,scale:at(rt,$),axis:at(ot,H,K),legend:!1,encode:at({},Y,{x:N,y:C}),interaction:at({},V,{legendFilter:!1})},Z)})})}}}),zct=ol(t=>{const{encode:n}=t,e=X1(t,["encode"]),{position:r=[],x:i=r,y:a=[...r].reverse()}=n,o=X1(n,["position","x","y"]),s=[];for(const l of[i].flat(1))for(const c of[a].flat(1))s.push({$x:l,$y:c});return Object.assign(Object.assign({},e),{data:s,encode:Object.assign(Object.assign({},o),{x:"$x",y:"$y"}),scale:Object.assign(Object.assign({},[i].flat(1).length===1&&{x:{paddingInner:0}}),[a].flat(1).length===1&&{y:{paddingInner:0}})})});function Wct(t){return typeof t=="function"?t:t===null?()=>null:(n,e)=>{const{rowIndex:r,rowValuesLength:i}=n;if(r!==i-1)return N0(t,e)}}function Gct(t){return typeof t=="function"?t:t===null?()=>null:(n,e)=>{const{columnIndex:r}=n;if(r!==0)return N0(t,e)}}const Yct=()=>t=>[td.of(t).call(q2).call(U2).call(Bct).call(zct).call(V2).call(X2).call(Fct).value()];var Hct=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};const Uct=Jf(t=>({scale:{x:{guide:{type:"axisArc"},paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}})),Vct=Jf(t=>({coordinate:{type:"polar"}})),Xct=t=>{const{encode:n}=t,e=Hct(t,["encode"]),{position:r}=n;return Object.assign(Object.assign({},e),{encode:{x:r}})};function _A(t){return n=>null}function qct(t){const{points:n}=t,[e,r,i,a]=n,o=vn(e,a),s=On(e,a),l=On(r,i),c=N3(s,l),u=1/Math.sin(c/2),f=o/(1+u),d=f*Math.sqrt(2),[h,p]=i,y=ac(s)+c/2,m=f*u,x=h+m*Math.sin(y),_=p-m*Math.cos(y);return[x-d/2,_-d/2,d,d]}const Kct=()=>t=>[td.of(t).call(q2).call(Xct).call(U2).call(Vct).call(hI).call(pI,qct,_A,_A,{frame:!1}).call(V2).call(X2).call(Uct).value()];function Zct(t,n,e){const i=e,a=[0,i],o=[-i+1,1];if(t==="normal")return a;if(t==="reverse")return o;if(t==="alternate")return n%2===0?a:o;if(t==="reverse-alternate")return n%2===0?o:a}function Qct(t,n,e){const r=[t];for(;r.length;){const i=r.pop();i.animate=at({enter:{duration:n},update:{duration:n,easing:e,type:"morphing",fill:"both"},exit:{type:"fadeOut",duration:n}},i.animate||{});const{children:a}=i;Array.isArray(a)&&r.push(...a)}return t}const gI=()=>t=>{const{children:n=[],duration:e=1e3,iterationCount:r=1,direction:i="normal",easing:a="ease-in-out-sine"}=t,o=n.length;if(!Array.isArray(n)||o===0)return[];const{key:s}=n[0],l=n.map(c=>Object.assign(Object.assign({},c),{key:s})).map(c=>Qct(c,e,a));return function*(){let c=0,u;for(;r==="infinite"||c<r;){const[f,d]=Zct(i,c,o);for(let h=f;h<d;h+=1){const p=Math.abs(h);u!==p&&(yield l[p]),u=p}c++}}};gI.props={};var Jct=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};const yI=()=>t=>{const{type:n,data:e,scale:r,encode:i,style:a,animate:o,key:s,state:l,tooltip:c}=t,u=Jct(t,["type","data","scale","encode","style","animate","key","state","tooltip"]);return[Object.assign(Object.assign({type:"geoView"},u),{children:[{type:"geoPath",key:`${s}-0`,data:{value:e},scale:r,encode:i,style:a,animate:o,state:l,tooltip:c}]})]};yI.props={};var Wt=1e-6,mI=1e-12,pe=Math.PI,Pn=pe/2,wA=pe/4,ei=pe*2,vr=180/pe,xn=pe/180,Te=Math.abs,Ac=Math.atan,ro=Math.atan2,ue=Math.cos,Bh=Math.ceil,bI=Math.exp,uv=Math.log,gm=Math.pow,Jt=Math.sin,xi=Math.sign||function(t){return t>0?1:t<0?-1:0},Gr=Math.sqrt,K2=Math.tan;function xI(t){return t>1?0:t<-1?pe:Math.acos(t)}function Mi(t){return t>1?Pn:t<-1?-Pn:Math.asin(t)}function _i(){}function fv(t,n){t&&SA.hasOwnProperty(t.type)&&SA[t.type](t,n)}var OA={Feature:function(t,n){fv(t.geometry,n)},FeatureCollection:function(t,n){for(var e=t.features,r=-1,i=e.length;++r<i;)fv(e[r].geometry,n)}},SA={Sphere:function(t,n){n.sphere()},Point:function(t,n){t=t.coordinates,n.point(t[0],t[1],t[2])},MultiPoint:function(t,n){for(var e=t.coordinates,r=-1,i=e.length;++r<i;)t=e[r],n.point(t[0],t[1],t[2])},LineString:function(t,n){q1(t.coordinates,n,0)},MultiLineString:function(t,n){for(var e=t.coordinates,r=-1,i=e.length;++r<i;)q1(e[r],n,0)},Polygon:function(t,n){EA(t.coordinates,n)},MultiPolygon:function(t,n){for(var e=t.coordinates,r=-1,i=e.length;++r<i;)EA(e[r],n)},GeometryCollection:function(t,n){for(var e=t.geometries,r=-1,i=e.length;++r<i;)fv(e[r],n)}};function q1(t,n,e){var r=-1,i=t.length-e,a;for(n.lineStart();++r<i;)a=t[r],n.point(a[0],a[1],a[2]);n.lineEnd()}function EA(t,n){var e=-1,r=t.length;for(n.polygonStart();++e<r;)q1(t[e],n,1);n.polygonEnd()}function Cl(t,n){t&&OA.hasOwnProperty(t.type)?OA[t.type](t,n):fv(t,n)}function K1(t){return[ro(t[1],t[0]),Mi(t[2])]}function pc(t){var n=t[0],e=t[1],r=ue(e);return[r*ue(n),r*Jt(n),Jt(e)]}function zh(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function dv(t,n){return[t[1]*n[2]-t[2]*n[1],t[2]*n[0]-t[0]*n[2],t[0]*n[1]-t[1]*n[0]]}function ym(t,n){t[0]+=n[0],t[1]+=n[1],t[2]+=n[2]}function Wh(t,n){return[t[0]*n,t[1]*n,t[2]*n]}function Z1(t){var n=Gr(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=n,t[1]/=n,t[2]/=n}function Q1(t,n){function e(r,i){return r=t(r,i),n(r[0],r[1])}return t.invert&&n.invert&&(e.invert=function(r,i){return r=n.invert(r,i),r&&t.invert(r[0],r[1])}),e}function J1(t,n){return Te(t)>pe&&(t-=Math.round(t/ei)*ei),[t,n]}J1.invert=J1;function _I(t,n,e){return(t%=ei)?n||e?Q1(MA(t),AA(n,e)):MA(t):n||e?AA(n,e):J1}function kA(t){return function(n,e){return n+=t,Te(n)>pe&&(n-=Math.round(n/ei)*ei),[n,e]}}function MA(t){var n=kA(t);return n.invert=kA(-t),n}function AA(t,n){var e=ue(t),r=Jt(t),i=ue(n),a=Jt(n);function o(s,l){var c=ue(l),u=ue(s)*c,f=Jt(s)*c,d=Jt(l),h=d*e+u*r;return[ro(f*i-h*a,u*e-d*r),Mi(h*i+f*a)]}return o.invert=function(s,l){var c=ue(l),u=ue(s)*c,f=Jt(s)*c,d=Jt(l),h=d*i-f*a;return[ro(f*i+d*a,u*e+h*r),Mi(h*e-u*r)]},o}function tut(t){t=_I(t[0]*xn,t[1]*xn,t.length>2?t[2]*xn:0);function n(e){return e=t(e[0]*xn,e[1]*xn),e[0]*=vr,e[1]*=vr,e}return n.invert=function(e){return e=t.invert(e[0]*xn,e[1]*xn),e[0]*=vr,e[1]*=vr,e},n}function eut(t,n,e,r,i,a){if(e){var o=ue(n),s=Jt(n),l=r*e;i==null?(i=n+r*ei,a=n-l/2):(i=TA(o,i),a=TA(o,a),(r>0?i<a:i>a)&&(i+=r*ei));for(var c,u=i;r>0?u>a:u<a;u-=l)c=K1([o,-s*ue(u),-s*Jt(u)]),t.point(c[0],c[1])}}function TA(t,n){n=pc(n),n[0]-=t,Z1(n);var e=xI(-n[1]);return((-n[2]<0?-e:e)+ei-Wt)%ei}function wI(){var t=[],n;return{point:function(e,r,i){n.push([e,r,i])},lineStart:function(){t.push(n=[])},lineEnd:_i,rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))},result:function(){var e=t;return t=[],n=null,e}}}function fp(t,n){return Te(t[0]-n[0])<Wt&&Te(t[1]-n[1])<Wt}function Gh(t,n,e,r){this.x=t,this.z=n,this.o=e,this.e=r,this.v=!1,this.n=this.p=null}function OI(t,n,e,r,i){var a=[],o=[],s,l;if(t.forEach(function(p){if(!((g=p.length-1)<=0)){var g,y=p[0],m=p[g],x;if(fp(y,m)){if(!y[2]&&!m[2]){for(i.lineStart(),s=0;s<g;++s)i.point((y=p[s])[0],y[1]);i.lineEnd();return}m[0]+=2*Wt}a.push(x=new Gh(y,p,null,!0)),o.push(x.o=new Gh(y,null,x,!1)),a.push(x=new Gh(m,p,null,!1)),o.push(x.o=new Gh(m,null,x,!0))}}),!!a.length){for(o.sort(n),PA(a),PA(o),s=0,l=o.length;s<l;++s)o[s].e=e=!e;for(var c=a[0],u,f;;){for(var d=c,h=!0;d.v;)if((d=d.n)===c)return;u=d.z,i.lineStart();do{if(d.v=d.o.v=!0,d.e){if(h)for(s=0,l=u.length;s<l;++s)i.point((f=u[s])[0],f[1]);else r(d.x,d.n.x,1,i);d=d.n}else{if(h)for(u=d.p.z,s=u.length-1;s>=0;--s)i.point((f=u[s])[0],f[1]);else r(d.x,d.p.x,-1,i);d=d.p}d=d.o,u=d.z,h=!h}while(!d.v);i.lineEnd()}}}function PA(t){if(n=t.length){for(var n,e=0,r=t[0],i;++e<n;)r.n=i=t[e],i.p=r,r=i;r.n=i=t[0],i.p=r}}function mm(t){return Te(t[0])<=pe?t[0]:xi(t[0])*((Te(t[0])+pe)%ei-pe)}function nut(t,n){var e=mm(n),r=n[1],i=Jt(r),a=[Jt(e),-ue(e),0],o=0,s=0,l=new Bs;i===1?r=Pn+Wt:i===-1&&(r=-Pn-Wt);for(var c=0,u=t.length;c<u;++c)if(d=(f=t[c]).length)for(var f,d,h=f[d-1],p=mm(h),g=h[1]/2+wA,y=Jt(g),m=ue(g),x=0;x<d;++x,p=w,y=S,m=E,h=_){var _=f[x],w=mm(_),O=_[1]/2+wA,S=Jt(O),E=ue(O),M=w-p,A=M>=0?1:-1,T=A*M,P=T>pe,N=y*S;if(l.add(ro(N*A*Jt(T),m*E+N*ue(T))),o+=P?M+A*ei:M,P^p>=e^w>=e){var C=dv(pc(h),pc(_));Z1(C);var R=dv(a,C);Z1(R);var D=(P^M>=0?-1:1)*Mi(R[2]);(r>D||r===D&&(C[0]||C[1]))&&(s+=P^M>=0?1:-1)}}return(o<-Wt||o<Wt&&l<-mI)^s&1}function SI(t,n,e,r){return function(i){var a=n(i),o=wI(),s=n(o),l=!1,c,u,f,d={point:h,lineStart:g,lineEnd:y,polygonStart:function(){d.point=m,d.lineStart=x,d.lineEnd=_,u=[],c=[]},polygonEnd:function(){d.point=h,d.lineStart=g,d.lineEnd=y,u=_C(u);var w=nut(c,r);u.length?(l||(i.polygonStart(),l=!0),OI(u,iut,w,e,i)):w&&(l||(i.polygonStart(),l=!0),i.lineStart(),e(null,null,1,i),i.lineEnd()),l&&(i.polygonEnd(),l=!1),u=c=null},sphere:function(){i.polygonStart(),i.lineStart(),e(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function h(w,O){t(w,O)&&i.point(w,O)}function p(w,O){a.point(w,O)}function g(){d.point=p,a.lineStart()}function y(){d.point=h,a.lineEnd()}function m(w,O){f.push([w,O]),s.point(w,O)}function x(){s.lineStart(),f=[]}function _(){m(f[0][0],f[0][1]),s.lineEnd();var w=s.clean(),O=o.result(),S,E=O.length,M,A,T;if(f.pop(),c.push(f),f=null,!!E){if(w&1){if(A=O[0],(M=A.length-1)>0){for(l||(i.polygonStart(),l=!0),i.lineStart(),S=0;S<M;++S)i.point((T=A[S])[0],T[1]);i.lineEnd()}return}E>1&&w&2&&O.push(O.pop().concat(O.shift())),u.push(O.filter(rut))}}return d}}function rut(t){return t.length>1}function iut(t,n){return((t=t.x)[0]<0?t[1]-Pn-Wt:Pn-t[1])-((n=n.x)[0]<0?n[1]-Pn-Wt:Pn-n[1])}const CA=SI(function(){return!0},aut,sut,[-pe,-Pn]);function aut(t){var n=NaN,e=NaN,r=NaN,i;return{lineStart:function(){t.lineStart(),i=1},point:function(a,o){var s=a>0?pe:-pe,l=Te(a-n);Te(l-pe)<Wt?(t.point(n,e=(e+o)/2>0?Pn:-Pn),t.point(r,e),t.lineEnd(),t.lineStart(),t.point(s,e),t.point(a,e),i=0):r!==s&&l>=pe&&(Te(n-r)<Wt&&(n-=r*Wt),Te(a-s)<Wt&&(a-=s*Wt),e=out(n,e,a,o),t.point(r,e),t.lineEnd(),t.lineStart(),t.point(s,e),i=0),t.point(n=a,e=o),r=s},lineEnd:function(){t.lineEnd(),n=e=NaN},clean:function(){return 2-i}}}function out(t,n,e,r){var i,a,o=Jt(t-e);return Te(o)>Wt?Ac((Jt(n)*(a=ue(r))*Jt(e)-Jt(r)*(i=ue(n))*Jt(t))/(i*a*o)):(n+r)/2}function sut(t,n,e,r){var i;if(t==null)i=e*Pn,r.point(-pe,i),r.point(0,i),r.point(pe,i),r.point(pe,0),r.point(pe,-i),r.point(0,-i),r.point(-pe,-i),r.point(-pe,0),r.point(-pe,i);else if(Te(t[0]-n[0])>Wt){var a=t[0]<n[0]?pe:-pe;i=e*a/2,r.point(-a,i),r.point(0,i),r.point(a,i)}else r.point(n[0],n[1])}function lut(t){var n=ue(t),e=2*xn,r=n>0,i=Te(n)>Wt;function a(u,f,d,h){eut(h,t,e,d,u,f)}function o(u,f){return ue(u)*ue(f)>n}function s(u){var f,d,h,p,g;return{lineStart:function(){p=h=!1,g=1},point:function(y,m){var x=[y,m],_,w=o(y,m),O=r?w?0:c(y,m):w?c(y+(y<0?pe:-pe),m):0;if(!f&&(p=h=w)&&u.lineStart(),w!==h&&(_=l(f,x),(!_||fp(f,_)||fp(x,_))&&(x[2]=1)),w!==h)g=0,w?(u.lineStart(),_=l(x,f),u.point(_[0],_[1])):(_=l(f,x),u.point(_[0],_[1],2),u.lineEnd()),f=_;else if(i&&f&&r^w){var S;!(O&d)&&(S=l(x,f,!0))&&(g=0,r?(u.lineStart(),u.point(S[0][0],S[0][1]),u.point(S[1][0],S[1][1]),u.lineEnd()):(u.point(S[1][0],S[1][1]),u.lineEnd(),u.lineStart(),u.point(S[0][0],S[0][1],3)))}w&&(!f||!fp(f,x))&&u.point(x[0],x[1]),f=x,h=w,d=O},lineEnd:function(){h&&u.lineEnd(),f=null},clean:function(){return g|(p&&h)<<1}}}function l(u,f,d){var h=pc(u),p=pc(f),g=[1,0,0],y=dv(h,p),m=zh(y,y),x=y[0],_=m-x*x;if(!_)return!d&&u;var w=n*m/_,O=-n*x/_,S=dv(g,y),E=Wh(g,w),M=Wh(y,O);ym(E,M);var A=S,T=zh(E,A),P=zh(A,A),N=T*T-P*(zh(E,E)-1);if(!(N<0)){var C=Gr(N),R=Wh(A,(-T-C)/P);if(ym(R,E),R=K1(R),!d)return R;var D=u[0],F=f[0],j=u[1],I=f[1],$;F<D&&($=D,D=F,F=$);var z=F-D,Y=Te(z-pe)<Wt,H=Y||z<Wt;if(!Y&&I<j&&($=j,j=I,I=$),H?Y?j+I>0^R[1]<(Te(R[0]-D)<Wt?j:I):j<=R[1]&&R[1]<=I:z>pe^(D<=R[0]&&R[0]<=F)){var V=Wh(A,(-T+C)/P);return ym(V,E),[R,K1(V)]}}}function c(u,f){var d=r?t:pe-t,h=0;return u<-d?h|=1:u>d&&(h|=2),f<-d?h|=4:f>d&&(h|=8),h}return SI(o,s,a,r?[0,-t]:[-pe,t-pe])}function cut(t,n,e,r,i,a){var o=t[0],s=t[1],l=n[0],c=n[1],u=0,f=1,d=l-o,h=c-s,p;if(p=e-o,!(!d&&p>0)){if(p/=d,d<0){if(p<u)return;p<f&&(f=p)}else if(d>0){if(p>f)return;p>u&&(u=p)}if(p=i-o,!(!d&&p<0)){if(p/=d,d<0){if(p>f)return;p>u&&(u=p)}else if(d>0){if(p<u)return;p<f&&(f=p)}if(p=r-s,!(!h&&p>0)){if(p/=h,h<0){if(p<u)return;p<f&&(f=p)}else if(h>0){if(p>f)return;p>u&&(u=p)}if(p=a-s,!(!h&&p<0)){if(p/=h,h<0){if(p>f)return;p>u&&(u=p)}else if(h>0){if(p<u)return;p<f&&(f=p)}return u>0&&(t[0]=o+u*d,t[1]=s+u*h),f<1&&(n[0]=o+f*d,n[1]=s+f*h),!0}}}}}var Eu=1e9,Yh=-Eu;function EI(t,n,e,r){function i(c,u){return t<=c&&c<=e&&n<=u&&u<=r}function a(c,u,f,d){var h=0,p=0;if(c==null||(h=o(c,f))!==(p=o(u,f))||l(c,u)<0^f>0)do d.point(h===0||h===3?t:e,h>1?r:n);while((h=(h+f+4)%4)!==p);else d.point(u[0],u[1])}function o(c,u){return Te(c[0]-t)<Wt?u>0?0:3:Te(c[0]-e)<Wt?u>0?2:1:Te(c[1]-n)<Wt?u>0?1:0:u>0?3:2}function s(c,u){return l(c.x,u.x)}function l(c,u){var f=o(c,1),d=o(u,1);return f!==d?f-d:f===0?u[1]-c[1]:f===1?c[0]-u[0]:f===2?c[1]-u[1]:u[0]-c[0]}return function(c){var u=c,f=wI(),d,h,p,g,y,m,x,_,w,O,S,E={point:M,lineStart:N,lineEnd:C,polygonStart:T,polygonEnd:P};function M(D,F){i(D,F)&&u.point(D,F)}function A(){for(var D=0,F=0,j=h.length;F<j;++F)for(var I=h[F],$=1,z=I.length,Y=I[0],H,V,Z=Y[0],q=Y[1];$<z;++$)H=Z,V=q,Y=I[$],Z=Y[0],q=Y[1],V<=r?q>r&&(Z-H)*(r-V)>(q-V)*(t-H)&&++D:q<=r&&(Z-H)*(r-V)<(q-V)*(t-H)&&--D;return D}function T(){u=f,d=[],h=[],S=!0}function P(){var D=A(),F=S&&D,j=(d=_C(d)).length;(F||j)&&(c.polygonStart(),F&&(c.lineStart(),a(null,null,1,c),c.lineEnd()),j&&OI(d,s,D,a,c),c.polygonEnd()),u=c,d=h=p=null}function N(){E.point=R,h&&h.push(p=[]),O=!0,w=!1,x=_=NaN}function C(){d&&(R(g,y),m&&w&&f.rejoin(),d.push(f.result())),E.point=M,w&&u.lineEnd()}function R(D,F){var j=i(D,F);if(h&&p.push([D,F]),O)g=D,y=F,m=j,O=!1,j&&(u.lineStart(),u.point(D,F));else if(j&&w)u.point(D,F);else{var I=[x=Math.max(Yh,Math.min(Eu,x)),_=Math.max(Yh,Math.min(Eu,_))],$=[D=Math.max(Yh,Math.min(Eu,D)),F=Math.max(Yh,Math.min(Eu,F))];cut(I,$,t,n,e,r)?(w||(u.lineStart(),u.point(I[0],I[1])),u.point($[0],$[1]),j||u.lineEnd(),S=!1):j&&(u.lineStart(),u.point(D,F),S=!1)}x=D,_=F,w=j}return E}}function LA(t,n,e){var r=Ll(t,n-Wt,e).concat(n);return function(i){return r.map(function(a){return[i,a]})}}function NA(t,n,e){var r=Ll(t,n-Wt,e).concat(n);return function(i){return r.map(function(a){return[a,i]})}}function uut(){var t,n,e,r,i,a,o,s,l=10,c=l,u=90,f=360,d,h,p,g,y=2.5;function m(){return{type:"MultiLineString",coordinates:x()}}function x(){return Ll(Bh(r/u)*u,e,u).map(p).concat(Ll(Bh(s/f)*f,o,f).map(g)).concat(Ll(Bh(n/l)*l,t,l).filter(function(_){return Te(_%u)>Wt}).map(d)).concat(Ll(Bh(a/c)*c,i,c).filter(function(_){return Te(_%f)>Wt}).map(h))}return m.lines=function(){return x().map(function(_){return{type:"LineString",coordinates:_}})},m.outline=function(){return{type:"Polygon",coordinates:[p(r).concat(g(o).slice(1),p(e).reverse().slice(1),g(s).reverse().slice(1))]}},m.extent=function(_){return arguments.length?m.extentMajor(_).extentMinor(_):m.extentMinor()},m.extentMajor=function(_){return arguments.length?(r=+_[0][0],e=+_[1][0],s=+_[0][1],o=+_[1][1],r>e&&(_=r,r=e,e=_),s>o&&(_=s,s=o,o=_),m.precision(y)):[[r,s],[e,o]]},m.extentMinor=function(_){return arguments.length?(n=+_[0][0],t=+_[1][0],a=+_[0][1],i=+_[1][1],n>t&&(_=n,n=t,t=_),a>i&&(_=a,a=i,i=_),m.precision(y)):[[n,a],[t,i]]},m.step=function(_){return arguments.length?m.stepMajor(_).stepMinor(_):m.stepMinor()},m.stepMajor=function(_){return arguments.length?(u=+_[0],f=+_[1],m):[u,f]},m.stepMinor=function(_){return arguments.length?(l=+_[0],c=+_[1],m):[l,c]},m.precision=function(_){return arguments.length?(y=+_,d=LA(a,i,90),h=NA(n,t,y),p=LA(s,o,90),g=NA(r,e,y),m):y},m.extentMajor([[-180,-90+Wt],[180,90-Wt]]).extentMinor([[-180,-80-Wt],[180,80+Wt]])}function fut(){return uut()()}const xf=t=>t;var bm=new Bs,tb=new Bs,kI,MI,eb,nb,Ha={point:_i,lineStart:_i,lineEnd:_i,polygonStart:function(){Ha.lineStart=dut,Ha.lineEnd=put},polygonEnd:function(){Ha.lineStart=Ha.lineEnd=Ha.point=_i,bm.add(Te(tb)),tb=new Bs},result:function(){var t=bm/2;return bm=new Bs,t}};function dut(){Ha.point=hut}function hut(t,n){Ha.point=AI,kI=eb=t,MI=nb=n}function AI(t,n){tb.add(nb*t-eb*n),eb=t,nb=n}function put(){AI(kI,MI)}var vc=1/0,hv=vc,_f=-vc,pv=_f,vv={point:vut,lineStart:_i,lineEnd:_i,polygonStart:_i,polygonEnd:_i,result:function(){var t=[[vc,hv],[_f,pv]];return _f=pv=-(hv=vc=1/0),t}};function vut(t,n){t<vc&&(vc=t),t>_f&&(_f=t),n<hv&&(hv=n),n>pv&&(pv=n)}var rb=0,ib=0,ku=0,gv=0,yv=0,Rl=0,ab=0,ob=0,Mu=0,TI,PI,la,ca,bi={point:Vs,lineStart:RA,lineEnd:IA,polygonStart:function(){bi.lineStart=mut,bi.lineEnd=but},polygonEnd:function(){bi.point=Vs,bi.lineStart=RA,bi.lineEnd=IA},result:function(){var t=Mu?[ab/Mu,ob/Mu]:Rl?[gv/Rl,yv/Rl]:ku?[rb/ku,ib/ku]:[NaN,NaN];return rb=ib=ku=gv=yv=Rl=ab=ob=Mu=0,t}};function Vs(t,n){rb+=t,ib+=n,++ku}function RA(){bi.point=gut}function gut(t,n){bi.point=yut,Vs(la=t,ca=n)}function yut(t,n){var e=t-la,r=n-ca,i=Gr(e*e+r*r);gv+=i*(la+t)/2,yv+=i*(ca+n)/2,Rl+=i,Vs(la=t,ca=n)}function IA(){bi.point=Vs}function mut(){bi.point=xut}function but(){CI(TI,PI)}function xut(t,n){bi.point=CI,Vs(TI=la=t,PI=ca=n)}function CI(t,n){var e=t-la,r=n-ca,i=Gr(e*e+r*r);gv+=i*(la+t)/2,yv+=i*(ca+n)/2,Rl+=i,i=ca*t-la*n,ab+=i*(la+t),ob+=i*(ca+n),Mu+=i*3,Vs(la=t,ca=n)}function LI(t){this._context=t}LI.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(t,n){switch(this._point){case 0:{this._context.moveTo(t,n),this._point=1;break}case 1:{this._context.lineTo(t,n);break}default:{this._context.moveTo(t+this._radius,n),this._context.arc(t,n,this._radius,0,ei);break}}},result:_i};var sb=new Bs,xm,NI,RI,Au,Tu,wf={point:_i,lineStart:function(){wf.point=_ut},lineEnd:function(){xm&&II(NI,RI),wf.point=_i},polygonStart:function(){xm=!0},polygonEnd:function(){xm=null},result:function(){var t=+sb;return sb=new Bs,t}};function _ut(t,n){wf.point=II,NI=Au=t,RI=Tu=n}function II(t,n){Au-=t,Tu-=n,sb.add(Gr(Au*Au+Tu*Tu)),Au=t,Tu=n}let DA,mv,$A,jA;class FA{constructor(n){this._append=n==null?DI:wut(n),this._radius=4.5,this._=""}pointRadius(n){return this._radius=+n,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){this._line===0&&(this._+="Z"),this._point=NaN}point(n,e){switch(this._point){case 0:{this._append`M${n},${e}`,this._point=1;break}case 1:{this._append`L${n},${e}`;break}default:{if(this._append`M${n},${e}`,this._radius!==$A||this._append!==mv){const r=this._radius,i=this._;this._="",this._append`m0,${r}a${r},${r} 0 1,1 0,${-2*r}a${r},${r} 0 1,1 0,${2*r}z`,$A=r,mv=this._append,jA=this._,this._=i}this._+=jA;break}}}result(){const n=this._;return this._="",n.length?n:null}}function DI(t){let n=1;this._+=t[0];for(const e=t.length;n<e;++n)this._+=arguments[n]+t[n]}function wut(t){const n=Math.floor(t);if(!(n>=0))throw new RangeError(`invalid digits: ${t}`);if(n>15)return DI;if(n!==DA){const e=10**n;DA=n,mv=function(i){let a=1;this._+=i[0];for(const o=i.length;a<o;++a)this._+=Math.round(arguments[a]*e)/e+i[a]}}return mv}function $I(t,n){let e=3,r=4.5,i,a;function o(s){return s&&(typeof r=="function"&&a.pointRadius(+r.apply(this,arguments)),Cl(s,i(a))),a.result()}return o.area=function(s){return Cl(s,i(Ha)),Ha.result()},o.measure=function(s){return Cl(s,i(wf)),wf.result()},o.bounds=function(s){return Cl(s,i(vv)),vv.result()},o.centroid=function(s){return Cl(s,i(bi)),bi.result()},o.projection=function(s){return arguments.length?(i=s==null?(t=null,xf):(t=s).stream,o):t},o.context=function(s){return arguments.length?(a=s==null?(n=null,new FA(e)):new LI(n=s),typeof r!="function"&&a.pointRadius(r),o):n},o.pointRadius=function(s){return arguments.length?(r=typeof s=="function"?s:(a.pointRadius(+s),+s),o):r},o.digits=function(s){if(!arguments.length)return e;if(s==null)e=null;else{const l=Math.floor(s);if(!(l>=0))throw new RangeError(`invalid digits: ${s}`);e=l}return n===null&&(a=new FA(e)),o},o.projection(t).digits(e).context(n)}function R0(t){return function(n){var e=new lb;for(var r in t)e[r]=t[r];return e.stream=n,e}}function lb(){}lb.prototype={constructor:lb,point:function(t,n){this.stream.point(t,n)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function Z2(t,n,e){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),r!=null&&t.clipExtent(null),Cl(e,t.stream(vv)),n(vv.result()),r!=null&&t.clipExtent(r),t}function I0(t,n,e){return Z2(t,function(r){var i=n[1][0]-n[0][0],a=n[1][1]-n[0][1],o=Math.min(i/(r[1][0]-r[0][0]),a/(r[1][1]-r[0][1])),s=+n[0][0]+(i-o*(r[1][0]+r[0][0]))/2,l=+n[0][1]+(a-o*(r[1][1]+r[0][1]))/2;t.scale(150*o).translate([s,l])},e)}function Q2(t,n,e){return I0(t,[[0,0],n],e)}function J2(t,n,e){return Z2(t,function(r){var i=+n,a=i/(r[1][0]-r[0][0]),o=(i-a*(r[1][0]+r[0][0]))/2,s=-a*r[0][1];t.scale(150*a).translate([o,s])},e)}function t_(t,n,e){return Z2(t,function(r){var i=+n,a=i/(r[1][1]-r[0][1]),o=-a*r[0][0],s=(i-a*(r[1][1]+r[0][1]))/2;t.scale(150*a).translate([o,s])},e)}var BA=16,Out=ue(30*xn);function zA(t,n){return+n?Eut(t,n):Sut(t)}function Sut(t){return R0({point:function(n,e){n=t(n,e),this.stream.point(n[0],n[1])}})}function Eut(t,n){function e(r,i,a,o,s,l,c,u,f,d,h,p,g,y){var m=c-r,x=u-i,_=m*m+x*x;if(_>4*n&&g--){var w=o+d,O=s+h,S=l+p,E=Gr(w*w+O*O+S*S),M=Mi(S/=E),A=Te(Te(S)-1)<Wt||Te(a-f)<Wt?(a+f)/2:ro(O,w),T=t(A,M),P=T[0],N=T[1],C=P-r,R=N-i,D=x*C-m*R;(D*D/_>n||Te((m*C+x*R)/_-.5)>.3||o*d+s*h+l*p<Out)&&(e(r,i,a,o,s,l,P,N,A,w/=E,O/=E,S,g,y),y.point(P,N),e(P,N,A,w,O,S,c,u,f,d,h,p,g,y))}}return function(r){var i,a,o,s,l,c,u,f,d,h,p,g,y={point:m,lineStart:x,lineEnd:w,polygonStart:function(){r.polygonStart(),y.lineStart=O},polygonEnd:function(){r.polygonEnd(),y.lineStart=x}};function m(M,A){M=t(M,A),r.point(M[0],M[1])}function x(){f=NaN,y.point=_,r.lineStart()}function _(M,A){var T=pc([M,A]),P=t(M,A);e(f,d,u,h,p,g,f=P[0],d=P[1],u=M,h=T[0],p=T[1],g=T[2],BA,r),r.point(f,d)}function w(){y.point=m,r.lineEnd()}function O(){x(),y.point=S,y.lineEnd=E}function S(M,A){_(i=M,A),a=f,o=d,s=h,l=p,c=g,y.point=_}function E(){e(f,d,u,h,p,g,a,o,i,s,l,c,BA,r),y.lineEnd=w,w()}return y}}var kut=R0({point:function(t,n){this.stream.point(t*xn,n*xn)}});function Mut(t){return R0({point:function(n,e){var r=t(n,e);return this.stream.point(r[0],r[1])}})}function Aut(t,n,e,r,i){function a(o,s){return o*=r,s*=i,[n+t*o,e-t*s]}return a.invert=function(o,s){return[(o-n)/t*r,(e-s)/t*i]},a}function WA(t,n,e,r,i,a){if(!a)return Aut(t,n,e,r,i);var o=ue(a),s=Jt(a),l=o*t,c=s*t,u=o/t,f=s/t,d=(s*e-o*n)/t,h=(s*n+o*e)/t;function p(g,y){return g*=r,y*=i,[l*g-c*y+n,e-c*g-l*y]}return p.invert=function(g,y){return[r*(u*g-f*y+d),i*(h-f*g-u*y)]},p}function Aa(t){return e_(function(){return t})()}function e_(t){var n,e=150,r=480,i=250,a=0,o=0,s=0,l=0,c=0,u,f=0,d=1,h=1,p=null,g=CA,y=null,m,x,_,w=xf,O=.5,S,E,M,A,T;function P(D){return M(D[0]*xn,D[1]*xn)}function N(D){return D=M.invert(D[0],D[1]),D&&[D[0]*vr,D[1]*vr]}P.stream=function(D){return A&&T===D?A:A=kut(Mut(u)(g(S(w(T=D)))))},P.preclip=function(D){return arguments.length?(g=D,p=void 0,R()):g},P.postclip=function(D){return arguments.length?(w=D,y=m=x=_=null,R()):w},P.clipAngle=function(D){return arguments.length?(g=+D?lut(p=D*xn):(p=null,CA),R()):p*vr},P.clipExtent=function(D){return arguments.length?(w=D==null?(y=m=x=_=null,xf):EI(y=+D[0][0],m=+D[0][1],x=+D[1][0],_=+D[1][1]),R()):y==null?null:[[y,m],[x,_]]},P.scale=function(D){return arguments.length?(e=+D,C()):e},P.translate=function(D){return arguments.length?(r=+D[0],i=+D[1],C()):[r,i]},P.center=function(D){return arguments.length?(a=D[0]%360*xn,o=D[1]%360*xn,C()):[a*vr,o*vr]},P.rotate=function(D){return arguments.length?(s=D[0]%360*xn,l=D[1]%360*xn,c=D.length>2?D[2]%360*xn:0,C()):[s*vr,l*vr,c*vr]},P.angle=function(D){return arguments.length?(f=D%360*xn,C()):f*vr},P.reflectX=function(D){return arguments.length?(d=D?-1:1,C()):d<0},P.reflectY=function(D){return arguments.length?(h=D?-1:1,C()):h<0},P.precision=function(D){return arguments.length?(S=zA(E,O=D*D),R()):Gr(O)},P.fitExtent=function(D,F){return I0(P,D,F)},P.fitSize=function(D,F){return Q2(P,D,F)},P.fitWidth=function(D,F){return J2(P,D,F)},P.fitHeight=function(D,F){return t_(P,D,F)};function C(){var D=WA(e,0,0,d,h,f).apply(null,n(a,o)),F=WA(e,r-D[0],i-D[1],d,h,f);return u=_I(s,l,c),E=Q1(n,F),M=Q1(u,E),S=zA(E,O),R()}function R(){return A=T=null,P}return function(){return n=t.apply(this,arguments),P.invert=n.invert&&N,C()}}function n_(t){var n=0,e=pe/3,r=e_(t),i=r(n,e);return i.parallels=function(a){return arguments.length?r(n=a[0]*xn,e=a[1]*xn):[n*vr,e*vr]},i}function Tut(t){var n=ue(t);function e(r,i){return[r*n,Jt(i)/n]}return e.invert=function(r,i){return[r/n,Mi(i*n)]},e}function jI(t,n){var e=Jt(t),r=(e+Jt(n))/2;if(Te(r)<Wt)return Tut(t);var i=1+e*(2*r-e),a=Gr(i)/r;function o(s,l){var c=Gr(i-2*r*Jt(l))/r;return[c*Jt(s*=r),a-c*ue(s)]}return o.invert=function(s,l){var c=a-l,u=ro(s,Te(c))*xi(c);return c*r<0&&(u-=pe*xi(s)*xi(c)),[u/r,Mi((i-(s*s+c*c)*r*r)/(2*r))]},o}function bv(){return n_(jI).scale(155.424).center([0,33.6442])}function FI(){return bv().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function Put(t){var n=t.length;return{point:function(e,r){for(var i=-1;++i<n;)t[i].point(e,r)},sphere:function(){for(var e=-1;++e<n;)t[e].sphere()},lineStart:function(){for(var e=-1;++e<n;)t[e].lineStart()},lineEnd:function(){for(var e=-1;++e<n;)t[e].lineEnd()},polygonStart:function(){for(var e=-1;++e<n;)t[e].polygonStart()},polygonEnd:function(){for(var e=-1;++e<n;)t[e].polygonEnd()}}}function Cut(){var t,n,e=FI(),r,i=bv().rotate([154,0]).center([-2,58.5]).parallels([55,65]),a,o=bv().rotate([157,0]).center([-3,19.9]).parallels([8,18]),s,l,c={point:function(d,h){l=[d,h]}};function u(d){var h=d[0],p=d[1];return l=null,r.point(h,p),l||(a.point(h,p),l)||(s.point(h,p),l)}u.invert=function(d){var h=e.scale(),p=e.translate(),g=(d[0]-p[0])/h,y=(d[1]-p[1])/h;return(y>=.12&&y<.234&&g>=-.425&&g<-.214?i:y>=.166&&y<.234&&g>=-.214&&g<-.115?o:e).invert(d)},u.stream=function(d){return t&&n===d?t:t=Put([e.stream(n=d),i.stream(d),o.stream(d)])},u.precision=function(d){return arguments.length?(e.precision(d),i.precision(d),o.precision(d),f()):e.precision()},u.scale=function(d){return arguments.length?(e.scale(d),i.scale(d*.35),o.scale(d),u.translate(e.translate())):e.scale()},u.translate=function(d){if(!arguments.length)return e.translate();var h=e.scale(),p=+d[0],g=+d[1];return r=e.translate(d).clipExtent([[p-.455*h,g-.238*h],[p+.455*h,g+.238*h]]).stream(c),a=i.translate([p-.307*h,g+.201*h]).clipExtent([[p-.425*h+Wt,g+.12*h+Wt],[p-.214*h-Wt,g+.234*h-Wt]]).stream(c),s=o.translate([p-.205*h,g+.212*h]).clipExtent([[p-.214*h+Wt,g+.166*h+Wt],[p-.115*h-Wt,g+.234*h-Wt]]).stream(c),f()},u.fitExtent=function(d,h){return I0(u,d,h)},u.fitSize=function(d,h){return Q2(u,d,h)},u.fitWidth=function(d,h){return J2(u,d,h)},u.fitHeight=function(d,h){return t_(u,d,h)};function f(){return t=n=null,u}return u.scale(1070)}function BI(t){return function(n,e){var r=ue(n),i=ue(e),a=t(r*i);return a===1/0?[2,0]:[a*i*Jt(n),a*Jt(e)]}}function ed(t){return function(n,e){var r=Gr(n*n+e*e),i=t(r),a=Jt(i),o=ue(i);return[ro(n*a,r*o),Mi(r&&e*a/r)]}}var r_=BI(function(t){return Gr(2/(1+t))});r_.invert=ed(function(t){return 2*Mi(t/2)});function Lut(){return Aa(r_).scale(124.75).clipAngle(180-.001)}var i_=BI(function(t){return(t=xI(t))&&t/Jt(t)});i_.invert=ed(function(t){return t});function Nut(){return Aa(i_).scale(79.4188).clipAngle(180-.001)}function nd(t,n){return[t,uv(K2((Pn+n)/2))]}nd.invert=function(t,n){return[t,2*Ac(bI(n))-Pn]};function Rut(){return zI(nd).scale(961/ei)}function zI(t){var n=Aa(t),e=n.center,r=n.scale,i=n.translate,a=n.clipExtent,o=null,s,l,c;n.scale=function(f){return arguments.length?(r(f),u()):r()},n.translate=function(f){return arguments.length?(i(f),u()):i()},n.center=function(f){return arguments.length?(e(f),u()):e()},n.clipExtent=function(f){return arguments.length?(f==null?o=s=l=c=null:(o=+f[0][0],s=+f[0][1],l=+f[1][0],c=+f[1][1]),u()):o==null?null:[[o,s],[l,c]]};function u(){var f=pe*r(),d=n(tut(n.rotate()).invert([0,0]));return a(o==null?[[d[0]-f,d[1]-f],[d[0]+f,d[1]+f]]:t===nd?[[Math.max(d[0]-f,o),s],[Math.min(d[0]+f,l),c]]:[[o,Math.max(d[1]-f,s)],[l,Math.min(d[1]+f,c)]])}return u()}function Hh(t){return K2((Pn+t)/2)}function WI(t,n){var e=ue(t),r=t===n?Jt(t):uv(e/ue(n))/uv(Hh(n)/Hh(t)),i=e*gm(Hh(t),r)/r;if(!r)return nd;function a(o,s){i>0?s<-Pn+Wt&&(s=-Pn+Wt):s>Pn-Wt&&(s=Pn-Wt);var l=i/gm(Hh(s),r);return[l*Jt(r*o),i-l*ue(r*o)]}return a.invert=function(o,s){var l=i-s,c=xi(r)*Gr(o*o+l*l),u=ro(o,Te(l))*xi(l);return l*r<0&&(u-=pe*xi(o)*xi(l)),[u/r,2*Ac(gm(i/c,1/r))-Pn]},a}function Iut(){return n_(WI).scale(109.5).parallels([30,30])}function Of(t,n){return[t,n]}Of.invert=Of;function Dut(){return Aa(Of).scale(152.63)}function GI(t,n){var e=ue(t),r=t===n?Jt(t):(e-ue(n))/(n-t),i=e/r+t;if(Te(r)<Wt)return Of;function a(o,s){var l=i-s,c=r*o;return[l*Jt(c),i-l*ue(c)]}return a.invert=function(o,s){var l=i-s,c=ro(o,Te(l))*xi(l);return l*r<0&&(c-=pe*xi(o)*xi(l)),[c/r,i-xi(r)*Gr(o*o+l*l)]},a}function $ut(){return n_(GI).scale(131.154).center([0,13.9389])}var Fu=1.340264,Bu=-.081106,zu=893e-6,Wu=.003796,xv=Gr(3)/2,jut=12;function a_(t,n){var e=Mi(xv*Jt(n)),r=e*e,i=r*r*r;return[t*ue(e)/(xv*(Fu+3*Bu*r+i*(7*zu+9*Wu*r))),e*(Fu+Bu*r+i*(zu+Wu*r))]}a_.invert=function(t,n){for(var e=n,r=e*e,i=r*r*r,a=0,o,s,l;a<jut&&(s=e*(Fu+Bu*r+i*(zu+Wu*r))-n,l=Fu+3*Bu*r+i*(7*zu+9*Wu*r),e-=o=s/l,r=e*e,i=r*r*r,!(Te(o)<mI));++a);return[xv*t*(Fu+3*Bu*r+i*(7*zu+9*Wu*r))/ue(e),Mi(Jt(e)/xv)]};function Fut(){return Aa(a_).scale(177.158)}function o_(t,n){var e=ue(n),r=ue(t)*e;return[e*Jt(t)/r,Jt(n)/r]}o_.invert=ed(Ac);function But(){return Aa(o_).scale(144.049).clipAngle(60)}function zut(){var t=1,n=0,e=0,r=1,i=1,a=0,o,s,l=null,c,u,f,d=1,h=1,p=R0({point:function(w,O){var S=_([w,O]);this.stream.point(S[0],S[1])}}),g=xf,y,m;function x(){return d=t*r,h=t*i,y=m=null,_}function _(w){var O=w[0]*d,S=w[1]*h;if(a){var E=S*o-O*s;O=O*o+S*s,S=E}return[O+n,S+e]}return _.invert=function(w){var O=w[0]-n,S=w[1]-e;if(a){var E=S*o+O*s;O=O*o-S*s,S=E}return[O/d,S/h]},_.stream=function(w){return y&&m===w?y:y=p(g(m=w))},_.postclip=function(w){return arguments.length?(g=w,l=c=u=f=null,x()):g},_.clipExtent=function(w){return arguments.length?(g=w==null?(l=c=u=f=null,xf):EI(l=+w[0][0],c=+w[0][1],u=+w[1][0],f=+w[1][1]),x()):l==null?null:[[l,c],[u,f]]},_.scale=function(w){return arguments.length?(t=+w,x()):t},_.translate=function(w){return arguments.length?(n=+w[0],e=+w[1],x()):[n,e]},_.angle=function(w){return arguments.length?(a=w%360*xn,s=Jt(a),o=ue(a),x()):a*vr},_.reflectX=function(w){return arguments.length?(r=w?-1:1,x()):r<0},_.reflectY=function(w){return arguments.length?(i=w?-1:1,x()):i<0},_.fitExtent=function(w,O){return I0(_,w,O)},_.fitSize=function(w,O){return Q2(_,w,O)},_.fitWidth=function(w,O){return J2(_,w,O)},_.fitHeight=function(w,O){return t_(_,w,O)},_}function s_(t,n){var e=n*n,r=e*e;return[t*(.8707-.131979*e+r*(-.013791+r*(.003971*e-.001529*r))),n*(1.007226+e*(.015085+r*(-.044475+.028874*e-.005916*r)))]}s_.invert=function(t,n){var e=n,r=25,i;do{var a=e*e,o=a*a;e-=i=(e*(1.007226+a*(.015085+o*(-.044475+.028874*a-.005916*o)))-n)/(1.007226+a*(.015085*3+o*(-.044475*7+.028874*9*a-.005916*11*o)))}while(Te(i)>Wt&&--r>0);return[t/(.8707+(a=e*e)*(-.131979+a*(-.013791+a*a*a*(.003971-.001529*a)))),e]};function Wut(){return Aa(s_).scale(175.295)}function l_(t,n){return[ue(n)*Jt(t),Jt(n)]}l_.invert=ed(Mi);function Gut(){return Aa(l_).scale(249.5).clipAngle(90+Wt)}function c_(t,n){var e=ue(n),r=1+ue(t)*e;return[e*Jt(t)/r,Jt(n)/r]}c_.invert=ed(function(t){return 2*Ac(t)});function Yut(){return Aa(c_).scale(250).clipAngle(142)}function u_(t,n){return[uv(K2((Pn+n)/2)),-t]}u_.invert=function(t,n){return[-n,2*Ac(bI(t))-Pn]};function Hut(){var t=zI(u_),n=t.center,e=t.rotate;return t.center=function(r){return arguments.length?n([-r[1],r[0]]):(r=n(),[r[1],-r[0]])},t.rotate=function(r){return arguments.length?e([r[0],r[1],r.length>2?r[2]+90:90]):(r=e(),[r[0],r[1],r[2]-90])},e([0,0,90]).scale(159.155)}const Uut=Object.freeze(Object.defineProperty({__proto__:null,geoAlbers:FI,geoAlbersUsa:Cut,geoAzimuthalEqualArea:Lut,geoAzimuthalEqualAreaRaw:r_,geoAzimuthalEquidistant:Nut,geoAzimuthalEquidistantRaw:i_,geoConicConformal:Iut,geoConicConformalRaw:WI,geoConicEqualArea:bv,geoConicEqualAreaRaw:jI,geoConicEquidistant:$ut,geoConicEquidistantRaw:GI,geoEqualEarth:Fut,geoEqualEarthRaw:a_,geoEquirectangular:Dut,geoEquirectangularRaw:Of,geoGnomonic:But,geoGnomonicRaw:o_,geoIdentity:zut,geoMercator:Rut,geoMercatorRaw:nd,geoNaturalEarth1:Wut,geoNaturalEarth1Raw:s_,geoOrthographic:Gut,geoOrthographicRaw:l_,geoProjection:Aa,geoProjectionMutator:e_,geoStereographic:Yut,geoStereographicRaw:c_,geoTransverseMercator:Hut,geoTransverseMercatorRaw:u_},Symbol.toStringTag,{value:"Module"}));var Vut=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};function Xut(t){if(typeof t=="function")return t;const n=`geo${Uo(t)}`,e=Uut[n];if(!e)throw new Error(`Unknown coordinate: ${t}`);return e}function qut(t){return{type:"FeatureCollection",features:t.flatMap(n=>Kut(n).features)}}function Kut(t){const n={Point:"geometry",MultiPoint:"geometry",LineString:"geometry",MultiLineString:"geometry",Polygon:"geometry",MultiPolygon:"geometry",GeometryCollection:"geometry",Feature:"feature",FeatureCollection:"featureCollection"};if(!t||!t.type)return null;const e=n[t.type];if(!e)return null;if(e==="geometry")return{type:"FeatureCollection",features:[{type:"Feature",properties:{},geometry:t}]};if(e==="feature")return{type:"FeatureCollection",features:[t]};if(e==="featureCollection")return t}function Zut(t,n){var e;for(const[r,i]of Object.entries(n))(e=t[r])===null||e===void 0||e.call(t,i)}function Qut(t,n,e,r){const i=()=>{const s=n.filter(YI);return s.find(c=>c.sphere)?{type:"Sphere"}:qut(s.filter(c=>!c.sphere).flatMap(c=>c.data.value))},{outline:a=i()}=r,{size:o="fitExtent"}=r;if(o==="fitExtent")return Jut(t,a,e);if(o==="fitWidth")return tft(t,a,e)}function Jut(t,n,e){const{x:r,y:i,width:a,height:o}=e;t.fitExtent([[r,i],[a,o]],n)}function tft(t,n,e){const{width:r,height:i}=e,[[a,o],[s,l]]=$I(t.fitWidth(r,n)).bounds(n),c=Math.ceil(l-o),u=Math.min(Math.ceil(s-a),c),f=t.scale()*(u-1)/u,[d,h]=t.translate(),p=h+(i-c)/2;t.scale(f).translate([d,p]).precision(.2)}function eft(t){const{data:n}=t;if(Array.isArray(n))return Object.assign(Object.assign({},t),{data:{value:n}});const{type:e}=n;return e==="graticule10"?Object.assign(Object.assign({},t),{data:{value:[fut()]}}):e==="sphere"?Object.assign(Object.assign({},t),{sphere:!0,data:{value:[{type:"Sphere"}]}}):t}function YI(t){return t.type==="geoPath"}const HI=()=>t=>{const{children:n,coordinate:e={}}=t;if(!Array.isArray(n))return[];const{type:r="equalEarth"}=e,i=Vut(e,["type"]),a=Xut(r),o=n.map(f=>Object.assign(Object.assign({},f),{data:L0(f.data,t.data)})).map(eft);let s;function l(){return[["custom",(f,d,h,p)=>{const g=a();Qut(g,o,{x:f,y:d,width:h,height:p},i),Zut(g,i),s=$I(g);const m=new to({domain:[f,f+h]}),x=new to({domain:[d,d+p]}),_=O=>{const S=g(O);if(!S)return[null,null];const[E,M]=S;return[m.map(E),x.map(M)]},w=O=>{if(!O)return null;const[S,E]=O,M=[m.invert(S),x.invert(E)];return g.invert(M)};return{transform:O=>_(O),untransform:O=>w(O)}}]]}function c(f){const{style:d,tooltip:h={}}=f;return Object.assign(Object.assign({},f),{type:"path",tooltip:ev(h,{title:"id",items:[{channel:"color"}]}),style:Object.assign(Object.assign({},d),{d:p=>s(p)||[]})})}const u=f=>YI(f)?c(f):f;return[Object.assign(Object.assign({},t),{type:"view",scale:{x:{type:"identity"},y:{type:"identity"}},axis:!1,coordinate:{type:l},children:o.flatMap(u)})]};HI.props={};function nft(t){return id(t,n=>n.className==="component")}function rft(t){return id(t,n=>n.className==="element")}function ift(t){return id(t,n=>n.className==="label")}function er(t,n,e,r=i=>!0){return i=>{if(!r(i))return;e.emit(`plot:${t}`,i);const{target:a}=i;if(!a)return;const{className:o}=a;if(o==="plot")return;const s=rft(a),l=nft(a),c=ift(a),u=s||l||c;if(!u)return;const{className:f,markType:d}=u,h=Object.assign(Object.assign({},i),{nativeEvent:!0});f==="element"?(h.data={data:ix(u,n)},e.emit(`element:${t}`,h),e.emit(`${d}:${t}`,h)):f==="label"?(h.data={data:u.attributes.datum},e.emit(`label:${t}`,h),o.split(/\s+/).filter(Boolean).forEach(g=>{e.emit(`${g}:${t}`,h)})):(e.emit(`component:${t}`,h),o.split(/\s+/).filter(Boolean).forEach(g=>{e.emit(`${g}:${t}`,h)}))}}function UI(){return(t,n,e)=>{const{container:r,view:i}=t,a=er(Ae.CLICK,i,e,E=>E.detail===1),o=er(Ae.DBLCLICK,i,e,E=>E.detail===2),s=er(Ae.POINTER_TAP,i,e),l=er(Ae.POINTER_DOWN,i,e),c=er(Ae.POINTER_UP,i,e),u=er(Ae.POINTER_OVER,i,e),f=er(Ae.POINTER_OUT,i,e),d=er(Ae.POINTER_MOVE,i,e),h=er(Ae.POINTER_ENTER,i,e),p=er(Ae.POINTER_LEAVE,i,e),g=er(Ae.POINTER_UPOUTSIDE,i,e),y=er(Ae.DRAG_START,i,e),m=er(Ae.DRAG,i,e),x=er(Ae.DRAG_END,i,e),_=er(Ae.DRAG_ENTER,i,e),w=er(Ae.DRAG_LEAVE,i,e),O=er(Ae.DRAG_OVER,i,e),S=er(Ae.DROP,i,e);return r.addEventListener("click",a),r.addEventListener("click",o),r.addEventListener("pointertap",s),r.addEventListener("pointerdown",l),r.addEventListener("pointerup",c),r.addEventListener("pointerover",u),r.addEventListener("pointerout",f),r.addEventListener("pointermove",d),r.addEventListener("pointerenter",h),r.addEventListener("pointerleave",p),r.addEventListener("pointerupoutside",g),r.addEventListener("dragstart",y),r.addEventListener("drag",m),r.addEventListener("dragend",x),r.addEventListener("dragenter",_),r.addEventListener("dragleave",w),r.addEventListener("dragover",O),r.addEventListener("drop",S),()=>{r.removeEventListener("click",a),r.removeEventListener("click",o),r.removeEventListener("pointertap",s),r.removeEventListener("pointerdown",l),r.removeEventListener("pointerup",c),r.removeEventListener("pointerover",u),r.removeEventListener("pointerout",f),r.removeEventListener("pointermove",d),r.removeEventListener("pointerenter",h),r.removeEventListener("pointerleave",p),r.removeEventListener("pointerupoutside",g),r.removeEventListener("dragstart",y),r.removeEventListener("drag",m),r.removeEventListener("dragend",x),r.removeEventListener("dragenter",_),r.removeEventListener("dragleave",w),r.removeEventListener("dragover",O),r.removeEventListener("drop",S)}}}UI.props={reapplyWhenUpdate:!0};function aft(){return{"component.axisRadar":z4,"component.axisLinear":ts,"component.axisArc":j4,"component.legendContinuousBlock":c8,"component.legendContinuousBlockSize":u8,"component.legendContinuousSize":A_,"interaction.event":UI,"composition.mark":dI,"composition.view":fI,"shape.label.label":UN,"shape.break":nR}}var oft=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};function en(t,n){const e=Object.assign(Object.assign({},aft()),n),r=a=>{if(typeof a!="string")return a;const o=`${t}.${a}`;return e[o]||rc(`Unknown Component: ${o}`)};return[(a,o)=>{const{type:s}=a,l=oft(a,["type"]);s||rc("Plot type is required!");const c=r(s);return c==null?void 0:c(l,o)},r]}function VI(t){const{canvas:n,group:e}=t;return(n==null?void 0:n.document)||(e==null?void 0:e.ownerDocument)||rc("Cannot find library document")}var GA=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};function sft(t,n,e){const[r]=en("coordinate",e),{innerHeight:i,innerWidth:a,insetLeft:o,insetTop:s,insetRight:l,insetBottom:c}=t,{coordinates:u=[]}=n,f=dft(u),d=f[0].type==="cartesian3D",h=Object.assign(Object.assign({},t),{x:o,y:s,width:a-o-l,height:i-c-s,transformations:f.flatMap(r)});return d?new Act(h):new kct(h)}function XI(t,n){const{coordinate:e={},coordinates:r}=t,i=GA(t,["coordinate","coordinates"]);if(r)return t;const{type:a,transform:o=[]}=e,s=GA(e,["type","transform"]);if(!a)return Object.assign(Object.assign({},i),{coordinates:o});const[,l]=en("coordinate",n),{transform:c=!1}=l(a).props||{};if(c)throw new Error(`Unknown coordinate: ${a}.`);return Object.assign(Object.assign({},i),{coordinates:[Object.assign({type:a},s),...o]})}function Xi(t,n){return t.filter(e=>e.type===n)}function Ts(t){return Xi(t,"polar").length>0}function lft(t){return Xi(t,"helix").length>0}function Ul(t){return Xi(t,"transpose").length%2===1}function cft(t){return Xi(t,"parallel").length>0}function qI(t){return Xi(t,"theta").length>0}function uft(t){return Xi(t,"reflect").length>0}function Gu(t){return Xi(t,"radial").length>0}function KI(t){return Xi(t,"radar").length>0}function fft(t){return Xi(t,"reflectY").length>0}function dft(t){return t.find(n=>n.type==="cartesian"||n.type==="cartesian3D")?t:[...t,{type:"cartesian"}]}function ae(t){for(var n=t.length/6|0,e=new Array(n),r=0;r<n;)e[r]="#"+t.slice(r*6,++r*6);return e}const hft=ae("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),pft=ae("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),vft=ae("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),gft=ae("4269d0efb118ff725c6cc5b03ca951ff8ab7a463f297bbf59c6b4e9498a0"),yft=ae("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),mft=ae("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),bft=ae("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),xft=ae("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),_ft=ae("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),wft=ae("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),Oft=ae("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function D0(t,n,e){t.prototype=n.prototype=e,e.constructor=t}function f_(t,n){var e=Object.create(t.prototype);for(var r in n)e[r]=n[r];return e}function Tc(){}var Xs=.7,gc=1/Xs,Vl="\\s*([+-]?\\d+)\\s*",Sf="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",xa="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Sft=/^#([0-9a-f]{3,8})$/,Eft=new RegExp(`^rgb\\(${Vl},${Vl},${Vl}\\)$`),kft=new RegExp(`^rgb\\(${xa},${xa},${xa}\\)$`),Mft=new RegExp(`^rgba\\(${Vl},${Vl},${Vl},${Sf}\\)$`),Aft=new RegExp(`^rgba\\(${xa},${xa},${xa},${Sf}\\)$`),Tft=new RegExp(`^hsl\\(${Sf},${xa},${xa}\\)$`),Pft=new RegExp(`^hsla\\(${Sf},${xa},${xa},${Sf}\\)$`),YA={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};D0(Tc,d_,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:HA,formatHex:HA,formatHex8:Cft,formatHsl:Lft,formatRgb:UA,toString:UA});function HA(){return this.rgb().formatHex()}function Cft(){return this.rgb().formatHex8()}function Lft(){return QI(this).formatHsl()}function UA(){return this.rgb().formatRgb()}function d_(t){var n,e;return t=(t+"").trim().toLowerCase(),(n=Sft.exec(t))?(e=n[1].length,n=parseInt(n[1],16),e===6?VA(n):e===3?new br(n>>8&15|n>>4&240,n>>4&15|n&240,(n&15)<<4|n&15,1):e===8?Uh(n>>24&255,n>>16&255,n>>8&255,(n&255)/255):e===4?Uh(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|n&240,((n&15)<<4|n&15)/255):null):(n=Eft.exec(t))?new br(n[1],n[2],n[3],1):(n=kft.exec(t))?new br(n[1]*255/100,n[2]*255/100,n[3]*255/100,1):(n=Mft.exec(t))?Uh(n[1],n[2],n[3],n[4]):(n=Aft.exec(t))?Uh(n[1]*255/100,n[2]*255/100,n[3]*255/100,n[4]):(n=Tft.exec(t))?KA(n[1],n[2]/100,n[3]/100,1):(n=Pft.exec(t))?KA(n[1],n[2]/100,n[3]/100,n[4]):YA.hasOwnProperty(t)?VA(YA[t]):t==="transparent"?new br(NaN,NaN,NaN,0):null}function VA(t){return new br(t>>16&255,t>>8&255,t&255,1)}function Uh(t,n,e,r){return r<=0&&(t=n=e=NaN),new br(t,n,e,r)}function ZI(t){return t instanceof Tc||(t=d_(t)),t?(t=t.rgb(),new br(t.r,t.g,t.b,t.opacity)):new br}function Ef(t,n,e,r){return arguments.length===1?ZI(t):new br(t,n,e,r??1)}function br(t,n,e,r){this.r=+t,this.g=+n,this.b=+e,this.opacity=+r}D0(br,Ef,f_(Tc,{brighter(t){return t=t==null?gc:Math.pow(gc,t),new br(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Xs:Math.pow(Xs,t),new br(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new br(Ds(this.r),Ds(this.g),Ds(this.b),_v(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:XA,formatHex:XA,formatHex8:Nft,formatRgb:qA,toString:qA}));function XA(){return`#${Ps(this.r)}${Ps(this.g)}${Ps(this.b)}`}function Nft(){return`#${Ps(this.r)}${Ps(this.g)}${Ps(this.b)}${Ps((isNaN(this.opacity)?1:this.opacity)*255)}`}function qA(){const t=_v(this.opacity);return`${t===1?"rgb(":"rgba("}${Ds(this.r)}, ${Ds(this.g)}, ${Ds(this.b)}${t===1?")":`, ${t})`}`}function _v(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Ds(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Ps(t){return t=Ds(t),(t<16?"0":"")+t.toString(16)}function KA(t,n,e,r){return r<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new Gi(t,n,e,r)}function QI(t){if(t instanceof Gi)return new Gi(t.h,t.s,t.l,t.opacity);if(t instanceof Tc||(t=d_(t)),!t)return new Gi;if(t instanceof Gi)return t;t=t.rgb();var n=t.r/255,e=t.g/255,r=t.b/255,i=Math.min(n,e,r),a=Math.max(n,e,r),o=NaN,s=a-i,l=(a+i)/2;return s?(n===a?o=(e-r)/s+(e<r)*6:e===a?o=(r-n)/s+2:o=(n-e)/s+4,s/=l<.5?a+i:2-a-i,o*=60):s=l>0&&l<1?0:o,new Gi(o,s,l,t.opacity)}function Rft(t,n,e,r){return arguments.length===1?QI(t):new Gi(t,n,e,r??1)}function Gi(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}D0(Gi,Rft,f_(Tc,{brighter(t){return t=t==null?gc:Math.pow(gc,t),new Gi(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Xs:Math.pow(Xs,t),new Gi(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,n=isNaN(t)||isNaN(this.s)?0:this.s,e=this.l,r=e+(e<.5?e:1-e)*n,i=2*e-r;return new br(_m(t>=240?t-240:t+120,i,r),_m(t,i,r),_m(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new Gi(ZA(this.h),Vh(this.s),Vh(this.l),_v(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 t=_v(this.opacity);return`${t===1?"hsl(":"hsla("}${ZA(this.h)}, ${Vh(this.s)*100}%, ${Vh(this.l)*100}%${t===1?")":`, ${t})`}`}}));function ZA(t){return t=(t||0)%360,t<0?t+360:t}function Vh(t){return Math.max(0,Math.min(1,t||0))}function _m(t,n,e){return(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)*255}const Ift=Math.PI/180,Dft=180/Math.PI;var JI=-.14861,h_=1.78277,p_=-.29227,$0=-.90649,kf=1.97294,QA=kf*$0,JA=kf*h_,tT=h_*p_-$0*JI;function $ft(t){if(t instanceof $s)return new $s(t.h,t.s,t.l,t.opacity);t instanceof br||(t=ZI(t));var n=t.r/255,e=t.g/255,r=t.b/255,i=(tT*r+QA*n-JA*e)/(tT+QA-JA),a=r-i,o=(kf*(e-i)-p_*a)/$0,s=Math.sqrt(o*o+a*a)/(kf*i*(1-i)),l=s?Math.atan2(o,a)*Dft-120:NaN;return new $s(l<0?l+360:l,s,i,t.opacity)}function Ma(t,n,e,r){return arguments.length===1?$ft(t):new $s(t,n,e,r??1)}function $s(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}D0($s,Ma,f_(Tc,{brighter(t){return t=t==null?gc:Math.pow(gc,t),new $s(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Xs:Math.pow(Xs,t),new $s(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*Ift,n=+this.l,e=isNaN(this.s)?0:this.s*n*(1-n),r=Math.cos(t),i=Math.sin(t);return new br(255*(n+e*(JI*r+h_*i)),255*(n+e*(p_*r+$0*i)),255*(n+e*(kf*r)),this.opacity)}}));function jft(t,n,e,r,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*n+(4-6*a+3*o)*e+(1+3*t+3*a-3*o)*r+o*i)/6}function Fft(t){var n=t.length-1;return function(e){var r=e<=0?e=0:e>=1?(e=1,n-1):Math.floor(e*n),i=t[r],a=t[r+1],o=r>0?t[r-1]:2*i-a,s=r<n-1?t[r+2]:2*a-i;return jft((e-r/n)*n,o,i,a,s)}}const v_=t=>()=>t;function t6(t,n){return function(e){return t+e*n}}function Bft(t,n,e){return t=Math.pow(t,e),n=Math.pow(n,e)-t,e=1/e,function(r){return Math.pow(t+r*n,e)}}function zft(t,n){var e=n-t;return e?t6(t,e>180||e<-180?e-360*Math.round(e/360):e):v_(isNaN(t)?n:t)}function Wft(t){return(t=+t)==1?Xl:function(n,e){return e-n?Bft(n,e,t):v_(isNaN(n)?e:n)}}function Xl(t,n){var e=n-t;return e?t6(t,e):v_(isNaN(t)?n:t)}(function t(n){var e=Wft(n);function r(i,a){var o=e((i=Ef(i)).r,(a=Ef(a)).r),s=e(i.g,a.g),l=e(i.b,a.b),c=Xl(i.opacity,a.opacity);return function(u){return i.r=o(u),i.g=s(u),i.b=l(u),i.opacity=c(u),i+""}}return r.gamma=t,r})(1);function Gft(t){return function(n){var e=n.length,r=new Array(e),i=new Array(e),a=new Array(e),o,s;for(o=0;o<e;++o)s=Ef(n[o]),r[o]=s.r||0,i[o]=s.g||0,a[o]=s.b||0;return r=t(r),i=t(i),a=t(a),s.opacity=1,function(l){return s.r=r(l),s.g=i(l),s.b=a(l),s+""}}}var Yft=Gft(Fft);function e6(t){return(function n(e){e=+e;function r(i,a){var o=t((i=Ma(i)).h,(a=Ma(a)).h),s=Xl(i.s,a.s),l=Xl(i.l,a.l),c=Xl(i.opacity,a.opacity);return function(u){return i.h=o(u),i.s=s(u),i.l=l(Math.pow(u,e)),i.opacity=c(u),i+""}}return r.gamma=n,r})(1)}e6(zft);var g_=e6(Xl);const rn=t=>Yft(t[t.length-1]);var n6=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(ae);const Hft=rn(n6);var r6=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(ae);const Uft=rn(r6);var i6=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(ae);const Vft=rn(i6);var a6=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(ae);const Xft=rn(a6);var o6=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(ae);const qft=rn(o6);var s6=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(ae);const Kft=rn(s6);var l6=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(ae);const Zft=rn(l6);var c6=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(ae);const Qft=rn(c6);var u6=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(ae);const Jft=rn(u6);var f6=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(ae);const tdt=rn(f6);var d6=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(ae);const edt=rn(d6);var h6=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(ae);const ndt=rn(h6);var p6=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(ae);const rdt=rn(p6);var v6=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(ae);const idt=rn(v6);var g6=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(ae);const adt=rn(g6);var y6=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(ae);const odt=rn(y6);var m6=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(ae);const sdt=rn(m6);var b6=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(ae);const ldt=rn(b6);var x6=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(ae);const cdt=rn(x6);var _6=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(ae);const udt=rn(_6);var w6=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(ae);const fdt=rn(w6);var O6=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(ae);const ddt=rn(O6);var S6=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(ae);const hdt=rn(S6);var E6=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(ae);const pdt=rn(E6);var k6=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(ae);const vdt=rn(k6);var M6=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(ae);const gdt=rn(M6);var A6=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(ae);const ydt=rn(A6);function mdt(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-t*(35.34-t*(2381.73-t*(6402.7-t*(7024.72-t*2710.57)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-t*67.37)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-t*2475.67)))))))+")"}const bdt=g_(Ma(300,.5,0),Ma(-240,.5,1));var xdt=g_(Ma(-100,.75,.35),Ma(80,1.5,.8)),_dt=g_(Ma(260,.75,.35),Ma(80,1.5,.8)),Xh=Ma();function wdt(t){(t<0||t>1)&&(t-=Math.floor(t));var n=Math.abs(t-.5);return Xh.h=360*t-100,Xh.s=1.5-1.5*n,Xh.l=.8-.9*n,Xh+""}var qh=Ef(),Odt=Math.PI/3,Sdt=Math.PI*2/3;function Edt(t){var n;return t=(.5-t)*Math.PI,qh.r=255*(n=Math.sin(t))*n,qh.g=255*(n=Math.sin(t+Odt))*n,qh.b=255*(n=Math.sin(t+Sdt))*n,qh+""}function kdt(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-t*14825.05)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+t*707.56)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-t*6838.66)))))))+")"}function j0(t){var n=t.length;return function(e){return t[Math.max(0,Math.min(n-1,Math.floor(e*n)))]}}const Mdt=j0(ae("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var Adt=j0(ae("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),Tdt=j0(ae("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),Pdt=j0(ae("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));const cb=Object.freeze(Object.defineProperty({__proto__:null,interpolateBlues:ddt,interpolateBrBG:Hft,interpolateBuGn:tdt,interpolateBuPu:edt,interpolateCividis:mdt,interpolateCool:_dt,interpolateCubehelixDefault:bdt,interpolateGnBu:ndt,interpolateGreens:hdt,interpolateGreys:pdt,interpolateInferno:Tdt,interpolateMagma:Adt,interpolateOrRd:rdt,interpolateOranges:ydt,interpolatePRGn:Uft,interpolatePiYG:Vft,interpolatePlasma:Pdt,interpolatePuBu:adt,interpolatePuBuGn:idt,interpolatePuOr:Xft,interpolatePuRd:odt,interpolatePurples:vdt,interpolateRainbow:wdt,interpolateRdBu:qft,interpolateRdGy:Kft,interpolateRdPu:sdt,interpolateRdYlBu:Zft,interpolateRdYlGn:Qft,interpolateReds:gdt,interpolateSinebow:Edt,interpolateSpectral:Jft,interpolateTurbo:kdt,interpolateViridis:Mdt,interpolateWarm:xdt,interpolateYlGn:cdt,interpolateYlGnBu:ldt,interpolateYlOrBr:udt,interpolateYlOrRd:fdt,schemeAccent:pft,schemeBlues:O6,schemeBrBG:n6,schemeBuGn:f6,schemeBuPu:d6,schemeCategory10:hft,schemeDark2:vft,schemeGnBu:h6,schemeGreens:S6,schemeGreys:E6,schemeObservable10:gft,schemeOrRd:p6,schemeOranges:A6,schemePRGn:r6,schemePaired:yft,schemePastel1:mft,schemePastel2:bft,schemePiYG:i6,schemePuBu:g6,schemePuBuGn:v6,schemePuOr:a6,schemePuRd:y6,schemePurples:k6,schemeRdBu:o6,schemeRdGy:s6,schemeRdPu:m6,schemeRdYlBu:l6,schemeRdYlGn:c6,schemeReds:M6,schemeSet1:xft,schemeSet2:_ft,schemeSet3:wft,schemeSpectral:u6,schemeTableau10:Oft,schemeYlGn:x6,schemeYlGnBu:b6,schemeYlOrBr:_6,schemeYlOrRd:w6},Symbol.toStringTag,{value:"Module"}));function Cdt(t,n,e,r,i,a){const{guide:o={}}=e,s=zdt(t,n,e);if(typeof s!="string")return e;const l=Wdt(s,t,n,e),c=jdt(s,l,e);return Object.assign(Object.assign(Object.assign({},e),Ydt(s,t,n,e,r)),{domain:c,range:Gdt(s,t,n,e,c,i,a),expectedDomain:l,guide:o,name:t,type:s})}function Ldt(t,n){const e={};for(const r of t){const{values:i,name:a}=r,o=n[a];for(const s of i){const{name:l,value:c}=s;e[l]=c.map(u=>o.map(u))}}return e}function Ndt(t,n){const e=Array.from(t.values()).flatMap(i=>i.channels);qb(e,i=>i.map(a=>n.get(a.scale.uid)),i=>i.name).filter(([,i])=>i.some(a=>typeof a.getOptions().groupTransform=="function")&&i.every(a=>a.getTicks)).map(i=>i[1]).forEach(i=>{const a=i.map(o=>o.getOptions().groupTransform)[0];a(i)})}function Rdt(t,n){var e;const{components:r=[]}=n,i=["scale","encode","axis","legend","data","transform"],a=Array.from(new Set(t.flatMap(s=>s.channels.map(l=>l.scale)))),o=new Map(a.map(s=>[s.name,s]));for(const s of r){const l=$dt(s);for(const c of l){const u=o.get(c),f=((e=s.scale)===null||e===void 0?void 0:e[c])||{},{independent:d=!1}=f;if(u&&!d){const{guide:h}=u,p=typeof h=="boolean"?{}:h;u.guide=at({},p,s),Object.assign(u,f)}else{const h=Object.assign(Object.assign({},f),{expectedDomain:f.domain,name:c,guide:zb(s,i)});a.push(h)}}}return a}function Idt(t){if(!t||!Array.isArray(t))return[Ws,Ws];let n,e;return[a=>{var o;n=a.map.bind(a),e=(o=a.invert)===null||o===void 0?void 0:o.bind(a);const s=t.filter(([d])=>typeof d=="function"),l=t.filter(([d])=>typeof d!="function"),c=new Map(l);if(a.map=d=>{for(const[h,p]of s)if(h(d))return p;return c.has(d)?c.get(d):n(d)},!e)return a;const u=new Map(l.map(([d,h])=>[h,d])),f=new Map(s.map(([d,h])=>[h,d]));return a.invert=d=>f.has(d)?d:u.has(d)?u.get(d):e(d),a},a=>(n!==null&&(a.map=n),e!==null&&(a.invert=e),a)]}function eT(t,n){const e=Object.keys(t);for(const r of Object.values(n)){const{name:i}=r.getOptions();if(!(i in t))t[i]=r;else{const a=e.filter(l=>l.startsWith(i)).map(l=>+(l.replace(i,"")||0)),o=Re(a)+1,s=`${i}${o}`;t[s]=r,r.getOptions().key=s}}return t}function nT(t,n){const[e]=en("scale",n),{relations:r}=t,[i]=Idt(r),a=e(t);return i(a)}function Ddt(t){const n=t.flatMap(e=>Array.from(e.values())).flatMap(e=>e.channels.map(r=>r.scale));rT(n,"x"),rT(n,"y")}function $dt(t){const{channels:n=[],type:e,scale:r={}}=t,i=["shape","color","opacity","size"];return n.length!==0?n:e==="axisX"?["x"]:e==="axisY"?["y"]:e==="legends"?Object.keys(r).filter(a=>i.includes(a)):[]}function rT(t,n){const e=t.filter(({name:a,facet:o=!0})=>o&&a===n),r=e.flatMap(a=>a.domain),i=e.every(T6)?qa(r):e.every(P6)?Array.from(new Set(r)):null;if(i!==null)for(const a of e)a.domain=i}function jdt(t,n,e){const{ratio:r}=e;return r==null?n:T6({type:t})?Fdt(n,r,t):P6({type:t})?Bdt(n,r):n}function Fdt(t,n,e){const r=t.map(Number),i=new to({domain:r,range:[r[0],r[0]+(r[r.length-1]-r[0])*n]});return e==="time"?t.map(a=>new Date(i.map(a))):t.map(a=>i.map(a))}function Bdt(t,n){const e=Math.round(t.length*n);return t.slice(0,e)}function T6(t){const{type:n}=t;return typeof n!="string"?!1:["linear","log","pow","time"].includes(n)}function P6(t){const{type:n}=t;return typeof n!="string"?!1:["band","point","ordinal"].includes(n)}function zdt(t,n,e){const{type:r,domain:i,range:a,quantitative:o,ordinal:s}=e;return r!==void 0?r:nht(n)?"identity":typeof a=="string"?"linear":(i||a||[]).length>2?wm(t,s):i!==void 0?sT([i])?wm(t,s):lT(n)?"time":aT(t,a,o):sT(n)?wm(t,s):lT(n)?"time":aT(t,a,o)}function Wdt(t,n,e,r){const{domain:i}=r;if(i!==void 0)return i;switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":case"quantize":case"threshold":return oT(Zdt(e,r),r);case"band":case"ordinal":case"point":return Qdt(e);case"quantile":return Jdt(e);case"sequential":return oT(tht(e),r);default:return[]}}function Gdt(t,n,e,r,i,a,o){const{range:s}=r;if(typeof s=="string")return Hdt(s);if(s!==void 0)return s;const{rangeMin:l,rangeMax:c}=r;switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":{const u=iT(e,r,i,a,o),[f,d]=eht(n,u);return[l??f,c??d]}case"band":case"point":return[l??(n==="size"?5:0),c??(n==="size"?10:1)];case"ordinal":return iT(e,r,i,a,o);case"sequential":return;case"constant":return[e[0][0]];default:return[]}}function Ydt(t,n,e,r,i){switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":return Xdt(i,r);case"band":case"point":return qdt(t,n,i,r);case"sequential":return Vdt(r);default:return r}}function iT(t,n,e,r,i){const[a]=en("palette",i),{category10:o,category20:s}=r,l=uV(e).length<=o.length?o:s,{palette:c=l,offset:u}=n;if(Array.isArray(c))return c;try{return a({type:c})}catch{const d=Udt(c,e,u);if(d)return d;throw new Error(`Unknown Component: ${c} `)}}function Hdt(t){return t.split("-")}function Udt(t,n,e=r=>r){if(!t)return null;const r=Uo(t),i=cb[`scheme${r}`],a=cb[`interpolate${r}`];if(!i&&!a)return null;if(i){if(!i.some(Array.isArray))return i;const o=i[n.length];if(o)return o}return n.map((o,s)=>a(e(s/n.length)))}function Vdt(t){const{palette:n="ylGnBu",offset:e}=t,r=Uo(n),i=cb[`interpolate${r}`];if(!i)throw new Error(`Unknown palette: ${r}`);return{interpolator:e?a=>i(e(a)):i}}function Xdt(t,n){const{interpolate:e=zf,nice:r=!1,tickCount:i=5}=n;return Object.assign(Object.assign({},n),{interpolate:e,nice:r,tickCount:i})}function qdt(t,n,e,r){if(r.padding!==void 0||r.paddingInner!==void 0||r.paddingOuter!==void 0)return Object.assign(Object.assign({},r),{unknown:NaN});const i=Kdt(t,n,e),{paddingInner:a=i,paddingOuter:o=i}=r;return Object.assign(Object.assign({},r),{paddingInner:a,paddingOuter:o,padding:i,unknown:NaN})}function Kdt(t,n,e){return n==="enterDelay"||n==="enterDuration"||n==="size"?0:t==="band"?qI(e)?0:.1:t==="point"?.5:0}function wm(t,n){return n||(rht(t)?"point":"ordinal")}function aT(t,n,e){return e||(t!=="color"||n?"linear":"sequential")}function oT(t,n){if(t.length===0)return t;const{domainMin:e,domainMax:r}=n,[i,a]=t;return[e??i,r??a]}function Zdt(t,n){const{zero:e=!1}=n;let r=1/0,i=-1/0;for(const a of t)for(const o of a)Xe(o)&&(r=Math.min(r,+o),i=Math.max(i,+o));return r===1/0?[]:e?[Math.min(0,r),i]:[r,i]}function Qdt(t){return Array.from(new Set(t.flat()))}function Jdt(t){return t.flat().sort()}function tht(t){let n=1/0,e=-1/0;for(const r of t)for(const i of r)Xe(i)&&(n=Math.min(n,+i),e=Math.max(e,+i));return n===1/0?[]:[n<0?-e:n,e]}function eht(t,n){return t==="enterDelay"?[0,1e3]:t=="enterDuration"?[300,1e3]:t.startsWith("y")||t.startsWith("position")?[1,0]:t==="color"?[cV(n),t3(n)]:t==="opacity"?[0,1]:t==="size"?[1,10]:[0,1]}function sT(t){return y_(t,n=>{const e=typeof n;return e==="string"||e==="boolean"})}function lT(t){return y_(t,n=>n instanceof Date)}function nht(t){return y_(t,ic)}function y_(t,n){for(const e of t)if(e.some(n))return!0;return!1}function rht(t){return t.startsWith("x")||t.startsWith("y")||t.startsWith("position")||t.startsWith("size")}function iht(t){return t.startsWith("x")||t.startsWith("y")||t.startsWith("position")||t==="enterDelay"||t==="enterDuration"||t==="updateDelay"||t==="updateDuration"||t==="exitDelay"||t==="exitDuration"}function aht(t){if(!t||!t.type)return!1;if(typeof t.type=="function")return!0;const{type:n,domain:e,range:r,interpolator:i}=t,a=e&&e.length>0,o=r&&r.length>0;return!!(["linear","sqrt","log","time","pow","threshold","quantize","quantile","ordinal","band","point"].includes(n)&&a&&o||["sequential"].includes(n)&&a&&(o||i)||["constant","identity"].includes(n)&&o)}const oht={linear:"linear",identity:"identity",log:"log",pow:"pow",sqrt:"sqrt",sequential:"sequential"},sht={threshold:"threshold",quantize:"quantize",quantile:"quantile"},lht={ordinal:"ordinal",band:"band",point:"point"},cht={constant:"constant"};var es=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};function uht(t,n,e){const{coordinates:r=[],title:i}=n,[,a]=en("component",e),o=t.filter(({guide:u})=>u!==null),s=[],l=xht(n,t,e);if(s.push(...l),i){const{props:u}=a("title"),{defaultPosition:f,defaultOrientation:d,defaultOrder:h,defaultSize:p,defaultCrossPadding:g}=u,y=typeof i=="string"?{title:i}:i;s.push(Object.assign({type:"title",position:f,orientation:d,order:h,crossPadding:g[0],defaultSize:p},y))}return vht(o,r).forEach(([u,f])=>{const{props:d}=a(u),{defaultPosition:h,defaultPlane:p="xy",defaultOrientation:g,defaultSize:y,defaultOrder:m,defaultLength:x,defaultPadding:_=[0,0],defaultCrossPadding:w=[0,0]}=d,O=at({},...f),{guide:S,field:E}=O,M=Array.isArray(S)?S:[S];for(const A of M){const[T,P]=mht(u,h,g,A,f,o,r);if(!T&&!P)continue;const N=T==="left"||T==="right",C=N?_[1]:_[0],R=N?w[1]:w[0],{size:D,order:F=m,length:j=x,padding:I=C,crossPadding:$=R}=A;s.push(Object.assign(Object.assign({title:E},A),{defaultSize:y,length:j,position:T,plane:p,orientation:P,padding:I,order:F,crossPadding:$,size:D,type:u,scales:f}))}}),s}function cT(t,n,e,r,i){const[a]=en("component",r),{scaleInstances:o,scale:s,bbox:l}=t,c=es(t,["scaleInstances","scale","bbox"]),u={bbox:l,library:r};return a(c)({coordinate:n,library:r,markState:i,scales:o,theme:e,value:u,scale:s})}function fht(t){return t.map(n=>{const e=at(n,n.style);return delete e.style,e})}function C6(t,n){const e=["left","right","bottom","top"];return Vb(t,({type:a,position:o,group:s})=>e.includes(o)?s===void 0?a.startsWith("legend")?`legend-${o}`:Symbol("independent"):s==="independent"?Symbol("independent"):s:Symbol("independent")).flatMap(([,a])=>{if(a.length===1)return a[0];if(n!==void 0){const u=a.filter(g=>g.length!==void 0).map(g=>g.length),f=Oi(u);if(f>n)return a.forEach(g=>g.group=Symbol("independent")),a;const d=n-f,h=a.length-u.length,p=d/h;a.forEach(g=>{g.length===void 0&&(g.length=p)})}const o=Re(a,u=>u.size),s=Re(a,u=>u.order),l=Re(a,u=>u.crossPadding),c=a[0].position;return{type:"group",size:o,order:s,position:c,children:a,crossPadding:l}})}function dht(t,n){const e=["shape","size","color","opacity"],r=(d,h)=>d==="constant"&&h==="size",i=t.filter(({type:d,name:h})=>typeof d=="string"&&e.includes(h)&&!r(d,h)),a=i.filter(({type:d})=>d==="constant"),o=i.filter(({type:d})=>d!=="constant"),l=Vb(o,d=>d.field?d.field:Symbol("independent")).map(([d,h])=>[d,[...h,...a]]).filter(([,d])=>d.some(h=>h.type!=="constant")),c=new Map(l);if(c.size===0)return[];const u=d=>d.sort(([h],[p])=>h.localeCompare(p));return Array.from(c).map(([,d])=>{const p=fV(d).sort((g,y)=>y.length-g.length).map(g=>({combination:g,option:g.map(y=>[y.name,hht(y)])}));for(const{option:g,combination:y}of p)if(!g.every(m=>m[1]==="constant")&&g.every(m=>m[1]==="discrete"||m[1]==="constant"))return["legendCategory",y];for(const[g,y]of est)for(const{option:m,combination:x}of p)if(y.some(_=>Zu(u(_),u(m))))return[g,x];return null}).filter(Xe)}function hht(t){const{type:n}=t;return typeof n!="string"?null:n in oht?"continuous":n in lht?"discrete":n in sht?"distribution":n in cht?"constant":null}function pht(t,n){return t.map(e=>{const{name:r}=e;if(lft(n)||qI(n)||Ul(n)&&(Ts(n)||Gu(n)))return null;if(r.startsWith("x"))return Ts(n)?["axisArc",[e]]:Gu(n)?["axisLinear",[e]]:[Ul(n)?"axisY":"axisX",[e]];if(r.startsWith("y"))return Ts(n)?["axisLinear",[e]]:Gu(n)?["axisArc",[e]]:[Ul(n)?"axisX":"axisY",[e]];if(r.startsWith("z"))return["axisZ",[e]];if(r.startsWith("position")){if(KI(n))return["axisRadar",[e]];if(!Ts(n))return["axisY",[e]]}return null}).filter(Xe)}function vht(t,n){const e=t.filter(r=>aht(r));return[...dht(e),...pht(e,n)]}function ub(t){const n=Xi(t,"polar");if(n.length){const r=n[n.length-1],{startAngle:i,endAngle:a}=SP(r);return[i,a]}const e=Xi(t,"radial");if(e.length){const r=e[e.length-1],{startAngle:i,endAngle:a}=MP(r);return[i,a]}return[-Math.PI/2,Math.PI/2*3]}function ght(t){const n=/position(\d*)/g.exec(t);return n?+n[1]:null}function yht(t,n,e,r,i){const{name:a}=e[0];if(t==="axisRadar"){const o=r.filter(d=>d.name.startsWith("position")),s=ght(a);if(s===null)return[null,null];const[l,c]=ub(i),u=KI(i)?o.length:o.length-1;return["center",(c-l)/u*s+l]}if(t==="axisY"&&cft(i))return Ul(i)?["center","horizontal"]:["center","vertical"];if(t==="axisLinear"){const[o]=ub(i);return["center",o]}return t==="axisArc"?n[0]==="inner"?["inner",null]:["outer",null]:Ts(i)?["center",null]:Gu(i)?["center",null]:t==="axisX"&&uft(i)||t==="axisX"&&fft(i)?["top",null]:n}function mht(t,n,e,r,i,a,o){const[s]=ub(o),l=[r.position||n,s??e];return typeof t=="string"&&t.startsWith("axis")?yht(t,l,i,a,o):typeof t=="string"&&t.startsWith("legend")&&Ts(o)&&r.position==="center"?["center","vertical"]:l}function bht(t,n,e=[]){return t==="x"?Ul(e)?`${n}Y`:`${n}X`:t==="y"?Ul(e)?`${n}X`:`${n}Y`:null}function xht(t,n,e){const[,r]=en("component",e),{coordinates:i}=t;function a(o,s,l,c){const u=bht(s,o,i);if(!c||!u)return;const{props:f}=r(u),{defaultPosition:d,defaultSize:h,defaultOrder:p,defaultCrossPadding:[g]}=f;return Object.assign(Object.assign({position:d,defaultSize:h,order:p,type:u,crossPadding:g},c),{scales:[l]})}return n.filter(o=>o.slider||o.scrollbar).flatMap(o=>{const{slider:s,scrollbar:l,name:c}=o;return[a("slider",c,o,s),a("scrollbar",c,o,l)]}).filter(o=>!!o)}function L6(t,n,e,r,i,a){const{type:o}=t;if(!["left","right","bottom","top"].includes(r)||typeof o!="string")return;const l=o;return(l.startsWith("axis")?Eht:l.startsWith("group")?_ht:l.startsWith("legendContinuous")?kht:l==="legendCategory"?Mht:l.startsWith("slider")?Sht:l==="title"?Oht:l.startsWith("scrollbar")?wht:()=>{})(t,n,e,r,i,a)}function _ht(t,n,e,r,i,a){const{children:o}=t,s=Re(o,c=>c.crossPadding);o.forEach(c=>c.crossPadding=s),o.forEach(c=>L6(c,n,e,r,i,a));const l=Re(o,c=>c.size);t.size=l,o.forEach(c=>c.size=l)}function wht(t,n,e,r,i,a){const{trackSize:o=6}=at({},i.scrollbar,t);t.size=o}function Oht(t,n,e,r,i,a){const o=at({},i.title,t),{title:s,subtitle:l,spacing:c=0}=o,u=es(o,["title","subtitle","spacing"]);if(s){const f=bt(u,"title"),d=wv(s,f);t.size=d.height}if(l){const f=bt(u,"subtitle"),d=wv(l,f);t.size+=c+d.height}}function Sht(t,n,e,r,i,a){const o=()=>{const{slider:u}=i;return at({},u,t)},{trackSize:s,handleIconSize:l}=o(),c=Math.max(s,l*2.4);t.size=c}function Eht(t,n,e,r,i,a){var o,s;t.transform=t.transform||[{type:"hide"}];const l=r==="left"||r==="right",c=N6(t,r,i),{tickLength:u=0,labelSpacing:f=0,titleSpacing:d=0,labelAutoRotate:h}=c,p=es(c,["tickLength","labelSpacing","titleSpacing","labelAutoRotate"]),g=F0(t,a),y=Mf(p,g);let m=u;if(typeof t.tickLength=="function"){const O=(((o=g.getTicks)===null||o===void 0?void 0:o.call(g))||g.getOptions().domain).map((S,E,M)=>t.tickLength(S,E,M));m=Math.max(...O,0)}const x=m+f;if(y&&y.length){const w=Re(y,S=>S.width),O=Re(y,S=>S.height);if(l)t.size=w+x;else{const{tickFilter:S,labelTransform:E}=t;Pht(g,y,n,e,S)&&!E&&h!==!1&&h!==null?(t.labelTransform="rotate(90)",t.size=w+x):(t.labelTransform=(s=t.labelTransform)!==null&&s!==void 0?s:"rotate(0)",t.size=O+x)}}else t.size=m;const _=B0(p);_&&(l?t.size+=d+_.width:t.size+=d+_.height)}function kht(t,n,e,r,i,a){const s=(()=>{const{legendContinuous:w}=i;return at({},w,t)})(),{labelSpacing:l=0,titleSpacing:c=0}=s,u=es(s,["labelSpacing","titleSpacing"]),f=r==="left"||r==="right",d=bt(u,"ribbon"),{size:h}=d,p=bt(u,"handleIcon"),{size:g}=p,y=Math.max(h,g*2.4);t.size=y;const m=F0(t,a),x=Mf(u,m);if(x){const w=f?"width":"height",O=Re(x,S=>S[w]);t.size+=O+l}const _=B0(u);_&&(f?t.size=Math.max(t.size,_.width):t.size+=c+_.height)}function Mht(t,n,e,r,i,a){const s=(()=>{const{legendCategory:I}=i,{title:$}=t,[z,Y]=Array.isArray($)?[$,void 0]:[void 0,$];return at({title:z},I,Object.assign(Object.assign({},t),{title:Y}))})(),{focus:l,itemSpacing:c,focusMarkerSize:u,itemMarkerSize:f,titleSpacing:d,rowPadding:h,colPadding:p,maxCols:g=1/0,maxRows:y=1/0}=s,m=es(s,["focus","itemSpacing","focusMarkerSize","itemMarkerSize","titleSpacing","rowPadding","colPadding","maxCols","maxRows"]),{cols:x,length:_}=t,w=I=>Math.min(I,y),O=I=>Math.min(I,g),S=r==="left"||r==="right",E=_===void 0?n+(S?0:e[0]+e[1]):_,M=F0(t,a),{render:A}=t;if(A&&typeof document<"u"){const I=M.getOptions().domain,{labelFormatter:$}=m,z=K=>$?typeof $=="string"?lo($)(K):$(K):`${K}`,Y=I.map((K,ot)=>({id:K,index:ot,label:z(K),value:K,color:M.map(K)})),H=A(Y,m),V=document.createElement("div"),{width:Z,height:q}=t,J={position:"absolute",visibility:"hidden",top:"-9999px"};Z?J.width=`${Z}px`:S||(J.width=`${E}px`),q?J.height=`${q}px`:S&&(J.height=`${E}px`),Object.assign(V.style,J),typeof H=="string"?V.innerHTML=H:H instanceof HTMLElement&&V.appendChild(H),document.body.appendChild(V);const rt=V.getBoundingClientRect();document.body.removeChild(V),t.size=S?rt.width:rt.height;return}const T=B0(m),P=Mf(m,M,"itemLabel"),N=m.itemValueText!==void 0?Mf(m,M,"itemValue"):null,C=Math.max(P[0].height,f,...N!=null&&N[0]?[N[0].height]:[])+h,R=(I,$=0)=>{let z=f+I+c[0]+$;return N!=null&&N[0]&&(z+=N[0].width+c[1]),l&&(z+=u+c[2]),z};S?(()=>{let I=-1/0,$=0,z=1,Y=0,H=-1/0,V=-1/0;const Z=T?T.height:0,q=E-Z;for(const{width:J}of P){const rt=R(J,p);I=Math.max(I,rt),$+C>q?(z++,H=Math.max(H,Y),V=Math.max(V,$),Y=1,$=C):($+=C,Y++)}z<=1&&(H=Y,V=$),t.size=I*O(z),t.length=V+Z,at(t,{cols:O(z),gridRow:H})})():typeof x=="number"?(()=>{const I=Math.ceil(P.length/x),$=Re(P,z=>R(z.width))*x;t.size=C*w(I)-h,t.length=Math.min($,E)})():(()=>{let I=1,$=0,z=-1/0;for(const{width:Y}of P){const H=R(Y,p);$+H>E?(z=Math.max(z,$),$=H,I++):$+=H}I===1&&(z=$),t.size=C*w(I)-h,t.length=z})(),T&&(S?t.size=Math.max(t.size,T.width):t.size+=d+T.height)}function F0(t,n){const[e]=en("scale",n),{scales:r,tickCount:i,tickMethod:a}=t,o=r.find(s=>s.type!=="constant"&&s.type!=="identity");return i!==void 0&&(o.tickCount=i),a!==void 0&&(o.tickMethod=a),e(o)}function Mf(t,n,e="label"){const{labelFormatter:r,tickFilter:i,label:a=!0}=t,o=es(t,["labelFormatter","tickFilter","label"]);if(!a)return null;const s=Aht(n,r,i),l=bt(o,e),c=s.map((d,h)=>Object.fromEntries(Object.entries(l).map(([p,g])=>[p,typeof g=="function"?g(d,h):g]))),u=s.map((d,h)=>{const p=c[h];return wv(d,p)});if(!c.some(d=>d.transform)){const d=s.map((h,p)=>p);t.indexBBox=new Map(d.map(h=>[h,[s[h],u[h]]]))}return u}function B0(t){const n=c=>c===!1||c===null,{title:e}=t,r=es(t,["title"]);if(n(e)||e===void 0)return null;const i=bt(r,"title"),{direction:a,transform:o}=i,s=Array.isArray(e)?e.join(","):e;return typeof s!="string"?null:wv(s,Object.assign(Object.assign({},i),{transform:o||(a==="vertical"?"rotate(-90)":"")}))}function N6(t,n,e){const{title:r}=t,[i,a]=Array.isArray(r)?[r,void 0]:[void 0,r],{axis:o,[`axis${ox(n)}`]:s}=e;return at({title:i},o,s,Object.assign(Object.assign({},t),{title:a}))}function R6(t,n){const e=t.getTicks?t.getTicks():t.getOptions().domain;return n?e.filter(n):e}function Aht(t,n,e){const i=R6(t,e).map(o=>typeof o=="number"?Up(o):o),a=n?typeof n=="string"?lo(n):n:t.getFormatter?t.getFormatter():o=>`${o}`;return i.map(a)}function Tht(t,n){return t.getBandWidth?t.getBandWidth(n)/2:0}function Pht(t,n,e,r,i){if(Oi(n,h=>h.width)>e)return!0;const o=t.clone();o.update({range:[0,e]});const s=R6(t,i),l=s.map(h=>o.map(h)+Tht(o,h)),c=s.map((h,p)=>p),u=-r[0],f=e+r[1],d=(h,p)=>{const{width:g}=p;return[h-g/2,h+g/2]};for(let h=0;h<c.length;h++){const p=l[h],[g,y]=d(p,n[h]);if(g<u||y>f)return!0;const m=l[h+1];if(m){const[x]=d(m,n[h+1]);if(y>x)return!0}}return!1}function wv(t,n){const e=Cht(t),{filter:r}=n,i=es(n,["filter"]);return e.attr(Object.assign(Object.assign({},i),{visibility:"none"})),e.getBBox()}function Cht(t){return t instanceof nn?t:new ki({style:{text:`${t}`}})}const uT=16;function Lht(t){const n=t.find(({type:i})=>i==="axisX"),e=t.find(({type:i})=>i==="axisY"),r=t.find(({type:i})=>i==="axisZ");n&&e&&r&&(n.plane="xy",e.plane="xy",r.plane="yz",r.origin=[n.bbox.x,n.bbox.y,0],r.eulerAngles=[0,-90,0],r.bbox.x=n.bbox.x,r.bbox.y=n.bbox.y,t.push(Object.assign(Object.assign({},n),{plane:"xz",showLabel:!1,showTitle:!1,origin:[n.bbox.x,n.bbox.y,0],eulerAngles:[-90,0,0]})),t.push(Object.assign(Object.assign({},e),{plane:"yz",showLabel:!1,showTitle:!1,origin:[e.bbox.x+e.bbox.width,e.bbox.y,0],eulerAngles:[0,-90,0]})),t.push(Object.assign(Object.assign({},r),{plane:"xz",actualPosition:"left",showLabel:!1,showTitle:!1,eulerAngles:[90,-90,0]})))}function Nht(t,n,e,r){var i,a,o,s;const{width:l,height:c,depth:u,x:f=0,y:d=0,z:h=0,inset:p=(i=e.inset)!==null&&i!==void 0?i:0,insetLeft:g=p,insetTop:y=p,insetBottom:m=p,insetRight:x=p,margin:_=(a=e.margin)!==null&&a!==void 0?a:0,marginLeft:w=_,marginBottom:O=_,marginTop:S=_,marginRight:E=_,padding:M=e.padding,paddingBottom:A=M,paddingLeft:T=M,paddingRight:P=M,paddingTop:N=M}=Iht(t,n,e,r),C=w===uT&&T==="auto",R=E===uT&&P==="auto",D=zt(n,"coordinates",[]).some(Mt=>Mt.type==="transpose"),F=t.find(({type:Mt})=>Mt==="axisX"),{size:j,labelTransform:I}=F||{},$=1/4,z=(Mt,Ct,ve,ne,Zt)=>{const{marks:Pe}=n;if(Pe.length===0)return[ne,Zt];if(Mt-ne-Zt-Mt*$>0)return[ne,Zt];const ge=Mt*(1-$);return[Ct==="auto"?ge*ne/(ne+Zt):ne,ve==="auto"?ge*Zt/(ne+Zt):Zt]},Y=Mt=>Mt==="auto"?20:Mt??20,H=Y(N),V=Y(A),Z=fT(t,c-H-V,[H+S,V+O],["left","right"],n,e,r),{paddingLeft:q,paddingRight:J}=Z,rt=l-w-E;let[K,ot]=z(rt,T,P,q,J),vt=rt-K-ot;const yt=fT(t,vt,[K+w,ot+E],["bottom","top"],n,e,r),{paddingTop:mt,paddingBottom:wt}=yt,Ot=c-O-S,[At,$t]=z(Ot,A,N,wt,mt),kt=Ot-At-$t;if(j&&!D&&!I){const{fontSize:Mt=12,fontFamily:Ct="sans-serif",scales:ve=[]}=F,ne=(s=(o=ve==null?void 0:ve[0])===null||o===void 0?void 0:o.domain)!==null&&s!==void 0?s:[];if(!ne.length)return;const Zt=(Pe,qe,Se,ge)=>{const Ee=DL(qe,{fontSize:Mt,fontFamily:Ct}),Ke=Ee/2-Se-ge;Ke>0&&(vt-=Ke,Pe==="left"?K+=Ee/2-Se:ot+=Ee/2-Se)};C&&Zt("left",AG(ne),w,K),R&&Zt("right",Qr(ne),E,ot)}return{width:l,height:c,depth:u,insetLeft:g,insetTop:y,insetBottom:m,insetRight:x,innerWidth:vt,innerHeight:kt,paddingLeft:K,paddingRight:ot,paddingTop:$t,paddingBottom:At,marginLeft:w,marginBottom:O,marginTop:S,marginRight:E,x:f,y:d,z:h}}function Rht(t){const{height:n,width:e,padding:r=0,paddingLeft:i=r,paddingRight:a=r,paddingTop:o=r,paddingBottom:s=r,margin:l=16,marginLeft:c=l,marginRight:u=l,marginTop:f=l,marginBottom:d=l,inset:h=0,insetLeft:p=h,insetRight:g=h,insetTop:y=h,insetBottom:m=h}=t,x=O=>O==="auto"?20:O,_=e-x(i)-x(a)-c-u-p-g,w=n-x(o)-x(s)-f-d-y-m;return{width:_,height:w}}function Iht(t,n,e,r){const{coordinates:i}=n;if(!Ts(i)&&!Gu(i))return n;const a=t.filter(m=>typeof m.type=="string"&&m.type.startsWith("axis"));if(a.length===0)return n;const o=a.map(m=>{const x=m.type==="axisArc"?"arc":"linear";return N6(m,x,e)}),s=Re(o,m=>{var x;return(x=m.labelSpacing)!==null&&x!==void 0?x:0}),l=a.flatMap((m,x)=>{const _=o[x],w=F0(m,r);return Mf(_,w)}).filter(Xe),c=Re(l,m=>m.height)+s,u=a.flatMap((m,x)=>{const _=o[x];return B0(_)}).filter(m=>m!==null),f=u.length===0?0:Re(u,m=>m.height),{inset:d=c,insetLeft:h=d,insetBottom:p=d,insetTop:g=d+f,insetRight:y=d}=n;return Object.assign(Object.assign({},n),{insetLeft:h,insetBottom:p,insetTop:g,insetRight:y})}function fT(t,n,e,r,i,a,o){const s=Ue(t,p=>p.position),{padding:l=a.padding,paddingLeft:c=l,paddingRight:u=l,paddingBottom:f=l,paddingTop:d=l}=i,h={paddingBottom:f,paddingLeft:c,paddingTop:d,paddingRight:u};for(const p of r){const g=`padding${ox(Wx(p))}`,y=s.get(p)||[],m=h[g],x=A=>{A.size===void 0&&(A.size=A.defaultSize)},_=A=>{A.type==="group"?(A.children.forEach(x),A.size=Re(A.children,T=>T.size)):A.size=A.defaultSize},w=A=>{A.size||(m!=="auto"?_(A):(L6(A,n,e,p,a,o),x(A)))},O=A=>{A.type.startsWith("axis")&&A.labelAutoHide===void 0&&(A.labelAutoHide=!0)},S=p==="bottom"||p==="top",E=ti(y,A=>A.order),M=y.filter(A=>A.type.startsWith("axis")&&A.order==E);if(M.length&&(M[0].crossPadding=0),typeof m=="number")y.forEach(x),y.forEach(O);else if(y.length===0)h[g]=0;else{const A=S?n+e[0]+e[1]:n,T=C6(y,A);T.forEach(w);const P=T.reduce((N,{size:C,crossPadding:R=12})=>N+C+R,0);h[g]=P}}return h}function Dht(t,n,e){const r=Ue(t,S=>`${S.plane||"xy"}-${S.position}`),{paddingLeft:i,paddingRight:a,paddingTop:o,paddingBottom:s,marginLeft:l,marginTop:c,marginBottom:u,marginRight:f,innerHeight:d,innerWidth:h,insetBottom:p,insetLeft:g,insetRight:y,insetTop:m,height:x,width:_,depth:w}=e,O={xy:Om({width:_,height:x,paddingLeft:i,paddingRight:a,paddingTop:o,paddingBottom:s,marginLeft:l,marginTop:c,marginBottom:u,marginRight:f,innerHeight:d,innerWidth:h,insetBottom:p,insetLeft:g,insetRight:y,insetTop:m}),yz:Om({width:w,height:x,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,marginLeft:0,marginTop:0,marginBottom:0,marginRight:0,innerWidth:w,innerHeight:x,insetBottom:0,insetLeft:0,insetRight:0,insetTop:0}),xz:Om({width:_,height:w,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,marginLeft:0,marginTop:0,marginBottom:0,marginRight:0,innerWidth:_,innerHeight:w,insetBottom:0,insetLeft:0,insetRight:0,insetTop:0})};for(const[S,E]of r.entries()){const[M,A]=S.split("-"),T=O[M][A],[P,N]=e3(E,C=>typeof C.type!="string"?!1:!!(A==="center"||C.type.startsWith("axis")&&["inner","outer"].includes(A)));P.length&&$ht(P,n,T,A),N.length&&Uht(E,n,T)}}function Om({width:t,height:n,paddingLeft:e,paddingRight:r,paddingTop:i,paddingBottom:a,marginLeft:o,marginTop:s,marginBottom:l,marginRight:c,innerHeight:u,innerWidth:f,insetBottom:d,insetLeft:h,insetRight:p,insetTop:g}){const y=e+o,m=i+s,x=r+c,_=a+l,w=t-o-c,O=[y+h,m+g,f-h-p,u-g-d,"center",null,null];return{top:[y,0,f,m,"vertical",!0,_n,o,w],right:[t-x,m,x,u,"horizontal",!1,_n],bottom:[y,n-_,f,_,"vertical",!1,_n,o,w],left:[0,m,y,u,"horizontal",!0,_n],"top-left":[y,0,f,m,"vertical",!0,_n],"top-right":[y,0,f,m,"vertical",!0,_n],"bottom-left":[y,n-_,f,_,"vertical",!1,_n],"bottom-right":[y,n-_,f,_,"vertical",!1,_n],center:O,inner:O,outer:O}}function $ht(t,n,e,r){const[i,a]=e3(t,o=>!!(typeof o.type=="string"&&o.type.startsWith("axis")));jht(i,n,e,r),Vht(a,n,e)}function jht(t,n,e,r){r==="center"?hX(n)?Hht(t,n,e):Ie(n)?zht(t,n,e):s0(n)&&Wht(t,n,e,t[0].orientation):r==="inner"?Fht(t,n,e):r==="outer"&&Bht(t,n,e)}function Fht(t,n,e){const[r,i,,a]=e,[o,s]=n.getCenter(),[l]=l0(n),c=a/2,u=l*c,f=o-u,d=s-u;for(let h=0;h<t.length;h++){const p=t[h];p.bbox={x:r+f,y:i+d,width:u*2,height:u*2}}}function Bht(t,n,e){const[r,i,a,o]=e;for(const s of t)s.bbox={x:r,y:i,width:a,height:o}}function zht(t,n,e){const[r,i,a,o]=e;for(const s of t)s.bbox={x:r,y:i,width:a,height:o}}function Wht(t,n,e,r){r==="horizontal"?Yht(t,n,e):r==="vertical"&&Ght(t,n,e)}function Ght(t,n,e){const[r,i,,a]=e,o=new Array(t.length).fill(0),l=n.map(o).filter((c,u)=>u%2===0).map(c=>c+r);for(let c=0;c<t.length;c++){const u=t[c],f=l[c],d=l[c+1]-f;u.bbox={x:f,y:i,width:d,height:a}}}function Yht(t,n,e){const[r,i,a]=e,o=new Array(t.length).fill(0),l=n.map(o).filter((c,u)=>u%2===1).map(c=>c+i);for(let c=0;c<t.length;c++){const u=t[c],f=l[c],d=l[c+1]-f;u.bbox={x:r,y:f,width:a,height:d}}}function Hht(t,n,e,r){const[i,a,o,s]=e;for(const l of t)l.bbox={x:i,y:a,width:o,height:s},l.radar={index:t.indexOf(l),count:t.length}}function Uht(t,n,e){const[r,i,a,o,s,l,c,u,f]=e,[d,h,p,g,y,m,x,_]=s==="vertical"?["y",i,"x",r,"height",o,"width",a]:["x",r,"y",i,"width",a,"height",o];t.sort((A,T)=>c==null?void 0:c(A.order,T.order));const w=A=>A==="title"||A==="group"||A.startsWith("legend"),O=(A,T,P)=>P===void 0?T:w(A)?P:T,S=(A,T,P)=>P===void 0?T:w(A)?P:T,E=l?h+m:h;for(let A=0,T=E;A<t.length;A++){const P=t[A],{crossPadding:N=0,type:C}=P,{size:R}=P;P.bbox={[d]:l?T-R-N:T+N,[p]:S(C,g,u),[y]:R,[x]:O(C,_,f)},T+=(R+N)*(l?-1:1)}const M=t.filter(A=>A.type==="group");for(const A of M){const{bbox:T,children:P}=A,N=T[x],C=N/P.length,R=P.reduce(($,z)=>{var Y;const H=(Y=z.layout)===null||Y===void 0?void 0:Y.justifyContent;return H||$},"flex-start"),D=P.map(($,z)=>{const{length:Y=C,padding:H=0}=$;return Y+(z===P.length-1?0:H)}),F=Oi(D),j=N-F,I=R==="flex-start"?0:R==="center"?j/2:j;for(let $=0,z=T[p]+I;$<P.length;$++){const Y=P[$],{padding:H=0}=Y,V=$===P.length-1?0:H;Y.bbox={[y]:T[y],[d]:T[d],[p]:z,[x]:D[$]-V},at(Y,{layout:{justifyContent:R}}),z+=D[$]}}}function Vht(t,n,e){if(t.length===0)return;const[r,i,a,o]=e,[s]=l0(n),l=o/2*s/Math.sqrt(2),c=r+a/2,u=i+o/2;for(let f=0;f<t.length;f++){const d=t[f];d.bbox={x:c-l,y:u-l,width:l*2,height:l*2}}}var Xht=function(t,n,e,r){function i(a){return a instanceof e?a:new e(function(o){o(a)})}return new(e||(e=Promise))(function(a,o){function s(u){try{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?a(u.value):i(u.value).then(s,l)}c((r=r.apply(t,n||[])).next())})},yc=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};const m_=Symbol("CALLBACK_ITEM");function qht(t,n,e){const{encode:r={},scale:i={},transform:a=[]}=n,o=yc(n,["encode","scale","transform"]);return[t,Object.assign(Object.assign({},o),{encode:r,scale:i,transform:a})]}function I6(t,n,e){return Xht(this,void 0,void 0,function*(){const{library:r}=e,{data:i}=n,[a]=en("data",r),o=cpt(i),{transform:s=[]}=o,u=[yc(o,["transform"]),...s].map(h=>a(h,e)),f=yield aV(u)(i),d=i&&!Array.isArray(i)&&!Array.isArray(f)?{value:f}:f;return[Array.isArray(f)?Qs(f):[],Object.assign(Object.assign({},n),{data:d})]})}function Kht(t,n,e){const{encode:r}=n;if(!r)return[t,n];const i={};for(const[a,o]of Object.entries(r))if(Array.isArray(o))for(let s=0;s<o.length;s++){const l=`${a}${s===0?"":s}`;i[l]=o[s]}else i[a]=o;return[t,Object.assign(Object.assign({},n),{encode:i})]}function Zht(t,n,e){const{encode:r,data:i}=n;if(!r)return[t,n];const a=wa(r,o=>opt(o)?o:{type:spt(i,o),value:o});return[t,Object.assign(Object.assign({},n),{encode:a})]}function Qht(t,n,e){const{encode:r}=n;if(!r)return[t,n];const i=wa(r,(a,o)=>{const{type:s}=a;return s!=="constant"||iht(o)?a:Object.assign(Object.assign({},a),{constant:!0})});return[t,Object.assign(Object.assign({},n),{encode:i})]}function Jht(t,n,e){const{encode:r,data:i}=n;if(!r)return[t,n];const{library:a}=e,o=dpt(a),s=wa(r,l=>o(i,l));return[t,Object.assign(Object.assign({},n),{encode:s})]}function tpt(t,n,e){const{tooltip:r={}}=n;return eo(r)?[t,n]:Array.isArray(r)?[t,Object.assign(Object.assign({},n),{tooltip:{items:r}})]:ic(r)&&_R(r)?[t,Object.assign(Object.assign({},n),{tooltip:r})]:[t,Object.assign(Object.assign({},n),{tooltip:{items:[r]}})]}function ept(t,n,e){const{data:r,encode:i,tooltip:a={}}=n;if(eo(a))return[t,n];const o=f=>{if(!f)return f;if(typeof f=="string")return t.map(d=>({name:f,value:r[d][f]}));if(ic(f)){const{field:d,channel:h,color:p,name:g=d,valueFormatter:y=S=>S}=f,m=typeof y=="string"?lo(y):y,x=h&&i[h],_=x&&i[h].field,w=g||_||h,O=[];for(const S of t){const E=d?r[S][d]:x?i[h].value[S]:null;O[S]={name:w,color:p,value:m(E)}}return O}if(typeof f=="function"){const d=[];for(const h of t){const p=f(r[h],h,r,i);ic(p)?d[h]=Object.assign(Object.assign({},p),{[m_]:!0}):d[h]={value:p}}return d}return f},{title:s,items:l=[]}=a,c=yc(a,["title","items"]),u=Object.assign({title:o(s),items:Array.isArray(l)?l.map(o):[]},c);return[t,Object.assign(Object.assign({},n),{tooltip:u})]}function npt(t,n,e){const{encode:r}=n,i=yc(n,["encode"]);if(!r)return[t,n];const a=Object.entries(r),o=a.filter(([,l])=>{const{value:c}=l;return Array.isArray(c[0])}).flatMap(([l,c])=>{const u=[[l,new Array(t.length).fill(void 0)]],{value:f}=c,d=yc(c,["value"]);for(let h=0;h<f.length;h++){const p=f[h];if(Array.isArray(p))for(let g=0;g<p.length;g++){const y=u[g]||[`${l}${g}`,new Array(t).fill(void 0)];y[1][h]=p[g],u[g]=y}}return u.map(([h,p])=>[h,Object.assign({type:"column",value:p},d)])}),s=Object.fromEntries([...a,...o]);return[t,Object.assign(Object.assign({},i),{encode:s})]}function rpt(t,n,e){const{axis:r={},legend:i={},slider:a={},scrollbar:o={}}=n,s=(c,u)=>{if(typeof c=="boolean")return c?{}:null;const f=c[u];return f===void 0||f?f:null},l=typeof r=="object"?Array.from(new Set(["x","y","z",...Object.keys(r)])):["x","y","z"];return at(n,{scale:Object.assign(Object.assign({},Object.fromEntries(l.map(c=>{const u=s(o,c);return[c,Object.assign({guide:s(r,c),slider:s(a,c),scrollbar:u},u&&{ratio:u.ratio===void 0?.5:u.ratio})]}))),{color:{guide:s(i,"color")},size:{guide:s(i,"size")},shape:{guide:s(i,"shape")},opacity:{guide:s(i,"opacity")}})}),[t,n]}function ipt(t,n,e){const{animate:r}=n;return r||r===void 0?[t,n]:(at(n,{animate:{enter:{type:null},exit:{type:null},update:{type:null}}}),[t,n])}function apt(t,n,e){var r,i;return at(n,{scale:{series:Object.assign({key:`DEFAULT_${n.type}_SERIES_KEY`},(i=(r=n==null?void 0:n.scale)===null||r===void 0?void 0:r.series)!==null&&i!==void 0?i:{})}}),[t,n]}function opt(t){if(typeof t!="object"||t instanceof Date||t===null)return!1;const{type:n}=t;return Xe(n)}function spt(t,n){return typeof n=="function"?"transform":typeof n=="string"&&lpt(t,n)?"field":"constant"}function lpt(t,n){return Array.isArray(t)?t.some(e=>e[n]!==void 0):!1}function cpt(t){if(Qe(t))return{type:"inline",value:t};if(!t)return{type:"inline",value:null};if(Array.isArray(t))return{type:"inline",value:t};const{type:n="inline"}=t,e=yc(t,["type"]);return Object.assign(Object.assign({},e),{type:n})}var D6=function(t,n,e,r){function i(a){return a instanceof e?a:new e(function(o){o(a)})}return new(e||(e=Promise))(function(a,o){function s(u){try{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?a(u.value):i(u.value).then(s,l)}c((r=r.apply(t,n||[])).next())})},upt=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};function fpt(t,n,e){return D6(this,void 0,void 0,function*(){const[r,i]=yield hpt(t,n,e),{encode:a,scale:o,data:s,tooltip:l,key:c}=i;if(Array.isArray(s)===!1)return null;const{channels:u}=n,f=qb(Object.entries(a).filter(([,h])=>Xe(h)),h=>h.map(([p,g])=>Object.assign({name:p},g)),([h])=>{var p;const g=(p=/([^\d]+)\d*$/.exec(h))===null||p===void 0?void 0:p[1],y=u.find(m=>m.name===g);return y!=null&&y.independent?h:g}),d=u.filter(h=>{const{name:p,required:g}=h;if(f.find(([y])=>y===p))return!0;if(g)throw new Error(`Missing encoding for channel: ${p}.`);return!1}).flatMap(h=>{const{name:p,scale:g,scaleKey:y,range:m,quantitative:x,ordinal:_}=h;return f.filter(([O])=>O.startsWith(p)).map(([O,S],E)=>{const M=S.some(j=>j.visual),A=S.some(j=>j.constant),T=o[O]||{},{independent:P=!1,key:N=y||O,type:C=A?"constant":M?"identity":g}=T,R=upt(T,["independent","key","type"]),D=C==="constant",F=D?void 0:m;return{name:O,values:S,scaleKey:P||D?Symbol("independent"):N,scale:Object.assign(Object.assign({type:C,markKey:c,range:F},R),{quantitative:x,ordinal:_})}})});return[i,Object.assign(Object.assign({},n),{index:r,channels:d,tooltip:l})]})}function dpt(t){const[n]=en("encode",t);return(e,r)=>r===void 0||e===void 0?null:Object.assign(Object.assign({},r),{type:"column",value:n(r)(e),field:ppt(r)})}function hpt(t,n,e){return D6(this,void 0,void 0,function*(){const{library:r}=e,[i]=en("transform",r),{preInference:a=[],postInference:o=[]}=n,{transform:s=[]}=t,l=[qht,I6,Kht,Zht,Qht,Jht,npt,ipt,rpt,tpt,apt,...a.map(i),...s.map(i),...o.map(i),ept];let c=[],u=t;for(const f of l)[c,u]=yield f(c,u,e);return[c,u]})}function ppt(t){const{type:n,value:e}=t;return n==="field"&&typeof e=="string"?e:null}var Za=function(t,n,e,r){function i(a){return a instanceof e?a:new e(function(o){o(a)})}return new(e||(e=Promise))(function(a,o){function s(u){try{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?a(u.value):i(u.value).then(s,l)}c((r=r.apply(t,n||[])).next())})},Go=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};function b_(t,n,e){return Za(this,void 0,void 0,function*(){var r;const{library:i}=e,[a]=en("composition",i),[o]=en("interaction",i),s=new Set(Object.keys(i).map(C=>{var R;return(R=/mark\.(.*)/.exec(C))===null||R===void 0?void 0:R[1]}).filter(Xe)),l=new Set(Object.keys(i).map(C=>{var R;return(R=/component\.(.*)/.exec(C))===null||R===void 0?void 0:R[1]}).filter(Xe)),c=C=>{const{type:R}=C;if(typeof R=="function"){const{props:D={}}=R,{composite:F=!0}=D;if(F)return"mark"}return typeof R!="string"?R:s.has(R)||l.has(R)?"mark":R},u=C=>c(C)==="mark",f=C=>c(C)==="standardView",d=C=>{const{type:R}=C;return typeof R!="string"?!1:!!l.has(R)},h=C=>{if(f(C))return[C];const R=c(C);return a({type:R,static:d(C)})(C)},p=[],g=new Map,y=new Map,m=[t],x=[];for(;m.length;){const C=m.shift();if(f(C)){const R=y.get(C),[D,F]=R?F6(R,C,i):yield $6(C,e);g.set(D,C),p.push(D);const j=F.flatMap(h).map(I=>XI(I,i));if(m.push(...j),j.every(f)){const I=yield Promise.all(j.map($=>j6($,e)));Ddt(I);for(let $=0;$<j.length;$++){const z=j[$],Y=I[$];y.set(z,Y)}}}else{const R=u(C)?C:yield G6(C,e),D=h(R);Array.isArray(D)?m.push(...D):typeof D=="function"&&x.push(D())}}e.emitter.emit(Ae.BEFORE_PAINT);const _=new Map,w=new Map,O=[];n.selectAll(wi(Qp)).data(p,C=>C.key).join(C=>C.append("g").attr("className",Qp).attr("id",R=>R.key).call(dT).each(function(R,D,F){db(R,Rt(F),O,e),_.set(R,F)}),C=>C.call(dT).each(function(R,D,F){db(R,Rt(F),O,e),w.set(R,F)}),C=>C.each(function(R,D,F){const j=F.nameInteraction.values();for(const I of j)I.destroy()}).remove());const S=(C,R,D)=>Array.from(C.entries()).map(([F,j])=>{const I=D||new Map,$=(V,Z=q=>q)=>I.set(V,Z),z=g.get(F),Y=gpt(Rt(j),z,e),H={view:F,container:j,options:z,setState:$,update:(V,Z)=>Za(this,void 0,void 0,function*(){const J=ax(Array.from(I.values()))(z);return yield Y(J,V,()=>{Cn(Z)&&R(C,Z,I)})})};return e.externals.update=H.update,e.externals.setState=$,H}),E=(C=w,R,D)=>{var F;const j=S(C,E,D);for(const I of j){const{options:$,container:z}=I,Y=z.nameInteraction;let H=Ov($);R&&(H=H.filter(V=>R.includes(V[0])));for(const V of H){const[Z,q]=V,J=Y.get(Z);if(J&&((F=J.destroy)===null||F===void 0||F.call(J)),q){const K=fb(I.view,Z,q,o)(I,j,e.emitter);Y.set(Z,{destroy:K})}}}},M=S(_,E);for(const C of M){const{options:R}=C,D=new Map;C.container.nameInteraction=D;for(const F of Ov(R)){const[j,I]=F;if(I){const z=fb(C.view,j,I,o)(C,M,e.emitter);D.set(j,{destroy:z})}}}E();const{width:A,height:T}=t,P=[];for(const C of x){const R=new Promise(D=>Za(this,void 0,void 0,function*(){for(const F of C){const j=Object.assign({width:A,height:T},F);yield b_(j,n,e)}D()}));P.push(R)}e.views=p,(r=e.animations)===null||r===void 0||r.forEach(C=>C==null?void 0:C.cancel()),e.animations=O,e.emitter.emit(Ae.AFTER_PAINT);const N=O.filter(Xe).map(Lpt).map(C=>C.finished);return Promise.all([...N,...P])})}function dT(t){t.style("transform",n=>`translate(${n.layout.x}, ${n.layout.y})`)}function vpt(t){const[,n]=en("interaction",t);return e=>{const[r,i]=e;try{return[r,n(r)]}catch{return[r,i.type]}}}function gpt(t,n,e){const{library:r}=e,i=vpt(r),a=l=>l[1]&&l[1].props&&l[1].props.reapplyWhenUpdate,s=Ov(n).map(i).filter(a).map(l=>l[0]);return(l,c,u)=>Za(this,void 0,void 0,function*(){const f=[],[d,h]=yield $6(l,e);db(d,t,f,e);for(const p of s.filter(g=>g!==c))ypt(p,t,l,d,e);for(const p of h)b_(p,t,e);return u(),{options:l,view:d}})}function ypt(t,n,e,r,i){var a;const{library:o}=i,[s]=en("interaction",o),c=n.node().nameInteraction,u=Ov(e).find(([g])=>g===t),f=c.get(t);if(!f||((a=f.destroy)===null||a===void 0||a.call(f),!u[1]))return;const d=fb(r,t,u[1],s),h={options:e,view:r,container:n.node(),update:g=>Promise.resolve(g)},p=d(h,[],i.emitter);c.set(t,{destroy:p})}function $6(t,n){return Za(this,void 0,void 0,function*(){const{library:e}=n,r=yield bpt(t,n),i=mpt(r);t.interaction=i.interaction,t.coordinate=i.coordinate,t.marks=[...i.marks,...i.components];const a=XI(i,e),o=yield j6(a,n);return F6(o,a,e)})}function mpt(t){const{coordinate:n={},interaction:e={},style:r={},marks:i}=t,a=Go(t,["coordinate","interaction","style","marks"]),o=i.map(d=>d.coordinate||{}),s=i.map(d=>d.interaction||{}),l=i.map(d=>d.viewStyle||{}),c=[...o,n].reduceRight((d,h)=>at(d,h),{}),u=[e,...s].reduce((d,h)=>at(d,h),{}),f=[...l,r].reduce((d,h)=>at(d,h),{});return Object.assign(Object.assign({},a),{marks:i,coordinate:c,interaction:u,style:f})}function bpt(t,n){return Za(this,void 0,void 0,function*(){const{library:e}=n,[r,i]=en("mark",e),a=new Set(Object.keys(e).map(h=>{var p;return(p=/component\.(.*)/.exec(h))===null||p===void 0?void 0:p[1]}).filter(Xe)),{marks:o}=t,s=[],l=[],c=[...o],{width:u,height:f}=Rht(t),d={options:t,width:u,height:f};for(;c.length;){const[h]=c.splice(0,1),p=yield G6(h,n),{type:g=rc("G2Mark type is required."),key:y}=p;if(a.has(g))l.push(p);else{const{props:m={}}=i(g),{composite:x=!0}=m;if(!x)s.push(p);else{const{data:_}=p,w=Object.assign(Object.assign({},p),{data:_&&(Array.isArray(_)?_:_.value)}),O=yield r(w,d),S=Array.isArray(O)?O:[O];c.unshift(...S.map((E,M)=>Object.assign(Object.assign({},E),{key:`${y}-${M}`})))}}}return Object.assign(Object.assign({},t),{marks:s,components:l})})}function j6(t,n){return Za(this,void 0,void 0,function*(){const{library:e}=n,[r]=en("theme",e),[,i]=en("mark",e),{theme:a,marks:o,coordinates:s=[]}=t,l=r(W6(a)),c=new Map;for(const f of o){const{type:d}=f,{props:h={}}=i(d),p=yield fpt(f,h,n);if(p){const[g,y]=p;c.set(g,y)}}const u=Ue(Array.from(c.values()).flatMap(f=>f.channels),({scaleKey:f})=>f);for(const f of u.values()){const d=f.reduce((w,{scale:O})=>at(w,O),{}),{scaleKey:h}=f[0],{values:p}=f[0],g=Array.from(new Set(p.map(w=>w.field).filter(Xe))),y=at({guide:{title:g.length===0?void 0:g},field:g[0]},d),{name:m}=f[0],x=f.flatMap(({values:w})=>w.map(O=>O.value)),_=Object.assign(Object.assign({},Cdt(m,x,y,s,l,e)),{uid:Symbol("scale"),key:h});f.forEach(w=>w.scale=_)}return c})}function fb(t,n,e,r){const i=t.theme,a=typeof n=="string"?i[n]||{}:{};return r(at(a,Object.assign({type:n},e)))}function F6(t,n,e){var r;const[i]=en("mark",e),[a]=en("theme",e),[o]=en("labelTransform",e),{key:s,frame:l=!1,theme:c,clip:u,style:f={},labelTransform:d=[]}=n,h=a(W6(c)),p=Array.from(t.values()),g=Rdt(p,n),y=fht(uht(Ipt(Array.from(g),p,t),n,e)),m=Nht(y,n,h,e),x=sft(m,n,e),_=l?at({mainLineWidth:1,mainStroke:"#000"},f):f;Dht(C6(y),x,m),Lht(y);const w=new Map(Array.from(t.values()).flatMap(A=>{const{channels:T}=A;return T.map(({scale:P})=>[P.uid,nT(P,e)])}));Ndt(t,w);const O={};for(const A of y){const{scales:T=[]}=A,P=[];for(const N of T){const{name:C,uid:R}=N,D=(r=w.get(R))!==null&&r!==void 0?r:nT(N,e);P.push(D),C==="y"&&D.update(Object.assign(Object.assign({},D.getOptions()),{xScale:O.x})),eT(O,{[C]:D})}A.scaleInstances=P}const S=[],E=new Map;for(const[A,T]of t.entries()){const{children:P,dataDomain:N,modifier:C,key:R,data:D}=A;E.set(R,D);const{index:F,channels:j,tooltip:I}=T,$=Object.fromEntries(j.map(({name:mt,scale:wt})=>[mt,wt])),z=wa($,({uid:mt})=>w.get(mt));eT(O,z);const Y=Ldt(j,z),H=i(A),[V,Z,q]=Opt(H(F,z,Y,x)),J=N||V.length,rt=C?C(Z,J,m):[],K=mt=>{var wt,Ot;return(Ot=(wt=I.title)===null||wt===void 0?void 0:wt[mt])===null||Ot===void 0?void 0:Ot.value},ot=mt=>I.items.map(wt=>wt[mt]),vt=V.map((mt,wt)=>{const Ot=Object.assign({points:Z[wt],transform:rt[wt],index:mt,markKey:R,viewKey:s,data:D[mt]},I&&{title:K(mt),items:ot(mt)});for(const[At,$t]of Object.entries(Y))Ot[At]=$t[mt],q&&(Ot[`series${Uo(At)}`]=q[wt].map(kt=>$t[kt]));return q&&(Ot.seriesIndex=q[wt]),q&&I&&(Ot.seriesItems=q[wt].map(At=>ot(At)),Ot.seriesTitle=q[wt].map(At=>K(At))),Ot});T.data=vt,T.index=V;const yt=P==null?void 0:P(vt,z,m);S.push(...yt||[])}return[{layout:m,theme:h,coordinate:x,markState:t,key:s,clip:u,scale:O,style:_,components:y,data:E,options:n,labelTransform:ax(d.map(o))},S]}function db(t,n,e,r){return Za(this,void 0,void 0,function*(){const{library:i}=r,{components:a,theme:o,layout:s,markState:l,coordinate:c,key:u,style:f,clip:d,scale:h}=t,{x:p,y:g,width:y,height:m}=s,x=Go(s,["x","y","width","height"]),_=["view","plot","main","content"],w=_.map((I,$)=>$),O=["a","margin","padding","inset"],S=_.map(I=>QC(Object.assign({},o.view,f),I)),E=O.map(I=>bt(x,I)),M=I=>I.style("x",$=>C[$].x).style("y",$=>C[$].y).style("width",$=>C[$].width).style("height",$=>C[$].height).each(function($,z,Y){Dpt(Rt(Y),S[$])});let A=0,T=0,P=y,N=m;const C=w.map(I=>{const $=E[I],{left:z=0,top:Y=0,bottom:H=0,right:V=0}=$;return A+=z,T+=Y,P-=z+V,N-=Y+H,{x:A,y:T,width:P,height:N}});n.selectAll(wi(fM)).data(w.filter(I=>Xe(S[I])),I=>_[I]).join(I=>I.append("rect").attr("className",fM).style("zIndex",-2).call(M),I=>I.call(M),I=>I.remove());const R=Mpt(l),D=R?{duration:R[1]}:!1;for(const[,I]of Vb(a,$=>`${$.type}-${$.position}`))I.forEach(($,z)=>$.index=z);const F=n.selectAll(wi(uM)).data(a,I=>`${I.type}-${I.position}-${I.index}`).join(I=>I.append("g").style("zIndex",({zIndex:$})=>$||-1).attr("className",uM).append($=>cT(at({animate:D,scale:h},$),c,o,i,l)),I=>I.transition(function($,z,Y){const{preserve:H=!1}=$;if(H)return;const V=cT(at({animate:D,scale:h},$),c,o,i,l),{attributes:Z}=V,[q]=Y.childNodes;return q.update(Z,!1)})).transitions();e.push(...F.flat().filter(Xe));const j=n.selectAll(wi(Wo)).data([s],()=>u).join(I=>I.append("rect").style("zIndex",0).style("fill","transparent").attr("className",Wo).call(hT).call(pT,Array.from(l.keys())).call(vT,d),I=>I.call(pT,Array.from(l.keys())).call(hT).call(vT,d)).transitions();e.push(...j.flat());for(const[I,$]of l.entries()){const{data:z}=$,{key:Y,class:H,type:V}=I,Z=n.select(`#${Y}`),q=Ppt(I,$,t,r),J=Cpt(I,$,t,i),rt=Npt(I,$,t,i),K=Rpt(I,$,t,i),ot=Apt(n,Z,H,"element"),vt=Z.selectAll(wi(oa)).selectFacetAll(ot).data(z,yt=>yt.key,yt=>yt.groupKey).join(yt=>yt.append(q).attr("className",oa).attr("markType",V).transition(function(mt,wt,Ot){return J(mt,[Ot])}),yt=>yt.call(mt=>{const wt=mt.parent(),Ot=oV(At=>{const[$t,kt]=At.getBounds().min;return[$t,kt]});mt.transition(function(At,$t,kt){Tpt(kt,wt,Ot);const Mt=q(At,$t),Ct=rt(At,[kt],[Mt]);return Ct!=null&&Ct.length||(kt.nodeName===Mt.nodeName&&Mt.nodeName!=="g"?Qv(kt,Mt):(kt.parentNode.replaceChild(Mt,kt),Mt.className=oa,Mt.markType=V,Mt.__data__=kt.__data__)),Ct}).each(function(At,$t,kt){kt.__removed__&&(kt.__removed__=!1)}).attr("markType",V).attr("className",oa)}),yt=>yt.each(function(mt,wt,Ot){Ot.__removed__=!0}).transition(function(mt,wt,Ot){return K(mt,[Ot])}).remove(),yt=>yt.append(q).attr("className",oa).attr("markType",V).transition(function(mt,wt,Ot){const{__fromElements__:At}=Ot,$t=rt(mt,At,[Ot]);return new Hp(At,null,Ot.parentNode).transition($t).remove(),$t}),yt=>yt.transition(function(mt,wt,Ot){const $t=new Hp([],Ot.__toData__,Ot.parentNode).append(q).attr("className",oa).attr("markType",V).nodes();return rt(mt,[Ot],$t)}).remove()).transitions();e.push(...vt.flat())}xpt(t,n,e,i,r),wpt(t,n,i,r)})}function xpt(t,n,e,r,i){const[a]=en("labelTransform",r),{markState:o,labelTransform:s}=t,l=n.select(wi(j1)).node(),c=new Map,u=new Map,f=Array.from(o.entries()).flatMap(([m,x])=>{const{labels:_=[],key:w}=m,O=kpt(m,x,t,r,i),S=n.select(`#${w}`).selectAll(wi(oa)).nodes().filter(E=>{var M;return E.__removed__?!1:!(((M=E.style)===null||M===void 0?void 0:M.visibility)==="hidden"||E.children&&E.children.some(T=>{var P;return((P=T.style)===null||P===void 0?void 0:P.visibility)==="hidden"}))});return _.flatMap((E,M)=>{const{transform:A=[]}=E,T=Go(E,["transform"]);return S.flatMap(P=>{const N=_pt(T,M,P);return N.forEach(C=>{c.set(C,R=>O(Object.assign(Object.assign({},R),{element:P}))),u.set(C,E)}),N})})}),d=Rt(l).selectAll(wi(F1)).data(f,m=>m.key).join(m=>m.append(x=>c.get(x)(x)).attr("className",F1),m=>m.each(function(x,_,w){const S=c.get(x)(x);Qv(w,S)}),m=>m.remove()).nodes(),h=Ue(d,m=>u.get(m.__data__)),{coordinate:p,layout:g}=t,y={canvas:i.canvas,coordinate:p,layout:g};for(const[m,x]of h){const{transform:_=[]}=m;ax(_.map(a))(x,y)}s&&s(d,y)}function _pt(t,n,e){const{seriesIndex:r,seriesKey:i,points:a,key:o,index:s}=e.__data__,l=Ept(e);if(!r)return[Object.assign(Object.assign({},t),{key:`${o}-${n}`,bounds:l,index:s,points:a,dependentElement:e})];const c=Spt(t),u=r.map((f,d)=>Object.assign(Object.assign({},t),{key:`${i[d]}-${n}`,bounds:[a[d]],index:f,points:a,dependentElement:e}));return c?c(u):u}function wpt(t,n,e,r){const i=t.scale,a=zt(i,"y.options.breaks",[]),{document:o}=r.canvas;if([em,eR].forEach(u=>{o.getElementsByClassName(u).forEach(f=>{f.remove()})}),!a.length)return;const s=n.select(wi(Wo)).node(),[l]=en("shape",e),c=new Map;a.forEach((u,f)=>{c.set(u,l({type:"break"},{view:t,selection:n,context:r}))}),Rt(s).selectAll(wi(em)).data(a,u=>u.key).join(u=>u.append((f,d)=>c.get(f)(f,d)).attr("className",em),u=>u.each(function(f,d,h){const g=c.get(f)(f,d);Qv(h,g)}),u=>u.remove()).nodes()}function Opt([t,n,e]){if(e)return[t,n,e];const r=[],i=[];for(let a=0;a<t.length;a++){const o=t[a],s=n[a];s.every(([l,c])=>Xe(l)&&Xe(c))&&(r.push(o),i.push(s))}return[r,i]}function Spt(t){const{selector:n}=t;if(!n)return null;if(typeof n=="function")return n;if(n==="first")return e=>[e[0]];if(n==="last")return e=>[e[e.length-1]];throw new Error(`Unknown selector: ${n}`)}function Ept(t){const n=t.cloneNode(!0),e=t.getAnimations();n.style.visibility="hidden",e.forEach(o=>{const s=o.effect.getKeyframes();n.attr(s[s.length-1])}),t.parentNode.appendChild(n);const r=n.getLocalBounds();n.destroy();const{min:i,max:a}=r;return[i,a]}function kpt(t,n,e,r,i){const[a]=en("shape",r),{data:o,encode:s}=t,{data:l,defaultLabelShape:c}=n,u=l.map(g=>g.points),f=wa(s,g=>g.value),{theme:d,coordinate:h}=e,p=Object.assign(Object.assign({},i),{document:VI(i),theme:d,coordinate:h});return g=>{const{index:y,points:m}=g,x=o[y],{formatter:_=$=>`${$}`,transform:w,style:O,render:S,selector:E,element:M}=g,A=Go(g,["formatter","transform","style","render","selector","element"]),T=wa(Object.assign(Object.assign({},A),O),$=>B6($,x,y,o,{channel:f,element:M})),{shape:P=c,text:N}=T,C=Go(T,["shape","text"]),R=typeof _=="string"?lo(_):_,D=Object.assign(Object.assign({},C),{text:R(N,x,y,o),datum:x}),F=Object.assign({type:`label.${P}`,render:S},C),j=a(F,p),I=z6(d,"label",P,"label");return j(m,D,I,u)}}function B6(t,n,e,r,i){return typeof t=="function"?t(n,e,r,i):typeof t!="string"?t:ic(n)&&n[t]!==void 0?n[t]:t}function Mpt(t){let n=-1/0,e=1/0;for(const[r,i]of t){const{animate:a={}}=r,{data:o}=i,{enter:s={},update:l={},exit:c={}}=a,{type:u,duration:f=300,delay:d=0}=l,{type:h,duration:p=300,delay:g=0}=s,{type:y,duration:m=300,delay:x=0}=c;for(const _ of o){const{updateType:w=u,updateDuration:O=f,updateDelay:S=d,enterType:E=h,enterDuration:M=p,enterDelay:A=g,exitDuration:T=m,exitDelay:P=x,exitType:N=y}=_;(w===void 0||w)&&(n=Math.max(n,O+S),e=Math.min(e,S)),(N===void 0||N)&&(n=Math.max(n,T+P),e=Math.min(e,P)),(E===void 0||E)&&(n=Math.max(n,M+A),e=Math.min(e,A))}}return n===-1/0?null:[e,n-e]}function Apt(t,n,e,r){const i=t.node().parentElement;return!i||typeof i.findAll!="function"?[]:i.findAll(a=>a.style.facet!==void 0&&a.style.facet===e&&a!==n.node()).flatMap(a=>a.getElementsByClassName(r))}function Tpt(t,n,e){if(!t.__facet__)return;const r=t.parentNode.parentNode,i=n.parentNode,[a,o]=e(r),[s,l]=e(i),c=`translate(${a-s}, ${o-l})`;sV(t,c),n.append(t)}function Ppt(t,n,e,r){const{library:i}=r,[a]=en("shape",i),{data:o,encode:s}=t,{defaultShape:l,data:c,shape:u}=n,f=wa(s,x=>x.value),d=c.map(x=>x.points),{theme:h,coordinate:p}=e,{type:g,style:y={}}=t,m=Object.assign(Object.assign({},r),{document:VI(r),coordinate:p,theme:h});return x=>{const{shape:_=l}=y,{shape:w=_,points:O,seriesIndex:S,index:E}=x,M=Go(x,["shape","points","seriesIndex","index"]),A=Object.assign(Object.assign({},M),{index:E}),T=S?S.map(D=>o[D]):o[E],P=S||E,N=wa(y,D=>B6(D,T,P,o,{channel:f})),C=u[w]?u[w](N,m):a(Object.assign(Object.assign({},N),{type:Y6(t,w)}),m),R=z6(h,g,w,l);return C(O,A,R,d)}}function z6(t,n,e,r){if(typeof n!="string")return;const{color:i}=t,a=t[n]||{},o=a[e]||a[r];return Object.assign({color:i},o)}function x_(t,n,e,r,i){var a,o;const[,s]=en("shape",i),[l]=en("animation",i),{defaultShape:c,shape:u}=e,{theme:f,coordinate:d}=r,p=`default${Uo(t)}Animation`,{[p]:g}=((a=u[c])===null||a===void 0?void 0:a.props)||s(Y6(n,c)).props,{[t]:y={}}=f,m=((o=n.animate)===null||o===void 0?void 0:o[t])||{},x={coordinate:d};return(_,w,O)=>{const{[`${t}Type`]:S,[`${t}Delay`]:E,[`${t}Duration`]:M,[`${t}Easing`]:A}=_,T=Object.assign({type:S||g},m);if(!T.type)return null;const C=l(T,x)(w,O,at(y,{delay:E,duration:M,easing:A}));let R=[];return Array.isArray(C)?R=C:R=[C],R.filter(Boolean)}}function Cpt(t,n,e,r){return x_("enter",t,n,e,r)}function Lpt(t){return t.finished.then(()=>{t.cancel()}),t}function Npt(t,n,e,r){return x_("update",t,n,e,r)}function Rpt(t,n,e,r){return x_("exit",t,n,e,r)}function W6(t={}){if(typeof t=="string")return{type:t};const{type:n="light"}=t,e=Go(t,["type"]);return Object.assign(Object.assign({},e),{type:n})}function Ov(t){const n={event:!0,tooltip:!0,sliderFilter:!0,legendFilter:!0,scrollbarFilter:!0},{interaction:e={}}=t;return Object.entries(at(n,e)).reverse()}function G6(t,n){return Za(this,void 0,void 0,function*(){const{data:e}=t,r=Go(t,["data"]);if(e==null)return t;const[,{data:i}]=yield I6([],{data:e},n);return Object.assign({data:i},r)})}function hT(t){t.style("transform",n=>`translate(${n.paddingLeft+n.marginLeft}, ${n.paddingTop+n.marginTop})`).style("width",n=>n.innerWidth).style("height",n=>n.innerHeight)}function Y6(t,n){const{type:e}=t;return typeof n=="string"?`${e}.${n}`:n}function pT(t,n){const e=a=>a.class!==void 0?`${a.class}`:"";t.nodes().length===0||(t.selectAll(wi(cM)).data(n,a=>a.key).join(a=>a.append("g").attr("className",cM).attr("id",o=>o.key).style("facet",e).style("fill","transparent").style("zIndex",o=>{var s;return(s=o.zIndex)!==null&&s!==void 0?s:0}),a=>a.style("facet",e).style("fill","transparent").style("zIndex",o=>{var s;return(s=o.zIndex)!==null&&s!==void 0?s:0}),a=>a.remove()),t.select(wi(j1)).node())||t.append("g").attr("className",j1).style("zIndex",0)}function wi(...t){return t.map(n=>`.${n}`).join("")}function vT(t,n){t.node()&&t.style("clipPath",e=>{if(!n)return null;const{paddingTop:r,paddingLeft:i,marginLeft:a,marginTop:o,innerWidth:s,innerHeight:l}=e;return new Zo({style:{x:i+a,y:r+o,width:s,height:l}})})}function Ipt(t,n,e){var r;for(const[c]of e.entries())if(c.type==="cell")return t.filter(u=>u.name!=="shape");if(n.length!==1||t.some(c=>c.name==="shape"))return t;const{defaultShape:i}=n[0];if(!["point","line","rect","hollow"].includes(i))return t;const o={point:"point",line:"hyphen",rect:"square",hollow:"hollow"},l={field:((r=t.find(c=>c.name==="color"))===null||r===void 0?void 0:r.field)||null,name:"shape",type:"constant",domain:[],range:[o[i]]};return[...t,l]}function Dpt(t,n){for(const[e,r]of Object.entries(n))t.style(e,r)}function $pt(...t){return n=>t.reduce((e,r)=>r(e),n)}function jpt(t){const{style:n,scale:e,type:r}=t,i={},a=zt(n,"columnWidthRatio");return a&&r==="interval"&&(i.x=Object.assign(Object.assign({},e==null?void 0:e.x),{padding:1-a})),Object.assign(Object.assign({},t),{scale:Object.assign(Object.assign({},e),i)})}const Fpt=t=>{if(!t||typeof t!="string")return t;const n=t.endsWith("%")?parseFloat(t.slice(0,-1))/100:parseFloat(t);if(isNaN(n)||n<0||n>1)throw new Error(`Invalid gap value: ${t}. It should be between 0 and 1.`);return n};function Bpt(t){const{axis:n}=t,e=zt(n,"y.breaks");return e&&Hv(t,"scale.y.breaks",e.map(r=>Object.assign(Object.assign({key:`break-${r.start}-${r.end}`},r),{gap:Fpt(r.gap)}))),t}function H6(t){const n=zpt(t);return n.children&&Array.isArray(n.children)&&(n.children=n.children.map(e=>H6(e))),n}function zpt(t){return $pt(jpt,Bpt)(t)}function Wpt(t){const n=at({},t),e=new Map([[n,null]]),r=new Map([[null,-1]]),i=[n];for(;i.length;){const a=i.shift();if(a.key===void 0){const s=e.get(a),l=r.get(a),c=s===null?"0":`${s.key}-${l}`;a.key=c}const{children:o=[]}=a;if(Array.isArray(o))for(let s=0;s<o.length;s++){const l=at({},o[s]);o[s]=l,e.set(l,a),r.set(l,s),i.push(l)}}return n}function Gpt(t,n){const e=new K4;return e.registerPlugin(new Q4),new U5({width:t,height:n,container:document.createElement("div"),renderer:e})}function Ypt(t,n={},e=()=>{},r=i=>{throw i}){const i=up(t),{width:a=640,height:o=480,depth:s=0}=i,l=H6(i),c=Wpt(l),{canvas:u=Gpt(a,o),emitter:f=new W2,library:d}=n;n.canvas=u,n.emitter=f,n.externals={};const{width:h,height:p}=u.getConfig();(h!==a||p!==o)&&u.resize(a,o),f.emit(Ae.BEFORE_RENDER);const g=Rt(u.document.documentElement);return u.ready.then(()=>b_(Object.assign(Object.assign({},c),{width:a,height:o,depth:s}),g,n)).then(()=>{if(s){const[y,m]=u.document.documentElement.getPosition();u.document.documentElement.setPosition(y,m,-s/2)}u.requestAnimationFrame(()=>{u.requestAnimationFrame(()=>{f.emit(Ae.AFTER_RENDER),e==null||e()})})}).catch(y=>{r==null||r(y)}),Upt(u.getConfig().container)}function gT(t,n={},e=!1,r=!0){const{canvas:i,emitter:a}=n;i&&(Hpt(i),e?i.destroy():i.destroyChildren()),r&&a.off()}function Hpt(t){const n=t.getRoot().querySelectorAll(`.${Qp}`);n==null||n.forEach(e=>{const{nameInteraction:r=new Map}=e;(r==null?void 0:r.size)>0&&Array.from(r==null?void 0:r.values()).forEach(i=>{i==null||i.destroy()})})}function Upt(t){return typeof t=="string"?document.getElementById(t):t}function Vpt(t,n,e){return Math.min(e,Math.max(n,t))}function Qa(t){return!!t.getBandWidth}function mc(t,n,e){if(!Qa(t))return t.invert(n);const{adjustedRange:r}=t;if(r.includes(n))return t.invert(n);const{domain:i}=t.getOptions(),a=e?-1:0,o=t.getStep(),s=e?r:r.map(u=>u+o),l=hH(s,n),c=Vpt(l+a,0,i.length-1);return i[c]}function Co(t,n,e){if(!n)return t.getOptions().domain;if(!Qa(t)){const l=Hi(n);if(!e)return l;const[c]=l,{range:u}=t.getOptions(),[f,d]=u,h=f>d?-1:1,p=t.invert(t.map(c)+h*e);return[c,p]}const{domain:r}=t.getOptions(),i=n[0],a=r.indexOf(i);if(e){const l=a+Math.round(r.length*e);return r.slice(a,l)}const o=n[n.length-1],s=r.indexOf(o);return r.slice(a,s+1)}function dp(t,n,e,r,i,a){const{x:o,y:s}=i,l=(h,p)=>{const[g,y]=a.invert(h);return[mc(o,g,p),mc(s,y,p)]},c=l([t,n],!0),u=l([e,r],!1),f=Co(o,[c[0],u[0]]),d=Co(s,[c[1],u[1]]);return[f,d]}function yT(t,n){const[e,r]=t,i=a=>a.getStep?a.getStep():0;return[n.map(e),n.map(r)+i(n)]}const mT=(t,n)=>{var e,r;const[i,a]=t,o=((r=(e=n.getOptions)===null||e===void 0?void 0:e.call(n))===null||r===void 0?void 0:r.domain)||[],s=o.indexOf(i),l=o.indexOf(a);if(s===-1||l===-1)return[n.map(i),n.map(a)];const c=o.length;return c<=1?[0,1]:[s/(c-1),l/(c-1)]};function Xpt(t,n,e){const{x:r,y:i}=n,[a,o]=t,s=yT(a,r),l=yT(o,i),c=[s[0],l[0]],u=[s[1],l[1]],[f,d]=e.map(c),[h,p]=e.map(u);return[f,d,h,p]}function Af(t,n){if(n(t))return!0;if(t.tagName==="g"){const{childNodes:e=[]}=t;for(const r of e)if(Af(r,n))return!0}return!1}const qpt={visibility:"visible",opacity:1,fillOpacity:1,strokeOpacity:1};function Kpt(t,n){let e;return Af(t,r=>{var i;return r.tagName!=="g"&&((i=r.style)===null||i===void 0?void 0:i[n])!==void 0?(e=r.style[n],!0):!1}),e??qpt[n]}function __(t,n,e,r){t.style[n]=e,t.children.forEach(i=>__(i,n,e))}function w_(t){__(t,"visibility","hidden")}function z0(t){__(t,"visibility","visible")}var Yu=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};function io(t){return Rt(t).selectAll(`.${oa}`).nodes().filter(n=>!n.__removed__)}function U6(t,n){return hb(t,n).flatMap(({container:e})=>io(e))}function hb(t,n){return n.filter(e=>e!==t&&e.options.parentKey===t.options.key)}function Li(t){return Rt(t).select(`.${Wo}`).node()}function Tf(t){if(t.tagName==="g")return t.getRenderBounds();const n=t.getGeometryBounds(),e=new Fn;return e.setFromTransformedAABB(n,t.getWorldTransform()),e}function qs(t,n){const{offsetX:e,offsetY:r}=n,i=Tf(t),{min:[a,o],max:[s,l]}=i,c=e<a||e>s,u=r<o||r>l;return c||u?null:[e-a,r-o]}function Sm(t,n){const{offsetX:e,offsetY:r}=n,[i,a,o,s]=Zpt(t);return[Math.min(o,Math.max(i,e))-i,Math.min(s,Math.max(a,r))-a]}function Zpt(t){const n=t.getRenderBounds(),{min:[e,r],max:[i,a]}=n;return[e,r,i,a]}function V6(t){return n=>n.__data__.color}function rd(t){return n=>n.__data__.x}function Yo(t){const n=Array.isArray(t)?t:[t],e=new Map(n.flatMap(r=>Array.from(r.markState.keys()).map(a=>[Sv(r.key,a.key),a.data])));return r=>{const{index:i,markKey:a,viewKey:o}=r.__data__;return e.get(Sv(o,a))[i]}}const bT={selected:3,unselected:3,active:2,inactive:2,default:1},Qpt={selection:["selected","unselected"],highlight:["active","inactive"]},X6=(t,n,e)=>{Af(t,r=>{"setAttribute"in r&&typeof r.setAttribute=="function"&&r.setAttribute(n,e)})};function O_(t,n){return n.forEach(e=>{const r=e.__interactionStyle__;r?e.__interactionStyle__=Object.assign(Object.assign({},r),t):e.__interactionStyle__=t}),(e=(i,a)=>i,r=X6)=>jo(void 0,e,r)}function jo(t,n=(r,i)=>r,e=X6){const r="__states__",i="__ordinal__",a=h=>bT[h]||bT.default,o=h=>{var p;return(p=Object.entries(Qpt).find(([g,y])=>y.includes(h)))===null||p===void 0?void 0:p[0]},s=h=>{var p;const{[r]:g=[],[i]:y={}}=h,m=[...g].sort((w,O)=>a(O)-a(w)),x=new Map;for(const w of m){const O=((p=t??h.__interactionStyle__)===null||p===void 0?void 0:p[w])||{};for(const[S,E]of Object.entries(O))x.has(S)||x.set(S,E)}const _=Object.assign({},y);for(const[w,O]of x.entries())_[w]=O;if(Object.keys(_).length!==0){for(const[w,O]of Object.entries(_)){const S=Kpt(h,w),E=n(O,h);e(h,w,E),w in y||(y[w]=S)}h[i]=y}},l=h=>{h[r]||(h[r]=[])};return{setState:(h,...p)=>{l(h),h[r]=[...p],s(h)},updateState:(h,...p)=>{l(h);const g=h[r],y=new Set(p.map(x=>o(x)).filter(x=>x!==void 0)),m=g.filter(x=>!y.has(o(x)));h[r]=[...m,...p],s(h)},removeState:(h,...p)=>{l(h);for(const g of p){const y=h[r].indexOf(g);y!==-1&&h[r].splice(y,1)}s(h)},hasState:(h,p)=>(l(h),h[r].indexOf(p)!==-1)}}function Jpt(t){return t===void 0?!0:typeof t!="object"?!1:Object.keys(t).length===0}function Sv(t,n){return`${t},${n}`}function Ks(t,n){const r=(Array.isArray(t)?t:[t]).flatMap(a=>a.marks.map(o=>[Sv(a.key,o.key),o.state])),i={};for(const a of n){const[o,s]=Array.isArray(a)?a:[a,{}];i[o]=r.reduce((l,c)=>{const[u,f={}]=c,d=Jpt(f[o])?s:f[o];for(const[h,p]of Object.entries(d)){const g=l[h],y=(m,x,_,w)=>{const O=Sv(w.__data__.viewKey,w.__data__.markKey);return u!==O?g==null?void 0:g(m,x,_,w):typeof p!="function"?p:p(m,x,_,w)};l[h]=y}return l},{})}return i}function Pc(t,n){const e=new Map(t.map((i,a)=>[i,a])),r=n?t.map(n):t;return(i,a)=>{if(typeof i!="function")return i;const o=e.get(a),s=n?n(a):a;return i(s,o,r,a)}}function q6(t){var{link:n=!1,valueof:e=(u,f)=>u,coordinate:r}=t,i=Yu(t,["link","valueof","coordinate"]);const a="element-link";if(!n)return[()=>{},()=>{}];const o=u=>u.__data__.points,s=(u,f)=>{const[,d,h]=u,[p,,,g]=f;return[d,p,g,h]};return[u=>{var f;if(u.length<=1)return;const d=Hi(u,(h,p)=>{const{x:g}=h.__data__,{x:y}=p.__data__;return g-y});for(let h=1;h<d.length;h++){const p=Ai(),g=d[h-1],y=d[h],[m,x,_,w]=s(o(g),o(y));p.moveTo(...m),p.lineTo(...x),p.lineTo(..._),p.lineTo(...w),p.closePath();const O=wa(i,A=>e(A,g)),{fill:S=g.getAttribute("fill")}=O,E=Yu(O,["fill"]),M=new ur({className:a,style:Object.assign({d:p.toString(),fill:S,zIndex:-2},E)});(f=g.link)===null||f===void 0||f.remove(),g.parentNode.appendChild(M),g.link=M}},u=>{var f;(f=u.link)===null||f===void 0||f.remove(),u.link=null}]}function K6(t,n,e){const r=i=>{const{transform:a}=t.style;return a?`${a} ${i}`:i};if(Ie(e)){const{points:i}=t.__data__,[a,o]=Ze(e)?g0(i):i,s=e.getCenter(),l=On(a,s),c=On(o,s),u=Ei(l),f=N3(l,c),d=u+f/2,h=n*Math.cos(d),p=n*Math.sin(d);return r(`translate(${h}, ${p})`)}return Ze(e)?r(`translate(${n}, 0)`):r(`translate(0, ${-n})`)}function Z6(t){var{document:n,background:e,scale:r,coordinate:i,valueof:a}=t,o=Yu(t,["document","background","scale","coordinate","valueof"]);const s="element-background";if(!e)return[()=>{},()=>{}];const l=(m,x,_)=>{const w=m.invert(x),O=x+m.getBandWidth(w)/2,S=m.getStep(w)/2,E=S*_;return[O-S+E,O+S-E]},c=(m,x)=>{const{x:_}=r;if(!Qa(_))return[0,1];const{__data__:w}=m,{x:O}=w,[S,E]=l(_,O,x);return[S,E]},u=(m,x)=>{const{y:_}=r;if(!Qa(_))return[0,1];const{__data__:w}=m,{y:O}=w,[S,E]=l(_,O,x);return[S,E]},f=(m,x)=>{const{padding:_}=x,[w,O]=c(m,_),[S,E]=u(m,_),M=[[w,S],[O,S],[O,E],[w,E]].map(N=>i.map(N)),{__data__:A}=m,{y:T,y1:P}=A;return rL(n,M,{y:T,y1:P},i,x)},d=(m,x)=>{const{transform:_="scale(1.2, 1.2)",transformOrigin:w="center center",stroke:O=""}=x,S=Yu(x,["transform","transformOrigin","stroke"]),E=Object.assign({transform:_,transformOrigin:w,stroke:O},S),M=m.cloneNode(!0);for(const[A,T]of Object.entries(E))M.style[A]=T;return M},h=()=>{const{x:m,y:x}=r;return[m,x].some(Qa)};return[m=>{m.background&&m.background.remove();const x=wa(o,N=>a(N,m)),{fill:_="#CCD6EC",fillOpacity:w=.3,zIndex:O=-2,padding:S=.001,lineWidth:E=0}=x,M=Yu(x,["fill","fillOpacity","zIndex","padding","lineWidth"]),A=Object.assign(Object.assign({},M),{fill:_,fillOpacity:w,zIndex:O,padding:S,lineWidth:E}),P=(h()?f:d)(m,A);P.className=s,m.parentNode.parentNode.appendChild(P),m.background=P},m=>{var x;(x=m.background)===null||x===void 0||x.remove(),m.background=null},m=>m.className===s]}function Oo(t,n){const r=t.getRootNode().defaultView.getContextService().getDomElement();r!=null&&r.style&&(t.cursor=r.style.cursor,r.style.cursor=n)}function tvt(t){Oo(t,t.cursor)}function W0(t,n,e){return t.find(r=>Object.entries(n).every(([i,a])=>e(r)[i]===a))}function Ev(t,n){return Math.sqrt(Math.pow(t[0]-n[0],2)+Math.pow(t[1]-n[1],2))}function fu(t,n=!1){const e=RP(t,r=>!!r).map((r,i)=>[i===0?"M":"L",...r]);return n&&e.push(["Z"]),e}function Q6(t){return t.querySelectorAll(".element")}function evt(t,n,e=0){const r=[["M",...n[1]]],i=Ev(t,n[1]),a=Ev(t,n[0]);return i===0?r.push(["L",...n[3]],["A",a,a,0,e,1,...n[0]],["Z"]):r.push(["A",i,i,0,e,0,...n[2]],["L",...n[3]],["A",a,a,0,e,1,...n[0]],["Z"]),r}function id(t,n){if(n(t))return t;let e=t.parent;for(;e&&!n(e);)e=e.parent;return e}const S_=["interval","point","density"];function J6({elementsof:t,root:n,coordinate:e,scale:r,validFindByXMarks:i=S_}){var a,o;let s=t(n);const l=u=>i.includes(u.markType);if(s.find(l)){s=s.filter(l);const u=r.x,f=r.series,d=(o=(a=u==null?void 0:u.getBandWidth)===null||a===void 0?void 0:a.call(u))!==null&&o!==void 0?o:0,h=f?p=>{var g,y;const m=Math.round(1/((g=f.valueBandWidth)!==null&&g!==void 0?g:1));return p.__data__.x+((y=p.__data__.series)!==null&&y!==void 0?y:0)*d+d/(m*2)}:p=>p.__data__.x+d/2;return s.sort((p,g)=>h(p)-h(g)),p=>{const g=qs(n,p);if(!g)return;const[y]=e.invert(g),m=Xa(h).center,x=m(s,y);return s[x]}}return u=>{const{target:f}=u;return id(f,d=>d.classList?d.classList.includes("element"):!1)}}function nvt(t){const a=.01/Math.max(t,1e-4);return Math.max(.1,Math.min(100,a))}function t8(t){return t===!1||t===null||t===void 0}function rvt(t){var n,e;const r=[],i=[],a=[],o=t.markState;if(o){for(const[s,l]of o.entries())if(l!=null&&l.channels){const c={};for(const d of l.channels)if((d==null?void 0:d.name)==="x"&&((n=d.values)===null||n===void 0?void 0:n.length)>0){let h=[];for(const p of d.values)p!=null&&p.value&&(h=h.concat(p.value),r.push(p.value));c.x=h}else if(d&&(d.name==="y"||d.name.startsWith("y"))&&((e=d.values)===null||e===void 0?void 0:e.length)>0){const h=d.name,p=[];for(const g of d.values)if(g!=null&&g.value){const y=g.value;p.push(y),(h==="y"||h==="y1")&&(Array.isArray(y)?i.push(y.flat()):i.push([y]))}c[h]=p}const u=c.x||[],f=c.y||[];u.length>0&&f.length>0&&a.push({markKey:s.key||`mark_${a.length}`,channelData:c})}}return{xChannelValues:r.flat(),yChannelValues:i.flat(),markDataPairs:a}}function xT(t,n){const e=new Set;for(const r of n){const{scale:i}=r,a=i==null?void 0:i[t];if(!a)continue;if(a.independent)return!0;const o=a.key||"default";if(e.add(o),e.size>1)return!0}return!1}function ivt(t,n,e,r,i){var a,o,s,l;const c={x:n.x||e.getOptions().domain||[],y:n.y||r.getOptions().domain||[]},u=i||e8(t),{hasIndependentX:f,hasIndependentY:d}=u;if(f||d){let h=1,p=1;for(const[g,y]of t.markState.entries())if(y!=null&&y.channels){if(f){const m=y.channels.find(x=>x.name==="x");if(!((o=(a=g==null?void 0:g.scale)===null||a===void 0?void 0:a.x)===null||o===void 0)&&o.independent){const x=`x${h}`;c[x]=m.scale.domain,h++}}if(d){const m=y.channels.find(x=>x.name==="y");if(!((l=(s=g==null?void 0:g.scale)===null||s===void 0?void 0:s.y)===null||l===void 0)&&l.independent){const x=`y${p}`;c[x]=m.scale.domain,p++}}}}return c}function e8(t){var n,e,r,i,a,o,s,l;const c=Array.from(t.markState.keys()),u=xT("x",c),f=xT("y",c),d=[],h=[],p=[],g=[],y=new Map,m=new Map,x=new Map,_=new Map;let w=1,O=1;for(const[S]of t.markState.entries()){const E=S.key,M=((e=(n=S==null?void 0:S.scale)===null||n===void 0?void 0:n.x)===null||e===void 0?void 0:e.key)||"x";if(!!(!((i=(r=S==null?void 0:S.scale)===null||r===void 0?void 0:r.x)===null||i===void 0)&&i.independent)||u&&M!=="x"){h.push(E),x.has(M)||x.set(M,w++);const N=x.get(M);y.set(E,`x${N}`)}else d.push(E),y.set(E,"x");const T=((o=(a=S==null?void 0:S.scale)===null||a===void 0?void 0:a.y)===null||o===void 0?void 0:o.key)||"y";if(!!(!((l=(s=S==null?void 0:S.scale)===null||s===void 0?void 0:s.y)===null||l===void 0)&&l.independent)||f&&T!=="y"){g.push(E),_.has(T)||_.set(T,O++);const N=_.get(T);m.set(E,`y${N}`)}else p.push(E),m.set(E,"y")}return{hasIndependentX:u,hasIndependentY:f,marksWithSharedX:d,marksWithIndependentX:h,marksWithSharedY:p,marksWithIndependentY:g,markToXScaleMap:y,markToYScaleMap:m}}var ua=function(t,n,e,r){function i(a){return a instanceof e?a:new e(function(o){o(a)})}return new(e||(e=Promise))(function(a,o){function s(u){try{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?a(u.value):i(u.value).then(s,l)}c((r=r.apply(t,n||[])).next())})};const n8="legend-category",E_="legend-html-category",avt="legend-continuous",ovt="items-item",svt="legend-category-item-marker",lvt="legend-category-item-label",cvt="legend-category-item-focus-group";function r8(t){return t.getElementsByClassName(svt)[0]}function i8(t){return t.getElementsByClassName(lvt)[0]}function _T(t){return t.getElementsByClassName(cvt)[0]}function a8(t){return t.getElementsByClassName(ovt)}function k_(t){return t.getElementsByClassName(n8)}function uvt(t){return t.getElementsByClassName(E_)}function o8(t){return t.getElementsByClassName(avt)}function fvt(t,n){[...k_(t),...o8(t)].forEach(r=>{n(r,i=>i)})}function pb(t){let n=t.parentNode;for(;n&&!n.__data__;)n=n.parentNode;return n.__data__}function dvt(t,n,e){var r;const i=Object.keys(t).find(a=>{if(a.startsWith(e)){const o=t[a].getOptions();return o.name===e&&o.markKey===n}});return(r=t[i])!==null&&r!==void 0?r:t[e]}function hvt(t,{legends:n,marker:e,label:r,datum:i,filter:a,defaultSelect:o,emitter:s,channel:l,state:c={}}){const u=new Map,f=new Map,d=new Map,h=new Map,{unselected:p={markerStroke:"#aaa",markerFill:"#aaa",labelFill:"#aaa"}}=c,g={unselected:bt(p,"marker")},y={unselected:bt(p,"label")},{setState:m,removeState:x}=jo(g,void 0),{setState:_,removeState:w}=jo(y,void 0),O=Array.from(n(t));let S=O.map(i);const E=()=>{for(const P of O){const N=i(P),C=e(P),R=r(P);S.includes(N)?(x(C,"unselected"),w(R,"unselected")):(m(C,"unselected"),_(R,"unselected"))}};for(const P of O){const N=()=>{Oo(t,"pointer")},C=()=>{tvt(t)},R=F=>ua(this,void 0,void 0,function*(){const j=i(P),I=S.indexOf(j);I===-1?S.push(j):S.splice(I,1),yield a(S),E();const{nativeEvent:$=!0}=F;$&&(S.length===O.length?s.emit("legend:reset",{nativeEvent:$}):s.emit("legend:filter",Object.assign(Object.assign({},F),{nativeEvent:$,data:{channel:l,values:S}})))});P.addEventListener("click",R),P.addEventListener("pointerenter",N),P.addEventListener("pointerout",C),u.set(P,R),f.set(P,N),d.set(P,C);const D=_T(P);if(D){const F=j=>ua(this,void 0,void 0,function*(){j.stopPropagation();const I=i(P),$=S.indexOf(I),{nativeEvent:z=!0}=j;if($!==-1&&S.length===1){if(!z)return;S=O.map(i),yield a(S),E(),s.emit("legend:reset",{nativeEvent:z})}else{if(S=[I],yield a(S),E(),!z)return;s.emit("legend:focus",Object.assign(Object.assign({},j),{nativeEvent:z,data:{channel:l,value:I}}))}});D.addEventListener("click",F),h.set(P,F)}}const M=P=>ua(this,void 0,void 0,function*(){const{nativeEvent:N}=P;if(N)return;const{data:C}=P,{channel:R,value:D}=C;R===l&&(S=[D],yield a(S),E())}),A=P=>ua(this,void 0,void 0,function*(){const{nativeEvent:N}=P;if(N)return;const{data:C}=P,{channel:R,values:D}=C;R===l&&(S=D,yield a(S),E())}),T=P=>ua(this,void 0,void 0,function*(){const{nativeEvent:N}=P;N||(S=O.map(i),yield a(S),E())});return s.on("legend:filter",A),s.on("legend:focus",M),s.on("legend:reset",T),o&&s.emit("legend:filter",{data:{channel:l,values:o}}),()=>{for(const P of O){P.removeEventListener("click",u.get(P)),P.removeEventListener("pointerenter",f.get(P)),P.removeEventListener("pointerout",d.get(P));const N=_T(P);N&&N.removeEventListener("click",h.get(P))}s.off("legend:focus",M),s.off("legend:filter",A),s.off("legend:reset",T)}}function pvt(t,{domain:n,filter:e,defaultSelect:r,emitter:i,channel:a}){const o=new Map,s=new Map,l=new Map;let c=[...n];const u=()=>{var y;const m=(y=t.ownerDocument)===null||y===void 0?void 0:y.defaultView;return m&&m.getContextService().getDomElement().parentElement||document.body},f=()=>{const m=u().querySelector(".legend-html"),x=_=>ua(this,void 0,void 0,function*(){let w=_.target;for(;w&&!w.hasAttribute("legend-value")&&(w=w.parentElement,w!==m););if(!w||!w.hasAttribute("legend-value"))return;_.preventDefault(),_.stopPropagation();const O=w.getAttribute("legend-value");if(!O)return;const S=c.indexOf(O);S===-1?c.push(O):c.splice(S,1),yield e(c),d(),c.length===n.length?i.emit("legend:reset",{nativeEvent:!0}):i.emit("legend:filter",{nativeEvent:!0,data:{channel:a,values:c}})});m.addEventListener("click",x),o.set(m,x)},d=()=>{u().querySelectorAll("[legend-value]").forEach(x=>{const _=x.getAttribute("legend-value");if(!_||!n.includes(_))return;const w=c.includes(_),O=x;w?(O.style.opacity="1",O.classList.remove("legend-item-inactive")):(O.style.opacity="0.4",O.classList.add("legend-item-inactive"))})};f();const h=y=>ua(this,void 0,void 0,function*(){const{nativeEvent:m}=y;if(m)return;const{data:x}=y,{channel:_,value:w}=x;_===a&&(c=[w],yield e(c),d())}),p=y=>ua(this,void 0,void 0,function*(){const{nativeEvent:m}=y;if(m)return;const{data:x}=y,{channel:_,values:w}=x;_===a&&(c=w,yield e(c),d())}),g=y=>ua(this,void 0,void 0,function*(){const{nativeEvent:m}=y;m||(c=[...n],yield e(c),d())});return i.on("legend:filter",p),i.on("legend:focus",h),i.on("legend:reset",g),r&&i.emit("legend:filter",{data:{channel:a,values:r}}),()=>{u().querySelectorAll("[legend-value]").forEach(x=>{const _=x.getAttribute("legend-value");if(!_||!n.includes(_))return;const w=o.get(x),O=s.get(x),S=l.get(x);w&&x.removeEventListener("click",w),O&&x.removeEventListener("pointerenter",O),S&&x.removeEventListener("pointerout",S)}),o.clear(),s.clear(),l.clear(),i.off("legend:filter",p),i.off("legend:focus",h),i.off("legend:reset",g)}}function vvt(t,{legend:n,filter:e,emitter:r,channel:i}){const{attributes:a}=n,o=s=>{const{value:l}=s.detail,c=l.map(u=>{var f,d;const h=(f=a.data)===null||f===void 0?void 0:f.find(p=>p.value===u);return h&&(d=h.domainValue)!==null&&d!==void 0?d:u});e(c),r.emit({nativeEvent:!0,data:{channel:i,values:c}})};return n.addEventListener("valuechange",o),()=>{n.removeEventListener("valuechange",o)}}function s8(t,n){return ua(this,arguments,void 0,function*(e,{legend:r,channel:i,value:a,ordinal:o,channels:s,allChannels:l,facet:c=!1}){const{view:u,update:f,setState:d}=e;d(r,h=>{var p,g;const{marks:y}=h,m=(g=(p=r.attributes)===null||p===void 0?void 0:p.scales)===null||g===void 0?void 0:g.find(_=>_.name===i),x=y.map(_=>{var w,O;if(((w=_.scale[i].key)!==null&&w!==void 0?w:i)!==((O=m==null?void 0:m.key)!==null&&O!==void 0?O:m==null?void 0:m.name)||_.type==="legends"||D2.includes(_.type))return _;const{transform:S=[],data:E=[]}=_,M=S.findIndex(({type:P})=>P.startsWith("group")||P.startsWith("bin")),A=[...S];E.length&&A.splice(M+1,0,{type:"filter",[i]:{value:a,ordinal:o}});const T=Object.fromEntries(s.map(P=>{const N=dvt(u.scale,h.key,P);return[P,{domain:N.getOptions().domain}]}));return at({},_,Object.assign(Object.assign({transform:A,scale:T},!o&&{animate:!1}),{legend:c?!1:Object.fromEntries(l.map(P=>[P,{preserve:!0}]))}))});return Object.assign(Object.assign({},h),{marks:x})}),yield f()})}function gvt(t,n){for(const e of t)s8(e,Object.assign(Object.assign({},n),{facet:!0}))}function yvt(){return(t,n,e)=>{const{container:r}=t,i=n.filter(f=>f!==t),a=i.length>0,o=f=>pb(f).scales.map(d=>d.name),s=[...k_(r),...uvt(r),...o8(r)],l=s.flatMap(o),c=a?Fs(gvt,50,{trailing:!0}):Fs(s8,50,{trailing:!0}),u=s.map(f=>{const{name:d,domain:h}=pb(f).scales[0],p=o(f),g={legend:f,channel:d,channels:p,allChannels:l};return f.className===n8?hvt(f,{legends:a8,marker:r8,label:i8,datum:y=>{const{__data__:m}=y,{index:x}=m;return h[x]},filter:y=>{const m=Object.assign(Object.assign({},g),{value:y,ordinal:!0});c(a?i:t,m)},state:f.attributes.state,defaultSelect:f.attributes.defaultSelect,channel:d,emitter:e}):f.className===E_?pvt(r,{domain:h,filter:y=>{const m=Object.assign(Object.assign({},g),{value:y,ordinal:!0});c(a?i:t,m)},defaultSelect:f.attributes.defaultSelect,channel:d,emitter:e}):vvt(r,{legend:f,filter:y=>{const m=Object.assign(Object.assign({},g),{value:y,ordinal:!1});c(a?i:t,m)},emitter:e,channel:d})});return()=>{u.forEach(f=>f())}}}var mvt=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};function l8(t,n){const e=ba(t,"shape"),r=ba(t,"color"),i=e?e.clone():null,a=[];for(const[s,l]of n){const c=s.type,f=((r==null?void 0:r.getOptions().domain.length)>0?r==null?void 0:r.getOptions().domain:l.data).map((d,h)=>{var p;return i?i.map(d||"point"):((p=s==null?void 0:s.style)===null||p===void 0?void 0:p.shape)||l.defaultShape||"point"});typeof c=="string"&&a.push([c,f])}if(a.length===0)return["point",["point"]];if(a.length===1||!e)return a[0];const{range:o}=e.getOptions();return a.map(([s,l])=>{let c=0;for(let u=0;u<a.length;u++){const f=o[u%o.length];l[u]===f&&c++}return[c/l.length,[s,l]]}).sort((s,l)=>l[0]-s[0])[0][1]}function bvt(t,n){const{scales:e,library:r,markState:i}=n,[a,o]=l8(e,i),{itemMarker:s,itemMarkerSize:l}=t,c=(d,h)=>{var p,g,y;const m=((y=(g=(p=r[`mark.${a}`])===null||p===void 0?void 0:p.props)===null||g===void 0?void 0:g.shape[d])===null||y===void 0?void 0:y.props.defaultMarker)||Qr(d.split(".")),x=typeof l=="function"?l(h):l;return()=>yJ(m,{color:h.color})(0,0,x)},u=d=>`${o[d]}`;return ba(e,"shape")&&!s?(d,h)=>c(u(h),d):typeof s=="function"?(d,h)=>{const p=s(d.id,h);return typeof p=="string"?c(p,d):p}:(d,h)=>c(s||u(h),d)}function xvt(t){const n=ba(t,"opacity");if(n){const{range:e}=n.getOptions();return(r,i)=>e[i]}}function _vt(t,n){const e=ba(t,"size");return e instanceof IC?e.map(NaN)*2:n}function wvt(t,n){const{scales:e,markState:r}=n,[i,a]=l8(e,r),{itemMarker:o,itemMarkerLineWidth:s}=t;if(s!==void 0)return s;const l=["line","hyphen","dash","smooth","hv","hvh","vh","vhv"];if(typeof o=="string"&&l.includes(o))return 4;if(typeof o=="function")return(f,d)=>{const h=o(f.id,d);if(typeof h=="string"&&l.includes(h))return 4};if((Array.isArray(a)?a:[a]).some(f=>l.includes(f)))return 4}function Ovt(t,n){const{labelFormatter:e=d=>`${d}`}=t,{scales:r,theme:i}=n,a=i.legendCategory.itemMarkerSize,o=_vt(r,a),s={itemMarker:bvt(Object.assign(Object.assign({},t),{itemMarkerSize:o}),n),itemMarkerSize:o,itemMarkerOpacity:xvt(r),itemMarkerLineWidth:wvt(t,n)},l=typeof e=="string"?lo(e):e,c=ba(r,"color"),u=wst(r),f=c?d=>c.map(d):()=>n.theme.color;return Object.assign(Object.assign({},s),{data:u.map(d=>({id:d,label:l(d),color:f(d)}))})}function Svt(t,n,e){const{position:r}=n;if(r==="center"){const{bbox:o}=t,{width:s,height:l}=o;return{width:s,height:l}}const{width:i,height:a}=L4(t,n,e);return{width:i,height:a}}function Evt(t){return Object.assign(Object.assign({},t),{data:(t==null?void 0:t.data.filter(n=>n.id!==""&&n.id!==void 0))||[]})}const M_=t=>{const{labelFormatter:n,layout:e,order:r,orientation:i,position:a,size:o,title:s,cols:l,itemMarker:c,render:u}=t,f=mvt(t,["labelFormatter","layout","order","orientation","position","size","title","cols","itemMarker","render"]),{gridRow:d}=f;return h=>{const{value:p,theme:g}=h,{bbox:y}=p,{width:m,height:x}=Svt(p,t,M_),_=P4(a,e),w=Object.assign(Object.assign(Object.assign(Object.assign({orientation:["right","left","center"].includes(a)?"vertical":"horizontal",width:m,height:x,layout:l!==void 0?"grid":"flex"},l!==void 0&&{gridCol:l}),d!==void 0&&{gridRow:d}),{titleText:T0(s)}),Ovt(t,h)),{legendCategory:O={}}=g,S=P0(Object.assign({},O,Evt(w),f,{classNamePrefix:so}));if(u)return new Gk({className:E_,style:Object.assign(Object.assign({},S),{x:y.x,y:y.y,render:u})});const E=new bst({style:Object.assign(Object.assign({x:y.x,y:y.y,width:y.width,height:y.height},_),{subOptions:S})});return E.appendChild(new Gk({className:"legend-category",style:S})),E}};M_.props={defaultPosition:"top",defaultOrder:1,defaultSize:40,defaultCrossPadding:[12,12],defaultPadding:[12,12]};var kvt=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};function Mvt(t,n,e){return t.size=n,xst(e)?t.height=n:t.width=n,t}function Avt(t,n,e){const{size:r}=n,i=L4(t,n,e);return Mvt(i,r,i.orientation)}function Tvt(t){return n=>({value:n/t,label:String(n),domainValue:n})}function Pvt(t,n,e,r,i){const a=n.thresholds,o=Tvt(r);return Object.assign(Object.assign({},t),{color:i,data:[e,...a,r].map(o)})}function Cvt(t,n,e){const i=[-1/0,...n.thresholds,1/0].map((a,o)=>({value:o,domainValue:a,label:a}));return Object.assign(Object.assign({},t),{data:i,color:e,labelFilter:(a,o)=>o>0&&o<i.length-1})}function vb(t){const{domain:n}=t.getOptions(),[e,r]=[n[0],t3(n)];return[e,r]}function Lvt(t,n){const e=t.getOptions(),r=t.clone();return r.update(Object.assign(Object.assign({},e),{range:[$o(n).toString()]})),r}function Nvt(t,n,e,r,i,a){const{length:o}=t,s=e||r,l=i.color?a.legendContinuous.ribbonFill||"black":a.color,c=n||Lvt(s,l),[u,f]=vb(c),[d,h]=vb([n,e,r].filter(p=>p!==void 0).find(p=>!(p instanceof nx)));return Object.assign(Object.assign({},t),{domain:[d,h],data:c.getTicks().map(p=>({value:p})),color:new Array(Math.floor(o)).fill(0).map((p,g)=>{const y=(f-u)/(o-1)*g+u,m=c.map(y)||l,x=r?r.map(y):1;return m.replace(/rgb[a]*\(([\d]{1,3}) *, *([\d]{1,3}) *, *([\d]{1,3})[\S\s]*\)/,(_,w,O,S)=>`rgba(${w}, ${O}, ${S}, ${x})`)})})}function Rvt(t,n,e,r,i,a){const o=ba(t,"color"),s=Avt(e,r,i);if(o instanceof Kv){const{range:u}=o.getOptions(),[f,d]=vb(o);return o instanceof YC||o instanceof UC?Pvt(s,o,f,d,u):Cvt(s,o,u)}const l=ba(t,"size"),c=ba(t,"opacity");return Nvt(s,o,l,c,n,a)}const ns=t=>{const{labelFormatter:n,layout:e,order:r,orientation:i,position:a,size:o,title:s,style:l,crossPadding:c,padding:u}=t,f=kvt(t,["labelFormatter","layout","order","orientation","position","size","title","style","crossPadding","padding"]);return({scales:d,value:h,theme:p,scale:g})=>{const{bbox:y}=h,{x:m,y:x,width:_,height:w}=y,O=P4(a,e),{legendContinuous:S={}}=p,E=P0(Object.assign({},S,Object.assign(Object.assign(Object.assign({titleText:T0(s),labelAlign:"value",labelFormatter:typeof n=="string"?A=>lo(n)(A.label):n},Rvt(d,g,h,t,ns,p)),l),{classNamePrefix:so}),f)),M=new C4({style:Object.assign(Object.assign({x:m,y:x,width:_,height:w},O),{subOptions:E})});return M.appendChild(new Bnt({className:"legend-continuous",style:E})),M}};ns.props={defaultPosition:"top",defaultOrientation:"vertical",defaultOrder:1,defaultSize:60,defaultLength:200,defaultLegendSize:60,defaultPadding:[20,10],defaultCrossPadding:[12,12]};const c8=t=>(...n)=>ns(Object.assign({},{block:!0},t))(...n);c8.props=Object.assign(Object.assign({},ns.props),{defaultPosition:"top",defaultOrientation:"horizontal"});const A_=t=>n=>{const{scales:e}=n,r=ba(e,"size");return ns(Object.assign({},{type:"size",data:r.getTicks().map((i,a)=>({value:i,label:String(i)}))},t))(n)};A_.props=Object.assign(Object.assign({},ns.props),{defaultPosition:"top",defaultOrientation:"horizontal"});const u8=t=>A_(Object.assign({},{block:!0},t));u8.props=Object.assign(Object.assign({},ns.props),{defaultPosition:"top",defaultOrientation:"horizontal"});var Ivt=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};function wT(t,n,e,r){switch(r){case"center":return{x:t+e/2,y:n,textAlign:"middle"};case"right":return{x:t+e,y:n,textAlign:"right"};default:return{x:t,y:n,textAlign:"left"}}}const Dvt=mst({render(t,n){const{width:e,title:r,subtitle:i,spacing:a=2,align:o="left",x:s,y:l}=t,c=Ivt(t,["width","title","subtitle","spacing","align","x","y"]);n.style.transform=`translate(${s}, ${l})`;const u=bt(c,"title"),f=bt(c,"subtitle"),h=uA(n,".title","text").attr("className","title").call(Pt,Object.assign(Object.assign(Object.assign({},wT(0,0,e,o)),{fontSize:14,textBaseline:"top",text:r}),u)).node().getLocalBounds();uA(n,".sub-title","text").attr("className","sub-title").call(p=>{if(!i)return p.node().remove();p.node().attr(Object.assign(Object.assign(Object.assign({},wT(0,h.max[1]+a,e,o)),{fontSize:12,textBaseline:"top",text:i}),f))})}}),f8=t=>({value:n,theme:e})=>{const{x:r,y:i,width:a,height:o}=n.bbox;return new Dvt({style:at({},e.title,Object.assign({x:r,y:i,width:a,height:o},t))})};f8.props={defaultPosition:"top",defaultOrder:2,defaultSize:36,defaultCrossPadding:[20,20],defaultPadding:[12,12]};var $vt=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};function jvt(t,n,e){const{x:r,y:i,width:a,height:o}=t;if(n==="left")return[r+a-e,i];if(n==="right")return[r,i];if(n==="bottom")return[r,i];if(n==="top")return[r,i+o-e]}const ad=t=>{const{orientation:n,labelFormatter:e,size:r,style:i={},position:a}=t,o=$vt(t,["orientation","labelFormatter","size","style","position"]);return s=>{var l;const{scales:[c],value:u,theme:f,coordinate:d}=s,{bbox:h}=u,{width:p,height:g}=h,{slider:y={}}=f,m=((l=c.getFormatter)===null||l===void 0?void 0:l.call(c))||(M=>M+""),x=typeof e=="string"?lo(e):e,_=n==="horizontal",w=Ze(d)&&_,{trackSize:O=y.trackSize}=i,[S,E]=jvt(h,a,O);return new iN({className:"slider",style:Object.assign({},y,Object.assign(Object.assign({x:S,y:E,trackLength:_?p:g,orientation:n,formatter:M=>{const A=x||m,T=w?1-M:M,P=mc(c,T,!0);return A(P)},sparklineData:Bvt(t,s)},i),o))})}};function Fvt(t,n){const[e]=Array.from(t.entries()).filter(([i])=>i.type==="line"||i.type==="area"||i.type==="interval").filter(([i])=>i.slider).map(([i])=>{const{encode:a,slider:o}=i;if(o!=null&&o.x){const s=l=>{const c=a[l];return[l,c?c.value:void 0]};return Object.fromEntries(n.map(s))}});if(!(e!=null&&e.series))return e==null?void 0:e.y;const r=e.series.reduce((i,a,o)=>(i[a]=i[a]||[],i[a].push(e.y[o]),i),{});return Object.values(r)}function Bvt(t,n){const{markState:e}=n;return Cn(t.sparklineData)?t.sparklineData:Fvt(e,["y","series"])}ad.props={defaultPosition:"bottom",defaultSize:24,defaultOrder:1,defaultCrossPadding:[12,12],defaultPadding:[12,12]};const d8=t=>ad(Object.assign(Object.assign({},t),{orientation:"horizontal"}));d8.props=Object.assign(Object.assign({},ad.props),{defaultPosition:"bottom"});const h8=t=>ad(Object.assign(Object.assign({},t),{orientation:"vertical"}));h8.props=Object.assign(Object.assign({},ad.props),{defaultPosition:"left"});var zvt=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};const od=t=>{const{orientation:n,labelFormatter:e,style:r}=t,i=zvt(t,["orientation","labelFormatter","style"]);return({scales:[a],value:o,theme:s})=>{const{bbox:l}=o,{x:c,y:u,width:f,height:d}=l,{scrollbar:h={}}=s,{ratio:p,range:g}=a.getOptions(),y=n==="horizontal"?f:d,m=y/p,[x,_]=g,w=_>x?0:1;return new eet({className:`${so}scrollbar`,style:Object.assign({},h,Object.assign(Object.assign(Object.assign(Object.assign({},r),{x:c,y:u,trackLength:y,value:w}),i),{orientation:n,contentLength:m,viewportLength:y}))})}};od.props={defaultPosition:"bottom",defaultSize:24,defaultOrder:1,defaultCrossPadding:[12,12],defaultPadding:[12,12]};const p8=t=>od(Object.assign(Object.assign({},t),{orientation:"horizontal"}));p8.props=Object.assign(Object.assign({},od.props),{defaultPosition:"bottom"});const v8=t=>od(Object.assign(Object.assign({},t),{orientation:"vertical"}));v8.props=Object.assign(Object.assign({},od.props),{defaultPosition:"left"});const g8=t=>()=>new Qn;g8.props={};const T_=(t,n)=>{const{coordinate:r}=n;return(i,a,o)=>{const[s]=i,{transform:l="",fillOpacity:c=1,strokeOpacity:u=1,opacity:f=1}=s.style,[d,h]=Ze(r)?["left bottom",`scale(1, ${1e-4})`]:["left top",`scale(${1e-4}, 1)`],p=[{transform:`${l} ${h}`.trimStart(),transformOrigin:d,fillOpacity:0,strokeOpacity:0,opacity:0},{transform:`${l} ${h}`.trimStart(),transformOrigin:d,fillOpacity:c,strokeOpacity:u,opacity:f,offset:.01},{transform:`${l} scale(1, 1)`.trimStart(),transformOrigin:d,fillOpacity:c,strokeOpacity:u,opacity:f}];return s.animate(p,Object.assign(Object.assign({},o),t))}},Wvt=(t,n)=>{const{coordinate:r}=n;return(i,a,o)=>{const[s]=i,{transform:l="",fillOpacity:c=1,strokeOpacity:u=1,opacity:f=1}=s.style,[d,h]=Ze(r)?["left bottom",`scale(1, ${1e-4})`]:["left top",`scale(${1e-4}, 1)`],p=[{transform:`${l} scale(1, 1)`.trimStart(),transformOrigin:d},{transform:`${l} ${h}`.trimStart(),transformOrigin:d,fillOpacity:c,strokeOpacity:u,opacity:f,offset:.99},{transform:`${l} ${h}`.trimStart(),transformOrigin:d,fillOpacity:0,strokeOpacity:0,opacity:0}];return s.animate(p,Object.assign(Object.assign({},o),t))}},y8=(t,n)=>{const{coordinate:r}=n;return W5.registerProperty({name:"scaleInYRadius",inherits:!1,initialValue:"",interpolable:!0,syntax:xt.NUMBER}),(i,a,o)=>{const[s]=i,l=u=>{const{__data__:f,style:d}=u,{fillOpacity:h=1,strokeOpacity:p=1,opacity:g=1}=d,{points:y,y:m,y1:x}=f,_=il(r,y,[m,x]),{innerRadius:w,outerRadius:O}=_,S=[{scaleInYRadius:w+1e-4,fillOpacity:0,strokeOpacity:0,opacity:0},{scaleInYRadius:w+1e-4,fillOpacity:h,strokeOpacity:p,opacity:g,offset:.01},{scaleInYRadius:O,fillOpacity:h,strokeOpacity:p,opacity:g}];return u.animate(S,Object.assign(Object.assign({},o),t))},c=u=>{const{style:f}=u,{transform:d="",fillOpacity:h=1,strokeOpacity:p=1,opacity:g=1}=f,[y,m]=Ze(r)?["left top",`scale(${1e-4}, 1)`]:["left bottom",`scale(1, ${1e-4})`],x=[{transform:`${d} ${m}`.trimStart(),transformOrigin:y,fillOpacity:0,strokeOpacity:0,opacity:0},{transform:`${d} ${m}`.trimStart(),transformOrigin:y,fillOpacity:h,strokeOpacity:p,opacity:g,offset:.01},{transform:`${d} scale(1, 1)`.trimStart(),transformOrigin:y,fillOpacity:h,strokeOpacity:p,opacity:g}];return u.animate(x,Object.assign(Object.assign({},o),t))};return Ie(r)?l(s):c(s)}},Gvt=(t,n)=>{const{coordinate:r}=n;return(i,a,o)=>{const[s]=i,{transform:l="",fillOpacity:c=1,strokeOpacity:u=1,opacity:f=1}=s.style,[d,h]=Ze(r)?["left top",`scale(${1e-4}, 1)`]:["left bottom",`scale(1, ${1e-4})`],p=[{transform:`${l} scale(1, 1)`.trimStart(),transformOrigin:d},{transform:`${l} ${h}`.trimStart(),transformOrigin:d,fillOpacity:c,strokeOpacity:u,opacity:f,offset:.99},{transform:`${l} ${h}`.trimStart(),transformOrigin:d,fillOpacity:0,strokeOpacity:0,opacity:0}];return s.animate(p,Object.assign(Object.assign({},o),t))}},m8=t=>(n,e,r)=>{const[i]=n,{fillOpacity:a=1,strokeOpacity:o=1,opacity:s=1}=i.style,l=[{fillOpacity:0,strokeOpacity:0,opacity:0},{fillOpacity:a,strokeOpacity:o,opacity:s}];return i.animate(l,Object.assign(Object.assign({},r),t))};m8.props={};const b8=t=>(n,e,r)=>{const[i]=n,{fillOpacity:a=1,strokeOpacity:o=1,opacity:s=1}=i.style,l=[{fillOpacity:a,strokeOpacity:o,opacity:s},{fillOpacity:0,strokeOpacity:0,opacity:0}];return i.animate(l,Object.assign(Object.assign({},r),t))};b8.props={};const Yvt={opacity:1,strokeOpacity:1,fillOpacity:1,lineWidth:0,x:0,y:0,cx:0,cy:0,r:0,rx:0,ry:0,width:0,height:0},Hvt={[it.CIRCLE]:["cx","cy","r"],[it.ELLIPSE]:["cx","cy","rx","ry"],[it.RECT]:["x","y","width","height"],[it.IMAGE]:["x","y","width","height"],[it.LINE]:["x1","y1","x2","y2"],[it.POLYLINE]:["points"],[it.POLYGON]:["points"]};function bc(t,n,e=!1){const r={};for(const i of n){const a=t.style[i];a?r[i]=a:e&&(r[i]=Yvt[i])}return r}const Pf=["fill","stroke","fillOpacity","strokeOpacity","opacity","lineWidth"];function gb(t){const{min:n,max:e}=t.getLocalBounds(),[r,i]=n,[a,o]=e,s=o-i,l=a-r;return[r,i,l,s]}function Uvt(t){const[n,e,r,i]=t;return`
162
+ M ${n} ${e}
163
+ L ${n+r} ${e}
164
+ L ${n+r} ${e+i}
165
+ L ${n} ${e+i}
166
+ Z
167
+ `}function Vvt(t,n){const[e,r,i,a]=gb(t),o=a/i,s=Math.ceil(Math.sqrt(n/o)),l=Math.ceil(n/s),c=[],u=a/l;let f=0,d=n;for(;d>0;){const h=Math.min(d,s),p=i/h;for(let g=0;g<h;g++){const y=e+g*p,m=r+f*u;c.push(Uvt([y,m,p,u]))}d-=h,f+=1}return c}function Xvt(t="pack"){return typeof t=="function"?t:Vvt}function qvt(t,n,e){let{transform:r}=t.style;const{transform:i}=n.style;x8(n,t);let a=Pf;if(t.nodeName===it.GROUP){const[l,c,u,f]=gb(t),[d,h,p,g]=gb(n),y=l-d,m=c-h,x=u/p,_=f/g;r=`translate(${y}, ${m}) scale(${x}, ${_})`}else a=a.concat(Hvt[t.nodeName]||[]);const o=[Object.assign({transform:r??"none"},bc(t,a,!0)),Object.assign({transform:i??"none"},bc(n,a,!0))];return n.animate(o,e)}function x8(t,n){t.__data__=n.__data__,t.className=n.className,t.markType=n.markType,n.parentNode.replaceChild(t,n)}function Kvt(t,n){const{nodeName:e}=t;if(e==="path")return t;const r=new ur({style:Object.assign(Object.assign({},bc(t,Pf)),{d:n})});return x8(r,t),r}function OT(t,n){const e=t.indexOf(n),r=t.lastIndexOf(n);return e===r}function Zvt(t){return!OT(t,"m")||!OT(t,"M")}function ST(t){const n=sK(t);if(n&&!Zvt(n))return n}function ET(t){const{nodeName:n}=t;if(n==="path"){const e=zt(t,"attributes");return e.markerEnd||e.markerStart}return!1}function P_(t,n,e,r){const{nodeName:i}=n,{nodeName:a}=e,o=ST(n),s=ST(e),{opacity:l=1,strokeOpacity:c=1,fillOpacity:u=1}=n.style,{opacity:f=1,strokeOpacity:d=1,fillOpacity:h=1}=e.style,p=i===a&&i!=="path",g=o===void 0||s===void 0,y=ET(n)||ET(e);if(p||g||y)return qvt(n,e,r);const m=Kvt(t,o),x=Object.assign(Object.assign({},bc(n,Pf)),{opacity:l,strokeOpacity:c,fillOpacity:u}),_=Object.assign(Object.assign({},bc(e,Pf)),{opacity:f,strokeOpacity:d,fillOpacity:h}),w=[x,_];if(o!==s){w[0].d=o,w[1].d=s;const O=m.animate(w,r);return O.onfinish=()=>{Qv(m,e),m.style.d=s,m.style.transform="none"},m.style.transform="none",O}return Zu(x,_)?null:m.animate(w,r)}function Qvt(t,n,e,r){t.style.visibility="hidden";const i=r(t,n.length);return n.map((a,o)=>{const s=new ur({style:Object.assign({d:i[o]},bc(t,Pf))});return P_(a,s,a,e)})}function Jvt(t,n,e,r){const i=r(n,t.length),{fillOpacity:a=1,strokeOpacity:o=1,opacity:s=1}=n.style,l=[{fillOpacity:0,strokeOpacity:0,opacity:0},{fillOpacity:0,strokeOpacity:0,opacity:0,offset:.99},{fillOpacity:a,strokeOpacity:o,opacity:s}],c=n.animate(l,e);return[...t.map((f,d)=>{const h=new ur({style:{d:i[d],fill:n.style.fill}});return P_(f,f,h,e)}),c]}const _8=t=>(n,e,r)=>{const i=Xvt(t.split),a=Object.assign(Object.assign({},r),t),{length:o}=n,{length:s}=e;if(o===1&&s===1||o>1&&s>1){const[l]=n,[c]=e;return P_(l,l,c,a)}if(o===1&&s>1){const[l]=n;return Qvt(l,e,a,i)}if(o>1&&s===1){const[l]=e;return Jvt(n,l,a,i)}return null};_8.props={};const w8=(t,n)=>{W5.registerProperty({name:"waveInArcAngle",inherits:!1,initialValue:"",interpolable:!0,syntax:xt.NUMBER});const{coordinate:r}=n;return(i,a,o)=>{const[s]=i;if(!Ie(r))return T_(t,n)(i,a,o);const{__data__:l,style:c}=s,{radius:u=0,inset:f=0,fillOpacity:d=1,strokeOpacity:h=1,opacity:p=1}=c,{points:g,y,y1:m}=l,x=vx().cornerRadius(u).padAngle(f*Math.PI/180),_=il(r,g,[y,m]),{startAngle:w,endAngle:O}=_,S=[{waveInArcAngle:w+1e-4,fillOpacity:0,strokeOpacity:0,opacity:0},{waveInArcAngle:w+1e-4,fillOpacity:d,strokeOpacity:h,opacity:p,offset:.01},{waveInArcAngle:O,fillOpacity:d,strokeOpacity:h,opacity:p}],E=s.animate(S,Object.assign(Object.assign({},o),t));return E.onframe=function(){s.style.d=x(Object.assign(Object.assign({},_),{endAngle:Number(s.style.waveInArcAngle)}))},E.onfinish=function(){s.style.d=x(Object.assign(Object.assign({},_),{endAngle:O}))},E}};w8.props={};const t0t=t=>(e,r,i)=>{const[a]=e,{transform:o="",fillOpacity:s=1,strokeOpacity:l=1,opacity:c=1}=a.style,u="center center",f=[{transform:`${o} scale(${1e-4})`.trimStart(),transformOrigin:u,fillOpacity:0,strokeOpacity:0,opacity:0},{transform:`${o} scale(${1e-4})`.trimStart(),transformOrigin:u,fillOpacity:s,strokeOpacity:l,opacity:c,offset:.01},{transform:`${o} scale(1)`.trimStart(),transformOrigin:u,fillOpacity:s,strokeOpacity:l,opacity:c}];return a.animate(f,Object.assign(Object.assign({},i),t))},e0t=t=>(e,r,i)=>{const[a]=e,{transform:o="",fillOpacity:s=1,strokeOpacity:l=1,opacity:c=1}=a.style,u="center center",f=[{transform:`${o} scale(1)`.trimStart(),transformOrigin:u},{transform:`${o} scale(${1e-4})`.trimStart(),transformOrigin:u,fillOpacity:s,strokeOpacity:l,opacity:c,offset:.99},{transform:`${o} scale(${1e-4})`.trimStart(),transformOrigin:u,fillOpacity:0,strokeOpacity:0,opacity:0}];return a.animate(f,Object.assign(Object.assign({},i),t))},O8=t=>(n,e,r)=>{var i,a;const[o]=n,s=((a=(i=o).getTotalLength)===null||a===void 0?void 0:a.call(i))||0,l=[{lineDash:[0,s]},{lineDash:[s,0]}];return o.animate(l,Object.assign(Object.assign({},r),t))};O8.props={};const S8=(t,n)=>(e,r,i)=>{const[a]=e,{min:[o,s],halfExtents:l}=a.getLocalBounds(),c=l[0]*2,u=l[1]*2,f=new ur({style:{d:`M${o},${s}L${o+c},${s}L${o+c},${s+u}L${o},${s+u}Z`}});return a.appendChild(f),a.style.clipPath=f,T_(t,n)([f],r,i)};S8.props={};const E8=(t,n)=>(e,r,i)=>{const[a]=e,{min:[o,s],halfExtents:l}=a.getLocalBounds(),c=l[0]*2,u=l[1]*2,f=new ur({style:{d:`M${o},${s}L${o+c},${s}L${o+c},${s+u}L${o},${s+u}Z`}});return a.appendChild(f),a.style.clipPath=f,y8(t,n)([f],r,i)};E8.props={};var n0t=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};function r0t(t,{elements:n,datum:e,groupKey:r=p=>p,regionGroupKey:i=p=>p,link:a=!1,background:o=!1,delay:s=60,scale:l,coordinate:c,emitter:u,state:f={},region:d=!1,regionEleFilter:h=p=>S_.includes(p.markType)}){var p,g;const y=(p=n(t))!==null&&p!==void 0?p:[],m=d?y.filter(h):y,x=new Set(m),_=d?i:r,w=Ue(m,_),O=J6({elementsof:n,root:t,coordinate:c,scale:l}),S=Pc(m,e),[E,M]=q6(Object.assign({elements:m,valueof:S,link:a,coordinate:c},bt(f.active,"link"))),[A,T,P]=Z6(Object.assign({document:t.ownerDocument,scale:l,coordinate:c,background:o,valueof:S},bt(f.active,"background"))),N=at(f,{active:Object.assign({},((g=f.active)===null||g===void 0?void 0:g.offset)&&{transform:(...q)=>{const J=f.active.offset(...q),[,rt]=q;return K6(m[rt],J,c)}})}),C=O_(N,m),{updateState:R,removeState:D,hasState:F}=C(S);let j;const I=q=>{const{nativeEvent:J=!0}=q;let rt=q.target;if(d&&(rt=O(q)),!x.has(rt))return;j&&clearTimeout(j);const K=_(rt),ot=w.get(K),vt=new Set(ot);for(const yt of m)vt.has(yt)?F(yt,"active")||R(yt,"active"):(R(yt,"inactive"),M(yt)),yt!==rt&&T(yt);A(rt),E(ot),J&&u.emit("element:highlight",{nativeEvent:J,data:{data:e(rt),group:ot.map(e)}})},$=()=>{j&&clearTimeout(j),j=setTimeout(()=>{z(),j=null},s)},z=(q=!0)=>{for(const J of m)D(J,"active","inactive"),T(J),M(J);q&&u.emit("element:unhighlight",{nativeEvent:q})},Y=q=>{let J=q.target;if(d&&(J=O(q)),!J){s>0?$():z();return}o&&!P(J)||!o&&!x.has(J)||(s>0?$():z())},H=()=>{z()};t.addEventListener("pointerover",I),t.addEventListener("pointermove",I),t.addEventListener("pointerout",Y),t.addEventListener("pointerleave",H);const V=q=>{const{nativeEvent:J}=q;J||z(!1)},Z=q=>{const{nativeEvent:J}=q;if(J)return;const{data:rt}=q.data,K=W0(m,rt,e);K&&I({target:K,nativeEvent:!1})};return u.on("element:highlight",Z),u.on("element:unhighlight",V),()=>{t.removeEventListener("pointerover",I),t.removeEventListener("pointermove",I),t.removeEventListener("pointerout",Y),t.removeEventListener("pointerleave",H),u.off("element:highlight",Z),u.off("element:unhighlight",V);for(const q of m)T(q),M(q)}}function G0(t){var{delay:n,createGroup:e,createRegionGroup:r,background:i=!1,link:a=!1}=t,o=n0t(t,["delay","createGroup","createRegionGroup","background","link"]);return(s,l,c)=>{const{container:u,view:f,options:d}=s,{scale:h,coordinate:p}=f,g=Li(u);return r0t(g,Object.assign({elements:io,datum:Yo(f),groupKey:e?e(f):void 0,regionGroupKey:r?r(f):rd(),coordinate:p,scale:h,state:Ks(d,[["active",i?{}:{lineWidth:"1",stroke:"#000"}],"inactive"]),background:i,link:a,delay:n,emitter:c},o))}}G0.props={reapplyWhenUpdate:!0};function k8(t){return G0(Object.assign(Object.assign({},t),{createGroup:rd}))}k8.props={reapplyWhenUpdate:!0};function M8(t){return G0(Object.assign(Object.assign({},t),{createGroup:V6}))}M8.props={reapplyWhenUpdate:!0};var i0t=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};function a0t(t,{elements:n,datum:e,groupKey:r=g=>g,scaleFactor:i=1.04,shadow:a=!0,shadowColor:o="rgba(0, 0, 0, 0.4)",shadowBlur:s=10,shadowOffsetX:l=0,shadowOffsetY:c=2,zIndex:u=10,delay:f=60,emitter:d,state:h={},coordinate:p}){const g=()=>{var I;return(I=n(t))!==null&&I!==void 0?I:[]},y=g(),m=Pc(y,e),x=at(h,{active:{}}),_=O_(x,y),{updateState:w,removeState:O,hasState:S}=_(m),E=new Map;let M;const A=I=>{if(E.has(I))return;const $=I.style.transform||"",z=I.style.transformOrigin||"",Y=$==="none"?"":$;if(E.set(I,{transform:$,transformOrigin:z,zIndex:I.style.zIndex||0,shadowColor:I.style.shadowColor||"",shadowBlur:I.style.shadowBlur||0,shadowOffsetX:I.style.shadowOffsetX||0,shadowOffsetY:I.style.shadowOffsetY||0}),p&&Ie(p)&&!Y){const V=p.getCenter();I.style.transformOrigin=`${V[0]}px ${V[1]}px`}const H=`scale(${i})`;I.style.transform=Y?`${Y} ${H}`:H,I.style.zIndex=u,a&&(I.style.shadowColor=o,I.style.shadowBlur=s,I.style.shadowOffsetX=l,I.style.shadowOffsetY=c)},T=I=>{const $=E.get(I);$&&(I.style.transform=$.transform,I.style.transformOrigin=$.transformOrigin,I.style.zIndex=$.zIndex,I.style.shadowColor=$.shadowColor,I.style.shadowBlur=$.shadowBlur,I.style.shadowOffsetX=$.shadowOffsetX,I.style.shadowOffsetY=$.shadowOffsetY,E.delete(I))},P=I=>{const{nativeEvent:$=!0}=I,z=I.target,Y=g();if(!new Set(Y).has(z))return;M&&clearTimeout(M);const V=Ue(Y,r),Z=r(z),q=V.get(Z);if(!q)return;const J=new Set(q);for(const rt of Y)J.has(rt)||(O(rt,"active"),T(rt));for(const rt of q)S(rt,"active")||w(rt,"active"),A(rt);$&&d.emit("element:hoverscale",{nativeEvent:$,data:{data:e(z),group:q.map(e)}})},N=()=>{M&&clearTimeout(M),M=setTimeout(()=>{C(),M=null},f)},C=(I=!0)=>{const $=g();for(const z of $)O(z,"active"),T(z);I&&d.emit("element:unhoverscale",{nativeEvent:I})},R=()=>{f>0?N():C()},D=()=>{C()};t.addEventListener("pointerover",P),t.addEventListener("pointermove",P),t.addEventListener("pointerout",R),t.addEventListener("pointerleave",D);const F=I=>{const{nativeEvent:$}=I;$||C(!1)},j=I=>{const{nativeEvent:$}=I;if($)return;const{data:z}=I.data,Y=g(),H=W0(Y,z,e);H&&P({target:H,nativeEvent:!1})};return d.on("element:hoverscale",j),d.on("element:unhoverscale",F),()=>{t.removeEventListener("pointerover",P),t.removeEventListener("pointermove",P),t.removeEventListener("pointerout",R),t.removeEventListener("pointerleave",D),d.off("element:hoverscale",j),d.off("element:unhoverscale",F);const I=g();for(const $ of I)T($);E.clear()}}function A8(t){var{delay:n,createGroup:e,scale:r,shadow:i,shadowColor:a,shadowBlur:o,shadowOffsetX:s,shadowOffsetY:l,zIndex:c}=t,u=i0t(t,["delay","createGroup","scale","shadow","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","zIndex"]);return(f,d,h)=>{const{container:p,view:g,options:y}=f,m=Li(p),x=Yo(g),{coordinate:_}=g;return a0t(m,Object.assign({elements:io,datum:x,groupKey:e?w=>e(g)(x(w)):void 0,state:Ks(y,["active"]),scaleFactor:r,shadow:i,shadowColor:a,shadowBlur:o,shadowOffsetX:s,shadowOffsetY:l,zIndex:c,delay:n,emitter:h,coordinate:_},u))}}A8.props={reapplyWhenUpdate:!0};var o0t=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};function s0t(t,{elements:n,datum:e,groupKey:r=g=>g,regionGroupKey:i=g=>g,link:a=!1,single:o=!1,multipleSelectHotkey:s,coordinate:l,background:c=!1,scale:u,emitter:f,state:d={},region:h=!1,regionEleFilter:p=g=>S_.includes(g.markType)}){var g;const y=n(t),m=new Set(y),x=J6({elementsof:n,root:t,coordinate:l,scale:u}),_=Ue(y,r),w=Ue(y,i),O=Pc(y,e),[S,E]=q6(Object.assign({link:a,elements:y,valueof:O,coordinate:l},bt(d.selected,"link"))),[M,A]=Z6(Object.assign({document:t.ownerDocument,background:c,coordinate:l,scale:u,valueof:O},bt(d.selected,"background"))),T=at(d,{selected:Object.assign({},((g=d.selected)===null||g===void 0?void 0:g.offset)&&{transform:(...K)=>{const ot=d.selected.offset(...K),[,vt]=K;return K6(y[vt],ot,l)}})}),P=O_(T,y),{updateState:N,removeState:C,hasState:R}=P(O);let D=!o,F=null;const j=(K=!0)=>{for(const ot of y)C(ot,"selected","unselected"),E(ot),A(ot);K&&f.emit("element:unselect",{nativeEvent:!0})},I=({event:K,element:ot,nativeEvent:vt=!0,filter:yt=Ot=>!0,groupBy:mt=r,groupMap:wt=_})=>{const Ot=y.filter(yt);if(R(ot,"selected"))j();else{const At=mt(ot),$t=wt.get(At),kt=new Set($t);for(const Mt of Ot)kt.has(Mt)?N(Mt,"selected"):(N(Mt,"unselected"),E(Mt)),Mt!==ot&&A(Mt);if(S($t),M(ot),!vt)return;f.emit("element:select",Object.assign(Object.assign({},K),{nativeEvent:vt,data:{data:[e(ot),...$t.map(e)]}}))}},$=({event:K,element:ot,nativeEvent:vt=!0,filter:yt=Ot=>!0,groupBy:mt=r,groupMap:wt=_})=>{const Ot=mt(ot),At=wt.get(Ot),$t=new Set(At),kt=y.filter(yt);if(R(ot,"selected")){if(!y.some(Ct=>!$t.has(Ct)&&R(Ct,"selected")))return j();for(const Ct of At)N(Ct,"unselected"),E(Ct),A(Ct)}else{const Mt=At.some(Ct=>R(Ct,"selected"));for(const Ct of kt)$t.has(Ct)?N(Ct,"selected"):R(Ct,"selected")||N(Ct,"unselected");!Mt&&a&&S(At),M(ot)}vt&&f.emit("element:select",Object.assign(Object.assign({},K),{nativeEvent:vt,data:{data:y.filter(Mt=>R(Mt,"selected")).map(e)}}))},z=K=>{if(m.has(K))return!0;for(const ot of m)if(Af(ot,yt=>yt===K))return!0;return!1},Y=K=>{if(m.has(K))return K;for(const ot of m){let vt=null;if(Af(ot,yt=>{yt===K&&(vt=ot)}),vt)return vt}return K},H=K=>{const{target:ot,nativeEvent:vt=!0}=K,yt=D?$:I;let mt=ot;const wt=z(ot);return!h||wt?wt?yt({event:K,element:Y(mt),nativeEvent:vt,groupBy:r}):j():(mt=x(K),m.has(mt)?yt({event:K,element:mt,nativeEvent:vt,filter:p,groupBy:i,groupMap:w}):j())},V=Array.isArray(s)?s:[s],Z=K=>{V.includes(K.code)&&!F&&(F=K.code,D=!0)},q=K=>{K.code===F&&(F=null,D=!1)};t.addEventListener("click",H),s&&(D=!1,document.addEventListener("keydown",Z),document.addEventListener("keyup",q));const J=K=>{const{nativeEvent:ot,data:vt}=K;if(ot)return;const yt=D?vt.data:vt.data.slice(0,1);for(const mt of yt){const wt=W0(y,mt,e);H({target:wt,nativeEvent:!1})}},rt=()=>{j(!1)};return f.on("element:select",J),f.on("element:unselect",rt),()=>{for(const K of y)E(K);t.removeEventListener("click",H),s&&(document.removeEventListener("keydown",Z),document.removeEventListener("keyup",q)),f.off("element:select",J),f.off("element:unselect",rt)}}function Y0(t){var{createGroup:n,createRegionGroup:e,background:r=!1,link:i=!1}=t,a=o0t(t,["createGroup","createRegionGroup","background","link"]);return(o,s,l)=>{const{container:c,view:u,options:f}=o,{coordinate:d,scale:h}=u,p=Li(c);return s0t(p,Object.assign({elements:io,datum:Yo(u),groupKey:n?n(u):void 0,regionGroupKey:e?e(u):rd(),coordinate:d,scale:h,state:Ks(f,[["selected",r?{}:{lineWidth:"1",stroke:"#000"}],"unselected"]),background:r,link:i,emitter:l},a))}}Y0.props={reapplyWhenUpdate:!0};function T8(t){return Y0(Object.assign(Object.assign({},t),{createGroup:rd}))}T8.props={reapplyWhenUpdate:!0};function P8(t){return Y0(Object.assign(Object.assign({},t),{createGroup:V6}))}P8.props={reapplyWhenUpdate:!0};var l0t=function(t,n,e,r){function i(a){return a instanceof e?a:new e(function(o){o(a)})}return new(e||(e=Promise))(function(a,o){function s(u){try{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?a(u.value):i(u.value).then(s,l)}c((r=r.apply(t,n||[])).next())})},c0t=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};function u0t(t){const{transform:n=[]}=t,e=n.find(i=>i.type==="normalizeY");if(e)return e;const r={type:"normalizeY"};return n.push(r),t.transform=n,r}function f0t(t,n,e){const[r]=Array.from(t.entries()).filter(([i])=>i.type===n).map(([i])=>{const{encode:a}=i,o=s=>{const l=a[s];return[s,l?l.value:void 0]};return Object.fromEntries(e.map(o))});return r}function C8(t){var{wait:n=20,leading:e,trailing:r=!1,labelFormatter:i=o=>`${o}`}=t,a=c0t(t,["wait","leading","trailing","labelFormatter"]);return o=>{const{view:s,container:l,update:c,setState:u}=o,{markState:f,scale:d,coordinate:h}=s,p=f0t(f,"line",["x","y","series"]);if(!p)return;const{y:g,x:y,series:m=[]}=p,x=g.map((j,I)=>I),_=Hi(x.map(j=>y[j])),w=Li(l),O=l.getElementsByClassName(oa),S=l.getElementsByClassName(F1),M=Ue(S,j=>j.__data__.key.split("-")[0]),A=new nl({style:Object.assign({x1:0,y1:0,x2:0,y2:w.getAttribute("height"),stroke:"black",lineWidth:1},bt(a,"rule"))}),T=new ki({style:Object.assign({x:0,y:w.getAttribute("height"),text:"",fontSize:10},bt(a,"label"))});A.append(T),w.appendChild(A);const P=(j,I,$)=>{const[z]=j.invert($),Y=I.invert(z);return _[pH(_,Y)]},N=(j,I)=>{A.setAttribute("x1",j[0]),A.setAttribute("x2",j[0]),T.setAttribute("text",i(I))};let C;const R=j=>l0t(this,void 0,void 0,function*(){const{x:I}=d,$=P(h,I,j);N(j,$),u("chartIndex",Y=>{const H=at({},Y),V=H.marks.find(K=>K.type==="line"),q=Re(Xb(x,K=>Re(K,ot=>+g[ot])/ti(K,ot=>+g[ot]),K=>m[K]).values()),J=[1/q,q];at(V,{scale:{y:{domain:J}}});const rt=u0t(V);rt.groupBy="color",rt.basis=(K,ot)=>{const vt=K[Xa(yt=>y[+yt]).center(K,$)];return ot[vt]};for(const K of H.marks)K.animate=!1;return H}),C=(yield c("chartIndex")).view}),D=j=>{const{scale:I,coordinate:$}=C,{x:z,y:Y}=I,H=P($,z,j);N(j,H);for(const V of O){const{seriesIndex:Z,key:q}=V.__data__,J=Z[Xa(wt=>y[+wt]).center(Z,H)],rt=[0,Y.map(1)],K=[0,Y.map(g[J]/g[Z[0]])],[,ot]=$.map(rt),[,vt]=$.map(K),yt=ot-vt;V.setAttribute("transform",`translate(0, ${yt})`);const mt=M.get(q)||[];for(const wt of mt)wt.setAttribute("dy",yt)}},F=Fs(j=>{const I=qs(w,j);I&&D(I)},n,{leading:e,trailing:r});return R([0,0]),w.addEventListener("pointerenter",F),w.addEventListener("pointermove",F),w.addEventListener("pointerleave",F),()=>{A.remove(),w.removeEventListener("pointerenter",F),w.removeEventListener("pointermove",F),w.removeEventListener("pointerleave",F)}}}C8.props={reapplyWhenUpdate:!0};function d0t(t){const{coordinate:n={}}=t,{transform:e=[]}=n,r=e.find(a=>a.type==="fisheye");if(r)return r;const i={type:"fisheye"};return e.push(i),n.transform=e,t.coordinate=n,i}function h0t({wait:t=30,leading:n,trailing:e=!1}){return r=>{const{options:i,update:a,setState:o,container:s}=r,l=Li(s),c=Fs(u=>{const f=qs(l,u);if(!f){o("fisheye"),a();return}o("fisheye",d=>{const h=at({},d,{interaction:{tooltip:{preserve:!0}}});for(const m of h.marks)m.animate=!1;const[p,g]=f,y=d0t(h);return y.focusX=p,y.focusY=g,y.visual=!0,h}),a()},t,{leading:n,trailing:e});return l.addEventListener("pointerenter",c),l.addEventListener("pointermove",c),l.addEventListener("pointerleave",c),()=>{l.removeEventListener("pointerenter",c),l.removeEventListener("pointermove",c),l.removeEventListener("pointerleave",c)}}}var Ho=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};const Va="tooltipLocked";function kv(t,n){var e;if(n)return typeof n=="string"?document.querySelector(n):n;const r=(e=t.ownerDocument)===null||e===void 0?void 0:e.defaultView;return r?r.getContextService().getDomElement().parentElement:void 0}function p0t(t){const n=t.getRenderBounds(),{min:[e,r],max:[i,a]}=n;return{x:e,y:r,width:i-e,height:a-r}}function v0t(t,n){const e=t.getBoundingClientRect(),r=n.getBoundingClientRect();return{x:e.x-r.x,y:e.y-r.y}}function g0t(t,n,e,r,i,a,o,s={},l=[10,10]){const c={[Ms("tooltip")]:{},[Ms("tooltip-title")]:{overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"}},u=new Wnt({className:"tooltip",style:{x:n,y:e,container:o,data:[],bounding:a,position:r,enterable:i,title:"",offset:l,template:{prefixCls:so},style:at(c,s)}});return t.appendChild(u.HTMLTooltipElement),u}function L8({root:t,data:n,x:e,y:r,render:i,event:a,single:o,position:s="right-bottom",enterable:l=!1,css:c,mount:u,bounding:f,offset:d}){const h=kv(t,u),p=kv(t),g=o?p:t,y=f||p0t(t),m=v0t(p,h),{tooltipElement:x=g0t(h,e,r,s,l,y,m,c,d)}=g,{items:_,title:w=""}=n;x.update(Object.assign({x:e,y:r,data:_.map(O=>Object.assign(Object.assign({},O),{value:!O.value&&O.value!==0?"":O.value})),title:w,position:s,enterable:l,container:m},i!==void 0&&{content:i(a,{items:_,title:w})})),g.tooltipElement=x}function ko({root:t,single:n,emitter:e,nativeEvent:r=!0,event:i=null}){r&&e.emit("tooltip:hide",{nativeEvent:r});const a=kv(t),o=n?a:t,{tooltipElement:s}=o;s&&s.hide(i==null?void 0:i.clientX,i==null?void 0:i.clientY),R8(t),I8(t),D8(t)}function yb({root:t,single:n}){const e=kv(t),r=n?e:t;if(!r)return;const{tooltipElement:i}=r;i&&(i.destroy(),r.tooltipElement=void 0),R8(t),I8(t),D8(t)}function C_(t){const{value:n}=t;return Object.assign(Object.assign({},t),{value:n===void 0?"undefined":n})}function y0t(t){var n,e,r,i,a,o,s;const{__data__:l}=t,{title:c,items:u=[]}=l;if(u.some(S=>m_ in S)){const S=u.filter(Xe).map(E=>{var{color:M=L_(t)}=E,A=Ho(E,["color"]);return Object.assign(Object.assign({},A),{color:M})}).map(C_);return Object.assign(Object.assign({},c&&{title:c}),{items:S})}const d=(e=(n=l==null?void 0:l.normalized)===null||n===void 0?void 0:n.x)!==null&&e!==void 0?e:0,h=(r=t.parentNode)===null||r===void 0?void 0:r.__data__,p=(i=h==null?void 0:h.encode)!==null&&i!==void 0?i:{},{x:g={},y={},color:m={}}=p,{value:x=[]}=g,{value:_=[]}=y,{value:w=[]}=m,O=Math.min(Math.round(x.length*d),x.length-1);return{title:`${x[O]}, ${_[O]}`,items:[{name:(a=m.field)!==null&&a!==void 0?a:"value",value:w[O],color:((o=t.style)===null||o===void 0?void 0:o.fill)||((s=t.getAttribute)===null||s===void 0?void 0:s.call(t,"color"))||"#000"}]}}function m0t(t){const{__data__:n}=t;if(Zv(t))return y0t(t);const{title:e,items:r=[]}=n,i=r.filter(Xe).map(a=>{var{color:o=L_(t)}=a,s=Ho(a,["color"]);return Object.assign(Object.assign({},s),{color:o})}).map(C_);return Object.assign(Object.assign({},e&&{title:e}),{items:i})}function L_(t){const n=t.getAttribute("fill"),e=t.getAttribute("stroke"),{__data__:r}=t,{color:i=n&&n!=="transparent"?n:e}=r;return i}function kT(t,n=e=>e){const e=new Map(t.map(r=>[n(r),r]));return Array.from(e.values())}function N8(t,n,e,r=t.map(a=>a.__data__),i={}){const a=l=>l instanceof Date?+l:l,o=kT(r.map(l=>l.title),a).filter(Xe),s=r.flatMap((l,c)=>{const u=l.element||t[c],{items:f=[],title:d}=l,h=f.filter(Xe),p=e!==void 0?e:f.length<=1;return h.map(g=>{var{color:y=L_(u)||i.color,name:m}=g,x=Ho(g,["color","name"]);const _=iV(n,l),w=p&&!(m_ in x)?_||m:m||_;return Object.assign(Object.assign({},x),{color:y,name:w||d})})}).map(C_);return Object.assign(Object.assign({},o.length>0&&{title:o.join(",")}),{items:kT(s,l=>`(${a(l.name)}, ${a(l.value)}, ${a(l.color)})`)})}function b0t(t,n,e,r){var{plotWidth:i,plotHeight:a,mainWidth:o,mainHeight:s,startX:l,startY:c,transposed:u,polar:f,insetLeft:d,insetTop:h}=r,p=Ho(r,["plotWidth","plotHeight","mainWidth","mainHeight","startX","startY","transposed","polar","insetLeft","insetTop"]);const g=Object.assign({lineWidth:1,stroke:"#1b1e23",strokeOpacity:.5},p),y=(S,E,M)=>{const A=new Sa({style:Object.assign({cx:S,cy:E,r:M},g)});return t.appendChild(A),A},m=(S,E,M,A)=>{const T=new nl({style:Object.assign({x1:S,x2:E,y1:M,y2:A},g)});return t.appendChild(T),T},_=((S,E)=>{if(E.length===1)return E[0];const M=E.map(T=>vn(T,S)),A=Bf(M,T=>T);return E[A]})(e,n),w=()=>u?[l+_[0],l+_[0],c,c+a]:[l,l+i,_[1]+c,_[1]+c],O=()=>{const S=l+d+o/2,E=c+h+s/2,M=vn([S,E],_);return[S,E,M]};if(f){const[S,E,M]=O(),A=t.ruleX||y(S,E,M);A.style.cx=S,A.style.cy=E,A.style.r=M,t.ruleX=A}else{const[S,E,M,A]=w(),T=t.ruleX||m(S,E,M,A);T.style.x1=S,T.style.x2=E,T.style.y1=M,T.style.y2=A,t.ruleX=T}}function x0t(t,n,e){var{plotWidth:r,plotHeight:i,mainWidth:a,mainHeight:o,startX:s,startY:l,transposed:c,polar:u,insetLeft:f,insetTop:d}=e,h=Ho(e,["plotWidth","plotHeight","mainWidth","mainHeight","startX","startY","transposed","polar","insetLeft","insetTop"]);const p=Object.assign({lineWidth:1,stroke:"#1b1e23",strokeOpacity:.5},h),g=n.map(A=>A[1]),y=n.map(A=>A[0]),m=nf(g),x=nf(y),_=()=>{if(u){const A=Math.min(a,o)/2,T=s+f+a/2,P=l+d+o/2,N=Ei(On([x,m],[T,P])),C=T+A*Math.cos(N),R=P+A*Math.sin(N);return[T,C,P,R]}return c?[s,s+r,m+l,m+l]:[x+s,x+s,l,l+i]},[w,O,S,E]=_(),M=()=>{const A=new nl({style:Object.assign({x1:w,x2:O,y1:S,y2:E},p)});return t.appendChild(A),A};if(y.length>0){const A=t.ruleY||M();A.style.x1=w,A.style.x2=O,A.style.y1=S,A.style.y2=E,t.ruleY=A}}function R8(t){t.ruleY&&(t.ruleY.remove(),t.ruleY=void 0)}function I8(t){t.ruleX&&(t.ruleX.remove(),t.ruleX=void 0)}function _0t(t,{data:n,style:e,theme:r}){t.markers&&t.markers.forEach(o=>o.remove());const{type:i=""}=e,a=n.filter(o=>{const[{x:s,y:l}]=o;return Xe(s)&&Xe(l)}).map(o=>{const[{color:s,element:l},c]=o,u=s||l.style.fill||l.style.stroke||r.color,f=i==="hollow"?"transparent":u,d=i==="hollow"?u:"#fff";return new Sa({className:`${so}tooltip-marker`,style:Object.assign({cx:c[0],cy:c[1],fill:f,r:4,stroke:d,lineWidth:2,pointerEvents:"none"},e)})});for(const o of a)t.appendChild(o);t.markers=a}function D8(t){t.markers&&(t.markers.forEach(n=>n.remove()),t.markers=[])}function MT(t,n){return Array.from(t.values()).some(e=>{var r;return(r=e.interaction)===null||r===void 0?void 0:r[n]})}function aa(t,n){return t===void 0?n:t}function $8(t){const{title:n,items:e}=t;return e.length===0&&n===void 0}function w0t(t){return Array.from(t.values()).some(n=>{var e;return((e=n.interaction)===null||e===void 0?void 0:e.seriesTooltip)&&n.tooltip})}function O0t(t,n){const{innerWidth:e,innerHeight:r,marginLeft:i,paddingLeft:a,insetLeft:o,marginTop:s,paddingTop:l,insetTop:c}=t.getOptions();return{x:(n.x-i-a-o)/e,y:(n.y-s-l-c)/r}}function S0t(t){const{x:n}=t;if(!n||!n.valueBandWidth)return!0;const{valueBandWidth:e}=n;return Qe(e)?!0:new Set(e.values()).size===1}function E0t(t,n){const{adjustedRange:e,valueBandWidth:r,valueStep:i}=t,a=Array.from(r.values()),o=Array.from(i.values()),l=e.map((c,u)=>{const f=(o[u]-a[u])/2;return[c-f,c+a[u]+f]}).findIndex(([c,u])=>c<=n&&n<=u);return l!==-1?l:n>.5?e.length-1:0}function j8({root:t,event:n,elements:e=[],coordinate:r,scale:i,shared:a}){var o,s;const l=_=>_.markType==="interval",c=_=>D2.includes(_.markType),u=e.filter(_=>!c(_)),f=u.length>0&&u.every(l)&&!Ie(r),d=i.x,h=S0t(i),p=i.series,g=(s=(o=d==null?void 0:d.getBandWidth)===null||o===void 0?void 0:o.call(d))!==null&&s!==void 0?s:0,y=p&&p.valueBandWidth?_=>{const w=Math.round(1/p.valueBandWidth);return _.__data__.x+_.__data__.series*g+g/(w*2)}:_=>_.__data__.x+g/2;f&&u.sort((_,w)=>y(_)-y(w));const m=_=>{const{target:w=Qr(e)}=_;return id(w,O=>O.classList?(Zv(O)&&Hv(O,"__data__.normalized",O0t(r,{x:_.offsetX,y:_.offsetY})),O.classList.includes("element")):!1)};return(f?_=>{const w=qs(t,_);if(!w)return;const[O]=r.invert(w),S=Xa(y).center,E=h?S(u,O):E0t(d,O),M=u[E];if(!a){const A=u.find(T=>T!==M&&y(T)===y(M));if(A)return m(_)||A}return M}:m)(n)}function F8({root:t,event:n,elements:e,coordinate:r,scale:i,startX:a,startY:o}){const s=Ze(r),l=[],c=[];for(const j of e){if(D2.includes(j.markType))continue;const{__data__:I}=j,{seriesX:$,title:z,items:Y}=I;$?l.push(j):(z||Y)&&c.push(j)}const u=j=>j.markType==="interval",f=c.length&&c.every(u)&&!Ie(r),d=j=>j.__data__.x,p=!!i.x.getBandWidth&&c.length>0;l.sort((j,I)=>{const $=s?0:1,z=Y=>Y.getBounds().min[$];return s?z(I)-z(j):z(j)-z(I)});const g=j=>{const I=s?1:0,{min:$,max:z}=j.getLocalBounds();return Hi([$[I],z[I]])};f?c.sort((j,I)=>d(j)-d(I)):c.sort((j,I)=>{const[$,z]=g(j),[Y,H]=g(I),V=($+z)/2,Z=(Y+H)/2;return s?Z-V:V-Z});const y=new Map(l.map(j=>{const{__data__:I}=j,{seriesX:$}=I,z=$.map((H,V)=>V),Y=Hi(z,H=>$[+H]);return[j,[Y,$]]})),{x:m}=i,x=m!=null&&m.getBandWidth?m.getBandWidth()/2:0,_=j=>{const[I]=r.invert(j);return I-x},w=(j,I,$,z)=>{const{_x:Y}=j,H=Y!==void 0?m.map(Y):_(I),V=z.filter(Xe),[Z,q]=Hi([V[0],V[V.length-1]]),J=Z===q;if(!p&&(H<Z||H>q)&&!J)return null;const rt=Xa(ot=>z[+ot]).center,K=rt($,H);return $[K]},O=f?(j,I)=>{const $=Xa(d).center,z=$(I,_(j)),Y=I[z];return Ue(I,d).get(d(Y))}:(j,I)=>{const z=j[s?1:0],Y=I.filter(Z=>{const[q,J]=g(Z);return z>=q&&z<=J});if(!p||Y.length>0)return Y;const H=Xa(Z=>{const[q,J]=g(Z);return(q+J)/2}).center,V=H(I,z);return[I[V]].filter(Xe)},S=(j,I)=>{const{__data__:$}=j;return Object.fromEntries(Object.entries($).filter(([z])=>z.startsWith("series")&&z!=="series").map(([z,Y])=>{const H=Y[I];return[FP(z.replace("series","")),H]}))},E=qs(t,n);if(!E)return;const M=[E[0]-a,E[1]-o];if(!M)return;const A=O(M,c),T=[],P=[];for(const j of l){const[I,$]=y.get(j),z=w(n,M,I,$);if(z!==null){T.push(j);const Y=S(j,z),{x:H,y:V}=Y,Z=r.map([(H||0)+x,V||0]);P.push([Object.assign(Object.assign({},Y),{element:j}),Z])}}const N=Array.from(new Set(P.map(j=>j[0].x))),C=N[Bf(N,j=>Math.abs(j-_(M)))],R=P.filter(j=>j[0].x===C),D=[...R.map(j=>j[0]),...A.map(j=>j.__data__)];return{selectedElements:[...T,...A],selectedData:D,filteredSeriesData:R,abstractX:_}}function AT(t,n){var{elements:e,sort:r,filter:i,scale:a,coordinate:o,crosshairs:s,crosshairsX:l,crosshairsY:c,render:u,groupName:f,emitter:d,wait:h=50,leading:p=!0,trailing:g=!1,startX:y=0,startY:m=0,body:x=!0,single:_=!0,position:w,enterable:O,mount:S,bounding:E,theme:M,offset:A,disableNative:T=!1,marker:P=!0,preserve:N=!1,style:C={},css:R={},clickLock:D=!1,disableAutoHide:F=!1}=n,j=Ho(n,["elements","sort","filter","scale","coordinate","crosshairs","crosshairsX","crosshairsY","render","groupName","emitter","wait","leading","trailing","startX","startY","body","single","position","enterable","mount","bounding","theme","offset","disableNative","marker","preserve","style","css","clickLock","disableAutoHide"]);const I=e(t),$=at(C,j),z=Ie(o),Y=Ze(o),{innerWidth:H,innerHeight:V,width:Z,height:q,insetLeft:J,insetTop:rt}=o.getOptions(),K=Fs(Ct=>{var ve;if(D&&t.getAttribute(Va))return;const ne=qs(t,Ct);if(!ne)return;const Zt=Tf(t),Pe=Zt.min[0],qe=Zt.min[1],{selectedElements:Se,selectedData:ge,filteredSeriesData:Ee,abstractX:Ke}=F8({root:t,event:Ct,elements:I,coordinate:o,scale:a,startX:y,startY:m}),$e=N8(Se,a,f,ge,M);if(r&&$e.items.sort((an,rr)=>r(an)-r(rr)),i&&($e.items=$e.items.filter(i)),Se.length===0||$8($e)){ot(Ct);return}if(x&&L8({root:t,data:$e,x:ne[0]+Pe,y:ne[1]+qe,render:u,event:Ct,single:_,position:w,enterable:O,mount:S,bounding:E,css:R,offset:A}),s||l||c){const an=bt($,"crosshairs"),rr=Object.assign(Object.assign({},an),bt($,"crosshairsX")),Ni=Object.assign(Object.assign({},an),bt($,"crosshairsY")),Ki=Ee.map(co=>co[1]);l&&b0t(t,Ki,ne,Object.assign(Object.assign({},rr),{plotWidth:H,plotHeight:V,mainWidth:Z,mainHeight:q,insetLeft:J,insetTop:rt,startX:y,startY:m,transposed:Y,polar:z})),c&&x0t(t,Ki,Object.assign(Object.assign({},Ni),{plotWidth:H,plotHeight:V,mainWidth:Z,mainHeight:q,insetLeft:J,insetTop:rt,startX:y,startY:m,transposed:Y,polar:z}))}if(P){const an=bt($,"marker");_0t(t,{data:Ee,style:an,theme:M})}const we=(ve=Ee[0])===null||ve===void 0?void 0:ve[0].x,Nn=we??Ke(focus);d.emit("tooltip:show",Object.assign(Object.assign({},Ct),{nativeEvent:!0,data:Object.assign(Object.assign({},$e),{data:{x:mc(a.x,Nn,!0)}})}))},h,{leading:p,trailing:g}),ot=Ct=>{D&&t.getAttribute(Va)||F||ko({root:t,single:_,emitter:d,event:Ct})},vt=()=>{yb({root:t,single:_})},yt=Ct=>{var ve,{nativeEvent:ne,data:Zt,offsetX:Pe,offsetY:qe}=Ct,Se=Ho(Ct,["nativeEvent","data","offsetX","offsetY"]);if(ne)return;const ge=(ve=Zt==null?void 0:Zt.data)===null||ve===void 0?void 0:ve.x,Ke=a.x.map(ge),[$e,we]=o.map([Ke,.5]),Nn=Tf(t),an=Nn.min[0],rr=Nn.min[1];K(Object.assign(Object.assign({},Se),{offsetX:Pe!==void 0?Pe:an+$e,offsetY:qe!==void 0?qe:rr+we,_x:ge}))},mt=()=>{ko({root:t,single:_,emitter:d,nativeEvent:!1})},wt=()=>{Mt(),vt()},Ot=Ct=>{qs(t,Ct)||ot(Ct)},At=()=>{kt()},$t=Ct=>{D&&t.setAttribute(Va,!t.getAttribute(Va)),K(Ct)},kt=()=>{T||(t.addEventListener("pointerdown",$t),t.addEventListener("pointerenter",K),t.addEventListener("pointermove",K),t.addEventListener("pointerleave",Ot),t.addEventListener("pointerup",ot))},Mt=()=>{T||(t.removeEventListener("pointerdown",$t),t.removeEventListener("pointerenter",K),t.removeEventListener("pointermove",K),t.removeEventListener("pointerleave",Ot),t.removeEventListener("pointerup",ot))};return kt(),d.on("tooltip:show",yt),d.on("tooltip:hide",mt),d.on("tooltip:disable",wt),d.on("tooltip:enable",At),()=>{Mt(),d.off("tooltip:show",yt),d.off("tooltip:hide",mt),d.off("tooltip:disable",wt),d.off("tooltip:enable",At),N?ko({root:t,single:_,emitter:d,nativeEvent:!1}):vt()}}function k0t(t,{elements:n,coordinate:e,scale:r,render:i,groupName:a,sort:o,filter:s,emitter:l,wait:c=50,leading:u=!0,trailing:f=!1,groupKey:d=C=>C,single:h=!0,position:p,enterable:g,datum:y,view:m,mount:x,bounding:_,theme:w,offset:O,shared:S=!1,body:E=!0,disableNative:M=!1,preserve:A=!1,css:T={},clickLock:P=!1,disableAutoHide:N=!1}){const C=n(t),R=Ue(C,d),D=Fs(Z=>{if(P&&t.getAttribute(Va))return;const q=j8({root:t,event:Z,elements:C,coordinate:e,scale:r,shared:S});if(!q){N||ko({root:t,single:h,emitter:l,event:Z});return}const J=d(q),rt=R.get(J);if(!rt)return;const K=rt.length===1&&!S?m0t(rt[0]):N8(rt,r,a,void 0,w);if(o&&K.items.sort((yt,mt)=>o(yt)-o(mt)),s&&(K.items=K.items.filter(s)),$8(K)){N||ko({root:t,single:h,emitter:l,event:Z});return}const{offsetX:ot,offsetY:vt}=Z;E&&L8({root:t,data:K,x:ot,y:vt,render:i,event:Z,single:h,position:p,enterable:g,mount:x,bounding:_,css:T,offset:O}),l.emit("tooltip:show",Object.assign(Object.assign({},Z),{nativeEvent:!0,data:Object.assign(Object.assign({},K),{data:ix(q,m)})}))},c,{leading:u,trailing:f}),F=Z=>{N||ko({root:t,single:h,emitter:l,event:Z})},j=Z=>{P&&t.setAttribute(Va,!t.getAttribute(Va)),D(Z)},I=()=>{M||(t.addEventListener("pointerdown",j),t.addEventListener("pointermove",D),t.addEventListener("pointerleave",F),t.addEventListener("pointerup",F))},$=()=>{M||(t.removeEventListener("pointerdown",j),t.removeEventListener("pointermove",D),t.removeEventListener("pointerleave",F),t.removeEventListener("pointerup",F))},z=({nativeEvent:Z,offsetX:q,offsetY:J,data:rt})=>{if(Z)return;const{data:K}=rt,ot=W0(C,K,y);if(!ot)return;const vt=ot.getBBox(),{x:yt,y:mt,width:wt,height:Ot}=vt,At=t.getBBox();D({target:ot,offsetX:q!==void 0?q+At.x:yt+wt/2,offsetY:J!==void 0?J+At.y:mt+Ot/2})},Y=({nativeEvent:Z}={})=>{Z||ko({root:t,single:h,emitter:l,nativeEvent:!1})},H=()=>{$(),yb({root:t,single:h})},V=()=>{I()};return l.on("tooltip:show",z),l.on("tooltip:hide",Y),l.on("tooltip:enable",V),l.on("tooltip:disable",H),I(),()=>{$(),l.off("tooltip:show",z),l.off("tooltip:hide",Y),l.off("tooltip:enable",V),l.off("tooltip:disable",H),A?ko({root:t,single:h,emitter:l,nativeEvent:!1}):yb({root:t,single:h})}}function B8(t){const{shared:n,crosshairs:e,crosshairsX:r,crosshairsY:i,series:a,name:o,item:s=()=>({}),facet:l=!1}=t,c=Ho(t,["shared","crosshairs","crosshairsX","crosshairsY","series","name","item","facet"]);return(u,f,d)=>{const{container:h,view:p}=u,{scale:g,markState:y,coordinate:m,theme:x}=p,_=MT(y,"seriesTooltip"),w=MT(y,"crosshairs"),O=Li(h),S=aa(a,_),E=aa(e,w);if(c.clickLock&&!l&&O.setAttribute(Va,!1),S&&w0t(y)&&!l)return AT(O,Object.assign(Object.assign({},c),{theme:x,elements:io,scale:g,coordinate:m,crosshairs:E,crosshairsX:aa(aa(r,e),!1),crosshairsY:aa(i,E),item:s,emitter:d}));if(S&&l){const M=f.filter(D=>D!==u&&D.options.parentKey===u.options.key),A=U6(u,f),T=M[0].view.scale,P=O.getBounds(),N=P.min[0],C=P.min[1];Object.assign(T,{facet:!0});const R=O.parentNode.parentNode;return c.clickLock&&R.setAttribute(Va,!1),AT(R,Object.assign(Object.assign({},c),{theme:x,elements:()=>A,scale:T,coordinate:m,crosshairs:aa(e,w),crosshairsX:aa(aa(r,e),!1),crosshairsY:aa(i,E),item:s,startX:N,startY:C,emitter:d}))}return k0t(O,Object.assign(Object.assign({},c),{datum:Yo(p),elements:io,scale:g,coordinate:m,groupKey:n?rd():void 0,item:s,emitter:d,view:p,theme:x,shared:n}))}}B8.props={reapplyWhenUpdate:!0};function M0t(){return(t,n,e)=>{const{container:r,view:i,options:a}=t,o=k_(r),s=io(r),l=h=>pb(h).scales[0].name,c=h=>{const{scale:{[h]:p}}=i;return p},u=Ks(a,["active","inactive"]),f=Pc(s,Yo(i)),d=[];for(const h of o){const p=z=>{const{data:Y}=h.attributes,{__data__:H}=z,{index:V}=H;return Y[V].label},g=l(h),y=a8(h),m=c(g),x=Ue(s,z=>m.invert(z.__data__[g])),{state:_={}}=h.attributes,{inactive:w={}}=_,{setState:O,removeState:S}=jo(u,f),E={inactive:bt(w,"marker")},M={inactive:bt(w,"label")},{setState:A,removeState:T}=jo(E),{setState:P,removeState:N}=jo(M),C=z=>{for(const Y of y){const H=r8(Y),V=i8(Y);Y===z||z===null?(T(H,"inactive"),N(V,"inactive")):(A(H,"inactive"),P(V,"inactive"))}},R=(z,Y)=>{const H=p(Y),V=new Set(x.get(H));for(const q of s)V.has(q)?O(q,"active"):O(q,"inactive");C(Y);const{nativeEvent:Z=!0}=z;Z&&e.emit("legend:highlight",Object.assign(Object.assign({},z),{nativeEvent:Z,data:{channel:g,value:H}}))},D=new Map;for(const z of y){const Y=H=>{R(H,z)};z.addEventListener("pointerover",Y),D.set(z,Y)}const F=z=>{for(const H of s)S(H,"inactive","active");C(null);const{nativeEvent:Y=!0}=z;Y&&e.emit("legend:unhighlight",{nativeEvent:Y})},j=z=>{const{nativeEvent:Y,data:H}=z;if(Y)return;const{channel:V,value:Z}=H;if(V!==g)return;const q=y.find(J=>p(J)===Z);q&&R({nativeEvent:!1},q)},I=z=>{const{nativeEvent:Y}=z;Y||F({nativeEvent:!1})};h.addEventListener("pointerleave",F),e.on("legend:highlight",j),e.on("legend:unhighlight",I);const $=()=>{h.removeEventListener(F),e.off("legend:highlight",j),e.off("legend:unhighlight",I);for(const[z,Y]of D)z.removeEventListener(Y)};d.push($)}return()=>d.forEach(h=>h())}}var vi=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};function A0t(t,n){const[e,r,i,a]=t,[o,s,l,c]=n;return!(o>i||l<e||s>a||c<r)}function T0t(t,n,e,r,i){const[a,o,s,l]=i;return[Math.max(a,Math.min(t,e)),Math.max(o,Math.min(n,r)),Math.min(s,Math.max(t,e)),Math.min(l,Math.max(n,r))]}function P0t(t){const{width:n,height:e}=t.getBBox();return[0,0,n,e]}function Fa(t,n){for(const[e,r]of Object.entries(n))t.style(e,r)}const TT=cc(t=>{const n=t.attributes,{x:e,y:r,width:i,height:a,class:o,renders:s={},handleSize:l=10,document:c}=n,u=vi(n,["x","y","width","height","class","renders","handleSize","document"]);if(!c||i===void 0||a===void 0||e===void 0||r===void 0)return;const f=l/2,d=(Z,q,J)=>{Z.handle||(Z.handle=J.createElement("rect"),Z.append(Z.handle));const{handle:rt}=Z;return rt.attr(q),rt},h=bt(np(u,"handleNW","handleNE"),"handleN"),{render:p=d}=h,g=vi(h,["render"]),y=bt(u,"handleE"),{render:m=d}=y,x=vi(y,["render"]),_=bt(np(u,"handleSE","handleSW"),"handleS"),{render:w=d}=_,O=vi(_,["render"]),S=bt(u,"handleW"),{render:E=d}=S,M=vi(S,["render"]),A=bt(u,"handleNW"),{render:T=d}=A,P=vi(A,["render"]),N=bt(u,"handleNE"),{render:C=d}=N,R=vi(N,["render"]),D=bt(u,"handleSE"),{render:F=d}=D,j=vi(D,["render"]),I=bt(u,"handleSW"),{render:$=d}=I,z=vi(I,["render"]),Y=(Z,q)=>{const{id:J}=Z,rt=q(Z,Z.attributes,c);rt.id=J,rt.style.draggable=!0},H=Z=>()=>{const q=cc(J=>Y(J,Z));return new q({})},V=Rt(t).attr("className",o).style("transform",`translate(${e}, ${r})`).style("draggable",!0);V.maybeAppend("selection","rect").style("draggable",!0).style("fill","transparent").call(Fa,Object.assign(Object.assign({width:i,height:a},np(u,"handle")),{transform:void 0})),V.maybeAppend("handle-n",H(p)).style("x",f).style("y",-f).style("width",i-l).style("height",l).style("fill","transparent").call(Fa,g),V.maybeAppend("handle-e",H(m)).style("x",i-f).style("y",f).style("width",l).style("height",a-l).style("fill","transparent").call(Fa,x),V.maybeAppend("handle-s",H(w)).style("x",f).style("y",a-f).style("width",i-l).style("height",l).style("fill","transparent").call(Fa,O),V.maybeAppend("handle-w",H(E)).style("x",-f).style("y",f).style("width",l).style("height",a-l).style("fill","transparent").call(Fa,M),V.maybeAppend("handle-nw",H(T)).style("x",-f).style("y",-f).style("width",l).style("height",l).style("fill","transparent").call(Fa,P),V.maybeAppend("handle-ne",H(C)).style("x",i-f).style("y",-f).style("width",l).style("height",l).style("fill","transparent").call(Fa,R),V.maybeAppend("handle-se",H(F)).style("x",i-f).style("y",a-f).style("width",l).style("height",l).style("fill","transparent").call(Fa,j),V.maybeAppend("handle-sw",H($)).style("x",-f).style("y",a-f).style("width",l).style("height",l).style("fill","transparent").call(Fa,z)});function N_(t,n){var{brushed:e=()=>{},brushended:r=()=>{},brushcreated:i=()=>{},brushstarted:a=()=>{},brushupdated:o=()=>{},extent:s=P0t(t),brushRegion:l=(rt,K,ot,vt,yt)=>[rt,K,ot,vt],reverse:c=!1,fill:u="#777",fillOpacity:f="0.3",stroke:d="#fff",selectedHandles:h=["handle-n","handle-e","handle-s","handle-w","handle-nw","handle-ne","handle-se","handle-sw"]}=n,p=vi(n,["brushed","brushended","brushcreated","brushstarted","brushupdated","extent","brushRegion","reverse","fill","fillOpacity","stroke","selectedHandles"]);let g=null,y=null,m=null,x=null,_=null,w=!1;const[O,S,E,M]=s;Oo(t,"crosshair"),t.style.draggable=!0;const A=(rt,K,ot)=>{if(a(ot),x&&x.remove(),_&&_.remove(),g=[rt,K],c)return T();P()},T=()=>{_=new ur({style:Object.assign(Object.assign({},p),{fill:u,fillOpacity:f,stroke:d,pointerEvents:"none"})}),x=new TT({style:{x:0,y:0,width:0,height:0,draggable:!0,document:t.ownerDocument},className:"mask"}),t.appendChild(_),t.appendChild(x)},P=()=>{x=new TT({style:Object.assign(Object.assign({document:t.ownerDocument,x:0,y:0},p),{fill:u,fillOpacity:f,stroke:d,draggable:!0}),className:"mask"}),t.appendChild(x)},N=(rt=!0)=>{x&&x.remove(),_&&_.remove(),g=null,y=null,m=null,w=!1,x=null,_=null,r(rt)},C=(rt,K,ot=!0)=>{const[vt,yt,mt,wt]=T0t(rt[0],rt[1],K[0],K[1],s),[Ot,At,$t,kt]=l(vt,yt,mt,wt,s);return c?D(Ot,At,$t,kt):R(Ot,At,$t,kt),e(Ot,At,$t,kt,ot),[Ot,At,$t,kt]},R=(rt,K,ot,vt)=>{x.style.x=rt,x.style.y=K,x.style.width=ot-rt,x.style.height=vt-K},D=(rt,K,ot,vt)=>{_.style.d=`
168
+ M${O},${S}L${E},${S}L${E},${M}L${O},${M}Z
169
+ M${rt},${K}L${rt},${vt}L${ot},${vt}L${ot},${K}Z
170
+ `,x.style.x=rt,x.style.y=K,x.style.width=ot-rt,x.style.height=vt-K},F=rt=>{const K=(At,$t,kt,Mt,Ct)=>At+$t<Mt?Mt-$t:At+kt>Ct?Ct-kt:At,ot=rt[0]-m[0],vt=rt[1]-m[1],yt=K(ot,g[0],y[0],O,E),mt=K(vt,g[1],y[1],S,M),wt=[g[0]+yt,g[1]+mt],Ot=[y[0]+yt,y[1]+mt];C(wt,Ot)},j={"handle-n":{vector:[0,1,0,0],cursor:"ns-resize"},"handle-e":{vector:[0,0,1,0],cursor:"ew-resize"},"handle-s":{vector:[0,0,0,1],cursor:"ns-resize"},"handle-w":{vector:[1,0,0,0],cursor:"ew-resize"},"handle-nw":{vector:[1,1,0,0],cursor:"nwse-resize"},"handle-ne":{vector:[0,1,1,0],cursor:"nesw-resize"},"handle-se":{vector:[0,0,1,1],cursor:"nwse-resize"},"handle-sw":{vector:[1,0,0,1],cursor:"nesw-resize"}},I=rt=>z(rt)||$(rt),$=rt=>{const{id:K}=rt;return h.indexOf(K)===-1?!1:new Set(Object.keys(j)).has(K)},z=rt=>rt===x.getElementById("selection"),Y=rt=>{const{target:K}=rt,[ot,vt]=Sm(t,rt);if(!x||!I(K)){A(ot,vt,rt),w=!0;return}I(K)&&(m=[ot,vt])},H=rt=>{const{target:K}=rt,ot=Sm(t,rt);if(!g)return;if(!m)return C(g,ot);if(z(K))return F(ot);const[vt,yt]=[ot[0]-m[0],ot[1]-m[1]],{id:mt}=K;if(j[mt]){const[wt,Ot,At,$t]=j[mt].vector;return C([g[0]+vt*wt,g[1]+yt*Ot],[y[0]+vt*At,y[1]+yt*$t])}},V=rt=>{if(m){m=null;const{x:mt,y:wt,width:Ot,height:At}=x.style;g=[mt,wt],y=[mt+Ot,wt+At],o(mt,wt,mt+Ot,wt+At,rt);return}y=Sm(t,rt);const[K,ot,vt,yt]=C(g,y);w=!1,i(K,ot,vt,yt,rt)},Z=rt=>{const{target:K}=rt;x&&!I(K)&&N()},q=rt=>{const{target:K}=rt;!x||!I(K)||w?Oo(t,"crosshair"):z(K)?Oo(t,"move"):$(K)&&Oo(t,j[K.id].cursor)},J=()=>{Oo(t,"default")};return t.addEventListener("dragstart",Y),t.addEventListener("drag",H),t.addEventListener("dragend",V),t.addEventListener("click",Z),t.addEventListener("pointermove",q),t.addEventListener("pointerleave",J),{mask:x,move(rt,K,ot,vt,yt=!0){x||A(rt,K,{}),g=[rt,K],y=[ot,vt],C([rt,K],[ot,vt],yt)},remove(rt=!0){x&&N(rt)},destroy(){x&&N(!1),Oo(t,"default"),t.removeEventListener("dragstart",Y),t.removeEventListener("drag",H),t.removeEventListener("dragend",V),t.removeEventListener("click",Z),t.removeEventListener("pointermove",q),t.removeEventListener("pointerleave",J)}}}function R_(t,n,e){return n.filter(r=>{if(r===t)return!1;const{interaction:i={}}=r.options;return Object.values(i).find(a=>a.brushKey===e)})}function C0t(t,n,e){return R_(t,n,e).map(r=>Li(r.container))}function L0t(t,n,e){return R_(t,n,e).map(r=>r.options)}function PT(t,n){var{elements:e,selectedHandles:r,siblings:i=H=>[],datum:a,brushRegion:o,extent:s,reverse:l,scale:c,coordinate:u,series:f=!1,key:d=H=>H,bboxOf:h=H=>{const{x:V,y:Z,width:q,height:J}=H.style;return{x:V,y:Z,width:q,height:J}},state:p={},emitter:g}=n,y=vi(n,["elements","selectedHandles","siblings","datum","brushRegion","extent","reverse","scale","coordinate","series","key","bboxOf","state","emitter"]);const m=e(t),x=i(t),_=x.flatMap(e),w=Pc(m,a),O=bt(y,"mask"),{setState:S,removeState:E}=jo(p,w),M=new Map,{width:A,height:T,x:P=0,y:N=0}=h(t),C=s||[0,0,A,T],R=()=>{for(const H of[...m,..._])E(H,"active","inactive")},D=(H,V,Z,q)=>{var J;for(const K of x)(J=K.brush)===null||J===void 0||J.remove();const rt=new Set;for(const K of m){const{min:ot,max:vt}=K.getLocalBounds(),[yt,mt]=ot,[wt,Ot]=vt;A0t([yt,mt,wt,Ot],[H,V,Z,q])?(S(K,"active"),rt.add(d(K))):S(K,"inactive")}for(const K of _)rt.has(d(K))?S(K,"active"):S(K,"inactive")},F=()=>{for(const H of m)E(H,"inactive");for(const H of M.values())H.remove();M.clear()},j=(H,V,Z,q)=>{const J=K=>{const ot=K.cloneNode();return ot.__data__=K.__data__,K.parentNode.appendChild(ot),M.set(K,ot),ot},rt=new Zo({style:{x:H+P,y:V+N,width:Z-H,height:q-V}});t.appendChild(rt);for(const K of m){const ot=M.get(K)||J(K);ot.style.clipPath=rt,S(K,"inactive"),S(ot,"active")}},I=N_(t,Object.assign(Object.assign({},O),{extent:C,brushRegion:o,reverse:l,selectedHandles:r,brushended:H=>{const V=f?F:R;H&&g.emit("brush:remove",{nativeEvent:!0}),V()},brushed:(H,V,Z,q,J)=>{const rt=dp(H,V,Z,q,c,u);J&&g.emit("brush:highlight",{nativeEvent:!0,data:{selection:rt}}),(f?j:D)(H,V,Z,q)},brushcreated:(H,V,Z,q,J)=>{const rt=dp(H,V,Z,q,c,u);g.emit("brush:end",Object.assign(Object.assign({},J),{nativeEvent:!0,data:{selection:rt}}))},brushupdated:(H,V,Z,q,J)=>{const rt=dp(H,V,Z,q,c,u);g.emit("brush:end",Object.assign(Object.assign({},J),{nativeEvent:!0,data:{selection:rt}}))},brushstarted:H=>{g.emit("brush:start",H)}})),$=({nativeEvent:H,data:V})=>{if(H)return;const{selection:Z}=V,[q,J,rt,K]=Xpt(Z,c,u);I.move(q,J,rt,K,!1)};g.on("brush:highlight",$);const z=({nativeEvent:H}={})=>{H||I.remove(!1)};g.on("brush:remove",z);const Y=I.destroy.bind(I);return I.destroy=()=>{g.off("brush:highlight",$),g.off("brush:remove",z),Y()},I}function H0(t){var{facet:n,brushKey:e}=t,r=vi(t,["facet","brushKey"]);return(i,a,o)=>{const{container:s,view:l,options:c}=i,u=Li(s),f={maskFill:"#777",maskFillOpacity:"0.3",maskStroke:"#fff",reverse:!1},d=["active",["inactive",{opacity:.5}]],{scale:h,coordinate:p}=l;if(n){const y=u.getBounds(),m=y.min[0],x=y.min[1],_=y.max[0],w=y.max[1];return PT(u.parentNode.parentNode,Object.assign(Object.assign({elements:()=>U6(i,a),datum:Yo(hb(i,a).map(O=>O.view)),brushRegion:(O,S,E,M)=>[O,S,E,M],extent:[m,x,_,w],state:Ks(hb(i,a).map(O=>O.options),d),emitter:o,scale:h,coordinate:p,selectedHandles:void 0},f),r))}const g=PT(u,Object.assign(Object.assign({elements:io,key:y=>y.__data__.key,siblings:()=>C0t(i,a,e),datum:Yo([l,...R_(i,a,e).map(y=>y.view)]),brushRegion:(y,m,x,_)=>[y,m,x,_],extent:void 0,state:Ks([c,...L0t(i,a,e)],d),emitter:o,scale:h,coordinate:p,selectedHandles:void 0},f),r));return u.brush=g,()=>g.destroy()}}H0.props={reapplyWhenUpdate:!0};function I_(t,n,e,r,i){const[,a,,o]=i;return[t,a,e,o]}function N0t(t){return H0(Object.assign(Object.assign({},t),{brushRegion:I_,selectedHandles:["handle-e","handle-w"]}))}function D_(t,n,e,r,i){const[a,,o]=i;return[a,n,o,r]}function R0t(t){return H0(Object.assign(Object.assign({},t),{brushRegion:D_,selectedHandles:["handle-n","handle-s"]}))}var $_=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};const I0t="axis",D0t="axis-line",$0t="axis-main-group",z8="axis-hot-area";function j0t(t){return t.getElementsByClassName(I0t)}function W8(t){return t.getElementsByClassName(D0t)[0]}function F0t(t){return t.getElementsByClassName($0t)[0]}function G8(t){return F0t(t).getLocalBounds()}function B0t(t,n){var{cross:e,offsetX:r,offsetY:i}=n,a=$_(n,["cross","offsetX","offsetY"]);const o=G8(t),s=W8(t),[l]=s.getLocalBounds().min,[c,u]=o.min,[f,d]=o.max,h=(f-c)*2;return{brushRegion:D_,hotZone:new Zo({className:z8,style:Object.assign({width:e?h/2:h,transform:`translate(${(e?c:l-h/2).toFixed(2)}, ${u})`,height:d-u},a)}),extent:e?(p,g,y,m)=>[-1/0,g,1/0,m]:(p,g,y,m)=>[Math.floor(c-r),g,Math.ceil(f-r),m]}}function z0t(t,n){var{offsetY:e,offsetX:r,cross:i=!1}=n,a=$_(n,["offsetY","offsetX","cross"]);const o=G8(t),s=W8(t),[,l]=s.getLocalBounds().min,[c,u]=o.min,[f,d]=o.max,h=d-u;return{brushRegion:I_,hotZone:new Zo({className:z8,style:Object.assign({width:f-c,height:i?h:h*2,transform:`translate(${c}, ${i?u:l-h})`},a)}),extent:i?(p,g,y,m)=>[p,-1/0,y,1/0]:(p,g,y,m)=>[p,Math.floor(u-e),y,Math.ceil(d-e)]}}function W0t(t,n){var{axes:e,elements:r,points:i,horizontal:a,datum:o,offsetY:s,offsetX:l,reverse:c=!1,state:u={},emitter:f,coordinate:d}=n,h=$_(n,["axes","elements","points","horizontal","datum","offsetY","offsetX","reverse","state","emitter","coordinate"]);const p=r(t),g=e(t),y=Pc(p,o),{setState:m,removeState:x}=jo(u,y),_=new Map,w=bt(h,"mask"),O=$=>Array.from(_.values()).every(([z,Y,H,V])=>$.some(([Z,q])=>Z>=z&&Z<=H&&q>=Y&&q<=V)),S=g.map($=>$.attributes.scale),E=$=>$.length>2?[$[0],$[$.length-1]]:$,M=new Map,A=()=>{M.clear();for(let $=0;$<g.length;$++){const z=S[$],{domain:Y}=z.getOptions();M.set($,E(Y))}};A();const T=($,z)=>{const Y=[];for(const V of p){const Z=i(V);O(Z)?(m(V,"active"),Y.push(V)):m(V,"inactive")}if(M.set($,N(Y,$)),!z)return;const H=()=>{if(!C)return Array.from(M.values());const V=[];for(const[Z,q]of M){const J=S[Z],{name:rt}=J.getOptions();rt==="x"?V[0]=q:V[1]=q}return V};f.emit("brushAxis:highlight",{nativeEvent:!0,data:{selection:H()}})},P=$=>{for(const z of p)x(z,"active","inactive");A(),$&&f.emit("brushAxis:remove",{nativeEvent:!0})},N=($,z)=>{const Y=S[z],{name:H}=Y.getOptions(),V=$.map(Z=>{const q=Z.__data__;return Y.invert(q[H])});return E(Co(Y,V))},C=g.some(a)&&g.some($=>!a($)),R=[];for(let $=0;$<g.length;$++){const z=g[$],Y=a(z)?z0t:B0t,{hotZone:H,brushRegion:V,extent:Z}=Y(z,{offsetY:s,offsetX:l,cross:C,zIndex:999,fill:"transparent"});z.parentNode.appendChild(H);const q=N_(H,Object.assign(Object.assign({},w),{reverse:c,brushRegion:V,brushended(J){_.delete(z),Array.from(_.entries()).length===0?P(J):T($,J)},brushed(J,rt,K,ot,vt){_.set(z,Z(J,rt,K,ot)),T($,vt)}}));R.push(q)}const D=($={})=>{const{nativeEvent:z}=$;z||R.forEach(Y=>Y.remove(!1))},F=($,z,Y)=>{const[H,V]=$,Z=rt=>rt.getStep?rt.getStep():0,q=j(H,z,Y),J=j(V,z,Y)+Z(z);return a(Y)?[q,-1/0,J,1/0]:[-1/0,q,1/0,J]},j=($,z,Y)=>{const{height:H,width:V}=d.getOptions(),Z=z.clone();return a(Y)?Z.update({range:[0,V]}):Z.update({range:[H,0]}),Z.map($)},I=$=>{const{nativeEvent:z}=$;if(z)return;const{selection:Y}=$.data;for(let H=0;H<R.length;H++){const V=Y[H],Z=R[H],q=g[H];if(V){const J=S[H];Z.move(...F(V,J,q),!1)}else Z.remove(!1)}};return f.on("brushAxis:remove",D),f.on("brushAxis:highlight",I),()=>{R.forEach($=>$.destroy()),f.off("brushAxis:remove",D),f.off("brushAxis:highlight",I)}}function G0t(t){return(n,e,r)=>{const{container:i,view:a,options:o}=n,s=Li(i),{x:l,y:c}=s.getBBox(),{coordinate:u}=a;return W0t(i,Object.assign({elements:io,axes:j0t,offsetY:c,offsetX:l,points:f=>f.__data__.points,horizontal:f=>{const{startPos:[d,h],endPos:[p,g]}=f.attributes;return d!==p&&h===g},datum:Yo(a),state:Ks(o,["active",["inactive",{opacity:.5}]]),coordinate:u,emitter:r},t))}}var Y0t=function(t,n,e,r){function i(a){return a instanceof e?a:new e(function(o){o(a)})}return new(e||(e=Promise))(function(a,o){function s(u){try{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?a(u.value):i(u.value).then(s,l)}c((r=r.apply(t,n||[])).next())})},Y8=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};function H0t(t=300){let n=null;return e=>{const{timeStamp:r}=e;return n!==null&&r-n<t?(n=r,!0):(n=r,!1)}}function U0t(t,n){var{filter:e,reset:r,brushRegion:i,extent:a,reverse:o,emitter:s,scale:l,coordinate:c,selection:u,series:f=!1}=n,d=Y8(n,["filter","reset","brushRegion","extent","reverse","emitter","scale","coordinate","selection","series"]);const h=bt(d,"mask"),{width:p,height:g}=t.getBBox(),y=a||[0,0,p,g],m=H0t(),x=N_(t,Object.assign(Object.assign({},h),{extent:y,brushRegion:i,reverse:o,brushcreated:_}));t.addEventListener("click",w);function _(S,E,M,A,T){S===M&&E===A||(T.nativeEvent=!0,e(u(S,E,M,A),T),x.remove())}function w(S){m(S)&&(S.nativeEvent=!0,r(S))}const O=({nativeEvent:S,data:E})=>{if(S)return;const{selection:M}=E;e(M,{nativeEvent:!1})};return s.on("brush:filter",O),()=>{x.destroy(),s.off("brush:filter",O),t.removeEventListener("click",w)}}function j_(t){var{hideX:n=!0,hideY:e=!0}=t,r=Y8(t,["hideX","hideY"]);return(i,a,o)=>{const{container:s,view:l,options:c,update:u,setState:f}=i,d=Li(s),h={maskFill:"#777",maskFillOpacity:"0.3",maskStroke:"#fff",unhighlightedOpacity:.5,reverse:!1};let p=!1,g=!1,y=l;const{scale:m,coordinate:x}=l;return U0t(d,Object.assign(Object.assign({brushRegion:(_,w,O,S)=>[_,w,O,S],selection:(_,w,O,S)=>{const{scale:E,coordinate:M}=y;return dp(_,w,O,S,E,M)},filter:(_,w)=>Y0t(this,void 0,void 0,function*(){if(g)return;g=!0;const[O,S]=_;f("brushFilter",M=>{const{marks:A}=M,T=A.map(P=>at({axis:Object.assign(Object.assign({},n&&{x:{transform:[{type:"hide"}]}}),e&&{y:{transform:[{type:"hide"}]}})},P,{scale:{x:{domain:O,nice:!1},y:{domain:S,nice:!1}}}));return Object.assign(Object.assign({},c),{marks:T,clip:!0})}),o.emit("brush:filter",Object.assign(Object.assign({},w),{data:{selection:[O,S]}})),y=(yield u()).view,g=!1,p=!0}),reset:_=>{if(g||!p)return;const{scale:w}=l,{x:O,y:S}=w,E=O.getOptions().domain,M=S.getOptions().domain;o.emit("brush:filter",Object.assign(Object.assign({},_),{data:{selection:[E,M]}})),p=!1,y=l,f("brushFilter"),u()},extent:void 0,emitter:o,scale:m,coordinate:x},h),r))}}function V0t(t){return j_(Object.assign(Object.assign({hideX:!0},t),{brushRegion:I_}))}function X0t(t){return j_(Object.assign(Object.assign({hideY:!0},t),{brushRegion:D_}))}function H8(t,n,e){const r=t?e:n,i=t?n:e,a=Qa(r),o=Qa(i),s=i.getOptions().domain,l=!o&&s&&s.length>=2&&s[0]===0;return{currentScale:r,targetScale:i,isSourceDiscrete:a,isTargetDiscrete:o,shouldPreserveZeroBaseline:l}}function q0t(t,n,e,r,i){const a=t?r:e,o=h=>{const p={};return Object.keys(i).forEach(g=>{(g===h||g.match(new RegExp(`^${h}\\d+$`)))&&(p[g]=i[g])}),p},s=o(t?"x":"y"),l=Object.keys(s),c=l.map(h=>n[h]),u=Qa(a),f=c.map(h=>Qa(h)),d=c.map((h,p)=>{const g=h.getOptions().domain;return!f[p]&&g&&g.length>=2&&g[0]===0});return{currentScale:a,targetScales:c,isSourceDiscrete:u,isTargetDiscrete:f,shouldPreserveZeroBaseline:d,targetScaleKeys:l}}function K0t(t){return Array.from(new Set(t)).sort((e,r)=>e-r)}function Z0t({isTargetDiscrete:t,filteredValues:n,shouldPreserveZeroBaseline:e}){if(t)return K0t(n);{const r=Math.min(...n),i=Math.max(...n);return e?[0,i]:[r,i]}}function du(t){return t instanceof Date?t.getTime():typeof t=="string"?parseFloat(t):Number(t)}function F_(t,n,e,r,i,a="filter",o=!1){if(t8(a))return[];const s=o?"y":"x",l=o?"x":"y",c=[];for(const u of t){const{channelData:f}=u,d=f[s]||[],h=f[l]||[],p=Array.isArray(d[0])?d[0]:d,g=Array.isArray(h[0]);if(p.length===0)continue;const y=p.length;for(let m=0;m<y;m++){const x=p[m];let _=!1;if(e)_=n.includes(x);else if(n.length>=2){const w=du(x),O=du(n[0]),S=du(n[n.length-1]);!isNaN(w)&&!isNaN(O)&&!isNaN(S)&&(_=w>=O&&w<=S)}if(a==="filter"&&_){if(g){const w=h.length;for(let O=0;O<w;O++){const S=h[O];if(Array.isArray(S)&&m<S.length){const E=S[m],M=du(E);isNaN(M)||c.push(M)}}}else if(m<h.length){const w=h[m],O=du(w);isNaN(O)||c.push(O)}}}}return c.length>0?Z0t({isTargetDiscrete:r,filteredValues:c,shouldPreserveZeroBaseline:i}):[]}function Q0t({markDataPairs:t,domain:n,scaleInfo:e,adaptiveMode:r,shouldFilterXAxis:i=!1}){const{isSourceDiscrete:a,isTargetDiscrete:o,shouldPreserveZeroBaseline:s}=e;return F_(t,n,a,o,s,r,i)}function J0t({markDataPairs:t,domain:n,scaleInfo:e,markToScaleMap:r,adaptiveMode:i,shouldFilterXAxis:a=!1}){const o=new Map,{isSourceDiscrete:s,isTargetDiscrete:l,shouldPreserveZeroBaseline:c,targetScaleKeys:u}=e;return t.forEach(f=>{const d=r.get(f.markKey);if(!d)return;const h=u.indexOf(d);if(h===-1)return;const p=l[h],g=c[h],y=F_([f],n,s,p,g,i,a);o.set(d,y)}),o}function tgt(t,n,e,r,i,a,o=!1,s){const l=new Map;if(t.length===0||n.length===0)return l;const{isSourceDiscrete:c,isTargetDiscrete:u,shouldPreserveZeroBaseline:f}=e,d=s?t.filter(p=>s.get(p.markKey)===i):t.filter(p=>p.markKey===r);if(d.length===0)return l;const h=F_(d,n,c,u,f,a,o);return l.set(i,h),l}function U8(t,n,e,r){r&&n instanceof Map?n.forEach((i,a)=>{i&&Array.isArray(i)&&i.length>0&&(t[a]=i)}):!r&&Array.isArray(n)&&n.length>0&&(t[e?"x":"y"]=n)}var egt=function(t,n,e,r){function i(a){return a instanceof e?a:new e(function(o){o(a)})}return new(e||(e=Promise))(function(a,o){function s(u){try{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?a(u.value):i(u.value).then(s,l)}c((r=r.apply(t,n||[])).next())})};const V8="slider";function X8(t){var n,e,r,i;if(!(t!=null&&t.markState))return 0;let a=0;for(const[o,s]of t.markState.entries()){if(o.type!=="point"||!(s!=null&&s.channels))continue;const l=(n=s.channels)===null||n===void 0?void 0:n.find(c=>c.name==="size");if(l){if(((r=(e=l.scale)===null||e===void 0?void 0:e.range)===null||r===void 0?void 0:r.length)>0){const c=Math.max(...l.scale.range.filter(u=>typeof u=="number"));a=Math.max(a,c);continue}if(((i=l.values)===null||i===void 0?void 0:i.length)>0){const c=l.values.filter(u=>u.value!==void 0).flatMap(u=>Array.isArray(u.value)?u.value:[u.value]).filter(u=>typeof u=="number"&&!isNaN(u));c.length>0&&(a=Math.max(a,...c))}}}return a}function CT(t,n,e,r,i,a,o){if(o){const s=a?r:i.x,l=a?i.y:r;t.emit(n,Object.assign(Object.assign({},e),{nativeEvent:o,data:{selection:[Mv(s),Mv(l)]}}))}}function LT(t,n,e,r){const{domain0:i,filteredDomain:a,channel0:o,channel1:s,prefix:l,hasState:c,isMultiAxis:u,markToScaleMap:f,enableAdaptiveFiltering:d}=r;u&&a instanceof Map?t(n,h=>Object.assign({},rgt(h,e,{[o]:{domain:i,nice:!1}},l,c,o,s,f||new Map,a))):t(n,h=>Object.assign({},ngt(h,e,Object.assign({[o]:{domain:i,nice:!1}},d&&Array.isArray(a)?{[s]:{domain:a,nice:!0}}:{}),l,c,o,s)))}function ngt(t,n,e,r,i=!1,a="x",o="y"){const{marks:s}=t,l=X8(n),c=s.map(u=>{var f,d;return at({axis:{x:{transform:[{type:"hide"}]},y:{transform:[{type:"hide"}]}}},u,{scale:e,[r]:Object.assign(Object.assign({},((f=u[r])===null||f===void 0?void 0:f[a])&&{[a]:Object.assign({preserve:!0},i&&{ratio:null})}),((d=u[r])===null||d===void 0?void 0:d[o])&&{[o]:{preserve:!0}}),animate:!1})});return Object.assign(Object.assign({},t),{marks:c,insetLeft:l,insetRight:l,insetTop:l,insetBottom:l,clip:!0,animate:!1})}function rgt(t,n,e,r,i=!1,a="x",o="y",s=new Map,l=new Map){const{marks:c}=t,u=X8(n),f=c.map(d=>{var h,p;const g=typeof(d==null?void 0:d.key)=="string"?d.key:String((d==null?void 0:d.key)||""),y=s.get(g),m=l.get(y),x=m&&{y:Object.assign({domain:m,nice:!0},y!=="y"?{independent:!0}:void 0)};return at({axis:{x:{transform:[{type:"hide"}]},y:{transform:[{type:"hide"}]}}},d,{scale:Object.assign(Object.assign({},e),x),[r]:Object.assign(Object.assign({},((h=d[r])===null||h===void 0?void 0:h[a])&&{[a]:Object.assign({preserve:!0},i&&{ratio:null})}),((p=d[r])===null||p===void 0?void 0:p[o])&&{[o]:{preserve:!0}}),animate:!1})});return Object.assign(Object.assign({},t),{marks:f,insetLeft:u,insetRight:u,insetTop:u,insetBottom:u,clip:!0,animate:!1})}function igt(t,n,e){const[r,i]=t,a=e?l=>1-l:l=>l,o=mc(n,a(r),!0),s=mc(n,a(i),!1);return Co(n,[o,s])}function Mv(t){return[t[0],t[t.length-1]]}function q8({initDomain:t={},className:n=V8,prefix:e="slider",setValue:r=(u,f)=>u.setValues(f),hasState:i=!1,wait:a=50,leading:o=!0,trailing:s=!1,adaptiveMode:l="filter",getInitValues:c=u=>{var f;const d=(f=u==null?void 0:u.attributes)===null||f===void 0?void 0:f.values;if(d[0]!==0||d[1]!==1)return d}}){return(u,f,d)=>{const{container:h,view:p,update:g,setState:y}=u,m=h.getElementsByClassName(n);if(!m.length)return()=>{};const{scale:x,coordinate:_}=p,{x:w,y:O}=x,S=Ze(_),E=j=>{const I=j==="vertical"?"y":"x",$=j==="vertical"?"x":"y";return S?[$,I]:[I,$]},M=new Map,A=new Set,T=e8(p),P=ivt(p,t,w,O,T),N=Array.from(m),C=j=>N.some(I=>{const{orientation:$}=I.attributes,[z]=E($);return z===j}),R=C("x")&&!C("y"),D=C("y")&&!C("x"),F=!t8(l)&&(R||D);for(const j of m){const{orientation:I}=j.attributes,[$,z]=E(I),Y=`${e}${Uo($)}:filter`,H=$==="x",{ratio:V}=w.getOptions(),{ratio:Z}=O.getOptions(),q=yt=>{if(yt.data){const{selection:$t}=yt.data,[kt=Mv(P.x),Mt=Mv(P.y)]=$t;return H?[Co(w,kt,V),Co(O,Mt,Z)]:[Co(O,Mt,Z),Co(w,kt,V)]}const{value:mt}=yt.detail,wt=x[$],Ot=igt(mt,wt,S&&I==="horizontal"),At=P[z];return[Ot,At]};let J=!1;const K=lgt({getFiltering:()=>J,setFiltering:yt=>{J=yt},domainsOf:q,view:p,independentScaleInfo:T,enableAdaptiveFiltering:F,hasOnlyXSlider:R,hasOnlyYSlider:D,adaptiveMode:l,scaleX:w,scaleY:O,scale:x,channelDomain:P,channel0:$,channel1:z,isX:H,emitter:d,eventName:Y,setState:y,slider:j,prefix:e,hasState:i,update:g,wait:a,leading:o,trailing:s}),ot=yt=>{const{nativeEvent:mt}=yt;if(mt)return;const{data:wt}=yt,{selection:Ot}=wt,[At,$t]=Ot;j.dispatchEvent(new ze("valuechange",{data:wt,nativeEvent:!1}));const kt=H?mT(At,w):mT($t,O);r(j,kt)};d.on(Y,ot),j.addEventListener("valuechange",K),M.set(j,K),A.add([Y,ot]);const vt=c(j);vt&&j.dispatchEvent(new ze("valuechange",{detail:{value:vt},nativeEvent:!1,initValue:!0}))}return()=>{for(const[j,I]of M)j.removeEventListener("valuechange",I);for(const[j,I]of A)d.off(j,I)}}}function agt({view:t,domain0:n,shouldFilterXAxis:e,enableAdaptiveFiltering:r,markDataPairs:i,adaptiveMode:a,scaleX:o,scaleY:s,scale:l,channelDomain:c,independentScaleInfo:u,channel0:f}){const d=new Map,h=new Map;if(!r||i.length===0||!(n!=null&&n.length))return{filteredDomain:d,markToScaleMap:h};const p=zt(t,"options.slider");if(Object.keys(p).length>0&&Object.prototype.hasOwnProperty.call(p,f)){const y=q0t(e,l,o,s,c);(e?u.markToXScaleMap:u.markToYScaleMap).forEach((_,w)=>{h.set(w,_)});const x=J0t({markDataPairs:i,domain:n,scaleInfo:y,markToScaleMap:h,adaptiveMode:a,shouldFilterXAxis:e});return U8(c,x,e,!0),{filteredDomain:x,markToScaleMap:h}}else{const y=ogt(t,f);if(y){const m=H8(e,o,s),x=e?u.markToXScaleMap:u.markToYScaleMap,_=x.get(y)||"";if(_)return h.set(y,_),{filteredDomain:tgt(i,n,m,y,_,a,e,x),markToScaleMap:h}}}return{filteredDomain:d,markToScaleMap:h}}function ogt(t,n){for(const[e]of t.markState.entries()){const r=zt(e,"slider");if(Object.keys(r||{}).length>0&&Object.prototype.hasOwnProperty.call(r,n))return String(e.key||"")}return null}function sgt({domain0:t,domain1:n,shouldFilterXAxis:e,enableAdaptiveFiltering:r,markDataPairs:i,adaptiveMode:a,scaleX:o,scaleY:s,channelDomain:l,hasOnlyXSlider:c,hasOnlyYSlider:u,isX:f}){let d=n;if(r&&i.length>0&&(c&&f||u&&!f)&&(t==null?void 0:t.length)>0){const h=H8(e,o,s);d=Q0t({markDataPairs:i,domain:t,scaleInfo:h,adaptiveMode:a,shouldFilterXAxis:e}),U8(l,d,e,!1)}return d}function lgt({getFiltering:t,setFiltering:n,domainsOf:e,view:r,independentScaleInfo:i,enableAdaptiveFiltering:a,hasOnlyXSlider:o,hasOnlyYSlider:s,adaptiveMode:l,scaleX:c,scaleY:u,scale:f,channelDomain:d,channel0:h,channel1:p,isX:g,emitter:y,eventName:m,setState:x,slider:_,prefix:w,hasState:O,update:S,wait:E,leading:M,trailing:A}){return Fs(T=>egt(this,void 0,void 0,function*(){const{initValue:P=!1}=T;if(t()&&!P)return;n(!0);const{nativeEvent:N=!0}=T,{markDataPairs:C}=rvt(r);if(i[`hasIndependent${p.toUpperCase()}`]){const[D]=e(T),F=s&&!g,{filteredDomain:j,markToScaleMap:I}=agt({view:r,domain0:D,shouldFilterXAxis:F,enableAdaptiveFiltering:a&&(o&&g||s&&!g),markDataPairs:C,adaptiveMode:l,scaleX:c,scaleY:u,scale:f,channelDomain:d,independentScaleInfo:i,channel0:h});d[h]=D,CT(y,m,T,D,d,g,N),LT(x,_,r,{domain0:D,filteredDomain:j,channel0:h,channel1:p,prefix:w,hasState:O,isMultiAxis:!0,markToScaleMap:I,enableAdaptiveFiltering:a})}else{const[D,F]=e(T),I=sgt({domain0:D,domain1:F,shouldFilterXAxis:s&&!g,enableAdaptiveFiltering:a,markDataPairs:C,adaptiveMode:l,scaleX:c,scaleY:u,channelDomain:d,hasOnlyXSlider:o,hasOnlyYSlider:s,isX:g});d[h]=D,CT(y,m,T,D,d,g,N),LT(x,_,r,{domain0:D,filteredDomain:I,channel0:h,channel1:p,prefix:w,hasState:O,isMultiAxis:!1,markToScaleMap:void 0,enableAdaptiveFiltering:a})}yield S(),n(!1)}),E,{leading:M,trailing:A})}function cgt(t){var n;try{const e=(n=t.ownerDocument)===null||n===void 0?void 0:n.defaultView;if(!e||typeof e.getContextService!="function")return null;const r=e.getContextService().getDomElement();return r instanceof HTMLElement?r:null}catch{return null}}function K8({className:t=V8,setValue:n=(o,s)=>o.setValues(s),minRange:e=.01,wheelSensitivity:r=.05,x:i=!0,y:a=!0}={}){return o=>{const{container:s,view:l}=o,{coordinate:c}=l,u=Ze(c),f=cgt(s),d=Math.max(1e-6,Math.min(1,e)),h=s.getElementsByClassName(t);if(!h.length)return()=>{};const p=(x,_)=>x===!0?!0:x===!1?!1:x==="shift"?_.shiftKey&&!_.ctrlKey&&!_.altKey:x==="ctrl"?_.ctrlKey&&!_.shiftKey&&!_.altKey:x==="alt"?_.altKey&&!_.shiftKey&&!_.ctrlKey:!1,g=(x,_)=>{n(x,_),x.dispatchEvent(new ze("valuechange",{detail:{value:_},nativeEvent:!0}))},y=(x,_,w,O,S)=>{const M=(x-_)/w,A=Math.max(0,Math.min(1,M));return Math.max(O,Math.min(S,A))},m=x=>{if(!f)return;const _=x.target;if(!f.contains(_))return;const w=f.getBoundingClientRect(),O=x.clientX-w.left,S=x.clientY-w.top,E=[];for(const M of h){const{values:A,orientation:T}=M.attributes;if(!A)continue;const P=T==="horizontal";p((u?P?"y":"x":P?"x":"y")==="x"?i:a,x)&&E.push(M)}if(E.length!==0){x.preventDefault(),x.stopPropagation();for(const M of E){const{values:A,orientation:T,x:P,y:N,trackLength:C}=M.attributes,[R,D]=A,F=D-R,I=T==="horizontal"?y(O,P,C,R,D):y(S,N,C,R,D),$=r*nvt(F),Y=1+x.deltaY*$,H=Math.max(d,Math.min(1,F*Y)),V=(I-R)/F,Z=(D-I)/F;let q=I-H*V,J=I+H*Z;q<0?(q=0,J=Math.min(1,H)):J>1&&(J=1,q=Math.max(0,1-H)),g(M,[q,J])}}};return f&&f.addEventListener("wheel",m,{passive:!1,capture:!0}),()=>{f&&f.removeEventListener("wheel",m,{capture:!0})}}}K8.props={reapplyWhenUpdate:!0};const NT=`${so}scrollbar`;function ugt(t={}){return(n,e,r)=>{const{view:i,container:a}=n;if(!a.getElementsByClassName(NT).length)return()=>{};const{scale:s}=i,{x:l,y:c}=s,u={x:[...l.getOptions().domain],y:[...c.getOptions().domain]};return l.update({domain:l.getOptions().expectedDomain}),c.update({domain:c.getOptions().expectedDomain}),q8(Object.assign({initDomain:u,className:NT,prefix:"scrollbar",hasState:!0,setValue:(d,h)=>d.setValue(h[0]),getInitValues:d=>{const h=d.slider.attributes.values;if(h[0]!==0||h[1]!==1)return h},adaptiveMode:!1},t))(n,e,r)}}var fgt=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};function dgt(t,n,e){return`<${t} style="${Object.entries(e).map(([r,i])=>`${bJ(r)}:${i}`).join(";")}">${n}</${t}>`}const hgt={backgroundColor:"rgba(0,0,0,0.75)",color:"#fff",width:"max-content",padding:"1px 4px",fontSize:"12px",borderRadius:"2.5px",boxShadow:"0 3px 6px -4px rgba(0,0,0,0.12), 0 6px 16px 0 rgba(0,0,0,0.08), 0 9px 28px 8px rgba(0,0,0,0.05)"};function RT(t){return t.nodeName!=="text"?!1:!!t.isOverflowing()}function Z8(t){var{offsetX:n=8,offsetY:e=8}=t,r=fgt(t,["offsetX","offsetY"]);return i=>{const{container:a}=i,[o,s]=a.getBounds().min,l=bt(r,"tip"),c=new Set,u=d=>{const{target:h}=d;if(!RT(h)){d.stopPropagation();return}const{offsetX:p,offsetY:g}=d,y=p+n-o,m=g+e-s;if(h.tip){h.tip.style.x=y,h.tip.style.y=m;return}const{text:x}=h.style,_=new el({className:"poptip",style:{innerHTML:dgt("div",x,Object.assign(Object.assign({},hgt),l)),x:y,y:m}});a.appendChild(_),h.tip=_,c.add(_)},f=d=>{const{target:h}=d;if(!RT(h)){d.stopPropagation();return}h.tip&&(h.tip.remove(),h.tip=null,c.delete(h.tip))};return a.addEventListener("pointerover",u),a.addEventListener("pointerout",f),()=>{a.removeEventListener("pointerover",u),a.removeEventListener("pointerout",f),c.forEach(d=>d.remove())}}}Z8.props={reapplyWhenUpdate:!0};var pgt=function(t,n,e,r){function i(a){return a instanceof e?a:new e(function(o){o(a)})}return new(e||(e=Promise))(function(a,o){function s(u){try{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?a(u.value):i(u.value).then(s,l)}c((r=r.apply(t,n||[])).next())})},vgt=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};function ggt(t){return Rt(t).select(`.${Wo}`).node()}const ygt={breadCrumbFill:"rgba(0, 0, 0, 0.85)",breadCrumbFontSize:12,breadCrumbY:12,activeFill:"rgba(0, 0, 0, 0.5)"};function mgt(t={}){const{originData:n=[],layout:e}=t,r=vgt(t,["originData","layout"]),i=at({},ygt,r),a=bt(i,"breadCrumb"),o=bt(i,"active");return s=>{const{update:l,setState:c,container:u,options:f}=s,d=ggt(u),h=f.marks[0],{state:p}=h,g=new Qn;d.appendChild(g);const y=(S,E)=>pgt(this,void 0,void 0,function*(){if(g.removeChildren(),E){let M="",A=a.y,T=0;const P=[],N=d.getBBox().width,C=S.map((R,D)=>{M=`${M}${R}/`,P.push(R);const F=new ki({name:M.replace(/\/$/,""),style:Object.assign(Object.assign({text:R,x:T,path:[...P],depth:D},a),{y:A})});g.appendChild(F),T+=F.getBBox().width;const j=new ki({style:Object.assign(Object.assign({x:T,text:" / "},a),{y:A})});return g.appendChild(j),T+=j.getBBox().width,T>N&&(A=g.getBBox().height+a.y,T=0,F.attr({x:T,y:A}),T+=F.getBBox().width,j.attr({x:T,y:A}),T+=j.getBBox().width),D===Qu(S)-1&&j.remove(),F});C.forEach((R,D)=>{if(D===Qu(C)-1)return;const F=Object.assign({},R.attributes);R.attr("cursor","pointer"),R.addEventListener("mouseenter",()=>{R.attr(o)}),R.addEventListener("mouseleave",()=>{R.attr(F)}),R.addEventListener("click",()=>{y(zt(R,["style","path"]),zt(R,["style","depth"]))})})}fvt(u,c),c("treemapDrillDown",M=>{const{marks:A}=M,T=S.join("/"),P=A.map(N=>{if(N.type!=="rect")return N;let C=n;if(E){const D=n.filter(z=>{const Y=zt(z,["id"]);return Y&&(Y.match(`${T}/`)||T.match(Y))}).map(z=>({value:z.height===0?zt(z,["value"]):void 0,name:zt(z,["id"])})),{paddingLeft:F,paddingBottom:j,paddingRight:I}=e,$=Object.assign(Object.assign({},e),{paddingTop:(e.paddingTop||g.getBBox().height+10)/(E+1),paddingLeft:F/(E+1),paddingBottom:j/(E+1),paddingRight:I/(E+1),path:z=>z.name,layer:z=>z.depth===E+1});C=IR(D,$,{value:"value"})[0]}else C=n.filter(D=>D.depth===1);const R=[];return C.forEach(({path:D})=>{R.push(Qr(D))}),at({},N,{data:C,scale:{color:{domain:R}}})});return Object.assign(Object.assign({},M),{marks:P})}),yield l(void 0,["legendFilter"])}),m=S=>S.attributes.key.split("-")[0],x=S=>zt(S,["__data__","key"]),_=S=>{const E=S.target,{markType:M,nodeName:A,attributes:T}=E||{};if(M!=="rect"&&A!==it.TEXT)return;const P=A===it.TEXT&&zt(T,"isTreemapLabel")===!0?m(E):x(E),N=Ql(n,C=>C.id===P);zt(N,"height")&&y(zt(N,"path"),zt(N,"depth"))};d.addEventListener("click",_);const w=Yv(Object.assign(Object.assign({},p.active),p.inactive)),O=()=>{Q6(d).forEach(E=>{const M=zt(E,["style","cursor"]),A=Ql(n,T=>T.id===zt(E,["__data__","key"]));if(M!=="pointer"&&(A!=null&&A.height)){E.style.cursor="pointer";const T=Df(E.attributes,w);E.addEventListener("mouseenter",()=>{E.attr(p.active)}),E.addEventListener("mouseleave",()=>{E.attr(at(T,p.inactive))})}})};return O(),d.addEventListener("mousemove",O),()=>{g.remove(),d.removeEventListener("click",_),d.removeEventListener("mousemove",O)}}}var bgt=function(t,n,e,r){function i(a){return a instanceof e?a:new e(function(o){o(a)})}return new(e||(e=Promise))(function(a,o){function s(u){try{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?a(u.value):i(u.value).then(s,l)}c((r=r.apply(t,n||[])).next())})};const xgt=t=>t.querySelectorAll(".element").filter(n=>(n.style||{})[R2]===Yl);function _gt(t){return Rt(t).select(`.${Wo}`).node()}const wgt={rootText:"root",style:{fill:"rgba(0, 0, 0, 0.6)",fontSize:11},y:4,active:{fill:"rgba(0, 0, 0, 0.4)"}};function Ogt(t={}){const{breadCrumb:n={}}=t,e=at({},wgt,n);return r=>{const{update:i,setState:a,container:o,view:s,options:l}=r,c=o.ownerDocument,u=_gt(o),f=l.marks.find(({id:x})=>x===Yl);if(!f)return;const{state:d}=f,h=c.createElement("g");h.style.transform=`translate(${e.x||0}px, ${e.y||0}px)`,h.setAttribute("x","drilldown-breadcrumb"),u.appendChild(h);const p=x=>bgt(this,void 0,void 0,function*(){if(h.removeChildren(),x&&x.length>0){const _=c.createElement("text",{style:Object.assign({text:e.rootText},e.style)});h.appendChild(_);let w="";const O=x;let S=e.style.y,E=_.getBBox().width;const M=u.getBBox().width,A=O.map((P,N)=>{const C=c.createElement("text",{style:Object.assign(Object.assign({x:E,text:" / "},e.style),{y:S})});h.appendChild(C),E+=C.getBBox().width,w=`${w}${P} / `;const R=c.createElement("text",{name:w.replace(/\s\/\s$/,""),style:Object.assign(Object.assign({text:P,x:E},e.style),{y:S})});return h.appendChild(R),E+=R.getBBox().width,E>M&&(S=h.getBBox().height,E=0,C.attr({x:E,y:S}),E+=C.getBBox().width,R.attr({x:E,y:S}),E+=R.getBBox().width),R});[_,...A].forEach((P,N)=>{if(N===A.length)return;const C=Object.assign({},P.attributes);P.attr("cursor","pointer"),P.addEventListener("mouseenter",()=>{P.attr(e.active)}),P.addEventListener("mouseleave",()=>{P.attr(C)}),P.addEventListener("click",()=>{p(x.slice(0,N))})})}a("drillDown",_=>{const{marks:w}=_,O=w.map(S=>{if(S.id!==Yl&&S.type!=="rect")return S;const{data:E}=S,M=E.filter(A=>{var T;const P=(T=A.path)!==null&&T!==void 0?T:[];if(x.length===0)return!0;if(!Array.isArray(P)||P.length<x.length)return!1;for(let N=0;N<x.length;N++)if(P[N]!==x[N])return!1;return!0});return at({},S,{data:M})});return Object.assign(Object.assign({},_),{marks:O})}),yield i()}),g=x=>{var _,w;const O=x.target,S=O.markType,E=O.style||{},M=E[R2],A=E[iv],T=O.__data__;if(S!=="rect"||M!==Yl||!A)return;const P=(w=(_=T==null?void 0:T.data)===null||_===void 0?void 0:_.path)!==null&&w!==void 0?w:[];p(P)};u.addEventListener("click",g);const y=Yv(Object.assign(Object.assign({},d.active),d.inactive)),m=()=>{xgt(u).forEach(_=>{const w=zt(_,["style",iv]);if(zt(_,["style","cursor"])!=="pointer"&&w){_.style.cursor="pointer";const S=Df(_.attributes,y);_.addEventListener("mouseenter",()=>{_.attr(d.active)}),_.addEventListener("mouseleave",()=>{_.attr(at(S,d.inactive))})}})};return u.addEventListener("mousemove",m),()=>{h.remove(),u.removeEventListener("click",g),u.removeEventListener("mousemove",m)}}}var Em=function(t,n,e,r){function i(a){return a instanceof e?a:new e(function(o){o(a)})}return new(e||(e=Promise))(function(a,o){function s(u){try{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?a(u.value):i(u.value).then(s,l)}c((r=r.apply(t,n||[])).next())})},Sgt=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};const Egt={pointR:6,pointStrokeWidth:1,pointStroke:"#888",pointActiveStroke:"#f5f5f5",pathStroke:"#888",pathLineDash:[3,4],labelFontSize:12,labelFill:"#888",labelStroke:"#fff",labelLineWidth:1,labelY:-6,labelX:2},km="movePoint",IT=t=>{const n=t.target,{markType:e}=n;e==="line"&&(n.attr("_lineWidth",n.attr("lineWidth")||1),n.attr("lineWidth",n.attr("_lineWidth")+3)),e==="interval"&&(n.attr("_opacity",n.attr("opacity")||1),n.attr("opacity",.7*n.attr("_opacity")))},DT=t=>{const n=t.target,{markType:e}=n;e==="line"&&n.attr("lineWidth",n.attr("_lineWidth")),e==="interval"&&n.attr("opacity",n.attr("_opacity"))},kgt=(t,n,e)=>n.map(r=>["x","color"].reduce((a,o)=>{const s=e[o];return s&&r[s]!==t[s]?!1:a},!0)?Object.assign(Object.assign({},r),t):r),Mgt=t=>{const n=zt(t,["__data__","y"]),r=zt(t,["__data__","y1"])-n,{__data__:{data:i,encode:a,transform:o},childNodes:s}=t.parentNode,l=Ql(o,({type:f})=>f==="normalizeY"),c=zt(a,["y","field"]),u=i[s.indexOf(t)][c];return(f,d=!1)=>l||d?f/(1-f)/(r/(1-r))*u:f},Agt=(t,n)=>{const e=zt(t,["__data__","seriesItems",n,"0","value"]),r=zt(t,["__data__","seriesIndex",n]),{__data__:{data:i,encode:a,transform:o}}=t.parentNode,s=Ql(o,({type:u})=>u==="normalizeY"),l=zt(a,["y","field"]),c=i[r][l];return u=>s?e===1?u:u/(1-u)/(e/(1-e))*c:u},$T=(t,n,e)=>{t.forEach((r,i)=>{r.attr("stroke",n[1]===i?e.activeStroke:e.stroke)})},jT=(t,n,e,r)=>{const i=new ur({style:e}),a=new ki({style:r});return n.appendChild(a),t.appendChild(i),[i,a]},FT=(t,n)=>{if(!zt(t,["options","range","indexOf"]))return;const r=t.options.range.indexOf(n);return t.sortedDomain[r]},Mm=(t,n,e)=>{const r=Ev(t,n),a=Ev(t,e)/r,o=t[0]+(n[0]-t[0])*a,s=t[1]+(n[1]-t[1])*a;return[o,s]};function Tgt(t={}){const{selection:n=[],precision:e=2}=t,r=Sgt(t,["selection","precision"]),i=Object.assign(Object.assign({},Egt),r||{}),a=bt(i,"path"),o=bt(i,"label"),s=bt(i,"point");return(l,c,u)=>{const{update:f,setState:d,container:h,view:p,options:{marks:g,coordinate:y}}=l,m=Li(h);let x=Q6(m),_,w=n;const{transform:O=[],type:S}=y,E=!!Ql(O,({type:I})=>I==="transpose"),M=S==="polar",A=S==="theta",T=!!Ql(x,({markType:I})=>I==="area");T&&(x=x.filter(({markType:I})=>I==="area"));const P=new Qn({style:{zIndex:2}});m.appendChild(P);const N=()=>{u.emit("element-point:select",{nativeEvent:!0,data:{selection:w}})},C=(I,$)=>{u.emit("element-point:moved",{nativeEvent:!0,data:{changeData:I,data:$}})},R=I=>{const $=I.target;w=[$.parentNode.childNodes.indexOf($)],N(),F($)},D=I=>{const{data:{selection:$},nativeEvent:z}=I;if(z)return;w=$;const Y=zt(x,[w==null?void 0:w[0]]);Y&&F(Y)},F=I=>{const{attributes:$,markType:z,__data__:Y}=I,{stroke:H}=$,{points:V,seriesTitle:Z,color:q,title:J,seriesX:rt,y1:K}=Y;if(E&&z!=="interval")return;const{scale:ot,coordinate:vt}=(_==null?void 0:_.view)||p,{color:yt,y:mt,x:wt}=ot,Ot=vt.getCenter();P.removeChildren();let At;const $t=(kt,Mt,Ct,ve)=>Em(this,void 0,void 0,function*(){return d("elementPointMove",ne=>{var Zt;const Pe=(((Zt=_==null?void 0:_.options)===null||Zt===void 0?void 0:Zt.marks)||g).map(qe=>{if(!ve.includes(qe.type))return qe;const{data:Se,encode:ge}=qe,Ke=Object.keys(ge).reduce((we,Nn)=>{const an=ge[Nn];return Nn==="x"&&(we[an]=kt),Nn==="y"&&(we[an]=Mt),Nn==="color"&&(we[an]=Ct),we},{}),$e=kgt(Ke,Se,ge);return C(Ke,$e),at({},qe,{data:$e,animate:!1})});return Object.assign(Object.assign({},ne),{marks:Pe})}),yield f("elementPointMove")});if(["line","area"].includes(z))V.forEach((kt,Mt)=>{const Ct=wt.invert(rt[Mt]);if(!Ct)return;const ve=new Sa({name:km,style:Object.assign({cx:kt[0],cy:kt[1],fill:H},s)}),ne=Agt(I,Mt);ve.addEventListener("mousedown",Zt=>{const Pe=vt.output([rt[Mt],0]),qe=Z==null?void 0:Z.length;h.attr("cursor","move"),w[1]!==Mt&&(w[1]=Mt,N()),$T(P.childNodes,w,s);const[Se,ge]=jT(P,ve,a,o),Ee=$e=>{const we=kt[1]+$e.clientY-At[1];if(T)if(M){const Nn=kt[0]+$e.clientX-At[0],[an,rr]=Mm(Ot,Pe,[Nn,we]),[,Ni]=vt.output([1,mt.output(0)]),[,Ki]=vt.invert([an,Ni-(V[Mt+qe][1]-rr)]),co=(Mt+1)%qe,Cc=(Mt-1+qe)%qe,V0=fu([V[Cc],[an,rr],Z[co]&&V[co]]);ge.attr("text",ne(mt.invert(Ki)).toFixed(e)),Se.attr("d",V0),ve.attr("cx",an),ve.attr("cy",rr)}else{const[,Nn]=vt.output([1,mt.output(0)]),[,an]=vt.invert([kt[0],Nn-(V[Mt+qe][1]-we)]),rr=fu([V[Mt-1],[kt[0],we],Z[Mt+1]&&V[Mt+1]]);ge.attr("text",ne(mt.invert(an)).toFixed(e)),Se.attr("d",rr),ve.attr("cy",we)}else{const[,Nn]=vt.invert([kt[0],we]),an=fu([V[Mt-1],[kt[0],we],V[Mt+1]]);ge.attr("text",mt.invert(Nn).toFixed(e)),Se.attr("d",an),ve.attr("cy",we)}};At=[Zt.clientX,Zt.clientY],window.addEventListener("mousemove",Ee);const Ke=()=>Em(this,void 0,void 0,function*(){if(h.attr("cursor","default"),window.removeEventListener("mousemove",Ee),h.removeEventListener("mouseup",Ke),Be(ge.attr("text")))return;const $e=Number(ge.attr("text")),we=FT(yt,q);_=yield $t(Ct,$e,we,["line","area"]),ge.remove(),Se.remove(),F(I)});h.addEventListener("mouseup",Ke)}),P.appendChild(ve)}),$T(P.childNodes,w,s);else if(z==="interval"){let kt=[(V[0][0]+V[1][0])/2,V[0][1]];E?kt=[V[0][0],(V[0][1]+V[1][1])/2]:A&&(kt=V[0]);const Mt=Mgt(I),Ct=new Sa({name:km,style:Object.assign(Object.assign({cx:kt[0],cy:kt[1],fill:H},s),{stroke:s.activeStroke})});Ct.addEventListener("mousedown",ve=>{h.attr("cursor","move");const ne=FT(yt,q),[Zt,Pe]=jT(P,Ct,a,o),qe=ge=>{if(E){const Ee=kt[0]+ge.clientX-At[0],[Ke]=vt.output([mt.output(0),mt.output(0)]),[,$e]=vt.invert([Ke+(Ee-V[2][0]),kt[1]]),we=fu([[Ee,V[0][1]],[Ee,V[1][1]],V[2],V[3]],!0);Pe.attr("text",Mt(mt.invert($e)).toFixed(e)),Zt.attr("d",we),Ct.attr("cx",Ee)}else if(A){const Ee=kt[1]+ge.clientY-At[1],Ke=kt[0]+ge.clientX-At[0],[$e,we]=Mm(Ot,[Ke,Ee],kt),[Nn,an]=Mm(Ot,[Ke,Ee],V[1]),rr=vt.invert([$e,we])[1],Ni=K-rr;if(Ni<0)return;const Ki=evt(Ot,[[$e,we],[Nn,an],V[2],V[3]],Ni>.5?1:0);Pe.attr("text",Mt(Ni,!0).toFixed(e)),Zt.attr("d",Ki),Ct.attr("cx",$e),Ct.attr("cy",we)}else{const Ee=kt[1]+ge.clientY-At[1],[,Ke]=vt.output([1,mt.output(0)]),[,$e]=vt.invert([kt[0],Ke-(V[2][1]-Ee)]),we=fu([[V[0][0],Ee],[V[1][0],Ee],V[2],V[3]],!0);Pe.attr("text",Mt(mt.invert($e)).toFixed(e)),Zt.attr("d",we),Ct.attr("cy",Ee)}};At=[ve.clientX,ve.clientY],window.addEventListener("mousemove",qe);const Se=()=>Em(this,void 0,void 0,function*(){if(h.attr("cursor","default"),h.removeEventListener("mouseup",Se),window.removeEventListener("mousemove",qe),Be(Pe.attr("text")))return;const ge=Number(Pe.attr("text"));_=yield $t(J,ge,ne,[z]),Pe.remove(),Zt.remove(),F(I)});h.addEventListener("mouseup",Se)}),P.appendChild(Ct)}};x.forEach((I,$)=>{w[0]===$&&F(I),I.addEventListener("click",R),I.addEventListener("mouseenter",IT),I.addEventListener("mouseleave",DT)});const j=I=>{const $=I==null?void 0:I.target;(!$||$.name!==km&&!x.includes($))&&(w=[],N(),P.removeChildren())};return u.on("element-point:select",D),u.on("element-point:unselect",j),h.addEventListener("mousedown",j),()=>{P.remove(),u.off("element-point:select",D),u.off("element-point:unselect",j),h.removeEventListener("mousedown",j),x.forEach(I=>{I.removeEventListener("click",R),I.removeEventListener("mouseenter",IT),I.removeEventListener("mouseleave",DT)})}}}var BT={},Am={},Tm=34,hu=10,Pm=13;function Q8(t){return new Function("d","return {"+t.map(function(n,e){return JSON.stringify(n)+": d["+e+'] || ""'}).join(",")+"}")}function Pgt(t,n){var e=Q8(t);return function(r,i){return n(e(r),i,t)}}function zT(t){var n=Object.create(null),e=[];return t.forEach(function(r){for(var i in r)i in n||e.push(n[i]=i)}),e}function jr(t,n){var e=t+"",r=e.length;return r<n?new Array(n-r+1).join(0)+e:e}function Cgt(t){return t<0?"-"+jr(-t,6):t>9999?"+"+jr(t,6):jr(t,4)}function Lgt(t){var n=t.getUTCHours(),e=t.getUTCMinutes(),r=t.getUTCSeconds(),i=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":Cgt(t.getUTCFullYear())+"-"+jr(t.getUTCMonth()+1,2)+"-"+jr(t.getUTCDate(),2)+(i?"T"+jr(n,2)+":"+jr(e,2)+":"+jr(r,2)+"."+jr(i,3)+"Z":r?"T"+jr(n,2)+":"+jr(e,2)+":"+jr(r,2)+"Z":e||n?"T"+jr(n,2)+":"+jr(e,2)+"Z":"")}function Ngt(t){var n=new RegExp('["'+t+`
171
+ \r]`),e=t.charCodeAt(0);function r(f,d){var h,p,g=i(f,function(y,m){if(h)return h(y,m-1);p=y,h=d?Pgt(y,d):Q8(y)});return g.columns=p||[],g}function i(f,d){var h=[],p=f.length,g=0,y=0,m,x=p<=0,_=!1;f.charCodeAt(p-1)===hu&&--p,f.charCodeAt(p-1)===Pm&&--p;function w(){if(x)return Am;if(_)return _=!1,BT;var S,E=g,M;if(f.charCodeAt(E)===Tm){for(;g++<p&&f.charCodeAt(g)!==Tm||f.charCodeAt(++g)===Tm;);return(S=g)>=p?x=!0:(M=f.charCodeAt(g++))===hu?_=!0:M===Pm&&(_=!0,f.charCodeAt(g)===hu&&++g),f.slice(E+1,S-1).replace(/""/g,'"')}for(;g<p;){if((M=f.charCodeAt(S=g++))===hu)_=!0;else if(M===Pm)_=!0,f.charCodeAt(g)===hu&&++g;else if(M!==e)continue;return f.slice(E,S)}return x=!0,f.slice(E,p)}for(;(m=w())!==Am;){for(var O=[];m!==BT&&m!==Am;)O.push(m),m=w();d&&(O=d(O,y++))==null||h.push(O)}return h}function a(f,d){return f.map(function(h){return d.map(function(p){return u(h[p])}).join(t)})}function o(f,d){return d==null&&(d=zT(f)),[d.map(u).join(t)].concat(a(f,d)).join(`
172
+ `)}function s(f,d){return d==null&&(d=zT(f)),a(f,d).join(`
173
+ `)}function l(f){return f.map(c).join(`
174
+ `)}function c(f){return f.map(u).join(t)}function u(f){return f==null?"":f instanceof Date?Lgt(f):n.test(f+="")?'"'+f.replace(/"/g,'""')+'"':f}return{parse:r,parseRows:i,format:o,formatBody:s,formatRows:l,formatRow:c,formatValue:u}}function Rgt(t){for(var n in t){var e=t[n].trim(),r,i;if(!e)e=null;else if(e==="true")e=!0;else if(e==="false")e=!1;else if(e==="NaN")e=NaN;else if(!isNaN(r=+e))e=r;else if(i=e.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/))Igt&&i[4]&&!i[7]&&(e=e.replace(/-/g,"/").replace(/T/," ")),e=new Date(e);else continue;t[n]=e}return t}const Igt=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours();var Dgt=function(t,n,e,r){function i(a){return a instanceof e?a:new e(function(o){o(a)})}return new(e||(e=Promise))(function(a,o){function s(u){try{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?a(u.value):i(u.value).then(s,l)}c((r=r.apply(t,n||[])).next())})};const J8=t=>{const{value:n,format:e=n.split(".").pop(),delimiter:r=",",autoType:i=!0}=t;return()=>Dgt(void 0,void 0,void 0,function*(){const a=yield fetch(n);if(e==="csv"){const o=yield a.text();return Ngt(r).parse(o,i?Rgt:Ws)}if(e==="json")return yield a.json();throw new Error(`Unknown format: ${e}.`)})};J8.props={};function $gt(t){return!t||Object.keys(t).length===0}const tD=t=>{const{fields:n,key:e="key",value:r="value"}=t;return i=>$gt(n)?i:i.flatMap(a=>n.map(o=>Object.assign(Object.assign({},a),{[e]:o,[r]:a[o]})))};tD.props={};function jgt(t){return t!=null&&!Number.isNaN(t)}const eD=t=>{const{callback:n=jgt}=t;return e=>e.filter(n)};eD.props={};const nD=t=>{const{callback:n}=t;return e=>Array.isArray(e)?[...e].sort(n):e};nD.props={};function Fgt(t,n=[]){return n.reduce((e,r)=>(r in t&&(e[r]=t[r]),e),{})}const rD=t=>{const{fields:n}=t;return e=>e.map(r=>Fgt(r,n))};rD.props={};function Bgt(t){return Object.keys(t).length===0}const iD=t=>n=>{if(!t||Bgt(t))return n;const e=r=>Object.entries(r).reduce((i,[a,o])=>(i[t[a]||a]=o,i),{});return n.map(e)};iD.props={};function zgt(t,n){return t.map(e=>{if(Array.isArray(e)){const[r,i=n]=e;return[r,i]}return[e,n]})}const aD=t=>{const{fields:n=[]}=t,e=zgt(n,!0);return r=>{const i=(a,o)=>e.reduce((s,[l,c=!0])=>s!==0?s:c?a[l]<o[l]?-1:+(a[l]!==o[l]):a[l]>o[l]?-1:+(a[l]!==o[l]),0);return[...r].sort(i)}};aD.props={};const oD=t=>{const{value:n}=t;return()=>n};oD.props={};const sD=t=>{const{callback:n=Ws}=t;return e=>n(e)};sD.props={};const lD=t=>{const{callback:n=Ws}=t;return e=>Array.isArray(e)?e.map(n):e};lD.props={};var Wgt=function(t,n,e,r){function i(a){return a instanceof e?a:new e(function(o){o(a)})}return new(e||(e=Promise))(function(a,o){function s(u){try{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?a(u.value):i(u.value).then(s,l)}c((r=r.apply(t,n||[])).next())})};function Ggt(t,n){return{set(e,r,i){if(n[e]===void 0)return this;const a=r?r.call(null,n[e]):n[e];return i?i.call(null,a):typeof t[e]=="function"?t[e](a):t[e]=a,this},setAsync(e,r,i){return Wgt(this,void 0,void 0,function*(){if(n[e]===void 0)return this;const a=r?yield r.call(null,n[e]):n[e];return i?i.call(null,a):typeof t[e]=="function"?t[e](a):t[e]=a,this})}}}const Cm=Math.PI/180,Pu=64,hp=2048;function Ygt(t){return t.text}function Hgt(){return"serif"}function WT(){return"normal"}function Ugt(t){return t.value}function Vgt(){return~~(Math.random()*2)*90}function Xgt(){return 1}function qgt(){}function Kgt(t,n,e,r){if(n.sprite)return;const i=t.context,a=t.ratio;i.clearRect(0,0,(Pu<<5)/a,hp/a);let o=0,s=0,l=0;const c=e.length;for(--r;++r<c;){n=e[r],i.save(),i.font=n.style+" "+n.weight+" "+~~((n.size+1)/a)+"px "+n.font;let d=i.measureText(n.text+"m").width*a,h=n.size<<1;if(n.rotate){const p=Math.sin(n.rotate*Cm),g=Math.cos(n.rotate*Cm),y=d*g,m=d*p,x=h*g,_=h*p;d=Math.max(Math.abs(y+_),Math.abs(y-_))+31>>5<<5,h=~~Math.max(Math.abs(m+x),Math.abs(m-x))}else d=d+31>>5<<5;if(h>l&&(l=h),o+d>=Pu<<5&&(o=0,s+=l,l=0),s+h>=hp)break;i.translate((o+(d>>1))/a,(s+(h>>1))/a),n.rotate&&i.rotate(n.rotate*Cm),i.fillText(n.text,0,0),n.padding&&(i.lineWidth=2*n.padding,i.strokeText(n.text,0,0)),i.restore(),n.width=d,n.height=h,n.xoff=o,n.yoff=s,n.x1=d>>1,n.y1=h>>1,n.x0=-n.x1,n.y0=-n.y1,n.hasText=!0,o+=d}const u=i.getImageData(0,0,(Pu<<5)/a,hp/a).data,f=[];for(;--r>=0;){if(n=e[r],!n.hasText)continue;const d=n.width,h=d>>5;let p=n.y1-n.y0;for(let m=0;m<p*h;m++)f[m]=0;if(o=n.xoff,o==null)return;s=n.yoff;let g=0,y=-1;for(let m=0;m<p;m++){for(let x=0;x<d;x++){const _=h*m+(x>>5),w=u[(s+m)*(Pu<<5)+(o+x)<<2]?1<<31-x%32:0;f[_]|=w,g|=w}g?y=m:(n.y0++,p--,m--,s++)}n.y1=n.y0+y,n.sprite=f.slice(0,(n.y1-n.y0)*h)}}function Zgt(t,n,e){e>>=5;const r=t.sprite,i=t.width>>5,a=t.x-(i<<4),o=a&127,s=32-o,l=t.y1-t.y0;let c=(t.y+t.y0)*e+(a>>5),u;for(let f=0;f<l;f++){u=0;for(let d=0;d<=i;d++)if((u<<s|(d<i?(u=r[f*i+d])>>>o:0))&n[c+d])return!0;c+=e}return!1}function Qgt(t,n){const e=t[0],r=t[1];n.x+n.x0<e.x&&(e.x=n.x+n.x0),n.y+n.y0<e.y&&(e.y=n.y+n.y0),n.x+n.x1>r.x&&(r.x=n.x+n.x1),n.y+n.y1>r.y&&(r.y=n.y+n.y1)}function Jgt(t,n){return t.x+t.x1>n[0].x&&t.x+t.x0<n[1].x&&t.y+t.y1>n[0].y&&t.y+t.y0<n[1].y}function cD(t){const n=t[0]/t[1];return function(e){return[n*(e*=.1)*Math.cos(e),e*Math.sin(e)]}}function tyt(t){const e=4*t[0]/t[1];let r=0,i=0;return function(a){const o=a<0?-1:1;switch(Math.sqrt(1+4*o*a)-o&3){case 0:r+=e;break;case 1:i+=4;break;case 2:r-=e;break;default:i-=4;break}return[r,i]}}function GT(t){const n=[];let e=-1;for(;++e<t;)n[e]=0;return n}function eyt(){return document.createElement("canvas")}function Ba(t){return typeof t=="function"?t:function(){return t}}const nyt={archimedean:cD,rectangular:tyt};function ryt(){let t=[256,256],n=Ygt,e=Hgt,r=Ugt,i=WT,a=Vgt,o=Xgt,s=cD,l=Math.random,c=qgt,u=[],f=null,d=1/0,h=eyt;const p=WT,g={};g.start=function(){const[x,_]=t,w=y(h()),O=g.board?g.board:GT((t[0]>>5)*t[1]),S=u.length,E=[],M=u.map(function(N,C,R){return N.text=n.call(this,N,C,R),N.font=e.call(this,N,C,R),N.style=p.call(this,N,C,R),N.weight=i.call(this,N,C,R),N.rotate=a.call(this,N,C,R),N.size=~~r.call(this,N,C,R),N.padding=o.call(this,N,C,R),N}).sort(function(N,C){return C.size-N.size});let A=-1,T=g.board?[{x:0,y:0},{x,y:_}]:void 0;f&&clearInterval(f),f=setInterval(P,0),P();function P(){const N=Date.now();for(;Date.now()-N<d&&++A<S;){const C=M[A];C.x=x*(l()+.5)>>1,C.y=_*(l()+.5)>>1,Kgt(w,C,M,A),C.hasText&&m(O,C,T)&&(c.call(null,"word",{cloud:g,word:C}),E.push(C),T?g.hasImage||Qgt(T,C):T=[{x:C.x+C.x0,y:C.y+C.y0},{x:C.x+C.x1,y:C.y+C.y1}],C.x-=t[0]>>1,C.y-=t[1]>>1)}g._tags=E,g._bounds=T,A>=S&&(g.stop(),c.call(null,"end",{cloud:g,words:E,bounds:T}))}return g},g.stop=function(){return f&&(clearInterval(f),f=null),g};function y(x){x.width=x.height=1;const _=Math.sqrt(x.getContext("2d").getImageData(0,0,1,1).data.length>>2);x.width=(Pu<<5)/_,x.height=hp/_;const w=x.getContext("2d");return w.fillStyle=w.strokeStyle="red",w.textAlign="center",w.textBaseline="middle",{context:w,ratio:_}}function m(x,_,w){const O=_.x,S=_.y,E=Math.sqrt(t[0]*t[0]+t[1]*t[1]),M=s(t),A=l()<.5?1:-1;let T,P=-A,N,C;for(;(T=M(P+=A))&&(N=~~T[0],C=~~T[1],!(Math.min(Math.abs(N),Math.abs(C))>=E));)if(_.x=O+N,_.y=S+C,!(_.x+_.x0<0||_.y+_.y0<0||_.x+_.x1>t[0]||_.y+_.y1>t[1])&&(!w||!Zgt(_,x,t[0]))&&(!w||Jgt(_,w))){const R=_.sprite,D=_.width>>5,F=t[0]>>5,j=_.x-(D<<4),I=j&127,$=32-I,z=_.y1-_.y0;let Y,H=(_.y+_.y0)*F+(j>>5);for(let V=0;V<z;V++){Y=0;for(let Z=0;Z<=D;Z++)x[H+Z]|=Y<<$|(Z<D?(Y=R[V*D+Z])>>>I:0);H+=F}return delete _.sprite,!0}return!1}return g.createMask=x=>{const _=document.createElement("canvas"),[w,O]=t;if(!w||!O)return;const S=w>>5,E=GT((w>>5)*O);_.width=w,_.height=O;const M=_.getContext("2d");M.drawImage(x,0,0,x.width,x.height,0,0,w,O);const A=M.getImageData(0,0,w,O).data;for(let T=0;T<O;T++)for(let P=0;P<w;P++){const N=S*T+(P>>5),C=T*w+P<<2,D=A[C]>=250&&A[C+1]>=250&&A[C+2]>=250?1<<31-P%32:0;E[N]|=D}g.board=E,g.hasImage=!0},g.timeInterval=function(x){d=x??1/0},g.words=function(x){u=x},g.size=function(x=[]){t=[+x[0],+x[1]]},g.text=function(x){n=Ba(x)},g.font=function(x){e=Ba(x)},g.fontWeight=function(x){i=Ba(x)},g.rotate=function(x){a=Ba(x)},g.canvas=function(x){h=Ba(x)},g.spiral=function(x){s=nyt[x]||x},g.fontSize=function(x){r=Ba(x)},g.padding=function(x){o=Ba(x)},g.random=function(x){l=Ba(x)},g.on=function(x){c=Ba(x)},g}var iyt=function(t,n,e,r){function i(a){return a instanceof e?a:new e(function(o){o(a)})}return new(e||(e=Promise))(function(a,o){function s(u){try{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?a(u.value):i(u.value).then(s,l)}c((r=r.apply(t,n||[])).next())})},ayt=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};const oyt={fontSize:[20,60],font:"Impact",padding:2,rotate:function(){return(~~(Math.random()*6)-3)*30}};function syt(t){return new Promise((n,e)=>{if(t instanceof HTMLImageElement){n(t);return}if(typeof t=="string"){const r=new Image;r.crossOrigin="anonymous",r.src=t,r.onload=()=>n(r),r.onerror=()=>{console.error(`'image ${t} load failed !!!'`),e()};return}e()})}function lyt(t,n){if(typeof t=="function")return t;if(Array.isArray(t)){const[e,r]=t;if(!n)return()=>(r+e)/2;const[i,a]=n;return a===i?()=>(r+e)/2:({value:o})=>(r-e)/(a-i)*(o-i)+e}return()=>t}const uD=(t,n)=>e=>iyt(void 0,void 0,void 0,function*(){const r=Object.assign({},oyt,t,{canvas:n.createCanvas}),i=ryt();yield Ggt(i,r).set("fontSize",x=>{const _=e.map(w=>w.value);return lyt(x,[ti(_),Re(_)])}).set("font").set("fontStyle").set("fontWeight").set("padding").set("rotate").set("size").set("spiral").set("timeInterval").set("random").set("text").set("on").set("canvas").setAsync("imageMask",syt,i.createMask),i.words([...e]);const a=i.start(),[o,s]=r.size,l=[{x:0,y:0},{x:o,y:s}],{_bounds:c=l,_tags:u,hasImage:f}=a,d=u.map(x=>{var{x:_,y:w,font:O}=x,S=ayt(x,["x","y","font"]);return Object.assign(Object.assign({},S),{x:_+o/2,y:w+s/2,fontFamily:O})}),[{x:h,y:p},{x:g,y}]=c,m={text:"",value:0,opacity:0,fontSize:0};return d.push(Object.assign(Object.assign({},m),{x:f?0:h,y:f?0:p}),Object.assign(Object.assign({},m),{x:f?o:g,y:f?s:y})),d});uD.props={};function YT(t){return typeof t=="string"?n=>n[t]:t}const fD=t=>{const{join:n,on:e,select:r=[],as:i=r,unknown:a=NaN}=t,[o,s]=e,l=YT(s),c=YT(o),u=Xb(n,([f])=>f,f=>l(f));return f=>f.map(d=>{const h=u.get(c(d));return Object.assign(Object.assign({},d),r.reduce((p,g,y)=>(p[i[y]]=h?h[g]:a,p),{}))})};fD.props={};const dD=t=>{const{start:n,end:e}=t;return r=>r.slice(n,e)};dD.props={};var Lm={exports:{}},Nm={exports:{}},HT;function cyt(){return HT||(HT=1,(function(t){var n=t.exports;t.exports.isNumber=function(e){return typeof e=="number"},t.exports.findMin=function(e){if(e.length===0)return 1/0;for(var r=e[0],i=1;i<e.length;i++)r=Math.min(r,e[i]);return r},t.exports.findMax=function(e){if(e.length===0)return-1/0;for(var r=e[0],i=1;i<e.length;i++)r=Math.max(r,e[i]);return r},t.exports.findMinMulti=function(e){for(var r=n.findMin(e[0]),i=1;i<e.length;i++)r=Math.min(r,n.findMin(e[i]));return r},t.exports.findMaxMulti=function(e){for(var r=n.findMax(e[0]),i=1;i<e.length;i++)r=Math.max(r,n.findMax(e[i]));return r},t.exports.inside=function(e,r,i){return e<=i&&i<=r}})(Nm)),Nm.exports}var UT;function uyt(){return UT||(UT=1,(function(t){var n=50,e=2,r=Math.log(2),i=t.exports,a=cyt();function o(l){return 1-Math.abs(l)}t.exports.getUnifiedMinMax=function(l,c){return i.getUnifiedMinMaxMulti([l],c)},t.exports.getUnifiedMinMaxMulti=function(l,c){c=c||{};var u=!1,f=!1,d=a.isNumber(c.width)?c.width:e,h=a.isNumber(c.size)?c.size:n,p=a.isNumber(c.min)?c.min:(u=!0,a.findMinMulti(l)),g=a.isNumber(c.max)?c.max:(f=!0,a.findMaxMulti(l)),y=g-p,m=y/(h-1);return u&&(p=p-2*d*m),f&&(g=g+2*d*m),{min:p,max:g}},t.exports.create=function(l,c){if(c=c||{},!l||l.length===0)return[];var u=a.isNumber(c.size)?c.size:n,f=a.isNumber(c.width)?c.width:e,d=i.getUnifiedMinMax(l,{size:u,width:f,min:c.min,max:c.max}),h=d.min,p=d.max,g=p-h,y=g/(u-1);if(g===0)return[{x:h,y:1}];for(var m=[],x=0;x<u;x++)m.push({x:h+x*y,y:0});var _=function(P){return Math.floor((P-h)/y)},w=s(o,f),O=w[f],S=w[f-1]-w[f-2],E=0;l.forEach(function(P){var N=_(P);if(!(N+f<0||N-f>=m.length)){var C=Math.max(N-f,0),R=N,D=Math.min(N+f,m.length-1),F=C-(N-f),j=N+f-D,I=w[-f-1+F]||0,$=w[-f-1+j]||0,z=O/(O-I-$);F>0&&(E+=z*(F-1)*S);var Y=Math.max(0,N-f+1);a.inside(0,m.length-1,Y)&&(m[Y].y+=z*1*S),a.inside(0,m.length-1,R+1)&&(m[R+1].y-=z*2*S),a.inside(0,m.length-1,D+1)&&(m[D+1].y+=z*1*S)}});var M=E,A=0,T=0;return m.forEach(function(P){A+=P.y,M+=A,P.y=M,T+=M}),T>0&&m.forEach(function(P){P.y/=T}),m};function s(l,c){for(var u={},f=0,d=-c;d<=c;d++)f+=l(d/c),u[d]=f;return u}t.exports.getExpectedValueFromPdf=function(l){if(!(!l||l.length===0)){var c=0;return l.forEach(function(u){c+=u.x*u.y}),c}},t.exports.getXWithLeftTailArea=function(l,c){if(!(!l||l.length===0)){for(var u=0,f=0,d=0;d<l.length&&(f=d,u+=l[d].y,!(u>=c));d++);return l[f].x}},t.exports.getPerplexity=function(l){if(!(!l||l.length===0)){var c=0;return l.forEach(function(u){var f=Math.log(u.y);isFinite(f)&&(c+=u.y*f)}),c=-c/r,Math.pow(2,c)}}})(Lm)),Lm.exports}var fyt=uyt();const dyt=Bv(fyt),hD=t=>{const{field:n,groupBy:e,as:r=["y","size"],min:i,max:a,size:o=10,width:s}=t,[l,c]=r;return u=>Array.from(Ue(u,d=>e.map(h=>d[h]).join("-")).values()).map(d=>{const h=dyt.create(d.map(y=>y[n]),{min:i,max:a,size:o,width:s}),p=h.map(y=>y.x),g=h.map(y=>y.y);return Object.assign(Object.assign({},d[0]),{[l]:p,[c]:g})})};hD.props={};function hyt(t,n,e,r){r=r||{};const i=r.maxIterations||100,a=r.tolerance||1e-10,o=t(n),s=t(e);let l=e-n;if(o*s>0)throw"Initial bisect points must have opposite signs";if(o===0)return n;if(s===0)return e;for(let c=0;c<i;++c){l/=2;const u=n+l,f=t(u);if(f*o>=0&&(n=u),Math.abs(l)<a||f===0)return u}return n+l}function mb(t){const n=new Array(t);for(let e=0;e<t;++e)n[e]=0;return n}function VT(t,n){return mb(t).map(()=>mb(n))}function ql(t,n){let e=0;for(let r=0;r<t.length;++r)e+=t[r]*n[r];return e}function bb(t){return Math.sqrt(ql(t,t))}function xb(t,n,e){for(let r=0;r<n.length;++r)t[r]=n[r]*e}function Ua(t,n,e,r,i){for(let a=0;a<t.length;++a)t[a]=n*e[a]+r*i[a]}function pyt(t,n,e){e=e||{};const r=e.maxIterations||n.length*200,i=e.nonZeroDelta||1.05,a=e.zeroDelta||.001,o=e.minErrorDelta||1e-6,s=e.minErrorDelta||1e-5,l=e.rho!==void 0?e.rho:1,c=e.chi!==void 0?e.chi:2,u=e.psi!==void 0?e.psi:-.5,f=e.sigma!==void 0?e.sigma:.5;let d;const h=n.length,p=new Array(h+1);p[0]=n,p[0].fx=t(n),p[0].id=0;for(let O=0;O<h;++O){const S=n.slice();S[O]=S[O]?S[O]*i:a,p[O+1]=S,p[O+1].fx=t(S),p[O+1].id=O+1}function g(O){for(let S=0;S<O.length;S++)p[h][S]=O[S];p[h].fx=O.fx}const y=(O,S)=>O.fx-S.fx,m=n.slice(),x=n.slice(),_=n.slice(),w=n.slice();for(let O=0;O<r;++O){if(p.sort(y),e.history){const E=p.map(M=>{const A=M.slice();return A.fx=M.fx,A.id=M.id,A});E.sort((M,A)=>M.id-A.id),e.history.push({x:p[0].slice(),fx:p[0].fx,simplex:E})}d=0;for(let E=0;E<h;++E)d=Math.max(d,Math.abs(p[0][E]-p[1][E]));if(Math.abs(p[0].fx-p[h].fx)<o&&d<s)break;for(let E=0;E<h;++E){m[E]=0;for(let M=0;M<h;++M)m[E]+=p[M][E];m[E]/=h}const S=p[h];if(Ua(x,1+l,m,-l,S),x.fx=t(x),x.fx<p[0].fx)Ua(w,1+c,m,-c,S),w.fx=t(w),w.fx<x.fx?g(w):g(x);else if(x.fx>=p[h-1].fx){let E=!1;if(x.fx>S.fx?(Ua(_,1+u,m,-u,S),_.fx=t(_),_.fx<S.fx?g(_):E=!0):(Ua(_,1-u*l,m,u*l,S),_.fx=t(_),_.fx<x.fx?g(_):E=!0),E){if(f>=1)break;for(let M=1;M<p.length;++M)Ua(p[M],1-f,p[0],f,p[M]),p[M].fx=t(p[M])}}else g(x)}return p.sort(y),{fx:p[0].fx,x:p[0]}}function vyt(t,n,e,r,i,a,o){const s=e.fx,l=ql(e.fxprime,n);let c=s,u=s,f=l,d=0;i=i||1,a=a||1e-6,o=o||.1;function h(p,g,y){for(let m=0;m<16;++m)if(i=(p+g)/2,Ua(r.x,1,e.x,i,n),c=r.fx=t(r.x,r.fxprime),f=ql(r.fxprime,n),c>s+a*i*l||c>=y)g=i;else{if(Math.abs(f)<=-o*l)return i;f*(g-p)>=0&&(g=p),p=i,y=c}return 0}for(let p=0;p<10;++p){if(Ua(r.x,1,e.x,i,n),c=r.fx=t(r.x,r.fxprime),f=ql(r.fxprime,n),c>s+a*i*l||p&&c>=u)return h(d,i,u);if(Math.abs(f)<=-o*l)return i;if(f>=0)return h(i,d,c);u=c,d=i,i*=2}return i}function gyt(t,n,e){let r={x:n.slice(),fx:0,fxprime:n.slice()},i={x:n.slice(),fx:0,fxprime:n.slice()};const a=n.slice();let o,s=1;e=e||{};const l=e.maxIterations||n.length*20;r.fx=t(r.x,r.fxprime);const c=r.fxprime.slice();xb(c,r.fxprime,-1);for(let u=0;u<l;++u){if(s=vyt(t,c,r,i,s),e.history&&e.history.push({x:r.x.slice(),fx:r.fx,fxprime:r.fxprime.slice(),alpha:s}),!s)xb(c,r.fxprime,-1);else{Ua(a,1,i.fxprime,-1,r.fxprime);const f=ql(r.fxprime,r.fxprime),d=Math.max(0,ql(a,i.fxprime)/f);Ua(c,d,c,-1,i.fxprime),o=r,r=i,i=o}if(bb(r.fxprime)<=1e-5)break}return e.history&&e.history.push({x:r.x.slice(),fx:r.fx,fxprime:r.fxprime.slice(),alpha:s}),r}const pD=1e-10;function vD(t,n){const e=myt(t),r=e.filter(function(l){return yyt(l,t)});let i=0,a=0,o;const s=[];if(r.length>1){const l=byt(r);for(o=0;o<r.length;++o){const u=r[o];u.angle=Math.atan2(u.x-l.x,u.y-l.y)}r.sort(function(u,f){return f.angle-u.angle});let c=r[r.length-1];for(o=0;o<r.length;++o){const u=r[o];a+=(c.x+u.x)*(u.y-c.y);const f={x:(u.x+c.x)/2,y:(u.y+c.y)/2};let d=null;for(let h=0;h<u.parentIndex.length;++h)if(c.parentIndex.indexOf(u.parentIndex[h])>-1){const p=t[u.parentIndex[h]],g=Math.atan2(u.x-p.x,u.y-p.y),y=Math.atan2(c.x-p.x,c.y-p.y);let m=y-g;m<0&&(m+=2*Math.PI);const x=y-m/2;let _=Cf(f,{x:p.x+p.radius*Math.sin(x),y:p.y+p.radius*Math.cos(x)});_>p.radius*2&&(_=p.radius*2),(d===null||d.width>_)&&(d={circle:p,width:_,p1:u,p2:c})}d!==null&&(s.push(d),i+=_b(d.circle.radius,d.width),c=u)}}else{let l=t[0];for(o=1;o<t.length;++o)t[o].radius<l.radius&&(l=t[o]);let c=!1;for(o=0;o<t.length;++o)if(Cf(t[o],l)>Math.abs(l.radius-t[o].radius)){c=!0;break}c?i=a=0:(i=l.radius*l.radius*Math.PI,s.push({circle:l,p1:{x:l.x,y:l.y+l.radius},p2:{x:l.x-pD,y:l.y+l.radius},width:l.radius*2}))}return a/=2,n&&(n.area=i+a,n.arcArea=i,n.polygonArea=a,n.arcs=s,n.innerPoints=r,n.intersectionPoints=e),i+a}function yyt(t,n){for(let e=0;e<n.length;++e)if(Cf(t,n[e])>n[e].radius+pD)return!1;return!0}function myt(t){const n=[];for(let e=0;e<t.length;++e)for(let r=e+1;r<t.length;++r){const i=yD(t[e],t[r]);for(let a=0;a<i.length;++a){const o=i[a];o.parentIndex=[e,r],n.push(o)}}return n}function _b(t,n){return t*t*Math.acos(1-n/t)-(t-n)*Math.sqrt(n*(2*t-n))}function Cf(t,n){return Math.sqrt((t.x-n.x)*(t.x-n.x)+(t.y-n.y)*(t.y-n.y))}function gD(t,n,e){if(e>=t+n)return 0;if(e<=Math.abs(t-n))return Math.PI*Math.min(t,n)*Math.min(t,n);const r=t-(e*e-n*n+t*t)/(2*e),i=n-(e*e-t*t+n*n)/(2*e);return _b(t,r)+_b(n,i)}function yD(t,n){const e=Cf(t,n),r=t.radius,i=n.radius;if(e>=r+i||e<=Math.abs(r-i))return[];const a=(r*r-i*i+e*e)/(2*e),o=Math.sqrt(r*r-a*a),s=t.x+a*(n.x-t.x)/e,l=t.y+a*(n.y-t.y)/e,c=-(n.y-t.y)*(o/e),u=-(n.x-t.x)*(o/e);return[{x:s+c,y:l-u},{x:s-c,y:l+u}]}function byt(t){const n={x:0,y:0};for(let e=0;e<t.length;++e)n.x+=t[e].x,n.y+=t[e].y;return n.x/=t.length,n.y/=t.length,n}function xyt(t,n){n=n||{},n.maxIterations=n.maxIterations||500;const e=n.initialLayout||Syt,r=n.lossFunction||B_;t=_yt(t);const i=e(t,n),a=[],o=[];let s;for(s in i)i.hasOwnProperty(s)&&(a.push(i[s].x),a.push(i[s].y),o.push(s));const c=pyt(function(u){const f={};for(let d=0;d<o.length;++d){const h=o[d];f[h]={x:u[2*d],y:u[2*d+1],radius:i[h].radius}}return r(f,t)},a,n).x;for(let u=0;u<o.length;++u)s=o[u],i[s].x=c[2*u],i[s].y=c[2*u+1];return i}const mD=1e-10;function wb(t,n,e){return Math.min(t,n)*Math.min(t,n)*Math.PI<=e+mD?Math.abs(t-n):hyt(function(r){return gD(t,n,r)-e},0,t+n)}function _yt(t){t=t.slice();const n=[],e={};let r,i,a,o;for(r=0;r<t.length;++r){const s=t[r];s.sets.length==1?n.push(s.sets[0]):s.sets.length==2&&(a=s.sets[0],o=s.sets[1],e[[a,o]]=!0,e[[o,a]]=!0)}for(n.sort((s,l)=>s>l?1:-1),r=0;r<n.length;++r)for(a=n[r],i=r+1;i<n.length;++i)o=n[i],[a,o]in e||t.push({sets:[a,o],size:0});return t}function wyt(t,n,e){const r=VT(n.length,n.length),i=VT(n.length,n.length);return t.filter(function(a){return a.sets.length==2}).map(function(a){const o=e[a.sets[0]],s=e[a.sets[1]],l=Math.sqrt(n[o].size/Math.PI),c=Math.sqrt(n[s].size/Math.PI),u=wb(l,c,a.size);r[o][s]=r[s][o]=u;let f=0;a.size+1e-10>=Math.min(n[o].size,n[s].size)?f=1:a.size<=1e-10&&(f=-1),i[o][s]=i[s][o]=f}),{distances:r,constraints:i}}function Oyt(t,n,e,r){let i=0,a;for(a=0;a<n.length;++a)n[a]=0;for(a=0;a<e.length;++a){const o=t[2*a],s=t[2*a+1];for(let l=a+1;l<e.length;++l){const c=t[2*l],u=t[2*l+1],f=e[a][l],d=r[a][l],h=(c-o)*(c-o)+(u-s)*(u-s),p=Math.sqrt(h),g=h-f*f;d>0&&p<=f||d<0&&p>=f||(i+=2*g*g,n[2*a]+=4*g*(o-c),n[2*a+1]+=4*g*(s-u),n[2*l]+=4*g*(c-o),n[2*l+1]+=4*g*(u-s))}}return i}function Syt(t,n){let e=kyt(t,n);const r=n.lossFunction||B_;if(t.length>=8){const i=Eyt(t,n),a=r(i,t),o=r(e,t);a+1e-8<o&&(e=i)}return e}function Eyt(t,n){n=n||{};const e=n.restarts||10,r=[],i={};let a;for(a=0;a<t.length;++a){const g=t[a];g.sets.length==1&&(i[g.sets[0]]=r.length,r.push(g))}const o=wyt(t,r,i);let s=o.distances;const l=o.constraints,c=bb(s.map(bb))/s.length;s=s.map(function(g){return g.map(function(y){return y/c})});const u=function(g,y){return Oyt(g,y,s,l)};let f,d;for(a=0;a<e;++a){const g=mb(s.length*2).map(Math.random);d=gyt(u,g,n),(!f||d.fx<f.fx)&&(f=d)}const h=f.x,p={};for(a=0;a<r.length;++a){const g=r[a];p[g.sets[0]]={x:h[2*a]*c,y:h[2*a+1]*c,radius:Math.sqrt(g.size/Math.PI)}}if(n.history)for(a=0;a<n.history.length;++a)xb(n.history[a].x,c);return p}function kyt(t,n){const e=n&&n.lossFunction?n.lossFunction:B_,r={},i={};let a;for(let f=0;f<t.length;++f){const d=t[f];d.sets.length==1&&(a=d.sets[0],r[a]={x:1e10,y:1e10,rowid:Object.keys(r).length,size:d.size,radius:Math.sqrt(d.size/Math.PI)},i[a]=[])}t=t.filter(function(f){return f.sets.length==2});for(let f=0;f<t.length;++f){const d=t[f];let h=d.hasOwnProperty("weight")?d.weight:1;const p=d.sets[0],g=d.sets[1];d.size+mD>=Math.min(r[p].size,r[g].size)&&(h=0),i[p].push({set:g,size:d.size,weight:h}),i[g].push({set:p,size:d.size,weight:h})}const o=[];for(a in i)if(i.hasOwnProperty(a)){let f=0;for(let d=0;d<i[a].length;++d)f+=i[a][d].size*i[a][d].weight;o.push({set:a,size:f})}function s(f,d){return d.size-f.size}o.sort(s);const l={};function c(f){return f.set in l}function u(f,d){r[d].x=f.x,r[d].y=f.y,l[d]=!0}u({x:0,y:0},o[0].set);for(let f=1;f<o.length;++f){const d=o[f].set,h=i[d].filter(c);if(a=r[d],h.sort(s),h.length===0)throw"ERROR: missing pairwise overlap information";const p=[];for(let m=0;m<h.length;++m){const x=r[h[m].set],_=wb(a.radius,x.radius,h[m].size);p.push({x:x.x+_,y:x.y}),p.push({x:x.x-_,y:x.y}),p.push({y:x.y+_,x:x.x}),p.push({y:x.y-_,x:x.x});for(let w=m+1;w<h.length;++w){const O=r[h[w].set],S=wb(a.radius,O.radius,h[w].size),E=yD({x:x.x,y:x.y,radius:_},{x:O.x,y:O.y,radius:S});for(let M=0;M<E.length;++M)p.push(E[M])}}let g=1e50,y=p[0];for(let m=0;m<p.length;++m){r[d].x=p[m].x,r[d].y=p[m].y;const x=e(r,t);x<g&&(g=x,y=p[m])}u(y,d)}return r}function B_(t,n){let e=0;function r(i){return i.map(function(a){return t[a]})}for(let i=0;i<n.length;++i){const a=n[i];let o;if(a.sets.length==1)continue;if(a.sets.length==2){const l=t[a.sets[0]],c=t[a.sets[1]];o=gD(l.radius,c.radius,Cf(l,c))}else o=vD(r(a.sets));const s=a.hasOwnProperty("weight")?a.weight:1;e+=s*(o-a.size)*(o-a.size)}return e}function Myt(t){const n=function(e){const r=Math.max.apply(null,t.map(function(a){return a[e]+a.radius})),i=Math.min.apply(null,t.map(function(a){return a[e]-a.radius}));return{max:r,min:i}};return{xRange:n("x"),yRange:n("y")}}function Ayt(t,n,e,r){const i=[],a=[];for(const g in t)t.hasOwnProperty(g)&&(a.push(g),i.push(t[g]));n-=2*r,e-=2*r;const o=Myt(i),s=o.xRange,l=o.yRange;if(s.max==s.min||l.max==l.min)return console.log("not scaling solution: zero size detected"),t;const c=n/(s.max-s.min),u=e/(l.max-l.min),f=Math.min(u,c),d=(n-(s.max-s.min)*f)/2,h=(e-(l.max-l.min)*f)/2,p={};for(let g=0;g<i.length;++g){const y=i[g];p[a[g]]={radius:f*y.radius,x:r+d+(y.x-s.min)*f,y:r+h+(y.y-l.min)*f}}return p}function Tyt(t,n,e){const r=[],i=t-e,a=n;return r.push("M",i,a),r.push("A",e,e,0,1,0,i+2*e,a),r.push("A",e,e,0,1,0,i,a),r.join(" ")}function Pyt(t){const n={};vD(t,n);const e=n.arcs;if(e.length===0)return"M 0 0";if(e.length==1){const r=e[0].circle;return Tyt(r.x,r.y,r.radius)}else{const r=[`
175
+ M`,e[0].p2.x,e[0].p2.y];for(let i=0;i<e.length;++i){const a=e[i],o=a.circle.radius,s=a.width>o;r.push(`
176
+ A`,o,o,0,s?1:0,1,a.p1.x,a.p1.y)}return r.join(" ")}}const bD=t=>{const{sets:n="sets",size:e="size",as:r=["key","path"],padding:i=0}=t,[a,o]=r;return s=>{const l=s.map(f=>Object.assign(Object.assign({},f),{sets:f[n],size:f[e],[a]:f.sets.join("&")}));l.sort((f,d)=>f.sets.length-d.sets.length);const c=xyt(l);let u;return l.map(f=>{const d=f[n],h=({width:p,height:g})=>{u=u||Ayt(c,p,g,i);const y=d.map(x=>u[x]);let m=Pyt(y);return/[zZ]$/.test(m)||(m+=" Z"),m};return Object.assign(Object.assign({},f),{[o]:h})})}};bD.props={};const xD=()=>t=>(console.log("G2 data section:",t),t);xD.props={};function Cyt(t,n){if(n<0||n>1)throw new Error("alpha must be between 0 and 1.");if(t.length===0)return[];let e=t[0];const r=[];for(const i of t){if(i==null){r.push(i),console.warn("EMA\uFF1AThe value is null or undefined",t);continue}e==null&&(e=i);const a=e*n+(1-n)*i;r.push(a),e=a}return r}const _D=t=>{const{field:n="y",alpha:e=.6,as:r=n}=t;return i=>{const a=i.map(s=>s[n]),o=Cyt(a,e);return i.map((s,l)=>Object.assign(Object.assign({},s),{[r]:o[l]}))}};_D.props={};const wD=.01;function Lf(t){const{min:n,max:e}=t;return[[n[0],n[1]],[e[0],e[1]]]}function XT(t,n,e=wD){const[r,i]=t,[a,o]=n;return r>=a[0]-e&&r<=o[0]+e&&i>=a[1]-e&&i<=o[1]+e}function OD(t,n,e=wD){const[r,i]=t;return!(XT(r,n,e)&&XT(i,n,e))}function Lyt(t,n){const[e,r]=t,[i,a]=n;return e[0]<a[0]&&r[0]>i[0]&&e[1]<a[1]&&r[1]>i[1]}const Nyt=t=>{const{priority:n}=t;return e=>{const r=[];return n&&e.sort(n),e.forEach(i=>{z0(i);const a=i.getLocalBounds();r.some(s=>Lyt(Lf(a),Lf(s.getLocalBounds())))?w_(i):r.push(i)}),e}};function Ryt([t,n],[e,r]){return r>t&&n>e}function Kh(){const t=new Map;return[r=>t.get(r),(r,i)=>t.set(r,i)]}function Iyt(t){const n=t.cloneNode(!0),e=n.getElementById("connector");e&&n.removeChild(e);const{min:r,max:i}=n.getRenderBounds();return n.destroy(),{min:r,max:i}}const Dyt=t=>{const{maxIterations:n=10,maxError:e=.1,padding:r=1}=t;return i=>{const a=i.length;if(a<=1)return i;const[o,s]=Kh(),[l,c]=Kh(),[u,f]=Kh(),[d,h]=Kh();for(const p of i){const{min:g,max:y}=Iyt(p),[m,x]=g,[_,w]=y;s(p,x),c(p,x),f(p,w-x),h(p,[m,_])}for(let p=0;p<n;p++){i.sort((y,m)=>_n(l(y),l(m)));let g=0;for(let y=0;y<a-1;y++){const m=i[y];let x=y+1,_;for(;(_=i[x])&&!Ryt(d(m),d(_));)x+=1;if(_){const w=l(m),O=u(m),S=l(_),E=S-(w+O);if(E<r){const M=(r-E)/2;g=Math.max(g,M),c(m,w-M),c(_,S+M)}}}if(g<e)break}for(const p of i)p.style.y+=l(p)-o(p);return i}};function SD(t){return typeof t=="object"?t:$o(t)}function Rm(t){let n=t/255;return n=n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4),n}function qT(t,n,e){return .2126*Rm(t)+.7152*Rm(n)+.0722*Rm(e)}function ED(t,n){if(!t||!n||t===n)return 1;const{r:e,g:r,b:i}=t,{r:a,g:o,b:s}=n,l=qT(e,r,i),c=qT(a,o,s);return(Math.max(l,c)+.05)/(Math.min(l,c)+.05)}function kD(t,n){const e=_c(n,r=>ED(t,SD(r)));return n[e]}const $yt=t=>{const{threshold:n=4.5,palette:e=["#000","#fff"]}=t;return r=>(r.forEach(i=>{const a=i.attr("dependentElement").parsedStyle.fill,o=i.parsedStyle.fill;ED(o,a)<n&&i.attr("fill",kD(a,e))}),r)},jyt=()=>t=>(t.forEach(n=>{z0(n);const e=n.attr("bounds"),r=n.getLocalBounds();OD(Lf(r),e)&&w_(n)}),t),Fyt=(t,n)=>{const[[e,r],[i,a]]=n,[[o,s],[l,c]]=t;let u=0,f=0;return o<e?u=e-o:l>i&&(u=i-l),s<r?f=r-s:c>a&&(f=a-c),[u,f]},Byt=(t,n)=>!t||!t.min||!t.max?!n||!n.min||!n.max?{min:[0,0],max:[0,0]}:n:!n||!n.min||!n.max?t:{min:[Math.min(t.min[0],n.min[0]),Math.min(t.min[1],n.min[1])],max:[Math.max(t.max[0],n.max[0]),Math.max(t.max[1],n.max[1])]},zyt=(t={})=>(n,{canvas:e,layout:r})=>{const{bounds:i="view",offsetX:a=0,offsetY:o=0}=t,l=(()=>{if(i==="main"){const{x:c=0,y:u=0,width:f=0,height:d=0,marginLeft:h=0,marginRight:p=0,marginTop:g=0,marginBottom:y=0,paddingLeft:m=0,paddingRight:x=0,paddingTop:_=0,paddingBottom:w=0}=r;return[[c+h+m+a,u+g+_+o],[c+f-p-x-a,u+d-y-w-o]]}else{const{x:c=0,y:u=0,width:f=0,height:d=0}=r;return[[c+a,u+o],[c+f-a,u+d-o]]}})();return n.forEach(c=>{z0(c);const{max:u,min:f}=Byt(c.getRenderBounds(),c.getBounds());if(!u||!f||u[0]===0&&u[1]===0&&f[0]===0&&f[1]===0)return;const[d,h]=u,[p,g]=f,y=Fyt([[p,g],[d,h]],l);c.style.connector&&c.style.connectorPoints&&(c.style.connectorPoints[0][0]-=y[0],c.style.connectorPoints[0][1]-=y[1]),c.style.x+=y[0],c.style.y+=y[1]}),n};function KT(t){var n;const e=t.getAnimations();if(!e||e.length===0)return Tf(t);const r=t.cloneNode(!0);r.style.visibility="hidden",e.forEach(a=>{const o=a.effect.getKeyframes();o&&o.length>0&&r.attr(o[o.length-1])}),(n=t.parentNode)===null||n===void 0||n.appendChild(r);const i=Tf(r);return r.destroy(),i}const Wyt=t=>{const{palette:n=["#000","#fff"],threshold:e=2}=t;return r=>(r.forEach(i=>{var a,o;const s=i.attr("dependentElement"),l=(o=(a=i.attributes.fill)!==null&&a!==void 0?a:i.parsedStyle.fill)!==null&&o!==void 0?o:"#fff",c=Lf(KT(i)),u=Lf(KT(s));if(OD(c,u,e)){const f=kD(SD(l),n);i.attr("stroke",f)}else i.removeAttribute("stroke")}),r)};function Gyt(){return{"data.fetch":J8,"data.inline":oD,"data.sortBy":aD,"data.sort":nD,"data.filter":eD,"data.pick":rD,"data.rename":iD,"data.fold":tD,"data.slice":dD,"data.custom":sD,"data.map":lD,"data.join":fD,"data.kde":hD,"data.log":xD,"data.wordCloud":uD,"data.ema":_D,"transform.stackY":o3,"transform.binX":D3,"transform.bin":dx,"transform.dodgeX":g3,"transform.jitter":b3,"transform.jitterX":x3,"transform.jitterY":_3,"transform.symmetryY":w3,"transform.diffY":O3,"transform.stackEnter":y3,"transform.normalizeY":m3,"transform.select":r0,"transform.selectX":S3,"transform.selectY":E3,"transform.groupX":k3,"transform.groupY":M3,"transform.groupColor":A3,"transform.group":Hf,"transform.sortX":T3,"transform.sortY":C3,"transform.sortColor":P3,"transform.flexX":L3,"transform.pack":I3,"transform.sample":$3,"transform.filter":j3,"coordinate.cartesian":OP,"coordinate.polar":Rf,"coordinate.transpose":$b,"coordinate.theta":kP,"coordinate.parallel":Fb,"coordinate.fisheye":AP,"coordinate.radial":jb,"coordinate.radar":TP,"coordinate.helix":EP,"encode.constant":PP,"encode.field":LP,"encode.transform":CP,"encode.column":NP,"mark.interval":rR,"mark.rect":iR,"mark.line":aR,"mark.point":oR,"mark.text":sR,"mark.cell":lR,"mark.area":cR,"mark.link":k2,"mark.image":uR,"mark.polygon":fR,"mark.box":dR,"mark.vector":hR,"mark.lineX":vR,"mark.lineY":pR,"mark.connector":gR,"mark.range":yR,"mark.rangeX":mR,"mark.rangeY":bR,"mark.path":SR,"mark.shape":zR,"mark.density":r4,"mark.heatmap":i4,"mark.wordCloud":N2,"mark.beeswarm":o4,"palette.category10":c4,"palette.category20":u4,"scale.linear":d4,"scale.ordinal":h4,"scale.band":f4,"scale.identity":p4,"scale.point":v4,"scale.time":g4,"scale.log":y4,"scale.pow":m4,"scale.sqrt":w4,"scale.threshold":b4,"scale.quantile":x4,"scale.quantize":_4,"scale.sequential":O4,"scale.constant":S4,"theme.classic":E4,"theme.classicDark":M4,"theme.academy":A4,"theme.light":j2,"theme.dark":k4,"component.axisX":F4,"component.axisY":B4,"component.legendCategory":M_,"component.legendContinuous":ns,"component.legends":g8,"component.title":f8,"component.sliderX":d8,"component.sliderY":h8,"component.scrollbarX":p8,"component.scrollbarY":v8,"animation.scaleInX":T_,"animation.scaleOutX":Wvt,"animation.scaleInY":y8,"animation.scaleOutY":Gvt,"animation.waveIn":w8,"animation.fadeIn":m8,"animation.fadeOut":b8,"animation.zoomIn":t0t,"animation.zoomOut":e0t,"animation.pathIn":O8,"animation.morphing":_8,"animation.growInX":S8,"animation.growInY":E8,"interaction.elementHighlight":G0,"interaction.elementHighlightByX":k8,"interaction.elementHighlightByColor":M8,"interaction.elementHoverScale":A8,"interaction.elementSelect":Y0,"interaction.elementSelectByX":T8,"interaction.elementSelectByColor":P8,"interaction.fisheye":h0t,"interaction.chartIndex":C8,"interaction.tooltip":B8,"interaction.legendFilter":yvt,"interaction.legendHighlight":M0t,"interaction.brushHighlight":H0,"interaction.brushXHighlight":N0t,"interaction.brushYHighlight":R0t,"interaction.brushAxisHighlight":G0t,"interaction.brushFilter":j_,"interaction.brushXFilter":V0t,"interaction.brushYFilter":X0t,"interaction.sliderFilter":q8,"interaction.sliderWheel":K8,"interaction.scrollbarFilter":ugt,"interaction.poptip":Z8,"interaction.treemapDrillDown":mgt,"interaction.drillDown":Ogt,"interaction.elementPointMove":Tgt,"composition.spaceLayer":cI,"composition.spaceFlex":uI,"composition.facetRect":vI,"composition.repeatMatrix":Yct,"composition.facetCircle":Kct,"composition.timingKeyframe":gI,"labelTransform.overlapHide":Nyt,"labelTransform.overlapDodgeY":Dyt,"labelTransform.overflowHide":jyt,"labelTransform.contrastReverse":$yt,"labelTransform.overflowStroke":Wyt,"labelTransform.exceedAdjust":zyt}}function Yyt(){return{"composition.geoView":HI,"composition.geoPath":yI}}function Hyt(){return{"data.arc":A2,"data.cluster":JR,"mark.forceGraph":ZR,"mark.tree":e4,"mark.pack":$R,"mark.sankey":wR,"mark.chord":OR,"mark.treemap":DR,"mark.partition":l4}}function Uyt(){return{"data.venn":bD,"mark.boxplot":BR,"mark.gauge":n4,"mark.wordCloud":N2,"mark.liquid":a4}}function MD(){return Object.assign(Object.assign(Object.assign(Object.assign({},Yyt()),Hyt()),Uyt()),Gyt())}function Vyt(t,n){class e extends t{constructor(i){super(Object.assign(Object.assign({},i),{lib:n}))}}return e}const AD={};function TD(t,n){t.startsWith("symbol.")?mJ(t.split(".").pop(),n):Object.assign(AD,{[t]:n})}const Tl=t=>t?parseInt(t):0;function Xyt(t){const n=getComputedStyle(t),e=t.clientWidth||Tl(n.width),r=t.clientHeight||Tl(n.height),i=Tl(n.paddingLeft)+Tl(n.paddingRight),a=Tl(n.paddingTop)+Tl(n.paddingBottom);return{width:e-i,height:r-a}}function Im(t,n){const e=[t];for(;e.length;){const r=e.shift();n&&n(r);const i=r.children||[];for(const a of i)e.push(a)}}class z_{constructor(n={},e){this.parentNode=null,this.children=[],this.index=0,this.type=e,this.value=n}map(n=e=>e){const e=n(this.value);return this.value=e,this}attr(n,e){return arguments.length===1?this.value[n]:this.map(r=>(r[n]=e,r))}append(n){const e=new n({});return e.children=[],this.push(e),e}push(n){return n.parentNode=this,n.index=this.children.length,this.children.push(n),this}remove(){const n=this.parentNode;if(n){const{children:e}=n,r=e.findIndex(i=>i===this);e.splice(r,1)}return this}getNodeByKey(n){let e=null;return Im(this,i=>{n===i.attr("key")&&(e=i)}),e}getNodesByType(n){const e=[];return Im(this,i=>{n===i.type&&e.push(i)}),e}getNodeByType(n){let e=null;return Im(this,r=>{e||n===r.type&&(e=r)}),e}call(n,...e){return n(this.map(),...e),this}getRoot(){let n=this;for(;n&&n.parentNode;)n=n.parentNode;return n}}var PD=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};const Ob=["width","height","depth","padding","paddingLeft","paddingRight","paddingBottom","paddingTop","inset","insetLeft","insetRight","insetTop","insetBottom","margin","marginLeft","marginRight","marginTop","marginBottom","autoFit","theme","title","interaction"],CD="__remove__",LD="__callback__",ZT=1,QT=1;function qyt(t){if(t===void 0){const n=document.createElement("div");return n[CD]=!0,n}return typeof t=="string"?document.getElementById(t):t}function Kyt(t){const n=t.parentNode;n&&n.removeChild(t)}function Zyt(t){if(t.type!==null)return t;const n=t.children[t.children.length-1];for(const e of Ob)n.attr(e,t.attr(e));return n}function JT(t){return Object.assign(Object.assign({},t.value),{type:t.type})}function Dm(t,n){const{width:e,height:r,autoFit:i,depth:a=0}=t;let o=640,s=480;if(i){const{width:l,height:c}=Xyt(n);o=l||o,s=c||s}return o=e||o,s=r||s,{width:Math.max(Qe(o)?o:ZT,ZT),height:Math.max(Qe(s)?s:QT,QT),depth:a}}function Qyt(t){const n=Zyt(t),e=[n],r=new Map;for(r.set(n,JT(n));e.length;){const i=e.pop(),a=r.get(i),{children:o=[]}=i;for(const s of o)if(s.type===LD)a.children=s.value;else{const l=JT(s),{children:c=[]}=a;c.push(l),e.push(s),r.set(s,l),a.children=c}}return r.get(n)}function Jyt(t,n){return typeof t=="function"?!0:new Set(Object.keys(n)).has(t)}function tmt(t,n){return typeof t!="function"&&new Set(Object.keys(n)).has(t)}function emt(t,n,e,r,i){const{type:a}=t,{type:o=e||a}=n;if(tmt(o,i)){for(const s of Ob)t.attr(s)!==void 0&&n[s]===void 0&&(n[s]=t.attr(s));return n}if(Jyt(o,r)){const s={type:"view"},l=Object.assign({},n);for(const c of Ob)l[c]!==void 0&&(s[c]=l[c],delete l[c]);return Object.assign(Object.assign({},s),{children:[l]})}return n}function nmt(t,n,e){if(typeof t=="function")return n.mark;const i=Object.assign(Object.assign({},n),e)[t];if(!i)throw new Error(`Unknown mark: ${t}.`);return i}function rmt(t,n,e){if(typeof t=="function"){const l=new z_;return l.value=t,l.type=LD,l}const{type:r,children:i}=t,a=PD(t,["type","children"]),o=nmt(r,n,e),s=new o;return s.value=a,s.type=r,s}function imt(t,n){const{type:e,children:r}=n,i=PD(n,["type","children"]);t.type===e||e===void 0?JC(t.value,i):typeof e=="string"&&(t.type=e,t.value=i)}function amt(t,n,e,r){if(!t)return;const i=[[t,n]];for(;i.length;){const[a,o]=i.shift(),s=rmt(o,e,r);Array.isArray(a.children)&&a.push(s);const{children:l}=o;if(Array.isArray(l))for(const c of l)i.push([s,c]);else typeof l=="function"&&i.push([s,l])}}function omt(t,n,e,r,i){const a=emt(t,n,e,r,i),o=[[null,t,a]];for(;o.length;){const[s,l,c]=o.shift();if(!l)amt(s,c,r,i);else if(!c)l.remove();else{imt(l,c);const{children:u}=c,{children:f}=l;if(Array.isArray(u)&&Array.isArray(f)){const d=Math.max(u.length,f.length);for(let h=0;h<d;h++){const p=u[h],g=f[h];o.push([l,g,p])}}else typeof u=="function"&&o.push([l,null,u])}}}function smt(){let t,n;return[new Promise((r,i)=>{n=r,t=i}),n,t]}function lmt(t,n,{key:e=n}){t.prototype[n]=function(r){return arguments.length===0?this.attr(e):this.attr(e,r)}}function cmt(t,n,{key:e=n}){t.prototype[n]=function(r){if(arguments.length===0)return this.attr(e);if(Array.isArray(r))return this.attr(e,r);const i=[...this.attr(e)||[],r];return this.attr(e,i)}}function umt(t,n,{key:e=n}){t.prototype[n]=function(r,i){if(arguments.length===0)return this.attr(e);if(arguments.length===1&&typeof r!="string")return this.attr(e,r);const a=this.attr(e)||{};return a[r]=arguments.length===1?!0:i,this.attr(e,a)}}function fmt(t,n,e){t.prototype[n]=function(r){if(arguments.length===0)return this.attr(n);if(Array.isArray(r))return this.attr(n,{items:r});if(ic(r)&&(r.title!==void 0||r.items!==void 0))return this.attr(n,r);if(r===null||r===!1)return this.attr(n,r);const i=this.attr(n)||{},{items:a=[]}=i;return a.push(r),i.items=a,this.attr(n,i)}}function dmt(t,n,{ctor:e}){t.prototype[n]=function(r){const i=this.append(e);return n==="mark"&&(i.type=r),i}}function hmt(t,n,{ctor:e}){t.prototype[n]=function(){return this.type=null,this.append(e)}}function Av(t){return n=>{for(const[e,r]of Object.entries(t)){const{type:i}=r;i==="value"?lmt(n,e,r):i==="array"?cmt(n,e,r):i==="object"?umt(n,e,r):i==="node"?dmt(n,e,r):i==="container"?hmt(n,e,r):i==="mix"&&fmt(n,e)}return n}}function tP(t){return Object.fromEntries(Object.entries(t).map(([n,e])=>[n,{type:"node",ctor:e}]))}const ND={encode:{type:"object"},scale:{type:"object"},data:{type:"value"},transform:{type:"array"},style:{type:"object"},animate:{type:"object"},coordinate:{type:"object"},interaction:{type:"object"},label:{type:"array",key:"labels"},axis:{type:"object"},legend:{type:"object"},slider:{type:"object"},scrollbar:{type:"object"},state:{type:"object"},layout:{type:"object"},theme:{type:"object"},title:{type:"value"}},pmt=Object.assign(Object.assign({},ND),{tooltip:{type:"mix"},viewStyle:{type:"object"}}),vmt=Object.assign(Object.assign({},ND),{labelTransform:{type:"array"}});var gmt=function(t,n,e,r){var i=arguments.length,a=i<3?n:r===null?r=Object.getOwnPropertyDescriptor(n,e):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,n,e,r);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(n,e,a):o(n,e))||a);return i>3&&a&&Object.defineProperty(n,e,a),a};let Tv=class extends z_{changeData(n){var e;const r=this.getRoot();if(r)return this.attr("data",n),!((e=this.children)===null||e===void 0)&&e.length&&this.children.forEach(i=>{i.attr("data",n)}),r==null?void 0:r.render()}getView(){const n=this.getRoot(),{views:e}=n.getContext();if(e!=null&&e.length)return e.find(r=>r.key===this._key)}getScale(){var n;return(n=this.getView())===null||n===void 0?void 0:n.scale}getScaleByChannel(n){const e=this.getScale();if(e)return e[n]}getCoordinate(){var n;return(n=this.getView())===null||n===void 0?void 0:n.coordinate}getTheme(){var n;return(n=this.getView())===null||n===void 0?void 0:n.theme}getGroup(){const n=this._key;return n?this.getRoot().getContext().canvas.getRoot().getElementById(n):void 0}show(){const n=this.getGroup();n&&!n.isVisible()&&z0(n)}hide(){const n=this.getGroup();n&&n.isVisible()&&w_(n)}};Tv=gmt([Av(vmt)],Tv);var ymt=function(t,n,e,r){var i=arguments.length,a=i<3?n:r===null?r=Object.getOwnPropertyDescriptor(n,e):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,n,e,r);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(n,e,a):o(n,e))||a);return i>3&&a&&Object.defineProperty(n,e,a),a};let Sb=class extends z_{changeData(n){const e=this.getRoot();if(e)return this.attr("data",n),e==null?void 0:e.render()}getMark(){var n;const e=(n=this.getRoot())===null||n===void 0?void 0:n.getView();if(!e)return;const{markState:r}=e,i=Array.from(r.keys()).find(a=>a.key===this.attr("key"));return r.get(i)}getScale(){var n;const e=(n=this.getRoot())===null||n===void 0?void 0:n.getView();if(e)return e==null?void 0:e.scale}getScaleByChannel(n){var e,r;const i=(e=this.getRoot())===null||e===void 0?void 0:e.getView();if(i)return(r=i==null?void 0:i.scale)===null||r===void 0?void 0:r[n]}getGroup(){const n=this.attr("key");return n?this.getRoot().getContext().canvas.getRoot().getElementById(n):void 0}};Sb=ymt([Av(pmt)],Sb);var mmt=function(t,n,e,r){var i=arguments.length,a=i<3?n:r===null?r=Object.getOwnPropertyDescriptor(n,e):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,n,e,r);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(n,e,a):o(n,e))||a);return i>3&&a&&Object.defineProperty(n,e,a),a},bmt=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};const xmt="G2_CHART_KEY";class _mt extends Tv{constructor(n){const{container:e,canvas:r,renderer:i,plugins:a,lib:o,createCanvas:s}=n,l=bmt(n,["container","canvas","renderer","plugins","lib","createCanvas"]);super(l,"view"),this._hasBindAutoFit=!1,this._rendering=!1,this._trailingClear=null,this._trailing=!1,this._trailingResolve=null,this._trailingReject=null,this._previousDefinedType=null,this._onResize=WP(()=>{this.forceFit()},300),this._renderer=i||new K4,this._plugins=a||[],this._container=qyt(e),this._emitter=new W2,this._context={library:Object.assign(Object.assign({},o),AD),emitter:this._emitter,canvas:r,createCanvas:s},this._create()}render(){if(this._rendering)return this._addToTrailing();this._context.canvas||this._createCanvas(),this._bindAutoFit(),this._rendering=!0;const n=new Promise((a,o)=>Ypt(this._computedOptions(),this._context,this._createResolve(a),this._createReject(o))),[e,r,i]=smt();return n.then(r).then(()=>{if(this._trailingClear){const a=this.options();this._trailingClear(),this._trailing&&this.options(a)}}).catch(i).then(()=>{this._trailingClear=null,this._renderTrailing()}),e}options(n){if(arguments.length===0)return Qyt(this);const{type:e}=n;return e&&(this._previousDefinedType=e),omt(this,n,this._previousDefinedType,this._marks,this._compositions),this}getContainer(){return this._container}getContext(){return this._context}on(n,e,r){return this._emitter.on(n,e,r),this}once(n,e){return this._emitter.once(n,e),this}emit(n,...e){return this._emitter.emit(n,...e),this}off(n,e){return this._emitter.off(n,e),this}clear(n=!0){if(this._rendering){this._trailingClear=()=>{this.clear(n)},this._reset();return}const e=this.options();this.emit(Ae.BEFORE_CLEAR),this._reset(),gT(e,this._context,!1,n),this.emit(Ae.AFTER_CLEAR)}destroy(){const n=this.options();this.emit(Ae.BEFORE_DESTROY),this._unbindAutoFit(),this._reset(),gT(n,this._context,!0),this._container[CD]&&Kyt(this._container),this.emit(Ae.AFTER_DESTROY)}forceFit(){this.options.autoFit=!0;const{width:n,height:e}=Dm(this.options(),this._container);if(n===this._width&&e===this._height)return Promise.resolve(this);this.emit(Ae.BEFORE_CHANGE_SIZE);const r=this.render();return r.then(()=>{this.emit(Ae.AFTER_CHANGE_SIZE)}),r}changeSize(n,e){if(n===this._width&&e===this._height)return Promise.resolve(this);this.emit(Ae.BEFORE_CHANGE_SIZE),this.attr("width",n),this.attr("height",e);const r=this.render();return r.then(()=>{this.emit(Ae.AFTER_CHANGE_SIZE)}),r}getDataByXY(n,e={}){const{shared:r=!1,series:i,facet:a=!1,startX:o=0,startY:s=0}=e,{canvas:l,views:c}=this._context,{document:u}=l,{x:f,y:d}=n,{coordinate:h,scale:p,markState:g,data:y,key:m}=c[0],x=u.getElementsByClassName(oa),_=r?P=>P.__data__.x:P=>P,w=Ue(x,_),O=u.getElementsByClassName(Qp)[0],S=Li(O),E=P=>Array.from(P.values()).some(N=>{var C,R;return((C=N.interaction)===null||C===void 0?void 0:C.seriesTooltip)||((R=N.channels)===null||R===void 0?void 0:R.some(D=>D.name==="series"&&D.values!==void 0))}),M=aa(i,E(g)),A=P=>zt(P,"__data__.data",null),T=P=>P.map(A);try{if(M&&E(g)&&!a){const{selectedData:R}=F8({root:S,event:{offsetX:f,offsetY:d},elements:x,coordinate:h,scale:p,startX:o,startY:s}),D=y.get(`${m}-0`);return R.map(({index:F})=>D[F])}const P=j8({root:S,event:{offsetX:f,offsetY:d},elements:x,coordinate:h,scale:p,shared:r});if(Zv(P))return ix(P,y.get(m));const N=_(P),C=w.get(N);return C?T(C):[]}catch{const N=l.document.elementFromPointSync(f,d);return N?A(N):[]}}_create(){const{library:n}=this._context,e=a=>a.startsWith("mark.")||a==="component.axisX"||a==="component.axisY"||a==="component.legends",r=["mark.mark",...Object.keys(n).filter(e)];this._marks={};for(const a of r){const o=a.split(".").pop();class s extends Sb{constructor(){super({},o)}}this._marks[o]=s,this[o]=function(l){const c=this.append(s);return o==="mark"&&(c.type=l),c}}const i=["composition.view",...Object.keys(n).filter(a=>a.startsWith("composition.")&&a!=="composition.mark")];this._compositions=Object.fromEntries(i.map(a=>{const o=a.split(".").pop();let s=class extends Tv{constructor(){super({},o)}};return s=mmt([Av(tP(this._marks))],s),[o,s]}));for(const a of Object.values(this._compositions))Av(tP(this._compositions))(a);for(const a of i){const o=a.split(".").pop();this[o]=function(){const s=this._compositions[o];return this.type=null,this.append(s)}}}_reset(){const n=["theme","type","width","height","autoFit"];this.type="view",this.value=Object.fromEntries(Object.entries(this.value).filter(([e])=>e.startsWith("margin")||e.startsWith("padding")||e.startsWith("inset")||n.includes(e))),this.children=[]}_renderTrailing(){this._trailing&&(this._trailing=!1,this.render().then(()=>{const n=this._trailingResolve.bind(this);this._trailingResolve=null,n(this)}).catch(n=>{const e=this._trailingReject.bind(this);this._trailingReject=null,e(n)}))}_createResolve(n){return()=>{this._rendering=!1,n(this)}}_createReject(n){return e=>{this._rendering=!1,n(e)}}_computedOptions(){const n=this.options(),{key:e=xmt}=n,{width:r,height:i,depth:a}=Dm(n,this._container);return this._width=r,this._height=i,this._key=e,Object.assign(Object.assign({key:this._key},n),{width:r,height:i,depth:a})}_createCanvas(){var n,e;const{width:r,height:i}=Dm(this.options(),this._container);this._plugins.push(new Q4),this._plugins.forEach(o=>this._renderer.registerPlugin(o)),this._context.canvas=new U5({container:this._container,width:r,height:i,renderer:this._renderer});const a=(e=(n=this._context.canvas)===null||n===void 0?void 0:n.getContextService())===null||e===void 0?void 0:e.getDomElement();a&&(a.style.display="block")}_addToTrailing(){var n;return(n=this._trailingResolve)===null||n===void 0||n.call(this,this),this._trailing=!0,new Promise((r,i)=>{this._trailingResolve=r,this._trailingReject=i})}_bindAutoFit(){const n=this.options(),{autoFit:e}=n;if(this._hasBindAutoFit){e||this._unbindAutoFit();return}e&&(this._hasBindAutoFit=!0,window.addEventListener("resize",this._onResize))}_unbindAutoFit(){this._hasBindAutoFit&&(this._hasBindAutoFit=!1,window.removeEventListener("resize",this._onResize))}}Object.assign({},MD());const wmt="modulepreload",Omt=function(t,n){return new URL(t,n).href},eP={},nP=function(n,e,r){let i=Promise.resolve();if(e&&e.length>0){let o=function(u){return Promise.all(u.map(f=>Promise.resolve(f).then(d=>({status:"fulfilled",value:d}),d=>({status:"rejected",reason:d}))))};const s=document.getElementsByTagName("link"),l=document.querySelector("meta[property=csp-nonce]"),c=(l==null?void 0:l.nonce)||(l==null?void 0:l.getAttribute("nonce"));i=o(e.map(u=>{if(u=Omt(u,r),u in eP)return;eP[u]=!0;const f=u.endsWith(".css"),d=f?'[rel="stylesheet"]':"";if(!!r)for(let g=s.length-1;g>=0;g--){const y=s[g];if(y.href===u&&(!f||y.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${u}"]${d}`))return;const p=document.createElement("link");if(p.rel=f?"stylesheet":wmt,f||(p.as="script"),p.crossOrigin="",p.href=u,c&&p.setAttribute("nonce",c),document.head.appendChild(p),f)return new Promise((g,y)=>{p.addEventListener("load",g),p.addEventListener("error",()=>y(new Error(`Unable to preload CSS for ${u}`)))})}))}function a(o){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=o,window.dispatchEvent(s),!s.defaultPrevented)throw o}return i.then(o=>{for(const s of o||[])s.status==="rejected"&&a(s.reason);return n().catch(a)})};var RD=function(t,n,e,r){function i(a){return a instanceof e?a:new e(function(o){o(a)})}return new(e||(e=Promise))(function(a,o){function s(u){try{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?a(u.value):i(u.value).then(s,l)}c((r=r.apply(t,n||[])).next())})},ID=function(t,n){var e={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return o.next=s(0),o.throw=s(1),o.return=s(2),typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(c){return function(u){return l([c,u])}}function l(c){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(e=0)),e;)try{if(r=1,i&&(a=c[0]&2?i.return:c[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,c[1])).done)return a;switch(i=0,a&&(c=[c[0]&2,a.value]),c[0]){case 0:case 1:a=c;break;case 4:return e.label++,{value:c[1],done:!1};case 5:e.label++,i=c[1],c=[0];continue;case 7:c=e.ops.pop(),e.trys.pop();continue;default:if(a=e.trys,!(a=a.length>0&&a[a.length-1])&&(c[0]===6||c[0]===2)){e=0;continue}if(c[0]===3&&(!a||c[1]>a[0]&&c[1]<a[3])){e.label=c[1];break}if(c[0]===6&&e.label<a[1]){e.label=a[1],a=c;break}if(a&&e.label<a[2]){e.label=a[2],e.ops.push(c);break}a[2]&&e.ops.pop(),e.trys.pop();continue}c=n.call(t,e)}catch(u){c=[6,u],i=0}finally{r=a=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},$m="__rc_react_root__",W_,Eb,rP=!1;function Smt(){return RD(this,void 0,void 0,function(){var t,n,e,r,i;return ID(this,function(a){switch(a.label){case 0:if(rP)return[2];rP=!0,a.label=1;case 1:return a.trys.push([1,6,,7]),t=ao.version||"",n=parseInt(t.split(".")[0],10),n>=18?[4,nP(()=>import("./assets/client-BNiIqwJU.js").then(o=>o.c),__vite__mapDeps([0,1]),import.meta.url)]:[3,3];case 2:return e=a.sent(),W_=e.createRoot,[3,5];case 3:return[4,nP(()=>import("react-dom"),[],import.meta.url)];case 4:r=a.sent(),Eb=r.render,r.unmountComponentAtNode,a.label=5;case 5:return[3,7];case 6:return i=a.sent(),console.warn("[react-render] Failed to load ReactDOM API:",i),[3,7];case 7:return[2]}})})}function Emt(t,n){n[$m]||(n[$m]=W_(n)),n[$m].render(t)}function kmt(t,n){if(!Eb)throw new Error("ReactDOM.render not available");Eb(t,n)}function Mmt(t,n){return RD(this,void 0,void 0,function(){return ID(this,function(e){switch(e.label){case 0:return[4,Smt()];case 1:return e.sent(),W_?Emt(t,n):kmt(t,n),[2]}})})}var pp=new Map;typeof document<"u"&&pp.set("tooltip",document.createElement("div"));var Amt=function(t,n){n===void 0&&(n=!1);var e=null;if(n)e=pp.get("tooltip");else if(e=document.createElement("div"),t!=null&&t.key){var r=pp.get(t.key);r?e=r:pp.set(t.key,e)}return Mmt(t,e),e},kb=function(){return kb=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++){n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},kb.apply(this,arguments)},Tmt=function(t,n){if(n===void 0&&(n={}),typeof document>"u")return"loading";var e="";n&&Object.keys(n).forEach(function(o){e+="".concat(o,": ").concat(n[o],`;
177
+ `)});var r=t.attachShadow({mode:"open"}),i=document.createElement("div"),a=document.createElement("style");a.innerHTML=`.loading {
178
+ display: inline-block;
179
+ position: relative;
180
+ width: 80px;
181
+ height: 80px;
182
+ }
183
+ .loading div {
184
+ position: absolute;
185
+ top: 33px;
186
+ width: 13px;
187
+ height: 13px;
188
+ border-radius: 50%;
189
+ background: #ccc;
190
+ animation-timing-function: cubic-bezier(0, 1, 1, 0);
191
+ `.concat(e,`
192
+ }
193
+ .loading div:nth-child(1) {
194
+ left: 8px;
195
+ animation: loading1 0.6s infinite;
196
+ }
197
+ .loading div:nth-child(2) {
198
+ left: 8px;
199
+ animation: loading2 0.6s infinite;
200
+ }
201
+ .loading div:nth-child(3) {
202
+ left: 32px;
203
+ animation: loading2 0.6s infinite;
204
+ }
205
+ .loading div:nth-child(4) {
206
+ left: 56px;
207
+ animation: loading3 0.6s infinite;
208
+ }
209
+ @keyframes loading1 {
210
+ 0% {
211
+ transform: scale(0);
212
+ }
213
+ 100% {
214
+ transform: scale(1);
215
+ }
216
+ }
217
+ @keyframes loading3 {
218
+ 0% {
219
+ transform: scale(1);
220
+ }
221
+ 100% {
222
+ transform: scale(0);
223
+ }
224
+ }
225
+ @keyframes loading2 {
226
+ 0% {
227
+ transform: translate(0, 0);
228
+ }
229
+ 100% {
230
+ transform: translate(24px, 0);
231
+ }
232
+ }
233
+ `),i.classList.add("loading"),i.innerHTML="<div></div><div></div><div></div><div></div>",r.appendChild(a),r.appendChild(i)},Pmt=function(t){var n=t.loadingTemplate,e=t.theme,r=e===void 0?"light":e,i=t.loading,a=Zn.useRef(null),o=typeof i=="object"?i:{},s=o.container,l=s===void 0?{}:s,c=o.icon,u=c===void 0?{}:c;Zn.useEffect(function(){!n&&a.current&&Tmt(a.current,u)},[]);var f=function(){return n||Zn.createElement("div",{ref:a})};return Zn.createElement("div",{className:"charts-loading-container",style:kb({position:"absolute",width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",left:0,top:0,zIndex:99,background:r==="dark"?"rgb(20, 20, 20)":"rgb(255, 255, 255)"},l)},f())},Cmt=(function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(n,e)};return function(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");t(n,e);function r(){this.constructor=n}n.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})(),Lmt=(function(t){Cmt(n,t);function n(){var e=t!==null&&t.apply(this,arguments)||this;return e.state={hasError:!1},e.renderError=function(r){var i=e.props.errorTemplate;return typeof i=="function"?i(r):i||Zn.createElement("h5",null,"\u7EC4\u4EF6\u51FA\u9519\u4E86\uFF0C\u8BF7\u6838\u67E5\u540E\u91CD\u8BD5\uFF1A ",r.message)},e}return n.getDerivedStateFromError=function(e){return{hasError:!0,error:e}},n.getDerivedStateFromProps=function(e,r){return r.children!==e.children?{children:e.children,hasError:!1,error:void 0}:null},n.prototype.render=function(){return this.state.hasError?this.renderError(this.state.error):Zn.createElement(wW,null,this.props.children)},n})(Zn.Component),Cu={exports:{}};/**
234
+ * @license
235
+ * Lodash <https://lodash.com/>
236
+ * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
237
+ * Released under MIT license <https://lodash.com/license>
238
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
239
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
240
+ */var Nmt=Cu.exports,iP;function Rmt(){return iP||(iP=1,(function(t,n){(function(){var e,r="4.17.23",i=200,a="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",o="Expected a function",s="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",c=500,u="__lodash_placeholder__",f=1,d=2,h=4,p=1,g=2,y=1,m=2,x=4,_=8,w=16,O=32,S=64,E=128,M=256,A=512,T=30,P="...",N=800,C=16,R=1,D=2,F=3,j=1/0,I=9007199254740991,$=17976931348623157e292,z=NaN,Y=4294967295,H=Y-1,V=Y>>>1,Z=[["ary",E],["bind",y],["bindKey",m],["curry",_],["curryRight",w],["flip",A],["partial",O],["partialRight",S],["rearg",M]],q="[object Arguments]",J="[object Array]",rt="[object AsyncFunction]",K="[object Boolean]",ot="[object Date]",vt="[object DOMException]",yt="[object Error]",mt="[object Function]",wt="[object GeneratorFunction]",Ot="[object Map]",At="[object Number]",$t="[object Null]",kt="[object Object]",Mt="[object Promise]",Ct="[object Proxy]",ve="[object RegExp]",ne="[object Set]",Zt="[object String]",Pe="[object Symbol]",qe="[object Undefined]",Se="[object WeakMap]",ge="[object WeakSet]",Ee="[object ArrayBuffer]",Ke="[object DataView]",$e="[object Float32Array]",we="[object Float64Array]",Nn="[object Int8Array]",an="[object Int16Array]",rr="[object Int32Array]",Ni="[object Uint8Array]",Ki="[object Uint8ClampedArray]",co="[object Uint16Array]",Cc="[object Uint32Array]",V0=/\b__p \+= '';/g,WD=/\b(__p \+=) '' \+/g,GD=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Y_=/&(?:amp|lt|gt|quot|#39);/g,H_=/[&<>"']/g,YD=RegExp(Y_.source),HD=RegExp(H_.source),UD=/<%-([\s\S]+?)%>/g,VD=/<%([\s\S]+?)%>/g,U_=/<%=([\s\S]+?)%>/g,XD=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,qD=/^\w*$/,KD=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,X0=/[\\^$.*+?()[\]{}|]/g,ZD=RegExp(X0.source),q0=/^\s+/,QD=/\s/,JD=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,t$=/\{\n\/\* \[wrapped with (.+)\] \*/,e$=/,? & /,n$=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,r$=/[()=,{}\[\]\/\s]/,i$=/\\(\\)?/g,a$=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,V_=/\w*$/,o$=/^[-+]0x[0-9a-f]+$/i,s$=/^0b[01]+$/i,l$=/^\[object .+?Constructor\]$/,c$=/^0o[0-7]+$/i,u$=/^(?:0|[1-9]\d*)$/,f$=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,sd=/($^)/,d$=/['\n\r\u2028\u2029\\]/g,ld="\\ud800-\\udfff",h$="\\u0300-\\u036f",p$="\\ufe20-\\ufe2f",v$="\\u20d0-\\u20ff",X_=h$+p$+v$,q_="\\u2700-\\u27bf",K_="a-z\\xdf-\\xf6\\xf8-\\xff",g$="\\xac\\xb1\\xd7\\xf7",y$="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",m$="\\u2000-\\u206f",b$=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Z_="A-Z\\xc0-\\xd6\\xd8-\\xde",Q_="\\ufe0e\\ufe0f",J_=g$+y$+m$+b$,K0="['\u2019]",x$="["+ld+"]",tw="["+J_+"]",cd="["+X_+"]",ew="\\d+",_$="["+q_+"]",nw="["+K_+"]",rw="[^"+ld+J_+ew+q_+K_+Z_+"]",Z0="\\ud83c[\\udffb-\\udfff]",w$="(?:"+cd+"|"+Z0+")",iw="[^"+ld+"]",Q0="(?:\\ud83c[\\udde6-\\uddff]){2}",J0="[\\ud800-\\udbff][\\udc00-\\udfff]",sl="["+Z_+"]",aw="\\u200d",ow="(?:"+nw+"|"+rw+")",O$="(?:"+sl+"|"+rw+")",sw="(?:"+K0+"(?:d|ll|m|re|s|t|ve))?",lw="(?:"+K0+"(?:D|LL|M|RE|S|T|VE))?",cw=w$+"?",uw="["+Q_+"]?",S$="(?:"+aw+"(?:"+[iw,Q0,J0].join("|")+")"+uw+cw+")*",E$="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",k$="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",fw=uw+cw+S$,M$="(?:"+[_$,Q0,J0].join("|")+")"+fw,A$="(?:"+[iw+cd+"?",cd,Q0,J0,x$].join("|")+")",T$=RegExp(K0,"g"),P$=RegExp(cd,"g"),tg=RegExp(Z0+"(?="+Z0+")|"+A$+fw,"g"),C$=RegExp([sl+"?"+nw+"+"+sw+"(?="+[tw,sl,"$"].join("|")+")",O$+"+"+lw+"(?="+[tw,sl+ow,"$"].join("|")+")",sl+"?"+ow+"+"+sw,sl+"+"+lw,k$,E$,ew,M$].join("|"),"g"),L$=RegExp("["+aw+ld+X_+Q_+"]"),N$=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,R$=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],I$=-1,cn={};cn[$e]=cn[we]=cn[Nn]=cn[an]=cn[rr]=cn[Ni]=cn[Ki]=cn[co]=cn[Cc]=!0,cn[q]=cn[J]=cn[Ee]=cn[K]=cn[Ke]=cn[ot]=cn[yt]=cn[mt]=cn[Ot]=cn[At]=cn[kt]=cn[ve]=cn[ne]=cn[Zt]=cn[Se]=!1;var on={};on[q]=on[J]=on[Ee]=on[Ke]=on[K]=on[ot]=on[$e]=on[we]=on[Nn]=on[an]=on[rr]=on[Ot]=on[At]=on[kt]=on[ve]=on[ne]=on[Zt]=on[Pe]=on[Ni]=on[Ki]=on[co]=on[Cc]=!0,on[yt]=on[mt]=on[Se]=!1;var D$={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},$$={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},j$={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},F$={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},B$=parseFloat,z$=parseInt,dw=typeof Kd=="object"&&Kd&&Kd.Object===Object&&Kd,W$=typeof self=="object"&&self&&self.Object===Object&&self,ir=dw||W$||Function("return this")(),eg=n&&!n.nodeType&&n,rs=eg&&!0&&t&&!t.nodeType&&t,hw=rs&&rs.exports===eg,ng=hw&&dw.process,ni=(function(){try{var et=rs&&rs.require&&rs.require("util").types;return et||ng&&ng.binding&&ng.binding("util")}catch{}})(),pw=ni&&ni.isArrayBuffer,vw=ni&&ni.isDate,gw=ni&&ni.isMap,yw=ni&&ni.isRegExp,mw=ni&&ni.isSet,bw=ni&&ni.isTypedArray;function Yr(et,lt,st){switch(st.length){case 0:return et.call(lt);case 1:return et.call(lt,st[0]);case 2:return et.call(lt,st[0],st[1]);case 3:return et.call(lt,st[0],st[1],st[2])}return et.apply(lt,st)}function G$(et,lt,st,Tt){for(var Xt=-1,Ce=et==null?0:et.length;++Xt<Ce;){var qn=et[Xt];lt(Tt,qn,st(qn),et)}return Tt}function ri(et,lt){for(var st=-1,Tt=et==null?0:et.length;++st<Tt&&lt(et[st],st,et)!==!1;);return et}function Y$(et,lt){for(var st=et==null?0:et.length;st--&&lt(et[st],st,et)!==!1;);return et}function xw(et,lt){for(var st=-1,Tt=et==null?0:et.length;++st<Tt;)if(!lt(et[st],st,et))return!1;return!0}function uo(et,lt){for(var st=-1,Tt=et==null?0:et.length,Xt=0,Ce=[];++st<Tt;){var qn=et[st];lt(qn,st,et)&&(Ce[Xt++]=qn)}return Ce}function ud(et,lt){var st=et==null?0:et.length;return!!st&&ll(et,lt,0)>-1}function rg(et,lt,st){for(var Tt=-1,Xt=et==null?0:et.length;++Tt<Xt;)if(st(lt,et[Tt]))return!0;return!1}function hn(et,lt){for(var st=-1,Tt=et==null?0:et.length,Xt=Array(Tt);++st<Tt;)Xt[st]=lt(et[st],st,et);return Xt}function fo(et,lt){for(var st=-1,Tt=lt.length,Xt=et.length;++st<Tt;)et[Xt+st]=lt[st];return et}function ig(et,lt,st,Tt){var Xt=-1,Ce=et==null?0:et.length;for(Tt&&Ce&&(st=et[++Xt]);++Xt<Ce;)st=lt(st,et[Xt],Xt,et);return st}function H$(et,lt,st,Tt){var Xt=et==null?0:et.length;for(Tt&&Xt&&(st=et[--Xt]);Xt--;)st=lt(st,et[Xt],Xt,et);return st}function ag(et,lt){for(var st=-1,Tt=et==null?0:et.length;++st<Tt;)if(lt(et[st],st,et))return!0;return!1}var U$=og("length");function V$(et){return et.split("")}function X$(et){return et.match(n$)||[]}function _w(et,lt,st){var Tt;return st(et,function(Xt,Ce,qn){if(lt(Xt,Ce,qn))return Tt=Ce,!1}),Tt}function fd(et,lt,st,Tt){for(var Xt=et.length,Ce=st+(Tt?1:-1);Tt?Ce--:++Ce<Xt;)if(lt(et[Ce],Ce,et))return Ce;return-1}function ll(et,lt,st){return lt===lt?oj(et,lt,st):fd(et,ww,st)}function q$(et,lt,st,Tt){for(var Xt=st-1,Ce=et.length;++Xt<Ce;)if(Tt(et[Xt],lt))return Xt;return-1}function ww(et){return et!==et}function Ow(et,lt){var st=et==null?0:et.length;return st?lg(et,lt)/st:z}function og(et){return function(lt){return lt==null?e:lt[et]}}function sg(et){return function(lt){return et==null?e:et[lt]}}function Sw(et,lt,st,Tt,Xt){return Xt(et,function(Ce,qn,Je){st=Tt?(Tt=!1,Ce):lt(st,Ce,qn,Je)}),st}function K$(et,lt){var st=et.length;for(et.sort(lt);st--;)et[st]=et[st].value;return et}function lg(et,lt){for(var st,Tt=-1,Xt=et.length;++Tt<Xt;){var Ce=lt(et[Tt]);Ce!==e&&(st=st===e?Ce:st+Ce)}return st}function cg(et,lt){for(var st=-1,Tt=Array(et);++st<et;)Tt[st]=lt(st);return Tt}function Z$(et,lt){return hn(lt,function(st){return[st,et[st]]})}function Ew(et){return et&&et.slice(0,Tw(et)+1).replace(q0,"")}function Hr(et){return function(lt){return et(lt)}}function ug(et,lt){return hn(lt,function(st){return et[st]})}function Lc(et,lt){return et.has(lt)}function kw(et,lt){for(var st=-1,Tt=et.length;++st<Tt&&ll(lt,et[st],0)>-1;);return st}function Mw(et,lt){for(var st=et.length;st--&&ll(lt,et[st],0)>-1;);return st}function Q$(et,lt){for(var st=et.length,Tt=0;st--;)et[st]===lt&&++Tt;return Tt}var J$=sg(D$),tj=sg($$);function ej(et){return"\\"+F$[et]}function nj(et,lt){return et==null?e:et[lt]}function cl(et){return L$.test(et)}function rj(et){return N$.test(et)}function ij(et){for(var lt,st=[];!(lt=et.next()).done;)st.push(lt.value);return st}function fg(et){var lt=-1,st=Array(et.size);return et.forEach(function(Tt,Xt){st[++lt]=[Xt,Tt]}),st}function Aw(et,lt){return function(st){return et(lt(st))}}function ho(et,lt){for(var st=-1,Tt=et.length,Xt=0,Ce=[];++st<Tt;){var qn=et[st];(qn===lt||qn===u)&&(et[st]=u,Ce[Xt++]=st)}return Ce}function dd(et){var lt=-1,st=Array(et.size);return et.forEach(function(Tt){st[++lt]=Tt}),st}function aj(et){var lt=-1,st=Array(et.size);return et.forEach(function(Tt){st[++lt]=[Tt,Tt]}),st}function oj(et,lt,st){for(var Tt=st-1,Xt=et.length;++Tt<Xt;)if(et[Tt]===lt)return Tt;return-1}function sj(et,lt,st){for(var Tt=st+1;Tt--;)if(et[Tt]===lt)return Tt;return Tt}function ul(et){return cl(et)?cj(et):U$(et)}function Ri(et){return cl(et)?uj(et):V$(et)}function Tw(et){for(var lt=et.length;lt--&&QD.test(et.charAt(lt)););return lt}var lj=sg(j$);function cj(et){for(var lt=tg.lastIndex=0;tg.test(et);)++lt;return lt}function uj(et){return et.match(tg)||[]}function fj(et){return et.match(C$)||[]}var dj=(function et(lt){lt=lt==null?ir:fl.defaults(ir.Object(),lt,fl.pick(ir,R$));var st=lt.Array,Tt=lt.Date,Xt=lt.Error,Ce=lt.Function,qn=lt.Math,Je=lt.Object,dg=lt.RegExp,hj=lt.String,ii=lt.TypeError,hd=st.prototype,pj=Ce.prototype,dl=Je.prototype,pd=lt["__core-js_shared__"],vd=pj.toString,je=dl.hasOwnProperty,vj=0,Pw=(function(){var v=/[^.]+$/.exec(pd&&pd.keys&&pd.keys.IE_PROTO||"");return v?"Symbol(src)_1."+v:""})(),gd=dl.toString,gj=vd.call(Je),yj=ir._,mj=dg("^"+vd.call(je).replace(X0,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),yd=hw?lt.Buffer:e,po=lt.Symbol,md=lt.Uint8Array,Cw=yd?yd.allocUnsafe:e,bd=Aw(Je.getPrototypeOf,Je),Lw=Je.create,Nw=dl.propertyIsEnumerable,xd=hd.splice,Rw=po?po.isConcatSpreadable:e,Nc=po?po.iterator:e,is=po?po.toStringTag:e,_d=(function(){try{var v=cs(Je,"defineProperty");return v({},"",{}),v}catch{}})(),bj=lt.clearTimeout!==ir.clearTimeout&&lt.clearTimeout,xj=Tt&&Tt.now!==ir.Date.now&&Tt.now,_j=lt.setTimeout!==ir.setTimeout&&lt.setTimeout,wd=qn.ceil,Od=qn.floor,hg=Je.getOwnPropertySymbols,wj=yd?yd.isBuffer:e,Iw=lt.isFinite,Oj=hd.join,Sj=Aw(Je.keys,Je),Kn=qn.max,fr=qn.min,Ej=Tt.now,kj=lt.parseInt,Dw=qn.random,Mj=hd.reverse,pg=cs(lt,"DataView"),Rc=cs(lt,"Map"),vg=cs(lt,"Promise"),hl=cs(lt,"Set"),Ic=cs(lt,"WeakMap"),Dc=cs(Je,"create"),Sd=Ic&&new Ic,pl={},Aj=us(pg),Tj=us(Rc),Pj=us(vg),Cj=us(hl),Lj=us(Ic),Ed=po?po.prototype:e,$c=Ed?Ed.valueOf:e,$w=Ed?Ed.toString:e;function W(v){if(Tn(v)&&!Qt(v)&&!(v instanceof me)){if(v instanceof ai)return v;if(je.call(v,"__wrapped__"))return jO(v)}return new ai(v)}var vl=(function(){function v(){}return function(b){if(!gn(b))return{};if(Lw)return Lw(b);v.prototype=b;var k=new v;return v.prototype=e,k}})();function kd(){}function ai(v,b){this.__wrapped__=v,this.__actions__=[],this.__chain__=!!b,this.__index__=0,this.__values__=e}W.templateSettings={escape:UD,evaluate:VD,interpolate:U_,variable:"",imports:{_:W}},W.prototype=kd.prototype,W.prototype.constructor=W,ai.prototype=vl(kd.prototype),ai.prototype.constructor=ai;function me(v){this.__wrapped__=v,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Y,this.__views__=[]}function Nj(){var v=new me(this.__wrapped__);return v.__actions__=Lr(this.__actions__),v.__dir__=this.__dir__,v.__filtered__=this.__filtered__,v.__iteratees__=Lr(this.__iteratees__),v.__takeCount__=this.__takeCount__,v.__views__=Lr(this.__views__),v}function Rj(){if(this.__filtered__){var v=new me(this);v.__dir__=-1,v.__filtered__=!0}else v=this.clone(),v.__dir__*=-1;return v}function Ij(){var v=this.__wrapped__.value(),b=this.__dir__,k=Qt(v),L=b<0,B=k?v.length:0,G=VF(0,B,this.__views__),X=G.start,Q=G.end,nt=Q-X,ct=L?Q:X-1,ft=this.__iteratees__,gt=ft.length,St=0,Nt=fr(nt,this.__takeCount__);if(!k||!L&&B==nt&&Nt==nt)return sO(v,this.__actions__);var Ft=[];t:for(;nt--&&St<Nt;){ct+=b;for(var le=-1,Bt=v[ct];++le<gt;){var ye=ft[le],xe=ye.iteratee,Xr=ye.type,Sr=xe(Bt);if(Xr==D)Bt=Sr;else if(!Sr){if(Xr==R)continue t;break t}}Ft[St++]=Bt}return Ft}me.prototype=vl(kd.prototype),me.prototype.constructor=me;function as(v){var b=-1,k=v==null?0:v.length;for(this.clear();++b<k;){var L=v[b];this.set(L[0],L[1])}}function Dj(){this.__data__=Dc?Dc(null):{},this.size=0}function $j(v){var b=this.has(v)&&delete this.__data__[v];return this.size-=b?1:0,b}function jj(v){var b=this.__data__;if(Dc){var k=b[v];return k===l?e:k}return je.call(b,v)?b[v]:e}function Fj(v){var b=this.__data__;return Dc?b[v]!==e:je.call(b,v)}function Bj(v,b){var k=this.__data__;return this.size+=this.has(v)?0:1,k[v]=Dc&&b===e?l:b,this}as.prototype.clear=Dj,as.prototype.delete=$j,as.prototype.get=jj,as.prototype.has=Fj,as.prototype.set=Bj;function Ta(v){var b=-1,k=v==null?0:v.length;for(this.clear();++b<k;){var L=v[b];this.set(L[0],L[1])}}function zj(){this.__data__=[],this.size=0}function Wj(v){var b=this.__data__,k=Md(b,v);if(k<0)return!1;var L=b.length-1;return k==L?b.pop():xd.call(b,k,1),--this.size,!0}function Gj(v){var b=this.__data__,k=Md(b,v);return k<0?e:b[k][1]}function Yj(v){return Md(this.__data__,v)>-1}function Hj(v,b){var k=this.__data__,L=Md(k,v);return L<0?(++this.size,k.push([v,b])):k[L][1]=b,this}Ta.prototype.clear=zj,Ta.prototype.delete=Wj,Ta.prototype.get=Gj,Ta.prototype.has=Yj,Ta.prototype.set=Hj;function Pa(v){var b=-1,k=v==null?0:v.length;for(this.clear();++b<k;){var L=v[b];this.set(L[0],L[1])}}function Uj(){this.size=0,this.__data__={hash:new as,map:new(Rc||Ta),string:new as}}function Vj(v){var b=Fd(this,v).delete(v);return this.size-=b?1:0,b}function Xj(v){return Fd(this,v).get(v)}function qj(v){return Fd(this,v).has(v)}function Kj(v,b){var k=Fd(this,v),L=k.size;return k.set(v,b),this.size+=k.size==L?0:1,this}Pa.prototype.clear=Uj,Pa.prototype.delete=Vj,Pa.prototype.get=Xj,Pa.prototype.has=qj,Pa.prototype.set=Kj;function os(v){var b=-1,k=v==null?0:v.length;for(this.__data__=new Pa;++b<k;)this.add(v[b])}function Zj(v){return this.__data__.set(v,l),this}function Qj(v){return this.__data__.has(v)}os.prototype.add=os.prototype.push=Zj,os.prototype.has=Qj;function Ii(v){var b=this.__data__=new Ta(v);this.size=b.size}function Jj(){this.__data__=new Ta,this.size=0}function tF(v){var b=this.__data__,k=b.delete(v);return this.size=b.size,k}function eF(v){return this.__data__.get(v)}function nF(v){return this.__data__.has(v)}function rF(v,b){var k=this.__data__;if(k instanceof Ta){var L=k.__data__;if(!Rc||L.length<i-1)return L.push([v,b]),this.size=++k.size,this;k=this.__data__=new Pa(L)}return k.set(v,b),this.size=k.size,this}Ii.prototype.clear=Jj,Ii.prototype.delete=tF,Ii.prototype.get=eF,Ii.prototype.has=nF,Ii.prototype.set=rF;function jw(v,b){var k=Qt(v),L=!k&&fs(v),B=!k&&!L&&bo(v),G=!k&&!L&&!B&&bl(v),X=k||L||B||G,Q=X?cg(v.length,hj):[],nt=Q.length;for(var ct in v)(b||je.call(v,ct))&&!(X&&(ct=="length"||B&&(ct=="offset"||ct=="parent")||G&&(ct=="buffer"||ct=="byteLength"||ct=="byteOffset")||Ra(ct,nt)))&&Q.push(ct);return Q}function Fw(v){var b=v.length;return b?v[kg(0,b-1)]:e}function iF(v,b){return Bd(Lr(v),ss(b,0,v.length))}function aF(v){return Bd(Lr(v))}function gg(v,b,k){(k!==e&&!Di(v[b],k)||k===e&&!(b in v))&&Ca(v,b,k)}function jc(v,b,k){var L=v[b];(!(je.call(v,b)&&Di(L,k))||k===e&&!(b in v))&&Ca(v,b,k)}function Md(v,b){for(var k=v.length;k--;)if(Di(v[k][0],b))return k;return-1}function oF(v,b,k,L){return vo(v,function(B,G,X){b(L,B,k(B),X)}),L}function Bw(v,b){return v&&Qi(b,tr(b),v)}function sF(v,b){return v&&Qi(b,Rr(b),v)}function Ca(v,b,k){b=="__proto__"&&_d?_d(v,b,{configurable:!0,enumerable:!0,value:k,writable:!0}):v[b]=k}function yg(v,b){for(var k=-1,L=b.length,B=st(L),G=v==null;++k<L;)B[k]=G?e:Zg(v,b[k]);return B}function ss(v,b,k){return v===v&&(k!==e&&(v=v<=k?v:k),b!==e&&(v=v>=b?v:b)),v}function oi(v,b,k,L,B,G){var X,Q=b&f,nt=b&d,ct=b&h;if(k&&(X=B?k(v,L,B,G):k(v)),X!==e)return X;if(!gn(v))return v;var ft=Qt(v);if(ft){if(X=qF(v),!Q)return Lr(v,X)}else{var gt=dr(v),St=gt==mt||gt==wt;if(bo(v))return uO(v,Q);if(gt==kt||gt==q||St&&!B){if(X=nt||St?{}:TO(v),!Q)return nt?jF(v,sF(X,v)):$F(v,Bw(X,v))}else{if(!on[gt])return B?v:{};X=KF(v,gt,Q)}}G||(G=new Ii);var Nt=G.get(v);if(Nt)return Nt;G.set(v,X),iS(v)?v.forEach(function(Bt){X.add(oi(Bt,b,k,Bt,v,G))}):nS(v)&&v.forEach(function(Bt,ye){X.set(ye,oi(Bt,b,k,ye,v,G))});var Ft=ct?nt?$g:Dg:nt?Rr:tr,le=ft?e:Ft(v);return ri(le||v,function(Bt,ye){le&&(ye=Bt,Bt=v[ye]),jc(X,ye,oi(Bt,b,k,ye,v,G))}),X}function lF(v){var b=tr(v);return function(k){return zw(k,v,b)}}function zw(v,b,k){var L=k.length;if(v==null)return!L;for(v=Je(v);L--;){var B=k[L],G=b[B],X=v[B];if(X===e&&!(B in v)||!G(X))return!1}return!0}function Ww(v,b,k){if(typeof v!="function")throw new ii(o);return Hc(function(){v.apply(e,k)},b)}function Fc(v,b,k,L){var B=-1,G=ud,X=!0,Q=v.length,nt=[],ct=b.length;if(!Q)return nt;k&&(b=hn(b,Hr(k))),L?(G=rg,X=!1):b.length>=i&&(G=Lc,X=!1,b=new os(b));t:for(;++B<Q;){var ft=v[B],gt=k==null?ft:k(ft);if(ft=L||ft!==0?ft:0,X&&gt===gt){for(var St=ct;St--;)if(b[St]===gt)continue t;nt.push(ft)}else G(b,gt,L)||nt.push(ft)}return nt}var vo=vO(Zi),Gw=vO(bg,!0);function cF(v,b){var k=!0;return vo(v,function(L,B,G){return k=!!b(L,B,G),k}),k}function Ad(v,b,k){for(var L=-1,B=v.length;++L<B;){var G=v[L],X=b(G);if(X!=null&&(Q===e?X===X&&!Vr(X):k(X,Q)))var Q=X,nt=G}return nt}function uF(v,b,k,L){var B=v.length;for(k=oe(k),k<0&&(k=-k>B?0:B+k),L=L===e||L>B?B:oe(L),L<0&&(L+=B),L=k>L?0:oS(L);k<L;)v[k++]=b;return v}function Yw(v,b){var k=[];return vo(v,function(L,B,G){b(L,B,G)&&k.push(L)}),k}function ar(v,b,k,L,B){var G=-1,X=v.length;for(k||(k=QF),B||(B=[]);++G<X;){var Q=v[G];b>0&&k(Q)?b>1?ar(Q,b-1,k,L,B):fo(B,Q):L||(B[B.length]=Q)}return B}var mg=gO(),Hw=gO(!0);function Zi(v,b){return v&&mg(v,b,tr)}function bg(v,b){return v&&Hw(v,b,tr)}function Td(v,b){return uo(b,function(k){return Ia(v[k])})}function ls(v,b){b=yo(b,v);for(var k=0,L=b.length;v!=null&&k<L;)v=v[Ji(b[k++])];return k&&k==L?v:e}function Uw(v,b,k){var L=b(v);return Qt(v)?L:fo(L,k(v))}function wr(v){return v==null?v===e?qe:$t:is&&is in Je(v)?UF(v):a7(v)}function xg(v,b){return v>b}function fF(v,b){return v!=null&&je.call(v,b)}function dF(v,b){return v!=null&&b in Je(v)}function hF(v,b,k){return v>=fr(b,k)&&v<Kn(b,k)}function _g(v,b,k){for(var L=k?rg:ud,B=v[0].length,G=v.length,X=G,Q=st(G),nt=1/0,ct=[];X--;){var ft=v[X];X&&b&&(ft=hn(ft,Hr(b))),nt=fr(ft.length,nt),Q[X]=!k&&(b||B>=120&&ft.length>=120)?new os(X&&ft):e}ft=v[0];var gt=-1,St=Q[0];t:for(;++gt<B&&ct.length<nt;){var Nt=ft[gt],Ft=b?b(Nt):Nt;if(Nt=k||Nt!==0?Nt:0,!(St?Lc(St,Ft):L(ct,Ft,k))){for(X=G;--X;){var le=Q[X];if(!(le?Lc(le,Ft):L(v[X],Ft,k)))continue t}St&&St.push(Ft),ct.push(Nt)}}return ct}function pF(v,b,k,L){return Zi(v,function(B,G,X){b(L,k(B),G,X)}),L}function Bc(v,b,k){b=yo(b,v),v=NO(v,b);var L=v==null?v:v[Ji(li(b))];return L==null?e:Yr(L,v,k)}function Vw(v){return Tn(v)&&wr(v)==q}function vF(v){return Tn(v)&&wr(v)==Ee}function gF(v){return Tn(v)&&wr(v)==ot}function zc(v,b,k,L,B){return v===b?!0:v==null||b==null||!Tn(v)&&!Tn(b)?v!==v&&b!==b:yF(v,b,k,L,zc,B)}function yF(v,b,k,L,B,G){var X=Qt(v),Q=Qt(b),nt=X?J:dr(v),ct=Q?J:dr(b);nt=nt==q?kt:nt,ct=ct==q?kt:ct;var ft=nt==kt,gt=ct==kt,St=nt==ct;if(St&&bo(v)){if(!bo(b))return!1;X=!0,ft=!1}if(St&&!ft)return G||(G=new Ii),X||bl(v)?kO(v,b,k,L,B,G):YF(v,b,nt,k,L,B,G);if(!(k&p)){var Nt=ft&&je.call(v,"__wrapped__"),Ft=gt&&je.call(b,"__wrapped__");if(Nt||Ft){var le=Nt?v.value():v,Bt=Ft?b.value():b;return G||(G=new Ii),B(le,Bt,k,L,G)}}return St?(G||(G=new Ii),HF(v,b,k,L,B,G)):!1}function mF(v){return Tn(v)&&dr(v)==Ot}function wg(v,b,k,L){var B=k.length,G=B,X=!L;if(v==null)return!G;for(v=Je(v);B--;){var Q=k[B];if(X&&Q[2]?Q[1]!==v[Q[0]]:!(Q[0]in v))return!1}for(;++B<G;){Q=k[B];var nt=Q[0],ct=v[nt],ft=Q[1];if(X&&Q[2]){if(ct===e&&!(nt in v))return!1}else{var gt=new Ii;if(L)var St=L(ct,ft,nt,v,b,gt);if(!(St===e?zc(ft,ct,p|g,L,gt):St))return!1}}return!0}function Xw(v){if(!gn(v)||t7(v))return!1;var b=Ia(v)?mj:l$;return b.test(us(v))}function bF(v){return Tn(v)&&wr(v)==ve}function xF(v){return Tn(v)&&dr(v)==ne}function _F(v){return Tn(v)&&Ud(v.length)&&!!cn[wr(v)]}function qw(v){return typeof v=="function"?v:v==null?Ir:typeof v=="object"?Qt(v)?Qw(v[0],v[1]):Zw(v):yS(v)}function Og(v){if(!Yc(v))return Sj(v);var b=[];for(var k in Je(v))je.call(v,k)&&k!="constructor"&&b.push(k);return b}function wF(v){if(!gn(v))return i7(v);var b=Yc(v),k=[];for(var L in v)L=="constructor"&&(b||!je.call(v,L))||k.push(L);return k}function Sg(v,b){return v<b}function Kw(v,b){var k=-1,L=Nr(v)?st(v.length):[];return vo(v,function(B,G,X){L[++k]=b(B,G,X)}),L}function Zw(v){var b=Fg(v);return b.length==1&&b[0][2]?CO(b[0][0],b[0][1]):function(k){return k===v||wg(k,v,b)}}function Qw(v,b){return zg(v)&&PO(b)?CO(Ji(v),b):function(k){var L=Zg(k,v);return L===e&&L===b?Qg(k,v):zc(b,L,p|g)}}function Pd(v,b,k,L,B){v!==b&&mg(b,function(G,X){if(B||(B=new Ii),gn(G))OF(v,b,X,k,Pd,L,B);else{var Q=L?L(Gg(v,X),G,X+"",v,b,B):e;Q===e&&(Q=G),gg(v,X,Q)}},Rr)}function OF(v,b,k,L,B,G,X){var Q=Gg(v,k),nt=Gg(b,k),ct=X.get(nt);if(ct){gg(v,k,ct);return}var ft=G?G(Q,nt,k+"",v,b,X):e,gt=ft===e;if(gt){var St=Qt(nt),Nt=!St&&bo(nt),Ft=!St&&!Nt&&bl(nt);ft=nt,St||Nt||Ft?Qt(Q)?ft=Q:Rn(Q)?ft=Lr(Q):Nt?(gt=!1,ft=uO(nt,!0)):Ft?(gt=!1,ft=fO(nt,!0)):ft=[]:Uc(nt)||fs(nt)?(ft=Q,fs(Q)?ft=sS(Q):(!gn(Q)||Ia(Q))&&(ft=TO(nt))):gt=!1}gt&&(X.set(nt,ft),B(ft,nt,L,G,X),X.delete(nt)),gg(v,k,ft)}function Jw(v,b){var k=v.length;if(k)return b+=b<0?k:0,Ra(b,k)?v[b]:e}function tO(v,b,k){b.length?b=hn(b,function(G){return Qt(G)?function(X){return ls(X,G.length===1?G[0]:G)}:G}):b=[Ir];var L=-1;b=hn(b,Hr(jt()));var B=Kw(v,function(G,X,Q){var nt=hn(b,function(ct){return ct(G)});return{criteria:nt,index:++L,value:G}});return K$(B,function(G,X){return DF(G,X,k)})}function SF(v,b){return eO(v,b,function(k,L){return Qg(v,L)})}function eO(v,b,k){for(var L=-1,B=b.length,G={};++L<B;){var X=b[L],Q=ls(v,X);k(Q,X)&&Wc(G,yo(X,v),Q)}return G}function EF(v){return function(b){return ls(b,v)}}function Eg(v,b,k,L){var B=L?q$:ll,G=-1,X=b.length,Q=v;for(v===b&&(b=Lr(b)),k&&(Q=hn(v,Hr(k)));++G<X;)for(var nt=0,ct=b[G],ft=k?k(ct):ct;(nt=B(Q,ft,nt,L))>-1;)Q!==v&&xd.call(Q,nt,1),xd.call(v,nt,1);return v}function nO(v,b){for(var k=v?b.length:0,L=k-1;k--;){var B=b[k];if(k==L||B!==G){var G=B;Ra(B)?xd.call(v,B,1):Tg(v,B)}}return v}function kg(v,b){return v+Od(Dw()*(b-v+1))}function kF(v,b,k,L){for(var B=-1,G=Kn(wd((b-v)/(k||1)),0),X=st(G);G--;)X[L?G:++B]=v,v+=k;return X}function Mg(v,b){var k="";if(!v||b<1||b>I)return k;do b%2&&(k+=v),b=Od(b/2),b&&(v+=v);while(b);return k}function de(v,b){return Yg(LO(v,b,Ir),v+"")}function MF(v){return Fw(xl(v))}function AF(v,b){var k=xl(v);return Bd(k,ss(b,0,k.length))}function Wc(v,b,k,L){if(!gn(v))return v;b=yo(b,v);for(var B=-1,G=b.length,X=G-1,Q=v;Q!=null&&++B<G;){var nt=Ji(b[B]),ct=k;if(nt==="__proto__"||nt==="constructor"||nt==="prototype")return v;if(B!=X){var ft=Q[nt];ct=L?L(ft,nt,Q):e,ct===e&&(ct=gn(ft)?ft:Ra(b[B+1])?[]:{})}jc(Q,nt,ct),Q=Q[nt]}return v}var rO=Sd?function(v,b){return Sd.set(v,b),v}:Ir,TF=_d?function(v,b){return _d(v,"toString",{configurable:!0,enumerable:!1,value:ty(b),writable:!0})}:Ir;function PF(v){return Bd(xl(v))}function si(v,b,k){var L=-1,B=v.length;b<0&&(b=-b>B?0:B+b),k=k>B?B:k,k<0&&(k+=B),B=b>k?0:k-b>>>0,b>>>=0;for(var G=st(B);++L<B;)G[L]=v[L+b];return G}function CF(v,b){var k;return vo(v,function(L,B,G){return k=b(L,B,G),!k}),!!k}function Cd(v,b,k){var L=0,B=v==null?L:v.length;if(typeof b=="number"&&b===b&&B<=V){for(;L<B;){var G=L+B>>>1,X=v[G];X!==null&&!Vr(X)&&(k?X<=b:X<b)?L=G+1:B=G}return B}return Ag(v,b,Ir,k)}function Ag(v,b,k,L){var B=0,G=v==null?0:v.length;if(G===0)return 0;b=k(b);for(var X=b!==b,Q=b===null,nt=Vr(b),ct=b===e;B<G;){var ft=Od((B+G)/2),gt=k(v[ft]),St=gt!==e,Nt=gt===null,Ft=gt===gt,le=Vr(gt);if(X)var Bt=L||Ft;else ct?Bt=Ft&&(L||St):Q?Bt=Ft&&St&&(L||!Nt):nt?Bt=Ft&&St&&!Nt&&(L||!le):Nt||le?Bt=!1:Bt=L?gt<=b:gt<b;Bt?B=ft+1:G=ft}return fr(G,H)}function iO(v,b){for(var k=-1,L=v.length,B=0,G=[];++k<L;){var X=v[k],Q=b?b(X):X;if(!k||!Di(Q,nt)){var nt=Q;G[B++]=X===0?0:X}}return G}function aO(v){return typeof v=="number"?v:Vr(v)?z:+v}function Ur(v){if(typeof v=="string")return v;if(Qt(v))return hn(v,Ur)+"";if(Vr(v))return $w?$w.call(v):"";var b=v+"";return b=="0"&&1/v==-j?"-0":b}function go(v,b,k){var L=-1,B=ud,G=v.length,X=!0,Q=[],nt=Q;if(k)X=!1,B=rg;else if(G>=i){var ct=b?null:WF(v);if(ct)return dd(ct);X=!1,B=Lc,nt=new os}else nt=b?[]:Q;t:for(;++L<G;){var ft=v[L],gt=b?b(ft):ft;if(ft=k||ft!==0?ft:0,X&&gt===gt){for(var St=nt.length;St--;)if(nt[St]===gt)continue t;b&&nt.push(gt),Q.push(ft)}else B(nt,gt,k)||(nt!==Q&&nt.push(gt),Q.push(ft))}return Q}function Tg(v,b){b=yo(b,v);var k=-1,L=b.length;if(!L)return!0;for(var B=v==null||typeof v!="object"&&typeof v!="function";++k<L;){var G=b[k];if(typeof G=="string"){if(G==="__proto__"&&!je.call(v,"__proto__"))return!1;if(G==="constructor"&&k+1<L&&typeof b[k+1]=="string"&&b[k+1]==="prototype"){if(B&&k===0)continue;return!1}}}var X=NO(v,b);return X==null||delete X[Ji(li(b))]}function oO(v,b,k,L){return Wc(v,b,k(ls(v,b)),L)}function Ld(v,b,k,L){for(var B=v.length,G=L?B:-1;(L?G--:++G<B)&&b(v[G],G,v););return k?si(v,L?0:G,L?G+1:B):si(v,L?G+1:0,L?B:G)}function sO(v,b){var k=v;return k instanceof me&&(k=k.value()),ig(b,function(L,B){return B.func.apply(B.thisArg,fo([L],B.args))},k)}function Pg(v,b,k){var L=v.length;if(L<2)return L?go(v[0]):[];for(var B=-1,G=st(L);++B<L;)for(var X=v[B],Q=-1;++Q<L;)Q!=B&&(G[B]=Fc(G[B]||X,v[Q],b,k));return go(ar(G,1),b,k)}function lO(v,b,k){for(var L=-1,B=v.length,G=b.length,X={};++L<B;){var Q=L<G?b[L]:e;k(X,v[L],Q)}return X}function Cg(v){return Rn(v)?v:[]}function Lg(v){return typeof v=="function"?v:Ir}function yo(v,b){return Qt(v)?v:zg(v,b)?[v]:$O(Fe(v))}var LF=de;function mo(v,b,k){var L=v.length;return k=k===e?L:k,!b&&k>=L?v:si(v,b,k)}var cO=bj||function(v){return ir.clearTimeout(v)};function uO(v,b){if(b)return v.slice();var k=v.length,L=Cw?Cw(k):new v.constructor(k);return v.copy(L),L}function Ng(v){var b=new v.constructor(v.byteLength);return new md(b).set(new md(v)),b}function NF(v,b){var k=b?Ng(v.buffer):v.buffer;return new v.constructor(k,v.byteOffset,v.byteLength)}function RF(v){var b=new v.constructor(v.source,V_.exec(v));return b.lastIndex=v.lastIndex,b}function IF(v){return $c?Je($c.call(v)):{}}function fO(v,b){var k=b?Ng(v.buffer):v.buffer;return new v.constructor(k,v.byteOffset,v.length)}function dO(v,b){if(v!==b){var k=v!==e,L=v===null,B=v===v,G=Vr(v),X=b!==e,Q=b===null,nt=b===b,ct=Vr(b);if(!Q&&!ct&&!G&&v>b||G&&X&&nt&&!Q&&!ct||L&&X&&nt||!k&&nt||!B)return 1;if(!L&&!G&&!ct&&v<b||ct&&k&&B&&!L&&!G||Q&&k&&B||!X&&B||!nt)return-1}return 0}function DF(v,b,k){for(var L=-1,B=v.criteria,G=b.criteria,X=B.length,Q=k.length;++L<X;){var nt=dO(B[L],G[L]);if(nt){if(L>=Q)return nt;var ct=k[L];return nt*(ct=="desc"?-1:1)}}return v.index-b.index}function hO(v,b,k,L){for(var B=-1,G=v.length,X=k.length,Q=-1,nt=b.length,ct=Kn(G-X,0),ft=st(nt+ct),gt=!L;++Q<nt;)ft[Q]=b[Q];for(;++B<X;)(gt||B<G)&&(ft[k[B]]=v[B]);for(;ct--;)ft[Q++]=v[B++];return ft}function pO(v,b,k,L){for(var B=-1,G=v.length,X=-1,Q=k.length,nt=-1,ct=b.length,ft=Kn(G-Q,0),gt=st(ft+ct),St=!L;++B<ft;)gt[B]=v[B];for(var Nt=B;++nt<ct;)gt[Nt+nt]=b[nt];for(;++X<Q;)(St||B<G)&&(gt[Nt+k[X]]=v[B++]);return gt}function Lr(v,b){var k=-1,L=v.length;for(b||(b=st(L));++k<L;)b[k]=v[k];return b}function Qi(v,b,k,L){var B=!k;k||(k={});for(var G=-1,X=b.length;++G<X;){var Q=b[G],nt=L?L(k[Q],v[Q],Q,k,v):e;nt===e&&(nt=v[Q]),B?Ca(k,Q,nt):jc(k,Q,nt)}return k}function $F(v,b){return Qi(v,Bg(v),b)}function jF(v,b){return Qi(v,MO(v),b)}function Nd(v,b){return function(k,L){var B=Qt(k)?G$:oF,G=b?b():{};return B(k,v,jt(L,2),G)}}function gl(v){return de(function(b,k){var L=-1,B=k.length,G=B>1?k[B-1]:e,X=B>2?k[2]:e;for(G=v.length>3&&typeof G=="function"?(B--,G):e,X&&Or(k[0],k[1],X)&&(G=B<3?e:G,B=1),b=Je(b);++L<B;){var Q=k[L];Q&&v(b,Q,L,G)}return b})}function vO(v,b){return function(k,L){if(k==null)return k;if(!Nr(k))return v(k,L);for(var B=k.length,G=b?B:-1,X=Je(k);(b?G--:++G<B)&&L(X[G],G,X)!==!1;);return k}}function gO(v){return function(b,k,L){for(var B=-1,G=Je(b),X=L(b),Q=X.length;Q--;){var nt=X[v?Q:++B];if(k(G[nt],nt,G)===!1)break}return b}}function FF(v,b,k){var L=b&y,B=Gc(v);function G(){var X=this&&this!==ir&&this instanceof G?B:v;return X.apply(L?k:this,arguments)}return G}function yO(v){return function(b){b=Fe(b);var k=cl(b)?Ri(b):e,L=k?k[0]:b.charAt(0),B=k?mo(k,1).join(""):b.slice(1);return L[v]()+B}}function yl(v){return function(b){return ig(vS(pS(b).replace(T$,"")),v,"")}}function Gc(v){return function(){var b=arguments;switch(b.length){case 0:return new v;case 1:return new v(b[0]);case 2:return new v(b[0],b[1]);case 3:return new v(b[0],b[1],b[2]);case 4:return new v(b[0],b[1],b[2],b[3]);case 5:return new v(b[0],b[1],b[2],b[3],b[4]);case 6:return new v(b[0],b[1],b[2],b[3],b[4],b[5]);case 7:return new v(b[0],b[1],b[2],b[3],b[4],b[5],b[6])}var k=vl(v.prototype),L=v.apply(k,b);return gn(L)?L:k}}function BF(v,b,k){var L=Gc(v);function B(){for(var G=arguments.length,X=st(G),Q=G,nt=ml(B);Q--;)X[Q]=arguments[Q];var ct=G<3&&X[0]!==nt&&X[G-1]!==nt?[]:ho(X,nt);if(G-=ct.length,G<k)return wO(v,b,Rd,B.placeholder,e,X,ct,e,e,k-G);var ft=this&&this!==ir&&this instanceof B?L:v;return Yr(ft,this,X)}return B}function mO(v){return function(b,k,L){var B=Je(b);if(!Nr(b)){var G=jt(k,3);b=tr(b),k=function(Q){return G(B[Q],Q,B)}}var X=v(b,k,L);return X>-1?B[G?b[X]:X]:e}}function bO(v){return Na(function(b){var k=b.length,L=k,B=ai.prototype.thru;for(v&&b.reverse();L--;){var G=b[L];if(typeof G!="function")throw new ii(o);if(B&&!X&&jd(G)=="wrapper")var X=new ai([],!0)}for(L=X?L:k;++L<k;){G=b[L];var Q=jd(G),nt=Q=="wrapper"?jg(G):e;nt&&Wg(nt[0])&&nt[1]==(E|_|O|M)&&!nt[4].length&&nt[9]==1?X=X[jd(nt[0])].apply(X,nt[3]):X=G.length==1&&Wg(G)?X[Q]():X.thru(G)}return function(){var ct=arguments,ft=ct[0];if(X&&ct.length==1&&Qt(ft))return X.plant(ft).value();for(var gt=0,St=k?b[gt].apply(this,ct):ft;++gt<k;)St=b[gt].call(this,St);return St}})}function Rd(v,b,k,L,B,G,X,Q,nt,ct){var ft=b&E,gt=b&y,St=b&m,Nt=b&(_|w),Ft=b&A,le=St?e:Gc(v);function Bt(){for(var ye=arguments.length,xe=st(ye),Xr=ye;Xr--;)xe[Xr]=arguments[Xr];if(Nt)var Sr=ml(Bt),qr=Q$(xe,Sr);if(L&&(xe=hO(xe,L,B,Nt)),G&&(xe=pO(xe,G,X,Nt)),ye-=qr,Nt&&ye<ct){var In=ho(xe,Sr);return wO(v,b,Rd,Bt.placeholder,k,xe,In,Q,nt,ct-ye)}var $i=gt?k:this,$a=St?$i[v]:v;return ye=xe.length,Q?xe=o7(xe,Q):Ft&&ye>1&&xe.reverse(),ft&&nt<ye&&(xe.length=nt),this&&this!==ir&&this instanceof Bt&&($a=le||Gc($a)),$a.apply($i,xe)}return Bt}function xO(v,b){return function(k,L){return pF(k,v,b(L),{})}}function Id(v,b){return function(k,L){var B;if(k===e&&L===e)return b;if(k!==e&&(B=k),L!==e){if(B===e)return L;typeof k=="string"||typeof L=="string"?(k=Ur(k),L=Ur(L)):(k=aO(k),L=aO(L)),B=v(k,L)}return B}}function Rg(v){return Na(function(b){return b=hn(b,Hr(jt())),de(function(k){var L=this;return v(b,function(B){return Yr(B,L,k)})})})}function Dd(v,b){b=b===e?" ":Ur(b);var k=b.length;if(k<2)return k?Mg(b,v):b;var L=Mg(b,wd(v/ul(b)));return cl(b)?mo(Ri(L),0,v).join(""):L.slice(0,v)}function zF(v,b,k,L){var B=b&y,G=Gc(v);function X(){for(var Q=-1,nt=arguments.length,ct=-1,ft=L.length,gt=st(ft+nt),St=this&&this!==ir&&this instanceof X?G:v;++ct<ft;)gt[ct]=L[ct];for(;nt--;)gt[ct++]=arguments[++Q];return Yr(St,B?k:this,gt)}return X}function _O(v){return function(b,k,L){return L&&typeof L!="number"&&Or(b,k,L)&&(k=L=e),b=Da(b),k===e?(k=b,b=0):k=Da(k),L=L===e?b<k?1:-1:Da(L),kF(b,k,L,v)}}function $d(v){return function(b,k){return typeof b=="string"&&typeof k=="string"||(b=ci(b),k=ci(k)),v(b,k)}}function wO(v,b,k,L,B,G,X,Q,nt,ct){var ft=b&_,gt=ft?X:e,St=ft?e:X,Nt=ft?G:e,Ft=ft?e:G;b|=ft?O:S,b&=~(ft?S:O),b&x||(b&=-4);var le=[v,b,B,Nt,gt,Ft,St,Q,nt,ct],Bt=k.apply(e,le);return Wg(v)&&RO(Bt,le),Bt.placeholder=L,IO(Bt,v,b)}function Ig(v){var b=qn[v];return function(k,L){if(k=ci(k),L=L==null?0:fr(oe(L),292),L&&Iw(k)){var B=(Fe(k)+"e").split("e"),G=b(B[0]+"e"+(+B[1]+L));return B=(Fe(G)+"e").split("e"),+(B[0]+"e"+(+B[1]-L))}return b(k)}}var WF=hl&&1/dd(new hl([,-0]))[1]==j?function(v){return new hl(v)}:ry;function OO(v){return function(b){var k=dr(b);return k==Ot?fg(b):k==ne?aj(b):Z$(b,v(b))}}function La(v,b,k,L,B,G,X,Q){var nt=b&m;if(!nt&&typeof v!="function")throw new ii(o);var ct=L?L.length:0;if(ct||(b&=-97,L=B=e),X=X===e?X:Kn(oe(X),0),Q=Q===e?Q:oe(Q),ct-=B?B.length:0,b&S){var ft=L,gt=B;L=B=e}var St=nt?e:jg(v),Nt=[v,b,k,L,B,ft,gt,G,X,Q];if(St&&r7(Nt,St),v=Nt[0],b=Nt[1],k=Nt[2],L=Nt[3],B=Nt[4],Q=Nt[9]=Nt[9]===e?nt?0:v.length:Kn(Nt[9]-ct,0),!Q&&b&(_|w)&&(b&=-25),!b||b==y)var Ft=FF(v,b,k);else b==_||b==w?Ft=BF(v,b,Q):(b==O||b==(y|O))&&!B.length?Ft=zF(v,b,k,L):Ft=Rd.apply(e,Nt);var le=St?rO:RO;return IO(le(Ft,Nt),v,b)}function SO(v,b,k,L){return v===e||Di(v,dl[k])&&!je.call(L,k)?b:v}function EO(v,b,k,L,B,G){return gn(v)&&gn(b)&&(G.set(b,v),Pd(v,b,e,EO,G),G.delete(b)),v}function GF(v){return Uc(v)?e:v}function kO(v,b,k,L,B,G){var X=k&p,Q=v.length,nt=b.length;if(Q!=nt&&!(X&&nt>Q))return!1;var ct=G.get(v),ft=G.get(b);if(ct&&ft)return ct==b&&ft==v;var gt=-1,St=!0,Nt=k&g?new os:e;for(G.set(v,b),G.set(b,v);++gt<Q;){var Ft=v[gt],le=b[gt];if(L)var Bt=X?L(le,Ft,gt,b,v,G):L(Ft,le,gt,v,b,G);if(Bt!==e){if(Bt)continue;St=!1;break}if(Nt){if(!ag(b,function(ye,xe){if(!Lc(Nt,xe)&&(Ft===ye||B(Ft,ye,k,L,G)))return Nt.push(xe)})){St=!1;break}}else if(!(Ft===le||B(Ft,le,k,L,G))){St=!1;break}}return G.delete(v),G.delete(b),St}function YF(v,b,k,L,B,G,X){switch(k){case Ke:if(v.byteLength!=b.byteLength||v.byteOffset!=b.byteOffset)return!1;v=v.buffer,b=b.buffer;case Ee:return!(v.byteLength!=b.byteLength||!G(new md(v),new md(b)));case K:case ot:case At:return Di(+v,+b);case yt:return v.name==b.name&&v.message==b.message;case ve:case Zt:return v==b+"";case Ot:var Q=fg;case ne:var nt=L&p;if(Q||(Q=dd),v.size!=b.size&&!nt)return!1;var ct=X.get(v);if(ct)return ct==b;L|=g,X.set(v,b);var ft=kO(Q(v),Q(b),L,B,G,X);return X.delete(v),ft;case Pe:if($c)return $c.call(v)==$c.call(b)}return!1}function HF(v,b,k,L,B,G){var X=k&p,Q=Dg(v),nt=Q.length,ct=Dg(b),ft=ct.length;if(nt!=ft&&!X)return!1;for(var gt=nt;gt--;){var St=Q[gt];if(!(X?St in b:je.call(b,St)))return!1}var Nt=G.get(v),Ft=G.get(b);if(Nt&&Ft)return Nt==b&&Ft==v;var le=!0;G.set(v,b),G.set(b,v);for(var Bt=X;++gt<nt;){St=Q[gt];var ye=v[St],xe=b[St];if(L)var Xr=X?L(xe,ye,St,b,v,G):L(ye,xe,St,v,b,G);if(!(Xr===e?ye===xe||B(ye,xe,k,L,G):Xr)){le=!1;break}Bt||(Bt=St=="constructor")}if(le&&!Bt){var Sr=v.constructor,qr=b.constructor;Sr!=qr&&"constructor"in v&&"constructor"in b&&!(typeof Sr=="function"&&Sr instanceof Sr&&typeof qr=="function"&&qr instanceof qr)&&(le=!1)}return G.delete(v),G.delete(b),le}function Na(v){return Yg(LO(v,e,zO),v+"")}function Dg(v){return Uw(v,tr,Bg)}function $g(v){return Uw(v,Rr,MO)}var jg=Sd?function(v){return Sd.get(v)}:ry;function jd(v){for(var b=v.name+"",k=pl[b],L=je.call(pl,b)?k.length:0;L--;){var B=k[L],G=B.func;if(G==null||G==v)return B.name}return b}function ml(v){var b=je.call(W,"placeholder")?W:v;return b.placeholder}function jt(){var v=W.iteratee||ey;return v=v===ey?qw:v,arguments.length?v(arguments[0],arguments[1]):v}function Fd(v,b){var k=v.__data__;return JF(b)?k[typeof b=="string"?"string":"hash"]:k.map}function Fg(v){for(var b=tr(v),k=b.length;k--;){var L=b[k],B=v[L];b[k]=[L,B,PO(B)]}return b}function cs(v,b){var k=nj(v,b);return Xw(k)?k:e}function UF(v){var b=je.call(v,is),k=v[is];try{v[is]=e;var L=!0}catch{}var B=gd.call(v);return L&&(b?v[is]=k:delete v[is]),B}var Bg=hg?function(v){return v==null?[]:(v=Je(v),uo(hg(v),function(b){return Nw.call(v,b)}))}:iy,MO=hg?function(v){for(var b=[];v;)fo(b,Bg(v)),v=bd(v);return b}:iy,dr=wr;(pg&&dr(new pg(new ArrayBuffer(1)))!=Ke||Rc&&dr(new Rc)!=Ot||vg&&dr(vg.resolve())!=Mt||hl&&dr(new hl)!=ne||Ic&&dr(new Ic)!=Se)&&(dr=function(v){var b=wr(v),k=b==kt?v.constructor:e,L=k?us(k):"";if(L)switch(L){case Aj:return Ke;case Tj:return Ot;case Pj:return Mt;case Cj:return ne;case Lj:return Se}return b});function VF(v,b,k){for(var L=-1,B=k.length;++L<B;){var G=k[L],X=G.size;switch(G.type){case"drop":v+=X;break;case"dropRight":b-=X;break;case"take":b=fr(b,v+X);break;case"takeRight":v=Kn(v,b-X);break}}return{start:v,end:b}}function XF(v){var b=v.match(t$);return b?b[1].split(e$):[]}function AO(v,b,k){b=yo(b,v);for(var L=-1,B=b.length,G=!1;++L<B;){var X=Ji(b[L]);if(!(G=v!=null&&k(v,X)))break;v=v[X]}return G||++L!=B?G:(B=v==null?0:v.length,!!B&&Ud(B)&&Ra(X,B)&&(Qt(v)||fs(v)))}function qF(v){var b=v.length,k=new v.constructor(b);return b&&typeof v[0]=="string"&&je.call(v,"index")&&(k.index=v.index,k.input=v.input),k}function TO(v){return typeof v.constructor=="function"&&!Yc(v)?vl(bd(v)):{}}function KF(v,b,k){var L=v.constructor;switch(b){case Ee:return Ng(v);case K:case ot:return new L(+v);case Ke:return NF(v,k);case $e:case we:case Nn:case an:case rr:case Ni:case Ki:case co:case Cc:return fO(v,k);case Ot:return new L;case At:case Zt:return new L(v);case ve:return RF(v);case ne:return new L;case Pe:return IF(v)}}function ZF(v,b){var k=b.length;if(!k)return v;var L=k-1;return b[L]=(k>1?"& ":"")+b[L],b=b.join(k>2?", ":" "),v.replace(JD,`{
241
+ /* [wrapped with `+b+`] */
242
+ `)}function QF(v){return Qt(v)||fs(v)||!!(Rw&&v&&v[Rw])}function Ra(v,b){var k=typeof v;return b=b??I,!!b&&(k=="number"||k!="symbol"&&u$.test(v))&&v>-1&&v%1==0&&v<b}function Or(v,b,k){if(!gn(k))return!1;var L=typeof b;return(L=="number"?Nr(k)&&Ra(b,k.length):L=="string"&&b in k)?Di(k[b],v):!1}function zg(v,b){if(Qt(v))return!1;var k=typeof v;return k=="number"||k=="symbol"||k=="boolean"||v==null||Vr(v)?!0:qD.test(v)||!XD.test(v)||b!=null&&v in Je(b)}function JF(v){var b=typeof v;return b=="string"||b=="number"||b=="symbol"||b=="boolean"?v!=="__proto__":v===null}function Wg(v){var b=jd(v),k=W[b];if(typeof k!="function"||!(b in me.prototype))return!1;if(v===k)return!0;var L=jg(k);return!!L&&v===L[0]}function t7(v){return!!Pw&&Pw in v}var e7=pd?Ia:ay;function Yc(v){var b=v&&v.constructor,k=typeof b=="function"&&b.prototype||dl;return v===k}function PO(v){return v===v&&!gn(v)}function CO(v,b){return function(k){return k==null?!1:k[v]===b&&(b!==e||v in Je(k))}}function n7(v){var b=Yd(v,function(L){return k.size===c&&k.clear(),L}),k=b.cache;return b}function r7(v,b){var k=v[1],L=b[1],B=k|L,G=B<(y|m|E),X=L==E&&k==_||L==E&&k==M&&v[7].length<=b[8]||L==(E|M)&&b[7].length<=b[8]&&k==_;if(!(G||X))return v;L&y&&(v[2]=b[2],B|=k&y?0:x);var Q=b[3];if(Q){var nt=v[3];v[3]=nt?hO(nt,Q,b[4]):Q,v[4]=nt?ho(v[3],u):b[4]}return Q=b[5],Q&&(nt=v[5],v[5]=nt?pO(nt,Q,b[6]):Q,v[6]=nt?ho(v[5],u):b[6]),Q=b[7],Q&&(v[7]=Q),L&E&&(v[8]=v[8]==null?b[8]:fr(v[8],b[8])),v[9]==null&&(v[9]=b[9]),v[0]=b[0],v[1]=B,v}function i7(v){var b=[];if(v!=null)for(var k in Je(v))b.push(k);return b}function a7(v){return gd.call(v)}function LO(v,b,k){return b=Kn(b===e?v.length-1:b,0),function(){for(var L=arguments,B=-1,G=Kn(L.length-b,0),X=st(G);++B<G;)X[B]=L[b+B];B=-1;for(var Q=st(b+1);++B<b;)Q[B]=L[B];return Q[b]=k(X),Yr(v,this,Q)}}function NO(v,b){return b.length<2?v:ls(v,si(b,0,-1))}function o7(v,b){for(var k=v.length,L=fr(b.length,k),B=Lr(v);L--;){var G=b[L];v[L]=Ra(G,k)?B[G]:e}return v}function Gg(v,b){if(!(b==="constructor"&&typeof v[b]=="function")&&b!="__proto__")return v[b]}var RO=DO(rO),Hc=_j||function(v,b){return ir.setTimeout(v,b)},Yg=DO(TF);function IO(v,b,k){var L=b+"";return Yg(v,ZF(L,s7(XF(L),k)))}function DO(v){var b=0,k=0;return function(){var L=Ej(),B=C-(L-k);if(k=L,B>0){if(++b>=N)return arguments[0]}else b=0;return v.apply(e,arguments)}}function Bd(v,b){var k=-1,L=v.length,B=L-1;for(b=b===e?L:b;++k<b;){var G=kg(k,B),X=v[G];v[G]=v[k],v[k]=X}return v.length=b,v}var $O=n7(function(v){var b=[];return v.charCodeAt(0)===46&&b.push(""),v.replace(KD,function(k,L,B,G){b.push(B?G.replace(i$,"$1"):L||k)}),b});function Ji(v){if(typeof v=="string"||Vr(v))return v;var b=v+"";return b=="0"&&1/v==-j?"-0":b}function us(v){if(v!=null){try{return vd.call(v)}catch{}try{return v+""}catch{}}return""}function s7(v,b){return ri(Z,function(k){var L="_."+k[0];b&k[1]&&!ud(v,L)&&v.push(L)}),v.sort()}function jO(v){if(v instanceof me)return v.clone();var b=new ai(v.__wrapped__,v.__chain__);return b.__actions__=Lr(v.__actions__),b.__index__=v.__index__,b.__values__=v.__values__,b}function l7(v,b,k){(k?Or(v,b,k):b===e)?b=1:b=Kn(oe(b),0);var L=v==null?0:v.length;if(!L||b<1)return[];for(var B=0,G=0,X=st(wd(L/b));B<L;)X[G++]=si(v,B,B+=b);return X}function c7(v){for(var b=-1,k=v==null?0:v.length,L=0,B=[];++b<k;){var G=v[b];G&&(B[L++]=G)}return B}function u7(){var v=arguments.length;if(!v)return[];for(var b=st(v-1),k=arguments[0],L=v;L--;)b[L-1]=arguments[L];return fo(Qt(k)?Lr(k):[k],ar(b,1))}var f7=de(function(v,b){return Rn(v)?Fc(v,ar(b,1,Rn,!0)):[]}),d7=de(function(v,b){var k=li(b);return Rn(k)&&(k=e),Rn(v)?Fc(v,ar(b,1,Rn,!0),jt(k,2)):[]}),h7=de(function(v,b){var k=li(b);return Rn(k)&&(k=e),Rn(v)?Fc(v,ar(b,1,Rn,!0),e,k):[]});function p7(v,b,k){var L=v==null?0:v.length;return L?(b=k||b===e?1:oe(b),si(v,b<0?0:b,L)):[]}function v7(v,b,k){var L=v==null?0:v.length;return L?(b=k||b===e?1:oe(b),b=L-b,si(v,0,b<0?0:b)):[]}function g7(v,b){return v&&v.length?Ld(v,jt(b,3),!0,!0):[]}function y7(v,b){return v&&v.length?Ld(v,jt(b,3),!0):[]}function m7(v,b,k,L){var B=v==null?0:v.length;return B?(k&&typeof k!="number"&&Or(v,b,k)&&(k=0,L=B),uF(v,b,k,L)):[]}function FO(v,b,k){var L=v==null?0:v.length;if(!L)return-1;var B=k==null?0:oe(k);return B<0&&(B=Kn(L+B,0)),fd(v,jt(b,3),B)}function BO(v,b,k){var L=v==null?0:v.length;if(!L)return-1;var B=L-1;return k!==e&&(B=oe(k),B=k<0?Kn(L+B,0):fr(B,L-1)),fd(v,jt(b,3),B,!0)}function zO(v){var b=v==null?0:v.length;return b?ar(v,1):[]}function b7(v){var b=v==null?0:v.length;return b?ar(v,j):[]}function x7(v,b){var k=v==null?0:v.length;return k?(b=b===e?1:oe(b),ar(v,b)):[]}function _7(v){for(var b=-1,k=v==null?0:v.length,L={};++b<k;){var B=v[b];L[B[0]]=B[1]}return L}function WO(v){return v&&v.length?v[0]:e}function w7(v,b,k){var L=v==null?0:v.length;if(!L)return-1;var B=k==null?0:oe(k);return B<0&&(B=Kn(L+B,0)),ll(v,b,B)}function O7(v){var b=v==null?0:v.length;return b?si(v,0,-1):[]}var S7=de(function(v){var b=hn(v,Cg);return b.length&&b[0]===v[0]?_g(b):[]}),E7=de(function(v){var b=li(v),k=hn(v,Cg);return b===li(k)?b=e:k.pop(),k.length&&k[0]===v[0]?_g(k,jt(b,2)):[]}),k7=de(function(v){var b=li(v),k=hn(v,Cg);return b=typeof b=="function"?b:e,b&&k.pop(),k.length&&k[0]===v[0]?_g(k,e,b):[]});function M7(v,b){return v==null?"":Oj.call(v,b)}function li(v){var b=v==null?0:v.length;return b?v[b-1]:e}function A7(v,b,k){var L=v==null?0:v.length;if(!L)return-1;var B=L;return k!==e&&(B=oe(k),B=B<0?Kn(L+B,0):fr(B,L-1)),b===b?sj(v,b,B):fd(v,ww,B,!0)}function T7(v,b){return v&&v.length?Jw(v,oe(b)):e}var P7=de(GO);function GO(v,b){return v&&v.length&&b&&b.length?Eg(v,b):v}function C7(v,b,k){return v&&v.length&&b&&b.length?Eg(v,b,jt(k,2)):v}function L7(v,b,k){return v&&v.length&&b&&b.length?Eg(v,b,e,k):v}var N7=Na(function(v,b){var k=v==null?0:v.length,L=yg(v,b);return nO(v,hn(b,function(B){return Ra(B,k)?+B:B}).sort(dO)),L});function R7(v,b){var k=[];if(!(v&&v.length))return k;var L=-1,B=[],G=v.length;for(b=jt(b,3);++L<G;){var X=v[L];b(X,L,v)&&(k.push(X),B.push(L))}return nO(v,B),k}function Hg(v){return v==null?v:Mj.call(v)}function I7(v,b,k){var L=v==null?0:v.length;return L?(k&&typeof k!="number"&&Or(v,b,k)?(b=0,k=L):(b=b==null?0:oe(b),k=k===e?L:oe(k)),si(v,b,k)):[]}function D7(v,b){return Cd(v,b)}function $7(v,b,k){return Ag(v,b,jt(k,2))}function j7(v,b){var k=v==null?0:v.length;if(k){var L=Cd(v,b);if(L<k&&Di(v[L],b))return L}return-1}function F7(v,b){return Cd(v,b,!0)}function B7(v,b,k){return Ag(v,b,jt(k,2),!0)}function z7(v,b){var k=v==null?0:v.length;if(k){var L=Cd(v,b,!0)-1;if(Di(v[L],b))return L}return-1}function W7(v){return v&&v.length?iO(v):[]}function G7(v,b){return v&&v.length?iO(v,jt(b,2)):[]}function Y7(v){var b=v==null?0:v.length;return b?si(v,1,b):[]}function H7(v,b,k){return v&&v.length?(b=k||b===e?1:oe(b),si(v,0,b<0?0:b)):[]}function U7(v,b,k){var L=v==null?0:v.length;return L?(b=k||b===e?1:oe(b),b=L-b,si(v,b<0?0:b,L)):[]}function V7(v,b){return v&&v.length?Ld(v,jt(b,3),!1,!0):[]}function X7(v,b){return v&&v.length?Ld(v,jt(b,3)):[]}var q7=de(function(v){return go(ar(v,1,Rn,!0))}),K7=de(function(v){var b=li(v);return Rn(b)&&(b=e),go(ar(v,1,Rn,!0),jt(b,2))}),Z7=de(function(v){var b=li(v);return b=typeof b=="function"?b:e,go(ar(v,1,Rn,!0),e,b)});function Q7(v){return v&&v.length?go(v):[]}function J7(v,b){return v&&v.length?go(v,jt(b,2)):[]}function tB(v,b){return b=typeof b=="function"?b:e,v&&v.length?go(v,e,b):[]}function Ug(v){if(!(v&&v.length))return[];var b=0;return v=uo(v,function(k){if(Rn(k))return b=Kn(k.length,b),!0}),cg(b,function(k){return hn(v,og(k))})}function YO(v,b){if(!(v&&v.length))return[];var k=Ug(v);return b==null?k:hn(k,function(L){return Yr(b,e,L)})}var eB=de(function(v,b){return Rn(v)?Fc(v,b):[]}),nB=de(function(v){return Pg(uo(v,Rn))}),rB=de(function(v){var b=li(v);return Rn(b)&&(b=e),Pg(uo(v,Rn),jt(b,2))}),iB=de(function(v){var b=li(v);return b=typeof b=="function"?b:e,Pg(uo(v,Rn),e,b)}),aB=de(Ug);function oB(v,b){return lO(v||[],b||[],jc)}function sB(v,b){return lO(v||[],b||[],Wc)}var lB=de(function(v){var b=v.length,k=b>1?v[b-1]:e;return k=typeof k=="function"?(v.pop(),k):e,YO(v,k)});function HO(v){var b=W(v);return b.__chain__=!0,b}function cB(v,b){return b(v),v}function zd(v,b){return b(v)}var uB=Na(function(v){var b=v.length,k=b?v[0]:0,L=this.__wrapped__,B=function(G){return yg(G,v)};return b>1||this.__actions__.length||!(L instanceof me)||!Ra(k)?this.thru(B):(L=L.slice(k,+k+(b?1:0)),L.__actions__.push({func:zd,args:[B],thisArg:e}),new ai(L,this.__chain__).thru(function(G){return b&&!G.length&&G.push(e),G}))});function fB(){return HO(this)}function dB(){return new ai(this.value(),this.__chain__)}function hB(){this.__values__===e&&(this.__values__=aS(this.value()));var v=this.__index__>=this.__values__.length,b=v?e:this.__values__[this.__index__++];return{done:v,value:b}}function pB(){return this}function vB(v){for(var b,k=this;k instanceof kd;){var L=jO(k);L.__index__=0,L.__values__=e,b?B.__wrapped__=L:b=L;var B=L;k=k.__wrapped__}return B.__wrapped__=v,b}function gB(){var v=this.__wrapped__;if(v instanceof me){var b=v;return this.__actions__.length&&(b=new me(this)),b=b.reverse(),b.__actions__.push({func:zd,args:[Hg],thisArg:e}),new ai(b,this.__chain__)}return this.thru(Hg)}function yB(){return sO(this.__wrapped__,this.__actions__)}var mB=Nd(function(v,b,k){je.call(v,k)?++v[k]:Ca(v,k,1)});function bB(v,b,k){var L=Qt(v)?xw:cF;return k&&Or(v,b,k)&&(b=e),L(v,jt(b,3))}function xB(v,b){var k=Qt(v)?uo:Yw;return k(v,jt(b,3))}var _B=mO(FO),wB=mO(BO);function OB(v,b){return ar(Wd(v,b),1)}function SB(v,b){return ar(Wd(v,b),j)}function EB(v,b,k){return k=k===e?1:oe(k),ar(Wd(v,b),k)}function UO(v,b){var k=Qt(v)?ri:vo;return k(v,jt(b,3))}function VO(v,b){var k=Qt(v)?Y$:Gw;return k(v,jt(b,3))}var kB=Nd(function(v,b,k){je.call(v,k)?v[k].push(b):Ca(v,k,[b])});function MB(v,b,k,L){v=Nr(v)?v:xl(v),k=k&&!L?oe(k):0;var B=v.length;return k<0&&(k=Kn(B+k,0)),Vd(v)?k<=B&&v.indexOf(b,k)>-1:!!B&&ll(v,b,k)>-1}var AB=de(function(v,b,k){var L=-1,B=typeof b=="function",G=Nr(v)?st(v.length):[];return vo(v,function(X){G[++L]=B?Yr(b,X,k):Bc(X,b,k)}),G}),TB=Nd(function(v,b,k){Ca(v,k,b)});function Wd(v,b){var k=Qt(v)?hn:Kw;return k(v,jt(b,3))}function PB(v,b,k,L){return v==null?[]:(Qt(b)||(b=b==null?[]:[b]),k=L?e:k,Qt(k)||(k=k==null?[]:[k]),tO(v,b,k))}var CB=Nd(function(v,b,k){v[k?0:1].push(b)},function(){return[[],[]]});function LB(v,b,k){var L=Qt(v)?ig:Sw,B=arguments.length<3;return L(v,jt(b,4),k,B,vo)}function NB(v,b,k){var L=Qt(v)?H$:Sw,B=arguments.length<3;return L(v,jt(b,4),k,B,Gw)}function RB(v,b){var k=Qt(v)?uo:Yw;return k(v,Hd(jt(b,3)))}function IB(v){var b=Qt(v)?Fw:MF;return b(v)}function DB(v,b,k){(k?Or(v,b,k):b===e)?b=1:b=oe(b);var L=Qt(v)?iF:AF;return L(v,b)}function $B(v){var b=Qt(v)?aF:PF;return b(v)}function jB(v){if(v==null)return 0;if(Nr(v))return Vd(v)?ul(v):v.length;var b=dr(v);return b==Ot||b==ne?v.size:Og(v).length}function FB(v,b,k){var L=Qt(v)?ag:CF;return k&&Or(v,b,k)&&(b=e),L(v,jt(b,3))}var BB=de(function(v,b){if(v==null)return[];var k=b.length;return k>1&&Or(v,b[0],b[1])?b=[]:k>2&&Or(b[0],b[1],b[2])&&(b=[b[0]]),tO(v,ar(b,1),[])}),Gd=xj||function(){return ir.Date.now()};function zB(v,b){if(typeof b!="function")throw new ii(o);return v=oe(v),function(){if(--v<1)return b.apply(this,arguments)}}function XO(v,b,k){return b=k?e:b,b=v&&b==null?v.length:b,La(v,E,e,e,e,e,b)}function qO(v,b){var k;if(typeof b!="function")throw new ii(o);return v=oe(v),function(){return--v>0&&(k=b.apply(this,arguments)),v<=1&&(b=e),k}}var Vg=de(function(v,b,k){var L=y;if(k.length){var B=ho(k,ml(Vg));L|=O}return La(v,L,b,k,B)}),KO=de(function(v,b,k){var L=y|m;if(k.length){var B=ho(k,ml(KO));L|=O}return La(b,L,v,k,B)});function ZO(v,b,k){b=k?e:b;var L=La(v,_,e,e,e,e,e,b);return L.placeholder=ZO.placeholder,L}function QO(v,b,k){b=k?e:b;var L=La(v,w,e,e,e,e,e,b);return L.placeholder=QO.placeholder,L}function JO(v,b,k){var L,B,G,X,Q,nt,ct=0,ft=!1,gt=!1,St=!0;if(typeof v!="function")throw new ii(o);b=ci(b)||0,gn(k)&&(ft=!!k.leading,gt="maxWait"in k,G=gt?Kn(ci(k.maxWait)||0,b):G,St="trailing"in k?!!k.trailing:St);function Nt(In){var $i=L,$a=B;return L=B=e,ct=In,X=v.apply($a,$i),X}function Ft(In){return ct=In,Q=Hc(ye,b),ft?Nt(In):X}function le(In){var $i=In-nt,$a=In-ct,mS=b-$i;return gt?fr(mS,G-$a):mS}function Bt(In){var $i=In-nt,$a=In-ct;return nt===e||$i>=b||$i<0||gt&&$a>=G}function ye(){var In=Gd();if(Bt(In))return xe(In);Q=Hc(ye,le(In))}function xe(In){return Q=e,St&&L?Nt(In):(L=B=e,X)}function Xr(){Q!==e&&cO(Q),ct=0,L=nt=B=Q=e}function Sr(){return Q===e?X:xe(Gd())}function qr(){var In=Gd(),$i=Bt(In);if(L=arguments,B=this,nt=In,$i){if(Q===e)return Ft(nt);if(gt)return cO(Q),Q=Hc(ye,b),Nt(nt)}return Q===e&&(Q=Hc(ye,b)),X}return qr.cancel=Xr,qr.flush=Sr,qr}var WB=de(function(v,b){return Ww(v,1,b)}),GB=de(function(v,b,k){return Ww(v,ci(b)||0,k)});function YB(v){return La(v,A)}function Yd(v,b){if(typeof v!="function"||b!=null&&typeof b!="function")throw new ii(o);var k=function(){var L=arguments,B=b?b.apply(this,L):L[0],G=k.cache;if(G.has(B))return G.get(B);var X=v.apply(this,L);return k.cache=G.set(B,X)||G,X};return k.cache=new(Yd.Cache||Pa),k}Yd.Cache=Pa;function Hd(v){if(typeof v!="function")throw new ii(o);return function(){var b=arguments;switch(b.length){case 0:return!v.call(this);case 1:return!v.call(this,b[0]);case 2:return!v.call(this,b[0],b[1]);case 3:return!v.call(this,b[0],b[1],b[2])}return!v.apply(this,b)}}function HB(v){return qO(2,v)}var UB=LF(function(v,b){b=b.length==1&&Qt(b[0])?hn(b[0],Hr(jt())):hn(ar(b,1),Hr(jt()));var k=b.length;return de(function(L){for(var B=-1,G=fr(L.length,k);++B<G;)L[B]=b[B].call(this,L[B]);return Yr(v,this,L)})}),Xg=de(function(v,b){var k=ho(b,ml(Xg));return La(v,O,e,b,k)}),tS=de(function(v,b){var k=ho(b,ml(tS));return La(v,S,e,b,k)}),VB=Na(function(v,b){return La(v,M,e,e,e,b)});function XB(v,b){if(typeof v!="function")throw new ii(o);return b=b===e?b:oe(b),de(v,b)}function qB(v,b){if(typeof v!="function")throw new ii(o);return b=b==null?0:Kn(oe(b),0),de(function(k){var L=k[b],B=mo(k,0,b);return L&&fo(B,L),Yr(v,this,B)})}function KB(v,b,k){var L=!0,B=!0;if(typeof v!="function")throw new ii(o);return gn(k)&&(L="leading"in k?!!k.leading:L,B="trailing"in k?!!k.trailing:B),JO(v,b,{leading:L,maxWait:b,trailing:B})}function ZB(v){return XO(v,1)}function QB(v,b){return Xg(Lg(b),v)}function JB(){if(!arguments.length)return[];var v=arguments[0];return Qt(v)?v:[v]}function t9(v){return oi(v,h)}function e9(v,b){return b=typeof b=="function"?b:e,oi(v,h,b)}function n9(v){return oi(v,f|h)}function r9(v,b){return b=typeof b=="function"?b:e,oi(v,f|h,b)}function i9(v,b){return b==null||zw(v,b,tr(b))}function Di(v,b){return v===b||v!==v&&b!==b}var a9=$d(xg),o9=$d(function(v,b){return v>=b}),fs=Vw((function(){return arguments})())?Vw:function(v){return Tn(v)&&je.call(v,"callee")&&!Nw.call(v,"callee")},Qt=st.isArray,s9=pw?Hr(pw):vF;function Nr(v){return v!=null&&Ud(v.length)&&!Ia(v)}function Rn(v){return Tn(v)&&Nr(v)}function l9(v){return v===!0||v===!1||Tn(v)&&wr(v)==K}var bo=wj||ay,c9=vw?Hr(vw):gF;function u9(v){return Tn(v)&&v.nodeType===1&&!Uc(v)}function f9(v){if(v==null)return!0;if(Nr(v)&&(Qt(v)||typeof v=="string"||typeof v.splice=="function"||bo(v)||bl(v)||fs(v)))return!v.length;var b=dr(v);if(b==Ot||b==ne)return!v.size;if(Yc(v))return!Og(v).length;for(var k in v)if(je.call(v,k))return!1;return!0}function d9(v,b){return zc(v,b)}function h9(v,b,k){k=typeof k=="function"?k:e;var L=k?k(v,b):e;return L===e?zc(v,b,e,k):!!L}function qg(v){if(!Tn(v))return!1;var b=wr(v);return b==yt||b==vt||typeof v.message=="string"&&typeof v.name=="string"&&!Uc(v)}function p9(v){return typeof v=="number"&&Iw(v)}function Ia(v){if(!gn(v))return!1;var b=wr(v);return b==mt||b==wt||b==rt||b==Ct}function eS(v){return typeof v=="number"&&v==oe(v)}function Ud(v){return typeof v=="number"&&v>-1&&v%1==0&&v<=I}function gn(v){var b=typeof v;return v!=null&&(b=="object"||b=="function")}function Tn(v){return v!=null&&typeof v=="object"}var nS=gw?Hr(gw):mF;function v9(v,b){return v===b||wg(v,b,Fg(b))}function g9(v,b,k){return k=typeof k=="function"?k:e,wg(v,b,Fg(b),k)}function y9(v){return rS(v)&&v!=+v}function m9(v){if(e7(v))throw new Xt(a);return Xw(v)}function b9(v){return v===null}function x9(v){return v==null}function rS(v){return typeof v=="number"||Tn(v)&&wr(v)==At}function Uc(v){if(!Tn(v)||wr(v)!=kt)return!1;var b=bd(v);if(b===null)return!0;var k=je.call(b,"constructor")&&b.constructor;return typeof k=="function"&&k instanceof k&&vd.call(k)==gj}var Kg=yw?Hr(yw):bF;function _9(v){return eS(v)&&v>=-I&&v<=I}var iS=mw?Hr(mw):xF;function Vd(v){return typeof v=="string"||!Qt(v)&&Tn(v)&&wr(v)==Zt}function Vr(v){return typeof v=="symbol"||Tn(v)&&wr(v)==Pe}var bl=bw?Hr(bw):_F;function w9(v){return v===e}function O9(v){return Tn(v)&&dr(v)==Se}function S9(v){return Tn(v)&&wr(v)==ge}var E9=$d(Sg),k9=$d(function(v,b){return v<=b});function aS(v){if(!v)return[];if(Nr(v))return Vd(v)?Ri(v):Lr(v);if(Nc&&v[Nc])return ij(v[Nc]());var b=dr(v),k=b==Ot?fg:b==ne?dd:xl;return k(v)}function Da(v){if(!v)return v===0?v:0;if(v=ci(v),v===j||v===-j){var b=v<0?-1:1;return b*$}return v===v?v:0}function oe(v){var b=Da(v),k=b%1;return b===b?k?b-k:b:0}function oS(v){return v?ss(oe(v),0,Y):0}function ci(v){if(typeof v=="number")return v;if(Vr(v))return z;if(gn(v)){var b=typeof v.valueOf=="function"?v.valueOf():v;v=gn(b)?b+"":b}if(typeof v!="string")return v===0?v:+v;v=Ew(v);var k=s$.test(v);return k||c$.test(v)?z$(v.slice(2),k?2:8):o$.test(v)?z:+v}function sS(v){return Qi(v,Rr(v))}function M9(v){return v?ss(oe(v),-I,I):v===0?v:0}function Fe(v){return v==null?"":Ur(v)}var A9=gl(function(v,b){if(Yc(b)||Nr(b)){Qi(b,tr(b),v);return}for(var k in b)je.call(b,k)&&jc(v,k,b[k])}),lS=gl(function(v,b){Qi(b,Rr(b),v)}),Xd=gl(function(v,b,k,L){Qi(b,Rr(b),v,L)}),T9=gl(function(v,b,k,L){Qi(b,tr(b),v,L)}),P9=Na(yg);function C9(v,b){var k=vl(v);return b==null?k:Bw(k,b)}var L9=de(function(v,b){v=Je(v);var k=-1,L=b.length,B=L>2?b[2]:e;for(B&&Or(b[0],b[1],B)&&(L=1);++k<L;)for(var G=b[k],X=Rr(G),Q=-1,nt=X.length;++Q<nt;){var ct=X[Q],ft=v[ct];(ft===e||Di(ft,dl[ct])&&!je.call(v,ct))&&(v[ct]=G[ct])}return v}),N9=de(function(v){return v.push(e,EO),Yr(cS,e,v)});function R9(v,b){return _w(v,jt(b,3),Zi)}function I9(v,b){return _w(v,jt(b,3),bg)}function D9(v,b){return v==null?v:mg(v,jt(b,3),Rr)}function $9(v,b){return v==null?v:Hw(v,jt(b,3),Rr)}function j9(v,b){return v&&Zi(v,jt(b,3))}function F9(v,b){return v&&bg(v,jt(b,3))}function B9(v){return v==null?[]:Td(v,tr(v))}function z9(v){return v==null?[]:Td(v,Rr(v))}function Zg(v,b,k){var L=v==null?e:ls(v,b);return L===e?k:L}function W9(v,b){return v!=null&&AO(v,b,fF)}function Qg(v,b){return v!=null&&AO(v,b,dF)}var G9=xO(function(v,b,k){b!=null&&typeof b.toString!="function"&&(b=gd.call(b)),v[b]=k},ty(Ir)),Y9=xO(function(v,b,k){b!=null&&typeof b.toString!="function"&&(b=gd.call(b)),je.call(v,b)?v[b].push(k):v[b]=[k]},jt),H9=de(Bc);function tr(v){return Nr(v)?jw(v):Og(v)}function Rr(v){return Nr(v)?jw(v,!0):wF(v)}function U9(v,b){var k={};return b=jt(b,3),Zi(v,function(L,B,G){Ca(k,b(L,B,G),L)}),k}function V9(v,b){var k={};return b=jt(b,3),Zi(v,function(L,B,G){Ca(k,B,b(L,B,G))}),k}var X9=gl(function(v,b,k){Pd(v,b,k)}),cS=gl(function(v,b,k,L){Pd(v,b,k,L)}),q9=Na(function(v,b){var k={};if(v==null)return k;var L=!1;b=hn(b,function(G){return G=yo(G,v),L||(L=G.length>1),G}),Qi(v,$g(v),k),L&&(k=oi(k,f|d|h,GF));for(var B=b.length;B--;)Tg(k,b[B]);return k});function K9(v,b){return uS(v,Hd(jt(b)))}var Z9=Na(function(v,b){return v==null?{}:SF(v,b)});function uS(v,b){if(v==null)return{};var k=hn($g(v),function(L){return[L]});return b=jt(b),eO(v,k,function(L,B){return b(L,B[0])})}function Q9(v,b,k){b=yo(b,v);var L=-1,B=b.length;for(B||(B=1,v=e);++L<B;){var G=v==null?e:v[Ji(b[L])];G===e&&(L=B,G=k),v=Ia(G)?G.call(v):G}return v}function J9(v,b,k){return v==null?v:Wc(v,b,k)}function tz(v,b,k,L){return L=typeof L=="function"?L:e,v==null?v:Wc(v,b,k,L)}var fS=OO(tr),dS=OO(Rr);function ez(v,b,k){var L=Qt(v),B=L||bo(v)||bl(v);if(b=jt(b,4),k==null){var G=v&&v.constructor;B?k=L?new G:[]:gn(v)?k=Ia(G)?vl(bd(v)):{}:k={}}return(B?ri:Zi)(v,function(X,Q,nt){return b(k,X,Q,nt)}),k}function nz(v,b){return v==null?!0:Tg(v,b)}function rz(v,b,k){return v==null?v:oO(v,b,Lg(k))}function iz(v,b,k,L){return L=typeof L=="function"?L:e,v==null?v:oO(v,b,Lg(k),L)}function xl(v){return v==null?[]:ug(v,tr(v))}function az(v){return v==null?[]:ug(v,Rr(v))}function oz(v,b,k){return k===e&&(k=b,b=e),k!==e&&(k=ci(k),k=k===k?k:0),b!==e&&(b=ci(b),b=b===b?b:0),ss(ci(v),b,k)}function sz(v,b,k){return b=Da(b),k===e?(k=b,b=0):k=Da(k),v=ci(v),hF(v,b,k)}function lz(v,b,k){if(k&&typeof k!="boolean"&&Or(v,b,k)&&(b=k=e),k===e&&(typeof b=="boolean"?(k=b,b=e):typeof v=="boolean"&&(k=v,v=e)),v===e&&b===e?(v=0,b=1):(v=Da(v),b===e?(b=v,v=0):b=Da(b)),v>b){var L=v;v=b,b=L}if(k||v%1||b%1){var B=Dw();return fr(v+B*(b-v+B$("1e-"+((B+"").length-1))),b)}return kg(v,b)}var cz=yl(function(v,b,k){return b=b.toLowerCase(),v+(k?hS(b):b)});function hS(v){return Jg(Fe(v).toLowerCase())}function pS(v){return v=Fe(v),v&&v.replace(f$,J$).replace(P$,"")}function uz(v,b,k){v=Fe(v),b=Ur(b);var L=v.length;k=k===e?L:ss(oe(k),0,L);var B=k;return k-=b.length,k>=0&&v.slice(k,B)==b}function fz(v){return v=Fe(v),v&&HD.test(v)?v.replace(H_,tj):v}function dz(v){return v=Fe(v),v&&ZD.test(v)?v.replace(X0,"\\$&"):v}var hz=yl(function(v,b,k){return v+(k?"-":"")+b.toLowerCase()}),pz=yl(function(v,b,k){return v+(k?" ":"")+b.toLowerCase()}),vz=yO("toLowerCase");function gz(v,b,k){v=Fe(v),b=oe(b);var L=b?ul(v):0;if(!b||L>=b)return v;var B=(b-L)/2;return Dd(Od(B),k)+v+Dd(wd(B),k)}function yz(v,b,k){v=Fe(v),b=oe(b);var L=b?ul(v):0;return b&&L<b?v+Dd(b-L,k):v}function mz(v,b,k){v=Fe(v),b=oe(b);var L=b?ul(v):0;return b&&L<b?Dd(b-L,k)+v:v}function bz(v,b,k){return k||b==null?b=0:b&&(b=+b),kj(Fe(v).replace(q0,""),b||0)}function xz(v,b,k){return(k?Or(v,b,k):b===e)?b=1:b=oe(b),Mg(Fe(v),b)}function _z(){var v=arguments,b=Fe(v[0]);return v.length<3?b:b.replace(v[1],v[2])}var wz=yl(function(v,b,k){return v+(k?"_":"")+b.toLowerCase()});function Oz(v,b,k){return k&&typeof k!="number"&&Or(v,b,k)&&(b=k=e),k=k===e?Y:k>>>0,k?(v=Fe(v),v&&(typeof b=="string"||b!=null&&!Kg(b))&&(b=Ur(b),!b&&cl(v))?mo(Ri(v),0,k):v.split(b,k)):[]}var Sz=yl(function(v,b,k){return v+(k?" ":"")+Jg(b)});function Ez(v,b,k){return v=Fe(v),k=k==null?0:ss(oe(k),0,v.length),b=Ur(b),v.slice(k,k+b.length)==b}function kz(v,b,k){var L=W.templateSettings;k&&Or(v,b,k)&&(b=e),v=Fe(v),b=Xd({},b,L,SO);var B=Xd({},b.imports,L.imports,SO),G=tr(B),X=ug(B,G),Q,nt,ct=0,ft=b.interpolate||sd,gt="__p += '",St=dg((b.escape||sd).source+"|"+ft.source+"|"+(ft===U_?a$:sd).source+"|"+(b.evaluate||sd).source+"|$","g"),Nt="//# sourceURL="+(je.call(b,"sourceURL")?(b.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++I$+"]")+`
243
+ `;v.replace(St,function(Bt,ye,xe,Xr,Sr,qr){return xe||(xe=Xr),gt+=v.slice(ct,qr).replace(d$,ej),ye&&(Q=!0,gt+=`' +
244
+ __e(`+ye+`) +
245
+ '`),Sr&&(nt=!0,gt+=`';
246
+ `+Sr+`;
247
+ __p += '`),xe&&(gt+=`' +
248
+ ((__t = (`+xe+`)) == null ? '' : __t) +
249
+ '`),ct=qr+Bt.length,Bt}),gt+=`';
250
+ `;var Ft=je.call(b,"variable")&&b.variable;if(!Ft)gt=`with (obj) {
251
+ `+gt+`
252
+ }
253
+ `;else if(r$.test(Ft))throw new Xt(s);gt=(nt?gt.replace(V0,""):gt).replace(WD,"$1").replace(GD,"$1;"),gt="function("+(Ft||"obj")+`) {
254
+ `+(Ft?"":`obj || (obj = {});
255
+ `)+"var __t, __p = ''"+(Q?", __e = _.escape":"")+(nt?`, __j = Array.prototype.join;
256
+ function print() { __p += __j.call(arguments, '') }
257
+ `:`;
258
+ `)+gt+`return __p
259
+ }`;var le=gS(function(){return Ce(G,Nt+"return "+gt).apply(e,X)});if(le.source=gt,qg(le))throw le;return le}function Mz(v){return Fe(v).toLowerCase()}function Az(v){return Fe(v).toUpperCase()}function Tz(v,b,k){if(v=Fe(v),v&&(k||b===e))return Ew(v);if(!v||!(b=Ur(b)))return v;var L=Ri(v),B=Ri(b),G=kw(L,B),X=Mw(L,B)+1;return mo(L,G,X).join("")}function Pz(v,b,k){if(v=Fe(v),v&&(k||b===e))return v.slice(0,Tw(v)+1);if(!v||!(b=Ur(b)))return v;var L=Ri(v),B=Mw(L,Ri(b))+1;return mo(L,0,B).join("")}function Cz(v,b,k){if(v=Fe(v),v&&(k||b===e))return v.replace(q0,"");if(!v||!(b=Ur(b)))return v;var L=Ri(v),B=kw(L,Ri(b));return mo(L,B).join("")}function Lz(v,b){var k=T,L=P;if(gn(b)){var B="separator"in b?b.separator:B;k="length"in b?oe(b.length):k,L="omission"in b?Ur(b.omission):L}v=Fe(v);var G=v.length;if(cl(v)){var X=Ri(v);G=X.length}if(k>=G)return v;var Q=k-ul(L);if(Q<1)return L;var nt=X?mo(X,0,Q).join(""):v.slice(0,Q);if(B===e)return nt+L;if(X&&(Q+=nt.length-Q),Kg(B)){if(v.slice(Q).search(B)){var ct,ft=nt;for(B.global||(B=dg(B.source,Fe(V_.exec(B))+"g")),B.lastIndex=0;ct=B.exec(ft);)var gt=ct.index;nt=nt.slice(0,gt===e?Q:gt)}}else if(v.indexOf(Ur(B),Q)!=Q){var St=nt.lastIndexOf(B);St>-1&&(nt=nt.slice(0,St))}return nt+L}function Nz(v){return v=Fe(v),v&&YD.test(v)?v.replace(Y_,lj):v}var Rz=yl(function(v,b,k){return v+(k?" ":"")+b.toUpperCase()}),Jg=yO("toUpperCase");function vS(v,b,k){return v=Fe(v),b=k?e:b,b===e?rj(v)?fj(v):X$(v):v.match(b)||[]}var gS=de(function(v,b){try{return Yr(v,e,b)}catch(k){return qg(k)?k:new Xt(k)}}),Iz=Na(function(v,b){return ri(b,function(k){k=Ji(k),Ca(v,k,Vg(v[k],v))}),v});function Dz(v){var b=v==null?0:v.length,k=jt();return v=b?hn(v,function(L){if(typeof L[1]!="function")throw new ii(o);return[k(L[0]),L[1]]}):[],de(function(L){for(var B=-1;++B<b;){var G=v[B];if(Yr(G[0],this,L))return Yr(G[1],this,L)}})}function $z(v){return lF(oi(v,f))}function ty(v){return function(){return v}}function jz(v,b){return v==null||v!==v?b:v}var Fz=bO(),Bz=bO(!0);function Ir(v){return v}function ey(v){return qw(typeof v=="function"?v:oi(v,f))}function zz(v){return Zw(oi(v,f))}function Wz(v,b){return Qw(v,oi(b,f))}var Gz=de(function(v,b){return function(k){return Bc(k,v,b)}}),Yz=de(function(v,b){return function(k){return Bc(v,k,b)}});function ny(v,b,k){var L=tr(b),B=Td(b,L);k==null&&!(gn(b)&&(B.length||!L.length))&&(k=b,b=v,v=this,B=Td(b,tr(b)));var G=!(gn(k)&&"chain"in k)||!!k.chain,X=Ia(v);return ri(B,function(Q){var nt=b[Q];v[Q]=nt,X&&(v.prototype[Q]=function(){var ct=this.__chain__;if(G||ct){var ft=v(this.__wrapped__),gt=ft.__actions__=Lr(this.__actions__);return gt.push({func:nt,args:arguments,thisArg:v}),ft.__chain__=ct,ft}return nt.apply(v,fo([this.value()],arguments))})}),v}function Hz(){return ir._===this&&(ir._=yj),this}function ry(){}function Uz(v){return v=oe(v),de(function(b){return Jw(b,v)})}var Vz=Rg(hn),Xz=Rg(xw),qz=Rg(ag);function yS(v){return zg(v)?og(Ji(v)):EF(v)}function Kz(v){return function(b){return v==null?e:ls(v,b)}}var Zz=_O(),Qz=_O(!0);function iy(){return[]}function ay(){return!1}function Jz(){return{}}function tW(){return""}function eW(){return!0}function nW(v,b){if(v=oe(v),v<1||v>I)return[];var k=Y,L=fr(v,Y);b=jt(b),v-=Y;for(var B=cg(L,b);++k<v;)b(k);return B}function rW(v){return Qt(v)?hn(v,Ji):Vr(v)?[v]:Lr($O(Fe(v)))}function iW(v){var b=++vj;return Fe(v)+b}var aW=Id(function(v,b){return v+b},0),oW=Ig("ceil"),sW=Id(function(v,b){return v/b},1),lW=Ig("floor");function cW(v){return v&&v.length?Ad(v,Ir,xg):e}function uW(v,b){return v&&v.length?Ad(v,jt(b,2),xg):e}function fW(v){return Ow(v,Ir)}function dW(v,b){return Ow(v,jt(b,2))}function hW(v){return v&&v.length?Ad(v,Ir,Sg):e}function pW(v,b){return v&&v.length?Ad(v,jt(b,2),Sg):e}var vW=Id(function(v,b){return v*b},1),gW=Ig("round"),yW=Id(function(v,b){return v-b},0);function mW(v){return v&&v.length?lg(v,Ir):0}function bW(v,b){return v&&v.length?lg(v,jt(b,2)):0}return W.after=zB,W.ary=XO,W.assign=A9,W.assignIn=lS,W.assignInWith=Xd,W.assignWith=T9,W.at=P9,W.before=qO,W.bind=Vg,W.bindAll=Iz,W.bindKey=KO,W.castArray=JB,W.chain=HO,W.chunk=l7,W.compact=c7,W.concat=u7,W.cond=Dz,W.conforms=$z,W.constant=ty,W.countBy=mB,W.create=C9,W.curry=ZO,W.curryRight=QO,W.debounce=JO,W.defaults=L9,W.defaultsDeep=N9,W.defer=WB,W.delay=GB,W.difference=f7,W.differenceBy=d7,W.differenceWith=h7,W.drop=p7,W.dropRight=v7,W.dropRightWhile=g7,W.dropWhile=y7,W.fill=m7,W.filter=xB,W.flatMap=OB,W.flatMapDeep=SB,W.flatMapDepth=EB,W.flatten=zO,W.flattenDeep=b7,W.flattenDepth=x7,W.flip=YB,W.flow=Fz,W.flowRight=Bz,W.fromPairs=_7,W.functions=B9,W.functionsIn=z9,W.groupBy=kB,W.initial=O7,W.intersection=S7,W.intersectionBy=E7,W.intersectionWith=k7,W.invert=G9,W.invertBy=Y9,W.invokeMap=AB,W.iteratee=ey,W.keyBy=TB,W.keys=tr,W.keysIn=Rr,W.map=Wd,W.mapKeys=U9,W.mapValues=V9,W.matches=zz,W.matchesProperty=Wz,W.memoize=Yd,W.merge=X9,W.mergeWith=cS,W.method=Gz,W.methodOf=Yz,W.mixin=ny,W.negate=Hd,W.nthArg=Uz,W.omit=q9,W.omitBy=K9,W.once=HB,W.orderBy=PB,W.over=Vz,W.overArgs=UB,W.overEvery=Xz,W.overSome=qz,W.partial=Xg,W.partialRight=tS,W.partition=CB,W.pick=Z9,W.pickBy=uS,W.property=yS,W.propertyOf=Kz,W.pull=P7,W.pullAll=GO,W.pullAllBy=C7,W.pullAllWith=L7,W.pullAt=N7,W.range=Zz,W.rangeRight=Qz,W.rearg=VB,W.reject=RB,W.remove=R7,W.rest=XB,W.reverse=Hg,W.sampleSize=DB,W.set=J9,W.setWith=tz,W.shuffle=$B,W.slice=I7,W.sortBy=BB,W.sortedUniq=W7,W.sortedUniqBy=G7,W.split=Oz,W.spread=qB,W.tail=Y7,W.take=H7,W.takeRight=U7,W.takeRightWhile=V7,W.takeWhile=X7,W.tap=cB,W.throttle=KB,W.thru=zd,W.toArray=aS,W.toPairs=fS,W.toPairsIn=dS,W.toPath=rW,W.toPlainObject=sS,W.transform=ez,W.unary=ZB,W.union=q7,W.unionBy=K7,W.unionWith=Z7,W.uniq=Q7,W.uniqBy=J7,W.uniqWith=tB,W.unset=nz,W.unzip=Ug,W.unzipWith=YO,W.update=rz,W.updateWith=iz,W.values=xl,W.valuesIn=az,W.without=eB,W.words=vS,W.wrap=QB,W.xor=nB,W.xorBy=rB,W.xorWith=iB,W.zip=aB,W.zipObject=oB,W.zipObjectDeep=sB,W.zipWith=lB,W.entries=fS,W.entriesIn=dS,W.extend=lS,W.extendWith=Xd,ny(W,W),W.add=aW,W.attempt=gS,W.camelCase=cz,W.capitalize=hS,W.ceil=oW,W.clamp=oz,W.clone=t9,W.cloneDeep=n9,W.cloneDeepWith=r9,W.cloneWith=e9,W.conformsTo=i9,W.deburr=pS,W.defaultTo=jz,W.divide=sW,W.endsWith=uz,W.eq=Di,W.escape=fz,W.escapeRegExp=dz,W.every=bB,W.find=_B,W.findIndex=FO,W.findKey=R9,W.findLast=wB,W.findLastIndex=BO,W.findLastKey=I9,W.floor=lW,W.forEach=UO,W.forEachRight=VO,W.forIn=D9,W.forInRight=$9,W.forOwn=j9,W.forOwnRight=F9,W.get=Zg,W.gt=a9,W.gte=o9,W.has=W9,W.hasIn=Qg,W.head=WO,W.identity=Ir,W.includes=MB,W.indexOf=w7,W.inRange=sz,W.invoke=H9,W.isArguments=fs,W.isArray=Qt,W.isArrayBuffer=s9,W.isArrayLike=Nr,W.isArrayLikeObject=Rn,W.isBoolean=l9,W.isBuffer=bo,W.isDate=c9,W.isElement=u9,W.isEmpty=f9,W.isEqual=d9,W.isEqualWith=h9,W.isError=qg,W.isFinite=p9,W.isFunction=Ia,W.isInteger=eS,W.isLength=Ud,W.isMap=nS,W.isMatch=v9,W.isMatchWith=g9,W.isNaN=y9,W.isNative=m9,W.isNil=x9,W.isNull=b9,W.isNumber=rS,W.isObject=gn,W.isObjectLike=Tn,W.isPlainObject=Uc,W.isRegExp=Kg,W.isSafeInteger=_9,W.isSet=iS,W.isString=Vd,W.isSymbol=Vr,W.isTypedArray=bl,W.isUndefined=w9,W.isWeakMap=O9,W.isWeakSet=S9,W.join=M7,W.kebabCase=hz,W.last=li,W.lastIndexOf=A7,W.lowerCase=pz,W.lowerFirst=vz,W.lt=E9,W.lte=k9,W.max=cW,W.maxBy=uW,W.mean=fW,W.meanBy=dW,W.min=hW,W.minBy=pW,W.stubArray=iy,W.stubFalse=ay,W.stubObject=Jz,W.stubString=tW,W.stubTrue=eW,W.multiply=vW,W.nth=T7,W.noConflict=Hz,W.noop=ry,W.now=Gd,W.pad=gz,W.padEnd=yz,W.padStart=mz,W.parseInt=bz,W.random=lz,W.reduce=LB,W.reduceRight=NB,W.repeat=xz,W.replace=_z,W.result=Q9,W.round=gW,W.runInContext=et,W.sample=IB,W.size=jB,W.snakeCase=wz,W.some=FB,W.sortedIndex=D7,W.sortedIndexBy=$7,W.sortedIndexOf=j7,W.sortedLastIndex=F7,W.sortedLastIndexBy=B7,W.sortedLastIndexOf=z7,W.startCase=Sz,W.startsWith=Ez,W.subtract=yW,W.sum=mW,W.sumBy=bW,W.template=kz,W.times=nW,W.toFinite=Da,W.toInteger=oe,W.toLength=oS,W.toLower=Mz,W.toNumber=ci,W.toSafeInteger=M9,W.toString=Fe,W.toUpper=Az,W.trim=Tz,W.trimEnd=Pz,W.trimStart=Cz,W.truncate=Lz,W.unescape=Nz,W.uniqueId=iW,W.upperCase=Rz,W.upperFirst=Jg,W.each=UO,W.eachRight=VO,W.first=WO,ny(W,(function(){var v={};return Zi(W,function(b,k){je.call(W.prototype,k)||(v[k]=b)}),v})(),{chain:!1}),W.VERSION=r,ri(["bind","bindKey","curry","curryRight","partial","partialRight"],function(v){W[v].placeholder=W}),ri(["drop","take"],function(v,b){me.prototype[v]=function(k){k=k===e?1:Kn(oe(k),0);var L=this.__filtered__&&!b?new me(this):this.clone();return L.__filtered__?L.__takeCount__=fr(k,L.__takeCount__):L.__views__.push({size:fr(k,Y),type:v+(L.__dir__<0?"Right":"")}),L},me.prototype[v+"Right"]=function(k){return this.reverse()[v](k).reverse()}}),ri(["filter","map","takeWhile"],function(v,b){var k=b+1,L=k==R||k==F;me.prototype[v]=function(B){var G=this.clone();return G.__iteratees__.push({iteratee:jt(B,3),type:k}),G.__filtered__=G.__filtered__||L,G}}),ri(["head","last"],function(v,b){var k="take"+(b?"Right":"");me.prototype[v]=function(){return this[k](1).value()[0]}}),ri(["initial","tail"],function(v,b){var k="drop"+(b?"":"Right");me.prototype[v]=function(){return this.__filtered__?new me(this):this[k](1)}}),me.prototype.compact=function(){return this.filter(Ir)},me.prototype.find=function(v){return this.filter(v).head()},me.prototype.findLast=function(v){return this.reverse().find(v)},me.prototype.invokeMap=de(function(v,b){return typeof v=="function"?new me(this):this.map(function(k){return Bc(k,v,b)})}),me.prototype.reject=function(v){return this.filter(Hd(jt(v)))},me.prototype.slice=function(v,b){v=oe(v);var k=this;return k.__filtered__&&(v>0||b<0)?new me(k):(v<0?k=k.takeRight(-v):v&&(k=k.drop(v)),b!==e&&(b=oe(b),k=b<0?k.dropRight(-b):k.take(b-v)),k)},me.prototype.takeRightWhile=function(v){return this.reverse().takeWhile(v).reverse()},me.prototype.toArray=function(){return this.take(Y)},Zi(me.prototype,function(v,b){var k=/^(?:filter|find|map|reject)|While$/.test(b),L=/^(?:head|last)$/.test(b),B=W[L?"take"+(b=="last"?"Right":""):b],G=L||/^find/.test(b);B&&(W.prototype[b]=function(){var X=this.__wrapped__,Q=L?[1]:arguments,nt=X instanceof me,ct=Q[0],ft=nt||Qt(X),gt=function(ye){var xe=B.apply(W,fo([ye],Q));return L&&St?xe[0]:xe};ft&&k&&typeof ct=="function"&&ct.length!=1&&(nt=ft=!1);var St=this.__chain__,Nt=!!this.__actions__.length,Ft=G&&!St,le=nt&&!Nt;if(!G&&ft){X=le?X:new me(this);var Bt=v.apply(X,Q);return Bt.__actions__.push({func:zd,args:[gt],thisArg:e}),new ai(Bt,St)}return Ft&&le?v.apply(this,Q):(Bt=this.thru(gt),Ft?L?Bt.value()[0]:Bt.value():Bt)})}),ri(["pop","push","shift","sort","splice","unshift"],function(v){var b=hd[v],k=/^(?:push|sort|unshift)$/.test(v)?"tap":"thru",L=/^(?:pop|shift)$/.test(v);W.prototype[v]=function(){var B=arguments;if(L&&!this.__chain__){var G=this.value();return b.apply(Qt(G)?G:[],B)}return this[k](function(X){return b.apply(Qt(X)?X:[],B)})}}),Zi(me.prototype,function(v,b){var k=W[b];if(k){var L=k.name+"";je.call(pl,L)||(pl[L]=[]),pl[L].push({name:b,func:k})}}),pl[Rd(e,m).name]=[{name:"wrapper",func:e}],me.prototype.clone=Nj,me.prototype.reverse=Rj,me.prototype.value=Ij,W.prototype.at=uB,W.prototype.chain=fB,W.prototype.commit=dB,W.prototype.next=hB,W.prototype.plant=vB,W.prototype.reverse=gB,W.prototype.toJSON=W.prototype.valueOf=W.prototype.value=yB,W.prototype.first=W.prototype.head,Nc&&(W.prototype[Nc]=pB),W}),fl=dj();rs?((rs.exports=fl)._=fl,eg._=fl):ir._=fl}).call(Nmt)})(Cu,Cu.exports)),Cu.exports}var tt=Rmt(),Imt=function(t){var n=[/\breact\b/i,/\.jsx/,/children:\s*\[/,/\*\s*[#@]__PURE__\s*\*/],e=/(\w+)?\.createElement\(\s*(['"`])([^'"`]+)\2/g,r=new Set(["g","circle","ellipse","image","rect","line","polyline","polygon","text","path","html","mesh"]);if(n.some(function(a){return a.test(t)}))return!0;var i=t.match(e);return i?i.some(function(a){var o=a.match(/\.createElement\(\s*(['"`])([^'"`]+)\1/);return o&&!r.has(o[2].toLowerCase())}):!1},Mb=function(){return Mb=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++){n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Mb.apply(this,arguments)};function Dmt(t,n){var e=Lu(null),r=Lu(null),i=Lu(null),a=n.onReady,o=n.onEvent,s=function(u,f){var d;u===void 0&&(u="image/png");var h=(d=i.current)===null||d===void 0?void 0:d.getElementsByTagName("canvas")[0];return h==null?void 0:h.toDataURL(u,f)},l=function(u,f,d){u===void 0&&(u="download"),f===void 0&&(f="image/png");var h=u;u.indexOf(".")===-1&&(h="".concat(u,".").concat(f.split("/")[1]));var p=s(f,d),g=document.createElement("a");return g.href=p,g.download=h,document.body.appendChild(g),g.click(),document.body.removeChild(g),g=null,h},c=function(u,f){if(f===void 0&&(f=!1),!!tt.isObject(u)){var d=Object.keys(u),h=f;d.forEach(function(p){var g=u[p];p==="tooltip"&&(h=!0),tt.isFunction(g)&&Imt("".concat(g))?u[p]=function(){for(var y=[],m=0;m<arguments.length;m++)y[m]=arguments[m];return Amt(g.apply(void 0,y),h)}:tt.isArray(g)?g.forEach(function(y){c(y,h)}):tt.isObject(g)?c(g,h):h=f})}};return yp(function(){e.current&&!tt.isEqual(r.current,n)&&(r.current=tt.cloneDeep(n),c(n),e.current.update(n),e.current.render())},[n]),yp(function(){if(!i.current)return function(){return null};r.current||(r.current=tt.cloneDeep(n)),c(n);var u=new t(i.current,Mb({},n));u.toDataURL=s,u.downloadImage=l,u.render(),e.current=u,a&&a(u);var f=function(d){o&&o(u,d)};return u.on("*",f),function(){e.current&&(e.current.destroy(),e.current.off("*",f),e.current=void 0)}},[]),{chart:e,container:i}}const $mt={field:"value",size:[1,1],round:!1,padding:0,sort:(t,n)=>n.value-t.value,as:["x","y"],ignoreParentValue:!0},jmt="nodeIndex",Nf="childNodeCount",Fmt="nodeAncestor",jm="Invalid field: it must be a string!";function Bmt(t,n){const{field:e,fields:r}=t;if(tn(e))return e;if(Cn(e))return console.warn(jm),e[0];if(console.warn(`${jm} will try to get fields instead.`),tn(r))return r;if(Cn(r)&&r.length)return r[0];throw new TypeError(jm)}function zmt(t){const n=[];if(t&&t.each){let e,r;t.each(i=>{var a,o;i.parent!==e?(e=i.parent,r=0):r+=1;const s=RP((((a=i.ancestors)===null||a===void 0?void 0:a.call(i))||[]).map(l=>n.find(c=>c.name===l.name)||l),({depth:l})=>l>0&&l<i.depth);i[Fmt]=s,i[Nf]=((o=i.children)===null||o===void 0?void 0:o.length)||0,i[jmt]=r,n.push(i)})}else t&&t.eachNode&&t.eachNode(e=>{n.push(e)});return n}function Wmt(t,n){n=zP({},$mt,n);const e=n.as;if(!Cn(e)||e.length!==2)throw new TypeError('Invalid as: it must be an array with 2 strings (e.g. [ "x", "y" ])!');let r;try{r=Bmt(n)}catch(l){console.warn(l)}const a=(l=>uat().size(n.size).round(n.round).padding(n.padding)(Mc(l).sum(c=>Qu(c.children)?n.ignoreParentValue?0:c[r]-DP(c.children,(u,f)=>u+f[r],0):c[r]).sort(n.sort)))(t),o=e[0],s=e[1];return a.each(l=>{var c,u;l[o]=[l.x0,l.x1,l.x1,l.x0],l[s]=[l.y1,l.y1,l.y0,l.y0],l.name=l.name||((c=l.data)===null||c===void 0?void 0:c.name)||((u=l.data)===null||u===void 0?void 0:u.label),l.data.name=l.name,["x0","x1","y0","y1"].forEach(f=>{e.indexOf(f)===-1&&delete l[f]})}),zmt(a)}var Gmt=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};const Kl="sunburst",G_="markType",DD="path",Pv="ancestor-node";function Ymt(t){const{data:n,encode:e}=t,{color:r,value:i}=e,o=Wmt(n,{field:i,type:"hierarchy.partition",as:["x","y"]}),s=[];return o.forEach(l=>{var c,u,f,d;if(l.depth===0)return null;let h=l.data.name;const p=[h];let g=Object.assign({},l);for(;g.depth>1;)h=`${(c=g.parent.data)===null||c===void 0?void 0:c.name} / ${h}`,p.unshift((u=g.parent.data)===null||u===void 0?void 0:u.name),g=g.parent;const y=Object.assign(Object.assign(Object.assign({},Df(l.data,[i])),{[DD]:h,[Pv]:g.data.name}),l);r&&r!==Pv&&(y[r]=l.data[r]||((d=(f=l.parent)===null||f===void 0?void 0:f.data)===null||d===void 0?void 0:d[r])),s.push(y)}),s.map(l=>{const c=l.x.slice(0,2),u=[l.y[2],l.y[0]];return c[0]===c[1]&&(u[0]=u[1]=(l.y[2]+l.y[0])/2),Object.assign(Object.assign({},l),{x:c,y:u,fillOpacity:Math.pow(.85,l.depth)})})}const aP={id:Kl,encode:{x:"x",y:"y",key:DD,color:Pv,value:"value"},axis:{x:!1,y:!1},style:{[G_]:Kl,stroke:"#fff",lineWidth:.5,fillOpacity:"fillOpacity",[Nf]:Nf,depth:"depth"},state:{active:{zIndex:2,stroke:"#000"},inactive:{zIndex:1,stroke:"#fff"}},legend:!1,interaction:{drillDown:!0},coordinate:{type:"polar",innerRadius:.2}},$D=t=>{const{encode:n,data:e=[]}=t,r=Gmt(t,["encode","data"]),i=Object.assign(Object.assign({},r.coordinate),{innerRadius:Math.max(zt(r,["coordinate","innerRadius"],.2),1e-5)}),a=Object.assign(Object.assign({},aP.encode),n),{value:o}=a,s=Ymt({encode:a,data:e});return[at({},aP,Object.assign(Object.assign({type:"rect",data:s,encode:a,tooltip:{title:"path",items:[l=>({name:o,value:l[o]})]}},r),{coordinate:i}))]};$D.props={};var Hmt=function(t,n,e,r){function i(a){return a instanceof e?a:new e(function(o){o(a)})}return new(e||(e=Promise))(function(a,o){function s(u){try{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?a(u.value):i(u.value).then(s,l)}c((r=r.apply(t,n||[])).next())})};const Umt=t=>t.querySelectorAll(".element").filter(n=>zt(n,["style",G_])===Kl);function Vmt(t){return Rt(t).select(`.${Wo}`).node()}const Xmt={rootText:"root",style:{fill:"rgba(0, 0, 0, 0.85)",fontSize:12,y:1},active:{fill:"rgba(0, 0, 0, 0.5)"}};function qmt(t={}){const{breadCrumb:n={},isFixedColor:e=!1}=t,r=at({},Xmt,n);return i=>{const{update:a,setState:o,container:s,view:l,options:c}=i,u=s.ownerDocument,f=Vmt(s),d=c.marks.find(({id:_})=>_===Kl),{state:h}=d,p=u.createElement("g");f.appendChild(p);const g=(_,w)=>Hmt(this,void 0,void 0,function*(){if(p.removeChildren(),_){const O=u.createElement("text",{style:Object.assign({x:0,text:r.rootText,depth:0},r.style)});p.appendChild(O);let S="";const E=_==null?void 0:_.split(" / ");let M=r.style.y,A=p.getBBox().width;const T=f.getBBox().width,P=E.map((N,C)=>{const R=u.createElement("text",{style:Object.assign(Object.assign({x:A,text:" / "},r.style),{y:M})});p.appendChild(R),A+=R.getBBox().width,S=`${S}${N} / `;const D=u.createElement("text",{name:S.replace(/\s\/\s$/,""),style:Object.assign(Object.assign({text:N,x:A,depth:C+1},r.style),{y:M})});return p.appendChild(D),A+=D.getBBox().width,A>T&&(M=p.getBBox().height,A=0,R.attr({x:A,y:M}),A+=R.getBBox().width,D.attr({x:A,y:M}),A+=D.getBBox().width),D});[O,...P].forEach((N,C)=>{if(C===P.length)return;const R=Object.assign({},N.attributes);N.attr("cursor","pointer"),N.addEventListener("mouseenter",()=>{N.attr(r.active)}),N.addEventListener("mouseleave",()=>{N.attr(R)}),N.addEventListener("click",()=>{g(N.name,zt(N,["style","depth"]))})})}o("drillDown",O=>{const{marks:S}=O,E=S.map(M=>{if(M.id!==Kl&&M.type!=="rect")return M;const{data:A}=M,T=Object.fromEntries(["color"].map(N=>[N,{domain:l.scale[N].getOptions().domain}])),P=A.filter(N=>{const C=N.path;return e||(N[Pv]=C.split(" / ")[w]),_?new RegExp(`^${_}.+`).test(C):!0});return at({},M,e?{data:P,scale:T}:{data:P})});return Object.assign(Object.assign({},O),{marks:E})}),yield a()}),y=_=>{const w=_.target;if(zt(w,["style",G_])!==Kl||zt(w,["markType"])!=="rect"||!zt(w,["style",Nf]))return;const O=zt(w,["__data__","key"]),S=zt(w,["style","depth"]);w.style.cursor="pointer",g(O,S)};f.addEventListener("click",y);const m=Yv(Object.assign(Object.assign({},h.active),h.inactive)),x=()=>{Umt(f).forEach(w=>{const O=zt(w,["style",Nf]);if(zt(w,["style","cursor"])!=="pointer"&&O){w.style.cursor="pointer";const E=Df(w.attributes,m);w.addEventListener("mouseenter",()=>{w.attr(h.active)}),w.addEventListener("mouseleave",()=>{w.attr(at(E,h.inactive))})}})};return f.addEventListener("mousemove",x),()=>{p.remove(),f.removeEventListener("click",y),f.removeEventListener("mousemove",x)}}}function Kmt(){return{"interaction.drillDown":qmt,"mark.sunburst":$D}}var Cv=function(){return Cv=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++){n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Cv.apply(this,arguments)},Zmt=Vyt(_mt,Cv(Cv({},MD()),Kmt())),Hu=function(){return Hu=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++){n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Hu.apply(this,arguments)},De=function(t){var n=Jmt(t),e=n.children,r=e===void 0?[]:e,i=tt.omit(n,[].concat(jD,Nv.map(function(c){return c.key}))),a=function(c){var u;return(u=i1t.find(function(f){return f.key===c}))===null||u===void 0?void 0:u.callback},o=function(c,u,f){var d=a(u);d?d(c,u,f):c[u]=Lo({},c[u],f)},s=function(c){Object.keys(c).forEach(function(u){if(c[u]){var f=Nv.find(function(x){return x.key===u});if(f){var d=f.type,h=f.extendedProperties,p=f.defaultShapeConfig,g=p===void 0?{}:p;if(d){var y=c[u].tooltip;r.push(l(Lo({},tt.pick(c,h),g,{type:d},c[u],{tooltip:y||!1})))}else if(tt.isArray(c[u])){var m=c[u].some(function(x){return x.type==="text"});c[u].forEach(function(x){r.push(l(Hu(Hu(Hu({},m?{data:[]}:{}),{tooltip:!1}),x)))})}}}})},l=function(c){return s(c),Object.keys(Ab).forEach(function(u){var f=Ab[u];if(!tt.isUndefined(c[u]))if(tt.isObject(f)){var d=f.value,h=f.target,p=d(c[u]);o(c,h,p)}else tt.set(c,f,c[u])}),c};return r.forEach(function(c){var u=Lo({},i,c);l(Lo(c,u))}),s(n),Qmt(n),t},oP=function(t,n,e){if(e||arguments.length===2)for(var r=0,i=n.length,a;r<i;r++)(a||!(r in n))&&(a||(a=Array.prototype.slice.call(n,0,r)),a[r]=n[r]);return t.concat(a||Array.prototype.slice.call(n))},Qmt=function(t){var n=t.children,e=n===void 0?[]:n,r=Object.keys(Ab).concat(Nv.map(function(i){return i.key}));return r.forEach(function(i){delete t[i]}),e.forEach(function(i){Object.keys(i).forEach(function(a){r.includes(a)&&delete i[a]})}),Object.keys(t).forEach(function(i){oP(oP([],jD,!0),Tb.map(function(a){return a.key}),!0).includes(i)||delete t[i]}),t},Jmt=function(t){var n=t.options,e=n.children,r=e===void 0?[]:e;return r.forEach(function(i){Object.keys(i).forEach(function(a){tt.isArray(i[a])&&a!=="data"&&(i[a]=i[a].filter(function(o){return!o[vp]}))})}),n},sP=function(t,n,e){if(e||arguments.length===2)for(var r=0,i=n.length,a;r<i;r++)(a||!(r in n))&&(a||(a=Array.prototype.slice.call(n,0,r)),a[r]=n[r]);return t.concat(a||Array.prototype.slice.call(n))},t1t=function(t,n){if(tt.isArray(n))return n},Lo=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return tt.mergeWith.apply(void 0,sP(sP([],t,!1),[t1t],!1))};function Lv(t){switch(typeof t){case"function":return t;case"string":return function(n){return tt.get(n,[t])};default:return function(){return t}}}var U0=function(t){var n=t.options,e=n.data;return tt.get(e,"value")||tt.get(e,"type")!=="fetch"&&tt.isPlainObject(e)&&tt.set(n,"data.value",e),t},Zl=function(){return Zl=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++){n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Zl.apply(this,arguments)},e1t=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e},n1t=["renderer","plugins"],jD=["width","height","autoFit","theme","inset","insetLeft","insetRight","insetTop","insetBottom","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","margin","marginTop","marginRight","marginBottom","marginLeft","depth","title","clip","children","type","data","direction","plugins"],vp="__transform__",r1t="__skipDelCustomKeys__",xo=function(t,n){return tt.isBoolean(n)?{type:t,available:n}:Zl({type:t},n)},Ab={xField:"encode.x",yField:"encode.y",colorField:"encode.color",angleField:"encode.y",keyField:"encode.key",y1Field:"encode.y1",sizeField:"encode.size",setsField:"encode.sets",shapeField:"encode.shape",seriesField:"encode.series",positionField:"encode.position",textField:"encode.text",valueField:"encode.value",binField:"encode.x",srcField:"encode.src",linkColorField:"encode.linkColor",fontSizeField:"encode.fontSize",coordinateType:"coordinate.type",radius:"coordinate.outerRadius",innerRadius:"coordinate.innerRadius",startAngle:"coordinate.startAngle",endAngle:"coordinate.endAngle",focusX:"coordinate.focusX",focusY:"coordinate.focusY",distortionX:"coordinate.distortionX",distortionY:"coordinate.distortionY",visual:"coordinate.visual",stack:{target:"transform",value:function(t){return xo("stackY",t)}},normalize:{target:"transform",value:function(t){return xo("normalizeY",t)}},percent:{target:"transform",value:function(t){return xo("normalizeY",t)}},group:{target:"transform",value:function(t){return xo("dodgeX",t)}},sort:{target:"transform",value:function(t){return xo("sortX",t)}},symmetry:{target:"transform",value:function(t){return xo("symmetryY",t)}},diff:{target:"transform",value:function(t){return xo("diffY",t)}},meta:{target:"scale",value:function(t){return t}},label:{target:"labels",value:function(t){return t}},shape:"style.shape",connectNulls:{target:"style",value:function(t){return tt.isBoolean(t)?{connect:t}:t}},transpose:{target:"transpose",value:function(t){return xo("transpose",t)}}},Fm=["xField","yField","seriesField","colorField","shapeField","keyField","positionField","meta","tooltip","animate","stack","normalize","percent","group","sort","symmetry","diff"],Nv=[{key:"annotations",extendedProperties:[]},{key:"line",type:"line",extendedProperties:Fm},{key:"connector",type:"connector",extendedProperties:[]},{key:"point",type:"point",extendedProperties:Fm,defaultShapeConfig:{shapeField:"circle"}},{key:"area",type:"area",extendedProperties:Fm}],i1t=[{key:"transform",callback:function(t,n,e){var r;t[n]=t[n]||[];var i=e.available,a=i===void 0?!0:i,o=e1t(e,["available"]);if(a)t[n].push(Zl((r={},r[vp]=!0,r),o));else{var s=t[n].indexOf(function(l){return l.type===e.type});s!==-1&&t[n].splice(s,1)}}},{key:"labels",callback:function(t,n,e){var r;if(!e||tt.isArray(e)){t[n]=e||[];return}e.text||(e.text=t.yField),t[n]=t[n]||[],t[n].push(Zl((r={},r[vp]=!0,r),e))}},{key:"transpose",callback:function(t,n,e){var r;e.available?t.coordinate={transform:[Zl((r={},r[vp]=!0,r),e)]}:t.coordinate={}}}],Tb=[{key:"conversionTag",shape:"ConversionTag"},{key:"axisText",shape:"BidirectionalBarAxisText"}],a1t=(function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(n,e)};return function(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");t(n,e);function r(){this.constructor=n}n.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})(),Rv=function(){return Rv=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++){n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Rv.apply(this,arguments)},o1t=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e},FD=(function(t){a1t(n,t);function n(e){e===void 0&&(e={});var r=e.style,i=o1t(e,["style"]);return t.call(this,Rv({style:Rv({text:"",fontSize:12,textBaseline:"middle",textAlign:"center",fill:"#000",fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",lineWidth:1},r)},i))||this}return n})(ki),s1t=(function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(n,e)};return function(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");t(n,e);function r(){this.constructor=n}n.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})(),Iv=function(){return Iv=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++){n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Iv.apply(this,arguments)},l1t=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e},c1t=(function(t){s1t(n,t);function n(e){e===void 0&&(e={});var r=e.style,i=l1t(e,["style"]);return t.call(this,Iv({style:Iv({fill:"#eee"},r)},i))||this}return n})(rl),u1t=(function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(n,e)};return function(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");t(n,e);function r(){this.constructor=n}n.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})(),BD=(function(t){u1t(n,t);function n(e,r,i){var a=t.call(this,{style:Lo(i,r)})||this;return a.chart=e,a}return n.prototype.connectedCallback=function(){this.render(this.attributes,this),this.bindEvents(this.attributes,this)},n.prototype.disconnectedCallback=function(){},n.prototype.attributeChangedCallback=function(e){},n.prototype.update=function(e,r){var i;return this.attr(Lo({},this.attributes,e||{})),(i=this.render)===null||i===void 0?void 0:i.call(this,this.attributes,this,r)},n.prototype.clear=function(){this.removeChildren()},n.prototype.getElementsLayout=function(){var e=this.chart.getContext().canvas,r=e.document.getElementsByClassName("element"),i=[];return r.forEach(function(a){var o=a.getBBox(),s=o.x,l=o.y,c=o.width,u=o.height,f=a.__data__;i.push({bbox:o,x:s,y:l,width:c,height:u,key:f.key,data:f})}),i},n.prototype.bindEvents=function(e,r){},n})(qf),f1t=(function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(n,e)};return function(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");t(n,e);function r(){this.constructor=n}n.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})(),Dv=function(){return Dv=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++){n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Dv.apply(this,arguments)},d1t=(function(t){f1t(n,t);function n(e,r){return t.call(this,e,r,{type:n.tag})||this}return n.prototype.getConversionTagLayout=function(){var e=this.direction==="vertical",r=Array.from(this.getElementsLayout()).sort(function(O,S){return e?O.y-S.y:O.x-S.x}),i=r[0],a=i.x,o=i.y,s=i.height,l=i.width,c=i.data,u=["items",0,"value"],f=tt.get(c,u),d=e?r[1].y-o-s:r[1].x-a-l,h=[],p=this.attributes,g=p.size,y=g===void 0?40:g,m=p.arrowSize,x=m===void 0?20:m,_=p.spacing,w=_===void 0?4:_;return r.forEach(function(O,S){if(S>0){var E=O.x,M=O.y,A=O.height,T=O.width,P=O.data,N=O.key,C=tt.get(P,u),R=y/2;if(e){var D=E+T/2,F=M;h.push({points:[[D+R,F-d+w],[D+R,F-x-w],[D,F-w],[D-R,F-x-w],[D-R,F-d+w]],center:[D,F-d/2],width:d,value:[f,C],key:N})}else{var D=E,F=M+A/2;h.push({points:[[E-d+w,F-R],[E-x-w,F-R],[D-w,F],[E-x-w,F+R],[E-d+w,F+R]],center:[D-d/2,F],width:d,value:[f,C],key:N})}f=C}}),h},n.prototype.render=function(){this.setDirection(),this.drawConversionTag()},n.prototype.setDirection=function(){var e=this.chart.getCoordinate(),r=tt.get(e,"options.transformations"),i="horizontal";r.forEach(function(a){a.includes("transpose")&&(i="vertical")}),this.direction=i},n.prototype.drawConversionTag=function(){var e=this,r=this.getConversionTagLayout(),i=this.attributes,a=i.style,o=i.text,s=o.style,l=o.formatter;r.forEach(function(c){var u=c.points,f=c.center,d=c.value,h=c.key,p=d[0],g=d[1],y=f[0],m=f[1],x=new c1t({style:Dv({points:u,fill:"#eee"},a),id:"polygon-".concat(h)}),_=new FD({style:Dv({x:y,y:m,text:tt.isFunction(l)?l(p,g):(g/p*100).toFixed(2)+"%"},s),id:"text-".concat(h)});e.appendChild(x),e.appendChild(_)})},n.prototype.update=function(){this.clear(),this.drawConversionTag()},n.prototype.destroy=function(){this.clear()},n.tag="ConversionTag",n})(BD),Pb=32,lP=16,cP=48,h1t=(function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(n,e)};return function(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");t(n,e);function r(){this.constructor=n}n.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})(),Uu=function(){return Uu=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++){n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Uu.apply(this,arguments)},p1t=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e},v1t=(function(t){h1t(n,t);function n(e,r){return t.call(this,e,r,{type:n.tag})||this}return n.prototype.render=function(){this.drawText()},n.prototype.getBidirectionalBarAxisTextLayout=function(){var e=this.attributes.layout,r=e==="vertical",i=this.getElementsLayout(),a=r?tt.uniqBy(i,"x"):tt.uniqBy(i,"y"),o=["title"],s=[],l=this.chart.getContext().views,c=tt.get(l,[0,"layout"]),u=c.width,f=c.height;return a.forEach(function(d){var h=d.x,p=d.y,g=d.height,y=d.width,m=d.data,x=d.key,_=tt.get(m,o);r?s.push({x:h+y/2,y:f,text:_,key:x}):s.push({x:u,y:p+g/2,text:_,key:x})}),tt.uniqBy(s,"text").length!==s.length&&(s=Object.values(tt.groupBy(s,"text")).map(function(d){var h,p=d.reduce(function(g,y){return g+(r?y.x:y.y)},0);return Uu(Uu({},d[0]),(h={},h[r?"x":"y"]=p/d.length,h))})),s},n.prototype.transformLabelStyle=function(e){var r={},i=/^label[A-Z]/;return Object.keys(e).forEach(function(a){i.test(a)&&(r[a.replace("label","").replace(/^[A-Z]/,function(o){return o.toLowerCase()})]=e[a])}),r},n.prototype.drawText=function(){var e=this,r=this.getBidirectionalBarAxisTextLayout(),i=this.attributes,a=i.layout,o=i.labelFormatter,s=p1t(i,["layout","labelFormatter"]);r.forEach(function(l){var c=l.x,u=l.y,f=l.text,d=l.key,h=new FD({style:Uu({x:c,y:u,text:tt.isFunction(o)?o(f):f,wordWrap:!0,wordWrapWidth:a==="horizontal"?Pb*2:120,maxLines:2,textOverflow:"ellipsis"},e.transformLabelStyle(s)),id:"text-".concat(d)});e.appendChild(h)})},n.prototype.destroy=function(){this.clear()},n.prototype.update=function(){this.destroy(),this.drawText()},n.tag="BidirectionalBarAxisText",n})(BD),g1t={ConversionTag:d1t,BidirectionalBarAxisText:v1t},y1t=(function(){function t(n,e){this.container=new Map,this.chart=n,this.config=e,this.init()}return t.prototype.init=function(){var n=this;Tb.forEach(function(e){var r,i=e.key,a=e.shape,o=n.config[i];if(o){var s=new g1t[a](n.chart,o),l=n.chart.getContext().canvas;l.appendChild(s),n.container.set(i,s)}else(r=n.container.get(i))===null||r===void 0||r.clear()})},t.prototype.update=function(){var n=this;this.container.size&&Tb.forEach(function(e){var r=e.key,i=n.container.get(r);i==null||i.update()})},t.prototype.destroy=function(){this.container.forEach(function(n){n.destroy()}),this.container.clear()},t})(),m1t=(function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(n,e)};return function(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");t(n,e);function r(){this.constructor=n}n.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})(),Il=function(){return Il=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++){n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Il.apply(this,arguments)},uP="data-chart-source-type",Me=(function(t){m1t(n,t);function n(e,r){var i=t.call(this)||this;return i.eventListeners=[],i.bindedEvents=!1,i.container=typeof e=="string"?document.getElementById(e):e,i.options=i.mergeOption(r),i.createG2(),i.bindEvents(),i}return n.prototype.getChartOptions=function(){return Il(Il({},tt.pick(this.options,n1t)),{container:this.container})},n.prototype.getSpecOptions=function(){return this.type==="base"||this[r1t]?Il(Il({},this.options),this.getChartOptions()):this.options},n.prototype.createG2=function(){if(!this.container)throw Error("The container is not initialized!");this.chart=new Zmt(this.getChartOptions()),this.container.setAttribute(uP,"Ant Design Charts")},n.prototype.bindEvents=function(){var e=this;if(this.chart){var r=function(i){i!=null&&i.type&&e.emit(i.type,i)};this.chart.on("*",r),this.eventListeners.push(function(){var i;(i=e.chart)===null||i===void 0||i.off("*",r)})}},n.prototype.getBaseOptions=function(){return{type:"view",autoFit:!0}},n.prototype.getDefaultOptions=function(){},n.prototype.render=function(){var e=this;this.type!=="base"&&this.execAdaptor(),this.chart.options(this.getSpecOptions()),this.chart.render().then(function(){e.annotation?e.annotation.update():e.annotation=new y1t(e.chart,e.options),e.bindSizeSensor()})},n.prototype.update=function(e){this.options=this.mergeOption(e)},n.prototype.mergeOption=function(e){return Lo({},this.getBaseOptions(),this.getDefaultOptions(),e)},n.prototype.changeData=function(e){this.chart.changeData(e)},n.prototype.changeSize=function(e,r){this.chart.changeSize(e,r)},n.prototype.destroy=function(){this.eventListeners.forEach(function(e){return e()}),this.eventListeners=[],this.annotation&&typeof this.annotation.destroy=="function"&&this.annotation.destroy(),this.annotation=null,this.chart.destroy(),this.off(),this.bindedEvents=!1,this.container.removeAttribute(uP)},n.prototype.execAdaptor=function(){var e=this.getSchemaAdaptor();e({chart:this.chart,options:this.options})},n.prototype.triggerResize=function(){this.chart.forceFit()},n.prototype.bindSizeSensor=function(){var e=this;if(!this.bindedEvents){var r=this.options.autoFit,i=r===void 0?!0:r;if(i){var a=function(){e.annotation&&e.annotation.update()};this.chart.on(Ae.AFTER_CHANGE_SIZE,a),this.eventListeners.push(function(){var o;(o=e.chart)===null||o===void 0||o.off(Ae.AFTER_CHANGE_SIZE,a)}),this.bindedEvents=!0}}},n})(W2),b1t=(function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(n,e)};return function(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");t(n,e);function r(){this.constructor=n}n.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})(),x1t=(function(t){b1t(n,t);function n(){var e=t!==null&&t.apply(this,arguments)||this;return e.type="base",e}return n.getDefaultOptions=function(){return{type:"view",children:[{type:"line"}]}},n.prototype.getDefaultOptions=function(){return n.getDefaultOptions()},n.prototype.getSchemaAdaptor=function(){return function(e){return e}},n})(Me),Cb=function(){return Cb=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++){n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Cb.apply(this,arguments)};function _1t(t){var n=t.options,e=n.stack,r=n.tooltip,i=n.xField;if(!e)return t;var a=Nv.map(function(s){return s.type}).filter(function(s){return!!s}),o=!1;return a.forEach(function(s){n[s]&&(o=!0,tt.set(n,[s,"stack"],Cb({y1:"y"},typeof e=="object"?e:{})))}),o&&!tt.isBoolean(r)&&!r&&tt.set(n,"tooltip",{title:i,items:[{channel:"y"}]}),t}function An(t){return tt.flow(_1t)(t)}function w1t(t){var n=t.options.layout,e=n===void 0?"horizontal":n;return t.options.coordinate.transform=e!=="horizontal"?void 0:[{type:"transpose"}],t}function O1t(t){w1t(t);var n=t.options.layout,e=n===void 0?"horizontal":n;return t.options.children.forEach(function(r){var i;!((i=r==null?void 0:r.coordinate)===null||i===void 0)&&i.transform&&(r.coordinate.transform=e!=="horizontal"?void 0:[{type:"transpose"}])}),t}function S1t(t){return tt.flow(An,De)(t)}var E1t=(function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(n,e)};return function(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");t(n,e);function r(){this.constructor=n}n.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})(),k1t=(function(t){E1t(n,t);function n(){var e=t!==null&&t.apply(this,arguments)||this;return e.type="area",e}return n.getDefaultOptions=function(){return{type:"view",children:[{type:"area"}],scale:{y:{nice:!0}},axis:{y:{title:!1},x:{title:!1}},interaction:{tooltip:{shared:!0}}}},n.prototype.getDefaultOptions=function(){return n.getDefaultOptions()},n.prototype.getSchemaAdaptor=function(){return S1t},n})(Me),Dl=function(){return Dl=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++){n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Dl.apply(this,arguments)};function zD(t){var n=function(e){var r=e.options;tt.get(r,"children.length")>1&&tt.set(r,"children",[{type:"interval"}]);var i=r.scale,a=r.markBackground,o=r.data,s=r.children,l=r.yField,c=tt.get(i,"y.domain",[]);if(a&&c.length&&tt.isArray(o)){var u="domainMax",f=o.map(function(d){var h;return Dl(Dl({originData:Dl({},d)},tt.omit(d,l)),(h={},h[u]=c[c.length-1],h))});s.unshift(Dl({type:"interval",data:f,yField:u,tooltip:!1,style:{fill:"#eee"},label:!1},a))}return e};return tt.flow(n,An,De)(t)}var M1t=function(){var t=function(n,e){return function(r){var i=n.fill,a=i===void 0?"#2888FF":i,o=n.stroke,s=n.fillOpacity,l=s===void 0?1:s,c=n.strokeOpacity,u=c===void 0?.2:c,f=n.pitch,d=f===void 0?8:f,h=r[0],p=r[1],g=r[2],y=r[3],m=(p[1]-h[1])/2,x=e.document,_=x.createElement("g",{}),w=x.createElement("polygon",{style:{points:[h,[h[0]-d,h[1]+m],[g[0]-d,h[1]+m],y],fill:a,fillOpacity:l,stroke:o,strokeOpacity:u,inset:30}}),O=x.createElement("polygon",{style:{points:[[h[0]-d,h[1]+m],p,g,[g[0]-d,h[1]+m]],fill:a,fillOpacity:l,stroke:o,strokeOpacity:u}}),S=x.createElement("polygon",{style:{points:[h,[h[0]-d,h[1]+m],p,[h[0]+d,h[1]+m]],fill:a,fillOpacity:l-.2}});return _.appendChild(w),_.appendChild(O),_.appendChild(S),_}};TD("shape.interval.bar25D",t)},A1t=(function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(n,e)};return function(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");t(n,e);function r(){this.constructor=n}n.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})();M1t();var T1t=(function(t){A1t(n,t);function n(){var e=t!==null&&t.apply(this,arguments)||this;return e.type="Bar",e}return n.getDefaultOptions=function(){return{type:"view",coordinate:{transform:[{type:"transpose"}]},children:[{type:"interval"}],scale:{y:{nice:!0}},axis:{y:{title:!1},x:{title:!1}},interaction:{tooltip:{shared:!0},elementHighlight:{background:!0}}}},n.prototype.getDefaultOptions=function(){return n.getDefaultOptions()},n.prototype.getSchemaAdaptor=function(){return zD},n})(Me),P1t=function(){var t=function(n,e){return function(r){var i=n.fill,a=i===void 0?"#2888FF":i,o=n.stroke,s=n.fillOpacity,l=s===void 0?1:s,c=n.strokeOpacity,u=c===void 0?.2:c,f=n.pitch,d=f===void 0?8:f,h=r[1][0]-r[0][0],p=h/2+r[0][0],g=e.document,y=g.createElement("g",{}),m=g.createElement("polygon",{style:{points:[[r[0][0],r[0][1]],[p,r[1][1]+d],[p,r[3][1]+d],[r[3][0],r[3][1]]],fill:a,fillOpacity:l,stroke:o,strokeOpacity:u,inset:30}}),x=g.createElement("polygon",{style:{points:[[p,r[1][1]+d],[r[1][0],r[1][1]],[r[2][0],r[2][1]],[p,r[2][1]+d]],fill:a,fillOpacity:l,stroke:o,strokeOpacity:u}}),_=g.createElement("polygon",{style:{points:[[r[0][0],r[0][1]],[p,r[1][1]-d],[r[1][0],r[1][1]],[p,r[1][1]+d]],fill:a,fillOpacity:l-.2}});return y.appendChild(x),y.appendChild(m),y.appendChild(_),y}};TD("shape.interval.column25D",t)},C1t=(function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(n,e)};return function(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");t(n,e);function r(){this.constructor=n}n.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})();P1t();var L1t=(function(t){C1t(n,t);function n(){var e=t!==null&&t.apply(this,arguments)||this;return e.type="column",e}return n.getDefaultOptions=function(){return{type:"view",scale:{y:{nice:!0}},interaction:{tooltip:{shared:!0},elementHighlight:{background:!0}},axis:{y:{title:!1},x:{title:!1}},children:[{type:"interval"}]}},n.prototype.getDefaultOptions=function(){return n.getDefaultOptions()},n.prototype.getSchemaAdaptor=function(){return zD},n})(Me);function N1t(t){var n=function(r){var i=r.options,a=i.children,o=a===void 0?[]:a,s=i.legend;return s&&o.forEach(function(l){if(!tt.get(l,"colorField")){var c=tt.get(l,"yField");tt.set(l,"colorField",function(){return c})}}),r},e=function(r){var i=r.options,a=i.annotations,o=a===void 0?[]:a,s=i.children,l=s===void 0?[]:s,c=i.scale,u=!1;return tt.get(c,"y.key")||l.forEach(function(f,d){if(!tt.get(f,"scale.y.key")){var h="child".concat(d,"Scale");tt.set(f,"scale.y.key",h);var p=f.annotations,g=p===void 0?[]:p;g.length>0&&(tt.set(f,"scale.y.independent",!1),g.forEach(function(y){tt.set(y,"scale.y.key",h)})),!u&&o.length>0&&tt.get(f,"scale.y.independent")===void 0&&(u=!0,tt.set(f,"scale.y.independent",!1),o.forEach(function(y){tt.set(y,"scale.y.key",h)}))}}),r};return tt.flow(n,e,An,De)(t)}var R1t=(function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(n,e)};return function(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");t(n,e);function r(){this.constructor=n}n.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})(),fP=(function(t){R1t(n,t);function n(){var e=t!==null&&t.apply(this,arguments)||this;return e.type="DualAxes",e}return n.getDefaultOptions=function(){return{type:"view",axis:{y:{title:!1,tick:!1},x:{title:!1}},scale:{y:{independent:!0,nice:!0}}}},n.prototype.getDefaultOptions=function(){return n.getDefaultOptions()},n.prototype.getSchemaAdaptor=function(){return N1t},n})(Me);function I1t(t){var n=function(a){var o=a.options,s=o.xField,l=o.colorField;return l||tt.set(o,"colorField",s),a},e=function(a){var o=a.options,s=o.compareField,l=o.transform,c=o.isTransposed,u=c===void 0?!0:c,f=o.coordinate;return l||(s?tt.set(o,"transform",[]):tt.set(o,"transform",[{type:"symmetryY"}])),!f&&u&&tt.set(o,"coordinate",{transform:[{type:"transpose"}]}),a},r=function(a){var o=a.options,s=o.compareField,l=o.seriesField,c=o.data,u=o.children,f=o.yField,d=o.isTransposed,h=d===void 0?!0:d;if(s||l){var p=Object.values(tt.groupBy(c,function(g){return g[s||l]}));u[0].data=p[0],u.push({type:"interval",data:p[1],yField:function(g){return-g[f]}}),delete o.compareField,delete o.data}return l&&(tt.set(o,"type","spaceFlex"),tt.set(o,"ratio",[1,1]),tt.set(o,"direction",h?"row":"col"),delete o.seriesField),a},i=function(a){var o=a.options,s=o.tooltip,l=o.xField,c=o.yField;return s||tt.set(o,"tooltip",{title:!1,items:[function(u){return{name:u[l],value:u[c]}}]}),a};return tt.flow(n,e,r,i,An,De)(t)}var D1t=(function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(n,e)};return function(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");t(n,e);function r(){this.constructor=n}n.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})(),$1t=(function(t){D1t(n,t);function n(){var e=t!==null&&t.apply(this,arguments)||this;return e.type="column",e}return n.getDefaultOptions=function(){return{type:"view",scale:{x:{padding:0}},animate:{enter:{type:"fadeIn"}},axis:!1,shapeField:"funnel",label:{position:"inside",transform:[{type:"contrastReverse"}]},children:[{type:"interval"}]}},n.prototype.getDefaultOptions=function(){return n.getDefaultOptions()},n.prototype.getSchemaAdaptor=function(){return I1t},n})(Me);function j1t(t){return tt.flow(An,De)(t)}var F1t=(function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(n,e)};return function(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");t(n,e);function r(){this.constructor=n}n.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})(),B1t=(function(t){F1t(n,t);function n(){var e=t!==null&&t.apply(this,arguments)||this;return e.type="line",e}return n.getDefaultOptions=function(){return{type:"view",scale:{y:{nice:!0}},interaction:{tooltip:{shared:!0}},axis:{y:{title:!1},x:{title:!1}},children:[{type:"line"}]}},n.prototype.getDefaultOptions=function(){return n.getDefaultOptions()},n.prototype.getSchemaAdaptor=function(){return j1t},n})(Me),pi=function(){return pi=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++){n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},pi.apply(this,arguments)};function z1t(t){var n=function(e){var r=e.options,i=r.angleField,a=r.data,o=r.label,s=r.tooltip,l=r.colorField,c=Lv(l);if(tt.isArray(a)&&a.length>0){var u=a.reduce(function(h,p){return h+p[i]},0);if(u===0){var f=a.map(function(h){var p;return pi(pi({},h),(p={},p[i]=1,p))});if(tt.set(r,"data",f),o){var d=l===tt.get(o,"text");tt.set(r,"label",pi(pi({},o),d?{}:{formatter:function(){return 0}}))}s!==!1&&(tt.isFunction(s)?tt.set(r,"tooltip",function(h,p,g){var y;return s(pi(pi({},h),(y={},y[i]=0,y)),p,g.map(function(m){var x;return pi(pi({},m),(x={},x[i]=0,x))}))}):tt.set(r,"tooltip",pi(pi({},s),{items:[function(h,p,g){return{name:c(h,p,g),value:0}}]})))}else tt.set(r,"tooltip",s),tt.set(r,"label",o)}return e};return tt.flow(n,De)(t)}var W1t=(function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(n,e)};return function(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");t(n,e);function r(){this.constructor=n}n.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})(),G1t=(function(t){W1t(n,t);function n(){var e=t!==null&&t.apply(this,arguments)||this;return e.type="pie",e}return n.getDefaultOptions=function(){return{type:"view",children:[{type:"interval"}],coordinate:{type:"theta"},transform:[{type:"stackY",reverse:!0}],animate:{enter:{type:"waveIn"}}}},n.prototype.getDefaultOptions=function(){return n.getDefaultOptions()},n.prototype.getSchemaAdaptor=function(){return z1t},n})(Me);function Y1t(t){return tt.flow(An,De)(t)}var H1t=(function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(n,e)};return function(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");t(n,e);function r(){this.constructor=n}n.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})(),U1t=(function(t){H1t(n,t);function n(){var e=t!==null&&t.apply(this,arguments)||this;return e.type="scatter",e}return n.getDefaultOptions=function(){return{axis:{y:{title:!1},x:{title:!1}},legend:{size:!1},children:[{type:"point"}]}},n.prototype.getDefaultOptions=function(){return n.getDefaultOptions()},n.prototype.getSchemaAdaptor=function(){return Y1t},n})(Me);function V1t(t){var n=function(e){return tt.set(e,"options.coordinate",{type:tt.get(e,"options.coordinateType","polar")}),e};return tt.flow(n,De)(t)}var X1t=(function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(n,e)};return function(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");t(n,e);function r(){this.constructor=n}n.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})(),q1t=(function(t){X1t(n,t);function n(){var e=t!==null&&t.apply(this,arguments)||this;return e.type="radar",e}return n.getDefaultOptions=function(){return{axis:{x:{grid:!0,line:!0},y:{zIndex:1,title:!1,line:!0,nice:!0}},meta:{x:{padding:.5,align:0}},interaction:{tooltip:{style:{crosshairsLineDash:[4,4]}}},children:[{type:"line"}],coordinateType:"polar"}},n.prototype.getDefaultOptions=function(){return n.getDefaultOptions()},n.prototype.getSchemaAdaptor=function(){return V1t},n})(Me);function K1t(t){var n=function(e){var r=e.options,i=r.yField,a=r.children,o=r.style,s=o===void 0?{}:o,l=r.lineStyle,c=l===void 0?{}:l,u=i[0],f=i[1],d=i[2],h=i[3];return tt.set(a,[0,"yField"],[d,h]),tt.set(a,[0,"style"],c),tt.set(a,[1,"yField"],[u,f]),tt.set(a,[1,"style"],s),delete r.yField,delete r.lineStyle,delete r.style,e};return tt.flow(n,De)(t)}var Z1t=(function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(n,e)};return function(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");t(n,e);function r(){this.constructor=n}n.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})(),Q1t=["#26a69a","#999999","#ef5350"],J1t=(function(t){Z1t(n,t);function n(){var e=t!==null&&t.apply(this,arguments)||this;return e.type="stock",e}return n.getDefaultOptions=function(){return{type:"view",scale:{color:{domain:[-1,0,1],range:Q1t},y:{nice:!0}},children:[{type:"link"},{type:"interval"}],axis:{x:{title:!1,grid:!1},y:{title:!1,grid:!0,gridLineDash:null}},animate:{enter:{type:"scaleInY"}},interaction:{tooltip:{shared:!0,marker:!1,groupName:!1,crosshairs:!0}}}},n.prototype.getDefaultOptions=function(){return n.getDefaultOptions()},n.prototype.getSchemaAdaptor=function(){return K1t},n})(Me);function tbt(t){return tt.flow(An,De)(t)}var ebt=(function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(n,e)};return function(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");t(n,e);function r(){this.constructor=n}n.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})(),nbt=(function(t){ebt(n,t);function n(){var e=t!==null&&t.apply(this,arguments)||this;return e.type="TinyLine",e}return n.getDefaultOptions=function(){return{type:"view",children:[{type:"line",axis:!1}],padding:0,margin:0,tooltip:!1}},n.prototype.getDefaultOptions=function(){return n.getDefaultOptions()},n.prototype.getSchemaAdaptor=function(){return tbt},n})(Me);function rbt(t){return tt.flow(An,De)(t)}var ibt=(function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(n,e)};return function(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");t(n,e);function r(){this.constructor=n}n.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})(),abt=(function(t){ibt(n,t);function n(){var e=t!==null&&t.apply(this,arguments)||this;return e.type="TinyArea",e}return n.getDefaultOptions=function(){return{type:"view",animate:{enter:{type:"growInX",duration:500}},children:[{type:"area",axis:!1}],padding:0,margin:0,tooltip:!1}},n.prototype.getDefaultOptions=function(){return n.getDefaultOptions()},n.prototype.getSchemaAdaptor=function(){return rbt},n})(Me);function obt(t){return tt.flow(An,De)(t)}var sbt=(function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(n,e)};return function(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");t(n,e);function r(){this.constructor=n}n.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})(),lbt=(function(t){sbt(n,t);function n(){var e=t!==null&&t.apply(this,arguments)||this;return e.type="TinyColumn",e}return n.getDefaultOptions=function(){return{type:"view",children:[{type:"interval",axis:!1}],padding:0,margin:0,tooltip:!1}},n.prototype.getDefaultOptions=function(){return n.getDefaultOptions()},n.prototype.getSchemaAdaptor=function(){return obt},n})(Me),Lb=function(){return Lb=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++){n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Lb.apply(this,arguments)};function cbt(t){var n=function(e){var r=e.options,i=r.percent,a=r.color,o=a===void 0?[]:a;if(!i)return e;var s={scale:{color:{range:o.length?o:[]}},data:[1,i]};return Object.assign(r,Lb({},s)),e};return tt.flow(n,An,De)(t)}var ubt=(function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(n,e)};return function(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");t(n,e);function r(){this.constructor=n}n.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})(),fbt=(function(t){ubt(n,t);function n(){var e=t!==null&&t.apply(this,arguments)||this;return e.type="TinyProgress",e}return n.getDefaultOptions=function(){return{type:"view",data:[],margin:0,padding:0,tooltip:!1,children:[{interaction:{tooltip:!1},coordinate:{transform:[{type:"transpose"}]},type:"interval",axis:!1,legend:!1,encode:{y:function(e){return e},color:function(e,r){return r}}}]}},n.prototype.getDefaultOptions=function(){return n.getDefaultOptions()},n.prototype.getSchemaAdaptor=function(){return cbt},n})(Me),Nb=function(){return Nb=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++){n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Nb.apply(this,arguments)};function dbt(t){var n=function(r){var i=r.options,a=i.radius,o=a===void 0?.8:a;return tt.set(r,"options.coordinate.innerRadius",o),r},e=function(r){var i=r.options,a=i.percent,o=i.color,s=o===void 0?[]:o;if(!a)return r;var l={scale:{color:{range:s.length?s:[]}},data:[1,a]};return Object.assign(i,Nb({},l)),r};return tt.flow(n,e,An,De)(t)}var hbt=(function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(n,e)};return function(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");t(n,e);function r(){this.constructor=n}n.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})(),pbt=(function(t){hbt(n,t);function n(){var e=t!==null&&t.apply(this,arguments)||this;return e.type="TinyRing",e}return n.getDefaultOptions=function(){return{type:"view",data:[],margin:0,padding:0,coordinate:{type:"theta"},animate:{enter:{type:"waveIn"}},interaction:{tooltip:!1},tooltip:!1,children:[{type:"interval",axis:!1,legend:!1,encode:{y:function(e){return e},color:function(e,r){return r}}}]}},n.prototype.getDefaultOptions=function(){return n.getDefaultOptions()},n.prototype.getSchemaAdaptor=function(){return dbt},n})(Me);function vbt(t){return tt.flow(De)(t)}var gbt=(function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(n,e)};return function(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");t(n,e);function r(){this.constructor=n}n.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})(),ybt=(function(t){gbt(n,t);function n(){var e=t!==null&&t.apply(this,arguments)||this;return e.type="rose",e}return n.getDefaultOptions=function(){return{type:"view",children:[{type:"interval"}],coordinate:{type:"polar"},animate:{enter:{type:"waveIn"}}}},n.prototype.getDefaultOptions=function(){return n.getDefaultOptions()},n.prototype.getSchemaAdaptor=function(){return vbt},n})(Me),Bm="__start__",_o="__end__",Rb="__waterfall_value__",$v=function(){return $v=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++){n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},$v.apply(this,arguments)},mbt=function(t,n,e){if(e||arguments.length===2)for(var r=0,i=n.length,a;r<i;r++)(a||!(r in n))&&(a||(a=Array.prototype.slice.call(n,0,r)),a[r]=n[r]);return t.concat(a||Array.prototype.slice.call(n))};function bbt(t){var n=function(i){var a=i.options,o=a.data,s=o===void 0?[]:o,l=a.yField;return s.length&&(s.reduce(function(c,u,f){var d,h=Lv(l),p=h(u,f,s);if(f===0||u.isTotal)u[Bm]=0,u[_o]=p,u[Rb]=p;else{var g=(d=c[_o])!==null&&d!==void 0?d:h(c,f,s);u[Bm]=g,u[_o]=g+p,u[Rb]=c[_o]}return u},[]),Object.assign(a,{yField:[Bm,_o]})),i},e=function(i){var a=i.options,o=a.data,s=o===void 0?[]:o,l=a.xField,c=a.children,u=a.linkStyle,f=mbt([],s,!0);return f.reduce(function(d,h,p){return p>0&&(h.x1=d[l],h.x2=h[l],h.y1=d[_o]),h},[]),f.shift(),c.push({type:"link",xField:["x1","x2"],yField:"y1",zIndex:-1,data:f,style:$v({stroke:"#697474"},u),label:!1,tooltip:!1}),i},r=function(i){var a=i.options,o=a.data,s=o===void 0?[]:o,l=a.connector;return l&&tt.set(a,"connector",$v({xField:l.reverse?["x2","x1"]:["x1","x2"],yField:l.reverse?["y2","y1"]:["y1","y2"],data:[{x1:s[0].x,y1:s[0][_o],x2:s[s.length-1].x,y2:s[s.length-1][_o]}]},tt.isObject(l)?l:{})),i};return tt.flow(n,e,An,r,De)(t)}var xbt=(function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(n,e)};return function(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");t(n,e);function r(){this.constructor=n}n.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})(),_bt=(function(t){xbt(n,t);function n(){var e=t!==null&&t.apply(this,arguments)||this;return e.type="waterfall",e}return n.getDefaultOptions=function(){return{type:"view",legend:null,tooltip:{field:Rb,valueFormatter:"~s",name:"value"},axis:{y:{title:null,labelFormatter:"~s"},x:{title:null}},children:[{type:"interval",interaction:{elementHighlight:{background:!0}}}]}},n.prototype.getDefaultOptions=function(){return n.getDefaultOptions()},n.prototype.getSchemaAdaptor=function(){return bbt},n})(Me);function wbt(t){var n=function(e){var r=e.options,i=r.data,a=r.binNumber,o=r.binWidth,s=r.children,l=r.channel,c=l===void 0?"count":l,u=tt.get(s,"[0].transform[0]",{});return tt.isNumber(o)?(tt.assign(u,{thresholds:tt.ceil(tt.divide(i.length,o)),y:c}),e):(tt.isNumber(a)&&tt.assign(u,{thresholds:a,y:c}),e)};return tt.flow(n,An,De)(t)}var Obt=(function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(n,e)};return function(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");t(n,e);function r(){this.constructor=n}n.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})(),Sbt=(function(t){Obt(n,t);function n(){var e=t!==null&&t.apply(this,arguments)||this;return e.type="Histogram",e}return n.getDefaultOptions=function(){return{type:"view",autoFit:!0,axis:{y:{title:!1},x:{title:!1}},children:[{type:"rect",transform:[{type:"binX",y:"count"}],interaction:{elementHighlight:{background:!0}}}]}},n.prototype.getDefaultOptions=function(){return n.getDefaultOptions()},n.prototype.getSchemaAdaptor=function(){return wbt},n})(Me);function Ebt(t){var n=function(r){var i=r.options,a=i.tooltip,o=a===void 0?{}:a,s=i.colorField,l=i.sizeField;return o&&!o.field&&(o.field=s||l),r},e=function(r){var i=r.options,a=i.mark,o=i.children;return a&&(o[0].type=a),r};return tt.flow(n,e,An,De)(t)}var kbt=(function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(n,e)};return function(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");t(n,e);function r(){this.constructor=n}n.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})(),Mbt=(function(t){kbt(n,t);function n(){var e=t!==null&&t.apply(this,arguments)||this;return e.type="heatmap",e}return n.getDefaultOptions=function(){return{type:"view",legend:null,tooltip:{valueFormatter:"~s"},axis:{y:{title:null,grid:!0},x:{title:null,grid:!0}},children:[{type:"point"}]}},n.prototype.getDefaultOptions=function(){return n.getDefaultOptions()},n.prototype.getSchemaAdaptor=function(){return Ebt},n})(Me);function Abt(t){var n=function(e){var r=e.options.boxType,i=r===void 0?"box":r;return e.options.children[0].type=i,e};return tt.flow(n,An,De)(t)}var Tbt=(function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(n,e)};return function(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");t(n,e);function r(){this.constructor=n}n.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})(),Pbt=(function(t){Tbt(n,t);function n(){var e=t!==null&&t.apply(this,arguments)||this;return e.type="box",e}return n.getDefaultOptions=function(){return{type:"view",children:[{type:"box"}],axis:{y:{title:!1},x:{title:!1}},tooltip:{items:[{name:"min",channel:"y"},{name:"q1",channel:"y1"},{name:"q2",channel:"y2"},{name:"q3",channel:"y3"},{name:"max",channel:"y4"}]}}},n.prototype.getDefaultOptions=function(){return n.getDefaultOptions()},n.prototype.getSchemaAdaptor=function(){return Abt},n})(Me),Cbt=function(t){var n=t.options,e=n.data,r=[{type:"custom",callback:function(a){return{links:a}}}];if(tt.isArray(e))e.length>0?tt.set(n,"data",{value:e,transform:r}):delete n.children;else if(tt.get(e,"type")==="fetch"&&tt.get(e,"value")){var i=tt.get(e,"transform");tt.isArray(i)||tt.set(e,"transform",r)}return t};function Lbt(t){return tt.flow(U0,Cbt,An,De)(t)}var Nbt=(function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(n,e)};return function(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");t(n,e);function r(){this.constructor=n}n.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})(),Rbt=(function(t){Nbt(n,t);function n(){var e=t!==null&&t.apply(this,arguments)||this;return e.type="sankey",e}return n.getDefaultOptions=function(){return{type:"view",children:[{type:"sankey"}]}},n.prototype.getDefaultOptions=function(){return n.getDefaultOptions()},n.prototype.getSchemaAdaptor=function(){return Lbt},n})(Me),Cs=function(){return Cs=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++){n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Cs.apply(this,arguments)},gp=["#f0efff","#5B8FF9","#3D76DD"];function zm(t,n,e,r){r===void 0&&(r=!0);var i=0,a=!1,o=tt.map(t,function(s){var l,c,u=tt.get(s,[n]);if(tt.isNil(u))return[];if(tt.isString(u)){var f=Number(u);return isNaN(f)?[]:(l={},l[e]=s[e],l[n]=f,l)}return tt.isArray(u)?(a=!0,i=Math.max(i,u.length),tt.map(r?u.sort(function(d,h){return h-d}):u,function(d,h){var p;return p={},p[e]=s[e],p[n]=d,p.index=h,p})):(i=Math.max(1,i),c={},c[e]=s[e],c[n]=u,c)}).flat();return a?[o.map(function(s){return Cs({index:0},s)}),i]:[o,i]}function Wm(t,n){return new Array(t).fill("").map(function(e,r){return tt.isArray(n)?n[r%n.length]:n})}function Ibt(t){var n=function(i){var a=i.options,o=a.color,s=a.rangeField,l=s===void 0?"ranges":s,c=a.measureField,u=c===void 0?"measures":c,f=a.targetField,d=f===void 0?"targets":f,h=a.xField,p=h===void 0?"title":h,g=a.mapField,y=a.data,m=zm(y,l,p),x=m[0],_=m[1],w=zm(y,u,p,!1),O=w[0],S=w[1],E=zm(y,d,p,!1),M=E[0],A=E[1],T=tt.get(o,[l],gp[0]),P=tt.get(o,[u],gp[1]),N=tt.get(o,[d],gp[2]),C=[Wm(_,T),Wm(S,P),Wm(A,N)].flat();return a.children=tt.map(a.children,function(R,D){var F=[x,O,M][D],j=[l,u,d][D];return Cs(Cs({},R),{data:F,encode:Cs(Cs({},R.encode||{}),{x:p,y:j,color:function(I){var $=I.index,z=tt.isNumber($)?"".concat(j,"_").concat($):j;return g?tt.get(g,[j,$],z):z}})})}),tt.set(a,"scale.color.range",C),tt.get(a,"legend.color")&&tt.isNil(tt.get(a,"legend.color.itemMarker"))&&(a.legend.color.itemMarker=function(R){return g&&tt.includes(g==null?void 0:g[d],R)||(R==null?void 0:R.replace(/\_\d$/,""))===d?"line":"square"}),i},e=function(i){var a=i.options.transpose,o=a===void 0?!0:a;return o||tt.set(i,"options.children[2].shapeField","hyphen"),i},r=function(i){var a=i.options,o=a.range,s=o===void 0?{}:o,l=a.measure,c=l===void 0?{}:l,u=a.target,f=u===void 0?{}:u,d=a.children;return a.children=[s,c,f].map(function(h,p){return Lo(d[p],h)}),i};return tt.flow(n,e,r,O1t,De)(t)}var Dbt=(function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(n,e)};return function(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");t(n,e);function r(){this.constructor=n}n.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})(),$bt=(function(t){Dbt(n,t);function n(){var e=t!==null&&t.apply(this,arguments)||this;return e.type="bullet",e}return n.getDefaultOptions=function(){return{type:"view",scale:{color:{range:gp}},legend:{color:{itemMarker:function(e){return e==="targets"?"line":"square"}}},axis:{y:{title:!1},x:{title:!1}},children:[{type:"interval",style:{maxWidth:30,zIndex:-2},axis:{y:{grid:!0,gridLineWidth:2}}},{type:"interval",style:{maxWidth:20,zIndex:-1},transform:[{type:"stackY"}]},{type:"point",encode:{size:8,shape:"line"}}],interaction:{tooltip:{shared:!0}},coordinate:{transform:[{type:"transpose"}]}}},n.prototype.getDefaultOptions=function(){return n.getDefaultOptions()},n.prototype.getSchemaAdaptor=function(){return Ibt},n})(Me);function jbt(t){var n=function(e){var r=e.options.data;return e.options.data={value:r},e};return tt.flow(n,An,De)(t)}var Fbt=(function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(n,e)};return function(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");t(n,e);function r(){this.constructor=n}n.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})(),Bbt=(function(t){Fbt(n,t);function n(){var e=t!==null&&t.apply(this,arguments)||this;return e.type="Gauge",e}return n.getDefaultOptions=function(){return{type:"view",legend:!1,children:[{type:"gauge"}]}},n.prototype.getDefaultOptions=function(){return n.getDefaultOptions()},n.prototype.getSchemaAdaptor=function(){return jbt},n})(Me);function zbt(t){var n=function(e){var r=e.options.percent;return tt.isNumber(r)&&(tt.set(e,"options.data",r),delete e.options.percent),e};return tt.flow(n,An,De)(t)}var Wbt=(function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(n,e)};return function(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");t(n,e);function r(){this.constructor=n}n.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})(),Gbt=(function(t){Wbt(n,t);function n(){var e=t!==null&&t.apply(this,arguments)||this;return e.type="Liquid",e}return n.getDefaultOptions=function(){return{type:"view",children:[{type:"liquid"}]}},n.prototype.getDefaultOptions=function(){return n.getDefaultOptions()},n.prototype.getSchemaAdaptor=function(){return zbt},n})(Me);function Ybt(t){return tt.flow(An,De)(t)}var Hbt=(function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(n,e)};return function(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");t(n,e);function r(){this.constructor=n}n.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})(),Ubt=(function(t){Hbt(n,t);function n(){var e=t!==null&&t.apply(this,arguments)||this;return e.type="WordCloud",e}return n.getDefaultOptions=function(){return{type:"view",legend:!1,children:[{type:"wordCloud"}]}},n.prototype.getDefaultOptions=function(){return n.getDefaultOptions()},n.prototype.getSchemaAdaptor=function(){return Ybt},n})(Me);function Vbt(t){return tt.flow(U0,An,De)(t)}var Xbt=(function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(n,e)};return function(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");t(n,e);function r(){this.constructor=n}n.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})(),qbt=(function(t){Xbt(n,t);function n(){var e=t!==null&&t.apply(this,arguments)||this;return e.type="treemap",e}return n.getDefaultOptions=function(){return{type:"view",children:[{type:"treemap"}]}},n.prototype.getDefaultOptions=function(){return n.getDefaultOptions()},n.prototype.getSchemaAdaptor=function(){return Vbt},n})(Me),So=function(){return So=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++){n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},So.apply(this,arguments)},Kbt=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e};function Zbt(t){var n=function(i){var a=i.options,o=a.startAngle,s=a.maxAngle,l=a.coordinate,c=tt.isNumber(o)?o/(2*Math.PI)*360:-90,u=tt.isNumber(s)?(Number(s)+c)/180*Math.PI:Math.PI;return tt.set(i,["options","coordinate"],So(So({},l),{endAngle:u,startAngle:o??-Math.PI/2})),i},e=function(i){var a=i.options,o=a.tooltip,s=a.xField,l=a.yField,c=Lv(s),u=Lv(l);return o||tt.set(a,"tooltip",{title:!1,items:[function(f,d,h){return{name:c(f,d,h),value:u(f,d,h)}}]}),i},r=function(i){var a=i.options,o=a.markBackground,s=a.children,l=a.scale,c=a.coordinate,u=a.xField,f=tt.get(l,"y.domain",[]);if(o){var d=o.style,h=Kbt(o,["style"]);s.unshift(So({type:"interval",xField:u,yField:f[f.length-1],style:So({fillOpacity:.4,fill:"#e0e4ee"},d),coordinate:So(So({},c),{startAngle:-Math.PI/2,endAngle:1.5*Math.PI}),animate:!1},h))}return i};return tt.flow(n,e,r,An,De)(t)}var Qbt=(function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(n,e)};return function(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");t(n,e);function r(){this.constructor=n}n.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})(),Jbt=(function(t){Qbt(n,t);function n(){var e=t!==null&&t.apply(this,arguments)||this;return e.type="radial",e}return n.getDefaultOptions=function(){return{type:"view",children:[{type:"interval"}],coordinate:{type:"radial",innerRadius:.1,outerRadius:1,endAngle:Math.PI},animate:{enter:{type:"waveIn",duration:800}},axis:{y:{nice:!0,labelAutoHide:!0,labelAutoRotate:!1},x:{title:!1,nice:!0,labelAutoRotate:!1,labelAutoHide:{type:"equidistance",cfg:{minGap:6}}}}}},n.prototype.getDefaultOptions=function(){return n.getDefaultOptions()},n.prototype.getSchemaAdaptor=function(){return Zbt},n})(Me);function txt(t){return tt.flow(U0,De)(t)}var ext=(function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(n,e)};return function(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");t(n,e);function r(){this.constructor=n}n.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})(),nxt=(function(t){ext(n,t);function n(){var e=t!==null&&t.apply(this,arguments)||this;return e.type="CirclePacking",e}return n.getDefaultOptions=function(){return{legend:!1,type:"view",children:[{type:"pack",encode:{color:"depth"}}]}},n.prototype.getDefaultOptions=function(){return n.getDefaultOptions()},n.prototype.getSchemaAdaptor=function(){return txt},n})(Me),jv=function(){return jv=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++){n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},jv.apply(this,arguments)};function Gm(t,n){return t||n}function rxt(t){var n=function(e){var r=e.options,i=r.xField,a=r.yField,o=r.colorField,s=r.seriesField,l=r.children,c=l==null?void 0:l.map(function(u){return jv(jv({},u),{xField:i,yField:a,seriesField:Gm(s,o),colorField:Gm(o,s),data:u.type==="density"?{transform:[{type:"kde",field:a,groupBy:[i,Gm(s,o)]}]}:u.data})}).filter(function(u){return r.box||u.type==="density"});return tt.set(r,"children",c),delete r.box,e};return tt.flow(n,An,De)(t)}var ixt=(function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(n,e)};return function(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");t(n,e);function r(){this.constructor=n}n.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})(),axt=(function(t){ixt(n,t);function n(){var e=t!==null&&t.apply(this,arguments)||this;return e.type="violin",e}return n.getDefaultOptions=function(){return{type:"view",children:[{type:"density",sizeField:"size",tooltip:!1},{type:"boxplot",shapeField:"violin",style:{opacity:.5,point:!1}}],animate:{enter:{type:"fadeIn"}}}},n.prototype.getDefaultOptions=function(){return n.getDefaultOptions()},n.prototype.getSchemaAdaptor=function(){return rxt},n})(Me),Vu=function(){return Vu=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++){n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Vu.apply(this,arguments)},oxt=function(t,n,e){if(e||arguments.length===2)for(var r=0,i=n.length,a;r<i;r++)(a||!(r in n))&&(a||(a=Array.prototype.slice.call(n,0,r)),a[r]=n[r]);return t.concat(a||Array.prototype.slice.call(n))};function sxt(t){var n=function(a){var o=a.options,s=o.yField,l=o.children;return l.forEach(function(c,u){tt.set(c,"yField",s[u])}),a},e=function(a){var o=a.options,s=o.yField,l=o.children,c=o.data;if(tt.isPlainObject(c))return a;var u=tt.isArray(tt.get(c,[0]))?c:[c,c];return l.forEach(function(f,d){tt.set(f,"data",oxt([],u[d].map(function(h){return Vu({groupKey:s[d]},h)}),!0))}),a},r=function(a){var o=a.options,s=o.yField,l=s[0],c=s[1],u=o.tooltip;return u||tt.set(o,"tooltip",{items:[{field:l,value:l},{field:c,value:c}]}),a},i=function(a){var o=a.options,s=o.children,l=o.layout,c=o.coordinate.transform,u=o.paddingBottom,f=u===void 0?cP:u,d=o.paddingLeft,h=d===void 0?cP:d,p=o.axis;tt.set(o,"axisText",Vu(Vu({},(p==null?void 0:p.x)||{}),{layout:l}));var g=s[0],y=s[1];if(l==="vertical")tt.set(o,"direction","col"),tt.set(o,"paddingLeft",h),tt.set(o,"coordinate.transform",c.filter(function(O){return O.type!=="transpose"})),tt.set(g,"paddingBottom",lP),tt.set(y,"paddingTop",lP),tt.set(y,"axis.x.position","top"),tt.set(y,"scale.y.range",[0,1]);else{tt.set(o,"paddingBottom",f),tt.set(g,"scale.y.range",[0,1]);var m=g.paddingRight,x=m===void 0?Pb:m,_=y.paddingLeft,w=_===void 0?Pb:_;tt.set(g,"paddingRight",x),tt.set(g,"axis.x.position","right"),tt.set(y,"paddingLeft",w)}return a};return tt.flow(n,e,r,i,An,De)(t)}var lxt=(function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(n,e)};return function(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");t(n,e);function r(){this.constructor=n}n.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})(),cxt=(function(t){lxt(n,t);function n(){var e=t!==null&&t.apply(this,arguments)||this;return e.type="BidirectionalBar",e}return n.getDefaultOptions=function(){return{type:"spaceFlex",coordinate:{transform:[{type:"transpose"}]},scale:{y:{nice:!0}},direction:"row",layout:"horizontal",legend:!1,axis:{y:{title:!1},x:{title:!1,label:!1}},children:[{type:"interval"},{type:"interval"}]}},n.prototype.getDefaultOptions=function(){return n.getDefaultOptions()},n.prototype.getSchemaAdaptor=function(){return sxt},n})(Me),No;(function(t){t.color="key",t.d="path"})(No||(No={}));function uxt(t){var n=function(e){var r=e.options,i=r.data,a=r.setsField,o=r.sizeField;return tt.isArray(i)&&(tt.set(r,"data",{type:"inline",value:i,transform:[{type:"venn",sets:a,size:o,as:[No.color,No.d]}]}),tt.set(r,"colorField",No.color),tt.set(r,["children","0","encode","d"],No.d)),e};return tt.flow(n,De)(t)}var fxt=(function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(n,e)};return function(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");t(n,e);function r(){this.constructor=n}n.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})(),dxt=(function(t){fxt(n,t);function n(){var e=t!==null&&t.apply(this,arguments)||this;return e.type="venn",e}return n.getDefaultOptions=function(){return{type:"view",children:[{type:"path"}],legend:{color:{itemMarker:"circle"}},encode:{color:No.color,d:No.d}}},n.prototype.getDefaultOptions=function(){return n.getDefaultOptions()},n.prototype.getSchemaAdaptor=function(){return uxt},n})(Me);function hxt(t){return tt.flow(U0,De)(t)}var pxt=(function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(n,e)};return function(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");t(n,e);function r(){this.constructor=n}n.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})(),vxt=(function(t){pxt(n,t);function n(){var e=t!==null&&t.apply(this,arguments)||this;return e.type="Sunburst",e}return n.getDefaultOptions=function(){return{type:"view",children:[{type:"sunburst"}]}},n.prototype.getDefaultOptions=function(){return n.getDefaultOptions()},n.prototype.getSchemaAdaptor=function(){return hxt},n})(Me),gxt={Base:x1t,Line:B1t,Column:L1t,Pie:G1t,Area:k1t,Bar:T1t,DualAxes:fP,Funnel:$1t,Scatter:U1t,Radar:q1t,Rose:ybt,Stock:J1t,TinyLine:nbt,TinyArea:abt,TinyColumn:lbt,TinyProgress:fbt,TinyRing:pbt,Waterfall:_bt,Histogram:Sbt,Heatmap:Mbt,Box:Pbt,Sankey:Rbt,Bullet:$bt,Gauge:Bbt,Liquid:Gbt,WordCloud:Ubt,Treemap:qbt,RadialBar:Jbt,CirclePacking:nxt,Violin:axt,BidirectionalBar:cxt,Venn:dxt,Mix:fP,Sunburst:vxt},Xu=function(){return Xu=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++){n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Xu.apply(this,arguments)},dP=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]]);return e},yxt=hP(function(t,n){var e=t.chartType,r=e===void 0?"Base":e,i=dP(t,["chartType"]),a=i.containerStyle,o=a===void 0?{height:"inherit",flex:1}:a,s=i.containerAttributes,l=s===void 0?{}:s,c=i.className,u=i.loading,f=i.loadingTemplate,d=i.errorTemplate,h=i.onReady,p=dP(i,["containerStyle","containerAttributes","className","loading","loadingTemplate","errorTemplate","onReady"]),g=Dmt(gxt[r],Xu(Xu({},p),{onReady:function(m){n&&(typeof n=="function"?n(m):n.current=m),h==null||h(m)}})),y=g.container;return Zn.createElement(Lmt,{errorTemplate:d},u&&Zn.createElement(Pmt,{loadingTemplate:f,theme:i.theme,loading:u}),Zn.createElement("div",Xu({className:c,style:o,ref:y},l)))}),mxt=OW({});function bxt(){return SW(mxt)}var Ib=function(){return Ib=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++){n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Ib.apply(this,arguments)};function xxt(t){var n=t.yField,e=t.data,r=tt.isArray(e)&&e.length>0&&tt.isString(n)&&!tt.get(t,"scale.y.domainMax"),i=Object.isFrozen(t)?Ib({},t):t;return r&&e.reduce(function(a,o){return a+o[n]},0)===0?tt.set(i,"scale.y.domainMax",1):r&&e.reduce(function(a,o){return a+o[n]},0)!==0&&tt.set(i,"scale.y.domainMax",void 0),i}var qu=function(){return qu=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++){n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},qu.apply(this,arguments)};function _xt(t){return t.charAt(0).toLowerCase()+t.slice(1),hP(function(n,e){var r,i,a=bxt(),o=mp(function(){return t.charAt(0).toLowerCase()+t.slice(1)},[t]),s=tt.flow([xxt])(n),l=qu(qu({},(r=a==null?void 0:a.common)!==null&&r!==void 0?r:{}),(i=a==null?void 0:a[o])!==null&&i!==void 0?i:{});return Zn.createElement(yxt,qu({},l,s,{chartType:t,ref:e}))})}var wxt=_xt("Line");const Oxt=({statistics:t,viewMode:n})=>{const e=Lu(null),[r,i]=Fi({width:500,height:0}),a=mp(()=>{const l=(t==null?void 0:t.operateGroupDetail)??[],c=new Set;for(const u of l)(u==null?void 0:u.date)!=null&&c.add(String(u.date));return c.size},[t==null?void 0:t.operateGroupDetail]),o=a>8,s=mp(()=>!o||!a?1:Math.min(1,8/a),[o,a]);return yp(()=>{const l=()=>{if(e.current){const u=window.innerHeight,f=e.current.getBoundingClientRect().top;i({height:u-f-180-80,width:e.current.getBoundingClientRect().width-56})}};l(),window.addEventListener("resize",l);const c=setTimeout(l,100);return()=>{window.removeEventListener("resize",l),clearTimeout(c)}},[n]),Hn("div",{className:"space-y-6",ref:e,children:[Hn(MW,{gutter:16,children:[It(oy,{span:8,children:It(qd,{children:It(sy,{title:"\u603B\u64CD\u4F5C\u6B21\u6570",value:t==null?void 0:t.totalCount,suffix:"\u6B21"})})}),It(oy,{span:8,children:It(qd,{children:It(sy,{title:"\u6210\u529F\u7387",value:t!=null&&t.totalCount?((t==null?void 0:t.totalCount)-(t==null?void 0:t.totalFailCount))/(t==null?void 0:t.totalCount)*100:0,precision:2,suffix:"%",valueStyle:{color:"#3f8600"}})})}),It(oy,{span:8,children:It(qd,{children:It(sy,{title:"\u5931\u8D25\u7387",value:t!=null&&t.totalCount?(t==null?void 0:t.totalFailCount)/(t==null?void 0:t.totalCount)*100:0,precision:2,suffix:"%",valueStyle:{color:"#cf1322"}})})})]}),It(qd,{title:Hn("div",{className:"flex items-center gap-2",children:[It("div",{...wP("GROUP"),className:"w-8 h-8",children:It(vP,{...Qh(),className:"text-white"})}),It("span",{children:"\u64CD\u4F5C\u8D8B\u52BF"}),Hn("span",{className:"text-gray-500 text-xs",children:["\u539F\u59CB\u8BB0\u5F55\u6570\u636E(",t==null?void 0:t.totalCount,"\u6761)"]})]}),styles:{body:{minHeight:`${r==null?void 0:r.height}px`}},children:It(wxt,{data:(t==null?void 0:t.operateGroupDetail)||[],xField:"date",yField:"count",seriesField:"name",height:(r==null?void 0:r.height)-60,width:(r==null?void 0:r.width)||700,point:{size:4,shape:"circle",style:{fillOpacity:1}},xAxis:{type:"cat",tickCount:o?8:Math.max(2,a||0),label:{autoRotate:!0,autoHide:!1,autoEllipsis:!0,style:{fontSize:12}}},yAxis:{label:{formatter:l=>`${l}\u6B21`,style:{fontSize:12}}},legend:{position:"top",itemName:{style:{fontSize:12}}},smooth:!0,animation:{appear:{animation:"wave-in",duration:1e3}},slider:o?{start:0,end:s}:void 0,scrollbar:o?{x:{}}:void 0})})]})};$l.locale("zh-cn");const{RangePicker:Sxt}=AW,Ext=Fv.div.attrs({className:"oprecords-wrapper"})`
260
+ width: 100%;
261
+ height: 100%;
262
+ min-height: 0;
263
+ background-color: #fff;
264
+ padding: 12px;
265
+ `,kxt=Fv.div.attrs({className:"oprecords-toolbar"})`
266
+ display: flex;
267
+ align-items: center;
268
+ justify-content: space-between;
269
+ gap: 12px;
270
+ flex-wrap: wrap;
271
+ margin-bottom: 32px;
272
+ `,Mxt=Fv.div.attrs({className:"oprecords-toolbar-left"})`
273
+ display: flex;
274
+ align-items: center;
275
+ gap: 12px;
276
+ flex-wrap: wrap;
277
+ `,Axt=Fv.div.attrs({className:"oprecords-toolbar-right"})`
278
+ display: flex;
279
+ align-items: center;
280
+ gap: 12px;
281
+ flex-wrap: wrap;
282
+ `;function Txt(t){const{url:n="http://127.0.0.1:2230",token:e,role:r,eventsEmit:i}=t,{getMessage:a}=rG(),o=300,[s,l]=Fi(!1),[c,u]=Fi(!1),[f,d]=Fi(null),[h,p]=Fi("timeline"),[g,y]=Fi({username:"",dateRange:[$l().subtract(3,"month"),$l()]}),[m,x]=Fi(""),{getTimelineOperateRecords:_,getStatisticsOperateRecords:w}=mp(()=>aG({url:n,token:e,role:r,eventsEmit:i,getMessage:a}),[]),O=Lu({timeline:null,statistics:null});yp(()=>{var Z,q,J,rt;const I=g.username||void 0,$=(q=(Z=g.dateRange)==null?void 0:Z[0])==null?void 0:q.format("YYYY-MM-DD"),z=(rt=(J=g.dateRange)==null?void 0:J[1])==null?void 0:rt.format("YYYY-MM-DD"),Y=O.current[h],H=JSON.stringify({fuzzy:I,start:$,end:z});(Y==null?void 0:Y.key)!==H&&(h=="timeline"?(P(1),R(1,!1)):F())},[g,h]);const[S,E]=Fi(!0),[M,A]=Fi([]),[T,P]=Fi(1),[N,C]=Fi([]),R=async(I=1,$=!1)=>{var z,Y,H,V;try{d(null),$?u(!0):l(!0);const Z={pageNo:I,pageSize:o,fuzzy:g.username||void 0,start:(Y=(z=g.dateRange)==null?void 0:z[0])==null?void 0:Y.format("YYYY-MM-DD"),end:(V=(H=g.dateRange)==null?void 0:H[1])==null?void 0:V.format("YYYY-MM-DD")},q=await _(Z);if(O.current.timeline={key:JSON.stringify({fuzzy:Z.fuzzy,start:Z.start,end:Z.end})},console.log("\u64CD\u4F5C\u8BB0\u5F55\u6570\u636E:",q),q!=null&&q.records){const J=q.records.map(K=>({id:K.id,endTime:K.endTime,gmtCreated:K.gmtCreated,gmtModified:K.gmtModified,ip:K.ip,name:K.name||"",params:K.params,startTime:K.startTime,success:K.success||0,url:K.url||"",userId:K.userId,userName:K.userName}));A(K=>$?[...K,...J]:J);const rt=q.total||0;E(I*o<rt),P(I)}}catch(Z){console.error("\u83B7\u53D6\u64CD\u4F5C\u8BB0\u5F55\u5931\u8D25:",Z),d(Z instanceof Error?Z.message:String(Z??a("common.unknownError")))}finally{$?u(!1):l(!1)}},D=()=>{!s&&S&&R(T+1,!0)},F=async()=>{var I,$,z,Y;try{d(null),l(!0);const H={fuzzy:g.username||void 0,start:($=(I=g.dateRange)==null?void 0:I[0])==null?void 0:$.format("YYYY-MM-DD"),end:(Y=(z=g.dateRange)==null?void 0:z[1])==null?void 0:Y.format("YYYY-MM-DD")},V=await w({...H});O.current.statistics={key:JSON.stringify({fuzzy:H.fuzzy,start:H.start,end:H.end})},console.log("\u64CD\u4F5C\u8BB0\u5F55\u6570\u636E:",V),C(V)}catch(H){console.error("\u83B7\u53D6\u64CD\u4F5C\u8BB0\u5F55\u5931\u8D25:",H),d(H instanceof Error?H.message:String(H??a("common.unknownError")))}finally{l(!1)}},j=(I,{from:$})=>{if(!I)return!1;const z=$l().endOf("day");if(I.isAfter(z,"day"))return!0;if(!$)return!1;const Y=$.subtract(3,"month").startOf("day"),H=$.add(3,"month").startOf("day");return I.isBefore(Y,"day")||I.isAfter(H,"day")};return It(RW,{title:a("dashboard.title"),description:a("dashboard.description"),children:Hn(Ext,{children:[Hn(kxt,{children:[Hn(Mxt,{children:[It(TW,{value:m,onChange:I=>{x(I.target.value)},onPressEnter:()=>{y(I=>({...I,username:m}))},placeholder:a("toolbar.keywordPlaceholder"),style:{width:240},suffix:It(DW,{size:14,onClick:()=>{y(I=>({...I,username:m}))}})}),It(PW,{locale:KW,children:It(Sxt,{value:g==null?void 0:g.dateRange,allowClear:!1,onChange:I=>{I&&I[0]&&I[1]&&y($=>({...$,dateRange:[I[0],I[1]]}))},disabledDate:j})})]}),It(Axt,{children:Hn(ly.Group,{value:h,onChange:I=>{p(I.target.value)},children:[Hn(ly.Button,{value:"timeline",children:[It(jW,{size:14,className:"inline"})," \u65F6\u95F4\u8F74"]}),Hn(ly.Button,{value:"statistics",children:[It($W,{size:14,className:"inline"})," \u7EDF\u8BA1\u56FE"]})]})})]}),f?It("div",{style:{padding:16,color:"#cf1322"},children:f}):Hn(xW,{children:[h==="statistics"&&s&&It("div",{style:{padding:24,display:"flex",justifyContent:"center"},children:It(pP,{})}),h==="statistics"?It(Oxt,{statistics:N,viewMode:h}):It(wG,{records:M,loadMore:D,hasMore:S,loadingMore:c})]})]})})}function Zxt({locale:t="zh",messages:n,...e}){return It(iG,{locale:t,messages:n,children:It(Txt,{...e})})}export{Zxt as default};