2024-09-12 17:04:29 -05:00

10 lines
214 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(t="undefined"!=typeof globalThis?globalThis:t||self).ApexSankey=n()}(this,(function(){"use strict";const t={},n=[];function e(n,r){if(Array.isArray(n))for(const t of n)e(t,r);else if("object"!=typeof n)i(Object.getOwnPropertyNames(r)),t[n]=Object.assign(t[n]||{},r);else for(const t in n)e(t,n[t])}function r(n){return t[n]||{}}function i(t){n.push(...t)}function o(t,n){let e;const r=t.length,i=[];for(e=0;e<r;e++)i.push(n(t[e]));return i}function u(t){return t%360*Math.PI/180}function s(t){return t.charAt(0).toUpperCase()+t.slice(1)}function a(t,n,e,r){return null!=n&&null!=e||(r=r||t.bbox(),null==n?n=r.width/r.height*e:null==e&&(e=r.height/r.width*n)),{width:n,height:e}}function c(t,n){const e=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!=e&&([r,i]=Array.isArray(e)?e:"object"==typeof e?[e.x,e.y]:[e,e]);const o="string"==typeof r,u="string"==typeof i;if(o||u){const{height:t,width:e,x:s,y:a}=n.bbox();o&&(r=r.includes("left")?s:r.includes("right")?s+e:s+e/2),u&&(i=i.includes("top")?a:i.includes("bottom")?a+t:a+t/2)}return[r,i]}const h=new Set(["desc","metadata","title"]),f=t=>h.has(t.nodeName),l=(t,n,e={})=>{const r={...n};for(const i in r)r[i].valueOf()===e[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"))},d="http://www.w3.org/2000/svg",p="http://www.w3.org/2000/xmlns/",v="http://www.w3.org/1999/xlink",g={window:"undefined"==typeof window?null:window,document:"undefined"==typeof document?null:document};class y{}const _={},m="___SYMBOL___ROOT___";function w(t,n=d){return g.document.createElementNS(n,t)}function b(t,n=!1){if(t instanceof y)return t;if("object"==typeof t)return j(t);if(null==t)return new _[m];if("string"==typeof t&&"<"!==t.charAt(0))return j(g.document.querySelector(t));const e=n?g.document.createElement("div"):w("svg");return e.innerHTML=t,t=j(e.firstChild),e.removeChild(e.firstChild),t}function x(t,n){return n&&(n instanceof g.window.Node||n.ownerDocument&&n instanceof n.ownerDocument.defaultView.Node)?n:w(t)}function E(t){if(!t)return null;if(t.instance instanceof y)return t.instance;if("#document-fragment"===t.nodeName)return new _.Fragment(t);let n=s(t.nodeName||"Dom");return"LinearGradient"===n||"RadialGradient"===n?n="Gradient":_[n]||(n="Dom"),new _[n](t)}let j=E;function A(t,n=t.name,e=!1){return _[n]=t,e&&(_[m]=t),i(Object.getOwnPropertyNames(t.prototype)),t}let O=1e3;function M(t){return"Svgjs"+s(t)+O++}function S(t){for(let n=t.children.length-1;n>=0;n--)S(t.children[n]);return t.id?(t.id=M(t.nodeName),t):t}function k(t,n){let e,r;for(r=(t=Array.isArray(t)?t:[t]).length-1;r>=0;r--)for(e in n)t[r].prototype[e]=n[e]}function C(t){return function(...n){const e=n[n.length-1];return!e||e.constructor!==Object||e instanceof Array?t.apply(this,n):t.apply(this,n.slice(0,-1)).attr(e)}}e("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=b(t)).remove();const n=this.position();return this.parent().add(t,n),this},after:function(t){(t=b(t)).remove();const n=this.position();return this.parent().add(t,n+1),this},insertBefore:function(t){return(t=b(t)).before(this),this},insertAfter:function(t){return(t=b(t)).after(this),this}});const T=/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,I=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,N=/rgb\((\d+),(\d+),(\d+)\)/,R=/(#[a-z_][a-z0-9\-_]*)/i,z=/\)\s*,?\s*/,P=/\s/g,D=/^#[a-f0-9]{3}$|^#[a-f0-9]{6}$/i,L=/^rgb\(/,F=/^(\s+)?$/,B=/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,$=/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,V=/[\s,]+/,X=/[MLHVCSQTAZ]/i;function Y(t){const n=Math.round(t),e=Math.max(0,Math.min(255,n)).toString(16);return 1===e.length?"0"+e:e}function U(t,n){for(let e=n.length;e--;)if(null==t[n[e]])return!1;return!0}function q(t,n,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?t+6*(n-t)*e:e<.5?n:e<2/3?t+(n-t)*(2/3-e)*6:t}e("Dom",{classes:function(){const t=this.attr("class");return null==t?[]:t.trim().split(V)},hasClass:function(t){return-1!==this.classes().indexOf(t)},addClass:function(t){if(!this.hasClass(t)){const n=this.classes();n.push(t),this.attr("class",n.join(" "))}return this},removeClass:function(t){return this.hasClass(t)&&this.attr("class",this.classes().filter((function(n){return n!==t})).join(" ")),this},toggleClass:function(t){return this.hasClass(t)?this.removeClass(t):this.addClass(t)}}),e("Dom",{css:function(t,n){const e={};if(0===arguments.length)return this.node.style.cssText.split(/\s*;\s*/).filter((function(t){return!!t.length})).forEach((function(t){const n=t.split(/\s*:\s*/);e[n[0]]=n[1]})),e;if(arguments.length<2){if(Array.isArray(t)){for(const n of t){const t=n;e[n]=this.node.style.getPropertyValue(t)}return e}if("string"==typeof t)return this.node.style.getPropertyValue(t);if("object"==typeof t)for(const n in t)this.node.style.setProperty(n,null==t[n]||F.test(t[n])?"":t[n])}return 2===arguments.length&&this.node.style.setProperty(t,null==n||F.test(n)?"":n),this},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},visible:function(){return"none"!==this.css("display")}}),e("Dom",{data:function(t,n,e){if(null==t)return this.data(o(function(t,n){let e;const r=t.length,i=[];for(e=0;e<r;e++)n(t[e])&&i.push(t[e]);return i}(this.node.attributes,(t=>0===t.nodeName.indexOf("data-"))),(t=>t.nodeName.slice(5))));if(t instanceof Array){const n={};for(const e of t)n[e]=this.data(e);return n}if("object"==typeof t)for(n in t)this.data(n,t[n]);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===n?null:!0===e||"string"==typeof n||"number"==typeof n?n:JSON.stringify(n));return this}}),e("Dom",{remember:function(t,n){if("object"==typeof arguments[0])for(const e in t)this.remember(e,t[e]);else{if(1===arguments.length)return this.memory()[t];this.memory()[t]=n}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 W{constructor(...t){this.init(...t)}static isColor(t){return t&&(t instanceof W||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",n){const{random:e,round:r,sin:i,PI:o}=Math;if("vibrant"===t){const t=24*e()+57,n=38*e()+45,r=360*e();return new W(t,n,r,"lch")}if("sine"===t){const t=r(80*i(2*o*(n=null==n?e():n)/.5+.01)+150),u=r(50*i(2*o*n/.5+4.6)+200),s=r(100*i(2*o*n/.5+2.3)+150);return new W(t,u,s)}if("pastel"===t){const t=8*e()+86,n=17*e()+9,r=360*e();return new W(t,n,r,"lch")}if("dark"===t){const t=10+10*e(),n=50*e()+86,r=360*e();return new W(t,n,r,"lch")}if("rgb"===t){const t=255*e(),n=255*e(),r=255*e();return new W(t,n,r)}if("lab"===t){const t=100*e(),n=256*e()-128,r=256*e()-128;return new W(t,n,r,"lab")}if("grey"===t){const t=255*e();return new W(t,t,t)}throw new Error("Unsupported random color mode")}static test(t){return"string"==typeof t&&(D.test(t)||L.test(t))}cmyk(){const{_a:t,_b:n,_c:e}=this.rgb(),[r,i,o]=[t,n,e].map((t=>t/255)),u=Math.min(1-r,1-i,1-o);if(1===u)return new W(0,0,0,1,"cmyk");return new W((1-r-u)/(1-u),(1-i-u)/(1-u),(1-o-u)/(1-u),u,"cmyk")}hsl(){const{_a:t,_b:n,_c:e}=this.rgb(),[r,i,o]=[t,n,e].map((t=>t/255)),u=Math.max(r,i,o),s=Math.min(r,i,o),a=(u+s)/2,c=u===s,h=u-s;return new W(360*(c?0:u===r?((i-o)/h+(i<o?6:0))/6:u===i?((o-r)/h+2)/6:u===o?((r-i)/h+4)/6:0),100*(c?0:a>.5?h/(2-u-s):h/(u+s)),100*a,"hsl")}init(t=0,n=0,e=0,r=0,i="rgb"){if(t=t||0,this.space)for(const f in this.space)delete this[this.space[f]];if("number"==typeof t)i="string"==typeof r?r:i,r="string"==typeof r?0:r,Object.assign(this,{_a:t,_b:n,_c:e,_d:r,space:i});else if(t instanceof Array)this.space=n||("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 e=function(t,n){const e=U(t,"rgb")?{_a:t.r,_b:t.g,_c:t.b,_d:0,space:"rgb"}:U(t,"xyz")?{_a:t.x,_b:t.y,_c:t.z,_d:0,space:"xyz"}:U(t,"hsl")?{_a:t.h,_b:t.s,_c:t.l,_d:0,space:"hsl"}:U(t,"lab")?{_a:t.l,_b:t.a,_c:t.b,_d:0,space:"lab"}:U(t,"lch")?{_a:t.l,_b:t.c,_c:t.h,_d:0,space:"lch"}:U(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 e.space=n||e.space,e}(t,n);Object.assign(this,e)}else if("string"==typeof t)if(L.test(t)){const n=t.replace(P,""),[e,r,i]=N.exec(n).slice(1,4).map((t=>parseInt(t)));Object.assign(this,{_a:e,_b:r,_c:i,_d:0,space:"rgb"})}else{if(!D.test(t))throw Error("Unsupported string format, can't construct Color");{const n=t=>parseInt(t,16),[,e,r,i]=I.exec((o=t,4===o.length?["#",o.substring(1,2),o.substring(1,2),o.substring(2,3),o.substring(2,3),o.substring(3,4),o.substring(3,4)].join(""):o)).map(n);Object.assign(this,{_a:e,_b:r,_c:i,_d:0,space:"rgb"})}}var o;const{_a:u,_b:s,_c:a,_d:c}=this,h="rgb"===this.space?{r:u,g:s,b:a}:"xyz"===this.space?{x:u,y:s,z:a}:"hsl"===this.space?{h:u,s:s,l:a}:"lab"===this.space?{l:u,a:s,b:a}:"lch"===this.space?{l:u,c:s,h:a}:"cmyk"===this.space?{c:u,m:s,y:a,k:c}:{};Object.assign(this,h)}lab(){const{x:t,y:n,z:e}=this.xyz();return new W(116*n-16,500*(t-n),200*(n-e),"lab")}lch(){const{l:t,a:n,b:e}=this.lab(),r=Math.sqrt(n**2+e**2);let i=180*Math.atan2(e,n)/Math.PI;i<0&&(i*=-1,i=360-i);return new W(t,r,i,"lch")}rgb(){if("rgb"===this.space)return this;if("lab"===(t=this.space)||"xyz"===t||"lch"===t){let{x:t,y:n,z:e}=this;if("lab"===this.space||"lch"===this.space){let{l:r,a:i,b:o}=this;if("lch"===this.space){const{c:t,h:n}=this,e=Math.PI/180;i=t*Math.cos(e*n),o=t*Math.sin(e*n)}const u=(r+16)/116,s=i/500+u,a=u-o/200,c=16/116,h=.008856,f=7.787;t=.95047*(s**3>h?s**3:(s-c)/f),n=1*(u**3>h?u**3:(u-c)/f),e=1.08883*(a**3>h?a**3:(a-c)/f)}const r=3.2406*t+-1.5372*n+-.4986*e,i=-.9689*t+1.8758*n+.0415*e,o=.0557*t+-.204*n+1.057*e,u=Math.pow,s=.0031308,a=r>s?1.055*u(r,1/2.4)-.055:12.92*r,c=i>s?1.055*u(i,1/2.4)-.055:12.92*i,h=o>s?1.055*u(o,1/2.4)-.055:12.92*o;return new W(255*a,255*c,255*h)}if("hsl"===this.space){let{h:t,s:n,l:e}=this;if(t/=360,n/=100,e/=100,0===n){e*=255;return new W(e,e,e)}const r=e<.5?e*(1+n):e+n-e*n,i=2*e-r,o=255*q(i,r,t+1/3),u=255*q(i,r,t),s=255*q(i,r,t-1/3);return new W(o,u,s)}if("cmyk"===this.space){const{c:t,m:n,y:e,k:r}=this,i=255*(1-Math.min(1,t*(1-r)+r)),o=255*(1-Math.min(1,n*(1-r)+r)),u=255*(1-Math.min(1,e*(1-r)+r));return new W(i,o,u)}return this;var t}toArray(){const{_a:t,_b:n,_c:e,_d:r,space:i}=this;return[t,n,e,r,i]}toHex(){const[t,n,e]=this._clamped().map(Y);return`#${t}${n}${e}`}toRgb(){const[t,n,e]=this._clamped();return`rgb(${t},${n},${e})`}toString(){return this.toHex()}xyz(){const{_a:t,_b:n,_c:e}=this.rgb(),[r,i,o]=[t,n,e].map((t=>t/255)),u=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92,s=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92,a=o>.04045?Math.pow((o+.055)/1.055,2.4):o/12.92,c=(.4124*u+.3576*s+.1805*a)/.95047,h=(.2126*u+.7152*s+.0722*a)/1,f=(.0193*u+.1192*s+.9505*a)/1.08883,l=c>.008856?Math.pow(c,1/3):7.787*c+16/116,d=h>.008856?Math.pow(h,1/3):7.787*h+16/116,p=f>.008856?Math.pow(f,1/3):7.787*f+16/116;return new W(l,d,p,"xyz")}_clamped(){const{_a:t,_b:n,_c:e}=this.rgb(),{max:r,min:i,round:o}=Math;return[t,n,e].map((t=>r(0,i(o(t),255))))}}class G{constructor(...t){this.init(...t)}clone(){return new G(this)}init(t,n){const e=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:n};return this.x=null==i.x?e: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){H.isMatrixLike(t)||(t=new H(t));const{x:n,y:e}=this;return this.x=t.a*n+t.c*e+t.e,this.y=t.b*n+t.d*e+t.f,this}}function Z(t,n,e){return Math.abs(n-t)<1e-6}class H{constructor(...t){this.init(...t)}static formatTransforms(t){const n="both"===t.flip||!0===t.flip,e=t.flip&&(n||"x"===t.flip)?-1:1,r=t.flip&&(n||"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,o=t.skew&&t.skew.length?t.skew[1]:isFinite(t.skew)?t.skew:isFinite(t.skewY)?t.skewY:0,u=t.scale&&t.scale.length?t.scale[0]*e:isFinite(t.scale)?t.scale*e:isFinite(t.scaleX)?t.scaleX*e:e,s=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,c=t.rotate||t.theta||0,h=new G(t.origin||t.around||t.ox||t.originX,t.oy||t.originY),f=h.x,l=h.y,d=new G(t.position||t.px||t.positionX||NaN,t.py||t.positionY||NaN),p=d.x,v=d.y,g=new G(t.translate||t.tx||t.translateX,t.ty||t.translateY),y=g.x,_=g.y,m=new G(t.relative||t.rx||t.relativeX,t.ry||t.relativeY);return{scaleX:u,scaleY:s,skewX:i,skewY:o,shear:a,theta:c,rx:m.x,ry:m.y,tx:y,ty:_,ox:f,oy:l,px:p,py:v}}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,n,e){const r=t.a*n.a+t.c*n.b,i=t.b*n.a+t.d*n.b,o=t.a*n.c+t.c*n.d,u=t.b*n.c+t.d*n.d,s=t.e+t.a*n.e+t.c*n.f,a=t.f+t.b*n.e+t.d*n.f;return e.a=r,e.b=i,e.c=o,e.d=u,e.e=s,e.f=a,e}around(t,n,e){return this.clone().aroundO(t,n,e)}aroundO(t,n,e){const r=t||0,i=n||0;return this.translateO(-r,-i).lmultiplyO(e).translateO(r,i)}clone(){return new H(this)}decompose(t=0,n=0){const e=this.a,r=this.b,i=this.c,o=this.d,u=this.e,s=this.f,a=e*o-r*i,c=a>0?1:-1,h=c*Math.sqrt(e*e+r*r),f=Math.atan2(c*r,c*e),l=180/Math.PI*f,d=Math.cos(f),p=Math.sin(f),v=(e*i+r*o)/a,g=i*h/(v*e-r)||o*h/(v*r+e);return{scaleX:h,scaleY:g,shear:v,rotate:l,translateX:u-t+t*d*h+n*(v*d*h-p*g),translateY:s-n+t*p*h+n*(v*p*h+d*g),originX:t,originY:n,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 n=new H(t);return Z(this.a,n.a)&&Z(this.b,n.b)&&Z(this.c,n.c)&&Z(this.d,n.d)&&Z(this.e,n.e)&&Z(this.f,n.f)}flip(t,n){return this.clone().flipO(t,n)}flipO(t,n){return"x"===t?this.scaleO(-1,1,n,0):"y"===t?this.scaleO(1,-1,0,n):this.scaleO(-1,-1,t,n||t)}init(t){const n=H.fromArray([1,0,0,1,0,0]);return t=t instanceof bt?t.matrixify():"string"==typeof t?H.fromArray(t.split(V).map(parseFloat)):Array.isArray(t)?H.fromArray(t):"object"==typeof t&&H.isMatrixLike(t)?t:"object"==typeof t?(new H).transform(t):6===arguments.length?H.fromArray([].slice.call(arguments)):n,this.a=null!=t.a?t.a:n.a,this.b=null!=t.b?t.b:n.b,this.c=null!=t.c?t.c:n.c,this.d=null!=t.d?t.d:n.d,this.e=null!=t.e?t.e:n.e,this.f=null!=t.f?t.f:n.f,this}inverse(){return this.clone().inverseO()}inverseO(){const t=this.a,n=this.b,e=this.c,r=this.d,i=this.e,o=this.f,u=t*r-n*e;if(!u)throw new Error("Cannot invert "+this);const s=r/u,a=-n/u,c=-e/u,h=t/u,f=-(s*i+c*o),l=-(a*i+h*o);return this.a=s,this.b=a,this.c=c,this.d=h,this.e=f,this.f=l,this}lmultiply(t){return this.clone().lmultiplyO(t)}lmultiplyO(t){const n=t instanceof H?t:new H(t);return H.matrixMultiply(n,this,this)}multiply(t){return this.clone().multiplyO(t)}multiplyO(t){const n=t instanceof H?t:new H(t);return H.matrixMultiply(this,n,this)}rotate(t,n,e){return this.clone().rotateO(t,n,e)}rotateO(t,n=0,e=0){t=u(t);const r=Math.cos(t),i=Math.sin(t),{a:o,b:s,c:a,d:c,e:h,f:f}=this;return this.a=o*r-s*i,this.b=s*r+o*i,this.c=a*r-c*i,this.d=c*r+a*i,this.e=h*r-f*i+e*i-n*r+n,this.f=f*r+h*i-n*i-e*r+e,this}scale(){return this.clone().scaleO(...arguments)}scaleO(t,n=t,e=0,r=0){3===arguments.length&&(r=e,e=n,n=t);const{a:i,b:o,c:u,d:s,e:a,f:c}=this;return this.a=i*t,this.b=o*n,this.c=u*t,this.d=s*n,this.e=a*t-e*t+e,this.f=c*n-r*n+r,this}shear(t,n,e){return this.clone().shearO(t,n,e)}shearO(t,n=0,e=0){const{a:r,b:i,c:o,d:u,e:s,f:a}=this;return this.a=r+i*t,this.c=o+u*t,this.e=s+a*t-e*t,this}skew(){return this.clone().skewO(...arguments)}skewO(t,n=t,e=0,r=0){3===arguments.length&&(r=e,e=n,n=t),t=u(t),n=u(n);const i=Math.tan(t),o=Math.tan(n),{a:s,b:a,c:c,d:h,e:f,f:l}=this;return this.a=s+a*i,this.b=a+s*o,this.c=c+h*i,this.d=h+c*o,this.e=f+l*i-r*i,this.f=l+f*o-e*o,this}skewX(t,n,e){return this.skew(t,0,n,e)}skewY(t,n,e){return this.skew(0,t,n,e)}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(H.isMatrixLike(t)){return new H(t).multiplyO(this)}const n=H.formatTransforms(t),{x:e,y:r}=new G(n.ox,n.oy).transform(this),i=(new H).translateO(n.rx,n.ry).lmultiplyO(this).translateO(-e,-r).scaleO(n.scaleX,n.scaleY).skewO(n.skewX,n.skewY).shearO(n.shear).rotateO(n.theta).translateO(e,r);if(isFinite(n.px)||isFinite(n.py)){const t=new G(e,r).transform(i),o=isFinite(n.px)?n.px-t.x:0,u=isFinite(n.py)?n.py-t.y:0;i.translateO(o,u)}return i.translateO(n.tx,n.ty),i}translate(t,n){return this.clone().translateO(t,n)}translateO(t,n){return this.e+=t||0,this.f+=n||0,this}valueOf(){return{a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}}function Q(){if(!Q.nodes){const t=b().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 n=t.path().node;Q.nodes={svg:t,path:n}}if(!Q.nodes.svg.node.parentNode){const t=g.document.body||g.document.documentElement;Q.nodes.svg.addTo(t)}return Q.nodes}function J(t){return!(t.width||t.height||t.x||t.y)}A(H,"Matrix");class K{constructor(...t){this.init(...t)}addOffset(){return this.x+=g.window.pageXOffset,this.y+=g.window.pageYOffset,new K(this)}init(t){return t="string"==typeof t?t.split(V).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 J(this)}merge(t){const n=Math.min(this.x,t.x),e=Math.min(this.y,t.y),r=Math.max(this.x+this.width,t.x+t.width)-n,i=Math.max(this.y+this.height,t.y+t.height)-e;return new K(n,e,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 H||(t=new H(t));let n=1/0,e=-1/0,r=1/0,i=-1/0;return[new G(this.x,this.y),new G(this.x2,this.y),new G(this.x,this.y2),new G(this.x2,this.y2)].forEach((function(o){o=o.transform(t),n=Math.min(n,o.x),e=Math.max(e,o.x),r=Math.min(r,o.y),i=Math.max(i,o.y)})),new K(n,r,e-n,i-r)}}function tt(t,n,e){let r;try{if(r=n(t.node),J(r)&&((i=t.node)!==g.document&&!(g.document.documentElement.contains||function(t){for(;t.parentNode;)t=t.parentNode;return t===g.document}).call(g.document.documentElement,i)))throw new Error("Element not in the dom")}catch(o){r=e(t)}var i;return r}e({viewbox:{viewbox(t,n,e,r){return null==t?new K(this.attr("viewBox")):this.attr("viewBox",new K(t,n,e,r))},zoom(t,n){let{width:e,height:r}=this.attr(["width","height"]);if((e||r)&&"string"!=typeof e&&"string"!=typeof r||(e=this.node.clientWidth,r=this.node.clientHeight),!e||!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(),o=e/i.width,u=r/i.height,s=Math.min(o,u);if(null==t)return s;let a=s/t;a===1/0&&(a=Number.MAX_SAFE_INTEGER/100),n=n||new G(e/2/o+i.x,r/2/u+i.y);const c=new K(i).transform(new H({scale:a,origin:n}));return this.viewbox(c)}}}),A(K,"Box");class nt extends Array{constructor(t=[],...n){if(super(t,...n),"number"==typeof t)return this;this.length=0,this.push(...t)}}k([nt],{each(t,...n){return"function"==typeof t?this.map(((n,e,r)=>t.call(n,n,e,r))):this.map((e=>e[t](...n)))},toArray(){return Array.prototype.concat.apply([],this)}});const et=["toArray","constructor","each"];function rt(t,n){return new nt(o((n||g.document).querySelectorAll(t),(function(t){return E(t)})))}nt.extend=function(t){t=t.reduce(((t,n)=>(et.includes(n)||"_"===n[0]||(n in Array.prototype&&(t["$"+n]=Array.prototype[n]),t[n]=function(...t){return this.each(n,...t)}),t)),{}),k([nt],t)};let it=0;const ot={};function ut(t){let n=t.getEventHolder();return n===g.window&&(n=ot),n.events||(n.events={}),n.events}function st(t){return t.getEventTarget()}function at(t,n,e,r,i){const o=e.bind(r||t),u=b(t),s=ut(u),a=st(u);n=Array.isArray(n)?n:n.split(V),e._svgjsListenerId||(e._svgjsListenerId=++it),n.forEach((function(t){const n=t.split(".")[0],r=t.split(".")[1]||"*";s[n]=s[n]||{},s[n][r]=s[n][r]||{},s[n][r][e._svgjsListenerId]=o,a.addEventListener(n,o,i||!1)}))}function ct(t,n,e,r){const i=b(t),o=ut(i),u=st(i);("function"!=typeof e||(e=e._svgjsListenerId))&&(n=Array.isArray(n)?n:(n||"").split(V)).forEach((function(t){const n=t&&t.split(".")[0],s=t&&t.split(".")[1];let a,c;if(e)o[n]&&o[n][s||"*"]&&(u.removeEventListener(n,o[n][s||"*"][e],r||!1),delete o[n][s||"*"][e]);else if(n&&s){if(o[n]&&o[n][s]){for(c in o[n][s])ct(u,[n,s].join("."),c);delete o[n][s]}}else if(s)for(t in o)for(a in o[t])s===a&&ct(u,[t,s].join("."));else if(n){if(o[n]){for(a in o[n])ct(u,[n,a].join("."));delete o[n]}}else{for(t in o)ct(u,t);!function(t){let n=t.getEventHolder();n===g.window&&(n=ot),n.events&&(n.events={})}(i)}}))}class ht extends y{addEventListener(){}dispatch(t,n,e){return function(t,n,e,r){const i=st(t);return n instanceof g.window.Event||(n=new g.window.CustomEvent(n,{detail:e,cancelable:!0,...r})),i.dispatchEvent(n),n}(this,t,n,e)}dispatchEvent(t){const n=this.getEventHolder().events;if(!n)return!0;const e=n[t.type];for(const r in e)for(const n in e[r])e[r][n](t);return!t.defaultPrevented}fire(t,n,e){return this.dispatch(t,n,e),this}getEventHolder(){return this}getEventTarget(){return this}off(t,n,e){return ct(this,t,n,e),this}on(t,n,e,r){return at(this,t,n,e,r),this}removeEventListener(){}}function ft(){}A(ht,"EventTarget");const lt=400,dt=">",pt=0,vt={"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 gt 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(V).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 yt{constructor(...t){this.init(...t)}convert(t){return new yt(this.value,t)}divide(t){return t=new yt(t),new yt(this/t,this.unit||t.unit)}init(t,n){return n=Array.isArray(t)?t[1]:n,t=Array.isArray(t)?t[0]:t,this.value=0,this.unit=n||"","number"==typeof t?this.value=isNaN(t)?0:isFinite(t)?t:t<0?-34e37:34e37:"string"==typeof t?(n=t.match(T))&&(this.value=parseFloat(n[1]),"%"===n[5]?this.value/=100:"s"===n[5]&&(this.value*=1e3),this.unit=n[5]):t instanceof yt&&(this.value=t.valueOf(),this.unit=t.unit),this}minus(t){return t=new yt(t),new yt(this-t,this.unit||t.unit)}plus(t){return t=new yt(t),new yt(this+t,this.unit||t.unit)}times(t){return t=new yt(t),new yt(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 _t=new Set(["fill","stroke","color","bgcolor","stop-color","flood-color","lighting-color"]),mt=[];class wt extends ht{constructor(t,n){super(),this.node=t,this.type=t.nodeName,n&&t!==n&&this.attr(n)}add(t,n){return(t=b(t)).removeNamespace&&this.node instanceof g.window.SVGElement&&t.removeNamespace(),null==n?this.node.appendChild(t.node):t.node!==this.node.childNodes[n]&&this.node.insertBefore(t.node,this.node.childNodes[n]),this}addTo(t,n){return b(t).put(this,n)}children(){return new nt(o(this.node.children,(function(t){return E(t)})))}clear(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return this}clone(t=!0,n=!0){this.writeDataToDom();let e=this.node.cloneNode(t);return n&&(e=S(e)),new this.constructor(e)}each(t,n){const e=this.children();let r,i;for(r=0,i=e.length;r<i;r++)t.apply(e[r],[r,e]),n&&e[r].each(t,n);return this}element(t,n){return this.put(new wt(w(t),n))}first(){return E(this.node.firstChild)}get(t){return E(this.node.childNodes[t])}getEventHolder(){return this.node}getEventTarget(){return this.node}has(t){return this.index(t)>=0}html(t,n){return this.xml(t,n,"http://www.w3.org/1999/xhtml")}id(t){return void 0!==t||this.node.id||(this.node.id=M(this.type)),this.attr("id",t)}index(t){return[].slice.call(this.node.childNodes).indexOf(t.node)}last(){return E(this.node.lastChild)}matches(t){const n=this.node,e=n.matches||n.matchesSelector||n.msMatchesSelector||n.mozMatchesSelector||n.webkitMatchesSelector||n.oMatchesSelector||null;return e&&e.call(n,t)}parent(t){let n=this;if(!n.node.parentNode)return null;if(n=E(n.node.parentNode),!t)return n;do{if("string"==typeof t?n.matches(t):n instanceof t)return n}while(n=E(n.node.parentNode));return n}put(t,n){return t=b(t),this.add(t,n),t}putIn(t,n){return b(t).add(this,n)}remove(){return this.parent()&&this.parent().removeElement(this),this}removeElement(t){return this.node.removeChild(t.node),this}replace(t){return t=b(t),this.node.parentNode&&this.node.parentNode.replaceChild(t.node,this.node),t}round(t=2,n=null){const e=10**t,r=this.attr(n);for(const i in r)"number"==typeof r[i]&&(r[i]=Math.round(r[i]*e)/e);return this.attr(r),this}svg(t,n){return this.xml(t,n,d)}toString(){return this.id()}words(t){return this.node.textContent=t,this}wrap(t){const n=this.parent();if(!n)return this.addTo(t);const e=n.index(this);return n.put(t,e).put(this)}writeDataToDom(){return this.each((function(){this.writeDataToDom()})),this}xml(t,n,e){if("boolean"==typeof t&&(e=n,n=t,t=null),null==t||"function"==typeof t){n=null==n||n,this.writeDataToDom();let e=this;if(null!=t){if(e=E(e.node.cloneNode(!0)),n){const n=t(e);if(e=n||e,!1===n)return""}e.each((function(){const n=t(this),e=n||this;!1===n?this.remove():n&&this!==e&&this.replace(e)}),!0)}return n?e.node.outerHTML:e.node.innerHTML}n=null!=n&&n;const r=w("wrapper",e),i=g.document.createDocumentFragment();r.innerHTML=t;for(let u=r.children.length;u--;)i.appendChild(r.firstElementChild);const o=this.parent();return n?this.replace(i)&&o:this.add(i)}}k(wt,{attr:function(t,n,e){if(null==t){t={},n=this.node.attributes;for(const e of n)t[e.nodeName]=B.test(e.nodeValue)?parseFloat(e.nodeValue):e.nodeValue;return t}if(t instanceof Array)return t.reduce(((t,n)=>(t[n]=this.attr(n),t)),{});if("object"==typeof t&&t.constructor===Object)for(n in t)this.attr(n,t[n]);else if(null===n)this.node.removeAttribute(t);else{if(null==n)return null==(n=this.node.getAttribute(t))?vt[t]:B.test(n)?parseFloat(n):n;"number"==typeof(n=mt.reduce(((n,e)=>e(t,n,this)),n))?n=new yt(n):_t.has(t)&&W.isColor(n)?n=new W(n):n.constructor===Array&&(n=new gt(n)),"leading"===t?this.leading&&this.leading(n):"string"==typeof e?this.node.setAttributeNS(e,t,n.toString()):this.node.setAttribute(t,n.toString()),!this.rebuild||"font-size"!==t&&"x"!==t||this.rebuild()}return this},find:function(t){return rt(t,this.node)},findOne:function(t){return E(this.node.querySelector(t))}}),A(wt,"Dom");class bt extends wt{constructor(t,n){super(t,n),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,n){return this.cx(t).cy(n)}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,n){return this.dx(t).dy(n)}dx(t=0){return this.x(new yt(t).plus(this.x()))}dy(t=0){return this.y(new yt(t).plus(this.y()))}getEventHolder(){return this}height(t){return this.attr("height",t)}move(t,n){return this.x(t).y(n)}parents(t=this.root()){const n="string"==typeof t;n||(t=b(t));const e=new nt;let r=this;for(;(r=r.parent())&&r.node!==g.document&&"#document-fragment"!==r.nodeName&&(e.push(r),n||r.node!==t.node)&&(!n||!r.matches(t));)if(r.node===this.root().node)return null;return e}reference(t){if(!(t=this.attr(t)))return null;const n=(t+"").match(R);return n?b(n[1]):null}root(){const t=this.parent(_[m]);return t&&t.root()}setData(t){return this.dom=t,this}size(t,n){const e=a(this,t,n);return this.width(new yt(e.width)).height(new yt(e.height))}width(t){return this.attr("width",t)}writeDataToDom(){return l(this,this.dom),super.writeDataToDom()}x(t){return this.attr("x",t)}y(t){return this.attr("y",t)}}k(bt,{bbox:function(){const t=tt(this,(t=>t.getBBox()),(t=>{try{const n=t.clone().addTo(Q().svg).show(),e=n.node.getBBox();return n.remove(),e}catch(n){throw new Error(`Getting bbox of element "${t.node.nodeName}" is not possible: ${n.toString()}`)}}));return new K(t)},rbox:function(t){const n=tt(this,(t=>t.getBoundingClientRect()),(t=>{throw new Error(`Getting rbox of element "${t.node.nodeName}" is not possible`)})),e=new K(n);return t?e.transform(t.screenCTM().inverseO()):e.addOffset()},inside:function(t,n){const e=this.bbox();return t>e.x&&n>e.y&&t<e.x+e.width&&n<e.y+e.height},point:function(t,n){return new G(t,n).transformO(this.screenCTM().inverseO())},ctm:function(){return new H(this.node.getCTM())},screenCTM:function(){try{if("function"==typeof this.isRoot&&!this.isRoot()){const t=this.rect(1,1),n=t.node.getScreenCTM();return t.remove(),new H(n)}return new H(this.node.getScreenCTM())}catch(t){return console.warn(`Cannot get CTM from SVG node ${this.node.nodeName}. Is the element rendered?`),new H}}}),A(bt,"Element");const xt={stroke:["color","width","opacity","linecap","linejoin","miterlimit","dasharray","dashoffset"],fill:["color","opacity","rule"],prefix:function(t,n){return"color"===n?t:t+"-"+n}};["fill","stroke"].forEach((function(t){const n={};let r;n[t]=function(n){if(void 0===n)return this.attr(t);if("string"==typeof n||n instanceof W||W.isRgb(n)||n instanceof bt)this.attr(t,n);else for(r=xt[t].length-1;r>=0;r--)null!=n[xt[t][r]]&&this.attr(xt.prefix(t,xt[t][r]),n[xt[t][r]]);return this},e(["Element","Runner"],n)})),e(["Element","Runner"],{matrix:function(t,n,e,r,i,o){return null==t?new H(this):this.attr("transform",new H(t,n,e,r,i,o))},rotate:function(t,n,e){return this.transform({rotate:t,ox:n,oy:e},!0)},skew:function(t,n,e,r){return 1===arguments.length||3===arguments.length?this.transform({skew:t,ox:n,oy:e},!0):this.transform({skew:[t,n],ox:e,oy:r},!0)},shear:function(t,n,e){return this.transform({shear:t,ox:n,oy:e},!0)},scale:function(t,n,e,r){return 1===arguments.length||3===arguments.length?this.transform({scale:t,ox:n,oy:e},!0):this.transform({scale:[t,n],ox:e,oy:r},!0)},translate:function(t,n){return this.transform({translate:[t,n]},!0)},relative:function(t,n){return this.transform({relative:[t,n]},!0)},flip:function(t="both",n="center"){return-1==="xybothtrue".indexOf(t)&&(n=t,t="both"),this.transform({flip:t,origin:n},!0)},opacity:function(t){return this.attr("opacity",t)}}),e("radius",{radius:function(t,n=t){return"radialGradient"===(this._element||this).type?this.attr("r",new yt(t)):this.rx(t).ry(n)}}),e("Path",{length:function(){return this.node.getTotalLength()},pointAt:function(t){return new G(this.node.getPointAtLength(t))}}),e(["Element","Runner"],{font:function(t,n){if("object"==typeof t){for(n in t)this.font(n,t[n]);return this}return"leading"===t?this.leading(n):"anchor"===t?this.attr("text-anchor",n):"size"===t||"family"===t||"weight"===t||"stretch"===t||"variant"===t||"style"===t?this.attr("font-"+t,n):this.attr(t,n)}});e("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,n){return t[n]=function(t){return null===t?this.off(n):this.on(n,t),this},t}),{})),e("Element",{untransform:function(){return this.attr("transform",null)},matrixify:function(){return(this.attr("transform")||"").split(z).slice(0,-1).map((function(t){const n=t.trim().split("(");return[n[0],n[1].split(V).map((function(t){return parseFloat(t)}))]})).reverse().reduce((function(t,n){return"matrix"===n[0]?t.lmultiply(H.fromArray(n[1])):t[n[0]].apply(t,n[1])}),new H)},toParent:function(t,n){if(this===t)return this;if(f(this.node))return this.addTo(t,n);const e=this.screenCTM(),r=t.screenCTM().inverse();return this.addTo(t,n).untransform().transform(r.multiply(e)),this},toRoot:function(t){return this.toParent(this.root(),t)},transform:function(t,n){if(null==t||"string"==typeof t){const n=new H(this).decompose();return null==t?n:n[t]}H.isMatrixLike(t)||(t={...t,origin:c(t,this)});const e=new H(!0===n?this:n||!1).transform(t);return this.attr("transform",e)}});class Et extends bt{flatten(){return this.each((function(){if(this instanceof Et)return this.flatten().ungroup()})),this}ungroup(t=this.parent(),n=t.index(this)){return n=-1===n?t.children().length:n,this.each((function(e,r){return r[r.length-e-1].toParent(t,n)})),this.remove()}}A(Et,"Container");class jt extends Et{constructor(t,n=t){super(x("defs",t),n)}flatten(){return this}ungroup(){return this}}A(jt,"Defs");class At extends bt{}function Ot(t){return this.attr("rx",t)}function Mt(t){return this.attr("ry",t)}function St(t){return null==t?this.cx()-this.rx():this.cx(t+this.rx())}function kt(t){return null==t?this.cy()-this.ry():this.cy(t+this.ry())}function Ct(t){return this.attr("cx",t)}function Tt(t){return this.attr("cy",t)}function It(t){return null==t?2*this.rx():this.rx(new yt(t).divide(2))}function Nt(t){return null==t?2*this.ry():this.ry(new yt(t).divide(2))}A(At,"Shape");const Rt=Object.freeze(Object.defineProperty({__proto__:null,cx:Ct,cy:Tt,height:Nt,rx:Ot,ry:Mt,width:It,x:St,y:kt},Symbol.toStringTag,{value:"Module"}));class zt extends At{constructor(t,n=t){super(x("ellipse",t),n)}size(t,n){const e=a(this,t,n);return this.rx(new yt(e.width).divide(2)).ry(new yt(e.height).divide(2))}}k(zt,Rt),e("Container",{ellipse:C((function(t=0,n=t){return this.put(new zt).size(t,n).move(0,0)}))}),A(zt,"Ellipse");class Pt extends wt{constructor(t=g.document.createDocumentFragment()){super(t)}xml(t,n,e){if("boolean"==typeof t&&(e=n,n=t,t=null),null==t||"function"==typeof t){const t=new wt(w("wrapper",e));return t.add(this.node.cloneNode(!0)),t.xml(!1,e)}return super.xml(t,!1,e)}}function Dt(t,n){return"radialGradient"===(this._element||this).type?this.attr({fx:new yt(t),fy:new yt(n)}):this.attr({x1:new yt(t),y1:new yt(n)})}function Lt(t,n){return"radialGradient"===(this._element||this).type?this.attr({cx:new yt(t),cy:new yt(n)}):this.attr({x2:new yt(t),y2:new yt(n)})}A(Pt,"Fragment");const Ft=Object.freeze(Object.defineProperty({__proto__:null,from:Dt,to:Lt},Symbol.toStringTag,{value:"Module"}));class Bt extends Et{constructor(t,n){super(x(t+"Gradient","string"==typeof t?null:t),n)}attr(t,n,e){return"transform"===t&&(t="gradientTransform"),super.attr(t,n,e)}bbox(){return new K}targets(){return rt("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()+")"}}k(Bt,Ft),e({Container:{gradient(...t){return this.defs().gradient(...t)}},Defs:{gradient:C((function(t,n){return this.put(new Bt(t)).update(n)}))}}),A(Bt,"Gradient");class $t extends Et{constructor(t,n=t){super(x("pattern",t),n)}attr(t,n,e){return"transform"===t&&(t="patternTransform"),super.attr(t,n,e)}bbox(){return new K}targets(){return rt("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()+")"}}e({Container:{pattern(...t){return this.defs().pattern(...t)}},Defs:{pattern:C((function(t,n,e){return this.put(new $t).update(e).attr({x:0,y:0,width:t,height:n,patternUnits:"userSpaceOnUse"})}))}}),A($t,"Pattern");class Vt extends At{constructor(t,n=t){super(x("image",t),n)}load(t,n){if(!t)return this;const e=new g.window.Image;return at(e,"load",(function(t){const r=this.parent($t);0===this.width()&&0===this.height()&&this.size(e.width,e.height),r instanceof $t&&0===r.width()&&0===r.height()&&r.size(this.width(),this.height()),"function"==typeof n&&n.call(this,t)}),this),at(e,"load error",(function(){ct(e)})),this.attr("href",e.src=t,v)}}var Xt;Xt=function(t,n,e){return"fill"!==t&&"stroke"!==t||$.test(n)&&(n=e.root().defs().image(n)),n instanceof Vt&&(n=e.root().defs().pattern(0,0,(t=>{t.add(n)}))),n},mt.push(Xt),e({Container:{image:C((function(t,n){return this.put(new Vt).size(0,0).load(t,n)}))}}),A(Vt,"Image");class Yt extends gt{bbox(){let t=-1/0,n=-1/0,e=1/0,r=1/0;return this.forEach((function(i){t=Math.max(i[0],t),n=Math.max(i[1],n),e=Math.min(i[0],e),r=Math.min(i[1],r)})),new K(e,r,t-e,n-r)}move(t,n){const e=this.bbox();if(t-=e.x,n-=e.y,!isNaN(t)&&!isNaN(n))for(let r=this.length-1;r>=0;r--)this[r]=[this[r][0]+t,this[r][1]+n];return this}parse(t=[0,0]){const n=[];(t=t instanceof Array?Array.prototype.concat.apply([],t):t.trim().split(V).map(parseFloat)).length%2!=0&&t.pop();for(let e=0,r=t.length;e<r;e+=2)n.push([t[e],t[e+1]]);return n}size(t,n){let e;const r=this.bbox();for(e=this.length-1;e>=0;e--)r.width&&(this[e][0]=(this[e][0]-r.x)*t/r.width+r.x),r.height&&(this[e][1]=(this[e][1]-r.y)*n/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 n=0,e=this.length;n<e;n++)t.push(this[n].join(","));return t.join(" ")}transform(t){return this.clone().transformO(t)}transformO(t){H.isMatrixLike(t)||(t=new H(t));for(let n=this.length;n--;){const[e,r]=this[n];this[n][0]=t.a*e+t.c*r+t.e,this[n][1]=t.b*e+t.d*r+t.f}return this}}const Ut=Yt;const qt=Object.freeze(Object.defineProperty({__proto__:null,MorphArray:Ut,height:function(t){const n=this.bbox();return null==t?n.height:this.size(n.width,t)},width:function(t){const n=this.bbox();return null==t?n.width:this.size(t,n.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 Wt extends At{constructor(t,n=t){super(x("line",t),n)}array(){return new Yt([[this.attr("x1"),this.attr("y1")],[this.attr("x2"),this.attr("y2")]])}move(t,n){return this.attr(this.array().move(t,n).toLine())}plot(t,n,e,r){return null==t?this.array():(t=void 0!==n?{x1:t,y1:n,x2:e,y2:r}:new Yt(t).toLine(),this.attr(t))}size(t,n){const e=a(this,t,n);return this.attr(this.array().size(e.width,e.height).toLine())}}k(Wt,qt),e({Container:{line:C((function(...t){return Wt.prototype.plot.apply(this.put(new Wt),null!=t[0]?t:[0,0,0,0])}))}}),A(Wt,"Line");class Gt extends Et{constructor(t,n=t){super(x("marker",t),n)}height(t){return this.attr("markerHeight",t)}orient(t){return this.attr("orient",t)}ref(t,n){return this.attr("refX",t).attr("refY",n)}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 Zt(t,n){return function(e){return null==e?this[t]:(this[t]=e,n&&n.call(this),this)}}e({Container:{marker(...t){return this.defs().marker(...t)}},Defs:{marker:C((function(t,n,e){return this.put(new Gt).size(t,n).ref(t/2,n/2).viewbox(0,0,t,n).attr("orient","auto").update(e)}))},marker:{marker(t,n,e,r){let i=["marker"];return"all"!==t&&i.push(t),i=i.join("-"),t=arguments[1]instanceof Gt?arguments[1]:this.defs().marker(n,e,r),this.attr(i,t)}}}),A(Gt,"Marker");const Ht={"-":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,n,e,r){return function(i){return i<0?t>0?n/t*i:e>0?r/e*i:0:i>1?e<1?(1-r)/(1-e)*i+(r-e)/(1-e):t<1?(1-n)/(1-t)*i+(n-t)/(1-t):1:3*i*(1-i)**2*n+3*i**2*(1-i)*r+i**3}},steps:function(t,n="end"){n=n.split("-").reverse()[0];let e=t;return"none"===n?--e:"both"===n&&++e,(r,i=!1)=>{let o=Math.floor(r*t);const u=r*o%1==0;return"start"!==n&&"both"!==n||++o,i&&u&&--o,r>=0&&o<0&&(o=0),r<=1&&o>e&&(o=e),o/e}}};class Qt{done(){return!1}}class Jt extends Qt{constructor(t=dt){super(),this.ease=Ht[t]||t}step(t,n,e){return"number"!=typeof t?e<1?t:n:t+(n-t)*this.ease(e)}}class Kt extends Qt{constructor(t){super(),this.stepper=t}done(t){return t.done}step(t,n,e,r){return this.stepper(t,n,e,r)}}function tn(){const t=(this._duration||500)/1e3,n=this._overshoot||0,e=Math.PI,r=Math.log(n/100+1e-10),i=-r/Math.sqrt(e*e+r*r),o=3.9/(i*t);this.d=2*i*o,this.k=o*o}k(class extends Kt{constructor(t=500,n=0){super(),this.duration(t).overshoot(n)}step(t,n,e,r){if("string"==typeof t)return t;if(r.done=e===1/0,e===1/0)return n;if(0===e)return t;e>100&&(e=16),e/=1e3;const i=r.velocity||0,o=-this.d*i-this.k*(t-n),u=t+i*e+o*e*e/2;return r.velocity=i+o*e,r.done=Math.abs(n-u)+Math.abs(i)<.002,r.done?n:u}},{duration:Zt("_duration",tn),overshoot:Zt("_overshoot",tn)});k(class extends Kt{constructor(t=.1,n=.01,e=0,r=1e3){super(),this.p(t).i(n).d(e).windup(r)}step(t,n,e,r){if("string"==typeof t)return t;if(r.done=e===1/0,e===1/0)return n;if(0===e)return t;const i=n-t;let o=(r.integral||0)+i*e;const u=(i-(r.error||0))/e,s=this._windup;return!1!==s&&(o=Math.max(-s,Math.min(o,s))),r.error=i,r.integral=o,r.done=Math.abs(i)<.001,r.done?n:t+(this.P*i+this.I*o+this.D*u)}},{windup:Zt("_windup"),p:Zt("P"),i:Zt("I"),d:Zt("D")});const nn={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0},en={M:function(t,n,e){return n.x=e.x=t[0],n.y=e.y=t[1],["M",n.x,n.y]},L:function(t,n){return n.x=t[0],n.y=t[1],["L",t[0],t[1]]},H:function(t,n){return n.x=t[0],["H",t[0]]},V:function(t,n){return n.y=t[0],["V",t[0]]},C:function(t,n){return n.x=t[4],n.y=t[5],["C",t[0],t[1],t[2],t[3],t[4],t[5]]},S:function(t,n){return n.x=t[2],n.y=t[3],["S",t[0],t[1],t[2],t[3]]},Q:function(t,n){return n.x=t[2],n.y=t[3],["Q",t[0],t[1],t[2],t[3]]},T:function(t,n){return n.x=t[0],n.y=t[1],["T",t[0],t[1]]},Z:function(t,n,e){return n.x=e.x,n.y=e.y,["Z"]},A:function(t,n){return n.x=t[5],n.y=t[6],["A",t[0],t[1],t[2],t[3],t[4],t[5],t[6]]}},rn="mlhvqtcsaz".split("");for(let $l=0,Vl=rn.length;$l<Vl;++$l)en[rn[$l]]=function(t){return function(n,e,r){if("H"===t)n[0]=n[0]+e.x;else if("V"===t)n[0]=n[0]+e.y;else if("A"===t)n[5]=n[5]+e.x,n[6]=n[6]+e.y;else for(let t=0,i=n.length;t<i;++t)n[t]=n[t]+(t%2?e.y:e.x);return en[t](n,e,r)}}(rn[$l].toUpperCase());function on(t){return t.segment.length&&t.segment.length-1===nn[t.segment[0].toUpperCase()]}function un(t,n){t.inNumber&&sn(t,!1);const e=X.test(n);if(e)t.segment=[n];else{const n=t.lastCommand,e=n.toLowerCase(),r=n===e;t.segment=["m"===e?r?"l":"L":n]}return t.inSegment=!0,t.lastCommand=t.segment[0],e}function sn(t,n){if(!t.inNumber)throw new Error("Parser Error");t.number&&t.segment.push(parseFloat(t.number)),t.inNumber=n,t.number="",t.pointSeen=!1,t.hasExponent=!1,on(t)&&an(t)}function an(t){t.inSegment=!1,t.absolute&&(t.segment=function(t){const n=t.segment[0];return en[n](t.segment.slice(1),t.p,t.p0)}(t)),t.segments.push(t.segment)}function cn(t){if(!t.segment.length)return!1;const n="A"===t.segment[0].toUpperCase(),e=t.segment.length;return n&&(4===e||5===e)}function hn(t){return"E"===t.lastToken.toUpperCase()}const fn=new Set([" ",",","\t","\n","\r","\f"]);class ln extends gt{bbox(){return Q().path.setAttribute("d",this.toString()),new K(Q.nodes.path.getBBox())}move(t,n){const e=this.bbox();if(t-=e.x,n-=e.y,!isNaN(t)&&!isNaN(n))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]+=n):"H"===r?this[i][1]+=t:"V"===r?this[i][1]+=n:"C"===r||"S"===r||"Q"===r?(this[i][1]+=t,this[i][2]+=n,this[i][3]+=t,this[i][4]+=n,"C"===r&&(this[i][5]+=t,this[i][6]+=n)):"A"===r&&(this[i][6]+=t,this[i][7]+=n);return this}parse(t="M0 0"){return Array.isArray(t)&&(t=Array.prototype.concat.apply([],t).toString()),function(t,n=!0){let e=0,r="";const i={segment:[],inNumber:!1,number:"",lastToken:"",inSegment:!1,segments:[],pointSeen:!1,hasExponent:!1,absolute:n,p0:new G,p:new G};for(;i.lastToken=r,r=t.charAt(e++);)if(i.inSegment||!un(i,r))if("."!==r)if(isNaN(parseInt(r)))if(fn.has(r))i.inNumber&&sn(i,!1);else if("-"!==r&&"+"!==r)if("E"!==r.toUpperCase()){if(X.test(r)){if(i.inNumber)sn(i,!1);else{if(!on(i))throw new Error("parser Error");an(i)}--e}}else i.number+=r,i.hasExponent=!0;else{if(i.inNumber&&!hn(i)){sn(i,!1),--e;continue}i.number+=r,i.inNumber=!0}else{if("0"===i.number||cn(i)){i.inNumber=!0,i.number=r,sn(i,!0);continue}i.inNumber=!0,i.number+=r}else{if(i.pointSeen||i.hasExponent){sn(i,!1),--e;continue}i.inNumber=!0,i.pointSeen=!0,i.number+=r}return i.inNumber&&sn(i,!1),i.inSegment&&on(i)&&an(i),i.segments}(t)}size(t,n){const e=this.bbox();let r,i;for(e.width=0===e.width?1:e.width,e.height=0===e.height?1:e.height,r=this.length-1;r>=0;r--)i=this[r][0],"M"===i||"L"===i||"T"===i?(this[r][1]=(this[r][1]-e.x)*t/e.width+e.x,this[r][2]=(this[r][2]-e.y)*n/e.height+e.y):"H"===i?this[r][1]=(this[r][1]-e.x)*t/e.width+e.x:"V"===i?this[r][1]=(this[r][1]-e.y)*n/e.height+e.y:"C"===i||"S"===i||"Q"===i?(this[r][1]=(this[r][1]-e.x)*t/e.width+e.x,this[r][2]=(this[r][2]-e.y)*n/e.height+e.y,this[r][3]=(this[r][3]-e.x)*t/e.width+e.x,this[r][4]=(this[r][4]-e.y)*n/e.height+e.y,"C"===i&&(this[r][5]=(this[r][5]-e.x)*t/e.width+e.x,this[r][6]=(this[r][6]-e.y)*n/e.height+e.y)):"A"===i&&(this[r][1]=this[r][1]*t/e.width,this[r][2]=this[r][2]*n/e.height,this[r][6]=(this[r][6]-e.x)*t/e.width+e.x,this[r][7]=(this[r][7]-e.y)*n/e.height+e.y);return this}toString(){return function(t){let n="";for(let e=0,r=t.length;e<r;e++)n+=t[e][0],null!=t[e][1]&&(n+=t[e][1],null!=t[e][2]&&(n+=" ",n+=t[e][2],null!=t[e][3]&&(n+=" ",n+=t[e][3],n+=" ",n+=t[e][4],null!=t[e][5]&&(n+=" ",n+=t[e][5],n+=" ",n+=t[e][6],null!=t[e][7]&&(n+=" ",n+=t[e][7])))));return n+" "}(this)}}const dn=t=>{const n=typeof t;return"number"===n?yt:"string"===n?W.isColor(t)?W:V.test(t)?X.test(t)?ln:gt:T.test(t)?yt:vn:mn.indexOf(t.constructor)>-1?t.constructor:Array.isArray(t)?gt:"object"===n?_n:vn};class pn{constructor(t){this._stepper=t||new Jt("-"),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,n){return t&&n}),!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(dn(t));let n=new this._type(t);return this._type===W&&(n=this._to?n[this._to[4]]():this._from?n[this._from[4]]():n),this._type===_n&&(n=this._to?n.align(this._to):this._from?n.align(this._from):n),n=n.toConsumable(),this._morphObj=this._morphObj||new this._type,this._context=this._context||Array.apply(null,Array(n.length)).map(Object).map((function(t){return t.done=!0,t})),n}}class vn{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 gn{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,gn.defaults,t),this}toArray(){const t=this;return[t.scaleX,t.scaleY,t.shear,t.rotate,t.translateX,t.translateY,t.originX,t.originY]}}gn.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0};const yn=(t,n)=>t[0]<n[0]?-1:t[0]>n[0]?1:0;class _n{constructor(...t){this.init(...t)}align(t){const n=this.values;for(let e=0,r=n.length;e<r;++e){if(n[e+1]===t[e+1]){if(n[e+1]===W&&t[e+7]!==n[e+7]){const n=t[e+7],r=new W(this.values.splice(e+3,5))[n]().toArray();this.values.splice(e+3,0,...r)}e+=n[e+2]+2;continue}if(!t[e+1])return this;const r=(new t[e+1]).toArray(),i=n[e+2]+3;n.splice(e,i,t[e],t[e+1],t[e+2],...r),e+=n[e+2]+2}return this}init(t){if(this.values=[],Array.isArray(t))return void(this.values=t.slice());t=t||{};const n=[];for(const e in t){const r=dn(t[e]),i=new r(t[e]).toArray();n.push([e,r,i.length,...i])}return n.sort(yn),this.values=n.reduce(((t,n)=>t.concat(n)),[]),this}toArray(){return this.values}valueOf(){const t={},n=this.values;for(;n.length;){const e=n.shift(),r=n.shift(),i=n.shift(),o=n.splice(0,i);t[e]=new r(o)}return t}}const mn=[vn,gn,_n];class wn extends At{constructor(t,n=t){super(x("path",t),n)}array(){return this._array||(this._array=new ln(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,n){return this.attr("d",this.array().move(t,n))}plot(t){return null==t?this.array():this.clear().attr("d","string"==typeof t?t:this._array=new ln(t))}size(t,n){const e=a(this,t,n);return this.attr("d",this.array().size(e.width,e.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)}}wn.prototype.MorphArray=ln,e({Container:{path:C((function(t){return this.put(new wn).plot(t||new ln)}))}}),A(wn,"Path");const bn=Object.freeze(Object.defineProperty({__proto__:null,array:function(){return this._array||(this._array=new Yt(this.attr("points")))},clear:function(){return delete this._array,this},move:function(t,n){return this.attr("points",this.array().move(t,n))},plot:function(t){return null==t?this.array():this.clear().attr("points","string"==typeof t?t:this._array=new Yt(t))},size:function(t,n){const e=a(this,t,n);return this.attr("points",this.array().size(e.width,e.height))}},Symbol.toStringTag,{value:"Module"}));class xn extends At{constructor(t,n=t){super(x("polygon",t),n)}}e({Container:{polygon:C((function(t){return this.put(new xn).plot(t||new Yt)}))}}),k(xn,qt),k(xn,bn),A(xn,"Polygon");class En extends At{constructor(t,n=t){super(x("polyline",t),n)}}e({Container:{polyline:C((function(t){return this.put(new En).plot(t||new Yt)}))}}),k(En,qt),k(En,bn),A(En,"Polyline");class jn extends At{constructor(t,n=t){super(x("rect",t),n)}}k(jn,{rx:Ot,ry:Mt}),e({Container:{rect:C((function(t,n){return this.put(new jn).size(t,n)}))}}),A(jn,"Rect");class An{constructor(){this._first=null,this._last=null}first(){return this._first&&this._first.value}last(){return this._last&&this._last.value}push(t){const n=void 0!==t.next?t:{value:t,next:null,prev:null};return this._last?(n.prev=this._last,this._last.next=n,this._last=n):(this._last=n,this._first=n),n}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 On={nextDraw:null,frames:new An,timeouts:new An,immediates:new An,timer:()=>g.window.performance||g.window.Date,transforms:[],frame(t){const n=On.frames.push({run:t});return null===On.nextDraw&&(On.nextDraw=g.window.requestAnimationFrame(On._draw)),n},timeout(t,n){n=n||0;const e=On.timer().now()+n,r=On.timeouts.push({run:t,time:e});return null===On.nextDraw&&(On.nextDraw=g.window.requestAnimationFrame(On._draw)),r},immediate(t){const n=On.immediates.push(t);return null===On.nextDraw&&(On.nextDraw=g.window.requestAnimationFrame(On._draw)),n},cancelFrame(t){null!=t&&On.frames.remove(t)},clearTimeout(t){null!=t&&On.timeouts.remove(t)},cancelImmediate(t){null!=t&&On.immediates.remove(t)},_draw(t){let n=null;const e=On.timeouts.last();for(;(n=On.timeouts.shift())&&(t>=n.time?n.run():On.timeouts.push(n),n!==e););let r=null;const i=On.frames.last();for(;r!==i&&(r=On.frames.shift());)r.run(t);let o=null;for(;o=On.immediates.shift();)o();On.nextDraw=On.timeouts.first()||On.frames.first()?g.window.requestAnimationFrame(On._draw):null}},Mn=function(t){const n=t.start,e=t.runner.duration();return{start:n,duration:e,end:n+e,runner:t.runner}},Sn=function(){const t=g.window;return(t.performance||t.Date).now()};class kn extends ht{constructor(t=Sn){super(),this._timeSource=t,this.terminate()}active(){return!!this._nextFrame}finish(){return this.time(this.getEndTimeOfTimeline()+1),this.pause()}getEndTime(){const t=this.getLastRunnerInfo(),n=t?t.runner.duration():0;return(t?t.start:this._time)+n}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 n=this.speed();if(null==t)return this.speed(-n);const e=Math.abs(n);return this.speed(t?-e:e)}schedule(t,n,e){if(null==t)return this._runners.map(Mn);let r=0;const i=this.getEndTime();if(n=n||0,null==e||"last"===e||"after"===e)r=i;else if("absolute"===e||"start"===e)r=n,n=0;else if("now"===e)r=this._time;else if("relative"===e){const e=this.getRunnerInfoById(t.id);e&&(r=e.start+n,n=0)}else{if("with-last"!==e)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 o=t.persist(),u={persist:null===o?this._persist:o,start:r+n,runner:t};return this._lastRunnerId=t.id,this._runners.push(u),this._runners.sort(((t,n)=>t.start-n.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 n=this._runnerIds.indexOf(t.id);return n<0||(this._runners.splice(n,1),this._runnerIds.splice(n,1),t.timeline(null)),this}updateTime(){return this.active()||(this._lastSourceTime=this._timeSource()),this}_continue(t=!1){return On.cancelFrame(this._nextFrame),this._nextFrame=null,t?this._stepImmediate():(this._paused||(this._nextFrame=On.frame(this._step)),this)}_stepFn(t=!1){const n=this._timeSource();let e=n-this._lastSourceTime;t&&(e=0);const r=this._speed*e+(this._time-this._lastStepTime);this._lastSourceTime=n,t||(this._time+=r,this._time=this._time<0?0:this._time),this._lastStepTime=this._time,this.fire("time",this._time);for(let o=this._runners.length;o--;){const t=this._runners[o],n=t.runner;this._time-t.start<=0&&n.reset()}let i=!1;for(let o=0,u=this._runners.length;o<u;o++){const t=this._runners[o],n=t.runner;let e=r;const s=this._time-t.start;if(s<=0){i=!0;continue}if(s<e&&(e=s),!n.active())continue;if(n.step(e).done){if(!0!==t.persist){n.duration()-n.time()+this._time+t.persist<this._time&&(n.unschedule(),--o,--u)}}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)}}e({Element:{timeline:function(t){return null==t?(this._timeline=this._timeline||new kn,this._timeline):(this._timeline=t,this)}}});class Cn extends ht{constructor(t){super(),this.id=Cn.id++,t="function"==typeof(t=null==t?lt:t)?new Kt(t):t,this._element=null,this._timeline=null,this.done=!1,this._queue=[],this._duration="number"==typeof t&&t,this._isDeclarative=t instanceof Kt,this._stepper=this._isDeclarative?t:new Jt,this._history={},this.enabled=!0,this._time=0,this._lastTime=0,this._reseted=!0,this.transforms=new H,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,n,e){let r=1,i=!1,o=0;return n=n??pt,e=e||"last","object"!=typeof(t=t??lt)||t instanceof Qt||(n=t.delay??n,e=t.when??e,i=t.swing||i,r=t.times??r,o=t.wait??o,t=t.duration??lt),{duration:t,delay:n,swing:i,times:r,wait:o,when:e}}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,n,e){const r=Cn.sanitise(t,n,e),i=new Cn(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 H,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 Jt(t),this}element(t){return null==t?this._element:(this._element=t,t._prepareRunner(),this)}finish(){return this.step(1/0)}loop(t,n,e){return"object"==typeof t&&(n=t.swing,e=t.wait,t=t.times),this._times=t||1/0,this._swing=n||!1,this._wait=e||0,!0===this._times&&(this._times=1/0),this}loops(t){const n=this._duration+this._wait;if(null==t){const t=Math.floor(this._time/n),e=(this._time-t*n)/this._duration;return Math.min(t+e,this._times)}const e=t%1,r=n*Math.floor(t)+this._duration*e;return this.time(r)}persist(t){return null==t?this._persist:(this._persist=t,this)}position(t){const n=this._time,e=this._duration,r=this._wait,i=this._times,o=this._swing,u=this._reverse;let s;if(null==t){const t=function(t){const n=o*Math.floor(t%(2*(r+e))/(r+e)),i=n&&!u||!n&&u,s=Math.pow(-1,i)*(t%(r+e))/e+i;return Math.max(Math.min(s,1),0)},a=i*(r+e)-r;return s=n<=0?Math.round(t(1e-5)):n<a?t(n):Math.round(t(a-1e-5)),s}const a=Math.floor(this.loops()),c=o&&a%2==0;return s=a+(c&&!u||u&&c?t:1-t),this.loops(s)}progress(t){return null==t?Math.min(1,this._time/this.duration()):this.time(t*this.duration())}queue(t,n,e,r){this._queue.push({initialiser:t||ft,runner:n||ft,retarget:e,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,n,e){if(t instanceof kn||(e=n,n=t,t=this.timeline()),!t)throw Error("Runner cannot be scheduled without timeline");return t.schedule(this,n,e),this}step(t){if(!this.enabled)return this;t=null==t?16:t,this._time+=t;const n=this.position(),e=this._lastPosition!==n&&this._time>=0;this._lastPosition=n;const r=this.duration(),i=this._lastTime<=0&&this._time>0,o=this._lastTime<r&&this._time>=r;this._lastTime=this._time,i&&this.fire("start",this);const u=this._isDeclarative;this.done=!u&&!o&&this._time>=r,this._reseted=!1;let s=!1;return(e||u)&&(this._initialise(e),this.transforms=new H,s=this._run(u?t:n),this.fire("step",this)),this.done=this.done||s&&u,o&&this.fire("finished",this),this}time(t){if(null==t)return this._time;const n=t-this._time;return this.step(n),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 n=0,e=this._queue.length;n<e;++n){const e=this._queue[n],r=this._isDeclarative||!e.initialised&&t;t=!e.finished,r&&t&&(e.initialiser.call(this),e.initialised=!0)}}_rememberMorpher(t,n){if(this._history[t]={morpher:n,caller:this._queue[this._queue.length-1]},this._isDeclarative){const t=this.timeline();t&&t.play()}}_run(t){let n=!0;for(let e=0,r=this._queue.length;e<r;++e){const r=this._queue[e],i=r.runner.call(this,t);r.finished=r.finished||!0===i,n=n&&r.finished}return n}_tryRetarget(t,n,e){if(this._history[t]){if(!this._history[t].caller.initialised){const n=this._queue.indexOf(this._history[t].caller);return this._queue.splice(n,1),!1}this._history[t].caller.retarget?this._history[t].caller.retarget.call(this,n,e):this._history[t].morpher.to(n),this._history[t].caller.finished=!1;const r=this.timeline();return r&&r.play(),!0}return!1}}Cn.id=0;class Tn{constructor(t=new H,n=-1,e=!0){this.transforms=t,this.id=n,this.done=e}clearTransformsFromQueue(){}}k([Cn,Tn],{mergeWith(t){return new Tn(t.transforms.lmultiply(this.transforms),t.id)}});const In=(t,n)=>t.lmultiplyO(n),Nn=t=>t.transforms;function Rn(){const t=this._transformationRunners.runners.map(Nn).reduce(In,new H);this.transform(t),this._transformationRunners.merge(),1===this._transformationRunners.length()&&(this._frameId=null)}class zn{constructor(){this.runners=[],this.ids=[]}add(t){if(this.runners.includes(t))return;const n=t.id+1;return this.runners.push(t),this.ids.push(n),this}clearBefore(t){const n=this.ids.indexOf(t+1)||1;return this.ids.splice(0,n,0),this.runners.splice(0,n,new Tn).forEach((t=>t.clearTransformsFromQueue())),this}edit(t,n){const e=this.ids.indexOf(t+1);return this.ids.splice(e,1,t+1),this.runners.splice(e,1,n),this}getByID(t){return this.runners[this.ids.indexOf(t+1)]}length(){return this.ids.length}merge(){let t=null;for(let n=0;n<this.runners.length;++n){const e=this.runners[n];if(t&&e.done&&t.done&&(!e._timeline||!e._timeline._runnerIds.includes(e.id))&&(!t._timeline||!t._timeline._runnerIds.includes(t.id))){this.remove(e.id);const r=e.mergeWith(t);this.edit(t.id,r),t=r,--n}else t=e}return this}remove(t){const n=this.ids.indexOf(t+1);return this.ids.splice(n,1),this.runners.splice(n,1),this}}e({Element:{animate(t,n,e){const r=Cn.sanitise(t,n,e),i=this.timeline();return new Cn(r.duration).loop(r).element(this).timeline(i.play()).schedule(r.delay,r.when)},delay(t,n){return this.animate(0,t,n)},_clearTransformRunnersBefore(t){this._transformationRunners.clearBefore(t.id)},_currentTransform(t){return this._transformationRunners.runners.filter((n=>n.id<=t.id)).map(Nn).reduce(In,new H)},_addRunner(t){this._transformationRunners.add(t),On.cancelImmediate(this._frameId),this._frameId=On.immediate(Rn.bind(this))},_prepareRunner(){null==this._frameId&&(this._transformationRunners=(new zn).add(new Tn(new H(this))))}}});k(Cn,{attr(t,n){return this.styleAttr("attr",t,n)},css(t,n){return this.styleAttr("css",t,n)},styleAttr(t,n,e){if("string"==typeof n)return this.styleAttr(t,{[n]:e});let r=n;if(this._tryRetarget(t,r))return this;let i=new pn(this._stepper).to(r),o=Object.keys(r);return this.queue((function(){i=i.from(this.element()[t](o))}),(function(n){return this.element()[t](i.at(n).valueOf()),i.done()}),(function(n){const e=Object.keys(n),u=(s=o,e.filter((t=>!s.includes(t))));var s;if(u.length){const n=this.element()[t](u),e=new _n(i.from()).valueOf();Object.assign(e,n),i.from(e)}const a=new _n(i.to()).valueOf();Object.assign(a,n),i.to(a),o=e,r=n})),this._rememberMorpher(t,i),this},zoom(t,n){if(this._tryRetarget("zoom",t,n))return this;let e=new pn(this._stepper).to(new yt(t));return this.queue((function(){e=e.from(this.element().zoom())}),(function(t){return this.element().zoom(e.at(t),n),e.done()}),(function(t,r){n=r,e.to(t)})),this._rememberMorpher("zoom",e),this},transform(t,n,e){if(n=t.relative||n,this._isDeclarative&&!n&&this._tryRetarget("transform",t))return this;const r=H.isMatrixLike(t);e=null!=t.affine?t.affine:null!=e?e:!r;const i=new pn(this._stepper).type(e?gn:H);let o,u,s,a,h;return this.queue((function(){u=u||this.element(),o=o||c(t,u),h=new H(n?void 0:u),u._addRunner(this),n||u._clearTransformRunnersBefore(this)}),(function(c){n||this.clearTransform();const{x:f,y:l}=new G(o).transform(u._currentTransform(this));let d=new H({...t,origin:[f,l]}),p=this._isDeclarative&&s?s:h;if(e){d=d.decompose(f,l),p=p.decompose(f,l);const t=d.rotate,n=p.rotate,e=[t-360,t,t+360],r=e.map((t=>Math.abs(t-n))),i=Math.min(...r),o=r.indexOf(i);d.rotate=e[o]}n&&(r||(d.rotate=t.rotate||0),this._isDeclarative&&a&&(p.rotate=a)),i.from(p),i.to(d);const v=i.at(c);return a=v.rotate,s=new H(v),this.addTransform(s),u._addRunner(this),i.done()}),(function(n){(n.origin||"center").toString()!==(t.origin||"center").toString()&&(o=c(n,u)),t={...n,origin:o}}),!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,n){return this.dx(t).dy(n)},_queueNumberDelta(t,n){if(n=new yt(n),this._tryRetarget(t,n))return this;const e=new pn(this._stepper).to(n);let r=null;return this.queue((function(){r=this.element()[t](),e.from(r),e.to(r+n)}),(function(n){return this.element()[t](e.at(n)),e.done()}),(function(t){e.to(r+new yt(t))})),this._rememberMorpher(t,e),this},_queueObject(t,n){if(this._tryRetarget(t,n))return this;const e=new pn(this._stepper).to(n);return this.queue((function(){e.from(this.element()[t]())}),(function(n){return this.element()[t](e.at(n)),e.done()})),this._rememberMorpher(t,e),this},_queueNumber(t,n){return this._queueObject(t,new yt(n))},cx(t){return this._queueNumber("cx",t)},cy(t){return this._queueNumber("cy",t)},move(t,n){return this.x(t).y(n)},amove(t,n){return this.ax(t).ay(n)},center(t,n){return this.cx(t).cy(n)},size(t,n){let e;return t&&n||(e=this._element.bbox()),t||(t=e.width/e.height*n),n||(n=e.height/e.width*t),this.width(t).height(n)},width(t){return this._queueNumber("width",t)},height(t){return this._queueNumber("height",t)},plot(t,n,e,r){if(4===arguments.length)return this.plot([t,n,e,r]);if(this._tryRetarget("plot",t))return this;const i=new pn(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,n,e,r){return this._queueObject("viewbox",new K(t,n,e,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)}}),k(Cn,{rx:Ot,ry:Mt,from:Dt,to:Lt}),A(Cn,"Runner");class Pn extends Et{constructor(t,n=t){super(x("svg",t),n),this.namespace()}defs(){return this.isRoot()?E(this.node.querySelector("defs"))||this.put(new jt):this.root().defs()}isRoot(){return!this.node.parentNode||!(this.node.parentNode instanceof g.window.SVGElement)&&"#document-fragment"!==this.node.parentNode.nodeName}namespace(){return this.isRoot()?this.attr({xmlns:d,version:"1.1"}).attr("xmlns:xlink",v,p):this.root().namespace()}removeNamespace(){return this.attr({xmlns:null,version:null}).attr("xmlns:xlink",null,p).attr("xmlns:svgjs",null,p)}root(){return this.isRoot()?this:super.root()}}e({Container:{nested:C((function(){return this.put(new Pn)}))}}),A(Pn,"Svg",!0);let Dn=class extends Et{constructor(t,n=t){super(x("symbol",t),n)}};e({Container:{symbol:C((function(){return this.put(new Dn)}))}}),A(Dn,"Symbol");const Ln=Object.freeze(Object.defineProperty({__proto__:null,amove:function(t,n){return this.ax(t).ay(n)},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,n,e=this.bbox()){return this.cx(t,e).cy(n,e)},cx:function(t,n=this.bbox()){return null==t?n.cx:this.attr("x",this.attr("x")+t-n.cx)},cy:function(t,n=this.bbox()){return null==t?n.cy:this.attr("y",this.attr("y")+t-n.cy)},length:function(){return this.node.getComputedTextLength()},move:function(t,n,e=this.bbox()){return this.x(t,e).y(n,e)},plain:function(t){return!1===this._build&&this.clear(),this.node.appendChild(g.document.createTextNode(t)),this},x:function(t,n=this.bbox()){return null==t?n.x:this.attr("x",this.attr("x")+t-n.x)},y:function(t,n=this.bbox()){return null==t?n.y:this.attr("y",this.attr("y")+t-n.y)}},Symbol.toStringTag,{value:"Module"}));class Fn extends At{constructor(t,n=t){super(x("text",t),n),this.dom.leading=this.dom.leading??new yt(1.3),this._rebuild=!0,this._build=!1}leading(t){return null==t?this.dom.leading:(this.dom.leading=new yt(t),this.rebuild())}rebuild(t){if("boolean"==typeof t&&(this._rebuild=t),this._rebuild){const t=this;let n=0;const e=this.dom.leading;this.each((function(r){if(f(this.node))return;const i=g.window.getComputedStyle(this.node).getPropertyValue("font-size"),o=e*new yt(i);this.dom.newLined&&(this.attr("x",t.attr("x")),"\n"===this.text()?n+=o:(this.attr("dy",r?o+n:0),n=0))})),this.fire("rebuild")}return this}setData(t){return this.dom=t,this.dom.leading=new yt(t.leading||1.3),this}writeDataToDom(){return l(this,this.dom,{leading:1.3}),this}text(t){if(void 0===t){const n=this.node.childNodes;let e=0;t="";for(let r=0,i=n.length;r<i;++r)"textPath"===n[r].nodeName||f(n[r])?0===r&&(e=r+1):(r!==e&&3!==n[r].nodeType&&!0===E(n[r]).dom.newLined&&(t+="\n"),t+=n[r].textContent);return t}if(this.clear().build(!0),"function"==typeof t)t.call(this,this);else for(let n=0,e=(t=(t+"").split("\n")).length;n<e;n++)this.newLine(t[n]);return this.build(!1).rebuild()}}k(Fn,Ln),e({Container:{text:C((function(t=""){return this.put(new Fn).text(t)})),plain:C((function(t=""){return this.put(new Fn).plain(t)}))}}),A(Fn,"Text");class Bn extends At{constructor(t,n=t){super(x("tspan",t),n),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 Fn))return this;const n=t.index(this),e=g.window.getComputedStyle(this.node).getPropertyValue("font-size"),r=t.dom.leading*new yt(e);return this.dy(n?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)}}k(Bn,Ln),e({Tspan:{tspan:C((function(t=""){const n=new Bn;return this._build||this.clear(),this.put(n).text(t)}))},Text:{newLine:function(t=""){return this.tspan(t).newLine()}}}),A(Bn,"Tspan");class $n extends At{constructor(t,n=t){super(x("circle",t),n)}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 yt(t).divide(2))}}k($n,{x:St,y:kt,cx:Ct,cy:Tt,width:It,height:Nt}),e({Container:{circle:C((function(t=0){return this.put(new $n).size(t).move(0,0)}))}}),A($n,"Circle");class Vn extends Et{constructor(t,n=t){super(x("clipPath",t),n)}remove(){return this.targets().forEach((function(t){t.unclip()})),super.remove()}targets(){return rt("svg [clip-path*="+this.id()+"]")}}e({Container:{clip:C((function(){return this.defs().put(new Vn)}))},Element:{clipper(){return this.reference("clip-path")},clipWith(t){const n=t instanceof Vn?t:this.parent().clip().add(t);return this.attr("clip-path","url(#"+n.id()+")")},unclip(){return this.attr("clip-path",null)}}}),A(Vn,"ClipPath");class Xn extends bt{constructor(t,n=t){super(x("foreignObject",t),n)}}e({Container:{foreignObject:C((function(t,n){return this.put(new Xn).size(t,n)}))}}),A(Xn,"ForeignObject");const Yn=Object.freeze(Object.defineProperty({__proto__:null,dmove:function(t,n){return this.children().forEach((e=>{let r;try{r=e.node instanceof g.window.SVGSVGElement?new K(e.attr(["x","y","width","height"])):e.bbox()}catch(s){return}const i=new H(e),o=i.translate(t,n).transform(i.inverse()),u=new G(r.x,r.y).transform(o);e.move(u.x,u.y)})),this},dx:function(t){return this.dmove(t,0)},dy:function(t){return this.dmove(0,t)},height:function(t,n=this.bbox()){return null==t?n.height:this.size(n.width,t,n)},move:function(t=0,n=0,e=this.bbox()){const r=t-e.x,i=n-e.y;return this.dmove(r,i)},size:function(t,n,e=this.bbox()){const r=a(this,t,n,e),i=r.width/e.width,o=r.height/e.height;return this.children().forEach((t=>{const n=new G(e).transform(new H(t).inverse());t.scale(i,o,n.x,n.y)})),this},width:function(t,n=this.bbox()){return null==t?n.width:this.size(t,n.height,n)},x:function(t,n=this.bbox()){return null==t?n.x:this.move(t,n.y,n)},y:function(t,n=this.bbox()){return null==t?n.y:this.move(n.x,t,n)}},Symbol.toStringTag,{value:"Module"}));class Un extends Et{constructor(t,n=t){super(x("g",t),n)}}k(Un,Yn),e({Container:{group:C((function(){return this.put(new Un)}))}}),A(Un,"G");class qn extends Et{constructor(t,n=t){super(x("a",t),n)}target(t){return this.attr("target",t)}to(t){return this.attr("href",t,v)}}k(qn,Yn),e({Container:{link:C((function(t){return this.put(new qn).to(t)}))},Element:{unlink(){const t=this.linker();if(!t)return this;const n=t.parent();if(!n)return this.remove();const e=n.index(t);return n.add(this,e),t.remove(),this},linkTo(t){let n=this.linker();return n||(n=new qn,this.wrap(n)),"function"==typeof t?t.call(n,n):n.to(t),this},linker(){const t=this.parent();return t&&"a"===t.node.nodeName.toLowerCase()?t:null}}}),A(qn,"A");class Wn extends Et{constructor(t,n=t){super(x("mask",t),n)}remove(){return this.targets().forEach((function(t){t.unmask()})),super.remove()}targets(){return rt("svg [mask*="+this.id()+"]")}}e({Container:{mask:C((function(){return this.defs().put(new Wn)}))},Element:{masker(){return this.reference("mask")},maskWith(t){const n=t instanceof Wn?t:this.parent().mask().add(t);return this.attr("mask","url(#"+n.id()+")")},unmask(){return this.attr("mask",null)}}}),A(Wn,"Mask");class Gn extends bt{constructor(t,n=t){super(x("stop",t),n)}update(t){return("number"==typeof t||t instanceof yt)&&(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 yt(t.offset)),this}}e({Gradient:{stop:function(t,n,e){return this.put(new Gn).update(t,n,e)}}}),A(Gn,"Stop");class Zn extends bt{constructor(t,n=t){super(x("style",t),n)}addText(t=""){return this.node.textContent+=t,this}font(t,n,e={}){return this.rule("@font-face",{fontFamily:t,src:n,...e})}rule(t,n){return this.addText(function(t,n){if(!t)return"";if(!n)return t;let e=t+"{";for(const r in n)e+=r.replace(/([A-Z])/g,(function(t,n){return"-"+n.toLowerCase()}))+":"+n[r]+";";return e+="}",e}(t,n))}}e("Dom",{style(t,n){return this.put(new Zn).rule(t,n)},fontface(t,n,e){return this.put(new Zn).font(t,n,e)}}),A(Zn,"Style");class Hn extends Fn{constructor(t,n=t){super(x("textPath",t),n)}array(){const t=this.track();return t?t.array():null}plot(t){const n=this.track();let e=null;return n&&(e=n.plot(t)),null==t?e:this}track(){return this.reference("href")}}e({Container:{textPath:C((function(t,n){return t instanceof Fn||(t=this.text(t)),t.path(n)}))},Text:{path:C((function(t,n=!0){const e=new Hn;let r;if(t instanceof wn||(t=this.defs().path(t)),e.attr("href","#"+t,v),n)for(;r=this.node.firstChild;)e.node.appendChild(r);return this.put(e)})),textPath(){return this.findOne("textPath")}},Path:{text:C((function(t){return t instanceof Fn||(t=(new Fn).addTo(this.parent()).text(t)),t.path(this)})),targets(){return rt("svg textPath").filter((t=>(t.attr("href")||"").includes(this.id())))}}}),Hn.prototype.MorphArray=ln,A(Hn,"TextPath");class Qn extends At{constructor(t,n=t){super(x("use",t),n)}use(t,n){return this.attr("href",(n||"")+"#"+t,v)}}e({Container:{use:C((function(t,n){return this.put(new Qn).use(t,n)}))}}),A(Qn,"Use");const Jn=b;k([Pn,Dn,Vt,$t,Gt],r("viewbox")),k([Wt,En,xn,wn],r("marker")),k(Fn,r("Text")),k(wn,r("Path")),k(jt,r("Defs")),k([Fn,Bn],r("Tspan")),k([jn,zt,Bt,Cn],r("radius")),k(ht,r("EventTarget")),k(wt,r("Dom")),k(bt,r("Element")),k(At,r("Shape")),k([Et,Pt],r("Container")),k(Bt,r("Gradient")),k(Cn,r("Runner")),nt.extend([...new Set(n)]),function(t=[]){mn.push(...[].concat(t))}([yt,W,K,H,gt,Yt,ln,G]),k(mn,{to(t){return(new pn).type(this.constructor).from(this.toArray()).to(t)},fromArray(t){return this.init(t),this},toConsumable(){return this.toArray()},morph(t,n,e,r,i){return this.fromArray(t.map((function(t,o){return r.step(t,n[o],e,i[o],i)})))}});var Kn=function(t){return t.touches||[{clientX:t.clientX,clientY:t.clientY}]};k(Pn,{panZoom:function(t){var n,e,r,i,o,u,s,a,c,h,f,l,d=this;if(this.off(".panZoom"),!1===t)return this;var p,v,g=null!=(e=(t=null!=(n=t)?n:{}).zoomFactor)?e:2,y=null!=(r=t.zoomMin)?r:Number.MIN_VALUE,_=null!=(i=t.zoomMax)?i:Number.MAX_VALUE,m=null==(o=t.wheelZoom)||o,w=null==(u=t.pinchZoom)||u,b=null==(s=t.panning)||s,x=null!=(a=t.panButton)?a:0,E=null!=(c=t.oneFingerPan)&&c,j=null!=(h=t.margins)&&h,A=null!=(f=t.wheelZoomDeltaModeLinePixels)?f:17,O=null!=(l=t.wheelZoomDeltaModeScreenPixels)?l:53,M=!1,S=this.viewbox(),k=function(t){if(!j)return t;var n=j.top,e=j.left,r=j.bottom,i=j.right,o=d.attr(["width","height"]),u=o.width,s=o.height,a=d.node.preserveAspectRatio.baseVal,c=0,h=0,f=0,l=0;if(a.align!==a.SVG_PRESERVEASPECTRATIO_NONE){var p=u/s,v=S.width/S.height;if(v!==p){var g=a.meetOrSlice!==a.SVG_MEETORSLICE_SLICE,y=p>v?"width":"height",_="width"===y,m=g&&_||!g&&!_,w=m?p/v:v/p,b=t[y]-t[y]*w;m?a.align===a.SVG_PRESERVEASPECTRATIO_XMIDYMIN||a.align===a.SVG_PRESERVEASPECTRATIO_XMIDYMID||a.align===a.SVG_PRESERVEASPECTRATIO_XMIDYMAX?(c=b/2,h=-b/2):a.align===a.SVG_PRESERVEASPECTRATIO_XMINYMIN||a.align===a.SVG_PRESERVEASPECTRATIO_XMINYMID||a.align===a.SVG_PRESERVEASPECTRATIO_XMINYMAX?h=-b:a.align!==a.SVG_PRESERVEASPECTRATIO_XMAXYMIN&&a.align!==a.SVG_PRESERVEASPECTRATIO_XMAXYMID&&a.align!==a.SVG_PRESERVEASPECTRATIO_XMAXYMAX||(c=b):a.align===a.SVG_PRESERVEASPECTRATIO_XMINYMID||a.align===a.SVG_PRESERVEASPECTRATIO_XMIDYMID||a.align===a.SVG_PRESERVEASPECTRATIO_XMAXYMID?(f=b/2,l=-b/2):a.align===a.SVG_PRESERVEASPECTRATIO_XMINYMIN||a.align===a.SVG_PRESERVEASPECTRATIO_XMIDYMIN||a.align===a.SVG_PRESERVEASPECTRATIO_XMAXYMIN?l=-b:a.align!==a.SVG_PRESERVEASPECTRATIO_XMINYMAX&&a.align!==a.SVG_PRESERVEASPECTRATIO_XMIDYMAX&&a.align!==a.SVG_PRESERVEASPECTRATIO_XMAXYMAX||(f=b)}}var x=S.width+S.x-e-c,E=S.x+i-t.width-h,A=S.height+S.y-n-f,O=S.y+r-t.height-l;return t.x=Math.min(x,Math.max(E,t.x)),t.y=Math.min(A,Math.max(O,t.y)),t},C=function t(n){(v=Kn(n)).length<2?b&&E&&N.call(this,n):(b&&E&&R.call(this,n),n.preventDefault(),this.dispatch("pinchZoomStart",{event:n}).defaultPrevented||(this.off("touchstart.panZoom",t),M=!0,at(document,"touchmove.panZoom",I,this,{passive:!1}),at(document,"touchend.panZoom",T,this,{passive:!1})))},T=function t(n){n.preventDefault();var e=Kn(n);e.length>1||(M=!1,this.dispatch("pinchZoomEnd",{event:n}),ct(document,"touchmove.panZoom",I),ct(document,"touchend.panZoom",t),this.on("touchstart.panZoom",C),e.length&&b&&E&&N.call(this,n))},I=function(t){t.preventDefault();var n=Kn(t),e=this.zoom(),r=Math.sqrt(Math.pow(v[0].clientX-v[1].clientX,2)+Math.pow(v[0].clientY-v[1].clientY,2))/Math.sqrt(Math.pow(n[0].clientX-n[1].clientX,2)+Math.pow(n[0].clientY-n[1].clientY,2));(e<y&&r>1||e>_&&r<1)&&(r=1);var i={x:n[0].clientX+.5*(n[1].clientX-n[0].clientX),y:n[0].clientY+.5*(n[1].clientY-n[0].clientY)},o=v[0].clientX+.5*(v[1].clientX-v[0].clientX),u=v[0].clientY+.5*(v[1].clientY-v[0].clientY),s=this.point(i.x,i.y),a=this.point(2*i.x-o,2*i.y-u),c=new K(this.viewbox()).transform((new H).translate(-a.x,-a.y).scale(r,0,0).translate(s.x,s.y));k(c),this.viewbox(c),v=n,this.dispatch("zoom",{box:c,focus:a})},N=function t(n){n.type.indexOf("mouse")>-1&&n.button!==x&&n.which!==x+1||(n.preventDefault(),this.off("mousedown.panZoom",t),v=Kn(n),M||(this.dispatch("panStart",{event:n}),p={x:v[0].clientX,y:v[0].clientY},at(document,"touchmove.panZoom mousemove.panZoom",z,this,{passive:!1}),at(document,"touchend.panZoom mouseup.panZoom",R,this,{passive:!1})))},R=function t(n){n.preventDefault(),ct(document,"touchmove.panZoom mousemove.panZoom",z),ct(document,"touchend.panZoom mouseup.panZoom",t),this.on("mousedown.panZoom",N),this.dispatch("panEnd",{event:n})},z=function(t){t.preventDefault();var n=Kn(t),e={x:n[0].clientX,y:n[0].clientY},r=this.point(e.x,e.y),i=this.point(p.x,p.y),o=[i.x-r.x,i.y-r.y];if(o[0]||o[1]){var u=new K(this.viewbox()).transform((new H).translate(o[0],o[1]));p=e,k(u),this.dispatch("panning",{box:u,event:t}).defaultPrevented||this.viewbox(u)}};return m&&this.on("wheel.panZoom",(function(t){var n;switch(t.preventDefault(),t.deltaMode){case 1:n=t.deltaY*A;break;case 2:n=t.deltaY*O;break;default:n=t.deltaY}var e=Math.pow(1+g,-1*n/100)*this.zoom(),r=this.point(t.clientX,t.clientY);if(e>_&&(e=_),e<y&&(e=y),this.dispatch("zoom",{level:e,focus:r}).defaultPrevented)return this;if(this.zoom(e,r),j){var i=k(this.viewbox());this.viewbox(i)}}),this,{passive:!1}),w&&this.on("touchstart.panZoom",C,this,{passive:!1}),b&&this.on("mousedown.panZoom",N,this,{passive:!1}),this}});class te{constructor(t,n,e,r,i){this.width=n,this.height=e,this.spacing=i,this.canvas=Jn().addTo(t).size("100%","100%").viewbox(`-${i} -${i} ${n+2*i} ${e+i}`).attr({style:r,preserveAspectRatio:"xMinYMin meet"})}add(t){this.canvas.add(t)}resetViewBox(){this.canvas.viewbox(`-${this.spacing} -${this.spacing} ${this.width+2*this.spacing} ${this.height+this.spacing}`)}updateViewBox(t,n,e,r){this.canvas.viewbox(`${t} ${n} ${e} ${r}`)}zoom(t){const n=this.canvas.zoom()+t;n>=.1&&this.canvas.zoom(n)}clear(){this.canvas.clear().viewbox(`-${this.spacing} -${this.spacing} ${this.width+2*this.spacing} ${this.height+this.spacing}`)}}var ne,ee,re,ie,oe,ue,se,ae,ce,he,fe,le,de,pe,ve,ge,ye,_e,me,we,be,xe,Ee,je,Ae,Oe,Me,Se,ke,Ce,Te,Ie,Ne,Re,ze,Pe,De,Le,Fe,Be,$e,Ve,Xe,Ye,Ue,qe,We,Ge,Ze,He,Qe,Je,Ke,tr,nr,er,rr,ir,or,ur,sr,ar,cr,hr,fr,lr,dr,pr,vr,gr,yr,_r,mr,wr,br,xr,Er,jr,Ar,Or,Mr,Sr,kr,Cr,Tr,Ir,Nr,Rr,zr,Pr,Dr,Lr,Fr,Br,$r,Vr,Xr,Yr,Ur,qr,Wr,Gr,Zr,Hr,Qr,Jr,Kr,ti,ni="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function ei(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function ri(){if(ie)return re;return ie=1,re=function(t,n){return t===n||t!=t&&n!=n}}function ii(){if(ue)return oe;ue=1;var t=ri();return oe=function(n,e){for(var r=n.length;r--;)if(t(n[r][0],e))return r;return-1}}function oi(){if(ge)return ve;ge=1;var t=ee?ne:(ee=1,ne=function(){this.__data__=[],this.size=0}),n=function(){if(ae)return se;ae=1;var t=ii(),n=Array.prototype.splice;return se=function(e){var r=this.__data__,i=t(r,e);return!(i<0||(i==r.length-1?r.pop():n.call(r,i,1),--this.size,0))}}(),e=function(){if(he)return ce;he=1;var t=ii();return ce=function(n){var e=this.__data__,r=t(e,n);return r<0?void 0:e[r][1]}}(),r=function(){if(le)return fe;le=1;var t=ii();return fe=function(n){return t(this.__data__,n)>-1}}(),i=function(){if(pe)return de;pe=1;var t=ii();return de=function(n,e){var r=this.__data__,i=t(r,n);return i<0?(++this.size,r.push([n,e])):r[i][1]=e,this}}();function o(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n<e;){var r=t[n];this.set(r[0],r[1])}}return o.prototype.clear=t,o.prototype.delete=n,o.prototype.get=e,o.prototype.has=r,o.prototype.set=i,ve=o}function ui(){if(Oe)return Ae;Oe=1;var t="object"==typeof ni&&ni&&ni.Object===Object&&ni;return Ae=t}function si(){if(Se)return Me;Se=1;var t=ui(),n="object"==typeof self&&self&&self.Object===Object&&self,e=t||n||Function("return this")();return Me=e}function ai(){if(Ce)return ke;Ce=1;var t=si().Symbol;return ke=t}function ci(){if(Pe)return ze;Pe=1;var t=ai(),n=function(){if(Ie)return Te;Ie=1;var t=ai(),n=Object.prototype,e=n.hasOwnProperty,r=n.toString,i=t?t.toStringTag:void 0;return Te=function(t){var n=e.call(t,i),o=t[i];try{t[i]=void 0;var u=!0}catch(a){}var s=r.call(t);return u&&(n?t[i]=o:delete t[i]),s}}(),e=function(){if(Re)return Ne;Re=1;var t=Object.prototype.toString;return Ne=function(n){return t.call(n)}}(),r=t?t.toStringTag:void 0;return ze=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":r&&r in Object(t)?n(t):e(t)}}function hi(){if(Le)return De;return Le=1,De=function(t){var n=typeof t;return null!=t&&("object"==n||"function"==n)}}function fi(){if(Be)return Fe;Be=1;var t=ci(),n=hi();return Fe=function(e){if(!n(e))return!1;var r=t(e);return"[object Function]"==r||"[object GeneratorFunction]"==r||"[object AsyncFunction]"==r||"[object Proxy]"==r}}function li(){if(Ye)return Xe;Ye=1;var t,n=function(){if(Ve)return $e;Ve=1;var t=si()["__core-js_shared__"];return $e=t}(),e=(t=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||""))?"Symbol(src)_1."+t:"";return Xe=function(t){return!!e&&e in t}}function di(){if(qe)return Ue;qe=1;var t=Function.prototype.toString;return Ue=function(n){if(null!=n){try{return t.call(n)}catch(e){}try{return n+""}catch(e){}}return""}}function pi(){if(Je)return Qe;Je=1;var t=function(){if(Ge)return We;Ge=1;var t=fi(),n=li(),e=hi(),r=di(),i=/^\[object .+?Constructor\]$/,o=Function.prototype,u=Object.prototype,s=o.toString,a=u.hasOwnProperty,c=RegExp("^"+s.call(a).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");return We=function(o){return!(!e(o)||n(o))&&(t(o)?c:i).test(r(o))}}(),n=He?Ze:(He=1,Ze=function(t,n){return null==t?void 0:t[n]});return Qe=function(e,r){var i=n(e,r);return t(i)?i:void 0}}function vi(){if(tr)return Ke;tr=1;var t=pi()(si(),"Map");return Ke=t}function gi(){if(er)return nr;er=1;var t=pi()(Object,"create");return nr=t}function yi(){if(pr)return dr;pr=1;var t=function(){if(ir)return rr;ir=1;var t=gi();return rr=function(){this.__data__=t?t(null):{},this.size=0}}(),n=ur?or:(ur=1,or=function(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}),e=function(){if(ar)return sr;ar=1;var t=gi(),n=Object.prototype.hasOwnProperty;return sr=function(e){var r=this.__data__;if(t){var i=r[e];return"__lodash_hash_undefined__"===i?void 0:i}return n.call(r,e)?r[e]:void 0}}(),r=function(){if(hr)return cr;hr=1;var t=gi(),n=Object.prototype.hasOwnProperty;return cr=function(e){var r=this.__data__;return t?void 0!==r[e]:n.call(r,e)}}(),i=function(){if(lr)return fr;lr=1;var t=gi();return fr=function(n,e){var r=this.__data__;return this.size+=this.has(n)?0:1,r[n]=t&&void 0===e?"__lodash_hash_undefined__":e,this}}();function o(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n<e;){var r=t[n];this.set(r[0],r[1])}}return o.prototype.clear=t,o.prototype.delete=n,o.prototype.get=e,o.prototype.has=r,o.prototype.set=i,dr=o}function _i(){if(wr)return mr;wr=1;var t=_r?yr:(_r=1,yr=function(t){var n=typeof t;return"string"==n||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==t:null===t});return mr=function(n,e){var r=n.__data__;return t(e)?r["string"==typeof e?"string":"hash"]:r.map}}function mi(){if(Cr)return kr;Cr=1;var t=function(){if(gr)return vr;gr=1;var t=yi(),n=oi(),e=vi();return vr=function(){this.size=0,this.__data__={hash:new t,map:new(e||n),string:new t}}}(),n=function(){if(xr)return br;xr=1;var t=_i();return br=function(n){var e=t(this,n).delete(n);return this.size-=e?1:0,e}}(),e=function(){if(jr)return Er;jr=1;var t=_i();return Er=function(n){return t(this,n).get(n)}}(),r=function(){if(Or)return Ar;Or=1;var t=_i();return Ar=function(n){return t(this,n).has(n)}}(),i=function(){if(Sr)return Mr;Sr=1;var t=_i();return Mr=function(n,e){var r=t(this,n),i=r.size;return r.set(n,e),this.size+=r.size==i?0:1,this}}();function o(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n<e;){var r=t[n];this.set(r[0],r[1])}}return o.prototype.clear=t,o.prototype.delete=n,o.prototype.get=e,o.prototype.has=r,o.prototype.set=i,kr=o}function wi(){if(Rr)return Nr;Rr=1;var t=oi(),n=function(){if(_e)return ye;_e=1;var t=oi();return ye=function(){this.__data__=new t,this.size=0}}(),e=we?me:(we=1,me=function(t){var n=this.__data__,e=n.delete(t);return this.size=n.size,e}),r=xe?be:(xe=1,be=function(t){return this.__data__.get(t)}),i=je?Ee:(je=1,Ee=function(t){return this.__data__.has(t)}),o=function(){if(Ir)return Tr;Ir=1;var t=oi(),n=vi(),e=mi();return Tr=function(r,i){var o=this.__data__;if(o instanceof t){var u=o.__data__;if(!n||u.length<199)return u.push([r,i]),this.size=++o.size,this;o=this.__data__=new e(u)}return o.set(r,i),this.size=o.size,this}}();function u(n){var e=this.__data__=new t(n);this.size=e.size}return u.prototype.clear=n,u.prototype.delete=e,u.prototype.get=r,u.prototype.has=i,u.prototype.set=o,Nr=u}function bi(){if(Pr)return zr;return Pr=1,zr=function(t,n){for(var e=-1,r=null==t?0:t.length;++e<r&&!1!==n(t[e],e,t););return t}}function xi(){if(Lr)return Dr;Lr=1;var t=pi(),n=function(){try{var n=t(Object,"defineProperty");return n({},"",{}),n}catch(e){}}();return Dr=n}function Ei(){if(Br)return Fr;Br=1;var t=xi();return Fr=function(n,e,r){"__proto__"==e&&t?t(n,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):n[e]=r}}function ji(){if(Vr)return $r;Vr=1;var t=Ei(),n=ri(),e=Object.prototype.hasOwnProperty;return $r=function(r,i,o){var u=r[i];e.call(r,i)&&n(u,o)&&(void 0!==o||i in r)||t(r,i,o)}}function Ai(){if(Yr)return Xr;Yr=1;var t=ji(),n=Ei();return Xr=function(e,r,i,o){var u=!i;i||(i={});for(var s=-1,a=r.length;++s<a;){var c=r[s],h=o?o(i[c],e[c],c,i,e):void 0;void 0===h&&(h=e[c]),u?n(i,c,h):t(i,c,h)}return i}}function Oi(){if(Gr)return Wr;return Gr=1,Wr=function(t){return null!=t&&"object"==typeof t}}function Mi(){if(Jr)return Qr;Jr=1;var t=function(){if(Hr)return Zr;Hr=1;var t=ci(),n=Oi();return Zr=function(e){return n(e)&&"[object Arguments]"==t(e)}}(),n=Oi(),e=Object.prototype,r=e.hasOwnProperty,i=e.propertyIsEnumerable,o=t(function(){return arguments}())?t:function(t){return n(t)&&r.call(t,"callee")&&!i.call(t,"callee")};return Qr=o}function Si(){if(ti)return Kr;ti=1;var t=Array.isArray;return Kr=t}var ki,Ci,Ti,Ii,Ni,Ri,zi,Pi,Di,Li,Fi,Bi={exports:{}};function $i(){return Ti||(Ti=1,t=Bi,n=Bi.exports,e=si(),r=Ci?ki:(Ci=1,ki=function(){return!1}),i=n&&!n.nodeType&&n,o=i&&t&&!t.nodeType&&t,u=o&&o.exports===i?e.Buffer:void 0,s=(u?u.isBuffer:void 0)||r,t.exports=s),Bi.exports;var t,n,e,r,i,o,u,s}function Vi(){if(Ni)return Ii;Ni=1;var t=/^(?:0|[1-9]\d*)$/;return Ii=function(n,e){var r=typeof n;return!!(e=null==e?9007199254740991:e)&&("number"==r||"symbol"!=r&&t.test(n))&&n>-1&&n%1==0&&n<e}}function Xi(){if(zi)return Ri;zi=1;return Ri=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}}function Yi(){if(Fi)return Li;return Fi=1,Li=function(t){return function(n){return t(n)}}}Bi.exports;var Ui,qi,Wi,Gi,Zi,Hi,Qi,Ji,Ki,to,no,eo,ro,io,oo,uo,so,ao,co,ho,fo,lo,po,vo,go,yo,_o,mo={exports:{}};function wo(){return Ui||(Ui=1,t=mo,n=mo.exports,e=ui(),r=n&&!n.nodeType&&n,i=r&&t&&!t.nodeType&&t,o=i&&i.exports===r&&e.process,u=function(){try{var t=i&&i.require&&i.require("util").types;return t||o&&o.binding&&o.binding("util")}catch(n){}}(),t.exports=u),mo.exports;var t,n,e,r,i,o,u}function bo(){if(Wi)return qi;Wi=1;var t=function(){if(Di)return Pi;Di=1;var t=ci(),n=Xi(),e=Oi(),r={};return r["[object Float32Array]"]=r["[object Float64Array]"]=r["[object Int8Array]"]=r["[object Int16Array]"]=r["[object Int32Array]"]=r["[object Uint8Array]"]=r["[object Uint8ClampedArray]"]=r["[object Uint16Array]"]=r["[object Uint32Array]"]=!0,r["[object Arguments]"]=r["[object Array]"]=r["[object ArrayBuffer]"]=r["[object Boolean]"]=r["[object DataView]"]=r["[object Date]"]=r["[object Error]"]=r["[object Function]"]=r["[object Map]"]=r["[object Number]"]=r["[object Object]"]=r["[object RegExp]"]=r["[object Set]"]=r["[object String]"]=r["[object WeakMap]"]=!1,Pi=function(i){return e(i)&&n(i.length)&&!!r[t(i)]}}(),n=Yi(),e=wo(),r=e&&e.isTypedArray,i=r?n(r):t;return qi=i}function xo(){if(Zi)return Gi;Zi=1;var t=qr?Ur:(qr=1,Ur=function(t,n){for(var e=-1,r=Array(t);++e<t;)r[e]=n(e);return r}),n=Mi(),e=Si(),r=$i(),i=Vi(),o=bo(),u=Object.prototype.hasOwnProperty;return Gi=function(s,a){var c=e(s),h=!c&&n(s),f=!c&&!h&&r(s),l=!c&&!h&&!f&&o(s),d=c||h||f||l,p=d?t(s.length,String):[],v=p.length;for(var g in s)!a&&!u.call(s,g)||d&&("length"==g||f&&("offset"==g||"parent"==g)||l&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||i(g,v))||p.push(g);return p}}function Eo(){if(Qi)return Hi;Qi=1;var t=Object.prototype;return Hi=function(n){var e=n&&n.constructor;return n===("function"==typeof e&&e.prototype||t)}}function jo(){if(Ki)return Ji;return Ki=1,Ji=function(t,n){return function(e){return t(n(e))}}}function Ao(){if(ro)return eo;ro=1;var t=Eo(),n=function(){if(no)return to;no=1;var t=jo()(Object.keys,Object);return to=t}(),e=Object.prototype.hasOwnProperty;return eo=function(r){if(!t(r))return n(r);var i=[];for(var o in Object(r))e.call(r,o)&&"constructor"!=o&&i.push(o);return i}}function Oo(){if(oo)return io;oo=1;var t=fi(),n=Xi();return io=function(e){return null!=e&&n(e.length)&&!t(e)}}function Mo(){if(so)return uo;so=1;var t=xo(),n=Ao(),e=Oo();return uo=function(r){return e(r)?t(r):n(r)}}function So(){if(po)return lo;po=1;var t=hi(),n=Eo(),e=fo?ho:(fo=1,ho=function(t){var n=[];if(null!=t)for(var e in Object(t))n.push(e);return n}),r=Object.prototype.hasOwnProperty;return lo=function(i){if(!t(i))return e(i);var o=n(i),u=[];for(var s in i)("constructor"!=s||!o&&r.call(i,s))&&u.push(s);return u}}function ko(){if(go)return vo;go=1;var t=xo(),n=So(),e=Oo();return vo=function(r){return e(r)?t(r,!0):n(r)}}mo.exports;var Co,To,Io,No,Ro,zo,Po,Do,Lo,Fo,Bo,$o,Vo,Xo,Yo,Uo,qo,Wo,Go,Zo,Ho,Qo,Jo,Ko,tu,nu,eu,ru,iu,ou,uu,su,au,cu,hu,fu,lu,du,pu,vu,gu,yu,_u,mu,wu,bu,xu,Eu,ju,Au,Ou,Mu,Su,ku,Cu,Tu,Iu,Nu,Ru,zu,Pu,Du,Lu,Fu,Bu,$u,Vu,Xu,Yu,Uu,qu,Wu,Gu,Zu,Hu,Qu,Ju,Ku,ts,ns,es,rs,is,os,us,ss,as,cs,hs,fs,ls,ds,ps,vs,gs,ys,_s,ms,ws,bs,xs,Es,js,As,Os,Ms,Ss,ks,Cs,Ts,Is,Ns,Rs,zs,Ps,Ds,Ls,Fs,Bs,$s,Vs,Xs,Ys,Us,qs,Ws,Gs,Zs,Hs,Qs,Js,Ks,ta,na,ea,ra,ia,oa,ua,sa,aa,ca,ha,fa,la,da,pa,va,ga,ya,_a,ma,wa,ba,xa,Ea,ja,Aa,Oa,Ma,Sa,ka,Ca,Ta,Ia,Na,Ra,za,Pa,Da,La,Fa,Ba,$a,Va,Xa,Ya,Ua,qa,Wa,Ga,Za,Ha,Qa,Ja,Ka,tc,nc,ec,rc,ic,oc,uc,sc,ac,cc,hc,fc,lc,dc,pc,vc,gc,yc,_c,mc,wc,bc,xc,Ec,jc,Ac,Oc,Mc,Sc,kc,Cc,Tc,Ic,Nc,Rc,zc,Pc,Dc,Lc,Fc,Bc,$c,Vc,Xc,Yc,Uc,qc,Wc,Gc,Zc,Hc,Qc,Jc,Kc,th={exports:{}};function nh(){if(Ro)return No;return Ro=1,No=function(t,n){for(var e=-1,r=null==t?0:t.length,i=0,o=[];++e<r;){var u=t[e];n(u,e,t)&&(o[i++]=u)}return o}}function eh(){if(Po)return zo;return Po=1,zo=function(){return[]}}function rh(){if(Lo)return Do;Lo=1;var t=nh(),n=eh(),e=Object.prototype.propertyIsEnumerable,r=Object.getOwnPropertySymbols;return Do=r?function(n){return null==n?[]:(n=Object(n),t(r(n),(function(t){return e.call(n,t)})))}:n}function ih(){if(Vo)return $o;return Vo=1,$o=function(t,n){for(var e=-1,r=n.length,i=t.length;++e<r;)t[i+e]=n[e];return t}}function oh(){if(Yo)return Xo;Yo=1;var t=jo()(Object.getPrototypeOf,Object);return Xo=t}function uh(){if(qo)return Uo;qo=1;var t=ih(),n=oh(),e=rh(),r=eh(),i=Object.getOwnPropertySymbols;return Uo=i?function(r){for(var i=[];r;)t(i,e(r)),r=n(r);return i}:r}function sh(){if(Ho)return Zo;Ho=1;var t=ih(),n=Si();return Zo=function(e,r,i){var o=r(e);return n(e)?o:t(o,i(e))}}function ah(){if(Jo)return Qo;Jo=1;var t=sh(),n=rh(),e=Mo();return Qo=function(r){return t(r,e,n)}}function ch(){if(uu)return ou;uu=1;var t=pi()(si(),"Set");return ou=t}function hh(){if(hu)return cu;hu=1;var t=function(){if(eu)return nu;eu=1;var t=pi()(si(),"DataView");return nu=t}(),n=vi(),e=function(){if(iu)return ru;iu=1;var t=pi()(si(),"Promise");return ru=t}(),r=ch(),i=function(){if(au)return su;au=1;var t=pi()(si(),"WeakMap");return su=t}(),o=ci(),u=di(),s="[object Map]",a="[object Promise]",c="[object Set]",h="[object WeakMap]",f="[object DataView]",l=u(t),d=u(n),p=u(e),v=u(r),g=u(i),y=o;return(t&&y(new t(new ArrayBuffer(1)))!=f||n&&y(new n)!=s||e&&y(e.resolve())!=a||r&&y(new r)!=c||i&&y(new i)!=h)&&(y=function(t){var n=o(t),e="[object Object]"==n?t.constructor:void 0,r=e?u(e):"";if(r)switch(r){case l:return f;case d:return s;case p:return a;case v:return c;case g:return h}return n}),cu=y}function fh(){if(pu)return du;pu=1;var t=si().Uint8Array;return du=t}function lh(){if(gu)return vu;gu=1;var t=fh();return vu=function(n){var e=new n.constructor(n.byteLength);return new t(e).set(new t(n)),e}}function dh(){if(Ou)return Au;Ou=1;var t=lh(),n=function(){if(_u)return yu;_u=1;var t=lh();return yu=function(n,e){var r=e?t(n.buffer):n.buffer;return new n.constructor(r,n.byteOffset,n.byteLength)}}(),e=function(){if(wu)return mu;wu=1;var t=/\w*$/;return mu=function(n){var e=new n.constructor(n.source,t.exec(n));return e.lastIndex=n.lastIndex,e}}(),r=function(){if(xu)return bu;xu=1;var t=ai(),n=t?t.prototype:void 0,e=n?n.valueOf:void 0;return bu=function(t){return e?Object(e.call(t)):{}}}(),i=function(){if(ju)return Eu;ju=1;var t=lh();return Eu=function(n,e){var r=e?t(n.buffer):n.buffer;return new n.constructor(r,n.byteOffset,n.length)}}();return Au=function(o,u,s){var a=o.constructor;switch(u){case"[object ArrayBuffer]":return t(o);case"[object Boolean]":case"[object Date]":return new a(+o);case"[object DataView]":return n(o,s);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return i(o,s);case"[object Map]":case"[object Set]":return new a;case"[object Number]":case"[object String]":return new a(o);case"[object RegExp]":return e(o);case"[object Symbol]":return r(o)}}}function ph(){if(Su)return Mu;Su=1;var t=hi(),n=Object.create;return Mu=function(){function e(){}return function(r){if(!t(r))return{};if(n)return n(r);e.prototype=r;var i=new e;return e.prototype=void 0,i}}()}function vh(){if(Ru)return Nu;Ru=1;var t=function(){if(Iu)return Tu;Iu=1;var t=hh(),n=Oi();return Tu=function(e){return n(e)&&"[object Map]"==t(e)}}(),n=Yi(),e=wo(),r=e&&e.isMap,i=r?n(r):t;return Nu=i}function gh(){if(Lu)return Du;Lu=1;var t=function(){if(Pu)return zu;Pu=1;var t=hh(),n=Oi();return zu=function(e){return n(e)&&"[object Set]"==t(e)}}(),n=Yi(),e=wo(),r=e&&e.isSet,i=r?n(r):t;return Du=i}function yh(){if(Bu)return Fu;Bu=1;var t,n,e,r,i,o,u,s=wi(),a=bi(),c=ji(),h=function(){if(co)return ao;co=1;var t=Ai(),n=Mo();return ao=function(e,r){return e&&t(r,n(r),e)}}(),f=function(){if(_o)return yo;_o=1;var t=Ai(),n=ko();return yo=function(e,r){return e&&t(r,n(r),e)}}(),l=(Co||(Co=1,t=th,n=th.exports,e=si(),r=n&&!n.nodeType&&n,i=r&&t&&!t.nodeType&&t,o=i&&i.exports===r?e.Buffer:void 0,u=o?o.allocUnsafe:void 0,t.exports=function(t,n){if(n)return t.slice();var e=t.length,r=u?u(e):new t.constructor(e);return t.copy(r),r}),th.exports),d=Io?To:(Io=1,To=function(t,n){var e=-1,r=t.length;for(n||(n=Array(r));++e<r;)n[e]=t[e];return n}),p=function(){if(Bo)return Fo;Bo=1;var t=Ai(),n=rh();return Fo=function(e,r){return t(e,n(e),r)}}(),v=function(){if(Go)return Wo;Go=1;var t=Ai(),n=uh();return Wo=function(e,r){return t(e,n(e),r)}}(),g=ah(),y=function(){if(tu)return Ko;tu=1;var t=sh(),n=uh(),e=ko();return Ko=function(r){return t(r,e,n)}}(),_=hh(),m=function(){if(lu)return fu;lu=1;var t=Object.prototype.hasOwnProperty;return fu=function(n){var e=n.length,r=new n.constructor(e);return e&&"string"==typeof n[0]&&t.call(n,"index")&&(r.index=n.index,r.input=n.input),r}}(),w=dh(),b=function(){if(Cu)return ku;Cu=1;var t=ph(),n=oh(),e=Eo();return ku=function(r){return"function"!=typeof r.constructor||e(r)?{}:t(n(r))}}(),x=Si(),E=$i(),j=vh(),A=hi(),O=gh(),M=Mo(),S=ko(),k="[object Arguments]",C="[object Function]",T="[object Object]",I={};return I[k]=I["[object Array]"]=I["[object ArrayBuffer]"]=I["[object DataView]"]=I["[object Boolean]"]=I["[object Date]"]=I["[object Float32Array]"]=I["[object Float64Array]"]=I["[object Int8Array]"]=I["[object Int16Array]"]=I["[object Int32Array]"]=I["[object Map]"]=I["[object Number]"]=I[T]=I["[object RegExp]"]=I["[object Set]"]=I["[object String]"]=I["[object Symbol]"]=I["[object Uint8Array]"]=I["[object Uint8ClampedArray]"]=I["[object Uint16Array]"]=I["[object Uint32Array]"]=!0,I["[object Error]"]=I[C]=I["[object WeakMap]"]=!1,Fu=function t(n,e,r,i,o,u){var N,R=1&e,z=2&e,P=4&e;if(r&&(N=o?r(n,i,o,u):r(n)),void 0!==N)return N;if(!A(n))return n;var D=x(n);if(D){if(N=m(n),!R)return d(n,N)}else{var L=_(n),F=L==C||"[object GeneratorFunction]"==L;if(E(n))return l(n,R);if(L==T||L==k||F&&!o){if(N=z||F?{}:b(n),!R)return z?v(n,f(N,n)):p(n,h(N,n))}else{if(!I[L])return o?n:{};N=w(n,L,R)}}u||(u=new s);var B=u.get(n);if(B)return B;u.set(n,N),O(n)?n.forEach((function(i){N.add(t(i,e,r,i,n,u))})):j(n)&&n.forEach((function(i,o){N.set(o,t(i,e,r,o,n,u))}));var $=D?void 0:(P?z?y:g:z?S:M)(n);return a($||n,(function(i,o){$&&(i=n[o=i]),c(N,o,t(i,e,r,o,n,u))})),N},Fu}function _h(){if(Yu)return Xu;return Yu=1,Xu=function(t){return function(){return t}}}function mh(){if(Gu)return Wu;Gu=1;var t=(qu?Uu:(qu=1,Uu=function(t){return function(n,e,r){for(var i=-1,o=Object(n),u=r(n),s=u.length;s--;){var a=u[t?s:++i];if(!1===e(o[a],a,o))break}return n}}))();return Wu=t}function wh(){if(Hu)return Zu;Hu=1;var t=mh(),n=Mo();return Zu=function(e,r){return e&&t(e,r,n)}}function bh(){if(ts)return Ku;ts=1;var t=wh(),n=function(){if(Ju)return Qu;Ju=1;var t=Oo();return Qu=function(n,e){return function(r,i){if(null==r)return r;if(!t(r))return n(r,i);for(var o=r.length,u=e?o:-1,s=Object(r);(e?u--:++u<o)&&!1!==i(s[u],u,s););return r}}}()(t);return Ku=n}function xh(){if(es)return ns;return es=1,ns=function(t){return t}}function Eh(){if(us)return os;us=1;var t=bi(),n=bh(),e=function(){if(is)return rs;is=1;var t=xh();return rs=function(n){return"function"==typeof n?n:t}}(),r=Si();return os=function(i,o){return(r(i)?t:n)(i,e(o))}}function jh(){if(gs)return vs;gs=1;var t=mi(),n=ls?fs:(ls=1,fs=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}),e=ps?ds:(ps=1,ds=function(t){return this.__data__.has(t)});function r(n){var e=-1,r=null==n?0:n.length;for(this.__data__=new t;++e<r;)this.add(n[e])}return r.prototype.add=r.prototype.push=n,r.prototype.has=e,vs=r}function Ah(){if(ws)return ms;return ws=1,ms=function(t,n){return t.has(n)}}function Oh(){if(xs)return bs;xs=1;var t=jh(),n=_s?ys:(_s=1,ys=function(t,n){for(var e=-1,r=null==t?0:t.length;++e<r;)if(n(t[e],e,t))return!0;return!1}),e=Ah();return bs=function(r,i,o,u,s,a){var c=1&o,h=r.length,f=i.length;if(h!=f&&!(c&&f>h))return!1;var l=a.get(r),d=a.get(i);if(l&&d)return l==i&&d==r;var p=-1,v=!0,g=2&o?new t:void 0;for(a.set(r,i),a.set(i,r);++p<h;){var y=r[p],_=i[p];if(u)var m=c?u(_,y,p,i,r,a):u(y,_,p,r,i,a);if(void 0!==m){if(m)continue;v=!1;break}if(g){if(!n(i,(function(t,n){if(!e(g,n)&&(y===t||s(y,t,o,u,a)))return g.push(n)}))){v=!1;break}}else if(y!==_&&!s(y,_,o,u,a)){v=!1;break}}return a.delete(r),a.delete(i),v}}function Mh(){if(Os)return As;return Os=1,As=function(t){var n=-1,e=Array(t.size);return t.forEach((function(t){e[++n]=t})),e}}function Sh(){if(Ss)return Ms;Ss=1;var t=ai(),n=fh(),e=ri(),r=Oh(),i=js?Es:(js=1,Es=function(t){var n=-1,e=Array(t.size);return t.forEach((function(t,r){e[++n]=[r,t]})),e}),o=Mh(),u=t?t.prototype:void 0,s=u?u.valueOf:void 0;return Ms=function(t,u,a,c,h,f,l){switch(a){case"[object DataView]":if(t.byteLength!=u.byteLength||t.byteOffset!=u.byteOffset)return!1;t=t.buffer,u=u.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=u.byteLength||!f(new n(t),new n(u)));case"[object Boolean]":case"[object Date]":case"[object Number]":return e(+t,+u);case"[object Error]":return t.name==u.name&&t.message==u.message;case"[object RegExp]":case"[object String]":return t==u+"";case"[object Map]":var d=i;case"[object Set]":var p=1&c;if(d||(d=o),t.size!=u.size&&!p)return!1;var v=l.get(t);if(v)return v==u;c|=2,l.set(t,u);var g=r(d(t),d(u),c,h,f,l);return l.delete(t),g;case"[object Symbol]":if(s)return s.call(t)==s.call(u)}return!1}}function kh(){if(Is)return Ts;Is=1;var t=wi(),n=Oh(),e=Sh(),r=function(){if(Cs)return ks;Cs=1;var t=ah(),n=Object.prototype.hasOwnProperty;return ks=function(e,r,i,o,u,s){var a=1&i,c=t(e),h=c.length;if(h!=t(r).length&&!a)return!1;for(var f=h;f--;){var l=c[f];if(!(a?l in r:n.call(r,l)))return!1}var d=s.get(e),p=s.get(r);if(d&&p)return d==r&&p==e;var v=!0;s.set(e,r),s.set(r,e);for(var g=a;++f<h;){var y=e[l=c[f]],_=r[l];if(o)var m=a?o(_,y,l,r,e,s):o(y,_,l,e,r,s);if(!(void 0===m?y===_||u(y,_,i,o,s):m)){v=!1;break}g||(g="constructor"==l)}if(v&&!g){var w=e.constructor,b=r.constructor;w==b||!("constructor"in e)||!("constructor"in r)||"function"==typeof w&&w instanceof w&&"function"==typeof b&&b instanceof b||(v=!1)}return s.delete(e),s.delete(r),v}}(),i=hh(),o=Si(),u=$i(),s=bo(),a="[object Arguments]",c="[object Array]",h="[object Object]",f=Object.prototype.hasOwnProperty;return Ts=function(l,d,p,v,g,y){var _=o(l),m=o(d),w=_?c:i(l),b=m?c:i(d),x=(w=w==a?h:w)==h,E=(b=b==a?h:b)==h,j=w==b;if(j&&u(l)){if(!u(d))return!1;_=!0,x=!1}if(j&&!x)return y||(y=new t),_||s(l)?n(l,d,p,v,g,y):e(l,d,w,p,v,g,y);if(!(1&p)){var A=x&&f.call(l,"__wrapped__"),O=E&&f.call(d,"__wrapped__");if(A||O){var M=A?l.value():l,S=O?d.value():d;return y||(y=new t),g(M,S,p,v,y)}}return!!j&&(y||(y=new t),r(l,d,p,v,g,y))}}function Ch(){if(Rs)return Ns;Rs=1;var t=kh(),n=Oi();return Ns=function e(r,i,o,u,s){return r===i||(null==r||null==i||!n(r)&&!n(i)?r!=r&&i!=i:t(r,i,o,u,e,s))},Ns}function Th(){if(Ls)return Ds;Ls=1;var t=hi();return Ds=function(n){return n==n&&!t(n)}}function Ih(){if(Vs)return $s;return Vs=1,$s=function(t,n){return function(e){return null!=e&&(e[t]===n&&(void 0!==n||t in Object(e)))}}}function Nh(){if(Ys)return Xs;Ys=1;var t=function(){if(Ps)return zs;Ps=1;var t=wi(),n=Ch();return zs=function(e,r,i,o){var u=i.length,s=u,a=!o;if(null==e)return!s;for(e=Object(e);u--;){var c=i[u];if(a&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++u<s;){var h=(c=i[u])[0],f=e[h],l=c[1];if(a&&c[2]){if(void 0===f&&!(h in e))return!1}else{var d=new t;if(o)var p=o(f,l,h,e,r,d);if(!(void 0===p?n(l,f,3,o,d):p))return!1}}return!0}}(),n=function(){if(Bs)return Fs;Bs=1;var t=Th(),n=Mo();return Fs=function(e){for(var r=n(e),i=r.length;i--;){var o=r[i],u=e[o];r[i]=[o,u,t(u)]}return r}}(),e=Ih();return Xs=function(r){var i=n(r);return 1==i.length&&i[0][2]?e(i[0][0],i[0][1]):function(n){return n===r||t(n,r,i)}}}function Rh(){if(qs)return Us;qs=1;var t=ci(),n=Oi();return Us=function(e){return"symbol"==typeof e||n(e)&&"[object Symbol]"==t(e)}}function zh(){if(Gs)return Ws;Gs=1;var t=Si(),n=Rh(),e=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;return Ws=function(i,o){if(t(i))return!1;var u=typeof i;return!("number"!=u&&"symbol"!=u&&"boolean"!=u&&null!=i&&!n(i))||(r.test(i)||!e.test(i)||null!=o&&i in Object(o))}}function Ph(){if(Js)return Qs;Js=1;var t=function(){if(Hs)return Zs;Hs=1;var t=mi();function n(e,r){if("function"!=typeof e||null!=r&&"function"!=typeof r)throw new TypeError("Expected a function");var i=function(){var t=arguments,n=r?r.apply(this,t):t[0],o=i.cache;if(o.has(n))return o.get(n);var u=e.apply(this,t);return i.cache=o.set(n,u)||o,u};return i.cache=new(n.Cache||t),i}return n.Cache=t,Zs=n}();return Qs=function(n){var e=t(n,(function(t){return 500===r.size&&r.clear(),t})),r=e.cache;return e}}function Dh(){if(ea)return na;return ea=1,na=function(t,n){for(var e=-1,r=null==t?0:t.length,i=Array(r);++e<r;)i[e]=n(t[e],e,t);return i}}function Lh(){if(ua)return oa;ua=1;var t=function(){if(ia)return ra;ia=1;var t=ai(),n=Dh(),e=Si(),r=Rh(),i=t?t.prototype:void 0,o=i?i.toString:void 0;return ra=function t(i){if("string"==typeof i)return i;if(e(i))return n(i,t)+"";if(r(i))return o?o.call(i):"";var u=i+"";return"0"==u&&1/i==-1/0?"-0":u},ra}();return oa=function(n){return null==n?"":t(n)}}function Fh(){if(aa)return sa;aa=1;var t=Si(),n=zh(),e=function(){if(ta)return Ks;ta=1;var t=Ph(),n=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,e=/\\(\\)?/g,r=t((function(t){var r=[];return 46===t.charCodeAt(0)&&r.push(""),t.replace(n,(function(t,n,i,o){r.push(i?o.replace(e,"$1"):n||t)})),r}));return Ks=r}(),r=Lh();return sa=function(i,o){return t(i)?i:n(i,o)?[i]:e(r(i))}}function Bh(){if(ha)return ca;ha=1;var t=Rh();return ca=function(n){if("string"==typeof n||t(n))return n;var e=n+"";return"0"==e&&1/n==-1/0?"-0":e}}function $h(){if(la)return fa;la=1;var t=Fh(),n=Bh();return fa=function(e,r){for(var i=0,o=(r=t(r,e)).length;null!=e&&i<o;)e=e[n(r[i++])];return i&&i==o?e:void 0}}function Vh(){if(_a)return ya;_a=1;var t=Fh(),n=Mi(),e=Si(),r=Vi(),i=Xi(),o=Bh();return ya=function(u,s,a){for(var c=-1,h=(s=t(s,u)).length,f=!1;++c<h;){var l=o(s[c]);if(!(f=null!=u&&a(u,l)))break;u=u[l]}return f||++c!=h?f:!!(h=null==u?0:u.length)&&i(h)&&r(l,h)&&(e(u)||n(u))}}function Xh(){if(wa)return ma;wa=1;var t=ga?va:(ga=1,va=function(t,n){return null!=t&&n in Object(t)}),n=Vh();return ma=function(e,r){return null!=e&&n(e,r,t)}}function Yh(){if(xa)return ba;xa=1;var t=Ch(),n=function(){if(pa)return da;pa=1;var t=$h();return da=function(n,e,r){var i=null==n?void 0:t(n,e);return void 0===i?r:i}}(),e=Xh(),r=zh(),i=Th(),o=Ih(),u=Bh();return ba=function(s,a){return r(s)&&i(a)?o(u(s),a):function(r){var i=n(r,s);return void 0===i&&i===a?e(r,s):t(a,i,3)}}}function Uh(){if(ja)return Ea;return ja=1,Ea=function(t){return function(n){return null==n?void 0:n[t]}}}function qh(){if(Sa)return Ma;Sa=1;var t=Uh(),n=function(){if(Oa)return Aa;Oa=1;var t=$h();return Aa=function(n){return function(e){return t(e,n)}}}(),e=zh(),r=Bh();return Ma=function(i){return e(i)?t(r(i)):n(i)}}function Wh(){if(Ca)return ka;Ca=1;var t=Nh(),n=Yh(),e=xh(),r=Si(),i=qh();return ka=function(o){return"function"==typeof o?o:null==o?e:"object"==typeof o?r(o)?n(o[0],o[1]):t(o):i(o)}}function Gh(){if(uc)return oc;uc=1;var t=function(){if(tc)return Ka;tc=1;var t=Uh()("length");return Ka=t}(),n=function(){if(ec)return nc;ec=1;var t=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");return nc=function(n){return t.test(n)}}(),e=function(){if(ic)return rc;ic=1;var t="\\ud800-\\udfff",n="["+t+"]",e="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",r="\\ud83c[\\udffb-\\udfff]",i="[^"+t+"]",o="(?:\\ud83c[\\udde6-\\uddff]){2}",u="[\\ud800-\\udbff][\\udc00-\\udfff]",s="(?:"+e+"|"+r+")?",a="[\\ufe0e\\ufe0f]?",c=a+s+"(?:\\u200d(?:"+[i,o,u].join("|")+")"+a+s+")*",h="(?:"+[i+e+"?",e,o,u,n].join("|")+")",f=RegExp(r+"(?="+r+")|"+h+c,"g");return rc=function(t){for(var n=f.lastIndex=0;f.test(t);)++n;return n}}();return oc=function(r){return n(r)?e(r):t(r)}}function Zh(){if(pc)return dc;pc=1;var t=ih(),n=function(){if(lc)return fc;lc=1;var t=ai(),n=Mi(),e=Si(),r=t?t.isConcatSpreadable:void 0;return fc=function(t){return e(t)||n(t)||!!(r&&t&&t[r])}}();return dc=function e(r,i,o,u,s){var a=-1,c=r.length;for(o||(o=n),s||(s=[]);++a<c;){var h=r[a];i>0&&o(h)?i>1?e(h,i-1,o,u,s):t(s,h):u||(s[s.length]=h)}return s},dc}function Hh(){if(_c)return yc;_c=1;var t=gc?vc:(gc=1,vc=function(t,n,e){switch(e.length){case 0:return t.call(n);case 1:return t.call(n,e[0]);case 2:return t.call(n,e[0],e[1]);case 3:return t.call(n,e[0],e[1],e[2])}return t.apply(n,e)}),n=Math.max;return yc=function(e,r,i){return r=n(void 0===r?e.length-1:r,0),function(){for(var o=arguments,u=-1,s=n(o.length-r,0),a=Array(s);++u<s;)a[u]=o[r+u];u=-1;for(var c=Array(r+1);++u<r;)c[u]=o[u];return c[r]=i(a),t(e,this,c)}},yc}function Qh(){if(jc)return Ec;jc=1;var t=function(){if(wc)return mc;wc=1;var t=_h(),n=xi(),e=xh();return mc=n?function(e,r){return n(e,"toString",{configurable:!0,enumerable:!1,value:t(r),writable:!0})}:e}(),n=function(){if(xc)return bc;xc=1;var t=Date.now;return bc=function(n){var e=0,r=0;return function(){var i=t(),o=16-(i-r);if(r=i,o>0){if(++e>=800)return arguments[0]}else e=0;return n.apply(void 0,arguments)}},bc}(),e=n(t);return Ec=e}function Jh(){if(Rc)return Nc;Rc=1;var t=Sc?Mc:(Sc=1,Mc=function(t,n,e,r){for(var i=t.length,o=e+(r?1:-1);r?o--:++o<i;)if(n(t[o],o,t))return o;return-1}),n=Cc?kc:(Cc=1,kc=function(t){return t!=t}),e=Ic?Tc:(Ic=1,Tc=function(t,n,e){for(var r=e-1,i=t.length;++r<i;)if(t[r]===n)return r;return-1});return Nc=function(r,i,o){return i==i?e(r,i,o):t(r,n,o)}}function Kh(){if(Vc)return $c;Vc=1;var t=ch(),n=Bc?Fc:(Bc=1,Fc=function(){}),e=Mh(),r=t&&1/e(new t([,-0]))[1]==1/0?function(n){return new t(n)}:n;return $c=r}function tf(){if(Yc)return Xc;Yc=1;var t=jh(),n=function(){if(Pc)return zc;Pc=1;var t=Jh();return zc=function(n,e){return!(null==n||!n.length)&&t(n,e,0)>-1}}(),e=Lc?Dc:(Lc=1,Dc=function(t,n,e){for(var r=-1,i=null==t?0:t.length;++r<i;)if(e(n,t[r]))return!0;return!1}),r=Ah(),i=Kh(),o=Mh();return Xc=function(u,s,a){var c=-1,h=n,f=u.length,l=!0,d=[],p=d;if(a)l=!1,h=e;else if(f>=200){var v=s?null:i(u);if(v)return o(v);l=!1,h=r,p=new t}else p=s?[]:d;t:for(;++c<f;){var g=u[c],y=s?s(g):g;if(g=a||0!==g?g:0,l&&y==y){for(var _=p.length;_--;)if(p[_]===y)continue t;s&&p.push(y),d.push(g)}else h(p,y,a)||(p!==d&&p.push(y),d.push(g))}return d}}th.exports;try{Kc={clone:function(){if(Vu)return $u;Vu=1;var t=yh();return $u=function(n){return t(n,4)}}(),constant:_h(),each:as?ss:(as=1,ss=Eh()),filter:function(){if(Ia)return Ta;Ia=1;var t=nh(),n=function(){if(hs)return cs;hs=1;var t=bh();return cs=function(n,e){var r=[];return t(n,(function(t,n,i){e(t,n,i)&&r.push(t)})),r}}(),e=Wh(),r=Si();return Ta=function(i,o){return(r(i)?t:n)(i,e(o,3))}}(),has:function(){if(Pa)return za;Pa=1;var t=function(){if(Ra)return Na;Ra=1;var t=Object.prototype.hasOwnProperty;return Na=function(n,e){return null!=n&&t.call(n,e)}}(),n=Vh();return za=function(e,r){return null!=e&&n(e,r,t)}}(),isArray:Si(),isEmpty:function(){if(La)return Da;La=1;var t=Ao(),n=hh(),e=Mi(),r=Si(),i=Oo(),o=$i(),u=Eo(),s=bo(),a=Object.prototype.hasOwnProperty;return Da=function(c){if(null==c)return!0;if(i(c)&&(r(c)||"string"==typeof c||"function"==typeof c.splice||o(c)||s(c)||e(c)))return!c.length;var h=n(c);if("[object Map]"==h||"[object Set]"==h)return!c.size;if(u(c))return!t(c).length;for(var f in c)if(a.call(c,f))return!1;return!0}}(),isFunction:fi(),isUndefined:Ba?Fa:(Ba=1,Fa=function(t){return void 0===t}),keys:Mo(),map:function(){if(Ya)return Xa;Ya=1;var t=Dh(),n=Wh(),e=function(){if(Va)return $a;Va=1;var t=bh(),n=Oo();return $a=function(e,r){var i=-1,o=n(e)?Array(e.length):[];return t(e,(function(t,n,e){o[++i]=r(t,n,e)})),o}}(),r=Si();return Xa=function(i,o){return(r(i)?t:e)(i,n(o,3))}}(),reduce:function(){if(Ha)return Za;Ha=1;var t=qa?Ua:(qa=1,Ua=function(t,n,e,r){var i=-1,o=null==t?0:t.length;for(r&&o&&(e=t[++i]);++i<o;)e=n(e,t[i],i,t);return e}),n=bh(),e=Wh(),r=Ga?Wa:(Ga=1,Wa=function(t,n,e,r,i){return i(t,(function(t,i,o){e=r?(r=!1,t):n(e,t,i,o)})),e}),i=Si();return Za=function(o,u,s){var a=i(o)?t:r,c=arguments.length<3;return a(o,e(u,4),s,c,n)},Za}(),size:function(){if(ac)return sc;ac=1;var t=Ao(),n=hh(),e=Oo(),r=function(){if(Ja)return Qa;Ja=1;var t=ci(),n=Si(),e=Oi();return Qa=function(r){return"string"==typeof r||!n(r)&&e(r)&&"[object String]"==t(r)}}(),i=Gh();return sc=function(o){if(null==o)return 0;if(e(o))return r(o)?i(o):o.length;var u=n(o);return"[object Map]"==u||"[object Set]"==u?o.size:t(o).length}}(),transform:function(){if(hc)return cc;hc=1;var t=bi(),n=ph(),e=wh(),r=Wh(),i=oh(),o=Si(),u=$i(),s=fi(),a=hi(),c=bo();return cc=function(h,f,l){var d=o(h),p=d||u(h)||c(h);if(f=r(f,4),null==l){var v=h&&h.constructor;l=p?d?new v:[]:a(h)&&s(v)?n(i(h)):{}}return(p?t:e)(h,(function(t,n,e){return f(l,t,n,e)})),l}}(),union:function(){if(Gc)return Wc;Gc=1;var t=Zh(),n=function(){if(Oc)return Ac;Oc=1;var t=xh(),n=Hh(),e=Qh();return Ac=function(r,i){return e(n(r,i,t),r+"")}}(),e=tf(),r=function(){if(qc)return Uc;qc=1;var t=Oo(),n=Oi();return Uc=function(e){return n(e)&&t(e)}}(),i=n((function(n){return e(t(n,1,r,!0))}));return Wc=i}(),values:function(){if(Jc)return Qc;Jc=1;var t=function(){if(Hc)return Zc;Hc=1;var t=Dh();return Zc=function(n,e){return t(e,(function(t){return n[t]}))}}(),n=Mo();return Qc=function(e){return null==e?[]:t(e,n(e))}}()}}catch(Bl){}Kc||(Kc=window._);var nf=Kc,ef=nf,rf=af,of="\0",uf="\0",sf="";function af(t){this._isDirected=!ef.has(t,"directed")||t.directed,this._isMultigraph=!!ef.has(t,"multigraph")&&t.multigraph,this._isCompound=!!ef.has(t,"compound")&&t.compound,this._label=void 0,this._defaultNodeLabelFn=ef.constant(void 0),this._defaultEdgeLabelFn=ef.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[uf]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}function cf(t,n){t[n]?t[n]++:t[n]=1}function hf(t,n){--t[n]||delete t[n]}function ff(t,n,e,r){var i=""+n,o=""+e;if(!t&&i>o){var u=i;i=o,o=u}return i+sf+o+sf+(ef.isUndefined(r)?of:r)}function lf(t,n){return ff(t,n.v,n.w,n.name)}af.prototype._nodeCount=0,af.prototype._edgeCount=0,af.prototype.isDirected=function(){return this._isDirected},af.prototype.isMultigraph=function(){return this._isMultigraph},af.prototype.isCompound=function(){return this._isCompound},af.prototype.setGraph=function(t){return this._label=t,this},af.prototype.graph=function(){return this._label},af.prototype.setDefaultNodeLabel=function(t){return ef.isFunction(t)||(t=ef.constant(t)),this._defaultNodeLabelFn=t,this},af.prototype.nodeCount=function(){return this._nodeCount},af.prototype.nodes=function(){return ef.keys(this._nodes)},af.prototype.sources=function(){var t=this;return ef.filter(this.nodes(),(function(n){return ef.isEmpty(t._in[n])}))},af.prototype.sinks=function(){var t=this;return ef.filter(this.nodes(),(function(n){return ef.isEmpty(t._out[n])}))},af.prototype.setNodes=function(t,n){var e=arguments,r=this;return ef.each(t,(function(t){e.length>1?r.setNode(t,n):r.setNode(t)})),this},af.prototype.setNode=function(t,n){return ef.has(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=n),this):(this._nodes[t]=arguments.length>1?n:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=uf,this._children[t]={},this._children[uf][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)},af.prototype.node=function(t){return this._nodes[t]},af.prototype.hasNode=function(t){return ef.has(this._nodes,t)},af.prototype.removeNode=function(t){var n=this;if(ef.has(this._nodes,t)){var e=function(t){n.removeEdge(n._edgeObjs[t])};delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],ef.each(this.children(t),(function(t){n.setParent(t)})),delete this._children[t]),ef.each(ef.keys(this._in[t]),e),delete this._in[t],delete this._preds[t],ef.each(ef.keys(this._out[t]),e),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this},af.prototype.setParent=function(t,n){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(ef.isUndefined(n))n=uf;else{for(var e=n+="";!ef.isUndefined(e);e=this.parent(e))if(e===t)throw new Error("Setting "+n+" as parent of "+t+" would create a cycle");this.setNode(n)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=n,this._children[n][t]=!0,this},af.prototype._removeFromParentsChildList=function(t){delete this._children[this._parent[t]][t]},af.prototype.parent=function(t){if(this._isCompound){var n=this._parent[t];if(n!==uf)return n}},af.prototype.children=function(t){if(ef.isUndefined(t)&&(t=uf),this._isCompound){var n=this._children[t];if(n)return ef.keys(n)}else{if(t===uf)return this.nodes();if(this.hasNode(t))return[]}},af.prototype.predecessors=function(t){var n=this._preds[t];if(n)return ef.keys(n)},af.prototype.successors=function(t){var n=this._sucs[t];if(n)return ef.keys(n)},af.prototype.neighbors=function(t){var n=this.predecessors(t);if(n)return ef.union(n,this.successors(t))},af.prototype.isLeaf=function(t){return 0===(this.isDirected()?this.successors(t):this.neighbors(t)).length},af.prototype.filterNodes=function(t){var n=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});n.setGraph(this.graph());var e=this;ef.each(this._nodes,(function(e,r){t(r)&&n.setNode(r,e)})),ef.each(this._edgeObjs,(function(t){n.hasNode(t.v)&&n.hasNode(t.w)&&n.setEdge(t,e.edge(t))}));var r={};function i(t){var o=e.parent(t);return void 0===o||n.hasNode(o)?(r[t]=o,o):o in r?r[o]:i(o)}return this._isCompound&&ef.each(n.nodes(),(function(t){n.setParent(t,i(t))})),n},af.prototype.setDefaultEdgeLabel=function(t){return ef.isFunction(t)||(t=ef.constant(t)),this._defaultEdgeLabelFn=t,this},af.prototype.edgeCount=function(){return this._edgeCount},af.prototype.edges=function(){return ef.values(this._edgeObjs)},af.prototype.setPath=function(t,n){var e=this,r=arguments;return ef.reduce(t,(function(t,i){return r.length>1?e.setEdge(t,i,n):e.setEdge(t,i),i})),this},af.prototype.setEdge=function(){var t,n,e,r,i=!1,o=arguments[0];"object"==typeof o&&null!==o&&"v"in o?(t=o.v,n=o.w,e=o.name,2===arguments.length&&(r=arguments[1],i=!0)):(t=o,n=arguments[1],e=arguments[3],arguments.length>2&&(r=arguments[2],i=!0)),t=""+t,n=""+n,ef.isUndefined(e)||(e=""+e);var u=ff(this._isDirected,t,n,e);if(ef.has(this._edgeLabels,u))return i&&(this._edgeLabels[u]=r),this;if(!ef.isUndefined(e)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(n),this._edgeLabels[u]=i?r:this._defaultEdgeLabelFn(t,n,e);var s=function(t,n,e,r){var i=""+n,o=""+e;if(!t&&i>o){var u=i;i=o,o=u}var s={v:i,w:o};r&&(s.name=r);return s}(this._isDirected,t,n,e);return t=s.v,n=s.w,Object.freeze(s),this._edgeObjs[u]=s,cf(this._preds[n],t),cf(this._sucs[t],n),this._in[n][u]=s,this._out[t][u]=s,this._edgeCount++,this},af.prototype.edge=function(t,n,e){var r=1===arguments.length?lf(this._isDirected,arguments[0]):ff(this._isDirected,t,n,e);return this._edgeLabels[r]},af.prototype.hasEdge=function(t,n,e){var r=1===arguments.length?lf(this._isDirected,arguments[0]):ff(this._isDirected,t,n,e);return ef.has(this._edgeLabels,r)},af.prototype.removeEdge=function(t,n,e){var r=1===arguments.length?lf(this._isDirected,arguments[0]):ff(this._isDirected,t,n,e),i=this._edgeObjs[r];return i&&(t=i.v,n=i.w,delete this._edgeLabels[r],delete this._edgeObjs[r],hf(this._preds[n],t),hf(this._sucs[t],n),delete this._in[n][r],delete this._out[t][r],this._edgeCount--),this},af.prototype.inEdges=function(t,n){var e=this._in[t];if(e){var r=ef.values(e);return n?ef.filter(r,(function(t){return t.v===n})):r}},af.prototype.outEdges=function(t,n){var e=this._out[t];if(e){var r=ef.values(e);return n?ef.filter(r,(function(t){return t.w===n})):r}},af.prototype.nodeEdges=function(t,n){var e=this.inEdges(t,n);if(e)return e.concat(this.outEdges(t,n))};var df={Graph:rf,version:"2.1.8"},pf=nf,vf=rf,gf={write:function(t){var n={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:yf(t),edges:_f(t)};pf.isUndefined(t.graph())||(n.value=pf.clone(t.graph()));return n},read:function(t){var n=new vf(t.options).setGraph(t.value);return pf.each(t.nodes,(function(t){n.setNode(t.v,t.value),t.parent&&n.setParent(t.v,t.parent)})),pf.each(t.edges,(function(t){n.setEdge({v:t.v,w:t.w,name:t.name},t.value)})),n}};function yf(t){return pf.map(t.nodes(),(function(n){var e=t.node(n),r=t.parent(n),i={v:n};return pf.isUndefined(e)||(i.value=e),pf.isUndefined(r)||(i.parent=r),i}))}function _f(t){return pf.map(t.edges(),(function(n){var e=t.edge(n),r={v:n.v,w:n.w};return pf.isUndefined(n.name)||(r.name=n.name),pf.isUndefined(e)||(r.value=e),r}))}var mf=nf,wf=function(t){var n,e={},r=[];function i(r){mf.has(e,r)||(e[r]=!0,n.push(r),mf.each(t.successors(r),i),mf.each(t.predecessors(r),i))}return mf.each(t.nodes(),(function(t){n=[],i(t),n.length&&r.push(n)})),r};var bf=nf,xf=Ef;function Ef(){this._arr=[],this._keyIndices={}}Ef.prototype.size=function(){return this._arr.length},Ef.prototype.keys=function(){return this._arr.map((function(t){return t.key}))},Ef.prototype.has=function(t){return bf.has(this._keyIndices,t)},Ef.prototype.priority=function(t){var n=this._keyIndices[t];if(void 0!==n)return this._arr[n].priority},Ef.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},Ef.prototype.add=function(t,n){var e=this._keyIndices;if(t=String(t),!bf.has(e,t)){var r=this._arr,i=r.length;return e[t]=i,r.push({key:t,priority:n}),this._decrease(i),!0}return!1},Ef.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var t=this._arr.pop();return delete this._keyIndices[t.key],this._heapify(0),t.key},Ef.prototype.decrease=function(t,n){var e=this._keyIndices[t];if(n>this._arr[e].priority)throw new Error("New priority is greater than current priority. Key: "+t+" Old: "+this._arr[e].priority+" New: "+n);this._arr[e].priority=n,this._decrease(e)},Ef.prototype._heapify=function(t){var n=this._arr,e=2*t,r=e+1,i=t;e<n.length&&(i=n[e].priority<n[i].priority?e:i,r<n.length&&(i=n[r].priority<n[i].priority?r:i),i!==t&&(this._swap(t,i),this._heapify(i)))},Ef.prototype._decrease=function(t){for(var n,e=this._arr,r=e[t].priority;0!==t&&!(e[n=t>>1].priority<r);)this._swap(t,n),t=n},Ef.prototype._swap=function(t,n){var e=this._arr,r=this._keyIndices,i=e[t],o=e[n];e[t]=o,e[n]=i,r[o.key]=t,r[i.key]=n};var jf=xf,Af=function(t,n,e,r){return function(t,n,e,r){var i,o,u={},s=new jf,a=function(t){var n=t.v!==i?t.v:t.w,r=u[n],a=e(t),c=o.distance+a;if(a<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+t+" Weight: "+a);c<r.distance&&(r.distance=c,r.predecessor=i,s.decrease(n,c))};t.nodes().forEach((function(t){var e=t===n?0:Number.POSITIVE_INFINITY;u[t]={distance:e},s.add(t,e)}));for(;s.size()>0&&(i=s.removeMin(),(o=u[i]).distance!==Number.POSITIVE_INFINITY);)r(i).forEach(a);return u}(t,String(n),e||Of,r||function(n){return t.outEdges(n)})},Of=nf.constant(1);var Mf=Af,Sf=nf,kf=function(t,n,e){return Sf.transform(t.nodes(),(function(r,i){r[i]=Mf(t,i,n,e)}),{})};var Cf=nf,Tf=function(t){var n=0,e=[],r={},i=[];function o(u){var s=r[u]={onStack:!0,lowlink:n,index:n++};if(e.push(u),t.successors(u).forEach((function(t){Cf.has(r,t)?r[t].onStack&&(s.lowlink=Math.min(s.lowlink,r[t].index)):(o(t),s.lowlink=Math.min(s.lowlink,r[t].lowlink))})),s.lowlink===s.index){var a,c=[];do{a=e.pop(),r[a].onStack=!1,c.push(a)}while(u!==a);i.push(c)}}return t.nodes().forEach((function(t){Cf.has(r,t)||o(t)})),i};var If=nf,Nf=Tf,Rf=function(t){return If.filter(Nf(t),(function(n){return n.length>1||1===n.length&&t.hasEdge(n[0],n[0])}))};var zf=function(t,n,e){return function(t,n,e){var r={},i=t.nodes();return i.forEach((function(t){r[t]={},r[t][t]={distance:0},i.forEach((function(n){t!==n&&(r[t][n]={distance:Number.POSITIVE_INFINITY})})),e(t).forEach((function(e){var i=e.v===t?e.w:e.v,o=n(e);r[t][i]={distance:o,predecessor:t}}))})),i.forEach((function(t){var n=r[t];i.forEach((function(e){var o=r[e];i.forEach((function(e){var r=o[t],i=n[e],u=o[e],s=r.distance+i.distance;s<u.distance&&(u.distance=s,u.predecessor=i.predecessor)}))}))})),r}(t,n||Pf,e||function(n){return t.outEdges(n)})},Pf=nf.constant(1);var Df=nf,Lf=Ff;function Ff(t){var n={},e={},r=[];if(Df.each(t.sinks(),(function i(o){if(Df.has(e,o))throw new Bf;Df.has(n,o)||(e[o]=!0,n[o]=!0,Df.each(t.predecessors(o),i),delete e[o],r.push(o))})),Df.size(n)!==t.nodeCount())throw new Bf;return r}function Bf(){}Ff.CycleException=Bf,Bf.prototype=new Error;var $f=Lf;var Vf=nf,Xf=function(t,n,e){Vf.isArray(n)||(n=[n]);var r=(t.isDirected()?t.successors:t.neighbors).bind(t),i=[],o={};return Vf.each(n,(function(n){if(!t.hasNode(n))throw new Error("Graph does not have node: "+n);Yf(t,n,"post"===e,o,r,i)})),i};function Yf(t,n,e,r,i,o){Vf.has(r,n)||(r[n]=!0,e||o.push(n),Vf.each(i(n),(function(n){Yf(t,n,e,r,i,o)})),e&&o.push(n))}var Uf=Xf;var qf=Xf;var Wf=nf,Gf=rf,Zf=xf;var Hf={Graph:df.Graph,json:gf,alg:{components:wf,dijkstra:Af,dijkstraAll:kf,findCycles:Rf,floydWarshall:zf,isAcyclic:function(t){try{$f(t)}catch(Bl){if(Bl instanceof $f.CycleException)return!1;throw Bl}return!0},postorder:function(t,n){return Uf(t,n,"post")},preorder:function(t,n){return qf(t,n,"pre")},prim:function(t,n){var e,r=new Gf,i={},o=new Zf;function u(t){var r=t.v===e?t.w:t.v,u=o.priority(r);if(void 0!==u){var s=n(t);s<u&&(i[r]=e,o.decrease(r,s))}}if(0===t.nodeCount())return r;Wf.each(t.nodes(),(function(t){o.add(t,Number.POSITIVE_INFINITY),r.setNode(t)})),o.decrease(t.nodes()[0],0);var s=!1;for(;o.size()>0;){if(e=o.removeMin(),Wf.has(i,e))r.setEdge(e,i[e]);else{if(s)throw new Error("Input graph is not connected: "+t);s=!0}t.nodeEdges(e).forEach(u)}return r},tarjan:Tf,topsort:Lf},version:df.version};var Qf,Jf,Kf={exports:{}};
/**
* @license
* Lodash <https://lodash.com/>
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/Qf=Kf,Jf=Kf.exports,function(){var t,n="Expected a function",e="__lodash_hash_undefined__",r="__lodash_placeholder__",i=16,o=32,u=64,s=128,a=256,c=1/0,h=9007199254740991,f=NaN,l=4294967295,d=[["ary",s],["bind",1],["bindKey",2],["curry",8],["curryRight",i],["flip",512],["partial",o],["partialRight",u],["rearg",a]],p="[object Arguments]",v="[object Array]",g="[object Boolean]",y="[object Date]",_="[object Error]",m="[object Function]",w="[object GeneratorFunction]",b="[object Map]",x="[object Number]",E="[object Object]",j="[object Promise]",A="[object RegExp]",O="[object Set]",M="[object String]",S="[object Symbol]",k="[object WeakMap]",C="[object ArrayBuffer]",T="[object DataView]",I="[object Float32Array]",N="[object Float64Array]",R="[object Int8Array]",z="[object Int16Array]",P="[object Int32Array]",D="[object Uint8Array]",L="[object Uint8ClampedArray]",F="[object Uint16Array]",B="[object Uint32Array]",$=/\b__p \+= '';/g,V=/\b(__p \+=) '' \+/g,X=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Y=/&(?:amp|lt|gt|quot|#39);/g,U=/[&<>"']/g,q=RegExp(Y.source),W=RegExp(U.source),G=/<%-([\s\S]+?)%>/g,Z=/<%([\s\S]+?)%>/g,H=/<%=([\s\S]+?)%>/g,Q=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,J=/^\w*$/,K=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,tt=/[\\^$.*+?()[\]{}|]/g,nt=RegExp(tt.source),et=/^\s+/,rt=/\s/,it=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ot=/\{\n\/\* \[wrapped with (.+)\] \*/,ut=/,? & /,st=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,at=/[()=,{}\[\]\/\s]/,ct=/\\(\\)?/g,ht=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ft=/\w*$/,lt=/^[-+]0x[0-9a-f]+$/i,dt=/^0b[01]+$/i,pt=/^\[object .+?Constructor\]$/,vt=/^0o[0-7]+$/i,gt=/^(?:0|[1-9]\d*)$/,yt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,_t=/($^)/,mt=/['\n\r\u2028\u2029\\]/g,wt="\\ud800-\\udfff",bt="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",xt="\\u2700-\\u27bf",Et="a-z\\xdf-\\xf6\\xf8-\\xff",jt="A-Z\\xc0-\\xd6\\xd8-\\xde",At="\\ufe0e\\ufe0f",Ot="\\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",Mt="[']",St="["+wt+"]",kt="["+Ot+"]",Ct="["+bt+"]",Tt="\\d+",It="["+xt+"]",Nt="["+Et+"]",Rt="[^"+wt+Ot+Tt+xt+Et+jt+"]",zt="\\ud83c[\\udffb-\\udfff]",Pt="[^"+wt+"]",Dt="(?:\\ud83c[\\udde6-\\uddff]){2}",Lt="[\\ud800-\\udbff][\\udc00-\\udfff]",Ft="["+jt+"]",Bt="\\u200d",$t="(?:"+Nt+"|"+Rt+")",Vt="(?:"+Ft+"|"+Rt+")",Xt="(?:['](?:d|ll|m|re|s|t|ve))?",Yt="(?:['](?:D|LL|M|RE|S|T|VE))?",Ut="(?:"+Ct+"|"+zt+")?",qt="["+At+"]?",Wt=qt+Ut+"(?:"+Bt+"(?:"+[Pt,Dt,Lt].join("|")+")"+qt+Ut+")*",Gt="(?:"+[It,Dt,Lt].join("|")+")"+Wt,Zt="(?:"+[Pt+Ct+"?",Ct,Dt,Lt,St].join("|")+")",Ht=RegExp(Mt,"g"),Qt=RegExp(Ct,"g"),Jt=RegExp(zt+"(?="+zt+")|"+Zt+Wt,"g"),Kt=RegExp([Ft+"?"+Nt+"+"+Xt+"(?="+[kt,Ft,"$"].join("|")+")",Vt+"+"+Yt+"(?="+[kt,Ft+$t,"$"].join("|")+")",Ft+"?"+$t+"+"+Xt,Ft+"+"+Yt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Tt,Gt].join("|"),"g"),tn=RegExp("["+Bt+wt+bt+At+"]"),nn=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,en=["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"],rn=-1,on={};on[I]=on[N]=on[R]=on[z]=on[P]=on[D]=on[L]=on[F]=on[B]=!0,on[p]=on[v]=on[C]=on[g]=on[T]=on[y]=on[_]=on[m]=on[b]=on[x]=on[E]=on[A]=on[O]=on[M]=on[k]=!1;var un={};un[p]=un[v]=un[C]=un[T]=un[g]=un[y]=un[I]=un[N]=un[R]=un[z]=un[P]=un[b]=un[x]=un[E]=un[A]=un[O]=un[M]=un[S]=un[D]=un[L]=un[F]=un[B]=!0,un[_]=un[m]=un[k]=!1;var sn={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},an=parseFloat,cn=parseInt,hn="object"==typeof ni&&ni&&ni.Object===Object&&ni,fn="object"==typeof self&&self&&self.Object===Object&&self,ln=hn||fn||Function("return this")(),dn=Jf&&!Jf.nodeType&&Jf,pn=dn&&Qf&&!Qf.nodeType&&Qf,vn=pn&&pn.exports===dn,gn=vn&&hn.process,yn=function(){try{var t=pn&&pn.require&&pn.require("util").types;return t||gn&&gn.binding&&gn.binding("util")}catch(Bl){}}(),_n=yn&&yn.isArrayBuffer,mn=yn&&yn.isDate,wn=yn&&yn.isMap,bn=yn&&yn.isRegExp,xn=yn&&yn.isSet,En=yn&&yn.isTypedArray;function jn(t,n,e){switch(e.length){case 0:return t.call(n);case 1:return t.call(n,e[0]);case 2:return t.call(n,e[0],e[1]);case 3:return t.call(n,e[0],e[1],e[2])}return t.apply(n,e)}function An(t,n,e,r){for(var i=-1,o=null==t?0:t.length;++i<o;){var u=t[i];n(r,u,e(u),t)}return r}function On(t,n){for(var e=-1,r=null==t?0:t.length;++e<r&&!1!==n(t[e],e,t););return t}function Mn(t,n){for(var e=null==t?0:t.length;e--&&!1!==n(t[e],e,t););return t}function Sn(t,n){for(var e=-1,r=null==t?0:t.length;++e<r;)if(!n(t[e],e,t))return!1;return!0}function kn(t,n){for(var e=-1,r=null==t?0:t.length,i=0,o=[];++e<r;){var u=t[e];n(u,e,t)&&(o[i++]=u)}return o}function Cn(t,n){return!(null==t||!t.length)&&Bn(t,n,0)>-1}function Tn(t,n,e){for(var r=-1,i=null==t?0:t.length;++r<i;)if(e(n,t[r]))return!0;return!1}function In(t,n){for(var e=-1,r=null==t?0:t.length,i=Array(r);++e<r;)i[e]=n(t[e],e,t);return i}function Nn(t,n){for(var e=-1,r=n.length,i=t.length;++e<r;)t[i+e]=n[e];return t}function Rn(t,n,e,r){var i=-1,o=null==t?0:t.length;for(r&&o&&(e=t[++i]);++i<o;)e=n(e,t[i],i,t);return e}function zn(t,n,e,r){var i=null==t?0:t.length;for(r&&i&&(e=t[--i]);i--;)e=n(e,t[i],i,t);return e}function Pn(t,n){for(var e=-1,r=null==t?0:t.length;++e<r;)if(n(t[e],e,t))return!0;return!1}var Dn=Yn("length");function Ln(t,n,e){var r;return e(t,(function(t,e,i){if(n(t,e,i))return r=e,!1})),r}function Fn(t,n,e,r){for(var i=t.length,o=e+(r?1:-1);r?o--:++o<i;)if(n(t[o],o,t))return o;return-1}function Bn(t,n,e){return n==n?function(t,n,e){for(var r=e-1,i=t.length;++r<i;)if(t[r]===n)return r;return-1}(t,n,e):Fn(t,Vn,e)}function $n(t,n,e,r){for(var i=e-1,o=t.length;++i<o;)if(r(t[i],n))return i;return-1}function Vn(t){return t!=t}function Xn(t,n){var e=null==t?0:t.length;return e?Wn(t,n)/e:f}function Yn(n){return function(e){return null==e?t:e[n]}}function Un(n){return function(e){return null==n?t:n[e]}}function qn(t,n,e,r,i){return i(t,(function(t,i,o){e=r?(r=!1,t):n(e,t,i,o)})),e}function Wn(n,e){for(var r,i=-1,o=n.length;++i<o;){var u=e(n[i]);u!==t&&(r=r===t?u:r+u)}return r}function Gn(t,n){for(var e=-1,r=Array(t);++e<t;)r[e]=n(e);return r}function Zn(t){return t?t.slice(0,fe(t)+1).replace(et,""):t}function Hn(t){return function(n){return t(n)}}function Qn(t,n){return In(n,(function(n){return t[n]}))}function Jn(t,n){return t.has(n)}function Kn(t,n){for(var e=-1,r=t.length;++e<r&&Bn(n,t[e],0)>-1;);return e}function te(t,n){for(var e=t.length;e--&&Bn(n,t[e],0)>-1;);return e}var ne=Un({"À":"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"}),ee=Un({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function re(t){return"\\"+sn[t]}function ie(t){return tn.test(t)}function oe(t){var n=-1,e=Array(t.size);return t.forEach((function(t,r){e[++n]=[r,t]})),e}function ue(t,n){return function(e){return t(n(e))}}function se(t,n){for(var e=-1,i=t.length,o=0,u=[];++e<i;){var s=t[e];s!==n&&s!==r||(t[e]=r,u[o++]=e)}return u}function ae(t){var n=-1,e=Array(t.size);return t.forEach((function(t){e[++n]=t})),e}function ce(t){return ie(t)?function(t){for(var n=Jt.lastIndex=0;Jt.test(t);)++n;return n}(t):Dn(t)}function he(t){return ie(t)?function(t){return t.match(Jt)||[]}(t):function(t){return t.split("")}(t)}function fe(t){for(var n=t.length;n--&&rt.test(t.charAt(n)););return n}var le=Un({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),de=function rt(wt){var bt,xt=(wt=null==wt?ln:de.defaults(ln.Object(),wt,de.pick(ln,en))).Array,Et=wt.Date,jt=wt.Error,At=wt.Function,Ot=wt.Math,Mt=wt.Object,St=wt.RegExp,kt=wt.String,Ct=wt.TypeError,Tt=xt.prototype,It=At.prototype,Nt=Mt.prototype,Rt=wt["__core-js_shared__"],zt=It.toString,Pt=Nt.hasOwnProperty,Dt=0,Lt=(bt=/[^.]+$/.exec(Rt&&Rt.keys&&Rt.keys.IE_PROTO||""))?"Symbol(src)_1."+bt:"",Ft=Nt.toString,Bt=zt.call(Mt),$t=ln._,Vt=St("^"+zt.call(Pt).replace(tt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Xt=vn?wt.Buffer:t,Yt=wt.Symbol,Ut=wt.Uint8Array,qt=Xt?Xt.allocUnsafe:t,Wt=ue(Mt.getPrototypeOf,Mt),Gt=Mt.create,Zt=Nt.propertyIsEnumerable,Jt=Tt.splice,tn=Yt?Yt.isConcatSpreadable:t,sn=Yt?Yt.iterator:t,hn=Yt?Yt.toStringTag:t,fn=function(){try{var t=fo(Mt,"defineProperty");return t({},"",{}),t}catch(Bl){}}(),dn=wt.clearTimeout!==ln.clearTimeout&&wt.clearTimeout,pn=Et&&Et.now!==ln.Date.now&&Et.now,gn=wt.setTimeout!==ln.setTimeout&&wt.setTimeout,yn=Ot.ceil,Dn=Ot.floor,Un=Mt.getOwnPropertySymbols,pe=Xt?Xt.isBuffer:t,ve=wt.isFinite,ge=Tt.join,ye=ue(Mt.keys,Mt),_e=Ot.max,me=Ot.min,we=Et.now,be=wt.parseInt,xe=Ot.random,Ee=Tt.reverse,je=fo(wt,"DataView"),Ae=fo(wt,"Map"),Oe=fo(wt,"Promise"),Me=fo(wt,"Set"),Se=fo(wt,"WeakMap"),ke=fo(Mt,"create"),Ce=Se&&new Se,Te={},Ie=$o(je),Ne=$o(Ae),Re=$o(Oe),ze=$o(Me),Pe=$o(Se),De=Yt?Yt.prototype:t,Le=De?De.valueOf:t,Fe=De?De.toString:t;function Be(t){if(is(t)&&!Wu(t)&&!(t instanceof Ye)){if(t instanceof Xe)return t;if(Pt.call(t,"__wrapped__"))return Vo(t)}return new Xe(t)}var $e=function(){function n(){}return function(e){if(!rs(e))return{};if(Gt)return Gt(e);n.prototype=e;var r=new n;return n.prototype=t,r}}();function Ve(){}function Xe(n,e){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=t}function Ye(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=l,this.__views__=[]}function Ue(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n<e;){var r=t[n];this.set(r[0],r[1])}}function qe(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n<e;){var r=t[n];this.set(r[0],r[1])}}function We(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n<e;){var r=t[n];this.set(r[0],r[1])}}function Ge(t){var n=-1,e=null==t?0:t.length;for(this.__data__=new We;++n<e;)this.add(t[n])}function Ze(t){var n=this.__data__=new qe(t);this.size=n.size}function He(t,n){var e=Wu(t),r=!e&&qu(t),i=!e&&!r&&Qu(t),o=!e&&!r&&!i&&ls(t),u=e||r||i||o,s=u?Gn(t.length,kt):[],a=s.length;for(var c in t)!n&&!Pt.call(t,c)||u&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||mo(c,a))||s.push(c);return s}function Qe(n){var e=n.length;return e?n[Gr(0,e-1)]:t}function Je(t,n){return zo(ki(t),sr(n,0,t.length))}function Ke(t){return zo(ki(t))}function tr(n,e,r){(r!==t&&!Xu(n[e],r)||r===t&&!(e in n))&&or(n,e,r)}function nr(n,e,r){var i=n[e];Pt.call(n,e)&&Xu(i,r)&&(r!==t||e in n)||or(n,e,r)}function er(t,n){for(var e=t.length;e--;)if(Xu(t[e][0],n))return e;return-1}function rr(t,n,e,r){return lr(t,(function(t,i,o){n(r,t,e(t),o)})),r}function ir(t,n){return t&&Ci(n,Rs(n),t)}function or(t,n,e){"__proto__"==n&&fn?fn(t,n,{configurable:!0,enumerable:!0,value:e,writable:!0}):t[n]=e}function ur(n,e){for(var r=-1,i=e.length,o=xt(i),u=null==n;++r<i;)o[r]=u?t:ks(n,e[r]);return o}function sr(n,e,r){return n==n&&(r!==t&&(n=n<=r?n:r),e!==t&&(n=n>=e?n:e)),n}function ar(n,e,r,i,o,u){var s,a=1&e,c=2&e,h=4&e;if(r&&(s=o?r(n,i,o,u):r(n)),s!==t)return s;if(!rs(n))return n;var f=Wu(n);if(f){if(s=function(t){var n=t.length,e=new t.constructor(n);return n&&"string"==typeof t[0]&&Pt.call(t,"index")&&(e.index=t.index,e.input=t.input),e}(n),!a)return ki(n,s)}else{var l=vo(n),d=l==m||l==w;if(Qu(n))return Ei(n,a);if(l==E||l==p||d&&!o){if(s=c||d?{}:yo(n),!a)return c?function(t,n){return Ci(t,po(t),n)}(n,function(t,n){return t&&Ci(n,zs(n),t)}(s,n)):function(t,n){return Ci(t,lo(t),n)}(n,ir(s,n))}else{if(!un[l])return o?n:{};s=function(t,n,e){var r,i=t.constructor;switch(n){case C:return ji(t);case g:case y:return new i(+t);case T:return function(t,n){var e=n?ji(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.byteLength)}(t,e);case I:case N:case R:case z:case P:case D:case L:case F:case B:return Ai(t,e);case b:return new i;case x:case M:return new i(t);case A:return function(t){var n=new t.constructor(t.source,ft.exec(t));return n.lastIndex=t.lastIndex,n}(t);case O:return new i;case S:return r=t,Le?Mt(Le.call(r)):{}}}(n,l,a)}}u||(u=new Ze);var v=u.get(n);if(v)return v;u.set(n,s),cs(n)?n.forEach((function(t){s.add(ar(t,e,r,t,n,u))})):os(n)&&n.forEach((function(t,i){s.set(i,ar(t,e,r,i,n,u))}));var _=f?t:(h?c?io:ro:c?zs:Rs)(n);return On(_||n,(function(t,i){_&&(t=n[i=t]),nr(s,i,ar(t,e,r,i,n,u))})),s}function cr(n,e,r){var i=r.length;if(null==n)return!i;for(n=Mt(n);i--;){var o=r[i],u=e[o],s=n[o];if(s===t&&!(o in n)||!u(s))return!1}return!0}function hr(e,r,i){if("function"!=typeof e)throw new Ct(n);return To((function(){e.apply(t,i)}),r)}function fr(t,n,e,r){var i=-1,o=Cn,u=!0,s=t.length,a=[],c=n.length;if(!s)return a;e&&(n=In(n,Hn(e))),r?(o=Tn,u=!1):n.length>=200&&(o=Jn,u=!1,n=new Ge(n));t:for(;++i<s;){var h=t[i],f=null==e?h:e(h);if(h=r||0!==h?h:0,u&&f==f){for(var l=c;l--;)if(n[l]===f)continue t;a.push(h)}else o(n,f,r)||a.push(h)}return a}Be.templateSettings={escape:G,evaluate:Z,interpolate:H,variable:"",imports:{_:Be}},Be.prototype=Ve.prototype,Be.prototype.constructor=Be,Xe.prototype=$e(Ve.prototype),Xe.prototype.constructor=Xe,Ye.prototype=$e(Ve.prototype),Ye.prototype.constructor=Ye,Ue.prototype.clear=function(){this.__data__=ke?ke(null):{},this.size=0},Ue.prototype.delete=function(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n},Ue.prototype.get=function(n){var r=this.__data__;if(ke){var i=r[n];return i===e?t:i}return Pt.call(r,n)?r[n]:t},Ue.prototype.has=function(n){var e=this.__data__;return ke?e[n]!==t:Pt.call(e,n)},Ue.prototype.set=function(n,r){var i=this.__data__;return this.size+=this.has(n)?0:1,i[n]=ke&&r===t?e:r,this},qe.prototype.clear=function(){this.__data__=[],this.size=0},qe.prototype.delete=function(t){var n=this.__data__,e=er(n,t);return!(e<0||(e==n.length-1?n.pop():Jt.call(n,e,1),--this.size,0))},qe.prototype.get=function(n){var e=this.__data__,r=er(e,n);return r<0?t:e[r][1]},qe.prototype.has=function(t){return er(this.__data__,t)>-1},qe.prototype.set=function(t,n){var e=this.__data__,r=er(e,t);return r<0?(++this.size,e.push([t,n])):e[r][1]=n,this},We.prototype.clear=function(){this.size=0,this.__data__={hash:new Ue,map:new(Ae||qe),string:new Ue}},We.prototype.delete=function(t){var n=co(this,t).delete(t);return this.size-=n?1:0,n},We.prototype.get=function(t){return co(this,t).get(t)},We.prototype.has=function(t){return co(this,t).has(t)},We.prototype.set=function(t,n){var e=co(this,t),r=e.size;return e.set(t,n),this.size+=e.size==r?0:1,this},Ge.prototype.add=Ge.prototype.push=function(t){return this.__data__.set(t,e),this},Ge.prototype.has=function(t){return this.__data__.has(t)},Ze.prototype.clear=function(){this.__data__=new qe,this.size=0},Ze.prototype.delete=function(t){var n=this.__data__,e=n.delete(t);return this.size=n.size,e},Ze.prototype.get=function(t){return this.__data__.get(t)},Ze.prototype.has=function(t){return this.__data__.has(t)},Ze.prototype.set=function(t,n){var e=this.__data__;if(e instanceof qe){var r=e.__data__;if(!Ae||r.length<199)return r.push([t,n]),this.size=++e.size,this;e=this.__data__=new We(r)}return e.set(t,n),this.size=e.size,this};var lr=Ni(wr),dr=Ni(br,!0);function pr(t,n){var e=!0;return lr(t,(function(t,r,i){return e=!!n(t,r,i)})),e}function vr(n,e,r){for(var i=-1,o=n.length;++i<o;){var u=n[i],s=e(u);if(null!=s&&(a===t?s==s&&!fs(s):r(s,a)))var a=s,c=u}return c}function gr(t,n){var e=[];return lr(t,(function(t,r,i){n(t,r,i)&&e.push(t)})),e}function yr(t,n,e,r,i){var o=-1,u=t.length;for(e||(e=_o),i||(i=[]);++o<u;){var s=t[o];n>0&&e(s)?n>1?yr(s,n-1,e,r,i):Nn(i,s):r||(i[i.length]=s)}return i}var _r=Ri(),mr=Ri(!0);function wr(t,n){return t&&_r(t,n,Rs)}function br(t,n){return t&&mr(t,n,Rs)}function xr(t,n){return kn(n,(function(n){return ts(t[n])}))}function Er(n,e){for(var r=0,i=(e=mi(e,n)).length;null!=n&&r<i;)n=n[Bo(e[r++])];return r&&r==i?n:t}function jr(t,n,e){var r=n(t);return Wu(t)?r:Nn(r,e(t))}function Ar(n){return null==n?n===t?"[object Undefined]":"[object Null]":hn&&hn in Mt(n)?function(n){var e=Pt.call(n,hn),r=n[hn];try{n[hn]=t;var i=!0}catch(Bl){}var o=Ft.call(n);return i&&(e?n[hn]=r:delete n[hn]),o}(n):function(t){return Ft.call(t)}(n)}function Or(t,n){return t>n}function Mr(t,n){return null!=t&&Pt.call(t,n)}function Sr(t,n){return null!=t&&n in Mt(t)}function kr(n,e,r){for(var i=r?Tn:Cn,o=n[0].length,u=n.length,s=u,a=xt(u),c=1/0,h=[];s--;){var f=n[s];s&&e&&(f=In(f,Hn(e))),c=me(f.length,c),a[s]=!r&&(e||o>=120&&f.length>=120)?new Ge(s&&f):t}f=n[0];var l=-1,d=a[0];t:for(;++l<o&&h.length<c;){var p=f[l],v=e?e(p):p;if(p=r||0!==p?p:0,!(d?Jn(d,v):i(h,v,r))){for(s=u;--s;){var g=a[s];if(!(g?Jn(g,v):i(n[s],v,r)))continue t}d&&d.push(v),h.push(p)}}return h}function Cr(n,e,r){var i=null==(n=So(n,e=mi(e,n)))?n:n[Bo(Ko(e))];return null==i?t:jn(i,n,r)}function Tr(t){return is(t)&&Ar(t)==p}function Ir(n,e,r,i,o){return n===e||(null==n||null==e||!is(n)&&!is(e)?n!=n&&e!=e:function(n,e,r,i,o,u){var s=Wu(n),a=Wu(e),c=s?v:vo(n),h=a?v:vo(e),f=(c=c==p?E:c)==E,l=(h=h==p?E:h)==E,d=c==h;if(d&&Qu(n)){if(!Qu(e))return!1;s=!0,f=!1}if(d&&!f)return u||(u=new Ze),s||ls(n)?no(n,e,r,i,o,u):function(t,n,e,r,i,o,u){switch(e){case T:if(t.byteLength!=n.byteLength||t.byteOffset!=n.byteOffset)return!1;t=t.buffer,n=n.buffer;case C:return!(t.byteLength!=n.byteLength||!o(new Ut(t),new Ut(n)));case g:case y:case x:return Xu(+t,+n);case _:return t.name==n.name&&t.message==n.message;case A:case M:return t==n+"";case b:var s=oe;case O:var a=1&r;if(s||(s=ae),t.size!=n.size&&!a)return!1;var c=u.get(t);if(c)return c==n;r|=2,u.set(t,n);var h=no(s(t),s(n),r,i,o,u);return u.delete(t),h;case S:if(Le)return Le.call(t)==Le.call(n)}return!1}(n,e,c,r,i,o,u);if(!(1&r)){var m=f&&Pt.call(n,"__wrapped__"),w=l&&Pt.call(e,"__wrapped__");if(m||w){var j=m?n.value():n,k=w?e.value():e;return u||(u=new Ze),o(j,k,r,i,u)}}return!!d&&(u||(u=new Ze),function(n,e,r,i,o,u){var s=1&r,a=ro(n),c=a.length,h=ro(e),f=h.length;if(c!=f&&!s)return!1;for(var l=c;l--;){var d=a[l];if(!(s?d in e:Pt.call(e,d)))return!1}var p=u.get(n),v=u.get(e);if(p&&v)return p==e&&v==n;var g=!0;u.set(n,e),u.set(e,n);for(var y=s;++l<c;){var _=n[d=a[l]],m=e[d];if(i)var w=s?i(m,_,d,e,n,u):i(_,m,d,n,e,u);if(!(w===t?_===m||o(_,m,r,i,u):w)){g=!1;break}y||(y="constructor"==d)}if(g&&!y){var b=n.constructor,x=e.constructor;b==x||!("constructor"in n)||!("constructor"in e)||"function"==typeof b&&b instanceof b&&"function"==typeof x&&x instanceof x||(g=!1)}return u.delete(n),u.delete(e),g}(n,e,r,i,o,u))}(n,e,r,i,Ir,o))}function Nr(n,e,r,i){var o=r.length,u=o,s=!i;if(null==n)return!u;for(n=Mt(n);o--;){var a=r[o];if(s&&a[2]?a[1]!==n[a[0]]:!(a[0]in n))return!1}for(;++o<u;){var c=(a=r[o])[0],h=n[c],f=a[1];if(s&&a[2]){if(h===t&&!(c in n))return!1}else{var l=new Ze;if(i)var d=i(h,f,c,n,e,l);if(!(d===t?Ir(f,h,3,i,l):d))return!1}}return!0}function Rr(t){return!(!rs(t)||(n=t,Lt&&Lt in n))&&(ts(t)?Vt:pt).test($o(t));var n}function zr(t){return"function"==typeof t?t:null==t?ua:"object"==typeof t?Wu(t)?$r(t[0],t[1]):Br(t):va(t)}function Pr(t){if(!jo(t))return ye(t);var n=[];for(var e in Mt(t))Pt.call(t,e)&&"constructor"!=e&&n.push(e);return n}function Dr(t){if(!rs(t))return function(t){var n=[];if(null!=t)for(var e in Mt(t))n.push(e);return n}(t);var n=jo(t),e=[];for(var r in t)("constructor"!=r||!n&&Pt.call(t,r))&&e.push(r);return e}function Lr(t,n){return t<n}function Fr(t,n){var e=-1,r=Zu(t)?xt(t.length):[];return lr(t,(function(t,i,o){r[++e]=n(t,i,o)})),r}function Br(t){var n=ho(t);return 1==n.length&&n[0][2]?Oo(n[0][0],n[0][1]):function(e){return e===t||Nr(e,t,n)}}function $r(n,e){return bo(n)&&Ao(e)?Oo(Bo(n),e):function(r){var i=ks(r,n);return i===t&&i===e?Cs(r,n):Ir(e,i,3)}}function Vr(n,e,r,i,o){n!==e&&_r(e,(function(u,s){if(o||(o=new Ze),rs(u))!function(n,e,r,i,o,u,s){var a=ko(n,r),c=ko(e,r),h=s.get(c);if(h)tr(n,r,h);else{var f=u?u(a,c,r+"",n,e,s):t,l=f===t;if(l){var d=Wu(c),p=!d&&Qu(c),v=!d&&!p&&ls(c);f=c,d||p||v?Wu(a)?f=a:Hu(a)?f=ki(a):p?(l=!1,f=Ei(c,!0)):v?(l=!1,f=Ai(c,!0)):f=[]:ss(c)||qu(c)?(f=a,qu(a)?f=ws(a):rs(a)&&!ts(a)||(f=yo(c))):l=!1}l&&(s.set(c,f),o(f,c,i,u,s),s.delete(c)),tr(n,r,f)}}(n,e,s,r,Vr,i,o);else{var a=i?i(ko(n,s),u,s+"",n,e,o):t;a===t&&(a=u),tr(n,s,a)}}),zs)}function Xr(n,e){var r=n.length;if(r)return mo(e+=e<0?r:0,r)?n[e]:t}function Yr(t,n,e){n=n.length?In(n,(function(t){return Wu(t)?function(n){return Er(n,1===t.length?t[0]:t)}:t})):[ua];var r=-1;return n=In(n,Hn(ao())),function(t,n){var e=t.length;for(t.sort(n);e--;)t[e]=t[e].value;return t}(Fr(t,(function(t,e,i){return{criteria:In(n,(function(n){return n(t)})),index:++r,value:t}})),(function(t,n){return function(t,n,e){for(var r=-1,i=t.criteria,o=n.criteria,u=i.length,s=e.length;++r<u;){var a=Oi(i[r],o[r]);if(a)return r>=s?a:a*("desc"==e[r]?-1:1)}return t.index-n.index}(t,n,e)}))}function Ur(t,n,e){for(var r=-1,i=n.length,o={};++r<i;){var u=n[r],s=Er(t,u);e(s,u)&&Kr(o,mi(u,t),s)}return o}function qr(t,n,e,r){var i=r?$n:Bn,o=-1,u=n.length,s=t;for(t===n&&(n=ki(n)),e&&(s=In(t,Hn(e)));++o<u;)for(var a=0,c=n[o],h=e?e(c):c;(a=i(s,h,a,r))>-1;)s!==t&&Jt.call(s,a,1),Jt.call(t,a,1);return t}function Wr(t,n){for(var e=t?n.length:0,r=e-1;e--;){var i=n[e];if(e==r||i!==o){var o=i;mo(i)?Jt.call(t,i,1):fi(t,i)}}return t}function Gr(t,n){return t+Dn(xe()*(n-t+1))}function Zr(t,n){var e="";if(!t||n<1||n>h)return e;do{n%2&&(e+=t),(n=Dn(n/2))&&(t+=t)}while(n);return e}function Hr(t,n){return Io(Mo(t,n,ua),t+"")}function Qr(t){return Qe(Xs(t))}function Jr(t,n){var e=Xs(t);return zo(e,sr(n,0,e.length))}function Kr(n,e,r,i){if(!rs(n))return n;for(var o=-1,u=(e=mi(e,n)).length,s=u-1,a=n;null!=a&&++o<u;){var c=Bo(e[o]),h=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return n;if(o!=s){var f=a[c];(h=i?i(f,c,a):t)===t&&(h=rs(f)?f:mo(e[o+1])?[]:{})}nr(a,c,h),a=a[c]}return n}var ti=Ce?function(t,n){return Ce.set(t,n),t}:ua,ni=fn?function(t,n){return fn(t,"toString",{configurable:!0,enumerable:!1,value:ra(n),writable:!0})}:ua;function ei(t){return zo(Xs(t))}function ri(t,n,e){var r=-1,i=t.length;n<0&&(n=-n>i?0:i+n),(e=e>i?i:e)<0&&(e+=i),i=n>e?0:e-n>>>0,n>>>=0;for(var o=xt(i);++r<i;)o[r]=t[r+n];return o}function ii(t,n){var e;return lr(t,(function(t,r,i){return!(e=n(t,r,i))})),!!e}function oi(t,n,e){var r=0,i=null==t?r:t.length;if("number"==typeof n&&n==n&&i<=2147483647){for(;r<i;){var o=r+i>>>1,u=t[o];null!==u&&!fs(u)&&(e?u<=n:u<n)?r=o+1:i=o}return i}return ui(t,n,ua,e)}function ui(n,e,r,i){var o=0,u=null==n?0:n.length;if(0===u)return 0;for(var s=(e=r(e))!=e,a=null===e,c=fs(e),h=e===t;o<u;){var f=Dn((o+u)/2),l=r(n[f]),d=l!==t,p=null===l,v=l==l,g=fs(l);if(s)var y=i||v;else y=h?v&&(i||d):a?v&&d&&(i||!p):c?v&&d&&!p&&(i||!g):!p&&!g&&(i?l<=e:l<e);y?o=f+1:u=f}return me(u,4294967294)}function si(t,n){for(var e=-1,r=t.length,i=0,o=[];++e<r;){var u=t[e],s=n?n(u):u;if(!e||!Xu(s,a)){var a=s;o[i++]=0===u?0:u}}return o}function ai(t){return"number"==typeof t?t:fs(t)?f:+t}function ci(t){if("string"==typeof t)return t;if(Wu(t))return In(t,ci)+"";if(fs(t))return Fe?Fe.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}function hi(t,n,e){var r=-1,i=Cn,o=t.length,u=!0,s=[],a=s;if(e)u=!1,i=Tn;else if(o>=200){var c=n?null:Zi(t);if(c)return ae(c);u=!1,i=Jn,a=new Ge}else a=n?[]:s;t:for(;++r<o;){var h=t[r],f=n?n(h):h;if(h=e||0!==h?h:0,u&&f==f){for(var l=a.length;l--;)if(a[l]===f)continue t;n&&a.push(f),s.push(h)}else i(a,f,e)||(a!==s&&a.push(f),s.push(h))}return s}function fi(t,n){return null==(t=So(t,n=mi(n,t)))||delete t[Bo(Ko(n))]}function li(t,n,e,r){return Kr(t,n,e(Er(t,n)),r)}function di(t,n,e,r){for(var i=t.length,o=r?i:-1;(r?o--:++o<i)&&n(t[o],o,t););return e?ri(t,r?0:o,r?o+1:i):ri(t,r?o+1:0,r?i:o)}function pi(t,n){var e=t;return e instanceof Ye&&(e=e.value()),Rn(n,(function(t,n){return n.func.apply(n.thisArg,Nn([t],n.args))}),e)}function vi(t,n,e){var r=t.length;if(r<2)return r?hi(t[0]):[];for(var i=-1,o=xt(r);++i<r;)for(var u=t[i],s=-1;++s<r;)s!=i&&(o[i]=fr(o[i]||u,t[s],n,e));return hi(yr(o,1),n,e)}function gi(n,e,r){for(var i=-1,o=n.length,u=e.length,s={};++i<o;){var a=i<u?e[i]:t;r(s,n[i],a)}return s}function yi(t){return Hu(t)?t:[]}function _i(t){return"function"==typeof t?t:ua}function mi(t,n){return Wu(t)?t:bo(t,n)?[t]:Fo(bs(t))}var wi=Hr;function bi(n,e,r){var i=n.length;return r=r===t?i:r,!e&&r>=i?n:ri(n,e,r)}var xi=dn||function(t){return ln.clearTimeout(t)};function Ei(t,n){if(n)return t.slice();var e=t.length,r=qt?qt(e):new t.constructor(e);return t.copy(r),r}function ji(t){var n=new t.constructor(t.byteLength);return new Ut(n).set(new Ut(t)),n}function Ai(t,n){var e=n?ji(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.length)}function Oi(n,e){if(n!==e){var r=n!==t,i=null===n,o=n==n,u=fs(n),s=e!==t,a=null===e,c=e==e,h=fs(e);if(!a&&!h&&!u&&n>e||u&&s&&c&&!a&&!h||i&&s&&c||!r&&c||!o)return 1;if(!i&&!u&&!h&&n<e||h&&r&&o&&!i&&!u||a&&r&&o||!s&&o||!c)return-1}return 0}function Mi(t,n,e,r){for(var i=-1,o=t.length,u=e.length,s=-1,a=n.length,c=_e(o-u,0),h=xt(a+c),f=!r;++s<a;)h[s]=n[s];for(;++i<u;)(f||i<o)&&(h[e[i]]=t[i]);for(;c--;)h[s++]=t[i++];return h}function Si(t,n,e,r){for(var i=-1,o=t.length,u=-1,s=e.length,a=-1,c=n.length,h=_e(o-s,0),f=xt(h+c),l=!r;++i<h;)f[i]=t[i];for(var d=i;++a<c;)f[d+a]=n[a];for(;++u<s;)(l||i<o)&&(f[d+e[u]]=t[i++]);return f}function ki(t,n){var e=-1,r=t.length;for(n||(n=xt(r));++e<r;)n[e]=t[e];return n}function Ci(n,e,r,i){var o=!r;r||(r={});for(var u=-1,s=e.length;++u<s;){var a=e[u],c=i?i(r[a],n[a],a,r,n):t;c===t&&(c=n[a]),o?or(r,a,c):nr(r,a,c)}return r}function Ti(t,n){return function(e,r){var i=Wu(e)?An:rr,o=n?n():{};return i(e,t,ao(r,2),o)}}function Ii(n){return Hr((function(e,r){var i=-1,o=r.length,u=o>1?r[o-1]:t,s=o>2?r[2]:t;for(u=n.length>3&&"function"==typeof u?(o--,u):t,s&&wo(r[0],r[1],s)&&(u=o<3?t:u,o=1),e=Mt(e);++i<o;){var a=r[i];a&&n(e,a,i,u)}return e}))}function Ni(t,n){return function(e,r){if(null==e)return e;if(!Zu(e))return t(e,r);for(var i=e.length,o=n?i:-1,u=Mt(e);(n?o--:++o<i)&&!1!==r(u[o],o,u););return e}}function Ri(t){return function(n,e,r){for(var i=-1,o=Mt(n),u=r(n),s=u.length;s--;){var a=u[t?s:++i];if(!1===e(o[a],a,o))break}return n}}function zi(n){return function(e){var r=ie(e=bs(e))?he(e):t,i=r?r[0]:e.charAt(0),o=r?bi(r,1).join(""):e.slice(1);return i[n]()+o}}function Pi(t){return function(n){return Rn(ta(qs(n).replace(Ht,"")),t,"")}}function Di(t){return function(){var n=arguments;switch(n.length){case 0:return new t;case 1:return new t(n[0]);case 2:return new t(n[0],n[1]);case 3:return new t(n[0],n[1],n[2]);case 4:return new t(n[0],n[1],n[2],n[3]);case 5:return new t(n[0],n[1],n[2],n[3],n[4]);case 6:return new t(n[0],n[1],n[2],n[3],n[4],n[5]);case 7:return new t(n[0],n[1],n[2],n[3],n[4],n[5],n[6])}var e=$e(t.prototype),r=t.apply(e,n);return rs(r)?r:e}}function Li(n){return function(e,r,i){var o=Mt(e);if(!Zu(e)){var u=ao(r,3);e=Rs(e),r=function(t){return u(o[t],t,o)}}var s=n(e,r,i);return s>-1?o[u?e[s]:s]:t}}function Fi(e){return eo((function(r){var i=r.length,o=i,u=Xe.prototype.thru;for(e&&r.reverse();o--;){var s=r[o];if("function"!=typeof s)throw new Ct(n);if(u&&!a&&"wrapper"==uo(s))var a=new Xe([],!0)}for(o=a?o:i;++o<i;){var c=uo(s=r[o]),h="wrapper"==c?oo(s):t;a=h&&xo(h[0])&&424==h[1]&&!h[4].length&&1==h[9]?a[uo(h[0])].apply(a,h[3]):1==s.length&&xo(s)?a[c]():a.thru(s)}return function(){var t=arguments,n=t[0];if(a&&1==t.length&&Wu(n))return a.plant(n).value();for(var e=0,o=i?r[e].apply(this,t):n;++e<i;)o=r[e].call(this,o);return o}}))}function Bi(n,e,r,i,o,u,a,c,h,f){var l=e&s,d=1&e,p=2&e,v=24&e,g=512&e,y=p?t:Di(n);return function s(){for(var _=arguments.length,m=xt(_),w=_;w--;)m[w]=arguments[w];if(v)var b=so(s),x=function(t,n){for(var e=t.length,r=0;e--;)t[e]===n&&++r;return r}(m,b);if(i&&(m=Mi(m,i,o,v)),u&&(m=Si(m,u,a,v)),_-=x,v&&_<f){var E=se(m,b);return Wi(n,e,Bi,s.placeholder,r,m,E,c,h,f-_)}var j=d?r:this,A=p?j[n]:n;return _=m.length,c?m=function(n,e){for(var r=n.length,i=me(e.length,r),o=ki(n);i--;){var u=e[i];n[i]=mo(u,r)?o[u]:t}return n}(m,c):g&&_>1&&m.reverse(),l&&h<_&&(m.length=h),this&&this!==ln&&this instanceof s&&(A=y||Di(A)),A.apply(j,m)}}function $i(t,n){return function(e,r){return function(t,n,e,r){return wr(t,(function(t,i,o){n(r,e(t),i,o)})),r}(e,t,n(r),{})}}function Vi(n,e){return function(r,i){var o;if(r===t&&i===t)return e;if(r!==t&&(o=r),i!==t){if(o===t)return i;"string"==typeof r||"string"==typeof i?(r=ci(r),i=ci(i)):(r=ai(r),i=ai(i)),o=n(r,i)}return o}}function Xi(t){return eo((function(n){return n=In(n,Hn(ao())),Hr((function(e){var r=this;return t(n,(function(t){return jn(t,r,e)}))}))}))}function Yi(n,e){var r=(e=e===t?" ":ci(e)).length;if(r<2)return r?Zr(e,n):e;var i=Zr(e,yn(n/ce(e)));return ie(e)?bi(he(i),0,n).join(""):i.slice(0,n)}function Ui(n){return function(e,r,i){return i&&"number"!=typeof i&&wo(e,r,i)&&(r=i=t),e=gs(e),r===t?(r=e,e=0):r=gs(r),function(t,n,e,r){for(var i=-1,o=_e(yn((n-t)/(e||1)),0),u=xt(o);o--;)u[r?o:++i]=t,t+=e;return u}(e,r,i=i===t?e<r?1:-1:gs(i),n)}}function qi(t){return function(n,e){return"string"==typeof n&&"string"==typeof e||(n=ms(n),e=ms(e)),t(n,e)}}function Wi(n,e,r,i,s,a,c,h,f,l){var d=8&e;e|=d?o:u,4&(e&=~(d?u:o))||(e&=-4);var p=[n,e,s,d?a:t,d?c:t,d?t:a,d?t:c,h,f,l],v=r.apply(t,p);return xo(n)&&Co(v,p),v.placeholder=i,No(v,n,e)}function Gi(t){var n=Ot[t];return function(t,e){if(t=ms(t),(e=null==e?0:me(ys(e),292))&&ve(t)){var r=(bs(t)+"e").split("e");return+((r=(bs(n(r[0]+"e"+(+r[1]+e)))+"e").split("e"))[0]+"e"+(+r[1]-e))}return n(t)}}var Zi=Me&&1/ae(new Me([,-0]))[1]==c?function(t){return new Me(t)}:fa;function Hi(t){return function(n){var e=vo(n);return e==b?oe(n):e==O?function(t){var n=-1,e=Array(t.size);return t.forEach((function(t){e[++n]=[t,t]})),e}(n):function(t,n){return In(n,(function(n){return[n,t[n]]}))}(n,t(n))}}function Qi(e,c,h,f,l,d,p,v){var g=2&c;if(!g&&"function"!=typeof e)throw new Ct(n);var y=f?f.length:0;if(y||(c&=-97,f=l=t),p=p===t?p:_e(ys(p),0),v=v===t?v:ys(v),y-=l?l.length:0,c&u){var _=f,m=l;f=l=t}var w=g?t:oo(e),b=[e,c,h,f,l,_,m,d,p,v];if(w&&function(t,n){var e=t[1],i=n[1],o=e|i,u=o<131,c=i==s&&8==e||i==s&&e==a&&t[7].length<=n[8]||384==i&&n[7].length<=n[8]&&8==e;if(!u&&!c)return t;1&i&&(t[2]=n[2],o|=1&e?0:4);var h=n[3];if(h){var f=t[3];t[3]=f?Mi(f,h,n[4]):h,t[4]=f?se(t[3],r):n[4]}(h=n[5])&&(f=t[5],t[5]=f?Si(f,h,n[6]):h,t[6]=f?se(t[5],r):n[6]),(h=n[7])&&(t[7]=h),i&s&&(t[8]=null==t[8]?n[8]:me(t[8],n[8])),null==t[9]&&(t[9]=n[9]),t[0]=n[0],t[1]=o}(b,w),e=b[0],c=b[1],h=b[2],f=b[3],l=b[4],!(v=b[9]=b[9]===t?g?0:e.length:_e(b[9]-y,0))&&24&c&&(c&=-25),c&&1!=c)x=8==c||c==i?function(n,e,r){var i=Di(n);return function o(){for(var u=arguments.length,s=xt(u),a=u,c=so(o);a--;)s[a]=arguments[a];var h=u<3&&s[0]!==c&&s[u-1]!==c?[]:se(s,c);return(u-=h.length)<r?Wi(n,e,Bi,o.placeholder,t,s,h,t,t,r-u):jn(this&&this!==ln&&this instanceof o?i:n,this,s)}}(e,c,v):c!=o&&33!=c||l.length?Bi.apply(t,b):function(t,n,e,r){var i=1&n,o=Di(t);return function n(){for(var u=-1,s=arguments.length,a=-1,c=r.length,h=xt(c+s),f=this&&this!==ln&&this instanceof n?o:t;++a<c;)h[a]=r[a];for(;s--;)h[a++]=arguments[++u];return jn(f,i?e:this,h)}}(e,c,h,f);else var x=function(t,n,e){var r=1&n,i=Di(t);return function n(){return(this&&this!==ln&&this instanceof n?i:t).apply(r?e:this,arguments)}}(e,c,h);return No((w?ti:Co)(x,b),e,c)}function Ji(n,e,r,i){return n===t||Xu(n,Nt[r])&&!Pt.call(i,r)?e:n}function Ki(n,e,r,i,o,u){return rs(n)&&rs(e)&&(u.set(e,n),Vr(n,e,t,Ki,u),u.delete(e)),n}function to(n){return ss(n)?t:n}function no(n,e,r,i,o,u){var s=1&r,a=n.length,c=e.length;if(a!=c&&!(s&&c>a))return!1;var h=u.get(n),f=u.get(e);if(h&&f)return h==e&&f==n;var l=-1,d=!0,p=2&r?new Ge:t;for(u.set(n,e),u.set(e,n);++l<a;){var v=n[l],g=e[l];if(i)var y=s?i(g,v,l,e,n,u):i(v,g,l,n,e,u);if(y!==t){if(y)continue;d=!1;break}if(p){if(!Pn(e,(function(t,n){if(!Jn(p,n)&&(v===t||o(v,t,r,i,u)))return p.push(n)}))){d=!1;break}}else if(v!==g&&!o(v,g,r,i,u)){d=!1;break}}return u.delete(n),u.delete(e),d}function eo(n){return Io(Mo(n,t,Go),n+"")}function ro(t){return jr(t,Rs,lo)}function io(t){return jr(t,zs,po)}var oo=Ce?function(t){return Ce.get(t)}:fa;function uo(t){for(var n=t.name+"",e=Te[n],r=Pt.call(Te,n)?e.length:0;r--;){var i=e[r],o=i.func;if(null==o||o==t)return i.name}return n}function so(t){return(Pt.call(Be,"placeholder")?Be:t).placeholder}function ao(){var t=Be.iteratee||sa;return t=t===sa?zr:t,arguments.length?t(arguments[0],arguments[1]):t}function co(t,n){var e,r,i=t.__data__;return("string"==(r=typeof(e=n))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==e:null===e)?i["string"==typeof n?"string":"hash"]:i.map}function ho(t){for(var n=Rs(t),e=n.length;e--;){var r=n[e],i=t[r];n[e]=[r,i,Ao(i)]}return n}function fo(n,e){var r=function(n,e){return null==n?t:n[e]}(n,e);return Rr(r)?r:t}var lo=Un?function(t){return null==t?[]:(t=Mt(t),kn(Un(t),(function(n){return Zt.call(t,n)})))}:_a,po=Un?function(t){for(var n=[];t;)Nn(n,lo(t)),t=Wt(t);return n}:_a,vo=Ar;function go(t,n,e){for(var r=-1,i=(n=mi(n,t)).length,o=!1;++r<i;){var u=Bo(n[r]);if(!(o=null!=t&&e(t,u)))break;t=t[u]}return o||++r!=i?o:!!(i=null==t?0:t.length)&&es(i)&&mo(u,i)&&(Wu(t)||qu(t))}function yo(t){return"function"!=typeof t.constructor||jo(t)?{}:$e(Wt(t))}function _o(t){return Wu(t)||qu(t)||!!(tn&&t&&t[tn])}function mo(t,n){var e=typeof t;return!!(n=null==n?h:n)&&("number"==e||"symbol"!=e&&gt.test(t))&&t>-1&&t%1==0&&t<n}function wo(t,n,e){if(!rs(e))return!1;var r=typeof n;return!!("number"==r?Zu(e)&&mo(n,e.length):"string"==r&&n in e)&&Xu(e[n],t)}function bo(t,n){if(Wu(t))return!1;var e=typeof t;return!("number"!=e&&"symbol"!=e&&"boolean"!=e&&null!=t&&!fs(t))||J.test(t)||!Q.test(t)||null!=n&&t in Mt(n)}function xo(t){var n=uo(t),e=Be[n];if("function"!=typeof e||!(n in Ye.prototype))return!1;if(t===e)return!0;var r=oo(e);return!!r&&t===r[0]}(je&&vo(new je(new ArrayBuffer(1)))!=T||Ae&&vo(new Ae)!=b||Oe&&vo(Oe.resolve())!=j||Me&&vo(new Me)!=O||Se&&vo(new Se)!=k)&&(vo=function(n){var e=Ar(n),r=e==E?n.constructor:t,i=r?$o(r):"";if(i)switch(i){case Ie:return T;case Ne:return b;case Re:return j;case ze:return O;case Pe:return k}return e});var Eo=Rt?ts:ma;function jo(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||Nt)}function Ao(t){return t==t&&!rs(t)}function Oo(n,e){return function(r){return null!=r&&r[n]===e&&(e!==t||n in Mt(r))}}function Mo(n,e,r){return e=_e(e===t?n.length-1:e,0),function(){for(var t=arguments,i=-1,o=_e(t.length-e,0),u=xt(o);++i<o;)u[i]=t[e+i];i=-1;for(var s=xt(e+1);++i<e;)s[i]=t[i];return s[e]=r(u),jn(n,this,s)}}function So(t,n){return n.length<2?t:Er(t,ri(n,0,-1))}function ko(t,n){if(("constructor"!==n||"function"!=typeof t[n])&&"__proto__"!=n)return t[n]}var Co=Ro(ti),To=gn||function(t,n){return ln.setTimeout(t,n)},Io=Ro(ni);function No(t,n,e){var r=n+"";return Io(t,function(t,n){var e=n.length;if(!e)return t;var r=e-1;return n[r]=(e>1?"& ":"")+n[r],n=n.join(e>2?", ":" "),t.replace(it,"{\n/* [wrapped with "+n+"] */\n")}(r,function(t,n){return On(d,(function(e){var r="_."+e[0];n&e[1]&&!Cn(t,r)&&t.push(r)})),t.sort()}(function(t){var n=t.match(ot);return n?n[1].split(ut):[]}(r),e)))}function Ro(n){var e=0,r=0;return function(){var i=we(),o=16-(i-r);if(r=i,o>0){if(++e>=800)return arguments[0]}else e=0;return n.apply(t,arguments)}}function zo(n,e){var r=-1,i=n.length,o=i-1;for(e=e===t?i:e;++r<e;){var u=Gr(r,o),s=n[u];n[u]=n[r],n[r]=s}return n.length=e,n}var Po,Do,Lo,Fo=(Po=function(t){var n=[];return 46===t.charCodeAt(0)&&n.push(""),t.replace(K,(function(t,e,r,i){n.push(r?i.replace(ct,"$1"):e||t)})),n},Do=Du(Po,(function(t){return 500===Lo.size&&Lo.clear(),t})),Lo=Do.cache,Do);function Bo(t){if("string"==typeof t||fs(t))return t;var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}function $o(t){if(null!=t){try{return zt.call(t)}catch(Bl){}try{return t+""}catch(Bl){}}return""}function Vo(t){if(t instanceof Ye)return t.clone();var n=new Xe(t.__wrapped__,t.__chain__);return n.__actions__=ki(t.__actions__),n.__index__=t.__index__,n.__values__=t.__values__,n}var Xo=Hr((function(t,n){return Hu(t)?fr(t,yr(n,1,Hu,!0)):[]})),Yo=Hr((function(n,e){var r=Ko(e);return Hu(r)&&(r=t),Hu(n)?fr(n,yr(e,1,Hu,!0),ao(r,2)):[]})),Uo=Hr((function(n,e){var r=Ko(e);return Hu(r)&&(r=t),Hu(n)?fr(n,yr(e,1,Hu,!0),t,r):[]}));function qo(t,n,e){var r=null==t?0:t.length;if(!r)return-1;var i=null==e?0:ys(e);return i<0&&(i=_e(r+i,0)),Fn(t,ao(n,3),i)}function Wo(n,e,r){var i=null==n?0:n.length;if(!i)return-1;var o=i-1;return r!==t&&(o=ys(r),o=r<0?_e(i+o,0):me(o,i-1)),Fn(n,ao(e,3),o,!0)}function Go(t){return null!=t&&t.length?yr(t,1):[]}function Zo(n){return n&&n.length?n[0]:t}var Ho=Hr((function(t){var n=In(t,yi);return n.length&&n[0]===t[0]?kr(n):[]})),Qo=Hr((function(n){var e=Ko(n),r=In(n,yi);return e===Ko(r)?e=t:r.pop(),r.length&&r[0]===n[0]?kr(r,ao(e,2)):[]})),Jo=Hr((function(n){var e=Ko(n),r=In(n,yi);return(e="function"==typeof e?e:t)&&r.pop(),r.length&&r[0]===n[0]?kr(r,t,e):[]}));function Ko(n){var e=null==n?0:n.length;return e?n[e-1]:t}var tu=Hr(nu);function nu(t,n){return t&&t.length&&n&&n.length?qr(t,n):t}var eu=eo((function(t,n){var e=null==t?0:t.length,r=ur(t,n);return Wr(t,In(n,(function(t){return mo(t,e)?+t:t})).sort(Oi)),r}));function ru(t){return null==t?t:Ee.call(t)}var iu=Hr((function(t){return hi(yr(t,1,Hu,!0))})),ou=Hr((function(n){var e=Ko(n);return Hu(e)&&(e=t),hi(yr(n,1,Hu,!0),ao(e,2))})),uu=Hr((function(n){var e=Ko(n);return e="function"==typeof e?e:t,hi(yr(n,1,Hu,!0),t,e)}));function su(t){if(!t||!t.length)return[];var n=0;return t=kn(t,(function(t){if(Hu(t))return n=_e(t.length,n),!0})),Gn(n,(function(n){return In(t,Yn(n))}))}function au(n,e){if(!n||!n.length)return[];var r=su(n);return null==e?r:In(r,(function(n){return jn(e,t,n)}))}var cu=Hr((function(t,n){return Hu(t)?fr(t,n):[]})),hu=Hr((function(t){return vi(kn(t,Hu))})),fu=Hr((function(n){var e=Ko(n);return Hu(e)&&(e=t),vi(kn(n,Hu),ao(e,2))})),lu=Hr((function(n){var e=Ko(n);return e="function"==typeof e?e:t,vi(kn(n,Hu),t,e)})),du=Hr(su),pu=Hr((function(n){var e=n.length,r=e>1?n[e-1]:t;return r="function"==typeof r?(n.pop(),r):t,au(n,r)}));function vu(t){var n=Be(t);return n.__chain__=!0,n}function gu(t,n){return n(t)}var yu=eo((function(n){var e=n.length,r=e?n[0]:0,i=this.__wrapped__,o=function(t){return ur(t,n)};return!(e>1||this.__actions__.length)&&i instanceof Ye&&mo(r)?((i=i.slice(r,+r+(e?1:0))).__actions__.push({func:gu,args:[o],thisArg:t}),new Xe(i,this.__chain__).thru((function(n){return e&&!n.length&&n.push(t),n}))):this.thru(o)})),_u=Ti((function(t,n,e){Pt.call(t,e)?++t[e]:or(t,e,1)})),mu=Li(qo),wu=Li(Wo);function bu(t,n){return(Wu(t)?On:lr)(t,ao(n,3))}function xu(t,n){return(Wu(t)?Mn:dr)(t,ao(n,3))}var Eu=Ti((function(t,n,e){Pt.call(t,e)?t[e].push(n):or(t,e,[n])})),ju=Hr((function(t,n,e){var r=-1,i="function"==typeof n,o=Zu(t)?xt(t.length):[];return lr(t,(function(t){o[++r]=i?jn(n,t,e):Cr(t,n,e)})),o})),Au=Ti((function(t,n,e){or(t,e,n)}));function Ou(t,n){return(Wu(t)?In:Fr)(t,ao(n,3))}var Mu=Ti((function(t,n,e){t[e?0:1].push(n)}),(function(){return[[],[]]})),Su=Hr((function(t,n){if(null==t)return[];var e=n.length;return e>1&&wo(t,n[0],n[1])?n=[]:e>2&&wo(n[0],n[1],n[2])&&(n=[n[0]]),Yr(t,yr(n,1),[])})),ku=pn||function(){return ln.Date.now()};function Cu(n,e,r){return e=r?t:e,e=n&&null==e?n.length:e,Qi(n,s,t,t,t,t,e)}function Tu(e,r){var i;if("function"!=typeof r)throw new Ct(n);return e=ys(e),function(){return--e>0&&(i=r.apply(this,arguments)),e<=1&&(r=t),i}}var Iu=Hr((function(t,n,e){var r=1;if(e.length){var i=se(e,so(Iu));r|=o}return Qi(t,r,n,e,i)})),Nu=Hr((function(t,n,e){var r=3;if(e.length){var i=se(e,so(Nu));r|=o}return Qi(n,r,t,e,i)}));function Ru(e,r,i){var o,u,s,a,c,h,f=0,l=!1,d=!1,p=!0;if("function"!=typeof e)throw new Ct(n);function v(n){var r=o,i=u;return o=u=t,f=n,a=e.apply(i,r)}function g(n){var e=n-h;return h===t||e>=r||e<0||d&&n-f>=s}function y(){var t=ku();if(g(t))return _(t);c=To(y,function(t){var n=r-(t-h);return d?me(n,s-(t-f)):n}(t))}function _(n){return c=t,p&&o?v(n):(o=u=t,a)}function m(){var n=ku(),e=g(n);if(o=arguments,u=this,h=n,e){if(c===t)return function(t){return f=t,c=To(y,r),l?v(t):a}(h);if(d)return xi(c),c=To(y,r),v(h)}return c===t&&(c=To(y,r)),a}return r=ms(r)||0,rs(i)&&(l=!!i.leading,s=(d="maxWait"in i)?_e(ms(i.maxWait)||0,r):s,p="trailing"in i?!!i.trailing:p),m.cancel=function(){c!==t&&xi(c),f=0,o=h=u=c=t},m.flush=function(){return c===t?a:_(ku())},m}var zu=Hr((function(t,n){return hr(t,1,n)})),Pu=Hr((function(t,n,e){return hr(t,ms(n)||0,e)}));function Du(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new Ct(n);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var u=t.apply(this,n);return r.cache=o.set(i,u)||o,u};return r.cache=new(Du.Cache||We),r}function Lu(t){if("function"!=typeof t)throw new Ct(n);return function(){var n=arguments;switch(n.length){case 0:return!t.call(this);case 1:return!t.call(this,n[0]);case 2:return!t.call(this,n[0],n[1]);case 3:return!t.call(this,n[0],n[1],n[2])}return!t.apply(this,n)}}Du.Cache=We;var Fu=wi((function(t,n){var e=(n=1==n.length&&Wu(n[0])?In(n[0],Hn(ao())):In(yr(n,1),Hn(ao()))).length;return Hr((function(r){for(var i=-1,o=me(r.length,e);++i<o;)r[i]=n[i].call(this,r[i]);return jn(t,this,r)}))})),Bu=Hr((function(n,e){var r=se(e,so(Bu));return Qi(n,o,t,e,r)})),$u=Hr((function(n,e){var r=se(e,so($u));return Qi(n,u,t,e,r)})),Vu=eo((function(n,e){return Qi(n,a,t,t,t,e)}));function Xu(t,n){return t===n||t!=t&&n!=n}var Yu=qi(Or),Uu=qi((function(t,n){return t>=n})),qu=Tr(function(){return arguments}())?Tr:function(t){return is(t)&&Pt.call(t,"callee")&&!Zt.call(t,"callee")},Wu=xt.isArray,Gu=_n?Hn(_n):function(t){return is(t)&&Ar(t)==C};function Zu(t){return null!=t&&es(t.length)&&!ts(t)}function Hu(t){return is(t)&&Zu(t)}var Qu=pe||ma,Ju=mn?Hn(mn):function(t){return is(t)&&Ar(t)==y};function Ku(t){if(!is(t))return!1;var n=Ar(t);return n==_||"[object DOMException]"==n||"string"==typeof t.message&&"string"==typeof t.name&&!ss(t)}function ts(t){if(!rs(t))return!1;var n=Ar(t);return n==m||n==w||"[object AsyncFunction]"==n||"[object Proxy]"==n}function ns(t){return"number"==typeof t&&t==ys(t)}function es(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=h}function rs(t){var n=typeof t;return null!=t&&("object"==n||"function"==n)}function is(t){return null!=t&&"object"==typeof t}var os=wn?Hn(wn):function(t){return is(t)&&vo(t)==b};function us(t){return"number"==typeof t||is(t)&&Ar(t)==x}function ss(t){if(!is(t)||Ar(t)!=E)return!1;var n=Wt(t);if(null===n)return!0;var e=Pt.call(n,"constructor")&&n.constructor;return"function"==typeof e&&e instanceof e&&zt.call(e)==Bt}var as=bn?Hn(bn):function(t){return is(t)&&Ar(t)==A},cs=xn?Hn(xn):function(t){return is(t)&&vo(t)==O};function hs(t){return"string"==typeof t||!Wu(t)&&is(t)&&Ar(t)==M}function fs(t){return"symbol"==typeof t||is(t)&&Ar(t)==S}var ls=En?Hn(En):function(t){return is(t)&&es(t.length)&&!!on[Ar(t)]},ds=qi(Lr),ps=qi((function(t,n){return t<=n}));function vs(t){if(!t)return[];if(Zu(t))return hs(t)?he(t):ki(t);if(sn&&t[sn])return function(t){for(var n,e=[];!(n=t.next()).done;)e.push(n.value);return e}(t[sn]());var n=vo(t);return(n==b?oe:n==O?ae:Xs)(t)}function gs(t){return t?(t=ms(t))===c||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function ys(t){var n=gs(t),e=n%1;return n==n?e?n-e:n:0}function _s(t){return t?sr(ys(t),0,l):0}function ms(t){if("number"==typeof t)return t;if(fs(t))return f;if(rs(t)){var n="function"==typeof t.valueOf?t.valueOf():t;t=rs(n)?n+"":n}if("string"!=typeof t)return 0===t?t:+t;t=Zn(t);var e=dt.test(t);return e||vt.test(t)?cn(t.slice(2),e?2:8):lt.test(t)?f:+t}function ws(t){return Ci(t,zs(t))}function bs(t){return null==t?"":ci(t)}var xs=Ii((function(t,n){if(jo(n)||Zu(n))Ci(n,Rs(n),t);else for(var e in n)Pt.call(n,e)&&nr(t,e,n[e])})),Es=Ii((function(t,n){Ci(n,zs(n),t)})),js=Ii((function(t,n,e,r){Ci(n,zs(n),t,r)})),As=Ii((function(t,n,e,r){Ci(n,Rs(n),t,r)})),Os=eo(ur),Ms=Hr((function(n,e){n=Mt(n);var r=-1,i=e.length,o=i>2?e[2]:t;for(o&&wo(e[0],e[1],o)&&(i=1);++r<i;)for(var u=e[r],s=zs(u),a=-1,c=s.length;++a<c;){var h=s[a],f=n[h];(f===t||Xu(f,Nt[h])&&!Pt.call(n,h))&&(n[h]=u[h])}return n})),Ss=Hr((function(n){return n.push(t,Ki),jn(Ds,t,n)}));function ks(n,e,r){var i=null==n?t:Er(n,e);return i===t?r:i}function Cs(t,n){return null!=t&&go(t,n,Sr)}var Ts=$i((function(t,n,e){null!=n&&"function"!=typeof n.toString&&(n=Ft.call(n)),t[n]=e}),ra(ua)),Is=$i((function(t,n,e){null!=n&&"function"!=typeof n.toString&&(n=Ft.call(n)),Pt.call(t,n)?t[n].push(e):t[n]=[e]}),ao),Ns=Hr(Cr);function Rs(t){return Zu(t)?He(t):Pr(t)}function zs(t){return Zu(t)?He(t,!0):Dr(t)}var Ps=Ii((function(t,n,e){Vr(t,n,e)})),Ds=Ii((function(t,n,e,r){Vr(t,n,e,r)})),Ls=eo((function(t,n){var e={};if(null==t)return e;var r=!1;n=In(n,(function(n){return n=mi(n,t),r||(r=n.length>1),n})),Ci(t,io(t),e),r&&(e=ar(e,7,to));for(var i=n.length;i--;)fi(e,n[i]);return e})),Fs=eo((function(t,n){return null==t?{}:function(t,n){return Ur(t,n,(function(n,e){return Cs(t,e)}))}(t,n)}));function Bs(t,n){if(null==t)return{};var e=In(io(t),(function(t){return[t]}));return n=ao(n),Ur(t,e,(function(t,e){return n(t,e[0])}))}var $s=Hi(Rs),Vs=Hi(zs);function Xs(t){return null==t?[]:Qn(t,Rs(t))}var Ys=Pi((function(t,n,e){return n=n.toLowerCase(),t+(e?Us(n):n)}));function Us(t){return Ks(bs(t).toLowerCase())}function qs(t){return(t=bs(t))&&t.replace(yt,ne).replace(Qt,"")}var Ws=Pi((function(t,n,e){return t+(e?"-":"")+n.toLowerCase()})),Gs=Pi((function(t,n,e){return t+(e?" ":"")+n.toLowerCase()})),Zs=zi("toLowerCase"),Hs=Pi((function(t,n,e){return t+(e?"_":"")+n.toLowerCase()})),Qs=Pi((function(t,n,e){return t+(e?" ":"")+Ks(n)})),Js=Pi((function(t,n,e){return t+(e?" ":"")+n.toUpperCase()})),Ks=zi("toUpperCase");function ta(n,e,r){return n=bs(n),(e=r?t:e)===t?function(t){return nn.test(t)}(n)?function(t){return t.match(Kt)||[]}(n):function(t){return t.match(st)||[]}(n):n.match(e)||[]}var na=Hr((function(n,e){try{return jn(n,t,e)}catch(Bl){return Ku(Bl)?Bl:new jt(Bl)}})),ea=eo((function(t,n){return On(n,(function(n){n=Bo(n),or(t,n,Iu(t[n],t))})),t}));function ra(t){return function(){return t}}var ia=Fi(),oa=Fi(!0);function ua(t){return t}function sa(t){return zr("function"==typeof t?t:ar(t,1))}var aa=Hr((function(t,n){return function(e){return Cr(e,t,n)}})),ca=Hr((function(t,n){return function(e){return Cr(t,e,n)}}));function ha(t,n,e){var r=Rs(n),i=xr(n,r);null!=e||rs(n)&&(i.length||!r.length)||(e=n,n=t,t=this,i=xr(n,Rs(n)));var o=!(rs(e)&&"chain"in e&&!e.chain),u=ts(t);return On(i,(function(e){var r=n[e];t[e]=r,u&&(t.prototype[e]=function(){var n=this.__chain__;if(o||n){var e=t(this.__wrapped__);return(e.__actions__=ki(this.__actions__)).push({func:r,args:arguments,thisArg:t}),e.__chain__=n,e}return r.apply(t,Nn([this.value()],arguments))})})),t}function fa(){}var la=Xi(In),da=Xi(Sn),pa=Xi(Pn);function va(t){return bo(t)?Yn(Bo(t)):function(t){return function(n){return Er(n,t)}}(t)}var ga=Ui(),ya=Ui(!0);function _a(){return[]}function ma(){return!1}var wa,ba=Vi((function(t,n){return t+n}),0),xa=Gi("ceil"),Ea=Vi((function(t,n){return t/n}),1),ja=Gi("floor"),Aa=Vi((function(t,n){return t*n}),1),Oa=Gi("round"),Ma=Vi((function(t,n){return t-n}),0);return Be.after=function(t,e){if("function"!=typeof e)throw new Ct(n);return t=ys(t),function(){if(--t<1)return e.apply(this,arguments)}},Be.ary=Cu,Be.assign=xs,Be.assignIn=Es,Be.assignInWith=js,Be.assignWith=As,Be.at=Os,Be.before=Tu,Be.bind=Iu,Be.bindAll=ea,Be.bindKey=Nu,Be.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Wu(t)?t:[t]},Be.chain=vu,Be.chunk=function(n,e,r){e=(r?wo(n,e,r):e===t)?1:_e(ys(e),0);var i=null==n?0:n.length;if(!i||e<1)return[];for(var o=0,u=0,s=xt(yn(i/e));o<i;)s[u++]=ri(n,o,o+=e);return s},Be.compact=function(t){for(var n=-1,e=null==t?0:t.length,r=0,i=[];++n<e;){var o=t[n];o&&(i[r++]=o)}return i},Be.concat=function(){var t=arguments.length;if(!t)return[];for(var n=xt(t-1),e=arguments[0],r=t;r--;)n[r-1]=arguments[r];return Nn(Wu(e)?ki(e):[e],yr(n,1))},Be.cond=function(t){var e=null==t?0:t.length,r=ao();return t=e?In(t,(function(t){if("function"!=typeof t[1])throw new Ct(n);return[r(t[0]),t[1]]})):[],Hr((function(n){for(var r=-1;++r<e;){var i=t[r];if(jn(i[0],this,n))return jn(i[1],this,n)}}))},Be.conforms=function(t){return function(t){var n=Rs(t);return function(e){return cr(e,t,n)}}(ar(t,1))},Be.constant=ra,Be.countBy=_u,Be.create=function(t,n){var e=$e(t);return null==n?e:ir(e,n)},Be.curry=function n(e,r,i){var o=Qi(e,8,t,t,t,t,t,r=i?t:r);return o.placeholder=n.placeholder,o},Be.curryRight=function n(e,r,o){var u=Qi(e,i,t,t,t,t,t,r=o?t:r);return u.placeholder=n.placeholder,u},Be.debounce=Ru,Be.defaults=Ms,Be.defaultsDeep=Ss,Be.defer=zu,Be.delay=Pu,Be.difference=Xo,Be.differenceBy=Yo,Be.differenceWith=Uo,Be.drop=function(n,e,r){var i=null==n?0:n.length;return i?ri(n,(e=r||e===t?1:ys(e))<0?0:e,i):[]},Be.dropRight=function(n,e,r){var i=null==n?0:n.length;return i?ri(n,0,(e=i-(e=r||e===t?1:ys(e)))<0?0:e):[]},Be.dropRightWhile=function(t,n){return t&&t.length?di(t,ao(n,3),!0,!0):[]},Be.dropWhile=function(t,n){return t&&t.length?di(t,ao(n,3),!0):[]},Be.fill=function(n,e,r,i){var o=null==n?0:n.length;return o?(r&&"number"!=typeof r&&wo(n,e,r)&&(r=0,i=o),function(n,e,r,i){var o=n.length;for((r=ys(r))<0&&(r=-r>o?0:o+r),(i=i===t||i>o?o:ys(i))<0&&(i+=o),i=r>i?0:_s(i);r<i;)n[r++]=e;return n}(n,e,r,i)):[]},Be.filter=function(t,n){return(Wu(t)?kn:gr)(t,ao(n,3))},Be.flatMap=function(t,n){return yr(Ou(t,n),1)},Be.flatMapDeep=function(t,n){return yr(Ou(t,n),c)},Be.flatMapDepth=function(n,e,r){return r=r===t?1:ys(r),yr(Ou(n,e),r)},Be.flatten=Go,Be.flattenDeep=function(t){return null!=t&&t.length?yr(t,c):[]},Be.flattenDepth=function(n,e){return null!=n&&n.length?yr(n,e=e===t?1:ys(e)):[]},Be.flip=function(t){return Qi(t,512)},Be.flow=ia,Be.flowRight=oa,Be.fromPairs=function(t){for(var n=-1,e=null==t?0:t.length,r={};++n<e;){var i=t[n];r[i[0]]=i[1]}return r},Be.functions=function(t){return null==t?[]:xr(t,Rs(t))},Be.functionsIn=function(t){return null==t?[]:xr(t,zs(t))},Be.groupBy=Eu,Be.initial=function(t){return null!=t&&t.length?ri(t,0,-1):[]},Be.intersection=Ho,Be.intersectionBy=Qo,Be.intersectionWith=Jo,Be.invert=Ts,Be.invertBy=Is,Be.invokeMap=ju,Be.iteratee=sa,Be.keyBy=Au,Be.keys=Rs,Be.keysIn=zs,Be.map=Ou,Be.mapKeys=function(t,n){var e={};return n=ao(n,3),wr(t,(function(t,r,i){or(e,n(t,r,i),t)})),e},Be.mapValues=function(t,n){var e={};return n=ao(n,3),wr(t,(function(t,r,i){or(e,r,n(t,r,i))})),e},Be.matches=function(t){return Br(ar(t,1))},Be.matchesProperty=function(t,n){return $r(t,ar(n,1))},Be.memoize=Du,Be.merge=Ps,Be.mergeWith=Ds,Be.method=aa,Be.methodOf=ca,Be.mixin=ha,Be.negate=Lu,Be.nthArg=function(t){return t=ys(t),Hr((function(n){return Xr(n,t)}))},Be.omit=Ls,Be.omitBy=function(t,n){return Bs(t,Lu(ao(n)))},Be.once=function(t){return Tu(2,t)},Be.orderBy=function(n,e,r,i){return null==n?[]:(Wu(e)||(e=null==e?[]:[e]),Wu(r=i?t:r)||(r=null==r?[]:[r]),Yr(n,e,r))},Be.over=la,Be.overArgs=Fu,Be.overEvery=da,Be.overSome=pa,Be.partial=Bu,Be.partialRight=$u,Be.partition=Mu,Be.pick=Fs,Be.pickBy=Bs,Be.property=va,Be.propertyOf=function(n){return function(e){return null==n?t:Er(n,e)}},Be.pull=tu,Be.pullAll=nu,Be.pullAllBy=function(t,n,e){return t&&t.length&&n&&n.length?qr(t,n,ao(e,2)):t},Be.pullAllWith=function(n,e,r){return n&&n.length&&e&&e.length?qr(n,e,t,r):n},Be.pullAt=eu,Be.range=ga,Be.rangeRight=ya,Be.rearg=Vu,Be.reject=function(t,n){return(Wu(t)?kn:gr)(t,Lu(ao(n,3)))},Be.remove=function(t,n){var e=[];if(!t||!t.length)return e;var r=-1,i=[],o=t.length;for(n=ao(n,3);++r<o;){var u=t[r];n(u,r,t)&&(e.push(u),i.push(r))}return Wr(t,i),e},Be.rest=function(e,r){if("function"!=typeof e)throw new Ct(n);return Hr(e,r=r===t?r:ys(r))},Be.reverse=ru,Be.sampleSize=function(n,e,r){return e=(r?wo(n,e,r):e===t)?1:ys(e),(Wu(n)?Je:Jr)(n,e)},Be.set=function(t,n,e){return null==t?t:Kr(t,n,e)},Be.setWith=function(n,e,r,i){return i="function"==typeof i?i:t,null==n?n:Kr(n,e,r,i)},Be.shuffle=function(t){return(Wu(t)?Ke:ei)(t)},Be.slice=function(n,e,r){var i=null==n?0:n.length;return i?(r&&"number"!=typeof r&&wo(n,e,r)?(e=0,r=i):(e=null==e?0:ys(e),r=r===t?i:ys(r)),ri(n,e,r)):[]},Be.sortBy=Su,Be.sortedUniq=function(t){return t&&t.length?si(t):[]},Be.sortedUniqBy=function(t,n){return t&&t.length?si(t,ao(n,2)):[]},Be.split=function(n,e,r){return r&&"number"!=typeof r&&wo(n,e,r)&&(e=r=t),(r=r===t?l:r>>>0)?(n=bs(n))&&("string"==typeof e||null!=e&&!as(e))&&!(e=ci(e))&&ie(n)?bi(he(n),0,r):n.split(e,r):[]},Be.spread=function(t,e){if("function"!=typeof t)throw new Ct(n);return e=null==e?0:_e(ys(e),0),Hr((function(n){var r=n[e],i=bi(n,0,e);return r&&Nn(i,r),jn(t,this,i)}))},Be.tail=function(t){var n=null==t?0:t.length;return n?ri(t,1,n):[]},Be.take=function(n,e,r){return n&&n.length?ri(n,0,(e=r||e===t?1:ys(e))<0?0:e):[]},Be.takeRight=function(n,e,r){var i=null==n?0:n.length;return i?ri(n,(e=i-(e=r||e===t?1:ys(e)))<0?0:e,i):[]},Be.takeRightWhile=function(t,n){return t&&t.length?di(t,ao(n,3),!1,!0):[]},Be.takeWhile=function(t,n){return t&&t.length?di(t,ao(n,3)):[]},Be.tap=function(t,n){return n(t),t},Be.throttle=function(t,e,r){var i=!0,o=!0;if("function"!=typeof t)throw new Ct(n);return rs(r)&&(i="leading"in r?!!r.leading:i,o="trailing"in r?!!r.trailing:o),Ru(t,e,{leading:i,maxWait:e,trailing:o})},Be.thru=gu,Be.toArray=vs,Be.toPairs=$s,Be.toPairsIn=Vs,Be.toPath=function(t){return Wu(t)?In(t,Bo):fs(t)?[t]:ki(Fo(bs(t)))},Be.toPlainObject=ws,Be.transform=function(t,n,e){var r=Wu(t),i=r||Qu(t)||ls(t);if(n=ao(n,4),null==e){var o=t&&t.constructor;e=i?r?new o:[]:rs(t)&&ts(o)?$e(Wt(t)):{}}return(i?On:wr)(t,(function(t,r,i){return n(e,t,r,i)})),e},Be.unary=function(t){return Cu(t,1)},Be.union=iu,Be.unionBy=ou,Be.unionWith=uu,Be.uniq=function(t){return t&&t.length?hi(t):[]},Be.uniqBy=function(t,n){return t&&t.length?hi(t,ao(n,2)):[]},Be.uniqWith=function(n,e){return e="function"==typeof e?e:t,n&&n.length?hi(n,t,e):[]},Be.unset=function(t,n){return null==t||fi(t,n)},Be.unzip=su,Be.unzipWith=au,Be.update=function(t,n,e){return null==t?t:li(t,n,_i(e))},Be.updateWith=function(n,e,r,i){return i="function"==typeof i?i:t,null==n?n:li(n,e,_i(r),i)},Be.values=Xs,Be.valuesIn=function(t){return null==t?[]:Qn(t,zs(t))},Be.without=cu,Be.words=ta,Be.wrap=function(t,n){return Bu(_i(n),t)},Be.xor=hu,Be.xorBy=fu,Be.xorWith=lu,Be.zip=du,Be.zipObject=function(t,n){return gi(t||[],n||[],nr)},Be.zipObjectDeep=function(t,n){return gi(t||[],n||[],Kr)},Be.zipWith=pu,Be.entries=$s,Be.entriesIn=Vs,Be.extend=Es,Be.extendWith=js,ha(Be,Be),Be.add=ba,Be.attempt=na,Be.camelCase=Ys,Be.capitalize=Us,Be.ceil=xa,Be.clamp=function(n,e,r){return r===t&&(r=e,e=t),r!==t&&(r=(r=ms(r))==r?r:0),e!==t&&(e=(e=ms(e))==e?e:0),sr(ms(n),e,r)},Be.clone=function(t){return ar(t,4)},Be.cloneDeep=function(t){return ar(t,5)},Be.cloneDeepWith=function(n,e){return ar(n,5,e="function"==typeof e?e:t)},Be.cloneWith=function(n,e){return ar(n,4,e="function"==typeof e?e:t)},Be.conformsTo=function(t,n){return null==n||cr(t,n,Rs(n))},Be.deburr=qs,Be.defaultTo=function(t,n){return null==t||t!=t?n:t},Be.divide=Ea,Be.endsWith=function(n,e,r){n=bs(n),e=ci(e);var i=n.length,o=r=r===t?i:sr(ys(r),0,i);return(r-=e.length)>=0&&n.slice(r,o)==e},Be.eq=Xu,Be.escape=function(t){return(t=bs(t))&&W.test(t)?t.replace(U,ee):t},Be.escapeRegExp=function(t){return(t=bs(t))&&nt.test(t)?t.replace(tt,"\\$&"):t},Be.every=function(n,e,r){var i=Wu(n)?Sn:pr;return r&&wo(n,e,r)&&(e=t),i(n,ao(e,3))},Be.find=mu,Be.findIndex=qo,Be.findKey=function(t,n){return Ln(t,ao(n,3),wr)},Be.findLast=wu,Be.findLastIndex=Wo,Be.findLastKey=function(t,n){return Ln(t,ao(n,3),br)},Be.floor=ja,Be.forEach=bu,Be.forEachRight=xu,Be.forIn=function(t,n){return null==t?t:_r(t,ao(n,3),zs)},Be.forInRight=function(t,n){return null==t?t:mr(t,ao(n,3),zs)},Be.forOwn=function(t,n){return t&&wr(t,ao(n,3))},Be.forOwnRight=function(t,n){return t&&br(t,ao(n,3))},Be.get=ks,Be.gt=Yu,Be.gte=Uu,Be.has=function(t,n){return null!=t&&go(t,n,Mr)},Be.hasIn=Cs,Be.head=Zo,Be.identity=ua,Be.includes=function(t,n,e,r){t=Zu(t)?t:Xs(t),e=e&&!r?ys(e):0;var i=t.length;return e<0&&(e=_e(i+e,0)),hs(t)?e<=i&&t.indexOf(n,e)>-1:!!i&&Bn(t,n,e)>-1},Be.indexOf=function(t,n,e){var r=null==t?0:t.length;if(!r)return-1;var i=null==e?0:ys(e);return i<0&&(i=_e(r+i,0)),Bn(t,n,i)},Be.inRange=function(n,e,r){return e=gs(e),r===t?(r=e,e=0):r=gs(r),function(t,n,e){return t>=me(n,e)&&t<_e(n,e)}(n=ms(n),e,r)},Be.invoke=Ns,Be.isArguments=qu,Be.isArray=Wu,Be.isArrayBuffer=Gu,Be.isArrayLike=Zu,Be.isArrayLikeObject=Hu,Be.isBoolean=function(t){return!0===t||!1===t||is(t)&&Ar(t)==g},Be.isBuffer=Qu,Be.isDate=Ju,Be.isElement=function(t){return is(t)&&1===t.nodeType&&!ss(t)},Be.isEmpty=function(t){if(null==t)return!0;if(Zu(t)&&(Wu(t)||"string"==typeof t||"function"==typeof t.splice||Qu(t)||ls(t)||qu(t)))return!t.length;var n=vo(t);if(n==b||n==O)return!t.size;if(jo(t))return!Pr(t).length;for(var e in t)if(Pt.call(t,e))return!1;return!0},Be.isEqual=function(t,n){return Ir(t,n)},Be.isEqualWith=function(n,e,r){var i=(r="function"==typeof r?r:t)?r(n,e):t;return i===t?Ir(n,e,t,r):!!i},Be.isError=Ku,Be.isFinite=function(t){return"number"==typeof t&&ve(t)},Be.isFunction=ts,Be.isInteger=ns,Be.isLength=es,Be.isMap=os,Be.isMatch=function(t,n){return t===n||Nr(t,n,ho(n))},Be.isMatchWith=function(n,e,r){return r="function"==typeof r?r:t,Nr(n,e,ho(e),r)},Be.isNaN=function(t){return us(t)&&t!=+t},Be.isNative=function(t){if(Eo(t))throw new jt("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Rr(t)},Be.isNil=function(t){return null==t},Be.isNull=function(t){return null===t},Be.isNumber=us,Be.isObject=rs,Be.isObjectLike=is,Be.isPlainObject=ss,Be.isRegExp=as,Be.isSafeInteger=function(t){return ns(t)&&t>=-9007199254740991&&t<=h},Be.isSet=cs,Be.isString=hs,Be.isSymbol=fs,Be.isTypedArray=ls,Be.isUndefined=function(n){return n===t},Be.isWeakMap=function(t){return is(t)&&vo(t)==k},Be.isWeakSet=function(t){return is(t)&&"[object WeakSet]"==Ar(t)},Be.join=function(t,n){return null==t?"":ge.call(t,n)},Be.kebabCase=Ws,Be.last=Ko,Be.lastIndexOf=function(n,e,r){var i=null==n?0:n.length;if(!i)return-1;var o=i;return r!==t&&(o=(o=ys(r))<0?_e(i+o,0):me(o,i-1)),e==e?function(t,n,e){for(var r=e+1;r--;)if(t[r]===n)return r;return r}(n,e,o):Fn(n,Vn,o,!0)},Be.lowerCase=Gs,Be.lowerFirst=Zs,Be.lt=ds,Be.lte=ps,Be.max=function(n){return n&&n.length?vr(n,ua,Or):t},Be.maxBy=function(n,e){return n&&n.length?vr(n,ao(e,2),Or):t},Be.mean=function(t){return Xn(t,ua)},Be.meanBy=function(t,n){return Xn(t,ao(n,2))},Be.min=function(n){return n&&n.length?vr(n,ua,Lr):t},Be.minBy=function(n,e){return n&&n.length?vr(n,ao(e,2),Lr):t},Be.stubArray=_a,Be.stubFalse=ma,Be.stubObject=function(){return{}},Be.stubString=function(){return""},Be.stubTrue=function(){return!0},Be.multiply=Aa,Be.nth=function(n,e){return n&&n.length?Xr(n,ys(e)):t},Be.noConflict=function(){return ln._===this&&(ln._=$t),this},Be.noop=fa,Be.now=ku,Be.pad=function(t,n,e){t=bs(t);var r=(n=ys(n))?ce(t):0;if(!n||r>=n)return t;var i=(n-r)/2;return Yi(Dn(i),e)+t+Yi(yn(i),e)},Be.padEnd=function(t,n,e){t=bs(t);var r=(n=ys(n))?ce(t):0;return n&&r<n?t+Yi(n-r,e):t},Be.padStart=function(t,n,e){t=bs(t);var r=(n=ys(n))?ce(t):0;return n&&r<n?Yi(n-r,e)+t:t},Be.parseInt=function(t,n,e){return e||null==n?n=0:n&&(n=+n),be(bs(t).replace(et,""),n||0)},Be.random=function(n,e,r){if(r&&"boolean"!=typeof r&&wo(n,e,r)&&(e=r=t),r===t&&("boolean"==typeof e?(r=e,e=t):"boolean"==typeof n&&(r=n,n=t)),n===t&&e===t?(n=0,e=1):(n=gs(n),e===t?(e=n,n=0):e=gs(e)),n>e){var i=n;n=e,e=i}if(r||n%1||e%1){var o=xe();return me(n+o*(e-n+an("1e-"+((o+"").length-1))),e)}return Gr(n,e)},Be.reduce=function(t,n,e){var r=Wu(t)?Rn:qn,i=arguments.length<3;return r(t,ao(n,4),e,i,lr)},Be.reduceRight=function(t,n,e){var r=Wu(t)?zn:qn,i=arguments.length<3;return r(t,ao(n,4),e,i,dr)},Be.repeat=function(n,e,r){return e=(r?wo(n,e,r):e===t)?1:ys(e),Zr(bs(n),e)},Be.replace=function(){var t=arguments,n=bs(t[0]);return t.length<3?n:n.replace(t[1],t[2])},Be.result=function(n,e,r){var i=-1,o=(e=mi(e,n)).length;for(o||(o=1,n=t);++i<o;){var u=null==n?t:n[Bo(e[i])];u===t&&(i=o,u=r),n=ts(u)?u.call(n):u}return n},Be.round=Oa,Be.runInContext=rt,Be.sample=function(t){return(Wu(t)?Qe:Qr)(t)},Be.size=function(t){if(null==t)return 0;if(Zu(t))return hs(t)?ce(t):t.length;var n=vo(t);return n==b||n==O?t.size:Pr(t).length},Be.snakeCase=Hs,Be.some=function(n,e,r){var i=Wu(n)?Pn:ii;return r&&wo(n,e,r)&&(e=t),i(n,ao(e,3))},Be.sortedIndex=function(t,n){return oi(t,n)},Be.sortedIndexBy=function(t,n,e){return ui(t,n,ao(e,2))},Be.sortedIndexOf=function(t,n){var e=null==t?0:t.length;if(e){var r=oi(t,n);if(r<e&&Xu(t[r],n))return r}return-1},Be.sortedLastIndex=function(t,n){return oi(t,n,!0)},Be.sortedLastIndexBy=function(t,n,e){return ui(t,n,ao(e,2),!0)},Be.sortedLastIndexOf=function(t,n){if(null!=t&&t.length){var e=oi(t,n,!0)-1;if(Xu(t[e],n))return e}return-1},Be.startCase=Qs,Be.startsWith=function(t,n,e){return t=bs(t),e=null==e?0:sr(ys(e),0,t.length),n=ci(n),t.slice(e,e+n.length)==n},Be.subtract=Ma,Be.sum=function(t){return t&&t.length?Wn(t,ua):0},Be.sumBy=function(t,n){return t&&t.length?Wn(t,ao(n,2)):0},Be.template=function(n,e,r){var i=Be.templateSettings;r&&wo(n,e,r)&&(e=t),n=bs(n),e=js({},e,i,Ji);var o,u,s=js({},e.imports,i.imports,Ji),a=Rs(s),c=Qn(s,a),h=0,f=e.interpolate||_t,l="__p += '",d=St((e.escape||_t).source+"|"+f.source+"|"+(f===H?ht:_t).source+"|"+(e.evaluate||_t).source+"|$","g"),p="//# sourceURL="+(Pt.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++rn+"]")+"\n";n.replace(d,(function(t,e,r,i,s,a){return r||(r=i),l+=n.slice(h,a).replace(mt,re),e&&(o=!0,l+="' +\n__e("+e+") +\n'"),s&&(u=!0,l+="';\n"+s+";\n__p += '"),r&&(l+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),h=a+t.length,t})),l+="';\n";var v=Pt.call(e,"variable")&&e.variable;if(v){if(at.test(v))throw new jt("Invalid `variable` option passed into `_.template`")}else l="with (obj) {\n"+l+"\n}\n";l=(u?l.replace($,""):l).replace(V,"$1").replace(X,"$1;"),l="function("+(v||"obj")+") {\n"+(v?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(u?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+l+"return __p\n}";var g=na((function(){return At(a,p+"return "+l).apply(t,c)}));if(g.source=l,Ku(g))throw g;return g},Be.times=function(t,n){if((t=ys(t))<1||t>h)return[];var e=l,r=me(t,l);n=ao(n),t-=l;for(var i=Gn(r,n);++e<t;)n(e);return i},Be.toFinite=gs,Be.toInteger=ys,Be.toLength=_s,Be.toLower=function(t){return bs(t).toLowerCase()},Be.toNumber=ms,Be.toSafeInteger=function(t){return t?sr(ys(t),-9007199254740991,h):0===t?t:0},Be.toString=bs,Be.toUpper=function(t){return bs(t).toUpperCase()},Be.trim=function(n,e,r){if((n=bs(n))&&(r||e===t))return Zn(n);if(!n||!(e=ci(e)))return n;var i=he(n),o=he(e);return bi(i,Kn(i,o),te(i,o)+1).join("")},Be.trimEnd=function(n,e,r){if((n=bs(n))&&(r||e===t))return n.slice(0,fe(n)+1);if(!n||!(e=ci(e)))return n;var i=he(n);return bi(i,0,te(i,he(e))+1).join("")},Be.trimStart=function(n,e,r){if((n=bs(n))&&(r||e===t))return n.replace(et,"");if(!n||!(e=ci(e)))return n;var i=he(n);return bi(i,Kn(i,he(e))).join("")},Be.truncate=function(n,e){var r=30,i="...";if(rs(e)){var o="separator"in e?e.separator:o;r="length"in e?ys(e.length):r,i="omission"in e?ci(e.omission):i}var u=(n=bs(n)).length;if(ie(n)){var s=he(n);u=s.length}if(r>=u)return n;var a=r-ce(i);if(a<1)return i;var c=s?bi(s,0,a).join(""):n.slice(0,a);if(o===t)return c+i;if(s&&(a+=c.length-a),as(o)){if(n.slice(a).search(o)){var h,f=c;for(o.global||(o=St(o.source,bs(ft.exec(o))+"g")),o.lastIndex=0;h=o.exec(f);)var l=h.index;c=c.slice(0,l===t?a:l)}}else if(n.indexOf(ci(o),a)!=a){var d=c.lastIndexOf(o);d>-1&&(c=c.slice(0,d))}return c+i},Be.unescape=function(t){return(t=bs(t))&&q.test(t)?t.replace(Y,le):t},Be.uniqueId=function(t){var n=++Dt;return bs(t)+n},Be.upperCase=Js,Be.upperFirst=Ks,Be.each=bu,Be.eachRight=xu,Be.first=Zo,ha(Be,(wa={},wr(Be,(function(t,n){Pt.call(Be.prototype,n)||(wa[n]=t)})),wa),{chain:!1}),Be.VERSION="4.17.21",On(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){Be[t].placeholder=Be})),On(["drop","take"],(function(n,e){Ye.prototype[n]=function(r){r=r===t?1:_e(ys(r),0);var i=this.__filtered__&&!e?new Ye(this):this.clone();return i.__filtered__?i.__takeCount__=me(r,i.__takeCount__):i.__views__.push({size:me(r,l),type:n+(i.__dir__<0?"Right":"")}),i},Ye.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()}})),On(["filter","map","takeWhile"],(function(t,n){var e=n+1,r=1==e||3==e;Ye.prototype[t]=function(t){var n=this.clone();return n.__iteratees__.push({iteratee:ao(t,3),type:e}),n.__filtered__=n.__filtered__||r,n}})),On(["head","last"],(function(t,n){var e="take"+(n?"Right":"");Ye.prototype[t]=function(){return this[e](1).value()[0]}})),On(["initial","tail"],(function(t,n){var e="drop"+(n?"":"Right");Ye.prototype[t]=function(){return this.__filtered__?new Ye(this):this[e](1)}})),Ye.prototype.compact=function(){return this.filter(ua)},Ye.prototype.find=function(t){return this.filter(t).head()},Ye.prototype.findLast=function(t){return this.reverse().find(t)},Ye.prototype.invokeMap=Hr((function(t,n){return"function"==typeof t?new Ye(this):this.map((function(e){return Cr(e,t,n)}))})),Ye.prototype.reject=function(t){return this.filter(Lu(ao(t)))},Ye.prototype.slice=function(n,e){n=ys(n);var r=this;return r.__filtered__&&(n>0||e<0)?new Ye(r):(n<0?r=r.takeRight(-n):n&&(r=r.drop(n)),e!==t&&(r=(e=ys(e))<0?r.dropRight(-e):r.take(e-n)),r)},Ye.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Ye.prototype.toArray=function(){return this.take(l)},wr(Ye.prototype,(function(n,e){var r=/^(?:filter|find|map|reject)|While$/.test(e),i=/^(?:head|last)$/.test(e),o=Be[i?"take"+("last"==e?"Right":""):e],u=i||/^find/.test(e);o&&(Be.prototype[e]=function(){var e=this.__wrapped__,s=i?[1]:arguments,a=e instanceof Ye,c=s[0],h=a||Wu(e),f=function(t){var n=o.apply(Be,Nn([t],s));return i&&l?n[0]:n};h&&r&&"function"==typeof c&&1!=c.length&&(a=h=!1);var l=this.__chain__,d=!!this.__actions__.length,p=u&&!l,v=a&&!d;if(!u&&h){e=v?e:new Ye(this);var g=n.apply(e,s);return g.__actions__.push({func:gu,args:[f],thisArg:t}),new Xe(g,l)}return p&&v?n.apply(this,s):(g=this.thru(f),p?i?g.value()[0]:g.value():g)})})),On(["pop","push","shift","sort","splice","unshift"],(function(t){var n=Tt[t],e=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);Be.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return n.apply(Wu(i)?i:[],t)}return this[e]((function(e){return n.apply(Wu(e)?e:[],t)}))}})),wr(Ye.prototype,(function(t,n){var e=Be[n];if(e){var r=e.name+"";Pt.call(Te,r)||(Te[r]=[]),Te[r].push({name:n,func:e})}})),Te[Bi(t,2).name]=[{name:"wrapper",func:t}],Ye.prototype.clone=function(){var t=new Ye(this.__wrapped__);return t.__actions__=ki(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=ki(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=ki(this.__views__),t},Ye.prototype.reverse=function(){if(this.__filtered__){var t=new Ye(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Ye.prototype.value=function(){var t=this.__wrapped__.value(),n=this.__dir__,e=Wu(t),r=n<0,i=e?t.length:0,o=function(t,n,e){for(var r=-1,i=e.length;++r<i;){var o=e[r],u=o.size;switch(o.type){case"drop":t+=u;break;case"dropRight":n-=u;break;case"take":n=me(n,t+u);break;case"takeRight":t=_e(t,n-u)}}return{start:t,end:n}}(0,i,this.__views__),u=o.start,s=o.end,a=s-u,c=r?s:u-1,h=this.__iteratees__,f=h.length,l=0,d=me(a,this.__takeCount__);if(!e||!r&&i==a&&d==a)return pi(t,this.__actions__);var p=[];t:for(;a--&&l<d;){for(var v=-1,g=t[c+=n];++v<f;){var y=h[v],_=y.iteratee,m=y.type,w=_(g);if(2==m)g=w;else if(!w){if(1==m)continue t;break t}}p[l++]=g}return p},Be.prototype.at=yu,Be.prototype.chain=function(){return vu(this)},Be.prototype.commit=function(){return new Xe(this.value(),this.__chain__)},Be.prototype.next=function(){this.__values__===t&&(this.__values__=vs(this.value()));var n=this.__index__>=this.__values__.length;return{done:n,value:n?t:this.__values__[this.__index__++]}},Be.prototype.plant=function(n){for(var e,r=this;r instanceof Ve;){var i=Vo(r);i.__index__=0,i.__values__=t,e?o.__wrapped__=i:e=i;var o=i;r=r.__wrapped__}return o.__wrapped__=n,e},Be.prototype.reverse=function(){var n=this.__wrapped__;if(n instanceof Ye){var e=n;return this.__actions__.length&&(e=new Ye(this)),(e=e.reverse()).__actions__.push({func:gu,args:[ru],thisArg:t}),new Xe(e,this.__chain__)}return this.thru(ru)},Be.prototype.toJSON=Be.prototype.valueOf=Be.prototype.value=function(){return pi(this.__wrapped__,this.__actions__)},Be.prototype.first=Be.prototype.head,sn&&(Be.prototype[sn]=function(){return this}),Be}();pn?((pn.exports=de)._=de,dn._=de):ln._=de}.call(ni);var tl=Kf.exports;function nl(t,n){const e=function(t,n){const e=new Set,r=new Hf.Graph({directed:!0}),i=[];if(!t.hasNode(n))throw Error("node not in graph");return el(t,n,e,r,i),t.nodes().forEach((n=>{e.has(n)||el(t,n,e,r,i)})),i.forEach(((t,n)=>{r.node(t).thread=n+1<i.length?i[n+1]:i[0]})),r}(t,n);return t.edges().forEach((n=>{const r=function(t,n,e){const r=t.node(n),i=t.node(e);if(r.depth<i.depth){let n=r.thread;for(;t.node(n).depth>r.depth;){if(n===e)return 1;n=t.node(n).thread}}else if(i.depth<r.depth){let e=i.thread;for(;t.node(e).depth>i.depth;){if(e===n)return-1;e=t.node(e).thread}}return 0}(e,n.v,n.w);if(r<0){const e=t.edge(n)||{};e.reversed=!0,t.removeEdge(n),t.setEdge(n.w,n.v,e)}})),t}function el(t,n,e,r,i,o=0){if(!e.has(n)){e.add(n),i.push(n),r.setNode(n,{depth:o});t.outEdges(n).map((t=>t.w)).forEach((u=>{e.has(u)||r.setEdge(n,u,{delta:1}),el(t,u,e,r,i,o+1)}))}}var rl=function(){for(var t=0;t<arguments.length;t++)if(void 0!==arguments[t])return arguments[t]};const il=ei(rl);function ol(t,n){if(0===t.nodes().length)return;const e=function(t,n){const e=new Hf.Graph({directed:!0});let r=!1;for(const u of n)if("min"===u.type){r=!0;break}if(!r){const e=t.sources();n=e.length>0?[{type:"min",nodes:[e[0]]},...n]:[{type:"min",nodes:[t.nodes()[0]]},...n]}const i=new Map;let o=0;return n.forEach((t=>{if(!t.nodes||0===t.nodes.length)return;const n=""+o++;t.nodes.forEach((t=>{i.set(t,n)})),e.setNode(n,{type:t.type,nodes:t.nodes})})),t.nodes().forEach((t=>{if(!i.has(t)){const n=""+o++,r={type:"same",nodes:[t]};i.set(t,n),e.setNode(n,r)}})),t.edges().forEach((n=>{const r=i.has(n.v)?i.get(n.v):n.v,o=i.has(n.w)?i.get(n.w):n.w,u=t.node(n.v)||{},s=t.node(n.w)||{},a=e.edge(r,o)||{delta:0};r===o?(a.delta=0,e.setEdge(r,o,a)):"l"===u.direction?(a.delta=Math.max(a.delta,"l"===s.direction?1:0),e.setEdge(o,r,a)):(a.delta=Math.max(a.delta,"l"===s.direction?0:1),e.setEdge(r,o,a))})),e}(t,n);!function(t){t.sources().forEach((n=>{"0"!==n&&t.setEdge("0",n,{temp:!0,delta:0})}))}(e),nl(e,"0"),function(t){const n=t.sources(),e=new Set,r=new Set;for(t.edges().forEach((t=>{t.v===t.w&&r.add(t)}));n.length>0;){const i=n.shift();e.add(i);let o=t.node(i);o||t.setNode(i,o={}),o.rank=0;for(const n of t.inEdges(i)){const e=il((t.edge(n)||{}).delta,1);o.rank=Math.max(o.rank,t.node(n.v).rank+e)}for(const n of t.outEdges(i))r.add(n);for(const u of t.nodes())n.indexOf(u)<0&&!e.has(u)&&!t.inEdges(u).some((t=>!r.has(t)))&&n.push(u)}}(e),function(t){function n(n){const e=t.node(n),r=tl.min(t.outEdges(n).map((n=>t.node(n.w).rank-t.edge(n).delta)));void 0!==r&&(e.rank=r)}t.edges().forEach((e=>{t.edge(e).temp&&n(e.w)}))}(e),t.nodes().forEach((n=>{t.node(n)||t.setNode(n,{})})),e.nodes().forEach((n=>{const r=e.node(n);r.nodes.forEach((n=>{t.node(n).rank=r.rank}))}))}function ul(t,n,e){return function(t,n,e){let r,i,o;n.length>e.length?(r=n,i=e):(r=e,i=n);const u=[];r.forEach((n=>{i.forEach(((e,r)=>{(t.hasEdge(n,e)||t.hasEdge(e,n))&&u.push(r)}))}));let s=1;for(;s<o;)s*=2;const a=2*s-1;s-=1;const c=new Array(a);for(let f=0;f<a;f++)c[f]=0;let h=0;return u.forEach((t=>{let n=t+s;for(c[n]++;n>0;)n%2&&(h+=c[n+1]),n=Math.floor((n-1)/2),c[n]++})),h}(t,n,e)}function sl(t,n){let e=!0;for(;e;){e=!1;for(let r=0;r<n.length;++r)for(let i=0;i<n[r].length-1;++i){const o=al(t,n,r);cl(n[r],i,i+1);al(t,n,r)<o?e=!0:cl(n[r],i,i+1)}}}function al(t,n,e){let r=0;return e>0&&(r+=ul(t,n[e-1],n[e])),e+1<n.length&&(r+=ul(t,n[e],n[e+1])),r}function cl(t,n,e){const r=t[n];t[n]=t[e],t[e]=r}function hl(t){const n=Math.floor(t.length/2);if(0===t.length)return-1;if(t.length%2==1)return t[n];if(2===t.length)return(t[0]+t[1])/2;{const e=t[n-1]-t[0],r=t[t.length-1]-t[n];return(t[n-1]*r+t[n]*e)/(e+r)}}function fl(t,n,e=1,r=!1){if(e>0)for(let i=1;i<n.length;++i){const e=new Map;n[i].forEach((o=>{const u=hl(ll(t,n,i,i-1,o,r));e.set(o,u)})),dl(n[i],e)}else for(let i=n.length-2;i>=0;--i){const e=new Map;n[i].forEach((o=>{const u=hl(ll(t,n,i,i+1,o,r));e.set(o,u)})),dl(n[i],e)}}function ll(t,n,e,r,i,o=!1){const u=n[e],s=n[r],a=[];return s.forEach(((n,e)=>{t.nodeEdges(n,i).length>0&&a.push(e)})),0===a.length&&o&&u.forEach(((n,e)=>{t.nodeEdges(n,i).length>0&&a.push(e+.5)})),a.sort(((t,n)=>t-n)),a}function dl(t,n){const e=new Map(t.map(((t,n)=>[t,n])));for(let r=1;r<t.length;++r)for(let i=r;i>0;--i){let r=i-1,o=n.get(t[r]),u=n.get(t[i]);for(;-1===(o=n.get(t[r]))&&r>0;)r--;if(-1===u||-1===o)break;if(o===u&&(o=e.get(t[r]),u=e.get(t[i])),u>=o)break;[t[i],t[r]]=[t[r],t[i]]}}function pl(t,n=25){const e=function(t){const n=[];let e=t.nodes().filter((n=>0===t.node(n).rank)).concat(t.sources());return 0===e.length&&(e=t.nodes().slice(0,1)),Hf.alg.preorder(t,e).forEach((e=>{const r=t.node(e).rank;for(;r>=n.length;)n.push([]);n[r].push(e)})),n}(t);let r=e,i=0;for(;i++<n;)fl(t,e,i%2==0?1:0),sl(t,e),vl(t,e)<vl(t,r)&&(r=gl(e));return r=r.map((t=>[t])),r}function vl(t,n){let e=0;for(let r=0;r<n.length-1;++r)e+=ul(t,n[r],n[r+1]);return e}function gl(t){const n=[];for(const e of t){const t=[];n.push(t);for(const n of e)t.push(n)}return n}function yl(t,n,e,r){if(0===e.length)return;const i=e.map((e=>{const i=`__${n.v}_${n.w}_${e}`;return t.setNode(i,{rank:e,dummy:!0,data:null,direction:r}),i})),o=[n.v,...i,n.w];o.forEach(((e,r)=>{r+1<o.length&&t.setEdge(o[r],o[r+1],{source:t.node(n.v),target:t.node(n.w),data:t.edge(n).data},n.name)})),t.removeEdge(n)}function _l(){let t=[100,100],n=null,e=.5,r=function(t,n,e){return 1};const i=function(t){return t.data.value},o=function(t){return t.data?t.data.direction:"r"};function u(s,a){null===n&&u.scaleToFit(s,a),ml(s,i,o),function(t,n,e){t.nodes().forEach((n=>{const r=t.node(n);r.dy=r.value*e})),t.edges().forEach((r=>{const i=t.edge(r);i.value=n(i),i.dy=i.value*e}))}(s,i,n);const c=wl(s,a);a.forEach((n=>{let i=0;n.forEach(((n,o)=>{const u=c[o]/tl.sumBy(c)*t[1],a=0===i?0:e*u/5,h=u-2*a,f=tl.sumBy(n,(t=>s.node(t).dy)),l=n.map(((t,e)=>s.node(t).value&&n[e+1]?r(n[e],n[e+1],s):0)),d=Math.max(0,h-f),p=tl.sumBy(l)?d/tl.sumBy(l):0;let v=i+a;1===n.length&&(v+=(h-s.node(n[0]).dy)/2);let g=Number.MAX_VALUE;n.forEach(((t,n)=>{const e=s.node(t);e.y=v,e.spaceAbove=g,e.spaceBelow=l[n]*p,v+=e.dy+e.spaceBelow,g=e.spaceBelow,e.data&&void 0!==e.data.forceY&&(e.y=a+e.data.forceY*(h-e.dy))})),n.length>0&&(s.node(n[n.length-1]).spaceBelow=Number.MAX_VALUE),i+=u}))}));const h=function(t,n){const e=[];return n.forEach(((r,i)=>{if(i===n.length-1)return;let o=0;r.forEach((n=>{n.forEach((n=>{t.outEdges(n).forEach((n=>{const e=t.edge(n).dy,r=t.node(n.w).y-t.node(n.v).y,i=Math.abs(r)-e,u=e*e-i*i,s=u>=0?Math.sqrt(u):e;s>o&&(o=s)}))}))})),e.push(o)})),e}(s,a);!function(t,n,e,r){const i=tl.sumBy(r);let o;if(i>e)o=r.map((t=>e*t/i));else{const t=e-i;o=r.map((e=>e+t/(n.length-1)))}let u=0;n.forEach(((n,e)=>{n.forEach((n=>{n.forEach((n=>{t.node(n).x=u}))})),u+=o[e]}))}(s,a,t[0],h);const f=[];return s.nodes().forEach((t=>{const n=s.node(t);n.id=t,f.push(n)})),f}return u.scaleToFit=function(r,u){ml(r,i,o);const s=tl.sumBy(wl(r,u));s<=0?n=1:(n=t[1]/s,1!=e&&(n*=1-e))},u.size=function(n){return arguments.length?(t=n,u):t},u.separation=function(t){return arguments.length?(r=tl.isFunction(t)?t:()=>t,u):r},u.whitespace=function(t){return arguments.length?(e=t,u):e},u.scale=function(t){return arguments.length?(n=t,u):n},u}function ml(t,n,e){t.nodes().forEach((r=>{const i=tl.sumBy(t.inEdges(r),(e=>n(t.edge(e)))),o=tl.sumBy(t.outEdges(r),(e=>n(t.edge(e))));let u=t.node(r);u||t.setNode(r,u={}),u.value=Math.max(i,o),void 0===u.direction&&(u.direction=e(u)||"r")}))}function wl(t,n){if(0===n.length||0===n[0].length)return[];const e=n[0].length,r=new Array(e);for(let i=0;i<e;i++)r[i]=0;return n.forEach((n=>{n.forEach(((n,e)=>{const i=tl.sumBy(n,(n=>t.node(n).value));r[e]=Math.max(r[e],i)}))})),r}function bl(t,n){const e=t.inEdges(n),r=t.outEdges(n),i=new Map;[...e,...r].forEach((t=>{i.has(t.name)||i.set(t.name,[]),i.get(t.name).push(t)}));const o=new Map(Array.from(i.entries()).map((([e,r])=>{const i=tl.sumBy(r,(n=>t.edge(n).value));return[e,tl.sumBy(r,(e=>t.edge(e).value*function(e){if(e.v===n)return t.node(e.w).y;if(e.w===n)return t.node(e.v).y;throw new Error}(e)))/i]}))),u=Array.from(o.keys());return u.sort(),u}function xl(t,n){if(null===n.w)return 0;if(null===n.v)return 0;if(n.w===n.v)return Math.PI/2;{const e=t.node(n.v),r=t.node(n.w);return Math.atan2(r.y-e.y,r.x-e.x)}}function El(t,n=!0){return function(e,r){const i=xl(t,e),o=xl(t,r),u=n?1:-1;return e.v===r.v&&e.w===r.w?"number"==typeof e.name&&"number"==typeof r.name?e.name-r.name:"string"==typeof e.name&&"string"==typeof r.name?e.name.localeCompare(r.name):0:Math.abs(i-o)<.001?e.v&&e.w&&r.v&&r.w?e.w===r.w?-1*(t.node(e.v).y-t.node(r.v).y):e.v===r.v?-1*(t.node(e.w).y-t.node(r.w).y):0:0:u*(i-o)}}function jl(t,n,e=!0){return function(r,i){if(r.name!==i.name)return n.indexOf(r.name)-n.indexOf(i.name);const o=xl(t,r),u=xl(t,i),s=e?1:-1;return Math.abs(o-u)<.001?r.v&&r.w&&i.v&&i.w?r.w===i.w?s*(o>0?-1:1)*(t.node(r.v).y-t.node(i.v).y):r.v===i.v?s*(o>0?-1:1)*(t.node(r.w).y-t.node(i.w).y):0:0:s*(o-u)}}function Al(t,n){let e=null;for(let r=0;r<t.length;++r)if(n(t[r])){e=r;break}return e}function Ol(t,n){if(0===t.length)return;let e,r=0;for(let o=t.length-1;o>=0;--o)e=t[o].dy/2,t[o][n]-e<r&&(t[o][n]=Math.min(t[o].Rmax,r+e)),r=t[o][n]+e;let i=t[0].Rmax+t[0].dy/2;for(let o=0;o<t.length;++o)e=t[o].dy/2,t[o][n]+e>i&&(t[o][n]=Math.max(e,i-e)),i=t[o][n]-e}function Ml(t){return function(n){!function(t,n){t.nodes().forEach((e=>{const r=t.node(e);let i=0,o=0;r.outgoing.forEach((e=>{const o=t.edge(e);o.x0=r.x+n.nodeWidth/2,o.y0=r.y+i+o.dy/2,o.d0=r.direction||"r",i+=o.dy})),r.incoming.forEach((e=>{const i=t.edge(e);i.x1=r.x-n.nodeWidth/2,i.y1=r.y+o+i.dy/2,i.d1=r.direction||"r",o+=i.dy}))}))}(n,t),function(t){t.nodes().forEach((n=>{const e=t.node(n),r=e.outgoing.map((n=>t.edge(n))),i=e.incoming.map((n=>t.edge(n)));r.sort(((t,n)=>t.y0-n.y0)),i.sort(((t,n)=>t.y1-n.y1)),Sl(r,"r0"),Sl(i,"r1")}))}(n);const e=[];return n.edges().forEach((t=>{const r=n.edge(t);r.id=`${t.v}-${t.w}-${t.name}`,e.push(r)})),e}}function Sl(t,n){t.forEach((t=>{t.Rmax=function(t){const n=t.x1-t.x0,e=t.y1-t.y0;return t.d0!==t.d1?Math.abs(e)/2.1:0!==e?(n*n+e*e)/Math.abs(4*e):1/0}(t),t[n]=Math.max(t.dy/2,t.d0===t.d1?.6*t.Rmax:5+t.dy/2)}));let e=Al(t,"r0"===n?t=>t.y1>t.y0:t=>t.y0>t.y1);if(null===e&&(e=t.length),Ol(t.slice(e),n),e>0){const r=[];for(let n=e-1;n>=0;n--)r.push(t[n]);Ol(r,n)}}function kl(t){const n=_l(),e=Ml(t);let r=[],i=[],o=null;function u(t=[],u=[],s={}){const a=function(t=[],n=[]){const e=new Hf.Graph({directed:!0,multigraph:!0});return n.forEach((t=>{e.setEdge(t.source,t.target,{data:t},t.type)})),e.nodes().forEach((t=>e.setNode(t,{data:{}}))),t.forEach((t=>{e.hasNode(t.id)&&(e.node(t.id).data=t,void 0!==t.direction&&(e.node(t.id).direction=t.direction))})),e.edges().forEach((t=>{e.edge(t).source=e.node(t.v),e.edge(t).target=e.node(t.w)})),e}(u,t);var c;return s.order?(ol(a,s.rankSets||[]),o=s.order,o.length>0&&o[0].length>0&&!tl.isArray(o[0][0])&&(o=o.map((t=>[t]))),o=o.map((t=>t.map((t=>t.filter((t=>void 0!==a.node(t)))))))):(ol(a,s.rankSets||[]),(c=a).edges().forEach((t=>{const n=c.node(t.v),e=c.node(t.w);let r=n.rank;const i=[];if(r+1<=e.rank){for("l"===n.direction&&i.push(r);++r<e.rank;)i.push(r);"l"===e.direction&&i.push(r),yl(c,t,i,"r")}else if(r>e.rank){for("l"!==n.direction&&i.push(r);r-- >e.rank+1;)i.push(r);"l"!==e.direction&&i.push(r),yl(c,t,i,"l")}})),o=pl(a)),r=n(a,o),function(t,{alignLinkTypes:n=!1}={}){t.nodes().forEach((e=>{const r=t.node(e);if(r.incoming=t.inEdges(e),r.outgoing=t.outEdges(e),n){const n=bl(t,e);r.incoming.sort(jl(t,n,!1)),r.outgoing.sort(jl(t,n,!0))}else r.incoming.sort(El(t,!1)),r.outgoing.sort(El(t,!0))}))}(a,{alignLinkTypes:s.alignLinkTypes||!1}),i=e(a),a}return u.nodes=function(){return r},u.links=function(){return i},u.order=function(){return o},u.size=function(t){return arguments.length?(n.size(t),u):n.size()},u.separation=function(t){return arguments.length?(n.separation(t),u):n.separation()},u.whitespace=function(t){return arguments.length?(n.whitespace(t),u):n.whitespace()},u.edgeValue=function(t){return u},u.scale=function(t){return arguments.length?(n.scale(t),u):n.scale()},u}function Cl(t){const n=Math.max(0===t.dy?0:2,t.dy)/2;let e=t.x0,r=t.x1,i=t.y0,o=t.y1;r<e&&([e,r]=[r,e],[i,o]=[o,i]);const u=o>i?1:-1,s=function(t){const n=t.x1-t.x0,e=t.y1-t.y0;return[t.dy/2,(n*n+e*e)/Math.abs(4*e)]}(t),a=Math.max(s[0],Math.min(s[1],(r-e)/3));let c=Math.max(s[0],Math.min(s[1],t.r0||a)),h=Math.max(s[0],Math.min(s[1],t.r1||a));const f=r-e,l=o-i-u*(c+h),d=Math.sqrt(f*f+l*l),p=-u*Math.acos(Math.min(1,(c+h)/d)),v=Math.atan2(l,f);let g=Math.PI/2+u*(v+p),y=n*u*Math.sin(g),_=n*Math.cos(g),m=e+1*c*Math.sin(Math.abs(g)),w=r-1*h*Math.sin(Math.abs(g)),b=i+c*u*(1-Math.cos(g)),x=o-h*u*(1-Math.cos(g));function E(t,e){const r=t*(o-i)>0?1:0;let u=1*t*(o-i)>0?e+n:e-n;return 0===g&&(u=e),"A"+u+" "+u+" "+Math.abs(g)+" 0 "+r+" "}(isNaN(g)||Math.abs(g)<.001)&&(g=c=h=0,m=e,w=r,b=i,x=o,y=0,_=n);const j="M"+[e,i-n]+" "+E(1,c)+[m+y,b-_]+" L"+[w+y,x-_]+" "+E(-1,h)+[r,o-n]+" L"+[r,o+n]+" "+E(1,h)+[w-y,x+_]+" L"+[m-y,b+_]+" "+E(-1,c)+[e,i+n]+" Z";return/NaN/.test(j)&&console.error("path NaN",t,j),j}function Tl(t,n,e,r){const i=new Un;return i.attr({transform:void 0!==t&&void 0!==n?`translate(${t}, ${n})`:void 0,"data-self":e,"data-parent":r}),i}const Il=(t,n)=>{const e=void 0!==t.title?t.title:t.id;return n&&e.length>n?`${e.substr(0,15)}...`:e};function Nl(t,{fontColor:n,nodeWidth:e,maxRank:r}){const{data:i}=t,o=function(t,n){let e=!1,r=!1;return t.rank<n/2&&(r=!0,e=!1),{top:e,right:r}}(t,r),{x:u,y:s}=function(t,n,e){const r=n.top?-25:t.dy/2-10;let i;return i=n.top?n.right?4:-4:n.right?10+e/2:-e/2-10,{x:t.x+i,y:t.y+r}}(t,o,e),a=function(t="",{x:n,y:e,fontColor:r="#666767",textAnchor:i="start",pointerEvents:o="all"}){const u=new Fn;return u.font({fill:r}),u.tspan(t),void 0!==n&&void 0!==e&&u.move(n,e),u.attr({"text-anchor":i,"pointer-events":o}),u}(Il(i,o.top?25:15),{x:u,y:s,textAnchor:o.top?"middle":o.right?"start":"end",fontColor:n,pointerEvents:"none"});return a}function Rl(t,n,e){var r,i;const{x:o,y:u,dy:s}=t,{nodeWidth:a,nodeBorderWidth:c,nodeBorderColor:h,onNodeClick:f,fontColor:l}=e,d=new Un({class:"node"}),p=function({x:t=0,y:n=0,width:e=0,height:r=0,radius:i=0,color:o="#97cbe6",borderColor:u="#caced0",opacity:s=1}={}){const a=new jn;return a.attr({x:t,y:n,width:e,height:r,rx:i,ry:i,opacity:s}),a.fill(o),a.stroke({color:u,width:1}),a}({x:o-a/2,y:u,width:a,height:s});if(p.fill(null==(r=t.data)?void 0:r.color),p.stroke({width:c,color:h??(null==(i=t.data)?void 0:i.color)}),p.on("click",(()=>{"function"==typeof f&&f(t)})),d.add(p),t.data){const e=Nl(t,{fontColor:l,nodeWidth:a,maxRank:n});d.add(e)}return d}const zl=["#ACD5FC","#E37816","#07CC80","#0871D4","#CB8E55","#9FAE29","#427565","#6D55A6","#FEF445","#E177C2","#F48B7B","#D74B05","#AA896F","#14A14D","#C5114D"],Pl=(t="",n,e="")=>{const r=document.getElementById(t);n?null==r||r.setAttribute("style",n):null==r||r.removeAttribute("style"),(null==r?void 0:r.innerHTML.replaceAll("'",'"'))!==e.replaceAll("'",'"')&&r&&(r.innerHTML=e)},Dl=t=>t.replace(/[A-Z]+(?![a-z])|[A-Z]/g,((t,n)=>(n?"-":"")+t.toLowerCase()));class Ll extends te{constructor(t,n){super(t,n.width,n.height,n.canvasStyle,n.spacing),this.element=t,this.options=n}construct(t){const{width:n,height:e,spacing:r,nodeWidth:i}=this.options,o=kl({nodeWidth:i});o.size([n-i,e-r]);const u=t.nodes.map(((t,n)=>{const e=n%zl.length;return{...t,color:t.color??zl[e],colorIndex:e}})),s=o(t.edges,u,t.options);this.maxRank=o.order().length-1,this.graph=s}renderEdge(t,n){const{enableTooltip:e,tooltipId:r,tooltipBGColor:i,tooltipBorderColor:o,edgeOpacity:u,edgeGradientFill:s,tooltipTemplate:a}=this.options,c=this.graph.edge(t.v,t.w,t.name),h=this.graph.node(t.v),f=this.graph.node(t.w),l=Cl(c),d=this.canvas.gradient("linear",(function(t){var n,e,r;t.stop(0,null==(n=h.data)?void 0:n.color),t.stop(1,s?null==(e=f.data)?void 0:e.color:null==(r=h.data)?void 0:r.color)})),p=function(t,{id:n="",edgeColor:e,opacity:r=1}={}){const i=new wn({d:t});return i.id(n),i.fill(e).opacity(r),i}(l,{id:`${t.v}-${t.w}`,edgeColor:d,opacity:u});if(e&&h.data&&f.data){const t=a?a({source:h.data,target:f.data,value:c.value}):null;p.on("mousemove",(function(n){var e;const u=(s=n.pageX,a=n.pageY,["position: absolute;",`left: ${s+20}px;`,`top: ${a+20}px;`,`border: 1px solid ${o};`,"border-radius: 5px;",`background-color: ${i};`,"padding: 10px"]);var s,a;null==(e=Jn(`[id="${n.target.id}"]`))||e.front().opacity(1),Pl(r,u.join(" "),t)})),p.on("mouseout",(function(t){var n;Pl(r),null==(n=Jn(`[id="${t.target.id}"]`))||n.front().opacity(u)}))}n.add(p)}render({keepOldPosition:t=!1}={}){var n,e;const{nodeWidth:r,nodeBorderWidth:i,nodeBorderColor:o,enableTooltip:u,tooltipId:s,onNodeClick:a,fontColor:c,fontFamily:h,fontSize:f,fontWeight:l}=this.options,d=this.canvas.viewbox();this.clear();const p=((t={})=>{const n=[];for(const e in t){const r=`${Dl(e)}: ${t[e]};`;n.push(r)}return n.join(" ")})({fontSize:f,fontWeight:l,fontFamily:h,color:c}),v=Tl(r/2,0);v.attr("style",p);const g=(null==(n=this.graph)?void 0:n.nodes())||[],y=(null==(e=this.graph)?void 0:e.edges())||[],_=Tl();y.forEach((t=>{this.renderEdge(t,_)})),v.add(_);const m=Tl();if(g.forEach((t=>{const n=Rl(this.graph.node(t),this.maxRank,{nodeWidth:r,nodeBorderWidth:i,nodeBorderColor:o,onNodeClick:a,fontColor:c});m.add(n)})),v.add(m),this.add(v),t&&this.updateViewBox(d.x,d.y,d.width,d.height),u){const t=((t="apexsankey-tooltip-container")=>{const n=document.getElementById(t)||document.createElement("div");return n.id=t,n})(s);(document.body||document.getElementsByTagName("body")[0]).append(t)}}}const Fl={width:800,height:650,canvasStyle:"border: 1px solid #caced0",spacing:20,nodeWidth:20,nodeBorderWidth:1,nodeBorderColor:null,onNodeClick:void 0,edgeOpacity:.4,edgeGradientFill:!0,fontSize:"14px",fontFamily:"",fontWeight:400,fontColor:"#212121",enableTooltip:!0,tooltipId:"sankey-tooltip-container",tooltipBorderColor:"#BCBCBC",tooltipBGColor:"#FFFFFF",tooltipTemplate:({source:t,target:n,value:e})=>`\n <div style='display:flex;align-items:center;gap:5px;'>\n <div style='width:12px;height:12px;background-color:${t.color}'></div>\n <div>${t.title}</div>\n <div>=></div>\n <div style='width:12px;height:12px;background-color:${n.color}'></div>\n <div>${n.title}</div>\n <div>: ${e}</div> \n </div>\n `};return class{constructor(t,n){this.element=t,this.options={...Fl,...n};const e=document.createElement("div");e.id="apexSankeyWrapper",e.style.position="relative",this.graph=new Ll(e,this.options),this.element.append(e)}render(t){if(!this.element)throw new Error("Element not found");return this.graph.construct(t),this.graph.render(),this.graph}}}));