@kb-labs/agent-cli 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +56 -0
- package/dist/cli/commands/diff.d.ts +17 -0
- package/dist/cli/commands/diff.js +182 -0
- package/dist/cli/commands/diff.js.map +1 -0
- package/dist/cli/commands/history.d.ts +16 -0
- package/dist/cli/commands/history.js +216 -0
- package/dist/cli/commands/history.js.map +1 -0
- package/dist/cli/commands/quality-report.d.ts +21 -0
- package/dist/cli/commands/quality-report.js +457 -0
- package/dist/cli/commands/quality-report.js.map +1 -0
- package/dist/cli/commands/rollback.d.ts +27 -0
- package/dist/cli/commands/rollback.js +109 -0
- package/dist/cli/commands/rollback.js.map +1 -0
- package/dist/cli/commands/run.d.ts +42 -0
- package/dist/cli/commands/run.js +923 -0
- package/dist/cli/commands/run.js.map +1 -0
- package/dist/cli/commands/trace-context.d.ts +22 -0
- package/dist/cli/commands/trace-context.js +131 -0
- package/dist/cli/commands/trace-context.js.map +1 -0
- package/dist/cli/commands/trace-diagnose.d.ts +20 -0
- package/dist/cli/commands/trace-diagnose.js +434 -0
- package/dist/cli/commands/trace-diagnose.js.map +1 -0
- package/dist/cli/commands/trace-event-normalizer.d.ts +13 -0
- package/dist/cli/commands/trace-event-normalizer.js +39 -0
- package/dist/cli/commands/trace-event-normalizer.js.map +1 -0
- package/dist/cli/commands/trace-filter.d.ts +19 -0
- package/dist/cli/commands/trace-filter.js +153 -0
- package/dist/cli/commands/trace-filter.js.map +1 -0
- package/dist/cli/commands/trace-iteration.d.ts +18 -0
- package/dist/cli/commands/trace-iteration.js +192 -0
- package/dist/cli/commands/trace-iteration.js.map +1 -0
- package/dist/cli/commands/trace-stats.d.ts +17 -0
- package/dist/cli/commands/trace-stats.js +247 -0
- package/dist/cli/commands/trace-stats.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +473 -0
- package/dist/index.js.map +1 -0
- package/dist/manifest.d.ts +184 -0
- package/dist/manifest.js +473 -0
- package/dist/manifest.js.map +1 -0
- package/dist/rest/handlers/approve-handler.d.ts +15 -0
- package/dist/rest/handlers/approve-handler.js +60 -0
- package/dist/rest/handlers/approve-handler.js.map +1 -0
- package/dist/rest/handlers/approve-session-plan-handler.d.ts +10 -0
- package/dist/rest/handlers/approve-session-plan-handler.js +52 -0
- package/dist/rest/handlers/approve-session-plan-handler.js.map +1 -0
- package/dist/rest/handlers/correct-handler.d.ts +7 -0
- package/dist/rest/handlers/correct-handler.js +326 -0
- package/dist/rest/handlers/correct-handler.js.map +1 -0
- package/dist/rest/handlers/create-session-handler.d.ts +7 -0
- package/dist/rest/handlers/create-session-handler.js +25 -0
- package/dist/rest/handlers/create-session-handler.js.map +1 -0
- package/dist/rest/handlers/execute-session-plan-handler.d.ts +10 -0
- package/dist/rest/handlers/execute-session-plan-handler.js +635 -0
- package/dist/rest/handlers/execute-session-plan-handler.js.map +1 -0
- package/dist/rest/handlers/generate-spec-handler.d.ts +10 -0
- package/dist/rest/handlers/generate-spec-handler.js +389 -0
- package/dist/rest/handlers/generate-spec-handler.js.map +1 -0
- package/dist/rest/handlers/get-file-diff-handler.d.ts +24 -0
- package/dist/rest/handlers/get-file-diff-handler.js +44 -0
- package/dist/rest/handlers/get-file-diff-handler.js.map +1 -0
- package/dist/rest/handlers/get-session-handler.d.ts +10 -0
- package/dist/rest/handlers/get-session-handler.js +23 -0
- package/dist/rest/handlers/get-session-handler.js.map +1 -0
- package/dist/rest/handlers/get-session-plan-handler.d.ts +10 -0
- package/dist/rest/handlers/get-session-plan-handler.js +53 -0
- package/dist/rest/handlers/get-session-plan-handler.js.map +1 -0
- package/dist/rest/handlers/get-session-turns-handler.d.ts +16 -0
- package/dist/rest/handlers/get-session-turns-handler.js +35 -0
- package/dist/rest/handlers/get-session-turns-handler.js.map +1 -0
- package/dist/rest/handlers/get-spec-handler.d.ts +10 -0
- package/dist/rest/handlers/get-spec-handler.js +39 -0
- package/dist/rest/handlers/get-spec-handler.js.map +1 -0
- package/dist/rest/handlers/list-file-changes-handler.d.ts +13 -0
- package/dist/rest/handlers/list-file-changes-handler.js +34 -0
- package/dist/rest/handlers/list-file-changes-handler.js.map +1 -0
- package/dist/rest/handlers/list-sessions-handler.d.ts +7 -0
- package/dist/rest/handlers/list-sessions-handler.js +23 -0
- package/dist/rest/handlers/list-sessions-handler.js.map +1 -0
- package/dist/rest/handlers/rollback-handler.d.ts +22 -0
- package/dist/rest/handlers/rollback-handler.js +91 -0
- package/dist/rest/handlers/rollback-handler.js.map +1 -0
- package/dist/rest/handlers/run-handler.d.ts +7 -0
- package/dist/rest/handlers/run-handler.js +516 -0
- package/dist/rest/handlers/run-handler.js.map +1 -0
- package/dist/rest/handlers/sessions-handler.d.ts +18 -0
- package/dist/rest/handlers/sessions-handler.js +56 -0
- package/dist/rest/handlers/sessions-handler.js.map +1 -0
- package/dist/rest/handlers/status-handler.d.ts +7 -0
- package/dist/rest/handlers/status-handler.js +313 -0
- package/dist/rest/handlers/status-handler.js.map +1 -0
- package/dist/rest/handlers/stop-handler.d.ts +7 -0
- package/dist/rest/handlers/stop-handler.js +317 -0
- package/dist/rest/handlers/stop-handler.js.map +1 -0
- package/dist/widgets/220.js +446 -0
- package/dist/widgets/220.js.map +1 -0
- package/dist/widgets/331.js +2 -0
- package/dist/widgets/331.js.map +1 -0
- package/dist/widgets/403.js +2 -0
- package/dist/widgets/403.js.map +1 -0
- package/dist/widgets/406.js +35 -0
- package/dist/widgets/406.js.map +1 -0
- package/dist/widgets/455.js +2 -0
- package/dist/widgets/455.js.map +1 -0
- package/dist/widgets/482.js +2 -0
- package/dist/widgets/482.js.map +1 -0
- package/dist/widgets/485.js +2 -0
- package/dist/widgets/485.js.map +1 -0
- package/dist/widgets/527.js +2 -0
- package/dist/widgets/527.js.map +1 -0
- package/dist/widgets/628.js +2 -0
- package/dist/widgets/628.js.map +1 -0
- package/dist/widgets/694.js +2 -0
- package/dist/widgets/694.js.map +1 -0
- package/dist/widgets/712.js +2 -0
- package/dist/widgets/712.js.map +1 -0
- package/dist/widgets/866.js +2 -0
- package/dist/widgets/866.js.map +1 -0
- package/dist/widgets/915.js +39 -0
- package/dist/widgets/915.js.map +1 -0
- package/dist/widgets/957.js +10 -0
- package/dist/widgets/957.js.map +1 -0
- package/dist/widgets/983.js +2 -0
- package/dist/widgets/983.js.map +1 -0
- package/dist/widgets/@mf-types.d.ts +3 -0
- package/dist/widgets/@mf-types.zip +0 -0
- package/dist/widgets/__federation_expose_AgentsPage.js +2 -0
- package/dist/widgets/__federation_expose_AgentsPage.js.map +1 -0
- package/dist/widgets/mf-manifest.json +260 -0
- package/dist/widgets/mf-stats.json +305 -0
- package/dist/widgets/remoteEntry.js +7 -0
- package/dist/widgets/remoteEntry.js.map +1 -0
- package/dist/ws/session-stream-handler.d.ts +8 -0
- package/dist/ws/session-stream-handler.js +409 -0
- package/dist/ws/session-stream-handler.js.map +1 -0
- package/package.json +83 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
(self.webpackChunk_kb_labs_agent_cli=self.webpackChunk_kb_labs_agent_cli||[]).push([["915"],{905(t,e,n){"use strict";n.d(e,{A:()=>r});let r=(0,n(7867).E)("Area")},2909(t,e,n){"use strict";n.d(e,{A:()=>r});let r=(0,n(7867).E)("Bar")},3534(t,e,n){"use strict";n.d(e,{A:()=>r});let r=(0,n(7867).E)("Column")},8590(t,e,n){"use strict";n.d(e,{A:()=>r});let r=(0,n(7867).E)("Line")},5430(t,e,n){"use strict";n.d(e,{A:()=>r});let r=(0,n(7867).E)("Pie")},7867(t,e,n){"use strict";let r,i,a,o;n.d(e,{E:()=>zj});var l,s,u,c,f,h,d,p,y,g,v,b,x,O,w,k,_,M,E,A,S,j,P,T,C,N,L,I,R,D,B,F,z,$,W,G,q,H,Y,V,U,X,K,Z={};n.r(Z),n.d(Z,{add:()=>eE,adjoint:()=>t0,clone:()=>tV,copy:()=>tU,create:()=>tY,decompose:()=>ec,determinant:()=>t1,equals:()=>eT,exactEquals:()=>eP,frob:()=>eM,fromQuat:()=>ed,fromQuat2:()=>eo,fromRotation:()=>ee,fromRotationTranslation:()=>ea,fromRotationTranslationScale:()=>ef,fromRotationTranslationScaleOrigin:()=>eh,fromScaling:()=>et,fromTranslation:()=>t7,fromValues:()=>tX,fromXRotation:()=>en,fromYRotation:()=>er,fromZRotation:()=>ei,frustum:()=>ep,getRotation:()=>eu,getScaling:()=>es,getTranslation:()=>el,identity:()=>tZ,invert:()=>tJ,lookAt:()=>ew,mul:()=>eC,multiply:()=>t2,multiplyScalar:()=>eS,multiplyScalarAndAdd:()=>ej,ortho:()=>ex,orthoNO:()=>eb,orthoZO:()=>eO,perspective:()=>eg,perspectiveFromFieldOfView:()=>em,perspectiveNO:()=>ey,perspectiveZO:()=>ev,rotate:()=>t4,rotateX:()=>t6,rotateY:()=>t8,rotateZ:()=>t9,scale:()=>t3,set:()=>tK,str:()=>e_,sub:()=>eN,subtract:()=>eA,targetTo:()=>ek,translate:()=>t5,transpose:()=>tQ});var Q={};n.r(Q),n.d(Q,{area:()=>y8,bottom:()=>gi,bottomLeft:()=>gi,bottomRight:()=>gi,inside:()=>gi,left:()=>gi,outside:()=>gs,right:()=>gi,spider:()=>gv,surround:()=>gb,top:()=>gi,topLeft:()=>gi,topRight:()=>gi});var J={};n.r(J),n.d(J,{interpolateBlues:()=>b_,interpolateBrBG:()=>mY,interpolateBuGn:()=>bt,interpolateBuPu:()=>bn,interpolateCividis:()=>bI,interpolateCool:()=>bH,interpolateCubehelixDefault:()=>bG,interpolateGnBu:()=>bi,interpolateGreens:()=>bE,interpolateGreys:()=>bS,interpolateInferno:()=>b2,interpolateMagma:()=>b1,interpolateOrRd:()=>bo,interpolateOranges:()=>bL,interpolatePRGn:()=>mU,interpolatePiYG:()=>mK,interpolatePlasma:()=>b5,interpolatePuBu:()=>bc,interpolatePuBuGn:()=>bs,interpolatePuOr:()=>mQ,interpolatePuRd:()=>bh,interpolatePurples:()=>bP,interpolateRainbow:()=>bV,interpolateRdBu:()=>m0,interpolateRdGy:()=>m2,interpolateRdPu:()=>bp,interpolateRdYlBu:()=>m3,interpolateRdYlGn:()=>m6,interpolateReds:()=>bC,interpolateSinebow:()=>bZ,interpolateSpectral:()=>m9,interpolateTurbo:()=>bQ,interpolateViridis:()=>b0,interpolateWarm:()=>bq,interpolateYlGn:()=>bm,interpolateYlGnBu:()=>bg,interpolateYlOrBr:()=>bx,interpolateYlOrRd:()=>bw,schemeAccent:()=>v4,schemeBlues:()=>bk,schemeBrBG:()=>mH,schemeBuGn:()=>m7,schemeBuPu:()=>be,schemeCategory10:()=>v3,schemeDark2:()=>v6,schemeGnBu:()=>br,schemeGreens:()=>bM,schemeGreys:()=>bA,schemeObservable10:()=>v8,schemeOrRd:()=>ba,schemeOranges:()=>bN,schemePRGn:()=>mV,schemePaired:()=>v9,schemePastel1:()=>v7,schemePastel2:()=>mt,schemePiYG:()=>mX,schemePuBu:()=>bu,schemePuBuGn:()=>bl,schemePuOr:()=>mZ,schemePuRd:()=>bf,schemePurples:()=>bj,schemeRdBu:()=>mJ,schemeRdGy:()=>m1,schemeRdPu:()=>bd,schemeRdYlBu:()=>m5,schemeRdYlGn:()=>m4,schemeReds:()=>bT,schemeSet1:()=>me,schemeSet2:()=>mn,schemeSet3:()=>mr,schemeSpectral:()=>m8,schemeTableau10:()=>mi,schemeYlGn:()=>bv,schemeYlGnBu:()=>by,schemeYlOrBr:()=>bb,schemeYlOrRd:()=>bO});var tt={};n.r(tt),n.d(tt,{geoAlbers:()=>Ib,geoAlbersUsa:()=>Ix,geoAzimuthalEqualArea:()=>I_,geoAzimuthalEqualAreaRaw:()=>Ik,geoAzimuthalEquidistant:()=>IE,geoAzimuthalEquidistantRaw:()=>IM,geoConicConformal:()=>IC,geoConicConformalRaw:()=>IT,geoConicEqualArea:()=>Im,geoConicEqualAreaRaw:()=>Iv,geoConicEquidistant:()=>IR,geoConicEquidistantRaw:()=>II,geoEqualEarth:()=>IF,geoEqualEarthRaw:()=>IB,geoEquirectangular:()=>IL,geoEquirectangularRaw:()=>IN,geoGnomonic:()=>I$,geoGnomonicRaw:()=>Iz,geoIdentity:()=>IW,geoMercator:()=>IS,geoMercatorRaw:()=>IA,geoNaturalEarth1:()=>Iq,geoNaturalEarth1Raw:()=>IG,geoOrthographic:()=>IY,geoOrthographicRaw:()=>IH,geoProjection:()=>Ip,geoProjectionMutator:()=>Iy,geoStereographic:()=>IU,geoStereographicRaw:()=>IV,geoTransverseMercator:()=>IK,geoTransverseMercatorRaw:()=>IX});var te={};n.r(te),n.d(te,{frequency:()=>R5,id:()=>R3,name:()=>R4,weight:()=>R2});var tn=n(5259),tr=n.n(tn),ti=tn.version||"",ta="__rc_react_root__";try{if(parseInt(ti.split(".")[0],10)>=18)Ed=n(5643).createRoot;else{var to=n(3385);Ep=to.render,to.unmountComponentAtNode}}catch(t){}var tl=new Map;"u">typeof document&&tl.set("tooltip",document.createElement("div"));var ts=function(t,e){void 0===e&&(e=!1);var n=null;if(e)n=tl.get("tooltip");else if(n=document.createElement("div"),null==t?void 0:t.key){var r=tl.get(t.key);r?n=r:tl.set(t.key,n)}var i=n;if(Ed)i[ta]||(i[ta]=Ed(i)),i[ta].render(t);else if(Ep)Ep(t,i);else throw Error("ReactDOM.render is not available in this React version");return n},tu=function(){return(tu=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},tc=function(t,e){if(void 0===e&&(e={}),"u"<typeof document)return"loading";var n="";e&&Object.keys(e).forEach(function(t){n+="".concat(t,": ").concat(e[t],";\n")});var r=t.attachShadow({mode:"open"}),i=document.createElement("div"),a=document.createElement("style");a.innerHTML=".loading {\n display: inline-block;\n position: relative;\n width: 80px;\n height: 80px;\n }\n .loading div {\n position: absolute;\n top: 33px;\n width: 13px;\n height: 13px;\n border-radius: 50%;\n background: #ccc;\n animation-timing-function: cubic-bezier(0, 1, 1, 0);\n ".concat(n,"\n }\n .loading div:nth-child(1) {\n left: 8px;\n animation: loading1 0.6s infinite;\n }\n .loading div:nth-child(2) {\n left: 8px;\n animation: loading2 0.6s infinite;\n }\n .loading div:nth-child(3) {\n left: 32px;\n animation: loading2 0.6s infinite;\n }\n .loading div:nth-child(4) {\n left: 56px;\n animation: loading3 0.6s infinite;\n }\n @keyframes loading1 {\n 0% {\n transform: scale(0);\n }\n 100% {\n transform: scale(1);\n }\n }\n @keyframes loading3 {\n 0% {\n transform: scale(1);\n }\n 100% {\n transform: scale(0);\n }\n }\n @keyframes loading2 {\n 0% {\n transform: translate(0, 0);\n }\n 100% {\n transform: translate(24px, 0);\n }\n }\n "),i.classList.add("loading"),i.innerHTML="<div></div><div></div><div></div><div></div>",r.appendChild(a),r.appendChild(i)},tf=function(t){var e=t.loadingTemplate,n=t.theme,r=t.loading,i=tr().useRef(null),a="object"==typeof r?r:{},o=a.container,l=a.icon,s=void 0===l?{}:l;return tr().useEffect(function(){!e&&i.current&&tc(i.current,s)},[]),tr().createElement("div",{className:"charts-loading-container",style:tu({position:"absolute",width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",left:0,top:0,zIndex:99,background:"dark"===(void 0===n?"light":n)?"rgb(20, 20, 20)":"rgb(255, 255, 255)"},void 0===o?{}:o)},e||tr().createElement("div",{ref:i}))},th=(Mq=function(t,e){return(Mq=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}Mq(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),td=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.state={hasError:!1},e.renderError=function(t){var n=e.props.errorTemplate;return"function"==typeof n?n(t):n||tr().createElement("h5",null,"组件出错了,请核查后重试: ",t.message)},e}return th(e,t),e.getDerivedStateFromError=function(t){return{hasError:!0,error:t}},e.getDerivedStateFromProps=function(t,e){return e.children!==t.children?{children:t.children,hasError:!1,error:void 0}:null},e.prototype.render=function(){return this.state.hasError?this.renderError(this.state.error):tr().createElement(tn.Fragment,null,this.props.children)},e}(tr().Component),tp=n(2768),ty=function(t,e,n){if(n||2==arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};(0,tp.memoize)(function(t,e){void 0===e&&(e={});var n=e.fontSize,r=e.fontFamily,i=e.fontWeight,a=e.fontStyle,o=e.fontVariant,l=(Ey||(Ey=document.createElement("canvas").getContext("2d")),Ey);return l.font=[a,i,o,"".concat(n,"px"),void 0===r?"sans-serif":r].join(" "),l.measureText((0,tp.isString)(t)?t:"")},function(t,e){return void 0===e&&(e={}),ty([t],(0,tp.values)(e),!0).join("")});var tg=function(t){var e=new Set(["g","circle","ellipse","image","rect","line","polyline","polygon","text","path","html","mesh"]);if([/\breact\b/i,/\.jsx/,/children:\s*\[/,/\*#__PURE__\*/].some(function(e){return e.test(t)}))return!0;var n=t.match(/(\w+)?\.createElement\(\s*(['"`])([^'"`]+)\2/g);return!!n&&n.some(function(t){var n=t.match(/\.createElement\(\s*(['"`])([^'"`]+)\1/);return n&&!e.has(n[2].toLowerCase())})},tv=function(){return(tv=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},tm=function(){function t(){this._events={}}return t.prototype.on=function(t,e,n){return this._events[t]||(this._events[t]=[]),this._events[t].push({callback:e,once:!!n}),this},t.prototype.once=function(t,e){return this.on(t,e,!0)},t.prototype.emit=function(t){for(var e=this,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var i=this._events[t]||[],a=this._events["*"]||[],o=function(r){for(var i=r.length,a=0;a<i;a++)if(r[a]){var o=r[a],l=o.callback;o.once&&(r.splice(a,1),0===r.length&&delete e._events[t],i--,a--),l.apply(e,n)}};o(i),o(a)},t.prototype.off=function(t,e){if(t)if(e){for(var n=this._events[t]||[],r=n.length,i=0;i<r;i++)n[i].callback===e&&(n.splice(i,1),r--,i--);0===n.length&&delete this._events[t]}else delete this._events[t];else this._events={};return this},t.prototype.getEvents=function(){return this._events},t}(),tb=n(7604),tx=n(9224),tO=n(7366),tw=n(6161),tk=n(5641),t_=n(7576),tM=n(62),tE=n(6914),tA="u">typeof Float32Array?Float32Array:Array;function tS(){var t=new tA(3);return tA!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function tj(t){var e=new tA(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function tP(t){var e=t[0],n=t[1],r=t[2];return Math.sqrt(e*e+n*n+r*r)}function tT(t,e,n){var r=new tA(3);return r[0]=t,r[1]=e,r[2]=n,r}function tC(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function tN(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function tL(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function tI(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function tR(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function tD(t,e){var n=e[0],r=e[1],i=e[2],a=n*n+r*r+i*i;return a>0&&(a=1/Math.sqrt(a)),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a,t}function tB(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function tF(t,e,n,r){var i=e[0],a=e[1],o=e[2];return t[0]=i+r*(n[0]-i),t[1]=a+r*(n[1]-a),t[2]=o+r*(n[2]-o),t}function tz(t,e,n){var r=e[0],i=e[1],a=e[2],o=n[3]*r+n[7]*i+n[11]*a+n[15];return o=o||1,t[0]=(n[0]*r+n[4]*i+n[8]*a+n[12])/o,t[1]=(n[1]*r+n[5]*i+n[9]*a+n[13])/o,t[2]=(n[2]*r+n[6]*i+n[10]*a+n[14])/o,t}function t$(t,e){var n=t[0],r=t[1],i=t[2],a=e[0],o=e[1],l=e[2];return Math.abs(n-a)<=1e-6*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(r-o)<=1e-6*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(i-l)<=1e-6*Math.max(1,Math.abs(i),Math.abs(l))}var tW=function(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return Math.sqrt(n*n+r*r+i*i)};function tG(){var t=new tA(4);return tA!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}function tq(t,e,n,r){var i=new tA(4);return i[0]=t,i[1]=e,i[2]=n,i[3]=r,i}function tH(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3];return t[0]=n[0]*r+n[4]*i+n[8]*a+n[12]*o,t[1]=n[1]*r+n[5]*i+n[9]*a+n[13]*o,t[2]=n[2]*r+n[6]*i+n[10]*a+n[14]*o,t[3]=n[3]*r+n[7]*i+n[11]*a+n[15]*o,t}function tY(){var t=new tA(16);return tA!=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 tV(t){var e=new tA(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function tU(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function tX(t,e,n,r,i,a,o,l,s,u,c,f,h,d,p,y){var g=new tA(16);return g[0]=t,g[1]=e,g[2]=n,g[3]=r,g[4]=i,g[5]=a,g[6]=o,g[7]=l,g[8]=s,g[9]=u,g[10]=c,g[11]=f,g[12]=h,g[13]=d,g[14]=p,g[15]=y,g}function tK(t,e,n,r,i,a,o,l,s,u,c,f,h,d,p,y,g){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=l,t[7]=s,t[8]=u,t[9]=c,t[10]=f,t[11]=h,t[12]=d,t[13]=p,t[14]=y,t[15]=g,t}function tZ(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 tQ(t,e){if(t===e){var n=e[1],r=e[2],i=e[3],a=e[6],o=e[7],l=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=r,t[9]=a,t[11]=e[14],t[12]=i,t[13]=o,t[14]=l}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}function tJ(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],l=e[5],s=e[6],u=e[7],c=e[8],f=e[9],h=e[10],d=e[11],p=e[12],y=e[13],g=e[14],v=e[15],b=n*l-r*o,x=n*s-i*o,O=n*u-a*o,w=r*s-i*l,k=r*u-a*l,_=i*u-a*s,M=c*y-f*p,E=c*g-h*p,A=c*v-d*p,S=f*g-h*y,j=f*v-d*y,P=h*v-d*g,T=b*P-x*j+O*S+w*A-k*E+_*M;return T?(T=1/T,t[0]=(l*P-s*j+u*S)*T,t[1]=(i*j-r*P-a*S)*T,t[2]=(y*_-g*k+v*w)*T,t[3]=(h*k-f*_-d*w)*T,t[4]=(s*A-o*P-u*E)*T,t[5]=(n*P-i*A+a*E)*T,t[6]=(g*O-p*_-v*x)*T,t[7]=(c*_-h*O+d*x)*T,t[8]=(o*j-l*A+u*M)*T,t[9]=(r*A-n*j-a*M)*T,t[10]=(p*k-y*O+v*b)*T,t[11]=(f*O-c*k-d*b)*T,t[12]=(l*E-o*S-s*M)*T,t[13]=(n*S-r*E+i*M)*T,t[14]=(y*x-p*w-g*b)*T,t[15]=(c*w-f*x+h*b)*T,t):null}function t0(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],l=e[5],s=e[6],u=e[7],c=e[8],f=e[9],h=e[10],d=e[11],p=e[12],y=e[13],g=e[14],v=e[15],b=n*l-r*o,x=n*s-i*o,O=n*u-a*o,w=r*s-i*l,k=r*u-a*l,_=i*u-a*s,M=c*y-f*p,E=c*g-h*p,A=c*v-d*p,S=f*g-h*y,j=f*v-d*y,P=h*v-d*g;return t[0]=l*P-s*j+u*S,t[1]=i*j-r*P-a*S,t[2]=y*_-g*k+v*w,t[3]=h*k-f*_-d*w,t[4]=s*A-o*P-u*E,t[5]=n*P-i*A+a*E,t[6]=g*O-p*_-v*x,t[7]=c*_-h*O+d*x,t[8]=o*j-l*A+u*M,t[9]=r*A-n*j-a*M,t[10]=p*k-y*O+v*b,t[11]=f*O-c*k-d*b,t[12]=l*E-o*S-s*M,t[13]=n*S-r*E+i*M,t[14]=y*x-p*w-g*b,t[15]=c*w-f*x+h*b,t}function t1(t){var e=t[0],n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],l=t[6],s=t[7],u=t[8],c=t[9],f=t[10],h=t[11],d=t[12],p=t[13],y=t[14],g=t[15],v=e*o-n*a,b=e*l-r*a,x=n*l-r*o,O=u*p-c*d,w=u*y-f*d,k=c*y-f*p;return s*(e*k-n*w+r*O)-i*(a*k-o*w+l*O)+g*(u*x-c*b+f*v)-h*(d*x-p*b+y*v)}function t2(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],l=e[4],s=e[5],u=e[6],c=e[7],f=e[8],h=e[9],d=e[10],p=e[11],y=e[12],g=e[13],v=e[14],b=e[15],x=n[0],O=n[1],w=n[2],k=n[3];return t[0]=x*r+O*l+w*f+k*y,t[1]=x*i+O*s+w*h+k*g,t[2]=x*a+O*u+w*d+k*v,t[3]=x*o+O*c+w*p+k*b,x=n[4],O=n[5],w=n[6],k=n[7],t[4]=x*r+O*l+w*f+k*y,t[5]=x*i+O*s+w*h+k*g,t[6]=x*a+O*u+w*d+k*v,t[7]=x*o+O*c+w*p+k*b,x=n[8],O=n[9],w=n[10],k=n[11],t[8]=x*r+O*l+w*f+k*y,t[9]=x*i+O*s+w*h+k*g,t[10]=x*a+O*u+w*d+k*v,t[11]=x*o+O*c+w*p+k*b,x=n[12],O=n[13],w=n[14],k=n[15],t[12]=x*r+O*l+w*f+k*y,t[13]=x*i+O*s+w*h+k*g,t[14]=x*a+O*u+w*d+k*v,t[15]=x*o+O*c+w*p+k*b,t}function t5(t,e,n){var r,i,a,o,l,s,u,c,f,h,d,p,y=n[0],g=n[1],v=n[2];return e===t?(t[12]=e[0]*y+e[4]*g+e[8]*v+e[12],t[13]=e[1]*y+e[5]*g+e[9]*v+e[13],t[14]=e[2]*y+e[6]*g+e[10]*v+e[14],t[15]=e[3]*y+e[7]*g+e[11]*v+e[15]):(r=e[0],i=e[1],a=e[2],o=e[3],l=e[4],s=e[5],u=e[6],c=e[7],f=e[8],h=e[9],d=e[10],p=e[11],t[0]=r,t[1]=i,t[2]=a,t[3]=o,t[4]=l,t[5]=s,t[6]=u,t[7]=c,t[8]=f,t[9]=h,t[10]=d,t[11]=p,t[12]=r*y+l*g+f*v+e[12],t[13]=i*y+s*g+h*v+e[13],t[14]=a*y+u*g+d*v+e[14],t[15]=o*y+c*g+p*v+e[15]),t}function t3(t,e,n){var r=n[0],i=n[1],a=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*a,t[9]=e[9]*a,t[10]=e[10]*a,t[11]=e[11]*a,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function t4(t,e,n,r){var i,a,o,l,s,u,c,f,h,d,p,y,g,v,b,x,O,w,k,_,M,E,A,S,j=r[0],P=r[1],T=r[2],C=Math.sqrt(j*j+P*P+T*T);return C<1e-6?null:(j*=C=1/C,P*=C,T*=C,i=Math.sin(n),o=1-(a=Math.cos(n)),l=e[0],s=e[1],u=e[2],c=e[3],f=e[4],h=e[5],d=e[6],p=e[7],y=e[8],g=e[9],v=e[10],b=e[11],x=j*j*o+a,O=P*j*o+T*i,w=T*j*o-P*i,k=j*P*o-T*i,_=P*P*o+a,M=T*P*o+j*i,E=j*T*o+P*i,A=P*T*o-j*i,S=T*T*o+a,t[0]=l*x+f*O+y*w,t[1]=s*x+h*O+g*w,t[2]=u*x+d*O+v*w,t[3]=c*x+p*O+b*w,t[4]=l*k+f*_+y*M,t[5]=s*k+h*_+g*M,t[6]=u*k+d*_+v*M,t[7]=c*k+p*_+b*M,t[8]=l*E+f*A+y*S,t[9]=s*E+h*A+g*S,t[10]=u*E+d*A+v*S,t[11]=c*E+p*A+b*S,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)}function t6(t,e,n){var r=Math.sin(n),i=Math.cos(n),a=e[4],o=e[5],l=e[6],s=e[7],u=e[8],c=e[9],f=e[10],h=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=a*i+u*r,t[5]=o*i+c*r,t[6]=l*i+f*r,t[7]=s*i+h*r,t[8]=u*i-a*r,t[9]=c*i-o*r,t[10]=f*i-l*r,t[11]=h*i-s*r,t}function t8(t,e,n){var r=Math.sin(n),i=Math.cos(n),a=e[0],o=e[1],l=e[2],s=e[3],u=e[8],c=e[9],f=e[10],h=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=a*i-u*r,t[1]=o*i-c*r,t[2]=l*i-f*r,t[3]=s*i-h*r,t[8]=a*r+u*i,t[9]=o*r+c*i,t[10]=l*r+f*i,t[11]=s*r+h*i,t}function t9(t,e,n){var r=Math.sin(n),i=Math.cos(n),a=e[0],o=e[1],l=e[2],s=e[3],u=e[4],c=e[5],f=e[6],h=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=a*i+u*r,t[1]=o*i+c*r,t[2]=l*i+f*r,t[3]=s*i+h*r,t[4]=u*i-a*r,t[5]=c*i-o*r,t[6]=f*i-l*r,t[7]=h*i-s*r,t}function t7(t,e){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]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function et(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function ee(t,e,n){var r,i,a,o=n[0],l=n[1],s=n[2],u=Math.sqrt(o*o+l*l+s*s);return u<1e-6?null:(o*=u=1/u,l*=u,s*=u,r=Math.sin(e),a=1-(i=Math.cos(e)),t[0]=o*o*a+i,t[1]=l*o*a+s*r,t[2]=s*o*a-l*r,t[3]=0,t[4]=o*l*a-s*r,t[5]=l*l*a+i,t[6]=s*l*a+o*r,t[7]=0,t[8]=o*s*a+l*r,t[9]=l*s*a-o*r,t[10]=s*s*a+i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)}function en(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=r,t[6]=n,t[7]=0,t[8]=0,t[9]=-n,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function er(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=0,t[2]=-n,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=n,t[9]=0,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function ei(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=0,t[4]=-n,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 ea(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],l=r+r,s=i+i,u=a+a,c=r*l,f=r*s,h=r*u,d=i*s,p=i*u,y=a*u,g=o*l,v=o*s,b=o*u;return t[0]=1-(d+y),t[1]=f+b,t[2]=h-v,t[3]=0,t[4]=f-b,t[5]=1-(c+y),t[6]=p+g,t[7]=0,t[8]=h+v,t[9]=p-g,t[10]=1-(c+d),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function eo(t,e){var n=new tA(3),r=-e[0],i=-e[1],a=-e[2],o=e[3],l=e[4],s=e[5],u=e[6],c=e[7],f=r*r+i*i+a*a+o*o;return f>0?(n[0]=(l*o+c*r+s*a-u*i)*2/f,n[1]=(s*o+c*i+u*r-l*a)*2/f,n[2]=(u*o+c*a+l*i-s*r)*2/f):(n[0]=(l*o+c*r+s*a-u*i)*2,n[1]=(s*o+c*i+u*r-l*a)*2,n[2]=(u*o+c*a+l*i-s*r)*2),ea(t,e,n),t}function el(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function es(t,e){var n=e[0],r=e[1],i=e[2],a=e[4],o=e[5],l=e[6],s=e[8],u=e[9],c=e[10];return t[0]=Math.sqrt(n*n+r*r+i*i),t[1]=Math.sqrt(a*a+o*o+l*l),t[2]=Math.sqrt(s*s+u*u+c*c),t}function eu(t,e){var n=new tA(3);es(n,e);var r=1/n[0],i=1/n[1],a=1/n[2],o=e[0]*r,l=e[1]*i,s=e[2]*a,u=e[4]*r,c=e[5]*i,f=e[6]*a,h=e[8]*r,d=e[9]*i,p=e[10]*a,y=o+c+p,g=0;return y>0?(g=2*Math.sqrt(y+1),t[3]=.25*g,t[0]=(f-d)/g,t[1]=(h-s)/g,t[2]=(l-u)/g):o>c&&o>p?(g=2*Math.sqrt(1+o-c-p),t[3]=(f-d)/g,t[0]=.25*g,t[1]=(l+u)/g,t[2]=(h+s)/g):c>p?(g=2*Math.sqrt(1+c-o-p),t[3]=(h-s)/g,t[0]=(l+u)/g,t[1]=.25*g,t[2]=(f+d)/g):(g=2*Math.sqrt(1+p-o-c),t[3]=(l-u)/g,t[0]=(h+s)/g,t[1]=(f+d)/g,t[2]=.25*g),t}function ec(t,e,n,r){e[0]=r[12],e[1]=r[13],e[2]=r[14];var i=r[0],a=r[1],o=r[2],l=r[4],s=r[5],u=r[6],c=r[8],f=r[9],h=r[10];n[0]=Math.sqrt(i*i+a*a+o*o),n[1]=Math.sqrt(l*l+s*s+u*u),n[2]=Math.sqrt(c*c+f*f+h*h);var d=1/n[0],p=1/n[1],y=1/n[2],g=i*d,v=a*p,b=o*y,x=l*d,O=s*p,w=u*y,k=c*d,_=f*p,M=h*y,E=g+O+M,A=0;return E>0?(A=2*Math.sqrt(E+1),t[3]=.25*A,t[0]=(w-_)/A,t[1]=(k-b)/A,t[2]=(v-x)/A):g>O&&g>M?(A=2*Math.sqrt(1+g-O-M),t[3]=(w-_)/A,t[0]=.25*A,t[1]=(v+x)/A,t[2]=(k+b)/A):O>M?(A=2*Math.sqrt(1+O-g-M),t[3]=(k-b)/A,t[0]=(v+x)/A,t[1]=.25*A,t[2]=(w+_)/A):(A=2*Math.sqrt(1+M-g-O),t[3]=(v-x)/A,t[0]=(k+b)/A,t[1]=(w+_)/A,t[2]=.25*A),t}function ef(t,e,n,r){var i=e[0],a=e[1],o=e[2],l=e[3],s=i+i,u=a+a,c=o+o,f=i*s,h=i*u,d=i*c,p=a*u,y=a*c,g=o*c,v=l*s,b=l*u,x=l*c,O=r[0],w=r[1],k=r[2];return t[0]=(1-(p+g))*O,t[1]=(h+x)*O,t[2]=(d-b)*O,t[3]=0,t[4]=(h-x)*w,t[5]=(1-(f+g))*w,t[6]=(y+v)*w,t[7]=0,t[8]=(d+b)*k,t[9]=(y-v)*k,t[10]=(1-(f+p))*k,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function eh(t,e,n,r,i){var a=e[0],o=e[1],l=e[2],s=e[3],u=a+a,c=o+o,f=l+l,h=a*u,d=a*c,p=a*f,y=o*c,g=o*f,v=l*f,b=s*u,x=s*c,O=s*f,w=r[0],k=r[1],_=r[2],M=i[0],E=i[1],A=i[2],S=(1-(y+v))*w,j=(d+O)*w,P=(p-x)*w,T=(d-O)*k,C=(1-(h+v))*k,N=(g+b)*k,L=(p+x)*_,I=(g-b)*_,R=(1-(h+y))*_;return t[0]=S,t[1]=j,t[2]=P,t[3]=0,t[4]=T,t[5]=C,t[6]=N,t[7]=0,t[8]=L,t[9]=I,t[10]=R,t[11]=0,t[12]=n[0]+M-(S*M+T*E+L*A),t[13]=n[1]+E-(j*M+C*E+I*A),t[14]=n[2]+A-(P*M+N*E+R*A),t[15]=1,t}function ed(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=n+n,l=r+r,s=i+i,u=n*o,c=r*o,f=r*l,h=i*o,d=i*l,p=i*s,y=a*o,g=a*l,v=a*s;return t[0]=1-f-p,t[1]=c+v,t[2]=h-g,t[3]=0,t[4]=c-v,t[5]=1-u-p,t[6]=d+y,t[7]=0,t[8]=h+g,t[9]=d-y,t[10]=1-u-f,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function ep(t,e,n,r,i,a,o){var l=1/(n-e),s=1/(i-r),u=1/(a-o);return t[0]=2*a*l,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*a*s,t[6]=0,t[7]=0,t[8]=(n+e)*l,t[9]=(i+r)*s,t[10]=(o+a)*u,t[11]=-1,t[12]=0,t[13]=0,t[14]=o*a*2*u,t[15]=0,t}function ey(t,e,n,r,i){var a=1/Math.tan(e/2);if(t[0]=a/n,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,null!=i&&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}tS(),tG();var eg=ey;function ev(t,e,n,r,i){var a=1/Math.tan(e/2);if(t[0]=a/n,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,null!=i&&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 em(t,e,n,r){var i=Math.tan(e.upDegrees*Math.PI/180),a=Math.tan(e.downDegrees*Math.PI/180),o=Math.tan(e.leftDegrees*Math.PI/180),l=Math.tan(e.rightDegrees*Math.PI/180),s=2/(o+l),u=2/(i+a);return t[0]=s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=u,t[6]=0,t[7]=0,t[8]=-((o-l)*s*.5),t[9]=(i-a)*u*.5,t[10]=r/(n-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*n/(n-r),t[15]=0,t}function eb(t,e,n,r,i,a,o){var l=1/(e-n),s=1/(r-i),u=1/(a-o);return t[0]=-2*l,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*s,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*u,t[11]=0,t[12]=(e+n)*l,t[13]=(i+r)*s,t[14]=(o+a)*u,t[15]=1,t}var ex=eb;function eO(t,e,n,r,i,a,o){var l=1/(e-n),s=1/(r-i),u=1/(a-o);return t[0]=-2*l,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*s,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=u,t[11]=0,t[12]=(e+n)*l,t[13]=(i+r)*s,t[14]=a*u,t[15]=1,t}function ew(t,e,n,r){var i,a,o,l,s,u,c,f,h,d,p=e[0],y=e[1],g=e[2],v=r[0],b=r[1],x=r[2],O=n[0],w=n[1],k=n[2];return 1e-6>Math.abs(p-O)&&1e-6>Math.abs(y-w)&&1e-6>Math.abs(g-k)?tZ(t):(d=1/Math.sqrt((c=p-O)*c+(f=y-w)*f+(h=g-k)*h),c*=d,f*=d,h*=d,(d=Math.sqrt((i=b*h-x*f)*i+(a=x*c-v*h)*a+(o=v*f-b*c)*o))?(i*=d=1/d,a*=d,o*=d):(i=0,a=0,o=0),(d=Math.sqrt((l=f*o-h*a)*l+(s=h*i-c*o)*s+(u=c*a-f*i)*u))?(l*=d=1/d,s*=d,u*=d):(l=0,s=0,u=0),t[0]=i,t[1]=l,t[2]=c,t[3]=0,t[4]=a,t[5]=s,t[6]=f,t[7]=0,t[8]=o,t[9]=u,t[10]=h,t[11]=0,t[12]=-(i*p+a*y+o*g),t[13]=-(l*p+s*y+u*g),t[14]=-(c*p+f*y+h*g),t[15]=1,t)}function ek(t,e,n,r){var i=e[0],a=e[1],o=e[2],l=r[0],s=r[1],u=r[2],c=i-n[0],f=a-n[1],h=o-n[2],d=c*c+f*f+h*h;d>0&&(c*=d=1/Math.sqrt(d),f*=d,h*=d);var p=s*h-u*f,y=u*c-l*h,g=l*f-s*c;return(d=p*p+y*y+g*g)>0&&(p*=d=1/Math.sqrt(d),y*=d,g*=d),t[0]=p,t[1]=y,t[2]=g,t[3]=0,t[4]=f*g-h*y,t[5]=h*p-c*g,t[6]=c*y-f*p,t[7]=0,t[8]=c,t[9]=f,t[10]=h,t[11]=0,t[12]=i,t[13]=a,t[14]=o,t[15]=1,t}function e_(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 eM(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 eE(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t[9]=e[9]+n[9],t[10]=e[10]+n[10],t[11]=e[11]+n[11],t[12]=e[12]+n[12],t[13]=e[13]+n[13],t[14]=e[14]+n[14],t[15]=e[15]+n[15],t}function eA(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t[9]=e[9]-n[9],t[10]=e[10]-n[10],t[11]=e[11]-n[11],t[12]=e[12]-n[12],t[13]=e[13]-n[13],t[14]=e[14]-n[14],t[15]=e[15]-n[15],t}function eS(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12]*n,t[13]=e[13]*n,t[14]=e[14]*n,t[15]=e[15]*n,t}function ej(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t[9]=e[9]+n[9]*r,t[10]=e[10]+n[10]*r,t[11]=e[11]+n[11]*r,t[12]=e[12]+n[12]*r,t[13]=e[13]+n[13]*r,t[14]=e[14]+n[14]*r,t[15]=e[15]+n[15]*r,t}function eP(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[11]===e[11]&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[15]===e[15]}function eT(t,e){var n=t[0],r=t[1],i=t[2],a=t[3],o=t[4],l=t[5],s=t[6],u=t[7],c=t[8],f=t[9],h=t[10],d=t[11],p=t[12],y=t[13],g=t[14],v=t[15],b=e[0],x=e[1],O=e[2],w=e[3],k=e[4],_=e[5],M=e[6],E=e[7],A=e[8],S=e[9],j=e[10],P=e[11],T=e[12],C=e[13],N=e[14],L=e[15];return Math.abs(n-b)<=1e-6*Math.max(1,Math.abs(n),Math.abs(b))&&Math.abs(r-x)<=1e-6*Math.max(1,Math.abs(r),Math.abs(x))&&Math.abs(i-O)<=1e-6*Math.max(1,Math.abs(i),Math.abs(O))&&Math.abs(a-w)<=1e-6*Math.max(1,Math.abs(a),Math.abs(w))&&Math.abs(o-k)<=1e-6*Math.max(1,Math.abs(o),Math.abs(k))&&Math.abs(l-_)<=1e-6*Math.max(1,Math.abs(l),Math.abs(_))&&Math.abs(s-M)<=1e-6*Math.max(1,Math.abs(s),Math.abs(M))&&Math.abs(u-E)<=1e-6*Math.max(1,Math.abs(u),Math.abs(E))&&Math.abs(c-A)<=1e-6*Math.max(1,Math.abs(c),Math.abs(A))&&Math.abs(f-S)<=1e-6*Math.max(1,Math.abs(f),Math.abs(S))&&Math.abs(h-j)<=1e-6*Math.max(1,Math.abs(h),Math.abs(j))&&Math.abs(d-P)<=1e-6*Math.max(1,Math.abs(d),Math.abs(P))&&Math.abs(p-T)<=1e-6*Math.max(1,Math.abs(p),Math.abs(T))&&Math.abs(y-C)<=1e-6*Math.max(1,Math.abs(y),Math.abs(C))&&Math.abs(g-N)<=1e-6*Math.max(1,Math.abs(g),Math.abs(N))&&Math.abs(v-L)<=1e-6*Math.max(1,Math.abs(v),Math.abs(L))}var eC=t2,eN=eA;function eL(){var t=new tA(9);return tA!=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 eI(){var t=new tA(4);return tA!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function eR(t,e,n){var r=Math.sin(n*=.5);return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=Math.cos(n),t}function eD(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],l=n[0],s=n[1],u=n[2],c=n[3];return t[0]=r*c+o*l+i*u-a*s,t[1]=i*c+o*s+a*l-r*u,t[2]=a*c+o*u+r*s-i*l,t[3]=o*c-r*l-i*s-a*u,t}function eB(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=n*n+r*r+i*i+a*a,l=o?1/o:0;return t[0]=-n*l,t[1]=-r*l,t[2]=-i*l,t[3]=a*l,t}function eF(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"zyx",a=Math.PI/360;e*=a,r*=a;var o=Math.sin(e),l=Math.cos(e),s=Math.sin(n*=a),u=Math.cos(n),c=Math.sin(r),f=Math.cos(r);switch(i){case"xyz":t[0]=o*u*f+l*s*c,t[1]=l*s*f-o*u*c,t[2]=l*u*c+o*s*f,t[3]=l*u*f-o*s*c;break;case"xzy":t[0]=o*u*f-l*s*c,t[1]=l*s*f-o*u*c,t[2]=l*u*c+o*s*f,t[3]=l*u*f+o*s*c;break;case"yxz":t[0]=o*u*f+l*s*c,t[1]=l*s*f-o*u*c,t[2]=l*u*c-o*s*f,t[3]=l*u*f+o*s*c;break;case"yzx":t[0]=o*u*f+l*s*c,t[1]=l*s*f+o*u*c,t[2]=l*u*c-o*s*f,t[3]=l*u*f-o*s*c;break;case"zxy":t[0]=o*u*f-l*s*c,t[1]=l*s*f+o*u*c,t[2]=l*u*c+o*s*f,t[3]=l*u*f-o*s*c;break;case"zyx":t[0]=o*u*f-l*s*c,t[1]=l*s*f+o*u*c,t[2]=l*u*c-o*s*f,t[3]=l*u*f+o*s*c;break;default:throw Error("Unknown angle order "+i)}return t}var ez=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},e$=function(t,e,n,r,i){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t},eW=function(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=n*n+r*r+i*i+a*a;return o>0&&(o=1/Math.sqrt(o)),t[0]=n*o,t[1]=r*o,t[2]=i*o,t[3]=a*o,t};function eG(){var t=new tA(2);return tA!=Float32Array&&(t[0]=0,t[1]=0),t}function eq(t){return"number"==typeof t}function eH(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}function eY(t){return null==t}function eV(t){return"string"==typeof t}tS(),tT(1,0,0),tT(0,1,0),eI(),eI(),eL(),eG();let eU=function(t,e,n){return t<e?e:t>n?n:t};var eX=function(t,e){return(eX=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function eK(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}eX(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var eZ=function(){return(eZ=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function eQ(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}function eJ(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function e0(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o}function e1(t,e,n){if(n||2==arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}function e2(t,e,n,r){if("a"===n&&!r)throw TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)}var e5={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0};function e3(t){return Array.isArray(t)&&t.every(function(t){var e=t[0].toLowerCase();return e5[e]===t.length-1&&"achlmqstvz".includes(e)})}function e4(t){return e3(t)&&t.every(function(t){var e=t[0];return e===e.toUpperCase()})}function e6(t){return e4(t)&&t.every(function(t){var e=t[0];return"ACLMQZ".includes(e)})}var e8={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null};function e9(t){for(var e=t.pathValue[t.segmentStart],n=e.toLowerCase(),r=t.data;r.length>=e5[n]&&("m"===n&&r.length>2?(t.segments.push([e].concat(r.splice(0,2))),n="l",e="m"===e?"l":"L"):t.segments.push([e].concat(r.splice(0,e5[n]))),e5[n]););}function e7(t){return t>=48&&t<=57}function nt(t){for(var e,n=t.pathValue,r=t.max;t.index<r&&(10===(e=n.charCodeAt(t.index))||13===e||8232===e||8233===e||32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].includes(e));)t.index+=1}var ne=function(t){this.pathValue=t,this.segments=[],this.max=t.length,this.index=0,this.param=0,this.segmentStart=0,this.data=[],this.err=""};function nn(t){if(e6(t))return[].concat(t);for(var e=function(t){if(e4(t))return[].concat(t);var e=function(t){if(e3(t))return[].concat(t);var e=new ne(t);for(nt(e);e.index<e.max&&!e.err.length;)!function(t){var e=t.max,n=t.pathValue,r=t.index,i=n.charCodeAt(r),a=e5[n[r].toLowerCase()];if(t.segmentStart=r,!function(t){switch(32|t){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}}(i)){t.err='[path-util]: Invalid path value "'.concat(n[r],'" is not a path command');return}if(t.index+=1,nt(t),t.data=[],!a)return e9(t);for(;;){for(var o,l=a;l>0;l-=1){if((32|i)==97&&(3===l||4===l)?!function(t){var e=t.index,n=t.pathValue,r=n.charCodeAt(e);if(48===r){t.param=0,t.index+=1;return}if(49===r){t.param=1,t.index+=1;return}t.err='[path-util]: invalid Arc flag "'.concat(n[e],'", expecting 0 or 1 at index ').concat(e)}(t):!function(t){var e,n=t.max,r=t.pathValue,i=t.index,a=i,o=!1,l=!1,s=!1,u=!1;if(a>=n){t.err="[path-util]: Invalid path value at index ".concat(a,', "pathValue" is missing param');return}if((43===(e=r.charCodeAt(a))||45===e)&&(a+=1,e=r.charCodeAt(a)),!e7(e)&&46!==e){t.err="[path-util]: Invalid path value at index ".concat(a,', "').concat(r[a],'" is not a number');return}if(46!==e){if(o=48===e,a+=1,e=r.charCodeAt(a),o&&a<n&&e&&e7(e)){t.err="[path-util]: Invalid path value at index ".concat(i,', "').concat(r[i],'" illegal number');return}for(;a<n&&e7(r.charCodeAt(a));)a+=1,l=!0;e=r.charCodeAt(a)}if(46===e){for(u=!0,a+=1;e7(r.charCodeAt(a));)a+=1,s=!0;e=r.charCodeAt(a)}if(101===e||69===e){if(u&&!l&&!s){t.err="[path-util]: Invalid path value at index ".concat(a,', "').concat(r[a],'" invalid float exponent');return}if(a+=1,(43===(e=r.charCodeAt(a))||45===e)&&(a+=1),a<n&&e7(r.charCodeAt(a)))for(;a<n&&e7(r.charCodeAt(a));)a+=1;else{t.err="[path-util]: Invalid path value at index ".concat(a,', "').concat(r[a],'" invalid integer exponent');return}}t.index=a,t.param=+t.pathValue.slice(i,a)}(t),t.err.length)return;t.data.push(t.param),nt(t),t.index<e&&44===n.charCodeAt(t.index)&&(t.index+=1,nt(t))}if(t.index>=t.max||!((o=n.charCodeAt(t.index))>=48&&o<=57||43===o||45===o||46===o))break}e9(t)}(e);return e.err?e.err:e.segments}(t),n=0,r=0,i=0,a=0;return e.map(function(t){var e,o=t.slice(1).map(Number),l=t[0],s=l.toUpperCase();if("M"===l)return n=o[0],r=o[1],i=n,a=r,["M",n,r];if(l!==s)switch(s){case"A":e=[s,o[0],o[1],o[2],o[3],o[4],o[5]+n,o[6]+r];break;case"V":e=[s,o[0]+r];break;case"H":e=[s,o[0]+n];break;default:e=[s].concat(o.map(function(t,e){return t+(e%2?r:n)}))}else e=[s].concat(o);var u=e.length;switch(s){case"Z":n=i,r=a;break;case"H":n=e[1];break;case"V":r=e[1];break;default:n=e[u-2],r=e[u-1],"M"===s&&(i=n,a=r)}return e})}(t),n=eZ({},e8),r=0;r<e.length;r+=1){e[r]=function(t,e){var n=t[0],r=e.x1,i=e.y1,a=e.x2,o=e.y2,l=t.slice(1).map(Number),s=t;if("TQ".includes(n)||(e.qx=null,e.qy=null),"H"===n)s=["L",t[1],i];else if("V"===n)s=["L",r,t[1]];else if("S"===n){var u=2*r-a,c=2*i-o;e.x1=u,e.y1=c,s=["C",u,c].concat(l)}else if("T"===n){var f=2*r-e.qx,h=2*i-e.qy;e.qx=f,e.qy=h,s=["Q",f,h].concat(l)}else if("Q"===n){var d=l[0],p=l[1];e.qx=d,e.qy=p}return s}(e[r],n);var i=e[r],a=i.length;n.x1=+i[a-2],n.y1=+i[a-1],n.x2=+i[a-4]||n.x1,n.y2=+i[a-3]||n.y1}return e}function nr(t,e,n){var r=t[0],i=t[1];return[r+(e[0]-r)*n,i+(e[1]-i)*n]}function ni(t,e,n,r,i){var a=eH([t,e],[n,r]),o={x:0,y:0};if("number"==typeof i)if(i<=0)o={x:t,y:e};else if(i>=a)o={x:n,y:r};else{var l=nr([t,e],[n,r],i/a);o={x:l[0],y:l[1]}}return{length:a,point:o,min:{x:Math.min(t,n),y:Math.min(e,r)},max:{x:Math.max(t,n),y:Math.max(e,r)}}}function na(t,e){var n=t.x,r=t.y,i=e.x,a=e.y,o=Math.sqrt((Math.pow(n,2)+Math.pow(r,2))*(Math.pow(i,2)+Math.pow(a,2)));return(n*a-r*i<0?-1:1)*Math.acos((n*i+r*a)/o)}function no(t,e,n,r,i,a,o,l,s,u){var c,f=u.bbox,h=void 0===f||f,d=u.length,p=void 0===d||d,y=u.sampleSize,g=void 0===y?10:y,v="number"==typeof s,b=t,x=e,O=0,w=[b,x,0],k=[b,x],_={x:0,y:0},M=[{x:b,y:x}];v&&s<=0&&(_={x:b,y:x});for(var E=0;E<=g;E+=1){if(b=(c=function(t,e,n,r,i,a,o,l,s){var u=1-s;return{x:Math.pow(u,3)*t+3*Math.pow(u,2)*s*n+3*u*Math.pow(s,2)*i+Math.pow(s,3)*o,y:Math.pow(u,3)*e+3*Math.pow(u,2)*s*r+3*u*Math.pow(s,2)*a+Math.pow(s,3)*l}}(t,e,n,r,i,a,o,l,E/g)).x,x=c.y,h&&M.push({x:b,y:x}),p&&(O+=eH(k,[b,x])),k=[b,x],v&&O>=s&&s>w[2]){var A=(O-s)/(O-w[2]);_={x:k[0]*(1-A)+w[0]*A,y:k[1]*(1-A)+w[1]*A}}w=[b,x,O]}return v&&s>=O&&(_={x:o,y:l}),{length:O,point:_,min:{x:Math.min.apply(null,M.map(function(t){return t.x})),y:Math.min.apply(null,M.map(function(t){return t.y}))},max:{x:Math.max.apply(null,M.map(function(t){return t.x})),y:Math.max.apply(null,M.map(function(t){return t.y}))}}}function nl(t,e,n){for(var r,i,a,o,l,s,u,c,f,h=nn(t),d="number"==typeof e,p=[],y=0,g=0,v=0,b=0,x=[],O=[],w=0,k={x:0,y:0},_=k,M=k,E=k,A=0,S=0,j=h.length;S<j;S+=1)p=(u="M"===(c=(f=h[S])[0]))?p:[y,g].concat(f.slice(1)),u?(_=k={x:v=f[1],y:b=f[2]},w=0,d&&e<.001&&(E=k)):"L"===c?(w=(r=ni(p[0],p[1],p[2],p[3],(e||0)-A)).length,k=r.min,_=r.max,M=r.point):"A"===c?(w=(i=function(t,e,n,r,i,a,o,l,s,u,c){var f,h=c.bbox,d=void 0===h||h,p=c.length,y=void 0===p||p,g=c.sampleSize,v=void 0===g?30:g,b="number"==typeof u,x=t,O=e,w=0,k=[x,O,0],_=[x,O],M={x:0,y:0},E=[{x:x,y:O}];b&&u<=0&&(M={x:x,y:O});for(var A=0;A<=v;A+=1){if(x=(f=function(t,e,n,r,i,a,o,l,s,u){var c=Math.abs,f=Math.sin,h=Math.cos,d=Math.sqrt,p=Math.PI,y=c(n),g=c(r),v=p/180*((i%360+360)%360);if(t===l&&e===s)return{x:t,y:e};if(0===y||0===g)return ni(t,e,l,s,u).point;var b=(t-l)/2,x=(e-s)/2,O={x:h(v)*b+f(v)*x,y:-f(v)*b+h(v)*x},w=Math.pow(O.x,2)/Math.pow(y,2)+Math.pow(O.y,2)/Math.pow(g,2);w>1&&(y*=d(w),g*=d(w));var k=(Math.pow(y,2)*Math.pow(g,2)-Math.pow(y,2)*Math.pow(O.y,2)-Math.pow(g,2)*Math.pow(O.x,2))/(Math.pow(y,2)*Math.pow(O.y,2)+Math.pow(g,2)*Math.pow(O.x,2)),_=(a!==o?1:-1)*d(k=k<0?0:k),M={x:_*(y*O.y/g),y:_*(-(g*O.x)/y)},E={x:h(v)*M.x-f(v)*M.y+(t+l)/2,y:f(v)*M.x+h(v)*M.y+(e+s)/2},A={x:(O.x-M.x)/y,y:(O.y-M.y)/g},S=na({x:1,y:0},A),j=na(A,{x:(-O.x-M.x)/y,y:(-O.y-M.y)/g});!o&&j>0?j-=2*p:o&&j<0&&(j+=2*p);var P=S+(j%=2*p)*u,T=y*h(P),C=g*f(P);return{x:h(v)*T-f(v)*C+E.x,y:f(v)*T+h(v)*C+E.y}}(t,e,n,r,i,a,o,l,s,A/v)).x,O=f.y,d&&E.push({x:x,y:O}),y&&(w+=eH(_,[x,O])),_=[x,O],b&&w>=u&&u>k[2]){var S=(w-u)/(w-k[2]);M={x:_[0]*(1-S)+k[0]*S,y:_[1]*(1-S)+k[1]*S}}k=[x,O,w]}return b&&u>=w&&(M={x:l,y:s}),{length:w,point:M,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}))}}}(p[0],p[1],p[2],p[3],p[4],p[5],p[6],p[7],p[8],(e||0)-A,n||{})).length,k=i.min,_=i.max,M=i.point):"C"===c?(w=(a=no(p[0],p[1],p[2],p[3],p[4],p[5],p[6],p[7],(e||0)-A,n||{})).length,k=a.min,_=a.max,M=a.point):"Q"===c?(w=(o=function(t,e,n,r,i,a,o,l){var s,u=l.bbox,c=void 0===u||u,f=l.length,h=void 0===f||f,d=l.sampleSize,p=void 0===d?10:d,y="number"==typeof o,g=t,v=e,b=0,x=[g,v,0],O=[g,v],w={x:0,y:0},k=[{x:g,y:v}];y&&o<=0&&(w={x:g,y:v});for(var _=0;_<=p;_+=1){if(g=(s=function(t,e,n,r,i,a,o){var l=1-o;return{x:Math.pow(l,2)*t+2*l*o*n+Math.pow(o,2)*i,y:Math.pow(l,2)*e+2*l*o*r+Math.pow(o,2)*a}}(t,e,n,r,i,a,_/p)).x,v=s.y,c&&k.push({x:g,y:v}),h&&(b+=eH(O,[g,v])),O=[g,v],y&&b>=o&&o>x[2]){var M=(b-o)/(b-x[2]);w={x:O[0]*(1-M)+x[0]*M,y:O[1]*(1-M)+x[1]*M}}x=[g,v,b]}return y&&o>=b&&(w={x:i,y:a}),{length:b,point:w,min:{x:Math.min.apply(null,k.map(function(t){return t.x})),y:Math.min.apply(null,k.map(function(t){return t.y}))},max:{x:Math.max.apply(null,k.map(function(t){return t.x})),y:Math.max.apply(null,k.map(function(t){return t.y}))}}}(p[0],p[1],p[2],p[3],p[4],p[5],(e||0)-A,n||{})).length,k=o.min,_=o.max,M=o.point):"Z"===c&&(w=(l=ni((p=[y,g,v,b])[0],p[1],p[2],p[3],(e||0)-A)).length,k=l.min,_=l.max,M=l.point),d&&A<e&&A+w>=e&&(E=M),O.push(_),x.push(k),A+=w,y=(s="Z"!==c?f.slice(-2):[v,b])[0],g=s[1];return d&&e>=A&&(E={x:y,y:g}),{length:A,point:E,min:{x:Math.min.apply(null,x.map(function(t){return t.x})),y:Math.min.apply(null,x.map(function(t){return t.y}))},max:{x:Math.max.apply(null,O.map(function(t){return t.x})),y:Math.max.apply(null,O.map(function(t){return t.y}))}}}function ns(t){return Array.isArray(t)}let nu=function(t){if(ns(t))return t.reduce(function(t,e){return Math.min(t,e)},t[0])};function nc(t){if(!Array.isArray(t))return-1/0;var e=t.length;if(!e)return-1/0;for(var n=t[0],r=1;r<e;r++)n=Math.max(n,t[r]);return n}function nf(t,e,n){return void 0===n&&(n=1e-5),t===e||Math.abs(t-e)<n}let nh=function(t,e){return(t%e+e)%e};function nd(t,e,n){return{x:t*Math.cos(n)-e*Math.sin(n),y:t*Math.sin(n)+e*Math.cos(n)}}function np(t,e,n,r,i,a,o,l,s,u){var c,f,h,d,p,y=t,g=e,v=n,b=r,x=l,O=s,w=120*Math.PI/180,k=Math.PI/180*(+i||0),_=[];if(u)f=u[0],h=u[1],d=u[2],p=u[3];else{y=(c=nd(y,g,-k)).x,g=c.y,x=(c=nd(x,O,-k)).x,O=c.y;var M=(y-x)/2,E=(g-O)/2,A=M*M/(v*v)+E*E/(b*b);A>1&&(v*=A=Math.sqrt(A),b*=A);var S=v*v,j=b*b,P=(a===o?-1:1)*Math.sqrt(Math.abs((S*j-S*E*E-j*M*M)/(S*E*E+j*M*M)));d=P*v*E/b+(y+x)/2,p=-(P*b)*M/v+(g+O)/2,f=Math.asin(((g-p)/b*1e9|0)/1e9),h=Math.asin(((O-p)/b*1e9|0)/1e9),f=y<d?Math.PI-f:f,h=x<d?Math.PI-h:h,f<0&&(f=2*Math.PI+f),h<0&&(h=2*Math.PI+h),o&&f>h&&(f-=2*Math.PI),!o&&h>f&&(h-=2*Math.PI)}var T=h-f;if(Math.abs(T)>w){var C=h,N=x,L=O;_=np(x=d+v*Math.cos(h=f+w*(o&&h>f?1:-1)),O=p+b*Math.sin(h),v,b,i,0,o,N,L,[h,C,d,p])}T=h-f;var I=Math.cos(f),R=Math.cos(h),D=Math.tan(T/4),B=4/3*v*D,F=4/3*b*D,z=[y,g],$=[y+B*Math.sin(f),g-F*I],W=[x+B*Math.sin(h),O-F*R],G=[x,O];if($[0]=2*z[0]-$[0],$[1]=2*z[1]-$[1],u)return $.concat(W,G,_);_=$.concat(W,G,_);for(var q=[],H=0,Y=_.length;H<Y;H+=1)q[H]=H%2?nd(_[H-1],_[H],k).y:nd(_[H],_[H+1],k).x;return q}var ny=function(t,e,n,r){return e1(e1([],nr([t,e],[n,r],.5),!0),[n,r,n,r],!1)};function ng(t,e){if(void 0===e&&(e=!1),e6(t)&&t.every(function(t){var e=t[0];return"MC".includes(e)})){var n,r,i=[].concat(t);return e?[i,[]]:i}for(var a=nn(t),o=eZ({},e8),l=[],s="",u=a.length,c=[],f=0;f<u;f+=1){a[f]&&(s=a[f][0]),l[f]=s;var h=function(t,e){var n,r,i,a,o,l,s,u=t[0],c=t.slice(1).map(Number),f=c[0],h=c[1],d=e.x1,p=e.y1,y=e.x,g=e.y;switch(!"TQ".includes(u)&&(e.qx=null,e.qy=null),u){case"M":e.x=f,e.y=h;break;case"A":return["C"].concat(np((s=[d,p].concat(c))[0],s[1],s[2],s[3],s[4],s[5],s[6],s[7],s[8],s[9]));case"Q":return e.qx=f,e.qy=h,["C"].concat((n=(s=[d,p].concat(c))[0],r=s[1],i=s[2],a=s[3],o=s[4],l=s[5],[1/3*n+2/3*i,1/3*r+2/3*a,1/3*o+2/3*i,1/3*l+2/3*a,o,l]));case"L":return["C"].concat(ny(d,p,f,h));case"Z":if(d===y&&p===g)return["C",d,p,y,g,y,g];return["C"].concat(ny(d,p,y,g))}return t}(a[f],o);a[f]=h,function(t,e,n){if(t[n].length>7){t[n].shift();for(var r=t[n],i=n;r.length;)e[n]="A",t.splice(i+=1,0,["C"].concat(r.splice(0,6)));t.splice(n,1)}}(a,l,f),u=a.length,"Z"===s&&c.push(f),r=(n=a[f]).length,o.x1=+n[r-2],o.y1=+n[r-1],o.x2=+n[r-4]||o.x1,o.y2=+n[r-3]||o.y1}return e?[a,c]:a}function nv(t){return t.map(function(t,e,n){var r,i,a,o,l,s,u,c,f,h,d,p,y=e&&n[e-1].slice(-2).concat(t.slice(1)),g=e?no(y[0],y[1],y[2],y[3],y[4],y[5],y[6],y[7],y[8],{bbox:!1}).length:0;return p=e?g?(void 0===r&&(r=.5),i=y.slice(0,2),a=y.slice(2,4),o=y.slice(4,6),l=y.slice(6,8),s=nr(i,a,r),u=nr(a,o,r),c=nr(o,l,r),f=nr(s,u,r),h=nr(u,c,r),d=nr(f,h,r),[["C"].concat(s,f,d),["C"].concat(h,c,l)]):[t,t]:[t],{s:t,ss:p,l:g}})}function nm(t){var e,n,r;return e=0,n=0,r=0,ng(t).map(function(t){if("M"===t[0])return e=t[1],n=t[2],0;var i,a,o,l=t.slice(1),s=l[0],u=l[1],c=l[2],f=l[3],h=l[4],d=l[5];return a=e,r=3*((d-(o=n))*(s+c)-(h-a)*(u+f)+u*(a-c)-s*(o-f)+d*(c+a/3)-h*(f+o/3))/20,e=(i=t.slice(-2))[0],n=i[1],r}).reduce(function(t,e){return t+e},0)>=0}let nb=function(t){return void 0===t};var nx={}.toString;let nO=function(t,e){return nx.call(t)==="[object "+e+"]"},nw=function(t){return nO(t,"Boolean")};function nk(t){return"function"==typeof t}let n_=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e};var nM=n(2930),nE=n(5923);function nA(){return(nA="u">typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!({}).hasOwnProperty.call(t,e)&&null!==(t=(0,nE.A)(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(null,arguments)}function nS(t,e,n,r){var i=nA((0,nE.A)(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function nj(t,e,n,r){var i=t-n,a=e-r;return Math.sqrt(i*i+a*a)}function nP(t,e){var n=Math.min.apply(Math,(0,tw.A)(t)),r=Math.min.apply(Math,(0,tw.A)(e));return{x:n,y:r,width:Math.max.apply(Math,(0,tw.A)(t))-n,height:Math.max.apply(Math,(0,tw.A)(e))-r}}function nT(t,e,n,r,i,a){var o=-1,l=1/0,s=[n,r],u=20;a&&a>200&&(u=a/10);for(var c=1/u,f=c/10,h=0;h<=u;h++){var d=h*c,p=[i.apply(void 0,(0,tw.A)(t.concat([d]))),i.apply(void 0,(0,tw.A)(e.concat([d])))],y=nj(s[0],s[1],p[0],p[1]);y<l&&(o=d,l=y)}if(0===o)return{x:t[0],y:e[0]};if(1===o){var g=t.length;return{x:t[g-1],y:e[g-1]}}l=1/0;for(var v=0;v<32&&!(f<1e-4);v++){var b=o-f,x=o+f,O=[i.apply(void 0,(0,tw.A)(t.concat([b]))),i.apply(void 0,(0,tw.A)(e.concat([b])))],w=nj(s[0],s[1],O[0],O[1]);if(b>=0&&w<l)o=b,l=w;else{var k=[i.apply(void 0,(0,tw.A)(t.concat([x]))),i.apply(void 0,(0,tw.A)(e.concat([x])))],_=nj(s[0],s[1],k[0],k[1]);x<=1&&_<l?(o=x,l=_):f*=.5}}return{x:i.apply(void 0,(0,tw.A)(t.concat([o]))),y:i.apply(void 0,(0,tw.A)(e.concat([o])))}}function nC(t,e,n,r,i){return{x:(1-i)*t+i*n,y:(1-i)*e+i*r}}function nN(t,e,n,r,i){var a=1-i;return a*a*a*t+3*e*i*a*a+3*n*i*i*a+r*i*i*i}function nL(t,e,n,r){var i,a,o,l=-3*t+9*e-9*n+3*r,s=6*t-12*e+6*n,u=3*e-3*t,c=[];if(nf(l,0))!nf(s,0)&&(i=-u/s)>=0&&i<=1&&c.push(i);else{var f=s*s-4*l*u;nf(f,0)?c.push(-s/(2*l)):f>0&&(i=(-s+(o=Math.sqrt(f)))/(2*l),a=(-s-o)/(2*l),i>=0&&i<=1&&c.push(i),a>=0&&a<=1&&c.push(a))}return c}function nI(t,e,n,r,i,a,o,l,s,u,c){var f=nT([t,n,i,o],[e,r,a,l],s,u,nN,c);return nj(f.x,f.y,s,u)}function nR(t,e,n,r){var i=1-r;return i*i*t+2*r*i*e+r*r*n}function nD(t,e,n){var r=t+n-2*e;if(nf(r,0))return[.5];var i=(t-e)/r;return i<=1&&i>=0?[i]:[]}var nB=n(9575),nF=n(2450),nz=n(4710),n$=n(1370),nW=("u">typeof globalThis||("u">typeof window?window:void 0!==n.g?n.g:"u">typeof self&&self),{exports:{}});nW.exports=function(){function t(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function e(t,e){return t<e?-1:+(t>e)}var n=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function r(t,e){i(t,0,t.children.length,e,t)}function i(t,e,n,r,i){i||(i=h(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(var o=e;o<n;o++){var l=t.children[o];a(i,t.leaf?r(l):l)}return i}function a(t,e){return t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),t}function o(t,e){return t.minX-e.minX}function l(t,e){return t.minY-e.minY}function s(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function u(t){return t.maxX-t.minX+(t.maxY-t.minY)}function c(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function f(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function h(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function d(n,r,i,a,o){for(var l=[r,i];l.length;)if(!((i=l.pop())-(r=l.pop())<=a)){var s=r+Math.ceil((i-r)/a/2)*a;(function e(n,r,i,a,o){for(;a>i;){if(a-i>600){var l=a-i+1,s=r-i+1,u=Math.log(l),c=.5*Math.exp(2*u/3),f=.5*Math.sqrt(u*c*(l-c)/l)*(s-l/2<0?-1:1),h=Math.max(i,Math.floor(r-s*c/l+f)),d=Math.min(a,Math.floor(r+(l-s)*c/l+f));e(n,r,h,d,o)}var p=n[r],y=i,g=a;for(t(n,i,r),o(n[a],p)>0&&t(n,i,a);y<g;){for(t(n,y,g),y++,g--;0>o(n[y],p);)y++;for(;o(n[g],p)>0;)g--}0===o(n[i],p)?t(n,i,g):t(n,++g,a),g<=r&&(i=g+1),r<=g&&(a=g-1)}})(n,s,r||0,i||n.length-1,o||e),l.push(r,s,s,i)}}return n.prototype.all=function(){return this._all(this.data,[])},n.prototype.search=function(t){var e=this.data,n=[];if(!f(t,e))return n;for(var r=this.toBBox,i=[];e;){for(var a=0;a<e.children.length;a++){var o=e.children[a],l=e.leaf?r(o):o;f(t,l)&&(e.leaf?n.push(o):c(t,l)?this._all(o,n):i.push(o))}e=i.pop()}return n},n.prototype.collides=function(t){var e=this.data;if(!f(t,e))return!1;for(var n=[];e;){for(var r=0;r<e.children.length;r++){var i=e.children[r],a=e.leaf?this.toBBox(i):i;if(f(t,a)){if(e.leaf||c(t,a))return!0;n.push(i)}}e=n.pop()}return!1},n.prototype.load=function(t){if(!(t&&t.length))return this;if(t.length<this._minEntries){for(var e=0;e<t.length;e++)this.insert(t[e]);return this}var n=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){var r=this.data;this.data=n,n=r}this._insert(n,this.data.height-n.height-1,!0)}else this.data=n;return this},n.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},n.prototype.clear=function(){return this.data=h([]),this},n.prototype.remove=function(t,e){if(!t)return this;for(var n,r,i,a=this.data,o=this.toBBox(t),l=[],s=[];a||l.length;){if(a||(a=l.pop(),r=l[l.length-1],n=s.pop(),i=!0),a.leaf){var u=function(t,e,n){if(!n)return e.indexOf(t);for(var r=0;r<e.length;r++)if(n(t,e[r]))return r;return -1}(t,a.children,e);if(-1!==u){a.children.splice(u,1),l.push(a),this._condense(l);break}}!i&&!a.leaf&&c(a,o)?(l.push(a),s.push(n),n=0,r=a,a=a.children[0]):r?(n++,a=r.children[n],i=!1):a=null}return this},n.prototype.toBBox=function(t){return t},n.prototype.compareMinX=function(t,e){return t.minX-e.minX},n.prototype.compareMinY=function(t,e){return t.minY-e.minY},n.prototype.toJSON=function(){return this.data},n.prototype.fromJSON=function(t){return this.data=t,this},n.prototype._all=function(t,e){for(var n=[];t;)t.leaf?e.push.apply(e,t.children):n.push.apply(n,t.children),t=n.pop();return e},n.prototype._build=function(t,e,n,i){var a,o=n-e+1,l=this._maxEntries;if(o<=l)return r(a=h(t.slice(e,n+1)),this.toBBox),a;i||(i=Math.ceil(Math.log(o)/Math.log(l)),l=Math.ceil(o/Math.pow(l,i-1))),(a=h([])).leaf=!1,a.height=i;var s=Math.ceil(o/l),u=s*Math.ceil(Math.sqrt(l));d(t,e,n,u,this.compareMinX);for(var c=e;c<=n;c+=u){var f=Math.min(c+u-1,n);d(t,c,f,s,this.compareMinY);for(var p=c;p<=f;p+=s){var y=Math.min(p+s-1,f);a.children.push(this._build(t,p,y,i-1))}}return r(a,this.toBBox),a},n.prototype._chooseSubtree=function(t,e,n,r){for(;r.push(e),!e.leaf&&r.length-1!==n;){for(var i=1/0,a=1/0,o=void 0,l=0;l<e.children.length;l++){var u,c,f=e.children[l],h=s(f),d=(u=t,(Math.max((c=f).maxX,u.maxX)-Math.min(c.minX,u.minX))*(Math.max(c.maxY,u.maxY)-Math.min(c.minY,u.minY))-h);d<a?(a=d,i=h<i?h:i,o=f):d===a&&h<i&&(i=h,o=f)}e=o||e.children[0]}return e},n.prototype._insert=function(t,e,n){var r=n?t:this.toBBox(t),i=[],o=this._chooseSubtree(r,this.data,e,i);for(o.children.push(t),a(o,r);e>=0;)if(i[e].children.length>this._maxEntries)this._split(i,e),e--;else break;this._adjustParentBBoxes(r,i,e)},n.prototype._split=function(t,e){var n=t[e],i=n.children.length,a=this._minEntries;this._chooseSplitAxis(n,a,i);var o=this._chooseSplitIndex(n,a,i),l=h(n.children.splice(o,n.children.length-o));l.height=n.height,l.leaf=n.leaf,r(n,this.toBBox),r(l,this.toBBox),e?t[e-1].children.push(l):this._splitRoot(n,l)},n.prototype._splitRoot=function(t,e){this.data=h([t,e]),this.data.height=t.height+1,this.data.leaf=!1,r(this.data,this.toBBox)},n.prototype._chooseSplitIndex=function(t,e,n){for(var r,a=1/0,o=1/0,l=e;l<=n-e;l++){var u=i(t,0,l,this.toBBox),c=i(t,l,n,this.toBBox),f=function(t,e){var n=Math.max(t.minX,e.minX),r=Math.max(t.minY,e.minY);return Math.max(0,Math.min(t.maxX,e.maxX)-n)*Math.max(0,Math.min(t.maxY,e.maxY)-r)}(u,c),h=s(u)+s(c);f<a?(a=f,r=l,o=h<o?h:o):f===a&&h<o&&(o=h,r=l)}return r||n-e},n.prototype._chooseSplitAxis=function(t,e,n){var r=t.leaf?this.compareMinX:o,i=t.leaf?this.compareMinY:l;this._allDistMargin(t,e,n,r)<this._allDistMargin(t,e,n,i)&&t.children.sort(r)},n.prototype._allDistMargin=function(t,e,n,r){t.children.sort(r);for(var o=this.toBBox,l=i(t,0,e,o),s=i(t,n-e,n,o),c=u(l)+u(s),f=e;f<n-e;f++){var h=t.children[f];a(l,t.leaf?o(h):h),c+=u(l)}for(var d=n-e-1;d>=e;d--){var p=t.children[d];a(s,t.leaf?o(p):p),c+=u(s)}return c},n.prototype._adjustParentBBoxes=function(t,e,n){for(var r=n;r>=0;r--)a(e[r],t)},n.prototype._condense=function(t){for(var e=t.length-1,n=void 0;e>=0;e--)0===t[e].children.length?e>0?(n=t[e-1].children).splice(n.indexOf(t[e]),1):this.clear():r(t[e],this.toBBox)},n}();var nG=nW.exports,nq=((MH={}).GROUP="g",MH.FRAGMENT="fragment",MH.CIRCLE="circle",MH.ELLIPSE="ellipse",MH.IMAGE="image",MH.RECT="rect",MH.LINE="line",MH.POLYLINE="polyline",MH.POLYGON="polygon",MH.TEXT="text",MH.PATH="path",MH.HTML="html",MH.MESH="mesh",MH),nH=((MY={})[MY.ZERO=0]="ZERO",MY[MY.NEGATIVE_ONE=1]="NEGATIVE_ONE",MY),nY=(0,tO.A)(function t(){(0,tx.A)(this,t),this.plugins=[]},[{key:"addRenderingPlugin",value:function(t){this.plugins.push(t),this.context.renderingPlugins.push(t)}},{key:"removeAllRenderingPlugins",value:function(){var t=this;this.plugins.forEach(function(e){var n=t.context.renderingPlugins.indexOf(e);n>=0&&t.context.renderingPlugins.splice(n,1)})}}]),nV=(0,tO.A)(function t(e){(0,tx.A)(this,t),this.clipSpaceNearZ=nH.NEGATIVE_ONE,this.plugins=[],this.config=(0,tb.A)({enableDirtyCheck:!0,enableCulling:!1,enableAutoRendering:!0,enableDirtyRectangleRendering:!0,enableDirtyRectangleRenderingDebug:!1,enableSizeAttenuation:!0,enableRenderingOptimization:!1},e)},[{key:"registerPlugin",value:function(t){-1===this.plugins.findIndex(function(e){return e===t})&&this.plugins.push(t)}},{key:"unregisterPlugin",value:function(t){var e=this.plugins.findIndex(function(e){return e===t});e>-1&&this.plugins.splice(e,1)}},{key:"getPlugins",value:function(){return this.plugins}},{key:"getPlugin",value:function(t){return this.plugins.find(function(e){return e.name===t})}},{key:"getConfig",value:function(){return this.config}},{key:"setConfig",value:function(t){Object.assign(this.config,t)}}]),nU=function(){function t(){(0,tx.A)(this,t),this.center=[0,0,0],this.halfExtents=[0,0,0],this.min=[0,0,0],this.max=[0,0,0]}return(0,tO.A)(t,[{key:"update",value:function(t,e){tC(this.center,t),tC(this.halfExtents,e),tI(this.min,this.center,this.halfExtents),tL(this.max,this.center,this.halfExtents)}},{key:"setMinMax",value:function(t,e){tL(this.center,e,t),tR(this.center,this.center,.5),tI(this.halfExtents,e,t),tR(this.halfExtents,this.halfExtents,.5),tC(this.min,t),tC(this.max,e)}},{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))return void this.setMinMax(e.getMin(),e.getMax());var n=this.center,r=n[0],i=n[1],a=n[2],o=this.halfExtents,l=o[0],s=o[1],u=o[2],c=r-l,f=r+l,h=i-s,d=i+s,p=a-u,y=a+u,g=e.center,v=g[0],b=g[1],x=g[2],O=e.halfExtents,w=O[0],k=O[1],_=O[2],M=v-w,E=v+w,A=b-k,S=b+k,j=x-_,P=x+_;M<c&&(c=M),E>f&&(f=E),A<h&&(h=A),S>d&&(d=S),j<p&&(p=j),P>y&&(y=P),n[0]=(c+f)*.5,n[1]=(h+d)*.5,n[2]=(p+y)*.5,o[0]=(f-c)*.5,o[1]=(d-h)*.5,o[2]=(y-p)*.5,this.min[0]=c,this.min[1]=h,this.min[2]=p,this.max[0]=f,this.max[1]=d,this.max[2]=y}}},{key:"setFromTransformedAABB",value:function(t,e){var n=this.center,r=this.halfExtents,i=t.center,a=t.halfExtents,o=e[0],l=e[4],s=e[8],u=e[1],c=e[5],f=e[9],h=e[2],d=e[6],p=e[10],y=Math.abs(o),g=Math.abs(l),v=Math.abs(s),b=Math.abs(u),x=Math.abs(c),O=Math.abs(f),w=Math.abs(h),k=Math.abs(d),_=Math.abs(p);n[0]=e[12]+o*i[0]+l*i[1]+s*i[2],n[1]=e[13]+u*i[0]+c*i[1]+f*i[2],n[2]=e[14]+h*i[0]+d*i[1]+p*i[2],r[0]=y*a[0]+g*a[1]+v*a[2],r[1]=b*a[0]+x*a[1]+O*a[2],r[2]=w*a[0]+k*a[1]+_*a[2],tI(this.min,n,r),tL(this.max,n,r)}},{key:"intersects",value:function(t){var e=this.getMax(),n=this.getMin(),r=t.getMax(),i=t.getMin();return n[0]<=r[0]&&e[0]>=i[0]&&n[1]<=r[1]&&e[1]>=i[1]&&n[2]<=r[2]&&e[2]>=i[2]}},{key:"intersection",value:function(e){if(!this.intersects(e))return null;var n,r,i,a,o,l,s=new t,u=(n=[0,0,0],r=this.getMin(),i=e.getMin(),n[0]=Math.max(r[0],i[0]),n[1]=Math.max(r[1],i[1]),n[2]=Math.max(r[2],i[2]),n),c=(a=[0,0,0],o=this.getMax(),l=e.getMax(),a[0]=Math.min(o[0],l[0]),a[1]=Math.min(o[1],l[1]),a[2]=Math.min(o[2],l[2]),a);return s.setMinMax(u,c),s}},{key:"getNegativeFarPoint",value:function(t){return 273===t.pnVertexFlag?tC([0,0,0],this.min):272===t.pnVertexFlag?[this.min[0],this.min[1],this.max[2]]:257===t.pnVertexFlag?[this.min[0],this.max[1],this.min[2]]:256===t.pnVertexFlag?[this.min[0],this.max[1],this.max[2]]:17===t.pnVertexFlag?[this.max[0],this.min[1],this.min[2]]:16===t.pnVertexFlag?[this.max[0],this.min[1],this.max[2]]:1===t.pnVertexFlag?[this.max[0],this.max[1],this.min[2]]:[this.max[0],this.max[1],this.max[2]]}},{key:"getPositiveFarPoint",value:function(t){return 273===t.pnVertexFlag?tC([0,0,0],this.max):272===t.pnVertexFlag?[this.max[0],this.max[1],this.min[2]]:257===t.pnVertexFlag?[this.max[0],this.min[1],this.max[2]]:256===t.pnVertexFlag?[this.max[0],this.min[1],this.min[2]]:17===t.pnVertexFlag?[this.min[0],this.max[1],this.max[2]]:16===t.pnVertexFlag?[this.min[0],this.max[1],this.min[2]]:1===t.pnVertexFlag?[this.min[0],this.min[1],this.max[2]]:[this.min[0],this.min[1],this.min[2]]}}],[{key:"isEmpty",value:function(t){return!t||0===t.halfExtents[0]&&0===t.halfExtents[1]&&0===t.halfExtents[2]}}])}(),nX=(0,tO.A)(function t(e,n){(0,tx.A)(this,t),this.distance=e||0,this.normal=n||tT(0,1,0),this.updatePNVertexFlag()},[{key:"updatePNVertexFlag",value:function(){this.pnVertexFlag=(Number(this.normal[0]>=0)<<8)+(Number(this.normal[1]>=0)<<4)+Number(this.normal[2]>=0)}},{key:"distanceToPoint",value:function(t){return tB(t,this.normal)-this.distance}},{key:"normalize",value:function(){var t=1/tP(this.normal);tR(this.normal,this.normal,t),this.distance*=t}},{key:"intersectsLine",value:function(t,e,n){var r=this.distanceToPoint(t),i=r/(r-this.distanceToPoint(e)),a=i>=0&&i<=1;return a&&n&&tF(n,t,e,i),a}}]),nK=((MV={})[MV.OUTSIDE=0xffffffff]="OUTSIDE",MV[MV.INSIDE=0]="INSIDE",MV[MV.INDETERMINATE=0x7fffffff]="INDETERMINATE",MV),nZ=(0,tO.A)(function t(e){if((0,tx.A)(this,t),this.planes=[],e)this.planes=e;else for(var n=0;n<6;n++)this.planes.push(new nX)},[{key:"extractFromVPMatrix",value:function(t){var e=(0,tM.A)(t,16),n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],l=e[5],s=e[6],u=e[7],c=e[8],f=e[9],h=e[10],d=e[11],p=e[12],y=e[13],g=e[14],v=e[15];tN(this.planes[0].normal,a-n,u-o,d-c),this.planes[0].distance=v-p,tN(this.planes[1].normal,a+n,u+o,d+c),this.planes[1].distance=v+p,tN(this.planes[2].normal,a+r,u+l,d+f),this.planes[2].distance=v+y,tN(this.planes[3].normal,a-r,u-l,d-f),this.planes[3].distance=v-y,tN(this.planes[4].normal,a-i,u-s,d-h),this.planes[4].distance=v-g,tN(this.planes[5].normal,a+i,u+s,d+h),this.planes[5].distance=v+g,this.planes.forEach(function(t){t.normalize(),t.updatePNVertexFlag()})}}]),nQ=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;(0,tx.A)(this,t),this.x=0,this.y=0,this.x=e,this.y=n}return(0,tO.A)(t,[{key:"clone",value:function(){return new t(this.x,this.y)}},{key:"copyFrom",value:function(t){this.x=t.x,this.y=t.y}}])}(),nJ=function(){function t(e,n,r,i){(0,tx.A)(this,t),this.x=e,this.y=n,this.width=r,this.height=i,this.left=e,this.right=e+r,this.top=n,this.bottom=n+i}return(0,tO.A)(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,n){var r=tq(e.x,e.y,0,1),i=tq(e.x+e.width,e.y,0,1),a=tq(e.x,e.y+e.height,0,1),o=tq(e.x+e.width,e.y+e.height,0,1),l=tG(),s=tG(),u=tG(),c=tG();tH(l,r,n),tH(s,i,n),tH(u,a,n),tH(c,o,n);var f=Math.min(l[0],s[0],u[0],c[0]),h=Math.min(l[1],s[1],u[1],c[1]),d=Math.max(l[0],s[0],u[0],c[0]),p=Math.max(l[1],s[1],u[1],c[1]);return t.fromRect({x:f,y:h,width:d-f,height:p-h})}}])}(),n0="Method not implemented.",n1="Use document.documentElement instead.";function n2(t){return void 0===t?0:t>360||t<-360?t%360:t}var n5=tS();function n3(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=!(arguments.length>3)||void 0===arguments[3]||arguments[3];return Array.isArray(t)&&3===t.length?r?tj(t):tC(n5,t):eq(t)?r?tT(t,e,n):tN(n5,t,e,n):r?tT(t[0],t[1]||e,t[2]||n):tN(n5,t[0],t[1]||e,t[2]||n)}var n4=Math.PI/180,n6=180/Math.PI,n8=Math.PI/2;function n9(t,e){var n,r,i,a,o,l,s,u,c,f,h,d,p,y,g,v,b;return 16===e.length?(i=es(tS(),e),o=(a=(0,tM.A)(i,3))[0],l=a[1],s=a[2],(u=Math.asin(-e[2]/o))<n8?u>-n8?(n=Math.atan2(e[6]/l,e[10]/s),r=Math.atan2(e[1]/o,e[0]/o)):(r=0,n=-Math.atan2(e[4]/l,e[5]/l)):(r=0,n=Math.atan2(e[4]/l,e[5]/l)),t[0]=n,t[1]=u,t[2]=r,t):(c=e[0],f=e[1],h=e[2],d=e[3],v=c*c+(p=f*f)+(y=h*h)+(g=d*d),(b=c*d-f*h)>.499995*v?(t[0]=n8,t[1]=2*Math.atan2(f,c),t[2]=0):b<-.499995*v?(t[0]=-n8,t[1]=2*Math.atan2(f,c),t[2]=0):(t[0]=Math.asin(2*(c*h-d*f)),t[1]=Math.atan2(2*(c*d+f*h),1-2*(y+g)),t[2]=Math.atan2(2*(c*f+h*d),1-2*(p+y))),t)}function n7(t){var e=t[0],n=t[1],r=t[3],i=t[4],a=Math.sqrt(e*e+n*n),o=Math.sqrt(r*r+i*i);if(e*i-n*r<0&&(e<i?a=-a:o=-o),a){var l=1/a;e*=l,n*=l}if(o){var s=1/o;r*=s,i*=s}var u=Math.atan2(n,e)*n6;return[t[6],t[7],a,o,u]}var rt=tY(),re=tY(),rn=tG(),rr=[tS(),tS(),tS()],ri=tS();function ra(t,e,n,r,i){t[0]=e[0]*r+n[0]*i,t[1]=e[1]*r+n[1]*i,t[2]=e[2]*r+n[2]*i}var ro=((MU={})[MU.ORBITING=0]="ORBITING",MU[MU.EXPLORING=1]="EXPLORING",MU[MU.TRACKING=2]="TRACKING",MU),rl=((MX={})[MX.DEFAULT=0]="DEFAULT",MX[MX.ROTATIONAL=1]="ROTATIONAL",MX[MX.TRANSLATIONAL=2]="TRANSLATIONAL",MX[MX.CINEMATIC=3]="CINEMATIC",MX),rs=((MK={})[MK.ORTHOGRAPHIC=0]="ORTHOGRAPHIC",MK[MK.PERSPECTIVE=1]="PERSPECTIVE",MK),ru="updated",rc=(0,tO.A)(function t(){(0,tx.A)(this,t),this.clipSpaceNearZ=nH.NEGATIVE_ONE,this.eventEmitter=new tE,this.matrix=tY(),this.right=tT(1,0,0),this.up=tT(0,1,0),this.forward=tT(0,0,1),this.position=tT(0,0,1),this.focalPoint=tT(0,0,0),this.distanceVector=tT(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=tY(),this.projectionMatrixInverse=tY(),this.jitteredProjectionMatrix=void 0,this.enableUpdate=!0,this.type=ro.EXPLORING,this.trackingMode=rl.DEFAULT,this.projectionMode=rs.PERSPECTIVE,this.frustum=new nZ,this.orthoMatrix=tY()},[{key:"isOrtho",value:function(){return this.projectionMode===rs.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(t){this.enableUpdate=t}},{key:"setType",value:function(t,e){return this.type=t,this.type===ro.EXPLORING?this.setWorldRotation(!0):this.setWorldRotation(!1),this._getAngles(),this.type===ro.TRACKING&&void 0!==e&&this.setTrackingMode(e),this}},{key:"setProjectionMode",value:function(t){return this.projectionMode=t,this}},{key:"setTrackingMode",value:function(t){if(this.type!==ro.TRACKING)throw Error("Impossible to set a tracking mode if the camera is not of tracking type");return this.trackingMode=t,this}},{key:"setWorldRotation",value:function(t){return this.rotateWorld=t,this._getAngles(),this}},{key:"getViewTransform",value:function(){return tJ(tY(),this.matrix)}},{key:"getWorldTransform",value:function(){return this.matrix}},{key:"jitterProjectionMatrix",value:function(t,e){var n=t7(tY(),[t,e,0]);this.jitteredProjectionMatrix=t2(tY(),n,this.projectionMatrix)}},{key:"clearJitterProjectionMatrix",value:function(){this.jitteredProjectionMatrix=void 0}},{key:"setMatrix",value:function(t){return this.matrix=t,this._update(),this}},{key:"setProjectionMatrix",value:function(t){this.projectionMatrix=t}},{key:"setFov",value:function(t){return this.setPerspective(this.near,this.far,t,this.aspect),this}},{key:"setAspect",value:function(t){return this.setPerspective(this.near,this.far,this.fov,t),this}},{key:"setNear",value:function(t){return this.projectionMode===rs.PERSPECTIVE?this.setPerspective(t,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,t,this.far),this}},{key:"setFar",value:function(t){return this.projectionMode===rs.PERSPECTIVE?this.setPerspective(this.near,t,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,t),this}},{key:"setViewOffset",value:function(t,e,n,r,i,a){return this.aspect=t/e,void 0===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=a,this.projectionMode===rs.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 void 0!==this.view&&(this.view.enabled=!1),this.projectionMode===rs.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(t){return this.zoom=t,this.projectionMode===rs.ORTHOGRAPHIC?this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far):this.projectionMode===rs.PERSPECTIVE&&this.setPerspective(this.near,this.far,this.fov,this.aspect),this}},{key:"setZoomByViewportPoint",value:function(t,e){var n=this.canvas.viewport2Canvas({x:e[0],y:e[1]}),r=n.x,i=n.y,a=this.roll;this.rotate(0,0,-a),this.setPosition(r,i),this.setFocalPoint(r,i),this.setZoom(t),this.rotate(0,0,a);var o=this.canvas.viewport2Canvas({x:e[0],y:e[1]}),l=tT(o.x-r,o.y-i,0),s=tB(l,this.right)/tP(this.right),u=tB(l,this.up)/tP(this.up),c=this.getPosition(),f=(0,tM.A)(c,2),h=f[0],d=f[1],p=this.getFocalPoint(),y=(0,tM.A)(p,2),g=y[0],v=y[1];return this.setPosition(h-s,d-u),this.setFocalPoint(g-s,v-u),this}},{key:"setPerspective",value:function(t,e,n,r){this.projectionMode=rs.PERSPECTIVE,this.fov=n,this.near=t,this.far=e,this.aspect=r;var i,a=this.near*Math.tan(.5*this.fov*n4)/this.zoom,o=2*a,l=this.aspect*o,s=-.5*l;if(null!=(i=this.view)&&i.enabled){var u=this.view.fullWidth,c=this.view.fullHeight;s+=this.view.offsetX*l/u,a-=this.view.offsetY*o/c,l*=this.view.width/u,o*=this.view.height/c}return!function(t,e,n,r,i,a,o){var l,s,u=arguments.length>7&&void 0!==arguments[7]&&arguments[7],c=2*a,f=n-e,h=r-i,d=o-a,p=o*a;u?(l=-o/d,s=-p/d):(l=-(o+a)/d,s=-2*p/d),t[0]=c/f,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=c/h,t[6]=0,t[7]=0,t[8]=(n+e)/f,t[9]=(r+i)/h,t[10]=l,t[11]=-1,t[12]=0,t[13]=0,t[14]=s,t[15]=0}(this.projectionMatrix,s,s+l,a-o,a,t,this.far,this.clipSpaceNearZ===nH.ZERO),tJ(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this}},{key:"setOrthographic",value:function(t,e,n,r,i,a){this.projectionMode=rs.ORTHOGRAPHIC,this.rright=e,this.left=t,this.top=n,this.bottom=r,this.near=i,this.far=a;var o,l=(this.rright-this.left)/(2*this.zoom),s=(this.top-this.bottom)/(2*this.zoom),u=(this.rright+this.left)/2,c=(this.top+this.bottom)/2,f=u-l,h=u+l,d=c+s,p=c-s;if(null!=(o=this.view)&&o.enabled){var y=(this.rright-this.left)/this.view.fullWidth/this.zoom,g=(this.top-this.bottom)/this.view.fullHeight/this.zoom;f+=y*this.view.offsetX,h=f+y*this.view.width,d-=g*this.view.offsetY,p=d-g*this.view.height}return this.clipSpaceNearZ===nH.NEGATIVE_ONE?ex(this.projectionMatrix,f,h,d,p,i,a):eO(this.projectionMatrix,f,h,d,p,i,a),tJ(this.projectionMatrixInverse,this.projectionMatrix),this._getOrthoMatrix(),this.triggerUpdate(),this}},{key:"setPosition",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.position[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.position[2],r=n3(t,e,n);return this._setPosition(r),this.setFocalPoint(this.focalPoint),this.triggerUpdate(),this}},{key:"setFocalPoint",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.focalPoint[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.focalPoint[2],r=tT(0,1,0);if(this.focalPoint=n3(t,e,n),this.trackingMode===rl.CINEMATIC){var i=tI(tS(),this.focalPoint,this.position);t=i[0],e=i[1],n=i[2];var a=Math.asin(e/tP(i))*n6,o=90+Math.atan2(n,t)*n6,l=tY();t8(l,l,o*n4),t6(l,l,a*n4),r=tz(tS(),[0,1,0],l)}return tJ(this.matrix,ew(tY(),this.position,this.focalPoint,r)),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(t){if(this.distance===t||t<0)return this;this.distance=t,this.distance<2e-4&&(this.distance=2e-4),this.dollyingStep=this.distance/100;var e=tS();t=this.distance;var n=this.forward,r=this.focalPoint;return e[0]=t*n[0]+r[0],e[1]=t*n[1]+r[1],e[2]=t*n[2]+r[2],this._setPosition(e),this.triggerUpdate(),this}},{key:"setMaxDistance",value:function(t){return this.maxDistance=t,this}},{key:"setMinDistance",value:function(t){return this.minDistance=t,this}},{key:"setAzimuth",value:function(t){return this.azimuth=n2(t),this.computeMatrix(),this._getAxes(),this.type===ro.ORBITING||this.type===ro.EXPLORING?this._getPosition():this.type===ro.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this}},{key:"getAzimuth",value:function(){return this.azimuth}},{key:"setElevation",value:function(t){return this.elevation=n2(t),this.computeMatrix(),this._getAxes(),this.type===ro.ORBITING||this.type===ro.EXPLORING?this._getPosition():this.type===ro.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this}},{key:"getElevation",value:function(){return this.elevation}},{key:"setRoll",value:function(t){return this.roll=n2(t),this.computeMatrix(),this._getAxes(),this.type===ro.ORBITING||this.type===ro.EXPLORING?this._getPosition():this.type===ro.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 t=eR(eI(),[0,0,1],this.roll*n4);tZ(this.matrix);var e=eR(eI(),[1,0,0],(this.rotateWorld&&this.type!==ro.TRACKING||this.type===ro.TRACKING?1:-1)*this.elevation*n4),n=eR(eI(),[0,1,0],(this.rotateWorld&&this.type!==ro.TRACKING||this.type===ro.TRACKING?1:-1)*this.azimuth*n4),r=eD(eI(),n,e);r=eD(eI(),r,t);var i=ed(tY(),r);this.type===ro.ORBITING||this.type===ro.EXPLORING?(t5(this.matrix,this.matrix,this.focalPoint),t2(this.matrix,this.matrix,i),t5(this.matrix,this.matrix,[0,0,this.distance])):this.type===ro.TRACKING&&(t5(this.matrix,this.matrix,this.position),t2(this.matrix,this.matrix,i))}},{key:"_setPosition",value:function(t,e,n){this.position=n3(t,e,n);var r=this.matrix;r[12]=this.position[0],r[13]=this.position[1],r[14]=this.position[2],r[15]=1,this._getOrthoMatrix()}},{key:"_getAxes",value:function(){tC(this.right,n3(tH(tG(),[1,0,0,0],this.matrix))),tC(this.up,n3(tH(tG(),[0,1,0,0],this.matrix))),tC(this.forward,n3(tH(tG(),[0,0,1,0],this.matrix))),tD(this.right,this.right),tD(this.up,this.up),tD(this.forward,this.forward)}},{key:"_getAngles",value:function(){var t=this.distanceVector[0],e=this.distanceVector[1],n=this.distanceVector[2],r=tP(this.distanceVector);if(0===r){this.elevation=0,this.azimuth=0;return}this.type===ro.TRACKING||this.rotateWorld?(this.elevation=Math.asin(e/r)*n6,this.azimuth=Math.atan2(-t,-n)*n6):(this.elevation=-(Math.asin(e/r)*n6),this.azimuth=-(Math.atan2(-t,-n)*n6))}},{key:"_getPosition",value:function(){tC(this.position,n3(tH(tG(),[0,0,0,1],this.matrix))),this._getDistance()}},{key:"_getFocalPoint",value:function(){var t,e,n,r,i,a,o;n=this.distanceVector,r=[0,0,-this.distance],t=eL(),e=this.matrix,t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],i=r[0],a=r[1],o=r[2],n[0]=i*m[0]+a*m[3]+o*m[6],n[1]=i*m[1]+a*m[4]+o*m[7],n[2]=i*m[2]+a*m[5]+o*m[8],tL(this.focalPoint,this.position,this.distanceVector),this._getDistance()}},{key:"_getDistance",value:function(){this.distanceVector=tI(tS(),this.focalPoint,this.position),this.distance=tP(this.distanceVector),this.dollyingStep=this.distance/100}},{key:"_getOrthoMatrix",value:function(){if(this.projectionMode===rs.ORTHOGRAPHIC){var t=this.position,e=eR(eI(),[0,0,1],-this.roll*Math.PI/180);eh(this.orthoMatrix,e,tT((this.rright-this.left)/2-t[0],(this.top-this.bottom)/2-t[1],0),tT(this.zoom,this.zoom,1),t)}}},{key:"triggerUpdate",value:function(){if(this.enableUpdate){var t=this.getViewTransform(),e=t2(tY(),this.getPerspective(),t);this.getFrustum().extractFromVPMatrix(e),this.eventEmitter.emit(ru)}}},{key:"rotate",value:function(t,e,n){throw Error(n0)}},{key:"pan",value:function(t,e){throw Error(n0)}},{key:"dolly",value:function(t){throw Error(n0)}},{key:"createLandmark",value:function(t,e){throw Error(n0)}},{key:"gotoLandmark",value:function(t,e){throw Error(n0)}},{key:"cancelLandmarkAnimation",value:function(){throw Error(n0)}}]),rf=((MZ={})[MZ.Standard=0]="Standard",MZ),rh=((MQ={})[MQ.ADDED=0]="ADDED",MQ[MQ.REMOVED=1]="REMOVED",MQ[MQ.Z_INDEX_CHANGED=2]="Z_INDEX_CHANGED",MQ),rd=tS(),rp=tY(),ry=eI();function rg(t){if(t.localDirtyFlag){if(0!==t.localSkew[0]||0!==t.localSkew[1]){eh(t.localTransform,t.localRotation,t.localPosition,tT(1,1,1),t.origin),(0!==t.localSkew[0]||0!==t.localSkew[1])&&(tZ(rp),rp[4]=Math.tan(t.localSkew[0]),rp[1]=Math.tan(t.localSkew[1]),t2(t.localTransform,t.localTransform,rp));var e=eh(rp,e$(ry,0,0,0,1),tN(rd,1,1,1),t.localScale,t.origin);t2(t.localTransform,t.localTransform,e)}else{var n=t.localTransform,r=t.localPosition,i=t.localRotation,a=t.localScale,o=t.origin,l=0!==r[0]||0!==r[1]||0!==r[2],s=1!==i[3]||0!==i[0]||0!==i[1]||0!==i[2],u=1!==a[0]||1!==a[1]||1!==a[2],c=0!==o[0]||0!==o[1]||0!==o[2];s||u||c?eh(n,i,r,a,o):l?t7(n,r):tZ(n)}t.localDirtyFlag=!1}}var rv={absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new nJ(0,0,0,0)},rm=((MJ={}).COORDINATE="<coordinate>",MJ.COLOR="<color>",MJ.PAINT="<paint>",MJ.NUMBER="<number>",MJ.ANGLE="<angle>",MJ.OPACITY_VALUE="<opacity-value>",MJ.SHADOW_BLUR="<shadow-blur>",MJ.LENGTH="<length>",MJ.PERCENTAGE="<percentage>",MJ.LENGTH_PERCENTAGE="<length> | <percentage>",MJ.LENGTH_PERCENTAGE_12="[<length> | <percentage>]{1,2}",MJ.LENGTH_PERCENTAGE_14="[<length> | <percentage>]{1,4}",MJ.LIST_OF_POINTS="<list-of-points>",MJ.PATH="<path>",MJ.FILTER="<filter>",MJ.Z_INDEX="<z-index>",MJ.OFFSET_DISTANCE="<offset-distance>",MJ.DEFINED_PATH="<defined-path>",MJ.MARKER="<marker>",MJ.TRANSFORM="<transform>",MJ.TRANSFORM_ORIGIN="<transform-origin>",MJ.TEXT="<text>",MJ.TEXT_TRANSFORM="<text-transform>",MJ);function rb(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function rx(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function rO(){}var rw="\\s*([+-]?\\d+)\\s*",rk="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",r_="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",rM=/^#([0-9a-f]{3,8})$/,rE=RegExp(`^rgb\\(${rw},${rw},${rw}\\)$`),rA=RegExp(`^rgb\\(${r_},${r_},${r_}\\)$`),rS=RegExp(`^rgba\\(${rw},${rw},${rw},${rk}\\)$`),rj=RegExp(`^rgba\\(${r_},${r_},${r_},${rk}\\)$`),rP=RegExp(`^hsl\\(${rk},${r_},${r_}\\)$`),rT=RegExp(`^hsla\\(${rk},${r_},${r_},${rk}\\)$`),rC={aliceblue:0xf0f8ff,antiquewhite:0xfaebd7,aqua:65535,aquamarine:8388564,azure:0xf0ffff,beige:0xf5f5dc,bisque:0xffe4c4,black:0,blanchedalmond:0xffebcd,blue:255,blueviolet:9055202,brown:0xa52a2a,burlywood:0xdeb887,cadetblue:6266528,chartreuse:8388352,chocolate:0xd2691e,coral:0xff7f50,cornflowerblue:6591981,cornsilk:0xfff8dc,crimson:0xdc143c,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:0xb8860b,darkgray:0xa9a9a9,darkgreen:25600,darkgrey:0xa9a9a9,darkkhaki:0xbdb76b,darkmagenta:9109643,darkolivegreen:5597999,darkorange:0xff8c00,darkorchid:0x9932cc,darkred:9109504,darksalmon:0xe9967a,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:0xff1493,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:0xb22222,floralwhite:0xfffaf0,forestgreen:2263842,fuchsia:0xff00ff,gainsboro:0xdcdcdc,ghostwhite:0xf8f8ff,gold:0xffd700,goldenrod:0xdaa520,gray:8421504,green:32768,greenyellow:0xadff2f,grey:8421504,honeydew:0xf0fff0,hotpink:0xff69b4,indianred:0xcd5c5c,indigo:4915330,ivory:0xfffff0,khaki:0xf0e68c,lavender:0xe6e6fa,lavenderblush:0xfff0f5,lawngreen:8190976,lemonchiffon:0xfffacd,lightblue:0xadd8e6,lightcoral:0xf08080,lightcyan:0xe0ffff,lightgoldenrodyellow:0xfafad2,lightgray:0xd3d3d3,lightgreen:9498256,lightgrey:0xd3d3d3,lightpink:0xffb6c1,lightsalmon:0xffa07a,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:0xb0c4de,lightyellow:0xffffe0,lime:65280,limegreen:3329330,linen:0xfaf0e6,magenta:0xff00ff,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:0xba55d3,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:0xc71585,midnightblue:1644912,mintcream:0xf5fffa,mistyrose:0xffe4e1,moccasin:0xffe4b5,navajowhite:0xffdead,navy:128,oldlace:0xfdf5e6,olive:8421376,olivedrab:7048739,orange:0xffa500,orangered:0xff4500,orchid:0xda70d6,palegoldenrod:0xeee8aa,palegreen:0x98fb98,paleturquoise:0xafeeee,palevioletred:0xdb7093,papayawhip:0xffefd5,peachpuff:0xffdab9,peru:0xcd853f,pink:0xffc0cb,plum:0xdda0dd,powderblue:0xb0e0e6,purple:8388736,rebeccapurple:6697881,red:0xff0000,rosybrown:0xbc8f8f,royalblue:4286945,saddlebrown:9127187,salmon:0xfa8072,sandybrown:0xf4a460,seagreen:3050327,seashell:0xfff5ee,sienna:0xa0522d,silver:0xc0c0c0,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:0xfffafa,springgreen:65407,steelblue:4620980,tan:0xd2b48c,teal:32896,thistle:0xd8bfd8,tomato:0xff6347,turquoise:4251856,violet:0xee82ee,wheat:0xf5deb3,white:0xffffff,whitesmoke:0xf5f5f5,yellow:0xffff00,yellowgreen:0x9acd32};function rN(){return this.rgb().formatHex()}function rL(){return this.rgb().formatRgb()}function rI(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=rM.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?rR(e):3===n?new rB(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?rD(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?rD(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=rE.exec(t))?new rB(e[1],e[2],e[3],1):(e=rA.exec(t))?new rB(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=rS.exec(t))?rD(e[1],e[2],e[3],e[4]):(e=rj.exec(t))?rD(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=rP.exec(t))?rq(e[1],e[2]/100,e[3]/100,1):(e=rT.exec(t))?rq(e[1],e[2]/100,e[3]/100,e[4]):rC.hasOwnProperty(t)?rR(rC[t]):"transparent"===t?new rB(NaN,NaN,NaN,0):null}function rR(t){return new rB(t>>16&255,t>>8&255,255&t,1)}function rD(t,e,n,r){return r<=0&&(t=e=n=NaN),new rB(t,e,n,r)}function rB(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function rF(){return`#${rG(this.r)}${rG(this.g)}${rG(this.b)}`}function rz(){let t=r$(this.opacity);return`${1===t?"rgb(":"rgba("}${rW(this.r)}, ${rW(this.g)}, ${rW(this.b)}${1===t?")":`, ${t})`}`}function r$(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function rW(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function rG(t){return((t=rW(t))<16?"0":"")+t.toString(16)}function rq(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new rY(t,e,n,r)}function rH(t){if(t instanceof rY)return new rY(t.h,t.s,t.l,t.opacity);if(t instanceof rO||(t=rI(t)),!t)return new rY;if(t instanceof rY)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),o=NaN,l=a-i,s=(a+i)/2;return l?(o=e===a?(n-r)/l+(n<r)*6:n===a?(r-e)/l+2:(e-n)/l+4,l/=s<.5?a+i:2-a-i,o*=60):l=s>0&&s<1?0:o,new rY(o,l,s,t.opacity)}function rY(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function rV(t){return(t=(t||0)%360)<0?t+360:t}function rU(t){return Math.max(0,Math.min(1,t||0))}function rX(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}function rK(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw TypeError("Expected a function");var n=function(){for(var r=arguments.length,i=Array(r),a=0;a<r;a++)i[a]=arguments[a];var o=e?e.apply(this,i):i[0],l=n.cache;if(l.has(o))return l.get(o);var s=t.apply(this,i);return n.cache=l.set(o,s)||l,s};return n.cache=new(rK.Cache||Map),rK.cacheList.push(n.cache),n}rb(rO,rI,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:rN,formatHex:rN,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return rH(this).formatHsl()},formatRgb:rL,toString:rL}),rb(rB,function(t,e,n,r){var i;return 1==arguments.length?((i=t)instanceof rO||(i=rI(i)),i)?new rB((i=i.rgb()).r,i.g,i.b,i.opacity):new rB:new rB(t,e,n,null==r?1:r)},rx(rO,{brighter(t){return t=null==t?1.4285714285714286:Math.pow(1.4285714285714286,t),new rB(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new rB(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new rB(rW(this.r),rW(this.g),rW(this.b),r$(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:rF,formatHex:rF,formatHex8:function(){return`#${rG(this.r)}${rG(this.g)}${rG(this.b)}${rG((isNaN(this.opacity)?1:this.opacity)*255)}`},formatRgb:rz,toString:rz})),rb(rY,function(t,e,n,r){return 1==arguments.length?rH(t):new rY(t,e,n,null==r?1:r)},rx(rO,{brighter(t){return t=null==t?1.4285714285714286:Math.pow(1.4285714285714286,t),new rY(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new rY(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new rB(rX(t>=240?t-240:t+120,i,r),rX(t,i,r),rX(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new rY(rV(this.h),rU(this.s),rU(this.l),r$(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(){let t=r$(this.opacity);return`${1===t?"hsl(":"hsla("}${rV(this.h)}, ${100*rU(this.s)}%, ${100*rU(this.l)}%${1===t?")":`, ${t})`}`}})),rK.Cache=Map,rK.cacheList=[],rK.clearCache=function(){rK.cacheList.forEach(function(t){return t.clear()})};var rZ=((M0={})[M0.kUnknown=0]="kUnknown",M0[M0.kNumber=1]="kNumber",M0[M0.kPercentage=2]="kPercentage",M0[M0.kEms=3]="kEms",M0[M0.kPixels=4]="kPixels",M0[M0.kRems=5]="kRems",M0[M0.kDegrees=6]="kDegrees",M0[M0.kRadians=7]="kRadians",M0[M0.kGradians=8]="kGradians",M0[M0.kTurns=9]="kTurns",M0[M0.kMilliseconds=10]="kMilliseconds",M0[M0.kSeconds=11]="kSeconds",M0[M0.kInteger=12]="kInteger",M0),rQ=((M1={})[M1.kUNumber=0]="kUNumber",M1[M1.kUPercent=1]="kUPercent",M1[M1.kULength=2]="kULength",M1[M1.kUAngle=3]="kUAngle",M1[M1.kUTime=4]="kUTime",M1[M1.kUOther=5]="kUOther",M1),rJ=((M2={})[M2.kYes=0]="kYes",M2[M2.kNo=1]="kNo",M2),r0=((M5={})[M5.kYes=0]="kYes",M5[M5.kNo=1]="kNo",M5),r1=[{name:"em",unit_type:rZ.kEms},{name:"px",unit_type:rZ.kPixels},{name:"deg",unit_type:rZ.kDegrees},{name:"rad",unit_type:rZ.kRadians},{name:"grad",unit_type:rZ.kGradians},{name:"ms",unit_type:rZ.kMilliseconds},{name:"s",unit_type:rZ.kSeconds},{name:"rem",unit_type:rZ.kRems},{name:"turn",unit_type:rZ.kTurns}],r2=((M3={})[M3.kUnknownType=0]="kUnknownType",M3[M3.kUnparsedType=1]="kUnparsedType",M3[M3.kKeywordType=2]="kKeywordType",M3[M3.kUnitType=3]="kUnitType",M3[M3.kSumType=4]="kSumType",M3[M3.kProductType=5]="kProductType",M3[M3.kNegateType=6]="kNegateType",M3[M3.kInvertType=7]="kInvertType",M3[M3.kMinType=8]="kMinType",M3[M3.kMaxType=9]="kMaxType",M3[M3.kClampType=10]="kClampType",M3[M3.kTransformType=11]="kTransformType",M3[M3.kPositionType=12]="kPositionType",M3[M3.kURLImageType=13]="kURLImageType",M3[M3.kColorType=14]="kColorType",M3[M3.kUnsupportedColorType=15]="kUnsupportedColorType",M3),r5=function(t){return t?"number"===t?rZ.kNumber:"percent"===t||"%"===t?rZ.kPercentage:r1.find(function(e){return e.name===t}).unit_type:rZ.kUnknown},r3=function(t){switch(t){case rZ.kNumber:case rZ.kInteger:return rQ.kUNumber;case rZ.kPercentage:return rQ.kUPercent;case rZ.kPixels:return rQ.kULength;case rZ.kMilliseconds:case rZ.kSeconds:return rQ.kUTime;case rZ.kDegrees:case rZ.kRadians:case rZ.kGradians:case rZ.kTurns:return rQ.kUAngle;default:return rQ.kUOther}},r4=function(t){switch(t){case rQ.kUNumber:return rZ.kNumber;case rQ.kULength:return rZ.kPixels;case rQ.kUPercent:return rZ.kPercentage;case rQ.kUTime:return rZ.kSeconds;case rQ.kUAngle:return rZ.kDegrees;default:return rZ.kUnknown}},r6=function(t){var e=1;switch(t){case rZ.kPixels:case rZ.kDegrees:case rZ.kSeconds:break;case rZ.kMilliseconds:e=.001;break;case rZ.kRadians:e=180/Math.PI;break;case rZ.kGradians:e=.9;break;case rZ.kTurns:e=360}return e},r8=function(t){switch(t){case rZ.kNumber:case rZ.kInteger:break;case rZ.kPercentage:return"%";case rZ.kEms:return"em";case rZ.kRems:return"rem";case rZ.kPixels:return"px";case rZ.kDegrees:return"deg";case rZ.kRadians:return"rad";case rZ.kGradians:return"grad";case rZ.kMilliseconds:return"ms";case rZ.kSeconds:return"s";case rZ.kTurns:return"turn"}return""},r9=(0,tO.A)(function t(){(0,tx.A)(this,t)},[{key:"toString",value:function(){return this.buildCSSText(rJ.kNo,r0.kNo,"")}},{key:"isNumericValue",value:function(){return this.getType()>=r2.kUnitType&&this.getType()<=r2.kClampType}}],[{key:"isAngle",value:function(t){return t===rZ.kDegrees||t===rZ.kRadians||t===rZ.kGradians||t===rZ.kTurns}},{key:"isLength",value:function(t){return t>=rZ.kEms&&t<rZ.kDegrees}},{key:"isRelativeUnit",value:function(t){return t===rZ.kPercentage||t===rZ.kEms||t===rZ.kRems}},{key:"isTime",value:function(t){return t===rZ.kSeconds||t===rZ.kMilliseconds}}]),r7=function(t){function e(t){var n;return(0,tx.A)(this,e),(n=(0,tk.A)(this,e)).colorSpace=t,n}return(0,t_.A)(e,t),(0,tO.A)(e,[{key:"getType",value:function(){return r2.kColorType}},{key:"to",value:function(t){return this}}])}(r9),it=((M4={})[M4.Constant=0]="Constant",M4[M4.LinearGradient=1]="LinearGradient",M4[M4.RadialGradient=2]="RadialGradient",M4),ie=function(t){function e(t,n){var r;return(0,tx.A)(this,e),(r=(0,tk.A)(this,e)).type=t,r.value=n,r}return(0,t_.A)(e,t),(0,tO.A)(e,[{key:"clone",value:function(){return new e(this.type,this.value)}},{key:"buildCSSText",value:function(t,e,n){return n}},{key:"getType",value:function(){return r2.kColorType}}])}(r9),ir=function(t){function e(t){var n;return(0,tx.A)(this,e),(n=(0,tk.A)(this,e)).value=t,n}return(0,t_.A)(e,t),(0,tO.A)(e,[{key:"clone",value:function(){return new e(this.value)}},{key:"getType",value:function(){return r2.kKeywordType}},{key:"buildCSSText",value:function(t,e,n){return n+this.value}}])}(r9),ii=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return(Number.isFinite(t)?"NaN":t>0?"infinity":"-infinity")+e},ia=function(t){return r4(r3(t))},io=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:rZ.kNumber;return(0,tx.A)(this,e),n=(0,tk.A)(this,e),n.unit="string"==typeof r?r5(r):r,n.value=t,n}return(0,t_.A)(e,t),(0,tO.A)(e,[{key:"clone",value:function(){return new e(this.value,this.unit)}},{key:"equals",value:function(t){return this.value===t.value&&this.unit===t.unit}},{key:"getType",value:function(){return r2.kUnitType}},{key:"convertTo",value:function(t){if(this.unit===t)return new e(this.value,this.unit);var n=ia(this.unit);if(n!==ia(t)||n===rZ.kUnknown)return null;var r=r6(this.unit)/r6(t);return new e(this.value*r,t)}},{key:"buildCSSText",value:function(t,e,n){var r;switch(this.unit){case rZ.kUnknown:break;case rZ.kInteger:r=Number(this.value).toFixed(0);break;case rZ.kNumber:case rZ.kPercentage:case rZ.kEms:case rZ.kRems:case rZ.kPixels:case rZ.kDegrees:case rZ.kRadians:case rZ.kGradians:case rZ.kMilliseconds:case rZ.kSeconds:case rZ.kTurns:var i=this.value,a=r8(this.unit);if(i<-999999||i>999999){var o=r8(this.unit);r=!Number.isFinite(i)||Number.isNaN(i)?ii(i,o):i+(o||"")}else r="".concat(i).concat(a)}return n+r}}])}(r9),il=new io(0,"px");new io(1,"px");var is=new io(0,"deg"),iu=function(t){function e(t,n,r){var i,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return(0,tx.A)(this,e),(i=(0,tk.A)(this,e,["rgb"])).r=t,i.g=n,i.b=r,i.alpha=a,i.isNone=o,i}return(0,t_.A)(e,t),(0,tO.A)(e,[{key:"clone",value:function(){return new e(this.r,this.g,this.b,this.alpha)}},{key:"buildCSSText",value:function(t,e,n){return"".concat(n,"rgba(").concat(this.r,",").concat(this.g,",").concat(this.b,",").concat(this.alpha,")")}}])}(r7),ic=new ir("unset"),ih={"":ic,unset:ic,initial:new ir("initial"),inherit:new ir("inherit")},id=new iu(0,0,0,0,!0),ip=new iu(0,0,0,0),iy=rK(function(t,e,n,r){return new iu(t,e,n,r)},function(t,e,n,r){return"rgba(".concat(t,",").concat(e,",").concat(n,",").concat(r,")")}),ig=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:rZ.kNumber;return new io(t,e)};new io(50,"%");var iv=function(){var t=/^(linear\-gradient)/i,e=/^(repeating\-linear\-gradient)/i,n=/^(radial\-gradient)/i,r=/^(repeating\-radial\-gradient)/i,i=/^(conic\-gradient)/i,a=/^to (left (top|bottom)|right (top|bottom)|top (left|right)|bottom (left|right)|left|right|top|bottom)/i,o=/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,l=/^(left|center|right|top|bottom)/i,s=/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,u=/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,c=/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,f=/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,h=/^\(/,d=/^\)/,p=/^,/,y=/^\#([0-9a-fA-F]+)/,g=/^([a-zA-Z]+)/,v=/^rgb/i,b=/^rgba/i,x=/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/,O="";function w(t){throw Error("".concat(O,": ").concat(t))}function k(){return _("linear-gradient",t,E)||_("repeating-linear-gradient",e,E)||_("radial-gradient",n,A)||_("repeating-radial-gradient",r,A)||_("conic-gradient",i,A)}function _(t,e,n){return M(e,function(e){var r=n();return r&&!B(p)&&w("Missing comma before color stops"),{type:t,orientation:r,colorStops:C(N)}})}function M(t,e){var n=B(t);if(n){B(h)||w("Missing (");var r=e(n);return B(d)||w("Missing )"),r}}function E(){return D("directional",a,1)||D("angular",f,1)}function A(){var t,e,n=S();return n&&((t=[]).push(n),e=O,B(p)&&((n=S())?t.push(n):O=e)),t}function S(){var t,e,n=((t=D("shape",/^(circle)/i,0))&&(t.style=R()||j()),t||((e=D("shape",/^(ellipse)/i,0))&&(e.style=I()||j()),e));if(n)n.at=P();else{var r=j();if(r){n=r;var i=P();i&&(n.at=i)}else{var a=T();a&&(n={type:"default-radial",at:a})}}return n}function j(){return D("extent-keyword",o,1)}function P(){if(D("position",/^at/,0)){var t=T();return t||w("Missing positioning value"),t}}function T(){var t={x:I(),y:I()};if(t.x||t.y)return{type:"position",value:t}}function C(t){var e=t(),n=[];if(e)for(n.push(e);B(p);)(e=t())?n.push(e):w("One extra comma");return n}function N(){var t=D("hex",y,1)||M(b,function(){return{type:"rgba",value:C(L)}})||M(v,function(){return{type:"rgb",value:C(L)}})||D("literal",g,0);return t||w("Expected color definition"),t.length=I(),t}function L(){return B(x)[1]}function I(){return D("%",u,1)||D("position-keyword",l,1)||R()}function R(){return D("px",s,1)||D("em",c,1)}function D(t,e,n){var r=B(e);if(r)return{type:t,value:r[n]}}function B(t){var e=/^[\n\r\t\s]+/.exec(O);e&&F(e[0].length);var n=t.exec(O);return n&&F(n[0].length),n}function F(t){O=O.substring(t)}return function(t){var e;return O=t,e=C(k),O.length>0&&w("Invalid input not EOF"),e}}(),im=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,ib=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,ix=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,iO=/[\d.]+:(#[^\s]+|[^\)]+\))/gi,iw={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},ik=rK(function(t){return ig("angular"===t.type?Number(t.value):iw[t.value]||0,"deg")}),i_=rK(function(t){var e=50,n=50,r="%",i="%";if((null==t?void 0:t.type)==="position"){var a=t.value,o=a.x,l=a.y;(null==o?void 0:o.type)==="position-keyword"&&("left"===o.value?e=0:"center"===o.value?e=50:"right"===o.value?e=100:"top"===o.value?n=0:"bottom"===o.value&&(n=100)),(null==l?void 0:l.type)==="position-keyword"&&("left"===l.value?e=0:"center"===l.value?n=50:"right"===l.value?e=100:"top"===l.value?n=0:"bottom"===l.value&&(n=100)),((null==o?void 0:o.type)==="px"||(null==o?void 0:o.type)==="%"||(null==o?void 0:o.type)==="em")&&(r=null==o?void 0:o.type,e=Number(o.value)),((null==l?void 0:l.type)==="px"||(null==l?void 0:l.type)==="%"||(null==l?void 0:l.type)==="em")&&(i=null==l?void 0:l.type,n=Number(l.value))}return{cx:ig(e,r),cy:ig(n,i)}}),iM=rK(function(t){if(t.indexOf("linear")>-1||t.indexOf("radial")>-1)return iv(t).map(function(t){var e=t.type,n=t.orientation,r=t.colorStops;!function(t){var e=t.length;t[e-1].length=null!=(a=t[e-1].length)?a:{type:"%",value:"100"},e>1&&(t[0].length=null!=(o=t[0].length)?o:{type:"%",value:"0"});for(var n=0,r=Number(t[0].length.value),i=1;i<e;i++){var a,o,l,s=null==(l=t[i].length)?void 0:l.value;if(!eY(s)&&!eY(r)){for(var u=1;u<i-n;u++)t[n+u].length={type:"%",value:"".concat(r+(Number(s)-r)*u/(i-n))};n=i,r=Number(s)}}}(r);var i=r.map(function(t){var e,n;return{offset:ig(Number(t.length.value),"%"),color:(e=t.type,n=t.value,"hex"===e?"#".concat(n):"literal"===e?n:"rgb"===e?"rgb(".concat(n.join(","),")"):"rgba(".concat(n.join(","),")"))}});if("linear-gradient"===e)return new ie(it.LinearGradient,{angle:n?ik(n):is,steps:i});if("radial-gradient"===e&&(n||(n=[{type:"shape",value:"circle"}]),"shape"===n[0].type&&"circle"===n[0].value)){var a,o=i_(n[0].at),l=o.cx,s=o.cy;if(n[0].style){var u=n[0].style,c=u.type,f=u.value;"extent-keyword"===c?(ih[f]||(ih[f]=new ir(f)),a=ih[f]):a=ig(f,c)}return new ie(it.RadialGradient,{cx:l,cy:s,size:a,steps:i})}});var e=t[0];if("("===t[1]||"("===t[2]){if("l"===e){var n=im.exec(t);if(n){var r,i=(null==(r=n[2].match(iO))?void 0:r.map(function(t){return t.split(":")}))||[];return[new ie(it.LinearGradient,{angle:ig(parseFloat(n[1]),"deg"),steps:i.map(function(t){var e=(0,tM.A)(t,2),n=e[0],r=e[1];return{offset:ig(100*Number(n),"%"),color:r}})})]}}else if("r"===e){var a=function(t){var e=ib.exec(t);if(e){var n,r=(null==(n=e[4].match(iO))?void 0:n.map(function(t){return t.split(":")}))||[];return{cx:ig(50,"%"),cy:ig(50,"%"),steps:r.map(function(t){var e=(0,tM.A)(t,2),n=e[0],r=e[1];return{offset:ig(100*Number(n),"%"),color:r}})}}return null}(t);if(a)if(!eV(a))return[new ie(it.RadialGradient,a)];else t=a}else if("p"===e){var o=t,l=ix.exec(o);if(l){var s=l[1],u=l[2];switch(s){case"a":s="repeat";break;case"x":s="repeat-x";break;case"y":s="repeat-y";break;default:s="no-repeat"}return{image:u,repetition:s}}return null}}});function iE(t){return t&&!!t.image}function iA(t){return t&&!eY(t.r)&&!eY(t.g)&&!eY(t.b)}var iS=rK(function(t){if(iE(t))return(0,tb.A)({repetition:"repeat"},t);if(eY(t)&&(t=""),"transparent"===t)return ip;if("currentColor"===t)t="black";else if("none"===t)return id;var e=iM(t);if(e)return e;var n=rI(t),r=[0,0,0,0];return null!==n&&(r[0]=n.r||0,r[1]=n.g||0,r[2]=n.b||0,r[3]=n.opacity),iy.apply(void 0,r)});function ij(t,e){if(iA(t)&&iA(e))return[[Number(t.r),Number(t.g),Number(t.b),Number(t.alpha)],[Number(e.r),Number(e.g),Number(e.b),Number(e.alpha)],function(t){var e=t.slice();if(e[3])for(var n=0;n<3;n++)e[n]=Math.round(eU(e[n],0,255));return e[3]=eU(e[3],0,1),"rgba(".concat(e.join(","),")")}]}function iP(t,e){if(eY(e))return ig(0,"px");if(isFinite(Number(e="".concat(e).trim().toLowerCase()))){if("px".search(t)>=0)return ig(Number(e),"px");if("deg".search(t)>=0)return ig(Number(e),"deg")}var n=[];e=e.replace(t,function(t){return n.push(t),"U".concat(t)});var r="U(".concat(t.source,")");return n.map(function(t){return ig(Number(e.replace(RegExp("U".concat(t),"g"),"").replace(RegExp(r,"g"),"*0")),t)})[0]}var iT=function(t){return iP(/px/g,t)},iC=rK(iT);rK(function(t){return iP(RegExp("%","g"),t)});var iN=function(t){return eq(t)||isFinite(Number(t))?ig(Number(t)||0,"px"):iP(RegExp("px|%|em|rem","g"),t)},iL=rK(iN),iI=function(t){return iP(RegExp("deg|rad|grad|turn","g"),t)},iR=rK(iI);function iD(t){var e=0;return t.unit===rZ.kDegrees?e=t.value:t.unit===rZ.kRadians?e=Number(t.value)*n6:t.unit===rZ.kTurns?e=360*Number(t.value):t.value&&(e=t.value),e}function iB(t,e){var n;return(Array.isArray(t)?n=t.map(function(t){return Number(t)}):eV(t)?n=t.split(" ").map(function(t){return Number(t)}):eq(t)&&(n=[t]),2===e)?1===n.length?[n[0],n[0]]:[n[0],n[1]]:4===e?1===n.length?[n[0],n[0],n[0],n[0]]:2===n.length?[n[0],n[1],n[0],n[1]]:3===n.length?[n[0],n[1],n[2],n[1]]:[n[0],n[1],n[2],n[3]]:"even"===e&&n.length%2==1?[].concat((0,tw.A)(n),(0,tw.A)(n)):n}function iF(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(t.unit===rZ.kPixels)return Number(t.value);if(t.unit===rZ.kPercentage&&n){var i=n.nodeName===nq.GROUP?n.getLocalBounds():n.getGeometryBounds();return(r?i.min[e]:0)+t.value/100*i.halfExtents[e]*2}return 0}var iz=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function i$(t){return t.toString()}var iW=function(t){return"number"==typeof t?ig(t):/^\s*[-+]?(\d*\.)?\d+\s*$/.test(t)?ig(Number(t)):ig(0)},iG=rK(iW);function iq(t,e){return[t,e,i$]}function iH(t,e){return function(n,r){return[n,r,function(n){return i$(eU(n,t,e))}]}}function iY(t,e){if(t.length===e.length)return[t,e,function(t){return t}]}function iV(t){return 0===t.parsedStyle.d.totalLength&&(t.parsedStyle.d.totalLength=nl(t.parsedStyle.d.absolutePath,void 0,eZ(eZ({},void 0),{bbox:!1,length:!0})).length),t.parsedStyle.d.totalLength}function iU(t,e){return t[0]===e[0]&&t[1]===e[1]}function iX(t,e){var n=t.prePoint,r=t.currentPoint,i=t.nextPoint,a=Math.pow(r[0]-n[0],2)+Math.pow(r[1]-n[1],2),o=Math.pow(r[0]-i[0],2)+Math.pow(r[1]-i[1],2),l=Math.acos((a+o-(Math.pow(n[0]-i[0],2)+Math.pow(n[1]-i[1],2)))/(2*Math.sqrt(a)*Math.sqrt(o)));if(!l||0===Math.sin(l)||nf(l,0))return{xExtra:0,yExtra:0};var s=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]));return{xExtra:e/2*(1/Math.sin(l/2))*Math.cos(l/2-(s=s>Math.PI/2?Math.PI-s:s))-e/2||0,yExtra:e/2*(1/Math.sin(l/2))*Math.cos((u=u>Math.PI/2?Math.PI-u:u)-l/2)-e/2||0}}function iK(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}rK(function(t){return eV(t)?t.split(" ").map(iG):t.map(iG)});var iZ=function(t,e){var n=t.x*e.x+t.y*e.y,r=Math.sqrt((Math.pow(t.x,2)+Math.pow(t.y,2))*(Math.pow(e.x,2)+Math.pow(e.y,2)));return(t.x*e.y-t.y*e.x<0?-1:1)*Math.acos(n/r)},iQ=function(t,e,n,r,i,a,o,l){e=Math.abs(e),n=Math.abs(n);var s=(r=nh(r,360))*n4;if(t.x===o.x&&t.y===o.y)return{x:t.x,y:t.y,ellipticalArcAngle:0};if(0===e||0===n)return{x:0,y:0,ellipticalArcAngle:0};var u=(t.x-o.x)/2,c=(t.y-o.y)/2,f={x:Math.cos(s)*u+Math.sin(s)*c,y:-Math.sin(s)*u+Math.cos(s)*c},h=Math.pow(f.x,2)/Math.pow(e,2)+Math.pow(f.y,2)/Math.pow(n,2);h>1&&(e*=Math.sqrt(h),n*=Math.sqrt(h));var d=(Math.pow(e,2)*Math.pow(n,2)-Math.pow(e,2)*Math.pow(f.y,2)-Math.pow(n,2)*Math.pow(f.x,2))/(Math.pow(e,2)*Math.pow(f.y,2)+Math.pow(n,2)*Math.pow(f.x,2)),p=(i!==a?1:-1)*Math.sqrt(d=d<0?0:d),y={x:p*(e*f.y/n),y:p*(-(n*f.x)/e)},g={x:Math.cos(s)*y.x-Math.sin(s)*y.y+(t.x+o.x)/2,y:Math.sin(s)*y.x+Math.cos(s)*y.y+(t.y+o.y)/2},v={x:(f.x-y.x)/e,y:(f.y-y.y)/n},b=iZ({x:1,y:0},v),x=iZ(v,{x:(-f.x-y.x)/e,y:(-f.y-y.y)/n});!a&&x>0?x-=2*Math.PI:a&&x<0&&(x+=2*Math.PI);var O=b+(x%=2*Math.PI)*l,w=e*Math.cos(O),k=n*Math.sin(O);return{x:Math.cos(s)*w-Math.sin(s)*k+g.x,y:Math.sin(s)*w+Math.cos(s)*k+g.y,ellipticalArcStartAngle:b,ellipticalArcEndAngle:b+x,ellipticalArcAngle:O,ellipticalArcCenter:g,resultantRx:e,resultantRy:n}};function iJ(t,e){var n=!(arguments.length>2)||void 0===arguments[2]||arguments[2],r=t.arcParams,i=r.rx,a=void 0===i?0:i,o=r.ry,l=void 0===o?0:o,s=r.xRotation,u=r.arcFlag,c=r.sweepFlag,f=iQ({x:t.prePoint[0],y:t.prePoint[1]},a,l,s,!!u,!!c,{x:t.currentPoint[0],y:t.currentPoint[1]},e),h=iQ({x:t.prePoint[0],y:t.prePoint[1]},a,l,s,!!u,!!c,{x:t.currentPoint[0],y:t.currentPoint[1]},n?e+.005:e-.005),d=h.x-f.x,p=h.y-f.y,y=Math.sqrt(d*d+p*p);return{x:-d/y,y:-p/y}}function i0(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function i1(t,e){return i0(t)*i0(e)?(t[0]*e[0]+t[1]*e[1])/(i0(t)*i0(e)):1}function i2(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(i1(t,e))}function i5(t,e,n,r){var i=(-1+Math.sqrt(2))/3*4,a=t*i,o=e*i,l=n-t,s=n+t,u=r-e,c=r+e;return[["M",l,r],["C",l,r-o,n-a,u,n,u],["C",n+a,u,s,r-o,s,r],["C",s,r+o,n+a,c,n,c],["C",n-a,c,l,r+o,l,r],["Z"]]}var i3=function(t){if(""===t||Array.isArray(t)&&0===t.length)return{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:{x:0,y:0,width:0,height:0}};try{e=nn(t)}catch(n){e=nn(""),console.error("[g]: Invalid SVG Path definition: ".concat(t))}!function(t){for(var e=0;e<t.length;e++){var n=t[e-1],r=t[e];if("M"===r[0]&&n){var i=n[0],a=[r[1],r[2]],o=void 0;"L"===i||"M"===i?o=[n[1],n[2]]:("C"===i||"A"===i||"Q"===i)&&(o=[n[n.length-2],n[n.length-1]]),o&&iU(a,o)&&(t.splice(e,1),e--)}}}(e);var e,n=function(t){for(var e=!1,n=t.length,r=0;r<n;r++){var i=t[r][0];if("C"===i||"A"===i||"Q"===i){e=!0;break}}return e}(e),r=function(t){for(var e=[],n=[],r=[],i=0;i<t.length;i++){var a=t[i],o=a[0];"M"===o?(r.length&&(n.push(r),r=[]),r.push([a[1],a[2]])):"Z"===o?r.length&&(e.push(r),r=[]):r.push([a[1],a[2]])}return r.length>0&&n.push(r),{polygons:e,polylines:n}}(e),i=r.polygons,a=r.polylines,o=function(t){for(var e=[],n=null,r=null,i=null,a=0,o=t.length,l=0;l<o;l++){var s=t[l];r=t[l+1];var u=s[0],c={command:u,prePoint:n,params:s,startTangent:null,endTangent:null,currentPoint:null,nextPoint:null,arcParams:null,box:null,cubicParams:null};switch(u){case"M":i=[s[1],s[2]],a=l;break;case"A":c.arcParams=function(t,e){var n=e[1],r=e[2],i=nh(e[3]*n4,2*Math.PI),a=e[4],o=e[5],l=t[0],s=t[1],u=e[6],c=e[7],f=Math.cos(i)*(l-u)/2+Math.sin(i)*(s-c)/2,h=-1*Math.sin(i)*(l-u)/2+Math.cos(i)*(s-c)/2,d=f*f/(n*n)+h*h/(r*r);d>1&&(n*=Math.sqrt(d),r*=Math.sqrt(d));var p=n*n*(h*h)+r*r*(f*f),y=p?Math.sqrt((n*n*(r*r)-p)/p):1;a===o&&(y*=-1),isNaN(y)&&(y=0);var g=r?y*n*h/r:0,v=n?-(y*r)*f/n:0,b=(l+u)/2+Math.cos(i)*g-Math.sin(i)*v,x=(s+c)/2+Math.sin(i)*g+Math.cos(i)*v,O=[(f-g)/n,(h-v)/r],w=[(-1*f-g)/n,(-1*h-v)/r],k=i2([1,0],O),_=i2(O,w);return -1>=i1(O,w)&&(_=Math.PI),i1(O,w)>=1&&(_=0),0===o&&_>0&&(_-=2*Math.PI),1===o&&_<0&&(_+=2*Math.PI),{cx:b,cy:x,rx:iU(t,[u,c])?0:n,ry:iU(t,[u,c])?0:r,startAngle:k,endAngle:k+_,xRotation:i,arcFlag:a,sweepFlag:o}}(n,s)}if("Z"===u)n=i,r=t[a+1];else{var f=s.length;n=[s[f-2],s[f-1]]}r&&"Z"===r[0]&&(r=t[a],e[a]&&(e[a].prePoint=n)),c.currentPoint=n,e[a]&&iU(n,e[a].currentPoint)&&(e[a].prePoint=c.prePoint),c.nextPoint=r?[r[r.length-2],r[r.length-1]]:null;var h=c.prePoint;if(["L","H","V"].includes(u))c.startTangent=[h[0]-n[0],h[1]-n[1]],c.endTangent=[n[0]-h[0],n[1]-h[1]];else if("Q"===u){var d=[s[1],s[2]];c.startTangent=[h[0]-d[0],h[1]-d[1]],c.endTangent=[n[0]-d[0],n[1]-d[1]]}else if("T"===u){var p=e[l-1],y=iK(p.currentPoint,h);"Q"===p.command?(c.command="Q",c.startTangent=[h[0]-y[0],h[1]-y[1]],c.endTangent=[n[0]-y[0],n[1]-y[1]]):(c.command="TL",c.startTangent=[h[0]-n[0],h[1]-n[1]],c.endTangent=[n[0]-h[0],n[1]-h[1]])}else if("C"===u){var g=[s[1],s[2]],v=[s[3],s[4]];c.startTangent=[h[0]-g[0],h[1]-g[1]],c.endTangent=[n[0]-v[0],n[1]-v[1]],0===c.startTangent[0]&&0===c.startTangent[1]&&(c.startTangent=[g[0]-v[0],g[1]-v[1]]),0===c.endTangent[0]&&0===c.endTangent[1]&&(c.endTangent=[v[0]-g[0],v[1]-g[1]])}else if("S"===u){var b=e[l-1],x=iK(b.currentPoint,h),O=[s[1],s[2]];"C"===b.command?(c.command="C",c.startTangent=[h[0]-x[0],h[1]-x[1]]):(c.command="SQ",c.startTangent=[h[0]-O[0],h[1]-O[1]]),c.endTangent=[n[0]-O[0],n[1]-O[1]]}else if("A"===u){var w=iJ(c,0),k=w.x,_=w.y,M=iJ(c,1,!1),E=M.x,A=M.y;c.startTangent=[k,_],c.endTangent=[E,A]}e.push(c)}return e}(e),l=function(t){for(var e=[],n=[],r=[],i=0;i<t.length;i++){var a=t[i],o=a.currentPoint,l=a.params,s=a.prePoint,u=void 0;switch(a.command){case"Q":u=function(t,e,n,r,i,a){var o=nD(t,n,i)[0],l=nD(e,r,a)[0],s=[t,i],u=[e,a];return void 0!==o&&s.push(nR(t,n,i,o)),void 0!==l&&u.push(nR(e,r,a,l)),nP(s,u)}(s[0],s[1],l[1],l[2],l[3],l[4]);break;case"C":u=function(t,e,n,r,i,a,o,l){for(var s=[t,o],u=[e,l],c=nL(t,n,i,o),f=nL(e,r,a,l),h=0;h<c.length;h++)s.push(nN(t,n,i,o,c[h]));for(var d=0;d<f.length;d++)u.push(nN(e,r,a,l,f[d]));return nP(s,u)}(s[0],s[1],l[1],l[2],l[3],l[4],l[5],l[6]);break;case"A":var c=a.arcParams;u=function(t,e,n,r,i,a,o){for(var l=Math.atan(-r/n*Math.tan(i)),s=1/0,u=-1/0,c=[a,o],f=-(2*Math.PI);f<=2*Math.PI;f+=Math.PI){var h=l+f;a<o?a<h&&h<o&&c.push(h):o<h&&h<a&&c.push(h)}for(var d=0;d<c.length;d++){var p,y=n*Math.cos(i)*Math.cos(p=c[d])-r*Math.sin(i)*Math.sin(p)+t;y<s&&(s=y),y>u&&(u=y)}for(var g=Math.atan(r/(n*Math.tan(i))),v=1/0,b=-1/0,x=[a,o],O=-(2*Math.PI);O<=2*Math.PI;O+=Math.PI){var w=g+O;a<o?a<w&&w<o&&x.push(w):o<w&&w<a&&x.push(w)}for(var k=0;k<x.length;k++){var _,M=n*Math.sin(i)*Math.cos(_=x[k])+r*Math.cos(i)*Math.sin(_)+e;M<v&&(v=M),M>b&&(b=M)}return{x:s,y:v,width:u-s,height:b-v}}(c.cx,c.cy,c.rx,c.ry,c.xRotation,c.startAngle,c.endAngle);break;default:e.push(o[0]),n.push(o[1])}u&&(a.box=u,e.push(u.x,u.x+u.width),n.push(u.y,u.y+u.height))}e=e.filter(function(t){return!Number.isNaN(t)&&t!==1/0&&t!==-1/0}),n=n.filter(function(t){return!Number.isNaN(t)&&t!==1/0&&t!==-1/0});var f=nu(e),h=nu(n),d=nc(e),p=nc(n);if(0===r.length)return{x:f,y:h,width:d-f,height:p-h};for(var y=0;y<r.length;y++){var g=r[y],v=g.currentPoint;v[0]===f?f-=iX(g,0).xExtra:v[0]===d&&(d+=iX(g,0).xExtra),v[1]===h?h-=iX(g,0).yExtra:v[1]===p&&(p+=iX(g,0).yExtra)}return{x:f,y:h,width:d-f,height:p-h}}(o),s=l.x,u=l.y,c=l.width,f=l.height;return{absolutePath:e,hasArc:n,segments:o,polygons:i,polylines:a,totalLength:0,rect:{x:Number.isFinite(s)?s:0,y:Number.isFinite(u)?u:0,width:Number.isFinite(c)?c:0,height:Number.isFinite(f)?f:0}}},i4=rK(i3);function i6(t){return eV(t)?i4(t):i3(t)}function i8(t,e,n){var r,i,a,o,l,s,u,c,f,h=t.curve,d=e.curve;h&&0!==h.length||(h=ng(t.absolutePath,!1),t.curve=h),d&&0!==d.length||(d=ng(e.absolutePath,!1),e.curve=d);var p=[h,d];h.length!==d.length&&(p=function t(e,n,r,i){if(void 0===i&&(i=0),i>50)return console.warn("Maximum recursion depth reached in equalizeSegments"),[e,n];var a=nv(e),o=nv(n),l=a.length,s=o.length,u=a.filter(function(t){return t.l}).length,c=o.filter(function(t){return t.l}).length,f=a.filter(function(t){return t.l}).reduce(function(t,e){return t+e.l},0)/u||0,h=o.filter(function(t){return t.l}).reduce(function(t,e){return t+e.l},0)/c||0,d=r||Math.max(l,s),p=[f,h],y=[d-l,d-s],g=0,v=[a,o].map(function(t,e){return t.l===d?t.map(function(t){return t.s}):t.map(function(t,n){return g=n&&y[e]&&t.l>=p[e],y[e]-=!!g,g?t.ss:[t.s]}).flat()});return v[0].length===v[1].length?v:t(v[0],v[1],d,i+1)}(h,d));var y=nm(p[0])!==nm(p[1])?[["M"].concat((i=(r=p[0]).slice(1).map(function(t,e,n){return e?n[e-1].slice(-2).concat(t.slice(1)):r[0].slice(1).concat(t.slice(1))}).map(function(t){return t.map(function(e,n){return t[t.length-n-2*(1-n%2)]})}).reverse())[0].slice(0,2))].concat(i.map(function(t){return["C"].concat(t.slice(2))})):p[0].map(function(t){return Array.isArray(t)?[].concat(t):t});return[y,(a=p[1],o=a.length-1,l=[],s=0,(c=(u=a.length)-1,f=a.map(function(t,e){return a.map(function(t,n){var r=e+n;return 0===n||a[r]&&"M"===a[r][0]?["M"].concat(a[r].slice(-2)):(r>=u&&(r-=c),a[r])})})).forEach(function(t,e){a.slice(1).forEach(function(t,n){s+=eH(a[(e+n)%o].slice(-2),y[n%o].slice(-2))}),l[e]=s,s=0}),f[l.indexOf(Math.min.apply(null,l))]),function(t){return t}]}function i9(t,e){return[t.points,e.points,function(t){return t}]}var i7=/\s*(\w+)\(([^)]*)\)/g;function at(t){return function(e){var n=0;return t.map(function(t){return null===t?e[n++]:t})}}function ae(t){return t}var an={matrix:["NNNNNN",[null,null,0,0,null,null,0,0,0,0,1,0,null,null,0,1],ae],matrix3d:["NNNNNNNNNNNNNNNN",ae],rotate:["A"],rotateX:["A"],rotateY:["A"],rotateZ:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",at([null,null,new io(1)]),ae],scaleX:["N",at([null,new io(1),new io(1)]),at([null,new io(1)])],scaleY:["N",at([new io(1),null,new io(1)]),at([new io(1),null])],scaleZ:["N",at([new io(1),new io(1),null])],scale3d:["NNN",ae],skew:["Aa",null,ae],skewX:["A",null,at([null,is])],skewY:["A",null,at([is,null])],translate:["Tt",at([null,null,il]),ae],translateX:["T",at([null,il,il]),at([null,il])],translateY:["T",at([il,null,il]),at([il,null])],translateZ:["L",at([il,il,null])],translate3d:["TTL",ae]};function ar(t){for(var e=[],n=t.length,r=0;r<n;r++){var i=t[r],a=i[0],o=i.slice(1);if("translate"===a||"skew"===a?1===o.length&&o.push(0):"scale"===a&&1===o.length&&o.push(o[0]),!an[a])return[];var l=o.map(function(t){return ig(t)});e.push({t:a,d:l})}return e}function ai(t){if(Array.isArray(t))return ar(t);if("none"===(t=(t||"none").trim()))return[];var e,n=[],r=0;for(i7.lastIndex=0;(e=i7.exec(t))&&e.index===r;){r=e.index+e[0].length;var i=e[1],a=an[i];if(!a)break;var o=e[2].split(","),l=a[0];if(l.length<o.length)break;for(var s=[],u=0;u<l.length;u++){var c=o[u],f=l[u],h=void 0;if(void 0===(h=c?({A:function(t){return"0"===t.trim()?is:iR(t)},N:iG,T:iL,L:iC})[f.toUpperCase()](c):({a:is,n:s[0],t:il})[f]))return[];s.push(h)}if(n.push({t:i,d:s}),i7.lastIndex===t.length)return n}return[]}function aa(t){if(Array.isArray(t))return ar(t);if("none"===(t=(t||"none").trim()))return[];var e,n=[],r=0;for(i7.lastIndex=0;(e=i7.exec(t))&&e.index===r;){r=e.index+e[0].length;var i=e[1],a=an[i];if(!a)break;var o=e[2].split(","),l=a[0];if(l.length<o.length)break;for(var s=[],u=0;u<l.length;u++){var c=o[u],f=l[u],h=void 0;if(void 0===(h=c?({A:function(t){return"0"===t.trim()?is:iI(t)},N:iW,T:iN,L:iT})[f.toUpperCase()](c):({a:is,n:s[0],t:il})[f]))return[];s.push(h)}if(n.push({t:i,d:s}),i7.lastIndex===t.length)return n}return[]}function ao(t){switch(t.t){case"rotateX":return[1,0,0,0,0,Math.cos(i=iD(t.d[0])*n4),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1];case"rotateY":return[Math.cos(i=iD(t.d[0])*n4),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[Math.cos(i=iD(t.d[0])*n4),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1,0,0,0,0,1];case"rotate3d":e=t.d[0].value,n=t.d[1].value,r=t.d[2].value;var e,n,r,i=iD(t.d[3])*n4,a=e*e+n*n+r*r;if(0===a)e=1,n=0,r=0;else if(1!==a){var o=Math.sqrt(a);e/=o,n/=o,r/=o}var l=Math.sin(i/2),s=l*Math.cos(i/2),u=l*l;return[1-2*(n*n+r*r)*u,2*(e*n*u+r*s),2*(e*r*u-n*s),0,2*(e*n*u-r*s),1-2*(e*e+r*r)*u,2*(n*r*u+e*s),0,2*(e*r*u+n*s),2*(n*r*u-e*s),1-2*(e*e+n*n)*u,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 c=iD(t.d[0])*n4;return[1,Math.tan(iD(t.d[1])*n4),0,0,Math.tan(c),1,0,0,0,0,1,0,0,0,0,1];case"skewX":return[1,0,0,0,Math.tan(i=iD(t.d[0])*n4),1,0,0,0,0,1,0,0,0,0,1];case"skewY":return[1,Math.tan(i=iD(t.d[0])*n4),0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"translate":return[1,0,0,0,0,1,0,0,0,0,1,0,e=iF(t.d[0],0,null)||0,n=iF(t.d[1],0,null)||0,0,1];case"translateX":return[1,0,0,0,0,1,0,0,0,0,1,0,e=iF(t.d[0],0,null)||0,0,0,1];case"translateY":return[1,0,0,0,0,1,0,0,0,0,1,0,0,n=iF(t.d[0],0,null)||0,0,1];case"translateZ":return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,r=iF(t.d[0],0,null)||0,1];case"translate3d":return e=iF(t.d[0],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,e,n=iF(t.d[1],0,null)||0,r=iF(t.d[2],0,null)||0,1];case"perspective":var f=iF(t.d[0],0,null)||0;return[1,0,0,0,0,1,0,0,0,0,1,f?-1/f:0,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(t){return t.value})}}function al(t,e){return[t[0]*e[0]+t[4]*e[1]+t[8]*e[2]+t[12]*e[3],t[1]*e[0]+t[5]*e[1]+t[9]*e[2]+t[13]*e[3],t[2]*e[0]+t[6]*e[1]+t[10]*e[2]+t[14]*e[3],t[3]*e[0]+t[7]*e[1]+t[11]*e[2]+t[15]*e[3],t[0]*e[4]+t[4]*e[5]+t[8]*e[6]+t[12]*e[7],t[1]*e[4]+t[5]*e[5]+t[9]*e[6]+t[13]*e[7],t[2]*e[4]+t[6]*e[5]+t[10]*e[6]+t[14]*e[7],t[3]*e[4]+t[7]*e[5]+t[11]*e[6]+t[15]*e[7],t[0]*e[8]+t[4]*e[9]+t[8]*e[10]+t[12]*e[11],t[1]*e[8]+t[5]*e[9]+t[9]*e[10]+t[13]*e[11],t[2]*e[8]+t[6]*e[9]+t[10]*e[10]+t[14]*e[11],t[3]*e[8]+t[7]*e[9]+t[11]*e[10]+t[15]*e[11],t[0]*e[12]+t[4]*e[13]+t[8]*e[14]+t[12]*e[15],t[1]*e[12]+t[5]*e[13]+t[9]*e[14]+t[13]*e[15],t[2]*e[12]+t[6]*e[13]+t[10]*e[14]+t[14]*e[15],t[3]*e[12]+t[7]*e[13]+t[11]*e[14]+t[15]*e[15]]}function as(t){var e=[0,0,0],n=[1,1,1],r=[0,0,0],i=[0,0,0,1],a=[0,0,0,1];return!function(t,e,n,r,i,a){if(!(!function(t,e){var n=e[15];if(0===n)return!1;for(var r=1/n,i=0;i<16;i++)t[i]=e[i]*r;return!0}(rt,t)||(tU(re,rt),re[3]=0,re[7]=0,re[11]=0,re[15]=1,1e-8>Math.abs(t1(re))))){var o,l,s,u,c,f,h,d,p,y,g=rt[3],v=rt[7],b=rt[11],x=rt[12],O=rt[13],w=rt[14],k=rt[15];if(0!==g||0!==v||0!==b){if(rn[0]=g,rn[1]=v,rn[2]=b,rn[3]=k,!tJ(re,re))return;tQ(re,re),tH(i,rn,re)}else i[0]=i[1]=i[2]=0,i[3]=1;if(e[0]=x,e[1]=O,e[2]=w,o=rr,l=rt,o[0][0]=l[0],o[0][1]=l[1],o[0][2]=l[2],o[1][0]=l[4],o[1][1]=l[5],o[1][2]=l[6],o[2][0]=l[8],o[2][1]=l[9],o[2][2]=l[10],n[0]=tP(rr[0]),tD(rr[0],rr[0]),r[0]=tB(rr[0],rr[1]),ra(rr[1],rr[1],rr[0],1,-r[0]),n[1]=tP(rr[1]),tD(rr[1],rr[1]),r[0]/=n[1],r[1]=tB(rr[0],rr[2]),ra(rr[2],rr[2],rr[0],1,-r[1]),r[2]=tB(rr[1],rr[2]),ra(rr[2],rr[2],rr[1],1,-r[2]),n[2]=tP(rr[2]),tD(rr[2],rr[2]),r[1]/=n[2],r[2]/=n[2],s=rr[1],u=rr[2],c=s[0],f=s[1],h=s[2],d=u[0],p=u[1],y=u[2],ri[0]=f*y-h*p,ri[1]=h*d-c*y,ri[2]=c*p-f*d,0>tB(rr[0],ri))for(var _=0;_<3;_++)n[_]*=-1,rr[_][0]*=-1,rr[_][1]*=-1,rr[_][2]*=-1;a[0]=.5*Math.sqrt(Math.max(1+rr[0][0]-rr[1][1]-rr[2][2],0)),a[1]=.5*Math.sqrt(Math.max(1-rr[0][0]+rr[1][1]-rr[2][2],0)),a[2]=.5*Math.sqrt(Math.max(1-rr[0][0]-rr[1][1]+rr[2][2],0)),a[3]=.5*Math.sqrt(Math.max(1+rr[0][0]+rr[1][1]+rr[2][2],0)),rr[2][1]>rr[1][2]&&(a[0]=-a[0]),rr[0][2]>rr[2][0]&&(a[1]=-a[1]),rr[1][0]>rr[0][1]&&(a[2]=-a[2])}}(0===t.length?[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]:t.map(ao).reduce(al),e,n,r,i,a),[[e,n,r,a,i]]}var au=function(){function t(t,e){for(var n=[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],r=0;r<4;r++)for(var i=0;i<4;i++)for(var a=0;a<4;a++)n[r][i]+=e[r][a]*t[a][i];return n}return function(e,n,r,i,a){for(var o,l=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],s=0;s<4;s++)l[s][3]=a[s];for(var u=0;u<3;u++)for(var c=0;c<3;c++)l[3][u]+=e[c]*l[c][u];var f=i[0],h=i[1],d=i[2],p=i[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+d*d),y[0][1]=2*(f*h-d*p),y[0][2]=2*(f*d+h*p),y[1][0]=2*(f*h+d*p),y[1][1]=1-2*(f*f+d*d),y[1][2]=2*(h*d-f*p),y[2][0]=2*(f*d-h*p),y[2][1]=2*(h*d+f*p),y[2][2]=1-2*(f*f+h*h),l=t(l,y);var g=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];r[2]&&(g[2][1]=r[2],l=t(l,g)),r[1]&&(g[2][1]=0,g[2][0]=r[0],l=t(l,g)),r[0]&&(g[2][0]=0,g[1][0]=r[0],l=t(l,g));for(var v=0;v<3;v++)for(var b=0;b<3;b++)l[v][b]*=n[v];return 0===(o=l)[0][2]&&0===o[0][3]&&0===o[1][2]&&0===o[1][3]&&0===o[2][0]&&0===o[2][1]&&1===o[2][2]&&0===o[2][3]&&0===o[3][2]&&1===o[3][3]?[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])}}();function ac(t){return t.toFixed(6).replace(".000000","")}function af(t,e){var n,r;return(t.decompositionPair!==e&&(t.decompositionPair=e,n=as(t)),e.decompositionPair!==t&&(e.decompositionPair=t,r=as(e)),null===n[0]||null===r[0])?[[!1],[!0],function(n){return n?e[0].d:t[0].d}]:(n[0].push(0),r[0].push(1),[n,r,function(t){var e=function(t,e,n){var r=function(t,e){for(var n=0,r=0;r<t.length;r++)n+=t[r]*e[r];return n}(t,e);r=eU(r,-1,1);var i=[];if(1===r)i=t;else for(var a=Math.acos(r),o=Math.sin(n*a)/Math.sqrt(1-r*r),l=0;l<4;l++)i.push(t[l]*(Math.cos(n*a)-r*o)+e[l]*o);return i}(n[0][3],r[0][3],t[5]);return au(t[0],t[1],t[2],e,t[4]).map(ac).join(",")}])}function ah(t){return t.replace(/[XY]/,"")}function ad(t){return t.replace(/(X|Y|Z|3d)?$/,"3d")}function ap(t,e,n){var r=!1;if(!t.length||!e.length){t.length||(r=!0,t=e,e=[]);for(var i=0;i<t.length;i++)!function(){var n=t[i],r=n.t,a=n.d,o=+("scale"===r.substring(0,5));e.push({t:r,d:a.map(function(t){return"number"==typeof t?ig(o):ig(o,t.unit)})})}()}var a=[],o=[],l=[];if(t.length!==e.length){var s=af(t,e);a=[s[0]],o=[s[1]],l=[["matrix",[s[2]]]]}else for(var u=0;u<t.length;u++){var c=t[u].t,f=e[u].t,h=t[u].d,d=e[u].d,p=an[c],y=an[f],g=void 0;if("perspective"===c&&"perspective"===f||("matrix"===c||"matrix3d"===c)&&("matrix"===f||"matrix3d"===f)){var v=af([t[u]],[e[u]]);a.push(v[0]),o.push(v[1]),l.push(["matrix",[v[2]]]);continue}if(c===f)g=c;else if(p[2]&&y[2]&&ah(c)===ah(f))g=ah(c),h=p[2](h),d=y[2](d);else if(p[1]&&y[1]&&ad(c)===ad(f))g=ad(c),h=p[1](h),d=y[1](d);else{var b=af(t,e);a=[b[0]],o=[b[1]],l=[["matrix",[b[2]]]];break}for(var x=[],O=[],w=[],k=0;k<h.length;k++){var _=function(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,a="",o=t.value||0,l=e.value||0,s=ia(t.unit),u=t.convertTo(s),c=e.convertTo(s);return u&&c?(o=u.value,l=c.value,a=r8(t.unit)):(io.isLength(t.unit)||io.isLength(e.unit))&&(o=iF(t,i,n),l=iF(e,i,n),a="px"),[o,l,function(t){return r&&(t=Math.max(t,0)),t+a}]}(h[k],d[k],n,!1,k);x[k]=_[0],O[k]=_[1],w.push(_[2])}a.push(x),o.push(O),l.push([g,w])}if(r){var M=a;a=o,o=M}return[a,o,function(t){return t.map(function(t,e){var n=t.map(function(t,n){return l[e][1][n](t)}).join(",");return"matrix"===l[e][0]&&16===n.split(",").length&&(l[e][0]="matrix3d"),"matrix3d"===l[e][0]&&6===n.split(",").length&&(l[e][0]="matrix"),"".concat(l[e][0],"(").concat(n,")")}).join(" ")}]}var ay=rK(function(t){if(eV(t)){if("text-anchor"===t)return[ig(0,"px"),ig(0,"px")];var e=t.split(" ");return(1===e.length&&("top"===e[0]||"bottom"===e[0]?(e[1]=e[0],e[0]="center"):e[1]="center"),2!==e.length)?null:[iL(ag(e[0])),iL(ag(e[1]))]}return[ig(t[0]||0,"px"),ig(t[1]||0,"px")]});function ag(t){return"center"===t?"50%":"left"===t||"top"===t?"0%":"right"===t||"bottom"===t?"100%":t}var av=[{n:"display",k:["none"]},{n:"opacity",int:!0,inh:!0,d:"1",syntax:rm.OPACITY_VALUE},{n:"fillOpacity",int:!0,inh:!0,d:"1",syntax:rm.OPACITY_VALUE},{n:"strokeOpacity",int:!0,inh:!0,d:"1",syntax:rm.OPACITY_VALUE},{n:"fill",int:!0,k:["none"],d:"none",syntax:rm.PAINT},{n:"fillRule",k:["nonzero","evenodd"],d:"nonzero"},{n:"stroke",int:!0,k:["none"],d:"none",syntax:rm.PAINT,l:!0},{n:"shadowType",k:["inner","outer","both"],d:"outer",l:!0},{n:"shadowColor",int:!0,syntax:rm.COLOR},{n:"shadowOffsetX",int:!0,l:!0,d:"0",syntax:rm.LENGTH_PERCENTAGE},{n:"shadowOffsetY",int:!0,l:!0,d:"0",syntax:rm.LENGTH_PERCENTAGE},{n:"shadowBlur",int:!0,l:!0,d:"0",syntax:rm.SHADOW_BLUR},{n:"lineWidth",int:!0,inh:!0,d:"1",l:!0,a:["strokeWidth"],syntax:rm.LENGTH_PERCENTAGE},{n:"increasedLineWidthForHitTesting",inh:!0,d:"0",l:!0,syntax:rm.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:rm.LENGTH_PERCENTAGE_12},{n:"lineDashOffset",int:!0,inh:!0,d:"0",a:["strokeDashoffset"],syntax:rm.LENGTH_PERCENTAGE},{n:"offsetPath",syntax:rm.DEFINED_PATH},{n:"offsetDistance",int:!0,syntax:rm.OFFSET_DISTANCE},{n:"dx",int:!0,l:!0,d:"0",syntax:rm.LENGTH_PERCENTAGE},{n:"dy",int:!0,l:!0,d:"0",syntax:rm.LENGTH_PERCENTAGE},{n:"zIndex",ind:!0,int:!0,d:"0",k:["auto"],syntax:rm.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:rm.FILTER},{n:"clipPath",syntax:rm.DEFINED_PATH},{n:"textPath",syntax:rm.DEFINED_PATH},{n:"textPathSide",k:["left","right"],d:"left"},{n:"textPathStartOffset",l:!0,d:"0",syntax:rm.LENGTH_PERCENTAGE},{n:"transform",p:100,int:!0,k:["none"],d:"none",syntax:rm.TRANSFORM},{n:"transformOrigin",p:100,d:"0 0",l:!0,syntax:rm.TRANSFORM_ORIGIN},{n:"cx",int:!0,l:!0,d:"0",syntax:rm.COORDINATE},{n:"cy",int:!0,l:!0,d:"0",syntax:rm.COORDINATE},{n:"cz",int:!0,l:!0,d:"0",syntax:rm.COORDINATE},{n:"r",int:!0,l:!0,d:"0",syntax:rm.LENGTH_PERCENTAGE},{n:"rx",int:!0,l:!0,d:"0",syntax:rm.LENGTH_PERCENTAGE},{n:"ry",int:!0,l:!0,d:"0",syntax:rm.LENGTH_PERCENTAGE},{n:"x",int:!0,l:!0,d:"0",syntax:rm.COORDINATE},{n:"y",int:!0,l:!0,d:"0",syntax:rm.COORDINATE},{n:"z",int:!0,l:!0,d:"0",syntax:rm.COORDINATE},{n:"width",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:rm.LENGTH_PERCENTAGE},{n:"height",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:rm.LENGTH_PERCENTAGE},{n:"radius",int:!0,l:!0,d:"0",syntax:rm.LENGTH_PERCENTAGE_14},{n:"x1",int:!0,l:!0,syntax:rm.COORDINATE},{n:"y1",int:!0,l:!0,syntax:rm.COORDINATE},{n:"z1",int:!0,l:!0,syntax:rm.COORDINATE},{n:"x2",int:!0,l:!0,syntax:rm.COORDINATE},{n:"y2",int:!0,l:!0,syntax:rm.COORDINATE},{n:"z2",int:!0,l:!0,syntax:rm.COORDINATE},{n:"d",int:!0,l:!0,d:"",syntax:rm.PATH,p:50},{n:"points",int:!0,l:!0,syntax:rm.LIST_OF_POINTS,p:50},{n:"text",l:!0,d:"",syntax:rm.TEXT,p:50},{n:"textTransform",l:!0,inh:!0,k:["capitalize","uppercase","lowercase","none"],d:"none",syntax:rm.TEXT_TRANSFORM,p:51},{n:"font",l:!0},{n:"fontSize",int:!0,inh:!0,d:"16px",l:!0,syntax:rm.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:rm.LENGTH,int:!0,d:"0"},{n:"letterSpacing",l:!0,syntax:rm.LENGTH,int:!0,d:"0"},{n:"miterLimit",l:!0,syntax:rm.NUMBER,d:function(t){return t===nq.PATH||t===nq.POLYGON||t===nq.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:rm.MARKER},{n:"markerEnd",syntax:rm.MARKER},{n:"markerMid",syntax:rm.MARKER},{n:"markerStartOffset",syntax:rm.LENGTH,l:!0,int:!0,d:"0"},{n:"markerEndOffset",syntax:rm.LENGTH,l:!0,int:!0,d:"0"}],am=new Set(av.filter(function(t){return!!t.l}).map(function(t){return t.n})),ab={},ax=(0,tO.A)(function t(e){var n=this;(0,tx.A)(this,t),this.runtime=e,av.forEach(function(t){n.registerMetadata(t)})},[{key:"registerMetadata",value:function(t){[t.n].concat((0,tw.A)(t.a||[])).forEach(function(e){ab[e]=t})}},{key:"getPropertySyntax",value:function(t){return this.runtime.CSSPropertySyntaxFactory[t]}},{key:"processProperties",value:function(t,e){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{skipUpdateAttribute:!1,skipParse:!1,forceUpdateGeometry:!1,usedAttributes:[],memoize:!0};Object.assign(t.attributes,e);var i=t.parsedStyle.clipPath,a=t.parsedStyle.offsetPath,o=t,l=e,s=aO(o);for(var u in l)s.has(u)&&(o.parsedStyle[u]=l[u]);var c=!!r.forceUpdateGeometry;if(!c){for(var f in e)if(am.has(f)){c=!0;break}}var h=aO(t);h.has("fill")&&e.fill&&(t.parsedStyle.fill=iS(e.fill)),h.has("stroke")&&e.stroke&&(t.parsedStyle.stroke=iS(e.stroke)),h.has("shadowColor")&&e.shadowColor&&(t.parsedStyle.shadowColor=iS(e.shadowColor)),h.has("filter")&&e.filter&&(t.parsedStyle.filter=function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if("none"===(e=e.toLowerCase().trim()))return[];for(var n=/\s*([\w-]+)\(([^)]*)\)/g,r=[],i=0;(t=n.exec(e))&&t.index===i;)if(i=t.index+t[0].length,iz.indexOf(t[1])>-1&&r.push({name:t[1],params:t[2].split(" ").map(function(t){return iP(/deg|rad|grad|turn|px|%/g,t)||iS(t)})}),n.lastIndex===e.length)return r;return[]}(e.filter)),h.has("radius")&&!eY(e.radius)&&(t.parsedStyle.radius=iB(e.radius,4)),h.has("lineDash")&&!eY(e.lineDash)&&(t.parsedStyle.lineDash=iB(e.lineDash,"even")),h.has("points")&&e.points&&(t.parsedStyle.points={points:eV(n=e.points)?n.split(" ").map(function(t){var e=t.split(","),n=(0,tM.A)(e,2),r=n[0],i=n[1];return[Number(r),Number(i)]}):n,totalLength:0,segments:[]}),h.has("d")&&""===e.d&&(t.parsedStyle.d=(0,tb.A)({},rv)),h.has("d")&&e.d&&(t.parsedStyle.d=i6(e.d)),h.has("textTransform")&&e.textTransform&&this.runtime.CSSPropertySyntaxFactory[rm.TEXT_TRANSFORM].calculator(null,null,{value:e.textTransform},t,null),h.has("clipPath")&&!nb(e.clipPath)&&this.runtime.CSSPropertySyntaxFactory[rm.DEFINED_PATH].calculator("clipPath",i,e.clipPath,t,this.runtime),h.has("offsetPath")&&e.offsetPath&&this.runtime.CSSPropertySyntaxFactory[rm.DEFINED_PATH].calculator("offsetPath",a,e.offsetPath,t,this.runtime),h.has("transform")&&e.transform&&(t.parsedStyle.transform=ai(e.transform)),h.has("transformOrigin")&&e.transformOrigin&&(t.parsedStyle.transformOrigin=ay(e.transformOrigin)),h.has("markerStart")&&e.markerStart&&(t.parsedStyle.markerStart=this.runtime.CSSPropertySyntaxFactory[rm.MARKER].calculator(null,e.markerStart,e.markerStart,null,null)),h.has("markerEnd")&&e.markerEnd&&(t.parsedStyle.markerEnd=this.runtime.CSSPropertySyntaxFactory[rm.MARKER].calculator(null,e.markerEnd,e.markerEnd,null,null)),h.has("markerMid")&&e.markerMid&&(t.parsedStyle.markerMid=this.runtime.CSSPropertySyntaxFactory[rm.MARKER].calculator("",e.markerMid,e.markerMid,null,null)),h.has("zIndex")&&!eY(e.zIndex)&&this.runtime.CSSPropertySyntaxFactory[rm.Z_INDEX].postProcessor(t),h.has("offsetDistance")&&!eY(e.offsetDistance)&&this.runtime.CSSPropertySyntaxFactory[rm.OFFSET_DISTANCE].postProcessor(t),h.has("transform")&&e.transform&&this.runtime.CSSPropertySyntaxFactory[rm.TRANSFORM].postProcessor(t),h.has("transformOrigin")&&e.transformOrigin&&this.runtime.CSSPropertySyntaxFactory[rm.TRANSFORM_ORIGIN].postProcessor(t),c&&(t.geometry.dirty=!0,t.dirty(!0,!0),r.forceUpdateGeometry||this.runtime.sceneGraphService.dirtyToRoot(t))}},{key:"updateGeometry",value:function(t){var e=t.nodeName,n=this.runtime.geometryUpdaterFactory[e];if(n){var r=t.geometry;r.contentBounds||(r.contentBounds=new nU),r.renderBounds||(r.renderBounds=new nU);var i=t.parsedStyle,a=n.update(i,t),o=a.cx,l=a.cy,s=a.cz,u=a.hwidth,c=void 0===u?0:u,f=a.hheight,h=void 0===f?0:f,d=a.hdepth,p=[Math.abs(c),Math.abs(h),void 0===d?0:d],y=i.stroke,g=i.lineWidth,v=i.increasedLineWidthForHitTesting,b=i.shadowType,x=void 0===b?"outer":b,O=i.shadowColor,w=i.filter,k=i.transformOrigin,_=[void 0===o?0:o,void 0===l?0:l,void 0===s?0:s];r.contentBounds.update(_,p);var M=e===nq.POLYLINE||e===nq.POLYGON||e===nq.PATH?Math.SQRT2:.5;if(y&&!y.isNone){var E=(((void 0===g?1:g)||0)+((void 0===v?0:v)||0))*M;p[0]+=E,p[1]+=E}if(r.renderBounds.update(_,p),O&&x&&"inner"!==x){var A=r.renderBounds,S=A.min,j=A.max,P=i.shadowBlur,T=i.shadowOffsetX,C=i.shadowOffsetY,N=P||0,L=T||0,I=C||0,R=S[0]-N+L,D=j[0]+N+L,B=S[1]-N+I,F=j[1]+N+I;S[0]=Math.min(S[0],R),j[0]=Math.max(j[0],D),S[1]=Math.min(S[1],B),j[1]=Math.max(j[1],F),r.renderBounds.setMinMax(S,j)}(void 0===w?[]:w).forEach(function(t){var e=t.name,n=t.params;if("blur"===e){var i=n[0].value;r.renderBounds.update(r.renderBounds.center,tL(r.renderBounds.halfExtents,r.renderBounds.halfExtents,[i,i,0]))}else if("drop-shadow"===e){var a=n[0].value,o=n[1].value,l=n[2].value,s=r.renderBounds,u=s.min,c=s.max,f=u[0]-l+a,h=c[0]+l+a,d=u[1]-l+o,p=c[1]+l+o;u[0]=Math.min(u[0],f),c[0]=Math.max(c[0],h),u[1]=Math.min(u[1],d),c[1]=Math.max(c[1],p),r.renderBounds.setMinMax(u,c)}}),t.geometry.dirty=!1;var z=h<0,$=(c<0?-1:1)*(k?iF(k[0],0,t,!0):0),W=(z?-1:1)*(k?iF(k[1],1,t,!0):0);($||W)&&t.setOrigin($,W)}}},{key:"updateSizeAttenuation",value:function(t,e){t.style.isSizeAttenuation?(t.style.rawLineWidth||(t.style.rawLineWidth=t.style.lineWidth),t.style.lineWidth=(t.style.rawLineWidth||1)/e,t.nodeName===nq.CIRCLE&&(t.style.rawR||(t.style.rawR=t.style.r),t.style.r=(t.style.rawR||1)/e)):(t.style.rawLineWidth&&(t.style.lineWidth=t.style.rawLineWidth,delete t.style.rawLineWidth),t.nodeName===nq.CIRCLE&&t.style.rawR&&(t.style.r=t.style.rawR,delete t.style.rawR))}}]);function aO(t){return t.constructor.PARSED_STYLE_LIST}var aw=(0,tO.A)(function t(){(0,tx.A)(this,t),this.mixer=iq},[{key:"calculator",value:function(t,e,n,r){return iD(n)}}]),ak=(0,tO.A)(function t(){(0,tx.A)(this,t)},[{key:"calculator",value:function(t,e,n,r,i){return n instanceof ir&&(n=null),i.sceneGraphService.updateDisplayObjectDependency(t,e,n,r),"clipPath"===t&&r.forEach(function(t){0===t.childNodes.length&&i.sceneGraphService.dirtyToRoot(t)}),n}}]),a_=(0,tO.A)(function t(){(0,tx.A)(this,t),this.parser=iS,this.mixer=ij},[{key:"calculator",value:function(t,e,n,r){return n instanceof ir?"none"===n.value?id:ip:n}}]),aM=(0,tO.A)(function t(){(0,tx.A)(this,t)},[{key:"calculator",value:function(t,e,n){return n instanceof ir?[]:n}}]);function aE(t){var e=t.parsedStyle.fontSize;return eY(e)?null:e}var aA=(0,tO.A)(function t(){(0,tx.A)(this,t),this.mixer=iq},[{key:"calculator",value:function(t,e,n,r,i){if(eq(n))return n;if(!io.isRelativeUnit(n.unit))return n.value;if(n.unit===rZ.kPercentage)return 0;if(n.unit===rZ.kEms){if(r.parentNode){var a,o=aE(r.parentNode);if(o)return o*n.value}return 0}if(n.unit===rZ.kRems){if(null!=r&&null!=(a=r.ownerDocument)&&a.documentElement){var l=aE(r.ownerDocument.documentElement);if(l)return l*n.value}return 0}}}]),aS=(0,tO.A)(function t(){(0,tx.A)(this,t),this.mixer=iY},[{key:"calculator",value:function(t,e,n){return n.map(function(t){return t.value})}}]),aj=(0,tO.A)(function t(){(0,tx.A)(this,t),this.mixer=iY},[{key:"calculator",value:function(t,e,n){return n.map(function(t){return t.value})}}]),aP=(0,tO.A)(function t(){(0,tx.A)(this,t)},[{key:"calculator",value:function(t,e,n,r){n instanceof ir&&(n=null);var i,a=null==(i=n)?void 0:i.cloneNode(!0);return a&&(a.style.isMarker=!0),a}}]),aT=(0,tO.A)(function t(){(0,tx.A)(this,t),this.mixer=iq},[{key:"calculator",value:function(t,e,n){return n.value}}]),aC=(0,tO.A)(function t(){(0,tx.A)(this,t),this.mixer=iH(0,1)},[{key:"calculator",value:function(t,e,n){return n.value}},{key:"postProcessor",value:function(t){var e=t.parsedStyle,n=e.offsetPath,r=e.offsetDistance;if(n){var i=n.nodeName;if(i===nq.LINE||i===nq.PATH||i===nq.POLYLINE){var a=n.getPoint(r);a&&t.setLocalPosition(a.x,a.y)}}}}]),aN=(0,tO.A)(function t(){(0,tx.A)(this,t),this.mixer=iH(0,1)},[{key:"calculator",value:function(t,e,n){return n.value}}]),aL=(0,tO.A)(function t(){(0,tx.A)(this,t),this.parser=i6,this.mixer=i8},[{key:"calculator",value:function(t,e,n){return n instanceof ir&&"unset"===n.value?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new nJ(0,0,0,0)}:n}}]),aI=(0,tO.A)(function t(){(0,tx.A)(this,t),this.mixer=i9}),aR=function(t){function e(){var t;(0,tx.A)(this,e);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=(0,tk.A)(this,e,[].concat(r))).mixer=iH(0,1/0),t}return(0,t_.A)(e,t),(0,tO.A)(e)}(aA),aD=(0,tO.A)(function t(){(0,tx.A)(this,t)},[{key:"calculator",value:function(t,e,n,r){return n instanceof ir?"unset"===n.value?"":n.value:"".concat(n)}},{key:"postProcessor",value:function(t){t.nodeValue="".concat(t.parsedStyle.text)||""}}]),aB=(0,tO.A)(function t(){(0,tx.A)(this,t)},[{key:"calculator",value:function(t,e,n,r){var i=r.getAttribute("text");if(i){var a=i;"capitalize"===n.value?a=i.charAt(0).toUpperCase()+i.slice(1):"lowercase"===n.value?a=i.toLowerCase():"uppercase"===n.value&&(a=i.toUpperCase()),r.parsedStyle.text=a}return n.value}}]),aF=new WeakMap,az="u">typeof window&&void 0!==window.document;function a$(t,e){var n=Number(t.parsedStyle.zIndex||0),r=Number(e.parsedStyle.zIndex||0);if(n===r){var i=t.parentNode;if(i){var a=i.childNodes||[];return a.indexOf(t)-a.indexOf(e)}}return n-r}function aW(t){var e,n=t;do{if(null==(e=n.parsedStyle)?void 0:e.clipPath)return n;n=n.parentElement}while(null!==n);return null}function aG(t,e){if(az)return document.defaultView.getComputedStyle(t,null).getPropertyValue(e)}var aq={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"},aH="object"==typeof performance&&performance.now?performance:Date;function aY(t){return t.nodeName===nq.FRAGMENT||t.getRootNode().nodeName===nq.FRAGMENT}function aV(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"auto",e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=!1,i=!1,a=!!e&&!e.isNone,o=!!n&&!n.isNone;return"visiblepainted"===t||"painted"===t||"auto"===t?(r=a,i=o):"visiblefill"===t||"fill"===t?r=!0:"visiblestroke"===t||"stroke"===t?i=!0:("visible"===t||"all"===t)&&(r=!0,i=!0),[r,i]}var aU=1,aX="object"==typeof self&&self.self===self?self:"object"==typeof n.g&&n.g.global===n.g?n.g:{},aK=Date.now(),aZ={},aQ=Date.now(),aJ=function(t){if("function"!=typeof t)throw TypeError("".concat(t," is not a function"));var e=Date.now(),n=e-aQ,r=aU++;return aZ[r]=t,Object.keys(aZ).length>1||setTimeout(function(){aQ=e;var t=aZ;aZ={},Object.keys(t).forEach(function(e){return t[e](aX.performance&&"function"==typeof aX.performance.now?aX.performance.now():Date.now()-aK)})},n>16?0:16-n),r},a0=function(t){return"string"!=typeof t?aJ:""===t?aX.requestAnimationFrame:aX["".concat(t,"RequestAnimationFrame")]},a1=function(t,e){for(var n=0;void 0!==t[n];){if(e(t[n]))return t[n];n+=1}}(["","webkit","moz","ms","o"],function(t){return!!a0(t)}),a2=a0(a1),a5="string"!=typeof a1?function(t){delete aZ[t]}:""===a1?aX.cancelAnimationFrame:aX["".concat(a1,"CancelAnimationFrame")]||aX["".concat(a1,"CancelRequestAnimationFrame")];aX.requestAnimationFrame=a2,aX.cancelAnimationFrame=a5;var a3=(0,tO.A)(function t(){(0,tx.A)(this,t),this.callbacks=[]},[{key:"getCallbacksNum",value:function(){return this.callbacks.length}},{key:"tapPromise",value:function(t,e){this.callbacks.push(e)}},{key:"promise",value:function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return Promise.all(this.callbacks.map(function(t){return t.apply(void 0,e)}))}}]),a4=(0,tO.A)(function t(){(0,tx.A)(this,t),this.callbacks=[]},[{key:"tapPromise",value:function(t,e){this.callbacks.push(e)}},{key:"promise",value:(M6=(0,nF.A)((0,nB.A)().mark(function t(){var e,n,r,i,a=arguments;return(0,nB.A)().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.callbacks.length){t.next=6;break}return t.next=1,(e=this.callbacks)[0].apply(e,a);case 1:n=t.sent,r=0;case 2:if(!(r<this.callbacks.length-1)){t.next=5;break}return i=this.callbacks[r],t.next=3,i(n);case 3:n=t.sent;case 4:r++,t.next=2;break;case 5:return t.abrupt("return",n);case 6:return t.abrupt("return",null);case 7:case"end":return t.stop()}},t,this)})),function(){return M6.apply(this,arguments)})}]),a6=(0,tO.A)(function t(){(0,tx.A)(this,t),this.callbacks=[]},[{key:"tap",value:function(t,e){this.callbacks.push(e)}},{key:"call",value:function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=arguments;this.callbacks.forEach(function(t){t.apply(void 0,r)})}}]),a8=(0,tO.A)(function t(){(0,tx.A)(this,t),this.callbacks=[]},[{key:"tap",value:function(t,e){this.callbacks.push(e)}},{key:"call",value:function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];if(this.callbacks.length){for(var r=arguments,i=this.callbacks[0].apply(void 0,r),a=0;a<this.callbacks.length-1;a++)i=(0,this.callbacks[a])(i);return i}return null}}]),a9=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],a7=/([\"\'])[^\'\"]+\1/;function ot(t){var e=t.fontSize,n=t.fontFamily,r=t.fontStyle,i=t.fontVariant,a=t.fontWeight;return{fontSize:void 0===e?16:e,fontFamily:void 0===n?"sans-serif":n,fontStyle:void 0===r?"normal":r,fontVariant:void 0===i?"normal":i,fontWeight:void 0===a?"normal":a}}var oe=rK(function(t){for(var e=ot(t),n=e.fontSize,r=e.fontFamily,i=e.fontStyle,a=e.fontVariant,o=e.fontWeight,l=eq(n)&&"".concat(n,"px")||"16px",s=r.split(","),u=s.length-1;u>=0;u--){var c=s[u].trim();!a7.test(c)&&0>a9.indexOf(c)&&(c='"'.concat(c,'"')),s[u]=c}return"".concat(i," ").concat(a," ").concat(o," ").concat(l," ").concat(s.join(","))},function(t){var e=ot(t),n=e.fontSize,r=e.fontFamily,i=e.fontStyle,a=e.fontVariant,o=e.fontWeight;return"".concat(i,"_").concat(a,"_").concat(o,"_").concat(n,"_").concat(r)}),on=function(t){return Math.max(t,1e-6)};function or(t,e,n){return tZ(t),t[4]=Math.tan(e),t[1]=Math.tan(n),t}var oi=tY(),oa=tY(),oo={scale:function(t){et(oi,[t[0].value,t[1].value,1].map(function(t){return on(t)}))},scaleX:function(t){et(oi,[t[0].value,1,1].map(function(t){return on(t)}))},scaleY:function(t){et(oi,[1,t[0].value,1].map(function(t){return on(t)}))},scaleZ:function(t){et(oi,[1,1,t[0].value].map(function(t){return on(t)}))},scale3d:function(t){et(oi,[t[0].value,t[1].value,t[2].value].map(function(t){return on(t)}))},translate:function(t){t7(oi,[t[0].value,t[1].value,0])},translateX:function(t){t7(oi,[t[0].value,0,0])},translateY:function(t){t7(oi,[0,t[0].value,0])},translateZ:function(t){t7(oi,[0,0,t[0].value])},translate3d:function(t){t7(oi,[t[0].value,t[1].value,t[2].value])},rotate:function(t){ei(oi,iD(t[0])*n4)},rotateX:function(t){en(oi,iD(t[0])*n4)},rotateY:function(t){er(oi,iD(t[0])*n4)},rotateZ:function(t){ei(oi,iD(t[0])*n4)},rotate3d:function(t){ee(oi,iD(t[3])*n4,[t[0].value,t[1].value,t[2].value])},skew:function(t){or(oi,t[0].value*n4,t[1].value*n4)},skewX:function(t){or(oi,t[0].value*n4,0)},skewY:function(t){or(oi,0,t[0].value*n4)},matrix:function(t){tK(oi,t[0].value,t[1].value,0,0,t[2].value,t[3].value,0,0,0,0,1,0,t[4].value,t[5].value,0,1)},matrix3d:function(t){tK.apply(Z,[oi].concat((0,tw.A)(t.map(function(t){return t.value}))))}},ol=tT(1,1,1),os=tS(),ou={translate:function(t,e){le.sceneGraphService.setLocalScale(t,ol,!1),le.sceneGraphService.setLocalEulerAngles(t,os,void 0,void 0,!1),le.sceneGraphService.setLocalPosition(t,[e[0].value,e[1].value,0],!1),le.sceneGraphService.dirtyLocalTransform(t,t.transformable)}};function oc(t,e){if(t.length){if(1===t.length&&ou[t[0].t])return void ou[t[0].t](e,t[0].d);for(var n=tZ(oa),r=0;r<t.length;r++){var i=t[r],a=i.t,o=i.d,l=oo[a];l&&(l(o),eC(n,n,oi))}e.setLocalTransform(n)}else e.resetLocalTransform();return e.getLocalTransform()}var of=(0,tO.A)(function t(){(0,tx.A)(this,t),this.parser=aa,this.mixer=ap},[{key:"calculator",value:function(t,e,n,r){return n instanceof ir?[]:n}},{key:"postProcessor",value:function(t){oc(t.parsedStyle.transform,t)}}]),oh=(0,tO.A)(function t(){(0,tx.A)(this,t)},[{key:"postProcessor",value:function(t){var e=t.parsedStyle.transformOrigin;e[0].unit===rZ.kPixels&&e[1].unit===rZ.kPixels?t.setOrigin(e[0].value,e[1].value):t.getGeometryBounds()}}]),od=(0,tO.A)(function t(){(0,tx.A)(this,t)},[{key:"calculator",value:function(t,e,n,r){return n.value}},{key:"postProcessor",value:function(t){if(t.parentNode){var e=t.parentNode,n=e.renderable,r=e.sortable;n&&e.dirty(),r&&(r.dirty=!0,r.dirtyReason=rh.Z_INDEX_CHANGED)}}}]),op=(0,tO.A)(function t(){(0,tx.A)(this,t)},[{key:"update",value:function(t,e){var n=t.cx,r=t.cy,i=t.r,a=void 0===i?0:i;return{cx:void 0===n?0:n,cy:void 0===r?0:r,hwidth:a,hheight:a}}}]),oy=(0,tO.A)(function t(){(0,tx.A)(this,t)},[{key:"update",value:function(t,e){var n=t.cx,r=t.cy,i=t.rx,a=t.ry;return{cx:void 0===n?0:n,cy:void 0===r?0:r,hwidth:void 0===i?0:i,hheight:void 0===a?0:a}}}]),og=(0,tO.A)(function t(){(0,tx.A)(this,t)},[{key:"update",value:function(t){var e=t.x1,n=t.y1,r=t.x2,i=t.y2,a=Math.min(e,r),o=Math.min(n,i),l=(Math.max(e,r)-a)/2,s=(Math.max(n,i)-o)/2;return{cx:a+l,cy:o+s,hwidth:l,hheight:s}}}]),ov=(0,tO.A)(function t(){(0,tx.A)(this,t)},[{key:"update",value:function(t){var e=t.d.rect,n=e.x,r=e.y,i=e.width,a=e.height,o=i/2,l=a/2;return{cx:n+o,cy:r+l,hwidth:o,hheight:l}}}]),om=(0,tO.A)(function t(){(0,tx.A)(this,t)},[{key:"update",value:function(t){if(t.points&&ns(t.points.points)){var e=t.points.points,n=Math.min.apply(Math,(0,tw.A)(e.map(function(t){return t[0]}))),r=Math.max.apply(Math,(0,tw.A)(e.map(function(t){return t[0]}))),i=Math.min.apply(Math,(0,tw.A)(e.map(function(t){return t[1]}))),a=Math.max.apply(Math,(0,tw.A)(e.map(function(t){return t[1]}))),o=(r-n)/2,l=(a-i)/2;return{cx:n+o,cy:i+l,hwidth:o,hheight:l}}return{cx:0,cy:0,hwidth:0,hheight:0}}}]),ob=(0,tO.A)(function t(){(0,tx.A)(this,t)},[{key:"update",value:function(t,e){var n=t.x,r=t.y,i=t.src,a=t.width,o=t.height,l=void 0===a?0:a,s=void 0===o?0:o;return i&&!eV(i)&&(l||(t.width=l=i.width),s||(t.height=s=i.height)),{cx:(void 0===n?0:n)+l/2,cy:(void 0===r?0:r)+s/2,hwidth:l/2,hheight:s/2}}}]),ox=(0,tO.A)(function t(e){(0,tx.A)(this,t),this.globalRuntime=e},[{key:"isReadyToMeasure",value:function(t,e){return t.text}},{key:"update",value:function(t,e){var n,r=t.text,i=t.textAlign,a=void 0===i?"start":i,o=t.lineWidth,l=void 0===o?1:o,s=t.textBaseline,u=void 0===s?"alphabetic":s,c=t.dx,f=void 0===c?0:c,h=t.dy,d=void 0===h?0:h,p=t.x,y=t.y;if(!this.isReadyToMeasure(t,e))return t.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 g=((null==e||null==(n=e.ownerDocument)||null==(n=n.defaultView)?void 0:n.getConfig())||{}).offscreenCanvas,v=this.globalRuntime.textService.measureText(r,t,g);t.metrics=v;var b=v.width,x=v.height,O=b/2,w=x/2,k=(void 0===p?0:p)+O;"center"===a||"middle"===a?k+=l/2-O:("right"===a||"end"===a)&&(k+=l-2*O);var _=(void 0===y?0:y)-w;return"middle"===u?_+=w:"top"===u||"hanging"===u?_+=2*w:"alphabetic"===u||("bottom"===u||"ideographic"===u)&&(_+=0),f&&(k+=f),d&&(_+=d),{cx:k,cy:_,hwidth:O,hheight:w}}}]),oO=(0,tO.A)(function t(){(0,tx.A)(this,t)},[{key:"update",value:function(t,e){return{cx:0,cy:0,hwidth:0,hheight:0}}}]),ow=(0,tO.A)(function t(){(0,tx.A)(this,t)},[{key:"update",value:function(t,e){var n=t.x,r=t.y,i=t.width,a=void 0===i?0:i,o=t.height,l=void 0===o?0:o;return{cx:(void 0===n?0:n)+a/2,cy:(void 0===r?0:r)+l/2,hwidth:a/2,hheight:l/2}}}]),ok=function(){function t(e){(0,tx.A)(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 nQ,this.page=new nQ,this.canvas=new nQ,this.viewport=new nQ,this.composed=!1,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=e}return(0,tO.A)(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 Error(n0)}}])}(),o_=function(t){function e(){var t;(0,tx.A)(this,e);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=(0,tk.A)(this,e,[].concat(r))).client=new nQ,t.movement=new nQ,t.offset=new nQ,t.global=new nQ,t.screen=new nQ,t}return(0,t_.A)(e,t),(0,tO.A)(e,[{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(t){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(t)}},{key:"initMouseEvent",value:function(){throw Error(n0)}}])}(ok),oM=function(t){function e(){var t;(0,tx.A)(this,e);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=(0,tk.A)(this,e,[].concat(r))).width=0,t.height=0,t.isPrimary=!1,t}return(0,t_.A)(e,t),(0,tO.A)(e,[{key:"getCoalescedEvents",value:function(){return"pointermove"===this.type||"mousemove"===this.type||"touchmove"===this.type?[this]:[]}},{key:"getPredictedEvents",value:function(){throw Error("getPredictedEvents is not supported!")}},{key:"clone",value:function(){return this.manager.clonePointerEvent(this)}}])}(o_),oE=function(t){function e(){return(0,tx.A)(this,e),(0,tk.A)(this,e,arguments)}return(0,t_.A)(e,t),(0,tO.A)(e,[{key:"clone",value:function(){return this.manager.cloneWheelEvent(this)}}])}(o_),oA=function(t){function e(t,n){var r;return(0,tx.A)(this,e),(r=(0,tk.A)(this,e,[null])).type=t,r.detail=n,Object.assign(r,n),r}return(0,t_.A)(e,t),(0,tO.A)(e)}(ok),oS=(0,tO.A)(function t(){(0,tx.A)(this,t),this.emitter=new tE},[{key:"on",value:function(t,e,n){return this.addEventListener(t,e,n),this}},{key:"addEventListener",value:function(t,e,n){var r=!1,i=!1;if(nw(n))r=n;else if(n){var a=n.capture;r=void 0!==a&&a;var o=n.once;i=void 0!==o&&o}r&&(t+="capture"),e=nk(e)?e:e.handleEvent;var l=nk(e)?void 0:e;return i?this.emitter.once(t,e,l):this.emitter.on(t,e,l),this}},{key:"off",value:function(t,e,n){return t?this.removeEventListener(t,e,n):this.removeAllEventListeners(),this}},{key:"removeAllEventListeners",value:function(){var t;null==(t=this.emitter)||t.removeAllListeners()}},{key:"removeEventListener",value:function(t,e,n){if(!this.emitter)return this;(nw(n)?n:null==n?void 0:n.capture)&&(t+="capture"),e=nk(e)?e:null==(r=e)?void 0:r.handleEvent;var r,i=nk(e)?void 0:e;return this.emitter.off(t,e,i),this}},{key:"emit",value:function(t,e){this.dispatchEvent(new oA(t,e))}},{key:"dispatchEventToSelf",value:function(t){t.target||(t.target=this),t.currentTarget=this,this.emitter.emit(t.type,t)}},{key:"dispatchEvent",value:function(t){var e,n,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2?arguments[2]:void 0;if(i)return this.dispatchEventToSelf(t),!0;if(e=this.document?this:this.defaultView?this.defaultView:null==(n=this.ownerDocument)?void 0:n.defaultView){if(t.manager=e.getEventService(),!t.manager)return!1;t.defaultPrevented=!1,t.path?t.path.length=0:t.page=[],r||(t.target=this),t.manager.dispatchEvent(t,t.type,r)}else this.dispatchEventToSelf(t);return!t.defaultPrevented}}]),oj=function(t){function e(){var t;(0,tx.A)(this,e);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=(0,tk.A)(this,e,[].concat(r))).shadow=!1,t.ownerDocument=null,t.isConnected=!1,t.baseURI="",t.childNodes=[],t.nodeType=0,t.nodeName="",t.nodeValue=null,t.parentNode=null,t.destroyed=!1,t}return(0,t_.A)(e,t),(0,tO.A)(e,[{key:"textContent",get:function(){var t="";this.nodeName===nq.TEXT&&(t+=this.style.text);var e,n=(0,nz.A)(this.childNodes);try{for(n.s();!(e=n.n()).done;){var r=e.value;r.nodeName===nq.TEXT?t+=r.nodeValue:t+=r.textContent}}catch(t){n.e(t)}finally{n.f()}return t},set:function(t){var e=this;this.childNodes.slice().forEach(function(t){e.removeChild(t)}),this.nodeName===nq.TEXT&&(this.style.text="".concat(t))}},{key:"getRootNode",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.parentNode?this.parentNode.getRootNode(t):t.composed&&this.host?this.host.getRootNode(t):this}},{key:"hasChildNodes",value:function(){return this.childNodes.length>0}},{key:"isDefaultNamespace",value:function(t){throw Error(n0)}},{key:"lookupNamespaceURI",value:function(t){throw Error(n0)}},{key:"lookupPrefix",value:function(t){throw Error(n0)}},{key:"normalize",value:function(){throw Error(n0)}},{key:"isEqualNode",value:function(t){return this===t}},{key:"isSameNode",value:function(t){return this.isEqualNode(t)}},{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(t){if(t===this)return 0;for(var n,r=t,i=this,a=[r],o=[i];null!=(n=r.parentNode)?n:i.parentNode;)r=r.parentNode?(a.push(r.parentNode),r.parentNode):r,i=i.parentNode?(o.push(i.parentNode),i.parentNode):i;if(r!==i)return e.DOCUMENT_POSITION_DISCONNECTED|e.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|e.DOCUMENT_POSITION_PRECEDING;var l=a.length>o.length?a:o,s=l===a?o:a;if(l[l.length-s.length]===s[0])return l===a?e.DOCUMENT_POSITION_CONTAINED_BY|e.DOCUMENT_POSITION_FOLLOWING:e.DOCUMENT_POSITION_CONTAINS|e.DOCUMENT_POSITION_PRECEDING;for(var u=l.length-s.length,c=s.length-1;c>=0;c--){var f=s[c],h=l[u+c];if(h!==f){var d=f.parentNode.childNodes;if(d.indexOf(f)<d.indexOf(h)){if(s===a)return e.DOCUMENT_POSITION_PRECEDING;return e.DOCUMENT_POSITION_FOLLOWING}if(l===a)return e.DOCUMENT_POSITION_PRECEDING;break}}return e.DOCUMENT_POSITION_FOLLOWING}},{key:"contain",value:function(t){return this.contains(t)}},{key:"contains",value:function(t){for(var e=t;e&&this!==e;)e=e.parentNode;return!!e}},{key:"getAncestor",value:function(t){for(var e=this;t>0&&e;)e=e.parentNode,t--;return e}},{key:"forEach",value:function(t){for(var e=[this];e.length>0;){var n=e.pop();if(!1===t(n))break;for(var r=n.childNodes.length-1;r>=0;r--)e.push(n.childNodes[r])}}}],[{key:"isNode",value:function(t){return!!t.childNodes}}])}(oS);oj.DOCUMENT_POSITION_DISCONNECTED=1,oj.DOCUMENT_POSITION_PRECEDING=2,oj.DOCUMENT_POSITION_FOLLOWING=4,oj.DOCUMENT_POSITION_CONTAINS=8,oj.DOCUMENT_POSITION_CONTAINED_BY=16,oj.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32;var oP=(0,tO.A)(function t(e,n){var r=this;(0,tx.A)(this,t),this.nativeHTMLMap=new WeakMap,this.cursor="default",this.mappingTable={},this.mappingState={trackingData:{}},this.eventPool=new Map,this.tmpMatrix=tY(),this.tmpVec3=tS(),this.onPointerDown=function(t){var e=r.createPointerEvent(t);if(r.dispatchEvent(e,"pointerdown"),"touch"===e.pointerType)r.dispatchEvent(e,"touchstart");else if("mouse"===e.pointerType||"pen"===e.pointerType){var n=2===e.button;r.dispatchEvent(e,n?"rightdown":"mousedown")}r.trackingData(t.pointerId).pressTargetsByButton[t.button]=e.composedPath(),r.freeEvent(e)},this.onPointerUp=function(t){var e=aH.now(),n=r.createPointerEvent(t,void 0,void 0,r.context.config.alwaysTriggerPointerEventOnCanvas?r.rootTarget:void 0);if(r.dispatchEvent(n,"pointerup"),"touch"===n.pointerType)r.dispatchEvent(n,"touchend");else if("mouse"===n.pointerType||"pen"===n.pointerType){var i=2===n.button;r.dispatchEvent(n,i?"rightup":"mouseup")}var a=r.trackingData(t.pointerId),o=r.findMountedTarget(a.pressTargetsByButton[t.button]),l=o;if(o&&!n.composedPath().includes(o)){for(var s=o;s&&!n.composedPath().includes(s);){if(n.currentTarget=s,r.notifyTarget(n,"pointerupoutside"),"touch"===n.pointerType)r.notifyTarget(n,"touchendoutside");else if("mouse"===n.pointerType||"pen"===n.pointerType){var u=2===n.button;r.notifyTarget(n,u?"rightupoutside":"mouseupoutside")}oj.isNode(s)&&(s=s.parentNode)}delete a.pressTargetsByButton[t.button],l=s}if(l){var c,f=r.clonePointerEvent(n,"click");f.target=l,f.path=[],a.clicksByButton[t.button]||(a.clicksByButton[t.button]={clickCount:0,target:f.target,timeStamp:e});var h=r.context.renderingContext.root.ownerDocument.defaultView,d=a.clicksByButton[t.button];d.target===f.target&&e-d.timeStamp<h.getConfig().dblClickSpeed?++d.clickCount:d.clickCount=1,d.target=f.target,d.timeStamp=e,f.detail=d.clickCount,null!=(c=n.detail)&&c.preventClick||(r.context.config.useNativeClickEvent||"mouse"!==f.pointerType&&"touch"!==f.pointerType||r.dispatchEvent(f,"click"),r.dispatchEvent(f,"pointertap")),r.freeEvent(f)}r.freeEvent(n)},this.onPointerMove=function(t){var e=r.createPointerEvent(t,void 0,void 0,r.context.config.alwaysTriggerPointerEventOnCanvas?r.rootTarget:void 0),n="mouse"===e.pointerType||"pen"===e.pointerType,i=r.trackingData(t.pointerId),a=r.findMountedTarget(i.overTargets);if(i.overTargets&&a!==e.target){var o="mousemove"===t.type?"mouseout":"pointerout",l=r.createPointerEvent(t,o,a||void 0);if(r.dispatchEvent(l,"pointerout"),n&&r.dispatchEvent(l,"mouseout"),!e.composedPath().includes(a)){var s=r.createPointerEvent(t,"pointerleave",a||void 0);for(s.eventPhase=s.AT_TARGET;s.target&&!e.composedPath().includes(s.target);)s.currentTarget=s.target,r.notifyTarget(s),n&&r.notifyTarget(s,"mouseleave"),oj.isNode(s.target)&&(s.target=s.target.parentNode);r.freeEvent(s)}r.freeEvent(l)}if(a!==e.target){var u="mousemove"===t.type?"mouseover":"pointerover",c=r.clonePointerEvent(e,u);r.dispatchEvent(c,"pointerover"),n&&r.dispatchEvent(c,"mouseover");for(var f=a&&oj.isNode(a)&&a.parentNode;f&&f!==(oj.isNode(r.rootTarget)&&r.rootTarget.parentNode)&&f!==e.target;)f=f.parentNode;if(!f||f===(oj.isNode(r.rootTarget)&&r.rootTarget.parentNode)){var h=r.clonePointerEvent(e,"pointerenter");for(h.eventPhase=h.AT_TARGET;h.target&&h.target!==a&&h.target!==(oj.isNode(r.rootTarget)&&r.rootTarget.parentNode);)h.currentTarget=h.target,r.notifyTarget(h),n&&r.notifyTarget(h,"mouseenter"),oj.isNode(h.target)&&(h.target=h.target.parentNode);r.freeEvent(h)}r.freeEvent(c)}r.dispatchEvent(e,"pointermove"),"touch"===e.pointerType&&r.dispatchEvent(e,"touchmove"),n&&(r.dispatchEvent(e,"mousemove"),r.cursor=r.getCursor(e.target)),i.overTargets=e.composedPath(),r.freeEvent(e)},this.onPointerOut=function(t){var e=r.trackingData(t.pointerId);if(e.overTargets){var n="mouse"===t.pointerType||"pen"===t.pointerType,i=r.findMountedTarget(e.overTargets),a=r.createPointerEvent(t,"pointerout",i||void 0);r.dispatchEvent(a),n&&r.dispatchEvent(a,"mouseout");var o=r.createPointerEvent(t,"pointerleave",i||void 0);for(o.eventPhase=o.AT_TARGET;o.target&&o.target!==(oj.isNode(r.rootTarget)&&r.rootTarget.parentNode);)o.currentTarget=o.target,r.notifyTarget(o),n&&r.notifyTarget(o,"mouseleave"),oj.isNode(o.target)&&(o.target=o.target.parentNode);e.overTargets=null,r.freeEvent(a),r.freeEvent(o)}r.cursor=null},this.onPointerOver=function(t){var e=r.trackingData(t.pointerId),n=r.createPointerEvent(t),i="mouse"===n.pointerType||"pen"===n.pointerType;r.dispatchEvent(n,"pointerover"),i&&r.dispatchEvent(n,"mouseover"),"mouse"===n.pointerType&&(r.cursor=r.getCursor(n.target));var a=r.clonePointerEvent(n,"pointerenter");for(a.eventPhase=a.AT_TARGET;a.target&&a.target!==(oj.isNode(r.rootTarget)&&r.rootTarget.parentNode);)a.currentTarget=a.target,r.notifyTarget(a),i&&r.notifyTarget(a,"mouseenter"),oj.isNode(a.target)&&(a.target=a.target.parentNode);e.overTargets=n.composedPath(),r.freeEvent(n),r.freeEvent(a)},this.onPointerUpOutside=function(t){var e=r.trackingData(t.pointerId),n=r.findMountedTarget(e.pressTargetsByButton[t.button]),i=r.createPointerEvent(t);if(n){for(var a=n;a;)i.currentTarget=a,r.notifyTarget(i,"pointerupoutside"),"touch"===i.pointerType||("mouse"===i.pointerType||"pen"===i.pointerType)&&r.notifyTarget(i,2===i.button?"rightupoutside":"mouseupoutside"),oj.isNode(a)&&(a=a.parentNode);delete e.pressTargetsByButton[t.button]}r.freeEvent(i)},this.onWheel=function(t){var e=r.createWheelEvent(t);r.dispatchEvent(e),r.freeEvent(e)},this.onClick=function(t){if(r.context.config.useNativeClickEvent){var e=r.createPointerEvent(t);r.dispatchEvent(e),r.freeEvent(e)}},this.onPointerCancel=function(t){var e=r.createPointerEvent(t,void 0,void 0,r.context.config.alwaysTriggerPointerEventOnCanvas?r.rootTarget:void 0);r.dispatchEvent(e),r.freeEvent(e)},this.globalRuntime=e,this.context=n},[{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 t=this.context.contextService.getBoundingClientRect(),e=1,n=1,r=this.context.contextService.getDomElement();if(r&&t){var i=r.offsetWidth,a=r.offsetHeight;i&&a&&(e=t.width/i,n=t.height/a)}return{scaleX:e,scaleY:n,bbox:t}}},{key:"client2Viewport",value:function(t){var e=this.getScale(),n=e.scaleX,r=e.scaleY,i=e.bbox;return new nQ((t.x-((null==i?void 0:i.left)||0))/n,(t.y-((null==i?void 0:i.top)||0))/r)}},{key:"viewport2Client",value:function(t){var e=this.getScale(),n=e.scaleX,r=e.scaleY,i=e.bbox;return new nQ((t.x+((null==i?void 0:i.left)||0))*n,(t.y+((null==i?void 0:i.top)||0))*r)}},{key:"viewport2Canvas",value:function(t){var e=t.x,n=t.y,r=this.rootTarget.defaultView.getCamera(),i=this.context.config,a=i.width,o=i.height,l=r.getPerspectiveInverse(),s=r.getWorldTransform(),u=t2(this.tmpMatrix,s,l),c=tN(this.tmpVec3,e/a*2-1,(1-n/o)*2-1,0);return tz(c,c,u),new nQ(c[0],c[1])}},{key:"canvas2Viewport",value:function(t){var e=this.rootTarget.defaultView.getCamera(),n=e.getPerspective(),r=e.getViewTransform(),i=t2(this.tmpMatrix,n,r),a=tN(this.tmpVec3,t.x,t.y,0);tz(this.tmpVec3,this.tmpVec3,i);var o=this.context.config,l=o.width,s=o.height;return new nQ((a[0]+1)/2*l,(1-(a[1]+1)/2)*s)}},{key:"setPickHandler",value:function(t){this.pickHandler=t}},{key:"addEventMapping",value:function(t,e){this.mappingTable[t]||(this.mappingTable[t]=[]),this.mappingTable[t].push({fn:e,priority:0}),this.mappingTable[t].sort(function(t,e){return t.priority-e.priority})}},{key:"mapEvent",value:function(t){if(this.rootTarget){var e=this.mappingTable[t.type];if(e)for(var n=0,r=e.length;n<r;n++)e[n].fn(t);else console.warn("[EventService]: Event mapping not defined for ".concat(t.type))}}},{key:"dispatchEvent",value:function(t,e,n){n?(t.eventPhase=t.AT_TARGET,t.currentTarget=this.rootTarget.defaultView||null,this.notifyListeners(t,e)):(t.propagationStopped=!1,t.propagationImmediatelyStopped=!1,this.propagate(t,e))}},{key:"propagate",value:function(t,e){if(t.target){var n=t.composedPath();t.eventPhase=t.CAPTURING_PHASE;for(var r=n.length-1;r>=1;r--)if(t.currentTarget=n[r],this.notifyTarget(t,e),t.propagationStopped||t.propagationImmediatelyStopped)return;if(t.eventPhase=t.AT_TARGET,t.currentTarget=t.target,this.notifyTarget(t,e),!t.propagationStopped&&!t.propagationImmediatelyStopped){var i=n.indexOf(t.currentTarget);t.eventPhase=t.BUBBLING_PHASE;for(var a=i+1;a<n.length;a++)if(t.currentTarget=n[a],this.notifyTarget(t,e),t.propagationStopped||t.propagationImmediatelyStopped)return}}}},{key:"propagationPath",value:function(t){var e=[t],n=this.rootTarget.defaultView||null;if(n&&n===t)return e.unshift(n.document),e;for(var r=0;r<2048&&t!==this.rootTarget;r++)oj.isNode(t)&&t.parentNode&&(e.push(t.parentNode),t=t.parentNode);return n&&e.push(n),e}},{key:"hitTest",value:function(t){var e=t.viewportX,n=t.viewportY,r=this.context.config,i=r.width,a=r.height,o=r.disableHitTesting;return e<0||n<0||e>i||n>a?null:!o&&this.pickHandler(t)||this.rootTarget||null}},{key:"isNativeEventFromCanvas",value:function(t,e){var n,r=null==e?void 0:e.target;if(null!=(n=r)&&n.shadowRoot&&(r=e.composedPath()[0]),r){if(r===t)return!0;if(t&&t.contains)return t.contains(r)}return null!=e&&!!e.composedPath&&e.composedPath().indexOf(t)>-1}},{key:"getExistedHTML",value:function(t){if(t.nativeEvent.composedPath)for(var e=0,n=t.nativeEvent.composedPath();e<n.length;e++){var r=n[e],i=this.nativeHTMLMap.get(r);if(i)return i}return null}},{key:"pickTarget",value:function(t){return this.hitTest({clientX:t.clientX,clientY:t.clientY,viewportX:t.viewportX,viewportY:t.viewportY,x:t.canvasX,y:t.canvasY})}},{key:"createPointerEvent",value:function(t,e,n,r){var i=this.allocateEvent(oM);this.copyPointerData(t,i),this.copyMouseData(t,i),this.copyData(t,i),i.nativeEvent=t.nativeEvent,i.originalEvent=t;var a=this.getExistedHTML(i),o=this.context.contextService.getDomElement();return i.target=null!=n?n:a||this.isNativeEventFromCanvas(o,i.nativeEvent)&&this.pickTarget(i)||r,"string"==typeof e&&(i.type=e),i}},{key:"createWheelEvent",value:function(t){var e=this.allocateEvent(oE);this.copyWheelData(t,e),this.copyMouseData(t,e),this.copyData(t,e),e.nativeEvent=t.nativeEvent,e.originalEvent=t;var n=this.getExistedHTML(e),r=this.context.contextService.getDomElement();return e.target=n||this.isNativeEventFromCanvas(r,e.nativeEvent)&&this.pickTarget(e),e}},{key:"trackingData",value:function(t){return this.mappingState.trackingData[t]||(this.mappingState.trackingData[t]={pressTargetsByButton:{},clicksByButton:{},overTarget:null}),this.mappingState.trackingData[t]}},{key:"cloneWheelEvent",value:function(t){var e=this.allocateEvent(oE);return e.nativeEvent=t.nativeEvent,e.originalEvent=t.originalEvent,this.copyWheelData(t,e),this.copyMouseData(t,e),this.copyData(t,e),e.target=t.target,e.path=t.composedPath().slice(),e.type=t.type,e}},{key:"clonePointerEvent",value:function(t,e){var n=this.allocateEvent(oM);return n.nativeEvent=t.nativeEvent,n.originalEvent=t.originalEvent,this.copyPointerData(t,n),this.copyMouseData(t,n),this.copyData(t,n),n.target=t.target,n.path=t.composedPath().slice(),n.type=null!=e?e:n.type,n}},{key:"copyPointerData",value:function(t,e){e.pointerId=t.pointerId,e.width=t.width,e.height=t.height,e.isPrimary=t.isPrimary,e.pointerType=t.pointerType,e.pressure=t.pressure,e.tangentialPressure=t.tangentialPressure,e.tiltX=t.tiltX,e.tiltY=t.tiltY,e.twist=t.twist}},{key:"copyMouseData",value:function(t,e){e.altKey=t.altKey,e.button=t.button,e.buttons=t.buttons,e.ctrlKey=t.ctrlKey,e.metaKey=t.metaKey,e.shiftKey=t.shiftKey,e.client.copyFrom(t.client),e.movement.copyFrom(t.movement),e.canvas.copyFrom(t.canvas),e.screen.copyFrom(t.screen),e.global.copyFrom(t.global),e.offset.copyFrom(t.offset)}},{key:"copyWheelData",value:function(t,e){e.deltaMode=t.deltaMode,e.deltaX=t.deltaX,e.deltaY=t.deltaY,e.deltaZ=t.deltaZ}},{key:"copyData",value:function(t,e){e.isTrusted=t.isTrusted,e.timeStamp=aH.now(),e.type=t.type,e.detail=t.detail,e.view=t.view,e.page.copyFrom(t.page),e.viewport.copyFrom(t.viewport)}},{key:"allocateEvent",value:function(t){this.eventPool.has(t)||this.eventPool.set(t,[]);var e=this.eventPool.get(t).pop()||new t(this);return e.eventPhase=e.NONE,e.currentTarget=null,e.path=[],e.target=null,e}},{key:"freeEvent",value:function(t){if(t.manager!==this)throw Error("It is illegal to free an event not managed by this EventBoundary!");var e=t.constructor;this.eventPool.has(e)||this.eventPool.set(e,[]),this.eventPool.get(e).push(t)}},{key:"notifyTarget",value:function(t,e){e=null!=e?e:t.type;var n=t.eventPhase===t.CAPTURING_PHASE||t.eventPhase===t.AT_TARGET?"".concat(e,"capture"):e;this.notifyListeners(t,n),t.eventPhase===t.AT_TARGET&&this.notifyListeners(t,e)}},{key:"notifyListeners",value:function(t,e){var n=t.currentTarget.emitter,r=n._events[e];if(r)if("fn"in r)r.once&&n.removeListener(e,r.fn,void 0,!0),r.fn.call(t.currentTarget||r.context,t);else for(var i=0;i<r.length&&!t.propagationImmediatelyStopped;i++)r[i].once&&n.removeListener(e,r[i].fn,void 0,!0),r[i].fn.call(t.currentTarget||r[i].context,t)}},{key:"findMountedTarget",value:function(t){if(!t)return null;for(var e=t[t.length-1],n=t.length-2;n>=0;n--){var r=t[n];if(r===this.rootTarget||oj.isNode(r)&&r.parentNode===e)e=t[n];else break}return e}},{key:"getCursor",value:function(t){for(var e=t;e;){var n=!!e.getAttribute&&e.getAttribute("cursor");if(n)return n;e=oj.isNode(e)&&e.parentNode}}}]),oT=(0,tO.A)(function t(){(0,tx.A)(this,t)},[{key:"getOrCreateCanvas",value:function(t,e){if(this.canvas)return this.canvas;if(t||le.offscreenCanvas)this.canvas=t||le.offscreenCanvas,this.context=this.canvas.getContext("2d",(0,tb.A)({willReadFrequently:!0},e));else try{this.canvas=new window.OffscreenCanvas(0,0),this.context=this.canvas.getContext("2d",(0,tb.A)({willReadFrequently:!0},e)),this.context&&this.context.measureText||(this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"))}catch(t){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d",(0,tb.A)({willReadFrequently:!0},e))}return this.canvas.width=10,this.canvas.height=10,this.canvas}},{key:"getOrCreateContext",value:function(t,e){return this.context||this.getOrCreateCanvas(t,e),this.context}}],[{key:"createCanvas",value:function(){try{return new window.OffscreenCanvas(0,0)}catch(t){}try{return document.createElement("canvas")}catch(t){}return null}}]),oC=((M8={})[M8.CAMERA_CHANGED=0]="CAMERA_CHANGED",M8[M8.DISPLAY_OBJECT_CHANGED=1]="DISPLAY_OBJECT_CHANGED",M8[M8.NONE=2]="NONE",M8),oN=(0,tO.A)(function t(e,n){(0,tx.A)(this,t),this.inited=!1,this.stats={total:0,rendered:0},this.zIndexCounter=0,this.hooks={init:new a6,initAsync:new a3,dirtycheck:new a8,cull:new a8,beginFrame:new a6,beforeRender:new a6,render:new a6,afterRender:new a6,endFrame:new a6,destroy:new a6,pick:new a4,pickSync:new a8,pointerDown:new a6,pointerUp:new a6,pointerMove:new a6,pointerOut:new a6,pointerOver:new a6,pointerWheel:new a6,pointerCancel:new a6,click:new a6},this.globalRuntime=e,this.context=n},[{key:"init",value:function(t){var e=this,n=(0,tb.A)((0,tb.A)({},this.globalRuntime),this.context);this.context.renderingPlugins.forEach(function(t){t.apply(n,e.globalRuntime)}),this.hooks.init.call(),0===this.hooks.initAsync.getCallbacksNum()?(this.inited=!0,t()):this.hooks.initAsync.promise().then(function(){e.inited=!0,t()}).catch(function(t){})}},{key:"getStats",value:function(){return this.stats}},{key:"disableDirtyRectangleRendering",value:function(){return!this.context.config.renderer.getConfig().enableDirtyRectangleRendering||this.context.renderingContext.renderReasons.has(oC.CAMERA_CHANGED)}},{key:"render",value:function(t,e,n){var r=this;this.stats.total=0,this.stats.rendered=0,this.zIndexCounter=0;var i=this.context.renderingContext;if(this.globalRuntime.sceneGraphService.syncHierarchy(i.root),this.globalRuntime.sceneGraphService.triggerPendingEvents(),i.renderReasons.size&&this.inited){i.dirtyRectangleRenderingDisabled=this.disableDirtyRectangleRendering();var a=1===i.renderReasons.size&&i.renderReasons.has(oC.CAMERA_CHANGED),o=!t.disableRenderHooks||!a;o&&this.renderDisplayObject(i.root,t,i),this.hooks.beginFrame.call(e),o&&i.renderListCurrentFrame.forEach(function(t){r.hooks.beforeRender.call(t),r.hooks.render.call(t),r.hooks.afterRender.call(t)}),this.hooks.endFrame.call(e),i.renderListCurrentFrame=[],i.renderReasons.clear(),n()}}},{key:"renderDisplayObject",value:function(t,e,n){for(var r=this,i=e.renderer.getConfig(),a=i.enableDirtyCheck,o=i.enableCulling,l=[t];l.length>0;){var s,u=l.pop();!function(t){var e=t.renderable,i=t.sortable,l=a?e.dirty||n.dirtyRectangleRenderingDisabled?t:null:t,s=null;l&&(s=o?r.hooks.cull.call(l,r.context.camera):l)&&(r.stats.rendered+=1,n.renderListCurrentFrame.push(s)),t.dirty(!1),i.renderOrder=r.zIndexCounter,r.zIndexCounter+=1,r.stats.total+=1,i.dirty&&(r.sort(t,i),i.dirty=!1,i.dirtyChildren=[],i.dirtyReason=void 0)}(u);for(var c=(null==(s=u.sortable)||null==(s=s.sorted)?void 0:s.length)>0?u.sortable.sorted:u.childNodes,f=c.length-1;f>=0;f--)l.push(c[f])}}},{key:"sort",value:function(t,e){var n,r;(null==e||null==(n=e.sorted)?void 0:n.length)>0&&e.dirtyReason!==rh.Z_INDEX_CHANGED?e.dirtyChildren.forEach(function(n){var r=e.sorted.indexOf(n);if(r>-1&&e.sorted.splice(r,1),t.childNodes.indexOf(n)>-1)if(0===e.sorted.length)e.sorted.push(n);else{var i=function(t,e){for(var n=0,r=t.length;n<r;){var i=n+r>>>1;0>a$(t[i],e)?n=i+1:r=i}return n}(e.sorted,n);e.sorted.splice(i,0,n)}}):e.sorted=t.childNodes.slice().sort(a$),(null==(r=e.sorted)?void 0:r.length)>0&&0===t.childNodes.filter(function(t){return t.parsedStyle.zIndex}).length&&(e.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(oC.DISPLAY_OBJECT_CHANGED)}}]),oL=/\[\s*(.*)=(.*)\s*\]/,oI=(0,tO.A)(function t(){(0,tx.A)(this,t)},[{key:"selectOne",value:function(t,e){var n=this;if(t.startsWith("."))return e.find(function(e){return((null==e?void 0:e.classList)||[]).indexOf(n.getIdOrClassname(t))>-1});if(t.startsWith("#"))return e.find(function(e){return e.id===n.getIdOrClassname(t)});if(t.startsWith("[")){var r=this.getAttribute(t),i=r.name,a=r.value;return i?e.find(function(t){return e!==t&&("name"===i?t.name===a:n.attributeToString(t,i)===a)}):null}return e.find(function(n){return e!==n&&n.nodeName===t})}},{key:"selectAll",value:function(t,e){var n=this;if(t.startsWith("."))return e.findAll(function(r){return e!==r&&((null==r?void 0:r.classList)||[]).indexOf(n.getIdOrClassname(t))>-1});if(t.startsWith("#"))return e.findAll(function(r){return e!==r&&r.id===n.getIdOrClassname(t)});if(t.startsWith("[")){var r=this.getAttribute(t),i=r.name,a=r.value;return i?e.findAll(function(t){return e!==t&&("name"===i?t.name===a:n.attributeToString(t,i)===a)}):[]}return e.findAll(function(n){return e!==n&&n.nodeName===t})}},{key:"is",value:function(t,e){if(t.startsWith("."))return e.className===this.getIdOrClassname(t);if(t.startsWith("#"))return e.id===this.getIdOrClassname(t);if(t.startsWith("[")){var n=this.getAttribute(t),r=n.name,i=n.value;return"name"===r?e.name===i:this.attributeToString(e,r)===i}return e.nodeName===t}},{key:"getIdOrClassname",value:function(t){return t.substring(1)}},{key:"getAttribute",value:function(t){var e=t.match(oL),n="",r="";return e&&e.length>2&&(n=e[1].replace(/"/g,""),r=e[2].replace(/"/g,"")),{name:n,value:r}}},{key:"attributeToString",value:function(t,e){if(!t.getAttribute)return"";var n=t.getAttribute(e);return eY(n)?"":n.toString?n.toString():""}}]),oR=((M9={}).ATTR_MODIFIED="DOMAttrModified",M9.INSERTED="DOMNodeInserted",M9.MOUNTED="DOMNodeInsertedIntoDocument",M9.REMOVED="removed",M9.UNMOUNTED="DOMNodeRemovedFromDocument",M9.REPARENT="reparent",M9.DESTROY="destroy",M9.BOUNDS_CHANGED="bounds-changed",M9.CULLED="culled",M9),oD=function(t){function e(t,n,r,i,a,o,l,s){var u;return(0,tx.A)(this,e),(u=(0,tk.A)(this,e,[null])).relatedNode=n,u.prevValue=r,u.newValue=i,u.attrName=a,u.attrChange=o,u.prevParsedValue=l,u.newParsedValue=s,u.type=t,u}return(0,t_.A)(e,t),(0,tO.A)(e)}(ok);oD.ADDITION=2,oD.MODIFICATION=1,oD.REMOVAL=3;var oB=new oD(oR.REPARENT,null,"","","",0,"",""),oF=eG(),oz=tS(),o$=tT(1,1,1),oW=tY(),oG=eG(),oq=tS(),oH=tY(),oY=eI(),oV=tS(),oU=eI(),oX=tS(),oK=tS(),oZ=tS(),oQ=tY(),oJ=eI(),o0=eI(),o1=eI(),o2={affectChildren:!0},o5=(0,tO.A)(function t(e){(0,tx.A)(this,t),this.pendingEvents=new Map,this.boundsChangedEvent=new oA(oR.BOUNDS_CHANGED),this.displayObjectDependencyMap=new WeakMap,this.runtime=e},[{key:"matches",value:function(t,e){return this.runtime.sceneGraphSelector.is(t,e)}},{key:"querySelector",value:function(t,e){return this.runtime.sceneGraphSelector.selectOne(t,e)}},{key:"querySelectorAll",value:function(t,e){return this.runtime.sceneGraphSelector.selectAll(t,e)}},{key:"attach",value:function(t,e,n){var r=!1;t.parentNode&&(r=t.parentNode!==e,this.detach(t));var i=t.nodeName===nq.FRAGMENT,a=aY(e);t.parentNode=e;var o=i?t.childNodes:[t];eq(n)?o.forEach(function(t){e.childNodes.splice(n,0,t),t.parentNode=e}):o.forEach(function(t){e.childNodes.push(t),t.parentNode=e});var l=e.sortable;if((null!=l&&null!=(u=l.sorted)&&u.length||l.dirty||t.parsedStyle.zIndex)&&(-1===l.dirtyChildren.indexOf(t)&&l.dirtyChildren.push(t),l.dirty=!0,l.dirtyReason=rh.ADDED),!a){if(i)this.dirtifyFragment(t);else{var s=t.transformable;s&&this.dirtyWorldTransform(t,s)}if(r){var u,c,f=(null==(c=e.ownerDocument)||null==(c=c.defaultView)||null==(c=c.getConfig())||null==(c=c.future)?void 0:c.experimentalCancelEventPropagation)===!0;t.dispatchEvent(oB,f,f)}}}},{key:"detach",value:function(t){if(t.parentNode){var e,n,r=t.transformable,i=t.parentNode.sortable;(null!=i&&null!=(e=i.sorted)&&e.length||null!=(n=t.style)&&n.zIndex)&&(-1===i.dirtyChildren.indexOf(t)&&i.dirtyChildren.push(t),i.dirty=!0,i.dirtyReason=rh.REMOVED);var a=t.parentNode.childNodes.indexOf(t);a>-1&&t.parentNode.childNodes.splice(a,1),r&&this.dirtyWorldTransform(t,r),t.parentNode=null}}},{key:"getLocalPosition",value:function(t){return t.transformable.localPosition}},{key:"getLocalRotation",value:function(t){return t.transformable.localRotation}},{key:"getLocalScale",value:function(t){return t.transformable.localScale}},{key:"getLocalSkew",value:function(t){return t.transformable.localSkew}},{key:"getLocalTransform",value:function(t){var e=t.transformable;return rg(e),e.localTransform}},{key:"setLocalPosition",value:function(t,e){var n,r=!(arguments.length>2)||void 0===arguments[2]||arguments[2],i=t.transformable;oK[0]=e[0],oK[1]=e[1],oK[2]=null!=(n=e[2])?n:0,!t$(i.localPosition,oK)&&(tC(i.localPosition,oK),r&&this.dirtyLocalTransform(t,i))}},{key:"translateLocal",value:function(t,e){var n,r,i,a,o,l,s,u,c,f,h,d,p,y=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,g=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;"number"==typeof e&&(e=tT(e,y,g));var v=t.transformable;t$(e,oz)||(n=e,r=e,a=(i=v.localRotation)[0],o=i[1],l=i[2],s=i[3],u=r[0],c=r[1],h=o*(f=r[2])-l*c,d=l*u-a*f,p=a*c-o*u,h+=h,d+=d,p+=p,n[0]=u+s*h+o*p-l*d,n[1]=c+s*d+l*h-a*p,n[2]=f+s*p+a*d-o*h,tL(v.localPosition,v.localPosition,e),this.dirtyLocalTransform(t,v))}},{key:"setLocalRotation",value:function(t,e,n,r,i){var a=!(arguments.length>5)||void 0===arguments[5]||arguments[5];"number"==typeof e&&(e=e$(oY,e,n,r,i));var o=t.transformable;ez(o.localRotation,e),a&&this.dirtyLocalTransform(t,o)}},{key:"rotateLocal",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;"number"==typeof e&&(e=tT(e,n,r));var i=t.transformable;eF(o0,e[0],e[1],e[2]),eD(i.localRotation,i.localRotation,o0),this.dirtyLocalTransform(t,i)}},{key:"setLocalScale",value:function(t,e){var n,r=!(arguments.length>2)||void 0===arguments[2]||arguments[2],i=t.transformable;tN(oq,e[0],e[1],null!=(n=e[2])?n:i.localScale[2]),!t$(oq,i.localScale)&&(tC(i.localScale,oq),r&&this.dirtyLocalTransform(t,i))}},{key:"scaleLocal",value:function(t,e){var n,r,i,a,o=t.transformable;n=o.localScale,r=o.localScale,i=tN(oq,e[0],e[1],null!=(a=e[2])?a:1),n[0]=r[0]*i[0],n[1]=r[1]*i[1],n[2]=r[2]*i[2],this.dirtyLocalTransform(t,o)}},{key:"setLocalSkew",value:function(t,e,n){var r,i,a,o=!(arguments.length>3)||void 0===arguments[3]||arguments[3];"number"==typeof e&&(r=e,oG[0]=r,oG[1]=n,e=oG);var l=t.transformable;i=l.localSkew,a=e,i[0]=a[0],i[1]=a[1],o&&this.dirtyLocalTransform(t,l)}},{key:"setLocalEulerAngles",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=!(arguments.length>4)||void 0===arguments[4]||arguments[4];"number"==typeof e&&(e=tT(e,n,r));var a=t.transformable;eF(a.localRotation,e[0],e[1],e[2]),i&&this.dirtyLocalTransform(t,a)}},{key:"setLocalTransform",value:function(t,e){var n=el(oV,e),r=eu(oU,e),i=es(oX,e);this.setLocalScale(t,i,!1),this.setLocalPosition(t,n,!1),this.setLocalRotation(t,r,void 0,void 0,void 0,!1),this.dirtyLocalTransform(t,t.transformable)}},{key:"resetLocalTransform",value:function(t){this.setLocalScale(t,o$,!1),this.setLocalPosition(t,oz,!1),this.setLocalEulerAngles(t,oz,void 0,void 0,!1),this.setLocalSkew(t,oF,void 0,!1),this.dirtyLocalTransform(t,t.transformable)}},{key:"getPosition",value:function(t){var e=t.transformable;return el(e.position,this.getWorldTransform(t,e))}},{key:"getRotation",value:function(t){var e=t.transformable;return eu(e.rotation,this.getWorldTransform(t,e))}},{key:"getScale",value:function(t){var e=t.transformable;return es(e.scaling,this.getWorldTransform(t,e))}},{key:"getOrigin",value:function(t){return t.getGeometryBounds(),t.transformable.origin}},{key:"getWorldTransform",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.transformable;return(e.localDirtyFlag||e.dirtyFlag)&&(t.parentNode&&t.parentNode.transformable&&this.getWorldTransform(t.parentNode),this.internalUpdateTransform(t)),e.worldTransform}},{key:"setPosition",value:function(t,e){var n,r=t.transformable;oZ[0]=e[0],oZ[1]=e[1],oZ[2]=null!=(n=e[2])?n:0,t$(this.getPosition(t),oZ)||(tC(r.position,oZ),null!==t.parentNode&&t.parentNode.transformable?(tU(oQ,t.parentNode.transformable.worldTransform),tJ(oQ,oQ),tz(r.localPosition,oZ,oQ)):tC(r.localPosition,oZ),this.dirtyLocalTransform(t,r))}},{key:"translate",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;"number"==typeof e&&(e=tN(oq,e,n,r)),t$(e,oz)||(tL(oq,this.getPosition(t),e),this.setPosition(t,oq))}},{key:"setRotation",value:function(t,e,n,r,i){var a=t.transformable;"number"==typeof e&&(e=tq(e,n,r,i)),null!==t.parentNode&&t.parentNode.transformable?(ez(oY,this.getRotation(t.parentNode)),eB(oY,oY),eD(a.localRotation,oY,e),eW(a.localRotation,a.localRotation),this.dirtyLocalTransform(t,a)):this.setLocalRotation(t,e)}},{key:"rotate",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;"number"==typeof e&&(e=tT(e,n,r));var i=t.transformable;if(null!==t.parentNode&&t.parentNode.transformable){eF(oY,e[0],e[1],e[2]);var a=this.getRotation(t);ez(o1,this.getRotation(t.parentNode)),eB(o1,o1),eD(oY,o1,oY),eD(i.localRotation,oY,a),eW(i.localRotation,i.localRotation),this.dirtyLocalTransform(t,i)}else this.rotateLocal(t,e)}},{key:"setOrigin",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;"number"==typeof e&&(e=[e,n,r]);var i=t.transformable;if(e[0]!==i.origin[0]||e[1]!==i.origin[1]||e[2]!==i.origin[2]){var a=i.origin;a[0]=e[0],a[1]=e[1],a[2]=e[2]||0,this.dirtyLocalTransform(t,i)}}},{key:"setEulerAngles",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;"number"==typeof e&&(e=tT(e,n,r));var i=t.transformable;null!==t.parentNode&&t.parentNode.transformable?(eF(i.localRotation,e[0],e[1],e[2]),ez(oJ,eB(oY,this.getRotation(t.parentNode))),eD(i.localRotation,i.localRotation,oJ),this.dirtyLocalTransform(t,i)):this.setLocalEulerAngles(t,e)}},{key:"getTransformedGeometryBounds",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2?arguments[2]:void 0,r=this.getGeometryBounds(t,e);if(!nU.isEmpty(r)){var i=n||new nU;return i.setFromTransformedAABB(r,this.getWorldTransform(t)),i}return null}},{key:"getGeometryBounds",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=t.geometry;return n.dirty&&le.styleValueRegistry.updateGeometry(t),(e?n.renderBounds:n.contentBounds||null)||new nU}},{key:"getBounds",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=t.renderable;if(!r.boundsDirty&&!n&&r.bounds)return r.bounds;if(!r.renderBoundsDirty&&n&&r.renderBounds)return r.renderBounds;var i=n?r.renderBounds:r.bounds,a=this.getTransformedGeometryBounds(t,n,i);if(t.childNodes.forEach(function(t){var r=e.getBounds(t,n);r&&(a?a.add(r):(a=i||new nU).update(r.center,r.halfExtents))}),a||(a=new nU),n){var o=aW(t);if(o){var l=o.parsedStyle.clipPath.getBounds(n);a?l&&(a=l.intersection(a)):a.update(l.center,l.halfExtents)}}return n?(r.renderBounds=a,r.renderBoundsDirty=!1):(r.bounds=a,r.boundsDirty=!1),a}},{key:"getLocalBounds",value:function(t){if(t.parentNode){var e=oW;t.parentNode.transformable&&(e=tJ(oH,this.getWorldTransform(t.parentNode)));var n=this.getBounds(t);if(!nU.isEmpty(n)){var r=new nU;return r.setFromTransformedAABB(n,e),r}}return this.getBounds(t)}},{key:"getBoundingClientRect",value:function(t){var e,n,r=this.getGeometryBounds(t);nU.isEmpty(r)||(n=new nU).setFromTransformedAABB(r,this.getWorldTransform(t));var i=null==(e=t.ownerDocument)||null==(e=e.defaultView)?void 0:e.getContextService().getBoundingClientRect();if(n){var a=n.getMin(),o=(0,tM.A)(a,2),l=o[0],s=o[1],u=n.getMax(),c=(0,tM.A)(u,2),f=c[0],h=c[1];return new nJ(l+((null==i?void 0:i.left)||0),s+((null==i?void 0:i.top)||0),f-l,h-s)}return new nJ((null==i?void 0:i.left)||0,(null==i?void 0:i.top)||0,0,0)}},{key:"internalUpdateTransform",value:function(t){var e,n,r=null==(n=t.parentNode)?void 0:n.transformable;rg(t.transformable),e=t.transformable,e.dirtyFlag&&(r?t2(e.worldTransform,r.worldTransform,e.localTransform):tU(e.worldTransform,e.localTransform),e.dirtyFlag=!1)}},{key:"internalUpdateElement",value:function(t,e){var n=(null==(l=t.ownerDocument)||null==(l=l.defaultView)||null==(l=l.getConfig())||null==(l=l.future)?void 0:l.experimentalAttributeUpdateOptimization)===!0,r=e[e.length-1],i=(null==r?void 0:r.transformDirty)||(null==(s=t.transformable)?void 0:s.localDirtyFlag);t.transformable&&((f=t.transformable).dirtyFlag||(f.dirtyFlag=i)),this.internalUpdateTransform(t),i&&(null==(h=t.dirty)||h.call(t,!0,!0));var a=(null==(u=t.renderable)?void 0:u.boundsDirty)||(null==(c=t.renderable)?void 0:c.renderBoundsDirty);if((i||a)&&(null==r?void 0:r.shapeUpdated)===!1&&n)for(var o=e.length-1;o>=0;){var l,s,u,c,f,h,d,p,y=e[o];if(y.shapeUpdated)break;null==(d=(p=y.node).dirty)||d.call(p,!0,!0),y.shapeUpdated=!0,o-=1}return i}},{key:"syncHierarchy",value:function(t){for(var e,n,r=[t],i=t.parentNode?[{node:t.parentNode,transformDirty:(null==(e=t.parentNode.transformable)?void 0:e.localDirtyFlag)||(null==(n=t.parentNode.transformable)?void 0:n.dirtyFlag),shapeUpdated:!1}]:[];r.length>0;){for(var a=r.pop(),o=i[i.length-1];i.length>0&&a.parentNode!==o.node;)o=i.pop();var l=this.internalUpdateElement(a,i);if(a.childNodes.length>0){for(var s=a.childNodes.length-1;s>=0;s--)r.push(a.childNodes[s]);i.push({node:a,transformDirty:l,shapeUpdated:!1})}}}},{key:"dirtyLocalTransform",value:function(t,e){aY(t)||!e.localDirtyFlag&&(e.localDirtyFlag=!0,e.dirtyFlag||this.dirtyWorldTransform(t,e))}},{key:"dirtyWorldTransform",value:function(t,e){this.dirtifyWorldInternal(t,e),this.dirtyToRoot(t,!0)}},{key:"dirtifyWorldInternal",value:function(t,e){var n,r=this,i=(null==(n=t.ownerDocument)||null==(n=n.defaultView)||null==(n=n.getConfig())||null==(n=n.future)?void 0:n.experimentalAttributeUpdateOptimization)===!0;!e.dirtyFlag&&(e.dirtyFlag=!0,t.dirty(!0,!0),i||t.childNodes.forEach(function(t){var e=t.transformable;r.dirtifyWorldInternal(t,e)}))}},{key:"dirtyToRoot",value:function(t){for(var e,n,r,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=t,o=(null==(e=t.ownerDocument)||null==(e=e.defaultView)||null==(e=e.getConfig())||null==(e=e.future)?void 0:e.experimentalAttributeUpdateOptimization)===!0;a&&(null==(n=(r=a).dirty)||n.call(r,!0,!0),!o);)a=a.parentNode;i&&t.forEach(function(t){var e;null==(e=t.dirty)||e.call(t,!0,!0)}),this.informDependentDisplayObjects(t),this.pendingEvents.set(t,i)}},{key:"dirtifyFragment",value:function(t){var e,n=t.transformable;n&&(n.dirtyFlag=!0,n.localDirtyFlag=!0),null==(e=t.dirty)||e.call(t,!0,!0);for(var r=t.childNodes.length,i=0;i<r;i++)this.dirtifyFragment(t.childNodes[i]);t.nodeName===nq.FRAGMENT&&this.pendingEvents.set(t,!1)}},{key:"triggerPendingEvents",value:function(){var t,e,n=this,r=new Set,i=function(e,i){if(!(!e.isConnected||r.has(e))&&e.nodeName!==nq.FRAGMENT){if(n.boundsChangedEvent.detail=i,n.boundsChangedEvent.target=e,e.isMutationObserved)e.dispatchEvent(n.boundsChangedEvent);else{if(void 0===t){var a;t=(null==(a=e.ownerDocument.defaultView)||null==(a=a.getConfig())||null==(a=a.future)?void 0:a.experimentalCancelEventPropagation)===!0}e.ownerDocument.defaultView.dispatchEvent(n.boundsChangedEvent,!0,t)}r.add(e)}};this.pendingEvents.forEach(function(t,n){if(n.nodeName!==nq.FRAGMENT){if(void 0===e){var r;e=(null==(r=n.ownerDocument)||null==(r=r.defaultView)||null==(r=r.getConfig())||null==(r=r.future)?void 0:r.experimentalAttributeUpdateOptimization)===!0}o2.affectChildren=t,e?i(n,o2):t?n.forEach(function(t){i(t,o2)}):i(n,o2)}}),r.clear(),this.clearPendingEvents()}},{key:"clearPendingEvents",value:function(){this.pendingEvents.clear()}},{key:"updateDisplayObjectDependency",value:function(t,e,n,r){if(e&&e!==n){var i=this.displayObjectDependencyMap.get(e);if(i&&i[t]){var a=i[t].indexOf(r);i[t].splice(a,1)}}if(n){var o=this.displayObjectDependencyMap.get(n);o||(this.displayObjectDependencyMap.set(n,{}),o=this.displayObjectDependencyMap.get(n)),o[t]||(o[t]=[]),o[t].push(r)}}},{key:"informDependentDisplayObjects",value:function(t){var e,n=this,r=this.displayObjectDependencyMap.get(t);if(r){var i=null==(e=t.ownerDocument)||null==(e=e.defaultView)||null==(e=e.getConfig())||null==(e=e.future)?void 0:e.experimentalCancelEventPropagation;Object.keys(r).forEach(function(t){r[t].forEach(function(e){n.dirtyToRoot(e,!0),e.dispatchEvent(new oD(oR.ATTR_MODIFIED,e,n,n,t,oD.MODIFICATION,n,n),i,i),e.isCustomElement&&e.isConnected&&e.attributeChangedCallback&&e.attributeChangedCallback(t,n,n)})})}}}]),o3=(0,tO.A)(function t(e){if((0,tx.A)(this,t),e<=0)throw Error("LRU capacity must be a positive number.");this.capacity=e,this.cache=new Map},[{key:"get",value:function(t){if(this.cache.has(t)){var e=this.cache.get(t);return this.cache.delete(t),this.cache.set(t,e),e}}},{key:"put",value:function(t,e){if(this.cache.has(t)&&this.cache.delete(t),this.cache.set(t,e),this.cache.size>this.capacity){var n=this.cache.keys().next().value;this.cache.delete(n)}}},{key:"len",value:function(){return this.cache.size}},{key:"clear",value:function(){this.cache.clear()}}]),o4=[10,13],o6=[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288],o8=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,o9=new RegExp("".concat(/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/.source,"|").concat(/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/.source,"|").concat(/[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/.source,"|").concat(/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/.source)),o7=new RegExp("".concat(/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/.source,"|").concat(/[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/.source,"|").concat(/[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/.source,"|").concat(/[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/.source)),lt=(0,tO.A)(function t(e){var n=this;(0,tx.A)(this,t),this.fontMetricsCache={},this.shouldBreakByKinsokuShorui=function(t,e){return!n.isBreakingSpace(e)&&!!(t&&(o7.exec(e)||o9.exec(t)))},this.trimByKinsokuShorui=function(t){var e=(0,tw.A)(t),n=e[e.length-2];if(!n)return t;var r=n[n.length-1];return e[e.length-2]=n.slice(0,-1),e[e.length-1]=r+e[e.length-1],e},this.runtime=e,this.charWidthCache=new o3(100)},[{key:"measureFont",value:function(t,e){if(this.fontMetricsCache[t])return this.fontMetricsCache[t];var n={ascent:0,descent:0,fontSize:0},r=this.runtime.offscreenCanvasCreator.getOrCreateCanvas(e),i=this.runtime.offscreenCanvasCreator.getOrCreateContext(e,{willReadFrequently:!0});i.font=t;var a="|\xc9q\xc5M",o=Math.ceil(i.measureText(a).width),l=Math.ceil(i.measureText("M").width),s=2*l;l=1.4*l|0,r.width=o,r.height=s,i.fillStyle="#f00",i.fillRect(0,0,o,s),i.font=t,i.textBaseline="alphabetic",i.fillStyle="#000",i.fillText(a,0,l);var u=i.getImageData(0,0,o||1,s||1).data,c=u.length,f=4*o,h=0,d=0,p=!1;for(h=0;h<l;++h){for(var y=0;y<f;y+=4)if(255!==u[d+y]){p=!0;break}if(p)break;d+=f}for(n.ascent=l-h,d=c-f,p=!1,h=s;h>l;--h){for(var g=0;g<f;g+=4)if(255!==u[d+g]){p=!0;break}if(p)break;d-=f}return n.descent=h-l,n.fontSize=n.ascent+n.descent,this.fontMetricsCache[t]=n,n}},{key:"measureText",value:function(t,e,n){var r=e.fontSize,i=void 0===r?16:r,a=e.wordWrap,o=e.lineHeight,l=e.lineWidth,s=void 0===l?1:l,u=e.textBaseline,c=void 0===u?"alphabetic":u,f=e.textAlign,h=void 0===f?"start":f,d=e.letterSpacing,p=void 0===d?0:d,y=e.textPath;e.textPathSide,e.textPathStartOffset;var g=e.leading,v=void 0===g?0:g,b=oe(e),x=this.measureFont(b,n);0===x.fontSize&&(x.fontSize=i,x.ascent=i);var O=this.runtime.offscreenCanvasCreator.getOrCreateContext(n);O.font=b,e.isOverflowing=!1;var w=(void 0!==a&&a?this.wordWrap(t,e,n):t).split(/(?:\r\n|\r|\n)/),k=Array(w.length),_=0;if(y){y.getTotalLength();for(var M=0;M<w.length;M++)O.measureText(w[M]).width,w[M].length}else{for(var E=0;E<w.length;E++){var A=O.measureText(w[E]).width+(w[E].length-1)*p;k[E]=A,_=Math.max(_,A)}var S=_+s,j=o||x.fontSize+s,P=Math.max(j,x.fontSize+s)+(w.length-1)*(j+v);j+=v;var T=0;return"middle"===c?T=-P/2:"bottom"===c||"alphabetic"===c||"ideographic"===c?T=-P:("top"===c||"hanging"===c)&&(T=0),{font:b,width:S,height:P,lines:w,lineWidths:k,lineHeight:j,maxLineWidth:_,fontProperties:x,lineMetrics:k.map(function(t,e){var n=0;return"center"===h||"middle"===h?n-=t/2:("right"===h||"end"===h)&&(n-=t),new nJ(n-s/2,T+e*j,t+s,j)})}}}},{key:"wordWrap",value:function(t,e,n){var r=this,i=Array.from(t);if(0===i.length)return"";var a=this,o=e.wordWrapWidth,l=e.letterSpacing,s=void 0===l?0:l,u=e.maxLines,c=void 0===u?1/0:u,f=e.textOverflow,h=this.runtime.offscreenCanvasCreator.getOrCreateContext(n),d=(void 0===o?0:o)+s,p="";"ellipsis"===f?p="...":f&&"clip"!==f&&(p=f);var y=[""],g=0,v=0,b=-1,x=oe(e),O=this.charWidthCache.get(x);O||(O=new o3(500),this.charWidthCache.put(x,O));var w=function(t){return r.getFromCache(t,s,O,h)},k=w(p);function _(t,e,n,r){for(;w(t)<r&&e<i.length-1&&!a.isNewline(i[e+1]);)e+=1,t+=i[e];for(;w(t)>r&&e>=n;)e-=1,t=t.slice(0,-1);return{lineTxt:t,txtLastCharIndex:e}}function M(t,e){if(!(k<=0)&&!(k>d)){if(!y[t]){y[t]=p;return}var n=_(y[t],e,b+1,d-k);y[t]=n.lineTxt+p}}for(var E=0;E<i.length;E++){var A=i[E],S=i[E-1],j=i[E+1],P=w(A);if(this.isNewline(A)){if(g+1>=c){E<i.length-1&&M(g,E-1),e.isOverflowing=!0;break}b=E-1,v=0,y[g+=1]="";continue}if(P>d){M(g,E-1),e.isOverflowing=!0;break}if(v>0&&v+P>d){var T=_(y[g],E-1,b+1,d);if(T.txtLastCharIndex!==E-1){if(y[g]=T.lineTxt,T.txtLastCharIndex===i.length-1)break;A=i[E=T.txtLastCharIndex+1],S=i[E-1],j=i[E+1],P=w(A)}if(g+1>=c){M(g,E-1),e.isOverflowing=!0;break}if(b=E-1,v=0,y[g+=1]="",this.isBreakingSpace(A))continue;this.canBreakInLastChar(A)||(y=this.trimToBreakable(y),v=this.sumTextWidthByCache(y[g]||"",w)),this.shouldBreakByKinsokuShorui(A,j)&&(y=this.trimByKinsokuShorui(y),v+=w(S||""))}v+=P,y[g]+=A}return y.join("\n")}},{key:"isBreakingSpace",value:function(t){return"string"==typeof t&&o6.indexOf(t.charCodeAt(0))>=0}},{key:"isNewline",value:function(t){return"string"==typeof t&&o4.indexOf(t.charCodeAt(0))>=0}},{key:"trimToBreakable",value:function(t){var e=(0,tw.A)(t),n=e[e.length-2],r=this.findBreakableIndex(n);if(-1===r||!n)return e;var i=n.slice(r,r+1),a=this.isBreakingSpace(i);return e[e.length-1]+=n.slice(r+1,n.length),e[e.length-2]=n.slice(0,r+ +!a),e}},{key:"canBreakInLastChar",value:function(t){return!(t&&o8.test(t))}},{key:"sumTextWidthByCache",value:function(t,e){return t.split("").reduce(function(t,n){return t+e(n)},0)}},{key:"findBreakableIndex",value:function(t){for(var e=t.length-1;e>=0;e--)if(!o8.test(t[e]))return e;return -1}},{key:"getFromCache",value:function(t,e,n,r){var i=n.get(t);if("number"!=typeof i){var a=t.length*e;i=r.measureText(t).width+a,n.put(t,i)}return i}},{key:"clearCache",value:function(){this.fontMetricsCache={},this.charWidthCache.clear()}}]),le={},ln=(Et=new ob,Ee=new om,M7={},(0,nM.A)((0,nM.A)((0,nM.A)((0,nM.A)((0,nM.A)((0,nM.A)((0,nM.A)((0,nM.A)((0,nM.A)((0,nM.A)(M7,nq.FRAGMENT,null),nq.CIRCLE,new op),nq.ELLIPSE,new oy),nq.RECT,Et),nq.IMAGE,Et),nq.GROUP,new oO),nq.LINE,new og),nq.TEXT,new ox(le)),nq.POLYLINE,Ee),nq.POLYGON,Ee),(0,nM.A)((0,nM.A)((0,nM.A)(M7,nq.PATH,new ov),nq.HTML,new ow),nq.MESH,null)),lr=(Er=new a_,Ei=new aA,En={},(0,nM.A)((0,nM.A)((0,nM.A)((0,nM.A)((0,nM.A)((0,nM.A)((0,nM.A)((0,nM.A)((0,nM.A)((0,nM.A)(En,rm.PERCENTAGE,null),rm.NUMBER,new aT),rm.ANGLE,new aw),rm.DEFINED_PATH,new ak),rm.PAINT,Er),rm.COLOR,Er),rm.FILTER,new aM),rm.LENGTH,Ei),rm.LENGTH_PERCENTAGE,Ei),rm.LENGTH_PERCENTAGE_12,new aS),(0,nM.A)((0,nM.A)((0,nM.A)((0,nM.A)((0,nM.A)((0,nM.A)((0,nM.A)((0,nM.A)((0,nM.A)((0,nM.A)(En,rm.LENGTH_PERCENTAGE_14,new aj),rm.COORDINATE,new aA),rm.OFFSET_DISTANCE,new aC),rm.OPACITY_VALUE,new aN),rm.PATH,new aL),rm.LIST_OF_POINTS,new aI),rm.SHADOW_BLUR,new aR),rm.TEXT,new aD),rm.TEXT_TRANSFORM,new aB),rm.TRANSFORM,new of),(0,nM.A)((0,nM.A)((0,nM.A)(En,rm.TRANSFORM_ORIGIN,new oh),rm.Z_INDEX,new od),rm.MARKER,new aP));le.CameraContribution=rc,le.AnimationTimeline=null,le.EasingFunction=null,le.offscreenCanvasCreator=new oT,le.sceneGraphSelector=new oI,le.sceneGraphService=new o5(le),le.textService=new lt(le),le.geometryUpdaterFactory=ln,le.CSSPropertySyntaxFactory=lr,le.styleValueRegistry=new ax(le),le.layoutRegistry=null,le.globalThis="u">typeof globalThis?globalThis:"u">typeof self?self:"u">typeof window?window:void 0!==n.g?n.g:{},le.enableStyleSyntax=!0,le.enableSizeAttenuation=!1;var li=0,la=new oD(oR.INSERTED,null,"","","",0,"",""),lo=new oD(oR.REMOVED,null,"","","",0,"",""),ll=new oA(oR.DESTROY),ls=function(t){function e(){var t;(0,tx.A)(this,e);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=(0,tk.A)(this,e,[].concat(r))).entity=li++,t.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]},t.renderable={bounds:void 0,boundsDirty:!0,renderBounds:void 0,renderBoundsDirty:!0,dirtyRenderBounds:void 0,dirty:!1},t.geometry={contentBounds:void 0,renderBounds:void 0,dirty:!0},t.cullable={strategy:rf.Standard,visibilityPlaneMask:-1,visible:!0,enable:!0},t.sortable={dirty:!1,sorted:void 0,renderOrder:0,dirtyChildren:[],dirtyReason:void 0},t.rBushNode={aabb:void 0},t.namespaceURI="g",t.scrollLeft=0,t.scrollTop=0,t.clientTop=0,t.clientLeft=0,t.style={},t.computedStyle={},t.parsedStyle={},t.attributes={},t}return(0,t_.A)(e,t),(0,tO.A)(e,[{key:"dirty",value:function(){var t=!(arguments.length>0)||void 0===arguments[0]||arguments[0],e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.renderable.dirty=t,e&&(this.renderable.boundsDirty=t,this.renderable.renderBoundsDirty=t)}},{key:"className",get:function(){return this.getAttribute("class")||""},set:function(t){this.setAttribute("class",t)}},{key:"classList",get:function(){return this.className.split(" ").filter(function(t){return""!==t})}},{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 t=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[t+1]||null}return null}},{key:"previousSibling",get:function(){if(this.parentNode){var t=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[t-1]||null}return null}},{key:"cloneNode",value:function(t){throw Error(n0)}},{key:"appendChild",value:function(t,e){var n;if(t.destroyed)throw Error("Cannot append a destroyed element.");return le.sceneGraphService.attach(t,this,e),null!=(n=this.ownerDocument)&&n.defaultView&&(aY(this)||t.nodeName!==nq.FRAGMENT?this.ownerDocument.defaultView.mountChildren(t):this.ownerDocument.defaultView.mountFragment(t)),this.isMutationObserved&&(la.relatedNode=this,t.dispatchEvent(la)),t}},{key:"insertBefore",value:function(t,e){if(e){t.parentElement&&t.parentElement.removeChild(t);var n=this.childNodes.indexOf(e);-1===n?this.appendChild(t):this.appendChild(t,n)}else this.appendChild(t);return t}},{key:"replaceChild",value:function(t,e){var n=this.childNodes.indexOf(e);return this.removeChild(e),this.appendChild(t,n),e}},{key:"removeChild",value:function(t){var e,n,r=(null==(e=this.ownerDocument)||null==(e=e.defaultView)||null==(e=e.getConfig().future)?void 0:e.experimentalCancelEventPropagation)===!0;return lo.relatedNode=this,t.dispatchEvent(lo,r,r),null!=(n=t.ownerDocument)&&n.defaultView&&t.ownerDocument.defaultView.unmountChildren(t),le.sceneGraphService.detach(t),t}},{key:"removeChildren",value:function(){for(var t=this.childNodes.length-1;t>=0;t--){var e=this.childNodes[t];this.removeChild(e)}}},{key:"destroyChildren",value:function(){for(var t=this.childNodes.length-1;t>=0;t--){var e=this.childNodes[t];e.childNodes.length>0&&e.destroyChildren(),e.destroy()}}},{key:"matches",value:function(t){return le.sceneGraphService.matches(t,this)}},{key:"getElementById",value:function(t){return le.sceneGraphService.querySelector("#".concat(t),this)}},{key:"getElementsByName",value:function(t){return le.sceneGraphService.querySelectorAll('[name="'.concat(t,'"]'),this)}},{key:"getElementsByClassName",value:function(t){return le.sceneGraphService.querySelectorAll(".".concat(t),this)}},{key:"getElementsByTagName",value:function(t){return le.sceneGraphService.querySelectorAll(t,this)}},{key:"querySelector",value:function(t){return le.sceneGraphService.querySelector(t,this)}},{key:"querySelectorAll",value:function(t){return le.sceneGraphService.querySelectorAll(t,this)}},{key:"closest",value:function(t){var e=this;do{if(le.sceneGraphService.matches(t,e))return e;e=e.parentElement}while(null!==e);return null}},{key:"find",value:function(t){var e=this,n=null;return this.forEach(function(r){return!(r!==e&&t(r))||(n=r,!1)}),n}},{key:"findAll",value:function(t){var e=this,n=[];return this.forEach(function(r){r!==e&&t(r)&&n.push(r)}),n}},{key:"after",value:function(){var t=this;if(this.parentNode){for(var e=this.parentNode.childNodes.indexOf(this),n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];r.forEach(function(n,r){var i;return null==(i=t.parentNode)?void 0:i.appendChild(n,e+r+1)})}}},{key:"before",value:function(){if(this.parentNode){for(var t=this.parentNode.childNodes.indexOf(this),e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=n[0],a=n.slice(1);this.parentNode.appendChild(i,t),i.after.apply(i,(0,tw.A)(a))}}},{key:"replaceWith",value:function(){this.after.apply(this,arguments),this.remove()}},{key:"append",value:function(){for(var t=this,e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];n.forEach(function(e){return t.appendChild(e)})}},{key:"prepend",value:function(){for(var t=this,e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];n.forEach(function(e,n){return t.appendChild(e,n)})}},{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 t,e=(null==(t=this.ownerDocument)||null==(t=t.defaultView)||null==(t=t.getConfig().future)?void 0:t.experimentalCancelEventPropagation)===!0;this.destroyChildren(),this.dispatchEvent(ll,e,e),this.remove(),this.emitter.removeAllListeners(),this.destroyed=!0}},{key:"getGeometryBounds",value:function(){return le.sceneGraphService.getGeometryBounds(this)}},{key:"getRenderBounds",value:function(){return le.sceneGraphService.getBounds(this,!0)}},{key:"getBounds",value:function(){return le.sceneGraphService.getBounds(this)}},{key:"getLocalBounds",value:function(){return le.sceneGraphService.getLocalBounds(this)}},{key:"getBoundingClientRect",value:function(){return le.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(t){if("symbol"!=typeof t)return this.attributes[t]}},{key:"hasAttribute",value:function(t){return this.getAttributeNames().includes(t)}},{key:"hasAttributes",value:function(){return!!this.getAttributeNames().length}},{key:"removeAttribute",value:function(t){this.setAttribute(t,null),delete this.attributes[t]}},{key:"setAttribute",value:function(t,e,n,r){this.attributes[t]=e}},{key:"getAttributeNS",value:function(t,e){throw Error(n0)}},{key:"getAttributeNode",value:function(t){throw Error(n0)}},{key:"getAttributeNodeNS",value:function(t,e){throw Error(n0)}},{key:"hasAttributeNS",value:function(t,e){throw Error(n0)}},{key:"removeAttributeNS",value:function(t,e){throw Error(n0)}},{key:"removeAttributeNode",value:function(t){throw Error(n0)}},{key:"setAttributeNS",value:function(t,e,n){throw Error(n0)}},{key:"setAttributeNode",value:function(t){throw Error(n0)}},{key:"setAttributeNodeNS",value:function(t){throw Error(n0)}},{key:"toggleAttribute",value:function(t,e){throw Error(n0)}}])}(oj);function lu(t){return!!(null!=t&&t.nodeName)}var lc=le.globalThis.Proxy?le.globalThis.Proxy:function(){},lf=new oD(oR.ATTR_MODIFIED,null,null,null,null,oD.MODIFICATION,null,null),lh=tS(),ld=eI(),lp=function(t){function e(t){var n;return(0,tx.A)(this,e),(n=(0,tk.A)(this,e)).isCustomElement=!1,n.isMutationObserved=!1,n.activeAnimations=[],n.config=t,n.id=t.id||"",n.name=t.name||"",(t.className||t.class)&&(n.className=t.className||t.class),n.nodeName=t.type||nq.GROUP,t.initialParsedStyle&&Object.assign(n.parsedStyle,t.initialParsedStyle),n.initAttributes(t.style),le.enableStyleSyntax&&(n.style=new lc({setProperty:function(t,e){n.setAttribute(t,e)},getPropertyValue:function(t){return n.getAttribute(t)},removeProperty:function(t){n.removeAttribute(t)},item:function(){return""}},{get:function(t,e){return void 0!==t[e]?t[e]:n.getAttribute(e)},set:function(t,e,r){return n.setAttribute(e,r),!0}})),n}return(0,t_.A)(e,t),(0,tO.A)(e,[{key:"destroy",value:function(){nS(e,"destroy",this,3)([]),this.getAnimations().forEach(function(t){t.cancel()})}},{key:"cloneNode",value:function(t,e){var n=(0,tb.A)({},this.attributes);for(var r in n){var i=n[r];lu(i)&&"clipPath"!==r&&"offsetPath"!==r&&"textPath"!==r&&(n[r]=i.cloneNode(t)),e&&(n[r]=e(r,i))}var a=new this.constructor((0,tb.A)((0,tb.A)({},this.config),{},{style:n}));return a.setLocalTransform(this.getLocalTransform()),t&&this.children.forEach(function(e){if(!e.style.isMarker){var n=e.cloneNode(t);a.appendChild(n)}}),a}},{key:"initAttributes",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};le.styleValueRegistry.processProperties(this,t,{forceUpdateGeometry:!0}),this.dirty()}},{key:"setAttribute",value:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=!(arguments.length>3)||void 0===arguments[3]||arguments[3];!nb(n)&&(r||n!==this.attributes[t])&&(this.internalSetAttribute(t,n,{memoize:i}),nS(e,"setAttribute",this,3)([t,n]))}},{key:"internalSetAttribute",value:function(t,e){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=this.attributes[t],a=this.parsedStyle[t];le.styleValueRegistry.processProperties(this,(0,nM.A)({},t,e),r),this.dirty();var o=this.parsedStyle[t];if(this.isConnected)if(lf.relatedNode=this,lf.prevValue=i,lf.newValue=e,lf.attrName=t,lf.prevParsedValue=a,lf.newParsedValue=o,this.isMutationObserved)this.dispatchEvent(lf);else{var l,s=(null==(l=this.ownerDocument.defaultView.getConfig().future)?void 0:l.experimentalCancelEventPropagation)===!0;lf.target=this,this.ownerDocument.defaultView.dispatchEvent(lf,!0,s)}(this.isCustomElement&&this.isConnected||!this.isCustomElement)&&(null==(n=this.attributeChangedCallback)||n.call(this,t,i,e,a,o))}},{key:"getBBox",value:function(){var t=this.getBounds(),e=t.getMin(),n=(0,tM.A)(e,2),r=n[0],i=n[1],a=t.getMax(),o=(0,tM.A)(a,2);return new nJ(r,i,o[0]-r,o[1]-i)}},{key:"setOrigin",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return le.sceneGraphService.setOrigin(this,n3(t,e,n,!1)),this}},{key:"getOrigin",value:function(){return le.sceneGraphService.getOrigin(this)}},{key:"setPosition",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return le.sceneGraphService.setPosition(this,n3(t,e,n,!1)),this}},{key:"setLocalPosition",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return le.sceneGraphService.setLocalPosition(this,n3(t,e,n,!1)),this}},{key:"translate",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return le.sceneGraphService.translate(this,n3(t,e,n,!1)),this}},{key:"translateLocal",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return le.sceneGraphService.translateLocal(this,n3(t,e,n,!1)),this}},{key:"getPosition",value:function(){return le.sceneGraphService.getPosition(this)}},{key:"getLocalPosition",value:function(){return le.sceneGraphService.getLocalPosition(this)}},{key:"scale",value:function(t,e,n){return this.scaleLocal(t,e,n)}},{key:"scaleLocal",value:function(t,e,n){return"number"==typeof t&&(e=e||t,n=n||t,t=n3(t,e,n,!1)),le.sceneGraphService.scaleLocal(this,t),this}},{key:"setLocalScale",value:function(t,e,n){return"number"==typeof t&&(e=e||t,n=n||t,t=n3(t,e,n,!1)),le.sceneGraphService.setLocalScale(this,t),this}},{key:"getLocalScale",value:function(){return le.sceneGraphService.getLocalScale(this)}},{key:"getScale",value:function(){return le.sceneGraphService.getScale(this)}},{key:"getEulerAngles",value:function(){var t=n9(lh,le.sceneGraphService.getWorldTransform(this));return(0,tM.A)(t,3)[2]*n6}},{key:"getLocalEulerAngles",value:function(){var t=n9(lh,le.sceneGraphService.getLocalRotation(this));return(0,tM.A)(t,3)[2]*n6}},{key:"setEulerAngles",value:function(t){return le.sceneGraphService.setEulerAngles(this,0,0,t),this}},{key:"setLocalEulerAngles",value:function(t){return le.sceneGraphService.setLocalEulerAngles(this,0,0,t),this}},{key:"rotateLocal",value:function(t,e,n){return eY(e)&&eY(n)?le.sceneGraphService.rotateLocal(this,0,0,t):le.sceneGraphService.rotateLocal(this,t,e,n),this}},{key:"rotate",value:function(t,e,n){return eY(e)&&eY(n)?le.sceneGraphService.rotate(this,0,0,t):le.sceneGraphService.rotate(this,t,e,n),this}},{key:"setRotation",value:function(t,e,n,r){return le.sceneGraphService.setRotation(this,t,e,n,r),this}},{key:"setLocalRotation",value:function(t,e,n,r){return le.sceneGraphService.setLocalRotation(this,t,e,n,r),this}},{key:"setLocalSkew",value:function(t,e){return le.sceneGraphService.setLocalSkew(this,t,e),this}},{key:"getRotation",value:function(){return le.sceneGraphService.getRotation(this)}},{key:"getLocalRotation",value:function(){return le.sceneGraphService.getLocalRotation(this)}},{key:"getLocalSkew",value:function(){return le.sceneGraphService.getLocalSkew(this)}},{key:"getLocalTransform",value:function(){return le.sceneGraphService.getLocalTransform(this)}},{key:"getWorldTransform",value:function(){return le.sceneGraphService.getWorldTransform(this)}},{key:"setLocalTransform",value:function(t){return le.sceneGraphService.setLocalTransform(this,t),this}},{key:"resetLocalTransform",value:function(){le.sceneGraphService.resetLocalTransform(this)}},{key:"getAnimations",value:function(){return this.activeAnimations}},{key:"animate",value:function(t,e){var n,r=null==(n=this.ownerDocument)?void 0:n.timeline;return r?r.play(this,t,e):null}},{key:"isVisible",value:function(){var t;return(null==(t=this.parsedStyle)?void 0:t.visibility)!=="hidden"}},{key:"interactive",get:function(){return this.isInteractive()},set:function(t){this.style.pointerEvents=t?"auto":"none"}},{key:"isInteractive",value:function(){var t;return(null==(t=this.parsedStyle)?void 0:t.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,(0,tw.A)(this.parentNode.children.map(function(t){return Number(t.style.zIndex)})))+1),this}},{key:"toBack",value:function(){return this.parentNode&&(this.style.zIndex=Math.min.apply(Math,(0,tw.A)(this.parentNode.children.map(function(t){return Number(t.style.zIndex)})))-1),this}},{key:"getConfig",value:function(){return this.config}},{key:"attr",value:function(){for(var t=this,e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=n[0],a=n[1];return i?n_(i)?(Object.keys(i).forEach(function(e){t.setAttribute(e,i[e])}),this):2===n.length?(this.setAttribute(i,a),this):this.attributes[i]:this.attributes}},{key:"getMatrix",value:function(t){var e,n,r,i,a,o,l,s,u=t||this.getWorldTransform(),c=el(lh,u),f=(0,tM.A)(c,2),h=f[0],d=f[1],p=es(lh,u),y=(0,tM.A)(p,2),g=y[0],v=y[1],b=n9(lh,eu(ld,u)),x=(0,tM.A)(b,3),O=x[0],w=x[2];return n=Math.cos(e=O||w),r=Math.sin(e),i=g*n,a=v*r,o=-g*r,l=v*n,(s=new tA(9))[0]=i,s[1]=a,s[2]=0,s[3]=o,s[4]=l,s[5]=0,s[6]=h,s[7]=d,s[8]=1,s}},{key:"getLocalMatrix",value:function(){return this.getMatrix(this.getLocalTransform())}},{key:"setMatrix",value:function(t){var e=n7(t),n=(0,tM.A)(e,5),r=n[0],i=n[1],a=n[2],o=n[3],l=n[4];this.setEulerAngles(l).setPosition(r,i).setLocalScale(a,o)}},{key:"setLocalMatrix",value:function(t){var e=n7(t),n=(0,tM.A)(e,5),r=n[0],i=n[1],a=n[2],o=n[3],l=n[4];this.setLocalEulerAngles(l).setLocalPosition(r,i).setLocalScale(a,o)}},{key:"show",value:function(){this.forEach(function(t){t.style.visibility="visible"})}},{key:"hide",value:function(){this.forEach(function(t){t.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(t){return this.children[t]||null}},{key:"add",value:function(t,e){return this.appendChild(t,e)}},{key:"set",value:function(t,e){this.config[t]=e}},{key:"get",value:function(t){return this.config[t]}},{key:"moveTo",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return this.setPosition(t,e,n),this}},{key:"move",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return this.setPosition(t,e,n),this}},{key:"setZIndex",value:function(t){return this.style.zIndex=t,this}}])}(ls);lp.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 ly=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,tx.A)(this,e),(0,tk.A)(this,e,[(0,tb.A)({type:nq.CIRCLE},t)])}return(0,t_.A)(e,t),(0,tO.A)(e)}(lp);ly.PARSED_STYLE_LIST=new Set([].concat((0,tw.A)(lp.PARSED_STYLE_LIST),["cx","cy","cz","r","isBillboard","isSizeAttenuation"]));var lg=["style"],lv=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.style,i=(0,n$.A)(n,lg);return(0,tx.A)(this,e),(t=(0,tk.A)(this,e,[(0,tb.A)({style:r},i)])).isCustomElement=!0,t}return(0,t_.A)(e,t),(0,tO.A)(e)}(lp);lv.PARSED_STYLE_LIST=new Set(["class","className","clipPath","cursor","draggable","droppable","opacity","pointerEvents","transform","transformOrigin","zIndex","visibility"]);var lm=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,tx.A)(this,e),(0,tk.A)(this,e,[(0,tb.A)({type:nq.ELLIPSE},t)])}return(0,t_.A)(e,t),(0,tO.A)(e)}(lp);lm.PARSED_STYLE_LIST=new Set([].concat((0,tw.A)(lp.PARSED_STYLE_LIST),["cx","cy","cz","rx","ry","isBillboard","isSizeAttenuation"])),function(t){function e(){return(0,tx.A)(this,e),(0,tk.A)(this,e,[{type:nq.FRAGMENT}])}return(0,t_.A)(e,t),(0,tO.A)(e)}(lp).PARSED_STYLE_LIST=new Set(["class","className"]);var lb=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,tx.A)(this,e),(0,tk.A)(this,e,[(0,tb.A)({type:nq.GROUP},t)])}return(0,t_.A)(e,t),(0,tO.A)(e)}(lp);lb.PARSED_STYLE_LIST=new Set(["class","className","clipPath","cursor","draggable","droppable","opacity","pointerEvents","transform","transformOrigin","zIndex","visibility"]);var lx=["style"],lO=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.style,i=(0,n$.A)(n,lx);return(0,tx.A)(this,e),(t=(0,tk.A)(this,e,[(0,tb.A)({type:nq.HTML,style:r},i)])).cullable.enable=!1,t}return(0,t_.A)(e,t),(0,tO.A)(e,[{key:"getDomElement",value:function(){return this.parsedStyle.$el}},{key:"getClientRects",value:function(){return[this.getBoundingClientRect()]}},{key:"getLocalBounds",value:function(){if(this.parentNode){var t=tJ(tY(),this.parentNode.getWorldTransform()),e=this.getBounds();if(!nU.isEmpty(e)){var n=new nU;return n.setFromTransformedAABB(e,t),n}}return this.getBounds()}}])}(lp);lO.PARSED_STYLE_LIST=new Set([].concat((0,tw.A)(lp.PARSED_STYLE_LIST),["x","y","$el","innerHTML","width","height"]));var lw=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,tx.A)(this,e),(0,tk.A)(this,e,[(0,tb.A)({type:nq.IMAGE},t)])}return(0,t_.A)(e,t),(0,tO.A)(e)}(lp);lw.PARSED_STYLE_LIST=new Set([].concat((0,tw.A)(lp.PARSED_STYLE_LIST),["x","y","z","src","width","height","isBillboard","billboardRotation","isSizeAttenuation","keepAspectRatio"]));var lk=["style"],l_=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.style,i=(0,n$.A)(n,lk);(0,tx.A)(this,e),(t=(0,tk.A)(this,e,[(0,tb.A)({type:nq.LINE,style:(0,tb.A)({x1:0,y1:0,x2:0,y2:0,z1:0,z2:0},r)},i)])).markerStartAngle=0,t.markerEndAngle=0;var a=t.parsedStyle,o=a.markerStart,l=a.markerEnd;return o&&lu(o)&&(t.markerStartAngle=o.getLocalEulerAngles(),t.appendChild(o)),l&&lu(l)&&(t.markerEndAngle=l.getLocalEulerAngles(),t.appendChild(l)),t.transformMarker(!0),t.transformMarker(!1),t}return(0,t_.A)(e,t),(0,tO.A)(e,[{key:"attributeChangedCallback",value:function(t,e,n,r,i){"x1"===t||"y1"===t||"x2"===t||"y2"===t||"markerStartOffset"===t||"markerEndOffset"===t?(this.transformMarker(!0),this.transformMarker(!1)):"markerStart"===t?(r&&lu(r)&&(this.markerStartAngle=0,r.remove()),i&&lu(i)&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t&&(r&&lu(r)&&(this.markerEndAngle=0,r.remove()),i&&lu(i)&&(this.markerEndAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!1)))}},{key:"transformMarker",value:function(t){var e,n,r,i,a,o,l=this.parsedStyle,s=l.markerStart,u=l.markerEnd,c=l.markerStartOffset,f=l.markerEndOffset,h=l.x1,d=l.x2,p=l.y1,y=l.y2,g=t?s:u;if(g&&lu(g)){var v=0;t?(r=h,i=p,e=d-h,n=y-p,a=c||0,o=this.markerStartAngle):(r=d,i=y,e=h-d,n=p-y,a=f||0,o=this.markerEndAngle),v=Math.atan2(n,e),g.setLocalEulerAngles(180*v/Math.PI+o),g.setLocalPosition(r+Math.cos(v)*a,i+Math.sin(v)*a)}}},{key:"getPoint",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.parsedStyle,r=nC(n.x1,n.y1,n.x2,n.y2,t),i=r.x,a=r.y,o=tz(tS(),tT(i,a,0),e?this.getWorldTransform():this.getLocalTransform());return new nQ(o[0],o[1])}},{key:"getPointAtLength",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.getPoint(t/this.getTotalLength(),e)}},{key:"getTotalLength",value:function(){var t=this.parsedStyle;return nj(t.x1,t.y1,t.x2,t.y2)}}])}(lp);l_.PARSED_STYLE_LIST=new Set([].concat((0,tw.A)(lp.PARSED_STYLE_LIST),["x1","y1","x2","y2","z1","z2","isBillboard","isSizeAttenuation","markerStart","markerEnd","markerStartOffset","markerEndOffset"]));var lM=["style"],lE=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.style,i=(0,n$.A)(n,lM);(0,tx.A)(this,e),(t=(0,tk.A)(this,e,[(0,tb.A)({type:nq.PATH,style:r,initialParsedStyle:{miterLimit:4,d:(0,tb.A)({},rv)}},i)])).markerStartAngle=0,t.markerEndAngle=0,t.markerMidList=[];var a=t.parsedStyle,o=a.markerStart,l=a.markerEnd,s=a.markerMid;return o&&lu(o)&&(t.markerStartAngle=o.getLocalEulerAngles(),t.appendChild(o)),s&&lu(s)&&t.placeMarkerMid(s),l&&lu(l)&&(t.markerEndAngle=l.getLocalEulerAngles(),t.appendChild(l)),t.transformMarker(!0),t.transformMarker(!1),t}return(0,t_.A)(e,t),(0,tO.A)(e,[{key:"attributeChangedCallback",value:function(t,e,n,r,i){"d"===t?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):"markerStartOffset"===t||"markerEndOffset"===t?(this.transformMarker(!0),this.transformMarker(!1)):"markerStart"===t?(r&&lu(r)&&(this.markerStartAngle=0,r.remove()),i&&lu(i)&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t?(r&&lu(r)&&(this.markerEndAngle=0,r.remove()),i&&lu(i)&&(this.markerEndAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!1))):"markerMid"===t&&this.placeMarkerMid(i)}},{key:"transformMarker",value:function(t){var e,n,r,i,a,o,l=this.parsedStyle,s=l.markerStart,u=l.markerEnd,c=l.markerStartOffset,f=l.markerEndOffset,h=t?s:u;if(h&&lu(h)){var d=0;if(t){var p=this.getStartTangent(),y=(0,tM.A)(p,2),g=y[0],v=y[1];r=v[0],i=v[1],e=g[0]-v[0],n=g[1]-v[1],a=c||0,o=this.markerStartAngle}else{var b=this.getEndTangent(),x=(0,tM.A)(b,2),O=x[0],w=x[1];r=w[0],i=w[1],e=O[0]-w[0],n=O[1]-w[1],a=f||0,o=this.markerEndAngle}d=Math.atan2(n,e),h.setLocalEulerAngles(180*d/Math.PI+o),h.setLocalPosition(r+Math.cos(d)*a,i+Math.sin(d)*a)}}},{key:"placeMarkerMid",value:function(t){var e=this.parsedStyle.d.segments;if(this.markerMidList.forEach(function(t){t.remove()}),t&&lu(t))for(var n=1;n<e.length-1;n++){var r=(0,tM.A)(e[n].currentPoint,2),i=r[0],a=r[1],o=1===n?t:t.cloneNode(!0);this.markerMidList.push(o),this.appendChild(o),o.setLocalPosition(i,a)}}},{key:"getTotalLength",value:function(){return iV(this)}},{key:"getPointAtLength",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=nl(this.parsedStyle.d.absolutePath,t,eZ(eZ({},void 0),{bbox:!1,length:!0})).point,r=n.x,i=n.y,a=tz(tS(),tT(r,i,0),e?this.getWorldTransform():this.getLocalTransform());return new nQ(a[0],a[1])}},{key:"getPoint",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.getPointAtLength(t*iV(this),e)}},{key:"getStartTangent",value:function(){var t=this.parsedStyle.d.segments,e=[];if(t.length>1){var n=t[0].currentPoint,r=t[1].currentPoint,i=t[1].startTangent;e=[],i?e.push([n[0]-i[0],n[1]-i[1]]):e.push([r[0],r[1]]),e.push([n[0],n[1]])}return e}},{key:"getEndTangent",value:function(){var t=this.parsedStyle.d.segments,e=t.length,n=[];if(e>1){var r=t[e-2].currentPoint,i=t[e-1].currentPoint,a=t[e-1].endTangent;n=[],a?n.push([i[0]-a[0],i[1]-a[1]]):n.push([r[0],r[1]]),n.push([i[0],i[1]])}return n}}])}(lp);lE.PARSED_STYLE_LIST=new Set([].concat((0,tw.A)(lp.PARSED_STYLE_LIST),["d","markerStart","markerMid","markerEnd","markerStartOffset","markerEndOffset","isBillboard","isSizeAttenuation"]));var lA=["style"],lS=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.style,i=(0,n$.A)(n,lA);(0,tx.A)(this,e),(t=(0,tk.A)(this,e,[(0,tb.A)({type:nq.POLYGON,style:r,initialParsedStyle:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:!0}},i)])).markerStartAngle=0,t.markerEndAngle=0,t.markerMidList=[];var a=t.parsedStyle,o=a.markerStart,l=a.markerEnd,s=a.markerMid;return o&&lu(o)&&(t.markerStartAngle=o.getLocalEulerAngles(),t.appendChild(o)),s&&lu(s)&&t.placeMarkerMid(s),l&&lu(l)&&(t.markerEndAngle=l.getLocalEulerAngles(),t.appendChild(l)),t.transformMarker(!0),t.transformMarker(!1),t}return(0,t_.A)(e,t),(0,tO.A)(e,[{key:"attributeChangedCallback",value:function(t,e,n,r,i){"points"===t?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):"markerStartOffset"===t||"markerEndOffset"===t?(this.transformMarker(!0),this.transformMarker(!1)):"markerStart"===t?(r&&lu(r)&&(this.markerStartAngle=0,r.remove()),i&&lu(i)&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t?(r&&lu(r)&&(this.markerEndAngle=0,r.remove()),i&&lu(i)&&(this.markerEndAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!1))):"markerMid"===t&&this.placeMarkerMid(i)}},{key:"transformMarker",value:function(t){var e,n,r,i,a,o,l=this.parsedStyle,s=l.markerStart,u=l.markerEnd,c=l.markerStartOffset,f=l.markerEndOffset,h=(l.points||{}).points,d=t?s:u;if(d&&lu(d)&&h){var p=0;if(r=h[0][0],i=h[0][1],t)e=h[1][0]-h[0][0],n=h[1][1]-h[0][1],a=c||0,o=this.markerStartAngle;else{var y=h.length;this.parsedStyle.isClosed?(e=h[y-1][0]-h[0][0],n=h[y-1][1]-h[0][1]):(r=h[y-1][0],i=h[y-1][1],e=h[y-2][0]-h[y-1][0],n=h[y-2][1]-h[y-1][1]),a=f||0,o=this.markerEndAngle}p=Math.atan2(n,e),d.setLocalEulerAngles(180*p/Math.PI+o),d.setLocalPosition(r+Math.cos(p)*a,i+Math.sin(p)*a)}}},{key:"placeMarkerMid",value:function(t){var e=(this.parsedStyle.points||{}).points;if(this.markerMidList.forEach(function(t){t.remove()}),this.markerMidList=[],t&&lu(t)&&e)for(var n=1;n<(this.parsedStyle.isClosed?e.length:e.length-1);n++){var r=e[n][0],i=e[n][1],a=1===n?t:t.cloneNode(!0);this.markerMidList.push(a),this.appendChild(a),a.setLocalPosition(r,i)}}}])}(lp);lS.PARSED_STYLE_LIST=new Set([].concat((0,tw.A)(lp.PARSED_STYLE_LIST),["points","markerStart","markerMid","markerEnd","markerStartOffset","markerEndOffset","isClosed","isBillboard","isSizeAttenuation"]));var lj=["style"],lP=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.style,r=(0,n$.A)(t,lj);return(0,tx.A)(this,e),(0,tk.A)(this,e,[(0,tb.A)({type:nq.POLYLINE,style:n,initialParsedStyle:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:!1}},r)])}return(0,t_.A)(e,t),(0,tO.A)(e,[{key:"getTotalLength",value:function(){return 0===this.parsedStyle.points.totalLength&&(this.parsedStyle.points.totalLength=function(t){if(t.length<2)return 0;for(var e=0,n=0;n<t.length-1;n++){var r=t[n],i=t[n+1];e+=nj(r[0],r[1],i[0],i[1])}return e}(this.parsedStyle.points.points)),this.parsedStyle.points.totalLength}},{key:"getPointAtLength",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.getPoint(t/this.getTotalLength(),e)}},{key:"getPoint",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.parsedStyle.points.points;if(0===this.parsedStyle.points.segments.length){var r,i,a=[],o=0,l=this.getTotalLength();n.forEach(function(t,e){if(n[e+1]){var s,u;(r=[0,0])[0]=o/l,s=t[0],u=t[1],i=nj(s,u,n[e+1][0],n[e+1][1]),o+=i,r[1]=o/l,a.push(r)}}),this.parsedStyle.points.segments=a}var s=0,u=0;this.parsedStyle.points.segments.forEach(function(e,n){t>=e[0]&&t<=e[1]&&(s=(t-e[0])/(e[1]-e[0]),u=n)});var c=nC(n[u][0],n[u][1],n[u+1][0],n[u+1][1],s),f=c.x,h=c.y,d=tz(tS(),tT(f,h,0),e?this.getWorldTransform():this.getLocalTransform());return new nQ(d[0],d[1])}},{key:"getStartTangent",value:function(){var t=this.parsedStyle.points.points,e=[];return e.push([t[1][0],t[1][1]]),e.push([t[0][0],t[0][1]]),e}},{key:"getEndTangent",value:function(){var t=this.parsedStyle.points.points,e=t.length-1,n=[];return n.push([t[e-1][0],t[e-1][1]]),n.push([t[e][0],t[e][1]]),n}}])}(lS);lP.PARSED_STYLE_LIST=new Set([].concat((0,tw.A)(lS.PARSED_STYLE_LIST),["points","markerStart","markerMid","markerEnd","markerStartOffset","markerEndOffset","isBillboard"]));var lT=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,tx.A)(this,e),(0,tk.A)(this,e,[(0,tb.A)({type:nq.RECT},t)])}return(0,t_.A)(e,t),(0,tO.A)(e)}(lp);lT.PARSED_STYLE_LIST=new Set([].concat((0,tw.A)(lp.PARSED_STYLE_LIST),["x","y","z","width","height","isBillboard","isSizeAttenuation","radius"]));var lC=["style"],lN=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.style,r=(0,n$.A)(t,lC);return(0,tx.A)(this,e),(0,tk.A)(this,e,[(0,tb.A)({type:nq.TEXT,style:(0,tb.A)({fill:"black"},n)},r)])}return(0,t_.A)(e,t),(0,tO.A)(e,[{key:"getComputedTextLength",value:function(){var t;return this.getGeometryBounds(),(null==(t=this.parsedStyle.metrics)?void 0:t.maxLineWidth)||0}},{key:"getLineBoundingRects",value:function(){var t;return this.getGeometryBounds(),(null==(t=this.parsedStyle.metrics)?void 0:t.lineMetrics)||[]}},{key:"isOverflowing",value:function(){return this.getGeometryBounds(),!!this.parsedStyle.isOverflowing}}])}(lp);lN.PARSED_STYLE_LIST=new Set([].concat((0,tw.A)(lp.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 lL=(0,tO.A)(function t(){(0,tx.A)(this,t),this.registry={},this.define(nq.CIRCLE,ly),this.define(nq.ELLIPSE,lm),this.define(nq.RECT,lT),this.define(nq.IMAGE,lw),this.define(nq.LINE,l_),this.define(nq.GROUP,lb),this.define(nq.PATH,lE),this.define(nq.POLYGON,lS),this.define(nq.POLYLINE,lP),this.define(nq.TEXT,lN),this.define(nq.HTML,lO)},[{key:"define",value:function(t,e){this.registry[t]=e}},{key:"get",value:function(t){return this.registry[t]}}]),lI=function(t){var e=t.name,n=t.inherits,r=t.interpolable,i=t.initialValue,a=t.syntax;le.styleValueRegistry.registerMetadata({n:e,inh:n,int:r,d:i,syntax:a})},lR=function(t){var e,n;function r(){(0,tx.A)(this,r),(t=(0,tk.A)(this,r)).defaultView=null,t.ownerDocument=null,t.nodeName="document";try{t.timeline=new le.AnimationTimeline(t)}catch(t){}var t,e={};return av.forEach(function(t){var n=t.n,r=t.inh,i=t.d;r&&i&&(e[n]=nk(i)?i(nq.GROUP):i)}),t.documentElement=new lb({id:"g-root",style:e}),t.documentElement.ownerDocument=t,t.documentElement.parentNode=t,t.childNodes=[t.documentElement],t}return(0,t_.A)(r,t),(0,tO.A)(r,[{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(t,e){if("svg"===t)return this.documentElement;var n=this.defaultView.customElements.get(t);n||(console.warn("Unsupported tagName: ",t),n="tspan"===t?lN:lb);var r=new n(e);return r.ownerDocument=this,r}},{key:"createElementNS",value:function(t,e,n){return this.createElement(e,n)}},{key:"cloneNode",value:function(t){throw Error(n0)}},{key:"destroy",value:function(){try{this.documentElement.destroyChildren(),this.timeline.destroy()}catch(t){}}},{key:"elementsFromBBox",value:function(t,e,n,r){var i=this.defaultView.context.rBushRoot.search({minX:t,minY:e,maxX:n,maxY:r}),a=[];return i.forEach(function(t){var e=t.displayObject,n=e.parsedStyle.pointerEvents,r=["auto","visiblepainted","visiblefill","visiblestroke","visible"].includes(void 0===n?"auto":n);(!r||r&&e.isVisible())&&!e.isCulled()&&e.isInteractive()&&a.push(e)}),a.sort(function(t,e){return e.sortable.renderOrder-t.sortable.renderOrder}),a}},{key:"elementFromPointSync",value:function(t,e){var n=this.defaultView.canvas2Viewport({x:t,y:e}),r=n.x,i=n.y,a=this.defaultView.getConfig(),o=a.width,l=a.height;if(r<0||i<0||r>o||i>l)return null;var s=this.defaultView.viewport2Client({x:r,y:i}),u=s.x,c=s.y,f=this.defaultView.getRenderingService().hooks.pickSync.call({topmost:!0,position:{x:t,y:e,viewportX:r,viewportY:i,clientX:u,clientY:c},picked:[]}).picked;return f&&f[0]||this.documentElement}},{key:"elementFromPoint",value:(e=(0,nF.A)((0,nB.A)().mark(function t(e,n){var r,i,a,o,l,s,u,c,f,h;return(0,nB.A)().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(i=(r=this.defaultView.canvas2Viewport({x:e,y:n})).x,a=r.y,l=(o=this.defaultView.getConfig()).width,s=o.height,!(i<0||a<0||i>l||a>s)){t.next=1;break}return t.abrupt("return",null);case 1:return c=(u=this.defaultView.viewport2Client({x:i,y:a})).x,f=u.y,t.next=2,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!0,position:{x:e,y:n,viewportX:i,viewportY:a,clientX:c,clientY:f},picked:[]});case 2:return h=t.sent.picked,t.abrupt("return",h&&h[0]||this.documentElement);case 3:case"end":return t.stop()}},t,this)})),function(t,n){return e.apply(this,arguments)})},{key:"elementsFromPointSync",value:function(t,e){var n=this.defaultView.canvas2Viewport({x:t,y:e}),r=n.x,i=n.y,a=this.defaultView.getConfig(),o=a.width,l=a.height;if(r<0||i<0||r>o||i>l)return[];var s=this.defaultView.viewport2Client({x:r,y:i}),u=s.x,c=s.y,f=this.defaultView.getRenderingService().hooks.pickSync.call({topmost:!1,position:{x:t,y:e,viewportX:r,viewportY:i,clientX:u,clientY:c},picked:[]}).picked;return f[f.length-1]!==this.documentElement&&f.push(this.documentElement),f}},{key:"elementsFromPoint",value:(n=(0,nF.A)((0,nB.A)().mark(function t(e,n){var r,i,a,o,l,s,u,c,f,h;return(0,nB.A)().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(i=(r=this.defaultView.canvas2Viewport({x:e,y:n})).x,a=r.y,l=(o=this.defaultView.getConfig()).width,s=o.height,!(i<0||a<0||i>l||a>s)){t.next=1;break}return t.abrupt("return",[]);case 1:return c=(u=this.defaultView.viewport2Client({x:i,y:a})).x,f=u.y,t.next=2,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!1,position:{x:e,y:n,viewportX:i,viewportY:a,clientX:c,clientY:f},picked:[]});case 2:return(h=t.sent.picked)[h.length-1]!==this.documentElement&&h.push(this.documentElement),t.abrupt("return",h);case 3:case"end":return t.stop()}},t,this)})),function(t,e){return n.apply(this,arguments)})},{key:"appendChild",value:function(t,e){throw Error(n1)}},{key:"insertBefore",value:function(t,e){throw Error(n1)}},{key:"removeChild",value:function(t,e){throw Error(n1)}},{key:"replaceChild",value:function(t,e,n){throw Error(n1)}},{key:"append",value:function(){throw Error(n1)}},{key:"prepend",value:function(){throw Error(n1)}},{key:"getElementById",value:function(t){return this.documentElement.getElementById(t)}},{key:"getElementsByName",value:function(t){return this.documentElement.getElementsByName(t)}},{key:"getElementsByTagName",value:function(t){return this.documentElement.getElementsByTagName(t)}},{key:"getElementsByClassName",value:function(t){return this.documentElement.getElementsByClassName(t)}},{key:"querySelector",value:function(t){return this.documentElement.querySelector(t)}},{key:"querySelectorAll",value:function(t){return this.documentElement.querySelectorAll(t)}},{key:"find",value:function(t){return this.documentElement.find(t)}},{key:"findAll",value:function(t){return this.documentElement.findAll(t)}}])}(oj),lD=function(){function t(e){(0,tx.A)(this,t),this.strategies=e}return(0,tO.A)(t,[{key:"apply",value:function(e){var n=e.config,r=e.camera,i=e.renderingService,a=e.renderingContext,o=this.strategies;i.hooks.cull.tap(t.tag,function(t){if(t){var e,i=t.cullable;if(0===o.length?i.visible=a.unculledEntities.indexOf(t.entity)>-1:i.visible=o.every(function(e){return e.isVisible(r,t)}),!t.isCulled()&&t.isVisible())return t;var l=(null==(e=n.future)?void 0:e.experimentalCancelEventPropagation)===!0;return t.dispatchEvent(new oA(oR.CULLED),l,l),null}return t}),i.hooks.afterRender.tap(t.tag,function(t){t.cullable.visibilityPlaneMask=-1})}}])}();lD.tag="Culling";var lB=function(){function t(){var e=this;(0,tx.A)(this,t),this.autoPreventDefault=!1,this.rootPointerEvent=new oM(null),this.rootWheelEvent=new oE(null),this.onPointerMove=function(t){var n=null==(r=e.context.renderingContext.root)||null==(r=r.ownerDocument)?void 0:r.defaultView;if(!n.supportsTouchEvents||"touch"!==t.pointerType){var r,i,a=e.normalizeToPointerEvent(t,n),o=(0,nz.A)(a);try{for(o.s();!(i=o.n()).done;){var l=i.value,s=e.bootstrapEvent(e.rootPointerEvent,l,n,t);e.context.eventService.mapEvent(s)}}catch(t){o.e(t)}finally{o.f()}e.setCursor(e.context.eventService.cursor)}},this.onClick=function(t){var n,r,i=null==(n=e.context.renderingContext.root)||null==(n=n.ownerDocument)?void 0:n.defaultView,a=e.normalizeToPointerEvent(t,i),o=(0,nz.A)(a);try{for(o.s();!(r=o.n()).done;){var l=r.value,s=e.bootstrapEvent(e.rootPointerEvent,l,i,t);e.context.eventService.mapEvent(s)}}catch(t){o.e(t)}finally{o.f()}e.setCursor(e.context.eventService.cursor)}}return(0,tO.A)(t,[{key:"apply",value:function(e){var n=this;this.context=e;var r=e.renderingService,i=this.context.renderingContext.root.ownerDocument.defaultView;this.context.eventService.setPickHandler(function(t){return n.context.renderingService.hooks.pickSync.call({position:t,picked:[],topmost:!0}).picked[0]||null}),r.hooks.pointerWheel.tap(t.tag,function(t){var e=n.normalizeWheelEvent(t);n.context.eventService.mapEvent(e)}),r.hooks.pointerDown.tap(t.tag,function(t){if(!i.supportsTouchEvents||"touch"!==t.pointerType){var e=n.normalizeToPointerEvent(t,i);n.autoPreventDefault&&e[0].isNormalized&&(!t.cancelable&&"cancelable"in t||t.preventDefault());var r,a=(0,nz.A)(e);try{for(a.s();!(r=a.n()).done;){var o=r.value,l=n.bootstrapEvent(n.rootPointerEvent,o,i,t);n.context.eventService.mapEvent(l)}}catch(t){a.e(t)}finally{a.f()}n.setCursor(n.context.eventService.cursor)}}),r.hooks.pointerUp.tap(t.tag,function(t){if(!i.supportsTouchEvents||"touch"!==t.pointerType){var e,r=n.context.contextService.getDomElement(),a=n.context.eventService.isNativeEventFromCanvas(r,t)?"":"outside",o=n.normalizeToPointerEvent(t,i),l=(0,nz.A)(o);try{for(l.s();!(e=l.n()).done;){var s=e.value,u=n.bootstrapEvent(n.rootPointerEvent,s,i,t);u.type+=a,n.context.eventService.mapEvent(u)}}catch(t){l.e(t)}finally{l.f()}n.setCursor(n.context.eventService.cursor)}}),r.hooks.pointerMove.tap(t.tag,this.onPointerMove),r.hooks.pointerOver.tap(t.tag,this.onPointerMove),r.hooks.pointerOut.tap(t.tag,this.onPointerMove),r.hooks.click.tap(t.tag,this.onClick),r.hooks.pointerCancel.tap(t.tag,function(t){var e,r=n.normalizeToPointerEvent(t,i),a=(0,nz.A)(r);try{for(a.s();!(e=a.n()).done;){var o=e.value,l=n.bootstrapEvent(n.rootPointerEvent,o,i,t);n.context.eventService.mapEvent(l)}}catch(t){a.e(t)}finally{a.f()}n.setCursor(n.context.eventService.cursor)})}},{key:"bootstrapEvent",value:function(t,e,n,r){t.view=n,t.originalEvent=null,t.nativeEvent=r,t.pointerId=e.pointerId,t.width=e.width,t.height=e.height,t.isPrimary=e.isPrimary,t.pointerType=e.pointerType,t.pressure=e.pressure,t.tangentialPressure=e.tangentialPressure,t.tiltX=e.tiltX,t.tiltY=e.tiltY,t.twist=e.twist,this.transferMouseData(t,e);var i=this.context.eventService.client2Viewport({x:e.clientX,y:e.clientY}),a=i.x,o=i.y;t.viewport.x=a,t.viewport.y=o;var l=this.context.eventService.viewport2Canvas(t.viewport),s=l.x,u=l.y;return t.canvas.x=s,t.canvas.y=u,t.global.copyFrom(t.canvas),t.offset.copyFrom(t.canvas),t.isTrusted=r.isTrusted,"pointerleave"===t.type&&(t.type="pointerout"),t.type.startsWith("mouse")&&(t.type=t.type.replace("mouse","pointer")),t.type.startsWith("touch")&&(t.type=aq[t.type]||t.type),t}},{key:"normalizeWheelEvent",value:function(t){var e=this.rootWheelEvent;this.transferMouseData(e,t),e.deltaMode=t.deltaMode,e.deltaX=t.deltaX,e.deltaY=t.deltaY,e.deltaZ=t.deltaZ;var n=this.context.eventService.client2Viewport({x:t.clientX,y:t.clientY}),r=n.x,i=n.y;e.viewport.x=r,e.viewport.y=i;var a=this.context.eventService.viewport2Canvas(e.viewport),o=a.x,l=a.y;return e.canvas.x=o,e.canvas.y=l,e.global.copyFrom(e.canvas),e.offset.copyFrom(e.canvas),e.nativeEvent=t,e.type=t.type,e}},{key:"transferMouseData",value:function(t,e){t.isTrusted=e.isTrusted,t.srcElement=e.srcElement,t.timeStamp=aH.now(),t.type=e.type,t.altKey=e.altKey,t.metaKey=e.metaKey,t.shiftKey=e.shiftKey,t.ctrlKey=e.ctrlKey,t.button=e.button,t.buttons=e.buttons,t.client.x=e.clientX,t.client.y=e.clientY,t.movement.x=e.movementX,t.movement.y=e.movementY,t.page.x=e.pageX,t.page.y=e.pageY,t.screen.x=e.screenX,t.screen.y=e.screenY,t.relatedTarget=null}},{key:"setCursor",value:function(t){this.context.contextService.applyCursorStyle(t||this.context.config.cursor||"default")}},{key:"normalizeToPointerEvent",value:function(t,e){var n=[];if(e.isTouchEvent(t))for(var r=0;r<t.changedTouches.length;r++){var i=t.changedTouches[r];nb(i.button)&&(i.button=0),nb(i.buttons)&&(i.buttons=1),nb(i.isPrimary)&&(i.isPrimary=1===t.touches.length&&"touchstart"===t.type),nb(i.width)&&(i.width=i.radiusX||1),nb(i.height)&&(i.height=i.radiusY||1),nb(i.tiltX)&&(i.tiltX=0),nb(i.tiltY)&&(i.tiltY=0),nb(i.pointerType)&&(i.pointerType="touch"),nb(i.pointerId)&&(i.pointerId=i.identifier||0),nb(i.pressure)&&(i.pressure=i.force||.5),nb(i.twist)&&(i.twist=0),nb(i.tangentialPressure)&&(i.tangentialPressure=0),i.isNormalized=!0,i.type=t.type,n.push(i)}else e.isMouseEvent(t)&&(nb(t.isPrimary)&&(t.isPrimary=!0),nb(t.width)&&(t.width=1),nb(t.height)&&(t.height=1),nb(t.tiltX)&&(t.tiltX=0),nb(t.tiltY)&&(t.tiltY=0),nb(t.pointerType)&&(t.pointerType="mouse"),nb(t.pointerId)&&(t.pointerId=1),nb(t.pressure)&&(t.pressure=.5),nb(t.twist)&&(t.twist=0),nb(t.tangentialPressure)&&(t.tangentialPressure=0),t.isNormalized=!0),n.push(t);return n}}])}();lB.tag="Event";var lF=[nq.CIRCLE,nq.ELLIPSE,nq.IMAGE,nq.RECT,nq.LINE,nq.POLYLINE,nq.POLYGON,nq.TEXT,nq.PATH,nq.HTML],lz=(0,tO.A)(function t(){(0,tx.A)(this,t)},[{key:"isVisible",value:function(t,e){var n,r=e.cullable;if(!r.enable)return!0;var i=e.getRenderBounds();if(nU.isEmpty(i))return!1;var a=t.getFrustum(),o=null==(n=e.parentNode)||null==(n=n.cullable)?void 0:n.visibilityPlaneMask;return r.visibilityPlaneMask=this.computeVisibilityWithPlaneMask(e,i,o||nK.INDETERMINATE,a.planes),r.visible=r.visibilityPlaneMask!==nK.OUTSIDE,r.visible}},{key:"computeVisibilityWithPlaneMask",value:function(t,e,n,r){if(n===nK.OUTSIDE||n===nK.INSIDE)return n;for(var i=nK.INSIDE,a=lF.indexOf(t.nodeName)>-1,o=0,l=r.length;o<l;++o){var s=1<<o;if((n&s)!=0&&(!a||4!==o&&5!==o)){var u=r[o],c=u.normal,f=u.distance;if(tB(c,e.getPositiveFarPoint(r[o]))+f<0)return nK.OUTSIDE;tB(c,e.getNegativeFarPoint(r[o]))+f<0&&(i|=s)}}return i}}]),l$=function(){function t(){(0,tx.A)(this,t),this.syncTasks=new Map,this.isFirstTimeRendering=!0,this.syncing=!1,this.isFirstTimeRenderingFinished=!1}return(0,tO.A)(t,[{key:"apply",value:function(e){var n,r,i=this,a=e.config,o=e.renderingService,l=e.renderingContext,s=e.rBushRoot,u=l.root.ownerDocument.defaultView;this.rBush=s;var c=function(t){o.dirtify()},f=function(t){i.syncTasks.set(t.target,t.detail.affectChildren),o.dirtify()},h=function(t){var e=t.target;le.enableSizeAttenuation&&le.styleValueRegistry.updateSizeAttenuation(e,u.getCamera().getZoom())},d=function(t){var e=t.target,n=e.rBushNode;null!=n&&n.aabb&&i.rBush.remove(n.aabb),i.syncTasks.delete(e),le.sceneGraphService.dirtyToRoot(e),o.dirtify()};o.hooks.init.tap(t.tag,function(){u.addEventListener(oR.MOUNTED,h),u.addEventListener(oR.UNMOUNTED,d),u.addEventListener(oR.ATTR_MODIFIED,c),u.addEventListener(oR.BOUNDS_CHANGED,f)}),o.hooks.destroy.tap(t.tag,function(){u.removeEventListener(oR.MOUNTED,h),u.removeEventListener(oR.UNMOUNTED,d),u.removeEventListener(oR.ATTR_MODIFIED,c),u.removeEventListener(oR.BOUNDS_CHANGED,f),i.syncTasks.clear()});var p=null!=(n=le.globalThis.requestIdleCallback)?n:a2.bind(le.globalThis),y=(null==(r=a.future)?void 0:r.experimentalRICSyncRTree)===!0;o.hooks.endFrame.tap(t.tag,function(){i.isFirstTimeRendering?(i.isFirstTimeRendering=!1,i.syncing=!0,p(function(){i.syncRTree(!0),i.isFirstTimeRenderingFinished=!0})):y&&le.globalThis.requestIdleCallback&&le.globalThis.cancelIdleCallback?(le.globalThis.cancelIdleCallback(i.ricSyncRTreeId),i.ricSyncRTreeId=le.globalThis.requestIdleCallback(function(){return i.syncRTree()})):i.syncRTree()})}},{key:"syncNode",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t.isConnected){var n=t.rBushNode;n.aabb&&this.rBush.remove(n.aabb);var r=t.getRenderBounds();if(r){var i=t.renderable;e&&(i.dirtyRenderBounds||(i.dirtyRenderBounds=new nU),i.dirtyRenderBounds.update(r.center,r.halfExtents));var a=r.getMin(),o=(0,tM.A)(a,2),l=o[0],s=o[1],u=r.getMax(),c=(0,tM.A)(u,2),f=c[0],h=c[1];n.aabb||(n.aabb={}),n.aabb.displayObject=t,n.aabb.minX=l,n.aabb.minY=s,n.aabb.maxX=f,n.aabb.maxY=h}if(n.aabb&&!isNaN(n.aabb.maxX)&&!isNaN(n.aabb.maxX)&&!isNaN(n.aabb.minX)&&!isNaN(n.aabb.minY))return n.aabb}}},{key:"syncRTree",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(e||!this.syncing&&0!==this.syncTasks.size){this.syncing=!0;var n=[],r=new Set,i=function(i){if(!r.has(i)&&i.renderable){var a=t.syncNode(i,e);a&&(n.push(a),r.add(i))}};this.syncTasks.forEach(function(t,e){t&&e.forEach(i);for(var n=e;n;)i(n),n=n.parentElement}),this.rBush.load(n),n.length=0,this.syncing=!1}}}])}();l$.tag="Prepare";var lW=((Ea={}).READY="ready",Ea.BEFORE_RENDER="beforerender",Ea.RERENDER="rerender",Ea.AFTER_RENDER="afterrender",Ea.BEFORE_DESTROY="beforedestroy",Ea.AFTER_DESTROY="afterdestroy",Ea.RESIZE="resize",Ea.DIRTY_RECTANGLE="dirtyrectangle",Ea.RENDERER_CHANGED="rendererchanged",Ea),lG=new oA(oR.MOUNTED),lq=new oA(oR.UNMOUNTED),lH=new oA(lW.BEFORE_RENDER),lY=new oA(lW.RERENDER),lV=new oA(lW.AFTER_RENDER),lU=function(t){function e(t){(0,tx.A)(this,e),(i=(0,tk.A)(this,e)).Element=lp,i.inited=!1,i.context={};var n,r,i,a=t.container,o=t.canvas,l=t.renderer,s=t.width,u=t.height,c=t.background,f=t.cursor,h=t.supportsMutipleCanvasesInOneContainer,d=t.cleanUpOnDestroy,p=void 0===d||d,y=t.offscreenCanvas,g=t.devicePixelRatio,v=t.requestAnimationFrame,b=t.cancelAnimationFrame,x=t.createImage,O=t.supportsTouchEvents,w=t.supportsPointerEvents,k=t.isTouchEvent,_=t.isMouseEvent,M=t.dblClickSpeed,E=s,A=u,S=g||az&&window.devicePixelRatio||1;return S=S>=1?Math.ceil(S):1,o&&(E=s||("auto"===(n=aG(o,"width"))?o.offsetWidth:parseFloat(n))||o.width/S,A=u||("auto"===(r=aG(o,"height"))?o.offsetHeight:parseFloat(r))||o.height/S),i.customElements=new lL,i.devicePixelRatio=S,i.requestAnimationFrame=null!=v?v:a2.bind(le.globalThis),i.cancelAnimationFrame=null!=b?b:a5.bind(le.globalThis),i.createImage=null!=x?x:function(){return new window.Image},i.supportsTouchEvents=null!=O?O:"ontouchstart"in le.globalThis,i.supportsPointerEvents=null!=w?w:!!le.globalThis.PointerEvent,i.isTouchEvent=null!=k?k:function(t){return i.supportsTouchEvents&&t instanceof le.globalThis.TouchEvent},i.isMouseEvent=null!=_?_:function(t){return!le.globalThis.MouseEvent||t instanceof le.globalThis.MouseEvent&&(!i.supportsPointerEvents||!(t instanceof le.globalThis.PointerEvent))},y&&(le.offscreenCanvas=y),i.document=new lR,i.document.defaultView=i,h||function(t,e,n){if(t){var r="string"==typeof t?document.getElementById(t):t;aF.has(r)&&aF.get(r).destroy(n),aF.set(r,e)}}(a,i,p),i.initRenderingContext((0,tb.A)((0,tb.A)({},t),{},{width:E,height:A,background:null!=c?c:"transparent",cursor:null!=f?f:"default",cleanUpOnDestroy:p,devicePixelRatio:S,requestAnimationFrame:i.requestAnimationFrame,cancelAnimationFrame:i.cancelAnimationFrame,createImage:i.createImage,supportsTouchEvents:i.supportsTouchEvents,supportsPointerEvents:i.supportsPointerEvents,isTouchEvent:i.isTouchEvent,isMouseEvent:i.isMouseEvent,dblClickSpeed:null!=M?M:200})),i.initDefaultCamera(E,A,l.clipSpaceNearZ),i.initRenderer(l,!0),i}return(0,t_.A)(e,t),(0,tO.A)(e,[{key:"initRenderingContext",value:function(t){this.context.config=t,this.context.renderingContext={root:this.document.documentElement,unculledEntities:[],renderListCurrentFrame:[],renderReasons:new Set,force:!1,dirty:!1}}},{key:"initDefaultCamera",value:function(t,e,n){var r=this,i=new le.CameraContribution;i.clipSpaceNearZ=n,i.setType(ro.EXPLORING,rl.DEFAULT).setPosition(t/2,e/2,500).setFocalPoint(t/2,e/2,0).setOrthographic(-(t/2),t/2,e/2,-(e/2),.1,1e3),i.canvas=this,i.eventEmitter.on(ru,function(){r.context.renderingContext.renderReasons.add(oC.CAMERA_CHANGED),le.enableSizeAttenuation&&r.getConfig().renderer.getConfig().enableSizeAttenuation&&r.updateSizeAttenuation()}),this.context.camera=i}},{key:"updateSizeAttenuation",value:function(){var t=this.getCamera().getZoom();this.document.documentElement.forEach(function(e){le.styleValueRegistry.updateSizeAttenuation(e,t)})}},{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 t=this;return!this.readyPromise&&(this.readyPromise=new Promise(function(e){t.resolveReadyPromise=function(){e(t)}}),this.inited&&this.resolveReadyPromise()),this.readyPromise}},{key:"destroy",value:function(){var t,e=!(arguments.length>0)||void 0===arguments[0]||arguments[0],n=arguments.length>1?arguments[1]:void 0;rK.clearCache();var r=(null==(t=this.getConfig().future)?void 0:t.experimentalCancelEventPropagation)===!0;n||this.dispatchEvent(new oA(lW.BEFORE_DESTROY),r,r),this.frameId&&this.cancelAnimationFrame(this.frameId);var i=this.getRoot();e&&(this.unmountChildren(i),this.document.destroy(),this.getEventService().destroy()),this.getRenderingService().destroy(),this.getContextService().destroy(),this.context.rBushRoot&&this.context.rBushRoot.clear(),n||this.dispatchEvent(new oA(lW.AFTER_DESTROY),r,r);var a=function(t){t.currentTarget=null,t.manager=null,t.target=null,t.relatedNode=null};a(lG),a(lq),a(lH),a(lY),a(lV),a(lf),a(la),a(lo),a(ll),le.textService.clearCache()}},{key:"changeSize",value:function(t,e){this.resize(t,e)}},{key:"resize",value:function(t,e){var n,r=this.context.config;r.width=t,r.height=e,this.getContextService().resize(t,e);var i=this.context.camera,a=i.getProjectionMode();i.setPosition(t/2,e/2,500).setFocalPoint(t/2,e/2,0),a===rs.ORTHOGRAPHIC?i.setOrthographic(-(t/2),t/2,e/2,-(e/2),i.getNear(),i.getFar()):i.setAspect(t/e);var o=(null==(n=r.future)?void 0:n.experimentalCancelEventPropagation)===!0;this.dispatchEvent(new oA(lW.RESIZE,{width:t,height:e}),o,o)}},{key:"appendChild",value:function(t,e){return this.document.documentElement.appendChild(t,e)}},{key:"insertBefore",value:function(t,e){return this.document.documentElement.insertBefore(t,e)}},{key:"removeChild",value:function(t){return this.document.documentElement.removeChild(t)}},{key:"removeChildren",value:function(){this.document.documentElement.removeChildren()}},{key:"destroyChildren",value:function(){this.document.documentElement.destroyChildren()}},{key:"render",value:function(t){var e,n=this;t&&(lH.detail=t,lV.detail=t);var r=(null==(e=this.getConfig().future)?void 0:e.experimentalCancelEventPropagation)===!0;this.dispatchEvent(lH,r,r),this.getRenderingService().render(this.getConfig(),t,function(){n.dispatchEvent(lY,r,r)}),this.dispatchEvent(lV,r,r)}},{key:"run",value:function(){var t=this,e=function(n,r){t.render(r),t.frameId=t.requestAnimationFrame(e)};e()}},{key:"initRenderer",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!t)throw Error("Renderer is required.");this.inited=!1,this.readyPromise=void 0,this.context.rBushRoot=new nG,this.context.renderingPlugins=[],this.context.renderingPlugins.push(new lB,new l$,new lD([new lz])),this.loadRendererContainerModule(t),this.context.contextService=new this.context.ContextService((0,tb.A)((0,tb.A)({},le),this.context)),this.context.renderingService=new oN(le,this.context),this.context.eventService=new oP(le,this.context),this.context.eventService.init(),this.context.contextService.init?(this.context.contextService.init(),this.initRenderingService(t,n,!0)):this.context.contextService.initAsync().then(function(){e.initRenderingService(t,n)}).catch(function(t){console.error(t)})}},{key:"initRenderingService",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.context.renderingService.init(function(){e.inited=!0;var i,a=(null==(i=e.getConfig().future)?void 0:i.experimentalCancelEventPropagation)===!0;n?r?e.requestAnimationFrame(function(){e.dispatchEvent(new oA(lW.READY),a,a)}):e.dispatchEvent(new oA(lW.READY),a,a):e.dispatchEvent(new oA(lW.RENDERER_CHANGED),a,a),e.readyPromise&&e.resolveReadyPromise(),n||e.getRoot().forEach(function(t){var e;null==(e=t.dirty)||e.call(t,!0,!0)}),e.mountChildren(e.getRoot()),t.getConfig().enableAutoRendering&&e.run()})}},{key:"loadRendererContainerModule",value:function(t){var e=this;t.getPlugins().forEach(function(t){t.context=e.context,t.init(le)})}},{key:"setRenderer",value:function(t){var e=this.getConfig();if(e.renderer!==t){var n=e.renderer;e.renderer=t,this.destroy(!1,!0),(0,tw.A)((null==n?void 0:n.getPlugins())||[]).reverse().forEach(function(t){t.destroy(le)}),this.initRenderer(t)}}},{key:"setCursor",value:function(t){this.getConfig().cursor=t,this.getContextService().applyCursorStyle(t)}},{key:"unmountChildren",value:function(t){var e=this;if(t.childNodes.forEach(function(t){e.unmountChildren(t)}),this.inited){if(t.isMutationObserved)t.dispatchEvent(lq);else{var n,r=(null==(n=this.getConfig().future)?void 0:n.experimentalCancelEventPropagation)===!0;lq.target=t,this.dispatchEvent(lq,!0,r)}t!==this.document.documentElement&&(t.ownerDocument=null),t.isConnected=!1}t.isCustomElement&&t.disconnectedCallback&&t.disconnectedCallback()}},{key:"mountChildren",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:aY(t);if(this.inited){if(!t.isConnected&&(t.ownerDocument=this.document,t.isConnected=!0,!n))if(t.isMutationObserved)t.dispatchEvent(lG);else{var r,i=(null==(r=this.getConfig().future)?void 0:r.experimentalCancelEventPropagation)===!0;lG.target=t,this.dispatchEvent(lG,!0,i)}}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: ",t.nodeName);t.childNodes.forEach(function(t){e.mountChildren(t,n)}),t.isCustomElement&&t.connectedCallback&&t.connectedCallback()}},{key:"mountFragment",value:function(t){this.mountChildren(t,!1)}},{key:"client2Viewport",value:function(t){return this.getEventService().client2Viewport(t)}},{key:"viewport2Client",value:function(t){return this.getEventService().viewport2Client(t)}},{key:"viewport2Canvas",value:function(t){return this.getEventService().viewport2Canvas(t)}},{key:"canvas2Viewport",value:function(t){return this.getEventService().canvas2Viewport(t)}},{key:"getPointByClient",value:function(t,e){return this.client2Viewport({x:t,y:e})}},{key:"getClientByPoint",value:function(t,e){return this.viewport2Client({x:t,y:e})}}])}(oS),lX=function(t){function e(){var t;(0,tx.A)(this,e);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=(0,tk.A)(this,e,[].concat(r))).landmarks=[],t}return(0,t_.A)(e,t),(0,tO.A)(e,[{key:"rotate",value:function(t,e,n){if(this.relElevation=n2(e),this.relAzimuth=n2(t),this.relRoll=n2(n),this.elevation+=this.relElevation,this.azimuth+=this.relAzimuth,this.roll+=this.relRoll,this.type===ro.EXPLORING){var r=eR(eI(),[1,0,0],(this.rotateWorld?1:-1)*this.relElevation*n4),i=eR(eI(),[0,1,0],(this.rotateWorld?1:-1)*this.relAzimuth*n4),a=eR(eI(),[0,0,1],this.relRoll*n4),o=eD(eI(),i,r);o=eD(eI(),o,a);var l=ed(tY(),o);t5(this.matrix,this.matrix,[0,0,-this.distance]),t2(this.matrix,this.matrix,l),t5(this.matrix,this.matrix,[0,0,this.distance])}else{if(Math.abs(this.elevation)>90)return this;this.computeMatrix()}return this._getAxes(),this.type===ro.ORBITING||this.type===ro.EXPLORING?this._getPosition():this.type===ro.TRACKING&&this._getFocalPoint(),this._update(),this}},{key:"pan",value:function(t,e){var n=n3(t,e,0),r=tj(this.position);return tL(r,r,tR(tS(),this.right,n[0])),tL(r,r,tR(tS(),this.up,n[1])),this._setPosition(r),this.triggerUpdate(),this}},{key:"dolly",value:function(t){var e=this.forward,n=tj(this.position),r=t*this.dollyingStep;return r=Math.max(Math.min(this.distance+t*this.dollyingStep,this.maxDistance),this.minDistance)-this.distance,n[0]+=r*e[0],n[1]+=r*e[1],n[2]+=r*e[2],this._setPosition(n),this.type===ro.ORBITING||this.type===ro.EXPLORING?this._getDistance():this.type===ro.TRACKING&&tL(this.focalPoint,n,this.distanceVector),this.triggerUpdate(),this}},{key:"cancelLandmarkAnimation",value:function(){void 0!==this.landmarkAnimationID&&this.canvas.cancelAnimationFrame(this.landmarkAnimationID)}},{key:"createLandmark",value:function(t){var e,n,r,i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=a.position,l=void 0===o?this.position:o,s=a.focalPoint,u=void 0===s?this.focalPoint:s,c=a.roll,f=a.zoom,h=new le.CameraContribution;h.setType(this.type,void 0),h.setPosition(l[0],null!=(e=l[1])?e:this.position[1],null!=(n=l[2])?n:this.position[2]),h.setFocalPoint(u[0],null!=(r=u[1])?r:this.focalPoint[1],null!=(i=u[2])?i:this.focalPoint[2]),h.setRoll(null!=c?c:this.roll),h.setZoom(null!=f?f:this.zoom);var d={name:t,matrix:tV(h.getWorldTransform()),right:tj(h.right),up:tj(h.up),forward:tj(h.forward),position:tj(h.getPosition()),focalPoint:tj(h.getFocalPoint()),distanceVector:tj(h.getDistanceVector()),distance:h.getDistance(),dollyingStep:h.getDollyingStep(),azimuth:h.getAzimuth(),elevation:h.getElevation(),roll:h.getRoll(),relAzimuth:h.relAzimuth,relElevation:h.relElevation,relRoll:h.relRoll,zoom:h.getZoom()};return this.landmarks.push(d),d}},{key:"gotoLandmark",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=eV(t)?this.landmarks.find(function(e){return e.name===t}):t;if(r){var i,a=eq(n)?{duration:n}:n,o=a.easing,l=a.duration,s=void 0===l?100:l,u=a.easingFunction,c=a.onfinish,f=void 0===c?void 0:c,h=a.onframe,d=void 0===h?void 0:h;this.cancelLandmarkAnimation();var p=r.position,y=r.focalPoint,g=r.zoom,v=r.roll,b=(void 0===u?void 0:u)||le.EasingFunction(void 0===o?"linear":o),x=function(){e.setFocalPoint(y),e.setPosition(p),e.setRoll(v),e.setZoom(g),e.computeMatrix(),e.triggerUpdate(),null==f||f()};if(0===s)return x();var O=function(t){void 0===i&&(i=t);var n=t-i;if(n>=s)return void x();var r=b(n/s),a=tS(),o=tS(),l=1,u=0;if(tF(a,e.focalPoint,y,r),tF(o,e.position,p,r),u=e.roll*(1-r)+v*r,l=e.zoom*(1-r)+g*r,e.setFocalPoint(a),e.setPosition(o),e.setRoll(u),e.setZoom(l),tW(a,y)+tW(o,p)<=.01&&void 0===g&&void 0===v)return x();e.computeMatrix(),e.triggerUpdate(),n<s&&(null==d||d(r),e.landmarkAnimationID=e.canvas.requestAnimationFrame(O))};this.canvas.requestAnimationFrame(O)}}}])}(rc);le.CameraContribution=lX,new WeakMap;var lK=function(t){function e(t,n,r,i){var a;return(0,tx.A)(this,e),(a=(0,tk.A)(this,e,[t])).currentTime=r,a.timelineTime=i,a.target=n,a.type="finish",a.bubbles=!1,a.currentTarget=n,a.defaultPrevented=!1,a.eventPhase=a.AT_TARGET,a.timeStamp=Date.now(),a.currentTime=r,a.timelineTime=i,a}return(0,t_.A)(e,t),(0,tO.A)(e)}(ok),lZ=0,lQ=(0,tO.A)(function t(e,n){var r;(0,tx.A)(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=e,e.animation=this,this.timeline=n,this.id="".concat(lZ++),this._inEffect=!!this.effect.update(0),this._totalDuration=Number(null==(r=this.effect)?void 0:r.getComputedTiming().endTime),this._holdTime=0,this._paused=!1,this.oldPlayState="idle",this.updatePromises()},[{key:"pending",get:function(){return null===this._startTime&&!this._paused&&0!==this.playbackRate||this.currentTimePending}},{key:"playState",get:function(){return this._idle?"idle":this._isFinished?"finished":this._paused?"paused":"running"}},{key:"ready",get:function(){var t=this;return!this.readyPromise&&(-1===this.timeline.animationsWithPromises.indexOf(this)&&this.timeline.animationsWithPromises.push(this),this.readyPromise=new Promise(function(e,n){t.resolveReadyPromise=function(){e(t)},t.rejectReadyPromise=function(){n(Error())}}),this.pending||this.resolveReadyPromise()),this.readyPromise}},{key:"finished",get:function(){var t=this;return this.finishedPromise||(-1===this.timeline.animationsWithPromises.indexOf(this)&&this.timeline.animationsWithPromises.push(this),this.finishedPromise=new Promise(function(e,n){t.resolveFinishedPromise=function(){e(t)},t.rejectFinishedPromise=function(){n(Error())}}),"finished"===this.playState&&this.resolveFinishedPromise()),this.finishedPromise}},{key:"currentTime",get:function(){return this.updatePromises(),this._idle||this.currentTimePending?null:this._currentTime},set:function(t){if(!isNaN(t=Number(t))){if(this.timeline.restart(),!this._paused&&null!==this._startTime){var e;this._startTime=Number(null==(e=this.timeline)?void 0:e.currentTime)-t/this.playbackRate}this.currentTimePending=!1,this._currentTime!==t&&(this._idle&&(this._idle=!1,this._paused=!0),this.tickCurrentTime(t,!0),this.timeline.applyDirtiedAnimation(this))}}},{key:"startTime",get:function(){return this._startTime},set:function(t){null!==t&&(this.updatePromises(),!isNaN(t=Number(t))&&(this._paused||this._idle||(this._startTime=t,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(t){if(t!==this._playbackRate){this.updatePromises();var e=this.currentTime;this._playbackRate=t,this.startTime=null,"paused"!==this.playState&&"idle"!==this.playState&&(this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this)),null!==e&&(this.currentTime=e),this.updatePromises()}}},{key:"_isFinished",get:function(){return!this._idle&&(this._playbackRate>0&&Number(this._currentTime)>=this._totalDuration||this._playbackRate<0&&0>=Number(this._currentTime))}},{key:"totalDuration",get:function(){return this._totalDuration}},{key:"_needsTick",get:function(){return this.pending||"running"===this.playState||!this._finishedFlag}},{key:"updatePromises",value:function(){if(null!=(t=this.effect.target)&&t.destroyed)return this.readyPromise=void 0,this.finishedPromise=void 0,!1;var t,e=this.oldPlayState,n=this.pending?"pending":this.playState;return this.readyPromise&&n!==e&&("idle"===n?(this.rejectReadyPromise(),this.readyPromise=void 0):"pending"===e?this.resolveReadyPromise():"pending"===n&&(this.readyPromise=void 0)),this.finishedPromise&&n!==e&&("idle"===n?(this.rejectFinishedPromise(),this.finishedPromise=void 0):"finished"===n?this.resolveFinishedPromise():"finished"===e&&(this.finishedPromise=void 0)),this.oldPlayState=n,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),-1===this.timeline.animations.indexOf(this)&&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._idle&&(this.rewind(),this._idle=!1):this.currentTimePending=!0,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 t=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 e=new lK(null,this,this.currentTime,null);setTimeout(function(){t.oncancel(e)})}}},{key:"reverse",value:function(){this.updatePromises();var t=this.currentTime;this.playbackRate*=-1,this.play(),null!==t&&(this.currentTime=t),this.updatePromises()}},{key:"updatePlaybackRate",value:function(t){this.playbackRate=t}},{key:"targetAnimations",value:function(){var t;return(null==(t=this.effect)?void 0:t.target).getAnimations()}},{key:"markTarget",value:function(){var t=this.targetAnimations();-1===t.indexOf(this)&&t.push(this)}},{key:"unmarkTarget",value:function(){var t=this.targetAnimations(),e=t.indexOf(this);-1!==e&&t.splice(e,1)}},{key:"tick",value:function(t,e){!this._idle&&!this._paused&&(null===this._startTime?e&&(this.startTime=t-this._currentTime/this.playbackRate):this._isFinished||this.tickCurrentTime((t-this._startTime)*this.playbackRate)),e&&(this.currentTimePending=!1,this.fireEvents(t))}},{key:"rewind",value:function(){if(this.playbackRate>=0)this.currentTime=0;else if(this._totalDuration<1/0)this.currentTime=this._totalDuration;else throw Error("Unable to rewind negative playback rate animation with infinite duration")}},{key:"persist",value:function(){throw Error(n0)}},{key:"addEventListener",value:function(t,e,n){throw Error(n0)}},{key:"removeEventListener",value:function(t,e,n){throw Error(n0)}},{key:"dispatchEvent",value:function(t){throw Error(n0)}},{key:"commitStyles",value:function(){throw Error(n0)}},{key:"ensureAlive",value:function(){var t,e;this.playbackRate<0&&0===this.currentTime?this._inEffect=!!(null!=(t=this.effect)&&t.update(-1)):this._inEffect=!!(null!=(e=this.effect)&&e.update(this.currentTime)),this._inTimeline||!this._inEffect&&this._finishedFlag||(this._inTimeline=!0,this.timeline.animations.push(this))}},{key:"tickCurrentTime",value:function(t,e){t!==this._currentTime&&(this._currentTime=t,this._isFinished&&!e&&(this._currentTime=this._playbackRate>0?this._totalDuration:0),this.ensureAlive())}},{key:"fireEvents",value:function(t){var e=this;if(this._isFinished){if(!this._finishedFlag){if(this.onfinish){var n=new lK(null,this,this.currentTime,t);setTimeout(function(){e.onfinish&&e.onfinish(n)})}this._finishedFlag=!0}}else{if(this.onframe&&"running"===this.playState){var r=new lK(null,this,this.currentTime,t);this.onframe(r)}this._finishedFlag=!1}}}]),lJ="function"==typeof Float32Array,l0=function(t,e){return 1-3*e+3*t},l1=function(t,e){return 3*e-6*t},l2=function(t){return 3*t},l5=function(t,e,n){return((l0(e,n)*t+l1(e,n))*t+l2(e))*t},l3=function(t,e,n){return 3*l0(e,n)*t*t+2*l1(e,n)*t+l2(e)},l4=function(t,e,n,r,i){var a,o,l=0;do(a=l5(o=e+(n-e)/2,r,i)-t)>0?n=o:e=o;while(Math.abs(a)>1e-7&&++l<10);return o},l6=function(t,e,n,r){for(var i=0;i<4;++i){var a=l3(e,n,r);if(0===a)break;var o=l5(e,n,r)-t;e-=o/a}return e},l8=function(t,e,n,r){if(!(t>=0&&t<=1&&n>=0&&n<=1))throw Error("bezier x values must be in [0, 1] range");if(t===e&&n===r)return function(t){return t};for(var i=lJ?new Float32Array(11):Array(11),a=0;a<11;++a)i[a]=l5(.1*a,t,n);var o=function(e){for(var r=0,a=1;10!==a&&i[a]<=e;++a)r+=.1;var o=r+(e-i[--a])/(i[a+1]-i[a])*.1,l=l3(o,t,n);return l>=.001?l6(e,o,t,n):0===l?o:l4(e,r,r+.1,t,n)};return function(t){return 0===t||1===t?t:l5(o(t),e,r)}},l9=function(t){return Math.pow(t,2)},l7=function(t){return Math.pow(t,3)},st=function(t){return Math.pow(t,4)},se=function(t){return Math.pow(t,5)},sn=function(t){return Math.pow(t,6)},sr=function(t){return 1-Math.cos(t*Math.PI/2)},si=function(t){return 1-Math.sqrt(1-t*t)},sa=function(t){return t*t*(3*t-2)},so=function(t){for(var e,n=4;t<((e=Math.pow(2,--n))-1)/11;);return 1/Math.pow(4,3-n)-7.5625*Math.pow((3*e-2)/22-t,2)},sl=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=(0,tM.A)(e,2),r=n[0],i=n[1],a=eU(Number(void 0===r?1:r),1,10),o=eU(Number(void 0===i?.5:i),.1,2);return 0===t||1===t?t:-a*Math.pow(2,10*(t-1))*Math.sin(2*Math.PI*(t-1-o/(2*Math.PI)*Math.asin(1/a))/o)},ss=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0,r=(0,tM.A)(e,4),i=r[0],a=void 0===i?1:i,o=r[1],l=void 0===o?100:o,s=r[2],u=void 0===s?10:s,c=r[3],f=void 0===c?0:c;a=eU(a,.1,1e3),l=eU(l,.1,1e3),u=eU(u,.1,1e3),f=eU(f,.1,1e3);var h=Math.sqrt(l/a),d=u/(2*Math.sqrt(l*a)),p=d<1?h*Math.sqrt(1-d*d):0,y=d<1?(d*h+-f)/p:-f+h,g=n?n*t/1e3:t;return(g=d<1?Math.exp(-g*d*h)*(+Math.cos(p*g)+y*Math.sin(p*g)):(1+y*g)*Math.exp(-g*h),0===t||1===t)?t:1-g},su=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=(0,tM.A)(e,2),r=n[0],i=void 0===r?10:r;return("start"===n[1]?Math.ceil:Math.floor)(eU(t,0,1)*i)/i},sc=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=(0,tM.A)(e,4);return l8(n[0],n[1],n[2],n[3])(t)},sf=l8(.42,0,1,1),sh=function(t){return function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0;return 1-t(1-e,n,r)}},sd=function(t){return function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0;return e<.5?t(2*e,n,r)/2:1-t(-2*e+2,n,r)/2}},sp=function(t){return function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0;return e<.5?(1-t(1-2*e,n,r))/2:(t(2*e-1,n,r)+1)/2}},sy={steps:su,"step-start":function(t){return su(t,[1,"start"])},"step-end":function(t){return su(t,[1,"end"])},linear:function(t){return t},"cubic-bezier":sc,ease:function(t){return sc(t,[.25,.1,.25,1])},in:sf,out:sh(sf),"in-out":sd(sf),"out-in":sp(sf),"in-quad":l9,"out-quad":sh(l9),"in-out-quad":sd(l9),"out-in-quad":sp(l9),"in-cubic":l7,"out-cubic":sh(l7),"in-out-cubic":sd(l7),"out-in-cubic":sp(l7),"in-quart":st,"out-quart":sh(st),"in-out-quart":sd(st),"out-in-quart":sp(st),"in-quint":se,"out-quint":sh(se),"in-out-quint":sd(se),"out-in-quint":sp(se),"in-expo":sn,"out-expo":sh(sn),"in-out-expo":sd(sn),"out-in-expo":sp(sn),"in-sine":sr,"out-sine":sh(sr),"in-out-sine":sd(sr),"out-in-sine":sp(sr),"in-circ":si,"out-circ":sh(si),"in-out-circ":sd(si),"out-in-circ":sp(si),"in-back":sa,"out-back":sh(sa),"in-out-back":sd(sa),"out-in-back":sp(sa),"in-bounce":so,"out-bounce":sh(so),"in-out-bounce":sd(so),"out-in-bounce":sp(so),"in-elastic":sl,"out-elastic":sh(sl),"in-out-elastic":sd(sl),"out-in-elastic":sp(sl),spring:ss,"spring-in":ss,"spring-out":sh(ss),"spring-in-out":sd(ss),"spring-out-in":sp(ss)},sg=function(t){var e;return("-"===(e=(e=t).replace(/([A-Z])/g,function(t){return"-".concat(t.toLowerCase())})).charAt(0)?e.substring(1):e).replace(/^ease-/,"").replace(/(\(|\s).+/,"").toLowerCase().trim()},sv=function(t){return t};function sm(t,e){return function(n){if(n>=1)return 1;var r=1/t;return(n+=e*r)-n%r}}var sb="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",sx=new RegExp("cubic-bezier\\(".concat(sb,",").concat(sb,",").concat(sb,",").concat(sb,"\\)")),sO=/steps\(\s*(\d+)\s*\)/,sw=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/;function sk(t){var e=sx.exec(t);if(e)return l8.apply(void 0,(0,tw.A)(e.slice(1).map(Number)));var n=sO.exec(t);if(n)return sm(Number(n[1]),0);var r=sw.exec(t);return r?sm(Number(r[1]),{start:1,middle:.5,end:0}[r[2]]):sy[sg(t)]||sy.linear}function s_(t){return"offset"!==t&&"easing"!==t&&"composite"!==t&&"computedOffset"!==t}var sM=function(t,e,n){return function(r){var i=function t(e,n,r){if("number"==typeof e&&"number"==typeof n)return e*(1-r)+n*r;if("boolean"==typeof e&&"boolean"==typeof n||"string"==typeof e&&"string"==typeof n)return r<.5?e:n;if(Array.isArray(e)&&Array.isArray(n)){for(var i=e.length,a=n.length,o=Math.max(i,a),l=[],s=0;s<o;s++)l.push(t(e[s<i?s:i-1],n[s<a?s:a-1],r));return l}throw Error("Mismatched interpolation arguments ".concat(e,":").concat(n))}(t,e,r);return eq(i)?i:n(i)}},sE=(0,tO.A)(function t(){(0,tx.A)(this,t),this.delay=0,this.direction="normal",this.duration="auto",this._easing="linear",this.easingFunction=sv,this.endDelay=0,this.fill="auto",this.iterationStart=0,this.iterations=1,this.currentIteration=null,this.progress=null},[{key:"easing",get:function(){return this._easing},set:function(t){this.easingFunction=sk(t),this._easing=t}}]);function sA(t,e){if(null===t)return[];Array.isArray(t)||(t=function(t){var e=[];for(var n in t)if(!(n in["easing","offset","composite"])){var r=t[n];Array.isArray(r)||(r=[r]);for(var i=r.length,a=0;a<i;a++){if(!e[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),e[a]=o}void 0!==r[a]&&null!==r[a]&&(e[a][n]=r[a])}}return e.sort(function(t,e){return(t.computedOffset||0)-(e.computedOffset||0)}),e}(t));for(var n=t.map(function(t){var n={};for(var r in null!=e&&e.composite&&(n.composite="auto"),t){var i=t[r];if("offset"===r){if(null!==i){if(!isFinite(i=Number(i)))throw Error("Keyframe offsets must be numbers.");if(i<0||i>1)throw Error("Keyframe offsets must be between 0 and 1.");n.computedOffset=i}}else if("composite"===r&&-1===["replace","add","accumulate","auto"].indexOf(i))throw Error("".concat(i," compositing is not supported"));n[r]=i}return void 0===n.offset&&(n.offset=null),void 0===n.easing&&(n.easing=(null==e?void 0:e.easing)||"linear"),void 0===n.composite&&(n.composite="auto"),n}),r=!0,i=-1/0,a=0;a<n.length;a++){var o=n[a].offset;if(eY(o))r=!1;else{if(o<i)throw TypeError("Keyframes are not loosely sorted by offset. Sort or specify offsets.");i=o}}return n=n.filter(function(t){return Number(t.offset)>=0&&1>=Number(t.offset)}),r||function(){var t,e,r=n.length;n[r-1].computedOffset=Number(null!=(t=n[r-1].offset)?t:1),r>1&&(n[0].computedOffset=Number(null!=(e=n[0].offset)?e:0));for(var i=0,a=Number(n[0].computedOffset),o=1;o<r;o++){var l=n[o].computedOffset;if(!eY(l)&&!eY(a)){for(var s=1;s<o-i;s++)n[i+s].computedOffset=a+(Number(l)-a)*s/(o-i);i=o,a=Number(l)}}}(),n}var sS="backwards|forwards|both|none".split("|"),sj="reverse|alternate|alternate-reverse".split("|"),sP=(0,tO.A)(function t(e,n,r){var i,a,o,l,s,u,c,f,h,d,p,y,g=this;(0,tx.A)(this,t),this.composite="replace",this.iterationComposite="replace",this.target=e,this.timing=("number"==typeof(i=null!=(l=r)?l:{duration:"auto"})&&(i=isNaN(i)?{duration:"auto"}:{duration:i}),s=l=i,u=new sE,"number"!=typeof s||isNaN(s)?void 0!==s&&Object.keys(s).forEach(function(t){void 0!==s[t]&&null!==s[t]&&"auto"!==s[t]&&(("number"==typeof u[t]||"duration"===t)&&("number"!=typeof s[t]||isNaN(s[t]))||"fill"===t&&-1===sS.indexOf(s[t])||("direction"!==t||-1!==sj.indexOf(s[t]))&&(u[t]=s[t]))}):u.duration=s,u),this.timing.effect=this,this.timing.activeDuration=Math.abs((0===(a=c=this.timing).duration||0===a.iterations?0:("auto"===a.duration?0:Number(a.duration))*(null!=(o=a.iterations)?o:1))/(c.playbackRate||1)),this.timing.endTime=Math.max(0,this.timing.delay+this.timing.activeDuration+this.timing.endDelay),this.normalizedKeyframes=sA(n,this.timing),this.interpolations=(f=this.normalizedKeyframes,h=this.timing,d=this.target,y=function(t,e){var n=[];for(var r in t)for(var i=t[r],a=0;a<i.length-1;a++){var o=a,l=a+1,s=i[o].computedOffset,u=i[l].computedOffset,c=s,f=u;0===a&&(c=-1/0,0===u&&(l=o)),a===i.length-2&&(f=1/0,1===s&&(o=l)),n.push({applyFrom:c,applyTo:f,startOffset:i[o].computedOffset,endOffset:i[l].computedOffset,easingFunction:i[o].easingFunction,property:r,interpolation:function(t,e,n,r){var i=ab[t];if(i&&i.syntax&&i.int){var a=le.styleValueRegistry.getPropertySyntax(i.syntax);if(a){var o=a.parser,l=o?o(e,r):e,s=o?o(n,r):n,u=a.mixer(l,s,r);if(u){var c=sM.apply(void 0,(0,tw.A)(u));return function(t){return 0===t?e:1===t?n:c(t)}}}}return sM(!1,!0,function(t){return t?n:e})}(r,i[o].value,i[l].value,e)})}return n.sort(function(t,e){return t.startOffset-e.startOffset}),n}(p=function(t,e){for(var n={},r=0;r<t.length;r++)for(var i in t[r])if(s_(i)){var a={offset:t[r].offset,computedOffset:t[r].computedOffset,easing:t[r].easing,easingFunction:sk(t[r].easing)||e.easingFunction,value:t[r][i]};n[i]=n[i]||[],n[i].push(a)}return n}(f,h),d),function(t,e){if(null!==e)y.filter(function(t){return e>=t.applyFrom&&e<t.applyTo}).forEach(function(n){var r=e-n.startOffset,i=n.endOffset-n.startOffset;t.setAttribute(n.property,n.interpolation(0===i?0:r/i),!1,!1)});else for(var n in p)s_(n)&&t.setAttribute(n,null)});var v=le.globalThis.Proxy;this.computedTiming=v?new v(this.timing,{get:function(t,e){return"duration"===e?"auto"===t.duration?0:t.duration:"fill"===e?"auto"===t.fill?"none":t.fill:"localTime"===e?g.animation&&g.animation.currentTime||null:"currentIteration"===e?g.animation&&"running"===g.animation.playState?t.currentIteration||0:null:"progress"===e?g.animation&&"running"===g.animation.playState?t.progress||0:null:t[e]},set:function(){return!0}}):this.timing},[{key:"applyInterpolations",value:function(){this.interpolations(this.target,Number(this.timeFraction))}},{key:"update",value:function(t){return null!==t&&(this.timeFraction=function(t,e,n){var r,i,a,o,l,s,u,c=function(t,e,n){if(null===e)return 0;var r=n.endTime;return e<Math.min(n.delay,r)?1:e>=Math.min(n.delay+t+n.endDelay,r)?2:3}(t,e,n),f=function(t,e,n,r,i){switch(r){case 1:if("backwards"===e||"both"===e)return 0;return null;case 3:return n-i;case 2:if("forwards"===e||"both"===e)return t;return null;case 0:return null}}(t,n.fill,e,c,n.delay);if(null===f)return null;var h="auto"===n.duration?0:n.duration,d=(r=n.iterations,a=i=n.iterationStart,0===h?1!==c&&(a+=r):a+=f/h,a),p=(o=n.iterationStart,l=n.iterations,0==(s=d===1/0?o%1:d%1)&&2===c&&0!==l&&(0!==f||0===h)&&(s=1),s),y=(u=n.iterations,2===c&&u===1/0?1/0:1===p?Math.floor(d)-1:Math.floor(d)),g=function(t,e,n){var r=t;if("normal"!==t&&"reverse"!==t){var i=e;"alternate-reverse"===t&&(i+=1),r="normal",i!==1/0&&i%2!=0&&(r="reverse")}return"normal"===r?n:1-n}(n.direction,y,p);return n.currentIteration=y,n.progress=g,n.easingFunction(g)}(this.timing.activeDuration,t,this.timing),null!==this.timeFraction)}},{key:"getKeyframes",value:function(){return this.normalizedKeyframes}},{key:"setKeyframes",value:function(t){this.normalizedKeyframes=sA(t)}},{key:"getComputedTiming",value:function(){return this.computedTiming}},{key:"getTiming",value:function(){return this.timing}},{key:"updateTiming",value:function(t){var e=this;Object.keys(t||{}).forEach(function(n){e.timing[n]=t[n]})}}]);function sT(t,e){return Number(t.id)-Number(e.id)}var sC=(0,tO.A)(function t(e){var n=this;(0,tx.A)(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(t){n.currentTime=t,n.discardAnimations(),0===n.animations.length?n.timelineTicking=!1:n.requestAnimationFrame(n.webAnimationsNextTick)},this.processRafCallbacks=function(t){var e=n.rafCallbacks;n.rafCallbacks=[],t<Number(n.currentTime)&&(t=Number(n.currentTime)),n.animations.sort(sT),n.animations=n.tick(t,!0,n.animations)[0],e.forEach(function(e){e[1](t)}),n.applyPendingEffects()},this.document=e},[{key:"getAnimations",value:function(){return this.discardAnimations(),this.animations.slice()}},{key:"isTicking",value:function(){return this.inTick}},{key:"play",value:function(t,e,n){var r=new lQ(new sP(t,e,n),this);return this.animations.push(r),this.restartWebAnimationsNextTick(),r.updatePromises(),r.play(),r.updatePromises(),r}},{key:"applyDirtiedAnimation",value:function(t){var e=this;if(!this.inTick){t.markTarget();var n=t.targetAnimations();n.sort(sT),this.tick(Number(this.currentTime),!1,n.slice())[1].forEach(function(t){var n=e.animations.indexOf(t);-1!==n&&e.animations.splice(n,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(t){null==t||t.applyInterpolations()}),this.pendingEffects=[]}},{key:"updateAnimationsPromises",value:function(){this.animationsWithPromises=this.animationsWithPromises.filter(function(t){return t.updatePromises()})}},{key:"discardAnimations",value:function(){this.updateAnimationsPromises(),this.animations=this.animations.filter(function(t){return"finished"!==t.playState&&"idle"!==t.playState})}},{key:"restartWebAnimationsNextTick",value:function(){this.timelineTicking||(this.timelineTicking=!0,this.requestAnimationFrame(this.webAnimationsNextTick))}},{key:"rAF",value:function(t){var e=this.rafId++;return 0===this.rafCallbacks.length&&(this.frameId=this.document.defaultView.requestAnimationFrame(this.processRafCallbacks)),this.rafCallbacks.push([e,t]),e}},{key:"requestAnimationFrame",value:function(t){var e=this;return this.rAF(function(n){e.updateAnimationsPromises(),t(n),e.updateAnimationsPromises()})}},{key:"tick",value:function(t,e,n){var r,i,a=this;this.inTick=!0,this.hasRestartedThisFrame=!1,this.currentTime=t,this.ticking=!1;var o=[],l=[],s=[],u=[];return n.forEach(function(n){n.tick(t,e),n._inEffect?(l.push(n.effect),n.markTarget()):(o.push(n.effect),n.unmarkTarget()),n._needsTick&&(a.ticking=!0);var r=n._inEffect||n._needsTick;n._inTimeline=r,r?s.push(n):u.push(n)}),(r=this.pendingEffects).push.apply(r,o),(i=this.pendingEffects).push.apply(i,l),this.ticking&&this.requestAnimationFrame(function(){}),this.inTick=!1,[s,u]}}]);le.EasingFunction=sk,le.AnimationTimeline=sC;var sN=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let sL=(t,e,n)=>[["M",t-n,e],["A",n,n,0,1,0,t+n,e],["A",n,n,0,1,0,t-n,e],["Z"]];sL.style=["fill"];let sI=sL.bind(void 0);sI.style=["stroke","lineWidth"];let sR=(t,e,n)=>[["M",t-n,e-n],["L",t+n,e-n],["L",t+n,e+n],["L",t-n,e+n],["Z"]];sR.style=["fill"];let sD=sR.bind(void 0);sD.style=["fill"];let sB=sR.bind(void 0);sB.style=["stroke","lineWidth"];let sF=(t,e,n)=>{let r=.618*n;return[["M",t-r,e],["L",t,e-n],["L",t+r,e],["L",t,e+n],["Z"]]};sF.style=["fill"];let sz=sF.bind(void 0);sz.style=["stroke","lineWidth"];let s$=(t,e,n)=>{let r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e+r],["L",t,e-r],["L",t+n,e+r],["Z"]]};s$.style=["fill"];let sW=s$.bind(void 0);sW.style=["stroke","lineWidth"];let sG=(t,e,n)=>{let r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e-r],["L",t+n,e-r],["L",t,e+r],["Z"]]};sG.style=["fill"];let sq=sG.bind(void 0);sq.style=["stroke","lineWidth"];let sH=(t,e,n)=>{let r=n/2*Math.sqrt(3);return[["M",t,e-n],["L",t+r,e-n/2],["L",t+r,e+n/2],["L",t,e+n],["L",t-r,e+n/2],["L",t-r,e-n/2],["Z"]]};sH.style=["fill"];let sY=sH.bind(void 0);sY.style=["stroke","lineWidth"];let sV=(t,e,n)=>{let r=n-1.5;return[["M",t-n,e-r],["L",t+n,e+r],["L",t+n,e-r],["L",t-n,e+r],["Z"]]};sV.style=["fill"];let sU=sV.bind(void 0);sU.style=["stroke","lineWidth"];let sX=(t,e,n)=>[["M",t,e+n],["L",t,e-n]];sX.style=["stroke","lineWidth"];let sK=(t,e,n)=>[["M",t-n,e-n],["L",t+n,e+n],["M",t+n,e-n],["L",t-n,e+n]];sK.style=["stroke","lineWidth"];let sZ=(t,e,n)=>[["M",t-n/2,e-n],["L",t+n/2,e-n],["M",t,e-n],["L",t,e+n],["M",t-n/2,e+n],["L",t+n/2,e+n]];sZ.style=["stroke","lineWidth"];let sQ=(t,e,n)=>[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]];sQ.style=["stroke","lineWidth"];let sJ=(t,e,n)=>[["M",t-n,e],["L",t+n,e]];sJ.style=["stroke","lineWidth"];let s0=(t,e,n)=>[["M",t-n,e],["L",t+n,e]];s0.style=["stroke","lineWidth"];let s1=s0.bind(void 0);s1.style=["stroke","lineWidth"];let s2=(t,e,n)=>[["M",t-n,e],["A",n/2,n/2,0,1,1,t,e],["A",n/2,n/2,0,1,0,t+n,e]];s2.style=["stroke","lineWidth"];let s5=(t,e,n)=>[["M",t-n-1,e-2.5],["L",t,e-2.5],["L",t,e+2.5],["L",t+n+1,e+2.5]];s5.style=["stroke","lineWidth"];let s3=(t,e,n)=>[["M",t-n-1,e+2.5],["L",t,e+2.5],["L",t,e-2.5],["L",t+n+1,e-2.5]];s3.style=["stroke","lineWidth"];let s4=(t,e,n)=>[["M",t-(n+1),e+2.5],["L",t-n/2,e+2.5],["L",t-n/2,e-2.5],["L",t+n/2,e-2.5],["L",t+n/2,e+2.5],["L",t+n+1,e+2.5]];s4.style=["stroke","lineWidth"];let s6=(t,e,n)=>[["M",t-5,e+2.5],["L",t-5,e],["L",t,e],["L",t,e-3],["L",t,e+3],["L",t+6.5,e+3]];s6.style=["stroke","lineWidth"];let s8=new Map([["bowtie",sV],["cross",sK],["dash",s1],["diamond",sF],["dot",s0],["hexagon",sH],["hollowBowtie",sU],["hollowDiamond",sz],["hollowHexagon",sY],["hollowPoint",sI],["hollowSquare",sB],["hollowTriangle",sW],["hollowTriangleDown",sq],["hv",s5],["hvh",s4],["hyphen",sJ],["line",sX],["plus",sQ],["point",sL],["rect",sD],["smooth",s2],["square",sR],["tick",sZ],["triangleDown",sG],["triangle",s$],["vh",s3],["vhv",s6]]),s9={};function s7(t,e){if(t.startsWith("symbol.")){var n;n=t.split(".").pop(),s8.set(n,e)}else Object.assign(s9,{[t]:e})}function ut(t,e){var n=e.cx,r=e.cy,i=e.r;t.arc(void 0===n?0:n,void 0===r?0:r,i,0,2*Math.PI,!1)}function ue(t,e){var n=e.cx,r=void 0===n?0:n,i=e.cy,a=void 0===i?0:i,o=e.rx,l=e.ry;t.ellipse?t.ellipse(r,a,o,l,0,0,2*Math.PI,!1):(t.save(),t.scale(o>l?1:o/l,o>l?l/o:1),t.arc(r,a,o>l?o:l,0,2*Math.PI))}function un(t,e){var n=e.x1,r=e.y1,i=e.x2,a=e.y2,o=e.markerStart,l=e.markerEnd,s=e.markerStartOffset,u=e.markerEndOffset,c=0,f=0,h=0,d=0,p=0;o&&lu(o)&&s&&(c=Math.cos(p=Math.atan2(a-r,i-n))*(s||0),f=Math.sin(p)*(s||0)),l&&lu(l)&&u&&(h=Math.cos(p=Math.atan2(r-a,n-i))*(u||0),d=Math.sin(p)*(u||0)),t.moveTo(n+c,r+f),t.lineTo(i+h,a+d)}function ur(t,e){var n,r=e.markerStart,i=e.markerEnd,a=e.markerStartOffset,o=e.markerEndOffset,l=e.d,s=l.absolutePath,u=l.segments,c=0,f=0,h=0,d=0,p=0;if(r&&lu(r)&&a){var y=r.parentNode.getStartTangent(),g=(0,tM.A)(y,2),v=g[0],b=g[1];n=v[0]-b[0],c=Math.cos(p=Math.atan2(v[1]-b[1],n))*(a||0),f=Math.sin(p)*(a||0)}if(i&&lu(i)&&o){var x=i.parentNode.getEndTangent(),O=(0,tM.A)(x,2),w=O[0],k=O[1];n=w[0]-k[0],h=Math.cos(p=Math.atan2(w[1]-k[1],n))*(o||0),d=Math.sin(p)*(o||0)}for(var _=0;_<s.length;_++){var M=s[_],E=M[0],A=s[_+1],S=0===_&&(0!==c||0!==f),j=(_===s.length-1||A&&("M"===A[0]||"Z"===A[0]))&&0!==h&&0!==d,P=S?[c,f]:[0,0],T=(0,tM.A)(P,2),C=T[0],N=T[1],L=j?[h,d]:[0,0],I=(0,tM.A)(L,2),R=I[0],D=I[1];switch(E){case"M":t.moveTo(M[1]+C,M[2]+N);break;case"L":t.lineTo(M[1]+R,M[2]+D);break;case"Q":t.quadraticCurveTo(M[1],M[2],M[3]+R,M[4]+D);break;case"C":t.bezierCurveTo(M[1],M[2],M[3],M[4],M[5]+R,M[6]+D);break;case"A":var B=u[_].arcParams,F=B.cx,z=B.cy,$=B.rx,W=B.ry,G=B.startAngle,q=B.endAngle,H=B.xRotation,Y=B.sweepFlag;if(t.ellipse)t.ellipse(F,z,$,W,H,G,q,!!(1-Y));else{var V=$>W?$:W,U=$>W?1:$/W,X=$>W?W/$:1;t.translate(F,z),t.rotate(H),t.scale(U,X),t.arc(0,0,V,G,q,!!(1-Y)),t.scale(1/U,1/X),t.rotate(-H),t.translate(-F,-z)}j&&t.lineTo(M[6]+h,M[7]+d);break;case"Z":t.closePath()}}}function ui(t,e){var n,r=e.markerStart,i=e.markerEnd,a=e.markerStartOffset,o=e.markerEndOffset,l=e.points.points,s=l.length,u=l[0][0],c=l[0][1],f=l[s-1][0],h=l[s-1][1],d=0,p=0,y=0,g=0,v=0;r&&lu(r)&&a&&(n=l[1][0]-l[0][0],d=Math.cos(v=Math.atan2(l[1][1]-l[0][1],n))*(a||0),p=Math.sin(v)*(a||0)),i&&lu(i)&&o&&(n=l[s-1][0]-l[0][0],y=Math.cos(v=Math.atan2(l[s-1][1]-l[0][1],n))*(o||0),g=Math.sin(v)*(o||0)),t.moveTo(u+(d||y),c+(p||g));for(var b=1;b<s-1;b++){var x=l[b];t.lineTo(x[0],x[1])}t.lineTo(f,h)}function ua(t,e){var n,r=e.markerStart,i=e.markerEnd,a=e.markerStartOffset,o=e.markerEndOffset,l=e.points.points,s=l.length,u=l[0][0],c=l[0][1],f=l[s-1][0],h=l[s-1][1],d=0,p=0,y=0,g=0,v=0;r&&lu(r)&&a&&(n=l[1][0]-l[0][0],d=Math.cos(v=Math.atan2(l[1][1]-l[0][1],n))*(a||0),p=Math.sin(v)*(a||0)),i&&lu(i)&&o&&(n=l[s-2][0]-l[s-1][0],y=Math.cos(v=Math.atan2(l[s-2][1]-l[s-1][1],n))*(o||0),g=Math.sin(v)*(o||0)),t.moveTo(u+d,c+p);for(var b=1;b<s-1;b++){var x=l[b];t.lineTo(x[0],x[1])}t.lineTo(f+y,h+g)}function uo(t,e){var n=e.x,r=void 0===n?0:n,i=e.y,a=void 0===i?0:i,o=e.radius,l=e.width,s=e.height;if(o&&o.some(function(t){return 0!==t})){var u=l>0?1:-1,c=s>0?1:-1,f=u+c===0,h=o.map(function(t){return eU(t,0,Math.min(Math.abs(l)/2,Math.abs(s)/2))}),d=(0,tM.A)(h,4),p=d[0],y=d[1],g=d[2],v=d[3];t.moveTo(u*p+r,a),t.lineTo(l-u*y+r,a),0!==y&&t.arc(l-u*y+r,c*y+a,y,-c*Math.PI/2,u>0?0:Math.PI,f),t.lineTo(l+r,s-c*g+a),0!==g&&t.arc(l-u*g+r,s-c*g+a,g,u>0?0:Math.PI,c>0?Math.PI/2:1.5*Math.PI,f),t.lineTo(u*v+r,s+a),0!==v&&t.arc(u*v+r,s-c*v+a,v,c>0?Math.PI/2:-Math.PI/2,u>0?Math.PI:0,f),t.lineTo(r,c*p+a),0!==p&&t.arc(u*p+r,c*p+a,p,u>0?Math.PI:0,c>0?1.5*Math.PI:Math.PI/2,f)}else t.rect(r,a,l,s)}var ul=function(t){function e(){var t;(0,tx.A)(this,e);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=(0,tk.A)(this,e,[].concat(r))).name="canvas-path-generator",t}return(0,t_.A)(e,t),(0,tO.A)(e,[{key:"init",value:function(){var t,e=(t={},(0,nM.A)((0,nM.A)((0,nM.A)((0,nM.A)((0,nM.A)((0,nM.A)((0,nM.A)((0,nM.A)((0,nM.A)((0,nM.A)(t,nq.CIRCLE,ut),nq.ELLIPSE,ue),nq.RECT,uo),nq.LINE,un),nq.POLYLINE,ua),nq.POLYGON,ui),nq.PATH,ur),nq.TEXT,void 0),nq.GROUP,void 0),nq.IMAGE,void 0),(0,nM.A)((0,nM.A)((0,nM.A)(t,nq.HTML,void 0),nq.MESH,void 0),nq.FRAGMENT,void 0));this.context.pathGeneratorFactory=e}},{key:"destroy",value:function(){delete this.context.pathGeneratorFactory}}])}(nY),us=tS(),uu=tS(),uc=tS(),uf=tY(),uh=function(){function t(){var e=this;(0,tx.A)(this,t),this.isHit=function(t,n,r,i){var a=e.context.pointInPathPickerFactory[t.nodeName];if(a){var o=tJ(uf,r),l=tz(uu,tN(uc,n[0],n[1],0),o);if(a(t,new nQ(l[0],l[1]),i,e.isPointInPath,e.context,e.runtime))return!0}return!1},this.isPointInPath=function(t,n){var r=e.runtime.offscreenCanvasCreator.getOrCreateContext(e.context.config.offscreenCanvas),i=e.context.pathGeneratorFactory[t.nodeName];return i&&(r.beginPath(),i(r,t.parsedStyle),r.closePath()),r.isPointInPath(n.x,n.y)}}return(0,tO.A)(t,[{key:"apply",value:function(e,n){var r,i,a=this,o=e.renderingService,l=e.renderingContext;this.context=e,this.runtime=n;var s=null==(i=l.root)?void 0:i.ownerDocument;o.hooks.pick.tapPromise(t.tag,(r=(0,nF.A)((0,nB.A)().mark(function t(e){return(0,nB.A)().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",a.pick(s,e));case 1:case"end":return t.stop()}},t)})),function(t){return r.apply(this,arguments)})),o.hooks.pickSync.tap(t.tag,function(t){return a.pick(s,t)})}},{key:"pick",value:function(t,e){var n,r=e.topmost,i=e.position,a=tN(us,i.x,i.y,0),o=t.elementsFromBBox(a[0],a[1],a[0],a[1]),l=[],s=(0,nz.A)(o);try{for(s.s();!(n=s.n()).done;){var u=n.value,c=u.getWorldTransform();if(this.isHit(u,a,c,!1)){var f=aW(u);if(f){var h=f.parsedStyle.clipPath;if(this.isHit(h,a,h.getWorldTransform(),!0)){if(r)return e.picked=[u],e;l.push(u)}}else{if(r)return e.picked=[u],e;l.push(u)}}}}catch(t){s.e(t)}finally{s.f()}return e.picked=l,e}}])}();function ud(t,e,n){var r=t.parsedStyle,i=r.cx,a=r.cy,o=r.r,l=r.fill,s=r.stroke,u=r.lineWidth,c=r.increasedLineWidthForHitTesting,f=r.pointerEvents,h=((void 0===u?1:u)+(void 0===c?0:c))/2,d=nj(void 0===i?0:i,void 0===a?0:a,e.x,e.y),p=aV(void 0===f?"auto":f,l,s),y=(0,tM.A)(p,2),g=y[0],v=y[1];return g&&v||n?d<=o+h:g?d<=o:!!v&&d>=o-h&&d<=o+h}function up(t,e,n){var r,i,a,o,l,s,u=t.parsedStyle,c=u.cx,f=void 0===c?0:c,h=u.cy,d=void 0===h?0:h,p=u.rx,y=u.ry,g=u.fill,v=u.stroke,b=u.lineWidth,x=u.increasedLineWidthForHitTesting,O=u.pointerEvents,w=e.x,k=e.y,_=aV(void 0===O?"auto":O,g,v),M=(0,tM.A)(_,2),E=M[0],A=M[1],S=((void 0===b?1:b)+(void 0===x?0:x))/2,j=(w-f)*(w-f),P=(k-d)*(k-d);return E&&A||n?1>=j/((r=p+S)*r)+P/((i=y+S)*i):E?1>=j/(p*p)+P/(y*y):!!A&&j/((a=p-S)*a)+P/((o=y-S)*o)>=1&&1>=j/((l=p+S)*l)+P/((s=y+S)*s)}function uy(t,e,n,r,i,a){return i>=t&&i<=t+n&&a>=e&&a<=e+r}function ug(t,e,n,r,i,a,o,l){var s=(Math.atan2(l-e,o-t)+2*Math.PI)%(2*Math.PI),u={x:t+n*Math.cos(s),y:e+n*Math.sin(s)};return nj(u.x,u.y,o,l)<=a/2}function uv(t,e,n,r,i,a,o){var l=Math.min(t,n),s=Math.max(t,n),u=Math.min(e,r),c=Math.max(e,r),f=i/2;return!!(a>=l-f&&a<=s+f&&o>=u-f&&o<=c+f)&&function(t,e,n,r,i,a){var o,l,s,u,c,f=[n-t,r-e];if(o=[0,0],f[0]===o[0]&&f[1]===o[1])return Math.sqrt((i-t)*(i-t)+(a-e)*(a-e));var h=[-f[1],f[0]];return(u=(l=h[0])*l+(s=h[1])*s)>0&&(u=1/Math.sqrt(u)),h[0]=h[0]*u,h[1]=h[1]*u,Math.abs((c=[i-t,a-e])[0]*h[0]+c[1]*h[1])}(t,e,n,r,a,o)<=i/2}function um(t,e,n,r,i){var a=t.length;if(a<2)return!1;for(var o=0;o<a-1;o++)if(uv(t[o][0],t[o][1],t[o+1][0],t[o+1][1],e,n,r))return!0;if(i){var l=t[0],s=t[a-1];if(uv(l[0],l[1],s[0],s[1],e,n,r))return!0}return!1}function ub(t){return 1e-6>Math.abs(t)?0:t<0?-1:1}function ux(t,e,n){var r=!1,i=t.length;if(i<=2)return!1;for(var a=0;a<i;a++){var o,l=t[a],s=t[(a+1)%i];if(((o=[e,n])[0]-l[0])*(s[1]-l[1])==(s[0]-l[0])*(o[1]-l[1])&&Math.min(l[0],s[0])<=o[0]&&o[0]<=Math.max(l[0],s[0])&&Math.min(l[1],s[1])<=o[1]&&o[1]<=Math.max(l[1],s[1]))return!0;ub(l[1]-n)>0!=ub(s[1]-n)>0&&0>ub(e-(n-l[1])*(l[0]-s[0])/(l[1]-s[1])-l[0])&&(r=!r)}return r}function uO(t,e,n){for(var r=!1,i=0;i<t.length&&!(r=ux(t[i],e,n));i++);return r}function uw(t,e,n){var r=t.parsedStyle,i=r.x1,a=r.y1,o=r.x2,l=r.y2,s=r.lineWidth,u=void 0===s?1:s,c=r.increasedLineWidthForHitTesting,f=r.pointerEvents,h=aV(void 0===f?"auto":f,r.fill,r.stroke);return(!!(0,tM.A)(h,2)[1]||!!n)&&!!u&&uv(i,a,o,l,u+(void 0===c?0:c),e.x,e.y)}function uk(t,e,n,r,i,a){var o=t.parsedStyle,l=o.lineWidth,s=o.increasedLineWidthForHitTesting,u=o.stroke,c=o.fill,f=o.d,h=o.pointerEvents,d=f.segments,p=f.hasArc,y=f.polylines,g=f.polygons,v=aV(void 0===h?"auto":h,(null==g?void 0:g.length)&&c,u),b=(0,tM.A)(v,2),x=b[0],O=b[1],w=iV(t),k=!1;return x||n?k=p?r(t,e):uO(g,e.x,e.y)||uO(y,e.x,e.y):((O||n)&&(k=function(t,e,n,r,i){for(var a=!1,o=e/2,l=0;l<t.length;l++){var s=t[l],u=s.currentPoint,c=s.params,f=s.prePoint,h=s.box;if(!h||uy(h.x-o,h.y-o,h.width+e,h.height+e,n,r))switch(s.command){case"L":case"Z":if(a=uv(f[0],f[1],u[0],u[1],e,n,r))return!0;break;case"Q":if(a=function(t,e,n,r,i,a,o,l){var s=nT([t,n,i],[e,r,a],o,l,nR);return nj(s.x,s.y,o,l)}(f[0],f[1],c[1],c[2],c[3],c[4],n,r)<=e/2)return!0;break;case"C":if(a=nI(f[0],f[1],c[1],c[2],c[3],c[4],c[5],c[6],n,r,i)<=e/2)return!0;break;case"A":s.cubicParams||(s.cubicParams=np(f[0],f[1],c[1],c[2],c[3],c[4],c[5],c[6],c[7],void 0));for(var d=s.cubicParams,p=f,y=0;y<d.length;y+=6){var g=nI(p[0],p[1],d[y],d[y+1],d[y+2],d[y+3],d[y+4],d[y+5],n,r,i);if(p=[d[y+4],d[y+5]],a=g<=e/2)return!0}}}return a}(d,(void 0===l?1:l)+(void 0===s?0:s),e.x,e.y,w)),k)}function u_(t,e,n){var r=t.parsedStyle,i=r.stroke,a=r.fill,o=r.lineWidth,l=r.increasedLineWidthForHitTesting,s=r.points,u=r.pointerEvents,c=aV(void 0===u?"auto":u,a,i),f=(0,tM.A)(c,2),h=f[0],d=f[1],p=!1;return(d||n)&&(p=um(s.points,(void 0===o?1:o)+(void 0===l?0:l),e.x,e.y,!0)),!p&&(h||n)&&(p=ux(s.points,e.x,e.y)),p}function uM(t,e,n){var r=t.parsedStyle,i=r.lineWidth,a=void 0===i?1:i,o=r.increasedLineWidthForHitTesting,l=r.points,s=r.pointerEvents,u=aV(void 0===s?"auto":s,r.fill,r.stroke);return(!!(0,tM.A)(u,2)[1]||!!n)&&!!a&&um(l.points,a+(void 0===o?0:o),e.x,e.y,!1)}function uE(t,e,n,r,i){var a=t.parsedStyle,o=a.radius,l=a.fill,s=a.stroke,u=a.lineWidth,c=a.increasedLineWidthForHitTesting,f=a.x,h=void 0===f?0:f,d=a.y,p=void 0===d?0:d,y=a.width,g=a.height,v=a.pointerEvents,b=aV(void 0===v?"auto":v,l,s),x=(0,tM.A)(b,2),O=x[0],w=x[1],k=o&&o.some(function(t){return 0!==t}),_=(void 0===u?1:u)+(void 0===c?0:c);if(k){var M,E,A,S,j,P,T,C,N,L,I,R,D,B=!1;return(w||n)&&(M=h,E=p,A=y,S=g,j=o.map(function(t){return eU(t,0,Math.min(Math.abs(y)/2,Math.abs(g)/2))}),P=_,T=e.x,C=e.y,L=(N=(0,tM.A)(j,4))[0],I=N[1],R=N[2],D=N[3],B=uv(M+L,E,M+A-I,E,P,T,C)||uv(M+A,E+I,M+A,E+S-R,P,T,C)||uv(M+A-R,E+S,M+D,E+S,P,T,C)||uv(M,E+S-D,M,E+L,P,T,C)||ug(M+A-I,E+I,I,1.5*Math.PI,2*Math.PI,P,T,C)||ug(M+A-R,E+S-R,R,0,.5*Math.PI,P,T,C)||ug(M+D,E+S-D,D,.5*Math.PI,Math.PI,P,T,C)||ug(M+L,E+L,L,Math.PI,1.5*Math.PI,P,T,C)),!B&&(O||n)&&(B=r(t,e)),B}var F,z,$,W=_/2;return O&&w||n?uy(h-W,p-W,y+W,g+W,e.x,e.y):O?uy(h,p,y,g,e.x,e.y):!!w&&(F=e.x,z=e.y,uy(h-($=_/2),p-$,y,_,F,z)||uy(h+y-$,p-$,_,g,F,z)||uy(h+$,p+g-$,y,_,F,z)||uy(h-$,p+$,_,g,F,z))}function uA(t,e,n,r,i,a){var o=t.parsedStyle,l=o.pointerEvents,s=o.x,u=o.y,c=o.width,f=o.height;if("non-transparent-pixel"===(void 0===l?"auto":l)){var h=i.config.offscreenCanvas,d=a.offscreenCanvasCreator.getOrCreateCanvas(h),p=a.offscreenCanvasCreator.getOrCreateContext(h,{willReadFrequently:!0});return d.width=c,d.height=f,i.defaultStyleRendererFactory[nq.IMAGE].render(p,(0,tb.A)((0,tb.A)({},t.parsedStyle),{},{x:0,y:0}),t,void 0,void 0,void 0),p.getImageData(e.x-(void 0===s?0:s),e.y-(void 0===u?0:u),1,1).data.every(function(t){return 0!==t})}return!0}function uS(t,e,n,r){var i=t.getGeometryBounds();return e.x>=i.min[0]&&e.y>=i.min[1]&&e.x<=i.max[0]&&e.y<=i.max[1]}uh.tag="CanvasPicker";var uj=function(t){function e(){var t;(0,tx.A)(this,e);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=(0,tk.A)(this,e,[].concat(r))).name="canvas-picker",t}return(0,t_.A)(e,t),(0,tO.A)(e,[{key:"init",value:function(){var t,e=(t={},(0,nM.A)((0,nM.A)((0,nM.A)((0,nM.A)((0,nM.A)((0,nM.A)((0,nM.A)((0,nM.A)((0,nM.A)((0,nM.A)(t,nq.CIRCLE,ud),nq.ELLIPSE,up),nq.RECT,uE),nq.LINE,uw),nq.POLYLINE,uM),nq.POLYGON,u_),nq.PATH,uk),nq.TEXT,uS),nq.GROUP,null),nq.IMAGE,uA),(0,nM.A)((0,nM.A)(t,nq.HTML,null),nq.MESH,null));this.context.pointInPathPickerFactory=e,this.addRenderingPlugin(new uh)}},{key:"destroy",value:function(){delete this.context.pointInPathPickerFactory,this.removeAllRenderingPlugins()}}])}(nY);function uP(t,e){if(!({}).hasOwnProperty.call(t,e))throw TypeError("attempted to use private field on non-instance");return t}var uT=0,uC=(0,tO.A)(function t(){(0,tx.A)(this,t),this.cacheStore=new Map},[{key:"onRefAdded",value:function(t){}},{key:"has",value:function(t){return this.cacheStore.has(t)}},{key:"put",value:function(t,e,n){return!this.cacheStore.has(t)&&(this.cacheStore.set(t,{value:e,counter:new Set([n.entity])}),this.onRefAdded(n),!0)}},{key:"get",value:function(t,e){var n=this.cacheStore.get(t);return n?(n.counter.has(e.entity)||(n.counter.add(e.entity),this.onRefAdded(e)),n.value):null}},{key:"update",value:function(t,e,n){var r=this.cacheStore.get(t);return!!r&&(r.value=(0,tb.A)((0,tb.A)({},r.value),e),r.counter.has(n.entity)||(r.counter.add(n.entity),this.onRefAdded(n)),!0)}},{key:"release",value:function(t,e){var n=this.cacheStore.get(t);return!!n&&(n.counter.delete(e.entity),n.counter.size<=0&&this.cacheStore.delete(t),!0)}},{key:"releaseRef",value:function(t){var e=this;Array.from(this.cacheStore.keys()).forEach(function(n){e.release(n,t)})}},{key:"getSize",value:function(){return this.cacheStore.size}},{key:"clear",value:function(){this.cacheStore.clear()}}]),uN=[],uL=[],uI=function(){function t(){(0,tx.A)(this,t)}return(0,tO.A)(t,null,[{key:"stop",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.api;t.rafId&&(e.cancelAnimationFrame(t.rafId),t.rafId=null)}},{key:"executeTask",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.api;uN.length<=0&&uL.length<=0||(uL.forEach(function(t){return t()}),uL=uN.splice(0,t.TASK_NUM_PER_FRAME),t.rafId=e.requestAnimationFrame(function(){t.executeTask(e)}))}},{key:"sliceImage",value:function(e,n,r,i){for(var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:t.api,l=e.naturalWidth||e.width,s=e.naturalHeight||e.height,u=n-a,c=r-a,f=Math.ceil(l/u),h=Math.ceil(s/c),d={tileSize:[n,r],gridSize:[h,f],tiles:Array(h).fill(null).map(function(){return Array(f).fill(null)})},p=function(t){for(var a=function(a){uN.push(function(){var f=a*u,h=t*c,p=[Math.min(n,l-f),Math.min(r,s-h)],y=p[0],g=p[1],v=o.createCanvas();v.width=n,v.height=r,v.getContext("2d").drawImage(e,f,h,y,g,0,0,y,g),d.tiles[t][a]={x:f,y:h,tileX:a,tileY:t,data:v},i()})},h=0;h<f;h++)a(h)},y=0;y<h;y++)p(y);return t.stop(),t.executeTask(),d}}])}();uI.TASK_NUM_PER_FRAME=10;var uR=new uC;uR.onRefAdded=function(t){var e=this;t.addEventListener(oR.DESTROY,function(){e.releaseRef(t)},{once:!0})};var uD=(0,tO.A)(function t(e,n){(0,tx.A)(this,t),this.gradientCache={},this.patternCache={},this.context=e,this.runtime=n},[{key:"getImageSync",value:function(t,e,n){var r=eV(t)?t:t.src;if(uR.has(r)){var i=uR.get(r,e);if(i.img.complete)return null==n||n(i),i}return this.getOrCreateImage(t,e).then(function(t){null==n||n(t)}).catch(function(t){console.error(t)}),null}},{key:"getOrCreateImage",value:function(t,e){var n=this,r=eV(t)?t:t.src;if(!eV(t)&&!uR.has(r)){var i={img:t,size:[t.naturalWidth||t.width,t.naturalHeight||t.height],tileSize:uB(t)};uR.put(r,i,e)}if(uR.has(r)){var a=uR.get(r,e);return a.img.complete?Promise.resolve(a):new Promise(function(t,e){a.img.addEventListener("load",function(){a.size=[a.img.naturalWidth||a.img.width,a.img.naturalHeight||a.img.height],a.tileSize=uB(a.img),t(a)}),a.img.addEventListener("error",function(t){e(t)})})}return new Promise(function(t,i){var a=n.context.config.createImage();if(a){var o={img:a,size:[0,0],tileSize:uB(a)};uR.put(r,o,e),a.onload=function(){o.size=[a.naturalWidth||a.width,a.naturalHeight||a.height],o.tileSize=uB(o.img),t(o)},a.onerror=function(t){i(t)},a.crossOrigin="Anonymous",a.src=r}})}},{key:"createDownSampledImage",value:(Eo=(0,nF.A)((0,nB.A)().mark(function t(e,n){var r,i,a,o,l,s,u,c,f,h,d,p,y,g;return(0,nB.A)().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=1,this.getOrCreateImage(e,n);case 1:if(void 0===(r=t.sent).downSamplingRate){t.next=2;break}return t.abrupt("return",r);case 2:if(l=void 0===(o=(a="boolean"==typeof(i=this.context.config.enableLargeImageOptimization)?{}:i).maxDownSampledImageSize)?2048:o,u=void 0===(s=a.downSamplingRateThreshold)?.5:s,c=this.runtime.globalThis.createImageBitmap,h=(f=(0,tM.A)(r.size,2))[0],d=f[1],p=r.img,y=Math.min((l+l)/(h+d),Math.max(.01,Math.min(u,.5))),g=(0,tb.A)((0,tb.A)({},r),{},{downSamplingRate:y}),uR.update(r.img.src,g,n),!c){t.next=7;break}return t.prev=3,t.next=4,c(r.img,{resizeWidth:h*y,resizeHeight:d*y});case 4:p=t.sent,t.next=6;break;case 5:t.prev=5,t.catch(3),y=1;case 6:t.next=8;break;case 7:y=1;case 8:return g=(0,tb.A)((0,tb.A)({},this.getImageSync(e,n)),{},{downSampled:p,downSamplingRate:y}),uR.update(r.img.src,g,n),t.abrupt("return",g);case 9:case"end":return t.stop()}},t,this,[[3,5]])})),function(t,e){return Eo.apply(this,arguments)})},{key:"createImageTiles",value:(El=(0,nF.A)((0,nB.A)().mark(function t(e,n,r,i){var a,o,l;return(0,nB.A)().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=1,this.getOrCreateImage(e,i);case 1:return a=t.sent,uI.api={requestAnimationFrame:(o=i.ownerDocument.defaultView).requestAnimationFrame,cancelAnimationFrame:o.cancelAnimationFrame,createCanvas:function(){return oT.createCanvas()}},l=(0,tb.A)((0,tb.A)({},a),uI.sliceImage(a.img,a.tileSize[0],a.tileSize[0],r)),uR.update(a.img.src,l,i),t.abrupt("return",l);case 2:case"end":return t.stop()}},t,this)})),function(t,e,n,r){return El.apply(this,arguments)})},{key:"releaseImage",value:function(t,e){uR.release(eV(t)?t:t.src,e)}},{key:"releaseImageRef",value:function(t){uR.releaseRef(t)}},{key:"getOrCreatePatternSync",value:function(t,e,n,r,i,a,o){var l,s,u=this.generatePatternKey(e);if(u&&this.patternCache[u])return this.patternCache[u];var c=e.image,f=e.repetition,h=e.transform,d=!1;if(eV(c)){var p=this.getImageSync(c,t,o);l=null==p?void 0:p.img}else r?(l=r,d=!0):l=c;var y=l&&n.createPattern(l,f);return y&&(s=h?oc(ai(h),new lp({})):tZ(tY()),d&&t3(s,s,[1/i,1/i,1]),y.setTransform({a:s[0],b:s[1],c:s[4],d:s[5],e:s[12]+a[0],f:s[13]+a[1]})),u&&y&&(this.patternCache[u]=y),y}},{key:"getOrCreateGradient",value:function(t,e){var n=this.generateGradientKey(t),r=t.type,i=t.steps,a=t.min,o=t.width,l=t.height,s=t.angle,u=t.cx,c=t.cy,f=t.size;if(this.gradientCache[n])return this.gradientCache[n];var h=null;if(r===it.LinearGradient){var d,p,y,g,v,b,x,O=(d=a,p=o,y=l,g=s.value*n4,v=0+p/2,b=0+y/2,x=Math.abs(p*Math.cos(g))+Math.abs(y*Math.sin(g)),{x1:d[0]+v-Math.cos(g)*x/2,y1:d[1]+b-Math.sin(g)*x/2,x2:d[0]+v+Math.cos(g)*x/2,y2:d[1]+b+Math.sin(g)*x/2}),w=O.x1,k=O.y1,_=O.x2,M=O.y2;h=e.createLinearGradient(w,k,_,M)}else if(r===it.RadialGradient){var E,A,S,j=(E=u.value,A=c.value,u.unit===rZ.kPercentage&&(E=u.value/100*o),c.unit===rZ.kPercentage&&(A=c.value/100*l),S=Math.max(eH([0,0],[E,A]),eH([0,l],[E,A]),eH([o,l],[E,A]),eH([o,0],[E,A])),f&&(f instanceof io?S=f.value:f instanceof ir&&("closest-side"===f.value?S=Math.min(E,o-E,A,l-A):"farthest-side"===f.value?S=Math.max(E,o-E,A,l-A):"closest-corner"===f.value&&(S=Math.min(eH([0,0],[E,A]),eH([0,l],[E,A]),eH([o,l],[E,A]),eH([o,0],[E,A]))))),{x:E+a[0],y:A+a[1],r:S}),P=j.x,T=j.y,C=j.r;h=e.createRadialGradient(P,T,0,P,T,C)}return h&&(i.forEach(function(t){var e,n=t.offset,r=t.color;n.unit===rZ.kPercentage&&(null==(e=h)||e.addColorStop(n.value/100,r.toString()))}),this.gradientCache[n]=h),this.gradientCache[n]}},{key:"generateGradientKey",value:function(t){var e=t.type,n=t.min,r=t.width,i=t.height,a=t.steps,o=t.angle,l=t.cx,s=t.cy,u=t.size;return"gradient-".concat(e,"-").concat((null==o?void 0:o.toString())||0,"-").concat((null==l?void 0:l.toString())||0,"-").concat((null==s?void 0:s.toString())||0,"-").concat((null==u?void 0:u.toString())||0,"-").concat(n[0],"-").concat(n[1],"-").concat(r,"-").concat(i,"-").concat(a.map(function(t){var e=t.offset,n=t.color;return"".concat(e).concat(n)}).join("-"))}},{key:"generatePatternKey",value:function(t){var e=t.image,n=t.repetition;return eV(e)?"pattern-".concat(e,"-").concat(n):"rect"===e.nodeName?"pattern-".concat(e.entity,"-").concat(n):void 0}}]);function uB(t){if(!t.complete)return[0,0];var e=t.naturalWidth||t.width,n=t.naturalHeight||t.height,r=256;return[256,512].forEach(function(t){Math.ceil(n/t)*Math.ceil(e/t)<1e3&&(r=t)}),[r,r]}uD.isSupportTile=!!oT.createCanvas();var uF=function(){function t(){(0,tx.A)(this,t)}return(0,tO.A)(t,[{key:"apply",value:function(e){var n=e.renderingService,r=e.renderingContext,i=e.imagePool,a=r.root.ownerDocument.defaultView,o=function(t,e,n){var r=t.parsedStyle,i=r.width,a=r.height;i&&!a?t.setAttribute("height",n/e*i):!i&&a&&t.setAttribute("width",e/n*a)},l=function(t){var e=t.target,r=e.nodeName,a=e.attributes;if(r===nq.IMAGE){var l=a.src,s=a.keepAspectRatio;i.getImageSync(l,e,function(t){var r=t.img,i=r.width,a=r.height;s&&o(e,i,a),e.renderable.dirty=!0,n.dirtify()})}},s=function(t){var e=t.target,r=t.attrName,a=t.prevValue,l=t.newValue;e.nodeName===nq.IMAGE&&"src"===r&&(a!==l&&i.releaseImage(a,e),eV(l)&&i.getOrCreateImage(l,e).then(function(t){var r=t.img,i=r.width,a=r.height;e.attributes.keepAspectRatio&&o(e,i,a),e.renderable.dirty=!0,n.dirtify()}).catch(function(){}))};n.hooks.init.tap(t.tag,function(){a.addEventListener(oR.MOUNTED,l),a.addEventListener(oR.ATTR_MODIFIED,s)}),n.hooks.destroy.tap(t.tag,function(){a.removeEventListener(oR.MOUNTED,l),a.removeEventListener(oR.ATTR_MODIFIED,s)})}}])}();uF.tag="LoadImage";var uz=function(t){function e(){var t;(0,tx.A)(this,e);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=(0,tk.A)(this,e,[].concat(r))).name="image-loader",t}return(0,t_.A)(e,t),(0,tO.A)(e,[{key:"init",value:function(t){this.context.imagePool=new uD(this.context,t),this.addRenderingPlugin(new uF)}},{key:"destroy",value:function(){this.removeAllRenderingPlugins()}}])}(nY),u$="__private_"+uT+++"_renderState",uW=function(){function t(e){(0,tx.A)(this,t),this.removedRBushNodeAABBs=[],this.renderQueue=[],Object.defineProperty(this,u$,{writable:!0,value:{restoreStack:[],prevObject:null,currentContext:new Map}}),this.clearFullScreenLastFrame=!1,this.clearFullScreen=!1,this.vpMatrix=tY(),this.dprMatrix=tY(),this.tmpMat4=tY(),this.vec3a=tS(),this.vec3b=tS(),this.vec3c=tS(),this.vec3d=tS(),this.canvasRendererPluginOptions=e}return(0,tO.A)(t,[{key:"apply",value:function(e,n){var r=this;this.context=e;var i=this.context,a=i.config,o=i.camera,l=i.renderingService,s=i.renderingContext,u=i.rBushRoot,c=i.pathGeneratorFactory,f=a.renderer.getConfig().enableRenderingOptimization;a.renderer.getConfig().enableDirtyCheck=!1,a.renderer.getConfig().enableDirtyRectangleRendering=!1,this.rBush=u,this.pathGeneratorFactory=c;var h=e.contextService,d=s.root.ownerDocument.defaultView,p=function(t){var e=t.target.rBushNode;null!=e&&e.aabb&&r.removedRBushNodeAABBs.push(e.aabb)},y=function(t){var e=t.target.rBushNode;e.aabb&&r.removedRBushNodeAABBs.push(e.aabb)};l.hooks.init.tap(t.tag,function(){d.addEventListener(oR.UNMOUNTED,p),d.addEventListener(oR.CULLED,y);var t=h.getDPR(),e=a.width,n=a.height,i=h.getContext();r.clearRect(i,0,0,e*t,n*t,a.background)}),l.hooks.destroy.tap(t.tag,function(){d.removeEventListener(oR.UNMOUNTED,p),d.removeEventListener(oR.CULLED,y),r.renderQueue=[],r.removedRBushNodeAABBs=[],uP(r,u$)[u$]={restoreStack:[],prevObject:null,currentContext:null}});var g=function(){var t,e=h.getContext(),n=h.getDPR(),i=a.width,o=a.height,s=r.canvasRendererPluginOptions,u=s.dirtyObjectNumThreshold,c=s.dirtyObjectRatioThreshold,f=l.getStats(),p=f.total,y=f.rendered;r.clearFullScreen=r.clearFullScreenLastFrame||!(null!=(t=d.context.renderingPlugins[1])&&t.isFirstTimeRenderingFinished)||l.disableDirtyRectangleRendering()||y>u&&y/p>c,e&&("function"==typeof e.resetTransform?e.resetTransform():e.setTransform(1,0,0,1,0,0),r.clearFullScreen&&r.clearRect(e,0,0,i*n,o*n,a.background))},v=function(t,e){for(var i=[t];i.length>0;){var a,o=i.pop();o.isVisible()&&!o.isCulled()&&(f?r.renderDisplayObjectOptimized(o,e,r.context,uP(r,u$)[u$],n):r.renderDisplayObject(o,e,r.context,uP(r,u$)[u$],n));for(var l=(null==(a=o.sortable)||null==(a=a.sorted)?void 0:a.length)>0?o.sortable.sorted:o.childNodes,s=l.length-1;s>=0;s--)i.push(l[s])}};l.hooks.endFrame.tap(t.tag,function(){if(g(),0===s.root.childNodes.length){r.clearFullScreenLastFrame=!0;return}f=a.renderer.getConfig().enableRenderingOptimization,uP(r,u$)[u$]={restoreStack:[],prevObject:null,currentContext:uP(r,u$)[u$].currentContext},uP(r,u$)[u$].currentContext.clear(),r.clearFullScreenLastFrame=!1;var t=h.getContext(),e=h.getDPR();if(et(r.dprMatrix,[e,e,1]),t2(r.vpMatrix,r.dprMatrix,o.getOrthoMatrix()),r.clearFullScreen)f?(t.save(),v(s.root,t),t.restore()):v(s.root,t),r.removedRBushNodeAABBs=[];else{var i=r.safeMergeAABB.apply(r,[r.mergeDirtyAABBs(r.renderQueue)].concat((0,tw.A)(r.removedRBushNodeAABBs.map(function(t){var e=t.minX,n=t.minY,r=t.maxX,i=t.maxY,a=new nU;return a.setMinMax([e,n,0],[r,i,0]),a}))));if(r.removedRBushNodeAABBs=[],nU.isEmpty(i)){r.renderQueue=[];return}var l=r.convertAABB2Rect(i),u=l.x,c=l.y,p=l.width,y=l.height,b=tz(r.vec3a,[u,c,0],r.vpMatrix),x=tz(r.vec3b,[u+p,c,0],r.vpMatrix),O=tz(r.vec3c,[u,c+y,0],r.vpMatrix),w=tz(r.vec3d,[u+p,c+y,0],r.vpMatrix),k=Math.min(b[0],x[0],w[0],O[0]),_=Math.min(b[1],x[1],w[1],O[1]),M=Math.max(b[0],x[0],w[0],O[0]),E=Math.max(b[1],x[1],w[1],O[1]),A=Math.floor(k),S=Math.floor(_),j=Math.ceil(M-k),P=Math.ceil(E-_);t.save(),r.clearRect(t,A,S,j,P,a.background),t.beginPath(),t.rect(A,S,j,P),t.clip(),t.setTransform(r.vpMatrix[0],r.vpMatrix[1],r.vpMatrix[4],r.vpMatrix[5],r.vpMatrix[12],r.vpMatrix[13]),a.renderer.getConfig().enableDirtyRectangleRenderingDebug&&d.dispatchEvent(new oA(lW.DIRTY_RECTANGLE,{dirtyRect:{x:A,y:S,width:j,height:P}})),r.searchDirtyObjects(i).sort(function(t,e){return t.sortable.renderOrder-e.sortable.renderOrder}).forEach(function(e){e&&e.isVisible()&&!e.isCulled()&&r.renderDisplayObject(e,t,r.context,uP(r,u$)[u$],n)}),t.restore(),r.renderQueue.forEach(function(t){r.saveDirtyAABB(t)}),r.renderQueue=[]}uP(r,u$)[u$].restoreStack.forEach(function(){t.restore()}),uP(r,u$)[u$].restoreStack=[]}),l.hooks.render.tap(t.tag,function(t){r.clearFullScreen||r.renderQueue.push(t)})}},{key:"clearRect",value:function(t,e,n,r,i,a){t.clearRect(e,n,r,i),a&&(t.fillStyle=a,t.fillRect(e,n,r,i))}},{key:"renderDisplayObjectOptimized",value:function(t,e,n,r,i){var a=t.nodeName,o=!1,l=this.context.styleRendererFactory[a],s=this.pathGeneratorFactory[a],u=t.parsedStyle.clipPath;if(u){r.prevObject&&eP(u.getWorldTransform(),r.prevObject.getWorldTransform())||(this.applyWorldTransform(e,u),r.prevObject=null);var c=this.pathGeneratorFactory[u.nodeName];c&&(e.save(),o=!0,e.beginPath(),c(e,u.parsedStyle),e.closePath(),e.clip())}if(l){r.prevObject&&eP(t.getWorldTransform(),r.prevObject.getWorldTransform())||this.applyWorldTransform(e,t);var f=!r.prevObject;if(!f){var h=r.prevObject.nodeName;f=a===nq.TEXT?h!==nq.TEXT:a===nq.IMAGE?h!==nq.IMAGE:h===nq.TEXT||h===nq.IMAGE}l.applyStyleToContext(e,t,f,r),r.prevObject=t}s&&(e.beginPath(),s(e,t.parsedStyle),a!==nq.LINE&&a!==nq.PATH&&a!==nq.POLYLINE&&e.closePath()),l&&l.drawToContext(e,t,uP(this,u$)[u$],this,i),o&&e.restore(),t.dirty(!1)}},{key:"renderDisplayObject",value:function(t,e,n,r,i){var a=t.nodeName,o=r.restoreStack[r.restoreStack.length-1];o&&!(t.compareDocumentPosition(o)&oj.DOCUMENT_POSITION_CONTAINS)&&(e.restore(),r.restoreStack.pop());var l=this.context.styleRendererFactory[a],s=this.pathGeneratorFactory[a],u=t.parsedStyle.clipPath;if(u){this.applyWorldTransform(e,u);var c=this.pathGeneratorFactory[u.nodeName];c&&(e.save(),r.restoreStack.push(t),e.beginPath(),c(e,u.parsedStyle),e.closePath(),e.clip())}l&&(this.applyWorldTransform(e,t),e.save(),this.applyAttributesToContext(e,t)),s&&(e.beginPath(),s(e,t.parsedStyle),a!==nq.LINE&&a!==nq.PATH&&a!==nq.POLYLINE&&e.closePath()),l&&(l.render(e,t.parsedStyle,t,n,this,i),e.restore()),t.dirty(!1)}},{key:"applyAttributesToContext",value:function(t,e){var n=e.parsedStyle,r=n.stroke,i=n.fill,a=n.opacity,o=n.lineDash,l=n.lineDashOffset;o&&t.setLineDash(o),eY(l)||(t.lineDashOffset=l),eY(a)||(t.globalAlpha*=a),eY(r)||Array.isArray(r)||r.isNone||(t.strokeStyle=e.attributes.stroke),eY(i)||Array.isArray(i)||i.isNone||(t.fillStyle=e.attributes.fill)}},{key:"convertAABB2Rect",value:function(t){var e=t.getMin(),n=t.getMax(),r=Math.floor(e[0]),i=Math.floor(e[1]);return{x:r,y:i,width:Math.ceil(n[0])-r,height:Math.ceil(n[1])-i}}},{key:"mergeDirtyAABBs",value:function(t){var e=new nU;return t.forEach(function(t){var n=t.getRenderBounds();e.add(n);var r=t.renderable.dirtyRenderBounds;r&&e.add(r)}),e}},{key:"searchDirtyObjects",value:function(t){var e=t.getMin(),n=(0,tM.A)(e,2),r=n[0],i=n[1],a=t.getMax(),o=(0,tM.A)(a,2),l=o[0],s=o[1];return this.rBush.search({minX:r,minY:i,maxX:l,maxY:s}).map(function(t){return t.displayObject})}},{key:"saveDirtyAABB",value:function(t){var e=t.renderable;e.dirtyRenderBounds||(e.dirtyRenderBounds=new nU);var n=t.getRenderBounds();n&&e.dirtyRenderBounds.update(n.center,n.halfExtents)}},{key:"applyWorldTransform",value:function(t,e,n){n?(tU(this.tmpMat4,e.getLocalTransform()),t2(this.tmpMat4,n,this.tmpMat4)):tU(this.tmpMat4,e.getWorldTransform()),t2(this.tmpMat4,this.vpMatrix,this.tmpMat4),t.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 t=new nU,e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];return n.forEach(function(e){t.add(e)}),t}}])}();function uG(t,e,n,r,i,a,o){if("rect"===t.image.nodeName){var l,s,u=t.image.parsedStyle,c=u.width,f=u.height;s=r.contextService.getDPR();var h=r.config.offscreenCanvas;(l=a.offscreenCanvasCreator.getOrCreateCanvas(h)).width=c*s,l.height=f*s;var d=a.offscreenCanvasCreator.getOrCreateContext(h),p={restoreStack:[],prevObject:null,currentContext:new Map};t.image.forEach(function(t){i.renderDisplayObject(t,d,r,p,a)}),p.restoreStack.forEach(function(){d.restore()})}return o.getOrCreatePatternSync(e,t,n,l,s,e.getGeometryBounds().min,function(){e.dirty(),r.renderingService.dirtify()})}function uq(t,e,n,r){var i;if(t.type===it.LinearGradient||t.type===it.RadialGradient){var a=e.getGeometryBounds(),o=a&&2*a.halfExtents[0]||1,l=a&&2*a.halfExtents[1]||1,s=a&&a.min||[0,0];i=r.getOrCreateGradient((0,tb.A)((0,tb.A)({type:t.type},t.value),{},{min:s,width:o,height:l}),n)}return i}uW.tag="CanvasRenderer";var uH=["shadowBlur","shadowOffsetX","shadowOffsetY"],uY=["lineCap","lineJoin","miterLimit"],uV={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},uU={};function uX(t,e,n,r){var i=r.has(e)?r.get(e):uV[e];return i!==n&&("lineDash"===e?t.setLineDash(n):t[e]=n,r.set(e,n)),i}var uK=function(t){function e(){return(0,tx.A)(this,e),(0,tk.A)(this,e,arguments)}return(0,t_.A)(e,t),(0,tO.A)(e,[{key:"render",value:function(t,e,n,r,i,a){var o=e.fill,l=e.fillRule,s=e.opacity,u=void 0===s?1:s,c=e.fillOpacity,f=e.stroke,h=e.strokeOpacity,d=e.lineWidth,p=void 0===d?1:d,y=e.lineCap,g=e.lineJoin,v=e.shadowType,b=e.shadowColor,x=e.shadowBlur,O=e.filter,w=e.miterLimit,k=o&&!o.isNone,_=f&&!f.isNone&&p>0,M=(null==o?void 0:o.alpha)===0,E=!!(O&&O.length),A=!eY(b)&&x>0,S=n.nodeName,j="inner"===v,P=_&&A&&(S===nq.PATH||S===nq.LINE||S===nq.POLYLINE||M||j);k&&(t.globalAlpha=u*(void 0===c?1:c),P||uZ(n,t,A),uQ(t,n,o,l,r,i,a,this.imagePool),P||this.clearShadowAndFilter(t,E,A)),_&&(t.globalAlpha=u*(void 0===h?1:h),t.lineWidth=p,eY(w)||(t.miterLimit=w),eY(y)||(t.lineCap=y),eY(g)||(t.lineJoin=g),P&&(j&&(t.globalCompositeOperation="source-atop"),uZ(n,t,!0),j&&(uJ(t,n,f,r,i,a,this.imagePool),t.globalCompositeOperation=uV.globalCompositeOperation,this.clearShadowAndFilter(t,E,!0))),uJ(t,n,f,r,i,a,this.imagePool))}},{key:"clearShadowAndFilter",value:function(t,e,n){if(n&&(t.shadowColor="transparent",t.shadowBlur=0),e){var r=t.filter;!eY(r)&&r.indexOf("drop-shadow")>-1&&(t.filter=r.replace(/drop-shadow\([^)]*\)/,"").trim()||"none")}}}])}((0,tO.A)(function t(e){(0,tx.A)(this,t),this.imagePool=e},[{key:"applyAttributesToContext",value:function(t,e){}},{key:"render",value:function(t,e,n,r,i,a){}},{key:"applyCommonStyleToContext",value:function(t,e,n,r){var i=n?uU:r.prevObject.parsedStyle,a=e.parsedStyle;(n||a.opacity!==i.opacity)&&uX(t,"globalAlpha",eY(a.opacity)?uV.globalAlpha:a.opacity,r.currentContext),(n||a.blend!==i.blend)&&uX(t,"globalCompositeOperation",eY(a.blend)?uV.globalCompositeOperation:a.blend,r.currentContext)}},{key:"applyStrokeFillStyleToContext",value:function(t,e,n,r){var i=n?uU:r.prevObject.parsedStyle,a=e.parsedStyle,o=a.lineWidth,l=void 0===o?uV.lineWidth:o,s=a.fill&&!a.fill.isNone;if(a.stroke&&!a.stroke.isNone&&l>0){(n||e.attributes.stroke!==r.prevObject.attributes.stroke)&&uX(t,"strokeStyle",eY(a.stroke)||Array.isArray(a.stroke)||a.stroke.isNone?uV.strokeStyle:e.attributes.stroke,r.currentContext),(n||a.lineWidth!==i.lineWidth)&&uX(t,"lineWidth",eY(a.lineWidth)?uV.lineWidth:a.lineWidth,r.currentContext),(n||a.lineDash!==i.lineDash)&&uX(t,"lineDash",a.lineDash||uV.lineDash,r.currentContext),(n||a.lineDashOffset!==i.lineDashOffset)&&uX(t,"lineDashOffset",eY(a.lineDashOffset)?uV.lineDashOffset:a.lineDashOffset,r.currentContext);for(var u=0;u<uY.length;u++){var c=uY[u];(n||a[c]!==i[c])&&uX(t,c,eY(a[c])?uV[c]:a[c],r.currentContext)}}s&&(n||e.attributes.fill!==r.prevObject.attributes.fill)&&uX(t,"fillStyle",eY(a.fill)||Array.isArray(a.fill)||a.fill.isNone?uV.fillStyle:e.attributes.fill,r.currentContext)}},{key:"applyStyleToContext",value:function(t,e,n,r){var i=e.nodeName;this.applyCommonStyleToContext(t,e,n,r),i===nq.IMAGE||this.applyStrokeFillStyleToContext(t,e,n,r)}},{key:"applyShadowAndFilterStyleToContext",value:function(t,e,n,r){var i=e.parsedStyle;if(n){uX(t,"shadowColor",i.shadowColor.toString(),r.currentContext);for(var a=0;a<uH.length;a++){var o=uH[a];uX(t,o,i[o]||uV[o],r.currentContext)}}i.filter&&i.filter.length&&uX(t,"filter",e.attributes.filter,r.currentContext)}},{key:"clearShadowAndFilterStyleForContext",value:function(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(e){uX(t,"shadowColor",uV.shadowColor,r.currentContext);for(var a=0;a<uH.length;a++){var o=uH[a];uX(t,o,uV[o],r.currentContext)}}if(n)if(e&&i){var l=t.filter;!eY(l)&&l.indexOf("drop-shadow")>-1&&uX(t,"filter",l.replace(/drop-shadow\([^)]*\)/,"").trim()||uV.filter,r.currentContext)}else uX(t,"filter",uV.filter,r.currentContext)}},{key:"fillToContext",value:function(t,e,n,r,i){var a=this,o=e.parsedStyle,l=o.fill,s=o.fillRule,u=null;if(Array.isArray(l)&&l.length>0)l.forEach(function(r){var i=uX(t,"fillStyle",uq(r,e,t,a.imagePool),n.currentContext);u=null!=u?u:i,s?t.fill(s):t.fill()});else{if(iE(l)){var c=uG(l,e,t,e.ownerDocument.defaultView.context,r,i,this.imagePool);c&&(t.fillStyle=c,u=!0)}s?t.fill(s):t.fill()}null!==u&&uX(t,"fillStyle",u,n.currentContext)}},{key:"strokeToContext",value:function(t,e,n,r,i){var a=this,o=e.parsedStyle.stroke,l=null;if(Array.isArray(o)&&o.length>0)o.forEach(function(r){var i=uX(t,"strokeStyle",uq(r,e,t,a.imagePool),n.currentContext);l=null!=l?l:i,t.stroke()});else{if(iE(o)){var s=uG(o,e,t,e.ownerDocument.defaultView.context,r,i,this.imagePool);if(s){var u=uX(t,"strokeStyle",s,n.currentContext);l=null!=l?l:u}}t.stroke()}null!==l&&uX(t,"strokeStyle",l,n.currentContext)}},{key:"drawToContext",value:function(t,e,n,r,i){var a,o=e.nodeName,l=e.parsedStyle,s=l.opacity,u=void 0===s?uV.globalAlpha:s,c=l.fillOpacity,f=void 0===c?uV.fillOpacity:c,h=l.strokeOpacity,d=void 0===h?uV.strokeOpacity:h,p=l.lineWidth,y=void 0===p?uV.lineWidth:p,g=l.fill&&!l.fill.isNone,v=l.stroke&&!l.stroke.isNone&&y>0;if(g||v){var b=!eY(l.shadowColor)&&l.shadowBlur>0,x="inner"===l.shadowType,O=(null==(a=l.fill)?void 0:a.alpha)===0,w=!!(l.filter&&l.filter.length),k=b&&v&&(o===nq.PATH||o===nq.LINE||o===nq.POLYLINE||O||x),_=null;if(g&&(k||this.applyShadowAndFilterStyleToContext(t,e,b,n),_=uX(t,"globalAlpha",u*f,n.currentContext),this.fillToContext(t,e,n,r,i),k||this.clearShadowAndFilterStyleForContext(t,b,w,n)),v){var M=!1,E=uX(t,"globalAlpha",u*d,n.currentContext);if(_=g?_:E,k&&(this.applyShadowAndFilterStyleToContext(t,e,b,n),M=!0,x)){var A=t.globalCompositeOperation;t.globalCompositeOperation="source-atop",this.strokeToContext(t,e,n,r,i),t.globalCompositeOperation=A,this.clearShadowAndFilterStyleForContext(t,b,w,n,!0)}this.strokeToContext(t,e,n,r,i),M&&this.clearShadowAndFilterStyleForContext(t,b,w,n)}null!==_&&uX(t,"globalAlpha",_,n.currentContext)}}}]));function uZ(t,e,n){var r=t.parsedStyle,i=r.filter,a=r.shadowColor,o=r.shadowBlur,l=r.shadowOffsetX,s=r.shadowOffsetY;i&&i.length&&(e.filter=t.style.filter),n&&(e.shadowColor=a.toString(),e.shadowBlur=o||0,e.shadowOffsetX=l||0,e.shadowOffsetY=s||0)}function uQ(t,e,n,r,i,a,o,l){var s=arguments.length>8&&void 0!==arguments[8]&&arguments[8];Array.isArray(n)?n.forEach(function(n){t.fillStyle=uq(n,e,t,l),s||(r?t.fill(r):t.fill())}):(iE(n)&&(t.fillStyle=uG(n,e,t,i,a,o,l)),s||(r?t.fill(r):t.fill()))}function uJ(t,e,n,r,i,a,o){var l=arguments.length>7&&void 0!==arguments[7]&&arguments[7];Array.isArray(n)?n.forEach(function(n){t.strokeStyle=uq(n,e,t,o),l||t.stroke()}):(iE(n)&&(t.strokeStyle=uG(n,e,t,r,i,a,o)),l||t.stroke())}var u0=function(t){function e(){return(0,tx.A)(this,e),(0,tk.A)(this,e,arguments)}return(0,t_.A)(e,t),(0,tO.A)(e,[{key:"renderDownSampled",value:function(t,e,n,r){var i=r.src,a=r.imageCache;a.downSampled?t.drawImage(a.downSampled,Math.floor(r.drawRect[0]),Math.floor(r.drawRect[1]),Math.ceil(r.drawRect[2]),Math.ceil(r.drawRect[3])):this.imagePool.createDownSampledImage(i,n).then(function(){n.ownerDocument&&(n.dirty(),n.ownerDocument.defaultView.context.renderingService.dirtify())}).catch(function(t){console.error(t)})}},{key:"renderTile",value:function(t,e,n,r){var i=r.src,a=r.imageCache,o=r.imageRect,l=r.drawRect,s=a.size,u=t.getTransform(),c=u.a,f=u.b,h=u.c,d=u.d,p=u.e,y=u.f;if(t.resetTransform(),!(null!=a&&a.gridSize))return void this.imagePool.createImageTiles(i,[],function(){n.ownerDocument&&(n.dirty(),n.ownerDocument.defaultView.context.renderingService.dirtify())},n).catch(function(t){console.error(t)});for(var g=[s[0]/o[2],s[1]/o[3]],v=[a.tileSize[0]/g[0],a.tileSize[1]/g[1]],b=[Math.floor((l[0]-o[0])/v[0]),Math.ceil((l[0]+l[2]-o[0])/v[0])],x=b[0],O=b[1],w=[Math.floor((l[1]-o[1])/v[1]),Math.ceil((l[1]+l[3]-o[1])/v[1])],k=w[0],_=w[1],M=k;M<=_;M++)for(var E=x;E<=O;E++){var A=a.tiles[M][E];if(A){var S=[Math.floor(o[0]+A.tileX*v[0]),Math.floor(o[1]+A.tileY*v[1]),Math.ceil(v[0]),Math.ceil(v[1])];t.drawImage(A.data,S[0],S[1],S[2],S[3])}}t.setTransform(c,f,h,d,p,y)}},{key:"render",value:function(t,n,r){var i=n.x,a=void 0===i?0:i,o=n.y,l=void 0===o?0:o,s=n.width,u=n.height,c=n.src,f=n.shadowColor,h=n.shadowBlur,d=this.imagePool.getImageSync(c,r),p=null==d?void 0:d.img,y=s,g=u;if(p){y||(y=p.width),g||(g=p.height),uZ(r,t,!eY(f)&&h>0);try{var v,b,x,O,w,k,_,M,E,A,S,j,P,T,C,N,L,I,R,D,B=r.ownerDocument.defaultView.getContextService().getDomElement(),F=B.width,z=B.height,$=t.getTransform(),W=$.a,G=$.b,q=$.c,H=$.d,Y=$.e,V=$.f,U=tX(W,q,0,0,G,H,0,0,0,0,1,0,Y,V,0,1),X=(v=[a,l,y,g],b=tz(tS(),[v[0],v[1],0],U),x=tz(tS(),[v[0]+v[2],v[1],0],U),O=tz(tS(),[v[0],v[1]+v[3],0],U),w=tz(tS(),[v[0]+v[2],v[1]+v[3],0],U),[Math.min(b[0],x[0],O[0],w[0]),Math.min(b[1],x[1],O[1],w[1]),Math.max(b[0],x[0],O[0],w[0])-Math.min(b[0],x[0],O[0],w[0]),Math.max(b[1],x[1],O[1],w[1])-Math.min(b[1],x[1],O[1],w[1])]),K=(k=[0,0,F,z],M=(_=(0,tM.A)(k,4))[0],E=_[1],A=_[2],S=_[3],P=(j=(0,tM.A)(X,4))[0],T=j[1],C=j[2],N=j[3],L=Math.max(M,P),I=Math.max(E,T),R=Math.min(M+A,P+C),D=Math.min(E+S,T+N),R<=L||D<=I?null:[L,I,R-L,D-I]);if(!K)return;if(!r.ownerDocument.defaultView.getConfig().enableLargeImageOptimization)return void e.renderFull(t,n,r,{image:p,drawRect:[a,l,y,g]});if(X[2]/d.size[0]<(d.downSamplingRate||.5))return void this.renderDownSampled(t,n,r,{src:c,imageCache:d,drawRect:[a,l,y,g]});if(!uD.isSupportTile)return void e.renderFull(t,n,r,{image:p,drawRect:[a,l,y,g]});this.renderTile(t,n,r,{src:c,imageCache:d,imageRect:X,drawRect:K})}catch(t){}}}},{key:"drawToContext",value:function(t,e,n,r,i){this.render(t,e.parsedStyle,e)}}],[{key:"renderFull",value:function(t,e,n,r){t.drawImage(r.image,Math.floor(r.drawRect[0]),Math.floor(r.drawRect[1]),Math.ceil(r.drawRect[2]),Math.ceil(r.drawRect[3]))}}])}(uK),u1=function(t){function e(){return(0,tx.A)(this,e),(0,tk.A)(this,e,arguments)}return(0,t_.A)(e,t),(0,tO.A)(e,[{key:"render",value:function(t,e,n,r,i,a){n.getBounds();var o=e.lineWidth,l=void 0===o?1:o,s=e.textAlign,u=void 0===s?"start":s,c=e.textBaseline,f=void 0===c?"alphabetic":c,h=e.lineJoin,d=e.miterLimit,p=void 0===d?10:d,y=e.letterSpacing,g=void 0===y?0:y,v=e.stroke,b=e.fill,x=e.fillRule,O=e.fillOpacity,w=void 0===O?1:O,k=e.strokeOpacity,_=void 0===k?1:k,M=e.opacity,E=void 0===M?1:M,A=e.metrics,S=e.x,j=e.y,P=e.dx,T=e.dy,C=e.shadowColor,N=e.shadowBlur,L=A.font,I=A.lines,R=A.height,D=A.lineHeight,B=A.lineMetrics;t.font=L,t.lineWidth=l,t.textAlign="middle"===u?"center":u;var F=f;"alphabetic"===F&&(F="bottom"),t.lineJoin=void 0===h?"miter":h,eY(p)||(t.miterLimit=p);var z=void 0===j?0:j;"middle"===f?z+=-R/2-D/2:"bottom"===f||"alphabetic"===f||"ideographic"===f?z+=-R:("top"===f||"hanging"===f)&&(z+=-D);var $=(void 0===S?0:S)+(P||0);z+=T||0,1===I.length&&("bottom"===F?(F="middle",z-=.5*R):"top"===F&&(F="middle",z+=.5*R)),t.textBaseline=F,uZ(n,t,!eY(C)&&N>0);for(var W=0;W<I.length;W++){var G=l/2+$;z+=D,eY(v)||v.isNone||!l||this.drawLetterSpacing(t,n,I[W],B[W],u,G,z,g,b,x,w,v,_,E,!0,r,i,a),eY(b)||this.drawLetterSpacing(t,n,I[W],B[W],u,G,z,g,b,x,w,v,_,E,!1,r,i,a)}}},{key:"drawLetterSpacing",value:function(t,e,n,r,i,a,o,l,s,u,c,f,h,d,p,y,g,v){if(0===l)return void(p?this.strokeText(t,e,n,a,o,f,h,y,g,v):this.fillText(t,e,n,a,o,s,u,c,d,y,g,v));var b=t.textAlign;t.textAlign="left";var x=a;"center"===i||"middle"===i?x=a-r.width/2:("right"===i||"end"===i)&&(x=a-r.width);for(var O=Array.from(n),w=t.measureText(n).width,k=0,_=0;_<O.length;++_){var M=O[_];p?this.strokeText(t,e,M,x,o,f,h,y,g,v):this.fillText(t,e,M,x,o,s,u,c,d,y,g,v),x+=w-(k=t.measureText(n.substring(_+1)).width)+l,w=k}t.textAlign=b}},{key:"fillText",value:function(t,e,n,r,i,a,o,l,s,u,c,f){uQ(t,e,a,o,u,c,f,this.imagePool,!0);var h,d=!eY(l)&&1!==l;d&&(h=t.globalAlpha,t.globalAlpha=l*s),t.fillText(n,r,i),d&&(t.globalAlpha=h)}},{key:"strokeText",value:function(t,e,n,r,i,a,o,l,s,u){uJ(t,e,a,l,s,u,this.imagePool,!0);var c,f=!eY(o)&&1!==o;f&&(c=t.globalAlpha,t.globalAlpha=o),t.strokeText(n,r,i),f&&(t.globalAlpha=c)}},{key:"drawToContext",value:function(t,e,n,r,i){this.render(t,e.parsedStyle,e,e.ownerDocument.defaultView.context,r,i)}}])}(uK),u2=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,tx.A)(this,e),(t=(0,tk.A)(this,e)).name="canvas-renderer",t.options=n,t}return(0,t_.A)(e,t),(0,tO.A)(e,[{key:"init",value:function(){var t,e=(0,tb.A)({dirtyObjectNumThreshold:500,dirtyObjectRatioThreshold:.8},this.options),n=this.context.imagePool,r=new uK(n),i=(t={},(0,nM.A)((0,nM.A)((0,nM.A)((0,nM.A)((0,nM.A)((0,nM.A)((0,nM.A)((0,nM.A)((0,nM.A)((0,nM.A)(t,nq.CIRCLE,r),nq.ELLIPSE,r),nq.RECT,r),nq.IMAGE,new u0(n)),nq.TEXT,new u1(n)),nq.LINE,r),nq.POLYLINE,r),nq.POLYGON,r),nq.PATH,r),nq.GROUP,void 0),(0,nM.A)((0,nM.A)((0,nM.A)(t,nq.HTML,void 0),nq.MESH,void 0),nq.FRAGMENT,void 0));this.context.defaultStyleRendererFactory=i,this.context.styleRendererFactory=i,this.addRenderingPlugin(new uW(e))}},{key:"destroy",value:function(){this.removeAllRenderingPlugins(),delete this.context.defaultStyleRendererFactory,delete this.context.styleRendererFactory}}])}(nY),u5=function(){function t(){(0,tx.A)(this,t)}return(0,tO.A)(t,[{key:"apply",value:function(e,n){var r=this,i=e.renderingService,a=e.renderingContext,o=e.config;this.context=e;var l=a.root.ownerDocument.defaultView,s=function(t){i.hooks.pointerMove.call(t)},u=function(t){i.hooks.pointerUp.call(t)},c=function(t){i.hooks.pointerDown.call(t)},f=function(t){i.hooks.pointerOver.call(t)},h=function(t){i.hooks.pointerOut.call(t)},d=function(t){i.hooks.pointerCancel.call(t)},p=function(t){i.hooks.pointerWheel.call(t)},y=function(t){i.hooks.click.call(t)},g=function(t){n.globalThis.document.addEventListener("pointermove",s,!0),t.addEventListener("pointerdown",c,!0),t.addEventListener("pointerleave",h,!0),t.addEventListener("pointerover",f,!0),n.globalThis.addEventListener("pointerup",u,!0),n.globalThis.addEventListener("pointercancel",d,!0)},v=function(t){t.addEventListener("touchstart",c,!0),t.addEventListener("touchend",u,!0),t.addEventListener("touchmove",s,!0),t.addEventListener("touchcancel",d,!0)},b=function(t){n.globalThis.document.addEventListener("mousemove",s,!0),t.addEventListener("mousedown",c,!0),t.addEventListener("mouseout",h,!0),t.addEventListener("mouseover",f,!0),n.globalThis.addEventListener("mouseup",u,!0)},x=function(t){n.globalThis.document.removeEventListener("pointermove",s,!0),t.removeEventListener("pointerdown",c,!0),t.removeEventListener("pointerleave",h,!0),t.removeEventListener("pointerover",f,!0),n.globalThis.removeEventListener("pointerup",u,!0),n.globalThis.removeEventListener("pointercancel",d,!0)},O=function(t){t.removeEventListener("touchstart",c,!0),t.removeEventListener("touchend",u,!0),t.removeEventListener("touchmove",s,!0),t.removeEventListener("touchcancel",d,!0)},w=function(t){n.globalThis.document.removeEventListener("mousemove",s,!0),t.removeEventListener("mousedown",c,!0),t.removeEventListener("mouseout",h,!0),t.removeEventListener("mouseover",f,!0),n.globalThis.removeEventListener("mouseup",u,!0)};i.hooks.init.tap(t.tag,function(){var t=r.context.contextService.getDomElement();n.globalThis.navigator.msPointerEnabled?(t.style.msContentZooming="none",t.style.msTouchAction="none"):l.supportsPointerEvents&&(t.style.touchAction="none"),l.supportsPointerEvents?g(t):b(t),l.supportsTouchEvents&&v(t),o.useNativeClickEvent&&t.addEventListener("click",y,!0),t.addEventListener("wheel",p,{passive:!0,capture:!0})}),i.hooks.destroy.tap(t.tag,function(){var t=r.context.contextService.getDomElement();n.globalThis.navigator.msPointerEnabled?(t.style.msContentZooming="",t.style.msTouchAction=""):l.supportsPointerEvents&&(t.style.touchAction=""),l.supportsPointerEvents?x(t):w(t),l.supportsTouchEvents&&O(t),o.useNativeClickEvent&&t.removeEventListener("click",y,!0),t.removeEventListener("wheel",p,!0)})}}])}();u5.tag="DOMInteraction";var u3=function(t){function e(){var t;(0,tx.A)(this,e);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=(0,tk.A)(this,e,[].concat(r))).name="dom-interaction",t}return(0,t_.A)(e,t),(0,tO.A)(e,[{key:"init",value:function(){this.addRenderingPlugin(new u5)}},{key:"destroy",value:function(){this.removeAllRenderingPlugins()}}])}(nY),u4=function(){function t(){(0,tx.A)(this,t),this.displayObjectHTMLElementMap=new WeakMap}return(0,tO.A)(t,[{key:"joinTransformMatrix",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0,0];return"matrix(".concat([t[0],t[1],t[4],t[5],t[12]+e[0],t[13]+e[1]].join(","),")")}},{key:"apply",value:function(e,n){var r=this,i=e.camera,a=e.renderingContext,o=e.renderingService;this.context=e;var l=a.root.ownerDocument.defaultView,s=l.context.eventService.nativeHTMLMap,u=function(t,e){e.style.transform=r.joinTransformMatrix(t.getWorldTransform(),t.getOrigin())},c=function(t){var e=t.target;if(e.nodeName===nq.HTML){r.$camera||(r.$camera=r.createCamera(i));var n=r.getOrCreateEl(e);r.$camera.appendChild(n),Object.keys(e.attributes).forEach(function(t){r.updateAttribute(t,e)}),u(e,n),s.set(n,e)}},f=function(t){var e=t.target;if(e.nodeName===nq.HTML&&r.$camera){var n=r.getOrCreateEl(e);n&&(n.remove(),s.delete(n))}},h=function(t){var e=t.target;if(e.nodeName===nq.HTML){var n=t.attrName;r.updateAttribute(n,e)}},d=function(t){var e=t.target;(e.nodeName===nq.FRAGMENT?e.childNodes:[e]).forEach(function(t){if(t.nodeName===nq.HTML){var e=r.getOrCreateEl(t);u(t,e)}})},p=function(){if(r.$camera){var t=r.context.config,e=t.width,n=t.height;r.$camera.parentElement.style.width="".concat(e||0,"px"),r.$camera.parentElement.style.height="".concat(n||0,"px")}};o.hooks.init.tap(t.tag,function(){l.addEventListener(lW.RESIZE,p),l.addEventListener(oR.MOUNTED,c),l.addEventListener(oR.UNMOUNTED,f),l.addEventListener(oR.ATTR_MODIFIED,h),l.addEventListener(oR.BOUNDS_CHANGED,d)}),o.hooks.endFrame.tap(t.tag,function(){r.$camera&&a.renderReasons.has(oC.CAMERA_CHANGED)&&(r.$camera.style.transform=r.joinTransformMatrix(i.getOrthoMatrix()))}),o.hooks.destroy.tap(t.tag,function(){r.$camera&&r.$camera.remove(),l.removeEventListener(lW.RESIZE,p),l.removeEventListener(oR.MOUNTED,c),l.removeEventListener(oR.UNMOUNTED,f),l.removeEventListener(oR.ATTR_MODIFIED,h),l.removeEventListener(oR.BOUNDS_CHANGED,d)})}},{key:"createCamera",value:function(t){var e=this.context.config,n=e.document,r=e.width,i=e.height,a=this.context.contextService.getDomElement(),o=a.parentNode;if(o){var l="g-canvas-camera",s=o.querySelector("#".concat(l));if(!s){var u=(n||document).createElement("div");u.style.overflow="hidden",u.style.pointerEvents="none",u.style.position="absolute",u.style.left="0px",u.style.top="0px",u.style.width="".concat(r||0,"px"),u.style.height="".concat(i||0,"px");var c=(n||document).createElement("div");s=c,c.id=l,c.style.position="absolute",c.style.left="".concat(a.offsetLeft||0,"px"),c.style.top="".concat(a.offsetTop||0,"px"),c.style.transformOrigin="left top",c.style.transform=this.joinTransformMatrix(t.getOrthoMatrix()),c.style.pointerEvents="none",c.style.width="100%",c.style.height="100%",u.appendChild(c),o.appendChild(u)}return s}return null}},{key:"getOrCreateEl",value:function(t){var e=this.context.config.document,n=this.displayObjectHTMLElementMap.get(t);return n||(n=(e||document).createElement("div"),t.parsedStyle.$el=n,this.displayObjectHTMLElementMap.set(t,n),t.id&&(n.id=t.id),t.name&&n.setAttribute("name",t.name),t.className&&(n.className=t.className),n.style.position="absolute",n.style["will-change"]="transform",n.style.transform=this.joinTransformMatrix(t.getWorldTransform(),t.getOrigin())),n}},{key:"updateAttribute",value:function(t,e){var n=this.getOrCreateEl(e);switch(t){case"innerHTML":var r=e.parsedStyle.innerHTML;eV(r)?n.innerHTML=r:(n.innerHTML="",n.appendChild(r));break;case"x":n.style.left="".concat(e.parsedStyle.x,"px");break;case"y":n.style.top="".concat(e.parsedStyle.y,"px");break;case"transformOrigin":var i=e.parsedStyle.transformOrigin;n.style["transform-origin"]="".concat(i[0].buildCSSText(null,null,"")," ").concat(i[1].buildCSSText(null,null,""));break;case"width":var a=e.parsedStyle.width;n.style.width=eq(a)?"".concat(a,"px"):a.toString();break;case"height":var o=e.parsedStyle.height;n.style.height=eq(o)?"".concat(o,"px"):o.toString();break;case"zIndex":var l=e.parsedStyle.zIndex;n.style["z-index"]="".concat(l);break;case"visibility":var s=e.parsedStyle.visibility;n.style.visibility=s;break;case"pointerEvents":var u=e.parsedStyle.pointerEvents;n.style.pointerEvents=void 0===u?"auto":u;break;case"opacity":var c=e.parsedStyle.opacity;n.style.opacity="".concat(c);break;case"fill":var f=e.parsedStyle.fill,h="";iA(f)?h=f.isNone?"transparent":e.getAttribute("fill"):Array.isArray(f)?h=e.getAttribute("fill"):iE(f),n.style.background=h;break;case"stroke":var d=e.parsedStyle.stroke,p="";iA(d)?p=d.isNone?"transparent":e.getAttribute("stroke"):Array.isArray(d)?p=e.getAttribute("stroke"):iE(d),n.style["border-color"]=p,n.style["border-style"]="solid";break;case"lineWidth":var y=e.parsedStyle.lineWidth;n.style["border-width"]="".concat(y||0,"px");break;case"lineDash":n.style["border-style"]="dashed";break;case"filter":var g=e.style.filter;n.style.filter=g;break;default:eY(e.style[t])||""===e.style[t]||(n.style[t]=e.style[t])}}}])}();u4.tag="HTMLRendering";var u6=function(t){function e(){var t;(0,tx.A)(this,e);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=(0,tk.A)(this,e,[].concat(r))).name="html-renderer",t}return(0,t_.A)(e,t),(0,tO.A)(e,[{key:"init",value:function(){this.addRenderingPlugin(new u4)}},{key:"destroy",value:function(){this.removeAllRenderingPlugins()}}])}(nY),u8=(0,tO.A)(function t(e){(0,tx.A)(this,t),this.renderingContext=e.renderingContext,this.canvasConfig=e.config},[{key:"init",value:function(){var t=this.canvasConfig,e=t.container,n=t.canvas;if(n)this.$canvas=n,e&&n.parentElement!==e&&e.appendChild(n),this.$container=n.parentElement,this.canvasConfig.container=this.$container;else if(e&&(this.$container=eV(e)?document.getElementById(e):e,this.$container)){var r=document.createElement("canvas");this.$container.appendChild(r),this.$container.style.position||(this.$container.style.position="relative"),this.$canvas=r}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(t,e){var n,r=this.canvasConfig.devicePixelRatio;this.dpr=r,this.$canvas&&(this.$canvas.width=this.dpr*t,this.$canvas.height=this.dpr*e,n=this.$canvas,az&&n.style&&(n.style.width=t+"px",n.style.height=e+"px")),this.renderingContext.renderReasons.add(oC.CAMERA_CHANGED)}},{key:"applyCursorStyle",value:function(t){this.$container&&this.$container.style&&(this.$container.style.cursor=t)}},{key:"toDataURL",value:(Es=(0,nF.A)((0,nB.A)().mark(function t(){var e,n,r,i=arguments;return(0,nB.A)().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=(e=i.length>0&&void 0!==i[0]?i[0]:{}).type,r=e.encoderOptions,t.abrupt("return",this.context.canvas.toDataURL(n,r));case 1:case"end":return t.stop()}},t,this)})),function(){return Es.apply(this,arguments)})}]),u9=function(t){function e(){var t;(0,tx.A)(this,e);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=(0,tk.A)(this,e,[].concat(r))).name="canvas-context-register",t}return(0,t_.A)(e,t),(0,tO.A)(e,[{key:"init",value:function(){this.context.ContextService=u8}},{key:"destroy",value:function(){delete this.context.ContextService}}])}(nY),u7=function(t){function e(t){var n;return(0,tx.A)(this,e),(n=(0,tk.A)(this,e,[t])).registerPlugin(new u9),n.registerPlugin(new uz),n.registerPlugin(new ul),n.registerPlugin(new u2),n.registerPlugin(new u3),n.registerPlugin(new uj),n.registerPlugin(new u6),n}return(0,t_.A)(e,t),(0,tO.A)(e)}(nV),ct=function(){function t(e){(0,tx.A)(this,t),this.dragndropPluginOptions=e}return(0,tO.A)(t,[{key:"apply",value:function(e){var n=this,r=e.renderingService,i=e.renderingContext.root.ownerDocument,a=i.defaultView,o=function(t){var e=t.target,r=e===i,o=r&&n.dragndropPluginOptions.isDocumentDraggable?i:e.closest&&e.closest("[draggable=true]");if(o){var l,s=!1,u=t.timeStamp,c=[t.clientX,t.clientY],f=null,h=[t.clientX,t.clientY],d=(l=(0,nF.A)((0,nB.A)().mark(function t(a){var l,d,p,y,g,v;return(0,nB.A)().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(s){t.next=2;break}if(l=a.timeStamp-u,d=eH([a.clientX,a.clientY],c),!(l<=n.dragndropPluginOptions.dragstartTimeThreshold||d<=n.dragndropPluginOptions.dragstartDistanceThreshold)){t.next=1;break}return t.abrupt("return");case 1:a.type="dragstart",o.dispatchEvent(a),s=!0;case 2:if(a.type="drag",a.dx=a.clientX-h[0],a.dy=a.clientY-h[1],o.dispatchEvent(a),h=[a.clientX,a.clientY],r){t.next=4;break}return p="pointer"===n.dragndropPluginOptions.overlap?[a.canvasX,a.canvasY]:e.getBounds().center,t.next=3,i.elementsFromPoint(p[0],p[1]);case 3:v=(null==(g=(y=t.sent)[y.indexOf(e)+1])?void 0:g.closest("[droppable=true]"))||(n.dragndropPluginOptions.isDocumentDroppable?i:null),f!==v&&(f&&(a.type="dragleave",a.target=f,f.dispatchEvent(a)),v&&(a.type="dragenter",a.target=v,v.dispatchEvent(a)),(f=v)&&(a.type="dragover",a.target=f,f.dispatchEvent(a)));case 4:case"end":return t.stop()}},t)})),function(t){return l.apply(this,arguments)});a.addEventListener("pointermove",d);var p=function(t){if(s){t.detail={preventClick:!0};var e=t.clone();f&&(e.type="drop",e.target=f,f.dispatchEvent(e)),e.type="dragend",o.dispatchEvent(e),s=!1}a.removeEventListener("pointermove",d)};e.addEventListener("pointerup",p,{once:!0}),e.addEventListener("pointerupoutside",p,{once:!0})}};r.hooks.init.tap(t.tag,function(){a.addEventListener("pointerdown",o)}),r.hooks.destroy.tap(t.tag,function(){a.removeEventListener("pointerdown",o)})}}])}();ct.tag="Dragndrop";var ce=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,tx.A)(this,e),(t=(0,tk.A)(this,e)).name="dragndrop",t.options=n,t}return(0,t_.A)(e,t),(0,tO.A)(e,[{key:"init",value:function(){this.addRenderingPlugin(new ct((0,tb.A)({overlap:"pointer",isDocumentDraggable:!1,isDocumentDroppable:!1,dragstartDistanceThreshold:0,dragstartTimeThreshold:0},this.options)))}},{key:"destroy",value:function(){this.removeAllRenderingPlugins()}},{key:"setOptions",value:function(t){Object.assign(this.plugins[0].dragndropPluginOptions,t)}}])}(nY);let cn=function(t,e,n){var r;return function(){var i=this,a=arguments,o=n&&!r;clearTimeout(r),r=setTimeout(function(){r=null,n||t.apply(i,a)},e),o&&t.apply(i,a)}},cr=function(t,e,n){for(var r=0,i=eV(e)?e.split("."):e;t&&r<i.length;)t=t[i[r++]];return void 0===t||r<i.length?n:t};class ci extends Map{constructor(t,e=co){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[e,n]of t)this.set(e,n)}get(t){return super.get(ca(this,t))}has(t){return super.has(ca(this,t))}set(t,e){return super.set(function({_intern:t,_key:e},n){let r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}(this,t),e)}delete(t){return super.delete(function({_intern:t,_key:e},n){let r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}(this,t))}}function ca({_intern:t,_key:e},n){let r=e(n);return t.has(r)?t.get(r):n}function co(t){return null!==t&&"object"==typeof t?t.valueOf():t}function cl(t){return t}function cs(t,...e){return ch(t,cl,cl,e)}function cu(t,...e){return ch(t,Array.from,cl,e)}function cc(t,e,...n){return ch(t,cl,e,n)}function cf(t,e,...n){return ch(t,Array.from,e,n)}function ch(t,e,n,r){return function t(i,a){if(a>=r.length)return n(i);let o=new ci,l=r[a++],s=-1;for(let t of i){let e=l(t,++s,i),n=o.get(e);n?n.push(t):o.set(e,[t])}for(let[e,n]of o)o.set(e,t(n,a));return e(o)}(t,0)}let cd=function(t){return"object"==typeof t&&null!==t},cp=function(t){if(!cd(t)||!nO(t,"Object"))return!1;if(null===Object.getPrototypeOf(t))return!0;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e},cy=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)!function t(e,n,r,i){for(var a in r=r||0,i=i||5,n)if(function(t,e){if(Object.hasOwn)return Object.hasOwn(t,e);if(null==t)throw TypeError("Cannot convert undefined or null to object");return Object.prototype.hasOwnProperty.call(Object(t),e)}(n,a)){var o=n[a];null!==o&&cp(o)?(cp(e[a])||(e[a]={}),r<i?t(e[a],o,r+1,i):e[a]=n[a]):ns(o)?(e[a]=[],e[a]=e[a].concat(o)):void 0!==o&&(e[a]=o)}}(t,e[r]);return t},cg=function(t){return eY(t)?"":t.toString()},cv=function(t){var e=cg(t);return e.charAt(0).toLowerCase()+e.substring(1)};function cm({map:t,initKey:e},n){let r=e(n);return t.has(r)?t.get(r):n}function cb(t){return"object"==typeof t?t.valueOf():t}class cx extends Map{constructor(t){if(super(),this.map=new Map,this.initKey=cb,null!==t)for(const[e,n]of t)this.set(e,n)}get(t){return super.get(cm({map:this.map,initKey:this.initKey},t))}has(t){return super.has(cm({map:this.map,initKey:this.initKey},t))}set(t,e){return super.set(function({map:t,initKey:e},n){let r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}({map:this.map,initKey:this.initKey},t),e)}delete(t){return super.delete(function({map:t,initKey:e},n){let r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}({map:this.map,initKey:this.initKey},t))}}class cO{transformBreaks(t){return t}constructor(t){var e;this.options=cy({},this.getDefaultOptions()),this.update((null==(e=null==t?void 0:t.breaks)?void 0:e.length)?this.transformBreaks(t):t)}getOptions(){return this.options}update(t={}){let e=t.breaks?this.transformBreaks(t):t;this.options=cy({},this.options,e),this.rescale(e)}rescale(t){}}let cw=Symbol("defaultUnknown");function ck(t,e,n){for(let r=0;r<e.length;r+=1)t.has(e[r])||t.set(n(e[r]),r)}function c_(t){let{value:e,from:n,to:r,mapper:i,notFoundReturn:a}=t,o=i.get(e);if(void 0===o){if(a!==cw)return a;o=n.push(e)-1,i.set(e,o)}return r[o%r.length]}function cM(t){return t instanceof Date?t=>`${t}`:"object"==typeof t?t=>JSON.stringify(t):t=>t}class cE extends cO{getDefaultOptions(){return{domain:[],range:[],unknown:cw}}constructor(t){super(t)}map(t){return 0===this.domainIndexMap.size&&ck(this.domainIndexMap,this.getDomain(),this.domainKey),c_({value:this.domainKey(t),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(t){return 0===this.rangeIndexMap.size&&ck(this.rangeIndexMap,this.getRange(),this.rangeKey),c_({value:this.rangeKey(t),mapper:this.rangeIndexMap,from:this.getRange(),to:this.getDomain(),notFoundReturn:this.options.unknown})}rescale(t){let[e]=this.options.domain,[n]=this.options.range;if(this.domainKey=cM(e),this.rangeKey=cM(n),!this.rangeIndexMap){this.rangeIndexMap=new Map,this.domainIndexMap=new Map;return}(!t||t.range)&&this.rangeIndexMap.clear(),(!t||t.domain||t.compare)&&(this.domainIndexMap.clear(),this.sortedDomain=void 0)}clone(){return new cE(this.options)}getRange(){return this.options.range}getDomain(){if(this.sortedDomain)return this.sortedDomain;let{domain:t,compare:e}=this.options;return this.sortedDomain=e?[...t].sort(e):t,this.sortedDomain}}class cA extends cE{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:cw,flex:[]}}constructor(t){super(t)}clone(){return new cA(this.options)}getStep(t){return void 0===this.valueStep?1:"number"==typeof this.valueStep?this.valueStep:void 0===t?Array.from(this.valueStep.values())[0]:this.valueStep.get(t)}getBandWidth(t){return void 0===this.valueBandWidth?1:"number"==typeof this.valueBandWidth?this.valueBandWidth:void 0===t?Array.from(this.valueBandWidth.values())[0]:this.valueBandWidth.get(t)}getRange(){return this.adjustedRange}getPaddingInner(){let{padding:t,paddingInner:e}=this.options;return t>0?t:e}getPaddingOuter(){let{padding:t,paddingOuter:e}=this.options;return t>0?t:e}rescale(){super.rescale();let{align:t,domain:e,range:n,round:r,flex:i}=this.options,{adjustedRange:a,valueBandWidth:o,valueStep:l}=function(t){var e;let n,r,{domain:i}=t,a=i.length;if(0===a)return{valueBandWidth:void 0,valueStep:void 0,adjustedRange:[]};if(null==(e=t.flex)?void 0:e.length)return function(t){let e,n,{domain:r,range:i,paddingOuter:a,paddingInner:o,flex:l,round:s,align:u}=t,c=r.length,f=(e=c-l.length)>0?[...l,...Array(e).fill(1)]:e<0?l.slice(0,c):l,[h,d]=i,p=d-h,y=p/(2/c*a+1-1/c*o),g=y*o/c,v=y-c*g,b=(n=f.reduce((t,e)=>Math.min(t,e),1/0))===1/0?[]:f.map(t=>t/n),x=v/b.reduce((t,e)=>t+e),O=new cx(r.map((t,e)=>{let n=b[e]*x;return[t,s?Math.floor(n):n]})),w=new cx(r.map((t,e)=>{let n=b[e]*x+g;return[t,s?Math.floor(n):n]})),k=Array.from(w.values()).reduce((t,e)=>t+e),_=h+(p-(k-k/c*o))*u,M=s?Math.round(_):_,E=Array(c);for(let t=0;t<c;t+=1){E[t]=Math.round(1e12*M)/1e12;let e=r[t];M+=w.get(e)}return{valueBandWidth:O,valueStep:w,adjustedRange:E}}(t);let{range:o,paddingOuter:l,paddingInner:s,round:u,align:c}=t,f=o[0],h=o[1]-f;n=h/Math.max(1,2*l+(a-s)),u&&(n=Math.floor(n)),f+=(h-n*(a-s))*c,r=n*(1-s),u&&(f=Math.round(f),r=Math.round(r));let d=Array(a).fill(0).map((t,e)=>f+e*n);return{valueStep:n,valueBandWidth:r,adjustedRange:d}}({align:t,range:n,round:r,flex:i,paddingInner:this.getPaddingInner(),paddingOuter:this.getPaddingOuter(),domain:e});this.valueStep=l,this.valueBandWidth=o,this.adjustedRange=a}}let cS=Math.sqrt(50),cj=Math.sqrt(10),cP=Math.sqrt(2);function cT(t,e,n){let r=(e-t)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),a=r/10**i;return i>=0?(a>=cS?10:a>=cj?5:a>=cP?2:1)*10**i:-(10**-i)/(a>=cS?10:a>=cj?5:a>=cP?2:1)}function cC(t,e,n){let r=Math.abs(e-t)/Math.max(0,n),i=10**Math.floor(Math.log(r)/Math.LN10),a=r/i;return a>=cS?i*=10:a>=cj?i*=5:a>=cP&&(i*=2),e<t?-i:i}let cN=(t,e,n,r)=>{let i,a,o=t,l=e;if(o===l&&n>0)return[o];let s=cT(o,l,n);if(0===s||!Number.isFinite(s))return[];if(s>0){o=Math.ceil(o/s),a=Array(i=Math.ceil((l=Math.floor(l/s))-o+1));for(let t=0;t<i;t+=1)a[t]=(o+t)*s}else{o=Math.ceil(o*(s=-s)),a=Array(i=Math.ceil((l=Math.floor(l*s))-o+1));for(let t=0;t<i;t+=1)a[t]=(o+t)/s}var u=a;if(!(null==r?void 0:r.length))return u;let c=Array.from(new Set([...u,...r.flatMap(t=>[t.start,t.end])])).sort((t,e)=>t-e).filter(t=>!r.some(({start:e,end:n})=>t>e&&t<n));return c.length?c:u};class cL extends cO{getDefaultOptions(){return{range:[0],domain:[0,1],unknown:void 0,tickCount:5,tickMethod:cN}}map(t){let[e]=this.options.range;return void 0!==e?e:this.options.unknown}invert(t){let[e]=this.options.range;return t===e&&void 0!==e?this.options.domain:[]}getTicks(){let{tickMethod:t,domain:e,tickCount:n}=this.options,[r,i]=e;return eq(r)&&eq(i)?t(r,i,n):[]}clone(){return new cL(this.options)}}function cI(t){let{markType:e,nodeName:n}=t;return"heatmap"===e&&"image"===n}function cR(t,e){let n=null!=e?e:function(t){var e;let n=t;for(;n;){if((null==(e=n.attributes)?void 0:e.class)==="view")return n;n=n.parentNode}return null}(t).__data__,{markKey:r,index:i,seriesIndex:a,normalized:o={x:0}}=t.__data__,{markState:l}=n,s=Array.from(l.keys()).find(t=>t.key===r);if(s)return a?a.map(t=>s.data[t]):cI(t)?s.data[Math.round(s.data.length*o.x)]:s.data[i]}function cD(t){return t}function cB(t){return t.reduce((t,e)=>(n,...r)=>e(t(n,...r),...r),cD)}function cF(t){return t.replace(/( |^)[a-z]/g,t=>t.toUpperCase())}function cz(t=""){throw Error(t)}function c$(t,e){let{attributes:n}=e,r=new Set(["id","className"]);for(let[e,i]of Object.entries(n))r.has(e)||t.attr(e,i)}function cW(t){return null!=t&&!Number.isNaN(t)}function cG(t,e){return cq(t,e)||{}}function cq(t,e){let n=Object.entries(t||{}).filter(([t])=>t.startsWith(e)).map(([t,n])=>[cv(t.replace(e,"").trim()),n]).filter(([t])=>!!t);return 0===n.length?null:Object.fromEntries(n)}function cH(t,...e){return Object.fromEntries(Object.entries(t).filter(([t])=>e.every(e=>!t.startsWith(e))))}function cY(t,e){if(void 0===t)return null;if("number"==typeof t)return t;let n=+t.replace("%","");return Number.isNaN(n)?null:n/100*e}function cV(t){return"object"==typeof t&&!(t instanceof Date)&&null!==t&&!Array.isArray(t)}function cU(t){return null===t||!1===t}function cX(t){return new cK([t],null,t,t.ownerDocument)}class cK{constructor(t=null,e=null,n=null,r=null,i=[null,null,null,null,null],a=[],o=[]){this._elements=Array.from(t),this._data=e,this._parent=n,this._document=r,this._enter=i[0],this._update=i[1],this._exit=i[2],this._merge=i[3],this._split=i[4],this._transitions=a,this._facetElements=o}selectAll(t){return new cK("string"==typeof t?this._parent.querySelectorAll(t):t,null,this._elements[0],this._document)}selectFacetAll(t){let e="string"==typeof t?this._parent.querySelectorAll(t):t;return new cK(this._elements,null,this._parent,this._document,void 0,void 0,e)}select(t){let e="string"==typeof t?this._parent.querySelectorAll(t)[0]||null:t;return new cK([e],null,e,this._document)}append(t){let e="function"==typeof t?t:()=>this.createElement(t),n=[];if(null!==this._data){for(let t=0;t<this._data.length;t++){let r=this._data[t],[i,a]=Array.isArray(r)?r:[r,null],o=e(i,t);o.__data__=i,null!==a&&(o.__fromElements__=a),this._parent.appendChild(o),n.push(o)}return new cK(n,null,this._parent,this._document)}for(let t=0;t<this._elements.length;t++){let r=this._elements[t],i=e(r.__data__,t);r.appendChild(i),n.push(i)}return new cK(n,null,n[0],this._document)}maybeAppend(t,e,n){let r=this._elements[0],i=r.getElementById(t);if(i)return new cK([i],null,this._parent,this._document);let a="string"==typeof e?this.createElement(e):e();return a.id=t,n&&(a.className=n),r.appendChild(a),new cK([a],null,this._parent,this._document)}data(t,e=t=>t,n=()=>null){let r=[],i=[],a=new Set(this._elements),o=[],l=new Set,s=new Map(this._elements.map((t,n)=>[e(t.__data__,n),t])),u=new Map(this._facetElements.map((t,n)=>[e(t.__data__,n),t])),c=cs(this._elements,t=>n(t.__data__));for(let f=0;f<t.length;f++){let h=t[f],d=e(h,f),p=n(h,f);if(s.has(d)){let t=s.get(d);t.__data__=h,t.__facet__=!1,i.push(t),a.delete(t),s.delete(d)}else if(u.has(d)){let t=u.get(d);t.__data__=h,t.__facet__=!0,i.push(t),u.delete(d)}else if(c.has(d)){let t=c.get(d);for(let e of(o.push([h,t]),t))a.delete(e);c.delete(d)}else if(s.has(p)){let t=s.get(p);t.__toData__?t.__toData__.push(h):t.__toData__=[h],l.add(t),a.delete(t)}else r.push(h)}let f=[new cK([],r,this._parent,this._document),new cK(i,null,this._parent,this._document),new cK(a,null,this._parent,this._document),new cK([],o,this._parent,this._document),new cK(l,null,this._parent,this._document)];return new cK(this._elements,null,this._parent,this._document,f)}merge(t){let e=[...this._elements,...t._elements],n=[...this._transitions,...t._transitions];return new cK(e,null,this._parent,this._document,void 0,n)}createElement(t){if(this._document)return this._document.createElement(t,{});let e=cK.registry[t];return e?new e:cz(`Unknown node type: ${t}`)}join(t=t=>t,e=t=>t,n=t=>t.remove(),r=t=>t,i=t=>t.remove()){let a=t(this._enter),o=e(this._update),l=n(this._exit),s=r(this._merge),u=i(this._split);return o.merge(a).merge(l).merge(s).merge(u)}remove(){for(let t=0;t<this._elements.length;t++){let e=this._transitions[t];if(this._elements[t].__removed__=!0,e)Promise.all((Array.isArray(e)?e:[e]).map(t=>t.finished)).then(()=>{let e=this._elements[t];e.__removed__&&e.remove()});else{let e=this._elements[t];e.__removed__&&e.remove()}}return new cK([],null,this._parent,this._document,void 0,this._transitions)}each(t){for(let e=0;e<this._elements.length;e++){let n=this._elements[e];t(n.__data__,e,n)}return this}attr(t,e){let n="function"!=typeof e?()=>e:e;return this.each(function(r,i,a){void 0!==e&&(a[t]=n(r,i,a))})}style(t,e){let n="function"!=typeof e?()=>e:e;return this.each(function(r,i,a){void 0!==e&&(a.style[t]=n(r,i,a))})}transition(t){let e="function"!=typeof t?()=>t:t,{_transitions:n}=this;return this.each(function(t,r,i){n[r]=e(t,r,i)})}on(t,e){return this.each(function(n,r,i){i.addEventListener(t,e)}),this}call(t,...e){return t(this,...e),this}node(){return this._elements[0]}nodes(){return this._elements}transitions(){return this._transitions}parent(){return this._parent}}cK.registry={g:lb,rect:lT,circle:ly,path:lE,text:lN,ellipse:lm,image:lw,line:l_,polygon:lS,polyline:lP,html:lO};let cZ="beforechangesize",cQ="afterchangesize",cJ={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 c0 extends Error{constructor(t,e,n){super(t),this.position=e,this.token=n,this.name="ExpressionError"}}(Eu=Eg||(Eg={}))[Eu.STRING=0]="STRING",Eu[Eu.NUMBER=1]="NUMBER",Eu[Eu.BOOLEAN=2]="BOOLEAN",Eu[Eu.NULL=3]="NULL",Eu[Eu.IDENTIFIER=4]="IDENTIFIER",Eu[Eu.OPERATOR=5]="OPERATOR",Eu[Eu.FUNCTION=6]="FUNCTION",Eu[Eu.DOT=7]="DOT",Eu[Eu.BRACKET_LEFT=8]="BRACKET_LEFT",Eu[Eu.BRACKET_RIGHT=9]="BRACKET_RIGHT",Eu[Eu.PAREN_LEFT=10]="PAREN_LEFT",Eu[Eu.PAREN_RIGHT=11]="PAREN_RIGHT",Eu[Eu.COMMA=12]="COMMA",Eu[Eu.QUESTION=13]="QUESTION",Eu[Eu.COLON=14]="COLON",Eu[Eu.DOLLAR=15]="DOLLAR";let c1=new Set([32,9,10,13]),c2=new Set([43,45,42,47,37,33,38,124,61,60,62]),c5=new Map([["true",Eg.BOOLEAN],["false",Eg.BOOLEAN],["null",Eg.NULL]]),c3=new Map([["===",!0],["!==",!0],["<=",!0],[">=",!0],["&&",!0],["||",!0],["+",!0],["-",!0],["*",!0],["/",!0],["%",!0],["!",!0],["<",!0],[">",!0]]),c4=new Map([[46,Eg.DOT],[91,Eg.BRACKET_LEFT],[93,Eg.BRACKET_RIGHT],[40,Eg.PAREN_LEFT],[41,Eg.PAREN_RIGHT],[44,Eg.COMMA],[63,Eg.QUESTION],[58,Eg.COLON],[36,Eg.DOLLAR]]),c6=new Map;for(let[t,e]of c4.entries())c6.set(t,{type:e,value:String.fromCharCode(t)});function c8(t){return t>=48&&t<=57}function c9(t){return t>=97&&t<=122||t>=65&&t<=90||95===t}(Ec=Ev||(Ev={}))[Ec.Program=0]="Program",Ec[Ec.Literal=1]="Literal",Ec[Ec.Identifier=2]="Identifier",Ec[Ec.MemberExpression=3]="MemberExpression",Ec[Ec.CallExpression=4]="CallExpression",Ec[Ec.BinaryExpression=5]="BinaryExpression",Ec[Ec.UnaryExpression=6]="UnaryExpression",Ec[Ec.ConditionalExpression=7]="ConditionalExpression";let c7=new Map([["||",2],["&&",3],["===",4],["!==",4],[">",5],[">=",5],["<",5],["<=",5],["+",6],["-",6],["*",7],["/",7],["%",7],["!",8]]),ft={type:Ev.Literal,value:null},fe={type:Ev.Literal,value:!0},fn={type:Ev.Literal,value:!1};var fr=function(t){return t};let fi=function(t,e){void 0===e&&(e=fr);var n={};return n_(t)&&!eY(t)&&Object.keys(t).forEach(function(r){n[r]=e(t[r],r)}),n};function fa(t){var e,n,r,i=t||1;function a(t,a){++e>i&&(r=n,o(1),++e),n[t]=a}function o(t){e=0,n=Object.create(null),t||(r=Object.create(null))}return o(),{clear:o,has:function(t){return void 0!==n[t]||void 0!==r[t]},get:function(t){var e=n[t];return void 0!==e?e:void 0!==(e=r[t])?(a(t,e),e):void 0},set:function(t,e){void 0!==n[t]?n[t]=e:a(t,e)}}}function fo(t,e=(...t)=>`${t[0]}`,n=16){let r=fa(n);return(...n)=>{let i=e(...n),a=r.get(i);return r.has(i)?r.get(i):(a=t(...n),r.set(i,a),a)}}fa(3);let fl=["style","encode","labels","children"],fs=fo(t=>{let e,n,r,i,a,o,l,s,u,c,f,h,d,p=(f=(t=>{let e=t.length,n=Array(Math.ceil(e/3)),r=0,i=0;for(;i<e;){let a=t.charCodeAt(i);if(c1.has(a)){i++;continue}let o=c6.get(a);if(o)n[r++]=o,i++;else if(34!==a&&39!==a)if(c8(a)||45===a&&i+1<e&&c8(t.charCodeAt(i+1)))n[r++]=function(){let n=i;for(45===t.charCodeAt(i)&&i++;i<e&&c8(t.charCodeAt(i));)i++;if(i<e&&46===t.charCodeAt(i))for(i++;i<e&&c8(t.charCodeAt(i));)i++;let r=t.slice(n,i);return{type:Eg.NUMBER,value:r}}();else if(64!==a)if(c9(a))n[r++]=function(){var n;let r=i++;for(;i<e&&(c9(n=t.charCodeAt(i))||c8(n));)i++;let a=t.slice(r,i),o=c5.get(a);return o?{type:o,value:a}:{type:Eg.IDENTIFIER,value:a}}();else{if(!c2.has(a))throw new c0(`Unexpected character: ${t[i]}`,i,t.substring(Math.max(0,i-10),i));n[r++]=function(){if(i+2<e){let e=t.substring(i,i+3);if(c3.has(e))return i+=3,{type:Eg.OPERATOR,value:e}}if(i+1<e){let e=t.substring(i,i+2);if(c3.has(e))return i+=2,{type:Eg.OPERATOR,value:e}}let n=t[i];if(c3.has(n))return i++,{type:Eg.OPERATOR,value:n};throw new c0(`Unknown operator at position ${i}: ${t.substring(i,i+1)}`,i,t.substring(Math.max(0,i-10),i))}()}else n[r++]=function(){let n=++i;if(i<e&&c9(t.charCodeAt(i))){var r;for(i++;i<e&&(c9(r=t.charCodeAt(i))||c8(r));)i++}let a=t.slice(n,i);return{type:Eg.FUNCTION,value:a}}();else n[r++]=function(n){let r=i+1;i++;let a="",o=!1;for(;i<e;){let e=t.charCodeAt(i);if(e===n)return o||(a=t.substring(r,i)),i++,{type:Eg.STRING,value:a};92===e?(o||(a=t.substring(r,i),o=!0),a+=t[++i]):o&&(a+=t[i]),i++}throw new c0(`Unterminated string starting with ${String.fromCharCode(n)}`,i,t.substring(Math.max(0,i-10),i))}(a)}return r===n.length?n:n.slice(0,r)})(t),e=0,n=f.length,r=()=>e>=n?null:f[e],i=()=>f[e++],a=t=>{let e=r();return null!==e&&e.type===t},o=t=>t.type===Eg.OPERATOR?c7.get(t.value)||-1:t.type===Eg.DOT||t.type===Eg.BRACKET_LEFT?9:t.type===Eg.QUESTION?1:-1,l=t=>{let n,o;if(i().type===Eg.DOT){if(!a(Eg.IDENTIFIER)){let t=r();throw new c0("Expected property name",e,t?t.value:"<end of input>")}let t=i();n={type:Ev.Identifier,name:t.value},o=!1}else{if(n=u(0),!a(Eg.BRACKET_RIGHT)){let t=r();throw new c0("Expected closing bracket",e,t?t.value:"<end of input>")}i(),o=!0}return{type:Ev.MemberExpression,object:t,property:n,computed:o}},s=()=>{let t=r();if(!t)throw new c0("Unexpected end of input",e,"<end of input>");if(t.type===Eg.OPERATOR&&("!"===t.value||"-"===t.value)){i();let e=s();return{type:Ev.UnaryExpression,operator:t.value,argument:e,prefix:!0}}switch(t.type){case Eg.NUMBER:return i(),{type:Ev.Literal,value:Number(t.value)};case Eg.STRING:return i(),{type:Ev.Literal,value:t.value};case Eg.BOOLEAN:return i(),"true"===t.value?fe:fn;case Eg.NULL:return i(),ft;case Eg.IDENTIFIER:return i(),{type:Ev.Identifier,name:t.value};case Eg.FUNCTION:return(()=>{let t=i(),n=[];if(!a(Eg.PAREN_LEFT)){let t=r();throw new c0("Expected opening parenthesis after function name",e,t?t.value:"<end of input>")}for(i();;){if(a(Eg.PAREN_RIGHT)){i();break}if(!r()){let t=r();throw new c0("Expected closing parenthesis",e,t?t.value:"<end of input>")}if(n.length>0){if(!a(Eg.COMMA)){let t=r();throw new c0("Expected comma between function arguments",e,t?t.value:"<end of input>")}i()}let t=u(0);n.push(t)}return{type:Ev.CallExpression,callee:{type:Ev.Identifier,name:t.value},arguments:n}})();case Eg.PAREN_LEFT:{i();let t=u(0);if(!a(Eg.PAREN_RIGHT)){let t=r();throw new c0("Expected closing parenthesis",e,t?t.value:"<end of input>")}return i(),t}default:throw new c0(`Unexpected token: ${t.type}`,e,t.value)}},c=(u=(t=0)=>{let c=s();for(;e<n;){let n=f[e],s=o(n);if(s<=t)break;if(n.type!==Eg.QUESTION)if(n.type!==Eg.OPERATOR){if(n.type!==Eg.DOT&&n.type!==Eg.BRACKET_LEFT)break;c=l(c)}else{i();let t=u(s);c={type:Ev.BinaryExpression,operator:n.value,left:c,right:t}}else{i();let t=u(0);if(!a(Eg.COLON)){let t=r();throw new c0("Expected : in conditional expression",e,t?t.value:"<end of input>")}i();let n=u(0);c={type:Ev.ConditionalExpression,test:c,consequent:t,alternate:n}}}return c})(),h={type:Ev.Program,body:c},d=((t={},e={})=>({context:t,functions:e}))({},cJ),(t={})=>{let e,n;return e=d,t&&(e={...d,context:{...d.context,...t}}),(n=t=>{switch(t.type){case Ev.Literal:return t.value;case Ev.Identifier:if(!(t.name in e.context))throw new c0(`Undefined variable: ${t.name}`);return e.context[t.name];case Ev.MemberExpression:let r=n(t.object);if(null==r)throw new c0("Cannot access property of null or undefined");return r[t.computed?n(t.property):t.property.name];case Ev.CallExpression:let i=e.functions[t.callee.name];if(!i)throw new c0(`Undefined function: ${t.callee.name}`);return i(...t.arguments.map(t=>n(t)));case Ev.BinaryExpression:if("&&"===t.operator){let e=n(t.left);return e?n(t.right):e}if("||"===t.operator)return n(t.left)||n(t.right);let a=n(t.left),o=n(t.right);switch(t.operator){case"+":return a+o;case"-":return a-o;case"*":return a*o;case"/":return a/o;case"%":return a%o;case"===":return a===o;case"!==":return a!==o;case">":return a>o;case">=":return a>=o;case"<":return a<o;case"<=":return a<=o;default:throw new c0(`Unknown operator: ${t.operator}`)}case Ev.UnaryExpression:let l=n(t.argument);if(t.prefix)switch(t.operator){case"!":return!l;case"-":if("number"!=typeof l)throw new c0(`Cannot apply unary - to non-number: ${l}`);return-l;default:throw new c0(`Unknown operator: ${t.operator}`)}throw new c0(`Postfix operators are not supported: ${t.operator}`);case Ev.ConditionalExpression:let s;return s=n(t.test),n(s?t.consequent:t.alternate);default:throw new c0(`Evaluation error: Unsupported node type: ${t.type}`)}})(h.body)});return(...t)=>{let e=Array.from({length:t.length},(t,e)=>String.fromCharCode(97+e)),n=Object.fromEntries(t.map((t,n)=>[e[n],t]));return p(Object.assign(Object.assign({},n),{global:Object.assign({},n)}))}},t=>t,128),fu=function(t){var e=cg(t);return e.charAt(0).toUpperCase()+e.substring(1)};function fc(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}var ff=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function fh(t){var e;if(!(e=ff.exec(t)))throw Error("invalid format: "+t);return new fd({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function fd(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function fp(t,e){var n=fc(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+Array(i-r.length+2).join("0")}fh.prototype=fd.prototype,fd.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};let fy={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>fp(100*t,e),r:fp,s:function(t,e){var n=fc(t,e);if(!n)return t+"";var r=n[0],i=n[1],a=i-(Em=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,o=r.length;return a===o?r:a>o?r+Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+Array(1-a).join("0")+fc(t,Math.max(0,e+a-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function fg(t){return t}var fv=Array.prototype.map,fm=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];function fb(t,e){return Object.entries(t).reduce((n,[r,i])=>(n[r]=e(i,r,t),n),{})}function fx(t){return t.map((t,e)=>e)}function fO(t){return t[t.length-1]}function fw(t,e){let n=[[],[]];return t.forEach(t=>{n[+!e(t)].push(t)}),n}Ex=(Eb=function(t){var e,n,r,i=void 0===t.grouping||void 0===t.thousands?fg:(e=fv.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,a=[],o=0,l=e[0],s=0;i>0&&l>0&&(s+l+1>r&&(l=Math.max(1,r-s)),a.push(t.substring(i-=l,i+l)),!((s+=l+1)>r));)l=e[o=(o+1)%e.length];return a.reverse().join(n)}),a=void 0===t.currency?"":t.currency[0]+"",o=void 0===t.currency?"":t.currency[1]+"",l=void 0===t.decimal?".":t.decimal+"",s=void 0===t.numerals?fg:(r=fv.call(t.numerals,String),function(t){return t.replace(/[0-9]/g,function(t){return r[+t]})}),u=void 0===t.percent?"%":t.percent+"",c=void 0===t.minus?"−":t.minus+"",f=void 0===t.nan?"NaN":t.nan+"";function h(t){var e=(t=fh(t)).fill,n=t.align,r=t.sign,h=t.symbol,d=t.zero,p=t.width,y=t.comma,g=t.precision,v=t.trim,b=t.type;"n"===b?(y=!0,b="g"):fy[b]||(void 0===g&&(g=12),v=!0,b="g"),(d||"0"===e&&"="===n)&&(d=!0,e="0",n="=");var x="$"===h?a:"#"===h&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",O="$"===h?o:/[%p]/.test(b)?u:"",w=fy[b],k=/[defgprs%]/.test(b);function _(t){var a,o,u,h=x,_=O;if("c"===b)_=w(t)+_,t="";else{var M=(t*=1)<0||1/t<0;if(t=isNaN(t)?f:w(Math.abs(t),g),v&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r<n;++r)switch(t[r]){case".":i=e=r;break;case"0":0===i&&(i=r),e=r;break;default:if(!+t[r])break t;i>0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),M&&0==+t&&"+"!==r&&(M=!1),h=(M?"("===r?r:c:"-"===r||"("===r?"":r)+h,_=("s"===b?fm[8+Em/3]:"")+_+(M&&"("===r?")":""),k){for(a=-1,o=t.length;++a<o;)if(48>(u=t.charCodeAt(a))||u>57){_=(46===u?l+t.slice(a+1):t.slice(a))+_,t=t.slice(0,a);break}}}y&&!d&&(t=i(t,1/0));var E=h.length+t.length+_.length,A=E<p?Array(p-E+1).join(e):"";switch(y&&d&&(t=i(A+t,A.length?p-_.length:1/0),A=""),n){case"<":t=h+t+_+A;break;case"=":t=h+A+t+_;break;case"^":t=A.slice(0,E=A.length>>1)+h+t+_+A.slice(E);break;default:t=A+h+t+_}return s(t)}return g=void 0===g?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),_.toString=function(){return t+""},_}return{format:h,formatPrefix:function(t,e){var n,r=h(((t=fh(t)).type="f",t)),i=3*Math.max(-8,Math.min(8,Math.floor(((n=fc(Math.abs(n=e)))?n[1]:NaN)/3))),a=Math.pow(10,-i),o=fm[8+i/3];return function(t){return r(a*t)+o}}}}({thousands:",",grouping:[3],currency:["$",""]})).format,Eb.formatPrefix;let fk=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)};var f_=function(t,e){if(t===e)return!0;if(!t||!e||eV(t)||eV(e))return!1;if(fk(t)||fk(e)){if(t.length!==e.length)return!1;for(var n=!0,r=0;r<t.length&&(n=f_(t[r],e[r]));r++);return n}if(cd(t)||cd(e)){var i=Object.keys(t),a=Object.keys(e);if(i.length!==a.length)return!1;for(var n=!0,r=0;r<i.length&&(n=f_(t[i[r]],e[i[r]]));r++);return n}return!1};function fM(t,e){let n=0;if(void 0===e)for(let e of t)(e*=1)&&(n+=e);else{let r=-1;for(let i of t)(i=+e(i,++r,t))&&(n+=i)}return n}function fE(t,e){let n;if(void 0===e)for(let e of t)null!=e&&(n<e||void 0===n&&e>=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n<i||void 0===n&&i>=i)&&(n=i)}return n}let fA=(t={})=>{var e,n;let r=Object.assign(Object.assign({},{startAngle:-Math.PI/2,endAngle:3*Math.PI/2,innerRadius:0,outerRadius:1}),t);return Object.assign(Object.assign({},r),(e=r.startAngle,n=r.endAngle,e%=2*Math.PI,n%=2*Math.PI,e<0&&(e=2*Math.PI+e),n<0&&(n=2*Math.PI+n),e>=n&&(n+=2*Math.PI),{startAngle:e,endAngle:n}))},fS=t=>{let{startAngle:e,endAngle:n,innerRadius:r,outerRadius:i}=fA(t);return[["translate",0,.5],["reflect.y"],["translate",0,-.5],["polar",e,n,r,i]]};fS.props={};let fj=(t={})=>Object.assign(Object.assign({},{startAngle:-Math.PI/2,endAngle:3*Math.PI/2,innerRadius:0,outerRadius:1}),t),fP=t=>{let{startAngle:e,endAngle:n,innerRadius:r,outerRadius:i}=fj(t);return[["transpose"],["translate",.5,.5],["reflect"],["translate",-.5,-.5],...fS({startAngle:e,endAngle:n,innerRadius:r,outerRadius:i})]};function fT(t,e,n){return Math.max(e,Math.min(t,n))}function fC(t,e=10){return"number"!=typeof t||1e-15>Math.abs(t)?t:parseFloat(t.toFixed(e))}function fN(t){return`.g2-${t}`}fP.props={};let fL=[["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"]]]]],fI=["lineX","lineY","rangeX","rangeY","range","connector"];var fR=n(7120);function fD(t){let{transformations:e}=t.getOptions();return e.map(([t])=>t).filter(t=>"transpose"===t).length%2!=0}function fB(t){let{transformations:e}=t.getOptions();return e.some(([t])=>"polar"===t)}function fF(t){let{transformations:e}=t.getOptions();return e.some(([t])=>"reflect"===t)&&e.some(([t])=>t.startsWith("transpose"))}function fz(t){let{transformations:e}=t.getOptions();return e.some(([t])=>"helix"===t)}function f$(t){let{transformations:e}=t.getOptions();return e.some(([t])=>"parallel"===t)}function fW(t){let{transformations:e}=t.getOptions();return e.some(([t])=>"fisheye"===t)}function fG(t){return fz(t)||fB(t)}function fq(t){let{transformations:e}=t.getOptions(),[,,,n,r]=e.find(t=>"polar"===t[0]);return[+n,+r]}function fH(t,e=!0){let{transformations:n}=t.getOptions(),[,r,i]=n.find(t=>"polar"===t[0]);return e?[180*r/Math.PI,180*i/Math.PI]:[r,i]}function fY(t){fU(t,!0)}function fV(t){fU(t,!1)}function fU(t,e){var n=e?"visible":"hidden";!function t(e,n){n(e),e.children&&e.children.forEach(function(e){e&&t(e,n)})}(t,function(t){t.attr("visibility",n)})}function fX(t){if(!t)return{enter:!1,update:!1,exit:!1};var e=["enter","update","exit"],n=Object.fromEntries(Object.entries(t).filter(function(t){var n=e0(t,1)[0];return!e.includes(n)}));return Object.fromEntries(e.map(function(e){return"boolean"!=typeof t&&"enter"in t&&"update"in t&&"exit"in t?!1===t[e]?[e,!1]:[e,eZ(eZ({},t[e]),n)]:[e,n]}))}function fK(t,e){t?t.finished.then(e):e()}function fZ(t,e){"update"in t?t.update(e):t.attr(e)}function fQ(t,e,n){return 0===e.length?null:n?t.animate(e,n):(fZ(t,{style:e.slice(-1)[0]}),null)}function fJ(t,e,n){var r={},i={};return(Object.entries(e).forEach(function(e){var n=e0(e,2),a=n[0],o=n[1];if(!eY(o)){var l=t.style[a]||t.parsedStyle[a]||0;l!==o&&(r[a]=l,i[a]=o)}}),n)?fQ(t,[r,i],eZ({fill:"both"},n)):(fZ(t,i),null)}var f0=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=5),Object.entries(e).forEach(function(i){var a=e0(i,2),o=a[0],l=a[1];Object.prototype.hasOwnProperty.call(e,o)&&(l?cp(l)?(cp(t[o])||(t[o]={}),n<r?f0(t[o],l,n+1,r):t[o]=e[o]):ns(l)?(t[o]=[],t[o]=t[o].concat(l)):t[o]=l:t[o]=l)})},f1=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)f0(t,e[r]);return t},f2=function(t){function e(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=t.apply(this,e1([],e0(e),!1))||this;return r.isMutationObserved=!0,r.addEventListener(oR.INSERTED,function(){fV(r)}),r}return eK(e,t),e}(lb);function f5(t){var e=t.appendChild(new f2({class:"offscreen"}));return fV(e),e}function f3(){fU(this,"hidden"!==this.attributes.visibility)}var f4=function(t){function e(e,n){void 0===n&&(n={});var r=t.call(this,f1({},{style:n},e))||this;return r.initialized=!1,r._defaultOptions=n,r}return eK(e,t),Object.defineProperty(e.prototype,"offscreenGroup",{get:function(){return this._offscreen||(this._offscreen=f5(this)),this._offscreen},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"defaultOptions",{get:function(){return this._defaultOptions},enumerable:!1,configurable:!0}),e.prototype.connectedCallback=function(){this.render(this.attributes,this),this.bindEvents(this.attributes,this),this.initialized=!0},e.prototype.disconnectedCallback=function(){var t;null==(t=this._offscreen)||t.destroy()},e.prototype.attributeChangedCallback=function(t){"visibility"===t&&f3.call(this)},e.prototype.update=function(t,e){var n;return this.attr(f1({},this.attributes,t||{})),null==(n=this.render)?void 0:n.call(this,this.attributes,this,e)},e.prototype.clear=function(){this.removeChildren()},e.prototype.bindEvents=function(t,e){},e.prototype.getSubShapeStyle=function(t){return t.x,t.y,t.transform,t.transformOrigin,t.class,t.className,t.zIndex,eQ(t,["x","y","transform","transformOrigin","class","className","zIndex"])},e}(lv);function f6(t,e,n,r,i){return(void 0===r&&(r=!0),void 0===i&&(i=function(t){t.node().removeChildren()}),t)?n(e):(r&&i(e),null)}let f8=function(t){if(!ns(t))return[];for(var e=[],n=0;n<t.length;n++)e=e.concat(t[n]);return e};var f9=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=eQ(e,["style"]);return t.call(this,eZ({style:eZ({text:"",fill:"black",fontFamily:"sans-serif",fontSize:16,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",lineWidth:1,textAlign:"start",textBaseline:"middle"},n)},r))||this}return eK(e,t),Object.defineProperty(e.prototype,"offscreenGroup",{get:function(){return this._offscreen||(this._offscreen=f5(this)),this._offscreen},enumerable:!1,configurable:!0}),e.prototype.disconnectedCallback=function(){var t;null==(t=this._offscreen)||t.destroy()},e}(lN),f7=function(){var t,e,n;function r(e,n,r,i,a,o,l){void 0===e&&(e=null),void 0===n&&(n=null),void 0===r&&(r=null),void 0===i&&(i=null),void 0===a&&(a=[null,null,null,null,null]),void 0===o&&(o=[]),void 0===l&&(l=[]),t.add(this),this._elements=Array.from(e),this._data=n,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=l}return r.prototype.selectAll=function(t){var n="string"==typeof t?this._parent.querySelectorAll(t):t;return new e(n,null,this._elements[0],this._document)},r.prototype.selectFacetAll=function(t){var n="string"==typeof t?this._parent.querySelectorAll(t):t;return new e(this._elements,null,this._parent,this._document,void 0,void 0,n)},r.prototype.select=function(t){var n="string"==typeof t?this._parent.querySelectorAll(t)[0]||null:t;return new e([n],null,n,this._document)},r.prototype.append=function(t){var n=this,r="function"==typeof t?t:function(){return n.createElement(t)},i=[];if(null!==this._data){for(var a=0;a<this._data.length;a++){var o=this._data[a],l=e0(Array.isArray(o)?o:[o,null],2),s=l[0],u=l[1],c=r(s,a);c.__data__=s,null!==u&&(c.__fromElements__=u),this._parent.appendChild(c),i.push(c)}return new e(i,null,this._parent,this._document)}for(var a=0;a<this._elements.length;a++){var f=this._elements[a],s=f.__data__,c=r(s,a);f.appendChild(c),i.push(c)}return new e(i,null,i[0],this._document)},r.prototype.maybeAppend=function(e,r){var i=e2(this,t,"m",n).call(this,"#"===e[0]?e:"#".concat(e),r);return i.attr("id",e),i},r.prototype.maybeAppendByClassName=function(e,r){var i=e.toString(),a=e2(this,t,"m",n).call(this,"."===i[0]?i:".".concat(i),r);return a.attr("className",i),a},r.prototype.maybeAppendByName=function(e,r){var i=e2(this,t,"m",n).call(this,'[name="'.concat(e,'"]'),r);return i.attr("name",e),i},r.prototype.data=function(t,n,r){void 0===n&&(n=function(t){return t}),void 0===r&&(r=function(){return null});for(var i,a,o,l,s,u=[],c=[],f=new Set(this._elements),h=[],d=new Set,p=new Map(this._elements.map(function(t,e){return[n(t.__data__,e),t]})),y=new Map(this._facetElements.map(function(t,e){return[n(t.__data__,e),t]})),g=(i=this._elements,a=function(t){return r(t.__data__)},o=new Map,i.forEach(function(t){var e=a(t);o.has(e)||o.set(e,[]),o.get(e).push(t)}),o),v=0;v<t.length;v++){var b=t[v],x=n(b,v),O=r(b,v);if(p.has(x)){var w=p.get(x);w.__data__=b,w.__facet__=!1,c.push(w),f.delete(w),p.delete(x)}else if(y.has(x)){var w=y.get(x);w.__data__=b,w.__facet__=!0,c.push(w),y.delete(x)}else if(g.has(x)){var k=g.get(x);h.push([b,k]);try{for(var _=(l=void 0,eJ(k)),M=_.next();!M.done;M=_.next()){var w=M.value;f.delete(w)}}catch(t){l={error:t}}finally{try{M&&!M.done&&(s=_.return)&&s.call(_)}finally{if(l)throw l.error}}g.delete(x)}else if(p.has(O)){var w=p.get(O);w.__toData__?w.__toData__.push(b):w.__toData__=[b],d.add(w),f.delete(w)}else u.push(b)}var E=[new e([],u,this._parent,this._document),new e(c,null,this._parent,this._document),new e(f,null,this._parent,this._document),new e([],h,this._parent,this._document),new e(d,null,this._parent,this._document)];return new e(this._elements,null,this._parent,this._document,E)},r.prototype.merge=function(t){var n=e1(e1([],e0(this._elements),!1),e0(t._elements),!1),r=e1(e1([],e0(this._transitions),!1),e0(t._transitions),!1);return new e(n,null,this._parent,this._document,void 0,r)},r.prototype.createElement=function(t){if(this._document)return this._document.createElement(t,{});var n=e.registry[t];if(n)return new n;throw Error("Unknown node type: ".concat(t))},r.prototype.join=function(t,e,n,r,i){void 0===t&&(t=function(t){return t}),void 0===e&&(e=function(t){return t}),void 0===n&&(n=function(t){return t.remove()}),void 0===r&&(r=function(t){return t}),void 0===i&&(i=function(t){return t.remove()});var a=t(this._enter),o=e(this._update),l=n(this._exit),s=r(this._merge),u=i(this._split);return o.merge(a).merge(l).merge(s).merge(u)},r.prototype.remove=function(){for(var t=this,n=0;n<this._elements.length;n++)!function(e){var n=t._elements[e],r=t._transitions[e];r?r.then(function(){return n.remove()}):n.remove()}(n);return new e([],null,this._parent,this._document,void 0,this._transitions)},r.prototype.each=function(t){for(var e=0;e<this._elements.length;e++){var n=this._elements[e],r=n.__data__;t.call(n,r,e)}return this},r.prototype.attr=function(t,e){var n="function"!=typeof e?function(){return e}:e;return this.each(function(r,i){void 0!==e&&(this[t]=n.call(this,r,i))})},r.prototype.style=function(t,e,n){void 0===n&&(n=!0);var r="function"==typeof e&&n?e:function(){return e};return this.each(function(n,i){void 0!==e&&(this.style[t]=r.call(this,n,i))})},r.prototype.styles=function(t,e){return void 0===t&&(t={}),void 0===e&&(e=!0),this.each(function(n,r){var i=this;Object.entries(t).forEach(function(t){var a=e0(t,2),o=a[0],l=a[1],s="function"==typeof l&&e?l:function(){return l};void 0!==l&&i.attr(o,s.call(i,n,r))})})},r.prototype.update=function(t,e){void 0===e&&(e=!0);var n="function"==typeof t&&e?t:function(){return t};return this.each(function(e,r){t&&this.update&&this.update(n.call(this,e,r))})},r.prototype.maybeUpdate=function(t,e){void 0===e&&(e=!0);var n="function"==typeof t&&e?t:function(){return t};return this.each(function(e,r){t&&this.update&&this.update(n.call(this,e,r))})},r.prototype.transition=function(t){this._transitions;var e=Array(this._elements.length);return this.each(function(n,r){e[r]=t.call(this,n,r)}),this._transitions=f8(e),this},r.prototype.on=function(t,e){return this.each(function(){this.addEventListener(t,e)}),this},r.prototype.call=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return t.call.apply(t,e1([this._parent,this],e0(e),!1)),this},r.prototype.node=function(){return this._elements[0]},r.prototype.nodes=function(){return this._elements},r.prototype.transitions=function(){return this._transitions.filter(function(t){return!!t})},r.prototype.parent=function(){return this._parent},e=r,t=new WeakSet,n=function(t,n){var r=this._elements[0],i=r.querySelector(t);if(i)return new e([i],null,this._parent,this._document);var a="string"==typeof n?this.createElement(n):n();return r.appendChild(a),new e([a],null,this._parent,this._document)},r.registry={g:lb,rect:lT,circle:ly,path:lE,text:f9,ellipse:lm,image:lw,line:l_,polygon:lS,polyline:lP,html:lO},r}();function ht(t){return new f7([t],null,t,t.ownerDocument)}var he=function(t,e){var n=function(t){return"".concat(e,"-").concat(t)},r=Object.fromEntries(Object.entries(t).map(function(t){var e=e0(t,2),r=e[0],i=n(e[1]);return[r,{name:i,class:".".concat(i),id:"#".concat(i),toString:function(){return i}}]}));return Object.assign(r,{prefix:n}),r},hn="grid-group",hr="main-group",hi="line-group",ha="tick-group",ho="label-group",hl="title-group",hs="grid",hu="line",hc="line-first",hf="line-second",hh="tick",hd="tick-item",hp="label",hy="label-item",hg="title",hv={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 lE({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:[]};cy({},hv,{style:{type:"arc"}}),cy({},hv,{style:{}});var hm=he({mainGroup:hr,gridGroup:hn,grid:hs,lineGroup:hi,line:hu,tickGroup:ha,tick:hh,tickItem:hd,labelGroup:ho,label:hp,labelItem:hy,titleGroup:hl,title:hg,lineFirst:hc,lineSecond:hf},"axis");function hb(t,e){return[t[0]*e,t[1]*e]}function hx(t,e){return[t[0]+e[0],t[1]+e[1]]}function hO(t,e){return[t[0]-e[0],t[1]-e[1]]}function hw(t,e){return[Math.min(t[0],e[0]),Math.min(t[1],e[1])]}function hk(t,e){return[Math.max(t[0],e[0]),Math.max(t[1],e[1])]}function h_(t,e){return Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2))}function hM(t){if(0===t[0]&&0===t[1])return[0,0];var e=Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2));return[t[0]/e,t[1]/e]}function hE(t){return t*Math.PI/180}function hA(t){return Number((180*t/Math.PI).toPrecision(5))}function hS(t){return t.toString().charAt(0).toUpperCase()+t.toString().slice(1)}function hj(t,e,n){void 0===n&&(n=!0);var r,i=e||(null==(r=t.match(/^([a-z][a-z0-9]+)/))?void 0:r[0])||"",a=t.replace(new RegExp("^(".concat(i,")")),"");return n?a.toString().charAt(0).toLowerCase()+a.toString().slice(1):a}var hP=function(t,e){if(!(null==t?void 0:t.startsWith(e)))return!1;var n=t[e.length];return n>="A"&&n<="Z"};function hT(t,e,n){void 0===n&&(n=!1);var r={};return Object.entries(t).forEach(function(t){var i=e0(t,2),a=i[0],o=i[1];if("className"===a||"class"===a);else if(hP(a,"show")&&hP(hj(a,"show"),e)!==n)a==="".concat("show").concat(hS(e))?r[a]=o:r[a.replace(new RegExp(hS(e)),"")]=o;else if(!hP(a,"show")&&hP(a,e)!==n){var l=hj(a,e);"filter"===l&&"function"==typeof o||(r[l]=o)}}),r}function hC(t,e){return Object.entries(t).reduce(function(t,n){var r=e0(n,2),i=r[0],a=r[1];return i.startsWith("show")?t["show".concat(e).concat(i.slice(4))]=a:t["".concat(e).concat(hS(i))]=a,t},{})}function hN(t,e){void 0===e&&(e=["x","y","class","className"]);var n=["transform","transformOrigin","anchor","visibility","pointerEvents","zIndex","cursor","clipPath","clipPathTargets","offsetPath","offsetPathTargets","offsetDistance","draggable","droppable"],r={},i={};return Object.entries(t).forEach(function(t){var a=e0(t,2),o=a[0],l=a[1];e.includes(o)||(-1!==n.indexOf(o)?i[o]=l:r[o]=l)}),[r,i]}function hL(t,e){return nk(t)?t.apply(void 0,e1([],e0(e),!1)):t}function hI(t,e){return t.style.opacity||(t.style.opacity=1),fJ(t,{opacity:0},e)}var hR=["$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 hD(t){var e={};for(var n in t)hR.includes(n)&&(e[n]=t[n]);return e}var hB=he({lineGroup:"line-group",line:"line",regionGroup:"region-group",region:"region"},"grid");function hF(t){return t.reduce(function(t,e,n){return t.push(e1([0===n?"M":"L"],e0(e),!1)),t},[])}function hz(t,e,n){if("surround"===e.type){var r=e.connect,i=e.center;if("line"===(void 0===r?"line":r))return hF(t);if(!i)return[];var a=h_(t[0],i),o=+!n;return t.reduce(function(t,e,n){return 0===n?t.push(e1(["M"],e0(e),!1)):t.push(e1(["A",a,a,0,0,o],e0(e),!1)),t},[])}return hF(t)}var h$=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return eK(e,t),e.prototype.render=function(t,e){t.type,t.center,t.areaFill,t.closed;var n,r,i,a,o,l=eQ(t,["type","center","areaFill","closed"]),s=(r=void 0===(n=t.data)?[]:n,t.closed?r.map(function(t){var e=t.points,n=e0(e,1)[0];return eZ(eZ({},t),{points:e1(e1([],e0(e),!1),[n],!1)})}):r),u=ht(e).maybeAppendByClassName(hB.lineGroup,"g"),c=ht(e).maybeAppendByClassName(hB.regionGroup,"g"),f=(i=t.animate,a=t.isBillboard,o=s.map(function(e,n){return{id:e.id||"grid-line-".concat(n),d:hz(e.points,t)}}),u.selectAll(hB.line.class).data(o,function(t){return t.id}).join(function(t){return t.append("path").each(function(t,e){var n=hL(hD(eZ({d:t.d},l)),[t,e,o]);this.attr(eZ({class:hB.line.name,stroke:"#D9D9D9",lineWidth:1,lineDash:[4,4],isBillboard:a},n))})},function(t){return t.transition(function(t,e){return fJ(this,hL(hD(eZ({d:t.d},l)),[t,e,o]),i.update)})},function(t){return t.transition(function(){var t=this,e=hI(this,i.exit);return fK(e,function(){return t.remove()}),e})}).transitions()),h=function(t,e,n){var r=n.animate,i=n.connect,a=n.areaFill;if(e.length<2||!a||!i)return[];for(var o=Array.isArray(a)?a:[a,"transparent"],l=[],s=0;s<e.length-1;s++){var u=e0([e[s].points,e[s+1].points],2),c=function(t,e,n){var r=n.type,i=n.connect,a=n.center,o=n.closed?[["Z"]]:[],l=e0([hz(t,n),hz(e.slice().reverse(),n,!0)],2),s=l[0],u=l[1],c=e0([t[0],e.slice(-1)[0]],2),f=c[0],h=c[1],d=function(t,e){return[s,t,u,e,o].flat()};if("line"===i||"surround"===r)return d([e1(["L"],e0(h),!1)],[e1(["L"],e0(f),!1)]);if(!a)throw Error("Arc grid need to specified center");var p=e0([h_(h,a),h_(f,a)],2),y=p[0],g=p[1];return d([e1(["A",y,y,0,0,1],e0(h),!1),e1(["L"],e0(h),!1)],[e1(["A",g,g,0,0,0],e0(f),!1),e1(["L"],e0(f),!1)])}(u[0],u[1],n);l.push({d:c,fill:o[s%o.length]})}return t.selectAll(hB.region.class).data(l,function(t,e){return e}).join(function(t){return t.append("path").each(function(t,e){var n=hL(t,[t,e,l]);this.attr(n)}).attr("className",hB.region.name)},function(t){return t.transition(function(t,e){return fJ(this,hL(t,[t,e,l]),r.update)})},function(t){return t.transition(function(){var t=this,e=hI(this,r.exit);return fK(e,function(){return t.remove()}),e})}).transitions()}(c,s,t);return e1(e1([],e0(f),!1),e0(h),!1)},e}(f4);function hW(t){return"function"==typeof t?t():eV(t)||eq(t)?new f9({style:{text:String(t)}}):t}function hG(t,e,n){void 0===n&&(n=!1);var r=t.getBBox(),i=e/Math.max(r.width,r.height);return n&&(t.style.transform="scale(".concat(i,")")),i}function hq(t,e){var n={},r=Array.isArray(e)?e:[e];for(var i in t)r.includes(i)||(n[i]=t[i]);return n}function hH(t,e){return Object.fromEntries(Object.entries(t).map(function(t){var n=e0(t,2);return[n[0],hL(n[1],e)]}))}function hY(t,e){return e&&nk(e)?t.filter(e):t}function hV(t,e){var n=e.startAngle;return(e.endAngle-n)*t+n}function hU(t,e){if("linear"===e.type){var n=e0(e.startPos,2),r=n[0],i=n[1],a=e0(e.endPos,2),o=e0([a[0]-r,a[1]-i],2);return hM([o[0],o[1]])}var l=hE(hV(t,e));return[-Math.sin(l),Math.cos(l)]}function hX(t,e,n){var r;return r=hU(t,n),"positive"!==e?[r[1],-r[0]]:[-r[1],r[0]]}function hK(t,e){return hX(t,e.labelDirection,e)}function hZ(t,e,n){return n?"".concat(t," ").concat(n,"axis-").concat(e):t}function hQ(t,e,n,r){return r&&t.attr("className",hZ(e.name,n,r)),t}function hJ(t,e){var n,r,i,a,o,l,s,u,c,f;return"linear"===e.type?(r=(n=e0(e.startPos,2))[0],i=n[1],a=e0(e.endPos,2),o=e0([a[0]-r,a[1]-i],2),[r+o[0]*t,i+o[1]*t]):(l=e.radius,u=(s=e0(e.center,2))[0],c=s[1],[u+l*Math.cos(f=hE(hV(t,e))),c+l*Math.sin(f)])}function h0(t){return 0===hU(0,t)[1]}function h1(t){return 0===hU(0,t)[0]}function h2(t,e,n,r,i){var a=e-t,o=e0([i,i],2),l=o[0],s=o[1],u=e0([hE(t),hE(e)],2),c=u[0],f=u[1],h=function(t){return[n+i*Math.cos(t),r+i*Math.sin(t)]},d=e0(h(c),2),p=d[0],y=d[1],g=e0(h(f),2),v=g[0],b=g[1];if(e-t==360){var x=e0(h((f+c)/2),2);return[["M",p,y],["A",l,s,0,1,0,x[0],x[1]],["A",l,s,0,1,0,v,b]]}return"M".concat(p,",").concat(y,",A").concat(l,",").concat(s,",0,").concat(+(a>180),",").concat(t>e?0:1,",").concat(v,",").concat(b)}function h5(t){var e=e0(t,2),n=e0(e[0],2),r=n[0],i=n[1],a=e0(e[1],2);return{x1:r,y1:i,x2:a[0],y2:a[1]}}function h3(t){var e=t.type,n=t.gridCenter;return"linear"===e?n:n||t.center}function h4(t,e,n,r,i){return void 0===r&&(r=!0),void 0===i&&(i=!1),!!r&&t===e||!!i&&t===n||t>e&&t<n}var h6=function(t){var e,n=new DOMParser().parseFromString(t,"text/html").body.firstElementChild;if(console.log(null==n?void 0:n.getClientRects(),11),!n)return 0;var r=Object.fromEntries((n.getAttribute("style")||"").split(";").map(function(t){return t.trim()}).filter(function(t){return t.includes(":")}).map(function(t){var e=e0(t.split(":").map(function(t){return t.trim()}),2),n=e[0],r=e[1];return[n.toLowerCase(),r]})),i=function(t){if(!t)return 0;var e=t.match(/([\d.]+)px/);return e?parseFloat(e[1]):0};if(r.height)return i(r.height);var a=i(r["font-size"])||16,o=r["line-height"];e=o&&"normal"!==o?o.endsWith("px")?i(o):/^[\d.]+$/.test(o)?parseFloat(o)*a:a:1.2*a;var l=i(r["padding-top"]),s=i(r["padding-bottom"]);if(r.padding){var u=r.padding.split(/\s+/).map(i);1===u.length||2===u.length?(l=u[0],s=u[0]):3===u.length?(l=u[0],s=u[2]):4===u.length&&(l=u[0],s=u[2])}var c=i(r["border-top-width"]),f=i(r["border-bottom-width"]);if(r.border){var h=r.border.match(/([\d.]+)px/);h&&(c=parseFloat(h[1]),f=parseFloat(h[1]))}if(r["border-width"]){var u=r["border-width"].split(/\s+/).map(i);1===u.length||2===u.length?(c=u[0],f=u[0]):3===u.length?(c=u[0],f=u[2]):4===u.length&&(c=u[0],f=u[2])}return e+l+s+c+f},h8=new Map,h9=(Ef=function(t,e){var n=e.fontSize,r=e.fontFamily,i=e.fontWeight,a=e.fontStyle,o=e.fontVariant;return Ew?Ew(t,n):(EO||(EO=le.offscreenCanvasCreator.getOrCreateContext(void 0)),EO.font=[a,o,i,"".concat(n,"px"),r].join(" "),EO.measureText(t).width)},Eh=function(t,e){return[t,Object.values(e||h7(t)).join()].join("")},function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Eh?Eh.apply(this,t):t[0];h8.has(Ef)||h8.set(Ef,function(){var t,e,n,r=4096;function i(i,o){++t>r&&(n=e,a(1),++t),e[i]=o}function a(r){t=0,e=Object.create(null),r||(n=Object.create(null))}return a(),{clear:a,has:function(t){return void 0!==e[t]||void 0!==n[t]},get:function(t){var r=e[t];return void 0!==r?r:void 0!==(r=n[t])?(i(t,r),r):void 0},set:function(t,n){void 0!==e[t]?e[t]=n:i(t,n)}}}());var r=h8.get(Ef);if(r.has(n))return r.get(n);var i=Ef.apply(this,t);return r.set(n,i),i}),h7=function(t){var e=t.style.fontFamily||"sans-serif",n=t.style.fontWeight||"normal",r=t.style.fontStyle||"normal",i=t.style.fontVariant,a=t.style.fontSize;return{fontSize:a="object"==typeof a?a.value:a,fontFamily:e,fontWeight:n,fontStyle:r,fontVariant:i}};function dt(t){return"text"===t.nodeName?t:"g"===t.nodeName&&1===t.children.length&&"text"===t.children[0].nodeName?t.children[0]:null}function de(t,e){var n=dt(t);n&&n.attr(e)}function dn(t,e,n){void 0===n&&(n="..."),de(t,{wordWrap:!0,wordWrapWidth:e,maxLines:1,textOverflow:n})}function dr(t,e){if(e)try{var n=e.replace(/translate\(([+-]*[\d]+[%]*),[ ]*([+-]*[\d]+[%]*)\)/g,function(e,n,r){var i,a,o,l;return"translate(".concat((a=(i=t.getBBox()).width,o=i.height,[(l=e0([n,r].map(function(t,e){var n;return t.includes("%")?parseFloat((null==(n=t.match(/[+-]?([0-9]*[.])?[0-9]+/))?void 0:n[0])||"0")/100*(0===e?a:o):t}),2))[0],l[1]]),")")});t.attr("transform",n)}catch(t){}}function di(t){if(eq(t))return[t,t,t,t];if(ns(t)){var e=t.length;if(1===e)return[t[0],t[0],t[0],t[0]];if(2===e)return[t[0],t[1],t[0],t[1]];if(3===e)return[t[0],t[1],t[2],t[1]];if(4===e)return t}return[0,0,0,0]}var da=function(){function t(t,e,n,r){this.set(t,e,n,r)}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(t,e,n){var r=this.x1,i=this.y1,a=this.x2,o=this.y2,l=Math.cos(t),s=Math.sin(t),u=e-e*l+n*s,c=n-e*s-n*l;return[[l*r-s*o+u,s*r+l*o+c],[l*a-s*o+u,s*a+l*o+c],[l*r-s*i+u,s*r+l*i+c],[l*a-s*i+u,s*a+l*i+c]]},t.prototype.set=function(t,e,n,r){return n<t?(this.x2=t,this.x1=n):(this.x1=t,this.x2=n),r<e?(this.y2=e,this.y1=r):(this.y1=e,this.y2=r),this},t.prototype.defined=function(t){return this[t]!==Number.MAX_VALUE&&this[t]!==-Number.MAX_VALUE},t}();function dl(t,e){var n=t.getEulerAngles()||0;t.setEulerAngles(0);var r=t.getBounds(),i=e0(r.min,2),a=i[0],o=i[1],l=e0(r.max,2),s=l[0],u=l[1],c=t.getBBox(),f=c.width,h=c.height,d=0,p=0,y=a,g=o,v=dt(t);if(v){h-=1.5;var b=v.style.textAlign,x=v.style.textBaseline;"center"===b?y=(a+s)/2:("right"===b||"end"===b)&&(y=s),"middle"===x?g=(o+u)/2:"bottom"===x&&(g=u)}var O=e0(di(e),4),w=O[0],k=void 0===w?0:w,_=O[1],M=void 0===_?0:_,E=O[2],A=O[3],S=new da((d+=a)-(void 0===A?M:A),(p+=o)-k,d+f+M,p+h+(void 0===E?k:E));return t.setEulerAngles(n),S.rotatedPoints(hE(n),y,g)}function ds(t,e){return e[0]<=Math.max(t[0][0],t[1][0])&&e[0]<=Math.min(t[0][0],t[1][0])&&e[1]<=Math.max(t[0][1],t[1][1])&&e[1]<=Math.min(t[0][1],t[1][1])}function du(t,e,n){var r=(e[1]-t[1])*(n[0]-e[0])-(e[0]-t[0])*(n[1]-e[1]);return 0===r?0:r<0?2:1}function dc(t,e,n){var r,i,a=e.crossPadding,o=new Set,l=null,s=function(t,e){var n=t.type,r=t.labelDirection,i=t.crossSize;if(!i)return!1;if("arc"===n){var a=t.center,o=t.radius,l=e0(a,2),s=l[0],u=l[1],c="negative"===r?0:i,f=-o-c,h=o+c,d=e0(di(e),4),p=d[0],y=d[1],g=d[2];return new da(s+f-d[3],u+f-p,s+h+y,u+h+g)}var v=e0(t.startPos,2),b=v[0],x=v[1],O=e0(t.endPos,2),w=O[0],k=O[1],_=e0(h1(t)?[-e,0,e,0]:[0,e,0,-e],4),M=_[0],E=_[1],A=_[2],S=_[3],j=hb(hK(0,t),i),P=new da(b,x,w,k);return P.x1+=S,P.y1+=M,P.x2+=E+j[0],P.y2+=A+j[1],P}(e,a);try{for(var u=eJ(t),c=u.next();!c.done;c=u.next()){var f,h=c.value;!function(t){if(s){var e,n,r,i,a,o;return e=s.x1,n=s.x2,r=s.y1,i=s.y2,a=dl(t,void 0),o=[[e,r],[n,r],[n,i],[e,i]],a.every(function(t){return function(t,e){var n=t.length;if(n<3)return!1;var r=[e,[9999,e[1]]],i=0,a=0;do{var o=[t[a],t[(a+1)%n]];if(function(t,e){var n=du(t[0],t[1],e[0]),r=du(t[0],t[1],e[1]),i=du(e[0],e[1],t[0]),a=du(e[0],e[1],t[1]);return!!(n!==r&&i!==a||0===n&&ds(t,e[0])||0===r&&ds(t,e[1])||0===i&&ds(e,t[0])||0===a&&ds(e,t[1]))}(o,r)){if(0===du(o[0],e,o[1]))return ds(o,e);i++}a=(a+1)%n}while(0!==a);return!!(1&i)}(o,t)})}return!0}(h)?o.add(h):l&&(f=l,f&&f.firstChild?function(t,e,n){var r,i,a=dl(t,n).flat(1),o=dl(e,n).flat(1),l=[[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 s=eJ(l),u=s.next();!u.done;u=s.next()){var c=u.value;if(function(t,e){return[[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]]].some(function(t){return function(t,e){var n=e0(t,4),r=n[0],i=n[1],a=n[2],o=n[3],l=e0(e,4),s=l[0],u=l[1],c=l[2],f=l[3],h=a-r,d=o-i,p=c-s,y=f-u,g=h*y-p*d;if(0===g)return!1;var v=g>0,b=r-s,x=i-u,O=h*x-d*b;if(O<0===v)return!1;var w=p*x-y*b;return w<0!==v&&O>g!==v&&w>g!==v}(e,t)})}(o,c))return!0}}catch(t){r={error:t}}finally{try{u&&!u.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}return!1}(f.firstChild,h.firstChild,di(n)):0)?(o.add(l),o.add(h)):l=h}}catch(t){r={error:t}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(r)throw r.error}}return Array.from(o)}function df(t,e){return(void 0===e&&(e={}),eY(t))?0:"number"==typeof t?t:Math.floor(h9(t,e))}var dh=function(t){return void 0!==t&&null!=t&&!Number.isNaN(t)};function dd(t){var e=t.getLocalBounds(),n=e0([e.min,e.max],2),r=e0(n[0],2),i=r[0],a=r[1],o=e0(n[1],2),l=o[0],s=o[1];return{x:i,y:a,width:l-i,height:s-a,left:i,bottom:s,top:a,right:l}}function dp(t,e){var n=e0(t,2),r=n[0],i=n[1],a=e0(e,2),o=a[0],l=a[1];return r!==o&&i===l}var dy=function(t,e){var n=e.seq,r=void 0===n?2:n;return t.filter(function(t,e){return!(e%r)||(fV(t),!1)})},dg=new Map([["hide",function(t,e,n,r){var i,a,o=t.length,l=e.keepHeader,s=e.keepTail;if(!(o<=1)&&(2!==o||!l||!s)){var u=function(t){return t.forEach(r.show),t},c=2,f=t.slice(),h=t.slice(),d=Math.min.apply(Math,e1([1],e0(t.map(function(t){return t.getBBox().width})),!1));if("linear"===n.type&&(h0(n)||h1(n))){var p=dd(t[0]).left,y=Math.abs(dd(t[o-1]).right-p)||1;c=Math.max(Math.floor(o*d/y),c)}for(l&&(i=f.splice(0,1)[0]),s&&(a=f.splice(-1,1)[0],f.reverse()),u(f);c<t.length&&dc((a?e1(e1([a],e0(h),!1),[i],!1):e1([i],e0(h),!1)).filter(dh),n,null==e?void 0:e.margin).length;){if(a&&!i&&c%2==0){var g=f.splice(0,1);g.forEach(r.hide)}else if(a&&i){var g=f.splice(0,1);g.forEach(r.hide)}h=dy(u(f),{seq:c}),c++}}}],["rotate",function(t,e,n,r){var i,a,o=e.optionalAngles,l=e.margin,s=e.recoverWhenFailed,u=t.map(function(t){return t.getLocalEulerAngles()}),c=function(e){return t.forEach(function(t,n){var i=Array.isArray(e)?e[n]:e;r.rotate(t,+i)})};try{for(var f=eJ(void 0===o?[0,45,90]:o),h=f.next();!h.done;h=f.next()){var d=h.value;if(c(d),dc(t,n,l).length<1)return}}catch(t){i={error:t}}finally{try{h&&!h.done&&(a=f.return)&&a.call(f)}finally{if(i)throw i.error}}(void 0===s||s)&&c(u)}],["ellipsis",function(t,e,n,r){if(!(t.length<=0)){var i=e.suffix,a=void 0===i?"...":i,o=e.minLength,l=e.maxLength,s=void 0===l?1/0:l,u=e.step,c=e.margin,f=void 0===c?[0,0,0,0]:c,h=h7(r.getTextShape(t[0])),d=df(void 0===u?" ":u,h),p=o?df(o,h):d,y=df(s,h);(eY(y)||y===1/0)&&(y=Math.max.apply(null,t.map(function(t){return t.getBBox().width})));for(var g=t.slice(),v=e0(f,4),b=(v[0],v[1],v[2],v[3],function(e){if(g.forEach(function(t){r.ellipsis(r.getTextShape(t),e,a)}),(g=dc(t,n,f)).length<1)return{value:void 0}}),x=y;x>p+d;x-=d){var O=b(x);if("object"==typeof O)return O.value}}}],["wrap",function(t,e,n,r,i){var a,o,l,s=e.maxLines,u=void 0===s?3:s,c=e.recoverWhenFailed,f=e.margin,h=void 0===f?[0,0,0,0]:f,d=hL(null!=(l=e.wordWrapWidth)?l:50,[i]),p=t.map(function(t){return t.attr("maxLines")||1}),y=Math.min.apply(Math,e1([],e0(p),!1)),g=function(){return dc(t,n,h).length<1},v=(a=n.type,o=n.labelDirection,"linear"===a&&h0(n)?"negative"===o?"bottom":"top":"middle"),b=function(e){return t.forEach(function(t,n){var i=Array.isArray(e)?e[n]:e;r.wrap(t,d,i,v)})};if(!(y>u)){if("linear"===n.type&&h0(n)){if(b(u),g())return}else for(var x=y;x<=u;x++)if(b(x),g())return;(void 0===c||c)&&b(p)}}]]);function dv(t){for(var e=t;e<0;)e+=360;return Math.round(e%360)}function dm(t,e){var n=e0(t,2),r=n[0],i=n[1],a=e0(e,2),o=a[0],l=a[1],s=e0([r*o+i*l,r*l-i*o],2),u=s[0];return Math.atan2(s[1],u)}function db(t,e,n){var r=n.type,i=n.labelAlign,a=hK(t,n),o=dv(e),l=dv(hA(dm([1,0],a))),s="center",u="middle";return"linear"===r?[90,270].includes(l)&&0===o?(s="center",u=1===a[1]?"top":"bottom"):!(l%180)&&[90,270].includes(o)?s="center":0===l?h4(o,0,90,!1,!0)?s="start":(h4(o,0,90)||h4(o,270,360))&&(s="start"):90===l?h4(o,0,90,!1,!0)?s="start":(h4(o,90,180)||h4(o,270,360))&&(s="end"):270===l?h4(o,0,90,!1,!0)?s="end":(h4(o,90,180)||h4(o,270,360))&&(s="start"):180===l&&(90===o?s="start":(h4(o,0,90)||h4(o,270,360))&&(s="end")):"parallel"===i?u=h4(l,0,180,!0)?"top":"bottom":"horizontal"===i?h4(l,90,270,!1)?s="end":(h4(l,270,360,!1)||h4(l,0,90))&&(s="start"):"perpendicular"===i&&(s=h4(l,90,270)?"end":"start"),{textAlign:s,textBaseline:u}}function dx(t,e,n){var r=n.showTick,i=n.tickLength,a=n.tickDirection,o=n.labelDirection,l=n.labelSpacing,s=e.indexOf(t),u=hL(l,[t,s,e]),c=e0([hK(t.value,n),function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.reduce(function(t,e){return t*("positive"===e?-1:1)},1)}(o,a)],2),f=e0(hx(hb(c[0],u+(1===c[1]?hL(r?i:0,[t,s,e]):0)),hJ(t.value,n)),2);return{x:f[0],y:f[1]}}var dO={html:["fill"],text:[]};function dw(t,e){["text","html"].includes(t.nodeName)&&t.attr(hq(e,dO[t.nodeName]))}function dk(t,e){var n,r,i,a;n=this.node().childNodes,r={hide:fV,show:fY,rotate:function(e,n){var r,i,a;r=+n,e.setLocalEulerAngles(r),i=db(e.__data__.value,r,t),(a=e.querySelector(hm.labelItem.class))&&dw(a,i)},ellipsis:function(t,e,n){t&&dn(t,e||1/0,n)},wrap:function(t,e,n){var r,i;t&&(void 0===(r=n)&&(r=2),void 0===i&&(i="top"),de(t,{wordWrap:!0,wordWrapWidth:e,maxLines:r,textBaseline:i}))},getTextShape:function(t){return t.querySelector(hm.labelItem.class)}},(a=void 0===(i=t.labelOverlap)?[]:i).length&&a.forEach(function(i){var a=i.type,o=dg.get(a);t.labelOverlap.length<1||("hide"===a?function(t){for(var e=t;e;){if("offscreen"===e.className)return!0;e=e.parent}return!1}(n[0]):"rotate"===a?n.some(function(t){var e;return!!(null==(e=t.attr("transform"))?void 0:e.includes("rotate"))}):("ellipsis"===a||"wrap"===a)&&!(n.filter(function(t){return t.querySelector("text")}).length>=1))||null==o||o(n,i,t,r,e)})}function d_(t,e,n,r,i){var a,o,l,s,u,c=n.indexOf(e),f=i.labelRender,h=i.classNamePrefix,d=ht(t).append(f?(a=i.labelRender,o=(cr(i,"endPos.0",400)-cr(i,"startPos.0",0))/n.length,s=h6(l=nk(a)?hL(a,[e,c,n,hK(e.value,i)]):e.label||"")||30,function(){var t;return t={width:o,height:s},"function"==typeof l?l():eV(l)||eq(l)?new lO({style:eZ(eZ({pointerEvents:"auto"},t),{innerHTML:l})}):l}):nk(u=i.labelFormatter)?function(){return hW(hL(u,[e,c,n,hK(e.value,i)]))}:function(){return hW(e.label||"")}).attr("className",hm.labelItem.name).node();hQ(ht(d),hm.labelItem,hy,h);var p=e0(hN(hH(r,[e,c,n])),2),y=p[0],g=p[1],v=g.transform,b=eQ(g,["transform"]);dr(d,v);var x=function(t,e,n){var r,i,a=n.labelAlign;if(null==(i=e.style.transform)?void 0:i.includes("rotate"))return e.getLocalEulerAngles();var o=0,l=hK(t.value,n),s=hU(t.value,n);return"horizontal"===a?0:(h4(r=(hA(o="perpendicular"===a?dm([1,0],l):dm([s[0]<0?-1:1,0],s))+360)%180,-90,90)||(r+=180),r)}(e,d,i);if(d.getLocalEulerAngles()||d.setLocalEulerAngles(x),dw(d,eZ(eZ({},db(e.value,x,i)),y)),"html"===d.nodeName){var O=d.getBBox(),w=d.style.x||0;d.attr("x",w-O.width/2)}return t.attr(b),d}function dM(t,e){return hX(t,e.tickDirection,e)}function dE(t,e,n,r,i,a){var o,l,s,u,c,f,h,d,p,y,g,v,b,x,O,w,k,_,M,E,A,S,j=(o=ht(this),l=r.tickFormatter,s=r.classNamePrefix,u=dM(t.value,r),c="line",nk(l)&&(c=function(){return hL(l,[t,e,n,u])}),hQ(f=o.append(c).attr("className",hm.tickItem.name),hm.tickItem,hd,s),f);h=dM(t.value,r),w=(y=e0((d=hL(r.tickLength,[t,e,n]),[[0,0],[(p=e0(h,2))[0]*d,p[1]*d]]),2),v=(g=e0(y[0],2))[0],b=g[1],O={x1:v,x2:(x=e0(y[1],2))[0],y1:b,y2:x[1]}).x1,k=O.x2,_=O.y1,M=O.y2,A=(E=e0(hN(hH(i,[t,e,n,h])),2))[0],S=E[1],"line"===j.node().nodeName&&j.styles(eZ({x1:w,x2:k,y1:_,y2:M},A)),this.attr(S),j.styles(A);var P=e0(hJ(t.value,r),2),T=P[0],C=P[1];return fJ(this,{transform:"translate(".concat(T,", ").concat(C,")")},a)}function dA(t){return/\S+-\S+/g.test(t)?t.split("-").map(function(t){return t[0]}):t.length>2?[t[0]]:t.split("")}function dS(t,e,n,r,i){var a=e0(hN(hT(r,"title")),2),o=a[0],l=a[1],s=l.transform,u=l.transformOrigin,c=eQ(l,["transform","transformOrigin"]);e.styles(c);var f=s||function(t,e,n){var r=2*t.getGeometryBounds().halfExtents[1];if("vertical"===e){if("left"===n)return"rotate(-90) translate(0, ".concat(r/2,")");if("right"===n)return"rotate(-90) translate(0, -".concat(r/2,")")}return""}(t.node(),o.direction,o.position);t.styles(eZ(eZ({},o),{transformOrigin:u})),dr(t.node(),f);var h=function(t,e,n){var r=n.titlePosition,i=void 0===r?"lb":r,a=n.titleSpacing,o=dA(i),l=t.node().getLocalBounds(),s=e0(l.min,2),u=s[0],c=s[1],f=e0(l.halfExtents,2),h=f[0],d=f[1],p=e0(e.node().getLocalBounds().halfExtents,2),y=p[0],g=p[1],v=e0([u+h,c+d],2),b=v[0],x=v[1],O=e0(di(a),4),w=O[0],k=O[1],_=O[2],M=O[3];if(["start","end"].includes(i)&&"linear"===n.type){var E=n.startPos,A=n.endPos,S=e0("start"===i?[E,A]:[A,E],2),j=S[0],P=S[1],T=e0(hb(hM([-P[0]+j[0],-P[1]+j[1]]),w),2),C=T[0],N=T[1];return{x:j[0]+C,y:j[1]+N}}return o.includes("t")&&(x-=d+g+w),o.includes("r")&&(b+=h+y+k),o.includes("l")&&(b-=h+y+M),o.includes("b")&&(x+=d+g+_),{x:b,y:x}}(ht(n._offscreen||n.querySelector(hm.mainGroup.class)),e,r),d=h.x,p=h.y;return fJ(e.node(),{transform:"translate(".concat(d,", ").concat(p,")")},i)}function dj(t,e,n,r){var i=t.showLine,a=t.showTick,o=t.showLabel,l=t.classNamePrefix,s=e.maybeAppendByClassName(hm.lineGroup,"g");hQ(s,hm.lineGroup,hi,l);var u=f6(i,s,function(e){return function(t,e,n){var r,i,a,o,l,s,u,c=e.type,f=hT(e,"line");return"linear"===c?u=function(t,e,n,r){var i,a,o,l,s,u,c,f,h,d,p,y,g,v,b,x,O,w,k=e.showTrunc,_=e.startPos,M=e.endPos,E=e.truncRange,A=e.lineExtension,S=e.classNamePrefix,j=e0([_,M],2),P=e0(j[0],2),T=P[0],C=P[1],N=e0(j[1],2),L=N[0],I=N[1],R=e0(A?(void 0===(i=A)&&(i=[0,0]),a=e0([_,M,i],3),l=(o=e0(a[0],2))[0],s=o[1],c=(u=e0(a[1],2))[0],f=u[1],d=(h=e0(a[2],2))[0],p=h[1],g=(y=e0([c-l,f-s],2))[0],[(O=(x=e0([-d/(b=Math.sqrt(Math.pow(g,2)+Math.pow(v=y[1],2))),p/b],2))[0])*g,O*v,(w=x[1])*g,w*v]):[,,,,].fill(0),4),D=R[0],B=R[1],F=R[2],z=R[3],$=function(e){return t.selectAll(hm.line.class).data(e,function(t,e){return e}).join(function(t){var e=t.append("line").styles(n).transition(function(t){return fJ(this,h5(t.line),!1)});return e.attr("className",function(t){if(!S)return"".concat(hm.line.name," ").concat(t.className);var e=hZ(hm.line.name,hu,S);if(t.className===hm.lineFirst.name){var n=hZ(hm.lineFirst.name,hc,S);return"".concat(e," ").concat(n)}if(t.className===hm.lineSecond.name){var n=hZ(hm.lineSecond.name,hf,S);return"".concat(e," ").concat(n)}return e}),e},function(t){return t.styles(n).transition(function(t){return fJ(this,h5(t.line),r.update)})},function(t){return t.remove()}).transitions()};if(!k||!E)return $([{line:[[T+D,C+B],[L+F,I+z]],className:hm.line.name}]);var W=e0(E,2),G=W[0],q=W[1],H=L-T,Y=I-C,V=e0([T+H*G,C+Y*G],2),U=V[0],X=V[1],K=e0([T+H*q,C+Y*q],2),Z=K[0],Q=K[1],J=$([{line:[[T+D,C+B],[U,X]],className:hm.lineFirst.name},{line:[[Z,Q],[L+F,I+z]],className:hm.lineSecond.name}]);return e.truncRange,e.truncShape,e.lineExtension,J}(t,e,hq(f,"arrow"),n):(r=hq(f,"arrow"),i=e.startAngle,a=e.endAngle,o=e.center,l=e.radius,s=e.classNamePrefix,u=t.selectAll(hm.line.class).data([{d:h2.apply(void 0,e1(e1([i,a],e0(o),!1),[l],!1))}],function(t,e){return e}).join(function(t){var n=t.append("path").attr("className",hm.line.name).styles(e).styles({d:function(t){return t.d}});return hQ(n,hm.line,hu,s),n},function(t){return t.transition(function(){var t,e,r,s,u,c=this,f=function(t,e,n,r){if(!r)return t.attr("__keyframe_data__",n),null;var i=r.duration,a=function t(e,n){var r,i,a,o,l,s;return"number"==typeof e&&"number"==typeof n?function(t){return e*(1-t)+n*t}:Array.isArray(e)&&Array.isArray(n)?(r=n?n.length:0,i=e?Math.min(r,e.length):0,function(a){var o=Array(i),l=Array(r),s=0;for(s=0;s<i;++s)o[s]=t(e[s],n[s]);for(;s<r;++s)l[s]=n[s];for(s=0;s<i;++s)l[s]=o[s](a);return l}):"object"==typeof e&&"object"==typeof n?(void 0===(a=e)&&(a={}),void 0===(o=n)&&(o={}),l={},s={},Object.entries(o).forEach(function(e){var n=e0(e,2),r=n[0],i=n[1];r in a?l[r]=t(a[r],i):s[r]=i}),function(t){return Object.entries(l).forEach(function(e){var n=e0(e,2),r=n[0],i=n[1];return s[r]=i(t)}),s}):function(t){return e}}(e,n),o=Array(Math.ceil((void 0===i?0:i)/16)).fill(0).map(function(t,e,n){return{__keyframe_data__:a(e/(n.length-1))}});return t.animate(o,eZ({fill:"both"},r))}(this,(e=(t=this.attributes).startAngle,r=t.endAngle,s=t.center,u=t.radius,e1(e1([e,r],e0(s),!1),[u],!1)),e1(e1([i,a],e0(o),!1),[l],!1),n.update);if(f){var h=function(){var t=cr(c.attributes,"__keyframe_data__");c.style.d=h2.apply(void 0,e1([],e0(t),!1))};f.onframe=h,f.onfinish=h}return f}).styles(e)},function(t){return t.remove()}).styles(r).transitions()),!function(t,e,n,r){var i,a,o=n.showArrow,l=n.showTrunc,s=n.lineArrow,u=n.lineArrowOffset,c=n.lineArrowSize;if(a="arc"===e?t.select(hm.line.class):l?t.select(hm.lineSecond.class):t.select(hm.line.class),!o||!s||"arc"===n.type&&(i=n.startAngle,n.endAngle-i==360)){var f=a.node();f&&(f.style.markerEnd=void 0);return}var h=hW(s);h.attr(r),hG(h,c,!0),a.style("markerEnd",h).style("markerEndOffset",-u)}(t,c,e,f),u}(e,t,r)})||[],c=e.maybeAppendByClassName(hm.tickGroup,"g");hQ(c,hm.tickGroup,ha,l);var f=f6(a,c,function(e){var i,a,o;return i=t.classNamePrefix,a=hY(n,t.tickFilter),o=hT(t,"tick"),e.selectAll(hm.tick.class).data(a,function(t){return t.id||t.label}).join(function(e){var n=e.append("g").attr("className",hm.tick.name).transition(function(e,n){return dE.call(this,e,n,a,t,o,!1)});return hQ(n,hm.tick,hh,i),n},function(e){return e.transition(function(e,n){return this.removeChildren(),dE.call(this,e,n,a,t,o,r.update)})},function(t){return t.transition(function(){var t=this,e=hI(this.childNodes[0],r.exit);return fK(e,function(){return t.remove()}),e})}).transitions()})||[],h=e.maybeAppendByClassName(hm.labelGroup,"g");hQ(h,hm.labelGroup,ho,l);var d=f6(o,h,function(i){var a,o,l,s,u,c,f,h;return a=e.node(),l=t.classNamePrefix,s=hY(n,t.labelFilter),u=hT(t,"label"),f=c=i.selectAll(hm.label.class).data(s,function(t,e){return e}).join(function(e){var r=e.append("g").attr("className",hm.label.name).transition(function(e){d_(this,e,n,u,t);var r=dx(e,n,t),i=r.x,a=r.y;return this.style.transform="translate(".concat(i,", ").concat(a,")"),null});return hQ(r,hm.label,hp,l),r},function(e){return e.transition(function(e){var i=function(t,e,n,r){if(void 0===r&&(r="destroy"),"text"===t.nodeName&&"text"===e.nodeName&&t.attributes.text===e.attributes.text&&1)return t.remove(),[null];var i=function(){"destroy"===r?t.destroy():"hide"===r&&fV(t),e.isVisible()&&fY(e)};if(!n)return i(),[null];var a=n.duration,o=void 0===a?0:a,l=n.delay,s=void 0===l?0:l,u=Math.ceil(o/2),c=o/4,f=e0(t.getGeometryBounds().center,2),h=f[0],d=f[1],p=e0(e.getGeometryBounds().center,2),y=e0([(h+p[0])/2-h,(d+p[1])/2-d],2),g=y[0],v=y[1],b=t.style.opacity,x=e.style.opacity,O=t.style.transform||"",w=e.style.transform||"",k=t.animate([{opacity:void 0===b?1:b,transform:"translate(0, 0) ".concat(O)},{opacity:0,transform:"translate(".concat(g,", ").concat(v,") ").concat(O)}],eZ(eZ({fill:"both"},n),{duration:s+u+c})),_=e.animate([{opacity:0,transform:"translate(".concat(-g,", ").concat(-v,") ").concat(w),offset:.01},{opacity:void 0===x?1:x,transform:"translate(0, 0) ".concat(w)}],eZ(eZ({fill:"both"},n),{duration:u+c,delay:s+u-c}));return fK(_,i),[k,_]}(this.querySelector(hm.labelItem.class),d_(this,e,n,u,t),r.update),a=dx(e,n,t),o=a.x,l=a.y,s=fJ(this,{transform:"translate(".concat(o,", ").concat(l,")")},r.update);return e1(e1([],e0(i),!1),[s],!1)})},function(t){return o=t,t.transition(function(){var t=this,e=hI(this.childNodes[0],r.exit);return fK(e,function(){return ht(t).remove()}),e}),o}).transitions(),h=function(){dk.call(i,t,a)},0===f.length?h():Promise.all(f.map(function(t){return null==t?void 0:t.finished})).then(h),c})||[];return e1(e1(e1([],e0(u),!1),e0(f),!1),e0(d),!1).filter(function(t){return!!t})}var dP=function(t){function e(e){return t.call(this,e,hv)||this}return eK(e,t),e.prototype.render=function(t,e,n){var r=this,i=t.titleText,a=t.data,o=t.animate,l=t.showTitle,s=t.showGrid,u=t.dataThreshold,c=t.truncRange,f=t.classNamePrefix,h=e.className||"axis";f?e.attr("className","".concat(h," ").concat(f,"axis")):e.className||e.attr("className","axis");var d=(function(t,e){if(t.length<=e)return t;for(var n=Math.floor(t.length/e),r=[],i=0;i<t.length;i+=n)r.push(t[i]);return r})(a,u).filter(function(t){var e=t.value;return!c||!(e>c[0])||!(e<c[1])}),p=fX(void 0===n?o:n),y=ht(e).maybeAppendByClassName(hm.gridGroup,"g");hQ(y,hm.gridGroup,hn,f);var g=f6(s,y,function(e){var n,r,i,a,o,l,s,u,c;return n=t.classNamePrefix,i=(r=hT(t,"grid")).type,a=r.areaFill,o=h3(t),l=hY(d,t.gridFilter),u="segment"===i?(s=t.gridLength,l.map(function(e,n){var r=e.value,i=e0(hJ(r,t),2),a=i[0],o=i[1],l=e0(hb(hX(r,t.gridDirection,t),s),2);return{id:n,points:[[a,o],[a+l[0],o+l[1]]]}})):function(t,e){var n=e.gridControlAngles,r=h3(e);if(!r)throw Error("grid center is not provide");if(t.length<2)throw Error("Invalid grid data");if(!n||0===n.length)throw Error("Invalid gridControlAngles");var i=e0(r,2),a=i[0],o=i[1];return t.map(function(t,r){var i=e0(hJ(t.value,e),2),l=e0([i[0]-a,i[1]-o],2),s=l[0],u=l[1],c=[];return n.forEach(function(t){var e=hE(t),n=e0([Math.cos(e),Math.sin(e)],2),r=n[0],i=n[1];c.push([s*r-u*i+a,s*i+u*r+o])}),{points:c,id:r}})}(l,t),c=eZ(eZ({},r),{center:o,areaFill:nk(a)?l.map(function(t,e){return hL(a,[t,e,l])}):a,animate:p,data:u}),e.selectAll(hm.grid.class).data([1]).join(function(t){var e=t.append(function(){return new h$({style:c})}).attr("className",hm.grid.name);return hQ(e,hm.grid,hs,n),e},function(t){return t.transition(function(){return this.update(c)})},function(t){return t.remove()}).transitions()})||[],v=ht(e).maybeAppendByClassName(hm.mainGroup,"g");hQ(v,hm.mainGroup,hr,f),i&&(!this.initialized&&p.enter||this.initialized&&p.update)&&dj(t,ht(this.offscreenGroup),d,fX(!1));var b=dj(t,ht(v.node()),d,p),x=ht(e).maybeAppendByClassName(hm.titleGroup,"g");hQ(x,hm.titleGroup,hl,f);var O=f6(l,x,function(e){var n,i;return n=t.titleText,i=t.classNamePrefix,e.selectAll(hm.title.class).data([{title:n}].filter(function(t){return!!t.title}),function(t,e){return t.title}).join(function(a){var o=a.append(function(){return hW(n)}).attr("className",hm.title.name).transition(function(){return dS(ht(this),e,r,t,p.enter)});return hQ(o,hm.title,hg,i),o},function(n){return n.transition(function(){return dS(ht(this),e,r,t,p.update)})},function(t){return t.remove()}).transitions()})||[];return e1(e1(e1([],e0(g),!1),e0(b),!1),e0(O),!1).flat().filter(function(t){return!!t})},e}(f4);function dT(t){if(fk(t))return t[t.length-1]}let dC=function(t){return t};function dN(t,e){return e-t?n=>(n-t)/(e-t):t=>.5}function dL(t,...e){return e.reduce((t,e)=>n=>t(e(n)),t)}function dI(t,e,n,r,i){let a=n||0,o=r||t.length,l=i||(t=>t);for(;a<o;){let n=Math.floor((a+o)/2);l(t[n])>e?o=n:a=n+1}return a}var dR=n(5411),dD=n.n(dR);function dB(t,e,n){let r=n;return(r<0&&(r+=1),r>1&&(r-=1),r<1/6)?t+(e-t)*6*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function dF(t){let e=dD().get(t);if(!e)return null;let{model:n,value:r}=e;return"rgb"===n?r:"hsl"===n?function(t){let e=t[0]/360,n=t[1]/100,r=t[2]/100,i=t[3];if(0===n)return[255*r,255*r,255*r,i];let a=r<.5?r*(1+n):r+n-r*n,o=2*r-a;return[255*dB(o,a,e+1/3),255*dB(o,a,e),255*dB(o,a,e-1/3),i]}(r):null}let dz=(t,e)=>n=>t*(1-n)+e*n,d$=(t,e)=>{if("number"==typeof t&&"number"==typeof e)return dz(t,e);if("string"==typeof t&&"string"==typeof e){let n,r;return n=dF(t),r=dF(e),null===n||null===r?n?()=>t:()=>e:t=>{let e=[,,,,];for(let i=0;i<4;i+=1){let a=n[i],o=r[i];e[i]=a*(1-t)+o*t}let[i,a,o,l]=e;return`rgba(${Math.round(i)}, ${Math.round(a)}, ${Math.round(o)}, ${l})`}}return()=>t},dW=(t,e)=>{let n=dz(t,e);return t=>Math.round(n(t))};function dG(t){return!nb(t)&&null!==t&&!Number.isNaN(t)}let dq=(t,e,n=5)=>{let r,i=[t,e],a=0,o=i.length-1,l=i[a],s=i[o];return s<l&&([l,s]=[s,l],[a,o]=[o,a]),(r=cT(l,s,n))>0?r=cT(l=Math.floor(l/r)*r,s=Math.ceil(s/r)*r,n):r<0&&(r=cT(l=Math.ceil(l*r)/r,s=Math.floor(s*r)/r,n)),r>0?(i[a]=Math.floor(l/r)*r,i[o]=Math.ceil(s/r)*r):r<0&&(i[a]=Math.ceil(l*r)/r,i[o]=Math.floor(s*r)/r),i},dH=(t,e,n,r)=>(Math.min(t.length,e.length)>2?(t,e,n)=>{let r=Math.min(t.length,e.length)-1,i=Array(r),a=Array(r),o=t[0]>t[r],l=o?[...t].reverse():t,s=o?[...e].reverse():e;for(let t=0;t<r;t+=1)i[t]=dN(l[t],l[t+1]),a[t]=n(s[t],s[t+1]);return e=>{let n=dI(t,e,1,r)-1,o=i[n];return dL(a[n],o)(e)}}:(t,e,n)=>{let r,i,[a,o]=t,[l,s]=e;return a<o?(r=dN(a,o),i=n(l,s)):(r=dN(o,a),i=n(s,l)),dL(i,r)})(t,e,r?dW:n);class dY extends cO{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:dz,tickCount:5}}map(t){return dG(t)?this.output(t):this.options.unknown}invert(t){return dG(t)?this.input(t):this.options.unknown}nice(){if(!this.options.nice||ns(this.options.breaks))return;let[t,e,n,...r]=this.getTickMethodOptions();this.options.domain=this.chooseNice()(t,e,n,...r)}getTicks(){let{tickMethod:t}=this.options,[e,n,r,...i]=this.getTickMethodOptions();return t(e,n,r,...i)}getTickMethodOptions(){let{domain:t,tickCount:e}=this.options;return[t[0],t[t.length-1],e]}chooseNice(){return dq}rescale(){this.nice();let[t,e]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t)),this.composeInput(t,e,this.chooseClamp(e))}chooseClamp(t){var e,n;let r,i,{clamp:a,range:o}=this.options,l=this.options.domain.map(t),s=Math.min(l.length,o.length);return a?(e=l[0],r=(n=l[s-1])<e?n:e,i=e>n?e:n,t=>Math.min(Math.max(r,t),i)):dC}composeOutput(t,e){let{domain:n,range:r,round:i,interpolate:a}=this.options,o=dH(n.map(t),r,a,i);this.output=dL(o,e,t)}composeInput(t,e,n){let{domain:r,range:i}=this.options,a=dH(i,r.map(t),dz);this.input=dL(e,n,a)}}class dV extends dY{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:d$,tickMethod:cN,tickCount:5}}removeUnsortedValues(t,e,n){let r=-1/0;return e.reduce((t,i,a)=>{if(0===a)return t;let o=r>0?r:i;return r>0&&(n?i>r:i<r)?t.push(a):(o-e[a-1])*(n?-1:1)<0?(r<0&&(r=e[a-1]),t.push(a)):r=-1/0,t},[]).slice().reverse().forEach(n=>{t.splice(n,1),e.splice(n,1)}),{breaksDomain:t,breaksRange:e}}transformDomain(t){let e=.03,{domain:n=[],range:r=[1,0],breaks:i=[],tickCount:a=5,nice:o}=t,[l,s]=[Math.min(...n),Math.max(...n)],u=l,c=s;if(o&&i.length<2){let t=this.chooseNice()(l,s,a);u=t[0],c=t[t.length-1]}let f=Math.min(u,l),h=Math.max(c,s),d=i.filter(({end:t})=>t<h).sort((t,e)=>t.start-e.start),p=cN(f,h,a,d);if(dT(p)<h){let t=dq(0,h-dT(p),3);p.push(dT(p)+dT(t)),h=dT(p)}let[y,g]=[r[0],dT(r)],v=h-f,b=Math.abs(g-y),x=y>g,O=p.map(t=>{let e=(t-f)/v;return x?y-e*b:y+e*b}),[w,k]=[.2,.8];return d.forEach(({start:t,end:n,gap:r=e,compress:i="middle"})=>{let a=p.indexOf(t),o=p.indexOf(n),l=(O[a]+O[o])/2;"start"===i&&(l=O[a]),"end"===i&&(l=O[o]);let s=r*b/2,u=x?l+s:l-s,c=x?l-s:l+s;u<w&&(c+=w-u,u=w),c>k&&(u-=c-k,c=k),u>k&&(c-=u-k,u=k),c<w&&(u+=w-c,c=w),O[a]=u,O[o]=c}),this.removeUnsortedValues(p,O,x)}transformBreaks(t){let{domain:e,breaks:n=[]}=t;if(!ns(t.breaks))return t;let r=Math.max(...e),i=n.filter(({end:t})=>t<r),a={...t,breaks:i},{breaksDomain:o,breaksRange:l}=this.transformDomain(a);return{...t,domain:o,range:l,breaks:i,tickMethod:()=>[...o]}}chooseTransforms(){return[dC,dC]}clone(){return new dV(this.options)}}let dU=function(t,e){if(t){if(ns(t))for(var n,r=0,i=t.length;r<i&&!1!==e(t[r],r);r++);else if(n_(t)){for(var a in t)if(t.hasOwnProperty(a)&&!1===e(t[a],a))break}}},dX=function(t,e,n){if(!ns(t)&&!cp(t))return t;var r=n;return dU(t,function(t,n){r=e(r,t,n)}),r},dK=function(t,e){return dX(t,function(t,n,r){return e.includes(r)||(t[r]=n),t},{})};function dZ(t,e){let n,r;if(void 0===e)for(let e of t)null!=e&&(void 0===n?e>=e&&(n=r=e):(n>e&&(n=e),r<e&&(r=e)));else{let i=-1;for(let a of t)null!=(a=e(a,++i,t))&&(void 0===n?a>=a&&(n=r=a):(n>a&&(n=a),r<a&&(r=a)))}return[n,r]}var dQ=function(){function t(t,e,n,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===r&&(r=0),this.x=0,this.y=0,this.width=0,this.height=0,this.x=t,this.y=e,this.width=n,this.height=r}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(e){return new t(e.x,e.y,e.width,e.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(t,e){return t>=this.left&&t<=this.right&&e>=this.top&&e<=this.bottom},t}();function dJ(t){for(var e=1/0,n=1/0,r=-1/0,i=-1/0,a=0;a<t.length;a++){var o=t[a],l=o.x,s=o.y,u=e0([l+o.width,s+o.height],2),c=u[0],f=u[1];l<e&&(e=l),s<n&&(n=s),c>r&&(r=c),f>i&&(i=f)}return new dQ(e,n,r-e,i-n)}var d0=function(t,e,n){var r=t.width,i=t.height,a=n.flexDirection,o=void 0===a?"row":a,l=(n.flexWrap,n.justifyContent),s=void 0===l?"flex-start":l,u=(n.alignContent,n.alignItems),c=void 0===u?"flex-start":u,f="row"===o,h="row"===o||"column"===o,d=f?h?[1,0]:[-1,0]:h?[0,1]:[0,-1],p=e0([0,0],2),y=p[0],g=p[1],v=e.map(function(t){var e,n=t.width,r=t.height,i=e0([y,g],2),a=i[0],o=i[1];return y=(e=e0([y+n*d[0],g+r*d[1]],2))[0],g=e[1],new dQ(a,o,n,r)}),b=dJ(v),x={"flex-start":0,"flex-end":f?r-b.width:i-b.height,center:f?(r-b.width)/2:(i-b.height)/2},O=v.map(function(t){var e=t.x,n=t.y,r=dQ.fromRect(t);return r.x=f?e+x[s]:e,r.y=f?n:n+x[s],r});dJ(O);var w=function(t){var e=e0(f?["height",i]:["width",r],2),n=e[0],a=e[1];switch(c){case"flex-start":default:return 0;case"flex-end":return a-t[n];case"center":return a/2-t[n]/2}};return O.map(function(t){var e=t.x,n=t.y,r=dQ.fromRect(t);return r.x=f?e:e+w(r),r.y=f?n+w(r):n,r}).map(function(e){var n,r,i=dQ.fromRect(e);return i.x+=null!=(n=t.x)?n:0,i.y+=null!=(r=t.y)?r:0,i})},d1=function(t,e,n){return[]};let d2=function(t,e,n){if(0===e.length)return[];var r={flex:d0,grid:d1},i=n.display in r?r[n.display]:null;return(null==i?void 0:i.call(null,t,e,n))||[]};var d5=function(t){function e(e){var n=t.call(this,e)||this;n.layoutEvents=[oR.BOUNDS_CHANGED,oR.INSERTED,oR.REMOVED],n.$margin=di(0),n.$padding=di(0);var r=e.style||{},i=r.margin,a=r.padding;return n.margin=void 0===i?0:i,n.padding=void 0===a?0:a,n.isMutationObserved=!0,n.bindEvents(),n}return eK(e,t),Object.defineProperty(e.prototype,"margin",{get:function(){return this.$margin},set:function(t){this.$margin=di(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"padding",{get:function(){return this.$padding},set:function(t){this.$padding=di(t)},enumerable:!1,configurable:!0}),e.prototype.getBBox=function(){var t=this.attributes,e=t.x,n=t.y,r=t.width,i=t.height,a=e0(this.$margin,4),o=a[0],l=a[1],s=a[2],u=a[3];return new dQ((void 0===e?0:e)-u,(void 0===n?0:n)-o,r+u+l,i+o+s)},e.prototype.appendChild=function(e,n){return e.isMutationObserved=!0,t.prototype.appendChild.call(this,e,n),e},e.prototype.getAvailableSpace=function(){var t=this.attributes,e=t.width,n=t.height,r=e0(this.$padding,4),i=r[0],a=r[1],o=r[2],l=r[3],s=e0(this.$margin,4),u=s[0];return new dQ(l+s[3],i+u,e-l-a,n-i-o)},e.prototype.layout=function(){if(this.attributes.display&&this.isConnected&&!this.children.some(function(t){return!t.isConnected}))try{var t=this.attributes,e=t.x,n=t.y;this.style.transform="translate(".concat(e,", ").concat(n,")");var r=d2(this.getAvailableSpace(),this.children.map(function(t){return t.getBBox()}),this.attributes);this.children.forEach(function(t,e){var n=r[e],i=n.x,a=n.y;t.style.transform="translate(".concat(i,", ").concat(a,")")})}catch(t){}},e.prototype.bindEvents=function(){var t=this;this.layoutEvents.forEach(function(e){t.addEventListener(e,function(e){e.target&&(e.target.isMutationObserved=!0,t.layout())})})},e.prototype.attributeChangedCallback=function(t,e,n){"margin"===t?this.margin=n:"padding"===t&&(this.padding=n),this.layout()},e}(lb),d3=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function d4(t,e,n){return t.querySelector(e)?cX(t).select(e):cX(t).append(n)}function d6(t){return Array.isArray(t)?t.join(", "):`${t||""}`}function d8(t,e){let{flexDirection:n,justifyContent:r,alignItems:i}={display:"flex",flexDirection:"row",justifyContent:"flex-start",alignItems:"center"},a={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 a&&([n,r,i]=a[t]),Object.assign({display:"flex",flexDirection:n,justifyContent:r,alignItems:i},e)}class d9 extends d5{get child(){var t;return null==(t=this.children)?void 0:t[0]}update(t){var e;this.attr(t);let{subOptions:n}=t;null==(e=this.child)||e.update(n)}}class d7 extends d9{update(t){var e;let{subOptions:n}=t;this.attr(t),null==(e=this.child)||e.update(n)}}function pt(t,e){var n;return null==(n=t.filter(t=>t.getOptions().name===e))?void 0:n[0]}function pe(t,e,n){let{bbox:r}=t,{position:i="top",size:a,length:o}=e,l=["top","bottom","center"].includes(i),[s,u]=l?[r.height,r.width]:[r.width,r.height],{defaultSize:c,defaultLength:f}=n.props,h=a||c||s,d=o||f||u,[p,y]=l?[d,h]:[h,d];return{orientation:l?"horizontal":"vertical",width:p,height:y,size:h,length:d}}function pn(t){let e=["arrow","crosshairs","grid","handle","handleLabel","indicator","label","line","tick","tip","title","trunc"],{style:n}=t,r=d3(t,["style"]),i={};return Object.entries(r).forEach(([t,n])=>{e.includes(t)?i[`show${fu(t)}`]=n:i[t]=n}),Object.assign(Object.assign({},i),n)}var pr=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function pi(t,e){let{eulerAngles:n,origin:r}=e;r&&t.setOrigin(r),n&&t.rotate(n[0],n[1],n[2])}function pa(t){let{innerWidth:e,innerHeight:n,depth:r}=t.getOptions();return[e,n,r]}function po(t,e,n,r,i,a,o,l){var s;(void 0!==n||void 0!==a)&&t.update(Object.assign(Object.assign({},n&&{tickCount:n}),a&&{tickMethod:a}));let u=function(t,e,n){if(t.getTicks)return t.getTicks();if(!n)return e;let[r,i]=dZ(e,t=>+t),{tickCount:a}=t.getOptions();return n(r,i,a)}(t,e,a),c=i?u.filter(i):u,f=t=>t instanceof Date?String(t):"object"==typeof t&&t?t:String(t),h=r||(null==(s=t.getFormatter)?void 0:s.call(t))||f,d=function(t,e){if(fB(e))return t=>t;let{innerWidth:n,innerHeight:r,insetTop:i,insetBottom:a,insetLeft:o,insetRight:l}=e.getOptions(),[s,u,c]="left"===t||"right"===t?[i,a,r]:[o,l,n],f=new dV({domain:[0,1],range:[s/c,1-u/c]});return t=>f.map(t)}(o,l),p=function(t,e){let{width:n,height:r}=e.getOptions();return i=>{if(!fW(e))return i;let a=e.map("bottom"===t?[i,1]:[0,i]);if("bottom"===t){let t=a[0];return new dV({domain:[0,n],range:[0,1]}).map(t)}if("left"===t){let t=a[1];return new dV({domain:[0,r],range:[0,1]}).map(t)}return i}}(o,l),y=t=>["left","right"].includes(t);return fB(l)||fD(l)?c.map((e,n,r)=>{var i,a;let s=(null==(i=t.getBandWidth)?void 0:i.call(t,e))/2||0,u=d(t.map(e)+s);return{value:fF(l)&&"center"===o||fD(l)&&(null==(a=t.getTicks)?void 0:a.call(t))&&["top","bottom","center","outer"].includes(o)||fD(l)&&y(o)?1-u:u,label:f(h(fC(e),n,r)),id:String(n)}}):c.map((e,n,r)=>{var i;let a=(null==(i=t.getBandWidth)?void 0:i.call(t,e))/2||0,l=p(d(t.map(e)+a));return{value:y(o)?1-l:l,label:f(h(fC(e),n,r)),id:String(n)}})}let pl=t=>e=>{let{labelFormatter:n,labelFilter:r=()=>!0}=e;return i=>{var a;let{scales:[o]}=i,l=(null==(a=o.getTicks)?void 0:a.call(o))||o.getOptions().domain,s="string"==typeof n?Ex(n):n;return t(Object.assign(Object.assign({},e),{labelFormatter:s,labelFilter:(t,e,n)=>r(l[e],e,l),scale:o}))(i)}},ps=pl(t=>{let{direction:e="left",important:n={},labelFormatter:r,order:i,orientation:a,actualPosition:o,position:l,size:s,style:u={},title:c,tickCount:f,tickFilter:h,tickMethod:d,tickLength:p,transform:y,indexBBox:g}=t,v=pr(t,["direction","important","labelFormatter","order","orientation","actualPosition","position","size","style","title","tickCount","tickFilter","tickMethod","tickLength","transform","indexBBox"]);return({scales:i,value:b,coordinate:x,theme:O})=>{var w;let{bbox:k}=b,[_]=i,{domain:M,xScale:E}=_.getOptions(),A=Object.assign(Object.assign(Object.assign({},function(t,e,n,r,i){let a,o,l,s=(a=e.axis,o=["top","right","bottom","left"].includes(r)?e[`axis${cF(r)}`]:e.axisLinear,l=t.getOptions().name,Object.assign({},a,o,e[`axis${fu(l)}`]||{}));return"center"===r?Object.assign(Object.assign(Object.assign(Object.assign({},s),{labelDirection:"right"===n?"negative":"positive"}),"center"===n?{labelTransform:"translate(50%,0)"}:null),{tickDirection:"right"===n?"negative":"positive",labelSpacing:4*("center"!==n),titleSpacing:10*("vertical"===i||i===-Math.PI/2),tick:"center"!==n&&void 0}):s}(_,O,e,l,a)),u),v),S=function(t,e,n="xy"){let[r,i,a]=pa(e);return"xy"===n?t.includes("bottom")||t.includes("top")?i:r:"xz"===n?t.includes("bottom")||t.includes("top")?a:r:t.includes("bottom")||t.includes("top")?i:a}(o||l,x,t.plane),j=function(t,e,n,r,i){let{x:a,y:o,width:l,height:s}=n;if("bottom"===t)return{startPos:[a,o],endPos:[a+l,o]};if("left"===t)return{startPos:[a+l,o+s],endPos:[a+l,o]};if("right"===t)return{startPos:[a,o+s],endPos:[a,o]};if("top"===t)return{startPos:[a,o+s],endPos:[a+l,o+s]};if("center"===t){if("vertical"===e)return{startPos:[a,o],endPos:[a,o+s]};else if("horizontal"===e)return{startPos:[a,o],endPos:[a+l,o]};else if("number"==typeof e){let[t,n]=r.getCenter(),[u,c]=fq(r),[f,h]=fH(r),d=Math.min(l,s)/2,{insetLeft:p,insetTop:y}=r.getOptions(),g=u*d,v=c*d,[b,x]=[t+a-p,n+o-y],[O,w]=[Math.cos(e),Math.sin(e)],k=fB(r)&&i?(()=>{let{domain:t}=i.getOptions();return t.length})():3;return{startPos:[b+v*O,x+v*w],endPos:[b+g*O,x+g*w],gridClosed:1e-6>Math.abs(h-f-360),gridCenter:[b,x],gridControlAngles:Array(k).fill(0).map((t,e,n)=>(h-f)/k*e)}}}return{}}(l,a,k,x,E),P=function(t){let{depth:e}=t.getOptions();return e?{tickIsBillboard:!0,lineIsBillboard:!0,labelIsBillboard:!0,titleIsBillboard:!0,gridIsBillboard:!0}:{}}(x),T=po(_,M,f,r,h,d,l,x),C=g?T.map((t,e)=>{let n=g.get(e);return n&&n[0]===t.label?Object.assign(Object.assign({},t),{bbox:n[1]}):t}):T,N=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},A),{type:"linear",data:C,crossSize:s,titleText:d6(c),labelOverlap:function(t=[],e){if(t.length>0)return t;let{labelAutoRotate:n,labelAutoHide:r,labelAutoEllipsis:i,labelAutoWrap:a}=e,o=[],l=(t,e)=>{e&&o.push(Object.assign(Object.assign({},t),e))};return l({type:"rotate",optionalAngles:[0,15,30,45,60,90]},n),l({type:"ellipsis",minLength:20},i),l({type:"hide"},r),l({type:"wrap",wordWrapWidth:100,maxLines:3,recoveryWhenFail:!0},a),o}(y,A),grid:(w=A.grid,!(fB(x)&&fD(x)||f$(x))&&(void 0===w?!!_.getTicks:w)),gridLength:S,line:!0,indexBBox:g,classNamePrefix:"g2-"}),void 0!==p?{tickLength:p}:null),A.line?null:{lineOpacity:0}),j),P),n);return N.labelOverlap.find(t=>"hide"===t.type)&&(N.crossSize=!1),new dP({className:"axis",style:pn(N)})}}),pu=pl(t=>{let{order:e,size:n,position:r,orientation:i,labelFormatter:a,tickFilter:o,tickCount:l,tickMethod:s,tickLength:u,important:c={},style:f={},indexBBox:h,title:d,grid:p=!1}=t,y=pr(t,["order","size","position","orientation","labelFormatter","tickFilter","tickCount","tickMethod","tickLength","important","style","indexBBox","title","grid"]);return({scales:[t],value:e,coordinate:n,theme:i})=>{let{bbox:f}=e,{domain:g}=t.getOptions(),v=po(t,g,l,a,o,s,r,n),b=h?v.map((t,e)=>{let n=h.get(e);return n&&n[0]===t.label?Object.assign(Object.assign({},t),{bbox:n[1]}):t}):v,[x,O]=fq(n),w=function(t,e,n,r,i){let{x:a,y:o,width:l,height:s}=e,u=[a+l/2,o+s/2],c=Math.min(l,s)/2,[f,h]=fH(i),[d,p]=pa(i),y={center:u,radius:c,startAngle:f,endAngle:h,gridLength:Math.min(d,p)/2*(r-n)};if("inner"===t){let{insetLeft:t,insetTop:e}=i.getOptions();return Object.assign(Object.assign({},y),{center:[u[0]-t,u[1]-e],labelAlign:"perpendicular",labelDirection:"positive",tickDirection:"positive",gridDirection:"negative"})}return Object.assign(Object.assign({},y),{labelAlign:"parallel",labelDirection:"negative",tickDirection:"negative",gridDirection:"positive"})}(r,f,x,O,n),{axis:k,axisArc:_={}}=i,M=pn(cy({},k,_,w,Object.assign(Object.assign(Object.assign({type:"arc",data:b,titleText:d6(d),grid:p,classNamePrefix:"g2-"},void 0!==u?{tickLength:u}:null),y),c)));return new dP({style:dK(M,["transform"])})}});ps.props={defaultPosition:"center",defaultSize:45,defaultOrder:0,defaultCrossPadding:[12,12],defaultPadding:[12,12]},pu.props={defaultPosition:"outer",defaultOrientation:"vertical",defaultSize:45,defaultOrder:0,defaultCrossPadding:[12,12],defaultPadding:[12,12]};var pc=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let pf=t=>{let{important:e={}}=t,n=pc(t,["important"]);return r=>{let i,{theme:a,coordinate:o,scales:l}=r;return ps(Object.assign(Object.assign(Object.assign({},n),(i=t.orientation%(2*Math.PI))==Math.PI/2?{titleTransform:"translate(0, 50%)"}:i>-Math.PI/2&&i<Math.PI/2?{titleTransform:"translate(50%, 0)"}:i>Math.PI/2&&i<3*Math.PI/2?{titleTransform:"translate(-50%, 0)"}:{}),{important:Object.assign(Object.assign({},function(t,e,n,r){let{radar:i}=t,[a]=r,o=a.getOptions().name,[l,s]=fH(n),{axisRadar:u={}}=e;return Object.assign(Object.assign({},u),{grid:"position"===o,gridConnect:"line",gridControlAngles:Array(i.count).fill(0).map((t,e)=>(s-l)/i.count*e)})}(t,a,o,l)),e)}))(r)}};pf.props=Object.assign(Object.assign({},ps.props),{defaultPosition:"center"});class ph{constructor(t){this.options=cy({},this.getDefaultOptions()),this.update(t)}getOptions(){return this.options}update(t={}){this.options=cy({},this.options,t),this.rescale(t)}rescale(t){}}function pd(t,e){return e-t?n=>(n-t)/(e-t):t=>.5}function pp(t,...e){return e.reduce((t,e)=>n=>t(e(n)),t)}function py(t,e,n){let r=n;return(r<0&&(r+=1),r>1&&(r-=1),r<1/6)?t+(e-t)*6*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function pg(t){let e=dD().get(t);if(!e)return null;let{model:n,value:r}=e;return"rgb"===n?r:"hsl"===n?function(t){let e=t[0]/360,n=t[1]/100,r=t[2]/100,i=t[3];if(0===n)return[255*r,255*r,255*r,i];let a=r<.5?r*(1+n):r+n-r*n,o=2*r-a;return[255*py(o,a,e+1/3),255*py(o,a,e),255*py(o,a,e-1/3),i]}(r):null}let pv=(t,e)=>n=>t*(1-n)+e*n,pm=(t,e)=>{if("number"==typeof t&&"number"==typeof e)return pv(t,e);if("string"==typeof t&&"string"==typeof e){let n,r;return n=pg(t),r=pg(e),null===n||null===r?n?()=>t:()=>e:t=>{let e=[,,,,];for(let i=0;i<4;i+=1){let a=n[i],o=r[i];e[i]=a*(1-t)+o*t}let[i,a,o,l]=e;return`rgba(${Math.round(i)}, ${Math.round(a)}, ${Math.round(o)}, ${l})`}}return()=>t},pb=(t,e)=>{let n=pv(t,e);return t=>Math.round(n(t))};function px(t){return!nb(t)&&null!==t&&!Number.isNaN(t)}let pO=Math.sqrt(50),pw=Math.sqrt(10),pk=Math.sqrt(2);function p_(t,e,n){let r=(e-t)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),a=r/10**i;return i>=0?(a>=pO?10:a>=pw?5:a>=pk?2:1)*10**i:-(10**-i)/(a>=pO?10:a>=pw?5:a>=pk?2:1)}let pM=(t,e,n=5)=>{let r,i=[t,e],a=0,o=i.length-1,l=i[a],s=i[o];return s<l&&([l,s]=[s,l],[a,o]=[o,a]),(r=p_(l,s,n))>0?r=p_(l=Math.floor(l/r)*r,s=Math.ceil(s/r)*r,n):r<0&&(r=p_(l=Math.ceil(l*r)/r,s=Math.floor(s*r)/r,n)),r>0?(i[a]=Math.floor(l/r)*r,i[o]=Math.ceil(s/r)*r):r<0&&(i[a]=Math.ceil(l*r)/r,i[o]=Math.floor(s*r)/r),i},pE=(t,e,n,r)=>(Math.min(t.length,e.length)>2?(t,e,n)=>{let r=Math.min(t.length,e.length)-1,i=Array(r),a=Array(r),o=t[0]>t[r],l=o?[...t].reverse():t,s=o?[...e].reverse():e;for(let t=0;t<r;t+=1)i[t]=pd(l[t],l[t+1]),a[t]=n(s[t],s[t+1]);return e=>{let n=function(t,e,n){let r=1,i=n||t.length,a=t=>t;for(;r<i;){let n=Math.floor((r+i)/2);a(t[n])>e?i=n:r=n+1}return r}(t,e,r)-1,o=i[n];return pp(a[n],o)(e)}}:(t,e,n)=>{let r,i,[a,o]=t,[l,s]=e;return a<o?(r=pd(a,o),i=n(l,s)):(r=pd(o,a),i=n(s,l)),pp(i,r)})(t,e,r?pb:n);class pA extends ph{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:pv,tickCount:5}}map(t){return px(t)?this.output(t):this.options.unknown}invert(t){return px(t)?this.input(t):this.options.unknown}nice(){if(!this.options.nice)return;let[t,e,n,...r]=this.getTickMethodOptions();this.options.domain=this.chooseNice()(t,e,n,...r)}getTicks(){let{tickMethod:t}=this.options,[e,n,r,...i]=this.getTickMethodOptions();return t(e,n,r,...i)}getTickMethodOptions(){let{domain:t,tickCount:e}=this.options;return[t[0],t[t.length-1],e]}chooseNice(){return pM}rescale(){this.nice();let[t,e]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t)),this.composeInput(t,e,this.chooseClamp(e))}chooseClamp(t){var e,n;let r,i,{clamp:a,range:o}=this.options,l=this.options.domain.map(t),s=Math.min(l.length,o.length);return a?(e=l[0],r=(n=l[s-1])<e?n:e,i=e>n?e:n,t=>Math.min(Math.max(r,t),i)):dC}composeOutput(t,e){let{domain:n,range:r,round:i,interpolate:a}=this.options,o=pE(n.map(t),r,a,i);this.output=pp(o,e,t)}composeInput(t,e,n){let{domain:r,range:i}=this.options,a=pE(i,r.map(t),pv);this.input=pp(e,n,a)}}let pS=(t,e,n)=>{let r,i,a=t,o=e;if(a===o&&n>0)return[a];let l=p_(a,o,n);if(0===l||!Number.isFinite(l))return[];if(l>0){a=Math.ceil(a/l),i=Array(r=Math.ceil((o=Math.floor(o/l))-a+1));for(let t=0;t<r;t+=1)i[t]=(a+t)*l}else{a=Math.ceil(a*(l=-l)),i=Array(r=Math.ceil((o=Math.floor(o*l))-a+1));for(let t=0;t<r;t+=1)i[t]=(a+t)/l}return i};class pj extends pA{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:pm,tickMethod:pS,tickCount:5}}chooseTransforms(){return[dC,dC]}clone(){return new pj(this.options)}}function pP(t,e){return+t.toPrecision(e)}function pT(t){var e=t.canvas,n=t.touches,r=t.offsetX,i=t.offsetY;if(e)return[e.x,e.y];if(n){var a=n[0];return[a.clientX,a.clientY]}return r&&i?[r,i]:[0,0]}function pC(t){var e=t.nativeEvent,n=t.touches,r=t.clientX,i=t.clientY;if(e)return[e.clientX,e.clientY];if(n){var a=n[0];return[a.clientX,a.clientY]}return"number"==typeof r&&"number"==typeof i?[r,i]:[0,0]}var pN={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},pL=he({background:"background",labelGroup:"label-group",label:"label"},"indicator"),pI=function(t){function e(e){var n=t.call(this,e,pN)||this;return n.point=[0,0],n.group=n.appendChild(new lb({})),n.isMutationObserved=!0,n}return eK(e,t),e.prototype.renderBackground=function(){if(this.label){var t=this.attributes,e=t.position,n=e0(di(t.padding),4),r=n[0],i=n[1],a=n[2],o=n[3],l=this.label.node().getLocalBounds(),s=l.min,u=l.max,c=new dQ(s[0]-o,s[1]-r,u[0]+i-s[0]+o,u[1]+a-s[1]+r),f=this.getPath(e,c),h=hT(this.attributes,"background");this.background=ht(this.group).maybeAppendByClassName(pL.background,"path").styles(eZ(eZ({},h),{d:f})),this.group.appendChild(this.label.node())}},e.prototype.renderLabel=function(){var t=this.attributes,e=t.formatter,n=t.labelText,r=e0(hN(hT(this.attributes,"label")),2),i=r[0],a=r[1],o=(i.text,eQ(i,["text"]));this.label=ht(this.group).maybeAppendByClassName(pL.labelGroup,"g").styles(a),n&&this.label.maybeAppendByClassName(pL.label,function(){return hW(e(n))}).style("text",e(n).toString()).selectAll("text").styles(o)},e.prototype.adjustLayout=function(){var t=e0(this.point,2),e=t[0],n=t[1],r=this.attributes,i=r.x,a=r.y;this.group.attr("transform","translate(".concat(i-e,", ").concat(a-n,")"))},e.prototype.getPath=function(t,e){var n=this.attributes.radius,r=e.x,i=e.y,a=e.width,o=e.height,l=[["M",r+n,i],["L",r+a-n,i],["A",n,n,0,0,1,r+a,i+n],["L",r+a,i+o-n],["A",n,n,0,0,1,r+a-n,i+o],["L",r+n,i+o],["A",n,n,0,0,1,r,i+o-n],["L",r,i+n],["A",n,n,0,0,1,r+n,i],["Z"]],s={top:4,right:6,bottom:0,left:2}[t],u=this.createCorner([l[s].slice(-2),l[s+1].slice(-2)]);return l.splice.apply(l,e1([s+1,1],e0(u),!1)),l[0][0]="M",l},e.prototype.createCorner=function(t,e){void 0===e&&(e=10);var n=dp.apply(void 0,e1([],e0(t),!1)),r=e0(t,2),i=e0(r[0],2),a=i[0],o=i[1],l=e0(r[1],2),s=l[0],u=l[1],c=e0(n?[s-a,[a,s]]:[u-o,[o,u]],2),f=c[0],h=e0(c[1],2),d=h[0],p=h[1],y=f/2,g=f/Math.abs(f)*e,v=g/2,b=g*Math.sqrt(3)/2*.8,x=e0([d,d+y-v,d+y,d+y+v,p],5),O=x[0],w=x[1],k=x[2],_=x[3],M=x[4];return n?(this.point=[k,o-b],[["L",O,o],["L",w,o],["L",k,o-b],["L",_,o],["L",M,o]]):(this.point=[a+b,k],[["L",a,O],["L",a,w],["L",a+b,k],["L",a,_],["L",a,M]])},e.prototype.applyVisibility=function(){"hidden"===this.attributes.visibility?fV(this):fY(this)},e.prototype.bindEvents=function(){this.label.on(oR.BOUNDS_CHANGED,this.renderBackground)},e.prototype.render=function(){this.renderLabel(),this.renderBackground(),this.adjustLayout(),this.applyVisibility()},e}(f4),pR={fill:"#fff",lineWidth:1,radius:2,size:10,stroke:"#bfbfbf",strokeOpacity:1,zIndex:0},pD={fill:"#000",fillOpacity:.45,fontSize:12,textAlign:"center",textBaseline:"middle",zIndex:1},pB={x:0,y:0,orientation:"horizontal",showLabel:!0,type:"start"},pF=he({foreground:"foreground",handle:"handle",selection:"selection",sparkline:"sparkline",sparklineGroup:"sparkline-group",track:"track",brushArea:"brush-area"},"slider"),pz=he({labelGroup:"label-group",label:"label",iconGroup:"icon-group",icon:"icon",iconRect:"icon-rect",iconLine:"icon-line"},"handle"),p$=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return eK(e,t),e.prototype.render=function(t,e){var n=t.x,r=t.y,i=t.size,a=void 0===i?10:i,o=t.radius,l=t.orientation,s=t.classNamePrefix,u=eQ(t,["x","y","size","radius","orientation","classNamePrefix"]),c=2.4*a,f=s?"".concat(pz.iconRect.name," ").concat(s,"handle-icon-rect"):pz.iconRect.name,h=function(t){return s?"".concat(pz.iconLine,"-").concat(t," ").concat(s,"handle-icon-line"):"".concat(pz.iconLine,"-").concat(t)},d=ht(e).maybeAppendByClassName(pz.iconRect,"rect").attr("className",f).styles(eZ(eZ({},u),{width:a,height:c,radius:void 0===o?a/4:o,x:n-a/2,y:r-c/2,transformOrigin:"center"})),p=n+1/3*a-a/2,y=n+2/3*a-a/2,g=r+1/4*c-c/2,v=r+3/4*c-c/2;d.maybeAppendByClassName("".concat(pz.iconLine,"-1"),"line").attr("className",h(1)).styles(eZ({x1:p,x2:p,y1:g,y2:v},u)),d.maybeAppendByClassName("".concat(pz.iconLine,"-2"),"line").attr("className",h(2)).styles(eZ({x1:y,x2:y,y1:g,y2:v},u)),"vertical"===l&&(d.node().style.transform="rotate(90)")},e}(f4),pW=function(t){function e(e){return t.call(this,e,pB)||this}return eK(e,t),e.prototype.renderLabel=function(t){var e=this,n=this.attributes,r=n.x,i=n.y,a=n.showLabel,o=hT(this.attributes,"label"),l=o.x,s=void 0===l?0:l,u=o.y,c=void 0===u?0:u,f=o.transform,h=o.transformOrigin,d=e0(hN(eQ(o,["x","y","transform","transformOrigin"]),[]),2),p=d[0],y=d[1],g=ht(t).maybeAppendByClassName(pz.labelGroup,"g").styles(y),v=eZ(eZ({},pD),p),b=v.text,x=eQ(v,["text"]);f6(!!a,g,function(t){e.label=t.maybeAppendByClassName(pz.label,"text").styles(eZ(eZ({},x),{x:r+s,y:i+c,transform:f,transformOrigin:h,text:"".concat(b)})),e.label.on("mousedown",function(t){t.stopPropagation()}),e.label.on("touchstart",function(t){t.stopPropagation()})})},e.prototype.renderIcon=function(t){var e=this.attributes,n=e.x,r=e.y,i=e.orientation,a=e.type,o=e.classNamePrefix,l=eZ(eZ({x:n,y:r,orientation:i,classNamePrefix:o},pR),hT(this.attributes,"icon")),s=this.attributes.iconShape,u=void 0===s?function(){return new p$({style:l})}:s;ht(t).maybeAppendByClassName(pz.iconGroup,"g").selectAll(pz.icon.class).data([u]).join(function(t){return t.append("string"==typeof u?u:function(){return u(a)}).attr("className",pz.icon.name)},function(t){return t.update(l)},function(t){return t.remove()})},e.prototype.render=function(t,e){this.renderIcon(e),this.renderLabel(e)},e}(f4);function pG(t,e,n){return n?"".concat(t," ").concat(n,"legend-").concat(e):t}var pq="marker",pH="handle-marker",pY="handle-label",pV=he({text:"text"},"title");function pU(t,e){var n=Object.entries(e).reduce(function(e,n){var r=e0(n,2),i=r[0],a=r[1];return t.node().attr(i)||(e[i]=a),e},{});t.styles(n)}var pX=function(t){function e(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 eK(e,t),e.prototype.getAvailableSpace=function(){var t=this.attributes,e=t.width,n=t.height,r=t.position,i=t.spacing,a=t.inset,o=this.querySelector(pV.text.class);if(!o)return new dQ(0,0,+e,+n);var l=o.getBBox(),s=l.width,u=l.height,c=e0(di(i),4),f=c[0],h=c[1],d=c[2],p=c[3],y=e0([0,0,+e,+n],4),g=y[0],v=y[1],b=y[2],x=y[3],O=dA(r);if(O.includes("i"))return new dQ(g,v,b,x);O.forEach(function(t,r){var i,a;"t"===t&&(v=(i=e0(0===r?[u+d,n-u-d]:[0,+n],2))[0],x=i[1]),"r"===t&&(b=e0([e-s-p],1)[0]),"b"===t&&(x=e0([n-u-f],1)[0]),"l"===t&&(g=(a=e0(0===r?[s+h,e-s-h]:[0,+e],2))[0],b=a[1])});var w=e0(di(a),4),k=w[0],_=w[1],M=w[2],E=w[3],A=e0([E+_,k+M],2),S=A[0],j=A[1];return new dQ(g+E,v+k,b-S,x-j)},e.prototype.getBBox=function(){return this.title?this.title.getBBox():new dQ(0,0,0,0)},e.prototype.render=function(t,e){var n,r,i,a,o,l,s,u,c,f,h,d,p,y,g=this;t.width,t.height,t.position,t.spacing;var v=t.classNamePrefix,b=eQ(t,["width","height","position","spacing","classNamePrefix"]),x=e0(hN(b),1)[0],O=(o=t.width,l=t.height,s=t.position,u=e0([o/2,l/2],2),f=(c=e0([+u[0],+u[1],"center","middle"],4))[0],h=c[1],d=c[2],p=c[3],(y=dA(s)).includes("l")&&(f=(n=e0([0,"start"],2))[0],d=n[1]),y.includes("r")&&(f=(r=e0([+o,"end"],2))[0],d=r[1]),y.includes("t")&&(h=(i=e0([0,"top"],2))[0],p=i[1]),y.includes("b")&&(h=(a=e0([+l,"bottom"],2))[0],p=a[1]),{x:f,y:h,textAlign:d,textBaseline:p}),w=O.x,k=O.y,_=O.textAlign,M=O.textBaseline;f6(!!b.text,ht(e),function(t){var e=pG(pV.text.name,"title",v);g.title=t.maybeAppendByClassName(pV.text,"text").attr("className",e).styles(x).call(pU,{x:w,y:k,textAlign:_,textBaseline:M}).node()})},e}(f4),pK=function(t,e,n){return[["M",t-n,e],["A",n,n,0,1,0,t+n,e],["A",n,n,0,1,0,t-n,e],["Z"]]},pZ=function(t,e,n){return[["M",t,e+n],["L",t,e-n]]},pQ=function(t,e,n){return[["M",t-n,e],["L",t+n,e]]},pJ=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return eK(e,t),e.prototype.render=function(t,n){var r,i=t.x,a=void 0===i?0:i,o=t.y,l=void 0===o?0:o,s=this.getSubShapeStyle(t),u=s.symbol,c=s.size,f=void 0===c?16:c,h=eQ(s,["symbol","size"]),d=["base64","url","image"].includes(r=function(t){var e="default";if(n_(t)&&t instanceof Image)e="image";else if(nk(t))e="symbol";else if(eV(t)){var n=RegExp("data:(image|text)");e=t.match(n)?"base64":/^(https?:\/\/(([a-zA-Z0-9]+-?)+[a-zA-Z0-9]+\.)+[a-zA-Z]+)(:\d+)?(\/.*)?(\?.*)?(#.*)?$/.test(t)?"url":"symbol"}return e}(u))?"image":u&&"symbol"===r?"path":null;f6(!!d,ht(n),function(t){t.maybeAppendByClassName("marker",d).attr("className","marker ".concat(d,"-marker")).call(function(t){if("image"===d){var n=2*f;t.styles({img:u,width:n,height:n,x:a-f,y:l-f})}else{var n=f/2,r=nk(u)?u:e.getSymbol(u);t.styles(eZ({d:null==r?void 0:r(a,l,n)},h))}})})},e.MARKER_SYMBOL_MAP=new Map,e.registerSymbol=function(t,n){e.MARKER_SYMBOL_MAP.set(t,n)},e.getSymbol=function(t){return e.MARKER_SYMBOL_MAP.get(t)},e.getSymbols=function(){return Array.from(e.MARKER_SYMBOL_MAP.keys())},e}(f4);function p0(t,e,n){return void 0===t&&(t="horizontal"),"horizontal"===t?e:n}pJ.registerSymbol("cross",function(t,e,n){return[["M",t-n,e-n],["L",t+n,e+n],["M",t+n,e-n],["L",t-n,e+n]]}),pJ.registerSymbol("hyphen",function(t,e,n){return[["M",t-n,e],["L",t+n,e]]}),pJ.registerSymbol("line",pZ),pJ.registerSymbol("plus",function(t,e,n){return[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]]}),pJ.registerSymbol("tick",function(t,e,n){return[["M",t-n/2,e-n],["L",t+n/2,e-n],["M",t,e-n],["L",t,e+n],["M",t-n/2,e+n],["L",t+n/2,e+n]]}),pJ.registerSymbol("circle",pK),pJ.registerSymbol("point",pK),pJ.registerSymbol("bowtie",function(t,e,n){var r=n-1.5;return[["M",t-n,e-r],["L",t+n,e+r],["L",t+n,e-r],["L",t-n,e+r],["Z"]]}),pJ.registerSymbol("hexagon",function(t,e,n){var r=n/2*Math.sqrt(3);return[["M",t,e-n],["L",t+r,e-n/2],["L",t+r,e+n/2],["L",t,e+n],["L",t-r,e+n/2],["L",t-r,e-n/2],["Z"]]}),pJ.registerSymbol("square",function(t,e,n){return[["M",t-n,e-n],["L",t+n,e-n],["L",t+n,e+n],["L",t-n,e+n],["Z"]]}),pJ.registerSymbol("diamond",function(t,e,n){return[["M",t-n,e],["L",t,e-n],["L",t+n,e],["L",t,e+n],["Z"]]}),pJ.registerSymbol("triangle",function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e+r],["L",t,e-r],["L",t+n,e+r],["Z"]]}),pJ.registerSymbol("triangle-down",function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e-r],["L",t+n,e-r],["L",t,e+r],["Z"]]}),pJ.registerSymbol("line",pZ),pJ.registerSymbol("dot",pQ),pJ.registerSymbol("dash",pQ),pJ.registerSymbol("smooth",function(t,e,n){return[["M",t-n,e],["A",n/2,n/2,0,1,1,t,e],["A",n/2,n/2,0,1,0,t+n,e]]}),pJ.registerSymbol("hv",function(t,e,n){return[["M",t-n-1,e-2.5],["L",t,e-2.5],["L",t,e+2.5],["L",t+n+1,e+2.5]]}),pJ.registerSymbol("vh",function(t,e,n){return[["M",t-n-1,e+2.5],["L",t,e+2.5],["L",t,e-2.5],["L",t+n+1,e-2.5]]}),pJ.registerSymbol("hvh",function(t,e,n){return[["M",t-(n+1),e+2.5],["L",t-n/2,e+2.5],["L",t-n/2,e-2.5],["L",t+n/2,e-2.5],["L",t+n/2,e+2.5],["L",t+n+1,e+2.5]]}),pJ.registerSymbol("vhv",function(t,e){return[["M",t-5,e+2.5],["L",t-5,e],["L",t,e],["L",t,e-3],["L",t,e+3],["L",t+6.5,e+3]]}),pJ.registerSymbol("focus",function(t,e,n){var r=.2*n,i=.7*n;return[["M",t-n,e],["A",n,n,0,1,0,t+n,e],["A",n,n,0,1,0,t-n,e],["Z"],["M",t-i,e],["L",t-r,e],["M",t+r,e],["L",t+i,e],["M",t,e-i],["L",t,e-r],["M",t,e+r],["L",t,e+i]]}),pJ.registerSymbol("hiddenHandle",function(t,e,n){var r=1.4*n;return[["M",t-n,e-r],["L",t+n,e-r],["L",t+n,e+r],["L",t-n,e+r],["Z"]]}),pJ.registerSymbol("verticalHandle",function(t,e,n){var r=1.4*n,i=n/2,a=n/6,o=t+.4*r;return[["M",t,e],["L",o,e+i],["L",t+r,e+i],["L",t+r,e-i],["L",o,e-i],["Z"],["M",o,e+a],["L",t+r-2,e+a],["M",o,e-a],["L",t+r-2,e-a]]}),pJ.registerSymbol("horizontalHandle",function(t,e,n){var r=1.4*n,i=n/2,a=n/6,o=e+.4*r;return[["M",t,e],["L",t-i,o],["L",t-i,e+r],["L",t+i,e+r],["L",t+i,o],["Z"],["M",t-a,o],["L",t-a,e+r-2],["M",t+a,o],["L",t+a,e+r-2]]});var p1=he({markerGroup:"marker-group",marker:"marker",labelGroup:"label-group",label:"label"},"handle"),p2={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},p5=function(t){function e(e){return t.call(this,e,p2)||this}return eK(e,t),e.prototype.render=function(t,e){var n=ht(e).maybeAppendByClassName(p1.markerGroup,"g");this.renderMarker(n);var r=ht(e).maybeAppendByClassName(p1.labelGroup,"g");this.renderLabel(r)},e.prototype.renderMarker=function(t){var e=this,n=this.attributes,r=n.orientation,i=n.classNamePrefix,a=n.markerSymbol,o=void 0===a?p0(r,"horizontalHandle","verticalHandle"):a;f6(!!o,t,function(t){var n=hT(e.attributes,"marker"),r=eZ({symbol:o},n),a=pG(p1.marker.name,pH,i);if(e.marker=t.maybeAppendByClassName(p1.marker,function(){return new pJ({style:r,className:a})}).update(r),i){var l=e.marker.node().querySelector(".marker");if(l){var s=pG((l.getAttribute("class")||"").split(" ")[0],pH,i);l.setAttribute("class",s)}}})},e.prototype.renderLabel=function(t){var e=this,n=this.attributes,r=n.showLabel,i=n.orientation,a=n.spacing,o=void 0===a?0:a,l=n.formatter,s=n.classNamePrefix;f6(r,t,function(t){var n,r=hT(e.attributes,"label"),a=r.text,u=eQ(r,["text"]),c=(null==(n=t.select(p1.marker.class))?void 0:n.node().getBBox())||{},f=c.width,h=c.height,d=e0(p0(i,[0,(void 0===h?0:h)+o,"center","top"],[(void 0===f?0:f)+o,0,"start","middle"]),4),p=d[0],y=d[1],g=d[2],v=d[3],b=pG(p1.label.name,pY,s);t.maybeAppendByClassName(p1.label,"text").attr("className",b).styles(eZ(eZ({},u),{x:p,y:y,text:l(a).toString(),textAlign:g,textBaseline:v}))})},e}(f4),p3={showTitle:!0,padding:0,orientation:"horizontal",backgroundFill:"transparent",titleText:"",titleSpacing:4,titlePosition:"top-left",titleFill:"#2C3542",titleFontWeight:"bold",titleFontFamily:"sans-serif",titleFontSize:12},p4=f1({},p3,{}),p6=f1({},p3,hC(p2,"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"}),p8=he({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");function p9(t,e){var n=e0(function(t,e){for(var n=1;n<t.length;n+=1){var r=t[n-1],i=t[n];if(e>=r&&e<=i)return[r,i]}return[e,e]}(t,e),2),r=n[0],i=n[1];return{tick:e>(r+i)/2?i:r,range:[r,i]}}var p7=he({trackGroup:"background-group",track:"background",selectionGroup:"ribbon-group",selection:"ribbon",clipPath:"clip-path"},"ribbon");function yt(t){var e=t.orientation,n=t.size,r=t.length;return p0(e,[r,n],[n,r])}function ye(t){var e=t.type,n=e0(yt(t),2),r=n[0],i=n[1];return"size"===e?[["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"]]}var yn=function(t){function e(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 eK(e,t),e.prototype.render=function(t,e){var n,r,i,a,o,l,s,u,c,f,h,d;n=ht(e).maybeAppendByClassName(p7.trackGroup,"g"),r=hT(t,"track"),i=t.classNamePrefix,a=pG(p7.track.name,"track",i),n.maybeAppendByClassName(p7.track,"path").attr("className",a).styles(eZ({d:ye(t)},r)),o=ht(e).maybeAppendByClassName(p7.selectionGroup,"g"),s=hT(l=t,"selection"),u=function(t){var e,n,r,i=t.orientation,a=t.color,o=t.block,l=t.partition,s=(r=nk(a)?Array(20).fill(0).map(function(t,e,n){return a(e/(n.length-1))}):a).length,u=r.map(function(t){return iS(t).toString()});return s?1===s?u[0]:o?(e=Array.from(u),Array(n=l.length).fill(0).reduce(function(t,r,i){var a=e[i%e.length];return t+" ".concat(l[i],":").concat(a).concat(i<n-1?" ".concat(l[i+1],":").concat(a):"")},"l(".concat("horizontal"===i?"0":"270",")"))):u.reduce(function(t,e,n){return t+" ".concat(n/(s-1),":").concat(e)},"l(".concat(p0(i,"0","270"),")")):""}(l),c=l.classNamePrefix,f=pG(p7.selection.name,"selection",c),d=(h=o.maybeAppendByClassName(p7.selection,"path").attr("className",f).styles(eZ({d:ye(l),fill:u},s))).maybeAppendByClassName(p7.clipPath,"path").styles({d:function(t){var e=t.orientation,n=t.range;if(!n)return[];var r=e0(yt(t),2),i=r[0],a=r[1],o=e0(n,2),l=o[0],s=o[1],u=p0(e,l*i,0),c=p0(e,0,l*a),f=p0(e,s*i,i),h=p0(e,a,s*a);return[["M",u,c],["L",u,h],["L",f,h],["L",f,c],["Z"]]}(l)}).node(),h.style("clipPath",d)},e}(f4),yr=function(t){function e(e){var n=t.call(this,e,p6)||this;return n.eventToOffsetScale=new pj({}),n.innerRibbonScale=new pj({}),n.cacheLabelBBox=null,n.cacheHandleBBox=null,n.onHovering=function(t){var e=n.attributes,r=e.data,i=e.block;t.stopPropagation();var a=n.getValueByCanvasPoint(t);if(i){var o=p9(r.map(function(t){return t.value}),a).range,l=n.getRealSelection(o);n.showIndicator((o[0]+o[1])/2,"".concat(l[0],"-").concat(l[1])),n.dispatchIndicated(a,o)}else{var s=n.getTickValue(a);n.showIndicator(s,"".concat(n.getRealValue(s))),n.dispatchIndicated(s)}},n.onDragStart=function(t){return function(e){e.stopPropagation(),n.attributes.slidable&&(n.target=t,n.prevValue=n.getTickValue(n.getValueByCanvasPoint(e)),document.addEventListener("mousemove",n.onDragging),document.addEventListener("touchmove",n.onDragging),document.addEventListener("mouseleave",n.onDragEnd),document.addEventListener("mouseup",n.onDragEnd),document.addEventListener("mouseup",n.onDragEnd),document.addEventListener("touchend",n.onDragEnd))}},n.onDragging=function(t){var e=n.target;n.updateMouse();var r=e0(n.selection,2),i=r[0],a=r[1],o=n.getTickValue(n.getValueByCanvasPoint(t)),l=o-n.prevValue;"start"===e?i!==o&&n.updateSelection(o,a):"end"===e?a!==o&&n.updateSelection(i,o):"ribbon"===e&&0!==l&&(n.prevValue=o,n.updateSelection(l,l,!0))},n.onDragEnd=function(){n.style.cursor="pointer",document.removeEventListener("mousemove",n.onDragging),document.removeEventListener("touchmove",n.onDragging),document.removeEventListener("mouseup",n.onDragEnd),document.removeEventListener("touchend",n.onDragEnd)},n}return eK(e,t),Object.defineProperty(e.prototype,"handleOffsetRatio",{get:function(){return this.ifHorizontal(.5,.5)},enumerable:!1,configurable:!0}),e.prototype.getBBox=function(){var t=this.attributes;return new dQ(0,0,t.width,t.height)},e.prototype.render=function(t,e){var n=this,r=t.classNamePrefix,i=e.className||"legend-continuous";r?e.attr("className","".concat(i," ").concat(r,"legend")):e.className||e.attr("className","legend-continuous");var a=t.showLabel;this.renderTitle(ht(e));var o=this.availableSpace,l=o.x,s=o.y,u=ht(e).maybeAppendByClassName(p8.contentGroup,"g").styles({transform:"translate(".concat(l,", ").concat(s,")")});f6(!!a,u.maybeAppendByClassName(p8.labelGroup,"g").styles({zIndex:1}),function(t){n.renderLabel(t)});var c=u.maybeAppendByClassName(p8.ribbonGroup,"g").styles({zIndex:0});this.handlesGroup=u.maybeAppendByClassName(p8.handlesGroup,"g").styles({zIndex:2}),this.renderHandles(),this.renderRibbon(c),this.renderIndicator(u),this.adjustLabel(),this.adjustHandles()},Object.defineProperty(e.prototype,"range",{get:function(){var t=this.attributes,e=t.data,n=t.domain;return n?{min:n[0],max:n[1]}:{min:Math.min.apply(Math,e1([],e0(e.map(function(t){return t.value})),!1)),max:Math.max.apply(Math,e1([],e0(e.map(function(t){return t.value})),!1))}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ribbonScale",{get:function(){var t=this.range,e=t.min,n=t.max;return this.innerRibbonScale.update({domain:[e,n],range:[0,1]}),this.innerRibbonScale},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ribbonRange",{get:function(){var t=e0(this.selection,2),e=t[0],n=t[1],r=this.ribbonScale;return[r.map(e),r.map(n)]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"selection",{get:function(){var t=this.range,e=t.min,n=t.max,r=this.attributes.defaultValue,i=e0(void 0===r?[e,n]:r,2);return[i[0],i[1]]},enumerable:!1,configurable:!0}),e.prototype.ifHorizontal=function(t,e){return p0(this.attributes.orientation,"function"==typeof t?t():t,"function"==typeof e?e():e)},e.prototype.renderTitle=function(t){var e=this.attributes,n=e.showTitle,r=e.titleText,i=e.width,a=e.height,o=e.classNamePrefix,l=hT(this.attributes,"title"),s=eZ(eZ({},l),{width:i,height:a,text:r,classNamePrefix:o}),u=this;t.selectAll(p8.title.class).data(n?[r]:[]).join(function(t){return t.append(function(){return new pX({style:s})}).attr("className",p8.title.name).each(function(){u.title=this})},function(t){return t.update(s)},function(t){return t.each(function(){u.title=void 0}).remove()})},Object.defineProperty(e.prototype,"availableSpace",{get:function(){if(this.title)return this.title.getAvailableSpace();var t=this.attributes;return new dQ(0,0,t.width,t.height)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"labelFixedSpacing",{get:function(){return 5*!!this.attributes.showTick},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"labelPosition",{get:function(){var t=this.attributes;return({vertical:{positive:"right",negative:"left"},horizontal:{positive:"bottom",negative:"top"}})[t.orientation][t.labelDirection]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"labelBBox",{get:function(){if(!this.attributes.showLabel)return new dQ(0,0,0,0);if(this.cacheLabelBBox)return this.cacheLabelBBox;var t,e=(null==(t=this.label.querySelector(hm.labelGroup.class))?void 0:t.children.slice(-1)[0]).getBBox(),n=e.width,r=e.height;return this.cacheLabelBBox=new dQ(0,0,n,r),this.cacheLabelBBox},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"labelShape",{get:function(){var t=this.attributes,e=t.showLabel,n=t.labelSpacing;if(!e)return{width:0,height:0,size:0,length:0};var r=this.labelBBox,i=r.width,a=r.height,o=this.ifHorizontal(a,i)+(void 0===n?0:n)+this.labelFixedSpacing,l=this.ifHorizontal(i,a);return{width:i,height:a,size:o,length:l}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ribbonBBox",{get:function(){var t=this.attributes,e=t.showHandle,n=t.ribbonSize,r=this.availableSpace,i=r.width,a=r.height,o=this.labelShape,l=o.size,s=o.length,u=e0(this.ifHorizontal([a,i],[i,a]),2),c=u[0],f=u[1],h=e?this.handleShape:{size:0,length:0},d=h.size,p=h.length,y=this.handleOffsetRatio,g=0,v=this.labelPosition;g=n||(["bottom","right"].includes(v)?Math.min(c-l,(c-d)/y):c*(1-y)>d?Math.max(c-l,0):Math.max((c-l-d)/y,0));var b=Math.max(p,s),x=f-b,O=e0(this.ifHorizontal([x,g],[g,x]),2),w=O[0],k=O[1],_=["top","left"].includes(v)?l:0,M=e0(this.ifHorizontal([b/2,_],[_,b/2]),2);return new dQ(M[0],M[1],w,k)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ribbonShape",{get:function(){var t=this.ribbonBBox,e=t.width,n=t.height;return this.ifHorizontal({size:n,length:e},{size:e,length:n})},enumerable:!1,configurable:!0}),e.prototype.renderRibbon=function(t){var e=this.attributes,n=e.data,r=e.type,i=e.orientation,a=e.color,o=e.block,l=e.classNamePrefix,s=hT(this.attributes,"ribbon"),u=this.range,c=u.min,f=u.max,h=this.ribbonBBox,d=h.x,p=h.y,y=this.ribbonShape,g=y.length,v=y.size,b=f1({transform:"translate(".concat(d,", ").concat(p,")"),length:g,size:v,type:r,orientation:i,color:a,block:o,partition:n.map(function(t){return(t.value-c)/(f-c)}),range:this.ribbonRange,classNamePrefix:l},s),x=pG(p8.ribbon.name,"ribbon",l);this.ribbon=t.maybeAppendByClassName(p8.ribbon,function(){return new yn({style:b,className:x})}).update(b)},e.prototype.getHandleClassName=function(t){return"".concat(p8.prefix("".concat(t,"-handle")))},e.prototype.renderHandles=function(){var t=this.attributes,e=t.showHandle,n=t.orientation,r=t.classNamePrefix,i=hT(this.attributes,"handle"),a=e0(this.selection,2),o=a[0],l=a[1],s=eZ(eZ({},i),{orientation:n,classNamePrefix:r}),u=i.shape,c="basic"===(void 0===u?"slider":u)?p5:pW,f=this,h=pG(p8.handle.name,"handle",r);this.handlesGroup.selectAll(p8.handle.class).data(e?[{value:o,type:"start"},{value:l,type:"end"}]:[],function(t){return t.type}).join(function(t){return t.append(function(){return new c({style:s,className:h})}).attr("className",function(t){var e=t.type;return"".concat(h," ").concat(f.getHandleClassName(e))}).each(function(t){var e=t.type,n=t.value;this.update({labelText:n}),f["".concat(e,"Handle")]=this,this.addEventListener("pointerdown",f.onDragStart(e))})},function(t){return t.update(s).each(function(t){var e=t.value;this.update({labelText:e})})},function(t){return t.each(function(t){var e=t.type;f["".concat(e,"Handle")]=void 0}).remove()})},e.prototype.adjustHandles=function(){var t=e0(this.selection,2),e=t[0],n=t[1];this.setHandlePosition("start",e),this.setHandlePosition("end",n);var r=this.attributes,i=r.classNamePrefix,a=r.showHandle,o=hT(this.attributes,"handle").shape;a&&"slider"===(void 0===o?"slider":o)&&i&&(this.startHandle&&this.updateSliderHandleClassNames(this.startHandle,i),this.endHandle&&this.updateSliderHandleClassNames(this.endHandle,i))},e.prototype.updateSliderHandleClassNames=function(t,e){var n=t.container||t,r=n.querySelector(".handle-icon-rect");if(r){var i=pG("handle-icon-rect",pH,e);r.setAttribute("class",i),r.querySelectorAll("line").forEach(function(t){var n=pG((t.getAttribute("class")||"").split(" ")[0],pH,e);t.setAttribute("class",n)})}var a=n.querySelector(".handle-label");if(a){var o=pG("handle-label",pY,e);a.setAttribute("class",o)}},Object.defineProperty(e.prototype,"handleBBox",{get:function(){if(this.cacheHandleBBox)return this.cacheHandleBBox;if(!this.attributes.showHandle)return new dQ(0,0,0,0);var t=this.startHandle.getBBox(),e=t.width,n=t.height,r=this.endHandle.getBBox(),i=e0([Math.max(e,r.width),Math.max(n,r.height)],2),a=i[0],o=i[1];return this.cacheHandleBBox=new dQ(0,0,a,o),this.cacheHandleBBox},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"handleShape",{get:function(){var t=this.handleBBox,e=t.width,n=t.height,r=e0(this.ifHorizontal([n,e],[e,n]),2);return{width:e,height:n,size:r[0],length:r[1]}},enumerable:!1,configurable:!0}),e.prototype.setHandlePosition=function(t,e){var n=this.attributes.handleFormatter,r=this.ribbonBBox,i=r.x,a=r.y,o=this.ribbonShape.size,l=this.getOffset(e),s=e0(this.ifHorizontal([i+l,a+o*this.handleOffsetRatio],[i+o*this.handleOffsetRatio,a+l]),2),u=s[0],c=s[1],f=this.handlesGroup.select(".".concat(this.getHandleClassName(t))).node();null==f||f.update({transform:"translate(".concat(u,", ").concat(c,")"),formatter:n})},e.prototype.renderIndicator=function(t){var e=this.attributes.classNamePrefix,n=hT(this.attributes,"indicator"),r=pG(p8.indicator.name,"indicator",e);this.indicator=t.maybeAppendByClassName(p8.indicator,function(){return new pI({style:n,className:r})}).update(n)},Object.defineProperty(e.prototype,"labelData",{get:function(){var t=this;return this.attributes.data.reduce(function(e,n,r,i){var a,o,l=null!=(a=null==n?void 0:n.id)?a:r.toString();if(e.push(eZ(eZ({},n),{id:l,index:r,type:"value",label:null!=(o=null==n?void 0:n.label)?o:n.value.toString(),value:t.ribbonScale.map(n.value)})),r<i.length-1){var s=i[r+1],u=e0([n.value,s.value],2),c=u[0],f=u[1],h=(c+f)/2;e.push(eZ(eZ({},n),{id:l,index:r,type:"range",range:[c,f],label:[c,f].join("~"),value:t.ribbonScale.map(h)}))}return e},[])},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"labelStyle",{get:function(){var t=e0(["center","middle"],2),e=t[0],n=t[1],r=this.labelPosition;return"top"===r?n="bottom":"bottom"===r?n="top":"left"===r?e="end":"right"===r&&(e="start"),{labelTextAlign:e,labelTextBaseline:n}},enumerable:!1,configurable:!0}),e.prototype.renderLabel=function(t){var e=this.attributes,n=e.showTick,r=e.labelFilter,i=e.labelFormatter,a=hT(this.attributes,"tick"),o=hT(this.attributes,"label"),l=o.align,s=f1(eZ({showLine:!1,showGrid:!1,showTick:void 0!==n&&n,type:"linear",startPos:[0,0],endPos:[0,0],tickDirection:"negative",labelTransform:"rotate(0)"},this.labelStyle),hC(a,"tick"),hC(o,"label"),{data:this.labelData}),u=eZ(eZ(eZ({},s),{tickFilter:function(t,e,n){return(null==t?void 0:t.type)==="value"&&(!r||r(t,t.index,n.filter(function(t){return"value"!==t.type})))},labelFilter:function(t,e,n){return(null==t?void 0:t.type)===l&&(!r||r(t,t.index,n.filter(function(t){return t.type===l})))},labelFormatter:i}),{labelOverlap:[{type:"hide"}]});this.label=t.maybeAppendByClassName(p8.label,function(){return new dP({style:u})}).node(),this.label.update(u,!1)},Object.defineProperty(e.prototype,"labelAxisStyle",{get:function(){var t=this.attributes,e=t.showTick,n=t.labelDirection,r=t.labelSpacing,i=t.tickLength,a=this.ribbonShape.size,o=this.labelPosition,l=this.labelFixedSpacing,s=e0([0,0,0],3),u=s[0],c=s[1],f=s[2],h=null!=i?i:a;return e?(f=h,c=l,"positive"===n?"right"===o?(u=h,f=h):"bottom"===o&&(u=f):"negative"===n&&("top"===o?u=a:"left"===o&&(u=a))):"positive"===n?"right"===o?c=h:"bottom"===o&&(u=a+l,c=r):"negative"===n&&("left"===o?c=r:"top"===o&&(c=r)),{offset:u,spacing:c,tickLength:f}},enumerable:!1,configurable:!0}),e.prototype.adjustLabel=function(){if(this.attributes.showLabel){var t=this.ribbonBBox,e=t.x,n=t.y,r=t.width,i=t.height,a=this.labelAxisStyle,o=a.offset,l=a.spacing,s=a.tickLength,u=e0(this.ifHorizontal([[e,n+o],[e+r,n+o]],[[e+o,n+i],[e+o,n]]),2),c=u[0],f=u[1];this.label.update({startPos:c,endPos:f,tickLength:s,labelSpacing:l},!1)}},e.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)},e.prototype.showIndicator=function(t,e){if(void 0===e&&(e="".concat(t)),!this.attributes.showIndicator||"number"!=typeof t)return void this.hideIndicator();var n=this.range,r=n.min,i=n.max,a=this.ribbonBBox,o=a.x,l=a.y,s=eU(t,r,i),u=this.getOffset(s),c=this.ifHorizontal([u+o,l],[o,u+l]);this.indicator.update({x:c[0],y:c[1],position:this.ifHorizontal("top","left"),labelText:e}),fY(this.indicator.node())},e.prototype.hideIndicator=function(){fV(this.indicator.node())},e.prototype.updateMouse=function(){this.attributes.slidable&&(this.style.cursor="grabbing")},e.prototype.setSelection=function(t,e){this.updateSelection(t,e)},e.prototype.updateSelection=function(t,e,n){void 0===n&&(n=!1);var r,i,a,o,l,s,u,c,f,h,d,p,y,g,v,b,x,O,w,k=e0(this.selection,2),_=k[0],M=k[1],E=e0([t,e],2),A=E[0],S=E[1];n&&(A+=_,S+=M);var j=this.range;A=(w=e0((r=[j.min,j.max],i=[A,S],a=this.selection,void 0===o&&(o=4),u=(s=e0(r,2))[0],c=s[1],h=(f=e0(i,2))[0],d=f[1],y=(p=e0(a,2))[0],g=p[1],b=(v=e0([h,d],2))[0],O=(x=v[1])-b,(b>x&&(b=(l=e0([x,b],2))[0],x=l[1]),O>c-u)?[u,c]:b<u?y===u&&g===x?[u,x]:[u,O+u]:x>c?g===c&&y===b?[b,c]:[c-O,c]:[b,x]),2))[0],S=w[1],this.update({defaultValue:[A,S]}),this.dispatchSelection()},Object.defineProperty(e.prototype,"step",{get:function(){var t=this.attributes.step,e=void 0===t?1:t,n=this.range,r=n.min,i=n.max;return nb(e)?pP((i-r)*.01,0):e},enumerable:!1,configurable:!0}),e.prototype.getTickValue=function(t){var e,n,r=this.attributes,i=r.data,a=r.block,o=this.range.min;return a?p9(i.map(function(t){return t.value}),t).tick:(n=Math.round((t-o)/(e=this.step)),o+n*e)},e.prototype.getValueByCanvasPoint=function(t){var e=this.range,n=e.min,r=e.max,i=e0(this.ribbon.node().getPosition(),2),a=i[0],o=i[1],l=this.ifHorizontal(a,o),s=this.ifHorizontal.apply(this,e1([],e0(pT(t)),!1));return eU(this.getOffset(s-l,!0),n,r)},e.prototype.getOffset=function(t,e){void 0===e&&(e=!1);var n=this.range,r=n.min,i=n.max,a=this.ribbonShape.length,o=this.eventToOffsetScale;return(o.update({domain:[r,i],range:[0,a]}),e)?o.invert(t):o.map(t)},e.prototype.getRealSelection=function(t){var e=this.range.max,n=e0(t,2),r=n[0],i=n[1];return this.ifHorizontal([r,i],[e-i,e-r])},e.prototype.getRealValue=function(t){var e=this.range.max;return this.ifHorizontal(t,e-t)},e.prototype.dispatchSelection=function(){var t=new oA("valuechange",{detail:{value:this.getRealSelection(this.selection)}});this.dispatchEvent(t)},e.prototype.dispatchIndicated=function(t,e){var n=this,r=this.range.max,i=new oA("indicate",{detail:this.ifHorizontal(function(){return{value:t,range:e}},function(){return{value:r-t,range:e?n.getRealSelection(e):void 0}})});this.dispatchEvent(i)},e}(f4);class yi extends cO{getDefaultOptions(){return{domain:[.5],range:[0,1]}}constructor(t){super(t)}map(t){if(!dG(t))return this.options.unknown;let e=dI(this.thresholds,t,0,this.n);return this.options.range[e]}invert(t){let{range:e}=this.options,n=e.indexOf(t),r=this.thresholds;return[r[n-1],r[n]]}clone(){return new yi(this.options)}rescale(){let{domain:t,range:e}=this.options;this.n=Math.min(t.length,e.length-1),this.thresholds=t}}function ya(t){return eY(t)?0:fk(t)?t.length:Object.keys(t).length}let yo=function(t,e){if(!fk(t))return -1;var n=Array.prototype.indexOf;if(n)return n.call(t,e);for(var r=-1,i=0;i<t.length;i++)if(t[i]===e){r=i;break}return r};function yl(t){return 1e-14>Math.abs(t)?t:parseFloat(t.toFixed(14))}let ys=[1,5,2,2.5,4,3],yu=100*Number.EPSILON,yc=(t,e,n=5,r=!0,i=ys,a=[.25,.2,.5,.05])=>{let o=n<0?0:Math.round(n);if(Number.isNaN(t)||Number.isNaN(e)||"number"!=typeof t||"number"!=typeof e||!o)return[];if(e-t<1e-15||1===o)return[t];let l={score:-2,lmin:0,lmax:0,lstep:0},s=1;for(;s<1/0;){for(let n=0;n<i.length;n+=1){let c=i[n],f=function(t,e,n){let r=ya(e);return 1-yo(e,t)/(r-1)-n+1}(c,i,s);if(a[0]*f+a[1]+a[2]+a[3]<l.score){s=1/0;break}let h=2;for(;h<1/0;){var u;let n=(u=h)>=o?2-(u-1)/(o-1):1;if(a[0]*f+a[1]+a[2]*n+a[3]<l.score)break;let d=Math.ceil(Math.log10((e-t)/(h+1)/s/c));for(;d<1/0;){let u=s*c*10**d,p=function(t,e,n){let r=e-t;return n>r?1-((n-r)/2)**2/(.1*r)**2:1}(t,e,u*(h-1));if(a[0]*f+a[1]*p+a[2]*n+a[3]<l.score)break;let y=Math.floor(e/u)*s-(h-1)*s,g=Math.ceil(t/u)*s;if(y<=g){let n=g-y;for(let f=0;f<=n;f+=1){let n=u/s*(y+f),d=n+u*(h-1),p=function(t,e,n,r,i,a){let o=ya(e),l=yo(e,t),s=0,u=(r%a+a)%a;return(u<yu||a-u<yu)&&r<=0&&i>=0&&(s=1),1-l/(o-1)-n+s}(c,i,s,n,d,u),g=1-.5*((e-d)**2+(t-n)**2)/(.1*(e-t))**2,v=function(t,e,n,r,i,a){let o=(t-1)/(a-i),l=(e-1)/(Math.max(a,r)-Math.min(n,i));return 2-Math.max(o/l,l/o)}(h,o,t,e,n,d),b=a[0]*p+a[1]*g+a[2]*v+ +a[3];b>l.score&&(!r||n<=t&&d>=e)&&(l.lmin=n,l.lmax=d,l.lstep=u,l.score=b)}}d+=1}h+=1}}s+=1}let c=yl(l.lmax),f=yl(l.lmin),h=yl(l.lstep),d=Math.floor(Math.round((c-f)/h*1e12)/1e12)+1,p=Array(d);p[0]=yl(f);for(let t=1;t<d;t+=1)p[t]=yl(p[t-1]+h);return p};class yf extends yi{getDefaultOptions(){return{domain:[0,1],range:[.5],nice:!1,tickCount:5,tickMethod:yc}}constructor(t){super(t)}nice(){let{nice:t}=this.options;if(t){let[t,e,n]=this.getTickMethodOptions();this.options.domain=dq(t,e,n)}}getTicks(){let{tickMethod:t}=this.options,[e,n,r]=this.getTickMethodOptions();return t(e,n,r)}getTickMethodOptions(){let{domain:t,tickCount:e}=this.options;return[t[0],t[t.length-1],e]}rescale(){this.nice();let{range:t,domain:e}=this.options,[n,r]=e;this.n=t.length-1,this.thresholds=Array(this.n);for(let t=0;t<this.n;t+=1)this.thresholds[t]=((t+1)*r-(t-this.n)*n)/(this.n+1)}invert(t){let[e,n]=super.invert(t),[r,i]=this.options.domain;return void 0===e&&void 0===n?[e,n]:[e||r,n||i]}getThresholds(){return this.thresholds}clone(){return new yf(this.options)}}class yh extends yi{getDefaultOptions(){return{domain:[],range:[],tickCount:5,unknown:void 0,tickMethod:yc}}constructor(t){super(t)}rescale(){let{domain:t,range:e}=this.options;this.n=e.length-1,this.thresholds=function(t,e,n=!1){n||t.sort((t,e)=>t-e);let r=[];for(let n=1;n<e;n+=1)r.push(function(t,e){let n=t.length;if(!n)return;if(n<2)return t[n-1];let r=(n-1)*e,i=Math.floor(r),a=t[i];return a+(t[i+1]-a)*(r-i)}(t,n/e));return r}(t,this.n+1,!1)}invert(t){let[e,n]=super.invert(t),{domain:r}=this.options,i=r[0],a=r[r.length-1];return void 0===e&&void 0===n?[e,n]:[e||i,n||a]}getThresholds(){return this.thresholds}clone(){return new yh(this.options)}getTicks(){let{tickCount:t,domain:e,tickMethod:n}=this.options,r=e.length-1;return n(e[0],e[r],t)}}var yd=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function yp(t){let{domain:e}=t.getOptions(),[n,r]=[e[0],fO(e)];return[n,r]}let yy=t=>{let{labelFormatter:e,layout:n,order:r,orientation:i,position:a,size:o,title:l,style:s,crossPadding:u,padding:c}=t,f=yd(t,["labelFormatter","layout","order","orientation","position","size","title","style","crossPadding","padding"]);return({scales:r,value:i,theme:o,scale:u})=>{let{bbox:c}=i,{x:h,y:d,width:p,height:y}=c,g=d8(a,n),{legendContinuous:v={}}=o,b=pn(Object.assign({},v,Object.assign(Object.assign(Object.assign({titleText:d6(l),labelAlign:"value",labelFormatter:"string"==typeof e?t=>Ex(e)(t.label):e},function(t,e,n,r,i,a){let o=pt(t,"color"),l=function(t,e,n){let{size:r}=e,i=pe(t,e,n);var a=i.orientation;return(i.size=r,"horizontal"===a||0===a)?i.height=r:i.width=r,i}(n,r,i);if(o instanceof yi){let t,{range:e}=o.getOptions(),[n,r]=yp(o);if(o instanceof yf||o instanceof yh){let t,i;return t=o.thresholds,i=t=>({value:t/r,label:String(t),domainValue:t}),Object.assign(Object.assign({},l),{color:e,data:[n,...t,r].map(i)})}return t=[-1/0,...o.thresholds,1/0].map((t,e)=>({value:e,domainValue:t,label:t})),Object.assign(Object.assign({},l),{data:t,color:e,labelFilter:(e,n)=>n>0&&n<t.length-1})}return function(t,e,n,r,i,a){let o,l,{length:s}=t,u=n||r,c=i.color?a.legendContinuous.ribbonFill||"black":a.color,f=e||(o=u.getOptions(),(l=u.clone()).update(Object.assign(Object.assign({},o),{range:[iS(c).toString()]})),l),[h,d]=yp(f),[p,y]=yp([e,n,r].filter(t=>void 0!==t).find(t=>!(t instanceof cL)));return Object.assign(Object.assign({},t),{domain:[p,y],data:f.getTicks().map(t=>({value:t})),color:Array(Math.floor(s)).fill(0).map((t,e)=>{let n=(d-h)/(s-1)*e+h,i=f.map(n)||c,a=r?r.map(n):1;return i.replace(/rgb[a]*\(([\d]{1,3}) *, *([\d]{1,3}) *, *([\d]{1,3})[\S\s]*\)/,(t,e,n,r)=>`rgba(${e}, ${n}, ${r}, ${a})`)})})}(l,o,pt(t,"size"),pt(t,"opacity"),e,a)}(r,u,i,t,yy,o)),s),{classNamePrefix:"g2-"}),f)),x=new d9({style:Object.assign(Object.assign({x:h,y:d,width:p,height:y},g),{subOptions:b})});return x.appendChild(new yr({className:"legend-continuous",style:b})),x}};yy.props={defaultPosition:"top",defaultOrientation:"vertical",defaultOrder:1,defaultSize:60,defaultLength:200,defaultLegendSize:60,defaultPadding:[20,10],defaultCrossPadding:[12,12]};let yg=t=>(...e)=>yy(Object.assign({},{block:!0},t))(...e);yg.props=Object.assign(Object.assign({},yy.props),{defaultPosition:"top",defaultOrientation:"horizontal"});let yv=t=>e=>{let{scales:n}=e;return yy(Object.assign({},{type:"size",data:pt(n,"size").getTicks().map((t,e)=>({value:t,label:String(t)}))},t))(e)};yv.props=Object.assign(Object.assign({},yy.props),{defaultPosition:"top",defaultOrientation:"horizontal"});let ym=t=>yv(Object.assign({},{block:!0},t));ym.props=Object.assign(Object.assign({},yy.props),{defaultPosition:"top",defaultOrientation:"horizontal"});var yb=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let yx=({static:t=!1}={})=>e=>{let{width:n,height:r,depth:i,paddingLeft:a,paddingRight:o,paddingTop:l,paddingBottom:s,padding:u,inset:c,insetLeft:f,insetTop:h,insetRight:d,insetBottom:p,margin:y,marginLeft:g,marginBottom:v,marginTop:b,marginRight:x,data:O,coordinate:w,theme:k,component:_,interaction:M,x:E,y:A,z:S,key:j,frame:P,labelTransform:T,parentKey:C,clip:N,viewStyle:L,title:I}=e,R=yb(e,["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:E,y:A,z:S,key:j,width:n,height:r,depth:i,padding:u,paddingLeft:a,paddingRight:o,paddingTop:l,inset:c,insetLeft:f,insetTop:h,insetRight:d,insetBottom:p,paddingBottom:s,theme:k,coordinate:w,component:_,interaction:M,frame:P,labelTransform:T,margin:y,marginLeft:g,marginBottom:v,marginTop:b,marginRight:x,parentKey:C,clip:N,style:L},!t&&{title:I}),{marks:[Object.assign(Object.assign(Object.assign({},R),{key:`${j}-0`,data:O}),t&&{title:I})]})]};yx.props={};var yO=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function yw(t){return(e,...n)=>cy({},t(e,...n),e)}function yk(t){return(e,...n)=>cy({},e,t(e,...n))}function y_(t,e){if(!t)return e;if(Array.isArray(t))return t;if(!(t instanceof Date)&&"object"==typeof t){let{value:n=e}=t;return Object.assign(Object.assign({},yO(t,["value"])),{value:n})}return t}var yM=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let yE=()=>t=>{let{children:e}=t,n=yM(t,["children"]);if(!Array.isArray(e))return[];let{data:r,scale:i={},axis:a={},legend:o={},encode:l={},transform:s=[],slider:u={}}=n,c=yM(n,["data","scale","axis","legend","encode","transform","slider"]),f=e.map(t=>{var{data:e,scale:n={},axis:c={},legend:f={},encode:h={},transform:d=[],slider:p={}}=t,y=yM(t,["data","scale","axis","legend","encode","transform","slider"]);return Object.assign({data:y_(e,r),scale:cy({},i,n),encode:cy({},l,h),transform:[...s,...d],axis:!!c&&!!a&&cy({},a,c),legend:!!f&&!!o&&cy({},o,f),slider:cy({},u,p)},y)});return[Object.assign(Object.assign({},c),{marks:f,type:"standardView",slider:u})]};function yA([t,e],[n,r]){return[t-n,e-r]}function yS([t,e],[n,r]){return Math.sqrt(Math.pow(t-n,2)+Math.pow(e-r,2))}function yj([t,e]){return Math.atan2(e,t)}function yP([t,e]){return yj([t,e])+Math.PI/2}function yT(t,e){let n=yj(t),r=yj(e);return n<r?r-n:2*Math.PI-(n-r)}function yC(t){let e=1/0,n=-1/0,r=1/0,i=-1/0;for(let[a,o]of t)e=Math.min(a,e),n=Math.max(a,n),r=Math.min(o,r),i=Math.max(o,i);let a=n-e,o=i-r;return[e,r,a,o]}function yN([t,e],[n,r]){return[(t+n)/2,(e+r)/2]}function yL(t,e){for(let[n,r]of Object.entries(e))t.style(n,r)}function yI(t,e,n,r,i){let a=yj(yA(r,e))+Math.PI,o=yj(yA(r,n))+Math.PI;return t.arc(r[0],r[1],i,a,o,o-a<0),t}function yR(t,e,n,r="y",i="between",a=!1){let o="y"===r||!0===r?n:e,l=((t,e)=>{if("y"===t||!0===t)if(e)return 180;else return 90;return 90*!!e})(r,a),s=fx(o),[u,c]=dZ(s,t=>o[t]),f=new dV({domain:[u,c],range:[0,100]}),h=t=>eq(o[t])&&!Number.isNaN(o[t])?f.map(o[t]):0,d={between:e=>`${t[e]} ${h(e)}%`,start:e=>0===e?`${t[e]} ${h(e)}%`:`${t[e-1]} ${h(e)}%, ${t[e]} ${h(e)}%`,end:e=>e===t.length-1?`${t[e]} ${h(e)}%`:`${t[e]} ${h(e)}%, ${t[e+1]} ${h(e)}%`},p=s.sort((t,e)=>h(t)-h(e)).map(d[i]||d.between).join(",");return`linear-gradient(${l}deg, ${p})`}function yD(t){let[e,n,r,i]=t;return[i,e,n,r]}function yB(t,e,n){let[r,i,,a]=fD(t)?yD(e):e,[o,l]=n,s=t.getCenter(),u=yP(yA(r,s)),c=yP(yA(i,s)),f=c===u&&o!==l?c+2*Math.PI:c;return{startAngle:u+1e-4,endAngle:(f-u>=0?f:2*Math.PI+f)-1e-4,innerRadius:yS(a,s),outerRadius:yS(r,s)}}function yF(t){let{colorAttribute:e,opacityAttribute:n=e}=t;return`${n}Opacity`}function yz(t,e){if(!fB(t))return"";let n=t.getCenter(),{transform:r}=e;return`translate(${n[0]}, ${n[1]}) ${r||""}`}function y$(t){if(1===t.length)return t[0];let[[e,n,r=0],[i,a,o=0]]=t;return[(e+i)/2,(n+a)/2,(r+o)/2]}function yW(t){return t.replace(/-(\w)/g,function(t,e){return e.toUpperCase()})}function yG(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function yq(t){return function(){return t}}function yH(t){this._context=t}function yY(t){return new yH(t)}yE.props={},Array.prototype.slice,yH.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t*=1,e*=1,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}};let yV=Math.PI,yU=2*yV,yX=yU-1e-6;function yK(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}class yZ{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?yK:function(t){let e=Math.floor(t);if(!(e>=0))throw Error(`invalid digits: ${t}`);if(e>15)return yK;let n=10**e;return function(t){this._+=t[0];for(let e=1,r=t.length;e<r;++e)this._+=Math.round(arguments[e]*n)/n+t[e]}}(t)}moveTo(t,e){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,e){this._append`L${this._x1=+t},${this._y1=+e}`}quadraticCurveTo(t,e,n,r){this._append`Q${+t},${+e},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(t,e,n,r,i,a){this._append`C${+t},${+e},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(t,e,n,r,i){if(t*=1,e*=1,n*=1,r*=1,(i*=1)<0)throw Error(`negative radius: ${i}`);let a=this._x1,o=this._y1,l=n-t,s=r-e,u=a-t,c=o-e,f=u*u+c*c;if(null===this._x1)this._append`M${this._x1=t},${this._y1=e}`;else if(f>1e-6)if(Math.abs(c*l-s*u)>1e-6&&i){let h=n-a,d=r-o,p=l*l+s*s,y=Math.sqrt(p),g=Math.sqrt(f),v=i*Math.tan((yV-Math.acos((p+f-(h*h+d*d))/(2*y*g)))/2),b=v/g,x=v/y;Math.abs(b-1)>1e-6&&this._append`L${t+b*u},${e+b*c}`,this._append`A${i},${i},0,0,${+(c*h>u*d)},${this._x1=t+x*l},${this._y1=e+x*s}`}else this._append`L${this._x1=t},${this._y1=e}`}arc(t,e,n,r,i,a){if(t*=1,e*=1,n*=1,a=!!a,n<0)throw Error(`negative radius: ${n}`);let o=n*Math.cos(r),l=n*Math.sin(r),s=t+o,u=e+l,c=1^a,f=a?r-i:i-r;null===this._x1?this._append`M${s},${u}`:(Math.abs(this._x1-s)>1e-6||Math.abs(this._y1-u)>1e-6)&&this._append`L${s},${u}`,n&&(f<0&&(f=f%yU+yU),f>yX?this._append`A${n},${n},0,1,${c},${t-o},${e-l}A${n},${n},0,1,${c},${this._x1=s},${this._y1=u}`:f>1e-6&&this._append`A${n},${n},0,${+(f>=yV)},${c},${this._x1=t+n*Math.cos(i)},${this._y1=e+n*Math.sin(i)}`)}rect(t,e,n,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${n*=1}v${+r}h${-n}Z`}toString(){return this._}}function yQ(){return new yZ}function yJ(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(null==n)e=null;else{let t=Math.floor(n);if(!(t>=0))throw RangeError(`invalid digits: ${n}`);e=t}return t},()=>new yZ(e)}function y0(t){return t[0]}function y1(t){return t[1]}function y2(t,e){var n=yq(!0),r=null,i=yY,a=null,o=yJ(l);function l(l){var s,u,c,f=(l=yG(l)).length,h=!1;for(null==r&&(a=i(c=o())),s=0;s<=f;++s)!(s<f&&n(u=l[s],s,l))===h&&((h=!h)?a.lineStart():a.lineEnd()),h&&a.point(+t(u,s,l),+e(u,s,l));if(c)return a=null,c+""||null}return t="function"==typeof t?t:void 0===t?y0:yq(t),e="function"==typeof e?e:void 0===e?y1:yq(e),l.x=function(e){return arguments.length?(t="function"==typeof e?e:yq(+e),l):t},l.y=function(t){return arguments.length?(e="function"==typeof t?t:yq(+t),l):e},l.defined=function(t){return arguments.length?(n="function"==typeof t?t:yq(!!t),l):n},l.curve=function(t){return arguments.length?(i=t,null!=r&&(a=i(r)),l):i},l.context=function(t){return arguments.length?(null==t?r=a=null:a=i(r=t),l):r},l}function y5(t){let e="function"==typeof t?t:t.render;return class extends lv{connectedCallback(){this.draw()}attributeChangedCallback(){this.draw()}draw(){e(this)}}}yQ.prototype=yZ.prototype;var y3=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let y4=y5(t=>{let e,n=t.attributes,{className:r,class:i,transform:a,rotate:o,labelTransform:l,labelTransformOrigin:s,x:u,y:c,x0:f=u,y0:h=c,text:d,background:p,connector:y,startMarker:g,endMarker:v,coordCenter:b,innerHTML:x}=n,O=y3(n,["className","class","transform","rotate","labelTransform","labelTransformOrigin","x","y","x0","y0","text","background","connector","startMarker","endMarker","coordCenter","innerHTML"]);if(t.style.transform=`translate(${u}, ${c})`,[u,c,f,h].some(t=>!eq(t)))return void t.children.forEach(t=>t.remove());let w=cG(O,"background"),{padding:k}=w,_=y3(w,["padding"]),M=cG(O,"connector"),{points:E=[]}=M,A=y3(M,["points"]);e=x?cX(t).maybeAppend("html","html",r).style("zIndex",0).style("innerHTML",x).call(yL,Object.assign({transform:l,transformOrigin:s},O)).node():cX(t).maybeAppend("text","text").style("zIndex",0).style("text",d).call(yL,Object.assign({textBaseline:"middle",transform:l,transformOrigin:s},O)).node();let S=cX(t).maybeAppend("background","rect").style("zIndex",-1).call(yL,function(t,e=[]){let[n=0,r=0,i=n,a=r]=e,o=t.parentNode,l=o.getEulerAngles();o.setEulerAngles(0);let{min:s,halfExtents:u}=t.getLocalBounds(),[c,f]=s,[h,d]=u;return o.setEulerAngles(l),{x:c-a,y:f-n,width:2*h+a+r,height:2*d+n+i}}(e,k)).call(yL,p?_:{}).node(),j=+f<b[0],P=+h<b[1],T=function(t,e,n,r=!0,i=!0){let a;if(!e[0]&&!e[1]){let n;return n=[function(t){let{min:[e,n],max:[r,i]}=t.getLocalBounds(),a=0,o=0;return e>0&&(a=e),r<0&&(a=r),n>0&&(o=n),i<0&&(o=i),[a,o]}(t),e],y2()(n)}if(!n.length){let t;return t=[[0,0],e],y2()(t)}let[o,l]=n,s=[...l],u=[...o];if(l[0]!==o[0]){let t=r?-4:4;s[1]=l[1],i&&!r&&(s[0]=Math.max(o[0],l[0]-t),l[1]<o[1]?u[1]=s[1]:(u[1]=o[1],u[0]=Math.max(u[0],s[0]-t))),i||r||(s[0]=Math.max(o[0],l[0]-t),l[1]>o[1]?u[1]=s[1]:(u[1]=o[1],u[0]=Math.max(u[0],s[0]-t))),!i&&r&&(s[0]=Math.min(o[0],l[0]-t),l[1]>o[1]?u[1]=s[1]:(u[1]=o[1],u[0]=Math.min(u[0],s[0]-t))),i&&r&&(s[0]=Math.min(o[0],l[0]-t),l[1]<o[1]?u[1]=s[1]:(u[1]=o[1],u[0]=Math.min(u[0],s[0]-t)))}return a=[l,s,u,o,e],y2()(a)}(S,[f-u,h-c],E,j,P),C=g&&new pJ({id:"startMarker",style:Object.assign({x:0,y:0},cG(O,"startMarker"))}),N=v&&new pJ({id:"endMarker",style:Object.assign({x:0,y:0},cG(O,"endMarker"))});cX(t).maybeAppend("connector","path").style("zIndex",0).style("d",T).style("markerStart",C).style("markerEnd",N).call(yL,y?A:{})});function y6(t,e){let n,r=-1,i=-1;if(void 0===e)for(let e of t)++i,null!=e&&(n<e||void 0===n&&e>=e)&&(n=e,r=i);else for(let a of t)null!=(a=e(a,++i,t))&&(n<a||void 0===n&&a>=a)&&(n=a,r=i);return r}function y8(t,e,n,r){let i=e.length/2,a=e.slice(0,i),o=e.slice(i),l=y6(a,(t,e)=>Math.abs(t[1]-o[e][1])),s=t=>[a[t][0],(a[t][1]+o[t][1])/2],u=s(l=Math.max(Math.min(l,i-2),1)),c=s(l-1),f=yj(yA(s(l+1),c))/Math.PI*180;return{x:u[0],y:u[1],transform:`rotate(${f})`,textAlign:"center",textBaseline:"middle"}}function y9(t,e,n,r){let{bounds:i}=n,[[a,o],[l,s]]=i,u=l-a,c=s-o,f=t=>{let{x:e,y:r}=t,i=cY(n.x,u),l=cY(n.y,c);return Object.assign(Object.assign({},t),{x:(i||e)+a,y:(l||r)+o})};return f("left"===t?{x:0,y:c/2,textAlign:"start",textBaseline:"middle"}:"right"===t?{x:u,y:c/2,textAlign:"end",textBaseline:"middle"}:"top"===t?{x:u/2,y:0,textAlign:"center",textBaseline:"top"}:"bottom"===t?{x:u/2,y:c,textAlign:"center",textBaseline:"bottom"}:"top-left"===t?{x:0,y:0,textAlign:"start",textBaseline:"top"}:"top-right"===t?{x:u,y:0,textAlign:"end",textBaseline:"top"}:"bottom-left"===t?{x:0,y:c,textAlign:"start",textBaseline:"bottom"}:"bottom-right"===t?{x:u,y:c,textAlign:"end",textBaseline:"bottom"}:{x:u/2,y:c/2,textAlign:"center",textBaseline:"middle"})}function y7(t,e,n,r){let{y:i,y1:a,autoRotate:o,rotateToAlignArc:l}=n,s=r.getCenter(),{innerRadius:u,outerRadius:c,startAngle:f,endAngle:h}=yB(r,e,[i,a]),d="inside"===t?(f+h)/2:h,p=ge(d,o,l);return Object.assign(Object.assign({},(()=>{let[n,r]=e,[i,a]="inside"===t?gt(s,d,u+(c-u)*.5):yN(n,r);return{x:i,y:a}})()),{textAlign:"inside"===t?"center":"start",textBaseline:"middle",rotate:p})}function gt(t,e,n){return[t[0]+Math.sin(e)*n,t[1]-Math.cos(e)*n]}function ge(t,e,n){if(!e)return 0;let r=n?0:0>Math.sin(t)?90:-90;return t/Math.PI*180+r}function gn(t){return void 0===t?null:t}function gr(t,e,n,r){let{bounds:i}=n,[a]=i;return{x:gn(a[0]),y:gn(a[1])}}function gi(t,e,n,r){let{bounds:i}=n;return 1===i.length?gr(t,e,n,r):(fF(r)?y7:fG(r)?function(t,e,n,r){let{y:i,y1:a,autoRotate:o,rotateToAlignArc:l,radius:s=.5,offset:u=0}=n,c=yB(r,e,[i,a]),{startAngle:f,endAngle:h}=c,d=r.getCenter(),p=(f+h)/2,y=ge(p,o,l),{innerRadius:g,outerRadius:v}=c,[b,x]=gt(d,p,g+(v-g)*s+u);return Object.assign({x:b,y:x},{textAlign:"center",textBaseline:"middle",rotate:y})}:y9)(t,e,n,r)}function ga(t,e,n){let{innerRadius:r,outerRadius:i}=yB(n,t,[e.y,e.y1]);return r+(i-r)}function go(t,e,n){let{startAngle:r,endAngle:i}=yB(n,t,[e.y,e.y1]);return(r+i)/2}function gl(t,e,n,r){let{autoRotate:i,rotateToAlignArc:a,offset:o=0,connector:l=!0,connectorLength:s=o,connectorLength2:u=0,connectorDistance:c=0}=n,f=r.getCenter(),h=go(e,n,r),d=Math.sin(h)>0?1:-1,p=ge(h,i,a),y={textAlign:d>0||fF(r)?"start":"end",textBaseline:"middle",rotate:p},g=ga(e,n,r),[[v,b],[x,O],[w,k]]=function(t,e,n,r,i){let[a,o]=gt(t,e,n),[l,s]=gt(t,e,r);return[[a,o],[l,s],[l+(Math.sin(e)>0?1:-1)*i,s]]}(f,h,g,g+(l?s:o),l?u:0),_=l?c*d:0,M=w+_;return Object.assign(Object.assign({x0:v,y0:b,x:w+_,y:k},y),{connector:l,connectorPoints:[[x-M,O-k],[w-M,k-k]]})}function gs(t,e,n,r){let{bounds:i}=n;return 1===i.length?gr(t,e,n,r):(fF(r)?y7:fG(r)?gl:y9)(t,e,n,r)}function gu(t,e){return null==t||null==e?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function gc(t,...e){if("function"!=typeof t[Symbol.iterator])throw TypeError("values is not iterable");t=Array.from(t);let[n]=e;if(n&&2!==n.length||e.length>1){var r;let i=Uint32Array.from(t,(t,e)=>e);return e.length>1?(e=e.map(e=>t.map(e)),i.sort((t,n)=>{for(let r of e){let e=gh(r[t],r[n]);if(e)return e}})):(n=t.map(n),i.sort((t,e)=>gh(n[t],n[e]))),r=t,Array.from(i,t=>r[t])}return t.sort(gf(n))}function gf(t=gu){if(t===gu)return gh;if("function"!=typeof t)throw TypeError("compare is not a function");return(e,n)=>{let r=t(e,n);return r||0===r?r:(0===t(n,n))-(0===t(e,e))}}function gh(t,e){return(null==t||!(t>=t))-(null==e||!(e>=e))||(t<e?-1:+(t>e))}function gd(t,e={}){let{labelHeight:n=14,height:r}=e,i=gc(t,t=>t.y),a=i.length,o=Array(a);for(let t=0;t<a;t++){let{y:e}=i[t];o[t]={y:e,y1:e+n,labels:[e]}}let l=!0;for(;l;){l=!1;for(let t=o.length-1;t>0;t--){let e=o[t],n=o[t-1];if(n.y1>e.y){l=!0,n.labels.push(...e.labels),o.splice(t,1),n.y1+=e.y1-e.y;let i=n.y1-n.y;n.y1=Math.max(Math.min(n.y1,r),i),n.y=n.y1-i}}}let s=0;for(let t of o){let{y:e,labels:r}=t,a=e-n;for(let t of r){let e=i[s++],r=a+n-t;e.connectorPoints[0][1]-=r,e.y=a+n,a+=n}}}function gp(t,e){let n=gc(t,t=>t.y),{height:r,labelHeight:i=14}=e,a=Math.ceil(r/i);if(n.length<=a)return gd(n,e);let o=[];for(let t=0;t<n.length;t++)t<n.length-a?(n[t].opacity=0,n[t].connector=!1):o.push(n[t]);gd(o,e)}var gy=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let gg=new WeakMap;function gv(t,e,n,r,i,a){if(!fG(r))return{};if(gg.has(e))return gg.get(e);let o=a.map(t=>(function(t,e,n){let{connectorLength:r,connectorLength2:i,connectorDistance:a}=e,o=gy(gl("outside",t,e,n),[]),l=n.getCenter(),s=ga(t,e,n),u=Math.sin(go(t,e,n))>0?1:-1,c=l[0]+(s+r+i+ +a)*u,{x:f}=o,h=c-f;return o.x+=h,o.connectorPoints[0][0]-=h,o})(t,n,r)),{width:l,height:s}=r.getOptions(),u=o.filter(t=>t.x<l/2),c=o.filter(t=>t.x>=l/2),f=Object.assign(Object.assign({},i),{height:s});return gp(u,f),gp(c,f),o.forEach((t,e)=>gg.set(a[e],t)),gg.get(e)}var gm=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function gb(t,e,n,r){if(!fG(r))return{};let{connectorLength:i,connectorLength2:a,connectorDistance:o}=n,l=gm(gl("outside",e,n,r),[]),{x0:s,y0:u}=l,c=r.getCenter(),f=function(t){if(fG(t)){let[e,n]=t.getSize(),r=t.getOptions().transformations.find(t=>"polar"===t[0]);if(r)return Math.max(e,n)/2*r[4]}return 0}(r),h=yP([s-c[0],u-c[1]]),d=Math.sin(h)>0?1:-1,[p,y]=gt(c,h,f+i);return l.x=p+(a+o)*d,l.y=y,l}var gx=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let gO=(t,e)=>{let{coordinate:n,theme:r}=e,{render:i}=t;return(e,a,o,l)=>{let{text:s,x:u,y:c,transform:f="",transformOrigin:h,className:d=""}=a,p=gx(a,["text","x","y","transform","transformOrigin","className"]),y=function(t,e,n,r,i,a){let{position:o}=e,{render:l}=i,s=void 0!==o?o:fG(n)?"inside":fD(n)?"right":"top",u=r[l?"htmlLabel":"inside"===s?"innerLabel":"label"],c=Object.assign({},u,e),f=Q[yW(s)];if(!f)throw Error(`Unknown position: ${s}`);return Object.assign(Object.assign({},u),f(s,t,c,n,i,a))}(e,a,n,r,t,l),{rotate:g=0,transform:v=""}=y,b=gx(y,["rotate","transform"]);return cX(new y4).call(yL,b).style("text",`${s}`).style("className",`${d} g2-label`).style("innerHTML",i?i(s,a.datum,a.index):void 0).style("labelTransform",`${v} rotate(${+g}) ${f}`.trim()).style("labelTransformOrigin",h).style("coordCenter",n.getCenter()).call(yL,p).node()}};gO.props={defaultMarker:"point"};let gw=function(t,e,n){var r=t,i=eV(e)?e.split("."):e;return i.forEach(function(t,e){e<i.length-1?(n_(r[t])||(r[t]=eq(i[e+1])?[]:{}),r=r[t]):r[t]=n}),t},gk="main-layer",g_="label-layer",gM="element",gE="component",gA="axis-breaks",gS="axis-breaks-group";var gj=function(t,e,n,r){return new(n||(n=Promise))(function(i,a){function o(t){try{s(r.next(t))}catch(t){a(t)}}function l(t){try{s(r.throw(t))}catch(t){a(t)}}function s(t){var e;t.done?i(t.value):((e=t.value)instanceof n?e:new n(function(t){t(e)})).then(o,l)}s((r=r.apply(t,e||[])).next())})},gP=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let gT={fill:"#fff",stroke:"#aaa",lineDash:"4 3",lineWidth:.5,fillOpacity:1,strokeOpacity:1},gC=(t,e,n,r,i,a)=>{let o=[],l=[],s=r-1;for(let r=1;r<s;r++){let u=r/s*e,c=t+(r%2==0?n:-n);o.push(`${u},${c}`),l.push(`${u},${i?c-a:c+a}`)}return o.push(`${e},${t}`),l.push(`${e+a},${t}`),[o,l]},gN=(t,e)=>{let{context:n,selection:r,view:i}=e,a=r.select(".plot").node(),{document:o}=n.canvas,{scale:l}=i,s=new Map;return t=>{let{key:e,start:r,end:i,gap:u=.03,vertices:c=50,lineWidth:f=.5,verticeOffset:h=3}=t,d=gP(t,["key","start","end","gap","vertices","lineWidth","verticeOffset"]),p=o.createElement("g",{id:`break-group-${e}`,className:gS}),y=cr(l,"x.sortedDomain",[]),{range:g,domain:v}=l.y.getOptions(),b=v.indexOf(r),x=v.indexOf(i),{width:O,height:w}=a.getBBox();if(-1===b||-1===x||!y.length)return p;let k=g[0]>g[1],_=g[b]*w,M=g[x]*w,E="",A="";for(let[t,{y:e,isLower:n}]of[{y:M,isLower:!1},{y:_,isLower:!0}].entries()){let r=k?f:-f,[i,a]=gC(e,O-0,h,c,n,r);0===t?(E=`M 0,${e} L ${i.join(" L ")} `,A=`M ${0-f},${e+r} L ${a.join(" L ")} `):(E+=`L ${O-0},${e} L ${[...i].reverse().join(" L ")} L 0,${e} Z`,A+=`L ${O-0+f+2},${e-r} L ${[...a].reverse().join(" L ")} L ${0-f},${e-r} Z`)}let S=Object.assign(Object.assign({},gT),d);try{let t=new lE({style:Object.assign(Object.assign({},S),{d:E})}),o=new lE({style:Object.assign(Object.assign({},S),{d:A,lineWidth:0,cursor:"pointer"})});o.addEventListener("click",t=>gj(void 0,void 0,void 0,function*(){t.stopPropagation(),2===t.detail&&(yield gj(void 0,void 0,void 0,function*(){let{update:t,setState:a}=n.externals;a("options",t=>{let{marks:n}=t;if(!n||!n.length)return t;let a=n.map(t=>{let e=cr(t,"scale.y.breaks",[]),n=e.filter(t=>t.start!==r&&t.end!==i&&!t.collapsed);return e.forEach(t=>{t.start===r&&t.end===i&&(t.collapsed=!0)}),console.log("breaks group:",e,n),cy({},t,{scale:{y:{breaks:n}}})});return s.set(e,{start:r,end:i}),Object.assign(Object.assign({},t),{marks:a})}),yield t()}))})),p.appendChild(t),p.appendChild(o),a.addEventListener("click",t=>gj(void 0,void 0,void 0,function*(){2===t.detail&&(yield gj(void 0,void 0,void 0,function*(){if(!s.size)return;let{update:t,setState:e}=n.externals;e("options",t=>{let{marks:e}=t,n=e.map(t=>{let e=cr(t,"scale.y.breaks",[]);return gw(t,"scale.y.breaks",e.map(t=>Object.assign(Object.assign({},t),{collapsed:!1}))),t});return s.clear(),Object.assign(Object.assign({},t),{marks:n})}),yield t()}))})),a.appendChild(p)}catch(t){console.error("Failed to create break path:",t)}return p}};function gL(t,e){return null==t||null==e?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function gI(t){let e,n,r;function i(t,r,a=0,o=t.length){if(a<o){if(0!==e(r,r))return o;do{let e=a+o>>>1;0>n(t[e],r)?a=e+1:o=e}while(a<o)}return a}return 2!==t.length?(e=gu,n=(e,n)=>gu(t(e),n),r=(e,n)=>t(e)-n):(e=t===gu||t===gL?t:gR,n=t,r=t),{left:i,center:function(t,e,n=0,a=t.length){let o=i(t,e,n,a-1);return o>n&&r(t[o-1],e)>-r(t[o],e)?o-1:o},right:function(t,r,i=0,a=t.length){if(i<a){if(0!==e(r,r))return a;do{let e=i+a>>>1;0>=n(t[e],r)?i=e+1:a=e}while(i<a)}return i}}}function gR(){return 0}gN.props={};let gD=function(t,e){if(!fk(t))return t;for(var n=[],r=0;r<t.length;r++){var i=t[r];e(i,r)&&n.push(i)}return n};function gB(t){return null===t?NaN:+t}let gF=gI(gu),gz=gF.right,g$=gF.left,gW=gI(gB).center;function gG(t){return!!t.getBandWidth}function gq(t,e,n){var r;if(!gG(t))return t.invert(e);let{adjustedRange:i}=t;if(i.includes(e))return t.invert(e);let{domain:a}=t.getOptions(),o=t.getStep(),l=(r=g$(n?i:i.map(t=>t+o),e)+(n?-1:0),Math.min(a.length-1,Math.max(0,r)));return a[l]}function gH(t,e,n){if(!e)return t.getOptions().domain;if(!gG(t)){let r=gc(e);if(!n)return r;let[i]=r,{range:a}=t.getOptions(),[o,l]=a,s=t.invert(t.map(i)+(o>l?-1:1)*n);return[i,s]}let{domain:r}=t.getOptions(),i=e[0],a=r.indexOf(i);if(n){let t=a+Math.round(r.length*n);return r.slice(a,t)}let o=e[e.length-1],l=r.indexOf(o);return r.slice(a,l+1)}function gY(t,e,n,r,i,a){let{x:o,y:l}=i,s=(t,e)=>{let[n,r]=a.invert(t);return[gq(o,n,e),gq(l,r,e)]},u=s([t,e],!0),c=s([n,r],!1);return[gH(o,[u[0],c[0]]),gH(l,[u[1],c[1]])]}function gV(t,e){let[n,r]=t;return[e.map(n),e.map(r)+(e.getStep?e.getStep():0)]}let gU=(t,e)=>{var n,r;let[i,a]=t,o=(null==(r=null==(n=e.getOptions)?void 0:n.call(e))?void 0:r.domain)||[],l=o.indexOf(i),s=o.indexOf(a);if(-1===l||-1===s)return[e.map(i),e.map(a)];let u=o.length;return u<=1?[0,1]:[l/(u-1),s/(u-1)]},gX=Math.abs,gK=Math.atan2,gZ=Math.cos,gQ=Math.max,gJ=Math.min,g0=Math.sin,g1=Math.sqrt,g2=Math.PI,g5=g2/2,g3=2*g2;function g4(t){return t>=1?g5:t<=-1?-g5:Math.asin(t)}function g6(t){return t.innerRadius}function g8(t){return t.outerRadius}function g9(t){return t.startAngle}function g7(t){return t.endAngle}function vt(t){return t&&t.padAngle}function ve(t,e,n,r,i,a,o){var l=t-n,s=e-r,u=(o?a:-a)/g1(l*l+s*s),c=u*s,f=-u*l,h=t+c,d=e+f,p=n+c,y=r+f,g=(h+p)/2,v=(d+y)/2,b=p-h,x=y-d,O=b*b+x*x,w=i-a,k=h*y-p*d,_=(x<0?-1:1)*g1(gQ(0,w*w*O-k*k)),M=(k*x-b*_)/O,E=(-k*b-x*_)/O,A=(k*x+b*_)/O,S=(-k*b+x*_)/O,j=M-g,P=E-v,T=A-g,C=S-v;return j*j+P*P>T*T+C*C&&(M=A,E=S),{cx:M,cy:E,x01:-c,y01:-f,x11:M*(i/w-1),y11:E*(i/w-1)}}function vn(){var t=g6,e=g8,n=yq(0),r=null,i=g9,a=g7,o=vt,l=null,s=yJ(u);function u(){var u,c,f=+t.apply(this,arguments),h=+e.apply(this,arguments),d=i.apply(this,arguments)-g5,p=a.apply(this,arguments)-g5,y=gX(p-d),g=p>d;if(l||(l=u=s()),h<f&&(c=h,h=f,f=c),h>1e-12)if(y>g3-1e-12)l.moveTo(h*gZ(d),h*g0(d)),l.arc(0,0,h,d,p,!g),f>1e-12&&(l.moveTo(f*gZ(p),f*g0(p)),l.arc(0,0,f,p,d,g));else{var v,b,x=d,O=p,w=d,k=p,_=y,M=y,E=o.apply(this,arguments)/2,A=E>1e-12&&(r?+r.apply(this,arguments):g1(f*f+h*h)),S=gJ(gX(h-f)/2,+n.apply(this,arguments)),j=S,P=S;if(A>1e-12){var T=g4(A/f*g0(E)),C=g4(A/h*g0(E));(_-=2*T)>1e-12?(T*=g?1:-1,w+=T,k-=T):(_=0,w=k=(d+p)/2),(M-=2*C)>1e-12?(C*=g?1:-1,x+=C,O-=C):(M=0,x=O=(d+p)/2)}var N=h*gZ(x),L=h*g0(x),I=f*gZ(k),R=f*g0(k);if(S>1e-12){var D,B=h*gZ(O),F=h*g0(O),z=f*gZ(w),$=f*g0(w);if(y<g2)if(D=function(t,e,n,r,i,a,o,l){var s=n-t,u=r-e,c=o-i,f=l-a,h=f*s-c*u;if(!(h*h<1e-12))return h=(c*(e-a)-f*(t-i))/h,[t+h*s,e+h*u]}(N,L,z,$,B,F,I,R)){var W,G=N-D[0],q=L-D[1],H=B-D[0],Y=F-D[1],V=1/g0(((W=(G*H+q*Y)/(g1(G*G+q*q)*g1(H*H+Y*Y)))>1?0:W<-1?g2:Math.acos(W))/2),U=g1(D[0]*D[0]+D[1]*D[1]);j=gJ(S,(f-U)/(V-1)),P=gJ(S,(h-U)/(V+1))}else j=P=0}M>1e-12?P>1e-12?(v=ve(z,$,N,L,h,P,g),b=ve(B,F,I,R,h,P,g),l.moveTo(v.cx+v.x01,v.cy+v.y01),P<S?l.arc(v.cx,v.cy,P,gK(v.y01,v.x01),gK(b.y01,b.x01),!g):(l.arc(v.cx,v.cy,P,gK(v.y01,v.x01),gK(v.y11,v.x11),!g),l.arc(0,0,h,gK(v.cy+v.y11,v.cx+v.x11),gK(b.cy+b.y11,b.cx+b.x11),!g),l.arc(b.cx,b.cy,P,gK(b.y11,b.x11),gK(b.y01,b.x01),!g))):(l.moveTo(N,L),l.arc(0,0,h,x,O,!g)):l.moveTo(N,L),f>1e-12&&_>1e-12?j>1e-12?(v=ve(I,R,B,F,f,-j,g),b=ve(N,L,z,$,f,-j,g),l.lineTo(v.cx+v.x01,v.cy+v.y01),j<S?l.arc(v.cx,v.cy,j,gK(v.y01,v.x01),gK(b.y01,b.x01),!g):(l.arc(v.cx,v.cy,j,gK(v.y01,v.x01),gK(v.y11,v.x11),!g),l.arc(0,0,f,gK(v.cy+v.y11,v.cx+v.x11),gK(b.cy+b.y11,b.cx+b.x11),g),l.arc(b.cx,b.cy,j,gK(b.y11,b.x11),gK(b.y01,b.x01),!g))):l.arc(0,0,f,k,w,g):l.lineTo(I,R)}else l.moveTo(0,0);if(l.closePath(),u)return l=null,u+""||null}return u.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +a.apply(this,arguments))/2-g2/2;return[gZ(r)*n,g0(r)*n]},u.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:yq(+e),u):t},u.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:yq(+t),u):e},u.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:yq(+t),u):n},u.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:yq(+t),u):r},u.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:yq(+t),u):i},u.endAngle=function(t){return arguments.length?(a="function"==typeof t?t:yq(+t),u):a},u.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:yq(+t),u):o},u.context=function(t){return arguments.length?(l=null==t?null:t,u):l},u}var vr=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function vi(t,e,n,r,i={}){let{inset:a=0,radius:o=0,insetLeft:l=a,insetTop:s=a,insetRight:u=a,insetBottom:c=a,radiusBottomLeft:f=o,radiusBottomRight:h=o,radiusTopLeft:d=o,radiusTopRight:p=o,minWidth:y=-1/0,maxWidth:g=1/0,minHeight:v=-1/0}=i,b=vr(i,["inset","radius","insetLeft","insetTop","insetRight","insetBottom","radiusBottomLeft","radiusBottomRight","radiusTopLeft","radiusTopRight","minWidth","maxWidth","minHeight"]);if(!fB(r)&&!fz(r)){let n=!!fD(r),[i,,a]=n?yD(e):e,[o,x]=i,[O,w]=yA(a,i),k=Math.abs(O),_=Math.abs(w),M=(O>0?o:o+O)+l,E=(w>0?x:x+w)+s,A=k-(l+u),S=_-(s+c),j=n?fT(A,v,1/0):fT(A,y,g),P=n?fT(S,y,g):fT(S,v,1/0),T=n?M:M-(j-A)/2,C=n?E-(P-S)/2:E-(P-S);return cX(t.createElement("rect",{})).style("x",T).style("y",C).style("width",j).style("height",P).style("radius",[d,p,h,f]).call(yL,b).node()}let{y:x,y1:O}=n,w=r.getCenter(),k=yB(r,e,[x,O]),_=vn().cornerRadius(o).padAngle(a*Math.PI/180);return cX(t.createElement("path",{})).style("d",_(k)).style("transform",`translate(${w[0]}, ${w[1]})`).style("radius",o).style("inset",a).call(yL,b).node()}let va=(t,e)=>{let{colorAttribute:n,opacityAttribute:r="fill",first:i=!0,last:a=!0}=t,o=vr(t,["colorAttribute","opacityAttribute","first","last"]),{coordinate:l,document:s}=e;return(e,r,u)=>{let{color:c,radius:f=0}=u,h=vr(u,["color","radius"]),d=h.lineWidth||1,{stroke:p,radius:y=f,radiusTopLeft:g=y,radiusTopRight:v=y,radiusBottomRight:b=y,radiusBottomLeft:x=y,innerRadius:O=0,innerRadiusTopLeft:w=O,innerRadiusTopRight:k=O,innerRadiusBottomRight:_=O,innerRadiusBottomLeft:M=O,lineWidth:E="stroke"===n||p?d:0,inset:A=0,insetLeft:S=A,insetRight:j=A,insetBottom:P=A,insetTop:T=A,minWidth:C,maxWidth:N,minHeight:L}=o,I=vr(o,["stroke","radius","radiusTopLeft","radiusTopRight","radiusBottomRight","radiusBottomLeft","innerRadius","innerRadiusTopLeft","innerRadiusTopRight","innerRadiusBottomRight","innerRadiusBottomLeft","lineWidth","inset","insetLeft","insetRight","insetBottom","insetTop","minWidth","maxWidth","minHeight"]),{color:R=c,opacity:D}=r,B=[i?g:w,i?v:k,a?b:_,a?x:M],F=["radiusTopLeft","radiusTopRight","radiusBottomRight","radiusBottomLeft"];fD(l)&&F.push(F.shift());let z=Object.assign(Object.assign({radius:y},Object.fromEntries(F.map((t,e)=>[t,B[e]]))),{inset:A,insetLeft:S,insetRight:j,insetBottom:P,insetTop:T,minWidth:C,maxWidth:N,minHeight:L});return cX(vi(s,e,r,l,z)).call(yL,h).style("fill","transparent").style(n,R).style(yF(t),D).style("lineWidth",E).style("stroke",void 0===p?R:p).call(yL,I).node()}};function vo(t,e){if(e(t))return!0;if("g"===t.tagName){let{childNodes:n=[]}=t;for(let t of n)if(vo(t,e))return!0}return!1}va.props={defaultEnterAnimation:"scaleInY",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let vl={visibility:"visible",opacity:1,fillOpacity:1,strokeOpacity:1};function vs(t,e,n,r){t.style[e]=n,r&&t.children.forEach(t=>vs(t,e,n,r))}function vu(t){vs(t,"visibility","hidden",!0)}function vc(t){vs(t,"visibility","visible",!0)}var vf=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function vh(t){return cX(t).selectAll(`.${gM}`).nodes().filter(t=>!t.__removed__)}function vd(t,e){return vp(t,e).flatMap(({container:t})=>vh(t))}function vp(t,e){return e.filter(e=>e!==t&&e.options.parentKey===t.options.key)}function vy(t){return cX(t).select(".plot").node()}function vg(t){if("g"===t.tagName)return t.getRenderBounds();let e=t.getGeometryBounds(),n=new nU;return n.setFromTransformedAABB(e,t.getWorldTransform()),n}function vv(t,e){let{offsetX:n,offsetY:r}=e,{min:[i,a],max:[o,l]}=vg(t);return n<i||n>o||r<a||r>l?null:[n-i,r-a]}function vm(t,e){let{offsetX:n,offsetY:r}=e,[i,a,o,l]=function(t){let{min:[e,n],max:[r,i]}=t.getRenderBounds();return[e,n,r,i]}(t);return[Math.min(o,Math.max(i,n))-i,Math.min(l,Math.max(a,r))-a]}function vb(t){return t=>t.__data__.color}function vx(t){return t=>t.__data__.x}function vO(t){let e=new Map((Array.isArray(t)?t:[t]).flatMap(t=>Array.from(t.markState.keys()).map(e=>[vA(t.key,e.key),e.data])));return t=>{let{index:n,markKey:r,viewKey:i}=t.__data__;return e.get(vA(i,r))[n]}}let vw={selected:3,unselected:3,active:2,inactive:2,default:1},vk={selection:["selected","unselected"],highlight:["active","inactive"]},v_=(t,e,n)=>{vo(t,t=>{"setAttribute"in t&&"function"==typeof t.setAttribute&&t.setAttribute(e,n)})};function vM(t,e){return e.forEach(e=>{let n=e.__interactionStyle__;n?e.__interactionStyle__=Object.assign(Object.assign({},n),t):e.__interactionStyle__=t}),(t=(t,e)=>t,e=v_)=>vE(void 0,t,e)}function vE(t,e=(t,e)=>t,n=v_){let r="__states__",i="__ordinal__",a=t=>vw[t]||vw.default,o=t=>{var e;return null==(e=Object.entries(vk).find(([e,n])=>n.includes(t)))?void 0:e[0]},l=o=>{var l;let{[r]:s=[],[i]:u={}}=o,c=[...s].sort((t,e)=>a(e)-a(t)),f=new Map;for(let e of c)for(let[n,r]of Object.entries((null==(l=null!=t?t:o.__interactionStyle__)?void 0:l[e])||{}))f.has(n)||f.set(n,r);let h=Object.assign({},u);for(let[t,e]of f.entries())h[t]=e;if(0!==Object.keys(h).length){for(let[t,r]of Object.entries(h)){let i=function(t,e){let n;return vo(t,t=>{var r;return"g"!==t.tagName&&(null==(r=t.style)?void 0:r[e])!==void 0&&(n=t.style[e],!0)}),null!=n?n:vl[e]}(o,t),a=e(r,o);n(o,t,a),t in u||(u[t]=i)}o[i]=u}},s=t=>{t[r]||(t[r]=[])};return{setState:(t,...e)=>{s(t),t[r]=[...e],l(t)},updateState:(t,...e)=>{s(t);let n=t[r],i=new Set(e.map(t=>o(t)).filter(t=>void 0!==t)),a=n.filter(t=>!i.has(o(t)));t[r]=[...a,...e],l(t)},removeState:(t,...e)=>{for(let n of(s(t),e)){let e=t[r].indexOf(n);-1!==e&&t[r].splice(e,1)}l(t)},hasState:(t,e)=>(s(t),-1!==t[r].indexOf(e))}}function vA(t,e){return`${t},${e}`}function vS(t,e){let n=(Array.isArray(t)?t:[t]).flatMap(t=>t.marks.map(e=>[vA(t.key,e.key),e.state])),r={};for(let t of e){let[e,i]=Array.isArray(t)?t:[t,{}];r[e]=n.reduce((t,n)=>{var r;let[a,o={}]=n;for(let[n,l]of Object.entries(void 0===(r=o[e])||"object"==typeof r&&0===Object.keys(r).length?i:o[e])){let e=t[n],r=(t,n,r,i)=>a!==vA(i.__data__.viewKey,i.__data__.markKey)?null==e?void 0:e(t,n,r,i):"function"!=typeof l?l:l(t,n,r,i);t[n]=r}return t},{})}return r}function vj(t,e){let n=new Map(t.map((t,e)=>[t,e])),r=e?t.map(e):t;return(t,i)=>{if("function"!=typeof t)return t;let a=n.get(i);return t(e?e(i):i,a,r,i)}}function vP(t){var{link:e=!1,valueof:n=(t,e)=>t,coordinate:r}=t,i=vf(t,["link","valueof","coordinate"]);if(!e)return[()=>{},()=>{}];let a=t=>t.__data__.points,o=(t,e)=>{let[,n,r]=t,[i,,,a]=e;return[n,i,a,r]};return[t=>{var e;if(t.length<=1)return;let r=gc(t,(t,e)=>{let{x:n}=t.__data__,{x:r}=e.__data__;return n-r});for(let t=1;t<r.length;t++){let l=yQ(),s=r[t-1],u=r[t],[c,f,h,d]=o(a(s),a(u));l.moveTo(...c),l.lineTo(...f),l.lineTo(...h),l.lineTo(...d),l.closePath();let p=fb(i,t=>n(t,s)),{fill:y=s.getAttribute("fill")}=p,g=vf(p,["fill"]),v=new lE({className:"element-link",style:Object.assign({d:l.toString(),fill:y,zIndex:-2},g)});null==(e=s.link)||e.remove(),s.parentNode.appendChild(v),s.link=v}},t=>{var e;null==(e=t.link)||e.remove(),t.link=null}]}function vT(t,e,n){let r=e=>{let{transform:n}=t.style;return n?`${n} ${e}`:e};if(fB(n)){let{points:i}=t.__data__,[a,o]=fD(n)?yD(i):i,l=n.getCenter(),s=yA(a,l),u=yA(o,l),c=yj(s)+yT(s,u)/2,f=e*Math.cos(c),h=e*Math.sin(c);return r(`translate(${f}, ${h})`)}return r(fD(n)?`translate(${e}, 0)`:`translate(0, ${-e})`)}function vC(t){var{document:e,background:n,scale:r,coordinate:i,valueof:a}=t,o=vf(t,["document","background","scale","coordinate","valueof"]);let l="element-background";if(!n)return[()=>{},()=>{}];let s=(t,e,n)=>{let r=t.invert(e),i=e+t.getBandWidth(r)/2,a=t.getStep(r)/2,o=a*n;return[i-a+o,i+a-o]};return[t=>{t.background&&t.background.remove();let n=fb(o,e=>a(e,t)),{fill:u="#CCD6EC",fillOpacity:c=.3,zIndex:f=-2,padding:h=.001,lineWidth:d=0}=n,p=Object.assign(Object.assign({},vf(n,["fill","fillOpacity","zIndex","padding","lineWidth"])),{fill:u,fillOpacity:c,zIndex:f,padding:h,lineWidth:d}),y=((()=>{let{x:t,y:e}=r;return[t,e].some(gG)})()?(t,n)=>{let{padding:a}=n,[o,l]=((t,e)=>{let{x:n}=r;if(!gG(n))return[0,1];let{__data__:i}=t,{x:a}=i,[o,l]=s(n,a,e);return[o,l]})(t,a),[u,c]=((t,e)=>{let{y:n}=r;if(!gG(n))return[0,1];let{__data__:i}=t,{y:a}=i,[o,l]=s(n,a,e);return[o,l]})(t,a),f=[[o,u],[l,u],[l,c],[o,c]].map(t=>i.map(t)),{__data__:h}=t,{y:d,y1:p}=h;return vi(e,f,{y:d,y1:p},i,n)}:(t,e)=>{let{transform:n="scale(1.2, 1.2)",transformOrigin:r="center center",stroke:i=""}=e,a=Object.assign({transform:n,transformOrigin:r,stroke:i},vf(e,["transform","transformOrigin","stroke"])),o=t.cloneNode(!0);for(let[t,e]of Object.entries(a))o.style[t]=e;return o})(t,p);y.className=l,t.parentNode.parentNode.appendChild(y),t.background=y},t=>{var e;null==(e=t.background)||e.remove(),t.background=null},t=>t.className===l]}function vN(t,e){let n=t.getRootNode().defaultView.getContextService().getDomElement();(null==n?void 0:n.style)&&(t.cursor=n.style.cursor,n.style.cursor=e)}function vL(t,e,n){return t.find(t=>Object.entries(e).every(([e,r])=>n(t)[e]===r))}function vI(t,e){return Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2))}function vR(t,e=!1){let n=gD(t,t=>!!t).map((t,e)=>[0===e?"M":"L",...t]);return e&&n.push(["Z"]),n}function vD(t){return t.querySelectorAll(".element")}function vB(t,e){if(e(t))return t;let n=t.parent;for(;n&&!e(n);)n=n.parent;return n}let vF=["interval","point","density"];function vz({elementsof:t,root:e,coordinate:n,scale:r,validFindByXMarks:i=vF}){var a,o;let l=t(e),s=t=>i.includes(t.markType);if(l.find(s)){l=l.filter(s);let t=r.x,i=r.series,u=null!=(o=null==(a=null==t?void 0:t.getBandWidth)?void 0:a.call(t))?o:0,c=i?t=>{var e,n;let r=Math.round(1/(null!=(e=i.valueBandWidth)?e:1));return t.__data__.x+(null!=(n=t.__data__.series)?n:0)*u+u/(2*r)}:t=>t.__data__.x+u/2;return l.sort((t,e)=>c(t)-c(e)),t=>{let r=vv(e,t);if(!r)return;let[i]=n.invert(r),a=(0,gI(c).center)(l,i);return l[a]}}return t=>{let{target:e}=t;return vB(e,t=>!!t.classList&&t.classList.includes("element"))}}function v$(t){return!1===t||null==t}function vW(t,e){let n=new Set;for(let r of e){let{scale:e}=r,i=null==e?void 0:e[t];if(!i)continue;if(i.independent)return!0;let a=i.key||"default";if(n.add(a),n.size>1)return!0}return!1}function vG(t){var e,n,r,i,a,o,l,s;let u=Array.from(t.markState.keys()),c=vW("x",u),f=vW("y",u),h=[],d=[],p=[],y=[],g=new Map,v=new Map,b=new Map,x=new Map,O=1,w=1;for(let[u]of t.markState.entries()){let t=u.key,k=(null==(n=null==(e=null==u?void 0:u.scale)?void 0:e.x)?void 0:n.key)||"x";if((null==(i=null==(r=null==u?void 0:u.scale)?void 0:r.x)?void 0:i.independent)||c&&"x"!==k){d.push(t),b.has(k)||b.set(k,O++);let e=b.get(k);g.set(t,`x${e}`)}else h.push(t),g.set(t,"x");let _=(null==(o=null==(a=null==u?void 0:u.scale)?void 0:a.y)?void 0:o.key)||"y";if((null==(s=null==(l=null==u?void 0:u.scale)?void 0:l.y)?void 0:s.independent)||f&&"y"!==_){y.push(t),x.has(_)||x.set(_,w++);let e=x.get(_);v.set(t,`y${e}`)}else p.push(t),v.set(t,"y")}return{hasIndependentX:c,hasIndependentY:f,marksWithSharedX:h,marksWithIndependentX:d,marksWithSharedY:p,marksWithIndependentY:y,markToXScaleMap:g,markToYScaleMap:v}}function vq(t,e,n,r=t=>!0){return i=>{if(!r(i))return;n.emit(`plot:${t}`,i);let{target:a}=i;if(!a)return;let{className:o}=a;if("plot"===o)return;let l=vB(a,t=>"element"===t.className),s=vB(a,t=>"component"===t.className),u=vB(a,t=>"label"===t.className),c=l||s||u;if(!c)return;let{className:f,markType:h}=c,d=Object.assign(Object.assign({},i),{nativeEvent:!0});"element"===f?(d.data={data:cR(c,e)},n.emit(`element:${t}`,d),n.emit(`${h}:${t}`,d)):"label"===f?(d.data={data:c.attributes.datum},n.emit(`label:${t}`,d),o.split(/\s+/).filter(Boolean).forEach(e=>{n.emit(`${e}:${t}`,d)})):(n.emit(`component:${t}`,d),o.split(/\s+/).filter(Boolean).forEach(e=>{n.emit(`${e}:${t}`,d)}))}}function vH(){return(t,e,n)=>{let{container:r,view:i}=t,a=vq("click",i,n,t=>1===t.detail),o=vq("dblclick",i,n,t=>2===t.detail),l=vq("pointertap",i,n),s=vq("pointerdown",i,n),u=vq("pointerup",i,n),c=vq("pointerover",i,n),f=vq("pointerout",i,n),h=vq("pointermove",i,n),d=vq("pointerenter",i,n),p=vq("pointerleave",i,n),y=vq("pointerupoutside",i,n),g=vq("dragstart",i,n),v=vq("drag",i,n),b=vq("dragend",i,n),x=vq("dragenter",i,n),O=vq("dragleave",i,n),w=vq("dragover",i,n),k=vq("DROP",i,n);return r.addEventListener("click",a),r.addEventListener("click",o),r.addEventListener("pointertap",l),r.addEventListener("pointerdown",s),r.addEventListener("pointerup",u),r.addEventListener("pointerover",c),r.addEventListener("pointerout",f),r.addEventListener("pointermove",h),r.addEventListener("pointerenter",d),r.addEventListener("pointerleave",p),r.addEventListener("pointerupoutside",y),r.addEventListener("dragstart",g),r.addEventListener("drag",v),r.addEventListener("dragend",b),r.addEventListener("dragenter",x),r.addEventListener("dragleave",O),r.addEventListener("dragover",w),r.addEventListener("drop",k),()=>{r.removeEventListener("click",a),r.removeEventListener("click",o),r.removeEventListener("pointertap",l),r.removeEventListener("pointerdown",s),r.removeEventListener("pointerup",u),r.removeEventListener("pointerover",c),r.removeEventListener("pointerout",f),r.removeEventListener("pointermove",h),r.removeEventListener("pointerenter",d),r.removeEventListener("pointerleave",p),r.removeEventListener("pointerupoutside",y),r.removeEventListener("dragstart",g),r.removeEventListener("drag",v),r.removeEventListener("dragend",b),r.removeEventListener("dragenter",x),r.removeEventListener("dragleave",O),r.removeEventListener("dragover",w),r.removeEventListener("drop",k)}}}vH.props={reapplyWhenUpdate:!0};var vY=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function vV(t,e){let n=Object.assign(Object.assign({},{"component.axisRadar":pf,"component.axisLinear":ps,"component.axisArc":pu,"component.legendContinuousBlock":yg,"component.legendContinuousBlockSize":ym,"component.legendContinuousSize":yv,"interaction.event":vH,"composition.mark":yx,"composition.view":yE,"shape.label.label":gO,"shape.break":gN}),e),r=e=>{if("string"!=typeof e)return e;let r=`${t}.${e}`;return n[r]||cz(`Unknown Component: ${r}`)};return[(t,e)=>{let{type:n}=t,i=vY(t,["type"]);n||cz("Plot type is required!");let a=r(n);return null==a?void 0:a(i,e)},r]}function vU(t){let{canvas:e,group:n}=t;return(null==e?void 0:e.document)||(null==n?void 0:n.ownerDocument)||cz("Cannot find library document")}var vX=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function vK(t,e){let{coordinate:n={},coordinates:r}=t,i=vX(t,["coordinate","coordinates"]);if(r)return t;let{type:a,transform:o=[]}=n,l=vX(n,["type","transform"]);if(!a)return Object.assign(Object.assign({},i),{coordinates:o});let[,s]=vV("coordinate",e),{transform:u=!1}=s(a).props||{};if(u)throw Error(`Unknown coordinate: ${a}.`);return Object.assign(Object.assign({},i),{coordinates:[Object.assign({type:a},l),...o]})}function vZ(t,e){return t.filter(t=>t.type===e)}function vQ(t){return vZ(t,"polar").length>0}function vJ(t){return vZ(t,"transpose").length%2==1}function v0(t){return vZ(t,"theta").length>0}function v1(t){return vZ(t,"radial").length>0}function v2(t){return vZ(t,"radar").length>0}function v5(t){for(var e=t.length/6|0,n=Array(e),r=0;r<e;)n[r]="#"+t.slice(6*r,6*++r);return n}let v3=v5("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),v4=v5("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),v6=v5("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),v8=v5("4269d0efb118ff725c6cc5b03ca951ff8ab7a463f297bbf59c6b4e9498a0"),v9=v5("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),v7=v5("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),mt=v5("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),me=v5("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),mn=v5("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),mr=v5("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),mi=v5("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function ma(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function mo(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function ml(){}var ms="\\s*([+-]?\\d+)\\s*",mu="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",mc="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",mf=/^#([0-9a-f]{3,8})$/,mh=RegExp(`^rgb\\(${ms},${ms},${ms}\\)$`),md=RegExp(`^rgb\\(${mc},${mc},${mc}\\)$`),mp=RegExp(`^rgba\\(${ms},${ms},${ms},${mu}\\)$`),my=RegExp(`^rgba\\(${mc},${mc},${mc},${mu}\\)$`),mg=RegExp(`^hsl\\(${mu},${mc},${mc}\\)$`),mv=RegExp(`^hsla\\(${mu},${mc},${mc},${mu}\\)$`),mm={aliceblue:0xf0f8ff,antiquewhite:0xfaebd7,aqua:65535,aquamarine:8388564,azure:0xf0ffff,beige:0xf5f5dc,bisque:0xffe4c4,black:0,blanchedalmond:0xffebcd,blue:255,blueviolet:9055202,brown:0xa52a2a,burlywood:0xdeb887,cadetblue:6266528,chartreuse:8388352,chocolate:0xd2691e,coral:0xff7f50,cornflowerblue:6591981,cornsilk:0xfff8dc,crimson:0xdc143c,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:0xb8860b,darkgray:0xa9a9a9,darkgreen:25600,darkgrey:0xa9a9a9,darkkhaki:0xbdb76b,darkmagenta:9109643,darkolivegreen:5597999,darkorange:0xff8c00,darkorchid:0x9932cc,darkred:9109504,darksalmon:0xe9967a,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:0xff1493,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:0xb22222,floralwhite:0xfffaf0,forestgreen:2263842,fuchsia:0xff00ff,gainsboro:0xdcdcdc,ghostwhite:0xf8f8ff,gold:0xffd700,goldenrod:0xdaa520,gray:8421504,green:32768,greenyellow:0xadff2f,grey:8421504,honeydew:0xf0fff0,hotpink:0xff69b4,indianred:0xcd5c5c,indigo:4915330,ivory:0xfffff0,khaki:0xf0e68c,lavender:0xe6e6fa,lavenderblush:0xfff0f5,lawngreen:8190976,lemonchiffon:0xfffacd,lightblue:0xadd8e6,lightcoral:0xf08080,lightcyan:0xe0ffff,lightgoldenrodyellow:0xfafad2,lightgray:0xd3d3d3,lightgreen:9498256,lightgrey:0xd3d3d3,lightpink:0xffb6c1,lightsalmon:0xffa07a,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:0xb0c4de,lightyellow:0xffffe0,lime:65280,limegreen:3329330,linen:0xfaf0e6,magenta:0xff00ff,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:0xba55d3,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:0xc71585,midnightblue:1644912,mintcream:0xf5fffa,mistyrose:0xffe4e1,moccasin:0xffe4b5,navajowhite:0xffdead,navy:128,oldlace:0xfdf5e6,olive:8421376,olivedrab:7048739,orange:0xffa500,orangered:0xff4500,orchid:0xda70d6,palegoldenrod:0xeee8aa,palegreen:0x98fb98,paleturquoise:0xafeeee,palevioletred:0xdb7093,papayawhip:0xffefd5,peachpuff:0xffdab9,peru:0xcd853f,pink:0xffc0cb,plum:0xdda0dd,powderblue:0xb0e0e6,purple:8388736,rebeccapurple:6697881,red:0xff0000,rosybrown:0xbc8f8f,royalblue:4286945,saddlebrown:9127187,salmon:0xfa8072,sandybrown:0xf4a460,seagreen:3050327,seashell:0xfff5ee,sienna:0xa0522d,silver:0xc0c0c0,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:0xfffafa,springgreen:65407,steelblue:4620980,tan:0xd2b48c,teal:32896,thistle:0xd8bfd8,tomato:0xff6347,turquoise:4251856,violet:0xee82ee,wheat:0xf5deb3,white:0xffffff,whitesmoke:0xf5f5f5,yellow:0xffff00,yellowgreen:0x9acd32};function mb(){return this.rgb().formatHex()}function mx(){return this.rgb().formatRgb()}function mO(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=mf.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?mw(e):3===n?new mE(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?mk(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?mk(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=mh.exec(t))?new mE(e[1],e[2],e[3],1):(e=md.exec(t))?new mE(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=mp.exec(t))?mk(e[1],e[2],e[3],e[4]):(e=my.exec(t))?mk(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=mg.exec(t))?mC(e[1],e[2]/100,e[3]/100,1):(e=mv.exec(t))?mC(e[1],e[2]/100,e[3]/100,e[4]):mm.hasOwnProperty(t)?mw(mm[t]):"transparent"===t?new mE(NaN,NaN,NaN,0):null}function mw(t){return new mE(t>>16&255,t>>8&255,255&t,1)}function mk(t,e,n,r){return r<=0&&(t=e=n=NaN),new mE(t,e,n,r)}function m_(t){return(t instanceof ml||(t=mO(t)),t)?new mE((t=t.rgb()).r,t.g,t.b,t.opacity):new mE}function mM(t,e,n,r){return 1==arguments.length?m_(t):new mE(t,e,n,null==r?1:r)}function mE(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function mA(){return`#${mT(this.r)}${mT(this.g)}${mT(this.b)}`}function mS(){let t=mj(this.opacity);return`${1===t?"rgb(":"rgba("}${mP(this.r)}, ${mP(this.g)}, ${mP(this.b)}${1===t?")":`, ${t})`}`}function mj(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function mP(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function mT(t){return((t=mP(t))<16?"0":"")+t.toString(16)}function mC(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new mL(t,e,n,r)}function mN(t){if(t instanceof mL)return new mL(t.h,t.s,t.l,t.opacity);if(t instanceof ml||(t=mO(t)),!t)return new mL;if(t instanceof mL)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),o=NaN,l=a-i,s=(a+i)/2;return l?(o=e===a?(n-r)/l+(n<r)*6:n===a?(r-e)/l+2:(e-n)/l+4,l/=s<.5?a+i:2-a-i,o*=60):l=s>0&&s<1?0:o,new mL(o,l,s,t.opacity)}function mL(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function mI(t){return(t=(t||0)%360)<0?t+360:t}function mR(t){return Math.max(0,Math.min(1,t||0))}function mD(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}function mB(t,e,n,r,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*n+(1+3*t+3*a-3*o)*r+o*i)/6}ma(ml,mO,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:mb,formatHex:mb,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return mN(this).formatHsl()},formatRgb:mx,toString:mx}),ma(mE,mM,mo(ml,{brighter(t){return t=null==t?1.4285714285714286:Math.pow(1.4285714285714286,t),new mE(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new mE(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new mE(mP(this.r),mP(this.g),mP(this.b),mj(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:mA,formatHex:mA,formatHex8:function(){return`#${mT(this.r)}${mT(this.g)}${mT(this.b)}${mT((isNaN(this.opacity)?1:this.opacity)*255)}`},formatRgb:mS,toString:mS})),ma(mL,function(t,e,n,r){return 1==arguments.length?mN(t):new mL(t,e,n,null==r?1:r)},mo(ml,{brighter(t){return t=null==t?1.4285714285714286:Math.pow(1.4285714285714286,t),new mL(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new mL(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new mE(mD(t>=240?t-240:t+120,i,r),mD(t,i,r),mD(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new mL(mI(this.h),mR(this.s),mR(this.l),mj(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(){let t=mj(this.opacity);return`${1===t?"hsl(":"hsla("}${mI(this.h)}, ${100*mR(this.s)}%, ${100*mR(this.l)}%${1===t?")":`, ${t})`}`}}));let mF=t=>()=>t;function mz(t,e){return function(n){return t+n*e}}function m$(t,e){var n=e-t;return n?mz(t,n):mF(isNaN(t)?e:t)}function mW(t){return function(e){var n,r,i=e.length,a=Array(i),o=Array(i),l=Array(i);for(n=0;n<i;++n)r=mM(e[n]),a[n]=r.r||0,o[n]=r.g||0,l[n]=r.b||0;return a=t(a),o=t(o),l=t(l),r.opacity=1,function(t){return r.r=a(t),r.g=o(t),r.b=l(t),r+""}}}!function t(e){var n,r=1==(n=+e)?m$:function(t,e){var r,i,a;return e-t?(r=t,i=e,r=Math.pow(r,a=n),i=Math.pow(i,a)-r,a=1/a,function(t){return Math.pow(r+t*i,a)}):mF(isNaN(t)?e:t)};function i(t,e){var n=r((t=mM(t)).r,(e=mM(e)).r),i=r(t.g,e.g),a=r(t.b,e.b),o=m$(t.opacity,e.opacity);return function(e){return t.r=n(e),t.g=i(e),t.b=a(e),t.opacity=o(e),t+""}}return i.gamma=t,i}(1);var mG=mW(function(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],a=t[r+1],o=r>0?t[r-1]:2*i-a,l=r<e-1?t[r+2]:2*a-i;return mB((n-r/e)*e,o,i,a,l)}});mW(function(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),i=t[(r+e-1)%e],a=t[r%e],o=t[(r+1)%e],l=t[(r+2)%e];return mB((n-r/e)*e,i,a,o,l)}});let mq=t=>mG(t[t.length-1]);var mH=[,,,].concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(v5);let mY=mq(mH);var mV=[,,,].concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(v5);let mU=mq(mV);var mX=[,,,].concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(v5);let mK=mq(mX);var mZ=[,,,].concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(v5);let mQ=mq(mZ);var mJ=[,,,].concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(v5);let m0=mq(mJ);var m1=[,,,].concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(v5);let m2=mq(m1);var m5=[,,,].concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(v5);let m3=mq(m5);var m4=[,,,].concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(v5);let m6=mq(m4);var m8=[,,,].concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(v5);let m9=mq(m8);var m7=[,,,].concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(v5);let bt=mq(m7);var be=[,,,].concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(v5);let bn=mq(be);var br=[,,,].concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(v5);let bi=mq(br);var ba=[,,,].concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(v5);let bo=mq(ba);var bl=[,,,].concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(v5);let bs=mq(bl);var bu=[,,,].concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(v5);let bc=mq(bu);var bf=[,,,].concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(v5);let bh=mq(bf);var bd=[,,,].concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(v5);let bp=mq(bd);var by=[,,,].concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(v5);let bg=mq(by);var bv=[,,,].concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(v5);let bm=mq(bv);var bb=[,,,].concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(v5);let bx=mq(bb);var bO=[,,,].concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(v5);let bw=mq(bO);var bk=[,,,].concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(v5);let b_=mq(bk);var bM=[,,,].concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(v5);let bE=mq(bM);var bA=[,,,].concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(v5);let bS=mq(bA);var bj=[,,,].concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(v5);let bP=mq(bj);var bT=[,,,].concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(v5);let bC=mq(bT);var bN=[,,,].concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(v5);let bL=mq(bN);function bI(t){return"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-(t=Math.max(0,Math.min(1,t)))*(35.34-t*(2381.73-t*(6402.7-t*(7024.72-2710.57*t)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-67.37*t)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-2475.67*t)))))))+")"}let bR=Math.PI/180,bD=180/Math.PI;var bB=-1.78277*.29227-.1347134789;function bF(t,e,n,r){return 1==arguments.length?function(t){if(t instanceof bz)return new bz(t.h,t.s,t.l,t.opacity);t instanceof mE||(t=m_(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=(bB*r+-1.7884503806*e-3.5172982438*n)/(bB+-1.7884503806-3.5172982438),a=r-i,o=-((1.97294*(n-i)- -.29227*a)/.90649),l=Math.sqrt(o*o+a*a)/(1.97294*i*(1-i)),s=l?Math.atan2(o,a)*bD-120:NaN;return new bz(s<0?s+360:s,l,i,t.opacity)}(t):new bz(t,e,n,null==r?1:r)}function bz(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function b$(t){return function e(n){function r(e,r){var i=t((e=bF(e)).h,(r=bF(r)).h),a=m$(e.s,r.s),o=m$(e.l,r.l),l=m$(e.opacity,r.opacity);return function(t){return e.h=i(t),e.s=a(t),e.l=o(Math.pow(t,n)),e.opacity=l(t),e+""}}return n*=1,r.gamma=e,r}(1)}ma(bz,bF,mo(ml,{brighter(t){return t=null==t?1.4285714285714286:Math.pow(1.4285714285714286,t),new bz(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new bz(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*bR,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),i=Math.sin(t);return new mE(255*(e+n*(-.14861*r+1.78277*i)),255*(e+n*(-.29227*r+-.90649*i)),255*(e+1.97294*r*n),this.opacity)}})),b$(function(t,e){var n=e-t;return n?mz(t,n>180||n<-180?n-360*Math.round(n/360):n):mF(isNaN(t)?e:t)});var bW=b$(m$);let bG=bW(bF(300,.5,0),bF(-240,.5,1));var bq=bW(bF(-100,.75,.35),bF(80,1.5,.8)),bH=bW(bF(260,.75,.35),bF(80,1.5,.8)),bY=bF();function bV(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return bY.h=360*t-100,bY.s=1.5-1.5*e,bY.l=.8-.9*e,bY+""}var bU=mM(),bX=Math.PI/3,bK=2*Math.PI/3;function bZ(t){var e;return bU.r=255*(e=Math.sin(t=(.5-t)*Math.PI))*e,bU.g=255*(e=Math.sin(t+bX))*e,bU.b=255*(e=Math.sin(t+bK))*e,bU+""}function bQ(t){return"rgb("+Math.max(0,Math.min(255,Math.round(34.61+(t=Math.max(0,Math.min(1,t)))*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-14825.05*t)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+707.56*t)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-6838.66*t)))))))+")"}function bJ(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}let b0=bJ(v5("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var b1=bJ(v5("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),b2=bJ(v5("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),b5=bJ(v5("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function b3(t,e){let n=Object.keys(t);for(let r of Object.values(e)){let{name:e}=r.getOptions();if(e in t){let i=fE(n.filter(t=>t.startsWith(e)).map(t=>+(t.replace(e,"")||0)))+1,a=`${e}${i}`;t[a]=r,r.getOptions().key=a}else t[e]=r}return t}function b4(t,e){let n,r,[i]=vV("scale",e),{relations:a}=t,[o]=a&&Array.isArray(a)?[t=>{var e;n=t.map.bind(t),r=null==(e=t.invert)?void 0:e.bind(t);let i=a.filter(([t])=>"function"==typeof t),o=a.filter(([t])=>"function"!=typeof t),l=new Map(o);if(t.map=t=>{for(let[e,n]of i)if(e(t))return n;return l.has(t)?l.get(t):n(t)},!r)return t;let s=new Map(o.map(([t,e])=>[e,t])),u=new Map(i.map(([t,e])=>[e,t]));return t.invert=t=>u.has(t)?t:s.has(t)?s.get(t):r(t),t},t=>(null!==n&&(t.map=n),null!==r&&(t.invert=r),t)]:[cD,cD];return o(i(t))}function b6(t,e){let n=t.filter(({name:t,facet:n=!0})=>n&&t===e),r=n.flatMap(t=>t.domain),i=n.every(b8)?dZ(r):n.every(b9)?Array.from(new Set(r)):null;if(null!==i)for(let t of n)t.domain=i}function b8(t){let{type:e}=t;return"string"==typeof e&&["linear","log","pow","time"].includes(e)}function b9(t){let{type:e}=t;return"string"==typeof e&&["band","point","ordinal"].includes(e)}function b7(t,e,n,r,i){let[a]=vV("palette",i),{category10:o,category20:l}=r,s=Array.from(new Set(n)).length<=o.length?o:l,{palette:u=s,offset:c}=e;if(Array.isArray(u))return u;try{return a({type:u})}catch(e){let t=function(t,e,n=t=>t){if(!t)return null;let r=fu(t),i=J[`scheme${r}`],a=J[`interpolate${r}`];if(!i&&!a)return null;if(i){if(!i.some(Array.isArray))return i;let t=i[e.length];if(t)return t}return e.map((t,r)=>a(n(r/e.length)))}(u,n,c);if(t)return t;throw Error(`Unknown Component: ${u} `)}}function xt(t,e){var n;return e||((n=t).startsWith("x")||n.startsWith("y")||n.startsWith("position")||n.startsWith("size")?"point":"ordinal")}function xe(t,e,n){return n||("color"!==t||e?"linear":"sequential")}function xn(t,e){if(0===t.length)return t;let{domainMin:n,domainMax:r}=e,[i,a]=t;return[null!=n?n:i,null!=r?r:a]}function xr(t){return xa(t,t=>{let e=typeof t;return"string"===e||"boolean"===e})}function xi(t){return xa(t,t=>t instanceof Date)}function xa(t,e){for(let n of t)if(n.some(e))return!0;return!1}let xo={linear:"linear",identity:"identity",log:"log",pow:"pow",sqrt:"sqrt",sequential:"sequential"},xl={threshold:"threshold",quantize:"quantize",quantile:"quantile"},xs={ordinal:"ordinal",band:"band",point:"point"},xu={constant:"constant"};var xc=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function xf(t,e,n,r,i){let[a]=vV("component",r),{scaleInstances:o,scale:l,bbox:s}=t;return a(xc(t,["scaleInstances","scale","bbox"]))({coordinate:e,library:r,markState:i,scales:o,theme:n,value:{bbox:s,library:r},scale:l})}function xh(t,e){let n=["left","right","bottom","top"];return cu(t,({type:t,position:e,group:r})=>n.includes(e)?void 0===r?t.startsWith("legend")?`legend-${e}`:Symbol("independent"):"independent"===r?Symbol("independent"):r:Symbol("independent")).flatMap(([,t])=>{if(1===t.length)return t[0];if(void 0!==e){let n=t.filter(t=>void 0!==t.length).map(t=>t.length),r=fM(n);if(r>e)return t.forEach(t=>t.group=Symbol("independent")),t;let i=(e-r)/(t.length-n.length);t.forEach(t=>{void 0===t.length&&(t.length=i)})}let n=fE(t,t=>t.size),r=fE(t,t=>t.order),i=fE(t,t=>t.crossPadding);return{type:"group",size:n,order:r,position:t[0].position,children:t,crossPadding:i}})}function xd(t){let e=vZ(t,"polar");if(e.length){let{startAngle:t,endAngle:n}=fA(e[e.length-1]);return[t,n]}let n=vZ(t,"radial");if(n.length){let{startAngle:t,endAngle:e}=fj(n[n.length-1]);return[t,e]}return[-Math.PI/2,Math.PI/2*3]}function xp(t,e,n,r,i,a){let{type:o}=t;if(["left","right","bottom","top"].includes(r)&&"string"==typeof o)return(o.startsWith("axis")?function(t,e,n,r,i,a){var o,l;t.transform=t.transform||[{type:"hide"}];let s="left"===r||"right"===r,u=xm(t,r,i),{tickLength:c=0,labelSpacing:f=0,titleSpacing:h=0,labelAutoRotate:d}=u,p=xc(u,["tickLength","labelSpacing","titleSpacing","labelAutoRotate"]),y=xy(t,a),g=xg(p,y),v=c;"function"==typeof t.tickLength&&(v=Math.max(...((null==(o=y.getTicks)?void 0:o.call(y))||y.getOptions().domain).map((e,n,r)=>t.tickLength(e,n,r)),0));let b=v+f;if(g&&g.length){let r=fE(g,t=>t.width),i=fE(g,t=>t.height);if(s)t.size=r+b;else{let{tickFilter:a,labelTransform:o}=t;(function(t,e,n,r,i){if(fM(e,t=>t.width)>n)return!0;let a=t.clone();a.update({range:[0,n]});let o=xb(t,i),l=o.map(t=>a.map(t)+(a.getBandWidth?a.getBandWidth(t)/2:0)),s=o.map((t,e)=>e),u=-r[0],c=n+r[1],f=(t,e)=>{let{width:n}=e;return[t-n/2,t+n/2]};for(let t=0;t<s.length;t++){let[n,r]=f(l[t],e[t]);if(n<u||r>c)return!0;let i=l[t+1];if(i){let[n]=f(i,e[t+1]);if(r>n)return!0}}return!1})(y,g,e,n,a)&&!o&&!1!==d&&null!==d?(t.labelTransform="rotate(90)",t.size=r+b):(t.labelTransform=null!=(l=t.labelTransform)?l:"rotate(0)",t.size=i+b)}}else t.size=v;let x=xv(p);x&&(s?t.size+=h+x.width:t.size+=h+x.height)}:o.startsWith("group")?function(t,e,n,r,i,a){let{children:o}=t,l=fE(o,t=>t.crossPadding);o.forEach(t=>t.crossPadding=l),o.forEach(t=>xp(t,e,n,r,i,a));let s=fE(o,t=>t.size);t.size=s,o.forEach(t=>t.size=s)}:o.startsWith("legendContinuous")?function(t,e,n,r,i,a){let o=(()=>{let{legendContinuous:e}=i;return cy({},e,t)})(),{labelSpacing:l=0,titleSpacing:s=0}=o,u=xc(o,["labelSpacing","titleSpacing"]),c="left"===r||"right"===r,{size:f}=cG(u,"ribbon"),{size:h}=cG(u,"handleIcon");t.size=Math.max(f,2.4*h);let d=xg(u,xy(t,a));if(d){let e=c?"width":"height",n=fE(d,t=>t[e]);t.size+=n+l}let p=xv(u);p&&(c?t.size=Math.max(t.size,p.width):t.size+=s+p.height)}:"legendCategory"===o?function(t,e,n,r,i,a){let o=(()=>{let{legendCategory:e}=i,{title:n}=t,[r,a]=Array.isArray(n)?[n,void 0]:[void 0,n];return cy({title:r},e,Object.assign(Object.assign({},t),{title:a}))})(),{focus:l,itemSpacing:s,focusMarkerSize:u,itemMarkerSize:c,titleSpacing:f,rowPadding:h,colPadding:d,maxCols:p=1/0,maxRows:y=1/0}=o,g=xc(o,["focus","itemSpacing","focusMarkerSize","itemMarkerSize","titleSpacing","rowPadding","colPadding","maxCols","maxRows"]),{cols:v,length:b}=t,x="left"===r||"right"===r,O=void 0===b?e+(x?0:n[0]+n[1]):b,w=xv(g),k=xg(g,xy(t,a),"itemLabel"),_=Math.max(k[0].height,c)+h,M=(t,e=0)=>c+t+s[0]+e+(l?u+s[2]:0);if(x)(()=>{let e=-1/0,n=0,r=1,i=0,a=-1/0,o=-1/0,l=w?w.height:0,s=O-l;for(let{width:t}of k)e=Math.max(e,M(t,d)),n+_>s?(r++,a=Math.max(a,i),o=Math.max(o,n),i=1,n=_):(n+=_,i++);r<=1&&(a=i,o=n),t.size=e*Math.min(r,p),t.length=o+l,cy(t,{cols:Math.min(r,p),gridRow:a})})();else if("number"==typeof v){let e=Math.ceil(k.length/v),n=fE(k,t=>M(t.width))*v;t.size=_*Math.min(e,y)-h,t.length=Math.min(n,O)}else{let e=1,n=0,r=-1/0;for(let{width:t}of k){let i=M(t,d);n+i>O?(r=Math.max(r,n),n=i,e++):n+=i}1===e&&(r=n),t.size=_*Math.min(e,y)-h,t.length=r}w&&(x?t.size=Math.max(t.size,w.width):t.size+=f+w.height)}:o.startsWith("slider")?function(t,e,n,r,i,a){let{trackSize:o,handleIconSize:l}=(()=>{let{slider:e}=i;return cy({},e,t)})();t.size=Math.max(o,2.4*l)}:"title"===o?function(t,e,n,r,i,a){let o=cy({},i.title,t),{title:l,subtitle:s,spacing:u=0}=o,c=xc(o,["title","subtitle","spacing"]);if(l&&(t.size=xx(l,cG(c,"title")).height),s){let e=xx(s,cG(c,"subtitle"));t.size+=u+e.height}}:o.startsWith("scrollbar")?function(t,e,n,r,i,a){let{trackSize:o=6}=cy({},i.scrollbar,t);t.size=o}:()=>{})(t,e,n,r,i,a)}function xy(t,e){let[n]=vV("scale",e),{scales:r,tickCount:i,tickMethod:a}=t,o=r.find(t=>"constant"!==t.type&&"identity"!==t.type);return void 0!==i&&(o.tickCount=i),void 0!==a&&(o.tickMethod=a),n(o)}function xg(t,e,n="label"){var r,i;let a,o,{labelFormatter:l,tickFilter:s,label:u=!0}=t,c=xc(t,["labelFormatter","tickFilter","label"]);if(!u)return null;let f=(r=e,i=l,a=xb(r,s).map(t=>"number"==typeof t?fC(t):t),o=i?"string"==typeof i?Ex(i):i:r.getFormatter?r.getFormatter():t=>`${t}`,a.map(o)),h=cG(c,n),d=f.map((t,e)=>Object.fromEntries(Object.entries(h).map(([n,r])=>[n,"function"==typeof r?r(t,e):r]))),p=f.map((t,e)=>xx(t,d[e]));return d.some(t=>t.transform)||(t.indexBBox=new Map(f.map((t,e)=>e).map(t=>[t,[f[t],p[t]]]))),p}function xv(t){let{title:e}=t,n=xc(t,["title"]);if(!1===e||null==e)return null;let r=cG(n,"title"),{direction:i,transform:a}=r,o=Array.isArray(e)?e.join(","):e;return"string"!=typeof o?null:xx(o,Object.assign(Object.assign({},r),{transform:a||("vertical"===i?"rotate(-90)":"")}))}function xm(t,e,n){let{title:r}=t,[i,a]=Array.isArray(r)?[r,void 0]:[void 0,r],{axis:o,[`axis${cF(e)}`]:l}=n;return cy({title:i},o,l,Object.assign(Object.assign({},t),{title:a}))}function xb(t,e){let n=t.getTicks?t.getTicks():t.getOptions().domain;return e?n.filter(e):n}function xx(t,e){var n;let r=(n=t)instanceof lp?n:new lN({style:{text:`${n}`}}),{filter:i}=e,a=xc(e,["filter"]);return r.attr(Object.assign(Object.assign({},a),{visibility:"none"})),r.getBBox()}function xO(t,e){let n;if(void 0===e)for(let e of t)null!=e&&(n>e||void 0===n&&e>=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n>i||void 0===n&&i>=i)&&(n=i)}return n}function xw(t,e,n,r,i,a,o){let l=cs(t,t=>t.position),{padding:s=a.padding,paddingLeft:u=s,paddingRight:c=s,paddingBottom:f=s,paddingTop:h=s}=i,d={paddingBottom:f,paddingLeft:u,paddingTop:h,paddingRight:c};for(let t of r){let r=`padding${cF(yW(t))}`,i=l.get(t)||[],s=d[r],u=t=>{void 0===t.size&&(t.size=t.defaultSize)},c=t=>{"group"===t.type?(t.children.forEach(u),t.size=fE(t.children,t=>t.size)):t.size=t.defaultSize},f=r=>{r.size||("auto"!==s?c(r):(xp(r,e,n,t,a,o),u(r)))},h=t=>{t.type.startsWith("axis")&&void 0===t.labelAutoHide&&(t.labelAutoHide=!0)},p="bottom"===t||"top"===t,y=xO(i,t=>t.order),g=i.filter(t=>t.type.startsWith("axis")&&t.order==y);if(g.length&&(g[0].crossPadding=0),"number"==typeof s)i.forEach(u),i.forEach(h);else if(0===i.length)d[r]=0;else{let t=xh(i,p?e+n[0]+n[1]:e);t.forEach(f);let a=t.reduce((t,{size:e,crossPadding:n=12})=>t+e+n,0);d[r]=a}}return d}function xk({width:t,height:e,paddingLeft:n,paddingRight:r,paddingTop:i,paddingBottom:a,marginLeft:o,marginTop:l,marginBottom:s,marginRight:u,innerHeight:c,innerWidth:f,insetBottom:h,insetLeft:d,insetRight:p,insetTop:y}){let g=n+o,v=i+l,b=r+u,x=a+s,O=t-o-u,w=[g+d,v+y,f-d-p,c-y-h,"center",null,null];return{top:[g,0,f,v,"vertical",!0,gu,o,O],right:[t-b,v,b,c,"horizontal",!1,gu],bottom:[g,e-x,f,x,"vertical",!1,gu,o,O],left:[0,v,g,c,"horizontal",!0,gu],"top-left":[g,0,f,v,"vertical",!0,gu],"top-right":[g,0,f,v,"vertical",!0,gu],"bottom-left":[g,e-x,f,x,"vertical",!1,gu],"bottom-right":[g,e-x,f,x,"vertical",!1,gu],center:w,inner:w,outer:w}}function x_(t,e,n={},r=!1){return cU(t)||Array.isArray(t)&&r?t:cy(n,cG(t,e))}function xM(t,e={}){return cU(t)||Array.isArray(t)||!xE(t)?t:cy(e,t)}function xE(t){if(0===Object.keys(t).length)return!0;let{title:e,items:n}=t;return void 0!==e||void 0!==n}function xA(t,e){return"object"==typeof t?cG(t,e):t}var xS=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let xj=Symbol("CALLBACK_ITEM");function xP(t,e,n){let{encode:r={},scale:i={},transform:a=[]}=e;return[t,Object.assign(Object.assign({},xS(e,["encode","scale","transform"])),{encode:r,scale:i,transform:a})]}function xT(t,e,n){var r,i,a,o;return r=this,i=void 0,a=void 0,o=function*(){let{library:t}=n,{data:r}=e,[i]=vV("data",t),a=function(t){if(eq(t))return{type:"inline",value:t};if(!t)return{type:"inline",value:null};if(Array.isArray(t))return{type:"inline",value:t};let{type:e="inline"}=t;return Object.assign(Object.assign({},xS(t,["type"])),{type:e})}(r),{transform:o=[]}=a,l=[xS(a,["transform"]),...o].map(t=>i(t,n)),s=yield(function(t){return t.reduce((t,e)=>n=>{var r,i,a,o;return r=this,i=void 0,a=void 0,o=function*(){return e((yield t(n)))},new(a||(a=Promise))(function(t,e){function n(t){try{s(o.next(t))}catch(t){e(t)}}function l(t){try{s(o.throw(t))}catch(t){e(t)}}function s(e){var r;e.done?t(e.value):((r=e.value)instanceof a?r:new a(function(t){t(r)})).then(n,l)}s((o=o.apply(r,i||[])).next())})},cD)})(l)(r),u=!r||Array.isArray(r)||Array.isArray(s)?s:{value:s};return[Array.isArray(s)?fx(s):[],Object.assign(Object.assign({},e),{data:u})]},new(a||(a=Promise))(function(t,e){function n(t){try{s(o.next(t))}catch(t){e(t)}}function l(t){try{s(o.throw(t))}catch(t){e(t)}}function s(e){var r;e.done?t(e.value):((r=e.value)instanceof a?r:new a(function(t){t(r)})).then(n,l)}s((o=o.apply(r,i||[])).next())})}function xC(t,e,n){let{encode:r}=e;if(!r)return[t,e];let i={};for(let[t,e]of Object.entries(r))if(Array.isArray(e))for(let n=0;n<e.length;n++)i[`${t}${0===n?"":n}`]=e[n];else i[t]=e;return[t,Object.assign(Object.assign({},e),{encode:i})]}function xN(t,e,n){let{encode:r,data:i}=e;if(!r)return[t,e];let a=fb(r,t=>{var e,n,r,a;return!function(t){if("object"!=typeof t||t instanceof Date||null===t)return!1;let{type:e}=t;return cW(e)}(t)?{type:(e=i,"function"==typeof(n=t)?"transform":"string"==typeof n&&(r=e,a=n,Array.isArray(r)&&r.some(t=>void 0!==t[a]))?"field":"constant"),value:t}:t});return[t,Object.assign(Object.assign({},e),{encode:a})]}function xL(t,e,n){let{encode:r}=e;if(!r)return[t,e];let i=fb(r,(t,e)=>{var n;let{type:r}=t;return"constant"!==r||(n=e).startsWith("x")||n.startsWith("y")||n.startsWith("position")||"enterDelay"===n||"enterDuration"===n||"updateDelay"===n||"updateDuration"===n||"exitDelay"===n||"exitDuration"===n?t:Object.assign(Object.assign({},t),{constant:!0})});return[t,Object.assign(Object.assign({},e),{encode:i})]}function xI(t,e,n){let{encode:r,data:i}=e;if(!r)return[t,e];let{library:a}=n,o=function(t){let[e]=vV("encode",t);return(t,n)=>void 0===n||void 0===t?null:Object.assign(Object.assign({},n),{type:"column",value:e(n)(t),field:function(t){let{type:e,value:n}=t;return"field"===e&&"string"==typeof n?n:null}(n)})}(a),l=fb(r,t=>o(i,t));return[t,Object.assign(Object.assign({},e),{encode:l})]}function xR(t,e,n){let{tooltip:r={}}=e;return cU(r)?[t,e]:Array.isArray(r)?[t,Object.assign(Object.assign({},e),{tooltip:{items:r}})]:cV(r)&&xE(r)?[t,Object.assign(Object.assign({},e),{tooltip:r})]:[t,Object.assign(Object.assign({},e),{tooltip:{items:[r]}})]}function xD(t,e,n){let{data:r,encode:i,tooltip:a={}}=e;if(cU(a))return[t,e];let o=e=>{if(!e)return e;if("string"==typeof e)return t.map(t=>({name:e,value:r[t][e]}));if(cV(e)){let{field:n,channel:a,color:o,name:l=n,valueFormatter:s=t=>t}=e,u="string"==typeof s?Ex(s):s,c=a&&i[a],f=c&&i[a].field,h=l||f||a,d=[];for(let e of t){let t=n?r[e][n]:c?i[a].value[e]:null;d[e]={name:h,color:o,value:u(t)}}return d}if("function"==typeof e){let n=[];for(let a of t){let t=e(r[a],a,r,i);cV(t)?n[a]=Object.assign(Object.assign({},t),{[xj]:!0}):n[a]={value:t}}return n}return e},{title:l,items:s=[]}=a,u=xS(a,["title","items"]),c=Object.assign({title:o(l),items:Array.isArray(s)?s.map(o):[]},u);return[t,Object.assign(Object.assign({},e),{tooltip:c})]}function xB(t,e,n){let{encode:r}=e,i=xS(e,["encode"]);if(!r)return[t,e];let a=Object.entries(r),o=a.filter(([,t])=>{let{value:e}=t;return Array.isArray(e[0])}).flatMap(([e,n])=>{let r=[[e,Array(t.length).fill(void 0)]],{value:i}=n,a=xS(n,["value"]);for(let n=0;n<i.length;n++){let a=i[n];if(Array.isArray(a))for(let i=0;i<a.length;i++){let o=r[i]||[`${e}${i}`,Array(t).fill(void 0)];o[1][n]=a[i],r[i]=o}}return r.map(([t,e])=>[t,Object.assign({type:"column",value:e},a)])}),l=Object.fromEntries([...a,...o]);return[t,Object.assign(Object.assign({},i),{encode:l})]}function xF(t,e,n){let{axis:r={},legend:i={},slider:a={},scrollbar:o={}}=e,l=(t,e)=>{if("boolean"==typeof t)return t?{}:null;let n=t[e];return void 0===n||n?n:null};return cy(e,{scale:Object.assign(Object.assign({},Object.fromEntries(("object"==typeof r?Array.from(new Set(["x","y","z",...Object.keys(r)])):["x","y","z"]).map(t=>{let e=l(o,t);return[t,Object.assign({guide:l(r,t),slider:l(a,t),scrollbar:e},e&&{ratio:void 0===e.ratio?.5:e.ratio})]}))),{color:{guide:l(i,"color")},size:{guide:l(i,"size")},shape:{guide:l(i,"shape")},opacity:{guide:l(i,"opacity")}})}),[t,e]}function xz(t,e,n){let{animate:r}=e;return r||void 0===r||cy(e,{animate:{enter:{type:null},exit:{type:null},update:{type:null}}}),[t,e]}function x$(t,e,n){var r,i;return cy(e,{scale:{series:Object.assign({key:`DEFAULT_${e.type}_SERIES_KEY`},null!=(i=null==(r=null==e?void 0:e.scale)?void 0:r.series)?i:{})}}),[t,e]}var xW=function(t,e,n,r){return new(n||(n=Promise))(function(i,a){function o(t){try{s(r.next(t))}catch(t){a(t)}}function l(t){try{s(r.throw(t))}catch(t){a(t)}}function s(t){var e;t.done?i(t.value):((e=t.value)instanceof n?e:new n(function(t){t(e)})).then(o,l)}s((r=r.apply(t,e||[])).next())})},xG=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n},xq=function(t,e,n,r){return new(n||(n=Promise))(function(i,a){function o(t){try{s(r.next(t))}catch(t){a(t)}}function l(t){try{s(r.throw(t))}catch(t){a(t)}}function s(t){var e;t.done?i(t.value):((e=t.value)instanceof n?e:new n(function(t){t(e)})).then(o,l)}s((r=r.apply(t,e||[])).next())})},xH=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function xY(t){t.style("transform",t=>`translate(${t.layout.x}, ${t.layout.y})`)}function xV(t,e){return xq(this,void 0,void 0,function*(){let{library:n}=e,r=function(t){let{coordinate:e={},interaction:n={},style:r={},marks:i}=t,a=xH(t,["coordinate","interaction","style","marks"]),o=i.map(t=>t.coordinate||{}),l=i.map(t=>t.interaction||{}),s=i.map(t=>t.viewStyle||{}),u=[...o,e].reduceRight((t,e)=>cy(t,e),{}),c=[n,...l].reduce((t,e)=>cy(t,e),{}),f=[...s,r].reduce((t,e)=>cy(t,e),{});return Object.assign(Object.assign({},a),{marks:i,coordinate:u,interaction:c,style:f})}((yield function(t,e){return xq(this,void 0,void 0,function*(){let{library:n}=e,[r,i]=vV("mark",n),a=new Set(Object.keys(n).map(t=>{var e;return null==(e=/component\.(.*)/.exec(t))?void 0:e[1]}).filter(cW)),{marks:o}=t,l=[],s=[],u=[...o],{width:c,height:f}=function(t){let{height:e,width:n,padding:r=0,paddingLeft:i=r,paddingRight:a=r,paddingTop:o=r,paddingBottom:l=r,margin:s=16,marginLeft:u=s,marginRight:c=s,marginTop:f=s,marginBottom:h=s,inset:d=0,insetLeft:p=d,insetRight:y=d,insetTop:g=d,insetBottom:v=d}=t,b=t=>"auto"===t?20:t;return{width:n-b(i)-b(a)-u-c-p-y,height:e-b(o)-b(l)-f-h-g-v}}(t),h={options:t,width:c,height:f};for(;u.length;){let[t]=u.splice(0,1),n=yield x3(t,e),{type:o=cz("G2Mark type is required."),key:c}=n;if(a.has(o))s.push(n);else{let{props:t={}}=i(o),{composite:e=!0}=t;if(e){let{data:t}=n,e=Object.assign(Object.assign({},n),{data:t?Array.isArray(t)?t:t.value:t}),i=yield r(e,h),a=Array.isArray(i)?i:[i];u.unshift(...a.map((t,e)=>Object.assign(Object.assign({},t),{key:`${c}-${e}`})))}else l.push(n)}}return Object.assign(Object.assign({},t),{marks:l,components:s})})}(t,e)));t.interaction=r.interaction,t.coordinate=r.coordinate,t.marks=[...r.marks,...r.components];let i=vK(r,n);return xK((yield xU(i,e)),i,n)})}function xU(t,e){return xq(this,void 0,void 0,function*(){let{library:n}=e,[r]=vV("theme",n),[,i]=vV("mark",n),{theme:a,marks:o,coordinates:l=[]}=t,s=r(x2(a)),u=new Map;for(let t of o){let{type:n}=t,{props:r={}}=i(n),a=yield function(t,e,n){return xW(this,void 0,void 0,function*(){let[r,i]=yield function(t,e,n){return xW(this,void 0,void 0,function*(){let{library:r}=n,[i]=vV("transform",r),{preInference:a=[],postInference:o=[]}=e,{transform:l=[]}=t,s=[xP,xT,xC,xN,xL,xI,xB,xz,xF,xR,x$,...a.map(i),...l.map(i),...o.map(i),xD],u=[],c=t;for(let t of s)[u,c]=yield t(u,c,n);return[u,c]})}(t,e,n),{encode:a,scale:o,data:l,tooltip:s,key:u}=i;if(!1===Array.isArray(l))return null;let{channels:c}=e,f=cf(Object.entries(a).filter(([,t])=>cW(t)),t=>t.map(([t,e])=>Object.assign({name:t},e)),([t])=>{var e;let n=null==(e=/([^\d]+)\d*$/.exec(t))?void 0:e[1],r=c.find(t=>t.name===n);return(null==r?void 0:r.independent)?t:n}),h=c.filter(t=>{let{name:e,required:n}=t;if(f.find(([t])=>t===e))return!0;if(n)throw Error(`Missing encoding for channel: ${e}.`);return!1}).flatMap(t=>{let{name:e,scale:n,scaleKey:r,range:i,quantitative:a,ordinal:l}=t;return f.filter(([t])=>t.startsWith(e)).map(([t,e],s)=>{let c=e.some(t=>t.visual),f=e.some(t=>t.constant),h=o[t]||{},{independent:d=!1,key:p=r||t,type:y=f?"constant":c?"identity":n}=h,g=xG(h,["independent","key","type"]),v="constant"===y;return{name:t,values:e,scaleKey:d||v?Symbol("independent"):p,scale:Object.assign(Object.assign({type:y,markKey:u,range:v?void 0:i},g),{quantitative:a,ordinal:l})}})});return[i,Object.assign(Object.assign({},e),{index:r,channels:h,tooltip:s})]})}(t,r,e);if(a){let[t,e]=a;u.set(t,e)}}for(let t of cs(Array.from(u.values()).flatMap(t=>t.channels),({scaleKey:t})=>t).values()){let e=t.reduce((t,{scale:e})=>cy(t,e),{}),{scaleKey:r}=t[0],{values:i}=t[0],a=Array.from(new Set(i.map(t=>t.field).filter(cW))),o=cy({guide:{title:0===a.length?void 0:a},field:a[0]},e),{name:u}=t[0],c=Object.assign(Object.assign({},function(t,e,n,r,i,a){let{guide:o={}}=n,l=function(t,e,n){let{type:r,domain:i,range:a,quantitative:o,ordinal:l}=n;if(void 0!==r)return r;return xa(e,cV)?"identity":"string"==typeof a?"linear":(i||a||[]).length>2?xt(t,l):void 0!==i?xr([i])?xt(t,l):xi(e)?"time":xe(t,a,o):xr(e)?xt(t,l):xi(e)?"time":xe(t,a,o)}(t,e,n);if("string"!=typeof l)return n;let s=function(t,e,n){let{domain:r}=n;if(void 0!==r)return r;switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":case"quantize":case"threshold":return xn(function(t,e){let{zero:n=!1}=e,r=1/0,i=-1/0;for(let e of t)for(let t of e)cW(t)&&(r=Math.min(r,+t),i=Math.max(i,+t));return r===1/0?[]:n?[Math.min(0,r),i]:[r,i]}(e,n),n);case"band":case"ordinal":case"point":return Array.from(new Set(e.flat()));case"quantile":return e.flat().sort();case"sequential":return xn(function(t){let e=1/0,n=-1/0;for(let r of t)for(let t of r)cW(t)&&(e=Math.min(e,+t),n=Math.max(n,+t));return e===1/0?[]:[e<0?-n:e,n]}(e),n);default:return[]}}(l,e,n),u=function(t,e,n){let{ratio:r}=n;return null==r?e:b8({type:t})?function(t,e,n){let r=t.map(Number),i=new dV({domain:r,range:[r[0],r[0]+(r[r.length-1]-r[0])*e]});return"time"===n?t.map(t=>new Date(i.map(t))):t.map(t=>i.map(t))}(e,r,t):b9({type:t})?function(t,e){let n=Math.round(t.length*e);return t.slice(0,n)}(e,r):e}(l,s,n);return Object.assign(Object.assign(Object.assign({},n),function(t,e,n,r){switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":return function(t){let{interpolate:e=d$,nice:n=!1,tickCount:r=5}=t;return Object.assign(Object.assign({},t),{interpolate:e,nice:n,tickCount:r})}(n);case"band":case"point":return function(t,e,n,r){var i,a,o;if(void 0!==r.padding||void 0!==r.paddingInner||void 0!==r.paddingOuter)return Object.assign(Object.assign({},r),{unknown:NaN});let l=(i=t,a=e,o=n,"enterDelay"===a||"enterDuration"===a||"size"===a?0:"band"===i?.1*!v0(o):.5*("point"===i)),{paddingInner:s=l,paddingOuter:u=l}=r;return Object.assign(Object.assign({},r),{paddingInner:s,paddingOuter:u,padding:l,unknown:NaN})}(t,e,r,n);case"sequential":return function(t){let{palette:e="ylGnBu",offset:n}=t,r=fu(e),i=J[`interpolate${r}`];if(!i)throw Error(`Unknown palette: ${r}`);return{interpolator:n?t=>i(n(t)):i}}(n);default:return n}}(l,t,n,r)),{domain:u,range:function(t,e,n,r,i,a,o){let{range:l}=r;if("string"==typeof l)return l.split("-");if(void 0!==l)return l;let{rangeMin:s,rangeMax:u}=r;switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":{var c,f;let[t,l]=(c=e,f=b7(n,r,i,a,o),"enterDelay"===c?[0,1e3]:"enterDuration"==c?[300,1e3]:c.startsWith("y")||c.startsWith("position")?[1,0]:"color"===c?[f[0],fO(f)]:"opacity"===c?[0,1]:"size"===c?[1,10]:[0,1]);return[null!=s?s:t,null!=u?u:l]}case"band":case"point":{let t=5*("size"===e),n="size"===e?10:1;return[null!=s?s:t,null!=u?u:n]}case"ordinal":return b7(n,r,i,a,o);case"sequential":return;case"constant":return[n[0][0]];default:return[]}}(l,t,e,n,u,i,a),expectedDomain:s,guide:o,name:t,type:l})}(u,t.flatMap(({values:t})=>t.map(t=>t.value)),o,l,s,n)),{uid:Symbol("scale"),key:r});t.forEach(t=>t.scale=c)}return u})}function xX(t,e,n,r){let i=t.theme;return r(cy("string"==typeof e&&i[e]||{},Object.assign({type:e},n)))}function xK(t,e,n){var r;let i,a,o,[l]=vV("mark",n),[s]=vV("theme",n),[u]=vV("labelTransform",n),{key:c,frame:f=!1,theme:h,clip:d,style:p={},labelTransform:y=[]}=e,g=s(x2(h)),v=Array.from(t.values()),b=(function(t,e,n){let{coordinates:r=[],title:i}=e,[,a]=vV("component",n),o=t.filter(({guide:t})=>null!==t),l=[],s=function(t,e,n){let[,r]=vV("component",n),{coordinates:i}=t;function a(t,e,n,a){let o=function(t,e,n=[]){return"x"===t?vJ(n)?`${e}Y`:`${e}X`:"y"===t?vJ(n)?`${e}X`:`${e}Y`:null}(e,t,i);if(!a||!o)return;let{props:l}=r(o),{defaultPosition:s,defaultSize:u,defaultOrder:c,defaultCrossPadding:[f]}=l;return Object.assign(Object.assign({position:s,defaultSize:u,order:c,type:o,crossPadding:f},a),{scales:[n]})}return e.filter(t=>t.slider||t.scrollbar).flatMap(t=>{let{slider:e,scrollbar:n,name:r}=t;return[a("slider",r,t,e),a("scrollbar",r,t,n)]}).filter(t=>!!t)}(e,t,n);if(l.push(...s),i){let{props:t}=a("title"),{defaultPosition:e,defaultOrientation:n,defaultOrder:r,defaultSize:o,defaultCrossPadding:s}=t;l.push(Object.assign({type:"title",position:e,orientation:n,order:r,crossPadding:s[0],defaultSize:o},"string"==typeof i?{title:i}:i))}return(function(t,e){let n=t.filter(t=>(function(t){if(!t||!t.type)return!1;if("function"==typeof t.type)return!0;let{type:e,domain:n,range:r,interpolator:i}=t,a=n&&n.length>0,o=r&&r.length>0;return!!(["linear","sqrt","log","time","pow","threshold","quantize","quantile","ordinal","band","point"].includes(e)&&a&&o||["sequential"].includes(e)&&a&&(o||i)||["constant","identity"].includes(e)&&o)})(t));return[...function(t){let e=["shape","size","color","opacity"],n=t.filter(({type:t,name:n})=>"string"==typeof t&&e.includes(n)&&("constant"!==t||"size"!==n)),r=n.filter(({type:t})=>"constant"===t),i=new Map(cu(n.filter(({type:t})=>"constant"!==t),t=>t.field?t.field:Symbol("independent")).map(([t,e])=>[t,[...e,...r]]).filter(([,t])=>t.some(t=>"constant"!==t.type)));if(0===i.size)return[];let a=t=>t.sort(([t],[e])=>t.localeCompare(e));return Array.from(i).map(([,t])=>{let e=(function(t){if(1===t.length)return[t];let e=[];for(let n=1;n<=t.length;n++)e.push(...function t(e,n=e.length){if(1===n)return e.map(t=>[t]);let r=[];for(let i=0;i<e.length;i++)t(e.slice(i+1),n-1).forEach(t=>{r.push([e[i],...t])});return r}(t,n));return e})(t).sort((t,e)=>e.length-t.length).map(t=>({combination:t,option:t.map(t=>[t.name,function(t){let{type:e}=t;return"string"!=typeof e?null:e in xo?"continuous":e in xs?"discrete":e in xl?"distribution":e in xu?"constant":null}(t)])}));for(let{option:t,combination:n}of e)if(!t.every(t=>"constant"===t[1])&&t.every(t=>"discrete"===t[1]||"constant"===t[1]))return["legendCategory",n];for(let[t,n]of fL)for(let{option:r,combination:i}of e)if(n.some(t=>f_(a(t),a(r))))return[t,i];return null}).filter(cW)}(n),...n.map(t=>{let{name:n}=t;if(vZ(e,"helix").length>0||v0(e)||vJ(e)&&(vQ(e)||v1(e)))return null;if(n.startsWith("x"))return vQ(e)?["axisArc",[t]]:v1(e)?["axisLinear",[t]]:[vJ(e)?"axisY":"axisX",[t]];if(n.startsWith("y"))return vQ(e)?["axisLinear",[t]]:v1(e)?["axisArc",[t]]:[vJ(e)?"axisX":"axisY",[t]];if(n.startsWith("z"))return["axisZ",[t]];if(n.startsWith("position")){if(v2(e))return["axisRadar",[t]];if(!vQ(e))return["axisY",[t]]}return null}).filter(cW)]})(o,r).forEach(([t,e])=>{let{props:n}=a(t),{defaultPosition:i,defaultPlane:s="xy",defaultOrientation:u,defaultSize:c,defaultOrder:f,defaultLength:h,defaultPadding:d=[0,0],defaultCrossPadding:p=[0,0]}=n,{guide:y,field:g}=cy({},...e);for(let n of Array.isArray(y)?y:[y]){let[a,y]=function(t,e,n,r,i,a,o){let[l]=xd(o),s=[r.position||e,null!=l?l:n];return"string"==typeof t&&t.startsWith("axis")?function(t,e,n,r,i){let{name:a}=n[0];if("axisRadar"===t){let t,e=r.filter(t=>t.name.startsWith("position")),n=(t=/position(\d*)/g.exec(a))?+t[1]:null;if(null===n)return[null,null];let[o,l]=xd(i);return["center",(l-o)/(v2(i)?e.length:e.length-1)*n+o]}if("axisY"===t&&vZ(i,"parallel").length>0)return vJ(i)?["center","horizontal"]:["center","vertical"];if("axisLinear"===t){let[t]=xd(i);return["center",t]}return"axisArc"===t?"inner"===e[0]?["inner",null]:["outer",null]:vQ(i)||v1(i)?["center",null]:"axisX"===t&&vZ(i,"reflect").length>0||"axisX"===t&&vZ(i,"reflectY").length>0?["top",null]:e}(t,s,i,a,o):"string"==typeof t&&t.startsWith("legend")&&vQ(o)&&"center"===r.position?["center","vertical"]:s}(t,i,u,n,e,o,r);if(!a&&!y)continue;let v="left"===a||"right"===a,b=v?d[1]:d[0],x=v?p[1]:p[0],{size:O,order:w=f,length:k=h,padding:_=b,crossPadding:M=x}=n;l.push(Object.assign(Object.assign({title:g},n),{defaultSize:c,length:k,position:a,plane:s,orientation:y,padding:_,order:w,crossPadding:M,size:O,type:t,scales:e}))}}),l})(function(t,e,n){var r;for(let[e]of n.entries())if("cell"===e.type)return t.filter(t=>"shape"!==t.name);if(1!==e.length||t.some(t=>"shape"===t.name))return t;let{defaultShape:i}=e[0];if(!["point","line","rect","hollow"].includes(i))return t;let a=(null==(r=t.find(t=>"color"===t.name))?void 0:r.field)||null;return[...t,{field:a,name:"shape",type:"constant",domain:[],range:[{point:"point",line:"hyphen",rect:"square",hollow:"hollow"}[i]]}]}(Array.from(function(t,e){var n;let{components:r=[]}=e,i=["scale","encode","axis","legend","data","transform"],a=Array.from(new Set(t.flatMap(t=>t.channels.map(t=>t.scale)))),o=new Map(a.map(t=>[t.name,t]));for(let t of r)for(let e of function(t){let{channels:e=[],type:n,scale:r={}}=t,i=["shape","color","opacity","size"];return 0!==e.length?e:"axisX"===n?["x"]:"axisY"===n?["y"]:"legends"===n?Object.keys(r).filter(t=>i.includes(t)):[]}(t)){let r=o.get(e),l=(null==(n=t.scale)?void 0:n[e])||{},{independent:s=!1}=l;if(r&&!s){let{guide:e}=r;r.guide=cy({},"boolean"==typeof e?{}:e,t),Object.assign(r,l)}else{let n=Object.assign(Object.assign({},l),{expectedDomain:l.domain,name:e,guide:dK(t,i)});a.push(n)}}return a}(v,e)),v,t),e,n).map(t=>{let e=cy(t,t.style);return delete e.style,e}),x=function(t,e,n,r){var i,a,o,l;let{width:s,height:u,depth:c,x:f=0,y:h=0,z:d=0,inset:p=null!=(i=n.inset)?i:0,insetLeft:y=p,insetTop:g=p,insetBottom:v=p,insetRight:b=p,margin:x=null!=(a=n.margin)?a:0,marginLeft:O=x,marginBottom:w=x,marginTop:k=x,marginRight:_=x,padding:M=n.padding,paddingBottom:E=M,paddingLeft:A=M,paddingRight:S=M,paddingTop:j=M}=function(t,e,n,r){let{coordinates:i}=e;if(!vQ(i)&&!v1(i))return e;let a=t.filter(t=>"string"==typeof t.type&&t.type.startsWith("axis"));if(0===a.length)return e;let o=a.map(t=>{let e="axisArc"===t.type?"arc":"linear";return xm(t,e,n)}),l=fE(o,t=>{var e;return null!=(e=t.labelSpacing)?e:0}),s=fE(a.flatMap((t,e)=>xg(o[e],xy(t,r))).filter(cW),t=>t.height)+l,u=a.flatMap((t,e)=>xv(o[e])).filter(t=>null!==t),c=0===u.length?0:fE(u,t=>t.height),{inset:f=s,insetLeft:h=f,insetBottom:d=f,insetTop:p=f+c,insetRight:y=f}=e;return Object.assign(Object.assign({},e),{insetLeft:h,insetBottom:d,insetTop:p,insetRight:y})}(t,e,n,r),P=16===O&&"auto"===A,T=16===_&&"auto"===S,C=cr(e,"coordinates",[]).some(t=>"transpose"===t.type),N=t.find(({type:t})=>"axisX"===t),{size:L,labelTransform:I}=N||{},R=1/4,D=(t,n,r,i,a)=>{let{marks:o}=e;if(0===o.length||t-i-a-t*R>0)return[i,a];let l=t*(1-R);return["auto"===n?l*i/(i+a):i,"auto"===r?l*a/(i+a):a]},B=t=>"auto"===t?20:null!=t?t:20,F=B(j),z=B(E),{paddingLeft:$,paddingRight:W}=xw(t,u-F-z,[F+k,z+w],["left","right"],e,n,r),G=s-O-_,[q,H]=D(G,A,S,$,W),Y=G-q-H,{paddingTop:V,paddingBottom:U}=xw(t,Y,[q+O,H+_],["bottom","top"],e,n,r),X=u-w-k,[K,Z]=D(X,E,j,U,V),Q=X-K-Z;if(L&&!C&&!I){let{fontSize:t=12,fontFamily:e="sans-serif",scales:n=[]}=N,r=null!=(l=null==(o=null==n?void 0:n[0])?void 0:o.domain)?l:[];if(!r.length)return;let i=(n,r,i,a)=>{let o=h9(r,{fontSize:t,fontFamily:e}),l=o/2-i-a;l>0&&(Y-=l,"left"===n?q+=o/2-i:H+=o/2-i)};P&&i("left",function(t){if(fk(t))return t[0]}(r),O,q),T&&i("right",dT(r),_,H)}return{width:s,height:u,depth:c,insetLeft:y,insetTop:g,insetBottom:v,insetRight:b,innerWidth:Y,innerHeight:Q,paddingLeft:q,paddingRight:H,paddingTop:Z,paddingBottom:K,marginLeft:O,marginBottom:w,marginTop:k,marginRight:_,x:f,y:h,z:d}}(b,e,g,n),O=function(t,e,n){var r;let[i]=vV("coordinate",n),{innerHeight:a,innerWidth:o,insetLeft:l,insetTop:s,insetRight:u,insetBottom:c}=t,{coordinates:f=[]}=e,h=(r=f).find(t=>"cartesian"===t.type||"cartesian3D"===t.type)?r:[...r,{type:"cartesian"}],d="cartesian3D"===h[0].type,p=Object.assign(Object.assign({},t),{x:l,y:s,width:o-l-u,height:a-c-s,transformations:h.flatMap(i)});return d?new fR.Coordinate3D(p):new fR.Coordinate(p)}(x,e,n),w=f?cy({mainLineWidth:1,mainStroke:"#000"},p):p;!function(t,e,n){let r=cs(t,t=>`${t.plane||"xy"}-${t.position}`),{paddingLeft:i,paddingRight:a,paddingTop:o,paddingBottom:l,marginLeft:s,marginTop:u,marginBottom:c,marginRight:f,innerHeight:h,innerWidth:d,insetBottom:p,insetLeft:y,insetRight:g,insetTop:v,height:b,width:x,depth:O}=n,w={xy:xk({width:x,height:b,paddingLeft:i,paddingRight:a,paddingTop:o,paddingBottom:l,marginLeft:s,marginTop:u,marginBottom:c,marginRight:f,innerHeight:h,innerWidth:d,insetBottom:p,insetLeft:y,insetRight:g,insetTop:v}),yz:xk({width:O,height:b,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,marginLeft:0,marginTop:0,marginBottom:0,marginRight:0,innerWidth:O,innerHeight:b,insetBottom:0,insetLeft:0,insetRight:0,insetTop:0}),xz:xk({width:x,height:O,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,marginLeft:0,marginTop:0,marginBottom:0,marginRight:0,innerWidth:x,innerHeight:O,insetBottom:0,insetLeft:0,insetRight:0,insetTop:0})};for(let[t,n]of r.entries()){let[r,i]=t.split("-"),a=w[r][i],[o,l]=fw(n,t=>"string"==typeof t.type&&!!("center"===i||t.type.startsWith("axis")&&["inner","outer"].includes(i)));o.length&&function(t,e,n,r){let[i,a]=fw(t,t=>!!("string"==typeof t.type&&t.type.startsWith("axis")));(function(t,e,n,r){if("center"===r)if(f$(e)&&fB(e))!function(t,e){let[n,r,i,a]=e;for(let e of t)e.bbox={x:n,y:r,width:i,height:a},e.radar={index:t.indexOf(e),count:t.length}}(t,n);else{var i,a,o,l;fB(e)?function(t,e){let[n,r,i,a]=e;for(let e of t)e.bbox={x:n,y:r,width:i,height:a}}(t,n):f$(e)&&(i=t,a=e,o=n,"horizontal"===(l=t[0].orientation)?function(t,e,n){let[r,i,a]=n,o=Array(t.length).fill(0),l=e.map(o).filter((t,e)=>e%2==1).map(t=>t+i);for(let e=0;e<t.length;e++){let n=t[e],i=l[e],o=l[e+1]-i;n.bbox={x:r,y:i,width:a,height:o}}}(i,a,o):"vertical"===l&&function(t,e,n){let[r,i,,a]=n,o=Array(t.length).fill(0),l=e.map(o).filter((t,e)=>e%2==0).map(t=>t+r);for(let e=0;e<t.length;e++){let n=t[e],r=l[e],o=l[e+1]-r;n.bbox={x:r,y:i,width:o,height:a}}}(i,a,o))}else"inner"===r?function(t,e,n){let[r,i,,a]=n,[o,l]=e.getCenter(),[s]=fq(e),u=a/2*s,c=o-u,f=l-u;for(let e=0;e<t.length;e++)t[e].bbox={x:r+c,y:i+f,width:2*u,height:2*u}}(t,e,n):"outer"===r&&function(t,e){let[n,r,i,a]=e;for(let e of t)e.bbox={x:n,y:r,width:i,height:a}}(t,n)})(i,e,n,r),function(t,e,n){if(0===t.length)return;let[r,i,a,o]=n,[l]=fq(e),s=o/2*l/Math.sqrt(2),u=r+a/2,c=i+o/2;for(let e=0;e<t.length;e++)t[e].bbox={x:u-s,y:c-s,width:2*s,height:2*s}}(a,e,n)}(o,e,a,i),l.length&&function(t,e){let[n,r,i,a,o,l,s,u,c]=e,[f,h,d,p,y,g,v,b]="vertical"===o?["y",r,"x",n,"height",a,"width",i]:["x",n,"y",r,"width",i,"height",a];t.sort((t,e)=>null==s?void 0:s(t.order,e.order));let x=t=>"title"===t||"group"===t||t.startsWith("legend"),O=(t,e,n)=>void 0===n?e:x(t)?n:e,w=(t,e,n)=>void 0===n?e:x(t)?n:e;for(let e=0,n=l?h+g:h;e<t.length;e++){let r=t[e],{crossPadding:i=0,type:a}=r,{size:o}=r;r.bbox={[f]:l?n-o-i:n+i,[d]:w(a,p,u),[y]:o,[v]:O(a,b,c)},n+=(o+i)*(l?-1:1)}for(let e of t.filter(t=>"group"===t.type)){let{bbox:t,children:n}=e,r=t[v],i=r/n.length,a=n.reduce((t,e)=>{var n;return(null==(n=e.layout)?void 0:n.justifyContent)||t},"flex-start"),o=n.map((t,e)=>{let{length:r=i,padding:a=0}=t;return r+(e===n.length-1?0:a)}),l=r-fM(o),s="flex-start"===a?0:"center"===a?l/2:l;for(let e=0,r=t[d]+s;e<n.length;e++){let i=n[e],{padding:l=0}=i,s=e===n.length-1?0:l;i.bbox={[y]:t[y],[f]:t[f],[d]:r,[v]:o[e]-s},cy(i,{layout:{justifyContent:a}}),r+=o[e]}}}(n,a)}}(xh(b),O,x),i=b.find(({type:t})=>"axisX"===t),a=b.find(({type:t})=>"axisY"===t),o=b.find(({type:t})=>"axisZ"===t),i&&a&&o&&(i.plane="xy",a.plane="xy",o.plane="yz",o.origin=[i.bbox.x,i.bbox.y,0],o.eulerAngles=[0,-90,0],o.bbox.x=i.bbox.x,o.bbox.y=i.bbox.y,b.push(Object.assign(Object.assign({},i),{plane:"xz",showLabel:!1,showTitle:!1,origin:[i.bbox.x,i.bbox.y,0],eulerAngles:[-90,0,0]})),b.push(Object.assign(Object.assign({},a),{plane:"yz",showLabel:!1,showTitle:!1,origin:[a.bbox.x+a.bbox.width,a.bbox.y,0],eulerAngles:[0,-90,0]})),b.push(Object.assign(Object.assign({},o),{plane:"xz",actualPosition:"left",showLabel:!1,showTitle:!1,eulerAngles:[90,-90,0]})));let k=new Map(Array.from(t.values()).flatMap(t=>{let{channels:e}=t;return e.map(({scale:t})=>[t.uid,b4(t,n)])}));cf(Array.from(t.values()).flatMap(t=>t.channels),t=>t.map(t=>k.get(t.scale.uid)),t=>t.name).filter(([,t])=>t.some(t=>"function"==typeof t.getOptions().groupTransform)&&t.every(t=>t.getTicks)).map(t=>t[1]).forEach(t=>{(0,t.map(t=>t.getOptions().groupTransform)[0])(t)});let _={};for(let t of b){let{scales:e=[]}=t,i=[];for(let t of e){let{name:e,uid:a}=t,o=null!=(r=k.get(a))?r:b4(t,n);i.push(o),"y"===e&&o.update(Object.assign(Object.assign({},o.getOptions()),{xScale:_.x})),b3(_,{[e]:o})}t.scaleInstances=i}let M=[],E=new Map;for(let[e,n]of t.entries()){let{children:t,dataDomain:r,modifier:i,key:a,data:o}=e;E.set(a,o);let{index:s,channels:u,tooltip:f}=n,h=fb(Object.fromEntries(u.map(({name:t,scale:e})=>[t,e])),({uid:t})=>k.get(t));b3(_,h);let d=function(t,e){let n={};for(let r of t){let{values:t,name:i}=r,a=e[i];for(let e of t){let{name:t,value:r}=e;n[t]=r.map(t=>a.map(t))}}return n}(u,h),[p,y,g]=function([t,e,n]){if(n)return[t,e,n];let r=[],i=[];for(let n=0;n<t.length;n++){let a=t[n],o=e[n];o.every(([t,e])=>cW(t)&&cW(e))&&(r.push(a),i.push(o))}return[r,i]}(l(e)(s,h,d,O)),v=r||p.length,b=i?i(y,v,x):[],w=t=>{var e,n;return null==(n=null==(e=f.title)?void 0:e[t])?void 0:n.value},A=t=>f.items.map(e=>e[t]),S=p.map((t,e)=>{let n=Object.assign({points:y[e],transform:b[e],index:t,markKey:a,viewKey:c,data:o[t]},f&&{title:w(t),items:A(t)});for(let[r,i]of Object.entries(d))n[r]=i[t],g&&(n[`series${fu(r)}`]=g[e].map(t=>i[t]));return g&&(n.seriesIndex=g[e]),g&&f&&(n.seriesItems=g[e].map(t=>A(t)),n.seriesTitle=g[e].map(t=>w(t))),n});n.data=S,n.index=p;let j=null==t?void 0:t(S,h,x);M.push(...j||[])}return[{layout:x,theme:g,coordinate:O,markState:t,key:c,clip:d,scale:_,style:w,components:b,data:E,options:e,labelTransform:cB(y.map(u))},M]}function xZ(t,e,n,r){return xq(this,void 0,void 0,function*(){let{library:i}=r,{components:a,theme:o,layout:l,markState:s,coordinate:u,key:c,style:f,clip:h,scale:d}=t,{x:p,y,width:g,height:v}=l,b=xH(l,["x","y","width","height"]),x=["view","plot","main","content"],O=x.map((t,e)=>e),w=x.map(t=>cq(Object.assign({},o.view,f),t)),k=["a","margin","padding","inset"].map(t=>cG(b,t)),_=t=>t.style("x",t=>j[t].x).style("y",t=>j[t].y).style("width",t=>j[t].width).style("height",t=>j[t].height).each(function(t,e,n){var r=cX(n),i=w[t];for(let[t,e]of Object.entries(i))r.style(t,e)}),M=0,E=0,A=g,S=v,j=O.map(t=>{let{left:e=0,top:n=0,bottom:r=0,right:i=0}=k[t];return M+=e,E+=n,A-=e+i,S-=n+r,{x:M,y:E,width:A,height:S}});e.selectAll(x9("area")).data(O.filter(t=>cW(w[t])),t=>x[t]).join(t=>t.append("rect").attr("className","area").style("zIndex",-2).call(_),t=>t.call(_),t=>t.remove());let P=function(t){let e=-1/0,n=1/0;for(let[r,i]of t){let{animate:t={}}=r,{data:a}=i,{enter:o={},update:l={},exit:s={}}=t,{type:u,duration:c=300,delay:f=0}=l,{type:h,duration:d=300,delay:p=0}=o,{type:y,duration:g=300,delay:v=0}=s;for(let t of a){let{updateType:r=u,updateDuration:i=c,updateDelay:a=f,enterType:o=h,enterDuration:l=d,enterDelay:s=p,exitDuration:b=g,exitDelay:x=v,exitType:O=y}=t;(void 0===r||r)&&(e=Math.max(e,i+a),n=Math.min(n,a)),(void 0===O||O)&&(e=Math.max(e,b+x),n=Math.min(n,x)),(void 0===o||o)&&(e=Math.max(e,l+s),n=Math.min(n,s))}}return e===-1/0?null:[n,e-n]}(s),T=!!P&&{duration:P[1]};for(let[,t]of cu(a,t=>`${t.type}-${t.position}`))t.forEach((t,e)=>t.index=e);let C=e.selectAll(x9(gE)).data(a,t=>`${t.type}-${t.position}-${t.index}`).join(t=>t.append("g").style("zIndex",({zIndex:t})=>t||-1).attr("className",gE).append(t=>xf(cy({animate:T,scale:d},t),u,o,i,s)),t=>t.transition(function(t,e,n){let{preserve:r=!1}=t;if(r)return;let{attributes:a}=xf(cy({animate:T,scale:d},t),u,o,i,s),[l]=n.childNodes;return l.update(a,!1)})).transitions();n.push(...C.flat().filter(cW));let N=e.selectAll(x9("plot")).data([l],()=>c).join(t=>t.append("rect").style("zIndex",0).style("fill","transparent").attr("className","plot").call(x4).call(x8,Array.from(s.keys())).call(x7,h),t=>t.call(x8,Array.from(s.keys())).call(x4).call(x7,h)).transitions();for(let[a,o]of(n.push(...N.flat()),s.entries())){let{data:l}=o,{key:s,class:u,type:c}=a,f=e.select(`#${s}`),h=function(t,e,n,r){let{library:i}=r,[a]=vV("shape",i),{data:o,encode:l}=t,{defaultShape:s,data:u,shape:c}=e,f=fb(l,t=>t.value),h=u.map(t=>t.points),{theme:d,coordinate:p}=n,{type:y,style:g={}}=t,v=Object.assign(Object.assign({},r),{document:vU(r),coordinate:p,theme:d});return e=>{let{shape:n=s}=g,{shape:r=n,points:i,seriesIndex:l,index:u}=e,p=Object.assign(Object.assign({},xH(e,["shape","points","seriesIndex","index"])),{index:u}),b=l?l.map(t=>o[t]):o[u],x=l||u,O=fb(g,t=>xQ(t,b,x,o,{channel:f}));return(c[r]?c[r](O,v):a(Object.assign(Object.assign({},O),{type:x6(t,r)}),v))(i,p,xJ(d,y,r,s),h)}}(a,o,t,r),d=x0("enter",a,o,t,i),p=x0("update",a,o,t,i),y=x0("exit",a,o,t,i),g=function(t,e,n,r){let i=t.node().parentElement;return i&&"function"==typeof i.findAll?i.findAll(t=>void 0!==t.style.facet&&t.style.facet===n&&t!==e.node()).flatMap(t=>t.getElementsByClassName(r)):[]}(e,f,u,"element"),v=f.selectAll(x9(gM)).selectFacetAll(g).data(l,t=>t.key,t=>t.groupKey).join(t=>t.append(h).attr("className",gM).attr("markType",c).transition(function(t,e,n){return d(t,[n])}),t=>t.call(t=>{let e=t.parent(),n=function(t){let e=new Map;return n=>{if(e.has(n))return e.get(n);let r=t(n);return e.set(n,r),r}}(t=>{let[e,n]=t.getBounds().min;return[e,n]});t.transition(function(t,r,i){!function(t,e,n){if(!t.__facet__)return;let r=t.parentNode.parentNode,i=e.parentNode,[a,o]=n(r),[l,s]=n(i);!function(t,e){let{transform:n}=t.style,r="none"===n||void 0===n?"":n;t.style.transform=`${r} ${e}`.trimStart()}(t,`translate(${a-l}, ${o-s})`),e.append(t)}(i,e,n);let a=h(t,r),o=p(t,[i],[a]);return(null==o?void 0:o.length)||(i.nodeName===a.nodeName&&"g"!==a.nodeName?c$(i,a):(i.parentNode.replaceChild(a,i),a.className=gM,a.markType=c,a.__data__=i.__data__)),o}).each(function(t,e,n){n.__removed__&&(n.__removed__=!1)}).attr("markType",c).attr("className",gM)}),t=>t.each(function(t,e,n){n.__removed__=!0}).transition(function(t,e,n){return y(t,[n])}).remove(),t=>t.append(h).attr("className",gM).attr("markType",c).transition(function(t,e,n){let{__fromElements__:r}=n,i=p(t,r,[n]);return new cK(r,null,n.parentNode).transition(i).remove(),i}),t=>t.transition(function(t,e,n){let r=new cK([],n.__toData__,n.parentNode).append(h).attr("className",gM).attr("markType",c).nodes();return p(t,[n],r)}).remove()).transitions();n.push(...v.flat())}(function(t,e,n,r){let[i]=vV("labelTransform",n),{markState:a,labelTransform:o}=t,l=e.select(x9(g_)).node(),s=new Map,u=new Map,c=Array.from(a.entries()).flatMap(([i,a])=>{let{labels:o=[],key:l}=i,c=function(t,e,n,r,i){let[a]=vV("shape",r),{data:o,encode:l}=t,{data:s,defaultLabelShape:u}=e,c=s.map(t=>t.points),f=fb(l,t=>t.value),{theme:h,coordinate:d}=n,p=Object.assign(Object.assign({},i),{document:vU(i),theme:h,coordinate:d});return t=>{let{index:e,points:n}=t,r=o[e],{formatter:i=t=>`${t}`,transform:l,style:s,render:d,selector:y,element:g}=t,v=fb(Object.assign(Object.assign({},xH(t,["formatter","transform","style","render","selector","element"])),s),t=>xQ(t,r,e,o,{channel:f,element:g})),{shape:b=u,text:x}=v,O=xH(v,["shape","text"]),w="string"==typeof i?Ex(i):i,k=Object.assign(Object.assign({},O),{text:w(x,r,e,o),datum:r});return a(Object.assign({type:`label.${b}`,render:d},O),p)(n,k,xJ(h,"label",b,"label"),c)}}(i,a,t,n,r),f=e.select(`#${l}`).selectAll(x9(gM)).nodes().filter(t=>{var e;return!t.__removed__&&!((null==(e=t.style)?void 0:e.visibility)==="hidden"||t.children&&t.children.some(t=>{var e;return(null==(e=t.style)?void 0:e.visibility)==="hidden"}))});return o.flatMap((t,e)=>{let{transform:n=[]}=t,r=xH(t,["transform"]);return f.flatMap(n=>{let i=function(t,e,n){let{seriesIndex:r,seriesKey:i,points:a,key:o,index:l}=n.__data__,s=function(t){let e=t.cloneNode(!0),n=t.getAnimations();e.style.visibility="hidden",n.forEach(t=>{let n=t.effect.getKeyframes();e.attr(n[n.length-1])}),t.parentNode.appendChild(e);let r=e.getLocalBounds();e.destroy();let{min:i,max:a}=r;return[i,a]}(n);if(!r)return[Object.assign(Object.assign({},t),{key:`${o}-${e}`,bounds:s,index:l,points:a,dependentElement:n})];let u=function(t){let{selector:e}=t;if(!e)return null;if("function"==typeof e)return e;if("first"===e)return t=>[t[0]];if("last"===e)return t=>[t[t.length-1]];throw Error(`Unknown selector: ${e}`)}(t),c=r.map((r,o)=>Object.assign(Object.assign({},t),{key:`${i[o]}-${e}`,bounds:[a[o]],index:r,points:a,dependentElement:n}));return u?u(c):c}(r,e,n);return i.forEach(e=>{s.set(e,t=>c(Object.assign(Object.assign({},t),{element:n}))),u.set(e,t)}),i})})}),f=cX(l).selectAll(x9("label")).data(c,t=>t.key).join(t=>t.append(t=>s.get(t)(t)).attr("className","label"),t=>t.each(function(t,e,n){c$(n,s.get(t)(t))}),t=>t.remove()).nodes(),h=cs(f,t=>u.get(t.__data__)),{coordinate:d,layout:p}=t,y={canvas:r.canvas,coordinate:d,layout:p};for(let[t,e]of h){let{transform:n=[]}=t;cB(n.map(i))(e,y)}o&&o(f,y)})(t,e,i,r),function(t,e,n,r){let i=cr(t.scale,"y.options.breaks",[]),{document:a}=r.canvas;if([gA,gS].forEach(t=>{a.getElementsByClassName(t).forEach(t=>{t.remove()})}),!i.length)return;let o=e.select(x9("plot")).node(),[l]=vV("shape",n),s=new Map;i.forEach((n,i)=>{s.set(n,l({type:"break"},{view:t,selection:e,context:r}))}),cX(o).selectAll(x9(gA)).data(i,t=>t.key).join(t=>t.append((t,e)=>s.get(t)(t,e)).attr("className",gA),t=>t.each(function(t,e,n){c$(n,s.get(t)(t,e))}),t=>t.remove()).nodes()}(t,e,i,r)})}function xQ(t,e,n,r,i){return"function"==typeof t?t(e,n,r,i):"string"!=typeof t?t:cV(e)&&void 0!==e[t]?e[t]:t}function xJ(t,e,n,r){if("string"!=typeof e)return;let{color:i}=t,a=t[e]||{};return Object.assign({color:i},a[n]||a[r])}function x0(t,e,n,r,i){var a,o;let[,l]=vV("shape",i),[s]=vV("animation",i),{defaultShape:u,shape:c}=n,{theme:f,coordinate:h}=r,d=fu(t),p=`default${d}Animation`,{[p]:y}=(null==(a=c[u])?void 0:a.props)||l(x6(e,u)).props,{[t]:g={}}=f,v=(null==(o=e.animate)?void 0:o[t])||{},b={coordinate:h};return(e,n,r)=>{let{[`${t}Type`]:i,[`${t}Delay`]:a,[`${t}Duration`]:o,[`${t}Easing`]:l}=e,u=Object.assign({type:i||y},v);if(!u.type)return null;let c=s(u,b)(n,r,cy(g,{delay:a,duration:o,easing:l}));return(Array.isArray(c)?c:[c]).filter(Boolean)}}function x1(t){return t.finished.then(()=>{t.cancel()}),t}function x2(t={}){if("string"==typeof t)return{type:t};let{type:e="light"}=t;return Object.assign(Object.assign({},xH(t,["type"])),{type:e})}function x5(t){let{interaction:e={}}=t;return Object.entries(cy({event:!0,tooltip:!0,sliderFilter:!0,legendFilter:!0,scrollbarFilter:!0},e)).reverse()}function x3(t,e){return xq(this,void 0,void 0,function*(){let{data:n}=t,r=xH(t,["data"]);if(void 0==n)return t;let[,{data:i}]=yield xT([],{data:n},e);return Object.assign({data:i},r)})}function x4(t){t.style("transform",t=>`translate(${t.paddingLeft+t.marginLeft}, ${t.paddingTop+t.marginTop})`).style("width",t=>t.innerWidth).style("height",t=>t.innerHeight)}function x6(t,e){let{type:n}=t;return"string"==typeof e?`${n}.${e}`:e}function x8(t,e){let n=t=>void 0!==t.class?`${t.class}`:"";0===t.nodes().length||(t.selectAll(x9(gk)).data(e,t=>t.key).join(t=>t.append("g").attr("className",gk).attr("id",t=>t.key).style("facet",n).style("fill","transparent").style("zIndex",t=>{var e;return null!=(e=t.zIndex)?e:0}),t=>t.style("facet",n).style("fill","transparent").style("zIndex",t=>{var e;return null!=(e=t.zIndex)?e:0}),t=>t.remove()),t.select(x9(g_)).node()||t.append("g").attr("className",g_).style("zIndex",0))}function x9(...t){return t.map(t=>`.${t}`).join("")}function x7(t,e){t.node()&&t.style("clipPath",t=>{if(!e)return null;let{paddingTop:n,paddingLeft:r,marginLeft:i,marginTop:a,innerWidth:o,innerHeight:l}=t;return new lT({style:{x:r+i,y:n+a,width:o,height:l}})})}function Ot(t){let{style:e,scale:n,type:r}=t,i={},a=cr(e,"columnWidthRatio");return a&&"interval"===r&&(i.x=Object.assign(Object.assign({},null==n?void 0:n.x),{padding:1-a})),Object.assign(Object.assign({},t),{scale:Object.assign(Object.assign({},n),i)})}function Oe(t){let{axis:e}=t,n=cr(e,"y.breaks");return n&&gw(t,"scale.y.breaks",n.map(t=>Object.assign(Object.assign({key:`break-${t.start}-${t.end}`},t),{gap:(t=>{if(!t||"string"!=typeof t)return t;let e=t.endsWith("%")?parseFloat(t.slice(0,-1))/100:parseFloat(t);if(isNaN(e)||e<0||e>1)throw Error(`Invalid gap value: ${t}. It should be between 0 and 1.`);return e})(t.gap)}))),t}function On(t,e={},n=!1,r=!0){let i,{canvas:a,emitter:o}=e;a&&(null==(i=a.getRoot().querySelectorAll(".view"))||i.forEach(t=>{let{nameInteraction:e=new Map}=t;(null==e?void 0:e.size)>0&&Array.from(null==e?void 0:e.values()).forEach(t=>{null==t||t.destroy()})}),n?a.destroy():a.destroyChildren()),r&&o.off()}function Or(t,e){let n,r=-1,i=-1;if(void 0===e)for(let e of t)++i,null!=e&&(n>e||void 0===n&&e>=e)&&(n=e,r=i);else for(let a of t)null!=(a=e(a,++i,t))&&(n>a||void 0===n&&a>=a)&&(n=a,r=i);return r}function Oi(t,e){let n=0,r=0;if(void 0===e)for(let e of t)null!=e&&(e*=1)>=e&&(++n,r+=e);else{let i=-1;for(let a of t)null!=(a=e(a,++i,t))&&(a*=1)>=a&&(++n,r+=a)}if(n)return r/n}let Oa=function(t,e,n){var r,i,a,o,l=0;n||(n={});var s=function(){l=!1===n.leading?0:Date.now(),r=null,o=t.apply(i,a),r||(i=a=null)},u=function(){var u=Date.now();l||!1!==n.leading||(l=u);var c=e-(u-l);return i=this,a=arguments,c<=0||c>e?(r&&(clearTimeout(r),r=null),l=u,o=t.apply(i,a),r||(i=a=null)):r||!1===n.trailing||(r=setTimeout(s,c)),o};return u.cancel=function(){clearTimeout(r),l=0,r=i=a=null},u};function Oo(t){var e=document.createElement("div");e.innerHTML=t;var n=e.childNodes[0];return n&&e.contains(n)&&e.removeChild(n),n}var Ol=function(t,e){if(null==e){t.innerHTML="";return}t.replaceChildren?Array.isArray(e)?t.replaceChildren.apply(t,e1([],e0(e),!1)):t.replaceChildren(e):(t.innerHTML="",Array.isArray(e)?e.forEach(function(e){return t.appendChild(e)}):t.appendChild(e))};function Os(t){return void 0===t&&(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 Ou={overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"},Oc=function(t){function e(e){var n,r,i,a,o,l=this,s=null==(o=null==(a=e.style)?void 0:a.template)?void 0:o.prefixCls,u=Os(s);return(l=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(u.CONTAINER,'"></div>'),title:'<div class="'.concat(u.TITLE,'"></div>'),item:'<li class="'.concat(u.LIST_ITEM,'" data-index={index}>\n <span class="').concat(u.NAME,'">\n <span class="').concat(u.MARKER,'" style="background:{color}"></span>\n <span class="').concat(u.NAME_LABEL,'" title="{name}">{name}</span>\n </span>\n <span class="').concat(u.VALUE,'" title="{value}">{value}</span>\n </li>')},style:(void 0===(n=s)&&(n=""),i=Os(n),(r={})[".".concat(i.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"},r[".".concat(i.TITLE)]={color:"rgba(0, 0, 0, 0.45)"},r[".".concat(i.LIST)]={margin:"0px","list-style-type":"none",padding:"0px"},r[".".concat(i.LIST_ITEM)]={"list-style-type":"none",display:"flex","line-height":"2em","align-items":"center","justify-content":"space-between","white-space":"nowrap"},r[".".concat(i.MARKER)]={width:"8px",height:"8px","border-radius":"50%",display:"inline-block","margin-right":"4px"},r[".".concat(i.NAME)]={display:"flex","align-items":"center","max-width":"216px"},r[".".concat(i.NAME_LABEL)]=eZ({flex:1},Ou),r[".".concat(i.VALUE)]=eZ({display:"inline-block",float:"right",flex:1,"text-align":"right","min-width":"28px","margin-left":"30px",color:"rgba(0, 0, 0, 0.85)"},Ou),r[".".concat(i.CROSSHAIR_X)]={position:"absolute",width:"1px","background-color":"rgba(0, 0, 0, 0.25)"},r[".".concat(i.CROSSHAIR_Y)]={position:"absolute",height:"1px","background-color":"rgba(0, 0, 0, 0.25)"},r)})||this).timestamp=-1,l.prevCustomContentKey=l.attributes.contentKey,l.initShape(),l.render(l.attributes,l),l}return eK(e,t),Object.defineProperty(e.prototype,"HTMLTooltipElement",{get:function(){return this.element},enumerable:!1,configurable:!0}),e.prototype.getContainer=function(){return this.element},Object.defineProperty(e.prototype,"elementSize",{get:function(){return{width:this.element.offsetWidth,height:this.element.offsetHeight}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"HTMLTooltipItemsElements",{get:function(){var t=this.attributes,e=t.data,n=t.template;return e.map(function(t,e){var r,i=t.name,a=t.color,o=t.index,l=eQ(t,["name","color","index"]),s=eZ({name:void 0===i?"":i,color:void 0===a?"black":a,index:null!=o?o:e},l);return Oo((r=n.item,r&&s?r.replace(/\\?\{([^{}]+)\}/g,function(t,e){return"\\"===t.charAt(0)?t.slice(1):void 0===s[e]?"":s[e]}):r))})},enumerable:!1,configurable:!0}),e.prototype.render=function(t,e){this.renderHTMLTooltipElement(),this.updatePosition()},e.prototype.destroy=function(){var e;null==(e=this.element)||e.remove(),t.prototype.destroy.call(this)},e.prototype.show=function(t,e){var n=this;if(void 0!==t&&void 0!==e){var r="hidden"===this.element.style.visibility,i=function(){n.attributes.x=null!=t?t:n.attributes.x,n.attributes.y=null!=e?e:n.attributes.y,n.updatePosition()};r?this.closeTransition(i):i()}this.element.style.visibility="visible"},e.prototype.hide=function(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.attributes.enterable&&this.isCursorEntered(t,e)||(this.element.style.visibility="hidden")},e.prototype.initShape=function(){var t=this.attributes.template;this.element=Oo(t.container),this.id&&this.element.setAttribute("id",this.id)},e.prototype.renderCustomContent=function(){if(void 0===this.prevCustomContentKey||this.prevCustomContentKey!==this.attributes.contentKey){this.prevCustomContentKey=this.attributes.contentKey;var t=this.attributes.content;t&&("string"==typeof t?this.element.innerHTML=t:Ol(this.element,t))}},e.prototype.renderHTMLTooltipElement=function(){var t,e,n=this.attributes,r=n.template,i=n.title,a=n.enterable,o=n.style,l=n.content,s=Os(r.prefixCls),u=this.element;if(this.element.style.pointerEvents=a?"auto":"none",l)this.renderCustomContent();else{i?(u.innerHTML=r.title,u.getElementsByClassName(s.TITLE)[0].innerHTML=i):null==(e=null==(t=u.getElementsByClassName(s.TITLE))?void 0:t[0])||e.remove();var c=this.HTMLTooltipItemsElements,f=document.createElement("ul");f.className=s.LIST,Ol(f,c);var h=this.element.querySelector(".".concat(s.LIST));h?h.replaceWith(f):u.appendChild(f)}Object.entries(o).forEach(function(t){var e=e0(t,2),n=e[0],r=e[1];e1([u],e0(u.querySelectorAll(n)),!1).filter(function(t){return t.matches(n)}).forEach(function(t){t&&(t.style.cssText+=Object.entries(r).reduce(function(t,e){return"".concat(t).concat(e.join(":"),";")},""))})})},e.prototype.getRelativeOffsetFromCursor=function(t){var e=this.attributes,n=e.position,r=e.offset,i=(t||n).split("-"),a={left:[-1,0],right:[1,0],top:[0,-1],bottom:[0,1]},o=this.elementSize,l=o.width,s=o.height,u=[-l/2,-s/2];return i.forEach(function(t){var e=e0(u,2),n=e[0],i=e[1],o=e0(a[t],2),c=o[0],f=o[1];u=[n+(l/2+r[0])*c,i+(s/2+r[1])*f]}),u},e.prototype.setOffsetPosition=function(t){var e=e0(t,2),n=e[0],r=e[1],i=this.attributes,a=i.x,o=i.y,l=i.container,s=l.x,u=l.y;this.element.style.left="".concat(+(void 0===a?0:a)+s+n,"px"),this.element.style.top="".concat(+(void 0===o?0:o)+u+r,"px")},e.prototype.updatePosition=function(){var t=this.attributes.showDelay,e=Date.now();this.timestamp>0&&e-this.timestamp<(void 0===t?60:t)||(this.timestamp=e,this.setOffsetPosition(this.autoPosition(this.getRelativeOffsetFromCursor())))},e.prototype.autoPosition=function(t){var e=e0(t,2),n=e[0],r=e[1],i=this.attributes,a=i.x,o=i.y,l=i.bounding,s=i.position;if(!l)return[n,r];var u=this.element,c=u.offsetWidth,f=u.offsetHeight,h=e0([+a+n,+o+r],2),d=h[0],p=h[1],y={left:"right",right:"left",top:"bottom",bottom:"top"},g=l.x,v=l.y,b={left:d<g,right:d+c>g+l.width,top:p<v,bottom:p+f>v+l.height},x=[];s.split("-").forEach(function(t){b[t]?x.push(y[t]):x.push(t)});var O=x.join("-");return this.getRelativeOffsetFromCursor(O)},e.prototype.isCursorEntered=function(t,e){if(this.element){var n=this.element.getBoundingClientRect();return new dQ(n.x,n.y,n.width,n.height).isPointIn(t,e)}return!1},e.prototype.closeTransition=function(t){var e=this,n=this.element.style.transition;this.element.style.transition="none",t(),setTimeout(function(){e.element.style.transition=n},10)},e.tag="tooltip",e}(f4),Of=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let Oh="tooltipLocked";function Od(t,e){var n;if(e)return"string"==typeof e?document.querySelector(e):e;let r=null==(n=t.ownerDocument)?void 0:n.defaultView;if(r)return r.getContextService().getDomElement().parentElement}function Op({root:t,data:e,x:n,y:r,render:i,event:a,single:o,position:l="right-bottom",enterable:s=!1,css:u,mount:c,bounding:f,offset:h}){let d,p,y=Od(t,c),g=Od(t),v=o?g:t,b=f||function(t){let{min:[e,n],max:[r,i]}=t.getRenderBounds();return{x:e,y:n,width:r-e,height:i-n}}(t),x=(d=g.getBoundingClientRect(),p=y.getBoundingClientRect(),{x:d.x-p.x,y:d.y-p.y}),{tooltipElement:O=function(t,e,n,r,i,a,o,l={},s=[10,10]){let u=new Oc({className:"tooltip",style:{x:e,y:n,container:o,data:[],bounding:a,position:r,enterable:i,title:"",offset:s,template:{prefixCls:"g2-"},style:cy({[fN("tooltip")]:{},[fN("tooltip-title")]:{overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"}},l)}});return t.appendChild(u.HTMLTooltipElement),u}(y,n,r,l,s,b,x,u,h)}=v,{items:w,title:k=""}=e;O.update(Object.assign({x:n,y:r,data:w.map(t=>Object.assign(Object.assign({},t),{value:t.value||0===t.value?t.value:""})),title:k,position:l,enterable:s,container:x},void 0!==i&&{content:i(a,{items:w,title:k})})),v.tooltipElement=O}function Oy({root:t,single:e,emitter:n,nativeEvent:r=!0,event:i=null}){r&&n.emit("tooltip:hide",{nativeEvent:r});let a=Od(t),{tooltipElement:o}=e?a:t;o&&o.hide(null==i?void 0:i.clientX,null==i?void 0:i.clientY),OO(t),Ow(t),Ok(t)}function Og({root:t,single:e}){let n=Od(t),r=e?n:t;if(!r)return;let{tooltipElement:i}=r;i&&(i.destroy(),r.tooltipElement=void 0),OO(t),Ow(t),Ok(t)}function Ov(t){let{value:e}=t;return Object.assign(Object.assign({},t),{value:void 0===e?"undefined":e})}function Om(t){let e=t.getAttribute("fill"),n=t.getAttribute("stroke"),{__data__:r}=t,{color:i=e&&"transparent"!==e?e:n}=r;return i}function Ob(t,e=t=>t){return Array.from(new Map(t.map(t=>[e(t),t])).values())}function Ox(t,e,n,r=t.map(t=>t.__data__),i={}){let a=t=>t instanceof Date?+t:t,o=Ob(r.map(t=>t.title),a).filter(cW),l=r.flatMap((r,a)=>{let o=r.element||t[a],{items:l=[],title:s}=r,u=l.filter(cW),c=void 0!==n?n:l.length<=1;return u.map(t=>{var{color:n=Om(o)||i.color,name:a}=t,l=Of(t,["color","name"]);let u=function(t,e){var n,r,i,a;let o,l,{color:s,facet:u=!1}=t,{color:c,series:f}=e,h=(o=null!=(n=e.markKey)?n:null==(i=null==(r=e.element)?void 0:r.__data__)?void 0:i.markKey,l=Object.keys(t).find(e=>{if(e.startsWith("series")){let n=t[e].getOptions();return"series"===n.name&&n.markKey===o}}),null!=(a=t[l])?a:t.series),d=t=>t&&t.invert&&!(t instanceof cA)&&!(t instanceof cL);if(d(h))return h.clone().invert(f);if(f&&h instanceof cA&&h.invert(f)!==c&&!u)return h.invert(f);if(d(s)){let t=s.invert(c);return Array.isArray(t)?null:t}return null}(e,r),f=!c||xj in l?a||u:u||a;return Object.assign(Object.assign({},l),{color:n,name:f||s})})}).map(Ov);return Object.assign(Object.assign({},o.length>0&&{title:o.join(",")}),{items:Ob(l,t=>`(${a(t.name)}, ${a(t.value)}, ${a(t.color)})`)})}function OO(t){t.ruleY&&(t.ruleY.remove(),t.ruleY=void 0)}function Ow(t){t.ruleX&&(t.ruleX.remove(),t.ruleX=void 0)}function Ok(t){t.markers&&(t.markers.forEach(t=>t.remove()),t.markers=[])}function O_(t,e){return Array.from(t.values()).some(t=>{var n;return null==(n=t.interaction)?void 0:n[e]})}function OM(t,e){return void 0===t?e:t}function OE(t){let{title:e,items:n}=t;return 0===n.length&&void 0===e}function OA({root:t,event:e,elements:n=[],coordinate:r,scale:i,shared:a}){var o,l;let s=n.every(t=>"interval"===t.markType)&&!fB(r),u=i.x,c=function(t){let{x:e}=t;if(!e||!e.valueBandWidth)return!0;let{valueBandWidth:n}=e;return!!eq(n)||1===new Set(n.values()).size}(i),f=i.series,h=null!=(l=null==(o=null==u?void 0:u.getBandWidth)?void 0:o.call(u))?l:0,d=f&&f.valueBandWidth?t=>{let e=Math.round(1/f.valueBandWidth);return t.__data__.x+t.__data__.series*h+h/(2*e)}:t=>t.__data__.x+h/2;s&&n.sort((t,e)=>d(t)-d(e));let p=t=>{let{target:e=dT(n)}=t;return vB(e,e=>!!e.classList&&(cI(e)&&gw(e,"__data__.normalized",function(t,e){let{innerWidth:n,innerHeight:r,marginLeft:i,paddingLeft:a,insetLeft:o,marginTop:l,paddingTop:s,insetTop:u}=t.getOptions();return{x:(e.x-i-a-o)/n,y:(e.y-l-s-u)/r}}(r,{x:t.offsetX,y:t.offsetY})),e.classList.includes("element")))};return(s?e=>{let i=vv(t,e);if(!i)return;let[o]=r.invert(i),l=gI(d).center,s=c?l(n,o):function(t,e){let{adjustedRange:n,valueBandWidth:r,valueStep:i}=t,a=Array.from(r.values()),o=Array.from(i.values()),l=n.map((t,e)=>{let n=(o[e]-a[e])/2;return[t-n,t+a[e]+n]}).findIndex(([t,n])=>t<=e&&e<=n);return -1!==l?l:e>.5?n.length-1:0}(u,o),f=n[s];if(!a){let t=n.find(t=>t!==f&&d(t)===d(f));if(t)return p(e)||t}return f}:p)(e)}function OS({root:t,event:e,elements:n,coordinate:r,scale:i,startX:a,startY:o}){let l=fD(r),s=[],u=[];for(let t of n){let{__data__:e}=t,{seriesX:n,title:r,items:i}=e;n?s.push(t):(r||i)&&u.push(t)}let c=u.length&&u.every(t=>"interval"===t.markType)&&!fB(r),f=t=>t.__data__.x,h=!!i.x.getBandWidth&&u.length>0;s.sort((t,e)=>{let n=+!l,r=t=>t.getBounds().min[n];return l?r(e)-r(t):r(t)-r(e)});let d=t=>{let e=+!!l,{min:n,max:r}=t.getLocalBounds();return gc([n[e],r[e]])};c?n.sort((t,e)=>f(t)-f(e)):u.sort((t,e)=>{let[n,r]=d(t),[i,a]=d(e),o=(n+r)/2,s=(i+a)/2;return l?s-o:o-s});let p=new Map(s.map(t=>{let{__data__:e}=t,{seriesX:n}=e;return[t,[gc(n.map((t,e)=>e),t=>n[+t]),n]]})),{x:y}=i,g=(null==y?void 0:y.getBandWidth)?y.getBandWidth()/2:0,v=t=>{let[e]=r.invert(t);return e-g},b=(t,e,n,r)=>{let{_x:i}=t,a=void 0!==i?y.map(i):v(e),o=r.filter(cW),[l,s]=gc([o[0],o[o.length-1]]);if(!h&&(a<l||a>s)&&l!==s)return null;let u=(0,gI(t=>r[+t]).center)(n,a);return n[u]},x=c?(t,e)=>{let n=(0,gI(f).center)(e,v(t)),r=e[n];return cs(e,f).get(f(r))}:(t,e)=>{let n=t[+!!l],r=e.filter(t=>{let[e,r]=d(t);return n>=e&&n<=r});if(!h||r.length>0)return r;let i=(0,gI(t=>{let[e,n]=d(t);return(e+n)/2}).center)(e,n);return[e[i]].filter(cW)},O=(t,e)=>{let{__data__:n}=t;return Object.fromEntries(Object.entries(n).filter(([t])=>t.startsWith("series")&&"series"!==t).map(([t,n])=>{let r=n[e];return[cv(t.replace("series","")),r]}))},w=vv(t,e);if(!w)return;let k=[w[0]-a,w[1]-o];if(!k)return;let _=x(k,u),M=[],E=[];for(let t of s){let[n,i]=p.get(t),a=b(e,k,n,i);if(null!==a){M.push(t);let e=O(t,a),{x:n,y:i}=e,o=r.map([(n||0)+g,i||0]);E.push([Object.assign(Object.assign({},e),{element:t}),o])}}let A=Array.from(new Set(E.map(t=>t[0].x))),S=A[Or(A,t=>Math.abs(t-v(k)))],j=E.filter(t=>t[0].x===S),P=[...j.map(t=>t[0]),..._.map(t=>t.__data__)];return{selectedElements:[...M,..._],selectedData:P,filteredSeriesData:j,abstractX:v}}function Oj(t,e){var{elements:n,sort:r,filter:i,scale:a,coordinate:o,crosshairs:l,crosshairsX:s,crosshairsY:u,render:c,groupName:f,emitter:h,wait:d=50,leading:p=!0,trailing:y=!1,startX:g=0,startY:v=0,body:b=!0,single:x=!0,position:O,enterable:w,mount:k,bounding:_,theme:M,offset:E,disableNative:A=!1,marker:S=!0,preserve:j=!1,style:P={},css:T={},clickLock:C=!1,disableAutoHide:N=!1}=e,L=Of(e,["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"]);let I=n(t),R=cy(P,L),D=fB(o),B=fD(o),{innerWidth:F,innerHeight:z,width:$,height:W,insetLeft:G,insetTop:q}=o.getOptions(),H=Oa(e=>{var n;if(C&&t.getAttribute(Oh))return;let d=vv(t,e);if(!d)return;let p=vg(t),y=p.min[0],A=p.min[1],{selectedElements:j,selectedData:P,filteredSeriesData:N,abstractX:L}=OS({root:t,event:e,elements:I,coordinate:o,scale:a,startX:g,startY:v}),H=Ox(j,a,f,P,M);if(r&&H.items.sort((t,e)=>r(t)-r(e)),i&&(H.items=H.items.filter(i)),0===j.length||OE(H))return void Y(e);if(b&&Op({root:t,data:H,x:d[0]+y,y:d[1]+A,render:c,event:e,single:x,position:O,enterable:w,mount:k,bounding:_,css:T,offset:E}),l||s||u){let e=cG(R,"crosshairs"),n=Object.assign(Object.assign({},e),cG(R,"crosshairsX")),r=Object.assign(Object.assign({},e),cG(R,"crosshairsY")),i=N.map(t=>t[1]);s&&function(t,e,n,r){var{plotWidth:i,plotHeight:a,mainWidth:o,mainHeight:l,startX:s,startY:u,transposed:c,polar:f,insetLeft:h,insetTop:d}=r;let p=Object.assign({lineWidth:1,stroke:"#1b1e23",strokeOpacity:.5},Of(r,["plotWidth","plotHeight","mainWidth","mainHeight","startX","startY","transposed","polar","insetLeft","insetTop"])),y=((t,e)=>{if(1===e.length)return e[0];let n=Or(e.map(e=>yS(e,t)),t=>t);return e[n]})(n,e);if(f){let e,n,r,i,[a,c,f]=(r=yS([e=s+h+o/2,n=u+d+l/2],y),[e,n,r]),g=t.ruleX||(i=new ly({style:Object.assign({cx:a,cy:c,r:f},p)}),t.appendChild(i),i);g.style.cx=a,g.style.cy=c,g.style.r=f,t.ruleX=g}else{let e,[n,r,o,l]=c?[s+y[0],s+y[0],u,u+a]:[s,s+i,y[1]+u,y[1]+u],f=t.ruleX||(e=new l_({style:Object.assign({x1:n,x2:r,y1:o,y2:l},p)}),t.appendChild(e),e);f.style.x1=n,f.style.x2=r,f.style.y1=o,f.style.y2=l,t.ruleX=f}}(t,i,d,Object.assign(Object.assign({},n),{plotWidth:F,plotHeight:z,mainWidth:$,mainHeight:W,insetLeft:G,insetTop:q,startX:g,startY:v,transposed:B,polar:D})),u&&function(t,e,n){var{plotWidth:r,plotHeight:i,mainWidth:a,mainHeight:o,startX:l,startY:s,transposed:u,polar:c,insetLeft:f,insetTop:h}=n;let d=Object.assign({lineWidth:1,stroke:"#1b1e23",strokeOpacity:.5},Of(n,["plotWidth","plotHeight","mainWidth","mainHeight","startX","startY","transposed","polar","insetLeft","insetTop"])),p=e.map(t=>t[1]),y=e.map(t=>t[0]),g=Oi(p),v=Oi(y),[b,x,O,w]=(()=>{if(c){let t=Math.min(a,o)/2,e=l+f+a/2,n=s+h+o/2,r=yj(yA([v,g],[e,n])),i=e+t*Math.cos(r),u=n+t*Math.sin(r);return[e,i,n,u]}return u?[l,l+r,g+s,g+s]:[v+l,v+l,s,s+i]})();if(y.length>0){let e,n=t.ruleY||(e=new l_({style:Object.assign({x1:b,x2:x,y1:O,y2:w},d)}),t.appendChild(e),e);n.style.x1=b,n.style.x2=x,n.style.y1=O,n.style.y2=w,t.ruleY=n}}(t,i,Object.assign(Object.assign({},r),{plotWidth:F,plotHeight:z,mainWidth:$,mainHeight:W,insetLeft:G,insetTop:q,startX:g,startY:v,transposed:B,polar:D}))}S&&function(t,{data:e,style:n,theme:r}){t.markers&&t.markers.forEach(t=>t.remove());let{type:i=""}=n,a=e.filter(t=>{let[{x:e,y:n}]=t;return cW(e)&&cW(n)}).map(t=>{let[{color:e,element:a},o]=t,l=e||a.style.fill||a.style.stroke||r.color,s="hollow"===i?"transparent":l,u="hollow"===i?l:"#fff";return new ly({className:"g2-tooltip-marker",style:Object.assign({cx:o[0],cy:o[1],fill:s,r:4,stroke:u,lineWidth:2,pointerEvents:"none"},n)})});for(let e of a)t.appendChild(e);t.markers=a}(t,{data:N,style:cG(R,"marker"),theme:M});let V=null==(n=N[0])?void 0:n[0].x,U=null!=V?V:L(focus);h.emit("tooltip:show",Object.assign(Object.assign({},e),{nativeEvent:!0,data:Object.assign(Object.assign({},H),{data:{x:gq(a.x,U,!0)}})}))},d,{leading:p,trailing:y}),Y=e=>{C&&t.getAttribute(Oh)||N||Oy({root:t,single:x,emitter:h,event:e})},V=()=>{Og({root:t,single:x})},U=e=>{var n,{nativeEvent:r,data:i,offsetX:l,offsetY:s}=e,u=Of(e,["nativeEvent","data","offsetX","offsetY"]);if(r)return;let c=null==(n=null==i?void 0:i.data)?void 0:n.x,f=a.x.map(c),[h,d]=o.map([f,.5]),p=vg(t),y=p.min[0],g=p.min[1];H(Object.assign(Object.assign({},u),{offsetX:void 0!==l?l:y+h,offsetY:void 0!==s?s:g+d,_x:c}))},X=()=>{Oy({root:t,single:x,emitter:h,nativeEvent:!1})},K=()=>{te(),V()},Z=e=>{vv(t,e)||Y(e)},Q=()=>{tt()},J=e=>{C&&t.setAttribute(Oh,!t.getAttribute(Oh)),H(e)},tt=()=>{A||(t.addEventListener("pointerdown",J),t.addEventListener("pointerenter",H),t.addEventListener("pointermove",H),t.addEventListener("pointerleave",Z),t.addEventListener("pointerup",Y))},te=()=>{A||(t.removeEventListener("pointerdown",J),t.removeEventListener("pointerenter",H),t.removeEventListener("pointermove",H),t.removeEventListener("pointerleave",Z),t.removeEventListener("pointerup",Y))};return tt(),h.on("tooltip:show",U),h.on("tooltip:hide",X),h.on("tooltip:disable",K),h.on("tooltip:enable",Q),()=>{te(),h.off("tooltip:show",U),h.off("tooltip:hide",X),h.off("tooltip:disable",K),h.off("tooltip:enable",Q),j?Oy({root:t,single:x,emitter:h,nativeEvent:!1}):V()}}function OP(t){let{shared:e,crosshairs:n,crosshairsX:r,crosshairsY:i,series:a,name:o,item:l=()=>({}),facet:s=!1}=t,u=Of(t,["shared","crosshairs","crosshairsX","crosshairsY","series","name","item","facet"]);return(t,o,c)=>{let{container:f,view:h}=t,{scale:d,markState:p,coordinate:y,theme:g}=h,v=O_(p,"seriesTooltip"),b=O_(p,"crosshairs"),x=vy(f),O=OM(a,v),w=OM(n,b);if(u.clickLock&&!s&&x.setAttribute(Oh,!1),O&&Array.from(p.values()).some(t=>{var e;return(null==(e=t.interaction)?void 0:e.seriesTooltip)&&t.tooltip})&&!s)return Oj(x,Object.assign(Object.assign({},u),{theme:g,elements:vh,scale:d,coordinate:y,crosshairs:w,crosshairsX:OM(OM(r,n),!1),crosshairsY:OM(i,w),item:l,emitter:c}));if(O&&s){let e=o.filter(e=>e!==t&&e.options.parentKey===t.options.key),a=vd(t,o),s=e[0].view.scale,f=x.getBounds(),h=f.min[0],d=f.min[1];Object.assign(s,{facet:!0});let p=x.parentNode.parentNode;return u.clickLock&&p.setAttribute(Oh,!1),Oj(p,Object.assign(Object.assign({},u),{theme:g,elements:()=>a,scale:s,coordinate:y,crosshairs:OM(n,b),crosshairsX:OM(OM(r,n),!1),crosshairsY:OM(i,w),item:l,startX:h,startY:d,emitter:c}))}return function(t,{elements:e,coordinate:n,scale:r,render:i,groupName:a,sort:o,filter:l,emitter:s,wait:u=50,leading:c=!0,trailing:f=!1,groupKey:h=t=>t,single:d=!0,position:p,enterable:y,datum:g,view:v,mount:b,bounding:x,theme:O,offset:w,shared:k=!1,body:_=!0,disableNative:M=!1,preserve:E=!1,css:A={},clickLock:S=!1,disableAutoHide:j=!1}){let P=e(t),T=cs(P,h),C=Oa(e=>{if(S&&t.getAttribute(Oh))return;let u=OA({root:t,event:e,elements:P,coordinate:n,scale:r,shared:k});if(!u){j||Oy({root:t,single:d,emitter:s,event:e});return}let c=h(u),f=T.get(c);if(!f)return;let g=1!==f.length||k?Ox(f,r,a,void 0,O):function(t){let{__data__:e}=t;if(cI(t))return function(t){var e,n,r,i,a,o,l;let{__data__:s}=t,{title:u,items:c=[]}=s;if(c.some(t=>xj in t)){let e=c.filter(cW).map(e=>{var{color:n=Om(t)}=e;return Object.assign(Object.assign({},Of(e,["color"])),{color:n})}).map(Ov);return Object.assign(Object.assign({},u&&{title:u}),{items:e})}let f=null!=(n=null==(e=null==s?void 0:s.normalized)?void 0:e.x)?n:0,h=null==(r=t.parentNode)?void 0:r.__data__,{x:d={},y:p={},color:y={}}=null!=(i=null==h?void 0:h.encode)?i:{},{value:g=[]}=d,{value:v=[]}=p,{value:b=[]}=y,x=Math.min(Math.round(g.length*f),g.length-1);return{title:`${g[x]}, ${v[x]}`,items:[{name:null!=(a=y.field)?a:"value",value:b[x],color:(null==(o=t.style)?void 0:o.fill)||(null==(l=t.getAttribute)?void 0:l.call(t,"color"))||"#000"}]}}(t);let{title:n,items:r=[]}=e,i=r.filter(cW).map(e=>{var{color:n=Om(t)}=e;return Object.assign(Object.assign({},Of(e,["color"])),{color:n})}).map(Ov);return Object.assign(Object.assign({},n&&{title:n}),{items:i})}(f[0]);if(o&&g.items.sort((t,e)=>o(t)-o(e)),l&&(g.items=g.items.filter(l)),OE(g)){j||Oy({root:t,single:d,emitter:s,event:e});return}let{offsetX:M,offsetY:E}=e;_&&Op({root:t,data:g,x:M,y:E,render:i,event:e,single:d,position:p,enterable:y,mount:b,bounding:x,css:A,offset:w}),s.emit("tooltip:show",Object.assign(Object.assign({},e),{nativeEvent:!0,data:Object.assign(Object.assign({},g),{data:cR(u,v)})}))},u,{leading:c,trailing:f}),N=e=>{j||Oy({root:t,single:d,emitter:s,event:e})},L=e=>{S&&t.setAttribute(Oh,!t.getAttribute(Oh)),C(e)},I=()=>{M||(t.addEventListener("pointerdown",L),t.addEventListener("pointermove",C),t.addEventListener("pointerleave",N),t.addEventListener("pointerup",N))},R=()=>{M||(t.removeEventListener("pointerdown",L),t.removeEventListener("pointermove",C),t.removeEventListener("pointerleave",N),t.removeEventListener("pointerup",N))},D=({nativeEvent:e,offsetX:n,offsetY:r,data:i})=>{if(e)return;let{data:a}=i,o=vL(P,a,g);if(!o)return;let{x:l,y:s,width:u,height:c}=o.getBBox(),f=t.getBBox();C({target:o,offsetX:void 0!==n?n+f.x:l+u/2,offsetY:void 0!==r?r+f.y:s+c/2})},B=({nativeEvent:e}={})=>{e||Oy({root:t,single:d,emitter:s,nativeEvent:!1})},F=()=>{R(),Og({root:t,single:d})},z=()=>{I()};return s.on("tooltip:show",D),s.on("tooltip:hide",B),s.on("tooltip:enable",z),s.on("tooltip:disable",F),I(),()=>{R(),s.off("tooltip:show",D),s.off("tooltip:hide",B),s.off("tooltip:enable",z),s.off("tooltip:disable",F),E?Oy({root:t,single:d,emitter:s,nativeEvent:!1}):Og({root:t,single:d})}}(x,Object.assign(Object.assign({},u),{datum:vO(h),elements:vh,scale:d,coordinate:y,groupKey:e?vx(h):void 0,item:l,emitter:c,view:h,theme:g,shared:e}))}}OP.props={reapplyWhenUpdate:!0};let OT=t=>t?parseInt(t):0;function OC(t,e){let n=[t];for(;n.length;){let t=n.shift();for(let r of(e&&e(t),t.children||[]))n.push(r)}}class ON{constructor(t={},e){this.parentNode=null,this.children=[],this.index=0,this.type=e,this.value=t}map(t=t=>t){let e=t(this.value);return this.value=e,this}attr(t,e){return 1==arguments.length?this.value[t]:this.map(n=>(n[t]=e,n))}append(t){let e=new t({});return e.children=[],this.push(e),e}push(t){return t.parentNode=this,t.index=this.children.length,this.children.push(t),this}remove(){let t=this.parentNode;if(t){let{children:e}=t,n=e.findIndex(t=>t===this);e.splice(n,1)}return this}getNodeByKey(t){let e=null;return OC(this,n=>{t===n.attr("key")&&(e=n)}),e}getNodesByType(t){let e=[];return OC(this,n=>{t===n.type&&e.push(n)}),e}getNodeByType(t){let e=null;return OC(this,n=>{e||t===n.type&&(e=n)}),e}call(t,...e){return t(this.map(),...e),this}getRoot(){let t=this;for(;t&&t.parentNode;)t=t.parentNode;return t}}var OL=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let OI=["width","height","depth","padding","paddingLeft","paddingRight","paddingBottom","paddingTop","inset","insetLeft","insetRight","insetTop","insetBottom","margin","marginLeft","marginRight","marginTop","marginBottom","autoFit","theme","title","interaction"],OR="__remove__",OD="__callback__";function OB(t){return Object.assign(Object.assign({},t.value),{type:t.type})}function OF(t,e){let{width:n,height:r,autoFit:i,depth:a=0}=t,o=640,l=480;if(i){let t,n,r,{width:i,height:a}=(t=getComputedStyle(e),n=e.clientWidth||OT(t.width),r=e.clientHeight||OT(t.height),{width:n-(OT(t.paddingLeft)+OT(t.paddingRight)),height:r-(OT(t.paddingTop)+OT(t.paddingBottom))});o=i||o,l=a||l}return o=n||o,l=r||l,{width:Math.max(eq(o)?o:1,1),height:Math.max(eq(l)?l:1,1),depth:a}}function Oz(t){return e=>{for(let[n,r]of Object.entries(t)){let{type:t}=r;"value"===t?function(t,e,{key:n=e}){t.prototype[e]=function(t){return 0==arguments.length?this.attr(n):this.attr(n,t)}}(e,n,r):"array"===t?function(t,e,{key:n=e}){t.prototype[e]=function(t){if(0==arguments.length)return this.attr(n);if(Array.isArray(t))return this.attr(n,t);let e=[...this.attr(n)||[],t];return this.attr(n,e)}}(e,n,r):"object"===t?function(t,e,{key:n=e}){t.prototype[e]=function(t,e){if(0==arguments.length)return this.attr(n);if(1==arguments.length&&"string"!=typeof t)return this.attr(n,t);let r=this.attr(n)||{};return r[t]=1==arguments.length||e,this.attr(n,r)}}(e,n,r):"node"===t?function(t,e,{ctor:n}){t.prototype[e]=function(t){let r=this.append(n);return"mark"===e&&(r.type=t),r}}(e,n,r):"container"===t?function(t,e,{ctor:n}){t.prototype[e]=function(){return this.type=null,this.append(n)}}(e,n,r):"mix"===t&&function(t,e){t.prototype[e]=function(t){if(0==arguments.length)return this.attr(e);if(Array.isArray(t))return this.attr(e,{items:t});if(cV(t)&&(void 0!==t.title||void 0!==t.items)||null===t||!1===t)return this.attr(e,t);let n=this.attr(e)||{},{items:r=[]}=n;return r.push(t),n.items=r,this.attr(e,n)}}(e,n)}return e}}function O$(t){return Object.fromEntries(Object.entries(t).map(([t,e])=>[t,{type:"node",ctor:e}]))}let OW={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"}},OG=Object.assign(Object.assign({},OW),{tooltip:{type:"mix"},viewStyle:{type:"object"}}),Oq=Object.assign(Object.assign({},OW),{labelTransform:{type:"array"}}),OH=class extends ON{changeData(t){var e;let n=this.getRoot();if(n)return this.attr("data",t),(null==(e=this.children)?void 0:e.length)&&this.children.forEach(e=>{e.attr("data",t)}),null==n?void 0:n.render()}getView(){let{views:t}=this.getRoot().getContext();if(null==t?void 0:t.length)return t.find(t=>t.key===this._key)}getScale(){var t;return null==(t=this.getView())?void 0:t.scale}getScaleByChannel(t){let e=this.getScale();if(e)return e[t]}getCoordinate(){var t;return null==(t=this.getView())?void 0:t.coordinate}getTheme(){var t;return null==(t=this.getView())?void 0:t.theme}getGroup(){let t=this._key;if(t)return this.getRoot().getContext().canvas.getRoot().getElementById(t)}show(){let t=this.getGroup();t&&(t.isVisible()||vc(t))}hide(){let t=this.getGroup();t&&t.isVisible()&&vu(t)}};OH=function(t,e,n,r){var i,a=arguments.length,o=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,r);else for(var l=t.length-1;l>=0;l--)(i=t[l])&&(o=(a<3?i(o):a>3?i(e,n,o):i(e,n))||o);return a>3&&o&&Object.defineProperty(e,n,o),o}([Oz(Oq)],OH);let OY=class extends ON{changeData(t){let e=this.getRoot();if(e)return this.attr("data",t),null==e?void 0:e.render()}getMark(){var t;let e=null==(t=this.getRoot())?void 0:t.getView();if(!e)return;let{markState:n}=e,r=Array.from(n.keys()).find(t=>t.key===this.attr("key"));return n.get(r)}getScale(){var t;let e=null==(t=this.getRoot())?void 0:t.getView();if(e)return null==e?void 0:e.scale}getScaleByChannel(t){var e,n;let r=null==(e=this.getRoot())?void 0:e.getView();if(r)return null==(n=null==r?void 0:r.scale)?void 0:n[t]}getGroup(){let t=this.attr("key");if(t)return this.getRoot().getContext().canvas.getRoot().getElementById(t)}};OY=function(t,e,n,r){var i,a=arguments.length,o=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,r);else for(var l=t.length-1;l>=0;l--)(i=t[l])&&(o=(a<3?i(o):a>3?i(e,n,o):i(e,n))||o);return a>3&&o&&Object.defineProperty(e,n,o),o}([Oz(OG)],OY);var OV=function(t,e,n,r){var i,a=arguments.length,o=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,r);else for(var l=t.length-1;l>=0;l--)(i=t[l])&&(o=(a<3?i(o):a>3?i(e,n,o):i(e,n))||o);return a>3&&o&&Object.defineProperty(e,n,o),o},OU=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n},OX=Object.prototype.hasOwnProperty;let OK=function(t,e){if(null===t||!cp(t))return{};var n={};return dU(e,function(e){OX.call(t,e)&&(n[e]=t[e])}),n};function OZ(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 OQ(t,e,n,r,i){for(var a,o=t.children,l=-1,s=o.length,u=t.value&&(r-e)/t.value;++l<s;)(a=o[l]).y0=n,a.y1=i,a.x0=e,a.x1=e+=a.value*u}function OJ(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;--r>=0;)e+=n[r].value;else e=1;t.value=e}function O0(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=O2)):void 0===e&&(e=O1);for(var n,r,i,a,o,l=new O4(t),s=[l];n=s.pop();)if((i=e(n.data))&&(o=(i=Array.from(i)).length))for(n.children=i,a=o-1;a>=0;--a)s.push(r=i[a]=new O4(i[a])),r.parent=n,r.depth=n.depth+1;return l.eachBefore(O3)}function O1(t){return t.children}function O2(t){return Array.isArray(t)?t[1]:null}function O5(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function O3(t){var e=0;do t.height=e;while((t=t.parent)&&t.height<++e)}function O4(t){this.data=t,this.depth=this.height=0,this.parent=null}function O6(t,e){for(var n in e)e.hasOwnProperty(n)&&"constructor"!==n&&void 0!==e[n]&&(t[n]=e[n])}function O8(t,e,n,r){return e&&O6(t,e),n&&O6(t,n),r&&O6(t,r),t}O4.prototype=O0.prototype={constructor:O4,count:function(){return this.eachAfter(OJ)},each:function(t,e){let n=-1;for(let r of this)t.call(e,r,++n,this);return this},eachAfter:function(t,e){for(var n,r,i,a=this,o=[a],l=[],s=-1;a=o.pop();)if(l.push(a),n=a.children)for(r=0,i=n.length;r<i;++r)o.push(n[r]);for(;a=l.pop();)t.call(e,a,++s,this);return this},eachBefore:function(t,e){for(var n,r,i=this,a=[i],o=-1;i=a.pop();)if(t.call(e,i,++o,this),n=i.children)for(r=n.length-1;r>=0;--r)a.push(n[r]);return this},find:function(t,e){let n=-1;for(let r of this)if(t.call(e,r,++n,this))return r},sum:function(t){return this.eachAfter(function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n})},sort:function(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;for(t=n.pop(),e=r.pop();t===e;)i=t,t=n.pop(),e=r.pop();return i}(e,t),r=[e];e!==n;)r.push(e=e.parent);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){return Array.from(this)},leaves:function(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t},links:function(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e},copy:function(){return O0(this).eachBefore(O5)},[Symbol.iterator]:function*(){var t,e,n,r,i=this,a=[i];do for(t=a.reverse(),a=[];i=t.pop();)if(yield i,e=i.children)for(n=0,r=e.length;n<r;++n)a.push(e[n]);while(a.length)}};let O9={field:"value",size:[1,1],round:!1,padding:0,sort:(t,e)=>e.value-t.value,as:["x","y"],ignoreParentValue:!0},O7="childNodeCount",wt="Invalid field: it must be a string!";var we=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let wn="sunburst",wr="markType",wi="path",wa="ancestor-node",wo={id:wn,encode:{x:"x",y:"y",key:wi,color:wa,value:"value"},axis:{x:!1,y:!1},style:{[wr]:wn,stroke:"#fff",lineWidth:.5,fillOpacity:"fillOpacity",[O7]:O7,depth:"depth"},state:{active:{zIndex:2,stroke:"#000"},inactive:{zIndex:1,stroke:"#fff"}},legend:!1,interaction:{drillDown:!0},coordinate:{type:"polar",innerRadius:.2}},wl=t=>{let{encode:e,data:n=[]}=t,r=we(t,["encode","data"]),i=Object.assign(Object.assign({},r.coordinate),{innerRadius:Math.max(cr(r,["coordinate","innerRadius"],.2),1e-5)}),a=Object.assign(Object.assign({},wo.encode),e),{value:o}=a;return[cy({},wo,Object.assign(Object.assign({type:"rect",data:function(t){let{data:e,encode:n}=t,{color:r,value:i}=n,a=function(t,e){let n,r=(e=O8({},O9,e)).as;if(!ns(r)||2!==r.length)throw TypeError('Invalid as: it must be an array with 2 strings (e.g. [ "x", "y" ])!');try{n=function(t){let{field:e,fields:n}=t;if(eV(e))return e;if(ns(e))return console.warn(wt),e[0];if(console.warn(`${wt} will try to get fields instead.`),eV(n))return n;if(ns(n)&&n.length)return n[0];throw TypeError(wt)}(e)}catch(t){console.warn(t)}let i=(function(){var t=1,e=1,n=0,r=!1;function i(i){var a,o=i.height+1;return i.x0=i.y0=n,i.x1=t,i.y1=e/o,i.eachBefore((a=e,function(t){t.children&&OQ(t,t.x0,a*(t.depth+1)/o,t.x1,a*(t.depth+2)/o);var e=t.x0,r=t.y0,i=t.x1-n,l=t.y1-n;i<e&&(e=i=(e+i)/2),l<r&&(r=l=(r+l)/2),t.x0=e,t.y0=r,t.x1=i,t.y1=l})),r&&i.eachBefore(OZ),i}return i.round=function(t){return arguments.length?(r=!!t,i):r},i.size=function(n){return arguments.length?(t=+n[0],e=+n[1],i):[t,e]},i.padding=function(t){return arguments.length?(n=+t,i):n},i})().size(e.size).round(e.round).padding(e.padding)(O0(t).sum(t=>ya(t.children)?e.ignoreParentValue?0:t[n]-dX(t.children,(t,e)=>t+e[n],0):t[n]).sort(e.sort)),a=r[0],o=r[1];i.each(t=>{var e,n;t[a]=[t.x0,t.x1,t.x1,t.x0],t[o]=[t.y1,t.y1,t.y0,t.y0],t.name=t.name||(null==(e=t.data)?void 0:e.name)||(null==(n=t.data)?void 0:n.label),t.data.name=t.name,["x0","x1","y0","y1"].forEach(e=>{-1===r.indexOf(e)&&delete t[e]})});let l=[];if(i&&i.each){let t,e;i.each(n=>{var r,i;n.parent!==t?(t=n.parent,e=0):e+=1;let a=gD(((null==(r=n.ancestors)?void 0:r.call(n))||[]).map(t=>l.find(e=>e.name===t.name)||t),({depth:t})=>t>0&&t<n.depth);n.nodeAncestor=a,n[O7]=(null==(i=n.children)?void 0:i.length)||0,n.nodeIndex=e,l.push(n)})}else i&&i.eachNode&&i.eachNode(t=>{l.push(t)});return l}(e,{field:i,type:"hierarchy.partition",as:["x","y"]}),o=[];return a.forEach(t=>{var e,n,a,l;if(0===t.depth)return null;let s=t.data.name,u=[s],c=Object.assign({},t);for(;c.depth>1;)s=`${null==(e=c.parent.data)?void 0:e.name} / ${s}`,u.unshift(null==(n=c.parent.data)?void 0:n.name),c=c.parent;let f=Object.assign(Object.assign(Object.assign({},OK(t.data,[i])),{[wi]:s,[wa]:c.data.name}),t);r&&r!==wa&&(f[r]=t.data[r]||(null==(l=null==(a=t.parent)?void 0:a.data)?void 0:l[r])),o.push(f)}),o.map(t=>{let e=t.x.slice(0,2),n=[t.y[2],t.y[0]];return e[0]===e[1]&&(n[0]=n[1]=(t.y[2]+t.y[0])/2),Object.assign(Object.assign({},t),{x:e,y:n,fillOpacity:Math.pow(.85,t.depth)})})}({encode:a,data:n}),encode:a,tooltip:{title:"path",items:[t=>({name:o,value:t[o]})]}},r),{coordinate:i}))]};wl.props={};var ws=Object.keys?function(t){return Object.keys(t)}:function(t){var e=[];return dU(t,function(n,r){nk(t)&&"prototype"===r||e.push(r)}),e};let wu={rootText:"root",style:{fill:"rgba(0, 0, 0, 0.85)",fontSize:12,y:1},active:{fill:"rgba(0, 0, 0, 0.5)"}},wc=()=>[["cartesian"]];wc.props={};let wf=()=>[["transpose"],["translate",.5,.5],["reflect.x"],["translate",-.5,-.5]];wf.props={transform:!0};let wh=t=>{let{startAngle:e,endAngle:n,innerRadius:r,outerRadius:i}=((t={})=>Object.assign(Object.assign({},{startAngle:-Math.PI/2,endAngle:3*Math.PI/2,innerRadius:0,outerRadius:1}),t))(t);return[...wf(),...fS({startAngle:e,endAngle:n,innerRadius:r,outerRadius:i})]};wh.props={};let wd=()=>[["parallel",0,1,0,1]];wd.props={};let wp=({focusX:t=0,focusY:e=0,distortionX:n=2,distortionY:r=2,visual:i=!1})=>[["fisheye",t,e,n,r,i]];wp.props={transform:!0};let wy=t=>{let{startAngle:e=-Math.PI/2,endAngle:n=3*Math.PI/2,innerRadius:r=0,outerRadius:i=1}=t;return[...wd(),...fS({startAngle:e,endAngle:n,innerRadius:r,outerRadius:i})]};wy.props={};let wg=({startAngle:t=0,endAngle:e=6*Math.PI,innerRadius:n=0,outerRadius:r=1})=>[["translate",.5,.5],["reflect.y"],["translate",-.5,-.5],["helix",t,e,n,r]];wg.props={};let wv=({value:t})=>e=>e.map(()=>t);wv.props={};let wm=({value:t})=>e=>e.map(e=>e[t]);wm.props={};let wb=({value:t})=>e=>e.map(t);wb.props={};let wx=({value:t})=>()=>t;function wO(t,e){if(null!==t)return{type:"column",value:t,field:e}}function ww(t,e){return Object.assign(Object.assign({},wO(t,e)),{inferred:!0})}function wk(t,e){if(null!==t)return{type:"column",value:t,field:e,visual:!0}}function w_(t,e){let n=[];for(let r of t)n[r]=e;return n}function wM(t,e){let n=t[e];if(!n)return[null,null];let{value:r,field:i=null}=n;return[r,i]}function wE(t,...e){for(let n of e)if("string"!=typeof n)return[n,null];else{let[e,r]=wM(t,n);if(null!==e)return[e,r]}return[null,null]}function wA(t){return!(t instanceof Date)&&"object"==typeof t}wx.props={};let wS=()=>(t,e)=>{let{encode:n}=e,{y1:r}=n;return void 0!==r?[t,e]:[t,cy({},e,{encode:{y1:ww(w_(t,0))}})]};wS.props={};let wj=()=>(t,e)=>{let{encode:n}=e,{x:r}=n;return void 0!==r?[t,e]:[t,cy({},e,{encode:{x:ww(w_(t,0))},scale:{x:{guide:null}}})]};wj.props={};let wP=(t,e)=>va(Object.assign({colorAttribute:"fill"},t),e);wP.props=Object.assign(Object.assign({},va.props),{defaultMarker:"square"});let wT=(t,e)=>va(Object.assign({colorAttribute:"stroke"},t),e);function wC(){}function wN(t){this._context=t}function wL(t){return new wN(t)}wT.props=Object.assign(Object.assign({},va.props),{defaultMarker:"hollowSquare"}),wN.prototype={areaStart:wC,areaEnd:wC,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t*=1,e*=1,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};var wI=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function wR(t,e,n){let[r,i,a,o]=t;return fD(n)?[r,[e?e[0][0]:i[0],i[1]],[e?e[3][0]:a[0],a[1]],o]:[r,[i[0],e?e[0][1]:i[1]],[a[0],e?e[3][1]:a[1]],o]}let wD=(t,e)=>{let{adjustPoints:n=wR}=t,r=wI(t,["adjustPoints"]),{coordinate:i,document:a}=e;return(t,e,o,l)=>{let{index:s}=e,{color:u}=o,c=wI(o,["color"]),f=n(t,l[s+1],i),[h,d,p,y]=fD(i)?yD(f):f,{color:g=u,opacity:v}=e,b=y2().curve(wL)([h,d,p,y]);return cX(a.createElement("path",{})).call(yL,c).style("d",b).style("fill",g).style("fillOpacity",v).call(yL,r).node()}};function wB(t,e,n){let[r,i,a,o]=t;return fD(n)?[r,[e?e[0][0]:(i[0]+a[0])/2,i[1]],[e?e[3][0]:(i[0]+a[0])/2,a[1]],o]:[r,[i[0],e?e[0][1]:(i[1]+a[1])/2],[a[0],e?e[3][1]:(i[1]+a[1])/2],o]}wD.props={defaultMarker:"square"};let wF=(t,e)=>wD(Object.assign({adjustPoints:wB},t),e);function wz(t){return Math.abs(t)>10?String(t):t.toString().padStart(2,"0")}wF.props={defaultMarker:"square"};let w$=(t={})=>{let{channel:e="x"}=t;return(t,n)=>{let{encode:r}=n,{tooltip:i}=n;if(cU(i))return[t,n];let{title:a}=i;if(void 0!==a)return[t,n];let o=Object.keys(r).filter(t=>t.startsWith(e)).filter(t=>!r[t].inferred).map(t=>wM(r,t)).filter(([t])=>t).map(t=>t[0]);if(0===o.length)return[t,n];let l=[];for(let e of t)l[e]={value:o.map(t=>t[e]instanceof Date?function(t){let e=t.getFullYear(),n=wz(t.getMonth()+1),r=wz(t.getDate()),i=`${e}-${n}-${r}`,a=t.getHours(),o=t.getMinutes(),l=t.getSeconds();return a||o||l?`${i} ${wz(a)}:${wz(o)}:${wz(l)}`:i}(t[e]):t[e]).join(", ")};return[t,cy({},n,{tooltip:{title:l}})]}};w$.props={};let wW=t=>{let{channel:e}=t;return(t,n)=>{let{encode:r,tooltip:i}=n;if(cU(i))return[t,n];let{items:a=[]}=i;return!a||a.length>0?[t,n]:[t,cy({},n,{tooltip:{items:(Array.isArray(e)?e:[e]).flatMap(t=>Object.keys(r).filter(e=>e.startsWith(t)).map(t=>{let{field:e,value:n,inferred:i=!1,aggregate:a}=r[t];return i?null:a&&n?{channel:t}:e?{field:e}:n?{channel:t}:null}).filter(t=>null!==t))}})]}};wW.props={};var wG=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let wq=()=>(t,e)=>{let{encode:n}=e,{key:r}=n,i=wG(n,["key"]);if(void 0!==r)return[t,e];let a=Object.values(i).map(({value:t})=>t),o=t.map(t=>a.filter(Array.isArray).map(e=>e[t]).join("-"));return[t,cy({},e,{encode:{key:wO(o)}})]};function wH(t={}){let{shapes:e}=t;return[{name:"color"},{name:"opacity"},{name:"shape",range:e},{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 wY(t={}){return[...wH(t),{name:"title",scale:"identity"}]}function wV(){return[{type:w$,channel:"color"},{type:wW,channel:["x","y"]}]}function wU(){return[{type:w$,channel:"x"},{type:wW,channel:["y"]}]}function wX(t={}){return wH(t)}function wK(){return[{type:wq}]}wq.props={};function wZ(t,e){return t.getBandWidth(t.invert(e))}function wQ(t,e,n={}){let{x:r,y:i,series:a}=e,{x:o,y:l,series:s}=t,{style:{bandOffset:u=.5*!s,bandOffsetX:c=u,bandOffsetY:f=u}={}}=n,h=!!(null==o?void 0:o.getBandWidth),d=!!(null==l?void 0:l.getBandWidth),p=!!(null==s?void 0:s.getBandWidth);return h||d?(t,e)=>{let n=h?wZ(o,r[e]):0,u=d?wZ(l,i[e]):0,y=p&&a?(wZ(s,a[e])/2+ +a[e])*n:0,[g,v]=t;return[g+c*n+y,v+f*u]}:t=>t}function wJ(t){return parseFloat(t)/100}function w0(t,e,n,r){let{x:i,y:a}=n,{innerWidth:o,innerHeight:l}=r.getOptions(),s=Array.from(t,t=>{let e=i[t],n=a[t];return[["string"==typeof e?wJ(e)*o:+e,"string"==typeof n?wJ(n)*l:+n]]});return[t,s]}function w1(t){return"function"==typeof t?t:e=>e[t]}function w2(t,e){return Array.from(t,w1(e))}function w5(t,e){let n=Array.isArray(t)?{links:t}:t&&"object"==typeof t?{links:t.links||[],nodes:t.nodes}:{links:[]},{source:r=t=>t.source,target:i=t=>t.target,value:a=t=>t.value}=e,{links:o,nodes:l}=n;if(!o.length)return{links:[],nodes:l||[]};let s=w2(o,r),u=w2(o,i),c=w2(o,a);return{links:o.map((t,e)=>({target:u[e],source:s[e],value:c[e]})),nodes:l||Array.from(new Set([...s,...u]),t=>({key:t}))}}function w3(t,e){return t.getBandWidth(t.invert(e))}let w4={rect:wP,hollow:wT,funnel:wD,pyramid:wF},w6=()=>(t,e,n,r)=>{let{x:i,y1:a,series:o,size:l}=n,{y:s}=n;s=s.map(t=>void 0!==t?t:1);let u=e.x,c=e.series,[f]=r.getSize(),h=l?l.map(t=>t/f):null,d=l?(t,e,n)=>{let r=t+e/2,i=h[n];return[r-i/2,r+i/2]}:(t,e,n)=>[t,t+e],p=Array.from(t,t=>{let e=w3(u,i[t]),n=c?w3(c,null==o?void 0:o[t]):1,l=(+(null==o?void 0:o[t])||0)*e,[f,h]=d(+i[t]+l,e*n,t),p=+s[t],y=+a[t];return[[f,p],[h,p],[h,y],[f,y]].map(t=>r.map(t))});return[t,p]};w6.props={defaultShape:"rect",defaultLabelShape:"label",composite:!1,shape:w4,channels:[...wY({shapes:Object.keys(w4)}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"},{name:"size"}],preInference:[...wK(),{type:wS},{type:wj}],postInference:[...wU()],interaction:{shareTooltip:!0}};let w8={rect:wP,hollow:wT},w9=()=>(t,e,n,r)=>{let{x:i,x1:a,y:o,y1:l}=n,s=Array.from(t,t=>[[+i[t],+o[t]],[+a[t],+o[t]],[+a[t],+l[t]],[+i[t],+l[t]]].map(t=>r.map(t)));return[t,s]};w9.props={defaultShape:"rect",defaultLabelShape:"label",composite:!1,shape:w8,channels:[...wY({shapes:Object.keys(w8)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...wK(),{type:wS}],postInference:[...wU()],interaction:{shareTooltip:!0}};var w7=ke(yY);function kt(t){this._curve=t}function ke(t){function e(e){return new kt(t(e))}return e._curve=t,e}function kn(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?e(ke(t)):e()._curve},t}kt.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),-(e*Math.cos(t)))}};var kr=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let ki=y5(t=>{let{d1:e,d2:n,style1:r,style2:i}=t.attributes,a=t.ownerDocument;cX(t).maybeAppend("line",()=>a.createElement("path",{})).style("d",e).call(yL,r),cX(t).maybeAppend("line1",()=>a.createElement("path",{})).style("d",n).call(yL,i)}),ka=(t,e)=>{let{curve:n,gradient:r=!1,gradientColor:i="between",defined:a=t=>!Number.isNaN(t)&&null!=t,connect:o=!1}=t,l=kr(t,["curve","gradient","gradientColor","defined","connect"]),{coordinate:s,document:u}=e;return(t,e,c)=>{let f,{color:h,lineWidth:d}=c,p=kr(c,["color","lineWidth"]),{color:y=h,size:g=d,seriesColor:v,seriesX:b,seriesY:x}=e,O=yz(s,e),w=fD(s),k=r&&v?yR(v,b,x,r,i,w):y,_=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},p),k&&{stroke:k}),g&&{lineWidth:g}),O&&{transform:O}),l);if(fB(s)){let t=s.getCenter();f=e=>kn(y2().curve(w7)).angle((n,r)=>yP(yA(e[r],t))).radius((n,r)=>yS(e[r],t)).defined(([t,e])=>a(t)&&a(e)).curve(n)(e)}else f=y2().x(t=>t[0]).y(t=>t[1]).defined(([t,e])=>a(t)&&a(e)).curve(n);let[M,E]=function(t,e){let n=[],r=[],i=!1,a=null;for(let o of t)e(o[0])&&e(o[1])?(n.push(o),i&&(i=!1,r.push([a,o])),a=o):i=!0;return[n,r]}(t,a),A=cG(_,"connect"),S=!!E.length;return S&&(!o||Object.keys(A).length)?S&&!o?cX(u.createElement("path",{})).style("d",f(t)).call(yL,_).node():cX(new ki).style("style1",Object.assign(Object.assign({},_),A)).style("style2",_).style("d1",E.map(f).join(",")).style("d2",f(t)).node():cX(u.createElement("path",{})).style("d",f(M)||[]).call(yL,_).node()}};ka.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let ko=(t,e)=>{let{coordinate:n}=e;return(...r)=>ka(Object.assign({curve:fB(n)?wL:yY},t),e)(...r)};function kl(t,e,n){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-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function ks(t,e){this._context=t,this._k=(1-e)/6}function ku(t,e){this._context=t,this._k=(1-e)/6}function kc(t,e,n){var r=t._x1,i=t._y1,a=t._x2,o=t._y2;if(t._l01_a>1e-12){var l=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,s=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*l-t._x0*t._l12_2a+t._x2*t._l01_2a)/s,i=(i*l-t._y0*t._l12_2a+t._y2*t._l01_2a)/s}if(t._l23_a>1e-12){var u=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,c=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*u+t._x1*t._l23_2a-e*t._l12_2a)/c,o=(o*u+t._y1*t._l23_2a-n*t._l12_2a)/c}t._context.bezierCurveTo(r,i,a,o,t._x2,t._y2)}function kf(t,e){this._context=t,this._alpha=e}function kh(t,e){this._context=t,this._alpha=e}ko.props=Object.assign(Object.assign({},ka.props),{defaultMarker:"line"}),ks.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:kl(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t*=1,e*=1,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:kl(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}},function t(e){function n(t){return new ks(t,e)}return n.tension=function(e){return t(+e)},n}(0),ku.prototype={areaStart:wC,areaEnd:wC,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)}},point:function(t,e){switch(t*=1,e*=1,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:kl(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}},function t(e){function n(t){return new ku(t,e)}return n.tension=function(e){return t(+e)},n}(0),kf.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)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t*=1,e*=1,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:kc(this,t,e)}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=e}},function t(e){function n(t){return e?new kf(t,e):new ks(t,0)}return n.alpha=function(e){return t(+e)},n}(.5),kh.prototype={areaStart:wC,areaEnd:wC,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)}},point:function(t,e){if(t*=1,e*=1,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:kc(this,t,e)}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=e}};let kd=function t(e){function n(t){return e?new kh(t,e):new ku(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function kp(t,e,n){var r=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(r||i<0&&-0),o=(n-t._y1)/(i||r<0&&-0);return((a<0?-1:1)+(o<0?-1:1))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs((a*i+o*r)/(r+i)))||0}function ky(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function kg(t,e,n){var r=t._x0,i=t._y0,a=t._x1,o=t._y1,l=(a-r)/3;t._context.bezierCurveTo(r+l,i+l*e,a-l,o-l*n,a,o)}function kv(t){this._context=t}function km(t){this._context=new kb(t)}function kb(t){this._context=t}function kx(t){return new kv(t)}function kO(t){return new km(t)}kv.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:kg(this,this._t0,ky(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(e*=1,(t*=1)!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,kg(this,ky(this,n=kp(this,t,e)),n);break;default:kg(this,this._t0,n=kp(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(km.prototype=Object.create(kv.prototype)).point=function(t,e){kv.prototype.point.call(this,e,t)},kb.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,a){this._context.bezierCurveTo(e,t,r,n,a,i)}};var kw=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let kk=(t,e)=>{let n=kw(t,[]),{coordinate:r}=e;return(...t)=>ka(Object.assign({curve:fB(r)?kd:fD(r)?kO:kx},n),e)(...t)};function k_(t,e){this._context=t,this._t=e}function kM(t){return new k_(t,.5)}function kE(t){return new k_(t,0)}function kA(t){return new k_(t,1)}kk.props=Object.assign(Object.assign({},ka.props),{defaultMarker:"smooth"}),k_.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&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t*=1,e*=1,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}};let kS=(t,e)=>ka(Object.assign({curve:kA},t),e);kS.props=Object.assign(Object.assign({},ka.props),{defaultMarker:"hv"});let kj=(t,e)=>ka(Object.assign({curve:kE},t),e);kj.props=Object.assign(Object.assign({},ka.props),{defaultMarker:"vh"});let kP=(t,e)=>ka(Object.assign({curve:kM},t),e);kP.props=Object.assign(Object.assign({},ka.props),{defaultMarker:"hvh"});var kT=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let kC=(t,e)=>{let{document:n}=e;return(e,r,i)=>{let{seriesSize:a,color:o}=r,{color:l}=i,s=kT(i,["color"]),u=yQ();for(let t=0;t<e.length-1;t++){let n=e[t],r=e[t+1],i=a[t],o=a[t+1];[...n,...r].every(cW)&&function(t,e,n,r,i){let a=yj(yA(n,e)),o=a+Math.PI/2,l=[r/2*Math.cos(o),r/2*Math.sin(o)],s=[i/2*Math.cos(o),i/2*Math.sin(o)],u=[i/2*Math.cos(a),i/2*Math.sin(a)],c=[r/2*Math.cos(a),r/2*Math.sin(a)],f=function([t,e],[n,r]){return[t+n,e+r]}(e,l),h=function([t,e],[n,r]){return[t+n,e+r]}(n,s),d=function([t,e],[n,r]){return[t+n,e+r]}(h,u),p=function([t,e],[n,r]){return[t+n,e+r]}(n,u),y=yA(p,s),g=yA(n,s),v=yA(e,l),b=yA(v,c),x=yA(e,c),O=yA(f,c);t.moveTo(...f),t.lineTo(...h),t.arcTo(...d,...p,i/2),t.arcTo(...y,...g,i/2),t.lineTo(...v),t.arcTo(...b,...x,r/2),t.arcTo(...O,...f,r/2),t.closePath()}(u,n,r,i,o)}return cX(n.createElement("path",{})).call(yL,s).style("fill",o||l).style("d",u.toString()).call(yL,t).node()}};kC.props=Object.assign(Object.assign({},ka.props),{defaultMarker:"line"});let kN=()=>(t,e)=>{let{style:n={},encode:r}=e,{series:i}=r,{gradient:a}=n;return!a||i?[t,e]:[t,cy({},e,{encode:{series:wk(w_(t,void 0))}})]};kN.props={};let kL=()=>(t,e)=>{let{encode:n}=e,{series:r,color:i}=n;if(void 0!==r||void 0===i)return[t,e];let[a,o]=wM(n,"color");return[t,cy({},e,{encode:{series:wO(a,o)}})]};kL.props={};let kI={line:ko,smooth:kk,hv:kS,vh:kj,hvh:kP,trail:kC},kR=()=>(t,e,n,r)=>(f$(r)?(t,e,n,r)=>{let i=Object.entries(n).filter(([t])=>t.startsWith("position")).map(([,t])=>t);if(0===i.length)throw Error("Missing encode for position channel.");fB(r)&&i.push(i[0]);let a=Array.from(t,t=>{let e=i.map(e=>+e[t]),n=r.map(e),a=[];for(let t=0;t<n.length;t+=2)a.push([n[t],n[t+1]]);return a});return[t,a]}:(t,e,n,r)=>{var i,a;let{series:o,x:l,y:s}=n,{x:u,y:c}=e;if(void 0===l||void 0===s)throw Error("Missing encode for x or y channel.");let f=o?Array.from(cs(t,t=>o[t]).values()):[t],h=f.map(t=>t[0]).filter(t=>void 0!==t),d=((null==(i=null==u?void 0:u.getBandWidth)?void 0:i.call(u))||0)/2,p=((null==(a=null==c?void 0:c.getBandWidth)?void 0:a.call(c))||0)/2;return[h,Array.from(f,t=>t.map(t=>r.map([+l[t]+d,+s[t]+p]))),f]})(t,e,n,r);kR.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,shape:kI,channels:[...wY({shapes:Object.keys(kI)}),{name:"x"},{name:"y"},{name:"position",independent:!0},{name:"size"},{name:"series",scale:"band"}],preInference:[...wK(),{type:kN},{type:kL}],postInference:[...wU(),{type:w$,channel:"color"},{type:wW,channel:["position"]}],interaction:{shareTooltip:!0,seriesTooltip:!0,crosshairs:!0}};var kD=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function kB(t,e,n,r){if(1===e.length)return;let{size:i}=n;if("fixed"===t)return i;if("normal"===t||fW(r)){let[[t,n],[r,i]]=e;return Math.max(0,(Math.abs((r-t)/2)+Math.abs((i-n)/2))/2)}return i}let kF=(t,e)=>{let{colorAttribute:n,symbol:r,mode:i="auto"}=t,a=kD(t,["colorAttribute","symbol","mode"]),o=s8.get(yW(r))||s8.get("point"),{coordinate:l,document:s}=e;return(e,r,u)=>{let{lineWidth:c,color:f}=u,h=a.stroke?c||1:c,{color:d=f,transform:p,opacity:y}=r,[g,v]=y$(e),b=kB(i,e,r,l)||a.r||u.r;return cX(s.createElement("path",{})).call(yL,u).style("fill","transparent").style("d",o(g,v,b)).style("lineWidth",h).style("transform",p).style("transformOrigin",`${g-b} ${v-b}`).style("stroke",d).style(yF(t),y).style(n,d).call(yL,a).node()}};kF.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let kz=(t,e)=>kF(Object.assign({colorAttribute:"stroke",symbol:"point"},t),e);kz.props=Object.assign({defaultMarker:"hollowPoint"},kF.props);let k$=(t,e)=>kF(Object.assign({colorAttribute:"stroke",symbol:"diamond"},t),e);k$.props=Object.assign({defaultMarker:"hollowDiamond"},kF.props);let kW=(t,e)=>kF(Object.assign({colorAttribute:"stroke",symbol:"hexagon"},t),e);kW.props=Object.assign({defaultMarker:"hollowHexagon"},kF.props);let kG=(t,e)=>kF(Object.assign({colorAttribute:"stroke",symbol:"square"},t),e);kG.props=Object.assign({defaultMarker:"hollowSquare"},kF.props);let kq=(t,e)=>kF(Object.assign({colorAttribute:"stroke",symbol:"triangle-down"},t),e);kq.props=Object.assign({defaultMarker:"hollowTriangleDown"},kF.props);let kH=(t,e)=>kF(Object.assign({colorAttribute:"stroke",symbol:"triangle"},t),e);kH.props=Object.assign({defaultMarker:"hollowTriangle"},kF.props);let kY=(t,e)=>kF(Object.assign({colorAttribute:"stroke",symbol:"bowtie"},t),e);kY.props=Object.assign({defaultMarker:"hollowBowtie"},kF.props);var kV=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let kU=(t,e)=>{let{colorAttribute:n,mode:r="auto"}=t,i=kV(t,["colorAttribute","mode"]),{coordinate:a,document:o}=e;return(e,l,s)=>{let{lineWidth:u,color:c}=s,f=i.stroke?u||1:u,{color:h=c,transform:d,opacity:p}=l,[y,g]=y$(e),v=kB(r,e,l,a)||i.r||s.r;return cX(o.createElement("circle",{})).call(yL,s).style("fill","transparent").style("cx",y).style("cy",g).style("r",v).style("lineWidth",f).style("transform",d).style("transformOrigin",`${y} ${g}`).style("stroke",h).style(yF(t),p).style(n,h).call(yL,i).node()}},kX=(t,e)=>kU(Object.assign({colorAttribute:"fill"},t),e);kX.props={defaultMarker:"circle",defaultEnterAnimation:"fadeIn",defaultExitAnimation:"fadeOut"};let kK=(t,e)=>kU(Object.assign({colorAttribute:"stroke"},t),e);kK.props=Object.assign({defaultMarker:"hollowPoint"},kX.props);let kZ=(t,e)=>kF(Object.assign({colorAttribute:"fill",symbol:"point"},t),e);kZ.props=Object.assign({defaultMarker:"point"},kF.props);let kQ=(t,e)=>kF(Object.assign({colorAttribute:"stroke",symbol:"plus"},t),e);kQ.props=Object.assign({defaultMarker:"plus"},kF.props);let kJ=(t,e)=>kF(Object.assign({colorAttribute:"fill",symbol:"diamond"},t),e);kJ.props=Object.assign({defaultMarker:"diamond"},kF.props);let k0=(t,e)=>kF(Object.assign({colorAttribute:"fill",symbol:"square"},t),e);k0.props=Object.assign({defaultMarker:"square"},kF.props);let k1=(t,e)=>kF(Object.assign({colorAttribute:"fill",symbol:"triangle"},t),e);k1.props=Object.assign({defaultMarker:"triangle"},kF.props);let k2=(t,e)=>kF(Object.assign({colorAttribute:"fill",symbol:"hexagon"},t),e);k2.props=Object.assign({defaultMarker:"hexagon"},kF.props);let k5=(t,e)=>kF(Object.assign({colorAttribute:"stroke",symbol:"cross"},t),e);k5.props=Object.assign({defaultMarker:"cross"},kF.props);let k3=(t,e)=>kF(Object.assign({colorAttribute:"fill",symbol:"bowtie"},t),e);k3.props=Object.assign({defaultMarker:"bowtie"},kF.props);let k4=(t,e)=>kF(Object.assign({colorAttribute:"stroke",symbol:"hyphen"},t),e);k4.props=Object.assign({defaultMarker:"hyphen"},kF.props);let k6=(t,e)=>kF(Object.assign({colorAttribute:"stroke",symbol:"line"},t),e);k6.props=Object.assign({defaultMarker:"line"},kF.props);let k8=(t,e)=>kF(Object.assign({colorAttribute:"stroke",symbol:"tick"},t),e);k8.props=Object.assign({defaultMarker:"tick"},kF.props);let k9=(t,e)=>kF(Object.assign({colorAttribute:"fill",symbol:"triangle-down"},t),e);k9.props=Object.assign({defaultMarker:"triangleDown"},kF.props);let k7=()=>(t,e)=>{let{encode:n}=e,{y:r}=n;return void 0!==r?[t,e]:[t,cy({},e,{encode:{y:ww(w_(t,0))},scale:{y:{guide:null}}})]};k7.props={};let _t=()=>(t,e)=>{let{encode:n}=e,{size:r}=n;return void 0!==r?[t,e]:[t,cy({},e,{encode:{size:wk(w_(t,3))}})]};_t.props={};let _e={hollow:kz,hollowDiamond:k$,hollowHexagon:kW,hollowSquare:kG,hollowTriangleDown:kq,hollowTriangle:kH,hollowBowtie:kY,hollowCircle:kK,point:kZ,plus:kQ,diamond:kJ,square:k0,triangle:k1,hexagon:k2,cross:k5,bowtie:k3,hyphen:k4,line:k6,tick:k8,triangleDown:k9,circle:kX},_n=t=>(e,n,r,i)=>{let{x:a,y:o,x1:l,y1:s,size:u,dx:c,dy:f}=r,[h,d]=i.getSize(),p=wQ(n,r,t),y=t=>{let e=+((null==c?void 0:c[t])||0),n=+((null==f?void 0:f[t])||0);return[(l?(+a[t]+ +l[t])/2:+a[t])+e,(s?(+o[t]+ +s[t])/2:+o[t])+n]},g=u?Array.from(e,t=>{let[e,n]=y(t),r=+u[t],a=r/h,o=r/d;return[i.map(p([e-a,n-o],t)),i.map(p([e+a,n+o],t))]}):Array.from(e,t=>[i.map(p(y(t),t))]);return[e,g]};_n.props={defaultShape:"hollow",defaultLabelShape:"label",composite:!1,shape:_e,channels:[...wY({shapes:Object.keys(_e)}),{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:[...wK(),{type:wj},{type:k7}],postInference:[{type:_t},...wV()]};let _r=(t,e)=>{let{coordinate:n}=e;return(e,r,i)=>{let{color:a,text:o="",fontSize:l,rotate:s=0,transform:u=""}=r,c={text:String(o),stroke:a,fill:a,fontSize:l},[[f,h]]=e;return cX(new y4).style("x",f).style("y",h).call(yL,i).style("transform",`${u}rotate(${+s})`).style("coordCenter",n.getCenter()).call(yL,c).call(yL,t).node()}};_r.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var _i=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let _a=y5(t=>{let e=t.attributes,{class:n,x:r,y:i,transform:a}=e,o=_i(e,["class","x","y","transform"]),l=cG(o,"marker"),{size:s=24}=l,u=()=>(function(t){let e=t/Math.sqrt(2),n=t*Math.sqrt(2),[r,i]=[-e,e-n],[a,o]=[0,0],[l,s]=[e,e-n];return[["M",r,i],["A",t,t,0,1,1,l,s],["L",a,o],["Z"]]})(s/2),[c,f]=function(t){let{min:e,max:n}=t.getLocalBounds();return[(e[0]+n[0])*.5,(e[1]+n[1])*.5]}(cX(t).maybeAppend("marker",()=>new pJ({})).call(t=>t.node().update(Object.assign({symbol:u},l))).node());cX(t).maybeAppend("text","text").style("x",c).style("y",f).call(yL,o)}),_o=(t,e)=>{let n=_i(t,[]);return(t,e,r)=>{let{color:i}=r,a=_i(r,["color"]),{color:o=i,text:l=""}=e,s={text:String(l),stroke:o,fill:o},[[u,c]]=t;return cX(new _a).call(yL,a).style("transform",`translate(${u},${c})`).call(yL,s).call(yL,n).node()}};_o.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let _l=(t,e)=>{let{coordinate:n}=e;return(e,r,i)=>{let{color:a,text:o="",fontSize:l,rotate:s=0,transform:u=""}=r,c={text:String(o),stroke:a,fill:a,fontSize:l,textAlign:"center",textBaseline:"middle"},[[f,h]]=e;return cX(new lN).style("x",f).style("y",h).call(yL,i).style("transformOrigin","center center").style("transform",`${u}rotate(${s}deg)`).style("coordCenter",n.getCenter()).call(yL,c).call(yL,t).node()}};_l.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let _s=()=>(t,e)=>{let{data:n}=e;if(!Array.isArray(n)||n.some(wA))return[t,e];let r=Array.isArray(n[0])?n:[n],i=r.map(t=>t[0]),a=r.map(t=>t[1]);return[t,cy({},e,{encode:{x:wO(i),y:wO(a)}})]};_s.props={};var _u=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let _c=()=>(t,e)=>{let{data:n,style:r={}}=e,i=_u(e,["data","style"]),{x:a,y:o}=r,l=_u(r,["x","y"]);return void 0==a||void 0==o?[t,e]:[[0],cy({},i,{data:[0],cartesian:!0,encode:{x:wO([a||0]),y:wO([o||0])},scale:{x:{type:"identity",independent:!0,guide:null},y:{type:"identity",independent:!0,guide:null}},style:l})]};_c.props={};let _f={text:_r,badge:_o,tag:_l},_h=t=>{let{cartesian:e=!1}=t;return e?w0:(e,n,r,i)=>{let{x:a,y:o}=r,l=wQ(n,r,t),s=Array.from(e,t=>{let e=[+a[t],+o[t]];return[i.map(l(e,t))]});return[e,s]}};_h.props={defaultShape:"text",defaultLabelShape:"label",composite:!1,shape:_f,channels:[...wY({shapes:Object.keys(_f)}),{name:"x",required:!0},{name:"y",required:!0},{name:"text",scale:"identity"},{name:"fontSize",scale:"identity"},{name:"rotate",scale:"identity"}],preInference:[...wK(),{type:_s},{type:_c}],postInference:[...wV()]};let _d=()=>(t,e)=>[t,cy({scale:{x:{padding:0},y:{padding:0}}},e)];_d.props={};let _p={cell:wP,hollow:wT},_y=()=>(t,e,n,r)=>{let{x:i,y:a}=n,o=e.x,l=e.y,s=Array.from(t,t=>{let e=o.getBandWidth(o.invert(+i[t])),n=l.getBandWidth(l.invert(+a[t])),s=+i[t],u=+a[t];return[[s,u],[s+e,u],[s+e,u+n],[s,u+n]].map(t=>r.map(t))});return[t,s]};function _g(t,e,n){var r=null,i=yq(!0),a=null,o=yY,l=null,s=yJ(u);function u(u){var c,f,h,d,p,y=(u=yG(u)).length,g=!1,v=Array(y),b=Array(y);for(null==a&&(l=o(p=s())),c=0;c<=y;++c){if(!(c<y&&i(d=u[c],c,u))===g)if(g=!g)f=c,l.areaStart(),l.lineStart();else{for(l.lineEnd(),l.lineStart(),h=c-1;h>=f;--h)l.point(v[h],b[h]);l.lineEnd(),l.areaEnd()}g&&(v[c]=+t(d,c,u),b[c]=+e(d,c,u),l.point(r?+r(d,c,u):v[c],n?+n(d,c,u):b[c]))}if(p)return l=null,p+""||null}function c(){return y2().defined(i).curve(o).context(a)}return t="function"==typeof t?t:void 0===t?y0:yq(+t),e="function"==typeof e?e:void 0===e?yq(0):yq(+e),n="function"==typeof n?n:void 0===n?y1:yq(+n),u.x=function(e){return arguments.length?(t="function"==typeof e?e:yq(+e),r=null,u):t},u.x0=function(e){return arguments.length?(t="function"==typeof e?e:yq(+e),u):t},u.x1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:yq(+t),u):r},u.y=function(t){return arguments.length?(e="function"==typeof t?t:yq(+t),n=null,u):e},u.y0=function(t){return arguments.length?(e="function"==typeof t?t:yq(+t),u):e},u.y1=function(t){return arguments.length?(n=null==t?null:"function"==typeof t?t:yq(+t),u):n},u.lineX0=u.lineY0=function(){return c().x(t).y(e)},u.lineY1=function(){return c().x(t).y(n)},u.lineX1=function(){return c().x(r).y(e)},u.defined=function(t){return arguments.length?(i="function"==typeof t?t:yq(!!t),u):i},u.curve=function(t){return arguments.length?(o=t,null!=a&&(l=o(a)),u):o},u.context=function(t){return arguments.length?(null==t?a=l=null:l=o(a=t),u):a},u}_y.props={defaultShape:"cell",defaultLabelShape:"label",shape:_p,composite:!1,channels:[...wY({shapes:Object.keys(_p)}),{name:"x",required:!0,scale:"band"},{name:"y",required:!0,scale:"band"}],preInference:[...wK(),{type:wj},{type:k7},{type:_d}],postInference:[...wV()]};var _v=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let _m=y5(t=>{let{areaPath:e,connectPath:n,areaStyle:r,connectStyle:i}=t.attributes,a=t.ownerDocument;cX(t).maybeAppend("connect-path",()=>a.createElement("path",{})).style("d",n).call(yL,i),cX(t).maybeAppend("area-path",()=>a.createElement("path",{})).style("d",e).call(yL,r)}),_b=(t,e)=>{let{curve:n,gradient:r=!1,defined:i=t=>!Number.isNaN(t)&&null!=t,connect:a=!1}=t,o=_v(t,["curve","gradient","defined","connect"]),{coordinate:l,document:s}=e;return(t,e,u)=>{let{color:c}=u,{color:f=c,seriesColor:h,seriesX:d,seriesY:p}=e,y=fD(l),g=yz(l,e),v=r&&h?yR(h,d,p,r,void 0,y):f,b=Object.assign(Object.assign(Object.assign(Object.assign({},u),{stroke:v,fill:v}),g&&{transform:g}),o),[x,O]=function(t,e){let n=[],r=[],i=[],a=!1,o=null,l=t.length/2;for(let s=0;s<l;s++){let u=t[s],c=t[s+l];if([...u,...c].some(t=>!e(t)))a=!0;else{if(n.push(u),r.push(c),a&&o){a=!1;let[t,e]=o;i.push([t,u,e,c])}o=[u,c]}}return[n.concat(r),i]}(t,i),w=cG(b,"connect"),k=!!O.length,_=t=>cX(s.createElement("path",{})).style("d",t||"").call(yL,b).node();if(fB(l)){let e=t=>{var e,r,a,o,s,u;let c=l.getCenter(),f=t.slice(0,t.length/2),h=t.slice(t.length/2);return(r=(e=_g().curve(w7)).curve,a=e.lineX0,o=e.lineX1,s=e.lineY0,u=e.lineY1,e.angle=e.x,delete e.x,e.startAngle=e.x0,delete e.x0,e.endAngle=e.x1,delete e.x1,e.radius=e.y,delete e.y,e.innerRadius=e.y0,delete e.y0,e.outerRadius=e.y1,delete e.y1,e.lineStartAngle=function(){return kn(a())},delete e.lineX0,e.lineEndAngle=function(){return kn(o())},delete e.lineX1,e.lineInnerRadius=function(){return kn(s())},delete e.lineY0,e.lineOuterRadius=function(){return kn(u())},delete e.lineY1,e.curve=function(t){return arguments.length?r(ke(t)):r()._curve},e).angle((t,e)=>yP(yA(f[e],c))).outerRadius((t,e)=>yS(f[e],c)).innerRadius((t,e)=>yS(h[e],c)).defined((t,e)=>[...f[e],...h[e]].every(i)).curve(n)(h)};return k&&(!a||Object.keys(w).length)?k&&!a?_(e(t)):cX(new _m).style("areaStyle",b).style("connectStyle",Object.assign(Object.assign({},w),o)).style("areaPath",e(t)).style("connectPath",O.map(e).join("")).node():_(e(x))}{let e=t=>{let e=t.slice(0,t.length/2),r=t.slice(t.length/2);return y?_g().y((t,n)=>e[n][1]).x1((t,n)=>e[n][0]).x0((t,e)=>r[e][0]).defined((t,n)=>[...e[n],...r[n]].every(i)).curve(n)(e):_g().x((t,n)=>e[n][0]).y1((t,n)=>e[n][1]).y0((t,e)=>r[e][1]).defined((t,n)=>[...e[n],...r[n]].every(i)).curve(n)(e)};return k&&(!a||Object.keys(w).length)?k&&!a?_(e(t)):cX(new _m).style("areaStyle",b).style("connectStyle",Object.assign(Object.assign({},w),o)).style("areaPath",e(t)).style("connectPath",O.map(e).join("")).node():_(e(x))}}};_b.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let _x=(t,e)=>{let{coordinate:n}=e;return(...r)=>_b(Object.assign({curve:fB(n)?wL:yY},t),e)(...r)};_x.props=Object.assign(Object.assign({},_b.props),{defaultMarker:"square"});var _O=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let _w=(t,e)=>{let n=_O(t,[]),{coordinate:r}=e;return(...t)=>_b(Object.assign({curve:fB(r)?kd:fD(r)?kO:kx},n),e)(...t)};_w.props=Object.assign(Object.assign({},_b.props),{defaultMarker:"smooth"});let _k=(t,e)=>(...n)=>_b(Object.assign({curve:kM},t),e)(...n);_k.props=Object.assign(Object.assign({},_b.props),{defaultMarker:"hvh"});let __=(t,e)=>(...n)=>_b(Object.assign({curve:kE},t),e)(...n);__.props=Object.assign(Object.assign({},_b.props),{defaultMarker:"vh"});let _M=(t,e)=>(...n)=>_b(Object.assign({curve:kA},t),e)(...n);_M.props=Object.assign(Object.assign({},_b.props),{defaultMarker:"hv"});let _E={area:_x,smooth:_w,hvh:_k,vh:__,hv:_M},_A=()=>(t,e,n,r)=>{var i,a;let{x:o,y:l,y1:s,series:u}=n,{x:c,y:f}=e,h=u?Array.from(cs(t,t=>u[t]).values()):[t],d=h.map(t=>t[0]).filter(t=>void 0!==t),p=((null==(i=null==c?void 0:c.getBandWidth)?void 0:i.call(c))||0)/2,y=((null==(a=null==f?void 0:f.getBandWidth)?void 0:a.call(f))||0)/2;return[d,Array.from(h,t=>{let e=t.length,n=Array(2*e);for(let i=0;i<t.length;i++){let a=t[i];n[i]=r.map([+o[a]+p,+l[a]+y]),n[e+i]=r.map([+o[a]+p,+s[a]+y])}return n}),h]};_A.props={defaultShape:"area",defaultLabelShape:"label",composite:!1,shape:_E,channels:[...wY({shapes:Object.keys(_E)}),{name:"x",required:!0},{name:"y",required:!0},{name:"size"},{name:"series",scale:"band"}],preInference:[...wK(),{type:kL},{type:wS},{type:_d}],postInference:[...wU()],interaction:{shareTooltip:!0,seriesTooltip:!0,crosshairs:!0}};let _S=()=>(t,e)=>{let{encode:n}=e,{y1:r}=n;if(r)return[t,e];let[i]=wM(n,"y");return[t,cy({},e,{encode:{y1:wO([...i])}})]};_S.props={};let _j=()=>(t,e)=>{let{encode:n}=e,{x1:r}=n;if(r)return[t,e];let[i]=wM(n,"x");return[t,cy({},e,{encode:{x1:wO([...i])}})]};_j.props={};var _P=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let _T=(t,e)=>{let{arrow:n=!0,arrowSize:r="40%"}=t,i=_P(t,["arrow","arrowSize"]),{document:a}=e;return(t,e,o)=>{let{defaultColor:l}=o,s=_P(o,["defaultColor"]),{color:u=l,transform:c}=e,[f,h]=t,d=yQ();if(d.moveTo(...f),d.lineTo(...h),n){let[t,e]=function(t,e,n){let{arrowSize:r}=n,i="string"==typeof r?parseFloat(r)/100*yS(t,e):r,a=Math.PI/6,o=Math.atan2(e[1]-t[1],e[0]-t[0]),l=Math.PI/2-o-a,s=[e[0]-i*Math.sin(l),e[1]-i*Math.cos(l)],u=o-a;return[s,[e[0]-i*Math.cos(u),e[1]-i*Math.sin(u)]]}(f,h,{arrowSize:r});d.moveTo(...t),d.lineTo(...h),d.lineTo(...e)}return cX(a.createElement("path",{})).call(yL,s).style("d",d.toString()).style("stroke",u).style("transform",c).call(yL,i).node()}};_T.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let _C=(t,e)=>{let{arrow:n=!1}=t;return(...r)=>_T(Object.assign(Object.assign({},t),{arrow:n}),e)(...r)};_C.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var _N=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let _L=(t,e)=>{let n=_N(t,[]),{coordinate:r,document:i}=e;return(t,e,a)=>{let{color:o}=a,l=_N(a,["color"]),{color:s=o,transform:u}=e,[c,f]=t,h=yQ();if(h.moveTo(c[0],c[1]),fB(r)){let t=r.getCenter();h.quadraticCurveTo(t[0],t[1],f[0],f[1])}else{let t=yN(c,f),e=yS(c,f)/2;yI(h,c,f,t,e)}return cX(i.createElement("path",{})).call(yL,l).style("d",h.toString()).style("stroke",s).style("transform",u).call(yL,n).node()}};_L.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var _I=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let _R=(t,e)=>{let n=_I(t,[]),{document:r}=e;return(t,e,i)=>{let{color:a}=i,o=_I(i,["color"]),{color:l=a,transform:s}=e,[u,c]=t,f=yQ();return f.moveTo(u[0],u[1]),f.bezierCurveTo(u[0]/2+c[0]/2,u[1],u[0]/2+c[0]/2,c[1],c[0],c[1]),cX(r.createElement("path",{})).call(yL,o).style("d",f.toString()).style("stroke",l).style("transform",s).call(yL,n).node()}};_R.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var _D=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let _B=(t,e)=>{let{cornerRatio:n=1/3}=t,r=_D(t,["cornerRatio"]),{coordinate:i,document:a}=e;return(t,e,o)=>{let{defaultColor:l}=o,s=_D(o,["defaultColor"]),{color:u=l,transform:c}=e,[f,h]=t,d=function(t,e,n,r){let i=yQ();if(fB(n)){let a=n.getCenter(),o=yS(t,a),l=yS(e,a);return i.moveTo(t[0],t[1]),yI(i,t,e,a,(l-o)*r+o),i.lineTo(e[0],e[1]),i}return fD(n)?(i.moveTo(t[0],t[1]),i.lineTo(t[0]+(e[0]-t[0])*r,t[1]),i.lineTo(t[0]+(e[0]-t[0])*r,e[1])):(i.moveTo(t[0],t[1]),i.lineTo(t[0],t[1]+(e[1]-t[1])*r),i.lineTo(e[0],t[1]+(e[1]-t[1])*r)),i.lineTo(e[0],e[1]),i}(f,h,i,n);return cX(a.createElement("path",{})).call(yL,s).style("d",d.toString()).style("stroke",u).style("transform",c).call(yL,r).node()}};_B.props={defaultMarker:"vhv",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let _F={link:_C,arc:_L,smooth:_R,vhv:_B},_z=t=>(e,n,r,i)=>{let{x:a,y:o,x1:l=a,y1:s=o}=r,u=wQ(n,r,t),c=e.map(t=>[i.map(u([+a[t],+o[t]],t)),i.map(u([+l[t],+s[t]],t))]);return[e,c]};_z.props={defaultShape:"link",defaultLabelShape:"label",composite:!1,shape:_F,channels:[...wY({shapes:Object.keys(_F)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...wK(),{type:_S},{type:_j}],postInference:[...wV()]};var _$=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let _W=(t,e)=>{let{coordinate:n,document:r}=e;return(e,i,a)=>{let{color:o}=a,l=_$(a,["color"]),{color:s=o,src:u="",size:c=32,transform:f=""}=i,{width:h=c,height:d=c}=t,[[p,y]]=e,[g,v]=n.getSize();h="string"==typeof h?wJ(h)*g:h,d="string"==typeof d?wJ(d)*v:d;let b=p-Number(h)/2,x=y-Number(d)/2;return cX(r.createElement("image",{})).call(yL,l).style("x",b).style("y",x).style("src",u).style("stroke",s).style("transform",f).call(yL,t).style("width",h).style("height",d).node()}};_W.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let _G={image:_W},_q=t=>{let{cartesian:e}=t;return e?w0:(e,n,r,i)=>{let{x:a,y:o}=r,l=wQ(n,r,t),s=Array.from(e,t=>{let e=[+a[t],+o[t]];return[i.map(l(e,t))]});return[e,s]}};_q.props={defaultShape:"image",defaultLabelShape:"label",composite:!1,shape:_G,channels:[...wY({shapes:Object.keys(_G)}),{name:"x",required:!0},{name:"y",required:!0},{name:"src",scale:"identity"},{name:"size"}],preInference:[...wK(),{type:_s},{type:_c}],postInference:[...wV()]};var _H=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let _Y=(t,e)=>{let{coordinate:n,document:r}=e;return(e,i,a)=>{let{color:o}=a,l=_H(a,["color"]),{color:s=o,transform:u}=i,c=function(t,e){let n=yQ();if(fB(e)){let r=e.getCenter(),i=[...t,t[0]],a=i.map(t=>yS(t,r));return i.forEach((e,i)=>{if(0===i)return void n.moveTo(e[0],e[1]);let o=a[i],l=t[i-1],s=a[i-1];void 0!==s&&1e-10>Math.abs(o-s)?yI(n,l,e,r,o):n.lineTo(e[0],e[1])}),n.closePath(),n}return t.forEach((t,e)=>0===e?n.moveTo(t[0],t[1]):n.lineTo(t[0],t[1])),n.closePath(),n}(e,n);return cX(r.createElement("path",{})).call(yL,l).style("d",c.toString()).style("stroke",s).style("fill",s).style("transform",u).call(yL,t).node()}};_Y.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var _V=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let _U=(t,e)=>{let n=_V(t,[]),{coordinate:r,document:i}=e;return(t,e,a)=>{let{color:o}=a,l=_V(a,["color"]),{color:s=o,transform:u}=e,c=function(t,e){let[n,r,i,a]=t,o=yQ();if(fB(e)){let t=e.getCenter(),l=yS(t,n);return o.moveTo(n[0],n[1]),o.quadraticCurveTo(t[0],t[1],i[0],i[1]),yI(o,i,a,t,l),o.quadraticCurveTo(t[0],t[1],r[0],r[1]),yI(o,r,n,t,l),o.closePath(),o}return o.moveTo(n[0],n[1]),o.bezierCurveTo(n[0]/2+i[0]/2,n[1],n[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(n[0],n[1]),o.closePath(),o}(t,r);return cX(i.createElement("path",{})).call(yL,l).style("d",c.toString()).style("fill",s||o).style("stroke",s||o).style("transform",u).call(yL,n).node()}};_U.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let _X={polygon:_Y,ribbon:_U},_K=()=>(t,e,n,r)=>{let i=Object.entries(n).filter(([t])=>t.startsWith("x")).map(([,t])=>t),a=Object.entries(n).filter(([t])=>t.startsWith("y")).map(([,t])=>t),o=t.map(t=>{let e=[];for(let n=0;n<i.length;n++){let o=i[n][t];if(void 0===o)break;let l=a[n][t];e.push(r.map([+o,+l]))}return e});return[t,o]};_K.props={defaultShape:"polygon",defaultLabelShape:"label",composite:!1,shape:_X,channels:[...wY({shapes:Object.keys(_X)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...wK()],postInference:[...wV()]};var _Z=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let _Q=(t,e)=>{let{coordinate:n,document:r}=e;return(e,i,a)=>{let{color:o,transform:l}=i,{color:s,fill:u=s,stroke:c=s}=a,f=_Z(a,["color","fill","stroke"]),h=function(t,e){let n=yQ();if(fB(e)){let r=e.getCenter(),[i,a]=r,o=yj(yA(t[0],r)),l=yj(yA(t[1],r)),s=yS(r,t[2]),u=yS(r,t[3]),c=yS(r,t[8]),f=yS(r,t[10]),h=yS(r,t[11]);n.moveTo(...t[0]),n.arc(i,a,s,o,l),n.arc(i,a,s,l,o,!0),n.moveTo(...t[2]),n.lineTo(...t[3]),n.moveTo(...t[4]),n.arc(i,a,u,o,l),n.lineTo(...t[6]),n.arc(i,a,f,l,o,!0),n.closePath(),n.moveTo(...t[8]),n.arc(i,a,c,o,l),n.arc(i,a,c,l,o,!0),n.moveTo(...t[10]),n.lineTo(...t[11]),n.moveTo(...t[12]),n.arc(i,a,h,o,l),n.arc(i,a,h,l,o,!0)}else n.moveTo(...t[0]),n.lineTo(...t[1]),n.moveTo(...t[2]),n.lineTo(...t[3]),n.moveTo(...t[4]),n.lineTo(...t[5]),n.lineTo(...t[6]),n.lineTo(...t[7]),n.closePath(),n.moveTo(...t[8]),n.lineTo(...t[9]),n.moveTo(...t[10]),n.lineTo(...t[11]),n.moveTo(...t[12]),n.lineTo(...t[13]);return n}(e,n);return cX(r.createElement("path",{})).call(yL,f).style("d",h.toString()).style("stroke",c).style("fill",o||u).style("transform",l).call(yL,t).node()}};_Q.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var _J=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let _0=(t,e)=>{let{coordinate:n,document:r}=e;return(e,i,a)=>{let{color:o,transform:l}=i,{color:s,fill:u=s,stroke:c=s}=a,f=_J(a,["color","fill","stroke"]),h=function(t,e,n=4){let r=yQ();if(!fB(e))return r.moveTo(...t[2]),r.lineTo(...t[3]),r.lineTo(t[3][0]-n,t[3][1]),r.lineTo(t[10][0]-n,t[10][1]),r.lineTo(t[10][0]+n,t[10][1]),r.lineTo(t[3][0]+n,t[3][1]),r.lineTo(...t[3]),r.closePath(),r.moveTo(...t[10]),r.lineTo(...t[11]),r.moveTo(t[3][0]+n/2,t[8][1]),r.arc(t[3][0],t[8][1],n/2,0,2*Math.PI),r.closePath(),r;let i=e.getCenter(),[a,o]=i,l=yS(i,t[3]),s=yS(i,t[8]),u=yS(i,t[10]),c=yj(yA(t[2],i)),f=Math.asin(n/s),h=c-f,d=c+f;r.moveTo(...t[2]),r.lineTo(...t[3]),r.moveTo(Math.cos(h)*l+a,Math.sin(h)*l+o),r.arc(a,o,l,h,d),r.lineTo(Math.cos(d)*u+a,Math.sin(d)*u+o),r.arc(a,o,u,d,h,!0),r.lineTo(Math.cos(h)*l+a,Math.sin(h)*l+o),r.closePath(),r.moveTo(...t[10]),r.lineTo(...t[11]);let p=(h+d)/2;return r.moveTo(Math.cos(p)*(s+n/2)+a,Math.sin(p)*(s+n/2)+o),r.arc(Math.cos(p)*s+a,Math.sin(p)*s+o,n/2,p,2*Math.PI+p),r.closePath(),r}(e,n,4);return cX(r.createElement("path",{})).call(yL,f).style("d",h.toString()).style("stroke",c).style("fill",o||u).style("transform",l).call(yL,t).node()}};_0.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let _1={box:_Q,violin:_0},_2=()=>(t,e,n,r)=>{let{x:i,y:a,y1:o,y2:l,y3:s,y4:u,series:c}=n,f=e.x,h=e.series,d=Array.from(t,t=>{let e=f.getBandWidth(f.invert(+i[t])),n=e*(h?h.getBandWidth(h.invert(+(null==c?void 0:c[t]))):1),d=(+(null==c?void 0:c[t])||0)*e,p=+i[t]+d+n/2,[y,g,v,b,x]=[+a[t],+o[t],+l[t],+s[t],+u[t]];return[[p-n/2,x],[p+n/2,x],[p,x],[p,b],[p-n/2,b],[p+n/2,b],[p+n/2,g],[p-n/2,g],[p-n/2,v],[p+n/2,v],[p,g],[p,y],[p-n/2,y],[p+n/2,y]].map(t=>r.map(t))});return[t,d]};_2.props={defaultShape:"box",defaultLabelShape:"label",composite:!1,shape:_1,channels:[...wY({shapes:Object.keys(_1)}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"}],preInference:[...wK(),{type:wj}],postInference:[...wU()],interaction:{shareTooltip:!0}};let _5={vector:_T},_3=()=>(t,e,n,r)=>{let{x:i,y:a,size:o,rotate:l}=n,[s,u]=r.getSize(),c=t.map(t=>{let e=l[t]/180*Math.PI,n=+o[t],c=n/s*Math.cos(e),f=-(n/u)*Math.sin(e);return[r.map([i[t]-c/2,a[t]-f/2]),r.map([+i[t]+c/2,+a[t]+f/2])]});return[t,c]};_3.props={defaultShape:"vector",defaultLabelShape:"label",composite:!1,shape:_5,channels:[...wY({shapes:Object.keys(_5)}),{name:"x",required:!0},{name:"y",required:!0},{name:"rotate",required:!0,scale:"identity"},{name:"size",required:!0}],preInference:[...wK()],postInference:[...wV()]};var _4=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let _6=(t,e)=>{let{arrow:n,arrowSize:r=4}=t,i=_4(t,["arrow","arrowSize"]),{coordinate:a,document:o}=e;return(t,e,l)=>{var s;let{color:u,lineWidth:c}=l,f=_4(l,["color","lineWidth"]),{color:h=u,size:d=c}=e,p=n?(s=Object.assign({fill:i.stroke||h,stroke:i.stroke||h},cG(i,"arrow")),o.createElement("path",{style:Object.assign({d:`M ${r},${r} L -${r},0 L ${r},-${r} L 0,0 Z`,transformOrigin:"center"},s)})):null,y=function(t,e){if(!fB(e))return y2().x(t=>t[0]).y(t=>t[1])(t);let n=e.getCenter();return vn()({startAngle:0,endAngle:2*Math.PI,outerRadius:yS(t[0],n),innerRadius:yS(t[1],n)})}(t,a),g=function(t,e){if(!fB(t))return e;let[n,r]=t.getCenter();return`translate(${n}, ${r}) ${e||""}`}(a,e.transform);return cX(o.createElement("path",{})).call(yL,f).style("d",y).style("stroke",h).style("lineWidth",d).style("transform",g).style("markerEnd",p).call(yL,i).node()}};_6.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let _8=()=>(t,e)=>{let{data:n}=e;return!Array.isArray(n)||n.some(wA)?[t,e]:[t,cy({},e,{encode:{x:wO(n)}})]};_8.props={};let _9={line:_6},_7=t=>(e,n,r,i)=>{let{x:a}=r,o=wQ(n,r,cy({style:{bandOffset:0}},t)),l=Array.from(e,t=>[[a[t],1],[a[t],0]].map(e=>i.map(o(e,t))));return[e,l]};_7.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,shape:_9,channels:[...wX({shapes:Object.keys(_9)}),{name:"x",required:!0}],preInference:[...wK(),{type:_8}],postInference:[]};let Mt=()=>(t,e)=>{let{data:n}=e;return!Array.isArray(n)||n.some(wA)?[t,e]:[t,cy({},e,{encode:{y:wO(n)}})]};Mt.props={};let Me={line:_6},Mn=t=>(e,n,r,i)=>{let{y:a}=r,o=wQ(n,r,cy({style:{bandOffset:0}},t)),l=Array.from(e,t=>[[0,a[t]],[1,a[t]]].map(e=>i.map(o(e,t))));return[e,l]};Mn.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,shape:Me,channels:[...wX({shapes:Object.keys(Me)}),{name:"y",required:!0}],preInference:[...wK(),{type:Mt}],postInference:[]};var Mr=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function Mi(t,e,n){return[["M",t,e],["L",t+2*n,e-n],["L",t+2*n,e+n],["Z"]]}let Ma=(t,e)=>{let{offsetX:n=0,sourceOffsetX:r=n,targetOffsetX:i=n,offsetY:a=0,sourceOffsetY:o=a,targetOffsetY:l=a,connectLength1:s,endMarker:u=!0}=t,c=Mr(t,["offsetX","sourceOffsetX","targetOffsetX","offsetY","sourceOffsetY","targetOffsetY","connectLength1","endMarker"]),{coordinate:f}=e;return(t,e,n)=>{let{color:a,connectLength1:h}=n,d=Mr(n,["color","connectLength1"]),{color:p,transform:y}=e,g=function(t,e,n,r,i,a,o=0){let[[l,s],[u,c]]=e;if(fD(t)){let t=l+n,e=t+o,f=s+i,h=c+a;return[[t,f],[e,f],[e,h],[u+r,h]]}let f=s-n,h=f-o,d=l-i,p=u-a;return[[d,f],[d,h],[p,h],[p,c-r]]}(f,t,o,l,r,i,null!=s?s:h),v=cG(Object.assign(Object.assign({},c),n),"endMarker");return cX(new lE).call(yL,d).style("d",y2().x(t=>t[0]).y(t=>t[1])(g)).style("stroke",p||a).style("transform",y).style("markerEnd",u?new pJ({className:"marker",style:Object.assign(Object.assign({},v),{symbol:Mi})}):null).call(yL,c).node()}};Ma.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let Mo={connector:Ma},Ml=(...t)=>_z(...t);function Ms(t,e,n,r){if(e)return()=>[0,1];let{[t]:i,[`${t}1`]:a}=n;return t=>{var e;let n=(null==(e=r.getBandWidth)?void 0:e.call(r,r.invert(+a[t])))||0;return[i[t],a[t]+n]}}function Mu(t={}){let{extendX:e=!1,extendY:n=!1}=t;return(t,r,i,a)=>{let o=Ms("x",e,i,r.x),l=Ms("y",n,i,r.y),s=Array.from(t,t=>{let[e,n]=o(t),[r,i]=l(t);return[[e,r],[n,r],[n,i],[e,i]].map(t=>a.map(t))});return[t,s]}}Ml.props={defaultShape:"connector",defaultLabelShape:"label",composite:!1,shape:Mo,channels:[...wX({shapes:Object.keys(Mo)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...wK()],postInference:[]};let Mc={range:wP},Mf=()=>Mu();Mf.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,shape:Mc,channels:[...wX({shapes:Object.keys(Mc)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...wK()],postInference:[]};let Mh=()=>(t,e)=>{let{data:n}=e;if(Array.isArray(n)&&(n.every(Array.isArray)||!n.some(wA))){let r=(t,e)=>Array.isArray(t[0])?t.map(t=>t[e]):[t[e]];return[t,cy({},e,{encode:{x:wO(r(n,0)),x1:wO(r(n,1))}})]}return[t,e]};Mh.props={};let Md={range:wP},Mp=()=>Mu({extendY:!0});Mp.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,shape:Md,channels:[...wX({shapes:Object.keys(Md)}),{name:"x",required:!0}],preInference:[...wK(),{type:Mh}],postInference:[]};let My=()=>(t,e)=>{let{data:n}=e;if(Array.isArray(n)&&(n.every(Array.isArray)||!n.some(wA))){let r=(t,e)=>Array.isArray(t[0])?t.map(t=>t[e]):[t[e]];return[t,cy({},e,{encode:{y:wO(r(n,0)),y1:wO(r(n,1))}})]}return[t,e]};My.props={};let Mg={range:wP},Mv=()=>Mu({extendX:!0});Mv.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,shape:Mg,channels:[...wX({shapes:Object.keys(Mg)}),{name:"y",required:!0}],preInference:[...wK(),{type:My}],postInference:[]};var Mm=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let Mb=(t,e)=>{let{arrow:n,colorAttribute:r}=t,i=Mm(t,["arrow","colorAttribute"]),{coordinate:a,document:o}=e;return(t,e,n)=>{let{color:l,stroke:s}=n,u=Mm(n,["color","stroke"]),{d:c,color:f=l}=e,[h,d]=a.getSize();return cX(o.createElement("path",{})).call(yL,u).style("d","function"==typeof c?c({width:h,height:d}):c).style(r,f).call(yL,i).node()}};Mb.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let Mx=(t,e)=>Mb(Object.assign({colorAttribute:"fill"},t),e);Mx.props={defaultMarker:"hvh",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let MO=(t,e)=>Mb(Object.assign({fill:"none",colorAttribute:"stroke"},t),e);MO.props={defaultMarker:"hvh",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let Mw={path:Mx,hollow:MO},Mk=t=>(t,e,n,r)=>[t,t.map(()=>[[0,0]])];Mk.props={defaultShape:"path",defaultLabelShape:"label",shape:Mw,composite:!1,channels:[...wY({shapes:Object.keys(Mw)}),{name:"d",scale:"identity"}],preInference:[...wK()],postInference:[]};var M_=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let MM=(t,e)=>{let{render:n}=t,r=M_(t,["render"]);return t=>{let[[i,a]]=t;return n(Object.assign(Object.assign({},r),{x:i,y:a}),e)}};MM.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let ME=()=>(t,e)=>{let{style:n={}}=e;return[t,cy({},e,{style:Object.assign(Object.assign({},n),Object.fromEntries(Object.entries(n).filter(([,t])=>"function"==typeof t).map(([t,e])=>[t,()=>e])))})]};ME.props={};let MA=t=>{let{cartesian:e}=t;return e?w0:(e,n,r,i)=>{let{x:a,y:o}=r,l=wQ(n,r,t),s=Array.from(e,t=>{let e=[+a[t],+o[t]];return[i.map(l(e,t))]});return[e,s]}};MA.props={defaultShape:"shape",defaultLabelShape:"label",composite:!1,shape:{shape:MM},channels:[{name:"x",required:!0},{name:"y",required:!0}],preInference:[...wK(),{type:_s},{type:_c},{type:ME}]};var MS=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let Mj=(t,e)=>{let{document:n}=e;return(e,r,i)=>{let{transform:a}=r,{color:o}=i,l=MS(i,["color"]),{color:s=o}=r,[u,...c]=e,f=yQ();return f.moveTo(...u),c.forEach(([t,e])=>{f.lineTo(t,e)}),f.closePath(),cX(n.createElement("path",{})).call(yL,l).style("d",f.toString()).style("stroke",s||o).style("fill",s||o).style("fillOpacity",.4).style("transform",a).call(yL,t).node()}};Mj.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let MP={density:Mj},MT=()=>(t,e,n,r)=>{let{x:i,series:a}=n,o=Object.entries(n).filter(([t])=>t.startsWith("y")).map(([,t])=>t),l=Object.entries(n).filter(([t])=>t.startsWith("size")).map(([,t])=>t);if(void 0===i||void 0===o||void 0===l)throw Error("Missing encode for x or y or size channel.");let s=e.x,u=e.series,c=Array.from(t,e=>{let n=s.getBandWidth(s.invert(+i[e])),c=u?u.getBandWidth(u.invert(+(null==a?void 0:a[e]))):1,f=(+(null==a?void 0:a[e])||0)*n,h=+i[e]+f+n*c/2;return[...o.map((n,r)=>[h+l[r][e]/t.length,+o[r][e]]),...o.map((n,r)=>[h-l[r][e]/t.length,+o[r][e]]).reverse()].map(t=>r.map(t))});return[t,c]};function MC(t,e,n){let r=t?t():document.createElement("canvas");return r.width=e,r.height=n,r}MT.props={defaultShape:"density",defaultLabelShape:"label",composite:!1,shape:MP,channels:[...wY({shapes:Object.keys(MP)}),{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:[...wK(),{type:wS},{type:wj}],postInference:[...wU()],interaction:{shareTooltip:!0}};let MN=fo((t,e,n)=>{let r=MC(n,2*t,2*t),i=r.getContext("2d");if(1===e)i.beginPath(),i.arc(t,t,t,0,2*Math.PI,!1),i.fillStyle="rgba(0,0,0,1)",i.fill();else{let n=i.createRadialGradient(t,t,t*e,t,t,t);n.addColorStop(0,"rgba(0,0,0,1)"),n.addColorStop(1,"rgba(0,0,0,0)"),i.fillStyle=n,i.fillRect(0,0,2*t,2*t)}return r},t=>`${t}`);var ML=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let MI=(t,e)=>{let{gradient:n,opacity:r,maxOpacity:i,minOpacity:a,blur:o,useGradientOpacity:l}=t,s=ML(t,["gradient","opacity","maxOpacity","minOpacity","blur","useGradientOpacity"]),{coordinate:u,createCanvas:c,document:f}=e;return(t,e,h)=>{var d,p,y,g;let v,b,x,O,w,k,_,{transform:M}=e,[E,A]=u.getSize(),S=t.map(t=>({x:t[0],y:t[1],value:t[2],radius:t[3]})),j=xO(t,t=>t[2]),P=fE(t,t=>t[2]),T=E&&A?(d={gradient:n,opacity:r,minOpacity:a,maxOpacity:i,blur:o,useGradientOpacity:l},p=t=>void 0===t,y=Object.keys(d).reduce((t,e)=>{let n=d[e];return p(n,e)||(t[e]=n),t},{}),v=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)"]]},y),v.minOpacity*=255,v.opacity*=255,v.maxOpacity*=255,b=MC(c,E,A).getContext("2d"),g=v.gradient,O=(x=MC(c,256,1).getContext("2d")).createLinearGradient(0,0,256,1),("string"==typeof g?g.split(" ").map(t=>{let[e,n]=t.split(":");return[+e,n]}):g).forEach(([t,e])=>{O.addColorStop(t,e)}),x.fillStyle=O,x.fillRect(0,0,256,1),w=x.getImageData(0,0,256,1).data,b.clearRect(0,0,E,A),!function(t,e,n,r,i,a){let{blur:o}=i,l=r.length;for(;l--;){let{x:i,y:s,value:u,radius:c}=r[l],f=Math.min(u,n),h=i-c,d=s-c,p=MN(c,1-o,a);t.globalAlpha=Math.max((f-e)/(n-e),.001),t.drawImage(p,h,d)}}(b,j,P,S,v,c),k=function(t,e,n,r,i){let{minOpacity:a,opacity:o,maxOpacity:l,useGradientOpacity:s}=i,u=t.getImageData(0,0,e,n),c=u.data,f=c.length;for(let t=3;t<f;t+=4){let e=c[t],n=4*e;if(!n)continue;let i=o||Math.max(0,Math.min(l,Math.max(a,e)));c[t-3]=r[n],c[t-2]=r[n+1],c[t-1]=r[n+2],c[t]=s?r[n+3]:i}return u}(b,E,A,w,v),(_=MC(c,E,A).getContext("2d")).putImageData(k,0,0),_):{canvas:null};return cX(f.createElement("image",{})).call(yL,h).style("x",0).style("y",0).style("width",E).style("height",A).style("src",T.canvas.toDataURL()).style("transform",M).call(yL,s).node()}};MI.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let MR={heatmap:MI},MD=t=>(t,e,n,r)=>{let{x:i,y:a,size:o,color:l}=n;return[[0],[Array.from(t,t=>{let e=o?+o[t]:40;return[...r.map([+i[t],+a[t]]),l[t],e]})]]};MD.props={defaultShape:"heatmap",defaultLabelShape:"label",composite:!1,shape:MR,channels:[...wY({shapes:Object.keys(MR)}),{name:"x",required:!0},{name:"y",required:!0},{name:"color",scale:"identity",required:!0},{name:"size"}],preInference:[...wK(),{type:wj},{type:k7}],postInference:[...wV()]};var MB=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let MF=(t,e)=>{var n,r,i,a;return n=void 0,r=void 0,i=void 0,a=function*(){let{width:n,height:r}=e,{data:i,encode:a={},scale:o,style:l={},layout:s={}}=t,u=MB(t,["data","encode","scale","style","layout"]);return cy({},{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})]}},Object.assign(Object.assign({data:{value:function(t,e){let{text:n="text",value:r="value"}=e;return t.map(t=>Object.assign(Object.assign({},t),{text:t[n],value:t[r]}))}(i,a),transform:[Object.assign({type:"wordCloud",size:[n,r]},s)]},encode:a,scale:o,style:l},u),{axis:!1}))},new(i||(i=Promise))(function(t,e){function o(t){try{s(a.next(t))}catch(t){e(t)}}function l(t){try{s(a.throw(t))}catch(t){e(t)}}function s(e){var n;e.done?t(e.value):((n=e.value)instanceof i?n:new i(function(t){t(n)})).then(o,l)}s((a=a.apply(n,r||[])).next())})};MF.props={};var Mz={value:()=>{}};function M$(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw Error("illegal type: "+t);r[t]=[]}return new MW(r)}function MW(t){this._=t}function MG(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=Mz,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}MW.prototype=M$.prototype={constructor:MW,on:function(t,e){var n,r=this._,i=(t+"").trim().split(/^|\s+/).map(function(t){var e="",n=t.indexOf(".");if(n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),t&&!r.hasOwnProperty(t))throw Error("unknown type: "+t);return{type:t,name:e}}),a=-1,o=i.length;if(arguments.length<2){for(;++a<o;)if((n=(t=i[a]).type)&&(n=function(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}(r[n],t.name)))return n;return}if(null!=e&&"function"!=typeof e)throw Error("invalid callback: "+e);for(;++a<o;)if(n=(t=i[a]).type)r[n]=MG(r[n],t.name,e);else if(null==e)for(n in r)r[n]=MG(r[n],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new MW(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=Array(n),a=0;a<n;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw Error("unknown type: "+t);for(r=this._[t],a=0,n=r.length;a<n;++a)r[a].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw Error("unknown type: "+t);for(var r=this._[t],i=0,a=r.length;i<a;++i)r[i].value.apply(e,n)}};var Mq,MH,MY,MV,MU,MX,MK,MZ,MQ,MJ,M0,M1,M2,M5,M3,M4,M6,M8,M9,M7,Et,Ee,En,Er,Ei,Ea,Eo,El,Es,Eu,Ec,Ef,Eh,Ed,Ep,Ey,Eg,Ev,Em,Eb,Ex,EO,Ew,Ek,E_,EM=0,EE=0,EA=0,ES=0,Ej=0,EP=0,ET="object"==typeof performance&&performance.now?performance:Date,EC="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function EN(){return Ej||(EC(EL),Ej=ET.now()+EP)}function EL(){Ej=0}function EI(){this._call=this._time=this._next=null}function ER(t,e,n){var r=new EI;return r.restart(t,e,n),r}function ED(){Ej=(ES=ET.now())+EP,EM=EE=0;try{EN(),++EM;for(var t,e=Ek;e;)(t=Ej-e._time)>=0&&e._call.call(void 0,t),e=e._next;--EM}finally{EM=0,function(){for(var t,e,n=Ek,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:Ek=e);E_=t,EF(r)}(),Ej=0}}function EB(){var t=ET.now(),e=t-ES;e>1e3&&(EP-=e,ES=t)}function EF(t){!EM&&(EE&&(EE=clearTimeout(EE)),t-Ej>24?(t<1/0&&(EE=setTimeout(ED,t-ET.now()-EP)),EA&&(EA=clearInterval(EA))):(EA||(ES=ET.now(),EA=setInterval(EB,1e3)),EM=1,EC(ED)))}function Ez(t){return t.x}function E$(t){return t.y}EI.prototype=ER.prototype={constructor:EI,restart:function(t,e,n){if("function"!=typeof t)throw TypeError("callback is not a function");n=(null==n?EN():+n)+(null==e?0:+e),this._next||E_===this||(E_?E_._next=this:Ek=this,E_=this),this._call=t,this._time=n,EF()},stop:function(){this._call&&(this._call=null,this._time=1/0,EF())}};var EW=Math.PI*(3-Math.sqrt(5));function EG(t){let e;var n,r=1,i=.001,a=1-Math.pow(.001,1/300),o=0,l=.6,s=new Map,u=ER(h),c=M$("tick","end"),f=(e=1,()=>(e=(1664525*e+0x3c6ef35f)%0x100000000)/0x100000000);function h(){d(),c.call("tick",n),r<i&&(u.stop(),c.call("end",n))}function d(e){var i,u,c=t.length;void 0===e&&(e=1);for(var f=0;f<e;++f)for(r+=(o-r)*a,s.forEach(function(t){t(r)}),i=0;i<c;++i)null==(u=t[i]).fx?u.x+=u.vx*=l:(u.x=u.fx,u.vx=0),null==u.fy?u.y+=u.vy*=l:(u.y=u.fy,u.vy=0);return n}function p(){for(var e,n=0,r=t.length;n<r;++n){if((e=t[n]).index=n,null!=e.fx&&(e.x=e.fx),null!=e.fy&&(e.y=e.fy),isNaN(e.x)||isNaN(e.y)){var i=10*Math.sqrt(.5+n),a=n*EW;e.x=i*Math.cos(a),e.y=i*Math.sin(a)}(isNaN(e.vx)||isNaN(e.vy))&&(e.vx=e.vy=0)}}function y(e){return e.initialize&&e.initialize(t,f),e}return null==t&&(t=[]),p(),n={tick:d,restart:function(){return u.restart(h),n},stop:function(){return u.stop(),n},nodes:function(e){return arguments.length?(t=e,p(),s.forEach(y),n):t},alpha:function(t){return arguments.length?(r=+t,n):r},alphaMin:function(t){return arguments.length?(i=+t,n):i},alphaDecay:function(t){return arguments.length?(a=+t,n):+a},alphaTarget:function(t){return arguments.length?(o=+t,n):o},velocityDecay:function(t){return arguments.length?(l=1-t,n):1-l},randomSource:function(t){return arguments.length?(f=t,s.forEach(y),n):f},force:function(t,e){return arguments.length>1?(null==e?s.delete(t):s.set(t,y(e)),n):s.get(t)},find:function(e,n,r){var i,a,o,l,s,u=0,c=t.length;for(null==r?r=1/0:r*=r,u=0;u<c;++u)(o=(i=e-(l=t[u]).x)*i+(a=n-l.y)*a)<r&&(s=l,r=o);return s},on:function(t,e){return arguments.length>1?(c.on(t,e),n):c.on(t)}}}function Eq(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,a,o,l,s,u,c,f,h,d=t._root,p={data:r},y=t._x0,g=t._y0,v=t._x1,b=t._y1;if(!d)return t._root=p,t;for(;d.length;)if((u=e>=(a=(y+v)/2))?y=a:v=a,(c=n>=(o=(g+b)/2))?g=o:b=o,i=d,!(d=d[f=c<<1|u]))return i[f]=p,t;if(l=+t._x.call(null,d.data),s=+t._y.call(null,d.data),e===l&&n===s)return p.next=d,i?i[f]=p:t._root=p,t;do i=i?i[f]=[,,,,]:t._root=[,,,,],(u=e>=(a=(y+v)/2))?y=a:v=a,(c=n>=(o=(g+b)/2))?g=o:b=o;while((f=c<<1|u)==(h=(s>=o)<<1|l>=a));return i[h]=d,i[f]=p,t}function EH(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function EY(t){return t[0]}function EV(t){return t[1]}function EU(t,e,n){var r=new EX(null==e?EY:e,null==n?EV:n,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function EX(t,e,n,r,i,a){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=a,this._root=void 0}function EK(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var EZ=EU.prototype=EX.prototype;function EQ(t){return function(){return t}}function EJ(t){return(t()-.5)*1e-6}function E0(t){return t.x+t.vx}function E1(t){return t.y+t.vy}function E2(t){var e,n,r,i=EQ(.1);function a(t){for(var i,a=0,o=e.length;a<o;++a)i=e[a],i.vx+=(r[a]-i.x)*n[a]*t}function o(){if(e){var a,o=e.length;for(a=0,n=Array(o),r=Array(o);a<o;++a)n[a]=isNaN(r[a]=+t(e[a],a,e))?0:+i(e[a],a,e)}}return"function"!=typeof t&&(t=EQ(null==t?0:+t)),a.initialize=function(t){e=t,o()},a.strength=function(t){return arguments.length?(i="function"==typeof t?t:EQ(+t),o(),a):i},a.x=function(e){return arguments.length?(t="function"==typeof e?e:EQ(+e),o(),a):t},a}function E5(t){var e,n,r,i=EQ(.1);function a(t){for(var i,a=0,o=e.length;a<o;++a)i=e[a],i.vy+=(r[a]-i.y)*n[a]*t}function o(){if(e){var a,o=e.length;for(a=0,n=Array(o),r=Array(o);a<o;++a)n[a]=isNaN(r[a]=+t(e[a],a,e))?0:+i(e[a],a,e)}}return"function"!=typeof t&&(t=EQ(null==t?0:+t)),a.initialize=function(t){e=t,o()},a.strength=function(t){return arguments.length?(i="function"==typeof t?t:EQ(+t),o(),a):i},a.y=function(e){return arguments.length?(t="function"==typeof e?e:EQ(+e),o(),a):t},a}EZ.copy=function(){var t,e,n=new EX(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=EK(r),n;for(t=[{source:r,target:n._root=[,,,,]}];r=t.pop();)for(var i=0;i<4;++i)(e=r.source[i])&&(e.length?t.push({source:e,target:r.target[i]=[,,,,]}):r.target[i]=EK(e));return n},EZ.add=function(t){let e=+this._x.call(null,t),n=+this._y.call(null,t);return Eq(this.cover(e,n),e,n,t)},EZ.addAll=function(t){var e,n,r,i,a=t.length,o=Array(a),l=Array(a),s=1/0,u=1/0,c=-1/0,f=-1/0;for(n=0;n<a;++n)!(isNaN(r=+this._x.call(null,e=t[n]))||isNaN(i=+this._y.call(null,e)))&&(o[n]=r,l[n]=i,r<s&&(s=r),r>c&&(c=r),i<u&&(u=i),i>f&&(f=i));if(s>c||u>f)return this;for(this.cover(s,u).cover(c,f),n=0;n<a;++n)Eq(this,o[n],l[n],t[n]);return this},EZ.cover=function(t,e){if(isNaN(t*=1)||isNaN(e*=1))return this;var n=this._x0,r=this._y0,i=this._x1,a=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,a=(r=Math.floor(e))+1;else{for(var o,l,s=i-n||1,u=this._root;n>t||t>=i||r>e||e>=a;)switch(l=(e<r)<<1|t<n,(o=[,,,,])[l]=u,u=o,s*=2,l){case 0:i=n+s,a=r+s;break;case 1:n=i-s,a=r+s;break;case 2:i=n+s,r=a-s;break;case 3:n=i-s,r=a-s}this._root&&this._root.length&&(this._root=u)}return this._x0=n,this._y0=r,this._x1=i,this._y1=a,this},EZ.data=function(){var t=[];return this.visit(function(e){if(!e.length)do t.push(e.data);while(e=e.next)}),t},EZ.extent=function(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]]},EZ.find=function(t,e,n){var r,i,a,o,l,s,u,c=this._x0,f=this._y0,h=this._x1,d=this._y1,p=[],y=this._root;for(y&&p.push(new EH(y,c,f,h,d)),null==n?n=1/0:(c=t-n,f=e-n,h=t+n,d=e+n,n*=n);s=p.pop();)if((y=s.node)&&!((i=s.x0)>h)&&!((a=s.y0)>d)&&!((o=s.x1)<c)&&!((l=s.y1)<f))if(y.length){var g=(i+o)/2,v=(a+l)/2;p.push(new EH(y[3],g,v,o,l),new EH(y[2],i,v,g,l),new EH(y[1],g,a,o,v),new EH(y[0],i,a,g,v)),(u=(e>=v)<<1|t>=g)&&(s=p[p.length-1],p[p.length-1]=p[p.length-1-u],p[p.length-1-u]=s)}else{var b=t-this._x.call(null,y.data),x=e-this._y.call(null,y.data),O=b*b+x*x;if(O<n){var w=Math.sqrt(n=O);c=t-w,f=e-w,h=t+w,d=e+w,r=y.data}}return r},EZ.remove=function(t){if(isNaN(a=+this._x.call(null,t))||isNaN(o=+this._y.call(null,t)))return this;var e,n,r,i,a,o,l,s,u,c,f,h,d=this._root,p=this._x0,y=this._y0,g=this._x1,v=this._y1;if(!d)return this;if(d.length)for(;;){if((u=a>=(l=(p+g)/2))?p=l:g=l,(c=o>=(s=(y+v)/2))?y=s:v=s,e=d,!(d=d[f=c<<1|u]))return this;if(!d.length)break;(e[f+1&3]||e[f+2&3]||e[f+3&3])&&(n=e,h=f)}for(;d.data!==t;)if(r=d,!(d=d.next))return this;return((i=d.next)&&delete d.next,r)?i?r.next=i:delete r.next:e?(i?e[f]=i:delete e[f],(d=e[0]||e[1]||e[2]||e[3])&&d===(e[3]||e[2]||e[1]||e[0])&&!d.length&&(n?n[h]=d:this._root=d)):this._root=i,this},EZ.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},EZ.root=function(){return this._root},EZ.size=function(){var t=0;return this.visit(function(e){if(!e.length)do++t;while(e=e.next)}),t},EZ.visit=function(t){var e,n,r,i,a,o,l=[],s=this._root;for(s&&l.push(new EH(s,this._x0,this._y0,this._x1,this._y1));e=l.pop();)if(!t(s=e.node,r=e.x0,i=e.y0,a=e.x1,o=e.y1)&&s.length){var u=(r+a)/2,c=(i+o)/2;(n=s[3])&&l.push(new EH(n,u,c,a,o)),(n=s[2])&&l.push(new EH(n,r,c,u,o)),(n=s[1])&&l.push(new EH(n,u,i,a,c)),(n=s[0])&&l.push(new EH(n,r,i,u,c))}return this},EZ.visitAfter=function(t){var e,n=[],r=[];for(this._root&&n.push(new EH(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var i=e.node;if(i.length){var a,o=e.x0,l=e.y0,s=e.x1,u=e.y1,c=(o+s)/2,f=(l+u)/2;(a=i[0])&&n.push(new EH(a,o,l,c,f)),(a=i[1])&&n.push(new EH(a,c,l,s,f)),(a=i[2])&&n.push(new EH(a,o,f,c,u)),(a=i[3])&&n.push(new EH(a,c,f,s,u))}r.push(e)}for(;e=r.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},EZ.x=function(t){return arguments.length?(this._x=t,this):this._x},EZ.y=function(t){return arguments.length?(this._y=t,this):this._y};let E3={hollow:kz,hollowDiamond:k$,hollowHexagon:kW,hollowSquare:kG,hollowTriangleDown:kq,hollowTriangle:kH,hollowBowtie:kY,hollowCircle:kK,point:kZ,plus:kQ,diamond:kJ,square:k0,triangle:k1,hexagon:k2,cross:k5,bowtie:k3,hyphen:k4,line:k6,tick:k8,triangleDown:k9,circle:kX},E4=t=>(e,n,r,i)=>{let{x:a,y:o,size:l}=r;if(!a.length||!o.length)return[e,o.map(()=>[[]])];let[s,u]=i.getSize(),c=wQ(n,r,t),f=Array.from(e,t=>{let e=a[t]*s,n=o[t]*u,r=+l[t]||4;return{i:t,x:e,y:n,r}}),h=EG(f).stop().force("collide",(function(t){var e,n,r,i=1,a=1;function o(){for(var t,o,s,u,c,f,h,d=e.length,p=0;p<a;++p)for(t=0,o=EU(e,E0,E1).visitAfter(l);t<d;++t)h=(f=n[(s=e[t]).index])*f,u=s.x+s.vx,c=s.y+s.vy,o.visit(y);function y(t,e,n,a,o){var l=t.data,d=t.r,p=f+d;if(l){if(l.index>s.index){var y=u-l.x-l.vx,g=c-l.y-l.vy,v=y*y+g*g;v<p*p&&(0===y&&(v+=(y=EJ(r))*y),0===g&&(v+=(g=EJ(r))*g),v=(p-(v=Math.sqrt(v)))/v*i,s.vx+=(y*=v)*(p=(d*=d)/(h+d)),s.vy+=(g*=v)*p,l.vx-=y*(p=1-p),l.vy-=g*p)}return}return e>u+p||a<u-p||n>c+p||o<c-p}}function l(t){if(t.data)return t.r=n[t.data.index];for(var e=t.r=0;e<4;++e)t[e]&&t[e].r>t.r&&(t.r=t[e].r)}function s(){if(e){var r,i,a=e.length;for(r=0,n=Array(a);r<a;++r)n[(i=e[r]).index]=+t(i,r,e)}}return"function"!=typeof t&&(t=EQ(null==t?1:+t)),o.initialize=function(t,n){e=t,r=n,s()},o.iterations=function(t){return arguments.length?(a=+t,o):a},o.strength=function(t){return arguments.length?(i=+t,o):i},o.radius=function(e){return arguments.length?(t="function"==typeof e?e:EQ(+e),s(),o):t},o})().radius(t=>t.r+1).strength(1));h.force("x",E2(t=>t.x).strength(.5)),h.force("y",E5(t=>t.y).strength(5));for(let t=0;t<200;t++)h.tick();h.stop();let d=t=>{let e=f.find(e=>e.i===t);return[e.x/s,e.y/u]},p=l?Array.from(e,t=>{let[e,n]=d(t),r=+l[t],a=r/s,o=r/u;return[i.map(c([e-a,n-o],t)),i.map(c([e+a,n+o],t))]}):Array.from(e,t=>[i.map(c(d(t),t))]);return[e,p]};E4.props={defaultShape:"point",defaultLabelShape:"label",composite:!1,shape:E3,channels:[...wY({shapes:Object.keys(E3)}),{name:"x",required:!0},{name:"y",required:!0},{name:"series",scale:"band"},{name:"size",quantitative:"sqrt"}],preInference:[...wK(),{type:wj},{type:k7}],postInference:[{type:_t},...wV()]};let E6=()=>["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#6F5EF9","#6DC8EC","#945FB9","#FF9845","#1E9493","#FF99C3"];E6.props={};let E8=()=>["#5B8FF9","#CDDDFD","#5AD8A6","#CDF3E4","#5D7092","#CED4DE","#F6BD16","#FCEBB9","#6F5EF9","#D3CEFD","#6DC8EC","#D3EEF9","#945FB9","#DECFEA","#FF9845","#FFE0C7","#1E9493","#BBDEDE","#FF99C3","#FFE0ED"];E8.props={};let E9=t=>new dV(t);E9.props={};let E7=t=>new cE(t);E7.props={};let At=t=>new cA(t);At.props={};class Ae extends cO{getDefaultOptions(){return{domain:[0,1],range:[0,1],tickCount:5,unknown:void 0,tickMethod:yc}}map(t){return dG(t)?t:this.options.unknown}invert(t){return this.map(t)}clone(){return new Ae(this.options)}getTicks(){let{domain:t,tickCount:e,tickMethod:n}=this.options,[r,i]=t;return eq(r)&&eq(i)?n(r,i,e):[]}}let An=t=>new Ae(t);An.props={};class Ar extends cA{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,padding:0,unknown:cw,paddingInner:1,paddingOuter:0}}constructor(t){super(t)}getPaddingInner(){return 1}clone(){return new Ar(this.options)}update(t){super.update(t)}getPaddingOuter(){return this.options.padding}}let Ai=t=>new Ar(t);Ai.props={};var Aa=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,Ao=/\[([^]*?)\]/gm;function Al(t,e){for(var n=[],r=0,i=t.length;r<i;r++)n.push(t[r].substr(0,e));return n}var As=function(t){return function(e,n){var r=n[t].map(function(t){return t.toLowerCase()}).indexOf(e.toLowerCase());return r>-1?r:null}};function Au(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r++){var i=e[r];for(var a in i)t[a]=i[a]}return t}var Ac=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Af=["January","February","March","April","May","June","July","August","September","October","November","December"],Ah=Al(Af,3),Ad=Au({},{dayNamesShort:Al(Ac,3),dayNames:Ac,monthNamesShort:Ah,monthNames:Af,amPm:["am","pm"],DoFn:function(t){return t+["th","st","nd","rd"][t%10>3?0:(t-t%10!=10)*t%10]}}),Ap=function(t,e){for(void 0===e&&(e=2),t=String(t);t.length<e;)t="0"+t;return t},Ay={D:function(t){return String(t.getDate())},DD:function(t){return Ap(t.getDate())},Do:function(t,e){return e.DoFn(t.getDate())},d:function(t){return String(t.getDay())},dd:function(t){return Ap(t.getDay())},ddd:function(t,e){return e.dayNamesShort[t.getDay()]},dddd:function(t,e){return e.dayNames[t.getDay()]},M:function(t){return String(t.getMonth()+1)},MM:function(t){return Ap(t.getMonth()+1)},MMM:function(t,e){return e.monthNamesShort[t.getMonth()]},MMMM:function(t,e){return e.monthNames[t.getMonth()]},YY:function(t){return Ap(String(t.getFullYear()),4).substr(2)},YYYY:function(t){return Ap(t.getFullYear(),4)},h:function(t){return String(t.getHours()%12||12)},hh:function(t){return Ap(t.getHours()%12||12)},H:function(t){return String(t.getHours())},HH:function(t){return Ap(t.getHours())},m:function(t){return String(t.getMinutes())},mm:function(t){return Ap(t.getMinutes())},s:function(t){return String(t.getSeconds())},ss:function(t){return Ap(t.getSeconds())},S:function(t){return String(Math.round(t.getMilliseconds()/100))},SS:function(t){return Ap(Math.round(t.getMilliseconds()/10),2)},SSS:function(t){return Ap(t.getMilliseconds(),3)},a:function(t,e){return 12>t.getHours()?e.amPm[0]:e.amPm[1]},A:function(t,e){return 12>t.getHours()?e.amPm[0].toUpperCase():e.amPm[1].toUpperCase()},ZZ:function(t){var e=t.getTimezoneOffset();return(e>0?"-":"+")+Ap(100*Math.floor(Math.abs(e)/60)+Math.abs(e)%60,4)},Z:function(t){var e=t.getTimezoneOffset();return(e>0?"-":"+")+Ap(Math.floor(Math.abs(e)/60),2)+":"+Ap(Math.abs(e)%60,2)}};As("monthNamesShort"),As("monthNames");var Ag={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"},Av=function(t,e,n){if(void 0===e&&(e=Ag.default),void 0===n&&(n={}),"number"==typeof t&&(t=new Date(t)),"[object Date]"!==Object.prototype.toString.call(t)||isNaN(t.getTime()))throw Error("Invalid Date pass to format");e=Ag[e]||e;var r=[];e=e.replace(Ao,function(t,e){return r.push(e),"@@@"});var i=Au(Au({},Ad),n);return(e=e.replace(Aa,function(e){return Ay[e](t,i)})).replace(/@@@/g,function(){return r.shift()})};function Am(t,e,n,r){let i=(t,i)=>{i&&((t,e)=>{let i=t=>r(t)%e==0,a=e;for(;a&&!i(t);)n(t,-1),a-=1})(t,i),e(t)},a=(t,e)=>{let r=new Date(t-1);return i(r,e),n(r,e),i(r),r};return{ceil:a,floor:(t,e)=>{let n=new Date(+t);return i(n,e),n},range:(t,e,r,o)=>{let l=[],s=Math.floor(r),u=o?a(t,r):a(t);for(;u<e;n(u,s),i(u))l.push(new Date(+u));return l},duration:t}}let Ab=Am(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),Ax=Am(1e3,t=>{t.setMilliseconds(0)},(t,e=1)=>{t.setTime(+t+1e3*e)},t=>t.getSeconds()),AO=Am(6e4,t=>{t.setSeconds(0,0)},(t,e=1)=>{t.setTime(+t+6e4*e)},t=>t.getMinutes()),Aw=Am(36e5,t=>{t.setMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+36e5*e)},t=>t.getHours()),Ak=Am(864e5,t=>{t.setHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+864e5*e)},t=>t.getDate()-1),A_=Am(2592e6,t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e=1)=>{let n=t.getMonth();t.setMonth(n+e)},t=>t.getMonth()),AM={millisecond:Ab,second:Ax,minute:AO,hour:Aw,day:Ak,week:Am(6048e5,t=>{t.setDate(t.getDate()-t.getDay()%7),t.setHours(0,0,0,0)},(t,e=1)=>{t.setDate(t.getDate()+7*e)},t=>{let e=A_.floor(t);return Math.floor((new Date(+t)-e)/6048e5)}),month:A_,year:Am(31536e6,t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e=1)=>{let n=t.getFullYear();t.setFullYear(n+e)},t=>t.getFullYear())},AE=Am(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),AA=Am(1e3,t=>{t.setUTCMilliseconds(0)},(t,e=1)=>{t.setTime(+t+1e3*e)},t=>t.getUTCSeconds()),AS=Am(6e4,t=>{t.setUTCSeconds(0,0)},(t,e=1)=>{t.setTime(+t+6e4*e)},t=>t.getUTCMinutes()),Aj=Am(36e5,t=>{t.setUTCMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+36e5*e)},t=>t.getUTCHours()),AP=Am(864e5,t=>{t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+864e5*e)},t=>t.getUTCDate()-1),AT=Am(2592e6,t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e=1)=>{let n=t.getUTCMonth();t.setUTCMonth(n+e)},t=>t.getUTCMonth()),AC={millisecond:AE,second:AA,minute:AS,hour:Aj,day:AP,week:Am(6048e5,t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7)%7),t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+6048e5*e)},t=>{let e=AT.floor(t);return Math.floor((new Date(+t)-e)/6048e5)}),month:AT,year:Am(31536e6,t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e=1)=>{let n=t.getUTCFullYear();t.setUTCFullYear(n+e)},t=>t.getUTCFullYear())};function AN(t,e,n,r,i){let a,o=+t,l=+e,{tickIntervals:s,year:u,millisecond:c}=function(t){let{year:e,month:n,week:r,day:i,hour:a,minute:o,second:l,millisecond:s}=t?AC:AM;return{tickIntervals:[[l,1],[l,5],[l,15],[l,30],[o,1],[o,5],[o,15],[o,30],[a,1],[a,3],[a,6],[a,12],[i,1],[i,2],[r,1],[n,1],[n,3],[e,1]],year:e,millisecond:s}}(i),f=([t,e])=>t.duration*e,h=r?(l-o)/r:n||5,d=r||(l-o)/h,p=s.length,y=dI(s,d,0,p,f);if(y===p){let t=cC(o/u.duration,l/u.duration,h);a=[u,t]}else if(y){let[t,e]=d/f(s[y-1])<f(s[y])/d?s[y-1]:s[y],n=r?Math.ceil(r/t.duration):e;a=[t,n]}else a=[c,Math.max(cC(o,l,h),1)];return a}let AL=(t,e,n,r,i)=>{let a=t>e,o=a?e:t,l=a?t:e,[s,u]=AN(o,l,n,r,i),c=s.range(o,new Date(+l+1),u,!0);return a?c.reverse():c},AI=(t,e,n,r,i)=>{let a=t>e,o=a?e:t,l=a?t:e,[s,u]=AN(o,l,n,r,i),c=[s.floor(o,u),s.ceil(l,u)];return a?c.reverse():c};function AR(t){let e=t.getTimezoneOffset(),n=new Date(t);return n.setMinutes(n.getMinutes()+e,n.getSeconds(),n.getMilliseconds()),n}class AD extends dY{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:AL,interpolate:dz,mask:void 0,utc:!1}}chooseTransforms(){return[t=>+t,t=>new Date(t)]}chooseNice(){return AI}getTickMethodOptions(){let{domain:t,tickCount:e,tickInterval:n,utc:r}=this.options;return[t[0],t[t.length-1],e,n,r]}getFormatter(){let{mask:t,utc:e}=this.options,n=e?AC:AM,r=e?AR:dC;return e=>Av(r(e),t||function(t,e){let{second:n,minute:r,hour:i,day:a,week:o,month:l,year:s}=e;return n.floor(t)<t?".SSS":r.floor(t)<t?":ss":i.floor(t)<t?"hh:mm":a.floor(t)<t?"hh A":l.floor(t)<t?o.floor(t)<t?"MMM DD":"ddd DD":s.floor(t)<t?"MMMM":"YYYY"}(e,n))}clone(){return new AD(this.options)}}let AB=t=>new AD(t);AB.props={};let AF=t=>e=>-t(-e),Az=(t,e)=>{let n=Math.log(t),r=t===Math.E?Math.log:10===t?Math.log10:2===t?Math.log2:t=>Math.log(t)/n;return e?AF(r):r},A$=(t,e)=>{let n=t===Math.E?Math.exp:e=>t**e;return e?AF(n):n},AW=(t,e,n,r=10)=>{let i=t<0,a=A$(r,i),o=Az(r,i),l=e<t,s=l?e:t,u=l?t:e,c=o(s),f=o(u),h=[];if(!(r%1)&&f-c<n){if(c=Math.floor(c),f=Math.ceil(f),i)for(;c<=f;c+=1){let t=a(c);for(let e=r-1;e>=1;e-=1){let n=t*e;if(n>u)break;n>=s&&h.push(n)}}else for(;c<=f;c+=1){let t=a(c);for(let e=1;e<r;e+=1){let n=t*e;if(n>u)break;n>=s&&h.push(n)}}2*h.length<n&&(h=cN(s,u,n))}else{let t=-1===n?f-c:Math.min(f-c,n);h=cN(c,f,t).map(a)}return l?h.reverse():h},AG=(t,e,n,r)=>{let i=t<0,a=Az(r,i),o=A$(r,i),l=t>e,s=[o(Math.floor(a(l?e:t))),o(Math.ceil(a(l?t:e)))];return l?s.reverse():s};class Aq extends dY{getDefaultOptions(){return{domain:[1,10],range:[0,1],base:10,interpolate:d$,tickMethod:AW,tickCount:5}}chooseNice(){return AG}getTickMethodOptions(){let{domain:t,tickCount:e,base:n}=this.options;return[t[0],t[t.length-1],e,n]}chooseTransforms(){let{base:t,domain:e}=this.options,n=e[0]<0;return[Az(t,n),A$(t,n)]}clone(){return new Aq(this.options)}}let AH=t=>new Aq(t);AH.props={};let AY=t=>t<0?-Math.sqrt(-t):Math.sqrt(t);class AV extends dY{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,exponent:2,interpolate:d$,tickMethod:cN,tickCount:5}}constructor(t){super(t)}chooseTransforms(){let{exponent:t}=this.options;return 1===t?[dC,dC]:[.5===t?AY:e=>e<0?-((-e)**t):e**t,e=>e<0?-((-e)**(1/t)):e**(1/t)]}clone(){return new AV(this.options)}}let AU=t=>new AV(t);AU.props={};class AX extends AV{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:d$,tickMethod:cN,tickCount:5,exponent:.5}}constructor(t){super(t)}update(t){super.update(t)}clone(){return new AX(this.options)}}let AK=t=>new AX(t);AK.props={};let AZ=t=>new yi(t);AZ.props={};let AQ=t=>new yh(t);AQ.props={};let AJ=t=>new yf(t);AJ.props={};let A0=NU=class extends dV{getDefaultOptions(){return{domain:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:dC,tickMethod:cN,tickCount:5}}constructor(t){super(t)}clone(){return new NU(this.options)}};A0=NU=function(t,e,n,r){var i,a=arguments.length,o=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,r);else for(var l=t.length-1;l>=0;l--)(i=t[l])&&(o=(a<3?i(o):a>3?i(e,n,o):i(e,n))||o);return a>3&&o&&Object.defineProperty(e,n,o),o}([(NH=function(t){return[t(0),t(1)]},NY=t=>{let[e,n]=t;return dL(dz(0,1),dN(e,n))},t=>{t.prototype.rescale=function(){this.initRange(),this.nice();let[t]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t))},t.prototype.initRange=function(){let{interpolator:t}=this.options;this.options.range=NH(t)},t.prototype.composeOutput=function(t,e){let{domain:n,interpolator:r,round:i}=this.getOptions(),a=NY(n.map(t)),o=i?t=>{let e=r(t);return eq(e)?Math.round(e):e}:r;this.output=dL(o,a,e,t)},t.prototype.invert=void 0})],A0);let A1=t=>new A0(t);A1.props={};let A2=t=>new cL(t);function A5({colorDefault:t,colorBlack:e,colorWhite:n,colorStroke:r,colorBackground:i,padding1:a,padding2:o,padding3:l,alpha90:s,alpha65:u,alpha45:c,alpha25:f,alpha10:h,category10:d,category20:p,sizeDefault:y=1,padding:g="auto",margin:v=16}){return{padding:g,margin:v,size:y,color:t,category10:d,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:e,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:e,gridStrokeOpacity:h,labelAlign:"horizontal",labelFill:e,labelOpacity:c,labelFontSize:12,labelFontWeight:"normal",labelSpacing:a,line:!1,lineLineWidth:.5,lineStroke:e,lineStrokeOpacity:c,tickLength:4,tickLineWidth:1,tickStroke:e,tickOpacity:c,titleFill:e,titleOpacity:s,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:e,itemLabelFillOpacity:s,itemLabelFontSize:12,itemLabelFontWeight:"normal",itemMarkerFillOpacity:1,itemMarkerSize:8,focusMarkerSize:12,itemSpacing:[a,a,a/2],itemValueFill:e,itemValueFillOpacity:.65,itemValueFontSize:12,itemValueFontWeight:"normal",navButtonFill:e,navButtonFillOpacity:.65,navPageNumFill:e,navPageNumFillOpacity:.45,navPageNumFontSize:12,padding:8,title:!1,titleFill:e,titleFillOpacity:.65,titleFontSize:12,titleFontWeight:"normal",titleSpacing:4,tickStroke:e,tickStrokeOpacity:.25,rowPadding:a,colPadding:o,maxRows:3,maxCols:3},legendContinuous:{handleHeight:12,handleLabelFill:e,handleLabelFillOpacity:c,handleLabelFontSize:12,handleLabelFontWeight:"normal",handleMarkerFill:e,handleMarkerFillOpacity:.6,handleMarkerLineWidth:1,handleMarkerStroke:e,handleMarkerStrokeOpacity:.25,handleWidth:10,labelFill:e,labelFillOpacity:c,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:s,tickStroke:e,tickStrokeOpacity:c},label:{fill:e,fillOpacity:.65,fontSize:12,fontWeight:"normal",stroke:void 0,offset:12,connectorStroke:e,connectorStrokeOpacity:.45,connectorLineWidth:1,connectorLength:12,connectorLength2:8,connectorDistance:4},innerLabel:{fill:n,fontSize:12,fillOpacity:.85,fontWeight:"normal",stroke:void 0,offset:0},htmlLabel:{fontSize:12,opacity:.65,color:e,fontWeight:"normal"},slider:{trackSize:16,trackFill:r,trackFillOpacity:1,selectionFill:t,selectionFillOpacity:.15,handleIconSize:10,handleIconFill:"#f7f7f7",handleIconFillOpacity:1,handleIconStroke:e,handleIconStrokeOpacity:.25,handleIconLineWidth:1,handleIconRadius:2,handleLabelFill:e,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:e,titleFillOpacity:s,titleFontSize:16,titleFontWeight:"bold",titleTextBaseline:"top",subtitleFill:e,subtitleFillOpacity:u,subtitleFontSize:12,subtitleFontWeight:"normal",subtitleTextBaseline:"top"},tooltip:{css:{[fN("tooltip")]:{"font-family":"sans-serif"}}}}}A2.props={};let A3=A5({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}),A4=t=>cy({},A3,t);A4.props={};let A6=t=>cy({},A4(),{category10:"category10",category20:"category20"},t);A6.props={};let A8=A5({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}),A9=t=>cy({},A8,{tooltip:{crosshairsStroke:"#fff",crosshairsLineWidth:1,crosshairsStrokeOpacity:.25,css:{[fN("tooltip")]:{background:"#1f1f1f",opacity:.95},[fN("tooltip-title")]:{color:"#A6A6A6"},[fN("tooltip-list-item-name-label")]:{color:"#A6A6A6"},[fN("tooltip-list-item-value")]:{color:"#A6A6A6"}}}},t),A7=t=>Object.assign({},A9(),{category10:"category10",category20:"category20"},t);A7.props={};let St=A5({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}),Se=t=>cy({},St,{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:(t,e)=>0!==e},axisRight:{gridFilter:(t,e)=>0!==e},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);Se.props={};let Sn=t=>(...e)=>{let n=ps(Object.assign({},{crossPadding:50},t))(...e);return pi(n,t),n};Sn.props=Object.assign(Object.assign({},ps.props),{defaultPosition:"bottom"});let Sr=t=>(...e)=>{let n=ps(Object.assign({},{crossPadding:10},t))(...e);return pi(n,t),n};Sr.props=Object.assign(Object.assign({},ps.props),{defaultPosition:"left"});let Si=function(){};var Sa=he({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"),So=function(t){function e(e){var n=t.call(this,e,{x:0,y:0,animate:{easing:"linear",duration:200,fill:"both"},buttonCursor:"pointer",buttonFill:"black",buttonD:[["M",-6,-6],["L",6,0],["L",-6,6],["Z"]],buttonSize:12,controllerPadding:5,controllerSpacing:5,formatter:function(t,e){return"".concat(t,"/").concat(e)},defaultPage:0,loop:!1,orientation:"horizontal",pageNumFill:"black",pageNumFontSize:12,pageNumTextAlign:"start",pageNumTextBaseline:"middle"})||this;return n.playState="idle",n.contentGroup=n.appendChild(new lb({class:Sa.contentGroup.name})),n.playWindow=n.contentGroup.appendChild(new lb({class:Sa.playWindow.name})),n.innerCurrPage=n.defaultPage,n}return eK(e,t),Object.defineProperty(e.prototype,"defaultPage",{get:function(){return eU(this.attributes.defaultPage,0,Math.max(this.pageViews.length-1,0))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pageViews",{get:function(){return this.playWindow.children},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"controllerShape",{get:function(){return this.totalPages>1?{width:55,height:0}:{width:0,height:0}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pageShape",{get:function(){var t,e,n=e0(((null==(e=(t=this.pageViews.map(function(t){var e=t.getBBox();return[e.width,e.height]}))[0])?void 0:e.map(function(e,n){return t.map(function(t){return t[n]})}))||[]).map(function(t){return Math.max.apply(Math,e1([],e0(t),!1))}),2),r=n[0],i=n[1],a=this.attributes,o=a.pageWidth,l=a.pageHeight;return{pageWidth:void 0===o?r:o,pageHeight:void 0===l?i:l}},enumerable:!1,configurable:!0}),e.prototype.getContainer=function(){return this.playWindow},Object.defineProperty(e.prototype,"totalPages",{get:function(){return this.pageViews.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currPage",{get:function(){return this.innerCurrPage},enumerable:!1,configurable:!0}),e.prototype.getBBox=function(){var e=t.prototype.getBBox.call(this),n=e.x,r=e.y,i=this.controllerShape,a=this.pageShape,o=a.pageWidth,l=a.pageHeight;return new dQ(n,r,o+i.width,l)},e.prototype.goTo=function(t){var e=this,n=this.attributes.animate,r=this.currPage,i=this.playState,a=this.playWindow,o=this.pageViews;if("idle"!==i||t<0||o.length<=0||t>=o.length)return null;o[r].setLocalPosition(0,0),this.prepareFollowingPage(t);var l=e0(this.getFollowingPageDiff(t),2),s=l[0],u=l[1];this.playState="running";var c=fQ(a,[{transform:"translate(0, 0)"},{transform:"translate(".concat(-s,", ").concat(-u,")")}],n);return fK(c,function(){e.innerCurrPage=t,e.playState="idle",e.setVisiblePages([t]),e.updatePageInfo()}),c},e.prototype.prev=function(){var t=this.attributes.loop,e=this.pageViews.length,n=this.currPage;if(!t&&n<=0)return null;var r=t?(n-1+e)%e:eU(n-1,0,e);return this.goTo(r)},e.prototype.next=function(){var t=this.attributes.loop,e=this.pageViews.length,n=this.currPage;if(!t&&n>=e-1)return null;var r=t?(n+1)%e:eU(n+1,0,e);return this.goTo(r)},e.prototype.renderClipPath=function(t){var e=this.pageShape,n=e.pageWidth,r=e.pageHeight;if(!n||!r){this.contentGroup.style.clipPath=void 0;return}this.clipPath=t.maybeAppendByClassName(Sa.clipPath,"rect").styles({width:n,height:r}),this.contentGroup.attr("clipPath",this.clipPath.node())},e.prototype.setVisiblePages=function(t){this.playWindow.children.forEach(function(e,n){t.includes(n)?fY(e):fV(e)})},e.prototype.adjustControllerLayout=function(){var t=this.prevBtnGroup,e=this.nextBtnGroup,n=this.pageInfoGroup,r=this.attributes,i=r.orientation,a=r.controllerPadding,o=n.getBBox(),l=o.width;o.height;var s=e0("horizontal"===i?[-180,0]:[-90,90],2),u=s[0],c=s[1];t.setLocalEulerAngles(u),e.setLocalEulerAngles(c);var f=t.getBBox(),h=f.width,d=f.height,p=e.getBBox(),y=p.width,g=p.height,v=Math.max(h,l,y),b="horizontal"===i?{offset:[[0,0],[h/2+a,0],[h+l+2*a,0]],textAlign:"start"}:{offset:[[v/2,-d-a],[v/2,0],[v/2,g+a]],textAlign:"center"},x=e0(b.offset,3),O=e0(x[0],2),w=O[0],k=O[1],_=e0(x[1],2),M=_[0],E=_[1],A=e0(x[2],2),S=A[0],j=A[1],P=b.textAlign,T=n.querySelector("text");T&&(T.style.textAlign=P),t.setLocalPosition(w,k),n.setLocalPosition(M,E),e.setLocalPosition(S,j)},e.prototype.updatePageInfo=function(){var t,e=this.currPage,n=this.pageViews,r=this.attributes.formatter;n.length<2||(null==(t=this.pageInfoGroup.querySelector(Sa.pageInfo.class))||t.attr("text",r(e+1,n.length)),this.adjustControllerLayout())},e.prototype.getFollowingPageDiff=function(t){var e=this.currPage;if(e===t)return[0,0];var n=this.attributes.orientation,r=this.pageShape,i=r.pageWidth,a=r.pageHeight,o=t<e?-1:1;return"horizontal"===n?[o*i,0]:[0,o*a]},e.prototype.prepareFollowingPage=function(t){var e=this.currPage,n=this.pageViews;if(this.setVisiblePages([t,e]),t!==e){var r=e0(this.getFollowingPageDiff(t),2),i=r[0],a=r[1];n[t].setLocalPosition(i,a)}},e.prototype.renderController=function(t){var e=this,n=this.attributes,r=n.controllerSpacing,i=n.classNamePrefix,a=void 0===i?"":i,o=this.pageShape,l=o.pageWidth,s=o.pageHeight,u=this.pageViews.length>=2,c=t.maybeAppendByClassName(Sa.controller,"g");if(fU(c.node(),u),u){var f=hT(this.attributes,"button"),h=hT(this.attributes,"pageNum"),d=e0(hN(f),2),p=d[0],y=d[1],g=p.size,v=eQ(p,["size"]),b=!c.select(Sa.prevBtnGroup.class).node(),x=c.maybeAppendByClassName(Sa.prevBtnGroup,"g").styles(y);this.prevBtnGroup=x.node();var O=x.maybeAppendByClassName(Sa.prevBtn,"path");if(a){var w=pG(Sa.prevBtn.name,"prev-btn",a);O.node().setAttribute("class",w)}var k=c.maybeAppendByClassName(Sa.nextBtnGroup,"g").styles(y);this.nextBtnGroup=k.node();var _=k.maybeAppendByClassName(Sa.nextBtn,"path");if(a){var M=pG(Sa.nextBtn.name,"next-btn",a);_.node().setAttribute("class",M)}[O,_].forEach(function(t){t.styles(eZ(eZ({},v),{transformOrigin:"center"})),hG(t.node(),g,!0)});var E=c.maybeAppendByClassName(Sa.pageInfoGroup,"g");this.pageInfoGroup=E.node();var A=E.maybeAppendByClassName(Sa.pageInfo,"text");if(A.styles(h),a){var S=pG(Sa.pageInfo.name,"page-info",a);A.node().setAttribute("class",S)}this.updatePageInfo(),c.node().setLocalPosition(l+r,s/2),b&&(this.prevBtnGroup.addEventListener("click",function(){e.prev()}),this.nextBtnGroup.addEventListener("click",function(){e.next()}))}},e.prototype.render=function(t,e){var n=t.x,r=t.y;this.attr("transform","translate(".concat(void 0===n?0:n,", ").concat(void 0===r?0:r,")"));var i=ht(e);this.renderClipPath(i),this.renderController(i),this.setVisiblePages([this.defaultPage]),this.goTo(this.defaultPage)},e.prototype.bindEvents=function(){var t=this,e=cn(function(){return t.render(t.attributes,t)},50);this.playWindow.addEventListener(oR.INSERTED,e),this.playWindow.addEventListener(oR.REMOVED,e)},e}(f4),Sl="component-poptip",Ss="component-poptip-arrow",Su="component-poptip-text",Sc=((NX={})[".".concat(Sl)]={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"},NX[".".concat(Su)]={"text-align":"center"},NX[".".concat(Sl,"[data-position='top']")]={transform:"translate(-50%, -100%)"},NX[".".concat(Sl,"[data-position='left']")]={transform:"translate(-100%, -50%)"},NX[".".concat(Sl,"[data-position='right']")]={transform:"translate(0, -50%)"},NX[".".concat(Sl,"[data-position='bottom']")]={transform:"translate(-50%, 0)"},NX[".".concat(Sl,"[data-position='top-left']")]={transform:"translate(0,-100%)"},NX[".".concat(Sl,"[data-position='top-right']")]={transform:"translate(-100%,-100%)"},NX[".".concat(Sl,"[data-position='left-top']")]={transform:"translate(-100%, 0)"},NX[".".concat(Sl,"[data-position='left-bottom']")]={transform:"translate(-100%, -100%)"},NX[".".concat(Sl,"[data-position='right-top']")]={transform:"translate(0, 0)"},NX[".".concat(Sl,"[data-position='right-bottom']")]={transform:"translate(0, -100%)"},NX[".".concat(Sl,"[data-position='bottom-left']")]={transform:"translate(0, 0)"},NX[".".concat(Sl,"[data-position='bottom-right']")]={transform:"translate(-100%, 0)"},NX[".".concat(Ss)]={width:"4px",height:"4px",transform:"rotate(45deg)","background-color":"rgba(0, 0, 0)",position:"absolute","z-index":-1},NX[".".concat(Sl,"[data-position='top']")]={transform:"translate(-50%, calc(-100% - 5px))"},NX["[data-position='top'] .".concat(Ss)]={bottom:"-2px"},NX[".".concat(Sl,"[data-position='left']")]={transform:"translate(calc(-100% - 5px), -50%)"},NX["[data-position='left'] .".concat(Ss)]={right:"-2px"},NX[".".concat(Sl,"[data-position='right']")]={transform:"translate(5px, -50%)"},NX["[data-position='right'] .".concat(Ss)]={left:"-2px"},NX[".".concat(Sl,"[data-position='bottom']")]={transform:"translate(-50%, 5px)"},NX["[data-position='bottom'] .".concat(Ss)]={top:"-2px"},NX[".".concat(Sl,"[data-position='top-left']")]={transform:"translate(0, calc(-100% - 5px))"},NX["[data-position='top-left'] .".concat(Ss)]={left:"10px",bottom:"-2px"},NX[".".concat(Sl,"[data-position='top-right']")]={transform:"translate(-100%, calc(-100% - 5px))"},NX["[data-position='top-right'] .".concat(Ss)]={right:"10px",bottom:"-2px"},NX[".".concat(Sl,"[data-position='left-top']")]={transform:"translate(calc(-100% - 5px), 0)"},NX["[data-position='left-top'] .".concat(Ss)]={right:"-2px",top:"8px"},NX[".".concat(Sl,"[data-position='left-bottom']")]={transform:"translate(calc(-100% - 5px), -100%)"},NX["[data-position='left-bottom'] .".concat(Ss)]={right:"-2px",bottom:"8px"},NX[".".concat(Sl,"[data-position='right-top']")]={transform:"translate(5px, 0)"},NX["[data-position='right-top'] .".concat(Ss)]={left:"-2px",top:"8px"},NX[".".concat(Sl,"[data-position='right-bottom']")]={transform:"translate(5px, -100%)"},NX["[data-position='right-bottom'] .".concat(Ss)]={left:"-2px",bottom:"8px"},NX[".".concat(Sl,"[data-position='bottom-left']")]={transform:"translate(0, 5px)"},NX["[data-position='bottom-left'] .".concat(Ss)]={top:"-2px",left:"8px"},NX[".".concat(Sl,"[data-position='bottom-right']")]={transform:"translate(-100%, 5px)"},NX["[data-position='bottom-right'] .".concat(Ss)]={top:"-2px",right:"8px"},NX),Sf=void 0,Sh=function(t){var e;return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return e||(e=t.apply(Sf,n)),e}};function Sd(t){var e=t&&document.getElementById(t);return e||((e=document.createElement("div")).setAttribute("id",t),document.body.appendChild(e)),e}var Sp=function(t){function e(n){var r=t.call(this,cy({style:{id:"component-poptip"}},e.defaultOptions,n))||this;return r.visibility="visible",r.map=new Map,r.domStyles="",r.initShape(),r.render(r.attributes,r),r}return eK(e,t),Object.defineProperty(e.prototype,"visible",{get:function(){return"visible"===this.visibility},enumerable:!1,configurable:!0}),e.prototype.render=function(t,e){this.visibility=this.style.visibility,this.updatePoptipElement()},e.prototype.update=function(t){this.attr(cy({},this.style,t)),this.render(this.attributes,this)},e.prototype.bind=function(t,e){var n=this;if(t){var r=this.style.text,i=function(i){var a=t,o=n.style,l=r;if(e){var s="function"==typeof e?e.call(null,i):e,u=s.html,c=s.target,f=eQ(s,["html","target"]);o=O8({},n.style,f),(c||!1===c)&&(a=c),"string"==typeof u&&(l=u)}var h=o.position,d=o.arrowPointAtCenter,p=o.follow,y=o.offset;if(a){var g=e0(function(t,e,n,r,i,a){if(void 0===i&&(i=!1),void 0===a&&(a=!1),a)return[t,e];var o=n.getBoundingClientRect(),l=o.x,s=o.y,u=o.width,c=o.height;switch(r){case"top":return i?[l+u/2,s]:[t,s];case"left":return i?[l,s+c/2]:[l,e];case"bottom":return i?[l+u/2,s+c]:[t,s+c];case"right":return i?[l+u,s+c/2]:[l+u,e];case"top-right":case"right-top":return[l+u,s];case"left-bottom":case"bottom-left":return[l,s+c];case"right-bottom":case"bottom-right":return[l+u,s+c];default:return[l,s]}}(i.clientX,i.clientY,a,h,d,p),2),v=g[0],b=g[1];n.showTip(v,b,{text:l,position:h,offset:y})}else n.hideTip()},a=function(){n.hideTip()};t.addEventListener("mousemove",i),t.addEventListener("mouseleave",a),this.map.set(t,[i,a])}},e.prototype.unbind=function(t){if(this.map.has(t)){var e=e0(this.map.get(t)||[],2),n=e[0],r=e[1];n&&t.removeEventListener("mousemove",n),r&&t.removeEventListener("mouseleave",r),this.map.delete(t)}},e.prototype.clear=function(){this.container.innerHTML=""},e.prototype.destroy=function(){var e,n=this;e1([],e0(this.map.keys()),!1).forEach(function(t){return n.unbind(t)}),null==(e=this.container)||e.remove(),t.prototype.destroy.call(this)},e.prototype.showTip=function(t,e,n){var r=cr(n,"text");if((!r||"string"==typeof r)&&(this.applyStyles(),t&&e&&n)){var i=n.offset,a=n.position;if(a&&this.container.setAttribute("data-position",a),this.setOffsetPosition(t,e,i),"string"==typeof r){var o=this.container.querySelector(".".concat(Su));o&&(o.innerHTML=r)}this.visibility="visible",this.container.style.visibility="visible"}},e.prototype.hideTip=function(){this.visibility="hidden",this.container.style.visibility="hidden"},e.prototype.getContainer=function(){return this.container},e.prototype.getClassName=function(){var t=this.style.containerClassName;return"".concat(Sl).concat(t?" ".concat(t):"")},e.prototype.initShape=function(){var t=this,e=this.style.id;this.container=Sh(Sd)(e),this.container.className=this.getClassName(),this.container.addEventListener("mousemove",function(){return t.showTip()}),this.container.addEventListener("mouseleave",function(){return t.hideTip()})},e.prototype.updatePoptipElement=function(){var t=this.container;this.clear();var e=this.style,n=e.id,r=e.template,i=e.text;this.container.setAttribute("id",n),this.container.className=this.getClassName(),(t.innerHTML='<span class="'.concat(Ss,'"></span>'),eV(r))?t.innerHTML+=r:r&&(r instanceof Element||r instanceof Document)&&t.appendChild(r),i&&(t.getElementsByClassName(Su)[0].textContent=i),this.applyStyles(),this.container.style.visibility=this.visibility},e.prototype.applyStyles=function(){var t=Object.entries(f1({},Sc,this.style.domStyles)).reduce(function(t,e){var n=e0(e,2),r=n[0],i=Object.entries(n[1]).reduce(function(t,e){var n=e0(e,2),r=n[0],i=n[1];return"".concat(t).concat(r,": ").concat(i,";")},"");return"".concat(t).concat(r,"{").concat(i,"}")},"");if(this.domStyles!==t){this.domStyles=t;var e=this.container.querySelector("style");e&&this.container.removeChild(e),(e=document.createElement("style")).innerHTML=t,this.container.appendChild(e)}},e.prototype.setOffsetPosition=function(t,e,n){void 0===n&&(n=this.style.offset);var r=e0(n,2),i=r[0],a=r[1];this.container.style.left="".concat(t+(void 0===i?0:i),"px"),this.container.style.top="".concat(e+(void 0===a?0:a),"px")},e.tag="poptip",e.defaultOptions={style:{x:0,y:0,width:0,height:0,target:null,visibility:"hidden",text:"",position:"top",follow:!1,offset:[0,0],domStyles:Sc,template:'<div class="'.concat(Su,'"></div>')}},e}(f4),Sy=he({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"),Sg={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"}}},Sv=function(t){function e(e,n){var r=t.call(this,e,{span:[1,1],marker:function(){return new ly({style:{r:6}})},markerSize:10,labelFill:"#646464",valueFill:"#646464",labelFontSize:12,valueFontSize:12,labelTextBaseline:"middle",valueTextBaseline:"middle"})||this;return r.keyFields={},r.keyFields=n||{},r}return eK(e,t),Object.defineProperty(e.prototype,"showValue",{get:function(){var t=this.attributes.valueText;return!!t&&("string"==typeof t||"number"==typeof t?""!==t:"function"==typeof t||""!==t.attr("text"))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"actualSpace",{get:function(){var t=this.labelGroup,e=this.valueGroup,n=this.attributes,r=n.markerSize,i=n.focus,a=n.focusMarkerSize,o=t.node().getBBox(),l=o.width,s=o.height,u=e.node().getBBox();return{markerWidth:r,labelWidth:l,valueWidth:u.width,focusWidth:i?null!=a?a:12:0,height:Math.max(r,s,u.height)}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"span",{get:function(){var t=this.attributes.span;if(!t)return[1,1];var e=e0(di(t),2),n=e[0],r=e[1],i=this.showValue?r:0,a=n+i;return[n/a,i/a]},enumerable:!1,configurable:!0}),e.prototype.setAttribute=function(e,n){t.prototype.setAttribute.call(this,e,n)},Object.defineProperty(e.prototype,"shape",{get:function(){var t,e=this.attributes,n=e.markerSize,r=e.width,i=this.actualSpace,a=i.markerWidth,o=i.focusWidth,l=i.height,s=this.actualSpace,u=s.labelWidth,c=s.valueWidth,f=e0(this.spacing,3),h=f[0],d=f[1],p=f[2];if(r){var y=r-n-h-d-o-p,g=e0(this.span,2);u=(t=e0([g[0]*y,g[1]*y],2))[0],c=t[1]}return{width:a+u+c+h+d+o+p,height:l,markerWidth:a,labelWidth:u,valueWidth:c,focusWidth:o}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"spacing",{get:function(){var t=this.attributes,e=t.spacing,n=t.focus;if(!e)return[0,0,0];var r=e0(di(e),3),i=r[0],a=r[1],o=r[2];return[i,this.showValue?a:0,n?o:0]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"layout",{get:function(){var t=this.shape,e=t.markerWidth,n=t.labelWidth,r=t.valueWidth,i=t.focusWidth,a=t.width,o=t.height,l=e0(this.spacing,3),s=l[0],u=l[1];return{height:o,width:a,markerWidth:e,labelWidth:n,valueWidth:r,focusWidth:i,position:[e/2,e+s,e+n+s+u,e+n+r+s+u+l[2]+i/2]}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scaleSize",{get:function(){var t,e=(t=this.markerGroup.node().querySelector(Sy.marker.class))?t.style:{},n=this.attributes,r=n.markerSize,i=n.markerStrokeWidth,a=void 0===i?e.strokeWidth:i,o=n.markerLineWidth,l=void 0===o?e.lineWidth:o,s=n.markerStroke,u=void 0===s?e.stroke:s,c=(a||l||+!!u)*Math.sqrt(2),f=this.markerGroup.node().getBBox();return(1-c/Math.max(f.width,f.height))*r},enumerable:!1,configurable:!0}),e.prototype.renderMarker=function(t){var e=this,n=this.attributes,r=n.marker,i=n.classNamePrefix,a=hT(this.attributes,"marker");this.markerGroup=t.maybeAppendByClassName(Sy.markerGroup,"g").style("zIndex",0),f6(!!r,this.markerGroup,function(){var t,n=e.markerGroup.node(),o=null==(t=n.childNodes)?void 0:t[0],l=pG(Sy.marker.name,pq,i),s="string"==typeof r?new pJ({style:{symbol:r},className:l}):r();o?s.nodeName===o.nodeName?o instanceof pJ?o.update(eZ(eZ({},a),{symbol:r})):(!function(t,e){var n,r,i=e.attributes;try{for(var a=eJ(Object.entries(i)),o=a.next();!o.done;o=a.next()){var l=e0(o.value,2),s=l[0],u=l[1];"id"!==s&&"className"!==s&&t.attr(s,u)}}catch(t){n={error:t}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}}(o,s),ht(o).styles(a)):(o.remove(),s instanceof pJ||(s.className=pG(Sy.marker.name,pq,i)),ht(s).styles(a),n.appendChild(s)):(s instanceof pJ||(s.className=pG(Sy.marker.name,pq,i),ht(s).styles(a)),n.appendChild(s)),e.markerGroup.node().scale(1/e.markerGroup.node().getScale()[0]);var u=hG(e.markerGroup.node(),e.scaleSize,!0);e.markerGroup.node().style._transform="scale(".concat(u,")")})},e.prototype.renderLabel=function(t){var e=hT(this.attributes,"label"),n=e.text,r=eQ(e,["text"]),i=this.attributes.classNamePrefix;this.labelGroup=t.maybeAppendByClassName(Sy.labelGroup,"g").style("zIndex",0);var a=pG(Sy.label.name,"label",i),o=this.labelGroup.maybeAppendByClassName(Sy.label,function(){return hW(n)});o.node().setAttribute("class",a),o.styles(r)},e.prototype.renderValue=function(t){var e=this,n=hT(this.attributes,"value"),r=n.text,i=eQ(n,["text"]),a=this.attributes.classNamePrefix;this.valueGroup=t.maybeAppendByClassName(Sy.valueGroup,"g").style("zIndex",0),f6(this.showValue,this.valueGroup,function(){var t=pG(Sy.value.name,"value",a),n=e.valueGroup.maybeAppendByClassName(Sy.value,function(){return hW(r)});n.node().setAttribute("class",t),n.styles(i)})},e.prototype.createPoptip=function(){var t=this.attributes.poptip||{},e=new Sp({style:f1(Sg,(t.render,eQ(t,["render"])))});return this.poptipGroup=e,e},e.prototype.bindPoptip=function(t){var e=this,n=this.attributes.poptip;n&&(this.poptipGroup||this.createPoptip()).bind(t,function(){var t=e.attributes,r=t.labelText,i=t.valueText,a=t.markerFill,o="string"==typeof r?r:null==r?void 0:r.attr("text"),l="string"==typeof i?i:null==i?void 0:i.attr("text");if("function"==typeof n.render)return{html:n.render(eZ(eZ({},e.keyFields),{label:o,value:l,color:a}))};var s="";return("string"==typeof o||"number"==typeof o)&&(s+='<div class="component-poptip-label">'.concat(o,"</div>")),("string"==typeof l||"number"==typeof l)&&(s+='<div class="component-poptip-value">'.concat(l,"</div>")),{html:s}})},e.prototype.renderFocus=function(t){var e=this,n=this.attributes,r=n.focus,i=n.focusMarkerSize,a=n.classNamePrefix,o={x:0,y:0,size:i,opacity:.6,symbol:"focus",stroke:"#aaaaaa",lineWidth:1};nb(r)||(this.focusGroup=t.maybeAppendByClassName(Sy.focusGroup,"g").style("zIndex",0),f6(r,this.focusGroup,function(){var n=pG(Sy.focus.name,"focus-icon",a),r=new pJ({style:eZ(eZ({},o),{symbol:"focus"}),className:n}),i=new ly({style:{r:o.size/2,fill:"transparent"}}),l=e.focusGroup.node();l.appendChild(i),l.appendChild(r),r.update({opacity:0}),t.node().addEventListener("pointerenter",function(){r.update({opacity:1})}),t.node().addEventListener("pointerleave",function(){r.update({opacity:0})})}))},e.prototype.renderPoptip=function(t){var e=this;this.attributes.poptip&&[t.maybeAppendByClassName(Sy.value,"g").node(),t.maybeAppendByClassName(Sy.label,"g").node()].forEach(function(t){t&&e.bindPoptip(t)})},e.prototype.renderBackground=function(t){var e=this.shape,n=e.width,r=e.height,i=hT(this.attributes,"background");this.background=t.maybeAppendByClassName(Sy.backgroundGroup,"g").style("zIndex",-1);var a=this.background.maybeAppendByClassName(Sy.background,"rect");a.styles(eZ({width:n,height:r},i));var o=this.attributes.classNamePrefix,l=void 0===o?"":o;if(l){var s=pG(Sy.background.name,"background",l);a.node().setAttribute("class",s)}},e.prototype.adjustLayout=function(){var t=this.layout,e=t.labelWidth,n=t.valueWidth,r=t.height,i=e0(t.position,4),a=i[0],o=i[1],l=i[2],s=i[3],u=r/2;this.markerGroup.styles({transform:"translate(".concat(a,", ").concat(u,")").concat(this.markerGroup.node().style._transform)}),this.labelGroup.styles({transform:"translate(".concat(o,", ").concat(u,")")}),this.focusGroup&&this.focusGroup.styles({transform:"translate(".concat(s,", ").concat(u,")")}),dn(this.labelGroup.select(Sy.label.class).node(),Math.ceil(e)),this.showValue&&(this.valueGroup.styles({transform:"translate(".concat(l,", ").concat(u,")")}),dn(this.valueGroup.select(Sy.value.class).node(),Math.ceil(n)))},e.prototype.render=function(t,e){var n=ht(e),r=t.x,i=t.y;n.styles({transform:"translate(".concat(void 0===r?0:r,", ").concat(void 0===i?0:i,")")}),this.renderMarker(n),this.renderLabel(n),this.renderValue(n),this.renderBackground(n),this.renderPoptip(n),this.renderFocus(n),this.adjustLayout()},e}(f4),Sm=he({page:"item-page",navigator:"navigator",item:"item"},"items"),Sb=function(t,e,n){return(void 0===n&&(n=!0),t)?e(t):n},Sx=function(t){function e(e){var n=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:Si,mouseenter:Si,mouseleave:Si})||this;return n.navigatorShape=[0,0],n}return eK(e,t),Object.defineProperty(e.prototype,"pageViews",{get:function(){return this.navigator.getContainer()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"grid",{get:function(){var t=this.attributes,e=t.gridRow,n=t.gridCol,r=t.data;if(!e&&!n)throw Error("gridRow and gridCol can not be set null at the same time");return e&&n?[e,n]:e?[e,r.length]:[r.length,n]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"renderData",{get:function(){var t=this.attributes,e=t.data,n=t.layout,r=t.poptip,i=t.focus,a=t.focusMarkerSize,o=t.classNamePrefix,l=hT(this.attributes,"item");return e.map(function(t,s){var u=t.id,c=void 0===u?s:u,f=t.label,h=t.value;return{id:"".concat(c),index:s,style:eZ({layout:n,labelText:f,valueText:h,poptip:r,focus:i,focusMarkerSize:a,classNamePrefix:o},Object.fromEntries(Object.entries(l).map(function(n){var r=e0(n,2);return[r[0],hL(r[1],[t,s,e])]})))}})},enumerable:!1,configurable:!0}),e.prototype.getGridLayout=function(){var t=this,e=this.attributes,n=e.orientation,r=e.width,i=e.rowPadding,a=e.colPadding,o=e0(this.navigatorShape,1)[0],l=e0(this.grid,2),s=l[0],u=l[1],c=u*s,f=0;return this.pageViews.children.map(function(e,l){var h,d,p=Math.floor(l/c),y=l%c,g=t.ifHorizontal(u,s),v=[Math.floor(y/g),y%g];"vertical"===n&&v.reverse();var b=e0(v,2),x=b[0],O=b[1],w=(r-o-(u-1)*a)/u,k=e.getBBox().height,_=e0([0,0],2),M=_[0],E=_[1];return"horizontal"===n?(M=(h=e0([f,x*(k+i)],2))[0],E=h[1],f=O===u-1?0:f+w+a):(M=(d=e0([O*(w+a),f],2))[0],E=d[1],f=x===s-1?0:f+k+i),{page:p,index:l,row:x,col:O,pageIndex:y,width:w,height:k,x:M,y:E}})},e.prototype.getFlexLayout=function(){var t=this.attributes,e=t.width,n=t.height,r=t.rowPadding,i=t.colPadding,a=e0(this.navigatorShape,1)[0],o=e0(this.grid,2),l=o[0],s=o[1],u=e0([e-a,n],2),c=u[0],f=u[1],h=e0([0,0,0,0,0,0,0,0],8),d=h[0],p=h[1],y=h[2],g=h[3],v=h[4],b=h[5],x=h[6],O=h[7];return this.pageViews.children.map(function(t,e){var n,a,o,u,h=t.getBBox(),w=h.width,k=h.height,_=0===x?0:i,M=x+_+w;return M<=c&&Sb(v,function(t){return t<s})?(d=(n=e0([x+_,O,M],3))[0],p=n[1],x=n[2]):(b=(a=e0([b+1,0,0,O+k+r],4))[0],v=a[1],x=a[2],(O=a[3])+k<=f&&Sb(b,function(t){return t<l}))?(d=(o=e0([x,O,w],3))[0],p=o[1],x=o[2]):(d=(u=e0([0,0,w,0,y+1,0,0,0],8))[0],p=u[1],x=u[2],O=u[3],y=u[4],g=u[5],b=u[6],v=u[7]),{width:w,height:k,x:d,y:p,page:y,index:e,pageIndex:g++,row:b,col:v++}})},Object.defineProperty(e.prototype,"itemsLayout",{get:function(){this.navigatorShape=[0,0];var t="grid"===this.attributes.layout?this.getGridLayout:this.getFlexLayout,e=t.call(this);return e.slice(-1)[0].page>0?(this.navigatorShape=[55,0],t.call(this)):e},enumerable:!1,configurable:!0}),e.prototype.ifHorizontal=function(t,e){return p0(this.attributes.orientation,t,e)},e.prototype.flattenPage=function(t){t.querySelectorAll(Sm.item.class).forEach(function(e){t.appendChild(e)}),t.querySelectorAll(Sm.page.class).forEach(function(e){t.removeChild(e).destroy()})},e.prototype.renderItems=function(t){var e=this.attributes,n=e.click,r=e.mouseenter,i=e.mouseleave,a=e.classNamePrefix;this.flattenPage(t);var o=this.dispatchCustomEvent.bind(this),l=pG(Sm.item.name,"item",a);ht(t).selectAll(Sm.item.class).data(this.renderData,function(t){return t.id}).join(function(t){return t.append(function(t){return new Sv({style:t.style},eQ(t,["style"]))}).attr("className",l).on("click",function(){null==n||n(this),o("itemClick",{item:this})}).on("pointerenter",function(){null==r||r(this),o("itemMouseenter",{item:this})}).on("pointerleave",function(){null==i||i(this),o("itemMouseleave",{item:this})})},function(t){return t.each(function(t){var e=t.style;this.update(e)})},function(t){return t.remove()})},e.prototype.relayoutNavigator=function(){var t,e=this.attributes,n=e.layout,r=e.width,i=(null==(t=this.pageViews.children[0])?void 0:t.getBBox().height)||0,a=e0(this.navigatorShape,2),o=a[0],l=a[1];this.navigator.update("grid"===n?{pageWidth:r-o,pageHeight:i-l}:{})},e.prototype.adjustLayout=function(){var t,e,n=this,r=Object.entries((t=this.itemsLayout,e="page",t.reduce(function(t,n){return(t[n[e]]=t[n[e]]||[]).push(n),t},{}))).map(function(t){var e=e0(t,2);return{page:e[0],layouts:e[1]}}),i=e1([],e0(this.navigator.getContainer().children),!1);r.forEach(function(t){var e=t.layouts,r=n.pageViews.appendChild(new lb({className:Sm.page.name}));e.forEach(function(t){var e=t.x,n=t.y,a=t.index,o=t.width,l=t.height,s=i[a];r.appendChild(s),gw(s,"__layout__",t),s.update({x:e,y:n,width:o,height:l})})}),this.relayoutNavigator()},e.prototype.renderNavigator=function(t){var e=this.attributes,n=f1({orientation:e.orientation,classNamePrefix:e.classNamePrefix},hT(this.attributes,"nav")),r=this;return t.selectAll(Sm.navigator.class).data(["nav"]).join(function(t){return t.append(function(){return new So({style:n})}).attr("className",Sm.navigator.name).each(function(){r.navigator=this})},function(t){return t.each(function(){this.update(n)})},function(t){return t.remove()}),this.navigator},e.prototype.getBBox=function(){return this.navigator.getBBox()},e.prototype.render=function(t,e){var n=this.attributes.data;if(n&&0!==n.length){var r=this.renderNavigator(ht(e));this.renderItems(r.getContainer()),this.adjustLayout()}},e.prototype.dispatchCustomEvent=function(t,e){var n=new oA(t,{detail:e});this.dispatchEvent(n)},e}(f4),SO=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return eK(e,t),e.prototype.update=function(t){this.attr(t)},e}(lO),Sw=function(t){function e(e){return t.call(this,e,p4)||this}return eK(e,t),e.prototype.renderTitle=function(t,e,n){var r=this.attributes,i=r.showTitle,a=r.titleText,o=r.classNamePrefix,l=e0(hN(hT(this.attributes,"title")),2),s=l[0],u=l[1];this.titleGroup=t.maybeAppendByClassName(p8.titleGroup,"g").styles(u);var c=eZ(eZ({width:e,height:n},s),{text:i?a:"",classNamePrefix:o});this.title=this.titleGroup.maybeAppendByClassName(p8.title,function(){return new pX({style:c})}).update(c)},e.prototype.renderCustom=function(t){var e=this.attributes.data,n={innerHTML:this.attributes.render(e),pointerEvents:"auto"};t.maybeAppendByClassName(p8.html,function(){return new SO({className:p8.html.name,style:n})}).update(n)},e.prototype.renderItems=function(t,e){var n=e.x,r=e.y,i=e.width,a=e.height,o=e0(hN(hT(this.attributes,"title",!0)),2),l=o[0],s=o[1],u=eZ(eZ({},l),{width:i,height:a,x:0,y:0});this.itemsGroup=t.maybeAppendByClassName(p8.itemsGroup,"g").styles(eZ(eZ({},s),{transform:"translate(".concat(n,", ").concat(r,")")}));var c=this;this.itemsGroup.selectAll(p8.items.class).data(["items"]).join(function(t){return t.append(function(){return new Sx({style:u})}).attr("className",p8.items.name).each(function(){c.items=ht(this)})},function(t){return t.update(u)},function(t){return t.remove()})},e.prototype.adjustLayout=function(){if(this.attributes.showTitle){var t=this.title.node().getAvailableSpace(),e=t.x,n=t.y;this.itemsGroup.node().style.transform="translate(".concat(e,", ").concat(n,")")}},Object.defineProperty(e.prototype,"availableSpace",{get:function(){var t=this.attributes,e=t.showTitle,n=t.width,r=t.height;return e?this.title.node().getAvailableSpace():new dQ(0,0,n,r)},enumerable:!1,configurable:!0}),e.prototype.getBBox=function(){var e,n,r=null==(e=this.title)?void 0:e.node(),i=null==(n=this.items)?void 0:n.node();return r&&i?function(t,e){var n=t.attributes,r=n.position,i=n.spacing,a=n.inset,o=n.text,l=t.getBBox(),s=e.getBBox(),u=dA(r),c=e0(di(o?i:0),4),f=c[0],h=c[1],d=c[2],p=c[3],y=e0(di(a),4),g=y[0],v=y[1],b=y[2],x=y[3],O=e0([p+h,f+d],2),w=O[0],k=O[1],_=e0([x+v,g+b],2),M=_[0],E=_[1];if("l"===u[0])return new dQ(l.x,l.y,s.width+l.width+w+M,Math.max(s.height+E,l.height));if("t"===u[0])return new dQ(l.x,l.y,Math.max(s.width+M,l.width),s.height+l.height+k+E);var A=e0([e.attributes.width||s.width,e.attributes.height||s.height],2),S=A[0],j=A[1];return new dQ(s.x,s.y,S+l.width+w+M,j+l.height+k+E)}(r,i):t.prototype.getBBox.call(this)},e.prototype.render=function(t,e){var n=this.attributes,r=n.width,i=n.height,a=n.x,o=n.y,l=n.classNamePrefix,s=n.render,u=ht(e),c=e.className||"legend-category";l?e.attr("className","".concat(c," ").concat(l,"legend")):e.className||e.attr("className","legend-category"),e.style.transform="translate(".concat(void 0===a?0:a,", ").concat(void 0===o?0:o,")"),s?this.renderCustom(u):(this.renderTitle(u,r,i),this.renderItems(u,this.availableSpace),this.adjustLayout())},e}(f4),Sk=function(t,e,n,r){return new(n||(n=Promise))(function(i,a){function o(t){try{s(r.next(t))}catch(t){a(t)}}function l(t){try{s(r.throw(t))}catch(t){a(t)}}function s(t){var e;t.done?i(t.value):((e=t.value)instanceof n?e:new n(function(t){t(e)})).then(o,l)}s((r=r.apply(t,e||[])).next())})};let S_="legend-category",SM="legend-html-category";function SE(t){return t.getElementsByClassName("legend-category-item-marker")[0]}function SA(t){return t.getElementsByClassName("legend-category-item-label")[0]}function SS(t){return t.getElementsByClassName("legend-category-item-focus-group")[0]}function Sj(t){return t.getElementsByClassName("items-item")}function SP(t){return t.getElementsByClassName(S_)}function ST(t){return t.getElementsByClassName("legend-continuous")}function SC(t){let e=t.parentNode;for(;e&&!e.__data__;)e=e.parentNode;return e.__data__}function SN(t,e){return Sk(this,arguments,void 0,function*(t,{legend:e,channel:n,value:r,ordinal:i,channels:a,allChannels:o,facet:l=!1}){let{view:s,update:u,setState:c}=t;c(e,t=>{var u,c;let{marks:f}=t,h=null==(c=null==(u=e.attributes)?void 0:u.scales)?void 0:c.find(t=>t.name===n),d=f.map(e=>{var u,c;if((null!=(u=e.scale[n].key)?u:n)!==(null!=(c=null==h?void 0:h.key)?c:null==h?void 0:h.name)||"legends"===e.type||fI.includes(e.type))return e;let{transform:f=[],data:d=[]}=e,p=f.findIndex(({type:t})=>t.startsWith("group")||t.startsWith("bin")),y=[...f];return d.length&&y.splice(p+1,0,{type:"filter",[n]:{value:r,ordinal:i}}),cy({},e,Object.assign(Object.assign({transform:y,scale:Object.fromEntries(a.map(e=>{var n,r,i;let a,o=(n=s.scale,r=t.key,a=Object.keys(n).find(t=>{if(t.startsWith(e)){let i=n[t].getOptions();return i.name===e&&i.markKey===r}}),null!=(i=n[a])?i:n[e]);return[e,{domain:o.getOptions().domain}]}))},!i&&{animate:!1}),{legend:!l&&Object.fromEntries(o.map(t=>[t,{preserve:!0}]))}))});return Object.assign(Object.assign({},t),{marks:d})}),yield u()})}function SL(t,e){for(let n of t)SN(n,Object.assign(Object.assign({},e),{facet:!0}))}var SI=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function SR(t,e){let n=pt(t,"shape"),r=pt(t,"color"),i=n?n.clone():null,a=[];for(let[t,n]of e){let e=t.type,o=((null==r?void 0:r.getOptions().domain.length)>0?null==r?void 0:r.getOptions().domain:n.data).map((e,r)=>{var a;return i?i.map(e||"point"):(null==(a=null==t?void 0:t.style)?void 0:a.shape)||n.defaultShape||"point"});"string"==typeof e&&a.push([e,o])}if(0===a.length)return["point",["point"]];if(1===a.length||!n)return a[0];let{range:o}=n.getOptions();return a.map(([t,e])=>{let n=0;for(let t=0;t<a.length;t++){let r=o[t%o.length];e[t]===r&&n++}return[n/e.length,[t,e]]}).sort((t,e)=>e[0]-t[0])[0][1]}let SD=t=>{let{labelFormatter:e,layout:n,order:r,orientation:i,position:a,size:o,title:l,cols:s,itemMarker:u,render:c}=t,f=SI(t,["labelFormatter","layout","order","orientation","position","size","title","cols","itemMarker","render"]),{gridRow:h}=f;return e=>{let{value:r,theme:i}=e,{bbox:o}=r,{width:u,height:d}=function(t,e,n){let{position:r}=e;if("center"===r){let{bbox:e}=t,{width:n,height:r}=e;return{width:n,height:r}}let{width:i,height:a}=pe(t,e,n);return{width:i,height:a}}(r,t,SD),p=d8(a,n),y=Object.assign(Object.assign(Object.assign(Object.assign({orientation:["right","left","center"].includes(a)?"vertical":"horizontal",width:u,height:d,layout:void 0!==s?"grid":"flex"},void 0!==s&&{gridCol:s}),void 0!==h&&{gridRow:h}),{titleText:d6(l)}),function(t,e){let n,{labelFormatter:r=t=>`${t}`}=t,{scales:i,theme:a}=e,o=a.legendCategory.itemMarkerSize,l=(n=pt(i,"size"))instanceof Ae?2*n.map(NaN):o,s={itemMarker:function(t,e){let{scales:n,library:r,markState:i}=e,[a,o]=SR(n,i),{itemMarker:l,itemMarkerSize:s}=t,u=(t,e)=>{var n,i,o;let l=(null==(o=null==(i=null==(n=r[`mark.${a}`])?void 0:n.props)?void 0:i.shape[t])?void 0:o.props.defaultMarker)||dT(t.split(".")),u="function"==typeof s?s(e):s;return()=>(function(t,e){var{d:n,fill:r,lineWidth:i,path:a,stroke:o,color:l}=e,s=sN(e,["d","fill","lineWidth","path","stroke","color"]);let u=s8.get(t)||s8.get("point");return(...t)=>new lE({style:Object.assign(Object.assign({},s),{d:u(...t),stroke:u.style.includes("stroke")?l||o:"",fill:u.style.includes("fill")?l||r:"",lineWidth:u.style.includes("lineWidth")?i||i||2:0})})})(l,{color:e.color})(0,0,u)},c=t=>`${o[t]}`;return pt(n,"shape")&&!l?(t,e)=>u(c(e),t):"function"==typeof l?(t,e)=>{let n=l(t.id,e);return"string"==typeof n?u(n,t):n}:(t,e)=>u(l||c(e),t)}(Object.assign(Object.assign({},t),{itemMarkerSize:l}),e),itemMarkerSize:l,itemMarkerOpacity:function(t){let e=pt(t,"opacity");if(e){let{range:t}=e.getOptions();return(e,n)=>t[n]}}(i),itemMarkerLineWidth:function(t,e){let{scales:n,markState:r}=e,[i,a]=SR(n,r),{itemMarker:o,itemMarkerLineWidth:l}=t;if(void 0!==l)return l;let s=["line","hyphen","dash","smooth","hv","hvh","vh","vhv"];return"string"==typeof o&&s.includes(o)?4:"function"==typeof o?(t,e)=>{let n=o(t.id,e);if("string"==typeof n&&s.includes(n))return 4}:(Array.isArray(a)?a:[a]).some(t=>s.includes(t))?4:void 0}(t,e)},u="string"==typeof r?Ex(r):r,c=pt(i,"color"),f=i.find(t=>t.getOptions().domain.length>0).getOptions().domain,h=c?t=>c.map(t):()=>e.theme.color;return Object.assign(Object.assign({},s),{data:f.map(t=>({id:t,label:u(t),color:h(t)}))})}(t,e)),{legendCategory:g={}}=i,v=pn(Object.assign({},g,Object.assign(Object.assign({},y),{data:(null==y?void 0:y.data.filter(t=>""!==t.id))||[]}),f,{classNamePrefix:"g2-"}));if(c)return new Sw({className:SM,style:Object.assign(Object.assign({},v),{x:o.x,y:o.y,render:c})});let b=new d7({style:Object.assign(Object.assign({x:o.x,y:o.y,width:o.width,height:o.height},p),{subOptions:v})});return b.appendChild(new Sw({className:"legend-category",style:v})),b}};SD.props={defaultPosition:"top",defaultOrder:1,defaultSize:40,defaultCrossPadding:[12,12],defaultPadding:[12,12]};let SB=t=>()=>new lb;SB.props={};var SF=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function Sz(t,e,n,r){switch(r){case"center":return{x:t+n/2,y:e,textAlign:"middle"};case"right":return{x:t+n,y:e,textAlign:"right"};default:return{x:t,y:e,textAlign:"left"}}}let S$=(NV={render(t,e){let{width:n,title:r,subtitle:i,spacing:a=2,align:o="left",x:l,y:s}=t,u=SF(t,["width","title","subtitle","spacing","align","x","y"]);e.style.transform=`translate(${l}, ${s})`;let c=cG(u,"title"),f=cG(u,"subtitle"),h=d4(e,".title","text").attr("className","title").call(yL,Object.assign(Object.assign(Object.assign({},Sz(0,0,n,o)),{fontSize:14,textBaseline:"top",text:r}),c)).node().getLocalBounds();d4(e,".sub-title","text").attr("className","sub-title").call(t=>{if(!i)return t.node().remove();t.node().attr(Object.assign(Object.assign(Object.assign({},Sz(0,h.max[1]+a,n,o)),{fontSize:12,textBaseline:"top",text:i}),f))})}},class extends lv{constructor(t){super(t),this.descriptor=NV}connectedCallback(){var t,e;null==(e=(t=this.descriptor).render)||e.call(t,this.attributes,this)}update(t={}){var e,n;this.attr(cy({},this.attributes,t)),null==(n=(e=this.descriptor).render)||n.call(e,this.attributes,this)}}),SW=t=>({value:e,theme:n})=>{let{x:r,y:i,width:a,height:o}=e.bbox;return new S$({style:cy({},n.title,Object.assign({x:r,y:i,width:a,height:o},t))})};function SG({map:t,initKey:e},n){let r=e(n);return t.has(r)?t.get(r):n}function Sq(t){return"object"==typeof t?t.valueOf():t}SW.props={defaultPosition:"top",defaultOrder:2,defaultSize:36,defaultCrossPadding:[20,20],defaultPadding:[12,12]};class SH extends Map{constructor(t){if(super(),this.map=new Map,this.initKey=Sq,null!==t)for(const[e,n]of t)this.set(e,n)}get(t){return super.get(SG({map:this.map,initKey:this.initKey},t))}has(t){return super.has(SG({map:this.map,initKey:this.initKey},t))}set(t,e){return super.set(function({map:t,initKey:e},n){let r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}({map:this.map,initKey:this.initKey},t),e)}delete(t){return super.delete(function({map:t,initKey:e},n){let r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}({map:this.map,initKey:this.initKey},t))}}let SY=Symbol("defaultUnknown");function SV(t,e,n){for(let r=0;r<e.length;r+=1)t.has(e[r])||t.set(n(e[r]),r)}function SU(t){let{value:e,from:n,to:r,mapper:i,notFoundReturn:a}=t,o=i.get(e);if(void 0===o){if(a!==SY)return a;o=n.push(e)-1,i.set(e,o)}return r[o%r.length]}function SX(t){return t instanceof Date?t=>`${t}`:"object"==typeof t?t=>JSON.stringify(t):t=>t}class SK extends ph{getDefaultOptions(){return{domain:[],range:[],unknown:SY}}constructor(t){super(t)}map(t){return 0===this.domainIndexMap.size&&SV(this.domainIndexMap,this.getDomain(),this.domainKey),SU({value:this.domainKey(t),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(t){return 0===this.rangeIndexMap.size&&SV(this.rangeIndexMap,this.getRange(),this.rangeKey),SU({value:this.rangeKey(t),mapper:this.rangeIndexMap,from:this.getRange(),to:this.getDomain(),notFoundReturn:this.options.unknown})}rescale(t){let[e]=this.options.domain,[n]=this.options.range;if(this.domainKey=SX(e),this.rangeKey=SX(n),!this.rangeIndexMap){this.rangeIndexMap=new Map,this.domainIndexMap=new Map;return}(!t||t.range)&&this.rangeIndexMap.clear(),(!t||t.domain||t.compare)&&(this.domainIndexMap.clear(),this.sortedDomain=void 0)}clone(){return new SK(this.options)}getRange(){return this.options.range}getDomain(){if(this.sortedDomain)return this.sortedDomain;let{domain:t,compare:e}=this.options;return this.sortedDomain=e?[...t].sort(e):t,this.sortedDomain}}class SZ extends SK{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:SY,flex:[]}}constructor(t){super(t)}clone(){return new SZ(this.options)}getStep(t){return void 0===this.valueStep?1:"number"==typeof this.valueStep?this.valueStep:void 0===t?Array.from(this.valueStep.values())[0]:this.valueStep.get(t)}getBandWidth(t){return void 0===this.valueBandWidth?1:"number"==typeof this.valueBandWidth?this.valueBandWidth:void 0===t?Array.from(this.valueBandWidth.values())[0]:this.valueBandWidth.get(t)}getRange(){return this.adjustedRange}getPaddingInner(){let{padding:t,paddingInner:e}=this.options;return t>0?t:e}getPaddingOuter(){let{padding:t,paddingOuter:e}=this.options;return t>0?t:e}rescale(){super.rescale();let{align:t,domain:e,range:n,round:r,flex:i}=this.options,{adjustedRange:a,valueBandWidth:o,valueStep:l}=function(t){var e;let n,r,{domain:i}=t,a=i.length;if(0===a)return{valueBandWidth:void 0,valueStep:void 0,adjustedRange:[]};if(null==(e=t.flex)?void 0:e.length)return function(t){let e,n,{domain:r,range:i,paddingOuter:a,paddingInner:o,flex:l,round:s,align:u}=t,c=r.length,f=(e=c-l.length)>0?[...l,...Array(e).fill(1)]:e<0?l.slice(0,c):l,[h,d]=i,p=d-h,y=p/(2/c*a+1-1/c*o),g=y*o/c,v=y-c*g,b=(n=Math.min(...f),f.map(t=>t/n)),x=v/b.reduce((t,e)=>t+e),O=new SH(r.map((t,e)=>{let n=b[e]*x;return[t,s?Math.floor(n):n]})),w=new SH(r.map((t,e)=>{let n=b[e]*x+g;return[t,s?Math.floor(n):n]})),k=Array.from(w.values()).reduce((t,e)=>t+e),_=h+(p-(k-k/c*o))*u,M=s?Math.round(_):_,E=Array(c);for(let t=0;t<c;t+=1){E[t]=Math.round(1e12*M)/1e12;let e=r[t];M+=w.get(e)}return{valueBandWidth:O,valueStep:w,adjustedRange:E}}(t);let{range:o,paddingOuter:l,paddingInner:s,round:u,align:c}=t,f=o[0],h=o[1]-f;n=h/Math.max(1,2*l+(a-s)),u&&(n=Math.floor(n)),f+=(h-n*(a-s))*c,r=n*(1-s),u&&(f=Math.round(f),r=Math.round(r));let d=Array(a).fill(0).map((t,e)=>f+e*n);return{valueStep:n,valueBandWidth:r,adjustedRange:d}}({align:t,range:n,round:r,flex:i,paddingInner:this.getPaddingInner(),paddingOuter:this.getPaddingOuter(),domain:e});this.valueStep=l,this.valueBandWidth=o,this.adjustedRange=a}}var SQ=function(t){if("object"!=typeof t||null===t)return t;if(ns(t)){e=[];for(var e,n=0,r=t.length;n<r;n++)"object"==typeof t[n]&&null!=t[n]?e[n]=SQ(t[n]):e[n]=t[n]}else for(var i in e={},t)"object"==typeof t[i]&&null!=t[i]?e[i]=SQ(t[i]):e[i]=t[i];return e},SJ=function(t){function e(e){var n=this,r=e.style,i=eQ(e,["style"]);return(n=t.call(this,cy({},{type:"column"},eZ({style:r},i)))||this).columnsGroup=new lb({name:"columns"}),n.appendChild(n.columnsGroup),n.render(),n}return eK(e,t),e.prototype.render=function(){var t=this.attributes,e=t.columns,n=t.x,r=t.y;this.columnsGroup.style.transform="translate(".concat(n,", ").concat(r,")"),ht(this.columnsGroup).selectAll(".column").data(e.flat()).join(function(t){return t.append("rect").attr("className","column").each(function(t){this.attr(t)})},function(t){return t.each(function(t){this.attr(t)})},function(t){return t.remove()})},e.prototype.update=function(t){this.attr(f1({},this.attributes,t)),this.render()},e.prototype.clear=function(){this.removeChildren()},e}(lp),S0=function(t){function e(e){var n=this,r=e.style,i=eQ(e,["style"]);return(n=t.call(this,cy({},{type:"lines"},eZ({style:r},i)))||this).linesGroup=n.appendChild(new lb),n.areasGroup=n.appendChild(new lb),n.render(),n}return eK(e,t),e.prototype.render=function(){var t=this.attributes,e=t.lines,n=t.areas,r=t.x,i=t.y;this.style.transform="translate(".concat(r,", ").concat(i,")"),e&&this.renderLines(e),n&&this.renderAreas(n)},e.prototype.clear=function(){this.linesGroup.removeChildren(),this.areasGroup.removeChildren()},e.prototype.update=function(t){this.attr(f1({},this.attributes,t)),this.render()},e.prototype.renderLines=function(t){ht(this.linesGroup).selectAll(".line").data(t).join(function(t){return t.append("path").attr("className","line").each(function(t){this.attr(t)})},function(t){return t.each(function(t){this.attr(t)})},function(t){return t.remove()})},e.prototype.renderAreas=function(t){ht(this.linesGroup).selectAll(".area").data(t).join(function(t){return t.append("path").attr("className","area").each(function(t){this.attr(t)})},function(t){return t.each(function(t){this.style(t)})},function(t){return t.remove()})},e}(lp);function S1(t,e){void 0===e&&(e=!1);var n=e?t.length-1:0,r=t.map(function(t,e){return e1([e===n?"M":"L"],e0(t),!1)});return e?r.reverse():r}function S2(t,e){if(void 0===e&&(e=!1),t.length<=2)return S1(t);for(var n=[],r=t.length,i=0;i<r;i+=1){var a=e?t[r-i-1]:t[i];f_(a,n.slice(-2))||n.push.apply(n,e1([],e0(a),!1))}var o=function(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=[[0,0],[1,1]]);for(var r,i,a,o=!!e,l=[],s=0,u=t.length;s<u;s+=2)l.push([t[s],t[s+1]]);for(var c=function(t,e,n){var r,i,a,o,l,s,u=[],c=!!n,f=[1/0,1/0],h=[-1/0,-1/0];if(c){f=(r=e0(n,2))[0],h=r[1];for(var d=0,p=t.length;d<p;d+=1){var y=t[d];f=hw(f,y),h=hk(h,y)}}for(var d=0,g=t.length;d<g;d+=1){var y=t[d];if(0!==d||e)if(d!==g-1||e){i=t[[d?d-1:g-1,d-1][+!e]];var v=[0,0];v=hb(v=hO(a=t[e?(d+1)%g:d+1],i),.4);var b=h_(y,i),x=h_(y,a),O=b+x;0!==O&&(b/=O,x/=O);var w=hb(v,-b),k=hb(v,x);l=hx(y,w),o=hw(o=hx(y,k),hk(a,y)),w=hb(w=hO(o=hk(o,hw(a,y)),y),-b/x),l=hw(l=hx(y,w),hk(i,y)),l=hk(l,hw(i,y)),k=hb(k=hO(y,l),x/b),o=hx(y,k),c&&(l=hw(l=hk(l,f),h),o=hw(o=hk(o,f),h)),u.push(s),u.push(l),s=o}else l=y,u.push(s),u.push(l);else s=y}return e&&u.push(u.shift()),u}(l,o,n),f=l.length,h=[],s=0;s<f-1;s+=1)r=c[2*s],i=c[2*s+1],a=l[s+1],h.push(["C",r[0],r[1],i[0],i[1],a[0],a[1]]);return o&&(r=c[f],i=c[f+1],a=e0(l,1)[0],h.push(["C",r[0],r[1],i[0],i[1],a[0],a[1]])),h}(n,!1);return e?o.unshift(e1(["M"],e0(t[r-1]),!1)):o.unshift(e1(["M"],e0(t[0]),!1)),o}function S5(t,e,n){var r=SQ(t);return r.push(["L",e,n],["L",0,n],["Z"]),r}let S3=function(t,e){if(ns(t)){for(var n,r=1/0,i=0;i<t.length;i++){var a=t[i],o=nk(e)?e(a):a[e];o<r&&(n=a,r=o)}return n}},S4=function(t,e){if(ns(t)){for(var n,r=-1/0,i=0;i<t.length;i++){var a=t[i],o=nk(e)?e(a):a[e];o>r&&(n=a,r=o)}return n}};function S6(t){return 0===t.length?[0,0]:[nu(S3(t,function(t){return nu(t)||0})),nc(S4(t,function(t){return nc(t)||0}))]}function S8(t){for(var e=SQ(t),n=e[0].length,r=e0([Array(n).fill(0),Array(n).fill(0)],2),i=r[0],a=r[1],o=0;o<e.length;o+=1)for(var l=e[o],s=0;s<n;s+=1)l[s]>=0?(l[s]+=i[s],i[s]=l[s]):(l[s]+=a[s],a[s]=l[s]);return e}var S9=function(t){function e(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 eK(e,t),Object.defineProperty(e.prototype,"rawData",{get:function(){var t=this.attributes.data;if(!t||(null==t?void 0:t.length)===0)return[[]];var e=SQ(t);return eq(e[0])?[e]:e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"data",{get:function(){return this.attributes.isStack?S8(this.rawData):this.rawData},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scales",{get:function(){return this.createScales(this.data)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"baseline",{get:function(){var t=this.scales.y,e=e0(t.getOptions().domain||[0,0],2),n=e[0],r=e[1];return r<0?t.map(r):t.map(n<0?0:n)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"containerShape",{get:function(){var t=this.attributes;return{width:t.width,height:t.height}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"linesStyle",{get:function(){var t=this,e=this.attributes,n=e.type,r=e.isStack,i=e.smooth;if("line"!==n)throw Error("linesStyle can only be used in line type");var a=hT(this.attributes,"area"),o=hT(this.attributes,"line"),l=this.containerShape.width,s=this.data;if(0===s[0].length)return{lines:[],areas:[]};var u=this.scales,c=(p=(h={type:"line",x:u.x,y:u.y}).x,v=(g=e0((y=h.y).getOptions().range||[0,0],2))[0],(b=g[1])>v&&(b=(d=e0([v,b],2))[0],v=d[1]),s.map(function(t){return t.map(function(t,e){return[p.map(e),eU(y.map(t),b,v)]})})),f=[];if(a){var h,d,p,y,g,v,b,x=this.baseline;f=r?i?function(t,e,n){for(var r=[],i=t.length-1;i>=0;i-=1){var a=t[i],o=S2(a),l=void 0;if(0===i)l=S5(o,e,n);else{var s=S2(t[i-1],!0),u=a[0];s[0][0]="L",l=e1(e1(e1([],e0(o),!1),e0(s),!1),[e1(["M"],e0(u),!1),["Z"]],!1)}r.push(l)}return r}(c,l,x):function(t,e,n){for(var r=[],i=t.length-1;i>=0;i-=1){var a=S1(t[i]),o=void 0;if(0===i)o=S5(a,e,n);else{var l=S1(t[i-1],!0);l[0][0]="L",o=e1(e1(e1([],e0(a),!1),e0(l),!1),[["Z"]],!1)}r.push(o)}return r}(c,l,x):c.map(function(t){return S5(i?S2(t):S1(t),l,x)})}return{lines:c.map(function(e,n){return eZ({stroke:t.getColor(n),d:i?S2(e):S1(e)},o)}),areas:f.map(function(e,n){return eZ({d:e,fill:t.getColor(n)},a)})}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"columnsStyle",{get:function(){var t=this,e=hT(this.attributes,"column"),n=this.attributes,r=n.isStack,i=n.type,a=n.scale;if("column"!==i)throw Error("columnsStyle can only be used in column type");var o=this.containerShape.height,l=this.rawData;if(!l)return{columns:[]};r&&(l=S8(l));var s=this.createScales(l),u=s.x,c=s.y,f=e0(S6(l),2),h=f[0],d=new pj({domain:[0,f[1]-(h>0?0:h)],range:[0,o*a]}),p=u.getBandWidth(),y=this.rawData;return{columns:l.map(function(n,i){return n.map(function(n,a){var o=p/l.length;return eZ(eZ({fill:t.getColor(i)},e),r?{x:u.map(a),y:c.map(n),width:p,height:d.map(y[i][a])}:{x:u.map(a)+o*i,y:n>=0?c.map(n):c.map(0),width:o,height:d.map(Math.abs(n))})})})}},enumerable:!1,configurable:!0}),e.prototype.render=function(t,e){(n=".container",!e.querySelector(n)?ht(e).append("rect"):ht(e).select(n)).attr("className","container").node();var n,r=t.type,i=t.x,a=t.y,o="spark".concat(r),l=eZ({x:i,y:a},"line"===r?this.linesStyle:this.columnsStyle);ht(e).selectAll(".spark").data([r]).join(function(t){return t.append(function(t){return"line"===t?new S0({className:o,style:l}):new SJ({className:o,style:l})}).attr("className","spark ".concat(o))},function(t){return t.update(l)},function(t){return t.remove()})},e.prototype.getColor=function(t){var e=this.attributes.color;return ns(e)?e[t%e.length]:nk(e)?e.call(null,t):e},e.prototype.createScales=function(t){var e,n,r=this.attributes,i=r.type,a=r.scale,o=r.range,l=void 0===o?[]:o,s=r.spacing,u=this.containerShape,c=u.width,f=u.height,h=e0(S6(t),2),d=h[0],p=h[1],y=new pj({domain:[null!=(e=l[0])?e:d,null!=(n=l[1])?n:p],range:[f,f*(1-a)]});return"line"===i?{type:i,x:new pj({domain:[0,t[0].length-1],range:[0,c]}),y:y}:{type:i,x:new SZ({domain:t[0].map(function(t,e){return e}),range:[0,c],paddingInner:s,paddingOuter:s/2,align:.5}),y:y}},e.tag="sparkline",e}(f4),S7=function(t){function e(e){var n=t.call(this,e,eZ(eZ(eZ({x:0,y:0,animate:{duration:100,fill:"both"},brushable:!0,formatter:function(t){return t.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},hC(pB,"handle")),hC(pR,"handleIcon")),hC(pD,"handleLabel")))||this;return n.range=[0,1],n.onDragStart=function(t){return function(e){e.stopPropagation(),n.target=t,n.prevPos=n.getOrientVal(pC(e));var r=n.availableSpace,i=r.x,a=r.y,o=n.getBBox(),l=o.x,s=o.y;n.selectionStartPos=n.getRatio(n.prevPos-n.getOrientVal([i,a])-n.getOrientVal([+l,+s])),n.selectionWidth=0,document.addEventListener("pointermove",n.onDragging),document.addEventListener("pointerup",n.onDragEnd)}},n.onDragging=function(t){var e=n.attributes,r=e.slidable,i=e.brushable,a=e.type;t.stopPropagation();var o=n.getOrientVal(pC(t)),l=o-n.prevPos;if(l){var s=n.getRatio(l);switch(n.target){case"start":r&&n.setValuesOffset(s);break;case"end":r&&n.setValuesOffset(0,s);break;case"selection":r&&n.setValuesOffset(s,s);break;case"track":if(!i)return;n.selectionWidth+=s,"range"===a?n.innerSetValues([n.selectionStartPos,n.selectionStartPos+n.selectionWidth].sort(),!0):n.innerSetValues([0,n.selectionStartPos+n.selectionWidth],!0)}n.prevPos=o}},n.onDragEnd=function(){document.removeEventListener("pointermove",n.onDragging),document.removeEventListener("pointermove",n.onDragging),document.removeEventListener("pointerup",n.onDragEnd),n.target="",n.updateHandlesPosition(!1)},n.onValueChange=function(t){var e=n.attributes,r=e.onChange,i=e.type,a="range"===i?t:t[1],o="range"===i?n.getValues():n.getValues()[1],l=new oA("valuechange",{detail:{oldValue:a,value:o}});n.dispatchEvent(l),null==r||r(o)},n.selectionStartPos=0,n.selectionWidth=0,n.prevPos=0,n.target="",n}return eK(e,t),Object.defineProperty(e.prototype,"values",{get:function(){return this.attributes.values},set:function(t){this.attributes.values=this.clampValues(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sparklineStyle",{get:function(){if("horizontal"!==this.attributes.orientation)return null;var t=hT(this.attributes,"sparkline");return eZ(eZ({zIndex:0},this.availableSpace),t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shape",{get:function(){var t=this.attributes,e=t.trackLength,n=t.trackSize,r=e0(this.getOrientVal([[e,n],[n,e]]),2);return{width:r[0],height:r[1]}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"availableSpace",{get:function(){var t=this.attributes,e=e0(di((t.x,t.y,t.padding)),4),n=e[0],r=e[1],i=e[2],a=e[3],o=this.shape;return{x:a,y:n,width:o.width-(a+r),height:o.height-(n+i)}},enumerable:!1,configurable:!0}),e.prototype.getValues=function(){return this.values},e.prototype.setValues=function(t,e){void 0===t&&(t=[0,0]),void 0===e&&(e=!1),this.attributes.values=t;var n=!1!==e&&this.attributes.animate;this.updateSelectionArea(n),this.updateHandlesPosition(n)},e.prototype.updateSelectionArea=function(t){var e=this.calcSelectionArea();this.foregroundGroup.selectAll(pF.selection.class).each(function(n,r){fJ(this,e[r],t)})},e.prototype.updateHandlesPosition=function(t){this.attributes.showHandle&&(this.startHandle&&fJ(this.startHandle,this.getHandleStyle("start"),t),this.endHandle&&fJ(this.endHandle,this.getHandleStyle("end"),t))},e.prototype.innerSetValues=function(t,e){void 0===t&&(t=[0,0]),void 0===e&&(e=!1);var n=this.values,r=this.clampValues(t);this.attributes.values=r,this.setValues(r),e&&this.onValueChange(n)},e.prototype.renderTrack=function(t){var e=this.attributes,n=e.x,r=e.y,i=hT(this.attributes,"track");this.trackShape=ht(t).maybeAppendByClassName(pF.track,"rect").styles(eZ(eZ({x:n,y:r},this.shape),i))},e.prototype.renderBrushArea=function(t){var e=this.attributes,n=e.x,r=e.y,i=e.brushable;this.brushArea=ht(t).maybeAppendByClassName(pF.brushArea,"rect").styles(eZ({x:n,y:r,fill:"transparent",cursor:i?"crosshair":"default"},this.shape))},e.prototype.renderSparkline=function(t){var e=this,n=this.attributes,r=n.x,i=n.y;f6("horizontal"===n.orientation,ht(t).maybeAppendByClassName(pF.sparklineGroup,"g"),function(t){var n=eZ(eZ({},e.sparklineStyle),{x:r,y:i});t.maybeAppendByClassName(pF.sparkline,function(){return new S9({style:n})}).update(n)})},e.prototype.renderHandles=function(){var t,e=this,n=this.attributes,r=n.showHandle,i=n.type,a=this;null==(t=this.foregroundGroup)||t.selectAll(pF.handle.class).data((r?"range"===i?["start","end"]:["end"]:[]).map(function(t){return{type:t}}),function(t){return t.type}).join(function(t){return t.append(function(t){var n=t.type;return new pW({style:e.getHandleStyle(n)})}).each(function(t){var e=t.type;this.attr("class","".concat(pF.handle.name," ").concat(e,"-handle")),a["".concat(e,"Handle")]=this,this.addEventListener("pointerdown",a.onDragStart(e))})},function(t){return t.each(function(t){var e=t.type;this.update(a.getHandleStyle(e))})},function(t){return t.each(function(t){var e=t.type;a["".concat(e,"Handle")]=void 0}).remove()})},e.prototype.renderSelection=function(t){var e=this.attributes,n=e.x,r=e.y,i=e.type,a=e.selectionType;this.foregroundGroup=ht(t).maybeAppendByClassName(pF.foreground,"g");var o=hT(this.attributes,"selection"),l=function(t){return t.style("visibility",function(t){return t.show?"visible":"hidden"}).style("cursor",function(t){return"select"===a?"grab":"invert"===a?"crosshair":"default"}).styles(eZ(eZ({},o),{transform:"translate(".concat(n,", ").concat(r,")")}))},s=this;this.foregroundGroup.selectAll(pF.selection.class).data("value"===i?[]:this.calcSelectionArea().map(function(t,e){return{style:eZ({},t),index:e,show:"select"===a?1===e:1!==e}}),function(t){return t.index}).join(function(t){return t.append("rect").attr("className",pF.selection.name).call(l).each(function(t,e){var n=this;1===e?(s.selectionShape=ht(this),this.on("pointerdown",function(t){n.attr("cursor","grabbing"),s.onDragStart("selection")(t)}),s.dispatchCustomEvent(this,"pointerenter","selectionMouseenter"),s.dispatchCustomEvent(this,"pointerleave","selectionMouseleave"),s.dispatchCustomEvent(this,"click","selectionClick"),this.addEventListener("pointerdown",function(){n.attr("cursor","grabbing")}),this.addEventListener("pointerup",function(){n.attr("cursor","pointer")}),this.addEventListener("pointerover",function(){n.attr("cursor","pointer")})):this.on("pointerdown",s.onDragStart("track"))})},function(t){return t.call(l)},function(t){return t.remove()}),this.updateSelectionArea(!1),this.renderHandles()},e.prototype.render=function(t,e){this.renderTrack(e),this.renderSparkline(e),this.renderBrushArea(e),this.renderSelection(e)},e.prototype.clampValues=function(t,e){void 0===e&&(e=4);var n,r=e0(this.range,2),i=r[0],a=r[1],o=e0(this.getValues().map(function(t){return pP(t,e)}),2),l=o[0],s=o[1],u=e0(((Array.isArray(t)?t:[l,null!=t?t:s])||[l,s]).map(function(t){return pP(t,e)}),2),c=u[0],f=u[1];if("value"===this.attributes.type)return[0,eU(f,i,a)];c>f&&(c=(n=e0([f,c],2))[0],f=n[1]);var h=f-c;return h>a-i?[i,a]:c<i?l===i&&s===f?[i,f]:[i,h+i]:f>a?s===a&&l===c?[c,a]:[a-h,a]:[c,f]},e.prototype.calcSelectionArea=function(t){var e=e0(this.clampValues(t),2),n=e[0],r=e[1],i=this.availableSpace,a=i.x,o=i.y,l=i.width,s=i.height;return this.getOrientVal([[{y:o,height:s,x:a,width:n*l},{y:o,height:s,x:n*l+a,width:(r-n)*l},{y:o,height:s,x:r*l,width:(1-r)*l}],[{x:a,width:l,y:o,height:n*s},{x:a,width:l,y:n*s+o,height:(r-n)*s},{x:a,width:l,y:r*s,height:(1-r)*s}]])},e.prototype.calcHandlePosition=function(t){var e=this.attributes.handleIconOffset,n=this.availableSpace,r=n.x,i=n.y,a=n.width,o=n.height,l=e0(this.clampValues(),2),s=l[0],u=l[1],c=("start"===t?s:u)*this.getOrientVal([a,o])+("start"===t?-e:e);return{x:r+this.getOrientVal([c,a/2]),y:i+this.getOrientVal([o/2,c])}},e.prototype.inferTextStyle=function(t){return"horizontal"===this.attributes.orientation?{}:"start"===t?{transformOrigin:"left center",transform:"rotate(90)",textAlign:"start"}:"end"===t?{transformOrigin:"right center",transform:"rotate(90)",textAlign:"end"}:{}},e.prototype.calcHandleText=function(t){var e,n=this.attributes,r=n.type,i=n.orientation,a=n.formatter,o=n.autoFitLabel,l=hT(this.attributes,"handle"),s=hT(l,"label"),u=l.spacing,c=this.getHandleSize(),f=this.clampValues(),h=a("start"===t?f[0]:f[1]),d=new f9({style:eZ(eZ(eZ({},s),this.inferTextStyle(t)),{text:h})}),p=d.getBBox(),y=p.width,g=p.height;if(d.destroy(),!o){if("value"===r)return{text:h,x:0,y:-g-u};var v=u+c+("horizontal"===i?y/2:0);return(e={text:h})["horizontal"===i?"x":"y"]="start"===t?-v:v,e}var b=0,x=0,O=this.availableSpace,w=O.width,k=O.height,_=this.calcSelectionArea()[1],M=_.x,E=_.y,A=_.width,S=_.height,j=u+c;if("horizontal"===i){var P=j+y/2;b="start"===t?M-j-y>0?-P:P:w-M-A-j>y?P:-P}else{var T=g+j;x="start"===t?E-c>g?-T:j:k-(E+S)-c>g?T:-j}return{x:b,y:x,text:h}},e.prototype.getHandleLabelStyle=function(t){var e=hT(this.attributes,"handleLabel");return eZ(eZ(eZ({},e),this.calcHandleText(t)),this.inferTextStyle(t))},e.prototype.getHandleIconStyle=function(){var t=this.attributes.handleIconShape,e=hT(this.attributes,"handleIcon"),n=this.getOrientVal(["ew-resize","ns-resize"]),r=this.getHandleSize();return eZ({cursor:n,shape:t,size:r},e)},e.prototype.getHandleStyle=function(t){var e=this.attributes,n=e.x,r=e.y,i=e.showLabel,a=e.showLabelOnInteraction,o=e.orientation,l=this.calcHandlePosition(t),s=l.x,u=l.y,c=this.calcHandleText(t),f=i;return!i&&a&&(f=!!this.target),eZ(eZ(eZ({},hC(this.getHandleIconStyle(),"icon")),hC(eZ(eZ({},this.getHandleLabelStyle(t)),c),"label")),{transform:"translate(".concat(s+n,", ").concat(u+r,")"),orientation:o,showLabel:f,type:t,zIndex:3})},e.prototype.getHandleSize=function(){var t=this.attributes,e=t.handleIconSize,n=t.width,r=t.height;return e||Math.floor((this.getOrientVal([+r,+n])+4)/2.4)},e.prototype.getOrientVal=function(t){var e=e0(t,2),n=e[0],r=e[1];return"horizontal"===this.attributes.orientation?n:r},e.prototype.setValuesOffset=function(t,e){void 0===e&&(e=0);var n=this.attributes.type,r=e0(this.getValues(),2),i=[r[0]+("range"===n?t:0),r[1]+e].sort();this.innerSetValues(i,!0)},e.prototype.getRatio=function(t){var e=this.availableSpace,n=e.width,r=e.height;return t/this.getOrientVal([n,r])},e.prototype.dispatchCustomEvent=function(t,e,n){var r=this;t.on(e,function(t){t.stopPropagation(),r.dispatchEvent(new oA(n,{detail:t}))})},e.prototype.bindEvents=function(){this.addEventListener("wheel",this.onScroll);var t=this.brushArea;this.dispatchCustomEvent(t,"click","trackClick"),this.dispatchCustomEvent(t,"pointerenter","trackMouseenter"),this.dispatchCustomEvent(t,"pointerleave","trackMouseleave"),t.on("pointerdown",this.onDragStart("track"))},e.prototype.onScroll=function(t){if(this.attributes.scrollable){var e=t.deltaX,n=t.deltaY,r=this.getRatio(n||e);this.setValuesOffset(r,r)}},e.tag="slider",e}(f4),jt=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let je=t=>{let{orientation:e,labelFormatter:n,size:r,style:i={},position:a}=t,o=jt(t,["orientation","labelFormatter","size","style","position"]);return r=>{var l;let{scales:[s],value:u,theme:c,coordinate:f}=r,{bbox:h}=u,{width:d,height:p}=h,{slider:y={}}=c,g=(null==(l=s.getFormatter)?void 0:l.call(s))||(t=>t+""),v="string"==typeof n?Ex(n):n,b="horizontal"===e,x=fD(f)&&b,{trackSize:O=y.trackSize}=i,[w,k]=function(t,e,n){let{x:r,y:i,width:a,height:o}=t;return"left"===e?[r+a-n,i]:"right"===e||"bottom"===e?[r,i]:"top"===e?[r,i+o-n]:void 0}(h,a,O);return new S7({className:"slider",style:Object.assign({},y,Object.assign(Object.assign({x:w,y:k,trackLength:b?d:p,orientation:e,formatter:t=>(v||g)(gq(s,x?1-t:t,!0)),sparklineData:function(t,e){let{markState:n}=e;return ns(t.sparklineData)?t.sparklineData:function(t,e){let[n]=Array.from(t.entries()).filter(([t])=>"line"===t.type||"area"===t.type||"interval"===t.type).filter(([t])=>t.slider).map(([t])=>{let{encode:n,slider:r}=t;if(null==r?void 0:r.x)return Object.fromEntries(e.map(t=>{let e=n[t];return[t,e?e.value:void 0]}))});return(null==n?void 0:n.series)?Object.values(n.series.reduce((t,e,r)=>(t[e]=t[e]||[],t[e].push(n.y[r]),t),{})):null==n?void 0:n.y}(n,["y","series"])}(t,r)},i),o))})}};je.props={defaultPosition:"bottom",defaultSize:24,defaultOrder:1,defaultCrossPadding:[12,12],defaultPadding:[12,12]};let jn=t=>je(Object.assign(Object.assign({},t),{orientation:"horizontal"}));jn.props=Object.assign(Object.assign({},je.props),{defaultPosition:"bottom"});let jr=t=>je(Object.assign(Object.assign({},t),{orientation:"vertical"}));jr.props=Object.assign(Object.assign({},je.props),{defaultPosition:"left"});var ji=function(t){function e(e){var n=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 n.range=[0,1],n.onValueChange=function(t){var e=n.attributes.value;if(t!==e){var r={detail:{oldValue:t,value:e}};n.dispatchEvent(new oA("scroll",r)),n.dispatchEvent(new oA("valuechange",r))}},n.onTrackClick=function(t){if(n.attributes.slidable){var e=e0(n.getLocalPosition(),2),r=e[0],i=e[1],a=e0(n.padding,4),o=a[0],l=a[3],s=n.getOrientVal([r+l,i+o]),u=(n.getOrientVal(pT(t))-s)/n.trackLength;n.setValue(u,!0)}},n.onThumbMouseenter=function(t){n.dispatchEvent(new oA("thumbMouseenter",{detail:t.detail}))},n.onTrackMouseenter=function(t){n.dispatchEvent(new oA("trackMouseenter",{detail:t.detail}))},n.onThumbMouseleave=function(t){n.dispatchEvent(new oA("thumbMouseleave",{detail:t.detail}))},n.onTrackMouseleave=function(t){n.dispatchEvent(new oA("trackMouseleave",{detail:t.detail}))},n}return eK(e,t),Object.defineProperty(e.prototype,"padding",{get:function(){return di(this.attributes.padding)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){var t=this.attributes.value,e=e0(this.range,2);return eU(t,e[0],e[1])},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"trackLength",{get:function(){var t=this.attributes,e=t.viewportLength,n=t.trackLength;return void 0===n?e:n},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"availableSpace",{get:function(){var t=this.attributes.trackSize,e=this.trackLength,n=e0(this.padding,4),r=n[0],i=n[1],a=n[2],o=n[3],l=e0(this.getOrientVal([[e,t],[t,e]]),2);return{x:o,y:r,width:l[0]-(o+i),height:l[1]-(r+a)}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"trackRadius",{get:function(){var t=this.attributes,e=t.isRound,n=t.trackSize;return e?n/2:0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"thumbRadius",{get:function(){var t=this.attributes,e=t.isRound,n=t.thumbRadius;if(!e)return 0;var r=this.availableSpace,i=r.width,a=r.height;return n||this.getOrientVal([a,i])/2},enumerable:!1,configurable:!0}),e.prototype.getValues=function(t){void 0===t&&(t=this.value);var e=this.attributes,n=e.viewportLength/e.contentLength,r=e0(this.range,2),i=r[0],a=t*(r[1]-i-n);return[a,a+n]},e.prototype.getValue=function(){return this.value},e.prototype.renderSlider=function(t){var e=this.attributes,n=e.x,r=e.y,i=e.orientation,a=e.trackSize,o=e.padding,l=e.slidable,s=hT(this.attributes,"track"),u=hT(this.attributes,"thumb"),c=eZ(eZ({x:n,y:r,brushable:!1,orientation:i,padding:o,selectionRadius:this.thumbRadius,showHandle:!1,slidable:l,trackLength:this.trackLength,trackRadius:this.trackRadius,trackSize:a,values:this.getValues()},hC(s,"track")),hC(u,"selection"));this.slider=ht(t).maybeAppendByClassName("scrollbar",function(){return new S7({style:c})}).update(c).node()},e.prototype.render=function(t,e){this.renderSlider(e)},e.prototype.setValue=function(t,e){void 0===e&&(e=!1);var n=this.attributes.value,r=e0(this.range,2),i=r[0],a=r[1];this.slider.setValues(this.getValues(eU(t,i,a)),e),this.onValueChange(n)},e.prototype.bindEvents=function(){var t=this;this.slider.addEventListener("trackClick",function(e){e.stopPropagation(),t.onTrackClick(e.detail)}),this.onHover()},e.prototype.getOrientVal=function(t){return"horizontal"===this.attributes.orientation?t[0]:t[1]},e.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)},e.tag="scrollbar",e}(f4),ja=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let jo=t=>{let{orientation:e,labelFormatter:n,style:r}=t,i=ja(t,["orientation","labelFormatter","style"]);return({scales:[t],value:n,theme:a})=>{let{bbox:o}=n,{x:l,y:s,width:u,height:c}=o,{scrollbar:f={}}=a,{ratio:h,range:d}=t.getOptions(),p="horizontal"===e?u:c,y=p/h,[g,v]=d;return new ji({className:"g2-scrollbar",style:Object.assign({},f,Object.assign(Object.assign(Object.assign(Object.assign({},r),{x:l,y:s,trackLength:p,value:v>g?0:1}),i),{orientation:e,contentLength:y,viewportLength:p}))})}};jo.props={defaultPosition:"bottom",defaultSize:24,defaultOrder:1,defaultCrossPadding:[12,12],defaultPadding:[12,12]};let jl=t=>jo(Object.assign(Object.assign({},t),{orientation:"horizontal"}));jl.props=Object.assign(Object.assign({},jo.props),{defaultPosition:"bottom"});let js=t=>jo(Object.assign(Object.assign({},t),{orientation:"vertical"}));js.props=Object.assign(Object.assign({},jo.props),{defaultPosition:"left"});let ju=(t,e)=>{let{coordinate:n}=e;return(e,r,i)=>{let[a]=e,{transform:o="",fillOpacity:l=1,strokeOpacity:s=1,opacity:u=1}=a.style,[c,f]=fD(n)?["left bottom","scale(1, 0.0001)"]:["left top","scale(0.0001, 1)"],h=[{transform:`${o} ${f}`.trimStart(),transformOrigin:c,fillOpacity:0,strokeOpacity:0,opacity:0},{transform:`${o} ${f}`.trimStart(),transformOrigin:c,fillOpacity:l,strokeOpacity:s,opacity:u,offset:.01},{transform:`${o} scale(1, 1)`.trimStart(),transformOrigin:c,fillOpacity:l,strokeOpacity:s,opacity:u}];return a.animate(h,Object.assign(Object.assign({},i),t))}},jc=(t,e)=>{let{coordinate:n}=e;return lI({name:"scaleInYRadius",inherits:!1,initialValue:"",interpolable:!0,syntax:rm.NUMBER}),(e,r,i)=>{let[a]=e;return fB(n)?(e=>{let{__data__:r,style:a}=e,{fillOpacity:o=1,strokeOpacity:l=1,opacity:s=1}=a,{points:u,y:c,y1:f}=r,{innerRadius:h,outerRadius:d}=yB(n,u,[c,f]);return e.animate([{scaleInYRadius:h+1e-4,fillOpacity:0,strokeOpacity:0,opacity:0},{scaleInYRadius:h+1e-4,fillOpacity:o,strokeOpacity:l,opacity:s,offset:.01},{scaleInYRadius:d,fillOpacity:o,strokeOpacity:l,opacity:s}],Object.assign(Object.assign({},i),t))})(a):(e=>{let{style:r}=e,{transform:a="",fillOpacity:o=1,strokeOpacity:l=1,opacity:s=1}=r,[u,c]=fD(n)?["left top","scale(0.0001, 1)"]:["left bottom","scale(1, 0.0001)"],f=[{transform:`${a} ${c}`.trimStart(),transformOrigin:u,fillOpacity:0,strokeOpacity:0,opacity:0},{transform:`${a} ${c}`.trimStart(),transformOrigin:u,fillOpacity:o,strokeOpacity:l,opacity:s,offset:.01},{transform:`${a} scale(1, 1)`.trimStart(),transformOrigin:u,fillOpacity:o,strokeOpacity:l,opacity:s}];return e.animate(f,Object.assign(Object.assign({},i),t))})(a)}},jf=(t,e)=>{lI({name:"waveInArcAngle",inherits:!1,initialValue:"",interpolable:!0,syntax:rm.NUMBER});let{coordinate:n}=e;return(r,i,a)=>{let[o]=r;if(!fB(n))return ju(t,e)(r,i,a);let{__data__:l,style:s}=o,{radius:u=0,inset:c=0,fillOpacity:f=1,strokeOpacity:h=1,opacity:d=1}=s,{points:p,y,y1:g}=l,v=vn().cornerRadius(u).padAngle(c*Math.PI/180),b=yB(n,p,[y,g]),{startAngle:x,endAngle:O}=b,w=o.animate([{waveInArcAngle:x+1e-4,fillOpacity:0,strokeOpacity:0,opacity:0},{waveInArcAngle:x+1e-4,fillOpacity:f,strokeOpacity:h,opacity:d,offset:.01},{waveInArcAngle:O,fillOpacity:f,strokeOpacity:h,opacity:d}],Object.assign(Object.assign({},a),t));return w.onframe=function(){o.style.d=v(Object.assign(Object.assign({},b),{endAngle:Number(o.style.waveInArcAngle)}))},w.onfinish=function(){o.style.d=v(Object.assign(Object.assign({},b),{endAngle:O}))},w}};jf.props={};let jh=t=>(e,n,r)=>{let[i]=e,{fillOpacity:a=1,strokeOpacity:o=1,opacity:l=1}=i.style;return i.animate([{fillOpacity:0,strokeOpacity:0,opacity:0},{fillOpacity:a,strokeOpacity:o,opacity:l}],Object.assign(Object.assign({},r),t))};jh.props={};let jd=t=>(e,n,r)=>{let[i]=e,{fillOpacity:a=1,strokeOpacity:o=1,opacity:l=1}=i.style;return i.animate([{fillOpacity:a,strokeOpacity:o,opacity:l},{fillOpacity:0,strokeOpacity:0,opacity:0}],Object.assign(Object.assign({},r),t))};jd.props={};let jp=t=>(e,n,r)=>{var i;let[a]=e,o=(null==(i=a.getTotalLength)?void 0:i.call(a))||0;return a.animate([{lineDash:[0,o]},{lineDash:[o,0]}],Object.assign(Object.assign({},r),t))};jp.props={};let jy={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},jg={[nq.CIRCLE]:["cx","cy","r"],[nq.ELLIPSE]:["cx","cy","rx","ry"],[nq.RECT]:["x","y","width","height"],[nq.IMAGE]:["x","y","width","height"],[nq.LINE]:["x1","y1","x2","y2"],[nq.POLYLINE]:["points"],[nq.POLYGON]:["points"]};function jv(t,e,n=!1){let r={};for(let i of e){let e=t.style[i];e?r[i]=e:n&&(r[i]=jy[i])}return r}let jm=["fill","stroke","fillOpacity","strokeOpacity","opacity","lineWidth"];function jb(t){let{min:e,max:n}=t.getLocalBounds(),[r,i]=e,[a,o]=n;return[r,i,a-r,o-i]}function jx(t,e){let[n,r,i,a]=jb(t),o=Math.ceil(Math.sqrt(e/(a/i))),l=[],s=a/Math.ceil(e/o),u=0,c=e;for(;c>0;){let t=Math.min(c,o),e=i/t;for(let i=0;i<t;i++){let t=n+i*e,a=r+u*s;l.push(function(t){let[e,n,r,i]=t;return`
|
|
2
|
+
M ${e} ${n}
|
|
3
|
+
L ${e+r} ${n}
|
|
4
|
+
L ${e+r} ${n+i}
|
|
5
|
+
L ${e} ${n+i}
|
|
6
|
+
Z
|
|
7
|
+
`}([t,a,e,s]))}c-=t,u+=1}return l}function jO(t,e){t.__data__=e.__data__,t.className=e.className,t.markType=e.markType,e.parentNode.replaceChild(t,e)}function jw(t,e){return t.indexOf(e)===t.lastIndexOf(e)}function jk(t){let e=function(t){var e,n,r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.getLocalTransform(),a=[];switch(t.nodeName){case nq.LINE:var o=t.parsedStyle,l=o.x1,s=o.y1,u=o.x2,c=o.y2;a=[["M",void 0===l?0:l,void 0===s?0:s],["L",void 0===u?0:u,void 0===c?0:c]];break;case nq.CIRCLE:var f=t.parsedStyle,h=f.r,d=void 0===h?0:h,p=f.cx,y=f.cy;a=i5(d,d,void 0===p?0:p,void 0===y?0:y);break;case nq.ELLIPSE:var g=t.parsedStyle,v=g.rx,b=g.ry,x=g.cx,O=g.cy;a=i5(void 0===v?0:v,void 0===b?0:b,void 0===x?0:x,void 0===O?0:O);break;case nq.POLYLINE:case nq.POLYGON:e=t.parsedStyle.points.points,n=t.nodeName===nq.POLYGON,r=e.map(function(t,e){return[0===e?"M":"L",t[0],t[1]]}),n&&r.push(["Z"]),a=r;break;case nq.RECT:var w=t.parsedStyle,k=w.width,_=void 0===k?0:k,M=w.height,E=void 0===M?0:M,A=w.x,S=w.y,j=w.radius;a=function(t,e,n,r,i){if(i){var a=(0,tM.A)(i,4),o=a[0],l=a[1],s=a[2],u=a[3],c=t>0?1:-1,f=e>0?1:-1,h=+(c+f!==0);return[["M",c*o+n,r],["L",t-c*l+n,r],l?["A",l,l,0,0,h,t+n,f*l+r]:null,["L",t+n,e-f*s+r],s?["A",s,s,0,0,h,t+n-c*s,e+r]:null,["L",n+c*u,e+r],u?["A",u,u,0,0,h,n,e+r-f*u]:null,["L",n,f*o+r],o?["A",o,o,0,0,h,c*o+n,r]:null,["Z"]].filter(function(t){return t})}return[["M",n,r],["L",n+t,r],["L",n+t,r+e],["L",n,r+e],["Z"]]}(_,E,void 0===A?0:A,void 0===S?0:S,j&&j.some(function(t){return 0!==t})&&j.map(function(t){return eU(t,0,Math.min(Math.abs(_)/2,Math.abs(E)/2))}));break;case nq.PATH:var P=t.parsedStyle.d.absolutePath;a=(0,tw.A)(P)}if(a.length)return a.reduce(function(t,e){var n="";if("M"===e[0]||"L"===e[0]){var r=tT(e[1],e[2],0);i&&tz(r,r,i),n="".concat(e[0]).concat(r[0],",").concat(r[1])}else if("Z"===e[0])n=e[0];else if("C"===e[0]){var a=tT(e[1],e[2],0),o=tT(e[3],e[4],0),l=tT(e[5],e[6],0);i&&(tz(a,a,i),tz(o,o,i),tz(l,l,i)),n="".concat(e[0]).concat(a[0],",").concat(a[1],",").concat(o[0],",").concat(o[1],",").concat(l[0],",").concat(l[1])}else if("A"===e[0]){var s=tT(e[6],e[7],0);i&&tz(s,s,i),n="".concat(e[0]).concat(e[1],",").concat(e[2],",").concat(e[3],",").concat(e[4],",").concat(e[5],",").concat(s[0],",").concat(s[1])}else if("Q"===e[0]){var u=tT(e[1],e[2],0),c=tT(e[3],e[4],0);i&&(tz(u,u,i),tz(c,c,i)),n="".concat(e[0]).concat(e[1],",").concat(e[2],",").concat(e[3],",").concat(e[4],"}")}return t+n},"")}(t);if(e&&!(!jw(e,"m")||!jw(e,"M")))return e}function j_(t){let{nodeName:e}=t;if("path"===e){let e=cr(t,"attributes");return e.markerEnd||e.markerStart}return!1}function jM(t,e,n,r){let{nodeName:i}=e,{nodeName:a}=n,o=jk(e),l=jk(n),{opacity:s=1,strokeOpacity:u=1,fillOpacity:c=1}=e.style,{opacity:f=1,strokeOpacity:h=1,fillOpacity:d=1}=n.style,p=void 0===o||void 0===l,y=j_(e)||j_(n);if(i===a&&"path"!==i||p||y)return function(t,e,n){let{transform:r}=t.style,{transform:i}=e.style;jO(e,t);let a=jm;if(t.nodeName===nq.GROUP){let[n,i,a,o]=jb(t),[l,s,u,c]=jb(e);r=`translate(${n-l}, ${i-s}) scale(${a/u}, ${o/c})`}else a=a.concat(jg[t.nodeName]||[]);let o=[Object.assign({transform:null!=r?r:"none"},jv(t,a,!0)),Object.assign({transform:null!=i?i:"none"},jv(e,a,!0))];return e.animate(o,n)}(e,n,r);let g=function(t,e){let{nodeName:n}=t;if("path"===n)return t;let r=new lE({style:Object.assign(Object.assign({},jv(t,jm)),{d:e})});return jO(r,t),r}(t,o),v=Object.assign(Object.assign({},jv(e,jm)),{opacity:s,strokeOpacity:u,fillOpacity:c}),b=Object.assign(Object.assign({},jv(n,jm)),{opacity:f,strokeOpacity:h,fillOpacity:d}),x=[v,b];if(o!==l){x[0].d=o,x[1].d=l;let t=g.animate(x,r);return t.onfinish=()=>{c$(g,n),g.style.d=l,g.style.transform="none"},g.style.transform="none",t}return f_(v,b)?null:g.animate(x,r)}let jE=t=>(e,n,r)=>{let i=function(t="pack"){return"function"==typeof t?t:jx}(t.split),a=Object.assign(Object.assign({},r),t),{length:o}=e,{length:l}=n;if(1===o&&1===l||o>1&&l>1){let[t]=e,[r]=n;return jM(t,t,r,a)}if(1===o&&l>1){let t,[r]=e;return r.style.visibility="hidden",t=i(r,n.length),n.map((e,n)=>jM(e,new lE({style:Object.assign({d:t[n]},jv(r,jm))}),e,a))}if(o>1&&1===l){let[t]=n;return function(t,e,n,r){let i=r(e,t.length),{fillOpacity:a=1,strokeOpacity:o=1,opacity:l=1}=e.style,s=e.animate([{fillOpacity:0,strokeOpacity:0,opacity:0},{fillOpacity:0,strokeOpacity:0,opacity:0,offset:.99},{fillOpacity:a,strokeOpacity:o,opacity:l}],n);return[...t.map((t,r)=>jM(t,t,new lE({style:{d:i[r],fill:e.style.fill}}),n)),s]}(e,t,a,i)}return null};jE.props={};let jA=(t,e)=>(n,r,i)=>{let[a]=n,{min:[o,l],halfExtents:s}=a.getLocalBounds(),u=2*s[0],c=2*s[1],f=new lE({style:{d:`M${o},${l}L${o+u},${l}L${o+u},${l+c}L${o},${l+c}Z`}});return a.appendChild(f),a.style.clipPath=f,ju(t,e)([f],r,i)};jA.props={};let jS=(t,e)=>(n,r,i)=>{let[a]=n,{min:[o,l],halfExtents:s}=a.getLocalBounds(),u=2*s[0],c=2*s[1],f=new lE({style:{d:`M${o},${l}L${o+u},${l}L${o+u},${l+c}L${o},${l+c}Z`}});return a.appendChild(f),a.style.clipPath=f,jc(t,e)([f],r,i)};jS.props={};var jj=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function jP(t){var{delay:e,createGroup:n,createRegionGroup:r,background:i=!1,link:a=!1}=t,o=jj(t,["delay","createGroup","createRegionGroup","background","link"]);return(t,l,s)=>{let{container:u,view:c,options:f}=t,{scale:h,coordinate:d}=c;return function(t,{elements:e,datum:n,groupKey:r=t=>t,regionGroupKey:i=t=>t,link:a=!1,background:o=!1,delay:l=60,scale:s,coordinate:u,emitter:c,state:f={},region:h=!1,regionEleFilter:d=t=>vF.includes(t.markType)}){var p,y;let g,v=null!=(p=e(t))?p:[],b=h?v.filter(d):v,x=new Set(b),O=h?i:r,w=cs(b,O),k=vz({elementsof:e,root:t,coordinate:u,scale:s}),_=vj(b,n),[M,E]=vP(Object.assign({elements:b,valueof:_,link:a,coordinate:u},cG(f.active,"link"))),[A,S,j]=vC(Object.assign({document:t.ownerDocument,scale:s,coordinate:u,background:o,valueof:_},cG(f.active,"background"))),{updateState:P,removeState:T,hasState:C}=vM(cy(f,{active:Object.assign({},(null==(y=f.active)?void 0:y.offset)&&{transform:(...t)=>{let e=f.active.offset(...t),[,n]=t;return vT(b[n],e,u)}})}),b)(_),N=t=>{let{nativeEvent:e=!0}=t,r=t.target;if(h&&(r=k(t)),!x.has(r))return;g&&clearTimeout(g);let i=O(r),a=w.get(i),o=new Set(a);for(let t of b)o.has(t)?C(t,"active")||P(t,"active"):(P(t,"inactive"),E(t)),t!==r&&S(t);A(r),M(a),e&&c.emit("element:highlight",{nativeEvent:e,data:{data:n(r),group:a.map(n)}})},L=()=>{g&&clearTimeout(g),g=setTimeout(()=>{I(),g=null},l)},I=(t=!0)=>{for(let t of b)T(t,"active","inactive"),S(t),E(t);t&&c.emit("element:unhighlight",{nativeEvent:t})},R=t=>{let e=t.target;(h&&(e=k(t)),e)?o&&!j(e)||(o||x.has(e))&&(l>0?L():I()):l>0?L():I()},D=()=>{I()};t.addEventListener("pointerover",N),t.addEventListener("pointermove",N),t.addEventListener("pointerout",R),t.addEventListener("pointerleave",D);let B=t=>{let{nativeEvent:e}=t;e||I(!1)},F=t=>{let{nativeEvent:e}=t;if(e)return;let{data:r}=t.data,i=vL(b,r,n);i&&N({target:i,nativeEvent:!1})};return c.on("element:highlight",F),c.on("element:unhighlight",B),()=>{for(let e of(t.removeEventListener("pointerover",N),t.removeEventListener("pointermove",N),t.removeEventListener("pointerout",R),t.removeEventListener("pointerleave",D),c.off("element:highlight",F),c.off("element:unhighlight",B),b))S(e),E(e)}}(vy(u),Object.assign({elements:vh,datum:vO(c),groupKey:n?n(c):void 0,regionGroupKey:r?r(c):vx(c),coordinate:d,scale:h,state:vS(f,[["active",i?{}:{lineWidth:"1",stroke:"#000"}],"inactive"]),background:i,link:a,delay:e,emitter:s},o))}}function jT(t){return jP(Object.assign(Object.assign({},t),{createGroup:vx}))}function jC(t){return jP(Object.assign(Object.assign({},t),{createGroup:vb}))}jP.props={reapplyWhenUpdate:!0},jT.props={reapplyWhenUpdate:!0},jC.props={reapplyWhenUpdate:!0};var jN=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function jL(t){var{delay:e,createGroup:n,scale:r,scaleOrigin:i,shadow:a,shadowColor:o,shadowBlur:l,shadowOffsetX:s,shadowOffsetY:u,zIndex:c}=t,f=jN(t,["delay","createGroup","scale","scaleOrigin","shadow","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","zIndex"]);return(t,h,d)=>{let{container:p,view:y,options:g}=t,v=vy(p),b=vO(y);return function(t,{elements:e,datum:n,groupKey:r=t=>t,scaleFactor:i=1.04,scaleOrigin:a="center center",shadow:o=!0,shadowColor:l="rgba(0, 0, 0, 0.4)",shadowBlur:s=10,shadowOffsetX:u=0,shadowOffsetY:c=2,zIndex:f=10,delay:h=60,emitter:d,state:p={}}){let y,g=()=>{var n;return null!=(n=e(t))?n:[]},v=g(),b=vj(v,n),{updateState:x,removeState:O,hasState:w}=vM(cy(p,{active:{}}),v)(b),k=new Map,_=new Set,M=t=>{let e;if(_.has(t))return;let n=t.style.transform||"",r=t.style.transformOrigin||"";k.set(t,{transform:n,transformOrigin:r,zIndex:t.style.zIndex||0,shadowColor:t.style.shadowColor||"",shadowBlur:t.style.shadowBlur||0,shadowOffsetX:t.style.shadowOffsetX||0,shadowOffsetY:t.style.shadowOffsetY||0});let h=n&&"none"!==n?n:"",d=`scale(${i})`;e=h&&!h.includes("scale")?`${h} ${d}`.trimStart():h&&h.includes("scale")?h.replace(/scale\([^)]+\)/g,d).trimStart():d,t.style.transformOrigin=a,t.style.transform=e,t.style.zIndex=f,o&&(t.style.shadowColor=l,t.style.shadowBlur=s,t.style.shadowOffsetX=u,t.style.shadowOffsetY=c),_.add(t)},E=t=>{let e=k.get(t);e&&(t.style.transform=e.transform,t.style.transformOrigin=e.transformOrigin,t.style.zIndex=e.zIndex,t.style.shadowColor=e.shadowColor,t.style.shadowBlur=e.shadowBlur,t.style.shadowOffsetX=e.shadowOffsetX,t.style.shadowOffsetY=e.shadowOffsetY,_.delete(t),k.delete(t))},A=t=>{let{nativeEvent:e=!0}=t,i=t.target,a=g();if(!new Set(a).has(i))return;y&&clearTimeout(y);let o=cs(a,r),l=r(i),s=o.get(l);if(!s)return;let u=new Set(s);for(let t of a)u.has(t)||(O(t,"active"),E(t));for(let t of s)w(t,"active")||x(t,"active"),M(t);e&&d.emit("element:hoverscale",{nativeEvent:e,data:{data:n(i),group:s.map(n)}})},S=(t=!0)=>{for(let t of g())O(t,"active"),E(t);_.clear(),t&&d.emit("element:unhoverscale",{nativeEvent:t})},j=t=>{h>0?(y&&clearTimeout(y),y=setTimeout(()=>{S(),y=null},h)):S()},P=()=>{S()};t.addEventListener("pointerover",A),t.addEventListener("pointermove",A),t.addEventListener("pointerout",j),t.addEventListener("pointerleave",P);let T=t=>{let{nativeEvent:e}=t;e||S(!1)},C=t=>{let{nativeEvent:e}=t;if(e)return;let{data:r}=t.data,i=vL(g(),r,n);i&&A({target:i,nativeEvent:!1})};return d.on("element:hoverscale",C),d.on("element:unhoverscale",T),()=>{for(let e of(t.removeEventListener("pointerover",A),t.removeEventListener("pointermove",A),t.removeEventListener("pointerout",j),t.removeEventListener("pointerleave",P),d.off("element:hoverscale",C),d.off("element:unhoverscale",T),g()))E(e);k.clear(),_.clear()}}(v,Object.assign({elements:vh,datum:b,groupKey:n?t=>n(y)(b(t)):void 0,state:vS(g,["active"]),scaleFactor:r,scaleOrigin:i,shadow:a,shadowColor:o,shadowBlur:l,shadowOffsetX:s,shadowOffsetY:u,zIndex:c,delay:e,emitter:d},f))}}jL.props={reapplyWhenUpdate:!0};var jI=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function jR(t){var{createGroup:e,createRegionGroup:n,background:r=!1,link:i=!1}=t,a=jI(t,["createGroup","createRegionGroup","background","link"]);return(t,o,l)=>{let{container:s,view:u,options:c}=t,{coordinate:f,scale:h}=u;return function(t,{elements:e,datum:n,groupKey:r=t=>t,regionGroupKey:i=t=>t,link:a=!1,single:o=!1,multipleSelectHotkey:l,coordinate:s,background:u=!1,scale:c,emitter:f,state:h={},region:d=!1,regionEleFilter:p=t=>vF.includes(t.markType)}){var y;let g=e(t),v=new Set(g),b=vz({elementsof:e,root:t,coordinate:s,scale:c}),x=cs(g,r),O=cs(g,i),w=vj(g,n),[k,_]=vP(Object.assign({link:a,elements:g,valueof:w,coordinate:s},cG(h.selected,"link"))),[M,E]=vC(Object.assign({document:t.ownerDocument,background:u,coordinate:s,scale:c,valueof:w},cG(h.selected,"background"))),{updateState:A,removeState:S,hasState:j}=vM(cy(h,{selected:Object.assign({},(null==(y=h.selected)?void 0:y.offset)&&{transform:(...t)=>{let e=h.selected.offset(...t),[,n]=t;return vT(g[n],e,s)}})}),g)(w),P=!o,T=null,C=(t=!0)=>{for(let t of g)S(t,"selected","unselected"),_(t),E(t);t&&f.emit("element:unselect",{nativeEvent:!0})},N=({event:t,element:e,nativeEvent:i=!0,filter:a=t=>!0,groupBy:o=r,groupMap:l=x})=>{let s=g.filter(a);if(j(e,"selected"))C();else{let r=o(e),a=l.get(r),u=new Set(a);for(let t of s)u.has(t)?A(t,"selected"):(A(t,"unselected"),_(t)),t!==e&&E(t);if(k(a),M(e),!i)return;f.emit("element:select",Object.assign(Object.assign({},t),{nativeEvent:i,data:{data:[n(e),...a.map(n)]}}))}},L=({event:t,element:e,nativeEvent:i=!0,filter:o=t=>!0,groupBy:l=r,groupMap:s=x})=>{let u=l(e),c=s.get(u),h=new Set(c),d=g.filter(o);if(j(e,"selected")){if(!g.some(t=>!h.has(t)&&j(t,"selected")))return C();for(let t of c)A(t,"unselected"),_(t),E(t)}else{let t=c.some(t=>j(t,"selected"));for(let t of d)h.has(t)?A(t,"selected"):j(t,"selected")||A(t,"unselected");!t&&a&&k(c),M(e)}i&&f.emit("element:select",Object.assign(Object.assign({},t),{nativeEvent:i,data:{data:g.filter(t=>j(t,"selected")).map(n)}}))},I=t=>{let{target:e,nativeEvent:n=!0}=t,a=P?L:N,o=e,l=(t=>{if(v.has(t))return!0;for(let e of v)if(vo(e,e=>e===t))return!0;return!1})(e);return!d||l?l?a({event:t,element:(t=>{if(v.has(t))return t;for(let e of v){let n=null;if(vo(e,r=>{r===t&&(n=e)}),n)return n}return t})(o),nativeEvent:n,groupBy:r}):C():(o=b(t),v.has(o))?a({event:t,element:o,nativeEvent:n,filter:p,groupBy:i,groupMap:O}):C()},R=Array.isArray(l)?l:[l],D=t=>{R.includes(t.code)&&!T&&(T=t.code,P=!0)},B=t=>{t.code===T&&(T=null,P=!1)};t.addEventListener("click",I),l&&(P=!1,document.addEventListener("keydown",D),document.addEventListener("keyup",B));let F=t=>{let{nativeEvent:e,data:r}=t;if(!e)for(let t of P?r.data:r.data.slice(0,1))I({target:vL(g,t,n),nativeEvent:!1})},z=()=>{C(!1)};return f.on("element:select",F),f.on("element:unselect",z),()=>{for(let t of g)_(t);t.removeEventListener("click",I),l&&(document.removeEventListener("keydown",D),document.removeEventListener("keyup",B)),f.off("element:select",F),f.off("element:unselect",z)}}(vy(s),Object.assign({elements:vh,datum:vO(u),groupKey:e?e(u):void 0,regionGroupKey:n?n(u):vx(u),coordinate:f,scale:h,state:vS(c,[["selected",r?{}:{lineWidth:"1",stroke:"#000"}],"unselected"]),background:r,link:i,emitter:l},a))}}function jD(t){return jR(Object.assign(Object.assign({},t),{createGroup:vx}))}function jB(t){return jR(Object.assign(Object.assign({},t),{createGroup:vb}))}jR.props={reapplyWhenUpdate:!0},jD.props={reapplyWhenUpdate:!0},jB.props={reapplyWhenUpdate:!0};var jF=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function jz(t){var{wait:e=20,leading:n,trailing:r=!1,labelFormatter:i=t=>`${t}`}=t,a=jF(t,["wait","leading","trailing","labelFormatter"]);return t=>{let o,{view:l,container:s,update:u,setState:c}=t,{markState:f,scale:h,coordinate:d}=l,p=function(t,e,n){let[r]=Array.from(t.entries()).filter(([t])=>t.type===e).map(([t])=>{let{encode:e}=t;return Object.fromEntries(n.map(t=>{let n=e[t];return[t,n?n.value:void 0]}))});return r}(f,"line",["x","y","series"]);if(!p)return;let{y:y,x:g,series:v=[]}=p,b=y.map((t,e)=>e),x=gc(b.map(t=>g[t])),O=vy(s),w=s.getElementsByClassName(gM),k=cs(s.getElementsByClassName("label"),t=>t.__data__.key.split("-")[0]),_=new l_({style:Object.assign({x1:0,y1:0,x2:0,y2:O.getAttribute("height"),stroke:"black",lineWidth:1},cG(a,"rule"))}),M=new lN({style:Object.assign({x:0,y:O.getAttribute("height"),text:"",fontSize:10},cG(a,"label"))});_.append(M),O.appendChild(_);let E=(t,e,n)=>{let[r]=t.invert(n);return x[gW(x,e.invert(r))]},A=(t,e)=>{_.setAttribute("x1",t[0]),_.setAttribute("x2",t[0]),M.setAttribute("text",i(e))},S=t=>{var e,n,r,i;return e=this,n=void 0,r=void 0,i=function*(){let{x:e}=h,n=E(d,e,t);A(t,n),c("chartIndex",t=>{let e=cy({},t),r=e.marks.find(t=>"line"===t.type),i=fE(cc(b,t=>fE(t,t=>+y[t])/xO(t,t=>+y[t]),t=>v[t]).values());cy(r,{scale:{y:{domain:[1/i,i]}}});let a=function(t){let{transform:e=[]}=t,n=e.find(t=>"normalizeY"===t.type);if(n)return n;let r={type:"normalizeY"};return e.push(r),t.transform=e,r}(r);for(let t of(a.groupBy="color",a.basis=(t,e)=>e[t[gI(t=>g[+t]).center(t,n)]],e.marks))t.animate=!1;return e}),o=(yield u("chartIndex")).view},new(r||(r=Promise))(function(t,a){function o(t){try{s(i.next(t))}catch(t){a(t)}}function l(t){try{s(i.throw(t))}catch(t){a(t)}}function s(e){var n;e.done?t(e.value):((n=e.value)instanceof r?n:new r(function(t){t(n)})).then(o,l)}s((i=i.apply(e,n||[])).next())})},j=Oa(t=>{let e=vv(O,t);e&&(t=>{let{scale:e,coordinate:n}=o,{x:r,y:i}=e,a=E(n,r,t);for(let e of(A(t,a),w)){let{seriesIndex:t,key:r}=e.__data__,o=t[gI(t=>g[+t]).center(t,a)],l=[0,i.map(1)],s=[0,i.map(y[o]/y[t[0]])],[,u]=n.map(l),[,c]=n.map(s),f=u-c;for(let t of(e.setAttribute("transform",`translate(0, ${f})`),k.get(r)||[]))t.setAttribute("dy",f)}})(e)},e,{leading:n,trailing:r});return S([0,0]),O.addEventListener("pointerenter",j),O.addEventListener("pointermove",j),O.addEventListener("pointerleave",j),()=>{_.remove(),O.removeEventListener("pointerenter",j),O.removeEventListener("pointermove",j),O.removeEventListener("pointerleave",j)}}}jz.props={reapplyWhenUpdate:!0};var j$=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function jW(t,e){for(let[n,r]of Object.entries(e))t.style(n,r)}let jG=y5(t=>{let e=t.attributes,{x:n,y:r,width:i,height:a,class:o,renders:l={},handleSize:s=10,document:u}=e,c=j$(e,["x","y","width","height","class","renders","handleSize","document"]);if(!u||void 0===i||void 0===a||void 0===n||void 0===r)return;let f=s/2,h=(t,e,n)=>{t.handle||(t.handle=n.createElement("rect"),t.append(t.handle));let{handle:r}=t;return r.attr(e),r},d=cG(cH(c,"handleNW","handleNE"),"handleN"),{render:p=h}=d,y=j$(d,["render"]),g=cG(c,"handleE"),{render:v=h}=g,b=j$(g,["render"]),x=cG(cH(c,"handleSE","handleSW"),"handleS"),{render:O=h}=x,w=j$(x,["render"]),k=cG(c,"handleW"),{render:_=h}=k,M=j$(k,["render"]),E=cG(c,"handleNW"),{render:A=h}=E,S=j$(E,["render"]),j=cG(c,"handleNE"),{render:P=h}=j,T=j$(j,["render"]),C=cG(c,"handleSE"),{render:N=h}=C,L=j$(C,["render"]),I=cG(c,"handleSW"),{render:R=h}=I,D=j$(I,["render"]),B=t=>()=>new(y5(e=>((t,e)=>{let{id:n}=t,r=e(t,t.attributes,u);r.id=n,r.style.draggable=!0})(e,t)))({}),F=cX(t).attr("className",o).style("transform",`translate(${n}, ${r})`).style("draggable",!0);F.maybeAppend("selection","rect").style("draggable",!0).style("fill","transparent").call(jW,Object.assign(Object.assign({width:i,height:a},cH(c,"handle")),{transform:void 0})),F.maybeAppend("handle-n",B(p)).style("x",f).style("y",-f).style("width",i-s).style("height",s).style("fill","transparent").call(jW,y),F.maybeAppend("handle-e",B(v)).style("x",i-f).style("y",f).style("width",s).style("height",a-s).style("fill","transparent").call(jW,b),F.maybeAppend("handle-s",B(O)).style("x",f).style("y",a-f).style("width",i-s).style("height",s).style("fill","transparent").call(jW,w),F.maybeAppend("handle-w",B(_)).style("x",-f).style("y",f).style("width",s).style("height",a-s).style("fill","transparent").call(jW,M),F.maybeAppend("handle-nw",B(A)).style("x",-f).style("y",-f).style("width",s).style("height",s).style("fill","transparent").call(jW,S),F.maybeAppend("handle-ne",B(P)).style("x",i-f).style("y",-f).style("width",s).style("height",s).style("fill","transparent").call(jW,T),F.maybeAppend("handle-se",B(N)).style("x",i-f).style("y",a-f).style("width",s).style("height",s).style("fill","transparent").call(jW,L),F.maybeAppend("handle-sw",B(R)).style("x",-f).style("y",a-f).style("width",s).style("height",s).style("fill","transparent").call(jW,D)});function jq(t,e){var{brushed:n=()=>{},brushended:r=()=>{},brushcreated:i=()=>{},brushstarted:a=()=>{},brushupdated:o=()=>{},extent:l=function(t){let{width:e,height:n}=t.getBBox();return[0,0,e,n]}(t),brushRegion:s=(t,e,n,r,i)=>[t,e,n,r],reverse:u=!1,fill:c="#777",fillOpacity:f="0.3",stroke:h="#fff",selectedHandles:d=["handle-n","handle-e","handle-s","handle-w","handle-nw","handle-ne","handle-se","handle-sw"]}=e,p=j$(e,["brushed","brushended","brushcreated","brushstarted","brushupdated","extent","brushRegion","reverse","fill","fillOpacity","stroke","selectedHandles"]);let y=null,g=null,v=null,b=null,x=null,O=!1,[w,k,_,M]=l;vN(t,"crosshair"),t.style.draggable=!0;let E=(t,e,n)=>{if(a(n),b&&b.remove(),x&&x.remove(),y=[t,e],u)return A();S()},A=()=>{x=new lE({style:Object.assign(Object.assign({},p),{fill:c,fillOpacity:f,stroke:h,pointerEvents:"none"})}),b=new jG({style:{x:0,y:0,width:0,height:0,draggable:!0,document:t.ownerDocument},className:"mask"}),t.appendChild(x),t.appendChild(b)},S=()=>{b=new jG({style:Object.assign(Object.assign({document:t.ownerDocument,x:0,y:0},p),{fill:c,fillOpacity:f,stroke:h,draggable:!0}),className:"mask"}),t.appendChild(b)},j=(t=!0)=>{b&&b.remove(),x&&x.remove(),y=null,g=null,v=null,O=!1,b=null,x=null,r(t)},P=(t,e,r=!0)=>{let[i,a,o,c]=function(t,e,n,r,i){let[a,o,l,s]=i;return[Math.max(a,Math.min(t,n)),Math.max(o,Math.min(e,r)),Math.min(l,Math.max(t,n)),Math.min(s,Math.max(e,r))]}(t[0],t[1],e[0],e[1],l),[f,h,d,p]=s(i,a,o,c,l);return u?C(f,h,d,p):T(f,h,d,p),n(f,h,d,p,r),[f,h,d,p]},T=(t,e,n,r)=>{b.style.x=t,b.style.y=e,b.style.width=n-t,b.style.height=r-e},C=(t,e,n,r)=>{x.style.d=`
|
|
8
|
+
M${w},${k}L${_},${k}L${_},${M}L${w},${M}Z
|
|
9
|
+
M${t},${e}L${t},${r}L${n},${r}L${n},${e}Z
|
|
10
|
+
`,b.style.x=t,b.style.y=e,b.style.width=n-t,b.style.height=r-e},N={"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"}},L=t=>R(t)||I(t),I=t=>{let{id:e}=t;return -1!==d.indexOf(e)&&new Set(Object.keys(N)).has(e)},R=t=>t===b.getElementById("selection"),D=e=>{let{target:n}=e,[r,i]=vm(t,e);if(!b||!L(n)){E(r,i,e),O=!0;return}L(n)&&(v=[r,i])},B=e=>{let{target:n}=e,r=vm(t,e);if(!y)return;if(!v)return P(y,r);if(R(n)){let t,e,n,i,a;return t=(t,e,n,r,i)=>t+e<r?r-e:t+n>i?i-n:t,e=r[0]-v[0],n=r[1]-v[1],i=t(e,y[0],g[0],w,_),a=t(n,y[1],g[1],k,M),void P([y[0]+i,y[1]+a],[g[0]+i,g[1]+a])}let[i,a]=[r[0]-v[0],r[1]-v[1]],{id:o}=n;if(N[o]){let[t,e,n,r]=N[o].vector;return P([y[0]+i*t,y[1]+a*e],[g[0]+i*n,g[1]+a*r])}},F=e=>{if(v){v=null;let{x:t,y:n,width:r,height:i}=b.style;y=[t,n],g=[t+r,n+i],o(t,n,t+r,n+i,e);return}g=vm(t,e);let[n,r,a,l]=P(y,g);O=!1,i(n,r,a,l,e)},z=t=>{let{target:e}=t;b&&!L(e)&&j()},$=e=>{let{target:n}=e;b&&L(n)&&!O?R(n)?vN(t,"move"):I(n)&&vN(t,N[n.id].cursor):vN(t,"crosshair")},W=()=>{vN(t,"default")};return t.addEventListener("dragstart",D),t.addEventListener("drag",B),t.addEventListener("dragend",F),t.addEventListener("click",z),t.addEventListener("pointermove",$),t.addEventListener("pointerleave",W),{mask:b,move(t,e,n,r,i=!0){b||E(t,e,{}),y=[t,e],g=[n,r],P([t,e],[n,r],i)},remove(t=!0){b&&j(t)},destroy(){b&&j(!1),vN(t,"default"),t.removeEventListener("dragstart",D),t.removeEventListener("drag",B),t.removeEventListener("dragend",F),t.removeEventListener("click",z),t.removeEventListener("pointermove",$),t.removeEventListener("pointerleave",W)}}}function jH(t,e,n){return e.filter(e=>{if(e===t)return!1;let{interaction:r={}}=e.options;return Object.values(r).find(t=>t.brushKey===n)})}function jY(t,e){var{elements:n,selectedHandles:r,siblings:i=t=>[],datum:a,brushRegion:o,extent:l,reverse:s,scale:u,coordinate:c,series:f=!1,key:h=t=>t,bboxOf:d=t=>{let{x:e,y:n,width:r,height:i}=t.style;return{x:e,y:n,width:r,height:i}},state:p={},emitter:y}=e,g=j$(e,["elements","selectedHandles","siblings","datum","brushRegion","extent","reverse","scale","coordinate","series","key","bboxOf","state","emitter"]);let v=n(t),b=i(t),x=b.flatMap(n),O=vj(v,a),w=cG(g,"mask"),{setState:k,removeState:_}=vE(p,O),M=new Map,{width:E,height:A,x:S=0,y:j=0}=d(t),P=jq(t,Object.assign(Object.assign({},w),{extent:l||[0,0,E,A],brushRegion:o,reverse:s,selectedHandles:r,brushended:t=>{t&&y.emit("brush:remove",{nativeEvent:!0}),(f?()=>{for(let t of v)_(t,"inactive");for(let t of M.values())t.remove();M.clear()}:()=>{for(let t of[...v,...x])_(t,"active","inactive")})()},brushed:(e,n,r,i,a)=>{let o=gY(e,n,r,i,u,c);a&&y.emit("brush:highlight",{nativeEvent:!0,data:{selection:o}}),(f?(e,n,r,i)=>{let a=t=>{let e=t.cloneNode();return e.__data__=t.__data__,t.parentNode.appendChild(e),M.set(t,e),e},o=new lT({style:{x:e+S,y:n+j,width:r-e,height:i-n}});for(let e of(t.appendChild(o),v)){let t=M.get(e)||a(e);t.style.clipPath=o,k(e,"inactive"),k(t,"active")}}:(t,e,n,r)=>{var i;for(let t of b)null==(i=t.brush)||i.remove();let a=new Set;for(let i of v){let{min:o,max:l}=i.getLocalBounds(),[s,u]=o,[c,f]=l;!function(t,e){let[n,r,i,a]=t,[o,l,s,u]=e;return!(o>i||s<n||l>a||u<r)}([s,u,c,f],[t,e,n,r])?k(i,"inactive"):(k(i,"active"),a.add(h(i)))}for(let t of x)a.has(h(t))?k(t,"active"):k(t,"inactive")})(e,n,r,i)},brushcreated:(t,e,n,r,i)=>{let a=gY(t,e,n,r,u,c);y.emit("brush:end",Object.assign(Object.assign({},i),{nativeEvent:!0,data:{selection:a}}))},brushupdated:(t,e,n,r,i)=>{let a=gY(t,e,n,r,u,c);y.emit("brush:end",Object.assign(Object.assign({},i),{nativeEvent:!0,data:{selection:a}}))},brushstarted:t=>{y.emit("brush:start",t)}})),T=({nativeEvent:t,data:e})=>{if(t)return;let{selection:n}=e,[r,i,a,o]=function(t,e,n){let{x:r,y:i}=e,[a,o]=t,l=gV(a,r),s=gV(o,i),u=[l[0],s[0]],c=[l[1],s[1]],[f,h]=n.map(u),[d,p]=n.map(c);return[f,h,d,p]}(n,u,c);P.move(r,i,a,o,!1)};y.on("brush:highlight",T);let C=({nativeEvent:t}={})=>{t||P.remove(!1)};y.on("brush:remove",C);let N=P.destroy.bind(P);return P.destroy=()=>{y.off("brush:highlight",T),y.off("brush:remove",C),N()},P}function jV(t){var{facet:e,brushKey:n}=t,r=j$(t,["facet","brushKey"]);return(t,i,a)=>{let{container:o,view:l,options:s}=t,u=vy(o),c={maskFill:"#777",maskFillOpacity:"0.3",maskStroke:"#fff",reverse:!1},f=["active",["inactive",{opacity:.5}]],{scale:h,coordinate:d}=l;if(e){let e=u.getBounds(),n=e.min[0],o=e.min[1],l=e.max[0],s=e.max[1];return jY(u.parentNode.parentNode,Object.assign(Object.assign({elements:()=>vd(t,i),datum:vO(vp(t,i).map(t=>t.view)),brushRegion:(t,e,n,r)=>[t,e,n,r],extent:[n,o,l,s],state:vS(vp(t,i).map(t=>t.options),f),emitter:a,scale:h,coordinate:d,selectedHandles:void 0},c),r))}let p=jY(u,Object.assign(Object.assign({elements:vh,key:t=>t.__data__.key,siblings:()=>jH(t,i,n).map(t=>vy(t.container)),datum:vO([l,...jH(t,i,n).map(t=>t.view)]),brushRegion:(t,e,n,r)=>[t,e,n,r],extent:void 0,state:vS([s,...jH(t,i,n).map(t=>t.options)],f),emitter:a,scale:h,coordinate:d,selectedHandles:void 0},c),r));return u.brush=p,()=>p.destroy()}}function jU(t,e,n,r,i){let[,a,,o]=i;return[t,a,n,o]}function jX(t,e,n,r,i){let[a,,o]=i;return[a,e,o,r]}jV.props={reapplyWhenUpdate:!0};var jK=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let jZ="axis-hot-area";function jQ(t){return t.getElementsByClassName("axis")}function jJ(t){return t.getElementsByClassName("axis-line")[0]}function j0(t){return t.getElementsByClassName("axis-main-group")[0].getLocalBounds()}var j1=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function j2(t){var{hideX:e=!0,hideY:n=!0}=t,r=j1(t,["hideX","hideY"]);return(t,i,a)=>{let{container:o,view:l,options:s,update:u,setState:c}=t,f=vy(o),h=!1,d=!1,p=l,{scale:y,coordinate:g}=l;return function(t,e){var{filter:n,reset:r,brushRegion:i,extent:a,reverse:o,emitter:l,scale:s,coordinate:u,selection:c,series:f=!1}=e;let h=cG(j1(e,["filter","reset","brushRegion","extent","reverse","emitter","scale","coordinate","selection","series"]),"mask"),{width:d,height:p}=t.getBBox(),y=function(t=300){let e=null;return n=>{let{timeStamp:r}=n;return null!==e&&r-e<t?(e=r,!0):(e=r,!1)}}(),g=jq(t,Object.assign(Object.assign({},h),{extent:a||[0,0,d,p],brushRegion:i,reverse:o,brushcreated:function(t,e,r,i,a){(t!==r||e!==i)&&(a.nativeEvent=!0,n(c(t,e,r,i),a),g.remove())}}));function v(t){y(t)&&(t.nativeEvent=!0,r(t))}t.addEventListener("click",v);let b=({nativeEvent:t,data:e})=>{if(t)return;let{selection:r}=e;n(r,{nativeEvent:!1})};return l.on("brush:filter",b),()=>{g.destroy(),l.off("brush:filter",b),t.removeEventListener("click",v)}}(f,Object.assign(Object.assign({brushRegion:(t,e,n,r)=>[t,e,n,r],selection:(t,e,n,r)=>{let{scale:i,coordinate:a}=p;return gY(t,e,n,r,i,a)},filter:(t,r)=>{var i,o,l,f;return i=this,o=void 0,l=void 0,f=function*(){if(d)return;d=!0;let[i,o]=t;c("brushFilter",t=>{let{marks:r}=t,a=r.map(t=>cy({axis:Object.assign(Object.assign({},e&&{x:{transform:[{type:"hide"}]}}),n&&{y:{transform:[{type:"hide"}]}})},t,{scale:{x:{domain:i,nice:!1},y:{domain:o,nice:!1}}}));return Object.assign(Object.assign({},s),{marks:a,clip:!0})}),a.emit("brush:filter",Object.assign(Object.assign({},r),{data:{selection:[i,o]}})),p=(yield u()).view,d=!1,h=!0},new(l||(l=Promise))(function(t,e){function n(t){try{a(f.next(t))}catch(t){e(t)}}function r(t){try{a(f.throw(t))}catch(t){e(t)}}function a(e){var i;e.done?t(e.value):((i=e.value)instanceof l?i:new l(function(t){t(i)})).then(n,r)}a((f=f.apply(i,o||[])).next())})},reset:t=>{if(d||!h)return;let{scale:e}=l,{x:n,y:r}=e,i=n.getOptions().domain,o=r.getOptions().domain;a.emit("brush:filter",Object.assign(Object.assign({},t),{data:{selection:[i,o]}})),h=!1,p=l,c("brushFilter"),u()},extent:void 0,emitter:a,scale:y,coordinate:g},{maskFill:"#777",maskFillOpacity:"0.3",maskStroke:"#fff",unhighlightedOpacity:.5,reverse:!1}),r))}}function j5(t,e,n){let r=t?n:e,i=t?e:n,a=gG(r),o=gG(i),l=i.getOptions().domain,s=!o&&l&&l.length>=2&&0===l[0];return{currentScale:r,targetScale:i,isSourceDiscrete:a,isTargetDiscrete:o,shouldPreserveZeroBaseline:s}}function j3(t){return t instanceof Date?t.getTime():"string"==typeof t?parseFloat(t):Number(t)}function j4(t,e,n,r,i,a="filter",o=!1){if(v$(a))return[];let l=o?"y":"x",s=o?"x":"y",u=[];for(let r of t){let{channelData:t}=r,i=t[l]||[],o=t[s]||[],c=Array.isArray(i[0])?i[0]:i,f=Array.isArray(o[0]);if(0===c.length)continue;let h=c.length;for(let t=0;t<h;t++){let r=c[t],i=!1;if(n)i=e.includes(r);else if(e.length>=2){let t=j3(r),n=j3(e[0]),a=j3(e[e.length-1]);isNaN(t)||isNaN(n)||isNaN(a)||(i=t>=n&&t<=a)}if("filter"===a&&i){if(f){let e=o.length;for(let n=0;n<e;n++){let e=o[n];if(Array.isArray(e)&&t<e.length){let n=j3(e[t]);isNaN(n)||u.push(n)}}}else if(t<o.length){let e=j3(o[t]);isNaN(e)||u.push(e)}}}}return u.length>0?function({isTargetDiscrete:t,filteredValues:e,shouldPreserveZeroBaseline:n}){if(t)return Array.from(new Set(e)).sort((t,e)=>t-e);{let t=Math.min(...e),r=Math.max(...e);return n?[0,r]:[t,r]}}({isTargetDiscrete:r,filteredValues:u,shouldPreserveZeroBaseline:i}):[]}function j6(t,e,n,r){r&&e instanceof Map?e.forEach((e,n)=>{e&&Array.isArray(e)&&e.length>0&&(t[n]=e)}):!r&&Array.isArray(e)&&e.length>0&&(t[n?"x":"y"]=e)}let j8="slider";function j9(t){var e,n,r,i;if(!(null==t?void 0:t.markState))return 0;let a=0;for(let[o,l]of t.markState.entries()){if("point"!==o.type||!(null==l?void 0:l.channels))continue;let t=null==(e=l.channels)?void 0:e.find(t=>"size"===t.name);if(t){if((null==(r=null==(n=t.scale)?void 0:n.range)?void 0:r.length)>0){a=Math.max(a,Math.max(...t.scale.range.filter(t=>"number"==typeof t)));continue}if((null==(i=t.values)?void 0:i.length)>0){let e=t.values.filter(t=>void 0!==t.value).flatMap(t=>Array.isArray(t.value)?t.value:[t.value]).filter(t=>"number"==typeof t&&!isNaN(t));e.length>0&&(a=Math.max(a,...e))}}}return a}function j7(t,e,n,r,i,a,o){if(o){let l=a?r:i.x,s=a?i.y:r;t.emit(e,Object.assign(Object.assign({},n),{nativeEvent:o,data:{selection:[Pe(l),Pe(s)]}}))}}function Pt(t,e,n,r){let{domain0:i,filteredDomain:a,channel0:o,channel1:l,prefix:s,hasState:u,isMultiAxis:c,markToScaleMap:f,enableAdaptiveFiltering:h}=r;c&&a instanceof Map?t(e,t=>Object.assign({},function(t,e,n,r,i=!1,a="x",o="y",l=new Map,s=new Map){let{marks:u}=t,c=j9(e),f=u.map(t=>{var e,u;let c="string"==typeof(null==t?void 0:t.key)?t.key:String((null==t?void 0:t.key)||""),f=l.get(c),h=s.get(f),d=h&&{y:Object.assign({domain:h,nice:!0},"y"!==f?{independent:!0}:void 0)};return cy({axis:{x:{transform:[{type:"hide"}]},y:{transform:[{type:"hide"}]}}},t,{scale:Object.assign(Object.assign({},n),d),[r]:Object.assign(Object.assign({},(null==(e=t[r])?void 0:e[a])&&{[a]:Object.assign({preserve:!0},i&&{ratio:null})}),(null==(u=t[r])?void 0:u[o])&&{[o]:{preserve:!0}}),animate:!1})});return Object.assign(Object.assign({},t),{marks:f,insetLeft:c,insetRight:c,insetTop:c,insetBottom:c,clip:!0,animate:!1})}(t,n,{[o]:{domain:i,nice:!1}},s,u,o,l,f||new Map,a))):t(e,t=>Object.assign({},function(t,e,n,r,i=!1,a="x",o="y"){let{marks:l}=t,s=j9(e),u=l.map(t=>{var e,l;return cy({axis:{x:{transform:[{type:"hide"}]},y:{transform:[{type:"hide"}]}}},t,{scale:n,[r]:Object.assign(Object.assign({},(null==(e=t[r])?void 0:e[a])&&{[a]:Object.assign({preserve:!0},i&&{ratio:null})}),(null==(l=t[r])?void 0:l[o])&&{[o]:{preserve:!0}}),animate:!1})});return Object.assign(Object.assign({},t),{marks:u,insetLeft:s,insetRight:s,insetTop:s,insetBottom:s,clip:!0,animate:!1})}(t,n,Object.assign({[o]:{domain:i,nice:!1}},h&&Array.isArray(a)?{[l]:{domain:a,nice:!0}}:{}),s,u,o,l)))}function Pe(t){return[t[0],t[t.length-1]]}function Pn({initDomain:t={},className:e=j8,prefix:n="slider",setValue:r=(t,e)=>t.setValues(e),hasState:i=!1,wait:a=50,leading:o=!0,trailing:l=!1,adaptiveMode:s="filter",getInitValues:u=t=>{var e;let n=null==(e=null==t?void 0:t.attributes)?void 0:e.values;if(0!==n[0]||1!==n[1])return n}}){return(c,f,h)=>{let{container:d,view:p,update:y,setState:g}=c,v=d.getElementsByClassName(e);if(!v.length)return()=>{};let{scale:b,coordinate:x}=p,{x:O,y:w}=b,k=fD(x),_=t=>{let e="vertical"===t?"y":"x",n="vertical"===t?"x":"y";return k?[n,e]:[e,n]},M=new Map,E=new Set,A=vG(p),S=function(t,e,n,r,i){var a,o,l,s;let u={x:e.x||n.getOptions().domain||[],y:e.y||r.getOptions().domain||[]},{hasIndependentX:c,hasIndependentY:f}=i||vG(t);if(c||f){let e=1,n=1;for(let[r,i]of t.markState.entries())if(null==i?void 0:i.channels){if(c){let t=i.channels.find(t=>"x"===t.name);(null==(o=null==(a=null==r?void 0:r.scale)?void 0:a.x)?void 0:o.independent)&&(u[`x${e}`]=t.scale.domain,e++)}if(f){let t=i.channels.find(t=>"y"===t.name);(null==(s=null==(l=null==r?void 0:r.scale)?void 0:l.y)?void 0:s.independent)&&(u[`y${n}`]=t.scale.domain,n++)}}}return u}(p,t,O,w,A),j=Array.from(v),P=t=>j.some(e=>{let{orientation:n}=e.attributes,[r]=_(n);return r===t}),T=P("x")&&!P("y"),C=P("y")&&!P("x"),N=!v$(s)&&(T||C);for(let t of v){let{orientation:e}=t.attributes,[c,f]=_(e),d=`${n}${fu(c)}:filter`,v="x"===c,{ratio:x}=O.getOptions(),{ratio:j}=w.getOptions(),P=!1,L=function({getFiltering:t,setFiltering:e,domainsOf:n,view:r,independentScaleInfo:i,enableAdaptiveFiltering:a,hasOnlyXSlider:o,hasOnlyYSlider:l,adaptiveMode:s,scaleX:u,scaleY:c,scale:f,channelDomain:h,channel0:d,channel1:p,isX:y,emitter:g,eventName:v,setState:b,slider:x,prefix:O,hasState:w,update:k,wait:_,leading:M,trailing:E}){return Oa(_=>{var M,E,A,S;return M=this,E=void 0,A=void 0,S=function*(){let{initValue:M=!1}=_;if(t()&&!M)return;e(!0);let{nativeEvent:E=!0}=_,{markDataPairs:A}=function(t){var e,n;let r=[],i=[],a=[],o=t.markState;if(o){for(let[t,l]of o.entries())if(null==l?void 0:l.channels){let o={};for(let t of l.channels)if((null==t?void 0:t.name)==="x"&&(null==(e=t.values)?void 0:e.length)>0){let e=[];for(let n of t.values)(null==n?void 0:n.value)&&(e=e.concat(n.value),r.push(n.value));o.x=e}else if(t&&("y"===t.name||t.name.startsWith("y"))&&(null==(n=t.values)?void 0:n.length)>0){let e=t.name,n=[];for(let r of t.values)if(null==r?void 0:r.value){let t=r.value;n.push(t),("y"===e||"y1"===e)&&(Array.isArray(t)?i.push(t.flat()):i.push([t]))}o[e]=n}let s=o.x||[],u=o.y||[];s.length>0&&u.length>0&&a.push({markKey:t.key||`mark_${a.length}`,channelData:o})}}return{xChannelValues:r.flat(),yChannelValues:i.flat(),markDataPairs:a}}(r);if(i[`hasIndependent${p.toUpperCase()}`]){let[t]=n(_),{filteredDomain:e,markToScaleMap:k}=function({view:t,domain0:e,shouldFilterXAxis:n,enableAdaptiveFiltering:r,markDataPairs:i,adaptiveMode:a,scaleX:o,scaleY:l,scale:s,channelDomain:u,independentScaleInfo:c,channel0:f}){let h=new Map,d=new Map;if(!r||0===i.length||!(null==e?void 0:e.length))return{filteredDomain:h,markToScaleMap:d};let p=cr(t,"options.slider");if(Object.keys(p).length>0&&Object.prototype.hasOwnProperty.call(p,f)){let t,r,f,h,p,y,g=(t=n?l:o,f=(r=Object.keys((t=>{let e={};return Object.keys(u).forEach(n=>{(n===t||n.match(RegExp(`^${t}\\d+$`)))&&(e[n]=u[n])}),e})(n?"x":"y"))).map(t=>s[t]),h=gG(t),p=f.map(t=>gG(t)),y=f.map((t,e)=>{let n=t.getOptions().domain;return!p[e]&&n&&n.length>=2&&0===n[0]}),{currentScale:t,targetScales:f,isSourceDiscrete:h,isTargetDiscrete:p,shouldPreserveZeroBaseline:y,targetScaleKeys:r});(n?c.markToXScaleMap:c.markToYScaleMap).forEach((t,e)=>{d.set(e,t)});let v=function({markDataPairs:t,domain:e,scaleInfo:n,markToScaleMap:r,adaptiveMode:i,shouldFilterXAxis:a=!1}){let o=new Map,{isSourceDiscrete:l,isTargetDiscrete:s,shouldPreserveZeroBaseline:u,targetScaleKeys:c}=n;return t.forEach(t=>{let n=r.get(t.markKey);if(!n)return;let f=c.indexOf(n);if(-1===f)return;let h=j4([t],e,l,s[f],u[f],i,a);o.set(n,h)}),o}({markDataPairs:i,domain:e,scaleInfo:g,markToScaleMap:d,adaptiveMode:a,isViewSlider:!0,shouldFilterXAxis:n});return j6(u,v,n,!0),{filteredDomain:v,markToScaleMap:d}}{let r=function(t,e){for(let[n]of t.markState.entries()){let t=cr(n,"slider");if(Object.keys(t||{}).length>0&&Object.prototype.hasOwnProperty.call(t,e))return String(n.key||"")}return null}(t,f);if(r){let t=j5(n,o,l),s=n?c.markToXScaleMap:c.markToYScaleMap,u=s.get(r)||"";if(u)return d.set(r,u),{filteredDomain:function(t,e,n,r,i,a,o=!1,l){let s=new Map;if(0===t.length||0===e.length)return s;let{isSourceDiscrete:u,isTargetDiscrete:c,shouldPreserveZeroBaseline:f}=n,h=l?t.filter(t=>l.get(t.markKey)===i):t.filter(t=>t.markKey===r);if(0===h.length)return s;let d=j4(h,e,u,c,f,a,o);return s.set(i,d),s}(i,e,t,r,u,a,n,s),markToScaleMap:d}}}return{filteredDomain:h,markToScaleMap:d}}({view:r,domain0:t,shouldFilterXAxis:l&&!y,enableAdaptiveFiltering:a&&(o&&y||l&&!y),markDataPairs:A,adaptiveMode:s,scaleX:u,scaleY:c,scale:f,channelDomain:h,independentScaleInfo:i,channel0:d});h[d]=t,j7(g,v,_,t,h,y,E),Pt(b,x,r,{domain0:t,filteredDomain:e,channel0:d,channel1:p,prefix:O,hasState:w,isMultiAxis:!0,markToScaleMap:k,enableAdaptiveFiltering:a})}else{let[t,e]=n(_),i=function({domain0:t,domain1:e,shouldFilterXAxis:n,enableAdaptiveFiltering:r,markDataPairs:i,adaptiveMode:a,scaleX:o,scaleY:l,channelDomain:s,hasOnlyXSlider:u,hasOnlyYSlider:c,isX:f}){let h=e;return r&&i.length>0&&(u&&f||c&&!f)&&(null==t?void 0:t.length)>0&&j6(s,h=function({markDataPairs:t,domain:e,scaleInfo:n,adaptiveMode:r,shouldFilterXAxis:i=!1}){let{isSourceDiscrete:a,isTargetDiscrete:o,shouldPreserveZeroBaseline:l}=n;return j4(t,e,a,o,l,r,i)}({markDataPairs:i,domain:t,scaleInfo:j5(n,o,l),adaptiveMode:a,shouldFilterXAxis:n}),n,!1),h}({domain0:t,domain1:e,shouldFilterXAxis:l&&!y,enableAdaptiveFiltering:a,markDataPairs:A,adaptiveMode:s,scaleX:u,scaleY:c,channelDomain:h,hasOnlyXSlider:o,hasOnlyYSlider:l,isX:y});h[d]=t,j7(g,v,_,t,h,y,E),Pt(b,x,r,{domain0:t,filteredDomain:i,channel0:d,channel1:p,prefix:O,hasState:w,isMultiAxis:!1,markToScaleMap:void 0,enableAdaptiveFiltering:a})}yield k(),e(!1)},new(A||(A=Promise))(function(t,e){function n(t){try{i(S.next(t))}catch(t){e(t)}}function r(t){try{i(S.throw(t))}catch(t){e(t)}}function i(e){var i;e.done?t(e.value):((i=e.value)instanceof A?i:new A(function(t){t(i)})).then(n,r)}i((S=S.apply(M,E||[])).next())})},_,{leading:M,trailing:E})}({getFiltering:()=>P,setFiltering:t=>{P=t},domainsOf:t=>{if(t.data){let{selection:e}=t.data,[n=Pe(S.x),r=Pe(S.y)]=e;return v?[gH(O,n,x),gH(w,r,j)]:[gH(w,r,j),gH(O,n,x)]}let{value:n}=t.detail;return[function(t,e,n){let[r,i]=t,a=n?t=>1-t:t=>t,o=gq(e,a(r),!0),l=gq(e,a(i),!1);return gH(e,[o,l])}(n,b[c],k&&"horizontal"===e),S[f]]},view:p,independentScaleInfo:A,enableAdaptiveFiltering:N,hasOnlyXSlider:T,hasOnlyYSlider:C,adaptiveMode:s,scaleX:O,scaleY:w,scale:b,channelDomain:S,channel0:c,channel1:f,isX:v,emitter:h,eventName:d,setState:g,slider:t,prefix:n,hasState:i,update:y,wait:a,leading:o,trailing:l}),I=e=>{let{nativeEvent:n}=e;if(n)return;let{data:i}=e,{selection:a}=i,[o,l]=a;t.dispatchEvent(new oA("valuechange",{data:i,nativeEvent:!1})),r(t,v?gU(o,O):gU(l,w))};h.on(d,I),t.addEventListener("valuechange",L),M.set(t,L),E.add([d,I]);let R=u(t);R&&t.dispatchEvent(new oA("valuechange",{detail:{value:R},nativeEvent:!1,initValue:!0}))}return()=>{for(let[t,e]of M)t.removeEventListener("valuechange",e);for(let[t,e]of E)h.off(t,e)}}}function Pr({className:t=j8,setValue:e=(t,e)=>t.setValues(e),minRange:n=.01,wheelSensitivity:r=.05,x:i=!0,y:a=!0}={}){return o=>{let{container:l,view:s}=o,{coordinate:u}=s,c=fD(u),f=function(t){var e;try{let n=null==(e=t.ownerDocument)?void 0:e.defaultView;if(!n||"function"!=typeof n.getContextService)return null;let r=n.getContextService().getDomElement();return r instanceof HTMLElement?r:null}catch(t){return null}}(l),h=Math.max(1e-6,Math.min(1,n)),d=l.getElementsByClassName(t);if(!d.length)return()=>{};let p=(t,e)=>!0===t||!1!==t&&("shift"===t?e.shiftKey&&!e.ctrlKey&&!e.altKey:"ctrl"===t?e.ctrlKey&&!e.shiftKey&&!e.altKey:"alt"===t&&e.altKey&&!e.shiftKey&&!e.ctrlKey),y=(t,n)=>{e(t,n),t.dispatchEvent(new oA("valuechange",{detail:{value:n},nativeEvent:!0}))},g=(t,e,n,r,i)=>Math.max(r,Math.min(i,Math.max(0,Math.min(1,(t-e)/n)))),v=t=>{if(!f)return;let e=t.target;if(!f.contains(e))return;let n=f.getBoundingClientRect(),o=t.clientX-n.left,l=t.clientY-n.top,s=[];for(let e of d){let{values:n,orientation:r}=e.attributes;if(!n)continue;let o="horizontal"===r;p("x"==(c?o?"y":"x":o?"x":"y")?i:a,t)&&s.push(e)}if(0!==s.length)for(let e of(t.preventDefault(),t.stopPropagation(),s)){let{values:n,orientation:i,x:a,y:s,trackLength:u}=e.attributes,[c,f]=n,d=f-c,p="horizontal"===i?g(o,a,u,c,f):g(l,s,u,c,f),v=r*Math.max(.1,Math.min(100,.01/Math.max(d,1e-4))),b=Math.max(h,Math.min(1,d*(1+t.deltaY*v))),x=(p-c)/d,O=(f-p)/d,w=p-b*x,k=p+b*O;w<0?(w=0,k=Math.min(1,b)):k>1&&(k=1,w=Math.max(0,1-b)),y(e,[w,k])}};return f&&f.addEventListener("wheel",v,{passive:!1,capture:!0}),()=>{f&&f.removeEventListener("wheel",v,{capture:!0})}}}Pr.props={reapplyWhenUpdate:!0};let Pi="g2-scrollbar";var Pa=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let Po={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 Pl(t){return"text"===t.nodeName&&!!t.isOverflowing()}function Ps(t){var{offsetX:e=8,offsetY:n=8}=t,r=Pa(t,["offsetX","offsetY"]);return t=>{let{container:i}=t,[a,o]=i.getBounds().min,l=cG(r,"tip"),s=new Set,u=t=>{var r;let{target:u}=t;if(!Pl(u))return void t.stopPropagation();let{offsetX:c,offsetY:f}=t,h=c+e-a,d=f+n-o;if(u.tip){u.tip.style.x=h,u.tip.style.y=d;return}let{text:p}=u.style,y=new lO({className:"poptip",style:{innerHTML:(r=Object.assign(Object.assign({},Po),l),`<div style="${Object.entries(r).map(([t,e])=>`${t.replace(/([A-Z])/g,"-$1").toLowerCase()}:${e}`).join(";")}">${p}</div>`),x:h,y:d}});i.appendChild(y),u.tip=y,s.add(y)},c=t=>{let{target:e}=t;Pl(e)?e.tip&&(e.tip.remove(),e.tip=null,s.delete(e.tip)):t.stopPropagation()};return i.addEventListener("pointerover",u),i.addEventListener("pointerout",c),()=>{i.removeEventListener("pointerover",u),i.removeEventListener("pointerout",c),s.forEach(t=>t.remove())}}}Ps.props={reapplyWhenUpdate:!0};let Pu=function(t,e){var n=ws(e),r=n.length;if(eY(t))return!r;for(var i=0;i<r;i+=1){var a=n[i];if(e[a]!==t[a]||!(a in t))return!1}return!0},Pc=function(t,e){if(!ns(t))return null;if(nk(e)&&(n=e),cp(e)&&(n=function(t){return Pu(t,e)}),n){for(var n,r=0;r<t.length;r+=1)if(n(t[r]))return t[r]}return null};function Pf(t){return null==t?null:Ph(t)}function Ph(t){if("function"!=typeof t)throw Error();return t}var Pd={depth:-1},Pp={},Py={};function Pg(t){return t.id}function Pv(t){return t.parentId}function Pm(){var t,e=Pg,n=Pv;function r(r){var i,a,o,l,s,u,c,f,h=Array.from(r),d=e,p=n,y=new Map;if(null!=t){let e=h.map((e,n)=>{var i;let a;return i=t(e,n,r),a=(i=`${i}`).length,Px(i,a-1)&&!Px(i,a-2)&&(i=i.slice(0,-1)),"/"===i[0]?i:`/${i}`}),n=e.map(Pb),i=new Set(e).add("");for(let t of n)i.has(t)||(i.add(t),e.push(t),n.push(Pb(t)),h.push(Py));d=(t,n)=>e[n],p=(t,e)=>n[e]}for(o=0,i=h.length;o<i;++o)a=h[o],u=h[o]=new O4(a),null!=(c=d(a,o,r))&&(c+="")&&(f=u.id=c,y.set(f,y.has(f)?Pp:u)),null!=(c=p(a,o,r))&&(c+="")&&(u.parent=c);for(o=0;o<i;++o)if(c=(u=h[o]).parent){if(!(s=y.get(c)))throw Error("missing: "+c);if(s===Pp)throw Error("ambiguous: "+c);s.children?s.children.push(u):s.children=[u],u.parent=s}else{if(l)throw Error("multiple roots");l=u}if(!l)throw Error("no root");if(null!=t){for(;l.data===Py&&1===l.children.length;)l=l.children[0],--i;for(let t=h.length-1;t>=0&&(u=h[t]).data===Py;--t)u.data=null}if(l.parent=Pd,l.eachBefore(function(t){t.depth=t.parent.depth+1,--i}).eachBefore(O3),l.parent=null,i>0)throw Error("cycle");return l}return r.id=function(t){return arguments.length?(e=Pf(t),r):e},r.parentId=function(t){return arguments.length?(n=Pf(t),r):n},r.path=function(e){return arguments.length?(t=Pf(e),r):t},r}function Pb(t){let e=t.length;if(e<2)return"";for(;--e>1&&!Px(t,e););return t.slice(0,e)}function Px(t,e){if("/"===t[e]){let n=0;for(;e>0&&"\\"===t[--e];)++n;if((1&n)==0)return!0}return!1}function PO(t,e,n,r,i){var a,o,l=t.children,s=l.length,u=Array(s+1);for(u[0]=o=a=0;a<s;++a)u[a+1]=o+=l[a].value;!function t(e,n,r,i,a,o,s){if(e>=n-1){var c=l[e];c.x0=i,c.y0=a,c.x1=o,c.y1=s;return}for(var f=u[e],h=r/2+f,d=e+1,p=n-1;d<p;){var y=d+p>>>1;u[y]<h?d=y+1:p=y}h-u[d-1]<u[d]-h&&e+1<d&&--d;var g=u[d]-f,v=r-g;if(o-i>s-a){var b=r?(i*v+o*g)/r:o;t(e,d,g,i,a,b,s),t(d,n,v,b,a,o,s)}else{var x=r?(a*v+s*g)/r:s;t(e,d,g,i,a,o,x),t(d,n,v,i,x,o,s)}}(0,s,t.value,e,n,r,i)}function Pw(t,e,n,r,i){for(var a,o=t.children,l=-1,s=o.length,u=t.value&&(i-n)/t.value;++l<s;)(a=o[l]).x0=e,a.x1=r,a.y0=n,a.y1=n+=a.value*u}function Pk(t,e,n,r,i){(1&t.depth?Pw:OQ)(t,e,n,r,i)}var P_=(1+Math.sqrt(5))/2;function PM(t,e,n,r,i,a){for(var o,l,s,u,c,f,h,d,p,y,g,v=[],b=e.children,x=0,O=0,w=b.length,k=e.value;x<w;){s=i-n,u=a-r;do c=b[O++].value;while(!c&&O<w);for(f=h=c,p=Math.max(h/(g=c*c*(y=Math.max(u/s,s/u)/(k*t))),g/f);O<w;++O){if(c+=l=b[O].value,l<f&&(f=l),l>h&&(h=l),(d=Math.max(h/(g=c*c*y),g/f))>p){c-=l;break}p=d}v.push(o={value:c,dice:s<u,children:b.slice(x,O)}),o.dice?OQ(o,n,r,i,k?r+=u*c/k:a):Pw(o,n,r,k?n+=s*c/k:i,a),k-=c,x=O}return v}let PE=function t(e){function n(t,n,r,i,a){PM(e,t,n,r,i,a)}return n.ratio=function(e){return t((e*=1)>1?e:1)},n}(P_),PA=function t(e){function n(t,n,r,i,a){if((o=t._squarify)&&o.ratio===e)for(var o,l,s,u,c,f=-1,h=o.length,d=t.value;++f<h;){for(s=(l=o[f]).children,u=l.value=0,c=s.length;u<c;++u)l.value+=s[u].value;l.dice?OQ(l,n,r,i,d?r+=(a-r)*l.value/d:a):Pw(l,n,r,d?n+=(i-n)*l.value/d:i,a),d-=l.value}else t._squarify=o=PM(e,t,n,r,i,a),o.ratio=e}return n.ratio=function(e){return t((e*=1)>1?e:1)},n}(P_);function PS(){return 0}function Pj(t){return function(){return t}}function PP(t,e,n){var r;let{value:i}=n,a=function(t,e){let n={treemapBinary:PO,treemapDice:OQ,treemapSlice:Pw,treemapSliceDice:Pk,treemapSquarify:PE,treemapResquarify:PA},r="treemapSquarify"===t?n[t].ratio(e):n[t];if(!r)throw TypeError("Invalid tile method!");return r}(e.tile,e.ratio),o=(r=e.path,Array.isArray(t)?"function"==typeof r?Pm().path(r)(t):Pm()(t):O0(t));ns(t)?function t(e){let n=cr(e,["data","name"]);n.replaceAll&&(e.path=n.replaceAll(".","/").split("/")),e.children&&e.children.forEach(e=>{t(e)})}(o):function t(e,n=[e.data.name]){e.id=e.id||e.data.name,e.path=n,e.children&&e.children.forEach(r=>{r.id=`${e.id}/${r.data.name}`,r.path=[...n,r.data.name],t(r,r.path)})}(o),i?o.sum(t=>e.ignoreParentValue&&t.children?0:w1(i)(t)).sort(e.sort):o.count(),(function(){var t=PE,e=!1,n=1,r=1,i=[0],a=PS,o=PS,l=PS,s=PS,u=PS;function c(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(f),i=[0],e&&t.eachBefore(OZ),t}function f(e){var n=i[e.depth],r=e.x0+n,c=e.y0+n,f=e.x1-n,h=e.y1-n;f<r&&(r=f=(r+f)/2),h<c&&(c=h=(c+h)/2),e.x0=r,e.y0=c,e.x1=f,e.y1=h,e.children&&(n=i[e.depth+1]=a(e)/2,r+=u(e)-n,c+=o(e)-n,f-=l(e)-n,h-=s(e)-n,f<r&&(r=f=(r+f)/2),h<c&&(c=h=(c+h)/2),t(e,r,c,f,h))}return c.round=function(t){return arguments.length?(e=!!t,c):e},c.size=function(t){return arguments.length?(n=+t[0],r=+t[1],c):[n,r]},c.tile=function(e){return arguments.length?(t=Ph(e),c):t},c.padding=function(t){return arguments.length?c.paddingInner(t).paddingOuter(t):c.paddingInner()},c.paddingInner=function(t){return arguments.length?(a="function"==typeof t?t:Pj(+t),c):a},c.paddingOuter=function(t){return arguments.length?c.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):c.paddingTop()},c.paddingTop=function(t){return arguments.length?(o="function"==typeof t?t:Pj(+t),c):o},c.paddingRight=function(t){return arguments.length?(l="function"==typeof t?t:Pj(+t),c):l},c.paddingBottom=function(t){return arguments.length?(s="function"==typeof t?t:Pj(+t),c):s},c.paddingLeft=function(t){return arguments.length?(u="function"==typeof t?t:Pj(+t),c):u},c})().tile(a).size(e.size).round(e.round).paddingInner(e.paddingInner).paddingOuter(e.paddingOuter).paddingTop(e.paddingTop).paddingRight(e.paddingRight).paddingBottom(e.paddingBottom).paddingLeft(e.paddingLeft)(o);let l=o.descendants().map(t=>Object.assign(t,{id:t.id.replace(/^\//,""),x:[t.x0,t.x1],y:[t.y0,t.y1]}));return[l.filter("function"==typeof e.layer?e.layer:t=>t.height===e.layer),l]}var PT=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let PC={breadCrumbFill:"rgba(0, 0, 0, 0.85)",breadCrumbFontSize:12,breadCrumbY:12,activeFill:"rgba(0, 0, 0, 0.5)"};var PN=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let PL="partition",PI="markType",PR="path",PD="ancestor-node",PB="childNodeCount",PF={id:PL,encode:{x:"x",y:"y",key:PR,color:PD,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:{[PI]:PL,[PB]:"childNodeCount"},state:{active:{zIndex:2},inactive:{zIndex:1}},legend:!1,coordinate:{type:"cartesian",grid:!1},interaction:{drillDown:!0}},Pz=t=>{let{encode:e,data:n=[],layout:r={}}=t,i=PN(t,["encode","data","layout"]),{fillParent:a=!0,sort:o}=r,l=Object.assign(Object.assign({},PF.encode),e),{value:s}=l;return[cy({},PF,Object.assign({type:"rect",data:function(t){let{data:e,encode:n,fillParent:r,sort:i}=t,{color:a,value:o,name:l}=n;return(function(t,e={}){let{valueField:n="value",sort:r,fillParent:i=!0,nameField:a="name"}=e;if(!t||0===t.length)return[];let o=(t,e=null,r=0)=>{let i={data:t,depth:r,parent:e,children:[],x0:0,x1:0,value:t[n]||0};return t.children&&t.children.length>0&&(i.children=t.children.map(t=>o(t,i,r+1))),i},l=[],s=0;return t.forEach(t=>{let e=o(t),u=(t,e=0,n=!1,a=0)=>{if(n||0===t.depth)t.x0=n?e:0,t.x1=t.x0+t.value;else if(t.x0=e,i&&a>0){let n=t.parent?t.parent.children.reduce((t,e)=>t+e.value,0):t.value,r=t.parent?t.parent.children.length:1,i=n>0?t.value/n:1/r;t.x1=e+a*i}else t.x1=e+t.value;let o=t.x0,l=t.x1-t.x0,s=r?[...t.children].sort((t,e)=>r(t.data,e.data)):t.children;if(i&&s.length>0){let e=t.children.reduce((t,e)=>t+e.value,0);s.forEach(t=>{u(t,o,!1,l);let n=e>0?t.value/e:1/s.length;o+=l*n})}else s.forEach(t=>{u(t,o,!1,0),o+=t.x1-t.x0})};u(e,s,!0),s+=e.value;let c=t=>{l.push((t=>{var e,r,i;let o=t=>{var e;return null!=(e=t[a])?e:t.name},l=[o(t.data)],s=t;for(;s.parent;)l.unshift(o(s.parent.data)),s=s.parent;return Object.assign(Object.assign({},OK(t.data,[n])),{[PR]:l,[PD]:null!=(i=null==(r=null==(e=s.parent)?void 0:e.data)?void 0:r[a])?i:t.data[a],name:t.data[a],depth:t.depth,value:t.value,x:[t.x0,t.x1],y:[t.depth,t.depth+1],[PB]:t.children.length})})(t)),t.children.forEach(c)};c(e)}),l})(e,{valueField:o,fillParent:r,nameField:l,sort:i}).map(t=>{let e=Object.assign({},t);return a&&a!==PD&&(e[a]=t[a]),e})}({encode:l,data:n,fillParent:a,sort:o}),encode:l,tooltip:{title:"path",items:[t=>({name:s,value:t[s]})]},interaction:{elementHighlight:!0}},i))]};Pz.props={};let P$={rootText:"root",style:{fill:"rgba(0, 0, 0, 0.6)",fontSize:11},y:4,active:{fill:"rgba(0, 0, 0, 0.4)"}};var PW=function(t,e,n,r){return new(n||(n=Promise))(function(i,a){function o(t){try{s(r.next(t))}catch(t){a(t)}}function l(t){try{s(r.throw(t))}catch(t){a(t)}}function s(t){var e;t.done?i(t.value):((e=t.value)instanceof n?e:new n(function(t){t(e)})).then(o,l)}s((r=r.apply(t,e||[])).next())})},PG=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let Pq={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},PH="movePoint",PY=t=>{let e=t.target,{markType:n}=e;"line"===n&&(e.attr("_lineWidth",e.attr("lineWidth")||1),e.attr("lineWidth",e.attr("_lineWidth")+3)),"interval"===n&&(e.attr("_opacity",e.attr("opacity")||1),e.attr("opacity",.7*e.attr("_opacity")))},PV=t=>{let e=t.target,{markType:n}=e;"line"===n&&e.attr("lineWidth",e.attr("_lineWidth")),"interval"===n&&e.attr("opacity",e.attr("_opacity"))},PU=(t,e,n)=>{t.forEach((t,r)=>{t.attr("stroke",e[1]===r?n.activeStroke:n.stroke)})},PX=(t,e,n,r)=>{let i=new lE({style:n}),a=new lN({style:r});return e.appendChild(a),t.appendChild(i),[i,a]},PK=(t,e)=>{if(!cr(t,["options","range","indexOf"]))return;let n=t.options.range.indexOf(e);return t.sortedDomain[n]},PZ=(t,e,n)=>{let r=vI(t,e),i=vI(t,n)/r;return[t[0]+(e[0]-t[0])*i,t[1]+(e[1]-t[1])*i]};var PQ=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let PJ=()=>t=>{let{children:e}=t;if(!Array.isArray(e))return[];let{x:n=0,y:r=0,width:i,height:a,data:o}=t;return e.map(t=>{var{data:e,x:l,y:s,width:u,height:c}=t;return Object.assign(Object.assign({},PQ(t,["data","x","y","width","height"])),{data:y_(e,o),x:null!=l?l:n,y:null!=s?s:r,width:null!=u?u:i,height:null!=c?c:a})})};PJ.props={};var P0=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let P1=()=>t=>{let{children:e}=t;if(!Array.isArray(e))return[];let{direction:n="row",ratio:r=e.map(()=>1),padding:i=0,data:a}=t,[o,l,s,u]="col"===n?["y","height","width","x"]:["x","width","height","y"],c=r.reduce((t,e)=>t+e),f=t[l]-i*(e.length-1),h=r.map(t=>t/c*f),d=[],p=t[o]||0;for(let n=0;n<h.length;n+=1){let r=e[n],{data:c}=r,f=P0(r,["data"]),y=y_(c,a);d.push(Object.assign({[o]:p,[l]:h[n],[u]:t[u]||0,[s]:t[s],data:y},f)),p+=h[n]+i}return d};P1.props={};class P2{constructor(t){this.$value=t}static of(t){return new P2(t)}call(t,...e){return this.$value=t(this.$value,...e),this}value(){return this.$value}}var P5=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let P3=yw(t=>{let{encode:e,data:n,scale:r,shareSize:i=!1}=t,{x:a,y:o}=e,l=(t,e)=>{var a;if(void 0===t||!i)return{};let o=cs(n,e=>e[t]),l=(null==(a=null==r?void 0:r[e])?void 0:a.domain)||Array.from(o.keys()),s=l.map(t=>o.has(t)?o.get(t).length:1);return{domain:l,flex:s}};return{scale:{x:Object.assign(Object.assign({paddingOuter:0,paddingInner:.1,guide:void 0===a?null:{position:"top"}},void 0===a&&{paddingInner:0}),l(a,"x")),y:Object.assign(Object.assign({range:[0,1],paddingOuter:0,paddingInner:.1,guide:void 0===o?null:{position:"right"}},void 0===o&&{paddingInner:0}),l(o,"y"))}}}),P4=yk(t=>{let e,n,r,{data:i,scale:a,legend:o}=t,l=[t];for(;l.length;){let{children:t,encode:i={},scale:a={},legend:o={}}=l.shift(),{color:s}=i,{color:u}=a,{color:c}=o;void 0!==s&&(e=s),void 0!==u&&(n=u),void 0!==c&&(r=c),Array.isArray(t)&&l.push(...t)}let s="string"==typeof e?e:"",[u,c]=(()=>{var t;let n=null==(t=null==a?void 0:a.color)?void 0:t.domain;if(void 0!==n)return[n];if(void 0===e)return[void 0];let r="function"==typeof e?e:t=>t[e],o=i.map(r);return o.some(t=>"number"==typeof t)?[dZ(o)]:[Array.from(new Set(o)),"ordinal"]})();return Object.assign({encode:{color:{type:"column",value:null!=u?u:[]}},scale:{color:cy({},n,{domain:u,type:c})}},void 0===o&&{legend:{color:cy({title:s},r)}})}),P6=yw(()=>({animate:{enterType:"fadeIn"}})),P8=yk(()=>({frame:!1,encode:{shape:"hollow"},style:{lineWidth:0}})),P9=yk(()=>({type:"cell"})),P7=yk(t=>{let{data:e}=t;return{data:{type:"inline",value:e,transform:[{type:"custom",callback:()=>{let{data:e,encode:n}=t,{x:r,y:i}=n,a=r?Array.from(new Set(e.map(t=>t[r]))):[],o=i?Array.from(new Set(e.map(t=>t[i]))):[];if(a.length&&o.length){let t=[];for(let e of a)for(let n of o)t.push({[r]:e,[i]:n});return t}return a.length?a.map(t=>({[r]:t})):o.length?o.map(t=>({[i]:t})):void 0}}]}}}),Tt=yk((t,e=Te,n=Tr,r=Ti,i={})=>{let{data:a,encode:o,children:l,scale:s,x:u=0,y:c=0,shareData:f=!1,key:h}=t,{value:d}=a,{x:p,y:y}=o,{color:g}=s,{domain:v}=g;return{children:(t,a,o)=>{let{x:s,y:g}=a,{paddingLeft:b,paddingTop:x,marginLeft:O,marginTop:w}=o,{domain:k}=s.getOptions(),{domain:_}=g.getOptions(),M=fx(t),E=t.map(e),A=t.map(({x:t,y:e})=>[s.invert(t),g.invert(e)]),S=A.map(([t,e])=>n=>{let{[p]:r,[y]:i}=n;return(void 0===p||r===t)&&(void 0===y||i===e)}).map(t=>d.filter(t)),j=f?fE(S,t=>t.length):void 0,P=A.map(([t,e])=>({columnField:p,columnIndex:k.indexOf(t),columnValue:t,columnValuesLength:k.length,rowField:y,rowIndex:_.indexOf(e),rowValue:e,rowValuesLength:_.length})),T=P.map(t=>Array.isArray(l)?l:[l(t)].flat(1));return M.flatMap(t=>{let[e,a,o,l]=E[t],s=P[t],f=S[t];return T[t].map(g=>{var k,_,{scale:M,key:E,facet:A=!0,axis:S={},legend:P={}}=g,T=P5(g,["scale","key","facet","axis","legend"]);let C=(null==(k=null==M?void 0:M.y)?void 0:k.guide)||S.y,N=(null==(_=null==M?void 0:M.x)?void 0:_.guide)||S.x,L=A?f:0===f.length?[]:d,I={x:Ta(N,n)(s,L),y:Ta(C,r)(s,L)};return Object.assign(Object.assign({key:`${E}-${t}`,data:L,margin:0,x:e+b+u+O,y:a+x+c+w,parentKey:h,width:o,height:l,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!!L.length,dataDomain:j,scale:cy({x:{tickCount:p?5:void 0},y:{tickCount:y?5:void 0}},M,{color:{domain:v}}),axis:cy({},S,I),legend:!1},T),i)})})}}});function Te(t){let{points:e}=t;return yC(e)}function Tn(t,e){return e.length?cy({title:!1,tick:null,label:null},t):cy({title:!1,tick:null,label:null,grid:null},t)}function Tr(t){return(e,n)=>{let{rowIndex:r,rowValuesLength:i,columnIndex:a,columnValuesLength:o}=e;return r!==i-1?Tn(t,n):cy({title:a===o-1&&void 0,grid:n.length?void 0:null},t)}}function Ti(t){return(e,n)=>{let{rowIndex:r,columnIndex:i}=e;return 0!==i?Tn(t,n):cy({title:0===r&&void 0,grid:n.length?void 0:null},t)}}function Ta(t,e){return"function"==typeof t?t:null===t||!1===t?()=>null:e(t)}let To=()=>t=>[P2.of(t).call(P9).call(P4).call(P6).call(P3).call(P8).call(P7).call(Tt).value()];To.props={};var Tl=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let Ts=yw(t=>({scale:{x:{guide:null,paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}})),Tu=yk(t=>{let{data:e,children:n,x:r=0,y:i=0,key:a}=t;return{children:(t,o,l)=>{let{x:s,y:u}=o,{paddingLeft:c,paddingTop:f,marginLeft:h,marginTop:d}=l,{domain:p}=s.getOptions(),{domain:y}=u.getOptions(),g=fx(t),v=t.map(({points:t})=>yC(t)),b=t.map(({x:t,y:e})=>[s.invert(t),u.invert(e)]),x=b.map(([t,e])=>({columnField:t,columnIndex:p.indexOf(t),columnValue:t,columnValuesLength:p.length,rowField:e,rowIndex:y.indexOf(e),rowValue:e,rowValuesLength:y.length})),O=x.map(t=>Array.isArray(n)?n:[n(t)].flat(1));return g.flatMap(t=>{let[n,o,l,s]=v[t],[u,p]=b[t],y=x[t];return O[t].map(g=>{var v,b,x,O;let{scale:w,key:k,encode:_,axis:M,interaction:E}=g,A=Tl(g,["scale","key","encode","axis","interaction"]),S=null==(v=null==w?void 0:w.y)?void 0:v.guide,j={x:("function"==typeof(x=null==(b=null==w?void 0:w.x)?void 0:b.guide)?x:null===x?()=>null:(t,e)=>{let{rowIndex:n,rowValuesLength:r}=t;if(n!==r-1)return Tn(x,e)})(y,e),y:("function"==typeof(O=S)?O:null===O?()=>null:(t,e)=>{let{columnIndex:n}=t;if(0!==n)return Tn(O,e)})(y,e)};return Object.assign({data:e,parentKey:a,key:`${k}-${t}`,x:n+c+r+h,y:o+f+i+d,width:l,height:s,margin:0,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!0,scale:cy({x:{facet:!1},y:{facet:!1}},w),axis:cy({x:{tickCount:5},y:{tickCount:5}},M,j),legend:!1,encode:cy({},_,{x:u,y:p}),interaction:cy({},E,{legendFilter:!1})},A)})})}}}),Tc=yk(t=>{let{encode:e}=t,n=Tl(t,["encode"]),{position:r=[],x:i=r,y:a=[...r].reverse()}=e,o=Tl(e,["position","x","y"]),l=[];for(let t of[i].flat(1))for(let e of[a].flat(1))l.push({$x:t,$y:e});return Object.assign(Object.assign({},n),{data:l,encode:Object.assign(Object.assign({},o),{x:"$x",y:"$y"}),scale:Object.assign(Object.assign({},1===[i].flat(1).length&&{x:{paddingInner:0}}),1===[a].flat(1).length&&{y:{paddingInner:0}})})});var Tf=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let Th=yw(t=>({scale:{x:{guide:{type:"axisArc"},paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}})),Td=yw(t=>({coordinate:{type:"polar"}})),Tp=t=>{let{encode:e}=t,n=Tf(t,["encode"]),{position:r}=e;return Object.assign(Object.assign({},n),{encode:{x:r}})};function Ty(t){return t=>null}function Tg(t){let{points:e}=t,[n,r,i,a]=e,o=yS(n,a),l=yA(n,a),s=yT(l,yA(r,i)),u=1/Math.sin(s/2),c=o/(1+u),f=c*Math.sqrt(2),[h,d]=i,p=yP(l)+s/2,y=c*u;return[h+y*Math.sin(p)-f/2,d-y*Math.cos(p)-f/2,f,f]}let Tv=()=>t=>{let{children:e=[],duration:n=1e3,iterationCount:r=1,direction:i="normal",easing:a="ease-in-out-sine"}=t,o=e.length;if(!Array.isArray(e)||0===o)return[];let{key:l}=e[0],s=e.map(t=>Object.assign(Object.assign({},t),{key:l})).map(t=>(function(t,e,n){let r=[t];for(;r.length;){let t=r.pop();t.animate=cy({enter:{duration:e},update:{duration:e,easing:n,type:"morphing",fill:"both"},exit:{type:"fadeOut",duration:e}},t.animate||{});let{children:i}=t;Array.isArray(i)&&r.push(...i)}return t})(t,n,a));return function*(){let t,e=0;for(;"infinite"===r||e<r;){let[n,r]=function(t,e,n){let r=[0,n],i=[-n+1,1];return"normal"===t?r:"reverse"===t?i:"alternate"===t?e%2==0?r:i:"reverse-alternate"===t?e%2==0?i:r:void 0}(i,e,o);for(let e=n;e<r;e+=1){let n=Math.abs(e);t!==n&&(yield s[n]),t=n}e++}}};function Tm(t,e,n){var r;let{encode:i}=n;if(null===t)return[e];let a=(Array.isArray(r=t)?r:[r]).map(t=>{var e;return[t,null==(e=wM(i,t))?void 0:e[0]]}).filter(([,t])=>cW(t));return Array.from(cs(e,t=>a.map(([,e])=>e[t]).join("-")).values())}function Tb(t){var e,n;return Array.isArray(t)?(e=t,(t,n,r)=>(n,r)=>e.reduce((e,i)=>0!==e?e:gu(t[n][i],t[r][i]),0)):"function"==typeof t?(n=t,(t,e,r)=>TE(e=>n(t[e]))):"series"===t?Tw:"value"===t?Tk:"sum"===t?T_:"maxIndex"===t?TM:null}function Tx(t,e){for(let n of t)n.sort(e)}function TO(t,e){return(null==e?void 0:e.domain)||Array.from(new Set(t))}function Tw(t,e,n){return TE(t=>n[t])}function Tk(t,e,n){return TE(t=>e[t])}function T_(t,e,n){let r=new Map(Array.from(cs(fx(t),t=>n[+t]).entries()).map(([t,n])=>[t,n.reduce((t,n)=>t+ +e[n])]));return TE(t=>r.get(n[t]))}function TM(t,e,n){let r=new Map(Array.from(cs(fx(t),t=>n[+t]).entries()).map(([t,n])=>[t,y6(n,t=>e[t])]));return TE(t=>r.get(n[t]))}function TE(t){return(e,n)=>gu(t(e),t(n))}Tv.props={};let TA=(t={})=>{let{groupBy:e="x",orderBy:n=null,reverse:r=!1,y:i="y",y1:a="y1",series:o=!0}=t;return(t,l)=>{var s;let u,{data:c,encode:f,style:h={}}=l,[d,p]=wM(f,"y"),[y,g]=wM(f,"y1"),[v]=o?wE(f,"series","color"):wM(f,"color"),b=Tm(e,t,l),x=(null!=(s=Tb(n))?s:()=>null)(c,d,v);x&&Tx(b,x);let O=Array(t.length),w=Array(t.length),k=Array(t.length),_=[],M=[];for(let t of b){r&&t.reverse();let e=y?+y[t[0]]:0,n=[],i=[];for(let r of t){let t=k[r]=d[r]-e;t<0?i.push(r):t>=0&&n.push(r)}let a=n.length>0?n:i,o=i.length>0?i:n,l=n.length-1,s=0;for(;l>0&&0===d[a[l]];)l--;for(;s<o.length-1&&0===d[o[s]];)s++;_.push(a[l]),M.push(o[s]);let u=e;for(let t of i.reverse()){let e=k[t];u=O[t]=(w[t]=u)+e}let c=e;for(let t of n){let e=k[t];e>0?c=O[t]=(w[t]=c)+e:O[t]=w[t]=c}}let E=new Set(_),A=new Set(M),S="y"===i?O:w,j="y"===a?O:w;return u="point"===l.type?{y0:ww(d,p),y:wO(S,p)}:{y0:ww(d,p),y:wO(S,p),y1:wO(j,g)},[t,cy({},l,{encode:Object.assign({},u),style:Object.assign({first:(t,e)=>E.has(e),last:(t,e)=>A.has(e)},h)})]}};function TS(t,e){let n=0;if(void 0===e)for(let e of t)null!=e&&(e*=1)>=e&&++n;else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(i*=1)>=i&&++n}return n}function Tj(t,e){let n=function(t,e){let n,r=0,i=0,a=0;if(void 0===e)for(let e of t)null!=e&&(e*=1)>=e&&(n=e-i,i+=n/++r,a+=n*(e-i));else{let o=-1;for(let l of t)null!=(l=e(l,++o,t))&&(l*=1)>=l&&(n=l-i,i+=n/++r,a+=n*(l-i))}if(r>1)return a/(r-1)}(t,e);return n?Math.sqrt(n):n}TA.props={};var TP=Array.prototype,TT=TP.slice;TP.map;let TC=Math.sqrt(50),TN=Math.sqrt(10),TL=Math.sqrt(2);function TI(t,e,n){let r,i,a,o=(e-t)/Math.max(0,n),l=Math.floor(Math.log10(o)),s=o/Math.pow(10,l),u=s>=TC?10:s>=TN?5:s>=TL?2:1;return(l<0?(r=Math.round(t*(a=Math.pow(10,-l)/u)),i=Math.round(e*a),r/a<t&&++r,i/a>e&&--i,a=-a):(r=Math.round(t/(a=Math.pow(10,l)*u)),i=Math.round(e/a),r*a<t&&++r,i*a>e&&--i),i<r&&.5<=n&&n<2)?TI(t,e,2*n):[r,i,a]}function TR(t,e,n){return TI(t*=1,e*=1,n*=1)[2]}function TD(t){return Math.max(1,Math.ceil(Math.log(TS(t))/Math.LN2)+1)}function TB(t,e,n=0,r=1/0,i){if(e=Math.floor(e),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(t.length-1,r)),!(n<=e&&e<=r))return t;for(i=void 0===i?gh:gf(i);r>n;){if(r-n>600){let a=r-n+1,o=e-n+1,l=Math.log(a),s=.5*Math.exp(2*l/3),u=.5*Math.sqrt(l*s*(a-s)/a)*(o-a/2<0?-1:1),c=Math.max(n,Math.floor(e-o*s/a+u)),f=Math.min(r,Math.floor(e+(a-o)*s/a+u));TB(t,e,c,f,i)}let a=t[e],o=n,l=r;for(TF(t,n,e),i(t[r],a)>0&&TF(t,n,r);o<l;){for(TF(t,o,l),++o,--l;0>i(t[o],a);)++o;for(;i(t[l],a)>0;)--l}0===i(t[n],a)?TF(t,n,l):TF(t,++l,r),l<=e&&(n=l+1),e<=l&&(r=l-1)}return t}function TF(t,e,n){let r=t[e];t[e]=t[n],t[n]=r}function Tz(t,e,n){if(!(!(r=(t=Float64Array.from(function*(t,e){if(void 0===e)for(let e of t)null!=e&&(e*=1)>=e&&(yield e);else{let n=-1;for(let r of t)null!=(r=e(r,++n,t))&&(r*=1)>=r&&(yield r)}}(t,n))).length)||isNaN(e*=1))){if(e<=0||r<2)return xO(t);if(e>=1)return fE(t);var r,i=(r-1)*e,a=Math.floor(i),o=fE(TB(t,a).subarray(0,a+1));return o+(xO(t.subarray(a+1))-o)*(i-a)}}var T$=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function TW(t){return e=>null===e?t:`${t} of ${e}`}function TG(){return[(t,e)=>Oi(t,t=>+e[t]),TW("mean")]}function Tq(){return[(t,e)=>Tz(t,.5,t=>+e[t]),TW("median")]}function TH(){return[(t,e)=>fE(t,t=>+e[t]),TW("max")]}function TY(){return[(t,e)=>xO(t,t=>+e[t]),TW("min")]}function TV(){return[(t,e)=>t.length,TW("count")]}function TU(){return[(t,e)=>fM(t,t=>+e[t]),TW("sum")]}function TX(){return[(t,e)=>e[t[0]],TW("first")]}function TK(){return[(t,e)=>e[t[t.length-1]],TW("last")]}let TZ=(t={})=>{let{groupBy:e}=t,n=T$(t,["groupBy"]);return(t,r)=>{let{data:i,encode:a}=r,o=e(t,r);if(!o)return[t,r];let l=Object.entries(n).map(([t,e])=>{let[n,r]=function(t){if("function"==typeof t)return[t,null];let e={mean:TG,max:TH,count:TV,first:TX,last:TK,sum:TU,min:TY,median:Tq}[t];if(!e)throw Error(`Unknown reducer: ${t}.`);return e()}(e),[l,s]=wM(a,t),u=((t,e)=>{if(t)return t;let{from:n}=e;if(!n)return t;let[,r]=wM(a,n);return r})(s,e);return[t,Object.assign(Object.assign({},Object.assign(Object.assign({},wO(o.map(t=>n(t,null!=l?l:i)),(null==r?void 0:r(u))||u)),{constant:!1})),{aggregate:!0})]}),s=Object.keys(a).map(t=>{let[e,n]=wM(a,t);return[t,wO(o.map(t=>e[t[0]]),n)]}),u=o.map(t=>i[t[0]]);return[fx(o),cy({},r,{data:u,encode:Object.fromEntries([...s,...l])})]}};TZ.props={};var TQ=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let TJ="thresholds",T0=(t={})=>{let{groupChannels:e=["color"],binChannels:n=["x","y"]}=t,r=TQ(t,["groupChannels","binChannels"]),i={};return TZ(Object.assign(Object.assign(Object.assign({},Object.fromEntries(Object.entries(r).filter(([t])=>!t.startsWith(TJ)))),Object.fromEntries(n.flatMap(t=>{let e=([e])=>+i[t].get(e).split(",")[1];return e.from=t,[[t,([e])=>+i[t].get(e).split(",")[0]],[`${t}1`,e]]}))),{groupBy:(t,a)=>{let{encode:o}=a,l=n.map(t=>{let[e]=wM(o,t);return e}),s=cG(r,TJ),u=t.filter(t=>l.every(e=>cW(e[t]))),c=[...e.map(t=>{let[e]=wM(o,t);return e}).filter(cW).map(t=>e=>t[e]),...n.map((t,e)=>{let n=l[e],r=s[t]||function(t){let e,n,[r,i]=dZ(t);return Math.min(200,(e=TS(t),n=Tj(t),e&&n?Math.ceil((i-r)*Math.cbrt(e)/(3.49*n)):1))}(n),a=new Map((function(){var t=cl,e=dZ,n=TD;function r(r){Array.isArray(r)||(r=Array.from(r));var i,a,o,l=r.length,s=Array(l);for(i=0;i<l;++i)s[i]=t(r[i],i,r);var u=e(s),c=u[0],f=u[1],h=n(s,c,f);if(!Array.isArray(h)){let t=f,n=+h;if(e===dZ&&([c,f]=function(t,e,n){let r;for(;;){let i=TR(t,e,n);if(i===r||0===i||!isFinite(i))return[t,e];i>0?(t=Math.floor(t/i)*i,e=Math.ceil(e/i)*i):i<0&&(t=Math.ceil(t*i)/i,e=Math.floor(e*i)/i),r=i}}(c,f,n)),(h=function(t,e,n){if(e*=1,t*=1,!((n*=1)>0))return[];if(t===e)return[t];let r=e<t,[i,a,o]=r?TI(e,t,n):TI(t,e,n);if(!(a>=i))return[];let l=a-i+1,s=Array(l);if(r)if(o<0)for(let t=0;t<l;++t)s[t]=-((a-t)/o);else for(let t=0;t<l;++t)s[t]=(a-t)*o;else if(o<0)for(let t=0;t<l;++t)s[t]=-((i+t)/o);else for(let t=0;t<l;++t)s[t]=(i+t)*o;return s}(c,f,n))[0]<=c&&(o=TR(c,f,n)),h[h.length-1]>=f)if(t>=f&&e===dZ){let t=TR(c,f,n);isFinite(t)&&(t>0?f=(Math.floor(f/t)+1)*t:t<0&&(f=-((Math.ceil(-(f*t))+1)/t)))}else h.pop()}for(var d=h.length,p=0,y=d;h[p]<=c;)++p;for(;h[y-1]>f;)--y;(p||y<d)&&(h=h.slice(p,y),d=y-p);var g,v=Array(d+1);for(i=0;i<=d;++i)(g=v[i]=[]).x0=i>0?h[i-1]:c,g.x1=i<d?h[i]:f;if(isFinite(o)){if(o>0)for(i=0;i<l;++i)null!=(a=s[i])&&c<=a&&a<=f&&v[Math.min(d,Math.floor((a-c)/o))].push(r[i]);else if(o<0){for(i=0;i<l;++i)if(null!=(a=s[i])&&c<=a&&a<=f){let t=Math.floor((c-a)*o);v[Math.min(d,t+(h[t]<=a))].push(r[i])}}}else for(i=0;i<l;++i)null!=(a=s[i])&&c<=a&&a<=f&&v[gz(h,a,0,d)].push(r[i]);return v}return r.value=function(e){return arguments.length?(t="function"==typeof e?e:()=>e,r):t},r.domain=function(t){var n;return arguments.length?(e="function"==typeof t?t:(n=[t[0],t[1]],()=>n),r):e},r.thresholds=function(t){var e;return arguments.length?(n="function"==typeof t?t:(e=Array.isArray(t)?TT.call(t):t,()=>e),r):n},r})().thresholds(r).value(t=>+n[t])(u).flatMap(t=>{let{x0:e,x1:n}=t,r=`${e},${n}`;return t.map(t=>[t,r])}));return i[t]=a,t=>a.get(t)})];return Array.from(cs(u,t=>c.map(e=>e(t)).join("-")).values())}}))};T0.props={};let T1=(t={})=>{let{thresholds:e}=t;return T0(Object.assign(Object.assign({},t),{thresholdsX:e,groupChannels:["color"],binChannels:["x"]}))};T1.props={};var T2=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let T5=(t={})=>{let{groupBy:e="x",reverse:n=!1,orderBy:r,padding:i}=t;return T2(t,["groupBy","reverse","orderBy","padding"]),(t,a)=>{let{data:o,encode:l,scale:s}=a,{series:u}=s,[c]=wM(l,"y"),[f]=wE(l,"series","color"),h=TO(f,u),d=cy({},a,{scale:{series:{domain:h,paddingInner:i}}}),p=Tm(e,t,a),y=Tb(r);if(!y)return[t,cy(d,{encode:{series:wO(f)}})];let g=y(o,c,f);g&&Tx(p,g);let v=Array(t.length);for(let t of p){n&&t.reverse();for(let e=0;e<t.length;e++)v[t[e]]=h[e]}return[t,cy(d,{encode:{series:wO(r?v:f)}})]}};function T3(t,e,n){if(null===t)return[-.5,.5];let r=new cA({domain:TO(t,e),range:[0,1],padding:n}).getBandWidth();return[-r/2,r/2]}T5.props={};let T4=(t={})=>{let{padding:e=0,paddingX:n=e,paddingY:r=e,random:i=Math.random}=t;return(t,e)=>{let{encode:a,scale:o}=e,{x:l,y:s}=o,[u]=wM(a,"x"),[c]=wM(a,"y"),f=T3(u,l,n),h=T3(c,s,r),d=t.map(()=>(function(t,e,n){return e*(1-t)+n*t})(i(),...h)),p=t.map(()=>(function(t,e,n){return e*(1-t)+n*t})(i(),...f));return[t,cy({scale:{x:{padding:.5},y:{padding:.5}}},e,{encode:{dy:wO(d),dx:wO(p)}})]}};T4.props={};let T6=(t={})=>{let{padding:e=0,random:n=Math.random}=t;return(t,r)=>{let{encode:i,scale:a}=r,{x:o}=a,[l]=wM(i,"x"),s=T3(l,o,e),u=t.map(()=>(function(t,e,n){return e*(1-t)+n*t})(n(),...s));return[t,cy({scale:{x:{padding:.5}}},r,{encode:{dx:wO(u)}})]}};T6.props={};let T8=(t={})=>{let{padding:e=0,random:n=Math.random}=t;return(t,r)=>{let{encode:i,scale:a}=r,{y:o}=a,[l]=wM(i,"y"),s=T3(l,o,e),u=t.map(()=>(function(t,e,n){return e*(1-t)+n*t})(n(),...s));return[t,cy({scale:{y:{padding:.5}}},r,{encode:{dy:wO(u)}})]}};T8.props={};var T9=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let T7=(t={})=>{let{groupBy:e="x"}=t;return(t,n)=>{let{encode:r}=n,{x:i}=r,a=Object.entries(T9(r,["x"])).filter(([t])=>t.startsWith("y")).map(([t])=>[t,wM(r,t)[0]]),o=a.map(([e])=>[e,Array(t.length)]),l=Tm(e,t,n),s=Array(l.length);for(let t=0;t<l.length;t++){let[e,n]=dZ(l[t].flatMap(t=>a.map(([,e])=>+e[t])));s[t]=(e+n)/2}let u=Math.max(...s);for(let t=0;t<l.length;t++){let e=u-s[t];for(let n of l[t])for(let t=0;t<a.length;t++){let[,r]=a[t],[,i]=o[t];i[n]=+r[n]+e}}return[t,cy({},n,{encode:Object.fromEntries(o.map(([t,e])=>[t,wO(e,wM(r,t)[1])]))})]}};T7.props={};let Ct=(t={})=>{let{groupBy:e="x"}=t;return(t,n)=>{let{encode:r}=n,[i]=wM(r,"y"),[a,o]=wM(r,"y1"),l=Tm(e,t,n),s=Array(t.length);for(let t of l){let e=t.map(t=>+i[t]);for(let n=0;n<t.length;n++){let r=t[n],a=Math.max(...e.filter((t,e)=>e!==n));s[r]=+i[r]>a?a:i[r]}}return[t,cy({},n,{encode:{y1:wO(s,o)}})]}};Ct.props={};let Ce=t=>{let{groupBy:e=["x"],reducer:n=(t,e)=>e[t[0]],orderBy:r=null,reverse:i=!1,duration:a}=t;return(t,o)=>{let{encode:l}=o,s=(Array.isArray(e)?e:[e]).map(t=>[t,wM(l,t)[0]]);if(0===s.length)return[t,o];let u=[t];for(let[,t]of s){let e=[];for(let n of u){let r=Array.from(cs(n,e=>t[e]).values());e.push(...r)}u=e}if(r){let[t]=wM(l,r);t&&u.sort((e,r)=>n(e,t)-n(r,t)),i&&u.reverse()}let c=(a||3e3)/u.length,[f]=a?[w_(t,c)]:wE(l,"enterDuration",w_(t,c)),[h]=wE(l,"enterDelay",w_(t,0)),d=Array(t.length);for(let t=0,e=0;t<u.length;t++){let n=u[t],r=fE(n,t=>+f[t]);for(let t of n)d[t]=+h[t]+e;e+=r}return[t,cy({},o,{encode:{enterDuration:wk(f),enterDelay:wk(d)}})]}};Ce.props={};var Cn=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let Cr=(t={})=>{let{groupBy:e="x",basis:n="max"}=t;return(t,r)=>{let{encode:i,tooltip:a}=r,{x:o}=i,l=Object.entries(Cn(i,["x"])).filter(([t])=>t.startsWith("y")).map(([t])=>[t,wM(i,t)[0]]),[,s]=l.find(([t])=>"y"===t),u=l.map(([e])=>[e,Array(t.length)]),c=Tm(e,t,r),f="function"==typeof n?n:({min:(t,e)=>xO(t,t=>e[+t]),max:(t,e)=>fE(t,t=>e[+t]),first:(t,e)=>e[t[0]],last:(t,e)=>e[t[t.length-1]],mean:(t,e)=>Oi(t,t=>e[+t]),median:(t,e)=>Tz(t,.5,t=>e[+t]),sum:(t,e)=>fM(t,t=>e[+t]),deviation:(t,e)=>Tj(t,t=>e[+t])})[n]||fE;for(let t of c){let e=f(t,s);for(let n of t)for(let t=0;t<l.length;t++){let[,r]=l[t],[,i]=u[t];i[n]=r[n]/e}}let h=cU(a)||(null==a?void 0:a.items)&&(null==a?void 0:a.items.length)!==0;return[t,cy({},r,Object.assign({encode:Object.fromEntries(u.map(([t,e])=>[t,wO(e,wM(i,t)[1])]))},!h&&i.y0&&{tooltip:{items:[{channel:"y0"}]}}))]}};function Ci(t,e){return[t[0]]}function Ca(t,e){let n=t.length-1;return[t[n]]}function Co(t,e){let n=y6(t,t=>e[t]);return[t[n]]}function Cl(t,e){let n=Or(t,t=>e[t]);return[t[n]]}Cr.props={};let Cs=(t={})=>{let{groupBy:e="series",channel:n,selector:r}=t;return(t,i)=>{let{encode:a}=i,o=Tm(e,t,i),[l]=wM(a,n),s="function"==typeof r?r:({first:Ci,last:Ca,max:Co,min:Cl})[r]||Ci;return[o.flatMap(t=>s(t,l)),i]}};Cs.props={};var Cu=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let Cc=(t={})=>{let{selector:e}=t;return Cs(Object.assign({channel:"x",selector:e},Cu(t,["selector"])))};Cc.props={};var Cf=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let Ch=(t={})=>{let{selector:e}=t;return Cs(Object.assign({channel:"y",selector:e},Cf(t,["selector"])))};Ch.props={};var Cd=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let Cp=(t={})=>{let{channels:e=["x","y"]}=t;return TZ(Object.assign(Object.assign({},Cd(t,["channels"])),{groupBy:(t,n)=>Tm(e,t,n)}))};Cp.props={};let Cy=(t={})=>Cp(Object.assign(Object.assign({},t),{channels:["x","color","series"]}));Cy.props={};let Cg=(t={})=>Cp(Object.assign(Object.assign({},t),{channels:["y","color","series"]}));Cg.props={};let Cv=(t={})=>Cp(Object.assign(Object.assign({},t),{channels:["color"]}));Cv.props={};let Cm=(t={})=>(e,n)=>{var r,i;let{reverse:a,slice:o,channel:l,by:s,ordinal:u=!0,reducer:c}=t,{encode:f,scale:h={}}=n,d=h[l].domain,[p]=wM(f,null!=s?s:l),[y]=wM(f,l),g=function(t,e,n){let{by:r=t,reducer:i="max"}=e,[a]=wM(n,r);if("function"==typeof i)return t=>i(t,a);if("max"===i)return t=>fE(t,t=>+a[t]);if("min"===i)return t=>xO(t,t=>+a[t]);if("sum"===i)return t=>fM(t,t=>+a[t]);if("median"===i)return t=>Tz(t,.5,t=>+a[t]);if("mean"===i)return t=>Oi(t,t=>+a[t]);if("first"===i)return t=>a[t[0]];if("last"===i)return t=>a[t[t.length-1]];throw Error(`Unknown reducer: ${i}`)}(l,{by:s,reducer:c},f),v=(r=function(t,e,n){if(!Array.isArray(n))return t;let r=new Set(n);return t.filter(t=>r.has(e[t]))}(e,y,d),i=t=>y[t],(2!==g.length?gc(cc(r,g,i),([t,e],[n,r])=>gu(e,r)||gu(t,n)):gc(cs(r,i),([t,e],[n,r])=>g(e,r)||gu(t,n))).map(([t])=>t)),b=u?e:gc(e,t=>p[t]);return a&&(u||b.reverse(),v.reverse()),[b,cy(n,{scale:{[l]:{domain:o?v.slice(..."number"==typeof o?[0,o]:o):v}}})]};Cm.props={};let Cb=(t={})=>Cm(Object.assign(Object.assign({},t),{channel:"x"}));Cb.props={};let Cx=(t={})=>Cm(Object.assign(Object.assign({},t),{channel:"y"}));Cx.props={};let CO=(t={})=>Cm(Object.assign(Object.assign({},t),{channel:"color"}));CO.props={};let Cw=(t={})=>{let{field:e,channel:n="y",reducer:r="sum"}=t;return(t,i)=>{let{data:a,encode:o}=i,[l]=wM(o,"x"),s=cf(t,function(t,e){if("function"==typeof t)return n=>t(n,e);if("sum"===t)return t=>fM(t,t=>+e[t]);throw Error(`Unknown reducer: ${t}`)}(r,e?"string"==typeof e?a.map(t=>t[e]):a.map(e):wM(o,n)[0]),t=>l[t]).map(t=>t[1]);return[t,cy({},i,{scale:{x:{flex:s}}})]}};Cw.props={};let Ck=t=>(e,n)=>[e,cy({},n,{modifier:function(t){let{padding:e=0,direction:n="col"}=t;return(t,r,i)=>{let a=t.length;if(0===a)return[];let{innerWidth:o,innerHeight:l}=i,s=Math.ceil(Math.sqrt(r/(l/o))),u=o/s,c=Math.ceil(r/s),f=c*u;for(;f>l;)s+=1,u=o/s,f=(c=Math.ceil(r/s))*u;let h=l-c*u,d=c<=1?0:h/(c-1),[p,y]=c<=1?[(o-a*u)/(a-1),(l-u)/2]:[0,0];return t.map((t,r)=>{let[i,a,o,l]=yC(t),f="col"===n?r%s:Math.floor(r/c),g="col"===n?Math.floor(r/s):r%c,v=f*u,b=(c-g-1)*u+h,x=(u-e)/o,O=(u-e)/l;return`translate(${v-i+p*f+.5*e}, ${b-a-d*g-y+.5*e}) scale(${x}, ${O})`})}}(t),axis:!1})];function C_(t,e,n,r){let i,a,o,l=t.length;if(r>=l||0===r)return t;let s=n=>+e[t[n]],u=e=>+n[t[e]],c=[],f=(l-2)/(r-2),h=0;c.push(h);for(let t=0;t<r-2;t++){let e=0,n=0,r=Math.floor((t+1)*f)+1,d=Math.floor((t+2)*f)+1,p=(d=Math.min(d,l))-r;for(;r<d;r++)e+=s(r),n+=u(r);e/=p,n/=p;let y=Math.floor((t+0)*f)+1,g=Math.floor((t+1)*f)+1,v=[s(h),u(h)];for(i=a=-1;y<g;y++)(a=.5*Math.abs((v[0]-e)*(s(y)-v[1])-(v[0]-u(y))*(n-v[0])))>i&&(i=a,o=y);c.push(o),h=o}return c.push(l-1),c.map(e=>t[e])}Ck.props={};let CM=(t={})=>{let{strategy:e="median",thresholds:n=2e3,groupBy:r=["series","color"]}=t,i=function(t){if("function"==typeof t)return t;if("lttb"===t)return C_;let e={first:t=>[t[0]],last:t=>[t[t.length-1]],min:(t,e,n)=>[t[Or(t,t=>n[t])]],max:(t,e,n)=>[t[y6(t,t=>n[t])]],median:(t,e,n)=>[t[function(t,e,n=gB){if(!isNaN(e*=1)){if(r=Float64Array.from(t,(e,r)=>gB(n(t[r],r,t))),e<=0)return Or(r);if(e>=1)return y6(r);var r,i=Uint32Array.from(t,(t,e)=>e),a=r.length-1,o=Math.floor(a*e);return TB(i,o,0,a,(t,e)=>gh(r[t],r[e])),(o=function(t,e=gu){let n,r=!1;if(1===e.length){let i;for(let a of t){let t=e(a);(r?gu(t,i)>0:0===gu(t,t))&&(n=a,i=t,r=!0)}}else for(let i of t)(r?e(i,n)>0:0===e(i,i))&&(n=i,r=!0);return n}(i.subarray(0,o+1),t=>r[t]))>=0?o:-1}}(t,.5,t=>n[t])]]},n=e[t]||e.median;return(t,e,r,i)=>{let a=Math.max(1,Math.floor(t.length/i));return(function(t,e){let n=t.length,r=[],i=0;for(;i<n;)r.push(t.slice(i,i+=e));return r})(t,a).flatMap(t=>n(t,e,r))}}(e);return(t,e)=>{let{encode:a}=e,o=Tm(r,t,e),[l]=wM(a,"x"),[s]=wM(a,"y");return[o.flatMap(t=>i(t,l,s,n)),e]}};CM.props={};let CE=(t={})=>(e,n)=>{let{encode:r,data:i}=n,a=Object.entries(t).map(([t,e])=>{let[n]=wM(r,t);if(!n)return null;let[i,a=!0]="object"==typeof e?[e.value,e.ordinal]:[e,!0];if("function"==typeof i)return t=>i(n[t]);if(a){let t=Array.isArray(i)?i:[i];return 0===t.length?null:e=>t.includes(n[e])}{let[t,e]=i;return r=>n[r]>=t&&n[r]<=e}}).filter(cW),o=e.filter(t=>a.every(e=>e(t))),l=o.map((t,e)=>e);if(0===a.length)return[e,function(t){var e;let n,{encode:r}=t,i=Object.assign(Object.assign({},t),{encode:Object.assign(Object.assign({},t.encode),{y:Object.assign(Object.assign({},t.encode.y),{value:[]})})}),a=null==(e=null==r?void 0:r.color)?void 0:e.field;if(!r||!a)return i;for(let[t,e]of Object.entries(r))("x"===t||"y"===t)&&e.field===a&&(n=Object.assign(Object.assign({},n),{[t]:Object.assign(Object.assign({},e),{value:[]})}));return n?Object.assign(Object.assign({},t),{encode:Object.assign(Object.assign({},t.encode),n)}):i}(n)];let s=Object.entries(r).map(([t,e])=>[t,Object.assign(Object.assign({},e),{value:l.map(t=>e.value[o[t]]).filter(t=>void 0!==t)})]);return[l,cy({},n,{encode:Object.fromEntries(s),data:o.map(t=>i[t])})]};CE.props={};var CA={},CS={};function Cj(t){return Function("d","return {"+t.map(function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'}).join(",")+"}")}function CP(t){var e=Object.create(null),n=[];return t.forEach(function(t){for(var r in t)r in e||n.push(e[r]=r)}),n}function CT(t,e){var n=t+"",r=n.length;return r<e?Array(e-r+1).join(0)+n:n}function CC(t){for(var e in t){var n,r,i=t[e].trim();if(i)if("true"===i)i=!0;else if("false"===i)i=!1;else if("NaN"===i)i=NaN;else if(isNaN(n=+i))if(!(r=i.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/)))continue;else CN&&r[4]&&!r[7]&&(i=i.replace(/-/g,"/").replace(/T/," ")),i=new Date(i);else i=n;else i=null;t[e]=i}return t}let CN=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours(),CL=t=>{let{value:e,format:n=e.split(".").pop(),delimiter:r=",",autoType:i=!0}=t;return()=>{var t,a,o,l;return t=void 0,a=void 0,o=void 0,l=function*(){let t=yield fetch(e);if("csv"===n){let e=yield t.text();return(function(t){var e=RegExp('["'+t+"\n\r]"),n=t.charCodeAt(0);function r(t,e){var r,i=[],a=t.length,o=0,l=0,s=a<=0,u=!1;function c(){if(s)return CS;if(u)return u=!1,CA;var e,r,i=o;if(34===t.charCodeAt(i)){for(;o++<a&&34!==t.charCodeAt(o)||34===t.charCodeAt(++o););return(e=o)>=a?s=!0:10===(r=t.charCodeAt(o++))?u=!0:13===r&&(u=!0,10===t.charCodeAt(o)&&++o),t.slice(i+1,e-1).replace(/""/g,'"')}for(;o<a;){if(10===(r=t.charCodeAt(e=o++)))u=!0;else if(13===r)u=!0,10===t.charCodeAt(o)&&++o;else if(r!==n)continue;return t.slice(i,e)}return s=!0,t.slice(i,a)}for(10===t.charCodeAt(a-1)&&--a,13===t.charCodeAt(a-1)&&--a;(r=c())!==CS;){for(var f=[];r!==CA&&r!==CS;)f.push(r),r=c();e&&null==(f=e(f,l++))||i.push(f)}return i}function i(e,n){return e.map(function(e){return n.map(function(t){return o(e[t])}).join(t)})}function a(e){return e.map(o).join(t)}function o(t){var n,r,i,a,o,l;return null==t?"":t instanceof Date?(r=(n=t).getUTCHours(),i=n.getUTCMinutes(),a=n.getUTCSeconds(),o=n.getUTCMilliseconds(),isNaN(n)?"Invalid Date":((l=n.getUTCFullYear())<0?"-"+CT(-l,6):l>9999?"+"+CT(l,6):CT(l,4))+"-"+CT(n.getUTCMonth()+1,2)+"-"+CT(n.getUTCDate(),2)+(o?"T"+CT(r,2)+":"+CT(i,2)+":"+CT(a,2)+"."+CT(o,3)+"Z":a?"T"+CT(r,2)+":"+CT(i,2)+":"+CT(a,2)+"Z":i||r?"T"+CT(r,2)+":"+CT(i,2)+"Z":"")):e.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,e){var n,i,a=r(t,function(t,r){var a;if(n)return n(t,r-1);i=t,n=e?(a=Cj(t),function(n,r){return e(a(n),r,t)}):Cj(t)});return a.columns=i||[],a},parseRows:r,format:function(e,n){return null==n&&(n=CP(e)),[n.map(o).join(t)].concat(i(e,n)).join("\n")},formatBody:function(t,e){return null==e&&(e=CP(t)),i(t,e).join("\n")},formatRows:function(t){return t.map(a).join("\n")},formatRow:a,formatValue:o}})(r).parse(e,i?CC:cD)}if("json"===n)return yield t.json();throw Error(`Unknown format: ${n}.`)},new(o||(o=Promise))(function(e,n){function r(t){try{s(l.next(t))}catch(t){n(t)}}function i(t){try{s(l.throw(t))}catch(t){n(t)}}function s(t){var n;t.done?e(t.value):((n=t.value)instanceof o?n:new o(function(t){t(n)})).then(r,i)}s((l=l.apply(t,a||[])).next())})}};CL.props={};let CI=t=>{let{value:e}=t;return()=>e};CI.props={};let CR=t=>{let{fields:e=[]}=t,n=e.map(t=>{if(Array.isArray(t)){let[e,n=!0]=t;return[e,n]}return[t,!0]});return t=>[...t].sort((t,e)=>n.reduce((n,[r,i=!0])=>0!==n?n:i?t[r]<e[r]?-1:+(t[r]!==e[r]):t[r]>e[r]?-1:+(t[r]!==e[r]),0))};CR.props={};let CD=t=>{let{callback:e}=t;return t=>Array.isArray(t)?[...t].sort(e):t};function CB(t){return null!=t&&!Number.isNaN(t)}CD.props={};let CF=t=>{let{callback:e=CB}=t;return t=>t.filter(e)};CF.props={};let Cz=t=>{let{fields:e}=t;return t=>t.map(t=>(function(t,e=[]){return e.reduce((e,n)=>(n in t&&(e[n]=t[n]),e),{})})(t,e))};Cz.props={};let C$=t=>e=>t&&0!==Object.keys(t).length?e.map(e=>Object.entries(e).reduce((e,[n,r])=>(e[t[n]||n]=r,e),{})):e;C$.props={};let CW=t=>{let{fields:e,key:n="key",value:r="value"}=t;return t=>e&&0!==Object.keys(e).length?t.flatMap(t=>e.map(e=>Object.assign(Object.assign({},t),{[n]:e,[r]:t[e]}))):t};CW.props={};let CG=t=>{let{start:e,end:n}=t;return t=>t.slice(e,n)};CG.props={};let Cq=t=>{let{callback:e=cD}=t;return t=>e(t)};Cq.props={};let CH=t=>{let{callback:e=cD}=t;return t=>Array.isArray(t)?t.map(e):t};function CY(t){return"string"==typeof t?e=>e[t]:t}CH.props={};let CV=t=>{let{join:e,on:n,select:r=[],as:i=r,unknown:a=NaN}=t,[o,l]=n,s=CY(l),u=CY(o),c=cc(e,([t])=>t,t=>s(t));return t=>t.map(t=>{let e=c.get(u(t));return Object.assign(Object.assign({},t),r.reduce((t,n,r)=>(t[i[r]]=e?e[n]:a,t),{}))})};CV.props={};var CU=n(9339),CX=n.n(CU);let CK=t=>{let{field:e,groupBy:n,as:r=["y","size"],min:i,max:a,size:o=10,width:l}=t,[s,u]=r;return t=>Array.from(cs(t,t=>n.map(e=>t[e]).join("-")).values()).map(t=>{let n=CX().create(t.map(t=>t[e]),{min:i,max:a,size:o,width:l}),r=n.map(t=>t.x),c=n.map(t=>t.y);return Object.assign(Object.assign({},t[0]),{[s]:r,[u]:c})})};CK.props={};let CZ=()=>t=>(console.log("G2 data section:",t),t);CZ.props={};let CQ=Math.PI/180;function CJ(t){return t.text}function C0(){return"serif"}function C1(){return"normal"}function C2(t){return t.value}function C5(){return 90*~~(2*Math.random())}function C3(){return 1}function C4(){}function C6(t){let e=t[0]/t[1];return function(t){return[e*(t*=.1)*Math.cos(t),t*Math.sin(t)]}}function C8(t){let e=[],n=-1;for(;++n<t;)e[n]=0;return e}function C9(){return document.createElement("canvas")}function C7(t){return"function"==typeof t?t:function(){return t}}let Nt={archimedean:C6,rectangular:function(t){let e=4*t[0]/t[1],n=0,r=0;return function(t){let i=t<0?-1:1;switch(Math.sqrt(1+4*i*t)-i&3){case 0:n+=e;break;case 1:r+=4;break;case 2:n-=e;break;default:r-=4}return[n,r]}}};var Ne=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let Nn={fontSize:[20,60],font:"Impact",padding:2,rotate:function(){return(~~(6*Math.random())-3)*30}};function Nr(t){return new Promise((e,n)=>{if(t instanceof HTMLImageElement)return void e(t);if("string"==typeof t){let r=new Image;r.crossOrigin="anonymous",r.src=t,r.onload=()=>e(r),r.onerror=()=>{console.error(`'image ${t} load failed !!!'`),n()};return}n()})}let Ni=(t,e)=>n=>{var r,i,a,o;return r=void 0,i=void 0,a=void 0,o=function*(){let r,i,a,o,l,s,u,c,f,h,d,p,y,g,v,b=Object.assign({},Nn,t,{canvas:e.createCanvas}),x=(r=[256,256],i=CJ,a=C0,o=C2,l=C1,s=C5,u=C3,c=C6,f=Math.random,h=C4,d=[],p=null,y=1/0,g=C9,(v={}).start=function(){var t;let e,n,[b,x]=r,O=((t=g()).width=t.height=1,e=Math.sqrt(t.getContext("2d").getImageData(0,0,1,1).data.length>>2),t.width=2048/e,t.height=2048/e,(n=t.getContext("2d")).fillStyle=n.strokeStyle="red",n.textAlign="center",n.textBaseline="middle",{context:n,ratio:e}),w=v.board?v.board:C8((r[0]>>5)*r[1]),k=d.length,_=[],M=d.map(function(t,e,n){return t.text=i.call(this,t,e,n),t.font=a.call(this,t,e,n),t.style=C1.call(this,t,e,n),t.weight=l.call(this,t,e,n),t.rotate=s.call(this,t,e,n),t.size=~~o.call(this,t,e,n),t.padding=u.call(this,t,e,n),t}).sort(function(t,e){return e.size-t.size}),E=-1,A=v.board?[{x:0,y:0},{x:b,y:x}]:void 0;function S(){let t=Date.now();for(;Date.now()-t<y&&++E<k;){let t=M[E];t.x=b*(f()+.5)>>1,t.y=x*(f()+.5)>>1,function(t,e,n,r){if(e.sprite)return;let i=t.context,a=t.ratio;i.clearRect(0,0,2048/a,2048/a);let o=0,l=0,s=0,u=n.length;for(--r;++r<u;){e=n[r],i.save(),i.font=e.style+" "+e.weight+" "+~~((e.size+1)/a)+"px "+e.font;let t=i.measureText(e.text+"m").width*a,u=e.size<<1;if(e.rotate){let n=Math.sin(e.rotate*CQ),r=Math.cos(e.rotate*CQ),i=t*r,a=t*n,o=u*r,l=u*n;t=Math.max(Math.abs(i+l),Math.abs(i-l))+31>>5<<5,u=~~Math.max(Math.abs(a+o),Math.abs(a-o))}else t=t+31>>5<<5;if(u>s&&(s=u),o+t>=2048&&(o=0,l+=s,s=0),l+u>=2048)break;i.translate((o+(t>>1))/a,(l+(u>>1))/a),e.rotate&&i.rotate(e.rotate*CQ),i.fillText(e.text,0,0),e.padding&&(i.lineWidth=2*e.padding,i.strokeText(e.text,0,0)),i.restore(),e.width=t,e.height=u,e.xoff=o,e.yoff=l,e.x1=t>>1,e.y1=u>>1,e.x0=-e.x1,e.y0=-e.y1,e.hasText=!0,o+=t}let c=i.getImageData(0,0,2048/a,2048/a).data,f=[];for(;--r>=0;){if(!(e=n[r]).hasText)continue;let t=e.width,i=t>>5,a=e.y1-e.y0;for(let t=0;t<a*i;t++)f[t]=0;if(null==(o=e.xoff))return;l=e.yoff;let s=0,u=-1;for(let n=0;n<a;n++){for(let e=0;e<t;e++){let t=i*n+(e>>5),r=c[(l+n)*2048+(o+e)<<2]?1<<31-e%32:0;f[t]|=r,s|=r}s?u=n:(e.y0++,a--,n--,l++)}e.y1=e.y0+u,e.sprite=f.slice(0,(e.y1-e.y0)*i)}}(O,t,M,E),t.hasText&&function(t,e,n){let i=e.x,a=e.y,o=Math.sqrt(r[0]*r[0]+r[1]*r[1]),l=c(r),s=.5>f()?1:-1,u,h=-s,d,p;for(;(u=l(h+=s))&&!(Math.min(Math.abs(d=~~u[0]),Math.abs(p=~~u[1]))>=o);){;if((e.x=i+d,e.y=a+p,!(e.x+e.x0<0)&&!(e.y+e.y0<0)&&!(e.x+e.x1>r[0])&&!(e.y+e.y1>r[1]))&&(!n||!function(t,e,n){n>>=5;let r=t.sprite,i=t.width>>5,a=t.x-(i<<4),o=127&a,l=32-o,s=t.y1-t.y0,u=(t.y+t.y0)*n+(a>>5),c;for(let t=0;t<s;t++){c=0;for(let n=0;n<=i;n++)if((c<<l|(n<i?(c=r[t*i+n])>>>o:0))&e[u+n])return!0;u+=n}return!1}(e,t,r[0]))&&(!n||e.x+e.x1>n[0].x&&e.x+e.x0<n[1].x&&e.y+e.y1>n[0].y&&e.y+e.y0<n[1].y)){let n=e.sprite,i=e.width>>5,a=r[0]>>5,o=e.x-(i<<4),l=127&o,s=32-l,u=e.y1-e.y0,c,f=(e.y+e.y0)*a+(o>>5);for(let e=0;e<u;e++){c=0;for(let r=0;r<=i;r++)t[f+r]|=c<<s|(r<i?(c=n[e*i+r])>>>l:0);f+=a}return delete e.sprite,!0}}return!1}(w,t,A)&&(h.call(null,"word",{cloud:v,word:t}),_.push(t),A?v.hasImage||function(t,e){let n=t[0],r=t[1];e.x+e.x0<n.x&&(n.x=e.x+e.x0),e.y+e.y0<n.y&&(n.y=e.y+e.y0),e.x+e.x1>r.x&&(r.x=e.x+e.x1),e.y+e.y1>r.y&&(r.y=e.y+e.y1)}(A,t):A=[{x:t.x+t.x0,y:t.y+t.y0},{x:t.x+t.x1,y:t.y+t.y1}],t.x-=r[0]>>1,t.y-=r[1]>>1)}v._tags=_,v._bounds=A,E>=k&&(v.stop(),h.call(null,"end",{cloud:v,words:_,bounds:A}))}return p&&clearInterval(p),p=setInterval(S,0),S(),v},v.stop=function(){return p&&(clearInterval(p),p=null),v},v.createMask=t=>{let e=document.createElement("canvas"),[n,i]=r;if(!n||!i)return;let a=n>>5,o=C8((n>>5)*i);e.width=n,e.height=i;let l=e.getContext("2d");l.drawImage(t,0,0,t.width,t.height,0,0,n,i);let s=l.getImageData(0,0,n,i).data;for(let t=0;t<i;t++)for(let e=0;e<n;e++){let r=a*t+(e>>5),i=t*n+e<<2,l=s[i]>=250&&s[i+1]>=250&&s[i+2]>=250?1<<31-e%32:0;o[r]|=l}v.board=o,v.hasImage=!0},v.timeInterval=function(t){y=null==t?1/0:t},v.words=function(t){d=t},v.size=function(t=[]){r=[+t[0],+t[1]]},v.text=function(t){i=C7(t)},v.font=function(t){a=C7(t)},v.fontWeight=function(t){l=C7(t)},v.rotate=function(t){s=C7(t)},v.canvas=function(t){g=C7(t)},v.spiral=function(t){c=Nt[t]||t},v.fontSize=function(t){o=C7(t)},v.padding=function(t){u=C7(t)},v.random=function(t){f=C7(t)},v.on=function(t){h=C7(t)},v);yield({set(t,e,n){if(void 0===b[t])return this;let r=e?e.call(null,b[t]):b[t];return n?n.call(null,r):"function"==typeof x[t]?x[t](r):x[t]=r,this},setAsync(t,e,n){var r,i,a,o;return r=this,i=void 0,a=void 0,o=function*(){if(void 0===b[t])return this;let r=e?yield e.call(null,b[t]):b[t];return n?n.call(null,r):"function"==typeof x[t]?x[t](r):x[t]=r,this},new(a||(a=Promise))(function(t,e){function n(t){try{s(o.next(t))}catch(t){e(t)}}function l(t){try{s(o.throw(t))}catch(t){e(t)}}function s(e){var r;e.done?t(e.value):((r=e.value)instanceof a?r:new a(function(t){t(r)})).then(n,l)}s((o=o.apply(r,i||[])).next())})}}).set("fontSize",t=>{let e=n.map(t=>t.value);return function(t,e){if("function"==typeof t)return t;if(Array.isArray(t)){let[n,r]=t;if(!e)return()=>(r+n)/2;let[i,a]=e;return a===i?()=>(r+n)/2:({value:t})=>(r-n)/(a-i)*(t-i)+n}return()=>t}(t,[xO(e),fE(e)])}).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",Nr,x.createMask),x.words([...n]);let O=x.start(),[w,k]=b.size,_=[{x:0,y:0},{x:w,y:k}],{_bounds:M=_,_tags:E,hasImage:A}=O,S=E.map(t=>{var{x:e,y:n,font:r}=t;return Object.assign(Object.assign({},Ne(t,["x","y","font"])),{x:e+w/2,y:n+k/2,fontFamily:r})}),[{x:j,y:P},{x:T,y:C}]=M,N={text:"",value:0,opacity:0,fontSize:0};return S.push(Object.assign(Object.assign({},N),{x:A?0:j,y:A?0:P}),Object.assign(Object.assign({},N),{x:A?w:T,y:A?k:C})),S},new(a||(a=Promise))(function(t,e){function n(t){try{s(o.next(t))}catch(t){e(t)}}function l(t){try{s(o.throw(t))}catch(t){e(t)}}function s(e){var r;e.done?t(e.value):((r=e.value)instanceof a?r:new a(function(t){t(r)})).then(n,l)}s((o=o.apply(r,i||[])).next())})};Ni.props={};let Na=t=>{let{field:e="y",alpha:n=.6,as:r=e}=t;return t=>{let i=function(t,e){if(e<0||e>1)throw Error("alpha must be between 0 and 1.");if(0===t.length)return[];let n=t[0],r=[];for(let i of t){if(null==i){r.push(i),console.warn("EMA:The value is null or undefined",t);continue}null==n&&(n=i);let a=n*e+(1-e)*i;r.push(a),n=a}return r}(t.map(t=>t[e]),n);return t.map((t,e)=>Object.assign(Object.assign({},t),{[r]:i[e]}))}};function No(t){let{min:e,max:n}=t;return[[e[0],e[1]],[n[0],n[1]]]}function Nl(t,e,n=.01){let[r,i]=t,[a,o]=e;return r>=a[0]-n&&r<=o[0]+n&&i>=a[1]-n&&i<=o[1]+n}function Ns(t,e,n=.01){let[r,i]=t;return!(Nl(r,e,n)&&Nl(i,e,n))}Na.props={};function Nu(){let t=new Map;return[e=>t.get(e),(e,n)=>t.set(e,n)]}function Nc(t){return"object"==typeof t?t:iS(t)}function Nf(t){let e=t/255;return e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Nh(t,e,n){return .2126*Nf(t)+.7152*Nf(e)+.0722*Nf(n)}function Nd(t,e){if(!t||!e||t===e)return 1;let{r:n,g:r,b:i}=t,{r:a,g:o,b:l}=e,s=Nh(n,r,i),u=Nh(a,o,l);return(Math.max(s,u)+.05)/(Math.min(s,u)+.05)}function Np(t,e){let n=y6(e,e=>Nd(t,Nc(e)));return e[n]}function Ny(t){var e;let n=t.getAnimations();if(!n||0===n.length)return vg(t);let r=t.cloneNode(!0);r.style.visibility="hidden",n.forEach(t=>{let e=t.effect.getKeyframes();e&&e.length>0&&r.attr(e[e.length-1])}),null==(e=t.parentNode)||e.appendChild(r);let i=vg(r);return r.destroy(),i}let Ng=t=>t;function Nv(t,e){t&&Nb.hasOwnProperty(t.type)&&Nb[t.type](t,e)}var Nm={Feature:function(t,e){Nv(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)Nv(n[r].geometry,e)}},Nb={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){Nx(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)Nx(n[r],e,0)},Polygon:function(t,e){NO(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)NO(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)Nv(n[r],e)}};function Nx(t,e,n){var r,i=-1,a=t.length-n;for(e.lineStart();++i<a;)r=t[i],e.point(r[0],r[1],r[2]);e.lineEnd()}function NO(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)Nx(t[n],e,1);e.polygonEnd()}function Nw(t,e){t&&Nm.hasOwnProperty(t.type)?Nm[t.type](t,e):Nv(t,e)}class Nk{constructor(){this._partials=new Float64Array(32),this._n=0}add(t){let e=this._partials,n=0;for(let r=0;r<this._n&&r<32;r++){let i=e[r],a=t+i,o=Math.abs(t)<Math.abs(i)?t-(a-i):i-(a-t);o&&(e[n++]=o),t=a}return e[n]=t,this._n=n+1,this}valueOf(){let t=this._partials,e=this._n,n,r,i,a=0;if(e>0){for(a=t[--e];e>0&&(a=(n=a)+(r=t[--e]),!(i=r-(a-n))););e>0&&(i<0&&t[e-1]<0||i>0&&t[e-1]>0)&&(n=a+(r=2*i),r==n-a&&(a=n))}return a}}var N_=Math.PI,NM=N_/2,NE=N_/4,NA=2*N_,NS=180/N_,Nj=N_/180,NP=Math.abs,NT=Math.atan,NC=Math.atan2,NN=Math.cos,NL=Math.ceil,NI=Math.exp,NR=Math.log,ND=Math.pow,NB=Math.sin,NF=Math.sign||function(t){return t>0?1:t<0?-1:0},Nz=Math.sqrt,N$=Math.tan;function NW(t){return t>1?0:t<-1?N_:Math.acos(t)}function NG(t){return t>1?NM:t<-1?-NM:Math.asin(t)}function Nq(){}var NH,NY,NV,NU,NX,NK,NZ,NQ,NJ,N0=new Nk,N1=new Nk,N2={point:Nq,lineStart:Nq,lineEnd:Nq,polygonStart:function(){N2.lineStart=N5,N2.lineEnd=N6},polygonEnd:function(){N2.lineStart=N2.lineEnd=N2.point=Nq,N0.add(NP(N1)),N1=new Nk},result:function(){var t=N0/2;return N0=new Nk,t}};function N5(){N2.point=N3}function N3(t,e){N2.point=N4,NK=NQ=t,NZ=NJ=e}function N4(t,e){N1.add(NJ*t-NQ*e),NQ=t,NJ=e}function N6(){N4(NK,NZ)}var N8=1/0,N9=1/0,N7=-1/0,Lt=N7;let Le={point:function(t,e){t<N8&&(N8=t),t>N7&&(N7=t),e<N9&&(N9=e),e>Lt&&(Lt=e)},lineStart:Nq,lineEnd:Nq,polygonStart:Nq,polygonEnd:Nq,result:function(){var t=[[N8,N9],[N7,Lt]];return N7=Lt=-(N9=N8=1/0),t}};var Ln,Lr,Li,La,Lo=0,Ll=0,Ls=0,Lu=0,Lc=0,Lf=0,Lh=0,Ld=0,Lp=0,Ly={point:Lg,lineStart:Lv,lineEnd:Lx,polygonStart:function(){Ly.lineStart=LO,Ly.lineEnd=Lw},polygonEnd:function(){Ly.point=Lg,Ly.lineStart=Lv,Ly.lineEnd=Lx},result:function(){var t=Lp?[Lh/Lp,Ld/Lp]:Lf?[Lu/Lf,Lc/Lf]:Ls?[Lo/Ls,Ll/Ls]:[NaN,NaN];return Lo=Ll=Ls=Lu=Lc=Lf=Lh=Ld=Lp=0,t}};function Lg(t,e){Lo+=t,Ll+=e,++Ls}function Lv(){Ly.point=Lm}function Lm(t,e){Ly.point=Lb,Lg(Li=t,La=e)}function Lb(t,e){var n=t-Li,r=e-La,i=Nz(n*n+r*r);Lu+=i*(Li+t)/2,Lc+=i*(La+e)/2,Lf+=i,Lg(Li=t,La=e)}function Lx(){Ly.point=Lg}function LO(){Ly.point=Lk}function Lw(){L_(Ln,Lr)}function Lk(t,e){Ly.point=L_,Lg(Ln=Li=t,Lr=La=e)}function L_(t,e){var n=t-Li,r=e-La,i=Nz(n*n+r*r);Lu+=i*(Li+t)/2,Lc+=i*(La+e)/2,Lf+=i,Lh+=(i=La*t-Li*e)*(Li+t),Ld+=i*(La+e),Lp+=3*i,Lg(Li=t,La=e)}function LM(t){this._context=t}LM.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(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,NA)}},result:Nq};var LE,LA,LS,Lj,LP,LT=new Nk,LC={point:Nq,lineStart:function(){LC.point=LN},lineEnd:function(){LE&&LL(LA,LS),LC.point=Nq},polygonStart:function(){LE=!0},polygonEnd:function(){LE=null},result:function(){var t=+LT;return LT=new Nk,t}};function LN(t,e){LC.point=LL,LA=Lj=t,LS=LP=e}function LL(t,e){Lj-=t,LP-=e,LT.add(Nz(Lj*Lj+LP*LP)),Lj=t,LP=e}class LI{constructor(t){this._append=null==t?LR:function(t){let e=Math.floor(t);if(!(e>=0))throw RangeError(`invalid digits: ${t}`);if(e>15)return LR;if(e!==r){let t=10**e;r=e,i=function(e){let n=1;this._+=e[0];for(let r=e.length;n<r;++n)this._+=Math.round(arguments[n]*t)/t+e[n]}}return i}(t),this._radius=4.5,this._=""}pointRadius(t){return this._radius=+t,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){0===this._line&&(this._+="Z"),this._point=NaN}point(t,e){switch(this._point){case 0:this._append`M${t},${e}`,this._point=1;break;case 1:this._append`L${t},${e}`;break;default:if(this._append`M${t},${e}`,this._radius!==a||this._append!==i){let t=this._radius,e=this._;this._="",this._append`m0,${t}a${t},${t} 0 1,1 0,${-2*t}a${t},${t} 0 1,1 0,${2*t}z`,a=t,i=this._append,o=this._,this._=e}this._+=o}}result(){let t=this._;return this._="",t.length?t:null}}function LR(t){let e=1;this._+=t[0];for(let n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function LD(t,e){let n=3,r=4.5,i,a;function o(t){return t&&("function"==typeof r&&a.pointRadius(+r.apply(this,arguments)),Nw(t,i(a))),a.result()}return o.area=function(t){return Nw(t,i(N2)),N2.result()},o.measure=function(t){return Nw(t,i(LC)),LC.result()},o.bounds=function(t){return Nw(t,i(Le)),Le.result()},o.centroid=function(t){return Nw(t,i(Ly)),Ly.result()},o.projection=function(e){return arguments.length?(i=null==e?(t=null,Ng):(t=e).stream,o):t},o.context=function(t){return arguments.length?(a=null==t?(e=null,new LI(n)):new LM(e=t),"function"!=typeof r&&a.pointRadius(r),o):e},o.pointRadius=function(t){return arguments.length?(r="function"==typeof t?t:(a.pointRadius(+t),+t),o):r},o.digits=function(t){if(!arguments.length)return n;if(null==t)n=null;else{let e=Math.floor(t);if(!(e>=0))throw RangeError(`invalid digits: ${t}`);n=e}return null===e&&(a=new LI(n)),o},o.projection(t).digits(n).context(e)}function LB(t,e,n){t*=1,e*=1,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),a=Array(i);++r<i;)a[r]=t+r*n;return a}function LF(t,e,n){var r=LB(t,e-1e-6,n).concat(e);return function(t){return r.map(function(e){return[t,e]})}}function Lz(t,e,n){var r=LB(t,e-1e-6,n).concat(e);return function(t){return r.map(function(e){return[e,t]})}}function L$(){var t,e=[];return{point:function(e,n,r){t.push([e,n,r])},lineStart:function(){e.push(t=[])},lineEnd:Nq,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function LW(t,e){return 1e-6>NP(t[0]-e[0])&&1e-6>NP(t[1]-e[1])}function LG(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function Lq(t,e,n,r,i){var a,o,l=[],s=[];if(t.forEach(function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],o=t[e];if(LW(r,o)){if(!r[2]&&!o[2]){for(i.lineStart(),a=0;a<e;++a)i.point((r=t[a])[0],r[1]);i.lineEnd();return}o[0]+=2e-6}l.push(n=new LG(r,t,null,!0)),s.push(n.o=new LG(r,null,n,!1)),l.push(n=new LG(o,t,null,!1)),s.push(n.o=new LG(o,null,n,!0))}}),l.length){for(s.sort(e),LH(l),LH(s),a=0,o=s.length;a<o;++a)s[a].e=n=!n;for(var u,c,f=l[0];;){for(var h=f,d=!0;h.v;)if((h=h.n)===f)return;u=h.z,i.lineStart();do{if(h.v=h.o.v=!0,h.e){if(d)for(a=0,o=u.length;a<o;++a)i.point((c=u[a])[0],c[1]);else r(h.x,h.n.x,1,i);h=h.n}else{if(d)for(a=(u=h.p.z).length-1;a>=0;--a)i.point((c=u[a])[0],c[1]);else r(h.x,h.p.x,-1,i);h=h.p}u=(h=h.o).z,d=!d}while(!h.v);i.lineEnd()}}}function LH(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r<e;)i.n=n=t[r],n.p=i,i=n;i.n=n=t[0],n.p=i}}function LY(t){return[NC(t[1],t[0]),NG(t[2])]}function LV(t){var e=t[0],n=t[1],r=NN(n);return[r*NN(e),r*NB(e),NB(n)]}function LU(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function LX(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function LK(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function LZ(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function LQ(t){var e=Nz(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function LJ(t){return NP(t[0])<=N_?t[0]:NF(t[0])*((NP(t[0])+N_)%NA-N_)}function L0(t){return Array.from(function*(t){for(let e of t)yield*e}(t))}function L1(t,e,n,r){return function(i){var a,o,l,s=e(i),u=L$(),c=e(u),f=!1,h={point:d,lineStart:y,lineEnd:g,polygonStart:function(){h.point=v,h.lineStart=b,h.lineEnd=x,o=[],a=[]},polygonEnd:function(){h.point=d,h.lineStart=y,h.lineEnd=g,o=L0(o);var t=function(t,e){var n=LJ(e),r=e[1],i=NB(r),a=[NB(n),-NN(n),0],o=0,l=0,s=new Nk;1===i?r=NM+1e-6:-1===i&&(r=-NM-1e-6);for(var u=0,c=t.length;u<c;++u)if(h=(f=t[u]).length)for(var f,h,d=f[h-1],p=LJ(d),y=d[1]/2+NE,g=NB(y),v=NN(y),b=0;b<h;++b,p=O,g=k,v=_,d=x){var x=f[b],O=LJ(x),w=x[1]/2+NE,k=NB(w),_=NN(w),M=O-p,E=M>=0?1:-1,A=E*M,S=A>N_,j=g*k;if(s.add(NC(j*E*NB(A),v*_+j*NN(A))),o+=S?M+E*NA:M,S^p>=n^O>=n){var P=LX(LV(d),LV(x));LQ(P);var T=LX(a,P);LQ(T);var C=(S^M>=0?-1:1)*NG(T[2]);(r>C||r===C&&(P[0]||P[1]))&&(l+=S^M>=0?1:-1)}}return(o<-1e-6||o<1e-6&&s<-1e-12)^1&l}(a,r);o.length?(f||(i.polygonStart(),f=!0),Lq(o,L5,t,n,i)):t&&(f||(i.polygonStart(),f=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),f&&(i.polygonEnd(),f=!1),o=a=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function d(e,n){t(e,n)&&i.point(e,n)}function p(t,e){s.point(t,e)}function y(){h.point=p,s.lineStart()}function g(){h.point=d,s.lineEnd()}function v(t,e){l.push([t,e]),c.point(t,e)}function b(){c.lineStart(),l=[]}function x(){v(l[0][0],l[0][1]),c.lineEnd();var t,e,n,r,s=c.clean(),h=u.result(),d=h.length;if(l.pop(),a.push(l),l=null,d){if(1&s){if((e=(n=h[0]).length-1)>0){for(f||(i.polygonStart(),f=!0),i.lineStart(),t=0;t<e;++t)i.point((r=n[t])[0],r[1]);i.lineEnd()}return}d>1&&2&s&&h.push(h.pop().concat(h.shift())),o.push(h.filter(L2))}}return h}}function L2(t){return t.length>1}function L5(t,e){return((t=t.x)[0]<0?t[1]-NM-1e-6:NM-t[1])-((e=e.x)[0]<0?e[1]-NM-1e-6:NM-e[1])}let L3=L1(function(){return!0},function(t){var e,n=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(a,o){var l,s,u,c,f,h,d,p=a>0?N_:-N_,y=NP(a-n);1e-6>NP(y-N_)?(t.point(n,r=(r+o)/2>0?NM:-NM),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(p,r),t.point(a,r),e=0):i!==p&&y>=N_&&(1e-6>NP(n-i)&&(n-=1e-6*i),1e-6>NP(a-p)&&(a-=1e-6*p),l=n,s=r,u=a,c=o,r=NP(d=NB(l-u))>1e-6?NT((NB(s)*(h=NN(c))*NB(u)-NB(c)*(f=NN(s))*NB(l))/(f*h*d)):(s+c)/2,t.point(i,r),t.lineEnd(),t.lineStart(),t.point(p,r),e=0),t.point(n=a,r=o),i=p},lineEnd:function(){t.lineEnd(),n=r=NaN},clean:function(){return 2-e}}},function(t,e,n,r){var i;if(null==t)i=n*NM,r.point(-N_,i),r.point(0,i),r.point(N_,i),r.point(N_,0),r.point(N_,-i),r.point(0,-i),r.point(-N_,-i),r.point(-N_,0),r.point(-N_,i);else if(NP(t[0]-e[0])>1e-6){var a=t[0]<e[0]?N_:-N_;i=n*a/2,r.point(-a,i),r.point(0,i),r.point(a,i)}else r.point(e[0],e[1])},[-N_,-NM]);function L4(t,e){e=LV(e),e[0]-=t,LQ(e);var n=NW(-e[1]);return((0>-e[2]?-n:n)+NA-1e-6)%NA}function L6(t,e,n,r){function i(i,a){return t<=i&&i<=n&&e<=a&&a<=r}function a(i,a,l,u){var c=0,f=0;if(null==i||(c=o(i,l))!==(f=o(a,l))||0>s(i,a)^l>0)do u.point(0===c||3===c?t:n,c>1?r:e);while((c=(c+l+4)%4)!==f);else u.point(a[0],a[1])}function o(r,i){return 1e-6>NP(r[0]-t)?i>0?0:3:1e-6>NP(r[0]-n)?i>0?2:1:1e-6>NP(r[1]-e)?+(i>0):i>0?3:2}function l(t,e){return s(t.x,e.x)}function s(t,e){var n=o(t,1),r=o(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(o){var s,u,c,f,h,d,p,y,g,v,b,x=o,O=L$(),w={point:k,lineStart:function(){w.point=_,u&&u.push(c=[]),v=!0,g=!1,p=y=NaN},lineEnd:function(){s&&(_(f,h),d&&g&&O.rejoin(),s.push(O.result())),w.point=k,g&&x.lineEnd()},polygonStart:function(){x=O,s=[],u=[],b=!0},polygonEnd:function(){var e=function(){for(var e=0,n=0,i=u.length;n<i;++n)for(var a,o,l=u[n],s=1,c=l.length,f=l[0],h=f[0],d=f[1];s<c;++s)a=h,o=d,h=(f=l[s])[0],d=f[1],o<=r?d>r&&(h-a)*(r-o)>(d-o)*(t-a)&&++e:d<=r&&(h-a)*(r-o)<(d-o)*(t-a)&&--e;return e}(),n=b&&e,i=(s=L0(s)).length;(n||i)&&(o.polygonStart(),n&&(o.lineStart(),a(null,null,1,o),o.lineEnd()),i&&Lq(s,l,e,a,o),o.polygonEnd()),x=o,s=u=c=null}};function k(t,e){i(t,e)&&x.point(t,e)}function _(a,o){var l=i(a,o);if(u&&c.push([a,o]),v)f=a,h=o,d=l,v=!1,l&&(x.lineStart(),x.point(a,o));else if(l&&g)x.point(a,o);else{var s=[p=Math.max(-1e9,Math.min(1e9,p)),y=Math.max(-1e9,Math.min(1e9,y))],O=[a=Math.max(-1e9,Math.min(1e9,a)),o=Math.max(-1e9,Math.min(1e9,o))];!function(t,e,n,r,i,a){var o,l=t[0],s=t[1],u=e[0],c=e[1],f=0,h=1,d=u-l,p=c-s;if(o=n-l,!d&&o>0)return;if(o/=d,d<0){if(o<f)return;o<h&&(h=o)}else if(d>0){if(o>h)return;o>f&&(f=o)}if(o=i-l,d||!(o<0)){if(o/=d,d<0){if(o>h)return;o>f&&(f=o)}else if(d>0){if(o<f)return;o<h&&(h=o)}if(o=r-s,p||!(o>0)){if(o/=p,p<0){if(o<f)return;o<h&&(h=o)}else if(p>0){if(o>h)return;o>f&&(f=o)}if(o=a-s,p||!(o<0)){if(o/=p,p<0){if(o>h)return;o>f&&(f=o)}else if(p>0){if(o<f)return;o<h&&(h=o)}return f>0&&(t[0]=l+f*d,t[1]=s+f*p),h<1&&(e[0]=l+h*d,e[1]=s+h*p),!0}}}}(s,O,t,e,n,r)?l&&(x.lineStart(),x.point(a,o),b=!1):(g||(x.lineStart(),x.point(s[0],s[1])),x.point(O[0],O[1]),l||x.lineEnd(),b=!1)}p=a,y=o,g=l}return w}}function L8(t,e){function n(n,r){return e((n=t(n,r))[0],n[1])}return t.invert&&e.invert&&(n.invert=function(n,r){return(n=e.invert(n,r))&&t.invert(n[0],n[1])}),n}function L9(t,e){return NP(t)>N_&&(t-=Math.round(t/NA)*NA),[t,e]}function L7(t,e,n){return(t%=NA)?e||n?L8(Ie(t),In(e,n)):Ie(t):e||n?In(e,n):L9}function It(t){return function(e,n){return NP(e+=t)>N_&&(e-=Math.round(e/NA)*NA),[e,n]}}function Ie(t){var e=It(t);return e.invert=It(-t),e}function In(t,e){var n=NN(t),r=NB(t),i=NN(e),a=NB(e);function o(t,e){var o=NN(e),l=NN(t)*o,s=NB(t)*o,u=NB(e),c=u*n+l*r;return[NC(s*i-c*a,l*n-u*r),NG(c*i+s*a)]}return o.invert=function(t,e){var o=NN(e),l=NN(t)*o,s=NB(t)*o,u=NB(e),c=u*i-s*a;return[NC(s*i+u*a,l*n+c*r),NG(c*n-l*r)]},o}function Ir(t){return function(e){var n=new Ii;for(var r in t)n[r]=t[r];return n.stream=e,n}}function Ii(){}function Ia(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),Nw(n,t.stream(Le)),e(Le.result()),null!=r&&t.clipExtent(r),t}function Io(t,e,n){return Ia(t,function(n){var r=e[1][0]-e[0][0],i=e[1][1]-e[0][1],a=Math.min(r/(n[1][0]-n[0][0]),i/(n[1][1]-n[0][1])),o=+e[0][0]+(r-a*(n[1][0]+n[0][0]))/2,l=+e[0][1]+(i-a*(n[1][1]+n[0][1]))/2;t.scale(150*a).translate([o,l])},n)}function Il(t,e,n){return Io(t,[[0,0],e],n)}function Is(t,e,n){return Ia(t,function(n){var r=+e,i=r/(n[1][0]-n[0][0]),a=(r-i*(n[1][0]+n[0][0]))/2,o=-i*n[0][1];t.scale(150*i).translate([a,o])},n)}function Iu(t,e,n){return Ia(t,function(n){var r=+e,i=r/(n[1][1]-n[0][1]),a=-i*n[0][0],o=(r-i*(n[1][1]+n[0][1]))/2;t.scale(150*i).translate([a,o])},n)}L9.invert=L9,Ii.prototype={constructor:Ii,point:function(t,e){this.stream.point(t,e)},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()}};var Ic=NN(30*Nj);function If(t,e){var n;return+e?function(t,e){function n(r,i,a,o,l,s,u,c,f,h,d,p,y,g){var v=u-r,b=c-i,x=v*v+b*b;if(x>4*e&&y--){var O=o+h,w=l+d,k=s+p,_=Nz(O*O+w*w+k*k),M=NG(k/=_),E=1e-6>NP(NP(k)-1)||1e-6>NP(a-f)?(a+f)/2:NC(w,O),A=t(E,M),S=A[0],j=A[1],P=S-r,T=j-i,C=b*P-v*T;(C*C/x>e||NP((v*P+b*T)/x-.5)>.3||o*h+l*d+s*p<Ic)&&(n(r,i,a,o,l,s,S,j,E,O/=_,w/=_,k,y,g),g.point(S,j),n(S,j,E,O,w,k,u,c,f,h,d,p,y,g))}}return function(e){var r,i,a,o,l,s,u,c,f,h,d,p,y={point:g,lineStart:v,lineEnd:x,polygonStart:function(){e.polygonStart(),y.lineStart=O},polygonEnd:function(){e.polygonEnd(),y.lineStart=v}};function g(n,r){n=t(n,r),e.point(n[0],n[1])}function v(){c=NaN,y.point=b,e.lineStart()}function b(r,i){var a=LV([r,i]),o=t(r,i);n(c,f,u,h,d,p,c=o[0],f=o[1],u=r,h=a[0],d=a[1],p=a[2],16,e),e.point(c,f)}function x(){y.point=g,e.lineEnd()}function O(){v(),y.point=w,y.lineEnd=k}function w(t,e){b(r=t,e),i=c,a=f,o=h,l=d,s=p,y.point=b}function k(){n(c,f,u,h,d,p,i,a,r,o,l,s,16,e),y.lineEnd=x,x()}return y}}(t,e):(n=t,Ir({point:function(t,e){t=n(t,e),this.stream.point(t[0],t[1])}}))}var Ih=Ir({point:function(t,e){this.stream.point(t*Nj,e*Nj)}});function Id(t,e,n,r,i,a){if(!a){function o(a,o){return[e+t*(a*=r),n-t*(o*=i)]}return o.invert=function(a,o){return[(a-e)/t*r,(n-o)/t*i]},o}var l=NN(a),s=NB(a),u=l*t,c=s*t,f=l/t,h=s/t,d=(s*n-l*e)/t,p=(s*e+l*n)/t;function y(t,a){return[u*(t*=r)-c*(a*=i)+e,n-c*t-u*a]}return y.invert=function(t,e){return[r*(f*t-h*e+d),i*(p-h*t-f*e)]},y}function Ip(t){return Iy(function(){return t})()}function Iy(t){var e,n,r,i,a,o,l,s,u,c,f=150,h=480,d=250,p=0,y=0,g=0,v=0,b=0,x=0,O=1,w=1,k=null,_=L3,M=null,E=Ng,A=.5;function S(t){return s(t[0]*Nj,t[1]*Nj)}function j(t){return(t=s.invert(t[0],t[1]))&&[t[0]*NS,t[1]*NS]}function P(){var t=Id(f,0,0,O,w,x).apply(null,e(p,y)),r=Id(f,h-t[0],d-t[1],O,w,x);return n=L7(g,v,b),l=L8(e,r),s=L8(n,l),o=If(l,A),T()}function T(){return u=c=null,S}return S.stream=function(t){var e;return u&&c===t?u:u=Ih((e=n,Ir({point:function(t,n){var r=e(t,n);return this.stream.point(r[0],r[1])}}))(_(o(E(c=t)))))},S.preclip=function(t){return arguments.length?(_=t,k=void 0,T()):_},S.postclip=function(t){return arguments.length?(E=t,M=r=i=a=null,T()):E},S.clipAngle=function(t){return arguments.length?(_=+t?function(t){var e=NN(t),n=2*Nj,r=e>0,i=NP(e)>1e-6;function a(t,n){return NN(t)*NN(n)>e}function o(t,n,r){var i=LV(t),a=LV(n),o=[1,0,0],l=LX(i,a),s=LU(l,l),u=l[0],c=s-u*u;if(!c)return!r&&t;var f=LX(o,l),h=LZ(o,e*s/c);LK(h,LZ(l,-e*u/c));var d=LU(h,f),p=LU(f,f),y=d*d-p*(LU(h,h)-1);if(!(y<0)){var g=Nz(y),v=LZ(f,(-d-g)/p);if(LK(v,h),v=LY(v),!r)return v;var b,x=t[0],O=n[0],w=t[1],k=n[1];O<x&&(b=x,x=O,O=b);var _=O-x,M=1e-6>NP(_-N_);if(!M&&k<w&&(b=w,w=k,k=b),M||_<1e-6?M?w+k>0^v[1]<(1e-6>NP(v[0]-x)?w:k):w<=v[1]&&v[1]<=k:_>N_^(x<=v[0]&&v[0]<=O)){var E=LZ(f,(-d+g)/p);return LK(E,h),[v,LY(E)]}}}function l(e,n){var i=r?t:N_-t,a=0;return e<-i?a|=1:e>i&&(a|=2),n<-i?a|=4:n>i&&(a|=8),a}return L1(a,function(t){var e,n,s,u,c;return{lineStart:function(){u=s=!1,c=1},point:function(f,h){var d,p,y=[f,h],g=a(f,h),v=r?g?0:l(f,h):g?l(f+(f<0?N_:-N_),h):0;!e&&(u=s=g)&&t.lineStart(),g!==s&&(!(p=o(e,y))||LW(e,p)||LW(y,p))&&(y[2]=1),g!==s?(c=0,g?(t.lineStart(),p=o(y,e),t.point(p[0],p[1])):(p=o(e,y),t.point(p[0],p[1],2),t.lineEnd()),e=p):i&&e&&r^g&&!(v&n)&&(d=o(y,e,!0))&&(c=0,r?(t.lineStart(),t.point(d[0][0],d[0][1]),t.point(d[1][0],d[1][1]),t.lineEnd()):(t.point(d[1][0],d[1][1]),t.lineEnd(),t.lineStart(),t.point(d[0][0],d[0][1],3))),!g||e&&LW(e,y)||t.point(y[0],y[1]),e=y,s=g,n=v},lineEnd:function(){s&&t.lineEnd(),e=null},clean:function(){return c|(u&&s)<<1}}},function(e,r,i,a){!function(t,e,n,r,i,a){if(n){var o=NN(e),l=NB(e),s=r*n;null==i?(i=e+r*NA,a=e-s/2):(i=L4(o,i),a=L4(o,a),(r>0?i<a:i>a)&&(i+=r*NA));for(var u,c=i;r>0?c>a:c<a;c-=s)u=LY([o,-l*NN(c),-l*NB(c)]),t.point(u[0],u[1])}}(a,t,n,i,e,r)},r?[0,-t]:[-N_,t-N_])}(k=t*Nj):(k=null,L3),T()):k*NS},S.clipExtent=function(t){return arguments.length?(E=null==t?(M=r=i=a=null,Ng):L6(M=+t[0][0],r=+t[0][1],i=+t[1][0],a=+t[1][1]),T()):null==M?null:[[M,r],[i,a]]},S.scale=function(t){return arguments.length?(f=+t,P()):f},S.translate=function(t){return arguments.length?(h=+t[0],d=+t[1],P()):[h,d]},S.center=function(t){return arguments.length?(p=t[0]%360*Nj,y=t[1]%360*Nj,P()):[p*NS,y*NS]},S.rotate=function(t){return arguments.length?(g=t[0]%360*Nj,v=t[1]%360*Nj,b=t.length>2?t[2]%360*Nj:0,P()):[g*NS,v*NS,b*NS]},S.angle=function(t){return arguments.length?(x=t%360*Nj,P()):x*NS},S.reflectX=function(t){return arguments.length?(O=t?-1:1,P()):O<0},S.reflectY=function(t){return arguments.length?(w=t?-1:1,P()):w<0},S.precision=function(t){return arguments.length?(o=If(l,A=t*t),T()):Nz(A)},S.fitExtent=function(t,e){return Io(S,t,e)},S.fitSize=function(t,e){return Il(S,t,e)},S.fitWidth=function(t,e){return Is(S,t,e)},S.fitHeight=function(t,e){return Iu(S,t,e)},function(){return e=t.apply(this,arguments),S.invert=e.invert&&j,P()}}function Ig(t){var e=0,n=N_/3,r=Iy(t),i=r(e,n);return i.parallels=function(t){return arguments.length?r(e=t[0]*Nj,n=t[1]*Nj):[e*NS,n*NS]},i}function Iv(t,e){var n=NB(t),r=(n+NB(e))/2;if(1e-6>NP(r)){var i=NN(t);function a(t,e){return[t*i,NB(e)/i]}return a.invert=function(t,e){return[t/i,NG(e*i)]},a}var o=1+n*(2*r-n),l=Nz(o)/r;function s(t,e){var n=Nz(o-2*r*NB(e))/r;return[n*NB(t*=r),l-n*NN(t)]}return s.invert=function(t,e){var n=l-e,i=NC(t,NP(n))*NF(n);return n*r<0&&(i-=N_*NF(t)*NF(n)),[i/r,NG((o-(t*t+n*n)*r*r)/(2*r))]},s}function Im(){return Ig(Iv).scale(155.424).center([0,33.6442])}function Ib(){return Im().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function Ix(){var t,e,n,r,i,a,o=Ib(),l=Im().rotate([154,0]).center([-2,58.5]).parallels([55,65]),s=Im().rotate([157,0]).center([-3,19.9]).parallels([8,18]),u={point:function(t,e){a=[t,e]}};function c(t){var e=t[0],o=t[1];return a=null,n.point(e,o),a||(r.point(e,o),a)||(i.point(e,o),a)}function f(){return t=e=null,c}return c.invert=function(t){var e=o.scale(),n=o.translate(),r=(t[0]-n[0])/e,i=(t[1]-n[1])/e;return(i>=.12&&i<.234&&r>=-.425&&r<-.214?l:i>=.166&&i<.234&&r>=-.214&&r<-.115?s:o).invert(t)},c.stream=function(n){var r,i;return t&&e===n?t:(i=(r=[o.stream(e=n),l.stream(n),s.stream(n)]).length,t={point:function(t,e){for(var n=-1;++n<i;)r[n].point(t,e)},sphere:function(){for(var t=-1;++t<i;)r[t].sphere()},lineStart:function(){for(var t=-1;++t<i;)r[t].lineStart()},lineEnd:function(){for(var t=-1;++t<i;)r[t].lineEnd()},polygonStart:function(){for(var t=-1;++t<i;)r[t].polygonStart()},polygonEnd:function(){for(var t=-1;++t<i;)r[t].polygonEnd()}})},c.precision=function(t){return arguments.length?(o.precision(t),l.precision(t),s.precision(t),f()):o.precision()},c.scale=function(t){return arguments.length?(o.scale(t),l.scale(.35*t),s.scale(t),c.translate(o.translate())):o.scale()},c.translate=function(t){if(!arguments.length)return o.translate();var e=o.scale(),a=+t[0],c=+t[1];return n=o.translate(t).clipExtent([[a-.455*e,c-.238*e],[a+.455*e,c+.238*e]]).stream(u),r=l.translate([a-.307*e,c+.201*e]).clipExtent([[a-.425*e+1e-6,c+.12*e+1e-6],[a-.214*e-1e-6,c+.234*e-1e-6]]).stream(u),i=s.translate([a-.205*e,c+.212*e]).clipExtent([[a-.214*e+1e-6,c+.166*e+1e-6],[a-.115*e-1e-6,c+.234*e-1e-6]]).stream(u),f()},c.fitExtent=function(t,e){return Io(c,t,e)},c.fitSize=function(t,e){return Il(c,t,e)},c.fitWidth=function(t,e){return Is(c,t,e)},c.fitHeight=function(t,e){return Iu(c,t,e)},c.scale(1070)}function IO(t){return function(e,n){var r=NN(e),i=NN(n),a=t(r*i);return a===1/0?[2,0]:[a*i*NB(e),a*NB(n)]}}function Iw(t){return function(e,n){var r=Nz(e*e+n*n),i=t(r),a=NB(i);return[NC(e*a,r*NN(i)),NG(r&&n*a/r)]}}var Ik=IO(function(t){return Nz(2/(1+t))});function I_(){return Ip(Ik).scale(124.75).clipAngle(179.999)}Ik.invert=Iw(function(t){return 2*NG(t/2)});var IM=IO(function(t){return(t=NW(t))&&t/NB(t)});function IE(){return Ip(IM).scale(79.4188).clipAngle(179.999)}function IA(t,e){return[t,NR(N$((NM+e)/2))]}function IS(){return Ij(IA).scale(961/NA)}function Ij(t){var e,n,r,i=Ip(t),a=i.center,o=i.scale,l=i.translate,s=i.clipExtent,u=null;function c(){var a=N_*o(),l=i((function(t){function e(e){return e=t(e[0]*Nj,e[1]*Nj),e[0]*=NS,e[1]*=NS,e}return t=L7(t[0]*Nj,t[1]*Nj,t.length>2?t[2]*Nj:0),e.invert=function(e){return e=t.invert(e[0]*Nj,e[1]*Nj),e[0]*=NS,e[1]*=NS,e},e})(i.rotate()).invert([0,0]));return s(null==u?[[l[0]-a,l[1]-a],[l[0]+a,l[1]+a]]:t===IA?[[Math.max(l[0]-a,u),e],[Math.min(l[0]+a,n),r]]:[[u,Math.max(l[1]-a,e)],[n,Math.min(l[1]+a,r)]])}return i.scale=function(t){return arguments.length?(o(t),c()):o()},i.translate=function(t){return arguments.length?(l(t),c()):l()},i.center=function(t){return arguments.length?(a(t),c()):a()},i.clipExtent=function(t){return arguments.length?(null==t?u=e=n=r=null:(u=+t[0][0],e=+t[0][1],n=+t[1][0],r=+t[1][1]),c()):null==u?null:[[u,e],[n,r]]},c()}function IP(t){return N$((NM+t)/2)}function IT(t,e){var n=NN(t),r=t===e?NB(t):NR(n/NN(e))/NR(IP(e)/IP(t)),i=n*ND(IP(t),r)/r;if(!r)return IA;function a(t,e){i>0?e<-NM+1e-6&&(e=-NM+1e-6):e>NM-1e-6&&(e=NM-1e-6);var n=i/ND(IP(e),r);return[n*NB(r*t),i-n*NN(r*t)]}return a.invert=function(t,e){var n=i-e,a=NF(r)*Nz(t*t+n*n),o=NC(t,NP(n))*NF(n);return n*r<0&&(o-=N_*NF(t)*NF(n)),[o/r,2*NT(ND(i/a,1/r))-NM]},a}function IC(){return Ig(IT).scale(109.5).parallels([30,30])}function IN(t,e){return[t,e]}function IL(){return Ip(IN).scale(152.63)}function II(t,e){var n=NN(t),r=t===e?NB(t):(n-NN(e))/(e-t),i=n/r+t;if(1e-6>NP(r))return IN;function a(t,e){var n=i-e,a=r*t;return[n*NB(a),i-n*NN(a)]}return a.invert=function(t,e){var n=i-e,a=NC(t,NP(n))*NF(n);return n*r<0&&(a-=N_*NF(t)*NF(n)),[a/r,i-NF(r)*Nz(t*t+n*n)]},a}function IR(){return Ig(II).scale(131.154).center([0,13.9389])}IM.invert=Iw(function(t){return t}),IA.invert=function(t,e){return[t,2*NT(NI(e))-NM]},IN.invert=IN;var ID=Nz(3)/2;function IB(t,e){var n=NG(ID*NB(e)),r=n*n,i=r*r*r;return[t*NN(n)/(ID*(1.340264+-.24331799999999998*r+i*(.0062510000000000005+.034164*r))),n*(1.340264+-.081106*r+i*(893e-6+.003796*r))]}function IF(){return Ip(IB).scale(177.158)}function Iz(t,e){var n=NN(e),r=NN(t)*n;return[n*NB(t)/r,NB(e)/r]}function I$(){return Ip(Iz).scale(144.049).clipAngle(60)}function IW(){var t,e,n,r,i,a,o,l=1,s=0,u=0,c=1,f=1,h=0,d=null,p=1,y=1,g=Ir({point:function(t,e){var n=x([t,e]);this.stream.point(n[0],n[1])}}),v=Ng;function b(){return p=l*c,y=l*f,a=o=null,x}function x(n){var r=n[0]*p,i=n[1]*y;if(h){var a=i*t-r*e;r=r*t+i*e,i=a}return[r+s,i+u]}return x.invert=function(n){var r=n[0]-s,i=n[1]-u;if(h){var a=i*t+r*e;r=r*t-i*e,i=a}return[r/p,i/y]},x.stream=function(t){return a&&o===t?a:a=g(v(o=t))},x.postclip=function(t){return arguments.length?(v=t,d=n=r=i=null,b()):v},x.clipExtent=function(t){return arguments.length?(v=null==t?(d=n=r=i=null,Ng):L6(d=+t[0][0],n=+t[0][1],r=+t[1][0],i=+t[1][1]),b()):null==d?null:[[d,n],[r,i]]},x.scale=function(t){return arguments.length?(l=+t,b()):l},x.translate=function(t){return arguments.length?(s=+t[0],u=+t[1],b()):[s,u]},x.angle=function(n){return arguments.length?(e=NB(h=n%360*Nj),t=NN(h),b()):h*NS},x.reflectX=function(t){return arguments.length?(c=t?-1:1,b()):c<0},x.reflectY=function(t){return arguments.length?(f=t?-1:1,b()):f<0},x.fitExtent=function(t,e){return Io(x,t,e)},x.fitSize=function(t,e){return Il(x,t,e)},x.fitWidth=function(t,e){return Is(x,t,e)},x.fitHeight=function(t,e){return Iu(x,t,e)},x}function IG(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(-.013791+r*(.003971*n-.001529*r))),e*(1.007226+n*(.015085+r*(-.044475+.028874*n-.005916*r)))]}function Iq(){return Ip(IG).scale(175.295)}function IH(t,e){return[NN(e)*NB(t),NB(e)]}function IY(){return Ip(IH).scale(249.5).clipAngle(90.000001)}function IV(t,e){var n=NN(e),r=1+NN(t)*n;return[n*NB(t)/r,NB(e)/r]}function IU(){return Ip(IV).scale(250).clipAngle(142)}function IX(t,e){return[NR(N$((NM+e)/2)),-t]}function IK(){var t=Ij(IX),e=t.center,n=t.rotate;return t.center=function(t){return arguments.length?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return arguments.length?n([t[0],t[1],t.length>2?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90]).scale(159.155)}IB.invert=function(t,e){for(var n,r,i=e,a=i*i,o=a*a*a,l=0;l<12&&(r=i*(1.340264+-.081106*a+o*(893e-6+.003796*a))-e,i-=n=r/(1.340264+-.24331799999999998*a+o*(.0062510000000000005+.034164*a)),o=(a=i*i)*a*a,!(1e-12>NP(n)));++l);return[ID*t*(1.340264+-.24331799999999998*a+o*(.0062510000000000005+.034164*a))/NN(i),NG(NB(i)/ID)]},Iz.invert=Iw(NT),IG.invert=function(t,e){var n,r=e,i=25;do{var a=r*r,o=a*a;r-=n=(r*(1.007226+a*(.015085+o*(-.044475+.028874*a-.005916*o)))-e)/(1.007226+a*(.045255+o*(-.311325+.259866*a-.005916*11*o)))}while(NP(n)>1e-6&&--i>0);return[t/(.8707+(a=r*r)*(-.131979+a*(-.013791+a*a*a*(.003971-.001529*a)))),r]},IH.invert=Iw(NG),IV.invert=Iw(function(t){return 2*NT(t)}),IX.invert=function(t,e){return[-e,2*NT(NI(t))-NM]};var IZ=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function IQ(t){let{data:e}=t;if(Array.isArray(e))return Object.assign(Object.assign({},t),{data:{value:e}});let{type:n}=e;return"graticule10"===n?Object.assign(Object.assign({},t),{data:{value:[(function(){var t,e,n,r,i,a,o,l,s,u,c,f,h=10,d=10,p=90,y=360,g=2.5;function v(){return{type:"MultiLineString",coordinates:b()}}function b(){return LB(NL(r/p)*p,n,p).map(c).concat(LB(NL(l/y)*y,o,y).map(f)).concat(LB(NL(e/h)*h,t,h).filter(function(t){return NP(t%p)>1e-6}).map(s)).concat(LB(NL(a/d)*d,i,d).filter(function(t){return NP(t%y)>1e-6}).map(u))}return v.lines=function(){return b().map(function(t){return{type:"LineString",coordinates:t}})},v.outline=function(){return{type:"Polygon",coordinates:[c(r).concat(f(o).slice(1),c(n).reverse().slice(1),f(l).reverse().slice(1))]}},v.extent=function(t){return arguments.length?v.extentMajor(t).extentMinor(t):v.extentMinor()},v.extentMajor=function(t){return arguments.length?(r=+t[0][0],n=+t[1][0],l=+t[0][1],o=+t[1][1],r>n&&(t=r,r=n,n=t),l>o&&(t=l,l=o,o=t),v.precision(g)):[[r,l],[n,o]]},v.extentMinor=function(n){return arguments.length?(e=+n[0][0],t=+n[1][0],a=+n[0][1],i=+n[1][1],e>t&&(n=e,e=t,t=n),a>i&&(n=a,a=i,i=n),v.precision(g)):[[e,a],[t,i]]},v.step=function(t){return arguments.length?v.stepMajor(t).stepMinor(t):v.stepMinor()},v.stepMajor=function(t){return arguments.length?(p=+t[0],y=+t[1],v):[p,y]},v.stepMinor=function(t){return arguments.length?(h=+t[0],d=+t[1],v):[h,d]},v.precision=function(h){return arguments.length?(g=+h,s=LF(a,i,90),u=Lz(e,t,g),c=LF(l,o,90),f=Lz(r,n,g),v):g},v.extentMajor([[-180,-89.999999],[180,89.999999]]).extentMinor([[-180,-80.000001],[180,80.000001]])})()()]}}):"sphere"===n?Object.assign(Object.assign({},t),{sphere:!0,data:{value:[{type:"Sphere"}]}}):t}function IJ(t){return"geoPath"===t.type}let I0=()=>t=>{let e,{children:n,coordinate:r={}}=t;if(!Array.isArray(n))return[];let{type:i="equalEarth"}=r,a=IZ(r,["type"]),o=function(t){if("function"==typeof t)return t;let e=tt[`geo${fu(t)}`];if(!e)throw Error(`Unknown coordinate: ${t}`);return e}(i),l=n.map(e=>Object.assign(Object.assign({},e),{data:y_(e.data,t.data)})).map(IQ);return[Object.assign(Object.assign({},t),{type:"view",scale:{x:{type:"identity"},y:{type:"identity"}},axis:!1,coordinate:{type:function(){return[["custom",(t,n,r,i)=>{var s;let u=o();for(let[e,o]of(!function(t,e,n,r){let i,{outline:a=(i=e.filter(IJ)).find(t=>t.sphere)?{type:"Sphere"}:{type:"FeatureCollection",features:i.filter(t=>!t.sphere).flatMap(t=>t.data.value).flatMap(t=>(function(t){if(!t||!t.type)return null;let e={Point:"geometry",MultiPoint:"geometry",LineString:"geometry",MultiLineString:"geometry",Polygon:"geometry",MultiPolygon:"geometry",GeometryCollection:"geometry",Feature:"feature",FeatureCollection:"featureCollection"}[t.type];return e?"geometry"===e?{type:"FeatureCollection",features:[{type:"Feature",properties:{},geometry:t}]}:"feature"===e?{type:"FeatureCollection",features:[t]}:"featureCollection"===e?t:void 0:null})(t).features)}}=r,{size:o="fitExtent"}=r;"fitExtent"===o?function(t,e,n){let{x:r,y:i,width:a,height:o}=n;t.fitExtent([[r,i],[a,o]],e)}(t,a,n):"fitWidth"===o&&function(t,e,n){let{width:r,height:i}=n,[[a,o],[l,s]]=LD(t.fitWidth(r,e)).bounds(e),u=Math.ceil(s-o),c=Math.min(Math.ceil(l-a),u),f=t.scale()*(c-1)/c,[h,d]=t.translate();t.scale(f).translate([h,d+(i-u)/2]).precision(.2)}(t,a,n)}(u,l,{x:t,y:n,width:r,height:i},a),Object.entries(a)))null==(s=u[e])||s.call(u,o);e=LD(u);let c=new dV({domain:[t,t+r]}),f=new dV({domain:[n,n+i]});return{transform:t=>(t=>{let e=u(t);if(!e)return[null,null];let[n,r]=e;return[c.map(n),f.map(r)]})(t),untransform:t=>(t=>{if(!t)return null;let[e,n]=t,r=[c.invert(e),f.invert(n)];return u.invert(r)})(t)}}]]}},children:l.flatMap(t=>IJ(t)?function(t){let{style:n,tooltip:r={}}=t;return Object.assign(Object.assign({},t),{type:"path",tooltip:xM(r,{title:"id",items:[{channel:"color"}]}),style:Object.assign(Object.assign({},n),{d:t=>e(t)||[]})})}(t):t)})]};I0.props={};var I1=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let I2=()=>t=>{let{type:e,data:n,scale:r,encode:i,style:a,animate:o,key:l,state:s,tooltip:u}=t;return[Object.assign(Object.assign({type:"geoView"},I1(t,["type","data","scale","encode","style","animate","key","state","tooltip"])),{children:[{type:"geoPath",key:`${l}-0`,data:{value:n},scale:r,encode:i,style:a,animate:o,state:s,tooltip:u}]})]};function I5(t){return t.index}function I3(t,e){var n=t.get(e);if(!n)throw Error("node not found: "+e);return n}I2.props={};var I4=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let I6={joint:!0},I8={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}},I9={type:"point",axis:!1,legend:!1,encode:{x:"x",y:"y",size:5,color:"group",shape:"point"},style:{stroke:"#fff"}},I7={text:""},Rt=t=>{let{data:e,encode:n={},scale:r,style:i={},layout:a={},nodeLabels:o=[],linkLabels:l=[],animate:s={},tooltip:u={}}=t,{nodeKey:c=t=>t.id,linkKey:f=t=>t.id}=n,h=Object.assign({nodeKey:c,linkKey:f},I4(n,["nodeKey","linkKey"])),d=cG(h,"node"),p=cG(h,"link"),{links:y,nodes:g}=w5(e,h),{nodesData:v,linksData:b}=function(t,e,n){let{nodes:r,links:i}=t,{joint:a,nodeStrength:o,linkStrength:l}=e,{nodeKey:s=t=>t.id,linkKey:u=t=>t.id}=n,c=function(){var t,e,n,r,i,a=EQ(-30),o=1,l=1/0,s=.81;function u(n){var i,a=t.length,o=EU(t,Ez,E$).visitAfter(f);for(r=n,i=0;i<a;++i)e=t[i],o.visit(h)}function c(){if(t){var e,n,r=t.length;for(e=0,i=Array(r);e<r;++e)i[(n=t[e]).index]=+a(n,e,t)}}function f(t){var e,n,r,a,o,l=0,s=0;if(t.length){for(r=a=o=0;o<4;++o)(e=t[o])&&(n=Math.abs(e.value))&&(l+=e.value,s+=n,r+=n*e.x,a+=n*e.y);t.x=r/s,t.y=a/s}else{(e=t).x=e.data.x,e.y=e.data.y;do l+=i[e.data.index];while(e=e.next)}t.value=l}function h(t,a,u,c){if(!t.value)return!0;var f=t.x-e.x,h=t.y-e.y,d=c-a,p=f*f+h*h;if(d*d/s<p)return p<l&&(0===f&&(p+=(f=EJ(n))*f),0===h&&(p+=(h=EJ(n))*h),p<o&&(p=Math.sqrt(o*p)),e.vx+=f*t.value*r/p,e.vy+=h*t.value*r/p),!0;if(!t.length&&!(p>=l)){(t.data!==e||t.next)&&(0===f&&(p+=(f=EJ(n))*f),0===h&&(p+=(h=EJ(n))*h),p<o&&(p=Math.sqrt(o*p)));do t.data!==e&&(d=i[t.data.index]*r/p,e.vx+=f*d,e.vy+=h*d);while(t=t.next)}}return u.initialize=function(e,r){t=e,n=r,c()},u.strength=function(t){return arguments.length?(a="function"==typeof t?t:EQ(+t),c(),u):a},u.distanceMin=function(t){return arguments.length?(o=t*t,u):Math.sqrt(o)},u.distanceMax=function(t){return arguments.length?(l=t*t,u):Math.sqrt(l)},u.theta=function(t){return arguments.length?(s=t*t,u):Math.sqrt(s)},u}(),f=(function(t){var e,n,r,i,a,o,l=I5,s=function(t){return 1/Math.min(i[t.source.index],i[t.target.index])},u=EQ(30),c=1;function f(r){for(var i=0,l=t.length;i<c;++i)for(var s,u,f,h,d,p,y,g=0;g<l;++g)u=(s=t[g]).source,p=((p=Math.sqrt((h=(f=s.target).x+f.vx-u.x-u.vx||EJ(o))*h+(d=f.y+f.vy-u.y-u.vy||EJ(o))*d))-n[g])/p*r*e[g],h*=p,d*=p,f.vx-=h*(y=a[g]),f.vy-=d*y,u.vx+=h*(y=1-y),u.vy+=d*y}function h(){if(r){var o,s,u=r.length,c=t.length,f=new Map(r.map((t,e)=>[l(t,e,r),t]));for(o=0,i=Array(u);o<c;++o)(s=t[o]).index=o,"object"!=typeof s.source&&(s.source=I3(f,s.source)),"object"!=typeof s.target&&(s.target=I3(f,s.target)),i[s.source.index]=(i[s.source.index]||0)+1,i[s.target.index]=(i[s.target.index]||0)+1;for(o=0,a=Array(c);o<c;++o)s=t[o],a[o]=i[s.source.index]/(i[s.source.index]+i[s.target.index]);e=Array(c),d(),n=Array(c),p()}}function d(){if(r)for(var n=0,i=t.length;n<i;++n)e[n]=+s(t[n],n,t)}function p(){if(r)for(var e=0,i=t.length;e<i;++e)n[e]=+u(t[e],e,t)}return null==t&&(t=[]),f.initialize=function(t,e){r=t,o=e,h()},f.links=function(e){return arguments.length?(t=e,h(),f):t},f.id=function(t){return arguments.length?(l=t,f):l},f.iterations=function(t){return arguments.length?(c=+t,f):c},f.strength=function(t){return arguments.length?(s="function"==typeof t?t:EQ(+t),d(),f):s},f.distance=function(t){return arguments.length?(u="function"==typeof t?t:EQ(+t),p(),f):u},f})(i).id(w1(u));"function"==typeof o&&c.strength(o),"function"==typeof l&&f.strength(l);let h=EG(r).force("link",f).force("charge",c);a?h.force("center",function(t,e){var n,r=1;function i(){var i,a,o=n.length,l=0,s=0;for(i=0;i<o;++i)l+=(a=n[i]).x,s+=a.y;for(l=(l/o-t)*r,s=(s/o-e)*r,i=0;i<o;++i)a=n[i],a.x-=l,a.y-=s}return null==t&&(t=0),null==e&&(e=0),i.initialize=function(t){n=t},i.x=function(e){return arguments.length?(t=+e,i):t},i.y=function(t){return arguments.length?(e=+t,i):e},i.strength=function(t){return arguments.length?(r=+t,i):r},i}()):h.force("x",E2()).force("y",E5()),h.stop();let d=Math.ceil(Math.log(h.alphaMin())/Math.log(1-h.alphaDecay()));for(let t=0;t<d;t++)h.tick();return{nodesData:r,linksData:i}}({links:y,nodes:g},cy({},I6,a),h),x=x_(u,"link",{items:[t=>({name:"source",value:w1(f)(t.source)}),t=>({name:"target",value:w1(f)(t.target)})]}),O=x_(u,"node",{items:[t=>({name:"key",value:w1(c)(t)})]},!0);return[cy({},I8,{data:b,encode:p,labels:l,style:cG(i,"link"),tooltip:x,animate:xA(s,"link")}),cy({},I9,{data:v,encode:Object.assign({},d),scale:r,style:cG(i,"node"),tooltip:O,labels:[Object.assign(Object.assign({},I7),cG(i,"label")),...o],animate:xA(s,"link")})]};function Re(t,e){return t.parent===e.parent?1:2}function Rn(t){var e=t.children;return e?e[0]:t.t}function Rr(t){var e=t.children;return e?e[e.length-1]:t.t}function Ri(t,e){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=e}function Ra(){var t=Re,e=1,n=1,r=null;function i(i){var s=function(t){for(var e,n,r,i,a,o=new Ri(t,0),l=[o];e=l.pop();)if(r=e._.children)for(e.children=Array(a=r.length),i=a-1;i>=0;--i)l.push(n=e.children[i]=new Ri(r[i],i)),n.parent=e;return(o.parent=new Ri(null,0)).children=[o],o}(i);if(s.eachAfter(a),s.parent.m=-s.z,s.eachBefore(o),r)i.eachBefore(l);else{var u=i,c=i,f=i;i.eachBefore(function(t){t.x<u.x&&(u=t),t.x>c.x&&(c=t),t.depth>f.depth&&(f=t)});var h=u===c?1:t(u,c)/2,d=h-u.x,p=e/(c.x+h+d),y=n/(f.depth||1);i.eachBefore(function(t){t.x=(t.x+d)*p,t.y=t.depth*y})}return i}function a(e){var n=e.children,r=e.parent.children,i=e.i?r[e.i-1]:null;if(n){!function(t){for(var e,n=0,r=0,i=t.children,a=i.length;--a>=0;)e=i[a],e.z+=n,e.m+=n,n+=e.s+(r+=e.c)}(e);var a=(n[0].z+n[n.length-1].z)/2;i?(e.z=i.z+t(e._,i._),e.m=e.z-a):e.z=a}else i&&(e.z=i.z+t(e._,i._));e.parent.A=function(e,n,r){if(n){for(var i,a,o,l=e,s=e,u=n,c=l.parent.children[0],f=l.m,h=s.m,d=u.m,p=c.m;u=Rr(u),l=Rn(l),u&&l;)c=Rn(c),(s=Rr(s)).a=e,(o=u.z+d-l.z-f+t(u._,l._))>0&&(!function(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}((i=u,a=r,i.a.parent===e.parent?i.a:a),e,o),f+=o,h+=o),d+=u.m,f+=l.m,p+=c.m,h+=s.m;u&&!Rr(s)&&(s.t=u,s.m+=d-h),l&&!Rn(c)&&(c.t=l,c.m+=f-p,r=e)}return r}(e,i,e.parent.A||r[0])}function o(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function l(t){t.x*=e,t.y=t.depth*n}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i}function Ro(t,e){return t.parent===e.parent?1:2}function Rl(t,e){return t+e.x}function Rs(t,e){return Math.max(t,e.y)}function Ru(){var t=Ro,e=1,n=1,r=!1;function i(i){var a,o=0;i.eachAfter(function(e){var n=e.children;n?(e.x=n.reduce(Rl,0)/n.length,e.y=1+n.reduce(Rs,0)):(e.x=a?o+=t(e,a):0,e.y=0,a=e)});var l=function(t){for(var e;e=t.children;)t=e[0];return t}(i),s=function(t){for(var e;e=t.children;)t=e[e.length-1];return t}(i),u=l.x-t(l,s)/2,c=s.x+t(s,l)/2;return i.eachAfter(r?function(t){t.x=(t.x-i.x)*e,t.y=(i.y-t.y)*n}:function(t){t.x=(t.x-u)/(c-u)*e,t.y=(1-(i.y?t.y/i.y:1))*n})}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i}Rt.props={},Ri.prototype=Object.create(O4.prototype);let Rc=t=>e=>n=>{let{field:r="value",nodeSize:i,separation:a,sortBy:o,as:l=["x","y"]}=e,[s,u]=l,c=O0(n,t=>t.children).sum(t=>t[r]).sort(o),f=t();f.size([1,1]),i&&f.nodeSize(i),a&&f.separation(a),f(c);let h=[];c.each(t=>{t[s]=t.x,t[u]=t.y,t.name=t.data.name,h.push(t)});let d=c.links();return d.forEach(t=>{t[s]=[t.source[s],t.target[s]],t[u]=[t.source[u],t.target[u]]}),{nodes:h,edges:d}},Rf=t=>Rc(Ru)(t);Rf.props={};let Rh=t=>Rc(Ra)(t);Rh.props={};let Rd={sortBy:(t,e)=>e.value-t.value},Rp={axis:!1,legend:!1,type:"point",encode:{x:"x",y:"y",size:2,shape:"point"}},Ry={type:"link",encode:{x:"x",y:"y",shape:"smooth"}},Rg={text:"",fontSize:10},Rv=t=>{let{data:e,encode:n={},scale:r={},style:i={},layout:a={},nodeLabels:o=[],linkLabels:l=[],animate:s={},tooltip:u={}}=t,c=null==n?void 0:n.value,{nodes:f,edges:h}=Rh(Object.assign(Object.assign(Object.assign({},Rd),a),{field:c}))(e),d=x_(u,"node",{title:"name",items:["value"]},!0),p=x_(u,"link",{title:"",items:[t=>({name:"source",value:t.source.name}),t=>({name:"target",value:t.target.name})]});return[cy({},Ry,{data:h,encode:cG(n,"link"),scale:cG(r,"link"),labels:l,style:Object.assign({stroke:"#999"},cG(i,"link")),tooltip:p,animate:xA(s,"link")}),cy({},Rp,{data:f,scale:cG(r,"node"),encode:cG(n,"node"),labels:[Object.assign(Object.assign({},Rg),cG(i,"label")),...o],style:Object.assign({},cG(i,"node")),tooltip:d,animate:xA(s,"node")})]};function Rm(t,e){var n=t.r-e.r,r=e.x-t.x,i=e.y-t.y;return n<0||n*n<r*r+i*i}function Rb(t,e){var n=t.r-e.r+1e-9*Math.max(t.r,e.r,1),r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function Rx(t,e){for(var n=0;n<e.length;++n)if(!Rb(t,e[n]))return!1;return!0}function RO(t,e){var n=t.x,r=t.y,i=t.r,a=e.x,o=e.y,l=e.r,s=a-n,u=o-r,c=l-i,f=Math.sqrt(s*s+u*u);return{x:(n+a+s/f*c)/2,y:(r+o+u/f*c)/2,r:(f+i+l)/2}}function Rw(t,e,n){var r=t.x,i=t.y,a=t.r,o=e.x,l=e.y,s=e.r,u=n.x,c=n.y,f=n.r,h=r-o,d=r-u,p=i-l,y=i-c,g=s-a,v=f-a,b=r*r+i*i-a*a,x=b-o*o-l*l+s*s,O=b-u*u-c*c+f*f,w=d*p-h*y,k=(p*O-y*x)/(2*w)-r,_=(y*g-p*v)/w,M=(d*x-h*O)/(2*w)-i,E=(h*v-d*g)/w,A=_*_+E*E-1,S=2*(a+k*_+M*E),j=k*k+M*M-a*a,P=-(Math.abs(A)>1e-6?(S+Math.sqrt(S*S-4*A*j))/(2*A):j/S);return{x:r+k+_*P,y:i+M+E*P,r:P}}function Rk(t,e,n){var r,i,a,o,l=t.x-e.x,s=t.y-e.y,u=l*l+s*s;u?(i=e.r+n.r,i*=i,o=t.r+n.r,i>(o*=o)?(r=(u+o-i)/(2*u),a=Math.sqrt(Math.max(0,o/u-r*r)),n.x=t.x-r*l-a*s,n.y=t.y-r*s+a*l):(r=(u+i-o)/(2*u),a=Math.sqrt(Math.max(0,i/u-r*r)),n.x=e.x+r*l-a*s,n.y=e.y+r*s+a*l)):(n.x=e.x+n.r,n.y=e.y)}function R_(t,e){var n=t.r+e.r-1e-6,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function RM(t){var e=t._,n=t.next._,r=e.r+n.r,i=(e.x*n.r+n.x*e.r)/r,a=(e.y*n.r+n.y*e.r)/r;return i*i+a*a}function RE(t){this._=t,this.next=null,this.previous=null}function RA(t){return Math.sqrt(t.value)}function RS(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function Rj(t,e,n){return function(r){if(i=r.children){var i,a,o,l=i.length,s=t(r)*e||0;if(s)for(a=0;a<l;++a)i[a].r+=s;if(o=function(t,e){var n,r,i,a,o,l,s,u,c,f,h,d;if(!(a=(t="object"==typeof(d=t)&&"length"in d?d:Array.from(d)).length))return 0;if((n=t[0]).x=0,n.y=0,!(a>1))return n.r;if(r=t[1],n.x=-r.r,r.x=n.r,r.y=0,!(a>2))return n.r+r.r;Rk(r,n,i=t[2]),n=new RE(n),r=new RE(r),i=new RE(i),n.next=i.previous=r,r.next=n.previous=i,i.next=r.previous=n;e:for(s=3;s<a;++s){Rk(n._,r._,i=t[s]),i=new RE(i),u=r.next,c=n.previous,f=r._.r,h=n._.r;do if(f<=h){if(R_(u._,i._)){r=u,n.next=r,r.previous=n,--s;continue e}f+=u._.r,u=u.next}else{if(R_(c._,i._)){(n=c).next=r,r.previous=n,--s;continue e}h+=c._.r,c=c.previous}while(u!==c.next);for(i.previous=n,i.next=r,n.next=r.previous=r=i,o=RM(n);(i=i.next)!==r;)(l=RM(i))<o&&(n=i,o=l);r=n.next}for(n=[r._],i=r;(i=i.next)!==r;)n.push(i._);for(s=0,i=function(t,e){for(var n,r,i=0,a=(t=function(t,e){let n=t.length,r,i;for(;n;)i=e()*n--|0,r=t[n],t[n]=t[i],t[i]=r;return t}(Array.from(t),e)).length,o=[];i<a;)n=t[i],r&&Rb(r,n)?++i:(r=function(t){switch(t.length){case 1:var e;return{x:(e=t[0]).x,y:e.y,r:e.r};case 2:return RO(t[0],t[1]);case 3:return Rw(t[0],t[1],t[2])}}(o=function(t,e){var n,r;if(Rx(e,t))return[e];for(n=0;n<t.length;++n)if(Rm(e,t[n])&&Rx(RO(t[n],e),t))return[t[n],e];for(n=0;n<t.length-1;++n)for(r=n+1;r<t.length;++r)if(Rm(RO(t[n],t[r]),e)&&Rm(RO(t[n],e),t[r])&&Rm(RO(t[r],e),t[n])&&Rx(Rw(t[n],t[r],e),t))return[t[n],t[r],e];throw Error()}(o,n)),i=0);return r}(n,e);s<a;++s)n=t[s],n.x-=i.x,n.y-=i.y;return i.r}(i,n),s)for(a=0;a<l;++a)i[a].r-=s;r.r=o+s}}}function RP(t){return function(e){var n=e.parent;e.r*=t,n&&(e.x=n.x+t*e.x,e.y=n.y+t*e.y)}}Rv.props={};var RT=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let RC={text:"",position:"inside",textOverflow:"clip",wordWrap:!0,maxLines:1,wordWrapWidth:t=>2*t.r},RN={title:t=>t.data.name,items:[{field:"value"}]},RL=(t,e)=>{let{width:n,height:r}=e,{data:i,encode:a={},scale:o={},style:l={},layout:s={},labels:u=[],tooltip:c={}}=t,f=RT(t,["data","encode","scale","style","layout","labels","tooltip"]),h={type:"point",axis:!1,legend:!1,scale:{x:{domain:[0,n]},y:{domain:[0,r]},size:{type:"identity"}},encode:{x:"x",y:"y",size:"r",shape:"point"},style:{fill:a.color?void 0:t=>0===t.height?"#ddd":"#fff",stroke:a.color?void 0:t=>0===t.height?"":"#000"}},d=((t,e,n)=>{let{value:r}=n,i=ns(t)?Pm().path(e.path)(t):O0(t);return r?i.sum(t=>w1(r)(t)).sort(e.sort):i.count(),(function(){var t=null,e=1,n=1,r=PS;function i(i){let a,o=(a=1,()=>(a=(1664525*a+0x3c6ef35f)%0x100000000)/0x100000000);return i.x=e/2,i.y=n/2,t?i.eachBefore(RS(t)).eachAfter(Rj(r,.5,o)).eachBefore(RP(1)):i.eachBefore(RS(RA)).eachAfter(Rj(PS,1,o)).eachAfter(Rj(r,i.r/Math.min(e,n),o)).eachBefore(RP(Math.min(e,n)/(2*i.r))),i}return i.radius=function(e){return arguments.length?(t=Pf(e),i):t},i.size=function(t){return arguments.length?(e=+t[0],n=+t[1],i):[e,n]},i.padding=function(t){return arguments.length?(r="function"==typeof t?t:Pj(+t),i):r},i})().size(e.size).padding(e.padding)(i),i.descendants()})(i,cy({},{size:[n,r],padding:0,sort:(t,e)=>e.value-t.value},s),cy({},h.encode,a)),p=cG(l,"label");return cy({},h,Object.assign(Object.assign({data:d,encode:a,scale:o,style:l,labels:[Object.assign(Object.assign({},RC),p),...u]},f),{tooltip:xM(c,RN),axis:!1}))};function RI(t){return t.target.depth}function RR(t,e){return t.sourceLinks.length?t.depth:e-1}function RD(t){return function(){return t}}function RB(t,e){return Rz(t.source,e.source)||t.index-e.index}function RF(t,e){return Rz(t.target,e.target)||t.index-e.index}function Rz(t,e){return t.y0-e.y0}function R$(t){return t.value}function RW(t){return t.index}function RG(t){return t.nodes}function Rq(t){return t.links}function RH(t,e){let n=t.get(e);if(!n)throw Error("missing: "+e);return n}function RY({nodes:t}){for(let e of t){let t=e.y0,n=t;for(let n of e.sourceLinks)n.y0=t+n.width/2,t+=n.width;for(let t of e.targetLinks)t.y1=n+t.width/2,n+=t.width}}RL.props={};let RV={nodeAlign:"justify",nodeWidth:.008,nodePadding:.03,nodes:t=>t.nodes,links:t=>t.links,nodeSort:void 0,linkSort:void 0,iterations:6},RU={left:function(t){return t.depth},right:function(t,e){return e-1-t.height},center:function(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?xO(t.sourceLinks,RI)-1:0},justify:RR},RX=t=>e=>{let n,{nodeId:r,nodeSort:i,nodeAlign:a,nodeWidth:o,nodePadding:l,nodeDepth:s,nodes:u,links:c,linkSort:f,iterations:h}=Object.assign({},RV,t),d=(function(){let t,e,n,r=0,i=0,a=1,o=1,l=24,s=8,u,c=RW,f=RR,h=RG,d=Rq,p=6;function y(y){let v={nodes:h(y),links:d(y)};return function({nodes:t,links:e}){t.forEach((t,e)=>{t.index=e,t.sourceLinks=[],t.targetLinks=[]});let r=new Map(t.map(t=>[c(t),t]));if(e.forEach((t,e)=>{t.index=e;let{source:n,target:i}=t;"object"!=typeof n&&(n=t.source=RH(r,n)),"object"!=typeof i&&(i=t.target=RH(r,i)),n.sourceLinks.push(t),i.targetLinks.push(t)}),null!=n)for(let{sourceLinks:e,targetLinks:r}of t)e.sort(n),r.sort(n)}(v),function({nodes:t}){for(let e of t)e.value=void 0===e.fixedValue?Math.max(fM(e.sourceLinks,R$),fM(e.targetLinks,R$)):e.fixedValue}(v),function({nodes:e}){let n=e.length,r=new Set(e),i=new Set,a=0;for(;r.size;){if(r.forEach(t=>{for(let{target:e}of(t.depth=a,t.sourceLinks))i.add(e)}),++a>n)throw Error("circular link");r=i,i=new Set}if(t){let n,r=Math.max(fE(e,t=>t.depth)+1,0);for(let i=0;i<e.length;i++)(n=e[i]).depth=t.call(null,n,r)}}(v),function({nodes:t}){let e=t.length,n=new Set(t),r=new Set,i=0;for(;n.size;){if(n.forEach(t=>{for(let{source:e}of(t.height=i,t.targetLinks))r.add(e)}),++i>e)throw Error("circular link");n=r,r=new Set}}(v),function(t){let c=function({nodes:t}){let n=Math.max(fE(t,t=>t.depth)+1,0),i=(a-r-l)/(n-1),o=Array(n).fill(0).map(()=>[]);for(let e of t){let t=Math.max(0,Math.min(n-1,Math.floor(f.call(null,e,n))));e.layer=t,e.x0=r+t*i,e.x1=e.x0+l,o[t]?o[t].push(e):o[t]=[e]}if(e)for(let t of o)t.sort(e);return o}(t);u=Math.min(s,(o-i)/(fE(c,t=>t.length)-1));let h=xO(c,t=>(o-i-(t.length-1)*u)/fM(t,R$));for(let t of c){let e=i;for(let n of t)for(let t of(n.y0=e,n.y1=e+n.value*h,e=n.y1+u,n.sourceLinks))t.width=t.value*h;e=(o-e+u)/(t.length+1);for(let n=0;n<t.length;++n){let r=t[n];r.y0+=e*(n+1),r.y1+=e*(n+1)}var d=t;if(void 0===n)for(let{sourceLinks:t,targetLinks:e}of d)t.sort(RF),e.sort(RB)}for(let t=0;t<p;++t){let n=Math.pow(.99,t),r=Math.max(1-n,(t+1)/p);(function(t,n,r){for(let i=t.length,a=i-2;a>=0;--a){let i=t[a];for(let t of i){let e=0,r=0;for(let{target:n,value:i}of t.sourceLinks){let a=i*(n.layer-t.layer);e+=function(t,e){let n=e.y0-(e.targetLinks.length-1)*u/2;for(let{source:r,width:i}of e.targetLinks){if(r===t)break;n+=i+u}for(let{target:r,width:i}of t.sourceLinks){if(r===e)break;n-=i}return n}(t,n)*a,r+=a}if(!(r>0))continue;let i=(e/r-t.y0)*n;t.y0+=i,t.y1+=i,x(t)}void 0===e&&i.sort(Rz),i.length&&g(i,r)}})(c,n,r),function(t,n,r){for(let i=1,a=t.length;i<a;++i){let a=t[i];for(let t of a){let e=0,r=0;for(let{source:n,value:i}of t.targetLinks){let a=i*(t.layer-n.layer);e+=function(t,e){let n=t.y0-(t.sourceLinks.length-1)*u/2;for(let{target:r,width:i}of t.sourceLinks){if(r===e)break;n+=i+u}for(let{source:r,width:i}of e.targetLinks){if(r===t)break;n-=i}return n}(n,t)*a,r+=a}if(!(r>0))continue;let i=(e/r-t.y0)*n;t.y0+=i,t.y1+=i,x(t)}void 0===e&&a.sort(Rz),a.length&&g(a,r)}}(c,n,r)}}(v),RY(v),v}function g(t,e){let n=t.length>>1,r=t[n];b(t,r.y0-u,n-1,e),v(t,r.y1+u,n+1,e),b(t,o,t.length-1,e),v(t,i,0,e)}function v(t,e,n,r){for(;n<t.length;++n){let i=t[n],a=(e-i.y0)*r;a>1e-6&&(i.y0+=a,i.y1+=a),e=i.y1+u}}function b(t,e,n,r){for(;n>=0;--n){let i=t[n],a=(i.y1-e)*r;a>1e-6&&(i.y0-=a,i.y1-=a),e=i.y0-u}}function x({sourceLinks:t,targetLinks:e}){if(void 0===n){for(let{source:{sourceLinks:t}}of e)t.sort(RF);for(let{target:{targetLinks:e}}of t)e.sort(RB)}}return y.update=function(t){return RY(t),t},y.nodeId=function(t){return arguments.length?(c="function"==typeof t?t:RD(t),y):c},y.nodeAlign=function(t){return arguments.length?(f="function"==typeof t?t:RD(t),y):f},y.nodeDepth=function(e){return arguments.length?(t=e,y):t},y.nodeSort=function(t){return arguments.length?(e=t,y):e},y.nodeWidth=function(t){return arguments.length?(l=+t,y):l},y.nodePadding=function(t){return arguments.length?(s=u=+t,y):s},y.nodes=function(t){return arguments.length?(h="function"==typeof t?t:RD(t),y):h},y.links=function(t){return arguments.length?(d="function"==typeof t?t:RD(t),y):d},y.linkSort=function(t){return arguments.length?(n=t,y):n},y.size=function(t){return arguments.length?(r=i=0,a=+t[0],o=+t[1],y):[a-r,o-i]},y.extent=function(t){return arguments.length?(r=+t[0][0],a=+t[1][0],i=+t[0][1],o=+t[1][1],y):[[r,i],[a,o]]},y.iterations=function(t){return arguments.length?(p=+t,y):p},y})().nodeSort(i).linkSort(f).links(c).nodes(u).nodeWidth(o).nodePadding(l).nodeDepth(s).nodeAlign("string"==(n=typeof a)?RU[a]||RR:"function"===n?a:RR).iterations(h).extent([[0,0],[1,1]]);"function"==typeof r&&d.nodeId(r);let{nodes:p,links:y}=d(e);return{nodes:p.map(t=>{let{x0:e,x1:n,y0:r,y1:i}=t;return Object.assign(Object.assign({},t),{x:[e,n,n,e],y:[r,r,i,i]})}),links:y.map(t=>{let{source:e,target:n}=t,r=e.x1,i=n.x0,a=t.width/2;return Object.assign(Object.assign({},t),{x:[r,r,i,i],y:[t.y0+a,t.y0-a,t.y1+a,t.y1-a]})})}};RX.props={};var RK=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let RZ={nodeId:t=>t.key,nodeWidth:.02,nodePadding:.02},RQ={type:"polygon",axis:!1,legend:!1,encode:{shape:"polygon",x:"x",y:"y"},scale:{x:{type:"identity"},y:{type:"identity"}},style:{stroke:"#000"}},RJ={type:"polygon",axis:!1,legend:!1,encode:{shape:"ribbon",x:"x",y:"y"},style:{fillOpacity:.5,stroke:void 0}},R0={textAlign:t=>t.x[0]<.5?"start":"end",position:t=>t.x[0]<.5?"right":"left",fontSize:10},R1=t=>{let{data:e,encode:n={},scale:r,style:i={},layout:a={},nodeLabels:o=[],linkLabels:l=[],animate:s={},tooltip:u={},interaction:c,state:f={},viewStyle:h={}}=t,{links:d,nodes:p}=w5(e,n);if(!d||0===d.length)return[cy({},RQ,{data:[],encode:{},scale:r,style:cG(i,"node"),viewStyle:h,labels:[],tooltip:!1,animate:!1,axis:!1,interaction:c,state:{}}),cy({},RJ,{data:[],encode:{},labels:[],style:cG(i,"link"),tooltip:!1,animate:!1,interaction:c,state:{}})];let y=cG(n,"node"),g=cG(n,"link"),{key:v=t=>t.key,color:b=v}=y,{links:x,nodes:O}=RX(Object.assign(Object.assign(Object.assign({},RZ),{nodeId:w1(v)}),a))({links:d,nodes:p}),w=cG(i,"label"),{text:k=v,spacing:_=5}=w,M=RK(w,["text","spacing"]),E=w1(v),A=x_(u,"node",{title:E,items:[{field:"value"}]},!0),S=x_(u,"link",{title:"",items:[t=>({name:"source",value:E(t.source)}),t=>({name:"target",value:E(t.target)})]}),[j,P]=Object.entries(f).reduce((t,[e,n])=>{let r=cH(n,"node","link"),i=cG(n,"node");t[0][e]=Object.assign(Object.assign({},r),i);let a=cG(n,"link");return t[1][e]=Object.assign(Object.assign({},r),a),t},[{},{}]);return[cy({},RQ,{data:O,encode:Object.assign(Object.assign({},y),{color:b}),scale:r,style:cG(i,"node"),viewStyle:h,labels:[Object.assign(Object.assign(Object.assign({},R0),{text:k,dx:t=>t.x[0]<.5?_:-_}),M),...o],tooltip:A,animate:xA(s,"node"),axis:!1,interaction:c,state:j}),cy({},RJ,{data:x,encode:g,labels:l,style:Object.assign({fill:g.color?void 0:"#aaa",lineWidth:0},cG(i,"link")),tooltip:S,animate:xA(s,"link"),interaction:c,state:P})]};function R2(t,e){return e.value-t.value}function R5(t,e){return e.frequency-t.frequency}function R3(t,e){return`${t.id}`.localeCompare(`${e.id}`)}function R4(t,e){return`${t.name}`.localeCompare(`${e.name}`)}R1.props={};let R6={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},R8=t=>e=>(function(t){let{y:e,thickness:n,weight:r,marginRatio:i,id:a,source:o,target:l,sourceWeight:s,targetWeight:u,sortBy:c}=Object.assign(Object.assign({},R6),t);return function(t){var f,h,d;let p,y,g,v=t.nodes.map(t=>Object.assign({},t)),b=t.edges.map(t=>Object.assign({},t));return f=v,(h=b).forEach(t=>{t.source=o(t),t.target=l(t),t.sourceWeight=s(t),t.targetWeight=u(t)}),p=cs(h,t=>t.source),y=cs(h,t=>t.target),f.forEach(t=>{t.id=a(t);let e=p.has(t.id)?p.get(t.id):[],n=y.has(t.id)?y.get(t.id):[];t.frequency=e.length+n.length,t.value=fM(e,t=>t.sourceWeight)+fM(n,t=>t.targetWeight)}),d=v,(g="function"==typeof c?c:te[c])&&d.sort(g),function(t){let a=t.length;if(!a)throw cz("Invalid nodes: it's empty!");if(!r){let n=1/a;return t.forEach((t,r)=>{t.x=(r+.5)*n,t.y=e})}let o=i/(2*a),l=t.reduce((t,e)=>t+=e.value,0);t.reduce((t,r)=>{r.weight=r.value/l,r.width=r.weight*(1-i),r.height=n;let a=o+t,s=a+r.width,u=e-n/2,c=u+n;return r.x=[a,s,s,a],r.y=[u,u,c,c],t+r.width+2*o},0)}(v),function(t,n){let i=new Map(t.map(t=>[t.id,t]));if(!r)return n.forEach(t=>{let e=o(t),n=l(t),r=i.get(e),a=i.get(n);r&&a&&(t.x=[r.x,a.x],t.y=[r.y,a.y])});n.forEach(t=>{t.x=[0,0,0,0],t.y=[e,e,e,e]});let a=cs(n,t=>t.source),s=cs(n,t=>t.target);t.forEach(t=>{let{edges:e,width:n,x:r,y:i,value:o,id:l}=t,u=a.get(l)||[],c=s.get(l)||[],f=0;u.map(t=>{let e=t.sourceWeight/o*n;t.x[0]=r[0]+f,t.x[1]=r[0]+f+e,f+=e}),c.forEach(t=>{let e=t.targetWeight/o*n;t.x[3]=r[0]+f,t.x[2]=r[0]+f+e,f+=e})})}(v,b),{nodes:v,edges:b}}})(t)(e);R8.props={};var R9=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let R7={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},Dt={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}},De={type:"polygon",axis:!1,legend:!1,encode:{shape:"ribbon",x:"x",y:"y"},style:{opacity:.5,lineWidth:1}},Dn={position:"outside",fontSize:10},Dr=(t,e)=>{let{data:n,encode:r={},scale:i,style:a={},layout:o={},nodeLabels:l=[],linkLabels:s=[],animate:u={},tooltip:c={}}=t,{nodes:f,links:h}=w5(n,r),d=cG(r,"node"),p=cG(r,"link"),{key:y=t=>t.key,color:g=y}=d,{linkEncodeColor:v=t=>t.source}=p,{nodeWidthRatio:b=R7.thickness,nodePaddingRatio:x=R7.marginRatio}=o,O=R9(o,["nodeWidthRatio","nodePaddingRatio"]),{nodes:w,edges:k}=R8(Object.assign(Object.assign(Object.assign(Object.assign({},R7),{id:w1(y),thickness:b,marginRatio:x}),O),{weight:!0}))({nodes:f,edges:h}),_=cG(a,"label"),{text:M=y}=_,E=R9(_,["text"]),A=x_(c,"node",{title:"",items:[t=>({name:t.key,value:t.value})]},!0),S=x_(c,"link",{title:"",items:[t=>({name:`${t.source} -> ${t.target}`,value:t.value})]}),{height:j,width:P}=e,T=Math.min(j,P);return[cy({},De,{data:k,encode:Object.assign(Object.assign({},p),{color:v}),labels:s,style:Object.assign({fill:v?void 0:"#aaa"},cG(a,"link")),tooltip:S,animate:xA(u,"link")}),cy({},Dt,{data:w,encode:Object.assign(Object.assign({},d),{color:g}),scale:i,style:cG(a,"node"),coordinate:{type:"polar",outerRadius:(T-20)/T,startAngle:-(2*Math.PI),endAngle:0},labels:[Object.assign(Object.assign(Object.assign({},Dn),{text:M}),E),...l],tooltip:A,animate:xA(u,"node"),axis:!1})]};Dr.props={};var Di=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let Da={fontSize:10,text:t=>dT(t.path),position:"inside",fill:"#000",textOverflow:"clip",wordWrap:!0,maxLines:1,wordWrapWidth:t=>t.x1-t.x0,isTreemapLabel:!0},Do={title:t=>{var e,n;return null==(n=null==(e=t.path)?void 0:e.join)?void 0:n.call(e,".")},items:[{field:"value"}]},Dl={title:t=>dT(t.path),items:[{field:"value"}]},Ds=(t,e)=>{let{width:n,height:r,options:i}=e,{data:a,encode:o={},scale:l,style:s={},layout:u={},labels:c=[],tooltip:f={}}=t,h=Di(t,["data","encode","scale","style","layout","labels","tooltip"]),d=cr(i,["interaction","treemapDrillDown"])||cr(i,["marks",0,"interaction","treemapDrillDown"]),p=cy({},{tile:"treemapSquarify",ratio:.5*(1+Math.sqrt(5)),size:[n,r],round:!1,ignoreParentValue:!0,padding:0,paddingInner:0,paddingOuter:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,sort:(t,e)=>e.value-t.value,layer:0},u,{layer:d?t=>1===t.depth:u.layer}),[y,g]=PP(a,p,o),v=cG(s,"label");return cy({},{type:"rect",axis:!1,encode:{x:"x",y:"y",key:"id",color:t=>t.path[1]},scale:{x:{domain:[0,n],range:[0,1]},y:{domain:[0,r],range:[0,1]}},style:{stroke:"#fff"},state:{active:{opacity:.6},inactive:{opacity:1}}},Object.assign(Object.assign({data:y,scale:l,style:s,labels:[Object.assign(Object.assign(Object.assign({},Da),v),d&&{cursor:"pointer"}),...c]},h),{encode:o,tooltip:xM(f,Do),axis:!1}),d?{interaction:Object.assign(Object.assign({},h.interaction),{treemapDrillDown:d?Object.assign(Object.assign({},d),{originData:g,layout:p}):void 0}),encode:Object.assign({color:t=>dT(t.path)},o),tooltip:xM(f,Dl)}:{})};Ds.props={};var Du=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function Dc(t,e){return xO(t,t=>e[t])}function Df(t,e){return fE(t,t=>e[t])}function Dh(t,e){let n=2.5*Dd(t,e)-1.5*Dy(t,e);return xO(t,t=>e[t]>=n?e[t]:NaN)}function Dd(t,e){return Tz(t,.25,t=>e[t])}function Dp(t,e){return Tz(t,.5,t=>e[t])}function Dy(t,e){return Tz(t,.75,t=>e[t])}function Dg(t,e){let n=2.5*Dy(t,e)-1.5*Dd(t,e);return fE(t,t=>e[t]<=n?e[t]:NaN)}function Dv(){return(t,e)=>{let{encode:n}=e,{y:r,x:i}=n,{value:a}=r,{value:o}=i;return[Array.from(cs(t,t=>o[+t]).values()).flatMap(t=>{let e=Dh(t,a),n=Dg(t,a);return t.filter(t=>a[t]<e||a[t]>n)}),e]}}let Dm=t=>{let{data:e,encode:n,style:r={},tooltip:i={},transform:a,animate:o}=t,l=Du(t,["data","encode","style","tooltip","transform","animate"]),{point:s=!0}=r,u=Du(r,["point"]),{y:c}=n,f={y:c,y1:c,y2:c,y3:c,y4:c},h={y1:Dd,y2:Dp,y3:Dy},d=x_(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=x_(i,"point",{title:{channel:"x"},items:[{name:"outlier",channel:"y"}]});if(!s)return Object.assign({type:"box",data:e,transform:[Object.assign(Object.assign({type:"groupX",y:Dc},h),{y4:Df})],encode:Object.assign(Object.assign({},n),f),style:u,tooltip:d},l);let y=cG(u,"box"),g=cG(u,"point");return[Object.assign({type:"box",data:e,transform:[Object.assign(Object.assign({type:"groupX",y:Dh},h),{y4:Dg})],encode:Object.assign(Object.assign({},n),f),style:y,tooltip:d,animate:xA(o,"box")},l),{type:"point",data:e,transform:[{type:Dv}],encode:n,style:Object.assign({},g),tooltip:p,animate:xA(o,"point")}]};Dm.props={};let Db=(t,e)=>Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2))/2,Dx=(t,e)=>{if(!e)return;let{coordinate:n}=e;if(!(null==n?void 0:n.getCenter))return;let r=n.getCenter();return(n,i,a)=>{var o,l;let s,u,{document:c}=e.canvas,{color:f,index:h}=i,d=c.createElement("g",{}),p=Db(n[0],n[1]),y=2*Db(n[0],r),g=(o=n[3],l=n[0],s=Math.atan2(o[1]-r[1],o[0]-r[0]),(u=Math.atan2(l[1]-r[1],l[0]-r[0])-s)<0&&(u+=2*Math.PI),u>Math.PI),v=c.createElement("path",{style:Object.assign(Object.assign(Object.assign({d:[["M",...n[0]],["A",p,p,0,1,0,...n[1]],["A",y+2*p,y+2*p,0,+!!g,0,...n[2]],["A",p,p,0,1,+(0!==h),...n[3]],["A",y,y,0,+!!g,1,...n[0]],["Z"]]},a),dK(t,["shape","last","first"])),{fill:f||a.color})});return d.appendChild(v),d}};var DO=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let Dw={coordinate:{type:"radial",innerRadius:.9,outerRadius:1,startAngle:-1.1*Math.PI,endAngle:.1*Math.PI},axis:{x:!1},legend:!1,tooltip:!1,encode:{x:"x",y:"y",color:"color"},scale:{color:{range:["#30BF78","#D0D0D0"]}}},Dk={style:{shape:(t,e)=>{let{shape:n,radius:r}=t,i=DO(t,["shape","radius"]),a=cG(i,"pointer"),o=cG(i,"pin"),{shape:l}=a,s=DO(a,["shape"]),{shape:u}=o,c=DO(o,["shape"]),{coordinate:f,theme:h}=e;return(t,e)=>{let n=t.map(t=>f.invert(t)),[a,o,d]=function(t,e){let{transformations:n}=t.getOptions(),[,...r]=n.find(t=>t[0]===e);return r}(f,"polar"),p=f.clone(),{color:y}=e,g=fP({startAngle:a,endAngle:o,innerRadius:d,outerRadius:r});g.push(["cartesian"]),p.update({transformations:g});let v=n.map(t=>p.map(t)),[b,x]=y$(v),[O,w]=f.getCenter(),k=Object.assign(Object.assign({x1:b,y1:x,x2:O,y2:w,stroke:y},s),i),_=Object.assign(Object.assign({cx:O,cy:w,stroke:y},c),i),M=cX(new lb);return cU(l)||("function"==typeof l?M.append(()=>l(v,e,p,h)):M.append("line").call(yL,k).node()),cU(u)||("function"==typeof u?M.append(()=>u(v,e,p,h)):M.append("circle").call(yL,_).node()),M.node()}},lineWidth:4,pointerLineCap:"round",pinR:10,pinFill:"#fff",radius:.6}},D_={type:"text",style:{x:"50%",y:"60%",textAlign:"center",textBaseline:"middle",fontSize:20,fontWeight:800,fill:"#888"},tooltip:!1},DM=t=>{var e;let{data:n={},scale:r={},style:i={},animate:a={},transform:o=[]}=t,l=DO(t,["data","scale","style","animate","transform"]),{targetData:s,totalData:u,target:c,total:f,scale:h}=function(t,e){let{name:n="score",target:r,total:i,percent:a,thresholds:o=[]}=function(t){if(eq(t)){let e=Math.max(0,Math.min(t,1));return{percent:e,target:e,total:1}}return t}(t),l=a||r,s=a?1:i,u=Object.assign({y:{domain:[0,s]}},e);return o.length?{targetData:[{x:n,y:l,color:"target"}],totalData:o.map((t,e)=>({x:n,y:e>=1?t-o[e-1]:t,color:e})),target:l,total:s,scale:u}:{targetData:[{x:n,y:l,color:"target"}],totalData:[{x:n,y:l,color:"target"},{x:n,y:s-l,color:"total"}],target:l,total:s,scale:u}}(n,r),d=cG(i,"text"),{tooltip:p}=d,y=DO(d,["tooltip"]),g=(e=["pointer","pin"],Object.fromEntries(Object.entries(i).filter(([t])=>e.find(e=>t.startsWith(e))))),v=cG(i,"arc");return[cy({},Dw,Object.assign({type:"interval",transform:[{type:"stackY"}],data:u,scale:h,style:"round"===v.shape?Object.assign(Object.assign({},v),{shape:Dx}):v,animate:"object"==typeof a?cG(a,"arc"):a},l)),cy({},Dw,Dk,Object.assign({type:"point",data:s,scale:h,style:g,animate:"object"==typeof a?cG(a,"indicator"):a},l)),cy({},D_,{style:Object.assign({text:function(t,{target:e,total:n}){let{content:r}=t;return r?r(e,n):e.toString()}(y,{target:c,total:f})},y),tooltip:p,animate:"object"==typeof a?cG(a,"text"):a})]};DM.props={};let DE={pin:function(t,e,n){let r=4*n/3,i=Math.max(r,2*n),a=r/2,o=a+e-i/2,l=Math.asin(a/((i-a)*.85)),s=Math.sin(l)*a,u=Math.cos(l)*a,c=t-u,f=o+s,h=o+a/Math.sin(l);return`
|
|
11
|
+
M ${c} ${f}
|
|
12
|
+
A ${a} ${a} 0 1 1 ${c+2*u} ${f}
|
|
13
|
+
Q ${t} ${h} ${t} ${e+i/2}
|
|
14
|
+
Q ${t} ${h} ${c} ${f}
|
|
15
|
+
Z
|
|
16
|
+
`},rect:function(t,e,n){let r=.618*n;return`
|
|
17
|
+
M ${t-r} ${e-n}
|
|
18
|
+
L ${t+r} ${e-n}
|
|
19
|
+
L ${t+r} ${e+n}
|
|
20
|
+
L ${t-r} ${e+n}
|
|
21
|
+
Z
|
|
22
|
+
`},circle:function(t,e,n){return`
|
|
23
|
+
M ${t} ${e-n}
|
|
24
|
+
a ${n} ${n} 0 1 0 0 ${2*n}
|
|
25
|
+
a ${n} ${n} 0 1 0 0 ${-(2*n)}
|
|
26
|
+
Z
|
|
27
|
+
`},diamond:function(t,e,n){return`
|
|
28
|
+
M ${t} ${e-n}
|
|
29
|
+
L ${t+n} ${e}
|
|
30
|
+
L ${t} ${e+n}
|
|
31
|
+
L ${t-n} ${e}
|
|
32
|
+
Z
|
|
33
|
+
`},triangle:function(t,e,n){return`
|
|
34
|
+
M ${t} ${e-n}
|
|
35
|
+
L ${t+n} ${e+n}
|
|
36
|
+
L ${t-n} ${e+n}
|
|
37
|
+
Z
|
|
38
|
+
`}};var DA=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let DS=(t,e)=>{if(!e)return;let{coordinate:n}=e,{liquidOptions:r,styleOptions:i}=t,{liquidShape:a,percent:o}=r,{background:l,outline:s={},wave:u={}}=i,c=DA(i,["background","outline","wave"]),{border:f=2,distance:h=0}=s,d=DA(s,["border","distance"]),{length:p=192,count:y=3}=u;return(t,r,i)=>{let{document:s}=e.canvas,{color:u,fillOpacity:g}=i,v=Object.assign(Object.assign({fill:u},i),c),b=s.createElement("g",{}),[x,O]=n.getCenter(),w=n.getSize(),k=Math.min(...w)/2,_=nk(a)?a:((t="circle")=>DE[t]||DE.circle)(a),M=_(x,O,k,...w),E=_(x,O,k+f/2,...w);if(Object.keys(l).length){let t=s.createElement("path",{style:Object.assign({d:M,fill:"#fff"},l)});b.appendChild(t)}if(o>0){let t=s.createElement("path",{style:{d:E}});b.appendChild(t),b.style.clipPath=t,function(t,e,n,r,i,a,o,l,s,u,c){let{fill:f,fillOpacity:h,opacity:d}=i;for(let i=0;i<r;i++){let p=r<=1?1:i/(r-1),y=function(t,e,n,r,i,a){let o=4*Math.ceil(2*t/n*4),l=[],s=0;for(;s<-(2*Math.PI);)s+=2*Math.PI;for(;s>0;)s-=2*Math.PI;let u=i-t+(s=s/Math.PI/2*n)-2*t;l.push(["M",u,e]);let c=0;for(let t=0;t<o;++t){var f;let i=t%4,a=(f=t*n/4,0===i?[[f+.5*n/Math.PI/2,r/2],[f+.5*n/Math.PI,r],[f+n/4,r]]:1===i?[[f+.5*n/Math.PI/2*(Math.PI-2),r],[f+.5*n/Math.PI/2*(Math.PI-1),r/2],[f+n/4,0]]:2===i?[[f+.5*n/Math.PI/2,-r/2],[f+.5*n/Math.PI,-r],[f+n/4,-r]]:[[f+.5*n/Math.PI/2*(Math.PI-2),-r],[f+.5*n/Math.PI/2*(Math.PI-1),-r/2],[f+n/4,0]]);l.push(["C",a[0][0]+u,-a[0][1]+e,a[1][0]+u,-a[1][1]+e,a[2][0]+u,-a[2][1]+e]),t===o-1&&(c=a[2][0])}return l.push(["L",c+u,a+t]),l.push(["L",u,a+t]),l.push(["Z"]),l}(l,o+l*n,s,l/40,t,e),g=c.createElement("path",{style:{d:y,fill:f,opacity:(.2+.7*p)*Number(d||h)}});a.appendChild(g);try{if(!1===u)return;let t=[{transform:"translate(0, 0)"},{transform:`translate(${2*s}, 0)`}];g.animate(t,{duration:2*(2500+2500*p),iterations:1/0})}catch(t){console.warn("off-screen group animate error!")}}}(x,O,1-o,y,v,b,t.getBBox().y,2*k,p,!0,s)}let A=s.createElement("path",{style:{d:M,fill:"transparent",lineWidth:f+2*h,stroke:"#fff"}}),S=s.createElement("path",{style:Object.assign(Object.assign(Object.assign({d:M,stroke:u,strokeOpacity:g,lineWidth:f},v),d),{fill:"transparent"})});return b.appendChild(A),b.appendChild(S),b}};DS.props={};var Dj=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let DP={axis:{x:!1,y:!1},legend:!1,tooltip:!1,encode:{x:"type",y:"percent"},scale:{y:{domain:[0,1]}},style:{shape:DS},animate:{enter:{type:"fadeIn"}}},DT={type:"text",style:{x:"50%",y:"50%",textAlign:"center",textBaseline:"middle",fontSize:20,fontWeight:800,fill:"#888"},animate:{enter:{type:"fadeIn"}}},DC=t=>{let{data:e={},style:n={},animate:r}=t,i=Dj(t,["data","style","animate"]),a=Math.max(0,eq(e)?e:null==e?void 0:e.percent),o=[{percent:a,type:"liquid"}],l=Object.assign(Object.assign({},cG(n,"text")),cG(n,"content")),s=cG(n,"outline"),u=cG(n,"wave"),c=cG(n,"background");return[cy({},DP,Object.assign({type:"interval",data:o,style:{liquidOptions:{percent:a,liquidShape:null==n?void 0:n.shape},styleOptions:Object.assign(Object.assign({},n),{outline:s,wave:u,background:c})},animate:r},i)),cy({},DT,{style:Object.assign({text:`${fC(100*a)} %`},l),animate:r})]};function DN(t){let e=Array(t);for(let n=0;n<t;++n)e[n]=0;return e}function DL(t,e){return DN(t).map(()=>DN(e))}function DI(t,e){let n=0;for(let r=0;r<t.length;++r)n+=t[r]*e[r];return n}function DR(t){return Math.sqrt(DI(t,t))}function DD(t,e,n){for(let r=0;r<e.length;++r)t[r]=e[r]*n}function DB(t,e,n,r,i){for(let a=0;a<t.length;++a)t[a]=e*n[a]+r*i[a]}function DF(t,e){let n=function(t){let e=[];for(let n=0;n<t.length;++n)for(let r=n+1;r<t.length;++r){let i=DG(t[n],t[r]);for(let t=0;t<i.length;++t){let a=i[t];a.parentIndex=[n,r],e.push(a)}}return e}(t),r=n.filter(function(e){var n=e,r=t;for(let t=0;t<r.length;++t)if(D$(n,r[t])>r[t].radius+1e-10)return!1;return!0}),i=0,a=0,o,l=[];if(r.length>1){let e=function(t){let e={x:0,y:0};for(let n=0;n<t.length;++n)e.x+=t[n].x,e.y+=t[n].y;return e.x/=t.length,e.y/=t.length,e}(r);for(o=0;o<r.length;++o){let t=r[o];t.angle=Math.atan2(t.x-e.x,t.y-e.y)}r.sort(function(t,e){return e.angle-t.angle});let n=r[r.length-1];for(o=0;o<r.length;++o){let e=r[o];a+=(n.x+e.x)*(e.y-n.y);let s={x:(e.x+n.x)/2,y:(e.y+n.y)/2},u=null;for(let r=0;r<e.parentIndex.length;++r)if(n.parentIndex.indexOf(e.parentIndex[r])>-1){let i=t[e.parentIndex[r]],a=Math.atan2(e.x-i.x,e.y-i.y),o=Math.atan2(n.x-i.x,n.y-i.y),l=o-a;l<0&&(l+=2*Math.PI);let c=o-l/2,f=D$(s,{x:i.x+i.radius*Math.sin(c),y:i.y+i.radius*Math.cos(c)});f>2*i.radius&&(f=2*i.radius),(null===u||u.width>f)&&(u={circle:i,width:f,p1:e,p2:n})}null!==u&&(l.push(u),i+=Dz(u.circle.radius,u.width),n=e)}}else{let e=t[0];for(o=1;o<t.length;++o)t[o].radius<e.radius&&(e=t[o]);let n=!1;for(o=0;o<t.length;++o)if(D$(t[o],e)>Math.abs(e.radius-t[o].radius)){n=!0;break}n?i=a=0:(i=e.radius*e.radius*Math.PI,l.push({circle:e,p1:{x:e.x,y:e.y+e.radius},p2:{x:e.x-1e-10,y:e.y+e.radius},width:2*e.radius}))}return a/=2,e&&(e.area=i+a,e.arcArea=i,e.polygonArea=a,e.arcs=l,e.innerPoints=r,e.intersectionPoints=n),i+a}function Dz(t,e){return t*t*Math.acos(1-e/t)-(t-e)*Math.sqrt(e*(2*t-e))}function D$(t,e){return Math.sqrt((t.x-e.x)*(t.x-e.x)+(t.y-e.y)*(t.y-e.y))}function DW(t,e,n){return n>=t+e?0:n<=Math.abs(t-e)?Math.PI*Math.min(t,e)*Math.min(t,e):Dz(t,t-(n*n-e*e+t*t)/(2*n))+Dz(e,e-(n*n-t*t+e*e)/(2*n))}function DG(t,e){let n=D$(t,e),r=t.radius,i=e.radius;if(n>=r+i||n<=Math.abs(r-i))return[];let a=(r*r-i*i+n*n)/(2*n),o=Math.sqrt(r*r-a*a),l=t.x+a*(e.x-t.x)/n,s=t.y+a*(e.y-t.y)/n,u=-(e.y-t.y)*(o/n),c=-(e.x-t.x)*(o/n);return[{x:l+u,y:s-c},{x:l-u,y:s+c}]}function Dq(t,e,n){return Math.min(t,e)*Math.min(t,e)*Math.PI<=n+1e-10?Math.abs(t-e):function(t,e,n,r){let i=(r=r||{}).maxIterations||100,a=r.tolerance||1e-10,o=t(e),l=t(n),s=n-e;if(o*l>0)throw"Initial bisect points must have opposite signs";if(0===o)return e;if(0===l)return n;for(let n=0;n<i;++n){let n=e+(s/=2),r=t(n);if(r*o>=0&&(e=n),Math.abs(s)<a||0===r)return n}return e+s}(function(r){return DW(t,e,r)-n},0,t+e)}function DH(t,e){let n=function(t,e){let n,r=e&&e.lossFunction?e.lossFunction:DY,i={},a={};for(let e=0;e<t.length;++e){let r=t[e];1==r.sets.length&&(i[n=r.sets[0]]={x:1e10,y:1e10,rowid:Object.keys(i).length,size:r.size,radius:Math.sqrt(r.size/Math.PI)},a[n]=[])}t=t.filter(function(t){return 2==t.sets.length});for(let e=0;e<t.length;++e){let n=t[e],r=n.hasOwnProperty("weight")?n.weight:1,o=n.sets[0],l=n.sets[1];n.size+1e-10>=Math.min(i[o].size,i[l].size)&&(r=0),a[o].push({set:l,size:n.size,weight:r}),a[l].push({set:o,size:n.size,weight:r})}let o=[];for(n in a)if(a.hasOwnProperty(n)){let t=0;for(let e=0;e<a[n].length;++e)t+=a[n][e].size*a[n][e].weight;o.push({set:n,size:t})}function l(t,e){return e.size-t.size}o.sort(l);let s={};function u(t){return t.set in s}function c(t,e){i[e].x=t.x,i[e].y=t.y,s[e]=!0}c({x:0,y:0},o[0].set);for(let e=1;e<o.length;++e){let s=o[e].set,f=a[s].filter(u);if(n=i[s],f.sort(l),0===f.length)throw"ERROR: missing pairwise overlap information";let h=[];for(let t=0;t<f.length;++t){let e=i[f[t].set],r=Dq(n.radius,e.radius,f[t].size);h.push({x:e.x+r,y:e.y}),h.push({x:e.x-r,y:e.y}),h.push({y:e.y+r,x:e.x}),h.push({y:e.y-r,x:e.x});for(let a=t+1;a<f.length;++a){let t=i[f[a].set],o=Dq(n.radius,t.radius,f[a].size),l=DG({x:e.x,y:e.y,radius:r},{x:t.x,y:t.y,radius:o});for(let t=0;t<l.length;++t)h.push(l[t])}}let d=1e50,p=h[0];for(let e=0;e<h.length;++e){i[s].x=h[e].x,i[s].y=h[e].y;let n=r(i,t);n<d&&(d=n,p=h[e])}c(p,s)}return i}(t,e),r=e.lossFunction||DY;if(t.length>=8){let i=function(t,e){let n,r,i,a,o,l=(e=e||{}).restarts||10,s=[],u={};for(n=0;n<t.length;++n){let e=t[n];1==e.sets.length&&(u[e.sets[0]]=s.length,s.push(e))}let c=(a=DL(s.length,s.length),o=DL(s.length,s.length),t.filter(function(t){return 2==t.sets.length}).map(function(t){let e=u[t.sets[0]],n=u[t.sets[1]],r=Dq(Math.sqrt(s[e].size/Math.PI),Math.sqrt(s[n].size/Math.PI),t.size);a[e][n]=a[n][e]=r;let i=0;t.size+1e-10>=Math.min(s[e].size,s[n].size)?i=1:t.size<=1e-10&&(i=-1),o[e][n]=o[n][e]=i}),{distances:a,constraints:o}),f=c.distances,h=c.constraints,d=DR(f.map(DR))/f.length;f=f.map(function(t){return t.map(function(t){return t/d})});let p=function(t,e){return function(t,e,n,r){let i=0,a;for(a=0;a<e.length;++a)e[a]=0;for(a=0;a<n.length;++a){let o=t[2*a],l=t[2*a+1];for(let s=a+1;s<n.length;++s){let u=t[2*s],c=t[2*s+1],f=n[a][s],h=r[a][s],d=(u-o)*(u-o)+(c-l)*(c-l),p=Math.sqrt(d),y=d-f*f;h>0&&p<=f||h<0&&p>=f||(i+=2*y*y,e[2*a]+=4*y*(o-u),e[2*a+1]+=4*y*(l-c),e[2*s]+=4*y*(u-o),e[2*s+1]+=4*y*(c-l))}}return i}(t,e,f,h)};for(n=0;n<l;++n)i=function(t,e,n){let r,i={x:e.slice(),fx:0,fxprime:e.slice()},a={x:e.slice(),fx:0,fxprime:e.slice()},o=e.slice(),l=1,s=(n=n||{}).maxIterations||20*e.length;i.fx=t(i.x,i.fxprime);let u=i.fxprime.slice();DD(u,i.fxprime,-1);for(let e=0;e<s;++e){if(l=function(t,e,n,r,i,a,o){let l=n.fx,s=DI(n.fxprime,e),u=l,c=l,f=s,h=0;function d(c,h,d){for(let p=0;p<16;++p)if(i=(c+h)/2,DB(r.x,1,n.x,i,e),u=r.fx=t(r.x,r.fxprime),f=DI(r.fxprime,e),u>l+a*i*s||u>=d)h=i;else{if(Math.abs(f)<=-o*s)return i;f*(h-c)>=0&&(h=c),c=i,d=u}return 0}i=i||1,a=a||1e-6,o=o||.1;for(let p=0;p<10;++p){if(DB(r.x,1,n.x,i,e),u=r.fx=t(r.x,r.fxprime),f=DI(r.fxprime,e),u>l+a*i*s||p&&u>=c)return d(h,i,c);if(Math.abs(f)<=-o*s)break;if(f>=0)return d(i,h,u);c=u,h=i,i*=2}return i}(t,u,i,a,l),n.history&&n.history.push({x:i.x.slice(),fx:i.fx,fxprime:i.fxprime.slice(),alpha:l}),l){DB(o,1,a.fxprime,-1,i.fxprime);let t=DI(i.fxprime,i.fxprime);DB(u,Math.max(0,DI(o,a.fxprime)/t),u,-1,a.fxprime),r=i,i=a,a=r}else DD(u,i.fxprime,-1);if(1e-5>=DR(i.fxprime))break}return n.history&&n.history.push({x:i.x.slice(),fx:i.fx,fxprime:i.fxprime.slice(),alpha:l}),i}(p,DN(2*f.length).map(Math.random),e),(!r||i.fx<r.fx)&&(r=i);let y=r.x,g={};for(n=0;n<s.length;++n){let t=s[n];g[t.sets[0]]={x:y[2*n]*d,y:y[2*n+1]*d,radius:Math.sqrt(t.size/Math.PI)}}if(e.history)for(n=0;n<e.history.length;++n)DD(e.history[n].x,d);return g}(t,e);r(i,t)+1e-8<r(n,t)&&(n=i)}return n}function DY(t,e){let n=0;for(let r=0;r<e.length;++r){let i,a=e[r];if(1!=a.sets.length){if(2==a.sets.length){let e=t[a.sets[0]],n=t[a.sets[1]];i=DW(e.radius,n.radius,D$(e,n))}else i=DF(a.sets.map(function(e){return t[e]}));n+=(a.hasOwnProperty("weight")?a.weight:1)*(i-a.size)*(i-a.size)}}return n}DC.props={};let DV=t=>{let{sets:e="sets",size:n="size",as:r=["key","path"],padding:i=0}=t,[a,o]=r;return t=>{let r,l=t.map(t=>Object.assign(Object.assign({},t),{sets:t[e],size:t[n],[a]:t.sets.join("&")}));l.sort((t,e)=>t.sets.length-e.sets.length);let s=function(t,e){let n;(e=e||{}).maxIterations=e.maxIterations||500;let r=e.initialLayout||DH,i=e.lossFunction||DY,a=r(t=function(t){let e,n,r,i;t=t.slice();let a=[],o={};for(e=0;e<t.length;++e){let n=t[e];1==n.sets.length?a.push(n.sets[0]):2==n.sets.length&&(o[[r=n.sets[0],i=n.sets[1]]]=!0,o[[i,r]]=!0)}for(a.sort((t,e)=>t>e?1:-1),e=0;e<a.length;++e)for(r=a[e],n=e+1;n<a.length;++n)[r,i=a[n]]in o||t.push({sets:[r,i],size:0});return t}(t),e),o=[],l=[];for(n in a)a.hasOwnProperty(n)&&(o.push(a[n].x),o.push(a[n].y),l.push(n));let s=function(t,e,n){let r,i=(n=n||{}).maxIterations||200*e.length,a=n.nonZeroDelta||1.05,o=n.zeroDelta||.001,l=n.minErrorDelta||1e-6,s=n.minErrorDelta||1e-5,u=void 0!==n.rho?n.rho:1,c=void 0!==n.chi?n.chi:2,f=void 0!==n.psi?n.psi:-.5,h=void 0!==n.sigma?n.sigma:.5,d=e.length,p=Array(d+1);p[0]=e,p[0].fx=t(e),p[0].id=0;for(let n=0;n<d;++n){let r=e.slice();r[n]=r[n]?r[n]*a:o,p[n+1]=r,p[n+1].fx=t(r),p[n+1].id=n+1}function y(t){for(let e=0;e<t.length;e++)p[d][e]=t[e];p[d].fx=t.fx}let g=(t,e)=>t.fx-e.fx,v=e.slice(),b=e.slice(),x=e.slice(),O=e.slice();for(let e=0;e<i;++e){if(p.sort(g),n.history){let t=p.map(t=>{let e=t.slice();return e.fx=t.fx,e.id=t.id,e});t.sort((t,e)=>t.id-e.id),n.history.push({x:p[0].slice(),fx:p[0].fx,simplex:t})}r=0;for(let t=0;t<d;++t)r=Math.max(r,Math.abs(p[0][t]-p[1][t]));if(Math.abs(p[0].fx-p[d].fx)<l&&r<s)break;for(let t=0;t<d;++t){v[t]=0;for(let e=0;e<d;++e)v[t]+=p[e][t];v[t]/=d}let e=p[d];if(DB(b,1+u,v,-u,e),b.fx=t(b),b.fx<p[0].fx)DB(O,1+c,v,-c,e),O.fx=t(O),y(O.fx<b.fx?O:b);else if(b.fx>=p[d-1].fx){let n=!1;if(b.fx>e.fx?(DB(x,1+f,v,-f,e),x.fx=t(x),x.fx<e.fx?y(x):n=!0):(DB(x,1-f*u,v,f*u,e),x.fx=t(x),x.fx<b.fx?y(x):n=!0),n){if(h>=1)break;for(let e=1;e<p.length;++e)DB(p[e],1-h,p[0],h,p[e]),p[e].fx=t(p[e])}}else y(b)}return p.sort(g),{fx:p[0].fx,x:p[0]}}(function(e){let n={};for(let t=0;t<l.length;++t){let r=l[t];n[r]={x:e[2*t],y:e[2*t+1],radius:a[r].radius}}return i(n,t)},o,e).x;for(let t=0;t<l.length;++t)a[n=l[t]].x=s[2*t],a[n].y=s[2*t+1];return a}(l);return l.map(t=>{let n=t[e];return Object.assign(Object.assign({},t),{[o]:({width:t,height:e})=>{r=r||function(t,e,n,r){let i,a=[],o=[];for(let e in t)t.hasOwnProperty(e)&&(o.push(e),a.push(t[e]));e-=2*r,n-=2*r;let l={xRange:(i=function(t){return{max:Math.max.apply(null,a.map(function(e){return e[t]+e.radius})),min:Math.min.apply(null,a.map(function(e){return e[t]-e.radius}))}})("x"),yRange:i("y")},s=l.xRange,u=l.yRange;if(s.max==s.min||u.max==u.min)return console.log("not scaling solution: zero size detected"),t;let c=e/(s.max-s.min),f=Math.min(n/(u.max-u.min),c),h=(e-(s.max-s.min)*f)/2,d=(n-(u.max-u.min)*f)/2,p={};for(let t=0;t<a.length;++t){let e=a[t];p[o[t]]={radius:f*e.radius,x:r+h+(e.x-s.min)*f,y:r+d+(e.y-u.min)*f}}return p}(s,t,e,i);let a=function(t){let e={};DF(t,e);let n=e.arcs;if(0===n.length)return"M 0 0";if(1==n.length){var r,i,a;let t,e,o=n[0].circle;return r=o.x,i=o.y,a=o.radius,t=[],e=r-a,t.push("M",e,i),t.push("A",a,a,0,1,0,e+2*a,i),t.push("A",a,a,0,1,0,e,i),t.join(" ")}{let t=["\nM",n[0].p2.x,n[0].p2.y];for(let e=0;e<n.length;++e){let r=n[e],i=r.circle.radius,a=r.width>i;t.push("\nA",i,i,0,+!!a,1,r.p1.x,r.p1.y)}return t.join(" ")}}(n.map(t=>r[t]));return/[zZ]$/.test(a)||(a+=" Z"),a}})})}};DV.props={};var DU=function(){return(DU=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},DX=(l=class extends OH{constructor(t){const{container:e,canvas:n,renderer:r,plugins:i,lib:a,createCanvas:o}=t;super(OU(t,["container","canvas","renderer","plugins","lib","createCanvas"]),"view"),this._hasBindAutoFit=!1,this._rendering=!1,this._trailingClear=null,this._trailing=!1,this._trailingResolve=null,this._trailingReject=null,this._previousDefinedType=null,this._onResize=cn(()=>{this.forceFit()},300),this._renderer=r||new u7,this._plugins=i||[],this._container=function(t){if(void 0===t){let t=document.createElement("div");return t[OR]=!0,t}return"string"==typeof t?document.getElementById(t):t}(e),this._emitter=new tm,this._context={library:Object.assign(Object.assign({},a),s9),emitter:this._emitter,canvas:n,createCanvas:o},this._create()}render(){let t,e;if(this._rendering)return this._addToTrailing();this._context.canvas||this._createCanvas(),this._bindAutoFit(),this._rendering=!0;let n=new Promise((t,e)=>(function(t,e={},n=()=>{},r=t=>{throw t}){var i;let a,o=function t(e,n=!0){if(Array.isArray(e))return e.map((r,i)=>t(e[i],n));if("object"==typeof e&&e)return fi(e,(e,r)=>n&&fl.includes(r)?t(e,"children"===r):n?e:t(e,!1));if("string"==typeof e){let t=e.trim();if(t.startsWith("{")&&t.endsWith("}"))return fs(t.slice(1,-1))}return e}(t),{width:l=640,height:s=480,depth:u=0}=o,c=function(t){let e=cy({},t),n=new Map([[e,null]]),r=new Map([[null,-1]]),i=[e];for(;i.length;){let t=i.shift();if(void 0===t.key){let e=n.get(t),i=r.get(t);t.key=null===e?"0":`${e.key}-${i}`}let{children:e=[]}=t;if(Array.isArray(e))for(let a=0;a<e.length;a++){let o=cy({},e[a]);e[a]=o,n.set(o,t),r.set(o,a),i.push(o)}}return e}(function t(e){var n;let r=(n=e,(function(...t){return e=>t.reduce((t,e)=>e(t),e)})(Ot,Oe)(n));return r.children&&Array.isArray(r.children)&&(r.children=r.children.map(e=>t(e))),r}(o)),{canvas:f=((a=new u7).registerPlugin(new ce),new lU({width:l,height:s,container:document.createElement("div"),renderer:a})),emitter:h=new tm,library:d}=e;e.canvas=f,e.emitter=h,e.externals={};let{width:p,height:y}=f.getConfig();(p!==l||y!==s)&&f.resize(l,s),h.emit("beforerender");let g=cX(f.document.documentElement);return f.ready.then(()=>(function t(e,n,r){return xq(this,void 0,void 0,function*(){var i;let{library:a}=r,[o]=vV("composition",a),[l]=vV("interaction",a),s=new Set(Object.keys(a).map(t=>{var e;return null==(e=/mark\.(.*)/.exec(t))?void 0:e[1]}).filter(cW)),u=new Set(Object.keys(a).map(t=>{var e;return null==(e=/component\.(.*)/.exec(t))?void 0:e[1]}).filter(cW)),c=t=>{let{type:e}=t;if("function"==typeof e){let{props:t={}}=e,{composite:n=!0}=t;if(n)return"mark"}return"string"!=typeof e?e:s.has(e)||u.has(e)?"mark":e},f=t=>"mark"===c(t),h=t=>"standardView"===c(t),d=t=>h(t)?[t]:o({type:c(t),static:(t=>{let{type:e}=t;return"string"==typeof e&&!!u.has(e)})(t)})(t),p=[],y=new Map,g=new Map,v=[e],b=[];for(;v.length;){let t=v.shift();if(h(t)){let e=g.get(t),[n,i]=e?xK(e,t,a):yield xV(t,r);y.set(n,t),p.push(n);let o=i.flatMap(d).map(t=>vK(t,a));if(v.push(...o),o.every(h)){let t=yield Promise.all(o.map(t=>xU(t,r)));!function(t){let e=t.flatMap(t=>Array.from(t.values())).flatMap(t=>t.channels.map(t=>t.scale));b6(e,"x"),b6(e,"y")}(t);for(let e=0;e<o.length;e++){let n=o[e],r=t[e];g.set(n,r)}}}else{let e=d(f(t)?t:yield x3(t,r));Array.isArray(e)?v.push(...e):"function"==typeof e&&b.push(e())}}r.emitter.emit("beforepaint");let x=new Map,O=new Map,w=[];n.selectAll(x9("view")).data(p,t=>t.key).join(t=>t.append("g").attr("className","view").attr("id",t=>t.key).call(xY).each(function(t,e,n){xZ(t,cX(n),w,r),x.set(t,n)}),t=>t.call(xY).each(function(t,e,n){xZ(t,cX(n),w,r),O.set(t,n)}),t=>t.each(function(t,e,n){for(let t of n.nameInteraction.values())t.destroy()}).remove());let k=(e,n,i)=>Array.from(e.entries()).map(([a,o])=>{let l=i||new Map,s=(t,e=t=>t)=>l.set(t,e),u=y.get(a),c=function(e,n,r){let{library:i}=r,a=function(t){let[,e]=vV("interaction",t);return t=>{let[n,r]=t;try{return[n,e(n)]}catch(t){return[n,r.type]}}}(i),o=x5(n).map(a).filter(t=>t[1]&&t[1].props&&t[1].props.reapplyWhenUpdate).map(t=>t[0]);return(n,i,a)=>xq(this,void 0,void 0,function*(){let[l,s]=yield xV(n,r);for(let t of(xZ(l,e,[],r),o.filter(t=>t!==i)))!function(t,e,n,r,i){var a;let{library:o}=i,[l]=vV("interaction",o),s=e.node().nameInteraction,u=x5(n).find(([e])=>e===t),c=s.get(t);if(!c||(null==(a=c.destroy)||a.call(c),!u[1]))return;let f=xX(r,t,u[1],l)({options:n,view:r,container:e.node(),update:t=>Promise.resolve(t)},[],i.emitter);s.set(t,{destroy:f})}(t,e,n,l,r);for(let n of s)t(n,e,r);return a(),{options:n,view:l}})}(cX(o),u,r),f={view:a,container:o,options:u,setState:s,update:(t,r)=>xq(this,void 0,void 0,function*(){let i=cB(Array.from(l.values()))(u);return yield c(i,t,()=>{ns(r)&&n(e,r,l)})})};return r.externals.update=f.update,r.externals.setState=s,f}),_=(t=O,e,n)=>{var i;let a=k(t,_,n);for(let t of a){let{options:n,container:o}=t,s=o.nameInteraction,u=x5(n);for(let n of(e&&(u=u.filter(t=>e.includes(t[0]))),u)){let[e,o]=n,u=s.get(e);if(u&&(null==(i=u.destroy)||i.call(u)),o){let n=xX(t.view,e,o,l)(t,a,r.emitter);s.set(e,{destroy:n})}}}},M=k(x,_);for(let t of M){let{options:e}=t,n=new Map;for(let i of(t.container.nameInteraction=n,x5(e))){let[e,a]=i;if(a){let i=xX(t.view,e,a,l)(t,M,r.emitter);n.set(e,{destroy:i})}}}_();let{width:E,height:A}=e,S=[];for(let e of b){let i=new Promise(i=>xq(this,void 0,void 0,function*(){for(let i of e){let e=Object.assign({width:E,height:A},i);yield t(e,n,r)}i()}));S.push(i)}return r.views=p,null==(i=r.animations)||i.forEach(t=>null==t?void 0:t.cancel()),r.animations=w,r.emitter.emit("afterpaint"),Promise.all([...w.filter(cW).map(x1).map(t=>t.finished),...S])})})(Object.assign(Object.assign({},c),{width:l,height:s,depth:u}),g,e)).then(()=>{if(u){let[t,e]=f.document.documentElement.getPosition();f.document.documentElement.setPosition(t,e,-u/2)}f.requestAnimationFrame(()=>{f.requestAnimationFrame(()=>{h.emit("afterrender"),null==n||n()})})}).catch(t=>{null==r||r(t)}),"string"==typeof(i=f.getConfig().container)?document.getElementById(i):i})(this._computedOptions(),this._context,this._createResolve(t),this._createReject(e))),[r,i,a]=[new Promise((n,r)=>{e=n,t=r}),e,t];return n.then(i).then(()=>{if(this._trailingClear){let t=this.options();this._trailingClear(),this._trailing&&this.options(t)}}).catch(a).then(()=>{this._trailingClear=null,this._renderTrailing()}),r}options(t){if(0==arguments.length)return function(t){let e=function(t){if(null!==t.type)return t;let e=t.children[t.children.length-1];for(let n of OI)e.attr(n,t.attr(n));return e}(t),n=[e],r=new Map;for(r.set(e,OB(e));n.length;){let t=n.pop(),e=r.get(t),{children:i=[]}=t;for(let t of i)if(t.type===OD)e.children=t.value;else{let i=OB(t),{children:a=[]}=e;a.push(i),n.push(t),r.set(t,i),e.children=a}}return r.get(e)}(this);let{type:e}=t;return e&&(this._previousDefinedType=e),!function(t,e,n,r,i){let a=function(t,e,n,r,i){let{type:a}=t,{type:o=n||a}=e;if("function"!=typeof o&&new Set(Object.keys(i)).has(o)){for(let n of OI)void 0!==t.attr(n)&&void 0===e[n]&&(e[n]=t.attr(n));return e}if("function"==typeof o||new Set(Object.keys(r)).has(o)){let t={type:"view"},n=Object.assign({},e);for(let e of OI)void 0!==n[e]&&(t[e]=n[e],delete n[e]);return Object.assign(Object.assign({},t),{children:[n]})}return e}(t,e,n,r,i),o=[[null,t,a]];for(;o.length;){let[t,e,n]=o.shift();if(e)if(n){!function(t,e){let{type:n,children:r}=e,i=OL(e,["type","children"]);t.type===n||void 0===n?function t(e,n,r=5,i=0){if(!(i>=r)){for(let a of Object.keys(n)){let o=n[a];cp(o)&&cp(e[a])?t(e[a],o,r,i+1):e[a]=o}return e}}(t.value,i):"string"==typeof n&&(t.type=n,t.value=i)}(e,n);let{children:t}=n,{children:r}=e;if(Array.isArray(t)&&Array.isArray(r)){let n=Math.max(t.length,r.length);for(let i=0;i<n;i++){let n=t[i],a=r[i];o.push([e,a,n])}}else"function"==typeof t&&o.push([e,null,t])}else e.remove();else!function(t,e,n,r){if(!t)return;let i=[[t,e]];for(;i.length;){let[t,e]=i.shift(),a=function(t,e,n){if("function"==typeof t){let e=new ON;return e.value=t,e.type=OD,e}let{type:r,children:i}=t,a=OL(t,["type","children"]),o=new(function(t,e,n){if("function"==typeof t)return e.mark;let r=Object.assign(Object.assign({},e),n)[t];if(!r)throw Error(`Unknown mark: ${t}.`);return r}(r,e,n));return o.value=a,o.type=r,o}(e,n,r);Array.isArray(t.children)&&t.push(a);let{children:o}=e;if(Array.isArray(o))for(let t of o)i.push([a,t]);else"function"==typeof o&&i.push([a,o])}}(t,n,r,i)}}(this,t,this._previousDefinedType,this._marks,this._compositions),this}getContainer(){return this._container}getContext(){return this._context}on(t,e,n){return this._emitter.on(t,e,n),this}once(t,e){return this._emitter.once(t,e),this}emit(t,...e){return this._emitter.emit(t,...e),this}off(t,e){return this._emitter.off(t,e),this}clear(t=!0){if(this._rendering){this._trailingClear=()=>{this.clear(t)},this._reset();return}let e=this.options();this.emit("beforeclear"),this._reset(),On(e,this._context,!1,t),this.emit("afterclear")}destroy(){var t;let e,n=this.options();this.emit("beforedestroy"),this._unbindAutoFit(),this._reset(),On(n,this._context,!0),this._container[OR]&&(e=(t=this._container).parentNode)&&e.removeChild(t),this.emit("afterdestroy")}forceFit(){this.options.autoFit=!0;let{width:t,height:e}=OF(this.options(),this._container);if(t===this._width&&e===this._height)return Promise.resolve(this);this.emit(cZ);let n=this.render();return n.then(()=>{this.emit(cQ)}),n}changeSize(t,e){if(t===this._width&&e===this._height)return Promise.resolve(this);this.emit(cZ),this.attr("width",t),this.attr("height",e);let n=this.render();return n.then(()=>{this.emit(cQ)}),n}getDataByXY(t,e={}){let{shared:n=!1,series:r,facet:i=!1,startX:a=0,startY:o=0}=e,{canvas:l,views:s}=this._context,{document:u}=l,{x:c,y:f}=t,{coordinate:h,scale:d,markState:p,data:y,key:g}=s[0],v=u.getElementsByClassName(gM),b=n?t=>t.__data__.x:t=>t,x=cs(v,b),O=vy(u.getElementsByClassName("view")[0]),w=t=>Array.from(t.values()).some(t=>{var e,n;return(null==(e=t.interaction)?void 0:e.seriesTooltip)||(null==(n=t.channels)?void 0:n.some(t=>"series"===t.name&&void 0!==t.values))}),k=OM(r,w(p)),_=t=>cr(t,"__data__.data",null);try{if(k&&w(p)&&!i){let{selectedData:t}=OS({root:O,event:{offsetX:c,offsetY:f},elements:v,coordinate:h,scale:d,startX:a,startY:o}),e=y.get(`${g}-0`);return t.map(({index:t})=>e[t])}let t=OA({root:O,event:{offsetX:c,offsetY:f},elements:v,coordinate:h,scale:d,shared:n});if(cI(t))return cR(t,y.get(g));let e=b(t),r=x.get(e);return r?r.map(_):[]}catch(e){let t=l.document.elementFromPointSync(c,f);return t?_(t):[]}}_create(){let{library:t}=this._context,e=["mark.mark",...Object.keys(t).filter(t=>t.startsWith("mark.")||"component.axisX"===t||"component.axisY"===t||"component.legends"===t)];for(let t of(this._marks={},e)){let e=t.split(".").pop();class n extends OY{constructor(){super({},e)}}this._marks[e]=n,this[e]=function(t){let r=this.append(n);return"mark"===e&&(r.type=t),r}}let n=["composition.view",...Object.keys(t).filter(t=>t.startsWith("composition.")&&"composition.mark"!==t)];for(let t of(this._compositions=Object.fromEntries(n.map(t=>{let e=t.split(".").pop(),n=class extends OH{constructor(){super({},e)}};return[e,n=OV([Oz(O$(this._marks))],n)]})),Object.values(this._compositions)))Oz(O$(this._compositions))(t);for(let t of n){let e=t.split(".").pop();this[e]=function(){let t=this._compositions[e];return this.type=null,this.append(t)}}}_reset(){let t=["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")||t.includes(e))),this.children=[]}_renderTrailing(){this._trailing&&(this._trailing=!1,this.render().then(()=>{let t=this._trailingResolve.bind(this);this._trailingResolve=null,t(this)}).catch(t=>{let e=this._trailingReject.bind(this);this._trailingReject=null,e(t)}))}_createResolve(t){return()=>{this._rendering=!1,t(this)}}_createReject(t){return e=>{this._rendering=!1,t(e)}}_computedOptions(){let t=this.options(),{key:e="G2_CHART_KEY"}=t,{width:n,height:r,depth:i}=OF(t,this._container);return this._width=n,this._height=r,this._key=e,Object.assign(Object.assign({key:this._key},t),{width:n,height:r,depth:i})}_createCanvas(){var t,e;let{width:n,height:r}=OF(this.options(),this._container);this._plugins.push(new ce),this._plugins.forEach(t=>this._renderer.registerPlugin(t)),this._context.canvas=new lU({container:this._container,width:n,height:r,renderer:this._renderer});let i=null==(e=null==(t=this._context.canvas)?void 0:t.getContextService())?void 0:e.getDomElement();i&&(i.style.display="block")}_addToTrailing(){var t;return null==(t=this._trailingResolve)||t.call(this,this),this._trailing=!0,new Promise((t,e)=>{this._trailingResolve=t,this._trailingReject=e})}_bindAutoFit(){let{autoFit:t}=this.options();if(this._hasBindAutoFit){t||this._unbindAutoFit();return}t&&(this._hasBindAutoFit=!0,window.addEventListener("resize",this._onResize))}_unbindAutoFit(){this._hasBindAutoFit&&(this._hasBindAutoFit=!1,window.removeEventListener("resize",this._onResize))}},s=DU(DU({},Object.assign(Object.assign(Object.assign(Object.assign({},{"composition.geoView":I0,"composition.geoPath":I2}),{"data.arc":R8,"data.cluster":Rf,"mark.forceGraph":Rt,"mark.tree":Rv,"mark.pack":RL,"mark.sankey":R1,"mark.chord":Dr,"mark.treemap":Ds,"mark.partition":Pz}),{"data.venn":DV,"mark.boxplot":Dm,"mark.gauge":DM,"mark.wordCloud":MF,"mark.liquid":DC}),{"data.fetch":CL,"data.inline":CI,"data.sortBy":CR,"data.sort":CD,"data.filter":CF,"data.pick":Cz,"data.rename":C$,"data.fold":CW,"data.slice":CG,"data.custom":Cq,"data.map":CH,"data.join":CV,"data.kde":CK,"data.log":CZ,"data.wordCloud":Ni,"data.ema":Na,"transform.stackY":TA,"transform.binX":T1,"transform.bin":T0,"transform.dodgeX":T5,"transform.jitter":T4,"transform.jitterX":T6,"transform.jitterY":T8,"transform.symmetryY":T7,"transform.diffY":Ct,"transform.stackEnter":Ce,"transform.normalizeY":Cr,"transform.select":Cs,"transform.selectX":Cc,"transform.selectY":Ch,"transform.groupX":Cy,"transform.groupY":Cg,"transform.groupColor":Cv,"transform.group":Cp,"transform.sortX":Cb,"transform.sortY":Cx,"transform.sortColor":CO,"transform.flexX":Cw,"transform.pack":Ck,"transform.sample":CM,"transform.filter":CE,"coordinate.cartesian":wc,"coordinate.polar":fS,"coordinate.transpose":wf,"coordinate.theta":wh,"coordinate.parallel":wd,"coordinate.fisheye":wp,"coordinate.radial":fP,"coordinate.radar":wy,"coordinate.helix":wg,"encode.constant":wv,"encode.field":wm,"encode.transform":wb,"encode.column":wx,"mark.interval":w6,"mark.rect":w9,"mark.line":kR,"mark.point":_n,"mark.text":_h,"mark.cell":_y,"mark.area":_A,"mark.link":_z,"mark.image":_q,"mark.polygon":_K,"mark.box":_2,"mark.vector":_3,"mark.lineX":_7,"mark.lineY":Mn,"mark.connector":Ml,"mark.range":Mf,"mark.rangeX":Mp,"mark.rangeY":Mv,"mark.path":Mk,"mark.shape":MA,"mark.density":MT,"mark.heatmap":MD,"mark.wordCloud":MF,"mark.beeswarm":E4,"palette.category10":E6,"palette.category20":E8,"scale.linear":E9,"scale.ordinal":E7,"scale.band":At,"scale.identity":An,"scale.point":Ai,"scale.time":AB,"scale.log":AH,"scale.pow":AU,"scale.sqrt":AK,"scale.threshold":AZ,"scale.quantile":AQ,"scale.quantize":AJ,"scale.sequential":A1,"scale.constant":A2,"theme.classic":A6,"theme.classicDark":A7,"theme.academy":Se,"theme.light":A4,"theme.dark":A9,"component.axisX":Sn,"component.axisY":Sr,"component.legendCategory":SD,"component.legendContinuous":yy,"component.legends":SB,"component.title":SW,"component.sliderX":jn,"component.sliderY":jr,"component.scrollbarX":jl,"component.scrollbarY":js,"animation.scaleInX":ju,"animation.scaleOutX":(t,e)=>{let{coordinate:n}=e;return(e,r,i)=>{let[a]=e,{transform:o="",fillOpacity:l=1,strokeOpacity:s=1,opacity:u=1}=a.style,[c,f]=fD(n)?["left bottom","scale(1, 0.0001)"]:["left top","scale(0.0001, 1)"],h=[{transform:`${o} scale(1, 1)`.trimStart(),transformOrigin:c},{transform:`${o} ${f}`.trimStart(),transformOrigin:c,fillOpacity:l,strokeOpacity:s,opacity:u,offset:.99},{transform:`${o} ${f}`.trimStart(),transformOrigin:c,fillOpacity:0,strokeOpacity:0,opacity:0}];return a.animate(h,Object.assign(Object.assign({},i),t))}},"animation.scaleInY":jc,"animation.scaleOutY":(t,e)=>{let{coordinate:n}=e;return(e,r,i)=>{let[a]=e,{transform:o="",fillOpacity:l=1,strokeOpacity:s=1,opacity:u=1}=a.style,[c,f]=fD(n)?["left top","scale(0.0001, 1)"]:["left bottom","scale(1, 0.0001)"],h=[{transform:`${o} scale(1, 1)`.trimStart(),transformOrigin:c},{transform:`${o} ${f}`.trimStart(),transformOrigin:c,fillOpacity:l,strokeOpacity:s,opacity:u,offset:.99},{transform:`${o} ${f}`.trimStart(),transformOrigin:c,fillOpacity:0,strokeOpacity:0,opacity:0}];return a.animate(h,Object.assign(Object.assign({},i),t))}},"animation.waveIn":jf,"animation.fadeIn":jh,"animation.fadeOut":jd,"animation.zoomIn":t=>(e,n,r)=>{let[i]=e,{transform:a="",fillOpacity:o=1,strokeOpacity:l=1,opacity:s=1}=i.style,u="center center",c=[{transform:`${a} scale(0.0001)`.trimStart(),transformOrigin:u,fillOpacity:0,strokeOpacity:0,opacity:0},{transform:`${a} scale(0.0001)`.trimStart(),transformOrigin:u,fillOpacity:o,strokeOpacity:l,opacity:s,offset:.01},{transform:`${a} scale(1)`.trimStart(),transformOrigin:u,fillOpacity:o,strokeOpacity:l,opacity:s}];return i.animate(c,Object.assign(Object.assign({},r),t))},"animation.zoomOut":t=>(e,n,r)=>{let[i]=e,{transform:a="",fillOpacity:o=1,strokeOpacity:l=1,opacity:s=1}=i.style,u="center center",c=[{transform:`${a} scale(1)`.trimStart(),transformOrigin:u},{transform:`${a} scale(0.0001)`.trimStart(),transformOrigin:u,fillOpacity:o,strokeOpacity:l,opacity:s,offset:.99},{transform:`${a} scale(0.0001)`.trimStart(),transformOrigin:u,fillOpacity:0,strokeOpacity:0,opacity:0}];return i.animate(c,Object.assign(Object.assign({},r),t))},"animation.pathIn":jp,"animation.morphing":jE,"animation.growInX":jA,"animation.growInY":jS,"interaction.elementHighlight":jP,"interaction.elementHighlightByX":jT,"interaction.elementHighlightByColor":jC,"interaction.elementHoverScale":jL,"interaction.elementSelect":jR,"interaction.elementSelectByX":jD,"interaction.elementSelectByColor":jB,"interaction.fisheye":function({wait:t=30,leading:e,trailing:n=!1}){return r=>{let{options:i,update:a,setState:o,container:l}=r,s=vy(l),u=Oa(t=>{let e=vv(s,t);if(!e){o("fisheye"),a();return}o("fisheye",t=>{let n=cy({},t,{interaction:{tooltip:{preserve:!0}}});for(let t of n.marks)t.animate=!1;let[r,i]=e,a=function(t){let{coordinate:e={}}=t,{transform:n=[]}=e,r=n.find(t=>"fisheye"===t.type);if(r)return r;let i={type:"fisheye"};return n.push(i),e.transform=n,t.coordinate=e,i}(n);return a.focusX=r,a.focusY=i,a.visual=!0,n}),a()},t,{leading:e,trailing:n});return s.addEventListener("pointerenter",u),s.addEventListener("pointermove",u),s.addEventListener("pointerleave",u),()=>{s.removeEventListener("pointerenter",u),s.removeEventListener("pointermove",u),s.removeEventListener("pointerleave",u)}}},"interaction.chartIndex":jz,"interaction.tooltip":OP,"interaction.legendFilter":function(){return(t,e,n)=>{let{container:r}=t,i=e.filter(e=>e!==t),a=i.length>0,o=t=>SC(t).scales.map(t=>t.name),l=[...SP(r),...r.getElementsByClassName(SM),...ST(r)],s=l.flatMap(o),u=a?Oa(SL,50,{trailing:!0}):Oa(SN,50,{trailing:!0}),c=l.map(e=>{let{name:l,domain:c}=SC(e).scales[0],f=o(e),h={legend:e,channel:l,channels:f,allChannels:s};return e.className===S_?function(t,{legends:e,marker:n,label:r,datum:i,filter:a,defaultSelect:o,emitter:l,channel:s,state:u={}}){let c=new Map,f=new Map,h=new Map,d=new Map,{unselected:p={markerStroke:"#aaa",markerFill:"#aaa",labelFill:"#aaa"}}=u,y={unselected:cG(p,"marker")},g={unselected:cG(p,"label")},{setState:v,removeState:b}=vE(y,void 0),{setState:x,removeState:O}=vE(g,void 0),w=Array.from(e(t)),k=w.map(i),_=()=>{for(let t of w){let e=i(t),a=n(t),o=r(t);k.includes(e)?(b(a,"unselected"),O(o,"unselected")):(v(a,"unselected"),x(o,"unselected"))}};for(let e of w){let n=()=>{vN(t,"pointer")},r=()=>{vN(t,t.cursor)},o=t=>Sk(this,void 0,void 0,function*(){let n=i(e),r=k.indexOf(n);-1===r?k.push(n):k.splice(r,1),yield a(k),_();let{nativeEvent:o=!0}=t;o&&(k.length===w.length?l.emit("legend:reset",{nativeEvent:o}):l.emit("legend:filter",Object.assign(Object.assign({},t),{nativeEvent:o,data:{channel:s,values:k}})))});e.addEventListener("click",o),e.addEventListener("pointerenter",n),e.addEventListener("pointerout",r),c.set(e,o),f.set(e,n),h.set(e,r);let u=SS(e);if(u){let t=t=>Sk(this,void 0,void 0,function*(){t.stopPropagation();let n=i(e),r=k.indexOf(n),{nativeEvent:o=!0}=t;if(-1!==r&&1===k.length){if(!o)return;k=w.map(i),yield a(k),_(),l.emit("legend:reset",{nativeEvent:o})}else{if(k=[n],yield a(k),_(),!o)return;l.emit("legend:focus",Object.assign(Object.assign({},t),{nativeEvent:o,data:{channel:s,value:n}}))}});u.addEventListener("click",t),d.set(e,t)}}let M=t=>Sk(this,void 0,void 0,function*(){let{nativeEvent:e}=t;if(e)return;let{data:n}=t,{channel:r,value:i}=n;r===s&&(k=[i],yield a(k),_())}),E=t=>Sk(this,void 0,void 0,function*(){let{nativeEvent:e}=t;if(e)return;let{data:n}=t,{channel:r,values:i}=n;r===s&&(k=i,yield a(k),_())}),A=t=>Sk(this,void 0,void 0,function*(){let{nativeEvent:e}=t;e||(k=w.map(i),yield a(k),_())});return l.on("legend:filter",E),l.on("legend:focus",M),l.on("legend:reset",A),o&&l.emit("legend:filter",{data:{channel:s,values:o}}),()=>{for(let t of w){t.removeEventListener("click",c.get(t)),t.removeEventListener("pointerenter",f.get(t)),t.removeEventListener("pointerout",h.get(t));let e=SS(t);e&&e.removeEventListener("click",d.get(t))}l.off("legend:focus",M),l.off("legend:filter",E),l.off("legend:reset",A)}}(e,{legends:Sj,marker:SE,label:SA,datum:t=>{let{__data__:e}=t,{index:n}=e;return c[n]},filter:e=>{let n=Object.assign(Object.assign({},h),{value:e,ordinal:!0});a?u(i,n):u(t,n)},state:e.attributes.state,defaultSelect:e.attributes.defaultSelect,channel:l,emitter:n}):e.className===SM?function(t,{domain:e,filter:n,defaultSelect:r,emitter:i,channel:a}){let o,l,s=new Map,u=new Map,c=new Map,f=[...e],h=()=>{var e;let n=null==(e=t.ownerDocument)?void 0:e.defaultView;return n&&n.getContextService().getDomElement().parentElement||document.body},d=()=>{h().querySelectorAll("[legend-value]").forEach(t=>{let n=t.getAttribute("legend-value");n&&e.includes(n)&&(f.includes(n)?(t.style.opacity="1",t.classList.remove("legend-item-inactive")):(t.style.opacity="0.4",t.classList.add("legend-item-inactive")))})};o=h().querySelector(".legend-html"),l=t=>Sk(this,void 0,void 0,function*(){let r=t.target;for(;r&&!r.hasAttribute("legend-value")&&(r=r.parentElement)!==o;);if(!r||!r.hasAttribute("legend-value"))return;t.preventDefault(),t.stopPropagation();let l=r.getAttribute("legend-value");if(!l)return;let s=f.indexOf(l);-1===s?f.push(l):f.splice(s,1),yield n(f),d(),f.length===e.length?i.emit("legend:reset",{nativeEvent:!0}):i.emit("legend:filter",{nativeEvent:!0,data:{channel:a,values:f}})}),o.addEventListener("click",l),s.set(o,l);let p=t=>Sk(this,void 0,void 0,function*(){let{nativeEvent:e}=t;if(e)return;let{data:r}=t,{channel:i,value:o}=r;i===a&&(f=[o],yield n(f),d())}),y=t=>Sk(this,void 0,void 0,function*(){let{nativeEvent:e}=t;if(e)return;let{data:r}=t,{channel:i,values:o}=r;i===a&&(f=o,yield n(f),d())}),g=t=>Sk(this,void 0,void 0,function*(){let{nativeEvent:r}=t;r||(f=[...e],yield n(f),d())});return i.on("legend:filter",y),i.on("legend:focus",p),i.on("legend:reset",g),r&&i.emit("legend:filter",{data:{channel:a,values:r}}),()=>{h().querySelectorAll("[legend-value]").forEach(t=>{let n=t.getAttribute("legend-value");if(!n||!e.includes(n))return;let r=s.get(t),i=u.get(t),a=c.get(t);r&&t.removeEventListener("click",r),i&&t.removeEventListener("pointerenter",i),a&&t.removeEventListener("pointerout",a)}),s.clear(),u.clear(),c.clear(),i.off("legend:filter",y),i.off("legend:focus",p),i.off("legend:reset",g)}}(r,{domain:c,filter:e=>{let n=Object.assign(Object.assign({},h),{value:e,ordinal:!0});a?u(i,n):u(t,n)},defaultSelect:e.attributes.defaultSelect,channel:l,emitter:n}):function({legend:t,filter:e,emitter:n,channel:r}){let{attributes:i}=t,a=t=>{let{value:a}=t.detail,o=a.map(t=>{var e,n;let r=null==(e=i.data)?void 0:e.find(e=>e.value===t);return r&&null!=(n=r.domainValue)?n:t});e(o),n.emit({nativeEvent:!0,data:{channel:r,values:o}})};return t.addEventListener("valuechange",a),()=>{t.removeEventListener("valuechange",a)}}({legend:e,filter:e=>{let n=Object.assign(Object.assign({},h),{value:e,ordinal:!1});a?u(i,n):u(t,n)},emitter:n,channel:l})});return()=>{c.forEach(t=>t())}}},"interaction.legendHighlight":function(){return(t,e,n)=>{let{container:r,view:i,options:a}=t,o=SP(r),l=vh(r),s=t=>SC(t).scales[0].name,u=t=>{let{scale:{[t]:e}}=i;return e},c=vS(a,["active","inactive"]),f=vj(l,vO(i)),h=[];for(let t of o){let e=e=>{let{data:n}=t.attributes,{__data__:r}=e,{index:i}=r;return n[i].label},r=s(t),i=Sj(t),a=u(r),o=cs(l,t=>a.invert(t.__data__[r])),{state:d={}}=t.attributes,{inactive:p={}}=d,{setState:y,removeState:g}=vE(c,f),v={inactive:cG(p,"marker")},b={inactive:cG(p,"label")},{setState:x,removeState:O}=vE(v),{setState:w,removeState:k}=vE(b),_=t=>{for(let e of i){let n=SE(e),r=SA(e);e===t||null===t?(O(n,"inactive"),k(r,"inactive")):(x(n,"inactive"),w(r,"inactive"))}},M=(t,i)=>{let a=e(i),s=new Set(o.get(a));for(let t of l)s.has(t)?y(t,"active"):y(t,"inactive");_(i);let{nativeEvent:u=!0}=t;u&&n.emit("legend:highlight",Object.assign(Object.assign({},t),{nativeEvent:u,data:{channel:r,value:a}}))},E=new Map;for(let t of i){let e=e=>{M(e,t)};t.addEventListener("pointerover",e),E.set(t,e)}let A=t=>{for(let t of l)g(t,"inactive","active");_(null);let{nativeEvent:e=!0}=t;e&&n.emit("legend:unhighlight",{nativeEvent:e})},S=t=>{let{nativeEvent:n,data:a}=t;if(n)return;let{channel:o,value:l}=a;if(o!==r)return;let s=i.find(t=>e(t)===l);s&&M({nativeEvent:!1},s)},j=t=>{let{nativeEvent:e}=t;e||A({nativeEvent:!1})};t.addEventListener("pointerleave",A),n.on("legend:highlight",S),n.on("legend:unhighlight",j);let P=()=>{for(let[e,r]of(t.removeEventListener(A),n.off("legend:highlight",S),n.off("legend:unhighlight",j),E))e.removeEventListener(r)};h.push(P)}return()=>h.forEach(t=>t())}},"interaction.brushHighlight":jV,"interaction.brushXHighlight":function(t){return jV(Object.assign(Object.assign({},t),{brushRegion:jU,selectedHandles:["handle-e","handle-w"]}))},"interaction.brushYHighlight":function(t){return jV(Object.assign(Object.assign({},t),{brushRegion:jX,selectedHandles:["handle-n","handle-s"]}))},"interaction.brushAxisHighlight":function(t){return(e,n,r)=>{let{container:i,view:a,options:o}=e,{x:l,y:s}=vy(i).getBBox(),{coordinate:u}=a;return function(t,e){var{axes:n,elements:r,points:i,horizontal:a,datum:o,offsetY:l,offsetX:s,reverse:u=!1,state:c={},emitter:f,coordinate:h}=e,d=jK(e,["axes","elements","points","horizontal","datum","offsetY","offsetX","reverse","state","emitter","coordinate"]);let p=r(t),y=n(t),{setState:g,removeState:v}=vE(c,vj(p,o)),b=new Map,x=cG(d,"mask"),O=t=>Array.from(b.values()).every(([e,n,r,i])=>t.some(([t,a])=>t>=e&&t<=r&&a>=n&&a<=i)),w=y.map(t=>t.attributes.scale),k=t=>t.length>2?[t[0],t[t.length-1]]:t,_=new Map,M=()=>{_.clear();for(let t=0;t<y.length;t++){let{domain:e}=w[t].getOptions();_.set(t,k(e))}};M();let E=(t,e)=>{let n=[];for(let t of p)O(i(t))?(g(t,"active"),n.push(t)):g(t,"inactive");_.set(t,S(n,t)),e&&f.emit("brushAxis:highlight",{nativeEvent:!0,data:{selection:(()=>{if(!j)return Array.from(_.values());let t=[];for(let[e,n]of _){let{name:r}=w[e].getOptions();"x"===r?t[0]=n:t[1]=n}return t})()}})},A=t=>{for(let t of p)v(t,"active","inactive");M(),t&&f.emit("brushAxis:remove",{nativeEvent:!0})},S=(t,e)=>{let n=w[e],{name:r}=n.getOptions(),i=t.map(t=>{let e=t.__data__;return n.invert(e[r])});return k(gH(n,i))},j=y.some(a)&&y.some(t=>!a(t)),P=[];for(let t=0;t<y.length;t++){let e=y[t],{hotZone:n,brushRegion:r,extent:i}=(a(e)?function(t,e){var{offsetY:n,offsetX:r,cross:i=!1}=e,a=jK(e,["offsetY","offsetX","cross"]);let o=j0(t),[,l]=jJ(t).getLocalBounds().min,[s,u]=o.min,[c,f]=o.max,h=f-u;return{brushRegion:jU,hotZone:new lT({className:jZ,style:Object.assign({width:c-s,height:i?h:2*h,transform:`translate(${s}, ${i?u:l-h})`},a)}),extent:i?(t,e,n,r)=>[t,-1/0,n,1/0]:(t,e,r,i)=>[t,Math.floor(u-n),r,Math.ceil(f-n)]}}:function(t,e){var{cross:n,offsetX:r,offsetY:i}=e,a=jK(e,["cross","offsetX","offsetY"]);let o=j0(t),[l]=jJ(t).getLocalBounds().min,[s,u]=o.min,[c,f]=o.max,h=(c-s)*2;return{brushRegion:jX,hotZone:new lT({className:jZ,style:Object.assign({width:n?h/2:h,transform:`translate(${(n?s:l-h/2).toFixed(2)}, ${u})`,height:f-u},a)}),extent:n?(t,e,n,r)=>[-1/0,e,1/0,r]:(t,e,n,i)=>[Math.floor(s-r),e,Math.ceil(c-r),i]}})(e,{offsetY:l,offsetX:s,cross:j,zIndex:999,fill:"transparent"});e.parentNode.appendChild(n);let o=jq(n,Object.assign(Object.assign({},x),{reverse:u,brushRegion:r,brushended(n){b.delete(e),0===Array.from(b.entries()).length?A(n):E(t,n)},brushed(n,r,a,o,l){b.set(e,i(n,r,a,o)),E(t,l)}}));P.push(o)}let T=(t={})=>{let{nativeEvent:e}=t;e||P.forEach(t=>t.remove(!1))},C=(t,e,n)=>{let[r,i]=t,o=N(r,e,n),l=N(i,e,n)+(e.getStep?e.getStep():0);return a(n)?[o,-1/0,l,1/0]:[-1/0,o,1/0,l]},N=(t,e,n)=>{let{height:r,width:i}=h.getOptions(),o=e.clone();return a(n)?o.update({range:[0,i]}):o.update({range:[r,0]}),o.map(t)},L=t=>{let{nativeEvent:e}=t;if(e)return;let{selection:n}=t.data;for(let t=0;t<P.length;t++){let e=n[t],r=P[t],i=y[t];if(e){let n=w[t];r.move(...C(e,n,i),!1)}else r.remove(!1)}};return f.on("brushAxis:remove",T),f.on("brushAxis:highlight",L),()=>{P.forEach(t=>t.destroy()),f.off("brushAxis:remove",T),f.off("brushAxis:highlight",L)}}(i,Object.assign({elements:vh,axes:jQ,offsetY:s,offsetX:l,points:t=>t.__data__.points,horizontal:t=>{let{startPos:[e,n],endPos:[r,i]}=t.attributes;return e!==r&&n===i},datum:vO(a),state:vS(o,["active",["inactive",{opacity:.5}]]),coordinate:u,emitter:r},t))}},"interaction.brushFilter":j2,"interaction.brushXFilter":function(t){return j2(Object.assign(Object.assign({hideX:!0},t),{brushRegion:jU}))},"interaction.brushYFilter":function(t){return j2(Object.assign(Object.assign({hideY:!0},t),{brushRegion:jX}))},"interaction.sliderFilter":Pn,"interaction.sliderWheel":Pr,"interaction.scrollbarFilter":function(t={}){return(e,n,r)=>{let{view:i,container:a}=e;if(!a.getElementsByClassName(Pi).length)return()=>{};let{scale:o}=i,{x:l,y:s}=o,u={x:[...l.getOptions().domain],y:[...s.getOptions().domain]};return l.update({domain:l.getOptions().expectedDomain}),s.update({domain:s.getOptions().expectedDomain}),Pn(Object.assign({initDomain:u,className:Pi,prefix:"scrollbar",hasState:!0,setValue:(t,e)=>t.setValue(e[0]),getInitValues:t=>{let e=t.slider.attributes.values;if(0!==e[0]||1!==e[1])return e}},t))(e,n,r)}},"interaction.poptip":Ps,"interaction.treemapDrillDown":function(t={}){let{originData:e=[],layout:n}=t,r=cy({},PC,PT(t,["originData","layout"])),i=cG(r,"breadCrumb"),a=cG(r,"active");return t=>{let{update:r,setState:o,container:l,options:s}=t,u=cX(l).select(".plot").node(),{state:c}=s.marks[0],f=new lb;u.appendChild(f);let h=(t,s)=>{var c,d,p,y;return c=this,d=void 0,p=void 0,y=function*(){if(f.removeChildren(),s){let e="",n=i.y,r=0,o=[],l=u.getBBox().width,s=t.map((a,s)=>{e=`${e}${a}/`,o.push(a);let u=new lN({name:e.replace(/\/$/,""),style:Object.assign(Object.assign({text:a,x:r,path:[...o],depth:s},i),{y:n})});f.appendChild(u);let c=new lN({style:Object.assign(Object.assign({x:r+=u.getBBox().width,text:" / "},i),{y:n})});return f.appendChild(c),(r+=c.getBBox().width)>l&&(n=f.getBBox().height+i.y,r=0,u.attr({x:r,y:n}),r+=u.getBBox().width,c.attr({x:r,y:n}),r+=c.getBBox().width),s===ya(t)-1&&c.remove(),u});s.forEach((t,e)=>{if(e===ya(s)-1)return;let n=Object.assign({},t.attributes);t.attr("cursor","pointer"),t.addEventListener("mouseenter",()=>{t.attr(a)}),t.addEventListener("mouseleave",()=>{t.attr(n)}),t.addEventListener("click",()=>{h(cr(t,["style","path"]),cr(t,["style","depth"]))})})}[...SP(l),...ST(l)].forEach(t=>{o(t,t=>t)}),o("treemapDrillDown",r=>{let{marks:i}=r,a=t.join("/"),o=i.map(t=>{if("rect"!==t.type)return t;let r=e;if(s){let t=e.filter(t=>{let e=cr(t,["id"]);return e&&(e.match(`${a}/`)||a.match(e))}).map(t=>({value:0===t.height?cr(t,["value"]):void 0,name:cr(t,["id"])})),{paddingLeft:i,paddingBottom:o,paddingRight:l}=n;r=PP(t,Object.assign(Object.assign({},n),{paddingTop:(n.paddingTop||f.getBBox().height+10)/(s+1),paddingLeft:i/(s+1),paddingBottom:o/(s+1),paddingRight:l/(s+1),path:t=>t.name,layer:t=>t.depth===s+1}),{value:"value"})[0]}else r=e.filter(t=>1===t.depth);let i=[];return r.forEach(({path:t})=>{i.push(dT(t))}),cy({},t,{data:r,scale:{color:{domain:i}}})});return Object.assign(Object.assign({},r),{marks:o})}),yield r(void 0,["legendFilter"])},new(p||(p=Promise))(function(t,e){function n(t){try{i(y.next(t))}catch(t){e(t)}}function r(t){try{i(y.throw(t))}catch(t){e(t)}}function i(e){var i;e.done?t(e.value):((i=e.value)instanceof p?i:new p(function(t){t(i)})).then(n,r)}i((y=y.apply(c,d||[])).next())})},d=t=>{let n=t.target,{markType:r,nodeName:i,attributes:a}=n||{};if("rect"!==r&&i!==nq.TEXT)return;let o=i===nq.TEXT&&!0===cr(a,"isTreemapLabel")?n.attributes.key.split("-")[0]:cr(n,["__data__","key"]),l=Pc(e,t=>t.id===o);cr(l,"height")&&h(cr(l,"path"),cr(l,"depth"))};u.addEventListener("click",d);let p=ws(Object.assign(Object.assign({},c.active),c.inactive)),y=()=>{vD(u).forEach(t=>{let n=cr(t,["style","cursor"]),r=Pc(e,e=>e.id===cr(t,["__data__","key"]));if("pointer"!==n&&(null==r?void 0:r.height)){t.style.cursor="pointer";let e=OK(t.attributes,p);t.addEventListener("mouseenter",()=>{t.attr(c.active)}),t.addEventListener("mouseleave",()=>{t.attr(cy(e,c.inactive))})}})};return y(),u.addEventListener("mousemove",y),()=>{f.remove(),u.removeEventListener("click",d),u.removeEventListener("mousemove",y)}}},"interaction.drillDown":function(t={}){let{breadCrumb:e={}}=t,n=cy({},P$,e);return t=>{let{update:e,setState:r,container:i,view:a,options:o}=t,l=i.ownerDocument,s=cX(i).select(".plot").node(),u=o.marks.find(({id:t})=>t===PL);if(!u)return;let{state:c}=u,f=l.createElement("g");f.style.transform=`translate(${n.x||0}px, ${n.y||0}px)`,f.setAttribute("x","drilldown-breadcrumb"),s.appendChild(f);let h=t=>{var i,a,o,u;return i=this,a=void 0,o=void 0,u=function*(){if(f.removeChildren(),t&&t.length>0){let e=l.createElement("text",{style:Object.assign({text:n.rootText},n.style)});f.appendChild(e);let r="",i=n.style.y,a=e.getBBox().width,o=s.getBBox().width,u=t.map((t,e)=>{let s=l.createElement("text",{style:Object.assign(Object.assign({x:a,text:" / "},n.style),{y:i})});f.appendChild(s),a+=s.getBBox().width,r=`${r}${t} / `;let u=l.createElement("text",{name:r.replace(/\s\/\s$/,""),style:Object.assign(Object.assign({text:t,x:a},n.style),{y:i})});return f.appendChild(u),(a+=u.getBBox().width)>o&&(i=f.getBBox().height,a=0,s.attr({x:a,y:i}),a+=s.getBBox().width,u.attr({x:a,y:i}),a+=u.getBBox().width),u});[e,...u].forEach((e,r)=>{if(r===u.length)return;let i=Object.assign({},e.attributes);e.attr("cursor","pointer"),e.addEventListener("mouseenter",()=>{e.attr(n.active)}),e.addEventListener("mouseleave",()=>{e.attr(i)}),e.addEventListener("click",()=>{h(t.slice(0,r))})})}r("drillDown",e=>{let{marks:n}=e,r=n.map(e=>{if(e.id!==PL&&"rect"!==e.type)return e;let{data:n}=e;return cy({},e,{data:n.filter(e=>{var n;let r=null!=(n=e.path)?n:[];if(0===t.length)return!0;if(!Array.isArray(r)||r.length<t.length)return!1;for(let e=0;e<t.length;e++)if(r[e]!==t[e])return!1;return!0})})});return Object.assign(Object.assign({},e),{marks:r})}),yield e()},new(o||(o=Promise))(function(t,e){function n(t){try{l(u.next(t))}catch(t){e(t)}}function r(t){try{l(u.throw(t))}catch(t){e(t)}}function l(e){var i;e.done?t(e.value):((i=e.value)instanceof o?i:new o(function(t){t(i)})).then(n,r)}l((u=u.apply(i,a||[])).next())})},d=t=>{var e,n;let r=t.target,i=r.markType,a=r.style||{},o=a[PI],l=a[PB],s=r.__data__;"rect"===i&&o===PL&&l&&h(null!=(n=null==(e=null==s?void 0:s.data)?void 0:e.path)?n:[])};s.addEventListener("click",d);let p=ws(Object.assign(Object.assign({},c.active),c.inactive)),y=()=>{s.querySelectorAll(".element").filter(t=>(t.style||{})[PI]===PL).forEach(t=>{let e=cr(t,["style",PB]);if("pointer"!==cr(t,["style","cursor"])&&e){t.style.cursor="pointer";let e=OK(t.attributes,p);t.addEventListener("mouseenter",()=>{t.attr(c.active)}),t.addEventListener("mouseleave",()=>{t.attr(cy(e,c.inactive))})}})};return s.addEventListener("mousemove",y),()=>{f.remove(),s.removeEventListener("click",d),s.removeEventListener("mousemove",y)}}},"interaction.elementPointMove":function(t={}){let{selection:e=[],precision:n=2}=t,r=PG(t,["selection","precision"]),i=Object.assign(Object.assign({},Pq),r||{}),a=cG(i,"path"),o=cG(i,"label"),l=cG(i,"point");return(t,r,i)=>{let s,{update:u,setState:c,container:f,view:h,options:{marks:d,coordinate:p}}=t,y=vy(f),g=vD(y),v=e,{transform:b=[],type:x}=p,O=!!Pc(b,({type:t})=>"transpose"===t),w="polar"===x,k="theta"===x,_=!!Pc(g,({markType:t})=>"area"===t);_&&(g=g.filter(({markType:t})=>"area"===t));let M=new lb({style:{zIndex:2}});y.appendChild(M);let E=()=>{i.emit("element-point:select",{nativeEvent:!0,data:{selection:v}})},A=t=>{let e=t.target;v=[e.parentNode.childNodes.indexOf(e)],E(),j(e)},S=t=>{let{data:{selection:e},nativeEvent:n}=t;if(n)return;let r=cr(g,[null==(v=e)?void 0:v[0]]);r&&j(r)},j=t=>{let e,{attributes:r,markType:p,__data__:y}=t,{stroke:g}=r,{points:b,seriesTitle:x,color:A,title:S,seriesX:P,y1:T}=y;if(O&&"interval"!==p)return;let{scale:C,coordinate:N}=(null==s?void 0:s.view)||h,{color:L,y:I,x:R}=C,D=N.getCenter();M.removeChildren();let B=(t,e,n,r)=>PW(this,void 0,void 0,function*(){return c("elementPointMove",a=>{var o;let l=((null==(o=null==s?void 0:s.options)?void 0:o.marks)||d).map(a=>{if(!r.includes(a.type))return a;let{data:o,encode:l}=a,s=Object.keys(l).reduce((r,i)=>{let a=l[i];return"x"===i&&(r[a]=t),"y"===i&&(r[a]=e),"color"===i&&(r[a]=n),r},{}),u=o.map(t=>["x","color"].reduce((e,n)=>{let r=l[n];return r?t[r]===s[r]&&e:e},!0)?Object.assign(Object.assign({},t),s):t);return i.emit("element-point:moved",{nativeEvent:!0,data:{changeData:s,data:u}}),cy({},a,{data:u,animate:!1})});return Object.assign(Object.assign({},a),{marks:l})}),yield u("elementPointMove")});if(["line","area"].includes(p))b.forEach((r,i)=>{let u=R.invert(P[i]);if(!u)return;let c=new ly({name:PH,style:Object.assign({cx:r[0],cy:r[1],fill:g},l)}),h=((t,e)=>{let n=cr(t,["__data__","seriesItems",e,"0","value"]),r=cr(t,["__data__","seriesIndex",e]),{__data__:{data:i,encode:a,transform:o}}=t.parentNode,l=Pc(o,({type:t})=>"normalizeY"===t),s=cr(a,["y","field"]),u=i[r][s];return t=>l?1===n?t:t/(1-t)/(n/(1-n))*u:t})(t,i);c.addEventListener("mousedown",d=>{let p=N.output([P[i],0]),y=null==x?void 0:x.length;f.attr("cursor","move"),v[1]!==i&&(v[1]=i,E()),PU(M.childNodes,v,l);let[g,O]=PX(M,c,a,o),k=t=>{let a=r[1]+t.clientY-e[1];if(_)if(w){let[o,l]=PZ(D,p,[r[0]+t.clientX-e[0],a]),[,s]=N.output([1,I.output(0)]),[,u]=N.invert([o,s-(b[i+y][1]-l)]),f=(i+1)%y,d=vR([b[(i-1+y)%y],[o,l],x[f]&&b[f]]);O.attr("text",h(I.invert(u)).toFixed(n)),g.attr("d",d),c.attr("cx",o),c.attr("cy",l)}else{let[,t]=N.output([1,I.output(0)]),[,e]=N.invert([r[0],t-(b[i+y][1]-a)]),o=vR([b[i-1],[r[0],a],x[i+1]&&b[i+1]]);O.attr("text",h(I.invert(e)).toFixed(n)),g.attr("d",o),c.attr("cy",a)}else{let[,t]=N.invert([r[0],a]),e=vR([b[i-1],[r[0],a],b[i+1]]);O.attr("text",I.invert(t).toFixed(n)),g.attr("d",e),c.attr("cy",a)}};e=[d.clientX,d.clientY],window.addEventListener("mousemove",k);let S=()=>PW(this,void 0,void 0,function*(){if(f.attr("cursor","default"),window.removeEventListener("mousemove",k),f.removeEventListener("mouseup",S),nb(O.attr("text")))return;let e=Number(O.attr("text")),n=PK(L,A);s=yield B(u,e,n,["line","area"]),O.remove(),g.remove(),j(t)});f.addEventListener("mouseup",S)}),M.appendChild(c)}),PU(M.childNodes,v,l);else if("interval"===p){let r=[(b[0][0]+b[1][0])/2,b[0][1]];O?r=[b[0][0],(b[0][1]+b[1][1])/2]:k&&(r=b[0]);let i=(t=>{let e=cr(t,["__data__","y"]),n=cr(t,["__data__","y1"])-e,{__data__:{data:r,encode:i,transform:a},childNodes:o}=t.parentNode,l=Pc(a,({type:t})=>"normalizeY"===t),s=cr(i,["y","field"]),u=r[o.indexOf(t)][s];return(t,e=!1)=>l||e?t/(1-t)/(n/(1-n))*u:t})(t),u=new ly({name:PH,style:Object.assign(Object.assign({cx:r[0],cy:r[1],fill:g},l),{stroke:l.activeStroke})});u.addEventListener("mousedown",l=>{f.attr("cursor","move");let c=PK(L,A),[h,d]=PX(M,u,a,o),y=t=>{if(O){let a=r[0]+t.clientX-e[0],[o]=N.output([I.output(0),I.output(0)]),[,l]=N.invert([o+(a-b[2][0]),r[1]]),s=vR([[a,b[0][1]],[a,b[1][1]],b[2],b[3]],!0);d.attr("text",i(I.invert(l)).toFixed(n)),h.attr("d",s),u.attr("cx",a)}else if(k){let a=r[1]+t.clientY-e[1],o=r[0]+t.clientX-e[0],[l,s]=PZ(D,[o,a],r),[c,f]=PZ(D,[o,a],b[1]),p=T-N.invert([l,s])[1];if(p<0)return;let y=function(t,e,n=0){let r=[["M",...e[1]]],i=vI(t,e[1]),a=vI(t,e[0]);return 0===i?r.push(["L",...e[3]],["A",a,a,0,n,1,...e[0]],["Z"]):r.push(["A",i,i,0,n,0,...e[2]],["L",...e[3]],["A",a,a,0,n,1,...e[0]],["Z"]),r}(D,[[l,s],[c,f],b[2],b[3]],+(p>.5));d.attr("text",i(p,!0).toFixed(n)),h.attr("d",y),u.attr("cx",l),u.attr("cy",s)}else{let a=r[1]+t.clientY-e[1],[,o]=N.output([1,I.output(0)]),[,l]=N.invert([r[0],o-(b[2][1]-a)]),s=vR([[b[0][0],a],[b[1][0],a],b[2],b[3]],!0);d.attr("text",i(I.invert(l)).toFixed(n)),h.attr("d",s),u.attr("cy",a)}};e=[l.clientX,l.clientY],window.addEventListener("mousemove",y);let g=()=>PW(this,void 0,void 0,function*(){if(f.attr("cursor","default"),f.removeEventListener("mouseup",g),window.removeEventListener("mousemove",y),nb(d.attr("text")))return;let e=Number(d.attr("text"));s=yield B(S,e,c,[p]),d.remove(),h.remove(),j(t)});f.addEventListener("mouseup",g)}),M.appendChild(u)}};g.forEach((t,e)=>{v[0]===e&&j(t),t.addEventListener("click",A),t.addEventListener("mouseenter",PY),t.addEventListener("mouseleave",PV)});let P=t=>{let e=null==t?void 0:t.target;e&&(e.name===PH||g.includes(e))||(v=[],E(),M.removeChildren())};return i.on("element-point:select",S),i.on("element-point:unselect",P),f.addEventListener("mousedown",P),()=>{M.remove(),i.off("element-point:select",S),i.off("element-point:unselect",P),f.removeEventListener("mousedown",P),g.forEach(t=>{t.removeEventListener("click",A),t.removeEventListener("mouseenter",PY),t.removeEventListener("mouseleave",PV)})}}},"composition.spaceLayer":PJ,"composition.spaceFlex":P1,"composition.facetRect":To,"composition.repeatMatrix":()=>t=>[P2.of(t).call(P9).call(P4).call(Tu).call(Tc).call(P6).call(P8).call(Ts).value()],"composition.facetCircle":()=>t=>[P2.of(t).call(P9).call(Tp).call(P4).call(Td).call(P7).call(Tt,Tg,Ty,Ty,{frame:!1}).call(P6).call(P8).call(Th).value()],"composition.timingKeyframe":Tv,"labelTransform.overlapHide":t=>{let{priority:e}=t;return t=>{let n=[];return e&&t.sort(e),t.forEach(t=>{vc(t);let e=t.getLocalBounds();n.some(t=>(function(t,e){let[n,r]=t,[i,a]=e;return n[0]<a[0]&&r[0]>i[0]&&n[1]<a[1]&&r[1]>i[1]})(No(e),No(t.getLocalBounds())))?vu(t):n.push(t)}),t}},"labelTransform.overlapDodgeY":t=>{let{maxIterations:e=10,maxError:n=.1,padding:r=1}=t;return t=>{let i=t.length;if(i<=1)return t;let[a,o]=Nu(),[l,s]=Nu(),[u,c]=Nu(),[f,h]=Nu();for(let e of t){let{min:t,max:n}=function(t){let e=t.cloneNode(!0),n=e.getElementById("connector");n&&e.removeChild(n);let{min:r,max:i}=e.getRenderBounds();return e.destroy(),{min:r,max:i}}(e),[r,i]=t,[a,l]=n;o(e,i),s(e,i),c(e,l-i),h(e,[r,a])}for(let a=0;a<e;a++){t.sort((t,e)=>gu(l(t),l(e)));let e=0;for(let n=0;n<i-1;n++){let i,a=t[n],o=n+1;for(;(i=t[o])&&!function([t,e],[n,r]){return r>t&&e>n}(f(a),f(i));)o+=1;if(i){let t=l(a),n=u(a),o=l(i),c=o-(t+n);if(c<r){let n=(r-c)/2;e=Math.max(e,n),s(a,t-n),s(i,o+n)}}}if(e<n)break}for(let e of t)e.style.y+=l(e)-a(e);return t}},"labelTransform.overflowHide":()=>t=>(t.forEach(t=>{vc(t);let e=t.attr("bounds");Ns(No(t.getLocalBounds()),e)&&vu(t)}),t),"labelTransform.contrastReverse":t=>{let{threshold:e=4.5,palette:n=["#000","#fff"]}=t;return t=>(t.forEach(t=>{let r=t.attr("dependentElement").parsedStyle.fill;Nd(t.parsedStyle.fill,r)<e&&t.attr("fill",Np(r,n))}),t)},"labelTransform.overflowStroke":t=>{let{palette:e=["#000","#fff"],threshold:n=2}=t;return t=>(t.forEach(t=>{var r,i;let a=t.attr("dependentElement"),o=null!=(i=null!=(r=t.attributes.fill)?r:t.parsedStyle.fill)?i:"#fff";if(Ns(No(Ny(t)),No(Ny(a)),n)){let n=Np(Nc(o),e);t.attr("stroke",n)}else t.removeAttribute("stroke")}),t)},"labelTransform.exceedAdjust":(t={})=>(e,{canvas:n,layout:r})=>{let{bounds:i="view",offsetX:a=0,offsetY:o=0}=t,l=(()=>{if("main"===i){let{x:t=0,y:e=0,width:n=0,height:i=0,marginLeft:l=0,marginRight:s=0,marginTop:u=0,marginBottom:c=0,paddingLeft:f=0,paddingRight:h=0,paddingTop:d=0,paddingBottom:p=0}=r;return[[t+l+f+a,e+u+d+o],[t+n-s-h-a,e+i-c-p-o]]}{let{x:t=0,y:e=0,width:n=0,height:i=0}=r;return[[t+a,e+o],[t+n-a,e+i-o]]}})();return e.forEach(t=>{var e,n;vc(t);let{max:r,min:i}=(e=t.getRenderBounds(),n=t.getBounds(),e&&e.min&&e.max?n&&n.min&&n.max?{min:[Math.min(e.min[0],n.min[0]),Math.min(e.min[1],n.min[1])],max:[Math.max(e.max[0],n.max[0]),Math.max(e.max[1],n.max[1])]}:e:n&&n.min&&n.max?n:{min:[0,0],max:[0,0]});if(!r||!i||0===r[0]&&0===r[1]&&0===i[0]&&0===i[1])return;let[a,o]=r,[s,u]=i,c=((t,e)=>{let[[n,r],[i,a]]=e,[[o,l],[s,u]]=t,c=0,f=0;return o<n?c=n-o:s>i&&(c=i-s),l<r?f=r-l:u>a&&(f=a-u),[c,f]})([[s,u],[a,o]],l);t.style.connector&&t.style.connectorPoints&&(t.style.connectorPoints[0][0]-=c[0],t.style.connectorPoints[0][1]-=c[1]),t.style.x+=c[0],t.style.y+=c[1]}),e}})),{"interaction.drillDown":function(t={}){let{breadCrumb:e={},isFixedColor:n=!1}=t,r=cy({},wu,e);return t=>{let{update:e,setState:i,container:a,view:o,options:l}=t,s=a.ownerDocument,u=cX(a).select(".plot").node(),{state:c}=l.marks.find(({id:t})=>t===wn),f=s.createElement("g");u.appendChild(f);let h=(t,a)=>{var l,c,d,p;return l=this,c=void 0,d=void 0,p=function*(){if(f.removeChildren(),t){let e=s.createElement("text",{style:Object.assign({x:0,text:r.rootText,depth:0},r.style)});f.appendChild(e);let n="",i=null==t?void 0:t.split(" / "),a=r.style.y,o=f.getBBox().width,l=u.getBBox().width,c=i.map((t,e)=>{let i=s.createElement("text",{style:Object.assign(Object.assign({x:o,text:" / "},r.style),{y:a})});f.appendChild(i),o+=i.getBBox().width,n=`${n}${t} / `;let u=s.createElement("text",{name:n.replace(/\s\/\s$/,""),style:Object.assign(Object.assign({text:t,x:o,depth:e+1},r.style),{y:a})});return f.appendChild(u),(o+=u.getBBox().width)>l&&(a=f.getBBox().height,o=0,i.attr({x:o,y:a}),o+=i.getBBox().width,u.attr({x:o,y:a}),o+=u.getBBox().width),u});[e,...c].forEach((t,e)=>{if(e===c.length)return;let n=Object.assign({},t.attributes);t.attr("cursor","pointer"),t.addEventListener("mouseenter",()=>{t.attr(r.active)}),t.addEventListener("mouseleave",()=>{t.attr(n)}),t.addEventListener("click",()=>{h(t.name,cr(t,["style","depth"]))})})}i("drillDown",e=>{let{marks:r}=e,i=r.map(e=>{if(e.id!==wn&&"rect"!==e.type)return e;let{data:r}=e,i=Object.fromEntries(["color"].map(t=>[t,{domain:o.scale[t].getOptions().domain}])),l=r.filter(e=>{let r=e.path;return n||(e[wa]=r.split(" / ")[a]),!t||RegExp(`^${t}.+`).test(r)});return cy({},e,n?{data:l,scale:i}:{data:l})});return Object.assign(Object.assign({},e),{marks:i})}),yield e()},new(d||(d=Promise))(function(t,e){function n(t){try{i(p.next(t))}catch(t){e(t)}}function r(t){try{i(p.throw(t))}catch(t){e(t)}}function i(e){var i;e.done?t(e.value):((i=e.value)instanceof d?i:new d(function(t){t(i)})).then(n,r)}i((p=p.apply(l,c||[])).next())})},d=t=>{let e=t.target;if(cr(e,["style",wr])!==wn||"rect"!==cr(e,["markType"])||!cr(e,["style",O7]))return;let n=cr(e,["__data__","key"]),r=cr(e,["style","depth"]);e.style.cursor="pointer",h(n,r)};u.addEventListener("click",d);let p=ws(Object.assign(Object.assign({},c.active),c.inactive)),y=()=>{u.querySelectorAll(".element").filter(t=>cr(t,["style",wr])===wn).forEach(t=>{let e=cr(t,["style",O7]);if("pointer"!==cr(t,["style","cursor"])&&e){t.style.cursor="pointer";let e=OK(t.attributes,p);t.addEventListener("mouseenter",()=>{t.attr(c.active)}),t.addEventListener("mouseleave",()=>{t.attr(cy(e,c.inactive))})}})};return u.addEventListener("mousemove",y),()=>{f.remove(),u.removeEventListener("click",d),u.removeEventListener("mousemove",y)}}},"mark.sunburst":wl}),class extends l{constructor(t){super(Object.assign(Object.assign({},t),{lib:s}))}}),DK=function(){return(DK=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},DZ=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n},DQ=["renderer","plugins"],DJ=["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"],D0="__transform__",D1=function(t,e){return(0,tp.isBoolean)(e)?{type:t,available:e}:DK({type:t},e)},D2={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 D1("stackY",t)}},normalize:{target:"transform",value:function(t){return D1("normalizeY",t)}},percent:{target:"transform",value:function(t){return D1("normalizeY",t)}},group:{target:"transform",value:function(t){return D1("dodgeX",t)}},sort:{target:"transform",value:function(t){return D1("sortX",t)}},symmetry:{target:"transform",value:function(t){return D1("symmetryY",t)}},diff:{target:"transform",value:function(t){return D1("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(0,tp.isBoolean)(t)?{connect:t}:t}},transpose:{target:"transpose",value:function(t){return D1("transpose",t)}}},D5=["xField","yField","seriesField","colorField","shapeField","keyField","positionField","meta","tooltip","animate","stack","normalize","percent","group","sort","symmetry","diff"],D3=[{key:"annotations",extendedProperties:[]},{key:"line",type:"line",extendedProperties:D5},{key:"connector",type:"connector",extendedProperties:[]},{key:"point",type:"point",extendedProperties:D5,defaultShapeConfig:{shapeField:"circle"}},{key:"area",type:"area",extendedProperties:D5}],D4=[{key:"transform",callback:function(t,e,n){t[e]=t[e]||[];var r,i=n.available,a=DZ(n,["available"]);if(void 0===i||i)t[e].push(DK(((r={})[D0]=!0,r),a));else{var o=t[e].indexOf(function(t){return t.type===n.type});-1!==o&&t[e].splice(o,1)}}},{key:"labels",callback:function(t,e,n){var r;if(!n||(0,tp.isArray)(n)){t[e]=n||[];return}n.text||(n.text=t.yField),t[e]=t[e]||[],t[e].push(DK(((r={})[D0]=!0,r),n))}},{key:"transpose",callback:function(t,e,n){var r;n.available?t.coordinate={transform:[DK(((r={})[D0]=!0,r),n)]}:t.coordinate={}}}],D6=[{key:"conversionTag",shape:"ConversionTag"},{key:"axisText",shape:"BidirectionalBarAxisText"}],D8=(u=function(t,e){return(u=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}u(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),D9=function(){return(D9=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},D7=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n},Bt=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=D7(e,["style"]);return t.call(this,D9({style:D9({fill:"#eee"},n)},r))||this}return D8(e,t),e}(lS),Be=(c=function(t,e){return(c=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}c(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),Bn=function(){return(Bn=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},Br=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n},Bi=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=Br(e,["style"]);return t.call(this,Bn({style:Bn({text:"",fontSize:12,textBaseline:"middle",textAlign:"center",fill:"#000",fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",lineWidth:1},n)},r))||this}return Be(e,t),e}(lN),Ba=function(t,e,n){if(n||2==arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},Bo=function(t,e){if((0,tp.isArray)(e))return e},Bl=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return tp.mergeWith.apply(void 0,Ba(Ba([],t,!1),[Bo],!1))},Bs=(f=function(t,e){return(f=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}f(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),Bu=function(t){function e(e,n,r){var i=t.call(this,{style:Bl(r,n)})||this;return i.chart=e,i}return Bs(e,t),e.prototype.connectedCallback=function(){this.render(this.attributes,this),this.bindEvents(this.attributes,this)},e.prototype.disconnectedCallback=function(){},e.prototype.attributeChangedCallback=function(t){},e.prototype.update=function(t,e){var n;return this.attr(Bl({},this.attributes,t||{})),null==(n=this.render)?void 0:n.call(this,this.attributes,this,e)},e.prototype.clear=function(){this.removeChildren()},e.prototype.getElementsLayout=function(){var t=this.chart.getContext().canvas.document.getElementsByClassName("element"),e=[];return t.forEach(function(t){var n=t.getBBox(),r=n.x,i=n.y,a=n.width,o=n.height,l=t.__data__;e.push({bbox:n,x:r,y:i,width:a,height:o,key:l.key,data:l})}),e},e.prototype.bindEvents=function(t,e){},e}(lv),Bc=(h=function(t,e){return(h=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}h(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),Bf=function(){return(Bf=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},Bh=function(t){function e(n,r){return t.call(this,n,r,{type:e.tag})||this}return Bc(e,t),e.prototype.getConversionTagLayout=function(){var t="vertical"===this.direction,e=Array.from(this.getElementsLayout()).sort(function(e,n){return t?e.y-n.y:e.x-n.x}),n=e[0],r=n.x,i=n.y,a=n.height,o=n.width,l=n.data,s=["items",0,"value"],u=(0,tp.get)(l,s),c=t?e[1].y-i-a:e[1].x-r-o,f=[],h=this.attributes,d=h.size,p=void 0===d?40:d,y=h.arrowSize,g=void 0===y?20:y,v=h.spacing,b=void 0===v?4:v;return e.forEach(function(e,n){if(n>0){var r=e.x,i=e.y,a=e.height,o=e.width,l=e.data,h=e.key,d=(0,tp.get)(l,s),y=p/2;if(t){var v=r+o/2,x=i;f.push({points:[[v+y,x-c+b],[v+y,x-g-b],[v,x-b],[v-y,x-g-b],[v-y,x-c+b]],center:[v,x-c/2],width:c,value:[u,d],key:h})}else{var v=r,x=i+a/2;f.push({points:[[r-c+b,x-y],[r-g-b,x-y],[v-b,x],[r-g-b,x+y],[r-c+b,x+y]],center:[v-c/2,x],width:c,value:[u,d],key:h})}u=d}}),f},e.prototype.render=function(){this.setDirection(),this.drawConversionTag()},e.prototype.setDirection=function(){var t=this.chart.getCoordinate(),e=(0,tp.get)(t,"options.transformations"),n="horizontal";e.forEach(function(t){t.includes("transpose")&&(n="vertical")}),this.direction=n},e.prototype.drawConversionTag=function(){var t=this,e=this.getConversionTagLayout(),n=this.attributes,r=n.style,i=n.text,a=i.style,o=i.formatter;e.forEach(function(e){var n=e.points,i=e.center,l=e.value,s=e.key,u=l[0],c=l[1],f=i[0],h=i[1],d=new Bt({style:Bf({points:n,fill:"#eee"},r),id:"polygon-".concat(s)}),p=new Bi({style:Bf({x:f,y:h,text:(0,tp.isFunction)(o)?o(u,c):(c/u*100).toFixed(2)+"%"},a),id:"text-".concat(s)});t.appendChild(d),t.appendChild(p)})},e.prototype.update=function(){this.clear(),this.drawConversionTag()},e.prototype.destroy=function(){this.clear()},e.tag="ConversionTag",e}(Bu),Bd=(d=function(t,e){return(d=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}d(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),Bp=function(){return(Bp=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},By=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n},Bg={ConversionTag:Bh,BidirectionalBarAxisText:function(t){function e(n,r){return t.call(this,n,r,{type:e.tag})||this}return Bd(e,t),e.prototype.render=function(){this.drawText()},e.prototype.getBidirectionalBarAxisTextLayout=function(){var t="vertical"===this.attributes.layout,e=this.getElementsLayout(),n=t?(0,tp.uniqBy)(e,"x"):(0,tp.uniqBy)(e,"y"),r=["title"],i=[],a=this.chart.getContext().views,o=(0,tp.get)(a,[0,"layout"]),l=o.width,s=o.height;return n.forEach(function(e){var n=e.x,a=e.y,o=e.height,u=e.width,c=e.data,f=e.key,h=(0,tp.get)(c,r);t?i.push({x:n+u/2,y:s,text:h,key:f}):i.push({x:l,y:a+o/2,text:h,key:f})}),(0,tp.uniqBy)(i,"text").length!==i.length&&(i=Object.values((0,tp.groupBy)(i,"text")).map(function(e){var n,r=e.reduce(function(e,n){return e+(t?n.x:n.y)},0);return Bp(Bp({},e[0]),((n={})[t?"x":"y"]=r/e.length,n))})),i},e.prototype.transformLabelStyle=function(t){var e={},n=/^label[A-Z]/;return Object.keys(t).forEach(function(r){n.test(r)&&(e[r.replace("label","").replace(/^[A-Z]/,function(t){return t.toLowerCase()})]=t[r])}),e},e.prototype.drawText=function(){var t=this,e=this.getBidirectionalBarAxisTextLayout(),n=this.attributes,r=n.layout,i=n.labelFormatter,a=By(n,["layout","labelFormatter"]);e.forEach(function(e){var n=e.x,o=e.y,l=e.text,s=e.key,u=new Bi({style:Bp({x:n,y:o,text:(0,tp.isFunction)(i)?i(l):l,wordWrap:!0,wordWrapWidth:"horizontal"===r?64:120,maxLines:2,textOverflow:"ellipsis"},t.transformLabelStyle(a)),id:"text-".concat(s)});t.appendChild(u)})},e.prototype.destroy=function(){this.clear()},e.prototype.update=function(){this.destroy(),this.drawText()},e.tag="BidirectionalBarAxisText",e}(Bu)},Bv=function(){function t(t,e){this.container=new Map,this.chart=t,this.config=e,this.init()}return t.prototype.init=function(){var t=this;D6.forEach(function(e){var n,r=e.key,i=e.shape,a=t.config[r];if(a){var o=new Bg[i](t.chart,a);t.chart.getContext().canvas.appendChild(o),t.container.set(r,o)}else null==(n=t.container.get(r))||n.clear()})},t.prototype.update=function(){var t=this;this.container.size&&D6.forEach(function(e){var n=e.key,r=t.container.get(n);null==r||r.update()})},t.prototype.destroy=function(){this.container.forEach(function(t){t.destroy()}),this.container.clear()},t}(),Bm=(p=function(t,e){return(p=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}p(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),Bb=function(){return(Bb=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},Bx="data-chart-source-type",BO=function(t){function e(e,n){var r=t.call(this)||this;return r.eventListeners=[],r.bindedEvents=!1,r.container="string"==typeof e?document.getElementById(e):e,r.options=r.mergeOption(n),r.createG2(),r.bindEvents(),r}return Bm(e,t),e.prototype.getChartOptions=function(){return Bb(Bb({},(0,tp.pick)(this.options,DQ)),{container:this.container})},e.prototype.getSpecOptions=function(){return"base"===this.type||this.__skipDelCustomKeys__?Bb(Bb({},this.options),this.getChartOptions()):this.options},e.prototype.createG2=function(){if(!this.container)throw Error("The container is not initialized!");this.chart=new DX(this.getChartOptions()),this.container.setAttribute(Bx,"Ant Design Charts")},e.prototype.bindEvents=function(){var t=this;if(this.chart){var e=function(e){(null==e?void 0:e.type)&&t.emit(e.type,e)};this.chart.on("*",e),this.eventListeners.push(function(){var n;null==(n=t.chart)||n.off("*",e)})}},e.prototype.getBaseOptions=function(){return{type:"view",autoFit:!0}},e.prototype.getDefaultOptions=function(){},e.prototype.render=function(){var t=this;"base"!==this.type&&this.execAdaptor(),this.chart.options(this.getSpecOptions()),this.chart.render().then(function(){t.annotation?t.annotation.update():t.annotation=new Bv(t.chart,t.options),t.bindSizeSensor()})},e.prototype.update=function(t){this.options=this.mergeOption(t)},e.prototype.mergeOption=function(t){return Bl({},this.getBaseOptions(),this.getDefaultOptions(),t)},e.prototype.changeData=function(t){this.chart.changeData(t)},e.prototype.changeSize=function(t,e){this.chart.changeSize(t,e)},e.prototype.destroy=function(){this.eventListeners.forEach(function(t){return t()}),this.eventListeners=[],this.annotation&&"function"==typeof this.annotation.destroy&&this.annotation.destroy(),this.annotation=null,this.chart.destroy(),this.off(),this.bindedEvents=!1,this.container.removeAttribute(Bx)},e.prototype.execAdaptor=function(){this.getSchemaAdaptor()({chart:this.chart,options:this.options})},e.prototype.triggerResize=function(){this.chart.forceFit()},e.prototype.bindSizeSensor=function(){var t=this;if(!this.bindedEvents){var e=this.options.autoFit;if(void 0===e||e){var n=function(){t.annotation&&t.annotation.update()};this.chart.on(cQ,n),this.eventListeners.push(function(){var e;null==(e=t.chart)||e.off(cQ,n)}),this.bindedEvents=!0}}},e}(tm),Bw=(y=function(t,e){return(y=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}y(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),Bk=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="base",e}return Bw(e,t),e.getDefaultOptions=function(){return{type:"view",children:[{type:"line"}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return function(t){return t}},e}(BO),B_=function(t){var e=t.options,n=e.children;return(void 0===n?[]:n).forEach(function(t){Object.keys(t).forEach(function(e){(0,tp.isArray)(t[e])&&"data"!==e&&(t[e]=t[e].filter(function(t){return!t[D0]}))})}),e},BM=function(t,e,n){if(n||2==arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},BE=function(t){var e=t.children,n=Object.keys(D2).concat(D3.map(function(t){return t.key}));return n.forEach(function(e){delete t[e]}),(void 0===e?[]:e).forEach(function(t){Object.keys(t).forEach(function(e){n.includes(e)&&delete t[e]})}),Object.keys(t).forEach(function(e){BM(BM([],DJ,!0),D6.map(function(t){return t.key}),!0).includes(e)||delete t[e]}),t},BA=function(){return(BA=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},BS=function(t){var e=B_(t),n=e.children,r=void 0===n?[]:n,i=(0,tp.omit)(e,[].concat(DJ,D3.map(function(t){return t.key}))),a=function(t){var e;return null==(e=D4.find(function(e){return e.key===t}))?void 0:e.callback},o=function(t,e,n){var r=a(e);r?r(t,e,n):t[e]=Bl({},t[e],n)},l=function(t){Object.keys(t).forEach(function(e){if(t[e]){var n=D3.find(function(t){return t.key===e});if(n){var i=n.type,a=n.extendedProperties,o=n.defaultShapeConfig;if(i){var l=t[e].tooltip;r.push(s(Bl({},(0,tp.pick)(t,a),void 0===o?{}:o,{type:i},t[e],{tooltip:!!l&&l})))}else if((0,tp.isArray)(t[e])){var u=t[e].some(function(t){return"text"===t.type});t[e].forEach(function(t){r.push(s(BA(BA(BA({},u?{data:[]}:{}),{tooltip:!1}),t)))})}}}})},s=function(t){return l(t),Object.keys(D2).forEach(function(e){var n=D2[e];if(!(0,tp.isUndefined)(t[e]))if((0,tp.isObject)(n)){var r=n.value,i=n.target,a=r(t[e]);o(t,i,a)}else(0,tp.set)(t,n,t[e])}),t};return r.forEach(function(t){var e=Bl({},i,t);s(Bl(t,e))}),l(e),BE(e),t},Bj=function(){return(Bj=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function BP(t){var e=t.options,n=e.stack,r=e.tooltip,i=e.xField;if(!n)return t;var a=D3.map(function(t){return t.type}).filter(function(t){return!!t}),o=!1;return a.forEach(function(t){e[t]&&(o=!0,(0,tp.set)(e,[t,"stack"],Bj({y1:"y"},"object"==typeof n?n:{})))}),!o||(0,tp.isBoolean)(r)||r||(0,tp.set)(e,"tooltip",{title:i,items:[{channel:"y"}]}),t}function BT(t){return(0,tp.flow)(BP)(t)}function BC(t){return(0,tp.flow)(BT,BS)(t)}var BN=(g=function(t,e){return(g=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}g(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),BL=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="area",e}return BN(e,t),e.getDefaultOptions=function(){return{type:"view",children:[{type:"area"}],scale:{y:{nice:!0}},axis:{y:{title:!1},x:{title:!1}},interaction:{tooltip:{shared:!0}}}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return BC},e}(BO),BI=function(){return(BI=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function BR(t){return(0,tp.flow)(function(t){var e=t.options;(0,tp.get)(e,"children.length")>1&&(0,tp.set)(e,"children",[{type:"interval"}]);var n=e.scale,r=e.markBackground,i=e.data,a=e.children,o=e.yField,l=(0,tp.get)(n,"y.domain",[]);if(r&&l.length&&(0,tp.isArray)(i)){var s="domainMax",u=i.map(function(t){var e;return BI(BI({originData:BI({},t)},(0,tp.omit)(t,o)),((e={})[s]=l[l.length-1],e))});a.unshift(BI({type:"interval",data:u,yField:s,tooltip:!1,style:{fill:"#eee"},label:!1},r))}return t},BT,BS)(t)}var BD=(v=function(t,e){return(v=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}v(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});s7("shape.interval.bar25D",function(t,e){return function(n){var r=t.fill,i=void 0===r?"#2888FF":r,a=t.stroke,o=t.fillOpacity,l=void 0===o?1:o,s=t.strokeOpacity,u=void 0===s?.2:s,c=t.pitch,f=void 0===c?8:c,h=n[0],d=n[1],p=n[2],y=n[3],g=(d[1]-h[1])/2,v=e.document,b=v.createElement("g",{}),x=v.createElement("polygon",{style:{points:[h,[h[0]-f,h[1]+g],[p[0]-f,h[1]+g],y],fill:i,fillOpacity:l,stroke:a,strokeOpacity:u,inset:30}}),O=v.createElement("polygon",{style:{points:[[h[0]-f,h[1]+g],d,p,[p[0]-f,h[1]+g]],fill:i,fillOpacity:l,stroke:a,strokeOpacity:u}}),w=v.createElement("polygon",{style:{points:[h,[h[0]-f,h[1]+g],d,[h[0]+f,h[1]+g]],fill:i,fillOpacity:l-.2}});return b.appendChild(x),b.appendChild(O),b.appendChild(w),b}});var BB=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="Bar",e}return BD(e,t),e.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}}}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return BR},e}(BO),BF=(b=function(t,e){return(b=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}b(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});s7("shape.interval.column25D",function(t,e){return function(n){var r=t.fill,i=void 0===r?"#2888FF":r,a=t.stroke,o=t.fillOpacity,l=void 0===o?1:o,s=t.strokeOpacity,u=void 0===s?.2:s,c=t.pitch,f=void 0===c?8:c,h=(n[1][0]-n[0][0])/2+n[0][0],d=e.document,p=d.createElement("g",{}),y=d.createElement("polygon",{style:{points:[[n[0][0],n[0][1]],[h,n[1][1]+f],[h,n[3][1]+f],[n[3][0],n[3][1]]],fill:i,fillOpacity:l,stroke:a,strokeOpacity:u,inset:30}}),g=d.createElement("polygon",{style:{points:[[h,n[1][1]+f],[n[1][0],n[1][1]],[n[2][0],n[2][1]],[h,n[2][1]+f]],fill:i,fillOpacity:l,stroke:a,strokeOpacity:u}}),v=d.createElement("polygon",{style:{points:[[n[0][0],n[0][1]],[h,n[1][1]-f],[n[1][0],n[1][1]],[h,n[1][1]+f]],fill:i,fillOpacity:l-.2}});return p.appendChild(g),p.appendChild(y),p.appendChild(v),p}});var Bz=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="column",e}return BF(e,t),e.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"}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return BR},e}(BO);function B$(t){return(0,tp.flow)(function(t){var e=t.options,n=e.children;return e.legend&&(void 0===n?[]:n).forEach(function(t){if(!(0,tp.get)(t,"colorField")){var e=(0,tp.get)(t,"yField");(0,tp.set)(t,"colorField",function(){return e})}}),t},function(t){var e=t.options,n=e.annotations,r=void 0===n?[]:n,i=e.children,a=e.scale,o=!1;return(0,tp.get)(a,"y.key")||(void 0===i?[]:i).forEach(function(t,e){if(!(0,tp.get)(t,"scale.y.key")){var n="child".concat(e,"Scale");(0,tp.set)(t,"scale.y.key",n);var i=t.annotations,a=void 0===i?[]:i;a.length>0&&((0,tp.set)(t,"scale.y.independent",!1),a.forEach(function(t){(0,tp.set)(t,"scale.y.key",n)})),!o&&r.length>0&&void 0===(0,tp.get)(t,"scale.y.independent")&&(o=!0,(0,tp.set)(t,"scale.y.independent",!1),r.forEach(function(t){(0,tp.set)(t,"scale.y.key",n)}))}}),t},BT,BS)(t)}var BW=(x=function(t,e){return(x=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}x(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),BG=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="DualAxes",e}return BW(e,t),e.getDefaultOptions=function(){return{type:"view",axis:{y:{title:!1,tick:!1},x:{title:!1}},scale:{y:{independent:!0,nice:!0}}}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return B$},e}(BO);function Bq(t){return(0,tp.flow)(function(t){var e=t.options,n=e.xField;return e.colorField||(0,tp.set)(e,"colorField",n),t},function(t){var e=t.options,n=e.compareField,r=e.transform,i=e.isTransposed,a=e.coordinate;return r||(n?(0,tp.set)(e,"transform",[]):(0,tp.set)(e,"transform",[{type:"symmetryY"}])),!a&&(void 0===i||i)&&(0,tp.set)(e,"coordinate",{transform:[{type:"transpose"}]}),t},function(t){var e=t.options,n=e.compareField,r=e.seriesField,i=e.data,a=e.children,o=e.yField,l=e.isTransposed;if(n||r){var s=Object.values((0,tp.groupBy)(i,function(t){return t[n||r]}));a[0].data=s[0],a.push({type:"interval",data:s[1],yField:function(t){return-t[o]}}),delete e.compareField,delete e.data}return r&&((0,tp.set)(e,"type","spaceFlex"),(0,tp.set)(e,"ratio",[1,1]),(0,tp.set)(e,"direction",void 0===l||l?"row":"col"),delete e.seriesField),t},function(t){var e=t.options,n=e.tooltip,r=e.xField,i=e.yField;return n||(0,tp.set)(e,"tooltip",{title:!1,items:[function(t){return{name:t[r],value:t[i]}}]}),t},BT,BS)(t)}var BH=(O=function(t,e){return(O=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}O(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),BY=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="column",e}return BH(e,t),e.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"}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return Bq},e}(BO);function BV(t){return(0,tp.flow)(BT,BS)(t)}var BU=(w=function(t,e){return(w=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}w(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),BX=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="line",e}return BU(e,t),e.getDefaultOptions=function(){return{type:"view",scale:{y:{nice:!0}},interaction:{tooltip:{shared:!0}},axis:{y:{title:!1},x:{title:!1}},children:[{type:"line"}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return BV},e}(BO);function BK(t){switch(typeof t){case"function":return t;case"string":return function(e){return(0,tp.get)(e,[t])};default:return function(){return t}}}var BZ=function(){return(BZ=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function BQ(t){return(0,tp.flow)(function(t){var e=t.options,n=e.angleField,r=e.data,i=e.label,a=e.tooltip,o=e.colorField,l=BK(o);if((0,tp.isArray)(r)&&r.length>0&&0===r.reduce(function(t,e){return t+e[n]},0)){var s=r.map(function(t){var e;return BZ(BZ({},t),((e={})[n]=1,e))});if((0,tp.set)(e,"data",s),i){var u=o===(0,tp.get)(i,"text");(0,tp.set)(e,"label",BZ(BZ({},i),u?{}:{formatter:function(){return 0}}))}!1!==a&&((0,tp.isFunction)(a)?(0,tp.set)(e,"tooltip",function(t,e,r){var i;return a(BZ(BZ({},t),((i={})[n]=0,i)),e,r.map(function(t){var e;return BZ(BZ({},t),((e={})[n]=0,e))}))}):(0,tp.set)(e,"tooltip",BZ(BZ({},a),{items:[function(t,e,n){return{name:l(t,e,n),value:0}}]})))}return t},BS)(t)}var BJ=(k=function(t,e){return(k=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}k(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),B0=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="pie",e}return BJ(e,t),e.getDefaultOptions=function(){return{type:"view",children:[{type:"interval"}],coordinate:{type:"theta"},transform:[{type:"stackY",reverse:!0}],animate:{enter:{type:"waveIn"}}}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return BQ},e}(BO);function B1(t){return(0,tp.flow)(BT,BS)(t)}var B2=(_=function(t,e){return(_=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}_(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),B5=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="scatter",e}return B2(e,t),e.getDefaultOptions=function(){return{axis:{y:{title:!1},x:{title:!1}},legend:{size:!1},children:[{type:"point"}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return B1},e}(BO);function B3(t){return(0,tp.flow)(function(t){return(0,tp.set)(t,"options.coordinate",{type:(0,tp.get)(t,"options.coordinateType","polar")}),t},BS)(t)}var B4=(M=function(t,e){return(M=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}M(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),B6=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="radar",e}return B4(e,t),e.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"}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return B3},e}(BO);function B8(t){return(0,tp.flow)(function(t){var e=t.options,n=e.yField,r=e.children,i=e.style,a=e.lineStyle,o=n[0],l=n[1],s=n[2],u=n[3];return(0,tp.set)(r,[0,"yField"],[s,u]),(0,tp.set)(r,[0,"style"],void 0===a?{}:a),(0,tp.set)(r,[1,"yField"],[o,l]),(0,tp.set)(r,[1,"style"],void 0===i?{}:i),delete e.yField,delete e.lineStyle,delete e.style,t},BS)(t)}var B9=(E=function(t,e){return(E=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}E(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),B7=["#26a69a","#999999","#ef5350"],Ft=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="stock",e}return B9(e,t),e.getDefaultOptions=function(){return{type:"view",scale:{color:{domain:[-1,0,1],range:B7},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}}}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return B8},e}(BO);function Fe(t){return(0,tp.flow)(BT,BS)(t)}var Fn=(A=function(t,e){return(A=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}A(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),Fr=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="TinyLine",e}return Fn(e,t),e.getDefaultOptions=function(){return{type:"view",children:[{type:"line",axis:!1}],padding:0,margin:0,tooltip:!1}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return Fe},e}(BO);function Fi(t){return(0,tp.flow)(BT,BS)(t)}var Fa=(S=function(t,e){return(S=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}S(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),Fo=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="TinyArea",e}return Fa(e,t),e.getDefaultOptions=function(){return{type:"view",animate:{enter:{type:"growInX",duration:500}},children:[{type:"area",axis:!1}],padding:0,margin:0,tooltip:!1}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return Fi},e}(BO);function Fl(t){return(0,tp.flow)(BT,BS)(t)}var Fs=(j=function(t,e){return(j=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}j(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),Fu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="TinyColumn",e}return Fs(e,t),e.getDefaultOptions=function(){return{type:"view",children:[{type:"interval",axis:!1}],padding:0,margin:0,tooltip:!1}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return Fl},e}(BO),Fc=function(){return(Fc=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function Ff(t){return(0,tp.flow)(function(t){var e=t.options,n=e.percent,r=e.color,i=void 0===r?[]:r;if(!n)return t;var a={scale:{color:{range:i.length?i:[]}},data:[1,n]};return Object.assign(e,Fc({},a)),t},BT,BS)(t)}var Fh=(P=function(t,e){return(P=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}P(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),Fd=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="TinyProgress",e}return Fh(e,t),e.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(t){return t},color:function(t,e){return e}}}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return Ff},e}(BO),Fp=function(){return(Fp=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function Fy(t){return(0,tp.flow)(function(t){var e=t.options.radius;return(0,tp.set)(t,"options.coordinate.innerRadius",void 0===e?.8:e),t},function(t){var e=t.options,n=e.percent,r=e.color,i=void 0===r?[]:r;if(!n)return t;var a={scale:{color:{range:i.length?i:[]}},data:[1,n]};return Object.assign(e,Fp({},a)),t},BT,BS)(t)}var Fg=(T=function(t,e){return(T=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}T(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),Fv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="TinyRing",e}return Fg(e,t),e.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(t){return t},color:function(t,e){return e}}}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return Fy},e}(BO);function Fm(t){return(0,tp.flow)(BS)(t)}var Fb=(C=function(t,e){return(C=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}C(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),Fx=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="rose",e}return Fb(e,t),e.getDefaultOptions=function(){return{type:"view",children:[{type:"interval"}],coordinate:{type:"polar"},animate:{enter:{type:"waveIn"}}}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return Fm},e}(BO),FO="__start__",Fw="__end__",Fk="__waterfall_value__",F_=function(){return(F_=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},FM=function(t,e,n){if(n||2==arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function FE(t){return(0,tp.flow)(function(t){var e=t.options,n=e.data,r=void 0===n?[]:n,i=e.yField;return r.length&&(r.reduce(function(t,e,n){var a,o=BK(i),l=o(e,n,r);if(0===n||e.isTotal)e[FO]=0,e[Fw]=l,e[Fk]=l;else{var s=null!=(a=t[Fw])?a:o(t,n,r);e[FO]=s,e[Fw]=s+l,e[Fk]=t[Fw]}return e},[]),Object.assign(e,{yField:[FO,Fw]})),t},function(t){var e=t.options,n=e.data,r=e.xField,i=e.children,a=e.linkStyle,o=FM([],void 0===n?[]:n,!0);return o.reduce(function(t,e,n){return n>0&&(e.x1=t[r],e.x2=e[r],e.y1=t[Fw]),e},[]),o.shift(),i.push({type:"link",xField:["x1","x2"],yField:"y1",zIndex:-1,data:o,style:F_({stroke:"#697474"},a),label:!1,tooltip:!1}),t},BT,function(t){var e=t.options,n=e.data,r=void 0===n?[]:n,i=e.connector;return i&&(0,tp.set)(e,"connector",F_({xField:i.reverse?["x2","x1"]:["x1","x2"],yField:i.reverse?["y2","y1"]:["y1","y2"],data:[{x1:r[0].x,y1:r[0][Fw],x2:r[r.length-1].x,y2:r[r.length-1][Fw]}]},(0,tp.isObject)(i)?i:{})),t},BS)(t)}var FA=(N=function(t,e){return(N=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}N(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),FS=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="waterfall",e}return FA(e,t),e.getDefaultOptions=function(){return{type:"view",legend:null,tooltip:{field:Fk,valueFormatter:"~s",name:"value"},axis:{y:{title:null,labelFormatter:"~s"},x:{title:null}},children:[{type:"interval",interaction:{elementHighlight:{background:!0}}}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return FE},e}(BO);function Fj(t){return(0,tp.flow)(function(t){var e=t.options,n=e.data,r=e.binNumber,i=e.binWidth,a=e.children,o=e.channel,l=void 0===o?"count":o,s=(0,tp.get)(a,"[0].transform[0]",{});return(0,tp.isNumber)(i)?(0,tp.assign)(s,{thresholds:(0,tp.ceil)((0,tp.divide)(n.length,i)),y:l}):(0,tp.isNumber)(r)&&(0,tp.assign)(s,{thresholds:r,y:l}),t},BT,BS)(t)}var FP=(L=function(t,e){return(L=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}L(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),FT=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="Histogram",e}return FP(e,t),e.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}}}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return Fj},e}(BO);function FC(t){return(0,tp.flow)(function(t){var e=t.options,n=e.tooltip,r=void 0===n?{}:n,i=e.colorField,a=e.sizeField;return r&&!r.field&&(r.field=i||a),t},function(t){var e=t.options,n=e.mark,r=e.children;return n&&(r[0].type=n),t},BT,BS)(t)}var FN=(I=function(t,e){return(I=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}I(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),FL=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="heatmap",e}return FN(e,t),e.getDefaultOptions=function(){return{type:"view",legend:null,tooltip:{valueFormatter:"~s"},axis:{y:{title:null,grid:!0},x:{title:null,grid:!0}},children:[{type:"point"}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return FC},e}(BO);function FI(t){return(0,tp.flow)(function(t){var e=t.options.boxType;return t.options.children[0].type=void 0===e?"box":e,t},BT,BS)(t)}var FR=(R=function(t,e){return(R=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}R(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),FD=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="box",e}return FR(e,t),e.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"}]}}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return FI},e}(BO),FB=function(t){var e=t.options,n=e.data;return(0,tp.get)(n,"value")||"fetch"!==(0,tp.get)(n,"type")&&(0,tp.isPlainObject)(n)&&(0,tp.set)(e,"data.value",n),t},FF=function(t){var e=t.options,n=e.data,r=[{type:"custom",callback:function(t){return{links:t}}}];if((0,tp.isArray)(n))n.length>0?(0,tp.set)(e,"data",{value:n,transform:r}):delete e.children;else if("fetch"===(0,tp.get)(n,"type")&&(0,tp.get)(n,"value")){var i=(0,tp.get)(n,"transform");(0,tp.isArray)(i)||(0,tp.set)(n,"transform",r)}return t};function Fz(t){return(0,tp.flow)(FB,FF,BT,BS)(t)}var F$=(D=function(t,e){return(D=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}D(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),FW=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="sankey",e}return F$(e,t),e.getDefaultOptions=function(){return{type:"view",children:[{type:"sankey"}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return Fz},e}(BO);function FG(t){e=t.options.layout,t.options.coordinate.transform="horizontal"!==(void 0===e?"horizontal":e)?void 0:[{type:"transpose"}];var e,n=t.options.layout,r=void 0===n?"horizontal":n;return t.options.children.forEach(function(t){var e;(null==(e=null==t?void 0:t.coordinate)?void 0:e.transform)&&(t.coordinate.transform="horizontal"!==r?void 0:[{type:"transpose"}])}),t}var Fq=function(){return(Fq=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},FH=["#f0efff","#5B8FF9","#3D76DD"];function FY(t,e,n,r){void 0===r&&(r=!0);var i=0,a=!1,o=(0,tp.map)(t,function(t){var o,l,s=(0,tp.get)(t,[e]);if((0,tp.isNil)(s))return[];if((0,tp.isString)(s)){var u=Number(s);return isNaN(u)?[]:((o={})[n]=t[n],o[e]=u,o)}return(0,tp.isArray)(s)?(a=!0,i=Math.max(i,s.length),(0,tp.map)(r?s.sort(function(t,e){return e-t}):s,function(r,i){var a;return(a={})[n]=t[n],a[e]=r,a.index=i,a})):(i=Math.max(1,i),(l={})[n]=t[n],l[e]=s,l)}).flat();return a?[o.map(function(t){return Fq({index:0},t)}),i]:[o,i]}function FV(t,e){return Array(t).fill("").map(function(t,n){return(0,tp.isArray)(e)?e[n%e.length]:e})}function FU(t){return(0,tp.flow)(function(t){var e=t.options,n=e.color,r=e.rangeField,i=void 0===r?"ranges":r,a=e.measureField,o=void 0===a?"measures":a,l=e.targetField,s=void 0===l?"targets":l,u=e.xField,c=void 0===u?"title":u,f=e.mapField,h=e.data,d=FY(h,i,c),p=d[0],y=d[1],g=FY(h,o,c,!1),v=g[0],b=g[1],x=FY(h,s,c,!1),O=x[0],w=x[1],k=(0,tp.get)(n,[i],FH[0]),_=(0,tp.get)(n,[o],FH[1]),M=(0,tp.get)(n,[s],FH[2]),E=[FV(y,k),FV(b,_),FV(w,M)].flat();return e.children=(0,tp.map)(e.children,function(t,e){var n=[p,v,O][e],r=[i,o,s][e];return Fq(Fq({},t),{data:n,encode:Fq(Fq({},t.encode||{}),{x:c,y:r,color:function(t){var e=t.index,n=(0,tp.isNumber)(e)?"".concat(r,"_").concat(e):r;return f?(0,tp.get)(f,[r,e],n):n}})})}),(0,tp.set)(e,"scale.color.range",E),e.legend.color.itemMarker=function(t){return f&&(0,tp.includes)(null==f?void 0:f[s],t)||(null==t?void 0:t.replace(/\_\d$/,""))===s?"line":"square"},t},function(t){var e=t.options.transpose;return void 0===e||e||(0,tp.set)(t,"options.children[2].shapeField","hyphen"),t},function(t){var e=t.options,n=e.range,r=e.measure,i=e.target,a=e.children;return e.children=[void 0===n?{}:n,void 0===r?{}:r,void 0===i?{}:i].map(function(t,e){return Bl(a[e],t)}),t},FG,BS)(t)}var FX=(B=function(t,e){return(B=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}B(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),FK=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="bullet",e}return FX(e,t),e.getDefaultOptions=function(){return{type:"view",scale:{color:{range:FH}},legend:{color:{itemMarker:function(t){return"targets"===t?"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"}]}}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return FU},e}(BO);function FZ(t){return(0,tp.flow)(function(t){var e=t.options.data;return t.options.data={value:e},t},BT,BS)(t)}var FQ=(F=function(t,e){return(F=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}F(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),FJ=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="Gauge",e}return FQ(e,t),e.getDefaultOptions=function(){return{type:"view",legend:!1,children:[{type:"gauge"}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return FZ},e}(BO);function F0(t){return(0,tp.flow)(function(t){var e=t.options.percent;return(0,tp.isNumber)(e)&&((0,tp.set)(t,"options.data",e),delete t.options.percent),t},BT,BS)(t)}var F1=(z=function(t,e){return(z=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}z(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),F2=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="Liquid",e}return F1(e,t),e.getDefaultOptions=function(){return{type:"view",children:[{type:"liquid"}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return F0},e}(BO);function F5(t){return(0,tp.flow)(BT,BS)(t)}var F3=($=function(t,e){return($=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}$(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),F4=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="WordCloud",e}return F3(e,t),e.getDefaultOptions=function(){return{type:"view",legend:!1,children:[{type:"wordCloud"}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return F5},e}(BO);function F6(t){return(0,tp.flow)(FB,BT,BS)(t)}var F8=(W=function(t,e){return(W=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}W(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),F9=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="treemap",e}return F8(e,t),e.getDefaultOptions=function(){return{type:"view",children:[{type:"treemap"}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return F6},e}(BO),F7=function(){return(F7=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},zt=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function ze(t){return(0,tp.flow)(function(t){var e=t.options,n=e.startAngle,r=e.maxAngle,i=e.coordinate,a=(0,tp.isNumber)(n)?n/(2*Math.PI)*360:-90,o=(0,tp.isNumber)(r)?(Number(r)+a)/180*Math.PI:Math.PI;return(0,tp.set)(t,["options","coordinate"],F7(F7({},i),{endAngle:o,startAngle:null!=n?n:-Math.PI/2})),t},function(t){var e=t.options,n=e.tooltip,r=e.xField,i=e.yField,a=BK(r),o=BK(i);return n||(0,tp.set)(e,"tooltip",{title:!1,items:[function(t,e,n){return{name:a(t,e,n),value:o(t,e,n)}}]}),t},function(t){var e=t.options,n=e.markBackground,r=e.children,i=e.scale,a=e.coordinate,o=e.xField,l=(0,tp.get)(i,"y.domain",[]);if(n){var s=n.style,u=zt(n,["style"]);r.unshift(F7({type:"interval",xField:o,yField:l[l.length-1],style:F7({fillOpacity:.4,fill:"#e0e4ee"},s),coordinate:F7(F7({},a),{startAngle:-Math.PI/2,endAngle:1.5*Math.PI}),animate:!1},u))}return t},BT,BS)(t)}var zn=(G=function(t,e){return(G=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}G(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),zr=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="radial",e}return zn(e,t),e.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}}}}}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return ze},e}(BO);function zi(t){return(0,tp.flow)(FB,BS)(t)}var za=(q=function(t,e){return(q=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}q(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),zo=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="CirclePacking",e}return za(e,t),e.getDefaultOptions=function(){return{legend:!1,type:"view",children:[{type:"pack",encode:{color:"depth"}}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return zi},e}(BO),zl=function(){return(zl=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function zs(t){return(0,tp.flow)(function(t){var e=t.options,n=e.xField,r=e.yField,i=e.colorField,a=e.seriesField,o=e.children,l=null==o?void 0:o.map(function(t){var e,o,l,s,u,c;return zl(zl({},t),{xField:n,yField:r,seriesField:(e=a,o=i,e||o),colorField:(l=i,s=a,l||s),data:"density"===t.type?{transform:[{type:"kde",field:r,groupBy:[n,(u=a,c=i,u||c)]}]}:t.data})}).filter(function(t){return e.box||"density"===t.type});return(0,tp.set)(e,"children",l),delete e.box,t},BT,BS)(t)}var zu=(H=function(t,e){return(H=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}H(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),zc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="violin",e}return zu(e,t),e.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"}}}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return zs},e}(BO),zf=function(){return(zf=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},zh=function(t,e,n){if(n||2==arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function zd(t){return(0,tp.flow)(function(t){var e=t.options,n=e.yField;return e.children.forEach(function(t,e){(0,tp.set)(t,"yField",n[e])}),t},function(t){var e=t.options,n=e.yField,r=e.children,i=e.data;if((0,tp.isPlainObject)(i))return t;var a=(0,tp.isArray)((0,tp.get)(i,[0]))?i:[i,i];return r.forEach(function(t,e){(0,tp.set)(t,"data",zh([],a[e].map(function(t){return zf({groupKey:n[e]},t)}),!0))}),t},function(t){var e=t.options,n=e.yField,r=n[0],i=n[1];return e.tooltip||(0,tp.set)(e,"tooltip",{items:[{field:r,value:r},{field:i,value:i}]}),t},function(t){var e=t.options,n=e.children,r=e.layout,i=e.coordinate.transform,a=e.paddingBottom,o=e.paddingLeft,l=e.axis;(0,tp.set)(e,"axisText",zf(zf({},(null==l?void 0:l.x)||{}),{layout:r}));var s=n[0],u=n[1];if("vertical"===r)(0,tp.set)(e,"direction","col"),(0,tp.set)(e,"paddingLeft",void 0===o?48:o),(0,tp.set)(e,"coordinate.transform",i.filter(function(t){return"transpose"!==t.type})),(0,tp.set)(s,"paddingBottom",16),(0,tp.set)(u,"paddingTop",16),(0,tp.set)(u,"axis.x.position","top"),(0,tp.set)(u,"scale.y.range",[0,1]);else{(0,tp.set)(e,"paddingBottom",void 0===a?48:a),(0,tp.set)(s,"scale.y.range",[0,1]);var c=s.paddingRight,f=u.paddingLeft;(0,tp.set)(s,"paddingRight",void 0===c?32:c),(0,tp.set)(s,"axis.x.position","right"),(0,tp.set)(u,"paddingLeft",void 0===f?32:f)}return t},BT,BS)(t)}var zp=(Y=function(t,e){return(Y=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}Y(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),zy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="BidirectionalBar",e}return zp(e,t),e.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"}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return zd},e}(BO);function zg(t){return(0,tp.flow)(function(t){var e=t.options,n=e.data,r=e.setsField,i=e.sizeField;return(0,tp.isArray)(n)&&((0,tp.set)(e,"data",{type:"inline",value:n,transform:[{type:"venn",sets:r,size:i,as:[K.color,K.d]}]}),(0,tp.set)(e,"colorField",K.color),(0,tp.set)(e,["children","0","encode","d"],K.d)),t},BS)(t)}(V=K||(K={})).color="key",V.d="path";var zv=(U=function(t,e){return(U=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}U(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),zm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="venn",e}return zv(e,t),e.getDefaultOptions=function(){return{type:"view",children:[{type:"path"}],legend:{color:{itemMarker:"circle"}},encode:{color:K.color,d:K.d}}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return zg},e}(BO);function zb(t){return(0,tp.flow)(FB,BS)(t)}var zx=(X=function(t,e){return(X=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}X(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),zO={Base:Bk,Line:BX,Column:Bz,Pie:B0,Area:BL,Bar:BB,DualAxes:BG,Funnel:BY,Scatter:B5,Radar:B6,Rose:Fx,Stock:Ft,TinyLine:Fr,TinyArea:Fo,TinyColumn:Fu,TinyProgress:Fd,TinyRing:Fv,Waterfall:FS,Histogram:FT,Heatmap:FL,Box:FD,Sankey:FW,Bullet:FK,Gauge:FJ,Liquid:F2,WordCloud:F4,Treemap:F9,RadialBar:zr,CirclePacking:zo,Violin:zc,BidirectionalBar:zy,Venn:zm,Mix:BG,Sunburst:function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="Sunburst",e}return zx(e,t),e.getDefaultOptions=function(){return{type:"view",children:[{type:"sunburst"}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return zb},e}(BO)},zw=function(){return(zw=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},zk=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n},z_=(0,tn.forwardRef)(function(t,e){var n,r,i,a,o,l,s,u,c,f,h=t.chartType,d=zk(t,["chartType"]),p=d.containerStyle,y=d.containerAttributes,g=d.className,v=d.loading,b=d.loadingTemplate,x=d.errorTemplate,O=d.onReady,w=zk(d,["containerStyle","containerAttributes","className","loading","loadingTemplate","errorTemplate","onReady"]),k=(n=zO[void 0===h?"Base":h],r=zw(zw({},w),{onReady:function(t){e&&("function"==typeof e?e(t):e.current=t),null==O||O(t)}}),i=(0,tn.useRef)(null),a=(0,tn.useRef)(null),o=(0,tn.useRef)(null),l=r.onReady,s=r.onEvent,u=function(t,e){void 0===t&&(t="image/png");var n,r=null==(n=o.current)?void 0:n.getElementsByTagName("canvas")[0];return null==r?void 0:r.toDataURL(t,e)},c=function(t,e,n){void 0===t&&(t="download"),void 0===e&&(e="image/png");var r=t;-1===t.indexOf(".")&&(r="".concat(t,".").concat(e.split("/")[1]));var i=u(e,n),a=document.createElement("a");return a.href=i,a.download=r,document.body.appendChild(a),a.click(),document.body.removeChild(a),a=null,r},f=function(t,e){void 0===e&&(e=!1);var n=Object.keys(t),r=e;n.forEach(function(n){var i=t[n];"tooltip"===n&&(r=!0),(0,tp.isFunction)(i)&&tg("".concat(i))?t[n]=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return ts(i.apply(void 0,t),r)}:(0,tp.isArray)(i)?i.forEach(function(t){f(t,r)}):(0,tp.isObject)(i)?f(i,r):r=e})},(0,tn.useEffect)(function(){i.current&&!(0,tp.isEqual)(a.current,r)&&(a.current=(0,tp.cloneDeep)(r),f(r),i.current.update(r),i.current.render())},[r]),(0,tn.useEffect)(function(){if(!o.current)return function(){return null};a.current||(a.current=(0,tp.cloneDeep)(r)),f(r);var t=new n(o.current,tv({},r));t.toDataURL=u,t.downloadImage=c,t.render(),i.current=t,l&&l(t);var e=function(e){s&&s(t,e)};return t.on("*",e),function(){i.current&&(i.current.destroy(),i.current.off("*",e),i.current=void 0)}},[]),{chart:i,container:o}),_=(k.chart,k.container);return tr().createElement(td,{errorTemplate:x},v&&tr().createElement(tf,{loadingTemplate:b,theme:d.theme,loading:v}),tr().createElement("div",zw({className:g,style:void 0===p?{height:"inherit",flex:1}:p,ref:_},void 0===y?{}:y)))}),zM=(0,tn.createContext)({}),zE=function(){return(zE=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function zA(t){var e=t.yField,n=t.data,r=(0,tp.isArray)(n)&&n.length>0&&(0,tp.isString)(e)&&!(0,tp.get)(t,"scale.y.domainMax"),i=Object.isFrozen(t)?zE({},t):t;return r&&0===n.reduce(function(t,n){return t+n[e]},0)?(0,tp.set)(i,"scale.y.domainMax",1):r&&0!==n.reduce(function(t,n){return t+n[e]},0)&&(0,tp.set)(i,"scale.y.domainMax",void 0),i}var zS=function(){return(zS=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function zj(t){return t.charAt(0).toLowerCase(),t.slice(1),(0,tn.forwardRef)(function(e,n){var r,i,a=(0,tn.useContext)(zM),o=(0,tn.useMemo)(function(){return t.charAt(0).toLowerCase()+t.slice(1)},[t]),l=(0,tp.flow)([zA])(e),s=zS(zS({},null!=(r=null==a?void 0:a.common)?r:{}),null!=(i=null==a?void 0:a[o])?i:{});return tr().createElement(z_,zS({},s,l,{chartType:t,ref:n}))})}},7120(t,e){!function(t){"use strict";function e(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&r>=t.length?void 0:t)&&t[r++],done:!t}}};throw TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function n(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||0<e--)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o}function r(t,e,n){if(n||2==arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||((r=r||Array.prototype.slice.call(e,0,i))[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}function i(t){return l(t,"Function")}var a,o={}.toString,l=function(t,e){return o.call(t)==="[object "+e+"]"},s=function(t){return Array.isArray?Array.isArray(t):l(t,"Array")},u=function(t){if("object"!=typeof t||null===t||!l(t,"Object"))return!1;if(null===Object.getPrototypeOf(t))return!0;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e},c=Object.values?function(t){return Object.values(t)}:function(t){var e,n=[],r=function(e,r){i(t)&&"prototype"===r||n.push(e)};if(t){if(s(t))for(var a=0,o=t.length;a<o&&!1!==r(t[a],a);a++);else if(e=typeof t,null!==t&&"object"==e||"function"==e){for(var l in t)if(t.hasOwnProperty(l)&&!1===r(t[l],l))break}}return n};function f(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)!function t(e,n,r,i){for(var a in r=r||0,i=i||5,n){var o;n.hasOwnProperty(a)&&(null!==(o=n[a])&&u(o)?(u(e[a])||(e[a]={}),r<i?t(e[a],o,r+1,i):e[a]=n[a]):s(o)?(e[a]=[],e[a]=e[a].concat(o)):void 0!==o&&(e[a]=o))}}(t,e[r]);return t}function h(t){return t}!function(t,e){var n;if(i(t))return(n=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var a,o=e?e.apply(this,r):r[0],l=n.cache;return l.has(o)?l.get(o):(a=t.apply(this,r),l.set(o,a),a)}).cache=new Map;throw TypeError("Expected a function")}(function(t,e){var n=(e=void 0===e?{}:e).fontSize,r=e.fontFamily,i=e.fontWeight,a=e.fontStyle,e=e.fontVariant;return(d=d||document.createElement("canvas").getContext("2d")).font=[a,e,i,n+"px",r].join(" "),d.measureText(l(t,"String")?t:"").width},function(t,e){return(function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;for(var r=Array(t),i=0,e=0;e<n;e++)for(var a=arguments[e],o=0,l=a.length;o<l;o++,i++)r[i]=a[o];return r})([t],c(e=void 0===e?{}:e)).join("")});var d,p="u">typeof Float32Array?Float32Array:Array;function y(){var t=new p(9);return p!=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}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var g=function(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],l=e[4],s=e[5],u=e[6],c=e[7],e=e[8],f=n[0],h=n[1],d=n[2],p=n[3],y=n[4],g=n[5],v=n[6],b=n[7],n=n[8];return t[0]=f*r+h*o+d*u,t[1]=f*i+h*l+d*c,t[2]=f*a+h*s+d*e,t[3]=p*r+y*o+g*u,t[4]=p*i+y*l+g*c,t[5]=p*a+y*s+g*e,t[6]=v*r+b*o+n*u,t[7]=v*i+b*l+n*c,t[8]=v*a+b*s+n*e,t};function v(){var t=new p(16);return p!=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}var b=function(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],l=e[4],s=e[5],u=e[6],c=e[7],f=e[8],h=e[9],d=e[10],p=e[11],y=e[12],g=e[13],v=e[14],e=e[15],b=n[0],x=n[1],O=n[2],w=n[3];return t[0]=b*r+x*l+O*f+w*y,t[1]=b*i+x*s+O*h+w*g,t[2]=b*a+x*u+O*d+w*v,t[3]=b*o+x*c+O*p+w*e,b=n[4],x=n[5],O=n[6],w=n[7],t[4]=b*r+x*l+O*f+w*y,t[5]=b*i+x*s+O*h+w*g,t[6]=b*a+x*u+O*d+w*v,t[7]=b*o+x*c+O*p+w*e,b=n[8],x=n[9],O=n[10],w=n[11],t[8]=b*r+x*l+O*f+w*y,t[9]=b*i+x*s+O*h+w*g,t[10]=b*a+x*u+O*d+w*v,t[11]=b*o+x*c+O*p+w*e,b=n[12],x=n[13],O=n[14],w=n[15],t[12]=b*r+x*l+O*f+w*y,t[13]=b*i+x*s+O*h+w*g,t[14]=b*a+x*u+O*d+w*v,t[15]=b*o+x*c+O*p+w*e,t};function x(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return t?e.reduce(function(t,e){return function(n){return e(t(n))}},t):h}function O(t){return t instanceof Float32Array||t instanceof Array}function w(t,e,n){for(;t<e;)t+=2*Math.PI;for(;n<t;)t-=2*Math.PI;return t}function k(t,e,r,i,a){var o=(t=n(t,2))[0],t=t[1],l=y();return o=[o,t],(t=l)[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=o[0],t[7]=o[1],t[8]=1,t}function _(t,...e){return e.reduce((t,e)=>n=>t(e(n)),t)}function M(t,e){return e-t?n=>(n-t)/(e-t):t=>.5}L=new p(3),p!=Float32Array&&(L[0]=0,L[1]=0,L[2]=0),L=new p(4),p!=Float32Array&&(L[0]=0,L[1]=0,L[2]=0,L[3]=0);let E=Math.sqrt(50),A=Math.sqrt(10),S=Math.sqrt(2);function j(t,e,n){return t=Math.floor(Math.log(e=(e-t)/Math.max(0,n))/Math.LN10),n=e/10**t,0<=t?(n>=E?10:n>=A?5:n>=S?2:1)*10**t:-(10**-t)/(n>=E?10:n>=A?5:n>=S?2:1)}let P=(t,e,n=5)=>{let r=0,i=(t=[t,e]).length-1,a=t[r],o=t[i],l;return o<a&&([a,o]=[o,a],[r,i]=[i,r]),0<(l=j(a,o,n))?l=j(a=Math.floor(a/l)*l,o=Math.ceil(o/l)*l,n):l<0&&(l=j(a=Math.ceil(a*l)/l,o=Math.floor(o*l)/l,n)),0<l?(t[r]=Math.floor(a/l)*l,t[i]=Math.ceil(o/l)*l):l<0&&(t[r]=Math.ceil(a*l)/l,t[i]=Math.floor(o*l)/l),t};function T(t){return null!=t&&!Number.isNaN(t)}function C(t,e){return n=>{n.prototype.rescale=function(){this.initRange(),this.nice();var[t]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t))},n.prototype.initRange=function(){var e=this.options.interpolator;this.options.range=t(e)},n.prototype.composeOutput=function(t,n){var{domain:r,interpolator:i,round:a}=this.getOptions(),r=e(r.map(t)),a=a?t=>l(t=i(t),"Number")?Math.round(t):t:i;this.output=_(a,r,n,t)},n.prototype.invert=void 0}}var N,L={exports:{}},I={exports:{}},R=Array.prototype.concat,D=Array.prototype.slice,B=I.exports=function(t){for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n];!(!i||"string"==typeof i)&&(i instanceof Array||Array.isArray(i)||0<=i.length&&(i.splice instanceof Function||Object.getOwnPropertyDescriptor(i,i.length-1)&&"String"!==i.constructor.name))?e=R.call(e,D.call(i)):e.push(i)}return e},F=(B.wrap=function(t){return function(){return t(B(arguments))}},{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]}),z=I.exports,$=Object.hasOwnProperty,W=Object.create(null);for(N in F)$.call(F,N)&&(W[F[N]]=N);var G=L.exports={to:{},get:{}};function q(t,e,n){return Math.min(Math.max(e,t),n)}function H(t){return(t=Math.round(t).toString(16).toUpperCase()).length<2?"0"+t:t}G.get=function(t){var e,n;switch(t.substring(0,3).toLowerCase()){case"hsl":e=G.get.hsl(t),n="hsl";break;case"hwb":e=G.get.hwb(t),n="hwb";break;default:e=G.get.rgb(t),n="rgb"}return e?{model:n,value:e}:null},G.get.rgb=function(t){if(!t)return null;var e,n,r,i=[0,0,0,1];if(e=t.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(r=e[2],e=e[1],n=0;n<3;n++){var a=2*n;i[n]=parseInt(e.slice(a,2+a),16)}r&&(i[3]=parseInt(r,16)/255)}else if(e=t.match(/^#([a-f0-9]{3,4})$/i)){for(r=(e=e[1])[3],n=0;n<3;n++)i[n]=parseInt(e[n]+e[n],16);r&&(i[3]=parseInt(r+r,16)/255)}else{if(e=t.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/))for(n=0;n<3;n++)i[n]=parseInt(e[n+1],0);else{if(!(e=t.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(e=t.match(/^(\w+)$/))?"transparent"===e[1]?[0,0,0,0]:$.call(F,e[1])?((i=F[e[1]])[3]=1,i):null:null;for(n=0;n<3;n++)i[n]=Math.round(2.55*parseFloat(e[n+1]))}e[4]&&(e[5]?i[3]=.01*parseFloat(e[4]):i[3]=parseFloat(e[4]))}for(n=0;n<3;n++)i[n]=q(i[n],0,255);return i[3]=q(i[3],0,1),i},G.get.hsl=function(t){var e;return(t=t&&t.match(/^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*)?\)$/))?(e=parseFloat(t[4]),[(parseFloat(t[1])%360+360)%360,q(parseFloat(t[2]),0,100),q(parseFloat(t[3]),0,100),q(isNaN(e)?1:e,0,1)]):null},G.get.hwb=function(t){var e;return(t=t&&t.match(/^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*)?\)$/))?(e=parseFloat(t[4]),[(parseFloat(t[1])%360+360)%360,q(parseFloat(t[2]),0,100),q(parseFloat(t[3]),0,100),q(isNaN(e)?1:e,0,1)]):null},G.to.hex=function(){var t=z(arguments);return"#"+H(t[0])+H(t[1])+H(t[2])+(t[3]<1?H(Math.round(255*t[3])):"")},G.to.rgb=function(){var t=z(arguments);return t.length<4||1===t[3]?"rgb("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+")":"rgba("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+", "+t[3]+")"},G.to.rgb.percent=function(){var t=z(arguments),e=Math.round(t[0]/255*100),n=Math.round(t[1]/255*100),r=Math.round(t[2]/255*100);return t.length<4||1===t[3]?"rgb("+e+"%, "+n+"%, "+r+"%)":"rgba("+e+"%, "+n+"%, "+r+"%, "+t[3]+")"},G.to.hsl=function(){var t=z(arguments);return t.length<4||1===t[3]?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"},G.to.hwb=function(){var t=z(arguments),e="";return 4<=t.length&&1!==t[3]&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"},G.to.keyword=function(t){return W[t.slice(0,3)]};var Y=L.exports;function V(t,e,n){let r=n;return r<0&&(r+=1),1<r&&--r,r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function U(t){var e,n,r,t=Y.get(t);return t?({model:t,value:e}=t,"rgb"===t?e:"hsl"===t?(e=(t=e)[0]/360,n=t[1]/100,r=t[2]/100,t=t[3],0==n?[255*r,255*r,255*r,t]:[255*V(n=2*r-(r=r<.5?r*(1+n):r+n-r*n),r,e+1/3),255*V(n,r,e),255*V(n,r,e-1/3),t]):null):null}let X=(t,e)=>n=>t*(1-n)+e*n,K=(t,e)=>{if("number"==typeof t&&"number"==typeof e)return X(t,e);if("string"!=typeof t||"string"!=typeof e)return()=>t;{let n=U(t),r=U(e);return null===n||null===r?n?()=>t:()=>e:t=>{var e=[,,,,];for(let o=0;o<4;o+=1){var i=n[o],a=r[o];e[o]=i*(1-t)+a*t}var[o,l,s,u]=e;return`rgba(${Math.round(o)}, ${Math.round(l)}, ${Math.round(s)}, ${u})`}}},Z=(t,e)=>{let n=X(t,e);return t=>Math.round(n(t))};function Q({map:t,initKey:e},n){return e=e(n),t.has(e)?t.get(e):n}function J(t){return"object"==typeof t?t.valueOf():t}class tt extends Map{constructor(t){if(super(),this.map=new Map,this.initKey=J,null!==t)for(var[e,n]of t)this.set(e,n)}get(t){return super.get(Q({map:this.map,initKey:this.initKey},t))}has(t){return super.has(Q({map:this.map,initKey:this.initKey},t))}set(t,e){var n,r;return super.set(([{map:t,initKey:n},r]=[{map:this.map,initKey:this.initKey},t],n=n(r),t.has(n)?t.get(n):(t.set(n,r),r)),e)}delete(t){var e,n;return super.delete(([{map:t,initKey:e},n]=[{map:this.map,initKey:this.initKey},t],e=e(n),t.has(e)&&(n=t.get(e),t.delete(e)),n))}}class te{constructor(t){this.options=f({},this.getDefaultOptions()),this.update(t)}getOptions(){return this.options}update(t={}){this.options=f({},this.options,t),this.rescale(t)}rescale(t){}}let tn=Symbol("defaultUnknown");function tr(t,e,n){for(let r=0;r<e.length;r+=1)t.has(e[r])||t.set(n(e[r]),r)}function ti(t){var{value:t,from:e,to:n,mapper:r,notFoundReturn:i}=t;let a=r.get(t);if(void 0===a){if(i!==tn)return i;a=e.push(t)-1,r.set(t,a)}return n[a%n.length]}function ta(t){return t instanceof Date?t=>""+t:"object"==typeof t?t=>JSON.stringify(t):t=>t}class to extends te{getDefaultOptions(){return{domain:[],range:[],unknown:tn}}constructor(t){super(t)}map(t){return 0===this.domainIndexMap.size&&tr(this.domainIndexMap,this.getDomain(),this.domainKey),ti({value:this.domainKey(t),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(t){return 0===this.rangeIndexMap.size&&tr(this.rangeIndexMap,this.getRange(),this.rangeKey),ti({value:this.rangeKey(t),mapper:this.rangeIndexMap,from:this.getRange(),to:this.getDomain(),notFoundReturn:this.options.unknown})}rescale(t){var[e]=this.options.domain,[n]=this.options.range;this.domainKey=ta(e),this.rangeKey=ta(n),this.rangeIndexMap?(t&&!t.range||this.rangeIndexMap.clear(),(!t||t.domain||t.compare)&&(this.domainIndexMap.clear(),this.sortedDomain=void 0)):(this.rangeIndexMap=new Map,this.domainIndexMap=new Map)}clone(){return new to(this.options)}getRange(){return this.options.range}getDomain(){var t,e;return this.sortedDomain||({domain:t,compare:e}=this.options,this.sortedDomain=e?[...t].sort(e):t),this.sortedDomain}}class tl extends to{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:tn,flex:[]}}constructor(t){super(t)}clone(){return new tl(this.options)}getStep(t){return void 0===this.valueStep?1:"number"==typeof this.valueStep?this.valueStep:void 0===t?Array.from(this.valueStep.values())[0]:this.valueStep.get(t)}getBandWidth(t){return void 0===this.valueBandWidth?1:"number"==typeof this.valueBandWidth?this.valueBandWidth:void 0===t?Array.from(this.valueBandWidth.values())[0]:this.valueBandWidth.get(t)}getRange(){return this.adjustedRange}getPaddingInner(){var{padding:t,paddingInner:e}=this.options;return 0<t?t:e}getPaddingOuter(){var{padding:t,paddingOuter:e}=this.options;return 0<t?t:e}rescale(){super.rescale();var{align:t,domain:e,range:n,round:r,flex:i}=this.options,{adjustedRange:t,valueBandWidth:n,valueStep:r}=function(t){var e=t.domain;if(0===(e=e.length))return{valueBandWidth:void 0,valueStep:void 0,adjustedRange:[]};if(!(null==(n=t.flex)||!n.length))return function(t){let e,{domain:n,range:r,paddingOuter:i,paddingInner:a,flex:o,round:l,align:s}=t;var u,c=n.length,f=0<(f=(t=c)-(h=o).length)?[...h,...Array(f).fill(1)]:f<0?h.slice(0,t):h,[t,h]=r,h=h-t,d=h/(2/c*i+1-1/c*a);let p=d*a/c;d-=c*p;let y=(e=Math.min(...u=f),u.map(t=>t/e)),g=d/y.reduce((t,e)=>t+e);var f=new tt(n.map((t,e)=>(e=y[e]*g,[t,l?Math.floor(e):e]))),v=new tt(n.map((t,e)=>(e=y[e]*g+p,[t,l?Math.floor(e):e]))),d=Array.from(v.values()).reduce((t,e)=>t+e),t=t+(h-(d-d/c*a))*s;let b=l?Math.round(t):t;var x=Array(c);for(let t=0;t<c;t+=1){x[t]=Math.round(1e12*(O=b))/1e12;var O=n[t];b+=v.get(O)}return{valueBandWidth:f,valueStep:v,adjustedRange:x}}(t);var{range:n,paddingOuter:t,paddingInner:r,round:i,align:a}=t;let o,l,s=n[0];return o=(n=n[1]-s)/Math.max(1,2*t+(e-r)),i&&(o=Math.floor(o)),s+=(n-o*(e-r))*a,l=o*(1-r),i&&(s=Math.round(s),l=Math.round(l)),t=Array(e).fill(0).map((t,e)=>s+e*o),{valueStep:o,valueBandWidth:l,adjustedRange:t}}({align:t,range:n,round:r,flex:i,paddingInner:this.getPaddingInner(),paddingOuter:this.getPaddingOuter(),domain:e});this.valueStep=r,this.valueBandWidth=n,this.adjustedRange=t}}let ts=(t,e,n)=>{let r,i,a=t,o=e;if(a===o&&0<n)return[a];let l=j(a,o,n);if(0===l||!Number.isFinite(l))return[];if(0<l){a=Math.ceil(a/l),i=Array(r=Math.ceil((o=Math.floor(o/l))-a+1));for(let t=0;t<r;t+=1)i[t]=(a+t)*l}else{a=Math.ceil(a*(l=-l)),i=Array(r=Math.ceil((o=Math.floor(o*l))-a+1));for(let t=0;t<r;t+=1)i[t]=(a+t)/l}return i},tu=(t,e,n,r)=>(2<Math.min(t.length,e.length)?(t,e,n)=>{let r=Math.min(t.length,e.length)-1,i=Array(r),a=Array(r);var o=t[0]>t[r],l=o?[...t].reverse():t,s=o?[...e].reverse():e;for(let t=0;t<r;t+=1)i[t]=M(l[t],l[t+1]),a[t]=n(s[t],s[t+1]);return e=>{var n=function(t,e,n){let r=1,i=n||t.length;for(var a=t=>t;r<i;){var o=Math.floor((r+i)/2);a(t[o])>e?i=o:r=o+1}return r}(t,e,r)-1,o=i[n];return _(a[n],o)(e)}}:(t,e,n)=>{let r;var[t,i]=t,[e,a]=e;return _(t<i?(r=M(t,i),n(e,a)):(r=M(i,t),n(a,e)),r)})(t,e,r?Z:n);class tc extends te{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:X,tickCount:5}}map(t){return T(t)?this.output(t):this.options.unknown}invert(t){return T(t)?this.input(t):this.options.unknown}nice(){var t,e,n,r;this.options.nice&&([t,e,n,...r]=this.getTickMethodOptions(),this.options.domain=this.chooseNice()(t,e,n,...r))}getTicks(){var t=this.options.tickMethod,[e,n,r,...i]=this.getTickMethodOptions();return t(e,n,r,...i)}getTickMethodOptions(){var{domain:t,tickCount:e}=this.options;return[t[0],t[t.length-1],e]}chooseNice(){return P}rescale(){this.nice();var[t,e]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t)),this.composeInput(t,e,this.chooseClamp(e))}chooseClamp(t){var{clamp:e,range:n}=this.options,t=this.options.domain.map(t),n=Math.min(t.length,n.length);if(e){e=t[0];let r=(t=t[n-1])<e?t:e,i=t<e?e:t;return t=>Math.min(Math.max(r,t),i)}return h}composeOutput(t,e){var{domain:n,range:r,round:i,interpolate:a}=this.options,n=tu(n.map(t),r,a,i);this.output=_(n,e,t)}composeInput(t,e,n){var{domain:r,range:i}=this.options,i=tu(i,r.map(t),X);this.input=_(e,n,i)}}class tf extends tc{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:K,tickMethod:ts,tickCount:5}}chooseTransforms(){return[h,h]}clone(){return new tf(this.options)}}class th extends tl{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,padding:0,unknown:tn,paddingInner:1,paddingOuter:0}}constructor(t){super(t)}getPaddingInner(){return 1}clone(){return new th(this.options)}update(t){super.update(t)}getPaddingOuter(){return this.options.padding}}function td(t,e){for(var n=[],r=0,i=t.length;r<i;r++)n.push(t[r].substr(0,e));return n}var tp,I=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],L=["January","February","March","April","May","June","July","August","September","October","November","December"],ty=td(L,3);!function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r++){var i,a=e[r];for(i in a)t[i]=a[i]}}({},{dayNamesShort:td(I,3),dayNames:I,monthNamesShort:ty,monthNames:L,amPm:["am","pm"],DoFn:function(t){return t+["th","st","nd","rd"][3<t%10?0:(t-t%10!=10)*t%10]}});let tg=tp=class extends tf{getDefaultOptions(){return{domain:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:h,tickMethod:ts,tickCount:5}}constructor(t){super(t)}clone(){return new tp(this.options)}};tg=tp=function(t,e,n,r){var i,a=arguments.length,o=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,r);else for(var l=t.length-1;0<=l;l--)(i=t[l])&&(o=(a<3?i(o):3<a?i(e,n,o):i(e,n))||o);return 3<a&&o&&Object.defineProperty(e,n,o),o}([C(function(t){return[t(0),t(1)]},t=>{var[t,e]=t;return _(X(0,1),M(t,e))})],tg);let tv=a=class extends tf{getDefaultOptions(){return{domain:[0,.5,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:h,tickMethod:ts,tickCount:5}}constructor(t){super(t)}clone(){return new a(this.options)}};function tm(t,e,r,i,a){var o=new tf({range:[e,e+i]}),l=new tf({range:[r,r+a]});return{transform:function(t){var t=n(t,2),e=t[0],t=t[1];return[o.map(e),l.map(t)]},untransform:function(t){var t=n(t,2),e=t[0],t=t[1];return[o.invert(e),l.invert(t)]}}}function tb(t,e,r,i,a){return(0,n(t,1)[0])(e,r,i,a)}function tx(t,e,r,i,a){return n(t,1)[0]}function tO(t,e,r,i,a){var o=(t=n(t,4))[0],l=t[1],s=t[2],t=t[3],u=new tf({range:[s,t]}),c=new tf({range:[o,l]}),f=1<(s=a/i)?1:s,h=1<s?1/s:1;return{transform:function(t){var t=n(t,2),e=t[0],t=t[1],e=c.map(e),t=u.map(t);return[t*Math.cos(e)*f*.5+.5,t*Math.sin(e)*h*.5+.5]},untransform:function(t){var t=n(t,2),e=t[0],t=t[1],e=2*(e-.5)/f,t=2*(t-.5)/h,r=Math.sqrt(Math.pow(e,2)+Math.pow(t,2)),t=w(Math.atan2(t,e),o,l);return[c.invert(t),u.invert(r)]}}}function tw(t,e,r,i,a){return{transform:function(t){var t=n(t,2),e=t[0];return[t[1],e]},untransform:function(t){var t=n(t,2),e=t[0];return[t[1],e]}}}function tk(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];return tj.apply(void 0,r([[-1,-1]],n(e),!1))}function t_(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];return tj.apply(void 0,r([[-1,1]],n(e),!1))}function tM(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];return tj.apply(void 0,r([[1,-1]],n(e),!1))}function tE(t,e,r,i,a){var o,t=n(t,1)[0],l=y();return o=Math.sin(t),t=Math.cos(t),l[0]=t,l[1]=o,l[2]=0,l[3]=-o,l[4]=t,l[5]=0,l[6]=0,l[7]=0,l[8]=1,l}function tA(t,e,r,i,a){var o=(t=n(t,4))[0],l=t[1],s=t[2],u=(t[3]-s)/(l/(2*Math.PI)+1),c=u/(2*Math.PI),f=new tf({range:[s,s+.99*u]}),h=new tf({range:[o,l]}),d=1<(t=a/i)?1:t,p=1<t?1/t:1;return{transform:function(t){var t=n(t,2),e=t[0],t=t[1],e=h.map(e),t=f.map(t);return[Math.cos(e)*(c*e+t)*d*.5+.5,Math.sin(e)*(c*e+t)*p*.5+.5]},untransform:function(t){var t=n(t,2),e=t[0],t=t[1],e=2*(e-.5)/d,t=2*(t-.5)/p,r=Math.sqrt(Math.pow(e,2)+Math.pow(t,2)),t=w(Math.atan2(t,e)+Math.floor(r/u)*Math.PI*2,o,l),e=r-c*t;return[h.invert(t),f.invert(e)]}}}function tS(t,e,r,i,a){var o=(t=n(t,4))[0],l=t[1],s=t[2],t=t[3],u=new tf({range:[s,t]});return{transform:function(t){for(var e=[],n=t.length,r=new th({domain:Array(n).fill(0).map(function(t,e){return e}),range:[o,l]}),i=0;i<n;i++){var a=t[i],s=r.map(i),a=u.map(a);e.push(s,a)}return e},untransform:function(t){for(var e=[],n=0;n<t.length;n+=2){var r=t[n+1];e.push(u.invert(r))}return e}}}tv=a=function(t,e,n,r){var i,a=arguments.length,o=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,r);else for(var l=t.length-1;0<=l;l--)(i=t[l])&&(o=(a<3?i(o):3<a?i(e,n,o):i(e,n))||o);return 3<a&&o&&Object.defineProperty(e,n,o),o}([C(function(t){return[t(0),t(.5),t(1)]},t=>{let[e,n,r]=t,i=_(X(0,.5),M(e,n)),a=_(X(.5,1),M(n,r));return t=>(e>r?t<n?a:i:t<n?i:a)(t)})],tv);var tj=function(t,e,r,i,a){var t=n(t,2),o=t[0],t=t[1],l=y();return o=[o,t],(t=l)[0]=o[0],t[1]=0,t[2]=0,t[3]=0,t[4]=o[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t};function tP(t){return 1/Math.tan(t)}function tT(t,e,r,i,a){var o=tP(n(t,1)[0]);return{transform:function(t){var t=n(t,2),e=t[0],t=t[1];return[e+t*o,t]},untransform:function(t){var t=n(t,2),e=t[0],t=t[1];return[e-t*o,t]}}}function tC(t,e,r,i,a){var o=tP(n(t,1)[0]);return{transform:function(t){var t=n(t,2),e=t[0];return[e,t[1]+e*o]},untransform:function(t){var t=n(t,2),e=t[0];return[e,t[1]-e*o]}}}function tN(t,e,n,r,i){var a=t<e,i=(a?e-r:i-e)||i-r,r=a?-1:1;return r*i*(n+1)/(n+i/((t-e)*r))+e}function tL(t,e,n,r,i){var a=t<e,i=(a?e-r:i-e)||i-r;return i/(i*(n+1)/(t-e)-n*(a?-1:1))+e}function tI(t,e,n){return n?new tf({range:[0,1],domain:[0,e]}).map(t):t}function tR(t,e,r,i,a){var o=(t=n(t,3))[0],l=t[1],t=t[2],s=tI(o,i,void 0!==t&&t);return{transform:function(t){var t=n(t,2),e=t[0],t=t[1];return[tN(e,s,l,0,1),t]},untransform:function(t){var t=n(t,2),e=t[0],t=t[1];return[tL(e,s,l,0,1),t]}}}function tD(t,e,r,i,a){var o=(t=n(t,3))[0],l=t[1],t=t[2],s=tI(o,a,void 0!==t&&t);return{transform:function(t){return[(t=n(t,2))[0],tN(t[1],s,l,0,1)]},untransform:function(t){return[(t=n(t,2))[0],tL(t[1],s,l,0,1)]}}}function tB(t,e,r,i,a){var o=(t=n(t,5))[0],l=t[1],s=t[2],u=t[3],t=t[4],c=tI(o,i,t=void 0!==t&&t),f=tI(l,a,t);return{transform:function(t){var t=n(t,2),e=t[0],t=t[1];return[tN(e,c,s,0,1),tN(t,f,u,0,1)]},untransform:function(t){var t=n(t,2),e=t[0],t=t[1];return[tL(e,c,s,0,1),tL(t,f,u,0,1)]}}}function tF(t,e,r,i,a){var o=(t=n(t,5))[0],l=t[1],s=t[2],u=t[3],t=void 0!==(t=t[4])&&t,c=new tf({range:[0,i]}),f=new tf({range:[0,a]}),h=t?o:c.map(o),d=t?l:f.map(l);return{transform:function(t){var t=n(t,2),e=t[0],t=t[1],r=c.map(e)-h,i=f.map(t)-d,a=Math.sqrt(r*r+i*i);return s<a?[e,t]:(a=h+(e=tN(a,0,u,0,s))*Math.cos(t=Math.atan2(i,r)),i=d+e*Math.sin(t),[c.invert(a),f.invert(i)])},untransform:function(t){var t=n(t,2),e=t[0],t=t[1],r=c.map(e)-h,i=f.map(t)-d,a=Math.sqrt(r*r+i*i);return s<a?[e,t]:(a=h+(e=tL(a,0,u,0,s))*Math.cos(t=Math.atan2(i,r)),i=d+e*Math.sin(t),[c.invert(a),f.invert(i)])}}}function tz(t,e,r,i,a,o,l){var s=new tf({range:[e,e+a]}),u=new tf({range:[r,r+o]}),c=new tf({range:[i,i+l]});return{transform:function(t){var t=n(t,3),e=t[0],r=t[1],t=t[2];return[s.map(e),u.map(r),c.map(t)]},untransform:function(t){var t=n(t,3),e=t[0],r=t[1],t=t[2];return[s.invert(e),u.invert(r),c.invert(t)]}}}function t$(t,e,r,i,a,o,l){var s,u=(t=n(t,3))[0],c=t[1],t=t[2];return s=v(),u=[u,c,t],s[0]=1,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=1,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=1,s[11]=0,s[12]=u[0],s[13]=u[1],s[14]=u[2],s[15]=1,s}function tW(t,e,r,i,a,o,l){return{transform:function(t){var t=n(t,3),e=t[0];return[t[1],e,t[2]]},untransform:function(t){var t=n(t,3),e=t[0];return[t[1],e,t[2]]}}}function tG(t,e,r,i,a,o,l){var s,u=(t=n(t,3))[0],c=t[1],t=t[2];return s=v(),u=[u,c,t],s[0]=u[0],s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=u[1],s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=u[2],s[11]=0,s[12]=0,s[13]=0,s[14]=0,s[15]=1,s}function tq(t){this.options={x:0,y:0,width:300,height:150,transformations:[]},this.transformers={cartesian:tm,translate:k,custom:tb,matrix:tx,polar:tO,transpose:tw,scale:tj,"shear.x":tT,"shear.y":tC,reflect:tk,"reflect.x":t_,"reflect.y":tM,rotate:tE,helix:tA,parallel:tS,fisheye:tB,"fisheye.x":tR,"fisheye.y":tD,"fisheye.circular":tF},this.update(t)}function tH(t){this.options={x:0,y:0,z:0,width:300,height:150,depth:150,transformations:[]},this.transformers={cartesian3D:tz,translate3D:t$,scale3D:tG,transpose3D:tW},this.update(t)}tq.prototype.update=function(t){this.options=f({},this.options,t),this.recoordinate()},tq.prototype.clone=function(){return new tq(this.options)},tq.prototype.getOptions=function(){return this.options},tq.prototype.clear=function(){this.update({transformations:[]})},tq.prototype.getSize=function(){var t=this.options;return[t.width,t.height]},tq.prototype.getCenter=function(){var t=this.options,e=t.x,n=t.y;return[(2*e+t.width)/2,(2*n+t.height)/2]},tq.prototype.transform=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var i=this.options.transformations;return this.update({transformations:r(r([],n(i),!1),[r([],n(t),!1)],!1)}),this},tq.prototype.map=function(t){return this.output(t)},tq.prototype.invert=function(t){return this.input(t)},tq.prototype.recoordinate=function(){this.output=this.compose(),this.input=this.compose(!0)},tq.prototype.compose=function(t){function i(t,e){c.push((e=void 0===e||e)?function(e){for(var i=[],a=0;a<e.length-1;a+=2){var o=[e[a],e[a+1]],o=t(o);i.push.apply(i,r([],n(o),!1))}return i}:t)}var a,o,l=(t=void 0!==t&&t)?r([],n(this.options.transformations),!1).reverse():this.options.transformations,s=t?function(t){return t.untransform}:function(t){return t.transform},u=[],c=[];try{for(var f=e(l),d=f.next();!d.done;d=f.next()){var p,y,g,v,b,w,k=n(d.value),_=k[0],M=k.slice(1),E=this.transformers[_];E&&(y=(p=this.options).x,g=p.y,v=p.width,b=p.height,O(w=E(r([],n(M),!1),y,g,v,b))?u.push(w):(u.length&&(i(this.createMatrixTransform(u,t)),u.splice(0,u.length)),i(s(w)||h,"parallel"!==_)))}}catch(t){a={error:t}}finally{try{d&&!d.done&&(o=f.return)&&o.call(f)}finally{if(a)throw a.error}}return u.length&&i(this.createMatrixTransform(u,t)),x.apply(void 0,r([],n(c),!1))},tq.prototype.createMatrixTransform=function(t,e){var n,r,i,a,o,l,s,u,c,f,h,d,v=y();return e&&t.reverse(),t.forEach(function(t){return g(v,v,t)}),e&&(e=t=v,(d=new p(9))[0]=e[0],d[1]=e[1],d[2]=e[2],d[3]=e[3],d[4]=e[4],d[5]=e[5],d[6]=e[6],d[7]=e[7],d[8]=e[8],d=(e=d)[0],n=e[1],r=e[2],i=e[3],a=e[4],o=e[5],l=e[6],s=e[7],h=d*(u=(e=e[8])*a-o*s)+n*(c=-e*i+o*l)+r*(f=s*i-a*l))&&(t[0]=u*(h=1/h),t[1]=(-e*n+r*s)*h,t[2]=(o*n-r*a)*h,t[3]=c*h,t[4]=(e*d-r*l)*h,t[5]=(-o*d+r*i)*h,t[6]=f*h,t[7]=(-s*d+n*l)*h,t[8]=(a*d-n*i)*h),function(t){var e,n,r,i,t=[t[0],t[1],1];return r=(n=e=t)[0],i=n[1],n=n[2],e[0]=r*v[0]+i*v[3]+n*v[6],e[1]=r*v[1]+i*v[4]+n*v[7],e[2]=r*v[2]+i*v[5]+n*v[8],[t[0],t[1]]}},I=tq,tH.prototype.update=function(t){this.options=f({},this.options,t),this.recoordinate()},tH.prototype.clone=function(){return new tH(this.options)},tH.prototype.getOptions=function(){return this.options},tH.prototype.clear=function(){this.update({transformations:[]})},tH.prototype.getSize=function(){var t=this.options;return[t.width,t.height,t.depth]},tH.prototype.getCenter=function(){var t=this.options,e=t.x,n=t.y,r=t.z;return[(2*e+t.width)/2,(2*n+t.height)/2,(2*r+t.depth)/2]},tH.prototype.transform=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var i=this.options.transformations;return this.update({transformations:r(r([],n(i),!1),[r([],n(t),!1)],!1)}),this},tH.prototype.map=function(t){return this.output(t)},tH.prototype.invert=function(t){return this.input(t)},tH.prototype.recoordinate=function(){this.output=this.compose(),this.input=this.compose(!0)},tH.prototype.compose=function(t){function i(t,e){c.push((e=void 0===e||e)?function(e){for(var i=[],a=0;a<e.length-1;a+=3){var o=[e[a],e[a+1],e[a+2]],o=t(o);i.push.apply(i,r([],n(o),!1))}return i}:t)}var a,o,l=(t=void 0!==t&&t)?r([],n(this.options.transformations),!1).reverse():this.options.transformations,s=t?function(t){return t.untransform}:function(t){return t.transform},u=[],c=[];try{for(var f=e(l),d=f.next();!d.done;d=f.next()){var p,y,g,v,b,w,k,_,M=n(d.value),E=M[0],A=M.slice(1),S=this.transformers[E];S&&(y=(p=this.options).x,g=p.y,v=p.z,b=p.width,w=p.height,k=p.depth,O(_=S(r([],n(A),!1),y,g,v,b,w,k))?u.push(_):(u.length&&(i(this.createMatrixTransform(u,t)),u.splice(0,u.length)),i(s(_)||h,!0)))}}catch(t){a={error:t}}finally{try{d&&!d.done&&(o=f.return)&&o.call(f)}finally{if(a)throw a.error}}return u.length&&i(this.createMatrixTransform(u,t)),x.apply(void 0,r([],n(c),!1))},tH.prototype.createMatrixTransform=function(t,e){var n,r,i,a,o,l,s,u,c,f,h,d,y,g,x,O,w,k,_,M,E,A,S,j,P,T,C,N,L=v();return e&&t.reverse(),t.forEach(function(t){return b(L,L,t)}),e&&(e=t=L,(N=new p(16))[0]=e[0],N[1]=e[1],N[2]=e[2],N[3]=e[3],N[4]=e[4],N[5]=e[5],N[6]=e[6],N[7]=e[7],N[8]=e[8],N[9]=e[9],N[10]=e[10],N[11]=e[11],N[12]=e[12],N[13]=e[13],N[14]=e[14],N[15]=e[15],N=(e=N)[0],n=e[1],r=e[2],i=e[3],a=e[4],o=e[5],l=e[6],s=e[7],u=e[8],c=e[9],f=e[10],h=e[11],d=e[12],y=e[13],g=e[14],e=e[15],C=(x=N*o-n*a)*(T=f*e-h*g)-(O=N*l-r*a)*(P=c*e-h*y)+(w=N*s-i*a)*(j=c*g-f*y)+(k=n*l-r*o)*(S=u*e-h*d)-(_=n*s-i*o)*(A=u*g-f*d)+(M=r*s-i*l)*(E=u*y-c*d))&&(t[0]=(o*T-l*P+s*j)*(C=1/C),t[1]=(r*P-n*T-i*j)*C,t[2]=(y*M-g*_+e*k)*C,t[3]=(f*_-c*M-h*k)*C,t[4]=(l*S-a*T-s*A)*C,t[5]=(N*T-r*S+i*A)*C,t[6]=(g*w-d*M-e*O)*C,t[7]=(u*M-f*w+h*O)*C,t[8]=(a*P-o*S+s*E)*C,t[9]=(n*S-N*P-i*E)*C,t[10]=(d*_-y*w+e*x)*C,t[11]=(c*w-u*_-h*x)*C,t[12]=(o*A-a*j-l*E)*C,t[13]=(N*j-n*A+r*E)*C,t[14]=(y*O-d*k-g*x)*C,t[15]=(u*k-c*O+f*x)*C),function(t){var e,n,r,i,a,t=[t[0],t[1],t[2],1];return r=(n=e=t)[0],i=n[1],a=n[2],n=n[3],e[0]=L[0]*r+L[4]*i+L[8]*a+L[12]*n,e[1]=L[1]*r+L[5]*i+L[9]*a+L[13]*n,e[2]=L[2]*r+L[6]*i+L[10]*a+L[14]*n,e[3]=L[3]*r+L[7]*i+L[11]*a+L[15]*n,[t[0],t[1],t[2]]}},ty=tH,t.Coordinate=I,t.Coordinate3D=ty,Object.defineProperty(t,"__esModule",{value:!0})}(e)},8688(t){"use strict";t.exports={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]}},5411(t,e,n){var r=n(8688),i=n(5114),a=Object.hasOwnProperty,o=Object.create(null);for(var l in r)a.call(r,l)&&(o[r[l]]=l);var s=t.exports={to:{},get:{}};function u(t,e,n){return Math.min(Math.max(e,t),n)}function c(t){var e=Math.round(t).toString(16).toUpperCase();return e.length<2?"0"+e:e}s.get=function(t){var e,n;switch(t.substring(0,3).toLowerCase()){case"hsl":e=s.get.hsl(t),n="hsl";break;case"hwb":e=s.get.hwb(t),n="hwb";break;default:e=s.get.rgb(t),n="rgb"}return e?{model:n,value:e}:null},s.get.rgb=function(t){if(!t)return null;var e,n,i,o=[0,0,0,1];if(e=t.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(n=0,i=e[2],e=e[1];n<3;n++){var l=2*n;o[n]=parseInt(e.slice(l,l+2),16)}i&&(o[3]=parseInt(i,16)/255)}else if(e=t.match(/^#([a-f0-9]{3,4})$/i)){for(n=0,i=(e=e[1])[3];n<3;n++)o[n]=parseInt(e[n]+e[n],16);i&&(o[3]=parseInt(i+i,16)/255)}else if(e=t.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)){for(n=0;n<3;n++)o[n]=parseInt(e[n+1],0);e[4]&&(e[5]?o[3]=.01*parseFloat(e[4]):o[3]=parseFloat(e[4]))}else if(e=t.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)){for(n=0;n<3;n++)o[n]=Math.round(2.55*parseFloat(e[n+1]));e[4]&&(e[5]?o[3]=.01*parseFloat(e[4]):o[3]=parseFloat(e[4]))}else if(!(e=t.match(/^(\w+)$/)))return null;else return"transparent"===e[1]?[0,0,0,0]:a.call(r,e[1])?((o=r[e[1]])[3]=1,o):null;for(n=0;n<3;n++)o[n]=u(o[n],0,255);return o[3]=u(o[3],0,1),o},s.get.hsl=function(t){if(!t)return null;var e=t.match(/^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*)?\)$/);if(e){var n=parseFloat(e[4]);return[(parseFloat(e[1])%360+360)%360,u(parseFloat(e[2]),0,100),u(parseFloat(e[3]),0,100),u(isNaN(n)?1:n,0,1)]}return null},s.get.hwb=function(t){if(!t)return null;var e=t.match(/^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*)?\)$/);if(e){var n=parseFloat(e[4]);return[(parseFloat(e[1])%360+360)%360,u(parseFloat(e[2]),0,100),u(parseFloat(e[3]),0,100),u(isNaN(n)?1:n,0,1)]}return null},s.to.hex=function(){var t=i(arguments);return"#"+c(t[0])+c(t[1])+c(t[2])+(t[3]<1?c(Math.round(255*t[3])):"")},s.to.rgb=function(){var t=i(arguments);return t.length<4||1===t[3]?"rgb("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+")":"rgba("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+", "+t[3]+")"},s.to.rgb.percent=function(){var t=i(arguments),e=Math.round(t[0]/255*100),n=Math.round(t[1]/255*100),r=Math.round(t[2]/255*100);return t.length<4||1===t[3]?"rgb("+e+"%, "+n+"%, "+r+"%)":"rgba("+e+"%, "+n+"%, "+r+"%, "+t[3]+")"},s.to.hsl=function(){var t=i(arguments);return t.length<4||1===t[3]?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"},s.to.hwb=function(){var t=i(arguments),e="";return t.length>=4&&1!==t[3]&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"},s.to.keyword=function(t){return o[t.slice(0,3)]}},6914(t){"use strict";var e=Object.prototype.hasOwnProperty,n="~";function r(){}function i(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function a(t,e,r,a,o){if("function"!=typeof r)throw TypeError("The listener must be a function");var l=new i(r,a||t,o),s=n?n+e:e;return t._events[s]?t._events[s].fn?t._events[s]=[t._events[s],l]:t._events[s].push(l):(t._events[s]=l,t._eventsCount++),t}function o(t,e){0==--t._eventsCount?t._events=new r:delete t._events[e]}function l(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1)),l.prototype.eventNames=function(){var t,r,i=[];if(0===this._eventsCount)return i;for(r in t=this._events)e.call(t,r)&&i.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(t)):i},l.prototype.listeners=function(t){var e=n?n+t:t,r=this._events[e];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,a=r.length,o=Array(a);i<a;i++)o[i]=r[i].fn;return o},l.prototype.listenerCount=function(t){var e=n?n+t:t,r=this._events[e];return r?r.fn?1:r.length:0},l.prototype.emit=function(t,e,r,i,a,o){var l=n?n+t:t;if(!this._events[l])return!1;var s,u,c=this._events[l],f=arguments.length;if(c.fn){switch(c.once&&this.removeListener(t,c.fn,void 0,!0),f){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,e),!0;case 3:return c.fn.call(c.context,e,r),!0;case 4:return c.fn.call(c.context,e,r,i),!0;case 5:return c.fn.call(c.context,e,r,i,a),!0;case 6:return c.fn.call(c.context,e,r,i,a,o),!0}for(u=1,s=Array(f-1);u<f;u++)s[u-1]=arguments[u];c.fn.apply(c.context,s)}else{var h,d=c.length;for(u=0;u<d;u++)switch(c[u].once&&this.removeListener(t,c[u].fn,void 0,!0),f){case 1:c[u].fn.call(c[u].context);break;case 2:c[u].fn.call(c[u].context,e);break;case 3:c[u].fn.call(c[u].context,e,r);break;case 4:c[u].fn.call(c[u].context,e,r,i);break;default:if(!s)for(h=1,s=Array(f-1);h<f;h++)s[h-1]=arguments[h];c[u].fn.apply(c[u].context,s)}}return!0},l.prototype.on=function(t,e,n){return a(this,t,e,n,!1)},l.prototype.once=function(t,e,n){return a(this,t,e,n,!0)},l.prototype.removeListener=function(t,e,r,i){var a=n?n+t:t;if(!this._events[a])return this;if(!e)return o(this,a),this;var l=this._events[a];if(l.fn)l.fn!==e||i&&!l.once||r&&l.context!==r||o(this,a);else{for(var s=0,u=[],c=l.length;s<c;s++)(l[s].fn!==e||i&&!l[s].once||r&&l[s].context!==r)&&u.push(l[s]);u.length?this._events[a]=1===u.length?u[0]:u:o(this,a)}return this},l.prototype.removeAllListeners=function(t){var e;return t?(e=n?n+t:t,this._events[e]&&o(this,e)):(this._events=new r,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=n,l.EventEmitter=l,t.exports=l},1415(t){t.exports=function(t){return!!t&&"string"!=typeof t&&(t instanceof Array||Array.isArray(t)||t.length>=0&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&"String"!==t.constructor.name))}},2768(t,e,n){t=n.nmd(t),(function(){var r,i="Expected a function",a="__lodash_hash_undefined__",o="__lodash_placeholder__",l=1/0,s=0/0,u=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],c="[object Arguments]",f="[object Array]",h="[object Boolean]",d="[object Date]",p="[object Error]",y="[object Function]",g="[object GeneratorFunction]",v="[object Map]",b="[object Number]",x="[object Object]",O="[object Promise]",w="[object RegExp]",k="[object Set]",_="[object String]",M="[object Symbol]",E="[object WeakMap]",A="[object ArrayBuffer]",S="[object DataView]",j="[object Float32Array]",P="[object Float64Array]",T="[object Int8Array]",C="[object Int16Array]",N="[object Int32Array]",L="[object Uint8Array]",I="[object Uint8ClampedArray]",R="[object Uint16Array]",D="[object Uint32Array]",B=/\b__p \+= '';/g,F=/\b(__p \+=) '' \+/g,z=/(__e\(.*?\)|\b__t\)) \+\n'';/g,$=/&(?:amp|lt|gt|quot|#39);/g,W=/[&<>"']/g,G=RegExp($.source),q=RegExp(W.source),H=/<%-([\s\S]+?)%>/g,Y=/<%([\s\S]+?)%>/g,V=/<%=([\s\S]+?)%>/g,U=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,X=/^\w*$/,K=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Z=/[\\^$.*+?()[\]{}|]/g,Q=RegExp(Z.source),J=/^\s+/,tt=/\s/,te=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,tn=/\{\n\/\* \[wrapped with (.+)\] \*/,tr=/,? & /,ti=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ta=/[()=,{}\[\]\/\s]/,to=/\\(\\)?/g,tl=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ts=/\w*$/,tu=/^[-+]0x[0-9a-f]+$/i,tc=/^0b[01]+$/i,tf=/^\[object .+?Constructor\]$/,th=/^0o[0-7]+$/i,td=/^(?:0|[1-9]\d*)$/,tp=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ty=/($^)/,tg=/['\n\r\u2028\u2029\\]/g,tv="\\ud800-\\udfff",tm="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",tb="\\u2700-\\u27bf",tx="a-z\\xdf-\\xf6\\xf8-\\xff",tO="A-Z\\xc0-\\xd6\\xd8-\\xde",tw="\\ufe0e\\ufe0f",tk="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\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",t_="['’]",tM="["+tk+"]",tE="["+tm+"]",tA="["+tx+"]",tS="[^"+tv+tk+"\\d+"+tb+tx+tO+"]",tj="\\ud83c[\\udffb-\\udfff]",tP="[^"+tv+"]",tT="(?:\\ud83c[\\udde6-\\uddff]){2}",tC="[\\ud800-\\udbff][\\udc00-\\udfff]",tN="["+tO+"]",tL="\\u200d",tI="(?:"+tA+"|"+tS+")",tR="(?:"+tN+"|"+tS+")",tD="(?:"+t_+"(?:d|ll|m|re|s|t|ve))?",tB="(?:"+t_+"(?:D|LL|M|RE|S|T|VE))?",tF="(?:"+tE+"|"+tj+")?",tz="["+tw+"]?",t$="(?:"+tL+"(?:"+[tP,tT,tC].join("|")+")"+tz+tF+")*",tW=tz+tF+t$,tG="(?:"+["["+tb+"]",tT,tC].join("|")+")"+tW,tq="(?:"+[tP+tE+"?",tE,tT,tC,"["+tv+"]"].join("|")+")",tH=RegExp(t_,"g"),tY=RegExp(tE,"g"),tV=RegExp(tj+"(?="+tj+")|"+tq+tW,"g"),tU=RegExp([tN+"?"+tA+"+"+tD+"(?="+[tM,tN,"$"].join("|")+")",tR+"+"+tB+"(?="+[tM,tN+tI,"$"].join("|")+")",tN+"?"+tI+"+"+tD,tN+"+"+tB,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])|\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])|\\d+",tG].join("|"),"g"),tX=RegExp("["+tL+tv+tm+tw+"]"),tK=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,tZ=["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"],tQ=-1,tJ={};tJ[j]=tJ[P]=tJ[T]=tJ[C]=tJ[N]=tJ[L]=tJ[I]=tJ[R]=tJ[D]=!0,tJ[c]=tJ[f]=tJ[A]=tJ[h]=tJ[S]=tJ[d]=tJ[p]=tJ[y]=tJ[v]=tJ[b]=tJ[x]=tJ[w]=tJ[k]=tJ[_]=tJ[E]=!1;var t0={};t0[c]=t0[f]=t0[A]=t0[S]=t0[h]=t0[d]=t0[j]=t0[P]=t0[T]=t0[C]=t0[N]=t0[v]=t0[b]=t0[x]=t0[w]=t0[k]=t0[_]=t0[M]=t0[L]=t0[I]=t0[R]=t0[D]=!0,t0[p]=t0[y]=t0[E]=!1;var t1={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},t2=parseFloat,t5=parseInt,t3="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,t4="object"==typeof self&&self&&self.Object===Object&&self,t6=t3||t4||Function("return this")(),t8=e&&!e.nodeType&&e,t9=t8&&t&&!t.nodeType&&t,t7=t9&&t9.exports===t8,et=t7&&t3.process,ee=function(){try{var t=t9&&t9.require&&t9.require("util").types;if(t)return t;return et&&et.binding&&et.binding("util")}catch(t){}}(),en=ee&&ee.isArrayBuffer,er=ee&&ee.isDate,ei=ee&&ee.isMap,ea=ee&&ee.isRegExp,eo=ee&&ee.isSet,el=ee&&ee.isTypedArray;function es(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function eu(t,e,n,r){for(var i=-1,a=null==t?0:t.length;++i<a;){var o=t[i];e(r,o,n(o),t)}return r}function ec(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}function ef(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function eh(t,e){for(var n=-1,r=null==t?0:t.length,i=0,a=[];++n<r;){var o=t[n];e(o,n,t)&&(a[i++]=o)}return a}function ed(t,e){return!!(null==t?0:t.length)&&ek(t,e,0)>-1}function ep(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}function ey(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}function eg(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function ev(t,e,n,r){var i=-1,a=null==t?0:t.length;for(r&&a&&(n=t[++i]);++i<a;)n=e(n,t[i],i,t);return n}function em(t,e,n,r){var i=null==t?0:t.length;for(r&&i&&(n=t[--i]);i--;)n=e(n,t[i],i,t);return n}function eb(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var ex=eA("length");function eO(t,e,n){var r;return n(t,function(t,n,i){if(e(t,n,i))return r=n,!1}),r}function ew(t,e,n,r){for(var i=t.length,a=n+(r?1:-1);r?a--:++a<i;)if(e(t[a],a,t))return a;return -1}function ek(t,e,n){return e==e?function(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return -1}(t,e,n):ew(t,eM,n)}function e_(t,e,n,r){for(var i=n-1,a=t.length;++i<a;)if(r(t[i],e))return i;return -1}function eM(t){return t!=t}function eE(t,e){var n=null==t?0:t.length;return n?eP(t,e)/n:s}function eA(t){return function(e){return null==e?r:e[t]}}function eS(t){return function(e){return null==t?r:t[e]}}function ej(t,e,n,r,i){return i(t,function(t,i,a){n=r?(r=!1,t):e(n,t,i,a)}),n}function eP(t,e){for(var n,i=-1,a=t.length;++i<a;){var o=e(t[i]);r!==o&&(n=r===n?o:n+o)}return n}function eT(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function eC(t){return t?t.slice(0,eU(t)+1).replace(J,""):t}function eN(t){return function(e){return t(e)}}function eL(t,e){return ey(e,function(e){return t[e]})}function eI(t,e){return t.has(e)}function eR(t,e){for(var n=-1,r=t.length;++n<r&&ek(e,t[n],0)>-1;);return n}function eD(t,e){for(var n=t.length;n--&&ek(e,t[n],0)>-1;);return n}var eB=eS({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),eF=eS({"&":"&","<":"<",">":">",'"':""","'":"'"});function ez(t){return"\\"+t1[t]}function e$(t){return tX.test(t)}function eW(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n}function eG(t,e){return function(n){return t(e(n))}}function eq(t,e){for(var n=-1,r=t.length,i=0,a=[];++n<r;){var l=t[n];(l===e||l===o)&&(t[n]=o,a[i++]=n)}return a}function eH(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}function eY(t){return e$(t)?function(t){for(var e=tV.lastIndex=0;tV.test(t);)++e;return e}(t):ex(t)}function eV(t){return e$(t)?t.match(tV)||[]:t.split("")}function eU(t){for(var e=t.length;e--&&tt.test(t.charAt(e)););return e}var eX=eS({"&":"&","<":"<",">":">",""":'"',"'":"'"}),eK=function t(e){var n,tt,tv,tm,tb=(e=null==e?t6:eK.defaults(t6.Object(),e,eK.pick(t6,tZ))).Array,tx=e.Date,tO=e.Error,tw=e.Function,tk=e.Math,t_=e.Object,tM=e.RegExp,tE=e.String,tA=e.TypeError,tS=tb.prototype,tj=tw.prototype,tP=t_.prototype,tT=e["__core-js_shared__"],tC=tj.toString,tN=tP.hasOwnProperty,tL=0,tI=(n=/[^.]+$/.exec(tT&&tT.keys&&tT.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",tR=tP.toString,tD=tC.call(t_),tB=t6._,tF=tM("^"+tC.call(tN).replace(Z,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),tz=t7?e.Buffer:r,t$=e.Symbol,tW=e.Uint8Array,tG=tz?tz.allocUnsafe:r,tq=eG(t_.getPrototypeOf,t_),tV=t_.create,tX=tP.propertyIsEnumerable,t1=tS.splice,t3=t$?t$.isConcatSpreadable:r,t4=t$?t$.iterator:r,t8=t$?t$.toStringTag:r,t9=function(){try{var t=iy(t_,"defineProperty");return t({},"",{}),t}catch(t){}}(),et=e.clearTimeout!==t6.clearTimeout&&e.clearTimeout,ee=tx&&tx.now!==t6.Date.now&&tx.now,ex=e.setTimeout!==t6.setTimeout&&e.setTimeout,eS=tk.ceil,eZ=tk.floor,eQ=t_.getOwnPropertySymbols,eJ=tz?tz.isBuffer:r,e0=e.isFinite,e1=tS.join,e2=eG(t_.keys,t_),e5=tk.max,e3=tk.min,e4=tx.now,e6=e.parseInt,e8=tk.random,e9=tS.reverse,e7=iy(e,"DataView"),nt=iy(e,"Map"),ne=iy(e,"Promise"),nn=iy(e,"Set"),nr=iy(e,"WeakMap"),ni=iy(t_,"create"),na=nr&&new nr,no={},nl=iz(e7),ns=iz(nt),nu=iz(ne),nc=iz(nn),nf=iz(nr),nh=t$?t$.prototype:r,nd=nh?nh.valueOf:r,np=nh?nh.toString:r;function ny(t){if(aX(t)&&!aB(t)&&!(t instanceof nb)){if(t instanceof nm)return t;if(tN.call(t,"__wrapped__"))return i$(t)}return new nm(t)}var ng=function(){function t(){}return function(e){if(!aU(e))return{};if(tV)return tV(e);t.prototype=e;var n=new t;return t.prototype=r,n}}();function nv(){}function nm(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=r}function nb(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=0xffffffff,this.__views__=[]}function nx(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function nO(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function nw(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function nk(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new nw;++e<n;)this.add(t[e])}function n_(t){var e=this.__data__=new nO(t);this.size=e.size}function nM(t,e){var n=aB(t),r=!n&&aD(t),i=!n&&!r&&aW(t),a=!n&&!r&&!i&&a5(t),o=n||r||i||a,l=o?eT(t.length,tE):[],s=l.length;for(var u in t)(e||tN.call(t,u))&&!(o&&("length"==u||i&&("offset"==u||"parent"==u)||a&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||iw(u,s)))&&l.push(u);return l}function nE(t){var e=t.length;return e?t[rc(0,e-1)]:r}ny.templateSettings={escape:H,evaluate:Y,interpolate:V,variable:"",imports:{_:ny}},ny.prototype=nv.prototype,ny.prototype.constructor=ny,nm.prototype=ng(nv.prototype),nm.prototype.constructor=nm,nb.prototype=ng(nv.prototype),nb.prototype.constructor=nb,nx.prototype.clear=function(){this.__data__=ni?ni(null):{},this.size=0},nx.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=!!e,e},nx.prototype.get=function(t){var e=this.__data__;if(ni){var n=e[t];return n===a?r:n}return tN.call(e,t)?e[t]:r},nx.prototype.has=function(t){var e=this.__data__;return ni?e[t]!==r:tN.call(e,t)},nx.prototype.set=function(t,e){var n=this.__data__;return this.size+=+!this.has(t),n[t]=ni&&r===e?a:e,this},nO.prototype.clear=function(){this.__data__=[],this.size=0},nO.prototype.delete=function(t){var e=this.__data__,n=nj(e,t);return!(n<0)&&(n==e.length-1?e.pop():t1.call(e,n,1),--this.size,!0)},nO.prototype.get=function(t){var e=this.__data__,n=nj(e,t);return n<0?r:e[n][1]},nO.prototype.has=function(t){return nj(this.__data__,t)>-1},nO.prototype.set=function(t,e){var n=this.__data__,r=nj(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},nw.prototype.clear=function(){this.size=0,this.__data__={hash:new nx,map:new(nt||nO),string:new nx}},nw.prototype.delete=function(t){var e=id(this,t).delete(t);return this.size-=!!e,e},nw.prototype.get=function(t){return id(this,t).get(t)},nw.prototype.has=function(t){return id(this,t).has(t)},nw.prototype.set=function(t,e){var n=id(this,t),r=n.size;return n.set(t,e),this.size+=+(n.size!=r),this},nk.prototype.add=nk.prototype.push=function(t){return this.__data__.set(t,a),this},nk.prototype.has=function(t){return this.__data__.has(t)};function nA(t,e,n){(r===n||aL(t[e],n))&&(r!==n||e in t)||nC(t,e,n)}function nS(t,e,n){var i=t[e];tN.call(t,e)&&aL(i,n)&&(r!==n||e in t)||nC(t,e,n)}function nj(t,e){for(var n=t.length;n--;)if(aL(t[n][0],e))return n;return -1}function nP(t,e,n,r){return nF(t,function(t,i,a){e(r,t,n(t),a)}),r}function nT(t,e){return t&&rW(e,oy(e),t)}function nC(t,e,n){"__proto__"==e&&t9?t9(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function nN(t,e){for(var n=-1,i=e.length,a=tb(i),o=null==t;++n<i;)a[n]=o?r:oc(t,e[n]);return a}function nL(t,e,n){return t==t&&(r!==n&&(t=t<=n?t:n),r!==e&&(t=t>=e?t:e)),t}function nI(t,e,n,i,a,o){var l,s=1&e,u=2&e,f=4&e;if(n&&(l=a?n(t,i,a,o):n(t)),r!==l)return l;if(!aU(t))return t;var p=aB(t);if(p){if(E=(O=t).length,B=new O.constructor(E),E&&"string"==typeof O[0]&&tN.call(O,"index")&&(B.index=O.index,B.input=O.input),l=B,!s)return r$(t,l)}else{var O,E,B,F,z,$,W,G,q=im(t),H=q==y||q==g;if(aW(t))return rI(t,s);if(q==x||q==c||H&&!a){if(l=u||H?{}:ix(t),!s){return u?(F=t,z=(G=l)&&rW(t,og(t),G),rW(F,iv(F),z)):($=t,W=nT(l,t),rW($,ig($),W))}}else{if(!t0[q])return a?t:{};l=function(t,e,n){var r,i,a=t.constructor;switch(e){case A:return rR(t);case h:case d:return new a(+t);case S:return r=n?rR(t.buffer):t.buffer,new t.constructor(r,t.byteOffset,t.byteLength);case j:case P:case T:case C:case N:case L:case I:case R:case D:return rD(t,n);case v:return new a;case b:case _:return new a(t);case w:return(i=new t.constructor(t.source,ts.exec(t))).lastIndex=t.lastIndex,i;case k:return new a;case M:return nd?t_(nd.call(t)):{}}}(t,q,s)}}o||(o=new n_);var Y=o.get(t);if(Y)return Y;o.set(t,l),a0(t)?t.forEach(function(r){l.add(nI(r,e,n,r,t,o))}):aK(t)&&t.forEach(function(r,i){l.set(i,nI(r,e,n,i,t,o))});var V=f?u?il:io:u?og:oy,U=p?r:V(t);return ec(U||t,function(r,i){U&&(r=t[i=r]),nS(l,i,nI(r,e,n,i,t,o))}),l}function nR(t,e,n){var i=n.length;if(null==t)return!i;for(t=t_(t);i--;){var a=n[i],o=e[a],l=t[a];if(r===l&&!(a in t)||!o(l))return!1}return!0}function nD(t,e,n){if("function"!=typeof t)throw new tA(i);return iN(function(){t.apply(r,n)},e)}function nB(t,e,n,r){var i=-1,a=ed,o=!0,l=t.length,s=[],u=e.length;if(!l)return s;n&&(e=ey(e,eN(n))),r?(a=ep,o=!1):e.length>=200&&(a=eI,o=!1,e=new nk(e));n:for(;++i<l;){var c=t[i],f=null==n?c:n(c);if(c=r||0!==c?c:0,o&&f==f){for(var h=u;h--;)if(e[h]===f)continue n;s.push(c)}else a(e,f,r)||s.push(c)}return s}n_.prototype.clear=function(){this.__data__=new nO,this.size=0},n_.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},n_.prototype.get=function(t){return this.__data__.get(t)},n_.prototype.has=function(t){return this.__data__.has(t)},n_.prototype.set=function(t,e){var n=this.__data__;if(n instanceof nO){var r=n.__data__;if(!nt||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new nw(r)}return n.set(t,e),this.size=n.size,this};var nF=rH(nV),nz=rH(nU,!0);function n$(t,e){var n=!0;return nF(t,function(t,r,i){return n=!!e(t,r,i)}),n}function nW(t,e,n){for(var i=-1,a=t.length;++i<a;){var o=t[i],l=e(o);if(null!=l&&(r===s?l==l&&!a2(l):n(l,s)))var s=l,u=o}return u}function nG(t,e){var n=[];return nF(t,function(t,r,i){e(t,r,i)&&n.push(t)}),n}function nq(t,e,n,r,i){var a=-1,o=t.length;for(n||(n=iO),i||(i=[]);++a<o;){var l=t[a];e>0&&n(l)?e>1?nq(l,e-1,n,r,i):eg(i,l):r||(i[i.length]=l)}return i}var nH=rY(),nY=rY(!0);function nV(t,e){return t&&nH(t,e,oy)}function nU(t,e){return t&&nY(t,e,oy)}function nX(t,e){return eh(e,function(e){return aH(t[e])})}function nK(t,e){e=rC(e,t);for(var n=0,i=e.length;null!=t&&n<i;)t=t[iF(e[n++])];return n&&n==i?t:r}function nZ(t,e,n){var r=e(t);return aB(t)?r:eg(r,n(t))}function nQ(t){var e;return null==t?r===t?"[object Undefined]":"[object Null]":t8&&t8 in t_(t)?function(t){var e=tN.call(t,t8),n=t[t8];try{t[t8]=r;var i=!0}catch(t){}var a=tR.call(t);return i&&(e?t[t8]=n:delete t[t8]),a}(t):(e=t,tR.call(e))}function nJ(t,e){return t>e}function n0(t,e){return null!=t&&tN.call(t,e)}function n1(t,e){return null!=t&&e in t_(t)}function n2(t,e,n){for(var i=n?ep:ed,a=t[0].length,o=t.length,l=o,s=tb(o),u=1/0,c=[];l--;){var f=t[l];l&&e&&(f=ey(f,eN(e))),u=e3(f.length,u),s[l]=!n&&(e||a>=120&&f.length>=120)?new nk(l&&f):r}f=t[0];var h=-1,d=s[0];n:for(;++h<a&&c.length<u;){var p=f[h],y=e?e(p):p;if(p=n||0!==p?p:0,!(d?eI(d,y):i(c,y,n))){for(l=o;--l;){var g=s[l];if(!(g?eI(g,y):i(t[l],y,n)))continue n}d&&d.push(y),c.push(p)}}return c}function n5(t,e,n){e=rC(e,t);var i=null==(t=iP(t,e))?t:t[iF(iQ(e))];return null==i?r:es(i,t,n)}function n3(t){return aX(t)&&nQ(t)==c}function n4(t,e,n,i,a){return t===e||(null!=t&&null!=e&&(aX(t)||aX(e))?function(t,e,n,i,a,o){var l=aB(t),s=aB(e),u=l?f:im(t),y=s?f:im(e);u=u==c?x:u,y=y==c?x:y;var g=u==x,O=y==x,E=u==y;if(E&&aW(t)){if(!aW(e))return!1;l=!0,g=!1}if(E&&!g)return o||(o=new n_),l||a5(t)?ii(t,e,n,i,a,o):function(t,e,n,r,i,a,o){switch(n){case S:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)break;t=t.buffer,e=e.buffer;case A:if(t.byteLength!=e.byteLength||!a(new tW(t),new tW(e)))break;return!0;case h:case d:case b:return aL(+t,+e);case p:return t.name==e.name&&t.message==e.message;case w:case _:return t==e+"";case v:var l=eW;case k:var s=1&r;if(l||(l=eH),t.size!=e.size&&!s)break;var u=o.get(t);if(u)return u==e;r|=2,o.set(t,e);var c=ii(l(t),l(e),r,i,a,o);return o.delete(t),c;case M:if(nd)return nd.call(t)==nd.call(e)}return!1}(t,e,u,n,i,a,o);if(!(1&n)){var j=g&&tN.call(t,"__wrapped__"),P=O&&tN.call(e,"__wrapped__");if(j||P){var T=j?t.value():t,C=P?e.value():e;return o||(o=new n_),a(T,C,n,i,o)}}return!!E&&(o||(o=new n_),function(t,e,n,i,a,o){var l=1&n,s=io(t),u=s.length;if(u!=io(e).length&&!l)return!1;for(var c=u;c--;){var f=s[c];if(!(l?f in e:tN.call(e,f)))return!1}var h=o.get(t),d=o.get(e);if(h&&d)return h==e&&d==t;var p=!0;o.set(t,e),o.set(e,t);for(var y=l;++c<u;){var g=t[f=s[c]],v=e[f];if(i)var b=l?i(v,g,f,e,t,o):i(g,v,f,t,e,o);if(!(r===b?g===v||a(g,v,n,i,o):b)){p=!1;break}y||(y="constructor"==f)}if(p&&!y){var x=t.constructor,O=e.constructor;x!=O&&"constructor"in t&&"constructor"in e&&!("function"==typeof x&&x instanceof x&&"function"==typeof O&&O instanceof O)&&(p=!1)}return o.delete(t),o.delete(e),p}(t,e,n,i,a,o))}(t,e,n,i,n4,a):t!=t&&e!=e)}function n6(t,e,n,i){var a=n.length,o=a,l=!i;if(null==t)return!o;for(t=t_(t);a--;){var s=n[a];if(l&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++a<o;){var u=(s=n[a])[0],c=t[u],f=s[1];if(l&&s[2]){if(r===c&&!(u in t))return!1}else{var h=new n_;if(i)var d=i(c,f,u,t,e,h);if(!(r===d?n4(f,c,3,i,h):d))return!1}}return!0}function n8(t){var e;return!(!aU(t)||(e=t,tI&&tI in e))&&(aH(t)?tF:tf).test(iz(t))}function n9(t){return"function"==typeof t?t:null==t?o$:"object"==typeof t?aB(t)?rr(t[0],t[1]):rn(t):oK(t)}function n7(t){if(!iA(t))return e2(t);var e=[];for(var n in t_(t))tN.call(t,n)&&"constructor"!=n&&e.push(n);return e}function rt(t,e){return t<e}function re(t,e){var n=-1,r=az(t)?tb(t.length):[];return nF(t,function(t,i,a){r[++n]=e(t,i,a)}),r}function rn(t){var e=ip(t);return 1==e.length&&e[0][2]?iS(e[0][0],e[0][1]):function(n){return n===t||n6(n,t,e)}}function rr(t,e){var n;return i_(t)&&(n=e)==n&&!aU(n)?iS(iF(t),e):function(n){var i=oc(n,t);return r===i&&i===e?of(n,t):n4(e,i,3)}}function ri(t,e,n,i,a){t!==e&&nH(e,function(o,l){if(a||(a=new n_),aU(o))!function(t,e,n,i,a,o,l){var s=iT(t,n),u=iT(e,n),c=l.get(u);if(c)return nA(t,n,c);var f=o?o(s,u,n+"",t,e,l):r,h=r===f;if(h){var d=aB(u),p=!d&&aW(u),y=!d&&!p&&a5(u);f=u,d||p||y?aB(s)?f=s:a$(s)?f=r$(s):p?(h=!1,f=rI(u,!0)):y?(h=!1,f=rD(u,!0)):f=[]:aQ(u)||aD(u)?(f=s,aD(s)?f=oe(s):(!aU(s)||aH(s))&&(f=ix(u))):h=!1}h&&(l.set(u,f),a(f,u,i,o,l),l.delete(u)),nA(t,n,f)}(t,e,l,n,ri,i,a);else{var s=i?i(iT(t,l),o,l+"",t,e,a):r;r===s&&(s=o),nA(t,l,s)}},og)}function ra(t,e){var n=t.length;if(n)return iw(e+=e<0?n:0,n)?t[e]:r}function ro(t,e,n){e=e.length?ey(e,function(t){return aB(t)?function(e){return nK(e,1===t.length?t[0]:t)}:t}):[o$];var r=-1;e=ey(e,eN(ih()));var i=re(t,function(t,n,i){return{criteria:ey(e,function(e){return e(t)}),index:++r,value:t}}),a=i.length;for(i.sort(function(t,e){return function(t,e,n){for(var r=-1,i=t.criteria,a=e.criteria,o=i.length,l=n.length;++r<o;){var s=rB(i[r],a[r]);if(s){if(r>=l)return s;return s*("desc"==n[r]?-1:1)}}return t.index-e.index}(t,e,n)});a--;)i[a]=i[a].value;return i}function rl(t,e,n){for(var r=-1,i=e.length,a={};++r<i;){var o=e[r],l=nK(t,o);n(l,o)&&rd(a,rC(o,t),l)}return a}function rs(t,e,n,r){var i=r?e_:ek,a=-1,o=e.length,l=t;for(t===e&&(e=r$(e)),n&&(l=ey(t,eN(n)));++a<o;)for(var s=0,u=e[a],c=n?n(u):u;(s=i(l,c,s,r))>-1;)l!==t&&t1.call(l,s,1),t1.call(t,s,1);return t}function ru(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==a){var a=i;iw(i)?t1.call(t,i,1):r_(t,i)}}return t}function rc(t,e){return t+eZ(e8()*(e-t+1))}function rf(t,e){var n="";if(!t||e<1||e>0x1fffffffffffff)return n;do e%2&&(n+=t),(e=eZ(e/2))&&(t+=t);while(e);return n}function rh(t,e){return iL(ij(t,e,o$),t+"")}function rd(t,e,n,i){if(!aU(t))return t;e=rC(e,t);for(var a=-1,o=e.length,l=o-1,s=t;null!=s&&++a<o;){var u=iF(e[a]),c=n;if("__proto__"===u||"constructor"===u||"prototype"===u)break;if(a!=l){var f=s[u];c=i?i(f,u,s):r,r===c&&(c=aU(f)?f:iw(e[a+1])?[]:{})}nS(s,u,c),s=s[u]}return t}var rp=na?function(t,e){return na.set(t,e),t}:o$,ry=t9?function(t,e){return t9(t,"toString",{configurable:!0,enumerable:!1,value:oB(e),writable:!0})}:o$;function rg(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(n=n>i?i:n)<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var a=tb(i);++r<i;)a[r]=t[r+e];return a}function rv(t,e){var n;return nF(t,function(t,r,i){return!(n=e(t,r,i))}),!!n}function rm(t,e,n){var r=0,i=null==t?r:t.length;if("number"==typeof e&&e==e&&i<=0x7fffffff){for(;r<i;){var a=r+i>>>1,o=t[a];null!==o&&!a2(o)&&(n?o<=e:o<e)?r=a+1:i=a}return i}return rb(t,e,o$,n)}function rb(t,e,n,i){var a=0,o=null==t?0:t.length;if(0===o)return 0;for(var l=(e=n(e))!=e,s=null===e,u=a2(e),c=r===e;a<o;){var f=eZ((a+o)/2),h=n(t[f]),d=r!==h,p=null===h,y=h==h,g=a2(h);if(l)var v=i||y;else v=c?y&&(i||d):s?y&&d&&(i||!p):u?y&&d&&!p&&(i||!g):!p&&!g&&(i?h<=e:h<e);v?a=f+1:o=f}return e3(o,0xfffffffe)}function rx(t,e){for(var n=-1,r=t.length,i=0,a=[];++n<r;){var o=t[n],l=e?e(o):o;if(!n||!aL(l,s)){var s=l;a[i++]=0===o?0:o}}return a}function rO(t){return"number"==typeof t?t:a2(t)?s:+t}function rw(t){if("string"==typeof t)return t;if(aB(t))return ey(t,rw)+"";if(a2(t))return np?np.call(t):"";var e=t+"";return"0"==e&&1/t==-l?"-0":e}function rk(t,e,n){var r=-1,i=ed,a=t.length,o=!0,l=[],s=l;if(n)o=!1,i=ep;else if(a>=200){var u=e?null:r8(t);if(u)return eH(u);o=!1,i=eI,s=new nk}else s=e?[]:l;n:for(;++r<a;){var c=t[r],f=e?e(c):c;if(c=n||0!==c?c:0,o&&f==f){for(var h=s.length;h--;)if(s[h]===f)continue n;e&&s.push(f),l.push(c)}else i(s,f,n)||(s!==l&&s.push(f),l.push(c))}return l}function r_(t,e){return e=rC(e,t),null==(t=iP(t,e))||delete t[iF(iQ(e))]}function rM(t,e,n,r){return rd(t,e,n(nK(t,e)),r)}function rE(t,e,n,r){for(var i=t.length,a=r?i:-1;(r?a--:++a<i)&&e(t[a],a,t););return n?rg(t,r?0:a,r?a+1:i):rg(t,r?a+1:0,r?i:a)}function rA(t,e){var n=t;return n instanceof nb&&(n=n.value()),ev(e,function(t,e){return e.func.apply(e.thisArg,eg([t],e.args))},n)}function rS(t,e,n){var r=t.length;if(r<2)return r?rk(t[0]):[];for(var i=-1,a=tb(r);++i<r;)for(var o=t[i],l=-1;++l<r;)l!=i&&(a[i]=nB(a[i]||o,t[l],e,n));return rk(nq(a,1),e,n)}function rj(t,e,n){for(var i=-1,a=t.length,o=e.length,l={};++i<a;){var s=i<o?e[i]:r;n(l,t[i],s)}return l}function rP(t){return a$(t)?t:[]}function rT(t){return"function"==typeof t?t:o$}function rC(t,e){return aB(t)?t:i_(t,e)?[t]:iB(on(t))}function rN(t,e,n){var i=t.length;return n=r===n?i:n,!e&&n>=i?t:rg(t,e,n)}var rL=et||function(t){return t6.clearTimeout(t)};function rI(t,e){if(e)return t.slice();var n=t.length,r=tG?tG(n):new t.constructor(n);return t.copy(r),r}function rR(t){var e=new t.constructor(t.byteLength);return new tW(e).set(new tW(t)),e}function rD(t,e){var n=e?rR(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function rB(t,e){if(t!==e){var n=r!==t,i=null===t,a=t==t,o=a2(t),l=r!==e,s=null===e,u=e==e,c=a2(e);if(!s&&!c&&!o&&t>e||o&&l&&u&&!s&&!c||i&&l&&u||!n&&u||!a)return 1;if(!i&&!o&&!c&&t<e||c&&n&&a&&!i&&!o||s&&n&&a||!l&&a||!u)return -1}return 0}function rF(t,e,n,r){for(var i=-1,a=t.length,o=n.length,l=-1,s=e.length,u=e5(a-o,0),c=tb(s+u),f=!r;++l<s;)c[l]=e[l];for(;++i<o;)(f||i<a)&&(c[n[i]]=t[i]);for(;u--;)c[l++]=t[i++];return c}function rz(t,e,n,r){for(var i=-1,a=t.length,o=-1,l=n.length,s=-1,u=e.length,c=e5(a-l,0),f=tb(c+u),h=!r;++i<c;)f[i]=t[i];for(var d=i;++s<u;)f[d+s]=e[s];for(;++o<l;)(h||i<a)&&(f[d+n[o]]=t[i++]);return f}function r$(t,e){var n=-1,r=t.length;for(e||(e=tb(r));++n<r;)e[n]=t[n];return e}function rW(t,e,n,i){var a=!n;n||(n={});for(var o=-1,l=e.length;++o<l;){var s=e[o],u=i?i(n[s],t[s],s,n,t):r;r===u&&(u=t[s]),a?nC(n,s,u):nS(n,s,u)}return n}function rG(t,e){return function(n,r){var i=aB(n)?eu:nP,a=e?e():{};return i(n,t,ih(r,2),a)}}function rq(t){return rh(function(e,n){var i=-1,a=n.length,o=a>1?n[a-1]:r,l=a>2?n[2]:r;for(o=t.length>3&&"function"==typeof o?(a--,o):r,l&&ik(n[0],n[1],l)&&(o=a<3?r:o,a=1),e=t_(e);++i<a;){var s=n[i];s&&t(e,s,i,o)}return e})}function rH(t,e){return function(n,r){if(null==n)return n;if(!az(n))return t(n,r);for(var i=n.length,a=e?i:-1,o=t_(n);(e?a--:++a<i)&&!1!==r(o[a],a,o););return n}}function rY(t){return function(e,n,r){for(var i=-1,a=t_(e),o=r(e),l=o.length;l--;){var s=o[t?l:++i];if(!1===n(a[s],s,a))break}return e}}function rV(t){return function(e){var n=e$(e=on(e))?eV(e):r,i=n?n[0]:e.charAt(0),a=n?rN(n,1).join(""):e.slice(1);return i[t]()+a}}function rU(t){return function(e){return ev(oI(oA(e).replace(tH,"")),t,"")}}function rX(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=ng(t.prototype),r=t.apply(n,e);return aU(r)?r:n}}function rK(t){return function(e,n,i){var a=t_(e);if(!az(e)){var o=ih(n,3);e=oy(e),n=function(t){return o(a[t],t,a)}}var l=t(e,n,i);return l>-1?a[o?e[l]:l]:r}}function rZ(t){return ia(function(e){var n=e.length,a=n,o=nm.prototype.thru;for(t&&e.reverse();a--;){var l=e[a];if("function"!=typeof l)throw new tA(i);if(o&&!s&&"wrapper"==iu(l))var s=new nm([],!0)}for(a=s?a:n;++a<n;){var u=iu(l=e[a]),c="wrapper"==u?is(l):r;s=c&&iM(c[0])&&424==c[1]&&!c[4].length&&1==c[9]?s[iu(c[0])].apply(s,c[3]):1==l.length&&iM(l)?s[u]():s.thru(l)}return function(){var t=arguments,r=t[0];if(s&&1==t.length&&aB(r))return s.plant(r).value();for(var i=0,a=n?e[i].apply(this,t):r;++i<n;)a=e[i].call(this,a);return a}})}function rQ(t,e,n,i,a,o,l,s,u,c){var f=128&e,h=1&e,d=2&e,p=24&e,y=512&e,g=d?r:rX(t);function v(){for(var b=arguments.length,x=tb(b),O=b;O--;)x[O]=arguments[O];if(p)var w=ic(v),k=function(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}(x,w);if(i&&(x=rF(x,i,a,p)),o&&(x=rz(x,o,l,p)),b-=k,p&&b<c){var _=eq(x,w);return r4(t,e,rQ,v.placeholder,n,x,_,s,u,c-b)}var M=h?n:this,E=d?M[t]:t;return b=x.length,s?x=function(t,e){for(var n=t.length,i=e3(e.length,n),a=r$(t);i--;){var o=e[i];t[i]=iw(o,n)?a[o]:r}return t}(x,s):y&&b>1&&x.reverse(),f&&u<b&&(x.length=u),this&&this!==t6&&this instanceof v&&(E=g||rX(E)),E.apply(M,x)}return v}function rJ(t,e){return function(n,r){var i,a;return i=e(r),a={},nV(n,function(e,n,r){t(a,i(e),n,r)}),a}}function r0(t,e){return function(n,i){var a;if(r===n&&r===i)return e;if(r!==n&&(a=n),r!==i){if(r===a)return i;"string"==typeof n||"string"==typeof i?(n=rw(n),i=rw(i)):(n=rO(n),i=rO(i)),a=t(n,i)}return a}}function r1(t){return ia(function(e){return e=ey(e,eN(ih())),rh(function(n){var r=this;return t(e,function(t){return es(t,r,n)})})})}function r2(t,e){var n=(e=r===e?" ":rw(e)).length;if(n<2)return n?rf(e,t):e;var i=rf(e,eS(t/eY(e)));return e$(e)?rN(eV(i),0,t).join(""):i.slice(0,t)}function r5(t){return function(e,n,i){i&&"number"!=typeof i&&ik(e,n,i)&&(n=i=r),e=a8(e),r===n?(n=e,e=0):n=a8(n),i=r===i?e<n?1:-1:a8(i);for(var a=e,o=n,l=i,s=-1,u=e5(eS((o-a)/(l||1)),0),c=tb(u);u--;)c[t?u:++s]=a,a+=l;return c}}function r3(t){return function(e,n){return("string"!=typeof e||"string"!=typeof n)&&(e=ot(e),n=ot(n)),t(e,n)}}function r4(t,e,n,i,a,o,l,s,u,c){var f=8&e,h=f?l:r,d=f?r:l,p=f?o:r,y=f?r:o;e|=f?32:64,4&(e&=~(f?64:32))||(e&=-4);var g=[t,e,a,p,h,y,d,s,u,c],v=n.apply(r,g);return iM(t)&&iC(v,g),v.placeholder=i,iI(v,t,e)}function r6(t){var e=tk[t];return function(t,n){if(t=ot(t),(n=null==n?0:e3(a9(n),292))&&e0(t)){var r=(on(t)+"e").split("e");return+((r=(on(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(r[1]-n))}return e(t)}}var r8=nn&&1/eH(new nn([,-0]))[1]==l?function(t){return new nn(t)}:oY;function r9(t){return function(e){var n,r,i=im(e);return i==v?eW(e):i==k?(n=-1,r=Array(e.size),e.forEach(function(t){r[++n]=[t,t]}),r):ey(t(e),function(t){return[t,e[t]]})}}function r7(t,e,n,a,l,s,u,c){var f=2&e;if(!f&&"function"!=typeof t)throw new tA(i);var h=a?a.length:0;if(h||(e&=-97,a=l=r),u=r===u?u:e5(a9(u),0),c=r===c?c:a9(c),h-=l?l.length:0,64&e){var d=a,p=l;a=l=r}var y=f?r:is(t),g=[t,e,n,a,l,d,p,s,u,c];if(y&&function(t,e){var n=t[1],r=e[1],i=n|r,a=i<131,l=128==r&&8==n||128==r&&256==n&&t[7].length<=e[8]||384==r&&e[7].length<=e[8]&&8==n;if(a||l){1&r&&(t[2]=e[2],i|=1&n?0:4);var s=e[3];if(s){var u=t[3];t[3]=u?rF(u,s,e[4]):s,t[4]=u?eq(t[3],o):e[4]}(s=e[5])&&(u=t[5],t[5]=u?rz(u,s,e[6]):s,t[6]=u?eq(t[5],o):e[6]),(s=e[7])&&(t[7]=s),128&r&&(t[8]=null==t[8]?e[8]:e3(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=i}}(g,y),t=g[0],e=g[1],n=g[2],a=g[3],l=g[4],(c=g[9]=g[9]===r?f?0:t.length:e5(g[9]-h,0))||!(24&e)||(e&=-25),e&&1!=e)8==e||16==e?j=function(t,e,n){var i=rX(t);function a(){for(var o=arguments.length,l=tb(o),s=o,u=ic(a);s--;)l[s]=arguments[s];var c=o<3&&l[0]!==u&&l[o-1]!==u?[]:eq(l,u);return(o-=c.length)<n?r4(t,e,rQ,a.placeholder,r,l,c,r,r,n-o):es(this&&this!==t6&&this instanceof a?i:t,this,l)}return a}(t,e,c):32!=e&&33!=e||l.length?j=rQ.apply(r,g):(v=t,b=e,x=n,O=a,w=1&b,k=rX(v),j=function t(){for(var e=-1,n=arguments.length,r=-1,i=O.length,a=tb(i+n),o=this&&this!==t6&&this instanceof t?k:v;++r<i;)a[r]=O[r];for(;n--;)a[r++]=arguments[++e];return es(o,w?x:this,a)});else var v,b,x,O,w,k,_,M,E,A,S,j=(_=t,M=e,E=n,A=1&M,S=rX(_),function t(){return(this&&this!==t6&&this instanceof t?S:_).apply(A?E:this,arguments)});return iI((y?rp:iC)(j,g),t,e)}function it(t,e,n,i){return r===t||aL(t,tP[n])&&!tN.call(i,n)?e:t}function ie(t,e,n,i,a,o){return aU(t)&&aU(e)&&(o.set(e,t),ri(t,e,r,ie,o),o.delete(e)),t}function ir(t){return aQ(t)?r:t}function ii(t,e,n,i,a,o){var l=1&n,s=t.length,u=e.length;if(s!=u&&!(l&&u>s))return!1;var c=o.get(t),f=o.get(e);if(c&&f)return c==e&&f==t;var h=-1,d=!0,p=2&n?new nk:r;for(o.set(t,e),o.set(e,t);++h<s;){var y=t[h],g=e[h];if(i)var v=l?i(g,y,h,e,t,o):i(y,g,h,t,e,o);if(r!==v){if(v)continue;d=!1;break}if(p){if(!eb(e,function(t,e){if(!eI(p,e)&&(y===t||a(y,t,n,i,o)))return p.push(e)})){d=!1;break}}else if(!(y===g||a(y,g,n,i,o))){d=!1;break}}return o.delete(t),o.delete(e),d}function ia(t){return iL(ij(t,r,iV),t+"")}function io(t){return nZ(t,oy,ig)}function il(t){return nZ(t,og,iv)}var is=na?function(t){return na.get(t)}:oY;function iu(t){for(var e=t.name+"",n=no[e],r=tN.call(no,e)?n.length:0;r--;){var i=n[r],a=i.func;if(null==a||a==t)return i.name}return e}function ic(t){return(tN.call(ny,"placeholder")?ny:t).placeholder}function ih(){var t=ny.iteratee||oW;return t=t===oW?n9:t,arguments.length?t(arguments[0],arguments[1]):t}function id(t,e){var n,r,i=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map}function ip(t){for(var e=oy(t),n=e.length;n--;){var r,i=e[n],a=t[i];e[n]=[i,a,(r=a)==r&&!aU(r)]}return e}function iy(t,e){var n=null==t?r:t[e];return n8(n)?n:r}var ig=eQ?function(t){return null==t?[]:eh(eQ(t=t_(t)),function(e){return tX.call(t,e)})}:oJ,iv=eQ?function(t){for(var e=[];t;)eg(e,ig(t)),t=tq(t);return e}:oJ,im=nQ;function ib(t,e,n){e=rC(e,t);for(var r=-1,i=e.length,a=!1;++r<i;){var o=iF(e[r]);if(!(a=null!=t&&n(t,o)))break;t=t[o]}return a||++r!=i?a:!!(i=null==t?0:t.length)&&aV(i)&&iw(o,i)&&(aB(t)||aD(t))}function ix(t){return"function"!=typeof t.constructor||iA(t)?{}:ng(tq(t))}function iO(t){return aB(t)||aD(t)||!!(t3&&t&&t[t3])}function iw(t,e){var n=typeof t;return!!(e=null==e?0x1fffffffffffff:e)&&("number"==n||"symbol"!=n&&td.test(t))&&t>-1&&t%1==0&&t<e}function ik(t,e,n){if(!aU(n))return!1;var r=typeof e;return("number"==r?!!(az(n)&&iw(e,n.length)):"string"==r&&e in n)&&aL(n[e],t)}function i_(t,e){if(aB(t))return!1;var n=typeof t;return!!("number"==n||"symbol"==n||"boolean"==n||null==t||a2(t))||X.test(t)||!U.test(t)||null!=e&&t in t_(e)}function iM(t){var e=iu(t),n=ny[e];if("function"!=typeof n||!(e in nb.prototype))return!1;if(t===n)return!0;var r=is(n);return!!r&&t===r[0]}(e7&&im(new e7(new ArrayBuffer(1)))!=S||nt&&im(new nt)!=v||ne&&im(ne.resolve())!=O||nn&&im(new nn)!=k||nr&&im(new nr)!=E)&&(im=function(t){var e=nQ(t),n=e==x?t.constructor:r,i=n?iz(n):"";if(i)switch(i){case nl:return S;case ns:return v;case nu:return O;case nc:return k;case nf:return E}return e});var iE=tT?aH:o0;function iA(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||tP)}function iS(t,e){return function(n){return null!=n&&n[t]===e&&(r!==e||t in t_(n))}}function ij(t,e,n){return e=e5(r===e?t.length-1:e,0),function(){for(var r=arguments,i=-1,a=e5(r.length-e,0),o=tb(a);++i<a;)o[i]=r[e+i];i=-1;for(var l=tb(e+1);++i<e;)l[i]=r[i];return l[e]=n(o),es(t,this,l)}}function iP(t,e){return e.length<2?t:nK(t,rg(e,0,-1))}function iT(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var iC=iR(rp),iN=ex||function(t,e){return t6.setTimeout(t,e)},iL=iR(ry);function iI(t,e,n){var r,i,a,o=e+"";return iL(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(te,"{\n/* [wrapped with "+e+"] */\n")}(o,(r=(a=o.match(tn))?a[1].split(tr):[],i=n,ec(u,function(t){var e="_."+t[0];i&t[1]&&!ed(r,e)&&r.push(e)}),r.sort())))}function iR(t){var e=0,n=0;return function(){var i=e4(),a=16-(i-n);if(n=i,a>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(r,arguments)}}function iD(t,e){var n=-1,i=t.length,a=i-1;for(e=r===e?i:e;++n<e;){var o=rc(n,a),l=t[o];t[o]=t[n],t[n]=l}return t.length=e,t}var iB=(tv=(tt=aS(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(K,function(t,n,r,i){e.push(r?i.replace(to,"$1"):n||t)}),e},function(t){return 500===tv.size&&tv.clear(),t})).cache,tt);function iF(t){if("string"==typeof t||a2(t))return t;var e=t+"";return"0"==e&&1/t==-l?"-0":e}function iz(t){if(null!=t){try{return tC.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function i$(t){if(t instanceof nb)return t.clone();var e=new nm(t.__wrapped__,t.__chain__);return e.__actions__=r$(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var iW=rh(function(t,e){return a$(t)?nB(t,nq(e,1,a$,!0)):[]}),iG=rh(function(t,e){var n=iQ(e);return a$(n)&&(n=r),a$(t)?nB(t,nq(e,1,a$,!0),ih(n,2)):[]}),iq=rh(function(t,e){var n=iQ(e);return a$(n)&&(n=r),a$(t)?nB(t,nq(e,1,a$,!0),r,n):[]});function iH(t,e,n){var r=null==t?0:t.length;if(!r)return -1;var i=null==n?0:a9(n);return i<0&&(i=e5(r+i,0)),ew(t,ih(e,3),i)}function iY(t,e,n){var i=null==t?0:t.length;if(!i)return -1;var a=i-1;return r!==n&&(a=a9(n),a=n<0?e5(i+a,0):e3(a,i-1)),ew(t,ih(e,3),a,!0)}function iV(t){return(null==t?0:t.length)?nq(t,1):[]}function iU(t){return t&&t.length?t[0]:r}var iX=rh(function(t){var e=ey(t,rP);return e.length&&e[0]===t[0]?n2(e):[]}),iK=rh(function(t){var e=iQ(t),n=ey(t,rP);return e===iQ(n)?e=r:n.pop(),n.length&&n[0]===t[0]?n2(n,ih(e,2)):[]}),iZ=rh(function(t){var e=iQ(t),n=ey(t,rP);return(e="function"==typeof e?e:r)&&n.pop(),n.length&&n[0]===t[0]?n2(n,r,e):[]});function iQ(t){var e=null==t?0:t.length;return e?t[e-1]:r}var iJ=rh(i0);function i0(t,e){return t&&t.length&&e&&e.length?rs(t,e):t}var i1=ia(function(t,e){var n=null==t?0:t.length,r=nN(t,e);return ru(t,ey(e,function(t){return iw(t,n)?+t:t}).sort(rB)),r});function i2(t){return null==t?t:e9.call(t)}var i5=rh(function(t){return rk(nq(t,1,a$,!0))}),i3=rh(function(t){var e=iQ(t);return a$(e)&&(e=r),rk(nq(t,1,a$,!0),ih(e,2))}),i4=rh(function(t){var e=iQ(t);return e="function"==typeof e?e:r,rk(nq(t,1,a$,!0),r,e)});function i6(t){if(!(t&&t.length))return[];var e=0;return t=eh(t,function(t){if(a$(t))return e=e5(t.length,e),!0}),eT(e,function(e){return ey(t,eA(e))})}function i8(t,e){if(!(t&&t.length))return[];var n=i6(t);return null==e?n:ey(n,function(t){return es(e,r,t)})}var i9=rh(function(t,e){return a$(t)?nB(t,e):[]}),i7=rh(function(t){return rS(eh(t,a$))}),at=rh(function(t){var e=iQ(t);return a$(e)&&(e=r),rS(eh(t,a$),ih(e,2))}),ae=rh(function(t){var e=iQ(t);return e="function"==typeof e?e:r,rS(eh(t,a$),r,e)}),an=rh(i6),ar=rh(function(t){var e=t.length,n=e>1?t[e-1]:r;return n="function"==typeof n?(t.pop(),n):r,i8(t,n)});function ai(t){var e=ny(t);return e.__chain__=!0,e}function aa(t,e){return e(t)}var ao=ia(function(t){var e=t.length,n=e?t[0]:0,i=this.__wrapped__,a=function(e){return nN(e,t)};return!(e>1)&&!this.__actions__.length&&i instanceof nb&&iw(n)?((i=i.slice(n,+n+ +!!e)).__actions__.push({func:aa,args:[a],thisArg:r}),new nm(i,this.__chain__).thru(function(t){return e&&!t.length&&t.push(r),t})):this.thru(a)}),al=rG(function(t,e,n){tN.call(t,n)?++t[n]:nC(t,n,1)}),as=rK(iH),au=rK(iY);function ac(t,e){return(aB(t)?ec:nF)(t,ih(e,3))}function af(t,e){return(aB(t)?function(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}:nz)(t,ih(e,3))}var ah=rG(function(t,e,n){tN.call(t,n)?t[n].push(e):nC(t,n,[e])}),ad=rh(function(t,e,n){var r=-1,i="function"==typeof e,a=az(t)?tb(t.length):[];return nF(t,function(t){a[++r]=i?es(e,t,n):n5(t,e,n)}),a}),ap=rG(function(t,e,n){nC(t,n,e)});function ay(t,e){return(aB(t)?ey:re)(t,ih(e,3))}var ag=rG(function(t,e,n){t[+!n].push(e)},function(){return[[],[]]}),av=rh(function(t,e){if(null==t)return[];var n=e.length;return n>1&&ik(t,e[0],e[1])?e=[]:n>2&&ik(e[0],e[1],e[2])&&(e=[e[0]]),ro(t,nq(e,1),[])}),am=ee||function(){return t6.Date.now()};function ab(t,e,n){return e=n?r:e,e=t&&null==e?t.length:e,r7(t,128,r,r,r,r,e)}function ax(t,e){var n;if("function"!=typeof e)throw new tA(i);return t=a9(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=r),n}}var aO=rh(function(t,e,n){var r=1;if(n.length){var i=eq(n,ic(aO));r|=32}return r7(t,r,e,n,i)}),aw=rh(function(t,e,n){var r=3;if(n.length){var i=eq(n,ic(aw));r|=32}return r7(e,r,t,n,i)});function ak(t,e,n){e=n?r:e;var i=r7(t,8,r,r,r,r,r,e);return i.placeholder=ak.placeholder,i}function a_(t,e,n){e=n?r:e;var i=r7(t,16,r,r,r,r,r,e);return i.placeholder=a_.placeholder,i}function aM(t,e,n){var a,o,l,s,u,c,f=0,h=!1,d=!1,p=!0;if("function"!=typeof t)throw new tA(i);function y(e){var n=a,i=o;return a=o=r,f=e,s=t.apply(i,n)}function g(t){var n=t-c,i=t-f;return r===c||n>=e||n<0||d&&i>=l}function v(){var t,n,r,i=am();if(g(i))return b(i);u=iN(v,(t=i-c,n=i-f,r=e-t,d?e3(r,l-n):r))}function b(t){return(u=r,p&&a)?y(t):(a=o=r,s)}function x(){var t,n=am(),i=g(n);if(a=arguments,o=this,c=n,i){if(r===u)return f=t=c,u=iN(v,e),h?y(t):s;if(d)return rL(u),u=iN(v,e),y(c)}return r===u&&(u=iN(v,e)),s}return e=ot(e)||0,aU(n)&&(h=!!n.leading,l=(d="maxWait"in n)?e5(ot(n.maxWait)||0,e):l,p="trailing"in n?!!n.trailing:p),x.cancel=function(){r!==u&&rL(u),f=0,a=c=o=u=r},x.flush=function(){return r===u?s:b(am())},x}var aE=rh(function(t,e){return nD(t,1,e)}),aA=rh(function(t,e,n){return nD(t,ot(e)||0,n)});function aS(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new tA(i);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=t.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(aS.Cache||nw),n}function aj(t){if("function"!=typeof t)throw new tA(i);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}aS.Cache=nw;var aP=rh(function(t,e){var n=(e=1==e.length&&aB(e[0])?ey(e[0],eN(ih())):ey(nq(e,1),eN(ih()))).length;return rh(function(r){for(var i=-1,a=e3(r.length,n);++i<a;)r[i]=e[i].call(this,r[i]);return es(t,this,r)})}),aT=rh(function(t,e){var n=eq(e,ic(aT));return r7(t,32,r,e,n)}),aC=rh(function(t,e){var n=eq(e,ic(aC));return r7(t,64,r,e,n)}),aN=ia(function(t,e){return r7(t,256,r,r,r,e)});function aL(t,e){return t===e||t!=t&&e!=e}var aI=r3(nJ),aR=r3(function(t,e){return t>=e}),aD=n3(function(){return arguments}())?n3:function(t){return aX(t)&&tN.call(t,"callee")&&!tX.call(t,"callee")},aB=tb.isArray,aF=en?eN(en):function(t){return aX(t)&&nQ(t)==A};function az(t){return null!=t&&aV(t.length)&&!aH(t)}function a$(t){return aX(t)&&az(t)}var aW=eJ||o0,aG=er?eN(er):function(t){return aX(t)&&nQ(t)==d};function aq(t){if(!aX(t))return!1;var e=nQ(t);return e==p||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!aQ(t)}function aH(t){if(!aU(t))return!1;var e=nQ(t);return e==y||e==g||"[object AsyncFunction]"==e||"[object Proxy]"==e}function aY(t){return"number"==typeof t&&t==a9(t)}function aV(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=0x1fffffffffffff}function aU(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function aX(t){return null!=t&&"object"==typeof t}var aK=ei?eN(ei):function(t){return aX(t)&&im(t)==v};function aZ(t){return"number"==typeof t||aX(t)&&nQ(t)==b}function aQ(t){if(!aX(t)||nQ(t)!=x)return!1;var e=tq(t);if(null===e)return!0;var n=tN.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&tC.call(n)==tD}var aJ=ea?eN(ea):function(t){return aX(t)&&nQ(t)==w},a0=eo?eN(eo):function(t){return aX(t)&&im(t)==k};function a1(t){return"string"==typeof t||!aB(t)&&aX(t)&&nQ(t)==_}function a2(t){return"symbol"==typeof t||aX(t)&&nQ(t)==M}var a5=el?eN(el):function(t){return aX(t)&&aV(t.length)&&!!tJ[nQ(t)]},a3=r3(rt),a4=r3(function(t,e){return t<=e});function a6(t){if(!t)return[];if(az(t))return a1(t)?eV(t):r$(t);if(t4&&t[t4]){for(var e,n=t[t4](),r=[];!(e=n.next()).done;)r.push(e.value);return r}var i=im(t);return(i==v?eW:i==k?eH:o_)(t)}function a8(t){return t?(t=ot(t))===l||t===-l?(t<0?-1:1)*17976931348623157e292:t==t?t:0:0===t?t:0}function a9(t){var e=a8(t),n=e%1;return e==e?n?e-n:e:0}function a7(t){return t?nL(a9(t),0,0xffffffff):0}function ot(t){if("number"==typeof t)return t;if(a2(t))return s;if(aU(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=aU(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=eC(t);var n=tc.test(t);return n||th.test(t)?t5(t.slice(2),n?2:8):tu.test(t)?s:+t}function oe(t){return rW(t,og(t))}function on(t){return null==t?"":rw(t)}var or=rq(function(t,e){if(iA(e)||az(e))return void rW(e,oy(e),t);for(var n in e)tN.call(e,n)&&nS(t,n,e[n])}),oi=rq(function(t,e){rW(e,og(e),t)}),oa=rq(function(t,e,n,r){rW(e,og(e),t,r)}),oo=rq(function(t,e,n,r){rW(e,oy(e),t,r)}),ol=ia(nN),os=rh(function(t,e){t=t_(t);var n=-1,i=e.length,a=i>2?e[2]:r;for(a&&ik(e[0],e[1],a)&&(i=1);++n<i;)for(var o=e[n],l=og(o),s=-1,u=l.length;++s<u;){var c=l[s],f=t[c];(r===f||aL(f,tP[c])&&!tN.call(t,c))&&(t[c]=o[c])}return t}),ou=rh(function(t){return t.push(r,ie),es(om,r,t)});function oc(t,e,n){var i=null==t?r:nK(t,e);return r===i?n:i}function of(t,e){return null!=t&&ib(t,e,n1)}var oh=rJ(function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=tR.call(e)),t[e]=n},oB(o$)),od=rJ(function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=tR.call(e)),tN.call(t,e)?t[e].push(n):t[e]=[n]},ih),op=rh(n5);function oy(t){return az(t)?nM(t):n7(t)}function og(t){return az(t)?nM(t,!0):function(t){if(!aU(t)){var e=t,n=[];if(null!=e)for(var r in t_(e))n.push(r);return n}var i=iA(t),a=[];for(var o in t)"constructor"==o&&(i||!tN.call(t,o))||a.push(o);return a}(t)}var ov=rq(function(t,e,n){ri(t,e,n)}),om=rq(function(t,e,n,r){ri(t,e,n,r)}),ob=ia(function(t,e){var n={};if(null==t)return n;var r=!1;e=ey(e,function(e){return e=rC(e,t),r||(r=e.length>1),e}),rW(t,il(t),n),r&&(n=nI(n,7,ir));for(var i=e.length;i--;)r_(n,e[i]);return n}),ox=ia(function(t,e){return null==t?{}:rl(t,e,function(e,n){return of(t,n)})});function oO(t,e){if(null==t)return{};var n=ey(il(t),function(t){return[t]});return e=ih(e),rl(t,n,function(t,n){return e(t,n[0])})}var ow=r9(oy),ok=r9(og);function o_(t){return null==t?[]:eL(t,oy(t))}var oM=rU(function(t,e,n){return e=e.toLowerCase(),t+(n?oE(e):e)});function oE(t){return oL(on(t).toLowerCase())}function oA(t){return(t=on(t))&&t.replace(tp,eB).replace(tY,"")}var oS=rU(function(t,e,n){return t+(n?"-":"")+e.toLowerCase()}),oj=rU(function(t,e,n){return t+(n?" ":"")+e.toLowerCase()}),oP=rV("toLowerCase"),oT=rU(function(t,e,n){return t+(n?"_":"")+e.toLowerCase()}),oC=rU(function(t,e,n){return t+(n?" ":"")+oL(e)}),oN=rU(function(t,e,n){return t+(n?" ":"")+e.toUpperCase()}),oL=rV("toUpperCase");function oI(t,e,n){if(t=on(t),e=n?r:e,r===e){var i;return(i=t,tK.test(i))?t.match(tU)||[]:t.match(ti)||[]}return t.match(e)||[]}var oR=rh(function(t,e){try{return es(t,r,e)}catch(t){return aq(t)?t:new tO(t)}}),oD=ia(function(t,e){return ec(e,function(e){nC(t,e=iF(e),aO(t[e],t))}),t});function oB(t){return function(){return t}}var oF=rZ(),oz=rZ(!0);function o$(t){return t}function oW(t){return n9("function"==typeof t?t:nI(t,1))}var oG=rh(function(t,e){return function(n){return n5(n,t,e)}}),oq=rh(function(t,e){return function(n){return n5(t,n,e)}});function oH(t,e,n){var r=oy(e),i=nX(e,r);null!=n||aU(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=nX(e,oy(e)));var a=!(aU(n)&&"chain"in n)||!!n.chain,o=aH(t);return ec(i,function(n){var r=e[n];t[n]=r,o&&(t.prototype[n]=function(){var e=this.__chain__;if(a||e){var n=t(this.__wrapped__);return(n.__actions__=r$(this.__actions__)).push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,eg([this.value()],arguments))})}),t}function oY(){}var oV=r1(ey),oU=r1(ef),oX=r1(eb);function oK(t){return i_(t)?eA(iF(t)):function(e){return nK(e,t)}}var oZ=r5(),oQ=r5(!0);function oJ(){return[]}function o0(){return!1}var o1=r0(function(t,e){return t+e},0),o2=r6("ceil"),o5=r0(function(t,e){return t/e},1),o3=r6("floor"),o4=r0(function(t,e){return t*e},1),o6=r6("round"),o8=r0(function(t,e){return t-e},0);return ny.after=function(t,e){if("function"!=typeof e)throw new tA(i);return t=a9(t),function(){if(--t<1)return e.apply(this,arguments)}},ny.ary=ab,ny.assign=or,ny.assignIn=oi,ny.assignInWith=oa,ny.assignWith=oo,ny.at=ol,ny.before=ax,ny.bind=aO,ny.bindAll=oD,ny.bindKey=aw,ny.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return aB(t)?t:[t]},ny.chain=ai,ny.chunk=function(t,e,n){e=(n?ik(t,e,n):r===e)?1:e5(a9(e),0);var i=null==t?0:t.length;if(!i||e<1)return[];for(var a=0,o=0,l=tb(eS(i/e));a<i;)l[o++]=rg(t,a,a+=e);return l},ny.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,i=[];++e<n;){var a=t[e];a&&(i[r++]=a)}return i},ny.concat=function(){var t=arguments.length;if(!t)return[];for(var e=tb(t-1),n=arguments[0],r=t;r--;)e[r-1]=arguments[r];return eg(aB(n)?r$(n):[n],nq(e,1))},ny.cond=function(t){var e=null==t?0:t.length,n=ih();return t=e?ey(t,function(t){if("function"!=typeof t[1])throw new tA(i);return[n(t[0]),t[1]]}):[],rh(function(n){for(var r=-1;++r<e;){var i=t[r];if(es(i[0],this,n))return es(i[1],this,n)}})},ny.conforms=function(t){var e,n;return n=oy(e=nI(t,1)),function(t){return nR(t,e,n)}},ny.constant=oB,ny.countBy=al,ny.create=function(t,e){var n=ng(t);return null==e?n:nT(n,e)},ny.curry=ak,ny.curryRight=a_,ny.debounce=aM,ny.defaults=os,ny.defaultsDeep=ou,ny.defer=aE,ny.delay=aA,ny.difference=iW,ny.differenceBy=iG,ny.differenceWith=iq,ny.drop=function(t,e,n){var i=null==t?0:t.length;return i?rg(t,(e=n||r===e?1:a9(e))<0?0:e,i):[]},ny.dropRight=function(t,e,n){var i=null==t?0:t.length;return i?rg(t,0,(e=i-(e=n||r===e?1:a9(e)))<0?0:e):[]},ny.dropRightWhile=function(t,e){return t&&t.length?rE(t,ih(e,3),!0,!0):[]},ny.dropWhile=function(t,e){return t&&t.length?rE(t,ih(e,3),!0):[]},ny.fill=function(t,e,n,i){var a=null==t?0:t.length;if(!a)return[];n&&"number"!=typeof n&&ik(t,e,n)&&(n=0,i=a);var o=n,l=i,s=t.length;for((o=a9(o))<0&&(o=-o>s?0:s+o),(l=r===l||l>s?s:a9(l))<0&&(l+=s),l=o>l?0:a7(l);o<l;)t[o++]=e;return t},ny.filter=function(t,e){return(aB(t)?eh:nG)(t,ih(e,3))},ny.flatMap=function(t,e){return nq(ay(t,e),1)},ny.flatMapDeep=function(t,e){return nq(ay(t,e),l)},ny.flatMapDepth=function(t,e,n){return n=r===n?1:a9(n),nq(ay(t,e),n)},ny.flatten=iV,ny.flattenDeep=function(t){return(null==t?0:t.length)?nq(t,l):[]},ny.flattenDepth=function(t,e){return(null==t?0:t.length)?nq(t,e=r===e?1:a9(e)):[]},ny.flip=function(t){return r7(t,512)},ny.flow=oF,ny.flowRight=oz,ny.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var i=t[e];r[i[0]]=i[1]}return r},ny.functions=function(t){return null==t?[]:nX(t,oy(t))},ny.functionsIn=function(t){return null==t?[]:nX(t,og(t))},ny.groupBy=ah,ny.initial=function(t){return(null==t?0:t.length)?rg(t,0,-1):[]},ny.intersection=iX,ny.intersectionBy=iK,ny.intersectionWith=iZ,ny.invert=oh,ny.invertBy=od,ny.invokeMap=ad,ny.iteratee=oW,ny.keyBy=ap,ny.keys=oy,ny.keysIn=og,ny.map=ay,ny.mapKeys=function(t,e){var n={};return e=ih(e,3),nV(t,function(t,r,i){nC(n,e(t,r,i),t)}),n},ny.mapValues=function(t,e){var n={};return e=ih(e,3),nV(t,function(t,r,i){nC(n,r,e(t,r,i))}),n},ny.matches=function(t){return rn(nI(t,1))},ny.matchesProperty=function(t,e){return rr(t,nI(e,1))},ny.memoize=aS,ny.merge=ov,ny.mergeWith=om,ny.method=oG,ny.methodOf=oq,ny.mixin=oH,ny.negate=aj,ny.nthArg=function(t){return t=a9(t),rh(function(e){return ra(e,t)})},ny.omit=ob,ny.omitBy=function(t,e){return oO(t,aj(ih(e)))},ny.once=function(t){return ax(2,t)},ny.orderBy=function(t,e,n,i){return null==t?[]:(aB(e)||(e=null==e?[]:[e]),aB(n=i?r:n)||(n=null==n?[]:[n]),ro(t,e,n))},ny.over=oV,ny.overArgs=aP,ny.overEvery=oU,ny.overSome=oX,ny.partial=aT,ny.partialRight=aC,ny.partition=ag,ny.pick=ox,ny.pickBy=oO,ny.property=oK,ny.propertyOf=function(t){return function(e){return null==t?r:nK(t,e)}},ny.pull=iJ,ny.pullAll=i0,ny.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?rs(t,e,ih(n,2)):t},ny.pullAllWith=function(t,e,n){return t&&t.length&&e&&e.length?rs(t,e,r,n):t},ny.pullAt=i1,ny.range=oZ,ny.rangeRight=oQ,ny.rearg=aN,ny.reject=function(t,e){return(aB(t)?eh:nG)(t,aj(ih(e,3)))},ny.remove=function(t,e){var n=[];if(!(t&&t.length))return n;var r=-1,i=[],a=t.length;for(e=ih(e,3);++r<a;){var o=t[r];e(o,r,t)&&(n.push(o),i.push(r))}return ru(t,i),n},ny.rest=function(t,e){if("function"!=typeof t)throw new tA(i);return rh(t,e=r===e?e:a9(e))},ny.reverse=i2,ny.sampleSize=function(t,e,n){return e=(n?ik(t,e,n):r===e)?1:a9(e),(aB(t)?function(t,e){return iD(r$(t),nL(e,0,t.length))}:function(t,e){var n=o_(t);return iD(n,nL(e,0,n.length))})(t,e)},ny.set=function(t,e,n){return null==t?t:rd(t,e,n)},ny.setWith=function(t,e,n,i){return i="function"==typeof i?i:r,null==t?t:rd(t,e,n,i)},ny.shuffle=function(t){return(aB(t)?function(t){return iD(r$(t))}:function(t){return iD(o_(t))})(t)},ny.slice=function(t,e,n){var i=null==t?0:t.length;return i?(n&&"number"!=typeof n&&ik(t,e,n)?(e=0,n=i):(e=null==e?0:a9(e),n=r===n?i:a9(n)),rg(t,e,n)):[]},ny.sortBy=av,ny.sortedUniq=function(t){return t&&t.length?rx(t):[]},ny.sortedUniqBy=function(t,e){return t&&t.length?rx(t,ih(e,2)):[]},ny.split=function(t,e,n){return(n&&"number"!=typeof n&&ik(t,e,n)&&(e=n=r),n=r===n?0xffffffff:n>>>0)?(t=on(t))&&("string"==typeof e||null!=e&&!aJ(e))&&!(e=rw(e))&&e$(t)?rN(eV(t),0,n):t.split(e,n):[]},ny.spread=function(t,e){if("function"!=typeof t)throw new tA(i);return e=null==e?0:e5(a9(e),0),rh(function(n){var r=n[e],i=rN(n,0,e);return r&&eg(i,r),es(t,this,i)})},ny.tail=function(t){var e=null==t?0:t.length;return e?rg(t,1,e):[]},ny.take=function(t,e,n){return t&&t.length?rg(t,0,(e=n||r===e?1:a9(e))<0?0:e):[]},ny.takeRight=function(t,e,n){var i=null==t?0:t.length;return i?rg(t,(e=i-(e=n||r===e?1:a9(e)))<0?0:e,i):[]},ny.takeRightWhile=function(t,e){return t&&t.length?rE(t,ih(e,3),!1,!0):[]},ny.takeWhile=function(t,e){return t&&t.length?rE(t,ih(e,3)):[]},ny.tap=function(t,e){return e(t),t},ny.throttle=function(t,e,n){var r=!0,a=!0;if("function"!=typeof t)throw new tA(i);return aU(n)&&(r="leading"in n?!!n.leading:r,a="trailing"in n?!!n.trailing:a),aM(t,e,{leading:r,maxWait:e,trailing:a})},ny.thru=aa,ny.toArray=a6,ny.toPairs=ow,ny.toPairsIn=ok,ny.toPath=function(t){return aB(t)?ey(t,iF):a2(t)?[t]:r$(iB(on(t)))},ny.toPlainObject=oe,ny.transform=function(t,e,n){var r=aB(t),i=r||aW(t)||a5(t);if(e=ih(e,4),null==n){var a=t&&t.constructor;n=i?r?new a:[]:aU(t)&&aH(a)?ng(tq(t)):{}}return(i?ec:nV)(t,function(t,r,i){return e(n,t,r,i)}),n},ny.unary=function(t){return ab(t,1)},ny.union=i5,ny.unionBy=i3,ny.unionWith=i4,ny.uniq=function(t){return t&&t.length?rk(t):[]},ny.uniqBy=function(t,e){return t&&t.length?rk(t,ih(e,2)):[]},ny.uniqWith=function(t,e){return e="function"==typeof e?e:r,t&&t.length?rk(t,r,e):[]},ny.unset=function(t,e){return null==t||r_(t,e)},ny.unzip=i6,ny.unzipWith=i8,ny.update=function(t,e,n){return null==t?t:rM(t,e,rT(n))},ny.updateWith=function(t,e,n,i){return i="function"==typeof i?i:r,null==t?t:rM(t,e,rT(n),i)},ny.values=o_,ny.valuesIn=function(t){return null==t?[]:eL(t,og(t))},ny.without=i9,ny.words=oI,ny.wrap=function(t,e){return aT(rT(e),t)},ny.xor=i7,ny.xorBy=at,ny.xorWith=ae,ny.zip=an,ny.zipObject=function(t,e){return rj(t||[],e||[],nS)},ny.zipObjectDeep=function(t,e){return rj(t||[],e||[],rd)},ny.zipWith=ar,ny.entries=ow,ny.entriesIn=ok,ny.extend=oi,ny.extendWith=oa,oH(ny,ny),ny.add=o1,ny.attempt=oR,ny.camelCase=oM,ny.capitalize=oE,ny.ceil=o2,ny.clamp=function(t,e,n){return r===n&&(n=e,e=r),r!==n&&(n=(n=ot(n))==n?n:0),r!==e&&(e=(e=ot(e))==e?e:0),nL(ot(t),e,n)},ny.clone=function(t){return nI(t,4)},ny.cloneDeep=function(t){return nI(t,5)},ny.cloneDeepWith=function(t,e){return nI(t,5,e="function"==typeof e?e:r)},ny.cloneWith=function(t,e){return nI(t,4,e="function"==typeof e?e:r)},ny.conformsTo=function(t,e){return null==e||nR(t,e,oy(e))},ny.deburr=oA,ny.defaultTo=function(t,e){return null==t||t!=t?e:t},ny.divide=o5,ny.endsWith=function(t,e,n){t=on(t),e=rw(e);var i=t.length,a=n=r===n?i:nL(a9(n),0,i);return(n-=e.length)>=0&&t.slice(n,a)==e},ny.eq=aL,ny.escape=function(t){return(t=on(t))&&q.test(t)?t.replace(W,eF):t},ny.escapeRegExp=function(t){return(t=on(t))&&Q.test(t)?t.replace(Z,"\\$&"):t},ny.every=function(t,e,n){var i=aB(t)?ef:n$;return n&&ik(t,e,n)&&(e=r),i(t,ih(e,3))},ny.find=as,ny.findIndex=iH,ny.findKey=function(t,e){return eO(t,ih(e,3),nV)},ny.findLast=au,ny.findLastIndex=iY,ny.findLastKey=function(t,e){return eO(t,ih(e,3),nU)},ny.floor=o3,ny.forEach=ac,ny.forEachRight=af,ny.forIn=function(t,e){return null==t?t:nH(t,ih(e,3),og)},ny.forInRight=function(t,e){return null==t?t:nY(t,ih(e,3),og)},ny.forOwn=function(t,e){return t&&nV(t,ih(e,3))},ny.forOwnRight=function(t,e){return t&&nU(t,ih(e,3))},ny.get=oc,ny.gt=aI,ny.gte=aR,ny.has=function(t,e){return null!=t&&ib(t,e,n0)},ny.hasIn=of,ny.head=iU,ny.identity=o$,ny.includes=function(t,e,n,r){t=az(t)?t:o_(t),n=n&&!r?a9(n):0;var i=t.length;return n<0&&(n=e5(i+n,0)),a1(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&ek(t,e,n)>-1},ny.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return -1;var i=null==n?0:a9(n);return i<0&&(i=e5(r+i,0)),ek(t,e,i)},ny.inRange=function(t,e,n){var i,a,o;return e=a8(e),r===n?(n=e,e=0):n=a8(n),(i=t=ot(t))>=e3(a=e,o=n)&&i<e5(a,o)},ny.invoke=op,ny.isArguments=aD,ny.isArray=aB,ny.isArrayBuffer=aF,ny.isArrayLike=az,ny.isArrayLikeObject=a$,ny.isBoolean=function(t){return!0===t||!1===t||aX(t)&&nQ(t)==h},ny.isBuffer=aW,ny.isDate=aG,ny.isElement=function(t){return aX(t)&&1===t.nodeType&&!aQ(t)},ny.isEmpty=function(t){if(null==t)return!0;if(az(t)&&(aB(t)||"string"==typeof t||"function"==typeof t.splice||aW(t)||a5(t)||aD(t)))return!t.length;var e=im(t);if(e==v||e==k)return!t.size;if(iA(t))return!n7(t).length;for(var n in t)if(tN.call(t,n))return!1;return!0},ny.isEqual=function(t,e){return n4(t,e)},ny.isEqualWith=function(t,e,n){var i=(n="function"==typeof n?n:r)?n(t,e):r;return r===i?n4(t,e,r,n):!!i},ny.isError=aq,ny.isFinite=function(t){return"number"==typeof t&&e0(t)},ny.isFunction=aH,ny.isInteger=aY,ny.isLength=aV,ny.isMap=aK,ny.isMatch=function(t,e){return t===e||n6(t,e,ip(e))},ny.isMatchWith=function(t,e,n){return n="function"==typeof n?n:r,n6(t,e,ip(e),n)},ny.isNaN=function(t){return aZ(t)&&t!=+t},ny.isNative=function(t){if(iE(t))throw new tO("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return n8(t)},ny.isNil=function(t){return null==t},ny.isNull=function(t){return null===t},ny.isNumber=aZ,ny.isObject=aU,ny.isObjectLike=aX,ny.isPlainObject=aQ,ny.isRegExp=aJ,ny.isSafeInteger=function(t){return aY(t)&&t>=-0x1fffffffffffff&&t<=0x1fffffffffffff},ny.isSet=a0,ny.isString=a1,ny.isSymbol=a2,ny.isTypedArray=a5,ny.isUndefined=function(t){return r===t},ny.isWeakMap=function(t){return aX(t)&&im(t)==E},ny.isWeakSet=function(t){return aX(t)&&"[object WeakSet]"==nQ(t)},ny.join=function(t,e){return null==t?"":e1.call(t,e)},ny.kebabCase=oS,ny.last=iQ,ny.lastIndexOf=function(t,e,n){var i=null==t?0:t.length;if(!i)return -1;var a=i;return r!==n&&(a=(a=a9(n))<0?e5(i+a,0):e3(a,i-1)),e==e?function(t,e,n){for(var r=n+1;r--&&t[r]!==e;);return r}(t,e,a):ew(t,eM,a,!0)},ny.lowerCase=oj,ny.lowerFirst=oP,ny.lt=a3,ny.lte=a4,ny.max=function(t){return t&&t.length?nW(t,o$,nJ):r},ny.maxBy=function(t,e){return t&&t.length?nW(t,ih(e,2),nJ):r},ny.mean=function(t){return eE(t,o$)},ny.meanBy=function(t,e){return eE(t,ih(e,2))},ny.min=function(t){return t&&t.length?nW(t,o$,rt):r},ny.minBy=function(t,e){return t&&t.length?nW(t,ih(e,2),rt):r},ny.stubArray=oJ,ny.stubFalse=o0,ny.stubObject=function(){return{}},ny.stubString=function(){return""},ny.stubTrue=function(){return!0},ny.multiply=o4,ny.nth=function(t,e){return t&&t.length?ra(t,a9(e)):r},ny.noConflict=function(){return t6._===this&&(t6._=tB),this},ny.noop=oY,ny.now=am,ny.pad=function(t,e,n){t=on(t);var r=(e=a9(e))?eY(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return r2(eZ(i),n)+t+r2(eS(i),n)},ny.padEnd=function(t,e,n){t=on(t);var r=(e=a9(e))?eY(t):0;return e&&r<e?t+r2(e-r,n):t},ny.padStart=function(t,e,n){t=on(t);var r=(e=a9(e))?eY(t):0;return e&&r<e?r2(e-r,n)+t:t},ny.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e*=1),e6(on(t).replace(J,""),e||0)},ny.random=function(t,e,n){if(n&&"boolean"!=typeof n&&ik(t,e,n)&&(e=n=r),r===n&&("boolean"==typeof e?(n=e,e=r):"boolean"==typeof t&&(n=t,t=r)),r===t&&r===e?(t=0,e=1):(t=a8(t),r===e?(e=t,t=0):e=a8(e)),t>e){var i=t;t=e,e=i}if(n||t%1||e%1){var a=e8();return e3(t+a*(e-t+t2("1e-"+((a+"").length-1))),e)}return rc(t,e)},ny.reduce=function(t,e,n){var r=aB(t)?ev:ej,i=arguments.length<3;return r(t,ih(e,4),n,i,nF)},ny.reduceRight=function(t,e,n){var r=aB(t)?em:ej,i=arguments.length<3;return r(t,ih(e,4),n,i,nz)},ny.repeat=function(t,e,n){return e=(n?ik(t,e,n):r===e)?1:a9(e),rf(on(t),e)},ny.replace=function(){var t=arguments,e=on(t[0]);return t.length<3?e:e.replace(t[1],t[2])},ny.result=function(t,e,n){e=rC(e,t);var i=-1,a=e.length;for(a||(a=1,t=r);++i<a;){var o=null==t?r:t[iF(e[i])];r===o&&(i=a,o=n),t=aH(o)?o.call(t):o}return t},ny.round=o6,ny.runInContext=t,ny.sample=function(t){return(aB(t)?nE:function(t){return nE(o_(t))})(t)},ny.size=function(t){if(null==t)return 0;if(az(t))return a1(t)?eY(t):t.length;var e=im(t);return e==v||e==k?t.size:n7(t).length},ny.snakeCase=oT,ny.some=function(t,e,n){var i=aB(t)?eb:rv;return n&&ik(t,e,n)&&(e=r),i(t,ih(e,3))},ny.sortedIndex=function(t,e){return rm(t,e)},ny.sortedIndexBy=function(t,e,n){return rb(t,e,ih(n,2))},ny.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=rm(t,e);if(r<n&&aL(t[r],e))return r}return -1},ny.sortedLastIndex=function(t,e){return rm(t,e,!0)},ny.sortedLastIndexBy=function(t,e,n){return rb(t,e,ih(n,2),!0)},ny.sortedLastIndexOf=function(t,e){if(null==t?0:t.length){var n=rm(t,e,!0)-1;if(aL(t[n],e))return n}return -1},ny.startCase=oC,ny.startsWith=function(t,e,n){return t=on(t),n=null==n?0:nL(a9(n),0,t.length),e=rw(e),t.slice(n,n+e.length)==e},ny.subtract=o8,ny.sum=function(t){return t&&t.length?eP(t,o$):0},ny.sumBy=function(t,e){return t&&t.length?eP(t,ih(e,2)):0},ny.template=function(t,e,n){var i=ny.templateSettings;n&&ik(t,e,n)&&(e=r),t=on(t),e=oa({},e,i,it);var a,o,l=oa({},e.imports,i.imports,it),s=oy(l),u=eL(l,s),c=0,f=e.interpolate||ty,h="__p += '",d=tM((e.escape||ty).source+"|"+f.source+"|"+(f===V?tl:ty).source+"|"+(e.evaluate||ty).source+"|$","g"),p="//# sourceURL="+(tN.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++tQ+"]")+"\n";t.replace(d,function(e,n,r,i,l,s){return r||(r=i),h+=t.slice(c,s).replace(tg,ez),n&&(a=!0,h+="' +\n__e("+n+") +\n'"),l&&(o=!0,h+="';\n"+l+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),c=s+e.length,e}),h+="';\n";var y=tN.call(e,"variable")&&e.variable;if(y){if(ta.test(y))throw new tO("Invalid `variable` option passed into `_.template`")}else h="with (obj) {\n"+h+"\n}\n";h=(o?h.replace(B,""):h).replace(F,"$1").replace(z,"$1;"),h="function("+(y||"obj")+") {\n"+(y?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(a?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var g=oR(function(){return tw(s,p+"return "+h).apply(r,u)});if(g.source=h,aq(g))throw g;return g},ny.times=function(t,e){if((t=a9(t))<1||t>0x1fffffffffffff)return[];var n=0xffffffff,r=e3(t,0xffffffff);e=ih(e),t-=0xffffffff;for(var i=eT(r,e);++n<t;)e(n);return i},ny.toFinite=a8,ny.toInteger=a9,ny.toLength=a7,ny.toLower=function(t){return on(t).toLowerCase()},ny.toNumber=ot,ny.toSafeInteger=function(t){return t?nL(a9(t),-0x1fffffffffffff,0x1fffffffffffff):0===t?t:0},ny.toString=on,ny.toUpper=function(t){return on(t).toUpperCase()},ny.trim=function(t,e,n){if((t=on(t))&&(n||r===e))return eC(t);if(!t||!(e=rw(e)))return t;var i=eV(t),a=eV(e),o=eR(i,a),l=eD(i,a)+1;return rN(i,o,l).join("")},ny.trimEnd=function(t,e,n){if((t=on(t))&&(n||r===e))return t.slice(0,eU(t)+1);if(!t||!(e=rw(e)))return t;var i=eV(t),a=eD(i,eV(e))+1;return rN(i,0,a).join("")},ny.trimStart=function(t,e,n){if((t=on(t))&&(n||r===e))return t.replace(J,"");if(!t||!(e=rw(e)))return t;var i=eV(t),a=eR(i,eV(e));return rN(i,a).join("")},ny.truncate=function(t,e){var n=30,i="...";if(aU(e)){var a="separator"in e?e.separator:a;n="length"in e?a9(e.length):n,i="omission"in e?rw(e.omission):i}var o=(t=on(t)).length;if(e$(t)){var l=eV(t);o=l.length}if(n>=o)return t;var s=n-eY(i);if(s<1)return i;var u=l?rN(l,0,s).join(""):t.slice(0,s);if(r===a)return u+i;if(l&&(s+=u.length-s),aJ(a)){if(t.slice(s).search(a)){var c,f=u;for(a.global||(a=tM(a.source,on(ts.exec(a))+"g")),a.lastIndex=0;c=a.exec(f);)var h=c.index;u=u.slice(0,r===h?s:h)}}else if(t.indexOf(rw(a),s)!=s){var d=u.lastIndexOf(a);d>-1&&(u=u.slice(0,d))}return u+i},ny.unescape=function(t){return(t=on(t))&&G.test(t)?t.replace($,eX):t},ny.uniqueId=function(t){var e=++tL;return on(t)+e},ny.upperCase=oN,ny.upperFirst=oL,ny.each=ac,ny.eachRight=af,ny.first=iU,oH(ny,(tm={},nV(ny,function(t,e){tN.call(ny.prototype,e)||(tm[e]=t)}),tm),{chain:!1}),ny.VERSION="4.17.21",ec(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){ny[t].placeholder=ny}),ec(["drop","take"],function(t,e){nb.prototype[t]=function(n){n=r===n?1:e5(a9(n),0);var i=this.__filtered__&&!e?new nb(this):this.clone();return i.__filtered__?i.__takeCount__=e3(n,i.__takeCount__):i.__views__.push({size:e3(n,0xffffffff),type:t+(i.__dir__<0?"Right":"")}),i},nb.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}}),ec(["filter","map","takeWhile"],function(t,e){var n=e+1,r=1==n||3==n;nb.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:ih(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}}),ec(["head","last"],function(t,e){var n="take"+(e?"Right":"");nb.prototype[t]=function(){return this[n](1).value()[0]}}),ec(["initial","tail"],function(t,e){var n="drop"+(e?"":"Right");nb.prototype[t]=function(){return this.__filtered__?new nb(this):this[n](1)}}),nb.prototype.compact=function(){return this.filter(o$)},nb.prototype.find=function(t){return this.filter(t).head()},nb.prototype.findLast=function(t){return this.reverse().find(t)},nb.prototype.invokeMap=rh(function(t,e){return"function"==typeof t?new nb(this):this.map(function(n){return n5(n,t,e)})}),nb.prototype.reject=function(t){return this.filter(aj(ih(t)))},nb.prototype.slice=function(t,e){t=a9(t);var n=this;return n.__filtered__&&(t>0||e<0)?new nb(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),r!==e&&(n=(e=a9(e))<0?n.dropRight(-e):n.take(e-t)),n)},nb.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},nb.prototype.toArray=function(){return this.take(0xffffffff)},nV(nb.prototype,function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),i=/^(?:head|last)$/.test(e),a=ny[i?"take"+("last"==e?"Right":""):e],o=i||/^find/.test(e);a&&(ny.prototype[e]=function(){var e=this.__wrapped__,l=i?[1]:arguments,s=e instanceof nb,u=l[0],c=s||aB(e),f=function(t){var e=a.apply(ny,eg([t],l));return i&&h?e[0]:e};c&&n&&"function"==typeof u&&1!=u.length&&(s=c=!1);var h=this.__chain__,d=!!this.__actions__.length,p=o&&!h,y=s&&!d;if(!o&&c){e=y?e:new nb(this);var g=t.apply(e,l);return g.__actions__.push({func:aa,args:[f],thisArg:r}),new nm(g,h)}return p&&y?t.apply(this,l):(g=this.thru(f),p?i?g.value()[0]:g.value():g)})}),ec(["pop","push","shift","sort","splice","unshift"],function(t){var e=tS[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);ny.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return e.apply(aB(i)?i:[],t)}return this[n](function(n){return e.apply(aB(n)?n:[],t)})}}),nV(nb.prototype,function(t,e){var n=ny[e];if(n){var r=n.name+"";tN.call(no,r)||(no[r]=[]),no[r].push({name:e,func:n})}}),no[rQ(r,2).name]=[{name:"wrapper",func:r}],nb.prototype.clone=function(){var t=new nb(this.__wrapped__);return t.__actions__=r$(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=r$(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=r$(this.__views__),t},nb.prototype.reverse=function(){if(this.__filtered__){var t=new nb(this);t.__dir__=-1,t.__filtered__=!0}else t=this.clone(),t.__dir__*=-1;return t},nb.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=aB(t),r=e<0,i=n?t.length:0,a=function(t,e,n){for(var r=-1,i=n.length;++r<i;){var a=n[r],o=a.size;switch(a.type){case"drop":t+=o;break;case"dropRight":e-=o;break;case"take":e=e3(e,t+o);break;case"takeRight":t=e5(t,e-o)}}return{start:t,end:e}}(0,i,this.__views__),o=a.start,l=a.end,s=l-o,u=r?l:o-1,c=this.__iteratees__,f=c.length,h=0,d=e3(s,this.__takeCount__);if(!n||!r&&i==s&&d==s)return rA(t,this.__actions__);var p=[];n:for(;s--&&h<d;){for(var y=-1,g=t[u+=e];++y<f;){var v=c[y],b=v.iteratee,x=v.type,O=b(g);if(2==x)g=O;else if(!O)if(1==x)continue n;else break n}p[h++]=g}return p},ny.prototype.at=ao,ny.prototype.chain=function(){return ai(this)},ny.prototype.commit=function(){return new nm(this.value(),this.__chain__)},ny.prototype.next=function(){this.__values__===r&&(this.__values__=a6(this.value()));var t=this.__index__>=this.__values__.length,e=t?r:this.__values__[this.__index__++];return{done:t,value:e}},ny.prototype.plant=function(t){for(var e,n=this;n instanceof nv;){var i=i$(n);i.__index__=0,i.__values__=r,e?a.__wrapped__=i:e=i;var a=i;n=n.__wrapped__}return a.__wrapped__=t,e},ny.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof nb){var e=t;return this.__actions__.length&&(e=new nb(this)),(e=e.reverse()).__actions__.push({func:aa,args:[i2],thisArg:r}),new nm(e,this.__chain__)}return this.thru(i2)},ny.prototype.toJSON=ny.prototype.valueOf=ny.prototype.value=function(){return rA(this.__wrapped__,this.__actions__)},ny.prototype.first=ny.prototype.head,t4&&(ny.prototype[t4]=function(){return this}),ny}();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(t6._=eK,define(function(){return eK})):t9?((t9.exports=eK)._=eK,t8._=eK):t6._=eK}).call(this)},8927(t){"use strict";var e=t.exports;t.exports.isNumber=function(t){return"number"==typeof t},t.exports.findMin=function(t){if(0===t.length)return 1/0;for(var e=t[0],n=1;n<t.length;n++)e=Math.min(e,t[n]);return e},t.exports.findMax=function(t){if(0===t.length)return-1/0;for(var e=t[0],n=1;n<t.length;n++)e=Math.max(e,t[n]);return e},t.exports.findMinMulti=function(t){for(var n=e.findMin(t[0]),r=1;r<t.length;r++)n=Math.min(n,e.findMin(t[r]));return n},t.exports.findMaxMulti=function(t){for(var n=e.findMax(t[0]),r=1;r<t.length;r++)n=Math.max(n,e.findMax(t[r]));return n},t.exports.inside=function(t,e,n){return t<=n&&n<=e}},9339(t,e,n){"use strict";var r=Math.log(2),i=t.exports,a=n(8927);function o(t){return 1-Math.abs(t)}t.exports.getUnifiedMinMax=function(t,e){return i.getUnifiedMinMaxMulti([t],e)},t.exports.getUnifiedMinMaxMulti=function(t,e){e=e||{};var n=!1,r=!1,i=a.isNumber(e.width)?e.width:2,o=a.isNumber(e.size)?e.size:50,l=a.isNumber(e.min)?e.min:(n=!0,a.findMinMulti(t)),s=a.isNumber(e.max)?e.max:(r=!0,a.findMaxMulti(t)),u=(s-l)/(o-1);return n&&(l-=2*i*u),r&&(s+=2*i*u),{min:l,max:s}},t.exports.create=function(t,e){if(e=e||{},!t||0===t.length)return[];var n=a.isNumber(e.size)?e.size:50,r=a.isNumber(e.width)?e.width:2,l=i.getUnifiedMinMax(t,{size:n,width:r,min:e.min,max:e.max}),s=l.min,u=l.max-s,c=u/(n-1);if(0===u)return[{x:s,y:1}];for(var f=[],h=0;h<n;h++)f.push({x:s+h*c,y:0});var d=function(t,e){for(var n={},r=0,i=-e;i<=e;i++)r+=t(i/e),n[i]=r;return n}(o,r),p=d[r],y=d[r-1]-d[r-2],g=0;t.forEach(function(t){var e=Math.floor((t-s)/c);if(!(e+r<0)&&!(e-r>=f.length)){var n=Math.max(e-r,0),i=Math.min(e+r,f.length-1),o=n-(e-r),l=e+r-i,u=p/(p-(d[-r-1+o]||0)-(d[-r-1+l]||0));o>0&&(g+=u*(o-1)*y);var h=Math.max(0,e-r+1);a.inside(0,f.length-1,h)&&(f[h].y+=u*y),a.inside(0,f.length-1,e+1)&&(f[e+1].y-=2*u*y),a.inside(0,f.length-1,i+1)&&(f[i+1].y+=u*y)}});var v=g,b=0,x=0;return f.forEach(function(t){b+=t.y,t.y=v+=b,x+=v}),x>0&&f.forEach(function(t){t.y/=x}),f},t.exports.getExpectedValueFromPdf=function(t){if(t&&0!==t.length){var e=0;return t.forEach(function(t){e+=t.x*t.y}),e}},t.exports.getXWithLeftTailArea=function(t,e){if(t&&0!==t.length){for(var n=0,r=0,i=0;i<t.length&&(r=i,!((n+=t[i].y)>=e));i++);return t[r].x}},t.exports.getPerplexity=function(t){if(t&&0!==t.length){var e=0;return t.forEach(function(t){var n=Math.log(t.y);isFinite(n)&&(e+=t.y*n)}),Math.pow(2,e=-e/r)}}},5643(t,e,n){"use strict";var r=n(3385);e.createRoot=r.createRoot,e.hydrateRoot=r.hydrateRoot},5114(t,e,n){"use strict";var r=n(1415),i=Array.prototype.concat,a=Array.prototype.slice,o=t.exports=function(t){for(var e=[],n=0,o=t.length;n<o;n++){var l=t[n];r(l)?e=i.call(e,a.call(l)):e.push(l)}return e};o.wrap=function(t){return function(){return t(o(arguments))}}}}]);
|
|
39
|
+
//# sourceMappingURL=915.js.map
|