apexsankey 1.3.0 → 1.4.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 +2 -0
- package/apexsankey.es.min.js +5195 -5197
- package/apexsankey.min.js +1 -1
- package/lib/layout/edgeOrdering/orderEdges.d.ts +3 -3
- package/lib/layout/layout.d.ts +6 -6
- package/lib/layout/nodePositioning/justified.d.ts +2 -2
- package/lib/models/ColorPalette.d.ts +3 -0
- package/lib/models/Options.d.ts +5 -1
- package/package.json +1 -1
package/apexsankey.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@svgdotjs/svg.js")):"function"==typeof define&&define.amd?define(["exports","@svgdotjs/svg.js"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).ApexSankey={},t.SVG)}(this,(function(t,e){"use strict";class n{constructor(t,e){this.injectedStyles=new Set,this.chartContainer=null,this.instanceId=e||Math.random().toString(36).substr(2,9),this.context=this.detectContext(t),this.chartContainer=t}getChartContainer(){return this.chartContainer}getChartScopedContainer(){return this.context===document?document.body||document.getElementsByTagName("body")[0]:this.chartContainer||this.context}detectContext(t){const e=t.getRootNode();return e instanceof ShadowRoot?e:document}getContext(){return this.context}getInstanceId(){return this.instanceId}isShadowDOM(){return this.context instanceof ShadowRoot}createElement(t){return document.createElement(t)}createElementNS(t,e){return document.createElementNS(t,e)}createTextNode(t){return document.createTextNode(t)}getElementById(t){return this.context===document?document.getElementById(t):this.context.querySelector(`#${t}`)}getElementsByClassName(t){if(this.context===document)return document.getElementsByClassName(t);const e=this.context.querySelectorAll(`.${t}`),n=Array.from(e);return{item:t=>n[t]||null,get length(){return n.length},[Symbol.iterator]:()=>n[Symbol.iterator](),...Object.fromEntries(n.map(((t,e)=>[e,t])))}}querySelector(t){return this.context.querySelector(t)}querySelectorAll(t){return this.context.querySelectorAll(t)}getAppendContainer(){return this.context===document?document.body||document.getElementsByTagName("body")[0]:this.context}getChartBounds(){var t;return(null==(t=this.chartContainer)?void 0:t.getBoundingClientRect())||new DOMRect}getBody(){if(this.context===document)return document.body||document.getElementsByTagName("body")[0];return this.context.host}dispatchEvent(t){this.context===document?document.dispatchEvent(t):this.context.dispatchEvent(t)}addEventListener(t,e,n){this.context===document||"mousemove"===t||"mouseup"===t||"keydown"===t?document.addEventListener(t,e,n):this.context.addEventListener(t,e,n)}removeEventListener(t,e,n){this.context===document||"mousemove"===t||"mouseup"===t||"keydown"===t?document.removeEventListener(t,e,n):this.context.removeEventListener(t,e,n)}injectStyles(t,e,n={}){const{force:r=!1,priority:o="normal"}=n;if(!r&&this.injectedStyles.has(e))return;if(r){const t=this.context.querySelector(`#${e}`);t&&(t.remove(),this.injectedStyles.delete(e))}if(this.context.querySelector(`#${e}`)&&!r)return void this.injectedStyles.add(e);const i=document.createElement("style");if(i.id=e,i.textContent=t,"normal"!==o&&i.setAttribute("data-priority",o),this.context===document)document.head.appendChild(i);else{const t=this.context;"high"===o?t.insertBefore(i,t.firstChild):t.appendChild(i)}this.injectedStyles.add(e)}injectStylesheets(t){t.forEach((({content:t,id:e,options:n})=>{this.injectStyles(t,e,n)}))}hasInjectedStyles(t){return this.injectedStyles.has(t)}removeStyles(t){const e=this.context.querySelector(`#${t}`);e&&(e.remove(),this.injectedStyles.delete(t))}removeAllStyles(){this.injectedStyles.forEach((t=>{const e=this.context.querySelector(`#${t}`);e&&e.remove()})),this.injectedStyles.clear()}getInjectedStyleIds(){return Array.from(this.injectedStyles)}getActiveElement(){if(this.context===document)return document.activeElement;return this.context.activeElement||document.activeElement}destroy(){this.removeAllStyles(),this.injectedStyles.clear()}}class r{constructor(t,e){if(!t)throw new Error("Container element is required");this.element=t,this.chartContext=new n(t,e)}getContext(){return this.chartContext}isShadowDOM(){return this.chartContext.isShadowDOM()}getTooltipContainer(){return this.chartContext.getAppendContainer()}injectStyles(t,e){this.chartContext.injectStyles(t,e)}createElement(t){return this.chartContext.createElement(t)}querySelector(t){return this.chartContext.querySelector(t)}addEventListener(t,e,n){this.chartContext.addEventListener(t,e,n)}removeEventListener(t,e,n){this.chartContext.removeEventListener(t,e,n)}dispatchEvent(t){this.chartContext.dispatchEvent(t)}destroy(){this.chartContext.destroy()}getInstanceId(){return this.chartContext.getInstanceId()}}function o(){}class i{constructor(t,e="apex"){this.canvas=t,this.prefix=e}getSvgString(){return this.canvas.svg().replace(/(<img [\w\W]+?)(>)/g,"$1 />").replace(/(<br)(>)/g,"$1 />").replace(/(<hr)(>)/g,"$1 />")}svgUrl(){const t=this.getSvgString(),e=new Blob([t],{type:"image/svg+xml;charset=utf-8"});return URL.createObjectURL(e)}triggerDownload(t,e){const n=document.createElement("a");n.href=t,n.download=e,document.body.appendChild(n),n.click(),document.body.removeChild(n)}exportToSVG(){this.triggerDownload(this.svgUrl(),`${this.prefix}-${(new Date).getTime()}.svg`)}}const u=class{static decodeLicenseData(t){try{const e=window.atob(t),n=JSON.parse(e);return n.issueDate&&n.expiryDate&&n.plan?{expiryDate:n.expiryDate,issueDate:n.issueDate,plan:n.plan,valid:!0}:null}catch{return null}}static generateLicenseKey(t,e,n="standard"){const r={expiryDate:e,issueDate:t,plan:n};return`APEX-${window.btoa(JSON.stringify(r))}`}static getLicenseStatus(){return this.licenseKey?(this.validationResult||(this.validationResult=this.validateLicense(this.licenseKey)),this.validationResult):{expired:!1,valid:!1}}static isLicenseValid(){return!!this.licenseKey&&(this.validationResult||(this.validationResult=this.validateLicense(this.licenseKey)),this.validationResult.valid)}static setLicense(t){this.licenseKey=t,this.validationResult=this.validateLicense(t),this.validationResult.valid||console.error(`[Apex] ${this.validationResult.message}`)}static validateLicense(t){try{if(!t.startsWith("APEX-"))return{expired:!1,message:'Invalid license key format. License key must start with "APEX-".',valid:!1};const e=t.split("-");if(2!==e.length)return{expired:!1,message:"Invalid license key format. Expected format: APEX-{encoded-data}.",valid:!1};const n=e[1],r=this.decodeLicenseData(n);if(!r)return{expired:!1,message:"Invalid license key. Unable to decode license data.",valid:!1};const o=new Date;return new Date(r.expiryDate)<o?{data:r,expired:!0,message:`License expired on ${r.expiryDate}. Please renew your license.`,valid:!1}:{data:r,expired:!1,valid:!0}}catch{return{expired:!1,message:"Invalid license key format or corrupted data.",valid:!1}}}};u.licenseKey=null,u.validationResult=null;let a=u;function c(t,n,r,o){const i=new e.G;return i.attr({"data-parent":o,"data-self":r,transform:void 0!==t&&void 0!==n?`translate(${t}, ${n})`:void 0}),i}const s={export:"data:image/svg+xml,%3csvg%20fill='%23000000'%20width='20px'%20height='20px'%20viewBox='0%200%2024%2024'%20id='export-2'%20xmlns='http://www.w3.org/2000/svg'%20class='icon%20line'%3e%3cpolyline%20id='primary'%20points='15%203%2021%203%2021%209'%20style='fill:%20none;%20stroke:%20rgb(0,%200,%200);%20stroke-linecap:%20round;%20stroke-linejoin:%20round;%20stroke-width:%201.5;'%3e%3c/polyline%3e%3cpath%20id='primary-2'%20data-name='primary'%20d='M21,13v7a1,1,0,0,1-1,1H4a1,1,0,0,1-1-1V4A1,1,0,0,1,4,3h7'%20style='fill:%20none;%20stroke:%20rgb(0,%200,%200);%20stroke-linecap:%20round;%20stroke-linejoin:%20round;%20stroke-width:%201.5;'%3e%3c/path%3e%3cline%20id='primary-3'%20data-name='primary'%20x1='11'%20y1='13'%20x2='21'%20y2='3'%20style='fill:%20none;%20stroke:%20rgb(0,%200,%200);%20stroke-linecap:%20round;%20stroke-linejoin:%20round;%20stroke-width:%201.5;'%3e%3c/line%3e%3c/svg%3e","fit-screen":"data:image/svg+xml,%3csvg%20width='20px'%20height='20px'%20viewBox='0%200%2032%2032'%20id='icon'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpolygon%20points='8%202%202%202%202%208%204%208%204%204%208%204%208%202'/%3e%3cpolygon%20points='24%202%2030%202%2030%208%2028%208%2028%204%2024%204%2024%202'/%3e%3cpolygon%20points='8%2030%202%2030%202%2024%204%2024%204%2028%208%2028%208%2030'/%3e%3cpolygon%20points='24%2030%2030%2030%2030%2024%2028%2024%2028%2028%2024%2028%2024%2030'/%3e%3cpath%20d='M24,24H8a2.0023,2.0023,0,0,1-2-2V10A2.0023,2.0023,0,0,1,8,8H24a2.0023,2.0023,0,0,1,2,2V22A2.0023,2.0023,0,0,1,24,24ZM8,10V22H24V10Z'/%3e%3crect%20fill='none'%20width='32'%20height='32'/%3e%3c/svg%3e","zoom-in":"data:image/svg+xml,%3csvg%20width='20px'%20height='20px'%20viewBox='0%200%2032%2032'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20xmlns:sketch='http://www.bohemiancoding.com/sketch/ns'%3e%3cg%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20transform='translate(-308.000000,%20-1139.000000)'%20fill='%23000000'%3e%3cpath%20d='M321.46,1163.45%20C315.17,1163.45%20310.07,1158.44%20310.07,1152.25%20C310.07,1146.06%20315.17,1141.04%20321.46,1141.04%20C327.75,1141.04%20332.85,1146.06%20332.85,1152.25%20C332.85,1158.44%20327.75,1163.45%20321.46,1163.45%20L321.46,1163.45%20Z%20M339.688,1169.25%20L331.429,1161.12%20C333.592,1158.77%20334.92,1155.67%20334.92,1152.25%20C334.92,1144.93%20328.894,1139%20321.46,1139%20C314.026,1139%20308,1144.93%20308,1152.25%20C308,1159.56%20314.026,1165.49%20321.46,1165.49%20C324.672,1165.49%20327.618,1164.38%20329.932,1162.53%20L338.225,1170.69%20C338.629,1171.09%20339.284,1171.09%20339.688,1170.69%20C340.093,1170.3%20340.093,1169.65%20339.688,1169.25%20L339.688,1169.25%20Z%20M326.519,1151.41%20L322.522,1151.41%20L322.522,1147.41%20C322.522,1146.85%20322.075,1146.41%20321.523,1146.41%20C320.972,1146.41%20320.524,1146.85%20320.524,1147.41%20L320.524,1151.41%20L316.529,1151.41%20C315.978,1151.41%20315.53,1151.59%20315.53,1152.14%20C315.53,1152.7%20315.978,1153.41%20316.529,1153.41%20L320.524,1153.41%20L320.524,1157.41%20C320.524,1157.97%20320.972,1158.41%20321.523,1158.41%20C322.075,1158.41%20322.522,1157.97%20322.522,1157.41%20L322.522,1153.41%20L326.519,1153.41%20C327.07,1153.41%20327.518,1152.96%20327.518,1152.41%20C327.518,1151.86%20327.07,1151.41%20326.519,1151.41%20L326.519,1151.41%20Z'%20/%3e%3c/g%3e%3c/g%3e%3c/svg%3e","zoom-out":"data:image/svg+xml,%3csvg%20width='20px'%20height='20px'%20viewBox='0%200%2032%2032'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cg%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%20%3e%3cg%20transform='translate(-360.000000,%20-1139.000000)'%20fill='%23000000'%3e%3cpath%20d='M373.46,1163.45%20C367.17,1163.45%20362.071,1158.44%20362.071,1152.25%20C362.071,1146.06%20367.17,1141.04%20373.46,1141.04%20C379.75,1141.04%20384.85,1146.06%20384.85,1152.25%20C384.85,1158.44%20379.75,1163.45%20373.46,1163.45%20L373.46,1163.45%20Z%20M391.688,1169.25%20L383.429,1161.12%20C385.592,1158.77%20386.92,1155.67%20386.92,1152.25%20C386.92,1144.93%20380.894,1139%20373.46,1139%20C366.026,1139%20360,1144.93%20360,1152.25%20C360,1159.56%20366.026,1165.49%20373.46,1165.49%20C376.672,1165.49%20379.618,1164.38%20381.932,1162.53%20L390.225,1170.69%20C390.629,1171.09%20391.284,1171.09%20391.688,1170.69%20C392.093,1170.3%20392.093,1169.65%20391.688,1169.25%20L391.688,1169.25%20Z%20M378.689,1151.41%20L368.643,1151.41%20C368.102,1151.41%20367.663,1151.84%20367.663,1152.37%20C367.663,1152.9%20368.102,1153.33%20368.643,1153.33%20L378.689,1153.33%20C379.23,1153.33%20379.669,1152.9%20379.669,1152.37%20C379.669,1151.84%20379.23,1151.41%20378.689,1151.41%20L378.689,1151.41%20Z'%20/%3e%3c/g%3e%3c/g%3e%3c/svg%3e"};class f{constructor(t,e){this.element=t,t&&(this.chartContext=e||new n(t),this.injectStyles())}injectStyles(){const t=`toolbar-styles-${this.chartContext.getInstanceId()}`;this.chartContext.injectStyles("\n #toolbar {\n display: flex;\n gap: 5px;\n position: absolute;\n right: 10px;\n top: 10px;\n z-index: 100;\n }\n \n .toolbar-item {\n align-items: center;\n background-color: var(--toolbar-bg-color, #FFFFFF);\n border: 1px solid var(--toolbar-border-color, #BCBCBC);\n cursor: pointer;\n display: flex;\n height: 30px;\n justify-content: center;\n width: 30px;\n border-radius: 3px;\n transition: all 0.2s ease;\n position: relative;\n }\n \n .toolbar-item:hover {\n background-color: var(--toolbar-hover-bg-color, #f8f9fa);\n border-color: var(--toolbar-border-color, #999);\n transform: translateY(-1px);\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);\n }\n \n .toolbar-item:active {\n transform: translateY(0);\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);\n }\n \n .toolbar-item:focus {\n outline: none;\n border-color: var(--button-bg-color, #0066cc);\n box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.2);\n }\n \n .toolbar-item img {\n width: 16px;\n height: 16px;\n pointer-events: none;\n filter: var(--toolbar-icon-filter, none);\n }\n \n .toolbar-item[disabled] {\n opacity: 0.5;\n cursor: not-allowed;\n pointer-events: none;\n }\n \n /* Tooltip styles */\n .toolbar-item::after {\n content: attr(data-tooltip);\n position: absolute;\n bottom: -35px;\n left: 50%;\n transform: translateX(-50%);\n background: var(--tooltip-bg-color, #333);\n color: var(--tooltip-text-color, white);\n padding: 4px 8px;\n border-radius: 4px;\n font-size: 12px;\n white-space: nowrap;\n opacity: 0;\n pointer-events: none;\n transition: opacity 0.2s ease;\n z-index: 1000;\n }\n \n .toolbar-item::before {\n content: '';\n position: absolute;\n bottom: -25px;\n left: 50%;\n transform: translateX(-50%);\n border: 5px solid transparent;\n border-bottom-color: var(--tooltip-bg-color, #333);\n opacity: 0;\n pointer-events: none;\n transition: opacity 0.2s ease;\n z-index: 1000;\n }\n \n .toolbar-item:hover::after,\n .toolbar-item:hover::before {\n opacity: 1;\n }\n \n /* Shadow DOM specific adjustments */\n :host #toolbar {\n display: flex;\n gap: 5px;\n position: absolute;\n right: 10px;\n top: 10px;\n z-index: 100;\n }\n",t)}createToolbarItem(t,e,n){const r=this.chartContext.createElement("div"),o=new Image;return o.src=e,o.alt=n||t,r.id=t,r.className="toolbar-item",r.setAttribute("role","button"),r.setAttribute("tabindex","0"),n&&(r.setAttribute("data-tooltip",n),r.setAttribute("aria-label",n)),r.append(o),r.addEventListener("keydown",(t=>{"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),r.click())})),r}render({enableExport:t=!1,enableFitscreen:e=!1,enableZoom:n=!1,onExport:r=o,onFitscreen:i=o,onZoom:u=o}){if(!this.element)return;const a=this.chartContext.querySelector("#toolbar");null==a||a.remove();const c=this.chartContext.createElement("div");if(c.id="toolbar",c.setAttribute("role","toolbar"),c.setAttribute("aria-label","Chart controls"),t){const t=this.createToolbarItem("export",s.export,"Export chart");t.addEventListener("click",(()=>{r()})),c.append(t)}if(n){const t=this.createToolbarItem("zoom-in",s["zoom-in"],"Zoom in"),e=this.createToolbarItem("zoom-out",s["zoom-out"],"Zoom out");t.addEventListener("click",(()=>{u(.1)})),e.addEventListener("click",(()=>{u(-.1)})),c.append(t,e)}if(e){const t=this.createToolbarItem("fit-screen",s["fit-screen"],"Fit to screen");t.addEventListener("click",(()=>{i()})),c.append(t)}this.element.append(c)}destroy(){const t=this.chartContext.querySelector("#toolbar");null==t||t.remove()}}const l=class{static add(t){this.remove(t);const e=document.createElement("div");e.className=this.WATERMARK_CLASS,e.textContent=this.WATERMARK_TEXT,Object.assign(e.style,{bottom:"5px",color:"#666",fontFamily:"Arial, sans-serif",fontSize:"14px",msUserSelect:"none",pointerEvents:"none",position:"absolute",right:"5px",userSelect:"none",webkitUserSelect:"none",zIndex:"1000"}),"static"===getComputedStyle(t).position&&(t.style.position="relative"),t.appendChild(e)}static exists(t){return!!t.querySelector(`.${this.WATERMARK_CLASS}`)}static remove(t){const e=t.querySelector(`.${this.WATERMARK_CLASS}`);e&&e.remove()}};l.WATERMARK_CLASS="apexgantt-watermark",l.WATERMARK_TEXT="Powered by apexcharts.com";let d=l;var h,p=(h={"À":"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"},function(t){return null==h?void 0:h[t]}),v="object"==typeof global&&global&&global.Object===Object&&global,g="object"==typeof self&&self&&self.Object===Object&&self,y=v||g||Function("return this")(),b=y.Symbol;var m=Array.isArray,_=Object.prototype,w=_.hasOwnProperty,x=_.toString,j=b?b.toStringTag:void 0;var E=Object.prototype.toString;var C="[object Null]",S="[object Undefined]",A=b?b.toStringTag:void 0;function k(t){return null==t?void 0===t?S:C:A&&A in Object(t)?function(t){var e=w.call(t,j),n=t[j];try{t[j]=void 0;var r=!0}catch(i){}var o=x.call(t);return r&&(e?t[j]=n:delete t[j]),o}(t):function(t){return E.call(t)}(t)}function O(t){return null!=t&&"object"==typeof t}var L="[object Symbol]";function $(t){return"symbol"==typeof t||O(t)&&k(t)==L}var M=1/0,z=b?b.prototype:void 0,I=z?z.toString:void 0;function N(t){if("string"==typeof t)return t;if(m(t))return function(t,e){for(var n=-1,r=null==t?0:t.length,o=Array(r);++n<r;)o[n]=e(t[n],n,t);return o}(t,N)+"";if($(t))return I?I.call(t):"";var e=t+"";return"0"==e&&1/t==-M?"-0":e}function T(t){return null==t?"":N(t)}var F=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,D=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var P=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var B=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var R="\\ud800-\\udfff",U="\\u2700-\\u27bf",W="a-z\\xdf-\\xf6\\xf8-\\xff",V="A-Z\\xc0-\\xd6\\xd8-\\xde",G="\\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",Z="["+G+"]",q="\\d+",Y="["+U+"]",K="["+W+"]",H="[^"+R+G+q+U+W+V+"]",X="(?:\\ud83c[\\udde6-\\uddff]){2}",J="[\\ud800-\\udbff][\\udc00-\\udfff]",Q="["+V+"]",tt="(?:"+K+"|"+H+")",et="(?:"+Q+"|"+H+")",nt="(?:['’](?:d|ll|m|re|s|t|ve))?",rt="(?:['’](?:D|LL|M|RE|S|T|VE))?",ot="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",it="[\\ufe0e\\ufe0f]?",ut=it+ot+("(?:\\u200d(?:"+["[^"+R+"]",X,J].join("|")+")"+it+ot+")*"),at="(?:"+[Y,X,J].join("|")+")"+ut,ct=RegExp([Q+"?"+K+"+"+nt+"(?="+[Z,Q,"$"].join("|")+")",et+"+"+rt+"(?="+[Z,Q+tt,"$"].join("|")+")",Q+"?"+tt+"+"+nt,Q+"+"+rt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",q,at].join("|"),"g");function st(t,e,n){return t=T(t),void 0===e?function(t){return B.test(t)}(t)?function(t){return t.match(ct)||[]}(t):function(t){return t.match(P)||[]}(t):t.match(e)||[]}var ft=RegExp("['’]","g");var lt,dt=(lt=function(t,e,n){return t+(n?"-":"")+e.toLowerCase()},function(t){return function(t,e,n,r){for(var o=-1,i=null==t?0:t.length;++o<i;)n=e(n,t[o],o,t);return n}(st(function(t){return(t=T(t))&&t.replace(F,p).replace(D,"")}(t).replace(ft,"")),lt,"")});const ht=(t,e="apex-tooltip-container")=>{let n=t.getElementById(e);if(!n){n=t.createElement("div"),n.id=e,n.setAttribute("role","tooltip"),n.setAttribute("aria-hidden","true");t.getAppendContainer().appendChild(n)}return n},pt=(t,e="",n,r="")=>{const o=t.getElementById(e);if(!o)return console.warn("Tooltip: Element not found, creating it"),ht(t,e),pt(t,e,n,r);if(n&&r){const t=r.includes("tooltip-content"),e=n.match(/background-color:\s*([^;]+);?/),i=n.match(/color:\s*([^;]+);?/),u=e?e[1]:"#333",a=i?i[1]:"white";o.innerHTML=t?r:`<div class="tooltip-content" style="background-color: ${u}; color: ${a};">${r}</div>`;const c=n+"; display: block !important; visibility: visible !important; opacity: 1 !important;";o.setAttribute("style",c),o.classList.add("visible"),o.setAttribute("aria-hidden","false")}else o.removeAttribute("style"),o.classList.remove("visible"),o.setAttribute("aria-hidden","true"),o.innerHTML=""},vt=({bgColor:t,borderColor:e,fontColor:n,fontFamily:r,fontSize:o,fontWeight:i,maxWidth:u,padding:a,placement:c="top",x:s,y:f})=>{const l=["position: absolute;","z-index: 1000;","pointer-events: none;"];return l.push("box-sizing: border-box;"),l.push("word-wrap: break-word;"),l.push("overflow-wrap: break-word;"),l.push(`left: ${s}px;`),l.push(`top: ${f}px;`),l.push(`data-placement: ${c};`),u&&(l.push(`width: ${u}px;`),l.push(`max-width: ${u}px;`)),e&&l.push(`border: 1px solid ${e};`),l.push("border-radius: 5px;"),n&&l.push(`color: ${n};`),r&&l.push(`font-family: ${r};`),i&&l.push(`font-weight: ${i};`),o&&l.push(`font-size: ${o};`),t&&l.push(`background-color: ${t};`),void 0!==a&&l.push(`padding: ${a}px;`),l.join(" ")};function gt(t,e){if(null===e.w)return 0;if(null===e.v)return 0;if(e.w===e.v)return Math.PI/2;const n=t.node(e.v),r=t.node(e.w);return Math.atan2(r.y-n.y,r.x-n.x)}function yt(t,e){return t===e||t!=t&&e!=e}function bt(t,e){for(var n=t.length;n--;)if(yt(t[n][0],e))return n;return-1}var mt=Array.prototype.splice;function _t(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 wt(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}_t.prototype.clear=function(){this.__data__=[],this.size=0},_t.prototype.delete=function(t){var e=this.__data__,n=bt(e,t);return!(n<0)&&(n==e.length-1?e.pop():mt.call(e,n,1),--this.size,!0)},_t.prototype.get=function(t){var e=this.__data__,n=bt(e,t);return n<0?void 0:e[n][1]},_t.prototype.has=function(t){return bt(this.__data__,t)>-1},_t.prototype.set=function(t,e){var n=this.__data__,r=bt(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};var xt="[object AsyncFunction]",jt="[object Function]",Et="[object GeneratorFunction]",Ct="[object Proxy]";function St(t){if(!wt(t))return!1;var e=k(t);return e==jt||e==Et||e==xt||e==Ct}var At,kt=y["__core-js_shared__"],Ot=(At=/[^.]+$/.exec(kt&&kt.keys&&kt.keys.IE_PROTO||""))?"Symbol(src)_1."+At:"";var Lt=Function.prototype.toString;function $t(t){if(null!=t){try{return Lt.call(t)}catch(e){}try{return t+""}catch(e){}}return""}var Mt=/^\[object .+?Constructor\]$/,zt=Function.prototype,It=Object.prototype,Nt=zt.toString,Tt=It.hasOwnProperty,Ft=RegExp("^"+Nt.call(Tt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Dt(t){return!(!wt(t)||(e=t,Ot&&Ot in e))&&(St(t)?Ft:Mt).test($t(t));var e}function Pt(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return Dt(n)?n:void 0}var Bt=Pt(y,"Map"),Rt=Pt(Object,"create");var Ut=Object.prototype.hasOwnProperty;var Wt=Object.prototype.hasOwnProperty;function Vt(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 Gt(t,e){var n,r,o=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof e?"string":"hash"]:o.map}function Zt(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])}}Vt.prototype.clear=function(){this.__data__=Rt?Rt(null):{},this.size=0},Vt.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Vt.prototype.get=function(t){var e=this.__data__;if(Rt){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return Ut.call(e,t)?e[t]:void 0},Vt.prototype.has=function(t){var e=this.__data__;return Rt?void 0!==e[t]:Wt.call(e,t)},Vt.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Rt&&void 0===e?"__lodash_hash_undefined__":e,this},Zt.prototype.clear=function(){this.size=0,this.__data__={hash:new Vt,map:new(Bt||_t),string:new Vt}},Zt.prototype.delete=function(t){var e=Gt(this,t).delete(t);return this.size-=e?1:0,e},Zt.prototype.get=function(t){return Gt(this,t).get(t)},Zt.prototype.has=function(t){return Gt(this,t).has(t)},Zt.prototype.set=function(t,e){var n=Gt(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};function qt(t){var e=this.__data__=new _t(t);this.size=e.size}qt.prototype.clear=function(){this.__data__=new _t,this.size=0},qt.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},qt.prototype.get=function(t){return this.__data__.get(t)},qt.prototype.has=function(t){return this.__data__.has(t)},qt.prototype.set=function(t,e){var n=this.__data__;if(n instanceof _t){var r=n.__data__;if(!Bt||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Zt(r)}return n.set(t,e),this.size=n.size,this};function Yt(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Zt;++e<n;)this.add(t[e])}function Kt(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}Yt.prototype.add=Yt.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},Yt.prototype.has=function(t){return this.__data__.has(t)};var Ht=1,Xt=2;function Jt(t,e,n,r,o,i){var u=n&Ht,a=t.length,c=e.length;if(a!=c&&!(u&&c>a))return!1;var s=i.get(t),f=i.get(e);if(s&&f)return s==e&&f==t;var l=-1,d=!0,h=n&Xt?new Yt:void 0;for(i.set(t,e),i.set(e,t);++l<a;){var p=t[l],v=e[l];if(r)var g=u?r(v,p,l,e,t,i):r(p,v,l,t,e,i);if(void 0!==g){if(g)continue;d=!1;break}if(h){if(!Kt(e,(function(t,e){if(u=e,!h.has(u)&&(p===t||o(p,t,n,r,i)))return h.push(e);var u}))){d=!1;break}}else if(p!==v&&!o(p,v,n,r,i)){d=!1;break}}return i.delete(t),i.delete(e),d}var Qt=y.Uint8Array;function te(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function ee(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}var ne=1,re=2,oe="[object Boolean]",ie="[object Date]",ue="[object Error]",ae="[object Map]",ce="[object Number]",se="[object RegExp]",fe="[object Set]",le="[object String]",de="[object Symbol]",he="[object ArrayBuffer]",pe="[object DataView]",ve=b?b.prototype:void 0,ge=ve?ve.valueOf:void 0;var ye=Object.prototype.propertyIsEnumerable,be=Object.getOwnPropertySymbols,me=be?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var n=-1,r=null==t?0:t.length,o=0,i=[];++n<r;){var u=t[n];e(u,n,t)&&(i[o++]=u)}return i}(be(t),(function(e){return ye.call(t,e)})))}:function(){return[]};function _e(t){return O(t)&&"[object Arguments]"==k(t)}var we=Object.prototype,xe=we.hasOwnProperty,je=we.propertyIsEnumerable,Ee=_e(function(){return arguments}())?_e:function(t){return O(t)&&xe.call(t,"callee")&&!je.call(t,"callee")};var Ce="object"==typeof t&&t&&!t.nodeType&&t,Se=Ce&&"object"==typeof module&&module&&!module.nodeType&&module,Ae=Se&&Se.exports===Ce?y.Buffer:void 0,ke=(Ae?Ae.isBuffer:void 0)||function(){return!1},Oe=9007199254740991,Le=/^(?:0|[1-9]\d*)$/;function $e(t,e){var n=typeof t;return!!(e=null==e?Oe:e)&&("number"==n||"symbol"!=n&&Le.test(t))&&t>-1&&t%1==0&&t<e}var Me=9007199254740991;function ze(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=Me}var Ie={};Ie["[object Float32Array]"]=Ie["[object Float64Array]"]=Ie["[object Int8Array]"]=Ie["[object Int16Array]"]=Ie["[object Int32Array]"]=Ie["[object Uint8Array]"]=Ie["[object Uint8ClampedArray]"]=Ie["[object Uint16Array]"]=Ie["[object Uint32Array]"]=!0,Ie["[object Arguments]"]=Ie["[object Array]"]=Ie["[object ArrayBuffer]"]=Ie["[object Boolean]"]=Ie["[object DataView]"]=Ie["[object Date]"]=Ie["[object Error]"]=Ie["[object Function]"]=Ie["[object Map]"]=Ie["[object Number]"]=Ie["[object Object]"]=Ie["[object RegExp]"]=Ie["[object Set]"]=Ie["[object String]"]=Ie["[object WeakMap]"]=!1;var Ne,Te="object"==typeof t&&t&&!t.nodeType&&t,Fe=Te&&"object"==typeof module&&module&&!module.nodeType&&module,De=Fe&&Fe.exports===Te&&v.process,Pe=function(){try{var t=Fe&&Fe.require&&Fe.require("util").types;return t||De&&De.binding&&De.binding("util")}catch(e){}}(),Be=Pe&&Pe.isTypedArray,Re=Be?(Ne=Be,function(t){return Ne(t)}):function(t){return O(t)&&ze(t.length)&&!!Ie[k(t)]},Ue=Object.prototype.hasOwnProperty;function We(t,e){var n=m(t),r=!n&&Ee(t),o=!n&&!r&&ke(t),i=!n&&!r&&!o&&Re(t),u=n||r||o||i,a=u?function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}(t.length,String):[],c=a.length;for(var s in t)!Ue.call(t,s)||u&&("length"==s||o&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||$e(s,c))||a.push(s);return a}var Ve=Object.prototype;var Ge=function(t,e){return function(n){return t(e(n))}}(Object.keys,Object),Ze=Object.prototype.hasOwnProperty;function qe(t){if(n=(e=t)&&e.constructor,e!==("function"==typeof n&&n.prototype||Ve))return Ge(t);var e,n,r=[];for(var o in Object(t))Ze.call(t,o)&&"constructor"!=o&&r.push(o);return r}function Ye(t){return null!=(e=t)&&ze(e.length)&&!St(e)?We(t):qe(t);var e}function Ke(t){return function(t,e,n){var r=e(t);return m(t)?r:function(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t}(r,n(t))}(t,Ye,me)}var He=1,Xe=Object.prototype.hasOwnProperty;var Je=Pt(y,"DataView"),Qe=Pt(y,"Promise"),tn=Pt(y,"Set"),en=Pt(y,"WeakMap"),nn="[object Map]",rn="[object Promise]",on="[object Set]",un="[object WeakMap]",an="[object DataView]",cn=$t(Je),sn=$t(Bt),fn=$t(Qe),ln=$t(tn),dn=$t(en),hn=k;(Je&&hn(new Je(new ArrayBuffer(1)))!=an||Bt&&hn(new Bt)!=nn||Qe&&hn(Qe.resolve())!=rn||tn&&hn(new tn)!=on||en&&hn(new en)!=un)&&(hn=function(t){var e=k(t),n="[object Object]"==e?t.constructor:void 0,r=n?$t(n):"";if(r)switch(r){case cn:return an;case sn:return nn;case fn:return rn;case ln:return on;case dn:return un}return e});var pn=1,vn="[object Arguments]",gn="[object Array]",yn="[object Object]",bn=Object.prototype.hasOwnProperty;function mn(t,e,n,r,o,i){var u=m(t),a=m(e),c=u?gn:hn(t),s=a?gn:hn(e),f=(c=c==vn?yn:c)==yn,l=(s=s==vn?yn:s)==yn,d=c==s;if(d&&ke(t)){if(!ke(e))return!1;u=!0,f=!1}if(d&&!f)return i||(i=new qt),u||Re(t)?Jt(t,e,n,r,o,i):function(t,e,n,r,o,i,u){switch(n){case pe:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case he:return!(t.byteLength!=e.byteLength||!i(new Qt(t),new Qt(e)));case oe:case ie:case ce:return yt(+t,+e);case ue:return t.name==e.name&&t.message==e.message;case se:case le:return t==e+"";case ae:var a=te;case fe:var c=r≠if(a||(a=ee),t.size!=e.size&&!c)return!1;var s=u.get(t);if(s)return s==e;r|=re,u.set(t,e);var f=Jt(a(t),a(e),r,o,i,u);return u.delete(t),f;case de:if(ge)return ge.call(t)==ge.call(e)}return!1}(t,e,c,n,r,o,i);if(!(n&pn)){var h=f&&bn.call(t,"__wrapped__"),p=l&&bn.call(e,"__wrapped__");if(h||p){var v=h?t.value():t,g=p?e.value():e;return i||(i=new qt),o(v,g,n,r,i)}}return!!d&&(i||(i=new qt),function(t,e,n,r,o,i){var u=n&He,a=Ke(t),c=a.length;if(c!=Ke(e).length&&!u)return!1;for(var s=c;s--;){var f=a[s];if(!(u?f in e:Xe.call(e,f)))return!1}var l=i.get(t),d=i.get(e);if(l&&d)return l==e&&d==t;var h=!0;i.set(t,e),i.set(e,t);for(var p=u;++s<c;){var v=t[f=a[s]],g=e[f];if(r)var y=u?r(g,v,f,e,t,i):r(v,g,f,t,e,i);if(!(void 0===y?v===g||o(v,g,n,r,i):y)){h=!1;break}p||(p="constructor"==f)}if(h&&!p){var b=t.constructor,m=e.constructor;b==m||!("constructor"in t)||!("constructor"in e)||"function"==typeof b&&b instanceof b&&"function"==typeof m&&m instanceof m||(h=!1)}return i.delete(t),i.delete(e),h}(t,e,n,r,o,i))}function _n(t,e,n,r,o){return t===e||(null==t||null==e||!O(t)&&!O(e)?t!=t&&e!=e:mn(t,e,n,r,_n,o))}var wn=1,xn=2;function jn(t){return t==t&&!wt(t)}function En(t,e){return function(n){return null!=n&&(n[t]===e&&(void 0!==e||t in Object(n)))}}function Cn(t){var e=function(t){for(var e=Ye(t),n=e.length;n--;){var r=e[n],o=t[r];e[n]=[r,o,jn(o)]}return e}(t);return 1==e.length&&e[0][2]?En(e[0][0],e[0][1]):function(n){return n===t||function(t,e,n,r){var o=n.length,i=o;if(null==t)return!i;for(t=Object(t);o--;){var u=n[o];if(u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++o<i;){var a=(u=n[o])[0],c=t[a],s=u[1];if(u[2]){if(void 0===c&&!(a in t))return!1}else{var f=new qt;if(!_n(s,c,wn|xn,r,f))return!1}}return!0}(n,0,e)}}var Sn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,An=/^\w*$/;function kn(t,e){if(m(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!$(t))||(An.test(t)||!Sn.test(t)||null!=e&&t in Object(e))}var On="Expected a function";function Ln(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError(On);var n=function(){var r=arguments,o=e?e.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var u=t.apply(this,r);return n.cache=i.set(o,u)||i,u};return n.cache=new(Ln.Cache||Zt),n}Ln.Cache=Zt;var $n=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Mn=/\\(\\)?/g,zn=function(t){var e=Ln(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace($n,(function(t,n,r,o){e.push(r?o.replace(Mn,"$1"):n||t)})),e}));function In(t,e){return m(t)?t:kn(t,e)?[t]:zn(T(t))}var Nn=1/0;function Tn(t){if("string"==typeof t||$(t))return t;var e=t+"";return"0"==e&&1/t==-Nn?"-0":e}function Fn(t,e){for(var n=0,r=(e=In(e,t)).length;null!=t&&n<r;)t=t[Tn(e[n++])];return n&&n==r?t:void 0}function Dn(t,e){return null!=t&&e in Object(t)}function Pn(t,e){return null!=t&&function(t,e,n){for(var r=-1,o=(e=In(e,t)).length,i=!1;++r<o;){var u=Tn(e[r]);if(!(i=null!=t&&n(t,u)))break;t=t[u]}return i||++r!=o?i:!!(o=null==t?0:t.length)&&ze(o)&&$e(u,o)&&(m(t)||Ee(t))}(t,e,Dn)}var Bn=1,Rn=2;function Un(t,e){return kn(t)&&jn(e)?En(Tn(t),e):function(n){var r=function(t,e,n){var r=null==t?void 0:Fn(t,e);return void 0===r?n:r}(n,t);return void 0===r&&r===e?Pn(n,t):_n(e,r,Bn|Rn)}}function Wn(t){return t}function Vn(t){return kn(t)?(e=Tn(t),function(t){return null==t?void 0:t[e]}):function(t){return function(e){return Fn(e,t)}}(t);var e}function Gn(t,e){return t&&t.length?function(t,e){for(var n,r=-1,o=t.length;++r<o;){var i=e(t[r]);void 0!==i&&(n=void 0===n?i:n+i)}return n}(t,"function"==typeof(n=e)?n:null==n?Wn:"object"==typeof n?m(n)?Un(n[0],n[1]):Cn(n):Vn(n)):0;var n}function Zn(t,e){const n=t.inEdges(e),r=t.outEdges(e),o=new Map;[...n,...r].forEach((t=>{o.has(t.name)||o.set(t.name,[]),o.get(t.name).push(t)}));const i=new Map(Array.from(o.entries()).map((([n,r])=>{const o=Gn(r,(e=>t.edge(e).value));return[n,Gn(r,(n=>t.edge(n).value*function(n){if(n.v===e)return t.node(n.w).y;if(n.w===e)return t.node(n.v).y;throw new Error}(n)))/o]}))),u=Array.from(i.keys());return u.sort(),u}function qn(t,e=!0){return function(n,r){const o=gt(t,n),i=gt(t,r),u=e?1:-1;return n.v===r.v&&n.w===r.w?"number"==typeof n.name&&"number"==typeof r.name?n.name-r.name:"string"==typeof n.name&&"string"==typeof r.name?n.name.localeCompare(r.name):0:Math.abs(o-i)<.001?n.v&&n.w&&r.v&&r.w?n.w===r.w?-1*(t.node(n.v).y-t.node(r.v).y):n.v===r.v?-1*(t.node(n.w).y-t.node(r.w).y):0:0:u*(o-i)}}function Yn(t,e,n=!0){return function(r,o){if(r.name!==o.name)return e.indexOf(r.name)-e.indexOf(o.name);const i=gt(t,r),u=gt(t,o),a=n?1:-1;return Math.abs(i-u)<.001?r.v&&r.w&&o.v&&o.w?r.w===o.w?a*(i>0?-1:1)*(t.node(r.v).y-t.node(o.v).y):r.v===o.v?a*(i>0?-1:1)*(t.node(r.w).y-t.node(o.w).y):0:0:a*(i-u)}}function Kn(t,e){let n=null;for(let r=0;r<t.length;++r)if(e(t[r])){n=r;break}return n}function Hn(t,e){if(0===t.length)return;let n,r=0;for(let i=t.length-1;i>=0;--i)n=t[i].dy/2,t[i][e]-n<r&&(t[i][e]=Math.min(t[i].Rmax,r+n)),r=t[i][e]+n;let o=t[0].Rmax+t[0].dy/2;for(let i=0;i<t.length;++i)n=t[i].dy/2,t[i][e]+n>o&&(t[i][e]=Math.max(n,o-n)),o=t[i][e]-n}function Xn(t){return function(e){!function(t,e){t.nodes().forEach((n=>{const r=t.node(n);let o=0,i=0;r.outgoing.forEach((n=>{const i=t.edge(n);i.x0=r.x+e.nodeWidth/2,i.y0=r.y+o+i.dy/2,i.d0=r.direction||"r",o+=i.dy})),r.incoming.forEach((n=>{const o=t.edge(n);o.x1=r.x-e.nodeWidth/2,o.y1=r.y+i+o.dy/2,o.d1=r.direction||"r",i+=o.dy}))}))}(e,t),function(t){t.nodes().forEach((e=>{const n=t.node(e),r=n.outgoing.map((e=>t.edge(e))),o=n.incoming.map((e=>t.edge(e)));r.sort(((t,e)=>t.y0-e.y0)),o.sort(((t,e)=>t.y1-e.y1)),Jn(r,"r0"),Jn(o,"r1")}))}(e);const n=[];return e.edges().forEach((t=>{const r=e.edge(t);r.id=`${t.v}-${t.w}-${t.name}`,n.push(r)})),n}}function Jn(t,e){t.forEach((t=>{t.Rmax=function(t){const e=t.x1-t.x0,n=t.y1-t.y0;return t.d0!==t.d1?Math.abs(n)/2.1:0!==n?(e*e+n*n)/Math.abs(4*n):1/0}(t),t[e]=Math.max(t.dy/2,t.d0===t.d1?.6*t.Rmax:5+t.dy/2)}));let n=Kn(t,"r0"===e?t=>t.y1>t.y0:t=>t.y0>t.y1);if(null===n&&(n=t.length),Hn(t.slice(n),e),n>0){const r=[];for(let e=n-1;e>=0;e--)r.push(t[e]);Hn(r,e)}}function Qn(t,e,n,r,o){if(0===r.length)return;const i=r.map((n=>{const r=`__${e.v}_${e.w}_${n}`;return t.setNode(r,{data:null,direction:o,dummy:!0,rank:n}),r})),u=[e.v,...i,e.w];u.forEach(((r,o)=>{o+1<u.length&&t.setEdge(u[o],u[o+1],{data:t.edge(e).data,origEdge:e,origLabel:n,source:t.node(e.v),target:t.node(e.w),value:t.edge(e).value},e.name)})),t.removeEdge(e)}function tr(t,e,n){return function(t,e,n){let r,o,i;e.length>n.length?(r=e,i=n):(r=n,i=e);const u=[];r.forEach((e=>{i.forEach(((n,r)=>{(t.hasEdge(e,n)||t.hasEdge(n,e))&&u.push(r)}))}));let a=1;for(;a<o;)a*=2;const c=2*a-1;a-=1;const s=new Array(c);for(let l=0;l<c;l++)s[l]=0;let f=0;return u.forEach((t=>{let e=t+a;for(s[e]++;e>0;)e%2&&(f+=s[e+1]),e=Math.floor((e-1)/2),s[e]++})),f}(t,e,n)}var er,nr,rr,or,ir,ur,ar,cr,sr,fr,lr,dr,hr,pr,vr,gr,yr,br,mr,_r,wr,xr,jr,Er,Cr,Sr,Ar,kr,Or,Lr,$r,Mr,zr,Ir,Nr,Tr,Fr,Dr,Pr,Br,Rr,Ur,Wr,Vr,Gr,Zr,qr,Yr,Kr,Hr,Xr,Jr,Qr,to,eo,no,ro,oo,io,uo,ao,co,so,fo,lo,ho,po,vo,go,yo,bo,mo,_o,wo,xo,jo,Eo,Co,So,Ao,ko,Oo,Lo,$o,Mo,zo,Io,No,To,Fo,Do,Po,Bo,Ro,Uo,Wo,Vo,Go,Zo,qo,Yo,Ko,Ho,Xo,Jo,Qo,ti,ei,ni="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function ri(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function oi(){if(or)return rr;return or=1,rr=function(t,e){return t===e||t!=t&&e!=e}}function ii(){if(ur)return ir;ur=1;var t=oi();return ir=function(e,n){for(var r=e.length;r--;)if(t(e[r][0],n))return r;return-1}}function ui(){if(gr)return vr;gr=1;var t=nr?er:(nr=1,er=function(){this.__data__=[],this.size=0}),e=function(){if(cr)return ar;cr=1;var t=ii(),e=Array.prototype.splice;return ar=function(n){var r=this.__data__,o=t(r,n);return!(o<0||(o==r.length-1?r.pop():e.call(r,o,1),--this.size,0))}}(),n=function(){if(fr)return sr;fr=1;var t=ii();return sr=function(e){var n=this.__data__,r=t(n,e);return r<0?void 0:n[r][1]}}(),r=function(){if(dr)return lr;dr=1;var t=ii();return lr=function(e){return t(this.__data__,e)>-1}}(),o=function(){if(pr)return hr;pr=1;var t=ii();return hr=function(e,n){var r=this.__data__,o=t(r,e);return o<0?(++this.size,r.push([e,n])):r[o][1]=n,this}}();function i(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])}}return i.prototype.clear=t,i.prototype.delete=e,i.prototype.get=n,i.prototype.has=r,i.prototype.set=o,vr=i}function ai(){if(Sr)return Cr;Sr=1;var t="object"==typeof ni&&ni&&ni.Object===Object&∋return Cr=t}function ci(){if(kr)return Ar;kr=1;var t=ai(),e="object"==typeof self&&self&&self.Object===Object&&self,n=t||e||Function("return this")();return Ar=n}function si(){if(Lr)return Or;Lr=1;var t=ci().Symbol;return Or=t}function fi(){if(Tr)return Nr;Tr=1;var t=si(),e=function(){if(Mr)return $r;Mr=1;var t=si(),e=Object.prototype,n=e.hasOwnProperty,r=e.toString,o=t?t.toStringTag:void 0;return $r=function(t){var e=n.call(t,o),i=t[o];try{t[o]=void 0;var u=!0}catch(c){}var a=r.call(t);return u&&(e?t[o]=i:delete t[o]),a}}(),n=function(){if(Ir)return zr;Ir=1;var t=Object.prototype.toString;return zr=function(e){return t.call(e)}}(),r=t?t.toStringTag:void 0;return Nr=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":r&&r in Object(t)?e(t):n(t)}}function li(){if(Dr)return Fr;return Dr=1,Fr=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}}function di(){if(Br)return Pr;Br=1;var t=fi(),e=li();return Pr=function(n){if(!e(n))return!1;var r=t(n);return"[object Function]"==r||"[object GeneratorFunction]"==r||"[object AsyncFunction]"==r||"[object Proxy]"==r}}function hi(){if(Vr)return Wr;Vr=1;var t=function(){if(Ur)return Rr;Ur=1;var t=ci()["__core-js_shared__"];return Rr=t}(),e=function(){var e=/[^.]+$/.exec(t&&t.keys&&t.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();return Wr=function(t){return!!e&&e in t},Wr}function pi(){if(Zr)return Gr;Zr=1;var t=Function.prototype.toString;return Gr=function(e){if(null!=e){try{return t.call(e)}catch(n){}try{return e+""}catch(n){}}return""},Gr}function vi(){if(Jr)return Xr;Jr=1;var t=function(){if(Yr)return qr;Yr=1;var t=di(),e=hi(),n=li(),r=pi(),o=/^\[object .+?Constructor\]$/,i=Function.prototype,u=Object.prototype,a=i.toString,c=u.hasOwnProperty,s=RegExp("^"+a.call(c).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");return qr=function(i){return!(!n(i)||e(i))&&(t(i)?s:o).test(r(i))}}(),e=(Hr||(Hr=1,Kr=function(t,e){return null==t?void 0:t[e]}),Kr);return Xr=function(n,r){var o=e(n,r);return t(o)?o:void 0},Xr}function gi(){if(to)return Qr;to=1;var t=vi()(ci(),"Map");return Qr=t}function yi(){if(no)return eo;no=1;var t=vi()(Object,"create");return eo=t}function bi(){if(vo)return po;vo=1;var t=function(){if(oo)return ro;oo=1;var t=yi();return ro=function(){this.__data__=t?t(null):{},this.size=0}}(),e=uo?io:(uo=1,io=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}),n=function(){if(co)return ao;co=1;var t=yi(),e=Object.prototype.hasOwnProperty;return ao=function(n){var r=this.__data__;if(t){var o=r[n];return"__lodash_hash_undefined__"===o?void 0:o}return e.call(r,n)?r[n]:void 0}}(),r=function(){if(fo)return so;fo=1;var t=yi(),e=Object.prototype.hasOwnProperty;return so=function(n){var r=this.__data__;return t?void 0!==r[n]:e.call(r,n)}}(),o=function(){if(ho)return lo;ho=1;var t=yi();return lo=function(e,n){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=t&&void 0===n?"__lodash_hash_undefined__":n,this}}();function i(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])}}return i.prototype.clear=t,i.prototype.delete=e,i.prototype.get=n,i.prototype.has=r,i.prototype.set=o,po=i}function mi(){if(wo)return _o;wo=1;var t=mo?bo:(mo=1,bo=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t});return _o=function(e,n){var r=e.__data__;return t(n)?r["string"==typeof n?"string":"hash"]:r.map}}function _i(){if($o)return Lo;$o=1;var t=function(){if(yo)return go;yo=1;var t=bi(),e=ui(),n=gi();return go=function(){this.size=0,this.__data__={hash:new t,map:new(n||e),string:new t}}}(),e=function(){if(jo)return xo;jo=1;var t=mi();return xo=function(e){var n=t(this,e).delete(e);return this.size-=n?1:0,n}}(),n=function(){if(Co)return Eo;Co=1;var t=mi();return Eo=function(e){return t(this,e).get(e)}}(),r=function(){if(Ao)return So;Ao=1;var t=mi();return So=function(e){return t(this,e).has(e)}}(),o=function(){if(Oo)return ko;Oo=1;var t=mi();return ko=function(e,n){var r=t(this,e),o=r.size;return r.set(e,n),this.size+=r.size==o?0:1,this}}();function i(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])}}return i.prototype.clear=t,i.prototype.delete=e,i.prototype.get=n,i.prototype.has=r,i.prototype.set=o,Lo=i}function wi(){if(No)return Io;No=1;var t=ui(),e=function(){if(br)return yr;br=1;var t=ui();return yr=function(){this.__data__=new t,this.size=0}}(),n=_r?mr:(_r=1,mr=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}),r=xr?wr:(xr=1,wr=function(t){return this.__data__.get(t)}),o=Er?jr:(Er=1,jr=function(t){return this.__data__.has(t)}),i=function(){if(zo)return Mo;zo=1;var t=ui(),e=gi(),n=_i();return Mo=function(r,o){var i=this.__data__;if(i instanceof t){var u=i.__data__;if(!e||u.length<199)return u.push([r,o]),this.size=++i.size,this;i=this.__data__=new n(u)}return i.set(r,o),this.size=i.size,this}}();function u(e){var n=this.__data__=new t(e);this.size=n.size}return u.prototype.clear=e,u.prototype.delete=n,u.prototype.get=r,u.prototype.has=o,u.prototype.set=i,Io=u}function xi(){if(Fo)return To;return Fo=1,To=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}}function ji(){if(Po)return Do;Po=1;var t=vi(),e=function(){try{var e=t(Object,"defineProperty");return e({},"",{}),e}catch(n){}}();return Do=e}function Ei(){if(Ro)return Bo;Ro=1;var t=ji();return Bo=function(e,n,r){"__proto__"==n&&t?t(e,n,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[n]=r},Bo}function Ci(){if(Wo)return Uo;Wo=1;var t=Ei(),e=oi(),n=Object.prototype.hasOwnProperty;return Uo=function(r,o,i){var u=r[o];n.call(r,o)&&e(u,i)&&(void 0!==i||o in r)||t(r,o,i)},Uo}function Si(){if(Go)return Vo;Go=1;var t=Ci(),e=Ei();return Vo=function(n,r,o,i){var u=!o;o||(o={});for(var a=-1,c=r.length;++a<c;){var s=r[a],f=i?i(o[s],n[s],s,o,n):void 0;void 0===f&&(f=n[s]),u?e(o,s,f):t(o,s,f)}return o},Vo}function Ai(){if(Ko)return Yo;return Ko=1,Yo=function(t){return null!=t&&"object"==typeof t}}function ki(){if(Qo)return Jo;Qo=1;var t=function(){if(Xo)return Ho;Xo=1;var t=fi(),e=Ai();return Ho=function(n){return e(n)&&"[object Arguments]"==t(n)}}(),e=Ai(),n=Object.prototype,r=n.hasOwnProperty,o=n.propertyIsEnumerable,i=t(function(){return arguments}())?t:function(t){return e(t)&&r.call(t,"callee")&&!o.call(t,"callee")};return Jo=i}function Oi(){if(ei)return ti;ei=1;var t=Array.isArray;return ti=t}var Li,$i,Mi,zi,Ii,Ni,Ti,Fi,Di,Pi,Bi,Ri={exports:{}};function Ui(){return Mi||(Mi=1,t=Ri,e=Ri.exports,n=ci(),r=$i?Li:($i=1,Li=function(){return!1}),o=e&&!e.nodeType&&e,i=o&&t&&!t.nodeType&&t,u=i&&i.exports===o?n.Buffer:void 0,a=(u?u.isBuffer:void 0)||r,t.exports=a),Ri.exports;var t,e,n,r,o,i,u,a}function Wi(){if(Ii)return zi;Ii=1;var t=/^(?:0|[1-9]\d*)$/;return zi=function(e,n){var r=typeof e;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&t.test(e))&&e>-1&&e%1==0&&e<n}}function Vi(){if(Ti)return Ni;Ti=1;return Ni=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}}function Gi(){if(Bi)return Pi;return Bi=1,Pi=function(t){return function(e){return t(e)}},Pi}Ri.exports;var Zi,qi,Yi,Ki,Hi,Xi,Ji,Qi,tu,eu,nu,ru,ou,iu,uu,au,cu,su,fu,lu,du,hu,pu,vu,gu,yu,bu,mu={exports:{}};function _u(){return Zi||(Zi=1,t=mu,e=mu.exports,n=ai(),r=e&&!e.nodeType&&e,o=r&&t&&!t.nodeType&&t,i=o&&o.exports===r&&n.process,u=function(){try{var t=o&&o.require&&o.require("util").types;return t||i&&i.binding&&i.binding("util")}catch(e){}}(),t.exports=u),mu.exports;var t,e,n,r,o,i,u}function wu(){if(Yi)return qi;Yi=1;var t=function(){if(Di)return Fi;Di=1;var t=fi(),e=Vi(),n=Ai(),r={};return r["[object Float32Array]"]=r["[object Float64Array]"]=r["[object Int8Array]"]=r["[object Int16Array]"]=r["[object Int32Array]"]=r["[object Uint8Array]"]=r["[object Uint8ClampedArray]"]=r["[object Uint16Array]"]=r["[object Uint32Array]"]=!0,r["[object Arguments]"]=r["[object Array]"]=r["[object ArrayBuffer]"]=r["[object Boolean]"]=r["[object DataView]"]=r["[object Date]"]=r["[object Error]"]=r["[object Function]"]=r["[object Map]"]=r["[object Number]"]=r["[object Object]"]=r["[object RegExp]"]=r["[object Set]"]=r["[object String]"]=r["[object WeakMap]"]=!1,Fi=function(o){return n(o)&&e(o.length)&&!!r[t(o)]}}(),e=Gi(),n=_u(),r=n&&n.isTypedArray,o=r?e(r):t;return qi=o}function xu(){if(Hi)return Ki;Hi=1;var t=qo?Zo:(qo=1,Zo=function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}),e=ki(),n=Oi(),r=Ui(),o=Wi(),i=wu(),u=Object.prototype.hasOwnProperty;return Ki=function(a,c){var s=n(a),f=!s&&e(a),l=!s&&!f&&r(a),d=!s&&!f&&!l&&i(a),h=s||f||l||d,p=h?t(a.length,String):[],v=p.length;for(var g in a)!c&&!u.call(a,g)||h&&("length"==g||l&&("offset"==g||"parent"==g)||d&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||o(g,v))||p.push(g);return p}}function ju(){if(Ji)return Xi;Ji=1;var t=Object.prototype;return Xi=function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||t)}}function Eu(){if(tu)return Qi;return tu=1,Qi=function(t,e){return function(n){return t(e(n))}},Qi}function Cu(){if(ou)return ru;ou=1;var t=ju(),e=function(){if(nu)return eu;nu=1;var t=Eu()(Object.keys,Object);return eu=t}(),n=Object.prototype.hasOwnProperty;return ru=function(r){if(!t(r))return e(r);var o=[];for(var i in Object(r))n.call(r,i)&&"constructor"!=i&&o.push(i);return o},ru}function Su(){if(uu)return iu;uu=1;var t=di(),e=Vi();return iu=function(n){return null!=n&&e(n.length)&&!t(n)}}function Au(){if(cu)return au;cu=1;var t=xu(),e=Cu(),n=Su();return au=function(r){return n(r)?t(r):e(r)},au}function ku(){if(pu)return hu;pu=1;var t=li(),e=ju(),n=(du||(du=1,lu=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}),lu),r=Object.prototype.hasOwnProperty;return hu=function(o){if(!t(o))return n(o);var i=e(o),u=[];for(var a in o)("constructor"!=a||!i&&r.call(o,a))&&u.push(a);return u},hu}function Ou(){if(gu)return vu;gu=1;var t=xu(),e=ku(),n=Su();return vu=function(r){return n(r)?t(r,!0):e(r)},vu}mu.exports;var Lu,$u,Mu,zu,Iu,Nu,Tu,Fu,Du,Pu,Bu,Ru,Uu,Wu,Vu,Gu,Zu,qu,Yu,Ku,Hu,Xu,Ju,Qu,ta,ea,na,ra,oa,ia,ua,aa,ca,sa,fa,la,da,ha,pa,va,ga,ya,ba,ma,_a,wa,xa,ja,Ea,Ca,Sa,Aa,ka,Oa,La,$a,Ma,za,Ia,Na,Ta,Fa,Da,Pa,Ba,Ra,Ua,Wa,Va,Ga,Za,qa,Ya,Ka,Ha,Xa,Ja,Qa,tc,ec,nc,rc,oc,ic,uc,ac,cc,sc,fc,lc,dc,hc,pc,vc,gc,yc,bc,mc,_c,wc,xc,jc,Ec,Cc,Sc,Ac,kc,Oc,Lc,$c,Mc,zc,Ic,Nc,Tc,Fc,Dc,Pc,Bc,Rc,Uc,Wc,Vc,Gc,Zc,qc,Yc,Kc,Hc,Xc,Jc,Qc,ts,es,ns,rs,os,is,us,as,cs,ss,fs,ls,ds,hs,ps,vs,gs,ys,bs,ms,_s,ws,xs,js,Es,Cs,Ss,As,ks,Os,Ls,$s,Ms,zs,Is,Ns,Ts,Fs,Ds,Ps,Bs,Rs,Us,Ws,Vs,Gs,Zs,qs,Ys,Ks,Hs,Xs,Js,Qs,tf,ef,nf,rf,of,uf,af,cf,sf,ff,lf,df,hf,pf,vf,gf,yf,bf,mf,_f,wf,xf,jf,Ef,Cf,Sf,Af,kf,Of,Lf,$f,Mf,zf,If,Nf,Tf,Ff,Df,Pf,Bf,Rf,Uf,Wf,Vf,Gf,Zf,qf,Yf,Kf,Hf,Xf,Jf,Qf,tl,el={exports:{}};function nl(){if(Iu)return zu;return Iu=1,zu=function(t,e){for(var n=-1,r=null==t?0:t.length,o=0,i=[];++n<r;){var u=t[n];e(u,n,t)&&(i[o++]=u)}return i}}function rl(){if(Tu)return Nu;return Tu=1,Nu=function(){return[]}}function ol(){if(Du)return Fu;Du=1;var t=nl(),e=rl(),n=Object.prototype.propertyIsEnumerable,r=Object.getOwnPropertySymbols,o=r?function(e){return null==e?[]:(e=Object(e),t(r(e),(function(t){return n.call(e,t)})))}:e;return Fu=o}function il(){if(Uu)return Ru;return Uu=1,Ru=function(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t}}function ul(){if(Vu)return Wu;Vu=1;var t=Eu()(Object.getPrototypeOf,Object);return Wu=t}function al(){if(Zu)return Gu;Zu=1;var t=il(),e=ul(),n=ol(),r=rl(),o=Object.getOwnPropertySymbols?function(r){for(var o=[];r;)t(o,n(r)),r=e(r);return o}:r;return Gu=o}function cl(){if(Hu)return Ku;Hu=1;var t=il(),e=Oi();return Ku=function(n,r,o){var i=r(n);return e(n)?i:t(i,o(n))},Ku}function sl(){if(Ju)return Xu;Ju=1;var t=cl(),e=ol(),n=Au();return Xu=function(r){return t(r,n,e)},Xu}function fl(){if(ua)return ia;ua=1;var t=vi()(ci(),"Set");return ia=t}function ll(){if(fa)return sa;fa=1;var t=function(){if(na)return ea;na=1;var t=vi()(ci(),"DataView");return ea=t}(),e=gi(),n=function(){if(oa)return ra;oa=1;var t=vi()(ci(),"Promise");return ra=t}(),r=fl(),o=function(){if(ca)return aa;ca=1;var t=vi()(ci(),"WeakMap");return aa=t}(),i=fi(),u=pi(),a="[object Map]",c="[object Promise]",s="[object Set]",f="[object WeakMap]",l="[object DataView]",d=u(t),h=u(e),p=u(n),v=u(r),g=u(o),y=i;return(t&&y(new t(new ArrayBuffer(1)))!=l||e&&y(new e)!=a||n&&y(n.resolve())!=c||r&&y(new r)!=s||o&&y(new o)!=f)&&(y=function(t){var e=i(t),n="[object Object]"==e?t.constructor:void 0,r=n?u(n):"";if(r)switch(r){case d:return l;case h:return a;case p:return c;case v:return s;case g:return f}return e}),sa=y}function dl(){if(pa)return ha;pa=1;var t=ci().Uint8Array;return ha=t}function hl(){if(ga)return va;ga=1;var t=dl();return va=function(e){var n=new e.constructor(e.byteLength);return new t(n).set(new t(e)),n}}function pl(){if(Sa)return Ca;Sa=1;var t=hl(),e=function(){if(ba)return ya;ba=1;var t=hl();return ya=function(e,n){var r=n?t(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}}(),n=function(){if(_a)return ma;_a=1;var t=/\w*$/;return ma=function(e){var n=new e.constructor(e.source,t.exec(e));return n.lastIndex=e.lastIndex,n}}(),r=function(){if(xa)return wa;xa=1;var t=si(),e=t?t.prototype:void 0,n=e?e.valueOf:void 0;return wa=function(t){return n?Object(n.call(t)):{}}}(),o=function(){if(Ea)return ja;Ea=1;var t=hl();return ja=function(e,n){var r=n?t(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}}();return Ca=function(i,u,a){var c=i.constructor;switch(u){case"[object ArrayBuffer]":return t(i);case"[object Boolean]":case"[object Date]":return new c(+i);case"[object DataView]":return e(i,a);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return o(i,a);case"[object Map]":case"[object Set]":return new c;case"[object Number]":case"[object String]":return new c(i);case"[object RegExp]":return n(i);case"[object Symbol]":return r(i)}},Ca}function vl(){if(ka)return Aa;ka=1;var t=li(),e=Object.create,n=function(){function n(){}return function(r){if(!t(r))return{};if(e)return e(r);n.prototype=r;var o=new n;return n.prototype=void 0,o}}();return Aa=n}function gl(){if(Ia)return za;Ia=1;var t=function(){if(Ma)return $a;Ma=1;var t=ll(),e=Ai();return $a=function(n){return e(n)&&"[object Map]"==t(n)}}(),e=Gi(),n=_u(),r=n&&n.isMap,o=r?e(r):t;return za=o}function yl(){if(Da)return Fa;Da=1;var t=function(){if(Ta)return Na;Ta=1;var t=ll(),e=Ai();return Na=function(n){return e(n)&&"[object Set]"==t(n)}}(),e=Gi(),n=_u(),r=n&&n.isSet,o=r?e(r):t;return Fa=o}function bl(){if(Ba)return Pa;Ba=1;var t,e,n,r,o,i,u,a=wi(),c=xi(),s=Ci(),f=function(){if(fu)return su;fu=1;var t=Si(),e=Au();return su=function(n,r){return n&&t(r,e(r),n)},su}(),l=function(){if(bu)return yu;bu=1;var t=Si(),e=Ou();return yu=function(n,r){return n&&t(r,e(r),n)},yu}(),d=(Lu||(Lu=1,t=el,e=el.exports,n=ci(),r=e&&!e.nodeType&&e,o=r&&t&&!t.nodeType&&t,i=o&&o.exports===r?n.Buffer:void 0,u=i?i.allocUnsafe:void 0,t.exports=function(t,e){if(e)return t.slice();var n=t.length,r=u?u(n):new t.constructor(n);return t.copy(r),r}),el.exports),h=Mu?$u:(Mu=1,$u=function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}),p=function(){if(Bu)return Pu;Bu=1;var t=Si(),e=ol();return Pu=function(n,r){return t(n,e(n),r)},Pu}(),v=function(){if(Yu)return qu;Yu=1;var t=Si(),e=al();return qu=function(n,r){return t(n,e(n),r)},qu}(),g=sl(),y=function(){if(ta)return Qu;ta=1;var t=cl(),e=al(),n=Ou();return Qu=function(r){return t(r,n,e)},Qu}(),b=ll(),m=function(){if(da)return la;da=1;var t=Object.prototype.hasOwnProperty;return la=function(e){var n=e.length,r=new e.constructor(n);return n&&"string"==typeof e[0]&&t.call(e,"index")&&(r.index=e.index,r.input=e.input),r}}(),_=pl(),w=function(){if(La)return Oa;La=1;var t=vl(),e=ul(),n=ju();return Oa=function(r){return"function"!=typeof r.constructor||n(r)?{}:t(e(r))},Oa}(),x=Oi(),j=Ui(),E=gl(),C=li(),S=yl(),A=Au(),k=Ou(),O="[object Arguments]",L="[object Function]",$="[object Object]",M={};return M[O]=M["[object Array]"]=M["[object ArrayBuffer]"]=M["[object DataView]"]=M["[object Boolean]"]=M["[object Date]"]=M["[object Float32Array]"]=M["[object Float64Array]"]=M["[object Int8Array]"]=M["[object Int16Array]"]=M["[object Int32Array]"]=M["[object Map]"]=M["[object Number]"]=M[$]=M["[object RegExp]"]=M["[object Set]"]=M["[object String]"]=M["[object Symbol]"]=M["[object Uint8Array]"]=M["[object Uint8ClampedArray]"]=M["[object Uint16Array]"]=M["[object Uint32Array]"]=!0,M["[object Error]"]=M[L]=M["[object WeakMap]"]=!1,Pa=function t(e,n,r,o,i,u){var z,I=1&n,N=2&n,T=4&n;if(r&&(z=i?r(e,o,i,u):r(e)),void 0!==z)return z;if(!C(e))return e;var F=x(e);if(F){if(z=m(e),!I)return h(e,z)}else{var D=b(e),P=D==L||"[object GeneratorFunction]"==D;if(j(e))return d(e,I);if(D==$||D==O||P&&!i){if(z=N||P?{}:w(e),!I)return N?v(e,l(z,e)):p(e,f(z,e))}else{if(!M[D])return i?e:{};z=_(e,D,I)}}u||(u=new a);var B=u.get(e);if(B)return B;u.set(e,z),S(e)?e.forEach((function(o){z.add(t(o,n,r,o,e,u))})):E(e)&&e.forEach((function(o,i){z.set(i,t(o,n,r,i,e,u))}));var R=F?void 0:(T?N?y:g:N?k:A)(e);return c(R||e,(function(o,i){R&&(o=e[i=o]),s(z,i,t(o,n,r,i,e,u))})),z},Pa}function ml(){if(Va)return Wa;return Va=1,Wa=function(t){return function(){return t}}}function _l(){if(Ya)return qa;Ya=1;var t=(Za||(Za=1,Ga=function(t){return function(e,n,r){for(var o=-1,i=Object(e),u=r(e),a=u.length;a--;){var c=u[t?a:++o];if(!1===n(i[c],c,i))break}return e}}),Ga),e=t();return qa=e}function wl(){if(Ha)return Ka;Ha=1;var t=_l(),e=Au();return Ka=function(n,r){return n&&t(n,r,e)},Ka}function xl(){if(tc)return Qa;tc=1;var t=wl(),e=function(){if(Ja)return Xa;Ja=1;var t=Su();return Xa=function(e,n){return function(r,o){if(null==r)return r;if(!t(r))return e(r,o);for(var i=r.length,u=n?i:-1,a=Object(r);(n?u--:++u<i)&&!1!==o(a[u],u,a););return r}}}()(t);return Qa=e}function jl(){if(nc)return ec;return nc=1,ec=function(t){return t}}function El(){if(uc)return ic;uc=1;var t=xi(),e=xl(),n=function(){if(oc)return rc;oc=1;var t=jl();return rc=function(e){return"function"==typeof e?e:t}}(),r=Oi();return ic=function(o,i){return(r(o)?t:e)(o,n(i))}}function Cl(){if(gc)return vc;gc=1;var t=_i(),e=dc?lc:(dc=1,lc=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}),n=pc?hc:(pc=1,hc=function(t){return this.__data__.has(t)});function r(e){var n=-1,r=null==e?0:e.length;for(this.__data__=new t;++n<r;)this.add(e[n])}return r.prototype.add=r.prototype.push=e,r.prototype.has=n,vc=r}function Sl(){if(_c)return mc;return _c=1,mc=function(t,e){return t.has(e)}}function Al(){if(xc)return wc;xc=1;var t=Cl(),e=bc?yc:(bc=1,yc=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}),n=Sl();return wc=function(r,o,i,u,a,c){var s=1&i,f=r.length,l=o.length;if(f!=l&&!(s&&l>f))return!1;var d=c.get(r),h=c.get(o);if(d&&h)return d==o&&h==r;var p=-1,v=!0,g=2&i?new t:void 0;for(c.set(r,o),c.set(o,r);++p<f;){var y=r[p],b=o[p];if(u)var m=s?u(b,y,p,o,r,c):u(y,b,p,r,o,c);if(void 0!==m){if(m)continue;v=!1;break}if(g){if(!e(o,(function(t,e){if(!n(g,e)&&(y===t||a(y,t,i,u,c)))return g.push(e)}))){v=!1;break}}else if(y!==b&&!a(y,b,i,u,c)){v=!1;break}}return c.delete(r),c.delete(o),v}}function kl(){if(Sc)return Cc;return Sc=1,Cc=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}}function Ol(){if(kc)return Ac;kc=1;var t=si(),e=dl(),n=oi(),r=Al(),o=Ec?jc:(Ec=1,jc=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}),i=kl(),u=t?t.prototype:void 0,a=u?u.valueOf:void 0;return Ac=function(t,u,c,s,f,l,d){switch(c){case"[object DataView]":if(t.byteLength!=u.byteLength||t.byteOffset!=u.byteOffset)return!1;t=t.buffer,u=u.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=u.byteLength||!l(new e(t),new e(u)));case"[object Boolean]":case"[object Date]":case"[object Number]":return n(+t,+u);case"[object Error]":return t.name==u.name&&t.message==u.message;case"[object RegExp]":case"[object String]":return t==u+"";case"[object Map]":var h=o;case"[object Set]":var p=1&s;if(h||(h=i),t.size!=u.size&&!p)return!1;var v=d.get(t);if(v)return v==u;s|=2,d.set(t,u);var g=r(h(t),h(u),s,f,l,d);return d.delete(t),g;case"[object Symbol]":if(a)return a.call(t)==a.call(u)}return!1},Ac}function Ll(){if(Mc)return $c;Mc=1;var t=wi(),e=Al(),n=Ol(),r=function(){if(Lc)return Oc;Lc=1;var t=sl(),e=Object.prototype.hasOwnProperty;return Oc=function(n,r,o,i,u,a){var c=1&o,s=t(n),f=s.length;if(f!=t(r).length&&!c)return!1;for(var l=f;l--;){var d=s[l];if(!(c?d in r:e.call(r,d)))return!1}var h=a.get(n),p=a.get(r);if(h&&p)return h==r&&p==n;var v=!0;a.set(n,r),a.set(r,n);for(var g=c;++l<f;){var y=n[d=s[l]],b=r[d];if(i)var m=c?i(b,y,d,r,n,a):i(y,b,d,n,r,a);if(!(void 0===m?y===b||u(y,b,o,i,a):m)){v=!1;break}g||(g="constructor"==d)}if(v&&!g){var _=n.constructor,w=r.constructor;_==w||!("constructor"in n)||!("constructor"in r)||"function"==typeof _&&_ instanceof _&&"function"==typeof w&&w instanceof w||(v=!1)}return a.delete(n),a.delete(r),v},Oc}(),o=ll(),i=Oi(),u=Ui(),a=wu(),c="[object Arguments]",s="[object Array]",f="[object Object]",l=Object.prototype.hasOwnProperty;return $c=function(d,h,p,v,g,y){var b=i(d),m=i(h),_=b?s:o(d),w=m?s:o(h),x=(_=_==c?f:_)==f,j=(w=w==c?f:w)==f,E=_==w;if(E&&u(d)){if(!u(h))return!1;b=!0,x=!1}if(E&&!x)return y||(y=new t),b||a(d)?e(d,h,p,v,g,y):n(d,h,_,p,v,g,y);if(!(1&p)){var C=x&&l.call(d,"__wrapped__"),S=j&&l.call(h,"__wrapped__");if(C||S){var A=C?d.value():d,k=S?h.value():h;return y||(y=new t),g(A,k,p,v,y)}}return!!E&&(y||(y=new t),r(d,h,p,v,g,y))},$c}function $l(){if(Ic)return zc;Ic=1;var t=Ll(),e=Ai();return zc=function n(r,o,i,u,a){return r===o||(null==r||null==o||!e(r)&&!e(o)?r!=r&&o!=o:t(r,o,i,u,n,a))},zc}function Ml(){if(Dc)return Fc;Dc=1;var t=li();return Fc=function(e){return e==e&&!t(e)}}function zl(){if(Uc)return Rc;return Uc=1,Rc=function(t,e){return function(n){return null!=n&&(n[t]===e&&(void 0!==e||t in Object(n)))}},Rc}function Il(){if(Vc)return Wc;Vc=1;var t=function(){if(Tc)return Nc;Tc=1;var t=wi(),e=$l();return Nc=function(n,r,o,i){var u=o.length,a=u,c=!i;if(null==n)return!a;for(n=Object(n);u--;){var s=o[u];if(c&&s[2]?s[1]!==n[s[0]]:!(s[0]in n))return!1}for(;++u<a;){var f=(s=o[u])[0],l=n[f],d=s[1];if(c&&s[2]){if(void 0===l&&!(f in n))return!1}else{var h=new t;if(i)var p=i(l,d,f,n,r,h);if(!(void 0===p?e(d,l,3,i,h):p))return!1}}return!0},Nc}(),e=function(){if(Bc)return Pc;Bc=1;var t=Ml(),e=Au();return Pc=function(n){for(var r=e(n),o=r.length;o--;){var i=r[o],u=n[i];r[o]=[i,u,t(u)]}return r},Pc}(),n=zl();return Wc=function(r){var o=e(r);return 1==o.length&&o[0][2]?n(o[0][0],o[0][1]):function(e){return e===r||t(e,r,o)}},Wc}function Nl(){if(Zc)return Gc;Zc=1;var t=fi(),e=Ai();return Gc=function(n){return"symbol"==typeof n||e(n)&&"[object Symbol]"==t(n)}}function Tl(){if(Yc)return qc;Yc=1;var t=Oi(),e=Nl(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;return qc=function(o,i){if(t(o))return!1;var u=typeof o;return!("number"!=u&&"symbol"!=u&&"boolean"!=u&&null!=o&&!e(o))||(r.test(o)||!n.test(o)||null!=i&&o in Object(i))},qc}function Fl(){if(Jc)return Xc;Jc=1;var t=function(){if(Hc)return Kc;Hc=1;var t=_i();function e(n,r){if("function"!=typeof n||null!=r&&"function"!=typeof r)throw new TypeError("Expected a function");var o=function(){var t=arguments,e=r?r.apply(this,t):t[0],i=o.cache;if(i.has(e))return i.get(e);var u=n.apply(this,t);return o.cache=i.set(e,u)||i,u};return o.cache=new(e.Cache||t),o}return e.Cache=t,Kc=e}();return Xc=function(e){var n=t(e,(function(t){return 500===r.size&&r.clear(),t})),r=n.cache;return n},Xc}function Dl(){if(ns)return es;return ns=1,es=function(t,e){for(var n=-1,r=null==t?0:t.length,o=Array(r);++n<r;)o[n]=e(t[n],n,t);return o}}function Pl(){if(us)return is;us=1;var t=function(){if(os)return rs;os=1;var t=si(),e=Dl(),n=Oi(),r=Nl(),o=t?t.prototype:void 0,i=o?o.toString:void 0;return rs=function t(o){if("string"==typeof o)return o;if(n(o))return e(o,t)+"";if(r(o))return i?i.call(o):"";var u=o+"";return"0"==u&&1/o==-1/0?"-0":u},rs}();return is=function(e){return null==e?"":t(e)}}function Bl(){if(cs)return as;cs=1;var t=Oi(),e=Tl(),n=function(){if(ts)return Qc;ts=1;var t=Fl(),e=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,r=t((function(t){var r=[];return 46===t.charCodeAt(0)&&r.push(""),t.replace(e,(function(t,e,o,i){r.push(o?i.replace(n,"$1"):e||t)})),r}));return Qc=r}(),r=Pl();return as=function(o,i){return t(o)?o:e(o,i)?[o]:n(r(o))},as}function Rl(){if(fs)return ss;fs=1;var t=Nl();return ss=function(e){if("string"==typeof e||t(e))return e;var n=e+"";return"0"==n&&1/e==-1/0?"-0":n}}function Ul(){if(ds)return ls;ds=1;var t=Bl(),e=Rl();return ls=function(n,r){for(var o=0,i=(r=t(r,n)).length;null!=n&&o<i;)n=n[e(r[o++])];return o&&o==i?n:void 0},ls}function Wl(){if(bs)return ys;bs=1;var t=Bl(),e=ki(),n=Oi(),r=Wi(),o=Vi(),i=Rl();return ys=function(u,a,c){for(var s=-1,f=(a=t(a,u)).length,l=!1;++s<f;){var d=i(a[s]);if(!(l=null!=u&&c(u,d)))break;u=u[d]}return l||++s!=f?l:!!(f=null==u?0:u.length)&&o(f)&&r(d,f)&&(n(u)||e(u))},ys}function Vl(){if(_s)return ms;_s=1;var t=(gs||(gs=1,vs=function(t,e){return null!=t&&e in Object(t)}),vs),e=Wl();return ms=function(n,r){return null!=n&&e(n,r,t)},ms}function Gl(){if(xs)return ws;xs=1;var t=$l(),e=function(){if(ps)return hs;ps=1;var t=Ul();return hs=function(e,n,r){var o=null==e?void 0:t(e,n);return void 0===o?r:o},hs}(),n=Vl(),r=Tl(),o=Ml(),i=zl(),u=Rl();return ws=function(a,c){return r(a)&&o(c)?i(u(a),c):function(r){var o=e(r,a);return void 0===o&&o===c?n(r,a):t(c,o,3)}},ws}function Zl(){if(Es)return js;return Es=1,js=function(t){return function(e){return null==e?void 0:e[t]}},js}function ql(){if(ks)return As;ks=1;var t=Zl(),e=function(){if(Ss)return Cs;Ss=1;var t=Ul();return Cs=function(e){return function(n){return t(n,e)}},Cs}(),n=Tl(),r=Rl();return As=function(o){return n(o)?t(r(o)):e(o)}}function Yl(){if(Ls)return Os;Ls=1;var t=Il(),e=Gl(),n=jl(),r=Oi(),o=ql();return Os=function(i){return"function"==typeof i?i:null==i?n:"object"==typeof i?r(i)?e(i[0],i[1]):t(i):o(i)}}function Kl(){if(af)return uf;af=1;var t=function(){if(tf)return Qs;tf=1;var t=Zl()("length");return Qs=t}(),e=function(){if(nf)return ef;nf=1;var t=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");return ef=function(e){return t.test(e)}}(),n=function(){if(of)return rf;of=1;var t="\\ud800-\\udfff",e="["+t+"]",n="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",r="\\ud83c[\\udffb-\\udfff]",o="[^"+t+"]",i="(?:\\ud83c[\\udde6-\\uddff]){2}",u="[\\ud800-\\udbff][\\udc00-\\udfff]",a="(?:"+n+"|"+r+")?",c="[\\ufe0e\\ufe0f]?",s=c+a+"(?:\\u200d(?:"+[o,i,u].join("|")+")"+c+a+")*",f="(?:"+[o+n+"?",n,i,u,e].join("|")+")",l=RegExp(r+"(?="+r+")|"+f+s,"g");return rf=function(t){for(var e=l.lastIndex=0;l.test(t);)++e;return e}}();return uf=function(r){return e(r)?n(r):t(r)}}function Hl(){if(vf)return pf;vf=1;var t=il(),e=function(){if(hf)return df;hf=1;var t=si(),e=ki(),n=Oi(),r=t?t.isConcatSpreadable:void 0;return df=function(t){return n(t)||e(t)||!!(r&&t&&t[r])}}();return pf=function n(r,o,i,u,a){var c=-1,s=r.length;for(i||(i=e),a||(a=[]);++c<s;){var f=r[c];o>0&&i(f)?o>1?n(f,o-1,i,u,a):t(a,f):u||(a[a.length]=f)}return a},pf}function Xl(){if(mf)return bf;mf=1;var t=(yf||(yf=1,gf=function(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)}),gf),e=Math.max;return bf=function(n,r,o){return r=e(void 0===r?n.length-1:r,0),function(){for(var i=arguments,u=-1,a=e(i.length-r,0),c=Array(a);++u<a;)c[u]=i[r+u];u=-1;for(var s=Array(r+1);++u<r;)s[u]=i[u];return s[r]=o(c),t(n,this,s)}},bf}function Jl(){if(Cf)return Ef;Cf=1;var t=function(){if(wf)return _f;wf=1;var t=ml(),e=ji(),n=jl(),r=e?function(n,r){return e(n,"toString",{configurable:!0,enumerable:!1,value:t(r),writable:!0})}:n;return _f=r}(),e=function(){if(jf)return xf;jf=1;var t=Date.now;return xf=function(e){var n=0,r=0;return function(){var o=t(),i=16-(o-r);if(r=o,i>0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}},xf}(),n=e(t);return Ef=n}function Ql(){if(Nf)return If;Nf=1;var t=Of?kf:(Of=1,kf=function(t,e,n,r){for(var o=t.length,i=n+(r?1:-1);r?i--:++i<o;)if(e(t[i],i,t))return i;return-1}),e=$f?Lf:($f=1,Lf=function(t){return t!=t}),n=zf?Mf:(zf=1,Mf=function(t,e,n){for(var r=n-1,o=t.length;++r<o;)if(t[r]===e)return r;return-1});return If=function(r,o,i){return o==o?n(r,o,i):t(r,e,i)}}function td(){if(Wf)return Uf;Wf=1;var t=fl(),e=Rf?Bf:(Rf=1,Bf=function(){}),n=kl(),r=t&&1/n(new t([,-0]))[1]==1/0?function(e){return new t(e)}:e;return Uf=r}function ed(){if(Gf)return Vf;Gf=1;var t=Cl(),e=function(){if(Ff)return Tf;Ff=1;var t=Ql();return Tf=function(e,n){return!(null==e||!e.length)&&t(e,n,0)>-1}}(),n=Pf?Df:(Pf=1,Df=function(t,e,n){for(var r=-1,o=null==t?0:t.length;++r<o;)if(n(e,t[r]))return!0;return!1}),r=Sl(),o=td(),i=kl();return Vf=function(u,a,c){var s=-1,f=e,l=u.length,d=!0,h=[],p=h;if(c)d=!1,f=n;else if(l>=200){var v=a?null:o(u);if(v)return i(v);d=!1,f=r,p=new t}else p=a?[]:h;t:for(;++s<l;){var g=u[s],y=a?a(g):g;if(g=c||0!==g?g:0,d&&y==y){for(var b=p.length;b--;)if(p[b]===y)continue t;a&&p.push(y),h.push(g)}else f(p,y,c)||(p!==h&&p.push(y),h.push(g))}return h}}el.exports;try{tl={clone:function(){if(Ua)return Ra;Ua=1;var t=bl();return Ra=function(e){return t(e,4)}}(),constant:ml(),each:cc?ac:(cc=1,ac=El()),filter:function(){if(Ms)return $s;Ms=1;var t=nl(),e=function(){if(fc)return sc;fc=1;var t=xl();return sc=function(e,n){var r=[];return t(e,(function(t,e,o){n(t,e,o)&&r.push(t)})),r}}(),n=Yl(),r=Oi();return $s=function(o,i){return(r(o)?t:e)(o,n(i,3))}}(),has:function(){if(Ts)return Ns;Ts=1;var t=function(){if(Is)return zs;Is=1;var t=Object.prototype.hasOwnProperty;return zs=function(e,n){return null!=e&&t.call(e,n)},zs}(),e=Wl();return Ns=function(n,r){return null!=n&&e(n,r,t)},Ns}(),isArray:Oi(),isEmpty:function(){if(Ds)return Fs;Ds=1;var t=Cu(),e=ll(),n=ki(),r=Oi(),o=Su(),i=Ui(),u=ju(),a=wu(),c=Object.prototype.hasOwnProperty;return Fs=function(s){if(null==s)return!0;if(o(s)&&(r(s)||"string"==typeof s||"function"==typeof s.splice||i(s)||a(s)||n(s)))return!s.length;var f=e(s);if("[object Map]"==f||"[object Set]"==f)return!s.size;if(u(s))return!t(s).length;for(var l in s)if(c.call(s,l))return!1;return!0}}(),isFunction:di(),isUndefined:Bs?Ps:(Bs=1,Ps=function(t){return void 0===t}),keys:Au(),map:function(){if(Vs)return Ws;Vs=1;var t=Dl(),e=Yl(),n=function(){if(Us)return Rs;Us=1;var t=xl(),e=Su();return Rs=function(n,r){var o=-1,i=e(n)?Array(n.length):[];return t(n,(function(t,e,n){i[++o]=r(t,e,n)})),i}}(),r=Oi();return Ws=function(o,i){return(r(o)?t:n)(o,e(i,3))}}(),reduce:function(){if(Hs)return Ks;Hs=1;var t=Zs?Gs:(Zs=1,Gs=function(t,e,n,r){var o=-1,i=null==t?0:t.length;for(r&&i&&(n=t[++o]);++o<i;)n=e(n,t[o],o,t);return n}),e=xl(),n=Yl(),r=Ys?qs:(Ys=1,qs=function(t,e,n,r,o){return o(t,(function(t,o,i){n=r?(r=!1,t):e(n,t,o,i)})),n}),o=Oi();return Ks=function(i,u,a){var c=o(i)?t:r,s=arguments.length<3;return c(i,n(u,4),a,s,e)},Ks}(),size:function(){if(sf)return cf;sf=1;var t=Cu(),e=ll(),n=Su(),r=function(){if(Js)return Xs;Js=1;var t=fi(),e=Oi(),n=Ai();return Xs=function(r){return"string"==typeof r||!e(r)&&n(r)&&"[object String]"==t(r)}}(),o=Kl();return cf=function(i){if(null==i)return 0;if(n(i))return r(i)?o(i):i.length;var u=e(i);return"[object Map]"==u||"[object Set]"==u?i.size:t(i).length}}(),transform:function(){if(lf)return ff;lf=1;var t=xi(),e=vl(),n=wl(),r=Yl(),o=ul(),i=Oi(),u=Ui(),a=di(),c=li(),s=wu();return ff=function(f,l,d){var h=i(f),p=h||u(f)||s(f);if(l=r(l,4),null==d){var v=f&&f.constructor;d=p?h?new v:[]:c(f)&&a(v)?e(o(f)):{}}return(p?t:n)(f,(function(t,e,n){return l(d,t,e,n)})),d},ff}(),union:function(){if(Kf)return Yf;Kf=1;var t=Hl(),e=function(){if(Af)return Sf;Af=1;var t=jl(),e=Xl(),n=Jl();return Sf=function(r,o){return n(e(r,o,t),r+"")},Sf}(),n=ed(),r=function(){if(qf)return Zf;qf=1;var t=Su(),e=Ai();return Zf=function(n){return e(n)&&t(n)}}(),o=e((function(e){return n(t(e,1,r,!0))}));return Yf=o}(),values:function(){if(Qf)return Jf;Qf=1;var t=function(){if(Xf)return Hf;Xf=1;var t=Dl();return Hf=function(e,n){return t(n,(function(t){return e[t]}))},Hf}(),e=Au();return Jf=function(n){return null==n?[]:t(n,e(n))},Jf}()}}catch($h){}tl||(tl=window._);var nd=tl,rd=nd,od=cd,id="\0",ud="\0",ad="";function cd(t){this._isDirected=!rd.has(t,"directed")||t.directed,this._isMultigraph=!!rd.has(t,"multigraph")&&t.multigraph,this._isCompound=!!rd.has(t,"compound")&&t.compound,this._label=void 0,this._defaultNodeLabelFn=rd.constant(void 0),this._defaultEdgeLabelFn=rd.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[ud]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}function sd(t,e){t[e]?t[e]++:t[e]=1}function fd(t,e){--t[e]||delete t[e]}function ld(t,e,n,r){var o=""+e,i=""+n;if(!t&&o>i){var u=o;o=i,i=u}return o+ad+i+ad+(rd.isUndefined(r)?id:r)}function dd(t,e){return ld(t,e.v,e.w,e.name)}cd.prototype._nodeCount=0,cd.prototype._edgeCount=0,cd.prototype.isDirected=function(){return this._isDirected},cd.prototype.isMultigraph=function(){return this._isMultigraph},cd.prototype.isCompound=function(){return this._isCompound},cd.prototype.setGraph=function(t){return this._label=t,this},cd.prototype.graph=function(){return this._label},cd.prototype.setDefaultNodeLabel=function(t){return rd.isFunction(t)||(t=rd.constant(t)),this._defaultNodeLabelFn=t,this},cd.prototype.nodeCount=function(){return this._nodeCount},cd.prototype.nodes=function(){return rd.keys(this._nodes)},cd.prototype.sources=function(){var t=this;return rd.filter(this.nodes(),(function(e){return rd.isEmpty(t._in[e])}))},cd.prototype.sinks=function(){var t=this;return rd.filter(this.nodes(),(function(e){return rd.isEmpty(t._out[e])}))},cd.prototype.setNodes=function(t,e){var n=arguments,r=this;return rd.each(t,(function(t){n.length>1?r.setNode(t,e):r.setNode(t)})),this},cd.prototype.setNode=function(t,e){return rd.has(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=e),this):(this._nodes[t]=arguments.length>1?e:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=ud,this._children[t]={},this._children[ud][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)},cd.prototype.node=function(t){return this._nodes[t]},cd.prototype.hasNode=function(t){return rd.has(this._nodes,t)},cd.prototype.removeNode=function(t){var e=this;if(rd.has(this._nodes,t)){var n=function(t){e.removeEdge(e._edgeObjs[t])};delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],rd.each(this.children(t),(function(t){e.setParent(t)})),delete this._children[t]),rd.each(rd.keys(this._in[t]),n),delete this._in[t],delete this._preds[t],rd.each(rd.keys(this._out[t]),n),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this},cd.prototype.setParent=function(t,e){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(rd.isUndefined(e))e=ud;else{for(var n=e+="";!rd.isUndefined(n);n=this.parent(n))if(n===t)throw new Error("Setting "+e+" as parent of "+t+" would create a cycle");this.setNode(e)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=e,this._children[e][t]=!0,this},cd.prototype._removeFromParentsChildList=function(t){delete this._children[this._parent[t]][t]},cd.prototype.parent=function(t){if(this._isCompound){var e=this._parent[t];if(e!==ud)return e}},cd.prototype.children=function(t){if(rd.isUndefined(t)&&(t=ud),this._isCompound){var e=this._children[t];if(e)return rd.keys(e)}else{if(t===ud)return this.nodes();if(this.hasNode(t))return[]}},cd.prototype.predecessors=function(t){var e=this._preds[t];if(e)return rd.keys(e)},cd.prototype.successors=function(t){var e=this._sucs[t];if(e)return rd.keys(e)},cd.prototype.neighbors=function(t){var e=this.predecessors(t);if(e)return rd.union(e,this.successors(t))},cd.prototype.isLeaf=function(t){return 0===(this.isDirected()?this.successors(t):this.neighbors(t)).length},cd.prototype.filterNodes=function(t){var e=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});e.setGraph(this.graph());var n=this;rd.each(this._nodes,(function(n,r){t(r)&&e.setNode(r,n)})),rd.each(this._edgeObjs,(function(t){e.hasNode(t.v)&&e.hasNode(t.w)&&e.setEdge(t,n.edge(t))}));var r={};function o(t){var i=n.parent(t);return void 0===i||e.hasNode(i)?(r[t]=i,i):i in r?r[i]:o(i)}return this._isCompound&&rd.each(e.nodes(),(function(t){e.setParent(t,o(t))})),e},cd.prototype.setDefaultEdgeLabel=function(t){return rd.isFunction(t)||(t=rd.constant(t)),this._defaultEdgeLabelFn=t,this},cd.prototype.edgeCount=function(){return this._edgeCount},cd.prototype.edges=function(){return rd.values(this._edgeObjs)},cd.prototype.setPath=function(t,e){var n=this,r=arguments;return rd.reduce(t,(function(t,o){return r.length>1?n.setEdge(t,o,e):n.setEdge(t,o),o})),this},cd.prototype.setEdge=function(){var t,e,n,r,o=!1,i=arguments[0];"object"==typeof i&&null!==i&&"v"in i?(t=i.v,e=i.w,n=i.name,2===arguments.length&&(r=arguments[1],o=!0)):(t=i,e=arguments[1],n=arguments[3],arguments.length>2&&(r=arguments[2],o=!0)),t=""+t,e=""+e,rd.isUndefined(n)||(n=""+n);var u=ld(this._isDirected,t,e,n);if(rd.has(this._edgeLabels,u))return o&&(this._edgeLabels[u]=r),this;if(!rd.isUndefined(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(e),this._edgeLabels[u]=o?r:this._defaultEdgeLabelFn(t,e,n);var a=function(t,e,n,r){var o=""+e,i=""+n;if(!t&&o>i){var u=o;o=i,i=u}var a={v:o,w:i};r&&(a.name=r);return a}(this._isDirected,t,e,n);return t=a.v,e=a.w,Object.freeze(a),this._edgeObjs[u]=a,sd(this._preds[e],t),sd(this._sucs[t],e),this._in[e][u]=a,this._out[t][u]=a,this._edgeCount++,this},cd.prototype.edge=function(t,e,n){var r=1===arguments.length?dd(this._isDirected,arguments[0]):ld(this._isDirected,t,e,n);return this._edgeLabels[r]},cd.prototype.hasEdge=function(t,e,n){var r=1===arguments.length?dd(this._isDirected,arguments[0]):ld(this._isDirected,t,e,n);return rd.has(this._edgeLabels,r)},cd.prototype.removeEdge=function(t,e,n){var r=1===arguments.length?dd(this._isDirected,arguments[0]):ld(this._isDirected,t,e,n),o=this._edgeObjs[r];return o&&(t=o.v,e=o.w,delete this._edgeLabels[r],delete this._edgeObjs[r],fd(this._preds[e],t),fd(this._sucs[t],e),delete this._in[e][r],delete this._out[t][r],this._edgeCount--),this},cd.prototype.inEdges=function(t,e){var n=this._in[t];if(n){var r=rd.values(n);return e?rd.filter(r,(function(t){return t.v===e})):r}},cd.prototype.outEdges=function(t,e){var n=this._out[t];if(n){var r=rd.values(n);return e?rd.filter(r,(function(t){return t.w===e})):r}},cd.prototype.nodeEdges=function(t,e){var n=this.inEdges(t,e);if(n)return n.concat(this.outEdges(t,e))};var hd={Graph:od,version:"2.1.8"},pd=nd,vd=od,gd={write:function(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:yd(t),edges:bd(t)};pd.isUndefined(t.graph())||(e.value=pd.clone(t.graph()));return e},read:function(t){var e=new vd(t.options).setGraph(t.value);return pd.each(t.nodes,(function(t){e.setNode(t.v,t.value),t.parent&&e.setParent(t.v,t.parent)})),pd.each(t.edges,(function(t){e.setEdge({v:t.v,w:t.w,name:t.name},t.value)})),e}};function yd(t){return pd.map(t.nodes(),(function(e){var n=t.node(e),r=t.parent(e),o={v:e};return pd.isUndefined(n)||(o.value=n),pd.isUndefined(r)||(o.parent=r),o}))}function bd(t){return pd.map(t.edges(),(function(e){var n=t.edge(e),r={v:e.v,w:e.w};return pd.isUndefined(e.name)||(r.name=e.name),pd.isUndefined(n)||(r.value=n),r}))}var md=nd,_d=function(t){var e,n={},r=[];function o(r){md.has(n,r)||(n[r]=!0,e.push(r),md.each(t.successors(r),o),md.each(t.predecessors(r),o))}return md.each(t.nodes(),(function(t){e=[],o(t),e.length&&r.push(e)})),r};var wd=nd,xd=jd;function jd(){this._arr=[],this._keyIndices={}}jd.prototype.size=function(){return this._arr.length},jd.prototype.keys=function(){return this._arr.map((function(t){return t.key}))},jd.prototype.has=function(t){return wd.has(this._keyIndices,t)},jd.prototype.priority=function(t){var e=this._keyIndices[t];if(void 0!==e)return this._arr[e].priority},jd.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},jd.prototype.add=function(t,e){var n=this._keyIndices;if(t=String(t),!wd.has(n,t)){var r=this._arr,o=r.length;return n[t]=o,r.push({key:t,priority:e}),this._decrease(o),!0}return!1},jd.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var t=this._arr.pop();return delete this._keyIndices[t.key],this._heapify(0),t.key},jd.prototype.decrease=function(t,e){var n=this._keyIndices[t];if(e>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+t+" Old: "+this._arr[n].priority+" New: "+e);this._arr[n].priority=e,this._decrease(n)},jd.prototype._heapify=function(t){var e=this._arr,n=2*t,r=n+1,o=t;n<e.length&&(o=e[n].priority<e[o].priority?n:o,r<e.length&&(o=e[r].priority<e[o].priority?r:o),o!==t&&(this._swap(t,o),this._heapify(o)))},jd.prototype._decrease=function(t){for(var e,n=this._arr,r=n[t].priority;0!==t&&!(n[e=t>>1].priority<r);)this._swap(t,e),t=e},jd.prototype._swap=function(t,e){var n=this._arr,r=this._keyIndices,o=n[t],i=n[e];n[t]=i,n[e]=o,r[i.key]=t,r[o.key]=e};var Ed=xd,Cd=function(t,e,n,r){return function(t,e,n,r){var o,i,u={},a=new Ed,c=function(t){var e=t.v!==o?t.v:t.w,r=u[e],c=n(t),s=i.distance+c;if(c<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+t+" Weight: "+c);s<r.distance&&(r.distance=s,r.predecessor=o,a.decrease(e,s))};t.nodes().forEach((function(t){var n=t===e?0:Number.POSITIVE_INFINITY;u[t]={distance:n},a.add(t,n)}));for(;a.size()>0&&(o=a.removeMin(),(i=u[o]).distance!==Number.POSITIVE_INFINITY);)r(o).forEach(c);return u}(t,String(e),n||Sd,r||function(e){return t.outEdges(e)})},Sd=nd.constant(1);var Ad=Cd,kd=nd,Od=function(t,e,n){return kd.transform(t.nodes(),(function(r,o){r[o]=Ad(t,o,e,n)}),{})};var Ld=nd,$d=function(t){var e=0,n=[],r={},o=[];function i(u){var a=r[u]={onStack:!0,lowlink:e,index:e++};if(n.push(u),t.successors(u).forEach((function(t){Ld.has(r,t)?r[t].onStack&&(a.lowlink=Math.min(a.lowlink,r[t].index)):(i(t),a.lowlink=Math.min(a.lowlink,r[t].lowlink))})),a.lowlink===a.index){var c,s=[];do{c=n.pop(),r[c].onStack=!1,s.push(c)}while(u!==c);o.push(s)}}return t.nodes().forEach((function(t){Ld.has(r,t)||i(t)})),o};var Md=nd,zd=$d,Id=function(t){return Md.filter(zd(t),(function(e){return e.length>1||1===e.length&&t.hasEdge(e[0],e[0])}))};var Nd=function(t,e,n){return function(t,e,n){var r={},o=t.nodes();return o.forEach((function(t){r[t]={},r[t][t]={distance:0},o.forEach((function(e){t!==e&&(r[t][e]={distance:Number.POSITIVE_INFINITY})})),n(t).forEach((function(n){var o=n.v===t?n.w:n.v,i=e(n);r[t][o]={distance:i,predecessor:t}}))})),o.forEach((function(t){var e=r[t];o.forEach((function(n){var i=r[n];o.forEach((function(n){var r=i[t],o=e[n],u=i[n],a=r.distance+o.distance;a<u.distance&&(u.distance=a,u.predecessor=o.predecessor)}))}))})),r}(t,e||Td,n||function(e){return t.outEdges(e)})},Td=nd.constant(1);var Fd=nd,Dd=Pd;function Pd(t){var e={},n={},r=[];if(Fd.each(t.sinks(),(function o(i){if(Fd.has(n,i))throw new Bd;Fd.has(e,i)||(n[i]=!0,e[i]=!0,Fd.each(t.predecessors(i),o),delete n[i],r.push(i))})),Fd.size(e)!==t.nodeCount())throw new Bd;return r}function Bd(){}Pd.CycleException=Bd,Bd.prototype=new Error;var Rd=Dd;var Ud=nd,Wd=function(t,e,n){Ud.isArray(e)||(e=[e]);var r=(t.isDirected()?t.successors:t.neighbors).bind(t),o=[],i={};return Ud.each(e,(function(e){if(!t.hasNode(e))throw new Error("Graph does not have node: "+e);Vd(t,e,"post"===n,i,r,o)})),o};function Vd(t,e,n,r,o,i){Ud.has(r,e)||(r[e]=!0,n||i.push(e),Ud.each(o(e),(function(e){Vd(t,e,n,r,o,i)})),n&&i.push(e))}var Gd=Wd;var Zd=Wd;var qd=nd,Yd=od,Kd=xd;var Hd={Graph:hd.Graph,json:gd,alg:{components:_d,dijkstra:Cd,dijkstraAll:Od,findCycles:Id,floydWarshall:Nd,isAcyclic:function(t){try{Rd(t)}catch($h){if($h instanceof Rd.CycleException)return!1;throw $h}return!0},postorder:function(t,e){return Gd(t,e,"post")},preorder:function(t,e){return Zd(t,e,"pre")},prim:function(t,e){var n,r=new Yd,o={},i=new Kd;function u(t){var r=t.v===n?t.w:t.v,u=i.priority(r);if(void 0!==u){var a=e(t);a<u&&(o[r]=n,i.decrease(r,a))}}if(0===t.nodeCount())return r;qd.each(t.nodes(),(function(t){i.add(t,Number.POSITIVE_INFINITY),r.setNode(t)})),i.decrease(t.nodes()[0],0);var a=!1;for(;i.size()>0;){if(n=i.removeMin(),qd.has(o,n))r.setEdge(n,o[n]);else{if(a)throw new Error("Input graph is not connected: "+t);a=!0}t.nodeEdges(n).forEach(u)}return r},tarjan:$d,topsort:Dd},version:hd.version};function Xd(t,e){let n=!0;for(;n;){n=!1;for(let r=0;r<e.length;++r)for(let o=0;o<e[r].length-1;++o){const i=Jd(t,e,r);Qd(e[r],o,o+1);Jd(t,e,r)<i?n=!0:Qd(e[r],o,o+1)}}}function Jd(t,e,n){let r=0;return n>0&&(r+=tr(t,e[n-1],e[n])),n+1<e.length&&(r+=tr(t,e[n],e[n+1])),r}function Qd(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function th(t){const e=Math.floor(t.length/2);if(0===t.length)return-1;if(t.length%2==1)return t[e];if(2===t.length)return(t[0]+t[1])/2;const n=t[e-1]-t[0],r=t[t.length-1]-t[e];return(t[e-1]*r+t[e]*n)/(n+r)}function eh(t,e,n=1,r=!1){if(n>0)for(let o=1;o<e.length;++o){const n=new Map;e[o].forEach((i=>{const u=th(nh(t,e,o,o-1,i,r));n.set(i,u)})),rh(e[o],n)}else for(let o=e.length-2;o>=0;--o){const n=new Map;e[o].forEach((i=>{const u=th(nh(t,e,o,o+1,i,r));n.set(i,u)})),rh(e[o],n)}}function nh(t,e,n,r,o,i=!1){const u=e[n],a=e[r],c=[];return a.forEach(((e,n)=>{t.nodeEdges(e,o).length>0&&c.push(n)})),0===c.length&&i&&u.forEach(((e,n)=>{t.nodeEdges(e,o).length>0&&c.push(n+.5)})),c.sort(((t,e)=>t-e)),c}function rh(t,e){const n=new Map(t.map(((t,e)=>[t,e])));for(let r=1;r<t.length;++r)for(let o=r;o>0;--o){let r=o-1,i=e.get(t[r]),u=e.get(t[o]);for(;-1===(i=e.get(t[r]))&&r>0;)r--;if(-1===u||-1===i)break;if(i===u&&(i=n.get(t[r]),u=n.get(t[o])),u>=i)break;[t[o],t[r]]=[t[r],t[o]]}}function oh(t,e=25){const n=function(t){const e=[];let n=t.nodes().filter((e=>0===t.node(e).rank)).concat(t.sources());return 0===n.length&&(n=t.nodes().slice(0,1)),Hd.alg.preorder(t,n).forEach((n=>{const r=t.node(n).rank;for(;r>=e.length;)e.push([]);e[r].push(n)})),e}(t);let r=n,o=0;for(;o++<e;)eh(t,n,o%2==0?1:0),Xd(t,n),ih(t,n)<ih(t,r)&&(r=uh(n));return r=r.map((t=>[t])),r}function ih(t,e){let n=0;for(let r=0;r<e.length-1;++r)n+=tr(t,e[r],e[r+1]);return n}function uh(t){const e=[];for(const n of t){const t=[];e.push(t);for(const e of n)t.push(e)}return e}function ah(){let t=[100,100],e=null,n=.5,r=function(t,e,n){return 1};const o=function(t){return t.data.value},i=function(t){return t.data?t.data.direction:"r"};function u(a,c){null===e&&u.scaleToFit(a,c),ch(a,o,i),function(t,e,n){t.nodes().forEach((e=>{const r=t.node(e);r.dy=r.value*n})),t.edges().forEach((r=>{const o=t.edge(r);o.value=e(o),o.dy=o.value*n}))}(a,o,e);const s=sh(a,c);c.forEach((e=>{let o=0;e.forEach(((e,i)=>{const u=s[i]/Gn(s)*t[1],c=0===o?0:n*u/5,f=u-2*c,l=Gn(e,(t=>a.node(t).dy)),d=e.map(((t,n)=>a.node(t).value&&e[n+1]?r(e[n],e[n+1],a):0)),h=Math.max(0,f-l),p=Gn(d)?h/Gn(d):0;let v=o+c;1===e.length&&(v+=(f-a.node(e[0]).dy)/2);let g=Number.MAX_VALUE;e.forEach(((t,e)=>{const n=a.node(t);n.y=v,n.spaceAbove=g,n.spaceBelow=d[e]*p,v+=n.dy+n.spaceBelow,g=n.spaceBelow,n.data&&void 0!==n.data.forceY&&(n.y=c+n.data.forceY*(f-n.dy))})),e.length>0&&(a.node(e[e.length-1]).spaceBelow=Number.MAX_VALUE),o+=u}))}));const f=function(t,e){const n=[];return e.forEach(((r,o)=>{if(o===e.length-1)return;let i=0;r.forEach((e=>{e.forEach((e=>{t.outEdges(e).forEach((e=>{const n=t.edge(e).dy,r=t.node(e.w).y-t.node(e.v).y,o=Math.abs(r)-n,u=n*n-o*o,a=u>=0?Math.sqrt(u):n;a>i&&(i=a)}))}))})),n.push(i)})),n}(a,c);!function(t,e,n,r){const o=Gn(r);let i;if(o>n)i=r.map((t=>n*t/o));else{const t=n-o;i=r.map((n=>n+t/(e.length-1)))}let u=0;e.forEach(((e,n)=>{e.forEach((e=>{e.forEach((e=>{t.node(e).x=u}))})),u+=i[n]}))}(a,c,t[0],f);const l=[];return a.nodes().forEach((t=>{const e=a.node(t);e.id=t,l.push(e)})),l}return u.scaleToFit=function(r,u){ch(r,o,i);const a=Gn(sh(r,u));a<=0?e=1:(e=t[1]/a,1!==n&&(e*=1-n))},u.size=function(e){return arguments.length?(t=e,u):t},u.separation=function(t){return arguments.length?(r=St(t)?t:()=>t,u):r},u.whitespace=function(t){return arguments.length?(n=t,u):n},u.scale=function(t){return arguments.length?(e=t,u):e},u}function ch(t,e,n){t.nodes().forEach((r=>{const o=Gn(t.inEdges(r),(n=>e(t.edge(n)))),i=Gn(t.outEdges(r),(n=>e(t.edge(n))));let u=t.node(r);u||t.setNode(r,u={}),u.value=Math.max(o,i),void 0===u.direction&&(u.direction=n(u)||"r")}))}function sh(t,e){if(0===e.length||0===e[0].length)return[];const n=e[0].length,r=new Array(n);for(let o=0;o<n;o++)r[o]=0;return e.forEach((e=>{e.forEach(((e,n)=>{const o=Gn(e,(e=>t.node(e).value));r[n]=Math.max(r[n],o)}))})),r}function fh(t,e){return t<e}function lh(t){return t&&t.length?function(t,e,n){for(var r=-1,o=t.length;++r<o;){var i=t[r],u=e(i);if(null!=u&&(void 0===a?u==u&&!$(u):n(u,a)))var a=u,c=i}return c}(t,Wn,fh):void 0}var dh=function(){for(var t=0;t<arguments.length;t++)if(void 0!==arguments[t])return arguments[t]};const hh=ri(dh);function ph(t,e){const n=function(t,e){const n=new Set,r=new Hd.Graph({directed:!0}),o=[];if(!t.hasNode(e))throw Error("node not in graph");return vh(t,e,n,r,o),t.nodes().forEach((e=>{n.has(e)||vh(t,e,n,r,o)})),o.forEach(((t,e)=>{r.node(t).thread=e+1<o.length?o[e+1]:o[0]})),r}(t,e);return t.edges().forEach((e=>{const r=function(t,e,n){const r=t.node(e),o=t.node(n);if(r.depth<o.depth){let e=r.thread;for(;t.node(e).depth>r.depth;){if(e===n)return 1;e=t.node(e).thread}}else if(o.depth<r.depth){let n=o.thread;for(;t.node(n).depth>o.depth;){if(n===e)return-1;n=t.node(n).thread}}return 0}(n,e.v,e.w);if(r<0){const n=t.edge(e)||{};n.reversed=!0,t.removeEdge(e),t.setEdge(e.w,e.v,n)}})),t}function vh(t,e,n,r,o,i=0){if(!n.has(e)){n.add(e),o.push(e),r.setNode(e,{depth:i});t.outEdges(e).map((t=>t.w)).forEach((u=>{n.has(u)||r.setEdge(e,u,{delta:1}),vh(t,u,n,r,o,i+1)}))}}function gh(t,e){if(0===t.nodes().length)return;const n=function(t,e){const n=new Hd.Graph({directed:!0});let r=!1;for(const u of e)if("min"===u.type){r=!0;break}if(!r){const n=t.sources();e=n.length>0?[{nodes:[n[0]],type:"min"},...e]:[{nodes:[t.nodes()[0]],type:"min"},...e]}const o=new Map;let i=0;return e.forEach((t=>{if(!t.nodes||0===t.nodes.length)return;const e=""+i++;t.nodes.forEach((t=>{o.set(t,e)})),n.setNode(e,{nodes:t.nodes,type:t.type})})),t.nodes().forEach((t=>{if(!o.has(t)){const e=""+i++,r={nodes:[t],type:"same"};o.set(t,e),n.setNode(e,r)}})),t.edges().forEach((e=>{const r=o.has(e.v)?o.get(e.v):e.v,i=o.has(e.w)?o.get(e.w):e.w,u=t.node(e.v)||{},a=t.node(e.w)||{},c=n.edge(r,i)||{delta:0};r===i?(c.delta=0,n.setEdge(r,i,c)):"l"===u.direction?(c.delta=Math.max(c.delta,"l"===a.direction?1:0),n.setEdge(i,r,c)):(c.delta=Math.max(c.delta,"l"===a.direction?0:1),n.setEdge(r,i,c))})),n}(t,e);!function(t){t.sources().forEach((e=>{"0"!==e&&t.setEdge("0",e,{delta:0,temp:!0})}))}(n),ph(n,"0"),function(t){var e;const n=t.sources(),r=new Set,o=new Set;for(t.edges().forEach((t=>{t.v===t.w&&o.add(t)}));n.length>0;){const i=n.shift();r.add(i);let u=t.node(i);u||t.setNode(i,u={}),u.rank=0;for(const n of t.inEdges(i)){const r=hh(null==(e=t.edge(n)||{})?void 0:e.delta,1);u.rank=Math.max(u.rank,t.node(n.v).rank+r)}for(const e of t.outEdges(i))o.add(e);for(const e of t.nodes())n.indexOf(e)<0&&!r.has(e)&&!t.inEdges(e).some((t=>!o.has(t)))&&n.push(e)}}(n),function(t){function e(e){const n=t.node(e),r=lh(t.outEdges(e).map((e=>t.node(e.w).rank-t.edge(e).delta)));void 0!==r&&(n.rank=r)}t.edges().forEach((n=>{t.edge(n).temp&&e(n.w)}))}(n),t.nodes().forEach((e=>{t.node(e)||t.setNode(e,{})})),n.nodes().forEach((e=>{const r=n.node(e);r.nodes.forEach((e=>{t.node(e).rank=r.rank}))}))}function yh(t){const e=ah(),n=Xn(t);let r=[],o=[],i=null;function u(t=[],u=[],a={}){const c=function(t=[],e=[]){const n=new Hd.Graph({directed:!0,multigraph:!0});return e.forEach((t=>{n.setEdge(t.source,t.target,{data:t,points:[]},t.type)})),n.nodes().forEach((t=>n.setNode(t,{data:{}}))),t.forEach((t=>{n.hasNode(t.id)&&(n.node(t.id).data=t,void 0!==t.direction&&(n.node(t.id).direction=t.direction))})),n.edges().forEach((t=>{n.edge(t).source=n.node(t.v),n.edge(t).target=n.node(t.w)})),n}(u,t);var s;return a.order?(gh(c,a.rankSets||[]),i=a.order,i.length>0&&i[0].length>0&&!m(i[0][0])&&(i=i.map((t=>[t]))),i=i.map((t=>t.map((t=>t.filter((t=>void 0!==c.node(t)))))))):(gh(c,a.rankSets||[]),(s=c).edges().forEach((t=>{const e=s.node(t.v),n=s.node(t.w),r=s.edge(t);let o=e.rank;const i=[];if(o+1<=n.rank){for("l"===e.direction&&i.push(o);++o<n.rank;)i.push(o);"l"===n.direction&&i.push(o),Qn(s,t,r,i,"r")}else if(o>n.rank){for("l"!==e.direction&&i.push(o);o-- >n.rank+1;)i.push(o);"l"!==n.direction&&i.push(o),Qn(s,t,r,i,"l")}})),i=oh(c)),r=e(c,i),function(t,{alignLinkTypes:e=!1}={}){t.nodes().forEach((n=>{const r=t.node(n);if(r.incoming=t.inEdges(n),r.outgoing=t.outEdges(n),e){const e=Zn(t,n);r.incoming.sort(Yn(t,e,!1)),r.outgoing.sort(Yn(t,e,!0))}else r.incoming.sort(qn(t,!1)),r.outgoing.sort(qn(t,!0))}))}(c,{alignLinkTypes:a.alignLinkTypes||!1}),o=n(c),function(t){t.nodes().filter((t=>t.startsWith("__"))).forEach((e=>{var n;let r=t.node(e);if(!r)return;let o=(null==(n=t.inEdges(e))?void 0:n.map((e=>t.edge(e))))||[];o.forEach((e=>{e.origLabel.dy=e.dy,e.origLabel.x0=e.x0,e.origLabel.y0=e.y0,e.origLabel.r0=e.r0,e.origLabel.d0=e.d0,e.origLabel.value=e.value,t.setEdge(e.origEdge,e.origLabel)}));let i,u=o.map((t=>t.r1));for(;r.dummy;)o=t.outEdges(e).map((e=>t.edge(e))),o.forEach(((t,e)=>{t.origLabel.points||(t.origLabel.points=[]),t.origLabel.points.push({d:t.d0,r0:t.r0,r1:u[e],x:r.x,y:t.y0})})),u=o.map((t=>t.r1)),i=t.successors(e)[0],t.removeNode(e),r=t.node(e=i);o.forEach((t=>{t.origLabel.x1=t.x1,t.origLabel.y1=t.y1,t.origLabel.r1=t.r1,t.origLabel.d1=t.d1}))}))}(c),function(t){t.edges().forEach((e=>{const n=t.edge(e);n.points.unshift({d:n.d0,ro:n.r0,x:n.x0,y:n.y0}),n.points.push({d:n.d1,ri:n.r1,x:n.x1,y:n.y1})}))}(c),c}return u.nodes=function(){return r},u.links=function(){return o},u.order=function(){return i},u.size=function(t){return arguments.length?(e.size(t),u):e.size()},u.separation=function(t){return arguments.length?(e.separation(t),u):e.separation()},u.whitespace=function(t){return arguments.length?(e.whitespace(t),u):e.whitespace()},u.edgeValue=function(t){return u},u.scale=function(t){return arguments.length?(e.scale(t),u):e.scale()},u}const bh=["#ACD5FC","#E37816","#07CC80","#0871D4","#CB8E55","#9FAE29","#427565","#6D55A6","#FEF445","#E177C2","#F48B7B","#D74B05","#AA896F","#14A14D","#C5114D"];var mh="[object Number]";function _h(t){return function(t){return"number"==typeof t||O(t)&&k(t)==mh}(t)&&t!=+t}const wh=t=>0===t.dy?0:2;function xh(t){const e=Math.max(wh(t),t.dy)/2;let{x0:n}=t,{x1:r}=t,{y0:o}=t,{y1:i}=t;r<n&&([n,r]=[r,n],[o,i]=[i,o]);const u=i>o?1:-1,a=function(t){const e=t.x1-t.x0,n=t.y1-t.y0;return[t.dy/2,(e*e+n*n)/Math.abs(4*n)]}(t),c=Math.max(a[0],Math.min(a[1],(r-n)/3));let s=Math.max(a[0],Math.min(a[1],t.r0||c)),f=Math.max(a[0],Math.min(a[1],t.r1||c));const l=r-n,d=i-o-u*(s+f),h=Math.sqrt(l*l+d*d),p=-u*Math.acos(Math.min(1,(s+f)/h)),v=Math.atan2(d,l);let g=Math.PI/2+u*(v+p),y=e*u*Math.sin(g),b=e*Math.cos(g),m=n+1*s*Math.sin(Math.abs(g)),_=r-1*f*Math.sin(Math.abs(g)),w=o+s*u*(1-Math.cos(g)),x=i-f*u*(1-Math.cos(g));function j(t,n){const r=t*(i-o)>0?1:0;let u=1*t*(i-o)>0?n+e:n-e;return 0===g&&(u=n),`A${u} ${u} ${Math.abs(g)} 0 ${r} `}(_h(g)||Math.abs(g)<.001)&&(g=0,s=0,f=0,m=n,_=r,w=o,x=i,y=0,b=e);return`M${[n,o-e]} ${j(1,s)}${[m+y,w-b]} L${[_+y,x-b]} ${j(-1,f)}${[r,i-e]} L${[r,i+e]} ${j(1,f)}${[_-y,x+b]} L${[m-y,w+b]} ${j(-1,s)}${[n,o+e]} Z`}function jh(t){var e;if(1===(null==(e=t.points)?void 0:e.length))return function(t){const e=t.points[0],n=Math.max(wh(t),t.dy)/2;return"down-right"===e.style?`M${[e.x-20,e.y-n]} L${[e.x,e.y-n]} L${[e.x,e.y+n]} L${[e.x-20,e.y+n]} Z`:"right-down"===e.style?`M${[e.x,e.y-n]} L${[e.x+20,e.y-n]} L${[e.x+20,e.y+n]} L${[e.x,e.y+n]} Z`:null}(t);let n,r="";for(let o=0;o<t.points.length-1;++o)n={d0:t.points[o].d,d1:t.points[o+1].d,dy:t.dy,r0:t.points[o].ro,r1:t.points[o+1].ri,x0:t.points[o].x,x1:t.points[o+1].x,y0:t.points[o].y,y1:t.points[o+1].y},r+=xh(n);return r}const Eh=(t,e)=>{const n=void 0!==t.title?t.title:t.id;return e&&n.length>e?`${n.substr(0,15)}...`:n};function Ch(t,{fontColor:n,maxRank:r,nodeWidth:o}){const{data:i}=t,u=function(t,e){let n=!1,r=!1;return t.rank<e/2&&(r=!0,n=!1),{right:r,top:n}}(t,r),{x:a,y:c}=function(t,e,n){const r=e.top?-25:t.dy/2-10;let o;return o=e.top?e.right?4:-4:e.right?10+n/2:-n/2-10,{x:t.x+o,y:t.y+r}}(t,u,o),s=function(t="",{fontColor:n="#666767",pointerEvents:r="all",textAnchor:o="start",x:i,y:u}){const a=new e.Text;return a.font({fill:n}),a.tspan(t),void 0!==i&&void 0!==u&&a.move(i,u),a.attr({"pointer-events":r,"text-anchor":o}),a}(Eh(i,u.top?25:15),{fontColor:n,pointerEvents:"none",textAnchor:u.top?"middle":u.right?"start":"end",x:a,y:c});return s}function Sh(t,n,r){var o,i;const{dy:u,x:a,y:c}=t,{fontColor:s,fontSize:f,nodeBorderColor:l,nodeBorderWidth:d,nodeWidth:h,onNodeClick:p}=r,v=new e.G({class:"node"}),g=function({borderColor:t="#caced0",color:n="#97cbe6",height:r=0,opacity:o=1,radius:i=0,width:u=0,x:a=0,y:c=0}={}){const s=new e.Rect;return s.attr({height:r,opacity:o,rx:i,ry:i,width:u,x:a,y:c}),s.fill(n),s.stroke({color:t,width:1}),s}({height:u,width:h,x:a-h/2,y:c});if(g.fill(null==(o=t.data)?void 0:o.color),g.stroke({color:l??(null==(i=t.data)?void 0:i.color),width:d}),g.on("click",(()=>{"function"==typeof p&&p(t)})),v.add(g),t.data&&u>Number.parseInt(f,10)){const e=Ch(t,{fontColor:s,maxRank:n,nodeWidth:h});v.add(e)}return v}class Ah{constructor(t,n,r){this.element=t,this.options=n,this.chartContext=r,t.innerHTML="",this.canvas=e.SVG().addTo(t).size("100%","100%").viewbox(`-${this.spacing} -${this.spacing+this.getYShift()} ${this.width+2*this.spacing} ${this.height+this.spacing+this.getYShift()}`).attr({style:this.options.canvasStyle})}getYShift(){return this.options.enableToolbar?30:0}add(t){this.canvas.add(t)}clear(){this.canvas.clear().viewbox(`-${this.spacing} -${this.spacing+this.getYShift()} ${this.width+2*this.spacing} ${this.height+this.spacing+this.getYShift()}`)}exportToSvg(){new i(this.canvas,"apexsankey").exportToSVG()}resetViewBox(){this.canvas.viewbox(`-${this.spacing} -${this.spacing+this.getYShift()} ${this.width+2*this.spacing} ${this.height+this.spacing+this.getYShift()}`)}updateViewBox(t,e,n,r){this.canvas.viewbox(`${t} ${e} ${n} ${r}`)}get height(){return this.options.viewPortHeight}get spacing(){return this.options.spacing}get width(){return this.options.viewPortWidth}}class kh extends Ah{constructor(t,e,n){super(t,e,n)}construct(t){const{nodeWidth:e,spacing:n,viewPortHeight:r,viewPortWidth:o}=this.options,i=yh({nodeWidth:e});i.size([o-e,r-n]);const u=t.nodes.map(((t,e)=>{const n=e%bh.length;return{...t,color:t.color??bh[n],colorIndex:n}})),a=i(t.edges,u,t.options);this.maxRank=i.order().length-1,this.graph=a}render({keepOldPosition:t=!1}={}){var e,n;const{enableTooltip:r,fontColor:o,fontFamily:i,fontSize:u,fontWeight:a,nodeBorderColor:s,nodeBorderWidth:f,nodeWidth:l,onNodeClick:d,tooltipId:h}=this.options,p=this.canvas.viewbox();this.clear();const v=((t={})=>{const e=[];for(const n in t){const r=`${dt(n)}: ${t[n]};`;e.push(r)}return e.join(" ")})({color:o,fontFamily:i,fontSize:u,fontWeight:a}),g=c(l/2,0);g.attr("style",v);const y=(null==(e=this.graph)?void 0:e.nodes())||[],b=(null==(n=this.graph)?void 0:n.edges())||[],m=c();b.forEach((t=>{this.renderEdge(t,m)})),g.add(m);const _=c();if(y.forEach((t=>{const e=this.graph.node(t);if(e.dummy)return;const n=Sh(e,this.maxRank,{fontColor:o,fontSize:u,nodeBorderColor:s,nodeBorderWidth:f,nodeWidth:l,onNodeClick:d});_.add(n)})),g.add(_),this.add(g),t&&this.updateViewBox(p.x,p.y,p.width,p.height),r){const t=ht(this.chartContext,h);this.chartContext.getAppendContainer().appendChild(t)}}renderEdge(t,n){const{edgeGradientFill:r,edgeOpacity:o,enableTooltip:i,fontColor:u,fontFamily:a,fontSize:c,fontWeight:s,nodeWidth:f,tooltipBGColor:l,tooltipBorderColor:d,tooltipId:h,tooltipTemplate:p}=this.options,v=this.graph.edge(t.v,t.w,t.name),g=this.graph.node(t.v),y=this.graph.node(t.w),b=v.source,m=v.target;g.dummy&&(v.x0-=f/2),y.dummy&&(v.x1+=f/2);const _=function(t,{edgeColor:n,id:r="",opacity:o=1}={}){const i=new e.Path({d:t});return i.id(r),i.fill(n).opacity(o),i}(jh(v),{edgeColor:this.canvas.gradient("linear",(t=>{var e,n,o;t.stop(0,null==(e=b.data)?void 0:e.color),t.stop(1,r?null==(n=m.data)?void 0:n.color:null==(o=b.data)?void 0:o.color)})),id:`${t.v}-${t.w}`,opacity:o});if(i&&b.data&&m.data){const t=p?p({source:b.data,target:m.data,value:v.value}):`${b.data.title} → ${m.data.title}: ${v.value}`;_.on("mouseover",(e=>{const n=vt({bgColor:l,borderColor:d,fontColor:u,fontFamily:a,fontSize:c,fontWeight:s,x:e.pageX,y:e.pageY});pt(this.chartContext,h,n,t)})),_.on("mousemove",(e=>{const n=vt({bgColor:l,borderColor:d,fontColor:u,fontFamily:a,fontSize:c,fontWeight:s,x:e.pageX,y:e.pageY});pt(this.chartContext,h,n,t)})),_.on("mouseout",(()=>{ht(this.chartContext,h).style.display="none"}))}n.add(_)}}const Oh={canvasStyle:"border: 1px solid #caced0; box-sizing: border-box",edgeGradientFill:!0,edgeOpacity:.4,enableToolbar:!0,enableTooltip:!0,fontColor:"#212121",fontFamily:"",fontSize:"14px",fontWeight:"400",height:"auto",nodeBorderColor:null,nodeBorderWidth:1,nodeWidth:20,onNodeClick:void 0,spacing:20,tooltipBGColor:"#FFFFFF",tooltipBorderColor:"#BCBCBC",tooltipId:"apexsankey-tooltip-container",tooltipTemplate:({source:t,target:e,value:n})=>`\n <div style='display:flex;align-items:center;gap:1px;padding:3px 5px;'>\n <div style='width:12px;height:12px;background-color:${t.color}'></div>\n <div>${t.title}</div>\n <div>=></div>\n <div style='width:12px;height:12px;background-color:${e.color}'></div>\n <div>${e.title}</div>\n <div>: ${n}</div> \n </div>\n `,viewPortHeight:500,viewPortWidth:800,width:"100%"};class Lh extends r{constructor(t,e={}){super(t,"sankey_"+Math.random().toString(36).substr(2,9)),this.options={...Oh,...e};const{height:n,width:r}=this.options;this.graph=new kh(this.element,this.options,this.chartContext),this.setupElementDimensions(r,n),this.handleWatermark()}static setLicense(t){a.setLicense(t)}setupElementDimensions(t,e){let n=!1,r=0;"string"==typeof t&&/^\d+(\.\d+)?%$/.test(t)?(r=Number(t.substring(0,t.length-1)),n=!0):r=Number(t);const o="auto"===e?r/1.6:e;this.element.style.width=`${r}${n?"%":"px"}`,this.element.style.height=`${o}${n?"%":"px"}`,this.element.style.position="relative"}handleWatermark(){this.element&&(a.isLicenseValid()?d.remove(this.element):d.add(this.element))}render(t){if(!this.element)throw new Error("Element not found");if(this.graph.construct(t),this.graph.render(),this.options.enableToolbar){new f(this.element,this.chartContext).render({enableExport:!0,onExport:this.graph.exportToSvg.bind(this.graph)})}return this.graph}}"undefined"!=typeof window&&(window.ApexSankey=Lh),t.ApexSankey=Lh,t.default=Lh,Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@svgdotjs/svg.js")):"function"==typeof define&&define.amd?define(["exports","@svgdotjs/svg.js"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).ApexSankey={},t.SVG)}(this,(function(t,e){"use strict";class n{constructor(t,e){this.injectedStyles=new Set,this.chartContainer=null,this.instanceId=e||Math.random().toString(36).substr(2,9),this.context=this.detectContext(t),this.chartContainer=t}getChartContainer(){return this.chartContainer}getChartScopedContainer(){return this.context===document?document.body||document.getElementsByTagName("body")[0]:this.chartContainer||this.context}detectContext(t){const e=t.getRootNode();return e instanceof ShadowRoot?e:document}getContext(){return this.context}getInstanceId(){return this.instanceId}isShadowDOM(){return this.context instanceof ShadowRoot}createElement(t){return document.createElement(t)}createElementNS(t,e){return document.createElementNS(t,e)}createTextNode(t){return document.createTextNode(t)}getElementById(t){return this.context===document?document.getElementById(t):this.context.querySelector(`#${t}`)}getElementsByClassName(t){if(this.context===document)return document.getElementsByClassName(t);const e=this.context.querySelectorAll(`.${t}`),n=Array.from(e);return{item:t=>n[t]||null,get length(){return n.length},[Symbol.iterator]:()=>n[Symbol.iterator](),...Object.fromEntries(n.map(((t,e)=>[e,t])))}}querySelector(t){return this.context.querySelector(t)}querySelectorAll(t){return this.context.querySelectorAll(t)}getAppendContainer(){return this.context===document?document.body||document.getElementsByTagName("body")[0]:this.context}getChartBounds(){var t;return(null==(t=this.chartContainer)?void 0:t.getBoundingClientRect())||new DOMRect}getBody(){if(this.context===document)return document.body||document.getElementsByTagName("body")[0];return this.context.host}dispatchEvent(t){this.context===document?document.dispatchEvent(t):this.context.dispatchEvent(t)}addEventListener(t,e,n){this.context===document||"mousemove"===t||"mouseup"===t||"keydown"===t?document.addEventListener(t,e,n):this.context.addEventListener(t,e,n)}removeEventListener(t,e,n){this.context===document||"mousemove"===t||"mouseup"===t||"keydown"===t?document.removeEventListener(t,e,n):this.context.removeEventListener(t,e,n)}injectStyles(t,e,n={}){const{force:r=!1,priority:o="normal"}=n;if(!r&&this.injectedStyles.has(e))return;if(r){const t=this.context.querySelector(`#${e}`);t&&(t.remove(),this.injectedStyles.delete(e))}if(this.context.querySelector(`#${e}`)&&!r)return void this.injectedStyles.add(e);const i=document.createElement("style");if(i.id=e,i.textContent=t,"normal"!==o&&i.setAttribute("data-priority",o),this.context===document)document.head.appendChild(i);else{const t=this.context;"high"===o?t.insertBefore(i,t.firstChild):t.appendChild(i)}this.injectedStyles.add(e)}injectStylesheets(t){t.forEach((({content:t,id:e,options:n})=>{this.injectStyles(t,e,n)}))}hasInjectedStyles(t){return this.injectedStyles.has(t)}removeStyles(t){const e=this.context.querySelector(`#${t}`);e&&(e.remove(),this.injectedStyles.delete(t))}removeAllStyles(){this.injectedStyles.forEach((t=>{const e=this.context.querySelector(`#${t}`);e&&e.remove()})),this.injectedStyles.clear()}getInjectedStyleIds(){return Array.from(this.injectedStyles)}getActiveElement(){if(this.context===document)return document.activeElement;return this.context.activeElement||document.activeElement}destroy(){this.removeAllStyles(),this.injectedStyles.clear()}}class r{constructor(t,e){if(!t)throw new Error("Container element is required");this.element=t,this.chartContext=new n(t,e)}getContext(){return this.chartContext}isShadowDOM(){return this.chartContext.isShadowDOM()}getTooltipContainer(){return this.chartContext.getAppendContainer()}injectStyles(t,e){this.chartContext.injectStyles(t,e)}createElement(t){return this.chartContext.createElement(t)}querySelector(t){return this.chartContext.querySelector(t)}addEventListener(t,e,n){this.chartContext.addEventListener(t,e,n)}removeEventListener(t,e,n){this.chartContext.removeEventListener(t,e,n)}dispatchEvent(t){this.chartContext.dispatchEvent(t)}destroy(){this.chartContext.destroy()}getInstanceId(){return this.chartContext.getInstanceId()}}function o(){}class i{constructor(t,e="apex"){this.canvas=t,this.prefix=e}getSvgString(){return this.canvas.svg().replace(/(<img [\w\W]+?)(>)/g,"$1 />").replace(/(<br)(>)/g,"$1 />").replace(/(<hr)(>)/g,"$1 />")}svgUrl(){const t=this.getSvgString(),e=new Blob([t],{type:"image/svg+xml;charset=utf-8"});return URL.createObjectURL(e)}triggerDownload(t,e){const n=document.createElement("a");n.href=t,n.download=e,document.body.appendChild(n),n.click(),document.body.removeChild(n)}exportToSVG(){this.triggerDownload(this.svgUrl(),`${this.prefix}-${(new Date).getTime()}.svg`)}}const u=class{static decodeLicenseData(t){try{const e=window.atob(t),n=JSON.parse(e);return n.issueDate&&n.expiryDate&&n.plan?{expiryDate:n.expiryDate,issueDate:n.issueDate,plan:n.plan,valid:!0}:null}catch{return null}}static generateLicenseKey(t,e,n="standard"){const r={expiryDate:e,issueDate:t,plan:n};return`APEX-${window.btoa(JSON.stringify(r))}`}static getLicenseStatus(){return this.licenseKey?(this.validationResult||(this.validationResult=this.validateLicense(this.licenseKey)),this.validationResult):{expired:!1,valid:!1}}static isLicenseValid(){return!!this.licenseKey&&(this.validationResult||(this.validationResult=this.validateLicense(this.licenseKey)),this.validationResult.valid)}static setLicense(t){this.licenseKey=t,this.validationResult=this.validateLicense(t),this.validationResult.valid||console.error(`[Apex] ${this.validationResult.message}`)}static validateLicense(t){try{if(!t.startsWith("APEX-"))return{expired:!1,message:'Invalid license key format. License key must start with "APEX-".',valid:!1};const e=t.split("-");if(2!==e.length)return{expired:!1,message:"Invalid license key format. Expected format: APEX-{encoded-data}.",valid:!1};const n=e[1],r=this.decodeLicenseData(n);if(!r)return{expired:!1,message:"Invalid license key. Unable to decode license data.",valid:!1};const o=new Date;return new Date(r.expiryDate)<o?{data:r,expired:!0,message:`License expired on ${r.expiryDate}. Please renew your license.`,valid:!1}:{data:r,expired:!1,valid:!0}}catch{return{expired:!1,message:"Invalid license key format or corrupted data.",valid:!1}}}};u.licenseKey=null,u.validationResult=null;let a=u;function c(t,n,r,o){const i=new e.G;return i.attr({"data-parent":o,"data-self":r,transform:void 0!==t&&void 0!==n?`translate(${t}, ${n})`:void 0}),i}const s={export:"data:image/svg+xml,%3csvg%20fill='%23000000'%20width='20px'%20height='20px'%20viewBox='0%200%2024%2024'%20id='export-2'%20xmlns='http://www.w3.org/2000/svg'%20class='icon%20line'%3e%3cpolyline%20id='primary'%20points='15%203%2021%203%2021%209'%20style='fill:%20none;%20stroke:%20rgb(0,%200,%200);%20stroke-linecap:%20round;%20stroke-linejoin:%20round;%20stroke-width:%201.5;'%3e%3c/polyline%3e%3cpath%20id='primary-2'%20data-name='primary'%20d='M21,13v7a1,1,0,0,1-1,1H4a1,1,0,0,1-1-1V4A1,1,0,0,1,4,3h7'%20style='fill:%20none;%20stroke:%20rgb(0,%200,%200);%20stroke-linecap:%20round;%20stroke-linejoin:%20round;%20stroke-width:%201.5;'%3e%3c/path%3e%3cline%20id='primary-3'%20data-name='primary'%20x1='11'%20y1='13'%20x2='21'%20y2='3'%20style='fill:%20none;%20stroke:%20rgb(0,%200,%200);%20stroke-linecap:%20round;%20stroke-linejoin:%20round;%20stroke-width:%201.5;'%3e%3c/line%3e%3c/svg%3e","fit-screen":"data:image/svg+xml,%3csvg%20width='20px'%20height='20px'%20viewBox='0%200%2032%2032'%20id='icon'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpolygon%20points='8%202%202%202%202%208%204%208%204%204%208%204%208%202'/%3e%3cpolygon%20points='24%202%2030%202%2030%208%2028%208%2028%204%2024%204%2024%202'/%3e%3cpolygon%20points='8%2030%202%2030%202%2024%204%2024%204%2028%208%2028%208%2030'/%3e%3cpolygon%20points='24%2030%2030%2030%2030%2024%2028%2024%2028%2028%2024%2028%2024%2030'/%3e%3cpath%20d='M24,24H8a2.0023,2.0023,0,0,1-2-2V10A2.0023,2.0023,0,0,1,8,8H24a2.0023,2.0023,0,0,1,2,2V22A2.0023,2.0023,0,0,1,24,24ZM8,10V22H24V10Z'/%3e%3crect%20fill='none'%20width='32'%20height='32'/%3e%3c/svg%3e","zoom-in":"data:image/svg+xml,%3csvg%20width='20px'%20height='20px'%20viewBox='0%200%2032%2032'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20xmlns:sketch='http://www.bohemiancoding.com/sketch/ns'%3e%3cg%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20transform='translate(-308.000000,%20-1139.000000)'%20fill='%23000000'%3e%3cpath%20d='M321.46,1163.45%20C315.17,1163.45%20310.07,1158.44%20310.07,1152.25%20C310.07,1146.06%20315.17,1141.04%20321.46,1141.04%20C327.75,1141.04%20332.85,1146.06%20332.85,1152.25%20C332.85,1158.44%20327.75,1163.45%20321.46,1163.45%20L321.46,1163.45%20Z%20M339.688,1169.25%20L331.429,1161.12%20C333.592,1158.77%20334.92,1155.67%20334.92,1152.25%20C334.92,1144.93%20328.894,1139%20321.46,1139%20C314.026,1139%20308,1144.93%20308,1152.25%20C308,1159.56%20314.026,1165.49%20321.46,1165.49%20C324.672,1165.49%20327.618,1164.38%20329.932,1162.53%20L338.225,1170.69%20C338.629,1171.09%20339.284,1171.09%20339.688,1170.69%20C340.093,1170.3%20340.093,1169.65%20339.688,1169.25%20L339.688,1169.25%20Z%20M326.519,1151.41%20L322.522,1151.41%20L322.522,1147.41%20C322.522,1146.85%20322.075,1146.41%20321.523,1146.41%20C320.972,1146.41%20320.524,1146.85%20320.524,1147.41%20L320.524,1151.41%20L316.529,1151.41%20C315.978,1151.41%20315.53,1151.59%20315.53,1152.14%20C315.53,1152.7%20315.978,1153.41%20316.529,1153.41%20L320.524,1153.41%20L320.524,1157.41%20C320.524,1157.97%20320.972,1158.41%20321.523,1158.41%20C322.075,1158.41%20322.522,1157.97%20322.522,1157.41%20L322.522,1153.41%20L326.519,1153.41%20C327.07,1153.41%20327.518,1152.96%20327.518,1152.41%20C327.518,1151.86%20327.07,1151.41%20326.519,1151.41%20L326.519,1151.41%20Z'%20/%3e%3c/g%3e%3c/g%3e%3c/svg%3e","zoom-out":"data:image/svg+xml,%3csvg%20width='20px'%20height='20px'%20viewBox='0%200%2032%2032'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cg%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%20%3e%3cg%20transform='translate(-360.000000,%20-1139.000000)'%20fill='%23000000'%3e%3cpath%20d='M373.46,1163.45%20C367.17,1163.45%20362.071,1158.44%20362.071,1152.25%20C362.071,1146.06%20367.17,1141.04%20373.46,1141.04%20C379.75,1141.04%20384.85,1146.06%20384.85,1152.25%20C384.85,1158.44%20379.75,1163.45%20373.46,1163.45%20L373.46,1163.45%20Z%20M391.688,1169.25%20L383.429,1161.12%20C385.592,1158.77%20386.92,1155.67%20386.92,1152.25%20C386.92,1144.93%20380.894,1139%20373.46,1139%20C366.026,1139%20360,1144.93%20360,1152.25%20C360,1159.56%20366.026,1165.49%20373.46,1165.49%20C376.672,1165.49%20379.618,1164.38%20381.932,1162.53%20L390.225,1170.69%20C390.629,1171.09%20391.284,1171.09%20391.688,1170.69%20C392.093,1170.3%20392.093,1169.65%20391.688,1169.25%20L391.688,1169.25%20Z%20M378.689,1151.41%20L368.643,1151.41%20C368.102,1151.41%20367.663,1151.84%20367.663,1152.37%20C367.663,1152.9%20368.102,1153.33%20368.643,1153.33%20L378.689,1153.33%20C379.23,1153.33%20379.669,1152.9%20379.669,1152.37%20C379.669,1151.84%20379.23,1151.41%20378.689,1151.41%20L378.689,1151.41%20Z'%20/%3e%3c/g%3e%3c/g%3e%3c/svg%3e"};class f{constructor(t,e){this.element=t,t&&(this.chartContext=e||new n(t),this.injectStyles())}injectStyles(){const t=`toolbar-styles-${this.chartContext.getInstanceId()}`;this.chartContext.injectStyles("\n #toolbar {\n display: flex;\n gap: 5px;\n position: absolute;\n right: 10px;\n top: 10px;\n z-index: 100;\n }\n \n .toolbar-item {\n align-items: center;\n background-color: var(--toolbar-bg-color, #FFFFFF);\n border: 1px solid var(--toolbar-border-color, #BCBCBC);\n cursor: pointer;\n display: flex;\n height: 30px;\n justify-content: center;\n width: 30px;\n border-radius: 3px;\n transition: all 0.2s ease;\n position: relative;\n }\n \n .toolbar-item:hover {\n background-color: var(--toolbar-hover-bg-color, #f8f9fa);\n border-color: var(--toolbar-border-color, #999);\n transform: translateY(-1px);\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);\n }\n \n .toolbar-item:active {\n transform: translateY(0);\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);\n }\n \n .toolbar-item:focus {\n outline: none;\n border-color: var(--button-bg-color, #0066cc);\n box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.2);\n }\n \n .toolbar-item img {\n width: 16px;\n height: 16px;\n pointer-events: none;\n filter: var(--toolbar-icon-filter, none);\n }\n \n .toolbar-item[disabled] {\n opacity: 0.5;\n cursor: not-allowed;\n pointer-events: none;\n }\n \n /* Tooltip styles */\n .toolbar-item::after {\n content: attr(data-tooltip);\n position: absolute;\n bottom: -35px;\n left: 50%;\n transform: translateX(-50%);\n background: var(--tooltip-bg-color, #333);\n color: var(--tooltip-text-color, white);\n padding: 4px 8px;\n border-radius: 4px;\n font-size: 12px;\n white-space: nowrap;\n opacity: 0;\n pointer-events: none;\n transition: opacity 0.2s ease;\n z-index: 1000;\n }\n \n .toolbar-item::before {\n content: '';\n position: absolute;\n bottom: -25px;\n left: 50%;\n transform: translateX(-50%);\n border: 5px solid transparent;\n border-bottom-color: var(--tooltip-bg-color, #333);\n opacity: 0;\n pointer-events: none;\n transition: opacity 0.2s ease;\n z-index: 1000;\n }\n \n .toolbar-item:hover::after,\n .toolbar-item:hover::before {\n opacity: 1;\n }\n \n /* Shadow DOM specific adjustments */\n :host #toolbar {\n display: flex;\n gap: 5px;\n position: absolute;\n right: 10px;\n top: 10px;\n z-index: 100;\n }\n",t)}createToolbarItem(t,e,n){const r=this.chartContext.createElement("div"),o=new Image;return o.src=e,o.alt=n||t,r.id=t,r.className="toolbar-item",r.setAttribute("role","button"),r.setAttribute("tabindex","0"),n&&(r.setAttribute("data-tooltip",n),r.setAttribute("aria-label",n)),r.append(o),r.addEventListener("keydown",(t=>{"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),r.click())})),r}render({enableExport:t=!1,enableFitscreen:e=!1,enableZoom:n=!1,onExport:r=o,onFitscreen:i=o,onZoom:u=o}){if(!this.element)return;const a=this.chartContext.querySelector("#toolbar");null==a||a.remove();const c=this.chartContext.createElement("div");if(c.id="toolbar",c.setAttribute("role","toolbar"),c.setAttribute("aria-label","Chart controls"),t){const t=this.createToolbarItem("export",s.export,"Export chart");t.addEventListener("click",(()=>{r()})),c.append(t)}if(n){const t=this.createToolbarItem("zoom-in",s["zoom-in"],"Zoom in"),e=this.createToolbarItem("zoom-out",s["zoom-out"],"Zoom out");t.addEventListener("click",(()=>{u(.1)})),e.addEventListener("click",(()=>{u(-.1)})),c.append(t,e)}if(e){const t=this.createToolbarItem("fit-screen",s["fit-screen"],"Fit to screen");t.addEventListener("click",(()=>{i()})),c.append(t)}this.element.append(c)}destroy(){const t=this.chartContext.querySelector("#toolbar");null==t||t.remove()}}const l=class{static add(t){this.remove(t);const e=document.createElement("div");e.className=this.WATERMARK_CLASS,e.textContent=this.WATERMARK_TEXT,Object.assign(e.style,{bottom:"5px",color:"#666",fontFamily:"Arial, sans-serif",fontSize:"14px",msUserSelect:"none",pointerEvents:"none",position:"absolute",right:"5px",userSelect:"none",webkitUserSelect:"none",zIndex:"1000"}),"static"===getComputedStyle(t).position&&(t.style.position="relative"),t.appendChild(e)}static exists(t){return!!t.querySelector(`.${this.WATERMARK_CLASS}`)}static remove(t){const e=t.querySelector(`.${this.WATERMARK_CLASS}`);e&&e.remove()}};l.WATERMARK_CLASS="apexgantt-watermark",l.WATERMARK_TEXT="Powered by apexcharts.com";let d=l;var h,p=(h={"À":"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"},function(t){return null==h?void 0:h[t]}),v="object"==typeof global&&global&&global.Object===Object&&global,g="object"==typeof self&&self&&self.Object===Object&&self,y=v||g||Function("return this")(),b=y.Symbol;var m=Array.isArray,_=Object.prototype,x=_.hasOwnProperty,w=_.toString,j=b?b.toStringTag:void 0;var E=Object.prototype.toString;var C="[object Null]",S="[object Undefined]",A=b?b.toStringTag:void 0;function k(t){return null==t?void 0===t?S:C:A&&A in Object(t)?function(t){var e=x.call(t,j),n=t[j];try{t[j]=void 0;var r=!0}catch(i){}var o=w.call(t);return r&&(e?t[j]=n:delete t[j]),o}(t):function(t){return E.call(t)}(t)}function O(t){return null!=t&&"object"==typeof t}var L="[object Symbol]";function M(t){return"symbol"==typeof t||O(t)&&k(t)==L}var $=1/0,z=b?b.prototype:void 0,I=z?z.toString:void 0;function N(t){if("string"==typeof t)return t;if(m(t))return function(t,e){for(var n=-1,r=null==t?0:t.length,o=Array(r);++n<r;)o[n]=e(t[n],n,t);return o}(t,N)+"";if(M(t))return I?I.call(t):"";var e=t+"";return"0"==e&&1/t==-$?"-0":e}function T(t){return null==t?"":N(t)}var F=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,P=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var D=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var B=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var R="\\ud800-\\udfff",U="\\u2700-\\u27bf",W="a-z\\xdf-\\xf6\\xf8-\\xff",G="A-Z\\xc0-\\xd6\\xd8-\\xde",V="\\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",Z="["+V+"]",q="\\d+",Y="["+U+"]",K="["+W+"]",H="[^"+R+V+q+U+W+G+"]",X="(?:\\ud83c[\\udde6-\\uddff]){2}",J="[\\ud800-\\udbff][\\udc00-\\udfff]",Q="["+G+"]",tt="(?:"+K+"|"+H+")",et="(?:"+Q+"|"+H+")",nt="(?:['’](?:d|ll|m|re|s|t|ve))?",rt="(?:['’](?:D|LL|M|RE|S|T|VE))?",ot="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",it="[\\ufe0e\\ufe0f]?",ut=it+ot+("(?:\\u200d(?:"+["[^"+R+"]",X,J].join("|")+")"+it+ot+")*"),at="(?:"+[Y,X,J].join("|")+")"+ut,ct=RegExp([Q+"?"+K+"+"+nt+"(?="+[Z,Q,"$"].join("|")+")",et+"+"+rt+"(?="+[Z,Q+tt,"$"].join("|")+")",Q+"?"+tt+"+"+nt,Q+"+"+rt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",q,at].join("|"),"g");function st(t,e,n){return t=T(t),void 0===e?function(t){return B.test(t)}(t)?function(t){return t.match(ct)||[]}(t):function(t){return t.match(D)||[]}(t):t.match(e)||[]}var ft=RegExp("['’]","g");var lt,dt=(lt=function(t,e,n){return t+(n?"-":"")+e.toLowerCase()},function(t){return function(t,e,n,r){for(var o=-1,i=null==t?0:t.length;++o<i;)n=e(n,t[o],o,t);return n}(st(function(t){return(t=T(t))&&t.replace(F,p).replace(P,"")}(t).replace(ft,"")),lt,"")});const ht=(t,e="apex-tooltip-container")=>{let n=t.getElementById(e);if(!n){n=t.createElement("div"),n.id=e,n.setAttribute("role","tooltip"),n.setAttribute("aria-hidden","true");t.getAppendContainer().appendChild(n)}return n},pt=(t,e="",n,r="")=>{const o=t.getElementById(e);if(!o)return console.warn("Tooltip: Element not found, creating it"),ht(t,e),pt(t,e,n,r);if(n&&r){const t=r.includes("tooltip-content"),e=n.match(/background-color:\s*([^;]+);?/),i=n.match(/color:\s*([^;]+);?/),u=e?e[1]:"#333",a=i?i[1]:"white";o.innerHTML=t?r:`<div class="tooltip-content" style="background-color: ${u}; color: ${a};">${r}</div>`;const c=n+"; display: block !important; visibility: visible !important; opacity: 1 !important;";o.setAttribute("style",c),o.classList.add("visible"),o.setAttribute("aria-hidden","false")}else o.removeAttribute("style"),o.classList.remove("visible"),o.setAttribute("aria-hidden","true"),o.innerHTML=""},vt=({bgColor:t,borderColor:e,fontColor:n,fontFamily:r,fontSize:o,fontWeight:i,maxWidth:u,padding:a,placement:c="top",x:s,y:f})=>{const l=["position: absolute;","z-index: 1000;","pointer-events: none;"];return l.push("box-sizing: border-box;"),l.push("word-wrap: break-word;"),l.push("overflow-wrap: break-word;"),l.push(`left: ${s}px;`),l.push(`top: ${f}px;`),l.push(`data-placement: ${c};`),u&&(l.push(`width: ${u}px;`),l.push(`max-width: ${u}px;`)),e&&l.push(`border: 1px solid ${e};`),l.push("border-radius: 5px;"),n&&l.push(`color: ${n};`),r&&l.push(`font-family: ${r};`),i&&l.push(`font-weight: ${i};`),o&&l.push(`font-size: ${o};`),t&&l.push(`background-color: ${t};`),void 0!==a&&l.push(`padding: ${a}px;`),l.join(" ")};function gt(t,e){let n=null;for(let r=0;r<t.length;++r)if(e(t[r])){n=r;break}return n}function yt(t,e){if(0===t.length)return;let n,r=0;for(let i=t.length-1;i>=0;--i)n=t[i].dy/2,t[i][e]-n<r&&(t[i][e]=Math.min(t[i].Rmax,r+n)),r=t[i][e]+n;let o=t[0].Rmax+t[0].dy/2;for(let i=0;i<t.length;++i)n=t[i].dy/2,t[i][e]+n>o&&(t[i][e]=Math.max(n,o-n)),o=t[i][e]-n}function bt(t){const e=t.edgeGap||0;return function(n){!function(t,e,n){t.nodes().forEach((r=>{const o=t.node(r),i=mt(t,o.outgoing||[],"outgoing"),u=mt(t,o.incoming||[],"incoming"),a=i.length,c=u.length,s=i.reduce(((e,n)=>e+t.edge(n).dy),0),f=u.reduce(((e,n)=>e+t.edge(n).dy),0),l=s+Math.max(0,a-1)*n,d=f+Math.max(0,c-1)*n;let h=(o.dy-l)/2,p=(o.dy-d)/2;h=Math.max(0,h),p=Math.max(0,p),i.forEach(((r,i)=>{const u=t.edge(r);u.x0=o.x+e.nodeWidth/2,u.y0=o.y+h+u.dy/2,u.d0=o.direction||"r",h+=u.dy,i<a-1&&(h+=n)})),u.forEach(((r,i)=>{const u=t.edge(r);u.x1=o.x-e.nodeWidth/2,u.y1=o.y+p+u.dy/2,u.d1=o.direction||"r",p+=u.dy,i<c-1&&(p+=n)}))}))}(n,t,e),function(t){t.nodes().forEach((e=>{const n=t.node(e),r=(n.outgoing||[]).map((e=>t.edge(e))),o=(n.incoming||[]).map((e=>t.edge(e)));r.sort(((t,e)=>t.y0-e.y0)),o.sort(((t,e)=>t.y1-e.y1)),_t(r,"r0"),_t(o,"r1")}))}(n);const r=[];return n.edges().forEach((t=>{const e=n.edge(t);e.id=`${t.v}-${t.w}-${t.name}`,r.push(e)})),r}}function mt(t,e,n){return e.slice().sort(((e,r)=>{let o,i;if("outgoing"===n){const n=t.node(e.w),u=t.node(r.w);o=(null==n?void 0:n.y)??0,i=(null==u?void 0:u.y)??0}else{const n=t.node(e.v),u=t.node(r.v);o=(null==n?void 0:n.y)??0,i=(null==u?void 0:u.y)??0}if(Math.abs(o-i)>.001)return o-i;if(e.name!==r.name){if("number"==typeof e.name&&"number"==typeof r.name)return e.name-r.name;if("string"==typeof e.name&&"string"==typeof r.name)return e.name.localeCompare(r.name)}return 0}))}function _t(t,e){t.forEach((t=>{t.Rmax=function(t){const e=t.x1-t.x0,n=t.y1-t.y0;return t.d0!==t.d1?Math.abs(n)/2.1:0!==n?(e*e+n*n)/Math.abs(4*n):1/0}(t),t[e]=Math.max(t.dy/2,t.d0===t.d1?.6*t.Rmax:5+t.dy/2)}));let n=gt(t,"r0"===e?t=>t.y1>t.y0:t=>t.y0>t.y1);if(null===n&&(n=t.length),yt(t.slice(n),e),n>0){const r=[];for(let e=n-1;e>=0;e--)r.push(t[e]);yt(r,e)}}function xt(t,e,n,r,o){if(0===r.length)return;const i=r.map((n=>{const r=`__${e.v}_${e.w}_${n}`;return t.setNode(r,{data:null,direction:o,dummy:!0,rank:n}),r})),u=[e.v,...i,e.w];u.forEach(((r,o)=>{o+1<u.length&&t.setEdge(u[o],u[o+1],{data:t.edge(e).data,origEdge:e,origLabel:n,source:t.node(e.v),target:t.node(e.w),value:t.edge(e).value},e.name)})),t.removeEdge(e)}function wt(t,e,n){return function(t,e,n){let r,o,i;e.length>n.length?(r=e,i=n):(r=n,i=e);const u=[];r.forEach((e=>{i.forEach(((n,r)=>{(t.hasEdge(e,n)||t.hasEdge(n,e))&&u.push(r)}))}));let a=1;for(;a<o;)a*=2;const c=2*a-1;a-=1;const s=new Array(c);for(let l=0;l<c;l++)s[l]=0;let f=0;return u.forEach((t=>{let e=t+a;for(s[e]++;e>0;)e%2&&(f+=s[e+1]),e=Math.floor((e-1)/2),s[e]++})),f}(t,e,n)}var jt,Et,Ct,St,At,kt,Ot,Lt,Mt,$t,zt,It,Nt,Tt,Ft,Pt,Dt,Bt,Rt,Ut,Wt,Gt,Vt,Zt,qt,Yt,Kt,Ht,Xt,Jt,Qt,te,ee,ne,re,oe,ie,ue,ae,ce,se,fe,le,de,he,pe,ve,ge,ye,be,me,_e,xe,we,je,Ee,Ce,Se,Ae,ke,Oe,Le,Me,$e,ze,Ie,Ne,Te,Fe,Pe,De,Be,Re,Ue,We,Ge,Ve,Ze,qe,Ye,Ke,He,Xe,Je,Qe,tn,en,nn,rn,on,un,an,cn,sn,fn,ln,dn,hn,pn,vn,gn,yn,bn,mn,_n,xn,wn,jn,En="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Cn(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Sn(){if(St)return Ct;return St=1,Ct=function(t,e){return t===e||t!=t&&e!=e}}function An(){if(kt)return At;kt=1;var t=Sn();return At=function(e,n){for(var r=e.length;r--;)if(t(e[r][0],n))return r;return-1}}function kn(){if(Pt)return Ft;Pt=1;var t=Et?jt:(Et=1,jt=function(){this.__data__=[],this.size=0}),e=function(){if(Lt)return Ot;Lt=1;var t=An(),e=Array.prototype.splice;return Ot=function(n){var r=this.__data__,o=t(r,n);return!(o<0||(o==r.length-1?r.pop():e.call(r,o,1),--this.size,0))}}(),n=function(){if($t)return Mt;$t=1;var t=An();return Mt=function(e){var n=this.__data__,r=t(n,e);return r<0?void 0:n[r][1]}}(),r=function(){if(It)return zt;It=1;var t=An();return zt=function(e){return t(this.__data__,e)>-1}}(),o=function(){if(Tt)return Nt;Tt=1;var t=An();return Nt=function(e,n){var r=this.__data__,o=t(r,e);return o<0?(++this.size,r.push([e,n])):r[o][1]=n,this}}();function i(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])}}return i.prototype.clear=t,i.prototype.delete=e,i.prototype.get=n,i.prototype.has=r,i.prototype.set=o,Ft=i}function On(){if(Yt)return qt;Yt=1;var t="object"==typeof En&&En&&En.Object===Object&&En;return qt=t}function Ln(){if(Ht)return Kt;Ht=1;var t=On(),e="object"==typeof self&&self&&self.Object===Object&&self,n=t||e||Function("return this")();return Kt=n}function Mn(){if(Jt)return Xt;Jt=1;var t=Ln().Symbol;return Xt=t}function $n(){if(oe)return re;oe=1;var t=Mn(),e=function(){if(te)return Qt;te=1;var t=Mn(),e=Object.prototype,n=e.hasOwnProperty,r=e.toString,o=t?t.toStringTag:void 0;return Qt=function(t){var e=n.call(t,o),i=t[o];try{t[o]=void 0;var u=!0}catch(c){}var a=r.call(t);return u&&(e?t[o]=i:delete t[o]),a}}(),n=function(){if(ne)return ee;ne=1;var t=Object.prototype.toString;return ee=function(e){return t.call(e)}}(),r=t?t.toStringTag:void 0;return re=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":r&&r in Object(t)?e(t):n(t)}}function zn(){if(ue)return ie;return ue=1,ie=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}}function In(){if(ce)return ae;ce=1;var t=$n(),e=zn();return ae=function(n){if(!e(n))return!1;var r=t(n);return"[object Function]"==r||"[object GeneratorFunction]"==r||"[object AsyncFunction]"==r||"[object Proxy]"==r}}function Nn(){if(de)return le;de=1;var t,e=function(){if(fe)return se;fe=1;var t=Ln()["__core-js_shared__"];return se=t}(),n=(t=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||""))?"Symbol(src)_1."+t:"";return le=function(t){return!!n&&n in t}}function Tn(){if(pe)return he;pe=1;var t=Function.prototype.toString;return he=function(e){if(null!=e){try{return t.call(e)}catch(n){}try{return e+""}catch(n){}}return""}}function Fn(){if(_e)return me;_e=1;var t=function(){if(ge)return ve;ge=1;var t=In(),e=Nn(),n=zn(),r=Tn(),o=/^\[object .+?Constructor\]$/,i=Function.prototype,u=Object.prototype,a=i.toString,c=u.hasOwnProperty,s=RegExp("^"+a.call(c).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");return ve=function(i){return!(!n(i)||e(i))&&(t(i)?s:o).test(r(i))}}(),e=(be||(be=1,ye=function(t,e){return null==t?void 0:t[e]}),ye);return me=function(n,r){var o=e(n,r);return t(o)?o:void 0},me}function Pn(){if(we)return xe;we=1;var t=Fn()(Ln(),"Map");return xe=t}function Dn(){if(Ee)return je;Ee=1;var t=Fn()(Object,"create");return je=t}function Bn(){if(Te)return Ne;Te=1;var t=function(){if(Se)return Ce;Se=1;var t=Dn();return Ce=function(){this.__data__=t?t(null):{},this.size=0}}(),e=ke?Ae:(ke=1,Ae=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}),n=function(){if(Le)return Oe;Le=1;var t=Dn(),e=Object.prototype.hasOwnProperty;return Oe=function(n){var r=this.__data__;if(t){var o=r[n];return"__lodash_hash_undefined__"===o?void 0:o}return e.call(r,n)?r[n]:void 0}}(),r=function(){if($e)return Me;$e=1;var t=Dn(),e=Object.prototype.hasOwnProperty;return Me=function(n){var r=this.__data__;return t?void 0!==r[n]:e.call(r,n)}}(),o=function(){if(Ie)return ze;Ie=1;var t=Dn();return ze=function(e,n){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=t&&void 0===n?"__lodash_hash_undefined__":n,this}}();function i(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])}}return i.prototype.clear=t,i.prototype.delete=e,i.prototype.get=n,i.prototype.has=r,i.prototype.set=o,Ne=i}function Rn(){if(Ue)return Re;Ue=1;var t=Be?De:(Be=1,De=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t});return Re=function(e,n){var r=e.__data__;return t(n)?r["string"==typeof n?"string":"hash"]:r.map}}function Un(){if(Je)return Xe;Je=1;var t=function(){if(Pe)return Fe;Pe=1;var t=Bn(),e=kn(),n=Pn();return Fe=function(){this.size=0,this.__data__={hash:new t,map:new(n||e),string:new t}}}(),e=function(){if(Ge)return We;Ge=1;var t=Rn();return We=function(e){var n=t(this,e).delete(e);return this.size-=n?1:0,n}}(),n=function(){if(Ze)return Ve;Ze=1;var t=Rn();return Ve=function(e){return t(this,e).get(e)}}(),r=function(){if(Ye)return qe;Ye=1;var t=Rn();return qe=function(e){return t(this,e).has(e)}}(),o=function(){if(He)return Ke;He=1;var t=Rn();return Ke=function(e,n){var r=t(this,e),o=r.size;return r.set(e,n),this.size+=r.size==o?0:1,this}}();function i(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])}}return i.prototype.clear=t,i.prototype.delete=e,i.prototype.get=n,i.prototype.has=r,i.prototype.set=o,Xe=i}function Wn(){if(nn)return en;nn=1;var t=kn(),e=function(){if(Bt)return Dt;Bt=1;var t=kn();return Dt=function(){this.__data__=new t,this.size=0}}(),n=Ut?Rt:(Ut=1,Rt=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}),r=Gt?Wt:(Gt=1,Wt=function(t){return this.__data__.get(t)}),o=Zt?Vt:(Zt=1,Vt=function(t){return this.__data__.has(t)}),i=function(){if(tn)return Qe;tn=1;var t=kn(),e=Pn(),n=Un();return Qe=function(r,o){var i=this.__data__;if(i instanceof t){var u=i.__data__;if(!e||u.length<199)return u.push([r,o]),this.size=++i.size,this;i=this.__data__=new n(u)}return i.set(r,o),this.size=i.size,this}}();function u(e){var n=this.__data__=new t(e);this.size=n.size}return u.prototype.clear=e,u.prototype.delete=n,u.prototype.get=r,u.prototype.has=o,u.prototype.set=i,en=u}function Gn(){if(on)return rn;return on=1,rn=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}}function Vn(){if(an)return un;an=1;var t=Fn(),e=function(){try{var e=t(Object,"defineProperty");return e({},"",{}),e}catch(n){}}();return un=e}function Zn(){if(sn)return cn;sn=1;var t=Vn();return cn=function(e,n,r){"__proto__"==n&&t?t(e,n,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[n]=r},cn}function qn(){if(ln)return fn;ln=1;var t=Zn(),e=Sn(),n=Object.prototype.hasOwnProperty;return fn=function(r,o,i){var u=r[o];n.call(r,o)&&e(u,i)&&(void 0!==i||o in r)||t(r,o,i)},fn}function Yn(){if(hn)return dn;hn=1;var t=qn(),e=Zn();return dn=function(n,r,o,i){var u=!o;o||(o={});for(var a=-1,c=r.length;++a<c;){var s=r[a],f=i?i(o[s],n[s],s,o,n):void 0;void 0===f&&(f=n[s]),u?e(o,s,f):t(o,s,f)}return o},dn}function Kn(){if(yn)return gn;return yn=1,gn=function(t){return null!=t&&"object"==typeof t}}function Hn(){if(xn)return _n;xn=1;var t=function(){if(mn)return bn;mn=1;var t=$n(),e=Kn();return bn=function(n){return e(n)&&"[object Arguments]"==t(n)}}(),e=Kn(),n=Object.prototype,r=n.hasOwnProperty,o=n.propertyIsEnumerable,i=t(function(){return arguments}())?t:function(t){return e(t)&&r.call(t,"callee")&&!o.call(t,"callee")};return _n=i}function Xn(){if(jn)return wn;jn=1;var t=Array.isArray;return wn=t}var Jn,Qn,tr,er,nr,rr,or,ir,ur,ar,cr,sr={exports:{}};function fr(){return tr||(tr=1,t=sr,e=sr.exports,n=Ln(),r=Qn?Jn:(Qn=1,Jn=function(){return!1}),o=e&&!e.nodeType&&e,i=o&&t&&!t.nodeType&&t,u=i&&i.exports===o?n.Buffer:void 0,a=(u?u.isBuffer:void 0)||r,t.exports=a),sr.exports;var t,e,n,r,o,i,u,a}function lr(){if(nr)return er;nr=1;var t=/^(?:0|[1-9]\d*)$/;return er=function(e,n){var r=typeof e;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&t.test(e))&&e>-1&&e%1==0&&e<n}}function dr(){if(or)return rr;or=1;return rr=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}}function hr(){if(cr)return ar;return cr=1,ar=function(t){return function(e){return t(e)}}}sr.exports;var pr,vr,gr,yr,br,mr,_r,xr,wr,jr,Er,Cr,Sr,Ar,kr,Or,Lr,Mr,$r,zr,Ir,Nr,Tr,Fr,Pr,Dr,Br,Rr={exports:{}};function Ur(){return pr||(pr=1,t=Rr,e=Rr.exports,n=On(),r=e&&!e.nodeType&&e,o=r&&t&&!t.nodeType&&t,i=o&&o.exports===r&&n.process,u=function(){try{var t=o&&o.require&&o.require("util").types;return t||i&&i.binding&&i.binding("util")}catch(e){}}(),t.exports=u),Rr.exports;var t,e,n,r,o,i,u}function Wr(){if(gr)return vr;gr=1;var t=function(){if(ur)return ir;ur=1;var t=$n(),e=dr(),n=Kn(),r={};return r["[object Float32Array]"]=r["[object Float64Array]"]=r["[object Int8Array]"]=r["[object Int16Array]"]=r["[object Int32Array]"]=r["[object Uint8Array]"]=r["[object Uint8ClampedArray]"]=r["[object Uint16Array]"]=r["[object Uint32Array]"]=!0,r["[object Arguments]"]=r["[object Array]"]=r["[object ArrayBuffer]"]=r["[object Boolean]"]=r["[object DataView]"]=r["[object Date]"]=r["[object Error]"]=r["[object Function]"]=r["[object Map]"]=r["[object Number]"]=r["[object Object]"]=r["[object RegExp]"]=r["[object Set]"]=r["[object String]"]=r["[object WeakMap]"]=!1,ir=function(o){return n(o)&&e(o.length)&&!!r[t(o)]}}(),e=hr(),n=Ur(),r=n&&n.isTypedArray,o=r?e(r):t;return vr=o}function Gr(){if(br)return yr;br=1;var t=vn?pn:(vn=1,pn=function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}),e=Hn(),n=Xn(),r=fr(),o=lr(),i=Wr(),u=Object.prototype.hasOwnProperty;return yr=function(a,c){var s=n(a),f=!s&&e(a),l=!s&&!f&&r(a),d=!s&&!f&&!l&&i(a),h=s||f||l||d,p=h?t(a.length,String):[],v=p.length;for(var g in a)!c&&!u.call(a,g)||h&&("length"==g||l&&("offset"==g||"parent"==g)||d&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||o(g,v))||p.push(g);return p}}function Vr(){if(_r)return mr;_r=1;var t=Object.prototype;return mr=function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||t)}}function Zr(){if(wr)return xr;return wr=1,xr=function(t,e){return function(n){return t(e(n))}}}function qr(){if(Sr)return Cr;Sr=1;var t=Vr(),e=function(){if(Er)return jr;Er=1;var t=Zr()(Object.keys,Object);return jr=t}(),n=Object.prototype.hasOwnProperty;return Cr=function(r){if(!t(r))return e(r);var o=[];for(var i in Object(r))n.call(r,i)&&"constructor"!=i&&o.push(i);return o},Cr}function Yr(){if(kr)return Ar;kr=1;var t=In(),e=dr();return Ar=function(n){return null!=n&&e(n.length)&&!t(n)}}function Kr(){if(Lr)return Or;Lr=1;var t=Gr(),e=qr(),n=Yr();return Or=function(r){return n(r)?t(r):e(r)},Or}function Hr(){if(Tr)return Nr;Tr=1;var t=zn(),e=Vr(),n=(Ir||(Ir=1,zr=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}),zr),r=Object.prototype.hasOwnProperty;return Nr=function(o){if(!t(o))return n(o);var i=e(o),u=[];for(var a in o)("constructor"!=a||!i&&r.call(o,a))&&u.push(a);return u},Nr}function Xr(){if(Pr)return Fr;Pr=1;var t=Gr(),e=Hr(),n=Yr();return Fr=function(r){return n(r)?t(r,!0):e(r)},Fr}Rr.exports;var Jr,Qr,to,eo,no,ro,oo,io,uo,ao,co,so,fo,lo,ho,po,vo,go,yo,bo,mo,_o,xo,wo,jo,Eo,Co,So,Ao,ko,Oo,Lo,Mo,$o,zo,Io,No,To,Fo,Po,Do,Bo,Ro,Uo,Wo,Go,Vo,Zo,qo,Yo,Ko,Ho,Xo,Jo,Qo,ti,ei,ni,ri,oi,ii,ui,ai,ci,si,fi,li,di,hi,pi,vi,gi,yi,bi,mi,_i,xi,wi,ji,Ei,Ci,Si,Ai,ki,Oi,Li,Mi,$i,zi,Ii,Ni,Ti,Fi,Pi,Di,Bi,Ri,Ui,Wi,Gi,Vi,Zi,qi,Yi,Ki,Hi,Xi,Ji,Qi,tu,eu,nu,ru,ou,iu,uu,au,cu,su,fu,lu,du,hu,pu,vu,gu,yu,bu,mu,_u,xu,wu,ju,Eu,Cu,Su,Au,ku,Ou,Lu,Mu,$u,zu,Iu,Nu,Tu,Fu,Pu,Du,Bu,Ru,Uu,Wu,Gu,Vu,Zu,qu,Yu,Ku,Hu,Xu,Ju,Qu,ta,ea,na,ra,oa,ia,ua,aa,ca,sa,fa,la,da,ha,pa,va,ga,ya,ba,ma,_a,xa,wa,ja,Ea,Ca,Sa,Aa,ka,Oa,La,Ma,$a,za,Ia,Na,Ta,Fa,Pa,Da,Ba,Ra,Ua,Wa,Ga,Va,Za,qa,Ya,Ka,Ha,Xa,Ja,Qa,tc,ec,nc,rc,oc,ic,uc,ac,cc,sc,fc,lc,dc,hc,pc,vc,gc,yc,bc,mc,_c,xc,wc,jc={exports:{}};function Ec(){if(no)return eo;return no=1,eo=function(t,e){for(var n=-1,r=null==t?0:t.length,o=0,i=[];++n<r;){var u=t[n];e(u,n,t)&&(i[o++]=u)}return i}}function Cc(){if(oo)return ro;return oo=1,ro=function(){return[]}}function Sc(){if(uo)return io;uo=1;var t=Ec(),e=Cc(),n=Object.prototype.propertyIsEnumerable,r=Object.getOwnPropertySymbols,o=r?function(e){return null==e?[]:(e=Object(e),t(r(e),(function(t){return n.call(e,t)})))}:e;return io=o}function Ac(){if(fo)return so;return fo=1,so=function(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t}}function kc(){if(ho)return lo;ho=1;var t=Zr()(Object.getPrototypeOf,Object);return lo=t}function Oc(){if(vo)return po;vo=1;var t=Ac(),e=kc(),n=Sc(),r=Cc(),o=Object.getOwnPropertySymbols?function(r){for(var o=[];r;)t(o,n(r)),r=e(r);return o}:r;return po=o}function Lc(){if(mo)return bo;mo=1;var t=Ac(),e=Xn();return bo=function(n,r,o){var i=r(n);return e(n)?i:t(i,o(n))},bo}function Mc(){if(xo)return _o;xo=1;var t=Lc(),e=Sc(),n=Kr();return _o=function(r){return t(r,n,e)},_o}function $c(){if(Oo)return ko;Oo=1;var t=Fn()(Ln(),"Set");return ko=t}function zc(){if(zo)return $o;zo=1;var t=function(){if(Co)return Eo;Co=1;var t=Fn()(Ln(),"DataView");return Eo=t}(),e=Pn(),n=function(){if(Ao)return So;Ao=1;var t=Fn()(Ln(),"Promise");return So=t}(),r=$c(),o=function(){if(Mo)return Lo;Mo=1;var t=Fn()(Ln(),"WeakMap");return Lo=t}(),i=$n(),u=Tn(),a="[object Map]",c="[object Promise]",s="[object Set]",f="[object WeakMap]",l="[object DataView]",d=u(t),h=u(e),p=u(n),v=u(r),g=u(o),y=i;return(t&&y(new t(new ArrayBuffer(1)))!=l||e&&y(new e)!=a||n&&y(n.resolve())!=c||r&&y(new r)!=s||o&&y(new o)!=f)&&(y=function(t){var e=i(t),n="[object Object]"==e?t.constructor:void 0,r=n?u(n):"";if(r)switch(r){case d:return l;case h:return a;case p:return c;case v:return s;case g:return f}return e}),$o=y}function Ic(){if(Fo)return To;Fo=1;var t=Ln().Uint8Array;return To=t}function Nc(){if(Do)return Po;Do=1;var t=Ic();return Po=function(e){var n=new e.constructor(e.byteLength);return new t(n).set(new t(e)),n}}function Tc(){if(Ko)return Yo;Ko=1;var t=Nc(),e=function(){if(Ro)return Bo;Ro=1;var t=Nc();return Bo=function(e,n){var r=n?t(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}}(),n=function(){if(Wo)return Uo;Wo=1;var t=/\w*$/;return Uo=function(e){var n=new e.constructor(e.source,t.exec(e));return n.lastIndex=e.lastIndex,n}}(),r=function(){if(Vo)return Go;Vo=1;var t=Mn(),e=t?t.prototype:void 0,n=e?e.valueOf:void 0;return Go=function(t){return n?Object(n.call(t)):{}}}(),o=function(){if(qo)return Zo;qo=1;var t=Nc();return Zo=function(e,n){var r=n?t(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}}();return Yo=function(i,u,a){var c=i.constructor;switch(u){case"[object ArrayBuffer]":return t(i);case"[object Boolean]":case"[object Date]":return new c(+i);case"[object DataView]":return e(i,a);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return o(i,a);case"[object Map]":case"[object Set]":return new c;case"[object Number]":case"[object String]":return new c(i);case"[object RegExp]":return n(i);case"[object Symbol]":return r(i)}},Yo}function Fc(){if(Xo)return Ho;Xo=1;var t=zn(),e=Object.create,n=function(){function n(){}return function(r){if(!t(r))return{};if(e)return e(r);n.prototype=r;var o=new n;return n.prototype=void 0,o}}();return Ho=n}function Pc(){if(ri)return ni;ri=1;var t=function(){if(ei)return ti;ei=1;var t=zc(),e=Kn();return ti=function(n){return e(n)&&"[object Map]"==t(n)}}(),e=hr(),n=Ur(),r=n&&n.isMap,o=r?e(r):t;return ni=o}function Dc(){if(ai)return ui;ai=1;var t=function(){if(ii)return oi;ii=1;var t=zc(),e=Kn();return oi=function(n){return e(n)&&"[object Set]"==t(n)}}(),e=hr(),n=Ur(),r=n&&n.isSet,o=r?e(r):t;return ui=o}function Bc(){if(si)return ci;si=1;var t,e,n,r,o,i,u,a=Wn(),c=Gn(),s=qn(),f=function(){if($r)return Mr;$r=1;var t=Yn(),e=Kr();return Mr=function(n,r){return n&&t(r,e(r),n)},Mr}(),l=function(){if(Br)return Dr;Br=1;var t=Yn(),e=Xr();return Dr=function(n,r){return n&&t(r,e(r),n)},Dr}(),d=(Jr||(Jr=1,t=jc,e=jc.exports,n=Ln(),r=e&&!e.nodeType&&e,o=r&&t&&!t.nodeType&&t,i=o&&o.exports===r?n.Buffer:void 0,u=i?i.allocUnsafe:void 0,t.exports=function(t,e){if(e)return t.slice();var n=t.length,r=u?u(n):new t.constructor(n);return t.copy(r),r}),jc.exports),h=to?Qr:(to=1,Qr=function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}),p=function(){if(co)return ao;co=1;var t=Yn(),e=Sc();return ao=function(n,r){return t(n,e(n),r)},ao}(),v=function(){if(yo)return go;yo=1;var t=Yn(),e=Oc();return go=function(n,r){return t(n,e(n),r)},go}(),g=Mc(),y=function(){if(jo)return wo;jo=1;var t=Lc(),e=Oc(),n=Xr();return wo=function(r){return t(r,n,e)},wo}(),b=zc(),m=function(){if(No)return Io;No=1;var t=Object.prototype.hasOwnProperty;return Io=function(e){var n=e.length,r=new e.constructor(n);return n&&"string"==typeof e[0]&&t.call(e,"index")&&(r.index=e.index,r.input=e.input),r}}(),_=Tc(),x=function(){if(Qo)return Jo;Qo=1;var t=Fc(),e=kc(),n=Vr();return Jo=function(r){return"function"!=typeof r.constructor||n(r)?{}:t(e(r))},Jo}(),w=Xn(),j=fr(),E=Pc(),C=zn(),S=Dc(),A=Kr(),k=Xr(),O="[object Arguments]",L="[object Function]",M="[object Object]",$={};return $[O]=$["[object Array]"]=$["[object ArrayBuffer]"]=$["[object DataView]"]=$["[object Boolean]"]=$["[object Date]"]=$["[object Float32Array]"]=$["[object Float64Array]"]=$["[object Int8Array]"]=$["[object Int16Array]"]=$["[object Int32Array]"]=$["[object Map]"]=$["[object Number]"]=$[M]=$["[object RegExp]"]=$["[object Set]"]=$["[object String]"]=$["[object Symbol]"]=$["[object Uint8Array]"]=$["[object Uint8ClampedArray]"]=$["[object Uint16Array]"]=$["[object Uint32Array]"]=!0,$["[object Error]"]=$[L]=$["[object WeakMap]"]=!1,ci=function t(e,n,r,o,i,u){var z,I=1&n,N=2&n,T=4&n;if(r&&(z=i?r(e,o,i,u):r(e)),void 0!==z)return z;if(!C(e))return e;var F=w(e);if(F){if(z=m(e),!I)return h(e,z)}else{var P=b(e),D=P==L||"[object GeneratorFunction]"==P;if(j(e))return d(e,I);if(P==M||P==O||D&&!i){if(z=N||D?{}:x(e),!I)return N?v(e,l(z,e)):p(e,f(z,e))}else{if(!$[P])return i?e:{};z=_(e,P,I)}}u||(u=new a);var B=u.get(e);if(B)return B;u.set(e,z),S(e)?e.forEach((function(o){z.add(t(o,n,r,o,e,u))})):E(e)&&e.forEach((function(o,i){z.set(i,t(o,n,r,i,e,u))}));var R=F?void 0:(T?N?y:g:N?k:A)(e);return c(R||e,(function(o,i){R&&(o=e[i=o]),s(z,i,t(o,n,r,i,e,u))})),z},ci}function Rc(){if(hi)return di;return hi=1,di=function(t){return function(){return t}}}function Uc(){if(yi)return gi;yi=1;var t=(vi||(vi=1,pi=function(t){return function(e,n,r){for(var o=-1,i=Object(e),u=r(e),a=u.length;a--;){var c=u[t?a:++o];if(!1===n(i[c],c,i))break}return e}}),pi),e=t();return gi=e}function Wc(){if(mi)return bi;mi=1;var t=Uc(),e=Kr();return bi=function(n,r){return n&&t(n,r,e)},bi}function Gc(){if(ji)return wi;ji=1;var t=Wc(),e=function(){if(xi)return _i;xi=1;var t=Yr();return _i=function(e,n){return function(r,o){if(null==r)return r;if(!t(r))return e(r,o);for(var i=r.length,u=n?i:-1,a=Object(r);(n?u--:++u<i)&&!1!==o(a[u],u,a););return r}}}()(t);return wi=e}function Vc(){if(Ci)return Ei;return Ci=1,Ei=function(t){return t}}function Zc(){if(Oi)return ki;Oi=1;var t=Gn(),e=Gc(),n=function(){if(Ai)return Si;Ai=1;var t=Vc();return Si=function(e){return"function"==typeof e?e:t}}(),r=Xn();return ki=function(o,i){return(r(o)?t:e)(o,n(i))}}function qc(){if(Di)return Pi;Di=1;var t=Un(),e=Ni?Ii:(Ni=1,Ii=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}),n=Fi?Ti:(Fi=1,Ti=function(t){return this.__data__.has(t)});function r(e){var n=-1,r=null==e?0:e.length;for(this.__data__=new t;++n<r;)this.add(e[n])}return r.prototype.add=r.prototype.push=e,r.prototype.has=n,Pi=r}function Yc(){if(Wi)return Ui;return Wi=1,Ui=function(t,e){return t.has(e)}}function Kc(){if(Vi)return Gi;Vi=1;var t=qc(),e=Ri?Bi:(Ri=1,Bi=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}),n=Yc();return Gi=function(r,o,i,u,a,c){var s=1&i,f=r.length,l=o.length;if(f!=l&&!(s&&l>f))return!1;var d=c.get(r),h=c.get(o);if(d&&h)return d==o&&h==r;var p=-1,v=!0,g=2&i?new t:void 0;for(c.set(r,o),c.set(o,r);++p<f;){var y=r[p],b=o[p];if(u)var m=s?u(b,y,p,o,r,c):u(y,b,p,r,o,c);if(void 0!==m){if(m)continue;v=!1;break}if(g){if(!e(o,(function(t,e){if(!n(g,e)&&(y===t||a(y,t,i,u,c)))return g.push(e)}))){v=!1;break}}else if(y!==b&&!a(y,b,i,u,c)){v=!1;break}}return c.delete(r),c.delete(o),v}}function Hc(){if(Ki)return Yi;return Ki=1,Yi=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}}function Xc(){if(Xi)return Hi;Xi=1;var t=Mn(),e=Ic(),n=Sn(),r=Kc(),o=qi?Zi:(qi=1,Zi=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}),i=Hc(),u=t?t.prototype:void 0,a=u?u.valueOf:void 0;return Hi=function(t,u,c,s,f,l,d){switch(c){case"[object DataView]":if(t.byteLength!=u.byteLength||t.byteOffset!=u.byteOffset)return!1;t=t.buffer,u=u.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=u.byteLength||!l(new e(t),new e(u)));case"[object Boolean]":case"[object Date]":case"[object Number]":return n(+t,+u);case"[object Error]":return t.name==u.name&&t.message==u.message;case"[object RegExp]":case"[object String]":return t==u+"";case"[object Map]":var h=o;case"[object Set]":var p=1&s;if(h||(h=i),t.size!=u.size&&!p)return!1;var v=d.get(t);if(v)return v==u;s|=2,d.set(t,u);var g=r(h(t),h(u),s,f,l,d);return d.delete(t),g;case"[object Symbol]":if(a)return a.call(t)==a.call(u)}return!1},Hi}function Jc(){if(eu)return tu;eu=1;var t=Wn(),e=Kc(),n=Xc(),r=function(){if(Qi)return Ji;Qi=1;var t=Mc(),e=Object.prototype.hasOwnProperty;return Ji=function(n,r,o,i,u,a){var c=1&o,s=t(n),f=s.length;if(f!=t(r).length&&!c)return!1;for(var l=f;l--;){var d=s[l];if(!(c?d in r:e.call(r,d)))return!1}var h=a.get(n),p=a.get(r);if(h&&p)return h==r&&p==n;var v=!0;a.set(n,r),a.set(r,n);for(var g=c;++l<f;){var y=n[d=s[l]],b=r[d];if(i)var m=c?i(b,y,d,r,n,a):i(y,b,d,n,r,a);if(!(void 0===m?y===b||u(y,b,o,i,a):m)){v=!1;break}g||(g="constructor"==d)}if(v&&!g){var _=n.constructor,x=r.constructor;_==x||!("constructor"in n)||!("constructor"in r)||"function"==typeof _&&_ instanceof _&&"function"==typeof x&&x instanceof x||(v=!1)}return a.delete(n),a.delete(r),v},Ji}(),o=zc(),i=Xn(),u=fr(),a=Wr(),c="[object Arguments]",s="[object Array]",f="[object Object]",l=Object.prototype.hasOwnProperty;return tu=function(d,h,p,v,g,y){var b=i(d),m=i(h),_=b?s:o(d),x=m?s:o(h),w=(_=_==c?f:_)==f,j=(x=x==c?f:x)==f,E=_==x;if(E&&u(d)){if(!u(h))return!1;b=!0,w=!1}if(E&&!w)return y||(y=new t),b||a(d)?e(d,h,p,v,g,y):n(d,h,_,p,v,g,y);if(!(1&p)){var C=w&&l.call(d,"__wrapped__"),S=j&&l.call(h,"__wrapped__");if(C||S){var A=C?d.value():d,k=S?h.value():h;return y||(y=new t),g(A,k,p,v,y)}}return!!E&&(y||(y=new t),r(d,h,p,v,g,y))},tu}function Qc(){if(ru)return nu;ru=1;var t=Jc(),e=Kn();return nu=function n(r,o,i,u,a){return r===o||(null==r||null==o||!e(r)&&!e(o)?r!=r&&o!=o:t(r,o,i,u,n,a))},nu}function ts(){if(au)return uu;au=1;var t=zn();return uu=function(e){return e==e&&!t(e)}}function es(){if(lu)return fu;return lu=1,fu=function(t,e){return function(n){return null!=n&&(n[t]===e&&(void 0!==e||t in Object(n)))}},fu}function ns(){if(hu)return du;hu=1;var t=function(){if(iu)return ou;iu=1;var t=Wn(),e=Qc();return ou=function(n,r,o,i){var u=o.length,a=u,c=!i;if(null==n)return!a;for(n=Object(n);u--;){var s=o[u];if(c&&s[2]?s[1]!==n[s[0]]:!(s[0]in n))return!1}for(;++u<a;){var f=(s=o[u])[0],l=n[f],d=s[1];if(c&&s[2]){if(void 0===l&&!(f in n))return!1}else{var h=new t;if(i)var p=i(l,d,f,n,r,h);if(!(void 0===p?e(d,l,3,i,h):p))return!1}}return!0},ou}(),e=function(){if(su)return cu;su=1;var t=ts(),e=Kr();return cu=function(n){for(var r=e(n),o=r.length;o--;){var i=r[o],u=n[i];r[o]=[i,u,t(u)]}return r},cu}(),n=es();return du=function(r){var o=e(r);return 1==o.length&&o[0][2]?n(o[0][0],o[0][1]):function(e){return e===r||t(e,r,o)}},du}function rs(){if(vu)return pu;vu=1;var t=$n(),e=Kn();return pu=function(n){return"symbol"==typeof n||e(n)&&"[object Symbol]"==t(n)}}function os(){if(yu)return gu;yu=1;var t=Xn(),e=rs(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;return gu=function(o,i){if(t(o))return!1;var u=typeof o;return!("number"!=u&&"symbol"!=u&&"boolean"!=u&&null!=o&&!e(o))||(r.test(o)||!n.test(o)||null!=i&&o in Object(i))},gu}function is(){if(xu)return _u;xu=1;var t=function(){if(mu)return bu;mu=1;var t=Un();function e(n,r){if("function"!=typeof n||null!=r&&"function"!=typeof r)throw new TypeError("Expected a function");var o=function(){var t=arguments,e=r?r.apply(this,t):t[0],i=o.cache;if(i.has(e))return i.get(e);var u=n.apply(this,t);return o.cache=i.set(e,u)||i,u};return o.cache=new(e.Cache||t),o}return e.Cache=t,bu=e}();return _u=function(e){var n=t(e,(function(t){return 500===r.size&&r.clear(),t})),r=n.cache;return n}}function us(){if(Cu)return Eu;return Cu=1,Eu=function(t,e){for(var n=-1,r=null==t?0:t.length,o=Array(r);++n<r;)o[n]=e(t[n],n,t);return o}}function as(){if(Ou)return ku;Ou=1;var t=function(){if(Au)return Su;Au=1;var t=Mn(),e=us(),n=Xn(),r=rs(),o=t?t.prototype:void 0,i=o?o.toString:void 0;return Su=function t(o){if("string"==typeof o)return o;if(n(o))return e(o,t)+"";if(r(o))return i?i.call(o):"";var u=o+"";return"0"==u&&1/o==-1/0?"-0":u},Su}();return ku=function(e){return null==e?"":t(e)}}function cs(){if(Mu)return Lu;Mu=1;var t=Xn(),e=os(),n=function(){if(ju)return wu;ju=1;var t=is(),e=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,r=t((function(t){var r=[];return 46===t.charCodeAt(0)&&r.push(""),t.replace(e,(function(t,e,o,i){r.push(o?i.replace(n,"$1"):e||t)})),r}));return wu=r}(),r=as();return Lu=function(o,i){return t(o)?o:e(o,i)?[o]:n(r(o))},Lu}function ss(){if(zu)return $u;zu=1;var t=rs();return $u=function(e){if("string"==typeof e||t(e))return e;var n=e+"";return"0"==n&&1/e==-1/0?"-0":n}}function fs(){if(Nu)return Iu;Nu=1;var t=cs(),e=ss();return Iu=function(n,r){for(var o=0,i=(r=t(r,n)).length;null!=n&&o<i;)n=n[e(r[o++])];return o&&o==i?n:void 0},Iu}function ls(){if(Ru)return Bu;Ru=1;var t=cs(),e=Hn(),n=Xn(),r=lr(),o=dr(),i=ss();return Bu=function(u,a,c){for(var s=-1,f=(a=t(a,u)).length,l=!1;++s<f;){var d=i(a[s]);if(!(l=null!=u&&c(u,d)))break;u=u[d]}return l||++s!=f?l:!!(f=null==u?0:u.length)&&o(f)&&r(d,f)&&(n(u)||e(u))},Bu}function ds(){if(Wu)return Uu;Wu=1;var t=(Du||(Du=1,Pu=function(t,e){return null!=t&&e in Object(t)}),Pu),e=ls();return Uu=function(n,r){return null!=n&&e(n,r,t)},Uu}function hs(){if(Vu)return Gu;Vu=1;var t=Qc(),e=function(){if(Fu)return Tu;Fu=1;var t=fs();return Tu=function(e,n,r){var o=null==e?void 0:t(e,n);return void 0===o?r:o},Tu}(),n=ds(),r=os(),o=ts(),i=es(),u=ss();return Gu=function(a,c){return r(a)&&o(c)?i(u(a),c):function(r){var o=e(r,a);return void 0===o&&o===c?n(r,a):t(c,o,3)}},Gu}function ps(){if(qu)return Zu;return qu=1,Zu=function(t){return function(e){return null==e?void 0:e[t]}},Zu}function vs(){if(Xu)return Hu;Xu=1;var t=ps(),e=function(){if(Ku)return Yu;Ku=1;var t=fs();return Yu=function(e){return function(n){return t(n,e)}},Yu}(),n=os(),r=ss();return Hu=function(o){return n(o)?t(r(o)):e(o)}}function gs(){if(Qu)return Ju;Qu=1;var t=ns(),e=hs(),n=Vc(),r=Xn(),o=vs();return Ju=function(i){return"function"==typeof i?i:null==i?n:"object"==typeof i?r(i)?e(i[0],i[1]):t(i):o(i)}}function ys(){if(Oa)return ka;Oa=1;var t=function(){if(ja)return wa;ja=1;var t=ps()("length");return wa=t}(),e=function(){if(Ca)return Ea;Ca=1;var t=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");return Ea=function(e){return t.test(e)}}(),n=function(){if(Aa)return Sa;Aa=1;var t="\\ud800-\\udfff",e="["+t+"]",n="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",r="\\ud83c[\\udffb-\\udfff]",o="[^"+t+"]",i="(?:\\ud83c[\\udde6-\\uddff]){2}",u="[\\ud800-\\udbff][\\udc00-\\udfff]",a="(?:"+n+"|"+r+")?",c="[\\ufe0e\\ufe0f]?",s=c+a+"(?:\\u200d(?:"+[o,i,u].join("|")+")"+c+a+")*",f="(?:"+[o+n+"?",n,i,u,e].join("|")+")",l=RegExp(r+"(?="+r+")|"+f+s,"g");return Sa=function(t){for(var e=l.lastIndex=0;l.test(t);)++e;return e}}();return ka=function(r){return e(r)?n(r):t(r)}}function bs(){if(Fa)return Ta;Fa=1;var t=Ac(),e=function(){if(Na)return Ia;Na=1;var t=Mn(),e=Hn(),n=Xn(),r=t?t.isConcatSpreadable:void 0;return Ia=function(t){return n(t)||e(t)||!!(r&&t&&t[r])}}();return Ta=function n(r,o,i,u,a){var c=-1,s=r.length;for(i||(i=e),a||(a=[]);++c<s;){var f=r[c];o>0&&i(f)?o>1?n(f,o-1,i,u,a):t(a,f):u||(a[a.length]=f)}return a},Ta}function ms(){if(Ra)return Ba;Ra=1;var t=Da?Pa:(Da=1,Pa=function(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)}),e=Math.max;return Ba=function(n,r,o){return r=e(void 0===r?n.length-1:r,0),function(){for(var i=arguments,u=-1,a=e(i.length-r,0),c=Array(a);++u<a;)c[u]=i[r+u];u=-1;for(var s=Array(r+1);++u<r;)s[u]=i[u];return s[r]=o(c),t(n,this,s)}},Ba}function _s(){if(qa)return Za;qa=1;var t=function(){if(Wa)return Ua;Wa=1;var t=Rc(),e=Vn(),n=Vc();return Ua=e?function(n,r){return e(n,"toString",{configurable:!0,enumerable:!1,value:t(r),writable:!0})}:n}(),e=function(){if(Va)return Ga;Va=1;var t=Date.now;return Ga=function(e){var n=0,r=0;return function(){var o=t(),i=16-(o-r);if(r=o,i>0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}},Ga}(),n=e(t);return Za=n}function xs(){if(rc)return nc;rc=1;var t=Xa?Ha:(Xa=1,Ha=function(t,e,n,r){for(var o=t.length,i=n+(r?1:-1);r?i--:++i<o;)if(e(t[i],i,t))return i;return-1}),e=Qa?Ja:(Qa=1,Ja=function(t){return t!=t}),n=ec?tc:(ec=1,tc=function(t,e,n){for(var r=n-1,o=t.length;++r<o;)if(t[r]===e)return r;return-1});return nc=function(r,o,i){return o==o?n(r,o,i):t(r,e,i)}}function ws(){if(lc)return fc;lc=1;var t=$c(),e=sc?cc:(sc=1,cc=function(){}),n=Hc(),r=t&&1/n(new t([,-0]))[1]==1/0?function(e){return new t(e)}:e;return fc=r}function js(){if(hc)return dc;hc=1;var t=qc(),e=function(){if(ic)return oc;ic=1;var t=xs();return oc=function(e,n){return!(null==e||!e.length)&&t(e,n,0)>-1}}(),n=ac?uc:(ac=1,uc=function(t,e,n){for(var r=-1,o=null==t?0:t.length;++r<o;)if(n(e,t[r]))return!0;return!1}),r=Yc(),o=ws(),i=Hc();return dc=function(u,a,c){var s=-1,f=e,l=u.length,d=!0,h=[],p=h;if(c)d=!1,f=n;else if(l>=200){var v=a?null:o(u);if(v)return i(v);d=!1,f=r,p=new t}else p=a?[]:h;t:for(;++s<l;){var g=u[s],y=a?a(g):g;if(g=c||0!==g?g:0,d&&y==y){for(var b=p.length;b--;)if(p[b]===y)continue t;a&&p.push(y),h.push(g)}else f(p,y,c)||(p!==h&&p.push(y),h.push(g))}return h}}jc.exports;try{wc={clone:function(){if(li)return fi;li=1;var t=Bc();return fi=function(e){return t(e,4)}}(),constant:Rc(),each:Mi?Li:(Mi=1,Li=Zc()),filter:function(){if(ea)return ta;ea=1;var t=Ec(),e=function(){if(zi)return $i;zi=1;var t=Gc();return $i=function(e,n){var r=[];return t(e,(function(t,e,o){n(t,e,o)&&r.push(t)})),r}}(),n=gs(),r=Xn();return ta=function(o,i){return(r(o)?t:e)(o,n(i,3))}}(),has:function(){if(ia)return oa;ia=1;var t=function(){if(ra)return na;ra=1;var t=Object.prototype.hasOwnProperty;return na=function(e,n){return null!=e&&t.call(e,n)},na}(),e=ls();return oa=function(n,r){return null!=n&&e(n,r,t)},oa}(),isArray:Xn(),isEmpty:function(){if(aa)return ua;aa=1;var t=qr(),e=zc(),n=Hn(),r=Xn(),o=Yr(),i=fr(),u=Vr(),a=Wr(),c=Object.prototype.hasOwnProperty;return ua=function(s){if(null==s)return!0;if(o(s)&&(r(s)||"string"==typeof s||"function"==typeof s.splice||i(s)||a(s)||n(s)))return!s.length;var f=e(s);if("[object Map]"==f||"[object Set]"==f)return!s.size;if(u(s))return!t(s).length;for(var l in s)if(c.call(s,l))return!1;return!0}}(),isFunction:In(),isUndefined:sa?ca:(sa=1,ca=function(t){return void 0===t}),keys:Kr(),map:function(){if(ha)return da;ha=1;var t=us(),e=gs(),n=function(){if(la)return fa;la=1;var t=Gc(),e=Yr();return fa=function(n,r){var o=-1,i=e(n)?Array(n.length):[];return t(n,(function(t,e,n){i[++o]=r(t,e,n)})),i}}(),r=Xn();return da=function(o,i){return(r(o)?t:n)(o,e(i,3))}}(),reduce:function(){if(ma)return ba;ma=1;var t=va?pa:(va=1,pa=function(t,e,n,r){var o=-1,i=null==t?0:t.length;for(r&&i&&(n=t[++o]);++o<i;)n=e(n,t[o],o,t);return n}),e=Gc(),n=gs(),r=ya?ga:(ya=1,ga=function(t,e,n,r,o){return o(t,(function(t,o,i){n=r?(r=!1,t):e(n,t,o,i)})),n}),o=Xn();return ba=function(i,u,a){var c=o(i)?t:r,s=arguments.length<3;return c(i,n(u,4),a,s,e)},ba}(),size:function(){if(Ma)return La;Ma=1;var t=qr(),e=zc(),n=Yr(),r=function(){if(xa)return _a;xa=1;var t=$n(),e=Xn(),n=Kn();return _a=function(r){return"string"==typeof r||!e(r)&&n(r)&&"[object String]"==t(r)}}(),o=ys();return La=function(i){if(null==i)return 0;if(n(i))return r(i)?o(i):i.length;var u=e(i);return"[object Map]"==u||"[object Set]"==u?i.size:t(i).length}}(),transform:function(){if(za)return $a;za=1;var t=Gn(),e=Fc(),n=Wc(),r=gs(),o=kc(),i=Xn(),u=fr(),a=In(),c=zn(),s=Wr();return $a=function(f,l,d){var h=i(f),p=h||u(f)||s(f);if(l=r(l,4),null==d){var v=f&&f.constructor;d=p?h?new v:[]:c(f)&&a(v)?e(o(f)):{}}return(p?t:n)(f,(function(t,e,n){return l(d,t,e,n)})),d},$a}(),union:function(){if(yc)return gc;yc=1;var t=bs(),e=function(){if(Ka)return Ya;Ka=1;var t=Vc(),e=ms(),n=_s();return Ya=function(r,o){return n(e(r,o,t),r+"")}}(),n=js(),r=function(){if(vc)return pc;vc=1;var t=Yr(),e=Kn();return pc=function(n){return e(n)&&t(n)}}(),o=e((function(e){return n(t(e,1,r,!0))}));return gc=o}(),values:function(){if(xc)return _c;xc=1;var t=function(){if(mc)return bc;mc=1;var t=us();return bc=function(e,n){return t(n,(function(t){return e[t]}))},bc}(),e=Kr();return _c=function(n){return null==n?[]:t(n,e(n))},_c}()}}catch(kh){}wc||(wc=window._);var Es=wc,Cs=Es,Ss=Ls,As="\0",ks="\0",Os="";function Ls(t){this._isDirected=!Cs.has(t,"directed")||t.directed,this._isMultigraph=!!Cs.has(t,"multigraph")&&t.multigraph,this._isCompound=!!Cs.has(t,"compound")&&t.compound,this._label=void 0,this._defaultNodeLabelFn=Cs.constant(void 0),this._defaultEdgeLabelFn=Cs.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[ks]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}function Ms(t,e){t[e]?t[e]++:t[e]=1}function $s(t,e){--t[e]||delete t[e]}function zs(t,e,n,r){var o=""+e,i=""+n;if(!t&&o>i){var u=o;o=i,i=u}return o+Os+i+Os+(Cs.isUndefined(r)?As:r)}function Is(t,e){return zs(t,e.v,e.w,e.name)}Ls.prototype._nodeCount=0,Ls.prototype._edgeCount=0,Ls.prototype.isDirected=function(){return this._isDirected},Ls.prototype.isMultigraph=function(){return this._isMultigraph},Ls.prototype.isCompound=function(){return this._isCompound},Ls.prototype.setGraph=function(t){return this._label=t,this},Ls.prototype.graph=function(){return this._label},Ls.prototype.setDefaultNodeLabel=function(t){return Cs.isFunction(t)||(t=Cs.constant(t)),this._defaultNodeLabelFn=t,this},Ls.prototype.nodeCount=function(){return this._nodeCount},Ls.prototype.nodes=function(){return Cs.keys(this._nodes)},Ls.prototype.sources=function(){var t=this;return Cs.filter(this.nodes(),(function(e){return Cs.isEmpty(t._in[e])}))},Ls.prototype.sinks=function(){var t=this;return Cs.filter(this.nodes(),(function(e){return Cs.isEmpty(t._out[e])}))},Ls.prototype.setNodes=function(t,e){var n=arguments,r=this;return Cs.each(t,(function(t){n.length>1?r.setNode(t,e):r.setNode(t)})),this},Ls.prototype.setNode=function(t,e){return Cs.has(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=e),this):(this._nodes[t]=arguments.length>1?e:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=ks,this._children[t]={},this._children[ks][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)},Ls.prototype.node=function(t){return this._nodes[t]},Ls.prototype.hasNode=function(t){return Cs.has(this._nodes,t)},Ls.prototype.removeNode=function(t){var e=this;if(Cs.has(this._nodes,t)){var n=function(t){e.removeEdge(e._edgeObjs[t])};delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],Cs.each(this.children(t),(function(t){e.setParent(t)})),delete this._children[t]),Cs.each(Cs.keys(this._in[t]),n),delete this._in[t],delete this._preds[t],Cs.each(Cs.keys(this._out[t]),n),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this},Ls.prototype.setParent=function(t,e){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(Cs.isUndefined(e))e=ks;else{for(var n=e+="";!Cs.isUndefined(n);n=this.parent(n))if(n===t)throw new Error("Setting "+e+" as parent of "+t+" would create a cycle");this.setNode(e)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=e,this._children[e][t]=!0,this},Ls.prototype._removeFromParentsChildList=function(t){delete this._children[this._parent[t]][t]},Ls.prototype.parent=function(t){if(this._isCompound){var e=this._parent[t];if(e!==ks)return e}},Ls.prototype.children=function(t){if(Cs.isUndefined(t)&&(t=ks),this._isCompound){var e=this._children[t];if(e)return Cs.keys(e)}else{if(t===ks)return this.nodes();if(this.hasNode(t))return[]}},Ls.prototype.predecessors=function(t){var e=this._preds[t];if(e)return Cs.keys(e)},Ls.prototype.successors=function(t){var e=this._sucs[t];if(e)return Cs.keys(e)},Ls.prototype.neighbors=function(t){var e=this.predecessors(t);if(e)return Cs.union(e,this.successors(t))},Ls.prototype.isLeaf=function(t){return 0===(this.isDirected()?this.successors(t):this.neighbors(t)).length},Ls.prototype.filterNodes=function(t){var e=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});e.setGraph(this.graph());var n=this;Cs.each(this._nodes,(function(n,r){t(r)&&e.setNode(r,n)})),Cs.each(this._edgeObjs,(function(t){e.hasNode(t.v)&&e.hasNode(t.w)&&e.setEdge(t,n.edge(t))}));var r={};function o(t){var i=n.parent(t);return void 0===i||e.hasNode(i)?(r[t]=i,i):i in r?r[i]:o(i)}return this._isCompound&&Cs.each(e.nodes(),(function(t){e.setParent(t,o(t))})),e},Ls.prototype.setDefaultEdgeLabel=function(t){return Cs.isFunction(t)||(t=Cs.constant(t)),this._defaultEdgeLabelFn=t,this},Ls.prototype.edgeCount=function(){return this._edgeCount},Ls.prototype.edges=function(){return Cs.values(this._edgeObjs)},Ls.prototype.setPath=function(t,e){var n=this,r=arguments;return Cs.reduce(t,(function(t,o){return r.length>1?n.setEdge(t,o,e):n.setEdge(t,o),o})),this},Ls.prototype.setEdge=function(){var t,e,n,r,o=!1,i=arguments[0];"object"==typeof i&&null!==i&&"v"in i?(t=i.v,e=i.w,n=i.name,2===arguments.length&&(r=arguments[1],o=!0)):(t=i,e=arguments[1],n=arguments[3],arguments.length>2&&(r=arguments[2],o=!0)),t=""+t,e=""+e,Cs.isUndefined(n)||(n=""+n);var u=zs(this._isDirected,t,e,n);if(Cs.has(this._edgeLabels,u))return o&&(this._edgeLabels[u]=r),this;if(!Cs.isUndefined(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(e),this._edgeLabels[u]=o?r:this._defaultEdgeLabelFn(t,e,n);var a=function(t,e,n,r){var o=""+e,i=""+n;if(!t&&o>i){var u=o;o=i,i=u}var a={v:o,w:i};r&&(a.name=r);return a}(this._isDirected,t,e,n);return t=a.v,e=a.w,Object.freeze(a),this._edgeObjs[u]=a,Ms(this._preds[e],t),Ms(this._sucs[t],e),this._in[e][u]=a,this._out[t][u]=a,this._edgeCount++,this},Ls.prototype.edge=function(t,e,n){var r=1===arguments.length?Is(this._isDirected,arguments[0]):zs(this._isDirected,t,e,n);return this._edgeLabels[r]},Ls.prototype.hasEdge=function(t,e,n){var r=1===arguments.length?Is(this._isDirected,arguments[0]):zs(this._isDirected,t,e,n);return Cs.has(this._edgeLabels,r)},Ls.prototype.removeEdge=function(t,e,n){var r=1===arguments.length?Is(this._isDirected,arguments[0]):zs(this._isDirected,t,e,n),o=this._edgeObjs[r];return o&&(t=o.v,e=o.w,delete this._edgeLabels[r],delete this._edgeObjs[r],$s(this._preds[e],t),$s(this._sucs[t],e),delete this._in[e][r],delete this._out[t][r],this._edgeCount--),this},Ls.prototype.inEdges=function(t,e){var n=this._in[t];if(n){var r=Cs.values(n);return e?Cs.filter(r,(function(t){return t.v===e})):r}},Ls.prototype.outEdges=function(t,e){var n=this._out[t];if(n){var r=Cs.values(n);return e?Cs.filter(r,(function(t){return t.w===e})):r}},Ls.prototype.nodeEdges=function(t,e){var n=this.inEdges(t,e);if(n)return n.concat(this.outEdges(t,e))};var Ns={Graph:Ss,version:"2.1.8"},Ts=Es,Fs=Ss,Ps={write:function(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:Ds(t),edges:Bs(t)};Ts.isUndefined(t.graph())||(e.value=Ts.clone(t.graph()));return e},read:function(t){var e=new Fs(t.options).setGraph(t.value);return Ts.each(t.nodes,(function(t){e.setNode(t.v,t.value),t.parent&&e.setParent(t.v,t.parent)})),Ts.each(t.edges,(function(t){e.setEdge({v:t.v,w:t.w,name:t.name},t.value)})),e}};function Ds(t){return Ts.map(t.nodes(),(function(e){var n=t.node(e),r=t.parent(e),o={v:e};return Ts.isUndefined(n)||(o.value=n),Ts.isUndefined(r)||(o.parent=r),o}))}function Bs(t){return Ts.map(t.edges(),(function(e){var n=t.edge(e),r={v:e.v,w:e.w};return Ts.isUndefined(e.name)||(r.name=e.name),Ts.isUndefined(n)||(r.value=n),r}))}var Rs=Es,Us=function(t){var e,n={},r=[];function o(r){Rs.has(n,r)||(n[r]=!0,e.push(r),Rs.each(t.successors(r),o),Rs.each(t.predecessors(r),o))}return Rs.each(t.nodes(),(function(t){e=[],o(t),e.length&&r.push(e)})),r};var Ws=Es,Gs=Vs;function Vs(){this._arr=[],this._keyIndices={}}Vs.prototype.size=function(){return this._arr.length},Vs.prototype.keys=function(){return this._arr.map((function(t){return t.key}))},Vs.prototype.has=function(t){return Ws.has(this._keyIndices,t)},Vs.prototype.priority=function(t){var e=this._keyIndices[t];if(void 0!==e)return this._arr[e].priority},Vs.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},Vs.prototype.add=function(t,e){var n=this._keyIndices;if(t=String(t),!Ws.has(n,t)){var r=this._arr,o=r.length;return n[t]=o,r.push({key:t,priority:e}),this._decrease(o),!0}return!1},Vs.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var t=this._arr.pop();return delete this._keyIndices[t.key],this._heapify(0),t.key},Vs.prototype.decrease=function(t,e){var n=this._keyIndices[t];if(e>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+t+" Old: "+this._arr[n].priority+" New: "+e);this._arr[n].priority=e,this._decrease(n)},Vs.prototype._heapify=function(t){var e=this._arr,n=2*t,r=n+1,o=t;n<e.length&&(o=e[n].priority<e[o].priority?n:o,r<e.length&&(o=e[r].priority<e[o].priority?r:o),o!==t&&(this._swap(t,o),this._heapify(o)))},Vs.prototype._decrease=function(t){for(var e,n=this._arr,r=n[t].priority;0!==t&&!(n[e=t>>1].priority<r);)this._swap(t,e),t=e},Vs.prototype._swap=function(t,e){var n=this._arr,r=this._keyIndices,o=n[t],i=n[e];n[t]=i,n[e]=o,r[i.key]=t,r[o.key]=e};var Zs=Gs,qs=function(t,e,n,r){return function(t,e,n,r){var o,i,u={},a=new Zs,c=function(t){var e=t.v!==o?t.v:t.w,r=u[e],c=n(t),s=i.distance+c;if(c<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+t+" Weight: "+c);s<r.distance&&(r.distance=s,r.predecessor=o,a.decrease(e,s))};t.nodes().forEach((function(t){var n=t===e?0:Number.POSITIVE_INFINITY;u[t]={distance:n},a.add(t,n)}));for(;a.size()>0&&(o=a.removeMin(),(i=u[o]).distance!==Number.POSITIVE_INFINITY);)r(o).forEach(c);return u}(t,String(e),n||Ys,r||function(e){return t.outEdges(e)})},Ys=Es.constant(1);var Ks=qs,Hs=Es,Xs=function(t,e,n){return Hs.transform(t.nodes(),(function(r,o){r[o]=Ks(t,o,e,n)}),{})};var Js=Es,Qs=function(t){var e=0,n=[],r={},o=[];function i(u){var a=r[u]={onStack:!0,lowlink:e,index:e++};if(n.push(u),t.successors(u).forEach((function(t){Js.has(r,t)?r[t].onStack&&(a.lowlink=Math.min(a.lowlink,r[t].index)):(i(t),a.lowlink=Math.min(a.lowlink,r[t].lowlink))})),a.lowlink===a.index){var c,s=[];do{c=n.pop(),r[c].onStack=!1,s.push(c)}while(u!==c);o.push(s)}}return t.nodes().forEach((function(t){Js.has(r,t)||i(t)})),o};var tf=Es,ef=Qs,nf=function(t){return tf.filter(ef(t),(function(e){return e.length>1||1===e.length&&t.hasEdge(e[0],e[0])}))};var rf=function(t,e,n){return function(t,e,n){var r={},o=t.nodes();return o.forEach((function(t){r[t]={},r[t][t]={distance:0},o.forEach((function(e){t!==e&&(r[t][e]={distance:Number.POSITIVE_INFINITY})})),n(t).forEach((function(n){var o=n.v===t?n.w:n.v,i=e(n);r[t][o]={distance:i,predecessor:t}}))})),o.forEach((function(t){var e=r[t];o.forEach((function(n){var i=r[n];o.forEach((function(n){var r=i[t],o=e[n],u=i[n],a=r.distance+o.distance;a<u.distance&&(u.distance=a,u.predecessor=o.predecessor)}))}))})),r}(t,e||of,n||function(e){return t.outEdges(e)})},of=Es.constant(1);var uf=Es,af=cf;function cf(t){var e={},n={},r=[];if(uf.each(t.sinks(),(function o(i){if(uf.has(n,i))throw new sf;uf.has(e,i)||(n[i]=!0,e[i]=!0,uf.each(t.predecessors(i),o),delete n[i],r.push(i))})),uf.size(e)!==t.nodeCount())throw new sf;return r}function sf(){}cf.CycleException=sf,sf.prototype=new Error;var ff=af;var lf=Es,df=function(t,e,n){lf.isArray(e)||(e=[e]);var r=(t.isDirected()?t.successors:t.neighbors).bind(t),o=[],i={};return lf.each(e,(function(e){if(!t.hasNode(e))throw new Error("Graph does not have node: "+e);hf(t,e,"post"===n,i,r,o)})),o};function hf(t,e,n,r,o,i){lf.has(r,e)||(r[e]=!0,n||i.push(e),lf.each(o(e),(function(e){hf(t,e,n,r,o,i)})),n&&i.push(e))}var pf=df;var vf=df;var gf=Es,yf=Ss,bf=Gs;var mf={Graph:Ns.Graph,json:Ps,alg:{components:Us,dijkstra:qs,dijkstraAll:Xs,findCycles:nf,floydWarshall:rf,isAcyclic:function(t){try{ff(t)}catch(kh){if(kh instanceof ff.CycleException)return!1;throw kh}return!0},postorder:function(t,e){return pf(t,e,"post")},preorder:function(t,e){return vf(t,e,"pre")},prim:function(t,e){var n,r=new yf,o={},i=new bf;function u(t){var r=t.v===n?t.w:t.v,u=i.priority(r);if(void 0!==u){var a=e(t);a<u&&(o[r]=n,i.decrease(r,a))}}if(0===t.nodeCount())return r;gf.each(t.nodes(),(function(t){i.add(t,Number.POSITIVE_INFINITY),r.setNode(t)})),i.decrease(t.nodes()[0],0);var a=!1;for(;i.size()>0;){if(n=i.removeMin(),gf.has(o,n))r.setEdge(n,o[n]);else{if(a)throw new Error("Input graph is not connected: "+t);a=!0}t.nodeEdges(n).forEach(u)}return r},tarjan:Qs,topsort:af},version:Ns.version};function _f(t,e){let n=!0;for(;n;){n=!1;for(let r=0;r<e.length;++r)for(let o=0;o<e[r].length-1;++o){const i=xf(t,e,r);wf(e[r],o,o+1);xf(t,e,r)<i?n=!0:wf(e[r],o,o+1)}}}function xf(t,e,n){let r=0;return n>0&&(r+=wt(t,e[n-1],e[n])),n+1<e.length&&(r+=wt(t,e[n],e[n+1])),r}function wf(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function jf(t){const e=Math.floor(t.length/2);if(0===t.length)return-1;if(t.length%2==1)return t[e];if(2===t.length)return(t[0]+t[1])/2;const n=t[e-1]-t[0],r=t[t.length-1]-t[e];return(t[e-1]*r+t[e]*n)/(n+r)}function Ef(t,e,n=1,r=!1){if(n>0)for(let o=1;o<e.length;++o){const n=new Map;e[o].forEach((i=>{const u=jf(Cf(t,e,o,o-1,i,r));n.set(i,u)})),Sf(e[o],n)}else for(let o=e.length-2;o>=0;--o){const n=new Map;e[o].forEach((i=>{const u=jf(Cf(t,e,o,o+1,i,r));n.set(i,u)})),Sf(e[o],n)}}function Cf(t,e,n,r,o,i=!1){const u=e[n],a=e[r],c=[];return a.forEach(((e,n)=>{t.nodeEdges(e,o).length>0&&c.push(n)})),0===c.length&&i&&u.forEach(((e,n)=>{t.nodeEdges(e,o).length>0&&c.push(n+.5)})),c.sort(((t,e)=>t-e)),c}function Sf(t,e){const n=new Map(t.map(((t,e)=>[t,e])));for(let r=1;r<t.length;++r)for(let o=r;o>0;--o){let r=o-1,i=e.get(t[r]),u=e.get(t[o]);for(;-1===(i=e.get(t[r]))&&r>0;)r--;if(-1===u||-1===i)break;if(i===u&&(i=n.get(t[r]),u=n.get(t[o])),u>=i)break;[t[o],t[r]]=[t[r],t[o]]}}function Af(t,e=25){const n=function(t){const e=[];let n=t.nodes().filter((e=>0===t.node(e).rank)).concat(t.sources());return 0===n.length&&(n=t.nodes().slice(0,1)),mf.alg.preorder(t,n).forEach((n=>{const r=t.node(n).rank;for(;r>=e.length;)e.push([]);e[r].push(n)})),e}(t);let r=n,o=0;for(;o++<e;)Ef(t,n,o%2==0?1:0),_f(t,n),kf(t,n)<kf(t,r)&&(r=Of(n));return r=r.map((t=>[t])),r}function kf(t,e){let n=0;for(let r=0;r<e.length-1;++r)n+=wt(t,e[r],e[r+1]);return n}function Of(t){const e=[];for(const n of t){const t=[];e.push(t);for(const e of n)t.push(e)}return e}function Lf(t,e){return t===e||t!=t&&e!=e}function Mf(t,e){for(var n=t.length;n--;)if(Lf(t[n][0],e))return n;return-1}var $f=Array.prototype.splice;function zf(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 If(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}zf.prototype.clear=function(){this.__data__=[],this.size=0},zf.prototype.delete=function(t){var e=this.__data__,n=Mf(e,t);return!(n<0)&&(n==e.length-1?e.pop():$f.call(e,n,1),--this.size,!0)},zf.prototype.get=function(t){var e=this.__data__,n=Mf(e,t);return n<0?void 0:e[n][1]},zf.prototype.has=function(t){return Mf(this.__data__,t)>-1},zf.prototype.set=function(t,e){var n=this.__data__,r=Mf(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};var Nf="[object AsyncFunction]",Tf="[object Function]",Ff="[object GeneratorFunction]",Pf="[object Proxy]";function Df(t){if(!If(t))return!1;var e=k(t);return e==Tf||e==Ff||e==Nf||e==Pf}var Bf,Rf=y["__core-js_shared__"],Uf=(Bf=/[^.]+$/.exec(Rf&&Rf.keys&&Rf.keys.IE_PROTO||""))?"Symbol(src)_1."+Bf:"";var Wf=Function.prototype.toString;function Gf(t){if(null!=t){try{return Wf.call(t)}catch(kh){}try{return t+""}catch(kh){}}return""}var Vf=/^\[object .+?Constructor\]$/,Zf=Function.prototype,qf=Object.prototype,Yf=Zf.toString,Kf=qf.hasOwnProperty,Hf=RegExp("^"+Yf.call(Kf).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Xf(t){return!(!If(t)||(e=t,Uf&&Uf in e))&&(Df(t)?Hf:Vf).test(Gf(t));var e}function Jf(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return Xf(n)?n:void 0}var Qf=Jf(y,"Map"),tl=Jf(Object,"create");var el=Object.prototype.hasOwnProperty;var nl=Object.prototype.hasOwnProperty;function rl(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 ol(t,e){var n,r,o=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof e?"string":"hash"]:o.map}function il(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])}}rl.prototype.clear=function(){this.__data__=tl?tl(null):{},this.size=0},rl.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},rl.prototype.get=function(t){var e=this.__data__;if(tl){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return el.call(e,t)?e[t]:void 0},rl.prototype.has=function(t){var e=this.__data__;return tl?void 0!==e[t]:nl.call(e,t)},rl.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=tl&&void 0===e?"__lodash_hash_undefined__":e,this},il.prototype.clear=function(){this.size=0,this.__data__={hash:new rl,map:new(Qf||zf),string:new rl}},il.prototype.delete=function(t){var e=ol(this,t).delete(t);return this.size-=e?1:0,e},il.prototype.get=function(t){return ol(this,t).get(t)},il.prototype.has=function(t){return ol(this,t).has(t)},il.prototype.set=function(t,e){var n=ol(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};function ul(t){var e=this.__data__=new zf(t);this.size=e.size}ul.prototype.clear=function(){this.__data__=new zf,this.size=0},ul.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},ul.prototype.get=function(t){return this.__data__.get(t)},ul.prototype.has=function(t){return this.__data__.has(t)},ul.prototype.set=function(t,e){var n=this.__data__;if(n instanceof zf){var r=n.__data__;if(!Qf||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new il(r)}return n.set(t,e),this.size=n.size,this};function al(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new il;++e<n;)this.add(t[e])}function cl(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}al.prototype.add=al.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},al.prototype.has=function(t){return this.__data__.has(t)};var sl=1,fl=2;function ll(t,e,n,r,o,i){var u=n&sl,a=t.length,c=e.length;if(a!=c&&!(u&&c>a))return!1;var s=i.get(t),f=i.get(e);if(s&&f)return s==e&&f==t;var l=-1,d=!0,h=n&fl?new al:void 0;for(i.set(t,e),i.set(e,t);++l<a;){var p=t[l],v=e[l];if(r)var g=u?r(v,p,l,e,t,i):r(p,v,l,t,e,i);if(void 0!==g){if(g)continue;d=!1;break}if(h){if(!cl(e,(function(t,e){if(u=e,!h.has(u)&&(p===t||o(p,t,n,r,i)))return h.push(e);var u}))){d=!1;break}}else if(p!==v&&!o(p,v,n,r,i)){d=!1;break}}return i.delete(t),i.delete(e),d}var dl=y.Uint8Array;function hl(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function pl(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}var vl=1,gl=2,yl="[object Boolean]",bl="[object Date]",ml="[object Error]",_l="[object Map]",xl="[object Number]",wl="[object RegExp]",jl="[object Set]",El="[object String]",Cl="[object Symbol]",Sl="[object ArrayBuffer]",Al="[object DataView]",kl=b?b.prototype:void 0,Ol=kl?kl.valueOf:void 0;var Ll=Object.prototype.propertyIsEnumerable,Ml=Object.getOwnPropertySymbols,$l=Ml?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var n=-1,r=null==t?0:t.length,o=0,i=[];++n<r;){var u=t[n];e(u,n,t)&&(i[o++]=u)}return i}(Ml(t),(function(e){return Ll.call(t,e)})))}:function(){return[]};function zl(t){return O(t)&&"[object Arguments]"==k(t)}var Il=Object.prototype,Nl=Il.hasOwnProperty,Tl=Il.propertyIsEnumerable,Fl=zl(function(){return arguments}())?zl:function(t){return O(t)&&Nl.call(t,"callee")&&!Tl.call(t,"callee")};var Pl="object"==typeof t&&t&&!t.nodeType&&t,Dl=Pl&&"object"==typeof module&&module&&!module.nodeType&&module,Bl=Dl&&Dl.exports===Pl?y.Buffer:void 0,Rl=(Bl?Bl.isBuffer:void 0)||function(){return!1},Ul=9007199254740991,Wl=/^(?:0|[1-9]\d*)$/;function Gl(t,e){var n=typeof t;return!!(e=null==e?Ul:e)&&("number"==n||"symbol"!=n&&Wl.test(t))&&t>-1&&t%1==0&&t<e}var Vl=9007199254740991;function Zl(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=Vl}var ql={};ql["[object Float32Array]"]=ql["[object Float64Array]"]=ql["[object Int8Array]"]=ql["[object Int16Array]"]=ql["[object Int32Array]"]=ql["[object Uint8Array]"]=ql["[object Uint8ClampedArray]"]=ql["[object Uint16Array]"]=ql["[object Uint32Array]"]=!0,ql["[object Arguments]"]=ql["[object Array]"]=ql["[object ArrayBuffer]"]=ql["[object Boolean]"]=ql["[object DataView]"]=ql["[object Date]"]=ql["[object Error]"]=ql["[object Function]"]=ql["[object Map]"]=ql["[object Number]"]=ql["[object Object]"]=ql["[object RegExp]"]=ql["[object Set]"]=ql["[object String]"]=ql["[object WeakMap]"]=!1;var Yl,Kl="object"==typeof t&&t&&!t.nodeType&&t,Hl=Kl&&"object"==typeof module&&module&&!module.nodeType&&module,Xl=Hl&&Hl.exports===Kl&&v.process,Jl=function(){try{var t=Hl&&Hl.require&&Hl.require("util").types;return t||Xl&&Xl.binding&&Xl.binding("util")}catch(kh){}}(),Ql=Jl&&Jl.isTypedArray,td=Ql?(Yl=Ql,function(t){return Yl(t)}):function(t){return O(t)&&Zl(t.length)&&!!ql[k(t)]},ed=Object.prototype.hasOwnProperty;function nd(t,e){var n=m(t),r=!n&&Fl(t),o=!n&&!r&&Rl(t),i=!n&&!r&&!o&&td(t),u=n||r||o||i,a=u?function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}(t.length,String):[],c=a.length;for(var s in t)!ed.call(t,s)||u&&("length"==s||o&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||Gl(s,c))||a.push(s);return a}var rd=Object.prototype;var od=function(t,e){return function(n){return t(e(n))}}(Object.keys,Object),id=Object.prototype.hasOwnProperty;function ud(t){if(n=(e=t)&&e.constructor,e!==("function"==typeof n&&n.prototype||rd))return od(t);var e,n,r=[];for(var o in Object(t))id.call(t,o)&&"constructor"!=o&&r.push(o);return r}function ad(t){return null!=(e=t)&&Zl(e.length)&&!Df(e)?nd(t):ud(t);var e}function cd(t){return function(t,e,n){var r=e(t);return m(t)?r:function(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t}(r,n(t))}(t,ad,$l)}var sd=1,fd=Object.prototype.hasOwnProperty;var ld=Jf(y,"DataView"),dd=Jf(y,"Promise"),hd=Jf(y,"Set"),pd=Jf(y,"WeakMap"),vd="[object Map]",gd="[object Promise]",yd="[object Set]",bd="[object WeakMap]",md="[object DataView]",_d=Gf(ld),xd=Gf(Qf),wd=Gf(dd),jd=Gf(hd),Ed=Gf(pd),Cd=k;(ld&&Cd(new ld(new ArrayBuffer(1)))!=md||Qf&&Cd(new Qf)!=vd||dd&&Cd(dd.resolve())!=gd||hd&&Cd(new hd)!=yd||pd&&Cd(new pd)!=bd)&&(Cd=function(t){var e=k(t),n="[object Object]"==e?t.constructor:void 0,r=n?Gf(n):"";if(r)switch(r){case _d:return md;case xd:return vd;case wd:return gd;case jd:return yd;case Ed:return bd}return e});var Sd=1,Ad="[object Arguments]",kd="[object Array]",Od="[object Object]",Ld=Object.prototype.hasOwnProperty;function Md(t,e,n,r,o,i){var u=m(t),a=m(e),c=u?kd:Cd(t),s=a?kd:Cd(e),f=(c=c==Ad?Od:c)==Od,l=(s=s==Ad?Od:s)==Od,d=c==s;if(d&&Rl(t)){if(!Rl(e))return!1;u=!0,f=!1}if(d&&!f)return i||(i=new ul),u||td(t)?ll(t,e,n,r,o,i):function(t,e,n,r,o,i,u){switch(n){case Al:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case Sl:return!(t.byteLength!=e.byteLength||!i(new dl(t),new dl(e)));case yl:case bl:case xl:return Lf(+t,+e);case ml:return t.name==e.name&&t.message==e.message;case wl:case El:return t==e+"";case _l:var a=hl;case jl:var c=r&vl;if(a||(a=pl),t.size!=e.size&&!c)return!1;var s=u.get(t);if(s)return s==e;r|=gl,u.set(t,e);var f=ll(a(t),a(e),r,o,i,u);return u.delete(t),f;case Cl:if(Ol)return Ol.call(t)==Ol.call(e)}return!1}(t,e,c,n,r,o,i);if(!(n&Sd)){var h=f&&Ld.call(t,"__wrapped__"),p=l&&Ld.call(e,"__wrapped__");if(h||p){var v=h?t.value():t,g=p?e.value():e;return i||(i=new ul),o(v,g,n,r,i)}}return!!d&&(i||(i=new ul),function(t,e,n,r,o,i){var u=n&sd,a=cd(t),c=a.length;if(c!=cd(e).length&&!u)return!1;for(var s=c;s--;){var f=a[s];if(!(u?f in e:fd.call(e,f)))return!1}var l=i.get(t),d=i.get(e);if(l&&d)return l==e&&d==t;var h=!0;i.set(t,e),i.set(e,t);for(var p=u;++s<c;){var v=t[f=a[s]],g=e[f];if(r)var y=u?r(g,v,f,e,t,i):r(v,g,f,t,e,i);if(!(void 0===y?v===g||o(v,g,n,r,i):y)){h=!1;break}p||(p="constructor"==f)}if(h&&!p){var b=t.constructor,m=e.constructor;b==m||!("constructor"in t)||!("constructor"in e)||"function"==typeof b&&b instanceof b&&"function"==typeof m&&m instanceof m||(h=!1)}return i.delete(t),i.delete(e),h}(t,e,n,r,o,i))}function $d(t,e,n,r,o){return t===e||(null==t||null==e||!O(t)&&!O(e)?t!=t&&e!=e:Md(t,e,n,r,$d,o))}var zd=1,Id=2;function Nd(t){return t==t&&!If(t)}function Td(t,e){return function(n){return null!=n&&(n[t]===e&&(void 0!==e||t in Object(n)))}}function Fd(t){var e=function(t){for(var e=ad(t),n=e.length;n--;){var r=e[n],o=t[r];e[n]=[r,o,Nd(o)]}return e}(t);return 1==e.length&&e[0][2]?Td(e[0][0],e[0][1]):function(n){return n===t||function(t,e,n,r){var o=n.length,i=o;if(null==t)return!i;for(t=Object(t);o--;){var u=n[o];if(u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++o<i;){var a=(u=n[o])[0],c=t[a],s=u[1];if(u[2]){if(void 0===c&&!(a in t))return!1}else{var f=new ul;if(!$d(s,c,zd|Id,r,f))return!1}}return!0}(n,0,e)}}var Pd=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Dd=/^\w*$/;function Bd(t,e){if(m(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!M(t))||(Dd.test(t)||!Pd.test(t)||null!=e&&t in Object(e))}var Rd="Expected a function";function Ud(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError(Rd);var n=function(){var r=arguments,o=e?e.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var u=t.apply(this,r);return n.cache=i.set(o,u)||i,u};return n.cache=new(Ud.Cache||il),n}Ud.Cache=il;var Wd=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Gd=/\\(\\)?/g,Vd=function(t){var e=Ud(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Wd,(function(t,n,r,o){e.push(r?o.replace(Gd,"$1"):n||t)})),e}));function Zd(t,e){return m(t)?t:Bd(t,e)?[t]:Vd(T(t))}var qd=1/0;function Yd(t){if("string"==typeof t||M(t))return t;var e=t+"";return"0"==e&&1/t==-qd?"-0":e}function Kd(t,e){for(var n=0,r=(e=Zd(e,t)).length;null!=t&&n<r;)t=t[Yd(e[n++])];return n&&n==r?t:void 0}function Hd(t,e){return null!=t&&e in Object(t)}function Xd(t,e){return null!=t&&function(t,e,n){for(var r=-1,o=(e=Zd(e,t)).length,i=!1;++r<o;){var u=Yd(e[r]);if(!(i=null!=t&&n(t,u)))break;t=t[u]}return i||++r!=o?i:!!(o=null==t?0:t.length)&&Zl(o)&&Gl(u,o)&&(m(t)||Fl(t))}(t,e,Hd)}var Jd=1,Qd=2;function th(t,e){return Bd(t)&&Nd(e)?Td(Yd(t),e):function(n){var r=function(t,e,n){var r=null==t?void 0:Kd(t,e);return void 0===r?n:r}(n,t);return void 0===r&&r===e?Xd(n,t):$d(e,r,Jd|Qd)}}function eh(t){return t}function nh(t){return Bd(t)?(e=Yd(t),function(t){return null==t?void 0:t[e]}):function(t){return function(e){return Kd(e,t)}}(t);var e}function rh(t,e){return t&&t.length?function(t,e){for(var n,r=-1,o=t.length;++r<o;){var i=e(t[r]);void 0!==i&&(n=void 0===n?i:n+i)}return n}(t,"function"==typeof(n=e)?n:null==n?eh:"object"==typeof n?m(n)?th(n[0],n[1]):Fd(n):nh(n)):0;var n}function oh(){let t=[100,100],e=null,n=.18,r=function(t,e,n){return 1};const o=function(t){return t.data.value},i=function(t){return t.data?t.data.direction:"r"};function u(a,c,s=0){null===e&&u.scaleToFit(a,c,s),ih(a,o,i),function(t,e,n,r=0){t.nodes().forEach((e=>{const o=t.node(e),i=t.inEdges(e)||[],u=t.outEdges(e)||[],a=Math.max(0,i.length-1),c=Math.max(0,u.length-1),s=Math.max(a,c);o.dy=o.value*n+s*r})),t.edges().forEach((r=>{const o=t.edge(r);o.value=e(o),o.dy=o.value*n}))}(a,o,e,s);const f=uh(a,c,s,e);c.forEach((e=>{let o=0;e.forEach(((e,i)=>{const u=f[i]/rh(f)*t[1],c=0===o?0:n*u/5,s=u-2*c,l=rh(e,(t=>a.node(t).dy)),d=e.map(((t,n)=>a.node(t).value&&e[n+1]?r(e[n],e[n+1],a):0)),h=Math.max(0,s-l),p=rh(d)?h/rh(d):0;let v=o+c;1===e.length&&(v+=(s-a.node(e[0]).dy)/2);let g=Number.MAX_VALUE;e.forEach(((t,e)=>{const n=a.node(t);n.y=v,n.spaceAbove=g,n.spaceBelow=d[e]*p,v+=n.dy+n.spaceBelow,g=n.spaceBelow,n.data&&void 0!==n.data.forceY&&(n.y=c+n.data.forceY*(s-n.dy))})),e.length>0&&(a.node(e[e.length-1]).spaceBelow=Number.MAX_VALUE),o+=u}))}));const l=function(t,e){const n=[];return e.forEach(((r,o)=>{if(o===e.length-1)return;let i=0;r.forEach((e=>{e.forEach((e=>{t.outEdges(e).forEach((e=>{const n=t.edge(e).dy,r=t.node(e.w).y-t.node(e.v).y,o=Math.abs(r)-n,u=n*n-o*o,a=u>=0?Math.sqrt(u):n;a>i&&(i=a)}))}))})),n.push(i)})),n}(a,c);!function(t,e,n,r){const o=rh(r);let i;if(o>n)i=r.map((t=>n*t/o));else{const t=n-o;i=r.map((n=>n+t/(e.length-1)))}let u=0;e.forEach(((e,n)=>{e.forEach((e=>{e.forEach((e=>{t.node(e).x=u}))})),u+=i[n]}))}(a,c,t[0],l);const d=[];return a.nodes().forEach((t=>{const e=a.node(t);e.id=t,d.push(e)})),d}return u.scaleToFit=function(r,u,a=0){ih(r,o,i);let c=0;a>0&&r.nodes().forEach((t=>{c=Math.max(c,function(t,e,n){if(n<=0)return 0;const r=t.inEdges(e)||[],o=t.outEdges(e)||[],i=Math.max(0,r.length-1),u=Math.max(0,o.length-1);return Math.max(i,u)*n}(r,t,a))}));const s=rh(uh(r,u,0,1));if(s<=0)return void(e=1);const f=t[1]-c;e=f/s,1!==n&&(e*=1-n)},u.size=function(e){return arguments.length?(t=e,u):t},u.separation=function(t){return arguments.length?(r=Df(t)?t:()=>t,u):r},u.whitespace=function(t){return arguments.length?(n=t,u):n},u.scale=function(t){return arguments.length?(e=t,u):e},u}function ih(t,e,n){t.nodes().forEach((r=>{const o=rh(t.inEdges(r),(n=>e(t.edge(n)))),i=rh(t.outEdges(r),(n=>e(t.edge(n))));let u=t.node(r);u||t.setNode(r,u={}),u.value=Math.max(o,i),void 0===u.direction&&(u.direction=n(u)||"r")}))}function uh(t,e,n=0,r=1){if(0===e.length||0===e[0].length)return[];const o=e[0].length,i=new Array(o);for(let u=0;u<o;u++)i[u]=0;return e.forEach((e=>{e.forEach(((e,o)=>{const u=rh(e,(e=>{const o=t.node(e),i=t.inEdges(e)||[],u=t.outEdges(e)||[],a=Math.max(0,i.length-1),c=Math.max(0,u.length-1),s=Math.max(a,c);return o.value+s*n/r}));i[o]=Math.max(i[o],u)}))})),i}function ah(t,e){return t<e}function ch(t){return t&&t.length?function(t,e,n){for(var r=-1,o=t.length;++r<o;){var i=t[r],u=e(i);if(null!=u&&(void 0===a?u==u&&!M(u):n(u,a)))var a=u,c=i}return c}(t,eh,ah):void 0}var sh=function(){for(var t=0;t<arguments.length;t++)if(void 0!==arguments[t])return arguments[t]};const fh=Cn(sh);function lh(t,e){const n=function(t,e){const n=new Set,r=new mf.Graph({directed:!0}),o=[];if(!t.hasNode(e))throw Error("node not in graph");return dh(t,e,n,r,o),t.nodes().forEach((e=>{n.has(e)||dh(t,e,n,r,o)})),o.forEach(((t,e)=>{r.node(t).thread=e+1<o.length?o[e+1]:o[0]})),r}(t,e);return t.edges().forEach((e=>{const r=function(t,e,n){const r=t.node(e),o=t.node(n);if(r.depth<o.depth){let e=r.thread;for(;t.node(e).depth>r.depth;){if(e===n)return 1;e=t.node(e).thread}}else if(o.depth<r.depth){let n=o.thread;for(;t.node(n).depth>o.depth;){if(n===e)return-1;n=t.node(n).thread}}return 0}(n,e.v,e.w);if(r<0){const n=t.edge(e)||{};n.reversed=!0,t.removeEdge(e),t.setEdge(e.w,e.v,n)}})),t}function dh(t,e,n,r,o,i=0){if(!n.has(e)){n.add(e),o.push(e),r.setNode(e,{depth:i});t.outEdges(e).map((t=>t.w)).forEach((u=>{n.has(u)||r.setEdge(e,u,{delta:1}),dh(t,u,n,r,o,i+1)}))}}function hh(t,e){if(0===t.nodes().length)return;const n=function(t,e){const n=new mf.Graph({directed:!0});let r=!1;for(const u of e)if("min"===u.type){r=!0;break}if(!r){const n=t.sources();e=n.length>0?[{nodes:[n[0]],type:"min"},...e]:[{nodes:[t.nodes()[0]],type:"min"},...e]}const o=new Map;let i=0;return e.forEach((t=>{if(!t.nodes||0===t.nodes.length)return;const e=""+i++;t.nodes.forEach((t=>{o.set(t,e)})),n.setNode(e,{nodes:t.nodes,type:t.type})})),t.nodes().forEach((t=>{if(!o.has(t)){const e=""+i++,r={nodes:[t],type:"same"};o.set(t,e),n.setNode(e,r)}})),t.edges().forEach((e=>{const r=o.has(e.v)?o.get(e.v):e.v,i=o.has(e.w)?o.get(e.w):e.w,u=t.node(e.v)||{},a=t.node(e.w)||{},c=n.edge(r,i)||{delta:0};r===i?(c.delta=0,n.setEdge(r,i,c)):"l"===u.direction?(c.delta=Math.max(c.delta,"l"===a.direction?1:0),n.setEdge(i,r,c)):(c.delta=Math.max(c.delta,"l"===a.direction?0:1),n.setEdge(r,i,c))})),n}(t,e);!function(t){t.sources().forEach((e=>{"0"!==e&&t.setEdge("0",e,{delta:0,temp:!0})}))}(n),lh(n,"0"),function(t){var e;const n=t.sources(),r=new Set,o=new Set;for(t.edges().forEach((t=>{t.v===t.w&&o.add(t)}));n.length>0;){const i=n.shift();r.add(i);let u=t.node(i);u||t.setNode(i,u={}),u.rank=0;for(const n of t.inEdges(i)){const r=fh(null==(e=t.edge(n)||{})?void 0:e.delta,1);u.rank=Math.max(u.rank,t.node(n.v).rank+r)}for(const e of t.outEdges(i))o.add(e);for(const e of t.nodes())n.indexOf(e)<0&&!r.has(e)&&!t.inEdges(e).some((t=>!o.has(t)))&&n.push(e)}}(n),function(t){function e(e){const n=t.node(e),r=ch(t.outEdges(e).map((e=>t.node(e.w).rank-t.edge(e).delta)));void 0!==r&&(n.rank=r)}t.edges().forEach((n=>{t.edge(n).temp&&e(n.w)}))}(n),t.nodes().forEach((e=>{t.node(e)||t.setNode(e,{})})),n.nodes().forEach((e=>{const r=n.node(e);r.nodes.forEach((e=>{t.node(e).rank=r.rank}))}))}function ph(t){const e=oh(),n=bt(t);let r=[],o=[],i=null;function u(u=[],a=[],c={}){const s=function(t=[],e=[]){const n=new mf.Graph({directed:!0,multigraph:!0});return e.forEach((t=>{n.setEdge(t.source,t.target,{data:t,points:[]},t.type)})),n.nodes().forEach((t=>n.setNode(t,{data:{}}))),t.forEach((t=>{n.hasNode(t.id)&&(n.node(t.id).data=t,void 0!==t.direction&&(n.node(t.id).direction=t.direction))})),n.edges().forEach((t=>{n.edge(t).source=n.node(t.v),n.edge(t).target=n.node(t.w)})),n}(a,u);var f;return c.order?(hh(s,c.rankSets||[]),i=c.order,i.length>0&&i[0].length>0&&!m(i[0][0])&&(i=i.map((t=>[t]))),i=i.map((t=>t.map((t=>t.filter((t=>void 0!==s.node(t)))))))):(hh(s,c.rankSets||[]),(f=s).edges().forEach((t=>{const e=f.node(t.v),n=f.node(t.w),r=f.edge(t);let o=e.rank;const i=[];if(o+1<=n.rank){for("l"===e.direction&&i.push(o);++o<n.rank;)i.push(o);"l"===n.direction&&i.push(o),xt(f,t,r,i,"r")}else if(o>n.rank){for("l"!==e.direction&&i.push(o);o-- >n.rank+1;)i.push(o);"l"!==n.direction&&i.push(o),xt(f,t,r,i,"l")}})),i=Af(s)),r=e(s,i,t.edgeGap||0),function(t,{alignLinkTypes:e=!1}={}){t.nodes().forEach((e=>{const n=t.node(e);n.incoming=t.inEdges(e),n.outgoing=t.outEdges(e)}))}(s,{alignLinkTypes:c.alignLinkTypes||!1}),o=n(s),function(t){t.nodes().filter((t=>t.startsWith("__"))).forEach((e=>{var n;let r=t.node(e);if(!r)return;let o=(null==(n=t.inEdges(e))?void 0:n.map((e=>t.edge(e))))||[];o.forEach((e=>{e.origLabel.dy=e.dy,e.origLabel.x0=e.x0,e.origLabel.y0=e.y0,e.origLabel.r0=e.r0,e.origLabel.d0=e.d0,e.origLabel.value=e.value,t.setEdge(e.origEdge,e.origLabel)}));let i,u=o.map((t=>t.r1));for(;r.dummy;)o=t.outEdges(e).map((e=>t.edge(e))),o.forEach(((t,e)=>{t.origLabel.points||(t.origLabel.points=[]),t.origLabel.points.push({d:t.d0,r0:t.r0,r1:u[e],x:r.x,y:t.y0})})),u=o.map((t=>t.r1)),i=t.successors(e)[0],t.removeNode(e),r=t.node(e=i);o.forEach((t=>{t.origLabel.x1=t.x1,t.origLabel.y1=t.y1,t.origLabel.r1=t.r1,t.origLabel.d1=t.d1}))}))}(s),function(t){t.edges().forEach((e=>{const n=t.edge(e);n.points.unshift({d:n.d0,ro:n.r0,x:n.x0,y:n.y0}),n.points.push({d:n.d1,ri:n.r1,x:n.x1,y:n.y1})}))}(s),s}return void 0!==t.whitespace&&e.whitespace(t.whitespace),u.nodes=function(){return r},u.links=function(){return o},u.order=function(){return i},u.size=function(t){return arguments.length?(e.size(t),u):e.size()},u.separation=function(t){return arguments.length?(e.separation(t),u):e.separation()},u.whitespace=function(t){return arguments.length?(e.whitespace(t),u):e.whitespace()},u.edgeValue=function(t){return u},u.scale=function(t){return arguments.length?(e.scale(t),u):e.scale()},u}const vh=["#6b9ece","#e07b7b","#7dba8f","#b09ed1","#e0b678","#6dbaba","#d17da8","#b5b56d","#c49a6d","#8fa4b8","#c98aa0","#94bf7d","#e0a08a","#7b9eb5","#a988a8"];var gh="[object Number]";function yh(t){return function(t){return"number"==typeof t||O(t)&&k(t)==gh}(t)&&t!=+t}const bh=t=>0===t.dy?0:2;function mh(t){const e=Math.max(bh(t),t.dy)/2;let{x0:n}=t,{x1:r}=t,{y0:o}=t,{y1:i}=t;r<n&&([n,r]=[r,n],[o,i]=[i,o]);const u=i>o?1:-1,a=function(t){const e=t.x1-t.x0,n=t.y1-t.y0;return[t.dy/2,(e*e+n*n)/Math.abs(4*n)]}(t),c=Math.max(a[0],Math.min(a[1],(r-n)/3));let s=Math.max(a[0],Math.min(a[1],t.r0||c)),f=Math.max(a[0],Math.min(a[1],t.r1||c));const l=r-n,d=i-o-u*(s+f),h=Math.sqrt(l*l+d*d),p=-u*Math.acos(Math.min(1,(s+f)/h)),v=Math.atan2(d,l);let g=Math.PI/2+u*(v+p),y=e*u*Math.sin(g),b=e*Math.cos(g),m=n+1*s*Math.sin(Math.abs(g)),_=r-1*f*Math.sin(Math.abs(g)),x=o+s*u*(1-Math.cos(g)),w=i-f*u*(1-Math.cos(g));function j(t,n){const r=t*(i-o)>0?1:0;let u=1*t*(i-o)>0?n+e:n-e;return 0===g&&(u=n),`A${u} ${u} ${Math.abs(g)} 0 ${r} `}(yh(g)||Math.abs(g)<.001)&&(g=0,s=0,f=0,m=n,_=r,x=o,w=i,y=0,b=e);return`M${[n,o-e]} ${j(1,s)}${[m+y,x-b]} L${[_+y,w-b]} ${j(-1,f)}${[r,i-e]} L${[r,i+e]} ${j(1,f)}${[_-y,w+b]} L${[m-y,x+b]} ${j(-1,s)}${[n,o+e]} Z`}function _h(t){var e;if(1===(null==(e=t.points)?void 0:e.length))return function(t){const e=t.points[0],n=Math.max(bh(t),t.dy)/2;return"down-right"===e.style?`M${[e.x-20,e.y-n]} L${[e.x,e.y-n]} L${[e.x,e.y+n]} L${[e.x-20,e.y+n]} Z`:"right-down"===e.style?`M${[e.x,e.y-n]} L${[e.x+20,e.y-n]} L${[e.x+20,e.y+n]} L${[e.x,e.y+n]} Z`:null}(t);let n,r="";for(let o=0;o<t.points.length-1;++o)n={d0:t.points[o].d,d1:t.points[o+1].d,dy:t.dy,r0:t.points[o].ro,r1:t.points[o+1].ri,x0:t.points[o].x,x1:t.points[o+1].x,y0:t.points[o].y,y1:t.points[o+1].y},r+=mh(n);return r}const xh=(t,e)=>{const n=void 0!==t.title?t.title:t.id;return e&&n.length>e?`${n.substr(0,15)}...`:n};function wh(t,{fontColor:n,maxRank:r,nodeWidth:o}){const{data:i}=t,u=function(t,e){let n=!1,r=!1;return t.rank<e/2&&(r=!0,n=!1),{right:r,top:n}}(t,r),{x:a,y:c}=function(t,e,n){const r=e.top?-25:t.dy/2-10;let o;return o=e.top?e.right?4:-4:e.right?10+n/2:-n/2-10,{x:t.x+o,y:t.y+r}}(t,u,o),s=function(t="",{fontColor:n="#666767",pointerEvents:r="all",textAnchor:o="start",x:i,y:u}){const a=new e.Text;return a.font({fill:n}),a.tspan(t),void 0!==i&&void 0!==u&&a.move(i,u),a.attr({"pointer-events":r,"text-anchor":o}),a}(xh(i,u.top?25:15),{fontColor:n,pointerEvents:"none",textAnchor:u.top?"middle":u.right?"start":"end",x:a,y:c});return s}function jh(t,n,r){var o,i;const{dy:u,x:a,y:c}=t,{fontColor:s,fontSize:f,nodeBorderColor:l,nodeBorderWidth:d,nodeWidth:h,onNodeClick:p}=r,v=new e.G({class:"node"}),g=function({borderColor:t="#caced0",color:n="#97cbe6",height:r=0,opacity:o=1,radius:i=0,width:u=0,x:a=0,y:c=0}={}){const s=new e.Rect;return s.attr({height:r,opacity:o,rx:i,ry:i,width:u,x:a,y:c}),s.fill(n),s.stroke({color:t,width:1}),s}({height:u,width:h,x:a-h/2,y:c});if(g.fill(null==(o=t.data)?void 0:o.color),g.stroke({color:l??(null==(i=t.data)?void 0:i.color),width:d}),g.on("click",(()=>{"function"==typeof p&&p(t)})),v.add(g),t.data&&u>Number.parseInt(f,10)){const e=wh(t,{fontColor:s,maxRank:n,nodeWidth:h});v.add(e)}return v}class Eh{constructor(t,n,r){this.element=t,this.options=n,this.chartContext=r,t.innerHTML="",this.canvas=e.SVG().addTo(t).size("100%","100%").viewbox(`-${this.spacing} -${this.spacing+this.getYShift()} ${this.width+2*this.spacing} ${this.height+this.spacing+this.getYShift()}`).attr({style:this.options.canvasStyle})}getYShift(){return this.options.enableToolbar?30:0}add(t){this.canvas.add(t)}clear(){this.canvas.clear().viewbox(`-${this.spacing} -${this.spacing+this.getYShift()} ${this.width+2*this.spacing} ${this.height+this.spacing+this.getYShift()}`)}exportToSvg(){new i(this.canvas,"apexsankey").exportToSVG()}resetViewBox(){this.canvas.viewbox(`-${this.spacing} -${this.spacing+this.getYShift()} ${this.width+2*this.spacing} ${this.height+this.spacing+this.getYShift()}`)}updateViewBox(t,e,n,r){this.canvas.viewbox(`${t} ${e} ${n} ${r}`)}get height(){return this.options.viewPortHeight}get spacing(){return this.options.spacing}get width(){return this.options.viewPortWidth}}class Ch extends Eh{constructor(t,e,n){super(t,e,n)}construct(t){const{edgeGap:e,nodeWidth:n,spacing:r,viewPortHeight:o,viewPortWidth:i,whitespace:u}=this.options,a=ph({edgeGap:e,nodeWidth:n,whitespace:u});a.size([i-n,o-r]);const c=t.nodes.map(((t,e)=>{const n=e%vh.length;return{...t,color:t.color??vh[n],colorIndex:n}})),s=a(t.edges,c,t.options);this.maxRank=a.order().length-1,this.graph=s}render({keepOldPosition:t=!1}={}){var e,n;const{enableTooltip:r,fontColor:o,fontFamily:i,fontSize:u,fontWeight:a,nodeBorderColor:s,nodeBorderWidth:f,nodeWidth:l,onNodeClick:d,tooltipId:h}=this.options,p=this.canvas.viewbox();this.clear();const v=((t={})=>{const e=[];for(const n in t){const r=`${dt(n)}: ${t[n]};`;e.push(r)}return e.join(" ")})({color:o,fontFamily:i,fontSize:u,fontWeight:a}),g=c(l/2,0);g.attr("style",v);const y=(null==(e=this.graph)?void 0:e.nodes())||[],b=(null==(n=this.graph)?void 0:n.edges())||[],m=c();b.forEach((t=>{this.renderEdge(t,m)})),g.add(m);const _=c();if(y.forEach((t=>{const e=this.graph.node(t);if(e.dummy)return;const n=jh(e,this.maxRank,{fontColor:o,fontSize:u,nodeBorderColor:s,nodeBorderWidth:f,nodeWidth:l,onNodeClick:d});_.add(n)})),g.add(_),this.add(g),t&&this.updateViewBox(p.x,p.y,p.width,p.height),r){const t=ht(this.chartContext,h);this.chartContext.getAppendContainer().appendChild(t)}}renderEdge(t,n){const{edgeGradientFill:r,edgeOpacity:o,enableTooltip:i,fontColor:u,fontFamily:a,fontSize:c,fontWeight:s,nodeWidth:f,tooltipBGColor:l,tooltipBorderColor:d,tooltipId:h,tooltipTemplate:p}=this.options,v=this.graph.edge(t.v,t.w,t.name),g=this.graph.node(t.v),y=this.graph.node(t.w),b=v.source,m=v.target;g.dummy&&(v.x0-=f/2),y.dummy&&(v.x1+=f/2);const _=function(t,{edgeColor:n,id:r="",opacity:o=1}={}){const i=new e.Path({d:t});return i.id(r),i.fill(n).opacity(o),i}(_h(v),{edgeColor:this.canvas.gradient("linear",(t=>{var e,n,o;t.stop(0,null==(e=b.data)?void 0:e.color),t.stop(1,r?null==(n=m.data)?void 0:n.color:null==(o=b.data)?void 0:o.color)})),id:`${t.v}-${t.w}`,opacity:o});if(i&&b.data&&m.data){const t=p?p({source:b.data,target:m.data,value:v.value}):`${b.data.title} → ${m.data.title}: ${v.value}`;_.on("mouseover",(e=>{const n=vt({bgColor:l,borderColor:d,fontColor:u,fontFamily:a,fontSize:c,fontWeight:s,x:e.pageX,y:e.pageY});pt(this.chartContext,h,n,t)})),_.on("mousemove",(e=>{const n=vt({bgColor:l,borderColor:d,fontColor:u,fontFamily:a,fontSize:c,fontWeight:s,x:e.pageX,y:e.pageY});pt(this.chartContext,h,n,t)})),_.on("mouseout",(()=>{ht(this.chartContext,h).style.display="none"}))}n.add(_)}}const Sh={canvasStyle:"border: 1px solid #caced0; box-sizing: border-box",edgeGap:2,edgeGradientFill:!0,edgeOpacity:.4,enableToolbar:!0,enableTooltip:!0,fontColor:"#212121",fontFamily:"",fontSize:"14px",fontWeight:"400",height:"auto",nodeBorderColor:null,nodeBorderWidth:1,nodeWidth:20,onNodeClick:void 0,spacing:20,tooltipBGColor:"#FFFFFF",tooltipBorderColor:"#BCBCBC",tooltipId:"apexsankey-tooltip-container",tooltipTemplate:({source:t,target:e,value:n})=>`\n <div style='display:flex;align-items:center;gap:1px;padding:3px 5px;'>\n <div style='width:12px;height:12px;background-color:${t.color}'></div>\n <div>${t.title}</div>\n <div>=></div>\n <div style='width:12px;height:12px;background-color:${e.color}'></div>\n <div>${e.title}</div>\n <div>: ${n}</div> \n </div>\n `,viewPortHeight:500,viewPortWidth:800,whitespace:.18,width:"100%"};class Ah extends r{constructor(t,e={}){super(t,"sankey_"+Math.random().toString(36).substr(2,9)),this.options={...Sh,...e};const{height:n,width:r}=this.options;this.graph=new Ch(this.element,this.options,this.chartContext),this.setupElementDimensions(r,n),this.handleWatermark()}static setLicense(t){a.setLicense(t)}setupElementDimensions(t,e){let n=!1,r=0;"string"==typeof t&&/^\d+(\.\d+)?%$/.test(t)?(r=Number(t.substring(0,t.length-1)),n=!0):r=Number(t);const o="auto"===e?r/1.6:e;this.element.style.width=`${r}${n?"%":"px"}`,this.element.style.height=`${o}${n?"%":"px"}`,this.element.style.position="relative"}handleWatermark(){this.element&&(a.isLicenseValid()?d.remove(this.element):d.add(this.element))}render(t){if(!this.element)throw new Error("Element not found");if(this.graph.construct(t),this.graph.render(),this.options.enableToolbar){new f(this.element,this.chartContext).render({enableExport:!0,onExport:this.graph.exportToSvg.bind(this.graph)})}return this.graph}}"undefined"!=typeof window&&(window.ApexSankey=Ah),t.ApexSankey=Ah,t.default=Ah,Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/** @module edge-ordering */
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Assign incoming and outgoing edge lists to each node.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
5
|
+
* The actual sorting of edges for smooth flow is handled in linkLayout.ts
|
|
6
|
+
* where edges are sorted by connected node y-position before endpoint assignment.
|
|
7
7
|
*
|
|
8
8
|
* @param {Graph} G - The graph. Nodes must have `x` and `y` attributes.
|
|
9
9
|
*
|