wuepgg3-track 1.1.4 → 1.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{SharedSystems-X0U03WDj.mjs → SharedSystems-CvggjHYf.mjs} +1 -1
- package/dist/{WebGLRenderer-C49mww3q.mjs → WebGLRenderer-CnUZtkfN.mjs} +2 -2
- package/dist/{WebGPURenderer-UdJO3N42.mjs → WebGPURenderer-BclnTlr5.mjs} +2 -2
- package/dist/{browserAll-D0u0nrXL.mjs → browserAll-BrHpPp1f.mjs} +2 -2
- package/dist/{index-BJz7bt0i.mjs → index-BxZptoze.mjs} +10 -9
- package/dist/index.es.js +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/{init-BsvsR_dN.mjs → init-B858sALg.mjs} +1 -1
- package/dist/webworkerAll-C6Yg2PdJ.mjs +2 -0
- package/package.json +1 -1
- package/dist/webworkerAll-D0MDZNtW.mjs +0 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { q as Le, G as te, t as re, u as He, k as se, M as v, v as ae, E as u, e as E, x as S, y as ze, z as O, F as b, R as F, H as ne, I as We, s as m, S as f, h as B, w as ie, J as q, K as Ve, b as K, B as k, i as U, L as M, j as T, N as w, O as Ne, a as je, Q as oe, V as le, W as ue, X as de, C as P, Y as ce, Z as $e, P as qe, c as Ke, T as Y, D as he, _ as J, $ as Ye, a0 as Je, a1 as Xe } from "./index-
|
|
1
|
+
import { q as Le, G as te, t as re, u as He, k as se, M as v, v as ae, E as u, e as E, x as S, y as ze, z as O, F as b, R as F, H as ne, I as We, s as m, S as f, h as B, w as ie, J as q, K as Ve, b as K, B as k, i as U, L as M, j as T, N as w, O as Ne, a as je, Q as oe, V as le, W as ue, X as de, C as P, Y as ce, Z as $e, P as qe, c as Ke, T as Y, D as he, _ as J, $ as Ye, a0 as Je, a1 as Xe } from "./index-BxZptoze.mjs";
|
|
2
2
|
import { S as fe, B as pe, c as Qe } from "./colorToUniform-zJcCVLeu.mjs";
|
|
3
3
|
const me = class A extends Le {
|
|
4
4
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { E as d, B, w as m, D as S, J as K, t as Be, q as U, s as b, a2 as Ae, j as $, a3 as Ne, S as p, N as H, i as A, h as N, k as F, M as z, a4 as Y, a5 as ye, a6 as Ce, a7 as q, a8 as De, A as Ie, R as Ge, e as v } from "./index-
|
|
1
|
+
import { E as d, B, w as m, D as S, J as K, t as Be, q as U, s as b, a2 as Ae, j as $, a3 as Ne, S as p, N as H, i as A, h as N, k as F, M as z, a4 as Y, a5 as ye, a6 as Ce, a7 as q, a8 as De, A as Ie, R as Ge, e as v } from "./index-BxZptoze.mjs";
|
|
2
2
|
import { S as O, b as Z } from "./colorToUniform-zJcCVLeu.mjs";
|
|
3
|
-
import { e as Ue, G as Fe, c as Oe, b as Pe, U as Me, R as Le, B as J, d as y, f as He, S as we, a as Ve } from "./SharedSystems-
|
|
3
|
+
import { e as Ue, G as Fe, c as Oe, b as Pe, U as Me, R as Le, B as J, d as y, f as He, S as we, a as Ve } from "./SharedSystems-CvggjHYf.mjs";
|
|
4
4
|
class Q {
|
|
5
5
|
constructor() {
|
|
6
6
|
this._tempState = O.for2d(), this._didUploadHash = {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { g as E, E as p, f as ae, D as B, S as C, B as T, b as ue, c as L, d as M, w as v, h as y, i as ce, j as de, k as A, l as w, M as k, m as D, n as he, o as pe, p as H, q as z, s as R, A as le, R as fe, e as S } from "./index-
|
|
1
|
+
import { g as E, E as p, f as ae, D as B, S as C, B as T, b as ue, c as L, d as M, w as v, h as y, i as ce, j as de, k as A, l as w, M as k, m as D, n as he, o as pe, p as H, q as z, s as R, A as le, R as fe, e as S } from "./index-BxZptoze.mjs";
|
|
2
2
|
import { S as F, l as ge, a as me } from "./colorToUniform-zJcCVLeu.mjs";
|
|
3
|
-
import { c as _e, u as be, U as ye, B as xe, G as Ge, e as Be, R as Se, t as Pe, S as Te, a as Ce } from "./SharedSystems-
|
|
3
|
+
import { c as _e, u as be, U as ye, B as xe, G as Ge, e as Be, R as Se, t as Pe, S as Te, a as Ce } from "./SharedSystems-CvggjHYf.mjs";
|
|
4
4
|
const x = F.for2d();
|
|
5
5
|
class O {
|
|
6
6
|
start(e, t, r) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { P as g, r as Q, E as b, T as C, U as ee, a as te, w as y, e as w, C as Z } from "./index-
|
|
2
|
-
import "./init-
|
|
1
|
+
import { P as g, r as Q, E as b, T as C, U as ee, a as te, w as y, e as w, C as Z } from "./index-BxZptoze.mjs";
|
|
2
|
+
import "./init-B858sALg.mjs";
|
|
3
3
|
class M {
|
|
4
4
|
/**
|
|
5
5
|
* @param manager - The event boundary which manages this event. Propagation can only occur
|
|
@@ -12370,7 +12370,8 @@ const Aar = {
|
|
|
12370
12370
|
function h() {
|
|
12371
12371
|
if (c) {
|
|
12372
12372
|
let { xSpan1: a, xSpan2: o } = c;
|
|
12373
|
-
|
|
12373
|
+
dar(e.targetRef.current);
|
|
12374
|
+
const m = a.start, u = o.start, v = m - e.viewWindow.start + 120 + "px", d = u - e.viewWindow.start + 120 + "px", C = m + 120 + "px", A = u + 120 + "px", E = Math.max(a.getLength(), 1), F = Math.max(o.getLength(), 1);
|
|
12374
12375
|
return /* @__PURE__ */ S.jsxs(S.Fragment, { children: [
|
|
12375
12376
|
/* @__PURE__ */ S.jsx(
|
|
12376
12377
|
"div",
|
|
@@ -12380,8 +12381,8 @@ const Aar = {
|
|
|
12380
12381
|
position: "absolute",
|
|
12381
12382
|
display: "block",
|
|
12382
12383
|
// 20 px is the padding in genome Root if you include borders in css you also have to account for border left and border right so border: 1px we have to add 2px here
|
|
12383
|
-
left: e.options.packageVersion ?
|
|
12384
|
-
width:
|
|
12384
|
+
left: e.options.packageVersion ? C : v,
|
|
12385
|
+
width: E + "px",
|
|
12385
12386
|
height: "100%",
|
|
12386
12387
|
zIndex: 1e3
|
|
12387
12388
|
},
|
|
@@ -12396,8 +12397,8 @@ const Aar = {
|
|
|
12396
12397
|
position: "absolute",
|
|
12397
12398
|
display: "block",
|
|
12398
12399
|
// 20 px is the padding in genome Root if you include borders in css you also have to account for border left and border right so border: 1px we have to add 2px here
|
|
12399
|
-
left: e.options.packageVersion ?
|
|
12400
|
-
width:
|
|
12400
|
+
left: e.options.packageVersion ? A : d,
|
|
12401
|
+
width: F + "px",
|
|
12401
12402
|
height: "1000",
|
|
12402
12403
|
zIndex: 1e3
|
|
12403
12404
|
},
|
|
@@ -57695,7 +57696,7 @@ const nx = (n) => {
|
|
|
57695
57696
|
},
|
|
57696
57697
|
test: () => !0,
|
|
57697
57698
|
load: async () => {
|
|
57698
|
-
await import("./browserAll-
|
|
57699
|
+
await import("./browserAll-BrHpPp1f.mjs");
|
|
57699
57700
|
}
|
|
57700
57701
|
}, Mpr = {
|
|
57701
57702
|
extension: {
|
|
@@ -57705,7 +57706,7 @@ const nx = (n) => {
|
|
|
57705
57706
|
},
|
|
57706
57707
|
test: () => typeof self < "u" && self.WorkerGlobalScope !== void 0,
|
|
57707
57708
|
load: async () => {
|
|
57708
|
-
await import("./webworkerAll-
|
|
57709
|
+
await import("./webworkerAll-C6Yg2PdJ.mjs");
|
|
57709
57710
|
}
|
|
57710
57711
|
};
|
|
57711
57712
|
class F3 {
|
|
@@ -66575,13 +66576,13 @@ async function EEr(n) {
|
|
|
66575
66576
|
for (let i = 0; i < e.length; i++) {
|
|
66576
66577
|
const a = e[i];
|
|
66577
66578
|
if (a === "webgpu" && await SEr()) {
|
|
66578
|
-
const { WebGPURenderer: o } = await import("./WebGPURenderer-
|
|
66579
|
+
const { WebGPURenderer: o } = await import("./WebGPURenderer-BclnTlr5.mjs");
|
|
66579
66580
|
c = o, h = { ...n, ...n.webgpu };
|
|
66580
66581
|
break;
|
|
66581
66582
|
} else if (a === "webgl" && pEr(
|
|
66582
66583
|
n.failIfMajorPerformanceCaveat ?? rK.defaultOptions.failIfMajorPerformanceCaveat
|
|
66583
66584
|
)) {
|
|
66584
|
-
const { WebGLRenderer: o } = await import("./WebGLRenderer-
|
|
66585
|
+
const { WebGLRenderer: o } = await import("./WebGLRenderer-CnUZtkfN.mjs");
|
|
66585
66586
|
c = o, h = { ...n, ...n.webgl };
|
|
66586
66587
|
break;
|
|
66587
66588
|
} else if (a === "canvas")
|
package/dist/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { bj as s, bi as t, aE as o, aA as r, aT as n, aP as i, aB as b, aJ as l, bk as g, aG as c, aC as p, az as m, aM as u, av as C, au as S, an as d, b6 as T, aL as y, aK as D, aU as F, aD as f, aO as k, aX as M, aH as h, aN as G, aV as L, aI as I, ay as R, bh as v, as as H, at as O, aR as B, aW as N, bd as w, b2 as A, ba as E, bl as P, a$ as _, ar as x, b5 as J, bo as U, aw as V, a_ as j, bm as q, ap as z, ao as K, aZ as Y, aY as Q, b8 as W, be as X, aF as Z, aS as $, b0 as aa, b1 as ea, bg as sa, b7 as ta, b4 as oa, b3 as ra, bb as na, aq as ia, bf as ba, bc as la, bp as ga, aQ as ca, bn as pa, ax as ma, b9 as ua } from "./index-
|
|
1
|
+
import { bj as s, bi as t, aE as o, aA as r, aT as n, aP as i, aB as b, aJ as l, bk as g, aG as c, aC as p, az as m, aM as u, av as C, au as S, an as d, b6 as T, aL as y, aK as D, aU as F, aD as f, aO as k, aX as M, aH as h, aN as G, aV as L, aI as I, ay as R, bh as v, as as H, at as O, aR as B, aW as N, bd as w, b2 as A, ba as E, bl as P, a$ as _, ar as x, b5 as J, bo as U, aw as V, a_ as j, bm as q, ap as z, ao as K, aZ as Y, aY as Q, b8 as W, be as X, aF as Z, aS as $, b0 as aa, b1 as ea, bg as sa, b7 as ta, b4 as oa, b3 as ra, bb as na, aq as ia, bf as ba, bc as la, bp as ga, aQ as ca, bn as pa, ax as ma, b9 as ua } from "./index-BxZptoze.mjs";
|
|
2
2
|
export {
|
|
3
3
|
s as AppStateLoader,
|
|
4
4
|
t as AppStateSaver,
|
package/dist/index.umd.js
CHANGED
|
@@ -65,7 +65,7 @@ object-assign
|
|
|
65
65
|
(c) Sindre Sorhus
|
|
66
66
|
@license MIT
|
|
67
67
|
*/var mE,NO;function Mar(){if(NO)return mE;NO=1;var c=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function h(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function t(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var s={},o=0;o<10;o++)s["_"+String.fromCharCode(o)]=o;var u=Object.getOwnPropertyNames(s).map(function(_){return s[_]});if(u.join("")!=="0123456789")return!1;var m={};return"abcdefghijklmnopqrst".split("").forEach(function(_){m[_]=_}),Object.keys(Object.assign({},m)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return mE=t()?Object.assign:function(i,s){for(var o,u=h(i),m,_=1;_<arguments.length;_++){o=Object(arguments[_]);for(var z in o)e.call(o,z)&&(u[z]=o[z]);if(c){m=c(o);for(var C=0;C<m.length;C++)n.call(o,m[C])&&(u[m[C]]=o[m[C]])}}return u},mE}var _E,FO;function UE(){if(FO)return _E;FO=1;var c="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return _E=c,_E}var vE,TO;function RO(){return TO||(TO=1,vE=Function.call.bind(Object.prototype.hasOwnProperty)),vE}var dE,MO;function Har(){if(MO)return dE;MO=1;var c={},e=function(){};if(c.NODE_ENV!=="production"){var n=UE(),h={},t=RO();e=function(s){var o="Warning: "+s;typeof console<"u"&&console.error(o);try{throw new Error(o)}catch{}}}function i(s,o,u,m,_){if(c.NODE_ENV!=="production"){for(var z in s)if(t(s,z)){var C;try{if(typeof s[z]!="function"){var A=Error((m||"React class")+": "+u+" type `"+z+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[z]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw A.name="Invariant Violation",A}C=s[z](o,z,m,u,null,n)}catch(N){C=N}if(C&&!(C instanceof Error)&&e((m||"React class")+": type specification of "+u+" `"+z+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof C+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),C instanceof Error&&!(C.message in h)){h[C.message]=!0;var E=_?_():"";e("Failed "+u+" type: "+C.message+(E??""))}}}}return i.resetWarningCache=function(){c.NODE_ENV!=="production"&&(h={})},dE=i,dE}var zE,HO;function Oar(){if(HO)return zE;HO=1;var c={},e=xO(),n=Mar(),h=UE(),t=RO(),i=Har(),s=function(){};c.NODE_ENV!=="production"&&(s=function(u){var m="Warning: "+u;typeof console<"u"&&console.error(m);try{throw new Error(m)}catch{}});function o(){return null}return zE=function(u,m){var _=typeof Symbol=="function"&&Symbol.iterator,z="@@iterator";function C(or){var nr=or&&(_&&or[_]||or[z]);if(typeof nr=="function")return nr}var A="<<anonymous>>",E={array:j("array"),bigint:j("bigint"),bool:j("boolean"),func:j("function"),number:j("number"),object:j("object"),string:j("string"),symbol:j("symbol"),any:I(),arrayOf:H,element:G(),elementType:K(),instanceOf:T,node:Q(),objectOf:P,oneOf:q,oneOfType:V,shape:rr,exact:Ur};function N(or,nr){return or===nr?or!==0||1/or===1/nr:or!==or&&nr!==nr}function y(or,nr){this.message=or,this.data=nr&&typeof nr=="object"?nr:{},this.stack=""}y.prototype=Error.prototype;function M(or){if(c.NODE_ENV!=="production")var nr={},vr=0;function Er(Xr,he,se,ee,le,ae,Le){if(ee=ee||A,ae=ae||se,Le!==h){if(m){var Gr=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw Gr.name="Invariant Violation",Gr}else if(c.NODE_ENV!=="production"&&typeof console<"u"){var qr=ee+":"+se;!nr[qr]&&vr<3&&(s("You are manually calling a React.PropTypes validation function for the `"+ae+"` prop on `"+ee+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),nr[qr]=!0,vr++)}}return he[se]==null?Xr?he[se]===null?new y("The "+le+" `"+ae+"` is marked as required "+("in `"+ee+"`, but its value is `null`.")):new y("The "+le+" `"+ae+"` is marked as required in "+("`"+ee+"`, but its value is `undefined`.")):null:or(he,se,ee,le,ae)}var Hr=Er.bind(null,!1);return Hr.isRequired=Er.bind(null,!0),Hr}function j(or){function nr(vr,Er,Hr,Xr,he,se){var ee=vr[Er],le=mr(ee);if(le!==or){var ae=ar(ee);return new y("Invalid "+Xr+" `"+he+"` of type "+("`"+ae+"` supplied to `"+Hr+"`, expected ")+("`"+or+"`."),{expectedType:or})}return null}return M(nr)}function I(){return M(o)}function H(or){function nr(vr,Er,Hr,Xr,he){if(typeof or!="function")return new y("Property `"+he+"` of component `"+Hr+"` has invalid PropType notation inside arrayOf.");var se=vr[Er];if(!Array.isArray(se)){var ee=mr(se);return new y("Invalid "+Xr+" `"+he+"` of type "+("`"+ee+"` supplied to `"+Hr+"`, expected an array."))}for(var le=0;le<se.length;le++){var ae=or(se,le,Hr,Xr,he+"["+le+"]",h);if(ae instanceof Error)return ae}return null}return M(nr)}function G(){function or(nr,vr,Er,Hr,Xr){var he=nr[vr];if(!u(he)){var se=mr(he);return new y("Invalid "+Hr+" `"+Xr+"` of type "+("`"+se+"` supplied to `"+Er+"`, expected a single ReactElement."))}return null}return M(or)}function K(){function or(nr,vr,Er,Hr,Xr){var he=nr[vr];if(!e.isValidElementType(he)){var se=mr(he);return new y("Invalid "+Hr+" `"+Xr+"` of type "+("`"+se+"` supplied to `"+Er+"`, expected a single ReactElement type."))}return null}return M(or)}function T(or){function nr(vr,Er,Hr,Xr,he){if(!(vr[Er]instanceof or)){var se=or.name||A,ee=br(vr[Er]);return new y("Invalid "+Xr+" `"+he+"` of type "+("`"+ee+"` supplied to `"+Hr+"`, expected ")+("instance of `"+se+"`."))}return null}return M(nr)}function q(or){if(!Array.isArray(or))return c.NODE_ENV!=="production"&&(arguments.length>1?s("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):s("Invalid argument supplied to oneOf, expected an array.")),o;function nr(vr,Er,Hr,Xr,he){for(var se=vr[Er],ee=0;ee<or.length;ee++)if(N(se,or[ee]))return null;var le=JSON.stringify(or,function(Le,Gr){var qr=ar(Gr);return qr==="symbol"?String(Gr):Gr});return new y("Invalid "+Xr+" `"+he+"` of value `"+String(se)+"` "+("supplied to `"+Hr+"`, expected one of "+le+"."))}return M(nr)}function P(or){function nr(vr,Er,Hr,Xr,he){if(typeof or!="function")return new y("Property `"+he+"` of component `"+Hr+"` has invalid PropType notation inside objectOf.");var se=vr[Er],ee=mr(se);if(ee!=="object")return new y("Invalid "+Xr+" `"+he+"` of type "+("`"+ee+"` supplied to `"+Hr+"`, expected an object."));for(var le in se)if(t(se,le)){var ae=or(se,le,Hr,Xr,he+"."+le,h);if(ae instanceof Error)return ae}return null}return M(nr)}function V(or){if(!Array.isArray(or))return c.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var nr=0;nr<or.length;nr++){var vr=or[nr];if(typeof vr!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+ur(vr)+" at index "+nr+"."),o}function Er(Hr,Xr,he,se,ee){for(var le=[],ae=0;ae<or.length;ae++){var Le=or[ae],Gr=Le(Hr,Xr,he,se,ee,h);if(Gr==null)return null;Gr.data&&t(Gr.data,"expectedType")&&le.push(Gr.data.expectedType)}var qr=le.length>0?", expected one of type ["+le.join(", ")+"]":"";return new y("Invalid "+se+" `"+ee+"` supplied to "+("`"+he+"`"+qr+"."))}return M(Er)}function Q(){function or(nr,vr,Er,Hr,Xr){return Sr(nr[vr])?null:new y("Invalid "+Hr+" `"+Xr+"` supplied to "+("`"+Er+"`, expected a ReactNode."))}return M(or)}function er(or,nr,vr,Er,Hr){return new y((or||"React class")+": "+nr+" type `"+vr+"."+Er+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+Hr+"`.")}function rr(or){function nr(vr,Er,Hr,Xr,he){var se=vr[Er],ee=mr(se);if(ee!=="object")return new y("Invalid "+Xr+" `"+he+"` of type `"+ee+"` "+("supplied to `"+Hr+"`, expected `object`."));for(var le in or){var ae=or[le];if(typeof ae!="function")return er(Hr,Xr,he,le,ar(ae));var Le=ae(se,le,Hr,Xr,he+"."+le,h);if(Le)return Le}return null}return M(nr)}function Ur(or){function nr(vr,Er,Hr,Xr,he){var se=vr[Er],ee=mr(se);if(ee!=="object")return new y("Invalid "+Xr+" `"+he+"` of type `"+ee+"` "+("supplied to `"+Hr+"`, expected `object`."));var le=n({},vr[Er],or);for(var ae in le){var Le=or[ae];if(t(or,ae)&&typeof Le!="function")return er(Hr,Xr,he,ae,ar(Le));if(!Le)return new y("Invalid "+Xr+" `"+he+"` key `"+ae+"` supplied to `"+Hr+"`.\nBad object: "+JSON.stringify(vr[Er],null," ")+`
|
|
68
|
-
Valid keys: `+JSON.stringify(Object.keys(or),null," "));var Gr=Le(se,ae,Hr,Xr,he+"."+ae,h);if(Gr)return Gr}return null}return M(nr)}function Sr(or){switch(typeof or){case"number":case"string":case"undefined":return!0;case"boolean":return!or;case"object":if(Array.isArray(or))return or.every(Sr);if(or===null||u(or))return!0;var nr=C(or);if(nr){var vr=nr.call(or),Er;if(nr!==or.entries){for(;!(Er=vr.next()).done;)if(!Sr(Er.value))return!1}else for(;!(Er=vr.next()).done;){var Hr=Er.value;if(Hr&&!Sr(Hr[1]))return!1}}else return!1;return!0;default:return!1}}function Ar(or,nr){return or==="symbol"?!0:nr?nr["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&nr instanceof Symbol:!1}function mr(or){var nr=typeof or;return Array.isArray(or)?"array":or instanceof RegExp?"object":Ar(nr,or)?"symbol":nr}function ar(or){if(typeof or>"u"||or===null)return""+or;var nr=mr(or);if(nr==="object"){if(or instanceof Date)return"date";if(or instanceof RegExp)return"regexp"}return nr}function ur(or){var nr=ar(or);switch(nr){case"array":case"object":return"an "+nr;case"boolean":case"date":case"regexp":return"a "+nr;default:return nr}}function br(or){return!or.constructor||!or.constructor.name?A:or.constructor.name}return E.checkPropTypes=i,E.resetWarningCache=i.resetWarningCache,E.PropTypes=E,E},zE}var AE,OO;function kar(){if(OO)return AE;OO=1;var c=UE();function e(){}function n(){}return n.resetWarningCache=e,AE=function(){function h(s,o,u,m,_,z){if(z!==c){var C=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw C.name="Invariant Violation",C}}h.isRequired=h;function t(){return h}var i={array:h,bigint:h,bool:h,func:h,number:h,object:h,string:h,symbol:h,any:h,arrayOf:t,element:h,elementType:h,instanceOf:t,node:h,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:n,resetWarningCache:e};return i.PropTypes=i,i},AE}var Iar={};if(Iar.NODE_ENV!=="production"){var War=xO(),qar=!0;uE.exports=Oar()(War.isElement,qar)}else uE.exports=kar()();var Fm=uE.exports;const $r=Ai(Fm);class Z3 extends Z.Component{estimateTextWidth(){return this.props.children.length*this.props.height}getRectX(){const{x:e,horizontalPadding:n,textAnchor:h}=this.props,t=this.estimateTextWidth();let i;return h==="end"?i=e-t:h==="middle"?i=e-.5*t:i=e,i-n}getRectY(){const{y:e,height:n,dominantBaseline:h}=this.props;let t;return h==="hanging"?t=e:h==="middle"?t=e-.5*n:t=e-n,t}render(){const{height:e,horizontalPadding:n,backgroundColor:h,backgroundOpacity:t,fontSize:i,children:s,italicizeText:o,...u}=this.props;if(i&&console.warn("The `fontSize` prop is invalid. Use the `height` prop to set font size."),!s||s.length===0)return null;let m;return h&&t>0&&(m=S.jsx("rect",{x:this.getRectX(),y:this.getRectY(),width:this.estimateTextWidth()+2*n,height:e,fill:h,opacity:t})),S.jsxs(Z.Fragment,{children:[m,S.jsx("text",{...u,fontStyle:o?"italic":"normal",fontSize:1.5*e,children:s})]})}}_r(Z3,"propTypes",{x:$r.number,y:$r.number,dominantBaseline:$r.oneOf(["hanging","middle","baseline"]),textAnchor:$r.oneOf(["start","middle","end"]),children:$r.string,height:$r.number,horizontalPadding:$r.number,backgroundColor:$r.string,backgroundOpacity:$r.number}),_r(Z3,"defaultProps",{x:0,y:0,dominantBaseline:"baseline",textAnchor:"start",children:"",height:12,horizontalPadding:2});const S9=9,Hf={backgroundColor:"var(--bg-color)",hiddenPixels:.5,alwaysDrawLabel:!1};class Pz extends Z.Component{render(){const{feature:e,xSpan:n,y:h=0,color:t="blue",reverseStrandColor:i="red",isMinimal:s=!1,isInvertArrowDirection:o=!1,onClick:u=(K,T)=>{},alwaysDrawLabel:m=!1,hiddenPixels:_=0,opacity:z=1}=this.props,C=e.getIsReverseStrand()?i:t,A=Y4(C),[E,N]=n,y=N-E,M=m?Math.max(3,y):y;if(M<_)return null;const j=S.jsx("rect",{x:E,y:0,width:M,height:S9,fill:C,opacity:z});if(s)return S.jsx(Nt,{y:h,onClick:K=>u(K,e),children:j});let I=null;e.getHasStrand()&&(I=S.jsx(Bu,{startX:E,endX:N,height:S9,isToRight:e.getIsReverseStrand()===o,color:A,opacity:z}));let H=null;if(e.getName().length*S9<.5*M){const K=E+.5*M;H=S.jsx(Z3,{x:K,y:0,height:S9-1,fill:A,dominantBaseline:"hanging",textAnchor:"middle",backgroundColor:C,backgroundOpacity:1,children:e.getName()})}else m&&(H=S.jsx(Z3,{x:N+4,y:0,height:S9-1,fill:C,dominantBaseline:"hanging",textAnchor:"start",children:e.getName()}));return S.jsxs(Nt,{y:h,onClick:K=>u(K,e),children:[j,I,H]})}}_r(Pz,"HEIGHT",S9),_r(Pz,"defaultProps",{color:"blue",reverseStrandColor:"red",isInvertArrowDirection:!1,opacity:1,onClick:(e,n)=>{}});function $U(c,e){return c==null||e==null?NaN:c<e?-1:c>e?1:c>=e?0:NaN}function Par(c,e){return c==null||e==null?NaN:e<c?-1:e>c?1:e>=c?0:NaN}function kO(c){let e,n,h;c.length!==2?(e=$U,n=(o,u)=>$U(c(o),u),h=(o,u)=>c(o)-u):(e=c===$U||c===Par?c:$ar,n=c,h=c);function t(o,u,m=0,_=o.length){if(m<_){if(e(u,u)!==0)return _;do{const z=m+_>>>1;n(o[z],u)<0?m=z+1:_=z}while(m<_)}return m}function i(o,u,m=0,_=o.length){if(m<_){if(e(u,u)!==0)return _;do{const z=m+_>>>1;n(o[z],u)<=0?m=z+1:_=z}while(m<_)}return m}function s(o,u,m=0,_=o.length){const z=t(o,u,m,_-1);return z>m&&h(o[z-1],u)>-h(o[z],u)?z-1:z}return{left:t,center:s,right:i}}function $ar(){return 0}function Lar(c){return c===null?NaN:+c}function*Xar(c,e){for(let n of c)n!=null&&(n=+n)>=n&&(yield n)}const jar=kO($U).right;kO(Lar).center;function Gar(c=$U){if(c===$U)return IO;if(typeof c!="function")throw new TypeError("compare is not a function");return(e,n)=>{const h=c(e,n);return h||h===0?h:(c(n,n)===0)-(c(e,e)===0)}}function IO(c,e){return(c==null||!(c>=c))-(e==null||!(e>=e))||(c<e?-1:c>e?1:0)}const Var=Math.sqrt(50),Jar=Math.sqrt(10),Kar=Math.sqrt(2);function Of(c,e,n){const h=(e-c)/Math.max(0,n),t=Math.floor(Math.log10(h)),i=h/Math.pow(10,t),s=i>=Var?10:i>=Jar?5:i>=Kar?2:1;let o,u,m;return t<0?(m=Math.pow(10,-t)/s,o=Math.round(c*m),u=Math.round(e*m),o/m<c&&++o,u/m>e&&--u,m=-m):(m=Math.pow(10,t)*s,o=Math.round(c/m),u=Math.round(e/m),o*m<c&&++o,u*m>e&&--u),u<o&&.5<=n&&n<2?Of(c,e,n*2):[o,u,m]}function gE(c,e,n){if(e=+e,c=+c,n=+n,!(n>0))return[];if(c===e)return[c];const h=e<c,[t,i,s]=h?Of(e,c,n):Of(c,e,n);if(!(i>=t))return[];const o=i-t+1,u=new Array(o);if(h)if(s<0)for(let m=0;m<o;++m)u[m]=(i-m)/-s;else for(let m=0;m<o;++m)u[m]=(i-m)*s;else if(s<0)for(let m=0;m<o;++m)u[m]=(t+m)/-s;else for(let m=0;m<o;++m)u[m]=(t+m)*s;return u}function CE(c,e,n){return e=+e,c=+c,n=+n,Of(c,e,n)[2]}function Zar(c,e,n){e=+e,c=+c,n=+n;const h=e<c,t=h?CE(e,c,n):CE(c,e,n);return(h?-1:1)*(t<0?1/-t:t)}function WO(c,e){let n;for(const h of c)h!=null&&(n<h||n===void 0&&h>=h)&&(n=h);return n}function qO(c,e){let n;for(const h of c)h!=null&&(n>h||n===void 0&&h>=h)&&(n=h);return n}function PO(c,e,n=0,h=1/0,t){if(e=Math.floor(e),n=Math.floor(Math.max(0,n)),h=Math.floor(Math.min(c.length-1,h)),!(n<=e&&e<=h))return c;for(t=t===void 0?IO:Gar(t);h>n;){if(h-n>600){const u=h-n+1,m=e-n+1,_=Math.log(u),z=.5*Math.exp(2*_/3),C=.5*Math.sqrt(_*z*(u-z)/u)*(m-u/2<0?-1:1),A=Math.max(n,Math.floor(e-m*z/u+C)),E=Math.min(h,Math.floor(e+(u-m)*z/u+C));PO(c,e,A,E,t)}const i=c[e];let s=n,o=h;for($z(c,n,e),t(c[h],i)>0&&$z(c,n,h);s<o;){for($z(c,s,o),++s,--o;t(c[s],i)<0;)++s;for(;t(c[o],i)>0;)--o}t(c[n],i)===0?$z(c,n,o):(++o,$z(c,o,h)),o<=e&&(n=o+1),e<=o&&(h=o-1)}return c}function $z(c,e,n){const h=c[e];c[e]=c[n],c[n]=h}function fE(c,e,n){if(c=Float64Array.from(Xar(c)),!(!(h=c.length)||isNaN(e=+e))){if(e<=0||h<2)return qO(c);if(e>=1)return WO(c);var h,t=(h-1)*e,i=Math.floor(t),s=WO(PO(c,i).subarray(0,i+1)),o=qO(c.subarray(i+1));return s+(o-s)*(t-i)}}function $O(c,e){switch(arguments.length){case 0:break;case 1:this.range(c);break;default:this.range(e).domain(c);break}return this}function DE(c,e,n){c.prototype=e.prototype=n,n.constructor=c}function LO(c,e){var n=Object.create(c.prototype);for(var h in e)n[h]=e[h];return n}function Lz(){}var Xz=.7,kf=1/Xz,b9="\\s*([+-]?\\d+)\\s*",jz="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",r5="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Yar=/^#([0-9a-f]{3,8})$/,Qar=new RegExp(`^rgb\\(${b9},${b9},${b9}\\)$`),ror=new RegExp(`^rgb\\(${r5},${r5},${r5}\\)$`),eor=new RegExp(`^rgba\\(${b9},${b9},${b9},${jz}\\)$`),nor=new RegExp(`^rgba\\(${r5},${r5},${r5},${jz}\\)$`),cor=new RegExp(`^hsl\\(${jz},${r5},${r5}\\)$`),hor=new RegExp(`^hsla\\(${jz},${r5},${r5},${jz}\\)$`),XO={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};DE(Lz,LU,{copy(c){return Object.assign(new this.constructor,this,c)},displayable(){return this.rgb().displayable()},hex:jO,formatHex:jO,formatHex8:tor,formatHsl:ior,formatRgb:GO,toString:GO});function jO(){return this.rgb().formatHex()}function tor(){return this.rgb().formatHex8()}function ior(){return YO(this).formatHsl()}function GO(){return this.rgb().formatRgb()}function LU(c){var e,n;return c=(c+"").trim().toLowerCase(),(e=Yar.exec(c))?(n=e[1].length,e=parseInt(e[1],16),n===6?VO(e):n===3?new vo(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?If(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?If(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=Qar.exec(c))?new vo(e[1],e[2],e[3],1):(e=ror.exec(c))?new vo(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=eor.exec(c))?If(e[1],e[2],e[3],e[4]):(e=nor.exec(c))?If(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=cor.exec(c))?ZO(e[1],e[2]/100,e[3]/100,1):(e=hor.exec(c))?ZO(e[1],e[2]/100,e[3]/100,e[4]):XO.hasOwnProperty(c)?VO(XO[c]):c==="transparent"?new vo(NaN,NaN,NaN,0):null}function VO(c){return new vo(c>>16&255,c>>8&255,c&255,1)}function If(c,e,n,h){return h<=0&&(c=e=n=NaN),new vo(c,e,n,h)}function sor(c){return c instanceof Lz||(c=LU(c)),c?(c=c.rgb(),new vo(c.r,c.g,c.b,c.opacity)):new vo}function BE(c,e,n,h){return arguments.length===1?sor(c):new vo(c,e,n,h??1)}function vo(c,e,n,h){this.r=+c,this.g=+e,this.b=+n,this.opacity=+h}DE(vo,BE,LO(Lz,{brighter(c){return c=c==null?kf:Math.pow(kf,c),new vo(this.r*c,this.g*c,this.b*c,this.opacity)},darker(c){return c=c==null?Xz:Math.pow(Xz,c),new vo(this.r*c,this.g*c,this.b*c,this.opacity)},rgb(){return this},clamp(){return new vo(XU(this.r),XU(this.g),XU(this.b),Wf(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:JO,formatHex:JO,formatHex8:aor,formatRgb:KO,toString:KO}));function JO(){return`#${jU(this.r)}${jU(this.g)}${jU(this.b)}`}function aor(){return`#${jU(this.r)}${jU(this.g)}${jU(this.b)}${jU((isNaN(this.opacity)?1:this.opacity)*255)}`}function KO(){const c=Wf(this.opacity);return`${c===1?"rgb(":"rgba("}${XU(this.r)}, ${XU(this.g)}, ${XU(this.b)}${c===1?")":`, ${c})`}`}function Wf(c){return isNaN(c)?1:Math.max(0,Math.min(1,c))}function XU(c){return Math.max(0,Math.min(255,Math.round(c)||0))}function jU(c){return c=XU(c),(c<16?"0":"")+c.toString(16)}function ZO(c,e,n,h){return h<=0?c=e=n=NaN:n<=0||n>=1?c=e=NaN:e<=0&&(c=NaN),new yl(c,e,n,h)}function YO(c){if(c instanceof yl)return new yl(c.h,c.s,c.l,c.opacity);if(c instanceof Lz||(c=LU(c)),!c)return new yl;if(c instanceof yl)return c;c=c.rgb();var e=c.r/255,n=c.g/255,h=c.b/255,t=Math.min(e,n,h),i=Math.max(e,n,h),s=NaN,o=i-t,u=(i+t)/2;return o?(e===i?s=(n-h)/o+(n<h)*6:n===i?s=(h-e)/o+2:s=(e-n)/o+4,o/=u<.5?i+t:2-i-t,s*=60):o=u>0&&u<1?0:s,new yl(s,o,u,c.opacity)}function oor(c,e,n,h){return arguments.length===1?YO(c):new yl(c,e,n,h??1)}function yl(c,e,n,h){this.h=+c,this.s=+e,this.l=+n,this.opacity=+h}DE(yl,oor,LO(Lz,{brighter(c){return c=c==null?kf:Math.pow(kf,c),new yl(this.h,this.s,this.l*c,this.opacity)},darker(c){return c=c==null?Xz:Math.pow(Xz,c),new yl(this.h,this.s,this.l*c,this.opacity)},rgb(){var c=this.h%360+(this.h<0)*360,e=isNaN(c)||isNaN(this.s)?0:this.s,n=this.l,h=n+(n<.5?n:1-n)*e,t=2*n-h;return new vo(pE(c>=240?c-240:c+120,t,h),pE(c,t,h),pE(c<120?c+240:c-120,t,h),this.opacity)},clamp(){return new yl(QO(this.h),qf(this.s),qf(this.l),Wf(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const c=Wf(this.opacity);return`${c===1?"hsl(":"hsla("}${QO(this.h)}, ${qf(this.s)*100}%, ${qf(this.l)*100}%${c===1?")":`, ${c})`}`}}));function QO(c){return c=(c||0)%360,c<0?c+360:c}function qf(c){return Math.max(0,Math.min(1,c||0))}function pE(c,e,n){return(c<60?e+(n-e)*c/60:c<180?n:c<240?e+(n-e)*(240-c)/60:e)*255}const SE=c=>()=>c;function lor(c,e){return function(n){return c+n*e}}function uor(c,e,n){return c=Math.pow(c,n),e=Math.pow(e,n)-c,n=1/n,function(h){return Math.pow(c+h*e,n)}}function mor(c){return(c=+c)==1?rk:function(e,n){return n-e?uor(e,n,c):SE(isNaN(e)?n:e)}}function rk(c,e){var n=e-c;return n?lor(c,n):SE(isNaN(c)?e:c)}const Pf=function c(e){var n=mor(e);function h(t,i){var s=n((t=BE(t)).r,(i=BE(i)).r),o=n(t.g,i.g),u=n(t.b,i.b),m=rk(t.opacity,i.opacity);return function(_){return t.r=s(_),t.g=o(_),t.b=u(_),t.opacity=m(_),t+""}}return h.gamma=c,h}(1);function _or(c,e){e||(e=[]);var n=c?Math.min(e.length,c.length):0,h=e.slice(),t;return function(i){for(t=0;t<n;++t)h[t]=c[t]*(1-i)+e[t]*i;return h}}function Uor(c){return ArrayBuffer.isView(c)&&!(c instanceof DataView)}function vor(c,e){var n=e?e.length:0,h=c?Math.min(n,c.length):0,t=new Array(h),i=new Array(n),s;for(s=0;s<h;++s)t[s]=yE(c[s],e[s]);for(;s<n;++s)i[s]=e[s];return function(o){for(s=0;s<h;++s)i[s]=t[s](o);return i}}function dor(c,e){var n=new Date;return c=+c,e=+e,function(h){return n.setTime(c*(1-h)+e*h),n}}function wl(c,e){return c=+c,e=+e,function(n){return c*(1-n)+e*n}}function zor(c,e){var n={},h={},t;(c===null||typeof c!="object")&&(c={}),(e===null||typeof e!="object")&&(e={});for(t in e)t in c?n[t]=yE(c[t],e[t]):h[t]=e[t];return function(i){for(t in n)h[t]=n[t](i);return h}}var bE=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,EE=new RegExp(bE.source,"g");function Aor(c){return function(){return c}}function gor(c){return function(e){return c(e)+""}}function ek(c,e){var n=bE.lastIndex=EE.lastIndex=0,h,t,i,s=-1,o=[],u=[];for(c=c+"",e=e+"";(h=bE.exec(c))&&(t=EE.exec(e));)(i=t.index)>n&&(i=e.slice(n,i),o[s]?o[s]+=i:o[++s]=i),(h=h[0])===(t=t[0])?o[s]?o[s]+=t:o[++s]=t:(o[++s]=null,u.push({i:s,x:wl(h,t)})),n=EE.lastIndex;return n<e.length&&(i=e.slice(n),o[s]?o[s]+=i:o[++s]=i),o.length<2?u[0]?gor(u[0].x):Aor(e):(e=u.length,function(m){for(var _=0,z;_<e;++_)o[(z=u[_]).i]=z.x(m);return o.join("")})}function yE(c,e){var n=typeof e,h;return e==null||n==="boolean"?SE(e):(n==="number"?wl:n==="string"?(h=LU(e))?(e=h,Pf):ek:e instanceof LU?Pf:e instanceof Date?dor:Uor(e)?_or:Array.isArray(e)?vor:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?zor:wl)(c,e)}function Cor(c,e){return c=+c,e=+e,function(n){return Math.round(c*(1-n)+e*n)}}var nk=180/Math.PI,wE={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function ck(c,e,n,h,t,i){var s,o,u;return(s=Math.sqrt(c*c+e*e))&&(c/=s,e/=s),(u=c*n+e*h)&&(n-=c*u,h-=e*u),(o=Math.sqrt(n*n+h*h))&&(n/=o,h/=o,u/=o),c*h<e*n&&(c=-c,e=-e,u=-u,s=-s),{translateX:t,translateY:i,rotate:Math.atan2(e,c)*nk,skewX:Math.atan(u)*nk,scaleX:s,scaleY:o}}var $f;function Dor(c){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(c+"");return e.isIdentity?wE:ck(e.a,e.b,e.c,e.d,e.e,e.f)}function Bor(c){return c==null||($f||($f=document.createElementNS("http://www.w3.org/2000/svg","g")),$f.setAttribute("transform",c),!(c=$f.transform.baseVal.consolidate()))?wE:(c=c.matrix,ck(c.a,c.b,c.c,c.d,c.e,c.f))}function hk(c,e,n,h){function t(m){return m.length?m.pop()+" ":""}function i(m,_,z,C,A,E){if(m!==z||_!==C){var N=A.push("translate(",null,e,null,n);E.push({i:N-4,x:wl(m,z)},{i:N-2,x:wl(_,C)})}else(z||C)&&A.push("translate("+z+e+C+n)}function s(m,_,z,C){m!==_?(m-_>180?_+=360:_-m>180&&(m+=360),C.push({i:z.push(t(z)+"rotate(",null,h)-2,x:wl(m,_)})):_&&z.push(t(z)+"rotate("+_+h)}function o(m,_,z,C){m!==_?C.push({i:z.push(t(z)+"skewX(",null,h)-2,x:wl(m,_)}):_&&z.push(t(z)+"skewX("+_+h)}function u(m,_,z,C,A,E){if(m!==z||_!==C){var N=A.push(t(A)+"scale(",null,",",null,")");E.push({i:N-4,x:wl(m,z)},{i:N-2,x:wl(_,C)})}else(z!==1||C!==1)&&A.push(t(A)+"scale("+z+","+C+")")}return function(m,_){var z=[],C=[];return m=c(m),_=c(_),i(m.translateX,m.translateY,_.translateX,_.translateY,z,C),s(m.rotate,_.rotate,z,C),o(m.skewX,_.skewX,z,C),u(m.scaleX,m.scaleY,_.scaleX,_.scaleY,z,C),m=_=null,function(A){for(var E=-1,N=C.length,y;++E<N;)z[(y=C[E]).i]=y.x(A);return z.join("")}}}var por=hk(Dor,"px, ","px)","deg)"),Sor=hk(Bor,", ",")",")");function bor(c){return function(){return c}}function Eor(c){return+c}var tk=[0,1];function E9(c){return c}function xE(c,e){return(e-=c=+c)?function(n){return(n-c)/e}:bor(isNaN(e)?NaN:.5)}function yor(c,e){var n;return c>e&&(n=c,c=e,e=n),function(h){return Math.max(c,Math.min(e,h))}}function wor(c,e,n){var h=c[0],t=c[1],i=e[0],s=e[1];return t<h?(h=xE(t,h),i=n(s,i)):(h=xE(h,t),i=n(i,s)),function(o){return i(h(o))}}function xor(c,e,n){var h=Math.min(c.length,e.length)-1,t=new Array(h),i=new Array(h),s=-1;for(c[h]<c[0]&&(c=c.slice().reverse(),e=e.slice().reverse());++s<h;)t[s]=xE(c[s],c[s+1]),i[s]=n(e[s],e[s+1]);return function(o){var u=jar(c,o,1,h)-1;return i[u](t[u](o))}}function ik(c,e){return e.domain(c.domain()).range(c.range()).interpolate(c.interpolate()).clamp(c.clamp()).unknown(c.unknown())}function sk(){var c=tk,e=tk,n=yE,h,t,i,s=E9,o,u,m;function _(){var C=Math.min(c.length,e.length);return s!==E9&&(s=yor(c[0],c[C-1])),o=C>2?xor:wor,u=m=null,z}function z(C){return C==null||isNaN(C=+C)?i:(u||(u=o(c.map(h),e,n)))(h(s(C)))}return z.invert=function(C){return s(t((m||(m=o(e,c.map(h),wl)))(C)))},z.domain=function(C){return arguments.length?(c=Array.from(C,Eor),_()):c.slice()},z.range=function(C){return arguments.length?(e=Array.from(C),_()):e.slice()},z.rangeRound=function(C){return e=Array.from(C),n=Cor,_()},z.clamp=function(C){return arguments.length?(s=C?!0:E9,_()):s!==E9},z.interpolate=function(C){return arguments.length?(n=C,_()):n},z.unknown=function(C){return arguments.length?(i=C,z):i},function(C,A){return h=C,t=A,_()}}function Nor(){return sk()(E9,E9)}function For(c){return Math.abs(c=Math.round(c))>=1e21?c.toLocaleString("en").replace(/,/g,""):c.toString(10)}function Lf(c,e){if((n=(c=e?c.toExponential(e-1):c.toExponential()).indexOf("e"))<0)return null;var n,h=c.slice(0,n);return[h.length>1?h[0]+h.slice(2):h,+c.slice(n+1)]}function y9(c){return c=Lf(Math.abs(c)),c?c[1]:NaN}function Tor(c,e){return function(n,h){for(var t=n.length,i=[],s=0,o=c[0],u=0;t>0&&o>0&&(u+o+1>h&&(o=Math.max(1,h-u)),i.push(n.substring(t-=o,t+o)),!((u+=o+1)>h));)o=c[s=(s+1)%c.length];return i.reverse().join(e)}}function Ror(c){return function(e){return e.replace(/[0-9]/g,function(n){return c[+n]})}}var Mor=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Gz(c){if(!(e=Mor.exec(c)))throw new Error("invalid format: "+c);var e;return new NE({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}Gz.prototype=NE.prototype;function NE(c){this.fill=c.fill===void 0?" ":c.fill+"",this.align=c.align===void 0?">":c.align+"",this.sign=c.sign===void 0?"-":c.sign+"",this.symbol=c.symbol===void 0?"":c.symbol+"",this.zero=!!c.zero,this.width=c.width===void 0?void 0:+c.width,this.comma=!!c.comma,this.precision=c.precision===void 0?void 0:+c.precision,this.trim=!!c.trim,this.type=c.type===void 0?"":c.type+""}NE.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function Hor(c){r:for(var e=c.length,n=1,h=-1,t;n<e;++n)switch(c[n]){case".":h=t=n;break;case"0":h===0&&(h=n),t=n;break;default:if(!+c[n])break r;h>0&&(h=0);break}return h>0?c.slice(0,h)+c.slice(t+1):c}var ak;function Oor(c,e){var n=Lf(c,e);if(!n)return c+"";var h=n[0],t=n[1],i=t-(ak=Math.max(-8,Math.min(8,Math.floor(t/3)))*3)+1,s=h.length;return i===s?h:i>s?h+new Array(i-s+1).join("0"):i>0?h.slice(0,i)+"."+h.slice(i):"0."+new Array(1-i).join("0")+Lf(c,Math.max(0,e+i-1))[0]}function ok(c,e){var n=Lf(c,e);if(!n)return c+"";var h=n[0],t=n[1];return t<0?"0."+new Array(-t).join("0")+h:h.length>t+1?h.slice(0,t+1)+"."+h.slice(t+1):h+new Array(t-h.length+2).join("0")}const lk={"%":(c,e)=>(c*100).toFixed(e),b:c=>Math.round(c).toString(2),c:c=>c+"",d:For,e:(c,e)=>c.toExponential(e),f:(c,e)=>c.toFixed(e),g:(c,e)=>c.toPrecision(e),o:c=>Math.round(c).toString(8),p:(c,e)=>ok(c*100,e),r:ok,s:Oor,X:c=>Math.round(c).toString(16).toUpperCase(),x:c=>Math.round(c).toString(16)};function uk(c){return c}var mk=Array.prototype.map,_k=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function kor(c){var e=c.grouping===void 0||c.thousands===void 0?uk:Tor(mk.call(c.grouping,Number),c.thousands+""),n=c.currency===void 0?"":c.currency[0]+"",h=c.currency===void 0?"":c.currency[1]+"",t=c.decimal===void 0?".":c.decimal+"",i=c.numerals===void 0?uk:Ror(mk.call(c.numerals,String)),s=c.percent===void 0?"%":c.percent+"",o=c.minus===void 0?"−":c.minus+"",u=c.nan===void 0?"NaN":c.nan+"";function m(z){z=Gz(z);var C=z.fill,A=z.align,E=z.sign,N=z.symbol,y=z.zero,M=z.width,j=z.comma,I=z.precision,H=z.trim,G=z.type;G==="n"?(j=!0,G="g"):lk[G]||(I===void 0&&(I=12),H=!0,G="g"),(y||C==="0"&&A==="=")&&(y=!0,C="0",A="=");var K=N==="$"?n:N==="#"&&/[boxX]/.test(G)?"0"+G.toLowerCase():"",T=N==="$"?h:/[%p]/.test(G)?s:"",q=lk[G],P=/[defgprs%]/.test(G);I=I===void 0?6:/[gprs]/.test(G)?Math.max(1,Math.min(21,I)):Math.max(0,Math.min(20,I));function V(Q){var er=K,rr=T,Ur,Sr,Ar;if(G==="c")rr=q(Q)+rr,Q="";else{Q=+Q;var mr=Q<0||1/Q<0;if(Q=isNaN(Q)?u:q(Math.abs(Q),I),H&&(Q=Hor(Q)),mr&&+Q==0&&E!=="+"&&(mr=!1),er=(mr?E==="("?E:o:E==="-"||E==="("?"":E)+er,rr=(G==="s"?_k[8+ak/3]:"")+rr+(mr&&E==="("?")":""),P){for(Ur=-1,Sr=Q.length;++Ur<Sr;)if(Ar=Q.charCodeAt(Ur),48>Ar||Ar>57){rr=(Ar===46?t+Q.slice(Ur+1):Q.slice(Ur))+rr,Q=Q.slice(0,Ur);break}}}j&&!y&&(Q=e(Q,1/0));var ar=er.length+Q.length+rr.length,ur=ar<M?new Array(M-ar+1).join(C):"";switch(j&&y&&(Q=e(ur+Q,ur.length?M-rr.length:1/0),ur=""),A){case"<":Q=er+Q+rr+ur;break;case"=":Q=er+ur+Q+rr;break;case"^":Q=ur.slice(0,ar=ur.length>>1)+er+Q+rr+ur.slice(ar);break;default:Q=ur+er+Q+rr;break}return i(Q)}return V.toString=function(){return z+""},V}function _(z,C){var A=m((z=Gz(z),z.type="f",z)),E=Math.max(-8,Math.min(8,Math.floor(y9(C)/3)))*3,N=Math.pow(10,-E),y=_k[8+E/3];return function(M){return A(N*M)+y}}return{format:m,formatPrefix:_}}var Xf,jf,Uk;Ior({thousands:",",grouping:[3],currency:["$",""]});function Ior(c){return Xf=kor(c),jf=Xf.format,Uk=Xf.formatPrefix,Xf}function Wor(c){return Math.max(0,-y9(Math.abs(c)))}function qor(c,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(y9(e)/3)))*3-y9(Math.abs(c)))}function Por(c,e){return c=Math.abs(c),e=Math.abs(e)-c,Math.max(0,y9(e)-y9(c))+1}function $or(c,e,n,h){var t=Zar(c,e,n),i;switch(h=Gz(h??",f"),h.type){case"s":{var s=Math.max(Math.abs(c),Math.abs(e));return h.precision==null&&!isNaN(i=qor(t,s))&&(h.precision=i),Uk(h,s)}case"":case"e":case"g":case"p":case"r":{h.precision==null&&!isNaN(i=Por(t,Math.max(Math.abs(c),Math.abs(e))))&&(h.precision=i-(h.type==="e"));break}case"f":case"%":{h.precision==null&&!isNaN(i=Wor(t))&&(h.precision=i-(h.type==="%")*2);break}}return jf(h)}function Lor(c){var e=c.domain;return c.ticks=function(n){var h=e();return gE(h[0],h[h.length-1],n??10)},c.tickFormat=function(n,h){var t=e();return $or(t[0],t[t.length-1],n??10,h)},c.nice=function(n){n==null&&(n=10);var h=e(),t=0,i=h.length-1,s=h[t],o=h[i],u,m,_=10;for(o<s&&(m=s,s=o,o=m,m=t,t=i,i=m);_-- >0;){if(m=CE(s,o,n),m===u)return h[t]=s,h[i]=o,e(h);if(m>0)s=Math.floor(s/m)*m,o=Math.ceil(o/m)*m;else if(m<0)s=Math.ceil(s*m)/m,o=Math.floor(o*m)/m;else break;u=m}return c},c}function In(){var c=Nor();return c.copy=function(){return ik(c,In())},$O.apply(c,arguments),Lor(c)}function Xor(c,e){c=c.slice();var n=0,h=c.length-1,t=c[n],i=c[h],s;return i<t&&(s=n,n=h,h=s,s=t,t=i,i=s),c[n]=e.floor(t),c[h]=e.ceil(i),c}function vk(c){return Math.log(c)}function dk(c){return Math.exp(c)}function jor(c){return-Math.log(-c)}function Gor(c){return-Math.exp(-c)}function Vor(c){return isFinite(c)?+("1e"+c):c<0?0:c}function Jor(c){return c===10?Vor:c===Math.E?Math.exp:e=>Math.pow(c,e)}function Kor(c){return c===Math.E?Math.log:c===10&&Math.log10||c===2&&Math.log2||(c=Math.log(c),e=>Math.log(e)/c)}function zk(c){return(e,n)=>-c(-e,n)}function Zor(c){const e=c(vk,dk),n=e.domain;let h=10,t,i;function s(){return t=Kor(h),i=Jor(h),n()[0]<0?(t=zk(t),i=zk(i),c(jor,Gor)):c(vk,dk),e}return e.base=function(o){return arguments.length?(h=+o,s()):h},e.domain=function(o){return arguments.length?(n(o),s()):n()},e.ticks=o=>{const u=n();let m=u[0],_=u[u.length-1];const z=_<m;z&&([m,_]=[_,m]);let C=t(m),A=t(_),E,N;const y=o==null?10:+o;let M=[];if(!(h%1)&&A-C<y){if(C=Math.floor(C),A=Math.ceil(A),m>0){for(;C<=A;++C)for(E=1;E<h;++E)if(N=C<0?E/i(-C):E*i(C),!(N<m)){if(N>_)break;M.push(N)}}else for(;C<=A;++C)for(E=h-1;E>=1;--E)if(N=C>0?E/i(-C):E*i(C),!(N<m)){if(N>_)break;M.push(N)}M.length*2<y&&(M=gE(m,_,y))}else M=gE(C,A,Math.min(A-C,y)).map(i);return z?M.reverse():M},e.tickFormat=(o,u)=>{if(o==null&&(o=10),u==null&&(u=h===10?"s":","),typeof u!="function"&&(!(h%1)&&(u=Gz(u)).precision==null&&(u.trim=!0),u=jf(u)),o===1/0)return u;const m=Math.max(1,h*o/e.ticks().length);return _=>{let z=_/i(Math.round(t(_)));return z*h<h-.5&&(z*=h),z<=m?u(_):""}},e.nice=()=>n(Xor(n(),{floor:o=>i(Math.floor(t(o))),ceil:o=>i(Math.ceil(t(o)))})),e}function Ak(){const c=Zor(sk()).domain([1,10]);return c.copy=()=>ik(c,Ak()).base(c.base()),$O.apply(c,arguments),c}var gk=Number.isNaN||function(e){return typeof e=="number"&&e!==e};function Yor(c,e){return!!(c===e||gk(c)&&gk(e))}function Qor(c,e){if(c.length!==e.length)return!1;for(var n=0;n<c.length;n++)if(!Yor(c[n],e[n]))return!1;return!0}function dt(c,e){e===void 0&&(e=Qor);var n=null;function h(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];if(n&&n.lastThis===this&&e(t,n.lastArgs))return n.lastResult;var s=c.apply(this,t);return n={lastResult:s,lastArgs:t,lastThis:this},s}return h.clear=function(){n=null},h}var r3r={};const zt={CANVAS:0,SVG:1},e3r={display:"block"};class xl extends Z.PureComponent{render(){const{type:e,style:n}=this.props,h=Object.assign({},e3r,n);switch(e){case zt.CANVAS:return S.jsx(n3r,{width:this.props.width,height:this.props.height,children:this.props.children,style:h});case zt.SVG:return this.props.forceSvg?S.jsx("svg",{children:this.props.children,style:h,width:this.props.width,height:this.props.height}):S.jsx("svg",{width:this.props.width,height:this.props.height,children:this.props.children,style:h});default:return null}}}_r(xl,"defaultProps",{type:zt.SVG,style:{}});class n3r extends Z.PureComponent{constructor(){super(...arguments);_r(this,"canvasNode");_r(this,"getPixelRatioSafely",()=>{const n=window.devicePixelRatio;return Number.isFinite(n)&&n>0?n:1})}componentDidMount(){this.draw(this.canvasNode)}componentDidUpdate(n){const h=this.getPixelRatioSafely();if(h!==1){const t=this.props.width,i=this.props.height;this.canvasNode.style.width=t+"px",this.canvasNode.style.height=i+"px",this.canvasNode.setAttribute("width",t*h),this.canvasNode.setAttribute("height",i*h),this.canvasNode.getContext("2d").scale(h,h)}this.draw(this.canvasNode)}drawOneElement(n,h){if(!h)return;if(Array.isArray(h)){h.forEach(i=>this.drawOneElement(n,i));return}const t=h.props;switch(h.type){case"rect":n.fillStyle=t.fill,n.globalAlpha=t.fillOpacity||1,n.fillRect(t.x,t.y,t.width,t.height);break;case"g":Z.Children.forEach(t.children,s=>this.drawOneElement(n,s));break;case"line":n.strokeStyle=t.stroke,n.beginPath(),n.moveTo(t.x1,t.y1),n.lineTo(t.x2,t.y2),n.stroke();break;case"circle":n.strokeStyle=t.stroke,n.globalAlpha=t.strokeOpacity||1,n.beginPath(),n.arc(t.cx,t.cy,t.r,0,2*Math.PI,!1),n.stroke();break;case"polygon":n.fillStyle=t.fill,n.globalAlpha=t.opacity||1,n.beginPath(),n.moveTo(t.points[0][0],t.points[0][1]),n.lineTo(t.points[1][0],t.points[1][1]),n.lineTo(t.points[2][0],t.points[2][1]),n.lineTo(t.points[3][0],t.points[3][1]),n.closePath(),n.fill();break;case"path":n.fillStyle=t.fill,n.globalAlpha=t.opacity||1,n.strokeStyle=t.stroke,n.lineWidth=t.strokeWidth;const i=new Path2D(t.d);n.stroke(i);break;case void 0:break;default:console.error(`Drawing '${h.type}'s is unsupported. Ignoring...`)}}draw(n){if(r3r.NODE_ENV==="test")return;const h=this.getPixelRatioSafely(),t=this.props.width,i=this.props.height;this.canvasNode.style.width=t+"px",this.canvasNode.style.height=i+"px",this.canvasNode.setAttribute("width",t*h),this.canvasNode.setAttribute("height",i*h);const s=this.canvasNode.getContext("2d");s.scale(h,h),s.clearRect(0,0,this.canvasNode.width,this.canvasNode.height),this.props.children.forEach(o=>this.drawOneElement(s,o))}render(){const{children:n,...h}=this.props;return S.jsx("canvas",{ref:t=>this.canvasNode=t,...h})}}const Nl={AUTO:"auto",BAR:"bar",HEATMAP:"heatmap"},zo={FULL:"full",DENSITY:"density"};var ta=(c=>(c.HEATMAP="heatmap",c.ARC="arc",c.FLATARC="flatarc",c.SQUARE="square",c))(ta||{}),GU=(c=>(c.HEATMAP="heatmap",c.ARC="arc",c))(GU||{});const c3r={AUTO:"auto"},Vz={QUAL:"QUAL",AF:"AF"},Jz={AUTO:"auto",DENSITY:"density",FULL:"full"};var e5=(c=>(c.AUTO="auto",c.HEATMAP="heatmap",c))(e5||{});class gi{constructor(e,n){_r(this,"_viewRegion");_r(this,"_drawWidth");_r(this,"_pixelsPerBase");_r(this,"_basesPerPixel");this._viewRegion=e,this._drawWidth=n,this._pixelsPerBase=n/e.getWidth(),this._basesPerPixel=e.getWidth()/n}getDrawWidth(){return this._drawWidth}basesToXWidth(e){return e*this._pixelsPerBase}xWidthToBases(e){return e*this._basesPerPixel}baseToX(e){return(e-this._viewRegion.getContextCoordinates().start)*this._pixelsPerBase}xToBase(e){return e*this._basesPerPixel+this._viewRegion.getContextCoordinates().start}baseSpanToXSpan(e){const n=this.baseToX(e.start),h=this.baseToX(e.end);return new p0(n,h)}baseSpanToXCenter(e){const n=this.baseSpanToXSpan(e),h=Math.round((n.start+n.end)/2);return new p0(h,h)}xToSegmentCoordinate(e){const n=Math.floor(this.xToBase(e));return this._viewRegion.getNavigationContext().convertBaseToFeatureCoordinate(n)}}class h3r{constructor(e,n,h){_r(this,"interaction");_r(this,"xSpan1");_r(this,"xSpan2");this.interaction=e,n.start<=h.start?(this.xSpan1=n,this.xSpan2=h):(this.xSpan1=h,this.xSpan2=n)}getWidth(){const e=this.xSpan1.start;return Math.max(this.xSpan1.end,this.xSpan2.end)-e}generateKey(){return""+this.xSpan1.start+this.xSpan1.end+this.xSpan2.start+this.xSpan2.end}}class n5{placeFeatures(e,n,h,t=!1){const i=new gi(n,h),s=n.getContextCoordinates(),o=n.getNavigationContext(),u=[];for(const m of e)for(let _ of m.computeNavContextCoordinates(o))if(_=_.getOverlap(s),_){const z=t?i.baseSpanToXCenter(_):i.baseSpanToXSpan(_),{visiblePart:C,isReverse:A}=this._locatePlacement(m,o,_);u.push({feature:m,visiblePart:C,contextLocation:_,xSpan:z,isReverse:A})}return u}_locatePlacement(e,n,h){const t=n.convertBaseToFeatureCoordinate(h.start),i=t.getLocus().start,s=t.feature.getIsReverseStrand();let o;s?o=i-h.getLength()+1:o=i;const u=o-e.getLocus().start,m=Math.max(0,u);return{visiblePart:new Ra(e,m,m+h.getLength()),isReverse:s}}placeFeatureSegments(e,n){const h=e.xSpan.getLength()/e.contextLocation.getLength(),t=[];for(let i of n)if(i=i.getOverlap(e.visiblePart),i){const o=(i.relativeStart-e.visiblePart.relativeStart)*h,u=i.getLength()*h;let m;e.isReverse?m=e.xSpan.end-o-u:m=e.xSpan.start+o,t.push({segment:i,xSpan:new p0(m,m+u)})}return t}placeInteractions(e,n,h){const t=new gi(n,h),i=n.getContextCoordinates(),s=n.getNavigationContext(),o=[];for(const u of e){let m=s.convertGenomeIntervalToBases(u.locus1),_=s.convertGenomeIntervalToBases(u.locus2);m=m.map(z=>z.getOverlap(i)),_=_.map(z=>z.getOverlap(i));for(const z of m)for(const C of _)if(z&&C){const A=t.baseSpanToXSpan(z),E=t.baseSpanToXSpan(C);o.push(new h3r(u,A,E))}}return o}placeGraphNodes(e,n,h){const t=new gi(n,h),i=n.getContextCoordinates(),s=n.getNavigationContext(),o=[],u=[];for(const m of e)for(let _ of m.computeNavContextCoordinates(s))if(_=_.getOverlap(i),_){const z=t.baseSpanToXSpan(_),{visiblePart:C,isReverse:A}=this._locatePlacement(m,s,_);o.push({feature:m,visiblePart:C,contextLocation:_,xSpan:z,isReverse:A})}else u.push(m);return{placements:o,nodesOutOfView:u}}}const w9="value",pu={MEAN:"MEAN",SUM:"SUM",COUNT:"COUNT",MIN:"MIN",MAX:"MAX",IMAGECOUNT:"IMAGECOUNT"},VU={};VU[pu.COUNT]=c=>c.length,VU[pu.SUM]=c=>c.length>0?Xe.sumBy(c,w9):null,VU[pu.MEAN]=c=>c.length>0?Xe.meanBy(c,w9):null,VU[pu.MIN]=c=>c.length>0?Xe.minBy(c,w9)[w9]:null,VU[pu.MAX]=c=>c.length>0?Xe.maxBy(c,w9)[w9]:null,VU[pu.IMAGECOUNT]=c=>Xe.sum(c.map(e=>e.images.length));const t3r="values",Gf={MEAN:"MEAN"},Ck={};Ck[Gf.MEAN]=c=>i3r(c,t3r)||[null];function i3r(c,e){const n=c.map(u=>u[e]),h=Xe.max(n.map(u=>u.length));let t,i,s;const o=Array(h).fill(null);for(t=0;t<h;t++){for(s=[],i=0;i<n.length;i++)t<n[i].length?s.push(n[i][t]):s.push(0);o[t]=s.slice()}return o.map(u=>Xe.mean(u))}const cs={types:pu,fromId(c){const e=VU[c];if(!e)throw new Error(`Unknown aggregator id "${c}"`);return e}},fk={types:Gf,fromId(c){const e=Ck[c];if(!e)throw new Error(`Unknown aggregator id "${c}"`);return e}};class Fl{makeXMap(e,n,h,t=!1){h=Math.round(h);const i=Array(h).fill(null);for(let u=0;u<h;u++)i[u]=[];const o=new n5().placeFeatures(e,n,h,t);for(const u of o){const m=Math.max(0,Math.floor(u.xSpan.start)),_=Math.min(h-1,Math.ceil(u.xSpan.end));for(let z=m;z<=_;z++)i[z].push(u.feature)}return i}makeXWindowMap(e,n,h,t=!1,i){const s={};h=Math.round(h);for(let m=0;m<h;m+=i)s[m]=[];const u=new n5().placeFeatures(e,n,h,t);for(const m of u){const _=Math.max(0,Math.floor(m.xSpan.start)),z=Math.min(h-1,Math.ceil(m.xSpan.end));for(let C=_;C<=z;C++)s.hasOwnProperty(C)&&s[C].push(m.feature)}return s}}var Ch=(c=>(c.AUTO="auto",c.FIXED="fixed",c))(Ch||{});function s3r(c,e,n=t=>t,h){const t=n,i=[];for(let s=0;s<c.length;s+=1){const o=s-e,u=o>=0?o:0,m=s+e+1;let _=0,z=0;for(let C=u;C<m&&C<c.length;C+=1)z+=t(c[C]),_+=1;i[s]=h?h(c[s],z/_):z/_}return i}var a3r=s3r;const Vf=Ai(a3r);class Dk{constructor(){this.aggregateFeatures=dt(this.aggregateFeatures),this.xToValueMaker=dt(this.xToValueMaker)}aggregateFeatures(e,n,h,t){return new Fl().makeXMap(e,n,h).map(cs.fromId(t))}xToValueMaker(e,n,h,t){const i=Object.assign({},At,t),{aggregateMethod:s,smooth:o,yScale:u,yMin:m}=i;let _,z,C,A=!1;if(e){const E=e.filter(I=>I.value===void 0||I.value>=0),N=e.filter(I=>I.value<0);N.length?_=this.aggregateFeatures(N,n,h,s):_=[];const y=Number.parseInt(o)||0;C=y===0?_:Vf(_,y),C.filter(I=>I).length&&(u===Ch.AUTO||u===Ch.FIXED&&m<0)&&(A=!0);const j=E.length>0?this.aggregateFeatures(E,n,h,s):[];z=y===0?j:Vf(j,y)}return[z,C,A]}}var FE="http://www.w3.org/1999/xhtml";const Bk={svg:"http://www.w3.org/2000/svg",xhtml:FE,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Jf(c){var e=c+="",n=e.indexOf(":");return n>=0&&(e=c.slice(0,n))!=="xmlns"&&(c=c.slice(n+1)),Bk.hasOwnProperty(e)?{space:Bk[e],local:c}:c}function o3r(c){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===FE&&e.documentElement.namespaceURI===FE?e.createElement(c):e.createElementNS(n,c)}}function l3r(c){return function(){return this.ownerDocument.createElementNS(c.space,c.local)}}function pk(c){var e=Jf(c);return(e.local?l3r:o3r)(e)}function u3r(){}function TE(c){return c==null?u3r:function(){return this.querySelector(c)}}function m3r(c){typeof c!="function"&&(c=TE(c));for(var e=this._groups,n=e.length,h=new Array(n),t=0;t<n;++t)for(var i=e[t],s=i.length,o=h[t]=new Array(s),u,m,_=0;_<s;++_)(u=i[_])&&(m=c.call(u,u.__data__,_,i))&&("__data__"in u&&(m.__data__=u.__data__),o[_]=m);return new e3(h,this._parents)}function _3r(c){return c==null?[]:Array.isArray(c)?c:Array.from(c)}function U3r(){return[]}function Sk(c){return c==null?U3r:function(){return this.querySelectorAll(c)}}function v3r(c){return function(){return _3r(c.apply(this,arguments))}}function d3r(c){typeof c=="function"?c=v3r(c):c=Sk(c);for(var e=this._groups,n=e.length,h=[],t=[],i=0;i<n;++i)for(var s=e[i],o=s.length,u,m=0;m<o;++m)(u=s[m])&&(h.push(c.call(u,u.__data__,m,s)),t.push(u));return new e3(h,t)}function bk(c){return function(){return this.matches(c)}}function Ek(c){return function(e){return e.matches(c)}}var z3r=Array.prototype.find;function A3r(c){return function(){return z3r.call(this.children,c)}}function g3r(){return this.firstElementChild}function C3r(c){return this.select(c==null?g3r:A3r(typeof c=="function"?c:Ek(c)))}var f3r=Array.prototype.filter;function D3r(){return Array.from(this.children)}function B3r(c){return function(){return f3r.call(this.children,c)}}function p3r(c){return this.selectAll(c==null?D3r:B3r(typeof c=="function"?c:Ek(c)))}function S3r(c){typeof c!="function"&&(c=bk(c));for(var e=this._groups,n=e.length,h=new Array(n),t=0;t<n;++t)for(var i=e[t],s=i.length,o=h[t]=[],u,m=0;m<s;++m)(u=i[m])&&c.call(u,u.__data__,m,i)&&o.push(u);return new e3(h,this._parents)}function yk(c){return new Array(c.length)}function b3r(){return new e3(this._enter||this._groups.map(yk),this._parents)}function Kf(c,e){this.ownerDocument=c.ownerDocument,this.namespaceURI=c.namespaceURI,this._next=null,this._parent=c,this.__data__=e}Kf.prototype={constructor:Kf,appendChild:function(c){return this._parent.insertBefore(c,this._next)},insertBefore:function(c,e){return this._parent.insertBefore(c,e)},querySelector:function(c){return this._parent.querySelector(c)},querySelectorAll:function(c){return this._parent.querySelectorAll(c)}};function E3r(c){return function(){return c}}function y3r(c,e,n,h,t,i){for(var s=0,o,u=e.length,m=i.length;s<m;++s)(o=e[s])?(o.__data__=i[s],h[s]=o):n[s]=new Kf(c,i[s]);for(;s<u;++s)(o=e[s])&&(t[s]=o)}function w3r(c,e,n,h,t,i,s){var o,u,m=new Map,_=e.length,z=i.length,C=new Array(_),A;for(o=0;o<_;++o)(u=e[o])&&(C[o]=A=s.call(u,u.__data__,o,e)+"",m.has(A)?t[o]=u:m.set(A,u));for(o=0;o<z;++o)A=s.call(c,i[o],o,i)+"",(u=m.get(A))?(h[o]=u,u.__data__=i[o],m.delete(A)):n[o]=new Kf(c,i[o]);for(o=0;o<_;++o)(u=e[o])&&m.get(C[o])===u&&(t[o]=u)}function x3r(c){return c.__data__}function N3r(c,e){if(!arguments.length)return Array.from(this,x3r);var n=e?w3r:y3r,h=this._parents,t=this._groups;typeof c!="function"&&(c=E3r(c));for(var i=t.length,s=new Array(i),o=new Array(i),u=new Array(i),m=0;m<i;++m){var _=h[m],z=t[m],C=z.length,A=F3r(c.call(_,_&&_.__data__,m,h)),E=A.length,N=o[m]=new Array(E),y=s[m]=new Array(E),M=u[m]=new Array(C);n(_,z,N,y,M,A,e);for(var j=0,I=0,H,G;j<E;++j)if(H=N[j]){for(j>=I&&(I=j+1);!(G=y[I])&&++I<E;);H._next=G||null}}return s=new e3(s,h),s._enter=o,s._exit=u,s}function F3r(c){return typeof c=="object"&&"length"in c?c:Array.from(c)}function T3r(){return new e3(this._exit||this._groups.map(yk),this._parents)}function R3r(c,e,n){var h=this.enter(),t=this,i=this.exit();return typeof c=="function"?(h=c(h),h&&(h=h.selection())):h=h.append(c+""),e!=null&&(t=e(t),t&&(t=t.selection())),n==null?i.remove():n(i),h&&t?h.merge(t).order():t}function M3r(c){for(var e=c.selection?c.selection():c,n=this._groups,h=e._groups,t=n.length,i=h.length,s=Math.min(t,i),o=new Array(t),u=0;u<s;++u)for(var m=n[u],_=h[u],z=m.length,C=o[u]=new Array(z),A,E=0;E<z;++E)(A=m[E]||_[E])&&(C[E]=A);for(;u<t;++u)o[u]=n[u];return new e3(o,this._parents)}function H3r(){for(var c=this._groups,e=-1,n=c.length;++e<n;)for(var h=c[e],t=h.length-1,i=h[t],s;--t>=0;)(s=h[t])&&(i&&s.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(s,i),i=s);return this}function O3r(c){c||(c=k3r);function e(z,C){return z&&C?c(z.__data__,C.__data__):!z-!C}for(var n=this._groups,h=n.length,t=new Array(h),i=0;i<h;++i){for(var s=n[i],o=s.length,u=t[i]=new Array(o),m,_=0;_<o;++_)(m=s[_])&&(u[_]=m);u.sort(e)}return new e3(t,this._parents).order()}function k3r(c,e){return c<e?-1:c>e?1:c>=e?0:NaN}function I3r(){var c=arguments[0];return arguments[0]=this,c.apply(null,arguments),this}function W3r(){return Array.from(this)}function q3r(){for(var c=this._groups,e=0,n=c.length;e<n;++e)for(var h=c[e],t=0,i=h.length;t<i;++t){var s=h[t];if(s)return s}return null}function P3r(){let c=0;for(const e of this)++c;return c}function $3r(){return!this.node()}function L3r(c){for(var e=this._groups,n=0,h=e.length;n<h;++n)for(var t=e[n],i=0,s=t.length,o;i<s;++i)(o=t[i])&&c.call(o,o.__data__,i,t);return this}function X3r(c){return function(){this.removeAttribute(c)}}function j3r(c){return function(){this.removeAttributeNS(c.space,c.local)}}function G3r(c,e){return function(){this.setAttribute(c,e)}}function V3r(c,e){return function(){this.setAttributeNS(c.space,c.local,e)}}function J3r(c,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(c):this.setAttribute(c,n)}}function K3r(c,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(c.space,c.local):this.setAttributeNS(c.space,c.local,n)}}function Z3r(c,e){var n=Jf(c);if(arguments.length<2){var h=this.node();return n.local?h.getAttributeNS(n.space,n.local):h.getAttribute(n)}return this.each((e==null?n.local?j3r:X3r:typeof e=="function"?n.local?K3r:J3r:n.local?V3r:G3r)(n,e))}function wk(c){return c.ownerDocument&&c.ownerDocument.defaultView||c.document&&c||c.defaultView}function Y3r(c){return function(){this.style.removeProperty(c)}}function Q3r(c,e,n){return function(){this.style.setProperty(c,e,n)}}function r2r(c,e,n){return function(){var h=e.apply(this,arguments);h==null?this.style.removeProperty(c):this.style.setProperty(c,h,n)}}function e2r(c,e,n){return arguments.length>1?this.each((e==null?Y3r:typeof e=="function"?r2r:Q3r)(c,e,n??"")):x9(this.node(),c)}function x9(c,e){return c.style.getPropertyValue(e)||wk(c).getComputedStyle(c,null).getPropertyValue(e)}function n2r(c){return function(){delete this[c]}}function c2r(c,e){return function(){this[c]=e}}function h2r(c,e){return function(){var n=e.apply(this,arguments);n==null?delete this[c]:this[c]=n}}function t2r(c,e){return arguments.length>1?this.each((e==null?n2r:typeof e=="function"?h2r:c2r)(c,e)):this.node()[c]}function xk(c){return c.trim().split(/^|\s+/)}function RE(c){return c.classList||new Nk(c)}function Nk(c){this._node=c,this._names=xk(c.getAttribute("class")||"")}Nk.prototype={add:function(c){var e=this._names.indexOf(c);e<0&&(this._names.push(c),this._node.setAttribute("class",this._names.join(" ")))},remove:function(c){var e=this._names.indexOf(c);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(c){return this._names.indexOf(c)>=0}};function Fk(c,e){for(var n=RE(c),h=-1,t=e.length;++h<t;)n.add(e[h])}function Tk(c,e){for(var n=RE(c),h=-1,t=e.length;++h<t;)n.remove(e[h])}function i2r(c){return function(){Fk(this,c)}}function s2r(c){return function(){Tk(this,c)}}function a2r(c,e){return function(){(e.apply(this,arguments)?Fk:Tk)(this,c)}}function o2r(c,e){var n=xk(c+"");if(arguments.length<2){for(var h=RE(this.node()),t=-1,i=n.length;++t<i;)if(!h.contains(n[t]))return!1;return!0}return this.each((typeof e=="function"?a2r:e?i2r:s2r)(n,e))}function l2r(){this.textContent=""}function u2r(c){return function(){this.textContent=c}}function m2r(c){return function(){var e=c.apply(this,arguments);this.textContent=e??""}}function _2r(c){return arguments.length?this.each(c==null?l2r:(typeof c=="function"?m2r:u2r)(c)):this.node().textContent}function U2r(){this.innerHTML=""}function v2r(c){return function(){this.innerHTML=c}}function d2r(c){return function(){var e=c.apply(this,arguments);this.innerHTML=e??""}}function z2r(c){return arguments.length?this.each(c==null?U2r:(typeof c=="function"?d2r:v2r)(c)):this.node().innerHTML}function A2r(){this.nextSibling&&this.parentNode.appendChild(this)}function g2r(){return this.each(A2r)}function C2r(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function f2r(){return this.each(C2r)}function D2r(c){var e=typeof c=="function"?c:pk(c);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function B2r(){return null}function p2r(c,e){var n=typeof c=="function"?c:pk(c),h=e==null?B2r:typeof e=="function"?e:TE(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),h.apply(this,arguments)||null)})}function S2r(){var c=this.parentNode;c&&c.removeChild(this)}function b2r(){return this.each(S2r)}function E2r(){var c=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(c,this.nextSibling):c}function y2r(){var c=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(c,this.nextSibling):c}function w2r(c){return this.select(c?y2r:E2r)}function x2r(c){return arguments.length?this.property("__data__",c):this.node().__data__}function N2r(c){return function(e){c.call(this,e,this.__data__)}}function F2r(c){return c.trim().split(/^|\s+/).map(function(e){var n="",h=e.indexOf(".");return h>=0&&(n=e.slice(h+1),e=e.slice(0,h)),{type:e,name:n}})}function T2r(c){return function(){var e=this.__on;if(e){for(var n=0,h=-1,t=e.length,i;n<t;++n)i=e[n],(!c.type||i.type===c.type)&&i.name===c.name?this.removeEventListener(i.type,i.listener,i.options):e[++h]=i;++h?e.length=h:delete this.__on}}}function R2r(c,e,n){return function(){var h=this.__on,t,i=N2r(e);if(h){for(var s=0,o=h.length;s<o;++s)if((t=h[s]).type===c.type&&t.name===c.name){this.removeEventListener(t.type,t.listener,t.options),this.addEventListener(t.type,t.listener=i,t.options=n),t.value=e;return}}this.addEventListener(c.type,i,n),t={type:c.type,name:c.name,value:e,listener:i,options:n},h?h.push(t):this.__on=[t]}}function M2r(c,e,n){var h=F2r(c+""),t,i=h.length,s;if(arguments.length<2){var o=this.node().__on;if(o){for(var u=0,m=o.length,_;u<m;++u)for(t=0,_=o[u];t<i;++t)if((s=h[t]).type===_.type&&s.name===_.name)return _.value}return}for(o=e?R2r:T2r,t=0;t<i;++t)this.each(o(h[t],e,n));return this}function Rk(c,e,n){var h=wk(c),t=h.CustomEvent;typeof t=="function"?t=new t(e,n):(t=h.document.createEvent("Event"),n?(t.initEvent(e,n.bubbles,n.cancelable),t.detail=n.detail):t.initEvent(e,!1,!1)),c.dispatchEvent(t)}function H2r(c,e){return function(){return Rk(this,c,e)}}function O2r(c,e){return function(){return Rk(this,c,e.apply(this,arguments))}}function k2r(c,e){return this.each((typeof e=="function"?O2r:H2r)(c,e))}function*I2r(){for(var c=this._groups,e=0,n=c.length;e<n;++e)for(var h=c[e],t=0,i=h.length,s;t<i;++t)(s=h[t])&&(yield s)}var Mk=[null];function e3(c,e){this._groups=c,this._parents=e}function Kz(){return new e3([[document.documentElement]],Mk)}function W2r(){return this}e3.prototype=Kz.prototype={constructor:e3,select:m3r,selectAll:d3r,selectChild:C3r,selectChildren:p3r,filter:S3r,data:N3r,enter:b3r,exit:T3r,join:R3r,merge:M3r,selection:W2r,order:H3r,sort:O3r,call:I3r,nodes:W3r,node:q3r,size:P3r,empty:$3r,each:L3r,attr:Z3r,style:e2r,property:t2r,classed:o2r,text:_2r,html:z2r,raise:g2r,lower:f2r,append:D2r,insert:p2r,remove:b2r,clone:w2r,datum:x2r,on:M2r,dispatch:k2r,[Symbol.iterator]:I2r};function Su(c){return typeof c=="string"?new e3([[document.querySelector(c)]],[document.documentElement]):new e3([[c]],Mk)}function q2r(c){return c}var P2r=4,Hk=1e-6;function $2r(c){return"translate(0,"+c+")"}function L2r(c){return e=>+c(e)}function X2r(c,e){return e=Math.max(0,c.bandwidth()-e*2)/2,c.round()&&(e=Math.round(e)),n=>+c(n)+e}function j2r(){return!this.__axis}function G2r(c,e){var n=[],h=null,t=null,i=6,s=6,o=3,u=typeof window<"u"&&window.devicePixelRatio>1?0:.5,m=-1,_="x",z=$2r;function C(A){var E=h??(e.ticks?e.ticks.apply(e,n):e.domain()),N=t??(e.tickFormat?e.tickFormat.apply(e,n):q2r),y=Math.max(i,0)+o,M=e.range(),j=+M[0]+u,I=+M[M.length-1]+u,H=(e.bandwidth?X2r:L2r)(e.copy(),u),G=A.selection?A.selection():A,K=G.selectAll(".domain").data([null]),T=G.selectAll(".tick").data(E,e).order(),q=T.exit(),P=T.enter().append("g").attr("class","tick"),V=T.select("line"),Q=T.select("text");K=K.merge(K.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),T=T.merge(P),V=V.merge(P.append("line").attr("stroke","currentColor").attr(_+"2",m*i)),Q=Q.merge(P.append("text").attr("fill","currentColor").attr(_,m*y).attr("dy","0.32em")),A!==G&&(K=K.transition(A),T=T.transition(A),V=V.transition(A),Q=Q.transition(A),q=q.transition(A).attr("opacity",Hk).attr("transform",function(er){return isFinite(er=H(er))?z(er+u):this.getAttribute("transform")}),P.attr("opacity",Hk).attr("transform",function(er){var rr=this.parentNode.__axis;return z((rr&&isFinite(rr=rr(er))?rr:H(er))+u)})),q.remove(),K.attr("d",s?"M"+m*s+","+j+"H"+u+"V"+I+"H"+m*s:"M"+u+","+j+"V"+I),T.attr("opacity",1).attr("transform",function(er){return z(H(er)+u)}),V.attr(_+"2",m*i),Q.attr(_,m*y).text(N),G.filter(j2r).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor","end"),G.each(function(){this.__axis=H})}return C.scale=function(A){return arguments.length?(e=A,C):e},C.ticks=function(){return n=Array.from(arguments),C},C.tickArguments=function(A){return arguments.length?(n=A==null?[]:Array.from(A),C):n.slice()},C.tickValues=function(A){return arguments.length?(h=A==null?null:Array.from(A),C):h&&h.slice()},C.tickFormat=function(A){return arguments.length?(t=A,C):t},C.tickSize=function(A){return arguments.length?(i=s=+A,C):i},C.tickSizeInner=function(A){return arguments.length?(i=+A,C):i},C.tickSizeOuter=function(A){return arguments.length?(s=+A,C):s},C.tickPadding=function(A){return arguments.length?(o=+A,C):o},C.offset=function(A){return arguments.length?(u=+A,C):u},C}function Ok(c){return G2r(P2r,c)}const V2r={A:"T",T:"A",G:"C",C:"G"};function J2r(c){let e="";for(let n=c.length-1;n>=0;n--){const h=c.charAt(n),t=V2r[h.toUpperCase()];e+=t||h}return e}const ME={G:"#3899c7",C:"#e05144",T:"#9238c7",A:"#89c738",N:"#858585"},K2r="black";class N9 extends Z.PureComponent{render(){const{sequence:e,xSpan:n,y:h,isDrawBackground:t,height:i,letterSize:s,isReverseComplement:o,minXwidthPerBase:u,drawHeights:m,zeroLine:_}=this.props;if(!e)return null;const z=(n.end-n.start)/e.length;if(z<u)return null;const C=o?J2r(e):e,A=[];if(t){let y=n.start;for(const M of C)A.push(S.jsx("rect",{x:y,y:h,width:z,height:i,style:{fill:ME[M.toUpperCase()]||K2r}},y)),y+=z}const E=[],N=!!m&&m.length>0;if(z>=s){let y=n.start;for(const M of C){const j=y+z*.5;if(N){const I=m[Math.floor(j)]/z;E.push(S.jsx("text",{x:j,y:_,dominantBaseline:"auto",transform:`translate(${j} ${_}) scale(1 ${I}) translate(-${j} -${_})`,style:{textAnchor:"middle",fill:ME[M.toUpperCase()],fontSize:1.4*z},children:M.toUpperCase()},y))}else E.push(S.jsx("text",{x:j,y:h+i/2+1,dominantBaseline:"middle",style:{textAnchor:"middle",fill:"white",fontSize:s},children:M},y));y+=z}}return S.jsxs(Z.Fragment,{children:[A,E]})}}_r(N9,"MIN_X_WIDTH_PER_BASE",1),_r(N9,"defaultProps",{isDrawBackground:!0,height:15,letterSize:12,y:0,minXwidthPerBase:1});const Zf=32;class xi extends Z.PureComponent{constructor(n){super(n);_r(this,"gNode");this.gNode=null,this.handleRef=this.handleRef.bind(this),this.plotATCGLegend=this.plotATCGLegend.bind(this)}componentDidMount(){this.drawAxis()}componentDidUpdate(n){(this.props.axisScale!==n.axisScale||this.props.noShiftFirstAxisLabel!==n.noShiftFirstAxisLabel)&&this.drawAxis()}handleRef(n){this.gNode=n}drawAxis(){if(this.gNode&&this.props.axisScale){for(;this.gNode.hasChildNodes();)this.gNode.lastChild.remove();const n=Ok(this.props.axisScale),h=this.props.axisScale.domain();h.includes(NaN)||(h[0]>1e3?n.tickValues(h).tickFormat(jf(".3s")):n.tickValues(h));const t=this.props.axisScaleReverse||this.props.noShiftFirstAxisLabel?"0.32em":"-0.1em";if(h[0]!==h[1]&&Su(this.gNode).append("g").call(n),Su(this.gNode).selectAll("text").filter((i,s)=>s===0).attr("dy","0.8em"),Su(this.gNode).selectAll("text").filter((i,s)=>s===1).attr("dy",t),this.props.hideFirstAxisLabel&&Su(this.gNode).selectAll(".tick").filter((i,s)=>s===0).remove(),this.props.axisScaleReverse){const i=Ok(this.props.axisScaleReverse),s=this.props.axisScaleReverse.domain();s.includes(NaN)||i.tickValues(s),s[0]!==s[1]&&Su(this.gNode).append("g").attr("transform","translate(0,"+this.props.height*.5+")").call(i).selectAll(".tick").filter(o=>o===0).remove(),Su(this.gNode).selectAll("text").filter((o,u)=>u===2).attr("dy","-0.1em")}Su(this.gNode).selectAll("text").attr("class","svg-text-bg"),Su(this.gNode).selectAll("line").attr("class","svg-line-bg"),Su(this.gNode).selectAll("path").attr("class","svg-line-bg")}}getLabelWidth(){if(this.props.axisScale)return this.props.trackModel.legendWidth?this.props.trackModel.legendWidth-Zf:this.props.width-Zf}plotATCGLegend(){return Object.entries(ME).map(h=>S.jsx("div",{style:{backgroundColor:h[1],color:"white"},children:h[0]},h[0]))}render(){const{trackModel:n,width:h,height:t,axisScale:i,style:s,axisScaleReverse:o,trackViewRegion:u,trackWidth:m,selectedRegion:_,label:z,forceSvg:C}=this.props;if(t<=0)return null;const A=o?t*.5:t,E={display:"flex",width:h,minWidth:h,height:A,zIndex:10,justifyContent:"space-between"};C&&(E.backgroundColor="var(--bg-color)",E.color="var(--font-color)");const N=Object.assign(E,s),y={width:this.getLabelWidth(),maxHeight:t};let M;i&&(M=S.jsx("svg",{width:Zf,height:A,style:{overflow:"visible"},children:S.jsx(Nt,{innerRef:this.handleRef,x:Zf-1})}));let j=!1,I="";if(n.type==="ruler"){new gi(u,m).basesToXWidth(1)>N9.MIN_X_WIDTH_PER_BASE?j=!0:j=!1;const T=_.getFeatureSegments().filter(q=>q&&q.feature.getName()!=="Gap");T.length===1&&(I=T[0].feature.getName()),T.length>1&&(I+=`-${T[T.length-1].feature.getName()}`)}let H;if(n.type==="matplot"){const G=n.tracks.map((K,T)=>{const q=K.options.color||"blue";return S.jsx("div",{style:{color:q},children:K.label},T)});H=S.jsx("div",{style:{display:"grid",gridTemplateColumns:"auto",alignItems:"end",fontSize:"10px"},children:G})}return S.jsxs("div",{style:N,children:[S.jsxs("div",{className:"TrackLegend-wrap",title:n.options.label,children:[S.jsx("p",{className:"TrackLegend-label",style:{...y,wordWrap:"break-word",whiteSpace:"normal"},children:z||n.options.label}),S.jsx("div",{style:{display:"flex",alignItems:"center",fontSize:"12px"},children:j&&this.plotATCGLegend()}),H,I?S.jsx("div",{style:{fontSize:"11px",alignSelf:"flex-end"},className:"TrackLegend-chrLabel",children:I}):""]}),M]})}}_r(xi,"defaultProps",{width:120,forceSvg:!1});const Z2r="-";function kk(c,e,n=!1){const h=n?-1:1,t=[];let i=e;for(const s of c)t.push(i),s!==Z2r&&(i+=h);return t}class Y2r extends Z.Component{render(){const{alignment:e,x:n,halfLength:h,target:t,query:i,basesPerPixel:s}=this.props;if(e){let o=function(he,se){const ee=he.split(""),le=se.split("");return ee.map(function(Le,Gr){return Le===le[Gr]?"|":" "}).join("")};const u=Math.max(Math.round(s),1),m=Math.floor(u/2),{visiblePart:_,record:z}=e,{start:C,end:A}=_.sequenceInterval,E=A-C,N=Math.floor((n-e.targetXSpan.start)/(e.targetXSpan.end-e.targetXSpan.start)*E),y=N-h>0?N-h:0,M=N+h<E?N+h:E-1,j=N-m>0?N-m:0,I=N+m<E?N+m:E-1,H=z.targetSeq.substr(C+y,j-y).toUpperCase(),G=z.targetSeq.substr(C+j,u).toUpperCase(),K=z.targetSeq.substr(C+j+u,M-I).toUpperCase(),T=z.querySeq.substr(C+y,j-y).toUpperCase(),q=z.querySeq.substr(C+j,u).toUpperCase(),P=z.querySeq.substr(C+j+u,M-I).toUpperCase(),V=kk(e.targetSequence,_.relativeStart),Q=z.locus.start+V[y],er=z.locus.start+V[M],rr=z.locus.start+V[j],Ur=z.locus.start+V[I],Sr=z.queryStrand==="-",Ar=Sr?e.queryLocusFine.end:e.queryLocusFine.start,mr=kk(e.querySequence,Ar,Sr),ar=mr[y],ur=mr[M],br=mr[j],or=mr[I],vr=Math.max(Q.toString().length,er.toString().length,ar.toString().length,ur.toString().length)*10+10+"px",Er=o(H,T),Hr=o(G,q),Xr=o(K,P);return S.jsxs(Z.Fragment,{children:[S.jsxs("div",{children:[S.jsxs("span",{children:[t,":",z.locus.chr,":"," "]}),S.jsxs("span",{className:"Tooltip-highlight-text",children:[rr,"-",Ur]})]}),S.jsxs("div",{children:[S.jsx("span",{className:"Tooltip-monospace-text",style:{width:vr},children:Q}),S.jsx("span",{className:"Tooltip-monospace-seq",children:H}),S.jsx("span",{className:"Tooltip-monospace-central-seq",children:G}),S.jsx("span",{className:"Tooltip-monospace-seq",children:K}),S.jsx("span",{className:"Tooltip-monospace-text",style:{width:vr},children:er})]}),S.jsxs("div",{children:[S.jsx("pre",{className:"Tooltip-monospace-seq",style:{marginLeft:vr},children:Er}),S.jsx("pre",{className:"Tooltip-monospace-central-seq",children:Hr}),S.jsx("pre",{className:"Tooltip-monospace-seq",children:Xr})]}),S.jsxs("div",{children:[S.jsx("span",{className:"Tooltip-monospace-text",style:{width:vr},children:ar}),S.jsx("span",{className:"Tooltip-monospace-seq",children:T}),S.jsx("span",{className:"Tooltip-monospace-central-seq",children:q}),S.jsx("span",{className:"Tooltip-monospace-seq",children:P}),S.jsx("span",{className:"Tooltip-monospace-text",style:{width:vr},children:ur})]}),S.jsxs("div",{children:[S.jsxs("span",{children:[i,":",z.queryLocus.chr,":"," "]}),S.jsxs("span",{className:"Tooltip-highlight-text",children:[br,"-",or]})]})]})}else return S.jsx("div",{children:"No alignment available"})}}const Yf=1,HE=2,OE=5,Q2r=10;class rlr extends Z.Component{constructor(e){super(e)}render(){const{height:e,segmentArray:n,strand:h,viewWindowStart:t,primaryColor:i,queryColor:s,style:o,children:u,rectHeight:m,relativeX:_,...z}=this.props,C=n.strandList,A=n.targetXSpanList,E=n.queryXSpanList,N=n.targetLocusList,y=n.queryLocusList,M=n.lengthList,j=n.queryLengthList,I=A.reduce((G,K,T)=>K.start<_&&K.end>=_?T:G,NaN);let H;if(isNaN(I))H=S.jsx(Z.Fragment,{children:null});else{const G=A[I],K=E[I],T=`${N[I]} (${M[I]})`,q=`${y[I]} (${j[I]})`,P=C[I]===h?K.start+(K.end-K.start)*(_-G.start)/(G.end-G.start):K.end-(K.end-K.start)*(_-G.start)/(G.end-G.start);H=S.jsxs(Z.Fragment,{children:[S.jsx(Ik,{relativeY:Yf,xSpan:G,viewWindowStart:t,color:i,locus:T,textHeight:10}),S.jsx(Wk,{relativeX:_-OE,relativeY:Yf+HE+m,color:i,direction:"down"}),S.jsx(Wk,{relativeX:P-OE,relativeY:e-m-Yf-HE-OE,color:s,direction:"up"}),S.jsx(Ik,{relativeY:e-Yf-HE,xSpan:K,viewWindowStart:t,color:s,locus:q,textHeight:-35})]})}return S.jsxs("div",{style:o,...z,children:[u,H]})}}function Ik(c){const{relativeY:e,xSpan:n,viewWindowStart:h,color:t,locus:i,textHeight:s}=c,o=n?n.end-n.start:0;i.length*Q2r;const u={top:e,left:0,width:o,height:2,color:t,willChange:"top"},m={marginTop:s,whiteSpace:"nowrap",marginLeft:0};return n?S.jsxs("div",{className:"Fragment-horizontal-line",style:u,children:[" ",S.jsx("p",{style:m,children:i})," "]}):null}function Wk(c){const{relativeX:e,relativeY:n,color:h,direction:t}=c,i={top:n,left:0,color:h},s=t==="up"?"arrow-up":"arrow-down";return S.jsx("div",{className:s,style:i})}let Tm=(CM=class extends Z.Component{render(){const{viewRegion:e,width:n,x:h}=this.props,t=new gi(e,n);let i;try{i=t.xToSegmentCoordinate(h)}catch{return null}if(ws.isGapFeature(i.feature))return i.getName();{const s=i.getLocus(),o=Math.floor(s.start),u=Math.ceil(o+t.xWidthToBases(1));return`${s.chr}:${o+1}-${u}`}}},_r(CM,"propTypes",{viewRegion:$r.instanceOf(kn).isRequired,width:$r.number.isRequired,x:$r.number.isRequired}),CM);var Qf={exports:{}},elr=function(e,n,h,t){var i=e[0],s=e[1],o=!1;h===void 0&&(h=0),t===void 0&&(t=n.length);for(var u=(t-h)/2,m=0,_=u-1;m<u;_=m++){var z=n[h+m*2+0],C=n[h+m*2+1],A=n[h+_*2+0],E=n[h+_*2+1],N=C>s!=E>s&&i<(A-z)*(s-C)/(E-C)+z;N&&(o=!o)}return o},nlr=function(e,n,h,t){var i=e[0],s=e[1],o=!1;h===void 0&&(h=0),t===void 0&&(t=n.length);for(var u=t-h,m=0,_=u-1;m<u;_=m++){var z=n[m+h][0],C=n[m+h][1],A=n[_+h][0],E=n[_+h][1],N=C>s!=E>s&&i<(A-z)*(s-C)/(E-C)+z;N&&(o=!o)}return o},qk=elr,Pk=nlr;Qf.exports=function(e,n,h,t){return n.length>0&&Array.isArray(n[0])?Pk(e,n,h,t):qk(e,n,h,t)},Qf.exports.nested=Pk,Qf.exports.flat=qk;var clr=Qf.exports;const F9=Ai(clr);function hlr(c){const e=c.getBoundingClientRect();return{top:e.top+window.pageYOffset,left:e.left+window.pageXOffset,height:e.height}}const tlr={numerical:function(e){const n=e.data[Math.round(e.relativeX)],h=e.hasReverse?e.data2[Math.round(e.relativeX)]:null,t=typeof n=="number"&&!Number.isNaN(n)?n.toFixed(2):"(no data)",i=typeof h=="number"&&!Number.isNaN(h)?h.toFixed(2):"(no data)";return{toolTip:S.jsxs("div",{children:[S.jsxs("div",{children:[S.jsxs("span",{className:"Tooltip-major-text",style:{marginRight:3},children:[e.hasReverse&&"Forward: "," ",t]}),e.unit&&S.jsx("span",{className:"Tooltip-minor-text",children:e.unit})]}),e.hasReverse&&S.jsxs("div",{children:[S.jsxs("span",{className:"Tooltip-major-text",style:{marginRight:3},children:["Reverse: ",i]}),e.unit&&S.jsx("span",{className:"Tooltip-minor-text",children:e.unit})]}),S.jsx("div",{className:"Tooltip-minor-text",children:S.jsx(Tm,{viewRegion:e.viewRegion,width:e.width,x:e.relativeX})}),S.jsx("div",{className:"Tooltip-minor-text",children:e.trackModel.getDisplayLabel()})]})}},dbedgraph:function(e){const{trackModel:n,viewRegion:h,width:t,relativeX:i,data:s}=e;if(!s)return null;const o=s[Math.round(i)],u=Xe.compact(o).length?JSON.stringify(o):"(no data)";return{toolTip:S.jsxs("div",{children:[u,S.jsx("div",{className:"Tooltip-minor-text",children:S.jsx(Tm,{viewRegion:h,width:t,x:i})}),S.jsx("div",{className:"Tooltip-minor-text",children:n.getDisplayLabel()})]})}},dynamichic:function(e){const{data:n,relativeX:h,relativeY:t,trackModel:i}=e,o=((u,m)=>{const _=[];for(const z of n)for(const C of z)if(F9([u,m],C.points)){_.push(C);break}return _})(h,t);if(o.length)return{toolTip:S.jsx("div",{children:o.map((u,m)=>{var _;return S.jsxs("div",{children:[S.jsx("div",{children:S.jsx("strong",{children:(_=i==null?void 0:i.tracks[m])==null?void 0:_.label})}),S.jsxs("div",{children:["Locus1: ",u.interaction.locus1.toString()]}),S.jsxs("div",{children:["Locus2: ",u.interaction.locus2.toString()]}),S.jsxs("div",{children:["Score: ",u.interaction.score]})]},m)})})}},dynamic:function(e){const{trackModel:n,viewRegion:h,width:t,unit:i,data:s,relativeX:o}=e;if(!s)return null;const _=s.map(z=>z[Math.round(o)]).map(z=>typeof z=="number"&&!Number.isNaN(z)?z.toFixed(2):"(no data)").map((z,C)=>{const A=n.tracks[C].options.color||"blue";return S.jsxs("div",{children:[S.jsxs("span",{style:{color:A},children:[n.tracks[C].label," ",z]}),i&&S.jsx("span",{className:"Tooltip-minor-text",children:i})]},C)});return{toolTip:S.jsxs("div",{children:[_,S.jsx("div",{className:"Tooltip-minor-text",children:S.jsx(Tm,{viewRegion:h,width:t,x:o})}),S.jsx("div",{className:"Tooltip-minor-text",children:n.getDisplayLabel()})]})}},modbed:function(e){const n=e.relativeX,h=Math.round(n),t=e.scale?e.scale.pcts:null,i=e.data[h];return!i.count||!t?null:{toolTip:S.jsxs("div",{children:[S.jsxs("div",{children:["methylation level: ",t[h].toFixed(3)]}),S.jsxs("div",{children:[i.on," modified base(s)/",i.off," canonical base(s)"]}),S.jsxs("div",{children:[i.count," reads"]})]})}},matplot:function(e){const{trackModel:n,viewRegion:h,width:t,unit:i,data:s,relativeX:o}=e;if(!s)return null;const _=s.map(z=>z[Math.round(o)]).map(z=>typeof z=="number"&&!Number.isNaN(z)?z.toFixed(2):"(no data)").map((z,C)=>{const A=n.tracks[C].options.color||"blue";return S.jsxs("div",{children:[S.jsxs("span",{style:{color:A},children:[n.tracks[C].label," ",z]}),i&&S.jsx("span",{className:"Tooltip-minor-text",children:i})]},C)});return{toolTip:S.jsxs("div",{children:[_,S.jsx("div",{className:"Tooltip-minor-text",children:S.jsx(Tm,{viewRegion:h,width:t,x:o})}),S.jsx("div",{className:"Tooltip-minor-text",children:n.getDisplayLabel()})]})}},boxplot:function(e){const{trackModel:n,viewRegion:h,width:t,unit:i,data:s,xAlias:o,relativeX:u}=e;if(!s||!o)return null;const m=s[o[Math.round(u)]],_=m?S.jsxs("div",{className:"Tooltip-major-text",style:{marginRight:3},children:[S.jsxs("div",{children:["Total values: ",m.count]}),S.jsxs("div",{children:["Low: ",m.min]}),S.jsxs("div",{children:["High: ",m.max]}),S.jsxs("div",{children:["Quantile 1: ",m.q1]}),S.jsxs("div",{children:["Quantile 3: ",m.q3]}),S.jsxs("div",{children:["Median: ",m.median]})]}):"(no data)";return{toolTip:S.jsxs("div",{children:[S.jsxs("div",{children:[_,i&&S.jsx("span",{className:"Tooltip-minor-text",children:i})]}),S.jsx("div",{className:"Tooltip-minor-text",children:S.jsx(Tm,{viewRegion:h,width:t,x:u})}),S.jsx("div",{className:"Tooltip-minor-text",children:n.getDisplayLabel()})]})}},methyc:function(e){const{trackModel:n,viewRegion:h,width:t,options:i}=e,s=e.data[Math.round(e.relativeX)];return{toolTip:S.jsxs("div",{children:[u(s,i.isCombineStrands?"combined":"forward"),!i.isCombineStrands&&u(s,"reverse"),S.jsx("div",{className:"Tooltip-minor-text",children:S.jsx(Tm,{viewRegion:h,width:t,x:e.relativeX})}),S.jsx("div",{className:"Tooltip-minor-text",children:n.getDisplayLabel()})]})};function o(m){return{color:Y4(m),backgroundColor:m,padding:"0px 3px",borderRadius:3}}function u(m,_){const{depthColor:z,colorsForContext:C,depthFilter:A}=e.options,E=m[_];let N;if(E){if(E.depth<A)return null;let y=[];const M=Xe.sortBy(E.contextValues,"context");for(let j of M){const I=j.context,H=(C[I]||e.options.CG).color;y.push(S.jsx("div",{style:o(H),children:I},I+"label"),S.jsx("div",{children:j.value.toFixed(2)},I+"value"))}N=S.jsxs("div",{className:"MethylCTrack-tooltip-strand-details",children:[S.jsx("div",{style:o(z),children:"Depth"}),S.jsx("div",{children:Math.round(E.depth)}),y]})}return S.jsxs("div",{className:"MethylCTrack-tooltip-strand",children:[S.jsx("span",{className:"MethylCTrack-tooltip-strand-title",children:_}),N||S.jsx("div",{className:"Tooltip-minor-text",children:"(No data)"})]},_)}},interactionHeatmap:function(e){const n=t(e.relativeX,e.relativeY);function h(){if(n){let{xSpan1:s,xSpan2:o}=n;const u=hlr(e.targetRef.current),m=s.start,_=o.start,z=u.left+m-20+"px",C=u.left+_-20+"px",A=m+120+"px",E=_+120+"px",N=Math.max(s.getLength(),1),y=Math.max(o.getLength(),1);return S.jsxs(S.Fragment,{children:[S.jsx("div",{id:"beamLeft",style:{position:"absolute",display:"block",left:e.options.packageVersion?A:z,width:N+"px",height:"100%",zIndex:1e3},children:S.jsx("div",{id:"beamLeftInner"})}),S.jsx("div",{id:"beamRight",style:{position:"absolute",display:"block",left:e.options.packageVersion?E:C,width:y+"px",height:"1000",zIndex:1e3},children:S.jsx("div",{id:"beamRightInner"})})]})}else return null}function t(s,o){for(const u of e.data)if(F9([s,o],u.points))return u;return null}let i=h();return i?{beams:i,toolTip:S.jsxs("div",{children:[S.jsxs("div",{children:["Locus1: ",n.interaction.locus1.toString()]}),S.jsxs("div",{children:["Locus2: ",n.interaction.locus2.toString()]}),S.jsxs("div",{children:["Score: ",n.interaction.score]})]})}:""},interactionArc:function(e){function n(s,o){if(e.options.greedyTooltip){const u=t(s,o);if(u.length){const m=Xe.sortBy(u,C=>C[4].score),_=[];for(let C=m.length-1;C>=m.length-6&&C>=0&&!(_.length>2);C--)_.length>0&&qz(m[C][4].locus1,_[_.length-1][4].locus2)&&qz(m[C][4].locus2,_[_.length-1][4].locus1)||_.push(m[C]);const z=_.map((C,A)=>S.jsxs("div",{children:[C[4].name&&S.jsx("div",{children:C[4].name}),S.jsxs("div",{children:["Locus1: ",C[4].locus1.toString()]}),S.jsxs("div",{children:["Locus2: ",C[4].locus2.toString()]}),S.jsxs("div",{children:["Score: ",C[4].score]})]},A));return S.jsxs("div",{children:[S.jsxs("div",{children:[u.length," interactions found. Showing top 3:"]}),S.jsx("div",{children:z})]})}else return null}else{const u=h(s,o);return u?S.jsxs("div",{children:[u[4].name&&S.jsx("div",{children:u[4].name}),S.jsxs("div",{children:["Locus1: ",u[4].locus1.toString()]}),S.jsxs("div",{children:["Locus2: ",u[4].locus2.toString()]}),S.jsxs("div",{children:["Score: ",u[4].score]})]}):null}}function h(s,o){for(const u of e.data)if(Math.abs(Math.sqrt(Math.pow(s-u[0],2)+Math.pow(o-u[1],2))-u[2])<=.5*u[3])return u;return null}function t(s,o){const u=[];for(const m of e.data)Math.abs(Math.sqrt(Math.pow(s-m[0],2)+Math.pow(o-m[1],2))-m[2])<=.5*m[3]&&u.push(m);return u}let i=n(e.relativeX,e.relativeY);return i?{toolTip:i}:""},interactionSquareDisplay:function(e){const n=t(e.relativeX,e.relativeY);let h;n&&(n.xSpan1,n.xSpan2,h=n.interaction);function t(i,s){for(const o of e.data)if(F9([i,s],o.pointLeft)||F9([i,s],o.pointRight))return o;return null}return n?{toolTip:S.jsxs("div",{children:[S.jsxs("div",{children:["Locus1: ",h.locus1.toString()]}),S.jsxs("div",{children:["Locus2: ",h.locus2.toString()]}),S.jsxs("div",{children:["Score: ",h.score]})]})}:""},genomealignFine:function(e){const{basesPerPixel:n,primaryGenome:h,queryGenome:t}=e.data,i=e.data.drawData,s=i.reduce((m,_,z)=>_.targetXSpan.start<e.relativeX&&_.targetXSpan.end>=e.relativeX?z:m,NaN),o=i[s];return{toolTip:S.jsx(Y2r,{alignment:o,x:e.relativeX,halfLength:10,target:h,query:t,basesPerPixel:n})}},genomealignRough:function(e){return{toolTip:S.jsx(rlr,{height:e.options.height,rectHeight:15,primaryColor:e.options.primaryColor,queryColor:e.options.queryColor,segmentArray:e.data,strand:e.data.plotStrand,viewWindowStart:e.width,relativeX:e.relativeX})}}};function $k(c){return c&&typeof c=="object"&&!Array.isArray(c)&&Object.keys(c).length>0}function Lk(c){return Array.isArray(c)&&c.length>0}function ilr(c){return $k(c)||Lk(c)}const slr=Z.memo(function({data:e,windowWidth:n,trackIdx:h,trackType:t,height:i,trackModel:s,viewRegion:o,unit:u,data2:m,hasReverse:_,options:z,viewWindow:C,legendWidth:A,scale:E,xAlias:N}){const y=Z.useRef(null),[M,j]=Z.useState(!1),[I,H]=Z.useState({top:0,left:0,right:0,dataIdxX:0,dataIdxY:0,toolTip:S.jsx(S.Fragment,{}),beams:S.jsx(S.Fragment,{})}),G=T=>{if(Lk(e)||$k(e)&&ilr(e)){const q=y.current.getBoundingClientRect();let P=Math.round(T.pageX-q.left),V=Math.round(T.pageY-(window.scrollY+q.top-1)),Q=tlr[t]({data:e,trackModel:s,data2:m,viewRegion:o,width:n,unit:u,relativeX:P,relativeY:V,hasReverse:_,options:z,viewWindow:C,legendWidth:A,targetRef:y,scale:E,xAlias:N});Q?(H({...I,top:q.bottom,left:q.left,right:q.right,dataIdxX:P,dataIdxY:V,toolTip:Q.toolTip,beams:Q.beams?Q.beams:S.jsx(S.Fragment,{})}),j(!0)):j(!1)}},K=()=>{j(!1)};return Z.useEffect(()=>(j(!1),y.current!==null&&(y.current.addEventListener("mousemove",G),y.current.addEventListener("mouseleave",K)),()=>{y.current!==null&&(y.current.removeEventListener("mousemove",G),y.current.removeEventListener("mouseleave",K))}),[e]),S.jsx("div",{ref:y,style:{width:n,height:i,position:"relative",zIndex:-1},children:M?S.jsxs(S.Fragment,{children:[z&&z.trackManagerRef?Tn.createPortal(I.beams,z.trackManagerRef.current):"",Tn.createPortal(S.jsx("div",{style:{position:"absolute",top:I.top+window.scrollY,left:I.left+I.dataIdxX,backgroundColor:"lightBlue",borderRadius:4,fontSize:14,zIndex:1e3},children:I.toolTip}),document.body)]}):""},`tooltip-${h}`)}),Ha=Z.memo(slr),At={aggregateMethod:cs.types.MEAN,displayMode:Nl.AUTO,height:40,color:"blue",colorAboveMax:"red",color2:"darkorange",color2BelowMin:"darkgreen",yScale:Ch.AUTO,yMax:10,yMin:0,smooth:0,ensemblStyle:!1,backgroundColor:"var(--bg-color)"},alr=21,bu=2,T9=c=>{const{data:e,viewRegion:n,width:h,trackModel:t,unit:i,options:s,forceSvg:o,getNumLegend:u,groupScale:m,xvaluesData:_,viewWindow:z}=c,{height:C,color:A,color2:E,colorAboveMax:N,color2BelowMin:y}=s,M=Z.useMemo(()=>new Dk,[]);let j=_||M.xToValueMaker(e,n,h,s),[I,H,G]=j;const T=Z.useMemo(()=>dt((Sr,Ar,mr)=>{const{yScale:ar,yMin:ur,yMax:br}=s;ur>=br&&console.log("Y-axis min must less than max","error",2e3);let or={},nr,vr,Er=[];if(m&&t.options.hasOwnProperty("group")&&(or=m[t.options.group]),!Xe.isEmpty(or))vr=Xe.max(Object.values(or.max)),nr=Xe.min(Object.values(or.min));else{const Xr=Sr.slice(c.viewWindow.start,c.viewWindow.end);vr=Xe.max(Xr)||1,Er=Ar.filter(se=>se),nr=(Er.length?Xe.min(Ar.slice(c.viewWindow.start,c.viewWindow.end)):0)||0;const he=Math.max(Math.abs(vr),Math.abs(nr));vr=he,nr=Er.length?-he:0,ar===Ch.FIXED&&(vr=br||vr,nr=ur!==void 0?ur:nr)}nr>vr&&(console.log("Y-axis min should less than Y-axis max","warning",5e3),nr=0);const Hr=nr<0?bu+(mr-2*bu)*vr/(vr-nr):mr;return Er.length&&(ar===Ch.AUTO||ar===Ch.FIXED&&ur<0)?{axisScale:In().domain([vr,nr]).range([bu,mr-bu]).clamp(!0),valueToY:In().domain([vr,0]).range([bu,Hr]).clamp(!0),valueToYReverse:In().domain([0,nr]).range([0,mr-Hr-bu]).clamp(!0),valueToOpacity:In().domain([0,vr]).range([0,1]).clamp(!0),valueToOpacityReverse:In().domain([0,nr]).range([0,1]).clamp(!0),min:nr,max:vr,zeroLine:Hr}:{axisScale:In().domain([vr,nr]).range([bu,mr]).clamp(!0),valueToY:In().domain([vr,nr]).range([bu,mr]).clamp(!0),valueToOpacity:In().domain([nr,vr]).range([0,1]).clamp(!0),valueToYReverse:In().domain([0,nr]).range([0,mr-Hr-bu]).clamp(!0),valueToOpacityReverse:In().domain([0,nr]).range([0,1]).clamp(!0),min:nr,max:vr,zeroLine:Hr}}),[s,c])(I,H,C);let P=(()=>{const{displayMode:Sr,height:Ar}=s;return Sr===Nl.AUTO||Sr==="density"?Ar<alr?Nl.HEATMAP:Nl.BAR:Sr})()===Nl.BAR;const V=S.jsx(xi,{trackModel:t,height:C,axisScale:P?T.axisScale:void 0,axisLegend:i,label:s.label,forceSvg:o});u&&u(V);let Q=o?{position:"relative",overflow:"hidden",width:h/3}:{},er=o?{position:"relative",transform:`translateX(${-z.start}px)`}:{},rr=s.packageVersion?{marginLeft:120}:{};const Ur=G?S.jsxs(Z.Fragment,{children:[o?"":S.jsx("div",{style:{display:"flex",flexDirection:"row",position:"absolute",zIndex:3,...rr},children:S.jsx(Ha,{data:I,data2:H,windowWidth:h,trackType:"numerical",trackModel:t,height:C,viewRegion:n,unit:i,hasReverse:!0,options:s})}),S.jsxs("div",{style:{display:"flex",...Q},children:[o||s.packageVersion?V:"",S.jsxs("div",{style:{display:"flex",flexDirection:"column",...er},children:[S.jsx(kE,{xToValue:I,scales:T,height:T.zeroLine,color:A,colorOut:N,isDrawingBars:P,forceSvg:o,width:h,viewWindow:c.viewWindow}),S.jsx("hr",{style:{marginTop:0,marginBottom:0,padding:0}}),S.jsx(kE,{xToValue:H,scales:T,height:C-T.zeroLine,color:E,colorOut:y,isDrawingBars:P,forceSvg:o,width:h,viewWindow:c.viewWindow})]})]})]}):S.jsxs(Z.Fragment,{children:[o?"":S.jsx("div",{style:{display:"flex",flexDirection:"row",position:"absolute",zIndex:3,...rr},children:S.jsx(Ha,{data:I,data2:H,windowWidth:h,trackType:"numerical",trackModel:t,height:C,viewRegion:n,unit:i,hasReverse:!0,options:s})}),S.jsxs("div",{style:{display:"flex",...Q},children:[o||s.packageVersion?V:"",S.jsx("div",{style:{...er},children:S.jsx(kE,{xToValue:I,scales:T,height:T.zeroLine,color:A,colorOut:N,isDrawingBars:P,forceSvg:o,width:h,viewWindow:c.viewWindow})})]})]});return j=[],Ur},kE=c=>{const e=Z.useCallback((o,u)=>{if(!o||Number.isNaN(o))return null;const{isDrawingBars:m,scales:_,height:z,color:C,colorOut:A}=c,E=o>0?_.valueToY(o):_.valueToYReverse(o);let N=o>0?E:0,y=o>0?z-E:E;if(m){if(y<=0)return null;let M;return o>_.max||o<_.min?(y-=5,o>_.max?(M=E,N+=5):M=y,S.jsxs("g",{children:[S.jsx("rect",{x:u,y:N,width:1,height:y,fill:C}),S.jsx("rect",{x:u,y:M,width:1,height:5,fill:A})]},u)):S.jsx("rect",{x:u,y:N,width:1,height:y,fill:C},u)}else{const M=o>0?_.valueToOpacity(o):_.valueToOpacityReverse(o),j=M===0?1:M;return S.jsx("rect",{x:u,y:0,width:1,height:z,fill:C,fillOpacity:j},u)}},[c.isDrawingBars,c.scales,c.height,c.color,c.colorOut]),{xToValue:n,height:h,forceSvg:t,width:i,viewWindow:s}=c;return n.length===0?S.jsx("div",{style:{width:i,height:h}}):S.jsx(xl,{type:t?zt.SVG:zt.CANVAS,width:n.length,height:h,forceSvg:t,viewWindow:s,children:n.map(e)})};function olr(c,e,n,h){if(c.length===0)return n;const t=c[0][e];return c.every(i=>i[e]===t)?t===void 0?n:t:h}const llr=250,Oa=({optionsObjects:c,optionName:e,label:n,defaultValue:h="",multiValue:t="[multiple values]",hasSetButton:i,getInputElement:s,onOptionSet:o,trackId:u})=>{const[m,_]=Z.useState(""),z=N=>{i||C(N),_(N)},C=Xe.debounce(N=>{o&&o(e,N,u)},llr),A=s?s(m,z):S.jsx("input",{type:"text",value:m,onChange:N=>z(N.target.value)}),E=i?S.jsx("button",{onClick:()=>C(m),children:"Set"}):null;return Z.useEffect(()=>{let N=olr(c,e,h,t);_(N)},[]),S.jsx("div",{className:"TrackContextMenu-item",children:S.jsxs("label",{style:{margin:0},children:[n," ",A," ",E]})})};function Y3(c){return S.jsx(Oa,{...c,optionName:"label",label:"Track label:",hasSetButton:!0})}class Y1{constructor(e){_r(this,"defaultOptions");this.trackModel=e,this.trackModel=e,this.defaultOptions={}}isImageTrack(){throw new Error("Method not implemented.")}isBigwigTrack(){throw new Error("Method not implemented.")}isHicTrack(){return this.trackModel.type==="hic"}getOptions(){return Object.assign({},this.defaultOptions,this.trackModel.options)}setDefaultOptions(e){return Object.assign(this.defaultOptions,e)}getMenuComponents(){return[Y3]}}const R9="Wat is this",Ns=({choices:c,defaultValue:e=R9,optionName:n,optionsObjects:h,label:t,onOptionSet:i=()=>{}})=>{const s=(u,m)=>{let _=[];u===R9&&_.push(S.jsx("option",{value:R9},R9));for(let z in c){const C=c[z];_.push(S.jsx("option",{value:C,children:n==="normalization"?C:z},z))}return S.jsx("select",{value:u,onChange:z=>{const C=z.target.value;m(C)},children:_})},o=(u,m)=>{m!==R9&&i(u,m)};return S.jsx(Oa,{defaultValue:e,optionName:n,optionsObjects:h,label:t,multiValue:R9,onOptionSet:o,getInputElement:s})};function IE(c){return S.jsx(Ns,{...c,optionName:"displayMode",defaultValue:c.defaultValue,label:"Display mode:",choices:zo})}function ulr(c){return S.jsx(Ns,{...c,optionName:"displayMode",defaultValue:c.defaultValue,label:"Display mode:",choices:Nl})}function WE(c){return S.jsx(Ns,{...c,optionName:"displayMode",label:"Display mode:",defaultValue:ta.HEATMAP,choices:ta})}function Xk(c){return S.jsx(Ns,{...c,optionName:"displayMode",label:"Display mode:",defaultValue:GU.HEATMAP,choices:GU})}function mlr(c){return S.jsx(Ns,{...c,optionName:"colorScaleKey",label:"Color variant by:",defaultValue:Vz.AF,choices:Vz})}function _lr(c){return S.jsx(Ns,{...c,optionName:"displayMode",label:"Display mode:",defaultValue:Jz.AUTO,choices:Jz})}function Ulr(c){return S.jsx(Ns,{...c,optionName:"displayMode",label:"Display mode:",defaultValue:e5.AUTO,choices:e5})}var jk=xe.createContext(),Gk=xe.createContext();function Fs(c){var e=c.children,n=xe.useState(null),h=n[0],t=n[1],i=xe.useRef(!1);xe.useEffect(function(){return function(){i.current=!0}},[]);var s=xe.useCallback(function(o){i.current||t(o)},[]);return xe.createElement(jk.Provider,{value:h},xe.createElement(Gk.Provider,{value:s},e))}var Vk=function(e){return Array.isArray(e)?e[0]:e},Jk=function(e){if(typeof e=="function"){for(var n=arguments.length,h=new Array(n>1?n-1:0),t=1;t<n;t++)h[t-1]=arguments[t];return e.apply(void 0,h)}},qE=function(e,n){if(typeof e=="function")return Jk(e,n);e!=null&&(e.current=n)},Kk=function(e){return e.reduce(function(n,h){var t=h[0],i=h[1];return n[t]=i,n},{})},Zk=typeof window<"u"&&window.document&&window.document.createElement?xe.useLayoutEffect:xe.useEffect,Ao="top",Q3="bottom",r2="right",go="left",PE="auto",Zz=[Ao,Q3,r2,go],M9="start",Yz="end",vlr="clippingParents",Yk="viewport",Qz="popper",dlr="reference",Qk=Zz.reduce(function(c,e){return c.concat([e+"-"+M9,e+"-"+Yz])},[]),rI=[].concat(Zz,[PE]).reduce(function(c,e){return c.concat([e,e+"-"+M9,e+"-"+Yz])},[]),zlr="beforeRead",Alr="read",glr="afterRead",Clr="beforeMain",flr="main",Dlr="afterMain",Blr="beforeWrite",plr="write",Slr="afterWrite",blr=[zlr,Alr,glr,Clr,flr,Dlr,Blr,plr,Slr];function c5(c){return c?(c.nodeName||"").toLowerCase():null}function n3(c){if(c==null)return window;if(c.toString()!=="[object Window]"){var e=c.ownerDocument;return e&&e.defaultView||window}return c}function JU(c){var e=n3(c).Element;return c instanceof e||c instanceof Element}function e2(c){var e=n3(c).HTMLElement;return c instanceof e||c instanceof HTMLElement}function $E(c){if(typeof ShadowRoot>"u")return!1;var e=n3(c).ShadowRoot;return c instanceof e||c instanceof ShadowRoot}function Elr(c){var e=c.state;Object.keys(e.elements).forEach(function(n){var h=e.styles[n]||{},t=e.attributes[n]||{},i=e.elements[n];!e2(i)||!c5(i)||(Object.assign(i.style,h),Object.keys(t).forEach(function(s){var o=t[s];o===!1?i.removeAttribute(s):i.setAttribute(s,o===!0?"":o)}))})}function ylr(c){var e=c.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(h){var t=e.elements[h],i=e.attributes[h]||{},s=Object.keys(e.styles.hasOwnProperty(h)?e.styles[h]:n[h]),o=s.reduce(function(u,m){return u[m]="",u},{});!e2(t)||!c5(t)||(Object.assign(t.style,o),Object.keys(i).forEach(function(u){t.removeAttribute(u)}))})}}const wlr={name:"applyStyles",enabled:!0,phase:"write",fn:Elr,effect:ylr,requires:["computeStyles"]};function h5(c){return c.split("-")[0]}var KU=Math.max,rD=Math.min,H9=Math.round;function LE(){var c=navigator.userAgentData;return c!=null&&c.brands&&Array.isArray(c.brands)?c.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function eI(){return!/^((?!chrome|android).)*safari/i.test(LE())}function O9(c,e,n){e===void 0&&(e=!1),n===void 0&&(n=!1);var h=c.getBoundingClientRect(),t=1,i=1;e&&e2(c)&&(t=c.offsetWidth>0&&H9(h.width)/c.offsetWidth||1,i=c.offsetHeight>0&&H9(h.height)/c.offsetHeight||1);var s=JU(c)?n3(c):window,o=s.visualViewport,u=!eI()&&n,m=(h.left+(u&&o?o.offsetLeft:0))/t,_=(h.top+(u&&o?o.offsetTop:0))/i,z=h.width/t,C=h.height/i;return{width:z,height:C,top:_,right:m+z,bottom:_+C,left:m,x:m,y:_}}function XE(c){var e=O9(c),n=c.offsetWidth,h=c.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-h)<=1&&(h=e.height),{x:c.offsetLeft,y:c.offsetTop,width:n,height:h}}function nI(c,e){var n=e.getRootNode&&e.getRootNode();if(c.contains(e))return!0;if(n&&$E(n)){var h=e;do{if(h&&c.isSameNode(h))return!0;h=h.parentNode||h.host}while(h)}return!1}function Eu(c){return n3(c).getComputedStyle(c)}function xlr(c){return["table","td","th"].indexOf(c5(c))>=0}function Rm(c){return((JU(c)?c.ownerDocument:c.document)||window.document).documentElement}function eD(c){return c5(c)==="html"?c:c.assignedSlot||c.parentNode||($E(c)?c.host:null)||Rm(c)}function cI(c){return!e2(c)||Eu(c).position==="fixed"?null:c.offsetParent}function Nlr(c){var e=/firefox/i.test(LE()),n=/Trident/i.test(LE());if(n&&e2(c)){var h=Eu(c);if(h.position==="fixed")return null}var t=eD(c);for($E(t)&&(t=t.host);e2(t)&&["html","body"].indexOf(c5(t))<0;){var i=Eu(t);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||e&&i.willChange==="filter"||e&&i.filter&&i.filter!=="none")return t;t=t.parentNode}return null}function rA(c){for(var e=n3(c),n=cI(c);n&&xlr(n)&&Eu(n).position==="static";)n=cI(n);return n&&(c5(n)==="html"||c5(n)==="body"&&Eu(n).position==="static")?e:n||Nlr(c)||e}function jE(c){return["top","bottom"].indexOf(c)>=0?"x":"y"}function eA(c,e,n){return KU(c,rD(e,n))}function Flr(c,e,n){var h=eA(c,e,n);return h>n?n:h}function hI(){return{top:0,right:0,bottom:0,left:0}}function tI(c){return Object.assign({},hI(),c)}function iI(c,e){return e.reduce(function(n,h){return n[h]=c,n},{})}var Tlr=function(e,n){return e=typeof e=="function"?e(Object.assign({},n.rects,{placement:n.placement})):e,tI(typeof e!="number"?e:iI(e,Zz))};function Rlr(c){var e,n=c.state,h=c.name,t=c.options,i=n.elements.arrow,s=n.modifiersData.popperOffsets,o=h5(n.placement),u=jE(o),m=[go,r2].indexOf(o)>=0,_=m?"height":"width";if(!(!i||!s)){var z=Tlr(t.padding,n),C=XE(i),A=u==="y"?Ao:go,E=u==="y"?Q3:r2,N=n.rects.reference[_]+n.rects.reference[u]-s[u]-n.rects.popper[_],y=s[u]-n.rects.reference[u],M=rA(i),j=M?u==="y"?M.clientHeight||0:M.clientWidth||0:0,I=N/2-y/2,H=z[A],G=j-C[_]-z[E],K=j/2-C[_]/2+I,T=eA(H,K,G),q=u;n.modifiersData[h]=(e={},e[q]=T,e.centerOffset=T-K,e)}}function Mlr(c){var e=c.state,n=c.options,h=n.element,t=h===void 0?"[data-popper-arrow]":h;t!=null&&(typeof t=="string"&&(t=e.elements.popper.querySelector(t),!t)||nI(e.elements.popper,t)&&(e.elements.arrow=t))}const Hlr={name:"arrow",enabled:!0,phase:"main",fn:Rlr,effect:Mlr,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function k9(c){return c.split("-")[1]}var Olr={top:"auto",right:"auto",bottom:"auto",left:"auto"};function klr(c,e){var n=c.x,h=c.y,t=e.devicePixelRatio||1;return{x:H9(n*t)/t||0,y:H9(h*t)/t||0}}function sI(c){var e,n=c.popper,h=c.popperRect,t=c.placement,i=c.variation,s=c.offsets,o=c.position,u=c.gpuAcceleration,m=c.adaptive,_=c.roundOffsets,z=c.isFixed,C=s.x,A=C===void 0?0:C,E=s.y,N=E===void 0?0:E,y=typeof _=="function"?_({x:A,y:N}):{x:A,y:N};A=y.x,N=y.y;var M=s.hasOwnProperty("x"),j=s.hasOwnProperty("y"),I=go,H=Ao,G=window;if(m){var K=rA(n),T="clientHeight",q="clientWidth";if(K===n3(n)&&(K=Rm(n),Eu(K).position!=="static"&&o==="absolute"&&(T="scrollHeight",q="scrollWidth")),K=K,t===Ao||(t===go||t===r2)&&i===Yz){H=Q3;var P=z&&K===G&&G.visualViewport?G.visualViewport.height:K[T];N-=P-h.height,N*=u?1:-1}if(t===go||(t===Ao||t===Q3)&&i===Yz){I=r2;var V=z&&K===G&&G.visualViewport?G.visualViewport.width:K[q];A-=V-h.width,A*=u?1:-1}}var Q=Object.assign({position:o},m&&Olr),er=_===!0?klr({x:A,y:N},n3(n)):{x:A,y:N};if(A=er.x,N=er.y,u){var rr;return Object.assign({},Q,(rr={},rr[H]=j?"0":"",rr[I]=M?"0":"",rr.transform=(G.devicePixelRatio||1)<=1?"translate("+A+"px, "+N+"px)":"translate3d("+A+"px, "+N+"px, 0)",rr))}return Object.assign({},Q,(e={},e[H]=j?N+"px":"",e[I]=M?A+"px":"",e.transform="",e))}function Ilr(c){var e=c.state,n=c.options,h=n.gpuAcceleration,t=h===void 0?!0:h,i=n.adaptive,s=i===void 0?!0:i,o=n.roundOffsets,u=o===void 0?!0:o,m={placement:h5(e.placement),variation:k9(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:t,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,sI(Object.assign({},m,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:u})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,sI(Object.assign({},m,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const Wlr={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Ilr,data:{}};var nD={passive:!0};function qlr(c){var e=c.state,n=c.instance,h=c.options,t=h.scroll,i=t===void 0?!0:t,s=h.resize,o=s===void 0?!0:s,u=n3(e.elements.popper),m=[].concat(e.scrollParents.reference,e.scrollParents.popper);return i&&m.forEach(function(_){_.addEventListener("scroll",n.update,nD)}),o&&u.addEventListener("resize",n.update,nD),function(){i&&m.forEach(function(_){_.removeEventListener("scroll",n.update,nD)}),o&&u.removeEventListener("resize",n.update,nD)}}const Plr={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:qlr,data:{}};var $lr={left:"right",right:"left",bottom:"top",top:"bottom"};function cD(c){return c.replace(/left|right|bottom|top/g,function(e){return $lr[e]})}var Llr={start:"end",end:"start"};function aI(c){return c.replace(/start|end/g,function(e){return Llr[e]})}function GE(c){var e=n3(c),n=e.pageXOffset,h=e.pageYOffset;return{scrollLeft:n,scrollTop:h}}function VE(c){return O9(Rm(c)).left+GE(c).scrollLeft}function Xlr(c,e){var n=n3(c),h=Rm(c),t=n.visualViewport,i=h.clientWidth,s=h.clientHeight,o=0,u=0;if(t){i=t.width,s=t.height;var m=eI();(m||!m&&e==="fixed")&&(o=t.offsetLeft,u=t.offsetTop)}return{width:i,height:s,x:o+VE(c),y:u}}function jlr(c){var e,n=Rm(c),h=GE(c),t=(e=c.ownerDocument)==null?void 0:e.body,i=KU(n.scrollWidth,n.clientWidth,t?t.scrollWidth:0,t?t.clientWidth:0),s=KU(n.scrollHeight,n.clientHeight,t?t.scrollHeight:0,t?t.clientHeight:0),o=-h.scrollLeft+VE(c),u=-h.scrollTop;return Eu(t||n).direction==="rtl"&&(o+=KU(n.clientWidth,t?t.clientWidth:0)-i),{width:i,height:s,x:o,y:u}}function JE(c){var e=Eu(c),n=e.overflow,h=e.overflowX,t=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+t+h)}function oI(c){return["html","body","#document"].indexOf(c5(c))>=0?c.ownerDocument.body:e2(c)&&JE(c)?c:oI(eD(c))}function nA(c,e){var n;e===void 0&&(e=[]);var h=oI(c),t=h===((n=c.ownerDocument)==null?void 0:n.body),i=n3(h),s=t?[i].concat(i.visualViewport||[],JE(h)?h:[]):h,o=e.concat(s);return t?o:o.concat(nA(eD(s)))}function KE(c){return Object.assign({},c,{left:c.x,top:c.y,right:c.x+c.width,bottom:c.y+c.height})}function Glr(c,e){var n=O9(c,!1,e==="fixed");return n.top=n.top+c.clientTop,n.left=n.left+c.clientLeft,n.bottom=n.top+c.clientHeight,n.right=n.left+c.clientWidth,n.width=c.clientWidth,n.height=c.clientHeight,n.x=n.left,n.y=n.top,n}function lI(c,e,n){return e===Yk?KE(Xlr(c,n)):JU(e)?Glr(e,n):KE(jlr(Rm(c)))}function Vlr(c){var e=nA(eD(c)),n=["absolute","fixed"].indexOf(Eu(c).position)>=0,h=n&&e2(c)?rA(c):c;return JU(h)?e.filter(function(t){return JU(t)&&nI(t,h)&&c5(t)!=="body"}):[]}function Jlr(c,e,n,h){var t=e==="clippingParents"?Vlr(c):[].concat(e),i=[].concat(t,[n]),s=i[0],o=i.reduce(function(u,m){var _=lI(c,m,h);return u.top=KU(_.top,u.top),u.right=rD(_.right,u.right),u.bottom=rD(_.bottom,u.bottom),u.left=KU(_.left,u.left),u},lI(c,s,h));return o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}function uI(c){var e=c.reference,n=c.element,h=c.placement,t=h?h5(h):null,i=h?k9(h):null,s=e.x+e.width/2-n.width/2,o=e.y+e.height/2-n.height/2,u;switch(t){case Ao:u={x:s,y:e.y-n.height};break;case Q3:u={x:s,y:e.y+e.height};break;case r2:u={x:e.x+e.width,y:o};break;case go:u={x:e.x-n.width,y:o};break;default:u={x:e.x,y:e.y}}var m=t?jE(t):null;if(m!=null){var _=m==="y"?"height":"width";switch(i){case M9:u[m]=u[m]-(e[_]/2-n[_]/2);break;case Yz:u[m]=u[m]+(e[_]/2-n[_]/2);break}}return u}function cA(c,e){e===void 0&&(e={});var n=e,h=n.placement,t=h===void 0?c.placement:h,i=n.strategy,s=i===void 0?c.strategy:i,o=n.boundary,u=o===void 0?vlr:o,m=n.rootBoundary,_=m===void 0?Yk:m,z=n.elementContext,C=z===void 0?Qz:z,A=n.altBoundary,E=A===void 0?!1:A,N=n.padding,y=N===void 0?0:N,M=tI(typeof y!="number"?y:iI(y,Zz)),j=C===Qz?dlr:Qz,I=c.rects.popper,H=c.elements[E?j:C],G=Jlr(JU(H)?H:H.contextElement||Rm(c.elements.popper),u,_,s),K=O9(c.elements.reference),T=uI({reference:K,element:I,placement:t}),q=KE(Object.assign({},I,T)),P=C===Qz?q:K,V={top:G.top-P.top+M.top,bottom:P.bottom-G.bottom+M.bottom,left:G.left-P.left+M.left,right:P.right-G.right+M.right},Q=c.modifiersData.offset;if(C===Qz&&Q){var er=Q[t];Object.keys(V).forEach(function(rr){var Ur=[r2,Q3].indexOf(rr)>=0?1:-1,Sr=[Ao,Q3].indexOf(rr)>=0?"y":"x";V[rr]+=er[Sr]*Ur})}return V}function Klr(c,e){e===void 0&&(e={});var n=e,h=n.placement,t=n.boundary,i=n.rootBoundary,s=n.padding,o=n.flipVariations,u=n.allowedAutoPlacements,m=u===void 0?rI:u,_=k9(h),z=_?o?Qk:Qk.filter(function(E){return k9(E)===_}):Zz,C=z.filter(function(E){return m.indexOf(E)>=0});C.length===0&&(C=z);var A=C.reduce(function(E,N){return E[N]=cA(c,{placement:N,boundary:t,rootBoundary:i,padding:s})[h5(N)],E},{});return Object.keys(A).sort(function(E,N){return A[E]-A[N]})}function Zlr(c){if(h5(c)===PE)return[];var e=cD(c);return[aI(c),e,aI(e)]}function Ylr(c){var e=c.state,n=c.options,h=c.name;if(!e.modifiersData[h]._skip){for(var t=n.mainAxis,i=t===void 0?!0:t,s=n.altAxis,o=s===void 0?!0:s,u=n.fallbackPlacements,m=n.padding,_=n.boundary,z=n.rootBoundary,C=n.altBoundary,A=n.flipVariations,E=A===void 0?!0:A,N=n.allowedAutoPlacements,y=e.options.placement,M=h5(y),j=M===y,I=u||(j||!E?[cD(y)]:Zlr(y)),H=[y].concat(I).reduce(function(Er,Hr){return Er.concat(h5(Hr)===PE?Klr(e,{placement:Hr,boundary:_,rootBoundary:z,padding:m,flipVariations:E,allowedAutoPlacements:N}):Hr)},[]),G=e.rects.reference,K=e.rects.popper,T=new Map,q=!0,P=H[0],V=0;V<H.length;V++){var Q=H[V],er=h5(Q),rr=k9(Q)===M9,Ur=[Ao,Q3].indexOf(er)>=0,Sr=Ur?"width":"height",Ar=cA(e,{placement:Q,boundary:_,rootBoundary:z,altBoundary:C,padding:m}),mr=Ur?rr?r2:go:rr?Q3:Ao;G[Sr]>K[Sr]&&(mr=cD(mr));var ar=cD(mr),ur=[];if(i&&ur.push(Ar[er]<=0),o&&ur.push(Ar[mr]<=0,Ar[ar]<=0),ur.every(function(Er){return Er})){P=Q,q=!1;break}T.set(Q,ur)}if(q)for(var br=E?3:1,or=function(Hr){var Xr=H.find(function(he){var se=T.get(he);if(se)return se.slice(0,Hr).every(function(ee){return ee})});if(Xr)return P=Xr,"break"},nr=br;nr>0;nr--){var vr=or(nr);if(vr==="break")break}e.placement!==P&&(e.modifiersData[h]._skip=!0,e.placement=P,e.reset=!0)}}const Qlr={name:"flip",enabled:!0,phase:"main",fn:Ylr,requiresIfExists:["offset"],data:{_skip:!1}};function mI(c,e,n){return n===void 0&&(n={x:0,y:0}),{top:c.top-e.height-n.y,right:c.right-e.width+n.x,bottom:c.bottom-e.height+n.y,left:c.left-e.width-n.x}}function _I(c){return[Ao,r2,Q3,go].some(function(e){return c[e]>=0})}function r4r(c){var e=c.state,n=c.name,h=e.rects.reference,t=e.rects.popper,i=e.modifiersData.preventOverflow,s=cA(e,{elementContext:"reference"}),o=cA(e,{altBoundary:!0}),u=mI(s,h),m=mI(o,t,i),_=_I(u),z=_I(m);e.modifiersData[n]={referenceClippingOffsets:u,popperEscapeOffsets:m,isReferenceHidden:_,hasPopperEscaped:z},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":_,"data-popper-escaped":z})}const e4r={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:r4r};function n4r(c,e,n){var h=h5(c),t=[go,Ao].indexOf(h)>=0?-1:1,i=typeof n=="function"?n(Object.assign({},e,{placement:c})):n,s=i[0],o=i[1];return s=s||0,o=(o||0)*t,[go,r2].indexOf(h)>=0?{x:o,y:s}:{x:s,y:o}}function c4r(c){var e=c.state,n=c.options,h=c.name,t=n.offset,i=t===void 0?[0,0]:t,s=rI.reduce(function(_,z){return _[z]=n4r(z,e.rects,i),_},{}),o=s[e.placement],u=o.x,m=o.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=u,e.modifiersData.popperOffsets.y+=m),e.modifiersData[h]=s}const h4r={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:c4r};function t4r(c){var e=c.state,n=c.name;e.modifiersData[n]=uI({reference:e.rects.reference,element:e.rects.popper,placement:e.placement})}const i4r={name:"popperOffsets",enabled:!0,phase:"read",fn:t4r,data:{}};function s4r(c){return c==="x"?"y":"x"}function a4r(c){var e=c.state,n=c.options,h=c.name,t=n.mainAxis,i=t===void 0?!0:t,s=n.altAxis,o=s===void 0?!1:s,u=n.boundary,m=n.rootBoundary,_=n.altBoundary,z=n.padding,C=n.tether,A=C===void 0?!0:C,E=n.tetherOffset,N=E===void 0?0:E,y=cA(e,{boundary:u,rootBoundary:m,padding:z,altBoundary:_}),M=h5(e.placement),j=k9(e.placement),I=!j,H=jE(M),G=s4r(H),K=e.modifiersData.popperOffsets,T=e.rects.reference,q=e.rects.popper,P=typeof N=="function"?N(Object.assign({},e.rects,{placement:e.placement})):N,V=typeof P=="number"?{mainAxis:P,altAxis:P}:Object.assign({mainAxis:0,altAxis:0},P),Q=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,er={x:0,y:0};if(K){if(i){var rr,Ur=H==="y"?Ao:go,Sr=H==="y"?Q3:r2,Ar=H==="y"?"height":"width",mr=K[H],ar=mr+y[Ur],ur=mr-y[Sr],br=A?-q[Ar]/2:0,or=j===M9?T[Ar]:q[Ar],nr=j===M9?-q[Ar]:-T[Ar],vr=e.elements.arrow,Er=A&&vr?XE(vr):{width:0,height:0},Hr=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:hI(),Xr=Hr[Ur],he=Hr[Sr],se=eA(0,T[Ar],Er[Ar]),ee=I?T[Ar]/2-br-se-Xr-V.mainAxis:or-se-Xr-V.mainAxis,le=I?-T[Ar]/2+br+se+he+V.mainAxis:nr+se+he+V.mainAxis,ae=e.elements.arrow&&rA(e.elements.arrow),Le=ae?H==="y"?ae.clientTop||0:ae.clientLeft||0:0,Gr=(rr=Q==null?void 0:Q[H])!=null?rr:0,qr=mr+ee-Gr-Le,ce=mr+le-Gr,fe=eA(A?rD(ar,qr):ar,mr,A?KU(ur,ce):ur);K[H]=fe,er[H]=fe-mr}if(o){var je,h0=H==="x"?Ao:go,A0=H==="x"?Q3:r2,a0=K[G],B0=G==="y"?"height":"width",m0=a0+y[h0],f0=a0-y[A0],S0=[Ao,go].indexOf(M)!==-1,Ye=(je=Q==null?void 0:Q[G])!=null?je:0,q0=S0?m0:a0-T[B0]-q[B0]-Ye+V.altAxis,Z0=S0?a0+T[B0]+q[B0]-Ye-V.altAxis:f0,G0=A&&S0?Flr(q0,a0,Z0):eA(A?q0:m0,a0,A?Z0:f0);K[G]=G0,er[G]=G0-a0}e.modifiersData[h]=er}}const o4r={name:"preventOverflow",enabled:!0,phase:"main",fn:a4r,requiresIfExists:["offset"]};function l4r(c){return{scrollLeft:c.scrollLeft,scrollTop:c.scrollTop}}function u4r(c){return c===n3(c)||!e2(c)?GE(c):l4r(c)}function m4r(c){var e=c.getBoundingClientRect(),n=H9(e.width)/c.offsetWidth||1,h=H9(e.height)/c.offsetHeight||1;return n!==1||h!==1}function _4r(c,e,n){n===void 0&&(n=!1);var h=e2(e),t=e2(e)&&m4r(e),i=Rm(e),s=O9(c,t,n),o={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(h||!h&&!n)&&((c5(e)!=="body"||JE(i))&&(o=u4r(e)),e2(e)?(u=O9(e,!0),u.x+=e.clientLeft,u.y+=e.clientTop):i&&(u.x=VE(i))),{x:s.left+o.scrollLeft-u.x,y:s.top+o.scrollTop-u.y,width:s.width,height:s.height}}function U4r(c){var e=new Map,n=new Set,h=[];c.forEach(function(i){e.set(i.name,i)});function t(i){n.add(i.name);var s=[].concat(i.requires||[],i.requiresIfExists||[]);s.forEach(function(o){if(!n.has(o)){var u=e.get(o);u&&t(u)}}),h.push(i)}return c.forEach(function(i){n.has(i.name)||t(i)}),h}function v4r(c){var e=U4r(c);return blr.reduce(function(n,h){return n.concat(e.filter(function(t){return t.phase===h}))},[])}function d4r(c){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(c())})})),e}}function z4r(c){var e=c.reduce(function(n,h){var t=n[h.name];return n[h.name]=t?Object.assign({},t,h,{options:Object.assign({},t.options,h.options),data:Object.assign({},t.data,h.data)}):h,n},{});return Object.keys(e).map(function(n){return e[n]})}var UI={placement:"bottom",modifiers:[],strategy:"absolute"};function vI(){for(var c=arguments.length,e=new Array(c),n=0;n<c;n++)e[n]=arguments[n];return!e.some(function(h){return!(h&&typeof h.getBoundingClientRect=="function")})}function A4r(c){c===void 0&&(c={});var e=c,n=e.defaultModifiers,h=n===void 0?[]:n,t=e.defaultOptions,i=t===void 0?UI:t;return function(o,u,m){m===void 0&&(m=i);var _={placement:"bottom",orderedModifiers:[],options:Object.assign({},UI,i),modifiersData:{},elements:{reference:o,popper:u},attributes:{},styles:{}},z=[],C=!1,A={state:_,setOptions:function(M){var j=typeof M=="function"?M(_.options):M;N(),_.options=Object.assign({},i,_.options,j),_.scrollParents={reference:JU(o)?nA(o):o.contextElement?nA(o.contextElement):[],popper:nA(u)};var I=v4r(z4r([].concat(h,_.options.modifiers)));return _.orderedModifiers=I.filter(function(H){return H.enabled}),E(),A.update()},forceUpdate:function(){if(!C){var M=_.elements,j=M.reference,I=M.popper;if(vI(j,I)){_.rects={reference:_4r(j,rA(I),_.options.strategy==="fixed"),popper:XE(I)},_.reset=!1,_.placement=_.options.placement,_.orderedModifiers.forEach(function(V){return _.modifiersData[V.name]=Object.assign({},V.data)});for(var H=0;H<_.orderedModifiers.length;H++){if(_.reset===!0){_.reset=!1,H=-1;continue}var G=_.orderedModifiers[H],K=G.fn,T=G.options,q=T===void 0?{}:T,P=G.name;typeof K=="function"&&(_=K({state:_,options:q,name:P,instance:A})||_)}}}},update:d4r(function(){return new Promise(function(y){A.forceUpdate(),y(_)})}),destroy:function(){N(),C=!0}};if(!vI(o,u))return A;A.setOptions(m).then(function(y){!C&&m.onFirstUpdate&&m.onFirstUpdate(y)});function E(){_.orderedModifiers.forEach(function(y){var M=y.name,j=y.options,I=j===void 0?{}:j,H=y.effect;if(typeof H=="function"){var G=H({state:_,name:M,instance:A,options:I}),K=function(){};z.push(G||K)}})}function N(){z.forEach(function(y){return y()}),z=[]}return A}}var g4r=[Plr,i4r,Wlr,wlr,h4r,Qlr,o4r,Hlr,e4r],C4r=A4r({defaultModifiers:g4r}),f4r=typeof Element<"u",D4r=typeof Map=="function",B4r=typeof Set=="function",p4r=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function hD(c,e){if(c===e)return!0;if(c&&e&&typeof c=="object"&&typeof e=="object"){if(c.constructor!==e.constructor)return!1;var n,h,t;if(Array.isArray(c)){if(n=c.length,n!=e.length)return!1;for(h=n;h--!==0;)if(!hD(c[h],e[h]))return!1;return!0}var i;if(D4r&&c instanceof Map&&e instanceof Map){if(c.size!==e.size)return!1;for(i=c.entries();!(h=i.next()).done;)if(!e.has(h.value[0]))return!1;for(i=c.entries();!(h=i.next()).done;)if(!hD(h.value[1],e.get(h.value[0])))return!1;return!0}if(B4r&&c instanceof Set&&e instanceof Set){if(c.size!==e.size)return!1;for(i=c.entries();!(h=i.next()).done;)if(!e.has(h.value[0]))return!1;return!0}if(p4r&&ArrayBuffer.isView(c)&&ArrayBuffer.isView(e)){if(n=c.length,n!=e.length)return!1;for(h=n;h--!==0;)if(c[h]!==e[h])return!1;return!0}if(c.constructor===RegExp)return c.source===e.source&&c.flags===e.flags;if(c.valueOf!==Object.prototype.valueOf&&typeof c.valueOf=="function"&&typeof e.valueOf=="function")return c.valueOf()===e.valueOf();if(c.toString!==Object.prototype.toString&&typeof c.toString=="function"&&typeof e.toString=="function")return c.toString()===e.toString();if(t=Object.keys(c),n=t.length,n!==Object.keys(e).length)return!1;for(h=n;h--!==0;)if(!Object.prototype.hasOwnProperty.call(e,t[h]))return!1;if(f4r&&c instanceof Element)return!1;for(h=n;h--!==0;)if(!((t[h]==="_owner"||t[h]==="__v"||t[h]==="__o")&&c.$$typeof)&&!hD(c[t[h]],e[t[h]]))return!1;return!0}return c!==c&&e!==e}var S4r=function(e,n){try{return hD(e,n)}catch(h){if((h.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw h}};const b4r=Ai(S4r);var E4r=[],y4r=function(e,n,h){h===void 0&&(h={});var t=xe.useRef(null),i={onFirstUpdate:h.onFirstUpdate,placement:h.placement||"bottom",strategy:h.strategy||"absolute",modifiers:h.modifiers||E4r},s=xe.useState({styles:{popper:{position:i.strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),o=s[0],u=s[1],m=xe.useMemo(function(){return{name:"updateState",enabled:!0,phase:"write",fn:function(A){var E=A.state,N=Object.keys(E.elements);ssr.flushSync(function(){u({styles:Kk(N.map(function(y){return[y,E.styles[y]||{}]})),attributes:Kk(N.map(function(y){return[y,E.attributes[y]]}))})})},requires:["computeStyles"]}},[]),_=xe.useMemo(function(){var C={onFirstUpdate:i.onFirstUpdate,placement:i.placement,strategy:i.strategy,modifiers:[].concat(i.modifiers,[m,{name:"applyStyles",enabled:!1}])};return b4r(t.current,C)?t.current||C:(t.current=C,C)},[i.onFirstUpdate,i.placement,i.strategy,i.modifiers,m]),z=xe.useRef();return Zk(function(){z.current&&z.current.setOptions(_)},[_]),Zk(function(){if(!(e==null||n==null)){var C=h.createPopper||C4r,A=C(e,n,_);return z.current=A,function(){A.destroy(),z.current=null}}},[e,n,h.createPopper]),{state:z.current?z.current.state:null,styles:o.styles,attributes:o.attributes,update:z.current?z.current.update:null,forceUpdate:z.current?z.current.forceUpdate:null}},w4r=function(){},x4r=function(){return Promise.resolve(null)},N4r=[];function ia(c){var e=c.placement,n=e===void 0?"bottom":e,h=c.strategy,t=h===void 0?"absolute":h,i=c.modifiers,s=i===void 0?N4r:i,o=c.referenceElement,u=c.onFirstUpdate,m=c.innerRef,_=c.children,z=xe.useContext(jk),C=xe.useState(null),A=C[0],E=C[1],N=xe.useState(null),y=N[0],M=N[1];xe.useEffect(function(){qE(m,A)},[m,A]);var j=xe.useMemo(function(){return{placement:n,strategy:t,onFirstUpdate:u,modifiers:[].concat(s,[{name:"arrow",enabled:y!=null,options:{element:y}}])}},[n,t,u,s,y]),I=y4r(o||z,A,j),H=I.state,G=I.styles,K=I.forceUpdate,T=I.update,q=xe.useMemo(function(){return{ref:E,style:G.popper,placement:H?H.placement:n,hasPopperEscaped:H&&H.modifiersData.hide?H.modifiersData.hide.hasPopperEscaped:null,isReferenceHidden:H&&H.modifiersData.hide?H.modifiersData.hide.isReferenceHidden:null,arrowProps:{style:G.arrow,ref:M},forceUpdate:K||w4r,update:T||x4r}},[E,M,n,H,G,T,K]);return Vk(_)(q)}var F4r={},T4r=F4r.NODE_ENV!=="production",dI=function(){};if(T4r){var R4r=function(e,n){var h=arguments.length;n=new Array(h>1?h-1:0);for(var t=1;t<h;t++)n[t-1]=arguments[t];var i=0,s="Warning: "+e.replace(/%s/g,function(){return n[i++]});typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}};dI=function(c,e,n){var h=arguments.length;n=new Array(h>2?h-2:0);for(var t=2;t<h;t++)n[t-2]=arguments[t];if(e===void 0)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");c||R4r.apply(null,[e].concat(n))}}var zI=dI;const hA=Ai(zI);function sa(c){var e=c.children,n=c.innerRef,h=xe.useContext(Gk),t=xe.useCallback(function(i){qE(n,i),Jk(h,i)},[n,h]);return xe.useEffect(function(){return function(){return qE(n,null)}},[]),xe.useEffect(function(){hA(!!h,"`Reference` should not be used outside of a `Manager` component.")},[h]),Vk(e)({ref:t})}var n2={},tA={},M4r=typeof Ta=="object"&&Ta&&Ta.Object===Object&&Ta,AI=M4r,H4r=AI,O4r=typeof self=="object"&&self&&self.Object===Object&&self,k4r=H4r||O4r||Function("return this")(),t5=k4r,I4r=t5,W4r=I4r.Symbol,iA=W4r,gI=iA,CI=Object.prototype,q4r=CI.hasOwnProperty,P4r=CI.toString,sA=gI?gI.toStringTag:void 0;function $4r(c){var e=q4r.call(c,sA),n=c[sA];try{c[sA]=void 0;var h=!0}catch{}var t=P4r.call(c);return h&&(e?c[sA]=n:delete c[sA]),t}var L4r=$4r,X4r=Object.prototype,j4r=X4r.toString;function G4r(c){return j4r.call(c)}var V4r=G4r,fI=iA,J4r=L4r,K4r=V4r,Z4r="[object Null]",Y4r="[object Undefined]",DI=fI?fI.toStringTag:void 0;function Q4r(c){return c==null?c===void 0?Y4r:Z4r:DI&&DI in Object(c)?J4r(c):K4r(c)}var ZU=Q4r,r5r=Array.isArray,Tl=r5r;function e5r(c){return c!=null&&typeof c=="object"}var yu=e5r,n5r=ZU,c5r=Tl,h5r=yu,t5r="[object String]";function i5r(c){return typeof c=="string"||!c5r(c)&&h5r(c)&&n5r(c)==t5r}var s5r=i5r;function a5r(c){return function(e,n,h){for(var t=-1,i=Object(e),s=h(e),o=s.length;o--;){var u=s[c?o:++t];if(n(i[u],u,i)===!1)break}return e}}var o5r=a5r,l5r=o5r,u5r=l5r(),m5r=u5r;function _5r(c,e){for(var n=-1,h=Array(c);++n<c;)h[n]=e(n);return h}var U5r=_5r,v5r=ZU,d5r=yu,z5r="[object Arguments]";function A5r(c){return d5r(c)&&v5r(c)==z5r}var g5r=A5r,BI=g5r,C5r=yu,pI=Object.prototype,f5r=pI.hasOwnProperty,D5r=pI.propertyIsEnumerable,B5r=BI(function(){return arguments}())?BI:function(c){return C5r(c)&&f5r.call(c,"callee")&&!D5r.call(c,"callee")},SI=B5r,tD={exports:{}};function p5r(){return!1}var S5r=p5r;tD.exports,function(c,e){var n=t5,h=S5r,t=e&&!e.nodeType&&e,i=t&&!0&&c&&!c.nodeType&&c,s=i&&i.exports===t,o=s?n.Buffer:void 0,u=o?o.isBuffer:void 0,m=u||h;c.exports=m}(tD,tD.exports);var ZE=tD.exports,b5r=9007199254740991,E5r=/^(?:0|[1-9]\d*)$/;function y5r(c,e){var n=typeof c;return e=e??b5r,!!e&&(n=="number"||n!="symbol"&&E5r.test(c))&&c>-1&&c%1==0&&c<e}var bI=y5r,w5r=9007199254740991;function x5r(c){return typeof c=="number"&&c>-1&&c%1==0&&c<=w5r}var YE=x5r,N5r=ZU,F5r=YE,T5r=yu,R5r="[object Arguments]",M5r="[object Array]",H5r="[object Boolean]",O5r="[object Date]",k5r="[object Error]",I5r="[object Function]",W5r="[object Map]",q5r="[object Number]",P5r="[object Object]",$5r="[object RegExp]",L5r="[object Set]",X5r="[object String]",j5r="[object WeakMap]",G5r="[object ArrayBuffer]",V5r="[object DataView]",J5r="[object Float32Array]",K5r="[object Float64Array]",Z5r="[object Int8Array]",Y5r="[object Int16Array]",Q5r="[object Int32Array]",rur="[object Uint8Array]",eur="[object Uint8ClampedArray]",nur="[object Uint16Array]",cur="[object Uint32Array]",O1={};O1[J5r]=O1[K5r]=O1[Z5r]=O1[Y5r]=O1[Q5r]=O1[rur]=O1[eur]=O1[nur]=O1[cur]=!0,O1[R5r]=O1[M5r]=O1[G5r]=O1[H5r]=O1[V5r]=O1[O5r]=O1[k5r]=O1[I5r]=O1[W5r]=O1[q5r]=O1[P5r]=O1[$5r]=O1[L5r]=O1[X5r]=O1[j5r]=!1;function hur(c){return T5r(c)&&F5r(c.length)&&!!O1[N5r(c)]}var tur=hur;function iur(c){return function(e){return c(e)}}var QE=iur,iD={exports:{}};iD.exports,function(c,e){var n=AI,h=e&&!e.nodeType&&e,t=h&&!0&&c&&!c.nodeType&&c,i=t&&t.exports===h,s=i&&n.process,o=function(){try{var u=t&&t.require&&t.require("util").types;return u||s&&s.binding&&s.binding("util")}catch{}}();c.exports=o}(iD,iD.exports);var ry=iD.exports,sur=tur,aur=QE,EI=ry,yI=EI&&EI.isTypedArray,our=yI?aur(yI):sur,wI=our,lur=U5r,uur=SI,mur=Tl,_ur=ZE,Uur=bI,vur=wI,dur=Object.prototype,zur=dur.hasOwnProperty;function Aur(c,e){var n=mur(c),h=!n&&uur(c),t=!n&&!h&&_ur(c),i=!n&&!h&&!t&&vur(c),s=n||h||t||i,o=s?lur(c.length,String):[],u=o.length;for(var m in c)(e||zur.call(c,m))&&!(s&&(m=="length"||t&&(m=="offset"||m=="parent")||i&&(m=="buffer"||m=="byteLength"||m=="byteOffset")||Uur(m,u)))&&o.push(m);return o}var xI=Aur,gur=Object.prototype;function Cur(c){var e=c&&c.constructor,n=typeof e=="function"&&e.prototype||gur;return c===n}var ey=Cur;function fur(c,e){return function(n){return c(e(n))}}var NI=fur,Dur=NI,Bur=Dur(Object.keys,Object),pur=Bur,Sur=ey,bur=pur,Eur=Object.prototype,yur=Eur.hasOwnProperty;function wur(c){if(!Sur(c))return bur(c);var e=[];for(var n in Object(c))yur.call(c,n)&&n!="constructor"&&e.push(n);return e}var xur=wur;function Nur(c){var e=typeof c;return c!=null&&(e=="object"||e=="function")}var I9=Nur,Fur=ZU,Tur=I9,Rur="[object AsyncFunction]",Mur="[object Function]",Hur="[object GeneratorFunction]",Our="[object Proxy]";function kur(c){if(!Tur(c))return!1;var e=Fur(c);return e==Mur||e==Hur||e==Rur||e==Our}var FI=kur,Iur=FI,Wur=YE;function qur(c){return c!=null&&Wur(c.length)&&!Iur(c)}var sD=qur,Pur=xI,$ur=xur,Lur=sD;function Xur(c){return Lur(c)?Pur(c):$ur(c)}var aA=Xur,jur=m5r,Gur=aA;function Vur(c,e){return c&&jur(c,e,Gur)}var TI=Vur;function Jur(c){return c}var RI=Jur,Kur=RI;function Zur(c){return typeof c=="function"?c:Kur}var Yur=Zur,Qur=TI,r6r=Yur;function e6r(c,e){return c&&Qur(c,r6r(e))}var ny=e6r,n6r=NI,c6r=n6r(Object.getPrototypeOf,Object),cy=c6r,h6r=ZU,t6r=cy,i6r=yu,s6r="[object Object]",a6r=Function.prototype,o6r=Object.prototype,MI=a6r.toString,l6r=o6r.hasOwnProperty,u6r=MI.call(Object);function m6r(c){if(!i6r(c)||h6r(c)!=s6r)return!1;var e=t6r(c);if(e===null)return!0;var n=l6r.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&MI.call(n)==u6r}var _6r=m6r;function U6r(c,e){for(var n=-1,h=c==null?0:c.length,t=Array(h);++n<h;)t[n]=e(c[n],n,c);return t}var HI=U6r;function v6r(){this.__data__=[],this.size=0}var d6r=v6r;function z6r(c,e){return c===e||c!==c&&e!==e}var hy=z6r,A6r=hy;function g6r(c,e){for(var n=c.length;n--;)if(A6r(c[n][0],e))return n;return-1}var aD=g6r,C6r=aD,f6r=Array.prototype,D6r=f6r.splice;function B6r(c){var e=this.__data__,n=C6r(e,c);if(n<0)return!1;var h=e.length-1;return n==h?e.pop():D6r.call(e,n,1),--this.size,!0}var p6r=B6r,S6r=aD;function b6r(c){var e=this.__data__,n=S6r(e,c);return n<0?void 0:e[n][1]}var E6r=b6r,y6r=aD;function w6r(c){return y6r(this.__data__,c)>-1}var x6r=w6r,N6r=aD;function F6r(c,e){var n=this.__data__,h=N6r(n,c);return h<0?(++this.size,n.push([c,e])):n[h][1]=e,this}var T6r=F6r,R6r=d6r,M6r=p6r,H6r=E6r,O6r=x6r,k6r=T6r;function W9(c){var e=-1,n=c==null?0:c.length;for(this.clear();++e<n;){var h=c[e];this.set(h[0],h[1])}}W9.prototype.clear=R6r,W9.prototype.delete=M6r,W9.prototype.get=H6r,W9.prototype.has=O6r,W9.prototype.set=k6r;var oD=W9,I6r=oD;function W6r(){this.__data__=new I6r,this.size=0}var q6r=W6r;function P6r(c){var e=this.__data__,n=e.delete(c);return this.size=e.size,n}var $6r=P6r;function L6r(c){return this.__data__.get(c)}var X6r=L6r;function j6r(c){return this.__data__.has(c)}var G6r=j6r,V6r=t5,J6r=V6r["__core-js_shared__"],K6r=J6r,ty=K6r,OI=function(){var c=/[^.]+$/.exec(ty&&ty.keys&&ty.keys.IE_PROTO||"");return c?"Symbol(src)_1."+c:""}();function Z6r(c){return!!OI&&OI in c}var Y6r=Z6r,Q6r=Function.prototype,rmr=Q6r.toString;function emr(c){if(c!=null){try{return rmr.call(c)}catch{}try{return c+""}catch{}}return""}var kI=emr,nmr=FI,cmr=Y6r,hmr=I9,tmr=kI,imr=/[\\^$.*+?()[\]{}|]/g,smr=/^\[object .+?Constructor\]$/,amr=Function.prototype,omr=Object.prototype,lmr=amr.toString,umr=omr.hasOwnProperty,mmr=RegExp("^"+lmr.call(umr).replace(imr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function _mr(c){if(!hmr(c)||cmr(c))return!1;var e=nmr(c)?mmr:smr;return e.test(tmr(c))}var Umr=_mr;function vmr(c,e){return c==null?void 0:c[e]}var dmr=vmr,zmr=Umr,Amr=dmr;function gmr(c,e){var n=Amr(c,e);return zmr(n)?n:void 0}var YU=gmr,Cmr=YU,fmr=t5,Dmr=Cmr(fmr,"Map"),iy=Dmr,Bmr=YU,pmr=Bmr(Object,"create"),lD=pmr,II=lD;function Smr(){this.__data__=II?II(null):{},this.size=0}var bmr=Smr;function Emr(c){var e=this.has(c)&&delete this.__data__[c];return this.size-=e?1:0,e}var ymr=Emr,wmr=lD,xmr="__lodash_hash_undefined__",Nmr=Object.prototype,Fmr=Nmr.hasOwnProperty;function Tmr(c){var e=this.__data__;if(wmr){var n=e[c];return n===xmr?void 0:n}return Fmr.call(e,c)?e[c]:void 0}var Rmr=Tmr,Mmr=lD,Hmr=Object.prototype,Omr=Hmr.hasOwnProperty;function kmr(c){var e=this.__data__;return Mmr?e[c]!==void 0:Omr.call(e,c)}var Imr=kmr,Wmr=lD,qmr="__lodash_hash_undefined__";function Pmr(c,e){var n=this.__data__;return this.size+=this.has(c)?0:1,n[c]=Wmr&&e===void 0?qmr:e,this}var $mr=Pmr,Lmr=bmr,Xmr=ymr,jmr=Rmr,Gmr=Imr,Vmr=$mr;function q9(c){var e=-1,n=c==null?0:c.length;for(this.clear();++e<n;){var h=c[e];this.set(h[0],h[1])}}q9.prototype.clear=Lmr,q9.prototype.delete=Xmr,q9.prototype.get=jmr,q9.prototype.has=Gmr,q9.prototype.set=Vmr;var Jmr=q9,WI=Jmr,Kmr=oD,Zmr=iy;function Ymr(){this.size=0,this.__data__={hash:new WI,map:new(Zmr||Kmr),string:new WI}}var Qmr=Ymr;function r_r(c){var e=typeof c;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?c!=="__proto__":c===null}var e_r=r_r,n_r=e_r;function c_r(c,e){var n=c.__data__;return n_r(e)?n[typeof e=="string"?"string":"hash"]:n.map}var uD=c_r,h_r=uD;function t_r(c){var e=h_r(this,c).delete(c);return this.size-=e?1:0,e}var i_r=t_r,s_r=uD;function a_r(c){return s_r(this,c).get(c)}var o_r=a_r,l_r=uD;function u_r(c){return l_r(this,c).has(c)}var m_r=u_r,__r=uD;function U_r(c,e){var n=__r(this,c),h=n.size;return n.set(c,e),this.size+=n.size==h?0:1,this}var v_r=U_r,d_r=Qmr,z_r=i_r,A_r=o_r,g_r=m_r,C_r=v_r;function P9(c){var e=-1,n=c==null?0:c.length;for(this.clear();++e<n;){var h=c[e];this.set(h[0],h[1])}}P9.prototype.clear=d_r,P9.prototype.delete=z_r,P9.prototype.get=A_r,P9.prototype.has=g_r,P9.prototype.set=C_r;var sy=P9,f_r=oD,D_r=iy,B_r=sy,p_r=200;function S_r(c,e){var n=this.__data__;if(n instanceof f_r){var h=n.__data__;if(!D_r||h.length<p_r-1)return h.push([c,e]),this.size=++n.size,this;n=this.__data__=new B_r(h)}return n.set(c,e),this.size=n.size,this}var b_r=S_r,E_r=oD,y_r=q6r,w_r=$6r,x_r=X6r,N_r=G6r,F_r=b_r;function $9(c){var e=this.__data__=new E_r(c);this.size=e.size}$9.prototype.clear=y_r,$9.prototype.delete=w_r,$9.prototype.get=x_r,$9.prototype.has=N_r,$9.prototype.set=F_r;var ay=$9,T_r="__lodash_hash_undefined__";function R_r(c){return this.__data__.set(c,T_r),this}var M_r=R_r;function H_r(c){return this.__data__.has(c)}var O_r=H_r,k_r=sy,I_r=M_r,W_r=O_r;function mD(c){var e=-1,n=c==null?0:c.length;for(this.__data__=new k_r;++e<n;)this.add(c[e])}mD.prototype.add=mD.prototype.push=I_r,mD.prototype.has=W_r;var q_r=mD;function P_r(c,e){for(var n=-1,h=c==null?0:c.length;++n<h;)if(e(c[n],n,c))return!0;return!1}var $_r=P_r;function L_r(c,e){return c.has(e)}var X_r=L_r,j_r=q_r,G_r=$_r,V_r=X_r,J_r=1,K_r=2;function Z_r(c,e,n,h,t,i){var s=n&J_r,o=c.length,u=e.length;if(o!=u&&!(s&&u>o))return!1;var m=i.get(c),_=i.get(e);if(m&&_)return m==e&&_==c;var z=-1,C=!0,A=n&K_r?new j_r:void 0;for(i.set(c,e),i.set(e,c);++z<o;){var E=c[z],N=e[z];if(h)var y=s?h(N,E,z,e,c,i):h(E,N,z,c,e,i);if(y!==void 0){if(y)continue;C=!1;break}if(A){if(!G_r(e,function(M,j){if(!V_r(A,j)&&(E===M||t(E,M,n,h,i)))return A.push(j)})){C=!1;break}}else if(!(E===N||t(E,N,n,h,i))){C=!1;break}}return i.delete(c),i.delete(e),C}var qI=Z_r,Y_r=t5,Q_r=Y_r.Uint8Array,PI=Q_r;function rUr(c){var e=-1,n=Array(c.size);return c.forEach(function(h,t){n[++e]=[t,h]}),n}var eUr=rUr;function nUr(c){var e=-1,n=Array(c.size);return c.forEach(function(h){n[++e]=h}),n}var cUr=nUr,$I=iA,LI=PI,hUr=hy,tUr=qI,iUr=eUr,sUr=cUr,aUr=1,oUr=2,lUr="[object Boolean]",uUr="[object Date]",mUr="[object Error]",_Ur="[object Map]",UUr="[object Number]",vUr="[object RegExp]",dUr="[object Set]",zUr="[object String]",AUr="[object Symbol]",gUr="[object ArrayBuffer]",CUr="[object DataView]",XI=$I?$I.prototype:void 0,oy=XI?XI.valueOf:void 0;function fUr(c,e,n,h,t,i,s){switch(n){case CUr:if(c.byteLength!=e.byteLength||c.byteOffset!=e.byteOffset)return!1;c=c.buffer,e=e.buffer;case gUr:return!(c.byteLength!=e.byteLength||!i(new LI(c),new LI(e)));case lUr:case uUr:case UUr:return hUr(+c,+e);case mUr:return c.name==e.name&&c.message==e.message;case vUr:case zUr:return c==e+"";case _Ur:var o=iUr;case dUr:var u=h&aUr;if(o||(o=sUr),c.size!=e.size&&!u)return!1;var m=s.get(c);if(m)return m==e;h|=oUr,s.set(c,e);var _=tUr(o(c),o(e),h,t,i,s);return s.delete(c),_;case AUr:if(oy)return oy.call(c)==oy.call(e)}return!1}var DUr=fUr;function BUr(c,e){for(var n=-1,h=e.length,t=c.length;++n<h;)c[t+n]=e[n];return c}var jI=BUr,pUr=jI,SUr=Tl;function bUr(c,e,n){var h=e(c);return SUr(c)?h:pUr(h,n(c))}var GI=bUr;function EUr(c,e){for(var n=-1,h=c==null?0:c.length,t=0,i=[];++n<h;){var s=c[n];e(s,n,c)&&(i[t++]=s)}return i}var yUr=EUr;function wUr(){return[]}var VI=wUr,xUr=yUr,NUr=VI,FUr=Object.prototype,TUr=FUr.propertyIsEnumerable,JI=Object.getOwnPropertySymbols,RUr=JI?function(c){return c==null?[]:(c=Object(c),xUr(JI(c),function(e){return TUr.call(c,e)}))}:NUr,ly=RUr,MUr=GI,HUr=ly,OUr=aA;function kUr(c){return MUr(c,OUr,HUr)}var KI=kUr,ZI=KI,IUr=1,WUr=Object.prototype,qUr=WUr.hasOwnProperty;function PUr(c,e,n,h,t,i){var s=n&IUr,o=ZI(c),u=o.length,m=ZI(e),_=m.length;if(u!=_&&!s)return!1;for(var z=u;z--;){var C=o[z];if(!(s?C in e:qUr.call(e,C)))return!1}var A=i.get(c),E=i.get(e);if(A&&E)return A==e&&E==c;var N=!0;i.set(c,e),i.set(e,c);for(var y=s;++z<u;){C=o[z];var M=c[C],j=e[C];if(h)var I=s?h(j,M,C,e,c,i):h(M,j,C,c,e,i);if(!(I===void 0?M===j||t(M,j,n,h,i):I)){N=!1;break}y||(y=C=="constructor")}if(N&&!y){var H=c.constructor,G=e.constructor;H!=G&&"constructor"in c&&"constructor"in e&&!(typeof H=="function"&&H instanceof H&&typeof G=="function"&&G instanceof G)&&(N=!1)}return i.delete(c),i.delete(e),N}var $Ur=PUr,LUr=YU,XUr=t5,jUr=LUr(XUr,"DataView"),GUr=jUr,VUr=YU,JUr=t5,KUr=VUr(JUr,"Promise"),ZUr=KUr,YUr=YU,QUr=t5,rvr=YUr(QUr,"Set"),evr=rvr,nvr=YU,cvr=t5,hvr=nvr(cvr,"WeakMap"),tvr=hvr,uy=GUr,my=iy,_y=ZUr,Uy=evr,vy=tvr,YI=ZU,L9=kI,QI="[object Map]",ivr="[object Object]",rW="[object Promise]",eW="[object Set]",nW="[object WeakMap]",cW="[object DataView]",svr=L9(uy),avr=L9(my),ovr=L9(_y),lvr=L9(Uy),uvr=L9(vy),QU=YI;(uy&&QU(new uy(new ArrayBuffer(1)))!=cW||my&&QU(new my)!=QI||_y&&QU(_y.resolve())!=rW||Uy&&QU(new Uy)!=eW||vy&&QU(new vy)!=nW)&&(QU=function(c){var e=YI(c),n=e==ivr?c.constructor:void 0,h=n?L9(n):"";if(h)switch(h){case svr:return cW;case avr:return QI;case ovr:return rW;case lvr:return eW;case uvr:return nW}return e});var _D=QU,dy=ay,mvr=qI,_vr=DUr,Uvr=$Ur,hW=_D,tW=Tl,iW=ZE,vvr=wI,dvr=1,sW="[object Arguments]",aW="[object Array]",UD="[object Object]",zvr=Object.prototype,oW=zvr.hasOwnProperty;function Avr(c,e,n,h,t,i){var s=tW(c),o=tW(e),u=s?aW:hW(c),m=o?aW:hW(e);u=u==sW?UD:u,m=m==sW?UD:m;var _=u==UD,z=m==UD,C=u==m;if(C&&iW(c)){if(!iW(e))return!1;s=!0,_=!1}if(C&&!_)return i||(i=new dy),s||vvr(c)?mvr(c,e,n,h,t,i):_vr(c,e,u,n,h,t,i);if(!(n&dvr)){var A=_&&oW.call(c,"__wrapped__"),E=z&&oW.call(e,"__wrapped__");if(A||E){var N=A?c.value():c,y=E?e.value():e;return i||(i=new dy),t(N,y,n,h,i)}}return C?(i||(i=new dy),Uvr(c,e,n,h,t,i)):!1}var gvr=Avr,Cvr=gvr,lW=yu;function uW(c,e,n,h,t){return c===e?!0:c==null||e==null||!lW(c)&&!lW(e)?c!==c&&e!==e:Cvr(c,e,n,h,uW,t)}var mW=uW,fvr=ay,Dvr=mW,Bvr=1,pvr=2;function Svr(c,e,n,h){var t=n.length,i=t,s=!h;if(c==null)return!i;for(c=Object(c);t--;){var o=n[t];if(s&&o[2]?o[1]!==c[o[0]]:!(o[0]in c))return!1}for(;++t<i;){o=n[t];var u=o[0],m=c[u],_=o[1];if(s&&o[2]){if(m===void 0&&!(u in c))return!1}else{var z=new fvr;if(h)var C=h(m,_,u,c,e,z);if(!(C===void 0?Dvr(_,m,Bvr|pvr,h,z):C))return!1}}return!0}var bvr=Svr,Evr=I9;function yvr(c){return c===c&&!Evr(c)}var _W=yvr,wvr=_W,xvr=aA;function Nvr(c){for(var e=xvr(c),n=e.length;n--;){var h=e[n],t=c[h];e[n]=[h,t,wvr(t)]}return e}var Fvr=Nvr;function Tvr(c,e){return function(n){return n==null?!1:n[c]===e&&(e!==void 0||c in Object(n))}}var UW=Tvr,Rvr=bvr,Mvr=Fvr,Hvr=UW;function Ovr(c){var e=Mvr(c);return e.length==1&&e[0][2]?Hvr(e[0][0],e[0][1]):function(n){return n===c||Rvr(n,c,e)}}var kvr=Ovr,Ivr=ZU,Wvr=yu,qvr="[object Symbol]";function Pvr(c){return typeof c=="symbol"||Wvr(c)&&Ivr(c)==qvr}var zy=Pvr,$vr=Tl,Lvr=zy,Xvr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,jvr=/^\w*$/;function Gvr(c,e){if($vr(c))return!1;var n=typeof c;return n=="number"||n=="symbol"||n=="boolean"||c==null||Lvr(c)?!0:jvr.test(c)||!Xvr.test(c)||e!=null&&c in Object(e)}var Ay=Gvr,vW=sy,Vvr="Expected a function";function gy(c,e){if(typeof c!="function"||e!=null&&typeof e!="function")throw new TypeError(Vvr);var n=function(){var h=arguments,t=e?e.apply(this,h):h[0],i=n.cache;if(i.has(t))return i.get(t);var s=c.apply(this,h);return n.cache=i.set(t,s)||i,s};return n.cache=new(gy.Cache||vW),n}gy.Cache=vW;var Jvr=gy,Kvr=Jvr,Zvr=500;function Yvr(c){var e=Kvr(c,function(h){return n.size===Zvr&&n.clear(),h}),n=e.cache;return e}var Qvr=Yvr,rdr=Qvr,edr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ndr=/\\(\\)?/g,cdr=rdr(function(c){var e=[];return c.charCodeAt(0)===46&&e.push(""),c.replace(edr,function(n,h,t,i){e.push(t?i.replace(ndr,"$1"):h||n)}),e}),hdr=cdr,dW=iA,tdr=HI,idr=Tl,sdr=zy,zW=dW?dW.prototype:void 0,AW=zW?zW.toString:void 0;function gW(c){if(typeof c=="string")return c;if(idr(c))return tdr(c,gW)+"";if(sdr(c))return AW?AW.call(c):"";var e=c+"";return e=="0"&&1/c==-1/0?"-0":e}var adr=gW,odr=adr;function ldr(c){return c==null?"":odr(c)}var udr=ldr,mdr=Tl,_dr=Ay,Udr=hdr,vdr=udr;function ddr(c,e){return mdr(c)?c:_dr(c,e)?[c]:Udr(vdr(c))}var CW=ddr,zdr=zy;function Adr(c){if(typeof c=="string"||zdr(c))return c;var e=c+"";return e=="0"&&1/c==-1/0?"-0":e}var vD=Adr,gdr=CW,Cdr=vD;function fdr(c,e){e=gdr(e,c);for(var n=0,h=e.length;c!=null&&n<h;)c=c[Cdr(e[n++])];return n&&n==h?c:void 0}var fW=fdr,Ddr=fW;function Bdr(c,e,n){var h=c==null?void 0:Ddr(c,e);return h===void 0?n:h}var pdr=Bdr;function Sdr(c,e){return c!=null&&e in Object(c)}var bdr=Sdr,Edr=CW,ydr=SI,wdr=Tl,xdr=bI,Ndr=YE,Fdr=vD;function Tdr(c,e,n){e=Edr(e,c);for(var h=-1,t=e.length,i=!1;++h<t;){var s=Fdr(e[h]);if(!(i=c!=null&&n(c,s)))break;c=c[s]}return i||++h!=t?i:(t=c==null?0:c.length,!!t&&Ndr(t)&&xdr(s,t)&&(wdr(c)||ydr(c)))}var Rdr=Tdr,Mdr=bdr,Hdr=Rdr;function Odr(c,e){return c!=null&&Hdr(c,e,Mdr)}var kdr=Odr,Idr=mW,Wdr=pdr,qdr=kdr,Pdr=Ay,$dr=_W,Ldr=UW,Xdr=vD,jdr=1,Gdr=2;function Vdr(c,e){return Pdr(c)&&$dr(e)?Ldr(Xdr(c),e):function(n){var h=Wdr(n,c);return h===void 0&&h===e?qdr(n,c):Idr(e,h,jdr|Gdr)}}var Jdr=Vdr;function Kdr(c){return function(e){return e==null?void 0:e[c]}}var Zdr=Kdr,Ydr=fW;function Qdr(c){return function(e){return Ydr(e,c)}}var r9r=Qdr,e9r=Zdr,n9r=r9r,c9r=Ay,h9r=vD;function t9r(c){return c9r(c)?e9r(h9r(c)):n9r(c)}var i9r=t9r,s9r=kvr,a9r=Jdr,o9r=RI,l9r=Tl,u9r=i9r;function m9r(c){return typeof c=="function"?c:c==null?o9r:typeof c=="object"?l9r(c)?a9r(c[0],c[1]):s9r(c):u9r(c)}var _9r=m9r,U9r=sD;function v9r(c,e){return function(n,h){if(n==null)return n;if(!U9r(n))return c(n,h);for(var t=n.length,i=e?t:-1,s=Object(n);(e?i--:++i<t)&&h(s[i],i,s)!==!1;);return n}}var d9r=v9r,z9r=TI,A9r=d9r,g9r=A9r(z9r),C9r=g9r,f9r=C9r,D9r=sD;function B9r(c,e){var n=-1,h=D9r(c)?Array(c.length):[];return f9r(c,function(t,i,s){h[++n]=e(t,i,s)}),h}var p9r=B9r,S9r=HI,b9r=_9r,E9r=p9r,y9r=Tl;function w9r(c,e){var n=y9r(c)?S9r:E9r;return n(c,b9r(e))}var x9r=w9r;Object.defineProperty(tA,"__esModule",{value:!0}),tA.flattenNames=void 0;var N9r=s5r,F9r=dD(N9r),T9r=ny,R9r=dD(T9r),M9r=_6r,H9r=dD(M9r),O9r=x9r,k9r=dD(O9r);function dD(c){return c&&c.__esModule?c:{default:c}}var I9r=tA.flattenNames=function c(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=[];return(0,k9r.default)(e,function(h){Array.isArray(h)?c(h).map(function(t){return n.push(t)}):(0,H9r.default)(h)?(0,R9r.default)(h,function(t,i){t===!0&&n.push(i),n.push(i+"-"+t)}):(0,F9r.default)(h)&&n.push(h)}),n};tA.default=I9r;var oA={};function W9r(c,e){for(var n=-1,h=c==null?0:c.length;++n<h&&e(c[n],n,c)!==!1;);return c}var q9r=W9r,P9r=YU,$9r=function(){try{var c=P9r(Object,"defineProperty");return c({},"",{}),c}catch{}}(),L9r=$9r,DW=L9r;function X9r(c,e,n){e=="__proto__"&&DW?DW(c,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):c[e]=n}var BW=X9r,j9r=BW,G9r=hy,V9r=Object.prototype,J9r=V9r.hasOwnProperty;function K9r(c,e,n){var h=c[e];(!(J9r.call(c,e)&&G9r(h,n))||n===void 0&&!(e in c))&&j9r(c,e,n)}var pW=K9r,Z9r=pW,Y9r=BW;function Q9r(c,e,n,h){var t=!n;n||(n={});for(var i=-1,s=e.length;++i<s;){var o=e[i],u=h?h(n[o],c[o],o,n,c):void 0;u===void 0&&(u=c[o]),t?Y9r(n,o,u):Z9r(n,o,u)}return n}var zD=Q9r,r7r=zD,e7r=aA;function n7r(c,e){return c&&r7r(e,e7r(e),c)}var c7r=n7r;function h7r(c){var e=[];if(c!=null)for(var n in Object(c))e.push(n);return e}var t7r=h7r,i7r=I9,s7r=ey,a7r=t7r,o7r=Object.prototype,l7r=o7r.hasOwnProperty;function u7r(c){if(!i7r(c))return a7r(c);var e=s7r(c),n=[];for(var h in c)h=="constructor"&&(e||!l7r.call(c,h))||n.push(h);return n}var m7r=u7r,_7r=xI,U7r=m7r,v7r=sD;function d7r(c){return v7r(c)?_7r(c,!0):U7r(c)}var Cy=d7r,z7r=zD,A7r=Cy;function g7r(c,e){return c&&z7r(e,A7r(e),c)}var C7r=g7r,AD={exports:{}};AD.exports,function(c,e){var n=t5,h=e&&!e.nodeType&&e,t=h&&!0&&c&&!c.nodeType&&c,i=t&&t.exports===h,s=i?n.Buffer:void 0,o=s?s.allocUnsafe:void 0;function u(m,_){if(_)return m.slice();var z=m.length,C=o?o(z):new m.constructor(z);return m.copy(C),C}c.exports=u}(AD,AD.exports);var f7r=AD.exports;function D7r(c,e){var n=-1,h=c.length;for(e||(e=Array(h));++n<h;)e[n]=c[n];return e}var B7r=D7r,p7r=zD,S7r=ly;function b7r(c,e){return p7r(c,S7r(c),e)}var E7r=b7r,y7r=jI,w7r=cy,x7r=ly,N7r=VI,F7r=Object.getOwnPropertySymbols,T7r=F7r?function(c){for(var e=[];c;)y7r(e,x7r(c)),c=w7r(c);return e}:N7r,SW=T7r,R7r=zD,M7r=SW;function H7r(c,e){return R7r(c,M7r(c),e)}var O7r=H7r,k7r=GI,I7r=SW,W7r=Cy;function q7r(c){return k7r(c,W7r,I7r)}var P7r=q7r,$7r=Object.prototype,L7r=$7r.hasOwnProperty;function X7r(c){var e=c.length,n=new c.constructor(e);return e&&typeof c[0]=="string"&&L7r.call(c,"index")&&(n.index=c.index,n.input=c.input),n}var j7r=X7r,bW=PI;function G7r(c){var e=new c.constructor(c.byteLength);return new bW(e).set(new bW(c)),e}var fy=G7r,V7r=fy;function J7r(c,e){var n=e?V7r(c.buffer):c.buffer;return new c.constructor(n,c.byteOffset,c.byteLength)}var K7r=J7r,Z7r=/\w*$/;function Y7r(c){var e=new c.constructor(c.source,Z7r.exec(c));return e.lastIndex=c.lastIndex,e}var Q7r=Y7r,EW=iA,yW=EW?EW.prototype:void 0,wW=yW?yW.valueOf:void 0;function r8r(c){return wW?Object(wW.call(c)):{}}var e8r=r8r,n8r=fy;function c8r(c,e){var n=e?n8r(c.buffer):c.buffer;return new c.constructor(n,c.byteOffset,c.length)}var h8r=c8r,t8r=fy,i8r=K7r,s8r=Q7r,a8r=e8r,o8r=h8r,l8r="[object Boolean]",u8r="[object Date]",m8r="[object Map]",_8r="[object Number]",U8r="[object RegExp]",v8r="[object Set]",d8r="[object String]",z8r="[object Symbol]",A8r="[object ArrayBuffer]",g8r="[object DataView]",C8r="[object Float32Array]",f8r="[object Float64Array]",D8r="[object Int8Array]",B8r="[object Int16Array]",p8r="[object Int32Array]",S8r="[object Uint8Array]",b8r="[object Uint8ClampedArray]",E8r="[object Uint16Array]",y8r="[object Uint32Array]";function w8r(c,e,n){var h=c.constructor;switch(e){case A8r:return t8r(c);case l8r:case u8r:return new h(+c);case g8r:return i8r(c,n);case C8r:case f8r:case D8r:case B8r:case p8r:case S8r:case b8r:case E8r:case y8r:return o8r(c,n);case m8r:return new h;case _8r:case d8r:return new h(c);case U8r:return s8r(c);case v8r:return new h;case z8r:return a8r(c)}}var x8r=w8r,N8r=I9,xW=Object.create,F8r=function(){function c(){}return function(e){if(!N8r(e))return{};if(xW)return xW(e);c.prototype=e;var n=new c;return c.prototype=void 0,n}}(),T8r=F8r,R8r=T8r,M8r=cy,H8r=ey;function O8r(c){return typeof c.constructor=="function"&&!H8r(c)?R8r(M8r(c)):{}}var k8r=O8r,I8r=_D,W8r=yu,q8r="[object Map]";function P8r(c){return W8r(c)&&I8r(c)==q8r}var $8r=P8r,L8r=$8r,X8r=QE,NW=ry,FW=NW&&NW.isMap,j8r=FW?X8r(FW):L8r,G8r=j8r,V8r=_D,J8r=yu,K8r="[object Set]";function Z8r(c){return J8r(c)&&V8r(c)==K8r}var Y8r=Z8r,Q8r=Y8r,rzr=QE,TW=ry,RW=TW&&TW.isSet,ezr=RW?rzr(RW):Q8r,nzr=ezr,czr=ay,hzr=q9r,tzr=pW,izr=c7r,szr=C7r,azr=f7r,ozr=B7r,lzr=E7r,uzr=O7r,mzr=KI,_zr=P7r,Uzr=_D,vzr=j7r,dzr=x8r,zzr=k8r,Azr=Tl,gzr=ZE,Czr=G8r,fzr=I9,Dzr=nzr,Bzr=aA,pzr=Cy,Szr=1,bzr=2,Ezr=4,MW="[object Arguments]",yzr="[object Array]",wzr="[object Boolean]",xzr="[object Date]",Nzr="[object Error]",HW="[object Function]",Fzr="[object GeneratorFunction]",Tzr="[object Map]",Rzr="[object Number]",OW="[object Object]",Mzr="[object RegExp]",Hzr="[object Set]",Ozr="[object String]",kzr="[object Symbol]",Izr="[object WeakMap]",Wzr="[object ArrayBuffer]",qzr="[object DataView]",Pzr="[object Float32Array]",$zr="[object Float64Array]",Lzr="[object Int8Array]",Xzr="[object Int16Array]",jzr="[object Int32Array]",Gzr="[object Uint8Array]",Vzr="[object Uint8ClampedArray]",Jzr="[object Uint16Array]",Kzr="[object Uint32Array]",D1={};D1[MW]=D1[yzr]=D1[Wzr]=D1[qzr]=D1[wzr]=D1[xzr]=D1[Pzr]=D1[$zr]=D1[Lzr]=D1[Xzr]=D1[jzr]=D1[Tzr]=D1[Rzr]=D1[OW]=D1[Mzr]=D1[Hzr]=D1[Ozr]=D1[kzr]=D1[Gzr]=D1[Vzr]=D1[Jzr]=D1[Kzr]=!0,D1[Nzr]=D1[HW]=D1[Izr]=!1;function gD(c,e,n,h,t,i){var s,o=e&Szr,u=e&bzr,m=e&Ezr;if(n&&(s=t?n(c,h,t,i):n(c)),s!==void 0)return s;if(!fzr(c))return c;var _=Azr(c);if(_){if(s=vzr(c),!o)return ozr(c,s)}else{var z=Uzr(c),C=z==HW||z==Fzr;if(gzr(c))return azr(c,o);if(z==OW||z==MW||C&&!t){if(s=u||C?{}:zzr(c),!o)return u?uzr(c,szr(s,c)):lzr(c,izr(s,c))}else{if(!D1[z])return t?c:{};s=dzr(c,z,o)}}i||(i=new czr);var A=i.get(c);if(A)return A;i.set(c,s),Dzr(c)?c.forEach(function(y){s.add(gD(y,e,n,y,c,i))}):Czr(c)&&c.forEach(function(y,M){s.set(M,gD(y,e,n,M,c,i))});var E=m?u?_zr:mzr:u?pzr:Bzr,N=_?void 0:E(c);return hzr(N||c,function(y,M){N&&(M=y,y=c[M]),tzr(s,M,gD(y,e,n,M,c,i))}),s}var Zzr=gD,Yzr=Zzr,Qzr=1,rAr=4;function eAr(c){return Yzr(c,Qzr|rAr)}var nAr=eAr;Object.defineProperty(oA,"__esModule",{value:!0}),oA.mergeClasses=void 0;var cAr=ny,hAr=kW(cAr),tAr=nAr,iAr=kW(tAr),sAr=Object.assign||function(c){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var h in n)Object.prototype.hasOwnProperty.call(n,h)&&(c[h]=n[h])}return c};function kW(c){return c&&c.__esModule?c:{default:c}}var aAr=oA.mergeClasses=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],h=e.default&&(0,iAr.default)(e.default)||{};return n.map(function(t){var i=e[t];return i&&(0,hAr.default)(i,function(s,o){h[o]||(h[o]={}),h[o]=sAr({},h[o],i[o])}),t}),h};oA.default=aAr;var lA={};Object.defineProperty(lA,"__esModule",{value:!0}),lA.autoprefix=void 0;var oAr=ny,IW=uAr(oAr),lAr=Object.assign||function(c){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var h in n)Object.prototype.hasOwnProperty.call(n,h)&&(c[h]=n[h])}return c};function uAr(c){return c&&c.__esModule?c:{default:c}}var mAr={borderRadius:function(e){return{msBorderRadius:e,MozBorderRadius:e,OBorderRadius:e,WebkitBorderRadius:e,borderRadius:e}},boxShadow:function(e){return{msBoxShadow:e,MozBoxShadow:e,OBoxShadow:e,WebkitBoxShadow:e,boxShadow:e}},userSelect:function(e){return{WebkitTouchCallout:e,KhtmlUserSelect:e,MozUserSelect:e,msUserSelect:e,WebkitUserSelect:e,userSelect:e}},flex:function(e){return{WebkitBoxFlex:e,MozBoxFlex:e,WebkitFlex:e,msFlex:e,flex:e}},flexBasis:function(e){return{WebkitFlexBasis:e,flexBasis:e}},justifyContent:function(e){return{WebkitJustifyContent:e,justifyContent:e}},transition:function(e){return{msTransition:e,MozTransition:e,OTransition:e,WebkitTransition:e,transition:e}},transform:function(e){return{msTransform:e,MozTransform:e,OTransform:e,WebkitTransform:e,transform:e}},absolute:function(e){var n=e&&e.split(" ");return{position:"absolute",top:n&&n[0],right:n&&n[1],bottom:n&&n[2],left:n&&n[3]}},extend:function(e,n){var h=n[e];return h||{extend:e}}},_Ar=lA.autoprefix=function(e){var n={};return(0,IW.default)(e,function(h,t){var i={};(0,IW.default)(h,function(s,o){var u=mAr[o];u?i=lAr({},i,u(s)):i[o]=s}),n[t]=i}),n};lA.default=_Ar;var uA={};Object.defineProperty(uA,"__esModule",{value:!0}),uA.hover=void 0;var UAr=Object.assign||function(c){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var h in n)Object.prototype.hasOwnProperty.call(n,h)&&(c[h]=n[h])}return c},vAr=Z,Dy=dAr(vAr);function dAr(c){return c&&c.__esModule?c:{default:c}}function zAr(c,e){if(!(c instanceof e))throw new TypeError("Cannot call a class as a function")}function WW(c,e){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:c}function AAr(c,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);c.prototype=Object.create(e&&e.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(c,e):c.__proto__=e)}var gAr=uA.hover=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(h){AAr(t,h);function t(){var i,s,o,u;zAr(this,t);for(var m=arguments.length,_=Array(m),z=0;z<m;z++)_[z]=arguments[z];return u=(s=(o=WW(this,(i=t.__proto__||Object.getPrototypeOf(t)).call.apply(i,[this].concat(_))),o),o.state={hover:!1},o.handleMouseOver=function(){return o.setState({hover:!0})},o.handleMouseOut=function(){return o.setState({hover:!1})},o.render=function(){return Dy.default.createElement(n,{onMouseOver:o.handleMouseOver,onMouseOut:o.handleMouseOut},Dy.default.createElement(e,UAr({},o.props,o.state)))},s),WW(o,u)}return t}(Dy.default.Component)};uA.default=gAr;var mA={};Object.defineProperty(mA,"__esModule",{value:!0}),mA.active=void 0;var CAr=Object.assign||function(c){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var h in n)Object.prototype.hasOwnProperty.call(n,h)&&(c[h]=n[h])}return c},fAr=Z,By=DAr(fAr);function DAr(c){return c&&c.__esModule?c:{default:c}}function BAr(c,e){if(!(c instanceof e))throw new TypeError("Cannot call a class as a function")}function qW(c,e){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:c}function pAr(c,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);c.prototype=Object.create(e&&e.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(c,e):c.__proto__=e)}var SAr=mA.active=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(h){pAr(t,h);function t(){var i,s,o,u;BAr(this,t);for(var m=arguments.length,_=Array(m),z=0;z<m;z++)_[z]=arguments[z];return u=(s=(o=qW(this,(i=t.__proto__||Object.getPrototypeOf(t)).call.apply(i,[this].concat(_))),o),o.state={active:!1},o.handleMouseDown=function(){return o.setState({active:!0})},o.handleMouseUp=function(){return o.setState({active:!1})},o.render=function(){return By.default.createElement(n,{onMouseDown:o.handleMouseDown,onMouseUp:o.handleMouseUp},By.default.createElement(e,CAr({},o.props,o.state)))},s),qW(o,u)}return t}(By.default.Component)};mA.default=SAr;var py={};Object.defineProperty(py,"__esModule",{value:!0});var bAr=function(e,n){var h={},t=function(s){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;h[s]=o};return e===0&&t("first-child"),e===n-1&&t("last-child"),(e===0||e%2===0)&&t("even"),Math.abs(e%2)===1&&t("odd"),t("nth-child",e),h};py.default=bAr,Object.defineProperty(n2,"__esModule",{value:!0}),n2.ReactCSS=n2.loop=n2.handleActive=Sy=n2.handleHover=n2.hover=void 0;var EAr=tA,yAr=X9(EAr),wAr=oA,xAr=X9(wAr),NAr=lA,FAr=X9(NAr),TAr=uA,PW=X9(TAr),RAr=mA,MAr=X9(RAr),HAr=py,OAr=X9(HAr);function X9(c){return c&&c.__esModule?c:{default:c}}n2.hover=PW.default;var Sy=n2.handleHover=PW.default;n2.handleActive=MAr.default,n2.loop=OAr.default;var kAr=n2.ReactCSS=function(e){for(var n=arguments.length,h=Array(n>1?n-1:0),t=1;t<n;t++)h[t-1]=arguments[t];var i=(0,yAr.default)(h),s=(0,xAr.default)(e,i);return(0,FAr.default)(s)},Xn=n2.default=kAr,IAr=function(e,n,h,t,i){var s=i.clientWidth,o=i.clientHeight,u=typeof e.pageX=="number"?e.pageX:e.touches[0].pageX,m=typeof e.pageY=="number"?e.pageY:e.touches[0].pageY,_=u-(i.getBoundingClientRect().left+window.pageXOffset),z=m-(i.getBoundingClientRect().top+window.pageYOffset);if(h==="vertical"){var C=void 0;if(z<0?C=0:z>o?C=1:C=Math.round(z*100/o)/100,n.a!==C)return{h:n.h,s:n.s,l:n.l,a:C,source:"rgb"}}else{var A=void 0;if(_<0?A=0:_>s?A=1:A=Math.round(_*100/s)/100,t!==A)return{h:n.h,s:n.s,l:n.l,a:A,source:"rgb"}}return null},by={},WAr=function(e,n,h,t){if(typeof document>"u"&&!t)return null;var i=t?new t:document.createElement("canvas");i.width=h*2,i.height=h*2;var s=i.getContext("2d");return s?(s.fillStyle=e,s.fillRect(0,0,i.width,i.height),s.fillStyle=n,s.fillRect(0,0,h,h),s.translate(h,h),s.fillRect(0,0,h,h),i.toDataURL()):null},qAr=function(e,n,h,t){var i=e+"-"+n+"-"+h+(t?"-server":"");if(by[i])return by[i];var s=WAr(e,n,h,t);return by[i]=s,s},$W=Object.assign||function(c){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var h in n)Object.prototype.hasOwnProperty.call(n,h)&&(c[h]=n[h])}return c},j9=function(e){var n=e.white,h=e.grey,t=e.size,i=e.renderers,s=e.borderRadius,o=e.boxShadow,u=e.children,m=Xn({default:{grid:{borderRadius:s,boxShadow:o,absolute:"0px 0px 0px 0px",background:"url("+qAr(n,h,t,i.canvas)+") center left"}}});return Z.isValidElement(u)?Z.cloneElement(u,$W({},u.props,{style:$W({},u.props.style,m.grid)})):Z.createElement("div",{style:m.grid})};j9.defaultProps={size:8,white:"transparent",grey:"rgba(0,0,0,.08)",renderers:{}};var PAr=Object.assign||function(c){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var h in n)Object.prototype.hasOwnProperty.call(n,h)&&(c[h]=n[h])}return c},$Ar=function(){function c(e,n){for(var h=0;h<n.length;h++){var t=n[h];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(e,t.key,t)}}return function(e,n,h){return n&&c(e.prototype,n),h&&c(e,h),e}}();function LAr(c,e){if(!(c instanceof e))throw new TypeError("Cannot call a class as a function")}function LW(c,e){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:c}function XAr(c,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);c.prototype=Object.create(e&&e.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(c,e):c.__proto__=e)}var Ey=function(c){XAr(e,c);function e(){var n,h,t,i;LAr(this,e);for(var s=arguments.length,o=Array(s),u=0;u<s;u++)o[u]=arguments[u];return i=(h=(t=LW(this,(n=e.__proto__||Object.getPrototypeOf(e)).call.apply(n,[this].concat(o))),t),t.handleChange=function(m){var _=IAr(m,t.props.hsl,t.props.direction,t.props.a,t.container);_&&typeof t.props.onChange=="function"&&t.props.onChange(_,m)},t.handleMouseDown=function(m){t.handleChange(m),window.addEventListener("mousemove",t.handleChange),window.addEventListener("mouseup",t.handleMouseUp)},t.handleMouseUp=function(){t.unbindEventListeners()},t.unbindEventListeners=function(){window.removeEventListener("mousemove",t.handleChange),window.removeEventListener("mouseup",t.handleMouseUp)},h),LW(t,i)}return $Ar(e,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var h=this,t=this.props.rgb,i=Xn({default:{alpha:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},checkboard:{absolute:"0px 0px 0px 0px",overflow:"hidden",borderRadius:this.props.radius},gradient:{absolute:"0px 0px 0px 0px",background:"linear-gradient(to right, rgba("+t.r+","+t.g+","+t.b+`, 0) 0%,
|
|
68
|
+
Valid keys: `+JSON.stringify(Object.keys(or),null," "));var Gr=Le(se,ae,Hr,Xr,he+"."+ae,h);if(Gr)return Gr}return null}return M(nr)}function Sr(or){switch(typeof or){case"number":case"string":case"undefined":return!0;case"boolean":return!or;case"object":if(Array.isArray(or))return or.every(Sr);if(or===null||u(or))return!0;var nr=C(or);if(nr){var vr=nr.call(or),Er;if(nr!==or.entries){for(;!(Er=vr.next()).done;)if(!Sr(Er.value))return!1}else for(;!(Er=vr.next()).done;){var Hr=Er.value;if(Hr&&!Sr(Hr[1]))return!1}}else return!1;return!0;default:return!1}}function Ar(or,nr){return or==="symbol"?!0:nr?nr["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&nr instanceof Symbol:!1}function mr(or){var nr=typeof or;return Array.isArray(or)?"array":or instanceof RegExp?"object":Ar(nr,or)?"symbol":nr}function ar(or){if(typeof or>"u"||or===null)return""+or;var nr=mr(or);if(nr==="object"){if(or instanceof Date)return"date";if(or instanceof RegExp)return"regexp"}return nr}function ur(or){var nr=ar(or);switch(nr){case"array":case"object":return"an "+nr;case"boolean":case"date":case"regexp":return"a "+nr;default:return nr}}function br(or){return!or.constructor||!or.constructor.name?A:or.constructor.name}return E.checkPropTypes=i,E.resetWarningCache=i.resetWarningCache,E.PropTypes=E,E},zE}var AE,OO;function kar(){if(OO)return AE;OO=1;var c=UE();function e(){}function n(){}return n.resetWarningCache=e,AE=function(){function h(s,o,u,m,_,z){if(z!==c){var C=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw C.name="Invariant Violation",C}}h.isRequired=h;function t(){return h}var i={array:h,bigint:h,bool:h,func:h,number:h,object:h,string:h,symbol:h,any:h,arrayOf:t,element:h,elementType:h,instanceOf:t,node:h,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:n,resetWarningCache:e};return i.PropTypes=i,i},AE}var Iar={};if(Iar.NODE_ENV!=="production"){var War=xO(),qar=!0;uE.exports=Oar()(War.isElement,qar)}else uE.exports=kar()();var Fm=uE.exports;const $r=Ai(Fm);class Z3 extends Z.Component{estimateTextWidth(){return this.props.children.length*this.props.height}getRectX(){const{x:e,horizontalPadding:n,textAnchor:h}=this.props,t=this.estimateTextWidth();let i;return h==="end"?i=e-t:h==="middle"?i=e-.5*t:i=e,i-n}getRectY(){const{y:e,height:n,dominantBaseline:h}=this.props;let t;return h==="hanging"?t=e:h==="middle"?t=e-.5*n:t=e-n,t}render(){const{height:e,horizontalPadding:n,backgroundColor:h,backgroundOpacity:t,fontSize:i,children:s,italicizeText:o,...u}=this.props;if(i&&console.warn("The `fontSize` prop is invalid. Use the `height` prop to set font size."),!s||s.length===0)return null;let m;return h&&t>0&&(m=S.jsx("rect",{x:this.getRectX(),y:this.getRectY(),width:this.estimateTextWidth()+2*n,height:e,fill:h,opacity:t})),S.jsxs(Z.Fragment,{children:[m,S.jsx("text",{...u,fontStyle:o?"italic":"normal",fontSize:1.5*e,children:s})]})}}_r(Z3,"propTypes",{x:$r.number,y:$r.number,dominantBaseline:$r.oneOf(["hanging","middle","baseline"]),textAnchor:$r.oneOf(["start","middle","end"]),children:$r.string,height:$r.number,horizontalPadding:$r.number,backgroundColor:$r.string,backgroundOpacity:$r.number}),_r(Z3,"defaultProps",{x:0,y:0,dominantBaseline:"baseline",textAnchor:"start",children:"",height:12,horizontalPadding:2});const S9=9,Hf={backgroundColor:"var(--bg-color)",hiddenPixels:.5,alwaysDrawLabel:!1};class Pz extends Z.Component{render(){const{feature:e,xSpan:n,y:h=0,color:t="blue",reverseStrandColor:i="red",isMinimal:s=!1,isInvertArrowDirection:o=!1,onClick:u=(K,T)=>{},alwaysDrawLabel:m=!1,hiddenPixels:_=0,opacity:z=1}=this.props,C=e.getIsReverseStrand()?i:t,A=Y4(C),[E,N]=n,y=N-E,M=m?Math.max(3,y):y;if(M<_)return null;const j=S.jsx("rect",{x:E,y:0,width:M,height:S9,fill:C,opacity:z});if(s)return S.jsx(Nt,{y:h,onClick:K=>u(K,e),children:j});let I=null;e.getHasStrand()&&(I=S.jsx(Bu,{startX:E,endX:N,height:S9,isToRight:e.getIsReverseStrand()===o,color:A,opacity:z}));let H=null;if(e.getName().length*S9<.5*M){const K=E+.5*M;H=S.jsx(Z3,{x:K,y:0,height:S9-1,fill:A,dominantBaseline:"hanging",textAnchor:"middle",backgroundColor:C,backgroundOpacity:1,children:e.getName()})}else m&&(H=S.jsx(Z3,{x:N+4,y:0,height:S9-1,fill:C,dominantBaseline:"hanging",textAnchor:"start",children:e.getName()}));return S.jsxs(Nt,{y:h,onClick:K=>u(K,e),children:[j,I,H]})}}_r(Pz,"HEIGHT",S9),_r(Pz,"defaultProps",{color:"blue",reverseStrandColor:"red",isInvertArrowDirection:!1,opacity:1,onClick:(e,n)=>{}});function $U(c,e){return c==null||e==null?NaN:c<e?-1:c>e?1:c>=e?0:NaN}function Par(c,e){return c==null||e==null?NaN:e<c?-1:e>c?1:e>=c?0:NaN}function kO(c){let e,n,h;c.length!==2?(e=$U,n=(o,u)=>$U(c(o),u),h=(o,u)=>c(o)-u):(e=c===$U||c===Par?c:$ar,n=c,h=c);function t(o,u,m=0,_=o.length){if(m<_){if(e(u,u)!==0)return _;do{const z=m+_>>>1;n(o[z],u)<0?m=z+1:_=z}while(m<_)}return m}function i(o,u,m=0,_=o.length){if(m<_){if(e(u,u)!==0)return _;do{const z=m+_>>>1;n(o[z],u)<=0?m=z+1:_=z}while(m<_)}return m}function s(o,u,m=0,_=o.length){const z=t(o,u,m,_-1);return z>m&&h(o[z-1],u)>-h(o[z],u)?z-1:z}return{left:t,center:s,right:i}}function $ar(){return 0}function Lar(c){return c===null?NaN:+c}function*Xar(c,e){for(let n of c)n!=null&&(n=+n)>=n&&(yield n)}const jar=kO($U).right;kO(Lar).center;function Gar(c=$U){if(c===$U)return IO;if(typeof c!="function")throw new TypeError("compare is not a function");return(e,n)=>{const h=c(e,n);return h||h===0?h:(c(n,n)===0)-(c(e,e)===0)}}function IO(c,e){return(c==null||!(c>=c))-(e==null||!(e>=e))||(c<e?-1:c>e?1:0)}const Var=Math.sqrt(50),Jar=Math.sqrt(10),Kar=Math.sqrt(2);function Of(c,e,n){const h=(e-c)/Math.max(0,n),t=Math.floor(Math.log10(h)),i=h/Math.pow(10,t),s=i>=Var?10:i>=Jar?5:i>=Kar?2:1;let o,u,m;return t<0?(m=Math.pow(10,-t)/s,o=Math.round(c*m),u=Math.round(e*m),o/m<c&&++o,u/m>e&&--u,m=-m):(m=Math.pow(10,t)*s,o=Math.round(c/m),u=Math.round(e/m),o*m<c&&++o,u*m>e&&--u),u<o&&.5<=n&&n<2?Of(c,e,n*2):[o,u,m]}function gE(c,e,n){if(e=+e,c=+c,n=+n,!(n>0))return[];if(c===e)return[c];const h=e<c,[t,i,s]=h?Of(e,c,n):Of(c,e,n);if(!(i>=t))return[];const o=i-t+1,u=new Array(o);if(h)if(s<0)for(let m=0;m<o;++m)u[m]=(i-m)/-s;else for(let m=0;m<o;++m)u[m]=(i-m)*s;else if(s<0)for(let m=0;m<o;++m)u[m]=(t+m)/-s;else for(let m=0;m<o;++m)u[m]=(t+m)*s;return u}function CE(c,e,n){return e=+e,c=+c,n=+n,Of(c,e,n)[2]}function Zar(c,e,n){e=+e,c=+c,n=+n;const h=e<c,t=h?CE(e,c,n):CE(c,e,n);return(h?-1:1)*(t<0?1/-t:t)}function WO(c,e){let n;for(const h of c)h!=null&&(n<h||n===void 0&&h>=h)&&(n=h);return n}function qO(c,e){let n;for(const h of c)h!=null&&(n>h||n===void 0&&h>=h)&&(n=h);return n}function PO(c,e,n=0,h=1/0,t){if(e=Math.floor(e),n=Math.floor(Math.max(0,n)),h=Math.floor(Math.min(c.length-1,h)),!(n<=e&&e<=h))return c;for(t=t===void 0?IO:Gar(t);h>n;){if(h-n>600){const u=h-n+1,m=e-n+1,_=Math.log(u),z=.5*Math.exp(2*_/3),C=.5*Math.sqrt(_*z*(u-z)/u)*(m-u/2<0?-1:1),A=Math.max(n,Math.floor(e-m*z/u+C)),E=Math.min(h,Math.floor(e+(u-m)*z/u+C));PO(c,e,A,E,t)}const i=c[e];let s=n,o=h;for($z(c,n,e),t(c[h],i)>0&&$z(c,n,h);s<o;){for($z(c,s,o),++s,--o;t(c[s],i)<0;)++s;for(;t(c[o],i)>0;)--o}t(c[n],i)===0?$z(c,n,o):(++o,$z(c,o,h)),o<=e&&(n=o+1),e<=o&&(h=o-1)}return c}function $z(c,e,n){const h=c[e];c[e]=c[n],c[n]=h}function fE(c,e,n){if(c=Float64Array.from(Xar(c)),!(!(h=c.length)||isNaN(e=+e))){if(e<=0||h<2)return qO(c);if(e>=1)return WO(c);var h,t=(h-1)*e,i=Math.floor(t),s=WO(PO(c,i).subarray(0,i+1)),o=qO(c.subarray(i+1));return s+(o-s)*(t-i)}}function $O(c,e){switch(arguments.length){case 0:break;case 1:this.range(c);break;default:this.range(e).domain(c);break}return this}function DE(c,e,n){c.prototype=e.prototype=n,n.constructor=c}function LO(c,e){var n=Object.create(c.prototype);for(var h in e)n[h]=e[h];return n}function Lz(){}var Xz=.7,kf=1/Xz,b9="\\s*([+-]?\\d+)\\s*",jz="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",r5="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Yar=/^#([0-9a-f]{3,8})$/,Qar=new RegExp(`^rgb\\(${b9},${b9},${b9}\\)$`),ror=new RegExp(`^rgb\\(${r5},${r5},${r5}\\)$`),eor=new RegExp(`^rgba\\(${b9},${b9},${b9},${jz}\\)$`),nor=new RegExp(`^rgba\\(${r5},${r5},${r5},${jz}\\)$`),cor=new RegExp(`^hsl\\(${jz},${r5},${r5}\\)$`),hor=new RegExp(`^hsla\\(${jz},${r5},${r5},${jz}\\)$`),XO={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};DE(Lz,LU,{copy(c){return Object.assign(new this.constructor,this,c)},displayable(){return this.rgb().displayable()},hex:jO,formatHex:jO,formatHex8:tor,formatHsl:ior,formatRgb:GO,toString:GO});function jO(){return this.rgb().formatHex()}function tor(){return this.rgb().formatHex8()}function ior(){return YO(this).formatHsl()}function GO(){return this.rgb().formatRgb()}function LU(c){var e,n;return c=(c+"").trim().toLowerCase(),(e=Yar.exec(c))?(n=e[1].length,e=parseInt(e[1],16),n===6?VO(e):n===3?new vo(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?If(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?If(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=Qar.exec(c))?new vo(e[1],e[2],e[3],1):(e=ror.exec(c))?new vo(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=eor.exec(c))?If(e[1],e[2],e[3],e[4]):(e=nor.exec(c))?If(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=cor.exec(c))?ZO(e[1],e[2]/100,e[3]/100,1):(e=hor.exec(c))?ZO(e[1],e[2]/100,e[3]/100,e[4]):XO.hasOwnProperty(c)?VO(XO[c]):c==="transparent"?new vo(NaN,NaN,NaN,0):null}function VO(c){return new vo(c>>16&255,c>>8&255,c&255,1)}function If(c,e,n,h){return h<=0&&(c=e=n=NaN),new vo(c,e,n,h)}function sor(c){return c instanceof Lz||(c=LU(c)),c?(c=c.rgb(),new vo(c.r,c.g,c.b,c.opacity)):new vo}function BE(c,e,n,h){return arguments.length===1?sor(c):new vo(c,e,n,h??1)}function vo(c,e,n,h){this.r=+c,this.g=+e,this.b=+n,this.opacity=+h}DE(vo,BE,LO(Lz,{brighter(c){return c=c==null?kf:Math.pow(kf,c),new vo(this.r*c,this.g*c,this.b*c,this.opacity)},darker(c){return c=c==null?Xz:Math.pow(Xz,c),new vo(this.r*c,this.g*c,this.b*c,this.opacity)},rgb(){return this},clamp(){return new vo(XU(this.r),XU(this.g),XU(this.b),Wf(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:JO,formatHex:JO,formatHex8:aor,formatRgb:KO,toString:KO}));function JO(){return`#${jU(this.r)}${jU(this.g)}${jU(this.b)}`}function aor(){return`#${jU(this.r)}${jU(this.g)}${jU(this.b)}${jU((isNaN(this.opacity)?1:this.opacity)*255)}`}function KO(){const c=Wf(this.opacity);return`${c===1?"rgb(":"rgba("}${XU(this.r)}, ${XU(this.g)}, ${XU(this.b)}${c===1?")":`, ${c})`}`}function Wf(c){return isNaN(c)?1:Math.max(0,Math.min(1,c))}function XU(c){return Math.max(0,Math.min(255,Math.round(c)||0))}function jU(c){return c=XU(c),(c<16?"0":"")+c.toString(16)}function ZO(c,e,n,h){return h<=0?c=e=n=NaN:n<=0||n>=1?c=e=NaN:e<=0&&(c=NaN),new yl(c,e,n,h)}function YO(c){if(c instanceof yl)return new yl(c.h,c.s,c.l,c.opacity);if(c instanceof Lz||(c=LU(c)),!c)return new yl;if(c instanceof yl)return c;c=c.rgb();var e=c.r/255,n=c.g/255,h=c.b/255,t=Math.min(e,n,h),i=Math.max(e,n,h),s=NaN,o=i-t,u=(i+t)/2;return o?(e===i?s=(n-h)/o+(n<h)*6:n===i?s=(h-e)/o+2:s=(e-n)/o+4,o/=u<.5?i+t:2-i-t,s*=60):o=u>0&&u<1?0:s,new yl(s,o,u,c.opacity)}function oor(c,e,n,h){return arguments.length===1?YO(c):new yl(c,e,n,h??1)}function yl(c,e,n,h){this.h=+c,this.s=+e,this.l=+n,this.opacity=+h}DE(yl,oor,LO(Lz,{brighter(c){return c=c==null?kf:Math.pow(kf,c),new yl(this.h,this.s,this.l*c,this.opacity)},darker(c){return c=c==null?Xz:Math.pow(Xz,c),new yl(this.h,this.s,this.l*c,this.opacity)},rgb(){var c=this.h%360+(this.h<0)*360,e=isNaN(c)||isNaN(this.s)?0:this.s,n=this.l,h=n+(n<.5?n:1-n)*e,t=2*n-h;return new vo(pE(c>=240?c-240:c+120,t,h),pE(c,t,h),pE(c<120?c+240:c-120,t,h),this.opacity)},clamp(){return new yl(QO(this.h),qf(this.s),qf(this.l),Wf(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const c=Wf(this.opacity);return`${c===1?"hsl(":"hsla("}${QO(this.h)}, ${qf(this.s)*100}%, ${qf(this.l)*100}%${c===1?")":`, ${c})`}`}}));function QO(c){return c=(c||0)%360,c<0?c+360:c}function qf(c){return Math.max(0,Math.min(1,c||0))}function pE(c,e,n){return(c<60?e+(n-e)*c/60:c<180?n:c<240?e+(n-e)*(240-c)/60:e)*255}const SE=c=>()=>c;function lor(c,e){return function(n){return c+n*e}}function uor(c,e,n){return c=Math.pow(c,n),e=Math.pow(e,n)-c,n=1/n,function(h){return Math.pow(c+h*e,n)}}function mor(c){return(c=+c)==1?rk:function(e,n){return n-e?uor(e,n,c):SE(isNaN(e)?n:e)}}function rk(c,e){var n=e-c;return n?lor(c,n):SE(isNaN(c)?e:c)}const Pf=function c(e){var n=mor(e);function h(t,i){var s=n((t=BE(t)).r,(i=BE(i)).r),o=n(t.g,i.g),u=n(t.b,i.b),m=rk(t.opacity,i.opacity);return function(_){return t.r=s(_),t.g=o(_),t.b=u(_),t.opacity=m(_),t+""}}return h.gamma=c,h}(1);function _or(c,e){e||(e=[]);var n=c?Math.min(e.length,c.length):0,h=e.slice(),t;return function(i){for(t=0;t<n;++t)h[t]=c[t]*(1-i)+e[t]*i;return h}}function Uor(c){return ArrayBuffer.isView(c)&&!(c instanceof DataView)}function vor(c,e){var n=e?e.length:0,h=c?Math.min(n,c.length):0,t=new Array(h),i=new Array(n),s;for(s=0;s<h;++s)t[s]=yE(c[s],e[s]);for(;s<n;++s)i[s]=e[s];return function(o){for(s=0;s<h;++s)i[s]=t[s](o);return i}}function dor(c,e){var n=new Date;return c=+c,e=+e,function(h){return n.setTime(c*(1-h)+e*h),n}}function wl(c,e){return c=+c,e=+e,function(n){return c*(1-n)+e*n}}function zor(c,e){var n={},h={},t;(c===null||typeof c!="object")&&(c={}),(e===null||typeof e!="object")&&(e={});for(t in e)t in c?n[t]=yE(c[t],e[t]):h[t]=e[t];return function(i){for(t in n)h[t]=n[t](i);return h}}var bE=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,EE=new RegExp(bE.source,"g");function Aor(c){return function(){return c}}function gor(c){return function(e){return c(e)+""}}function ek(c,e){var n=bE.lastIndex=EE.lastIndex=0,h,t,i,s=-1,o=[],u=[];for(c=c+"",e=e+"";(h=bE.exec(c))&&(t=EE.exec(e));)(i=t.index)>n&&(i=e.slice(n,i),o[s]?o[s]+=i:o[++s]=i),(h=h[0])===(t=t[0])?o[s]?o[s]+=t:o[++s]=t:(o[++s]=null,u.push({i:s,x:wl(h,t)})),n=EE.lastIndex;return n<e.length&&(i=e.slice(n),o[s]?o[s]+=i:o[++s]=i),o.length<2?u[0]?gor(u[0].x):Aor(e):(e=u.length,function(m){for(var _=0,z;_<e;++_)o[(z=u[_]).i]=z.x(m);return o.join("")})}function yE(c,e){var n=typeof e,h;return e==null||n==="boolean"?SE(e):(n==="number"?wl:n==="string"?(h=LU(e))?(e=h,Pf):ek:e instanceof LU?Pf:e instanceof Date?dor:Uor(e)?_or:Array.isArray(e)?vor:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?zor:wl)(c,e)}function Cor(c,e){return c=+c,e=+e,function(n){return Math.round(c*(1-n)+e*n)}}var nk=180/Math.PI,wE={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function ck(c,e,n,h,t,i){var s,o,u;return(s=Math.sqrt(c*c+e*e))&&(c/=s,e/=s),(u=c*n+e*h)&&(n-=c*u,h-=e*u),(o=Math.sqrt(n*n+h*h))&&(n/=o,h/=o,u/=o),c*h<e*n&&(c=-c,e=-e,u=-u,s=-s),{translateX:t,translateY:i,rotate:Math.atan2(e,c)*nk,skewX:Math.atan(u)*nk,scaleX:s,scaleY:o}}var $f;function Dor(c){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(c+"");return e.isIdentity?wE:ck(e.a,e.b,e.c,e.d,e.e,e.f)}function Bor(c){return c==null||($f||($f=document.createElementNS("http://www.w3.org/2000/svg","g")),$f.setAttribute("transform",c),!(c=$f.transform.baseVal.consolidate()))?wE:(c=c.matrix,ck(c.a,c.b,c.c,c.d,c.e,c.f))}function hk(c,e,n,h){function t(m){return m.length?m.pop()+" ":""}function i(m,_,z,C,A,E){if(m!==z||_!==C){var N=A.push("translate(",null,e,null,n);E.push({i:N-4,x:wl(m,z)},{i:N-2,x:wl(_,C)})}else(z||C)&&A.push("translate("+z+e+C+n)}function s(m,_,z,C){m!==_?(m-_>180?_+=360:_-m>180&&(m+=360),C.push({i:z.push(t(z)+"rotate(",null,h)-2,x:wl(m,_)})):_&&z.push(t(z)+"rotate("+_+h)}function o(m,_,z,C){m!==_?C.push({i:z.push(t(z)+"skewX(",null,h)-2,x:wl(m,_)}):_&&z.push(t(z)+"skewX("+_+h)}function u(m,_,z,C,A,E){if(m!==z||_!==C){var N=A.push(t(A)+"scale(",null,",",null,")");E.push({i:N-4,x:wl(m,z)},{i:N-2,x:wl(_,C)})}else(z!==1||C!==1)&&A.push(t(A)+"scale("+z+","+C+")")}return function(m,_){var z=[],C=[];return m=c(m),_=c(_),i(m.translateX,m.translateY,_.translateX,_.translateY,z,C),s(m.rotate,_.rotate,z,C),o(m.skewX,_.skewX,z,C),u(m.scaleX,m.scaleY,_.scaleX,_.scaleY,z,C),m=_=null,function(A){for(var E=-1,N=C.length,y;++E<N;)z[(y=C[E]).i]=y.x(A);return z.join("")}}}var por=hk(Dor,"px, ","px)","deg)"),Sor=hk(Bor,", ",")",")");function bor(c){return function(){return c}}function Eor(c){return+c}var tk=[0,1];function E9(c){return c}function xE(c,e){return(e-=c=+c)?function(n){return(n-c)/e}:bor(isNaN(e)?NaN:.5)}function yor(c,e){var n;return c>e&&(n=c,c=e,e=n),function(h){return Math.max(c,Math.min(e,h))}}function wor(c,e,n){var h=c[0],t=c[1],i=e[0],s=e[1];return t<h?(h=xE(t,h),i=n(s,i)):(h=xE(h,t),i=n(i,s)),function(o){return i(h(o))}}function xor(c,e,n){var h=Math.min(c.length,e.length)-1,t=new Array(h),i=new Array(h),s=-1;for(c[h]<c[0]&&(c=c.slice().reverse(),e=e.slice().reverse());++s<h;)t[s]=xE(c[s],c[s+1]),i[s]=n(e[s],e[s+1]);return function(o){var u=jar(c,o,1,h)-1;return i[u](t[u](o))}}function ik(c,e){return e.domain(c.domain()).range(c.range()).interpolate(c.interpolate()).clamp(c.clamp()).unknown(c.unknown())}function sk(){var c=tk,e=tk,n=yE,h,t,i,s=E9,o,u,m;function _(){var C=Math.min(c.length,e.length);return s!==E9&&(s=yor(c[0],c[C-1])),o=C>2?xor:wor,u=m=null,z}function z(C){return C==null||isNaN(C=+C)?i:(u||(u=o(c.map(h),e,n)))(h(s(C)))}return z.invert=function(C){return s(t((m||(m=o(e,c.map(h),wl)))(C)))},z.domain=function(C){return arguments.length?(c=Array.from(C,Eor),_()):c.slice()},z.range=function(C){return arguments.length?(e=Array.from(C),_()):e.slice()},z.rangeRound=function(C){return e=Array.from(C),n=Cor,_()},z.clamp=function(C){return arguments.length?(s=C?!0:E9,_()):s!==E9},z.interpolate=function(C){return arguments.length?(n=C,_()):n},z.unknown=function(C){return arguments.length?(i=C,z):i},function(C,A){return h=C,t=A,_()}}function Nor(){return sk()(E9,E9)}function For(c){return Math.abs(c=Math.round(c))>=1e21?c.toLocaleString("en").replace(/,/g,""):c.toString(10)}function Lf(c,e){if((n=(c=e?c.toExponential(e-1):c.toExponential()).indexOf("e"))<0)return null;var n,h=c.slice(0,n);return[h.length>1?h[0]+h.slice(2):h,+c.slice(n+1)]}function y9(c){return c=Lf(Math.abs(c)),c?c[1]:NaN}function Tor(c,e){return function(n,h){for(var t=n.length,i=[],s=0,o=c[0],u=0;t>0&&o>0&&(u+o+1>h&&(o=Math.max(1,h-u)),i.push(n.substring(t-=o,t+o)),!((u+=o+1)>h));)o=c[s=(s+1)%c.length];return i.reverse().join(e)}}function Ror(c){return function(e){return e.replace(/[0-9]/g,function(n){return c[+n]})}}var Mor=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Gz(c){if(!(e=Mor.exec(c)))throw new Error("invalid format: "+c);var e;return new NE({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}Gz.prototype=NE.prototype;function NE(c){this.fill=c.fill===void 0?" ":c.fill+"",this.align=c.align===void 0?">":c.align+"",this.sign=c.sign===void 0?"-":c.sign+"",this.symbol=c.symbol===void 0?"":c.symbol+"",this.zero=!!c.zero,this.width=c.width===void 0?void 0:+c.width,this.comma=!!c.comma,this.precision=c.precision===void 0?void 0:+c.precision,this.trim=!!c.trim,this.type=c.type===void 0?"":c.type+""}NE.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function Hor(c){r:for(var e=c.length,n=1,h=-1,t;n<e;++n)switch(c[n]){case".":h=t=n;break;case"0":h===0&&(h=n),t=n;break;default:if(!+c[n])break r;h>0&&(h=0);break}return h>0?c.slice(0,h)+c.slice(t+1):c}var ak;function Oor(c,e){var n=Lf(c,e);if(!n)return c+"";var h=n[0],t=n[1],i=t-(ak=Math.max(-8,Math.min(8,Math.floor(t/3)))*3)+1,s=h.length;return i===s?h:i>s?h+new Array(i-s+1).join("0"):i>0?h.slice(0,i)+"."+h.slice(i):"0."+new Array(1-i).join("0")+Lf(c,Math.max(0,e+i-1))[0]}function ok(c,e){var n=Lf(c,e);if(!n)return c+"";var h=n[0],t=n[1];return t<0?"0."+new Array(-t).join("0")+h:h.length>t+1?h.slice(0,t+1)+"."+h.slice(t+1):h+new Array(t-h.length+2).join("0")}const lk={"%":(c,e)=>(c*100).toFixed(e),b:c=>Math.round(c).toString(2),c:c=>c+"",d:For,e:(c,e)=>c.toExponential(e),f:(c,e)=>c.toFixed(e),g:(c,e)=>c.toPrecision(e),o:c=>Math.round(c).toString(8),p:(c,e)=>ok(c*100,e),r:ok,s:Oor,X:c=>Math.round(c).toString(16).toUpperCase(),x:c=>Math.round(c).toString(16)};function uk(c){return c}var mk=Array.prototype.map,_k=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function kor(c){var e=c.grouping===void 0||c.thousands===void 0?uk:Tor(mk.call(c.grouping,Number),c.thousands+""),n=c.currency===void 0?"":c.currency[0]+"",h=c.currency===void 0?"":c.currency[1]+"",t=c.decimal===void 0?".":c.decimal+"",i=c.numerals===void 0?uk:Ror(mk.call(c.numerals,String)),s=c.percent===void 0?"%":c.percent+"",o=c.minus===void 0?"−":c.minus+"",u=c.nan===void 0?"NaN":c.nan+"";function m(z){z=Gz(z);var C=z.fill,A=z.align,E=z.sign,N=z.symbol,y=z.zero,M=z.width,j=z.comma,I=z.precision,H=z.trim,G=z.type;G==="n"?(j=!0,G="g"):lk[G]||(I===void 0&&(I=12),H=!0,G="g"),(y||C==="0"&&A==="=")&&(y=!0,C="0",A="=");var K=N==="$"?n:N==="#"&&/[boxX]/.test(G)?"0"+G.toLowerCase():"",T=N==="$"?h:/[%p]/.test(G)?s:"",q=lk[G],P=/[defgprs%]/.test(G);I=I===void 0?6:/[gprs]/.test(G)?Math.max(1,Math.min(21,I)):Math.max(0,Math.min(20,I));function V(Q){var er=K,rr=T,Ur,Sr,Ar;if(G==="c")rr=q(Q)+rr,Q="";else{Q=+Q;var mr=Q<0||1/Q<0;if(Q=isNaN(Q)?u:q(Math.abs(Q),I),H&&(Q=Hor(Q)),mr&&+Q==0&&E!=="+"&&(mr=!1),er=(mr?E==="("?E:o:E==="-"||E==="("?"":E)+er,rr=(G==="s"?_k[8+ak/3]:"")+rr+(mr&&E==="("?")":""),P){for(Ur=-1,Sr=Q.length;++Ur<Sr;)if(Ar=Q.charCodeAt(Ur),48>Ar||Ar>57){rr=(Ar===46?t+Q.slice(Ur+1):Q.slice(Ur))+rr,Q=Q.slice(0,Ur);break}}}j&&!y&&(Q=e(Q,1/0));var ar=er.length+Q.length+rr.length,ur=ar<M?new Array(M-ar+1).join(C):"";switch(j&&y&&(Q=e(ur+Q,ur.length?M-rr.length:1/0),ur=""),A){case"<":Q=er+Q+rr+ur;break;case"=":Q=er+ur+Q+rr;break;case"^":Q=ur.slice(0,ar=ur.length>>1)+er+Q+rr+ur.slice(ar);break;default:Q=ur+er+Q+rr;break}return i(Q)}return V.toString=function(){return z+""},V}function _(z,C){var A=m((z=Gz(z),z.type="f",z)),E=Math.max(-8,Math.min(8,Math.floor(y9(C)/3)))*3,N=Math.pow(10,-E),y=_k[8+E/3];return function(M){return A(N*M)+y}}return{format:m,formatPrefix:_}}var Xf,jf,Uk;Ior({thousands:",",grouping:[3],currency:["$",""]});function Ior(c){return Xf=kor(c),jf=Xf.format,Uk=Xf.formatPrefix,Xf}function Wor(c){return Math.max(0,-y9(Math.abs(c)))}function qor(c,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(y9(e)/3)))*3-y9(Math.abs(c)))}function Por(c,e){return c=Math.abs(c),e=Math.abs(e)-c,Math.max(0,y9(e)-y9(c))+1}function $or(c,e,n,h){var t=Zar(c,e,n),i;switch(h=Gz(h??",f"),h.type){case"s":{var s=Math.max(Math.abs(c),Math.abs(e));return h.precision==null&&!isNaN(i=qor(t,s))&&(h.precision=i),Uk(h,s)}case"":case"e":case"g":case"p":case"r":{h.precision==null&&!isNaN(i=Por(t,Math.max(Math.abs(c),Math.abs(e))))&&(h.precision=i-(h.type==="e"));break}case"f":case"%":{h.precision==null&&!isNaN(i=Wor(t))&&(h.precision=i-(h.type==="%")*2);break}}return jf(h)}function Lor(c){var e=c.domain;return c.ticks=function(n){var h=e();return gE(h[0],h[h.length-1],n??10)},c.tickFormat=function(n,h){var t=e();return $or(t[0],t[t.length-1],n??10,h)},c.nice=function(n){n==null&&(n=10);var h=e(),t=0,i=h.length-1,s=h[t],o=h[i],u,m,_=10;for(o<s&&(m=s,s=o,o=m,m=t,t=i,i=m);_-- >0;){if(m=CE(s,o,n),m===u)return h[t]=s,h[i]=o,e(h);if(m>0)s=Math.floor(s/m)*m,o=Math.ceil(o/m)*m;else if(m<0)s=Math.ceil(s*m)/m,o=Math.floor(o*m)/m;else break;u=m}return c},c}function In(){var c=Nor();return c.copy=function(){return ik(c,In())},$O.apply(c,arguments),Lor(c)}function Xor(c,e){c=c.slice();var n=0,h=c.length-1,t=c[n],i=c[h],s;return i<t&&(s=n,n=h,h=s,s=t,t=i,i=s),c[n]=e.floor(t),c[h]=e.ceil(i),c}function vk(c){return Math.log(c)}function dk(c){return Math.exp(c)}function jor(c){return-Math.log(-c)}function Gor(c){return-Math.exp(-c)}function Vor(c){return isFinite(c)?+("1e"+c):c<0?0:c}function Jor(c){return c===10?Vor:c===Math.E?Math.exp:e=>Math.pow(c,e)}function Kor(c){return c===Math.E?Math.log:c===10&&Math.log10||c===2&&Math.log2||(c=Math.log(c),e=>Math.log(e)/c)}function zk(c){return(e,n)=>-c(-e,n)}function Zor(c){const e=c(vk,dk),n=e.domain;let h=10,t,i;function s(){return t=Kor(h),i=Jor(h),n()[0]<0?(t=zk(t),i=zk(i),c(jor,Gor)):c(vk,dk),e}return e.base=function(o){return arguments.length?(h=+o,s()):h},e.domain=function(o){return arguments.length?(n(o),s()):n()},e.ticks=o=>{const u=n();let m=u[0],_=u[u.length-1];const z=_<m;z&&([m,_]=[_,m]);let C=t(m),A=t(_),E,N;const y=o==null?10:+o;let M=[];if(!(h%1)&&A-C<y){if(C=Math.floor(C),A=Math.ceil(A),m>0){for(;C<=A;++C)for(E=1;E<h;++E)if(N=C<0?E/i(-C):E*i(C),!(N<m)){if(N>_)break;M.push(N)}}else for(;C<=A;++C)for(E=h-1;E>=1;--E)if(N=C>0?E/i(-C):E*i(C),!(N<m)){if(N>_)break;M.push(N)}M.length*2<y&&(M=gE(m,_,y))}else M=gE(C,A,Math.min(A-C,y)).map(i);return z?M.reverse():M},e.tickFormat=(o,u)=>{if(o==null&&(o=10),u==null&&(u=h===10?"s":","),typeof u!="function"&&(!(h%1)&&(u=Gz(u)).precision==null&&(u.trim=!0),u=jf(u)),o===1/0)return u;const m=Math.max(1,h*o/e.ticks().length);return _=>{let z=_/i(Math.round(t(_)));return z*h<h-.5&&(z*=h),z<=m?u(_):""}},e.nice=()=>n(Xor(n(),{floor:o=>i(Math.floor(t(o))),ceil:o=>i(Math.ceil(t(o)))})),e}function Ak(){const c=Zor(sk()).domain([1,10]);return c.copy=()=>ik(c,Ak()).base(c.base()),$O.apply(c,arguments),c}var gk=Number.isNaN||function(e){return typeof e=="number"&&e!==e};function Yor(c,e){return!!(c===e||gk(c)&&gk(e))}function Qor(c,e){if(c.length!==e.length)return!1;for(var n=0;n<c.length;n++)if(!Yor(c[n],e[n]))return!1;return!0}function dt(c,e){e===void 0&&(e=Qor);var n=null;function h(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];if(n&&n.lastThis===this&&e(t,n.lastArgs))return n.lastResult;var s=c.apply(this,t);return n={lastResult:s,lastArgs:t,lastThis:this},s}return h.clear=function(){n=null},h}var r3r={};const zt={CANVAS:0,SVG:1},e3r={display:"block"};class xl extends Z.PureComponent{render(){const{type:e,style:n}=this.props,h=Object.assign({},e3r,n);switch(e){case zt.CANVAS:return S.jsx(n3r,{width:this.props.width,height:this.props.height,children:this.props.children,style:h});case zt.SVG:return this.props.forceSvg?S.jsx("svg",{children:this.props.children,style:h,width:this.props.width,height:this.props.height}):S.jsx("svg",{width:this.props.width,height:this.props.height,children:this.props.children,style:h});default:return null}}}_r(xl,"defaultProps",{type:zt.SVG,style:{}});class n3r extends Z.PureComponent{constructor(){super(...arguments);_r(this,"canvasNode");_r(this,"getPixelRatioSafely",()=>{const n=window.devicePixelRatio;return Number.isFinite(n)&&n>0?n:1})}componentDidMount(){this.draw(this.canvasNode)}componentDidUpdate(n){const h=this.getPixelRatioSafely();if(h!==1){const t=this.props.width,i=this.props.height;this.canvasNode.style.width=t+"px",this.canvasNode.style.height=i+"px",this.canvasNode.setAttribute("width",t*h),this.canvasNode.setAttribute("height",i*h),this.canvasNode.getContext("2d").scale(h,h)}this.draw(this.canvasNode)}drawOneElement(n,h){if(!h)return;if(Array.isArray(h)){h.forEach(i=>this.drawOneElement(n,i));return}const t=h.props;switch(h.type){case"rect":n.fillStyle=t.fill,n.globalAlpha=t.fillOpacity||1,n.fillRect(t.x,t.y,t.width,t.height);break;case"g":Z.Children.forEach(t.children,s=>this.drawOneElement(n,s));break;case"line":n.strokeStyle=t.stroke,n.beginPath(),n.moveTo(t.x1,t.y1),n.lineTo(t.x2,t.y2),n.stroke();break;case"circle":n.strokeStyle=t.stroke,n.globalAlpha=t.strokeOpacity||1,n.beginPath(),n.arc(t.cx,t.cy,t.r,0,2*Math.PI,!1),n.stroke();break;case"polygon":n.fillStyle=t.fill,n.globalAlpha=t.opacity||1,n.beginPath(),n.moveTo(t.points[0][0],t.points[0][1]),n.lineTo(t.points[1][0],t.points[1][1]),n.lineTo(t.points[2][0],t.points[2][1]),n.lineTo(t.points[3][0],t.points[3][1]),n.closePath(),n.fill();break;case"path":n.fillStyle=t.fill,n.globalAlpha=t.opacity||1,n.strokeStyle=t.stroke,n.lineWidth=t.strokeWidth;const i=new Path2D(t.d);n.stroke(i);break;case void 0:break;default:console.error(`Drawing '${h.type}'s is unsupported. Ignoring...`)}}draw(n){if(r3r.NODE_ENV==="test")return;const h=this.getPixelRatioSafely(),t=this.props.width,i=this.props.height;this.canvasNode.style.width=t+"px",this.canvasNode.style.height=i+"px",this.canvasNode.setAttribute("width",t*h),this.canvasNode.setAttribute("height",i*h);const s=this.canvasNode.getContext("2d");s.scale(h,h),s.clearRect(0,0,this.canvasNode.width,this.canvasNode.height),this.props.children.forEach(o=>this.drawOneElement(s,o))}render(){const{children:n,...h}=this.props;return S.jsx("canvas",{ref:t=>this.canvasNode=t,...h})}}const Nl={AUTO:"auto",BAR:"bar",HEATMAP:"heatmap"},zo={FULL:"full",DENSITY:"density"};var ta=(c=>(c.HEATMAP="heatmap",c.ARC="arc",c.FLATARC="flatarc",c.SQUARE="square",c))(ta||{}),GU=(c=>(c.HEATMAP="heatmap",c.ARC="arc",c))(GU||{});const c3r={AUTO:"auto"},Vz={QUAL:"QUAL",AF:"AF"},Jz={AUTO:"auto",DENSITY:"density",FULL:"full"};var e5=(c=>(c.AUTO="auto",c.HEATMAP="heatmap",c))(e5||{});class gi{constructor(e,n){_r(this,"_viewRegion");_r(this,"_drawWidth");_r(this,"_pixelsPerBase");_r(this,"_basesPerPixel");this._viewRegion=e,this._drawWidth=n,this._pixelsPerBase=n/e.getWidth(),this._basesPerPixel=e.getWidth()/n}getDrawWidth(){return this._drawWidth}basesToXWidth(e){return e*this._pixelsPerBase}xWidthToBases(e){return e*this._basesPerPixel}baseToX(e){return(e-this._viewRegion.getContextCoordinates().start)*this._pixelsPerBase}xToBase(e){return e*this._basesPerPixel+this._viewRegion.getContextCoordinates().start}baseSpanToXSpan(e){const n=this.baseToX(e.start),h=this.baseToX(e.end);return new p0(n,h)}baseSpanToXCenter(e){const n=this.baseSpanToXSpan(e),h=Math.round((n.start+n.end)/2);return new p0(h,h)}xToSegmentCoordinate(e){const n=Math.floor(this.xToBase(e));return this._viewRegion.getNavigationContext().convertBaseToFeatureCoordinate(n)}}class h3r{constructor(e,n,h){_r(this,"interaction");_r(this,"xSpan1");_r(this,"xSpan2");this.interaction=e,n.start<=h.start?(this.xSpan1=n,this.xSpan2=h):(this.xSpan1=h,this.xSpan2=n)}getWidth(){const e=this.xSpan1.start;return Math.max(this.xSpan1.end,this.xSpan2.end)-e}generateKey(){return""+this.xSpan1.start+this.xSpan1.end+this.xSpan2.start+this.xSpan2.end}}class n5{placeFeatures(e,n,h,t=!1){const i=new gi(n,h),s=n.getContextCoordinates(),o=n.getNavigationContext(),u=[];for(const m of e)for(let _ of m.computeNavContextCoordinates(o))if(_=_.getOverlap(s),_){const z=t?i.baseSpanToXCenter(_):i.baseSpanToXSpan(_),{visiblePart:C,isReverse:A}=this._locatePlacement(m,o,_);u.push({feature:m,visiblePart:C,contextLocation:_,xSpan:z,isReverse:A})}return u}_locatePlacement(e,n,h){const t=n.convertBaseToFeatureCoordinate(h.start),i=t.getLocus().start,s=t.feature.getIsReverseStrand();let o;s?o=i-h.getLength()+1:o=i;const u=o-e.getLocus().start,m=Math.max(0,u);return{visiblePart:new Ra(e,m,m+h.getLength()),isReverse:s}}placeFeatureSegments(e,n){const h=e.xSpan.getLength()/e.contextLocation.getLength(),t=[];for(let i of n)if(i=i.getOverlap(e.visiblePart),i){const o=(i.relativeStart-e.visiblePart.relativeStart)*h,u=i.getLength()*h;let m;e.isReverse?m=e.xSpan.end-o-u:m=e.xSpan.start+o,t.push({segment:i,xSpan:new p0(m,m+u)})}return t}placeInteractions(e,n,h){const t=new gi(n,h),i=n.getContextCoordinates(),s=n.getNavigationContext(),o=[];for(const u of e){let m=s.convertGenomeIntervalToBases(u.locus1),_=s.convertGenomeIntervalToBases(u.locus2);m=m.map(z=>z.getOverlap(i)),_=_.map(z=>z.getOverlap(i));for(const z of m)for(const C of _)if(z&&C){const A=t.baseSpanToXSpan(z),E=t.baseSpanToXSpan(C);o.push(new h3r(u,A,E))}}return o}placeGraphNodes(e,n,h){const t=new gi(n,h),i=n.getContextCoordinates(),s=n.getNavigationContext(),o=[],u=[];for(const m of e)for(let _ of m.computeNavContextCoordinates(s))if(_=_.getOverlap(i),_){const z=t.baseSpanToXSpan(_),{visiblePart:C,isReverse:A}=this._locatePlacement(m,s,_);o.push({feature:m,visiblePart:C,contextLocation:_,xSpan:z,isReverse:A})}else u.push(m);return{placements:o,nodesOutOfView:u}}}const w9="value",pu={MEAN:"MEAN",SUM:"SUM",COUNT:"COUNT",MIN:"MIN",MAX:"MAX",IMAGECOUNT:"IMAGECOUNT"},VU={};VU[pu.COUNT]=c=>c.length,VU[pu.SUM]=c=>c.length>0?Xe.sumBy(c,w9):null,VU[pu.MEAN]=c=>c.length>0?Xe.meanBy(c,w9):null,VU[pu.MIN]=c=>c.length>0?Xe.minBy(c,w9)[w9]:null,VU[pu.MAX]=c=>c.length>0?Xe.maxBy(c,w9)[w9]:null,VU[pu.IMAGECOUNT]=c=>Xe.sum(c.map(e=>e.images.length));const t3r="values",Gf={MEAN:"MEAN"},Ck={};Ck[Gf.MEAN]=c=>i3r(c,t3r)||[null];function i3r(c,e){const n=c.map(u=>u[e]),h=Xe.max(n.map(u=>u.length));let t,i,s;const o=Array(h).fill(null);for(t=0;t<h;t++){for(s=[],i=0;i<n.length;i++)t<n[i].length?s.push(n[i][t]):s.push(0);o[t]=s.slice()}return o.map(u=>Xe.mean(u))}const cs={types:pu,fromId(c){const e=VU[c];if(!e)throw new Error(`Unknown aggregator id "${c}"`);return e}},fk={types:Gf,fromId(c){const e=Ck[c];if(!e)throw new Error(`Unknown aggregator id "${c}"`);return e}};class Fl{makeXMap(e,n,h,t=!1){h=Math.round(h);const i=Array(h).fill(null);for(let u=0;u<h;u++)i[u]=[];const o=new n5().placeFeatures(e,n,h,t);for(const u of o){const m=Math.max(0,Math.floor(u.xSpan.start)),_=Math.min(h-1,Math.ceil(u.xSpan.end));for(let z=m;z<=_;z++)i[z].push(u.feature)}return i}makeXWindowMap(e,n,h,t=!1,i){const s={};h=Math.round(h);for(let m=0;m<h;m+=i)s[m]=[];const u=new n5().placeFeatures(e,n,h,t);for(const m of u){const _=Math.max(0,Math.floor(m.xSpan.start)),z=Math.min(h-1,Math.ceil(m.xSpan.end));for(let C=_;C<=z;C++)s.hasOwnProperty(C)&&s[C].push(m.feature)}return s}}var Ch=(c=>(c.AUTO="auto",c.FIXED="fixed",c))(Ch||{});function s3r(c,e,n=t=>t,h){const t=n,i=[];for(let s=0;s<c.length;s+=1){const o=s-e,u=o>=0?o:0,m=s+e+1;let _=0,z=0;for(let C=u;C<m&&C<c.length;C+=1)z+=t(c[C]),_+=1;i[s]=h?h(c[s],z/_):z/_}return i}var a3r=s3r;const Vf=Ai(a3r);class Dk{constructor(){this.aggregateFeatures=dt(this.aggregateFeatures),this.xToValueMaker=dt(this.xToValueMaker)}aggregateFeatures(e,n,h,t){return new Fl().makeXMap(e,n,h).map(cs.fromId(t))}xToValueMaker(e,n,h,t){const i=Object.assign({},At,t),{aggregateMethod:s,smooth:o,yScale:u,yMin:m}=i;let _,z,C,A=!1;if(e){const E=e.filter(I=>I.value===void 0||I.value>=0),N=e.filter(I=>I.value<0);N.length?_=this.aggregateFeatures(N,n,h,s):_=[];const y=Number.parseInt(o)||0;C=y===0?_:Vf(_,y),C.filter(I=>I).length&&(u===Ch.AUTO||u===Ch.FIXED&&m<0)&&(A=!0);const j=E.length>0?this.aggregateFeatures(E,n,h,s):[];z=y===0?j:Vf(j,y)}return[z,C,A]}}var FE="http://www.w3.org/1999/xhtml";const Bk={svg:"http://www.w3.org/2000/svg",xhtml:FE,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Jf(c){var e=c+="",n=e.indexOf(":");return n>=0&&(e=c.slice(0,n))!=="xmlns"&&(c=c.slice(n+1)),Bk.hasOwnProperty(e)?{space:Bk[e],local:c}:c}function o3r(c){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===FE&&e.documentElement.namespaceURI===FE?e.createElement(c):e.createElementNS(n,c)}}function l3r(c){return function(){return this.ownerDocument.createElementNS(c.space,c.local)}}function pk(c){var e=Jf(c);return(e.local?l3r:o3r)(e)}function u3r(){}function TE(c){return c==null?u3r:function(){return this.querySelector(c)}}function m3r(c){typeof c!="function"&&(c=TE(c));for(var e=this._groups,n=e.length,h=new Array(n),t=0;t<n;++t)for(var i=e[t],s=i.length,o=h[t]=new Array(s),u,m,_=0;_<s;++_)(u=i[_])&&(m=c.call(u,u.__data__,_,i))&&("__data__"in u&&(m.__data__=u.__data__),o[_]=m);return new e3(h,this._parents)}function _3r(c){return c==null?[]:Array.isArray(c)?c:Array.from(c)}function U3r(){return[]}function Sk(c){return c==null?U3r:function(){return this.querySelectorAll(c)}}function v3r(c){return function(){return _3r(c.apply(this,arguments))}}function d3r(c){typeof c=="function"?c=v3r(c):c=Sk(c);for(var e=this._groups,n=e.length,h=[],t=[],i=0;i<n;++i)for(var s=e[i],o=s.length,u,m=0;m<o;++m)(u=s[m])&&(h.push(c.call(u,u.__data__,m,s)),t.push(u));return new e3(h,t)}function bk(c){return function(){return this.matches(c)}}function Ek(c){return function(e){return e.matches(c)}}var z3r=Array.prototype.find;function A3r(c){return function(){return z3r.call(this.children,c)}}function g3r(){return this.firstElementChild}function C3r(c){return this.select(c==null?g3r:A3r(typeof c=="function"?c:Ek(c)))}var f3r=Array.prototype.filter;function D3r(){return Array.from(this.children)}function B3r(c){return function(){return f3r.call(this.children,c)}}function p3r(c){return this.selectAll(c==null?D3r:B3r(typeof c=="function"?c:Ek(c)))}function S3r(c){typeof c!="function"&&(c=bk(c));for(var e=this._groups,n=e.length,h=new Array(n),t=0;t<n;++t)for(var i=e[t],s=i.length,o=h[t]=[],u,m=0;m<s;++m)(u=i[m])&&c.call(u,u.__data__,m,i)&&o.push(u);return new e3(h,this._parents)}function yk(c){return new Array(c.length)}function b3r(){return new e3(this._enter||this._groups.map(yk),this._parents)}function Kf(c,e){this.ownerDocument=c.ownerDocument,this.namespaceURI=c.namespaceURI,this._next=null,this._parent=c,this.__data__=e}Kf.prototype={constructor:Kf,appendChild:function(c){return this._parent.insertBefore(c,this._next)},insertBefore:function(c,e){return this._parent.insertBefore(c,e)},querySelector:function(c){return this._parent.querySelector(c)},querySelectorAll:function(c){return this._parent.querySelectorAll(c)}};function E3r(c){return function(){return c}}function y3r(c,e,n,h,t,i){for(var s=0,o,u=e.length,m=i.length;s<m;++s)(o=e[s])?(o.__data__=i[s],h[s]=o):n[s]=new Kf(c,i[s]);for(;s<u;++s)(o=e[s])&&(t[s]=o)}function w3r(c,e,n,h,t,i,s){var o,u,m=new Map,_=e.length,z=i.length,C=new Array(_),A;for(o=0;o<_;++o)(u=e[o])&&(C[o]=A=s.call(u,u.__data__,o,e)+"",m.has(A)?t[o]=u:m.set(A,u));for(o=0;o<z;++o)A=s.call(c,i[o],o,i)+"",(u=m.get(A))?(h[o]=u,u.__data__=i[o],m.delete(A)):n[o]=new Kf(c,i[o]);for(o=0;o<_;++o)(u=e[o])&&m.get(C[o])===u&&(t[o]=u)}function x3r(c){return c.__data__}function N3r(c,e){if(!arguments.length)return Array.from(this,x3r);var n=e?w3r:y3r,h=this._parents,t=this._groups;typeof c!="function"&&(c=E3r(c));for(var i=t.length,s=new Array(i),o=new Array(i),u=new Array(i),m=0;m<i;++m){var _=h[m],z=t[m],C=z.length,A=F3r(c.call(_,_&&_.__data__,m,h)),E=A.length,N=o[m]=new Array(E),y=s[m]=new Array(E),M=u[m]=new Array(C);n(_,z,N,y,M,A,e);for(var j=0,I=0,H,G;j<E;++j)if(H=N[j]){for(j>=I&&(I=j+1);!(G=y[I])&&++I<E;);H._next=G||null}}return s=new e3(s,h),s._enter=o,s._exit=u,s}function F3r(c){return typeof c=="object"&&"length"in c?c:Array.from(c)}function T3r(){return new e3(this._exit||this._groups.map(yk),this._parents)}function R3r(c,e,n){var h=this.enter(),t=this,i=this.exit();return typeof c=="function"?(h=c(h),h&&(h=h.selection())):h=h.append(c+""),e!=null&&(t=e(t),t&&(t=t.selection())),n==null?i.remove():n(i),h&&t?h.merge(t).order():t}function M3r(c){for(var e=c.selection?c.selection():c,n=this._groups,h=e._groups,t=n.length,i=h.length,s=Math.min(t,i),o=new Array(t),u=0;u<s;++u)for(var m=n[u],_=h[u],z=m.length,C=o[u]=new Array(z),A,E=0;E<z;++E)(A=m[E]||_[E])&&(C[E]=A);for(;u<t;++u)o[u]=n[u];return new e3(o,this._parents)}function H3r(){for(var c=this._groups,e=-1,n=c.length;++e<n;)for(var h=c[e],t=h.length-1,i=h[t],s;--t>=0;)(s=h[t])&&(i&&s.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(s,i),i=s);return this}function O3r(c){c||(c=k3r);function e(z,C){return z&&C?c(z.__data__,C.__data__):!z-!C}for(var n=this._groups,h=n.length,t=new Array(h),i=0;i<h;++i){for(var s=n[i],o=s.length,u=t[i]=new Array(o),m,_=0;_<o;++_)(m=s[_])&&(u[_]=m);u.sort(e)}return new e3(t,this._parents).order()}function k3r(c,e){return c<e?-1:c>e?1:c>=e?0:NaN}function I3r(){var c=arguments[0];return arguments[0]=this,c.apply(null,arguments),this}function W3r(){return Array.from(this)}function q3r(){for(var c=this._groups,e=0,n=c.length;e<n;++e)for(var h=c[e],t=0,i=h.length;t<i;++t){var s=h[t];if(s)return s}return null}function P3r(){let c=0;for(const e of this)++c;return c}function $3r(){return!this.node()}function L3r(c){for(var e=this._groups,n=0,h=e.length;n<h;++n)for(var t=e[n],i=0,s=t.length,o;i<s;++i)(o=t[i])&&c.call(o,o.__data__,i,t);return this}function X3r(c){return function(){this.removeAttribute(c)}}function j3r(c){return function(){this.removeAttributeNS(c.space,c.local)}}function G3r(c,e){return function(){this.setAttribute(c,e)}}function V3r(c,e){return function(){this.setAttributeNS(c.space,c.local,e)}}function J3r(c,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(c):this.setAttribute(c,n)}}function K3r(c,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(c.space,c.local):this.setAttributeNS(c.space,c.local,n)}}function Z3r(c,e){var n=Jf(c);if(arguments.length<2){var h=this.node();return n.local?h.getAttributeNS(n.space,n.local):h.getAttribute(n)}return this.each((e==null?n.local?j3r:X3r:typeof e=="function"?n.local?K3r:J3r:n.local?V3r:G3r)(n,e))}function wk(c){return c.ownerDocument&&c.ownerDocument.defaultView||c.document&&c||c.defaultView}function Y3r(c){return function(){this.style.removeProperty(c)}}function Q3r(c,e,n){return function(){this.style.setProperty(c,e,n)}}function r2r(c,e,n){return function(){var h=e.apply(this,arguments);h==null?this.style.removeProperty(c):this.style.setProperty(c,h,n)}}function e2r(c,e,n){return arguments.length>1?this.each((e==null?Y3r:typeof e=="function"?r2r:Q3r)(c,e,n??"")):x9(this.node(),c)}function x9(c,e){return c.style.getPropertyValue(e)||wk(c).getComputedStyle(c,null).getPropertyValue(e)}function n2r(c){return function(){delete this[c]}}function c2r(c,e){return function(){this[c]=e}}function h2r(c,e){return function(){var n=e.apply(this,arguments);n==null?delete this[c]:this[c]=n}}function t2r(c,e){return arguments.length>1?this.each((e==null?n2r:typeof e=="function"?h2r:c2r)(c,e)):this.node()[c]}function xk(c){return c.trim().split(/^|\s+/)}function RE(c){return c.classList||new Nk(c)}function Nk(c){this._node=c,this._names=xk(c.getAttribute("class")||"")}Nk.prototype={add:function(c){var e=this._names.indexOf(c);e<0&&(this._names.push(c),this._node.setAttribute("class",this._names.join(" ")))},remove:function(c){var e=this._names.indexOf(c);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(c){return this._names.indexOf(c)>=0}};function Fk(c,e){for(var n=RE(c),h=-1,t=e.length;++h<t;)n.add(e[h])}function Tk(c,e){for(var n=RE(c),h=-1,t=e.length;++h<t;)n.remove(e[h])}function i2r(c){return function(){Fk(this,c)}}function s2r(c){return function(){Tk(this,c)}}function a2r(c,e){return function(){(e.apply(this,arguments)?Fk:Tk)(this,c)}}function o2r(c,e){var n=xk(c+"");if(arguments.length<2){for(var h=RE(this.node()),t=-1,i=n.length;++t<i;)if(!h.contains(n[t]))return!1;return!0}return this.each((typeof e=="function"?a2r:e?i2r:s2r)(n,e))}function l2r(){this.textContent=""}function u2r(c){return function(){this.textContent=c}}function m2r(c){return function(){var e=c.apply(this,arguments);this.textContent=e??""}}function _2r(c){return arguments.length?this.each(c==null?l2r:(typeof c=="function"?m2r:u2r)(c)):this.node().textContent}function U2r(){this.innerHTML=""}function v2r(c){return function(){this.innerHTML=c}}function d2r(c){return function(){var e=c.apply(this,arguments);this.innerHTML=e??""}}function z2r(c){return arguments.length?this.each(c==null?U2r:(typeof c=="function"?d2r:v2r)(c)):this.node().innerHTML}function A2r(){this.nextSibling&&this.parentNode.appendChild(this)}function g2r(){return this.each(A2r)}function C2r(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function f2r(){return this.each(C2r)}function D2r(c){var e=typeof c=="function"?c:pk(c);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function B2r(){return null}function p2r(c,e){var n=typeof c=="function"?c:pk(c),h=e==null?B2r:typeof e=="function"?e:TE(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),h.apply(this,arguments)||null)})}function S2r(){var c=this.parentNode;c&&c.removeChild(this)}function b2r(){return this.each(S2r)}function E2r(){var c=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(c,this.nextSibling):c}function y2r(){var c=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(c,this.nextSibling):c}function w2r(c){return this.select(c?y2r:E2r)}function x2r(c){return arguments.length?this.property("__data__",c):this.node().__data__}function N2r(c){return function(e){c.call(this,e,this.__data__)}}function F2r(c){return c.trim().split(/^|\s+/).map(function(e){var n="",h=e.indexOf(".");return h>=0&&(n=e.slice(h+1),e=e.slice(0,h)),{type:e,name:n}})}function T2r(c){return function(){var e=this.__on;if(e){for(var n=0,h=-1,t=e.length,i;n<t;++n)i=e[n],(!c.type||i.type===c.type)&&i.name===c.name?this.removeEventListener(i.type,i.listener,i.options):e[++h]=i;++h?e.length=h:delete this.__on}}}function R2r(c,e,n){return function(){var h=this.__on,t,i=N2r(e);if(h){for(var s=0,o=h.length;s<o;++s)if((t=h[s]).type===c.type&&t.name===c.name){this.removeEventListener(t.type,t.listener,t.options),this.addEventListener(t.type,t.listener=i,t.options=n),t.value=e;return}}this.addEventListener(c.type,i,n),t={type:c.type,name:c.name,value:e,listener:i,options:n},h?h.push(t):this.__on=[t]}}function M2r(c,e,n){var h=F2r(c+""),t,i=h.length,s;if(arguments.length<2){var o=this.node().__on;if(o){for(var u=0,m=o.length,_;u<m;++u)for(t=0,_=o[u];t<i;++t)if((s=h[t]).type===_.type&&s.name===_.name)return _.value}return}for(o=e?R2r:T2r,t=0;t<i;++t)this.each(o(h[t],e,n));return this}function Rk(c,e,n){var h=wk(c),t=h.CustomEvent;typeof t=="function"?t=new t(e,n):(t=h.document.createEvent("Event"),n?(t.initEvent(e,n.bubbles,n.cancelable),t.detail=n.detail):t.initEvent(e,!1,!1)),c.dispatchEvent(t)}function H2r(c,e){return function(){return Rk(this,c,e)}}function O2r(c,e){return function(){return Rk(this,c,e.apply(this,arguments))}}function k2r(c,e){return this.each((typeof e=="function"?O2r:H2r)(c,e))}function*I2r(){for(var c=this._groups,e=0,n=c.length;e<n;++e)for(var h=c[e],t=0,i=h.length,s;t<i;++t)(s=h[t])&&(yield s)}var Mk=[null];function e3(c,e){this._groups=c,this._parents=e}function Kz(){return new e3([[document.documentElement]],Mk)}function W2r(){return this}e3.prototype=Kz.prototype={constructor:e3,select:m3r,selectAll:d3r,selectChild:C3r,selectChildren:p3r,filter:S3r,data:N3r,enter:b3r,exit:T3r,join:R3r,merge:M3r,selection:W2r,order:H3r,sort:O3r,call:I3r,nodes:W3r,node:q3r,size:P3r,empty:$3r,each:L3r,attr:Z3r,style:e2r,property:t2r,classed:o2r,text:_2r,html:z2r,raise:g2r,lower:f2r,append:D2r,insert:p2r,remove:b2r,clone:w2r,datum:x2r,on:M2r,dispatch:k2r,[Symbol.iterator]:I2r};function Su(c){return typeof c=="string"?new e3([[document.querySelector(c)]],[document.documentElement]):new e3([[c]],Mk)}function q2r(c){return c}var P2r=4,Hk=1e-6;function $2r(c){return"translate(0,"+c+")"}function L2r(c){return e=>+c(e)}function X2r(c,e){return e=Math.max(0,c.bandwidth()-e*2)/2,c.round()&&(e=Math.round(e)),n=>+c(n)+e}function j2r(){return!this.__axis}function G2r(c,e){var n=[],h=null,t=null,i=6,s=6,o=3,u=typeof window<"u"&&window.devicePixelRatio>1?0:.5,m=-1,_="x",z=$2r;function C(A){var E=h??(e.ticks?e.ticks.apply(e,n):e.domain()),N=t??(e.tickFormat?e.tickFormat.apply(e,n):q2r),y=Math.max(i,0)+o,M=e.range(),j=+M[0]+u,I=+M[M.length-1]+u,H=(e.bandwidth?X2r:L2r)(e.copy(),u),G=A.selection?A.selection():A,K=G.selectAll(".domain").data([null]),T=G.selectAll(".tick").data(E,e).order(),q=T.exit(),P=T.enter().append("g").attr("class","tick"),V=T.select("line"),Q=T.select("text");K=K.merge(K.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),T=T.merge(P),V=V.merge(P.append("line").attr("stroke","currentColor").attr(_+"2",m*i)),Q=Q.merge(P.append("text").attr("fill","currentColor").attr(_,m*y).attr("dy","0.32em")),A!==G&&(K=K.transition(A),T=T.transition(A),V=V.transition(A),Q=Q.transition(A),q=q.transition(A).attr("opacity",Hk).attr("transform",function(er){return isFinite(er=H(er))?z(er+u):this.getAttribute("transform")}),P.attr("opacity",Hk).attr("transform",function(er){var rr=this.parentNode.__axis;return z((rr&&isFinite(rr=rr(er))?rr:H(er))+u)})),q.remove(),K.attr("d",s?"M"+m*s+","+j+"H"+u+"V"+I+"H"+m*s:"M"+u+","+j+"V"+I),T.attr("opacity",1).attr("transform",function(er){return z(H(er)+u)}),V.attr(_+"2",m*i),Q.attr(_,m*y).text(N),G.filter(j2r).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor","end"),G.each(function(){this.__axis=H})}return C.scale=function(A){return arguments.length?(e=A,C):e},C.ticks=function(){return n=Array.from(arguments),C},C.tickArguments=function(A){return arguments.length?(n=A==null?[]:Array.from(A),C):n.slice()},C.tickValues=function(A){return arguments.length?(h=A==null?null:Array.from(A),C):h&&h.slice()},C.tickFormat=function(A){return arguments.length?(t=A,C):t},C.tickSize=function(A){return arguments.length?(i=s=+A,C):i},C.tickSizeInner=function(A){return arguments.length?(i=+A,C):i},C.tickSizeOuter=function(A){return arguments.length?(s=+A,C):s},C.tickPadding=function(A){return arguments.length?(o=+A,C):o},C.offset=function(A){return arguments.length?(u=+A,C):u},C}function Ok(c){return G2r(P2r,c)}const V2r={A:"T",T:"A",G:"C",C:"G"};function J2r(c){let e="";for(let n=c.length-1;n>=0;n--){const h=c.charAt(n),t=V2r[h.toUpperCase()];e+=t||h}return e}const ME={G:"#3899c7",C:"#e05144",T:"#9238c7",A:"#89c738",N:"#858585"},K2r="black";class N9 extends Z.PureComponent{render(){const{sequence:e,xSpan:n,y:h,isDrawBackground:t,height:i,letterSize:s,isReverseComplement:o,minXwidthPerBase:u,drawHeights:m,zeroLine:_}=this.props;if(!e)return null;const z=(n.end-n.start)/e.length;if(z<u)return null;const C=o?J2r(e):e,A=[];if(t){let y=n.start;for(const M of C)A.push(S.jsx("rect",{x:y,y:h,width:z,height:i,style:{fill:ME[M.toUpperCase()]||K2r}},y)),y+=z}const E=[],N=!!m&&m.length>0;if(z>=s){let y=n.start;for(const M of C){const j=y+z*.5;if(N){const I=m[Math.floor(j)]/z;E.push(S.jsx("text",{x:j,y:_,dominantBaseline:"auto",transform:`translate(${j} ${_}) scale(1 ${I}) translate(-${j} -${_})`,style:{textAnchor:"middle",fill:ME[M.toUpperCase()],fontSize:1.4*z},children:M.toUpperCase()},y))}else E.push(S.jsx("text",{x:j,y:h+i/2+1,dominantBaseline:"middle",style:{textAnchor:"middle",fill:"white",fontSize:s},children:M},y));y+=z}}return S.jsxs(Z.Fragment,{children:[A,E]})}}_r(N9,"MIN_X_WIDTH_PER_BASE",1),_r(N9,"defaultProps",{isDrawBackground:!0,height:15,letterSize:12,y:0,minXwidthPerBase:1});const Zf=32;class xi extends Z.PureComponent{constructor(n){super(n);_r(this,"gNode");this.gNode=null,this.handleRef=this.handleRef.bind(this),this.plotATCGLegend=this.plotATCGLegend.bind(this)}componentDidMount(){this.drawAxis()}componentDidUpdate(n){(this.props.axisScale!==n.axisScale||this.props.noShiftFirstAxisLabel!==n.noShiftFirstAxisLabel)&&this.drawAxis()}handleRef(n){this.gNode=n}drawAxis(){if(this.gNode&&this.props.axisScale){for(;this.gNode.hasChildNodes();)this.gNode.lastChild.remove();const n=Ok(this.props.axisScale),h=this.props.axisScale.domain();h.includes(NaN)||(h[0]>1e3?n.tickValues(h).tickFormat(jf(".3s")):n.tickValues(h));const t=this.props.axisScaleReverse||this.props.noShiftFirstAxisLabel?"0.32em":"-0.1em";if(h[0]!==h[1]&&Su(this.gNode).append("g").call(n),Su(this.gNode).selectAll("text").filter((i,s)=>s===0).attr("dy","0.8em"),Su(this.gNode).selectAll("text").filter((i,s)=>s===1).attr("dy",t),this.props.hideFirstAxisLabel&&Su(this.gNode).selectAll(".tick").filter((i,s)=>s===0).remove(),this.props.axisScaleReverse){const i=Ok(this.props.axisScaleReverse),s=this.props.axisScaleReverse.domain();s.includes(NaN)||i.tickValues(s),s[0]!==s[1]&&Su(this.gNode).append("g").attr("transform","translate(0,"+this.props.height*.5+")").call(i).selectAll(".tick").filter(o=>o===0).remove(),Su(this.gNode).selectAll("text").filter((o,u)=>u===2).attr("dy","-0.1em")}Su(this.gNode).selectAll("text").attr("class","svg-text-bg"),Su(this.gNode).selectAll("line").attr("class","svg-line-bg"),Su(this.gNode).selectAll("path").attr("class","svg-line-bg")}}getLabelWidth(){if(this.props.axisScale)return this.props.trackModel.legendWidth?this.props.trackModel.legendWidth-Zf:this.props.width-Zf}plotATCGLegend(){return Object.entries(ME).map(h=>S.jsx("div",{style:{backgroundColor:h[1],color:"white"},children:h[0]},h[0]))}render(){const{trackModel:n,width:h,height:t,axisScale:i,style:s,axisScaleReverse:o,trackViewRegion:u,trackWidth:m,selectedRegion:_,label:z,forceSvg:C}=this.props;if(t<=0)return null;const A=o?t*.5:t,E={display:"flex",width:h,minWidth:h,height:A,zIndex:10,justifyContent:"space-between"};C&&(E.backgroundColor="var(--bg-color)",E.color="var(--font-color)");const N=Object.assign(E,s),y={width:this.getLabelWidth(),maxHeight:t};let M;i&&(M=S.jsx("svg",{width:Zf,height:A,style:{overflow:"visible"},children:S.jsx(Nt,{innerRef:this.handleRef,x:Zf-1})}));let j=!1,I="";if(n.type==="ruler"){new gi(u,m).basesToXWidth(1)>N9.MIN_X_WIDTH_PER_BASE?j=!0:j=!1;const T=_.getFeatureSegments().filter(q=>q&&q.feature.getName()!=="Gap");T.length===1&&(I=T[0].feature.getName()),T.length>1&&(I+=`-${T[T.length-1].feature.getName()}`)}let H;if(n.type==="matplot"){const G=n.tracks.map((K,T)=>{const q=K.options.color||"blue";return S.jsx("div",{style:{color:q},children:K.label},T)});H=S.jsx("div",{style:{display:"grid",gridTemplateColumns:"auto",alignItems:"end",fontSize:"10px"},children:G})}return S.jsxs("div",{style:N,children:[S.jsxs("div",{className:"TrackLegend-wrap",title:n.options.label,children:[S.jsx("p",{className:"TrackLegend-label",style:{...y,wordWrap:"break-word",whiteSpace:"normal"},children:z||n.options.label}),S.jsx("div",{style:{display:"flex",alignItems:"center",fontSize:"12px"},children:j&&this.plotATCGLegend()}),H,I?S.jsx("div",{style:{fontSize:"11px",alignSelf:"flex-end"},className:"TrackLegend-chrLabel",children:I}):""]}),M]})}}_r(xi,"defaultProps",{width:120,forceSvg:!1});const Z2r="-";function kk(c,e,n=!1){const h=n?-1:1,t=[];let i=e;for(const s of c)t.push(i),s!==Z2r&&(i+=h);return t}class Y2r extends Z.Component{render(){const{alignment:e,x:n,halfLength:h,target:t,query:i,basesPerPixel:s}=this.props;if(e){let o=function(he,se){const ee=he.split(""),le=se.split("");return ee.map(function(Le,Gr){return Le===le[Gr]?"|":" "}).join("")};const u=Math.max(Math.round(s),1),m=Math.floor(u/2),{visiblePart:_,record:z}=e,{start:C,end:A}=_.sequenceInterval,E=A-C,N=Math.floor((n-e.targetXSpan.start)/(e.targetXSpan.end-e.targetXSpan.start)*E),y=N-h>0?N-h:0,M=N+h<E?N+h:E-1,j=N-m>0?N-m:0,I=N+m<E?N+m:E-1,H=z.targetSeq.substr(C+y,j-y).toUpperCase(),G=z.targetSeq.substr(C+j,u).toUpperCase(),K=z.targetSeq.substr(C+j+u,M-I).toUpperCase(),T=z.querySeq.substr(C+y,j-y).toUpperCase(),q=z.querySeq.substr(C+j,u).toUpperCase(),P=z.querySeq.substr(C+j+u,M-I).toUpperCase(),V=kk(e.targetSequence,_.relativeStart),Q=z.locus.start+V[y],er=z.locus.start+V[M],rr=z.locus.start+V[j],Ur=z.locus.start+V[I],Sr=z.queryStrand==="-",Ar=Sr?e.queryLocusFine.end:e.queryLocusFine.start,mr=kk(e.querySequence,Ar,Sr),ar=mr[y],ur=mr[M],br=mr[j],or=mr[I],vr=Math.max(Q.toString().length,er.toString().length,ar.toString().length,ur.toString().length)*10+10+"px",Er=o(H,T),Hr=o(G,q),Xr=o(K,P);return S.jsxs(Z.Fragment,{children:[S.jsxs("div",{children:[S.jsxs("span",{children:[t,":",z.locus.chr,":"," "]}),S.jsxs("span",{className:"Tooltip-highlight-text",children:[rr,"-",Ur]})]}),S.jsxs("div",{children:[S.jsx("span",{className:"Tooltip-monospace-text",style:{width:vr},children:Q}),S.jsx("span",{className:"Tooltip-monospace-seq",children:H}),S.jsx("span",{className:"Tooltip-monospace-central-seq",children:G}),S.jsx("span",{className:"Tooltip-monospace-seq",children:K}),S.jsx("span",{className:"Tooltip-monospace-text",style:{width:vr},children:er})]}),S.jsxs("div",{children:[S.jsx("pre",{className:"Tooltip-monospace-seq",style:{marginLeft:vr},children:Er}),S.jsx("pre",{className:"Tooltip-monospace-central-seq",children:Hr}),S.jsx("pre",{className:"Tooltip-monospace-seq",children:Xr})]}),S.jsxs("div",{children:[S.jsx("span",{className:"Tooltip-monospace-text",style:{width:vr},children:ar}),S.jsx("span",{className:"Tooltip-monospace-seq",children:T}),S.jsx("span",{className:"Tooltip-monospace-central-seq",children:q}),S.jsx("span",{className:"Tooltip-monospace-seq",children:P}),S.jsx("span",{className:"Tooltip-monospace-text",style:{width:vr},children:ur})]}),S.jsxs("div",{children:[S.jsxs("span",{children:[i,":",z.queryLocus.chr,":"," "]}),S.jsxs("span",{className:"Tooltip-highlight-text",children:[br,"-",or]})]})]})}else return S.jsx("div",{children:"No alignment available"})}}const Yf=1,HE=2,OE=5,Q2r=10;class rlr extends Z.Component{constructor(e){super(e)}render(){const{height:e,segmentArray:n,strand:h,viewWindowStart:t,primaryColor:i,queryColor:s,style:o,children:u,rectHeight:m,relativeX:_,...z}=this.props,C=n.strandList,A=n.targetXSpanList,E=n.queryXSpanList,N=n.targetLocusList,y=n.queryLocusList,M=n.lengthList,j=n.queryLengthList,I=A.reduce((G,K,T)=>K.start<_&&K.end>=_?T:G,NaN);let H;if(isNaN(I))H=S.jsx(Z.Fragment,{children:null});else{const G=A[I],K=E[I],T=`${N[I]} (${M[I]})`,q=`${y[I]} (${j[I]})`,P=C[I]===h?K.start+(K.end-K.start)*(_-G.start)/(G.end-G.start):K.end-(K.end-K.start)*(_-G.start)/(G.end-G.start);H=S.jsxs(Z.Fragment,{children:[S.jsx(Ik,{relativeY:Yf,xSpan:G,viewWindowStart:t,color:i,locus:T,textHeight:10}),S.jsx(Wk,{relativeX:_-OE,relativeY:Yf+HE+m,color:i,direction:"down"}),S.jsx(Wk,{relativeX:P-OE,relativeY:e-m-Yf-HE-OE,color:s,direction:"up"}),S.jsx(Ik,{relativeY:e-Yf-HE,xSpan:K,viewWindowStart:t,color:s,locus:q,textHeight:-35})]})}return S.jsxs("div",{style:o,...z,children:[u,H]})}}function Ik(c){const{relativeY:e,xSpan:n,viewWindowStart:h,color:t,locus:i,textHeight:s}=c,o=n?n.end-n.start:0;i.length*Q2r;const u={top:e,left:0,width:o,height:2,color:t,willChange:"top"},m={marginTop:s,whiteSpace:"nowrap",marginLeft:0};return n?S.jsxs("div",{className:"Fragment-horizontal-line",style:u,children:[" ",S.jsx("p",{style:m,children:i})," "]}):null}function Wk(c){const{relativeX:e,relativeY:n,color:h,direction:t}=c,i={top:n,left:0,color:h},s=t==="up"?"arrow-up":"arrow-down";return S.jsx("div",{className:s,style:i})}let Tm=(CM=class extends Z.Component{render(){const{viewRegion:e,width:n,x:h}=this.props,t=new gi(e,n);let i;try{i=t.xToSegmentCoordinate(h)}catch{return null}if(ws.isGapFeature(i.feature))return i.getName();{const s=i.getLocus(),o=Math.floor(s.start),u=Math.ceil(o+t.xWidthToBases(1));return`${s.chr}:${o+1}-${u}`}}},_r(CM,"propTypes",{viewRegion:$r.instanceOf(kn).isRequired,width:$r.number.isRequired,x:$r.number.isRequired}),CM);var Qf={exports:{}},elr=function(e,n,h,t){var i=e[0],s=e[1],o=!1;h===void 0&&(h=0),t===void 0&&(t=n.length);for(var u=(t-h)/2,m=0,_=u-1;m<u;_=m++){var z=n[h+m*2+0],C=n[h+m*2+1],A=n[h+_*2+0],E=n[h+_*2+1],N=C>s!=E>s&&i<(A-z)*(s-C)/(E-C)+z;N&&(o=!o)}return o},nlr=function(e,n,h,t){var i=e[0],s=e[1],o=!1;h===void 0&&(h=0),t===void 0&&(t=n.length);for(var u=t-h,m=0,_=u-1;m<u;_=m++){var z=n[m+h][0],C=n[m+h][1],A=n[_+h][0],E=n[_+h][1],N=C>s!=E>s&&i<(A-z)*(s-C)/(E-C)+z;N&&(o=!o)}return o},qk=elr,Pk=nlr;Qf.exports=function(e,n,h,t){return n.length>0&&Array.isArray(n[0])?Pk(e,n,h,t):qk(e,n,h,t)},Qf.exports.nested=Pk,Qf.exports.flat=qk;var clr=Qf.exports;const F9=Ai(clr);function hlr(c){const e=c.getBoundingClientRect();return{top:e.top+window.pageYOffset,left:e.left+window.pageXOffset,height:e.height}}const tlr={numerical:function(e){const n=e.data[Math.round(e.relativeX)],h=e.hasReverse?e.data2[Math.round(e.relativeX)]:null,t=typeof n=="number"&&!Number.isNaN(n)?n.toFixed(2):"(no data)",i=typeof h=="number"&&!Number.isNaN(h)?h.toFixed(2):"(no data)";return{toolTip:S.jsxs("div",{children:[S.jsxs("div",{children:[S.jsxs("span",{className:"Tooltip-major-text",style:{marginRight:3},children:[e.hasReverse&&"Forward: "," ",t]}),e.unit&&S.jsx("span",{className:"Tooltip-minor-text",children:e.unit})]}),e.hasReverse&&S.jsxs("div",{children:[S.jsxs("span",{className:"Tooltip-major-text",style:{marginRight:3},children:["Reverse: ",i]}),e.unit&&S.jsx("span",{className:"Tooltip-minor-text",children:e.unit})]}),S.jsx("div",{className:"Tooltip-minor-text",children:S.jsx(Tm,{viewRegion:e.viewRegion,width:e.width,x:e.relativeX})}),S.jsx("div",{className:"Tooltip-minor-text",children:e.trackModel.getDisplayLabel()})]})}},dbedgraph:function(e){const{trackModel:n,viewRegion:h,width:t,relativeX:i,data:s}=e;if(!s)return null;const o=s[Math.round(i)],u=Xe.compact(o).length?JSON.stringify(o):"(no data)";return{toolTip:S.jsxs("div",{children:[u,S.jsx("div",{className:"Tooltip-minor-text",children:S.jsx(Tm,{viewRegion:h,width:t,x:i})}),S.jsx("div",{className:"Tooltip-minor-text",children:n.getDisplayLabel()})]})}},dynamichic:function(e){const{data:n,relativeX:h,relativeY:t,trackModel:i}=e,o=((u,m)=>{const _=[];for(const z of n)for(const C of z)if(F9([u,m],C.points)){_.push(C);break}return _})(h,t);if(o.length)return{toolTip:S.jsx("div",{children:o.map((u,m)=>{var _;return S.jsxs("div",{children:[S.jsx("div",{children:S.jsx("strong",{children:(_=i==null?void 0:i.tracks[m])==null?void 0:_.label})}),S.jsxs("div",{children:["Locus1: ",u.interaction.locus1.toString()]}),S.jsxs("div",{children:["Locus2: ",u.interaction.locus2.toString()]}),S.jsxs("div",{children:["Score: ",u.interaction.score]})]},m)})})}},dynamic:function(e){const{trackModel:n,viewRegion:h,width:t,unit:i,data:s,relativeX:o}=e;if(!s)return null;const _=s.map(z=>z[Math.round(o)]).map(z=>typeof z=="number"&&!Number.isNaN(z)?z.toFixed(2):"(no data)").map((z,C)=>{const A=n.tracks[C].options.color||"blue";return S.jsxs("div",{children:[S.jsxs("span",{style:{color:A},children:[n.tracks[C].label," ",z]}),i&&S.jsx("span",{className:"Tooltip-minor-text",children:i})]},C)});return{toolTip:S.jsxs("div",{children:[_,S.jsx("div",{className:"Tooltip-minor-text",children:S.jsx(Tm,{viewRegion:h,width:t,x:o})}),S.jsx("div",{className:"Tooltip-minor-text",children:n.getDisplayLabel()})]})}},modbed:function(e){const n=e.relativeX,h=Math.round(n),t=e.scale?e.scale.pcts:null,i=e.data[h];return!i.count||!t?null:{toolTip:S.jsxs("div",{children:[S.jsxs("div",{children:["methylation level: ",t[h].toFixed(3)]}),S.jsxs("div",{children:[i.on," modified base(s)/",i.off," canonical base(s)"]}),S.jsxs("div",{children:[i.count," reads"]})]})}},matplot:function(e){const{trackModel:n,viewRegion:h,width:t,unit:i,data:s,relativeX:o}=e;if(!s)return null;const _=s.map(z=>z[Math.round(o)]).map(z=>typeof z=="number"&&!Number.isNaN(z)?z.toFixed(2):"(no data)").map((z,C)=>{const A=n.tracks[C].options.color||"blue";return S.jsxs("div",{children:[S.jsxs("span",{style:{color:A},children:[n.tracks[C].label," ",z]}),i&&S.jsx("span",{className:"Tooltip-minor-text",children:i})]},C)});return{toolTip:S.jsxs("div",{children:[_,S.jsx("div",{className:"Tooltip-minor-text",children:S.jsx(Tm,{viewRegion:h,width:t,x:o})}),S.jsx("div",{className:"Tooltip-minor-text",children:n.getDisplayLabel()})]})}},boxplot:function(e){const{trackModel:n,viewRegion:h,width:t,unit:i,data:s,xAlias:o,relativeX:u}=e;if(!s||!o)return null;const m=s[o[Math.round(u)]],_=m?S.jsxs("div",{className:"Tooltip-major-text",style:{marginRight:3},children:[S.jsxs("div",{children:["Total values: ",m.count]}),S.jsxs("div",{children:["Low: ",m.min]}),S.jsxs("div",{children:["High: ",m.max]}),S.jsxs("div",{children:["Quantile 1: ",m.q1]}),S.jsxs("div",{children:["Quantile 3: ",m.q3]}),S.jsxs("div",{children:["Median: ",m.median]})]}):"(no data)";return{toolTip:S.jsxs("div",{children:[S.jsxs("div",{children:[_,i&&S.jsx("span",{className:"Tooltip-minor-text",children:i})]}),S.jsx("div",{className:"Tooltip-minor-text",children:S.jsx(Tm,{viewRegion:h,width:t,x:u})}),S.jsx("div",{className:"Tooltip-minor-text",children:n.getDisplayLabel()})]})}},methyc:function(e){const{trackModel:n,viewRegion:h,width:t,options:i}=e,s=e.data[Math.round(e.relativeX)];return{toolTip:S.jsxs("div",{children:[u(s,i.isCombineStrands?"combined":"forward"),!i.isCombineStrands&&u(s,"reverse"),S.jsx("div",{className:"Tooltip-minor-text",children:S.jsx(Tm,{viewRegion:h,width:t,x:e.relativeX})}),S.jsx("div",{className:"Tooltip-minor-text",children:n.getDisplayLabel()})]})};function o(m){return{color:Y4(m),backgroundColor:m,padding:"0px 3px",borderRadius:3}}function u(m,_){const{depthColor:z,colorsForContext:C,depthFilter:A}=e.options,E=m[_];let N;if(E){if(E.depth<A)return null;let y=[];const M=Xe.sortBy(E.contextValues,"context");for(let j of M){const I=j.context,H=(C[I]||e.options.CG).color;y.push(S.jsx("div",{style:o(H),children:I},I+"label"),S.jsx("div",{children:j.value.toFixed(2)},I+"value"))}N=S.jsxs("div",{className:"MethylCTrack-tooltip-strand-details",children:[S.jsx("div",{style:o(z),children:"Depth"}),S.jsx("div",{children:Math.round(E.depth)}),y]})}return S.jsxs("div",{className:"MethylCTrack-tooltip-strand",children:[S.jsx("span",{className:"MethylCTrack-tooltip-strand-title",children:_}),N||S.jsx("div",{className:"Tooltip-minor-text",children:"(No data)"})]},_)}},interactionHeatmap:function(e){const n=t(e.relativeX,e.relativeY);function h(){if(n){let{xSpan1:s,xSpan2:o}=n;hlr(e.targetRef.current);const u=s.start,m=o.start,_=u-e.viewWindow.start+120+"px",z=m-e.viewWindow.start+120+"px",C=u+120+"px",A=m+120+"px",E=Math.max(s.getLength(),1),N=Math.max(o.getLength(),1);return S.jsxs(S.Fragment,{children:[S.jsx("div",{id:"beamLeft",style:{position:"absolute",display:"block",left:e.options.packageVersion?C:_,width:E+"px",height:"100%",zIndex:1e3},children:S.jsx("div",{id:"beamLeftInner"})}),S.jsx("div",{id:"beamRight",style:{position:"absolute",display:"block",left:e.options.packageVersion?A:z,width:N+"px",height:"1000",zIndex:1e3},children:S.jsx("div",{id:"beamRightInner"})})]})}else return null}function t(s,o){for(const u of e.data)if(F9([s,o],u.points))return u;return null}let i=h();return i?{beams:i,toolTip:S.jsxs("div",{children:[S.jsxs("div",{children:["Locus1: ",n.interaction.locus1.toString()]}),S.jsxs("div",{children:["Locus2: ",n.interaction.locus2.toString()]}),S.jsxs("div",{children:["Score: ",n.interaction.score]})]})}:""},interactionArc:function(e){function n(s,o){if(e.options.greedyTooltip){const u=t(s,o);if(u.length){const m=Xe.sortBy(u,C=>C[4].score),_=[];for(let C=m.length-1;C>=m.length-6&&C>=0&&!(_.length>2);C--)_.length>0&&qz(m[C][4].locus1,_[_.length-1][4].locus2)&&qz(m[C][4].locus2,_[_.length-1][4].locus1)||_.push(m[C]);const z=_.map((C,A)=>S.jsxs("div",{children:[C[4].name&&S.jsx("div",{children:C[4].name}),S.jsxs("div",{children:["Locus1: ",C[4].locus1.toString()]}),S.jsxs("div",{children:["Locus2: ",C[4].locus2.toString()]}),S.jsxs("div",{children:["Score: ",C[4].score]})]},A));return S.jsxs("div",{children:[S.jsxs("div",{children:[u.length," interactions found. Showing top 3:"]}),S.jsx("div",{children:z})]})}else return null}else{const u=h(s,o);return u?S.jsxs("div",{children:[u[4].name&&S.jsx("div",{children:u[4].name}),S.jsxs("div",{children:["Locus1: ",u[4].locus1.toString()]}),S.jsxs("div",{children:["Locus2: ",u[4].locus2.toString()]}),S.jsxs("div",{children:["Score: ",u[4].score]})]}):null}}function h(s,o){for(const u of e.data)if(Math.abs(Math.sqrt(Math.pow(s-u[0],2)+Math.pow(o-u[1],2))-u[2])<=.5*u[3])return u;return null}function t(s,o){const u=[];for(const m of e.data)Math.abs(Math.sqrt(Math.pow(s-m[0],2)+Math.pow(o-m[1],2))-m[2])<=.5*m[3]&&u.push(m);return u}let i=n(e.relativeX,e.relativeY);return i?{toolTip:i}:""},interactionSquareDisplay:function(e){const n=t(e.relativeX,e.relativeY);let h;n&&(n.xSpan1,n.xSpan2,h=n.interaction);function t(i,s){for(const o of e.data)if(F9([i,s],o.pointLeft)||F9([i,s],o.pointRight))return o;return null}return n?{toolTip:S.jsxs("div",{children:[S.jsxs("div",{children:["Locus1: ",h.locus1.toString()]}),S.jsxs("div",{children:["Locus2: ",h.locus2.toString()]}),S.jsxs("div",{children:["Score: ",h.score]})]})}:""},genomealignFine:function(e){const{basesPerPixel:n,primaryGenome:h,queryGenome:t}=e.data,i=e.data.drawData,s=i.reduce((m,_,z)=>_.targetXSpan.start<e.relativeX&&_.targetXSpan.end>=e.relativeX?z:m,NaN),o=i[s];return{toolTip:S.jsx(Y2r,{alignment:o,x:e.relativeX,halfLength:10,target:h,query:t,basesPerPixel:n})}},genomealignRough:function(e){return{toolTip:S.jsx(rlr,{height:e.options.height,rectHeight:15,primaryColor:e.options.primaryColor,queryColor:e.options.queryColor,segmentArray:e.data,strand:e.data.plotStrand,viewWindowStart:e.width,relativeX:e.relativeX})}}};function $k(c){return c&&typeof c=="object"&&!Array.isArray(c)&&Object.keys(c).length>0}function Lk(c){return Array.isArray(c)&&c.length>0}function ilr(c){return $k(c)||Lk(c)}const slr=Z.memo(function({data:e,windowWidth:n,trackIdx:h,trackType:t,height:i,trackModel:s,viewRegion:o,unit:u,data2:m,hasReverse:_,options:z,viewWindow:C,legendWidth:A,scale:E,xAlias:N}){const y=Z.useRef(null),[M,j]=Z.useState(!1),[I,H]=Z.useState({top:0,left:0,right:0,dataIdxX:0,dataIdxY:0,toolTip:S.jsx(S.Fragment,{}),beams:S.jsx(S.Fragment,{})}),G=T=>{if(Lk(e)||$k(e)&&ilr(e)){const q=y.current.getBoundingClientRect();let P=Math.round(T.pageX-q.left),V=Math.round(T.pageY-(window.scrollY+q.top-1)),Q=tlr[t]({data:e,trackModel:s,data2:m,viewRegion:o,width:n,unit:u,relativeX:P,relativeY:V,hasReverse:_,options:z,viewWindow:C,legendWidth:A,targetRef:y,scale:E,xAlias:N});Q?(H({...I,top:q.bottom,left:q.left,right:q.right,dataIdxX:P,dataIdxY:V,toolTip:Q.toolTip,beams:Q.beams?Q.beams:S.jsx(S.Fragment,{})}),j(!0)):j(!1)}},K=()=>{j(!1)};return Z.useEffect(()=>(j(!1),y.current!==null&&(y.current.addEventListener("mousemove",G),y.current.addEventListener("mouseleave",K)),()=>{y.current!==null&&(y.current.removeEventListener("mousemove",G),y.current.removeEventListener("mouseleave",K))}),[e]),S.jsx("div",{ref:y,style:{width:n,height:i,position:"relative",zIndex:-1},children:M?S.jsxs(S.Fragment,{children:[z&&z.trackManagerRef?Tn.createPortal(I.beams,z.trackManagerRef.current):"",Tn.createPortal(S.jsx("div",{style:{position:"absolute",top:I.top+window.scrollY,left:I.left+I.dataIdxX,backgroundColor:"lightBlue",borderRadius:4,fontSize:14,zIndex:1e3},children:I.toolTip}),document.body)]}):""},`tooltip-${h}`)}),Ha=Z.memo(slr),At={aggregateMethod:cs.types.MEAN,displayMode:Nl.AUTO,height:40,color:"blue",colorAboveMax:"red",color2:"darkorange",color2BelowMin:"darkgreen",yScale:Ch.AUTO,yMax:10,yMin:0,smooth:0,ensemblStyle:!1,backgroundColor:"var(--bg-color)"},alr=21,bu=2,T9=c=>{const{data:e,viewRegion:n,width:h,trackModel:t,unit:i,options:s,forceSvg:o,getNumLegend:u,groupScale:m,xvaluesData:_,viewWindow:z}=c,{height:C,color:A,color2:E,colorAboveMax:N,color2BelowMin:y}=s,M=Z.useMemo(()=>new Dk,[]);let j=_||M.xToValueMaker(e,n,h,s),[I,H,G]=j;const T=Z.useMemo(()=>dt((Sr,Ar,mr)=>{const{yScale:ar,yMin:ur,yMax:br}=s;ur>=br&&console.log("Y-axis min must less than max","error",2e3);let or={},nr,vr,Er=[];if(m&&t.options.hasOwnProperty("group")&&(or=m[t.options.group]),!Xe.isEmpty(or))vr=Xe.max(Object.values(or.max)),nr=Xe.min(Object.values(or.min));else{const Xr=Sr.slice(c.viewWindow.start,c.viewWindow.end);vr=Xe.max(Xr)||1,Er=Ar.filter(se=>se),nr=(Er.length?Xe.min(Ar.slice(c.viewWindow.start,c.viewWindow.end)):0)||0;const he=Math.max(Math.abs(vr),Math.abs(nr));vr=he,nr=Er.length?-he:0,ar===Ch.FIXED&&(vr=br||vr,nr=ur!==void 0?ur:nr)}nr>vr&&(console.log("Y-axis min should less than Y-axis max","warning",5e3),nr=0);const Hr=nr<0?bu+(mr-2*bu)*vr/(vr-nr):mr;return Er.length&&(ar===Ch.AUTO||ar===Ch.FIXED&&ur<0)?{axisScale:In().domain([vr,nr]).range([bu,mr-bu]).clamp(!0),valueToY:In().domain([vr,0]).range([bu,Hr]).clamp(!0),valueToYReverse:In().domain([0,nr]).range([0,mr-Hr-bu]).clamp(!0),valueToOpacity:In().domain([0,vr]).range([0,1]).clamp(!0),valueToOpacityReverse:In().domain([0,nr]).range([0,1]).clamp(!0),min:nr,max:vr,zeroLine:Hr}:{axisScale:In().domain([vr,nr]).range([bu,mr]).clamp(!0),valueToY:In().domain([vr,nr]).range([bu,mr]).clamp(!0),valueToOpacity:In().domain([nr,vr]).range([0,1]).clamp(!0),valueToYReverse:In().domain([0,nr]).range([0,mr-Hr-bu]).clamp(!0),valueToOpacityReverse:In().domain([0,nr]).range([0,1]).clamp(!0),min:nr,max:vr,zeroLine:Hr}}),[s,c])(I,H,C);let P=(()=>{const{displayMode:Sr,height:Ar}=s;return Sr===Nl.AUTO||Sr==="density"?Ar<alr?Nl.HEATMAP:Nl.BAR:Sr})()===Nl.BAR;const V=S.jsx(xi,{trackModel:t,height:C,axisScale:P?T.axisScale:void 0,axisLegend:i,label:s.label,forceSvg:o});u&&u(V);let Q=o?{position:"relative",overflow:"hidden",width:h/3}:{},er=o?{position:"relative",transform:`translateX(${-z.start}px)`}:{},rr=s.packageVersion?{marginLeft:120}:{};const Ur=G?S.jsxs(Z.Fragment,{children:[o?"":S.jsx("div",{style:{display:"flex",flexDirection:"row",position:"absolute",zIndex:3,...rr},children:S.jsx(Ha,{data:I,data2:H,windowWidth:h,trackType:"numerical",trackModel:t,height:C,viewRegion:n,unit:i,hasReverse:!0,options:s})}),S.jsxs("div",{style:{display:"flex",...Q},children:[o||s.packageVersion?V:"",S.jsxs("div",{style:{display:"flex",flexDirection:"column",...er},children:[S.jsx(kE,{xToValue:I,scales:T,height:T.zeroLine,color:A,colorOut:N,isDrawingBars:P,forceSvg:o,width:h,viewWindow:c.viewWindow}),S.jsx("hr",{style:{marginTop:0,marginBottom:0,padding:0}}),S.jsx(kE,{xToValue:H,scales:T,height:C-T.zeroLine,color:E,colorOut:y,isDrawingBars:P,forceSvg:o,width:h,viewWindow:c.viewWindow})]})]})]}):S.jsxs(Z.Fragment,{children:[o?"":S.jsx("div",{style:{display:"flex",flexDirection:"row",position:"absolute",zIndex:3,...rr},children:S.jsx(Ha,{data:I,data2:H,windowWidth:h,trackType:"numerical",trackModel:t,height:C,viewRegion:n,unit:i,hasReverse:!0,options:s})}),S.jsxs("div",{style:{display:"flex",...Q},children:[o||s.packageVersion?V:"",S.jsx("div",{style:{...er},children:S.jsx(kE,{xToValue:I,scales:T,height:T.zeroLine,color:A,colorOut:N,isDrawingBars:P,forceSvg:o,width:h,viewWindow:c.viewWindow})})]})]});return j=[],Ur},kE=c=>{const e=Z.useCallback((o,u)=>{if(!o||Number.isNaN(o))return null;const{isDrawingBars:m,scales:_,height:z,color:C,colorOut:A}=c,E=o>0?_.valueToY(o):_.valueToYReverse(o);let N=o>0?E:0,y=o>0?z-E:E;if(m){if(y<=0)return null;let M;return o>_.max||o<_.min?(y-=5,o>_.max?(M=E,N+=5):M=y,S.jsxs("g",{children:[S.jsx("rect",{x:u,y:N,width:1,height:y,fill:C}),S.jsx("rect",{x:u,y:M,width:1,height:5,fill:A})]},u)):S.jsx("rect",{x:u,y:N,width:1,height:y,fill:C},u)}else{const M=o>0?_.valueToOpacity(o):_.valueToOpacityReverse(o),j=M===0?1:M;return S.jsx("rect",{x:u,y:0,width:1,height:z,fill:C,fillOpacity:j},u)}},[c.isDrawingBars,c.scales,c.height,c.color,c.colorOut]),{xToValue:n,height:h,forceSvg:t,width:i,viewWindow:s}=c;return n.length===0?S.jsx("div",{style:{width:i,height:h}}):S.jsx(xl,{type:t?zt.SVG:zt.CANVAS,width:n.length,height:h,forceSvg:t,viewWindow:s,children:n.map(e)})};function olr(c,e,n,h){if(c.length===0)return n;const t=c[0][e];return c.every(i=>i[e]===t)?t===void 0?n:t:h}const llr=250,Oa=({optionsObjects:c,optionName:e,label:n,defaultValue:h="",multiValue:t="[multiple values]",hasSetButton:i,getInputElement:s,onOptionSet:o,trackId:u})=>{const[m,_]=Z.useState(""),z=N=>{i||C(N),_(N)},C=Xe.debounce(N=>{o&&o(e,N,u)},llr),A=s?s(m,z):S.jsx("input",{type:"text",value:m,onChange:N=>z(N.target.value)}),E=i?S.jsx("button",{onClick:()=>C(m),children:"Set"}):null;return Z.useEffect(()=>{let N=olr(c,e,h,t);_(N)},[]),S.jsx("div",{className:"TrackContextMenu-item",children:S.jsxs("label",{style:{margin:0},children:[n," ",A," ",E]})})};function Y3(c){return S.jsx(Oa,{...c,optionName:"label",label:"Track label:",hasSetButton:!0})}class Y1{constructor(e){_r(this,"defaultOptions");this.trackModel=e,this.trackModel=e,this.defaultOptions={}}isImageTrack(){throw new Error("Method not implemented.")}isBigwigTrack(){throw new Error("Method not implemented.")}isHicTrack(){return this.trackModel.type==="hic"}getOptions(){return Object.assign({},this.defaultOptions,this.trackModel.options)}setDefaultOptions(e){return Object.assign(this.defaultOptions,e)}getMenuComponents(){return[Y3]}}const R9="Wat is this",Ns=({choices:c,defaultValue:e=R9,optionName:n,optionsObjects:h,label:t,onOptionSet:i=()=>{}})=>{const s=(u,m)=>{let _=[];u===R9&&_.push(S.jsx("option",{value:R9},R9));for(let z in c){const C=c[z];_.push(S.jsx("option",{value:C,children:n==="normalization"?C:z},z))}return S.jsx("select",{value:u,onChange:z=>{const C=z.target.value;m(C)},children:_})},o=(u,m)=>{m!==R9&&i(u,m)};return S.jsx(Oa,{defaultValue:e,optionName:n,optionsObjects:h,label:t,multiValue:R9,onOptionSet:o,getInputElement:s})};function IE(c){return S.jsx(Ns,{...c,optionName:"displayMode",defaultValue:c.defaultValue,label:"Display mode:",choices:zo})}function ulr(c){return S.jsx(Ns,{...c,optionName:"displayMode",defaultValue:c.defaultValue,label:"Display mode:",choices:Nl})}function WE(c){return S.jsx(Ns,{...c,optionName:"displayMode",label:"Display mode:",defaultValue:ta.HEATMAP,choices:ta})}function Xk(c){return S.jsx(Ns,{...c,optionName:"displayMode",label:"Display mode:",defaultValue:GU.HEATMAP,choices:GU})}function mlr(c){return S.jsx(Ns,{...c,optionName:"colorScaleKey",label:"Color variant by:",defaultValue:Vz.AF,choices:Vz})}function _lr(c){return S.jsx(Ns,{...c,optionName:"displayMode",label:"Display mode:",defaultValue:Jz.AUTO,choices:Jz})}function Ulr(c){return S.jsx(Ns,{...c,optionName:"displayMode",label:"Display mode:",defaultValue:e5.AUTO,choices:e5})}var jk=xe.createContext(),Gk=xe.createContext();function Fs(c){var e=c.children,n=xe.useState(null),h=n[0],t=n[1],i=xe.useRef(!1);xe.useEffect(function(){return function(){i.current=!0}},[]);var s=xe.useCallback(function(o){i.current||t(o)},[]);return xe.createElement(jk.Provider,{value:h},xe.createElement(Gk.Provider,{value:s},e))}var Vk=function(e){return Array.isArray(e)?e[0]:e},Jk=function(e){if(typeof e=="function"){for(var n=arguments.length,h=new Array(n>1?n-1:0),t=1;t<n;t++)h[t-1]=arguments[t];return e.apply(void 0,h)}},qE=function(e,n){if(typeof e=="function")return Jk(e,n);e!=null&&(e.current=n)},Kk=function(e){return e.reduce(function(n,h){var t=h[0],i=h[1];return n[t]=i,n},{})},Zk=typeof window<"u"&&window.document&&window.document.createElement?xe.useLayoutEffect:xe.useEffect,Ao="top",Q3="bottom",r2="right",go="left",PE="auto",Zz=[Ao,Q3,r2,go],M9="start",Yz="end",vlr="clippingParents",Yk="viewport",Qz="popper",dlr="reference",Qk=Zz.reduce(function(c,e){return c.concat([e+"-"+M9,e+"-"+Yz])},[]),rI=[].concat(Zz,[PE]).reduce(function(c,e){return c.concat([e,e+"-"+M9,e+"-"+Yz])},[]),zlr="beforeRead",Alr="read",glr="afterRead",Clr="beforeMain",flr="main",Dlr="afterMain",Blr="beforeWrite",plr="write",Slr="afterWrite",blr=[zlr,Alr,glr,Clr,flr,Dlr,Blr,plr,Slr];function c5(c){return c?(c.nodeName||"").toLowerCase():null}function n3(c){if(c==null)return window;if(c.toString()!=="[object Window]"){var e=c.ownerDocument;return e&&e.defaultView||window}return c}function JU(c){var e=n3(c).Element;return c instanceof e||c instanceof Element}function e2(c){var e=n3(c).HTMLElement;return c instanceof e||c instanceof HTMLElement}function $E(c){if(typeof ShadowRoot>"u")return!1;var e=n3(c).ShadowRoot;return c instanceof e||c instanceof ShadowRoot}function Elr(c){var e=c.state;Object.keys(e.elements).forEach(function(n){var h=e.styles[n]||{},t=e.attributes[n]||{},i=e.elements[n];!e2(i)||!c5(i)||(Object.assign(i.style,h),Object.keys(t).forEach(function(s){var o=t[s];o===!1?i.removeAttribute(s):i.setAttribute(s,o===!0?"":o)}))})}function ylr(c){var e=c.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(h){var t=e.elements[h],i=e.attributes[h]||{},s=Object.keys(e.styles.hasOwnProperty(h)?e.styles[h]:n[h]),o=s.reduce(function(u,m){return u[m]="",u},{});!e2(t)||!c5(t)||(Object.assign(t.style,o),Object.keys(i).forEach(function(u){t.removeAttribute(u)}))})}}const wlr={name:"applyStyles",enabled:!0,phase:"write",fn:Elr,effect:ylr,requires:["computeStyles"]};function h5(c){return c.split("-")[0]}var KU=Math.max,rD=Math.min,H9=Math.round;function LE(){var c=navigator.userAgentData;return c!=null&&c.brands&&Array.isArray(c.brands)?c.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function eI(){return!/^((?!chrome|android).)*safari/i.test(LE())}function O9(c,e,n){e===void 0&&(e=!1),n===void 0&&(n=!1);var h=c.getBoundingClientRect(),t=1,i=1;e&&e2(c)&&(t=c.offsetWidth>0&&H9(h.width)/c.offsetWidth||1,i=c.offsetHeight>0&&H9(h.height)/c.offsetHeight||1);var s=JU(c)?n3(c):window,o=s.visualViewport,u=!eI()&&n,m=(h.left+(u&&o?o.offsetLeft:0))/t,_=(h.top+(u&&o?o.offsetTop:0))/i,z=h.width/t,C=h.height/i;return{width:z,height:C,top:_,right:m+z,bottom:_+C,left:m,x:m,y:_}}function XE(c){var e=O9(c),n=c.offsetWidth,h=c.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-h)<=1&&(h=e.height),{x:c.offsetLeft,y:c.offsetTop,width:n,height:h}}function nI(c,e){var n=e.getRootNode&&e.getRootNode();if(c.contains(e))return!0;if(n&&$E(n)){var h=e;do{if(h&&c.isSameNode(h))return!0;h=h.parentNode||h.host}while(h)}return!1}function Eu(c){return n3(c).getComputedStyle(c)}function xlr(c){return["table","td","th"].indexOf(c5(c))>=0}function Rm(c){return((JU(c)?c.ownerDocument:c.document)||window.document).documentElement}function eD(c){return c5(c)==="html"?c:c.assignedSlot||c.parentNode||($E(c)?c.host:null)||Rm(c)}function cI(c){return!e2(c)||Eu(c).position==="fixed"?null:c.offsetParent}function Nlr(c){var e=/firefox/i.test(LE()),n=/Trident/i.test(LE());if(n&&e2(c)){var h=Eu(c);if(h.position==="fixed")return null}var t=eD(c);for($E(t)&&(t=t.host);e2(t)&&["html","body"].indexOf(c5(t))<0;){var i=Eu(t);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||e&&i.willChange==="filter"||e&&i.filter&&i.filter!=="none")return t;t=t.parentNode}return null}function rA(c){for(var e=n3(c),n=cI(c);n&&xlr(n)&&Eu(n).position==="static";)n=cI(n);return n&&(c5(n)==="html"||c5(n)==="body"&&Eu(n).position==="static")?e:n||Nlr(c)||e}function jE(c){return["top","bottom"].indexOf(c)>=0?"x":"y"}function eA(c,e,n){return KU(c,rD(e,n))}function Flr(c,e,n){var h=eA(c,e,n);return h>n?n:h}function hI(){return{top:0,right:0,bottom:0,left:0}}function tI(c){return Object.assign({},hI(),c)}function iI(c,e){return e.reduce(function(n,h){return n[h]=c,n},{})}var Tlr=function(e,n){return e=typeof e=="function"?e(Object.assign({},n.rects,{placement:n.placement})):e,tI(typeof e!="number"?e:iI(e,Zz))};function Rlr(c){var e,n=c.state,h=c.name,t=c.options,i=n.elements.arrow,s=n.modifiersData.popperOffsets,o=h5(n.placement),u=jE(o),m=[go,r2].indexOf(o)>=0,_=m?"height":"width";if(!(!i||!s)){var z=Tlr(t.padding,n),C=XE(i),A=u==="y"?Ao:go,E=u==="y"?Q3:r2,N=n.rects.reference[_]+n.rects.reference[u]-s[u]-n.rects.popper[_],y=s[u]-n.rects.reference[u],M=rA(i),j=M?u==="y"?M.clientHeight||0:M.clientWidth||0:0,I=N/2-y/2,H=z[A],G=j-C[_]-z[E],K=j/2-C[_]/2+I,T=eA(H,K,G),q=u;n.modifiersData[h]=(e={},e[q]=T,e.centerOffset=T-K,e)}}function Mlr(c){var e=c.state,n=c.options,h=n.element,t=h===void 0?"[data-popper-arrow]":h;t!=null&&(typeof t=="string"&&(t=e.elements.popper.querySelector(t),!t)||nI(e.elements.popper,t)&&(e.elements.arrow=t))}const Hlr={name:"arrow",enabled:!0,phase:"main",fn:Rlr,effect:Mlr,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function k9(c){return c.split("-")[1]}var Olr={top:"auto",right:"auto",bottom:"auto",left:"auto"};function klr(c,e){var n=c.x,h=c.y,t=e.devicePixelRatio||1;return{x:H9(n*t)/t||0,y:H9(h*t)/t||0}}function sI(c){var e,n=c.popper,h=c.popperRect,t=c.placement,i=c.variation,s=c.offsets,o=c.position,u=c.gpuAcceleration,m=c.adaptive,_=c.roundOffsets,z=c.isFixed,C=s.x,A=C===void 0?0:C,E=s.y,N=E===void 0?0:E,y=typeof _=="function"?_({x:A,y:N}):{x:A,y:N};A=y.x,N=y.y;var M=s.hasOwnProperty("x"),j=s.hasOwnProperty("y"),I=go,H=Ao,G=window;if(m){var K=rA(n),T="clientHeight",q="clientWidth";if(K===n3(n)&&(K=Rm(n),Eu(K).position!=="static"&&o==="absolute"&&(T="scrollHeight",q="scrollWidth")),K=K,t===Ao||(t===go||t===r2)&&i===Yz){H=Q3;var P=z&&K===G&&G.visualViewport?G.visualViewport.height:K[T];N-=P-h.height,N*=u?1:-1}if(t===go||(t===Ao||t===Q3)&&i===Yz){I=r2;var V=z&&K===G&&G.visualViewport?G.visualViewport.width:K[q];A-=V-h.width,A*=u?1:-1}}var Q=Object.assign({position:o},m&&Olr),er=_===!0?klr({x:A,y:N},n3(n)):{x:A,y:N};if(A=er.x,N=er.y,u){var rr;return Object.assign({},Q,(rr={},rr[H]=j?"0":"",rr[I]=M?"0":"",rr.transform=(G.devicePixelRatio||1)<=1?"translate("+A+"px, "+N+"px)":"translate3d("+A+"px, "+N+"px, 0)",rr))}return Object.assign({},Q,(e={},e[H]=j?N+"px":"",e[I]=M?A+"px":"",e.transform="",e))}function Ilr(c){var e=c.state,n=c.options,h=n.gpuAcceleration,t=h===void 0?!0:h,i=n.adaptive,s=i===void 0?!0:i,o=n.roundOffsets,u=o===void 0?!0:o,m={placement:h5(e.placement),variation:k9(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:t,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,sI(Object.assign({},m,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:u})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,sI(Object.assign({},m,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const Wlr={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Ilr,data:{}};var nD={passive:!0};function qlr(c){var e=c.state,n=c.instance,h=c.options,t=h.scroll,i=t===void 0?!0:t,s=h.resize,o=s===void 0?!0:s,u=n3(e.elements.popper),m=[].concat(e.scrollParents.reference,e.scrollParents.popper);return i&&m.forEach(function(_){_.addEventListener("scroll",n.update,nD)}),o&&u.addEventListener("resize",n.update,nD),function(){i&&m.forEach(function(_){_.removeEventListener("scroll",n.update,nD)}),o&&u.removeEventListener("resize",n.update,nD)}}const Plr={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:qlr,data:{}};var $lr={left:"right",right:"left",bottom:"top",top:"bottom"};function cD(c){return c.replace(/left|right|bottom|top/g,function(e){return $lr[e]})}var Llr={start:"end",end:"start"};function aI(c){return c.replace(/start|end/g,function(e){return Llr[e]})}function GE(c){var e=n3(c),n=e.pageXOffset,h=e.pageYOffset;return{scrollLeft:n,scrollTop:h}}function VE(c){return O9(Rm(c)).left+GE(c).scrollLeft}function Xlr(c,e){var n=n3(c),h=Rm(c),t=n.visualViewport,i=h.clientWidth,s=h.clientHeight,o=0,u=0;if(t){i=t.width,s=t.height;var m=eI();(m||!m&&e==="fixed")&&(o=t.offsetLeft,u=t.offsetTop)}return{width:i,height:s,x:o+VE(c),y:u}}function jlr(c){var e,n=Rm(c),h=GE(c),t=(e=c.ownerDocument)==null?void 0:e.body,i=KU(n.scrollWidth,n.clientWidth,t?t.scrollWidth:0,t?t.clientWidth:0),s=KU(n.scrollHeight,n.clientHeight,t?t.scrollHeight:0,t?t.clientHeight:0),o=-h.scrollLeft+VE(c),u=-h.scrollTop;return Eu(t||n).direction==="rtl"&&(o+=KU(n.clientWidth,t?t.clientWidth:0)-i),{width:i,height:s,x:o,y:u}}function JE(c){var e=Eu(c),n=e.overflow,h=e.overflowX,t=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+t+h)}function oI(c){return["html","body","#document"].indexOf(c5(c))>=0?c.ownerDocument.body:e2(c)&&JE(c)?c:oI(eD(c))}function nA(c,e){var n;e===void 0&&(e=[]);var h=oI(c),t=h===((n=c.ownerDocument)==null?void 0:n.body),i=n3(h),s=t?[i].concat(i.visualViewport||[],JE(h)?h:[]):h,o=e.concat(s);return t?o:o.concat(nA(eD(s)))}function KE(c){return Object.assign({},c,{left:c.x,top:c.y,right:c.x+c.width,bottom:c.y+c.height})}function Glr(c,e){var n=O9(c,!1,e==="fixed");return n.top=n.top+c.clientTop,n.left=n.left+c.clientLeft,n.bottom=n.top+c.clientHeight,n.right=n.left+c.clientWidth,n.width=c.clientWidth,n.height=c.clientHeight,n.x=n.left,n.y=n.top,n}function lI(c,e,n){return e===Yk?KE(Xlr(c,n)):JU(e)?Glr(e,n):KE(jlr(Rm(c)))}function Vlr(c){var e=nA(eD(c)),n=["absolute","fixed"].indexOf(Eu(c).position)>=0,h=n&&e2(c)?rA(c):c;return JU(h)?e.filter(function(t){return JU(t)&&nI(t,h)&&c5(t)!=="body"}):[]}function Jlr(c,e,n,h){var t=e==="clippingParents"?Vlr(c):[].concat(e),i=[].concat(t,[n]),s=i[0],o=i.reduce(function(u,m){var _=lI(c,m,h);return u.top=KU(_.top,u.top),u.right=rD(_.right,u.right),u.bottom=rD(_.bottom,u.bottom),u.left=KU(_.left,u.left),u},lI(c,s,h));return o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}function uI(c){var e=c.reference,n=c.element,h=c.placement,t=h?h5(h):null,i=h?k9(h):null,s=e.x+e.width/2-n.width/2,o=e.y+e.height/2-n.height/2,u;switch(t){case Ao:u={x:s,y:e.y-n.height};break;case Q3:u={x:s,y:e.y+e.height};break;case r2:u={x:e.x+e.width,y:o};break;case go:u={x:e.x-n.width,y:o};break;default:u={x:e.x,y:e.y}}var m=t?jE(t):null;if(m!=null){var _=m==="y"?"height":"width";switch(i){case M9:u[m]=u[m]-(e[_]/2-n[_]/2);break;case Yz:u[m]=u[m]+(e[_]/2-n[_]/2);break}}return u}function cA(c,e){e===void 0&&(e={});var n=e,h=n.placement,t=h===void 0?c.placement:h,i=n.strategy,s=i===void 0?c.strategy:i,o=n.boundary,u=o===void 0?vlr:o,m=n.rootBoundary,_=m===void 0?Yk:m,z=n.elementContext,C=z===void 0?Qz:z,A=n.altBoundary,E=A===void 0?!1:A,N=n.padding,y=N===void 0?0:N,M=tI(typeof y!="number"?y:iI(y,Zz)),j=C===Qz?dlr:Qz,I=c.rects.popper,H=c.elements[E?j:C],G=Jlr(JU(H)?H:H.contextElement||Rm(c.elements.popper),u,_,s),K=O9(c.elements.reference),T=uI({reference:K,element:I,placement:t}),q=KE(Object.assign({},I,T)),P=C===Qz?q:K,V={top:G.top-P.top+M.top,bottom:P.bottom-G.bottom+M.bottom,left:G.left-P.left+M.left,right:P.right-G.right+M.right},Q=c.modifiersData.offset;if(C===Qz&&Q){var er=Q[t];Object.keys(V).forEach(function(rr){var Ur=[r2,Q3].indexOf(rr)>=0?1:-1,Sr=[Ao,Q3].indexOf(rr)>=0?"y":"x";V[rr]+=er[Sr]*Ur})}return V}function Klr(c,e){e===void 0&&(e={});var n=e,h=n.placement,t=n.boundary,i=n.rootBoundary,s=n.padding,o=n.flipVariations,u=n.allowedAutoPlacements,m=u===void 0?rI:u,_=k9(h),z=_?o?Qk:Qk.filter(function(E){return k9(E)===_}):Zz,C=z.filter(function(E){return m.indexOf(E)>=0});C.length===0&&(C=z);var A=C.reduce(function(E,N){return E[N]=cA(c,{placement:N,boundary:t,rootBoundary:i,padding:s})[h5(N)],E},{});return Object.keys(A).sort(function(E,N){return A[E]-A[N]})}function Zlr(c){if(h5(c)===PE)return[];var e=cD(c);return[aI(c),e,aI(e)]}function Ylr(c){var e=c.state,n=c.options,h=c.name;if(!e.modifiersData[h]._skip){for(var t=n.mainAxis,i=t===void 0?!0:t,s=n.altAxis,o=s===void 0?!0:s,u=n.fallbackPlacements,m=n.padding,_=n.boundary,z=n.rootBoundary,C=n.altBoundary,A=n.flipVariations,E=A===void 0?!0:A,N=n.allowedAutoPlacements,y=e.options.placement,M=h5(y),j=M===y,I=u||(j||!E?[cD(y)]:Zlr(y)),H=[y].concat(I).reduce(function(Er,Hr){return Er.concat(h5(Hr)===PE?Klr(e,{placement:Hr,boundary:_,rootBoundary:z,padding:m,flipVariations:E,allowedAutoPlacements:N}):Hr)},[]),G=e.rects.reference,K=e.rects.popper,T=new Map,q=!0,P=H[0],V=0;V<H.length;V++){var Q=H[V],er=h5(Q),rr=k9(Q)===M9,Ur=[Ao,Q3].indexOf(er)>=0,Sr=Ur?"width":"height",Ar=cA(e,{placement:Q,boundary:_,rootBoundary:z,altBoundary:C,padding:m}),mr=Ur?rr?r2:go:rr?Q3:Ao;G[Sr]>K[Sr]&&(mr=cD(mr));var ar=cD(mr),ur=[];if(i&&ur.push(Ar[er]<=0),o&&ur.push(Ar[mr]<=0,Ar[ar]<=0),ur.every(function(Er){return Er})){P=Q,q=!1;break}T.set(Q,ur)}if(q)for(var br=E?3:1,or=function(Hr){var Xr=H.find(function(he){var se=T.get(he);if(se)return se.slice(0,Hr).every(function(ee){return ee})});if(Xr)return P=Xr,"break"},nr=br;nr>0;nr--){var vr=or(nr);if(vr==="break")break}e.placement!==P&&(e.modifiersData[h]._skip=!0,e.placement=P,e.reset=!0)}}const Qlr={name:"flip",enabled:!0,phase:"main",fn:Ylr,requiresIfExists:["offset"],data:{_skip:!1}};function mI(c,e,n){return n===void 0&&(n={x:0,y:0}),{top:c.top-e.height-n.y,right:c.right-e.width+n.x,bottom:c.bottom-e.height+n.y,left:c.left-e.width-n.x}}function _I(c){return[Ao,r2,Q3,go].some(function(e){return c[e]>=0})}function r4r(c){var e=c.state,n=c.name,h=e.rects.reference,t=e.rects.popper,i=e.modifiersData.preventOverflow,s=cA(e,{elementContext:"reference"}),o=cA(e,{altBoundary:!0}),u=mI(s,h),m=mI(o,t,i),_=_I(u),z=_I(m);e.modifiersData[n]={referenceClippingOffsets:u,popperEscapeOffsets:m,isReferenceHidden:_,hasPopperEscaped:z},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":_,"data-popper-escaped":z})}const e4r={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:r4r};function n4r(c,e,n){var h=h5(c),t=[go,Ao].indexOf(h)>=0?-1:1,i=typeof n=="function"?n(Object.assign({},e,{placement:c})):n,s=i[0],o=i[1];return s=s||0,o=(o||0)*t,[go,r2].indexOf(h)>=0?{x:o,y:s}:{x:s,y:o}}function c4r(c){var e=c.state,n=c.options,h=c.name,t=n.offset,i=t===void 0?[0,0]:t,s=rI.reduce(function(_,z){return _[z]=n4r(z,e.rects,i),_},{}),o=s[e.placement],u=o.x,m=o.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=u,e.modifiersData.popperOffsets.y+=m),e.modifiersData[h]=s}const h4r={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:c4r};function t4r(c){var e=c.state,n=c.name;e.modifiersData[n]=uI({reference:e.rects.reference,element:e.rects.popper,placement:e.placement})}const i4r={name:"popperOffsets",enabled:!0,phase:"read",fn:t4r,data:{}};function s4r(c){return c==="x"?"y":"x"}function a4r(c){var e=c.state,n=c.options,h=c.name,t=n.mainAxis,i=t===void 0?!0:t,s=n.altAxis,o=s===void 0?!1:s,u=n.boundary,m=n.rootBoundary,_=n.altBoundary,z=n.padding,C=n.tether,A=C===void 0?!0:C,E=n.tetherOffset,N=E===void 0?0:E,y=cA(e,{boundary:u,rootBoundary:m,padding:z,altBoundary:_}),M=h5(e.placement),j=k9(e.placement),I=!j,H=jE(M),G=s4r(H),K=e.modifiersData.popperOffsets,T=e.rects.reference,q=e.rects.popper,P=typeof N=="function"?N(Object.assign({},e.rects,{placement:e.placement})):N,V=typeof P=="number"?{mainAxis:P,altAxis:P}:Object.assign({mainAxis:0,altAxis:0},P),Q=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,er={x:0,y:0};if(K){if(i){var rr,Ur=H==="y"?Ao:go,Sr=H==="y"?Q3:r2,Ar=H==="y"?"height":"width",mr=K[H],ar=mr+y[Ur],ur=mr-y[Sr],br=A?-q[Ar]/2:0,or=j===M9?T[Ar]:q[Ar],nr=j===M9?-q[Ar]:-T[Ar],vr=e.elements.arrow,Er=A&&vr?XE(vr):{width:0,height:0},Hr=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:hI(),Xr=Hr[Ur],he=Hr[Sr],se=eA(0,T[Ar],Er[Ar]),ee=I?T[Ar]/2-br-se-Xr-V.mainAxis:or-se-Xr-V.mainAxis,le=I?-T[Ar]/2+br+se+he+V.mainAxis:nr+se+he+V.mainAxis,ae=e.elements.arrow&&rA(e.elements.arrow),Le=ae?H==="y"?ae.clientTop||0:ae.clientLeft||0:0,Gr=(rr=Q==null?void 0:Q[H])!=null?rr:0,qr=mr+ee-Gr-Le,ce=mr+le-Gr,fe=eA(A?rD(ar,qr):ar,mr,A?KU(ur,ce):ur);K[H]=fe,er[H]=fe-mr}if(o){var je,h0=H==="x"?Ao:go,A0=H==="x"?Q3:r2,a0=K[G],B0=G==="y"?"height":"width",m0=a0+y[h0],f0=a0-y[A0],S0=[Ao,go].indexOf(M)!==-1,Ye=(je=Q==null?void 0:Q[G])!=null?je:0,q0=S0?m0:a0-T[B0]-q[B0]-Ye+V.altAxis,Z0=S0?a0+T[B0]+q[B0]-Ye-V.altAxis:f0,G0=A&&S0?Flr(q0,a0,Z0):eA(A?q0:m0,a0,A?Z0:f0);K[G]=G0,er[G]=G0-a0}e.modifiersData[h]=er}}const o4r={name:"preventOverflow",enabled:!0,phase:"main",fn:a4r,requiresIfExists:["offset"]};function l4r(c){return{scrollLeft:c.scrollLeft,scrollTop:c.scrollTop}}function u4r(c){return c===n3(c)||!e2(c)?GE(c):l4r(c)}function m4r(c){var e=c.getBoundingClientRect(),n=H9(e.width)/c.offsetWidth||1,h=H9(e.height)/c.offsetHeight||1;return n!==1||h!==1}function _4r(c,e,n){n===void 0&&(n=!1);var h=e2(e),t=e2(e)&&m4r(e),i=Rm(e),s=O9(c,t,n),o={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(h||!h&&!n)&&((c5(e)!=="body"||JE(i))&&(o=u4r(e)),e2(e)?(u=O9(e,!0),u.x+=e.clientLeft,u.y+=e.clientTop):i&&(u.x=VE(i))),{x:s.left+o.scrollLeft-u.x,y:s.top+o.scrollTop-u.y,width:s.width,height:s.height}}function U4r(c){var e=new Map,n=new Set,h=[];c.forEach(function(i){e.set(i.name,i)});function t(i){n.add(i.name);var s=[].concat(i.requires||[],i.requiresIfExists||[]);s.forEach(function(o){if(!n.has(o)){var u=e.get(o);u&&t(u)}}),h.push(i)}return c.forEach(function(i){n.has(i.name)||t(i)}),h}function v4r(c){var e=U4r(c);return blr.reduce(function(n,h){return n.concat(e.filter(function(t){return t.phase===h}))},[])}function d4r(c){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(c())})})),e}}function z4r(c){var e=c.reduce(function(n,h){var t=n[h.name];return n[h.name]=t?Object.assign({},t,h,{options:Object.assign({},t.options,h.options),data:Object.assign({},t.data,h.data)}):h,n},{});return Object.keys(e).map(function(n){return e[n]})}var UI={placement:"bottom",modifiers:[],strategy:"absolute"};function vI(){for(var c=arguments.length,e=new Array(c),n=0;n<c;n++)e[n]=arguments[n];return!e.some(function(h){return!(h&&typeof h.getBoundingClientRect=="function")})}function A4r(c){c===void 0&&(c={});var e=c,n=e.defaultModifiers,h=n===void 0?[]:n,t=e.defaultOptions,i=t===void 0?UI:t;return function(o,u,m){m===void 0&&(m=i);var _={placement:"bottom",orderedModifiers:[],options:Object.assign({},UI,i),modifiersData:{},elements:{reference:o,popper:u},attributes:{},styles:{}},z=[],C=!1,A={state:_,setOptions:function(M){var j=typeof M=="function"?M(_.options):M;N(),_.options=Object.assign({},i,_.options,j),_.scrollParents={reference:JU(o)?nA(o):o.contextElement?nA(o.contextElement):[],popper:nA(u)};var I=v4r(z4r([].concat(h,_.options.modifiers)));return _.orderedModifiers=I.filter(function(H){return H.enabled}),E(),A.update()},forceUpdate:function(){if(!C){var M=_.elements,j=M.reference,I=M.popper;if(vI(j,I)){_.rects={reference:_4r(j,rA(I),_.options.strategy==="fixed"),popper:XE(I)},_.reset=!1,_.placement=_.options.placement,_.orderedModifiers.forEach(function(V){return _.modifiersData[V.name]=Object.assign({},V.data)});for(var H=0;H<_.orderedModifiers.length;H++){if(_.reset===!0){_.reset=!1,H=-1;continue}var G=_.orderedModifiers[H],K=G.fn,T=G.options,q=T===void 0?{}:T,P=G.name;typeof K=="function"&&(_=K({state:_,options:q,name:P,instance:A})||_)}}}},update:d4r(function(){return new Promise(function(y){A.forceUpdate(),y(_)})}),destroy:function(){N(),C=!0}};if(!vI(o,u))return A;A.setOptions(m).then(function(y){!C&&m.onFirstUpdate&&m.onFirstUpdate(y)});function E(){_.orderedModifiers.forEach(function(y){var M=y.name,j=y.options,I=j===void 0?{}:j,H=y.effect;if(typeof H=="function"){var G=H({state:_,name:M,instance:A,options:I}),K=function(){};z.push(G||K)}})}function N(){z.forEach(function(y){return y()}),z=[]}return A}}var g4r=[Plr,i4r,Wlr,wlr,h4r,Qlr,o4r,Hlr,e4r],C4r=A4r({defaultModifiers:g4r}),f4r=typeof Element<"u",D4r=typeof Map=="function",B4r=typeof Set=="function",p4r=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function hD(c,e){if(c===e)return!0;if(c&&e&&typeof c=="object"&&typeof e=="object"){if(c.constructor!==e.constructor)return!1;var n,h,t;if(Array.isArray(c)){if(n=c.length,n!=e.length)return!1;for(h=n;h--!==0;)if(!hD(c[h],e[h]))return!1;return!0}var i;if(D4r&&c instanceof Map&&e instanceof Map){if(c.size!==e.size)return!1;for(i=c.entries();!(h=i.next()).done;)if(!e.has(h.value[0]))return!1;for(i=c.entries();!(h=i.next()).done;)if(!hD(h.value[1],e.get(h.value[0])))return!1;return!0}if(B4r&&c instanceof Set&&e instanceof Set){if(c.size!==e.size)return!1;for(i=c.entries();!(h=i.next()).done;)if(!e.has(h.value[0]))return!1;return!0}if(p4r&&ArrayBuffer.isView(c)&&ArrayBuffer.isView(e)){if(n=c.length,n!=e.length)return!1;for(h=n;h--!==0;)if(c[h]!==e[h])return!1;return!0}if(c.constructor===RegExp)return c.source===e.source&&c.flags===e.flags;if(c.valueOf!==Object.prototype.valueOf&&typeof c.valueOf=="function"&&typeof e.valueOf=="function")return c.valueOf()===e.valueOf();if(c.toString!==Object.prototype.toString&&typeof c.toString=="function"&&typeof e.toString=="function")return c.toString()===e.toString();if(t=Object.keys(c),n=t.length,n!==Object.keys(e).length)return!1;for(h=n;h--!==0;)if(!Object.prototype.hasOwnProperty.call(e,t[h]))return!1;if(f4r&&c instanceof Element)return!1;for(h=n;h--!==0;)if(!((t[h]==="_owner"||t[h]==="__v"||t[h]==="__o")&&c.$$typeof)&&!hD(c[t[h]],e[t[h]]))return!1;return!0}return c!==c&&e!==e}var S4r=function(e,n){try{return hD(e,n)}catch(h){if((h.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw h}};const b4r=Ai(S4r);var E4r=[],y4r=function(e,n,h){h===void 0&&(h={});var t=xe.useRef(null),i={onFirstUpdate:h.onFirstUpdate,placement:h.placement||"bottom",strategy:h.strategy||"absolute",modifiers:h.modifiers||E4r},s=xe.useState({styles:{popper:{position:i.strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),o=s[0],u=s[1],m=xe.useMemo(function(){return{name:"updateState",enabled:!0,phase:"write",fn:function(A){var E=A.state,N=Object.keys(E.elements);ssr.flushSync(function(){u({styles:Kk(N.map(function(y){return[y,E.styles[y]||{}]})),attributes:Kk(N.map(function(y){return[y,E.attributes[y]]}))})})},requires:["computeStyles"]}},[]),_=xe.useMemo(function(){var C={onFirstUpdate:i.onFirstUpdate,placement:i.placement,strategy:i.strategy,modifiers:[].concat(i.modifiers,[m,{name:"applyStyles",enabled:!1}])};return b4r(t.current,C)?t.current||C:(t.current=C,C)},[i.onFirstUpdate,i.placement,i.strategy,i.modifiers,m]),z=xe.useRef();return Zk(function(){z.current&&z.current.setOptions(_)},[_]),Zk(function(){if(!(e==null||n==null)){var C=h.createPopper||C4r,A=C(e,n,_);return z.current=A,function(){A.destroy(),z.current=null}}},[e,n,h.createPopper]),{state:z.current?z.current.state:null,styles:o.styles,attributes:o.attributes,update:z.current?z.current.update:null,forceUpdate:z.current?z.current.forceUpdate:null}},w4r=function(){},x4r=function(){return Promise.resolve(null)},N4r=[];function ia(c){var e=c.placement,n=e===void 0?"bottom":e,h=c.strategy,t=h===void 0?"absolute":h,i=c.modifiers,s=i===void 0?N4r:i,o=c.referenceElement,u=c.onFirstUpdate,m=c.innerRef,_=c.children,z=xe.useContext(jk),C=xe.useState(null),A=C[0],E=C[1],N=xe.useState(null),y=N[0],M=N[1];xe.useEffect(function(){qE(m,A)},[m,A]);var j=xe.useMemo(function(){return{placement:n,strategy:t,onFirstUpdate:u,modifiers:[].concat(s,[{name:"arrow",enabled:y!=null,options:{element:y}}])}},[n,t,u,s,y]),I=y4r(o||z,A,j),H=I.state,G=I.styles,K=I.forceUpdate,T=I.update,q=xe.useMemo(function(){return{ref:E,style:G.popper,placement:H?H.placement:n,hasPopperEscaped:H&&H.modifiersData.hide?H.modifiersData.hide.hasPopperEscaped:null,isReferenceHidden:H&&H.modifiersData.hide?H.modifiersData.hide.isReferenceHidden:null,arrowProps:{style:G.arrow,ref:M},forceUpdate:K||w4r,update:T||x4r}},[E,M,n,H,G,T,K]);return Vk(_)(q)}var F4r={},T4r=F4r.NODE_ENV!=="production",dI=function(){};if(T4r){var R4r=function(e,n){var h=arguments.length;n=new Array(h>1?h-1:0);for(var t=1;t<h;t++)n[t-1]=arguments[t];var i=0,s="Warning: "+e.replace(/%s/g,function(){return n[i++]});typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}};dI=function(c,e,n){var h=arguments.length;n=new Array(h>2?h-2:0);for(var t=2;t<h;t++)n[t-2]=arguments[t];if(e===void 0)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");c||R4r.apply(null,[e].concat(n))}}var zI=dI;const hA=Ai(zI);function sa(c){var e=c.children,n=c.innerRef,h=xe.useContext(Gk),t=xe.useCallback(function(i){qE(n,i),Jk(h,i)},[n,h]);return xe.useEffect(function(){return function(){return qE(n,null)}},[]),xe.useEffect(function(){hA(!!h,"`Reference` should not be used outside of a `Manager` component.")},[h]),Vk(e)({ref:t})}var n2={},tA={},M4r=typeof Ta=="object"&&Ta&&Ta.Object===Object&&Ta,AI=M4r,H4r=AI,O4r=typeof self=="object"&&self&&self.Object===Object&&self,k4r=H4r||O4r||Function("return this")(),t5=k4r,I4r=t5,W4r=I4r.Symbol,iA=W4r,gI=iA,CI=Object.prototype,q4r=CI.hasOwnProperty,P4r=CI.toString,sA=gI?gI.toStringTag:void 0;function $4r(c){var e=q4r.call(c,sA),n=c[sA];try{c[sA]=void 0;var h=!0}catch{}var t=P4r.call(c);return h&&(e?c[sA]=n:delete c[sA]),t}var L4r=$4r,X4r=Object.prototype,j4r=X4r.toString;function G4r(c){return j4r.call(c)}var V4r=G4r,fI=iA,J4r=L4r,K4r=V4r,Z4r="[object Null]",Y4r="[object Undefined]",DI=fI?fI.toStringTag:void 0;function Q4r(c){return c==null?c===void 0?Y4r:Z4r:DI&&DI in Object(c)?J4r(c):K4r(c)}var ZU=Q4r,r5r=Array.isArray,Tl=r5r;function e5r(c){return c!=null&&typeof c=="object"}var yu=e5r,n5r=ZU,c5r=Tl,h5r=yu,t5r="[object String]";function i5r(c){return typeof c=="string"||!c5r(c)&&h5r(c)&&n5r(c)==t5r}var s5r=i5r;function a5r(c){return function(e,n,h){for(var t=-1,i=Object(e),s=h(e),o=s.length;o--;){var u=s[c?o:++t];if(n(i[u],u,i)===!1)break}return e}}var o5r=a5r,l5r=o5r,u5r=l5r(),m5r=u5r;function _5r(c,e){for(var n=-1,h=Array(c);++n<c;)h[n]=e(n);return h}var U5r=_5r,v5r=ZU,d5r=yu,z5r="[object Arguments]";function A5r(c){return d5r(c)&&v5r(c)==z5r}var g5r=A5r,BI=g5r,C5r=yu,pI=Object.prototype,f5r=pI.hasOwnProperty,D5r=pI.propertyIsEnumerable,B5r=BI(function(){return arguments}())?BI:function(c){return C5r(c)&&f5r.call(c,"callee")&&!D5r.call(c,"callee")},SI=B5r,tD={exports:{}};function p5r(){return!1}var S5r=p5r;tD.exports,function(c,e){var n=t5,h=S5r,t=e&&!e.nodeType&&e,i=t&&!0&&c&&!c.nodeType&&c,s=i&&i.exports===t,o=s?n.Buffer:void 0,u=o?o.isBuffer:void 0,m=u||h;c.exports=m}(tD,tD.exports);var ZE=tD.exports,b5r=9007199254740991,E5r=/^(?:0|[1-9]\d*)$/;function y5r(c,e){var n=typeof c;return e=e??b5r,!!e&&(n=="number"||n!="symbol"&&E5r.test(c))&&c>-1&&c%1==0&&c<e}var bI=y5r,w5r=9007199254740991;function x5r(c){return typeof c=="number"&&c>-1&&c%1==0&&c<=w5r}var YE=x5r,N5r=ZU,F5r=YE,T5r=yu,R5r="[object Arguments]",M5r="[object Array]",H5r="[object Boolean]",O5r="[object Date]",k5r="[object Error]",I5r="[object Function]",W5r="[object Map]",q5r="[object Number]",P5r="[object Object]",$5r="[object RegExp]",L5r="[object Set]",X5r="[object String]",j5r="[object WeakMap]",G5r="[object ArrayBuffer]",V5r="[object DataView]",J5r="[object Float32Array]",K5r="[object Float64Array]",Z5r="[object Int8Array]",Y5r="[object Int16Array]",Q5r="[object Int32Array]",rur="[object Uint8Array]",eur="[object Uint8ClampedArray]",nur="[object Uint16Array]",cur="[object Uint32Array]",O1={};O1[J5r]=O1[K5r]=O1[Z5r]=O1[Y5r]=O1[Q5r]=O1[rur]=O1[eur]=O1[nur]=O1[cur]=!0,O1[R5r]=O1[M5r]=O1[G5r]=O1[H5r]=O1[V5r]=O1[O5r]=O1[k5r]=O1[I5r]=O1[W5r]=O1[q5r]=O1[P5r]=O1[$5r]=O1[L5r]=O1[X5r]=O1[j5r]=!1;function hur(c){return T5r(c)&&F5r(c.length)&&!!O1[N5r(c)]}var tur=hur;function iur(c){return function(e){return c(e)}}var QE=iur,iD={exports:{}};iD.exports,function(c,e){var n=AI,h=e&&!e.nodeType&&e,t=h&&!0&&c&&!c.nodeType&&c,i=t&&t.exports===h,s=i&&n.process,o=function(){try{var u=t&&t.require&&t.require("util").types;return u||s&&s.binding&&s.binding("util")}catch{}}();c.exports=o}(iD,iD.exports);var ry=iD.exports,sur=tur,aur=QE,EI=ry,yI=EI&&EI.isTypedArray,our=yI?aur(yI):sur,wI=our,lur=U5r,uur=SI,mur=Tl,_ur=ZE,Uur=bI,vur=wI,dur=Object.prototype,zur=dur.hasOwnProperty;function Aur(c,e){var n=mur(c),h=!n&&uur(c),t=!n&&!h&&_ur(c),i=!n&&!h&&!t&&vur(c),s=n||h||t||i,o=s?lur(c.length,String):[],u=o.length;for(var m in c)(e||zur.call(c,m))&&!(s&&(m=="length"||t&&(m=="offset"||m=="parent")||i&&(m=="buffer"||m=="byteLength"||m=="byteOffset")||Uur(m,u)))&&o.push(m);return o}var xI=Aur,gur=Object.prototype;function Cur(c){var e=c&&c.constructor,n=typeof e=="function"&&e.prototype||gur;return c===n}var ey=Cur;function fur(c,e){return function(n){return c(e(n))}}var NI=fur,Dur=NI,Bur=Dur(Object.keys,Object),pur=Bur,Sur=ey,bur=pur,Eur=Object.prototype,yur=Eur.hasOwnProperty;function wur(c){if(!Sur(c))return bur(c);var e=[];for(var n in Object(c))yur.call(c,n)&&n!="constructor"&&e.push(n);return e}var xur=wur;function Nur(c){var e=typeof c;return c!=null&&(e=="object"||e=="function")}var I9=Nur,Fur=ZU,Tur=I9,Rur="[object AsyncFunction]",Mur="[object Function]",Hur="[object GeneratorFunction]",Our="[object Proxy]";function kur(c){if(!Tur(c))return!1;var e=Fur(c);return e==Mur||e==Hur||e==Rur||e==Our}var FI=kur,Iur=FI,Wur=YE;function qur(c){return c!=null&&Wur(c.length)&&!Iur(c)}var sD=qur,Pur=xI,$ur=xur,Lur=sD;function Xur(c){return Lur(c)?Pur(c):$ur(c)}var aA=Xur,jur=m5r,Gur=aA;function Vur(c,e){return c&&jur(c,e,Gur)}var TI=Vur;function Jur(c){return c}var RI=Jur,Kur=RI;function Zur(c){return typeof c=="function"?c:Kur}var Yur=Zur,Qur=TI,r6r=Yur;function e6r(c,e){return c&&Qur(c,r6r(e))}var ny=e6r,n6r=NI,c6r=n6r(Object.getPrototypeOf,Object),cy=c6r,h6r=ZU,t6r=cy,i6r=yu,s6r="[object Object]",a6r=Function.prototype,o6r=Object.prototype,MI=a6r.toString,l6r=o6r.hasOwnProperty,u6r=MI.call(Object);function m6r(c){if(!i6r(c)||h6r(c)!=s6r)return!1;var e=t6r(c);if(e===null)return!0;var n=l6r.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&MI.call(n)==u6r}var _6r=m6r;function U6r(c,e){for(var n=-1,h=c==null?0:c.length,t=Array(h);++n<h;)t[n]=e(c[n],n,c);return t}var HI=U6r;function v6r(){this.__data__=[],this.size=0}var d6r=v6r;function z6r(c,e){return c===e||c!==c&&e!==e}var hy=z6r,A6r=hy;function g6r(c,e){for(var n=c.length;n--;)if(A6r(c[n][0],e))return n;return-1}var aD=g6r,C6r=aD,f6r=Array.prototype,D6r=f6r.splice;function B6r(c){var e=this.__data__,n=C6r(e,c);if(n<0)return!1;var h=e.length-1;return n==h?e.pop():D6r.call(e,n,1),--this.size,!0}var p6r=B6r,S6r=aD;function b6r(c){var e=this.__data__,n=S6r(e,c);return n<0?void 0:e[n][1]}var E6r=b6r,y6r=aD;function w6r(c){return y6r(this.__data__,c)>-1}var x6r=w6r,N6r=aD;function F6r(c,e){var n=this.__data__,h=N6r(n,c);return h<0?(++this.size,n.push([c,e])):n[h][1]=e,this}var T6r=F6r,R6r=d6r,M6r=p6r,H6r=E6r,O6r=x6r,k6r=T6r;function W9(c){var e=-1,n=c==null?0:c.length;for(this.clear();++e<n;){var h=c[e];this.set(h[0],h[1])}}W9.prototype.clear=R6r,W9.prototype.delete=M6r,W9.prototype.get=H6r,W9.prototype.has=O6r,W9.prototype.set=k6r;var oD=W9,I6r=oD;function W6r(){this.__data__=new I6r,this.size=0}var q6r=W6r;function P6r(c){var e=this.__data__,n=e.delete(c);return this.size=e.size,n}var $6r=P6r;function L6r(c){return this.__data__.get(c)}var X6r=L6r;function j6r(c){return this.__data__.has(c)}var G6r=j6r,V6r=t5,J6r=V6r["__core-js_shared__"],K6r=J6r,ty=K6r,OI=function(){var c=/[^.]+$/.exec(ty&&ty.keys&&ty.keys.IE_PROTO||"");return c?"Symbol(src)_1."+c:""}();function Z6r(c){return!!OI&&OI in c}var Y6r=Z6r,Q6r=Function.prototype,rmr=Q6r.toString;function emr(c){if(c!=null){try{return rmr.call(c)}catch{}try{return c+""}catch{}}return""}var kI=emr,nmr=FI,cmr=Y6r,hmr=I9,tmr=kI,imr=/[\\^$.*+?()[\]{}|]/g,smr=/^\[object .+?Constructor\]$/,amr=Function.prototype,omr=Object.prototype,lmr=amr.toString,umr=omr.hasOwnProperty,mmr=RegExp("^"+lmr.call(umr).replace(imr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function _mr(c){if(!hmr(c)||cmr(c))return!1;var e=nmr(c)?mmr:smr;return e.test(tmr(c))}var Umr=_mr;function vmr(c,e){return c==null?void 0:c[e]}var dmr=vmr,zmr=Umr,Amr=dmr;function gmr(c,e){var n=Amr(c,e);return zmr(n)?n:void 0}var YU=gmr,Cmr=YU,fmr=t5,Dmr=Cmr(fmr,"Map"),iy=Dmr,Bmr=YU,pmr=Bmr(Object,"create"),lD=pmr,II=lD;function Smr(){this.__data__=II?II(null):{},this.size=0}var bmr=Smr;function Emr(c){var e=this.has(c)&&delete this.__data__[c];return this.size-=e?1:0,e}var ymr=Emr,wmr=lD,xmr="__lodash_hash_undefined__",Nmr=Object.prototype,Fmr=Nmr.hasOwnProperty;function Tmr(c){var e=this.__data__;if(wmr){var n=e[c];return n===xmr?void 0:n}return Fmr.call(e,c)?e[c]:void 0}var Rmr=Tmr,Mmr=lD,Hmr=Object.prototype,Omr=Hmr.hasOwnProperty;function kmr(c){var e=this.__data__;return Mmr?e[c]!==void 0:Omr.call(e,c)}var Imr=kmr,Wmr=lD,qmr="__lodash_hash_undefined__";function Pmr(c,e){var n=this.__data__;return this.size+=this.has(c)?0:1,n[c]=Wmr&&e===void 0?qmr:e,this}var $mr=Pmr,Lmr=bmr,Xmr=ymr,jmr=Rmr,Gmr=Imr,Vmr=$mr;function q9(c){var e=-1,n=c==null?0:c.length;for(this.clear();++e<n;){var h=c[e];this.set(h[0],h[1])}}q9.prototype.clear=Lmr,q9.prototype.delete=Xmr,q9.prototype.get=jmr,q9.prototype.has=Gmr,q9.prototype.set=Vmr;var Jmr=q9,WI=Jmr,Kmr=oD,Zmr=iy;function Ymr(){this.size=0,this.__data__={hash:new WI,map:new(Zmr||Kmr),string:new WI}}var Qmr=Ymr;function r_r(c){var e=typeof c;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?c!=="__proto__":c===null}var e_r=r_r,n_r=e_r;function c_r(c,e){var n=c.__data__;return n_r(e)?n[typeof e=="string"?"string":"hash"]:n.map}var uD=c_r,h_r=uD;function t_r(c){var e=h_r(this,c).delete(c);return this.size-=e?1:0,e}var i_r=t_r,s_r=uD;function a_r(c){return s_r(this,c).get(c)}var o_r=a_r,l_r=uD;function u_r(c){return l_r(this,c).has(c)}var m_r=u_r,__r=uD;function U_r(c,e){var n=__r(this,c),h=n.size;return n.set(c,e),this.size+=n.size==h?0:1,this}var v_r=U_r,d_r=Qmr,z_r=i_r,A_r=o_r,g_r=m_r,C_r=v_r;function P9(c){var e=-1,n=c==null?0:c.length;for(this.clear();++e<n;){var h=c[e];this.set(h[0],h[1])}}P9.prototype.clear=d_r,P9.prototype.delete=z_r,P9.prototype.get=A_r,P9.prototype.has=g_r,P9.prototype.set=C_r;var sy=P9,f_r=oD,D_r=iy,B_r=sy,p_r=200;function S_r(c,e){var n=this.__data__;if(n instanceof f_r){var h=n.__data__;if(!D_r||h.length<p_r-1)return h.push([c,e]),this.size=++n.size,this;n=this.__data__=new B_r(h)}return n.set(c,e),this.size=n.size,this}var b_r=S_r,E_r=oD,y_r=q6r,w_r=$6r,x_r=X6r,N_r=G6r,F_r=b_r;function $9(c){var e=this.__data__=new E_r(c);this.size=e.size}$9.prototype.clear=y_r,$9.prototype.delete=w_r,$9.prototype.get=x_r,$9.prototype.has=N_r,$9.prototype.set=F_r;var ay=$9,T_r="__lodash_hash_undefined__";function R_r(c){return this.__data__.set(c,T_r),this}var M_r=R_r;function H_r(c){return this.__data__.has(c)}var O_r=H_r,k_r=sy,I_r=M_r,W_r=O_r;function mD(c){var e=-1,n=c==null?0:c.length;for(this.__data__=new k_r;++e<n;)this.add(c[e])}mD.prototype.add=mD.prototype.push=I_r,mD.prototype.has=W_r;var q_r=mD;function P_r(c,e){for(var n=-1,h=c==null?0:c.length;++n<h;)if(e(c[n],n,c))return!0;return!1}var $_r=P_r;function L_r(c,e){return c.has(e)}var X_r=L_r,j_r=q_r,G_r=$_r,V_r=X_r,J_r=1,K_r=2;function Z_r(c,e,n,h,t,i){var s=n&J_r,o=c.length,u=e.length;if(o!=u&&!(s&&u>o))return!1;var m=i.get(c),_=i.get(e);if(m&&_)return m==e&&_==c;var z=-1,C=!0,A=n&K_r?new j_r:void 0;for(i.set(c,e),i.set(e,c);++z<o;){var E=c[z],N=e[z];if(h)var y=s?h(N,E,z,e,c,i):h(E,N,z,c,e,i);if(y!==void 0){if(y)continue;C=!1;break}if(A){if(!G_r(e,function(M,j){if(!V_r(A,j)&&(E===M||t(E,M,n,h,i)))return A.push(j)})){C=!1;break}}else if(!(E===N||t(E,N,n,h,i))){C=!1;break}}return i.delete(c),i.delete(e),C}var qI=Z_r,Y_r=t5,Q_r=Y_r.Uint8Array,PI=Q_r;function rUr(c){var e=-1,n=Array(c.size);return c.forEach(function(h,t){n[++e]=[t,h]}),n}var eUr=rUr;function nUr(c){var e=-1,n=Array(c.size);return c.forEach(function(h){n[++e]=h}),n}var cUr=nUr,$I=iA,LI=PI,hUr=hy,tUr=qI,iUr=eUr,sUr=cUr,aUr=1,oUr=2,lUr="[object Boolean]",uUr="[object Date]",mUr="[object Error]",_Ur="[object Map]",UUr="[object Number]",vUr="[object RegExp]",dUr="[object Set]",zUr="[object String]",AUr="[object Symbol]",gUr="[object ArrayBuffer]",CUr="[object DataView]",XI=$I?$I.prototype:void 0,oy=XI?XI.valueOf:void 0;function fUr(c,e,n,h,t,i,s){switch(n){case CUr:if(c.byteLength!=e.byteLength||c.byteOffset!=e.byteOffset)return!1;c=c.buffer,e=e.buffer;case gUr:return!(c.byteLength!=e.byteLength||!i(new LI(c),new LI(e)));case lUr:case uUr:case UUr:return hUr(+c,+e);case mUr:return c.name==e.name&&c.message==e.message;case vUr:case zUr:return c==e+"";case _Ur:var o=iUr;case dUr:var u=h&aUr;if(o||(o=sUr),c.size!=e.size&&!u)return!1;var m=s.get(c);if(m)return m==e;h|=oUr,s.set(c,e);var _=tUr(o(c),o(e),h,t,i,s);return s.delete(c),_;case AUr:if(oy)return oy.call(c)==oy.call(e)}return!1}var DUr=fUr;function BUr(c,e){for(var n=-1,h=e.length,t=c.length;++n<h;)c[t+n]=e[n];return c}var jI=BUr,pUr=jI,SUr=Tl;function bUr(c,e,n){var h=e(c);return SUr(c)?h:pUr(h,n(c))}var GI=bUr;function EUr(c,e){for(var n=-1,h=c==null?0:c.length,t=0,i=[];++n<h;){var s=c[n];e(s,n,c)&&(i[t++]=s)}return i}var yUr=EUr;function wUr(){return[]}var VI=wUr,xUr=yUr,NUr=VI,FUr=Object.prototype,TUr=FUr.propertyIsEnumerable,JI=Object.getOwnPropertySymbols,RUr=JI?function(c){return c==null?[]:(c=Object(c),xUr(JI(c),function(e){return TUr.call(c,e)}))}:NUr,ly=RUr,MUr=GI,HUr=ly,OUr=aA;function kUr(c){return MUr(c,OUr,HUr)}var KI=kUr,ZI=KI,IUr=1,WUr=Object.prototype,qUr=WUr.hasOwnProperty;function PUr(c,e,n,h,t,i){var s=n&IUr,o=ZI(c),u=o.length,m=ZI(e),_=m.length;if(u!=_&&!s)return!1;for(var z=u;z--;){var C=o[z];if(!(s?C in e:qUr.call(e,C)))return!1}var A=i.get(c),E=i.get(e);if(A&&E)return A==e&&E==c;var N=!0;i.set(c,e),i.set(e,c);for(var y=s;++z<u;){C=o[z];var M=c[C],j=e[C];if(h)var I=s?h(j,M,C,e,c,i):h(M,j,C,c,e,i);if(!(I===void 0?M===j||t(M,j,n,h,i):I)){N=!1;break}y||(y=C=="constructor")}if(N&&!y){var H=c.constructor,G=e.constructor;H!=G&&"constructor"in c&&"constructor"in e&&!(typeof H=="function"&&H instanceof H&&typeof G=="function"&&G instanceof G)&&(N=!1)}return i.delete(c),i.delete(e),N}var $Ur=PUr,LUr=YU,XUr=t5,jUr=LUr(XUr,"DataView"),GUr=jUr,VUr=YU,JUr=t5,KUr=VUr(JUr,"Promise"),ZUr=KUr,YUr=YU,QUr=t5,rvr=YUr(QUr,"Set"),evr=rvr,nvr=YU,cvr=t5,hvr=nvr(cvr,"WeakMap"),tvr=hvr,uy=GUr,my=iy,_y=ZUr,Uy=evr,vy=tvr,YI=ZU,L9=kI,QI="[object Map]",ivr="[object Object]",rW="[object Promise]",eW="[object Set]",nW="[object WeakMap]",cW="[object DataView]",svr=L9(uy),avr=L9(my),ovr=L9(_y),lvr=L9(Uy),uvr=L9(vy),QU=YI;(uy&&QU(new uy(new ArrayBuffer(1)))!=cW||my&&QU(new my)!=QI||_y&&QU(_y.resolve())!=rW||Uy&&QU(new Uy)!=eW||vy&&QU(new vy)!=nW)&&(QU=function(c){var e=YI(c),n=e==ivr?c.constructor:void 0,h=n?L9(n):"";if(h)switch(h){case svr:return cW;case avr:return QI;case ovr:return rW;case lvr:return eW;case uvr:return nW}return e});var _D=QU,dy=ay,mvr=qI,_vr=DUr,Uvr=$Ur,hW=_D,tW=Tl,iW=ZE,vvr=wI,dvr=1,sW="[object Arguments]",aW="[object Array]",UD="[object Object]",zvr=Object.prototype,oW=zvr.hasOwnProperty;function Avr(c,e,n,h,t,i){var s=tW(c),o=tW(e),u=s?aW:hW(c),m=o?aW:hW(e);u=u==sW?UD:u,m=m==sW?UD:m;var _=u==UD,z=m==UD,C=u==m;if(C&&iW(c)){if(!iW(e))return!1;s=!0,_=!1}if(C&&!_)return i||(i=new dy),s||vvr(c)?mvr(c,e,n,h,t,i):_vr(c,e,u,n,h,t,i);if(!(n&dvr)){var A=_&&oW.call(c,"__wrapped__"),E=z&&oW.call(e,"__wrapped__");if(A||E){var N=A?c.value():c,y=E?e.value():e;return i||(i=new dy),t(N,y,n,h,i)}}return C?(i||(i=new dy),Uvr(c,e,n,h,t,i)):!1}var gvr=Avr,Cvr=gvr,lW=yu;function uW(c,e,n,h,t){return c===e?!0:c==null||e==null||!lW(c)&&!lW(e)?c!==c&&e!==e:Cvr(c,e,n,h,uW,t)}var mW=uW,fvr=ay,Dvr=mW,Bvr=1,pvr=2;function Svr(c,e,n,h){var t=n.length,i=t,s=!h;if(c==null)return!i;for(c=Object(c);t--;){var o=n[t];if(s&&o[2]?o[1]!==c[o[0]]:!(o[0]in c))return!1}for(;++t<i;){o=n[t];var u=o[0],m=c[u],_=o[1];if(s&&o[2]){if(m===void 0&&!(u in c))return!1}else{var z=new fvr;if(h)var C=h(m,_,u,c,e,z);if(!(C===void 0?Dvr(_,m,Bvr|pvr,h,z):C))return!1}}return!0}var bvr=Svr,Evr=I9;function yvr(c){return c===c&&!Evr(c)}var _W=yvr,wvr=_W,xvr=aA;function Nvr(c){for(var e=xvr(c),n=e.length;n--;){var h=e[n],t=c[h];e[n]=[h,t,wvr(t)]}return e}var Fvr=Nvr;function Tvr(c,e){return function(n){return n==null?!1:n[c]===e&&(e!==void 0||c in Object(n))}}var UW=Tvr,Rvr=bvr,Mvr=Fvr,Hvr=UW;function Ovr(c){var e=Mvr(c);return e.length==1&&e[0][2]?Hvr(e[0][0],e[0][1]):function(n){return n===c||Rvr(n,c,e)}}var kvr=Ovr,Ivr=ZU,Wvr=yu,qvr="[object Symbol]";function Pvr(c){return typeof c=="symbol"||Wvr(c)&&Ivr(c)==qvr}var zy=Pvr,$vr=Tl,Lvr=zy,Xvr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,jvr=/^\w*$/;function Gvr(c,e){if($vr(c))return!1;var n=typeof c;return n=="number"||n=="symbol"||n=="boolean"||c==null||Lvr(c)?!0:jvr.test(c)||!Xvr.test(c)||e!=null&&c in Object(e)}var Ay=Gvr,vW=sy,Vvr="Expected a function";function gy(c,e){if(typeof c!="function"||e!=null&&typeof e!="function")throw new TypeError(Vvr);var n=function(){var h=arguments,t=e?e.apply(this,h):h[0],i=n.cache;if(i.has(t))return i.get(t);var s=c.apply(this,h);return n.cache=i.set(t,s)||i,s};return n.cache=new(gy.Cache||vW),n}gy.Cache=vW;var Jvr=gy,Kvr=Jvr,Zvr=500;function Yvr(c){var e=Kvr(c,function(h){return n.size===Zvr&&n.clear(),h}),n=e.cache;return e}var Qvr=Yvr,rdr=Qvr,edr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ndr=/\\(\\)?/g,cdr=rdr(function(c){var e=[];return c.charCodeAt(0)===46&&e.push(""),c.replace(edr,function(n,h,t,i){e.push(t?i.replace(ndr,"$1"):h||n)}),e}),hdr=cdr,dW=iA,tdr=HI,idr=Tl,sdr=zy,zW=dW?dW.prototype:void 0,AW=zW?zW.toString:void 0;function gW(c){if(typeof c=="string")return c;if(idr(c))return tdr(c,gW)+"";if(sdr(c))return AW?AW.call(c):"";var e=c+"";return e=="0"&&1/c==-1/0?"-0":e}var adr=gW,odr=adr;function ldr(c){return c==null?"":odr(c)}var udr=ldr,mdr=Tl,_dr=Ay,Udr=hdr,vdr=udr;function ddr(c,e){return mdr(c)?c:_dr(c,e)?[c]:Udr(vdr(c))}var CW=ddr,zdr=zy;function Adr(c){if(typeof c=="string"||zdr(c))return c;var e=c+"";return e=="0"&&1/c==-1/0?"-0":e}var vD=Adr,gdr=CW,Cdr=vD;function fdr(c,e){e=gdr(e,c);for(var n=0,h=e.length;c!=null&&n<h;)c=c[Cdr(e[n++])];return n&&n==h?c:void 0}var fW=fdr,Ddr=fW;function Bdr(c,e,n){var h=c==null?void 0:Ddr(c,e);return h===void 0?n:h}var pdr=Bdr;function Sdr(c,e){return c!=null&&e in Object(c)}var bdr=Sdr,Edr=CW,ydr=SI,wdr=Tl,xdr=bI,Ndr=YE,Fdr=vD;function Tdr(c,e,n){e=Edr(e,c);for(var h=-1,t=e.length,i=!1;++h<t;){var s=Fdr(e[h]);if(!(i=c!=null&&n(c,s)))break;c=c[s]}return i||++h!=t?i:(t=c==null?0:c.length,!!t&&Ndr(t)&&xdr(s,t)&&(wdr(c)||ydr(c)))}var Rdr=Tdr,Mdr=bdr,Hdr=Rdr;function Odr(c,e){return c!=null&&Hdr(c,e,Mdr)}var kdr=Odr,Idr=mW,Wdr=pdr,qdr=kdr,Pdr=Ay,$dr=_W,Ldr=UW,Xdr=vD,jdr=1,Gdr=2;function Vdr(c,e){return Pdr(c)&&$dr(e)?Ldr(Xdr(c),e):function(n){var h=Wdr(n,c);return h===void 0&&h===e?qdr(n,c):Idr(e,h,jdr|Gdr)}}var Jdr=Vdr;function Kdr(c){return function(e){return e==null?void 0:e[c]}}var Zdr=Kdr,Ydr=fW;function Qdr(c){return function(e){return Ydr(e,c)}}var r9r=Qdr,e9r=Zdr,n9r=r9r,c9r=Ay,h9r=vD;function t9r(c){return c9r(c)?e9r(h9r(c)):n9r(c)}var i9r=t9r,s9r=kvr,a9r=Jdr,o9r=RI,l9r=Tl,u9r=i9r;function m9r(c){return typeof c=="function"?c:c==null?o9r:typeof c=="object"?l9r(c)?a9r(c[0],c[1]):s9r(c):u9r(c)}var _9r=m9r,U9r=sD;function v9r(c,e){return function(n,h){if(n==null)return n;if(!U9r(n))return c(n,h);for(var t=n.length,i=e?t:-1,s=Object(n);(e?i--:++i<t)&&h(s[i],i,s)!==!1;);return n}}var d9r=v9r,z9r=TI,A9r=d9r,g9r=A9r(z9r),C9r=g9r,f9r=C9r,D9r=sD;function B9r(c,e){var n=-1,h=D9r(c)?Array(c.length):[];return f9r(c,function(t,i,s){h[++n]=e(t,i,s)}),h}var p9r=B9r,S9r=HI,b9r=_9r,E9r=p9r,y9r=Tl;function w9r(c,e){var n=y9r(c)?S9r:E9r;return n(c,b9r(e))}var x9r=w9r;Object.defineProperty(tA,"__esModule",{value:!0}),tA.flattenNames=void 0;var N9r=s5r,F9r=dD(N9r),T9r=ny,R9r=dD(T9r),M9r=_6r,H9r=dD(M9r),O9r=x9r,k9r=dD(O9r);function dD(c){return c&&c.__esModule?c:{default:c}}var I9r=tA.flattenNames=function c(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=[];return(0,k9r.default)(e,function(h){Array.isArray(h)?c(h).map(function(t){return n.push(t)}):(0,H9r.default)(h)?(0,R9r.default)(h,function(t,i){t===!0&&n.push(i),n.push(i+"-"+t)}):(0,F9r.default)(h)&&n.push(h)}),n};tA.default=I9r;var oA={};function W9r(c,e){for(var n=-1,h=c==null?0:c.length;++n<h&&e(c[n],n,c)!==!1;);return c}var q9r=W9r,P9r=YU,$9r=function(){try{var c=P9r(Object,"defineProperty");return c({},"",{}),c}catch{}}(),L9r=$9r,DW=L9r;function X9r(c,e,n){e=="__proto__"&&DW?DW(c,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):c[e]=n}var BW=X9r,j9r=BW,G9r=hy,V9r=Object.prototype,J9r=V9r.hasOwnProperty;function K9r(c,e,n){var h=c[e];(!(J9r.call(c,e)&&G9r(h,n))||n===void 0&&!(e in c))&&j9r(c,e,n)}var pW=K9r,Z9r=pW,Y9r=BW;function Q9r(c,e,n,h){var t=!n;n||(n={});for(var i=-1,s=e.length;++i<s;){var o=e[i],u=h?h(n[o],c[o],o,n,c):void 0;u===void 0&&(u=c[o]),t?Y9r(n,o,u):Z9r(n,o,u)}return n}var zD=Q9r,r7r=zD,e7r=aA;function n7r(c,e){return c&&r7r(e,e7r(e),c)}var c7r=n7r;function h7r(c){var e=[];if(c!=null)for(var n in Object(c))e.push(n);return e}var t7r=h7r,i7r=I9,s7r=ey,a7r=t7r,o7r=Object.prototype,l7r=o7r.hasOwnProperty;function u7r(c){if(!i7r(c))return a7r(c);var e=s7r(c),n=[];for(var h in c)h=="constructor"&&(e||!l7r.call(c,h))||n.push(h);return n}var m7r=u7r,_7r=xI,U7r=m7r,v7r=sD;function d7r(c){return v7r(c)?_7r(c,!0):U7r(c)}var Cy=d7r,z7r=zD,A7r=Cy;function g7r(c,e){return c&&z7r(e,A7r(e),c)}var C7r=g7r,AD={exports:{}};AD.exports,function(c,e){var n=t5,h=e&&!e.nodeType&&e,t=h&&!0&&c&&!c.nodeType&&c,i=t&&t.exports===h,s=i?n.Buffer:void 0,o=s?s.allocUnsafe:void 0;function u(m,_){if(_)return m.slice();var z=m.length,C=o?o(z):new m.constructor(z);return m.copy(C),C}c.exports=u}(AD,AD.exports);var f7r=AD.exports;function D7r(c,e){var n=-1,h=c.length;for(e||(e=Array(h));++n<h;)e[n]=c[n];return e}var B7r=D7r,p7r=zD,S7r=ly;function b7r(c,e){return p7r(c,S7r(c),e)}var E7r=b7r,y7r=jI,w7r=cy,x7r=ly,N7r=VI,F7r=Object.getOwnPropertySymbols,T7r=F7r?function(c){for(var e=[];c;)y7r(e,x7r(c)),c=w7r(c);return e}:N7r,SW=T7r,R7r=zD,M7r=SW;function H7r(c,e){return R7r(c,M7r(c),e)}var O7r=H7r,k7r=GI,I7r=SW,W7r=Cy;function q7r(c){return k7r(c,W7r,I7r)}var P7r=q7r,$7r=Object.prototype,L7r=$7r.hasOwnProperty;function X7r(c){var e=c.length,n=new c.constructor(e);return e&&typeof c[0]=="string"&&L7r.call(c,"index")&&(n.index=c.index,n.input=c.input),n}var j7r=X7r,bW=PI;function G7r(c){var e=new c.constructor(c.byteLength);return new bW(e).set(new bW(c)),e}var fy=G7r,V7r=fy;function J7r(c,e){var n=e?V7r(c.buffer):c.buffer;return new c.constructor(n,c.byteOffset,c.byteLength)}var K7r=J7r,Z7r=/\w*$/;function Y7r(c){var e=new c.constructor(c.source,Z7r.exec(c));return e.lastIndex=c.lastIndex,e}var Q7r=Y7r,EW=iA,yW=EW?EW.prototype:void 0,wW=yW?yW.valueOf:void 0;function r8r(c){return wW?Object(wW.call(c)):{}}var e8r=r8r,n8r=fy;function c8r(c,e){var n=e?n8r(c.buffer):c.buffer;return new c.constructor(n,c.byteOffset,c.length)}var h8r=c8r,t8r=fy,i8r=K7r,s8r=Q7r,a8r=e8r,o8r=h8r,l8r="[object Boolean]",u8r="[object Date]",m8r="[object Map]",_8r="[object Number]",U8r="[object RegExp]",v8r="[object Set]",d8r="[object String]",z8r="[object Symbol]",A8r="[object ArrayBuffer]",g8r="[object DataView]",C8r="[object Float32Array]",f8r="[object Float64Array]",D8r="[object Int8Array]",B8r="[object Int16Array]",p8r="[object Int32Array]",S8r="[object Uint8Array]",b8r="[object Uint8ClampedArray]",E8r="[object Uint16Array]",y8r="[object Uint32Array]";function w8r(c,e,n){var h=c.constructor;switch(e){case A8r:return t8r(c);case l8r:case u8r:return new h(+c);case g8r:return i8r(c,n);case C8r:case f8r:case D8r:case B8r:case p8r:case S8r:case b8r:case E8r:case y8r:return o8r(c,n);case m8r:return new h;case _8r:case d8r:return new h(c);case U8r:return s8r(c);case v8r:return new h;case z8r:return a8r(c)}}var x8r=w8r,N8r=I9,xW=Object.create,F8r=function(){function c(){}return function(e){if(!N8r(e))return{};if(xW)return xW(e);c.prototype=e;var n=new c;return c.prototype=void 0,n}}(),T8r=F8r,R8r=T8r,M8r=cy,H8r=ey;function O8r(c){return typeof c.constructor=="function"&&!H8r(c)?R8r(M8r(c)):{}}var k8r=O8r,I8r=_D,W8r=yu,q8r="[object Map]";function P8r(c){return W8r(c)&&I8r(c)==q8r}var $8r=P8r,L8r=$8r,X8r=QE,NW=ry,FW=NW&&NW.isMap,j8r=FW?X8r(FW):L8r,G8r=j8r,V8r=_D,J8r=yu,K8r="[object Set]";function Z8r(c){return J8r(c)&&V8r(c)==K8r}var Y8r=Z8r,Q8r=Y8r,rzr=QE,TW=ry,RW=TW&&TW.isSet,ezr=RW?rzr(RW):Q8r,nzr=ezr,czr=ay,hzr=q9r,tzr=pW,izr=c7r,szr=C7r,azr=f7r,ozr=B7r,lzr=E7r,uzr=O7r,mzr=KI,_zr=P7r,Uzr=_D,vzr=j7r,dzr=x8r,zzr=k8r,Azr=Tl,gzr=ZE,Czr=G8r,fzr=I9,Dzr=nzr,Bzr=aA,pzr=Cy,Szr=1,bzr=2,Ezr=4,MW="[object Arguments]",yzr="[object Array]",wzr="[object Boolean]",xzr="[object Date]",Nzr="[object Error]",HW="[object Function]",Fzr="[object GeneratorFunction]",Tzr="[object Map]",Rzr="[object Number]",OW="[object Object]",Mzr="[object RegExp]",Hzr="[object Set]",Ozr="[object String]",kzr="[object Symbol]",Izr="[object WeakMap]",Wzr="[object ArrayBuffer]",qzr="[object DataView]",Pzr="[object Float32Array]",$zr="[object Float64Array]",Lzr="[object Int8Array]",Xzr="[object Int16Array]",jzr="[object Int32Array]",Gzr="[object Uint8Array]",Vzr="[object Uint8ClampedArray]",Jzr="[object Uint16Array]",Kzr="[object Uint32Array]",D1={};D1[MW]=D1[yzr]=D1[Wzr]=D1[qzr]=D1[wzr]=D1[xzr]=D1[Pzr]=D1[$zr]=D1[Lzr]=D1[Xzr]=D1[jzr]=D1[Tzr]=D1[Rzr]=D1[OW]=D1[Mzr]=D1[Hzr]=D1[Ozr]=D1[kzr]=D1[Gzr]=D1[Vzr]=D1[Jzr]=D1[Kzr]=!0,D1[Nzr]=D1[HW]=D1[Izr]=!1;function gD(c,e,n,h,t,i){var s,o=e&Szr,u=e&bzr,m=e&Ezr;if(n&&(s=t?n(c,h,t,i):n(c)),s!==void 0)return s;if(!fzr(c))return c;var _=Azr(c);if(_){if(s=vzr(c),!o)return ozr(c,s)}else{var z=Uzr(c),C=z==HW||z==Fzr;if(gzr(c))return azr(c,o);if(z==OW||z==MW||C&&!t){if(s=u||C?{}:zzr(c),!o)return u?uzr(c,szr(s,c)):lzr(c,izr(s,c))}else{if(!D1[z])return t?c:{};s=dzr(c,z,o)}}i||(i=new czr);var A=i.get(c);if(A)return A;i.set(c,s),Dzr(c)?c.forEach(function(y){s.add(gD(y,e,n,y,c,i))}):Czr(c)&&c.forEach(function(y,M){s.set(M,gD(y,e,n,M,c,i))});var E=m?u?_zr:mzr:u?pzr:Bzr,N=_?void 0:E(c);return hzr(N||c,function(y,M){N&&(M=y,y=c[M]),tzr(s,M,gD(y,e,n,M,c,i))}),s}var Zzr=gD,Yzr=Zzr,Qzr=1,rAr=4;function eAr(c){return Yzr(c,Qzr|rAr)}var nAr=eAr;Object.defineProperty(oA,"__esModule",{value:!0}),oA.mergeClasses=void 0;var cAr=ny,hAr=kW(cAr),tAr=nAr,iAr=kW(tAr),sAr=Object.assign||function(c){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var h in n)Object.prototype.hasOwnProperty.call(n,h)&&(c[h]=n[h])}return c};function kW(c){return c&&c.__esModule?c:{default:c}}var aAr=oA.mergeClasses=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],h=e.default&&(0,iAr.default)(e.default)||{};return n.map(function(t){var i=e[t];return i&&(0,hAr.default)(i,function(s,o){h[o]||(h[o]={}),h[o]=sAr({},h[o],i[o])}),t}),h};oA.default=aAr;var lA={};Object.defineProperty(lA,"__esModule",{value:!0}),lA.autoprefix=void 0;var oAr=ny,IW=uAr(oAr),lAr=Object.assign||function(c){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var h in n)Object.prototype.hasOwnProperty.call(n,h)&&(c[h]=n[h])}return c};function uAr(c){return c&&c.__esModule?c:{default:c}}var mAr={borderRadius:function(e){return{msBorderRadius:e,MozBorderRadius:e,OBorderRadius:e,WebkitBorderRadius:e,borderRadius:e}},boxShadow:function(e){return{msBoxShadow:e,MozBoxShadow:e,OBoxShadow:e,WebkitBoxShadow:e,boxShadow:e}},userSelect:function(e){return{WebkitTouchCallout:e,KhtmlUserSelect:e,MozUserSelect:e,msUserSelect:e,WebkitUserSelect:e,userSelect:e}},flex:function(e){return{WebkitBoxFlex:e,MozBoxFlex:e,WebkitFlex:e,msFlex:e,flex:e}},flexBasis:function(e){return{WebkitFlexBasis:e,flexBasis:e}},justifyContent:function(e){return{WebkitJustifyContent:e,justifyContent:e}},transition:function(e){return{msTransition:e,MozTransition:e,OTransition:e,WebkitTransition:e,transition:e}},transform:function(e){return{msTransform:e,MozTransform:e,OTransform:e,WebkitTransform:e,transform:e}},absolute:function(e){var n=e&&e.split(" ");return{position:"absolute",top:n&&n[0],right:n&&n[1],bottom:n&&n[2],left:n&&n[3]}},extend:function(e,n){var h=n[e];return h||{extend:e}}},_Ar=lA.autoprefix=function(e){var n={};return(0,IW.default)(e,function(h,t){var i={};(0,IW.default)(h,function(s,o){var u=mAr[o];u?i=lAr({},i,u(s)):i[o]=s}),n[t]=i}),n};lA.default=_Ar;var uA={};Object.defineProperty(uA,"__esModule",{value:!0}),uA.hover=void 0;var UAr=Object.assign||function(c){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var h in n)Object.prototype.hasOwnProperty.call(n,h)&&(c[h]=n[h])}return c},vAr=Z,Dy=dAr(vAr);function dAr(c){return c&&c.__esModule?c:{default:c}}function zAr(c,e){if(!(c instanceof e))throw new TypeError("Cannot call a class as a function")}function WW(c,e){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:c}function AAr(c,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);c.prototype=Object.create(e&&e.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(c,e):c.__proto__=e)}var gAr=uA.hover=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(h){AAr(t,h);function t(){var i,s,o,u;zAr(this,t);for(var m=arguments.length,_=Array(m),z=0;z<m;z++)_[z]=arguments[z];return u=(s=(o=WW(this,(i=t.__proto__||Object.getPrototypeOf(t)).call.apply(i,[this].concat(_))),o),o.state={hover:!1},o.handleMouseOver=function(){return o.setState({hover:!0})},o.handleMouseOut=function(){return o.setState({hover:!1})},o.render=function(){return Dy.default.createElement(n,{onMouseOver:o.handleMouseOver,onMouseOut:o.handleMouseOut},Dy.default.createElement(e,UAr({},o.props,o.state)))},s),WW(o,u)}return t}(Dy.default.Component)};uA.default=gAr;var mA={};Object.defineProperty(mA,"__esModule",{value:!0}),mA.active=void 0;var CAr=Object.assign||function(c){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var h in n)Object.prototype.hasOwnProperty.call(n,h)&&(c[h]=n[h])}return c},fAr=Z,By=DAr(fAr);function DAr(c){return c&&c.__esModule?c:{default:c}}function BAr(c,e){if(!(c instanceof e))throw new TypeError("Cannot call a class as a function")}function qW(c,e){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:c}function pAr(c,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);c.prototype=Object.create(e&&e.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(c,e):c.__proto__=e)}var SAr=mA.active=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(h){pAr(t,h);function t(){var i,s,o,u;BAr(this,t);for(var m=arguments.length,_=Array(m),z=0;z<m;z++)_[z]=arguments[z];return u=(s=(o=qW(this,(i=t.__proto__||Object.getPrototypeOf(t)).call.apply(i,[this].concat(_))),o),o.state={active:!1},o.handleMouseDown=function(){return o.setState({active:!0})},o.handleMouseUp=function(){return o.setState({active:!1})},o.render=function(){return By.default.createElement(n,{onMouseDown:o.handleMouseDown,onMouseUp:o.handleMouseUp},By.default.createElement(e,CAr({},o.props,o.state)))},s),qW(o,u)}return t}(By.default.Component)};mA.default=SAr;var py={};Object.defineProperty(py,"__esModule",{value:!0});var bAr=function(e,n){var h={},t=function(s){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;h[s]=o};return e===0&&t("first-child"),e===n-1&&t("last-child"),(e===0||e%2===0)&&t("even"),Math.abs(e%2)===1&&t("odd"),t("nth-child",e),h};py.default=bAr,Object.defineProperty(n2,"__esModule",{value:!0}),n2.ReactCSS=n2.loop=n2.handleActive=Sy=n2.handleHover=n2.hover=void 0;var EAr=tA,yAr=X9(EAr),wAr=oA,xAr=X9(wAr),NAr=lA,FAr=X9(NAr),TAr=uA,PW=X9(TAr),RAr=mA,MAr=X9(RAr),HAr=py,OAr=X9(HAr);function X9(c){return c&&c.__esModule?c:{default:c}}n2.hover=PW.default;var Sy=n2.handleHover=PW.default;n2.handleActive=MAr.default,n2.loop=OAr.default;var kAr=n2.ReactCSS=function(e){for(var n=arguments.length,h=Array(n>1?n-1:0),t=1;t<n;t++)h[t-1]=arguments[t];var i=(0,yAr.default)(h),s=(0,xAr.default)(e,i);return(0,FAr.default)(s)},Xn=n2.default=kAr,IAr=function(e,n,h,t,i){var s=i.clientWidth,o=i.clientHeight,u=typeof e.pageX=="number"?e.pageX:e.touches[0].pageX,m=typeof e.pageY=="number"?e.pageY:e.touches[0].pageY,_=u-(i.getBoundingClientRect().left+window.pageXOffset),z=m-(i.getBoundingClientRect().top+window.pageYOffset);if(h==="vertical"){var C=void 0;if(z<0?C=0:z>o?C=1:C=Math.round(z*100/o)/100,n.a!==C)return{h:n.h,s:n.s,l:n.l,a:C,source:"rgb"}}else{var A=void 0;if(_<0?A=0:_>s?A=1:A=Math.round(_*100/s)/100,t!==A)return{h:n.h,s:n.s,l:n.l,a:A,source:"rgb"}}return null},by={},WAr=function(e,n,h,t){if(typeof document>"u"&&!t)return null;var i=t?new t:document.createElement("canvas");i.width=h*2,i.height=h*2;var s=i.getContext("2d");return s?(s.fillStyle=e,s.fillRect(0,0,i.width,i.height),s.fillStyle=n,s.fillRect(0,0,h,h),s.translate(h,h),s.fillRect(0,0,h,h),i.toDataURL()):null},qAr=function(e,n,h,t){var i=e+"-"+n+"-"+h+(t?"-server":"");if(by[i])return by[i];var s=WAr(e,n,h,t);return by[i]=s,s},$W=Object.assign||function(c){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var h in n)Object.prototype.hasOwnProperty.call(n,h)&&(c[h]=n[h])}return c},j9=function(e){var n=e.white,h=e.grey,t=e.size,i=e.renderers,s=e.borderRadius,o=e.boxShadow,u=e.children,m=Xn({default:{grid:{borderRadius:s,boxShadow:o,absolute:"0px 0px 0px 0px",background:"url("+qAr(n,h,t,i.canvas)+") center left"}}});return Z.isValidElement(u)?Z.cloneElement(u,$W({},u.props,{style:$W({},u.props.style,m.grid)})):Z.createElement("div",{style:m.grid})};j9.defaultProps={size:8,white:"transparent",grey:"rgba(0,0,0,.08)",renderers:{}};var PAr=Object.assign||function(c){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var h in n)Object.prototype.hasOwnProperty.call(n,h)&&(c[h]=n[h])}return c},$Ar=function(){function c(e,n){for(var h=0;h<n.length;h++){var t=n[h];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(e,t.key,t)}}return function(e,n,h){return n&&c(e.prototype,n),h&&c(e,h),e}}();function LAr(c,e){if(!(c instanceof e))throw new TypeError("Cannot call a class as a function")}function LW(c,e){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:c}function XAr(c,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);c.prototype=Object.create(e&&e.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(c,e):c.__proto__=e)}var Ey=function(c){XAr(e,c);function e(){var n,h,t,i;LAr(this,e);for(var s=arguments.length,o=Array(s),u=0;u<s;u++)o[u]=arguments[u];return i=(h=(t=LW(this,(n=e.__proto__||Object.getPrototypeOf(e)).call.apply(n,[this].concat(o))),t),t.handleChange=function(m){var _=IAr(m,t.props.hsl,t.props.direction,t.props.a,t.container);_&&typeof t.props.onChange=="function"&&t.props.onChange(_,m)},t.handleMouseDown=function(m){t.handleChange(m),window.addEventListener("mousemove",t.handleChange),window.addEventListener("mouseup",t.handleMouseUp)},t.handleMouseUp=function(){t.unbindEventListeners()},t.unbindEventListeners=function(){window.removeEventListener("mousemove",t.handleChange),window.removeEventListener("mouseup",t.handleMouseUp)},h),LW(t,i)}return $Ar(e,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var h=this,t=this.props.rgb,i=Xn({default:{alpha:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},checkboard:{absolute:"0px 0px 0px 0px",overflow:"hidden",borderRadius:this.props.radius},gradient:{absolute:"0px 0px 0px 0px",background:"linear-gradient(to right, rgba("+t.r+","+t.g+","+t.b+`, 0) 0%,
|
|
69
69
|
rgba(`+t.r+","+t.g+","+t.b+", 1) 100%)",boxShadow:this.props.shadow,borderRadius:this.props.radius},container:{position:"relative",height:"100%",margin:"0 3px"},pointer:{position:"absolute",left:t.a*100+"%"},slider:{width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",marginTop:"1px",transform:"translateX(-2px)"}},vertical:{gradient:{background:"linear-gradient(to bottom, rgba("+t.r+","+t.g+","+t.b+`, 0) 0%,
|
|
70
70
|
rgba(`+t.r+","+t.g+","+t.b+", 1) 100%)"},pointer:{left:0,top:t.a*100+"%"}},overwrite:PAr({},this.props.style)},{vertical:this.props.direction==="vertical",overwrite:!0});return Z.createElement("div",{style:i.alpha},Z.createElement("div",{style:i.checkboard},Z.createElement(j9,{renderers:this.props.renderers})),Z.createElement("div",{style:i.gradient}),Z.createElement("div",{style:i.container,ref:function(o){return h.container=o},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},Z.createElement("div",{style:i.pointer},this.props.pointer?Z.createElement(this.props.pointer,this.props):Z.createElement("div",{style:i.slider}))))}}]),e}(Z.PureComponent||Z.Component),jAr=function(){function c(e,n){for(var h=0;h<n.length;h++){var t=n[h];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(e,t.key,t)}}return function(e,n,h){return n&&c(e.prototype,n),h&&c(e,h),e}}();function GAr(c,e,n){return e in c?Object.defineProperty(c,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):c[e]=n,c}function VAr(c,e){if(!(c instanceof e))throw new TypeError("Cannot call a class as a function")}function JAr(c,e){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:c}function KAr(c,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);c.prototype=Object.create(e&&e.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(c,e):c.__proto__=e)}var ZAr=1,XW=38,YAr=40,QAr=[XW,YAr],rgr=function(e){return QAr.indexOf(e)>-1},egr=function(e){return Number(String(e).replace(/%/g,""))},ngr=1,eh=function(c){KAr(e,c);function e(n){VAr(this,e);var h=JAr(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return h.handleBlur=function(){h.state.blurValue&&h.setState({value:h.state.blurValue,blurValue:null})},h.handleChange=function(t){h.setUpdatedValue(t.target.value,t)},h.handleKeyDown=function(t){var i=egr(t.target.value);if(!isNaN(i)&&rgr(t.keyCode)){var s=h.getArrowOffset(),o=t.keyCode===XW?i+s:i-s;h.setUpdatedValue(o,t)}},h.handleDrag=function(t){if(h.props.dragLabel){var i=Math.round(h.props.value+t.movementX);i>=0&&i<=h.props.dragMax&&h.props.onChange&&h.props.onChange(h.getValueObjectWithLabel(i),t)}},h.handleMouseDown=function(t){h.props.dragLabel&&(t.preventDefault(),h.handleDrag(t),window.addEventListener("mousemove",h.handleDrag),window.addEventListener("mouseup",h.handleMouseUp))},h.handleMouseUp=function(){h.unbindEventListeners()},h.unbindEventListeners=function(){window.removeEventListener("mousemove",h.handleDrag),window.removeEventListener("mouseup",h.handleMouseUp)},h.state={value:String(n.value).toUpperCase(),blurValue:String(n.value).toUpperCase()},h.inputId="rc-editable-input-"+ngr++,h}return jAr(e,[{key:"componentDidUpdate",value:function(h,t){this.props.value!==this.state.value&&(h.value!==this.props.value||t.value!==this.state.value)&&(this.input===document.activeElement?this.setState({blurValue:String(this.props.value).toUpperCase()}):this.setState({value:String(this.props.value).toUpperCase(),blurValue:!this.state.blurValue&&String(this.props.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"getValueObjectWithLabel",value:function(h){return GAr({},this.props.label,h)}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||ZAr}},{key:"setUpdatedValue",value:function(h,t){var i=this.props.label?this.getValueObjectWithLabel(h):h;this.props.onChange&&this.props.onChange(i,t),this.setState({value:h})}},{key:"render",value:function(){var h=this,t=Xn({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return Z.createElement("div",{style:t.wrap},Z.createElement("input",{id:this.inputId,style:t.input,ref:function(s){return h.input=s},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?Z.createElement("label",{htmlFor:this.inputId,style:t.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),e}(Z.PureComponent||Z.Component),cgr=function(e,n,h,t){var i=t.clientWidth,s=t.clientHeight,o=typeof e.pageX=="number"?e.pageX:e.touches[0].pageX,u=typeof e.pageY=="number"?e.pageY:e.touches[0].pageY,m=o-(t.getBoundingClientRect().left+window.pageXOffset),_=u-(t.getBoundingClientRect().top+window.pageYOffset);if(n==="vertical"){var z=void 0;if(_<0)z=359;else if(_>s)z=0;else{var C=-(_*100/s)+100;z=360*C/100}if(h.h!==z)return{h:z,s:h.s,l:h.l,a:h.a,source:"hsl"}}else{var A=void 0;if(m<0)A=0;else if(m>i)A=359;else{var E=m*100/i;A=360*E/100}if(h.h!==A)return{h:A,s:h.s,l:h.l,a:h.a,source:"hsl"}}return null},hgr=function(){function c(e,n){for(var h=0;h<n.length;h++){var t=n[h];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(e,t.key,t)}}return function(e,n,h){return n&&c(e.prototype,n),h&&c(e,h),e}}();function tgr(c,e){if(!(c instanceof e))throw new TypeError("Cannot call a class as a function")}function jW(c,e){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:c}function igr(c,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);c.prototype=Object.create(e&&e.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(c,e):c.__proto__=e)}var G9=function(c){igr(e,c);function e(){var n,h,t,i;tgr(this,e);for(var s=arguments.length,o=Array(s),u=0;u<s;u++)o[u]=arguments[u];return i=(h=(t=jW(this,(n=e.__proto__||Object.getPrototypeOf(e)).call.apply(n,[this].concat(o))),t),t.handleChange=function(m){var _=cgr(m,t.props.direction,t.props.hsl,t.container);_&&typeof t.props.onChange=="function"&&t.props.onChange(_,m)},t.handleMouseDown=function(m){t.handleChange(m),window.addEventListener("mousemove",t.handleChange),window.addEventListener("mouseup",t.handleMouseUp)},t.handleMouseUp=function(){t.unbindEventListeners()},h),jW(t,i)}return hgr(e,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"unbindEventListeners",value:function(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var h=this,t=this.props.direction,i=t===void 0?"horizontal":t,s=Xn({default:{hue:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius,boxShadow:this.props.shadow},container:{padding:"0 2px",position:"relative",height:"100%",borderRadius:this.props.radius},pointer:{position:"absolute",left:this.props.hsl.h*100/360+"%"},slider:{marginTop:"1px",width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",transform:"translateX(-2px)"}},vertical:{pointer:{left:"0px",top:-(this.props.hsl.h*100/360)+100+"%"}}},{vertical:i==="vertical"});return Z.createElement("div",{style:s.hue},Z.createElement("div",{className:"hue-"+i,style:s.container,ref:function(u){return h.container=u},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},Z.createElement("style",null,`
|
|
71
71
|
.hue-horizontal {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as x, U as ht, T as de, a as ft, $ as w, a0 as B, s as S, a9 as ce, aa as W, ab as z, N as pt, l as H, ac as gt, ad as he, Y as R, ae as A, af as C, w as O, k, c as Ce, F as P, a2 as re, R as se, M as U, z as Pe, b as D, B as F, x as $, ag as mt, ah as ie, J as ee, ai as E, q as ne, t as xt, G as _t, m as Fe, p as Be, a4 as Ue, a7 as Me, n as bt, o as yt, a5 as vt, a6 as Tt, a8 as wt, aj as St, ak as Ct, D as Re, al as q, e as y, am as Pt } from "./index-
|
|
1
|
+
import { E as x, U as ht, T as de, a as ft, $ as w, a0 as B, s as S, a9 as ce, aa as W, ab as z, N as pt, l as H, ac as gt, ad as he, Y as R, ae as A, af as C, w as O, k, c as Ce, F as P, a2 as re, R as se, M as U, z as Pe, b as D, B as F, x as $, ag as mt, ah as ie, J as ee, ai as E, q as ne, t as xt, G as _t, m as Fe, p as Be, a4 as Ue, a7 as Me, n as bt, o as yt, a5 as vt, a6 as Tt, a8 as wt, aj as St, ak as Ct, D as Re, al as q, e as y, am as Pt } from "./index-BxZptoze.mjs";
|
|
2
2
|
import { S as Y, c as X, a as Ft, b as Bt, B as Ge } from "./colorToUniform-zJcCVLeu.mjs";
|
|
3
3
|
class Ae {
|
|
4
4
|
/**
|
package/package.json
CHANGED