apextree 1.4.2 → 1.4.3
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/apextree.es.min.js +203 -8
- package/apextree.min.js +1 -1
- package/demo/group_leaf_nodes.html +2 -2
- package/demo/per_node_options.html +2 -5
- package/index.d.ts +4 -1
- package/lib/ApexTree.d.ts +5 -0
- package/package.json +3 -14
- package/.eslintignore +0 -2
- package/.eslintrc +0 -9
- package/.husky/commit-msg +0 -1
- package/.husky/pre-push +0 -1
- package/.prettierrc +0 -5
- package/CHANGELOG.md +0 -25
- package/commitlint.config.js +0 -5
- package/tsconfig.json +0 -28
- package/webpack.common.ts +0 -68
- package/webpack.config.ts +0 -7
- package/webpack.dev.ts +0 -12
- package/webpack.prod.ts +0 -9
package/apextree.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).ApexTree=e()}(this,(function(){"use strict";var t=Object.defineProperty,e=(e,n,r)=>(((e,n,r)=>{n in e?t(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r})(e,"symbol"!=typeof n?n+"":n,r),r);var n,r=(n={"À":"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==n?void 0:n[t]}),i="object"==typeof global&&global&&global.Object===Object&&global,s="object"==typeof self&&self&&self.Object===Object&&self,o=(i||s||Function("return this")()).Symbol;var u=Array.isArray,a=Object.prototype,h=a.hasOwnProperty,l=a.toString,c=o?o.toStringTag:void 0;var f=Object.prototype.toString;var d="[object Null]",p="[object Undefined]",m=o?o.toStringTag:void 0;function g(t){return null==t?void 0===t?p:d:m&&m in Object(t)?function(t){var e=h.call(t,c),n=t[c];try{t[c]=void 0;var r=!0}catch(s){}var i=l.call(t);return r&&(e?t[c]=n:delete t[c]),i}(t):function(t){return f.call(t)}(t)}var y="[object Symbol]";var _=1/0,v=o?o.prototype:void 0,w=v?v.toString:void 0;function b(t){if("string"==typeof t)return t;if(u(t))return function(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}(t,b)+"";if(function(t){return"symbol"==typeof t||function(t){return null!=t&&"object"==typeof t}(t)&&g(t)==y}(t))return w?w.call(t):"";var e=t+"";return"0"==e&&1/t==-_?"-0":e}function x(t){return null==t?"":b(t)}var E=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,O=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var M=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var k=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var C="\\ud800-\\udfff",A="\\u2700-\\u27bf",S="a-z\\xdf-\\xf6\\xf8-\\xff",N="A-Z\\xc0-\\xd6\\xd8-\\xde",j="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",T="["+j+"]",I="\\d+",R="["+A+"]",L="["+S+"]",z="[^"+C+j+I+A+S+N+"]",P="(?:\\ud83c[\\udde6-\\uddff]){2}",D="[\\ud800-\\udbff][\\udc00-\\udfff]",F="["+N+"]",$="(?:"+L+"|"+z+")",Y="(?:"+F+"|"+z+")",G="(?:['’](?:d|ll|m|re|s|t|ve))?",X="(?:['’](?:D|LL|M|RE|S|T|VE))?",B="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",q="[\\ufe0e\\ufe0f]?",V=q+B+("(?:\\u200d(?:"+["[^"+C+"]",P,D].join("|")+")"+q+B+")*"),W="(?:"+[R,P,D].join("|")+")"+V,H=RegExp([F+"?"+L+"+"+G+"(?="+[T,F,"$"].join("|")+")",Y+"+"+X+"(?="+[T,F+$,"$"].join("|")+")",F+"?"+$+"+"+G,F+"+"+X,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",I,W].join("|"),"g");function U(t,e,n){return t=x(t),void 0===e?function(t){return k.test(t)}(t)?function(t){return t.match(H)||[]}(t):function(t){return t.match(M)||[]}(t):t.match(e)||[]}var Z=RegExp("['’]","g");var Q,J=(Q=function(t,e,n){return t+(n?"-":"")+e.toLowerCase()},function(t){return function(t,e,n,r){for(var i=-1,s=null==t?0:t.length;++i<s;)n=e(n,t[i],i,t);return n}(U(function(t){return(t=x(t))&&t.replace(E,r).replace(O,"")}(t).replace(Z,"")),Q,"")});const K=(t="",e,n="")=>{const r=document.getElementById(t);e?null==r||r.setAttribute("style",e):null==r||r.removeAttribute("style"),(null==r?void 0:r.innerHTML.replaceAll("'",'"'))!==n.replaceAll("'",'"')&&r&&(r.innerHTML=n)},tt=({bgColor:t,borderColor:e,fontColor:n,fontFamily:r,fontSize:i,fontWeight:s,maxWidth:o,offset:u=20,padding:a,x:h,y:l})=>{const c=["position: absolute;",`left: ${h+u}px;`,`top: ${l+u}px;`,`border: 1px solid ${e};`,"border-radius: 5px;","z-index: 1000;"];return n&&c.push(`color: ${n};`),r&&c.push(`font-family: ${r};`),s&&c.push(`font-weight: ${s};`),i&&c.push(`font-size: ${i};`),t&&c.push(`background-color: ${t};`),o&&c.push(`max-width: ${o}px`),void 0!==a&&c.push(`padding: ${a}px`),c.join(" ")},et=(t={})=>{const e=[];for(const n in t){const r=`${J(n)}: ${t[n]};`;e.push(r)}return e.join(" ")};class nt{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`)}}var rt,it,st="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},ot={exports:{}};rt=ot,it=ot.exports,function(){var t,e="Expected a function",n="__lodash_hash_undefined__",r="__lodash_placeholder__",i=16,s=32,o=64,u=128,a=256,h=1/0,l=9007199254740991,c=NaN,f=4294967295,d=[["ary",u],["bind",1],["bindKey",2],["curry",8],["curryRight",i],["flip",512],["partial",s],["partialRight",o],["rearg",a]],p="[object Arguments]",m="[object Array]",g="[object Boolean]",y="[object Date]",_="[object Error]",v="[object Function]",w="[object GeneratorFunction]",b="[object Map]",x="[object Number]",E="[object Object]",O="[object Promise]",M="[object RegExp]",k="[object Set]",C="[object String]",A="[object Symbol]",S="[object WeakMap]",N="[object ArrayBuffer]",j="[object DataView]",T="[object Float32Array]",I="[object Float64Array]",R="[object Int8Array]",L="[object Int16Array]",z="[object Int32Array]",P="[object Uint8Array]",D="[object Uint8ClampedArray]",F="[object Uint16Array]",$="[object Uint32Array]",Y=/\b__p \+= '';/g,G=/\b(__p \+=) '' \+/g,X=/(__e\(.*?\)|\b__t\)) \+\n'';/g,B=/&(?:amp|lt|gt|quot|#39);/g,q=/[&<>"']/g,V=RegExp(B.source),W=RegExp(q.source),H=/<%-([\s\S]+?)%>/g,U=/<%([\s\S]+?)%>/g,Z=/<%=([\s\S]+?)%>/g,Q=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,J=/^\w*$/,K=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,tt=/[\\^$.*+?()[\]{}|]/g,et=RegExp(tt.source),nt=/^\s+/,ot=/\s/,ut=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,at=/\{\n\/\* \[wrapped with (.+)\] \*/,ht=/,? & /,lt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ct=/[()=,{}\[\]\/\s]/,ft=/\\(\\)?/g,dt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,pt=/\w*$/,mt=/^[-+]0x[0-9a-f]+$/i,gt=/^0b[01]+$/i,yt=/^\[object .+?Constructor\]$/,_t=/^0o[0-7]+$/i,vt=/^(?:0|[1-9]\d*)$/,wt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,bt=/($^)/,xt=/['\n\r\u2028\u2029\\]/g,Et="\\ud800-\\udfff",Ot="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Mt="\\u2700-\\u27bf",kt="a-z\\xdf-\\xf6\\xf8-\\xff",Ct="A-Z\\xc0-\\xd6\\xd8-\\xde",At="\\ufe0e\\ufe0f",St="\\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",Nt="['’]",jt="["+Et+"]",Tt="["+St+"]",It="["+Ot+"]",Rt="\\d+",Lt="["+Mt+"]",zt="["+kt+"]",Pt="[^"+Et+St+Rt+Mt+kt+Ct+"]",Dt="\\ud83c[\\udffb-\\udfff]",Ft="[^"+Et+"]",$t="(?:\\ud83c[\\udde6-\\uddff]){2}",Yt="[\\ud800-\\udbff][\\udc00-\\udfff]",Gt="["+Ct+"]",Xt="\\u200d",Bt="(?:"+zt+"|"+Pt+")",qt="(?:"+Gt+"|"+Pt+")",Vt="(?:['’](?:d|ll|m|re|s|t|ve))?",Wt="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ht="(?:"+It+"|"+Dt+")?",Ut="["+At+"]?",Zt=Ut+Ht+"(?:"+Xt+"(?:"+[Ft,$t,Yt].join("|")+")"+Ut+Ht+")*",Qt="(?:"+[Lt,$t,Yt].join("|")+")"+Zt,Jt="(?:"+[Ft+It+"?",It,$t,Yt,jt].join("|")+")",Kt=RegExp(Nt,"g"),te=RegExp(It,"g"),ee=RegExp(Dt+"(?="+Dt+")|"+Jt+Zt,"g"),ne=RegExp([Gt+"?"+zt+"+"+Vt+"(?="+[Tt,Gt,"$"].join("|")+")",qt+"+"+Wt+"(?="+[Tt,Gt+Bt,"$"].join("|")+")",Gt+"?"+Bt+"+"+Vt,Gt+"+"+Wt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Rt,Qt].join("|"),"g"),re=RegExp("["+Xt+Et+Ot+At+"]"),ie=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,se=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],oe=-1,ue={};ue[T]=ue[I]=ue[R]=ue[L]=ue[z]=ue[P]=ue[D]=ue[F]=ue[$]=!0,ue[p]=ue[m]=ue[N]=ue[g]=ue[j]=ue[y]=ue[_]=ue[v]=ue[b]=ue[x]=ue[E]=ue[M]=ue[k]=ue[C]=ue[S]=!1;var ae={};ae[p]=ae[m]=ae[N]=ae[j]=ae[g]=ae[y]=ae[T]=ae[I]=ae[R]=ae[L]=ae[z]=ae[b]=ae[x]=ae[E]=ae[M]=ae[k]=ae[C]=ae[A]=ae[P]=ae[D]=ae[F]=ae[$]=!0,ae[_]=ae[v]=ae[S]=!1;var he={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},le=parseFloat,ce=parseInt,fe="object"==typeof st&&st&&st.Object===Object&&st,de="object"==typeof self&&self&&self.Object===Object&&self,pe=fe||de||Function("return this")(),me=it&&!it.nodeType&&it,ge=me&&rt&&!rt.nodeType&&rt,ye=ge&&ge.exports===me,_e=ye&&fe.process,ve=function(){try{var t=ge&&ge.require&&ge.require("util").types;return t||_e&&_e.binding&&_e.binding("util")}catch(e){}}(),we=ve&&ve.isArrayBuffer,be=ve&&ve.isDate,xe=ve&&ve.isMap,Ee=ve&&ve.isRegExp,Oe=ve&&ve.isSet,Me=ve&&ve.isTypedArray;function ke(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function Ce(t,e,n,r){for(var i=-1,s=null==t?0:t.length;++i<s;){var o=t[i];e(r,o,n(o),t)}return r}function Ae(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}function Se(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function Ne(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function je(t,e){for(var n=-1,r=null==t?0:t.length,i=0,s=[];++n<r;){var o=t[n];e(o,n,t)&&(s[i++]=o)}return s}function Te(t,e){return!(null==t||!t.length)&&Ge(t,e,0)>-1}function Ie(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}function Re(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}function Le(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function ze(t,e,n,r){var i=-1,s=null==t?0:t.length;for(r&&s&&(n=t[++i]);++i<s;)n=e(n,t[i],i,t);return n}function Pe(t,e,n,r){var i=null==t?0:t.length;for(r&&i&&(n=t[--i]);i--;)n=e(n,t[i],i,t);return n}function De(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var Fe=Ve("length");function $e(t,e,n){var r;return n(t,(function(t,n,i){if(e(t,n,i))return r=n,!1})),r}function Ye(t,e,n,r){for(var i=t.length,s=n+(r?1:-1);r?s--:++s<i;)if(e(t[s],s,t))return s;return-1}function Ge(t,e,n){return e==e?function(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}(t,e,n):Ye(t,Be,n)}function Xe(t,e,n,r){for(var i=n-1,s=t.length;++i<s;)if(r(t[i],e))return i;return-1}function Be(t){return t!=t}function qe(t,e){var n=null==t?0:t.length;return n?Ue(t,e)/n:c}function Ve(e){return function(n){return null==n?t:n[e]}}function We(e){return function(n){return null==e?t:e[n]}}function He(t,e,n,r,i){return i(t,(function(t,i,s){n=r?(r=!1,t):e(n,t,i,s)})),n}function Ue(e,n){for(var r,i=-1,s=e.length;++i<s;){var o=n(e[i]);o!==t&&(r=r===t?o:r+o)}return r}function Ze(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function Qe(t){return t?t.slice(0,pn(t)+1).replace(nt,""):t}function Je(t){return function(e){return t(e)}}function Ke(t,e){return Re(e,(function(e){return t[e]}))}function tn(t,e){return t.has(e)}function en(t,e){for(var n=-1,r=t.length;++n<r&&Ge(e,t[n],0)>-1;);return n}function nn(t,e){for(var n=t.length;n--&&Ge(e,t[n],0)>-1;);return n}var rn=We({"À":"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"}),sn=We({"&":"&","<":"<",">":">",'"':""","'":"'"});function on(t){return"\\"+he[t]}function un(t){return re.test(t)}function an(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function hn(t,e){return function(n){return t(e(n))}}function ln(t,e){for(var n=-1,i=t.length,s=0,o=[];++n<i;){var u=t[n];u!==e&&u!==r||(t[n]=r,o[s++]=n)}return o}function cn(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}function fn(t){return un(t)?function(t){for(var e=ee.lastIndex=0;ee.test(t);)++e;return e}(t):Fe(t)}function dn(t){return un(t)?function(t){return t.match(ee)||[]}(t):function(t){return t.split("")}(t)}function pn(t){for(var e=t.length;e--&&ot.test(t.charAt(e)););return e}var mn=We({"&":"&","<":"<",">":">",""":'"',"'":"'"}),gn=function rt(it){var st,ot=(it=null==it?pe:gn.defaults(pe.Object(),it,gn.pick(pe,se))).Array,Et=it.Date,Ot=it.Error,Mt=it.Function,kt=it.Math,Ct=it.Object,At=it.RegExp,St=it.String,Nt=it.TypeError,jt=ot.prototype,Tt=Mt.prototype,It=Ct.prototype,Rt=it["__core-js_shared__"],Lt=Tt.toString,zt=It.hasOwnProperty,Pt=0,Dt=(st=/[^.]+$/.exec(Rt&&Rt.keys&&Rt.keys.IE_PROTO||""))?"Symbol(src)_1."+st:"",Ft=It.toString,$t=Lt.call(Ct),Yt=pe._,Gt=At("^"+Lt.call(zt).replace(tt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Xt=ye?it.Buffer:t,Bt=it.Symbol,qt=it.Uint8Array,Vt=Xt?Xt.allocUnsafe:t,Wt=hn(Ct.getPrototypeOf,Ct),Ht=Ct.create,Ut=It.propertyIsEnumerable,Zt=jt.splice,Qt=Bt?Bt.isConcatSpreadable:t,Jt=Bt?Bt.iterator:t,ee=Bt?Bt.toStringTag:t,re=function(){try{var t=cs(Ct,"defineProperty");return t({},"",{}),t}catch(e){}}(),he=it.clearTimeout!==pe.clearTimeout&&it.clearTimeout,fe=Et&&Et.now!==pe.Date.now&&Et.now,de=it.setTimeout!==pe.setTimeout&&it.setTimeout,me=kt.ceil,ge=kt.floor,_e=Ct.getOwnPropertySymbols,ve=Xt?Xt.isBuffer:t,Fe=it.isFinite,We=jt.join,yn=hn(Ct.keys,Ct),_n=kt.max,vn=kt.min,wn=Et.now,bn=it.parseInt,xn=kt.random,En=jt.reverse,On=cs(it,"DataView"),Mn=cs(it,"Map"),kn=cs(it,"Promise"),Cn=cs(it,"Set"),An=cs(it,"WeakMap"),Sn=cs(Ct,"create"),Nn=An&&new An,jn={},Tn=$s(On),In=$s(Mn),Rn=$s(kn),Ln=$s(Cn),zn=$s(An),Pn=Bt?Bt.prototype:t,Dn=Pn?Pn.valueOf:t,Fn=Pn?Pn.toString:t;function $n(t){if(iu(t)&&!Wo(t)&&!(t instanceof Bn)){if(t instanceof Xn)return t;if(zt.call(t,"__wrapped__"))return Ys(t)}return new Xn(t)}var Yn=function(){function e(){}return function(n){if(!ru(n))return{};if(Ht)return Ht(n);e.prototype=n;var r=new e;return e.prototype=t,r}}();function Gn(){}function Xn(e,n){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!n,this.__index__=0,this.__values__=t}function Bn(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=f,this.__views__=[]}function qn(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 Vn(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 Wn(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 Hn(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Wn;++e<n;)this.add(t[e])}function Un(t){var e=this.__data__=new Vn(t);this.size=e.size}function Zn(t,e){var n=Wo(t),r=!n&&Vo(t),i=!n&&!r&&Qo(t),s=!n&&!r&&!i&&fu(t),o=n||r||i||s,u=o?Ze(t.length,St):[],a=u.length;for(var h in t)!e&&!zt.call(t,h)||o&&("length"==h||i&&("offset"==h||"parent"==h)||s&&("buffer"==h||"byteLength"==h||"byteOffset"==h)||_s(h,a))||u.push(h);return u}function Qn(e){var n=e.length;return n?e[Hr(0,n-1)]:t}function Jn(t,e){return Rs(Si(t),ur(e,0,t.length))}function Kn(t){return Rs(Si(t))}function tr(e,n,r){(r!==t&&!Xo(e[n],r)||r===t&&!(n in e))&&sr(e,n,r)}function er(e,n,r){var i=e[n];zt.call(e,n)&&Xo(i,r)&&(r!==t||n in e)||sr(e,n,r)}function nr(t,e){for(var n=t.length;n--;)if(Xo(t[n][0],e))return n;return-1}function rr(t,e,n,r){return fr(t,(function(t,i,s){e(r,t,n(t),s)})),r}function ir(t,e){return t&&Ni(e,Ru(e),t)}function sr(t,e,n){"__proto__"==e&&re?re(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function or(e,n){for(var r=-1,i=n.length,s=ot(i),o=null==e;++r<i;)s[r]=o?t:Su(e,n[r]);return s}function ur(e,n,r){return e==e&&(r!==t&&(e=e<=r?e:r),n!==t&&(e=e>=n?e:n)),e}function ar(e,n,r,i,s,o){var u,a=1&n,h=2&n,l=4&n;if(r&&(u=s?r(e,i,s,o):r(e)),u!==t)return u;if(!ru(e))return e;var c=Wo(e);if(c){if(u=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&zt.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(e),!a)return Si(e,u)}else{var f=ps(e),d=f==v||f==w;if(Qo(e))return Ei(e,a);if(f==E||f==p||d&&!s){if(u=h||d?{}:gs(e),!a)return h?function(t,e){return Ni(t,ds(t),e)}(e,function(t,e){return t&&Ni(e,Lu(e),t)}(u,e)):function(t,e){return Ni(t,fs(t),e)}(e,ir(u,e))}else{if(!ae[f])return s?e:{};u=function(t,e,n){var r,i=t.constructor;switch(e){case N:return Oi(t);case g:case y:return new i(+t);case j:return function(t,e){var n=e?Oi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case T:case I:case R:case L:case z:case P:case D:case F:case $:return Mi(t,n);case b:return new i;case x:case C:return new i(t);case M:return function(t){var e=new t.constructor(t.source,pt.exec(t));return e.lastIndex=t.lastIndex,e}(t);case k:return new i;case A:return r=t,Dn?Ct(Dn.call(r)):{}}}(e,f,a)}}o||(o=new Un);var m=o.get(e);if(m)return m;o.set(e,u),hu(e)?e.forEach((function(t){u.add(ar(t,n,r,t,e,o))})):su(e)&&e.forEach((function(t,i){u.set(i,ar(t,n,r,i,e,o))}));var _=c?t:(l?h?is:rs:h?Lu:Ru)(e);return Ae(_||e,(function(t,i){_&&(t=e[i=t]),er(u,i,ar(t,n,r,i,e,o))})),u}function hr(e,n,r){var i=r.length;if(null==e)return!i;for(e=Ct(e);i--;){var s=r[i],o=n[s],u=e[s];if(u===t&&!(s in e)||!o(u))return!1}return!0}function lr(n,r,i){if("function"!=typeof n)throw new Nt(e);return Ns((function(){n.apply(t,i)}),r)}function cr(t,e,n,r){var i=-1,s=Te,o=!0,u=t.length,a=[],h=e.length;if(!u)return a;n&&(e=Re(e,Je(n))),r?(s=Ie,o=!1):e.length>=200&&(s=tn,o=!1,e=new Hn(e));t:for(;++i<u;){var l=t[i],c=null==n?l:n(l);if(l=r||0!==l?l:0,o&&c==c){for(var f=h;f--;)if(e[f]===c)continue t;a.push(l)}else s(e,c,r)||a.push(l)}return a}$n.templateSettings={escape:H,evaluate:U,interpolate:Z,variable:"",imports:{_:$n}},$n.prototype=Gn.prototype,$n.prototype.constructor=$n,Xn.prototype=Yn(Gn.prototype),Xn.prototype.constructor=Xn,Bn.prototype=Yn(Gn.prototype),Bn.prototype.constructor=Bn,qn.prototype.clear=function(){this.__data__=Sn?Sn(null):{},this.size=0},qn.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},qn.prototype.get=function(e){var r=this.__data__;if(Sn){var i=r[e];return i===n?t:i}return zt.call(r,e)?r[e]:t},qn.prototype.has=function(e){var n=this.__data__;return Sn?n[e]!==t:zt.call(n,e)},qn.prototype.set=function(e,r){var i=this.__data__;return this.size+=this.has(e)?0:1,i[e]=Sn&&r===t?n:r,this},Vn.prototype.clear=function(){this.__data__=[],this.size=0},Vn.prototype.delete=function(t){var e=this.__data__,n=nr(e,t);return!(n<0||(n==e.length-1?e.pop():Zt.call(e,n,1),--this.size,0))},Vn.prototype.get=function(e){var n=this.__data__,r=nr(n,e);return r<0?t:n[r][1]},Vn.prototype.has=function(t){return nr(this.__data__,t)>-1},Vn.prototype.set=function(t,e){var n=this.__data__,r=nr(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},Wn.prototype.clear=function(){this.size=0,this.__data__={hash:new qn,map:new(Mn||Vn),string:new qn}},Wn.prototype.delete=function(t){var e=hs(this,t).delete(t);return this.size-=e?1:0,e},Wn.prototype.get=function(t){return hs(this,t).get(t)},Wn.prototype.has=function(t){return hs(this,t).has(t)},Wn.prototype.set=function(t,e){var n=hs(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},Hn.prototype.add=Hn.prototype.push=function(t){return this.__data__.set(t,n),this},Hn.prototype.has=function(t){return this.__data__.has(t)},Un.prototype.clear=function(){this.__data__=new Vn,this.size=0},Un.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Un.prototype.get=function(t){return this.__data__.get(t)},Un.prototype.has=function(t){return this.__data__.has(t)},Un.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Vn){var r=n.__data__;if(!Mn||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Wn(r)}return n.set(t,e),this.size=n.size,this};var fr=Ii(wr),dr=Ii(br,!0);function pr(t,e){var n=!0;return fr(t,(function(t,r,i){return n=!!e(t,r,i)})),n}function mr(e,n,r){for(var i=-1,s=e.length;++i<s;){var o=e[i],u=n(o);if(null!=u&&(a===t?u==u&&!cu(u):r(u,a)))var a=u,h=o}return h}function gr(t,e){var n=[];return fr(t,(function(t,r,i){e(t,r,i)&&n.push(t)})),n}function yr(t,e,n,r,i){var s=-1,o=t.length;for(n||(n=ys),i||(i=[]);++s<o;){var u=t[s];e>0&&n(u)?e>1?yr(u,e-1,n,r,i):Le(i,u):r||(i[i.length]=u)}return i}var _r=Ri(),vr=Ri(!0);function wr(t,e){return t&&_r(t,e,Ru)}function br(t,e){return t&&vr(t,e,Ru)}function xr(t,e){return je(e,(function(e){return tu(t[e])}))}function Er(e,n){for(var r=0,i=(n=vi(n,e)).length;null!=e&&r<i;)e=e[Fs(n[r++])];return r&&r==i?e:t}function Or(t,e,n){var r=e(t);return Wo(t)?r:Le(r,n(t))}function Mr(e){return null==e?e===t?"[object Undefined]":"[object Null]":ee&&ee in Ct(e)?function(e){var n=zt.call(e,ee),r=e[ee];try{e[ee]=t;var i=!0}catch(o){}var s=Ft.call(e);return i&&(n?e[ee]=r:delete e[ee]),s}(e):function(t){return Ft.call(t)}(e)}function kr(t,e){return t>e}function Cr(t,e){return null!=t&&zt.call(t,e)}function Ar(t,e){return null!=t&&e in Ct(t)}function Sr(e,n,r){for(var i=r?Ie:Te,s=e[0].length,o=e.length,u=o,a=ot(o),h=1/0,l=[];u--;){var c=e[u];u&&n&&(c=Re(c,Je(n))),h=vn(c.length,h),a[u]=!r&&(n||s>=120&&c.length>=120)?new Hn(u&&c):t}c=e[0];var f=-1,d=a[0];t:for(;++f<s&&l.length<h;){var p=c[f],m=n?n(p):p;if(p=r||0!==p?p:0,!(d?tn(d,m):i(l,m,r))){for(u=o;--u;){var g=a[u];if(!(g?tn(g,m):i(e[u],m,r)))continue t}d&&d.push(m),l.push(p)}}return l}function Nr(e,n,r){var i=null==(e=Cs(e,n=vi(n,e)))?e:e[Fs(Js(n))];return null==i?t:ke(i,e,r)}function jr(t){return iu(t)&&Mr(t)==p}function Tr(e,n,r,i,s){return e===n||(null==e||null==n||!iu(e)&&!iu(n)?e!=e&&n!=n:function(e,n,r,i,s,o){var u=Wo(e),a=Wo(n),h=u?m:ps(e),l=a?m:ps(n),c=(h=h==p?E:h)==E,f=(l=l==p?E:l)==E,d=h==l;if(d&&Qo(e)){if(!Qo(n))return!1;u=!0,c=!1}if(d&&!c)return o||(o=new Un),u||fu(e)?es(e,n,r,i,s,o):function(t,e,n,r,i,s,o){switch(n){case j:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case N:return!(t.byteLength!=e.byteLength||!s(new qt(t),new qt(e)));case g:case y:case x:return Xo(+t,+e);case _:return t.name==e.name&&t.message==e.message;case M:case C:return t==e+"";case b:var u=an;case k:var a=1&r;if(u||(u=cn),t.size!=e.size&&!a)return!1;var h=o.get(t);if(h)return h==e;r|=2,o.set(t,e);var l=es(u(t),u(e),r,i,s,o);return o.delete(t),l;case A:if(Dn)return Dn.call(t)==Dn.call(e)}return!1}(e,n,h,r,i,s,o);if(!(1&r)){var v=c&&zt.call(e,"__wrapped__"),w=f&&zt.call(n,"__wrapped__");if(v||w){var O=v?e.value():e,S=w?n.value():n;return o||(o=new Un),s(O,S,r,i,o)}}return!!d&&(o||(o=new Un),function(e,n,r,i,s,o){var u=1&r,a=rs(e),h=a.length,l=rs(n),c=l.length;if(h!=c&&!u)return!1;for(var f=h;f--;){var d=a[f];if(!(u?d in n:zt.call(n,d)))return!1}var p=o.get(e),m=o.get(n);if(p&&m)return p==n&&m==e;var g=!0;o.set(e,n),o.set(n,e);for(var y=u;++f<h;){var _=e[d=a[f]],v=n[d];if(i)var w=u?i(v,_,d,n,e,o):i(_,v,d,e,n,o);if(!(w===t?_===v||s(_,v,r,i,o):w)){g=!1;break}y||(y="constructor"==d)}if(g&&!y){var b=e.constructor,x=n.constructor;b==x||!("constructor"in e)||!("constructor"in n)||"function"==typeof b&&b instanceof b&&"function"==typeof x&&x instanceof x||(g=!1)}return o.delete(e),o.delete(n),g}(e,n,r,i,s,o))}(e,n,r,i,Tr,s))}function Ir(e,n,r,i){var s=r.length,o=s,u=!i;if(null==e)return!o;for(e=Ct(e);s--;){var a=r[s];if(u&&a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++s<o;){var h=(a=r[s])[0],l=e[h],c=a[1];if(u&&a[2]){if(l===t&&!(h in e))return!1}else{var f=new Un;if(i)var d=i(l,c,h,e,n,f);if(!(d===t?Tr(c,l,3,i,f):d))return!1}}return!0}function Rr(t){return!(!ru(t)||(e=t,Dt&&Dt in e))&&(tu(t)?Gt:yt).test($s(t));var e}function Lr(t){return"function"==typeof t?t:null==t?oa:"object"==typeof t?Wo(t)?Yr(t[0],t[1]):$r(t):ma(t)}function zr(t){if(!Es(t))return yn(t);var e=[];for(var n in Ct(t))zt.call(t,n)&&"constructor"!=n&&e.push(n);return e}function Pr(t){if(!ru(t))return function(t){var e=[];if(null!=t)for(var n in Ct(t))e.push(n);return e}(t);var e=Es(t),n=[];for(var r in t)("constructor"!=r||!e&&zt.call(t,r))&&n.push(r);return n}function Dr(t,e){return t<e}function Fr(t,e){var n=-1,r=Uo(t)?ot(t.length):[];return fr(t,(function(t,i,s){r[++n]=e(t,i,s)})),r}function $r(t){var e=ls(t);return 1==e.length&&e[0][2]?Ms(e[0][0],e[0][1]):function(n){return n===t||Ir(n,t,e)}}function Yr(e,n){return ws(e)&&Os(n)?Ms(Fs(e),n):function(r){var i=Su(r,e);return i===t&&i===n?Nu(r,e):Tr(n,i,3)}}function Gr(e,n,r,i,s){e!==n&&_r(n,(function(o,u){if(s||(s=new Un),ru(o))!function(e,n,r,i,s,o,u){var a=As(e,r),h=As(n,r),l=u.get(h);if(l)tr(e,r,l);else{var c=o?o(a,h,r+"",e,n,u):t,f=c===t;if(f){var d=Wo(h),p=!d&&Qo(h),m=!d&&!p&&fu(h);c=h,d||p||m?Wo(a)?c=a:Zo(a)?c=Si(a):p?(f=!1,c=Ei(h,!0)):m?(f=!1,c=Mi(h,!0)):c=[]:uu(h)||Vo(h)?(c=a,Vo(a)?c=wu(a):ru(a)&&!tu(a)||(c=gs(h))):f=!1}f&&(u.set(h,c),s(c,h,i,o,u),u.delete(h)),tr(e,r,c)}}(e,n,u,r,Gr,i,s);else{var a=i?i(As(e,u),o,u+"",e,n,s):t;a===t&&(a=o),tr(e,u,a)}}),Lu)}function Xr(e,n){var r=e.length;if(r)return _s(n+=n<0?r:0,r)?e[n]:t}function Br(t,e,n){e=e.length?Re(e,(function(t){return Wo(t)?function(e){return Er(e,1===t.length?t[0]:t)}:t})):[oa];var r=-1;return e=Re(e,Je(as())),function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}(Fr(t,(function(t,n,i){return{criteria:Re(e,(function(e){return e(t)})),index:++r,value:t}})),(function(t,e){return function(t,e,n){for(var r=-1,i=t.criteria,s=e.criteria,o=i.length,u=n.length;++r<o;){var a=ki(i[r],s[r]);if(a)return r>=u?a:a*("desc"==n[r]?-1:1)}return t.index-e.index}(t,e,n)}))}function qr(t,e,n){for(var r=-1,i=e.length,s={};++r<i;){var o=e[r],u=Er(t,o);n(u,o)&&Kr(s,vi(o,t),u)}return s}function Vr(t,e,n,r){var i=r?Xe:Ge,s=-1,o=e.length,u=t;for(t===e&&(e=Si(e)),n&&(u=Re(t,Je(n)));++s<o;)for(var a=0,h=e[s],l=n?n(h):h;(a=i(u,l,a,r))>-1;)u!==t&&Zt.call(u,a,1),Zt.call(t,a,1);return t}function Wr(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==s){var s=i;_s(i)?Zt.call(t,i,1):ci(t,i)}}return t}function Hr(t,e){return t+ge(xn()*(e-t+1))}function Ur(t,e){var n="";if(!t||e<1||e>l)return n;do{e%2&&(n+=t),(e=ge(e/2))&&(t+=t)}while(e);return n}function Zr(t,e){return js(ks(t,e,oa),t+"")}function Qr(t){return Qn(Xu(t))}function Jr(t,e){var n=Xu(t);return Rs(n,ur(e,0,n.length))}function Kr(e,n,r,i){if(!ru(e))return e;for(var s=-1,o=(n=vi(n,e)).length,u=o-1,a=e;null!=a&&++s<o;){var h=Fs(n[s]),l=r;if("__proto__"===h||"constructor"===h||"prototype"===h)return e;if(s!=u){var c=a[h];(l=i?i(c,h,a):t)===t&&(l=ru(c)?c:_s(n[s+1])?[]:{})}er(a,h,l),a=a[h]}return e}var ti=Nn?function(t,e){return Nn.set(t,e),t}:oa,ei=re?function(t,e){return re(t,"toString",{configurable:!0,enumerable:!1,value:ra(e),writable:!0})}:oa;function ni(t){return Rs(Xu(t))}function ri(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(n=n>i?i:n)<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var s=ot(i);++r<i;)s[r]=t[r+e];return s}function ii(t,e){var n;return fr(t,(function(t,r,i){return!(n=e(t,r,i))})),!!n}function si(t,e,n){var r=0,i=null==t?r:t.length;if("number"==typeof e&&e==e&&i<=2147483647){for(;r<i;){var s=r+i>>>1,o=t[s];null!==o&&!cu(o)&&(n?o<=e:o<e)?r=s+1:i=s}return i}return oi(t,e,oa,n)}function oi(e,n,r,i){var s=0,o=null==e?0:e.length;if(0===o)return 0;for(var u=(n=r(n))!=n,a=null===n,h=cu(n),l=n===t;s<o;){var c=ge((s+o)/2),f=r(e[c]),d=f!==t,p=null===f,m=f==f,g=cu(f);if(u)var y=i||m;else y=l?m&&(i||d):a?m&&d&&(i||!p):h?m&&d&&!p&&(i||!g):!p&&!g&&(i?f<=n:f<n);y?s=c+1:o=c}return vn(o,4294967294)}function ui(t,e){for(var n=-1,r=t.length,i=0,s=[];++n<r;){var o=t[n],u=e?e(o):o;if(!n||!Xo(u,a)){var a=u;s[i++]=0===o?0:o}}return s}function ai(t){return"number"==typeof t?t:cu(t)?c:+t}function hi(t){if("string"==typeof t)return t;if(Wo(t))return Re(t,hi)+"";if(cu(t))return Fn?Fn.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function li(t,e,n){var r=-1,i=Te,s=t.length,o=!0,u=[],a=u;if(n)o=!1,i=Ie;else if(s>=200){var h=e?null:Ui(t);if(h)return cn(h);o=!1,i=tn,a=new Hn}else a=e?[]:u;t:for(;++r<s;){var l=t[r],c=e?e(l):l;if(l=n||0!==l?l:0,o&&c==c){for(var f=a.length;f--;)if(a[f]===c)continue t;e&&a.push(c),u.push(l)}else i(a,c,n)||(a!==u&&a.push(c),u.push(l))}return u}function ci(t,e){return null==(t=Cs(t,e=vi(e,t)))||delete t[Fs(Js(e))]}function fi(t,e,n,r){return Kr(t,e,n(Er(t,e)),r)}function di(t,e,n,r){for(var i=t.length,s=r?i:-1;(r?s--:++s<i)&&e(t[s],s,t););return n?ri(t,r?0:s,r?s+1:i):ri(t,r?s+1:0,r?i:s)}function pi(t,e){var n=t;return n instanceof Bn&&(n=n.value()),ze(e,(function(t,e){return e.func.apply(e.thisArg,Le([t],e.args))}),n)}function mi(t,e,n){var r=t.length;if(r<2)return r?li(t[0]):[];for(var i=-1,s=ot(r);++i<r;)for(var o=t[i],u=-1;++u<r;)u!=i&&(s[i]=cr(s[i]||o,t[u],e,n));return li(yr(s,1),e,n)}function gi(e,n,r){for(var i=-1,s=e.length,o=n.length,u={};++i<s;){var a=i<o?n[i]:t;r(u,e[i],a)}return u}function yi(t){return Zo(t)?t:[]}function _i(t){return"function"==typeof t?t:oa}function vi(t,e){return Wo(t)?t:ws(t,e)?[t]:Ds(bu(t))}var wi=Zr;function bi(e,n,r){var i=e.length;return r=r===t?i:r,!n&&r>=i?e:ri(e,n,r)}var xi=he||function(t){return pe.clearTimeout(t)};function Ei(t,e){if(e)return t.slice();var n=t.length,r=Vt?Vt(n):new t.constructor(n);return t.copy(r),r}function Oi(t){var e=new t.constructor(t.byteLength);return new qt(e).set(new qt(t)),e}function Mi(t,e){var n=e?Oi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function ki(e,n){if(e!==n){var r=e!==t,i=null===e,s=e==e,o=cu(e),u=n!==t,a=null===n,h=n==n,l=cu(n);if(!a&&!l&&!o&&e>n||o&&u&&h&&!a&&!l||i&&u&&h||!r&&h||!s)return 1;if(!i&&!o&&!l&&e<n||l&&r&&s&&!i&&!o||a&&r&&s||!u&&s||!h)return-1}return 0}function Ci(t,e,n,r){for(var i=-1,s=t.length,o=n.length,u=-1,a=e.length,h=_n(s-o,0),l=ot(a+h),c=!r;++u<a;)l[u]=e[u];for(;++i<o;)(c||i<s)&&(l[n[i]]=t[i]);for(;h--;)l[u++]=t[i++];return l}function Ai(t,e,n,r){for(var i=-1,s=t.length,o=-1,u=n.length,a=-1,h=e.length,l=_n(s-u,0),c=ot(l+h),f=!r;++i<l;)c[i]=t[i];for(var d=i;++a<h;)c[d+a]=e[a];for(;++o<u;)(f||i<s)&&(c[d+n[o]]=t[i++]);return c}function Si(t,e){var n=-1,r=t.length;for(e||(e=ot(r));++n<r;)e[n]=t[n];return e}function Ni(e,n,r,i){var s=!r;r||(r={});for(var o=-1,u=n.length;++o<u;){var a=n[o],h=i?i(r[a],e[a],a,r,e):t;h===t&&(h=e[a]),s?sr(r,a,h):er(r,a,h)}return r}function ji(t,e){return function(n,r){var i=Wo(n)?Ce:rr,s=e?e():{};return i(n,t,as(r,2),s)}}function Ti(e){return Zr((function(n,r){var i=-1,s=r.length,o=s>1?r[s-1]:t,u=s>2?r[2]:t;for(o=e.length>3&&"function"==typeof o?(s--,o):t,u&&vs(r[0],r[1],u)&&(o=s<3?t:o,s=1),n=Ct(n);++i<s;){var a=r[i];a&&e(n,a,i,o)}return n}))}function Ii(t,e){return function(n,r){if(null==n)return n;if(!Uo(n))return t(n,r);for(var i=n.length,s=e?i:-1,o=Ct(n);(e?s--:++s<i)&&!1!==r(o[s],s,o););return n}}function Ri(t){return function(e,n,r){for(var i=-1,s=Ct(e),o=r(e),u=o.length;u--;){var a=o[t?u:++i];if(!1===n(s[a],a,s))break}return e}}function Li(e){return function(n){var r=un(n=bu(n))?dn(n):t,i=r?r[0]:n.charAt(0),s=r?bi(r,1).join(""):n.slice(1);return i[e]()+s}}function zi(t){return function(e){return ze(ta(Vu(e).replace(Kt,"")),t,"")}}function Pi(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=Yn(t.prototype),r=t.apply(n,e);return ru(r)?r:n}}function Di(e){return function(n,r,i){var s=Ct(n);if(!Uo(n)){var o=as(r,3);n=Ru(n),r=function(t){return o(s[t],t,s)}}var u=e(n,r,i);return u>-1?s[o?n[u]:u]:t}}function Fi(n){return ns((function(r){var i=r.length,s=i,o=Xn.prototype.thru;for(n&&r.reverse();s--;){var u=r[s];if("function"!=typeof u)throw new Nt(e);if(o&&!a&&"wrapper"==os(u))var a=new Xn([],!0)}for(s=a?s:i;++s<i;){var h=os(u=r[s]),l="wrapper"==h?ss(u):t;a=l&&bs(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?a[os(l[0])].apply(a,l[3]):1==u.length&&bs(u)?a[h]():a.thru(u)}return function(){var t=arguments,e=t[0];if(a&&1==t.length&&Wo(e))return a.plant(e).value();for(var n=0,s=i?r[n].apply(this,t):e;++n<i;)s=r[n].call(this,s);return s}}))}function $i(e,n,r,i,s,o,a,h,l,c){var f=n&u,d=1&n,p=2&n,m=24&n,g=512&n,y=p?t:Pi(e);return function u(){for(var _=arguments.length,v=ot(_),w=_;w--;)v[w]=arguments[w];if(m)var b=us(u),x=function(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}(v,b);if(i&&(v=Ci(v,i,s,m)),o&&(v=Ai(v,o,a,m)),_-=x,m&&_<c){var E=ln(v,b);return Wi(e,n,$i,u.placeholder,r,v,E,h,l,c-_)}var O=d?r:this,M=p?O[e]:e;return _=v.length,h?v=function(e,n){for(var r=e.length,i=vn(n.length,r),s=Si(e);i--;){var o=n[i];e[i]=_s(o,r)?s[o]:t}return e}(v,h):g&&_>1&&v.reverse(),f&&l<_&&(v.length=l),this&&this!==pe&&this instanceof u&&(M=y||Pi(M)),M.apply(O,v)}}function Yi(t,e){return function(n,r){return function(t,e,n,r){return wr(t,(function(t,i,s){e(r,n(t),i,s)})),r}(n,t,e(r),{})}}function Gi(e,n){return function(r,i){var s;if(r===t&&i===t)return n;if(r!==t&&(s=r),i!==t){if(s===t)return i;"string"==typeof r||"string"==typeof i?(r=hi(r),i=hi(i)):(r=ai(r),i=ai(i)),s=e(r,i)}return s}}function Xi(t){return ns((function(e){return e=Re(e,Je(as())),Zr((function(n){var r=this;return t(e,(function(t){return ke(t,r,n)}))}))}))}function Bi(e,n){var r=(n=n===t?" ":hi(n)).length;if(r<2)return r?Ur(n,e):n;var i=Ur(n,me(e/fn(n)));return un(n)?bi(dn(i),0,e).join(""):i.slice(0,e)}function qi(e){return function(n,r,i){return i&&"number"!=typeof i&&vs(n,r,i)&&(r=i=t),n=gu(n),r===t?(r=n,n=0):r=gu(r),function(t,e,n,r){for(var i=-1,s=_n(me((e-t)/(n||1)),0),o=ot(s);s--;)o[r?s:++i]=t,t+=n;return o}(n,r,i=i===t?n<r?1:-1:gu(i),e)}}function Vi(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=vu(e),n=vu(n)),t(e,n)}}function Wi(e,n,r,i,u,a,h,l,c,f){var d=8&n;n|=d?s:o,4&(n&=~(d?o:s))||(n&=-4);var p=[e,n,u,d?a:t,d?h:t,d?t:a,d?t:h,l,c,f],m=r.apply(t,p);return bs(e)&&Ss(m,p),m.placeholder=i,Ts(m,e,n)}function Hi(t){var e=kt[t];return function(t,n){if(t=vu(t),(n=null==n?0:vn(yu(n),292))&&Fe(t)){var r=(bu(t)+"e").split("e");return+((r=(bu(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}}var Ui=Cn&&1/cn(new Cn([,-0]))[1]==h?function(t){return new Cn(t)}:ca;function Zi(t){return function(e){var n=ps(e);return n==b?an(e):n==k?function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=[t,t]})),n}(e):function(t,e){return Re(e,(function(e){return[e,t[e]]}))}(e,t(e))}}function Qi(n,h,l,c,f,d,p,m){var g=2&h;if(!g&&"function"!=typeof n)throw new Nt(e);var y=c?c.length:0;if(y||(h&=-97,c=f=t),p=p===t?p:_n(yu(p),0),m=m===t?m:yu(m),y-=f?f.length:0,h&o){var _=c,v=f;c=f=t}var w=g?t:ss(n),b=[n,h,l,c,f,_,v,d,p,m];if(w&&function(t,e){var n=t[1],i=e[1],s=n|i,o=s<131,h=i==u&&8==n||i==u&&n==a&&t[7].length<=e[8]||384==i&&e[7].length<=e[8]&&8==n;if(!o&&!h)return t;1&i&&(t[2]=e[2],s|=1&n?0:4);var l=e[3];if(l){var c=t[3];t[3]=c?Ci(c,l,e[4]):l,t[4]=c?ln(t[3],r):e[4]}(l=e[5])&&(c=t[5],t[5]=c?Ai(c,l,e[6]):l,t[6]=c?ln(t[5],r):e[6]),(l=e[7])&&(t[7]=l),i&u&&(t[8]=null==t[8]?e[8]:vn(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=s}(b,w),n=b[0],h=b[1],l=b[2],c=b[3],f=b[4],!(m=b[9]=b[9]===t?g?0:n.length:_n(b[9]-y,0))&&24&h&&(h&=-25),h&&1!=h)x=8==h||h==i?function(e,n,r){var i=Pi(e);return function s(){for(var o=arguments.length,u=ot(o),a=o,h=us(s);a--;)u[a]=arguments[a];var l=o<3&&u[0]!==h&&u[o-1]!==h?[]:ln(u,h);return(o-=l.length)<r?Wi(e,n,$i,s.placeholder,t,u,l,t,t,r-o):ke(this&&this!==pe&&this instanceof s?i:e,this,u)}}(n,h,m):h!=s&&33!=h||f.length?$i.apply(t,b):function(t,e,n,r){var i=1&e,s=Pi(t);return function e(){for(var o=-1,u=arguments.length,a=-1,h=r.length,l=ot(h+u),c=this&&this!==pe&&this instanceof e?s:t;++a<h;)l[a]=r[a];for(;u--;)l[a++]=arguments[++o];return ke(c,i?n:this,l)}}(n,h,l,c);else var x=function(t,e,n){var r=1&e,i=Pi(t);return function e(){return(this&&this!==pe&&this instanceof e?i:t).apply(r?n:this,arguments)}}(n,h,l);return Ts((w?ti:Ss)(x,b),n,h)}function Ji(e,n,r,i){return e===t||Xo(e,It[r])&&!zt.call(i,r)?n:e}function Ki(e,n,r,i,s,o){return ru(e)&&ru(n)&&(o.set(n,e),Gr(e,n,t,Ki,o),o.delete(n)),e}function ts(e){return uu(e)?t:e}function es(e,n,r,i,s,o){var u=1&r,a=e.length,h=n.length;if(a!=h&&!(u&&h>a))return!1;var l=o.get(e),c=o.get(n);if(l&&c)return l==n&&c==e;var f=-1,d=!0,p=2&r?new Hn:t;for(o.set(e,n),o.set(n,e);++f<a;){var m=e[f],g=n[f];if(i)var y=u?i(g,m,f,n,e,o):i(m,g,f,e,n,o);if(y!==t){if(y)continue;d=!1;break}if(p){if(!De(n,(function(t,e){if(!tn(p,e)&&(m===t||s(m,t,r,i,o)))return p.push(e)}))){d=!1;break}}else if(m!==g&&!s(m,g,r,i,o)){d=!1;break}}return o.delete(e),o.delete(n),d}function ns(e){return js(ks(e,t,Ws),e+"")}function rs(t){return Or(t,Ru,fs)}function is(t){return Or(t,Lu,ds)}var ss=Nn?function(t){return Nn.get(t)}:ca;function os(t){for(var e=t.name+"",n=jn[e],r=zt.call(jn,e)?n.length:0;r--;){var i=n[r],s=i.func;if(null==s||s==t)return i.name}return e}function us(t){return(zt.call($n,"placeholder")?$n:t).placeholder}function as(){var t=$n.iteratee||ua;return t=t===ua?Lr:t,arguments.length?t(arguments[0],arguments[1]):t}function hs(t,e){var n,r,i=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map}function ls(t){for(var e=Ru(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,Os(i)]}return e}function cs(e,n){var r=function(e,n){return null==e?t:e[n]}(e,n);return Rr(r)?r:t}var fs=_e?function(t){return null==t?[]:(t=Ct(t),je(_e(t),(function(e){return Ut.call(t,e)})))}:_a,ds=_e?function(t){for(var e=[];t;)Le(e,fs(t)),t=Wt(t);return e}:_a,ps=Mr;function ms(t,e,n){for(var r=-1,i=(e=vi(e,t)).length,s=!1;++r<i;){var o=Fs(e[r]);if(!(s=null!=t&&n(t,o)))break;t=t[o]}return s||++r!=i?s:!!(i=null==t?0:t.length)&&nu(i)&&_s(o,i)&&(Wo(t)||Vo(t))}function gs(t){return"function"!=typeof t.constructor||Es(t)?{}:Yn(Wt(t))}function ys(t){return Wo(t)||Vo(t)||!!(Qt&&t&&t[Qt])}function _s(t,e){var n=typeof t;return!!(e=null==e?l:e)&&("number"==n||"symbol"!=n&&vt.test(t))&&t>-1&&t%1==0&&t<e}function vs(t,e,n){if(!ru(n))return!1;var r=typeof e;return!!("number"==r?Uo(n)&&_s(e,n.length):"string"==r&&e in n)&&Xo(n[e],t)}function ws(t,e){if(Wo(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!cu(t))||J.test(t)||!Q.test(t)||null!=e&&t in Ct(e)}function bs(t){var e=os(t),n=$n[e];if("function"!=typeof n||!(e in Bn.prototype))return!1;if(t===n)return!0;var r=ss(n);return!!r&&t===r[0]}(On&&ps(new On(new ArrayBuffer(1)))!=j||Mn&&ps(new Mn)!=b||kn&&ps(kn.resolve())!=O||Cn&&ps(new Cn)!=k||An&&ps(new An)!=S)&&(ps=function(e){var n=Mr(e),r=n==E?e.constructor:t,i=r?$s(r):"";if(i)switch(i){case Tn:return j;case In:return b;case Rn:return O;case Ln:return k;case zn:return S}return n});var xs=Rt?tu:va;function Es(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||It)}function Os(t){return t==t&&!ru(t)}function Ms(e,n){return function(r){return null!=r&&r[e]===n&&(n!==t||e in Ct(r))}}function ks(e,n,r){return n=_n(n===t?e.length-1:n,0),function(){for(var t=arguments,i=-1,s=_n(t.length-n,0),o=ot(s);++i<s;)o[i]=t[n+i];i=-1;for(var u=ot(n+1);++i<n;)u[i]=t[i];return u[n]=r(o),ke(e,this,u)}}function Cs(t,e){return e.length<2?t:Er(t,ri(e,0,-1))}function As(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var Ss=Is(ti),Ns=de||function(t,e){return pe.setTimeout(t,e)},js=Is(ei);function Ts(t,e,n){var r=e+"";return js(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(ut,"{\n/* [wrapped with "+e+"] */\n")}(r,function(t,e){return Ae(d,(function(n){var r="_."+n[0];e&n[1]&&!Te(t,r)&&t.push(r)})),t.sort()}(function(t){var e=t.match(at);return e?e[1].split(ht):[]}(r),n)))}function Is(e){var n=0,r=0;return function(){var i=wn(),s=16-(i-r);if(r=i,s>0){if(++n>=800)return arguments[0]}else n=0;return e.apply(t,arguments)}}function Rs(e,n){var r=-1,i=e.length,s=i-1;for(n=n===t?i:n;++r<n;){var o=Hr(r,s),u=e[o];e[o]=e[r],e[r]=u}return e.length=n,e}var Ls,zs,Ps,Ds=(Ls=function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(K,(function(t,n,r,i){e.push(r?i.replace(ft,"$1"):n||t)})),e},zs=Po(Ls,(function(t){return 500===Ps.size&&Ps.clear(),t})),Ps=zs.cache,zs);function Fs(t){if("string"==typeof t||cu(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function $s(t){if(null!=t){try{return Lt.call(t)}catch(e){}try{return t+""}catch(e){}}return""}function Ys(t){if(t instanceof Bn)return t.clone();var e=new Xn(t.__wrapped__,t.__chain__);return e.__actions__=Si(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var Gs=Zr((function(t,e){return Zo(t)?cr(t,yr(e,1,Zo,!0)):[]})),Xs=Zr((function(e,n){var r=Js(n);return Zo(r)&&(r=t),Zo(e)?cr(e,yr(n,1,Zo,!0),as(r,2)):[]})),Bs=Zr((function(e,n){var r=Js(n);return Zo(r)&&(r=t),Zo(e)?cr(e,yr(n,1,Zo,!0),t,r):[]}));function qs(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:yu(n);return i<0&&(i=_n(r+i,0)),Ye(t,as(e,3),i)}function Vs(e,n,r){var i=null==e?0:e.length;if(!i)return-1;var s=i-1;return r!==t&&(s=yu(r),s=r<0?_n(i+s,0):vn(s,i-1)),Ye(e,as(n,3),s,!0)}function Ws(t){return null!=t&&t.length?yr(t,1):[]}function Hs(e){return e&&e.length?e[0]:t}var Us=Zr((function(t){var e=Re(t,yi);return e.length&&e[0]===t[0]?Sr(e):[]})),Zs=Zr((function(e){var n=Js(e),r=Re(e,yi);return n===Js(r)?n=t:r.pop(),r.length&&r[0]===e[0]?Sr(r,as(n,2)):[]})),Qs=Zr((function(e){var n=Js(e),r=Re(e,yi);return(n="function"==typeof n?n:t)&&r.pop(),r.length&&r[0]===e[0]?Sr(r,t,n):[]}));function Js(e){var n=null==e?0:e.length;return n?e[n-1]:t}var Ks=Zr(to);function to(t,e){return t&&t.length&&e&&e.length?Vr(t,e):t}var eo=ns((function(t,e){var n=null==t?0:t.length,r=or(t,e);return Wr(t,Re(e,(function(t){return _s(t,n)?+t:t})).sort(ki)),r}));function no(t){return null==t?t:En.call(t)}var ro=Zr((function(t){return li(yr(t,1,Zo,!0))})),io=Zr((function(e){var n=Js(e);return Zo(n)&&(n=t),li(yr(e,1,Zo,!0),as(n,2))})),so=Zr((function(e){var n=Js(e);return n="function"==typeof n?n:t,li(yr(e,1,Zo,!0),t,n)}));function oo(t){if(!t||!t.length)return[];var e=0;return t=je(t,(function(t){if(Zo(t))return e=_n(t.length,e),!0})),Ze(e,(function(e){return Re(t,Ve(e))}))}function uo(e,n){if(!e||!e.length)return[];var r=oo(e);return null==n?r:Re(r,(function(e){return ke(n,t,e)}))}var ao=Zr((function(t,e){return Zo(t)?cr(t,e):[]})),ho=Zr((function(t){return mi(je(t,Zo))})),lo=Zr((function(e){var n=Js(e);return Zo(n)&&(n=t),mi(je(e,Zo),as(n,2))})),co=Zr((function(e){var n=Js(e);return n="function"==typeof n?n:t,mi(je(e,Zo),t,n)})),fo=Zr(oo),po=Zr((function(e){var n=e.length,r=n>1?e[n-1]:t;return r="function"==typeof r?(e.pop(),r):t,uo(e,r)}));function mo(t){var e=$n(t);return e.__chain__=!0,e}function go(t,e){return e(t)}var yo=ns((function(e){var n=e.length,r=n?e[0]:0,i=this.__wrapped__,s=function(t){return or(t,e)};return!(n>1||this.__actions__.length)&&i instanceof Bn&&_s(r)?((i=i.slice(r,+r+(n?1:0))).__actions__.push({func:go,args:[s],thisArg:t}),new Xn(i,this.__chain__).thru((function(e){return n&&!e.length&&e.push(t),e}))):this.thru(s)})),_o=ji((function(t,e,n){zt.call(t,n)?++t[n]:sr(t,n,1)})),vo=Di(qs),wo=Di(Vs);function bo(t,e){return(Wo(t)?Ae:fr)(t,as(e,3))}function xo(t,e){return(Wo(t)?Se:dr)(t,as(e,3))}var Eo=ji((function(t,e,n){zt.call(t,n)?t[n].push(e):sr(t,n,[e])})),Oo=Zr((function(t,e,n){var r=-1,i="function"==typeof e,s=Uo(t)?ot(t.length):[];return fr(t,(function(t){s[++r]=i?ke(e,t,n):Nr(t,e,n)})),s})),Mo=ji((function(t,e,n){sr(t,n,e)}));function ko(t,e){return(Wo(t)?Re:Fr)(t,as(e,3))}var Co=ji((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]})),Ao=Zr((function(t,e){if(null==t)return[];var n=e.length;return n>1&&vs(t,e[0],e[1])?e=[]:n>2&&vs(e[0],e[1],e[2])&&(e=[e[0]]),Br(t,yr(e,1),[])})),So=fe||function(){return pe.Date.now()};function No(e,n,r){return n=r?t:n,n=e&&null==n?e.length:n,Qi(e,u,t,t,t,t,n)}function jo(n,r){var i;if("function"!=typeof r)throw new Nt(e);return n=yu(n),function(){return--n>0&&(i=r.apply(this,arguments)),n<=1&&(r=t),i}}var To=Zr((function(t,e,n){var r=1;if(n.length){var i=ln(n,us(To));r|=s}return Qi(t,r,e,n,i)})),Io=Zr((function(t,e,n){var r=3;if(n.length){var i=ln(n,us(Io));r|=s}return Qi(e,r,t,n,i)}));function Ro(n,r,i){var s,o,u,a,h,l,c=0,f=!1,d=!1,p=!0;if("function"!=typeof n)throw new Nt(e);function m(e){var r=s,i=o;return s=o=t,c=e,a=n.apply(i,r)}function g(e){var n=e-l;return l===t||n>=r||n<0||d&&e-c>=u}function y(){var t=So();if(g(t))return _(t);h=Ns(y,function(t){var e=r-(t-l);return d?vn(e,u-(t-c)):e}(t))}function _(e){return h=t,p&&s?m(e):(s=o=t,a)}function v(){var e=So(),n=g(e);if(s=arguments,o=this,l=e,n){if(h===t)return function(t){return c=t,h=Ns(y,r),f?m(t):a}(l);if(d)return xi(h),h=Ns(y,r),m(l)}return h===t&&(h=Ns(y,r)),a}return r=vu(r)||0,ru(i)&&(f=!!i.leading,u=(d="maxWait"in i)?_n(vu(i.maxWait)||0,r):u,p="trailing"in i?!!i.trailing:p),v.cancel=function(){h!==t&&xi(h),c=0,s=l=o=h=t},v.flush=function(){return h===t?a:_(So())},v}var Lo=Zr((function(t,e){return lr(t,1,e)})),zo=Zr((function(t,e,n){return lr(t,vu(e)||0,n)}));function Po(t,n){if("function"!=typeof t||null!=n&&"function"!=typeof n)throw new Nt(e);var r=function(){var e=arguments,i=n?n.apply(this,e):e[0],s=r.cache;if(s.has(i))return s.get(i);var o=t.apply(this,e);return r.cache=s.set(i,o)||s,o};return r.cache=new(Po.Cache||Wn),r}function Do(t){if("function"!=typeof t)throw new Nt(e);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}Po.Cache=Wn;var Fo=wi((function(t,e){var n=(e=1==e.length&&Wo(e[0])?Re(e[0],Je(as())):Re(yr(e,1),Je(as()))).length;return Zr((function(r){for(var i=-1,s=vn(r.length,n);++i<s;)r[i]=e[i].call(this,r[i]);return ke(t,this,r)}))})),$o=Zr((function(e,n){var r=ln(n,us($o));return Qi(e,s,t,n,r)})),Yo=Zr((function(e,n){var r=ln(n,us(Yo));return Qi(e,o,t,n,r)})),Go=ns((function(e,n){return Qi(e,a,t,t,t,n)}));function Xo(t,e){return t===e||t!=t&&e!=e}var Bo=Vi(kr),qo=Vi((function(t,e){return t>=e})),Vo=jr(function(){return arguments}())?jr:function(t){return iu(t)&&zt.call(t,"callee")&&!Ut.call(t,"callee")},Wo=ot.isArray,Ho=we?Je(we):function(t){return iu(t)&&Mr(t)==N};function Uo(t){return null!=t&&nu(t.length)&&!tu(t)}function Zo(t){return iu(t)&&Uo(t)}var Qo=ve||va,Jo=be?Je(be):function(t){return iu(t)&&Mr(t)==y};function Ko(t){if(!iu(t))return!1;var e=Mr(t);return e==_||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!uu(t)}function tu(t){if(!ru(t))return!1;var e=Mr(t);return e==v||e==w||"[object AsyncFunction]"==e||"[object Proxy]"==e}function eu(t){return"number"==typeof t&&t==yu(t)}function nu(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=l}function ru(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function iu(t){return null!=t&&"object"==typeof t}var su=xe?Je(xe):function(t){return iu(t)&&ps(t)==b};function ou(t){return"number"==typeof t||iu(t)&&Mr(t)==x}function uu(t){if(!iu(t)||Mr(t)!=E)return!1;var e=Wt(t);if(null===e)return!0;var n=zt.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Lt.call(n)==$t}var au=Ee?Je(Ee):function(t){return iu(t)&&Mr(t)==M},hu=Oe?Je(Oe):function(t){return iu(t)&&ps(t)==k};function lu(t){return"string"==typeof t||!Wo(t)&&iu(t)&&Mr(t)==C}function cu(t){return"symbol"==typeof t||iu(t)&&Mr(t)==A}var fu=Me?Je(Me):function(t){return iu(t)&&nu(t.length)&&!!ue[Mr(t)]},du=Vi(Dr),pu=Vi((function(t,e){return t<=e}));function mu(t){if(!t)return[];if(Uo(t))return lu(t)?dn(t):Si(t);if(Jt&&t[Jt])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[Jt]());var e=ps(t);return(e==b?an:e==k?cn:Xu)(t)}function gu(t){return t?(t=vu(t))===h||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function yu(t){var e=gu(t),n=e%1;return e==e?n?e-n:e:0}function _u(t){return t?ur(yu(t),0,f):0}function vu(t){if("number"==typeof t)return t;if(cu(t))return c;if(ru(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=ru(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Qe(t);var n=gt.test(t);return n||_t.test(t)?ce(t.slice(2),n?2:8):mt.test(t)?c:+t}function wu(t){return Ni(t,Lu(t))}function bu(t){return null==t?"":hi(t)}var xu=Ti((function(t,e){if(Es(e)||Uo(e))Ni(e,Ru(e),t);else for(var n in e)zt.call(e,n)&&er(t,n,e[n])})),Eu=Ti((function(t,e){Ni(e,Lu(e),t)})),Ou=Ti((function(t,e,n,r){Ni(e,Lu(e),t,r)})),Mu=Ti((function(t,e,n,r){Ni(e,Ru(e),t,r)})),ku=ns(or),Cu=Zr((function(e,n){e=Ct(e);var r=-1,i=n.length,s=i>2?n[2]:t;for(s&&vs(n[0],n[1],s)&&(i=1);++r<i;)for(var o=n[r],u=Lu(o),a=-1,h=u.length;++a<h;){var l=u[a],c=e[l];(c===t||Xo(c,It[l])&&!zt.call(e,l))&&(e[l]=o[l])}return e})),Au=Zr((function(e){return e.push(t,Ki),ke(Pu,t,e)}));function Su(e,n,r){var i=null==e?t:Er(e,n);return i===t?r:i}function Nu(t,e){return null!=t&&ms(t,e,Ar)}var ju=Yi((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Ft.call(e)),t[e]=n}),ra(oa)),Tu=Yi((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Ft.call(e)),zt.call(t,e)?t[e].push(n):t[e]=[n]}),as),Iu=Zr(Nr);function Ru(t){return Uo(t)?Zn(t):zr(t)}function Lu(t){return Uo(t)?Zn(t,!0):Pr(t)}var zu=Ti((function(t,e,n){Gr(t,e,n)})),Pu=Ti((function(t,e,n,r){Gr(t,e,n,r)})),Du=ns((function(t,e){var n={};if(null==t)return n;var r=!1;e=Re(e,(function(e){return e=vi(e,t),r||(r=e.length>1),e})),Ni(t,is(t),n),r&&(n=ar(n,7,ts));for(var i=e.length;i--;)ci(n,e[i]);return n})),Fu=ns((function(t,e){return null==t?{}:function(t,e){return qr(t,e,(function(e,n){return Nu(t,n)}))}(t,e)}));function $u(t,e){if(null==t)return{};var n=Re(is(t),(function(t){return[t]}));return e=as(e),qr(t,n,(function(t,n){return e(t,n[0])}))}var Yu=Zi(Ru),Gu=Zi(Lu);function Xu(t){return null==t?[]:Ke(t,Ru(t))}var Bu=zi((function(t,e,n){return e=e.toLowerCase(),t+(n?qu(e):e)}));function qu(t){return Ku(bu(t).toLowerCase())}function Vu(t){return(t=bu(t))&&t.replace(wt,rn).replace(te,"")}var Wu=zi((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),Hu=zi((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),Uu=Li("toLowerCase"),Zu=zi((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()})),Qu=zi((function(t,e,n){return t+(n?" ":"")+Ku(e)})),Ju=zi((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),Ku=Li("toUpperCase");function ta(e,n,r){return e=bu(e),(n=r?t:n)===t?function(t){return ie.test(t)}(e)?function(t){return t.match(ne)||[]}(e):function(t){return t.match(lt)||[]}(e):e.match(n)||[]}var ea=Zr((function(e,n){try{return ke(e,t,n)}catch(r){return Ko(r)?r:new Ot(r)}})),na=ns((function(t,e){return Ae(e,(function(e){e=Fs(e),sr(t,e,To(t[e],t))})),t}));function ra(t){return function(){return t}}var ia=Fi(),sa=Fi(!0);function oa(t){return t}function ua(t){return Lr("function"==typeof t?t:ar(t,1))}var aa=Zr((function(t,e){return function(n){return Nr(n,t,e)}})),ha=Zr((function(t,e){return function(n){return Nr(t,n,e)}}));function la(t,e,n){var r=Ru(e),i=xr(e,r);null!=n||ru(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=xr(e,Ru(e)));var s=!(ru(n)&&"chain"in n&&!n.chain),o=tu(t);return Ae(i,(function(n){var r=e[n];t[n]=r,o&&(t.prototype[n]=function(){var e=this.__chain__;if(s||e){var n=t(this.__wrapped__);return(n.__actions__=Si(this.__actions__)).push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,Le([this.value()],arguments))})})),t}function ca(){}var fa=Xi(Re),da=Xi(Ne),pa=Xi(De);function ma(t){return ws(t)?Ve(Fs(t)):function(t){return function(e){return Er(e,t)}}(t)}var ga=qi(),ya=qi(!0);function _a(){return[]}function va(){return!1}var wa,ba=Gi((function(t,e){return t+e}),0),xa=Hi("ceil"),Ea=Gi((function(t,e){return t/e}),1),Oa=Hi("floor"),Ma=Gi((function(t,e){return t*e}),1),ka=Hi("round"),Ca=Gi((function(t,e){return t-e}),0);return $n.after=function(t,n){if("function"!=typeof n)throw new Nt(e);return t=yu(t),function(){if(--t<1)return n.apply(this,arguments)}},$n.ary=No,$n.assign=xu,$n.assignIn=Eu,$n.assignInWith=Ou,$n.assignWith=Mu,$n.at=ku,$n.before=jo,$n.bind=To,$n.bindAll=na,$n.bindKey=Io,$n.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Wo(t)?t:[t]},$n.chain=mo,$n.chunk=function(e,n,r){n=(r?vs(e,n,r):n===t)?1:_n(yu(n),0);var i=null==e?0:e.length;if(!i||n<1)return[];for(var s=0,o=0,u=ot(me(i/n));s<i;)u[o++]=ri(e,s,s+=n);return u},$n.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,i=[];++e<n;){var s=t[e];s&&(i[r++]=s)}return i},$n.concat=function(){var t=arguments.length;if(!t)return[];for(var e=ot(t-1),n=arguments[0],r=t;r--;)e[r-1]=arguments[r];return Le(Wo(n)?Si(n):[n],yr(e,1))},$n.cond=function(t){var n=null==t?0:t.length,r=as();return t=n?Re(t,(function(t){if("function"!=typeof t[1])throw new Nt(e);return[r(t[0]),t[1]]})):[],Zr((function(e){for(var r=-1;++r<n;){var i=t[r];if(ke(i[0],this,e))return ke(i[1],this,e)}}))},$n.conforms=function(t){return function(t){var e=Ru(t);return function(n){return hr(n,t,e)}}(ar(t,1))},$n.constant=ra,$n.countBy=_o,$n.create=function(t,e){var n=Yn(t);return null==e?n:ir(n,e)},$n.curry=function e(n,r,i){var s=Qi(n,8,t,t,t,t,t,r=i?t:r);return s.placeholder=e.placeholder,s},$n.curryRight=function e(n,r,s){var o=Qi(n,i,t,t,t,t,t,r=s?t:r);return o.placeholder=e.placeholder,o},$n.debounce=Ro,$n.defaults=Cu,$n.defaultsDeep=Au,$n.defer=Lo,$n.delay=zo,$n.difference=Gs,$n.differenceBy=Xs,$n.differenceWith=Bs,$n.drop=function(e,n,r){var i=null==e?0:e.length;return i?ri(e,(n=r||n===t?1:yu(n))<0?0:n,i):[]},$n.dropRight=function(e,n,r){var i=null==e?0:e.length;return i?ri(e,0,(n=i-(n=r||n===t?1:yu(n)))<0?0:n):[]},$n.dropRightWhile=function(t,e){return t&&t.length?di(t,as(e,3),!0,!0):[]},$n.dropWhile=function(t,e){return t&&t.length?di(t,as(e,3),!0):[]},$n.fill=function(e,n,r,i){var s=null==e?0:e.length;return s?(r&&"number"!=typeof r&&vs(e,n,r)&&(r=0,i=s),function(e,n,r,i){var s=e.length;for((r=yu(r))<0&&(r=-r>s?0:s+r),(i=i===t||i>s?s:yu(i))<0&&(i+=s),i=r>i?0:_u(i);r<i;)e[r++]=n;return e}(e,n,r,i)):[]},$n.filter=function(t,e){return(Wo(t)?je:gr)(t,as(e,3))},$n.flatMap=function(t,e){return yr(ko(t,e),1)},$n.flatMapDeep=function(t,e){return yr(ko(t,e),h)},$n.flatMapDepth=function(e,n,r){return r=r===t?1:yu(r),yr(ko(e,n),r)},$n.flatten=Ws,$n.flattenDeep=function(t){return null!=t&&t.length?yr(t,h):[]},$n.flattenDepth=function(e,n){return null!=e&&e.length?yr(e,n=n===t?1:yu(n)):[]},$n.flip=function(t){return Qi(t,512)},$n.flow=ia,$n.flowRight=sa,$n.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var i=t[e];r[i[0]]=i[1]}return r},$n.functions=function(t){return null==t?[]:xr(t,Ru(t))},$n.functionsIn=function(t){return null==t?[]:xr(t,Lu(t))},$n.groupBy=Eo,$n.initial=function(t){return null!=t&&t.length?ri(t,0,-1):[]},$n.intersection=Us,$n.intersectionBy=Zs,$n.intersectionWith=Qs,$n.invert=ju,$n.invertBy=Tu,$n.invokeMap=Oo,$n.iteratee=ua,$n.keyBy=Mo,$n.keys=Ru,$n.keysIn=Lu,$n.map=ko,$n.mapKeys=function(t,e){var n={};return e=as(e,3),wr(t,(function(t,r,i){sr(n,e(t,r,i),t)})),n},$n.mapValues=function(t,e){var n={};return e=as(e,3),wr(t,(function(t,r,i){sr(n,r,e(t,r,i))})),n},$n.matches=function(t){return $r(ar(t,1))},$n.matchesProperty=function(t,e){return Yr(t,ar(e,1))},$n.memoize=Po,$n.merge=zu,$n.mergeWith=Pu,$n.method=aa,$n.methodOf=ha,$n.mixin=la,$n.negate=Do,$n.nthArg=function(t){return t=yu(t),Zr((function(e){return Xr(e,t)}))},$n.omit=Du,$n.omitBy=function(t,e){return $u(t,Do(as(e)))},$n.once=function(t){return jo(2,t)},$n.orderBy=function(e,n,r,i){return null==e?[]:(Wo(n)||(n=null==n?[]:[n]),Wo(r=i?t:r)||(r=null==r?[]:[r]),Br(e,n,r))},$n.over=fa,$n.overArgs=Fo,$n.overEvery=da,$n.overSome=pa,$n.partial=$o,$n.partialRight=Yo,$n.partition=Co,$n.pick=Fu,$n.pickBy=$u,$n.property=ma,$n.propertyOf=function(e){return function(n){return null==e?t:Er(e,n)}},$n.pull=Ks,$n.pullAll=to,$n.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?Vr(t,e,as(n,2)):t},$n.pullAllWith=function(e,n,r){return e&&e.length&&n&&n.length?Vr(e,n,t,r):e},$n.pullAt=eo,$n.range=ga,$n.rangeRight=ya,$n.rearg=Go,$n.reject=function(t,e){return(Wo(t)?je:gr)(t,Do(as(e,3)))},$n.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,i=[],s=t.length;for(e=as(e,3);++r<s;){var o=t[r];e(o,r,t)&&(n.push(o),i.push(r))}return Wr(t,i),n},$n.rest=function(n,r){if("function"!=typeof n)throw new Nt(e);return Zr(n,r=r===t?r:yu(r))},$n.reverse=no,$n.sampleSize=function(e,n,r){return n=(r?vs(e,n,r):n===t)?1:yu(n),(Wo(e)?Jn:Jr)(e,n)},$n.set=function(t,e,n){return null==t?t:Kr(t,e,n)},$n.setWith=function(e,n,r,i){return i="function"==typeof i?i:t,null==e?e:Kr(e,n,r,i)},$n.shuffle=function(t){return(Wo(t)?Kn:ni)(t)},$n.slice=function(e,n,r){var i=null==e?0:e.length;return i?(r&&"number"!=typeof r&&vs(e,n,r)?(n=0,r=i):(n=null==n?0:yu(n),r=r===t?i:yu(r)),ri(e,n,r)):[]},$n.sortBy=Ao,$n.sortedUniq=function(t){return t&&t.length?ui(t):[]},$n.sortedUniqBy=function(t,e){return t&&t.length?ui(t,as(e,2)):[]},$n.split=function(e,n,r){return r&&"number"!=typeof r&&vs(e,n,r)&&(n=r=t),(r=r===t?f:r>>>0)?(e=bu(e))&&("string"==typeof n||null!=n&&!au(n))&&!(n=hi(n))&&un(e)?bi(dn(e),0,r):e.split(n,r):[]},$n.spread=function(t,n){if("function"!=typeof t)throw new Nt(e);return n=null==n?0:_n(yu(n),0),Zr((function(e){var r=e[n],i=bi(e,0,n);return r&&Le(i,r),ke(t,this,i)}))},$n.tail=function(t){var e=null==t?0:t.length;return e?ri(t,1,e):[]},$n.take=function(e,n,r){return e&&e.length?ri(e,0,(n=r||n===t?1:yu(n))<0?0:n):[]},$n.takeRight=function(e,n,r){var i=null==e?0:e.length;return i?ri(e,(n=i-(n=r||n===t?1:yu(n)))<0?0:n,i):[]},$n.takeRightWhile=function(t,e){return t&&t.length?di(t,as(e,3),!1,!0):[]},$n.takeWhile=function(t,e){return t&&t.length?di(t,as(e,3)):[]},$n.tap=function(t,e){return e(t),t},$n.throttle=function(t,n,r){var i=!0,s=!0;if("function"!=typeof t)throw new Nt(e);return ru(r)&&(i="leading"in r?!!r.leading:i,s="trailing"in r?!!r.trailing:s),Ro(t,n,{leading:i,maxWait:n,trailing:s})},$n.thru=go,$n.toArray=mu,$n.toPairs=Yu,$n.toPairsIn=Gu,$n.toPath=function(t){return Wo(t)?Re(t,Fs):cu(t)?[t]:Si(Ds(bu(t)))},$n.toPlainObject=wu,$n.transform=function(t,e,n){var r=Wo(t),i=r||Qo(t)||fu(t);if(e=as(e,4),null==n){var s=t&&t.constructor;n=i?r?new s:[]:ru(t)&&tu(s)?Yn(Wt(t)):{}}return(i?Ae:wr)(t,(function(t,r,i){return e(n,t,r,i)})),n},$n.unary=function(t){return No(t,1)},$n.union=ro,$n.unionBy=io,$n.unionWith=so,$n.uniq=function(t){return t&&t.length?li(t):[]},$n.uniqBy=function(t,e){return t&&t.length?li(t,as(e,2)):[]},$n.uniqWith=function(e,n){return n="function"==typeof n?n:t,e&&e.length?li(e,t,n):[]},$n.unset=function(t,e){return null==t||ci(t,e)},$n.unzip=oo,$n.unzipWith=uo,$n.update=function(t,e,n){return null==t?t:fi(t,e,_i(n))},$n.updateWith=function(e,n,r,i){return i="function"==typeof i?i:t,null==e?e:fi(e,n,_i(r),i)},$n.values=Xu,$n.valuesIn=function(t){return null==t?[]:Ke(t,Lu(t))},$n.without=ao,$n.words=ta,$n.wrap=function(t,e){return $o(_i(e),t)},$n.xor=ho,$n.xorBy=lo,$n.xorWith=co,$n.zip=fo,$n.zipObject=function(t,e){return gi(t||[],e||[],er)},$n.zipObjectDeep=function(t,e){return gi(t||[],e||[],Kr)},$n.zipWith=po,$n.entries=Yu,$n.entriesIn=Gu,$n.extend=Eu,$n.extendWith=Ou,la($n,$n),$n.add=ba,$n.attempt=ea,$n.camelCase=Bu,$n.capitalize=qu,$n.ceil=xa,$n.clamp=function(e,n,r){return r===t&&(r=n,n=t),r!==t&&(r=(r=vu(r))==r?r:0),n!==t&&(n=(n=vu(n))==n?n:0),ur(vu(e),n,r)},$n.clone=function(t){return ar(t,4)},$n.cloneDeep=function(t){return ar(t,5)},$n.cloneDeepWith=function(e,n){return ar(e,5,n="function"==typeof n?n:t)},$n.cloneWith=function(e,n){return ar(e,4,n="function"==typeof n?n:t)},$n.conformsTo=function(t,e){return null==e||hr(t,e,Ru(e))},$n.deburr=Vu,$n.defaultTo=function(t,e){return null==t||t!=t?e:t},$n.divide=Ea,$n.endsWith=function(e,n,r){e=bu(e),n=hi(n);var i=e.length,s=r=r===t?i:ur(yu(r),0,i);return(r-=n.length)>=0&&e.slice(r,s)==n},$n.eq=Xo,$n.escape=function(t){return(t=bu(t))&&W.test(t)?t.replace(q,sn):t},$n.escapeRegExp=function(t){return(t=bu(t))&&et.test(t)?t.replace(tt,"\\$&"):t},$n.every=function(e,n,r){var i=Wo(e)?Ne:pr;return r&&vs(e,n,r)&&(n=t),i(e,as(n,3))},$n.find=vo,$n.findIndex=qs,$n.findKey=function(t,e){return $e(t,as(e,3),wr)},$n.findLast=wo,$n.findLastIndex=Vs,$n.findLastKey=function(t,e){return $e(t,as(e,3),br)},$n.floor=Oa,$n.forEach=bo,$n.forEachRight=xo,$n.forIn=function(t,e){return null==t?t:_r(t,as(e,3),Lu)},$n.forInRight=function(t,e){return null==t?t:vr(t,as(e,3),Lu)},$n.forOwn=function(t,e){return t&&wr(t,as(e,3))},$n.forOwnRight=function(t,e){return t&&br(t,as(e,3))},$n.get=Su,$n.gt=Bo,$n.gte=qo,$n.has=function(t,e){return null!=t&&ms(t,e,Cr)},$n.hasIn=Nu,$n.head=Hs,$n.identity=oa,$n.includes=function(t,e,n,r){t=Uo(t)?t:Xu(t),n=n&&!r?yu(n):0;var i=t.length;return n<0&&(n=_n(i+n,0)),lu(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&Ge(t,e,n)>-1},$n.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:yu(n);return i<0&&(i=_n(r+i,0)),Ge(t,e,i)},$n.inRange=function(e,n,r){return n=gu(n),r===t?(r=n,n=0):r=gu(r),function(t,e,n){return t>=vn(e,n)&&t<_n(e,n)}(e=vu(e),n,r)},$n.invoke=Iu,$n.isArguments=Vo,$n.isArray=Wo,$n.isArrayBuffer=Ho,$n.isArrayLike=Uo,$n.isArrayLikeObject=Zo,$n.isBoolean=function(t){return!0===t||!1===t||iu(t)&&Mr(t)==g},$n.isBuffer=Qo,$n.isDate=Jo,$n.isElement=function(t){return iu(t)&&1===t.nodeType&&!uu(t)},$n.isEmpty=function(t){if(null==t)return!0;if(Uo(t)&&(Wo(t)||"string"==typeof t||"function"==typeof t.splice||Qo(t)||fu(t)||Vo(t)))return!t.length;var e=ps(t);if(e==b||e==k)return!t.size;if(Es(t))return!zr(t).length;for(var n in t)if(zt.call(t,n))return!1;return!0},$n.isEqual=function(t,e){return Tr(t,e)},$n.isEqualWith=function(e,n,r){var i=(r="function"==typeof r?r:t)?r(e,n):t;return i===t?Tr(e,n,t,r):!!i},$n.isError=Ko,$n.isFinite=function(t){return"number"==typeof t&&Fe(t)},$n.isFunction=tu,$n.isInteger=eu,$n.isLength=nu,$n.isMap=su,$n.isMatch=function(t,e){return t===e||Ir(t,e,ls(e))},$n.isMatchWith=function(e,n,r){return r="function"==typeof r?r:t,Ir(e,n,ls(n),r)},$n.isNaN=function(t){return ou(t)&&t!=+t},$n.isNative=function(t){if(xs(t))throw new Ot("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Rr(t)},$n.isNil=function(t){return null==t},$n.isNull=function(t){return null===t},$n.isNumber=ou,$n.isObject=ru,$n.isObjectLike=iu,$n.isPlainObject=uu,$n.isRegExp=au,$n.isSafeInteger=function(t){return eu(t)&&t>=-9007199254740991&&t<=l},$n.isSet=hu,$n.isString=lu,$n.isSymbol=cu,$n.isTypedArray=fu,$n.isUndefined=function(e){return e===t},$n.isWeakMap=function(t){return iu(t)&&ps(t)==S},$n.isWeakSet=function(t){return iu(t)&&"[object WeakSet]"==Mr(t)},$n.join=function(t,e){return null==t?"":We.call(t,e)},$n.kebabCase=Wu,$n.last=Js,$n.lastIndexOf=function(e,n,r){var i=null==e?0:e.length;if(!i)return-1;var s=i;return r!==t&&(s=(s=yu(r))<0?_n(i+s,0):vn(s,i-1)),n==n?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(e,n,s):Ye(e,Be,s,!0)},$n.lowerCase=Hu,$n.lowerFirst=Uu,$n.lt=du,$n.lte=pu,$n.max=function(e){return e&&e.length?mr(e,oa,kr):t},$n.maxBy=function(e,n){return e&&e.length?mr(e,as(n,2),kr):t},$n.mean=function(t){return qe(t,oa)},$n.meanBy=function(t,e){return qe(t,as(e,2))},$n.min=function(e){return e&&e.length?mr(e,oa,Dr):t},$n.minBy=function(e,n){return e&&e.length?mr(e,as(n,2),Dr):t},$n.stubArray=_a,$n.stubFalse=va,$n.stubObject=function(){return{}},$n.stubString=function(){return""},$n.stubTrue=function(){return!0},$n.multiply=Ma,$n.nth=function(e,n){return e&&e.length?Xr(e,yu(n)):t},$n.noConflict=function(){return pe._===this&&(pe._=Yt),this},$n.noop=ca,$n.now=So,$n.pad=function(t,e,n){t=bu(t);var r=(e=yu(e))?fn(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return Bi(ge(i),n)+t+Bi(me(i),n)},$n.padEnd=function(t,e,n){t=bu(t);var r=(e=yu(e))?fn(t):0;return e&&r<e?t+Bi(e-r,n):t},$n.padStart=function(t,e,n){t=bu(t);var r=(e=yu(e))?fn(t):0;return e&&r<e?Bi(e-r,n)+t:t},$n.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),bn(bu(t).replace(nt,""),e||0)},$n.random=function(e,n,r){if(r&&"boolean"!=typeof r&&vs(e,n,r)&&(n=r=t),r===t&&("boolean"==typeof n?(r=n,n=t):"boolean"==typeof e&&(r=e,e=t)),e===t&&n===t?(e=0,n=1):(e=gu(e),n===t?(n=e,e=0):n=gu(n)),e>n){var i=e;e=n,n=i}if(r||e%1||n%1){var s=xn();return vn(e+s*(n-e+le("1e-"+((s+"").length-1))),n)}return Hr(e,n)},$n.reduce=function(t,e,n){var r=Wo(t)?ze:He,i=arguments.length<3;return r(t,as(e,4),n,i,fr)},$n.reduceRight=function(t,e,n){var r=Wo(t)?Pe:He,i=arguments.length<3;return r(t,as(e,4),n,i,dr)},$n.repeat=function(e,n,r){return n=(r?vs(e,n,r):n===t)?1:yu(n),Ur(bu(e),n)},$n.replace=function(){var t=arguments,e=bu(t[0]);return t.length<3?e:e.replace(t[1],t[2])},$n.result=function(e,n,r){var i=-1,s=(n=vi(n,e)).length;for(s||(s=1,e=t);++i<s;){var o=null==e?t:e[Fs(n[i])];o===t&&(i=s,o=r),e=tu(o)?o.call(e):o}return e},$n.round=ka,$n.runInContext=rt,$n.sample=function(t){return(Wo(t)?Qn:Qr)(t)},$n.size=function(t){if(null==t)return 0;if(Uo(t))return lu(t)?fn(t):t.length;var e=ps(t);return e==b||e==k?t.size:zr(t).length},$n.snakeCase=Zu,$n.some=function(e,n,r){var i=Wo(e)?De:ii;return r&&vs(e,n,r)&&(n=t),i(e,as(n,3))},$n.sortedIndex=function(t,e){return si(t,e)},$n.sortedIndexBy=function(t,e,n){return oi(t,e,as(n,2))},$n.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=si(t,e);if(r<n&&Xo(t[r],e))return r}return-1},$n.sortedLastIndex=function(t,e){return si(t,e,!0)},$n.sortedLastIndexBy=function(t,e,n){return oi(t,e,as(n,2),!0)},$n.sortedLastIndexOf=function(t,e){if(null!=t&&t.length){var n=si(t,e,!0)-1;if(Xo(t[n],e))return n}return-1},$n.startCase=Qu,$n.startsWith=function(t,e,n){return t=bu(t),n=null==n?0:ur(yu(n),0,t.length),e=hi(e),t.slice(n,n+e.length)==e},$n.subtract=Ca,$n.sum=function(t){return t&&t.length?Ue(t,oa):0},$n.sumBy=function(t,e){return t&&t.length?Ue(t,as(e,2)):0},$n.template=function(e,n,r){var i=$n.templateSettings;r&&vs(e,n,r)&&(n=t),e=bu(e),n=Ou({},n,i,Ji);var s,o,u=Ou({},n.imports,i.imports,Ji),a=Ru(u),h=Ke(u,a),l=0,c=n.interpolate||bt,f="__p += '",d=At((n.escape||bt).source+"|"+c.source+"|"+(c===Z?dt:bt).source+"|"+(n.evaluate||bt).source+"|$","g"),p="//# sourceURL="+(zt.call(n,"sourceURL")?(n.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++oe+"]")+"\n";e.replace(d,(function(t,n,r,i,u,a){return r||(r=i),f+=e.slice(l,a).replace(xt,on),n&&(s=!0,f+="' +\n__e("+n+") +\n'"),u&&(o=!0,f+="';\n"+u+";\n__p += '"),r&&(f+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=a+t.length,t})),f+="';\n";var m=zt.call(n,"variable")&&n.variable;if(m){if(ct.test(m))throw new Ot("Invalid `variable` option passed into `_.template`")}else f="with (obj) {\n"+f+"\n}\n";f=(o?f.replace(Y,""):f).replace(G,"$1").replace(X,"$1;"),f="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(s?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var g=ea((function(){return Mt(a,p+"return "+f).apply(t,h)}));if(g.source=f,Ko(g))throw g;return g},$n.times=function(t,e){if((t=yu(t))<1||t>l)return[];var n=f,r=vn(t,f);e=as(e),t-=f;for(var i=Ze(r,e);++n<t;)e(n);return i},$n.toFinite=gu,$n.toInteger=yu,$n.toLength=_u,$n.toLower=function(t){return bu(t).toLowerCase()},$n.toNumber=vu,$n.toSafeInteger=function(t){return t?ur(yu(t),-9007199254740991,l):0===t?t:0},$n.toString=bu,$n.toUpper=function(t){return bu(t).toUpperCase()},$n.trim=function(e,n,r){if((e=bu(e))&&(r||n===t))return Qe(e);if(!e||!(n=hi(n)))return e;var i=dn(e),s=dn(n);return bi(i,en(i,s),nn(i,s)+1).join("")},$n.trimEnd=function(e,n,r){if((e=bu(e))&&(r||n===t))return e.slice(0,pn(e)+1);if(!e||!(n=hi(n)))return e;var i=dn(e);return bi(i,0,nn(i,dn(n))+1).join("")},$n.trimStart=function(e,n,r){if((e=bu(e))&&(r||n===t))return e.replace(nt,"");if(!e||!(n=hi(n)))return e;var i=dn(e);return bi(i,en(i,dn(n))).join("")},$n.truncate=function(e,n){var r=30,i="...";if(ru(n)){var s="separator"in n?n.separator:s;r="length"in n?yu(n.length):r,i="omission"in n?hi(n.omission):i}var o=(e=bu(e)).length;if(un(e)){var u=dn(e);o=u.length}if(r>=o)return e;var a=r-fn(i);if(a<1)return i;var h=u?bi(u,0,a).join(""):e.slice(0,a);if(s===t)return h+i;if(u&&(a+=h.length-a),au(s)){if(e.slice(a).search(s)){var l,c=h;for(s.global||(s=At(s.source,bu(pt.exec(s))+"g")),s.lastIndex=0;l=s.exec(c);)var f=l.index;h=h.slice(0,f===t?a:f)}}else if(e.indexOf(hi(s),a)!=a){var d=h.lastIndexOf(s);d>-1&&(h=h.slice(0,d))}return h+i},$n.unescape=function(t){return(t=bu(t))&&V.test(t)?t.replace(B,mn):t},$n.uniqueId=function(t){var e=++Pt;return bu(t)+e},$n.upperCase=Ju,$n.upperFirst=Ku,$n.each=bo,$n.eachRight=xo,$n.first=Hs,la($n,(wa={},wr($n,(function(t,e){zt.call($n.prototype,e)||(wa[e]=t)})),wa),{chain:!1}),$n.VERSION="4.17.21",Ae(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){$n[t].placeholder=$n})),Ae(["drop","take"],(function(e,n){Bn.prototype[e]=function(r){r=r===t?1:_n(yu(r),0);var i=this.__filtered__&&!n?new Bn(this):this.clone();return i.__filtered__?i.__takeCount__=vn(r,i.__takeCount__):i.__views__.push({size:vn(r,f),type:e+(i.__dir__<0?"Right":"")}),i},Bn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),Ae(["filter","map","takeWhile"],(function(t,e){var n=e+1,r=1==n||3==n;Bn.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:as(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}})),Ae(["head","last"],(function(t,e){var n="take"+(e?"Right":"");Bn.prototype[t]=function(){return this[n](1).value()[0]}})),Ae(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");Bn.prototype[t]=function(){return this.__filtered__?new Bn(this):this[n](1)}})),Bn.prototype.compact=function(){return this.filter(oa)},Bn.prototype.find=function(t){return this.filter(t).head()},Bn.prototype.findLast=function(t){return this.reverse().find(t)},Bn.prototype.invokeMap=Zr((function(t,e){return"function"==typeof t?new Bn(this):this.map((function(n){return Nr(n,t,e)}))})),Bn.prototype.reject=function(t){return this.filter(Do(as(t)))},Bn.prototype.slice=function(e,n){e=yu(e);var r=this;return r.__filtered__&&(e>0||n<0)?new Bn(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),n!==t&&(r=(n=yu(n))<0?r.dropRight(-n):r.take(n-e)),r)},Bn.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Bn.prototype.toArray=function(){return this.take(f)},wr(Bn.prototype,(function(e,n){var r=/^(?:filter|find|map|reject)|While$/.test(n),i=/^(?:head|last)$/.test(n),s=$n[i?"take"+("last"==n?"Right":""):n],o=i||/^find/.test(n);s&&($n.prototype[n]=function(){var n=this.__wrapped__,u=i?[1]:arguments,a=n instanceof Bn,h=u[0],l=a||Wo(n),c=function(t){var e=s.apply($n,Le([t],u));return i&&f?e[0]:e};l&&r&&"function"==typeof h&&1!=h.length&&(a=l=!1);var f=this.__chain__,d=!!this.__actions__.length,p=o&&!f,m=a&&!d;if(!o&&l){n=m?n:new Bn(this);var g=e.apply(n,u);return g.__actions__.push({func:go,args:[c],thisArg:t}),new Xn(g,f)}return p&&m?e.apply(this,u):(g=this.thru(c),p?i?g.value()[0]:g.value():g)})})),Ae(["pop","push","shift","sort","splice","unshift"],(function(t){var e=jt[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);$n.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return e.apply(Wo(i)?i:[],t)}return this[n]((function(n){return e.apply(Wo(n)?n:[],t)}))}})),wr(Bn.prototype,(function(t,e){var n=$n[e];if(n){var r=n.name+"";zt.call(jn,r)||(jn[r]=[]),jn[r].push({name:e,func:n})}})),jn[$i(t,2).name]=[{name:"wrapper",func:t}],Bn.prototype.clone=function(){var t=new Bn(this.__wrapped__);return t.__actions__=Si(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Si(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Si(this.__views__),t},Bn.prototype.reverse=function(){if(this.__filtered__){var t=new Bn(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Bn.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=Wo(t),r=e<0,i=n?t.length:0,s=function(t,e,n){for(var r=-1,i=n.length;++r<i;){var s=n[r],o=s.size;switch(s.type){case"drop":t+=o;break;case"dropRight":e-=o;break;case"take":e=vn(e,t+o);break;case"takeRight":t=_n(t,e-o)}}return{start:t,end:e}}(0,i,this.__views__),o=s.start,u=s.end,a=u-o,h=r?u:o-1,l=this.__iteratees__,c=l.length,f=0,d=vn(a,this.__takeCount__);if(!n||!r&&i==a&&d==a)return pi(t,this.__actions__);var p=[];t:for(;a--&&f<d;){for(var m=-1,g=t[h+=e];++m<c;){var y=l[m],_=y.iteratee,v=y.type,w=_(g);if(2==v)g=w;else if(!w){if(1==v)continue t;break t}}p[f++]=g}return p},$n.prototype.at=yo,$n.prototype.chain=function(){return mo(this)},$n.prototype.commit=function(){return new Xn(this.value(),this.__chain__)},$n.prototype.next=function(){this.__values__===t&&(this.__values__=mu(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?t:this.__values__[this.__index__++]}},$n.prototype.plant=function(e){for(var n,r=this;r instanceof Gn;){var i=Ys(r);i.__index__=0,i.__values__=t,n?s.__wrapped__=i:n=i;var s=i;r=r.__wrapped__}return s.__wrapped__=e,n},$n.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Bn){var n=e;return this.__actions__.length&&(n=new Bn(this)),(n=n.reverse()).__actions__.push({func:go,args:[no],thisArg:t}),new Xn(n,this.__chain__)}return this.thru(no)},$n.prototype.toJSON=$n.prototype.valueOf=$n.prototype.value=function(){return pi(this.__wrapped__,this.__actions__)},$n.prototype.first=$n.prototype.head,Jt&&($n.prototype[Jt]=function(){return this}),$n}();ge?((ge.exports=gn)._=gn,me._=gn):pe._=gn}.call(st);const ut={},at=[];function ht(t,e){if(Array.isArray(t))for(const n of t)ht(n,e);else if("object"!=typeof t)ct(Object.getOwnPropertyNames(e)),ut[t]=Object.assign(ut[t]||{},e);else for(const n in t)ht(n,t[n])}function lt(t){return ut[t]||{}}function ct(t){at.push(...t)}function ft(t,e){let n;const r=t.length,i=[];for(n=0;n<r;n++)i.push(e(t[n]));return i}function dt(t){return t%360*Math.PI/180}function pt(t){return t.charAt(0).toUpperCase()+t.slice(1)}function mt(t,e,n,r){return null!=e&&null!=n||(r=r||t.bbox(),null==e?e=r.width/r.height*n:null==n&&(n=r.height/r.width*e)),{width:e,height:n}}function gt(t,e){const n=t.origin;let r=null!=t.ox?t.ox:null!=t.originX?t.originX:"center",i=null!=t.oy?t.oy:null!=t.originY?t.originY:"center";null!=n&&([r,i]=Array.isArray(n)?n:"object"==typeof n?[n.x,n.y]:[n,n]);const s="string"==typeof r,o="string"==typeof i;if(s||o){const{height:t,width:n,x:u,y:a}=e.bbox();s&&(r=r.includes("left")?u:r.includes("right")?u+n:u+n/2),o&&(i=i.includes("top")?a:i.includes("bottom")?a+t:a+t/2)}return[r,i]}const yt=new Set(["desc","metadata","title"]),_t=t=>yt.has(t.nodeName),vt=(t,e,n={})=>{const r={...e};for(const i in r)r[i].valueOf()===n[i]&&delete r[i];Object.keys(r).length?t.node.setAttribute("data-svgjs",JSON.stringify(r)):(t.node.removeAttribute("data-svgjs"),t.node.removeAttribute("svgjs:data"))},wt="http://www.w3.org/2000/svg",bt="http://www.w3.org/2000/xmlns/",xt="http://www.w3.org/1999/xlink",Et={window:"undefined"==typeof window?null:window,document:"undefined"==typeof document?null:document};let Ot=class{};const Mt={},kt="___SYMBOL___ROOT___";function Ct(t,e=wt){return Et.document.createElementNS(e,t)}function At(t,e=!1){if(t instanceof Ot)return t;if("object"==typeof t)return jt(t);if(null==t)return new Mt[kt];if("string"==typeof t&&"<"!==t.charAt(0))return jt(Et.document.querySelector(t));const n=e?Et.document.createElement("div"):Ct("svg");return n.innerHTML=t,t=jt(n.firstChild),n.removeChild(n.firstChild),t}function St(t,e){return e&&(e instanceof Et.window.Node||e.ownerDocument&&e instanceof e.ownerDocument.defaultView.Node)?e:Ct(t)}function Nt(t){if(!t)return null;if(t.instance instanceof Ot)return t.instance;if("#document-fragment"===t.nodeName)return new Mt.Fragment(t);let e=pt(t.nodeName||"Dom");return"LinearGradient"===e||"RadialGradient"===e?e="Gradient":Mt[e]||(e="Dom"),new Mt[e](t)}let jt=Nt;function Tt(t,e=t.name,n=!1){return Mt[e]=t,n&&(Mt[kt]=t),ct(Object.getOwnPropertyNames(t.prototype)),t}let It=1e3;function Rt(t){return"Svgjs"+pt(t)+It++}function Lt(t){for(let e=t.children.length-1;e>=0;e--)Lt(t.children[e]);return t.id?(t.id=Rt(t.nodeName),t):t}function zt(t,e){let n,r;for(r=(t=Array.isArray(t)?t:[t]).length-1;r>=0;r--)for(n in e)t[r].prototype[n]=e[n]}function Pt(t){return function(...e){const n=e[e.length-1];return!n||n.constructor!==Object||n instanceof Array?t.apply(this,e):t.apply(this,e.slice(0,-1)).attr(n)}}ht("Dom",{siblings:function(){return this.parent().children()},position:function(){return this.parent().index(this)},next:function(){return this.siblings()[this.position()+1]},prev:function(){return this.siblings()[this.position()-1]},forward:function(){const t=this.position();return this.parent().add(this.remove(),t+1),this},backward:function(){const t=this.position();return this.parent().add(this.remove(),t?t-1:0),this},front:function(){return this.parent().add(this.remove()),this},back:function(){return this.parent().add(this.remove(),0),this},before:function(t){(t=At(t)).remove();const e=this.position();return this.parent().add(t,e),this},after:function(t){(t=At(t)).remove();const e=this.position();return this.parent().add(t,e+1),this},insertBefore:function(t){return(t=At(t)).before(this),this},insertAfter:function(t){return(t=At(t)).after(this),this}});const Dt=/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,Ft=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,$t=/rgb\((\d+),(\d+),(\d+)\)/,Yt=/(#[a-z_][a-z0-9\-_]*)/i,Gt=/\)\s*,?\s*/,Xt=/\s/g,Bt=/^#[a-f0-9]{3}$|^#[a-f0-9]{6}$/i,qt=/^rgb\(/,Vt=/^(\s+)?$/,Wt=/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Ht=/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,Ut=/[\s,]+/,Zt=/[MLHVCSQTAZ]/i;function Qt(t){const e=Math.round(t),n=Math.max(0,Math.min(255,e)).toString(16);return 1===n.length?"0"+n:n}function Jt(t,e){for(let n=e.length;n--;)if(null==t[e[n]])return!1;return!0}function Kt(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}ht("Dom",{classes:function(){const t=this.attr("class");return null==t?[]:t.trim().split(Ut)},hasClass:function(t){return-1!==this.classes().indexOf(t)},addClass:function(t){if(!this.hasClass(t)){const e=this.classes();e.push(t),this.attr("class",e.join(" "))}return this},removeClass:function(t){return this.hasClass(t)&&this.attr("class",this.classes().filter((function(e){return e!==t})).join(" ")),this},toggleClass:function(t){return this.hasClass(t)?this.removeClass(t):this.addClass(t)}}),ht("Dom",{css:function(t,e){const n={};if(0===arguments.length)return this.node.style.cssText.split(/\s*;\s*/).filter((function(t){return!!t.length})).forEach((function(t){const e=t.split(/\s*:\s*/);n[e[0]]=e[1]})),n;if(arguments.length<2){if(Array.isArray(t)){for(const e of t){const t=e;n[e]=this.node.style.getPropertyValue(t)}return n}if("string"==typeof t)return this.node.style.getPropertyValue(t);if("object"==typeof t)for(const e in t)this.node.style.setProperty(e,null==t[e]||Vt.test(t[e])?"":t[e])}return 2===arguments.length&&this.node.style.setProperty(t,null==e||Vt.test(e)?"":e),this},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},visible:function(){return"none"!==this.css("display")}}),ht("Dom",{data:function(t,e,n){if(null==t)return this.data(ft(function(t,e){let n;const r=t.length,i=[];for(n=0;n<r;n++)e(t[n])&&i.push(t[n]);return i}(this.node.attributes,(t=>0===t.nodeName.indexOf("data-"))),(t=>t.nodeName.slice(5))));if(t instanceof Array){const e={};for(const n of t)e[n]=this.data(n);return e}if("object"==typeof t)for(e in t)this.data(e,t[e]);else if(arguments.length<2)try{return JSON.parse(this.attr("data-"+t))}catch(r){return this.attr("data-"+t)}else this.attr("data-"+t,null===e?null:!0===n||"string"==typeof e||"number"==typeof e?e:JSON.stringify(e));return this}}),ht("Dom",{remember:function(t,e){if("object"==typeof arguments[0])for(const n in t)this.remember(n,t[n]);else{if(1===arguments.length)return this.memory()[t];this.memory()[t]=e}return this},forget:function(){if(0===arguments.length)this._memory={};else for(let t=arguments.length-1;t>=0;t--)delete this.memory()[arguments[t]];return this},memory:function(){return this._memory=this._memory||{}}});let te=class t{constructor(...t){this.init(...t)}static isColor(e){return e&&(e instanceof t||this.isRgb(e)||this.test(e))}static isRgb(t){return t&&"number"==typeof t.r&&"number"==typeof t.g&&"number"==typeof t.b}static random(e="vibrant",n){const{random:r,round:i,sin:s,PI:o}=Math;if("vibrant"===e){const e=24*r()+57,n=38*r()+45,i=360*r();return new t(e,n,i,"lch")}if("sine"===e){const e=i(80*s(2*o*(n=null==n?r():n)/.5+.01)+150),u=i(50*s(2*o*n/.5+4.6)+200),a=i(100*s(2*o*n/.5+2.3)+150);return new t(e,u,a)}if("pastel"===e){const e=8*r()+86,n=17*r()+9,i=360*r();return new t(e,n,i,"lch")}if("dark"===e){const e=10+10*r(),n=50*r()+86,i=360*r();return new t(e,n,i,"lch")}if("rgb"===e){const e=255*r(),n=255*r(),i=255*r();return new t(e,n,i)}if("lab"===e){const e=100*r(),n=256*r()-128,i=256*r()-128;return new t(e,n,i,"lab")}if("grey"===e){const e=255*r();return new t(e,e,e)}throw new Error("Unsupported random color mode")}static test(t){return"string"==typeof t&&(Bt.test(t)||qt.test(t))}cmyk(){const{_a:e,_b:n,_c:r}=this.rgb(),[i,s,o]=[e,n,r].map((t=>t/255)),u=Math.min(1-i,1-s,1-o);if(1===u)return new t(0,0,0,1,"cmyk");return new t((1-i-u)/(1-u),(1-s-u)/(1-u),(1-o-u)/(1-u),u,"cmyk")}hsl(){const{_a:e,_b:n,_c:r}=this.rgb(),[i,s,o]=[e,n,r].map((t=>t/255)),u=Math.max(i,s,o),a=Math.min(i,s,o),h=(u+a)/2,l=u===a,c=u-a;return new t(360*(l?0:u===i?((s-o)/c+(s<o?6:0))/6:u===s?((o-i)/c+2)/6:u===o?((i-s)/c+4)/6:0),100*(l?0:h>.5?c/(2-u-a):c/(u+a)),100*h,"hsl")}init(t=0,e=0,n=0,r=0,i="rgb"){if(t=t||0,this.space)for(const c in this.space)delete this[this.space[c]];if("number"==typeof t)i="string"==typeof r?r:i,r="string"==typeof r?0:r,Object.assign(this,{_a:t,_b:e,_c:n,_d:r,space:i});else if(t instanceof Array)this.space=e||("string"==typeof t[3]?t[3]:t[4])||"rgb",Object.assign(this,{_a:t[0],_b:t[1],_c:t[2],_d:t[3]||0});else if(t instanceof Object){const n=function(t,e){const n=Jt(t,"rgb")?{_a:t.r,_b:t.g,_c:t.b,_d:0,space:"rgb"}:Jt(t,"xyz")?{_a:t.x,_b:t.y,_c:t.z,_d:0,space:"xyz"}:Jt(t,"hsl")?{_a:t.h,_b:t.s,_c:t.l,_d:0,space:"hsl"}:Jt(t,"lab")?{_a:t.l,_b:t.a,_c:t.b,_d:0,space:"lab"}:Jt(t,"lch")?{_a:t.l,_b:t.c,_c:t.h,_d:0,space:"lch"}:Jt(t,"cmyk")?{_a:t.c,_b:t.m,_c:t.y,_d:t.k,space:"cmyk"}:{_a:0,_b:0,_c:0,space:"rgb"};return n.space=e||n.space,n}(t,e);Object.assign(this,n)}else if("string"==typeof t)if(qt.test(t)){const e=t.replace(Xt,""),[n,r,i]=$t.exec(e).slice(1,4).map((t=>parseInt(t)));Object.assign(this,{_a:n,_b:r,_c:i,_d:0,space:"rgb"})}else{if(!Bt.test(t))throw Error("Unsupported string format, can't construct Color");{const e=t=>parseInt(t,16),[,n,r,i]=Ft.exec((s=t,4===s.length?["#",s.substring(1,2),s.substring(1,2),s.substring(2,3),s.substring(2,3),s.substring(3,4),s.substring(3,4)].join(""):s)).map(e);Object.assign(this,{_a:n,_b:r,_c:i,_d:0,space:"rgb"})}}var s;const{_a:o,_b:u,_c:a,_d:h}=this,l="rgb"===this.space?{r:o,g:u,b:a}:"xyz"===this.space?{x:o,y:u,z:a}:"hsl"===this.space?{h:o,s:u,l:a}:"lab"===this.space?{l:o,a:u,b:a}:"lch"===this.space?{l:o,c:u,h:a}:"cmyk"===this.space?{c:o,m:u,y:a,k:h}:{};Object.assign(this,l)}lab(){const{x:e,y:n,z:r}=this.xyz();return new t(116*n-16,500*(e-n),200*(n-r),"lab")}lch(){const{l:e,a:n,b:r}=this.lab(),i=Math.sqrt(n**2+r**2);let s=180*Math.atan2(r,n)/Math.PI;s<0&&(s*=-1,s=360-s);return new t(e,i,s,"lch")}rgb(){if("rgb"===this.space)return this;if("lab"===(e=this.space)||"xyz"===e||"lch"===e){let{x:e,y:n,z:r}=this;if("lab"===this.space||"lch"===this.space){let{l:t,a:i,b:s}=this;if("lch"===this.space){const{c:t,h:e}=this,n=Math.PI/180;i=t*Math.cos(n*e),s=t*Math.sin(n*e)}const o=(t+16)/116,u=i/500+o,a=o-s/200,h=16/116,l=.008856,c=7.787;e=.95047*(u**3>l?u**3:(u-h)/c),n=1*(o**3>l?o**3:(o-h)/c),r=1.08883*(a**3>l?a**3:(a-h)/c)}const i=3.2406*e+-1.5372*n+-.4986*r,s=-.9689*e+1.8758*n+.0415*r,o=.0557*e+-.204*n+1.057*r,u=Math.pow,a=.0031308,h=i>a?1.055*u(i,1/2.4)-.055:12.92*i,l=s>a?1.055*u(s,1/2.4)-.055:12.92*s,c=o>a?1.055*u(o,1/2.4)-.055:12.92*o;return new t(255*h,255*l,255*c)}if("hsl"===this.space){let{h:e,s:n,l:r}=this;if(e/=360,n/=100,r/=100,0===n){r*=255;return new t(r,r,r)}const i=r<.5?r*(1+n):r+n-r*n,s=2*r-i,o=255*Kt(s,i,e+1/3),u=255*Kt(s,i,e),a=255*Kt(s,i,e-1/3);return new t(o,u,a)}if("cmyk"===this.space){const{c:e,m:n,y:r,k:i}=this,s=255*(1-Math.min(1,e*(1-i)+i)),o=255*(1-Math.min(1,n*(1-i)+i)),u=255*(1-Math.min(1,r*(1-i)+i));return new t(s,o,u)}return this;var e}toArray(){const{_a:t,_b:e,_c:n,_d:r,space:i}=this;return[t,e,n,r,i]}toHex(){const[t,e,n]=this._clamped().map(Qt);return`#${t}${e}${n}`}toRgb(){const[t,e,n]=this._clamped();return`rgb(${t},${e},${n})`}toString(){return this.toHex()}xyz(){const{_a:e,_b:n,_c:r}=this.rgb(),[i,s,o]=[e,n,r].map((t=>t/255)),u=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92,a=s>.04045?Math.pow((s+.055)/1.055,2.4):s/12.92,h=o>.04045?Math.pow((o+.055)/1.055,2.4):o/12.92,l=(.4124*u+.3576*a+.1805*h)/.95047,c=(.2126*u+.7152*a+.0722*h)/1,f=(.0193*u+.1192*a+.9505*h)/1.08883,d=l>.008856?Math.pow(l,1/3):7.787*l+16/116,p=c>.008856?Math.pow(c,1/3):7.787*c+16/116,m=f>.008856?Math.pow(f,1/3):7.787*f+16/116;return new t(d,p,m,"xyz")}_clamped(){const{_a:t,_b:e,_c:n}=this.rgb(),{max:r,min:i,round:s}=Math;return[t,e,n].map((t=>r(0,i(s(t),255))))}},ee=class t{constructor(...t){this.init(...t)}clone(){return new t(this)}init(t,e){const n=0,r=0,i=Array.isArray(t)?{x:t[0],y:t[1]}:"object"==typeof t?{x:t.x,y:t.y}:{x:t,y:e};return this.x=null==i.x?n:i.x,this.y=null==i.y?r:i.y,this}toArray(){return[this.x,this.y]}transform(t){return this.clone().transformO(t)}transformO(t){re.isMatrixLike(t)||(t=new re(t));const{x:e,y:n}=this;return this.x=t.a*e+t.c*n+t.e,this.y=t.b*e+t.d*n+t.f,this}};function ne(t,e,n){return Math.abs(e-t)<1e-6}let re=class t{constructor(...t){this.init(...t)}static formatTransforms(t){const e="both"===t.flip||!0===t.flip,n=t.flip&&(e||"x"===t.flip)?-1:1,r=t.flip&&(e||"y"===t.flip)?-1:1,i=t.skew&&t.skew.length?t.skew[0]:isFinite(t.skew)?t.skew:isFinite(t.skewX)?t.skewX:0,s=t.skew&&t.skew.length?t.skew[1]:isFinite(t.skew)?t.skew:isFinite(t.skewY)?t.skewY:0,o=t.scale&&t.scale.length?t.scale[0]*n:isFinite(t.scale)?t.scale*n:isFinite(t.scaleX)?t.scaleX*n:n,u=t.scale&&t.scale.length?t.scale[1]*r:isFinite(t.scale)?t.scale*r:isFinite(t.scaleY)?t.scaleY*r:r,a=t.shear||0,h=t.rotate||t.theta||0,l=new ee(t.origin||t.around||t.ox||t.originX,t.oy||t.originY),c=l.x,f=l.y,d=new ee(t.position||t.px||t.positionX||NaN,t.py||t.positionY||NaN),p=d.x,m=d.y,g=new ee(t.translate||t.tx||t.translateX,t.ty||t.translateY),y=g.x,_=g.y,v=new ee(t.relative||t.rx||t.relativeX,t.ry||t.relativeY);return{scaleX:o,scaleY:u,skewX:i,skewY:s,shear:a,theta:h,rx:v.x,ry:v.y,tx:y,ty:_,ox:c,oy:f,px:p,py:m}}static fromArray(t){return{a:t[0],b:t[1],c:t[2],d:t[3],e:t[4],f:t[5]}}static isMatrixLike(t){return null!=t.a||null!=t.b||null!=t.c||null!=t.d||null!=t.e||null!=t.f}static matrixMultiply(t,e,n){const r=t.a*e.a+t.c*e.b,i=t.b*e.a+t.d*e.b,s=t.a*e.c+t.c*e.d,o=t.b*e.c+t.d*e.d,u=t.e+t.a*e.e+t.c*e.f,a=t.f+t.b*e.e+t.d*e.f;return n.a=r,n.b=i,n.c=s,n.d=o,n.e=u,n.f=a,n}around(t,e,n){return this.clone().aroundO(t,e,n)}aroundO(t,e,n){const r=t||0,i=e||0;return this.translateO(-r,-i).lmultiplyO(n).translateO(r,i)}clone(){return new t(this)}decompose(t=0,e=0){const n=this.a,r=this.b,i=this.c,s=this.d,o=this.e,u=this.f,a=n*s-r*i,h=a>0?1:-1,l=h*Math.sqrt(n*n+r*r),c=Math.atan2(h*r,h*n),f=180/Math.PI*c,d=Math.cos(c),p=Math.sin(c),m=(n*i+r*s)/a,g=i*l/(m*n-r)||s*l/(m*r+n);return{scaleX:l,scaleY:g,shear:m,rotate:f,translateX:o-t+t*d*l+e*(m*d*l-p*g),translateY:u-e+t*p*l+e*(m*p*l+d*g),originX:t,originY:e,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}equals(e){if(e===this)return!0;const n=new t(e);return ne(this.a,n.a)&&ne(this.b,n.b)&&ne(this.c,n.c)&&ne(this.d,n.d)&&ne(this.e,n.e)&&ne(this.f,n.f)}flip(t,e){return this.clone().flipO(t,e)}flipO(t,e){return"x"===t?this.scaleO(-1,1,e,0):"y"===t?this.scaleO(1,-1,0,e):this.scaleO(-1,-1,t,e||t)}init(e){const n=t.fromArray([1,0,0,1,0,0]);return e=e instanceof Ae?e.matrixify():"string"==typeof e?t.fromArray(e.split(Ut).map(parseFloat)):Array.isArray(e)?t.fromArray(e):"object"==typeof e&&t.isMatrixLike(e)?e:"object"==typeof e?(new t).transform(e):6===arguments.length?t.fromArray([].slice.call(arguments)):n,this.a=null!=e.a?e.a:n.a,this.b=null!=e.b?e.b:n.b,this.c=null!=e.c?e.c:n.c,this.d=null!=e.d?e.d:n.d,this.e=null!=e.e?e.e:n.e,this.f=null!=e.f?e.f:n.f,this}inverse(){return this.clone().inverseO()}inverseO(){const t=this.a,e=this.b,n=this.c,r=this.d,i=this.e,s=this.f,o=t*r-e*n;if(!o)throw new Error("Cannot invert "+this);const u=r/o,a=-e/o,h=-n/o,l=t/o,c=-(u*i+h*s),f=-(a*i+l*s);return this.a=u,this.b=a,this.c=h,this.d=l,this.e=c,this.f=f,this}lmultiply(t){return this.clone().lmultiplyO(t)}lmultiplyO(e){const n=e instanceof t?e:new t(e);return t.matrixMultiply(n,this,this)}multiply(t){return this.clone().multiplyO(t)}multiplyO(e){const n=e instanceof t?e:new t(e);return t.matrixMultiply(this,n,this)}rotate(t,e,n){return this.clone().rotateO(t,e,n)}rotateO(t,e=0,n=0){t=dt(t);const r=Math.cos(t),i=Math.sin(t),{a:s,b:o,c:u,d:a,e:h,f:l}=this;return this.a=s*r-o*i,this.b=o*r+s*i,this.c=u*r-a*i,this.d=a*r+u*i,this.e=h*r-l*i+n*i-e*r+e,this.f=l*r+h*i-e*i-n*r+n,this}scale(){return this.clone().scaleO(...arguments)}scaleO(t,e=t,n=0,r=0){3===arguments.length&&(r=n,n=e,e=t);const{a:i,b:s,c:o,d:u,e:a,f:h}=this;return this.a=i*t,this.b=s*e,this.c=o*t,this.d=u*e,this.e=a*t-n*t+n,this.f=h*e-r*e+r,this}shear(t,e,n){return this.clone().shearO(t,e,n)}shearO(t,e=0,n=0){const{a:r,b:i,c:s,d:o,e:u,f:a}=this;return this.a=r+i*t,this.c=s+o*t,this.e=u+a*t-n*t,this}skew(){return this.clone().skewO(...arguments)}skewO(t,e=t,n=0,r=0){3===arguments.length&&(r=n,n=e,e=t),t=dt(t),e=dt(e);const i=Math.tan(t),s=Math.tan(e),{a:o,b:u,c:a,d:h,e:l,f:c}=this;return this.a=o+u*i,this.b=u+o*s,this.c=a+h*i,this.d=h+a*s,this.e=l+c*i-r*i,this.f=c+l*s-n*s,this}skewX(t,e,n){return this.skew(t,0,e,n)}skewY(t,e,n){return this.skew(0,t,e,n)}toArray(){return[this.a,this.b,this.c,this.d,this.e,this.f]}toString(){return"matrix("+this.a+","+this.b+","+this.c+","+this.d+","+this.e+","+this.f+")"}transform(e){if(t.isMatrixLike(e)){return new t(e).multiplyO(this)}const n=t.formatTransforms(e),{x:r,y:i}=new ee(n.ox,n.oy).transform(this),s=(new t).translateO(n.rx,n.ry).lmultiplyO(this).translateO(-r,-i).scaleO(n.scaleX,n.scaleY).skewO(n.skewX,n.skewY).shearO(n.shear).rotateO(n.theta).translateO(r,i);if(isFinite(n.px)||isFinite(n.py)){const t=new ee(r,i).transform(s),e=isFinite(n.px)?n.px-t.x:0,o=isFinite(n.py)?n.py-t.y:0;s.translateO(e,o)}return s.translateO(n.tx,n.ty),s}translate(t,e){return this.clone().translateO(t,e)}translateO(t,e){return this.e+=t||0,this.f+=e||0,this}valueOf(){return{a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}};function ie(){if(!ie.nodes){const t=At().size(2,0);t.node.style.cssText=["opacity: 0","position: absolute","left: -100%","top: -100%","overflow: hidden"].join(";"),t.attr("focusable","false"),t.attr("aria-hidden","true");const e=t.path().node;ie.nodes={svg:t,path:e}}if(!ie.nodes.svg.node.parentNode){const t=Et.document.body||Et.document.documentElement;ie.nodes.svg.addTo(t)}return ie.nodes}function se(t){return!(t.width||t.height||t.x||t.y)}Tt(re,"Matrix");let oe=class t{constructor(...t){this.init(...t)}addOffset(){return this.x+=Et.window.pageXOffset,this.y+=Et.window.pageYOffset,new t(this)}init(t){return t="string"==typeof t?t.split(Ut).map(parseFloat):Array.isArray(t)?t:"object"==typeof t?[null!=t.left?t.left:t.x,null!=t.top?t.top:t.y,t.width,t.height]:4===arguments.length?[].slice.call(arguments):[0,0,0,0],this.x=t[0]||0,this.y=t[1]||0,this.width=this.w=t[2]||0,this.height=this.h=t[3]||0,this.x2=this.x+this.w,this.y2=this.y+this.h,this.cx=this.x+this.w/2,this.cy=this.y+this.h/2,this}isNulled(){return se(this)}merge(e){const n=Math.min(this.x,e.x),r=Math.min(this.y,e.y),i=Math.max(this.x+this.width,e.x+e.width)-n,s=Math.max(this.y+this.height,e.y+e.height)-r;return new t(n,r,i,s)}toArray(){return[this.x,this.y,this.width,this.height]}toString(){return this.x+" "+this.y+" "+this.width+" "+this.height}transform(e){e instanceof re||(e=new re(e));let n=1/0,r=-1/0,i=1/0,s=-1/0;return[new ee(this.x,this.y),new ee(this.x2,this.y),new ee(this.x,this.y2),new ee(this.x2,this.y2)].forEach((function(t){t=t.transform(e),n=Math.min(n,t.x),r=Math.max(r,t.x),i=Math.min(i,t.y),s=Math.max(s,t.y)})),new t(n,i,r-n,s-i)}};function ue(t,e,n){let r;try{if(r=e(t.node),se(r)&&((i=t.node)!==Et.document&&!(Et.document.documentElement.contains||function(t){for(;t.parentNode;)t=t.parentNode;return t===Et.document}).call(Et.document.documentElement,i)))throw new Error("Element not in the dom")}catch(s){r=n(t)}var i;return r}ht({viewbox:{viewbox(t,e,n,r){return null==t?new oe(this.attr("viewBox")):this.attr("viewBox",new oe(t,e,n,r))},zoom(t,e){let{width:n,height:r}=this.attr(["width","height"]);if((n||r)&&"string"!=typeof n&&"string"!=typeof r||(n=this.node.clientWidth,r=this.node.clientHeight),!n||!r)throw new Error("Impossible to get absolute width and height. Please provide an absolute width and height attribute on the zooming element");const i=this.viewbox(),s=n/i.width,o=r/i.height,u=Math.min(s,o);if(null==t)return u;let a=u/t;a===1/0&&(a=Number.MAX_SAFE_INTEGER/100),e=e||new ee(n/2/s+i.x,r/2/o+i.y);const h=new oe(i).transform(new re({scale:a,origin:e}));return this.viewbox(h)}}}),Tt(oe,"Box");let ae=class extends Array{constructor(t=[],...e){if(super(t,...e),"number"==typeof t)return this;this.length=0,this.push(...t)}};zt([ae],{each(t,...e){return"function"==typeof t?this.map(((e,n,r)=>t.call(e,e,n,r))):this.map((n=>n[t](...e)))},toArray(){return Array.prototype.concat.apply([],this)}});const he=["toArray","constructor","each"];function le(t,e){return new ae(ft((e||Et.document).querySelectorAll(t),(function(t){return Nt(t)})))}ae.extend=function(t){t=t.reduce(((t,e)=>(he.includes(e)||"_"===e[0]||(e in Array.prototype&&(t["$"+e]=Array.prototype[e]),t[e]=function(...t){return this.each(e,...t)}),t)),{}),zt([ae],t)};let ce=0;const fe={};function de(t){let e=t.getEventHolder();return e===Et.window&&(e=fe),e.events||(e.events={}),e.events}function pe(t){return t.getEventTarget()}function me(t,e,n,r,i){const s=n.bind(r||t),o=At(t),u=de(o),a=pe(o);e=Array.isArray(e)?e:e.split(Ut),n._svgjsListenerId||(n._svgjsListenerId=++ce),e.forEach((function(t){const e=t.split(".")[0],r=t.split(".")[1]||"*";u[e]=u[e]||{},u[e][r]=u[e][r]||{},u[e][r][n._svgjsListenerId]=s,a.addEventListener(e,s,i||!1)}))}function ge(t,e,n,r){const i=At(t),s=de(i),o=pe(i);("function"!=typeof n||(n=n._svgjsListenerId))&&(e=Array.isArray(e)?e:(e||"").split(Ut)).forEach((function(t){const e=t&&t.split(".")[0],u=t&&t.split(".")[1];let a,h;if(n)s[e]&&s[e][u||"*"]&&(o.removeEventListener(e,s[e][u||"*"][n],r||!1),delete s[e][u||"*"][n]);else if(e&&u){if(s[e]&&s[e][u]){for(h in s[e][u])ge(o,[e,u].join("."),h);delete s[e][u]}}else if(u)for(t in s)for(a in s[t])u===a&&ge(o,[t,u].join("."));else if(e){if(s[e]){for(a in s[e])ge(o,[e,a].join("."));delete s[e]}}else{for(t in s)ge(o,t);!function(t){let e=t.getEventHolder();e===Et.window&&(e=fe),e.events&&(e.events={})}(i)}}))}let ye=class extends Ot{addEventListener(){}dispatch(t,e,n){return function(t,e,n,r){const i=pe(t);return e instanceof Et.window.Event||(e=new Et.window.CustomEvent(e,{detail:n,cancelable:!0,...r})),i.dispatchEvent(e),e}(this,t,e,n)}dispatchEvent(t){const e=this.getEventHolder().events;if(!e)return!0;const n=e[t.type];for(const r in n)for(const e in n[r])n[r][e](t);return!t.defaultPrevented}fire(t,e,n){return this.dispatch(t,e,n),this}getEventHolder(){return this}getEventTarget(){return this}off(t,e,n){return ge(this,t,e,n),this}on(t,e,n,r){return me(this,t,e,n,r),this}removeEventListener(){}};function _e(){}Tt(ye,"EventTarget");const ve=400,we=">",be=0,xe={"fill-opacity":1,"stroke-opacity":1,"stroke-width":0,"stroke-linejoin":"miter","stroke-linecap":"butt",fill:"#000000",stroke:"#000000",opacity:1,x:0,y:0,cx:0,cy:0,width:0,height:0,r:0,rx:0,ry:0,offset:0,"stop-opacity":1,"stop-color":"#000000","text-anchor":"start"};let Ee=class extends Array{constructor(...t){super(...t),this.init(...t)}clone(){return new this.constructor(this)}init(t){return"number"==typeof t||(this.length=0,this.push(...this.parse(t))),this}parse(t=[]){return t instanceof Array?t:t.trim().split(Ut).map(parseFloat)}toArray(){return Array.prototype.concat.apply([],this)}toSet(){return new Set(this)}toString(){return this.join(" ")}valueOf(){const t=[];return t.push(...this),t}},Oe=class t{constructor(...t){this.init(...t)}convert(e){return new t(this.value,e)}divide(e){return e=new t(e),new t(this/e,this.unit||e.unit)}init(e,n){return n=Array.isArray(e)?e[1]:n,e=Array.isArray(e)?e[0]:e,this.value=0,this.unit=n||"","number"==typeof e?this.value=isNaN(e)?0:isFinite(e)?e:e<0?-34e37:34e37:"string"==typeof e?(n=e.match(Dt))&&(this.value=parseFloat(n[1]),"%"===n[5]?this.value/=100:"s"===n[5]&&(this.value*=1e3),this.unit=n[5]):e instanceof t&&(this.value=e.valueOf(),this.unit=e.unit),this}minus(e){return e=new t(e),new t(this-e,this.unit||e.unit)}plus(e){return e=new t(e),new t(this+e,this.unit||e.unit)}times(e){return e=new t(e),new t(this*e,this.unit||e.unit)}toArray(){return[this.value,this.unit]}toJSON(){return this.toString()}toString(){return("%"===this.unit?~~(1e8*this.value)/1e6:"s"===this.unit?this.value/1e3:this.value)+this.unit}valueOf(){return this.value}};const Me=new Set(["fill","stroke","color","bgcolor","stop-color","flood-color","lighting-color"]),ke=[];let Ce=class t extends ye{constructor(t,e){super(),this.node=t,this.type=t.nodeName,e&&t!==e&&this.attr(e)}add(t,e){return(t=At(t)).removeNamespace&&this.node instanceof Et.window.SVGElement&&t.removeNamespace(),null==e?this.node.appendChild(t.node):t.node!==this.node.childNodes[e]&&this.node.insertBefore(t.node,this.node.childNodes[e]),this}addTo(t,e){return At(t).put(this,e)}children(){return new ae(ft(this.node.children,(function(t){return Nt(t)})))}clear(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return this}clone(t=!0,e=!0){this.writeDataToDom();let n=this.node.cloneNode(t);return e&&(n=Lt(n)),new this.constructor(n)}each(t,e){const n=this.children();let r,i;for(r=0,i=n.length;r<i;r++)t.apply(n[r],[r,n]),e&&n[r].each(t,e);return this}element(e,n){return this.put(new t(Ct(e),n))}first(){return Nt(this.node.firstChild)}get(t){return Nt(this.node.childNodes[t])}getEventHolder(){return this.node}getEventTarget(){return this.node}has(t){return this.index(t)>=0}html(t,e){return this.xml(t,e,"http://www.w3.org/1999/xhtml")}id(t){return void 0!==t||this.node.id||(this.node.id=Rt(this.type)),this.attr("id",t)}index(t){return[].slice.call(this.node.childNodes).indexOf(t.node)}last(){return Nt(this.node.lastChild)}matches(t){const e=this.node,n=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector||null;return n&&n.call(e,t)}parent(t){let e=this;if(!e.node.parentNode)return null;if(e=Nt(e.node.parentNode),!t)return e;do{if("string"==typeof t?e.matches(t):e instanceof t)return e}while(e=Nt(e.node.parentNode));return e}put(t,e){return t=At(t),this.add(t,e),t}putIn(t,e){return At(t).add(this,e)}remove(){return this.parent()&&this.parent().removeElement(this),this}removeElement(t){return this.node.removeChild(t.node),this}replace(t){return t=At(t),this.node.parentNode&&this.node.parentNode.replaceChild(t.node,this.node),t}round(t=2,e=null){const n=10**t,r=this.attr(e);for(const i in r)"number"==typeof r[i]&&(r[i]=Math.round(r[i]*n)/n);return this.attr(r),this}svg(t,e){return this.xml(t,e,wt)}toString(){return this.id()}words(t){return this.node.textContent=t,this}wrap(t){const e=this.parent();if(!e)return this.addTo(t);const n=e.index(this);return e.put(t,n).put(this)}writeDataToDom(){return this.each((function(){this.writeDataToDom()})),this}xml(t,e,n){if("boolean"==typeof t&&(n=e,e=t,t=null),null==t||"function"==typeof t){e=null==e||e,this.writeDataToDom();let n=this;if(null!=t){if(n=Nt(n.node.cloneNode(!0)),e){const e=t(n);if(n=e||n,!1===e)return""}n.each((function(){const e=t(this),n=e||this;!1===e?this.remove():e&&this!==n&&this.replace(n)}),!0)}return e?n.node.outerHTML:n.node.innerHTML}e=null!=e&&e;const r=Ct("wrapper",n),i=Et.document.createDocumentFragment();r.innerHTML=t;for(let o=r.children.length;o--;)i.appendChild(r.firstElementChild);const s=this.parent();return e?this.replace(i)&&s:this.add(i)}};zt(Ce,{attr:function(t,e,n){if(null==t){t={},e=this.node.attributes;for(const n of e)t[n.nodeName]=Wt.test(n.nodeValue)?parseFloat(n.nodeValue):n.nodeValue;return t}if(t instanceof Array)return t.reduce(((t,e)=>(t[e]=this.attr(e),t)),{});if("object"==typeof t&&t.constructor===Object)for(e in t)this.attr(e,t[e]);else if(null===e)this.node.removeAttribute(t);else{if(null==e)return null==(e=this.node.getAttribute(t))?xe[t]:Wt.test(e)?parseFloat(e):e;"number"==typeof(e=ke.reduce(((e,n)=>n(t,e,this)),e))?e=new Oe(e):Me.has(t)&&te.isColor(e)?e=new te(e):e.constructor===Array&&(e=new Ee(e)),"leading"===t?this.leading&&this.leading(e):"string"==typeof n?this.node.setAttributeNS(n,t,e.toString()):this.node.setAttribute(t,e.toString()),!this.rebuild||"font-size"!==t&&"x"!==t||this.rebuild()}return this},find:function(t){return le(t,this.node)},findOne:function(t){return Nt(this.node.querySelector(t))}}),Tt(Ce,"Dom");let Ae=class extends Ce{constructor(t,e){super(t,e),this.dom={},this.node.instance=this,(t.hasAttribute("data-svgjs")||t.hasAttribute("svgjs:data"))&&this.setData(JSON.parse(t.getAttribute("data-svgjs"))??JSON.parse(t.getAttribute("svgjs:data"))??{})}center(t,e){return this.cx(t).cy(e)}cx(t){return null==t?this.x()+this.width()/2:this.x(t-this.width()/2)}cy(t){return null==t?this.y()+this.height()/2:this.y(t-this.height()/2)}defs(){const t=this.root();return t&&t.defs()}dmove(t,e){return this.dx(t).dy(e)}dx(t=0){return this.x(new Oe(t).plus(this.x()))}dy(t=0){return this.y(new Oe(t).plus(this.y()))}getEventHolder(){return this}height(t){return this.attr("height",t)}move(t,e){return this.x(t).y(e)}parents(t=this.root()){const e="string"==typeof t;e||(t=At(t));const n=new ae;let r=this;for(;(r=r.parent())&&r.node!==Et.document&&"#document-fragment"!==r.nodeName&&(n.push(r),e||r.node!==t.node)&&(!e||!r.matches(t));)if(r.node===this.root().node)return null;return n}reference(t){if(!(t=this.attr(t)))return null;const e=(t+"").match(Yt);return e?At(e[1]):null}root(){const t=this.parent(Mt[kt]);return t&&t.root()}setData(t){return this.dom=t,this}size(t,e){const n=mt(this,t,e);return this.width(new Oe(n.width)).height(new Oe(n.height))}width(t){return this.attr("width",t)}writeDataToDom(){return vt(this,this.dom),super.writeDataToDom()}x(t){return this.attr("x",t)}y(t){return this.attr("y",t)}};zt(Ae,{bbox:function(){const t=ue(this,(t=>t.getBBox()),(t=>{try{const e=t.clone().addTo(ie().svg).show(),n=e.node.getBBox();return e.remove(),n}catch(e){throw new Error(`Getting bbox of element "${t.node.nodeName}" is not possible: ${e.toString()}`)}}));return new oe(t)},rbox:function(t){const e=ue(this,(t=>t.getBoundingClientRect()),(t=>{throw new Error(`Getting rbox of element "${t.node.nodeName}" is not possible`)})),n=new oe(e);return t?n.transform(t.screenCTM().inverseO()):n.addOffset()},inside:function(t,e){const n=this.bbox();return t>n.x&&e>n.y&&t<n.x+n.width&&e<n.y+n.height},point:function(t,e){return new ee(t,e).transformO(this.screenCTM().inverseO())},ctm:function(){return new re(this.node.getCTM())},screenCTM:function(){try{if("function"==typeof this.isRoot&&!this.isRoot()){const t=this.rect(1,1),e=t.node.getScreenCTM();return t.remove(),new re(e)}return new re(this.node.getScreenCTM())}catch(t){return console.warn(`Cannot get CTM from SVG node ${this.node.nodeName}. Is the element rendered?`),new re}}}),Tt(Ae,"Element");const Se={stroke:["color","width","opacity","linecap","linejoin","miterlimit","dasharray","dashoffset"],fill:["color","opacity","rule"],prefix:function(t,e){return"color"===e?t:t+"-"+e}};["fill","stroke"].forEach((function(t){const e={};let n;e[t]=function(e){if(void 0===e)return this.attr(t);if("string"==typeof e||e instanceof te||te.isRgb(e)||e instanceof Ae)this.attr(t,e);else for(n=Se[t].length-1;n>=0;n--)null!=e[Se[t][n]]&&this.attr(Se.prefix(t,Se[t][n]),e[Se[t][n]]);return this},ht(["Element","Runner"],e)})),ht(["Element","Runner"],{matrix:function(t,e,n,r,i,s){return null==t?new re(this):this.attr("transform",new re(t,e,n,r,i,s))},rotate:function(t,e,n){return this.transform({rotate:t,ox:e,oy:n},!0)},skew:function(t,e,n,r){return 1===arguments.length||3===arguments.length?this.transform({skew:t,ox:e,oy:n},!0):this.transform({skew:[t,e],ox:n,oy:r},!0)},shear:function(t,e,n){return this.transform({shear:t,ox:e,oy:n},!0)},scale:function(t,e,n,r){return 1===arguments.length||3===arguments.length?this.transform({scale:t,ox:e,oy:n},!0):this.transform({scale:[t,e],ox:n,oy:r},!0)},translate:function(t,e){return this.transform({translate:[t,e]},!0)},relative:function(t,e){return this.transform({relative:[t,e]},!0)},flip:function(t="both",e="center"){return-1==="xybothtrue".indexOf(t)&&(e=t,t="both"),this.transform({flip:t,origin:e},!0)},opacity:function(t){return this.attr("opacity",t)}}),ht("radius",{radius:function(t,e=t){return"radialGradient"===(this._element||this).type?this.attr("r",new Oe(t)):this.rx(t).ry(e)}}),ht("Path",{length:function(){return this.node.getTotalLength()},pointAt:function(t){return new ee(this.node.getPointAtLength(t))}}),ht(["Element","Runner"],{font:function(t,e){if("object"==typeof t){for(e in t)this.font(e,t[e]);return this}return"leading"===t?this.leading(e):"anchor"===t?this.attr("text-anchor",e):"size"===t||"family"===t||"weight"===t||"stretch"===t||"variant"===t||"style"===t?this.attr("font-"+t,e):this.attr(t,e)}});ht("Element",["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","touchstart","touchmove","touchleave","touchend","touchcancel","contextmenu","wheel","pointerdown","pointermove","pointerup","pointerleave","pointercancel"].reduce((function(t,e){return t[e]=function(t){return null===t?this.off(e):this.on(e,t),this},t}),{})),ht("Element",{untransform:function(){return this.attr("transform",null)},matrixify:function(){return(this.attr("transform")||"").split(Gt).slice(0,-1).map((function(t){const e=t.trim().split("(");return[e[0],e[1].split(Ut).map((function(t){return parseFloat(t)}))]})).reverse().reduce((function(t,e){return"matrix"===e[0]?t.lmultiply(re.fromArray(e[1])):t[e[0]].apply(t,e[1])}),new re)},toParent:function(t,e){if(this===t)return this;if(_t(this.node))return this.addTo(t,e);const n=this.screenCTM(),r=t.screenCTM().inverse();return this.addTo(t,e).untransform().transform(r.multiply(n)),this},toRoot:function(t){return this.toParent(this.root(),t)},transform:function(t,e){if(null==t||"string"==typeof t){const e=new re(this).decompose();return null==t?e:e[t]}re.isMatrixLike(t)||(t={...t,origin:gt(t,this)});const n=new re(!0===e?this:e||!1).transform(t);return this.attr("transform",n)}});let Ne=class t extends Ae{flatten(){return this.each((function(){if(this instanceof t)return this.flatten().ungroup()})),this}ungroup(t=this.parent(),e=t.index(this)){return e=-1===e?t.children().length:e,this.each((function(n,r){return r[r.length-n-1].toParent(t,e)})),this.remove()}};Tt(Ne,"Container");let je=class extends Ne{constructor(t,e=t){super(St("defs",t),e)}flatten(){return this}ungroup(){return this}};Tt(je,"Defs");let Te=class extends Ae{};function Ie(t){return this.attr("rx",t)}function Re(t){return this.attr("ry",t)}function Le(t){return null==t?this.cx()-this.rx():this.cx(t+this.rx())}function ze(t){return null==t?this.cy()-this.ry():this.cy(t+this.ry())}function Pe(t){return this.attr("cx",t)}function De(t){return this.attr("cy",t)}function Fe(t){return null==t?2*this.rx():this.rx(new Oe(t).divide(2))}function $e(t){return null==t?2*this.ry():this.ry(new Oe(t).divide(2))}Tt(Te,"Shape");const Ye=Object.freeze(Object.defineProperty({__proto__:null,cx:Pe,cy:De,height:$e,rx:Ie,ry:Re,width:Fe,x:Le,y:ze},Symbol.toStringTag,{value:"Module"}));let Ge=class extends Te{constructor(t,e=t){super(St("ellipse",t),e)}size(t,e){const n=mt(this,t,e);return this.rx(new Oe(n.width).divide(2)).ry(new Oe(n.height).divide(2))}};zt(Ge,Ye),ht("Container",{ellipse:Pt((function(t=0,e=t){return this.put(new Ge).size(t,e).move(0,0)}))}),Tt(Ge,"Ellipse");let Xe=class extends Ce{constructor(t=Et.document.createDocumentFragment()){super(t)}xml(t,e,n){if("boolean"==typeof t&&(n=e,e=t,t=null),null==t||"function"==typeof t){const t=new Ce(Ct("wrapper",n));return t.add(this.node.cloneNode(!0)),t.xml(!1,n)}return super.xml(t,!1,n)}};function Be(t,e){return"radialGradient"===(this._element||this).type?this.attr({fx:new Oe(t),fy:new Oe(e)}):this.attr({x1:new Oe(t),y1:new Oe(e)})}function qe(t,e){return"radialGradient"===(this._element||this).type?this.attr({cx:new Oe(t),cy:new Oe(e)}):this.attr({x2:new Oe(t),y2:new Oe(e)})}Tt(Xe,"Fragment");const Ve=Object.freeze(Object.defineProperty({__proto__:null,from:Be,to:qe},Symbol.toStringTag,{value:"Module"}));let We=class extends Ne{constructor(t,e){super(St(t+"Gradient","string"==typeof t?null:t),e)}attr(t,e,n){return"transform"===t&&(t="gradientTransform"),super.attr(t,e,n)}bbox(){return new oe}targets(){return le("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}};zt(We,Ve),ht({Container:{gradient(...t){return this.defs().gradient(...t)}},Defs:{gradient:Pt((function(t,e){return this.put(new We(t)).update(e)}))}}),Tt(We,"Gradient");let He=class extends Ne{constructor(t,e=t){super(St("pattern",t),e)}attr(t,e,n){return"transform"===t&&(t="patternTransform"),super.attr(t,e,n)}bbox(){return new oe}targets(){return le("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}};ht({Container:{pattern(...t){return this.defs().pattern(...t)}},Defs:{pattern:Pt((function(t,e,n){return this.put(new He).update(n).attr({x:0,y:0,width:t,height:e,patternUnits:"userSpaceOnUse"})}))}}),Tt(He,"Pattern");let Ue=class extends Te{constructor(t,e=t){super(St("image",t),e)}load(t,e){if(!t)return this;const n=new Et.window.Image;return me(n,"load",(function(t){const r=this.parent(He);0===this.width()&&0===this.height()&&this.size(n.width,n.height),r instanceof He&&0===r.width()&&0===r.height()&&r.size(this.width(),this.height()),"function"==typeof e&&e.call(this,t)}),this),me(n,"load error",(function(){ge(n)})),this.attr("href",n.src=t,xt)}};var Ze;Ze=function(t,e,n){return"fill"!==t&&"stroke"!==t||Ht.test(e)&&(e=n.root().defs().image(e)),e instanceof Ue&&(e=n.root().defs().pattern(0,0,(t=>{t.add(e)}))),e},ke.push(Ze),ht({Container:{image:Pt((function(t,e){return this.put(new Ue).size(0,0).load(t,e)}))}}),Tt(Ue,"Image");let Qe=class extends Ee{bbox(){let t=-1/0,e=-1/0,n=1/0,r=1/0;return this.forEach((function(i){t=Math.max(i[0],t),e=Math.max(i[1],e),n=Math.min(i[0],n),r=Math.min(i[1],r)})),new oe(n,r,t-n,e-r)}move(t,e){const n=this.bbox();if(t-=n.x,e-=n.y,!isNaN(t)&&!isNaN(e))for(let r=this.length-1;r>=0;r--)this[r]=[this[r][0]+t,this[r][1]+e];return this}parse(t=[0,0]){const e=[];(t=t instanceof Array?Array.prototype.concat.apply([],t):t.trim().split(Ut).map(parseFloat)).length%2!=0&&t.pop();for(let n=0,r=t.length;n<r;n+=2)e.push([t[n],t[n+1]]);return e}size(t,e){let n;const r=this.bbox();for(n=this.length-1;n>=0;n--)r.width&&(this[n][0]=(this[n][0]-r.x)*t/r.width+r.x),r.height&&(this[n][1]=(this[n][1]-r.y)*e/r.height+r.y);return this}toLine(){return{x1:this[0][0],y1:this[0][1],x2:this[1][0],y2:this[1][1]}}toString(){const t=[];for(let e=0,n=this.length;e<n;e++)t.push(this[e].join(","));return t.join(" ")}transform(t){return this.clone().transformO(t)}transformO(t){re.isMatrixLike(t)||(t=new re(t));for(let e=this.length;e--;){const[n,r]=this[e];this[e][0]=t.a*n+t.c*r+t.e,this[e][1]=t.b*n+t.d*r+t.f}return this}};const Je=Qe;const Ke=Object.freeze(Object.defineProperty({__proto__:null,MorphArray:Je,height:function(t){const e=this.bbox();return null==t?e.height:this.size(e.width,t)},width:function(t){const e=this.bbox();return null==t?e.width:this.size(t,e.height)},x:function(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)},y:function(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}},Symbol.toStringTag,{value:"Module"}));let tn=class extends Te{constructor(t,e=t){super(St("line",t),e)}array(){return new Qe([[this.attr("x1"),this.attr("y1")],[this.attr("x2"),this.attr("y2")]])}move(t,e){return this.attr(this.array().move(t,e).toLine())}plot(t,e,n,r){return null==t?this.array():(t=void 0!==e?{x1:t,y1:e,x2:n,y2:r}:new Qe(t).toLine(),this.attr(t))}size(t,e){const n=mt(this,t,e);return this.attr(this.array().size(n.width,n.height).toLine())}};zt(tn,Ke),ht({Container:{line:Pt((function(...t){return tn.prototype.plot.apply(this.put(new tn),null!=t[0]?t:[0,0,0,0])}))}}),Tt(tn,"Line");let en=class extends Ne{constructor(t,e=t){super(St("marker",t),e)}height(t){return this.attr("markerHeight",t)}orient(t){return this.attr("orient",t)}ref(t,e){return this.attr("refX",t).attr("refY",e)}toString(){return"url(#"+this.id()+")"}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}width(t){return this.attr("markerWidth",t)}};function nn(t,e){return function(n){return null==n?this[t]:(this[t]=n,e&&e.call(this),this)}}ht({Container:{marker(...t){return this.defs().marker(...t)}},Defs:{marker:Pt((function(t,e,n){return this.put(new en).size(t,e).ref(t/2,e/2).viewbox(0,0,t,e).attr("orient","auto").update(n)}))},marker:{marker(t,e,n,r){let i=["marker"];return"all"!==t&&i.push(t),i=i.join("-"),t=arguments[1]instanceof en?arguments[1]:this.defs().marker(e,n,r),this.attr(i,t)}}}),Tt(en,"Marker");const rn={"-":function(t){return t},"<>":function(t){return-Math.cos(t*Math.PI)/2+.5},">":function(t){return Math.sin(t*Math.PI/2)},"<":function(t){return 1-Math.cos(t*Math.PI/2)},bezier:function(t,e,n,r){return function(i){return i<0?t>0?e/t*i:n>0?r/n*i:0:i>1?n<1?(1-r)/(1-n)*i+(r-n)/(1-n):t<1?(1-e)/(1-t)*i+(e-t)/(1-t):1:3*i*(1-i)**2*e+3*i**2*(1-i)*r+i**3}},steps:function(t,e="end"){e=e.split("-").reverse()[0];let n=t;return"none"===e?--n:"both"===e&&++n,(r,i=!1)=>{let s=Math.floor(r*t);const o=r*s%1==0;return"start"!==e&&"both"!==e||++s,i&&o&&--s,r>=0&&s<0&&(s=0),r<=1&&s>n&&(s=n),s/n}}};let sn=class{done(){return!1}},on=class extends sn{constructor(t=we){super(),this.ease=rn[t]||t}step(t,e,n){return"number"!=typeof t?n<1?t:e:t+(e-t)*this.ease(n)}},un=class extends sn{constructor(t){super(),this.stepper=t}done(t){return t.done}step(t,e,n,r){return this.stepper(t,e,n,r)}};function an(){const t=(this._duration||500)/1e3,e=this._overshoot||0,n=Math.PI,r=Math.log(e/100+1e-10),i=-r/Math.sqrt(n*n+r*r),s=3.9/(i*t);this.d=2*i*s,this.k=s*s}zt(class extends un{constructor(t=500,e=0){super(),this.duration(t).overshoot(e)}step(t,e,n,r){if("string"==typeof t)return t;if(r.done=n===1/0,n===1/0)return e;if(0===n)return t;n>100&&(n=16),n/=1e3;const i=r.velocity||0,s=-this.d*i-this.k*(t-e),o=t+i*n+s*n*n/2;return r.velocity=i+s*n,r.done=Math.abs(e-o)+Math.abs(i)<.002,r.done?e:o}},{duration:nn("_duration",an),overshoot:nn("_overshoot",an)});zt(class extends un{constructor(t=.1,e=.01,n=0,r=1e3){super(),this.p(t).i(e).d(n).windup(r)}step(t,e,n,r){if("string"==typeof t)return t;if(r.done=n===1/0,n===1/0)return e;if(0===n)return t;const i=e-t;let s=(r.integral||0)+i*n;const o=(i-(r.error||0))/n,u=this._windup;return!1!==u&&(s=Math.max(-u,Math.min(s,u))),r.error=i,r.integral=s,r.done=Math.abs(i)<.001,r.done?e:t+(this.P*i+this.I*s+this.D*o)}},{windup:nn("_windup"),p:nn("P"),i:nn("I"),d:nn("D")});const hn={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0},ln={M:function(t,e,n){return e.x=n.x=t[0],e.y=n.y=t[1],["M",e.x,e.y]},L:function(t,e){return e.x=t[0],e.y=t[1],["L",t[0],t[1]]},H:function(t,e){return e.x=t[0],["H",t[0]]},V:function(t,e){return e.y=t[0],["V",t[0]]},C:function(t,e){return e.x=t[4],e.y=t[5],["C",t[0],t[1],t[2],t[3],t[4],t[5]]},S:function(t,e){return e.x=t[2],e.y=t[3],["S",t[0],t[1],t[2],t[3]]},Q:function(t,e){return e.x=t[2],e.y=t[3],["Q",t[0],t[1],t[2],t[3]]},T:function(t,e){return e.x=t[0],e.y=t[1],["T",t[0],t[1]]},Z:function(t,e,n){return e.x=n.x,e.y=n.y,["Z"]},A:function(t,e){return e.x=t[5],e.y=t[6],["A",t[0],t[1],t[2],t[3],t[4],t[5],t[6]]}},cn="mlhvqtcsaz".split("");for(let wh=0,bh=cn.length;wh<bh;++wh)ln[cn[wh]]=function(t){return function(e,n,r){if("H"===t)e[0]=e[0]+n.x;else if("V"===t)e[0]=e[0]+n.y;else if("A"===t)e[5]=e[5]+n.x,e[6]=e[6]+n.y;else for(let t=0,i=e.length;t<i;++t)e[t]=e[t]+(t%2?n.y:n.x);return ln[t](e,n,r)}}(cn[wh].toUpperCase());function fn(t){return t.segment.length&&t.segment.length-1===hn[t.segment[0].toUpperCase()]}function dn(t,e){t.inNumber&&pn(t,!1);const n=Zt.test(e);if(n)t.segment=[e];else{const e=t.lastCommand,n=e.toLowerCase(),r=e===n;t.segment=["m"===n?r?"l":"L":e]}return t.inSegment=!0,t.lastCommand=t.segment[0],n}function pn(t,e){if(!t.inNumber)throw new Error("Parser Error");t.number&&t.segment.push(parseFloat(t.number)),t.inNumber=e,t.number="",t.pointSeen=!1,t.hasExponent=!1,fn(t)&&mn(t)}function mn(t){t.inSegment=!1,t.absolute&&(t.segment=function(t){const e=t.segment[0];return ln[e](t.segment.slice(1),t.p,t.p0)}(t)),t.segments.push(t.segment)}function gn(t){if(!t.segment.length)return!1;const e="A"===t.segment[0].toUpperCase(),n=t.segment.length;return e&&(4===n||5===n)}function yn(t){return"E"===t.lastToken.toUpperCase()}const _n=new Set([" ",",","\t","\n","\r","\f"]);let vn=class extends Ee{bbox(){return ie().path.setAttribute("d",this.toString()),new oe(ie.nodes.path.getBBox())}move(t,e){const n=this.bbox();if(t-=n.x,e-=n.y,!isNaN(t)&&!isNaN(e))for(let r,i=this.length-1;i>=0;i--)r=this[i][0],"M"===r||"L"===r||"T"===r?(this[i][1]+=t,this[i][2]+=e):"H"===r?this[i][1]+=t:"V"===r?this[i][1]+=e:"C"===r||"S"===r||"Q"===r?(this[i][1]+=t,this[i][2]+=e,this[i][3]+=t,this[i][4]+=e,"C"===r&&(this[i][5]+=t,this[i][6]+=e)):"A"===r&&(this[i][6]+=t,this[i][7]+=e);return this}parse(t="M0 0"){return Array.isArray(t)&&(t=Array.prototype.concat.apply([],t).toString()),function(t,e=!0){let n=0,r="";const i={segment:[],inNumber:!1,number:"",lastToken:"",inSegment:!1,segments:[],pointSeen:!1,hasExponent:!1,absolute:e,p0:new ee,p:new ee};for(;i.lastToken=r,r=t.charAt(n++);)if(i.inSegment||!dn(i,r))if("."!==r)if(isNaN(parseInt(r)))if(_n.has(r))i.inNumber&&pn(i,!1);else if("-"!==r&&"+"!==r)if("E"!==r.toUpperCase()){if(Zt.test(r)){if(i.inNumber)pn(i,!1);else{if(!fn(i))throw new Error("parser Error");mn(i)}--n}}else i.number+=r,i.hasExponent=!0;else{if(i.inNumber&&!yn(i)){pn(i,!1),--n;continue}i.number+=r,i.inNumber=!0}else{if("0"===i.number||gn(i)){i.inNumber=!0,i.number=r,pn(i,!0);continue}i.inNumber=!0,i.number+=r}else{if(i.pointSeen||i.hasExponent){pn(i,!1),--n;continue}i.inNumber=!0,i.pointSeen=!0,i.number+=r}return i.inNumber&&pn(i,!1),i.inSegment&&fn(i)&&mn(i),i.segments}(t)}size(t,e){const n=this.bbox();let r,i;for(n.width=0===n.width?1:n.width,n.height=0===n.height?1:n.height,r=this.length-1;r>=0;r--)i=this[r][0],"M"===i||"L"===i||"T"===i?(this[r][1]=(this[r][1]-n.x)*t/n.width+n.x,this[r][2]=(this[r][2]-n.y)*e/n.height+n.y):"H"===i?this[r][1]=(this[r][1]-n.x)*t/n.width+n.x:"V"===i?this[r][1]=(this[r][1]-n.y)*e/n.height+n.y:"C"===i||"S"===i||"Q"===i?(this[r][1]=(this[r][1]-n.x)*t/n.width+n.x,this[r][2]=(this[r][2]-n.y)*e/n.height+n.y,this[r][3]=(this[r][3]-n.x)*t/n.width+n.x,this[r][4]=(this[r][4]-n.y)*e/n.height+n.y,"C"===i&&(this[r][5]=(this[r][5]-n.x)*t/n.width+n.x,this[r][6]=(this[r][6]-n.y)*e/n.height+n.y)):"A"===i&&(this[r][1]=this[r][1]*t/n.width,this[r][2]=this[r][2]*e/n.height,this[r][6]=(this[r][6]-n.x)*t/n.width+n.x,this[r][7]=(this[r][7]-n.y)*e/n.height+n.y);return this}toString(){return function(t){let e="";for(let n=0,r=t.length;n<r;n++)e+=t[n][0],null!=t[n][1]&&(e+=t[n][1],null!=t[n][2]&&(e+=" ",e+=t[n][2],null!=t[n][3]&&(e+=" ",e+=t[n][3],e+=" ",e+=t[n][4],null!=t[n][5]&&(e+=" ",e+=t[n][5],e+=" ",e+=t[n][6],null!=t[n][7]&&(e+=" ",e+=t[n][7])))));return e+" "}(this)}};const wn=t=>{const e=typeof t;return"number"===e?Oe:"string"===e?te.isColor(t)?te:Ut.test(t)?Zt.test(t)?vn:Ee:Dt.test(t)?Oe:xn:kn.indexOf(t.constructor)>-1?t.constructor:Array.isArray(t)?Ee:"object"===e?Mn:xn};let bn=class{constructor(t){this._stepper=t||new on("-"),this._from=null,this._to=null,this._type=null,this._context=null,this._morphObj=null}at(t){return this._morphObj.morph(this._from,this._to,t,this._stepper,this._context)}done(){return this._context.map(this._stepper.done).reduce((function(t,e){return t&&e}),!0)}from(t){return null==t?this._from:(this._from=this._set(t),this)}stepper(t){return null==t?this._stepper:(this._stepper=t,this)}to(t){return null==t?this._to:(this._to=this._set(t),this)}type(t){return null==t?this._type:(this._type=t,this)}_set(t){this._type||this.type(wn(t));let e=new this._type(t);return this._type===te&&(e=this._to?e[this._to[4]]():this._from?e[this._from[4]]():e),this._type===Mn&&(e=this._to?e.align(this._to):this._from?e.align(this._from):e),e=e.toConsumable(),this._morphObj=this._morphObj||new this._type,this._context=this._context||Array.apply(null,Array(e.length)).map(Object).map((function(t){return t.done=!0,t})),e}},xn=class{constructor(...t){this.init(...t)}init(t){return t=Array.isArray(t)?t[0]:t,this.value=t,this}toArray(){return[this.value]}valueOf(){return this.value}},En=class t{constructor(...t){this.init(...t)}init(e){return Array.isArray(e)&&(e={scaleX:e[0],scaleY:e[1],shear:e[2],rotate:e[3],translateX:e[4],translateY:e[5],originX:e[6],originY:e[7]}),Object.assign(this,t.defaults,e),this}toArray(){const t=this;return[t.scaleX,t.scaleY,t.shear,t.rotate,t.translateX,t.translateY,t.originX,t.originY]}};En.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0};const On=(t,e)=>t[0]<e[0]?-1:t[0]>e[0]?1:0;let Mn=class{constructor(...t){this.init(...t)}align(t){const e=this.values;for(let n=0,r=e.length;n<r;++n){if(e[n+1]===t[n+1]){if(e[n+1]===te&&t[n+7]!==e[n+7]){const e=t[n+7],r=new te(this.values.splice(n+3,5))[e]().toArray();this.values.splice(n+3,0,...r)}n+=e[n+2]+2;continue}if(!t[n+1])return this;const r=(new t[n+1]).toArray(),i=e[n+2]+3;e.splice(n,i,t[n],t[n+1],t[n+2],...r),n+=e[n+2]+2}return this}init(t){if(this.values=[],Array.isArray(t))return void(this.values=t.slice());t=t||{};const e=[];for(const n in t){const r=wn(t[n]),i=new r(t[n]).toArray();e.push([n,r,i.length,...i])}return e.sort(On),this.values=e.reduce(((t,e)=>t.concat(e)),[]),this}toArray(){return this.values}valueOf(){const t={},e=this.values;for(;e.length;){const n=e.shift(),r=e.shift(),i=e.shift(),s=e.splice(0,i);t[n]=new r(s)}return t}};const kn=[xn,En,Mn];let Cn=class extends Te{constructor(t,e=t){super(St("path",t),e)}array(){return this._array||(this._array=new vn(this.attr("d")))}clear(){return delete this._array,this}height(t){return null==t?this.bbox().height:this.size(this.bbox().width,t)}move(t,e){return this.attr("d",this.array().move(t,e))}plot(t){return null==t?this.array():this.clear().attr("d","string"==typeof t?t:this._array=new vn(t))}size(t,e){const n=mt(this,t,e);return this.attr("d",this.array().size(n.width,n.height))}width(t){return null==t?this.bbox().width:this.size(t,this.bbox().height)}x(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}y(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}};Cn.prototype.MorphArray=vn,ht({Container:{path:Pt((function(t){return this.put(new Cn).plot(t||new vn)}))}}),Tt(Cn,"Path");const An=Object.freeze(Object.defineProperty({__proto__:null,array:function(){return this._array||(this._array=new Qe(this.attr("points")))},clear:function(){return delete this._array,this},move:function(t,e){return this.attr("points",this.array().move(t,e))},plot:function(t){return null==t?this.array():this.clear().attr("points","string"==typeof t?t:this._array=new Qe(t))},size:function(t,e){const n=mt(this,t,e);return this.attr("points",this.array().size(n.width,n.height))}},Symbol.toStringTag,{value:"Module"}));let Sn=class extends Te{constructor(t,e=t){super(St("polygon",t),e)}};ht({Container:{polygon:Pt((function(t){return this.put(new Sn).plot(t||new Qe)}))}}),zt(Sn,Ke),zt(Sn,An),Tt(Sn,"Polygon");let Nn=class extends Te{constructor(t,e=t){super(St("polyline",t),e)}};ht({Container:{polyline:Pt((function(t){return this.put(new Nn).plot(t||new Qe)}))}}),zt(Nn,Ke),zt(Nn,An),Tt(Nn,"Polyline");let jn=class extends Te{constructor(t,e=t){super(St("rect",t),e)}};zt(jn,{rx:Ie,ry:Re}),ht({Container:{rect:Pt((function(t,e){return this.put(new jn).size(t,e)}))}}),Tt(jn,"Rect");let Tn=class{constructor(){this._first=null,this._last=null}first(){return this._first&&this._first.value}last(){return this._last&&this._last.value}push(t){const e=void 0!==t.next?t:{value:t,next:null,prev:null};return this._last?(e.prev=this._last,this._last.next=e,this._last=e):(this._last=e,this._first=e),e}remove(t){t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t===this._last&&(this._last=t.prev),t===this._first&&(this._first=t.next),t.prev=null,t.next=null}shift(){const t=this._first;return t?(this._first=t.next,this._first&&(this._first.prev=null),this._last=this._first?this._last:null,t.value):null}};const In={nextDraw:null,frames:new Tn,timeouts:new Tn,immediates:new Tn,timer:()=>Et.window.performance||Et.window.Date,transforms:[],frame(t){const e=In.frames.push({run:t});return null===In.nextDraw&&(In.nextDraw=Et.window.requestAnimationFrame(In._draw)),e},timeout(t,e){e=e||0;const n=In.timer().now()+e,r=In.timeouts.push({run:t,time:n});return null===In.nextDraw&&(In.nextDraw=Et.window.requestAnimationFrame(In._draw)),r},immediate(t){const e=In.immediates.push(t);return null===In.nextDraw&&(In.nextDraw=Et.window.requestAnimationFrame(In._draw)),e},cancelFrame(t){null!=t&&In.frames.remove(t)},clearTimeout(t){null!=t&&In.timeouts.remove(t)},cancelImmediate(t){null!=t&&In.immediates.remove(t)},_draw(t){let e=null;const n=In.timeouts.last();for(;(e=In.timeouts.shift())&&(t>=e.time?e.run():In.timeouts.push(e),e!==n););let r=null;const i=In.frames.last();for(;r!==i&&(r=In.frames.shift());)r.run(t);let s=null;for(;s=In.immediates.shift();)s();In.nextDraw=In.timeouts.first()||In.frames.first()?Et.window.requestAnimationFrame(In._draw):null}},Rn=function(t){const e=t.start,n=t.runner.duration();return{start:e,duration:n,end:e+n,runner:t.runner}},Ln=function(){const t=Et.window;return(t.performance||t.Date).now()};let zn=class extends ye{constructor(t=Ln){super(),this._timeSource=t,this.terminate()}active(){return!!this._nextFrame}finish(){return this.time(this.getEndTimeOfTimeline()+1),this.pause()}getEndTime(){const t=this.getLastRunnerInfo(),e=t?t.runner.duration():0;return(t?t.start:this._time)+e}getEndTimeOfTimeline(){const t=this._runners.map((t=>t.start+t.runner.duration()));return Math.max(0,...t)}getLastRunnerInfo(){return this.getRunnerInfoById(this._lastRunnerId)}getRunnerInfoById(t){return this._runners[this._runnerIds.indexOf(t)]||null}pause(){return this._paused=!0,this._continue()}persist(t){return null==t?this._persist:(this._persist=t,this)}play(){return this._paused=!1,this.updateTime()._continue()}reverse(t){const e=this.speed();if(null==t)return this.speed(-e);const n=Math.abs(e);return this.speed(t?-n:n)}schedule(t,e,n){if(null==t)return this._runners.map(Rn);let r=0;const i=this.getEndTime();if(e=e||0,null==n||"last"===n||"after"===n)r=i;else if("absolute"===n||"start"===n)r=e,e=0;else if("now"===n)r=this._time;else if("relative"===n){const n=this.getRunnerInfoById(t.id);n&&(r=n.start+e,e=0)}else{if("with-last"!==n)throw new Error('Invalid value for the "when" parameter');{const t=this.getLastRunnerInfo();r=t?t.start:this._time}}t.unschedule(),t.timeline(this);const s=t.persist(),o={persist:null===s?this._persist:s,start:r+e,runner:t};return this._lastRunnerId=t.id,this._runners.push(o),this._runners.sort(((t,e)=>t.start-e.start)),this._runnerIds=this._runners.map((t=>t.runner.id)),this.updateTime()._continue(),this}seek(t){return this.time(this._time+t)}source(t){return null==t?this._timeSource:(this._timeSource=t,this)}speed(t){return null==t?this._speed:(this._speed=t,this)}stop(){return this.time(0),this.pause()}time(t){return null==t?this._time:(this._time=t,this._continue(!0))}unschedule(t){const e=this._runnerIds.indexOf(t.id);return e<0||(this._runners.splice(e,1),this._runnerIds.splice(e,1),t.timeline(null)),this}updateTime(){return this.active()||(this._lastSourceTime=this._timeSource()),this}_continue(t=!1){return In.cancelFrame(this._nextFrame),this._nextFrame=null,t?this._stepImmediate():(this._paused||(this._nextFrame=In.frame(this._step)),this)}_stepFn(t=!1){const e=this._timeSource();let n=e-this._lastSourceTime;t&&(n=0);const r=this._speed*n+(this._time-this._lastStepTime);this._lastSourceTime=e,t||(this._time+=r,this._time=this._time<0?0:this._time),this._lastStepTime=this._time,this.fire("time",this._time);for(let s=this._runners.length;s--;){const t=this._runners[s],e=t.runner;this._time-t.start<=0&&e.reset()}let i=!1;for(let s=0,o=this._runners.length;s<o;s++){const t=this._runners[s],e=t.runner;let n=r;const u=this._time-t.start;if(u<=0){i=!0;continue}if(u<n&&(n=u),!e.active())continue;if(e.step(n).done){if(!0!==t.persist){e.duration()-e.time()+this._time+t.persist<this._time&&(e.unschedule(),--s,--o)}}else i=!0}return i&&!(this._speed<0&&0===this._time)||this._runnerIds.length&&this._speed<0&&this._time>0?this._continue():(this.pause(),this.fire("finished")),this}terminate(){this._startTime=0,this._speed=1,this._persist=0,this._nextFrame=null,this._paused=!0,this._runners=[],this._runnerIds=[],this._lastRunnerId=-1,this._time=0,this._lastSourceTime=0,this._lastStepTime=0,this._step=this._stepFn.bind(this,!1),this._stepImmediate=this._stepFn.bind(this,!0)}};ht({Element:{timeline:function(t){return null==t?(this._timeline=this._timeline||new zn,this._timeline):(this._timeline=t,this)}}});let Pn=class t extends ye{constructor(e){super(),this.id=t.id++,e="function"==typeof(e=null==e?ve:e)?new un(e):e,this._element=null,this._timeline=null,this.done=!1,this._queue=[],this._duration="number"==typeof e&&e,this._isDeclarative=e instanceof un,this._stepper=this._isDeclarative?e:new on,this._history={},this.enabled=!0,this._time=0,this._lastTime=0,this._reseted=!0,this.transforms=new re,this.transformId=1,this._haveReversed=!1,this._reverse=!1,this._loopsDone=0,this._swing=!1,this._wait=0,this._times=1,this._frameId=null,this._persist=!!this._isDeclarative||null}static sanitise(t,e,n){let r=1,i=!1,s=0;return e=e??be,n=n||"last","object"!=typeof(t=t??ve)||t instanceof sn||(e=t.delay??e,n=t.when??n,i=t.swing||i,r=t.times??r,s=t.wait??s,t=t.duration??ve),{duration:t,delay:e,swing:i,times:r,wait:s,when:n}}active(t){return null==t?this.enabled:(this.enabled=t,this)}addTransform(t){return this.transforms.lmultiplyO(t),this}after(t){return this.on("finished",t)}animate(e,n,r){const i=t.sanitise(e,n,r),s=new t(i.duration);return this._timeline&&s.timeline(this._timeline),this._element&&s.element(this._element),s.loop(i).schedule(i.delay,i.when)}clearTransform(){return this.transforms=new re,this}clearTransformsFromQueue(){this.done&&this._timeline&&this._timeline._runnerIds.includes(this.id)||(this._queue=this._queue.filter((t=>!t.isTransform)))}delay(t){return this.animate(0,t)}duration(){return this._times*(this._wait+this._duration)-this._wait}during(t){return this.queue(null,t)}ease(t){return this._stepper=new on(t),this}element(t){return null==t?this._element:(this._element=t,t._prepareRunner(),this)}finish(){return this.step(1/0)}loop(t,e,n){return"object"==typeof t&&(e=t.swing,n=t.wait,t=t.times),this._times=t||1/0,this._swing=e||!1,this._wait=n||0,!0===this._times&&(this._times=1/0),this}loops(t){const e=this._duration+this._wait;if(null==t){const t=Math.floor(this._time/e),n=(this._time-t*e)/this._duration;return Math.min(t+n,this._times)}const n=t%1,r=e*Math.floor(t)+this._duration*n;return this.time(r)}persist(t){return null==t?this._persist:(this._persist=t,this)}position(t){const e=this._time,n=this._duration,r=this._wait,i=this._times,s=this._swing,o=this._reverse;let u;if(null==t){const t=function(t){const e=s*Math.floor(t%(2*(r+n))/(r+n)),i=e&&!o||!e&&o,u=Math.pow(-1,i)*(t%(r+n))/n+i;return Math.max(Math.min(u,1),0)},a=i*(r+n)-r;return u=e<=0?Math.round(t(1e-5)):e<a?t(e):Math.round(t(a-1e-5)),u}const a=Math.floor(this.loops()),h=s&&a%2==0;return u=a+(h&&!o||o&&h?t:1-t),this.loops(u)}progress(t){return null==t?Math.min(1,this._time/this.duration()):this.time(t*this.duration())}queue(t,e,n,r){this._queue.push({initialiser:t||_e,runner:e||_e,retarget:n,isTransform:r,initialised:!1,finished:!1});return this.timeline()&&this.timeline()._continue(),this}reset(){return this._reseted||(this.time(0),this._reseted=!0),this}reverse(t){return this._reverse=null==t?!this._reverse:t,this}schedule(t,e,n){if(t instanceof zn||(n=e,e=t,t=this.timeline()),!t)throw Error("Runner cannot be scheduled without timeline");return t.schedule(this,e,n),this}step(t){if(!this.enabled)return this;t=null==t?16:t,this._time+=t;const e=this.position(),n=this._lastPosition!==e&&this._time>=0;this._lastPosition=e;const r=this.duration(),i=this._lastTime<=0&&this._time>0,s=this._lastTime<r&&this._time>=r;this._lastTime=this._time,i&&this.fire("start",this);const o=this._isDeclarative;this.done=!o&&!s&&this._time>=r,this._reseted=!1;let u=!1;return(n||o)&&(this._initialise(n),this.transforms=new re,u=this._run(o?t:e),this.fire("step",this)),this.done=this.done||u&&o,s&&this.fire("finished",this),this}time(t){if(null==t)return this._time;const e=t-this._time;return this.step(e),this}timeline(t){return void 0===t?this._timeline:(this._timeline=t,this)}unschedule(){const t=this.timeline();return t&&t.unschedule(this),this}_initialise(t){if(t||this._isDeclarative)for(let e=0,n=this._queue.length;e<n;++e){const n=this._queue[e],r=this._isDeclarative||!n.initialised&&t;t=!n.finished,r&&t&&(n.initialiser.call(this),n.initialised=!0)}}_rememberMorpher(t,e){if(this._history[t]={morpher:e,caller:this._queue[this._queue.length-1]},this._isDeclarative){const t=this.timeline();t&&t.play()}}_run(t){let e=!0;for(let n=0,r=this._queue.length;n<r;++n){const r=this._queue[n],i=r.runner.call(this,t);r.finished=r.finished||!0===i,e=e&&r.finished}return e}_tryRetarget(t,e,n){if(this._history[t]){if(!this._history[t].caller.initialised){const e=this._queue.indexOf(this._history[t].caller);return this._queue.splice(e,1),!1}this._history[t].caller.retarget?this._history[t].caller.retarget.call(this,e,n):this._history[t].morpher.to(e),this._history[t].caller.finished=!1;const r=this.timeline();return r&&r.play(),!0}return!1}};Pn.id=0;let Dn=class{constructor(t=new re,e=-1,n=!0){this.transforms=t,this.id=e,this.done=n}clearTransformsFromQueue(){}};zt([Pn,Dn],{mergeWith(t){return new Dn(t.transforms.lmultiply(this.transforms),t.id)}});const Fn=(t,e)=>t.lmultiplyO(e),$n=t=>t.transforms;function Yn(){const t=this._transformationRunners.runners.map($n).reduce(Fn,new re);this.transform(t),this._transformationRunners.merge(),1===this._transformationRunners.length()&&(this._frameId=null)}let Gn=class{constructor(){this.runners=[],this.ids=[]}add(t){if(this.runners.includes(t))return;const e=t.id+1;return this.runners.push(t),this.ids.push(e),this}clearBefore(t){const e=this.ids.indexOf(t+1)||1;return this.ids.splice(0,e,0),this.runners.splice(0,e,new Dn).forEach((t=>t.clearTransformsFromQueue())),this}edit(t,e){const n=this.ids.indexOf(t+1);return this.ids.splice(n,1,t+1),this.runners.splice(n,1,e),this}getByID(t){return this.runners[this.ids.indexOf(t+1)]}length(){return this.ids.length}merge(){let t=null;for(let e=0;e<this.runners.length;++e){const n=this.runners[e];if(t&&n.done&&t.done&&(!n._timeline||!n._timeline._runnerIds.includes(n.id))&&(!t._timeline||!t._timeline._runnerIds.includes(t.id))){this.remove(n.id);const r=n.mergeWith(t);this.edit(t.id,r),t=r,--e}else t=n}return this}remove(t){const e=this.ids.indexOf(t+1);return this.ids.splice(e,1),this.runners.splice(e,1),this}};ht({Element:{animate(t,e,n){const r=Pn.sanitise(t,e,n),i=this.timeline();return new Pn(r.duration).loop(r).element(this).timeline(i.play()).schedule(r.delay,r.when)},delay(t,e){return this.animate(0,t,e)},_clearTransformRunnersBefore(t){this._transformationRunners.clearBefore(t.id)},_currentTransform(t){return this._transformationRunners.runners.filter((e=>e.id<=t.id)).map($n).reduce(Fn,new re)},_addRunner(t){this._transformationRunners.add(t),In.cancelImmediate(this._frameId),this._frameId=In.immediate(Yn.bind(this))},_prepareRunner(){null==this._frameId&&(this._transformationRunners=(new Gn).add(new Dn(new re(this))))}}});zt(Pn,{attr(t,e){return this.styleAttr("attr",t,e)},css(t,e){return this.styleAttr("css",t,e)},styleAttr(t,e,n){if("string"==typeof e)return this.styleAttr(t,{[e]:n});let r=e;if(this._tryRetarget(t,r))return this;let i=new bn(this._stepper).to(r),s=Object.keys(r);return this.queue((function(){i=i.from(this.element()[t](s))}),(function(e){return this.element()[t](i.at(e).valueOf()),i.done()}),(function(e){const n=Object.keys(e),o=(u=s,n.filter((t=>!u.includes(t))));var u;if(o.length){const e=this.element()[t](o),n=new Mn(i.from()).valueOf();Object.assign(n,e),i.from(n)}const a=new Mn(i.to()).valueOf();Object.assign(a,e),i.to(a),s=n,r=e})),this._rememberMorpher(t,i),this},zoom(t,e){if(this._tryRetarget("zoom",t,e))return this;let n=new bn(this._stepper).to(new Oe(t));return this.queue((function(){n=n.from(this.element().zoom())}),(function(t){return this.element().zoom(n.at(t),e),n.done()}),(function(t,r){e=r,n.to(t)})),this._rememberMorpher("zoom",n),this},transform(t,e,n){if(e=t.relative||e,this._isDeclarative&&!e&&this._tryRetarget("transform",t))return this;const r=re.isMatrixLike(t);n=null!=t.affine?t.affine:null!=n?n:!r;const i=new bn(this._stepper).type(n?En:re);let s,o,u,a,h;return this.queue((function(){o=o||this.element(),s=s||gt(t,o),h=new re(e?void 0:o),o._addRunner(this),e||o._clearTransformRunnersBefore(this)}),(function(l){e||this.clearTransform();const{x:c,y:f}=new ee(s).transform(o._currentTransform(this));let d=new re({...t,origin:[c,f]}),p=this._isDeclarative&&u?u:h;if(n){d=d.decompose(c,f),p=p.decompose(c,f);const t=d.rotate,e=p.rotate,n=[t-360,t,t+360],r=n.map((t=>Math.abs(t-e))),i=Math.min(...r),s=r.indexOf(i);d.rotate=n[s]}e&&(r||(d.rotate=t.rotate||0),this._isDeclarative&&a&&(p.rotate=a)),i.from(p),i.to(d);const m=i.at(l);return a=m.rotate,u=new re(m),this.addTransform(u),o._addRunner(this),i.done()}),(function(e){(e.origin||"center").toString()!==(t.origin||"center").toString()&&(s=gt(e,o)),t={...e,origin:s}}),!0),this._isDeclarative&&this._rememberMorpher("transform",i),this},x(t){return this._queueNumber("x",t)},y(t){return this._queueNumber("y",t)},ax(t){return this._queueNumber("ax",t)},ay(t){return this._queueNumber("ay",t)},dx(t=0){return this._queueNumberDelta("x",t)},dy(t=0){return this._queueNumberDelta("y",t)},dmove(t,e){return this.dx(t).dy(e)},_queueNumberDelta(t,e){if(e=new Oe(e),this._tryRetarget(t,e))return this;const n=new bn(this._stepper).to(e);let r=null;return this.queue((function(){r=this.element()[t](),n.from(r),n.to(r+e)}),(function(e){return this.element()[t](n.at(e)),n.done()}),(function(t){n.to(r+new Oe(t))})),this._rememberMorpher(t,n),this},_queueObject(t,e){if(this._tryRetarget(t,e))return this;const n=new bn(this._stepper).to(e);return this.queue((function(){n.from(this.element()[t]())}),(function(e){return this.element()[t](n.at(e)),n.done()})),this._rememberMorpher(t,n),this},_queueNumber(t,e){return this._queueObject(t,new Oe(e))},cx(t){return this._queueNumber("cx",t)},cy(t){return this._queueNumber("cy",t)},move(t,e){return this.x(t).y(e)},amove(t,e){return this.ax(t).ay(e)},center(t,e){return this.cx(t).cy(e)},size(t,e){let n;return t&&e||(n=this._element.bbox()),t||(t=n.width/n.height*e),e||(e=n.height/n.width*t),this.width(t).height(e)},width(t){return this._queueNumber("width",t)},height(t){return this._queueNumber("height",t)},plot(t,e,n,r){if(4===arguments.length)return this.plot([t,e,n,r]);if(this._tryRetarget("plot",t))return this;const i=new bn(this._stepper).type(this._element.MorphArray).to(t);return this.queue((function(){i.from(this._element.array())}),(function(t){return this._element.plot(i.at(t)),i.done()})),this._rememberMorpher("plot",i),this},leading(t){return this._queueNumber("leading",t)},viewbox(t,e,n,r){return this._queueObject("viewbox",new oe(t,e,n,r))},update(t){return"object"!=typeof t?this.update({offset:arguments[0],color:arguments[1],opacity:arguments[2]}):(null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",t.offset),this)}}),zt(Pn,{rx:Ie,ry:Re,from:Be,to:qe}),Tt(Pn,"Runner");let Xn=class extends Ne{constructor(t,e=t){super(St("svg",t),e),this.namespace()}defs(){return this.isRoot()?Nt(this.node.querySelector("defs"))||this.put(new je):this.root().defs()}isRoot(){return!this.node.parentNode||!(this.node.parentNode instanceof Et.window.SVGElement)&&"#document-fragment"!==this.node.parentNode.nodeName}namespace(){return this.isRoot()?this.attr({xmlns:wt,version:"1.1"}).attr("xmlns:xlink",xt,bt):this.root().namespace()}removeNamespace(){return this.attr({xmlns:null,version:null}).attr("xmlns:xlink",null,bt).attr("xmlns:svgjs",null,bt)}root(){return this.isRoot()?this:super.root()}};ht({Container:{nested:Pt((function(){return this.put(new Xn)}))}}),Tt(Xn,"Svg",!0);let Bn=class extends Ne{constructor(t,e=t){super(St("symbol",t),e)}};ht({Container:{symbol:Pt((function(){return this.put(new Bn)}))}}),Tt(Bn,"Symbol");const qn=Object.freeze(Object.defineProperty({__proto__:null,amove:function(t,e){return this.ax(t).ay(e)},ax:function(t){return this.attr("x",t)},ay:function(t){return this.attr("y",t)},build:function(t){return this._build=!!t,this},center:function(t,e,n=this.bbox()){return this.cx(t,n).cy(e,n)},cx:function(t,e=this.bbox()){return null==t?e.cx:this.attr("x",this.attr("x")+t-e.cx)},cy:function(t,e=this.bbox()){return null==t?e.cy:this.attr("y",this.attr("y")+t-e.cy)},length:function(){return this.node.getComputedTextLength()},move:function(t,e,n=this.bbox()){return this.x(t,n).y(e,n)},plain:function(t){return!1===this._build&&this.clear(),this.node.appendChild(Et.document.createTextNode(t)),this},x:function(t,e=this.bbox()){return null==t?e.x:this.attr("x",this.attr("x")+t-e.x)},y:function(t,e=this.bbox()){return null==t?e.y:this.attr("y",this.attr("y")+t-e.y)}},Symbol.toStringTag,{value:"Module"}));let Vn=class extends Te{constructor(t,e=t){super(St("text",t),e),this.dom.leading=this.dom.leading??new Oe(1.3),this._rebuild=!0,this._build=!1}leading(t){return null==t?this.dom.leading:(this.dom.leading=new Oe(t),this.rebuild())}rebuild(t){if("boolean"==typeof t&&(this._rebuild=t),this._rebuild){const t=this;let e=0;const n=this.dom.leading;this.each((function(r){if(_t(this.node))return;const i=Et.window.getComputedStyle(this.node).getPropertyValue("font-size"),s=n*new Oe(i);this.dom.newLined&&(this.attr("x",t.attr("x")),"\n"===this.text()?e+=s:(this.attr("dy",r?s+e:0),e=0))})),this.fire("rebuild")}return this}setData(t){return this.dom=t,this.dom.leading=new Oe(t.leading||1.3),this}writeDataToDom(){return vt(this,this.dom,{leading:1.3}),this}text(t){if(void 0===t){const e=this.node.childNodes;let n=0;t="";for(let r=0,i=e.length;r<i;++r)"textPath"===e[r].nodeName||_t(e[r])?0===r&&(n=r+1):(r!==n&&3!==e[r].nodeType&&!0===Nt(e[r]).dom.newLined&&(t+="\n"),t+=e[r].textContent);return t}if(this.clear().build(!0),"function"==typeof t)t.call(this,this);else for(let e=0,n=(t=(t+"").split("\n")).length;e<n;e++)this.newLine(t[e]);return this.build(!1).rebuild()}};zt(Vn,qn),ht({Container:{text:Pt((function(t=""){return this.put(new Vn).text(t)})),plain:Pt((function(t=""){return this.put(new Vn).plain(t)}))}}),Tt(Vn,"Text");let Wn=class extends Te{constructor(t,e=t){super(St("tspan",t),e),this._build=!1}dx(t){return this.attr("dx",t)}dy(t){return this.attr("dy",t)}newLine(){this.dom.newLined=!0;const t=this.parent();if(!(t instanceof Vn))return this;const e=t.index(this),n=Et.window.getComputedStyle(this.node).getPropertyValue("font-size"),r=t.dom.leading*new Oe(n);return this.dy(e?r:0).attr("x",t.x())}text(t){return null==t?this.node.textContent+(this.dom.newLined?"\n":""):("function"==typeof t?(this.clear().build(!0),t.call(this,this),this.build(!1)):this.plain(t),this)}};zt(Wn,qn),ht({Tspan:{tspan:Pt((function(t=""){const e=new Wn;return this._build||this.clear(),this.put(e).text(t)}))},Text:{newLine:function(t=""){return this.tspan(t).newLine()}}}),Tt(Wn,"Tspan");let Hn=class extends Te{constructor(t,e=t){super(St("circle",t),e)}radius(t){return this.attr("r",t)}rx(t){return this.attr("r",t)}ry(t){return this.rx(t)}size(t){return this.radius(new Oe(t).divide(2))}};zt(Hn,{x:Le,y:ze,cx:Pe,cy:De,width:Fe,height:$e}),ht({Container:{circle:Pt((function(t=0){return this.put(new Hn).size(t).move(0,0)}))}}),Tt(Hn,"Circle");let Un=class extends Ne{constructor(t,e=t){super(St("clipPath",t),e)}remove(){return this.targets().forEach((function(t){t.unclip()})),super.remove()}targets(){return le("svg [clip-path*="+this.id()+"]")}};ht({Container:{clip:Pt((function(){return this.defs().put(new Un)}))},Element:{clipper(){return this.reference("clip-path")},clipWith(t){const e=t instanceof Un?t:this.parent().clip().add(t);return this.attr("clip-path","url(#"+e.id()+")")},unclip(){return this.attr("clip-path",null)}}}),Tt(Un,"ClipPath");let Zn=class extends Ae{constructor(t,e=t){super(St("foreignObject",t),e)}};ht({Container:{foreignObject:Pt((function(t,e){return this.put(new Zn).size(t,e)}))}}),Tt(Zn,"ForeignObject");const Qn=Object.freeze(Object.defineProperty({__proto__:null,dmove:function(t,e){return this.children().forEach((n=>{let r;try{r=n.node instanceof Et.window.SVGSVGElement?new oe(n.attr(["x","y","width","height"])):n.bbox()}catch(u){return}const i=new re(n),s=i.translate(t,e).transform(i.inverse()),o=new ee(r.x,r.y).transform(s);n.move(o.x,o.y)})),this},dx:function(t){return this.dmove(t,0)},dy:function(t){return this.dmove(0,t)},height:function(t,e=this.bbox()){return null==t?e.height:this.size(e.width,t,e)},move:function(t=0,e=0,n=this.bbox()){const r=t-n.x,i=e-n.y;return this.dmove(r,i)},size:function(t,e,n=this.bbox()){const r=mt(this,t,e,n),i=r.width/n.width,s=r.height/n.height;return this.children().forEach((t=>{const e=new ee(n).transform(new re(t).inverse());t.scale(i,s,e.x,e.y)})),this},width:function(t,e=this.bbox()){return null==t?e.width:this.size(t,e.height,e)},x:function(t,e=this.bbox()){return null==t?e.x:this.move(t,e.y,e)},y:function(t,e=this.bbox()){return null==t?e.y:this.move(e.x,t,e)}},Symbol.toStringTag,{value:"Module"}));let Jn=class extends Ne{constructor(t,e=t){super(St("g",t),e)}};zt(Jn,Qn),ht({Container:{group:Pt((function(){return this.put(new Jn)}))}}),Tt(Jn,"G");let Kn=class extends Ne{constructor(t,e=t){super(St("a",t),e)}target(t){return this.attr("target",t)}to(t){return this.attr("href",t,xt)}};zt(Kn,Qn),ht({Container:{link:Pt((function(t){return this.put(new Kn).to(t)}))},Element:{unlink(){const t=this.linker();if(!t)return this;const e=t.parent();if(!e)return this.remove();const n=e.index(t);return e.add(this,n),t.remove(),this},linkTo(t){let e=this.linker();return e||(e=new Kn,this.wrap(e)),"function"==typeof t?t.call(e,e):e.to(t),this},linker(){const t=this.parent();return t&&"a"===t.node.nodeName.toLowerCase()?t:null}}}),Tt(Kn,"A");let tr=class extends Ne{constructor(t,e=t){super(St("mask",t),e)}remove(){return this.targets().forEach((function(t){t.unmask()})),super.remove()}targets(){return le("svg [mask*="+this.id()+"]")}};ht({Container:{mask:Pt((function(){return this.defs().put(new tr)}))},Element:{masker(){return this.reference("mask")},maskWith(t){const e=t instanceof tr?t:this.parent().mask().add(t);return this.attr("mask","url(#"+e.id()+")")},unmask(){return this.attr("mask",null)}}}),Tt(tr,"Mask");let er=class extends Ae{constructor(t,e=t){super(St("stop",t),e)}update(t){return("number"==typeof t||t instanceof Oe)&&(t={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",new Oe(t.offset)),this}};ht({Gradient:{stop:function(t,e,n){return this.put(new er).update(t,e,n)}}}),Tt(er,"Stop");let nr=class extends Ae{constructor(t,e=t){super(St("style",t),e)}addText(t=""){return this.node.textContent+=t,this}font(t,e,n={}){return this.rule("@font-face",{fontFamily:t,src:e,...n})}rule(t,e){return this.addText(function(t,e){if(!t)return"";if(!e)return t;let n=t+"{";for(const r in e)n+=r.replace(/([A-Z])/g,(function(t,e){return"-"+e.toLowerCase()}))+":"+e[r]+";";return n+="}",n}(t,e))}};ht("Dom",{style(t,e){return this.put(new nr).rule(t,e)},fontface(t,e,n){return this.put(new nr).font(t,e,n)}}),Tt(nr,"Style");let rr=class extends Vn{constructor(t,e=t){super(St("textPath",t),e)}array(){const t=this.track();return t?t.array():null}plot(t){const e=this.track();let n=null;return e&&(n=e.plot(t)),null==t?n:this}track(){return this.reference("href")}};ht({Container:{textPath:Pt((function(t,e){return t instanceof Vn||(t=this.text(t)),t.path(e)}))},Text:{path:Pt((function(t,e=!0){const n=new rr;let r;if(t instanceof Cn||(t=this.defs().path(t)),n.attr("href","#"+t,xt),e)for(;r=this.node.firstChild;)n.node.appendChild(r);return this.put(n)})),textPath(){return this.findOne("textPath")}},Path:{text:Pt((function(t){return t instanceof Vn||(t=(new Vn).addTo(this.parent()).text(t)),t.path(this)})),targets(){return le("svg textPath").filter((t=>(t.attr("href")||"").includes(this.id())))}}}),rr.prototype.MorphArray=vn,Tt(rr,"TextPath");let ir=class extends Te{constructor(t,e=t){super(St("use",t),e)}use(t,e){return this.attr("href",(e||"")+"#"+t,xt)}};function sr(){}ht({Container:{use:Pt((function(t,e){return this.put(new ir).use(t,e)}))}}),Tt(ir,"Use"),zt([Xn,Bn,Ue,He,en],lt("viewbox")),zt([tn,Nn,Sn,Cn],lt("marker")),zt(Vn,lt("Text")),zt(Cn,lt("Path")),zt(je,lt("Defs")),zt([Vn,Wn],lt("Tspan")),zt([jn,Ge,We,Pn],lt("radius")),zt(ye,lt("EventTarget")),zt(Ce,lt("Dom")),zt(Ae,lt("Element")),zt(Te,lt("Shape")),zt([Ne,Xe],lt("Container")),zt(We,lt("Gradient")),zt(Pn,lt("Runner")),ae.extend([...new Set(at)]),function(t=[]){kn.push(...[].concat(t))}([Oe,te,oe,re,Ee,Qe,vn,ee]),zt(kn,{to(t){return(new bn).type(this.constructor).from(this.toArray()).to(t)},fromArray(t){return this.init(t),this},toConsumable(){return this.toArray()},morph(t,e,n,r,i){return this.fromArray(t.map((function(t,s){return r.step(t,e[s],n,i[s],i)})))}});const or={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 ur{constructor(t){this.element=t}createToolbarItem(t,e){const n=document.createElement("div"),r=new Image;r.src=e,n.id=t,n.append(r);const i=et({alignItems:"center",backgroundColor:"#FFFFFF",border:"1px solid #BCBCBC",cursor:"pointer",display:"flex",height:"30px",justifyContent:"center",width:"30px"});return n.setAttribute("style",i),n}render({enableExport:t=!1,enableFitscreen:e=!1,enableZoom:n=!1,onExport:r=sr,onFitscreen:i=sr,onZoom:s=sr}){var o;const u=document.createElement("div");u.id="toolbar";const a=et({display:"flex",gap:"5px",position:"absolute",right:"10px",top:"10px"});if(u.setAttribute("style",a),t){const t=this.createToolbarItem("export",or.export);t.addEventListener("click",(()=>{r()})),u.append(t)}if(n){const t=this.createToolbarItem("zoom-in",or["zoom-in"]),e=this.createToolbarItem("zoom-out",or["zoom-out"]);t.addEventListener("click",(()=>{s(.1)})),e.addEventListener("click",(()=>{s(-.1)})),u.append(t,e)}if(e){const t=this.createToolbarItem("fit-screen",or["fit-screen"]);t.addEventListener("click",(()=>{i()})),u.append(t)}null==(o=this.element)||o.append(u)}}var ar="\0",hr="\0",lr="";function cr(t,e){t[e]?t[e]++:t[e]=1}function fr(t,e){--t[e]||delete t[e]}function dr(t,e,n,r){var i=""+e,s=""+n;if(!t&&i>s){var o=i;i=s,s=o}return i+lr+s+lr+(void 0===r?ar:r)}function pr(t,e){return dr(t,e.v,e.w,e.name)}var mr=class{constructor(t){e(this,"_isDirected",!0),e(this,"_isMultigraph",!1),e(this,"_isCompound",!1),e(this,"_label"),e(this,"_defaultNodeLabelFn",(()=>{})),e(this,"_defaultEdgeLabelFn",(()=>{})),e(this,"_nodes",{}),e(this,"_in",{}),e(this,"_preds",{}),e(this,"_out",{}),e(this,"_sucs",{}),e(this,"_edgeObjs",{}),e(this,"_edgeLabels",{}),e(this,"_nodeCount",0),e(this,"_edgeCount",0),e(this,"_parent"),e(this,"_children"),t&&(this._isDirected=!Object.hasOwn(t,"directed")||t.directed,this._isMultigraph=!!Object.hasOwn(t,"multigraph")&&t.multigraph,this._isCompound=!!Object.hasOwn(t,"compound")&&t.compound),this._isCompound&&(this._parent={},this._children={},this._children[hr]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(t){return this._label=t,this}graph(){return this._label}setDefaultNodeLabel(t){return this._defaultNodeLabelFn=t,"function"!=typeof t&&(this._defaultNodeLabelFn=()=>t),this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){var t=this;return this.nodes().filter((e=>0===Object.keys(t._in[e]).length))}sinks(){var t=this;return this.nodes().filter((e=>0===Object.keys(t._out[e]).length))}setNodes(t,e){var n=arguments,r=this;return t.forEach((function(t){n.length>1?r.setNode(t,e):r.setNode(t)})),this}setNode(t,e){return Object.hasOwn(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]=hr,this._children[t]={},this._children[hr][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)}node(t){return this._nodes[t]}hasNode(t){return Object.hasOwn(this._nodes,t)}removeNode(t){var e=this;if(Object.hasOwn(this._nodes,t)){var n=t=>e.removeEdge(e._edgeObjs[t]);delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],this.children(t).forEach((function(t){e.setParent(t)})),delete this._children[t]),Object.keys(this._in[t]).forEach(n),delete this._in[t],delete this._preds[t],Object.keys(this._out[t]).forEach(n),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this}setParent(t,e){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(void 0===e)e=hr;else{for(var n=e+="";void 0!==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}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound){var e=this._parent[t];if(e!==hr)return e}}children(t=hr){if(this._isCompound){var e=this._children[t];if(e)return Object.keys(e)}else{if(t===hr)return this.nodes();if(this.hasNode(t))return[]}}predecessors(t){var e=this._preds[t];if(e)return Object.keys(e)}successors(t){var e=this._sucs[t];if(e)return Object.keys(e)}neighbors(t){var e=this.predecessors(t);if(e){const r=new Set(e);for(var n of this.successors(t))r.add(n);return Array.from(r.values())}}isLeaf(t){return 0===(this.isDirected()?this.successors(t):this.neighbors(t)).length}filterNodes(t){var e=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});e.setGraph(this.graph());var n=this;Object.entries(this._nodes).forEach((function([n,r]){t(n)&&e.setNode(n,r)})),Object.values(this._edgeObjs).forEach((function(t){e.hasNode(t.v)&&e.hasNode(t.w)&&e.setEdge(t,n.edge(t))}));var r={};function i(t){var s=n.parent(t);return void 0===s||e.hasNode(s)?(r[t]=s,s):s in r?r[s]:i(s)}return this._isCompound&&e.nodes().forEach((t=>e.setParent(t,i(t)))),e}setDefaultEdgeLabel(t){return this._defaultEdgeLabelFn=t,"function"!=typeof t&&(this._defaultEdgeLabelFn=()=>t),this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(t,e){var n=this,r=arguments;return t.reduce((function(t,i){return r.length>1?n.setEdge(t,i,e):n.setEdge(t,i),i})),this}setEdge(){var t,e,n,r,i=!1,s=arguments[0];"object"==typeof s&&null!==s&&"v"in s?(t=s.v,e=s.w,n=s.name,2===arguments.length&&(r=arguments[1],i=!0)):(t=s,e=arguments[1],n=arguments[3],arguments.length>2&&(r=arguments[2],i=!0)),t=""+t,e=""+e,void 0!==n&&(n=""+n);var o=dr(this._isDirected,t,e,n);if(Object.hasOwn(this._edgeLabels,o))return i&&(this._edgeLabels[o]=r),this;if(void 0!==n&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(e),this._edgeLabels[o]=i?r:this._defaultEdgeLabelFn(t,e,n);var u=function(t,e,n,r){var i=""+e,s=""+n;if(!t&&i>s){var o=i;i=s,s=o}var u={v:i,w:s};r&&(u.name=r);return u}(this._isDirected,t,e,n);return t=u.v,e=u.w,Object.freeze(u),this._edgeObjs[o]=u,cr(this._preds[e],t),cr(this._sucs[t],e),this._in[e][o]=u,this._out[t][o]=u,this._edgeCount++,this}edge(t,e,n){var r=1===arguments.length?pr(this._isDirected,arguments[0]):dr(this._isDirected,t,e,n);return this._edgeLabels[r]}edgeAsObj(){const t=this.edge(...arguments);return"object"!=typeof t?{label:t}:t}hasEdge(t,e,n){var r=1===arguments.length?pr(this._isDirected,arguments[0]):dr(this._isDirected,t,e,n);return Object.hasOwn(this._edgeLabels,r)}removeEdge(t,e,n){var r=1===arguments.length?pr(this._isDirected,arguments[0]):dr(this._isDirected,t,e,n),i=this._edgeObjs[r];return i&&(t=i.v,e=i.w,delete this._edgeLabels[r],delete this._edgeObjs[r],fr(this._preds[e],t),fr(this._sucs[t],e),delete this._in[e][r],delete this._out[t][r],this._edgeCount--),this}inEdges(t,e){var n=this._in[t];if(n){var r=Object.values(n);return e?r.filter((t=>t.v===e)):r}}outEdges(t,e){var n=this._out[t];if(n){var r=Object.values(n);return e?r.filter((t=>t.w===e)):r}}nodeEdges(t,e){var n=this.inEdges(t,e);if(n)return n.concat(this.outEdges(t,e))}},gr={Graph:mr,version:"2.2.4"},yr=mr,_r={write:function(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:vr(t),edges:wr(t)};void 0!==t.graph()&&(e.value=structuredClone(t.graph()));return e},read:function(t){var e=new yr(t.options).setGraph(t.value);return t.nodes.forEach((function(t){e.setNode(t.v,t.value),t.parent&&e.setParent(t.v,t.parent)})),t.edges.forEach((function(t){e.setEdge({v:t.v,w:t.w,name:t.name},t.value)})),e}};function vr(t){return t.nodes().map((function(e){var n=t.node(e),r=t.parent(e),i={v:e};return void 0!==n&&(i.value=n),void 0!==r&&(i.parent=r),i}))}function wr(t){return t.edges().map((function(e){var n=t.edge(e),r={v:e.v,w:e.w};return void 0!==e.name&&(r.name=e.name),void 0!==n&&(r.value=n),r}))}var br=function(t){var e,n={},r=[];function i(r){Object.hasOwn(n,r)||(n[r]=!0,e.push(r),t.successors(r).forEach(i),t.predecessors(r).forEach(i))}return t.nodes().forEach((function(t){e=[],i(t),e.length&&r.push(e)})),r};var xr=class{constructor(){e(this,"_arr",[]),e(this,"_keyIndices",{})}size(){return this._arr.length}keys(){return this._arr.map((function(t){return t.key}))}has(t){return Object.hasOwn(this._keyIndices,t)}priority(t){var e=this._keyIndices[t];if(void 0!==e)return this._arr[e].priority}min(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key}add(t,e){var n=this._keyIndices;if(t=String(t),!Object.hasOwn(n,t)){var r=this._arr,i=r.length;return n[t]=i,r.push({key:t,priority:e}),this._decrease(i),!0}return!1}removeMin(){this._swap(0,this._arr.length-1);var t=this._arr.pop();return delete this._keyIndices[t.key],this._heapify(0),t.key}decrease(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)}_heapify(t){var e=this._arr,n=2*t,r=n+1,i=t;n<e.length&&(i=e[n].priority<e[i].priority?n:i,r<e.length&&(i=e[r].priority<e[i].priority?r:i),i!==t&&(this._swap(t,i),this._heapify(i)))}_decrease(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}_swap(t,e){var n=this._arr,r=this._keyIndices,i=n[t],s=n[e];n[t]=s,n[e]=i,r[s.key]=t,r[i.key]=e}},Er=xr,Or=function(t,e,n,r){return function(t,e,n,r){var i,s,o={},u=new Er,a=function(t){var e=t.v!==i?t.v:t.w,r=o[e],a=n(t),h=s.distance+a;if(a<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+t+" Weight: "+a);h<r.distance&&(r.distance=h,r.predecessor=i,u.decrease(e,h))};t.nodes().forEach((function(t){var n=t===e?0:Number.POSITIVE_INFINITY;o[t]={distance:n},u.add(t,n)}));for(;u.size()>0&&(i=u.removeMin(),(s=o[i]).distance!==Number.POSITIVE_INFINITY);)r(i).forEach(a);return o}(t,String(e),n||Mr,r||function(e){return t.outEdges(e)})},Mr=()=>1;var kr=Or,Cr=function(t,e,n){return t.nodes().reduce((function(r,i){return r[i]=kr(t,i,e,n),r}),{})};var Ar=function(t){var e=0,n=[],r={},i=[];function s(o){var u=r[o]={onStack:!0,lowlink:e,index:e++};if(n.push(o),t.successors(o).forEach((function(t){Object.hasOwn(r,t)?r[t].onStack&&(u.lowlink=Math.min(u.lowlink,r[t].index)):(s(t),u.lowlink=Math.min(u.lowlink,r[t].lowlink))})),u.lowlink===u.index){var a,h=[];do{a=n.pop(),r[a].onStack=!1,h.push(a)}while(o!==a);i.push(h)}}return t.nodes().forEach((function(t){Object.hasOwn(r,t)||s(t)})),i};var Sr=Ar,Nr=function(t){return Sr(t).filter((function(e){return e.length>1||1===e.length&&t.hasEdge(e[0],e[0])}))};var jr=function(t,e,n){return function(t,e,n){var r={},i=t.nodes();return i.forEach((function(t){r[t]={},r[t][t]={distance:0},i.forEach((function(e){t!==e&&(r[t][e]={distance:Number.POSITIVE_INFINITY})})),n(t).forEach((function(n){var i=n.v===t?n.w:n.v,s=e(n);r[t][i]={distance:s,predecessor:t}}))})),i.forEach((function(t){var e=r[t];i.forEach((function(n){var s=r[n];i.forEach((function(n){var r=s[t],i=e[n],o=s[n],u=r.distance+i.distance;u<o.distance&&(o.distance=u,o.predecessor=i.predecessor)}))}))})),r}(t,e||Tr,n||function(e){return t.outEdges(e)})},Tr=()=>1;function Ir(t){var e={},n={},r=[];if(t.sinks().forEach((function i(s){if(Object.hasOwn(n,s))throw new Rr;Object.hasOwn(e,s)||(n[s]=!0,e[s]=!0,t.predecessors(s).forEach(i),delete n[s],r.push(s))})),Object.keys(e).length!==t.nodeCount())throw new Rr;return r}class Rr extends Error{constructor(){super(...arguments)}}var Lr=Ir;Ir.CycleException=Rr;var zr=Lr;var Pr=function(t,e,n){Array.isArray(e)||(e=[e]);var r=t.isDirected()?e=>t.successors(e):e=>t.neighbors(e),i="post"===n?Dr:Fr,s=[],o={};return e.forEach((e=>{if(!t.hasNode(e))throw new Error("Graph does not have node: "+e);i(e,r,o,s)})),s};function Dr(t,e,n,r){for(var i=[[t,!1]];i.length>0;){var s=i.pop();s[1]?r.push(s[0]):Object.hasOwn(n,s[0])||(n[s[0]]=!0,i.push([s[0],!0]),$r(e(s[0]),(t=>i.push([t,!1]))))}}function Fr(t,e,n,r){for(var i=[t];i.length>0;){var s=i.pop();Object.hasOwn(n,s)||(n[s]=!0,r.push(s),$r(e(s),(t=>i.push(t))))}}function $r(t,e){for(var n=t.length;n--;)e(t[n],n,t);return t}var Yr=Pr;var Gr=Pr;var Xr=mr,Br=xr;var qr={Graph:gr.Graph,json:_r,alg:{components:br,dijkstra:Or,dijkstraAll:Cr,findCycles:Nr,floydWarshall:jr,isAcyclic:function(t){try{zr(t)}catch(e){if(e instanceof zr.CycleException)return!1;throw e}return!0},postorder:function(t,e){return Yr(t,e,"post")},preorder:function(t,e){return Gr(t,e,"pre")},prim:function(t,e){var n,r=new Xr,i={},s=new Br;function o(t){var r=t.v===n?t.w:t.v,o=s.priority(r);if(void 0!==o){var u=e(t);u<o&&(i[r]=n,s.decrease(r,u))}}if(0===t.nodeCount())return r;t.nodes().forEach((function(t){s.add(t,Number.POSITIVE_INFINITY),r.setNode(t)})),s.decrease(t.nodes()[0],0);var u=!1;for(;s.size()>0;){if(n=s.removeMin(),Object.hasOwn(i,n))r.setEdge(n,i[n]);else{if(u)throw new Error("Input graph is not connected: "+t);u=!0}t.nodeEdges(n).forEach(o)}return r},tarjan:Ar,topsort:Lr},version:gr.version};function Vr(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function Wr(t,e){if("_next"!==t&&"_prev"!==t)return e}let Hr=qr.Graph,Ur=class{constructor(){let t={};t._next=t._prev=t,this._sentinel=t}dequeue(){let t=this._sentinel,e=t._prev;if(e!==t)return Vr(e),e}enqueue(t){let e=this._sentinel;t._prev&&t._next&&Vr(t),t._next=e._next,e._next._prev=t,e._next=t,t._prev=e}toString(){let t=[],e=this._sentinel,n=e._prev;for(;n!==e;)t.push(JSON.stringify(n,Wr)),n=n._prev;return"["+t.join(", ")+"]"}};var Zr=function(t,e){if(t.nodeCount()<=1)return[];let n=function(t,e){let n=new Hr,r=0,i=0;t.nodes().forEach((t=>{n.setNode(t,{v:t,in:0,out:0})})),t.edges().forEach((t=>{let s=n.edge(t.v,t.w)||0,o=e(t),u=s+o;n.setEdge(t.v,t.w,u),i=Math.max(i,n.node(t.v).out+=o),r=Math.max(r,n.node(t.w).in+=o)}));let s=function(t){const e=[];for(let n=0;n<t;n++)e.push(n);return e}(i+r+3).map((()=>new Ur)),o=r+1;return n.nodes().forEach((t=>{Kr(s,o,n.node(t))})),{graph:n,buckets:s,zeroIdx:o}}(t,e||Qr);return function(t,e,n){let r,i=[],s=e[e.length-1],o=e[0];for(;t.nodeCount();){for(;r=o.dequeue();)Jr(t,e,n,r);for(;r=s.dequeue();)Jr(t,e,n,r);if(t.nodeCount())for(let s=e.length-2;s>0;--s)if(r=e[s].dequeue(),r){i=i.concat(Jr(t,e,n,r,!0));break}}return i}(n.graph,n.buckets,n.zeroIdx).flatMap((e=>t.outEdges(e.v,e.w)))};let Qr=()=>1;function Jr(t,e,n,r,i){let s=i?[]:void 0;return t.inEdges(r.v).forEach((r=>{let o=t.edge(r),u=t.node(r.v);i&&s.push({v:r.v,w:r.w}),u.out-=o,Kr(e,n,u)})),t.outEdges(r.v).forEach((r=>{let i=t.edge(r),s=r.w,o=t.node(s);o.in-=i,Kr(e,n,o)})),t.removeNode(r.v),s}function Kr(t,e,n){n.out?n.in?t[n.out-n.in+e].enqueue(n):t[t.length-1].enqueue(n):t[0].enqueue(n)}let ti=qr.Graph;var ei={addBorderNode:function(t,e,n,r){let i={width:0,height:0};arguments.length>=4&&(i.rank=n,i.order=r);return ni(t,"border",i,e)},addDummyNode:ni,applyWithChunking:ii,asNonCompoundGraph:function(t){let e=new ti({multigraph:t.isMultigraph()}).setGraph(t.graph());return t.nodes().forEach((n=>{t.children(n).length||e.setNode(n,t.node(n))})),t.edges().forEach((n=>{e.setEdge(n,t.edge(n))})),e},buildLayerMatrix:function(t){let e=ai(si(t)+1).map((()=>[]));return t.nodes().forEach((n=>{let r=t.node(n),i=r.rank;void 0!==i&&(e[i][r.order]=n)})),e},intersectRect:function(t,e){let n,r,i=t.x,s=t.y,o=e.x-i,u=e.y-s,a=t.width/2,h=t.height/2;if(!o&&!u)throw new Error("Not possible to find intersection inside of the rectangle");Math.abs(u)*a>Math.abs(o)*h?(u<0&&(h=-h),n=h*o/u,r=h):(o<0&&(a=-a),n=a,r=a*u/o);return{x:i+n,y:s+r}},mapValues:function(t,e){let n=e;"string"==typeof e&&(n=t=>t[e]);return Object.entries(t).reduce(((t,[e,r])=>(t[e]=n(r,e),t)),{})},maxRank:si,normalizeRanks:function(t){let e=t.nodes().map((e=>{let n=t.node(e).rank;return void 0===n?Number.MAX_VALUE:n})),n=ii(Math.min,e);t.nodes().forEach((e=>{let r=t.node(e);Object.hasOwn(r,"rank")&&(r.rank-=n)}))},notime:function(t,e){return e()},partition:function(t,e){let n={lhs:[],rhs:[]};return t.forEach((t=>{e(t)?n.lhs.push(t):n.rhs.push(t)})),n},pick:function(t,e){const n={};for(const r of e)void 0!==t[r]&&(n[r]=t[r]);return n},predecessorWeights:function(t){let e=t.nodes().map((e=>{let n={};return t.inEdges(e).forEach((e=>{n[e.v]=(n[e.v]||0)+t.edge(e).weight})),n}));return hi(t.nodes(),e)},range:ai,removeEmptyRanks:function(t){let e=t.nodes().map((e=>t.node(e).rank)),n=ii(Math.min,e),r=[];t.nodes().forEach((e=>{let i=t.node(e).rank-n;r[i]||(r[i]=[]),r[i].push(e)}));let i=0,s=t.graph().nodeRankFactor;Array.from(r).forEach(((e,n)=>{void 0===e&&n%s!=0?--i:void 0!==e&&i&&e.forEach((e=>t.node(e).rank+=i))}))},simplify:function(t){let e=(new ti).setGraph(t.graph());return t.nodes().forEach((n=>e.setNode(n,t.node(n)))),t.edges().forEach((n=>{let r=e.edge(n.v,n.w)||{weight:0,minlen:1},i=t.edge(n);e.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})})),e},successorWeights:function(t){let e=t.nodes().map((e=>{let n={};return t.outEdges(e).forEach((e=>{n[e.w]=(n[e.w]||0)+t.edge(e).weight})),n}));return hi(t.nodes(),e)},time:function(t,e){let n=Date.now();try{return e()}finally{console.log(t+" time: "+(Date.now()-n)+"ms")}},uniqueId:ui,zipObject:hi};function ni(t,e,n,r){let i;do{i=ui(r)}while(t.hasNode(i));return n.dummy=e,t.setNode(i,n),i}const ri=65535;function ii(t,e){if(e.length>ri){const n=function(t,e=ri){const n=[];for(let r=0;r<t.length;r+=e){const i=t.slice(r,r+e);n.push(i)}return n}(e);return t.apply(null,n.map((e=>t.apply(null,e))))}return t.apply(null,e)}function si(t){const e=t.nodes().map((e=>{let n=t.node(e).rank;return void 0===n?Number.MIN_VALUE:n}));return ii(Math.max,e)}let oi=0;function ui(t){var e=++oi;return toString(t)+e}function ai(t,e,n=1){null==e&&(e=t,t=0);let r=t=>t<e;n<0&&(r=t=>e<t);const i=[];for(let s=t;r(s);s+=n)i.push(s);return i}function hi(t,e){return t.reduce(((t,n,r)=>(t[n]=e[r],t)),{})}let li=Zr,ci=ei.uniqueId;var fi={run:function(t){("greedy"===t.graph().acyclicer?li(t,(e=t,t=>e.edge(t).weight)):function(t){let e=[],n={},r={};function i(s){Object.hasOwn(r,s)||(r[s]=!0,n[s]=!0,t.outEdges(s).forEach((t=>{Object.hasOwn(n,t.w)?e.push(t):i(t.w)})),delete n[s])}return t.nodes().forEach(i),e}(t)).forEach((e=>{let n=t.edge(e);t.removeEdge(e),n.forwardName=e.name,n.reversed=!0,t.setEdge(e.w,e.v,n,ci("rev"))}));var e},undo:function(t){t.edges().forEach((e=>{let n=t.edge(e);if(n.reversed){t.removeEdge(e);let r=n.forwardName;delete n.reversed,delete n.forwardName,t.setEdge(e.w,e.v,n,r)}}))}};let di=ei;var pi={run:function(t){t.graph().dummyChains=[],t.edges().forEach((e=>function(t,e){let n,r,i,s=e.v,o=t.node(s).rank,u=e.w,a=t.node(u).rank,h=e.name,l=t.edge(e),c=l.labelRank;if(a===o+1)return;for(t.removeEdge(e),i=0,++o;o<a;++i,++o)l.points=[],r={width:0,height:0,edgeLabel:l,edgeObj:e,rank:o},n=di.addDummyNode(t,"edge",r,"_d"),o===c&&(r.width=l.width,r.height=l.height,r.dummy="edge-label",r.labelpos=l.labelpos),t.setEdge(s,n,{weight:l.weight},h),0===i&&t.graph().dummyChains.push(n),s=n;t.setEdge(s,u,{weight:l.weight},h)}(t,e)))},undo:function(t){t.graph().dummyChains.forEach((e=>{let n,r=t.node(e),i=r.edgeLabel;for(t.setEdge(r.edgeObj,i);r.dummy;)n=t.successors(e)[0],t.removeNode(e),i.points.push({x:r.x,y:r.y}),"edge-label"===r.dummy&&(i.x=r.x,i.y=r.y,i.width=r.width,i.height=r.height),e=n,r=t.node(e)}))}};const{applyWithChunking:mi}=ei;var gi={longestPath:function(t){var e={};t.sources().forEach((function n(r){var i=t.node(r);if(Object.hasOwn(e,r))return i.rank;e[r]=!0;let s=t.outEdges(r).map((e=>null==e?Number.POSITIVE_INFINITY:n(e.w)-t.edge(e).minlen));var o=mi(Math.min,s);return o===Number.POSITIVE_INFINITY&&(o=0),i.rank=o}))},slack:function(t,e){return t.node(e.w).rank-t.node(e.v).rank-t.edge(e).minlen}};var yi=qr.Graph,_i=gi.slack,vi=function(t){var e,n,r=new yi({directed:!1}),i=t.nodes()[0],s=t.nodeCount();r.setNode(i,{});for(;wi(r,t)<s;)e=bi(r,t),n=r.hasNode(e.v)?_i(t,e):-_i(t,e),xi(r,t,n);return r};function wi(t,e){return t.nodes().forEach((function n(r){e.nodeEdges(r).forEach((i=>{var s=i.v,o=r===s?i.w:s;t.hasNode(o)||_i(e,i)||(t.setNode(o,{}),t.setEdge(r,o,{}),n(o))}))})),t.nodeCount()}function bi(t,e){return e.edges().reduce(((n,r)=>{let i=Number.POSITIVE_INFINITY;return t.hasNode(r.v)!==t.hasNode(r.w)&&(i=_i(e,r)),i<n[0]?[i,r]:n}),[Number.POSITIVE_INFINITY,null])[1]}function xi(t,e,n){t.nodes().forEach((t=>e.node(t).rank+=n))}var Ei=vi,Oi=gi.slack,Mi=gi.longestPath,ki=qr.alg.preorder,Ci=qr.alg.postorder,Ai=ei.simplify,Si=Ni;function Ni(t){t=Ai(t),Mi(t);var e,n=Ei(t);for(Ii(n),ji(n,t);e=Li(n);)Pi(n,t,e,zi(n,t,e))}function ji(t,e){var n=Ci(t,t.nodes());(n=n.slice(0,n.length-1)).forEach((n=>function(t,e,n){var r=t.node(n),i=r.parent;t.edge(n,i).cutvalue=Ti(t,e,n)}(t,e,n)))}function Ti(t,e,n){var r=t.node(n).parent,i=!0,s=e.edge(n,r),o=0;return s||(i=!1,s=e.edge(r,n)),o=s.weight,e.nodeEdges(n).forEach((s=>{var u,a,h=s.v===n,l=h?s.w:s.v;if(l!==r){var c=h===i,f=e.edge(s).weight;if(o+=c?f:-f,u=n,a=l,t.hasEdge(u,a)){var d=t.edge(n,l).cutvalue;o+=c?-d:d}}})),o}function Ii(t,e){arguments.length<2&&(e=t.nodes()[0]),Ri(t,{},1,e)}function Ri(t,e,n,r,i){var s=n,o=t.node(r);return e[r]=!0,t.neighbors(r).forEach((i=>{Object.hasOwn(e,i)||(n=Ri(t,e,n,i,r))})),o.low=s,o.lim=n++,i?o.parent=i:delete o.parent,n}function Li(t){return t.edges().find((e=>t.edge(e).cutvalue<0))}function zi(t,e,n){var r=n.v,i=n.w;e.hasEdge(r,i)||(r=n.w,i=n.v);var s=t.node(r),o=t.node(i),u=s,a=!1;return s.lim>o.lim&&(u=o,a=!0),e.edges().filter((e=>a===Di(t,t.node(e.v),u)&&a!==Di(t,t.node(e.w),u))).reduce(((t,n)=>Oi(e,n)<Oi(e,t)?n:t))}function Pi(t,e,n,r){var i=n.v,s=n.w;t.removeEdge(i,s),t.setEdge(r.v,r.w,{}),Ii(t),ji(t,e),function(t,e){var n=t.nodes().find((t=>!e.node(t).parent)),r=ki(t,n);(r=r.slice(1)).forEach((n=>{var r=t.node(n).parent,i=e.edge(n,r),s=!1;i||(i=e.edge(r,n),s=!0),e.node(n).rank=e.node(r).rank+(s?i.minlen:-i.minlen)}))}(t,e)}function Di(t,e,n){return n.low<=e.lim&&e.lim<=n.lim}Ni.initLowLimValues=Ii,Ni.initCutValues=ji,Ni.calcCutValue=Ti,Ni.leaveEdge=Li,Ni.enterEdge=zi,Ni.exchangeEdges=Pi;var Fi=gi.longestPath,$i=vi,Yi=Si,Gi=function(t){switch(t.graph().ranker){case"network-simplex":default:Bi(t);break;case"tight-tree":!function(t){Fi(t),$i(t)}(t);break;case"longest-path":Xi(t)}};var Xi=Fi;function Bi(t){Yi(t)}let qi=ei;function Vi(t,e,n,r,i,s,o){let u=t.children(o);if(!u.length)return void(o!==e&&t.setEdge(e,o,{weight:0,minlen:n}));let a=qi.addBorderNode(t,"_bt"),h=qi.addBorderNode(t,"_bb"),l=t.node(o);t.setParent(a,o),l.borderTop=a,t.setParent(h,o),l.borderBottom=h,u.forEach((u=>{Vi(t,e,n,r,i,s,u);let l=t.node(u),c=l.borderTop?l.borderTop:u,f=l.borderBottom?l.borderBottom:u,d=l.borderTop?r:2*r,p=c!==f?1:i-s[o]+1;t.setEdge(a,c,{weight:d,minlen:p,nestingEdge:!0}),t.setEdge(f,h,{weight:d,minlen:p,nestingEdge:!0})})),t.parent(o)||t.setEdge(e,a,{weight:0,minlen:i+s[o]})}let Wi=ei;function Hi(t,e,n,r,i,s){let o={width:0,height:0,rank:s,borderType:e},u=i[e][s-1],a=Wi.addDummyNode(t,"border",o,n);i[e][s]=a,t.setParent(a,r),u&&t.setEdge(u,a,{weight:1})}function Ui(t){t.nodes().forEach((e=>Zi(t.node(e)))),t.edges().forEach((e=>Zi(t.edge(e))))}function Zi(t){let e=t.width;t.width=t.height,t.height=e}function Qi(t){t.y=-t.y}function Ji(t){let e=t.x;t.x=t.y,t.y=e}let Ki=ei;let ts=ei.zipObject;function es(t,e,n){let r=ts(n,n.map(((t,e)=>e))),i=e.flatMap((e=>t.outEdges(e).map((e=>({pos:r[e.w],weight:t.edge(e).weight}))).sort(((t,e)=>t.pos-e.pos)))),s=1;for(;s<n.length;)s<<=1;let o=2*s-1;s-=1;let u=new Array(o).fill(0),a=0;return i.forEach((t=>{let e=t.pos+s;u[e]+=t.weight;let n=0;for(;e>0;)e%2&&(n+=u[e+1]),e=e-1>>1,u[e]+=t.weight;a+=t.weight*n})),a}let ns=ei;let rs=ei;function is(t,e,n){let r;for(;e.length&&(r=e[e.length-1]).i<=n;)e.pop(),t.push(r.vs),n++;return n}let ss=function(t,e=[]){return e.map((e=>{let n=t.inEdges(e);if(n.length){let r=n.reduce(((e,n)=>{let r=t.edge(n),i=t.node(n.v);return{sum:e.sum+r.weight*i.order,weight:e.weight+r.weight}}),{sum:0,weight:0});return{v:e,barycenter:r.sum/r.weight,weight:r.weight}}return{v:e}}))},os=function(t,e){let n={};return t.forEach(((t,e)=>{let r=n[t.v]={indegree:0,in:[],out:[],vs:[t.v],i:e};void 0!==t.barycenter&&(r.barycenter=t.barycenter,r.weight=t.weight)})),e.edges().forEach((t=>{let e=n[t.v],r=n[t.w];void 0!==e&&void 0!==r&&(r.indegree++,e.out.push(n[t.w]))})),function(t){let e=[];function n(t){return e=>{e.merged||(void 0===e.barycenter||void 0===t.barycenter||e.barycenter>=t.barycenter)&&function(t,e){let n=0,r=0;t.weight&&(n+=t.barycenter*t.weight,r+=t.weight);e.weight&&(n+=e.barycenter*e.weight,r+=e.weight);t.vs=e.vs.concat(t.vs),t.barycenter=n/r,t.weight=r,t.i=Math.min(e.i,t.i),e.merged=!0}(t,e)}}function r(e){return n=>{n.in.push(e),0==--n.indegree&&t.push(n)}}for(;t.length;){let i=t.pop();e.push(i),i.in.reverse().forEach(n(i)),i.out.forEach(r(i))}return e.filter((t=>!t.merged)).map((t=>ns.pick(t,["vs","i","barycenter","weight"])))}(Object.values(n).filter((t=>!t.indegree)))},us=function(t,e){let n=rs.partition(t,(t=>Object.hasOwn(t,"barycenter"))),r=n.lhs,i=n.rhs.sort(((t,e)=>e.i-t.i)),s=[],o=0,u=0,a=0;r.sort((h=!!e,(t,e)=>t.barycenter<e.barycenter?-1:t.barycenter>e.barycenter?1:h?e.i-t.i:t.i-e.i)),a=is(s,i,a),r.forEach((t=>{a+=t.vs.length,s.push(t.vs),o+=t.barycenter*t.weight,u+=t.weight,a=is(s,i,a)}));var h;let l={vs:s.flat(!0)};u&&(l.barycenter=o/u,l.weight=u);return l};var as=function t(e,n,r,i){let s=e.children(n),o=e.node(n),u=o?o.borderLeft:void 0,a=o?o.borderRight:void 0,h={};u&&(s=s.filter((t=>t!==u&&t!==a)));let l=ss(e,s);l.forEach((n=>{if(e.children(n.v).length){let u=t(e,n.v,r,i);h[n.v]=u,Object.hasOwn(u,"barycenter")&&(o=u,void 0!==(s=n).barycenter?(s.barycenter=(s.barycenter*s.weight+o.barycenter*o.weight)/(s.weight+o.weight),s.weight+=o.weight):(s.barycenter=o.barycenter,s.weight=o.weight))}var s,o}));let c=os(l,r);!function(t,e){t.forEach((t=>{t.vs=t.vs.flatMap((t=>e[t]?e[t].vs:t))}))}(c,h);let f=us(c,i);if(u&&(f.vs=[u,f.vs,a].flat(!0),e.predecessors(u).length)){let t=e.node(e.predecessors(u)[0]),n=e.node(e.predecessors(a)[0]);Object.hasOwn(f,"barycenter")||(f.barycenter=0,f.weight=0),f.barycenter=(f.barycenter*f.weight+t.order+n.order)/(f.weight+2),f.weight+=2}return f};let hs=qr.Graph,ls=ei;let cs=function(t){let e={},n=t.nodes().filter((e=>!t.children(e).length)),r=n.map((e=>t.node(e).rank)),i=Ki.applyWithChunking(Math.max,r),s=Ki.range(i+1).map((()=>[]));return n.sort(((e,n)=>t.node(e).rank-t.node(n).rank)).forEach((function n(r){if(e[r])return;e[r]=!0;let i=t.node(r);s[i.rank].push(r),t.successors(r).forEach(n)})),s},fs=function(t,e){let n=0;for(let r=1;r<e.length;++r)n+=es(t,e[r-1],e[r]);return n},ds=as,ps=function(t,e,n){let r=function(t){var e;for(;t.hasNode(e=ls.uniqueId("_root")););return e}(t),i=new hs({compound:!0}).setGraph({root:r}).setDefaultNodeLabel((e=>t.node(e)));return t.nodes().forEach((s=>{let o=t.node(s),u=t.parent(s);(o.rank===e||o.minRank<=e&&e<=o.maxRank)&&(i.setNode(s),i.setParent(s,u||r),t[n](s).forEach((e=>{let n=e.v===s?e.w:e.v,r=i.edge(n,s),o=void 0!==r?r.weight:0;i.setEdge(n,s,{weight:t.edge(e).weight+o})})),Object.hasOwn(o,"minRank")&&i.setNode(s,{borderLeft:o.borderLeft[e],borderRight:o.borderRight[e]}))})),i},ms=function(t,e,n){let r,i={};n.forEach((n=>{let s,o,u=t.parent(n);for(;u;){if(s=t.parent(u),s?(o=i[s],i[s]=u):(o=r,r=u),o&&o!==u)return void e.setEdge(o,u);u=s}}))},gs=qr.Graph,ys=ei;var _s=function t(e,n){if(n&&"function"==typeof n.customOrder)return void n.customOrder(e,t);let r=ys.maxRank(e),i=vs(e,ys.range(1,r+1),"inEdges"),s=vs(e,ys.range(r-1,-1,-1),"outEdges"),o=cs(e);if(bs(e,o),n&&n.disableOptimalOrderHeuristic)return;let u,a=Number.POSITIVE_INFINITY;for(let h=0,l=0;l<4;++h,++l){ws(h%2?i:s,h%4>=2),o=ys.buildLayerMatrix(e);let t=fs(e,o);t<a&&(l=0,u=Object.assign({},o),a=t)}bs(e,u)};function vs(t,e,n){return e.map((function(e){return ps(t,e,n)}))}function ws(t,e){let n=new gs;t.forEach((function(t){let r=t.graph().root,i=ds(t,r,n,e);i.vs.forEach(((e,n)=>t.node(e).order=n)),ms(t,n,i.vs)}))}function bs(t,e){Object.values(e).forEach((e=>e.forEach(((e,n)=>t.node(e).order=n))))}let xs=qr.Graph,Es=ei;var Os=function(t){let e,n=Es.buildLayerMatrix(t),r=Object.assign(Ms(t,n),ks(t,n)),i={};["u","d"].forEach((s=>{e="u"===s?n:Object.values(n).reverse(),["l","r"].forEach((n=>{"r"===n&&(e=e.map((t=>Object.values(t).reverse())));let o=("u"===s?t.predecessors:t.successors).bind(t),u=Ss(t,e,r,o),a=Ns(t,e,u.root,u.align,"r"===n);"r"===n&&(a=Es.mapValues(a,(t=>-t))),i[s+n]=a}))}));let s=js(t,i);return Ts(i,s),Is(i,t.graph().align)};function Ms(t,e){let n={};return e.length&&e.reduce((function(e,r){let i=0,s=0,o=e.length,u=r[r.length-1];return r.forEach(((e,a)=>{let h=function(t,e){if(t.node(e).dummy)return t.predecessors(e).find((e=>t.node(e).dummy))}(t,e),l=h?t.node(h).order:o;(h||e===u)&&(r.slice(s,a+1).forEach((e=>{t.predecessors(e).forEach((r=>{let s=t.node(r),o=s.order;!(o<i||l<o)||s.dummy&&t.node(e).dummy||Cs(n,r,e)}))})),s=a+1,i=l)})),r})),n}function ks(t,e){let n={};function r(e,r,i,s,o){let u;Es.range(r,i).forEach((r=>{u=e[r],t.node(u).dummy&&t.predecessors(u).forEach((e=>{let r=t.node(e);r.dummy&&(r.order<s||r.order>o)&&Cs(n,e,u)}))}))}return e.length&&e.reduce((function(e,n){let i,s=-1,o=0;return n.forEach(((u,a)=>{if("border"===t.node(u).dummy){let e=t.predecessors(u);e.length&&(i=t.node(e[0]).order,r(n,o,a,s,i),o=a,s=i)}r(n,o,n.length,i,e.length)})),n})),n}function Cs(t,e,n){if(e>n){let t=e;e=n,n=t}let r=t[e];r||(t[e]=r={}),r[n]=!0}function As(t,e,n){if(e>n){let t=e;e=n,n=t}return!!t[e]&&Object.hasOwn(t[e],n)}function Ss(t,e,n,r){let i={},s={},o={};return e.forEach((t=>{t.forEach(((t,e)=>{i[t]=t,s[t]=t,o[t]=e}))})),e.forEach((t=>{let e=-1;t.forEach((t=>{let u=r(t);if(u.length){u=u.sort(((t,e)=>o[t]-o[e]));let r=(u.length-1)/2;for(let a=Math.floor(r),h=Math.ceil(r);a<=h;++a){let r=u[a];s[t]===t&&e<o[r]&&!As(n,t,r)&&(s[r]=t,s[t]=i[t]=i[r],e=o[r])}}}))})),{root:i,align:s}}function Ns(t,e,n,r,i){let s={},o=function(t,e,n,r){let i=new xs,s=t.graph(),o=function(t,e,n){return(r,i,s)=>{let o,u=r.node(i),a=r.node(s),h=0;if(h+=u.width/2,Object.hasOwn(u,"labelpos"))switch(u.labelpos.toLowerCase()){case"l":o=-u.width/2;break;case"r":o=u.width/2}if(o&&(h+=n?o:-o),o=0,h+=(u.dummy?e:t)/2,h+=(a.dummy?e:t)/2,h+=a.width/2,Object.hasOwn(a,"labelpos"))switch(a.labelpos.toLowerCase()){case"l":o=a.width/2;break;case"r":o=-a.width/2}return o&&(h+=n?o:-o),o=0,h}}(s.nodesep,s.edgesep,r);return e.forEach((e=>{let r;e.forEach((e=>{let s=n[e];if(i.setNode(s),r){var u=n[r],a=i.edge(u,s);i.setEdge(u,s,Math.max(o(t,e,r),a||0))}r=e}))})),i}(t,e,n,i),u=i?"borderLeft":"borderRight";function a(t,e){let n=o.nodes(),r=n.pop(),i={};for(;r;)i[r]?t(r):(i[r]=!0,n.push(r),n=n.concat(e(r))),r=n.pop()}return a((function(t){s[t]=o.inEdges(t).reduce(((t,e)=>Math.max(t,s[e.v]+o.edge(e))),0)}),o.predecessors.bind(o)),a((function(e){let n=o.outEdges(e).reduce(((t,e)=>Math.min(t,s[e.w]-o.edge(e))),Number.POSITIVE_INFINITY),r=t.node(e);n!==Number.POSITIVE_INFINITY&&r.borderType!==u&&(s[e]=Math.max(s[e],n))}),o.successors.bind(o)),Object.keys(r).forEach((t=>s[t]=s[n[t]])),s}function js(t,e){return Object.values(e).reduce(((e,n)=>{let r=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;Object.entries(n).forEach((([e,n])=>{let s=function(t,e){return t.node(e).width}(t,e)/2;r=Math.max(n+s,r),i=Math.min(n-s,i)}));const s=r-i;return s<e[0]&&(e=[s,n]),e}),[Number.POSITIVE_INFINITY,null])[1]}function Ts(t,e){let n=Object.values(e),r=Es.applyWithChunking(Math.min,n),i=Es.applyWithChunking(Math.max,n);["u","d"].forEach((n=>{["l","r"].forEach((s=>{let o=n+s,u=t[o];if(u===e)return;let a=Object.values(u),h=r-Es.applyWithChunking(Math.min,a);"l"!==s&&(h=i-Es.applyWithChunking(Math.max,a)),h&&(t[o]=Es.mapValues(u,(t=>t+h)))}))}))}function Is(t,e){return Es.mapValues(t.ul,((n,r)=>{if(e)return t[e.toLowerCase()][r];{let e=Object.values(t).map((t=>t[r])).sort(((t,e)=>t-e));return(e[1]+e[2])/2}}))}let Rs=ei,Ls=Os;let zs=fi,Ps=pi,Ds=Gi,Fs=ei.normalizeRanks,$s=function(t){let e=function(t){let e={},n=0;function r(i){let s=n;t.children(i).forEach(r),e[i]={low:s,lim:n++}}return t.children().forEach(r),e}(t);t.graph().dummyChains.forEach((n=>{let r=t.node(n),i=r.edgeObj,s=function(t,e,n,r){let i,s,o=[],u=[],a=Math.min(e[n].low,e[r].low),h=Math.max(e[n].lim,e[r].lim);i=n;do{i=t.parent(i),o.push(i)}while(i&&(e[i].low>a||h>e[i].lim));s=i,i=r;for(;(i=t.parent(i))!==s;)u.push(i);return{path:o.concat(u.reverse()),lca:s}}(t,e,i.v,i.w),o=s.path,u=s.lca,a=0,h=o[a],l=!0;for(;n!==i.w;){if(r=t.node(n),l){for(;(h=o[a])!==u&&t.node(h).maxRank<r.rank;)a++;h===u&&(l=!1)}if(!l){for(;a<o.length-1&&t.node(h=o[a+1]).minRank<=r.rank;)a++;h=o[a]}t.setParent(n,h),n=t.successors(n)[0]}}))},Ys=ei.removeEmptyRanks,Gs={run:function(t){let e=qi.addDummyNode(t,"root",{},"_root"),n=function(t){var e={};function n(r,i){var s=t.children(r);s&&s.length&&s.forEach((t=>n(t,i+1))),e[r]=i}return t.children().forEach((t=>n(t,1))),e}(t),r=Object.values(n),i=qi.applyWithChunking(Math.max,r)-1,s=2*i+1;t.graph().nestingRoot=e,t.edges().forEach((e=>t.edge(e).minlen*=s));let o=function(t){return t.edges().reduce(((e,n)=>e+t.edge(n).weight),0)}(t)+1;t.children().forEach((r=>Vi(t,e,s,o,i,n,r))),t.graph().nodeRankFactor=s},cleanup:function(t){var e=t.graph();t.removeNode(e.nestingRoot),delete e.nestingRoot,t.edges().forEach((e=>{t.edge(e).nestingEdge&&t.removeEdge(e)}))}},Xs=function(t){t.children().forEach((function e(n){let r=t.children(n),i=t.node(n);if(r.length&&r.forEach(e),Object.hasOwn(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(let e=i.minRank,r=i.maxRank+1;e<r;++e)Hi(t,"borderLeft","_bl",n,i,e),Hi(t,"borderRight","_br",n,i,e)}}))},Bs={adjust:function(t){let e=t.graph().rankdir.toLowerCase();"lr"!==e&&"rl"!==e||Ui(t)},undo:function(t){let e=t.graph().rankdir.toLowerCase();"bt"!==e&&"rl"!==e||function(t){t.nodes().forEach((e=>Qi(t.node(e)))),t.edges().forEach((e=>{let n=t.edge(e);n.points.forEach(Qi),Object.hasOwn(n,"y")&&Qi(n)}))}(t);"lr"!==e&&"rl"!==e||(!function(t){t.nodes().forEach((e=>Ji(t.node(e)))),t.edges().forEach((e=>{let n=t.edge(e);n.points.forEach(Ji),Object.hasOwn(n,"x")&&Ji(n)}))}(t),Ui(t))}},qs=_s,Vs=function(t){(function(t){let e=Rs.buildLayerMatrix(t),n=t.graph().ranksep,r=0;e.forEach((e=>{const i=e.reduce(((e,n)=>{const r=t.node(n).height;return e>r?e:r}),0);e.forEach((e=>t.node(e).y=r+i/2)),r+=i+n}))})(t=Rs.asNonCompoundGraph(t)),Object.entries(Ls(t)).forEach((([e,n])=>t.node(e).x=n))},Ws=ei,Hs=qr.Graph;var Us=function(t,e){let n=e&&e.debugTiming?Ws.time:Ws.notime;n("layout",(()=>{let r=n(" buildLayoutGraph",(()=>function(t){let e=new Hs({multigraph:!0,compound:!0}),n=so(t.graph());return e.setGraph(Object.assign({},Qs,io(n,Zs),Ws.pick(n,Js))),t.nodes().forEach((n=>{const r=io(so(t.node(n)),Ks);Object.keys(to).forEach((t=>{void 0===r[t]&&(r[t]=to[t])})),e.setNode(n,r),e.setParent(n,t.parent(n))})),t.edges().forEach((n=>{let r=so(t.edge(n));e.setEdge(n,Object.assign({},no,io(r,eo),Ws.pick(r,ro)))})),e}(t)));n(" runLayout",(()=>function(t,e,n){e(" makeSpaceForEdgeLabels",(()=>function(t){let e=t.graph();e.ranksep/=2,t.edges().forEach((n=>{let r=t.edge(n);r.minlen*=2,"c"!==r.labelpos.toLowerCase()&&("TB"===e.rankdir||"BT"===e.rankdir?r.width+=r.labeloffset:r.height+=r.labeloffset)}))}(t))),e(" removeSelfEdges",(()=>function(t){t.edges().forEach((e=>{if(e.v===e.w){var n=t.node(e.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e:e,label:t.edge(e)}),t.removeEdge(e)}}))}(t))),e(" acyclic",(()=>zs.run(t))),e(" nestingGraph.run",(()=>Gs.run(t))),e(" rank",(()=>Ds(Ws.asNonCompoundGraph(t)))),e(" injectEdgeLabelProxies",(()=>function(t){t.edges().forEach((e=>{let n=t.edge(e);if(n.width&&n.height){let n=t.node(e.v),r={rank:(t.node(e.w).rank-n.rank)/2+n.rank,e:e};Ws.addDummyNode(t,"edge-proxy",r,"_ep")}}))}(t))),e(" removeEmptyRanks",(()=>Ys(t))),e(" nestingGraph.cleanup",(()=>Gs.cleanup(t))),e(" normalizeRanks",(()=>Fs(t))),e(" assignRankMinMax",(()=>function(t){let e=0;t.nodes().forEach((n=>{let r=t.node(n);r.borderTop&&(r.minRank=t.node(r.borderTop).rank,r.maxRank=t.node(r.borderBottom).rank,e=Math.max(e,r.maxRank))})),t.graph().maxRank=e}(t))),e(" removeEdgeLabelProxies",(()=>function(t){t.nodes().forEach((e=>{let n=t.node(e);"edge-proxy"===n.dummy&&(t.edge(n.e).labelRank=n.rank,t.removeNode(e))}))}(t))),e(" normalize.run",(()=>Ps.run(t))),e(" parentDummyChains",(()=>$s(t))),e(" addBorderSegments",(()=>Xs(t))),e(" order",(()=>qs(t,n))),e(" insertSelfEdges",(()=>function(t){var e=Ws.buildLayerMatrix(t);e.forEach((e=>{var n=0;e.forEach(((e,r)=>{var i=t.node(e);i.order=r+n,(i.selfEdges||[]).forEach((e=>{Ws.addDummyNode(t,"selfedge",{width:e.label.width,height:e.label.height,rank:i.rank,order:r+ ++n,e:e.e,label:e.label},"_se")})),delete i.selfEdges}))}))}(t))),e(" adjustCoordinateSystem",(()=>Bs.adjust(t))),e(" position",(()=>Vs(t))),e(" positionSelfEdges",(()=>function(t){t.nodes().forEach((e=>{var n=t.node(e);if("selfedge"===n.dummy){var r=t.node(n.e.v),i=r.x+r.width/2,s=r.y,o=n.x-i,u=r.height/2;t.setEdge(n.e,n.label),t.removeNode(e),n.label.points=[{x:i+2*o/3,y:s-u},{x:i+5*o/6,y:s-u},{x:i+o,y:s},{x:i+5*o/6,y:s+u},{x:i+2*o/3,y:s+u}],n.label.x=n.x,n.label.y=n.y}}))}(t))),e(" removeBorderNodes",(()=>function(t){t.nodes().forEach((e=>{if(t.children(e).length){let n=t.node(e),r=t.node(n.borderTop),i=t.node(n.borderBottom),s=t.node(n.borderLeft[n.borderLeft.length-1]),o=t.node(n.borderRight[n.borderRight.length-1]);n.width=Math.abs(o.x-s.x),n.height=Math.abs(i.y-r.y),n.x=s.x+n.width/2,n.y=r.y+n.height/2}})),t.nodes().forEach((e=>{"border"===t.node(e).dummy&&t.removeNode(e)}))}(t))),e(" normalize.undo",(()=>Ps.undo(t))),e(" fixupEdgeLabelCoords",(()=>function(t){t.edges().forEach((e=>{let n=t.edge(e);if(Object.hasOwn(n,"x"))switch("l"!==n.labelpos&&"r"!==n.labelpos||(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset}}))}(t))),e(" undoCoordinateSystem",(()=>Bs.undo(t))),e(" translateGraph",(()=>function(t){let e=Number.POSITIVE_INFINITY,n=0,r=Number.POSITIVE_INFINITY,i=0,s=t.graph(),o=s.marginx||0,u=s.marginy||0;function a(t){let s=t.x,o=t.y,u=t.width,a=t.height;e=Math.min(e,s-u/2),n=Math.max(n,s+u/2),r=Math.min(r,o-a/2),i=Math.max(i,o+a/2)}t.nodes().forEach((e=>a(t.node(e)))),t.edges().forEach((e=>{let n=t.edge(e);Object.hasOwn(n,"x")&&a(n)})),e-=o,r-=u,t.nodes().forEach((n=>{let i=t.node(n);i.x-=e,i.y-=r})),t.edges().forEach((n=>{let i=t.edge(n);i.points.forEach((t=>{t.x-=e,t.y-=r})),Object.hasOwn(i,"x")&&(i.x-=e),Object.hasOwn(i,"y")&&(i.y-=r)})),s.width=n-e+o,s.height=i-r+u}(t))),e(" assignNodeIntersects",(()=>function(t){t.edges().forEach((e=>{let n,r,i=t.edge(e),s=t.node(e.v),o=t.node(e.w);i.points?(n=i.points[0],r=i.points[i.points.length-1]):(i.points=[],n=o,r=s),i.points.unshift(Ws.intersectRect(s,n)),i.points.push(Ws.intersectRect(o,r))}))}(t))),e(" reversePoints",(()=>function(t){t.edges().forEach((e=>{let n=t.edge(e);n.reversed&&n.points.reverse()}))}(t))),e(" acyclic.undo",(()=>zs.undo(t)))}(r,n,e))),n(" updateInputGraph",(()=>function(t,e){t.nodes().forEach((n=>{let r=t.node(n),i=e.node(n);r&&(r.x=i.x,r.y=i.y,r.rank=i.rank,e.children(n).length&&(r.width=i.width,r.height=i.height))})),t.edges().forEach((n=>{let r=t.edge(n),i=e.edge(n);r.points=i.points,Object.hasOwn(i,"x")&&(r.x=i.x,r.y=i.y)})),t.graph().width=e.graph().width,t.graph().height=e.graph().height}(t,r)))}))};let Zs=["nodesep","edgesep","ranksep","marginx","marginy"],Qs={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},Js=["acyclicer","ranker","rankdir","align"],Ks=["width","height"],to={width:0,height:0},eo=["minlen","weight","width","height","labeloffset"],no={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},ro=["labelpos"];function io(t,e){return Ws.mapValues(Ws.pick(t,e),Number)}function so(t){var e={};return t&&Object.entries(t).forEach((([t,n])=>{"string"==typeof t&&(t=t.toLowerCase()),e[t]=n})),e}let oo=ei,uo=qr.Graph;var ao={graphlib:qr,layout:Us,debug:{debugOrdering:function(t){let e=oo.buildLayerMatrix(t),n=new uo({compound:!0,multigraph:!0}).setGraph({});return t.nodes().forEach((e=>{n.setNode(e,{label:e}),n.setParent(e,"layer"+t.node(e).rank)})),t.edges().forEach((t=>n.setEdge(t.v,t.w,{},t.name))),e.forEach(((t,e)=>{let r="layer"+e;n.setNode(r,{rank:"same"}),t.reduce(((t,e)=>(n.setEdge(t,e,{style:"invis"}),e)))})),n}},util:{time:ei.time,notime:ei.notime},version:"1.1.4"};const ho=(t,e,n)=>{const{x:r,y:i}=t,s=e.x,o=e.y,u=(null==n?void 0:n.x)??r,a=(null==n?void 0:n.y)??i,h=s-r<0?-1:1,l=o-i<0?-1:1;let c=Math.abs(s-r)/2<35?Math.abs(s-r)/2:35;c=Math.abs(o-i)/2<c?Math.abs(o-i)/2:c;const f=Math.abs(s-r)/2-c;return[`M ${u} ${a}`,`L ${u} ${i}`,`L ${r} ${i}`,`L ${r+f*h} ${i}`,`C ${r+f*h+c*h} ${i} ${r+f*h+c*h} ${i} ${r+f*h+c*h} ${i+c*l}`,`L ${r+f*h+c*h} ${o-c*l}`,`C ${r+f*h+c*h} ${o} ${r+f*h+c*h} ${o} ${s-f*h} ${o}`,`L ${s} ${o}`].join(" ")},lo=(t,e,n,r={sy:0})=>{const{x:i}=t;let{y:s}=t;const o=e.x,u=e.y,a=(null==n?void 0:n.x)??i,h=(null==n?void 0:n.y)??s,l=o-i<0?-1:1,c=u-s<0?-1:1;s+=r.sy;let f=Math.abs(o-i)/2<35?Math.abs(o-i)/2:35;f=Math.abs(u-s)/2<f?Math.abs(u-s)/2:f;const d=Math.abs(u-s)/2-f;return[`M ${a} ${h}`,`L ${i} ${h}`,`L ${i} ${s}`,`L ${i} ${s+d*c}`,`C ${i} ${s+d*c+f*c} ${i} ${s+d*c+f*c} ${i+f*l} ${s+d*c+f*c}`,`L ${i+(Math.abs(o-i)-2*f)*l+f*l} ${s+d*c+f*c}`,`C ${o} ${s+d*c+f*c} ${o} ${s+d*c+f*c} ${o} ${u-d*c}`,`L ${o} ${u}`].join(" ")},co={bottom:{calculateEdge:lo,edgeMidX:({node:t})=>t.x,edgeMidY:({node:t})=>t.y+t.height/2,edgeParentX:({parent:t})=>t.x,edgeParentY:({parent:t})=>t.y-t.height/2,edgeX:({node:t})=>t.x,edgeY:({node:t})=>t.y+t.height/2,leafGroupX:({node:t})=>t.x-t.width/2,leafGroupY:({node:t})=>t.y,leafHeight:({childLength:t,childrenSpacing:e,nodeHeight:n})=>(n+e)*t,leafWidth:({nodeWidth:t})=>t,leafX:()=>0,leafY:({childrenSpacing:t,index:e,nodeHeight:n})=>(n+t)*-e},left:{calculateEdge:ho,edgeMidX:({node:t})=>t.x-t.width/2,edgeMidY:({node:t})=>t.y,edgeParentX:({parent:t})=>t.x+t.width/2,edgeParentY:({parent:t})=>t.y,edgeX:({node:t})=>t.x-t.width/2,edgeY:({node:t})=>t.y,leafGroupX:({node:t})=>t.x-t.width/2,leafGroupY:({node:t})=>t.y-t.height/2,leafHeight:({nodeHeight:t})=>t,leafWidth:({childLength:t,nodeWidth:e})=>e*t,leafX:({childrenSpacing:t,index:e,nodeWidth:n})=>(n+t)*e,leafY:()=>0},right:{calculateEdge:ho,edgeMidX:({node:t})=>t.x+t.width/2,edgeMidY:({node:t})=>t.y,edgeParentX:({parent:t})=>t.x-t.width/2,edgeParentY:({parent:t})=>t.y,edgeX:({node:t})=>t.x+t.width/2,edgeY:({node:t})=>t.y,leafGroupX:({node:t})=>t.x,leafGroupY:({node:t})=>t.y-t.height/2,leafHeight:({nodeHeight:t})=>t,leafWidth:({childLength:t,nodeWidth:e})=>e*t,leafX:({childrenSpacing:t,index:e,nodeWidth:n})=>(n+t)*-e,leafY:()=>0},top:{calculateEdge:lo,edgeMidX:({node:t})=>t.x,edgeMidY:({node:t})=>t.y-t.height/2,edgeParentX:({parent:t})=>t.x,edgeParentY:({parent:t})=>t.y+t.height/2,edgeX:({node:t})=>t.x,edgeY:({node:t})=>t.y-t.height/2,leafGroupX:({node:t})=>t.x-t.width/2,leafGroupY:({node:t})=>t.y-t.height/2,leafHeight:({childLength:t,childrenSpacing:e,nodeHeight:n})=>(n+e)*t,leafWidth:({nodeWidth:t})=>t,leafX:()=>0,leafY:({childrenSpacing:t,index:e,nodeHeight:n})=>(n+t)*e}},fo={bottom:"BT",left:"LR",right:"RL",top:"TB"},po={borderColor:"#BCBCBC",borderColorHover:"#5C6BC0",borderRadius:"5px",borderStyle:"solid",borderWidth:1,canvasStyle:"",childrenSpacing:50,containerClassName:"root",contentKey:"name",direction:"top",edgeColor:"#BCBCBC",edgeColorHover:"#5C6BC0",edgeWidth:1,enableExpandCollapse:!1,enableToolbar:!1,enableTooltip:!1,fontColor:"#000000",fontFamily:"",fontSize:"14px",fontWeight:"400",groupLeafNodes:!1,groupLeafNodesSpacing:10,height:"auto",highlightOnHover:!0,nodeBGColor:"#FFFFFF",nodeBGColorHover:"#FFFFFF",nodeClassName:"apextree-node",nodeHeight:30,nodeStyle:"",nodeTemplate:t=>`<div style='display: flex;justify-content: center;align-items: center; text-align: center; height: 100%;'>${t}</div>`,nodeWidth:50,siblingSpacing:50,tooltipBGColor:"#FFFFFF",tooltipBorderColor:"#BCBCBC",tooltipId:"apextree-tooltip-container",tooltipMaxWidth:100,viewPortHeight:600,viewPortWidth:800,width:"100%"},mo=(t,e={})=>{for(const n in e)null==t||t.setAttribute(n,e[n])},go=(t,e,n,r)=>{const i=null==t?void 0:t.options,s=(null==i?void 0:i.borderWidth)||r.borderWidth;let o=(null==i?void 0:i.borderColor)||r.borderColor,u=(null==i?void 0:i.nodeBGColor)||r.nodeBGColor;n&&(o=(null==i?void 0:i.borderColorHover)||r.borderColorHover,u=(null==i?void 0:i.nodeBGColorHover)||r.nodeBGColorHover);const a=document.querySelector(`[data-self='${t.id}'] foreignObject div`);if(a&&!t.id.endsWith("_leafs")&&(a.style.borderWidth=`${s}px`,a.style.borderColor=o,a.style.backgroundColor=u),t.parent){const i=document.getElementById(`${t.parent}-${t.id}`);mo(i,n?{stroke:r.edgeColorHover,"stroke-width":r.edgeWidth+1}:{stroke:r.edgeColor,"stroke-width":r.edgeWidth}),t.parent&&go(e[t.parent],e,n,r)}};function yo(t,e,n){const{children:r,...i}=t,s={...i,children:r?r.map((t=>t.id)):[],parent:e?e.id:void 0};if(n[s.id]=s,null==r?void 0:r.length)for(const o of r)yo(o,s,n)}function _o(t){const e={};return yo(t,void 0,e),e}const vo={},wo=[];function bo(t,e){if(Array.isArray(t))for(const n of t)bo(n,e);else if("object"!=typeof t)Eo(Object.getOwnPropertyNames(e)),vo[t]=Object.assign(vo[t]||{},e);else for(const n in t)bo(n,t[n])}function xo(t){return vo[t]||{}}function Eo(t){wo.push(...t)}function Oo(t,e){let n;const r=t.length,i=[];for(n=0;n<r;n++)i.push(e(t[n]));return i}function Mo(t){return t%360*Math.PI/180}function ko(t){return t.charAt(0).toUpperCase()+t.slice(1)}function Co(t,e,n,r){return null!=e&&null!=n||(r=r||t.bbox(),null==e?e=r.width/r.height*n:null==n&&(n=r.height/r.width*e)),{width:e,height:n}}function Ao(t,e){const n=t.origin;let r=null!=t.ox?t.ox:null!=t.originX?t.originX:"center",i=null!=t.oy?t.oy:null!=t.originY?t.originY:"center";null!=n&&([r,i]=Array.isArray(n)?n:"object"==typeof n?[n.x,n.y]:[n,n]);const s="string"==typeof r,o="string"==typeof i;if(s||o){const{height:t,width:n,x:u,y:a}=e.bbox();s&&(r=r.includes("left")?u:r.includes("right")?u+n:u+n/2),o&&(i=i.includes("top")?a:i.includes("bottom")?a+t:a+t/2)}return[r,i]}const So=new Set(["desc","metadata","title"]),No=t=>So.has(t.nodeName),jo=(t,e,n={})=>{const r={...e};for(const i in r)r[i].valueOf()===n[i]&&delete r[i];Object.keys(r).length?t.node.setAttribute("data-svgjs",JSON.stringify(r)):(t.node.removeAttribute("data-svgjs"),t.node.removeAttribute("svgjs:data"))},To="http://www.w3.org/2000/svg",Io="http://www.w3.org/2000/xmlns/",Ro="http://www.w3.org/1999/xlink",Lo={window:"undefined"==typeof window?null:window,document:"undefined"==typeof document?null:document};class zo{}const Po={},Do="___SYMBOL___ROOT___";function Fo(t,e=To){return Lo.document.createElementNS(e,t)}function $o(t,e=!1){if(t instanceof zo)return t;if("object"==typeof t)return Xo(t);if(null==t)return new Po[Do];if("string"==typeof t&&"<"!==t.charAt(0))return Xo(Lo.document.querySelector(t));const n=e?Lo.document.createElement("div"):Fo("svg");return n.innerHTML=t,t=Xo(n.firstChild),n.removeChild(n.firstChild),t}function Yo(t,e){return e&&(e instanceof Lo.window.Node||e.ownerDocument&&e instanceof e.ownerDocument.defaultView.Node)?e:Fo(t)}function Go(t){if(!t)return null;if(t.instance instanceof zo)return t.instance;if("#document-fragment"===t.nodeName)return new Po.Fragment(t);let e=ko(t.nodeName||"Dom");return"LinearGradient"===e||"RadialGradient"===e?e="Gradient":Po[e]||(e="Dom"),new Po[e](t)}let Xo=Go;function Bo(t,e=t.name,n=!1){return Po[e]=t,n&&(Po[Do]=t),Eo(Object.getOwnPropertyNames(t.prototype)),t}let qo=1e3;function Vo(t){return"Svgjs"+ko(t)+qo++}function Wo(t){for(let e=t.children.length-1;e>=0;e--)Wo(t.children[e]);return t.id?(t.id=Vo(t.nodeName),t):t}function Ho(t,e){let n,r;for(r=(t=Array.isArray(t)?t:[t]).length-1;r>=0;r--)for(n in e)t[r].prototype[n]=e[n]}function Uo(t){return function(...e){const n=e[e.length-1];return!n||n.constructor!==Object||n instanceof Array?t.apply(this,e):t.apply(this,e.slice(0,-1)).attr(n)}}bo("Dom",{siblings:function(){return this.parent().children()},position:function(){return this.parent().index(this)},next:function(){return this.siblings()[this.position()+1]},prev:function(){return this.siblings()[this.position()-1]},forward:function(){const t=this.position();return this.parent().add(this.remove(),t+1),this},backward:function(){const t=this.position();return this.parent().add(this.remove(),t?t-1:0),this},front:function(){return this.parent().add(this.remove()),this},back:function(){return this.parent().add(this.remove(),0),this},before:function(t){(t=$o(t)).remove();const e=this.position();return this.parent().add(t,e),this},after:function(t){(t=$o(t)).remove();const e=this.position();return this.parent().add(t,e+1),this},insertBefore:function(t){return(t=$o(t)).before(this),this},insertAfter:function(t){return(t=$o(t)).after(this),this}});const Zo=/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,Qo=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,Jo=/rgb\((\d+),(\d+),(\d+)\)/,Ko=/(#[a-z_][a-z0-9\-_]*)/i,tu=/\)\s*,?\s*/,eu=/\s/g,nu=/^#[a-f0-9]{3}$|^#[a-f0-9]{6}$/i,ru=/^rgb\(/,iu=/^(\s+)?$/,su=/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,ou=/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,uu=/[\s,]+/,au=/[MLHVCSQTAZ]/i;function hu(t){const e=Math.round(t),n=Math.max(0,Math.min(255,e)).toString(16);return 1===n.length?"0"+n:n}function lu(t,e){for(let n=e.length;n--;)if(null==t[e[n]])return!1;return!0}function cu(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}bo("Dom",{classes:function(){const t=this.attr("class");return null==t?[]:t.trim().split(uu)},hasClass:function(t){return-1!==this.classes().indexOf(t)},addClass:function(t){if(!this.hasClass(t)){const e=this.classes();e.push(t),this.attr("class",e.join(" "))}return this},removeClass:function(t){return this.hasClass(t)&&this.attr("class",this.classes().filter((function(e){return e!==t})).join(" ")),this},toggleClass:function(t){return this.hasClass(t)?this.removeClass(t):this.addClass(t)}}),bo("Dom",{css:function(t,e){const n={};if(0===arguments.length)return this.node.style.cssText.split(/\s*;\s*/).filter((function(t){return!!t.length})).forEach((function(t){const e=t.split(/\s*:\s*/);n[e[0]]=e[1]})),n;if(arguments.length<2){if(Array.isArray(t)){for(const e of t){const t=e;n[e]=this.node.style.getPropertyValue(t)}return n}if("string"==typeof t)return this.node.style.getPropertyValue(t);if("object"==typeof t)for(const e in t)this.node.style.setProperty(e,null==t[e]||iu.test(t[e])?"":t[e])}return 2===arguments.length&&this.node.style.setProperty(t,null==e||iu.test(e)?"":e),this},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},visible:function(){return"none"!==this.css("display")}}),bo("Dom",{data:function(t,e,n){if(null==t)return this.data(Oo(function(t,e){let n;const r=t.length,i=[];for(n=0;n<r;n++)e(t[n])&&i.push(t[n]);return i}(this.node.attributes,(t=>0===t.nodeName.indexOf("data-"))),(t=>t.nodeName.slice(5))));if(t instanceof Array){const e={};for(const n of t)e[n]=this.data(n);return e}if("object"==typeof t)for(e in t)this.data(e,t[e]);else if(arguments.length<2)try{return JSON.parse(this.attr("data-"+t))}catch(r){return this.attr("data-"+t)}else this.attr("data-"+t,null===e?null:!0===n||"string"==typeof e||"number"==typeof e?e:JSON.stringify(e));return this}}),bo("Dom",{remember:function(t,e){if("object"==typeof arguments[0])for(const n in t)this.remember(n,t[n]);else{if(1===arguments.length)return this.memory()[t];this.memory()[t]=e}return this},forget:function(){if(0===arguments.length)this._memory={};else for(let t=arguments.length-1;t>=0;t--)delete this.memory()[arguments[t]];return this},memory:function(){return this._memory=this._memory||{}}});class fu{constructor(...t){this.init(...t)}static isColor(t){return t&&(t instanceof fu||this.isRgb(t)||this.test(t))}static isRgb(t){return t&&"number"==typeof t.r&&"number"==typeof t.g&&"number"==typeof t.b}static random(t="vibrant",e){const{random:n,round:r,sin:i,PI:s}=Math;if("vibrant"===t){const t=24*n()+57,e=38*n()+45,r=360*n();return new fu(t,e,r,"lch")}if("sine"===t){const t=r(80*i(2*s*(e=null==e?n():e)/.5+.01)+150),o=r(50*i(2*s*e/.5+4.6)+200),u=r(100*i(2*s*e/.5+2.3)+150);return new fu(t,o,u)}if("pastel"===t){const t=8*n()+86,e=17*n()+9,r=360*n();return new fu(t,e,r,"lch")}if("dark"===t){const t=10+10*n(),e=50*n()+86,r=360*n();return new fu(t,e,r,"lch")}if("rgb"===t){const t=255*n(),e=255*n(),r=255*n();return new fu(t,e,r)}if("lab"===t){const t=100*n(),e=256*n()-128,r=256*n()-128;return new fu(t,e,r,"lab")}if("grey"===t){const t=255*n();return new fu(t,t,t)}throw new Error("Unsupported random color mode")}static test(t){return"string"==typeof t&&(nu.test(t)||ru.test(t))}cmyk(){const{_a:t,_b:e,_c:n}=this.rgb(),[r,i,s]=[t,e,n].map((t=>t/255)),o=Math.min(1-r,1-i,1-s);if(1===o)return new fu(0,0,0,1,"cmyk");return new fu((1-r-o)/(1-o),(1-i-o)/(1-o),(1-s-o)/(1-o),o,"cmyk")}hsl(){const{_a:t,_b:e,_c:n}=this.rgb(),[r,i,s]=[t,e,n].map((t=>t/255)),o=Math.max(r,i,s),u=Math.min(r,i,s),a=(o+u)/2,h=o===u,l=o-u;return new fu(360*(h?0:o===r?((i-s)/l+(i<s?6:0))/6:o===i?((s-r)/l+2)/6:o===s?((r-i)/l+4)/6:0),100*(h?0:a>.5?l/(2-o-u):l/(o+u)),100*a,"hsl")}init(t=0,e=0,n=0,r=0,i="rgb"){if(t=t||0,this.space)for(const c in this.space)delete this[this.space[c]];if("number"==typeof t)i="string"==typeof r?r:i,r="string"==typeof r?0:r,Object.assign(this,{_a:t,_b:e,_c:n,_d:r,space:i});else if(t instanceof Array)this.space=e||("string"==typeof t[3]?t[3]:t[4])||"rgb",Object.assign(this,{_a:t[0],_b:t[1],_c:t[2],_d:t[3]||0});else if(t instanceof Object){const n=function(t,e){const n=lu(t,"rgb")?{_a:t.r,_b:t.g,_c:t.b,_d:0,space:"rgb"}:lu(t,"xyz")?{_a:t.x,_b:t.y,_c:t.z,_d:0,space:"xyz"}:lu(t,"hsl")?{_a:t.h,_b:t.s,_c:t.l,_d:0,space:"hsl"}:lu(t,"lab")?{_a:t.l,_b:t.a,_c:t.b,_d:0,space:"lab"}:lu(t,"lch")?{_a:t.l,_b:t.c,_c:t.h,_d:0,space:"lch"}:lu(t,"cmyk")?{_a:t.c,_b:t.m,_c:t.y,_d:t.k,space:"cmyk"}:{_a:0,_b:0,_c:0,space:"rgb"};return n.space=e||n.space,n}(t,e);Object.assign(this,n)}else if("string"==typeof t)if(ru.test(t)){const e=t.replace(eu,""),[n,r,i]=Jo.exec(e).slice(1,4).map((t=>parseInt(t)));Object.assign(this,{_a:n,_b:r,_c:i,_d:0,space:"rgb"})}else{if(!nu.test(t))throw Error("Unsupported string format, can't construct Color");{const e=t=>parseInt(t,16),[,n,r,i]=Qo.exec((s=t,4===s.length?["#",s.substring(1,2),s.substring(1,2),s.substring(2,3),s.substring(2,3),s.substring(3,4),s.substring(3,4)].join(""):s)).map(e);Object.assign(this,{_a:n,_b:r,_c:i,_d:0,space:"rgb"})}}var s;const{_a:o,_b:u,_c:a,_d:h}=this,l="rgb"===this.space?{r:o,g:u,b:a}:"xyz"===this.space?{x:o,y:u,z:a}:"hsl"===this.space?{h:o,s:u,l:a}:"lab"===this.space?{l:o,a:u,b:a}:"lch"===this.space?{l:o,c:u,h:a}:"cmyk"===this.space?{c:o,m:u,y:a,k:h}:{};Object.assign(this,l)}lab(){const{x:t,y:e,z:n}=this.xyz();return new fu(116*e-16,500*(t-e),200*(e-n),"lab")}lch(){const{l:t,a:e,b:n}=this.lab(),r=Math.sqrt(e**2+n**2);let i=180*Math.atan2(n,e)/Math.PI;i<0&&(i*=-1,i=360-i);return new fu(t,r,i,"lch")}rgb(){if("rgb"===this.space)return this;if("lab"===(t=this.space)||"xyz"===t||"lch"===t){let{x:t,y:e,z:n}=this;if("lab"===this.space||"lch"===this.space){let{l:r,a:i,b:s}=this;if("lch"===this.space){const{c:t,h:e}=this,n=Math.PI/180;i=t*Math.cos(n*e),s=t*Math.sin(n*e)}const o=(r+16)/116,u=i/500+o,a=o-s/200,h=16/116,l=.008856,c=7.787;t=.95047*(u**3>l?u**3:(u-h)/c),e=1*(o**3>l?o**3:(o-h)/c),n=1.08883*(a**3>l?a**3:(a-h)/c)}const r=3.2406*t+-1.5372*e+-.4986*n,i=-.9689*t+1.8758*e+.0415*n,s=.0557*t+-.204*e+1.057*n,o=Math.pow,u=.0031308,a=r>u?1.055*o(r,1/2.4)-.055:12.92*r,h=i>u?1.055*o(i,1/2.4)-.055:12.92*i,l=s>u?1.055*o(s,1/2.4)-.055:12.92*s;return new fu(255*a,255*h,255*l)}if("hsl"===this.space){let{h:t,s:e,l:n}=this;if(t/=360,e/=100,n/=100,0===e){n*=255;return new fu(n,n,n)}const r=n<.5?n*(1+e):n+e-n*e,i=2*n-r,s=255*cu(i,r,t+1/3),o=255*cu(i,r,t),u=255*cu(i,r,t-1/3);return new fu(s,o,u)}if("cmyk"===this.space){const{c:t,m:e,y:n,k:r}=this,i=255*(1-Math.min(1,t*(1-r)+r)),s=255*(1-Math.min(1,e*(1-r)+r)),o=255*(1-Math.min(1,n*(1-r)+r));return new fu(i,s,o)}return this;var t}toArray(){const{_a:t,_b:e,_c:n,_d:r,space:i}=this;return[t,e,n,r,i]}toHex(){const[t,e,n]=this._clamped().map(hu);return`#${t}${e}${n}`}toRgb(){const[t,e,n]=this._clamped();return`rgb(${t},${e},${n})`}toString(){return this.toHex()}xyz(){const{_a:t,_b:e,_c:n}=this.rgb(),[r,i,s]=[t,e,n].map((t=>t/255)),o=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92,u=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92,a=s>.04045?Math.pow((s+.055)/1.055,2.4):s/12.92,h=(.4124*o+.3576*u+.1805*a)/.95047,l=(.2126*o+.7152*u+.0722*a)/1,c=(.0193*o+.1192*u+.9505*a)/1.08883,f=h>.008856?Math.pow(h,1/3):7.787*h+16/116,d=l>.008856?Math.pow(l,1/3):7.787*l+16/116,p=c>.008856?Math.pow(c,1/3):7.787*c+16/116;return new fu(f,d,p,"xyz")}_clamped(){const{_a:t,_b:e,_c:n}=this.rgb(),{max:r,min:i,round:s}=Math;return[t,e,n].map((t=>r(0,i(s(t),255))))}}class du{constructor(...t){this.init(...t)}clone(){return new du(this)}init(t,e){const n=0,r=0,i=Array.isArray(t)?{x:t[0],y:t[1]}:"object"==typeof t?{x:t.x,y:t.y}:{x:t,y:e};return this.x=null==i.x?n:i.x,this.y=null==i.y?r:i.y,this}toArray(){return[this.x,this.y]}transform(t){return this.clone().transformO(t)}transformO(t){mu.isMatrixLike(t)||(t=new mu(t));const{x:e,y:n}=this;return this.x=t.a*e+t.c*n+t.e,this.y=t.b*e+t.d*n+t.f,this}}function pu(t,e,n){return Math.abs(e-t)<1e-6}class mu{constructor(...t){this.init(...t)}static formatTransforms(t){const e="both"===t.flip||!0===t.flip,n=t.flip&&(e||"x"===t.flip)?-1:1,r=t.flip&&(e||"y"===t.flip)?-1:1,i=t.skew&&t.skew.length?t.skew[0]:isFinite(t.skew)?t.skew:isFinite(t.skewX)?t.skewX:0,s=t.skew&&t.skew.length?t.skew[1]:isFinite(t.skew)?t.skew:isFinite(t.skewY)?t.skewY:0,o=t.scale&&t.scale.length?t.scale[0]*n:isFinite(t.scale)?t.scale*n:isFinite(t.scaleX)?t.scaleX*n:n,u=t.scale&&t.scale.length?t.scale[1]*r:isFinite(t.scale)?t.scale*r:isFinite(t.scaleY)?t.scaleY*r:r,a=t.shear||0,h=t.rotate||t.theta||0,l=new du(t.origin||t.around||t.ox||t.originX,t.oy||t.originY),c=l.x,f=l.y,d=new du(t.position||t.px||t.positionX||NaN,t.py||t.positionY||NaN),p=d.x,m=d.y,g=new du(t.translate||t.tx||t.translateX,t.ty||t.translateY),y=g.x,_=g.y,v=new du(t.relative||t.rx||t.relativeX,t.ry||t.relativeY);return{scaleX:o,scaleY:u,skewX:i,skewY:s,shear:a,theta:h,rx:v.x,ry:v.y,tx:y,ty:_,ox:c,oy:f,px:p,py:m}}static fromArray(t){return{a:t[0],b:t[1],c:t[2],d:t[3],e:t[4],f:t[5]}}static isMatrixLike(t){return null!=t.a||null!=t.b||null!=t.c||null!=t.d||null!=t.e||null!=t.f}static matrixMultiply(t,e,n){const r=t.a*e.a+t.c*e.b,i=t.b*e.a+t.d*e.b,s=t.a*e.c+t.c*e.d,o=t.b*e.c+t.d*e.d,u=t.e+t.a*e.e+t.c*e.f,a=t.f+t.b*e.e+t.d*e.f;return n.a=r,n.b=i,n.c=s,n.d=o,n.e=u,n.f=a,n}around(t,e,n){return this.clone().aroundO(t,e,n)}aroundO(t,e,n){const r=t||0,i=e||0;return this.translateO(-r,-i).lmultiplyO(n).translateO(r,i)}clone(){return new mu(this)}decompose(t=0,e=0){const n=this.a,r=this.b,i=this.c,s=this.d,o=this.e,u=this.f,a=n*s-r*i,h=a>0?1:-1,l=h*Math.sqrt(n*n+r*r),c=Math.atan2(h*r,h*n),f=180/Math.PI*c,d=Math.cos(c),p=Math.sin(c),m=(n*i+r*s)/a,g=i*l/(m*n-r)||s*l/(m*r+n);return{scaleX:l,scaleY:g,shear:m,rotate:f,translateX:o-t+t*d*l+e*(m*d*l-p*g),translateY:u-e+t*p*l+e*(m*p*l+d*g),originX:t,originY:e,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}equals(t){if(t===this)return!0;const e=new mu(t);return pu(this.a,e.a)&&pu(this.b,e.b)&&pu(this.c,e.c)&&pu(this.d,e.d)&&pu(this.e,e.e)&&pu(this.f,e.f)}flip(t,e){return this.clone().flipO(t,e)}flipO(t,e){return"x"===t?this.scaleO(-1,1,e,0):"y"===t?this.scaleO(1,-1,0,e):this.scaleO(-1,-1,t,e||t)}init(t){const e=mu.fromArray([1,0,0,1,0,0]);return t=t instanceof $u?t.matrixify():"string"==typeof t?mu.fromArray(t.split(uu).map(parseFloat)):Array.isArray(t)?mu.fromArray(t):"object"==typeof t&&mu.isMatrixLike(t)?t:"object"==typeof t?(new mu).transform(t):6===arguments.length?mu.fromArray([].slice.call(arguments)):e,this.a=null!=t.a?t.a:e.a,this.b=null!=t.b?t.b:e.b,this.c=null!=t.c?t.c:e.c,this.d=null!=t.d?t.d:e.d,this.e=null!=t.e?t.e:e.e,this.f=null!=t.f?t.f:e.f,this}inverse(){return this.clone().inverseO()}inverseO(){const t=this.a,e=this.b,n=this.c,r=this.d,i=this.e,s=this.f,o=t*r-e*n;if(!o)throw new Error("Cannot invert "+this);const u=r/o,a=-e/o,h=-n/o,l=t/o,c=-(u*i+h*s),f=-(a*i+l*s);return this.a=u,this.b=a,this.c=h,this.d=l,this.e=c,this.f=f,this}lmultiply(t){return this.clone().lmultiplyO(t)}lmultiplyO(t){const e=t instanceof mu?t:new mu(t);return mu.matrixMultiply(e,this,this)}multiply(t){return this.clone().multiplyO(t)}multiplyO(t){const e=t instanceof mu?t:new mu(t);return mu.matrixMultiply(this,e,this)}rotate(t,e,n){return this.clone().rotateO(t,e,n)}rotateO(t,e=0,n=0){t=Mo(t);const r=Math.cos(t),i=Math.sin(t),{a:s,b:o,c:u,d:a,e:h,f:l}=this;return this.a=s*r-o*i,this.b=o*r+s*i,this.c=u*r-a*i,this.d=a*r+u*i,this.e=h*r-l*i+n*i-e*r+e,this.f=l*r+h*i-e*i-n*r+n,this}scale(){return this.clone().scaleO(...arguments)}scaleO(t,e=t,n=0,r=0){3===arguments.length&&(r=n,n=e,e=t);const{a:i,b:s,c:o,d:u,e:a,f:h}=this;return this.a=i*t,this.b=s*e,this.c=o*t,this.d=u*e,this.e=a*t-n*t+n,this.f=h*e-r*e+r,this}shear(t,e,n){return this.clone().shearO(t,e,n)}shearO(t,e=0,n=0){const{a:r,b:i,c:s,d:o,e:u,f:a}=this;return this.a=r+i*t,this.c=s+o*t,this.e=u+a*t-n*t,this}skew(){return this.clone().skewO(...arguments)}skewO(t,e=t,n=0,r=0){3===arguments.length&&(r=n,n=e,e=t),t=Mo(t),e=Mo(e);const i=Math.tan(t),s=Math.tan(e),{a:o,b:u,c:a,d:h,e:l,f:c}=this;return this.a=o+u*i,this.b=u+o*s,this.c=a+h*i,this.d=h+a*s,this.e=l+c*i-r*i,this.f=c+l*s-n*s,this}skewX(t,e,n){return this.skew(t,0,e,n)}skewY(t,e,n){return this.skew(0,t,e,n)}toArray(){return[this.a,this.b,this.c,this.d,this.e,this.f]}toString(){return"matrix("+this.a+","+this.b+","+this.c+","+this.d+","+this.e+","+this.f+")"}transform(t){if(mu.isMatrixLike(t)){return new mu(t).multiplyO(this)}const e=mu.formatTransforms(t),{x:n,y:r}=new du(e.ox,e.oy).transform(this),i=(new mu).translateO(e.rx,e.ry).lmultiplyO(this).translateO(-n,-r).scaleO(e.scaleX,e.scaleY).skewO(e.skewX,e.skewY).shearO(e.shear).rotateO(e.theta).translateO(n,r);if(isFinite(e.px)||isFinite(e.py)){const t=new du(n,r).transform(i),s=isFinite(e.px)?e.px-t.x:0,o=isFinite(e.py)?e.py-t.y:0;i.translateO(s,o)}return i.translateO(e.tx,e.ty),i}translate(t,e){return this.clone().translateO(t,e)}translateO(t,e){return this.e+=t||0,this.f+=e||0,this}valueOf(){return{a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}}function gu(){if(!gu.nodes){const t=$o().size(2,0);t.node.style.cssText=["opacity: 0","position: absolute","left: -100%","top: -100%","overflow: hidden"].join(";"),t.attr("focusable","false"),t.attr("aria-hidden","true");const e=t.path().node;gu.nodes={svg:t,path:e}}if(!gu.nodes.svg.node.parentNode){const t=Lo.document.body||Lo.document.documentElement;gu.nodes.svg.addTo(t)}return gu.nodes}function yu(t){return!(t.width||t.height||t.x||t.y)}Bo(mu,"Matrix");class _u{constructor(...t){this.init(...t)}addOffset(){return this.x+=Lo.window.pageXOffset,this.y+=Lo.window.pageYOffset,new _u(this)}init(t){return t="string"==typeof t?t.split(uu).map(parseFloat):Array.isArray(t)?t:"object"==typeof t?[null!=t.left?t.left:t.x,null!=t.top?t.top:t.y,t.width,t.height]:4===arguments.length?[].slice.call(arguments):[0,0,0,0],this.x=t[0]||0,this.y=t[1]||0,this.width=this.w=t[2]||0,this.height=this.h=t[3]||0,this.x2=this.x+this.w,this.y2=this.y+this.h,this.cx=this.x+this.w/2,this.cy=this.y+this.h/2,this}isNulled(){return yu(this)}merge(t){const e=Math.min(this.x,t.x),n=Math.min(this.y,t.y),r=Math.max(this.x+this.width,t.x+t.width)-e,i=Math.max(this.y+this.height,t.y+t.height)-n;return new _u(e,n,r,i)}toArray(){return[this.x,this.y,this.width,this.height]}toString(){return this.x+" "+this.y+" "+this.width+" "+this.height}transform(t){t instanceof mu||(t=new mu(t));let e=1/0,n=-1/0,r=1/0,i=-1/0;return[new du(this.x,this.y),new du(this.x2,this.y),new du(this.x,this.y2),new du(this.x2,this.y2)].forEach((function(s){s=s.transform(t),e=Math.min(e,s.x),n=Math.max(n,s.x),r=Math.min(r,s.y),i=Math.max(i,s.y)})),new _u(e,r,n-e,i-r)}}function vu(t,e,n){let r;try{if(r=e(t.node),yu(r)&&((i=t.node)!==Lo.document&&!(Lo.document.documentElement.contains||function(t){for(;t.parentNode;)t=t.parentNode;return t===Lo.document}).call(Lo.document.documentElement,i)))throw new Error("Element not in the dom")}catch(s){r=n(t)}var i;return r}bo({viewbox:{viewbox(t,e,n,r){return null==t?new _u(this.attr("viewBox")):this.attr("viewBox",new _u(t,e,n,r))},zoom(t,e){let{width:n,height:r}=this.attr(["width","height"]);if((n||r)&&"string"!=typeof n&&"string"!=typeof r||(n=this.node.clientWidth,r=this.node.clientHeight),!n||!r)throw new Error("Impossible to get absolute width and height. Please provide an absolute width and height attribute on the zooming element");const i=this.viewbox(),s=n/i.width,o=r/i.height,u=Math.min(s,o);if(null==t)return u;let a=u/t;a===1/0&&(a=Number.MAX_SAFE_INTEGER/100),e=e||new du(n/2/s+i.x,r/2/o+i.y);const h=new _u(i).transform(new mu({scale:a,origin:e}));return this.viewbox(h)}}}),Bo(_u,"Box");class wu extends Array{constructor(t=[],...e){if(super(t,...e),"number"==typeof t)return this;this.length=0,this.push(...t)}}Ho([wu],{each(t,...e){return"function"==typeof t?this.map(((e,n,r)=>t.call(e,e,n,r))):this.map((n=>n[t](...e)))},toArray(){return Array.prototype.concat.apply([],this)}});const bu=["toArray","constructor","each"];function xu(t,e){return new wu(Oo((e||Lo.document).querySelectorAll(t),(function(t){return Go(t)})))}wu.extend=function(t){t=t.reduce(((t,e)=>(bu.includes(e)||"_"===e[0]||(e in Array.prototype&&(t["$"+e]=Array.prototype[e]),t[e]=function(...t){return this.each(e,...t)}),t)),{}),Ho([wu],t)};let Eu=0;const Ou={};function Mu(t){let e=t.getEventHolder();return e===Lo.window&&(e=Ou),e.events||(e.events={}),e.events}function ku(t){return t.getEventTarget()}function Cu(t,e,n,r,i){const s=n.bind(r||t),o=$o(t),u=Mu(o),a=ku(o);e=Array.isArray(e)?e:e.split(uu),n._svgjsListenerId||(n._svgjsListenerId=++Eu),e.forEach((function(t){const e=t.split(".")[0],r=t.split(".")[1]||"*";u[e]=u[e]||{},u[e][r]=u[e][r]||{},u[e][r][n._svgjsListenerId]=s,a.addEventListener(e,s,i||!1)}))}function Au(t,e,n,r){const i=$o(t),s=Mu(i),o=ku(i);("function"!=typeof n||(n=n._svgjsListenerId))&&(e=Array.isArray(e)?e:(e||"").split(uu)).forEach((function(t){const e=t&&t.split(".")[0],u=t&&t.split(".")[1];let a,h;if(n)s[e]&&s[e][u||"*"]&&(o.removeEventListener(e,s[e][u||"*"][n],r||!1),delete s[e][u||"*"][n]);else if(e&&u){if(s[e]&&s[e][u]){for(h in s[e][u])Au(o,[e,u].join("."),h);delete s[e][u]}}else if(u)for(t in s)for(a in s[t])u===a&&Au(o,[t,u].join("."));else if(e){if(s[e]){for(a in s[e])Au(o,[e,a].join("."));delete s[e]}}else{for(t in s)Au(o,t);!function(t){let e=t.getEventHolder();e===Lo.window&&(e=Ou),e.events&&(e.events={})}(i)}}))}class Su extends zo{addEventListener(){}dispatch(t,e,n){return function(t,e,n,r){const i=ku(t);return e instanceof Lo.window.Event||(e=new Lo.window.CustomEvent(e,{detail:n,cancelable:!0,...r})),i.dispatchEvent(e),e}(this,t,e,n)}dispatchEvent(t){const e=this.getEventHolder().events;if(!e)return!0;const n=e[t.type];for(const r in n)for(const e in n[r])n[r][e](t);return!t.defaultPrevented}fire(t,e,n){return this.dispatch(t,e,n),this}getEventHolder(){return this}getEventTarget(){return this}off(t,e,n){return Au(this,t,e,n),this}on(t,e,n,r){return Cu(this,t,e,n,r),this}removeEventListener(){}}function Nu(){}Bo(Su,"EventTarget");const ju=400,Tu=">",Iu=0,Ru={"fill-opacity":1,"stroke-opacity":1,"stroke-width":0,"stroke-linejoin":"miter","stroke-linecap":"butt",fill:"#000000",stroke:"#000000",opacity:1,x:0,y:0,cx:0,cy:0,width:0,height:0,r:0,rx:0,ry:0,offset:0,"stop-opacity":1,"stop-color":"#000000","text-anchor":"start"};class Lu extends Array{constructor(...t){super(...t),this.init(...t)}clone(){return new this.constructor(this)}init(t){return"number"==typeof t||(this.length=0,this.push(...this.parse(t))),this}parse(t=[]){return t instanceof Array?t:t.trim().split(uu).map(parseFloat)}toArray(){return Array.prototype.concat.apply([],this)}toSet(){return new Set(this)}toString(){return this.join(" ")}valueOf(){const t=[];return t.push(...this),t}}class zu{constructor(...t){this.init(...t)}convert(t){return new zu(this.value,t)}divide(t){return t=new zu(t),new zu(this/t,this.unit||t.unit)}init(t,e){return e=Array.isArray(t)?t[1]:e,t=Array.isArray(t)?t[0]:t,this.value=0,this.unit=e||"","number"==typeof t?this.value=isNaN(t)?0:isFinite(t)?t:t<0?-34e37:34e37:"string"==typeof t?(e=t.match(Zo))&&(this.value=parseFloat(e[1]),"%"===e[5]?this.value/=100:"s"===e[5]&&(this.value*=1e3),this.unit=e[5]):t instanceof zu&&(this.value=t.valueOf(),this.unit=t.unit),this}minus(t){return t=new zu(t),new zu(this-t,this.unit||t.unit)}plus(t){return t=new zu(t),new zu(this+t,this.unit||t.unit)}times(t){return t=new zu(t),new zu(this*t,this.unit||t.unit)}toArray(){return[this.value,this.unit]}toJSON(){return this.toString()}toString(){return("%"===this.unit?~~(1e8*this.value)/1e6:"s"===this.unit?this.value/1e3:this.value)+this.unit}valueOf(){return this.value}}const Pu=new Set(["fill","stroke","color","bgcolor","stop-color","flood-color","lighting-color"]),Du=[];class Fu extends Su{constructor(t,e){super(),this.node=t,this.type=t.nodeName,e&&t!==e&&this.attr(e)}add(t,e){return(t=$o(t)).removeNamespace&&this.node instanceof Lo.window.SVGElement&&t.removeNamespace(),null==e?this.node.appendChild(t.node):t.node!==this.node.childNodes[e]&&this.node.insertBefore(t.node,this.node.childNodes[e]),this}addTo(t,e){return $o(t).put(this,e)}children(){return new wu(Oo(this.node.children,(function(t){return Go(t)})))}clear(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return this}clone(t=!0,e=!0){this.writeDataToDom();let n=this.node.cloneNode(t);return e&&(n=Wo(n)),new this.constructor(n)}each(t,e){const n=this.children();let r,i;for(r=0,i=n.length;r<i;r++)t.apply(n[r],[r,n]),e&&n[r].each(t,e);return this}element(t,e){return this.put(new Fu(Fo(t),e))}first(){return Go(this.node.firstChild)}get(t){return Go(this.node.childNodes[t])}getEventHolder(){return this.node}getEventTarget(){return this.node}has(t){return this.index(t)>=0}html(t,e){return this.xml(t,e,"http://www.w3.org/1999/xhtml")}id(t){return void 0!==t||this.node.id||(this.node.id=Vo(this.type)),this.attr("id",t)}index(t){return[].slice.call(this.node.childNodes).indexOf(t.node)}last(){return Go(this.node.lastChild)}matches(t){const e=this.node,n=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector||null;return n&&n.call(e,t)}parent(t){let e=this;if(!e.node.parentNode)return null;if(e=Go(e.node.parentNode),!t)return e;do{if("string"==typeof t?e.matches(t):e instanceof t)return e}while(e=Go(e.node.parentNode));return e}put(t,e){return t=$o(t),this.add(t,e),t}putIn(t,e){return $o(t).add(this,e)}remove(){return this.parent()&&this.parent().removeElement(this),this}removeElement(t){return this.node.removeChild(t.node),this}replace(t){return t=$o(t),this.node.parentNode&&this.node.parentNode.replaceChild(t.node,this.node),t}round(t=2,e=null){const n=10**t,r=this.attr(e);for(const i in r)"number"==typeof r[i]&&(r[i]=Math.round(r[i]*n)/n);return this.attr(r),this}svg(t,e){return this.xml(t,e,To)}toString(){return this.id()}words(t){return this.node.textContent=t,this}wrap(t){const e=this.parent();if(!e)return this.addTo(t);const n=e.index(this);return e.put(t,n).put(this)}writeDataToDom(){return this.each((function(){this.writeDataToDom()})),this}xml(t,e,n){if("boolean"==typeof t&&(n=e,e=t,t=null),null==t||"function"==typeof t){e=null==e||e,this.writeDataToDom();let n=this;if(null!=t){if(n=Go(n.node.cloneNode(!0)),e){const e=t(n);if(n=e||n,!1===e)return""}n.each((function(){const e=t(this),n=e||this;!1===e?this.remove():e&&this!==n&&this.replace(n)}),!0)}return e?n.node.outerHTML:n.node.innerHTML}e=null!=e&&e;const r=Fo("wrapper",n),i=Lo.document.createDocumentFragment();r.innerHTML=t;for(let o=r.children.length;o--;)i.appendChild(r.firstElementChild);const s=this.parent();return e?this.replace(i)&&s:this.add(i)}}Ho(Fu,{attr:function(t,e,n){if(null==t){t={},e=this.node.attributes;for(const n of e)t[n.nodeName]=su.test(n.nodeValue)?parseFloat(n.nodeValue):n.nodeValue;return t}if(t instanceof Array)return t.reduce(((t,e)=>(t[e]=this.attr(e),t)),{});if("object"==typeof t&&t.constructor===Object)for(e in t)this.attr(e,t[e]);else if(null===e)this.node.removeAttribute(t);else{if(null==e)return null==(e=this.node.getAttribute(t))?Ru[t]:su.test(e)?parseFloat(e):e;"number"==typeof(e=Du.reduce(((e,n)=>n(t,e,this)),e))?e=new zu(e):Pu.has(t)&&fu.isColor(e)?e=new fu(e):e.constructor===Array&&(e=new Lu(e)),"leading"===t?this.leading&&this.leading(e):"string"==typeof n?this.node.setAttributeNS(n,t,e.toString()):this.node.setAttribute(t,e.toString()),!this.rebuild||"font-size"!==t&&"x"!==t||this.rebuild()}return this},find:function(t){return xu(t,this.node)},findOne:function(t){return Go(this.node.querySelector(t))}}),Bo(Fu,"Dom");class $u extends Fu{constructor(t,e){super(t,e),this.dom={},this.node.instance=this,(t.hasAttribute("data-svgjs")||t.hasAttribute("svgjs:data"))&&this.setData(JSON.parse(t.getAttribute("data-svgjs"))??JSON.parse(t.getAttribute("svgjs:data"))??{})}center(t,e){return this.cx(t).cy(e)}cx(t){return null==t?this.x()+this.width()/2:this.x(t-this.width()/2)}cy(t){return null==t?this.y()+this.height()/2:this.y(t-this.height()/2)}defs(){const t=this.root();return t&&t.defs()}dmove(t,e){return this.dx(t).dy(e)}dx(t=0){return this.x(new zu(t).plus(this.x()))}dy(t=0){return this.y(new zu(t).plus(this.y()))}getEventHolder(){return this}height(t){return this.attr("height",t)}move(t,e){return this.x(t).y(e)}parents(t=this.root()){const e="string"==typeof t;e||(t=$o(t));const n=new wu;let r=this;for(;(r=r.parent())&&r.node!==Lo.document&&"#document-fragment"!==r.nodeName&&(n.push(r),e||r.node!==t.node)&&(!e||!r.matches(t));)if(r.node===this.root().node)return null;return n}reference(t){if(!(t=this.attr(t)))return null;const e=(t+"").match(Ko);return e?$o(e[1]):null}root(){const t=this.parent(Po[Do]);return t&&t.root()}setData(t){return this.dom=t,this}size(t,e){const n=Co(this,t,e);return this.width(new zu(n.width)).height(new zu(n.height))}width(t){return this.attr("width",t)}writeDataToDom(){return jo(this,this.dom),super.writeDataToDom()}x(t){return this.attr("x",t)}y(t){return this.attr("y",t)}}Ho($u,{bbox:function(){const t=vu(this,(t=>t.getBBox()),(t=>{try{const e=t.clone().addTo(gu().svg).show(),n=e.node.getBBox();return e.remove(),n}catch(e){throw new Error(`Getting bbox of element "${t.node.nodeName}" is not possible: ${e.toString()}`)}}));return new _u(t)},rbox:function(t){const e=vu(this,(t=>t.getBoundingClientRect()),(t=>{throw new Error(`Getting rbox of element "${t.node.nodeName}" is not possible`)})),n=new _u(e);return t?n.transform(t.screenCTM().inverseO()):n.addOffset()},inside:function(t,e){const n=this.bbox();return t>n.x&&e>n.y&&t<n.x+n.width&&e<n.y+n.height},point:function(t,e){return new du(t,e).transformO(this.screenCTM().inverseO())},ctm:function(){return new mu(this.node.getCTM())},screenCTM:function(){try{if("function"==typeof this.isRoot&&!this.isRoot()){const t=this.rect(1,1),e=t.node.getScreenCTM();return t.remove(),new mu(e)}return new mu(this.node.getScreenCTM())}catch(t){return console.warn(`Cannot get CTM from SVG node ${this.node.nodeName}. Is the element rendered?`),new mu}}}),Bo($u,"Element");const Yu={stroke:["color","width","opacity","linecap","linejoin","miterlimit","dasharray","dashoffset"],fill:["color","opacity","rule"],prefix:function(t,e){return"color"===e?t:t+"-"+e}};["fill","stroke"].forEach((function(t){const e={};let n;e[t]=function(e){if(void 0===e)return this.attr(t);if("string"==typeof e||e instanceof fu||fu.isRgb(e)||e instanceof $u)this.attr(t,e);else for(n=Yu[t].length-1;n>=0;n--)null!=e[Yu[t][n]]&&this.attr(Yu.prefix(t,Yu[t][n]),e[Yu[t][n]]);return this},bo(["Element","Runner"],e)})),bo(["Element","Runner"],{matrix:function(t,e,n,r,i,s){return null==t?new mu(this):this.attr("transform",new mu(t,e,n,r,i,s))},rotate:function(t,e,n){return this.transform({rotate:t,ox:e,oy:n},!0)},skew:function(t,e,n,r){return 1===arguments.length||3===arguments.length?this.transform({skew:t,ox:e,oy:n},!0):this.transform({skew:[t,e],ox:n,oy:r},!0)},shear:function(t,e,n){return this.transform({shear:t,ox:e,oy:n},!0)},scale:function(t,e,n,r){return 1===arguments.length||3===arguments.length?this.transform({scale:t,ox:e,oy:n},!0):this.transform({scale:[t,e],ox:n,oy:r},!0)},translate:function(t,e){return this.transform({translate:[t,e]},!0)},relative:function(t,e){return this.transform({relative:[t,e]},!0)},flip:function(t="both",e="center"){return-1==="xybothtrue".indexOf(t)&&(e=t,t="both"),this.transform({flip:t,origin:e},!0)},opacity:function(t){return this.attr("opacity",t)}}),bo("radius",{radius:function(t,e=t){return"radialGradient"===(this._element||this).type?this.attr("r",new zu(t)):this.rx(t).ry(e)}}),bo("Path",{length:function(){return this.node.getTotalLength()},pointAt:function(t){return new du(this.node.getPointAtLength(t))}}),bo(["Element","Runner"],{font:function(t,e){if("object"==typeof t){for(e in t)this.font(e,t[e]);return this}return"leading"===t?this.leading(e):"anchor"===t?this.attr("text-anchor",e):"size"===t||"family"===t||"weight"===t||"stretch"===t||"variant"===t||"style"===t?this.attr("font-"+t,e):this.attr(t,e)}});bo("Element",["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","touchstart","touchmove","touchleave","touchend","touchcancel","contextmenu","wheel","pointerdown","pointermove","pointerup","pointerleave","pointercancel"].reduce((function(t,e){return t[e]=function(t){return null===t?this.off(e):this.on(e,t),this},t}),{})),bo("Element",{untransform:function(){return this.attr("transform",null)},matrixify:function(){return(this.attr("transform")||"").split(tu).slice(0,-1).map((function(t){const e=t.trim().split("(");return[e[0],e[1].split(uu).map((function(t){return parseFloat(t)}))]})).reverse().reduce((function(t,e){return"matrix"===e[0]?t.lmultiply(mu.fromArray(e[1])):t[e[0]].apply(t,e[1])}),new mu)},toParent:function(t,e){if(this===t)return this;if(No(this.node))return this.addTo(t,e);const n=this.screenCTM(),r=t.screenCTM().inverse();return this.addTo(t,e).untransform().transform(r.multiply(n)),this},toRoot:function(t){return this.toParent(this.root(),t)},transform:function(t,e){if(null==t||"string"==typeof t){const e=new mu(this).decompose();return null==t?e:e[t]}mu.isMatrixLike(t)||(t={...t,origin:Ao(t,this)});const n=new mu(!0===e?this:e||!1).transform(t);return this.attr("transform",n)}});class Gu extends $u{flatten(){return this.each((function(){if(this instanceof Gu)return this.flatten().ungroup()})),this}ungroup(t=this.parent(),e=t.index(this)){return e=-1===e?t.children().length:e,this.each((function(n,r){return r[r.length-n-1].toParent(t,e)})),this.remove()}}Bo(Gu,"Container");class Xu extends Gu{constructor(t,e=t){super(Yo("defs",t),e)}flatten(){return this}ungroup(){return this}}Bo(Xu,"Defs");class Bu extends $u{}function qu(t){return this.attr("rx",t)}function Vu(t){return this.attr("ry",t)}function Wu(t){return null==t?this.cx()-this.rx():this.cx(t+this.rx())}function Hu(t){return null==t?this.cy()-this.ry():this.cy(t+this.ry())}function Uu(t){return this.attr("cx",t)}function Zu(t){return this.attr("cy",t)}function Qu(t){return null==t?2*this.rx():this.rx(new zu(t).divide(2))}function Ju(t){return null==t?2*this.ry():this.ry(new zu(t).divide(2))}Bo(Bu,"Shape");const Ku=Object.freeze(Object.defineProperty({__proto__:null,cx:Uu,cy:Zu,height:Ju,rx:qu,ry:Vu,width:Qu,x:Wu,y:Hu},Symbol.toStringTag,{value:"Module"}));class ta extends Bu{constructor(t,e=t){super(Yo("ellipse",t),e)}size(t,e){const n=Co(this,t,e);return this.rx(new zu(n.width).divide(2)).ry(new zu(n.height).divide(2))}}Ho(ta,Ku),bo("Container",{ellipse:Uo((function(t=0,e=t){return this.put(new ta).size(t,e).move(0,0)}))}),Bo(ta,"Ellipse");class ea extends Fu{constructor(t=Lo.document.createDocumentFragment()){super(t)}xml(t,e,n){if("boolean"==typeof t&&(n=e,e=t,t=null),null==t||"function"==typeof t){const t=new Fu(Fo("wrapper",n));return t.add(this.node.cloneNode(!0)),t.xml(!1,n)}return super.xml(t,!1,n)}}function na(t,e){return"radialGradient"===(this._element||this).type?this.attr({fx:new zu(t),fy:new zu(e)}):this.attr({x1:new zu(t),y1:new zu(e)})}function ra(t,e){return"radialGradient"===(this._element||this).type?this.attr({cx:new zu(t),cy:new zu(e)}):this.attr({x2:new zu(t),y2:new zu(e)})}Bo(ea,"Fragment");const ia=Object.freeze(Object.defineProperty({__proto__:null,from:na,to:ra},Symbol.toStringTag,{value:"Module"}));class sa extends Gu{constructor(t,e){super(Yo(t+"Gradient","string"==typeof t?null:t),e)}attr(t,e,n){return"transform"===t&&(t="gradientTransform"),super.attr(t,e,n)}bbox(){return new _u}targets(){return xu("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}}Ho(sa,ia),bo({Container:{gradient(...t){return this.defs().gradient(...t)}},Defs:{gradient:Uo((function(t,e){return this.put(new sa(t)).update(e)}))}}),Bo(sa,"Gradient");class oa extends Gu{constructor(t,e=t){super(Yo("pattern",t),e)}attr(t,e,n){return"transform"===t&&(t="patternTransform"),super.attr(t,e,n)}bbox(){return new _u}targets(){return xu("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}}bo({Container:{pattern(...t){return this.defs().pattern(...t)}},Defs:{pattern:Uo((function(t,e,n){return this.put(new oa).update(n).attr({x:0,y:0,width:t,height:e,patternUnits:"userSpaceOnUse"})}))}}),Bo(oa,"Pattern");let ua=class extends Bu{constructor(t,e=t){super(Yo("image",t),e)}load(t,e){if(!t)return this;const n=new Lo.window.Image;return Cu(n,"load",(function(t){const r=this.parent(oa);0===this.width()&&0===this.height()&&this.size(n.width,n.height),r instanceof oa&&0===r.width()&&0===r.height()&&r.size(this.width(),this.height()),"function"==typeof e&&e.call(this,t)}),this),Cu(n,"load error",(function(){Au(n)})),this.attr("href",n.src=t,Ro)}};!function(t){Du.push(t)}((function(t,e,n){return"fill"!==t&&"stroke"!==t||ou.test(e)&&(e=n.root().defs().image(e)),e instanceof ua&&(e=n.root().defs().pattern(0,0,(t=>{t.add(e)}))),e})),bo({Container:{image:Uo((function(t,e){return this.put(new ua).size(0,0).load(t,e)}))}}),Bo(ua,"Image");class aa extends Lu{bbox(){let t=-1/0,e=-1/0,n=1/0,r=1/0;return this.forEach((function(i){t=Math.max(i[0],t),e=Math.max(i[1],e),n=Math.min(i[0],n),r=Math.min(i[1],r)})),new _u(n,r,t-n,e-r)}move(t,e){const n=this.bbox();if(t-=n.x,e-=n.y,!isNaN(t)&&!isNaN(e))for(let r=this.length-1;r>=0;r--)this[r]=[this[r][0]+t,this[r][1]+e];return this}parse(t=[0,0]){const e=[];(t=t instanceof Array?Array.prototype.concat.apply([],t):t.trim().split(uu).map(parseFloat)).length%2!=0&&t.pop();for(let n=0,r=t.length;n<r;n+=2)e.push([t[n],t[n+1]]);return e}size(t,e){let n;const r=this.bbox();for(n=this.length-1;n>=0;n--)r.width&&(this[n][0]=(this[n][0]-r.x)*t/r.width+r.x),r.height&&(this[n][1]=(this[n][1]-r.y)*e/r.height+r.y);return this}toLine(){return{x1:this[0][0],y1:this[0][1],x2:this[1][0],y2:this[1][1]}}toString(){const t=[];for(let e=0,n=this.length;e<n;e++)t.push(this[e].join(","));return t.join(" ")}transform(t){return this.clone().transformO(t)}transformO(t){mu.isMatrixLike(t)||(t=new mu(t));for(let e=this.length;e--;){const[n,r]=this[e];this[e][0]=t.a*n+t.c*r+t.e,this[e][1]=t.b*n+t.d*r+t.f}return this}}const ha=aa;const la=Object.freeze(Object.defineProperty({__proto__:null,MorphArray:ha,height:function(t){const e=this.bbox();return null==t?e.height:this.size(e.width,t)},width:function(t){const e=this.bbox();return null==t?e.width:this.size(t,e.height)},x:function(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)},y:function(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}},Symbol.toStringTag,{value:"Module"}));class ca extends Bu{constructor(t,e=t){super(Yo("line",t),e)}array(){return new aa([[this.attr("x1"),this.attr("y1")],[this.attr("x2"),this.attr("y2")]])}move(t,e){return this.attr(this.array().move(t,e).toLine())}plot(t,e,n,r){return null==t?this.array():(t=void 0!==e?{x1:t,y1:e,x2:n,y2:r}:new aa(t).toLine(),this.attr(t))}size(t,e){const n=Co(this,t,e);return this.attr(this.array().size(n.width,n.height).toLine())}}Ho(ca,la),bo({Container:{line:Uo((function(...t){return ca.prototype.plot.apply(this.put(new ca),null!=t[0]?t:[0,0,0,0])}))}}),Bo(ca,"Line");class fa extends Gu{constructor(t,e=t){super(Yo("marker",t),e)}height(t){return this.attr("markerHeight",t)}orient(t){return this.attr("orient",t)}ref(t,e){return this.attr("refX",t).attr("refY",e)}toString(){return"url(#"+this.id()+")"}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}width(t){return this.attr("markerWidth",t)}}function da(t,e){return function(n){return null==n?this[t]:(this[t]=n,e&&e.call(this),this)}}bo({Container:{marker(...t){return this.defs().marker(...t)}},Defs:{marker:Uo((function(t,e,n){return this.put(new fa).size(t,e).ref(t/2,e/2).viewbox(0,0,t,e).attr("orient","auto").update(n)}))},marker:{marker(t,e,n,r){let i=["marker"];return"all"!==t&&i.push(t),i=i.join("-"),t=arguments[1]instanceof fa?arguments[1]:this.defs().marker(e,n,r),this.attr(i,t)}}}),Bo(fa,"Marker");const pa={"-":function(t){return t},"<>":function(t){return-Math.cos(t*Math.PI)/2+.5},">":function(t){return Math.sin(t*Math.PI/2)},"<":function(t){return 1-Math.cos(t*Math.PI/2)},bezier:function(t,e,n,r){return function(i){return i<0?t>0?e/t*i:n>0?r/n*i:0:i>1?n<1?(1-r)/(1-n)*i+(r-n)/(1-n):t<1?(1-e)/(1-t)*i+(e-t)/(1-t):1:3*i*(1-i)**2*e+3*i**2*(1-i)*r+i**3}},steps:function(t,e="end"){e=e.split("-").reverse()[0];let n=t;return"none"===e?--n:"both"===e&&++n,(r,i=!1)=>{let s=Math.floor(r*t);const o=r*s%1==0;return"start"!==e&&"both"!==e||++s,i&&o&&--s,r>=0&&s<0&&(s=0),r<=1&&s>n&&(s=n),s/n}}};class ma{done(){return!1}}class ga extends ma{constructor(t=Tu){super(),this.ease=pa[t]||t}step(t,e,n){return"number"!=typeof t?n<1?t:e:t+(e-t)*this.ease(n)}}class ya extends ma{constructor(t){super(),this.stepper=t}done(t){return t.done}step(t,e,n,r){return this.stepper(t,e,n,r)}}function _a(){const t=(this._duration||500)/1e3,e=this._overshoot||0,n=Math.PI,r=Math.log(e/100+1e-10),i=-r/Math.sqrt(n*n+r*r),s=3.9/(i*t);this.d=2*i*s,this.k=s*s}Ho(class extends ya{constructor(t=500,e=0){super(),this.duration(t).overshoot(e)}step(t,e,n,r){if("string"==typeof t)return t;if(r.done=n===1/0,n===1/0)return e;if(0===n)return t;n>100&&(n=16),n/=1e3;const i=r.velocity||0,s=-this.d*i-this.k*(t-e),o=t+i*n+s*n*n/2;return r.velocity=i+s*n,r.done=Math.abs(e-o)+Math.abs(i)<.002,r.done?e:o}},{duration:da("_duration",_a),overshoot:da("_overshoot",_a)});Ho(class extends ya{constructor(t=.1,e=.01,n=0,r=1e3){super(),this.p(t).i(e).d(n).windup(r)}step(t,e,n,r){if("string"==typeof t)return t;if(r.done=n===1/0,n===1/0)return e;if(0===n)return t;const i=e-t;let s=(r.integral||0)+i*n;const o=(i-(r.error||0))/n,u=this._windup;return!1!==u&&(s=Math.max(-u,Math.min(s,u))),r.error=i,r.integral=s,r.done=Math.abs(i)<.001,r.done?e:t+(this.P*i+this.I*s+this.D*o)}},{windup:da("_windup"),p:da("P"),i:da("I"),d:da("D")});const va={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0},wa={M:function(t,e,n){return e.x=n.x=t[0],e.y=n.y=t[1],["M",e.x,e.y]},L:function(t,e){return e.x=t[0],e.y=t[1],["L",t[0],t[1]]},H:function(t,e){return e.x=t[0],["H",t[0]]},V:function(t,e){return e.y=t[0],["V",t[0]]},C:function(t,e){return e.x=t[4],e.y=t[5],["C",t[0],t[1],t[2],t[3],t[4],t[5]]},S:function(t,e){return e.x=t[2],e.y=t[3],["S",t[0],t[1],t[2],t[3]]},Q:function(t,e){return e.x=t[2],e.y=t[3],["Q",t[0],t[1],t[2],t[3]]},T:function(t,e){return e.x=t[0],e.y=t[1],["T",t[0],t[1]]},Z:function(t,e,n){return e.x=n.x,e.y=n.y,["Z"]},A:function(t,e){return e.x=t[5],e.y=t[6],["A",t[0],t[1],t[2],t[3],t[4],t[5],t[6]]}},ba="mlhvqtcsaz".split("");for(let wh=0,bh=ba.length;wh<bh;++wh)wa[ba[wh]]=function(t){return function(e,n,r){if("H"===t)e[0]=e[0]+n.x;else if("V"===t)e[0]=e[0]+n.y;else if("A"===t)e[5]=e[5]+n.x,e[6]=e[6]+n.y;else for(let t=0,i=e.length;t<i;++t)e[t]=e[t]+(t%2?n.y:n.x);return wa[t](e,n,r)}}(ba[wh].toUpperCase());function xa(t){return t.segment.length&&t.segment.length-1===va[t.segment[0].toUpperCase()]}function Ea(t,e){t.inNumber&&Oa(t,!1);const n=au.test(e);if(n)t.segment=[e];else{const e=t.lastCommand,n=e.toLowerCase(),r=e===n;t.segment=["m"===n?r?"l":"L":e]}return t.inSegment=!0,t.lastCommand=t.segment[0],n}function Oa(t,e){if(!t.inNumber)throw new Error("Parser Error");t.number&&t.segment.push(parseFloat(t.number)),t.inNumber=e,t.number="",t.pointSeen=!1,t.hasExponent=!1,xa(t)&&Ma(t)}function Ma(t){t.inSegment=!1,t.absolute&&(t.segment=function(t){const e=t.segment[0];return wa[e](t.segment.slice(1),t.p,t.p0)}(t)),t.segments.push(t.segment)}function ka(t){if(!t.segment.length)return!1;const e="A"===t.segment[0].toUpperCase(),n=t.segment.length;return e&&(4===n||5===n)}function Ca(t){return"E"===t.lastToken.toUpperCase()}const Aa=new Set([" ",",","\t","\n","\r","\f"]);class Sa extends Lu{bbox(){return gu().path.setAttribute("d",this.toString()),new _u(gu.nodes.path.getBBox())}move(t,e){const n=this.bbox();if(t-=n.x,e-=n.y,!isNaN(t)&&!isNaN(e))for(let r,i=this.length-1;i>=0;i--)r=this[i][0],"M"===r||"L"===r||"T"===r?(this[i][1]+=t,this[i][2]+=e):"H"===r?this[i][1]+=t:"V"===r?this[i][1]+=e:"C"===r||"S"===r||"Q"===r?(this[i][1]+=t,this[i][2]+=e,this[i][3]+=t,this[i][4]+=e,"C"===r&&(this[i][5]+=t,this[i][6]+=e)):"A"===r&&(this[i][6]+=t,this[i][7]+=e);return this}parse(t="M0 0"){return Array.isArray(t)&&(t=Array.prototype.concat.apply([],t).toString()),function(t,e=!0){let n=0,r="";const i={segment:[],inNumber:!1,number:"",lastToken:"",inSegment:!1,segments:[],pointSeen:!1,hasExponent:!1,absolute:e,p0:new du,p:new du};for(;i.lastToken=r,r=t.charAt(n++);)if(i.inSegment||!Ea(i,r))if("."!==r)if(isNaN(parseInt(r)))if(Aa.has(r))i.inNumber&&Oa(i,!1);else if("-"!==r&&"+"!==r)if("E"!==r.toUpperCase()){if(au.test(r)){if(i.inNumber)Oa(i,!1);else{if(!xa(i))throw new Error("parser Error");Ma(i)}--n}}else i.number+=r,i.hasExponent=!0;else{if(i.inNumber&&!Ca(i)){Oa(i,!1),--n;continue}i.number+=r,i.inNumber=!0}else{if("0"===i.number||ka(i)){i.inNumber=!0,i.number=r,Oa(i,!0);continue}i.inNumber=!0,i.number+=r}else{if(i.pointSeen||i.hasExponent){Oa(i,!1),--n;continue}i.inNumber=!0,i.pointSeen=!0,i.number+=r}return i.inNumber&&Oa(i,!1),i.inSegment&&xa(i)&&Ma(i),i.segments}(t)}size(t,e){const n=this.bbox();let r,i;for(n.width=0===n.width?1:n.width,n.height=0===n.height?1:n.height,r=this.length-1;r>=0;r--)i=this[r][0],"M"===i||"L"===i||"T"===i?(this[r][1]=(this[r][1]-n.x)*t/n.width+n.x,this[r][2]=(this[r][2]-n.y)*e/n.height+n.y):"H"===i?this[r][1]=(this[r][1]-n.x)*t/n.width+n.x:"V"===i?this[r][1]=(this[r][1]-n.y)*e/n.height+n.y:"C"===i||"S"===i||"Q"===i?(this[r][1]=(this[r][1]-n.x)*t/n.width+n.x,this[r][2]=(this[r][2]-n.y)*e/n.height+n.y,this[r][3]=(this[r][3]-n.x)*t/n.width+n.x,this[r][4]=(this[r][4]-n.y)*e/n.height+n.y,"C"===i&&(this[r][5]=(this[r][5]-n.x)*t/n.width+n.x,this[r][6]=(this[r][6]-n.y)*e/n.height+n.y)):"A"===i&&(this[r][1]=this[r][1]*t/n.width,this[r][2]=this[r][2]*e/n.height,this[r][6]=(this[r][6]-n.x)*t/n.width+n.x,this[r][7]=(this[r][7]-n.y)*e/n.height+n.y);return this}toString(){return function(t){let e="";for(let n=0,r=t.length;n<r;n++)e+=t[n][0],null!=t[n][1]&&(e+=t[n][1],null!=t[n][2]&&(e+=" ",e+=t[n][2],null!=t[n][3]&&(e+=" ",e+=t[n][3],e+=" ",e+=t[n][4],null!=t[n][5]&&(e+=" ",e+=t[n][5],e+=" ",e+=t[n][6],null!=t[n][7]&&(e+=" ",e+=t[n][7])))));return e+" "}(this)}}const Na=t=>{const e=typeof t;return"number"===e?zu:"string"===e?fu.isColor(t)?fu:uu.test(t)?au.test(t)?Sa:Lu:Zo.test(t)?zu:Ta:za.indexOf(t.constructor)>-1?t.constructor:Array.isArray(t)?Lu:"object"===e?La:Ta};class ja{constructor(t){this._stepper=t||new ga("-"),this._from=null,this._to=null,this._type=null,this._context=null,this._morphObj=null}at(t){return this._morphObj.morph(this._from,this._to,t,this._stepper,this._context)}done(){return this._context.map(this._stepper.done).reduce((function(t,e){return t&&e}),!0)}from(t){return null==t?this._from:(this._from=this._set(t),this)}stepper(t){return null==t?this._stepper:(this._stepper=t,this)}to(t){return null==t?this._to:(this._to=this._set(t),this)}type(t){return null==t?this._type:(this._type=t,this)}_set(t){this._type||this.type(Na(t));let e=new this._type(t);return this._type===fu&&(e=this._to?e[this._to[4]]():this._from?e[this._from[4]]():e),this._type===La&&(e=this._to?e.align(this._to):this._from?e.align(this._from):e),e=e.toConsumable(),this._morphObj=this._morphObj||new this._type,this._context=this._context||Array.apply(null,Array(e.length)).map(Object).map((function(t){return t.done=!0,t})),e}}class Ta{constructor(...t){this.init(...t)}init(t){return t=Array.isArray(t)?t[0]:t,this.value=t,this}toArray(){return[this.value]}valueOf(){return this.value}}class Ia{constructor(...t){this.init(...t)}init(t){return Array.isArray(t)&&(t={scaleX:t[0],scaleY:t[1],shear:t[2],rotate:t[3],translateX:t[4],translateY:t[5],originX:t[6],originY:t[7]}),Object.assign(this,Ia.defaults,t),this}toArray(){const t=this;return[t.scaleX,t.scaleY,t.shear,t.rotate,t.translateX,t.translateY,t.originX,t.originY]}}Ia.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0};const Ra=(t,e)=>t[0]<e[0]?-1:t[0]>e[0]?1:0;class La{constructor(...t){this.init(...t)}align(t){const e=this.values;for(let n=0,r=e.length;n<r;++n){if(e[n+1]===t[n+1]){if(e[n+1]===fu&&t[n+7]!==e[n+7]){const e=t[n+7],r=new fu(this.values.splice(n+3,5))[e]().toArray();this.values.splice(n+3,0,...r)}n+=e[n+2]+2;continue}if(!t[n+1])return this;const r=(new t[n+1]).toArray(),i=e[n+2]+3;e.splice(n,i,t[n],t[n+1],t[n+2],...r),n+=e[n+2]+2}return this}init(t){if(this.values=[],Array.isArray(t))return void(this.values=t.slice());t=t||{};const e=[];for(const n in t){const r=Na(t[n]),i=new r(t[n]).toArray();e.push([n,r,i.length,...i])}return e.sort(Ra),this.values=e.reduce(((t,e)=>t.concat(e)),[]),this}toArray(){return this.values}valueOf(){const t={},e=this.values;for(;e.length;){const n=e.shift(),r=e.shift(),i=e.shift(),s=e.splice(0,i);t[n]=new r(s)}return t}}const za=[Ta,Ia,La];class Pa extends Bu{constructor(t,e=t){super(Yo("path",t),e)}array(){return this._array||(this._array=new Sa(this.attr("d")))}clear(){return delete this._array,this}height(t){return null==t?this.bbox().height:this.size(this.bbox().width,t)}move(t,e){return this.attr("d",this.array().move(t,e))}plot(t){return null==t?this.array():this.clear().attr("d","string"==typeof t?t:this._array=new Sa(t))}size(t,e){const n=Co(this,t,e);return this.attr("d",this.array().size(n.width,n.height))}width(t){return null==t?this.bbox().width:this.size(t,this.bbox().height)}x(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}y(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}}Pa.prototype.MorphArray=Sa,bo({Container:{path:Uo((function(t){return this.put(new Pa).plot(t||new Sa)}))}}),Bo(Pa,"Path");const Da=Object.freeze(Object.defineProperty({__proto__:null,array:function(){return this._array||(this._array=new aa(this.attr("points")))},clear:function(){return delete this._array,this},move:function(t,e){return this.attr("points",this.array().move(t,e))},plot:function(t){return null==t?this.array():this.clear().attr("points","string"==typeof t?t:this._array=new aa(t))},size:function(t,e){const n=Co(this,t,e);return this.attr("points",this.array().size(n.width,n.height))}},Symbol.toStringTag,{value:"Module"}));class Fa extends Bu{constructor(t,e=t){super(Yo("polygon",t),e)}}bo({Container:{polygon:Uo((function(t){return this.put(new Fa).plot(t||new aa)}))}}),Ho(Fa,la),Ho(Fa,Da),Bo(Fa,"Polygon");class $a extends Bu{constructor(t,e=t){super(Yo("polyline",t),e)}}bo({Container:{polyline:Uo((function(t){return this.put(new $a).plot(t||new aa)}))}}),Ho($a,la),Ho($a,Da),Bo($a,"Polyline");class Ya extends Bu{constructor(t,e=t){super(Yo("rect",t),e)}}Ho(Ya,{rx:qu,ry:Vu}),bo({Container:{rect:Uo((function(t,e){return this.put(new Ya).size(t,e)}))}}),Bo(Ya,"Rect");class Ga{constructor(){this._first=null,this._last=null}first(){return this._first&&this._first.value}last(){return this._last&&this._last.value}push(t){const e=void 0!==t.next?t:{value:t,next:null,prev:null};return this._last?(e.prev=this._last,this._last.next=e,this._last=e):(this._last=e,this._first=e),e}remove(t){t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t===this._last&&(this._last=t.prev),t===this._first&&(this._first=t.next),t.prev=null,t.next=null}shift(){const t=this._first;return t?(this._first=t.next,this._first&&(this._first.prev=null),this._last=this._first?this._last:null,t.value):null}}const Xa={nextDraw:null,frames:new Ga,timeouts:new Ga,immediates:new Ga,timer:()=>Lo.window.performance||Lo.window.Date,transforms:[],frame(t){const e=Xa.frames.push({run:t});return null===Xa.nextDraw&&(Xa.nextDraw=Lo.window.requestAnimationFrame(Xa._draw)),e},timeout(t,e){e=e||0;const n=Xa.timer().now()+e,r=Xa.timeouts.push({run:t,time:n});return null===Xa.nextDraw&&(Xa.nextDraw=Lo.window.requestAnimationFrame(Xa._draw)),r},immediate(t){const e=Xa.immediates.push(t);return null===Xa.nextDraw&&(Xa.nextDraw=Lo.window.requestAnimationFrame(Xa._draw)),e},cancelFrame(t){null!=t&&Xa.frames.remove(t)},clearTimeout(t){null!=t&&Xa.timeouts.remove(t)},cancelImmediate(t){null!=t&&Xa.immediates.remove(t)},_draw(t){let e=null;const n=Xa.timeouts.last();for(;(e=Xa.timeouts.shift())&&(t>=e.time?e.run():Xa.timeouts.push(e),e!==n););let r=null;const i=Xa.frames.last();for(;r!==i&&(r=Xa.frames.shift());)r.run(t);let s=null;for(;s=Xa.immediates.shift();)s();Xa.nextDraw=Xa.timeouts.first()||Xa.frames.first()?Lo.window.requestAnimationFrame(Xa._draw):null}},Ba=function(t){const e=t.start,n=t.runner.duration();return{start:e,duration:n,end:e+n,runner:t.runner}},qa=function(){const t=Lo.window;return(t.performance||t.Date).now()};class Va extends Su{constructor(t=qa){super(),this._timeSource=t,this.terminate()}active(){return!!this._nextFrame}finish(){return this.time(this.getEndTimeOfTimeline()+1),this.pause()}getEndTime(){const t=this.getLastRunnerInfo(),e=t?t.runner.duration():0;return(t?t.start:this._time)+e}getEndTimeOfTimeline(){const t=this._runners.map((t=>t.start+t.runner.duration()));return Math.max(0,...t)}getLastRunnerInfo(){return this.getRunnerInfoById(this._lastRunnerId)}getRunnerInfoById(t){return this._runners[this._runnerIds.indexOf(t)]||null}pause(){return this._paused=!0,this._continue()}persist(t){return null==t?this._persist:(this._persist=t,this)}play(){return this._paused=!1,this.updateTime()._continue()}reverse(t){const e=this.speed();if(null==t)return this.speed(-e);const n=Math.abs(e);return this.speed(t?-n:n)}schedule(t,e,n){if(null==t)return this._runners.map(Ba);let r=0;const i=this.getEndTime();if(e=e||0,null==n||"last"===n||"after"===n)r=i;else if("absolute"===n||"start"===n)r=e,e=0;else if("now"===n)r=this._time;else if("relative"===n){const n=this.getRunnerInfoById(t.id);n&&(r=n.start+e,e=0)}else{if("with-last"!==n)throw new Error('Invalid value for the "when" parameter');{const t=this.getLastRunnerInfo();r=t?t.start:this._time}}t.unschedule(),t.timeline(this);const s=t.persist(),o={persist:null===s?this._persist:s,start:r+e,runner:t};return this._lastRunnerId=t.id,this._runners.push(o),this._runners.sort(((t,e)=>t.start-e.start)),this._runnerIds=this._runners.map((t=>t.runner.id)),this.updateTime()._continue(),this}seek(t){return this.time(this._time+t)}source(t){return null==t?this._timeSource:(this._timeSource=t,this)}speed(t){return null==t?this._speed:(this._speed=t,this)}stop(){return this.time(0),this.pause()}time(t){return null==t?this._time:(this._time=t,this._continue(!0))}unschedule(t){const e=this._runnerIds.indexOf(t.id);return e<0||(this._runners.splice(e,1),this._runnerIds.splice(e,1),t.timeline(null)),this}updateTime(){return this.active()||(this._lastSourceTime=this._timeSource()),this}_continue(t=!1){return Xa.cancelFrame(this._nextFrame),this._nextFrame=null,t?this._stepImmediate():(this._paused||(this._nextFrame=Xa.frame(this._step)),this)}_stepFn(t=!1){const e=this._timeSource();let n=e-this._lastSourceTime;t&&(n=0);const r=this._speed*n+(this._time-this._lastStepTime);this._lastSourceTime=e,t||(this._time+=r,this._time=this._time<0?0:this._time),this._lastStepTime=this._time,this.fire("time",this._time);for(let s=this._runners.length;s--;){const t=this._runners[s],e=t.runner;this._time-t.start<=0&&e.reset()}let i=!1;for(let s=0,o=this._runners.length;s<o;s++){const t=this._runners[s],e=t.runner;let n=r;const u=this._time-t.start;if(u<=0){i=!0;continue}if(u<n&&(n=u),!e.active())continue;if(e.step(n).done){if(!0!==t.persist){e.duration()-e.time()+this._time+t.persist<this._time&&(e.unschedule(),--s,--o)}}else i=!0}return i&&!(this._speed<0&&0===this._time)||this._runnerIds.length&&this._speed<0&&this._time>0?this._continue():(this.pause(),this.fire("finished")),this}terminate(){this._startTime=0,this._speed=1,this._persist=0,this._nextFrame=null,this._paused=!0,this._runners=[],this._runnerIds=[],this._lastRunnerId=-1,this._time=0,this._lastSourceTime=0,this._lastStepTime=0,this._step=this._stepFn.bind(this,!1),this._stepImmediate=this._stepFn.bind(this,!0)}}bo({Element:{timeline:function(t){return null==t?(this._timeline=this._timeline||new Va,this._timeline):(this._timeline=t,this)}}});class Wa extends Su{constructor(t){super(),this.id=Wa.id++,t="function"==typeof(t=null==t?ju:t)?new ya(t):t,this._element=null,this._timeline=null,this.done=!1,this._queue=[],this._duration="number"==typeof t&&t,this._isDeclarative=t instanceof ya,this._stepper=this._isDeclarative?t:new ga,this._history={},this.enabled=!0,this._time=0,this._lastTime=0,this._reseted=!0,this.transforms=new mu,this.transformId=1,this._haveReversed=!1,this._reverse=!1,this._loopsDone=0,this._swing=!1,this._wait=0,this._times=1,this._frameId=null,this._persist=!!this._isDeclarative||null}static sanitise(t,e,n){let r=1,i=!1,s=0;return e=e??Iu,n=n||"last","object"!=typeof(t=t??ju)||t instanceof ma||(e=t.delay??e,n=t.when??n,i=t.swing||i,r=t.times??r,s=t.wait??s,t=t.duration??ju),{duration:t,delay:e,swing:i,times:r,wait:s,when:n}}active(t){return null==t?this.enabled:(this.enabled=t,this)}addTransform(t){return this.transforms.lmultiplyO(t),this}after(t){return this.on("finished",t)}animate(t,e,n){const r=Wa.sanitise(t,e,n),i=new Wa(r.duration);return this._timeline&&i.timeline(this._timeline),this._element&&i.element(this._element),i.loop(r).schedule(r.delay,r.when)}clearTransform(){return this.transforms=new mu,this}clearTransformsFromQueue(){this.done&&this._timeline&&this._timeline._runnerIds.includes(this.id)||(this._queue=this._queue.filter((t=>!t.isTransform)))}delay(t){return this.animate(0,t)}duration(){return this._times*(this._wait+this._duration)-this._wait}during(t){return this.queue(null,t)}ease(t){return this._stepper=new ga(t),this}element(t){return null==t?this._element:(this._element=t,t._prepareRunner(),this)}finish(){return this.step(1/0)}loop(t,e,n){return"object"==typeof t&&(e=t.swing,n=t.wait,t=t.times),this._times=t||1/0,this._swing=e||!1,this._wait=n||0,!0===this._times&&(this._times=1/0),this}loops(t){const e=this._duration+this._wait;if(null==t){const t=Math.floor(this._time/e),n=(this._time-t*e)/this._duration;return Math.min(t+n,this._times)}const n=t%1,r=e*Math.floor(t)+this._duration*n;return this.time(r)}persist(t){return null==t?this._persist:(this._persist=t,this)}position(t){const e=this._time,n=this._duration,r=this._wait,i=this._times,s=this._swing,o=this._reverse;let u;if(null==t){const t=function(t){const e=s*Math.floor(t%(2*(r+n))/(r+n)),i=e&&!o||!e&&o,u=Math.pow(-1,i)*(t%(r+n))/n+i;return Math.max(Math.min(u,1),0)},a=i*(r+n)-r;return u=e<=0?Math.round(t(1e-5)):e<a?t(e):Math.round(t(a-1e-5)),u}const a=Math.floor(this.loops()),h=s&&a%2==0;return u=a+(h&&!o||o&&h?t:1-t),this.loops(u)}progress(t){return null==t?Math.min(1,this._time/this.duration()):this.time(t*this.duration())}queue(t,e,n,r){this._queue.push({initialiser:t||Nu,runner:e||Nu,retarget:n,isTransform:r,initialised:!1,finished:!1});return this.timeline()&&this.timeline()._continue(),this}reset(){return this._reseted||(this.time(0),this._reseted=!0),this}reverse(t){return this._reverse=null==t?!this._reverse:t,this}schedule(t,e,n){if(t instanceof Va||(n=e,e=t,t=this.timeline()),!t)throw Error("Runner cannot be scheduled without timeline");return t.schedule(this,e,n),this}step(t){if(!this.enabled)return this;t=null==t?16:t,this._time+=t;const e=this.position(),n=this._lastPosition!==e&&this._time>=0;this._lastPosition=e;const r=this.duration(),i=this._lastTime<=0&&this._time>0,s=this._lastTime<r&&this._time>=r;this._lastTime=this._time,i&&this.fire("start",this);const o=this._isDeclarative;this.done=!o&&!s&&this._time>=r,this._reseted=!1;let u=!1;return(n||o)&&(this._initialise(n),this.transforms=new mu,u=this._run(o?t:e),this.fire("step",this)),this.done=this.done||u&&o,s&&this.fire("finished",this),this}time(t){if(null==t)return this._time;const e=t-this._time;return this.step(e),this}timeline(t){return void 0===t?this._timeline:(this._timeline=t,this)}unschedule(){const t=this.timeline();return t&&t.unschedule(this),this}_initialise(t){if(t||this._isDeclarative)for(let e=0,n=this._queue.length;e<n;++e){const n=this._queue[e],r=this._isDeclarative||!n.initialised&&t;t=!n.finished,r&&t&&(n.initialiser.call(this),n.initialised=!0)}}_rememberMorpher(t,e){if(this._history[t]={morpher:e,caller:this._queue[this._queue.length-1]},this._isDeclarative){const t=this.timeline();t&&t.play()}}_run(t){let e=!0;for(let n=0,r=this._queue.length;n<r;++n){const r=this._queue[n],i=r.runner.call(this,t);r.finished=r.finished||!0===i,e=e&&r.finished}return e}_tryRetarget(t,e,n){if(this._history[t]){if(!this._history[t].caller.initialised){const e=this._queue.indexOf(this._history[t].caller);return this._queue.splice(e,1),!1}this._history[t].caller.retarget?this._history[t].caller.retarget.call(this,e,n):this._history[t].morpher.to(e),this._history[t].caller.finished=!1;const r=this.timeline();return r&&r.play(),!0}return!1}}Wa.id=0;class Ha{constructor(t=new mu,e=-1,n=!0){this.transforms=t,this.id=e,this.done=n}clearTransformsFromQueue(){}}Ho([Wa,Ha],{mergeWith(t){return new Ha(t.transforms.lmultiply(this.transforms),t.id)}});const Ua=(t,e)=>t.lmultiplyO(e),Za=t=>t.transforms;function Qa(){const t=this._transformationRunners.runners.map(Za).reduce(Ua,new mu);this.transform(t),this._transformationRunners.merge(),1===this._transformationRunners.length()&&(this._frameId=null)}class Ja{constructor(){this.runners=[],this.ids=[]}add(t){if(this.runners.includes(t))return;const e=t.id+1;return this.runners.push(t),this.ids.push(e),this}clearBefore(t){const e=this.ids.indexOf(t+1)||1;return this.ids.splice(0,e,0),this.runners.splice(0,e,new Ha).forEach((t=>t.clearTransformsFromQueue())),this}edit(t,e){const n=this.ids.indexOf(t+1);return this.ids.splice(n,1,t+1),this.runners.splice(n,1,e),this}getByID(t){return this.runners[this.ids.indexOf(t+1)]}length(){return this.ids.length}merge(){let t=null;for(let e=0;e<this.runners.length;++e){const n=this.runners[e];if(t&&n.done&&t.done&&(!n._timeline||!n._timeline._runnerIds.includes(n.id))&&(!t._timeline||!t._timeline._runnerIds.includes(t.id))){this.remove(n.id);const r=n.mergeWith(t);this.edit(t.id,r),t=r,--e}else t=n}return this}remove(t){const e=this.ids.indexOf(t+1);return this.ids.splice(e,1),this.runners.splice(e,1),this}}bo({Element:{animate(t,e,n){const r=Wa.sanitise(t,e,n),i=this.timeline();return new Wa(r.duration).loop(r).element(this).timeline(i.play()).schedule(r.delay,r.when)},delay(t,e){return this.animate(0,t,e)},_clearTransformRunnersBefore(t){this._transformationRunners.clearBefore(t.id)},_currentTransform(t){return this._transformationRunners.runners.filter((e=>e.id<=t.id)).map(Za).reduce(Ua,new mu)},_addRunner(t){this._transformationRunners.add(t),Xa.cancelImmediate(this._frameId),this._frameId=Xa.immediate(Qa.bind(this))},_prepareRunner(){null==this._frameId&&(this._transformationRunners=(new Ja).add(new Ha(new mu(this))))}}});Ho(Wa,{attr(t,e){return this.styleAttr("attr",t,e)},css(t,e){return this.styleAttr("css",t,e)},styleAttr(t,e,n){if("string"==typeof e)return this.styleAttr(t,{[e]:n});let r=e;if(this._tryRetarget(t,r))return this;let i=new ja(this._stepper).to(r),s=Object.keys(r);return this.queue((function(){i=i.from(this.element()[t](s))}),(function(e){return this.element()[t](i.at(e).valueOf()),i.done()}),(function(e){const n=Object.keys(e),o=(u=s,n.filter((t=>!u.includes(t))));var u;if(o.length){const e=this.element()[t](o),n=new La(i.from()).valueOf();Object.assign(n,e),i.from(n)}const a=new La(i.to()).valueOf();Object.assign(a,e),i.to(a),s=n,r=e})),this._rememberMorpher(t,i),this},zoom(t,e){if(this._tryRetarget("zoom",t,e))return this;let n=new ja(this._stepper).to(new zu(t));return this.queue((function(){n=n.from(this.element().zoom())}),(function(t){return this.element().zoom(n.at(t),e),n.done()}),(function(t,r){e=r,n.to(t)})),this._rememberMorpher("zoom",n),this},transform(t,e,n){if(e=t.relative||e,this._isDeclarative&&!e&&this._tryRetarget("transform",t))return this;const r=mu.isMatrixLike(t);n=null!=t.affine?t.affine:null!=n?n:!r;const i=new ja(this._stepper).type(n?Ia:mu);let s,o,u,a,h;return this.queue((function(){o=o||this.element(),s=s||Ao(t,o),h=new mu(e?void 0:o),o._addRunner(this),e||o._clearTransformRunnersBefore(this)}),(function(l){e||this.clearTransform();const{x:c,y:f}=new du(s).transform(o._currentTransform(this));let d=new mu({...t,origin:[c,f]}),p=this._isDeclarative&&u?u:h;if(n){d=d.decompose(c,f),p=p.decompose(c,f);const t=d.rotate,e=p.rotate,n=[t-360,t,t+360],r=n.map((t=>Math.abs(t-e))),i=Math.min(...r),s=r.indexOf(i);d.rotate=n[s]}e&&(r||(d.rotate=t.rotate||0),this._isDeclarative&&a&&(p.rotate=a)),i.from(p),i.to(d);const m=i.at(l);return a=m.rotate,u=new mu(m),this.addTransform(u),o._addRunner(this),i.done()}),(function(e){(e.origin||"center").toString()!==(t.origin||"center").toString()&&(s=Ao(e,o)),t={...e,origin:s}}),!0),this._isDeclarative&&this._rememberMorpher("transform",i),this},x(t){return this._queueNumber("x",t)},y(t){return this._queueNumber("y",t)},ax(t){return this._queueNumber("ax",t)},ay(t){return this._queueNumber("ay",t)},dx(t=0){return this._queueNumberDelta("x",t)},dy(t=0){return this._queueNumberDelta("y",t)},dmove(t,e){return this.dx(t).dy(e)},_queueNumberDelta(t,e){if(e=new zu(e),this._tryRetarget(t,e))return this;const n=new ja(this._stepper).to(e);let r=null;return this.queue((function(){r=this.element()[t](),n.from(r),n.to(r+e)}),(function(e){return this.element()[t](n.at(e)),n.done()}),(function(t){n.to(r+new zu(t))})),this._rememberMorpher(t,n),this},_queueObject(t,e){if(this._tryRetarget(t,e))return this;const n=new ja(this._stepper).to(e);return this.queue((function(){n.from(this.element()[t]())}),(function(e){return this.element()[t](n.at(e)),n.done()})),this._rememberMorpher(t,n),this},_queueNumber(t,e){return this._queueObject(t,new zu(e))},cx(t){return this._queueNumber("cx",t)},cy(t){return this._queueNumber("cy",t)},move(t,e){return this.x(t).y(e)},amove(t,e){return this.ax(t).ay(e)},center(t,e){return this.cx(t).cy(e)},size(t,e){let n;return t&&e||(n=this._element.bbox()),t||(t=n.width/n.height*e),e||(e=n.height/n.width*t),this.width(t).height(e)},width(t){return this._queueNumber("width",t)},height(t){return this._queueNumber("height",t)},plot(t,e,n,r){if(4===arguments.length)return this.plot([t,e,n,r]);if(this._tryRetarget("plot",t))return this;const i=new ja(this._stepper).type(this._element.MorphArray).to(t);return this.queue((function(){i.from(this._element.array())}),(function(t){return this._element.plot(i.at(t)),i.done()})),this._rememberMorpher("plot",i),this},leading(t){return this._queueNumber("leading",t)},viewbox(t,e,n,r){return this._queueObject("viewbox",new _u(t,e,n,r))},update(t){return"object"!=typeof t?this.update({offset:arguments[0],color:arguments[1],opacity:arguments[2]}):(null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",t.offset),this)}}),Ho(Wa,{rx:qu,ry:Vu,from:na,to:ra}),Bo(Wa,"Runner");class Ka extends Gu{constructor(t,e=t){super(Yo("svg",t),e),this.namespace()}defs(){return this.isRoot()?Go(this.node.querySelector("defs"))||this.put(new Xu):this.root().defs()}isRoot(){return!this.node.parentNode||!(this.node.parentNode instanceof Lo.window.SVGElement)&&"#document-fragment"!==this.node.parentNode.nodeName}namespace(){return this.isRoot()?this.attr({xmlns:To,version:"1.1"}).attr("xmlns:xlink",Ro,Io):this.root().namespace()}removeNamespace(){return this.attr({xmlns:null,version:null}).attr("xmlns:xlink",null,Io).attr("xmlns:svgjs",null,Io)}root(){return this.isRoot()?this:super.root()}}bo({Container:{nested:Uo((function(){return this.put(new Ka)}))}}),Bo(Ka,"Svg",!0);let th=class extends Gu{constructor(t,e=t){super(Yo("symbol",t),e)}};bo({Container:{symbol:Uo((function(){return this.put(new th)}))}}),Bo(th,"Symbol");const eh=Object.freeze(Object.defineProperty({__proto__:null,amove:function(t,e){return this.ax(t).ay(e)},ax:function(t){return this.attr("x",t)},ay:function(t){return this.attr("y",t)},build:function(t){return this._build=!!t,this},center:function(t,e,n=this.bbox()){return this.cx(t,n).cy(e,n)},cx:function(t,e=this.bbox()){return null==t?e.cx:this.attr("x",this.attr("x")+t-e.cx)},cy:function(t,e=this.bbox()){return null==t?e.cy:this.attr("y",this.attr("y")+t-e.cy)},length:function(){return this.node.getComputedTextLength()},move:function(t,e,n=this.bbox()){return this.x(t,n).y(e,n)},plain:function(t){return!1===this._build&&this.clear(),this.node.appendChild(Lo.document.createTextNode(t)),this},x:function(t,e=this.bbox()){return null==t?e.x:this.attr("x",this.attr("x")+t-e.x)},y:function(t,e=this.bbox()){return null==t?e.y:this.attr("y",this.attr("y")+t-e.y)}},Symbol.toStringTag,{value:"Module"}));class nh extends Bu{constructor(t,e=t){super(Yo("text",t),e),this.dom.leading=this.dom.leading??new zu(1.3),this._rebuild=!0,this._build=!1}leading(t){return null==t?this.dom.leading:(this.dom.leading=new zu(t),this.rebuild())}rebuild(t){if("boolean"==typeof t&&(this._rebuild=t),this._rebuild){const t=this;let e=0;const n=this.dom.leading;this.each((function(r){if(No(this.node))return;const i=Lo.window.getComputedStyle(this.node).getPropertyValue("font-size"),s=n*new zu(i);this.dom.newLined&&(this.attr("x",t.attr("x")),"\n"===this.text()?e+=s:(this.attr("dy",r?s+e:0),e=0))})),this.fire("rebuild")}return this}setData(t){return this.dom=t,this.dom.leading=new zu(t.leading||1.3),this}writeDataToDom(){return jo(this,this.dom,{leading:1.3}),this}text(t){if(void 0===t){const e=this.node.childNodes;let n=0;t="";for(let r=0,i=e.length;r<i;++r)"textPath"===e[r].nodeName||No(e[r])?0===r&&(n=r+1):(r!==n&&3!==e[r].nodeType&&!0===Go(e[r]).dom.newLined&&(t+="\n"),t+=e[r].textContent);return t}if(this.clear().build(!0),"function"==typeof t)t.call(this,this);else for(let e=0,n=(t=(t+"").split("\n")).length;e<n;e++)this.newLine(t[e]);return this.build(!1).rebuild()}}Ho(nh,eh),bo({Container:{text:Uo((function(t=""){return this.put(new nh).text(t)})),plain:Uo((function(t=""){return this.put(new nh).plain(t)}))}}),Bo(nh,"Text");class rh extends Bu{constructor(t,e=t){super(Yo("tspan",t),e),this._build=!1}dx(t){return this.attr("dx",t)}dy(t){return this.attr("dy",t)}newLine(){this.dom.newLined=!0;const t=this.parent();if(!(t instanceof nh))return this;const e=t.index(this),n=Lo.window.getComputedStyle(this.node).getPropertyValue("font-size"),r=t.dom.leading*new zu(n);return this.dy(e?r:0).attr("x",t.x())}text(t){return null==t?this.node.textContent+(this.dom.newLined?"\n":""):("function"==typeof t?(this.clear().build(!0),t.call(this,this),this.build(!1)):this.plain(t),this)}}Ho(rh,eh),bo({Tspan:{tspan:Uo((function(t=""){const e=new rh;return this._build||this.clear(),this.put(e).text(t)}))},Text:{newLine:function(t=""){return this.tspan(t).newLine()}}}),Bo(rh,"Tspan");class ih extends Bu{constructor(t,e=t){super(Yo("circle",t),e)}radius(t){return this.attr("r",t)}rx(t){return this.attr("r",t)}ry(t){return this.rx(t)}size(t){return this.radius(new zu(t).divide(2))}}Ho(ih,{x:Wu,y:Hu,cx:Uu,cy:Zu,width:Qu,height:Ju}),bo({Container:{circle:Uo((function(t=0){return this.put(new ih).size(t).move(0,0)}))}}),Bo(ih,"Circle");class sh extends Gu{constructor(t,e=t){super(Yo("clipPath",t),e)}remove(){return this.targets().forEach((function(t){t.unclip()})),super.remove()}targets(){return xu("svg [clip-path*="+this.id()+"]")}}bo({Container:{clip:Uo((function(){return this.defs().put(new sh)}))},Element:{clipper(){return this.reference("clip-path")},clipWith(t){const e=t instanceof sh?t:this.parent().clip().add(t);return this.attr("clip-path","url(#"+e.id()+")")},unclip(){return this.attr("clip-path",null)}}}),Bo(sh,"ClipPath");class oh extends $u{constructor(t,e=t){super(Yo("foreignObject",t),e)}}bo({Container:{foreignObject:Uo((function(t,e){return this.put(new oh).size(t,e)}))}}),Bo(oh,"ForeignObject");const uh=Object.freeze(Object.defineProperty({__proto__:null,dmove:function(t,e){return this.children().forEach((n=>{let r;try{r=n.node instanceof Lo.window.SVGSVGElement?new _u(n.attr(["x","y","width","height"])):n.bbox()}catch(u){return}const i=new mu(n),s=i.translate(t,e).transform(i.inverse()),o=new du(r.x,r.y).transform(s);n.move(o.x,o.y)})),this},dx:function(t){return this.dmove(t,0)},dy:function(t){return this.dmove(0,t)},height:function(t,e=this.bbox()){return null==t?e.height:this.size(e.width,t,e)},move:function(t=0,e=0,n=this.bbox()){const r=t-n.x,i=e-n.y;return this.dmove(r,i)},size:function(t,e,n=this.bbox()){const r=Co(this,t,e,n),i=r.width/n.width,s=r.height/n.height;return this.children().forEach((t=>{const e=new du(n).transform(new mu(t).inverse());t.scale(i,s,e.x,e.y)})),this},width:function(t,e=this.bbox()){return null==t?e.width:this.size(t,e.height,e)},x:function(t,e=this.bbox()){return null==t?e.x:this.move(t,e.y,e)},y:function(t,e=this.bbox()){return null==t?e.y:this.move(e.x,t,e)}},Symbol.toStringTag,{value:"Module"}));class ah extends Gu{constructor(t,e=t){super(Yo("g",t),e)}}Ho(ah,uh),bo({Container:{group:Uo((function(){return this.put(new ah)}))}}),Bo(ah,"G");class hh extends Gu{constructor(t,e=t){super(Yo("a",t),e)}target(t){return this.attr("target",t)}to(t){return this.attr("href",t,Ro)}}Ho(hh,uh),bo({Container:{link:Uo((function(t){return this.put(new hh).to(t)}))},Element:{unlink(){const t=this.linker();if(!t)return this;const e=t.parent();if(!e)return this.remove();const n=e.index(t);return e.add(this,n),t.remove(),this},linkTo(t){let e=this.linker();return e||(e=new hh,this.wrap(e)),"function"==typeof t?t.call(e,e):e.to(t),this},linker(){const t=this.parent();return t&&"a"===t.node.nodeName.toLowerCase()?t:null}}}),Bo(hh,"A");class lh extends Gu{constructor(t,e=t){super(Yo("mask",t),e)}remove(){return this.targets().forEach((function(t){t.unmask()})),super.remove()}targets(){return xu("svg [mask*="+this.id()+"]")}}bo({Container:{mask:Uo((function(){return this.defs().put(new lh)}))},Element:{masker(){return this.reference("mask")},maskWith(t){const e=t instanceof lh?t:this.parent().mask().add(t);return this.attr("mask","url(#"+e.id()+")")},unmask(){return this.attr("mask",null)}}}),Bo(lh,"Mask");class ch extends $u{constructor(t,e=t){super(Yo("stop",t),e)}update(t){return("number"==typeof t||t instanceof zu)&&(t={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",new zu(t.offset)),this}}bo({Gradient:{stop:function(t,e,n){return this.put(new ch).update(t,e,n)}}}),Bo(ch,"Stop");class fh extends $u{constructor(t,e=t){super(Yo("style",t),e)}addText(t=""){return this.node.textContent+=t,this}font(t,e,n={}){return this.rule("@font-face",{fontFamily:t,src:e,...n})}rule(t,e){return this.addText(function(t,e){if(!t)return"";if(!e)return t;let n=t+"{";for(const r in e)n+=r.replace(/([A-Z])/g,(function(t,e){return"-"+e.toLowerCase()}))+":"+e[r]+";";return n+="}",n}(t,e))}}bo("Dom",{style(t,e){return this.put(new fh).rule(t,e)},fontface(t,e,n){return this.put(new fh).font(t,e,n)}}),Bo(fh,"Style");class dh extends nh{constructor(t,e=t){super(Yo("textPath",t),e)}array(){const t=this.track();return t?t.array():null}plot(t){const e=this.track();let n=null;return e&&(n=e.plot(t)),null==t?n:this}track(){return this.reference("href")}}bo({Container:{textPath:Uo((function(t,e){return t instanceof nh||(t=this.text(t)),t.path(e)}))},Text:{path:Uo((function(t,e=!0){const n=new dh;let r;if(t instanceof Pa||(t=this.defs().path(t)),n.attr("href","#"+t,Ro),e)for(;r=this.node.firstChild;)n.node.appendChild(r);return this.put(n)})),textPath(){return this.findOne("textPath")}},Path:{text:Uo((function(t){return t instanceof nh||(t=(new nh).addTo(this.parent()).text(t)),t.path(this)})),targets(){return xu("svg textPath").filter((t=>(t.attr("href")||"").includes(this.id())))}}}),dh.prototype.MorphArray=Sa,Bo(dh,"TextPath");class ph extends Bu{constructor(t,e=t){super(Yo("use",t),e)}use(t,e){return this.attr("href",(e||"")+"#"+t,Ro)}}bo({Container:{use:Uo((function(t,e){return this.put(new ph).use(t,e)}))}}),Bo(ph,"Use");const mh=$o;Ho([Ka,th,ua,oa,fa],xo("viewbox")),Ho([ca,$a,Fa,Pa],xo("marker")),Ho(nh,xo("Text")),Ho(Pa,xo("Path")),Ho(Xu,xo("Defs")),Ho([nh,rh],xo("Tspan")),Ho([Ya,ta,sa,Wa],xo("radius")),Ho(Su,xo("EventTarget")),Ho(Fu,xo("Dom")),Ho($u,xo("Element")),Ho(Bu,xo("Shape")),Ho([Gu,ea],xo("Container")),Ho(sa,xo("Gradient")),Ho(Wa,xo("Runner")),wu.extend([...new Set(wo)]),function(t=[]){za.push(...[].concat(t))}([zu,fu,_u,mu,Lu,aa,Sa,du]),Ho(za,{to(t){return(new ja).type(this.constructor).from(this.toArray()).to(t)},fromArray(t){return this.init(t),this},toConsumable(){return this.toArray()},morph(t,e,n,r,i){return this.fromArray(t.map((function(t,s){return r.step(t,e[s],n,i[s],i)})))}});var gh=function(t){return t.touches||[{clientX:t.clientX,clientY:t.clientY}]};Ho(Ka,{panZoom:function(t){var e,n,r,i,s,o,u,a,h,l,c,f,d=this;if(this.off(".panZoom"),!1===t)return this;var p,m,g=null!=(n=(t=null!=(e=t)?e:{}).zoomFactor)?n:2,y=null!=(r=t.zoomMin)?r:Number.MIN_VALUE,_=null!=(i=t.zoomMax)?i:Number.MAX_VALUE,v=null==(s=t.wheelZoom)||s,w=null==(o=t.pinchZoom)||o,b=null==(u=t.panning)||u,x=null!=(a=t.panButton)?a:0,E=null!=(h=t.oneFingerPan)&&h,O=null!=(l=t.margins)&&l,M=null!=(c=t.wheelZoomDeltaModeLinePixels)?c:17,k=null!=(f=t.wheelZoomDeltaModeScreenPixels)?f:53,C=!1,A=this.viewbox(),S=function(t){if(!O)return t;var e=O.top,n=O.left,r=O.bottom,i=O.right,s=d.attr(["width","height"]),o=s.width,u=s.height,a=d.node.preserveAspectRatio.baseVal,h=0,l=0,c=0,f=0;if(a.align!==a.SVG_PRESERVEASPECTRATIO_NONE){var p=o/u,m=A.width/A.height;if(m!==p){var g=a.meetOrSlice!==a.SVG_MEETORSLICE_SLICE,y=p>m?"width":"height",_="width"===y,v=g&&_||!g&&!_,w=v?p/m:m/p,b=t[y]-t[y]*w;v?a.align===a.SVG_PRESERVEASPECTRATIO_XMIDYMIN||a.align===a.SVG_PRESERVEASPECTRATIO_XMIDYMID||a.align===a.SVG_PRESERVEASPECTRATIO_XMIDYMAX?(h=b/2,l=-b/2):a.align===a.SVG_PRESERVEASPECTRATIO_XMINYMIN||a.align===a.SVG_PRESERVEASPECTRATIO_XMINYMID||a.align===a.SVG_PRESERVEASPECTRATIO_XMINYMAX?l=-b:a.align!==a.SVG_PRESERVEASPECTRATIO_XMAXYMIN&&a.align!==a.SVG_PRESERVEASPECTRATIO_XMAXYMID&&a.align!==a.SVG_PRESERVEASPECTRATIO_XMAXYMAX||(h=b):a.align===a.SVG_PRESERVEASPECTRATIO_XMINYMID||a.align===a.SVG_PRESERVEASPECTRATIO_XMIDYMID||a.align===a.SVG_PRESERVEASPECTRATIO_XMAXYMID?(c=b/2,f=-b/2):a.align===a.SVG_PRESERVEASPECTRATIO_XMINYMIN||a.align===a.SVG_PRESERVEASPECTRATIO_XMIDYMIN||a.align===a.SVG_PRESERVEASPECTRATIO_XMAXYMIN?f=-b:a.align!==a.SVG_PRESERVEASPECTRATIO_XMINYMAX&&a.align!==a.SVG_PRESERVEASPECTRATIO_XMIDYMAX&&a.align!==a.SVG_PRESERVEASPECTRATIO_XMAXYMAX||(c=b)}}var x=A.width+A.x-n-h,E=A.x+i-t.width-l,M=A.height+A.y-e-c,k=A.y+r-t.height-f;return t.x=Math.min(x,Math.max(E,t.x)),t.y=Math.min(M,Math.max(k,t.y)),t},N=function t(e){(m=gh(e)).length<2?b&&E&&I.call(this,e):(b&&E&&R.call(this,e),e.preventDefault(),this.dispatch("pinchZoomStart",{event:e}).defaultPrevented||(this.off("touchstart.panZoom",t),C=!0,Cu(document,"touchmove.panZoom",T,this,{passive:!1}),Cu(document,"touchend.panZoom",j,this,{passive:!1})))},j=function t(e){e.preventDefault();var n=gh(e);n.length>1||(C=!1,this.dispatch("pinchZoomEnd",{event:e}),Au(document,"touchmove.panZoom",T),Au(document,"touchend.panZoom",t),this.on("touchstart.panZoom",N),n.length&&b&&E&&I.call(this,e))},T=function(t){t.preventDefault();var e=gh(t),n=this.zoom(),r=Math.sqrt(Math.pow(m[0].clientX-m[1].clientX,2)+Math.pow(m[0].clientY-m[1].clientY,2))/Math.sqrt(Math.pow(e[0].clientX-e[1].clientX,2)+Math.pow(e[0].clientY-e[1].clientY,2));(n<y&&r>1||n>_&&r<1)&&(r=1);var i={x:e[0].clientX+.5*(e[1].clientX-e[0].clientX),y:e[0].clientY+.5*(e[1].clientY-e[0].clientY)},s=m[0].clientX+.5*(m[1].clientX-m[0].clientX),o=m[0].clientY+.5*(m[1].clientY-m[0].clientY),u=this.point(i.x,i.y),a=this.point(2*i.x-s,2*i.y-o),h=new _u(this.viewbox()).transform((new mu).translate(-a.x,-a.y).scale(r,0,0).translate(u.x,u.y));S(h),this.viewbox(h),m=e,this.dispatch("zoom",{box:h,focus:a})},I=function t(e){e.type.indexOf("mouse")>-1&&e.button!==x&&e.which!==x+1||(e.preventDefault(),this.off("mousedown.panZoom",t),m=gh(e),C||(this.dispatch("panStart",{event:e}),p={x:m[0].clientX,y:m[0].clientY},Cu(document,"touchmove.panZoom mousemove.panZoom",L,this,{passive:!1}),Cu(document,"touchend.panZoom mouseup.panZoom",R,this,{passive:!1})))},R=function t(e){e.preventDefault(),Au(document,"touchmove.panZoom mousemove.panZoom",L),Au(document,"touchend.panZoom mouseup.panZoom",t),this.on("mousedown.panZoom",I),this.dispatch("panEnd",{event:e})},L=function(t){t.preventDefault();var e=gh(t),n={x:e[0].clientX,y:e[0].clientY},r=this.point(n.x,n.y),i=this.point(p.x,p.y),s=[i.x-r.x,i.y-r.y];if(s[0]||s[1]){var o=new _u(this.viewbox()).transform((new mu).translate(s[0],s[1]));p=n,S(o),this.dispatch("panning",{box:o,event:t}).defaultPrevented||this.viewbox(o)}};return v&&this.on("wheel.panZoom",(function(t){var e;switch(t.preventDefault(),t.deltaMode){case 1:e=t.deltaY*M;break;case 2:e=t.deltaY*k;break;default:e=t.deltaY}var n=Math.pow(1+g,-1*e/100)*this.zoom(),r=this.point(t.clientX,t.clientY);if(n>_&&(n=_),n<y&&(n=y),this.dispatch("zoom",{level:n,focus:r}).defaultPrevented)return this;if(this.zoom(n,r),O){var i=S(this.viewbox());this.viewbox(i)}}),this,{passive:!1}),w&&this.on("touchstart.panZoom",N,this,{passive:!1}),b&&this.on("mousedown.panZoom",I,this,{passive:!1}),this}});class yh{constructor(t,e,n,r){this.width=e,this.height=n,this.canvas=mh().addTo(t).size("100%","100%").viewbox(`0 0 ${e} ${n}`).panZoom({zoomFactor:.2,zoomMin:.1}).attr({style:r})}static drawCircle(t={}){const e=new ih;return e.attr(t),e}static drawGroup(t=0,e=0,n,r){const i=new ah;return i.attr({"data-parent":r,"data-self":n,transform:`translate(${t}, ${e})`}),i}static drawPath(t,{borderColor:e=po.borderColor,id:n=""}={}){const r=new Pa({d:t});return r.id(n),r.fill("none").stroke({color:e,width:1}),r}static drawRect({color:t="#fefefe",height:e=0,opacity:n=1,radius:r=0,width:i=0,x1:s,y1:o}={}){const u=new Ya;return u.attr({height:e,opacity:n,rx:r,ry:r,width:i,x:s??void 0,y:o??void 0}),u.fill(t),u}static drawTemplate(t,{nodeHeight:e,nodeWidth:n}={}){const r=new oh({height:e,width:n}),i=document.createElement("div");return i.innerHTML=t,i.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),r.add(i),r}static drawText(t="",{dx:e,dy:n,x:r,y:i}){const s=new nh;return s.font({fill:"#f06"}),s.tspan(t),void 0!==r&&void 0!==i&&s.move(r,i),void 0!==e&&void 0!==n&&s.attr({dx:e,dy:n}),s}add(t){this.canvas.add(t)}clear(){this.canvas.clear().viewbox(`0 0 ${this.width} ${this.height}`)}exportToSvg(){new nt(this.canvas,"apextree").exportToSVG()}resetViewBox(){this.canvas.viewbox(`0 0 ${this.width} ${this.height}`)}updateViewBox(t,e,n,r){this.canvas.viewbox(`${t} ${e} ${n} ${r}`)}zoom(t){const e=this.canvas.zoom()+t;e>=.1&&this.canvas.zoom(e)}}const _h={marginx:100,marginy:100,rankdir:"TB"};class vh extends yh{constructor(t,e){super(t,e.viewPortWidth,e.viewPortHeight,e.canvasStyle),this.element=t,this.options=e}calculateLayout(){const{childrenSpacing:t,siblingSpacing:e}=this.options,n=fo[this.options.direction];this.graph.setGraph({..._h,nodesep:e,rankdir:n,ranksep:t}),ao.layout(this.graph)}resetGraph(){this.graph=new ao.graphlib.Graph,this.graph.setDefaultEdgeLabel((function(){return{}}))}setGraphNodesAndEdges(t){this.resetGraph(),this.setNodesRecursively(t)}setNodesRecursively(t,e){var n;const{direction:r,groupLeafNodesSpacing:i,nodeHeight:s,nodeWidth:o}=this.options,u=this.nodeMap[t],a={...u,parent:e||void 0};if(this.graph.setNode(t,{...a,height:s,width:o}),e&&this.graph.setEdge(e,t),u.onlyLeafNodes){const e=co[r].leafWidth({childLength:u.children.length,childrenSpacing:i,nodeWidth:o}),n=co[r].leafHeight({childLength:u.children.length,childrenSpacing:i,nodeHeight:s});this.graph.setNode(`${t}_leafs`,{...a,height:n,id:`${t}_leafs`,parent:t,width:e}),this.graph.setEdge(t,`${t}_leafs`)}else if(null==(n=u.children)?void 0:n.length)for(const h of u.children)this.setNodesRecursively(h,t)}changeLayout(t="top"){this.options={...this.options,direction:t},this.setGraphNodesAndEdges(this.data.id),this.render({keepOldPosition:!1})}collapse(t){const e=this.nodeMap[t];(null==e?void 0:e.children)&&(this.nodeMap[t]={...e,children:void 0,hiddenChildren:e.children},this.setGraphNodesAndEdges(this.data.id),this.render({keepOldPosition:!0}))}construct(t){if(this.nodeMap=_o(t),this.data=t,this.options.groupLeafNodes){(function(t){const e=[];function n(t){return!t.children||0===t.children.length}return function t(r){if(r.children&&0!==r.children.length){r.children.every(n)&&e.push(r);for(const e of r.children)t(e)}}(t),e})(t).forEach((t=>{this.nodeMap[t.id]={...this.nodeMap[t.id],onlyLeafNodes:!0},this.nodeMap[`${t.id}_leafs`]={...this.nodeMap[t.id],id:`${t.id}_leafs`,onlyLeafNodes:!0,parent:t.id},this.nodeMap[t.id].children.forEach((e=>{this.nodeMap[e]={...this.nodeMap[e],parent:`${t.id}_leafs`}}))}))}this.setGraphNodesAndEdges(t.id)}expand(t){const e=this.nodeMap[t];(null==e?void 0:e.hiddenChildren)&&(this.nodeMap[t]={...e,children:e.hiddenChildren,hiddenChildren:void 0},this.setGraphNodesAndEdges(this.data.id),this.render({keepOldPosition:!0}))}fitScreen(){const{height:t,width:e}=this.graph.graph();this.updateViewBox(0,0,e,t)}render({keepOldPosition:t=!1}={}){const e=this.canvas.viewbox();this.clear(),this.calculateLayout();const{containerClassName:n,enableTooltip:r,fontColor:i,fontFamily:s,fontSize:o,fontWeight:u,tooltipId:a}=this.options,h=et({color:i,fontFamily:s,fontSize:o,fontWeight:u}),l=yh.drawGroup(0,0,n);l.attr("style",h),l.id(n),console.log("graph",this.graph);const c=this.graph.nodes();if(this.graph.edges().forEach((t=>{this.renderEdge(t,l)})),c.forEach((t=>{t.endsWith("_leafs")?this.renderGroupedLeafNodes(t,l):this.renderNode(t,l)})),this.add(l),this.fitScreen(),t&&this.updateViewBox(e.x,e.y,e.width,e.height),r){const t=((t="apex-tooltip-container")=>{const e=document.getElementById(t)||document.createElement("div");return e.id=t,e})(a);(document.body||document.getElementsByTagName("body")[0]).append(t)}}renderEdge(t,e){const n=this.graph.node(t.w),r=this.graph.node(t.v),{nodeHeight:i,nodeWidth:s}=this.options,o=((t,e,n,r,i)=>{if(!(null==t?void 0:t.parent))return null;const{calculateEdge:s,edgeMidX:o,edgeMidY:u,edgeParentX:a,edgeParentY:h,edgeX:l,edgeY:c}=co[i];return s({x:l({node:t,nodeHeight:r,nodeWidth:n}),y:c({node:t,nodeHeight:r,nodeWidth:n})},{x:a({nodeHeight:r,nodeWidth:n,parent:e}),y:h({nodeHeight:r,nodeWidth:n,parent:e})},{x:o({node:t,nodeHeight:r,nodeWidth:n}),y:u({node:t,nodeHeight:r,nodeWidth:n})},{sy:0})})(n,r,s,i,this.options.direction);if(!o)return;const u=yh.drawPath(o,{id:`${t.v}-${t.w}`});e.add(u)}renderGroupedLeafNodes(t,e){const n=this.graph.node(t),{options:r}=this,{direction:i}=r,s=co[i].leafGroupX({node:n}),o=co[i].leafGroupY({node:n}),u=yh.drawGroup(s,o,n.id,n.parent);n.children.forEach(((t,e)=>{this.renderLeafNode(t,u,e)})),e.add(u)}renderLeafNode(t,e,n){const r=this.nodeMap[t],{options:i}=this,{borderRadius:s,direction:o,enableTooltip:u,groupLeafNodesSpacing:a,highlightOnHover:h,nodeTemplate:l,tooltipTemplate:c}=i,{borderColor:f,borderStyle:d,borderWidth:p,fontColor:m,fontFamily:g,fontSize:y,fontWeight:_,nodeBGColor:v,nodeClassName:w,nodeHeight:b,nodeStyle:x,nodeWidth:E,tooltipBGColor:O,tooltipBorderColor:M,tooltipId:k,tooltipMaxWidth:C}={...i,...r.options},A=this,S=co[o].leafX({childrenSpacing:a,index:n,nodeHeight:b,nodeWidth:E}),N=co[o].leafY({childrenSpacing:a,index:n,nodeHeight:b,nodeWidth:E}),j=yh.drawGroup(S,N,r.id,r.parent),T=l(r[i.contentKey]),I=yh.drawTemplate(T,{nodeHeight:b,nodeWidth:E}),R=et({color:m,fontFamily:g,fontSize:y,fontWeight:_}),L=et({backgroundColor:v,borderColor:f,borderRadius:s,borderStyle:d,borderWidth:`${p}px`,boxSizing:"border-box",height:"100%"});if(I.first().attr("style",L.concat(x)),I.attr("class",w),j.attr("style",R),j.add(I),h&&(j.on("mouseover",(function(){const{self:t}=this.node.dataset,e=A.nodeMap[t];e&&go(e,A.nodeMap,!0,i)})),j.on("mouseout",(function(){const{self:t}=this.node.dataset,e=A.nodeMap[t];e&&go(e,A.nodeMap,!1,i)}))),u){const t=c?c(r[this.options.contentKey]):T;j.on("mousemove",(e=>{const n=tt({bgColor:O,borderColor:M,maxWidth:C,padding:c?0:10,x:e.pageX,y:e.pageY});K(k,n,t)})),j.on("mouseout",(t=>{"svg"===t.relatedTarget.tagName&&K(k)}))}e.add(j)}renderNode(t,e){var n,r;const i=this.graph.node(t),{options:s}=this,{borderRadius:o,enableExpandCollapse:u,enableTooltip:a,highlightOnHover:h,nodeHeight:l,nodeTemplate:c,nodeWidth:f,tooltipTemplate:d}=s,{borderColor:p,borderStyle:m,borderWidth:g,fontColor:y,fontFamily:_,fontSize:v,fontWeight:w,nodeBGColor:b,nodeClassName:x,nodeStyle:E,tooltipBGColor:O,tooltipBorderColor:M,tooltipId:k,tooltipMaxWidth:C}={...s,...i.options},{height:A,width:S,x:N,y:j}=i,T=this,I=yh.drawGroup(N-f/2,j-l/2,i.id,i.parent),R=c(i[s.contentKey]),L=yh.drawTemplate(R,{nodeHeight:A,nodeWidth:S}),z=et({color:y,fontFamily:_,fontSize:v,fontWeight:w}),P=et({backgroundColor:b,borderColor:p,borderRadius:o,borderStyle:m,borderWidth:`${g}px`,boxSizing:"border-box",height:"100%"});if(L.first().attr("style",P.concat(E)),L.attr("class",x),I.attr("style",z),I.add(L),h&&(I.on("mouseover",(function(){const{self:t}=this.node.dataset,e=T.nodeMap[t];e&&go(e,T.nodeMap,!0,s)})),I.on("mouseout",(function(){const{self:t}=this.node.dataset,e=T.nodeMap[t];e&&go(e,T.nodeMap,!1,s)}))),a){const t=d?d(i[this.options.contentKey]):R;I.on("mousemove",(e=>{const n=tt({bgColor:O,borderColor:M,maxWidth:C,padding:d?0:10,x:e.pageX,y:e.pageY});K(k,n,t)})),I.on("mouseout",(t=>{"svg"===t.relatedTarget.tagName&&K(k)}))}if(e.add(I),(i.children||i.hiddenChildren)&&u&&((null==(n=i.children)?void 0:n.length)||(null==(r=i.hiddenChildren)?void 0:r.length))){const t=7,n=yh.drawGroup(N+f/2-t,j+l-t,i.id),r=yh.drawCircle({cx:t,cy:t,r:t,style:"fill: #FFF; cursor: pointer;"});n.data("expanded",!1),n.add(r),i.hiddenChildren?n.add('<svg height="14" viewBox="0 0 24 24" width="14" xmlns="http://www.w3.org/2000/svg">\n <path d="m12 0a12 12 0 1 0 12 12 12.013 12.013 0 0 0 -12-12zm0 22a10 10 0 1 1 10-10 10.011 10.011 0 0 1 -10 10zm5-10a1 1 0 0 1 -1 1h-3v3a1 1 0 0 1 -2 0v-3h-3a1 1 0 0 1 0-2h3v-3a1 1 0 0 1 2 0v3h3a1 1 0 0 1 1 1z"/>\n</svg>'):n.add('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="14" height="14">\n <path d="m12,0C5.383,0,0,5.383,0,12s5.383,12,12,12,12-5.383,12-12S18.617,0,12,0Zm0,22c-5.514,0-10-4.486-10-10S6.486,2,12,2s10,4.486,10,10-4.486,10-10,10Zm5-10c0,.552-.448,1-1,1h-8c-.552,0-1-.448-1-1s.448-1,1-1h8c.552,0,1,.448,1,1Z"/>\n</svg>\n'),n.on("click",(function(){i.hiddenChildren?T.expand(this.node.dataset.self):T.collapse(this.node.dataset.self)})),e.add(n)}}}return class{constructor(t,e){this.element=t,this.options={...po,...e};const{height:n,width:r}=this.options;this.graph=new vh(this.element,this.options);let i=!1,s=0;"string"==typeof r&&/^\d+(\.\d+)?%$/.test(r)?(s=Number(r.substring(0,r.length-1)),i=!0):s=Number(r);const o="auto"===n?s/1.6:n;this.element.style.width=`${s}${i?"%":"px"}`,this.element.style.height=`${o}${i?"%":"px"}`,this.element.style.position="relative"}render(t){if(!this.element)throw new Error("Element not found");if(this.graph.construct(t),this.graph.render(),this.options.enableToolbar){new ur(this.element).render({enableExport:!0,enableFitscreen:!0,enableZoom:!0,onExport:this.graph.exportToSvg.bind(this.graph),onFitscreen:this.graph.fitScreen.bind(this.graph),onZoom:this.graph.zoom.bind(this.graph)})}return this.graph}}}));
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).ApexTree={})}(this,(function(t){"use strict";var e=Object.defineProperty,n=(t,n,r)=>(((t,n,r)=>{n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r})(t,"symbol"!=typeof n?n+"":n,r),r);var r,i=(r={"À":"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==r?void 0:r[t]}),s="object"==typeof global&&global&&global.Object===Object&&global,o="object"==typeof self&&self&&self.Object===Object&&self,u=(s||o||Function("return this")()).Symbol;var a=Array.isArray,h=Object.prototype,l=h.hasOwnProperty,c=h.toString,f=u?u.toStringTag:void 0;var d=Object.prototype.toString;var p="[object Null]",m="[object Undefined]",g=u?u.toStringTag:void 0;function y(t){return null==t?void 0===t?m:p:g&&g in Object(t)?function(t){var e=l.call(t,f),n=t[f];try{t[f]=void 0;var r=!0}catch(s){}var i=c.call(t);return r&&(e?t[f]=n:delete t[f]),i}(t):function(t){return d.call(t)}(t)}var _="[object Symbol]";var v=1/0,w=u?u.prototype:void 0,b=w?w.toString:void 0;function x(t){if("string"==typeof t)return t;if(a(t))return function(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}(t,x)+"";if(function(t){return"symbol"==typeof t||function(t){return null!=t&&"object"==typeof t}(t)&&y(t)==_}(t))return b?b.call(t):"";var e=t+"";return"0"==e&&1/t==-v?"-0":e}function E(t){return null==t?"":x(t)}var O=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,M=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var k=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var C=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var A="\\ud800-\\udfff",S="\\u2700-\\u27bf",N="a-z\\xdf-\\xf6\\xf8-\\xff",j="A-Z\\xc0-\\xd6\\xd8-\\xde",T="\\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",I="["+T+"]",R="\\d+",L="["+S+"]",z="["+N+"]",D="[^"+A+T+R+S+N+j+"]",P="(?:\\ud83c[\\udde6-\\uddff]){2}",F="[\\ud800-\\udbff][\\udc00-\\udfff]",$="["+j+"]",Y="(?:"+z+"|"+D+")",X="(?:"+$+"|"+D+")",G="(?:['’](?:d|ll|m|re|s|t|ve))?",B="(?:['’](?:D|LL|M|RE|S|T|VE))?",W="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",q="[\\ufe0e\\ufe0f]?",V=q+W+("(?:\\u200d(?:"+["[^"+A+"]",P,F].join("|")+")"+q+W+")*"),H="(?:"+[L,P,F].join("|")+")"+V,U=RegExp([$+"?"+z+"+"+G+"(?="+[I,$,"$"].join("|")+")",X+"+"+B+"(?="+[I,$+Y,"$"].join("|")+")",$+"?"+Y+"+"+G,$+"+"+B,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",R,H].join("|"),"g");function Z(t,e,n){return t=E(t),void 0===e?function(t){return C.test(t)}(t)?function(t){return t.match(U)||[]}(t):function(t){return t.match(k)||[]}(t):t.match(e)||[]}var K=RegExp("['’]","g");var J,Q=(J=function(t,e,n){return t+(n?"-":"")+e.toLowerCase()},function(t){return function(t,e,n,r){for(var i=-1,s=null==t?0:t.length;++i<s;)n=e(n,t[i],i,t);return n}(Z(function(t){return(t=E(t))&&t.replace(O,i).replace(M,"")}(t).replace(K,"")),J,"")});const tt=(t="",e,n="")=>{const r=document.getElementById(t);e?null==r||r.setAttribute("style",e):null==r||r.removeAttribute("style"),(null==r?void 0:r.innerHTML.replaceAll("'",'"'))!==n.replaceAll("'",'"')&&r&&(r.innerHTML=n)},et=({bgColor:t,borderColor:e,fontColor:n,fontFamily:r,fontSize:i,fontWeight:s,maxWidth:o,offset:u=20,padding:a,x:h,y:l})=>{const c=["position: absolute;",`left: ${h+u}px;`,`top: ${l+u}px;`,`border: 1px solid ${e};`,"border-radius: 5px;","z-index: 1000;"];return n&&c.push(`color: ${n};`),r&&c.push(`font-family: ${r};`),s&&c.push(`font-weight: ${s};`),i&&c.push(`font-size: ${i};`),t&&c.push(`background-color: ${t};`),o&&c.push(`max-width: ${o}px`),void 0!==a&&c.push(`padding: ${a}px`),c.join(" ")},nt=(t={})=>{const e=[];for(const n in t){const r=`${Q(n)}: ${t[n]};`;e.push(r)}return e.join(" ")};function rt(){}class it{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 st=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 i=new Date;return new Date(r.expiryDate)<i?{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}}}};st.licenseKey=null,st.validationResult=null;let ot=st;var ut,at,ht="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},lt={exports:{}};ut=lt,at=lt.exports,function(){var t,e="Expected a function",n="__lodash_hash_undefined__",r="__lodash_placeholder__",i=16,s=32,o=64,u=128,a=256,h=1/0,l=9007199254740991,c=NaN,f=4294967295,d=[["ary",u],["bind",1],["bindKey",2],["curry",8],["curryRight",i],["flip",512],["partial",s],["partialRight",o],["rearg",a]],p="[object Arguments]",m="[object Array]",g="[object Boolean]",y="[object Date]",_="[object Error]",v="[object Function]",w="[object GeneratorFunction]",b="[object Map]",x="[object Number]",E="[object Object]",O="[object Promise]",M="[object RegExp]",k="[object Set]",C="[object String]",A="[object Symbol]",S="[object WeakMap]",N="[object ArrayBuffer]",j="[object DataView]",T="[object Float32Array]",I="[object Float64Array]",R="[object Int8Array]",L="[object Int16Array]",z="[object Int32Array]",D="[object Uint8Array]",P="[object Uint8ClampedArray]",F="[object Uint16Array]",$="[object Uint32Array]",Y=/\b__p \+= '';/g,X=/\b(__p \+=) '' \+/g,G=/(__e\(.*?\)|\b__t\)) \+\n'';/g,B=/&(?:amp|lt|gt|quot|#39);/g,W=/[&<>"']/g,q=RegExp(B.source),V=RegExp(W.source),H=/<%-([\s\S]+?)%>/g,U=/<%([\s\S]+?)%>/g,Z=/<%=([\s\S]+?)%>/g,K=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,J=/^\w*$/,Q=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,tt=/[\\^$.*+?()[\]{}|]/g,et=RegExp(tt.source),nt=/^\s+/,rt=/\s/,it=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,st=/\{\n\/\* \[wrapped with (.+)\] \*/,ot=/,? & /,lt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ct=/[()=,{}\[\]\/\s]/,ft=/\\(\\)?/g,dt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,pt=/\w*$/,mt=/^[-+]0x[0-9a-f]+$/i,gt=/^0b[01]+$/i,yt=/^\[object .+?Constructor\]$/,_t=/^0o[0-7]+$/i,vt=/^(?:0|[1-9]\d*)$/,wt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,bt=/($^)/,xt=/['\n\r\u2028\u2029\\]/g,Et="\\ud800-\\udfff",Ot="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Mt="\\u2700-\\u27bf",kt="a-z\\xdf-\\xf6\\xf8-\\xff",Ct="A-Z\\xc0-\\xd6\\xd8-\\xde",At="\\ufe0e\\ufe0f",St="\\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",Nt="['’]",jt="["+Et+"]",Tt="["+St+"]",It="["+Ot+"]",Rt="\\d+",Lt="["+Mt+"]",zt="["+kt+"]",Dt="[^"+Et+St+Rt+Mt+kt+Ct+"]",Pt="\\ud83c[\\udffb-\\udfff]",Ft="[^"+Et+"]",$t="(?:\\ud83c[\\udde6-\\uddff]){2}",Yt="[\\ud800-\\udbff][\\udc00-\\udfff]",Xt="["+Ct+"]",Gt="\\u200d",Bt="(?:"+zt+"|"+Dt+")",Wt="(?:"+Xt+"|"+Dt+")",qt="(?:['’](?:d|ll|m|re|s|t|ve))?",Vt="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ht="(?:"+It+"|"+Pt+")?",Ut="["+At+"]?",Zt=Ut+Ht+"(?:"+Gt+"(?:"+[Ft,$t,Yt].join("|")+")"+Ut+Ht+")*",Kt="(?:"+[Lt,$t,Yt].join("|")+")"+Zt,Jt="(?:"+[Ft+It+"?",It,$t,Yt,jt].join("|")+")",Qt=RegExp(Nt,"g"),te=RegExp(It,"g"),ee=RegExp(Pt+"(?="+Pt+")|"+Jt+Zt,"g"),ne=RegExp([Xt+"?"+zt+"+"+qt+"(?="+[Tt,Xt,"$"].join("|")+")",Wt+"+"+Vt+"(?="+[Tt,Xt+Bt,"$"].join("|")+")",Xt+"?"+Bt+"+"+qt,Xt+"+"+Vt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Rt,Kt].join("|"),"g"),re=RegExp("["+Gt+Et+Ot+At+"]"),ie=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,se=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],oe=-1,ue={};ue[T]=ue[I]=ue[R]=ue[L]=ue[z]=ue[D]=ue[P]=ue[F]=ue[$]=!0,ue[p]=ue[m]=ue[N]=ue[g]=ue[j]=ue[y]=ue[_]=ue[v]=ue[b]=ue[x]=ue[E]=ue[M]=ue[k]=ue[C]=ue[S]=!1;var ae={};ae[p]=ae[m]=ae[N]=ae[j]=ae[g]=ae[y]=ae[T]=ae[I]=ae[R]=ae[L]=ae[z]=ae[b]=ae[x]=ae[E]=ae[M]=ae[k]=ae[C]=ae[A]=ae[D]=ae[P]=ae[F]=ae[$]=!0,ae[_]=ae[v]=ae[S]=!1;var he={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},le=parseFloat,ce=parseInt,fe="object"==typeof ht&&ht&&ht.Object===Object&&ht,de="object"==typeof self&&self&&self.Object===Object&&self,pe=fe||de||Function("return this")(),me=at&&!at.nodeType&&at,ge=me&&ut&&!ut.nodeType&&ut,ye=ge&&ge.exports===me,_e=ye&&fe.process,ve=function(){try{var t=ge&&ge.require&&ge.require("util").types;return t||_e&&_e.binding&&_e.binding("util")}catch(e){}}(),we=ve&&ve.isArrayBuffer,be=ve&&ve.isDate,xe=ve&&ve.isMap,Ee=ve&&ve.isRegExp,Oe=ve&&ve.isSet,Me=ve&&ve.isTypedArray;function ke(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function Ce(t,e,n,r){for(var i=-1,s=null==t?0:t.length;++i<s;){var o=t[i];e(r,o,n(o),t)}return r}function Ae(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}function Se(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function Ne(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function je(t,e){for(var n=-1,r=null==t?0:t.length,i=0,s=[];++n<r;){var o=t[n];e(o,n,t)&&(s[i++]=o)}return s}function Te(t,e){return!(null==t||!t.length)&&Xe(t,e,0)>-1}function Ie(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}function Re(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}function Le(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function ze(t,e,n,r){var i=-1,s=null==t?0:t.length;for(r&&s&&(n=t[++i]);++i<s;)n=e(n,t[i],i,t);return n}function De(t,e,n,r){var i=null==t?0:t.length;for(r&&i&&(n=t[--i]);i--;)n=e(n,t[i],i,t);return n}function Pe(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var Fe=qe("length");function $e(t,e,n){var r;return n(t,(function(t,n,i){if(e(t,n,i))return r=n,!1})),r}function Ye(t,e,n,r){for(var i=t.length,s=n+(r?1:-1);r?s--:++s<i;)if(e(t[s],s,t))return s;return-1}function Xe(t,e,n){return e==e?function(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}(t,e,n):Ye(t,Be,n)}function Ge(t,e,n,r){for(var i=n-1,s=t.length;++i<s;)if(r(t[i],e))return i;return-1}function Be(t){return t!=t}function We(t,e){var n=null==t?0:t.length;return n?Ue(t,e)/n:c}function qe(e){return function(n){return null==n?t:n[e]}}function Ve(e){return function(n){return null==e?t:e[n]}}function He(t,e,n,r,i){return i(t,(function(t,i,s){n=r?(r=!1,t):e(n,t,i,s)})),n}function Ue(e,n){for(var r,i=-1,s=e.length;++i<s;){var o=n(e[i]);o!==t&&(r=r===t?o:r+o)}return r}function Ze(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function Ke(t){return t?t.slice(0,pn(t)+1).replace(nt,""):t}function Je(t){return function(e){return t(e)}}function Qe(t,e){return Re(e,(function(e){return t[e]}))}function tn(t,e){return t.has(e)}function en(t,e){for(var n=-1,r=t.length;++n<r&&Xe(e,t[n],0)>-1;);return n}function nn(t,e){for(var n=t.length;n--&&Xe(e,t[n],0)>-1;);return n}var rn=Ve({"À":"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"}),sn=Ve({"&":"&","<":"<",">":">",'"':""","'":"'"});function on(t){return"\\"+he[t]}function un(t){return re.test(t)}function an(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function hn(t,e){return function(n){return t(e(n))}}function ln(t,e){for(var n=-1,i=t.length,s=0,o=[];++n<i;){var u=t[n];u!==e&&u!==r||(t[n]=r,o[s++]=n)}return o}function cn(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}function fn(t){return un(t)?function(t){for(var e=ee.lastIndex=0;ee.test(t);)++e;return e}(t):Fe(t)}function dn(t){return un(t)?function(t){return t.match(ee)||[]}(t):function(t){return t.split("")}(t)}function pn(t){for(var e=t.length;e--&&rt.test(t.charAt(e)););return e}var mn=Ve({"&":"&","<":"<",">":">",""":'"',"'":"'"}),gn=function rt(ut){var at,ht=(ut=null==ut?pe:gn.defaults(pe.Object(),ut,gn.pick(pe,se))).Array,Et=ut.Date,Ot=ut.Error,Mt=ut.Function,kt=ut.Math,Ct=ut.Object,At=ut.RegExp,St=ut.String,Nt=ut.TypeError,jt=ht.prototype,Tt=Mt.prototype,It=Ct.prototype,Rt=ut["__core-js_shared__"],Lt=Tt.toString,zt=It.hasOwnProperty,Dt=0,Pt=(at=/[^.]+$/.exec(Rt&&Rt.keys&&Rt.keys.IE_PROTO||""))?"Symbol(src)_1."+at:"",Ft=It.toString,$t=Lt.call(Ct),Yt=pe._,Xt=At("^"+Lt.call(zt).replace(tt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Gt=ye?ut.Buffer:t,Bt=ut.Symbol,Wt=ut.Uint8Array,qt=Gt?Gt.allocUnsafe:t,Vt=hn(Ct.getPrototypeOf,Ct),Ht=Ct.create,Ut=It.propertyIsEnumerable,Zt=jt.splice,Kt=Bt?Bt.isConcatSpreadable:t,Jt=Bt?Bt.iterator:t,ee=Bt?Bt.toStringTag:t,re=function(){try{var t=cs(Ct,"defineProperty");return t({},"",{}),t}catch(e){}}(),he=ut.clearTimeout!==pe.clearTimeout&&ut.clearTimeout,fe=Et&&Et.now!==pe.Date.now&&Et.now,de=ut.setTimeout!==pe.setTimeout&&ut.setTimeout,me=kt.ceil,ge=kt.floor,_e=Ct.getOwnPropertySymbols,ve=Gt?Gt.isBuffer:t,Fe=ut.isFinite,Ve=jt.join,yn=hn(Ct.keys,Ct),_n=kt.max,vn=kt.min,wn=Et.now,bn=ut.parseInt,xn=kt.random,En=jt.reverse,On=cs(ut,"DataView"),Mn=cs(ut,"Map"),kn=cs(ut,"Promise"),Cn=cs(ut,"Set"),An=cs(ut,"WeakMap"),Sn=cs(Ct,"create"),Nn=An&&new An,jn={},Tn=$s(On),In=$s(Mn),Rn=$s(kn),Ln=$s(Cn),zn=$s(An),Dn=Bt?Bt.prototype:t,Pn=Dn?Dn.valueOf:t,Fn=Dn?Dn.toString:t;function $n(t){if(iu(t)&&!Vo(t)&&!(t instanceof Bn)){if(t instanceof Gn)return t;if(zt.call(t,"__wrapped__"))return Ys(t)}return new Gn(t)}var Yn=function(){function e(){}return function(n){if(!ru(n))return{};if(Ht)return Ht(n);e.prototype=n;var r=new e;return e.prototype=t,r}}();function Xn(){}function Gn(e,n){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!n,this.__index__=0,this.__values__=t}function Bn(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=f,this.__views__=[]}function Wn(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 qn(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 Vn(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 Hn(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Vn;++e<n;)this.add(t[e])}function Un(t){var e=this.__data__=new qn(t);this.size=e.size}function Zn(t,e){var n=Vo(t),r=!n&&qo(t),i=!n&&!r&&Ko(t),s=!n&&!r&&!i&&fu(t),o=n||r||i||s,u=o?Ze(t.length,St):[],a=u.length;for(var h in t)!e&&!zt.call(t,h)||o&&("length"==h||i&&("offset"==h||"parent"==h)||s&&("buffer"==h||"byteLength"==h||"byteOffset"==h)||_s(h,a))||u.push(h);return u}function Kn(e){var n=e.length;return n?e[Hr(0,n-1)]:t}function Jn(t,e){return Rs(Si(t),ur(e,0,t.length))}function Qn(t){return Rs(Si(t))}function tr(e,n,r){(r!==t&&!Go(e[n],r)||r===t&&!(n in e))&&sr(e,n,r)}function er(e,n,r){var i=e[n];zt.call(e,n)&&Go(i,r)&&(r!==t||n in e)||sr(e,n,r)}function nr(t,e){for(var n=t.length;n--;)if(Go(t[n][0],e))return n;return-1}function rr(t,e,n,r){return fr(t,(function(t,i,s){e(r,t,n(t),s)})),r}function ir(t,e){return t&&Ni(e,Ru(e),t)}function sr(t,e,n){"__proto__"==e&&re?re(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function or(e,n){for(var r=-1,i=n.length,s=ht(i),o=null==e;++r<i;)s[r]=o?t:Su(e,n[r]);return s}function ur(e,n,r){return e==e&&(r!==t&&(e=e<=r?e:r),n!==t&&(e=e>=n?e:n)),e}function ar(e,n,r,i,s,o){var u,a=1&n,h=2&n,l=4&n;if(r&&(u=s?r(e,i,s,o):r(e)),u!==t)return u;if(!ru(e))return e;var c=Vo(e);if(c){if(u=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&zt.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(e),!a)return Si(e,u)}else{var f=ps(e),d=f==v||f==w;if(Ko(e))return Ei(e,a);if(f==E||f==p||d&&!s){if(u=h||d?{}:gs(e),!a)return h?function(t,e){return Ni(t,ds(t),e)}(e,function(t,e){return t&&Ni(e,Lu(e),t)}(u,e)):function(t,e){return Ni(t,fs(t),e)}(e,ir(u,e))}else{if(!ae[f])return s?e:{};u=function(t,e,n){var r,i=t.constructor;switch(e){case N:return Oi(t);case g:case y:return new i(+t);case j:return function(t,e){var n=e?Oi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case T:case I:case R:case L:case z:case D:case P:case F:case $:return Mi(t,n);case b:return new i;case x:case C:return new i(t);case M:return function(t){var e=new t.constructor(t.source,pt.exec(t));return e.lastIndex=t.lastIndex,e}(t);case k:return new i;case A:return r=t,Pn?Ct(Pn.call(r)):{}}}(e,f,a)}}o||(o=new Un);var m=o.get(e);if(m)return m;o.set(e,u),hu(e)?e.forEach((function(t){u.add(ar(t,n,r,t,e,o))})):su(e)&&e.forEach((function(t,i){u.set(i,ar(t,n,r,i,e,o))}));var _=c?t:(l?h?is:rs:h?Lu:Ru)(e);return Ae(_||e,(function(t,i){_&&(t=e[i=t]),er(u,i,ar(t,n,r,i,e,o))})),u}function hr(e,n,r){var i=r.length;if(null==e)return!i;for(e=Ct(e);i--;){var s=r[i],o=n[s],u=e[s];if(u===t&&!(s in e)||!o(u))return!1}return!0}function lr(n,r,i){if("function"!=typeof n)throw new Nt(e);return Ns((function(){n.apply(t,i)}),r)}function cr(t,e,n,r){var i=-1,s=Te,o=!0,u=t.length,a=[],h=e.length;if(!u)return a;n&&(e=Re(e,Je(n))),r?(s=Ie,o=!1):e.length>=200&&(s=tn,o=!1,e=new Hn(e));t:for(;++i<u;){var l=t[i],c=null==n?l:n(l);if(l=r||0!==l?l:0,o&&c==c){for(var f=h;f--;)if(e[f]===c)continue t;a.push(l)}else s(e,c,r)||a.push(l)}return a}$n.templateSettings={escape:H,evaluate:U,interpolate:Z,variable:"",imports:{_:$n}},$n.prototype=Xn.prototype,$n.prototype.constructor=$n,Gn.prototype=Yn(Xn.prototype),Gn.prototype.constructor=Gn,Bn.prototype=Yn(Xn.prototype),Bn.prototype.constructor=Bn,Wn.prototype.clear=function(){this.__data__=Sn?Sn(null):{},this.size=0},Wn.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Wn.prototype.get=function(e){var r=this.__data__;if(Sn){var i=r[e];return i===n?t:i}return zt.call(r,e)?r[e]:t},Wn.prototype.has=function(e){var n=this.__data__;return Sn?n[e]!==t:zt.call(n,e)},Wn.prototype.set=function(e,r){var i=this.__data__;return this.size+=this.has(e)?0:1,i[e]=Sn&&r===t?n:r,this},qn.prototype.clear=function(){this.__data__=[],this.size=0},qn.prototype.delete=function(t){var e=this.__data__,n=nr(e,t);return!(n<0||(n==e.length-1?e.pop():Zt.call(e,n,1),--this.size,0))},qn.prototype.get=function(e){var n=this.__data__,r=nr(n,e);return r<0?t:n[r][1]},qn.prototype.has=function(t){return nr(this.__data__,t)>-1},qn.prototype.set=function(t,e){var n=this.__data__,r=nr(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},Vn.prototype.clear=function(){this.size=0,this.__data__={hash:new Wn,map:new(Mn||qn),string:new Wn}},Vn.prototype.delete=function(t){var e=hs(this,t).delete(t);return this.size-=e?1:0,e},Vn.prototype.get=function(t){return hs(this,t).get(t)},Vn.prototype.has=function(t){return hs(this,t).has(t)},Vn.prototype.set=function(t,e){var n=hs(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},Hn.prototype.add=Hn.prototype.push=function(t){return this.__data__.set(t,n),this},Hn.prototype.has=function(t){return this.__data__.has(t)},Un.prototype.clear=function(){this.__data__=new qn,this.size=0},Un.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Un.prototype.get=function(t){return this.__data__.get(t)},Un.prototype.has=function(t){return this.__data__.has(t)},Un.prototype.set=function(t,e){var n=this.__data__;if(n instanceof qn){var r=n.__data__;if(!Mn||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Vn(r)}return n.set(t,e),this.size=n.size,this};var fr=Ii(wr),dr=Ii(br,!0);function pr(t,e){var n=!0;return fr(t,(function(t,r,i){return n=!!e(t,r,i)})),n}function mr(e,n,r){for(var i=-1,s=e.length;++i<s;){var o=e[i],u=n(o);if(null!=u&&(a===t?u==u&&!cu(u):r(u,a)))var a=u,h=o}return h}function gr(t,e){var n=[];return fr(t,(function(t,r,i){e(t,r,i)&&n.push(t)})),n}function yr(t,e,n,r,i){var s=-1,o=t.length;for(n||(n=ys),i||(i=[]);++s<o;){var u=t[s];e>0&&n(u)?e>1?yr(u,e-1,n,r,i):Le(i,u):r||(i[i.length]=u)}return i}var _r=Ri(),vr=Ri(!0);function wr(t,e){return t&&_r(t,e,Ru)}function br(t,e){return t&&vr(t,e,Ru)}function xr(t,e){return je(e,(function(e){return tu(t[e])}))}function Er(e,n){for(var r=0,i=(n=vi(n,e)).length;null!=e&&r<i;)e=e[Fs(n[r++])];return r&&r==i?e:t}function Or(t,e,n){var r=e(t);return Vo(t)?r:Le(r,n(t))}function Mr(e){return null==e?e===t?"[object Undefined]":"[object Null]":ee&&ee in Ct(e)?function(e){var n=zt.call(e,ee),r=e[ee];try{e[ee]=t;var i=!0}catch(o){}var s=Ft.call(e);return i&&(n?e[ee]=r:delete e[ee]),s}(e):function(t){return Ft.call(t)}(e)}function kr(t,e){return t>e}function Cr(t,e){return null!=t&&zt.call(t,e)}function Ar(t,e){return null!=t&&e in Ct(t)}function Sr(e,n,r){for(var i=r?Ie:Te,s=e[0].length,o=e.length,u=o,a=ht(o),h=1/0,l=[];u--;){var c=e[u];u&&n&&(c=Re(c,Je(n))),h=vn(c.length,h),a[u]=!r&&(n||s>=120&&c.length>=120)?new Hn(u&&c):t}c=e[0];var f=-1,d=a[0];t:for(;++f<s&&l.length<h;){var p=c[f],m=n?n(p):p;if(p=r||0!==p?p:0,!(d?tn(d,m):i(l,m,r))){for(u=o;--u;){var g=a[u];if(!(g?tn(g,m):i(e[u],m,r)))continue t}d&&d.push(m),l.push(p)}}return l}function Nr(e,n,r){var i=null==(e=Cs(e,n=vi(n,e)))?e:e[Fs(Js(n))];return null==i?t:ke(i,e,r)}function jr(t){return iu(t)&&Mr(t)==p}function Tr(e,n,r,i,s){return e===n||(null==e||null==n||!iu(e)&&!iu(n)?e!=e&&n!=n:function(e,n,r,i,s,o){var u=Vo(e),a=Vo(n),h=u?m:ps(e),l=a?m:ps(n),c=(h=h==p?E:h)==E,f=(l=l==p?E:l)==E,d=h==l;if(d&&Ko(e)){if(!Ko(n))return!1;u=!0,c=!1}if(d&&!c)return o||(o=new Un),u||fu(e)?es(e,n,r,i,s,o):function(t,e,n,r,i,s,o){switch(n){case j:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case N:return!(t.byteLength!=e.byteLength||!s(new Wt(t),new Wt(e)));case g:case y:case x:return Go(+t,+e);case _:return t.name==e.name&&t.message==e.message;case M:case C:return t==e+"";case b:var u=an;case k:var a=1&r;if(u||(u=cn),t.size!=e.size&&!a)return!1;var h=o.get(t);if(h)return h==e;r|=2,o.set(t,e);var l=es(u(t),u(e),r,i,s,o);return o.delete(t),l;case A:if(Pn)return Pn.call(t)==Pn.call(e)}return!1}(e,n,h,r,i,s,o);if(!(1&r)){var v=c&&zt.call(e,"__wrapped__"),w=f&&zt.call(n,"__wrapped__");if(v||w){var O=v?e.value():e,S=w?n.value():n;return o||(o=new Un),s(O,S,r,i,o)}}return!!d&&(o||(o=new Un),function(e,n,r,i,s,o){var u=1&r,a=rs(e),h=a.length,l=rs(n),c=l.length;if(h!=c&&!u)return!1;for(var f=h;f--;){var d=a[f];if(!(u?d in n:zt.call(n,d)))return!1}var p=o.get(e),m=o.get(n);if(p&&m)return p==n&&m==e;var g=!0;o.set(e,n),o.set(n,e);for(var y=u;++f<h;){var _=e[d=a[f]],v=n[d];if(i)var w=u?i(v,_,d,n,e,o):i(_,v,d,e,n,o);if(!(w===t?_===v||s(_,v,r,i,o):w)){g=!1;break}y||(y="constructor"==d)}if(g&&!y){var b=e.constructor,x=n.constructor;b==x||!("constructor"in e)||!("constructor"in n)||"function"==typeof b&&b instanceof b&&"function"==typeof x&&x instanceof x||(g=!1)}return o.delete(e),o.delete(n),g}(e,n,r,i,s,o))}(e,n,r,i,Tr,s))}function Ir(e,n,r,i){var s=r.length,o=s,u=!i;if(null==e)return!o;for(e=Ct(e);s--;){var a=r[s];if(u&&a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++s<o;){var h=(a=r[s])[0],l=e[h],c=a[1];if(u&&a[2]){if(l===t&&!(h in e))return!1}else{var f=new Un;if(i)var d=i(l,c,h,e,n,f);if(!(d===t?Tr(c,l,3,i,f):d))return!1}}return!0}function Rr(t){return!(!ru(t)||(e=t,Pt&&Pt in e))&&(tu(t)?Xt:yt).test($s(t));var e}function Lr(t){return"function"==typeof t?t:null==t?oa:"object"==typeof t?Vo(t)?Yr(t[0],t[1]):$r(t):ma(t)}function zr(t){if(!Es(t))return yn(t);var e=[];for(var n in Ct(t))zt.call(t,n)&&"constructor"!=n&&e.push(n);return e}function Dr(t){if(!ru(t))return function(t){var e=[];if(null!=t)for(var n in Ct(t))e.push(n);return e}(t);var e=Es(t),n=[];for(var r in t)("constructor"!=r||!e&&zt.call(t,r))&&n.push(r);return n}function Pr(t,e){return t<e}function Fr(t,e){var n=-1,r=Uo(t)?ht(t.length):[];return fr(t,(function(t,i,s){r[++n]=e(t,i,s)})),r}function $r(t){var e=ls(t);return 1==e.length&&e[0][2]?Ms(e[0][0],e[0][1]):function(n){return n===t||Ir(n,t,e)}}function Yr(e,n){return ws(e)&&Os(n)?Ms(Fs(e),n):function(r){var i=Su(r,e);return i===t&&i===n?Nu(r,e):Tr(n,i,3)}}function Xr(e,n,r,i,s){e!==n&&_r(n,(function(o,u){if(s||(s=new Un),ru(o))!function(e,n,r,i,s,o,u){var a=As(e,r),h=As(n,r),l=u.get(h);if(l)tr(e,r,l);else{var c=o?o(a,h,r+"",e,n,u):t,f=c===t;if(f){var d=Vo(h),p=!d&&Ko(h),m=!d&&!p&&fu(h);c=h,d||p||m?Vo(a)?c=a:Zo(a)?c=Si(a):p?(f=!1,c=Ei(h,!0)):m?(f=!1,c=Mi(h,!0)):c=[]:uu(h)||qo(h)?(c=a,qo(a)?c=wu(a):ru(a)&&!tu(a)||(c=gs(h))):f=!1}f&&(u.set(h,c),s(c,h,i,o,u),u.delete(h)),tr(e,r,c)}}(e,n,u,r,Xr,i,s);else{var a=i?i(As(e,u),o,u+"",e,n,s):t;a===t&&(a=o),tr(e,u,a)}}),Lu)}function Gr(e,n){var r=e.length;if(r)return _s(n+=n<0?r:0,r)?e[n]:t}function Br(t,e,n){e=e.length?Re(e,(function(t){return Vo(t)?function(e){return Er(e,1===t.length?t[0]:t)}:t})):[oa];var r=-1;return e=Re(e,Je(as())),function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}(Fr(t,(function(t,n,i){return{criteria:Re(e,(function(e){return e(t)})),index:++r,value:t}})),(function(t,e){return function(t,e,n){for(var r=-1,i=t.criteria,s=e.criteria,o=i.length,u=n.length;++r<o;){var a=ki(i[r],s[r]);if(a)return r>=u?a:a*("desc"==n[r]?-1:1)}return t.index-e.index}(t,e,n)}))}function Wr(t,e,n){for(var r=-1,i=e.length,s={};++r<i;){var o=e[r],u=Er(t,o);n(u,o)&&Qr(s,vi(o,t),u)}return s}function qr(t,e,n,r){var i=r?Ge:Xe,s=-1,o=e.length,u=t;for(t===e&&(e=Si(e)),n&&(u=Re(t,Je(n)));++s<o;)for(var a=0,h=e[s],l=n?n(h):h;(a=i(u,l,a,r))>-1;)u!==t&&Zt.call(u,a,1),Zt.call(t,a,1);return t}function Vr(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==s){var s=i;_s(i)?Zt.call(t,i,1):ci(t,i)}}return t}function Hr(t,e){return t+ge(xn()*(e-t+1))}function Ur(t,e){var n="";if(!t||e<1||e>l)return n;do{e%2&&(n+=t),(e=ge(e/2))&&(t+=t)}while(e);return n}function Zr(t,e){return js(ks(t,e,oa),t+"")}function Kr(t){return Kn(Gu(t))}function Jr(t,e){var n=Gu(t);return Rs(n,ur(e,0,n.length))}function Qr(e,n,r,i){if(!ru(e))return e;for(var s=-1,o=(n=vi(n,e)).length,u=o-1,a=e;null!=a&&++s<o;){var h=Fs(n[s]),l=r;if("__proto__"===h||"constructor"===h||"prototype"===h)return e;if(s!=u){var c=a[h];(l=i?i(c,h,a):t)===t&&(l=ru(c)?c:_s(n[s+1])?[]:{})}er(a,h,l),a=a[h]}return e}var ti=Nn?function(t,e){return Nn.set(t,e),t}:oa,ei=re?function(t,e){return re(t,"toString",{configurable:!0,enumerable:!1,value:ra(e),writable:!0})}:oa;function ni(t){return Rs(Gu(t))}function ri(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(n=n>i?i:n)<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var s=ht(i);++r<i;)s[r]=t[r+e];return s}function ii(t,e){var n;return fr(t,(function(t,r,i){return!(n=e(t,r,i))})),!!n}function si(t,e,n){var r=0,i=null==t?r:t.length;if("number"==typeof e&&e==e&&i<=2147483647){for(;r<i;){var s=r+i>>>1,o=t[s];null!==o&&!cu(o)&&(n?o<=e:o<e)?r=s+1:i=s}return i}return oi(t,e,oa,n)}function oi(e,n,r,i){var s=0,o=null==e?0:e.length;if(0===o)return 0;for(var u=(n=r(n))!=n,a=null===n,h=cu(n),l=n===t;s<o;){var c=ge((s+o)/2),f=r(e[c]),d=f!==t,p=null===f,m=f==f,g=cu(f);if(u)var y=i||m;else y=l?m&&(i||d):a?m&&d&&(i||!p):h?m&&d&&!p&&(i||!g):!p&&!g&&(i?f<=n:f<n);y?s=c+1:o=c}return vn(o,4294967294)}function ui(t,e){for(var n=-1,r=t.length,i=0,s=[];++n<r;){var o=t[n],u=e?e(o):o;if(!n||!Go(u,a)){var a=u;s[i++]=0===o?0:o}}return s}function ai(t){return"number"==typeof t?t:cu(t)?c:+t}function hi(t){if("string"==typeof t)return t;if(Vo(t))return Re(t,hi)+"";if(cu(t))return Fn?Fn.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function li(t,e,n){var r=-1,i=Te,s=t.length,o=!0,u=[],a=u;if(n)o=!1,i=Ie;else if(s>=200){var h=e?null:Ui(t);if(h)return cn(h);o=!1,i=tn,a=new Hn}else a=e?[]:u;t:for(;++r<s;){var l=t[r],c=e?e(l):l;if(l=n||0!==l?l:0,o&&c==c){for(var f=a.length;f--;)if(a[f]===c)continue t;e&&a.push(c),u.push(l)}else i(a,c,n)||(a!==u&&a.push(c),u.push(l))}return u}function ci(t,e){return null==(t=Cs(t,e=vi(e,t)))||delete t[Fs(Js(e))]}function fi(t,e,n,r){return Qr(t,e,n(Er(t,e)),r)}function di(t,e,n,r){for(var i=t.length,s=r?i:-1;(r?s--:++s<i)&&e(t[s],s,t););return n?ri(t,r?0:s,r?s+1:i):ri(t,r?s+1:0,r?i:s)}function pi(t,e){var n=t;return n instanceof Bn&&(n=n.value()),ze(e,(function(t,e){return e.func.apply(e.thisArg,Le([t],e.args))}),n)}function mi(t,e,n){var r=t.length;if(r<2)return r?li(t[0]):[];for(var i=-1,s=ht(r);++i<r;)for(var o=t[i],u=-1;++u<r;)u!=i&&(s[i]=cr(s[i]||o,t[u],e,n));return li(yr(s,1),e,n)}function gi(e,n,r){for(var i=-1,s=e.length,o=n.length,u={};++i<s;){var a=i<o?n[i]:t;r(u,e[i],a)}return u}function yi(t){return Zo(t)?t:[]}function _i(t){return"function"==typeof t?t:oa}function vi(t,e){return Vo(t)?t:ws(t,e)?[t]:Ps(bu(t))}var wi=Zr;function bi(e,n,r){var i=e.length;return r=r===t?i:r,!n&&r>=i?e:ri(e,n,r)}var xi=he||function(t){return pe.clearTimeout(t)};function Ei(t,e){if(e)return t.slice();var n=t.length,r=qt?qt(n):new t.constructor(n);return t.copy(r),r}function Oi(t){var e=new t.constructor(t.byteLength);return new Wt(e).set(new Wt(t)),e}function Mi(t,e){var n=e?Oi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function ki(e,n){if(e!==n){var r=e!==t,i=null===e,s=e==e,o=cu(e),u=n!==t,a=null===n,h=n==n,l=cu(n);if(!a&&!l&&!o&&e>n||o&&u&&h&&!a&&!l||i&&u&&h||!r&&h||!s)return 1;if(!i&&!o&&!l&&e<n||l&&r&&s&&!i&&!o||a&&r&&s||!u&&s||!h)return-1}return 0}function Ci(t,e,n,r){for(var i=-1,s=t.length,o=n.length,u=-1,a=e.length,h=_n(s-o,0),l=ht(a+h),c=!r;++u<a;)l[u]=e[u];for(;++i<o;)(c||i<s)&&(l[n[i]]=t[i]);for(;h--;)l[u++]=t[i++];return l}function Ai(t,e,n,r){for(var i=-1,s=t.length,o=-1,u=n.length,a=-1,h=e.length,l=_n(s-u,0),c=ht(l+h),f=!r;++i<l;)c[i]=t[i];for(var d=i;++a<h;)c[d+a]=e[a];for(;++o<u;)(f||i<s)&&(c[d+n[o]]=t[i++]);return c}function Si(t,e){var n=-1,r=t.length;for(e||(e=ht(r));++n<r;)e[n]=t[n];return e}function Ni(e,n,r,i){var s=!r;r||(r={});for(var o=-1,u=n.length;++o<u;){var a=n[o],h=i?i(r[a],e[a],a,r,e):t;h===t&&(h=e[a]),s?sr(r,a,h):er(r,a,h)}return r}function ji(t,e){return function(n,r){var i=Vo(n)?Ce:rr,s=e?e():{};return i(n,t,as(r,2),s)}}function Ti(e){return Zr((function(n,r){var i=-1,s=r.length,o=s>1?r[s-1]:t,u=s>2?r[2]:t;for(o=e.length>3&&"function"==typeof o?(s--,o):t,u&&vs(r[0],r[1],u)&&(o=s<3?t:o,s=1),n=Ct(n);++i<s;){var a=r[i];a&&e(n,a,i,o)}return n}))}function Ii(t,e){return function(n,r){if(null==n)return n;if(!Uo(n))return t(n,r);for(var i=n.length,s=e?i:-1,o=Ct(n);(e?s--:++s<i)&&!1!==r(o[s],s,o););return n}}function Ri(t){return function(e,n,r){for(var i=-1,s=Ct(e),o=r(e),u=o.length;u--;){var a=o[t?u:++i];if(!1===n(s[a],a,s))break}return e}}function Li(e){return function(n){var r=un(n=bu(n))?dn(n):t,i=r?r[0]:n.charAt(0),s=r?bi(r,1).join(""):n.slice(1);return i[e]()+s}}function zi(t){return function(e){return ze(ta(qu(e).replace(Qt,"")),t,"")}}function Di(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=Yn(t.prototype),r=t.apply(n,e);return ru(r)?r:n}}function Pi(e){return function(n,r,i){var s=Ct(n);if(!Uo(n)){var o=as(r,3);n=Ru(n),r=function(t){return o(s[t],t,s)}}var u=e(n,r,i);return u>-1?s[o?n[u]:u]:t}}function Fi(n){return ns((function(r){var i=r.length,s=i,o=Gn.prototype.thru;for(n&&r.reverse();s--;){var u=r[s];if("function"!=typeof u)throw new Nt(e);if(o&&!a&&"wrapper"==os(u))var a=new Gn([],!0)}for(s=a?s:i;++s<i;){var h=os(u=r[s]),l="wrapper"==h?ss(u):t;a=l&&bs(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?a[os(l[0])].apply(a,l[3]):1==u.length&&bs(u)?a[h]():a.thru(u)}return function(){var t=arguments,e=t[0];if(a&&1==t.length&&Vo(e))return a.plant(e).value();for(var n=0,s=i?r[n].apply(this,t):e;++n<i;)s=r[n].call(this,s);return s}}))}function $i(e,n,r,i,s,o,a,h,l,c){var f=n&u,d=1&n,p=2&n,m=24&n,g=512&n,y=p?t:Di(e);return function u(){for(var _=arguments.length,v=ht(_),w=_;w--;)v[w]=arguments[w];if(m)var b=us(u),x=function(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}(v,b);if(i&&(v=Ci(v,i,s,m)),o&&(v=Ai(v,o,a,m)),_-=x,m&&_<c){var E=ln(v,b);return Vi(e,n,$i,u.placeholder,r,v,E,h,l,c-_)}var O=d?r:this,M=p?O[e]:e;return _=v.length,h?v=function(e,n){for(var r=e.length,i=vn(n.length,r),s=Si(e);i--;){var o=n[i];e[i]=_s(o,r)?s[o]:t}return e}(v,h):g&&_>1&&v.reverse(),f&&l<_&&(v.length=l),this&&this!==pe&&this instanceof u&&(M=y||Di(M)),M.apply(O,v)}}function Yi(t,e){return function(n,r){return function(t,e,n,r){return wr(t,(function(t,i,s){e(r,n(t),i,s)})),r}(n,t,e(r),{})}}function Xi(e,n){return function(r,i){var s;if(r===t&&i===t)return n;if(r!==t&&(s=r),i!==t){if(s===t)return i;"string"==typeof r||"string"==typeof i?(r=hi(r),i=hi(i)):(r=ai(r),i=ai(i)),s=e(r,i)}return s}}function Gi(t){return ns((function(e){return e=Re(e,Je(as())),Zr((function(n){var r=this;return t(e,(function(t){return ke(t,r,n)}))}))}))}function Bi(e,n){var r=(n=n===t?" ":hi(n)).length;if(r<2)return r?Ur(n,e):n;var i=Ur(n,me(e/fn(n)));return un(n)?bi(dn(i),0,e).join(""):i.slice(0,e)}function Wi(e){return function(n,r,i){return i&&"number"!=typeof i&&vs(n,r,i)&&(r=i=t),n=gu(n),r===t?(r=n,n=0):r=gu(r),function(t,e,n,r){for(var i=-1,s=_n(me((e-t)/(n||1)),0),o=ht(s);s--;)o[r?s:++i]=t,t+=n;return o}(n,r,i=i===t?n<r?1:-1:gu(i),e)}}function qi(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=vu(e),n=vu(n)),t(e,n)}}function Vi(e,n,r,i,u,a,h,l,c,f){var d=8&n;n|=d?s:o,4&(n&=~(d?o:s))||(n&=-4);var p=[e,n,u,d?a:t,d?h:t,d?t:a,d?t:h,l,c,f],m=r.apply(t,p);return bs(e)&&Ss(m,p),m.placeholder=i,Ts(m,e,n)}function Hi(t){var e=kt[t];return function(t,n){if(t=vu(t),(n=null==n?0:vn(yu(n),292))&&Fe(t)){var r=(bu(t)+"e").split("e");return+((r=(bu(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}}var Ui=Cn&&1/cn(new Cn([,-0]))[1]==h?function(t){return new Cn(t)}:ca;function Zi(t){return function(e){var n=ps(e);return n==b?an(e):n==k?function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=[t,t]})),n}(e):function(t,e){return Re(e,(function(e){return[e,t[e]]}))}(e,t(e))}}function Ki(n,h,l,c,f,d,p,m){var g=2&h;if(!g&&"function"!=typeof n)throw new Nt(e);var y=c?c.length:0;if(y||(h&=-97,c=f=t),p=p===t?p:_n(yu(p),0),m=m===t?m:yu(m),y-=f?f.length:0,h&o){var _=c,v=f;c=f=t}var w=g?t:ss(n),b=[n,h,l,c,f,_,v,d,p,m];if(w&&function(t,e){var n=t[1],i=e[1],s=n|i,o=s<131,h=i==u&&8==n||i==u&&n==a&&t[7].length<=e[8]||384==i&&e[7].length<=e[8]&&8==n;if(!o&&!h)return t;1&i&&(t[2]=e[2],s|=1&n?0:4);var l=e[3];if(l){var c=t[3];t[3]=c?Ci(c,l,e[4]):l,t[4]=c?ln(t[3],r):e[4]}(l=e[5])&&(c=t[5],t[5]=c?Ai(c,l,e[6]):l,t[6]=c?ln(t[5],r):e[6]),(l=e[7])&&(t[7]=l),i&u&&(t[8]=null==t[8]?e[8]:vn(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=s}(b,w),n=b[0],h=b[1],l=b[2],c=b[3],f=b[4],!(m=b[9]=b[9]===t?g?0:n.length:_n(b[9]-y,0))&&24&h&&(h&=-25),h&&1!=h)x=8==h||h==i?function(e,n,r){var i=Di(e);return function s(){for(var o=arguments.length,u=ht(o),a=o,h=us(s);a--;)u[a]=arguments[a];var l=o<3&&u[0]!==h&&u[o-1]!==h?[]:ln(u,h);return(o-=l.length)<r?Vi(e,n,$i,s.placeholder,t,u,l,t,t,r-o):ke(this&&this!==pe&&this instanceof s?i:e,this,u)}}(n,h,m):h!=s&&33!=h||f.length?$i.apply(t,b):function(t,e,n,r){var i=1&e,s=Di(t);return function e(){for(var o=-1,u=arguments.length,a=-1,h=r.length,l=ht(h+u),c=this&&this!==pe&&this instanceof e?s:t;++a<h;)l[a]=r[a];for(;u--;)l[a++]=arguments[++o];return ke(c,i?n:this,l)}}(n,h,l,c);else var x=function(t,e,n){var r=1&e,i=Di(t);return function e(){return(this&&this!==pe&&this instanceof e?i:t).apply(r?n:this,arguments)}}(n,h,l);return Ts((w?ti:Ss)(x,b),n,h)}function Ji(e,n,r,i){return e===t||Go(e,It[r])&&!zt.call(i,r)?n:e}function Qi(e,n,r,i,s,o){return ru(e)&&ru(n)&&(o.set(n,e),Xr(e,n,t,Qi,o),o.delete(n)),e}function ts(e){return uu(e)?t:e}function es(e,n,r,i,s,o){var u=1&r,a=e.length,h=n.length;if(a!=h&&!(u&&h>a))return!1;var l=o.get(e),c=o.get(n);if(l&&c)return l==n&&c==e;var f=-1,d=!0,p=2&r?new Hn:t;for(o.set(e,n),o.set(n,e);++f<a;){var m=e[f],g=n[f];if(i)var y=u?i(g,m,f,n,e,o):i(m,g,f,e,n,o);if(y!==t){if(y)continue;d=!1;break}if(p){if(!Pe(n,(function(t,e){if(!tn(p,e)&&(m===t||s(m,t,r,i,o)))return p.push(e)}))){d=!1;break}}else if(m!==g&&!s(m,g,r,i,o)){d=!1;break}}return o.delete(e),o.delete(n),d}function ns(e){return js(ks(e,t,Vs),e+"")}function rs(t){return Or(t,Ru,fs)}function is(t){return Or(t,Lu,ds)}var ss=Nn?function(t){return Nn.get(t)}:ca;function os(t){for(var e=t.name+"",n=jn[e],r=zt.call(jn,e)?n.length:0;r--;){var i=n[r],s=i.func;if(null==s||s==t)return i.name}return e}function us(t){return(zt.call($n,"placeholder")?$n:t).placeholder}function as(){var t=$n.iteratee||ua;return t=t===ua?Lr:t,arguments.length?t(arguments[0],arguments[1]):t}function hs(t,e){var n,r,i=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map}function ls(t){for(var e=Ru(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,Os(i)]}return e}function cs(e,n){var r=function(e,n){return null==e?t:e[n]}(e,n);return Rr(r)?r:t}var fs=_e?function(t){return null==t?[]:(t=Ct(t),je(_e(t),(function(e){return Ut.call(t,e)})))}:_a,ds=_e?function(t){for(var e=[];t;)Le(e,fs(t)),t=Vt(t);return e}:_a,ps=Mr;function ms(t,e,n){for(var r=-1,i=(e=vi(e,t)).length,s=!1;++r<i;){var o=Fs(e[r]);if(!(s=null!=t&&n(t,o)))break;t=t[o]}return s||++r!=i?s:!!(i=null==t?0:t.length)&&nu(i)&&_s(o,i)&&(Vo(t)||qo(t))}function gs(t){return"function"!=typeof t.constructor||Es(t)?{}:Yn(Vt(t))}function ys(t){return Vo(t)||qo(t)||!!(Kt&&t&&t[Kt])}function _s(t,e){var n=typeof t;return!!(e=null==e?l:e)&&("number"==n||"symbol"!=n&&vt.test(t))&&t>-1&&t%1==0&&t<e}function vs(t,e,n){if(!ru(n))return!1;var r=typeof e;return!!("number"==r?Uo(n)&&_s(e,n.length):"string"==r&&e in n)&&Go(n[e],t)}function ws(t,e){if(Vo(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!cu(t))||J.test(t)||!K.test(t)||null!=e&&t in Ct(e)}function bs(t){var e=os(t),n=$n[e];if("function"!=typeof n||!(e in Bn.prototype))return!1;if(t===n)return!0;var r=ss(n);return!!r&&t===r[0]}(On&&ps(new On(new ArrayBuffer(1)))!=j||Mn&&ps(new Mn)!=b||kn&&ps(kn.resolve())!=O||Cn&&ps(new Cn)!=k||An&&ps(new An)!=S)&&(ps=function(e){var n=Mr(e),r=n==E?e.constructor:t,i=r?$s(r):"";if(i)switch(i){case Tn:return j;case In:return b;case Rn:return O;case Ln:return k;case zn:return S}return n});var xs=Rt?tu:va;function Es(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||It)}function Os(t){return t==t&&!ru(t)}function Ms(e,n){return function(r){return null!=r&&r[e]===n&&(n!==t||e in Ct(r))}}function ks(e,n,r){return n=_n(n===t?e.length-1:n,0),function(){for(var t=arguments,i=-1,s=_n(t.length-n,0),o=ht(s);++i<s;)o[i]=t[n+i];i=-1;for(var u=ht(n+1);++i<n;)u[i]=t[i];return u[n]=r(o),ke(e,this,u)}}function Cs(t,e){return e.length<2?t:Er(t,ri(e,0,-1))}function As(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var Ss=Is(ti),Ns=de||function(t,e){return pe.setTimeout(t,e)},js=Is(ei);function Ts(t,e,n){var r=e+"";return js(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(it,"{\n/* [wrapped with "+e+"] */\n")}(r,function(t,e){return Ae(d,(function(n){var r="_."+n[0];e&n[1]&&!Te(t,r)&&t.push(r)})),t.sort()}(function(t){var e=t.match(st);return e?e[1].split(ot):[]}(r),n)))}function Is(e){var n=0,r=0;return function(){var i=wn(),s=16-(i-r);if(r=i,s>0){if(++n>=800)return arguments[0]}else n=0;return e.apply(t,arguments)}}function Rs(e,n){var r=-1,i=e.length,s=i-1;for(n=n===t?i:n;++r<n;){var o=Hr(r,s),u=e[o];e[o]=e[r],e[r]=u}return e.length=n,e}var Ls,zs,Ds,Ps=(Ls=function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Q,(function(t,n,r,i){e.push(r?i.replace(ft,"$1"):n||t)})),e},zs=Do(Ls,(function(t){return 500===Ds.size&&Ds.clear(),t})),Ds=zs.cache,zs);function Fs(t){if("string"==typeof t||cu(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function $s(t){if(null!=t){try{return Lt.call(t)}catch(e){}try{return t+""}catch(e){}}return""}function Ys(t){if(t instanceof Bn)return t.clone();var e=new Gn(t.__wrapped__,t.__chain__);return e.__actions__=Si(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var Xs=Zr((function(t,e){return Zo(t)?cr(t,yr(e,1,Zo,!0)):[]})),Gs=Zr((function(e,n){var r=Js(n);return Zo(r)&&(r=t),Zo(e)?cr(e,yr(n,1,Zo,!0),as(r,2)):[]})),Bs=Zr((function(e,n){var r=Js(n);return Zo(r)&&(r=t),Zo(e)?cr(e,yr(n,1,Zo,!0),t,r):[]}));function Ws(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:yu(n);return i<0&&(i=_n(r+i,0)),Ye(t,as(e,3),i)}function qs(e,n,r){var i=null==e?0:e.length;if(!i)return-1;var s=i-1;return r!==t&&(s=yu(r),s=r<0?_n(i+s,0):vn(s,i-1)),Ye(e,as(n,3),s,!0)}function Vs(t){return null!=t&&t.length?yr(t,1):[]}function Hs(e){return e&&e.length?e[0]:t}var Us=Zr((function(t){var e=Re(t,yi);return e.length&&e[0]===t[0]?Sr(e):[]})),Zs=Zr((function(e){var n=Js(e),r=Re(e,yi);return n===Js(r)?n=t:r.pop(),r.length&&r[0]===e[0]?Sr(r,as(n,2)):[]})),Ks=Zr((function(e){var n=Js(e),r=Re(e,yi);return(n="function"==typeof n?n:t)&&r.pop(),r.length&&r[0]===e[0]?Sr(r,t,n):[]}));function Js(e){var n=null==e?0:e.length;return n?e[n-1]:t}var Qs=Zr(to);function to(t,e){return t&&t.length&&e&&e.length?qr(t,e):t}var eo=ns((function(t,e){var n=null==t?0:t.length,r=or(t,e);return Vr(t,Re(e,(function(t){return _s(t,n)?+t:t})).sort(ki)),r}));function no(t){return null==t?t:En.call(t)}var ro=Zr((function(t){return li(yr(t,1,Zo,!0))})),io=Zr((function(e){var n=Js(e);return Zo(n)&&(n=t),li(yr(e,1,Zo,!0),as(n,2))})),so=Zr((function(e){var n=Js(e);return n="function"==typeof n?n:t,li(yr(e,1,Zo,!0),t,n)}));function oo(t){if(!t||!t.length)return[];var e=0;return t=je(t,(function(t){if(Zo(t))return e=_n(t.length,e),!0})),Ze(e,(function(e){return Re(t,qe(e))}))}function uo(e,n){if(!e||!e.length)return[];var r=oo(e);return null==n?r:Re(r,(function(e){return ke(n,t,e)}))}var ao=Zr((function(t,e){return Zo(t)?cr(t,e):[]})),ho=Zr((function(t){return mi(je(t,Zo))})),lo=Zr((function(e){var n=Js(e);return Zo(n)&&(n=t),mi(je(e,Zo),as(n,2))})),co=Zr((function(e){var n=Js(e);return n="function"==typeof n?n:t,mi(je(e,Zo),t,n)})),fo=Zr(oo),po=Zr((function(e){var n=e.length,r=n>1?e[n-1]:t;return r="function"==typeof r?(e.pop(),r):t,uo(e,r)}));function mo(t){var e=$n(t);return e.__chain__=!0,e}function go(t,e){return e(t)}var yo=ns((function(e){var n=e.length,r=n?e[0]:0,i=this.__wrapped__,s=function(t){return or(t,e)};return!(n>1||this.__actions__.length)&&i instanceof Bn&&_s(r)?((i=i.slice(r,+r+(n?1:0))).__actions__.push({func:go,args:[s],thisArg:t}),new Gn(i,this.__chain__).thru((function(e){return n&&!e.length&&e.push(t),e}))):this.thru(s)})),_o=ji((function(t,e,n){zt.call(t,n)?++t[n]:sr(t,n,1)})),vo=Pi(Ws),wo=Pi(qs);function bo(t,e){return(Vo(t)?Ae:fr)(t,as(e,3))}function xo(t,e){return(Vo(t)?Se:dr)(t,as(e,3))}var Eo=ji((function(t,e,n){zt.call(t,n)?t[n].push(e):sr(t,n,[e])})),Oo=Zr((function(t,e,n){var r=-1,i="function"==typeof e,s=Uo(t)?ht(t.length):[];return fr(t,(function(t){s[++r]=i?ke(e,t,n):Nr(t,e,n)})),s})),Mo=ji((function(t,e,n){sr(t,n,e)}));function ko(t,e){return(Vo(t)?Re:Fr)(t,as(e,3))}var Co=ji((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]})),Ao=Zr((function(t,e){if(null==t)return[];var n=e.length;return n>1&&vs(t,e[0],e[1])?e=[]:n>2&&vs(e[0],e[1],e[2])&&(e=[e[0]]),Br(t,yr(e,1),[])})),So=fe||function(){return pe.Date.now()};function No(e,n,r){return n=r?t:n,n=e&&null==n?e.length:n,Ki(e,u,t,t,t,t,n)}function jo(n,r){var i;if("function"!=typeof r)throw new Nt(e);return n=yu(n),function(){return--n>0&&(i=r.apply(this,arguments)),n<=1&&(r=t),i}}var To=Zr((function(t,e,n){var r=1;if(n.length){var i=ln(n,us(To));r|=s}return Ki(t,r,e,n,i)})),Io=Zr((function(t,e,n){var r=3;if(n.length){var i=ln(n,us(Io));r|=s}return Ki(e,r,t,n,i)}));function Ro(n,r,i){var s,o,u,a,h,l,c=0,f=!1,d=!1,p=!0;if("function"!=typeof n)throw new Nt(e);function m(e){var r=s,i=o;return s=o=t,c=e,a=n.apply(i,r)}function g(e){var n=e-l;return l===t||n>=r||n<0||d&&e-c>=u}function y(){var t=So();if(g(t))return _(t);h=Ns(y,function(t){var e=r-(t-l);return d?vn(e,u-(t-c)):e}(t))}function _(e){return h=t,p&&s?m(e):(s=o=t,a)}function v(){var e=So(),n=g(e);if(s=arguments,o=this,l=e,n){if(h===t)return function(t){return c=t,h=Ns(y,r),f?m(t):a}(l);if(d)return xi(h),h=Ns(y,r),m(l)}return h===t&&(h=Ns(y,r)),a}return r=vu(r)||0,ru(i)&&(f=!!i.leading,u=(d="maxWait"in i)?_n(vu(i.maxWait)||0,r):u,p="trailing"in i?!!i.trailing:p),v.cancel=function(){h!==t&&xi(h),c=0,s=l=o=h=t},v.flush=function(){return h===t?a:_(So())},v}var Lo=Zr((function(t,e){return lr(t,1,e)})),zo=Zr((function(t,e,n){return lr(t,vu(e)||0,n)}));function Do(t,n){if("function"!=typeof t||null!=n&&"function"!=typeof n)throw new Nt(e);var r=function(){var e=arguments,i=n?n.apply(this,e):e[0],s=r.cache;if(s.has(i))return s.get(i);var o=t.apply(this,e);return r.cache=s.set(i,o)||s,o};return r.cache=new(Do.Cache||Vn),r}function Po(t){if("function"!=typeof t)throw new Nt(e);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}Do.Cache=Vn;var Fo=wi((function(t,e){var n=(e=1==e.length&&Vo(e[0])?Re(e[0],Je(as())):Re(yr(e,1),Je(as()))).length;return Zr((function(r){for(var i=-1,s=vn(r.length,n);++i<s;)r[i]=e[i].call(this,r[i]);return ke(t,this,r)}))})),$o=Zr((function(e,n){var r=ln(n,us($o));return Ki(e,s,t,n,r)})),Yo=Zr((function(e,n){var r=ln(n,us(Yo));return Ki(e,o,t,n,r)})),Xo=ns((function(e,n){return Ki(e,a,t,t,t,n)}));function Go(t,e){return t===e||t!=t&&e!=e}var Bo=qi(kr),Wo=qi((function(t,e){return t>=e})),qo=jr(function(){return arguments}())?jr:function(t){return iu(t)&&zt.call(t,"callee")&&!Ut.call(t,"callee")},Vo=ht.isArray,Ho=we?Je(we):function(t){return iu(t)&&Mr(t)==N};function Uo(t){return null!=t&&nu(t.length)&&!tu(t)}function Zo(t){return iu(t)&&Uo(t)}var Ko=ve||va,Jo=be?Je(be):function(t){return iu(t)&&Mr(t)==y};function Qo(t){if(!iu(t))return!1;var e=Mr(t);return e==_||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!uu(t)}function tu(t){if(!ru(t))return!1;var e=Mr(t);return e==v||e==w||"[object AsyncFunction]"==e||"[object Proxy]"==e}function eu(t){return"number"==typeof t&&t==yu(t)}function nu(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=l}function ru(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function iu(t){return null!=t&&"object"==typeof t}var su=xe?Je(xe):function(t){return iu(t)&&ps(t)==b};function ou(t){return"number"==typeof t||iu(t)&&Mr(t)==x}function uu(t){if(!iu(t)||Mr(t)!=E)return!1;var e=Vt(t);if(null===e)return!0;var n=zt.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Lt.call(n)==$t}var au=Ee?Je(Ee):function(t){return iu(t)&&Mr(t)==M},hu=Oe?Je(Oe):function(t){return iu(t)&&ps(t)==k};function lu(t){return"string"==typeof t||!Vo(t)&&iu(t)&&Mr(t)==C}function cu(t){return"symbol"==typeof t||iu(t)&&Mr(t)==A}var fu=Me?Je(Me):function(t){return iu(t)&&nu(t.length)&&!!ue[Mr(t)]},du=qi(Pr),pu=qi((function(t,e){return t<=e}));function mu(t){if(!t)return[];if(Uo(t))return lu(t)?dn(t):Si(t);if(Jt&&t[Jt])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[Jt]());var e=ps(t);return(e==b?an:e==k?cn:Gu)(t)}function gu(t){return t?(t=vu(t))===h||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function yu(t){var e=gu(t),n=e%1;return e==e?n?e-n:e:0}function _u(t){return t?ur(yu(t),0,f):0}function vu(t){if("number"==typeof t)return t;if(cu(t))return c;if(ru(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=ru(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Ke(t);var n=gt.test(t);return n||_t.test(t)?ce(t.slice(2),n?2:8):mt.test(t)?c:+t}function wu(t){return Ni(t,Lu(t))}function bu(t){return null==t?"":hi(t)}var xu=Ti((function(t,e){if(Es(e)||Uo(e))Ni(e,Ru(e),t);else for(var n in e)zt.call(e,n)&&er(t,n,e[n])})),Eu=Ti((function(t,e){Ni(e,Lu(e),t)})),Ou=Ti((function(t,e,n,r){Ni(e,Lu(e),t,r)})),Mu=Ti((function(t,e,n,r){Ni(e,Ru(e),t,r)})),ku=ns(or),Cu=Zr((function(e,n){e=Ct(e);var r=-1,i=n.length,s=i>2?n[2]:t;for(s&&vs(n[0],n[1],s)&&(i=1);++r<i;)for(var o=n[r],u=Lu(o),a=-1,h=u.length;++a<h;){var l=u[a],c=e[l];(c===t||Go(c,It[l])&&!zt.call(e,l))&&(e[l]=o[l])}return e})),Au=Zr((function(e){return e.push(t,Qi),ke(Du,t,e)}));function Su(e,n,r){var i=null==e?t:Er(e,n);return i===t?r:i}function Nu(t,e){return null!=t&&ms(t,e,Ar)}var ju=Yi((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Ft.call(e)),t[e]=n}),ra(oa)),Tu=Yi((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Ft.call(e)),zt.call(t,e)?t[e].push(n):t[e]=[n]}),as),Iu=Zr(Nr);function Ru(t){return Uo(t)?Zn(t):zr(t)}function Lu(t){return Uo(t)?Zn(t,!0):Dr(t)}var zu=Ti((function(t,e,n){Xr(t,e,n)})),Du=Ti((function(t,e,n,r){Xr(t,e,n,r)})),Pu=ns((function(t,e){var n={};if(null==t)return n;var r=!1;e=Re(e,(function(e){return e=vi(e,t),r||(r=e.length>1),e})),Ni(t,is(t),n),r&&(n=ar(n,7,ts));for(var i=e.length;i--;)ci(n,e[i]);return n})),Fu=ns((function(t,e){return null==t?{}:function(t,e){return Wr(t,e,(function(e,n){return Nu(t,n)}))}(t,e)}));function $u(t,e){if(null==t)return{};var n=Re(is(t),(function(t){return[t]}));return e=as(e),Wr(t,n,(function(t,n){return e(t,n[0])}))}var Yu=Zi(Ru),Xu=Zi(Lu);function Gu(t){return null==t?[]:Qe(t,Ru(t))}var Bu=zi((function(t,e,n){return e=e.toLowerCase(),t+(n?Wu(e):e)}));function Wu(t){return Qu(bu(t).toLowerCase())}function qu(t){return(t=bu(t))&&t.replace(wt,rn).replace(te,"")}var Vu=zi((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),Hu=zi((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),Uu=Li("toLowerCase"),Zu=zi((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()})),Ku=zi((function(t,e,n){return t+(n?" ":"")+Qu(e)})),Ju=zi((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),Qu=Li("toUpperCase");function ta(e,n,r){return e=bu(e),(n=r?t:n)===t?function(t){return ie.test(t)}(e)?function(t){return t.match(ne)||[]}(e):function(t){return t.match(lt)||[]}(e):e.match(n)||[]}var ea=Zr((function(e,n){try{return ke(e,t,n)}catch(r){return Qo(r)?r:new Ot(r)}})),na=ns((function(t,e){return Ae(e,(function(e){e=Fs(e),sr(t,e,To(t[e],t))})),t}));function ra(t){return function(){return t}}var ia=Fi(),sa=Fi(!0);function oa(t){return t}function ua(t){return Lr("function"==typeof t?t:ar(t,1))}var aa=Zr((function(t,e){return function(n){return Nr(n,t,e)}})),ha=Zr((function(t,e){return function(n){return Nr(t,n,e)}}));function la(t,e,n){var r=Ru(e),i=xr(e,r);null!=n||ru(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=xr(e,Ru(e)));var s=!(ru(n)&&"chain"in n&&!n.chain),o=tu(t);return Ae(i,(function(n){var r=e[n];t[n]=r,o&&(t.prototype[n]=function(){var e=this.__chain__;if(s||e){var n=t(this.__wrapped__);return(n.__actions__=Si(this.__actions__)).push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,Le([this.value()],arguments))})})),t}function ca(){}var fa=Gi(Re),da=Gi(Ne),pa=Gi(Pe);function ma(t){return ws(t)?qe(Fs(t)):function(t){return function(e){return Er(e,t)}}(t)}var ga=Wi(),ya=Wi(!0);function _a(){return[]}function va(){return!1}var wa,ba=Xi((function(t,e){return t+e}),0),xa=Hi("ceil"),Ea=Xi((function(t,e){return t/e}),1),Oa=Hi("floor"),Ma=Xi((function(t,e){return t*e}),1),ka=Hi("round"),Ca=Xi((function(t,e){return t-e}),0);return $n.after=function(t,n){if("function"!=typeof n)throw new Nt(e);return t=yu(t),function(){if(--t<1)return n.apply(this,arguments)}},$n.ary=No,$n.assign=xu,$n.assignIn=Eu,$n.assignInWith=Ou,$n.assignWith=Mu,$n.at=ku,$n.before=jo,$n.bind=To,$n.bindAll=na,$n.bindKey=Io,$n.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Vo(t)?t:[t]},$n.chain=mo,$n.chunk=function(e,n,r){n=(r?vs(e,n,r):n===t)?1:_n(yu(n),0);var i=null==e?0:e.length;if(!i||n<1)return[];for(var s=0,o=0,u=ht(me(i/n));s<i;)u[o++]=ri(e,s,s+=n);return u},$n.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,i=[];++e<n;){var s=t[e];s&&(i[r++]=s)}return i},$n.concat=function(){var t=arguments.length;if(!t)return[];for(var e=ht(t-1),n=arguments[0],r=t;r--;)e[r-1]=arguments[r];return Le(Vo(n)?Si(n):[n],yr(e,1))},$n.cond=function(t){var n=null==t?0:t.length,r=as();return t=n?Re(t,(function(t){if("function"!=typeof t[1])throw new Nt(e);return[r(t[0]),t[1]]})):[],Zr((function(e){for(var r=-1;++r<n;){var i=t[r];if(ke(i[0],this,e))return ke(i[1],this,e)}}))},$n.conforms=function(t){return function(t){var e=Ru(t);return function(n){return hr(n,t,e)}}(ar(t,1))},$n.constant=ra,$n.countBy=_o,$n.create=function(t,e){var n=Yn(t);return null==e?n:ir(n,e)},$n.curry=function e(n,r,i){var s=Ki(n,8,t,t,t,t,t,r=i?t:r);return s.placeholder=e.placeholder,s},$n.curryRight=function e(n,r,s){var o=Ki(n,i,t,t,t,t,t,r=s?t:r);return o.placeholder=e.placeholder,o},$n.debounce=Ro,$n.defaults=Cu,$n.defaultsDeep=Au,$n.defer=Lo,$n.delay=zo,$n.difference=Xs,$n.differenceBy=Gs,$n.differenceWith=Bs,$n.drop=function(e,n,r){var i=null==e?0:e.length;return i?ri(e,(n=r||n===t?1:yu(n))<0?0:n,i):[]},$n.dropRight=function(e,n,r){var i=null==e?0:e.length;return i?ri(e,0,(n=i-(n=r||n===t?1:yu(n)))<0?0:n):[]},$n.dropRightWhile=function(t,e){return t&&t.length?di(t,as(e,3),!0,!0):[]},$n.dropWhile=function(t,e){return t&&t.length?di(t,as(e,3),!0):[]},$n.fill=function(e,n,r,i){var s=null==e?0:e.length;return s?(r&&"number"!=typeof r&&vs(e,n,r)&&(r=0,i=s),function(e,n,r,i){var s=e.length;for((r=yu(r))<0&&(r=-r>s?0:s+r),(i=i===t||i>s?s:yu(i))<0&&(i+=s),i=r>i?0:_u(i);r<i;)e[r++]=n;return e}(e,n,r,i)):[]},$n.filter=function(t,e){return(Vo(t)?je:gr)(t,as(e,3))},$n.flatMap=function(t,e){return yr(ko(t,e),1)},$n.flatMapDeep=function(t,e){return yr(ko(t,e),h)},$n.flatMapDepth=function(e,n,r){return r=r===t?1:yu(r),yr(ko(e,n),r)},$n.flatten=Vs,$n.flattenDeep=function(t){return null!=t&&t.length?yr(t,h):[]},$n.flattenDepth=function(e,n){return null!=e&&e.length?yr(e,n=n===t?1:yu(n)):[]},$n.flip=function(t){return Ki(t,512)},$n.flow=ia,$n.flowRight=sa,$n.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var i=t[e];r[i[0]]=i[1]}return r},$n.functions=function(t){return null==t?[]:xr(t,Ru(t))},$n.functionsIn=function(t){return null==t?[]:xr(t,Lu(t))},$n.groupBy=Eo,$n.initial=function(t){return null!=t&&t.length?ri(t,0,-1):[]},$n.intersection=Us,$n.intersectionBy=Zs,$n.intersectionWith=Ks,$n.invert=ju,$n.invertBy=Tu,$n.invokeMap=Oo,$n.iteratee=ua,$n.keyBy=Mo,$n.keys=Ru,$n.keysIn=Lu,$n.map=ko,$n.mapKeys=function(t,e){var n={};return e=as(e,3),wr(t,(function(t,r,i){sr(n,e(t,r,i),t)})),n},$n.mapValues=function(t,e){var n={};return e=as(e,3),wr(t,(function(t,r,i){sr(n,r,e(t,r,i))})),n},$n.matches=function(t){return $r(ar(t,1))},$n.matchesProperty=function(t,e){return Yr(t,ar(e,1))},$n.memoize=Do,$n.merge=zu,$n.mergeWith=Du,$n.method=aa,$n.methodOf=ha,$n.mixin=la,$n.negate=Po,$n.nthArg=function(t){return t=yu(t),Zr((function(e){return Gr(e,t)}))},$n.omit=Pu,$n.omitBy=function(t,e){return $u(t,Po(as(e)))},$n.once=function(t){return jo(2,t)},$n.orderBy=function(e,n,r,i){return null==e?[]:(Vo(n)||(n=null==n?[]:[n]),Vo(r=i?t:r)||(r=null==r?[]:[r]),Br(e,n,r))},$n.over=fa,$n.overArgs=Fo,$n.overEvery=da,$n.overSome=pa,$n.partial=$o,$n.partialRight=Yo,$n.partition=Co,$n.pick=Fu,$n.pickBy=$u,$n.property=ma,$n.propertyOf=function(e){return function(n){return null==e?t:Er(e,n)}},$n.pull=Qs,$n.pullAll=to,$n.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?qr(t,e,as(n,2)):t},$n.pullAllWith=function(e,n,r){return e&&e.length&&n&&n.length?qr(e,n,t,r):e},$n.pullAt=eo,$n.range=ga,$n.rangeRight=ya,$n.rearg=Xo,$n.reject=function(t,e){return(Vo(t)?je:gr)(t,Po(as(e,3)))},$n.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,i=[],s=t.length;for(e=as(e,3);++r<s;){var o=t[r];e(o,r,t)&&(n.push(o),i.push(r))}return Vr(t,i),n},$n.rest=function(n,r){if("function"!=typeof n)throw new Nt(e);return Zr(n,r=r===t?r:yu(r))},$n.reverse=no,$n.sampleSize=function(e,n,r){return n=(r?vs(e,n,r):n===t)?1:yu(n),(Vo(e)?Jn:Jr)(e,n)},$n.set=function(t,e,n){return null==t?t:Qr(t,e,n)},$n.setWith=function(e,n,r,i){return i="function"==typeof i?i:t,null==e?e:Qr(e,n,r,i)},$n.shuffle=function(t){return(Vo(t)?Qn:ni)(t)},$n.slice=function(e,n,r){var i=null==e?0:e.length;return i?(r&&"number"!=typeof r&&vs(e,n,r)?(n=0,r=i):(n=null==n?0:yu(n),r=r===t?i:yu(r)),ri(e,n,r)):[]},$n.sortBy=Ao,$n.sortedUniq=function(t){return t&&t.length?ui(t):[]},$n.sortedUniqBy=function(t,e){return t&&t.length?ui(t,as(e,2)):[]},$n.split=function(e,n,r){return r&&"number"!=typeof r&&vs(e,n,r)&&(n=r=t),(r=r===t?f:r>>>0)?(e=bu(e))&&("string"==typeof n||null!=n&&!au(n))&&!(n=hi(n))&&un(e)?bi(dn(e),0,r):e.split(n,r):[]},$n.spread=function(t,n){if("function"!=typeof t)throw new Nt(e);return n=null==n?0:_n(yu(n),0),Zr((function(e){var r=e[n],i=bi(e,0,n);return r&&Le(i,r),ke(t,this,i)}))},$n.tail=function(t){var e=null==t?0:t.length;return e?ri(t,1,e):[]},$n.take=function(e,n,r){return e&&e.length?ri(e,0,(n=r||n===t?1:yu(n))<0?0:n):[]},$n.takeRight=function(e,n,r){var i=null==e?0:e.length;return i?ri(e,(n=i-(n=r||n===t?1:yu(n)))<0?0:n,i):[]},$n.takeRightWhile=function(t,e){return t&&t.length?di(t,as(e,3),!1,!0):[]},$n.takeWhile=function(t,e){return t&&t.length?di(t,as(e,3)):[]},$n.tap=function(t,e){return e(t),t},$n.throttle=function(t,n,r){var i=!0,s=!0;if("function"!=typeof t)throw new Nt(e);return ru(r)&&(i="leading"in r?!!r.leading:i,s="trailing"in r?!!r.trailing:s),Ro(t,n,{leading:i,maxWait:n,trailing:s})},$n.thru=go,$n.toArray=mu,$n.toPairs=Yu,$n.toPairsIn=Xu,$n.toPath=function(t){return Vo(t)?Re(t,Fs):cu(t)?[t]:Si(Ps(bu(t)))},$n.toPlainObject=wu,$n.transform=function(t,e,n){var r=Vo(t),i=r||Ko(t)||fu(t);if(e=as(e,4),null==n){var s=t&&t.constructor;n=i?r?new s:[]:ru(t)&&tu(s)?Yn(Vt(t)):{}}return(i?Ae:wr)(t,(function(t,r,i){return e(n,t,r,i)})),n},$n.unary=function(t){return No(t,1)},$n.union=ro,$n.unionBy=io,$n.unionWith=so,$n.uniq=function(t){return t&&t.length?li(t):[]},$n.uniqBy=function(t,e){return t&&t.length?li(t,as(e,2)):[]},$n.uniqWith=function(e,n){return n="function"==typeof n?n:t,e&&e.length?li(e,t,n):[]},$n.unset=function(t,e){return null==t||ci(t,e)},$n.unzip=oo,$n.unzipWith=uo,$n.update=function(t,e,n){return null==t?t:fi(t,e,_i(n))},$n.updateWith=function(e,n,r,i){return i="function"==typeof i?i:t,null==e?e:fi(e,n,_i(r),i)},$n.values=Gu,$n.valuesIn=function(t){return null==t?[]:Qe(t,Lu(t))},$n.without=ao,$n.words=ta,$n.wrap=function(t,e){return $o(_i(e),t)},$n.xor=ho,$n.xorBy=lo,$n.xorWith=co,$n.zip=fo,$n.zipObject=function(t,e){return gi(t||[],e||[],er)},$n.zipObjectDeep=function(t,e){return gi(t||[],e||[],Qr)},$n.zipWith=po,$n.entries=Yu,$n.entriesIn=Xu,$n.extend=Eu,$n.extendWith=Ou,la($n,$n),$n.add=ba,$n.attempt=ea,$n.camelCase=Bu,$n.capitalize=Wu,$n.ceil=xa,$n.clamp=function(e,n,r){return r===t&&(r=n,n=t),r!==t&&(r=(r=vu(r))==r?r:0),n!==t&&(n=(n=vu(n))==n?n:0),ur(vu(e),n,r)},$n.clone=function(t){return ar(t,4)},$n.cloneDeep=function(t){return ar(t,5)},$n.cloneDeepWith=function(e,n){return ar(e,5,n="function"==typeof n?n:t)},$n.cloneWith=function(e,n){return ar(e,4,n="function"==typeof n?n:t)},$n.conformsTo=function(t,e){return null==e||hr(t,e,Ru(e))},$n.deburr=qu,$n.defaultTo=function(t,e){return null==t||t!=t?e:t},$n.divide=Ea,$n.endsWith=function(e,n,r){e=bu(e),n=hi(n);var i=e.length,s=r=r===t?i:ur(yu(r),0,i);return(r-=n.length)>=0&&e.slice(r,s)==n},$n.eq=Go,$n.escape=function(t){return(t=bu(t))&&V.test(t)?t.replace(W,sn):t},$n.escapeRegExp=function(t){return(t=bu(t))&&et.test(t)?t.replace(tt,"\\$&"):t},$n.every=function(e,n,r){var i=Vo(e)?Ne:pr;return r&&vs(e,n,r)&&(n=t),i(e,as(n,3))},$n.find=vo,$n.findIndex=Ws,$n.findKey=function(t,e){return $e(t,as(e,3),wr)},$n.findLast=wo,$n.findLastIndex=qs,$n.findLastKey=function(t,e){return $e(t,as(e,3),br)},$n.floor=Oa,$n.forEach=bo,$n.forEachRight=xo,$n.forIn=function(t,e){return null==t?t:_r(t,as(e,3),Lu)},$n.forInRight=function(t,e){return null==t?t:vr(t,as(e,3),Lu)},$n.forOwn=function(t,e){return t&&wr(t,as(e,3))},$n.forOwnRight=function(t,e){return t&&br(t,as(e,3))},$n.get=Su,$n.gt=Bo,$n.gte=Wo,$n.has=function(t,e){return null!=t&&ms(t,e,Cr)},$n.hasIn=Nu,$n.head=Hs,$n.identity=oa,$n.includes=function(t,e,n,r){t=Uo(t)?t:Gu(t),n=n&&!r?yu(n):0;var i=t.length;return n<0&&(n=_n(i+n,0)),lu(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&Xe(t,e,n)>-1},$n.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:yu(n);return i<0&&(i=_n(r+i,0)),Xe(t,e,i)},$n.inRange=function(e,n,r){return n=gu(n),r===t?(r=n,n=0):r=gu(r),function(t,e,n){return t>=vn(e,n)&&t<_n(e,n)}(e=vu(e),n,r)},$n.invoke=Iu,$n.isArguments=qo,$n.isArray=Vo,$n.isArrayBuffer=Ho,$n.isArrayLike=Uo,$n.isArrayLikeObject=Zo,$n.isBoolean=function(t){return!0===t||!1===t||iu(t)&&Mr(t)==g},$n.isBuffer=Ko,$n.isDate=Jo,$n.isElement=function(t){return iu(t)&&1===t.nodeType&&!uu(t)},$n.isEmpty=function(t){if(null==t)return!0;if(Uo(t)&&(Vo(t)||"string"==typeof t||"function"==typeof t.splice||Ko(t)||fu(t)||qo(t)))return!t.length;var e=ps(t);if(e==b||e==k)return!t.size;if(Es(t))return!zr(t).length;for(var n in t)if(zt.call(t,n))return!1;return!0},$n.isEqual=function(t,e){return Tr(t,e)},$n.isEqualWith=function(e,n,r){var i=(r="function"==typeof r?r:t)?r(e,n):t;return i===t?Tr(e,n,t,r):!!i},$n.isError=Qo,$n.isFinite=function(t){return"number"==typeof t&&Fe(t)},$n.isFunction=tu,$n.isInteger=eu,$n.isLength=nu,$n.isMap=su,$n.isMatch=function(t,e){return t===e||Ir(t,e,ls(e))},$n.isMatchWith=function(e,n,r){return r="function"==typeof r?r:t,Ir(e,n,ls(n),r)},$n.isNaN=function(t){return ou(t)&&t!=+t},$n.isNative=function(t){if(xs(t))throw new Ot("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Rr(t)},$n.isNil=function(t){return null==t},$n.isNull=function(t){return null===t},$n.isNumber=ou,$n.isObject=ru,$n.isObjectLike=iu,$n.isPlainObject=uu,$n.isRegExp=au,$n.isSafeInteger=function(t){return eu(t)&&t>=-9007199254740991&&t<=l},$n.isSet=hu,$n.isString=lu,$n.isSymbol=cu,$n.isTypedArray=fu,$n.isUndefined=function(e){return e===t},$n.isWeakMap=function(t){return iu(t)&&ps(t)==S},$n.isWeakSet=function(t){return iu(t)&&"[object WeakSet]"==Mr(t)},$n.join=function(t,e){return null==t?"":Ve.call(t,e)},$n.kebabCase=Vu,$n.last=Js,$n.lastIndexOf=function(e,n,r){var i=null==e?0:e.length;if(!i)return-1;var s=i;return r!==t&&(s=(s=yu(r))<0?_n(i+s,0):vn(s,i-1)),n==n?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(e,n,s):Ye(e,Be,s,!0)},$n.lowerCase=Hu,$n.lowerFirst=Uu,$n.lt=du,$n.lte=pu,$n.max=function(e){return e&&e.length?mr(e,oa,kr):t},$n.maxBy=function(e,n){return e&&e.length?mr(e,as(n,2),kr):t},$n.mean=function(t){return We(t,oa)},$n.meanBy=function(t,e){return We(t,as(e,2))},$n.min=function(e){return e&&e.length?mr(e,oa,Pr):t},$n.minBy=function(e,n){return e&&e.length?mr(e,as(n,2),Pr):t},$n.stubArray=_a,$n.stubFalse=va,$n.stubObject=function(){return{}},$n.stubString=function(){return""},$n.stubTrue=function(){return!0},$n.multiply=Ma,$n.nth=function(e,n){return e&&e.length?Gr(e,yu(n)):t},$n.noConflict=function(){return pe._===this&&(pe._=Yt),this},$n.noop=ca,$n.now=So,$n.pad=function(t,e,n){t=bu(t);var r=(e=yu(e))?fn(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return Bi(ge(i),n)+t+Bi(me(i),n)},$n.padEnd=function(t,e,n){t=bu(t);var r=(e=yu(e))?fn(t):0;return e&&r<e?t+Bi(e-r,n):t},$n.padStart=function(t,e,n){t=bu(t);var r=(e=yu(e))?fn(t):0;return e&&r<e?Bi(e-r,n)+t:t},$n.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),bn(bu(t).replace(nt,""),e||0)},$n.random=function(e,n,r){if(r&&"boolean"!=typeof r&&vs(e,n,r)&&(n=r=t),r===t&&("boolean"==typeof n?(r=n,n=t):"boolean"==typeof e&&(r=e,e=t)),e===t&&n===t?(e=0,n=1):(e=gu(e),n===t?(n=e,e=0):n=gu(n)),e>n){var i=e;e=n,n=i}if(r||e%1||n%1){var s=xn();return vn(e+s*(n-e+le("1e-"+((s+"").length-1))),n)}return Hr(e,n)},$n.reduce=function(t,e,n){var r=Vo(t)?ze:He,i=arguments.length<3;return r(t,as(e,4),n,i,fr)},$n.reduceRight=function(t,e,n){var r=Vo(t)?De:He,i=arguments.length<3;return r(t,as(e,4),n,i,dr)},$n.repeat=function(e,n,r){return n=(r?vs(e,n,r):n===t)?1:yu(n),Ur(bu(e),n)},$n.replace=function(){var t=arguments,e=bu(t[0]);return t.length<3?e:e.replace(t[1],t[2])},$n.result=function(e,n,r){var i=-1,s=(n=vi(n,e)).length;for(s||(s=1,e=t);++i<s;){var o=null==e?t:e[Fs(n[i])];o===t&&(i=s,o=r),e=tu(o)?o.call(e):o}return e},$n.round=ka,$n.runInContext=rt,$n.sample=function(t){return(Vo(t)?Kn:Kr)(t)},$n.size=function(t){if(null==t)return 0;if(Uo(t))return lu(t)?fn(t):t.length;var e=ps(t);return e==b||e==k?t.size:zr(t).length},$n.snakeCase=Zu,$n.some=function(e,n,r){var i=Vo(e)?Pe:ii;return r&&vs(e,n,r)&&(n=t),i(e,as(n,3))},$n.sortedIndex=function(t,e){return si(t,e)},$n.sortedIndexBy=function(t,e,n){return oi(t,e,as(n,2))},$n.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=si(t,e);if(r<n&&Go(t[r],e))return r}return-1},$n.sortedLastIndex=function(t,e){return si(t,e,!0)},$n.sortedLastIndexBy=function(t,e,n){return oi(t,e,as(n,2),!0)},$n.sortedLastIndexOf=function(t,e){if(null!=t&&t.length){var n=si(t,e,!0)-1;if(Go(t[n],e))return n}return-1},$n.startCase=Ku,$n.startsWith=function(t,e,n){return t=bu(t),n=null==n?0:ur(yu(n),0,t.length),e=hi(e),t.slice(n,n+e.length)==e},$n.subtract=Ca,$n.sum=function(t){return t&&t.length?Ue(t,oa):0},$n.sumBy=function(t,e){return t&&t.length?Ue(t,as(e,2)):0},$n.template=function(e,n,r){var i=$n.templateSettings;r&&vs(e,n,r)&&(n=t),e=bu(e),n=Ou({},n,i,Ji);var s,o,u=Ou({},n.imports,i.imports,Ji),a=Ru(u),h=Qe(u,a),l=0,c=n.interpolate||bt,f="__p += '",d=At((n.escape||bt).source+"|"+c.source+"|"+(c===Z?dt:bt).source+"|"+(n.evaluate||bt).source+"|$","g"),p="//# sourceURL="+(zt.call(n,"sourceURL")?(n.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++oe+"]")+"\n";e.replace(d,(function(t,n,r,i,u,a){return r||(r=i),f+=e.slice(l,a).replace(xt,on),n&&(s=!0,f+="' +\n__e("+n+") +\n'"),u&&(o=!0,f+="';\n"+u+";\n__p += '"),r&&(f+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=a+t.length,t})),f+="';\n";var m=zt.call(n,"variable")&&n.variable;if(m){if(ct.test(m))throw new Ot("Invalid `variable` option passed into `_.template`")}else f="with (obj) {\n"+f+"\n}\n";f=(o?f.replace(Y,""):f).replace(X,"$1").replace(G,"$1;"),f="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(s?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var g=ea((function(){return Mt(a,p+"return "+f).apply(t,h)}));if(g.source=f,Qo(g))throw g;return g},$n.times=function(t,e){if((t=yu(t))<1||t>l)return[];var n=f,r=vn(t,f);e=as(e),t-=f;for(var i=Ze(r,e);++n<t;)e(n);return i},$n.toFinite=gu,$n.toInteger=yu,$n.toLength=_u,$n.toLower=function(t){return bu(t).toLowerCase()},$n.toNumber=vu,$n.toSafeInteger=function(t){return t?ur(yu(t),-9007199254740991,l):0===t?t:0},$n.toString=bu,$n.toUpper=function(t){return bu(t).toUpperCase()},$n.trim=function(e,n,r){if((e=bu(e))&&(r||n===t))return Ke(e);if(!e||!(n=hi(n)))return e;var i=dn(e),s=dn(n);return bi(i,en(i,s),nn(i,s)+1).join("")},$n.trimEnd=function(e,n,r){if((e=bu(e))&&(r||n===t))return e.slice(0,pn(e)+1);if(!e||!(n=hi(n)))return e;var i=dn(e);return bi(i,0,nn(i,dn(n))+1).join("")},$n.trimStart=function(e,n,r){if((e=bu(e))&&(r||n===t))return e.replace(nt,"");if(!e||!(n=hi(n)))return e;var i=dn(e);return bi(i,en(i,dn(n))).join("")},$n.truncate=function(e,n){var r=30,i="...";if(ru(n)){var s="separator"in n?n.separator:s;r="length"in n?yu(n.length):r,i="omission"in n?hi(n.omission):i}var o=(e=bu(e)).length;if(un(e)){var u=dn(e);o=u.length}if(r>=o)return e;var a=r-fn(i);if(a<1)return i;var h=u?bi(u,0,a).join(""):e.slice(0,a);if(s===t)return h+i;if(u&&(a+=h.length-a),au(s)){if(e.slice(a).search(s)){var l,c=h;for(s.global||(s=At(s.source,bu(pt.exec(s))+"g")),s.lastIndex=0;l=s.exec(c);)var f=l.index;h=h.slice(0,f===t?a:f)}}else if(e.indexOf(hi(s),a)!=a){var d=h.lastIndexOf(s);d>-1&&(h=h.slice(0,d))}return h+i},$n.unescape=function(t){return(t=bu(t))&&q.test(t)?t.replace(B,mn):t},$n.uniqueId=function(t){var e=++Dt;return bu(t)+e},$n.upperCase=Ju,$n.upperFirst=Qu,$n.each=bo,$n.eachRight=xo,$n.first=Hs,la($n,(wa={},wr($n,(function(t,e){zt.call($n.prototype,e)||(wa[e]=t)})),wa),{chain:!1}),$n.VERSION="4.17.21",Ae(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){$n[t].placeholder=$n})),Ae(["drop","take"],(function(e,n){Bn.prototype[e]=function(r){r=r===t?1:_n(yu(r),0);var i=this.__filtered__&&!n?new Bn(this):this.clone();return i.__filtered__?i.__takeCount__=vn(r,i.__takeCount__):i.__views__.push({size:vn(r,f),type:e+(i.__dir__<0?"Right":"")}),i},Bn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),Ae(["filter","map","takeWhile"],(function(t,e){var n=e+1,r=1==n||3==n;Bn.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:as(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}})),Ae(["head","last"],(function(t,e){var n="take"+(e?"Right":"");Bn.prototype[t]=function(){return this[n](1).value()[0]}})),Ae(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");Bn.prototype[t]=function(){return this.__filtered__?new Bn(this):this[n](1)}})),Bn.prototype.compact=function(){return this.filter(oa)},Bn.prototype.find=function(t){return this.filter(t).head()},Bn.prototype.findLast=function(t){return this.reverse().find(t)},Bn.prototype.invokeMap=Zr((function(t,e){return"function"==typeof t?new Bn(this):this.map((function(n){return Nr(n,t,e)}))})),Bn.prototype.reject=function(t){return this.filter(Po(as(t)))},Bn.prototype.slice=function(e,n){e=yu(e);var r=this;return r.__filtered__&&(e>0||n<0)?new Bn(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),n!==t&&(r=(n=yu(n))<0?r.dropRight(-n):r.take(n-e)),r)},Bn.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Bn.prototype.toArray=function(){return this.take(f)},wr(Bn.prototype,(function(e,n){var r=/^(?:filter|find|map|reject)|While$/.test(n),i=/^(?:head|last)$/.test(n),s=$n[i?"take"+("last"==n?"Right":""):n],o=i||/^find/.test(n);s&&($n.prototype[n]=function(){var n=this.__wrapped__,u=i?[1]:arguments,a=n instanceof Bn,h=u[0],l=a||Vo(n),c=function(t){var e=s.apply($n,Le([t],u));return i&&f?e[0]:e};l&&r&&"function"==typeof h&&1!=h.length&&(a=l=!1);var f=this.__chain__,d=!!this.__actions__.length,p=o&&!f,m=a&&!d;if(!o&&l){n=m?n:new Bn(this);var g=e.apply(n,u);return g.__actions__.push({func:go,args:[c],thisArg:t}),new Gn(g,f)}return p&&m?e.apply(this,u):(g=this.thru(c),p?i?g.value()[0]:g.value():g)})})),Ae(["pop","push","shift","sort","splice","unshift"],(function(t){var e=jt[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);$n.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return e.apply(Vo(i)?i:[],t)}return this[n]((function(n){return e.apply(Vo(n)?n:[],t)}))}})),wr(Bn.prototype,(function(t,e){var n=$n[e];if(n){var r=n.name+"";zt.call(jn,r)||(jn[r]=[]),jn[r].push({name:e,func:n})}})),jn[$i(t,2).name]=[{name:"wrapper",func:t}],Bn.prototype.clone=function(){var t=new Bn(this.__wrapped__);return t.__actions__=Si(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Si(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Si(this.__views__),t},Bn.prototype.reverse=function(){if(this.__filtered__){var t=new Bn(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Bn.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=Vo(t),r=e<0,i=n?t.length:0,s=function(t,e,n){for(var r=-1,i=n.length;++r<i;){var s=n[r],o=s.size;switch(s.type){case"drop":t+=o;break;case"dropRight":e-=o;break;case"take":e=vn(e,t+o);break;case"takeRight":t=_n(t,e-o)}}return{start:t,end:e}}(0,i,this.__views__),o=s.start,u=s.end,a=u-o,h=r?u:o-1,l=this.__iteratees__,c=l.length,f=0,d=vn(a,this.__takeCount__);if(!n||!r&&i==a&&d==a)return pi(t,this.__actions__);var p=[];t:for(;a--&&f<d;){for(var m=-1,g=t[h+=e];++m<c;){var y=l[m],_=y.iteratee,v=y.type,w=_(g);if(2==v)g=w;else if(!w){if(1==v)continue t;break t}}p[f++]=g}return p},$n.prototype.at=yo,$n.prototype.chain=function(){return mo(this)},$n.prototype.commit=function(){return new Gn(this.value(),this.__chain__)},$n.prototype.next=function(){this.__values__===t&&(this.__values__=mu(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?t:this.__values__[this.__index__++]}},$n.prototype.plant=function(e){for(var n,r=this;r instanceof Xn;){var i=Ys(r);i.__index__=0,i.__values__=t,n?s.__wrapped__=i:n=i;var s=i;r=r.__wrapped__}return s.__wrapped__=e,n},$n.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Bn){var n=e;return this.__actions__.length&&(n=new Bn(this)),(n=n.reverse()).__actions__.push({func:go,args:[no],thisArg:t}),new Gn(n,this.__chain__)}return this.thru(no)},$n.prototype.toJSON=$n.prototype.valueOf=$n.prototype.value=function(){return pi(this.__wrapped__,this.__actions__)},$n.prototype.first=$n.prototype.head,Jt&&($n.prototype[Jt]=function(){return this}),$n}();ge?((ge.exports=gn)._=gn,me._=gn):pe._=gn}.call(ht);const ct={},ft=[];function dt(t,e){if(Array.isArray(t))for(const n of t)dt(n,e);else if("object"!=typeof t)mt(Object.getOwnPropertyNames(e)),ct[t]=Object.assign(ct[t]||{},e);else for(const n in t)dt(n,t[n])}function pt(t){return ct[t]||{}}function mt(t){ft.push(...t)}function gt(t,e){let n;const r=t.length,i=[];for(n=0;n<r;n++)i.push(e(t[n]));return i}function yt(t){return t%360*Math.PI/180}function _t(t){return t.charAt(0).toUpperCase()+t.slice(1)}function vt(t,e,n,r){return null!=e&&null!=n||(r=r||t.bbox(),null==e?e=r.width/r.height*n:null==n&&(n=r.height/r.width*e)),{width:e,height:n}}function wt(t,e){const n=t.origin;let r=null!=t.ox?t.ox:null!=t.originX?t.originX:"center",i=null!=t.oy?t.oy:null!=t.originY?t.originY:"center";null!=n&&([r,i]=Array.isArray(n)?n:"object"==typeof n?[n.x,n.y]:[n,n]);const s="string"==typeof r,o="string"==typeof i;if(s||o){const{height:t,width:n,x:u,y:a}=e.bbox();s&&(r=r.includes("left")?u:r.includes("right")?u+n:u+n/2),o&&(i=i.includes("top")?a:i.includes("bottom")?a+t:a+t/2)}return[r,i]}const bt=new Set(["desc","metadata","title"]),xt=t=>bt.has(t.nodeName),Et=(t,e,n={})=>{const r={...e};for(const i in r)r[i].valueOf()===n[i]&&delete r[i];Object.keys(r).length?t.node.setAttribute("data-svgjs",JSON.stringify(r)):(t.node.removeAttribute("data-svgjs"),t.node.removeAttribute("svgjs:data"))},Ot="http://www.w3.org/2000/svg",Mt="http://www.w3.org/2000/xmlns/",kt="http://www.w3.org/1999/xlink",Ct={window:"undefined"==typeof window?null:window,document:"undefined"==typeof document?null:document};let At=class{};const St={},Nt="___SYMBOL___ROOT___";function jt(t,e=Ot){return Ct.document.createElementNS(e,t)}function Tt(t,e=!1){if(t instanceof At)return t;if("object"==typeof t)return Lt(t);if(null==t)return new St[Nt];if("string"==typeof t&&"<"!==t.charAt(0))return Lt(Ct.document.querySelector(t));const n=e?Ct.document.createElement("div"):jt("svg");return n.innerHTML=t,t=Lt(n.firstChild),n.removeChild(n.firstChild),t}function It(t,e){return e&&(e instanceof Ct.window.Node||e.ownerDocument&&e instanceof e.ownerDocument.defaultView.Node)?e:jt(t)}function Rt(t){if(!t)return null;if(t.instance instanceof At)return t.instance;if("#document-fragment"===t.nodeName)return new St.Fragment(t);let e=_t(t.nodeName||"Dom");return"LinearGradient"===e||"RadialGradient"===e?e="Gradient":St[e]||(e="Dom"),new St[e](t)}let Lt=Rt;function zt(t,e=t.name,n=!1){return St[e]=t,n&&(St[Nt]=t),mt(Object.getOwnPropertyNames(t.prototype)),t}let Dt=1e3;function Pt(t){return"Svgjs"+_t(t)+Dt++}function Ft(t){for(let e=t.children.length-1;e>=0;e--)Ft(t.children[e]);return t.id?(t.id=Pt(t.nodeName),t):t}function $t(t,e){let n,r;for(r=(t=Array.isArray(t)?t:[t]).length-1;r>=0;r--)for(n in e)t[r].prototype[n]=e[n]}function Yt(t){return function(...e){const n=e[e.length-1];return!n||n.constructor!==Object||n instanceof Array?t.apply(this,e):t.apply(this,e.slice(0,-1)).attr(n)}}dt("Dom",{siblings:function(){return this.parent().children()},position:function(){return this.parent().index(this)},next:function(){return this.siblings()[this.position()+1]},prev:function(){return this.siblings()[this.position()-1]},forward:function(){const t=this.position();return this.parent().add(this.remove(),t+1),this},backward:function(){const t=this.position();return this.parent().add(this.remove(),t?t-1:0),this},front:function(){return this.parent().add(this.remove()),this},back:function(){return this.parent().add(this.remove(),0),this},before:function(t){(t=Tt(t)).remove();const e=this.position();return this.parent().add(t,e),this},after:function(t){(t=Tt(t)).remove();const e=this.position();return this.parent().add(t,e+1),this},insertBefore:function(t){return(t=Tt(t)).before(this),this},insertAfter:function(t){return(t=Tt(t)).after(this),this}});const Xt=/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,Gt=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,Bt=/rgb\((\d+),(\d+),(\d+)\)/,Wt=/(#[a-z_][a-z0-9\-_]*)/i,qt=/\)\s*,?\s*/,Vt=/\s/g,Ht=/^#[a-f0-9]{3}$|^#[a-f0-9]{6}$/i,Ut=/^rgb\(/,Zt=/^(\s+)?$/,Kt=/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Jt=/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,Qt=/[\s,]+/,te=/[MLHVCSQTAZ]/i;function ee(t){const e=Math.round(t),n=Math.max(0,Math.min(255,e)).toString(16);return 1===n.length?"0"+n:n}function ne(t,e){for(let n=e.length;n--;)if(null==t[e[n]])return!1;return!0}function re(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}dt("Dom",{classes:function(){const t=this.attr("class");return null==t?[]:t.trim().split(Qt)},hasClass:function(t){return-1!==this.classes().indexOf(t)},addClass:function(t){if(!this.hasClass(t)){const e=this.classes();e.push(t),this.attr("class",e.join(" "))}return this},removeClass:function(t){return this.hasClass(t)&&this.attr("class",this.classes().filter((function(e){return e!==t})).join(" ")),this},toggleClass:function(t){return this.hasClass(t)?this.removeClass(t):this.addClass(t)}}),dt("Dom",{css:function(t,e){const n={};if(0===arguments.length)return this.node.style.cssText.split(/\s*;\s*/).filter((function(t){return!!t.length})).forEach((function(t){const e=t.split(/\s*:\s*/);n[e[0]]=e[1]})),n;if(arguments.length<2){if(Array.isArray(t)){for(const e of t){const t=e;n[e]=this.node.style.getPropertyValue(t)}return n}if("string"==typeof t)return this.node.style.getPropertyValue(t);if("object"==typeof t)for(const e in t)this.node.style.setProperty(e,null==t[e]||Zt.test(t[e])?"":t[e])}return 2===arguments.length&&this.node.style.setProperty(t,null==e||Zt.test(e)?"":e),this},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},visible:function(){return"none"!==this.css("display")}}),dt("Dom",{data:function(t,e,n){if(null==t)return this.data(gt(function(t,e){let n;const r=t.length,i=[];for(n=0;n<r;n++)e(t[n])&&i.push(t[n]);return i}(this.node.attributes,(t=>0===t.nodeName.indexOf("data-"))),(t=>t.nodeName.slice(5))));if(t instanceof Array){const e={};for(const n of t)e[n]=this.data(n);return e}if("object"==typeof t)for(e in t)this.data(e,t[e]);else if(arguments.length<2)try{return JSON.parse(this.attr("data-"+t))}catch(r){return this.attr("data-"+t)}else this.attr("data-"+t,null===e?null:!0===n||"string"==typeof e||"number"==typeof e?e:JSON.stringify(e));return this}}),dt("Dom",{remember:function(t,e){if("object"==typeof arguments[0])for(const n in t)this.remember(n,t[n]);else{if(1===arguments.length)return this.memory()[t];this.memory()[t]=e}return this},forget:function(){if(0===arguments.length)this._memory={};else for(let t=arguments.length-1;t>=0;t--)delete this.memory()[arguments[t]];return this},memory:function(){return this._memory=this._memory||{}}});let ie=class t{constructor(...t){this.init(...t)}static isColor(e){return e&&(e instanceof t||this.isRgb(e)||this.test(e))}static isRgb(t){return t&&"number"==typeof t.r&&"number"==typeof t.g&&"number"==typeof t.b}static random(e="vibrant",n){const{random:r,round:i,sin:s,PI:o}=Math;if("vibrant"===e){const e=24*r()+57,n=38*r()+45,i=360*r();return new t(e,n,i,"lch")}if("sine"===e){const e=i(80*s(2*o*(n=null==n?r():n)/.5+.01)+150),u=i(50*s(2*o*n/.5+4.6)+200),a=i(100*s(2*o*n/.5+2.3)+150);return new t(e,u,a)}if("pastel"===e){const e=8*r()+86,n=17*r()+9,i=360*r();return new t(e,n,i,"lch")}if("dark"===e){const e=10+10*r(),n=50*r()+86,i=360*r();return new t(e,n,i,"lch")}if("rgb"===e){const e=255*r(),n=255*r(),i=255*r();return new t(e,n,i)}if("lab"===e){const e=100*r(),n=256*r()-128,i=256*r()-128;return new t(e,n,i,"lab")}if("grey"===e){const e=255*r();return new t(e,e,e)}throw new Error("Unsupported random color mode")}static test(t){return"string"==typeof t&&(Ht.test(t)||Ut.test(t))}cmyk(){const{_a:e,_b:n,_c:r}=this.rgb(),[i,s,o]=[e,n,r].map((t=>t/255)),u=Math.min(1-i,1-s,1-o);if(1===u)return new t(0,0,0,1,"cmyk");return new t((1-i-u)/(1-u),(1-s-u)/(1-u),(1-o-u)/(1-u),u,"cmyk")}hsl(){const{_a:e,_b:n,_c:r}=this.rgb(),[i,s,o]=[e,n,r].map((t=>t/255)),u=Math.max(i,s,o),a=Math.min(i,s,o),h=(u+a)/2,l=u===a,c=u-a;return new t(360*(l?0:u===i?((s-o)/c+(s<o?6:0))/6:u===s?((o-i)/c+2)/6:u===o?((i-s)/c+4)/6:0),100*(l?0:h>.5?c/(2-u-a):c/(u+a)),100*h,"hsl")}init(t=0,e=0,n=0,r=0,i="rgb"){if(t=t||0,this.space)for(const c in this.space)delete this[this.space[c]];if("number"==typeof t)i="string"==typeof r?r:i,r="string"==typeof r?0:r,Object.assign(this,{_a:t,_b:e,_c:n,_d:r,space:i});else if(t instanceof Array)this.space=e||("string"==typeof t[3]?t[3]:t[4])||"rgb",Object.assign(this,{_a:t[0],_b:t[1],_c:t[2],_d:t[3]||0});else if(t instanceof Object){const n=function(t,e){const n=ne(t,"rgb")?{_a:t.r,_b:t.g,_c:t.b,_d:0,space:"rgb"}:ne(t,"xyz")?{_a:t.x,_b:t.y,_c:t.z,_d:0,space:"xyz"}:ne(t,"hsl")?{_a:t.h,_b:t.s,_c:t.l,_d:0,space:"hsl"}:ne(t,"lab")?{_a:t.l,_b:t.a,_c:t.b,_d:0,space:"lab"}:ne(t,"lch")?{_a:t.l,_b:t.c,_c:t.h,_d:0,space:"lch"}:ne(t,"cmyk")?{_a:t.c,_b:t.m,_c:t.y,_d:t.k,space:"cmyk"}:{_a:0,_b:0,_c:0,space:"rgb"};return n.space=e||n.space,n}(t,e);Object.assign(this,n)}else if("string"==typeof t)if(Ut.test(t)){const e=t.replace(Vt,""),[n,r,i]=Bt.exec(e).slice(1,4).map((t=>parseInt(t)));Object.assign(this,{_a:n,_b:r,_c:i,_d:0,space:"rgb"})}else{if(!Ht.test(t))throw Error("Unsupported string format, can't construct Color");{const e=t=>parseInt(t,16),[,n,r,i]=Gt.exec((s=t,4===s.length?["#",s.substring(1,2),s.substring(1,2),s.substring(2,3),s.substring(2,3),s.substring(3,4),s.substring(3,4)].join(""):s)).map(e);Object.assign(this,{_a:n,_b:r,_c:i,_d:0,space:"rgb"})}}var s;const{_a:o,_b:u,_c:a,_d:h}=this,l="rgb"===this.space?{r:o,g:u,b:a}:"xyz"===this.space?{x:o,y:u,z:a}:"hsl"===this.space?{h:o,s:u,l:a}:"lab"===this.space?{l:o,a:u,b:a}:"lch"===this.space?{l:o,c:u,h:a}:"cmyk"===this.space?{c:o,m:u,y:a,k:h}:{};Object.assign(this,l)}lab(){const{x:e,y:n,z:r}=this.xyz();return new t(116*n-16,500*(e-n),200*(n-r),"lab")}lch(){const{l:e,a:n,b:r}=this.lab(),i=Math.sqrt(n**2+r**2);let s=180*Math.atan2(r,n)/Math.PI;s<0&&(s*=-1,s=360-s);return new t(e,i,s,"lch")}rgb(){if("rgb"===this.space)return this;if("lab"===(e=this.space)||"xyz"===e||"lch"===e){let{x:e,y:n,z:r}=this;if("lab"===this.space||"lch"===this.space){let{l:t,a:i,b:s}=this;if("lch"===this.space){const{c:t,h:e}=this,n=Math.PI/180;i=t*Math.cos(n*e),s=t*Math.sin(n*e)}const o=(t+16)/116,u=i/500+o,a=o-s/200,h=16/116,l=.008856,c=7.787;e=.95047*(u**3>l?u**3:(u-h)/c),n=1*(o**3>l?o**3:(o-h)/c),r=1.08883*(a**3>l?a**3:(a-h)/c)}const i=3.2406*e+-1.5372*n+-.4986*r,s=-.9689*e+1.8758*n+.0415*r,o=.0557*e+-.204*n+1.057*r,u=Math.pow,a=.0031308,h=i>a?1.055*u(i,1/2.4)-.055:12.92*i,l=s>a?1.055*u(s,1/2.4)-.055:12.92*s,c=o>a?1.055*u(o,1/2.4)-.055:12.92*o;return new t(255*h,255*l,255*c)}if("hsl"===this.space){let{h:e,s:n,l:r}=this;if(e/=360,n/=100,r/=100,0===n){r*=255;return new t(r,r,r)}const i=r<.5?r*(1+n):r+n-r*n,s=2*r-i,o=255*re(s,i,e+1/3),u=255*re(s,i,e),a=255*re(s,i,e-1/3);return new t(o,u,a)}if("cmyk"===this.space){const{c:e,m:n,y:r,k:i}=this,s=255*(1-Math.min(1,e*(1-i)+i)),o=255*(1-Math.min(1,n*(1-i)+i)),u=255*(1-Math.min(1,r*(1-i)+i));return new t(s,o,u)}return this;var e}toArray(){const{_a:t,_b:e,_c:n,_d:r,space:i}=this;return[t,e,n,r,i]}toHex(){const[t,e,n]=this._clamped().map(ee);return`#${t}${e}${n}`}toRgb(){const[t,e,n]=this._clamped();return`rgb(${t},${e},${n})`}toString(){return this.toHex()}xyz(){const{_a:e,_b:n,_c:r}=this.rgb(),[i,s,o]=[e,n,r].map((t=>t/255)),u=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92,a=s>.04045?Math.pow((s+.055)/1.055,2.4):s/12.92,h=o>.04045?Math.pow((o+.055)/1.055,2.4):o/12.92,l=(.4124*u+.3576*a+.1805*h)/.95047,c=(.2126*u+.7152*a+.0722*h)/1,f=(.0193*u+.1192*a+.9505*h)/1.08883,d=l>.008856?Math.pow(l,1/3):7.787*l+16/116,p=c>.008856?Math.pow(c,1/3):7.787*c+16/116,m=f>.008856?Math.pow(f,1/3):7.787*f+16/116;return new t(d,p,m,"xyz")}_clamped(){const{_a:t,_b:e,_c:n}=this.rgb(),{max:r,min:i,round:s}=Math;return[t,e,n].map((t=>r(0,i(s(t),255))))}},se=class t{constructor(...t){this.init(...t)}clone(){return new t(this)}init(t,e){const n=0,r=0,i=Array.isArray(t)?{x:t[0],y:t[1]}:"object"==typeof t?{x:t.x,y:t.y}:{x:t,y:e};return this.x=null==i.x?n:i.x,this.y=null==i.y?r:i.y,this}toArray(){return[this.x,this.y]}transform(t){return this.clone().transformO(t)}transformO(t){ue.isMatrixLike(t)||(t=new ue(t));const{x:e,y:n}=this;return this.x=t.a*e+t.c*n+t.e,this.y=t.b*e+t.d*n+t.f,this}};function oe(t,e,n){return Math.abs(e-t)<1e-6}let ue=class t{constructor(...t){this.init(...t)}static formatTransforms(t){const e="both"===t.flip||!0===t.flip,n=t.flip&&(e||"x"===t.flip)?-1:1,r=t.flip&&(e||"y"===t.flip)?-1:1,i=t.skew&&t.skew.length?t.skew[0]:isFinite(t.skew)?t.skew:isFinite(t.skewX)?t.skewX:0,s=t.skew&&t.skew.length?t.skew[1]:isFinite(t.skew)?t.skew:isFinite(t.skewY)?t.skewY:0,o=t.scale&&t.scale.length?t.scale[0]*n:isFinite(t.scale)?t.scale*n:isFinite(t.scaleX)?t.scaleX*n:n,u=t.scale&&t.scale.length?t.scale[1]*r:isFinite(t.scale)?t.scale*r:isFinite(t.scaleY)?t.scaleY*r:r,a=t.shear||0,h=t.rotate||t.theta||0,l=new se(t.origin||t.around||t.ox||t.originX,t.oy||t.originY),c=l.x,f=l.y,d=new se(t.position||t.px||t.positionX||NaN,t.py||t.positionY||NaN),p=d.x,m=d.y,g=new se(t.translate||t.tx||t.translateX,t.ty||t.translateY),y=g.x,_=g.y,v=new se(t.relative||t.rx||t.relativeX,t.ry||t.relativeY);return{scaleX:o,scaleY:u,skewX:i,skewY:s,shear:a,theta:h,rx:v.x,ry:v.y,tx:y,ty:_,ox:c,oy:f,px:p,py:m}}static fromArray(t){return{a:t[0],b:t[1],c:t[2],d:t[3],e:t[4],f:t[5]}}static isMatrixLike(t){return null!=t.a||null!=t.b||null!=t.c||null!=t.d||null!=t.e||null!=t.f}static matrixMultiply(t,e,n){const r=t.a*e.a+t.c*e.b,i=t.b*e.a+t.d*e.b,s=t.a*e.c+t.c*e.d,o=t.b*e.c+t.d*e.d,u=t.e+t.a*e.e+t.c*e.f,a=t.f+t.b*e.e+t.d*e.f;return n.a=r,n.b=i,n.c=s,n.d=o,n.e=u,n.f=a,n}around(t,e,n){return this.clone().aroundO(t,e,n)}aroundO(t,e,n){const r=t||0,i=e||0;return this.translateO(-r,-i).lmultiplyO(n).translateO(r,i)}clone(){return new t(this)}decompose(t=0,e=0){const n=this.a,r=this.b,i=this.c,s=this.d,o=this.e,u=this.f,a=n*s-r*i,h=a>0?1:-1,l=h*Math.sqrt(n*n+r*r),c=Math.atan2(h*r,h*n),f=180/Math.PI*c,d=Math.cos(c),p=Math.sin(c),m=(n*i+r*s)/a,g=i*l/(m*n-r)||s*l/(m*r+n);return{scaleX:l,scaleY:g,shear:m,rotate:f,translateX:o-t+t*d*l+e*(m*d*l-p*g),translateY:u-e+t*p*l+e*(m*p*l+d*g),originX:t,originY:e,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}equals(e){if(e===this)return!0;const n=new t(e);return oe(this.a,n.a)&&oe(this.b,n.b)&&oe(this.c,n.c)&&oe(this.d,n.d)&&oe(this.e,n.e)&&oe(this.f,n.f)}flip(t,e){return this.clone().flipO(t,e)}flipO(t,e){return"x"===t?this.scaleO(-1,1,e,0):"y"===t?this.scaleO(1,-1,0,e):this.scaleO(-1,-1,t,e||t)}init(e){const n=t.fromArray([1,0,0,1,0,0]);return e=e instanceof Te?e.matrixify():"string"==typeof e?t.fromArray(e.split(Qt).map(parseFloat)):Array.isArray(e)?t.fromArray(e):"object"==typeof e&&t.isMatrixLike(e)?e:"object"==typeof e?(new t).transform(e):6===arguments.length?t.fromArray([].slice.call(arguments)):n,this.a=null!=e.a?e.a:n.a,this.b=null!=e.b?e.b:n.b,this.c=null!=e.c?e.c:n.c,this.d=null!=e.d?e.d:n.d,this.e=null!=e.e?e.e:n.e,this.f=null!=e.f?e.f:n.f,this}inverse(){return this.clone().inverseO()}inverseO(){const t=this.a,e=this.b,n=this.c,r=this.d,i=this.e,s=this.f,o=t*r-e*n;if(!o)throw new Error("Cannot invert "+this);const u=r/o,a=-e/o,h=-n/o,l=t/o,c=-(u*i+h*s),f=-(a*i+l*s);return this.a=u,this.b=a,this.c=h,this.d=l,this.e=c,this.f=f,this}lmultiply(t){return this.clone().lmultiplyO(t)}lmultiplyO(e){const n=e instanceof t?e:new t(e);return t.matrixMultiply(n,this,this)}multiply(t){return this.clone().multiplyO(t)}multiplyO(e){const n=e instanceof t?e:new t(e);return t.matrixMultiply(this,n,this)}rotate(t,e,n){return this.clone().rotateO(t,e,n)}rotateO(t,e=0,n=0){t=yt(t);const r=Math.cos(t),i=Math.sin(t),{a:s,b:o,c:u,d:a,e:h,f:l}=this;return this.a=s*r-o*i,this.b=o*r+s*i,this.c=u*r-a*i,this.d=a*r+u*i,this.e=h*r-l*i+n*i-e*r+e,this.f=l*r+h*i-e*i-n*r+n,this}scale(){return this.clone().scaleO(...arguments)}scaleO(t,e=t,n=0,r=0){3===arguments.length&&(r=n,n=e,e=t);const{a:i,b:s,c:o,d:u,e:a,f:h}=this;return this.a=i*t,this.b=s*e,this.c=o*t,this.d=u*e,this.e=a*t-n*t+n,this.f=h*e-r*e+r,this}shear(t,e,n){return this.clone().shearO(t,e,n)}shearO(t,e=0,n=0){const{a:r,b:i,c:s,d:o,e:u,f:a}=this;return this.a=r+i*t,this.c=s+o*t,this.e=u+a*t-n*t,this}skew(){return this.clone().skewO(...arguments)}skewO(t,e=t,n=0,r=0){3===arguments.length&&(r=n,n=e,e=t),t=yt(t),e=yt(e);const i=Math.tan(t),s=Math.tan(e),{a:o,b:u,c:a,d:h,e:l,f:c}=this;return this.a=o+u*i,this.b=u+o*s,this.c=a+h*i,this.d=h+a*s,this.e=l+c*i-r*i,this.f=c+l*s-n*s,this}skewX(t,e,n){return this.skew(t,0,e,n)}skewY(t,e,n){return this.skew(0,t,e,n)}toArray(){return[this.a,this.b,this.c,this.d,this.e,this.f]}toString(){return"matrix("+this.a+","+this.b+","+this.c+","+this.d+","+this.e+","+this.f+")"}transform(e){if(t.isMatrixLike(e)){return new t(e).multiplyO(this)}const n=t.formatTransforms(e),{x:r,y:i}=new se(n.ox,n.oy).transform(this),s=(new t).translateO(n.rx,n.ry).lmultiplyO(this).translateO(-r,-i).scaleO(n.scaleX,n.scaleY).skewO(n.skewX,n.skewY).shearO(n.shear).rotateO(n.theta).translateO(r,i);if(isFinite(n.px)||isFinite(n.py)){const t=new se(r,i).transform(s),e=isFinite(n.px)?n.px-t.x:0,o=isFinite(n.py)?n.py-t.y:0;s.translateO(e,o)}return s.translateO(n.tx,n.ty),s}translate(t,e){return this.clone().translateO(t,e)}translateO(t,e){return this.e+=t||0,this.f+=e||0,this}valueOf(){return{a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}};function ae(){if(!ae.nodes){const t=Tt().size(2,0);t.node.style.cssText=["opacity: 0","position: absolute","left: -100%","top: -100%","overflow: hidden"].join(";"),t.attr("focusable","false"),t.attr("aria-hidden","true");const e=t.path().node;ae.nodes={svg:t,path:e}}if(!ae.nodes.svg.node.parentNode){const t=Ct.document.body||Ct.document.documentElement;ae.nodes.svg.addTo(t)}return ae.nodes}function he(t){return!(t.width||t.height||t.x||t.y)}zt(ue,"Matrix");let le=class t{constructor(...t){this.init(...t)}addOffset(){return this.x+=Ct.window.pageXOffset,this.y+=Ct.window.pageYOffset,new t(this)}init(t){return t="string"==typeof t?t.split(Qt).map(parseFloat):Array.isArray(t)?t:"object"==typeof t?[null!=t.left?t.left:t.x,null!=t.top?t.top:t.y,t.width,t.height]:4===arguments.length?[].slice.call(arguments):[0,0,0,0],this.x=t[0]||0,this.y=t[1]||0,this.width=this.w=t[2]||0,this.height=this.h=t[3]||0,this.x2=this.x+this.w,this.y2=this.y+this.h,this.cx=this.x+this.w/2,this.cy=this.y+this.h/2,this}isNulled(){return he(this)}merge(e){const n=Math.min(this.x,e.x),r=Math.min(this.y,e.y),i=Math.max(this.x+this.width,e.x+e.width)-n,s=Math.max(this.y+this.height,e.y+e.height)-r;return new t(n,r,i,s)}toArray(){return[this.x,this.y,this.width,this.height]}toString(){return this.x+" "+this.y+" "+this.width+" "+this.height}transform(e){e instanceof ue||(e=new ue(e));let n=1/0,r=-1/0,i=1/0,s=-1/0;return[new se(this.x,this.y),new se(this.x2,this.y),new se(this.x,this.y2),new se(this.x2,this.y2)].forEach((function(t){t=t.transform(e),n=Math.min(n,t.x),r=Math.max(r,t.x),i=Math.min(i,t.y),s=Math.max(s,t.y)})),new t(n,i,r-n,s-i)}};function ce(t,e,n){let r;try{if(r=e(t.node),he(r)&&((i=t.node)!==Ct.document&&!(Ct.document.documentElement.contains||function(t){for(;t.parentNode;)t=t.parentNode;return t===Ct.document}).call(Ct.document.documentElement,i)))throw new Error("Element not in the dom")}catch(s){r=n(t)}var i;return r}dt({viewbox:{viewbox(t,e,n,r){return null==t?new le(this.attr("viewBox")):this.attr("viewBox",new le(t,e,n,r))},zoom(t,e){let{width:n,height:r}=this.attr(["width","height"]);if((n||r)&&"string"!=typeof n&&"string"!=typeof r||(n=this.node.clientWidth,r=this.node.clientHeight),!n||!r)throw new Error("Impossible to get absolute width and height. Please provide an absolute width and height attribute on the zooming element");const i=this.viewbox(),s=n/i.width,o=r/i.height,u=Math.min(s,o);if(null==t)return u;let a=u/t;a===1/0&&(a=Number.MAX_SAFE_INTEGER/100),e=e||new se(n/2/s+i.x,r/2/o+i.y);const h=new le(i).transform(new ue({scale:a,origin:e}));return this.viewbox(h)}}}),zt(le,"Box");let fe=class extends Array{constructor(t=[],...e){if(super(t,...e),"number"==typeof t)return this;this.length=0,this.push(...t)}};$t([fe],{each(t,...e){return"function"==typeof t?this.map(((e,n,r)=>t.call(e,e,n,r))):this.map((n=>n[t](...e)))},toArray(){return Array.prototype.concat.apply([],this)}});const de=["toArray","constructor","each"];function pe(t,e){return new fe(gt((e||Ct.document).querySelectorAll(t),(function(t){return Rt(t)})))}fe.extend=function(t){t=t.reduce(((t,e)=>(de.includes(e)||"_"===e[0]||(e in Array.prototype&&(t["$"+e]=Array.prototype[e]),t[e]=function(...t){return this.each(e,...t)}),t)),{}),$t([fe],t)};let me=0;const ge={};function ye(t){let e=t.getEventHolder();return e===Ct.window&&(e=ge),e.events||(e.events={}),e.events}function _e(t){return t.getEventTarget()}function ve(t,e,n,r,i){const s=n.bind(r||t),o=Tt(t),u=ye(o),a=_e(o);e=Array.isArray(e)?e:e.split(Qt),n._svgjsListenerId||(n._svgjsListenerId=++me),e.forEach((function(t){const e=t.split(".")[0],r=t.split(".")[1]||"*";u[e]=u[e]||{},u[e][r]=u[e][r]||{},u[e][r][n._svgjsListenerId]=s,a.addEventListener(e,s,i||!1)}))}function we(t,e,n,r){const i=Tt(t),s=ye(i),o=_e(i);("function"!=typeof n||(n=n._svgjsListenerId))&&(e=Array.isArray(e)?e:(e||"").split(Qt)).forEach((function(t){const e=t&&t.split(".")[0],u=t&&t.split(".")[1];let a,h;if(n)s[e]&&s[e][u||"*"]&&(o.removeEventListener(e,s[e][u||"*"][n],r||!1),delete s[e][u||"*"][n]);else if(e&&u){if(s[e]&&s[e][u]){for(h in s[e][u])we(o,[e,u].join("."),h);delete s[e][u]}}else if(u)for(t in s)for(a in s[t])u===a&&we(o,[t,u].join("."));else if(e){if(s[e]){for(a in s[e])we(o,[e,a].join("."));delete s[e]}}else{for(t in s)we(o,t);!function(t){let e=t.getEventHolder();e===Ct.window&&(e=ge),e.events&&(e.events={})}(i)}}))}let be=class extends At{addEventListener(){}dispatch(t,e,n){return function(t,e,n,r){const i=_e(t);return e instanceof Ct.window.Event||(e=new Ct.window.CustomEvent(e,{detail:n,cancelable:!0,...r})),i.dispatchEvent(e),e}(this,t,e,n)}dispatchEvent(t){const e=this.getEventHolder().events;if(!e)return!0;const n=e[t.type];for(const r in n)for(const e in n[r])n[r][e](t);return!t.defaultPrevented}fire(t,e,n){return this.dispatch(t,e,n),this}getEventHolder(){return this}getEventTarget(){return this}off(t,e,n){return we(this,t,e,n),this}on(t,e,n,r){return ve(this,t,e,n,r),this}removeEventListener(){}};function xe(){}zt(be,"EventTarget");const Ee=400,Oe=">",Me=0,ke={"fill-opacity":1,"stroke-opacity":1,"stroke-width":0,"stroke-linejoin":"miter","stroke-linecap":"butt",fill:"#000000",stroke:"#000000",opacity:1,x:0,y:0,cx:0,cy:0,width:0,height:0,r:0,rx:0,ry:0,offset:0,"stop-opacity":1,"stop-color":"#000000","text-anchor":"start"};let Ce=class extends Array{constructor(...t){super(...t),this.init(...t)}clone(){return new this.constructor(this)}init(t){return"number"==typeof t||(this.length=0,this.push(...this.parse(t))),this}parse(t=[]){return t instanceof Array?t:t.trim().split(Qt).map(parseFloat)}toArray(){return Array.prototype.concat.apply([],this)}toSet(){return new Set(this)}toString(){return this.join(" ")}valueOf(){const t=[];return t.push(...this),t}},Ae=class t{constructor(...t){this.init(...t)}convert(e){return new t(this.value,e)}divide(e){return e=new t(e),new t(this/e,this.unit||e.unit)}init(e,n){return n=Array.isArray(e)?e[1]:n,e=Array.isArray(e)?e[0]:e,this.value=0,this.unit=n||"","number"==typeof e?this.value=isNaN(e)?0:isFinite(e)?e:e<0?-34e37:34e37:"string"==typeof e?(n=e.match(Xt))&&(this.value=parseFloat(n[1]),"%"===n[5]?this.value/=100:"s"===n[5]&&(this.value*=1e3),this.unit=n[5]):e instanceof t&&(this.value=e.valueOf(),this.unit=e.unit),this}minus(e){return e=new t(e),new t(this-e,this.unit||e.unit)}plus(e){return e=new t(e),new t(this+e,this.unit||e.unit)}times(e){return e=new t(e),new t(this*e,this.unit||e.unit)}toArray(){return[this.value,this.unit]}toJSON(){return this.toString()}toString(){return("%"===this.unit?~~(1e8*this.value)/1e6:"s"===this.unit?this.value/1e3:this.value)+this.unit}valueOf(){return this.value}};const Se=new Set(["fill","stroke","color","bgcolor","stop-color","flood-color","lighting-color"]),Ne=[];let je=class t extends be{constructor(t,e){super(),this.node=t,this.type=t.nodeName,e&&t!==e&&this.attr(e)}add(t,e){return(t=Tt(t)).removeNamespace&&this.node instanceof Ct.window.SVGElement&&t.removeNamespace(),null==e?this.node.appendChild(t.node):t.node!==this.node.childNodes[e]&&this.node.insertBefore(t.node,this.node.childNodes[e]),this}addTo(t,e){return Tt(t).put(this,e)}children(){return new fe(gt(this.node.children,(function(t){return Rt(t)})))}clear(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return this}clone(t=!0,e=!0){this.writeDataToDom();let n=this.node.cloneNode(t);return e&&(n=Ft(n)),new this.constructor(n)}each(t,e){const n=this.children();let r,i;for(r=0,i=n.length;r<i;r++)t.apply(n[r],[r,n]),e&&n[r].each(t,e);return this}element(e,n){return this.put(new t(jt(e),n))}first(){return Rt(this.node.firstChild)}get(t){return Rt(this.node.childNodes[t])}getEventHolder(){return this.node}getEventTarget(){return this.node}has(t){return this.index(t)>=0}html(t,e){return this.xml(t,e,"http://www.w3.org/1999/xhtml")}id(t){return void 0!==t||this.node.id||(this.node.id=Pt(this.type)),this.attr("id",t)}index(t){return[].slice.call(this.node.childNodes).indexOf(t.node)}last(){return Rt(this.node.lastChild)}matches(t){const e=this.node,n=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector||null;return n&&n.call(e,t)}parent(t){let e=this;if(!e.node.parentNode)return null;if(e=Rt(e.node.parentNode),!t)return e;do{if("string"==typeof t?e.matches(t):e instanceof t)return e}while(e=Rt(e.node.parentNode));return e}put(t,e){return t=Tt(t),this.add(t,e),t}putIn(t,e){return Tt(t).add(this,e)}remove(){return this.parent()&&this.parent().removeElement(this),this}removeElement(t){return this.node.removeChild(t.node),this}replace(t){return t=Tt(t),this.node.parentNode&&this.node.parentNode.replaceChild(t.node,this.node),t}round(t=2,e=null){const n=10**t,r=this.attr(e);for(const i in r)"number"==typeof r[i]&&(r[i]=Math.round(r[i]*n)/n);return this.attr(r),this}svg(t,e){return this.xml(t,e,Ot)}toString(){return this.id()}words(t){return this.node.textContent=t,this}wrap(t){const e=this.parent();if(!e)return this.addTo(t);const n=e.index(this);return e.put(t,n).put(this)}writeDataToDom(){return this.each((function(){this.writeDataToDom()})),this}xml(t,e,n){if("boolean"==typeof t&&(n=e,e=t,t=null),null==t||"function"==typeof t){e=null==e||e,this.writeDataToDom();let n=this;if(null!=t){if(n=Rt(n.node.cloneNode(!0)),e){const e=t(n);if(n=e||n,!1===e)return""}n.each((function(){const e=t(this),n=e||this;!1===e?this.remove():e&&this!==n&&this.replace(n)}),!0)}return e?n.node.outerHTML:n.node.innerHTML}e=null!=e&&e;const r=jt("wrapper",n),i=Ct.document.createDocumentFragment();r.innerHTML=t;for(let o=r.children.length;o--;)i.appendChild(r.firstElementChild);const s=this.parent();return e?this.replace(i)&&s:this.add(i)}};$t(je,{attr:function(t,e,n){if(null==t){t={},e=this.node.attributes;for(const n of e)t[n.nodeName]=Kt.test(n.nodeValue)?parseFloat(n.nodeValue):n.nodeValue;return t}if(t instanceof Array)return t.reduce(((t,e)=>(t[e]=this.attr(e),t)),{});if("object"==typeof t&&t.constructor===Object)for(e in t)this.attr(e,t[e]);else if(null===e)this.node.removeAttribute(t);else{if(null==e)return null==(e=this.node.getAttribute(t))?ke[t]:Kt.test(e)?parseFloat(e):e;"number"==typeof(e=Ne.reduce(((e,n)=>n(t,e,this)),e))?e=new Ae(e):Se.has(t)&&ie.isColor(e)?e=new ie(e):e.constructor===Array&&(e=new Ce(e)),"leading"===t?this.leading&&this.leading(e):"string"==typeof n?this.node.setAttributeNS(n,t,e.toString()):this.node.setAttribute(t,e.toString()),!this.rebuild||"font-size"!==t&&"x"!==t||this.rebuild()}return this},find:function(t){return pe(t,this.node)},findOne:function(t){return Rt(this.node.querySelector(t))}}),zt(je,"Dom");let Te=class extends je{constructor(t,e){super(t,e),this.dom={},this.node.instance=this,(t.hasAttribute("data-svgjs")||t.hasAttribute("svgjs:data"))&&this.setData(JSON.parse(t.getAttribute("data-svgjs"))??JSON.parse(t.getAttribute("svgjs:data"))??{})}center(t,e){return this.cx(t).cy(e)}cx(t){return null==t?this.x()+this.width()/2:this.x(t-this.width()/2)}cy(t){return null==t?this.y()+this.height()/2:this.y(t-this.height()/2)}defs(){const t=this.root();return t&&t.defs()}dmove(t,e){return this.dx(t).dy(e)}dx(t=0){return this.x(new Ae(t).plus(this.x()))}dy(t=0){return this.y(new Ae(t).plus(this.y()))}getEventHolder(){return this}height(t){return this.attr("height",t)}move(t,e){return this.x(t).y(e)}parents(t=this.root()){const e="string"==typeof t;e||(t=Tt(t));const n=new fe;let r=this;for(;(r=r.parent())&&r.node!==Ct.document&&"#document-fragment"!==r.nodeName&&(n.push(r),e||r.node!==t.node)&&(!e||!r.matches(t));)if(r.node===this.root().node)return null;return n}reference(t){if(!(t=this.attr(t)))return null;const e=(t+"").match(Wt);return e?Tt(e[1]):null}root(){const t=this.parent(St[Nt]);return t&&t.root()}setData(t){return this.dom=t,this}size(t,e){const n=vt(this,t,e);return this.width(new Ae(n.width)).height(new Ae(n.height))}width(t){return this.attr("width",t)}writeDataToDom(){return Et(this,this.dom),super.writeDataToDom()}x(t){return this.attr("x",t)}y(t){return this.attr("y",t)}};$t(Te,{bbox:function(){const t=ce(this,(t=>t.getBBox()),(t=>{try{const e=t.clone().addTo(ae().svg).show(),n=e.node.getBBox();return e.remove(),n}catch(e){throw new Error(`Getting bbox of element "${t.node.nodeName}" is not possible: ${e.toString()}`)}}));return new le(t)},rbox:function(t){const e=ce(this,(t=>t.getBoundingClientRect()),(t=>{throw new Error(`Getting rbox of element "${t.node.nodeName}" is not possible`)})),n=new le(e);return t?n.transform(t.screenCTM().inverseO()):n.addOffset()},inside:function(t,e){const n=this.bbox();return t>n.x&&e>n.y&&t<n.x+n.width&&e<n.y+n.height},point:function(t,e){return new se(t,e).transformO(this.screenCTM().inverseO())},ctm:function(){return new ue(this.node.getCTM())},screenCTM:function(){try{if("function"==typeof this.isRoot&&!this.isRoot()){const t=this.rect(1,1),e=t.node.getScreenCTM();return t.remove(),new ue(e)}return new ue(this.node.getScreenCTM())}catch(t){return console.warn(`Cannot get CTM from SVG node ${this.node.nodeName}. Is the element rendered?`),new ue}}}),zt(Te,"Element");const Ie={stroke:["color","width","opacity","linecap","linejoin","miterlimit","dasharray","dashoffset"],fill:["color","opacity","rule"],prefix:function(t,e){return"color"===e?t:t+"-"+e}};["fill","stroke"].forEach((function(t){const e={};let n;e[t]=function(e){if(void 0===e)return this.attr(t);if("string"==typeof e||e instanceof ie||ie.isRgb(e)||e instanceof Te)this.attr(t,e);else for(n=Ie[t].length-1;n>=0;n--)null!=e[Ie[t][n]]&&this.attr(Ie.prefix(t,Ie[t][n]),e[Ie[t][n]]);return this},dt(["Element","Runner"],e)})),dt(["Element","Runner"],{matrix:function(t,e,n,r,i,s){return null==t?new ue(this):this.attr("transform",new ue(t,e,n,r,i,s))},rotate:function(t,e,n){return this.transform({rotate:t,ox:e,oy:n},!0)},skew:function(t,e,n,r){return 1===arguments.length||3===arguments.length?this.transform({skew:t,ox:e,oy:n},!0):this.transform({skew:[t,e],ox:n,oy:r},!0)},shear:function(t,e,n){return this.transform({shear:t,ox:e,oy:n},!0)},scale:function(t,e,n,r){return 1===arguments.length||3===arguments.length?this.transform({scale:t,ox:e,oy:n},!0):this.transform({scale:[t,e],ox:n,oy:r},!0)},translate:function(t,e){return this.transform({translate:[t,e]},!0)},relative:function(t,e){return this.transform({relative:[t,e]},!0)},flip:function(t="both",e="center"){return-1==="xybothtrue".indexOf(t)&&(e=t,t="both"),this.transform({flip:t,origin:e},!0)},opacity:function(t){return this.attr("opacity",t)}}),dt("radius",{radius:function(t,e=t){return"radialGradient"===(this._element||this).type?this.attr("r",new Ae(t)):this.rx(t).ry(e)}}),dt("Path",{length:function(){return this.node.getTotalLength()},pointAt:function(t){return new se(this.node.getPointAtLength(t))}}),dt(["Element","Runner"],{font:function(t,e){if("object"==typeof t){for(e in t)this.font(e,t[e]);return this}return"leading"===t?this.leading(e):"anchor"===t?this.attr("text-anchor",e):"size"===t||"family"===t||"weight"===t||"stretch"===t||"variant"===t||"style"===t?this.attr("font-"+t,e):this.attr(t,e)}});dt("Element",["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","touchstart","touchmove","touchleave","touchend","touchcancel","contextmenu","wheel","pointerdown","pointermove","pointerup","pointerleave","pointercancel"].reduce((function(t,e){return t[e]=function(t){return null===t?this.off(e):this.on(e,t),this},t}),{})),dt("Element",{untransform:function(){return this.attr("transform",null)},matrixify:function(){return(this.attr("transform")||"").split(qt).slice(0,-1).map((function(t){const e=t.trim().split("(");return[e[0],e[1].split(Qt).map((function(t){return parseFloat(t)}))]})).reverse().reduce((function(t,e){return"matrix"===e[0]?t.lmultiply(ue.fromArray(e[1])):t[e[0]].apply(t,e[1])}),new ue)},toParent:function(t,e){if(this===t)return this;if(xt(this.node))return this.addTo(t,e);const n=this.screenCTM(),r=t.screenCTM().inverse();return this.addTo(t,e).untransform().transform(r.multiply(n)),this},toRoot:function(t){return this.toParent(this.root(),t)},transform:function(t,e){if(null==t||"string"==typeof t){const e=new ue(this).decompose();return null==t?e:e[t]}ue.isMatrixLike(t)||(t={...t,origin:wt(t,this)});const n=new ue(!0===e?this:e||!1).transform(t);return this.attr("transform",n)}});let Re=class t extends Te{flatten(){return this.each((function(){if(this instanceof t)return this.flatten().ungroup()})),this}ungroup(t=this.parent(),e=t.index(this)){return e=-1===e?t.children().length:e,this.each((function(n,r){return r[r.length-n-1].toParent(t,e)})),this.remove()}};zt(Re,"Container");let Le=class extends Re{constructor(t,e=t){super(It("defs",t),e)}flatten(){return this}ungroup(){return this}};zt(Le,"Defs");let ze=class extends Te{};function De(t){return this.attr("rx",t)}function Pe(t){return this.attr("ry",t)}function Fe(t){return null==t?this.cx()-this.rx():this.cx(t+this.rx())}function $e(t){return null==t?this.cy()-this.ry():this.cy(t+this.ry())}function Ye(t){return this.attr("cx",t)}function Xe(t){return this.attr("cy",t)}function Ge(t){return null==t?2*this.rx():this.rx(new Ae(t).divide(2))}function Be(t){return null==t?2*this.ry():this.ry(new Ae(t).divide(2))}zt(ze,"Shape");const We=Object.freeze(Object.defineProperty({__proto__:null,cx:Ye,cy:Xe,height:Be,rx:De,ry:Pe,width:Ge,x:Fe,y:$e},Symbol.toStringTag,{value:"Module"}));let qe=class extends ze{constructor(t,e=t){super(It("ellipse",t),e)}size(t,e){const n=vt(this,t,e);return this.rx(new Ae(n.width).divide(2)).ry(new Ae(n.height).divide(2))}};$t(qe,We),dt("Container",{ellipse:Yt((function(t=0,e=t){return this.put(new qe).size(t,e).move(0,0)}))}),zt(qe,"Ellipse");let Ve=class extends je{constructor(t=Ct.document.createDocumentFragment()){super(t)}xml(t,e,n){if("boolean"==typeof t&&(n=e,e=t,t=null),null==t||"function"==typeof t){const t=new je(jt("wrapper",n));return t.add(this.node.cloneNode(!0)),t.xml(!1,n)}return super.xml(t,!1,n)}};function He(t,e){return"radialGradient"===(this._element||this).type?this.attr({fx:new Ae(t),fy:new Ae(e)}):this.attr({x1:new Ae(t),y1:new Ae(e)})}function Ue(t,e){return"radialGradient"===(this._element||this).type?this.attr({cx:new Ae(t),cy:new Ae(e)}):this.attr({x2:new Ae(t),y2:new Ae(e)})}zt(Ve,"Fragment");const Ze=Object.freeze(Object.defineProperty({__proto__:null,from:He,to:Ue},Symbol.toStringTag,{value:"Module"}));let Ke=class extends Re{constructor(t,e){super(It(t+"Gradient","string"==typeof t?null:t),e)}attr(t,e,n){return"transform"===t&&(t="gradientTransform"),super.attr(t,e,n)}bbox(){return new le}targets(){return pe("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}};$t(Ke,Ze),dt({Container:{gradient(...t){return this.defs().gradient(...t)}},Defs:{gradient:Yt((function(t,e){return this.put(new Ke(t)).update(e)}))}}),zt(Ke,"Gradient");let Je=class extends Re{constructor(t,e=t){super(It("pattern",t),e)}attr(t,e,n){return"transform"===t&&(t="patternTransform"),super.attr(t,e,n)}bbox(){return new le}targets(){return pe("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}};dt({Container:{pattern(...t){return this.defs().pattern(...t)}},Defs:{pattern:Yt((function(t,e,n){return this.put(new Je).update(n).attr({x:0,y:0,width:t,height:e,patternUnits:"userSpaceOnUse"})}))}}),zt(Je,"Pattern");let Qe=class extends ze{constructor(t,e=t){super(It("image",t),e)}load(t,e){if(!t)return this;const n=new Ct.window.Image;return ve(n,"load",(function(t){const r=this.parent(Je);0===this.width()&&0===this.height()&&this.size(n.width,n.height),r instanceof Je&&0===r.width()&&0===r.height()&&r.size(this.width(),this.height()),"function"==typeof e&&e.call(this,t)}),this),ve(n,"load error",(function(){we(n)})),this.attr("href",n.src=t,kt)}};var tn;tn=function(t,e,n){return"fill"!==t&&"stroke"!==t||Jt.test(e)&&(e=n.root().defs().image(e)),e instanceof Qe&&(e=n.root().defs().pattern(0,0,(t=>{t.add(e)}))),e},Ne.push(tn),dt({Container:{image:Yt((function(t,e){return this.put(new Qe).size(0,0).load(t,e)}))}}),zt(Qe,"Image");let en=class extends Ce{bbox(){let t=-1/0,e=-1/0,n=1/0,r=1/0;return this.forEach((function(i){t=Math.max(i[0],t),e=Math.max(i[1],e),n=Math.min(i[0],n),r=Math.min(i[1],r)})),new le(n,r,t-n,e-r)}move(t,e){const n=this.bbox();if(t-=n.x,e-=n.y,!isNaN(t)&&!isNaN(e))for(let r=this.length-1;r>=0;r--)this[r]=[this[r][0]+t,this[r][1]+e];return this}parse(t=[0,0]){const e=[];(t=t instanceof Array?Array.prototype.concat.apply([],t):t.trim().split(Qt).map(parseFloat)).length%2!=0&&t.pop();for(let n=0,r=t.length;n<r;n+=2)e.push([t[n],t[n+1]]);return e}size(t,e){let n;const r=this.bbox();for(n=this.length-1;n>=0;n--)r.width&&(this[n][0]=(this[n][0]-r.x)*t/r.width+r.x),r.height&&(this[n][1]=(this[n][1]-r.y)*e/r.height+r.y);return this}toLine(){return{x1:this[0][0],y1:this[0][1],x2:this[1][0],y2:this[1][1]}}toString(){const t=[];for(let e=0,n=this.length;e<n;e++)t.push(this[e].join(","));return t.join(" ")}transform(t){return this.clone().transformO(t)}transformO(t){ue.isMatrixLike(t)||(t=new ue(t));for(let e=this.length;e--;){const[n,r]=this[e];this[e][0]=t.a*n+t.c*r+t.e,this[e][1]=t.b*n+t.d*r+t.f}return this}};const nn=en;const rn=Object.freeze(Object.defineProperty({__proto__:null,MorphArray:nn,height:function(t){const e=this.bbox();return null==t?e.height:this.size(e.width,t)},width:function(t){const e=this.bbox();return null==t?e.width:this.size(t,e.height)},x:function(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)},y:function(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}},Symbol.toStringTag,{value:"Module"}));let sn=class extends ze{constructor(t,e=t){super(It("line",t),e)}array(){return new en([[this.attr("x1"),this.attr("y1")],[this.attr("x2"),this.attr("y2")]])}move(t,e){return this.attr(this.array().move(t,e).toLine())}plot(t,e,n,r){return null==t?this.array():(t=void 0!==e?{x1:t,y1:e,x2:n,y2:r}:new en(t).toLine(),this.attr(t))}size(t,e){const n=vt(this,t,e);return this.attr(this.array().size(n.width,n.height).toLine())}};$t(sn,rn),dt({Container:{line:Yt((function(...t){return sn.prototype.plot.apply(this.put(new sn),null!=t[0]?t:[0,0,0,0])}))}}),zt(sn,"Line");let on=class extends Re{constructor(t,e=t){super(It("marker",t),e)}height(t){return this.attr("markerHeight",t)}orient(t){return this.attr("orient",t)}ref(t,e){return this.attr("refX",t).attr("refY",e)}toString(){return"url(#"+this.id()+")"}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}width(t){return this.attr("markerWidth",t)}};function un(t,e){return function(n){return null==n?this[t]:(this[t]=n,e&&e.call(this),this)}}dt({Container:{marker(...t){return this.defs().marker(...t)}},Defs:{marker:Yt((function(t,e,n){return this.put(new on).size(t,e).ref(t/2,e/2).viewbox(0,0,t,e).attr("orient","auto").update(n)}))},marker:{marker(t,e,n,r){let i=["marker"];return"all"!==t&&i.push(t),i=i.join("-"),t=arguments[1]instanceof on?arguments[1]:this.defs().marker(e,n,r),this.attr(i,t)}}}),zt(on,"Marker");const an={"-":function(t){return t},"<>":function(t){return-Math.cos(t*Math.PI)/2+.5},">":function(t){return Math.sin(t*Math.PI/2)},"<":function(t){return 1-Math.cos(t*Math.PI/2)},bezier:function(t,e,n,r){return function(i){return i<0?t>0?e/t*i:n>0?r/n*i:0:i>1?n<1?(1-r)/(1-n)*i+(r-n)/(1-n):t<1?(1-e)/(1-t)*i+(e-t)/(1-t):1:3*i*(1-i)**2*e+3*i**2*(1-i)*r+i**3}},steps:function(t,e="end"){e=e.split("-").reverse()[0];let n=t;return"none"===e?--n:"both"===e&&++n,(r,i=!1)=>{let s=Math.floor(r*t);const o=r*s%1==0;return"start"!==e&&"both"!==e||++s,i&&o&&--s,r>=0&&s<0&&(s=0),r<=1&&s>n&&(s=n),s/n}}};let hn=class{done(){return!1}},ln=class extends hn{constructor(t=Oe){super(),this.ease=an[t]||t}step(t,e,n){return"number"!=typeof t?n<1?t:e:t+(e-t)*this.ease(n)}},cn=class extends hn{constructor(t){super(),this.stepper=t}done(t){return t.done}step(t,e,n,r){return this.stepper(t,e,n,r)}};function fn(){const t=(this._duration||500)/1e3,e=this._overshoot||0,n=Math.PI,r=Math.log(e/100+1e-10),i=-r/Math.sqrt(n*n+r*r),s=3.9/(i*t);this.d=2*i*s,this.k=s*s}$t(class extends cn{constructor(t=500,e=0){super(),this.duration(t).overshoot(e)}step(t,e,n,r){if("string"==typeof t)return t;if(r.done=n===1/0,n===1/0)return e;if(0===n)return t;n>100&&(n=16),n/=1e3;const i=r.velocity||0,s=-this.d*i-this.k*(t-e),o=t+i*n+s*n*n/2;return r.velocity=i+s*n,r.done=Math.abs(e-o)+Math.abs(i)<.002,r.done?e:o}},{duration:un("_duration",fn),overshoot:un("_overshoot",fn)});$t(class extends cn{constructor(t=.1,e=.01,n=0,r=1e3){super(),this.p(t).i(e).d(n).windup(r)}step(t,e,n,r){if("string"==typeof t)return t;if(r.done=n===1/0,n===1/0)return e;if(0===n)return t;const i=e-t;let s=(r.integral||0)+i*n;const o=(i-(r.error||0))/n,u=this._windup;return!1!==u&&(s=Math.max(-u,Math.min(s,u))),r.error=i,r.integral=s,r.done=Math.abs(i)<.001,r.done?e:t+(this.P*i+this.I*s+this.D*o)}},{windup:un("_windup"),p:un("P"),i:un("I"),d:un("D")});const dn={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0},pn={M:function(t,e,n){return e.x=n.x=t[0],e.y=n.y=t[1],["M",e.x,e.y]},L:function(t,e){return e.x=t[0],e.y=t[1],["L",t[0],t[1]]},H:function(t,e){return e.x=t[0],["H",t[0]]},V:function(t,e){return e.y=t[0],["V",t[0]]},C:function(t,e){return e.x=t[4],e.y=t[5],["C",t[0],t[1],t[2],t[3],t[4],t[5]]},S:function(t,e){return e.x=t[2],e.y=t[3],["S",t[0],t[1],t[2],t[3]]},Q:function(t,e){return e.x=t[2],e.y=t[3],["Q",t[0],t[1],t[2],t[3]]},T:function(t,e){return e.x=t[0],e.y=t[1],["T",t[0],t[1]]},Z:function(t,e,n){return e.x=n.x,e.y=n.y,["Z"]},A:function(t,e){return e.x=t[5],e.y=t[6],["A",t[0],t[1],t[2],t[3],t[4],t[5],t[6]]}},mn="mlhvqtcsaz".split("");for(let kh=0,Ch=mn.length;kh<Ch;++kh)pn[mn[kh]]=function(t){return function(e,n,r){if("H"===t)e[0]=e[0]+n.x;else if("V"===t)e[0]=e[0]+n.y;else if("A"===t)e[5]=e[5]+n.x,e[6]=e[6]+n.y;else for(let t=0,i=e.length;t<i;++t)e[t]=e[t]+(t%2?n.y:n.x);return pn[t](e,n,r)}}(mn[kh].toUpperCase());function gn(t){return t.segment.length&&t.segment.length-1===dn[t.segment[0].toUpperCase()]}function yn(t,e){t.inNumber&&_n(t,!1);const n=te.test(e);if(n)t.segment=[e];else{const e=t.lastCommand,n=e.toLowerCase(),r=e===n;t.segment=["m"===n?r?"l":"L":e]}return t.inSegment=!0,t.lastCommand=t.segment[0],n}function _n(t,e){if(!t.inNumber)throw new Error("Parser Error");t.number&&t.segment.push(parseFloat(t.number)),t.inNumber=e,t.number="",t.pointSeen=!1,t.hasExponent=!1,gn(t)&&vn(t)}function vn(t){t.inSegment=!1,t.absolute&&(t.segment=function(t){const e=t.segment[0];return pn[e](t.segment.slice(1),t.p,t.p0)}(t)),t.segments.push(t.segment)}function wn(t){if(!t.segment.length)return!1;const e="A"===t.segment[0].toUpperCase(),n=t.segment.length;return e&&(4===n||5===n)}function bn(t){return"E"===t.lastToken.toUpperCase()}const xn=new Set([" ",",","\t","\n","\r","\f"]);let En=class extends Ce{bbox(){return ae().path.setAttribute("d",this.toString()),new le(ae.nodes.path.getBBox())}move(t,e){const n=this.bbox();if(t-=n.x,e-=n.y,!isNaN(t)&&!isNaN(e))for(let r,i=this.length-1;i>=0;i--)r=this[i][0],"M"===r||"L"===r||"T"===r?(this[i][1]+=t,this[i][2]+=e):"H"===r?this[i][1]+=t:"V"===r?this[i][1]+=e:"C"===r||"S"===r||"Q"===r?(this[i][1]+=t,this[i][2]+=e,this[i][3]+=t,this[i][4]+=e,"C"===r&&(this[i][5]+=t,this[i][6]+=e)):"A"===r&&(this[i][6]+=t,this[i][7]+=e);return this}parse(t="M0 0"){return Array.isArray(t)&&(t=Array.prototype.concat.apply([],t).toString()),function(t,e=!0){let n=0,r="";const i={segment:[],inNumber:!1,number:"",lastToken:"",inSegment:!1,segments:[],pointSeen:!1,hasExponent:!1,absolute:e,p0:new se,p:new se};for(;i.lastToken=r,r=t.charAt(n++);)if(i.inSegment||!yn(i,r))if("."!==r)if(isNaN(parseInt(r)))if(xn.has(r))i.inNumber&&_n(i,!1);else if("-"!==r&&"+"!==r)if("E"!==r.toUpperCase()){if(te.test(r)){if(i.inNumber)_n(i,!1);else{if(!gn(i))throw new Error("parser Error");vn(i)}--n}}else i.number+=r,i.hasExponent=!0;else{if(i.inNumber&&!bn(i)){_n(i,!1),--n;continue}i.number+=r,i.inNumber=!0}else{if("0"===i.number||wn(i)){i.inNumber=!0,i.number=r,_n(i,!0);continue}i.inNumber=!0,i.number+=r}else{if(i.pointSeen||i.hasExponent){_n(i,!1),--n;continue}i.inNumber=!0,i.pointSeen=!0,i.number+=r}return i.inNumber&&_n(i,!1),i.inSegment&&gn(i)&&vn(i),i.segments}(t)}size(t,e){const n=this.bbox();let r,i;for(n.width=0===n.width?1:n.width,n.height=0===n.height?1:n.height,r=this.length-1;r>=0;r--)i=this[r][0],"M"===i||"L"===i||"T"===i?(this[r][1]=(this[r][1]-n.x)*t/n.width+n.x,this[r][2]=(this[r][2]-n.y)*e/n.height+n.y):"H"===i?this[r][1]=(this[r][1]-n.x)*t/n.width+n.x:"V"===i?this[r][1]=(this[r][1]-n.y)*e/n.height+n.y:"C"===i||"S"===i||"Q"===i?(this[r][1]=(this[r][1]-n.x)*t/n.width+n.x,this[r][2]=(this[r][2]-n.y)*e/n.height+n.y,this[r][3]=(this[r][3]-n.x)*t/n.width+n.x,this[r][4]=(this[r][4]-n.y)*e/n.height+n.y,"C"===i&&(this[r][5]=(this[r][5]-n.x)*t/n.width+n.x,this[r][6]=(this[r][6]-n.y)*e/n.height+n.y)):"A"===i&&(this[r][1]=this[r][1]*t/n.width,this[r][2]=this[r][2]*e/n.height,this[r][6]=(this[r][6]-n.x)*t/n.width+n.x,this[r][7]=(this[r][7]-n.y)*e/n.height+n.y);return this}toString(){return function(t){let e="";for(let n=0,r=t.length;n<r;n++)e+=t[n][0],null!=t[n][1]&&(e+=t[n][1],null!=t[n][2]&&(e+=" ",e+=t[n][2],null!=t[n][3]&&(e+=" ",e+=t[n][3],e+=" ",e+=t[n][4],null!=t[n][5]&&(e+=" ",e+=t[n][5],e+=" ",e+=t[n][6],null!=t[n][7]&&(e+=" ",e+=t[n][7])))));return e+" "}(this)}};const On=t=>{const e=typeof t;return"number"===e?Ae:"string"===e?ie.isColor(t)?ie:Qt.test(t)?te.test(t)?En:Ce:Xt.test(t)?Ae:kn:Nn.indexOf(t.constructor)>-1?t.constructor:Array.isArray(t)?Ce:"object"===e?Sn:kn};let Mn=class{constructor(t){this._stepper=t||new ln("-"),this._from=null,this._to=null,this._type=null,this._context=null,this._morphObj=null}at(t){return this._morphObj.morph(this._from,this._to,t,this._stepper,this._context)}done(){return this._context.map(this._stepper.done).reduce((function(t,e){return t&&e}),!0)}from(t){return null==t?this._from:(this._from=this._set(t),this)}stepper(t){return null==t?this._stepper:(this._stepper=t,this)}to(t){return null==t?this._to:(this._to=this._set(t),this)}type(t){return null==t?this._type:(this._type=t,this)}_set(t){this._type||this.type(On(t));let e=new this._type(t);return this._type===ie&&(e=this._to?e[this._to[4]]():this._from?e[this._from[4]]():e),this._type===Sn&&(e=this._to?e.align(this._to):this._from?e.align(this._from):e),e=e.toConsumable(),this._morphObj=this._morphObj||new this._type,this._context=this._context||Array.apply(null,Array(e.length)).map(Object).map((function(t){return t.done=!0,t})),e}},kn=class{constructor(...t){this.init(...t)}init(t){return t=Array.isArray(t)?t[0]:t,this.value=t,this}toArray(){return[this.value]}valueOf(){return this.value}},Cn=class t{constructor(...t){this.init(...t)}init(e){return Array.isArray(e)&&(e={scaleX:e[0],scaleY:e[1],shear:e[2],rotate:e[3],translateX:e[4],translateY:e[5],originX:e[6],originY:e[7]}),Object.assign(this,t.defaults,e),this}toArray(){const t=this;return[t.scaleX,t.scaleY,t.shear,t.rotate,t.translateX,t.translateY,t.originX,t.originY]}};Cn.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0};const An=(t,e)=>t[0]<e[0]?-1:t[0]>e[0]?1:0;let Sn=class{constructor(...t){this.init(...t)}align(t){const e=this.values;for(let n=0,r=e.length;n<r;++n){if(e[n+1]===t[n+1]){if(e[n+1]===ie&&t[n+7]!==e[n+7]){const e=t[n+7],r=new ie(this.values.splice(n+3,5))[e]().toArray();this.values.splice(n+3,0,...r)}n+=e[n+2]+2;continue}if(!t[n+1])return this;const r=(new t[n+1]).toArray(),i=e[n+2]+3;e.splice(n,i,t[n],t[n+1],t[n+2],...r),n+=e[n+2]+2}return this}init(t){if(this.values=[],Array.isArray(t))return void(this.values=t.slice());t=t||{};const e=[];for(const n in t){const r=On(t[n]),i=new r(t[n]).toArray();e.push([n,r,i.length,...i])}return e.sort(An),this.values=e.reduce(((t,e)=>t.concat(e)),[]),this}toArray(){return this.values}valueOf(){const t={},e=this.values;for(;e.length;){const n=e.shift(),r=e.shift(),i=e.shift(),s=e.splice(0,i);t[n]=new r(s)}return t}};const Nn=[kn,Cn,Sn];let jn=class extends ze{constructor(t,e=t){super(It("path",t),e)}array(){return this._array||(this._array=new En(this.attr("d")))}clear(){return delete this._array,this}height(t){return null==t?this.bbox().height:this.size(this.bbox().width,t)}move(t,e){return this.attr("d",this.array().move(t,e))}plot(t){return null==t?this.array():this.clear().attr("d","string"==typeof t?t:this._array=new En(t))}size(t,e){const n=vt(this,t,e);return this.attr("d",this.array().size(n.width,n.height))}width(t){return null==t?this.bbox().width:this.size(t,this.bbox().height)}x(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}y(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}};jn.prototype.MorphArray=En,dt({Container:{path:Yt((function(t){return this.put(new jn).plot(t||new En)}))}}),zt(jn,"Path");const Tn=Object.freeze(Object.defineProperty({__proto__:null,array:function(){return this._array||(this._array=new en(this.attr("points")))},clear:function(){return delete this._array,this},move:function(t,e){return this.attr("points",this.array().move(t,e))},plot:function(t){return null==t?this.array():this.clear().attr("points","string"==typeof t?t:this._array=new en(t))},size:function(t,e){const n=vt(this,t,e);return this.attr("points",this.array().size(n.width,n.height))}},Symbol.toStringTag,{value:"Module"}));let In=class extends ze{constructor(t,e=t){super(It("polygon",t),e)}};dt({Container:{polygon:Yt((function(t){return this.put(new In).plot(t||new en)}))}}),$t(In,rn),$t(In,Tn),zt(In,"Polygon");let Rn=class extends ze{constructor(t,e=t){super(It("polyline",t),e)}};dt({Container:{polyline:Yt((function(t){return this.put(new Rn).plot(t||new en)}))}}),$t(Rn,rn),$t(Rn,Tn),zt(Rn,"Polyline");let Ln=class extends ze{constructor(t,e=t){super(It("rect",t),e)}};$t(Ln,{rx:De,ry:Pe}),dt({Container:{rect:Yt((function(t,e){return this.put(new Ln).size(t,e)}))}}),zt(Ln,"Rect");let zn=class{constructor(){this._first=null,this._last=null}first(){return this._first&&this._first.value}last(){return this._last&&this._last.value}push(t){const e=void 0!==t.next?t:{value:t,next:null,prev:null};return this._last?(e.prev=this._last,this._last.next=e,this._last=e):(this._last=e,this._first=e),e}remove(t){t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t===this._last&&(this._last=t.prev),t===this._first&&(this._first=t.next),t.prev=null,t.next=null}shift(){const t=this._first;return t?(this._first=t.next,this._first&&(this._first.prev=null),this._last=this._first?this._last:null,t.value):null}};const Dn={nextDraw:null,frames:new zn,timeouts:new zn,immediates:new zn,timer:()=>Ct.window.performance||Ct.window.Date,transforms:[],frame(t){const e=Dn.frames.push({run:t});return null===Dn.nextDraw&&(Dn.nextDraw=Ct.window.requestAnimationFrame(Dn._draw)),e},timeout(t,e){e=e||0;const n=Dn.timer().now()+e,r=Dn.timeouts.push({run:t,time:n});return null===Dn.nextDraw&&(Dn.nextDraw=Ct.window.requestAnimationFrame(Dn._draw)),r},immediate(t){const e=Dn.immediates.push(t);return null===Dn.nextDraw&&(Dn.nextDraw=Ct.window.requestAnimationFrame(Dn._draw)),e},cancelFrame(t){null!=t&&Dn.frames.remove(t)},clearTimeout(t){null!=t&&Dn.timeouts.remove(t)},cancelImmediate(t){null!=t&&Dn.immediates.remove(t)},_draw(t){let e=null;const n=Dn.timeouts.last();for(;(e=Dn.timeouts.shift())&&(t>=e.time?e.run():Dn.timeouts.push(e),e!==n););let r=null;const i=Dn.frames.last();for(;r!==i&&(r=Dn.frames.shift());)r.run(t);let s=null;for(;s=Dn.immediates.shift();)s();Dn.nextDraw=Dn.timeouts.first()||Dn.frames.first()?Ct.window.requestAnimationFrame(Dn._draw):null}},Pn=function(t){const e=t.start,n=t.runner.duration();return{start:e,duration:n,end:e+n,runner:t.runner}},Fn=function(){const t=Ct.window;return(t.performance||t.Date).now()};let $n=class extends be{constructor(t=Fn){super(),this._timeSource=t,this.terminate()}active(){return!!this._nextFrame}finish(){return this.time(this.getEndTimeOfTimeline()+1),this.pause()}getEndTime(){const t=this.getLastRunnerInfo(),e=t?t.runner.duration():0;return(t?t.start:this._time)+e}getEndTimeOfTimeline(){const t=this._runners.map((t=>t.start+t.runner.duration()));return Math.max(0,...t)}getLastRunnerInfo(){return this.getRunnerInfoById(this._lastRunnerId)}getRunnerInfoById(t){return this._runners[this._runnerIds.indexOf(t)]||null}pause(){return this._paused=!0,this._continue()}persist(t){return null==t?this._persist:(this._persist=t,this)}play(){return this._paused=!1,this.updateTime()._continue()}reverse(t){const e=this.speed();if(null==t)return this.speed(-e);const n=Math.abs(e);return this.speed(t?-n:n)}schedule(t,e,n){if(null==t)return this._runners.map(Pn);let r=0;const i=this.getEndTime();if(e=e||0,null==n||"last"===n||"after"===n)r=i;else if("absolute"===n||"start"===n)r=e,e=0;else if("now"===n)r=this._time;else if("relative"===n){const n=this.getRunnerInfoById(t.id);n&&(r=n.start+e,e=0)}else{if("with-last"!==n)throw new Error('Invalid value for the "when" parameter');{const t=this.getLastRunnerInfo();r=t?t.start:this._time}}t.unschedule(),t.timeline(this);const s=t.persist(),o={persist:null===s?this._persist:s,start:r+e,runner:t};return this._lastRunnerId=t.id,this._runners.push(o),this._runners.sort(((t,e)=>t.start-e.start)),this._runnerIds=this._runners.map((t=>t.runner.id)),this.updateTime()._continue(),this}seek(t){return this.time(this._time+t)}source(t){return null==t?this._timeSource:(this._timeSource=t,this)}speed(t){return null==t?this._speed:(this._speed=t,this)}stop(){return this.time(0),this.pause()}time(t){return null==t?this._time:(this._time=t,this._continue(!0))}unschedule(t){const e=this._runnerIds.indexOf(t.id);return e<0||(this._runners.splice(e,1),this._runnerIds.splice(e,1),t.timeline(null)),this}updateTime(){return this.active()||(this._lastSourceTime=this._timeSource()),this}_continue(t=!1){return Dn.cancelFrame(this._nextFrame),this._nextFrame=null,t?this._stepImmediate():(this._paused||(this._nextFrame=Dn.frame(this._step)),this)}_stepFn(t=!1){const e=this._timeSource();let n=e-this._lastSourceTime;t&&(n=0);const r=this._speed*n+(this._time-this._lastStepTime);this._lastSourceTime=e,t||(this._time+=r,this._time=this._time<0?0:this._time),this._lastStepTime=this._time,this.fire("time",this._time);for(let s=this._runners.length;s--;){const t=this._runners[s],e=t.runner;this._time-t.start<=0&&e.reset()}let i=!1;for(let s=0,o=this._runners.length;s<o;s++){const t=this._runners[s],e=t.runner;let n=r;const u=this._time-t.start;if(u<=0){i=!0;continue}if(u<n&&(n=u),!e.active())continue;if(e.step(n).done){if(!0!==t.persist){e.duration()-e.time()+this._time+t.persist<this._time&&(e.unschedule(),--s,--o)}}else i=!0}return i&&!(this._speed<0&&0===this._time)||this._runnerIds.length&&this._speed<0&&this._time>0?this._continue():(this.pause(),this.fire("finished")),this}terminate(){this._startTime=0,this._speed=1,this._persist=0,this._nextFrame=null,this._paused=!0,this._runners=[],this._runnerIds=[],this._lastRunnerId=-1,this._time=0,this._lastSourceTime=0,this._lastStepTime=0,this._step=this._stepFn.bind(this,!1),this._stepImmediate=this._stepFn.bind(this,!0)}};dt({Element:{timeline:function(t){return null==t?(this._timeline=this._timeline||new $n,this._timeline):(this._timeline=t,this)}}});let Yn=class t extends be{constructor(e){super(),this.id=t.id++,e="function"==typeof(e=null==e?Ee:e)?new cn(e):e,this._element=null,this._timeline=null,this.done=!1,this._queue=[],this._duration="number"==typeof e&&e,this._isDeclarative=e instanceof cn,this._stepper=this._isDeclarative?e:new ln,this._history={},this.enabled=!0,this._time=0,this._lastTime=0,this._reseted=!0,this.transforms=new ue,this.transformId=1,this._haveReversed=!1,this._reverse=!1,this._loopsDone=0,this._swing=!1,this._wait=0,this._times=1,this._frameId=null,this._persist=!!this._isDeclarative||null}static sanitise(t,e,n){let r=1,i=!1,s=0;return e=e??Me,n=n||"last","object"!=typeof(t=t??Ee)||t instanceof hn||(e=t.delay??e,n=t.when??n,i=t.swing||i,r=t.times??r,s=t.wait??s,t=t.duration??Ee),{duration:t,delay:e,swing:i,times:r,wait:s,when:n}}active(t){return null==t?this.enabled:(this.enabled=t,this)}addTransform(t){return this.transforms.lmultiplyO(t),this}after(t){return this.on("finished",t)}animate(e,n,r){const i=t.sanitise(e,n,r),s=new t(i.duration);return this._timeline&&s.timeline(this._timeline),this._element&&s.element(this._element),s.loop(i).schedule(i.delay,i.when)}clearTransform(){return this.transforms=new ue,this}clearTransformsFromQueue(){this.done&&this._timeline&&this._timeline._runnerIds.includes(this.id)||(this._queue=this._queue.filter((t=>!t.isTransform)))}delay(t){return this.animate(0,t)}duration(){return this._times*(this._wait+this._duration)-this._wait}during(t){return this.queue(null,t)}ease(t){return this._stepper=new ln(t),this}element(t){return null==t?this._element:(this._element=t,t._prepareRunner(),this)}finish(){return this.step(1/0)}loop(t,e,n){return"object"==typeof t&&(e=t.swing,n=t.wait,t=t.times),this._times=t||1/0,this._swing=e||!1,this._wait=n||0,!0===this._times&&(this._times=1/0),this}loops(t){const e=this._duration+this._wait;if(null==t){const t=Math.floor(this._time/e),n=(this._time-t*e)/this._duration;return Math.min(t+n,this._times)}const n=t%1,r=e*Math.floor(t)+this._duration*n;return this.time(r)}persist(t){return null==t?this._persist:(this._persist=t,this)}position(t){const e=this._time,n=this._duration,r=this._wait,i=this._times,s=this._swing,o=this._reverse;let u;if(null==t){const t=function(t){const e=s*Math.floor(t%(2*(r+n))/(r+n)),i=e&&!o||!e&&o,u=Math.pow(-1,i)*(t%(r+n))/n+i;return Math.max(Math.min(u,1),0)},a=i*(r+n)-r;return u=e<=0?Math.round(t(1e-5)):e<a?t(e):Math.round(t(a-1e-5)),u}const a=Math.floor(this.loops()),h=s&&a%2==0;return u=a+(h&&!o||o&&h?t:1-t),this.loops(u)}progress(t){return null==t?Math.min(1,this._time/this.duration()):this.time(t*this.duration())}queue(t,e,n,r){this._queue.push({initialiser:t||xe,runner:e||xe,retarget:n,isTransform:r,initialised:!1,finished:!1});return this.timeline()&&this.timeline()._continue(),this}reset(){return this._reseted||(this.time(0),this._reseted=!0),this}reverse(t){return this._reverse=null==t?!this._reverse:t,this}schedule(t,e,n){if(t instanceof $n||(n=e,e=t,t=this.timeline()),!t)throw Error("Runner cannot be scheduled without timeline");return t.schedule(this,e,n),this}step(t){if(!this.enabled)return this;t=null==t?16:t,this._time+=t;const e=this.position(),n=this._lastPosition!==e&&this._time>=0;this._lastPosition=e;const r=this.duration(),i=this._lastTime<=0&&this._time>0,s=this._lastTime<r&&this._time>=r;this._lastTime=this._time,i&&this.fire("start",this);const o=this._isDeclarative;this.done=!o&&!s&&this._time>=r,this._reseted=!1;let u=!1;return(n||o)&&(this._initialise(n),this.transforms=new ue,u=this._run(o?t:e),this.fire("step",this)),this.done=this.done||u&&o,s&&this.fire("finished",this),this}time(t){if(null==t)return this._time;const e=t-this._time;return this.step(e),this}timeline(t){return void 0===t?this._timeline:(this._timeline=t,this)}unschedule(){const t=this.timeline();return t&&t.unschedule(this),this}_initialise(t){if(t||this._isDeclarative)for(let e=0,n=this._queue.length;e<n;++e){const n=this._queue[e],r=this._isDeclarative||!n.initialised&&t;t=!n.finished,r&&t&&(n.initialiser.call(this),n.initialised=!0)}}_rememberMorpher(t,e){if(this._history[t]={morpher:e,caller:this._queue[this._queue.length-1]},this._isDeclarative){const t=this.timeline();t&&t.play()}}_run(t){let e=!0;for(let n=0,r=this._queue.length;n<r;++n){const r=this._queue[n],i=r.runner.call(this,t);r.finished=r.finished||!0===i,e=e&&r.finished}return e}_tryRetarget(t,e,n){if(this._history[t]){if(!this._history[t].caller.initialised){const e=this._queue.indexOf(this._history[t].caller);return this._queue.splice(e,1),!1}this._history[t].caller.retarget?this._history[t].caller.retarget.call(this,e,n):this._history[t].morpher.to(e),this._history[t].caller.finished=!1;const r=this.timeline();return r&&r.play(),!0}return!1}};Yn.id=0;let Xn=class{constructor(t=new ue,e=-1,n=!0){this.transforms=t,this.id=e,this.done=n}clearTransformsFromQueue(){}};$t([Yn,Xn],{mergeWith(t){return new Xn(t.transforms.lmultiply(this.transforms),t.id)}});const Gn=(t,e)=>t.lmultiplyO(e),Bn=t=>t.transforms;function Wn(){const t=this._transformationRunners.runners.map(Bn).reduce(Gn,new ue);this.transform(t),this._transformationRunners.merge(),1===this._transformationRunners.length()&&(this._frameId=null)}let qn=class{constructor(){this.runners=[],this.ids=[]}add(t){if(this.runners.includes(t))return;const e=t.id+1;return this.runners.push(t),this.ids.push(e),this}clearBefore(t){const e=this.ids.indexOf(t+1)||1;return this.ids.splice(0,e,0),this.runners.splice(0,e,new Xn).forEach((t=>t.clearTransformsFromQueue())),this}edit(t,e){const n=this.ids.indexOf(t+1);return this.ids.splice(n,1,t+1),this.runners.splice(n,1,e),this}getByID(t){return this.runners[this.ids.indexOf(t+1)]}length(){return this.ids.length}merge(){let t=null;for(let e=0;e<this.runners.length;++e){const n=this.runners[e];if(t&&n.done&&t.done&&(!n._timeline||!n._timeline._runnerIds.includes(n.id))&&(!t._timeline||!t._timeline._runnerIds.includes(t.id))){this.remove(n.id);const r=n.mergeWith(t);this.edit(t.id,r),t=r,--e}else t=n}return this}remove(t){const e=this.ids.indexOf(t+1);return this.ids.splice(e,1),this.runners.splice(e,1),this}};dt({Element:{animate(t,e,n){const r=Yn.sanitise(t,e,n),i=this.timeline();return new Yn(r.duration).loop(r).element(this).timeline(i.play()).schedule(r.delay,r.when)},delay(t,e){return this.animate(0,t,e)},_clearTransformRunnersBefore(t){this._transformationRunners.clearBefore(t.id)},_currentTransform(t){return this._transformationRunners.runners.filter((e=>e.id<=t.id)).map(Bn).reduce(Gn,new ue)},_addRunner(t){this._transformationRunners.add(t),Dn.cancelImmediate(this._frameId),this._frameId=Dn.immediate(Wn.bind(this))},_prepareRunner(){null==this._frameId&&(this._transformationRunners=(new qn).add(new Xn(new ue(this))))}}});$t(Yn,{attr(t,e){return this.styleAttr("attr",t,e)},css(t,e){return this.styleAttr("css",t,e)},styleAttr(t,e,n){if("string"==typeof e)return this.styleAttr(t,{[e]:n});let r=e;if(this._tryRetarget(t,r))return this;let i=new Mn(this._stepper).to(r),s=Object.keys(r);return this.queue((function(){i=i.from(this.element()[t](s))}),(function(e){return this.element()[t](i.at(e).valueOf()),i.done()}),(function(e){const n=Object.keys(e),o=(u=s,n.filter((t=>!u.includes(t))));var u;if(o.length){const e=this.element()[t](o),n=new Sn(i.from()).valueOf();Object.assign(n,e),i.from(n)}const a=new Sn(i.to()).valueOf();Object.assign(a,e),i.to(a),s=n,r=e})),this._rememberMorpher(t,i),this},zoom(t,e){if(this._tryRetarget("zoom",t,e))return this;let n=new Mn(this._stepper).to(new Ae(t));return this.queue((function(){n=n.from(this.element().zoom())}),(function(t){return this.element().zoom(n.at(t),e),n.done()}),(function(t,r){e=r,n.to(t)})),this._rememberMorpher("zoom",n),this},transform(t,e,n){if(e=t.relative||e,this._isDeclarative&&!e&&this._tryRetarget("transform",t))return this;const r=ue.isMatrixLike(t);n=null!=t.affine?t.affine:null!=n?n:!r;const i=new Mn(this._stepper).type(n?Cn:ue);let s,o,u,a,h;return this.queue((function(){o=o||this.element(),s=s||wt(t,o),h=new ue(e?void 0:o),o._addRunner(this),e||o._clearTransformRunnersBefore(this)}),(function(l){e||this.clearTransform();const{x:c,y:f}=new se(s).transform(o._currentTransform(this));let d=new ue({...t,origin:[c,f]}),p=this._isDeclarative&&u?u:h;if(n){d=d.decompose(c,f),p=p.decompose(c,f);const t=d.rotate,e=p.rotate,n=[t-360,t,t+360],r=n.map((t=>Math.abs(t-e))),i=Math.min(...r),s=r.indexOf(i);d.rotate=n[s]}e&&(r||(d.rotate=t.rotate||0),this._isDeclarative&&a&&(p.rotate=a)),i.from(p),i.to(d);const m=i.at(l);return a=m.rotate,u=new ue(m),this.addTransform(u),o._addRunner(this),i.done()}),(function(e){(e.origin||"center").toString()!==(t.origin||"center").toString()&&(s=wt(e,o)),t={...e,origin:s}}),!0),this._isDeclarative&&this._rememberMorpher("transform",i),this},x(t){return this._queueNumber("x",t)},y(t){return this._queueNumber("y",t)},ax(t){return this._queueNumber("ax",t)},ay(t){return this._queueNumber("ay",t)},dx(t=0){return this._queueNumberDelta("x",t)},dy(t=0){return this._queueNumberDelta("y",t)},dmove(t,e){return this.dx(t).dy(e)},_queueNumberDelta(t,e){if(e=new Ae(e),this._tryRetarget(t,e))return this;const n=new Mn(this._stepper).to(e);let r=null;return this.queue((function(){r=this.element()[t](),n.from(r),n.to(r+e)}),(function(e){return this.element()[t](n.at(e)),n.done()}),(function(t){n.to(r+new Ae(t))})),this._rememberMorpher(t,n),this},_queueObject(t,e){if(this._tryRetarget(t,e))return this;const n=new Mn(this._stepper).to(e);return this.queue((function(){n.from(this.element()[t]())}),(function(e){return this.element()[t](n.at(e)),n.done()})),this._rememberMorpher(t,n),this},_queueNumber(t,e){return this._queueObject(t,new Ae(e))},cx(t){return this._queueNumber("cx",t)},cy(t){return this._queueNumber("cy",t)},move(t,e){return this.x(t).y(e)},amove(t,e){return this.ax(t).ay(e)},center(t,e){return this.cx(t).cy(e)},size(t,e){let n;return t&&e||(n=this._element.bbox()),t||(t=n.width/n.height*e),e||(e=n.height/n.width*t),this.width(t).height(e)},width(t){return this._queueNumber("width",t)},height(t){return this._queueNumber("height",t)},plot(t,e,n,r){if(4===arguments.length)return this.plot([t,e,n,r]);if(this._tryRetarget("plot",t))return this;const i=new Mn(this._stepper).type(this._element.MorphArray).to(t);return this.queue((function(){i.from(this._element.array())}),(function(t){return this._element.plot(i.at(t)),i.done()})),this._rememberMorpher("plot",i),this},leading(t){return this._queueNumber("leading",t)},viewbox(t,e,n,r){return this._queueObject("viewbox",new le(t,e,n,r))},update(t){return"object"!=typeof t?this.update({offset:arguments[0],color:arguments[1],opacity:arguments[2]}):(null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",t.offset),this)}}),$t(Yn,{rx:De,ry:Pe,from:He,to:Ue}),zt(Yn,"Runner");let Vn=class extends Re{constructor(t,e=t){super(It("svg",t),e),this.namespace()}defs(){return this.isRoot()?Rt(this.node.querySelector("defs"))||this.put(new Le):this.root().defs()}isRoot(){return!this.node.parentNode||!(this.node.parentNode instanceof Ct.window.SVGElement)&&"#document-fragment"!==this.node.parentNode.nodeName}namespace(){return this.isRoot()?this.attr({xmlns:Ot,version:"1.1"}).attr("xmlns:xlink",kt,Mt):this.root().namespace()}removeNamespace(){return this.attr({xmlns:null,version:null}).attr("xmlns:xlink",null,Mt).attr("xmlns:svgjs",null,Mt)}root(){return this.isRoot()?this:super.root()}};dt({Container:{nested:Yt((function(){return this.put(new Vn)}))}}),zt(Vn,"Svg",!0);let Hn=class extends Re{constructor(t,e=t){super(It("symbol",t),e)}};dt({Container:{symbol:Yt((function(){return this.put(new Hn)}))}}),zt(Hn,"Symbol");const Un=Object.freeze(Object.defineProperty({__proto__:null,amove:function(t,e){return this.ax(t).ay(e)},ax:function(t){return this.attr("x",t)},ay:function(t){return this.attr("y",t)},build:function(t){return this._build=!!t,this},center:function(t,e,n=this.bbox()){return this.cx(t,n).cy(e,n)},cx:function(t,e=this.bbox()){return null==t?e.cx:this.attr("x",this.attr("x")+t-e.cx)},cy:function(t,e=this.bbox()){return null==t?e.cy:this.attr("y",this.attr("y")+t-e.cy)},length:function(){return this.node.getComputedTextLength()},move:function(t,e,n=this.bbox()){return this.x(t,n).y(e,n)},plain:function(t){return!1===this._build&&this.clear(),this.node.appendChild(Ct.document.createTextNode(t)),this},x:function(t,e=this.bbox()){return null==t?e.x:this.attr("x",this.attr("x")+t-e.x)},y:function(t,e=this.bbox()){return null==t?e.y:this.attr("y",this.attr("y")+t-e.y)}},Symbol.toStringTag,{value:"Module"}));let Zn=class extends ze{constructor(t,e=t){super(It("text",t),e),this.dom.leading=this.dom.leading??new Ae(1.3),this._rebuild=!0,this._build=!1}leading(t){return null==t?this.dom.leading:(this.dom.leading=new Ae(t),this.rebuild())}rebuild(t){if("boolean"==typeof t&&(this._rebuild=t),this._rebuild){const t=this;let e=0;const n=this.dom.leading;this.each((function(r){if(xt(this.node))return;const i=Ct.window.getComputedStyle(this.node).getPropertyValue("font-size"),s=n*new Ae(i);this.dom.newLined&&(this.attr("x",t.attr("x")),"\n"===this.text()?e+=s:(this.attr("dy",r?s+e:0),e=0))})),this.fire("rebuild")}return this}setData(t){return this.dom=t,this.dom.leading=new Ae(t.leading||1.3),this}writeDataToDom(){return Et(this,this.dom,{leading:1.3}),this}text(t){if(void 0===t){const e=this.node.childNodes;let n=0;t="";for(let r=0,i=e.length;r<i;++r)"textPath"===e[r].nodeName||xt(e[r])?0===r&&(n=r+1):(r!==n&&3!==e[r].nodeType&&!0===Rt(e[r]).dom.newLined&&(t+="\n"),t+=e[r].textContent);return t}if(this.clear().build(!0),"function"==typeof t)t.call(this,this);else for(let e=0,n=(t=(t+"").split("\n")).length;e<n;e++)this.newLine(t[e]);return this.build(!1).rebuild()}};$t(Zn,Un),dt({Container:{text:Yt((function(t=""){return this.put(new Zn).text(t)})),plain:Yt((function(t=""){return this.put(new Zn).plain(t)}))}}),zt(Zn,"Text");let Kn=class extends ze{constructor(t,e=t){super(It("tspan",t),e),this._build=!1}dx(t){return this.attr("dx",t)}dy(t){return this.attr("dy",t)}newLine(){this.dom.newLined=!0;const t=this.parent();if(!(t instanceof Zn))return this;const e=t.index(this),n=Ct.window.getComputedStyle(this.node).getPropertyValue("font-size"),r=t.dom.leading*new Ae(n);return this.dy(e?r:0).attr("x",t.x())}text(t){return null==t?this.node.textContent+(this.dom.newLined?"\n":""):("function"==typeof t?(this.clear().build(!0),t.call(this,this),this.build(!1)):this.plain(t),this)}};$t(Kn,Un),dt({Tspan:{tspan:Yt((function(t=""){const e=new Kn;return this._build||this.clear(),this.put(e).text(t)}))},Text:{newLine:function(t=""){return this.tspan(t).newLine()}}}),zt(Kn,"Tspan");let Jn=class extends ze{constructor(t,e=t){super(It("circle",t),e)}radius(t){return this.attr("r",t)}rx(t){return this.attr("r",t)}ry(t){return this.rx(t)}size(t){return this.radius(new Ae(t).divide(2))}};$t(Jn,{x:Fe,y:$e,cx:Ye,cy:Xe,width:Ge,height:Be}),dt({Container:{circle:Yt((function(t=0){return this.put(new Jn).size(t).move(0,0)}))}}),zt(Jn,"Circle");let Qn=class extends Re{constructor(t,e=t){super(It("clipPath",t),e)}remove(){return this.targets().forEach((function(t){t.unclip()})),super.remove()}targets(){return pe("svg [clip-path*="+this.id()+"]")}};dt({Container:{clip:Yt((function(){return this.defs().put(new Qn)}))},Element:{clipper(){return this.reference("clip-path")},clipWith(t){const e=t instanceof Qn?t:this.parent().clip().add(t);return this.attr("clip-path","url(#"+e.id()+")")},unclip(){return this.attr("clip-path",null)}}}),zt(Qn,"ClipPath");let tr=class extends Te{constructor(t,e=t){super(It("foreignObject",t),e)}};dt({Container:{foreignObject:Yt((function(t,e){return this.put(new tr).size(t,e)}))}}),zt(tr,"ForeignObject");const er=Object.freeze(Object.defineProperty({__proto__:null,dmove:function(t,e){return this.children().forEach((n=>{let r;try{r=n.node instanceof Ct.window.SVGSVGElement?new le(n.attr(["x","y","width","height"])):n.bbox()}catch(u){return}const i=new ue(n),s=i.translate(t,e).transform(i.inverse()),o=new se(r.x,r.y).transform(s);n.move(o.x,o.y)})),this},dx:function(t){return this.dmove(t,0)},dy:function(t){return this.dmove(0,t)},height:function(t,e=this.bbox()){return null==t?e.height:this.size(e.width,t,e)},move:function(t=0,e=0,n=this.bbox()){const r=t-n.x,i=e-n.y;return this.dmove(r,i)},size:function(t,e,n=this.bbox()){const r=vt(this,t,e,n),i=r.width/n.width,s=r.height/n.height;return this.children().forEach((t=>{const e=new se(n).transform(new ue(t).inverse());t.scale(i,s,e.x,e.y)})),this},width:function(t,e=this.bbox()){return null==t?e.width:this.size(t,e.height,e)},x:function(t,e=this.bbox()){return null==t?e.x:this.move(t,e.y,e)},y:function(t,e=this.bbox()){return null==t?e.y:this.move(e.x,t,e)}},Symbol.toStringTag,{value:"Module"}));let nr=class extends Re{constructor(t,e=t){super(It("g",t),e)}};$t(nr,er),dt({Container:{group:Yt((function(){return this.put(new nr)}))}}),zt(nr,"G");let rr=class extends Re{constructor(t,e=t){super(It("a",t),e)}target(t){return this.attr("target",t)}to(t){return this.attr("href",t,kt)}};$t(rr,er),dt({Container:{link:Yt((function(t){return this.put(new rr).to(t)}))},Element:{unlink(){const t=this.linker();if(!t)return this;const e=t.parent();if(!e)return this.remove();const n=e.index(t);return e.add(this,n),t.remove(),this},linkTo(t){let e=this.linker();return e||(e=new rr,this.wrap(e)),"function"==typeof t?t.call(e,e):e.to(t),this},linker(){const t=this.parent();return t&&"a"===t.node.nodeName.toLowerCase()?t:null}}}),zt(rr,"A");let ir=class extends Re{constructor(t,e=t){super(It("mask",t),e)}remove(){return this.targets().forEach((function(t){t.unmask()})),super.remove()}targets(){return pe("svg [mask*="+this.id()+"]")}};dt({Container:{mask:Yt((function(){return this.defs().put(new ir)}))},Element:{masker(){return this.reference("mask")},maskWith(t){const e=t instanceof ir?t:this.parent().mask().add(t);return this.attr("mask","url(#"+e.id()+")")},unmask(){return this.attr("mask",null)}}}),zt(ir,"Mask");let sr=class extends Te{constructor(t,e=t){super(It("stop",t),e)}update(t){return("number"==typeof t||t instanceof Ae)&&(t={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",new Ae(t.offset)),this}};dt({Gradient:{stop:function(t,e,n){return this.put(new sr).update(t,e,n)}}}),zt(sr,"Stop");let or=class extends Te{constructor(t,e=t){super(It("style",t),e)}addText(t=""){return this.node.textContent+=t,this}font(t,e,n={}){return this.rule("@font-face",{fontFamily:t,src:e,...n})}rule(t,e){return this.addText(function(t,e){if(!t)return"";if(!e)return t;let n=t+"{";for(const r in e)n+=r.replace(/([A-Z])/g,(function(t,e){return"-"+e.toLowerCase()}))+":"+e[r]+";";return n+="}",n}(t,e))}};dt("Dom",{style(t,e){return this.put(new or).rule(t,e)},fontface(t,e,n){return this.put(new or).font(t,e,n)}}),zt(or,"Style");let ur=class extends Zn{constructor(t,e=t){super(It("textPath",t),e)}array(){const t=this.track();return t?t.array():null}plot(t){const e=this.track();let n=null;return e&&(n=e.plot(t)),null==t?n:this}track(){return this.reference("href")}};dt({Container:{textPath:Yt((function(t,e){return t instanceof Zn||(t=this.text(t)),t.path(e)}))},Text:{path:Yt((function(t,e=!0){const n=new ur;let r;if(t instanceof jn||(t=this.defs().path(t)),n.attr("href","#"+t,kt),e)for(;r=this.node.firstChild;)n.node.appendChild(r);return this.put(n)})),textPath(){return this.findOne("textPath")}},Path:{text:Yt((function(t){return t instanceof Zn||(t=(new Zn).addTo(this.parent()).text(t)),t.path(this)})),targets(){return pe("svg textPath").filter((t=>(t.attr("href")||"").includes(this.id())))}}}),ur.prototype.MorphArray=En,zt(ur,"TextPath");let ar=class extends ze{constructor(t,e=t){super(It("use",t),e)}use(t,e){return this.attr("href",(e||"")+"#"+t,kt)}};dt({Container:{use:Yt((function(t,e){return this.put(new ar).use(t,e)}))}}),zt(ar,"Use"),$t([Vn,Hn,Qe,Je,on],pt("viewbox")),$t([sn,Rn,In,jn],pt("marker")),$t(Zn,pt("Text")),$t(jn,pt("Path")),$t(Le,pt("Defs")),$t([Zn,Kn],pt("Tspan")),$t([Ln,qe,Ke,Yn],pt("radius")),$t(be,pt("EventTarget")),$t(je,pt("Dom")),$t(Te,pt("Element")),$t(ze,pt("Shape")),$t([Re,Ve],pt("Container")),$t(Ke,pt("Gradient")),$t(Yn,pt("Runner")),fe.extend([...new Set(ft)]),function(t=[]){Nn.push(...[].concat(t))}([Ae,ie,le,ue,Ce,en,En,se]),$t(Nn,{to(t){return(new Mn).type(this.constructor).from(this.toArray()).to(t)},fromArray(t){return this.init(t),this},toConsumable(){return this.toArray()},morph(t,e,n,r,i){return this.fromArray(t.map((function(t,s){return r.step(t,e[s],n,i[s],i)})))}});const hr={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 lr{constructor(t){this.element=t}createToolbarItem(t,e){const n=document.createElement("div"),r=new Image;r.src=e,n.id=t,n.append(r);const i=nt({alignItems:"center",backgroundColor:"#FFFFFF",border:"1px solid #BCBCBC",cursor:"pointer",display:"flex",height:"30px",justifyContent:"center",width:"30px"});return n.setAttribute("style",i),n}render({enableExport:t=!1,enableFitscreen:e=!1,enableZoom:n=!1,onExport:r=rt,onFitscreen:i=rt,onZoom:s=rt}){var o;const u=document.createElement("div");u.id="toolbar";const a=nt({display:"flex",gap:"5px",position:"absolute",right:"10px",top:"10px"});if(u.setAttribute("style",a),t){const t=this.createToolbarItem("export",hr.export);t.addEventListener("click",(()=>{r()})),u.append(t)}if(n){const t=this.createToolbarItem("zoom-in",hr["zoom-in"]),e=this.createToolbarItem("zoom-out",hr["zoom-out"]);t.addEventListener("click",(()=>{s(.1)})),e.addEventListener("click",(()=>{s(-.1)})),u.append(t,e)}if(e){const t=this.createToolbarItem("fit-screen",hr["fit-screen"]);t.addEventListener("click",(()=>{i()})),u.append(t)}null==(o=this.element)||o.append(u)}}const cr=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()}};cr.WATERMARK_CLASS="apexgantt-watermark",cr.WATERMARK_TEXT="Powered by apexcharts.com";let fr=cr;var dr="\0",pr="\0",mr="";function gr(t,e){t[e]?t[e]++:t[e]=1}function yr(t,e){--t[e]||delete t[e]}function _r(t,e,n,r){var i=""+e,s=""+n;if(!t&&i>s){var o=i;i=s,s=o}return i+mr+s+mr+(void 0===r?dr:r)}function vr(t,e){return _r(t,e.v,e.w,e.name)}var wr=class{constructor(t){n(this,"_isDirected",!0),n(this,"_isMultigraph",!1),n(this,"_isCompound",!1),n(this,"_label"),n(this,"_defaultNodeLabelFn",(()=>{})),n(this,"_defaultEdgeLabelFn",(()=>{})),n(this,"_nodes",{}),n(this,"_in",{}),n(this,"_preds",{}),n(this,"_out",{}),n(this,"_sucs",{}),n(this,"_edgeObjs",{}),n(this,"_edgeLabels",{}),n(this,"_nodeCount",0),n(this,"_edgeCount",0),n(this,"_parent"),n(this,"_children"),t&&(this._isDirected=!Object.hasOwn(t,"directed")||t.directed,this._isMultigraph=!!Object.hasOwn(t,"multigraph")&&t.multigraph,this._isCompound=!!Object.hasOwn(t,"compound")&&t.compound),this._isCompound&&(this._parent={},this._children={},this._children[pr]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(t){return this._label=t,this}graph(){return this._label}setDefaultNodeLabel(t){return this._defaultNodeLabelFn=t,"function"!=typeof t&&(this._defaultNodeLabelFn=()=>t),this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){var t=this;return this.nodes().filter((e=>0===Object.keys(t._in[e]).length))}sinks(){var t=this;return this.nodes().filter((e=>0===Object.keys(t._out[e]).length))}setNodes(t,e){var n=arguments,r=this;return t.forEach((function(t){n.length>1?r.setNode(t,e):r.setNode(t)})),this}setNode(t,e){return Object.hasOwn(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]=pr,this._children[t]={},this._children[pr][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)}node(t){return this._nodes[t]}hasNode(t){return Object.hasOwn(this._nodes,t)}removeNode(t){var e=this;if(Object.hasOwn(this._nodes,t)){var n=t=>e.removeEdge(e._edgeObjs[t]);delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],this.children(t).forEach((function(t){e.setParent(t)})),delete this._children[t]),Object.keys(this._in[t]).forEach(n),delete this._in[t],delete this._preds[t],Object.keys(this._out[t]).forEach(n),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this}setParent(t,e){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(void 0===e)e=pr;else{for(var n=e+="";void 0!==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}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound){var e=this._parent[t];if(e!==pr)return e}}children(t=pr){if(this._isCompound){var e=this._children[t];if(e)return Object.keys(e)}else{if(t===pr)return this.nodes();if(this.hasNode(t))return[]}}predecessors(t){var e=this._preds[t];if(e)return Object.keys(e)}successors(t){var e=this._sucs[t];if(e)return Object.keys(e)}neighbors(t){var e=this.predecessors(t);if(e){const r=new Set(e);for(var n of this.successors(t))r.add(n);return Array.from(r.values())}}isLeaf(t){return 0===(this.isDirected()?this.successors(t):this.neighbors(t)).length}filterNodes(t){var e=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});e.setGraph(this.graph());var n=this;Object.entries(this._nodes).forEach((function([n,r]){t(n)&&e.setNode(n,r)})),Object.values(this._edgeObjs).forEach((function(t){e.hasNode(t.v)&&e.hasNode(t.w)&&e.setEdge(t,n.edge(t))}));var r={};function i(t){var s=n.parent(t);return void 0===s||e.hasNode(s)?(r[t]=s,s):s in r?r[s]:i(s)}return this._isCompound&&e.nodes().forEach((t=>e.setParent(t,i(t)))),e}setDefaultEdgeLabel(t){return this._defaultEdgeLabelFn=t,"function"!=typeof t&&(this._defaultEdgeLabelFn=()=>t),this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(t,e){var n=this,r=arguments;return t.reduce((function(t,i){return r.length>1?n.setEdge(t,i,e):n.setEdge(t,i),i})),this}setEdge(){var t,e,n,r,i=!1,s=arguments[0];"object"==typeof s&&null!==s&&"v"in s?(t=s.v,e=s.w,n=s.name,2===arguments.length&&(r=arguments[1],i=!0)):(t=s,e=arguments[1],n=arguments[3],arguments.length>2&&(r=arguments[2],i=!0)),t=""+t,e=""+e,void 0!==n&&(n=""+n);var o=_r(this._isDirected,t,e,n);if(Object.hasOwn(this._edgeLabels,o))return i&&(this._edgeLabels[o]=r),this;if(void 0!==n&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(e),this._edgeLabels[o]=i?r:this._defaultEdgeLabelFn(t,e,n);var u=function(t,e,n,r){var i=""+e,s=""+n;if(!t&&i>s){var o=i;i=s,s=o}var u={v:i,w:s};r&&(u.name=r);return u}(this._isDirected,t,e,n);return t=u.v,e=u.w,Object.freeze(u),this._edgeObjs[o]=u,gr(this._preds[e],t),gr(this._sucs[t],e),this._in[e][o]=u,this._out[t][o]=u,this._edgeCount++,this}edge(t,e,n){var r=1===arguments.length?vr(this._isDirected,arguments[0]):_r(this._isDirected,t,e,n);return this._edgeLabels[r]}edgeAsObj(){const t=this.edge(...arguments);return"object"!=typeof t?{label:t}:t}hasEdge(t,e,n){var r=1===arguments.length?vr(this._isDirected,arguments[0]):_r(this._isDirected,t,e,n);return Object.hasOwn(this._edgeLabels,r)}removeEdge(t,e,n){var r=1===arguments.length?vr(this._isDirected,arguments[0]):_r(this._isDirected,t,e,n),i=this._edgeObjs[r];return i&&(t=i.v,e=i.w,delete this._edgeLabels[r],delete this._edgeObjs[r],yr(this._preds[e],t),yr(this._sucs[t],e),delete this._in[e][r],delete this._out[t][r],this._edgeCount--),this}inEdges(t,e){var n=this._in[t];if(n){var r=Object.values(n);return e?r.filter((t=>t.v===e)):r}}outEdges(t,e){var n=this._out[t];if(n){var r=Object.values(n);return e?r.filter((t=>t.w===e)):r}}nodeEdges(t,e){var n=this.inEdges(t,e);if(n)return n.concat(this.outEdges(t,e))}},br={Graph:wr,version:"2.2.4"},xr=wr,Er={write:function(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:Or(t),edges:Mr(t)};void 0!==t.graph()&&(e.value=structuredClone(t.graph()));return e},read:function(t){var e=new xr(t.options).setGraph(t.value);return t.nodes.forEach((function(t){e.setNode(t.v,t.value),t.parent&&e.setParent(t.v,t.parent)})),t.edges.forEach((function(t){e.setEdge({v:t.v,w:t.w,name:t.name},t.value)})),e}};function Or(t){return t.nodes().map((function(e){var n=t.node(e),r=t.parent(e),i={v:e};return void 0!==n&&(i.value=n),void 0!==r&&(i.parent=r),i}))}function Mr(t){return t.edges().map((function(e){var n=t.edge(e),r={v:e.v,w:e.w};return void 0!==e.name&&(r.name=e.name),void 0!==n&&(r.value=n),r}))}var kr=function(t){var e,n={},r=[];function i(r){Object.hasOwn(n,r)||(n[r]=!0,e.push(r),t.successors(r).forEach(i),t.predecessors(r).forEach(i))}return t.nodes().forEach((function(t){e=[],i(t),e.length&&r.push(e)})),r};var Cr=class{constructor(){n(this,"_arr",[]),n(this,"_keyIndices",{})}size(){return this._arr.length}keys(){return this._arr.map((function(t){return t.key}))}has(t){return Object.hasOwn(this._keyIndices,t)}priority(t){var e=this._keyIndices[t];if(void 0!==e)return this._arr[e].priority}min(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key}add(t,e){var n=this._keyIndices;if(t=String(t),!Object.hasOwn(n,t)){var r=this._arr,i=r.length;return n[t]=i,r.push({key:t,priority:e}),this._decrease(i),!0}return!1}removeMin(){this._swap(0,this._arr.length-1);var t=this._arr.pop();return delete this._keyIndices[t.key],this._heapify(0),t.key}decrease(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)}_heapify(t){var e=this._arr,n=2*t,r=n+1,i=t;n<e.length&&(i=e[n].priority<e[i].priority?n:i,r<e.length&&(i=e[r].priority<e[i].priority?r:i),i!==t&&(this._swap(t,i),this._heapify(i)))}_decrease(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}_swap(t,e){var n=this._arr,r=this._keyIndices,i=n[t],s=n[e];n[t]=s,n[e]=i,r[s.key]=t,r[i.key]=e}},Ar=Cr,Sr=function(t,e,n,r){return function(t,e,n,r){var i,s,o={},u=new Ar,a=function(t){var e=t.v!==i?t.v:t.w,r=o[e],a=n(t),h=s.distance+a;if(a<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+t+" Weight: "+a);h<r.distance&&(r.distance=h,r.predecessor=i,u.decrease(e,h))};t.nodes().forEach((function(t){var n=t===e?0:Number.POSITIVE_INFINITY;o[t]={distance:n},u.add(t,n)}));for(;u.size()>0&&(i=u.removeMin(),(s=o[i]).distance!==Number.POSITIVE_INFINITY);)r(i).forEach(a);return o}(t,String(e),n||Nr,r||function(e){return t.outEdges(e)})},Nr=()=>1;var jr=Sr,Tr=function(t,e,n){return t.nodes().reduce((function(r,i){return r[i]=jr(t,i,e,n),r}),{})};var Ir=function(t){var e=0,n=[],r={},i=[];function s(o){var u=r[o]={onStack:!0,lowlink:e,index:e++};if(n.push(o),t.successors(o).forEach((function(t){Object.hasOwn(r,t)?r[t].onStack&&(u.lowlink=Math.min(u.lowlink,r[t].index)):(s(t),u.lowlink=Math.min(u.lowlink,r[t].lowlink))})),u.lowlink===u.index){var a,h=[];do{a=n.pop(),r[a].onStack=!1,h.push(a)}while(o!==a);i.push(h)}}return t.nodes().forEach((function(t){Object.hasOwn(r,t)||s(t)})),i};var Rr=Ir,Lr=function(t){return Rr(t).filter((function(e){return e.length>1||1===e.length&&t.hasEdge(e[0],e[0])}))};var zr=function(t,e,n){return function(t,e,n){var r={},i=t.nodes();return i.forEach((function(t){r[t]={},r[t][t]={distance:0},i.forEach((function(e){t!==e&&(r[t][e]={distance:Number.POSITIVE_INFINITY})})),n(t).forEach((function(n){var i=n.v===t?n.w:n.v,s=e(n);r[t][i]={distance:s,predecessor:t}}))})),i.forEach((function(t){var e=r[t];i.forEach((function(n){var s=r[n];i.forEach((function(n){var r=s[t],i=e[n],o=s[n],u=r.distance+i.distance;u<o.distance&&(o.distance=u,o.predecessor=i.predecessor)}))}))})),r}(t,e||Dr,n||function(e){return t.outEdges(e)})},Dr=()=>1;function Pr(t){var e={},n={},r=[];if(t.sinks().forEach((function i(s){if(Object.hasOwn(n,s))throw new Fr;Object.hasOwn(e,s)||(n[s]=!0,e[s]=!0,t.predecessors(s).forEach(i),delete n[s],r.push(s))})),Object.keys(e).length!==t.nodeCount())throw new Fr;return r}class Fr extends Error{constructor(){super(...arguments)}}var $r=Pr;Pr.CycleException=Fr;var Yr=$r;var Xr=function(t,e,n){Array.isArray(e)||(e=[e]);var r=t.isDirected()?e=>t.successors(e):e=>t.neighbors(e),i="post"===n?Gr:Br,s=[],o={};return e.forEach((e=>{if(!t.hasNode(e))throw new Error("Graph does not have node: "+e);i(e,r,o,s)})),s};function Gr(t,e,n,r){for(var i=[[t,!1]];i.length>0;){var s=i.pop();s[1]?r.push(s[0]):Object.hasOwn(n,s[0])||(n[s[0]]=!0,i.push([s[0],!0]),Wr(e(s[0]),(t=>i.push([t,!1]))))}}function Br(t,e,n,r){for(var i=[t];i.length>0;){var s=i.pop();Object.hasOwn(n,s)||(n[s]=!0,r.push(s),Wr(e(s),(t=>i.push(t))))}}function Wr(t,e){for(var n=t.length;n--;)e(t[n],n,t);return t}var qr=Xr;var Vr=Xr;var Hr=wr,Ur=Cr;var Zr={Graph:br.Graph,json:Er,alg:{components:kr,dijkstra:Sr,dijkstraAll:Tr,findCycles:Lr,floydWarshall:zr,isAcyclic:function(t){try{Yr(t)}catch(e){if(e instanceof Yr.CycleException)return!1;throw e}return!0},postorder:function(t,e){return qr(t,e,"post")},preorder:function(t,e){return Vr(t,e,"pre")},prim:function(t,e){var n,r=new Hr,i={},s=new Ur;function o(t){var r=t.v===n?t.w:t.v,o=s.priority(r);if(void 0!==o){var u=e(t);u<o&&(i[r]=n,s.decrease(r,u))}}if(0===t.nodeCount())return r;t.nodes().forEach((function(t){s.add(t,Number.POSITIVE_INFINITY),r.setNode(t)})),s.decrease(t.nodes()[0],0);var u=!1;for(;s.size()>0;){if(n=s.removeMin(),Object.hasOwn(i,n))r.setEdge(n,i[n]);else{if(u)throw new Error("Input graph is not connected: "+t);u=!0}t.nodeEdges(n).forEach(o)}return r},tarjan:Ir,topsort:$r},version:br.version};function Kr(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function Jr(t,e){if("_next"!==t&&"_prev"!==t)return e}let Qr=Zr.Graph,ti=class{constructor(){let t={};t._next=t._prev=t,this._sentinel=t}dequeue(){let t=this._sentinel,e=t._prev;if(e!==t)return Kr(e),e}enqueue(t){let e=this._sentinel;t._prev&&t._next&&Kr(t),t._next=e._next,e._next._prev=t,e._next=t,t._prev=e}toString(){let t=[],e=this._sentinel,n=e._prev;for(;n!==e;)t.push(JSON.stringify(n,Jr)),n=n._prev;return"["+t.join(", ")+"]"}};var ei=function(t,e){if(t.nodeCount()<=1)return[];let n=function(t,e){let n=new Qr,r=0,i=0;t.nodes().forEach((t=>{n.setNode(t,{v:t,in:0,out:0})})),t.edges().forEach((t=>{let s=n.edge(t.v,t.w)||0,o=e(t),u=s+o;n.setEdge(t.v,t.w,u),i=Math.max(i,n.node(t.v).out+=o),r=Math.max(r,n.node(t.w).in+=o)}));let s=function(t){const e=[];for(let n=0;n<t;n++)e.push(n);return e}(i+r+3).map((()=>new ti)),o=r+1;return n.nodes().forEach((t=>{ii(s,o,n.node(t))})),{graph:n,buckets:s,zeroIdx:o}}(t,e||ni);return function(t,e,n){let r,i=[],s=e[e.length-1],o=e[0];for(;t.nodeCount();){for(;r=o.dequeue();)ri(t,e,n,r);for(;r=s.dequeue();)ri(t,e,n,r);if(t.nodeCount())for(let s=e.length-2;s>0;--s)if(r=e[s].dequeue(),r){i=i.concat(ri(t,e,n,r,!0));break}}return i}(n.graph,n.buckets,n.zeroIdx).flatMap((e=>t.outEdges(e.v,e.w)))};let ni=()=>1;function ri(t,e,n,r,i){let s=i?[]:void 0;return t.inEdges(r.v).forEach((r=>{let o=t.edge(r),u=t.node(r.v);i&&s.push({v:r.v,w:r.w}),u.out-=o,ii(e,n,u)})),t.outEdges(r.v).forEach((r=>{let i=t.edge(r),s=r.w,o=t.node(s);o.in-=i,ii(e,n,o)})),t.removeNode(r.v),s}function ii(t,e,n){n.out?n.in?t[n.out-n.in+e].enqueue(n):t[t.length-1].enqueue(n):t[0].enqueue(n)}let si=Zr.Graph;var oi={addBorderNode:function(t,e,n,r){let i={width:0,height:0};arguments.length>=4&&(i.rank=n,i.order=r);return ui(t,"border",i,e)},addDummyNode:ui,applyWithChunking:hi,asNonCompoundGraph:function(t){let e=new si({multigraph:t.isMultigraph()}).setGraph(t.graph());return t.nodes().forEach((n=>{t.children(n).length||e.setNode(n,t.node(n))})),t.edges().forEach((n=>{e.setEdge(n,t.edge(n))})),e},buildLayerMatrix:function(t){let e=di(li(t)+1).map((()=>[]));return t.nodes().forEach((n=>{let r=t.node(n),i=r.rank;void 0!==i&&(e[i][r.order]=n)})),e},intersectRect:function(t,e){let n,r,i=t.x,s=t.y,o=e.x-i,u=e.y-s,a=t.width/2,h=t.height/2;if(!o&&!u)throw new Error("Not possible to find intersection inside of the rectangle");Math.abs(u)*a>Math.abs(o)*h?(u<0&&(h=-h),n=h*o/u,r=h):(o<0&&(a=-a),n=a,r=a*u/o);return{x:i+n,y:s+r}},mapValues:function(t,e){let n=e;"string"==typeof e&&(n=t=>t[e]);return Object.entries(t).reduce(((t,[e,r])=>(t[e]=n(r,e),t)),{})},maxRank:li,normalizeRanks:function(t){let e=t.nodes().map((e=>{let n=t.node(e).rank;return void 0===n?Number.MAX_VALUE:n})),n=hi(Math.min,e);t.nodes().forEach((e=>{let r=t.node(e);Object.hasOwn(r,"rank")&&(r.rank-=n)}))},notime:function(t,e){return e()},partition:function(t,e){let n={lhs:[],rhs:[]};return t.forEach((t=>{e(t)?n.lhs.push(t):n.rhs.push(t)})),n},pick:function(t,e){const n={};for(const r of e)void 0!==t[r]&&(n[r]=t[r]);return n},predecessorWeights:function(t){let e=t.nodes().map((e=>{let n={};return t.inEdges(e).forEach((e=>{n[e.v]=(n[e.v]||0)+t.edge(e).weight})),n}));return pi(t.nodes(),e)},range:di,removeEmptyRanks:function(t){let e=t.nodes().map((e=>t.node(e).rank)),n=hi(Math.min,e),r=[];t.nodes().forEach((e=>{let i=t.node(e).rank-n;r[i]||(r[i]=[]),r[i].push(e)}));let i=0,s=t.graph().nodeRankFactor;Array.from(r).forEach(((e,n)=>{void 0===e&&n%s!=0?--i:void 0!==e&&i&&e.forEach((e=>t.node(e).rank+=i))}))},simplify:function(t){let e=(new si).setGraph(t.graph());return t.nodes().forEach((n=>e.setNode(n,t.node(n)))),t.edges().forEach((n=>{let r=e.edge(n.v,n.w)||{weight:0,minlen:1},i=t.edge(n);e.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})})),e},successorWeights:function(t){let e=t.nodes().map((e=>{let n={};return t.outEdges(e).forEach((e=>{n[e.w]=(n[e.w]||0)+t.edge(e).weight})),n}));return pi(t.nodes(),e)},time:function(t,e){let n=Date.now();try{return e()}finally{console.log(t+" time: "+(Date.now()-n)+"ms")}},uniqueId:fi,zipObject:pi};function ui(t,e,n,r){let i;do{i=fi(r)}while(t.hasNode(i));return n.dummy=e,t.setNode(i,n),i}const ai=65535;function hi(t,e){if(e.length>ai){const n=function(t,e=ai){const n=[];for(let r=0;r<t.length;r+=e){const i=t.slice(r,r+e);n.push(i)}return n}(e);return t.apply(null,n.map((e=>t.apply(null,e))))}return t.apply(null,e)}function li(t){const e=t.nodes().map((e=>{let n=t.node(e).rank;return void 0===n?Number.MIN_VALUE:n}));return hi(Math.max,e)}let ci=0;function fi(t){var e=++ci;return toString(t)+e}function di(t,e,n=1){null==e&&(e=t,t=0);let r=t=>t<e;n<0&&(r=t=>e<t);const i=[];for(let s=t;r(s);s+=n)i.push(s);return i}function pi(t,e){return t.reduce(((t,n,r)=>(t[n]=e[r],t)),{})}let mi=ei,gi=oi.uniqueId;var yi={run:function(t){("greedy"===t.graph().acyclicer?mi(t,(e=t,t=>e.edge(t).weight)):function(t){let e=[],n={},r={};function i(s){Object.hasOwn(r,s)||(r[s]=!0,n[s]=!0,t.outEdges(s).forEach((t=>{Object.hasOwn(n,t.w)?e.push(t):i(t.w)})),delete n[s])}return t.nodes().forEach(i),e}(t)).forEach((e=>{let n=t.edge(e);t.removeEdge(e),n.forwardName=e.name,n.reversed=!0,t.setEdge(e.w,e.v,n,gi("rev"))}));var e},undo:function(t){t.edges().forEach((e=>{let n=t.edge(e);if(n.reversed){t.removeEdge(e);let r=n.forwardName;delete n.reversed,delete n.forwardName,t.setEdge(e.w,e.v,n,r)}}))}};let _i=oi;var vi={run:function(t){t.graph().dummyChains=[],t.edges().forEach((e=>function(t,e){let n,r,i,s=e.v,o=t.node(s).rank,u=e.w,a=t.node(u).rank,h=e.name,l=t.edge(e),c=l.labelRank;if(a===o+1)return;for(t.removeEdge(e),i=0,++o;o<a;++i,++o)l.points=[],r={width:0,height:0,edgeLabel:l,edgeObj:e,rank:o},n=_i.addDummyNode(t,"edge",r,"_d"),o===c&&(r.width=l.width,r.height=l.height,r.dummy="edge-label",r.labelpos=l.labelpos),t.setEdge(s,n,{weight:l.weight},h),0===i&&t.graph().dummyChains.push(n),s=n;t.setEdge(s,u,{weight:l.weight},h)}(t,e)))},undo:function(t){t.graph().dummyChains.forEach((e=>{let n,r=t.node(e),i=r.edgeLabel;for(t.setEdge(r.edgeObj,i);r.dummy;)n=t.successors(e)[0],t.removeNode(e),i.points.push({x:r.x,y:r.y}),"edge-label"===r.dummy&&(i.x=r.x,i.y=r.y,i.width=r.width,i.height=r.height),e=n,r=t.node(e)}))}};const{applyWithChunking:wi}=oi;var bi={longestPath:function(t){var e={};t.sources().forEach((function n(r){var i=t.node(r);if(Object.hasOwn(e,r))return i.rank;e[r]=!0;let s=t.outEdges(r).map((e=>null==e?Number.POSITIVE_INFINITY:n(e.w)-t.edge(e).minlen));var o=wi(Math.min,s);return o===Number.POSITIVE_INFINITY&&(o=0),i.rank=o}))},slack:function(t,e){return t.node(e.w).rank-t.node(e.v).rank-t.edge(e).minlen}};var xi=Zr.Graph,Ei=bi.slack,Oi=function(t){var e,n,r=new xi({directed:!1}),i=t.nodes()[0],s=t.nodeCount();r.setNode(i,{});for(;Mi(r,t)<s;)e=ki(r,t),n=r.hasNode(e.v)?Ei(t,e):-Ei(t,e),Ci(r,t,n);return r};function Mi(t,e){return t.nodes().forEach((function n(r){e.nodeEdges(r).forEach((i=>{var s=i.v,o=r===s?i.w:s;t.hasNode(o)||Ei(e,i)||(t.setNode(o,{}),t.setEdge(r,o,{}),n(o))}))})),t.nodeCount()}function ki(t,e){return e.edges().reduce(((n,r)=>{let i=Number.POSITIVE_INFINITY;return t.hasNode(r.v)!==t.hasNode(r.w)&&(i=Ei(e,r)),i<n[0]?[i,r]:n}),[Number.POSITIVE_INFINITY,null])[1]}function Ci(t,e,n){t.nodes().forEach((t=>e.node(t).rank+=n))}var Ai=Oi,Si=bi.slack,Ni=bi.longestPath,ji=Zr.alg.preorder,Ti=Zr.alg.postorder,Ii=oi.simplify,Ri=Li;function Li(t){t=Ii(t),Ni(t);var e,n=Ai(t);for(Pi(n),zi(n,t);e=$i(n);)Xi(n,t,e,Yi(n,t,e))}function zi(t,e){var n=Ti(t,t.nodes());(n=n.slice(0,n.length-1)).forEach((n=>function(t,e,n){var r=t.node(n),i=r.parent;t.edge(n,i).cutvalue=Di(t,e,n)}(t,e,n)))}function Di(t,e,n){var r=t.node(n).parent,i=!0,s=e.edge(n,r),o=0;return s||(i=!1,s=e.edge(r,n)),o=s.weight,e.nodeEdges(n).forEach((s=>{var u,a,h=s.v===n,l=h?s.w:s.v;if(l!==r){var c=h===i,f=e.edge(s).weight;if(o+=c?f:-f,u=n,a=l,t.hasEdge(u,a)){var d=t.edge(n,l).cutvalue;o+=c?-d:d}}})),o}function Pi(t,e){arguments.length<2&&(e=t.nodes()[0]),Fi(t,{},1,e)}function Fi(t,e,n,r,i){var s=n,o=t.node(r);return e[r]=!0,t.neighbors(r).forEach((i=>{Object.hasOwn(e,i)||(n=Fi(t,e,n,i,r))})),o.low=s,o.lim=n++,i?o.parent=i:delete o.parent,n}function $i(t){return t.edges().find((e=>t.edge(e).cutvalue<0))}function Yi(t,e,n){var r=n.v,i=n.w;e.hasEdge(r,i)||(r=n.w,i=n.v);var s=t.node(r),o=t.node(i),u=s,a=!1;return s.lim>o.lim&&(u=o,a=!0),e.edges().filter((e=>a===Gi(t,t.node(e.v),u)&&a!==Gi(t,t.node(e.w),u))).reduce(((t,n)=>Si(e,n)<Si(e,t)?n:t))}function Xi(t,e,n,r){var i=n.v,s=n.w;t.removeEdge(i,s),t.setEdge(r.v,r.w,{}),Pi(t),zi(t,e),function(t,e){var n=t.nodes().find((t=>!e.node(t).parent)),r=ji(t,n);(r=r.slice(1)).forEach((n=>{var r=t.node(n).parent,i=e.edge(n,r),s=!1;i||(i=e.edge(r,n),s=!0),e.node(n).rank=e.node(r).rank+(s?i.minlen:-i.minlen)}))}(t,e)}function Gi(t,e,n){return n.low<=e.lim&&e.lim<=n.lim}Li.initLowLimValues=Pi,Li.initCutValues=zi,Li.calcCutValue=Di,Li.leaveEdge=$i,Li.enterEdge=Yi,Li.exchangeEdges=Xi;var Bi=bi.longestPath,Wi=Oi,qi=Ri,Vi=function(t){switch(t.graph().ranker){case"network-simplex":default:Ui(t);break;case"tight-tree":!function(t){Bi(t),Wi(t)}(t);break;case"longest-path":Hi(t)}};var Hi=Bi;function Ui(t){qi(t)}let Zi=oi;function Ki(t,e,n,r,i,s,o){let u=t.children(o);if(!u.length)return void(o!==e&&t.setEdge(e,o,{weight:0,minlen:n}));let a=Zi.addBorderNode(t,"_bt"),h=Zi.addBorderNode(t,"_bb"),l=t.node(o);t.setParent(a,o),l.borderTop=a,t.setParent(h,o),l.borderBottom=h,u.forEach((u=>{Ki(t,e,n,r,i,s,u);let l=t.node(u),c=l.borderTop?l.borderTop:u,f=l.borderBottom?l.borderBottom:u,d=l.borderTop?r:2*r,p=c!==f?1:i-s[o]+1;t.setEdge(a,c,{weight:d,minlen:p,nestingEdge:!0}),t.setEdge(f,h,{weight:d,minlen:p,nestingEdge:!0})})),t.parent(o)||t.setEdge(e,a,{weight:0,minlen:i+s[o]})}let Ji=oi;function Qi(t,e,n,r,i,s){let o={width:0,height:0,rank:s,borderType:e},u=i[e][s-1],a=Ji.addDummyNode(t,"border",o,n);i[e][s]=a,t.setParent(a,r),u&&t.setEdge(u,a,{weight:1})}function ts(t){t.nodes().forEach((e=>es(t.node(e)))),t.edges().forEach((e=>es(t.edge(e))))}function es(t){let e=t.width;t.width=t.height,t.height=e}function ns(t){t.y=-t.y}function rs(t){let e=t.x;t.x=t.y,t.y=e}let is=oi;let ss=oi.zipObject;function os(t,e,n){let r=ss(n,n.map(((t,e)=>e))),i=e.flatMap((e=>t.outEdges(e).map((e=>({pos:r[e.w],weight:t.edge(e).weight}))).sort(((t,e)=>t.pos-e.pos)))),s=1;for(;s<n.length;)s<<=1;let o=2*s-1;s-=1;let u=new Array(o).fill(0),a=0;return i.forEach((t=>{let e=t.pos+s;u[e]+=t.weight;let n=0;for(;e>0;)e%2&&(n+=u[e+1]),e=e-1>>1,u[e]+=t.weight;a+=t.weight*n})),a}let us=oi;let as=oi;function hs(t,e,n){let r;for(;e.length&&(r=e[e.length-1]).i<=n;)e.pop(),t.push(r.vs),n++;return n}let ls=function(t,e=[]){return e.map((e=>{let n=t.inEdges(e);if(n.length){let r=n.reduce(((e,n)=>{let r=t.edge(n),i=t.node(n.v);return{sum:e.sum+r.weight*i.order,weight:e.weight+r.weight}}),{sum:0,weight:0});return{v:e,barycenter:r.sum/r.weight,weight:r.weight}}return{v:e}}))},cs=function(t,e){let n={};return t.forEach(((t,e)=>{let r=n[t.v]={indegree:0,in:[],out:[],vs:[t.v],i:e};void 0!==t.barycenter&&(r.barycenter=t.barycenter,r.weight=t.weight)})),e.edges().forEach((t=>{let e=n[t.v],r=n[t.w];void 0!==e&&void 0!==r&&(r.indegree++,e.out.push(n[t.w]))})),function(t){let e=[];function n(t){return e=>{e.merged||(void 0===e.barycenter||void 0===t.barycenter||e.barycenter>=t.barycenter)&&function(t,e){let n=0,r=0;t.weight&&(n+=t.barycenter*t.weight,r+=t.weight);e.weight&&(n+=e.barycenter*e.weight,r+=e.weight);t.vs=e.vs.concat(t.vs),t.barycenter=n/r,t.weight=r,t.i=Math.min(e.i,t.i),e.merged=!0}(t,e)}}function r(e){return n=>{n.in.push(e),0==--n.indegree&&t.push(n)}}for(;t.length;){let i=t.pop();e.push(i),i.in.reverse().forEach(n(i)),i.out.forEach(r(i))}return e.filter((t=>!t.merged)).map((t=>us.pick(t,["vs","i","barycenter","weight"])))}(Object.values(n).filter((t=>!t.indegree)))},fs=function(t,e){let n=as.partition(t,(t=>Object.hasOwn(t,"barycenter"))),r=n.lhs,i=n.rhs.sort(((t,e)=>e.i-t.i)),s=[],o=0,u=0,a=0;r.sort((h=!!e,(t,e)=>t.barycenter<e.barycenter?-1:t.barycenter>e.barycenter?1:h?e.i-t.i:t.i-e.i)),a=hs(s,i,a),r.forEach((t=>{a+=t.vs.length,s.push(t.vs),o+=t.barycenter*t.weight,u+=t.weight,a=hs(s,i,a)}));var h;let l={vs:s.flat(!0)};u&&(l.barycenter=o/u,l.weight=u);return l};var ds=function t(e,n,r,i){let s=e.children(n),o=e.node(n),u=o?o.borderLeft:void 0,a=o?o.borderRight:void 0,h={};u&&(s=s.filter((t=>t!==u&&t!==a)));let l=ls(e,s);l.forEach((n=>{if(e.children(n.v).length){let u=t(e,n.v,r,i);h[n.v]=u,Object.hasOwn(u,"barycenter")&&(o=u,void 0!==(s=n).barycenter?(s.barycenter=(s.barycenter*s.weight+o.barycenter*o.weight)/(s.weight+o.weight),s.weight+=o.weight):(s.barycenter=o.barycenter,s.weight=o.weight))}var s,o}));let c=cs(l,r);!function(t,e){t.forEach((t=>{t.vs=t.vs.flatMap((t=>e[t]?e[t].vs:t))}))}(c,h);let f=fs(c,i);if(u&&(f.vs=[u,f.vs,a].flat(!0),e.predecessors(u).length)){let t=e.node(e.predecessors(u)[0]),n=e.node(e.predecessors(a)[0]);Object.hasOwn(f,"barycenter")||(f.barycenter=0,f.weight=0),f.barycenter=(f.barycenter*f.weight+t.order+n.order)/(f.weight+2),f.weight+=2}return f};let ps=Zr.Graph,ms=oi;let gs=function(t){let e={},n=t.nodes().filter((e=>!t.children(e).length)),r=n.map((e=>t.node(e).rank)),i=is.applyWithChunking(Math.max,r),s=is.range(i+1).map((()=>[]));return n.sort(((e,n)=>t.node(e).rank-t.node(n).rank)).forEach((function n(r){if(e[r])return;e[r]=!0;let i=t.node(r);s[i.rank].push(r),t.successors(r).forEach(n)})),s},ys=function(t,e){let n=0;for(let r=1;r<e.length;++r)n+=os(t,e[r-1],e[r]);return n},_s=ds,vs=function(t,e,n){let r=function(t){var e;for(;t.hasNode(e=ms.uniqueId("_root")););return e}(t),i=new ps({compound:!0}).setGraph({root:r}).setDefaultNodeLabel((e=>t.node(e)));return t.nodes().forEach((s=>{let o=t.node(s),u=t.parent(s);(o.rank===e||o.minRank<=e&&e<=o.maxRank)&&(i.setNode(s),i.setParent(s,u||r),t[n](s).forEach((e=>{let n=e.v===s?e.w:e.v,r=i.edge(n,s),o=void 0!==r?r.weight:0;i.setEdge(n,s,{weight:t.edge(e).weight+o})})),Object.hasOwn(o,"minRank")&&i.setNode(s,{borderLeft:o.borderLeft[e],borderRight:o.borderRight[e]}))})),i},ws=function(t,e,n){let r,i={};n.forEach((n=>{let s,o,u=t.parent(n);for(;u;){if(s=t.parent(u),s?(o=i[s],i[s]=u):(o=r,r=u),o&&o!==u)return void e.setEdge(o,u);u=s}}))},bs=Zr.Graph,xs=oi;var Es=function t(e,n){if(n&&"function"==typeof n.customOrder)return void n.customOrder(e,t);let r=xs.maxRank(e),i=Os(e,xs.range(1,r+1),"inEdges"),s=Os(e,xs.range(r-1,-1,-1),"outEdges"),o=gs(e);if(ks(e,o),n&&n.disableOptimalOrderHeuristic)return;let u,a=Number.POSITIVE_INFINITY;for(let h=0,l=0;l<4;++h,++l){Ms(h%2?i:s,h%4>=2),o=xs.buildLayerMatrix(e);let t=ys(e,o);t<a&&(l=0,u=Object.assign({},o),a=t)}ks(e,u)};function Os(t,e,n){return e.map((function(e){return vs(t,e,n)}))}function Ms(t,e){let n=new bs;t.forEach((function(t){let r=t.graph().root,i=_s(t,r,n,e);i.vs.forEach(((e,n)=>t.node(e).order=n)),ws(t,n,i.vs)}))}function ks(t,e){Object.values(e).forEach((e=>e.forEach(((e,n)=>t.node(e).order=n))))}let Cs=Zr.Graph,As=oi;var Ss=function(t){let e,n=As.buildLayerMatrix(t),r=Object.assign(Ns(t,n),js(t,n)),i={};["u","d"].forEach((s=>{e="u"===s?n:Object.values(n).reverse(),["l","r"].forEach((n=>{"r"===n&&(e=e.map((t=>Object.values(t).reverse())));let o=("u"===s?t.predecessors:t.successors).bind(t),u=Rs(t,e,r,o),a=Ls(t,e,u.root,u.align,"r"===n);"r"===n&&(a=As.mapValues(a,(t=>-t))),i[s+n]=a}))}));let s=zs(t,i);return Ds(i,s),Ps(i,t.graph().align)};function Ns(t,e){let n={};return e.length&&e.reduce((function(e,r){let i=0,s=0,o=e.length,u=r[r.length-1];return r.forEach(((e,a)=>{let h=function(t,e){if(t.node(e).dummy)return t.predecessors(e).find((e=>t.node(e).dummy))}(t,e),l=h?t.node(h).order:o;(h||e===u)&&(r.slice(s,a+1).forEach((e=>{t.predecessors(e).forEach((r=>{let s=t.node(r),o=s.order;!(o<i||l<o)||s.dummy&&t.node(e).dummy||Ts(n,r,e)}))})),s=a+1,i=l)})),r})),n}function js(t,e){let n={};function r(e,r,i,s,o){let u;As.range(r,i).forEach((r=>{u=e[r],t.node(u).dummy&&t.predecessors(u).forEach((e=>{let r=t.node(e);r.dummy&&(r.order<s||r.order>o)&&Ts(n,e,u)}))}))}return e.length&&e.reduce((function(e,n){let i,s=-1,o=0;return n.forEach(((u,a)=>{if("border"===t.node(u).dummy){let e=t.predecessors(u);e.length&&(i=t.node(e[0]).order,r(n,o,a,s,i),o=a,s=i)}r(n,o,n.length,i,e.length)})),n})),n}function Ts(t,e,n){if(e>n){let t=e;e=n,n=t}let r=t[e];r||(t[e]=r={}),r[n]=!0}function Is(t,e,n){if(e>n){let t=e;e=n,n=t}return!!t[e]&&Object.hasOwn(t[e],n)}function Rs(t,e,n,r){let i={},s={},o={};return e.forEach((t=>{t.forEach(((t,e)=>{i[t]=t,s[t]=t,o[t]=e}))})),e.forEach((t=>{let e=-1;t.forEach((t=>{let u=r(t);if(u.length){u=u.sort(((t,e)=>o[t]-o[e]));let r=(u.length-1)/2;for(let a=Math.floor(r),h=Math.ceil(r);a<=h;++a){let r=u[a];s[t]===t&&e<o[r]&&!Is(n,t,r)&&(s[r]=t,s[t]=i[t]=i[r],e=o[r])}}}))})),{root:i,align:s}}function Ls(t,e,n,r,i){let s={},o=function(t,e,n,r){let i=new Cs,s=t.graph(),o=function(t,e,n){return(r,i,s)=>{let o,u=r.node(i),a=r.node(s),h=0;if(h+=u.width/2,Object.hasOwn(u,"labelpos"))switch(u.labelpos.toLowerCase()){case"l":o=-u.width/2;break;case"r":o=u.width/2}if(o&&(h+=n?o:-o),o=0,h+=(u.dummy?e:t)/2,h+=(a.dummy?e:t)/2,h+=a.width/2,Object.hasOwn(a,"labelpos"))switch(a.labelpos.toLowerCase()){case"l":o=a.width/2;break;case"r":o=-a.width/2}return o&&(h+=n?o:-o),o=0,h}}(s.nodesep,s.edgesep,r);return e.forEach((e=>{let r;e.forEach((e=>{let s=n[e];if(i.setNode(s),r){var u=n[r],a=i.edge(u,s);i.setEdge(u,s,Math.max(o(t,e,r),a||0))}r=e}))})),i}(t,e,n,i),u=i?"borderLeft":"borderRight";function a(t,e){let n=o.nodes(),r=n.pop(),i={};for(;r;)i[r]?t(r):(i[r]=!0,n.push(r),n=n.concat(e(r))),r=n.pop()}return a((function(t){s[t]=o.inEdges(t).reduce(((t,e)=>Math.max(t,s[e.v]+o.edge(e))),0)}),o.predecessors.bind(o)),a((function(e){let n=o.outEdges(e).reduce(((t,e)=>Math.min(t,s[e.w]-o.edge(e))),Number.POSITIVE_INFINITY),r=t.node(e);n!==Number.POSITIVE_INFINITY&&r.borderType!==u&&(s[e]=Math.max(s[e],n))}),o.successors.bind(o)),Object.keys(r).forEach((t=>s[t]=s[n[t]])),s}function zs(t,e){return Object.values(e).reduce(((e,n)=>{let r=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;Object.entries(n).forEach((([e,n])=>{let s=function(t,e){return t.node(e).width}(t,e)/2;r=Math.max(n+s,r),i=Math.min(n-s,i)}));const s=r-i;return s<e[0]&&(e=[s,n]),e}),[Number.POSITIVE_INFINITY,null])[1]}function Ds(t,e){let n=Object.values(e),r=As.applyWithChunking(Math.min,n),i=As.applyWithChunking(Math.max,n);["u","d"].forEach((n=>{["l","r"].forEach((s=>{let o=n+s,u=t[o];if(u===e)return;let a=Object.values(u),h=r-As.applyWithChunking(Math.min,a);"l"!==s&&(h=i-As.applyWithChunking(Math.max,a)),h&&(t[o]=As.mapValues(u,(t=>t+h)))}))}))}function Ps(t,e){return As.mapValues(t.ul,((n,r)=>{if(e)return t[e.toLowerCase()][r];{let e=Object.values(t).map((t=>t[r])).sort(((t,e)=>t-e));return(e[1]+e[2])/2}}))}let Fs=oi,$s=Ss;let Ys=yi,Xs=vi,Gs=Vi,Bs=oi.normalizeRanks,Ws=function(t){let e=function(t){let e={},n=0;function r(i){let s=n;t.children(i).forEach(r),e[i]={low:s,lim:n++}}return t.children().forEach(r),e}(t);t.graph().dummyChains.forEach((n=>{let r=t.node(n),i=r.edgeObj,s=function(t,e,n,r){let i,s,o=[],u=[],a=Math.min(e[n].low,e[r].low),h=Math.max(e[n].lim,e[r].lim);i=n;do{i=t.parent(i),o.push(i)}while(i&&(e[i].low>a||h>e[i].lim));s=i,i=r;for(;(i=t.parent(i))!==s;)u.push(i);return{path:o.concat(u.reverse()),lca:s}}(t,e,i.v,i.w),o=s.path,u=s.lca,a=0,h=o[a],l=!0;for(;n!==i.w;){if(r=t.node(n),l){for(;(h=o[a])!==u&&t.node(h).maxRank<r.rank;)a++;h===u&&(l=!1)}if(!l){for(;a<o.length-1&&t.node(h=o[a+1]).minRank<=r.rank;)a++;h=o[a]}t.setParent(n,h),n=t.successors(n)[0]}}))},qs=oi.removeEmptyRanks,Vs={run:function(t){let e=Zi.addDummyNode(t,"root",{},"_root"),n=function(t){var e={};function n(r,i){var s=t.children(r);s&&s.length&&s.forEach((t=>n(t,i+1))),e[r]=i}return t.children().forEach((t=>n(t,1))),e}(t),r=Object.values(n),i=Zi.applyWithChunking(Math.max,r)-1,s=2*i+1;t.graph().nestingRoot=e,t.edges().forEach((e=>t.edge(e).minlen*=s));let o=function(t){return t.edges().reduce(((e,n)=>e+t.edge(n).weight),0)}(t)+1;t.children().forEach((r=>Ki(t,e,s,o,i,n,r))),t.graph().nodeRankFactor=s},cleanup:function(t){var e=t.graph();t.removeNode(e.nestingRoot),delete e.nestingRoot,t.edges().forEach((e=>{t.edge(e).nestingEdge&&t.removeEdge(e)}))}},Hs=function(t){t.children().forEach((function e(n){let r=t.children(n),i=t.node(n);if(r.length&&r.forEach(e),Object.hasOwn(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(let e=i.minRank,r=i.maxRank+1;e<r;++e)Qi(t,"borderLeft","_bl",n,i,e),Qi(t,"borderRight","_br",n,i,e)}}))},Us={adjust:function(t){let e=t.graph().rankdir.toLowerCase();"lr"!==e&&"rl"!==e||ts(t)},undo:function(t){let e=t.graph().rankdir.toLowerCase();"bt"!==e&&"rl"!==e||function(t){t.nodes().forEach((e=>ns(t.node(e)))),t.edges().forEach((e=>{let n=t.edge(e);n.points.forEach(ns),Object.hasOwn(n,"y")&&ns(n)}))}(t);"lr"!==e&&"rl"!==e||(!function(t){t.nodes().forEach((e=>rs(t.node(e)))),t.edges().forEach((e=>{let n=t.edge(e);n.points.forEach(rs),Object.hasOwn(n,"x")&&rs(n)}))}(t),ts(t))}},Zs=Es,Ks=function(t){(function(t){let e=Fs.buildLayerMatrix(t),n=t.graph().ranksep,r=0;e.forEach((e=>{const i=e.reduce(((e,n)=>{const r=t.node(n).height;return e>r?e:r}),0);e.forEach((e=>t.node(e).y=r+i/2)),r+=i+n}))})(t=Fs.asNonCompoundGraph(t)),Object.entries($s(t)).forEach((([e,n])=>t.node(e).x=n))},Js=oi,Qs=Zr.Graph;var to=function(t,e){let n=e&&e.debugTiming?Js.time:Js.notime;n("layout",(()=>{let r=n(" buildLayoutGraph",(()=>function(t){let e=new Qs({multigraph:!0,compound:!0}),n=lo(t.graph());return e.setGraph(Object.assign({},no,ho(n,eo),Js.pick(n,ro))),t.nodes().forEach((n=>{const r=ho(lo(t.node(n)),io);Object.keys(so).forEach((t=>{void 0===r[t]&&(r[t]=so[t])})),e.setNode(n,r),e.setParent(n,t.parent(n))})),t.edges().forEach((n=>{let r=lo(t.edge(n));e.setEdge(n,Object.assign({},uo,ho(r,oo),Js.pick(r,ao)))})),e}(t)));n(" runLayout",(()=>function(t,e,n){e(" makeSpaceForEdgeLabels",(()=>function(t){let e=t.graph();e.ranksep/=2,t.edges().forEach((n=>{let r=t.edge(n);r.minlen*=2,"c"!==r.labelpos.toLowerCase()&&("TB"===e.rankdir||"BT"===e.rankdir?r.width+=r.labeloffset:r.height+=r.labeloffset)}))}(t))),e(" removeSelfEdges",(()=>function(t){t.edges().forEach((e=>{if(e.v===e.w){var n=t.node(e.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e:e,label:t.edge(e)}),t.removeEdge(e)}}))}(t))),e(" acyclic",(()=>Ys.run(t))),e(" nestingGraph.run",(()=>Vs.run(t))),e(" rank",(()=>Gs(Js.asNonCompoundGraph(t)))),e(" injectEdgeLabelProxies",(()=>function(t){t.edges().forEach((e=>{let n=t.edge(e);if(n.width&&n.height){let n=t.node(e.v),r={rank:(t.node(e.w).rank-n.rank)/2+n.rank,e:e};Js.addDummyNode(t,"edge-proxy",r,"_ep")}}))}(t))),e(" removeEmptyRanks",(()=>qs(t))),e(" nestingGraph.cleanup",(()=>Vs.cleanup(t))),e(" normalizeRanks",(()=>Bs(t))),e(" assignRankMinMax",(()=>function(t){let e=0;t.nodes().forEach((n=>{let r=t.node(n);r.borderTop&&(r.minRank=t.node(r.borderTop).rank,r.maxRank=t.node(r.borderBottom).rank,e=Math.max(e,r.maxRank))})),t.graph().maxRank=e}(t))),e(" removeEdgeLabelProxies",(()=>function(t){t.nodes().forEach((e=>{let n=t.node(e);"edge-proxy"===n.dummy&&(t.edge(n.e).labelRank=n.rank,t.removeNode(e))}))}(t))),e(" normalize.run",(()=>Xs.run(t))),e(" parentDummyChains",(()=>Ws(t))),e(" addBorderSegments",(()=>Hs(t))),e(" order",(()=>Zs(t,n))),e(" insertSelfEdges",(()=>function(t){var e=Js.buildLayerMatrix(t);e.forEach((e=>{var n=0;e.forEach(((e,r)=>{var i=t.node(e);i.order=r+n,(i.selfEdges||[]).forEach((e=>{Js.addDummyNode(t,"selfedge",{width:e.label.width,height:e.label.height,rank:i.rank,order:r+ ++n,e:e.e,label:e.label},"_se")})),delete i.selfEdges}))}))}(t))),e(" adjustCoordinateSystem",(()=>Us.adjust(t))),e(" position",(()=>Ks(t))),e(" positionSelfEdges",(()=>function(t){t.nodes().forEach((e=>{var n=t.node(e);if("selfedge"===n.dummy){var r=t.node(n.e.v),i=r.x+r.width/2,s=r.y,o=n.x-i,u=r.height/2;t.setEdge(n.e,n.label),t.removeNode(e),n.label.points=[{x:i+2*o/3,y:s-u},{x:i+5*o/6,y:s-u},{x:i+o,y:s},{x:i+5*o/6,y:s+u},{x:i+2*o/3,y:s+u}],n.label.x=n.x,n.label.y=n.y}}))}(t))),e(" removeBorderNodes",(()=>function(t){t.nodes().forEach((e=>{if(t.children(e).length){let n=t.node(e),r=t.node(n.borderTop),i=t.node(n.borderBottom),s=t.node(n.borderLeft[n.borderLeft.length-1]),o=t.node(n.borderRight[n.borderRight.length-1]);n.width=Math.abs(o.x-s.x),n.height=Math.abs(i.y-r.y),n.x=s.x+n.width/2,n.y=r.y+n.height/2}})),t.nodes().forEach((e=>{"border"===t.node(e).dummy&&t.removeNode(e)}))}(t))),e(" normalize.undo",(()=>Xs.undo(t))),e(" fixupEdgeLabelCoords",(()=>function(t){t.edges().forEach((e=>{let n=t.edge(e);if(Object.hasOwn(n,"x"))switch("l"!==n.labelpos&&"r"!==n.labelpos||(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset}}))}(t))),e(" undoCoordinateSystem",(()=>Us.undo(t))),e(" translateGraph",(()=>function(t){let e=Number.POSITIVE_INFINITY,n=0,r=Number.POSITIVE_INFINITY,i=0,s=t.graph(),o=s.marginx||0,u=s.marginy||0;function a(t){let s=t.x,o=t.y,u=t.width,a=t.height;e=Math.min(e,s-u/2),n=Math.max(n,s+u/2),r=Math.min(r,o-a/2),i=Math.max(i,o+a/2)}t.nodes().forEach((e=>a(t.node(e)))),t.edges().forEach((e=>{let n=t.edge(e);Object.hasOwn(n,"x")&&a(n)})),e-=o,r-=u,t.nodes().forEach((n=>{let i=t.node(n);i.x-=e,i.y-=r})),t.edges().forEach((n=>{let i=t.edge(n);i.points.forEach((t=>{t.x-=e,t.y-=r})),Object.hasOwn(i,"x")&&(i.x-=e),Object.hasOwn(i,"y")&&(i.y-=r)})),s.width=n-e+o,s.height=i-r+u}(t))),e(" assignNodeIntersects",(()=>function(t){t.edges().forEach((e=>{let n,r,i=t.edge(e),s=t.node(e.v),o=t.node(e.w);i.points?(n=i.points[0],r=i.points[i.points.length-1]):(i.points=[],n=o,r=s),i.points.unshift(Js.intersectRect(s,n)),i.points.push(Js.intersectRect(o,r))}))}(t))),e(" reversePoints",(()=>function(t){t.edges().forEach((e=>{let n=t.edge(e);n.reversed&&n.points.reverse()}))}(t))),e(" acyclic.undo",(()=>Ys.undo(t)))}(r,n,e))),n(" updateInputGraph",(()=>function(t,e){t.nodes().forEach((n=>{let r=t.node(n),i=e.node(n);r&&(r.x=i.x,r.y=i.y,r.rank=i.rank,e.children(n).length&&(r.width=i.width,r.height=i.height))})),t.edges().forEach((n=>{let r=t.edge(n),i=e.edge(n);r.points=i.points,Object.hasOwn(i,"x")&&(r.x=i.x,r.y=i.y)})),t.graph().width=e.graph().width,t.graph().height=e.graph().height}(t,r)))}))};let eo=["nodesep","edgesep","ranksep","marginx","marginy"],no={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},ro=["acyclicer","ranker","rankdir","align"],io=["width","height"],so={width:0,height:0},oo=["minlen","weight","width","height","labeloffset"],uo={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},ao=["labelpos"];function ho(t,e){return Js.mapValues(Js.pick(t,e),Number)}function lo(t){var e={};return t&&Object.entries(t).forEach((([t,n])=>{"string"==typeof t&&(t=t.toLowerCase()),e[t]=n})),e}let co=oi,fo=Zr.Graph;var po={graphlib:Zr,layout:to,debug:{debugOrdering:function(t){let e=co.buildLayerMatrix(t),n=new fo({compound:!0,multigraph:!0}).setGraph({});return t.nodes().forEach((e=>{n.setNode(e,{label:e}),n.setParent(e,"layer"+t.node(e).rank)})),t.edges().forEach((t=>n.setEdge(t.v,t.w,{},t.name))),e.forEach(((t,e)=>{let r="layer"+e;n.setNode(r,{rank:"same"}),t.reduce(((t,e)=>(n.setEdge(t,e,{style:"invis"}),e)))})),n}},util:{time:oi.time,notime:oi.notime},version:"1.1.4"};const mo=(t,e,n)=>{const{x:r,y:i}=t,s=e.x,o=e.y,u=(null==n?void 0:n.x)??r,a=(null==n?void 0:n.y)??i,h=s-r<0?-1:1,l=o-i<0?-1:1;let c=Math.abs(s-r)/2<35?Math.abs(s-r)/2:35;c=Math.abs(o-i)/2<c?Math.abs(o-i)/2:c;const f=Math.abs(s-r)/2-c;return[`M ${u} ${a}`,`L ${u} ${i}`,`L ${r} ${i}`,`L ${r+f*h} ${i}`,`C ${r+f*h+c*h} ${i} ${r+f*h+c*h} ${i} ${r+f*h+c*h} ${i+c*l}`,`L ${r+f*h+c*h} ${o-c*l}`,`C ${r+f*h+c*h} ${o} ${r+f*h+c*h} ${o} ${s-f*h} ${o}`,`L ${s} ${o}`].join(" ")},go=(t,e,n,r={sy:0})=>{const{x:i}=t;let{y:s}=t;const o=e.x,u=e.y,a=(null==n?void 0:n.x)??i,h=(null==n?void 0:n.y)??s,l=o-i<0?-1:1,c=u-s<0?-1:1;s+=r.sy;let f=Math.abs(o-i)/2<35?Math.abs(o-i)/2:35;f=Math.abs(u-s)/2<f?Math.abs(u-s)/2:f;const d=Math.abs(u-s)/2-f;return[`M ${a} ${h}`,`L ${i} ${h}`,`L ${i} ${s}`,`L ${i} ${s+d*c}`,`C ${i} ${s+d*c+f*c} ${i} ${s+d*c+f*c} ${i+f*l} ${s+d*c+f*c}`,`L ${i+(Math.abs(o-i)-2*f)*l+f*l} ${s+d*c+f*c}`,`C ${o} ${s+d*c+f*c} ${o} ${s+d*c+f*c} ${o} ${u-d*c}`,`L ${o} ${u}`].join(" ")},yo={bottom:{calculateEdge:go,edgeMidX:({node:t})=>t.x,edgeMidY:({node:t})=>t.y+t.height/2,edgeParentX:({parent:t})=>t.x,edgeParentY:({parent:t})=>t.y-t.height/2,edgeX:({node:t})=>t.x,edgeY:({node:t})=>t.y+t.height/2,leafGroupX:({node:t})=>t.x-t.width/2,leafGroupY:({node:t})=>t.y,leafHeight:({childLength:t,childrenSpacing:e,nodeHeight:n})=>(n+e)*t,leafWidth:({nodeWidth:t})=>t,leafX:()=>0,leafY:({childrenSpacing:t,index:e,nodeHeight:n})=>(n+t)*-e},left:{calculateEdge:mo,edgeMidX:({node:t})=>t.x-t.width/2,edgeMidY:({node:t})=>t.y,edgeParentX:({parent:t})=>t.x+t.width/2,edgeParentY:({parent:t})=>t.y,edgeX:({node:t})=>t.x-t.width/2,edgeY:({node:t})=>t.y,leafGroupX:({node:t})=>t.x-t.width/2,leafGroupY:({node:t})=>t.y-t.height/2,leafHeight:({nodeHeight:t})=>t,leafWidth:({childLength:t,nodeWidth:e})=>e*t,leafX:({childrenSpacing:t,index:e,nodeWidth:n})=>(n+t)*e,leafY:()=>0},right:{calculateEdge:mo,edgeMidX:({node:t})=>t.x+t.width/2,edgeMidY:({node:t})=>t.y,edgeParentX:({parent:t})=>t.x-t.width/2,edgeParentY:({parent:t})=>t.y,edgeX:({node:t})=>t.x+t.width/2,edgeY:({node:t})=>t.y,leafGroupX:({node:t})=>t.x,leafGroupY:({node:t})=>t.y-t.height/2,leafHeight:({nodeHeight:t})=>t,leafWidth:({childLength:t,nodeWidth:e})=>e*t,leafX:({childrenSpacing:t,index:e,nodeWidth:n})=>(n+t)*-e,leafY:()=>0},top:{calculateEdge:go,edgeMidX:({node:t})=>t.x,edgeMidY:({node:t})=>t.y-t.height/2,edgeParentX:({parent:t})=>t.x,edgeParentY:({parent:t})=>t.y+t.height/2,edgeX:({node:t})=>t.x,edgeY:({node:t})=>t.y-t.height/2,leafGroupX:({node:t})=>t.x-t.width/2,leafGroupY:({node:t})=>t.y-t.height/2,leafHeight:({childLength:t,childrenSpacing:e,nodeHeight:n})=>(n+e)*t,leafWidth:({nodeWidth:t})=>t,leafX:()=>0,leafY:({childrenSpacing:t,index:e,nodeHeight:n})=>(n+t)*e}},_o={bottom:"BT",left:"LR",right:"RL",top:"TB"},vo={borderColor:"#BCBCBC",borderColorHover:"#5C6BC0",borderRadius:"5px",borderStyle:"solid",borderWidth:1,canvasStyle:"",childrenSpacing:50,containerClassName:"root",contentKey:"name",direction:"top",edgeColor:"#BCBCBC",edgeColorHover:"#5C6BC0",edgeWidth:1,enableExpandCollapse:!1,enableToolbar:!1,enableTooltip:!1,fontColor:"#000000",fontFamily:"",fontSize:"14px",fontWeight:"400",groupLeafNodes:!1,groupLeafNodesSpacing:10,height:"auto",highlightOnHover:!0,nodeBGColor:"#FFFFFF",nodeBGColorHover:"#FFFFFF",nodeClassName:"apextree-node",nodeHeight:30,nodeStyle:"",nodeTemplate:t=>`<div style='display: flex;justify-content: center;align-items: center; text-align: center; height: 100%;'>${t}</div>`,nodeWidth:50,siblingSpacing:50,tooltipBGColor:"#FFFFFF",tooltipBorderColor:"#BCBCBC",tooltipId:"apextree-tooltip-container",tooltipMaxWidth:100,viewPortHeight:600,viewPortWidth:800,width:"100%"},wo=(t,e={})=>{for(const n in e)null==t||t.setAttribute(n,e[n])},bo=(t,e,n,r)=>{const i=null==t?void 0:t.options,s=(null==i?void 0:i.borderWidth)||r.borderWidth;let o=(null==i?void 0:i.borderColor)||r.borderColor,u=(null==i?void 0:i.nodeBGColor)||r.nodeBGColor;n&&(o=(null==i?void 0:i.borderColorHover)||r.borderColorHover,u=(null==i?void 0:i.nodeBGColorHover)||r.nodeBGColorHover);const a=document.querySelector(`[data-self='${t.id}'] foreignObject div`);if(a&&!t.id.endsWith("_leafs")&&(a.style.borderWidth=`${s}px`,a.style.borderColor=o,a.style.backgroundColor=u),t.parent){const i=document.getElementById(`${t.parent}-${t.id}`);wo(i,n?{stroke:r.edgeColorHover,"stroke-width":r.edgeWidth+1}:{stroke:r.edgeColor,"stroke-width":r.edgeWidth}),t.parent&&bo(e[t.parent],e,n,r)}};function xo(t,e,n){const{children:r,...i}=t,s={...i,children:r?r.map((t=>t.id)):[],parent:e?e.id:void 0};if(n[s.id]=s,null==r?void 0:r.length)for(const o of r)xo(o,s,n)}function Eo(t){const e={};return xo(t,void 0,e),e}const Oo={},Mo=[];function ko(t,e){if(Array.isArray(t))for(const n of t)ko(n,e);else if("object"!=typeof t)Ao(Object.getOwnPropertyNames(e)),Oo[t]=Object.assign(Oo[t]||{},e);else for(const n in t)ko(n,t[n])}function Co(t){return Oo[t]||{}}function Ao(t){Mo.push(...t)}function So(t,e){let n;const r=t.length,i=[];for(n=0;n<r;n++)i.push(e(t[n]));return i}function No(t){return t%360*Math.PI/180}function jo(t){return t.charAt(0).toUpperCase()+t.slice(1)}function To(t,e,n,r){return null!=e&&null!=n||(r=r||t.bbox(),null==e?e=r.width/r.height*n:null==n&&(n=r.height/r.width*e)),{width:e,height:n}}function Io(t,e){const n=t.origin;let r=null!=t.ox?t.ox:null!=t.originX?t.originX:"center",i=null!=t.oy?t.oy:null!=t.originY?t.originY:"center";null!=n&&([r,i]=Array.isArray(n)?n:"object"==typeof n?[n.x,n.y]:[n,n]);const s="string"==typeof r,o="string"==typeof i;if(s||o){const{height:t,width:n,x:u,y:a}=e.bbox();s&&(r=r.includes("left")?u:r.includes("right")?u+n:u+n/2),o&&(i=i.includes("top")?a:i.includes("bottom")?a+t:a+t/2)}return[r,i]}const Ro=new Set(["desc","metadata","title"]),Lo=t=>Ro.has(t.nodeName),zo=(t,e,n={})=>{const r={...e};for(const i in r)r[i].valueOf()===n[i]&&delete r[i];Object.keys(r).length?t.node.setAttribute("data-svgjs",JSON.stringify(r)):(t.node.removeAttribute("data-svgjs"),t.node.removeAttribute("svgjs:data"))},Do="http://www.w3.org/2000/svg",Po="http://www.w3.org/2000/xmlns/",Fo="http://www.w3.org/1999/xlink",$o={window:"undefined"==typeof window?null:window,document:"undefined"==typeof document?null:document};class Yo{}const Xo={},Go="___SYMBOL___ROOT___";function Bo(t,e=Do){return $o.document.createElementNS(e,t)}function Wo(t,e=!1){if(t instanceof Yo)return t;if("object"==typeof t)return Ho(t);if(null==t)return new Xo[Go];if("string"==typeof t&&"<"!==t.charAt(0))return Ho($o.document.querySelector(t));const n=e?$o.document.createElement("div"):Bo("svg");return n.innerHTML=t,t=Ho(n.firstChild),n.removeChild(n.firstChild),t}function qo(t,e){return e&&(e instanceof $o.window.Node||e.ownerDocument&&e instanceof e.ownerDocument.defaultView.Node)?e:Bo(t)}function Vo(t){if(!t)return null;if(t.instance instanceof Yo)return t.instance;if("#document-fragment"===t.nodeName)return new Xo.Fragment(t);let e=jo(t.nodeName||"Dom");return"LinearGradient"===e||"RadialGradient"===e?e="Gradient":Xo[e]||(e="Dom"),new Xo[e](t)}let Ho=Vo;function Uo(t,e=t.name,n=!1){return Xo[e]=t,n&&(Xo[Go]=t),Ao(Object.getOwnPropertyNames(t.prototype)),t}let Zo=1e3;function Ko(t){return"Svgjs"+jo(t)+Zo++}function Jo(t){for(let e=t.children.length-1;e>=0;e--)Jo(t.children[e]);return t.id?(t.id=Ko(t.nodeName),t):t}function Qo(t,e){let n,r;for(r=(t=Array.isArray(t)?t:[t]).length-1;r>=0;r--)for(n in e)t[r].prototype[n]=e[n]}function tu(t){return function(...e){const n=e[e.length-1];return!n||n.constructor!==Object||n instanceof Array?t.apply(this,e):t.apply(this,e.slice(0,-1)).attr(n)}}ko("Dom",{siblings:function(){return this.parent().children()},position:function(){return this.parent().index(this)},next:function(){return this.siblings()[this.position()+1]},prev:function(){return this.siblings()[this.position()-1]},forward:function(){const t=this.position();return this.parent().add(this.remove(),t+1),this},backward:function(){const t=this.position();return this.parent().add(this.remove(),t?t-1:0),this},front:function(){return this.parent().add(this.remove()),this},back:function(){return this.parent().add(this.remove(),0),this},before:function(t){(t=Wo(t)).remove();const e=this.position();return this.parent().add(t,e),this},after:function(t){(t=Wo(t)).remove();const e=this.position();return this.parent().add(t,e+1),this},insertBefore:function(t){return(t=Wo(t)).before(this),this},insertAfter:function(t){return(t=Wo(t)).after(this),this}});const eu=/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,nu=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,ru=/rgb\((\d+),(\d+),(\d+)\)/,iu=/(#[a-z_][a-z0-9\-_]*)/i,su=/\)\s*,?\s*/,ou=/\s/g,uu=/^#[a-f0-9]{3}$|^#[a-f0-9]{6}$/i,au=/^rgb\(/,hu=/^(\s+)?$/,lu=/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,cu=/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,fu=/[\s,]+/,du=/[MLHVCSQTAZ]/i;function pu(t){const e=Math.round(t),n=Math.max(0,Math.min(255,e)).toString(16);return 1===n.length?"0"+n:n}function mu(t,e){for(let n=e.length;n--;)if(null==t[e[n]])return!1;return!0}function gu(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}ko("Dom",{classes:function(){const t=this.attr("class");return null==t?[]:t.trim().split(fu)},hasClass:function(t){return-1!==this.classes().indexOf(t)},addClass:function(t){if(!this.hasClass(t)){const e=this.classes();e.push(t),this.attr("class",e.join(" "))}return this},removeClass:function(t){return this.hasClass(t)&&this.attr("class",this.classes().filter((function(e){return e!==t})).join(" ")),this},toggleClass:function(t){return this.hasClass(t)?this.removeClass(t):this.addClass(t)}}),ko("Dom",{css:function(t,e){const n={};if(0===arguments.length)return this.node.style.cssText.split(/\s*;\s*/).filter((function(t){return!!t.length})).forEach((function(t){const e=t.split(/\s*:\s*/);n[e[0]]=e[1]})),n;if(arguments.length<2){if(Array.isArray(t)){for(const e of t){const t=e;n[e]=this.node.style.getPropertyValue(t)}return n}if("string"==typeof t)return this.node.style.getPropertyValue(t);if("object"==typeof t)for(const e in t)this.node.style.setProperty(e,null==t[e]||hu.test(t[e])?"":t[e])}return 2===arguments.length&&this.node.style.setProperty(t,null==e||hu.test(e)?"":e),this},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},visible:function(){return"none"!==this.css("display")}}),ko("Dom",{data:function(t,e,n){if(null==t)return this.data(So(function(t,e){let n;const r=t.length,i=[];for(n=0;n<r;n++)e(t[n])&&i.push(t[n]);return i}(this.node.attributes,(t=>0===t.nodeName.indexOf("data-"))),(t=>t.nodeName.slice(5))));if(t instanceof Array){const e={};for(const n of t)e[n]=this.data(n);return e}if("object"==typeof t)for(e in t)this.data(e,t[e]);else if(arguments.length<2)try{return JSON.parse(this.attr("data-"+t))}catch(r){return this.attr("data-"+t)}else this.attr("data-"+t,null===e?null:!0===n||"string"==typeof e||"number"==typeof e?e:JSON.stringify(e));return this}}),ko("Dom",{remember:function(t,e){if("object"==typeof arguments[0])for(const n in t)this.remember(n,t[n]);else{if(1===arguments.length)return this.memory()[t];this.memory()[t]=e}return this},forget:function(){if(0===arguments.length)this._memory={};else for(let t=arguments.length-1;t>=0;t--)delete this.memory()[arguments[t]];return this},memory:function(){return this._memory=this._memory||{}}});class yu{constructor(...t){this.init(...t)}static isColor(t){return t&&(t instanceof yu||this.isRgb(t)||this.test(t))}static isRgb(t){return t&&"number"==typeof t.r&&"number"==typeof t.g&&"number"==typeof t.b}static random(t="vibrant",e){const{random:n,round:r,sin:i,PI:s}=Math;if("vibrant"===t){const t=24*n()+57,e=38*n()+45,r=360*n();return new yu(t,e,r,"lch")}if("sine"===t){const t=r(80*i(2*s*(e=null==e?n():e)/.5+.01)+150),o=r(50*i(2*s*e/.5+4.6)+200),u=r(100*i(2*s*e/.5+2.3)+150);return new yu(t,o,u)}if("pastel"===t){const t=8*n()+86,e=17*n()+9,r=360*n();return new yu(t,e,r,"lch")}if("dark"===t){const t=10+10*n(),e=50*n()+86,r=360*n();return new yu(t,e,r,"lch")}if("rgb"===t){const t=255*n(),e=255*n(),r=255*n();return new yu(t,e,r)}if("lab"===t){const t=100*n(),e=256*n()-128,r=256*n()-128;return new yu(t,e,r,"lab")}if("grey"===t){const t=255*n();return new yu(t,t,t)}throw new Error("Unsupported random color mode")}static test(t){return"string"==typeof t&&(uu.test(t)||au.test(t))}cmyk(){const{_a:t,_b:e,_c:n}=this.rgb(),[r,i,s]=[t,e,n].map((t=>t/255)),o=Math.min(1-r,1-i,1-s);if(1===o)return new yu(0,0,0,1,"cmyk");return new yu((1-r-o)/(1-o),(1-i-o)/(1-o),(1-s-o)/(1-o),o,"cmyk")}hsl(){const{_a:t,_b:e,_c:n}=this.rgb(),[r,i,s]=[t,e,n].map((t=>t/255)),o=Math.max(r,i,s),u=Math.min(r,i,s),a=(o+u)/2,h=o===u,l=o-u;return new yu(360*(h?0:o===r?((i-s)/l+(i<s?6:0))/6:o===i?((s-r)/l+2)/6:o===s?((r-i)/l+4)/6:0),100*(h?0:a>.5?l/(2-o-u):l/(o+u)),100*a,"hsl")}init(t=0,e=0,n=0,r=0,i="rgb"){if(t=t||0,this.space)for(const c in this.space)delete this[this.space[c]];if("number"==typeof t)i="string"==typeof r?r:i,r="string"==typeof r?0:r,Object.assign(this,{_a:t,_b:e,_c:n,_d:r,space:i});else if(t instanceof Array)this.space=e||("string"==typeof t[3]?t[3]:t[4])||"rgb",Object.assign(this,{_a:t[0],_b:t[1],_c:t[2],_d:t[3]||0});else if(t instanceof Object){const n=function(t,e){const n=mu(t,"rgb")?{_a:t.r,_b:t.g,_c:t.b,_d:0,space:"rgb"}:mu(t,"xyz")?{_a:t.x,_b:t.y,_c:t.z,_d:0,space:"xyz"}:mu(t,"hsl")?{_a:t.h,_b:t.s,_c:t.l,_d:0,space:"hsl"}:mu(t,"lab")?{_a:t.l,_b:t.a,_c:t.b,_d:0,space:"lab"}:mu(t,"lch")?{_a:t.l,_b:t.c,_c:t.h,_d:0,space:"lch"}:mu(t,"cmyk")?{_a:t.c,_b:t.m,_c:t.y,_d:t.k,space:"cmyk"}:{_a:0,_b:0,_c:0,space:"rgb"};return n.space=e||n.space,n}(t,e);Object.assign(this,n)}else if("string"==typeof t)if(au.test(t)){const e=t.replace(ou,""),[n,r,i]=ru.exec(e).slice(1,4).map((t=>parseInt(t)));Object.assign(this,{_a:n,_b:r,_c:i,_d:0,space:"rgb"})}else{if(!uu.test(t))throw Error("Unsupported string format, can't construct Color");{const e=t=>parseInt(t,16),[,n,r,i]=nu.exec((s=t,4===s.length?["#",s.substring(1,2),s.substring(1,2),s.substring(2,3),s.substring(2,3),s.substring(3,4),s.substring(3,4)].join(""):s)).map(e);Object.assign(this,{_a:n,_b:r,_c:i,_d:0,space:"rgb"})}}var s;const{_a:o,_b:u,_c:a,_d:h}=this,l="rgb"===this.space?{r:o,g:u,b:a}:"xyz"===this.space?{x:o,y:u,z:a}:"hsl"===this.space?{h:o,s:u,l:a}:"lab"===this.space?{l:o,a:u,b:a}:"lch"===this.space?{l:o,c:u,h:a}:"cmyk"===this.space?{c:o,m:u,y:a,k:h}:{};Object.assign(this,l)}lab(){const{x:t,y:e,z:n}=this.xyz();return new yu(116*e-16,500*(t-e),200*(e-n),"lab")}lch(){const{l:t,a:e,b:n}=this.lab(),r=Math.sqrt(e**2+n**2);let i=180*Math.atan2(n,e)/Math.PI;i<0&&(i*=-1,i=360-i);return new yu(t,r,i,"lch")}rgb(){if("rgb"===this.space)return this;if("lab"===(t=this.space)||"xyz"===t||"lch"===t){let{x:t,y:e,z:n}=this;if("lab"===this.space||"lch"===this.space){let{l:r,a:i,b:s}=this;if("lch"===this.space){const{c:t,h:e}=this,n=Math.PI/180;i=t*Math.cos(n*e),s=t*Math.sin(n*e)}const o=(r+16)/116,u=i/500+o,a=o-s/200,h=16/116,l=.008856,c=7.787;t=.95047*(u**3>l?u**3:(u-h)/c),e=1*(o**3>l?o**3:(o-h)/c),n=1.08883*(a**3>l?a**3:(a-h)/c)}const r=3.2406*t+-1.5372*e+-.4986*n,i=-.9689*t+1.8758*e+.0415*n,s=.0557*t+-.204*e+1.057*n,o=Math.pow,u=.0031308,a=r>u?1.055*o(r,1/2.4)-.055:12.92*r,h=i>u?1.055*o(i,1/2.4)-.055:12.92*i,l=s>u?1.055*o(s,1/2.4)-.055:12.92*s;return new yu(255*a,255*h,255*l)}if("hsl"===this.space){let{h:t,s:e,l:n}=this;if(t/=360,e/=100,n/=100,0===e){n*=255;return new yu(n,n,n)}const r=n<.5?n*(1+e):n+e-n*e,i=2*n-r,s=255*gu(i,r,t+1/3),o=255*gu(i,r,t),u=255*gu(i,r,t-1/3);return new yu(s,o,u)}if("cmyk"===this.space){const{c:t,m:e,y:n,k:r}=this,i=255*(1-Math.min(1,t*(1-r)+r)),s=255*(1-Math.min(1,e*(1-r)+r)),o=255*(1-Math.min(1,n*(1-r)+r));return new yu(i,s,o)}return this;var t}toArray(){const{_a:t,_b:e,_c:n,_d:r,space:i}=this;return[t,e,n,r,i]}toHex(){const[t,e,n]=this._clamped().map(pu);return`#${t}${e}${n}`}toRgb(){const[t,e,n]=this._clamped();return`rgb(${t},${e},${n})`}toString(){return this.toHex()}xyz(){const{_a:t,_b:e,_c:n}=this.rgb(),[r,i,s]=[t,e,n].map((t=>t/255)),o=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92,u=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92,a=s>.04045?Math.pow((s+.055)/1.055,2.4):s/12.92,h=(.4124*o+.3576*u+.1805*a)/.95047,l=(.2126*o+.7152*u+.0722*a)/1,c=(.0193*o+.1192*u+.9505*a)/1.08883,f=h>.008856?Math.pow(h,1/3):7.787*h+16/116,d=l>.008856?Math.pow(l,1/3):7.787*l+16/116,p=c>.008856?Math.pow(c,1/3):7.787*c+16/116;return new yu(f,d,p,"xyz")}_clamped(){const{_a:t,_b:e,_c:n}=this.rgb(),{max:r,min:i,round:s}=Math;return[t,e,n].map((t=>r(0,i(s(t),255))))}}class _u{constructor(...t){this.init(...t)}clone(){return new _u(this)}init(t,e){const n=0,r=0,i=Array.isArray(t)?{x:t[0],y:t[1]}:"object"==typeof t?{x:t.x,y:t.y}:{x:t,y:e};return this.x=null==i.x?n:i.x,this.y=null==i.y?r:i.y,this}toArray(){return[this.x,this.y]}transform(t){return this.clone().transformO(t)}transformO(t){wu.isMatrixLike(t)||(t=new wu(t));const{x:e,y:n}=this;return this.x=t.a*e+t.c*n+t.e,this.y=t.b*e+t.d*n+t.f,this}}function vu(t,e,n){return Math.abs(e-t)<1e-6}class wu{constructor(...t){this.init(...t)}static formatTransforms(t){const e="both"===t.flip||!0===t.flip,n=t.flip&&(e||"x"===t.flip)?-1:1,r=t.flip&&(e||"y"===t.flip)?-1:1,i=t.skew&&t.skew.length?t.skew[0]:isFinite(t.skew)?t.skew:isFinite(t.skewX)?t.skewX:0,s=t.skew&&t.skew.length?t.skew[1]:isFinite(t.skew)?t.skew:isFinite(t.skewY)?t.skewY:0,o=t.scale&&t.scale.length?t.scale[0]*n:isFinite(t.scale)?t.scale*n:isFinite(t.scaleX)?t.scaleX*n:n,u=t.scale&&t.scale.length?t.scale[1]*r:isFinite(t.scale)?t.scale*r:isFinite(t.scaleY)?t.scaleY*r:r,a=t.shear||0,h=t.rotate||t.theta||0,l=new _u(t.origin||t.around||t.ox||t.originX,t.oy||t.originY),c=l.x,f=l.y,d=new _u(t.position||t.px||t.positionX||NaN,t.py||t.positionY||NaN),p=d.x,m=d.y,g=new _u(t.translate||t.tx||t.translateX,t.ty||t.translateY),y=g.x,_=g.y,v=new _u(t.relative||t.rx||t.relativeX,t.ry||t.relativeY);return{scaleX:o,scaleY:u,skewX:i,skewY:s,shear:a,theta:h,rx:v.x,ry:v.y,tx:y,ty:_,ox:c,oy:f,px:p,py:m}}static fromArray(t){return{a:t[0],b:t[1],c:t[2],d:t[3],e:t[4],f:t[5]}}static isMatrixLike(t){return null!=t.a||null!=t.b||null!=t.c||null!=t.d||null!=t.e||null!=t.f}static matrixMultiply(t,e,n){const r=t.a*e.a+t.c*e.b,i=t.b*e.a+t.d*e.b,s=t.a*e.c+t.c*e.d,o=t.b*e.c+t.d*e.d,u=t.e+t.a*e.e+t.c*e.f,a=t.f+t.b*e.e+t.d*e.f;return n.a=r,n.b=i,n.c=s,n.d=o,n.e=u,n.f=a,n}around(t,e,n){return this.clone().aroundO(t,e,n)}aroundO(t,e,n){const r=t||0,i=e||0;return this.translateO(-r,-i).lmultiplyO(n).translateO(r,i)}clone(){return new wu(this)}decompose(t=0,e=0){const n=this.a,r=this.b,i=this.c,s=this.d,o=this.e,u=this.f,a=n*s-r*i,h=a>0?1:-1,l=h*Math.sqrt(n*n+r*r),c=Math.atan2(h*r,h*n),f=180/Math.PI*c,d=Math.cos(c),p=Math.sin(c),m=(n*i+r*s)/a,g=i*l/(m*n-r)||s*l/(m*r+n);return{scaleX:l,scaleY:g,shear:m,rotate:f,translateX:o-t+t*d*l+e*(m*d*l-p*g),translateY:u-e+t*p*l+e*(m*p*l+d*g),originX:t,originY:e,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}equals(t){if(t===this)return!0;const e=new wu(t);return vu(this.a,e.a)&&vu(this.b,e.b)&&vu(this.c,e.c)&&vu(this.d,e.d)&&vu(this.e,e.e)&&vu(this.f,e.f)}flip(t,e){return this.clone().flipO(t,e)}flipO(t,e){return"x"===t?this.scaleO(-1,1,e,0):"y"===t?this.scaleO(1,-1,0,e):this.scaleO(-1,-1,t,e||t)}init(t){const e=wu.fromArray([1,0,0,1,0,0]);return t=t instanceof Wu?t.matrixify():"string"==typeof t?wu.fromArray(t.split(fu).map(parseFloat)):Array.isArray(t)?wu.fromArray(t):"object"==typeof t&&wu.isMatrixLike(t)?t:"object"==typeof t?(new wu).transform(t):6===arguments.length?wu.fromArray([].slice.call(arguments)):e,this.a=null!=t.a?t.a:e.a,this.b=null!=t.b?t.b:e.b,this.c=null!=t.c?t.c:e.c,this.d=null!=t.d?t.d:e.d,this.e=null!=t.e?t.e:e.e,this.f=null!=t.f?t.f:e.f,this}inverse(){return this.clone().inverseO()}inverseO(){const t=this.a,e=this.b,n=this.c,r=this.d,i=this.e,s=this.f,o=t*r-e*n;if(!o)throw new Error("Cannot invert "+this);const u=r/o,a=-e/o,h=-n/o,l=t/o,c=-(u*i+h*s),f=-(a*i+l*s);return this.a=u,this.b=a,this.c=h,this.d=l,this.e=c,this.f=f,this}lmultiply(t){return this.clone().lmultiplyO(t)}lmultiplyO(t){const e=t instanceof wu?t:new wu(t);return wu.matrixMultiply(e,this,this)}multiply(t){return this.clone().multiplyO(t)}multiplyO(t){const e=t instanceof wu?t:new wu(t);return wu.matrixMultiply(this,e,this)}rotate(t,e,n){return this.clone().rotateO(t,e,n)}rotateO(t,e=0,n=0){t=No(t);const r=Math.cos(t),i=Math.sin(t),{a:s,b:o,c:u,d:a,e:h,f:l}=this;return this.a=s*r-o*i,this.b=o*r+s*i,this.c=u*r-a*i,this.d=a*r+u*i,this.e=h*r-l*i+n*i-e*r+e,this.f=l*r+h*i-e*i-n*r+n,this}scale(){return this.clone().scaleO(...arguments)}scaleO(t,e=t,n=0,r=0){3===arguments.length&&(r=n,n=e,e=t);const{a:i,b:s,c:o,d:u,e:a,f:h}=this;return this.a=i*t,this.b=s*e,this.c=o*t,this.d=u*e,this.e=a*t-n*t+n,this.f=h*e-r*e+r,this}shear(t,e,n){return this.clone().shearO(t,e,n)}shearO(t,e=0,n=0){const{a:r,b:i,c:s,d:o,e:u,f:a}=this;return this.a=r+i*t,this.c=s+o*t,this.e=u+a*t-n*t,this}skew(){return this.clone().skewO(...arguments)}skewO(t,e=t,n=0,r=0){3===arguments.length&&(r=n,n=e,e=t),t=No(t),e=No(e);const i=Math.tan(t),s=Math.tan(e),{a:o,b:u,c:a,d:h,e:l,f:c}=this;return this.a=o+u*i,this.b=u+o*s,this.c=a+h*i,this.d=h+a*s,this.e=l+c*i-r*i,this.f=c+l*s-n*s,this}skewX(t,e,n){return this.skew(t,0,e,n)}skewY(t,e,n){return this.skew(0,t,e,n)}toArray(){return[this.a,this.b,this.c,this.d,this.e,this.f]}toString(){return"matrix("+this.a+","+this.b+","+this.c+","+this.d+","+this.e+","+this.f+")"}transform(t){if(wu.isMatrixLike(t)){return new wu(t).multiplyO(this)}const e=wu.formatTransforms(t),{x:n,y:r}=new _u(e.ox,e.oy).transform(this),i=(new wu).translateO(e.rx,e.ry).lmultiplyO(this).translateO(-n,-r).scaleO(e.scaleX,e.scaleY).skewO(e.skewX,e.skewY).shearO(e.shear).rotateO(e.theta).translateO(n,r);if(isFinite(e.px)||isFinite(e.py)){const t=new _u(n,r).transform(i),s=isFinite(e.px)?e.px-t.x:0,o=isFinite(e.py)?e.py-t.y:0;i.translateO(s,o)}return i.translateO(e.tx,e.ty),i}translate(t,e){return this.clone().translateO(t,e)}translateO(t,e){return this.e+=t||0,this.f+=e||0,this}valueOf(){return{a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}}function bu(){if(!bu.nodes){const t=Wo().size(2,0);t.node.style.cssText=["opacity: 0","position: absolute","left: -100%","top: -100%","overflow: hidden"].join(";"),t.attr("focusable","false"),t.attr("aria-hidden","true");const e=t.path().node;bu.nodes={svg:t,path:e}}if(!bu.nodes.svg.node.parentNode){const t=$o.document.body||$o.document.documentElement;bu.nodes.svg.addTo(t)}return bu.nodes}function xu(t){return!(t.width||t.height||t.x||t.y)}Uo(wu,"Matrix");class Eu{constructor(...t){this.init(...t)}addOffset(){return this.x+=$o.window.pageXOffset,this.y+=$o.window.pageYOffset,new Eu(this)}init(t){return t="string"==typeof t?t.split(fu).map(parseFloat):Array.isArray(t)?t:"object"==typeof t?[null!=t.left?t.left:t.x,null!=t.top?t.top:t.y,t.width,t.height]:4===arguments.length?[].slice.call(arguments):[0,0,0,0],this.x=t[0]||0,this.y=t[1]||0,this.width=this.w=t[2]||0,this.height=this.h=t[3]||0,this.x2=this.x+this.w,this.y2=this.y+this.h,this.cx=this.x+this.w/2,this.cy=this.y+this.h/2,this}isNulled(){return xu(this)}merge(t){const e=Math.min(this.x,t.x),n=Math.min(this.y,t.y),r=Math.max(this.x+this.width,t.x+t.width)-e,i=Math.max(this.y+this.height,t.y+t.height)-n;return new Eu(e,n,r,i)}toArray(){return[this.x,this.y,this.width,this.height]}toString(){return this.x+" "+this.y+" "+this.width+" "+this.height}transform(t){t instanceof wu||(t=new wu(t));let e=1/0,n=-1/0,r=1/0,i=-1/0;return[new _u(this.x,this.y),new _u(this.x2,this.y),new _u(this.x,this.y2),new _u(this.x2,this.y2)].forEach((function(s){s=s.transform(t),e=Math.min(e,s.x),n=Math.max(n,s.x),r=Math.min(r,s.y),i=Math.max(i,s.y)})),new Eu(e,r,n-e,i-r)}}function Ou(t,e,n){let r;try{if(r=e(t.node),xu(r)&&((i=t.node)!==$o.document&&!($o.document.documentElement.contains||function(t){for(;t.parentNode;)t=t.parentNode;return t===$o.document}).call($o.document.documentElement,i)))throw new Error("Element not in the dom")}catch(s){r=n(t)}var i;return r}ko({viewbox:{viewbox(t,e,n,r){return null==t?new Eu(this.attr("viewBox")):this.attr("viewBox",new Eu(t,e,n,r))},zoom(t,e){let{width:n,height:r}=this.attr(["width","height"]);if((n||r)&&"string"!=typeof n&&"string"!=typeof r||(n=this.node.clientWidth,r=this.node.clientHeight),!n||!r)throw new Error("Impossible to get absolute width and height. Please provide an absolute width and height attribute on the zooming element");const i=this.viewbox(),s=n/i.width,o=r/i.height,u=Math.min(s,o);if(null==t)return u;let a=u/t;a===1/0&&(a=Number.MAX_SAFE_INTEGER/100),e=e||new _u(n/2/s+i.x,r/2/o+i.y);const h=new Eu(i).transform(new wu({scale:a,origin:e}));return this.viewbox(h)}}}),Uo(Eu,"Box");class Mu extends Array{constructor(t=[],...e){if(super(t,...e),"number"==typeof t)return this;this.length=0,this.push(...t)}}Qo([Mu],{each(t,...e){return"function"==typeof t?this.map(((e,n,r)=>t.call(e,e,n,r))):this.map((n=>n[t](...e)))},toArray(){return Array.prototype.concat.apply([],this)}});const ku=["toArray","constructor","each"];function Cu(t,e){return new Mu(So((e||$o.document).querySelectorAll(t),(function(t){return Vo(t)})))}Mu.extend=function(t){t=t.reduce(((t,e)=>(ku.includes(e)||"_"===e[0]||(e in Array.prototype&&(t["$"+e]=Array.prototype[e]),t[e]=function(...t){return this.each(e,...t)}),t)),{}),Qo([Mu],t)};let Au=0;const Su={};function Nu(t){let e=t.getEventHolder();return e===$o.window&&(e=Su),e.events||(e.events={}),e.events}function ju(t){return t.getEventTarget()}function Tu(t,e,n,r,i){const s=n.bind(r||t),o=Wo(t),u=Nu(o),a=ju(o);e=Array.isArray(e)?e:e.split(fu),n._svgjsListenerId||(n._svgjsListenerId=++Au),e.forEach((function(t){const e=t.split(".")[0],r=t.split(".")[1]||"*";u[e]=u[e]||{},u[e][r]=u[e][r]||{},u[e][r][n._svgjsListenerId]=s,a.addEventListener(e,s,i||!1)}))}function Iu(t,e,n,r){const i=Wo(t),s=Nu(i),o=ju(i);("function"!=typeof n||(n=n._svgjsListenerId))&&(e=Array.isArray(e)?e:(e||"").split(fu)).forEach((function(t){const e=t&&t.split(".")[0],u=t&&t.split(".")[1];let a,h;if(n)s[e]&&s[e][u||"*"]&&(o.removeEventListener(e,s[e][u||"*"][n],r||!1),delete s[e][u||"*"][n]);else if(e&&u){if(s[e]&&s[e][u]){for(h in s[e][u])Iu(o,[e,u].join("."),h);delete s[e][u]}}else if(u)for(t in s)for(a in s[t])u===a&&Iu(o,[t,u].join("."));else if(e){if(s[e]){for(a in s[e])Iu(o,[e,a].join("."));delete s[e]}}else{for(t in s)Iu(o,t);!function(t){let e=t.getEventHolder();e===$o.window&&(e=Su),e.events&&(e.events={})}(i)}}))}class Ru extends Yo{addEventListener(){}dispatch(t,e,n){return function(t,e,n,r){const i=ju(t);return e instanceof $o.window.Event||(e=new $o.window.CustomEvent(e,{detail:n,cancelable:!0,...r})),i.dispatchEvent(e),e}(this,t,e,n)}dispatchEvent(t){const e=this.getEventHolder().events;if(!e)return!0;const n=e[t.type];for(const r in n)for(const e in n[r])n[r][e](t);return!t.defaultPrevented}fire(t,e,n){return this.dispatch(t,e,n),this}getEventHolder(){return this}getEventTarget(){return this}off(t,e,n){return Iu(this,t,e,n),this}on(t,e,n,r){return Tu(this,t,e,n,r),this}removeEventListener(){}}function Lu(){}Uo(Ru,"EventTarget");const zu=400,Du=">",Pu=0,Fu={"fill-opacity":1,"stroke-opacity":1,"stroke-width":0,"stroke-linejoin":"miter","stroke-linecap":"butt",fill:"#000000",stroke:"#000000",opacity:1,x:0,y:0,cx:0,cy:0,width:0,height:0,r:0,rx:0,ry:0,offset:0,"stop-opacity":1,"stop-color":"#000000","text-anchor":"start"};class $u extends Array{constructor(...t){super(...t),this.init(...t)}clone(){return new this.constructor(this)}init(t){return"number"==typeof t||(this.length=0,this.push(...this.parse(t))),this}parse(t=[]){return t instanceof Array?t:t.trim().split(fu).map(parseFloat)}toArray(){return Array.prototype.concat.apply([],this)}toSet(){return new Set(this)}toString(){return this.join(" ")}valueOf(){const t=[];return t.push(...this),t}}class Yu{constructor(...t){this.init(...t)}convert(t){return new Yu(this.value,t)}divide(t){return t=new Yu(t),new Yu(this/t,this.unit||t.unit)}init(t,e){return e=Array.isArray(t)?t[1]:e,t=Array.isArray(t)?t[0]:t,this.value=0,this.unit=e||"","number"==typeof t?this.value=isNaN(t)?0:isFinite(t)?t:t<0?-34e37:34e37:"string"==typeof t?(e=t.match(eu))&&(this.value=parseFloat(e[1]),"%"===e[5]?this.value/=100:"s"===e[5]&&(this.value*=1e3),this.unit=e[5]):t instanceof Yu&&(this.value=t.valueOf(),this.unit=t.unit),this}minus(t){return t=new Yu(t),new Yu(this-t,this.unit||t.unit)}plus(t){return t=new Yu(t),new Yu(this+t,this.unit||t.unit)}times(t){return t=new Yu(t),new Yu(this*t,this.unit||t.unit)}toArray(){return[this.value,this.unit]}toJSON(){return this.toString()}toString(){return("%"===this.unit?~~(1e8*this.value)/1e6:"s"===this.unit?this.value/1e3:this.value)+this.unit}valueOf(){return this.value}}const Xu=new Set(["fill","stroke","color","bgcolor","stop-color","flood-color","lighting-color"]),Gu=[];class Bu extends Ru{constructor(t,e){super(),this.node=t,this.type=t.nodeName,e&&t!==e&&this.attr(e)}add(t,e){return(t=Wo(t)).removeNamespace&&this.node instanceof $o.window.SVGElement&&t.removeNamespace(),null==e?this.node.appendChild(t.node):t.node!==this.node.childNodes[e]&&this.node.insertBefore(t.node,this.node.childNodes[e]),this}addTo(t,e){return Wo(t).put(this,e)}children(){return new Mu(So(this.node.children,(function(t){return Vo(t)})))}clear(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return this}clone(t=!0,e=!0){this.writeDataToDom();let n=this.node.cloneNode(t);return e&&(n=Jo(n)),new this.constructor(n)}each(t,e){const n=this.children();let r,i;for(r=0,i=n.length;r<i;r++)t.apply(n[r],[r,n]),e&&n[r].each(t,e);return this}element(t,e){return this.put(new Bu(Bo(t),e))}first(){return Vo(this.node.firstChild)}get(t){return Vo(this.node.childNodes[t])}getEventHolder(){return this.node}getEventTarget(){return this.node}has(t){return this.index(t)>=0}html(t,e){return this.xml(t,e,"http://www.w3.org/1999/xhtml")}id(t){return void 0!==t||this.node.id||(this.node.id=Ko(this.type)),this.attr("id",t)}index(t){return[].slice.call(this.node.childNodes).indexOf(t.node)}last(){return Vo(this.node.lastChild)}matches(t){const e=this.node,n=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector||null;return n&&n.call(e,t)}parent(t){let e=this;if(!e.node.parentNode)return null;if(e=Vo(e.node.parentNode),!t)return e;do{if("string"==typeof t?e.matches(t):e instanceof t)return e}while(e=Vo(e.node.parentNode));return e}put(t,e){return t=Wo(t),this.add(t,e),t}putIn(t,e){return Wo(t).add(this,e)}remove(){return this.parent()&&this.parent().removeElement(this),this}removeElement(t){return this.node.removeChild(t.node),this}replace(t){return t=Wo(t),this.node.parentNode&&this.node.parentNode.replaceChild(t.node,this.node),t}round(t=2,e=null){const n=10**t,r=this.attr(e);for(const i in r)"number"==typeof r[i]&&(r[i]=Math.round(r[i]*n)/n);return this.attr(r),this}svg(t,e){return this.xml(t,e,Do)}toString(){return this.id()}words(t){return this.node.textContent=t,this}wrap(t){const e=this.parent();if(!e)return this.addTo(t);const n=e.index(this);return e.put(t,n).put(this)}writeDataToDom(){return this.each((function(){this.writeDataToDom()})),this}xml(t,e,n){if("boolean"==typeof t&&(n=e,e=t,t=null),null==t||"function"==typeof t){e=null==e||e,this.writeDataToDom();let n=this;if(null!=t){if(n=Vo(n.node.cloneNode(!0)),e){const e=t(n);if(n=e||n,!1===e)return""}n.each((function(){const e=t(this),n=e||this;!1===e?this.remove():e&&this!==n&&this.replace(n)}),!0)}return e?n.node.outerHTML:n.node.innerHTML}e=null!=e&&e;const r=Bo("wrapper",n),i=$o.document.createDocumentFragment();r.innerHTML=t;for(let o=r.children.length;o--;)i.appendChild(r.firstElementChild);const s=this.parent();return e?this.replace(i)&&s:this.add(i)}}Qo(Bu,{attr:function(t,e,n){if(null==t){t={},e=this.node.attributes;for(const n of e)t[n.nodeName]=lu.test(n.nodeValue)?parseFloat(n.nodeValue):n.nodeValue;return t}if(t instanceof Array)return t.reduce(((t,e)=>(t[e]=this.attr(e),t)),{});if("object"==typeof t&&t.constructor===Object)for(e in t)this.attr(e,t[e]);else if(null===e)this.node.removeAttribute(t);else{if(null==e)return null==(e=this.node.getAttribute(t))?Fu[t]:lu.test(e)?parseFloat(e):e;"number"==typeof(e=Gu.reduce(((e,n)=>n(t,e,this)),e))?e=new Yu(e):Xu.has(t)&&yu.isColor(e)?e=new yu(e):e.constructor===Array&&(e=new $u(e)),"leading"===t?this.leading&&this.leading(e):"string"==typeof n?this.node.setAttributeNS(n,t,e.toString()):this.node.setAttribute(t,e.toString()),!this.rebuild||"font-size"!==t&&"x"!==t||this.rebuild()}return this},find:function(t){return Cu(t,this.node)},findOne:function(t){return Vo(this.node.querySelector(t))}}),Uo(Bu,"Dom");class Wu extends Bu{constructor(t,e){super(t,e),this.dom={},this.node.instance=this,(t.hasAttribute("data-svgjs")||t.hasAttribute("svgjs:data"))&&this.setData(JSON.parse(t.getAttribute("data-svgjs"))??JSON.parse(t.getAttribute("svgjs:data"))??{})}center(t,e){return this.cx(t).cy(e)}cx(t){return null==t?this.x()+this.width()/2:this.x(t-this.width()/2)}cy(t){return null==t?this.y()+this.height()/2:this.y(t-this.height()/2)}defs(){const t=this.root();return t&&t.defs()}dmove(t,e){return this.dx(t).dy(e)}dx(t=0){return this.x(new Yu(t).plus(this.x()))}dy(t=0){return this.y(new Yu(t).plus(this.y()))}getEventHolder(){return this}height(t){return this.attr("height",t)}move(t,e){return this.x(t).y(e)}parents(t=this.root()){const e="string"==typeof t;e||(t=Wo(t));const n=new Mu;let r=this;for(;(r=r.parent())&&r.node!==$o.document&&"#document-fragment"!==r.nodeName&&(n.push(r),e||r.node!==t.node)&&(!e||!r.matches(t));)if(r.node===this.root().node)return null;return n}reference(t){if(!(t=this.attr(t)))return null;const e=(t+"").match(iu);return e?Wo(e[1]):null}root(){const t=this.parent(Xo[Go]);return t&&t.root()}setData(t){return this.dom=t,this}size(t,e){const n=To(this,t,e);return this.width(new Yu(n.width)).height(new Yu(n.height))}width(t){return this.attr("width",t)}writeDataToDom(){return zo(this,this.dom),super.writeDataToDom()}x(t){return this.attr("x",t)}y(t){return this.attr("y",t)}}Qo(Wu,{bbox:function(){const t=Ou(this,(t=>t.getBBox()),(t=>{try{const e=t.clone().addTo(bu().svg).show(),n=e.node.getBBox();return e.remove(),n}catch(e){throw new Error(`Getting bbox of element "${t.node.nodeName}" is not possible: ${e.toString()}`)}}));return new Eu(t)},rbox:function(t){const e=Ou(this,(t=>t.getBoundingClientRect()),(t=>{throw new Error(`Getting rbox of element "${t.node.nodeName}" is not possible`)})),n=new Eu(e);return t?n.transform(t.screenCTM().inverseO()):n.addOffset()},inside:function(t,e){const n=this.bbox();return t>n.x&&e>n.y&&t<n.x+n.width&&e<n.y+n.height},point:function(t,e){return new _u(t,e).transformO(this.screenCTM().inverseO())},ctm:function(){return new wu(this.node.getCTM())},screenCTM:function(){try{if("function"==typeof this.isRoot&&!this.isRoot()){const t=this.rect(1,1),e=t.node.getScreenCTM();return t.remove(),new wu(e)}return new wu(this.node.getScreenCTM())}catch(t){return console.warn(`Cannot get CTM from SVG node ${this.node.nodeName}. Is the element rendered?`),new wu}}}),Uo(Wu,"Element");const qu={stroke:["color","width","opacity","linecap","linejoin","miterlimit","dasharray","dashoffset"],fill:["color","opacity","rule"],prefix:function(t,e){return"color"===e?t:t+"-"+e}};["fill","stroke"].forEach((function(t){const e={};let n;e[t]=function(e){if(void 0===e)return this.attr(t);if("string"==typeof e||e instanceof yu||yu.isRgb(e)||e instanceof Wu)this.attr(t,e);else for(n=qu[t].length-1;n>=0;n--)null!=e[qu[t][n]]&&this.attr(qu.prefix(t,qu[t][n]),e[qu[t][n]]);return this},ko(["Element","Runner"],e)})),ko(["Element","Runner"],{matrix:function(t,e,n,r,i,s){return null==t?new wu(this):this.attr("transform",new wu(t,e,n,r,i,s))},rotate:function(t,e,n){return this.transform({rotate:t,ox:e,oy:n},!0)},skew:function(t,e,n,r){return 1===arguments.length||3===arguments.length?this.transform({skew:t,ox:e,oy:n},!0):this.transform({skew:[t,e],ox:n,oy:r},!0)},shear:function(t,e,n){return this.transform({shear:t,ox:e,oy:n},!0)},scale:function(t,e,n,r){return 1===arguments.length||3===arguments.length?this.transform({scale:t,ox:e,oy:n},!0):this.transform({scale:[t,e],ox:n,oy:r},!0)},translate:function(t,e){return this.transform({translate:[t,e]},!0)},relative:function(t,e){return this.transform({relative:[t,e]},!0)},flip:function(t="both",e="center"){return-1==="xybothtrue".indexOf(t)&&(e=t,t="both"),this.transform({flip:t,origin:e},!0)},opacity:function(t){return this.attr("opacity",t)}}),ko("radius",{radius:function(t,e=t){return"radialGradient"===(this._element||this).type?this.attr("r",new Yu(t)):this.rx(t).ry(e)}}),ko("Path",{length:function(){return this.node.getTotalLength()},pointAt:function(t){return new _u(this.node.getPointAtLength(t))}}),ko(["Element","Runner"],{font:function(t,e){if("object"==typeof t){for(e in t)this.font(e,t[e]);return this}return"leading"===t?this.leading(e):"anchor"===t?this.attr("text-anchor",e):"size"===t||"family"===t||"weight"===t||"stretch"===t||"variant"===t||"style"===t?this.attr("font-"+t,e):this.attr(t,e)}});ko("Element",["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","touchstart","touchmove","touchleave","touchend","touchcancel","contextmenu","wheel","pointerdown","pointermove","pointerup","pointerleave","pointercancel"].reduce((function(t,e){return t[e]=function(t){return null===t?this.off(e):this.on(e,t),this},t}),{})),ko("Element",{untransform:function(){return this.attr("transform",null)},matrixify:function(){return(this.attr("transform")||"").split(su).slice(0,-1).map((function(t){const e=t.trim().split("(");return[e[0],e[1].split(fu).map((function(t){return parseFloat(t)}))]})).reverse().reduce((function(t,e){return"matrix"===e[0]?t.lmultiply(wu.fromArray(e[1])):t[e[0]].apply(t,e[1])}),new wu)},toParent:function(t,e){if(this===t)return this;if(Lo(this.node))return this.addTo(t,e);const n=this.screenCTM(),r=t.screenCTM().inverse();return this.addTo(t,e).untransform().transform(r.multiply(n)),this},toRoot:function(t){return this.toParent(this.root(),t)},transform:function(t,e){if(null==t||"string"==typeof t){const e=new wu(this).decompose();return null==t?e:e[t]}wu.isMatrixLike(t)||(t={...t,origin:Io(t,this)});const n=new wu(!0===e?this:e||!1).transform(t);return this.attr("transform",n)}});class Vu extends Wu{flatten(){return this.each((function(){if(this instanceof Vu)return this.flatten().ungroup()})),this}ungroup(t=this.parent(),e=t.index(this)){return e=-1===e?t.children().length:e,this.each((function(n,r){return r[r.length-n-1].toParent(t,e)})),this.remove()}}Uo(Vu,"Container");class Hu extends Vu{constructor(t,e=t){super(qo("defs",t),e)}flatten(){return this}ungroup(){return this}}Uo(Hu,"Defs");class Uu extends Wu{}function Zu(t){return this.attr("rx",t)}function Ku(t){return this.attr("ry",t)}function Ju(t){return null==t?this.cx()-this.rx():this.cx(t+this.rx())}function Qu(t){return null==t?this.cy()-this.ry():this.cy(t+this.ry())}function ta(t){return this.attr("cx",t)}function ea(t){return this.attr("cy",t)}function na(t){return null==t?2*this.rx():this.rx(new Yu(t).divide(2))}function ra(t){return null==t?2*this.ry():this.ry(new Yu(t).divide(2))}Uo(Uu,"Shape");const ia=Object.freeze(Object.defineProperty({__proto__:null,cx:ta,cy:ea,height:ra,rx:Zu,ry:Ku,width:na,x:Ju,y:Qu},Symbol.toStringTag,{value:"Module"}));class sa extends Uu{constructor(t,e=t){super(qo("ellipse",t),e)}size(t,e){const n=To(this,t,e);return this.rx(new Yu(n.width).divide(2)).ry(new Yu(n.height).divide(2))}}Qo(sa,ia),ko("Container",{ellipse:tu((function(t=0,e=t){return this.put(new sa).size(t,e).move(0,0)}))}),Uo(sa,"Ellipse");class oa extends Bu{constructor(t=$o.document.createDocumentFragment()){super(t)}xml(t,e,n){if("boolean"==typeof t&&(n=e,e=t,t=null),null==t||"function"==typeof t){const t=new Bu(Bo("wrapper",n));return t.add(this.node.cloneNode(!0)),t.xml(!1,n)}return super.xml(t,!1,n)}}function ua(t,e){return"radialGradient"===(this._element||this).type?this.attr({fx:new Yu(t),fy:new Yu(e)}):this.attr({x1:new Yu(t),y1:new Yu(e)})}function aa(t,e){return"radialGradient"===(this._element||this).type?this.attr({cx:new Yu(t),cy:new Yu(e)}):this.attr({x2:new Yu(t),y2:new Yu(e)})}Uo(oa,"Fragment");const ha=Object.freeze(Object.defineProperty({__proto__:null,from:ua,to:aa},Symbol.toStringTag,{value:"Module"}));class la extends Vu{constructor(t,e){super(qo(t+"Gradient","string"==typeof t?null:t),e)}attr(t,e,n){return"transform"===t&&(t="gradientTransform"),super.attr(t,e,n)}bbox(){return new Eu}targets(){return Cu("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}}Qo(la,ha),ko({Container:{gradient(...t){return this.defs().gradient(...t)}},Defs:{gradient:tu((function(t,e){return this.put(new la(t)).update(e)}))}}),Uo(la,"Gradient");class ca extends Vu{constructor(t,e=t){super(qo("pattern",t),e)}attr(t,e,n){return"transform"===t&&(t="patternTransform"),super.attr(t,e,n)}bbox(){return new Eu}targets(){return Cu("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}}ko({Container:{pattern(...t){return this.defs().pattern(...t)}},Defs:{pattern:tu((function(t,e,n){return this.put(new ca).update(n).attr({x:0,y:0,width:t,height:e,patternUnits:"userSpaceOnUse"})}))}}),Uo(ca,"Pattern");let fa=class extends Uu{constructor(t,e=t){super(qo("image",t),e)}load(t,e){if(!t)return this;const n=new $o.window.Image;return Tu(n,"load",(function(t){const r=this.parent(ca);0===this.width()&&0===this.height()&&this.size(n.width,n.height),r instanceof ca&&0===r.width()&&0===r.height()&&r.size(this.width(),this.height()),"function"==typeof e&&e.call(this,t)}),this),Tu(n,"load error",(function(){Iu(n)})),this.attr("href",n.src=t,Fo)}};!function(t){Gu.push(t)}((function(t,e,n){return"fill"!==t&&"stroke"!==t||cu.test(e)&&(e=n.root().defs().image(e)),e instanceof fa&&(e=n.root().defs().pattern(0,0,(t=>{t.add(e)}))),e})),ko({Container:{image:tu((function(t,e){return this.put(new fa).size(0,0).load(t,e)}))}}),Uo(fa,"Image");class da extends $u{bbox(){let t=-1/0,e=-1/0,n=1/0,r=1/0;return this.forEach((function(i){t=Math.max(i[0],t),e=Math.max(i[1],e),n=Math.min(i[0],n),r=Math.min(i[1],r)})),new Eu(n,r,t-n,e-r)}move(t,e){const n=this.bbox();if(t-=n.x,e-=n.y,!isNaN(t)&&!isNaN(e))for(let r=this.length-1;r>=0;r--)this[r]=[this[r][0]+t,this[r][1]+e];return this}parse(t=[0,0]){const e=[];(t=t instanceof Array?Array.prototype.concat.apply([],t):t.trim().split(fu).map(parseFloat)).length%2!=0&&t.pop();for(let n=0,r=t.length;n<r;n+=2)e.push([t[n],t[n+1]]);return e}size(t,e){let n;const r=this.bbox();for(n=this.length-1;n>=0;n--)r.width&&(this[n][0]=(this[n][0]-r.x)*t/r.width+r.x),r.height&&(this[n][1]=(this[n][1]-r.y)*e/r.height+r.y);return this}toLine(){return{x1:this[0][0],y1:this[0][1],x2:this[1][0],y2:this[1][1]}}toString(){const t=[];for(let e=0,n=this.length;e<n;e++)t.push(this[e].join(","));return t.join(" ")}transform(t){return this.clone().transformO(t)}transformO(t){wu.isMatrixLike(t)||(t=new wu(t));for(let e=this.length;e--;){const[n,r]=this[e];this[e][0]=t.a*n+t.c*r+t.e,this[e][1]=t.b*n+t.d*r+t.f}return this}}const pa=da;const ma=Object.freeze(Object.defineProperty({__proto__:null,MorphArray:pa,height:function(t){const e=this.bbox();return null==t?e.height:this.size(e.width,t)},width:function(t){const e=this.bbox();return null==t?e.width:this.size(t,e.height)},x:function(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)},y:function(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}},Symbol.toStringTag,{value:"Module"}));class ga extends Uu{constructor(t,e=t){super(qo("line",t),e)}array(){return new da([[this.attr("x1"),this.attr("y1")],[this.attr("x2"),this.attr("y2")]])}move(t,e){return this.attr(this.array().move(t,e).toLine())}plot(t,e,n,r){return null==t?this.array():(t=void 0!==e?{x1:t,y1:e,x2:n,y2:r}:new da(t).toLine(),this.attr(t))}size(t,e){const n=To(this,t,e);return this.attr(this.array().size(n.width,n.height).toLine())}}Qo(ga,ma),ko({Container:{line:tu((function(...t){return ga.prototype.plot.apply(this.put(new ga),null!=t[0]?t:[0,0,0,0])}))}}),Uo(ga,"Line");class ya extends Vu{constructor(t,e=t){super(qo("marker",t),e)}height(t){return this.attr("markerHeight",t)}orient(t){return this.attr("orient",t)}ref(t,e){return this.attr("refX",t).attr("refY",e)}toString(){return"url(#"+this.id()+")"}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}width(t){return this.attr("markerWidth",t)}}function _a(t,e){return function(n){return null==n?this[t]:(this[t]=n,e&&e.call(this),this)}}ko({Container:{marker(...t){return this.defs().marker(...t)}},Defs:{marker:tu((function(t,e,n){return this.put(new ya).size(t,e).ref(t/2,e/2).viewbox(0,0,t,e).attr("orient","auto").update(n)}))},marker:{marker(t,e,n,r){let i=["marker"];return"all"!==t&&i.push(t),i=i.join("-"),t=arguments[1]instanceof ya?arguments[1]:this.defs().marker(e,n,r),this.attr(i,t)}}}),Uo(ya,"Marker");const va={"-":function(t){return t},"<>":function(t){return-Math.cos(t*Math.PI)/2+.5},">":function(t){return Math.sin(t*Math.PI/2)},"<":function(t){return 1-Math.cos(t*Math.PI/2)},bezier:function(t,e,n,r){return function(i){return i<0?t>0?e/t*i:n>0?r/n*i:0:i>1?n<1?(1-r)/(1-n)*i+(r-n)/(1-n):t<1?(1-e)/(1-t)*i+(e-t)/(1-t):1:3*i*(1-i)**2*e+3*i**2*(1-i)*r+i**3}},steps:function(t,e="end"){e=e.split("-").reverse()[0];let n=t;return"none"===e?--n:"both"===e&&++n,(r,i=!1)=>{let s=Math.floor(r*t);const o=r*s%1==0;return"start"!==e&&"both"!==e||++s,i&&o&&--s,r>=0&&s<0&&(s=0),r<=1&&s>n&&(s=n),s/n}}};class wa{done(){return!1}}class ba extends wa{constructor(t=Du){super(),this.ease=va[t]||t}step(t,e,n){return"number"!=typeof t?n<1?t:e:t+(e-t)*this.ease(n)}}class xa extends wa{constructor(t){super(),this.stepper=t}done(t){return t.done}step(t,e,n,r){return this.stepper(t,e,n,r)}}function Ea(){const t=(this._duration||500)/1e3,e=this._overshoot||0,n=Math.PI,r=Math.log(e/100+1e-10),i=-r/Math.sqrt(n*n+r*r),s=3.9/(i*t);this.d=2*i*s,this.k=s*s}Qo(class extends xa{constructor(t=500,e=0){super(),this.duration(t).overshoot(e)}step(t,e,n,r){if("string"==typeof t)return t;if(r.done=n===1/0,n===1/0)return e;if(0===n)return t;n>100&&(n=16),n/=1e3;const i=r.velocity||0,s=-this.d*i-this.k*(t-e),o=t+i*n+s*n*n/2;return r.velocity=i+s*n,r.done=Math.abs(e-o)+Math.abs(i)<.002,r.done?e:o}},{duration:_a("_duration",Ea),overshoot:_a("_overshoot",Ea)});Qo(class extends xa{constructor(t=.1,e=.01,n=0,r=1e3){super(),this.p(t).i(e).d(n).windup(r)}step(t,e,n,r){if("string"==typeof t)return t;if(r.done=n===1/0,n===1/0)return e;if(0===n)return t;const i=e-t;let s=(r.integral||0)+i*n;const o=(i-(r.error||0))/n,u=this._windup;return!1!==u&&(s=Math.max(-u,Math.min(s,u))),r.error=i,r.integral=s,r.done=Math.abs(i)<.001,r.done?e:t+(this.P*i+this.I*s+this.D*o)}},{windup:_a("_windup"),p:_a("P"),i:_a("I"),d:_a("D")});const Oa={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0},Ma={M:function(t,e,n){return e.x=n.x=t[0],e.y=n.y=t[1],["M",e.x,e.y]},L:function(t,e){return e.x=t[0],e.y=t[1],["L",t[0],t[1]]},H:function(t,e){return e.x=t[0],["H",t[0]]},V:function(t,e){return e.y=t[0],["V",t[0]]},C:function(t,e){return e.x=t[4],e.y=t[5],["C",t[0],t[1],t[2],t[3],t[4],t[5]]},S:function(t,e){return e.x=t[2],e.y=t[3],["S",t[0],t[1],t[2],t[3]]},Q:function(t,e){return e.x=t[2],e.y=t[3],["Q",t[0],t[1],t[2],t[3]]},T:function(t,e){return e.x=t[0],e.y=t[1],["T",t[0],t[1]]},Z:function(t,e,n){return e.x=n.x,e.y=n.y,["Z"]},A:function(t,e){return e.x=t[5],e.y=t[6],["A",t[0],t[1],t[2],t[3],t[4],t[5],t[6]]}},ka="mlhvqtcsaz".split("");for(let kh=0,Ch=ka.length;kh<Ch;++kh)Ma[ka[kh]]=function(t){return function(e,n,r){if("H"===t)e[0]=e[0]+n.x;else if("V"===t)e[0]=e[0]+n.y;else if("A"===t)e[5]=e[5]+n.x,e[6]=e[6]+n.y;else for(let t=0,i=e.length;t<i;++t)e[t]=e[t]+(t%2?n.y:n.x);return Ma[t](e,n,r)}}(ka[kh].toUpperCase());function Ca(t){return t.segment.length&&t.segment.length-1===Oa[t.segment[0].toUpperCase()]}function Aa(t,e){t.inNumber&&Sa(t,!1);const n=du.test(e);if(n)t.segment=[e];else{const e=t.lastCommand,n=e.toLowerCase(),r=e===n;t.segment=["m"===n?r?"l":"L":e]}return t.inSegment=!0,t.lastCommand=t.segment[0],n}function Sa(t,e){if(!t.inNumber)throw new Error("Parser Error");t.number&&t.segment.push(parseFloat(t.number)),t.inNumber=e,t.number="",t.pointSeen=!1,t.hasExponent=!1,Ca(t)&&Na(t)}function Na(t){t.inSegment=!1,t.absolute&&(t.segment=function(t){const e=t.segment[0];return Ma[e](t.segment.slice(1),t.p,t.p0)}(t)),t.segments.push(t.segment)}function ja(t){if(!t.segment.length)return!1;const e="A"===t.segment[0].toUpperCase(),n=t.segment.length;return e&&(4===n||5===n)}function Ta(t){return"E"===t.lastToken.toUpperCase()}const Ia=new Set([" ",",","\t","\n","\r","\f"]);class Ra extends $u{bbox(){return bu().path.setAttribute("d",this.toString()),new Eu(bu.nodes.path.getBBox())}move(t,e){const n=this.bbox();if(t-=n.x,e-=n.y,!isNaN(t)&&!isNaN(e))for(let r,i=this.length-1;i>=0;i--)r=this[i][0],"M"===r||"L"===r||"T"===r?(this[i][1]+=t,this[i][2]+=e):"H"===r?this[i][1]+=t:"V"===r?this[i][1]+=e:"C"===r||"S"===r||"Q"===r?(this[i][1]+=t,this[i][2]+=e,this[i][3]+=t,this[i][4]+=e,"C"===r&&(this[i][5]+=t,this[i][6]+=e)):"A"===r&&(this[i][6]+=t,this[i][7]+=e);return this}parse(t="M0 0"){return Array.isArray(t)&&(t=Array.prototype.concat.apply([],t).toString()),function(t,e=!0){let n=0,r="";const i={segment:[],inNumber:!1,number:"",lastToken:"",inSegment:!1,segments:[],pointSeen:!1,hasExponent:!1,absolute:e,p0:new _u,p:new _u};for(;i.lastToken=r,r=t.charAt(n++);)if(i.inSegment||!Aa(i,r))if("."!==r)if(isNaN(parseInt(r)))if(Ia.has(r))i.inNumber&&Sa(i,!1);else if("-"!==r&&"+"!==r)if("E"!==r.toUpperCase()){if(du.test(r)){if(i.inNumber)Sa(i,!1);else{if(!Ca(i))throw new Error("parser Error");Na(i)}--n}}else i.number+=r,i.hasExponent=!0;else{if(i.inNumber&&!Ta(i)){Sa(i,!1),--n;continue}i.number+=r,i.inNumber=!0}else{if("0"===i.number||ja(i)){i.inNumber=!0,i.number=r,Sa(i,!0);continue}i.inNumber=!0,i.number+=r}else{if(i.pointSeen||i.hasExponent){Sa(i,!1),--n;continue}i.inNumber=!0,i.pointSeen=!0,i.number+=r}return i.inNumber&&Sa(i,!1),i.inSegment&&Ca(i)&&Na(i),i.segments}(t)}size(t,e){const n=this.bbox();let r,i;for(n.width=0===n.width?1:n.width,n.height=0===n.height?1:n.height,r=this.length-1;r>=0;r--)i=this[r][0],"M"===i||"L"===i||"T"===i?(this[r][1]=(this[r][1]-n.x)*t/n.width+n.x,this[r][2]=(this[r][2]-n.y)*e/n.height+n.y):"H"===i?this[r][1]=(this[r][1]-n.x)*t/n.width+n.x:"V"===i?this[r][1]=(this[r][1]-n.y)*e/n.height+n.y:"C"===i||"S"===i||"Q"===i?(this[r][1]=(this[r][1]-n.x)*t/n.width+n.x,this[r][2]=(this[r][2]-n.y)*e/n.height+n.y,this[r][3]=(this[r][3]-n.x)*t/n.width+n.x,this[r][4]=(this[r][4]-n.y)*e/n.height+n.y,"C"===i&&(this[r][5]=(this[r][5]-n.x)*t/n.width+n.x,this[r][6]=(this[r][6]-n.y)*e/n.height+n.y)):"A"===i&&(this[r][1]=this[r][1]*t/n.width,this[r][2]=this[r][2]*e/n.height,this[r][6]=(this[r][6]-n.x)*t/n.width+n.x,this[r][7]=(this[r][7]-n.y)*e/n.height+n.y);return this}toString(){return function(t){let e="";for(let n=0,r=t.length;n<r;n++)e+=t[n][0],null!=t[n][1]&&(e+=t[n][1],null!=t[n][2]&&(e+=" ",e+=t[n][2],null!=t[n][3]&&(e+=" ",e+=t[n][3],e+=" ",e+=t[n][4],null!=t[n][5]&&(e+=" ",e+=t[n][5],e+=" ",e+=t[n][6],null!=t[n][7]&&(e+=" ",e+=t[n][7])))));return e+" "}(this)}}const La=t=>{const e=typeof t;return"number"===e?Yu:"string"===e?yu.isColor(t)?yu:fu.test(t)?du.test(t)?Ra:$u:eu.test(t)?Yu:Da:Ya.indexOf(t.constructor)>-1?t.constructor:Array.isArray(t)?$u:"object"===e?$a:Da};class za{constructor(t){this._stepper=t||new ba("-"),this._from=null,this._to=null,this._type=null,this._context=null,this._morphObj=null}at(t){return this._morphObj.morph(this._from,this._to,t,this._stepper,this._context)}done(){return this._context.map(this._stepper.done).reduce((function(t,e){return t&&e}),!0)}from(t){return null==t?this._from:(this._from=this._set(t),this)}stepper(t){return null==t?this._stepper:(this._stepper=t,this)}to(t){return null==t?this._to:(this._to=this._set(t),this)}type(t){return null==t?this._type:(this._type=t,this)}_set(t){this._type||this.type(La(t));let e=new this._type(t);return this._type===yu&&(e=this._to?e[this._to[4]]():this._from?e[this._from[4]]():e),this._type===$a&&(e=this._to?e.align(this._to):this._from?e.align(this._from):e),e=e.toConsumable(),this._morphObj=this._morphObj||new this._type,this._context=this._context||Array.apply(null,Array(e.length)).map(Object).map((function(t){return t.done=!0,t})),e}}class Da{constructor(...t){this.init(...t)}init(t){return t=Array.isArray(t)?t[0]:t,this.value=t,this}toArray(){return[this.value]}valueOf(){return this.value}}class Pa{constructor(...t){this.init(...t)}init(t){return Array.isArray(t)&&(t={scaleX:t[0],scaleY:t[1],shear:t[2],rotate:t[3],translateX:t[4],translateY:t[5],originX:t[6],originY:t[7]}),Object.assign(this,Pa.defaults,t),this}toArray(){const t=this;return[t.scaleX,t.scaleY,t.shear,t.rotate,t.translateX,t.translateY,t.originX,t.originY]}}Pa.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0};const Fa=(t,e)=>t[0]<e[0]?-1:t[0]>e[0]?1:0;class $a{constructor(...t){this.init(...t)}align(t){const e=this.values;for(let n=0,r=e.length;n<r;++n){if(e[n+1]===t[n+1]){if(e[n+1]===yu&&t[n+7]!==e[n+7]){const e=t[n+7],r=new yu(this.values.splice(n+3,5))[e]().toArray();this.values.splice(n+3,0,...r)}n+=e[n+2]+2;continue}if(!t[n+1])return this;const r=(new t[n+1]).toArray(),i=e[n+2]+3;e.splice(n,i,t[n],t[n+1],t[n+2],...r),n+=e[n+2]+2}return this}init(t){if(this.values=[],Array.isArray(t))return void(this.values=t.slice());t=t||{};const e=[];for(const n in t){const r=La(t[n]),i=new r(t[n]).toArray();e.push([n,r,i.length,...i])}return e.sort(Fa),this.values=e.reduce(((t,e)=>t.concat(e)),[]),this}toArray(){return this.values}valueOf(){const t={},e=this.values;for(;e.length;){const n=e.shift(),r=e.shift(),i=e.shift(),s=e.splice(0,i);t[n]=new r(s)}return t}}const Ya=[Da,Pa,$a];class Xa extends Uu{constructor(t,e=t){super(qo("path",t),e)}array(){return this._array||(this._array=new Ra(this.attr("d")))}clear(){return delete this._array,this}height(t){return null==t?this.bbox().height:this.size(this.bbox().width,t)}move(t,e){return this.attr("d",this.array().move(t,e))}plot(t){return null==t?this.array():this.clear().attr("d","string"==typeof t?t:this._array=new Ra(t))}size(t,e){const n=To(this,t,e);return this.attr("d",this.array().size(n.width,n.height))}width(t){return null==t?this.bbox().width:this.size(t,this.bbox().height)}x(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}y(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}}Xa.prototype.MorphArray=Ra,ko({Container:{path:tu((function(t){return this.put(new Xa).plot(t||new Ra)}))}}),Uo(Xa,"Path");const Ga=Object.freeze(Object.defineProperty({__proto__:null,array:function(){return this._array||(this._array=new da(this.attr("points")))},clear:function(){return delete this._array,this},move:function(t,e){return this.attr("points",this.array().move(t,e))},plot:function(t){return null==t?this.array():this.clear().attr("points","string"==typeof t?t:this._array=new da(t))},size:function(t,e){const n=To(this,t,e);return this.attr("points",this.array().size(n.width,n.height))}},Symbol.toStringTag,{value:"Module"}));class Ba extends Uu{constructor(t,e=t){super(qo("polygon",t),e)}}ko({Container:{polygon:tu((function(t){return this.put(new Ba).plot(t||new da)}))}}),Qo(Ba,ma),Qo(Ba,Ga),Uo(Ba,"Polygon");class Wa extends Uu{constructor(t,e=t){super(qo("polyline",t),e)}}ko({Container:{polyline:tu((function(t){return this.put(new Wa).plot(t||new da)}))}}),Qo(Wa,ma),Qo(Wa,Ga),Uo(Wa,"Polyline");class qa extends Uu{constructor(t,e=t){super(qo("rect",t),e)}}Qo(qa,{rx:Zu,ry:Ku}),ko({Container:{rect:tu((function(t,e){return this.put(new qa).size(t,e)}))}}),Uo(qa,"Rect");class Va{constructor(){this._first=null,this._last=null}first(){return this._first&&this._first.value}last(){return this._last&&this._last.value}push(t){const e=void 0!==t.next?t:{value:t,next:null,prev:null};return this._last?(e.prev=this._last,this._last.next=e,this._last=e):(this._last=e,this._first=e),e}remove(t){t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t===this._last&&(this._last=t.prev),t===this._first&&(this._first=t.next),t.prev=null,t.next=null}shift(){const t=this._first;return t?(this._first=t.next,this._first&&(this._first.prev=null),this._last=this._first?this._last:null,t.value):null}}const Ha={nextDraw:null,frames:new Va,timeouts:new Va,immediates:new Va,timer:()=>$o.window.performance||$o.window.Date,transforms:[],frame(t){const e=Ha.frames.push({run:t});return null===Ha.nextDraw&&(Ha.nextDraw=$o.window.requestAnimationFrame(Ha._draw)),e},timeout(t,e){e=e||0;const n=Ha.timer().now()+e,r=Ha.timeouts.push({run:t,time:n});return null===Ha.nextDraw&&(Ha.nextDraw=$o.window.requestAnimationFrame(Ha._draw)),r},immediate(t){const e=Ha.immediates.push(t);return null===Ha.nextDraw&&(Ha.nextDraw=$o.window.requestAnimationFrame(Ha._draw)),e},cancelFrame(t){null!=t&&Ha.frames.remove(t)},clearTimeout(t){null!=t&&Ha.timeouts.remove(t)},cancelImmediate(t){null!=t&&Ha.immediates.remove(t)},_draw(t){let e=null;const n=Ha.timeouts.last();for(;(e=Ha.timeouts.shift())&&(t>=e.time?e.run():Ha.timeouts.push(e),e!==n););let r=null;const i=Ha.frames.last();for(;r!==i&&(r=Ha.frames.shift());)r.run(t);let s=null;for(;s=Ha.immediates.shift();)s();Ha.nextDraw=Ha.timeouts.first()||Ha.frames.first()?$o.window.requestAnimationFrame(Ha._draw):null}},Ua=function(t){const e=t.start,n=t.runner.duration();return{start:e,duration:n,end:e+n,runner:t.runner}},Za=function(){const t=$o.window;return(t.performance||t.Date).now()};class Ka extends Ru{constructor(t=Za){super(),this._timeSource=t,this.terminate()}active(){return!!this._nextFrame}finish(){return this.time(this.getEndTimeOfTimeline()+1),this.pause()}getEndTime(){const t=this.getLastRunnerInfo(),e=t?t.runner.duration():0;return(t?t.start:this._time)+e}getEndTimeOfTimeline(){const t=this._runners.map((t=>t.start+t.runner.duration()));return Math.max(0,...t)}getLastRunnerInfo(){return this.getRunnerInfoById(this._lastRunnerId)}getRunnerInfoById(t){return this._runners[this._runnerIds.indexOf(t)]||null}pause(){return this._paused=!0,this._continue()}persist(t){return null==t?this._persist:(this._persist=t,this)}play(){return this._paused=!1,this.updateTime()._continue()}reverse(t){const e=this.speed();if(null==t)return this.speed(-e);const n=Math.abs(e);return this.speed(t?-n:n)}schedule(t,e,n){if(null==t)return this._runners.map(Ua);let r=0;const i=this.getEndTime();if(e=e||0,null==n||"last"===n||"after"===n)r=i;else if("absolute"===n||"start"===n)r=e,e=0;else if("now"===n)r=this._time;else if("relative"===n){const n=this.getRunnerInfoById(t.id);n&&(r=n.start+e,e=0)}else{if("with-last"!==n)throw new Error('Invalid value for the "when" parameter');{const t=this.getLastRunnerInfo();r=t?t.start:this._time}}t.unschedule(),t.timeline(this);const s=t.persist(),o={persist:null===s?this._persist:s,start:r+e,runner:t};return this._lastRunnerId=t.id,this._runners.push(o),this._runners.sort(((t,e)=>t.start-e.start)),this._runnerIds=this._runners.map((t=>t.runner.id)),this.updateTime()._continue(),this}seek(t){return this.time(this._time+t)}source(t){return null==t?this._timeSource:(this._timeSource=t,this)}speed(t){return null==t?this._speed:(this._speed=t,this)}stop(){return this.time(0),this.pause()}time(t){return null==t?this._time:(this._time=t,this._continue(!0))}unschedule(t){const e=this._runnerIds.indexOf(t.id);return e<0||(this._runners.splice(e,1),this._runnerIds.splice(e,1),t.timeline(null)),this}updateTime(){return this.active()||(this._lastSourceTime=this._timeSource()),this}_continue(t=!1){return Ha.cancelFrame(this._nextFrame),this._nextFrame=null,t?this._stepImmediate():(this._paused||(this._nextFrame=Ha.frame(this._step)),this)}_stepFn(t=!1){const e=this._timeSource();let n=e-this._lastSourceTime;t&&(n=0);const r=this._speed*n+(this._time-this._lastStepTime);this._lastSourceTime=e,t||(this._time+=r,this._time=this._time<0?0:this._time),this._lastStepTime=this._time,this.fire("time",this._time);for(let s=this._runners.length;s--;){const t=this._runners[s],e=t.runner;this._time-t.start<=0&&e.reset()}let i=!1;for(let s=0,o=this._runners.length;s<o;s++){const t=this._runners[s],e=t.runner;let n=r;const u=this._time-t.start;if(u<=0){i=!0;continue}if(u<n&&(n=u),!e.active())continue;if(e.step(n).done){if(!0!==t.persist){e.duration()-e.time()+this._time+t.persist<this._time&&(e.unschedule(),--s,--o)}}else i=!0}return i&&!(this._speed<0&&0===this._time)||this._runnerIds.length&&this._speed<0&&this._time>0?this._continue():(this.pause(),this.fire("finished")),this}terminate(){this._startTime=0,this._speed=1,this._persist=0,this._nextFrame=null,this._paused=!0,this._runners=[],this._runnerIds=[],this._lastRunnerId=-1,this._time=0,this._lastSourceTime=0,this._lastStepTime=0,this._step=this._stepFn.bind(this,!1),this._stepImmediate=this._stepFn.bind(this,!0)}}ko({Element:{timeline:function(t){return null==t?(this._timeline=this._timeline||new Ka,this._timeline):(this._timeline=t,this)}}});class Ja extends Ru{constructor(t){super(),this.id=Ja.id++,t="function"==typeof(t=null==t?zu:t)?new xa(t):t,this._element=null,this._timeline=null,this.done=!1,this._queue=[],this._duration="number"==typeof t&&t,this._isDeclarative=t instanceof xa,this._stepper=this._isDeclarative?t:new ba,this._history={},this.enabled=!0,this._time=0,this._lastTime=0,this._reseted=!0,this.transforms=new wu,this.transformId=1,this._haveReversed=!1,this._reverse=!1,this._loopsDone=0,this._swing=!1,this._wait=0,this._times=1,this._frameId=null,this._persist=!!this._isDeclarative||null}static sanitise(t,e,n){let r=1,i=!1,s=0;return e=e??Pu,n=n||"last","object"!=typeof(t=t??zu)||t instanceof wa||(e=t.delay??e,n=t.when??n,i=t.swing||i,r=t.times??r,s=t.wait??s,t=t.duration??zu),{duration:t,delay:e,swing:i,times:r,wait:s,when:n}}active(t){return null==t?this.enabled:(this.enabled=t,this)}addTransform(t){return this.transforms.lmultiplyO(t),this}after(t){return this.on("finished",t)}animate(t,e,n){const r=Ja.sanitise(t,e,n),i=new Ja(r.duration);return this._timeline&&i.timeline(this._timeline),this._element&&i.element(this._element),i.loop(r).schedule(r.delay,r.when)}clearTransform(){return this.transforms=new wu,this}clearTransformsFromQueue(){this.done&&this._timeline&&this._timeline._runnerIds.includes(this.id)||(this._queue=this._queue.filter((t=>!t.isTransform)))}delay(t){return this.animate(0,t)}duration(){return this._times*(this._wait+this._duration)-this._wait}during(t){return this.queue(null,t)}ease(t){return this._stepper=new ba(t),this}element(t){return null==t?this._element:(this._element=t,t._prepareRunner(),this)}finish(){return this.step(1/0)}loop(t,e,n){return"object"==typeof t&&(e=t.swing,n=t.wait,t=t.times),this._times=t||1/0,this._swing=e||!1,this._wait=n||0,!0===this._times&&(this._times=1/0),this}loops(t){const e=this._duration+this._wait;if(null==t){const t=Math.floor(this._time/e),n=(this._time-t*e)/this._duration;return Math.min(t+n,this._times)}const n=t%1,r=e*Math.floor(t)+this._duration*n;return this.time(r)}persist(t){return null==t?this._persist:(this._persist=t,this)}position(t){const e=this._time,n=this._duration,r=this._wait,i=this._times,s=this._swing,o=this._reverse;let u;if(null==t){const t=function(t){const e=s*Math.floor(t%(2*(r+n))/(r+n)),i=e&&!o||!e&&o,u=Math.pow(-1,i)*(t%(r+n))/n+i;return Math.max(Math.min(u,1),0)},a=i*(r+n)-r;return u=e<=0?Math.round(t(1e-5)):e<a?t(e):Math.round(t(a-1e-5)),u}const a=Math.floor(this.loops()),h=s&&a%2==0;return u=a+(h&&!o||o&&h?t:1-t),this.loops(u)}progress(t){return null==t?Math.min(1,this._time/this.duration()):this.time(t*this.duration())}queue(t,e,n,r){this._queue.push({initialiser:t||Lu,runner:e||Lu,retarget:n,isTransform:r,initialised:!1,finished:!1});return this.timeline()&&this.timeline()._continue(),this}reset(){return this._reseted||(this.time(0),this._reseted=!0),this}reverse(t){return this._reverse=null==t?!this._reverse:t,this}schedule(t,e,n){if(t instanceof Ka||(n=e,e=t,t=this.timeline()),!t)throw Error("Runner cannot be scheduled without timeline");return t.schedule(this,e,n),this}step(t){if(!this.enabled)return this;t=null==t?16:t,this._time+=t;const e=this.position(),n=this._lastPosition!==e&&this._time>=0;this._lastPosition=e;const r=this.duration(),i=this._lastTime<=0&&this._time>0,s=this._lastTime<r&&this._time>=r;this._lastTime=this._time,i&&this.fire("start",this);const o=this._isDeclarative;this.done=!o&&!s&&this._time>=r,this._reseted=!1;let u=!1;return(n||o)&&(this._initialise(n),this.transforms=new wu,u=this._run(o?t:e),this.fire("step",this)),this.done=this.done||u&&o,s&&this.fire("finished",this),this}time(t){if(null==t)return this._time;const e=t-this._time;return this.step(e),this}timeline(t){return void 0===t?this._timeline:(this._timeline=t,this)}unschedule(){const t=this.timeline();return t&&t.unschedule(this),this}_initialise(t){if(t||this._isDeclarative)for(let e=0,n=this._queue.length;e<n;++e){const n=this._queue[e],r=this._isDeclarative||!n.initialised&&t;t=!n.finished,r&&t&&(n.initialiser.call(this),n.initialised=!0)}}_rememberMorpher(t,e){if(this._history[t]={morpher:e,caller:this._queue[this._queue.length-1]},this._isDeclarative){const t=this.timeline();t&&t.play()}}_run(t){let e=!0;for(let n=0,r=this._queue.length;n<r;++n){const r=this._queue[n],i=r.runner.call(this,t);r.finished=r.finished||!0===i,e=e&&r.finished}return e}_tryRetarget(t,e,n){if(this._history[t]){if(!this._history[t].caller.initialised){const e=this._queue.indexOf(this._history[t].caller);return this._queue.splice(e,1),!1}this._history[t].caller.retarget?this._history[t].caller.retarget.call(this,e,n):this._history[t].morpher.to(e),this._history[t].caller.finished=!1;const r=this.timeline();return r&&r.play(),!0}return!1}}Ja.id=0;class Qa{constructor(t=new wu,e=-1,n=!0){this.transforms=t,this.id=e,this.done=n}clearTransformsFromQueue(){}}Qo([Ja,Qa],{mergeWith(t){return new Qa(t.transforms.lmultiply(this.transforms),t.id)}});const th=(t,e)=>t.lmultiplyO(e),eh=t=>t.transforms;function nh(){const t=this._transformationRunners.runners.map(eh).reduce(th,new wu);this.transform(t),this._transformationRunners.merge(),1===this._transformationRunners.length()&&(this._frameId=null)}class rh{constructor(){this.runners=[],this.ids=[]}add(t){if(this.runners.includes(t))return;const e=t.id+1;return this.runners.push(t),this.ids.push(e),this}clearBefore(t){const e=this.ids.indexOf(t+1)||1;return this.ids.splice(0,e,0),this.runners.splice(0,e,new Qa).forEach((t=>t.clearTransformsFromQueue())),this}edit(t,e){const n=this.ids.indexOf(t+1);return this.ids.splice(n,1,t+1),this.runners.splice(n,1,e),this}getByID(t){return this.runners[this.ids.indexOf(t+1)]}length(){return this.ids.length}merge(){let t=null;for(let e=0;e<this.runners.length;++e){const n=this.runners[e];if(t&&n.done&&t.done&&(!n._timeline||!n._timeline._runnerIds.includes(n.id))&&(!t._timeline||!t._timeline._runnerIds.includes(t.id))){this.remove(n.id);const r=n.mergeWith(t);this.edit(t.id,r),t=r,--e}else t=n}return this}remove(t){const e=this.ids.indexOf(t+1);return this.ids.splice(e,1),this.runners.splice(e,1),this}}ko({Element:{animate(t,e,n){const r=Ja.sanitise(t,e,n),i=this.timeline();return new Ja(r.duration).loop(r).element(this).timeline(i.play()).schedule(r.delay,r.when)},delay(t,e){return this.animate(0,t,e)},_clearTransformRunnersBefore(t){this._transformationRunners.clearBefore(t.id)},_currentTransform(t){return this._transformationRunners.runners.filter((e=>e.id<=t.id)).map(eh).reduce(th,new wu)},_addRunner(t){this._transformationRunners.add(t),Ha.cancelImmediate(this._frameId),this._frameId=Ha.immediate(nh.bind(this))},_prepareRunner(){null==this._frameId&&(this._transformationRunners=(new rh).add(new Qa(new wu(this))))}}});Qo(Ja,{attr(t,e){return this.styleAttr("attr",t,e)},css(t,e){return this.styleAttr("css",t,e)},styleAttr(t,e,n){if("string"==typeof e)return this.styleAttr(t,{[e]:n});let r=e;if(this._tryRetarget(t,r))return this;let i=new za(this._stepper).to(r),s=Object.keys(r);return this.queue((function(){i=i.from(this.element()[t](s))}),(function(e){return this.element()[t](i.at(e).valueOf()),i.done()}),(function(e){const n=Object.keys(e),o=(u=s,n.filter((t=>!u.includes(t))));var u;if(o.length){const e=this.element()[t](o),n=new $a(i.from()).valueOf();Object.assign(n,e),i.from(n)}const a=new $a(i.to()).valueOf();Object.assign(a,e),i.to(a),s=n,r=e})),this._rememberMorpher(t,i),this},zoom(t,e){if(this._tryRetarget("zoom",t,e))return this;let n=new za(this._stepper).to(new Yu(t));return this.queue((function(){n=n.from(this.element().zoom())}),(function(t){return this.element().zoom(n.at(t),e),n.done()}),(function(t,r){e=r,n.to(t)})),this._rememberMorpher("zoom",n),this},transform(t,e,n){if(e=t.relative||e,this._isDeclarative&&!e&&this._tryRetarget("transform",t))return this;const r=wu.isMatrixLike(t);n=null!=t.affine?t.affine:null!=n?n:!r;const i=new za(this._stepper).type(n?Pa:wu);let s,o,u,a,h;return this.queue((function(){o=o||this.element(),s=s||Io(t,o),h=new wu(e?void 0:o),o._addRunner(this),e||o._clearTransformRunnersBefore(this)}),(function(l){e||this.clearTransform();const{x:c,y:f}=new _u(s).transform(o._currentTransform(this));let d=new wu({...t,origin:[c,f]}),p=this._isDeclarative&&u?u:h;if(n){d=d.decompose(c,f),p=p.decompose(c,f);const t=d.rotate,e=p.rotate,n=[t-360,t,t+360],r=n.map((t=>Math.abs(t-e))),i=Math.min(...r),s=r.indexOf(i);d.rotate=n[s]}e&&(r||(d.rotate=t.rotate||0),this._isDeclarative&&a&&(p.rotate=a)),i.from(p),i.to(d);const m=i.at(l);return a=m.rotate,u=new wu(m),this.addTransform(u),o._addRunner(this),i.done()}),(function(e){(e.origin||"center").toString()!==(t.origin||"center").toString()&&(s=Io(e,o)),t={...e,origin:s}}),!0),this._isDeclarative&&this._rememberMorpher("transform",i),this},x(t){return this._queueNumber("x",t)},y(t){return this._queueNumber("y",t)},ax(t){return this._queueNumber("ax",t)},ay(t){return this._queueNumber("ay",t)},dx(t=0){return this._queueNumberDelta("x",t)},dy(t=0){return this._queueNumberDelta("y",t)},dmove(t,e){return this.dx(t).dy(e)},_queueNumberDelta(t,e){if(e=new Yu(e),this._tryRetarget(t,e))return this;const n=new za(this._stepper).to(e);let r=null;return this.queue((function(){r=this.element()[t](),n.from(r),n.to(r+e)}),(function(e){return this.element()[t](n.at(e)),n.done()}),(function(t){n.to(r+new Yu(t))})),this._rememberMorpher(t,n),this},_queueObject(t,e){if(this._tryRetarget(t,e))return this;const n=new za(this._stepper).to(e);return this.queue((function(){n.from(this.element()[t]())}),(function(e){return this.element()[t](n.at(e)),n.done()})),this._rememberMorpher(t,n),this},_queueNumber(t,e){return this._queueObject(t,new Yu(e))},cx(t){return this._queueNumber("cx",t)},cy(t){return this._queueNumber("cy",t)},move(t,e){return this.x(t).y(e)},amove(t,e){return this.ax(t).ay(e)},center(t,e){return this.cx(t).cy(e)},size(t,e){let n;return t&&e||(n=this._element.bbox()),t||(t=n.width/n.height*e),e||(e=n.height/n.width*t),this.width(t).height(e)},width(t){return this._queueNumber("width",t)},height(t){return this._queueNumber("height",t)},plot(t,e,n,r){if(4===arguments.length)return this.plot([t,e,n,r]);if(this._tryRetarget("plot",t))return this;const i=new za(this._stepper).type(this._element.MorphArray).to(t);return this.queue((function(){i.from(this._element.array())}),(function(t){return this._element.plot(i.at(t)),i.done()})),this._rememberMorpher("plot",i),this},leading(t){return this._queueNumber("leading",t)},viewbox(t,e,n,r){return this._queueObject("viewbox",new Eu(t,e,n,r))},update(t){return"object"!=typeof t?this.update({offset:arguments[0],color:arguments[1],opacity:arguments[2]}):(null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",t.offset),this)}}),Qo(Ja,{rx:Zu,ry:Ku,from:ua,to:aa}),Uo(Ja,"Runner");class ih extends Vu{constructor(t,e=t){super(qo("svg",t),e),this.namespace()}defs(){return this.isRoot()?Vo(this.node.querySelector("defs"))||this.put(new Hu):this.root().defs()}isRoot(){return!this.node.parentNode||!(this.node.parentNode instanceof $o.window.SVGElement)&&"#document-fragment"!==this.node.parentNode.nodeName}namespace(){return this.isRoot()?this.attr({xmlns:Do,version:"1.1"}).attr("xmlns:xlink",Fo,Po):this.root().namespace()}removeNamespace(){return this.attr({xmlns:null,version:null}).attr("xmlns:xlink",null,Po).attr("xmlns:svgjs",null,Po)}root(){return this.isRoot()?this:super.root()}}ko({Container:{nested:tu((function(){return this.put(new ih)}))}}),Uo(ih,"Svg",!0);let sh=class extends Vu{constructor(t,e=t){super(qo("symbol",t),e)}};ko({Container:{symbol:tu((function(){return this.put(new sh)}))}}),Uo(sh,"Symbol");const oh=Object.freeze(Object.defineProperty({__proto__:null,amove:function(t,e){return this.ax(t).ay(e)},ax:function(t){return this.attr("x",t)},ay:function(t){return this.attr("y",t)},build:function(t){return this._build=!!t,this},center:function(t,e,n=this.bbox()){return this.cx(t,n).cy(e,n)},cx:function(t,e=this.bbox()){return null==t?e.cx:this.attr("x",this.attr("x")+t-e.cx)},cy:function(t,e=this.bbox()){return null==t?e.cy:this.attr("y",this.attr("y")+t-e.cy)},length:function(){return this.node.getComputedTextLength()},move:function(t,e,n=this.bbox()){return this.x(t,n).y(e,n)},plain:function(t){return!1===this._build&&this.clear(),this.node.appendChild($o.document.createTextNode(t)),this},x:function(t,e=this.bbox()){return null==t?e.x:this.attr("x",this.attr("x")+t-e.x)},y:function(t,e=this.bbox()){return null==t?e.y:this.attr("y",this.attr("y")+t-e.y)}},Symbol.toStringTag,{value:"Module"}));class uh extends Uu{constructor(t,e=t){super(qo("text",t),e),this.dom.leading=this.dom.leading??new Yu(1.3),this._rebuild=!0,this._build=!1}leading(t){return null==t?this.dom.leading:(this.dom.leading=new Yu(t),this.rebuild())}rebuild(t){if("boolean"==typeof t&&(this._rebuild=t),this._rebuild){const t=this;let e=0;const n=this.dom.leading;this.each((function(r){if(Lo(this.node))return;const i=$o.window.getComputedStyle(this.node).getPropertyValue("font-size"),s=n*new Yu(i);this.dom.newLined&&(this.attr("x",t.attr("x")),"\n"===this.text()?e+=s:(this.attr("dy",r?s+e:0),e=0))})),this.fire("rebuild")}return this}setData(t){return this.dom=t,this.dom.leading=new Yu(t.leading||1.3),this}writeDataToDom(){return zo(this,this.dom,{leading:1.3}),this}text(t){if(void 0===t){const e=this.node.childNodes;let n=0;t="";for(let r=0,i=e.length;r<i;++r)"textPath"===e[r].nodeName||Lo(e[r])?0===r&&(n=r+1):(r!==n&&3!==e[r].nodeType&&!0===Vo(e[r]).dom.newLined&&(t+="\n"),t+=e[r].textContent);return t}if(this.clear().build(!0),"function"==typeof t)t.call(this,this);else for(let e=0,n=(t=(t+"").split("\n")).length;e<n;e++)this.newLine(t[e]);return this.build(!1).rebuild()}}Qo(uh,oh),ko({Container:{text:tu((function(t=""){return this.put(new uh).text(t)})),plain:tu((function(t=""){return this.put(new uh).plain(t)}))}}),Uo(uh,"Text");class ah extends Uu{constructor(t,e=t){super(qo("tspan",t),e),this._build=!1}dx(t){return this.attr("dx",t)}dy(t){return this.attr("dy",t)}newLine(){this.dom.newLined=!0;const t=this.parent();if(!(t instanceof uh))return this;const e=t.index(this),n=$o.window.getComputedStyle(this.node).getPropertyValue("font-size"),r=t.dom.leading*new Yu(n);return this.dy(e?r:0).attr("x",t.x())}text(t){return null==t?this.node.textContent+(this.dom.newLined?"\n":""):("function"==typeof t?(this.clear().build(!0),t.call(this,this),this.build(!1)):this.plain(t),this)}}Qo(ah,oh),ko({Tspan:{tspan:tu((function(t=""){const e=new ah;return this._build||this.clear(),this.put(e).text(t)}))},Text:{newLine:function(t=""){return this.tspan(t).newLine()}}}),Uo(ah,"Tspan");class hh extends Uu{constructor(t,e=t){super(qo("circle",t),e)}radius(t){return this.attr("r",t)}rx(t){return this.attr("r",t)}ry(t){return this.rx(t)}size(t){return this.radius(new Yu(t).divide(2))}}Qo(hh,{x:Ju,y:Qu,cx:ta,cy:ea,width:na,height:ra}),ko({Container:{circle:tu((function(t=0){return this.put(new hh).size(t).move(0,0)}))}}),Uo(hh,"Circle");class lh extends Vu{constructor(t,e=t){super(qo("clipPath",t),e)}remove(){return this.targets().forEach((function(t){t.unclip()})),super.remove()}targets(){return Cu("svg [clip-path*="+this.id()+"]")}}ko({Container:{clip:tu((function(){return this.defs().put(new lh)}))},Element:{clipper(){return this.reference("clip-path")},clipWith(t){const e=t instanceof lh?t:this.parent().clip().add(t);return this.attr("clip-path","url(#"+e.id()+")")},unclip(){return this.attr("clip-path",null)}}}),Uo(lh,"ClipPath");class ch extends Wu{constructor(t,e=t){super(qo("foreignObject",t),e)}}ko({Container:{foreignObject:tu((function(t,e){return this.put(new ch).size(t,e)}))}}),Uo(ch,"ForeignObject");const fh=Object.freeze(Object.defineProperty({__proto__:null,dmove:function(t,e){return this.children().forEach((n=>{let r;try{r=n.node instanceof $o.window.SVGSVGElement?new Eu(n.attr(["x","y","width","height"])):n.bbox()}catch(u){return}const i=new wu(n),s=i.translate(t,e).transform(i.inverse()),o=new _u(r.x,r.y).transform(s);n.move(o.x,o.y)})),this},dx:function(t){return this.dmove(t,0)},dy:function(t){return this.dmove(0,t)},height:function(t,e=this.bbox()){return null==t?e.height:this.size(e.width,t,e)},move:function(t=0,e=0,n=this.bbox()){const r=t-n.x,i=e-n.y;return this.dmove(r,i)},size:function(t,e,n=this.bbox()){const r=To(this,t,e,n),i=r.width/n.width,s=r.height/n.height;return this.children().forEach((t=>{const e=new _u(n).transform(new wu(t).inverse());t.scale(i,s,e.x,e.y)})),this},width:function(t,e=this.bbox()){return null==t?e.width:this.size(t,e.height,e)},x:function(t,e=this.bbox()){return null==t?e.x:this.move(t,e.y,e)},y:function(t,e=this.bbox()){return null==t?e.y:this.move(e.x,t,e)}},Symbol.toStringTag,{value:"Module"}));class dh extends Vu{constructor(t,e=t){super(qo("g",t),e)}}Qo(dh,fh),ko({Container:{group:tu((function(){return this.put(new dh)}))}}),Uo(dh,"G");class ph extends Vu{constructor(t,e=t){super(qo("a",t),e)}target(t){return this.attr("target",t)}to(t){return this.attr("href",t,Fo)}}Qo(ph,fh),ko({Container:{link:tu((function(t){return this.put(new ph).to(t)}))},Element:{unlink(){const t=this.linker();if(!t)return this;const e=t.parent();if(!e)return this.remove();const n=e.index(t);return e.add(this,n),t.remove(),this},linkTo(t){let e=this.linker();return e||(e=new ph,this.wrap(e)),"function"==typeof t?t.call(e,e):e.to(t),this},linker(){const t=this.parent();return t&&"a"===t.node.nodeName.toLowerCase()?t:null}}}),Uo(ph,"A");class mh extends Vu{constructor(t,e=t){super(qo("mask",t),e)}remove(){return this.targets().forEach((function(t){t.unmask()})),super.remove()}targets(){return Cu("svg [mask*="+this.id()+"]")}}ko({Container:{mask:tu((function(){return this.defs().put(new mh)}))},Element:{masker(){return this.reference("mask")},maskWith(t){const e=t instanceof mh?t:this.parent().mask().add(t);return this.attr("mask","url(#"+e.id()+")")},unmask(){return this.attr("mask",null)}}}),Uo(mh,"Mask");class gh extends Wu{constructor(t,e=t){super(qo("stop",t),e)}update(t){return("number"==typeof t||t instanceof Yu)&&(t={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",new Yu(t.offset)),this}}ko({Gradient:{stop:function(t,e,n){return this.put(new gh).update(t,e,n)}}}),Uo(gh,"Stop");class yh extends Wu{constructor(t,e=t){super(qo("style",t),e)}addText(t=""){return this.node.textContent+=t,this}font(t,e,n={}){return this.rule("@font-face",{fontFamily:t,src:e,...n})}rule(t,e){return this.addText(function(t,e){if(!t)return"";if(!e)return t;let n=t+"{";for(const r in e)n+=r.replace(/([A-Z])/g,(function(t,e){return"-"+e.toLowerCase()}))+":"+e[r]+";";return n+="}",n}(t,e))}}ko("Dom",{style(t,e){return this.put(new yh).rule(t,e)},fontface(t,e,n){return this.put(new yh).font(t,e,n)}}),Uo(yh,"Style");class _h extends uh{constructor(t,e=t){super(qo("textPath",t),e)}array(){const t=this.track();return t?t.array():null}plot(t){const e=this.track();let n=null;return e&&(n=e.plot(t)),null==t?n:this}track(){return this.reference("href")}}ko({Container:{textPath:tu((function(t,e){return t instanceof uh||(t=this.text(t)),t.path(e)}))},Text:{path:tu((function(t,e=!0){const n=new _h;let r;if(t instanceof Xa||(t=this.defs().path(t)),n.attr("href","#"+t,Fo),e)for(;r=this.node.firstChild;)n.node.appendChild(r);return this.put(n)})),textPath(){return this.findOne("textPath")}},Path:{text:tu((function(t){return t instanceof uh||(t=(new uh).addTo(this.parent()).text(t)),t.path(this)})),targets(){return Cu("svg textPath").filter((t=>(t.attr("href")||"").includes(this.id())))}}}),_h.prototype.MorphArray=Ra,Uo(_h,"TextPath");class vh extends Uu{constructor(t,e=t){super(qo("use",t),e)}use(t,e){return this.attr("href",(e||"")+"#"+t,Fo)}}ko({Container:{use:tu((function(t,e){return this.put(new vh).use(t,e)}))}}),Uo(vh,"Use");const wh=Wo;Qo([ih,sh,fa,ca,ya],Co("viewbox")),Qo([ga,Wa,Ba,Xa],Co("marker")),Qo(uh,Co("Text")),Qo(Xa,Co("Path")),Qo(Hu,Co("Defs")),Qo([uh,ah],Co("Tspan")),Qo([qa,sa,la,Ja],Co("radius")),Qo(Ru,Co("EventTarget")),Qo(Bu,Co("Dom")),Qo(Wu,Co("Element")),Qo(Uu,Co("Shape")),Qo([Vu,oa],Co("Container")),Qo(la,Co("Gradient")),Qo(Ja,Co("Runner")),Mu.extend([...new Set(Mo)]),function(t=[]){Ya.push(...[].concat(t))}([Yu,yu,Eu,wu,$u,da,Ra,_u]),Qo(Ya,{to(t){return(new za).type(this.constructor).from(this.toArray()).to(t)},fromArray(t){return this.init(t),this},toConsumable(){return this.toArray()},morph(t,e,n,r,i){return this.fromArray(t.map((function(t,s){return r.step(t,e[s],n,i[s],i)})))}});var bh=function(t){return t.touches||[{clientX:t.clientX,clientY:t.clientY}]};Qo(ih,{panZoom:function(t){var e,n,r,i,s,o,u,a,h,l,c,f,d=this;if(this.off(".panZoom"),!1===t)return this;var p,m,g=null!=(n=(t=null!=(e=t)?e:{}).zoomFactor)?n:2,y=null!=(r=t.zoomMin)?r:Number.MIN_VALUE,_=null!=(i=t.zoomMax)?i:Number.MAX_VALUE,v=null==(s=t.wheelZoom)||s,w=null==(o=t.pinchZoom)||o,b=null==(u=t.panning)||u,x=null!=(a=t.panButton)?a:0,E=null!=(h=t.oneFingerPan)&&h,O=null!=(l=t.margins)&&l,M=null!=(c=t.wheelZoomDeltaModeLinePixels)?c:17,k=null!=(f=t.wheelZoomDeltaModeScreenPixels)?f:53,C=!1,A=this.viewbox(),S=function(t){if(!O)return t;var e=O.top,n=O.left,r=O.bottom,i=O.right,s=d.attr(["width","height"]),o=s.width,u=s.height,a=d.node.preserveAspectRatio.baseVal,h=0,l=0,c=0,f=0;if(a.align!==a.SVG_PRESERVEASPECTRATIO_NONE){var p=o/u,m=A.width/A.height;if(m!==p){var g=a.meetOrSlice!==a.SVG_MEETORSLICE_SLICE,y=p>m?"width":"height",_="width"===y,v=g&&_||!g&&!_,w=v?p/m:m/p,b=t[y]-t[y]*w;v?a.align===a.SVG_PRESERVEASPECTRATIO_XMIDYMIN||a.align===a.SVG_PRESERVEASPECTRATIO_XMIDYMID||a.align===a.SVG_PRESERVEASPECTRATIO_XMIDYMAX?(h=b/2,l=-b/2):a.align===a.SVG_PRESERVEASPECTRATIO_XMINYMIN||a.align===a.SVG_PRESERVEASPECTRATIO_XMINYMID||a.align===a.SVG_PRESERVEASPECTRATIO_XMINYMAX?l=-b:a.align!==a.SVG_PRESERVEASPECTRATIO_XMAXYMIN&&a.align!==a.SVG_PRESERVEASPECTRATIO_XMAXYMID&&a.align!==a.SVG_PRESERVEASPECTRATIO_XMAXYMAX||(h=b):a.align===a.SVG_PRESERVEASPECTRATIO_XMINYMID||a.align===a.SVG_PRESERVEASPECTRATIO_XMIDYMID||a.align===a.SVG_PRESERVEASPECTRATIO_XMAXYMID?(c=b/2,f=-b/2):a.align===a.SVG_PRESERVEASPECTRATIO_XMINYMIN||a.align===a.SVG_PRESERVEASPECTRATIO_XMIDYMIN||a.align===a.SVG_PRESERVEASPECTRATIO_XMAXYMIN?f=-b:a.align!==a.SVG_PRESERVEASPECTRATIO_XMINYMAX&&a.align!==a.SVG_PRESERVEASPECTRATIO_XMIDYMAX&&a.align!==a.SVG_PRESERVEASPECTRATIO_XMAXYMAX||(c=b)}}var x=A.width+A.x-n-h,E=A.x+i-t.width-l,M=A.height+A.y-e-c,k=A.y+r-t.height-f;return t.x=Math.min(x,Math.max(E,t.x)),t.y=Math.min(M,Math.max(k,t.y)),t},N=function t(e){(m=bh(e)).length<2?b&&E&&I.call(this,e):(b&&E&&R.call(this,e),e.preventDefault(),this.dispatch("pinchZoomStart",{event:e}).defaultPrevented||(this.off("touchstart.panZoom",t),C=!0,Tu(document,"touchmove.panZoom",T,this,{passive:!1}),Tu(document,"touchend.panZoom",j,this,{passive:!1})))},j=function t(e){e.preventDefault();var n=bh(e);n.length>1||(C=!1,this.dispatch("pinchZoomEnd",{event:e}),Iu(document,"touchmove.panZoom",T),Iu(document,"touchend.panZoom",t),this.on("touchstart.panZoom",N),n.length&&b&&E&&I.call(this,e))},T=function(t){t.preventDefault();var e=bh(t),n=this.zoom(),r=Math.sqrt(Math.pow(m[0].clientX-m[1].clientX,2)+Math.pow(m[0].clientY-m[1].clientY,2))/Math.sqrt(Math.pow(e[0].clientX-e[1].clientX,2)+Math.pow(e[0].clientY-e[1].clientY,2));(n<y&&r>1||n>_&&r<1)&&(r=1);var i={x:e[0].clientX+.5*(e[1].clientX-e[0].clientX),y:e[0].clientY+.5*(e[1].clientY-e[0].clientY)},s=m[0].clientX+.5*(m[1].clientX-m[0].clientX),o=m[0].clientY+.5*(m[1].clientY-m[0].clientY),u=this.point(i.x,i.y),a=this.point(2*i.x-s,2*i.y-o),h=new Eu(this.viewbox()).transform((new wu).translate(-a.x,-a.y).scale(r,0,0).translate(u.x,u.y));S(h),this.viewbox(h),m=e,this.dispatch("zoom",{box:h,focus:a})},I=function t(e){e.type.indexOf("mouse")>-1&&e.button!==x&&e.which!==x+1||(e.preventDefault(),this.off("mousedown.panZoom",t),m=bh(e),C||(this.dispatch("panStart",{event:e}),p={x:m[0].clientX,y:m[0].clientY},Tu(document,"touchmove.panZoom mousemove.panZoom",L,this,{passive:!1}),Tu(document,"touchend.panZoom mouseup.panZoom",R,this,{passive:!1})))},R=function t(e){e.preventDefault(),Iu(document,"touchmove.panZoom mousemove.panZoom",L),Iu(document,"touchend.panZoom mouseup.panZoom",t),this.on("mousedown.panZoom",I),this.dispatch("panEnd",{event:e})},L=function(t){t.preventDefault();var e=bh(t),n={x:e[0].clientX,y:e[0].clientY},r=this.point(n.x,n.y),i=this.point(p.x,p.y),s=[i.x-r.x,i.y-r.y];if(s[0]||s[1]){var o=new Eu(this.viewbox()).transform((new wu).translate(s[0],s[1]));p=n,S(o),this.dispatch("panning",{box:o,event:t}).defaultPrevented||this.viewbox(o)}};return v&&this.on("wheel.panZoom",(function(t){var e;switch(t.preventDefault(),t.deltaMode){case 1:e=t.deltaY*M;break;case 2:e=t.deltaY*k;break;default:e=t.deltaY}var n=Math.pow(1+g,-1*e/100)*this.zoom(),r=this.point(t.clientX,t.clientY);if(n>_&&(n=_),n<y&&(n=y),this.dispatch("zoom",{level:n,focus:r}).defaultPrevented)return this;if(this.zoom(n,r),O){var i=S(this.viewbox());this.viewbox(i)}}),this,{passive:!1}),w&&this.on("touchstart.panZoom",N,this,{passive:!1}),b&&this.on("mousedown.panZoom",I,this,{passive:!1}),this}});class xh{constructor(t,e,n,r){this.width=e,this.height=n,t.innerHTML="",this.canvas=wh().addTo(t).size("100%","100%").viewbox(`0 0 ${e} ${n}`).panZoom({zoomFactor:.2,zoomMin:.1}).attr({style:r})}static drawCircle(t={}){const e=new hh;return e.attr(t),e}static drawGroup(t=0,e=0,n,r){const i=new dh;return i.attr({"data-parent":r,"data-self":n,transform:`translate(${t}, ${e})`}),i}static drawPath(t,{borderColor:e=vo.borderColor,id:n=""}={}){const r=new Xa({d:t});return r.id(n),r.fill("none").stroke({color:e,width:1}),r}static drawRect({color:t="#fefefe",height:e=0,opacity:n=1,radius:r=0,width:i=0,x1:s,y1:o}={}){const u=new qa;return u.attr({height:e,opacity:n,rx:r,ry:r,width:i,x:s??void 0,y:o??void 0}),u.fill(t),u}static drawTemplate(t,{nodeHeight:e,nodeWidth:n}={}){const r=new ch({height:e,width:n}),i=document.createElement("div");return i.innerHTML=t,i.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),r.add(i),r}static drawText(t="",{dx:e,dy:n,x:r,y:i}){const s=new uh;return s.font({fill:"#f06"}),s.tspan(t),void 0!==r&&void 0!==i&&s.move(r,i),void 0!==e&&void 0!==n&&s.attr({dx:e,dy:n}),s}add(t){this.canvas.add(t)}clear(){this.canvas.clear().viewbox(`0 0 ${this.width} ${this.height}`)}exportToSvg(){new it(this.canvas,"apextree").exportToSVG()}resetViewBox(){this.canvas.viewbox(`0 0 ${this.width} ${this.height}`)}updateViewBox(t,e,n,r){this.canvas.viewbox(`${t} ${e} ${n} ${r}`)}zoom(t){const e=this.canvas.zoom()+t;e>=.1&&this.canvas.zoom(e)}}const Eh={marginx:100,marginy:100,rankdir:"TB"};class Oh extends xh{constructor(t,e){super(t,e.viewPortWidth,e.viewPortHeight,e.canvasStyle),this.element=t,this.options=e}calculateLayout(){const{childrenSpacing:t,siblingSpacing:e}=this.options,n=_o[this.options.direction];this.graph.setGraph({...Eh,nodesep:e,rankdir:n,ranksep:t}),po.layout(this.graph)}resetGraph(){this.graph=new po.graphlib.Graph,this.graph.setDefaultEdgeLabel((function(){return{}}))}setGraphNodesAndEdges(t){this.resetGraph(),this.setNodesRecursively(t)}setNodesRecursively(t,e){var n;const{direction:r,groupLeafNodesSpacing:i,nodeHeight:s,nodeWidth:o}=this.options,u=this.nodeMap[t],a={...u,parent:e||void 0};if(this.graph.setNode(t,{...a,height:s,width:o}),e&&this.graph.setEdge(e,t),u.onlyLeafNodes){const e=yo[r].leafWidth({childLength:u.children.length,childrenSpacing:i,nodeWidth:o}),n=yo[r].leafHeight({childLength:u.children.length,childrenSpacing:i,nodeHeight:s});this.graph.setNode(`${t}_leafs`,{...a,height:n,id:`${t}_leafs`,parent:t,width:e}),this.graph.setEdge(t,`${t}_leafs`)}else if(null==(n=u.children)?void 0:n.length)for(const h of u.children)this.setNodesRecursively(h,t)}changeLayout(t="top"){this.options={...this.options,direction:t},this.setGraphNodesAndEdges(this.data.id),this.render({keepOldPosition:!1})}collapse(t){const e=this.nodeMap[t];(null==e?void 0:e.children)&&(this.nodeMap[t]={...e,children:void 0,hiddenChildren:e.children},this.setGraphNodesAndEdges(this.data.id),this.render({keepOldPosition:!0}))}construct(t){if(this.nodeMap=Eo(t),this.data=t,this.options.groupLeafNodes){(function(t){const e=[];function n(t){return!t.children||0===t.children.length}return function t(r){if(r.children&&0!==r.children.length){r.children.every(n)&&e.push(r);for(const e of r.children)t(e)}}(t),e})(t).forEach((t=>{this.nodeMap[t.id]={...this.nodeMap[t.id],onlyLeafNodes:!0},this.nodeMap[`${t.id}_leafs`]={...this.nodeMap[t.id],id:`${t.id}_leafs`,onlyLeafNodes:!0,parent:t.id},this.nodeMap[t.id].children.forEach((e=>{this.nodeMap[e]={...this.nodeMap[e],parent:`${t.id}_leafs`}}))}))}this.setGraphNodesAndEdges(t.id)}expand(t){const e=this.nodeMap[t];(null==e?void 0:e.hiddenChildren)&&(this.nodeMap[t]={...e,children:e.hiddenChildren,hiddenChildren:void 0},this.setGraphNodesAndEdges(this.data.id),this.render({keepOldPosition:!0}))}fitScreen(){const{height:t,width:e}=this.graph.graph();this.updateViewBox(0,0,e,t)}render({keepOldPosition:t=!1}={}){const e=this.canvas.viewbox();this.clear(),this.calculateLayout();const{containerClassName:n,enableTooltip:r,fontColor:i,fontFamily:s,fontSize:o,fontWeight:u,tooltipId:a}=this.options,h=nt({color:i,fontFamily:s,fontSize:o,fontWeight:u}),l=xh.drawGroup(0,0,n);l.attr("style",h),l.id(n),console.log("graph",this.graph);const c=this.graph.nodes();if(this.graph.edges().forEach((t=>{this.renderEdge(t,l)})),c.forEach((t=>{t.endsWith("_leafs")?this.renderGroupedLeafNodes(t,l):this.renderNode(t,l)})),this.add(l),this.fitScreen(),t&&this.updateViewBox(e.x,e.y,e.width,e.height),r){const t=((t="apex-tooltip-container")=>{const e=document.getElementById(t)||document.createElement("div");return e.id=t,e})(a);(document.body||document.getElementsByTagName("body")[0]).append(t)}}renderEdge(t,e){const n=this.graph.node(t.w),r=this.graph.node(t.v),{nodeHeight:i,nodeWidth:s}=this.options,o=((t,e,n,r,i)=>{if(!(null==t?void 0:t.parent))return null;const{calculateEdge:s,edgeMidX:o,edgeMidY:u,edgeParentX:a,edgeParentY:h,edgeX:l,edgeY:c}=yo[i];return s({x:l({node:t,nodeHeight:r,nodeWidth:n}),y:c({node:t,nodeHeight:r,nodeWidth:n})},{x:a({nodeHeight:r,nodeWidth:n,parent:e}),y:h({nodeHeight:r,nodeWidth:n,parent:e})},{x:o({node:t,nodeHeight:r,nodeWidth:n}),y:u({node:t,nodeHeight:r,nodeWidth:n})},{sy:0})})(n,r,s,i,this.options.direction);if(!o)return;const u=xh.drawPath(o,{id:`${t.v}-${t.w}`});e.add(u)}renderGroupedLeafNodes(t,e){const n=this.graph.node(t),{options:r}=this,{direction:i}=r,s=yo[i].leafGroupX({node:n}),o=yo[i].leafGroupY({node:n}),u=xh.drawGroup(s,o,n.id,n.parent);n.children.forEach(((t,e)=>{this.renderLeafNode(t,u,e)})),e.add(u)}renderLeafNode(t,e,n){const r=this.nodeMap[t],{options:i}=this,{borderRadius:s,direction:o,enableTooltip:u,groupLeafNodesSpacing:a,highlightOnHover:h,nodeTemplate:l,tooltipTemplate:c}=i,{borderColor:f,borderStyle:d,borderWidth:p,fontColor:m,fontFamily:g,fontSize:y,fontWeight:_,nodeBGColor:v,nodeClassName:w,nodeHeight:b,nodeStyle:x,nodeWidth:E,tooltipBGColor:O,tooltipBorderColor:M,tooltipId:k,tooltipMaxWidth:C}={...i,...r.options},A=this,S=yo[o].leafX({childrenSpacing:a,index:n,nodeHeight:b,nodeWidth:E}),N=yo[o].leafY({childrenSpacing:a,index:n,nodeHeight:b,nodeWidth:E}),j=xh.drawGroup(S,N,r.id,r.parent),T=l(r[i.contentKey]),I=xh.drawTemplate(T,{nodeHeight:b,nodeWidth:E}),R=nt({color:m,fontFamily:g,fontSize:y,fontWeight:_}),L=nt({backgroundColor:v,borderColor:f,borderRadius:s,borderStyle:d,borderWidth:`${p}px`,boxSizing:"border-box",height:"100%"});if(I.first().attr("style",L.concat(x)),I.attr("class",w),j.attr("style",R),j.add(I),h&&(j.on("mouseover",(function(){const{self:t}=this.node.dataset,e=A.nodeMap[t];e&&bo(e,A.nodeMap,!0,i)})),j.on("mouseout",(function(){const{self:t}=this.node.dataset,e=A.nodeMap[t];e&&bo(e,A.nodeMap,!1,i)}))),u){const t=c?c(r[this.options.contentKey]):T;j.on("mousemove",(e=>{const n=et({bgColor:O,borderColor:M,maxWidth:C,padding:c?0:10,x:e.pageX,y:e.pageY});tt(k,n,t)})),j.on("mouseout",(t=>{"svg"===t.relatedTarget.tagName&&tt(k)}))}e.add(j)}renderNode(t,e){var n,r;const i=this.graph.node(t),{options:s}=this,{borderRadius:o,enableExpandCollapse:u,enableTooltip:a,highlightOnHover:h,nodeHeight:l,nodeTemplate:c,nodeWidth:f,tooltipTemplate:d}=s,{borderColor:p,borderStyle:m,borderWidth:g,fontColor:y,fontFamily:_,fontSize:v,fontWeight:w,nodeBGColor:b,nodeClassName:x,nodeStyle:E,tooltipBGColor:O,tooltipBorderColor:M,tooltipId:k,tooltipMaxWidth:C}={...s,...i.options},{height:A,width:S,x:N,y:j}=i,T=this,I=xh.drawGroup(N-f/2,j-l/2,i.id,i.parent),R=c(i[s.contentKey]),L=xh.drawTemplate(R,{nodeHeight:A,nodeWidth:S}),z=nt({color:y,fontFamily:_,fontSize:v,fontWeight:w}),D=nt({backgroundColor:b,borderColor:p,borderRadius:o,borderStyle:m,borderWidth:`${g}px`,boxSizing:"border-box",height:"100%"});if(L.first().attr("style",D.concat(E)),L.attr("class",x),I.attr("style",z),I.add(L),h&&(I.on("mouseover",(function(){const{self:t}=this.node.dataset,e=T.nodeMap[t];e&&bo(e,T.nodeMap,!0,s)})),I.on("mouseout",(function(){const{self:t}=this.node.dataset,e=T.nodeMap[t];e&&bo(e,T.nodeMap,!1,s)}))),a){const t=d?d(i[this.options.contentKey]):R;I.on("mousemove",(e=>{const n=et({bgColor:O,borderColor:M,maxWidth:C,padding:d?0:10,x:e.pageX,y:e.pageY});tt(k,n,t)})),I.on("mouseout",(t=>{"svg"===t.relatedTarget.tagName&&tt(k)}))}if(e.add(I),(i.children||i.hiddenChildren)&&u&&((null==(n=i.children)?void 0:n.length)||(null==(r=i.hiddenChildren)?void 0:r.length))){const t=7,n=xh.drawGroup(N+f/2-t,j+l-t,i.id),r=xh.drawCircle({cx:t,cy:t,r:t,style:"fill: #FFF; cursor: pointer;"});n.data("expanded",!1),n.add(r),i.hiddenChildren?n.add('<svg height="14" viewBox="0 0 24 24" width="14" xmlns="http://www.w3.org/2000/svg">\n <path d="m12 0a12 12 0 1 0 12 12 12.013 12.013 0 0 0 -12-12zm0 22a10 10 0 1 1 10-10 10.011 10.011 0 0 1 -10 10zm5-10a1 1 0 0 1 -1 1h-3v3a1 1 0 0 1 -2 0v-3h-3a1 1 0 0 1 0-2h3v-3a1 1 0 0 1 2 0v3h3a1 1 0 0 1 1 1z"/>\n</svg>'):n.add('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="14" height="14">\n <path d="m12,0C5.383,0,0,5.383,0,12s5.383,12,12,12,12-5.383,12-12S18.617,0,12,0Zm0,22c-5.514,0-10-4.486-10-10S6.486,2,12,2s10,4.486,10,10-4.486,10-10,10Zm5-10c0,.552-.448,1-1,1h-8c-.552,0-1-.448-1-1s.448-1,1-1h8c.552,0,1,.448,1,1Z"/>\n</svg>\n'),n.on("click",(function(){i.hiddenChildren?T.expand(this.node.dataset.self):T.collapse(this.node.dataset.self)})),e.add(n)}}}class Mh{constructor(t,e){this.element=t,this.options={...vo,...e};const{height:n,width:r}=this.options;this.graph=new Oh(this.element,this.options);let i=!1,s=0;"string"==typeof r&&/^\d+(\.\d+)?%$/.test(r)?(s=Number(r.substring(0,r.length-1)),i=!0):s=Number(r);const o="auto"===n?s/1.6:n;this.element.style.width=`${s}${i?"%":"px"}`,this.element.style.height=`${o}${i?"%":"px"}`,this.element.style.position="relative",this.handleWatermark()}static setLicense(t){ot.setLicense(t)}handleWatermark(){const t=this.element;t&&(ot.isLicenseValid()?fr.remove(t):fr.add(t))}render(t){if(!this.element)throw new Error("Element not found");if(this.graph.construct(t),this.graph.render(),this.options.enableToolbar){new lr(this.element).render({enableExport:!0,enableFitscreen:!0,enableZoom:!0,onExport:this.graph.exportToSvg.bind(this.graph),onFitscreen:this.graph.fitScreen.bind(this.graph),onZoom:this.graph.zoom.bind(this.graph)})}return this.graph}}"undefined"!=typeof window&&(window.ApexTree=Mh),t.ApexTree=Mh,t.default=Mh,Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|