From 92dcb58ff9647a3360ed06839be45ea3c0b216f6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 8 Nov 2024 16:13:00 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20ebi-webc?= =?UTF-8?q?omponents/nightingale@196e101fe0429f515c6322696d57c55002108342?= =?UTF-8?q?=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- v3/0.js | 1 + v3/1.js | 1 + v3/10.js | 1 + v3/11.js | 1 + v3/12.js | 1 + v3/13.js | 1 + v3/14.js | 1 + v3/15.js | 1 + v3/16.js | 49 +++++++ v3/17.js | 1 + v3/18.js | 1 + v3/19.js | 1 + v3/2.js | 1 + v3/20.js | 1 + v3/21.js | 1 + v3/22.js | 1 + v3/23.js | 10 ++ v3/24.js | 1 + v3/25.js | 1 + v3/26.js | 1 + v3/3.js | 1 + v3/4.js | 1 + v3/5.js | 64 +++++++++ v3/6.js | 5 + v3/7.js | 1 + v3/8.js | 7 + v3/9.js | 1 + v3/conservation.worker.worker.js | 1 + v3/index.html | 1 + v3/main.js | 234 +++++++++++++++++++++++++++++++ 30 files changed, 393 insertions(+) create mode 100644 v3/0.js create mode 100644 v3/1.js create mode 100644 v3/10.js create mode 100644 v3/11.js create mode 100644 v3/12.js create mode 100644 v3/13.js create mode 100644 v3/14.js create mode 100644 v3/15.js create mode 100644 v3/16.js create mode 100644 v3/17.js create mode 100644 v3/18.js create mode 100644 v3/19.js create mode 100644 v3/2.js create mode 100644 v3/20.js create mode 100644 v3/21.js create mode 100644 v3/22.js create mode 100644 v3/23.js create mode 100644 v3/24.js create mode 100644 v3/25.js create mode 100644 v3/26.js create mode 100644 v3/3.js create mode 100644 v3/4.js create mode 100644 v3/5.js create mode 100644 v3/6.js create mode 100644 v3/7.js create mode 100644 v3/8.js create mode 100644 v3/9.js create mode 100644 v3/conservation.worker.worker.js create mode 100644 v3/index.html create mode 100644 v3/main.js diff --git a/v3/0.js b/v3/0.js new file mode 100644 index 000000000..7d425400c --- /dev/null +++ b/v3/0.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[0],{585:function(n,t,e){"use strict";e.r(t),e.d(t,"version",(function(){return r})),e.d(t,"bisect",(function(){return f})),e.d(t,"bisectRight",(function(){return a})),e.d(t,"bisectLeft",(function(){return c})),e.d(t,"ascending",(function(){return i})),e.d(t,"bisector",(function(){return u})),e.d(t,"cross",(function(){return h})),e.d(t,"descending",(function(){return d})),e.d(t,"deviation",(function(){return y})),e.d(t,"extent",(function(){return g})),e.d(t,"histogram",(function(){return P})),e.d(t,"thresholdFreedmanDiaconis",(function(){return R})),e.d(t,"thresholdScott",(function(){return D})),e.d(t,"thresholdSturges",(function(){return C})),e.d(t,"max",(function(){return q})),e.d(t,"mean",(function(){return L})),e.d(t,"median",(function(){return U})),e.d(t,"merge",(function(){return B})),e.d(t,"min",(function(){return O})),e.d(t,"pairs",(function(){return s})),e.d(t,"permute",(function(){return Y})),e.d(t,"quantile",(function(){return z})),e.d(t,"range",(function(){return M})),e.d(t,"scan",(function(){return F})),e.d(t,"shuffle",(function(){return I})),e.d(t,"sum",(function(){return H})),e.d(t,"ticks",(function(){return A})),e.d(t,"tickIncrement",(function(){return k})),e.d(t,"tickStep",(function(){return E})),e.d(t,"transpose",(function(){return j})),e.d(t,"variance",(function(){return v})),e.d(t,"zip",(function(){return V})),e.d(t,"axisTop",(function(){return tn})),e.d(t,"axisRight",(function(){return en})),e.d(t,"axisBottom",(function(){return rn})),e.d(t,"axisLeft",(function(){return un})),e.d(t,"brush",(function(){return Ei})),e.d(t,"brushX",(function(){return Ai})),e.d(t,"brushY",(function(){return ki})),e.d(t,"brushSelection",(function(){return Ti})),e.d(t,"chord",(function(){return Bi})),e.d(t,"ribbon",(function(){return Ji})),e.d(t,"nest",(function(){return eu})),e.d(t,"set",(function(){return su})),e.d(t,"map",(function(){return tu})),e.d(t,"keys",(function(){return lu})),e.d(t,"values",(function(){return hu})),e.d(t,"entries",(function(){return du})),e.d(t,"color",(function(){return Xt})),e.d(t,"rgb",(function(){return Wt})),e.d(t,"hsl",(function(){return ee})),e.d(t,"lab",(function(){return bu})),e.d(t,"hcl",(function(){return Tu})),e.d(t,"lch",(function(){return Su})),e.d(t,"gray",(function(){return gu})),e.d(t,"cubehelix",(function(){return Du})),e.d(t,"contours",(function(){return ju})),e.d(t,"contourDensity",(function(){return Zu})),e.d(t,"dispatch",(function(){return hn})),e.d(t,"drag",(function(){return ro})),e.d(t,"dragDisable",(function(){return At})),e.d(t,"dragEnable",(function(){return kt})),e.d(t,"dsvFormat",(function(){return so})),e.d(t,"csvParse",(function(){return ho})),e.d(t,"csvParseRows",(function(){return po})),e.d(t,"csvFormat",(function(){return vo})),e.d(t,"csvFormatBody",(function(){return yo})),e.d(t,"csvFormatRows",(function(){return go})),e.d(t,"csvFormatRow",(function(){return bo})),e.d(t,"csvFormatValue",(function(){return _o})),e.d(t,"tsvParse",(function(){return xo})),e.d(t,"tsvParseRows",(function(){return wo})),e.d(t,"tsvFormat",(function(){return Mo})),e.d(t,"tsvFormatBody",(function(){return No})),e.d(t,"tsvFormatRows",(function(){return So})),e.d(t,"tsvFormatRow",(function(){return To})),e.d(t,"tsvFormatValue",(function(){return Ao})),e.d(t,"autoType",(function(){return ko})),e.d(t,"easeLinear",(function(){return Co})),e.d(t,"easeQuad",(function(){return Ro})),e.d(t,"easeQuadIn",(function(){return Po})),e.d(t,"easeQuadOut",(function(){return zo})),e.d(t,"easeQuadInOut",(function(){return Ro})),e.d(t,"easeCubic",(function(){return Zr})),e.d(t,"easeCubicIn",(function(){return $r})),e.d(t,"easeCubicOut",(function(){return Wr})),e.d(t,"easeCubicInOut",(function(){return Zr})),e.d(t,"easePoly",(function(){return Lo})),e.d(t,"easePolyIn",(function(){return Do})),e.d(t,"easePolyOut",(function(){return qo})),e.d(t,"easePolyInOut",(function(){return Lo})),e.d(t,"easeSin",(function(){return Fo})),e.d(t,"easeSinIn",(function(){return Oo})),e.d(t,"easeSinOut",(function(){return Yo})),e.d(t,"easeSinInOut",(function(){return Fo})),e.d(t,"easeExp",(function(){return Xo})),e.d(t,"easeExpIn",(function(){return Ho})),e.d(t,"easeExpOut",(function(){return jo})),e.d(t,"easeExpInOut",(function(){return Xo})),e.d(t,"easeCircle",(function(){return $o})),e.d(t,"easeCircleIn",(function(){return Vo})),e.d(t,"easeCircleOut",(function(){return Go})),e.d(t,"easeCircleInOut",(function(){return $o})),e.d(t,"easeBounce",(function(){return Zo})),e.d(t,"easeBounceIn",(function(){return Wo})),e.d(t,"easeBounceOut",(function(){return Zo})),e.d(t,"easeBounceInOut",(function(){return Qo})),e.d(t,"easeBack",(function(){return na})),e.d(t,"easeBackIn",(function(){return Jo})),e.d(t,"easeBackOut",(function(){return Ko})),e.d(t,"easeBackInOut",(function(){return na})),e.d(t,"easeElastic",(function(){return ra})),e.d(t,"easeElasticIn",(function(){return ea})),e.d(t,"easeElasticOut",(function(){return ra})),e.d(t,"easeElasticInOut",(function(){return ia})),e.d(t,"blob",(function(){return oa})),e.d(t,"buffer",(function(){return ca})),e.d(t,"dsv",(function(){return ha})),e.d(t,"csv",(function(){return da})),e.d(t,"tsv",(function(){return pa})),e.d(t,"image",(function(){return va})),e.d(t,"json",(function(){return ga})),e.d(t,"text",(function(){return sa})),e.d(t,"xml",(function(){return _a})),e.d(t,"html",(function(){return ma})),e.d(t,"svg",(function(){return xa})),e.d(t,"forceCenter",(function(){return wa})),e.d(t,"forceCollide",(function(){return qa})),e.d(t,"forceLink",(function(){return Oa})),e.d(t,"forceManyBody",(function(){return ja})),e.d(t,"forceRadial",(function(){return Xa})),e.d(t,"forceSimulation",(function(){return Ha})),e.d(t,"forceX",(function(){return Va})),e.d(t,"forceY",(function(){return Ga})),e.d(t,"formatDefaultLocale",(function(){return fc})),e.d(t,"format",(function(){return tc})),e.d(t,"formatPrefix",(function(){return ec})),e.d(t,"formatLocale",(function(){return cc})),e.d(t,"formatSpecifier",(function(){return Qa})),e.d(t,"FormatSpecifier",(function(){return Ja})),e.d(t,"precisionFixed",(function(){return sc})),e.d(t,"precisionPrefix",(function(){return lc})),e.d(t,"precisionRound",(function(){return hc})),e.d(t,"geoArea",(function(){return rf})),e.d(t,"geoBounds",(function(){return Zf})),e.d(t,"geoCentroid",(function(){return cs})),e.d(t,"geoCircle",(function(){return _s})),e.d(t,"geoClipAntimeridian",(function(){return Ps})),e.d(t,"geoClipCircle",(function(){return zs})),e.d(t,"geoClipExtent",(function(){return Us})),e.d(t,"geoClipRectangle",(function(){return Rs})),e.d(t,"geoContains",(function(){return tl})),e.d(t,"geoDistance",(function(){return Vs})),e.d(t,"geoGraticule",(function(){return il})),e.d(t,"geoGraticule10",(function(){return ul})),e.d(t,"geoInterpolate",(function(){return sl})),e.d(t,"geoLength",(function(){return Hs})),e.d(t,"geoPath",(function(){return ch})),e.d(t,"geoAlbers",(function(){return Ah})),e.d(t,"geoAlbersUsa",(function(){return kh})),e.d(t,"geoAzimuthalEqualArea",(function(){return zh})),e.d(t,"geoAzimuthalEqualAreaRaw",(function(){return Ph})),e.d(t,"geoAzimuthalEquidistant",(function(){return Dh})),e.d(t,"geoAzimuthalEquidistantRaw",(function(){return Rh})),e.d(t,"geoConicConformal",(function(){return Yh})),e.d(t,"geoConicConformalRaw",(function(){return Oh})),e.d(t,"geoConicEqualArea",(function(){return Th})),e.d(t,"geoConicEqualAreaRaw",(function(){return Sh})),e.d(t,"geoConicEquidistant",(function(){return jh})),e.d(t,"geoConicEquidistantRaw",(function(){return Hh})),e.d(t,"geoEqualEarth",(function(){return Qh})),e.d(t,"geoEqualEarthRaw",(function(){return Zh})),e.d(t,"geoEquirectangular",(function(){return Ih})),e.d(t,"geoEquirectangularRaw",(function(){return Fh})),e.d(t,"geoGnomonic",(function(){return Kh})),e.d(t,"geoGnomonicRaw",(function(){return Jh})),e.d(t,"geoIdentity",(function(){return nd})),e.d(t,"geoProjection",(function(){return wh})),e.d(t,"geoProjectionMutator",(function(){return Mh})),e.d(t,"geoMercator",(function(){return Lh})),e.d(t,"geoMercatorRaw",(function(){return qh})),e.d(t,"geoNaturalEarth1",(function(){return ed})),e.d(t,"geoNaturalEarth1Raw",(function(){return td})),e.d(t,"geoOrthographic",(function(){return id})),e.d(t,"geoOrthographicRaw",(function(){return rd})),e.d(t,"geoStereographic",(function(){return od})),e.d(t,"geoStereographicRaw",(function(){return ud})),e.d(t,"geoTransverseMercator",(function(){return cd})),e.d(t,"geoTransverseMercatorRaw",(function(){return ad})),e.d(t,"geoRotation",(function(){return ys})),e.d(t,"geoStream",(function(){return Wc})),e.d(t,"geoTransform",(function(){return fh})),e.d(t,"cluster",(function(){return hd})),e.d(t,"hierarchy",(function(){return pd})),e.d(t,"pack",(function(){return Od})),e.d(t,"packSiblings",(function(){return Rd})),e.d(t,"packEnclose",(function(){return md})),e.d(t,"partition",(function(){return Xd})),e.d(t,"stratify",(function(){return Zd})),e.d(t,"tree",(function(){return rp})),e.d(t,"treemap",(function(){return cp})),e.d(t,"treemapBinary",(function(){return fp})),e.d(t,"treemapDice",(function(){return jd})),e.d(t,"treemapSlice",(function(){return ip})),e.d(t,"treemapSliceDice",(function(){return sp})),e.d(t,"treemapSquarify",(function(){return ap})),e.d(t,"treemapResquarify",(function(){return lp})),e.d(t,"interpolate",(function(){return Ee})),e.d(t,"interpolateArray",(function(){return _e})),e.d(t,"interpolateBasis",(function(){return oe})),e.d(t,"interpolateBasisClosed",(function(){return ae})),e.d(t,"interpolateDate",(function(){return xe})),e.d(t,"interpolateDiscrete",(function(){return hp})),e.d(t,"interpolateHue",(function(){return dp})),e.d(t,"interpolateNumber",(function(){return we})),e.d(t,"interpolateNumberArray",(function(){return ge})),e.d(t,"interpolateObject",(function(){return Ne})),e.d(t,"interpolateRound",(function(){return pp})),e.d(t,"interpolateString",(function(){return Ae})),e.d(t,"interpolateTransformCss",(function(){return vr})),e.d(t,"interpolateTransformSvg",(function(){return yr})),e.d(t,"interpolateZoom",(function(){return gp})),e.d(t,"interpolateRgb",(function(){return de})),e.d(t,"interpolateRgbBasis",(function(){return ve})),e.d(t,"interpolateRgbBasisClosed",(function(){return ye})),e.d(t,"interpolateHsl",(function(){return _p})),e.d(t,"interpolateHslLong",(function(){return mp})),e.d(t,"interpolateLab",(function(){return xp})),e.d(t,"interpolateHcl",(function(){return Mp})),e.d(t,"interpolateHclLong",(function(){return Np})),e.d(t,"interpolateCubehelix",(function(){return Tp})),e.d(t,"interpolateCubehelixLong",(function(){return Ap})),e.d(t,"piecewise",(function(){return kp})),e.d(t,"quantize",(function(){return Ep})),e.d(t,"path",(function(){return Vi})),e.d(t,"polygonArea",(function(){return Cp})),e.d(t,"polygonCentroid",(function(){return Pp})),e.d(t,"polygonHull",(function(){return Dp})),e.d(t,"polygonContains",(function(){return qp})),e.d(t,"polygonLength",(function(){return Lp})),e.d(t,"quadtree",(function(){return Ea})),e.d(t,"randomUniform",(function(){return Bp})),e.d(t,"randomNormal",(function(){return Op})),e.d(t,"randomLogNormal",(function(){return Yp})),e.d(t,"randomBates",(function(){return Ip})),e.d(t,"randomIrwinHall",(function(){return Fp})),e.d(t,"randomExponential",(function(){return Hp})),e.d(t,"scaleBand",(function(){return Qp})),e.d(t,"scalePoint",(function(){return Kp})),e.d(t,"scaleIdentity",(function(){return dv})),e.d(t,"scaleLinear",(function(){return hv})),e.d(t,"scaleLog",(function(){return wv})),e.d(t,"scaleSymlog",(function(){return Tv})),e.d(t,"scaleOrdinal",(function(){return Zp})),e.d(t,"scaleImplicit",(function(){return Wp})),e.d(t,"scalePow",(function(){return Pv})),e.d(t,"scaleSqrt",(function(){return zv})),e.d(t,"scaleQuantile",(function(){return Rv})),e.d(t,"scaleQuantize",(function(){return Dv})),e.d(t,"scaleThreshold",(function(){return qv})),e.d(t,"scaleTime",(function(){return bb})),e.d(t,"scaleUtc",(function(){return kb})),e.d(t,"scaleSequential",(function(){return Pb})),e.d(t,"scaleSequentialLog",(function(){return zb})),e.d(t,"scaleSequentialPow",(function(){return Db})),e.d(t,"scaleSequentialSqrt",(function(){return qb})),e.d(t,"scaleSequentialSymlog",(function(){return Rb})),e.d(t,"scaleSequentialQuantile",(function(){return Lb})),e.d(t,"scaleDiverging",(function(){return Bb})),e.d(t,"scaleDivergingLog",(function(){return Ob})),e.d(t,"scaleDivergingPow",(function(){return Fb})),e.d(t,"scaleDivergingSqrt",(function(){return Ib})),e.d(t,"scaleDivergingSymlog",(function(){return Yb})),e.d(t,"tickFormat",(function(){return sv})),e.d(t,"schemeCategory10",(function(){return jb})),e.d(t,"schemeAccent",(function(){return Xb})),e.d(t,"schemeDark2",(function(){return Vb})),e.d(t,"schemePaired",(function(){return Gb})),e.d(t,"schemePastel1",(function(){return $b})),e.d(t,"schemePastel2",(function(){return Wb})),e.d(t,"schemeSet1",(function(){return Zb})),e.d(t,"schemeSet2",(function(){return Qb})),e.d(t,"schemeSet3",(function(){return Jb})),e.d(t,"schemeTableau10",(function(){return Kb})),e.d(t,"interpolateBrBG",(function(){return e_})),e.d(t,"schemeBrBG",(function(){return t_})),e.d(t,"interpolatePRGn",(function(){return i_})),e.d(t,"schemePRGn",(function(){return r_})),e.d(t,"interpolatePiYG",(function(){return o_})),e.d(t,"schemePiYG",(function(){return u_})),e.d(t,"interpolatePuOr",(function(){return c_})),e.d(t,"schemePuOr",(function(){return a_})),e.d(t,"interpolateRdBu",(function(){return s_})),e.d(t,"schemeRdBu",(function(){return f_})),e.d(t,"interpolateRdGy",(function(){return h_})),e.d(t,"schemeRdGy",(function(){return l_})),e.d(t,"interpolateRdYlBu",(function(){return p_})),e.d(t,"schemeRdYlBu",(function(){return d_})),e.d(t,"interpolateRdYlGn",(function(){return y_})),e.d(t,"schemeRdYlGn",(function(){return v_})),e.d(t,"interpolateSpectral",(function(){return b_})),e.d(t,"schemeSpectral",(function(){return g_})),e.d(t,"interpolateBuGn",(function(){return m_})),e.d(t,"schemeBuGn",(function(){return __})),e.d(t,"interpolateBuPu",(function(){return w_})),e.d(t,"schemeBuPu",(function(){return x_})),e.d(t,"interpolateGnBu",(function(){return N_})),e.d(t,"schemeGnBu",(function(){return M_})),e.d(t,"interpolateOrRd",(function(){return T_})),e.d(t,"schemeOrRd",(function(){return S_})),e.d(t,"interpolatePuBuGn",(function(){return k_})),e.d(t,"schemePuBuGn",(function(){return A_})),e.d(t,"interpolatePuBu",(function(){return C_})),e.d(t,"schemePuBu",(function(){return E_})),e.d(t,"interpolatePuRd",(function(){return z_})),e.d(t,"schemePuRd",(function(){return P_})),e.d(t,"interpolateRdPu",(function(){return D_})),e.d(t,"schemeRdPu",(function(){return R_})),e.d(t,"interpolateYlGnBu",(function(){return L_})),e.d(t,"schemeYlGnBu",(function(){return q_})),e.d(t,"interpolateYlGn",(function(){return B_})),e.d(t,"schemeYlGn",(function(){return U_})),e.d(t,"interpolateYlOrBr",(function(){return Y_})),e.d(t,"schemeYlOrBr",(function(){return O_})),e.d(t,"interpolateYlOrRd",(function(){return I_})),e.d(t,"schemeYlOrRd",(function(){return F_})),e.d(t,"interpolateBlues",(function(){return j_})),e.d(t,"schemeBlues",(function(){return H_})),e.d(t,"interpolateGreens",(function(){return V_})),e.d(t,"schemeGreens",(function(){return X_})),e.d(t,"interpolateGreys",(function(){return $_})),e.d(t,"schemeGreys",(function(){return G_})),e.d(t,"interpolatePurples",(function(){return Z_})),e.d(t,"schemePurples",(function(){return W_})),e.d(t,"interpolateReds",(function(){return J_})),e.d(t,"schemeReds",(function(){return Q_})),e.d(t,"interpolateOranges",(function(){return nm})),e.d(t,"schemeOranges",(function(){return K_})),e.d(t,"interpolateCividis",(function(){return tm})),e.d(t,"interpolateCubehelixDefault",(function(){return em})),e.d(t,"interpolateRainbow",(function(){return om})),e.d(t,"interpolateWarm",(function(){return rm})),e.d(t,"interpolateCool",(function(){return im})),e.d(t,"interpolateSinebow",(function(){return sm})),e.d(t,"interpolateTurbo",(function(){return lm})),e.d(t,"interpolateViridis",(function(){return dm})),e.d(t,"interpolateMagma",(function(){return pm})),e.d(t,"interpolateInferno",(function(){return vm})),e.d(t,"interpolatePlasma",(function(){return ym})),e.d(t,"create",(function(){return gm})),e.d(t,"creator",(function(){return it})),e.d(t,"local",(function(){return _m})),e.d(t,"matcher",(function(){return gn})),e.d(t,"mouse",(function(){return Re})),e.d(t,"namespace",(function(){return Sn})),e.d(t,"namespaces",(function(){return Nn})),e.d(t,"clientPoint",(function(){return Pe})),e.d(t,"select",(function(){return Nt})),e.d(t,"selectAll",(function(){return xm})),e.d(t,"selection",(function(){return Mt})),e.d(t,"selector",(function(){return pn})),e.d(t,"selectorAll",(function(){return yn})),e.d(t,"style",(function(){return Ln})),e.d(t,"touch",(function(){return ze})),e.d(t,"touches",(function(){return wm})),e.d(t,"window",(function(){return zn})),e.d(t,"event",(function(){return st})),e.d(t,"customEvent",(function(){return yt})),e.d(t,"arc",(function(){return Hm})),e.d(t,"area",(function(){return Wm})),e.d(t,"line",(function(){return $m})),e.d(t,"pie",(function(){return Jm})),e.d(t,"areaRadial",(function(){return ix})),e.d(t,"radialArea",(function(){return ix})),e.d(t,"lineRadial",(function(){return rx})),e.d(t,"radialLine",(function(){return rx})),e.d(t,"pointRadial",(function(){return ux})),e.d(t,"linkHorizontal",(function(){return dx})),e.d(t,"linkVertical",(function(){return px})),e.d(t,"linkRadial",(function(){return vx})),e.d(t,"symbol",(function(){return Rx})),e.d(t,"symbols",(function(){return zx})),e.d(t,"symbolCircle",(function(){return yx})),e.d(t,"symbolCross",(function(){return gx})),e.d(t,"symbolDiamond",(function(){return mx})),e.d(t,"symbolSquare",(function(){return Sx})),e.d(t,"symbolStar",(function(){return Nx})),e.d(t,"symbolTriangle",(function(){return Ax})),e.d(t,"symbolWye",(function(){return Px})),e.d(t,"curveBasisClosed",(function(){return Ox})),e.d(t,"curveBasisOpen",(function(){return Fx})),e.d(t,"curveBasis",(function(){return Ux})),e.d(t,"curveBundle",(function(){return Hx})),e.d(t,"curveCardinalClosed",(function(){return $x})),e.d(t,"curveCardinalOpen",(function(){return Zx})),e.d(t,"curveCardinal",(function(){return Vx})),e.d(t,"curveCatmullRomClosed",(function(){return tw})),e.d(t,"curveCatmullRomOpen",(function(){return rw})),e.d(t,"curveCatmullRom",(function(){return Kx})),e.d(t,"curveLinearClosed",(function(){return uw})),e.d(t,"curveLinear",(function(){return Xm})),e.d(t,"curveMonotoneX",(function(){return dw})),e.d(t,"curveMonotoneY",(function(){return pw})),e.d(t,"curveNatural",(function(){return gw})),e.d(t,"curveStep",(function(){return _w})),e.d(t,"curveStepAfter",(function(){return xw})),e.d(t,"curveStepBefore",(function(){return mw})),e.d(t,"stack",(function(){return Sw})),e.d(t,"stackOffsetExpand",(function(){return Tw})),e.d(t,"stackOffsetDiverging",(function(){return Aw})),e.d(t,"stackOffsetNone",(function(){return ww})),e.d(t,"stackOffsetSilhouette",(function(){return kw})),e.d(t,"stackOffsetWiggle",(function(){return Ew})),e.d(t,"stackOrderAppearance",(function(){return Cw})),e.d(t,"stackOrderAscending",(function(){return zw})),e.d(t,"stackOrderDescending",(function(){return Dw})),e.d(t,"stackOrderInsideOut",(function(){return qw})),e.d(t,"stackOrderNone",(function(){return Mw})),e.d(t,"stackOrderReverse",(function(){return Lw})),e.d(t,"timeInterval",(function(){return Bv})),e.d(t,"timeMillisecond",(function(){return _y})),e.d(t,"timeMilliseconds",(function(){return my})),e.d(t,"utcMillisecond",(function(){return _y})),e.d(t,"utcMilliseconds",(function(){return my})),e.d(t,"timeSecond",(function(){return yy})),e.d(t,"timeSeconds",(function(){return gy})),e.d(t,"utcSecond",(function(){return yy})),e.d(t,"utcSeconds",(function(){return gy})),e.d(t,"timeMinute",(function(){return dy})),e.d(t,"timeMinutes",(function(){return py})),e.d(t,"timeHour",(function(){return sy})),e.d(t,"timeHours",(function(){return ly})),e.d(t,"timeDay",(function(){return ay})),e.d(t,"timeDays",(function(){return cy})),e.d(t,"timeWeek",(function(){return Vv})),e.d(t,"timeWeeks",(function(){return Kv})),e.d(t,"timeSunday",(function(){return Vv})),e.d(t,"timeSundays",(function(){return Kv})),e.d(t,"timeMonday",(function(){return Gv})),e.d(t,"timeMondays",(function(){return ny})),e.d(t,"timeTuesday",(function(){return $v})),e.d(t,"timeTuesdays",(function(){return ty})),e.d(t,"timeWednesday",(function(){return Wv})),e.d(t,"timeWednesdays",(function(){return ey})),e.d(t,"timeThursday",(function(){return Zv})),e.d(t,"timeThursdays",(function(){return ry})),e.d(t,"timeFriday",(function(){return Qv})),e.d(t,"timeFridays",(function(){return iy})),e.d(t,"timeSaturday",(function(){return Jv})),e.d(t,"timeSaturdays",(function(){return uy})),e.d(t,"timeMonth",(function(){return Hv})),e.d(t,"timeMonths",(function(){return jv})),e.d(t,"timeYear",(function(){return Yv})),e.d(t,"timeYears",(function(){return Fv})),e.d(t,"utcMinute",(function(){return Tb})),e.d(t,"utcMinutes",(function(){return Ab})),e.d(t,"utcHour",(function(){return Mb})),e.d(t,"utcHours",(function(){return Nb})),e.d(t,"utcDay",(function(){return Uy})),e.d(t,"utcDays",(function(){return By})),e.d(t,"utcWeek",(function(){return wy})),e.d(t,"utcWeeks",(function(){return Ey})),e.d(t,"utcSunday",(function(){return wy})),e.d(t,"utcSundays",(function(){return Ey})),e.d(t,"utcMonday",(function(){return My})),e.d(t,"utcMondays",(function(){return Cy})),e.d(t,"utcTuesday",(function(){return Ny})),e.d(t,"utcTuesdays",(function(){return Py})),e.d(t,"utcWednesday",(function(){return Sy})),e.d(t,"utcWednesdays",(function(){return zy})),e.d(t,"utcThursday",(function(){return Ty})),e.d(t,"utcThursdays",(function(){return Ry})),e.d(t,"utcFriday",(function(){return Ay})),e.d(t,"utcFridays",(function(){return Dy})),e.d(t,"utcSaturday",(function(){return ky})),e.d(t,"utcSaturdays",(function(){return qy})),e.d(t,"utcMonth",(function(){return mb})),e.d(t,"utcMonths",(function(){return xb})),e.d(t,"utcYear",(function(){return Yy})),e.d(t,"utcYears",(function(){return Fy})),e.d(t,"timeFormatDefaultLocale",(function(){return pb})),e.d(t,"timeFormat",(function(){return Gy})),e.d(t,"timeParse",(function(){return $y})),e.d(t,"utcFormat",(function(){return Wy})),e.d(t,"utcParse",(function(){return Zy})),e.d(t,"timeFormatLocale",(function(){return Xy})),e.d(t,"isoFormat",(function(){return Uw})),e.d(t,"isoParse",(function(){return Bw})),e.d(t,"now",(function(){return Xe})),e.d(t,"timer",(function(){return $e})),e.d(t,"timerFlush",(function(){return We})),e.d(t,"timeout",(function(){return Ke})),e.d(t,"interval",(function(){return Ow})),e.d(t,"transition",(function(){return Xr})),e.d(t,"active",(function(){return ni})),e.d(t,"interrupt",(function(){return sr})),e.d(t,"voronoi",(function(){return NM})),e.d(t,"zoom",(function(){return BM})),e.d(t,"zoomTransform",(function(){return EM})),e.d(t,"zoomIdentity",(function(){return kM}));var r="5.16.0",i=function(n,t){return nt?1:n>=t?0:NaN},u=function(n){var t;return 1===n.length&&(t=n,n=function(n,e){return i(t(n),e)}),{left:function(t,e,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r>>1;n(t[u],e)<0?r=u+1:i=u}return r},right:function(t,e,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r>>1;n(t[u],e)>0?i=u:r=u+1}return r}}};var o=u(i),a=o.right,c=o.left,f=a,s=function(n,t){null==t&&(t=l);for(var e=0,r=n.length-1,i=n[0],u=new Array(r<0?0:r);en?1:t>=n?0:NaN},p=function(n){return null===n?NaN:+n},v=function(n,t){var e,r,i=n.length,u=0,o=-1,a=0,c=0;if(null==t)for(;++o1)return c/(u-1)},y=function(n,t){var e=v(n,t);return e?Math.sqrt(e):e},g=function(n,t){var e,r,i,u=n.length,o=-1;if(null==t){for(;++o=e)for(r=i=e;++oe&&(r=e),i=e)for(r=i=e;++oe&&(r=e),i0)return[n];if((r=t0)for(n=Math.ceil(n/o),t=Math.floor(t/o),u=new Array(i=Math.ceil(t-n+1));++a=0?(u>=N?10:u>=S?5:u>=T?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(u>=N?10:u>=S?5:u>=T?2:1)}function E(n,t,e){var r=Math.abs(t-n)/Math.max(0,e),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),u=r/i;return u>=N?i*=10:u>=S?i*=5:u>=T&&(i*=2),tl;)h.pop(),--d;var p,v=new Array(d+1);for(i=0;i<=d;++i)(p=v[i]=[]).x0=i>0?h[i-1]:s,p.x1=i=1)return+e(n[r-1],r-1,n);var r,i=(r-1)*t,u=Math.floor(i),o=+e(n[u],u,n);return o+(+e(n[u+1],u+1,n)-o)*(i-u)}},R=function(n,t,e){return n=m.call(n,p).sort(i),Math.ceil((e-t)/(2*(z(n,.75)-z(n,.25))*Math.pow(n.length,-1/3)))},D=function(n,t,e){return Math.ceil((e-t)/(3.5*y(n)*Math.pow(n.length,-1/3)))},q=function(n,t){var e,r,i=n.length,u=-1;if(null==t){for(;++u=e)for(r=e;++ur&&(r=e)}else for(;++u=e)for(r=e;++ur&&(r=e);return r},L=function(n,t){var e,r=n.length,i=r,u=-1,o=0;if(null==t)for(;++u=0;)for(t=(r=n[i]).length;--t>=0;)e[--o]=r[t];return e},O=function(n,t){var e,r,i=n.length,u=-1;if(null==t){for(;++u=e)for(r=e;++ue&&(r=e)}else for(;++u=e)for(r=e;++ue&&(r=e);return r},Y=function(n,t){for(var e=t.length,r=new Array(e);e--;)r[e]=n[t[e]];return r},F=function(n,t){if(e=n.length){var e,r,u=0,o=0,a=n[o];for(null==t&&(t=i);++u=0&&(e=n.slice(r+1),n=n.slice(0,r)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:e}}))}function sn(n,t){for(var e,r=0,i=n.length;r0)for(var e,r,i=new Array(e),u=0;ut?1:n>=t?0:NaN}var Mn="http://www.w3.org/1999/xhtml",Nn={svg:"http://www.w3.org/2000/svg",xhtml:Mn,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},Sn=function(n){var t=n+="",e=t.indexOf(":");return e>=0&&"xmlns"!==(t=n.slice(0,e))&&(n=n.slice(e+1)),Nn.hasOwnProperty(t)?{space:Nn[t],local:n}:n};function Tn(n){return function(){this.removeAttribute(n)}}function An(n){return function(){this.removeAttributeNS(n.space,n.local)}}function kn(n,t){return function(){this.setAttribute(n,t)}}function En(n,t){return function(){this.setAttributeNS(n.space,n.local,t)}}function Cn(n,t){return function(){var e=t.apply(this,arguments);null==e?this.removeAttribute(n):this.setAttribute(n,e)}}function Pn(n,t){return function(){var e=t.apply(this,arguments);null==e?this.removeAttributeNS(n.space,n.local):this.setAttributeNS(n.space,n.local,e)}}var zn=function(n){return n.ownerDocument&&n.ownerDocument.defaultView||n.document&&n||n.defaultView};function Rn(n){return function(){this.style.removeProperty(n)}}function Dn(n,t,e){return function(){this.style.setProperty(n,t,e)}}function qn(n,t,e){return function(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(n):this.style.setProperty(n,r,e)}}function Ln(n,t){return n.style.getPropertyValue(t)||zn(n).getComputedStyle(n,null).getPropertyValue(t)}function Un(n){return function(){delete this[n]}}function Bn(n,t){return function(){this[n]=t}}function On(n,t){return function(){var e=t.apply(this,arguments);null==e?delete this[n]:this[n]=e}}function Yn(n){return n.trim().split(/^|\s+/)}function Fn(n){return n.classList||new In(n)}function In(n){this._node=n,this._names=Yn(n.getAttribute("class")||"")}function Hn(n,t){for(var e=Fn(n),r=-1,i=t.length;++r=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(n){return this._names.indexOf(n)>=0}};function $n(){this.textContent=""}function Wn(n){return function(){this.textContent=n}}function Zn(n){return function(){var t=n.apply(this,arguments);this.textContent=null==t?"":t}}function Qn(){this.innerHTML=""}function Jn(n){return function(){this.innerHTML=n}}function Kn(n){return function(){var t=n.apply(this,arguments);this.innerHTML=null==t?"":t}}function nt(){this.nextSibling&&this.parentNode.appendChild(this)}function tt(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function et(n){return function(){var t=this.ownerDocument,e=this.namespaceURI;return e===Mn&&t.documentElement.namespaceURI===Mn?t.createElement(n):t.createElementNS(e,n)}}function rt(n){return function(){return this.ownerDocument.createElementNS(n.space,n.local)}}var it=function(n){var t=Sn(n);return(t.local?rt:et)(t)};function ut(){return null}function ot(){var n=this.parentNode;n&&n.removeChild(this)}function at(){var n=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(n,this.nextSibling):n}function ct(){var n=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(n,this.nextSibling):n}var ft={},st=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(ft={mouseenter:"mouseover",mouseleave:"mouseout"}));function lt(n,t,e){return n=ht(n,t,e),function(t){var e=t.relatedTarget;e&&(e===this||8&e.compareDocumentPosition(this))||n.call(this,t)}}function ht(n,t,e){return function(r){var i=st;st=r;try{n.call(this,this.__data__,t,e)}finally{st=i}}}function dt(n){return n.trim().split(/^|\s+/).map((function(n){var t="",e=n.indexOf(".");return e>=0&&(t=n.slice(e+1),n=n.slice(0,e)),{type:n,name:t}}))}function pt(n){return function(){var t=this.__on;if(t){for(var e,r=0,i=-1,u=t.length;r=x&&(x=m+1);!(_=g[x])&&++x=0;)(r=i[u])&&(o&&4^r.compareDocumentPosition(o)&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(n){function t(t,e){return t&&e?n(t.__data__,e.__data__):!t-!e}n||(n=wn);for(var e=this._groups,r=e.length,i=new Array(r),u=0;u1?this.each((null==t?Rn:"function"==typeof t?qn:Dn)(n,t,null==e?"":e)):Ln(this.node(),n)},property:function(n,t){return arguments.length>1?this.each((null==t?Un:"function"==typeof t?On:Bn)(n,t)):this.node()[n]},classed:function(n,t){var e=Yn(n+"");if(arguments.length<2){for(var r=Fn(this.node()),i=-1,u=e.length;++i>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===e?Gt(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===e?Gt(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=Lt.exec(n))?new Zt(t[1],t[2],t[3],1):(t=Ut.exec(n))?new Zt(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Bt.exec(n))?Gt(t[1],t[2],t[3],t[4]):(t=Ot.exec(n))?Gt(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Yt.exec(n))?ne(t[1],t[2]/100,t[3]/100,1):(t=Ft.exec(n))?ne(t[1],t[2]/100,t[3]/100,t[4]):It.hasOwnProperty(n)?Vt(It[n]):"transparent"===n?new Zt(NaN,NaN,NaN,0):null}function Vt(n){return new Zt(n>>16&255,n>>8&255,255&n,1)}function Gt(n,t,e,r){return r<=0&&(n=t=e=NaN),new Zt(n,t,e,r)}function $t(n){return n instanceof Pt||(n=Xt(n)),n?new Zt((n=n.rgb()).r,n.g,n.b,n.opacity):new Zt}function Wt(n,t,e,r){return 1===arguments.length?$t(n):new Zt(n,t,e,null==r?1:r)}function Zt(n,t,e,r){this.r=+n,this.g=+t,this.b=+e,this.opacity=+r}function Qt(){return"#"+Kt(this.r)+Kt(this.g)+Kt(this.b)}function Jt(){var n=this.opacity;return(1===(n=isNaN(n)?1:Math.max(0,Math.min(1,n)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===n?")":", "+n+")")}function Kt(n){return((n=Math.max(0,Math.min(255,Math.round(n)||0)))<16?"0":"")+n.toString(16)}function ne(n,t,e,r){return r<=0?n=t=e=NaN:e<=0||e>=1?n=t=NaN:t<=0&&(n=NaN),new re(n,t,e,r)}function te(n){if(n instanceof re)return new re(n.h,n.s,n.l,n.opacity);if(n instanceof Pt||(n=Xt(n)),!n)return new re;if(n instanceof re)return n;var t=(n=n.rgb()).r/255,e=n.g/255,r=n.b/255,i=Math.min(t,e,r),u=Math.max(t,e,r),o=NaN,a=u-i,c=(u+i)/2;return a?(o=t===u?(e-r)/a+6*(e0&&c<1?0:o,new re(o,a,c,n.opacity)}function ee(n,t,e,r){return 1===arguments.length?te(n):new re(n,t,e,null==r?1:r)}function re(n,t,e,r){this.h=+n,this.s=+t,this.l=+e,this.opacity=+r}function ie(n,t,e){return 255*(n<60?t+(e-t)*n/60:n<180?e:n<240?t+(e-t)*(240-n)/60:t)}function ue(n,t,e,r,i){var u=n*n,o=u*n;return((1-3*n+3*u-o)*t+(4-6*u+3*o)*e+(1+3*n+3*u-3*o)*r+o*i)/6}Et(Pt,Xt,{copy:function(n){return Object.assign(new this.constructor,this,n)},displayable:function(){return this.rgb().displayable()},hex:Ht,formatHex:Ht,formatHsl:function(){return te(this).formatHsl()},formatRgb:jt,toString:jt}),Et(Zt,Wt,Ct(Pt,{brighter:function(n){return n=null==n?1/.7:Math.pow(1/.7,n),new Zt(this.r*n,this.g*n,this.b*n,this.opacity)},darker:function(n){return n=null==n?.7:Math.pow(.7,n),new Zt(this.r*n,this.g*n,this.b*n,this.opacity)},rgb:function(){return this},displayable:function(){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:Qt,formatHex:Qt,formatRgb:Jt,toString:Jt})),Et(re,ee,Ct(Pt,{brighter:function(n){return n=null==n?1/.7:Math.pow(1/.7,n),new re(this.h,this.s,this.l*n,this.opacity)},darker:function(n){return n=null==n?.7:Math.pow(.7,n),new re(this.h,this.s,this.l*n,this.opacity)},rgb:function(){var n=this.h%360+360*(this.h<0),t=isNaN(n)||isNaN(this.s)?0:this.s,e=this.l,r=e+(e<.5?e:1-e)*t,i=2*e-r;return new Zt(ie(n>=240?n-240:n+120,i,r),ie(n,i,r),ie(n<120?n+240:n-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var n=this.opacity;return(1===(n=isNaN(n)?1:Math.max(0,Math.min(1,n)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===n?")":", "+n+")")}}));var oe=function(n){var t=n.length-1;return function(e){var r=e<=0?e=0:e>=1?(e=1,t-1):Math.floor(e*t),i=n[r],u=n[r+1],o=r>0?n[r-1]:2*i-u,a=r180||e<-180?e-360*Math.round(e/360):e):ce(isNaN(n)?t:n)}function le(n){return 1==(n=+n)?he:function(t,e){return e-t?function(n,t,e){return n=Math.pow(n,e),t=Math.pow(t,e)-n,e=1/e,function(r){return Math.pow(n+r*t,e)}}(t,e,n):ce(isNaN(t)?e:t)}}function he(n,t){var e=t-n;return e?fe(n,e):ce(isNaN(n)?t:n)}var de=function n(t){var e=le(t);function r(n,t){var r=e((n=Wt(n)).r,(t=Wt(t)).r),i=e(n.g,t.g),u=e(n.b,t.b),o=he(n.opacity,t.opacity);return function(t){return n.r=r(t),n.g=i(t),n.b=u(t),n.opacity=o(t),n+""}}return r.gamma=n,r}(1);function pe(n){return function(t){var e,r,i=t.length,u=new Array(i),o=new Array(i),a=new Array(i);for(e=0;eu&&(i=t.slice(u,i),a[o]?a[o]+=i:a[++o]=i),(e=e[0])===(r=r[0])?a[o]?a[o]+=r:a[++o]=r:(a[++o]=null,c.push({i:o,x:we(e,r)})),u=Te.lastIndex;return u=0&&t._call.call(null,n),t=t._next;--Ue}function Ze(){Fe=(Ye=He.now())+Ie,Ue=Be=0;try{We()}finally{Ue=0,function(){var n,t,e=qe,r=1/0;for(;e;)e._call?(r>e._time&&(r=e._time),n=e,e=e._next):(t=e._next,e._next=null,e=n?n._next=t:qe=t);Le=n,Je(r)}(),Fe=0}}function Qe(){var n=He.now(),t=n-Ye;t>1e3&&(Ie-=t,Ye=n)}function Je(n){Ue||(Be&&(Be=clearTimeout(Be)),n-Fe>24?(n<1/0&&(Be=setTimeout(Ze,n-He.now()-Ie)),Oe&&(Oe=clearInterval(Oe))):(Oe||(Ye=He.now(),Oe=setInterval(Qe,1e3)),Ue=1,je(Ze)))}Ge.prototype=$e.prototype={constructor:Ge,restart:function(n,t,e){if("function"!=typeof n)throw new TypeError("callback is not a function");e=(null==e?Xe():+e)+(null==t?0:+t),this._next||Le===this||(Le?Le._next=this:qe=this,Le=this),this._call=n,this._time=e,Je()},stop:function(){this._call&&(this._call=null,this._time=1/0,Je())}};var Ke=function(n,t,e){var r=new Ge;return t=null==t?0:+t,r.restart((function(e){r.stop(),n(e+t)}),t,e),r},nr=hn("start","end","cancel","interrupt"),tr=[],er=function(n,t,e,r,i,u){var o=n.__transition;if(o){if(e in o)return}else n.__transition={};!function(n,t,e){var r,i=n.__transition;function u(c){var f,s,l,h;if(1!==e.state)return a();for(f in i)if((h=i[f]).name===e.name){if(3===h.state)return Ke(u);4===h.state?(h.state=6,h.timer.stop(),h.on.call("interrupt",n,n.__data__,h.index,h.group),delete i[f]):+f0)throw new Error("too late; already scheduled");return e}function ir(n,t){var e=ur(n,t);if(e.state>3)throw new Error("too late; already running");return e}function ur(n,t){var e=n.__transition;if(!e||!(e=e[t]))throw new Error("transition not found");return e}var or,ar,cr,fr,sr=function(n,t){var e,r,i,u=n.__transition,o=!0;if(u){for(i in t=null==t?null:t+"",u)(e=u[i]).name===t?(r=e.state>2&&e.state<5,e.state=6,e.timer.stop(),e.on.call(r?"interrupt":"cancel",n,n.__data__,e.index,e.group),delete u[i]):o=!1;o&&delete n.__transition}},lr=180/Math.PI,hr={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},dr=function(n,t,e,r,i,u){var o,a,c;return(o=Math.sqrt(n*n+t*t))&&(n/=o,t/=o),(c=n*e+t*r)&&(e-=n*c,r-=t*c),(a=Math.sqrt(e*e+r*r))&&(e/=a,r/=a,c/=a),n*r180?t+=360:t-n>180&&(n+=360),u.push({i:e.push(i(e)+"rotate(",null,r)-2,x:we(n,t)})):t&&e.push(i(e)+"rotate("+t+r)}(u.rotate,o.rotate,a,c),function(n,t,e,u){n!==t?u.push({i:e.push(i(e)+"skewX(",null,r)-2,x:we(n,t)}):t&&e.push(i(e)+"skewX("+t+r)}(u.skewX,o.skewX,a,c),function(n,t,e,r,u,o){if(n!==e||t!==r){var a=u.push(i(u)+"scale(",null,",",null,")");o.push({i:a-4,x:we(n,e)},{i:a-2,x:we(t,r)})}else 1===e&&1===r||u.push(i(u)+"scale("+e+","+r+")")}(u.scaleX,u.scaleY,o.scaleX,o.scaleY,a,c),u=o=null,function(n){for(var t,e=-1,r=c.length;++e=0&&(n=n.slice(0,t)),!n||"start"===n}))}(t)?rr:ir;return function(){var o=u(this,n),a=o.on;a!==r&&(i=(r=a).copy()).on(t,e),o.on=i}}var Ur=Mt.prototype.constructor;function Br(n){return function(){this.style.removeProperty(n)}}function Or(n,t,e){return function(r){this.style.setProperty(n,t.call(this,r),e)}}function Yr(n,t,e){var r,i;function u(){var u=t.apply(this,arguments);return u!==i&&(r=(i=u)&&Or(n,u,e)),r}return u._value=t,u}function Fr(n){return function(t){this.textContent=n.call(this,t)}}function Ir(n){var t,e;function r(){var r=n.apply(this,arguments);return r!==e&&(t=(e=r)&&Fr(r)),t}return r._value=n,r}var Hr=0;function jr(n,t,e,r){this._groups=n,this._parents=t,this._name=e,this._id=r}function Xr(n){return Mt().transition(n)}function Vr(){return++Hr}var Gr=Mt.prototype;function $r(n){return n*n*n}function Wr(n){return--n*n*n+1}function Zr(n){return((n*=2)<=1?n*n*n:(n-=2)*n*n+2)/2}jr.prototype=Xr.prototype={constructor:jr,select:function(n){var t=this._name,e=this._id;"function"!=typeof n&&(n=pn(n));for(var r=this._groups,i=r.length,u=new Array(i),o=0;o1&&e.name===t)return new jr([[n]],Kr,t,+r);return null},ti=function(n){return function(){return n}},ei=function(n,t,e){this.target=n,this.type=t,this.selection=e};function ri(){st.stopImmediatePropagation()}var ii=function(){st.preventDefault(),st.stopImmediatePropagation()},ui={name:"drag"},oi={name:"space"},ai={name:"handle"},ci={name:"center"};function fi(n){return[+n[0],+n[1]]}function si(n){return[fi(n[0]),fi(n[1])]}function li(n){return function(t){return ze(t,st.touches,n)}}var hi={name:"x",handles:["w","e"].map(mi),input:function(n,t){return null==n?null:[[+n[0],t[0][1]],[+n[1],t[1][1]]]},output:function(n){return n&&[n[0][0],n[1][0]]}},di={name:"y",handles:["n","s"].map(mi),input:function(n,t){return null==n?null:[[t[0][0],+n[0]],[t[1][0],+n[1]]]},output:function(n){return n&&[n[0][1],n[1][1]]}},pi={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(mi),input:function(n){return null==n?null:si(n)},output:function(n){return n}},vi={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},yi={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},gi={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},bi={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},_i={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function mi(n){return{type:n}}function xi(){return!st.ctrlKey&&!st.button}function wi(){var n=this.ownerSVGElement||this;return n.hasAttribute("viewBox")?[[(n=n.viewBox.baseVal).x,n.y],[n.x+n.width,n.y+n.height]]:[[0,0],[n.width.baseVal.value,n.height.baseVal.value]]}function Mi(){return navigator.maxTouchPoints||"ontouchstart"in this}function Ni(n){for(;!n.__brush;)if(!(n=n.parentNode))return;return n.__brush}function Si(n){return n[0][0]===n[1][0]||n[0][1]===n[1][1]}function Ti(n){var t=n.__brush;return t?t.dim.output(t.selection):null}function Ai(){return Ci(hi)}function ki(){return Ci(di)}var Ei=function(){return Ci(pi)};function Ci(n){var t,e=wi,r=xi,i=Mi,u=!0,o=hn("start","brush","end"),a=6;function c(t){var e=t.property("__brush",v).selectAll(".overlay").data([mi("overlay")]);e.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",vi.overlay).merge(e).each((function(){var n=Ni(this).extent;Nt(this).attr("x",n[0][0]).attr("y",n[0][1]).attr("width",n[1][0]-n[0][0]).attr("height",n[1][1]-n[0][1])})),t.selectAll(".selection").data([mi("selection")]).enter().append("rect").attr("class","selection").attr("cursor",vi.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var r=t.selectAll(".handle").data(n.handles,(function(n){return n.type}));r.exit().remove(),r.enter().append("rect").attr("class",(function(n){return"handle handle--"+n.type})).attr("cursor",(function(n){return vi[n.type]})),t.each(f).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",h).filter(i).on("touchstart.brush",h).on("touchmove.brush",d).on("touchend.brush touchcancel.brush",p).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function f(){var n=Nt(this),t=Ni(this).selection;t?(n.selectAll(".selection").style("display",null).attr("x",t[0][0]).attr("y",t[0][1]).attr("width",t[1][0]-t[0][0]).attr("height",t[1][1]-t[0][1]),n.selectAll(".handle").style("display",null).attr("x",(function(n){return"e"===n.type[n.type.length-1]?t[1][0]-a/2:t[0][0]-a/2})).attr("y",(function(n){return"s"===n.type[0]?t[1][1]-a/2:t[0][1]-a/2})).attr("width",(function(n){return"n"===n.type||"s"===n.type?t[1][0]-t[0][0]+a:a})).attr("height",(function(n){return"e"===n.type||"w"===n.type?t[1][1]-t[0][1]+a:a}))):n.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function s(n,t,e){var r=n.__brush.emitter;return!r||e&&r.clean?new l(n,t,e):r}function l(n,t,e){this.that=n,this.args=t,this.state=n.__brush,this.active=0,this.clean=e}function h(){if((!t||st.touches)&&r.apply(this,arguments)){var e,i,o,a,c,l,h,d,p,v,y,g=this,b=st.target.__data__.type,_="selection"===(u&&st.metaKey?b="overlay":b)?ui:u&&st.altKey?ci:ai,m=n===di?null:bi[b],x=n===hi?null:_i[b],w=Ni(g),M=w.extent,N=w.selection,S=M[0][0],T=M[0][1],A=M[1][0],k=M[1][1],E=0,C=0,P=m&&x&&u&&st.shiftKey,z=st.touches?li(st.changedTouches[0].identifier):Re,R=z(g),D=R,q=s(g,arguments,!0).beforestart();"overlay"===b?(N&&(p=!0),w.selection=N=[[e=n===di?S:R[0],o=n===hi?T:R[1]],[c=n===di?A:e,h=n===hi?k:o]]):(e=N[0][0],o=N[0][1],c=N[1][0],h=N[1][1]),i=e,a=o,l=c,d=h;var L=Nt(g).attr("pointer-events","none"),U=L.selectAll(".overlay").attr("cursor",vi[b]);if(st.touches)q.moved=O,q.ended=F;else{var B=Nt(st.view).on("mousemove.brush",O,!0).on("mouseup.brush",F,!0);u&&B.on("keydown.brush",I,!0).on("keyup.brush",H,!0),At(st.view)}ri(),sr(g),f.call(g),q.start()}function O(){var n=z(g);!P||v||y||(Math.abs(n[0]-D[0])>Math.abs(n[1]-D[1])?y=!0:v=!0),D=n,p=!0,ii(),Y()}function Y(){var n;switch(E=D[0]-R[0],C=D[1]-R[1],_){case oi:case ui:m&&(E=Math.max(S-e,Math.min(A-c,E)),i=e+E,l=c+E),x&&(C=Math.max(T-o,Math.min(k-h,C)),a=o+C,d=h+C);break;case ai:m<0?(E=Math.max(S-e,Math.min(A-e,E)),i=e+E,l=c):m>0&&(E=Math.max(S-c,Math.min(A-c,E)),i=e,l=c+E),x<0?(C=Math.max(T-o,Math.min(k-o,C)),a=o+C,d=h):x>0&&(C=Math.max(T-h,Math.min(k-h,C)),a=o,d=h+C);break;case ci:m&&(i=Math.max(S,Math.min(A,e-E*m)),l=Math.max(S,Math.min(A,c+E*m))),x&&(a=Math.max(T,Math.min(k,o-C*x)),d=Math.max(T,Math.min(k,h+C*x)))}l0&&(e=i-E),x<0?h=d-C:x>0&&(o=a-C),_=oi,U.attr("cursor",vi.selection),Y());break;default:return}ii()}function H(){switch(st.keyCode){case 16:P&&(v=y=P=!1,Y());break;case 18:_===ci&&(m<0?c=l:m>0&&(e=i),x<0?h=d:x>0&&(o=a),_=ai,Y());break;case 32:_===oi&&(st.altKey?(m&&(c=l-E*m,e=i+E*m),x&&(h=d-C*x,o=a+C*x),_=ci):(m<0?c=l:m>0&&(e=i),x<0?h=d:x>0&&(o=a),_=ai),U.attr("cursor",vi[b]),Y());break;default:return}ii()}}function d(){s(this,arguments).moved()}function p(){s(this,arguments).ended()}function v(){var t=this.__brush||{selection:null};return t.extent=si(e.apply(this,arguments)),t.dim=n,t}return c.move=function(t,e){t.selection?t.on("start.brush",(function(){s(this,arguments).beforestart().start()})).on("interrupt.brush end.brush",(function(){s(this,arguments).end()})).tween("brush",(function(){var t=this,r=t.__brush,i=s(t,arguments),u=r.selection,o=n.input("function"==typeof e?e.apply(this,arguments):e,r.extent),a=Ee(u,o);function c(n){r.selection=1===n&&null===o?null:a(n),f.call(t),i.brush()}return null!==u&&null!==o?c:c(1)})):t.each((function(){var t=this,r=arguments,i=t.__brush,u=n.input("function"==typeof e?e.apply(t,r):e,i.extent),o=s(t,r).beforestart();sr(t),i.selection=null===u?null:u,f.call(t),o.start().brush().end()}))},c.clear=function(n){c.move(n,null)},l.prototype={beforestart:function(){return 1==++this.active&&(this.state.emitter=this,this.starting=!0),this},start:function(){return this.starting?(this.starting=!1,this.emit("start")):this.emit("brush"),this},brush:function(){return this.emit("brush"),this},end:function(){return 0==--this.active&&(delete this.state.emitter,this.emit("end")),this},emit:function(t){yt(new ei(c,t,n.output(this.state.selection)),o.apply,o,[t,this.that,this.args])}},c.extent=function(n){return arguments.length?(e="function"==typeof n?n:ti(si(n)),c):e},c.filter=function(n){return arguments.length?(r="function"==typeof n?n:ti(!!n),c):r},c.touchable=function(n){return arguments.length?(i="function"==typeof n?n:ti(!!n),c):i},c.handleSize=function(n){return arguments.length?(a=+n,c):a},c.keyModifiers=function(n){return arguments.length?(u=!!n,c):u},c.on=function(){var n=o.on.apply(o,arguments);return n===o?c:n},c}var Pi=Math.cos,zi=Math.sin,Ri=Math.PI,Di=Ri/2,qi=2*Ri,Li=Math.max;function Ui(n){return function(t,e){return n(t.source.value+t.target.value,e.source.value+e.target.value)}}var Bi=function(){var n=0,t=null,e=null,r=null;function i(i){var u,o,a,c,f,s,l=i.length,h=[],d=M(l),p=[],v=[],y=v.groups=new Array(l),g=new Array(l*l);for(u=0,f=-1;++f1e-6)if(Math.abs(s*a-c*f)>1e-6&&i){var h=e-u,d=r-o,p=a*a+c*c,v=h*h+d*d,y=Math.sqrt(p),g=Math.sqrt(l),b=i*Math.tan((Fi-Math.acos((p+l-v)/(2*y*g)))/2),_=b/g,m=b/y;Math.abs(_-1)>1e-6&&(this._+="L"+(n+_*f)+","+(t+_*s)),this._+="A"+i+","+i+",0,0,"+ +(s*h>f*d)+","+(this._x1=n+m*a)+","+(this._y1=t+m*c)}else this._+="L"+(this._x1=n)+","+(this._y1=t);else;},arc:function(n,t,e,r,i,u){n=+n,t=+t,u=!!u;var o=(e=+e)*Math.cos(r),a=e*Math.sin(r),c=n+o,f=t+a,s=1^u,l=u?r-i:i-r;if(e<0)throw new Error("negative radius: "+e);null===this._x1?this._+="M"+c+","+f:(Math.abs(this._x1-c)>1e-6||Math.abs(this._y1-f)>1e-6)&&(this._+="L"+c+","+f),e&&(l<0&&(l=l%Ii+Ii),l>Hi?this._+="A"+e+","+e+",0,1,"+s+","+(n-o)+","+(t-a)+"A"+e+","+e+",0,1,"+s+","+(this._x1=c)+","+(this._y1=f):l>1e-6&&(this._+="A"+e+","+e+",0,"+ +(l>=Fi)+","+s+","+(this._x1=n+e*Math.cos(i))+","+(this._y1=t+e*Math.sin(i))))},rect:function(n,t,e,r){this._+="M"+(this._x0=this._x1=+n)+","+(this._y0=this._y1=+t)+"h"+ +e+"v"+ +r+"h"+-e+"Z"},toString:function(){return this._}};var Vi=Xi;function Gi(n){return n.source}function $i(n){return n.target}function Wi(n){return n.radius}function Zi(n){return n.startAngle}function Qi(n){return n.endAngle}var Ji=function(){var n=Gi,t=$i,e=Wi,r=Zi,i=Qi,u=null;function o(){var o,a=Oi.call(arguments),c=n.apply(this,a),f=t.apply(this,a),s=+e.apply(this,(a[0]=c,a)),l=r.apply(this,a)-Di,h=i.apply(this,a)-Di,d=s*Pi(l),p=s*zi(l),v=+e.apply(this,(a[0]=f,a)),y=r.apply(this,a)-Di,g=i.apply(this,a)-Di;if(u||(u=o=Vi()),u.moveTo(d,p),u.arc(0,0,s,l,h),l===y&&h===g||(u.quadraticCurveTo(0,0,v*Pi(y),v*zi(y)),u.arc(0,0,v,y,g)),u.quadraticCurveTo(0,0,d,p),u.closePath(),o)return u=null,o+""||null}return o.radius=function(n){return arguments.length?(e="function"==typeof n?n:Yi(+n),o):e},o.startAngle=function(n){return arguments.length?(r="function"==typeof n?n:Yi(+n),o):r},o.endAngle=function(n){return arguments.length?(i="function"==typeof n?n:Yi(+n),o):i},o.source=function(t){return arguments.length?(n=t,o):n},o.target=function(n){return arguments.length?(t=n,o):t},o.context=function(n){return arguments.length?(u=null==n?null:n,o):u},o};function Ki(){}function nu(n,t){var e=new Ki;if(n instanceof Ki)n.each((function(n,t){e.set(t,n)}));else if(Array.isArray(n)){var r,i=-1,u=n.length;if(null==t)for(;++i=r.length)return null!=n&&e.sort(n),null!=t?t(e):e;for(var c,f,s,l=-1,h=e.length,d=r[i++],p=tu(),v=o();++lr.length)return e;var o,a=i[u-1];return null!=t&&u>=r.length?o=e.entries():(o=[],e.each((function(t,e){o.push({key:e,values:n(t,u)})}))),null!=a?o.sort((function(n,t){return a(n.key,t.key)})):o}(u(n,0,uu,ou),0)},key:function(n){return r.push(n),e},sortKeys:function(n){return i[r.length-1]=n,e},sortValues:function(t){return n=t,e},rollup:function(n){return t=n,e}}};function ru(){return{}}function iu(n,t,e){n[t]=e}function uu(){return tu()}function ou(n,t,e){n.set(t,e)}function au(){}var cu=tu.prototype;function fu(n,t){var e=new au;if(n instanceof au)n.each((function(n){e.add(n)}));else if(n){var r=-1,i=n.length;if(null==t)for(;++r6/29*(6/29)*(6/29)?Math.pow(n,1/3):n/(6/29*3*(6/29))+4/29}function xu(n){return n>6/29?n*n*n:6/29*3*(6/29)*(n-4/29)}function wu(n){return 255*(n<=.0031308?12.92*n:1.055*Math.pow(n,1/2.4)-.055)}function Mu(n){return(n/=255)<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function Nu(n){if(n instanceof Au)return new Au(n.h,n.c,n.l,n.opacity);if(n instanceof _u||(n=yu(n)),0===n.a&&0===n.b)return new Au(NaN,0r!=d>r&&e<(h-f)*(r-s)/(d-s)+f&&(i=-i)}return i}function Fu(n,t,e){var r,i,u,o;return function(n,t,e){return(t[0]-n[0])*(e[1]-n[1])==(e[0]-n[0])*(t[1]-n[1])}(n,t,e)&&(i=n[r=+(n[0]===t[0])],u=e[r],o=t[r],i<=u&&u<=o||o<=u&&u<=i)}var Iu=function(){},Hu=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]],ju=function(){var n=1,t=1,e=C,r=a;function i(n){var t=e(n);if(Array.isArray(t))t=t.slice().sort(Uu);else{var r=g(n),i=r[0],o=r[1];t=E(i,o,t),t=M(Math.floor(i/t)*t,Math.floor(o/t)*t,t)}return t.map((function(t){return u(n,t)}))}function u(e,i){var u=[],a=[];return function(e,r,i){var u,a,c,f,s,l,h=new Array,d=new Array;u=a=-1,f=e[0]>=r,Hu[f<<1].forEach(p);for(;++u=r,Hu[c|f<<1].forEach(p);Hu[f<<0].forEach(p);for(;++a=r,s=e[a*n]>=r,Hu[f<<1|s<<2].forEach(p);++u=r,l=s,s=e[a*n+u+1]>=r,Hu[c|f<<1|s<<2|l<<3].forEach(p);Hu[f|s<<3].forEach(p)}u=-1,s=e[a*n]>=r,Hu[s<<2].forEach(p);for(;++u=r,Hu[s<<2|l<<3].forEach(p);function p(n){var t,e,r=[n[0][0]+u,n[0][1]+a],c=[n[1][0]+u,n[1][1]+a],f=o(r),s=o(c);(t=d[f])?(e=h[s])?(delete d[t.end],delete h[e.start],t===e?(t.ring.push(c),i(t.ring)):h[t.start]=d[e.end]={start:t.start,end:e.end,ring:t.ring.concat(e.ring)}):(delete d[t.end],t.ring.push(c),d[t.end=s]=t):(t=h[s])?(e=d[f])?(delete h[t.start],delete d[e.end],t===e?(t.ring.push(c),i(t.ring)):h[e.start]=d[t.end]={start:e.start,end:t.end,ring:e.ring.concat(t.ring)}):(delete h[t.start],t.ring.unshift(r),h[t.start=f]=t):h[f]=d[s]={start:f,end:s,ring:[r,c]}}Hu[s<<3].forEach(p)}(e,i,(function(n){r(n,e,i),function(n){for(var t=0,e=n.length,r=n[e-1][1]*n[0][0]-n[e-1][0]*n[0][1];++t0?u.push([n]):a.push(n)})),a.forEach((function(n){for(var t,e=0,r=u.length;e0&&o0&&a0&&u>0))throw new Error("invalid size");return n=r,t=u,i},i.thresholds=function(n){return arguments.length?(e="function"==typeof n?n:Array.isArray(n)?Bu(Lu.call(n)):Bu(n),i):e},i.smooth=function(n){return arguments.length?(r=n?a:Iu,i):r===a},i};function Xu(n,t,e){for(var r=n.width,i=n.height,u=1+(e<<1),o=0;o=e&&(a>=u&&(c-=n.data[a-u+o*r]),t.data[a-e+o*r]=c/Math.min(a+1,r-1+u-a,u))}function Vu(n,t,e){for(var r=n.width,i=n.height,u=1+(e<<1),o=0;o=e&&(a>=u&&(c-=n.data[o+(a-u)*r]),t.data[o+(a-e)*r]=c/Math.min(a+1,i-1+u-a,u))}function Gu(n){return n[0]}function $u(n){return n[1]}function Wu(){return 1}var Zu=function(){var n=Gu,t=$u,e=Wu,r=960,i=500,u=20,o=2,a=3*u,c=r+2*a>>o,f=i+2*a>>o,s=Bu(20);function l(r){var i=new Float32Array(c*f),l=new Float32Array(c*f);r.forEach((function(r,u,s){var l=+n(r,u,s)+a>>o,h=+t(r,u,s)+a>>o,d=+e(r,u,s);l>=0&&l=0&&h>o),Vu({width:c,height:f,data:l},{width:c,height:f,data:i},u>>o),Xu({width:c,height:f,data:i},{width:c,height:f,data:l},u>>o),Vu({width:c,height:f,data:l},{width:c,height:f,data:i},u>>o),Xu({width:c,height:f,data:i},{width:c,height:f,data:l},u>>o),Vu({width:c,height:f,data:l},{width:c,height:f,data:i},u>>o);var d=s(i);if(!Array.isArray(d)){var p=q(i);d=E(0,p,d),(d=M(0,Math.floor(p/d)*d,d)).shift()}return ju().thresholds(d).size([c,f])(i).map(h)}function h(n){return n.value*=Math.pow(2,-2*o),n.coordinates.forEach(d),n}function d(n){n.forEach(p)}function p(n){n.forEach(v)}function v(n){n[0]=n[0]*Math.pow(2,o)-a,n[1]=n[1]*Math.pow(2,o)-a}function y(){return c=r+2*(a=3*u)>>o,f=i+2*a>>o,l}return l.x=function(t){return arguments.length?(n="function"==typeof t?t:Bu(+t),l):n},l.y=function(n){return arguments.length?(t="function"==typeof n?n:Bu(+n),l):t},l.weight=function(n){return arguments.length?(e="function"==typeof n?n:Bu(+n),l):e},l.size=function(n){if(!arguments.length)return[r,i];var t=Math.ceil(n[0]),e=Math.ceil(n[1]);if(!(t>=0||t>=0))throw new Error("invalid size");return r=t,i=e,y()},l.cellSize=function(n){if(!arguments.length)return 1<=1))throw new Error("invalid cell size");return o=Math.floor(Math.log(n)/Math.LN2),y()},l.thresholds=function(n){return arguments.length?(s="function"==typeof n?n:Array.isArray(n)?Bu(Lu.call(n)):Bu(n),l):s},l.bandwidth=function(n){if(!arguments.length)return Math.sqrt(u*(u+1));if(!((n=+n)>=0))throw new Error("invalid bandwidth");return u=Math.round((Math.sqrt(4*n*n+1)-1)/2),y()},l},Qu=function(n){return function(){return n}};function Ju(n,t,e,r,i,u,o,a,c,f){this.target=n,this.type=t,this.subject=e,this.identifier=r,this.active=i,this.x=u,this.y=o,this.dx=a,this.dy=c,this._=f}function Ku(){return!st.ctrlKey&&!st.button}function no(){return this.parentNode}function to(n){return null==n?{x:st.x,y:st.y}:n}function eo(){return navigator.maxTouchPoints||"ontouchstart"in this}Ju.prototype.on=function(){var n=this._.on.apply(this._,arguments);return n===this._?this:n};var ro=function(){var n,t,e,r,i=Ku,u=no,o=to,a=eo,c={},f=hn("start","drag","end"),s=0,l=0;function h(n){n.on("mousedown.drag",d).filter(a).on("touchstart.drag",y).on("touchmove.drag",g).on("touchend.drag touchcancel.drag",b).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function d(){if(!r&&i.apply(this,arguments)){var o=_("mouse",u.apply(this,arguments),Re,this,arguments);o&&(Nt(st.view).on("mousemove.drag",p,!0).on("mouseup.drag",v,!0),At(st.view),St(),e=!1,n=st.clientX,t=st.clientY,o("start"))}}function p(){if(Tt(),!e){var r=st.clientX-n,i=st.clientY-t;e=r*r+i*i>l}c.mouse("drag")}function v(){Nt(st.view).on("mousemove.drag mouseup.drag",null),kt(st.view,e),Tt(),c.mouse("end")}function y(){if(i.apply(this,arguments)){var n,t,e=st.changedTouches,r=u.apply(this,arguments),o=e.length;for(n=0;n9999?"+"+co(t,6):co(t,4))+"-"+co(n.getUTCMonth()+1,2)+"-"+co(n.getUTCDate(),2)+(u?"T"+co(e,2)+":"+co(r,2)+":"+co(i,2)+"."+co(u,3)+"Z":i?"T"+co(e,2)+":"+co(r,2)+":"+co(i,2)+"Z":r||e?"T"+co(e,2)+":"+co(r,2)+"Z":"")}var so=function(n){var t=new RegExp('["'+n+"\n\r]"),e=n.charCodeAt(0);function r(n,t){var r,i=[],u=n.length,o=0,a=0,c=u<=0,f=!1;function s(){if(c)return uo;if(f)return f=!1,io;var t,r,i=o;if(34===n.charCodeAt(i)){for(;o++=u?c=!0:10===(r=n.charCodeAt(o++))?f=!0:13===r&&(f=!0,10===n.charCodeAt(o)&&++o),n.slice(i+1,t-1).replace(/""/g,'"')}for(;o=(u=(v+g)/2))?v=u:g=u,(s=e>=(o=(y+b)/2))?y=o:b=o,i=d,!(d=d[l=s<<1|f]))return i[l]=p,n;if(a=+n._x.call(null,d.data),c=+n._y.call(null,d.data),t===a&&e===c)return p.next=d,i?i[l]=p:n._root=p,n;do{i=i?i[l]=new Array(4):n._root=new Array(4),(f=t>=(u=(v+g)/2))?v=u:g=u,(s=e>=(o=(y+b)/2))?y=o:b=o}while((l=s<<1|f)==(h=(c>=o)<<1|a>=u));return i[h]=d,i[l]=p,n}var Ta=function(n,t,e,r,i){this.node=n,this.x0=t,this.y0=e,this.x1=r,this.y1=i};function Aa(n){return n[0]}function ka(n){return n[1]}function Ea(n,t,e){var r=new Ca(null==t?Aa:t,null==e?ka:e,NaN,NaN,NaN,NaN);return null==n?r:r.addAll(n)}function Ca(n,t,e,r,i,u){this._x=n,this._y=t,this._x0=e,this._y0=r,this._x1=i,this._y1=u,this._root=void 0}function Pa(n){for(var t={data:n.data},e=t;n=n.next;)e=e.next={data:n.data};return t}var za=Ea.prototype=Ca.prototype;function Ra(n){return n.x+n.vx}function Da(n){return n.y+n.vy}za.copy=function(){var n,t,e=new Ca(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return e;if(!r.length)return e._root=Pa(r),e;for(n=[{source:r,target:e._root=new Array(4)}];r=n.pop();)for(var i=0;i<4;++i)(t=r.source[i])&&(t.length?n.push({source:t,target:r.target[i]=new Array(4)}):r.target[i]=Pa(t));return e},za.add=function(n){var t=+this._x.call(null,n),e=+this._y.call(null,n);return Sa(this.cover(t,e),t,e,n)},za.addAll=function(n){var t,e,r,i,u=n.length,o=new Array(u),a=new Array(u),c=1/0,f=1/0,s=-1/0,l=-1/0;for(e=0;es&&(s=r),il&&(l=i));if(c>s||f>l)return this;for(this.cover(c,f).cover(s,l),e=0;en||n>=i||r>t||t>=u;)switch(a=(th||(u=c.y0)>d||(o=c.x1)=g)<<1|n>=y)&&(c=p[p.length-1],p[p.length-1]=p[p.length-1-f],p[p.length-1-f]=c)}else{var b=n-+this._x.call(null,v.data),_=t-+this._y.call(null,v.data),m=b*b+_*_;if(m=(a=(p+y)/2))?p=a:y=a,(s=o>=(c=(v+g)/2))?v=c:g=c,t=d,!(d=d[l=s<<1|f]))return this;if(!d.length)break;(t[l+1&3]||t[l+2&3]||t[l+3&3])&&(e=t,h=l)}for(;d.data!==n;)if(r=d,!(d=d.next))return this;return(i=d.next)&&delete d.next,r?(i?r.next=i:delete r.next,this):t?(i?t[l]=i:delete t[l],(d=t[0]||t[1]||t[2]||t[3])&&d===(t[3]||t[2]||t[1]||t[0])&&!d.length&&(e?e[h]=d:this._root=d),this):(this._root=i,this)},za.removeAll=function(n){for(var t=0,e=n.length;tc+d||if+d||ua.index){var p=c-o.x-o.vx,v=f-o.y-o.vy,y=p*p+v*v;yn.r&&(n.r=n[t].r)}function a(){if(t){var r,i,u=t.length;for(e=new Array(u),r=0;r1?(null==e?a.remove(n):a.set(n,d(e)),t):a.get(n)},find:function(t,e,r){var i,u,o,a,c,f=0,s=n.length;for(null==r?r=1/0:r*=r,f=0;f1?(f.on(n,e),t):f.on(n)}}},ja=function(){var n,t,e,r,i=Ma(-30),u=1,o=1/0,a=.81;function c(r){var i,u=n.length,o=Ea(n,Ya,Fa).visitAfter(s);for(e=r,i=0;i=o)){(n.data!==t||n.next)&&(0===s&&(d+=(s=Na())*s),0===l&&(d+=(l=Na())*l),d1?r[0]+r.slice(2):r,+n.slice(e+1)]}var Wa=function(n){return(n=$a(Math.abs(n)))?n[1]:NaN},Za=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Qa(n){if(!(t=Za.exec(n)))throw new Error("invalid format: "+n);var t;return new Ja({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function Ja(n){this.fill=void 0===n.fill?" ":n.fill+"",this.align=void 0===n.align?">":n.align+"",this.sign=void 0===n.sign?"-":n.sign+"",this.symbol=void 0===n.symbol?"":n.symbol+"",this.zero=!!n.zero,this.width=void 0===n.width?void 0:+n.width,this.comma=!!n.comma,this.precision=void 0===n.precision?void 0:+n.precision,this.trim=!!n.trim,this.type=void 0===n.type?"":n.type+""}Qa.prototype=Ja.prototype,Ja.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var Ka,nc,tc,ec,rc=function(n,t){var e=$a(n,t);if(!e)return n+"";var r=e[0],i=e[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")},ic={"%":function(n,t){return(100*n).toFixed(t)},b:function(n){return Math.round(n).toString(2)},c:function(n){return n+""},d:function(n){return Math.abs(n=Math.round(n))>=1e21?n.toLocaleString("en").replace(/,/g,""):n.toString(10)},e:function(n,t){return n.toExponential(t)},f:function(n,t){return n.toFixed(t)},g:function(n,t){return n.toPrecision(t)},o:function(n){return Math.round(n).toString(8)},p:function(n,t){return rc(100*n,t)},r:rc,s:function(n,t){var e=$a(n,t);if(!e)return n+"";var r=e[0],i=e[1],u=i-(Ka=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,o=r.length;return u===o?r:u>o?r+new Array(u-o+1).join("0"):u>0?r.slice(0,u)+"."+r.slice(u):"0."+new Array(1-u).join("0")+$a(n,Math.max(0,t+u-1))[0]},X:function(n){return Math.round(n).toString(16).toUpperCase()},x:function(n){return Math.round(n).toString(16)}},uc=function(n){return n},oc=Array.prototype.map,ac=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"],cc=function(n){var t,e,r=void 0===n.grouping||void 0===n.thousands?uc:(t=oc.call(n.grouping,Number),e=n.thousands+"",function(n,r){for(var i=n.length,u=[],o=0,a=t[0],c=0;i>0&&a>0&&(c+a+1>r&&(a=Math.max(1,r-c)),u.push(n.substring(i-=a,i+a)),!((c+=a+1)>r));)a=t[o=(o+1)%t.length];return u.reverse().join(e)}),i=void 0===n.currency?"":n.currency[0]+"",u=void 0===n.currency?"":n.currency[1]+"",o=void 0===n.decimal?".":n.decimal+"",a=void 0===n.numerals?uc:function(n){return function(t){return t.replace(/[0-9]/g,(function(t){return n[+t]}))}}(oc.call(n.numerals,String)),c=void 0===n.percent?"%":n.percent+"",f=void 0===n.minus?"-":n.minus+"",s=void 0===n.nan?"NaN":n.nan+"";function l(n){var t=(n=Qa(n)).fill,e=n.align,l=n.sign,h=n.symbol,d=n.zero,p=n.width,v=n.comma,y=n.precision,g=n.trim,b=n.type;"n"===b?(v=!0,b="g"):ic[b]||(void 0===y&&(y=12),g=!0,b="g"),(d||"0"===t&&"="===e)&&(d=!0,t="0",e="=");var _="$"===h?i:"#"===h&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",m="$"===h?u:/[%p]/.test(b)?c:"",x=ic[b],w=/[defgprs%]/.test(b);function M(n){var i,u,c,h=_,M=m;if("c"===b)M=x(n)+M,n="";else{var N=(n=+n)<0||1/n<0;if(n=isNaN(n)?s:x(Math.abs(n),y),g&&(n=function(n){n:for(var t,e=n.length,r=1,i=-1;r0&&(i=0)}return i>0?n.slice(0,i)+n.slice(t+1):n}(n)),N&&0==+n&&"+"!==l&&(N=!1),h=(N?"("===l?l:f:"-"===l||"("===l?"":l)+h,M=("s"===b?ac[8+Ka/3]:"")+M+(N&&"("===l?")":""),w)for(i=-1,u=n.length;++i(c=n.charCodeAt(i))||c>57){M=(46===c?o+n.slice(i+1):n.slice(i))+M,n=n.slice(0,i);break}}v&&!d&&(n=r(n,1/0));var S=h.length+n.length+M.length,T=S>1)+h+n+M+T.slice(S);break;default:n=T+h+n+M}return a(n)}return y=void 0===y?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),M.toString=function(){return n+""},M}return{format:l,formatPrefix:function(n,t){var e=l(((n=Qa(n)).type="f",n)),r=3*Math.max(-8,Math.min(8,Math.floor(Wa(t)/3))),i=Math.pow(10,-r),u=ac[8+r/3];return function(n){return e(i*n)+u}}}};function fc(n){return nc=cc(n),tc=nc.format,ec=nc.formatPrefix,nc}fc({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});var sc=function(n){return Math.max(0,-Wa(Math.abs(n)))},lc=function(n,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Wa(t)/3)))-Wa(Math.abs(n)))},hc=function(n,t){return n=Math.abs(n),t=Math.abs(t)-n,Math.max(0,Wa(t)-Wa(n))+1},dc=function(){return new pc};function pc(){this.reset()}pc.prototype={constructor:pc,reset:function(){this.s=this.t=0},add:function(n){yc(vc,n,this.t),yc(this,vc.s,this.s),this.s?this.t+=vc.t:this.s=vc.t},valueOf:function(){return this.s}};var vc=new pc;function yc(n,t,e){var r=n.s=t+e,i=r-t,u=r-i;n.t=t-u+(e-i)}var gc=Math.PI,bc=gc/2,_c=gc/4,mc=2*gc,xc=180/gc,wc=gc/180,Mc=Math.abs,Nc=Math.atan,Sc=Math.atan2,Tc=Math.cos,Ac=Math.ceil,kc=Math.exp,Ec=(Math.floor,Math.log),Cc=Math.pow,Pc=Math.sin,zc=Math.sign||function(n){return n>0?1:n<0?-1:0},Rc=Math.sqrt,Dc=Math.tan;function qc(n){return n>1?0:n<-1?gc:Math.acos(n)}function Lc(n){return n>1?bc:n<-1?-bc:Math.asin(n)}function Uc(n){return(n=Pc(n/2))*n}function Bc(){}function Oc(n,t){n&&Fc.hasOwnProperty(n.type)&&Fc[n.type](n,t)}var Yc={Feature:function(n,t){Oc(n.geometry,t)},FeatureCollection:function(n,t){for(var e=n.features,r=-1,i=e.length;++r=0?1:-1,i=r*e,u=Tc(t=(t*=wc)/2+_c),o=Pc(t),a=$c*o,c=Gc*u+a*Tc(i),f=a*r*Pc(i);Zc.add(Sc(f,c)),Vc=n,Gc=u,$c=o}var rf=function(n){return Qc.reset(),Wc(n,Jc),2*Qc};function uf(n){return[Sc(n[1],n[0]),Lc(n[2])]}function of(n){var t=n[0],e=n[1],r=Tc(e);return[r*Tc(t),r*Pc(t),Pc(e)]}function af(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]}function cf(n,t){return[n[1]*t[2]-n[2]*t[1],n[2]*t[0]-n[0]*t[2],n[0]*t[1]-n[1]*t[0]]}function ff(n,t){n[0]+=t[0],n[1]+=t[1],n[2]+=t[2]}function sf(n,t){return[n[0]*t,n[1]*t,n[2]*t]}function lf(n){var t=Rc(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]);n[0]/=t,n[1]/=t,n[2]/=t}var hf,df,pf,vf,yf,gf,bf,_f,mf,xf,wf=dc(),Mf={point:Nf,lineStart:Tf,lineEnd:Af,polygonStart:function(){Mf.point=kf,Mf.lineStart=Ef,Mf.lineEnd=Cf,wf.reset(),Jc.polygonStart()},polygonEnd:function(){Jc.polygonEnd(),Mf.point=Nf,Mf.lineStart=Tf,Mf.lineEnd=Af,Zc<0?(hf=-(pf=180),df=-(vf=90)):wf>1e-6?vf=90:wf<-1e-6&&(df=-90),xf[0]=hf,xf[1]=pf},sphere:function(){hf=-(pf=180),df=-(vf=90)}};function Nf(n,t){mf.push(xf=[hf=n,pf=n]),tvf&&(vf=t)}function Sf(n,t){var e=of([n*wc,t*wc]);if(_f){var r=cf(_f,e),i=cf([r[1],-r[0],0],r);lf(i),i=uf(i);var u,o=n-yf,a=o>0?1:-1,c=i[0]*xc*a,f=Mc(o)>180;f^(a*yfvf&&(vf=u):f^(a*yf<(c=(c+360)%360-180)&&cvf&&(vf=t)),f?nPf(hf,pf)&&(pf=n):Pf(n,pf)>Pf(hf,pf)&&(hf=n):pf>=hf?(npf&&(pf=n)):n>yf?Pf(hf,n)>Pf(hf,pf)&&(pf=n):Pf(n,pf)>Pf(hf,pf)&&(hf=n)}else mf.push(xf=[hf=n,pf=n]);tvf&&(vf=t),_f=e,yf=n}function Tf(){Mf.point=Sf}function Af(){xf[0]=hf,xf[1]=pf,Mf.point=Nf,_f=null}function kf(n,t){if(_f){var e=n-yf;wf.add(Mc(e)>180?e+(e>0?360:-360):e)}else gf=n,bf=t;Jc.point(n,t),Sf(n,t)}function Ef(){Jc.lineStart()}function Cf(){kf(gf,bf),Jc.lineEnd(),Mc(wf)>1e-6&&(hf=-(pf=180)),xf[0]=hf,xf[1]=pf,_f=null}function Pf(n,t){return(t-=n)<0?t+360:t}function zf(n,t){return n[0]-t[0]}function Rf(n,t){return n[0]<=n[1]?n[0]<=t&&t<=n[1]:tPf(r[0],r[1])&&(r[1]=i[1]),Pf(i[0],r[1])>Pf(r[0],r[1])&&(r[0]=i[0])):u.push(r=i);for(o=-1/0,t=0,r=u[e=u.length-1];t<=e;r=i,++t)i=u[t],(a=Pf(r[1],i[0]))>o&&(o=a,hf=i[0],pf=r[1])}return mf=xf=null,hf===1/0||df===1/0?[[NaN,NaN],[NaN,NaN]]:[[hf,df],[pf,vf]]},Qf={sphere:Bc,point:Jf,lineStart:ns,lineEnd:rs,polygonStart:function(){Qf.lineStart=is,Qf.lineEnd=us},polygonEnd:function(){Qf.lineStart=ns,Qf.lineEnd=rs}};function Jf(n,t){n*=wc;var e=Tc(t*=wc);Kf(e*Tc(n),e*Pc(n),Pc(t))}function Kf(n,t,e){++Df,Lf+=(n-Lf)/Df,Uf+=(t-Uf)/Df,Bf+=(e-Bf)/Df}function ns(){Qf.point=ts}function ts(n,t){n*=wc;var e=Tc(t*=wc);Gf=e*Tc(n),$f=e*Pc(n),Wf=Pc(t),Qf.point=es,Kf(Gf,$f,Wf)}function es(n,t){n*=wc;var e=Tc(t*=wc),r=e*Tc(n),i=e*Pc(n),u=Pc(t),o=Sc(Rc((o=$f*u-Wf*i)*o+(o=Wf*r-Gf*u)*o+(o=Gf*i-$f*r)*o),Gf*r+$f*i+Wf*u);qf+=o,Of+=o*(Gf+(Gf=r)),Yf+=o*($f+($f=i)),Ff+=o*(Wf+(Wf=u)),Kf(Gf,$f,Wf)}function rs(){Qf.point=Jf}function is(){Qf.point=os}function us(){as(Xf,Vf),Qf.point=Jf}function os(n,t){Xf=n,Vf=t,n*=wc,t*=wc,Qf.point=as;var e=Tc(t);Gf=e*Tc(n),$f=e*Pc(n),Wf=Pc(t),Kf(Gf,$f,Wf)}function as(n,t){n*=wc;var e=Tc(t*=wc),r=e*Tc(n),i=e*Pc(n),u=Pc(t),o=$f*u-Wf*i,a=Wf*r-Gf*u,c=Gf*i-$f*r,f=Rc(o*o+a*a+c*c),s=Lc(f),l=f&&-s/f;If+=l*o,Hf+=l*a,jf+=l*c,qf+=s,Of+=s*(Gf+(Gf=r)),Yf+=s*($f+($f=i)),Ff+=s*(Wf+(Wf=u)),Kf(Gf,$f,Wf)}var cs=function(n){Df=qf=Lf=Uf=Bf=Of=Yf=Ff=If=Hf=jf=0,Wc(n,Qf);var t=If,e=Hf,r=jf,i=t*t+e*e+r*r;return i<1e-12&&(t=Of,e=Yf,r=Ff,qf<1e-6&&(t=Lf,e=Uf,r=Bf),(i=t*t+e*e+r*r)<1e-12)?[NaN,NaN]:[Sc(e,t)*xc,Lc(r/Rc(i))*xc]},fs=function(n){return function(){return n}},ss=function(n,t){function e(e,r){return e=n(e,r),t(e[0],e[1])}return n.invert&&t.invert&&(e.invert=function(e,r){return(e=t.invert(e,r))&&n.invert(e[0],e[1])}),e};function ls(n,t){return[Mc(n)>gc?n+Math.round(-n/mc)*mc:n,t]}function hs(n,t,e){return(n%=mc)?t||e?ss(ps(n),vs(t,e)):ps(n):t||e?vs(t,e):ls}function ds(n){return function(t,e){return[(t+=n)>gc?t-mc:t<-gc?t+mc:t,e]}}function ps(n){var t=ds(n);return t.invert=ds(-n),t}function vs(n,t){var e=Tc(n),r=Pc(n),i=Tc(t),u=Pc(t);function o(n,t){var o=Tc(t),a=Tc(n)*o,c=Pc(n)*o,f=Pc(t),s=f*e+a*r;return[Sc(c*i-s*u,a*e-f*r),Lc(s*i+c*u)]}return o.invert=function(n,t){var o=Tc(t),a=Tc(n)*o,c=Pc(n)*o,f=Pc(t),s=f*i-c*u;return[Sc(c*i+f*u,a*e+s*r),Lc(s*e-a*r)]},o}ls.invert=ls;var ys=function(n){function t(t){return(t=n(t[0]*wc,t[1]*wc))[0]*=xc,t[1]*=xc,t}return n=hs(n[0]*wc,n[1]*wc,n.length>2?n[2]*wc:0),t.invert=function(t){return(t=n.invert(t[0]*wc,t[1]*wc))[0]*=xc,t[1]*=xc,t},t};function gs(n,t,e,r,i,u){if(e){var o=Tc(t),a=Pc(t),c=r*e;null==i?(i=t+r*mc,u=t-c/2):(i=bs(o,i),u=bs(o,u),(r>0?iu)&&(i+=r*mc));for(var f,s=i;r>0?s>u:s1&&t.push(t.pop().concat(t.shift()))},result:function(){var e=t;return t=[],n=null,e}}},xs=function(n,t){return Mc(n[0]-t[0])<1e-6&&Mc(n[1]-t[1])<1e-6};function ws(n,t,e,r){this.x=n,this.z=t,this.o=e,this.e=r,this.v=!1,this.n=this.p=null}var Ms=function(n,t,e,r,i){var u,o,a=[],c=[];if(n.forEach((function(n){if(!((t=n.length-1)<=0)){var t,e,r=n[0],o=n[t];if(xs(r,o)){if(!r[2]&&!o[2]){for(i.lineStart(),u=0;u=0;--u)i.point((s=f[u])[0],s[1]);else r(h.x,h.p.x,-1,i);h=h.p}f=(h=h.o).z,d=!d}while(!h.v);i.lineEnd()}}};function Ns(n){if(t=n.length){for(var t,e,r=0,i=n[0];++r=0?1:-1,S=N*M,T=S>gc,A=v*x;if(Ss.add(Sc(A*N*Pc(S),y*w+A*Tc(S))),o+=T?M+N*mc:M,T^d>=e^_>=e){var k=cf(of(h),of(b));lf(k);var E=cf(u,k);lf(E);var C=(T^M>=0?-1:1)*Lc(E[2]);(r>C||r===C&&(k[0]||k[1]))&&(a+=T^M>=0?1:-1)}}return(o<-1e-6||o<1e-6&&Ss<-1e-6)^1&a},ks=function(n,t,e,r){return function(i){var u,o,a,c=t(i),f=ms(),s=t(f),l=!1,h={point:d,lineStart:v,lineEnd:y,polygonStart:function(){h.point=g,h.lineStart=b,h.lineEnd=_,o=[],u=[]},polygonEnd:function(){h.point=d,h.lineStart=v,h.lineEnd=y,o=B(o);var n=As(u,r);o.length?(l||(i.polygonStart(),l=!0),Ms(o,Cs,n,e,i)):n&&(l||(i.polygonStart(),l=!0),i.lineStart(),e(null,null,1,i),i.lineEnd()),l&&(i.polygonEnd(),l=!1),o=u=null},sphere:function(){i.polygonStart(),i.lineStart(),e(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function d(t,e){n(t,e)&&i.point(t,e)}function p(n,t){c.point(n,t)}function v(){h.point=p,c.lineStart()}function y(){h.point=d,c.lineEnd()}function g(n,t){a.push([n,t]),s.point(n,t)}function b(){s.lineStart(),a=[]}function _(){g(a[0][0],a[0][1]),s.lineEnd();var n,t,e,r,c=s.clean(),h=f.result(),d=h.length;if(a.pop(),u.push(a),a=null,d)if(1&c){if((t=(e=h[0]).length-1)>0){for(l||(i.polygonStart(),l=!0),i.lineStart(),n=0;n1&&2&c&&h.push(h.pop().concat(h.shift())),o.push(h.filter(Es))}return h}};function Es(n){return n.length>1}function Cs(n,t){return((n=n.x)[0]<0?n[1]-bc-1e-6:bc-n[1])-((t=t.x)[0]<0?t[1]-bc-1e-6:bc-t[1])}var Ps=ks((function(){return!0}),(function(n){var t,e=NaN,r=NaN,i=NaN;return{lineStart:function(){n.lineStart(),t=1},point:function(u,o){var a=u>0?gc:-gc,c=Mc(u-e);Mc(c-gc)<1e-6?(n.point(e,r=(r+o)/2>0?bc:-bc),n.point(i,r),n.lineEnd(),n.lineStart(),n.point(a,r),n.point(u,r),t=0):i!==a&&c>=gc&&(Mc(e-i)<1e-6&&(e-=1e-6*i),Mc(u-a)<1e-6&&(u-=1e-6*a),r=function(n,t,e,r){var i,u,o=Pc(n-e);return Mc(o)>1e-6?Nc((Pc(t)*(u=Tc(r))*Pc(e)-Pc(r)*(i=Tc(t))*Pc(n))/(i*u*o)):(t+r)/2}(e,r,u,o),n.point(i,r),n.lineEnd(),n.lineStart(),n.point(a,r),t=0),n.point(e=u,r=o),i=a},lineEnd:function(){n.lineEnd(),e=r=NaN},clean:function(){return 2-t}}}),(function(n,t,e,r){var i;if(null==n)i=e*bc,r.point(-gc,i),r.point(0,i),r.point(gc,i),r.point(gc,0),r.point(gc,-i),r.point(0,-i),r.point(-gc,-i),r.point(-gc,0),r.point(-gc,i);else if(Mc(n[0]-t[0])>1e-6){var u=n[0]0,i=Mc(t)>1e-6;function u(n,e){return Tc(n)*Tc(e)>t}function o(n,e,r){var i=[1,0,0],u=cf(of(n),of(e)),o=af(u,u),a=u[0],c=o-a*a;if(!c)return!r&&n;var f=t*o/c,s=-t*a/c,l=cf(i,u),h=sf(i,f);ff(h,sf(u,s));var d=l,p=af(h,d),v=af(d,d),y=p*p-v*(af(h,h)-1);if(!(y<0)){var g=Rc(y),b=sf(d,(-p-g)/v);if(ff(b,h),b=uf(b),!r)return b;var _,m=n[0],x=e[0],w=n[1],M=e[1];x0^b[1]<(Mc(b[0]-m)<1e-6?w:M):w<=b[1]&&b[1]<=M:N>gc^(m<=b[0]&&b[0]<=x)){var T=sf(d,(-p+g)/v);return ff(T,h),[b,uf(T)]}}}function a(t,e){var i=r?n:gc-n,u=0;return t<-i?u|=1:t>i&&(u|=2),e<-i?u|=4:e>i&&(u|=8),u}return ks(u,(function(n){var t,e,c,f,s;return{lineStart:function(){f=c=!1,s=1},point:function(l,h){var d,p=[l,h],v=u(l,h),y=r?v?0:a(l,h):v?a(l+(l<0?gc:-gc),h):0;if(!t&&(f=c=v)&&n.lineStart(),v!==c&&(!(d=o(t,p))||xs(t,d)||xs(p,d))&&(p[2]=1),v!==c)s=0,v?(n.lineStart(),d=o(p,t),n.point(d[0],d[1])):(d=o(t,p),n.point(d[0],d[1],2),n.lineEnd()),t=d;else if(i&&t&&r^v){var g;y&e||!(g=o(p,t,!0))||(s=0,r?(n.lineStart(),n.point(g[0][0],g[0][1]),n.point(g[1][0],g[1][1]),n.lineEnd()):(n.point(g[1][0],g[1][1]),n.lineEnd(),n.lineStart(),n.point(g[0][0],g[0][1],3)))}!v||t&&xs(t,p)||n.point(p[0],p[1]),t=p,c=v,e=y},lineEnd:function(){c&&n.lineEnd(),t=null},clean:function(){return s|(f&&c)<<1}}}),(function(t,r,i,u){gs(u,n,e,i,t,r)}),r?[0,-n]:[-gc,n-gc])};function Rs(n,t,e,r){function i(i,u){return n<=i&&i<=e&&t<=u&&u<=r}function u(i,u,a,f){var s=0,l=0;if(null==i||(s=o(i,a))!==(l=o(u,a))||c(i,u)<0^a>0)do{f.point(0===s||3===s?n:e,s>1?r:t)}while((s=(s+a+4)%4)!==l);else f.point(u[0],u[1])}function o(r,i){return Mc(r[0]-n)<1e-6?i>0?0:3:Mc(r[0]-e)<1e-6?i>0?2:1:Mc(r[1]-t)<1e-6?i>0?1:0:i>0?3:2}function a(n,t){return c(n.x,t.x)}function c(n,t){var e=o(n,1),r=o(t,1);return e!==r?e-r:0===e?t[1]-n[1]:1===e?n[0]-t[0]:2===e?n[1]-t[1]:t[0]-n[0]}return function(o){var c,f,s,l,h,d,p,v,y,g,b,_=o,m=ms(),x={point:w,lineStart:function(){x.point=M,f&&f.push(s=[]);g=!0,y=!1,p=v=NaN},lineEnd:function(){c&&(M(l,h),d&&y&&m.rejoin(),c.push(m.result()));x.point=w,y&&_.lineEnd()},polygonStart:function(){_=m,c=[],f=[],b=!0},polygonEnd:function(){var t=function(){for(var t=0,e=0,i=f.length;er&&(h-u)*(r-o)>(d-o)*(n-u)&&++t:d<=r&&(h-u)*(r-o)<(d-o)*(n-u)&&--t;return t}(),e=b&&t,i=(c=B(c)).length;(e||i)&&(o.polygonStart(),e&&(o.lineStart(),u(null,null,1,o),o.lineEnd()),i&&Ms(c,a,t,u,o),o.polygonEnd());_=o,c=f=s=null}};function w(n,t){i(n,t)&&_.point(n,t)}function M(u,o){var a=i(u,o);if(f&&s.push([u,o]),g)l=u,h=o,d=a,g=!1,a&&(_.lineStart(),_.point(u,o));else if(a&&y)_.point(u,o);else{var c=[p=Math.max(-1e9,Math.min(1e9,p)),v=Math.max(-1e9,Math.min(1e9,v))],m=[u=Math.max(-1e9,Math.min(1e9,u)),o=Math.max(-1e9,Math.min(1e9,o))];!function(n,t,e,r,i,u){var o,a=n[0],c=n[1],f=0,s=1,l=t[0]-a,h=t[1]-c;if(o=e-a,l||!(o>0)){if(o/=l,l<0){if(o0){if(o>s)return;o>f&&(f=o)}if(o=i-a,l||!(o<0)){if(o/=l,l<0){if(o>s)return;o>f&&(f=o)}else if(l>0){if(o0)){if(o/=h,h<0){if(o0){if(o>s)return;o>f&&(f=o)}if(o=u-c,h||!(o<0)){if(o/=h,h<0){if(o>s)return;o>f&&(f=o)}else if(h>0){if(o0&&(n[0]=a+f*l,n[1]=c+f*h),s<1&&(t[0]=a+s*l,t[1]=c+s*h),!0}}}}}(c,m,n,t,e,r)?a&&(_.lineStart(),_.point(u,o),b=!1):(y||(_.lineStart(),_.point(c[0],c[1])),_.point(m[0],m[1]),a||_.lineEnd(),b=!1)}p=u,v=o,y=a}return x}}var Ds,qs,Ls,Us=function(){var n,t,e,r=0,i=0,u=960,o=500;return e={stream:function(e){return n&&t===e?n:n=Rs(r,i,u,o)(t=e)},extent:function(a){return arguments.length?(r=+a[0][0],i=+a[0][1],u=+a[1][0],o=+a[1][1],n=t=null,e):[[r,i],[u,o]]}}},Bs=dc(),Os={sphere:Bc,point:Bc,lineStart:function(){Os.point=Fs,Os.lineEnd=Ys},lineEnd:Bc,polygonStart:Bc,polygonEnd:Bc};function Ys(){Os.point=Os.lineEnd=Bc}function Fs(n,t){Ds=n*=wc,qs=Pc(t*=wc),Ls=Tc(t),Os.point=Is}function Is(n,t){n*=wc;var e=Pc(t*=wc),r=Tc(t),i=Mc(n-Ds),u=Tc(i),o=r*Pc(i),a=Ls*e-qs*r*u,c=qs*e+Ls*r*u;Bs.add(Sc(Rc(o*o+a*a),c)),Ds=n,qs=e,Ls=r}var Hs=function(n){return Bs.reset(),Wc(n,Os),+Bs},js=[null,null],Xs={type:"LineString",coordinates:js},Vs=function(n,t){return js[0]=n,js[1]=t,Hs(Xs)},Gs={Feature:function(n,t){return Ws(n.geometry,t)},FeatureCollection:function(n,t){for(var e=n.features,r=-1,i=e.length;++r0&&(i=Vs(n[u],n[u-1]))>0&&e<=i&&r<=i&&(e+r-i)*(1-Math.pow((e-r)/i,2))<1e-12*i)return!0;e=r}return!1}function Js(n,t){return!!As(n.map(Ks),nl(t))}function Ks(n){return(n=n.map(nl)).pop(),n}function nl(n){return[n[0]*wc,n[1]*wc]}var tl=function(n,t){return(n&&Gs.hasOwnProperty(n.type)?Gs[n.type]:Ws)(n,t)};function el(n,t,e){var r=M(n,t-1e-6,e).concat(t);return function(n){return r.map((function(t){return[n,t]}))}}function rl(n,t,e){var r=M(n,t-1e-6,e).concat(t);return function(n){return r.map((function(t){return[t,n]}))}}function il(){var n,t,e,r,i,u,o,a,c,f,s,l,h=10,d=h,p=90,v=360,y=2.5;function g(){return{type:"MultiLineString",coordinates:b()}}function b(){return M(Ac(r/p)*p,e,p).map(s).concat(M(Ac(a/v)*v,o,v).map(l)).concat(M(Ac(t/h)*h,n,h).filter((function(n){return Mc(n%p)>1e-6})).map(c)).concat(M(Ac(u/d)*d,i,d).filter((function(n){return Mc(n%v)>1e-6})).map(f))}return g.lines=function(){return b().map((function(n){return{type:"LineString",coordinates:n}}))},g.outline=function(){return{type:"Polygon",coordinates:[s(r).concat(l(o).slice(1),s(e).reverse().slice(1),l(a).reverse().slice(1))]}},g.extent=function(n){return arguments.length?g.extentMajor(n).extentMinor(n):g.extentMinor()},g.extentMajor=function(n){return arguments.length?(r=+n[0][0],e=+n[1][0],a=+n[0][1],o=+n[1][1],r>e&&(n=r,r=e,e=n),a>o&&(n=a,a=o,o=n),g.precision(y)):[[r,a],[e,o]]},g.extentMinor=function(e){return arguments.length?(t=+e[0][0],n=+e[1][0],u=+e[0][1],i=+e[1][1],t>n&&(e=t,t=n,n=e),u>i&&(e=u,u=i,i=e),g.precision(y)):[[t,u],[n,i]]},g.step=function(n){return arguments.length?g.stepMajor(n).stepMinor(n):g.stepMinor()},g.stepMajor=function(n){return arguments.length?(p=+n[0],v=+n[1],g):[p,v]},g.stepMinor=function(n){return arguments.length?(h=+n[0],d=+n[1],g):[h,d]},g.precision=function(h){return arguments.length?(y=+h,c=el(u,i,90),f=rl(t,n,y),s=el(a,o,90),l=rl(r,e,y),g):y},g.extentMajor([[-180,-89.999999],[180,89.999999]]).extentMinor([[-180,-80.000001],[180,80.000001]])}function ul(){return il()()}var ol,al,cl,fl,sl=function(n,t){var e=n[0]*wc,r=n[1]*wc,i=t[0]*wc,u=t[1]*wc,o=Tc(r),a=Pc(r),c=Tc(u),f=Pc(u),s=o*Tc(e),l=o*Pc(e),h=c*Tc(i),d=c*Pc(i),p=2*Lc(Rc(Uc(u-r)+o*c*Uc(i-e))),v=Pc(p),y=p?function(n){var t=Pc(n*=p)/v,e=Pc(p-n)/v,r=e*s+t*h,i=e*l+t*d,u=e*a+t*f;return[Sc(i,r)*xc,Sc(u,Rc(r*r+i*i))*xc]}:function(){return[e*xc,r*xc]};return y.distance=p,y},ll=function(n){return n},hl=dc(),dl=dc(),pl={point:Bc,lineStart:Bc,lineEnd:Bc,polygonStart:function(){pl.lineStart=vl,pl.lineEnd=bl},polygonEnd:function(){pl.lineStart=pl.lineEnd=pl.point=Bc,hl.add(Mc(dl)),dl.reset()},result:function(){var n=hl/2;return hl.reset(),n}};function vl(){pl.point=yl}function yl(n,t){pl.point=gl,ol=cl=n,al=fl=t}function gl(n,t){dl.add(fl*n-cl*t),cl=n,fl=t}function bl(){gl(ol,al)}var _l=pl,ml=1/0,xl=ml,wl=-ml,Ml=wl;var Nl,Sl,Tl,Al,kl={point:function(n,t){nwl&&(wl=n);tMl&&(Ml=t)},lineStart:Bc,lineEnd:Bc,polygonStart:Bc,polygonEnd:Bc,result:function(){var n=[[ml,xl],[wl,Ml]];return wl=Ml=-(xl=ml=1/0),n}},El=0,Cl=0,Pl=0,zl=0,Rl=0,Dl=0,ql=0,Ll=0,Ul=0,Bl={point:Ol,lineStart:Yl,lineEnd:Hl,polygonStart:function(){Bl.lineStart=jl,Bl.lineEnd=Xl},polygonEnd:function(){Bl.point=Ol,Bl.lineStart=Yl,Bl.lineEnd=Hl},result:function(){var n=Ul?[ql/Ul,Ll/Ul]:Dl?[zl/Dl,Rl/Dl]:Pl?[El/Pl,Cl/Pl]:[NaN,NaN];return El=Cl=Pl=zl=Rl=Dl=ql=Ll=Ul=0,n}};function Ol(n,t){El+=n,Cl+=t,++Pl}function Yl(){Bl.point=Fl}function Fl(n,t){Bl.point=Il,Ol(Tl=n,Al=t)}function Il(n,t){var e=n-Tl,r=t-Al,i=Rc(e*e+r*r);zl+=i*(Tl+n)/2,Rl+=i*(Al+t)/2,Dl+=i,Ol(Tl=n,Al=t)}function Hl(){Bl.point=Ol}function jl(){Bl.point=Vl}function Xl(){Gl(Nl,Sl)}function Vl(n,t){Bl.point=Gl,Ol(Nl=Tl=n,Sl=Al=t)}function Gl(n,t){var e=n-Tl,r=t-Al,i=Rc(e*e+r*r);zl+=i*(Tl+n)/2,Rl+=i*(Al+t)/2,Dl+=i,ql+=(i=Al*n-Tl*t)*(Tl+n),Ll+=i*(Al+t),Ul+=3*i,Ol(Tl=n,Al=t)}var $l=Bl;function Wl(n){this._context=n}Wl.prototype={_radius:4.5,pointRadius:function(n){return this._radius=n,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(n,t){switch(this._point){case 0:this._context.moveTo(n,t),this._point=1;break;case 1:this._context.lineTo(n,t);break;default:this._context.moveTo(n+this._radius,t),this._context.arc(n,t,this._radius,0,mc)}},result:Bc};var Zl,Ql,Jl,Kl,nh,th=dc(),eh={point:Bc,lineStart:function(){eh.point=rh},lineEnd:function(){Zl&&ih(Ql,Jl),eh.point=Bc},polygonStart:function(){Zl=!0},polygonEnd:function(){Zl=null},result:function(){var n=+th;return th.reset(),n}};function rh(n,t){eh.point=ih,Ql=Kl=n,Jl=nh=t}function ih(n,t){Kl-=n,nh-=t,th.add(Rc(Kl*Kl+nh*nh)),Kl=n,nh=t}var uh=eh;function oh(){this._string=[]}function ah(n){return"m0,"+n+"a"+n+","+n+" 0 1,1 0,"+-2*n+"a"+n+","+n+" 0 1,1 0,"+2*n+"z"}oh.prototype={_radius:4.5,_circle:ah(4.5),pointRadius:function(n){return(n=+n)!==this._radius&&(this._radius=n,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(n,t){switch(this._point){case 0:this._string.push("M",n,",",t),this._point=1;break;case 1:this._string.push("L",n,",",t);break;default:null==this._circle&&(this._circle=ah(this._radius)),this._string.push("M",n,",",t,this._circle)}},result:function(){if(this._string.length){var n=this._string.join("");return this._string=[],n}return null}};var ch=function(n,t){var e,r,i=4.5;function u(n){return n&&("function"==typeof i&&r.pointRadius(+i.apply(this,arguments)),Wc(n,e(r))),r.result()}return u.area=function(n){return Wc(n,e(_l)),_l.result()},u.measure=function(n){return Wc(n,e(uh)),uh.result()},u.bounds=function(n){return Wc(n,e(kl)),kl.result()},u.centroid=function(n){return Wc(n,e($l)),$l.result()},u.projection=function(t){return arguments.length?(e=null==t?(n=null,ll):(n=t).stream,u):n},u.context=function(n){return arguments.length?(r=null==n?(t=null,new oh):new Wl(t=n),"function"!=typeof i&&r.pointRadius(i),u):t},u.pointRadius=function(n){return arguments.length?(i="function"==typeof n?n:(r.pointRadius(+n),+n),u):i},u.projection(n).context(t)},fh=function(n){return{stream:sh(n)}};function sh(n){return function(t){var e=new lh;for(var r in n)e[r]=n[r];return e.stream=t,e}}function lh(){}function hh(n,t,e){var r=n.clipExtent&&n.clipExtent();return n.scale(150).translate([0,0]),null!=r&&n.clipExtent(null),Wc(e,n.stream(kl)),t(kl.result()),null!=r&&n.clipExtent(r),n}function dh(n,t,e){return hh(n,(function(e){var r=t[1][0]-t[0][0],i=t[1][1]-t[0][1],u=Math.min(r/(e[1][0]-e[0][0]),i/(e[1][1]-e[0][1])),o=+t[0][0]+(r-u*(e[1][0]+e[0][0]))/2,a=+t[0][1]+(i-u*(e[1][1]+e[0][1]))/2;n.scale(150*u).translate([o,a])}),e)}function ph(n,t,e){return dh(n,[[0,0],t],e)}function vh(n,t,e){return hh(n,(function(e){var r=+t,i=r/(e[1][0]-e[0][0]),u=(r-i*(e[1][0]+e[0][0]))/2,o=-i*e[0][1];n.scale(150*i).translate([u,o])}),e)}function yh(n,t,e){return hh(n,(function(e){var r=+t,i=r/(e[1][1]-e[0][1]),u=-i*e[0][0],o=(r-i*(e[1][1]+e[0][1]))/2;n.scale(150*i).translate([u,o])}),e)}lh.prototype={constructor:lh,point:function(n,t){this.stream.point(n,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var gh=Tc(30*wc),bh=function(n,t){return+t?function(n,t){function e(r,i,u,o,a,c,f,s,l,h,d,p,v,y){var g=f-r,b=s-i,_=g*g+b*b;if(_>4*t&&v--){var m=o+h,x=a+d,w=c+p,M=Rc(m*m+x*x+w*w),N=Lc(w/=M),S=Mc(Mc(w)-1)<1e-6||Mc(u-l)<1e-6?(u+l)/2:Sc(x,m),T=n(S,N),A=T[0],k=T[1],E=A-r,C=k-i,P=b*E-g*C;(P*P/_>t||Mc((g*E+b*C)/_-.5)>.3||o*h+a*d+c*p2?n[2]%360*wc:0,E()):[y*xc,g*xc,b*xc]},A.angle=function(n){return arguments.length?(_=n%360*wc,E()):_*xc},A.reflectX=function(n){return arguments.length?(m=n?-1:1,E()):m<0},A.reflectY=function(n){return arguments.length?(x=n?-1:1,E()):x<0},A.precision=function(n){return arguments.length?(o=bh(a,T=n*n),C()):Rc(T)},A.fitExtent=function(n,t){return dh(A,n,t)},A.fitSize=function(n,t){return ph(A,n,t)},A.fitWidth=function(n,t){return vh(A,n,t)},A.fitHeight=function(n,t){return yh(A,n,t)},function(){return t=n.apply(this,arguments),A.invert=t.invert&&k,E()}}function Nh(n){var t=0,e=gc/3,r=Mh(n),i=r(t,e);return i.parallels=function(n){return arguments.length?r(t=n[0]*wc,e=n[1]*wc):[t*xc,e*xc]},i}function Sh(n,t){var e=Pc(n),r=(e+Pc(t))/2;if(Mc(r)<1e-6)return function(n){var t=Tc(n);function e(n,e){return[n*t,Pc(e)/t]}return e.invert=function(n,e){return[n/t,Lc(e*t)]},e}(n);var i=1+e*(2*r-e),u=Rc(i)/r;function o(n,t){var e=Rc(i-2*r*Pc(t))/r;return[e*Pc(n*=r),u-e*Tc(n)]}return o.invert=function(n,t){var e=u-t,o=Sc(n,Mc(e))*zc(e);return e*r<0&&(o-=gc*zc(n)*zc(e)),[o/r,Lc((i-(n*n+e*e)*r*r)/(2*r))]},o}var Th=function(){return Nh(Sh).scale(155.424).center([0,33.6442])},Ah=function(){return Th().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])};var kh=function(){var n,t,e,r,i,u,o=Ah(),a=Th().rotate([154,0]).center([-2,58.5]).parallels([55,65]),c=Th().rotate([157,0]).center([-3,19.9]).parallels([8,18]),f={point:function(n,t){u=[n,t]}};function s(n){var t=n[0],o=n[1];return u=null,e.point(t,o),u||(r.point(t,o),u)||(i.point(t,o),u)}function l(){return n=t=null,s}return s.invert=function(n){var t=o.scale(),e=o.translate(),r=(n[0]-e[0])/t,i=(n[1]-e[1])/t;return(i>=.12&&i<.234&&r>=-.425&&r<-.214?a:i>=.166&&i<.234&&r>=-.214&&r<-.115?c:o).invert(n)},s.stream=function(e){return n&&t===e?n:(r=[o.stream(t=e),a.stream(e),c.stream(e)],i=r.length,n={point:function(n,t){for(var e=-1;++e0?t<1e-6-bc&&(t=1e-6-bc):t>bc-1e-6&&(t=bc-1e-6);var e=i/Cc(Bh(t),r);return[e*Pc(r*n),i-e*Tc(r*n)]}return u.invert=function(n,t){var e=i-t,u=zc(r)*Rc(n*n+e*e),o=Sc(n,Mc(e))*zc(e);return e*r<0&&(o-=gc*zc(n)*zc(e)),[o/r,2*Nc(Cc(i/u,1/r))-bc]},u}var Yh=function(){return Nh(Oh).scale(109.5).parallels([30,30])};function Fh(n,t){return[n,t]}Fh.invert=Fh;var Ih=function(){return wh(Fh).scale(152.63)};function Hh(n,t){var e=Tc(n),r=n===t?Pc(n):(e-Tc(t))/(t-n),i=e/r+n;if(Mc(r)<1e-6)return Fh;function u(n,t){var e=i-t,u=r*n;return[e*Pc(u),i-e*Tc(u)]}return u.invert=function(n,t){var e=i-t,u=Sc(n,Mc(e))*zc(e);return e*r<0&&(u-=gc*zc(n)*zc(e)),[u/r,i-zc(r)*Rc(n*n+e*e)]},u}var jh=function(){return Nh(Hh).scale(131.154).center([0,13.9389])},Xh=1.340264,Vh=-.081106,Gh=893e-6,$h=.003796,Wh=Rc(3)/2;function Zh(n,t){var e=Lc(Wh*Pc(t)),r=e*e,i=r*r*r;return[n*Tc(e)/(Wh*(Xh+3*Vh*r+i*(7*Gh+9*$h*r))),e*(Xh+Vh*r+i*(Gh+$h*r))]}Zh.invert=function(n,t){for(var e,r=t,i=r*r,u=i*i*i,o=0;o<12&&(u=(i=(r-=e=(r*(Xh+Vh*i+u*(Gh+$h*i))-t)/(Xh+3*Vh*i+u*(7*Gh+9*$h*i)))*r)*i*i,!(Mc(e)<1e-12));++o);return[Wh*n*(Xh+3*Vh*i+u*(7*Gh+9*$h*i))/Tc(r),Lc(Pc(r)/Wh)]};var Qh=function(){return wh(Zh).scale(177.158)};function Jh(n,t){var e=Tc(t),r=Tc(n)*e;return[e*Pc(n)/r,Pc(t)/r]}Jh.invert=Ch(Nc);var Kh=function(){return wh(Jh).scale(144.049).clipAngle(60)},nd=function(){var n,t,e,r,i,u,o,a=1,c=0,f=0,s=1,l=1,h=0,d=null,p=1,v=1,y=sh({point:function(n,t){var e=_([n,t]);this.stream.point(e[0],e[1])}}),g=ll;function b(){return p=a*s,v=a*l,u=o=null,_}function _(e){var r=e[0]*p,i=e[1]*v;if(h){var u=i*n-r*t;r=r*n+i*t,i=u}return[r+c,i+f]}return _.invert=function(e){var r=e[0]-c,i=e[1]-f;if(h){var u=i*n+r*t;r=r*n-i*t,i=u}return[r/p,i/v]},_.stream=function(n){return u&&o===n?u:u=y(g(o=n))},_.postclip=function(n){return arguments.length?(g=n,d=e=r=i=null,b()):g},_.clipExtent=function(n){return arguments.length?(g=null==n?(d=e=r=i=null,ll):Rs(d=+n[0][0],e=+n[0][1],r=+n[1][0],i=+n[1][1]),b()):null==d?null:[[d,e],[r,i]]},_.scale=function(n){return arguments.length?(a=+n,b()):a},_.translate=function(n){return arguments.length?(c=+n[0],f=+n[1],b()):[c,f]},_.angle=function(e){return arguments.length?(t=Pc(h=e%360*wc),n=Tc(h),b()):h*xc},_.reflectX=function(n){return arguments.length?(s=n?-1:1,b()):s<0},_.reflectY=function(n){return arguments.length?(l=n?-1:1,b()):l<0},_.fitExtent=function(n,t){return dh(_,n,t)},_.fitSize=function(n,t){return ph(_,n,t)},_.fitWidth=function(n,t){return vh(_,n,t)},_.fitHeight=function(n,t){return yh(_,n,t)},_};function td(n,t){var e=t*t,r=e*e;return[n*(.8707-.131979*e+r*(r*(.003971*e-.001529*r)-.013791)),t*(1.007226+e*(.015085+r*(.028874*e-.044475-.005916*r)))]}td.invert=function(n,t){var e,r=t,i=25;do{var u=r*r,o=u*u;r-=e=(r*(1.007226+u*(.015085+o*(.028874*u-.044475-.005916*o)))-t)/(1.007226+u*(.045255+o*(.259866*u-.311325-.005916*11*o)))}while(Mc(e)>1e-6&&--i>0);return[n/(.8707+(u=r*r)*(u*(u*u*u*(.003971-.001529*u)-.013791)-.131979)),r]};var ed=function(){return wh(td).scale(175.295)};function rd(n,t){return[Tc(t)*Pc(n),Pc(t)]}rd.invert=Ch(Lc);var id=function(){return wh(rd).scale(249.5).clipAngle(90.000001)};function ud(n,t){var e=Tc(t),r=1+Tc(n)*e;return[e*Pc(n)/r,Pc(t)/r]}ud.invert=Ch((function(n){return 2*Nc(n)}));var od=function(){return wh(ud).scale(250).clipAngle(142)};function ad(n,t){return[Ec(Dc((bc+t)/2)),-n]}ad.invert=function(n,t){return[-t,2*Nc(kc(n))-bc]};var cd=function(){var n=Uh(ad),t=n.center,e=n.rotate;return n.center=function(n){return arguments.length?t([-n[1],n[0]]):[(n=t())[1],-n[0]]},n.rotate=function(n){return arguments.length?e([n[0],n[1],n.length>2?n[2]+90:90]):[(n=e())[0],n[1],n[2]-90]},e([0,0,90]).scale(159.155)};function fd(n,t){return n.parent===t.parent?1:2}function sd(n,t){return n+t.x}function ld(n,t){return Math.max(n,t.y)}var hd=function(){var n=fd,t=1,e=1,r=!1;function i(i){var u,o=0;i.eachAfter((function(t){var e=t.children;e?(t.x=function(n){return n.reduce(sd,0)/n.length}(e),t.y=function(n){return 1+n.reduce(ld,0)}(e)):(t.x=u?o+=n(t,u):0,t.y=0,u=t)}));var a=function(n){for(var t;t=n.children;)n=t[0];return n}(i),c=function(n){for(var t;t=n.children;)n=t[t.length-1];return n}(i),f=a.x-n(a,c)/2,s=c.x+n(c,a)/2;return i.eachAfter(r?function(n){n.x=(n.x-i.x)*t,n.y=(i.y-n.y)*e}:function(n){n.x=(n.x-f)/(s-f)*t,n.y=(1-(i.y?n.y/i.y:1))*e})}return i.separation=function(t){return arguments.length?(n=t,i):n},i.size=function(n){return arguments.length?(r=!1,t=+n[0],e=+n[1],i):r?null:[t,e]},i.nodeSize=function(n){return arguments.length?(r=!0,t=+n[0],e=+n[1],i):r?[t,e]:null},i};function dd(n){var t=0,e=n.children,r=e&&e.length;if(r)for(;--r>=0;)t+=e[r].value;else t=1;n.value=t}function pd(n,t){var e,r,i,u,o,a=new bd(n),c=+n.value&&(a.value=n.value),f=[a];for(null==t&&(t=vd);e=f.pop();)if(c&&(e.value=+e.data.value),(i=t(e.data))&&(o=i.length))for(e.children=new Array(o),u=o-1;u>=0;--u)f.push(r=e.children[u]=new bd(i[u])),r.parent=e,r.depth=e.depth+1;return a.eachBefore(gd)}function vd(n){return n.children}function yd(n){n.data=n.data.data}function gd(n){var t=0;do{n.height=t}while((n=n.parent)&&n.height<++t)}function bd(n){this.data=n,this.depth=this.height=0,this.parent=null}bd.prototype=pd.prototype={constructor:bd,count:function(){return this.eachAfter(dd)},each:function(n){var t,e,r,i,u=this,o=[u];do{for(t=o.reverse(),o=[];u=t.pop();)if(n(u),e=u.children)for(r=0,i=e.length;r=0;--e)i.push(t[e]);return this},sum:function(n){return this.eachAfter((function(t){for(var e=+n(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)e+=r[i].value;t.value=e}))},sort:function(n){return this.eachBefore((function(t){t.children&&t.children.sort(n)}))},path:function(n){for(var t=this,e=function(n,t){if(n===t)return n;var e=n.ancestors(),r=t.ancestors(),i=null;n=e.pop(),t=r.pop();for(;n===t;)i=n,n=e.pop(),t=r.pop();return i}(t,n),r=[t];t!==e;)t=t.parent,r.push(t);for(var i=r.length;n!==e;)r.splice(i,0,n),n=n.parent;return r},ancestors:function(){for(var n=this,t=[n];n=n.parent;)t.push(n);return t},descendants:function(){var n=[];return this.each((function(t){n.push(t)})),n},leaves:function(){var n=[];return this.eachBefore((function(t){t.children||n.push(t)})),n},links:function(){var n=this,t=[];return n.each((function(e){e!==n&&t.push({source:e.parent,target:e})})),t},copy:function(){return pd(this).eachBefore(yd)}};var _d=Array.prototype.slice;var md=function(n){for(var t,e,r=0,i=(n=function(n){for(var t,e,r=n.length;r;)e=Math.random()*r--|0,t=n[r],n[r]=n[e],n[e]=t;return n}(_d.call(n))).length,u=[];r0&&e*e>r*r+i*i}function Nd(n,t){for(var e=0;e(o*=o)?(r=(f+o-i)/(2*f),u=Math.sqrt(Math.max(0,o/f-r*r)),e.x=n.x-r*a-u*c,e.y=n.y-r*c+u*a):(r=(f+i-o)/(2*f),u=Math.sqrt(Math.max(0,i/f-r*r)),e.x=t.x+r*a-u*c,e.y=t.y+r*c+u*a)):(e.x=t.x+e.r,e.y=t.y)}function Ed(n,t){var e=n.r+t.r-1e-6,r=t.x-n.x,i=t.y-n.y;return e>0&&e*e>r*r+i*i}function Cd(n){var t=n._,e=n.next._,r=t.r+e.r,i=(t.x*e.r+e.x*t.r)/r,u=(t.y*e.r+e.y*t.r)/r;return i*i+u*u}function Pd(n){this._=n,this.next=null,this.previous=null}function zd(n){if(!(i=n.length))return 0;var t,e,r,i,u,o,a,c,f,s,l;if((t=n[0]).x=0,t.y=0,!(i>1))return t.r;if(e=n[1],t.x=-e.r,e.x=t.r,e.y=0,!(i>2))return t.r+e.r;kd(e,t,r=n[2]),t=new Pd(t),e=new Pd(e),r=new Pd(r),t.next=r.previous=e,e.next=t.previous=r,r.next=e.previous=t;n:for(a=3;a0)throw new Error("cycle");return u}return e.id=function(t){return arguments.length?(n=qd(t),e):n},e.parentId=function(n){return arguments.length?(t=qd(n),e):t},e};function Qd(n,t){return n.parent===t.parent?1:2}function Jd(n){var t=n.children;return t?t[0]:n.t}function Kd(n){var t=n.children;return t?t[t.length-1]:n.t}function np(n,t,e){var r=e/(t.i-n.i);t.c-=r,t.s+=e,n.c+=r,t.z+=e,t.m+=e}function tp(n,t,e){return n.a.parent===t.parent?n.a:e}function ep(n,t){this._=n,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}ep.prototype=Object.create(bd.prototype);var rp=function(){var n=Qd,t=1,e=1,r=null;function i(i){var c=function(n){for(var t,e,r,i,u,o=new ep(n,0),a=[o];t=a.pop();)if(r=t._.children)for(t.children=new Array(u=r.length),i=u-1;i>=0;--i)a.push(e=t.children[i]=new ep(r[i],i)),e.parent=t;return(o.parent=new ep(null,0)).children=[o],o}(i);if(c.eachAfter(u),c.parent.m=-c.z,c.eachBefore(o),r)i.eachBefore(a);else{var f=i,s=i,l=i;i.eachBefore((function(n){n.xs.x&&(s=n),n.depth>l.depth&&(l=n)}));var h=f===s?1:n(f,s)/2,d=h-f.x,p=t/(s.x+h+d),v=e/(l.depth||1);i.eachBefore((function(n){n.x=(n.x+d)*p,n.y=n.depth*v}))}return i}function u(t){var e=t.children,r=t.parent.children,i=t.i?r[t.i-1]:null;if(e){!function(n){for(var t,e=0,r=0,i=n.children,u=i.length;--u>=0;)(t=i[u]).z+=e,t.m+=e,e+=t.s+(r+=t.c)}(t);var u=(e[0].z+e[e.length-1].z)/2;i?(t.z=i.z+n(t._,i._),t.m=t.z-u):t.z=u}else i&&(t.z=i.z+n(t._,i._));t.parent.A=function(t,e,r){if(e){for(var i,u=t,o=t,a=e,c=u.parent.children[0],f=u.m,s=o.m,l=a.m,h=c.m;a=Kd(a),u=Jd(u),a&&u;)c=Jd(c),(o=Kd(o)).a=t,(i=a.z+l-u.z-f+n(a._,u._))>0&&(np(tp(a,t,r),t,i),f+=i,s+=i),l+=a.m,f+=u.m,h+=c.m,s+=o.m;a&&!Kd(o)&&(o.t=a,o.m+=l-s),u&&!Jd(c)&&(c.t=u,c.m+=f-h,r=t)}return r}(t,i,t.parent.A||r[0])}function o(n){n._.x=n.z+n.parent.m,n.m+=n.parent.m}function a(n){n.x*=t,n.y=n.depth*e}return i.separation=function(t){return arguments.length?(n=t,i):n},i.size=function(n){return arguments.length?(r=!1,t=+n[0],e=+n[1],i):r?null:[t,e]},i.nodeSize=function(n){return arguments.length?(r=!0,t=+n[0],e=+n[1],i):r?[t,e]:null},i},ip=function(n,t,e,r,i){for(var u,o=n.children,a=-1,c=o.length,f=n.value&&(i-e)/n.value;++ah&&(h=a),y=s*s*v,(d=Math.max(h/y,y/l))>p){s-=a;break}p=d}g.push(o={value:s,dice:c1?t:1)},e}(up),cp=function(){var n=ap,t=!1,e=1,r=1,i=[0],u=Ld,o=Ld,a=Ld,c=Ld,f=Ld;function s(n){return n.x0=n.y0=0,n.x1=e,n.y1=r,n.eachBefore(l),i=[0],t&&n.eachBefore(Hd),n}function l(t){var e=i[t.depth],r=t.x0+e,s=t.y0+e,l=t.x1-e,h=t.y1-e;l=e-1){var s=a[t];return s.x0=i,s.y0=u,s.x1=o,void(s.y1=c)}var l=f[t],h=r/2+l,d=t+1,p=e-1;for(;d>>1;f[v]c-u){var b=(i*g+o*y)/r;n(t,d,y,i,u,b,c),n(d,e,g,b,u,o,c)}else{var _=(u*g+c*y)/r;n(t,d,y,i,u,o,_),n(d,e,g,i,_,o,c)}}(0,c,n.value,t,e,r,i)},sp=function(n,t,e,r,i){(1&n.depth?ip:jd)(n,t,e,r,i)},lp=function n(t){function e(n,e,r,i,u){if((o=n._squarify)&&o.ratio===t)for(var o,a,c,f,s,l=-1,h=o.length,d=n.value;++l1?t:1)},e}(up),hp=function(n){var t=n.length;return function(e){return n[Math.max(0,Math.min(t-1,Math.floor(e*t)))]}},dp=function(n,t){var e=se(+n,+t);return function(n){var t=e(n);return t-360*Math.floor(t/360)}},pp=function(n,t){return n=+n,t=+t,function(e){return Math.round(n*(1-e)+t*e)}},vp=Math.SQRT2;function yp(n){return((n=Math.exp(n))+1/n)/2}var gp=function(n,t){var e,r,i=n[0],u=n[1],o=n[2],a=t[0],c=t[1],f=t[2],s=a-i,l=c-u,h=s*s+l*l;if(h<1e-12)r=Math.log(f/o)/vp,e=function(n){return[i+n*s,u+n*l,o*Math.exp(vp*n*r)]};else{var d=Math.sqrt(h),p=(f*f-o*o+4*h)/(2*o*2*d),v=(f*f-o*o-4*h)/(2*f*2*d),y=Math.log(Math.sqrt(p*p+1)-p),g=Math.log(Math.sqrt(v*v+1)-v);r=(g-y)/vp,e=function(n){var t,e=n*r,a=yp(y),c=o/(2*d)*(a*(t=vp*e+y,((t=Math.exp(2*t))-1)/(t+1))-function(n){return((n=Math.exp(n))-1/n)/2}(y));return[i+c*s,u+c*l,o*a/yp(vp*e+y)]}}return e.duration=1e3*r,e};function bp(n){return function(t,e){var r=n((t=ee(t)).h,(e=ee(e)).h),i=he(t.s,e.s),u=he(t.l,e.l),o=he(t.opacity,e.opacity);return function(n){return t.h=r(n),t.s=i(n),t.l=u(n),t.opacity=o(n),t+""}}}var _p=bp(se),mp=bp(he);function xp(n,t){var e=he((n=bu(n)).l,(t=bu(t)).l),r=he(n.a,t.a),i=he(n.b,t.b),u=he(n.opacity,t.opacity);return function(t){return n.l=e(t),n.a=r(t),n.b=i(t),n.opacity=u(t),n+""}}function wp(n){return function(t,e){var r=n((t=Tu(t)).h,(e=Tu(e)).h),i=he(t.c,e.c),u=he(t.l,e.l),o=he(t.opacity,e.opacity);return function(n){return t.h=r(n),t.c=i(n),t.l=u(n),t.opacity=o(n),t+""}}}var Mp=wp(se),Np=wp(he);function Sp(n){return function t(e){function r(t,r){var i=n((t=Du(t)).h,(r=Du(r)).h),u=he(t.s,r.s),o=he(t.l,r.l),a=he(t.opacity,r.opacity);return function(n){return t.h=i(n),t.s=u(n),t.l=o(Math.pow(n,e)),t.opacity=a(n),t+""}}return e=+e,r.gamma=t,r}(1)}var Tp=Sp(se),Ap=Sp(he);function kp(n,t){for(var e=0,r=t.length-1,i=t[0],u=new Array(r<0?0:r);e1&&(t=n[u[o-2]],e=n[u[o-1]],r=n[a],(e[0]-t[0])*(r[1]-t[1])-(e[1]-t[1])*(r[0]-t[0])<=0);)--o;u[o++]=a}return u.slice(0,o)}var Dp=function(n){if((e=n.length)<3)return null;var t,e,r=new Array(e),i=new Array(e);for(t=0;t=0;--t)f.push(n[r[u[t]][2]]);for(t=+a;ta!=f>a&&o<(c-e)*(a-r)/(f-r)+e&&(s=!s),c=e,f=r;return s},Lp=function(n){for(var t,e,r=-1,i=n.length,u=n[i-1],o=u[0],a=u[1],c=0;++r1);return n+e*u*Math.sqrt(-2*Math.log(i)/i)}}return e.source=n,e}(Up),Yp=function n(t){function e(){var n=Op.source(t).apply(this,arguments);return function(){return Math.exp(n())}}return e.source=n,e}(Up),Fp=function n(t){function e(n){return function(){for(var e=0,r=0;rr&&(t=e,e=r,r=t),function(n){return Math.max(e,Math.min(r,n))}}function uv(n,t,e){var r=n[0],i=n[1],u=t[0],o=t[1];return i2?ov:uv,i=u=null,l}function l(t){return isNaN(t=+t)?e:(i||(i=r(o.map(n),a,c)))(n(f(t)))}return l.invert=function(e){return f(t((u||(u=r(a,o.map(n),we)))(e)))},l.domain=function(n){return arguments.length?(o=Gp.call(n,nv),f===ev||(f=iv(o)),s()):o.slice()},l.range=function(n){return arguments.length?(a=$p.call(n),s()):a.slice()},l.rangeRound=function(n){return a=$p.call(n),c=pp,s()},l.clamp=function(n){return arguments.length?(f=n?iv(o):ev,l):f!==ev},l.interpolate=function(n){return arguments.length?(c=n,s()):c},l.unknown=function(n){return arguments.length?(e=n,l):e},function(e,r){return n=e,t=r,s()}}function fv(n,t){return cv()(n,t)}var sv=function(n,t,e,r){var i,u=E(n,t,e);switch((r=Qa(null==r?",f":r)).type){case"s":var o=Math.max(Math.abs(n),Math.abs(t));return null!=r.precision||isNaN(i=lc(u,o))||(r.precision=i),ec(r,o);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=hc(u,Math.max(Math.abs(n),Math.abs(t))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=sc(u))||(r.precision=i-2*("%"===r.type))}return tc(r)};function lv(n){var t=n.domain;return n.ticks=function(n){var e=t();return A(e[0],e[e.length-1],null==n?10:n)},n.tickFormat=function(n,e){var r=t();return sv(r[0],r[r.length-1],null==n?10:n,e)},n.nice=function(e){null==e&&(e=10);var r,i=t(),u=0,o=i.length-1,a=i[u],c=i[o];return c0?r=k(a=Math.floor(a/r)*r,c=Math.ceil(c/r)*r,e):r<0&&(r=k(a=Math.ceil(a*r)/r,c=Math.floor(c*r)/r,e)),r>0?(i[u]=Math.floor(a/r)*r,i[o]=Math.ceil(c/r)*r,t(i)):r<0&&(i[u]=Math.ceil(a*r)/r,i[o]=Math.floor(c*r)/r,t(i)),n},n}function hv(){var n=fv(ev,ev);return n.copy=function(){return av(n,hv())},jp.apply(n,arguments),lv(n)}function dv(n){var t;function e(n){return isNaN(n=+n)?t:n}return e.invert=e,e.domain=e.range=function(t){return arguments.length?(n=Gp.call(t,nv),e):n.slice()},e.unknown=function(n){return arguments.length?(t=n,e):t},e.copy=function(){return dv(n).unknown(t)},n=arguments.length?Gp.call(n,nv):[0,1],lv(e)}var pv=function(n,t){var e,r=0,i=(n=n.slice()).length-1,u=n[r],o=n[i];return o0){for(;hc)break;v.push(l)}}else for(;h=1;--s)if(!((l=f*s)c)break;v.push(l)}}else v=A(h,d,Math.min(d-h,p)).map(e);return r?v.reverse():v},r.tickFormat=function(n,i){if(null==i&&(i=10===u?".0e":","),"function"!=typeof i&&(i=tc(i)),n===1/0)return i;null==n&&(n=10);var o=Math.max(1,u*n/r.ticks().length);return function(n){var r=n/e(Math.round(t(n)));return r*u0?r[i-1]:t[0],i=r?[i[r-1],e]:[i[o-1],i[o]]},o.unknown=function(t){return arguments.length?(n=t,o):o},o.thresholds=function(){return i.slice()},o.copy=function(){return Dv().domain([t,e]).range(u).unknown(n)},jp.apply(lv(o),arguments)}function qv(){var n,t=[.5],e=[0,1],r=1;function i(i){return i<=i?e[f(t,i,0,r)]:n}return i.domain=function(n){return arguments.length?(t=$p.call(n),r=Math.min(t.length,e.length-1),i):t.slice()},i.range=function(n){return arguments.length?(e=$p.call(n),r=Math.min(t.length,e.length-1),i):e.slice()},i.invertExtent=function(n){var r=e.indexOf(n);return[t[r-1],t[r]]},i.unknown=function(t){return arguments.length?(n=t,i):n},i.copy=function(){return qv().domain(t).range(e).unknown(n)},jp.apply(i,arguments)}var Lv=new Date,Uv=new Date;function Bv(n,t,e,r){function i(t){return n(t=0===arguments.length?new Date:new Date(+t)),t}return i.floor=function(t){return n(t=new Date(+t)),t},i.ceil=function(e){return n(e=new Date(e-1)),t(e,1),n(e),e},i.round=function(n){var t=i(n),e=i.ceil(n);return n-t0))return a;do{a.push(o=new Date(+e)),t(e,u),n(e)}while(o=t)for(;n(t),!e(t);)t.setTime(t-1)}),(function(n,r){if(n>=n)if(r<0)for(;++r<=0;)for(;t(n,-1),!e(n););else for(;--r>=0;)for(;t(n,1),!e(n););}))},e&&(i.count=function(t,r){return Lv.setTime(+t),Uv.setTime(+r),n(Lv),n(Uv),Math.floor(e(Lv,Uv))},i.every=function(n){return n=Math.floor(n),isFinite(n)&&n>0?n>1?i.filter(r?function(t){return r(t)%n==0}:function(t){return i.count(0,t)%n==0}):i:null}),i}var Ov=Bv((function(n){n.setMonth(0,1),n.setHours(0,0,0,0)}),(function(n,t){n.setFullYear(n.getFullYear()+t)}),(function(n,t){return t.getFullYear()-n.getFullYear()}),(function(n){return n.getFullYear()}));Ov.every=function(n){return isFinite(n=Math.floor(n))&&n>0?Bv((function(t){t.setFullYear(Math.floor(t.getFullYear()/n)*n),t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,e){t.setFullYear(t.getFullYear()+e*n)})):null};var Yv=Ov,Fv=Ov.range,Iv=Bv((function(n){n.setDate(1),n.setHours(0,0,0,0)}),(function(n,t){n.setMonth(n.getMonth()+t)}),(function(n,t){return t.getMonth()-n.getMonth()+12*(t.getFullYear()-n.getFullYear())}),(function(n){return n.getMonth()})),Hv=Iv,jv=Iv.range;function Xv(n){return Bv((function(t){t.setDate(t.getDate()-(t.getDay()+7-n)%7),t.setHours(0,0,0,0)}),(function(n,t){n.setDate(n.getDate()+7*t)}),(function(n,t){return(t-n-6e4*(t.getTimezoneOffset()-n.getTimezoneOffset()))/6048e5}))}var Vv=Xv(0),Gv=Xv(1),$v=Xv(2),Wv=Xv(3),Zv=Xv(4),Qv=Xv(5),Jv=Xv(6),Kv=Vv.range,ny=Gv.range,ty=$v.range,ey=Wv.range,ry=Zv.range,iy=Qv.range,uy=Jv.range,oy=Bv((function(n){n.setHours(0,0,0,0)}),(function(n,t){n.setDate(n.getDate()+t)}),(function(n,t){return(t-n-6e4*(t.getTimezoneOffset()-n.getTimezoneOffset()))/864e5}),(function(n){return n.getDate()-1})),ay=oy,cy=oy.range,fy=Bv((function(n){n.setTime(n-n.getMilliseconds()-1e3*n.getSeconds()-6e4*n.getMinutes())}),(function(n,t){n.setTime(+n+36e5*t)}),(function(n,t){return(t-n)/36e5}),(function(n){return n.getHours()})),sy=fy,ly=fy.range,hy=Bv((function(n){n.setTime(n-n.getMilliseconds()-1e3*n.getSeconds())}),(function(n,t){n.setTime(+n+6e4*t)}),(function(n,t){return(t-n)/6e4}),(function(n){return n.getMinutes()})),dy=hy,py=hy.range,vy=Bv((function(n){n.setTime(n-n.getMilliseconds())}),(function(n,t){n.setTime(+n+1e3*t)}),(function(n,t){return(t-n)/1e3}),(function(n){return n.getUTCSeconds()})),yy=vy,gy=vy.range,by=Bv((function(){}),(function(n,t){n.setTime(+n+t)}),(function(n,t){return t-n}));by.every=function(n){return n=Math.floor(n),isFinite(n)&&n>0?n>1?Bv((function(t){t.setTime(Math.floor(t/n)*n)}),(function(t,e){t.setTime(+t+e*n)}),(function(t,e){return(e-t)/n})):by:null};var _y=by,my=by.range;function xy(n){return Bv((function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-n)%7),t.setUTCHours(0,0,0,0)}),(function(n,t){n.setUTCDate(n.getUTCDate()+7*t)}),(function(n,t){return(t-n)/6048e5}))}var wy=xy(0),My=xy(1),Ny=xy(2),Sy=xy(3),Ty=xy(4),Ay=xy(5),ky=xy(6),Ey=wy.range,Cy=My.range,Py=Ny.range,zy=Sy.range,Ry=Ty.range,Dy=Ay.range,qy=ky.range,Ly=Bv((function(n){n.setUTCHours(0,0,0,0)}),(function(n,t){n.setUTCDate(n.getUTCDate()+t)}),(function(n,t){return(t-n)/864e5}),(function(n){return n.getUTCDate()-1})),Uy=Ly,By=Ly.range,Oy=Bv((function(n){n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)}),(function(n,t){n.setUTCFullYear(n.getUTCFullYear()+t)}),(function(n,t){return t.getUTCFullYear()-n.getUTCFullYear()}),(function(n){return n.getUTCFullYear()}));Oy.every=function(n){return isFinite(n=Math.floor(n))&&n>0?Bv((function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/n)*n),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e*n)})):null};var Yy=Oy,Fy=Oy.range;function Iy(n){if(0<=n.y&&n.y<100){var t=new Date(-1,n.m,n.d,n.H,n.M,n.S,n.L);return t.setFullYear(n.y),t}return new Date(n.y,n.m,n.d,n.H,n.M,n.S,n.L)}function Hy(n){if(0<=n.y&&n.y<100){var t=new Date(Date.UTC(-1,n.m,n.d,n.H,n.M,n.S,n.L));return t.setUTCFullYear(n.y),t}return new Date(Date.UTC(n.y,n.m,n.d,n.H,n.M,n.S,n.L))}function jy(n,t,e){return{y:n,m:t,d:e,H:0,M:0,S:0,L:0}}function Xy(n){var t=n.dateTime,e=n.date,r=n.time,i=n.periods,u=n.days,o=n.shortDays,a=n.months,c=n.shortMonths,f=rg(i),s=ig(i),l=rg(u),h=ig(u),d=rg(o),p=ig(o),v=rg(a),y=ig(a),g=rg(c),b=ig(c),_={a:function(n){return o[n.getDay()]},A:function(n){return u[n.getDay()]},b:function(n){return c[n.getMonth()]},B:function(n){return a[n.getMonth()]},c:null,d:Sg,e:Sg,f:Cg,g:Fg,G:Hg,H:Tg,I:Ag,j:kg,L:Eg,m:Pg,M:zg,p:function(n){return i[+(n.getHours()>=12)]},q:function(n){return 1+~~(n.getMonth()/3)},Q:hb,s:db,S:Rg,u:Dg,U:qg,V:Ug,w:Bg,W:Og,x:null,X:null,y:Yg,Y:Ig,Z:jg,"%":lb},m={a:function(n){return o[n.getUTCDay()]},A:function(n){return u[n.getUTCDay()]},b:function(n){return c[n.getUTCMonth()]},B:function(n){return a[n.getUTCMonth()]},c:null,d:Xg,e:Xg,f:Zg,g:ab,G:fb,H:Vg,I:Gg,j:$g,L:Wg,m:Qg,M:Jg,p:function(n){return i[+(n.getUTCHours()>=12)]},q:function(n){return 1+~~(n.getUTCMonth()/3)},Q:hb,s:db,S:Kg,u:nb,U:tb,V:rb,w:ib,W:ub,x:null,X:null,y:ob,Y:cb,Z:sb,"%":lb},x={a:function(n,t,e){var r=d.exec(t.slice(e));return r?(n.w=p[r[0].toLowerCase()],e+r[0].length):-1},A:function(n,t,e){var r=l.exec(t.slice(e));return r?(n.w=h[r[0].toLowerCase()],e+r[0].length):-1},b:function(n,t,e){var r=g.exec(t.slice(e));return r?(n.m=b[r[0].toLowerCase()],e+r[0].length):-1},B:function(n,t,e){var r=v.exec(t.slice(e));return r?(n.m=y[r[0].toLowerCase()],e+r[0].length):-1},c:function(n,e,r){return N(n,t,e,r)},d:vg,e:vg,f:xg,g:lg,G:sg,H:gg,I:gg,j:yg,L:mg,m:pg,M:bg,p:function(n,t,e){var r=f.exec(t.slice(e));return r?(n.p=s[r[0].toLowerCase()],e+r[0].length):-1},q:dg,Q:Mg,s:Ng,S:_g,u:og,U:ag,V:cg,w:ug,W:fg,x:function(n,t,r){return N(n,e,t,r)},X:function(n,t,e){return N(n,r,t,e)},y:lg,Y:sg,Z:hg,"%":wg};function w(n,t){return function(e){var r,i,u,o=[],a=-1,c=0,f=n.length;for(e instanceof Date||(e=new Date(+e));++a53)return null;"w"in u||(u.w=1),"Z"in u?(i=(r=Hy(jy(u.y,0,1))).getUTCDay(),r=i>4||0===i?My.ceil(r):My(r),r=Uy.offset(r,7*(u.V-1)),u.y=r.getUTCFullYear(),u.m=r.getUTCMonth(),u.d=r.getUTCDate()+(u.w+6)%7):(i=(r=Iy(jy(u.y,0,1))).getDay(),r=i>4||0===i?Gv.ceil(r):Gv(r),r=ay.offset(r,7*(u.V-1)),u.y=r.getFullYear(),u.m=r.getMonth(),u.d=r.getDate()+(u.w+6)%7)}else("W"in u||"U"in u)&&("w"in u||(u.w="u"in u?u.u%7:"W"in u?1:0),i="Z"in u?Hy(jy(u.y,0,1)).getUTCDay():Iy(jy(u.y,0,1)).getDay(),u.m=0,u.d="W"in u?(u.w+6)%7+7*u.W-(i+5)%7:u.w+7*u.U-(i+6)%7);return"Z"in u?(u.H+=u.Z/100|0,u.M+=u.Z%100,Hy(u)):Iy(u)}}function N(n,t,e,r){for(var i,u,o=0,a=t.length,c=e.length;o=c)return-1;if(37===(i=t.charCodeAt(o++))){if(i=t.charAt(o++),!(u=x[i in Qy?t.charAt(o++):i])||(r=u(n,e,r))<0)return-1}else if(i!=e.charCodeAt(r++))return-1}return r}return _.x=w(e,_),_.X=w(r,_),_.c=w(t,_),m.x=w(e,m),m.X=w(r,m),m.c=w(t,m),{format:function(n){var t=w(n+="",_);return t.toString=function(){return n},t},parse:function(n){var t=M(n+="",!1);return t.toString=function(){return n},t},utcFormat:function(n){var t=w(n+="",m);return t.toString=function(){return n},t},utcParse:function(n){var t=M(n+="",!0);return t.toString=function(){return n},t}}}var Vy,Gy,$y,Wy,Zy,Qy={"-":"",_:" ",0:"0"},Jy=/^\s*\d+/,Ky=/^%/,ng=/[\\^$*+?|[\]().{}]/g;function tg(n,t,e){var r=n<0?"-":"",i=(r?-n:n)+"",u=i.length;return r+(u68?1900:2e3),e+r[0].length):-1}function hg(n,t,e){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(e,e+6));return r?(n.Z=r[1]?0:-(r[2]+(r[3]||"00")),e+r[0].length):-1}function dg(n,t,e){var r=Jy.exec(t.slice(e,e+1));return r?(n.q=3*r[0]-3,e+r[0].length):-1}function pg(n,t,e){var r=Jy.exec(t.slice(e,e+2));return r?(n.m=r[0]-1,e+r[0].length):-1}function vg(n,t,e){var r=Jy.exec(t.slice(e,e+2));return r?(n.d=+r[0],e+r[0].length):-1}function yg(n,t,e){var r=Jy.exec(t.slice(e,e+3));return r?(n.m=0,n.d=+r[0],e+r[0].length):-1}function gg(n,t,e){var r=Jy.exec(t.slice(e,e+2));return r?(n.H=+r[0],e+r[0].length):-1}function bg(n,t,e){var r=Jy.exec(t.slice(e,e+2));return r?(n.M=+r[0],e+r[0].length):-1}function _g(n,t,e){var r=Jy.exec(t.slice(e,e+2));return r?(n.S=+r[0],e+r[0].length):-1}function mg(n,t,e){var r=Jy.exec(t.slice(e,e+3));return r?(n.L=+r[0],e+r[0].length):-1}function xg(n,t,e){var r=Jy.exec(t.slice(e,e+6));return r?(n.L=Math.floor(r[0]/1e3),e+r[0].length):-1}function wg(n,t,e){var r=Ky.exec(t.slice(e,e+1));return r?e+r[0].length:-1}function Mg(n,t,e){var r=Jy.exec(t.slice(e));return r?(n.Q=+r[0],e+r[0].length):-1}function Ng(n,t,e){var r=Jy.exec(t.slice(e));return r?(n.s=+r[0],e+r[0].length):-1}function Sg(n,t){return tg(n.getDate(),t,2)}function Tg(n,t){return tg(n.getHours(),t,2)}function Ag(n,t){return tg(n.getHours()%12||12,t,2)}function kg(n,t){return tg(1+ay.count(Yv(n),n),t,3)}function Eg(n,t){return tg(n.getMilliseconds(),t,3)}function Cg(n,t){return Eg(n,t)+"000"}function Pg(n,t){return tg(n.getMonth()+1,t,2)}function zg(n,t){return tg(n.getMinutes(),t,2)}function Rg(n,t){return tg(n.getSeconds(),t,2)}function Dg(n){var t=n.getDay();return 0===t?7:t}function qg(n,t){return tg(Vv.count(Yv(n)-1,n),t,2)}function Lg(n){var t=n.getDay();return t>=4||0===t?Zv(n):Zv.ceil(n)}function Ug(n,t){return n=Lg(n),tg(Zv.count(Yv(n),n)+(4===Yv(n).getDay()),t,2)}function Bg(n){return n.getDay()}function Og(n,t){return tg(Gv.count(Yv(n)-1,n),t,2)}function Yg(n,t){return tg(n.getFullYear()%100,t,2)}function Fg(n,t){return tg((n=Lg(n)).getFullYear()%100,t,2)}function Ig(n,t){return tg(n.getFullYear()%1e4,t,4)}function Hg(n,t){var e=n.getDay();return tg((n=e>=4||0===e?Zv(n):Zv.ceil(n)).getFullYear()%1e4,t,4)}function jg(n){var t=n.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+tg(t/60|0,"0",2)+tg(t%60,"0",2)}function Xg(n,t){return tg(n.getUTCDate(),t,2)}function Vg(n,t){return tg(n.getUTCHours(),t,2)}function Gg(n,t){return tg(n.getUTCHours()%12||12,t,2)}function $g(n,t){return tg(1+Uy.count(Yy(n),n),t,3)}function Wg(n,t){return tg(n.getUTCMilliseconds(),t,3)}function Zg(n,t){return Wg(n,t)+"000"}function Qg(n,t){return tg(n.getUTCMonth()+1,t,2)}function Jg(n,t){return tg(n.getUTCMinutes(),t,2)}function Kg(n,t){return tg(n.getUTCSeconds(),t,2)}function nb(n){var t=n.getUTCDay();return 0===t?7:t}function tb(n,t){return tg(wy.count(Yy(n)-1,n),t,2)}function eb(n){var t=n.getUTCDay();return t>=4||0===t?Ty(n):Ty.ceil(n)}function rb(n,t){return n=eb(n),tg(Ty.count(Yy(n),n)+(4===Yy(n).getUTCDay()),t,2)}function ib(n){return n.getUTCDay()}function ub(n,t){return tg(My.count(Yy(n)-1,n),t,2)}function ob(n,t){return tg(n.getUTCFullYear()%100,t,2)}function ab(n,t){return tg((n=eb(n)).getUTCFullYear()%100,t,2)}function cb(n,t){return tg(n.getUTCFullYear()%1e4,t,4)}function fb(n,t){var e=n.getUTCDay();return tg((n=e>=4||0===e?Ty(n):Ty.ceil(n)).getUTCFullYear()%1e4,t,4)}function sb(){return"+0000"}function lb(){return"%"}function hb(n){return+n}function db(n){return Math.floor(+n/1e3)}function pb(n){return Vy=Xy(n),Gy=Vy.format,$y=Vy.parse,Wy=Vy.utcFormat,Zy=Vy.utcParse,Vy}pb({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function vb(n){return new Date(n)}function yb(n){return n instanceof Date?+n:+new Date(+n)}function gb(n,t,e,r,i,o,a,c,f){var s=fv(ev,ev),l=s.invert,h=s.domain,d=f(".%L"),p=f(":%S"),v=f("%I:%M"),y=f("%I %p"),g=f("%a %d"),b=f("%b %d"),_=f("%B"),m=f("%Y"),x=[[a,1,1e3],[a,5,5e3],[a,15,15e3],[a,30,3e4],[o,1,6e4],[o,5,3e5],[o,15,9e5],[o,30,18e5],[i,1,36e5],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,864e5],[r,2,1728e5],[e,1,6048e5],[t,1,2592e6],[t,3,7776e6],[n,1,31536e6]];function w(u){return(a(u)1)&&(n-=Math.floor(n));var t=Math.abs(n-.5);return um.h=360*n-100,um.s=1.5-1.5*t,um.l=.8-.9*t,um+""},am=Wt(),cm=Math.PI/3,fm=2*Math.PI/3,sm=function(n){var t;return n=(.5-n)*Math.PI,am.r=255*(t=Math.sin(n))*t,am.g=255*(t=Math.sin(n+cm))*t,am.b=255*(t=Math.sin(n+fm))*t,am+""},lm=function(n){return n=Math.max(0,Math.min(1,n)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+n*(1172.33-n*(10793.56-n*(33300.12-n*(38394.49-14825.05*n)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+n*(557.33+n*(1225.33-n*(3574.96-n*(1073.77+707.56*n)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+n*(3211.1-n*(15327.97-n*(27814-n*(22569.18-6838.66*n)))))))+")"};function hm(n){var t=n.length;return function(e){return n[Math.max(0,Math.min(t-1,Math.floor(e*t)))]}}var dm=hm(Hb("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),pm=hm(Hb("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),vm=hm(Hb("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),ym=hm(Hb("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")),gm=function(n){return Nt(it(n).call(document.documentElement))},bm=0;function _m(){return new mm}function mm(){this._="@"+(++bm).toString(36)}mm.prototype=_m.prototype={constructor:mm,get:function(n){for(var t=this._;!(t in n);)if(!(n=n.parentNode))return;return n[t]},set:function(n,t){return n[this._]=t},remove:function(n){return this._ in n&&delete n[this._]},toString:function(){return this._}};var xm=function(n){return"string"==typeof n?new xt([document.querySelectorAll(n)],[document.documentElement]):new xt([null==n?[]:n],mt)},wm=function(n,t){null==t&&(t=Ce().touches);for(var e=0,r=t?t.length:0,i=new Array(r);e1?0:n<-1?Pm:Math.acos(n)}function qm(n){return n>=1?zm:n<=-1?-zm:Math.asin(n)}function Lm(n){return n.innerRadius}function Um(n){return n.outerRadius}function Bm(n){return n.startAngle}function Om(n){return n.endAngle}function Ym(n){return n&&n.padAngle}function Fm(n,t,e,r,i,u,o,a){var c=e-n,f=r-t,s=o-i,l=a-u,h=l*c-s*f;if(!(h*h<1e-12))return[n+(h=(s*(t-u)-l*(n-i))/h)*c,t+h*f]}function Im(n,t,e,r,i,u,o){var a=n-e,c=t-r,f=(o?u:-u)/Cm(a*a+c*c),s=f*c,l=-f*a,h=n+s,d=t+l,p=e+s,v=r+l,y=(h+p)/2,g=(d+v)/2,b=p-h,_=v-d,m=b*b+_*_,x=i-u,w=h*v-p*d,M=(_<0?-1:1)*Cm(Am(0,x*x*m-w*w)),N=(w*_-b*M)/m,S=(-w*b-_*M)/m,T=(w*_+b*M)/m,A=(-w*b+_*M)/m,k=N-y,E=S-g,C=T-y,P=A-g;return k*k+E*E>C*C+P*P&&(N=T,S=A),{cx:N,cy:S,x01:-s,y01:-l,x11:N*(i/x-1),y11:S*(i/x-1)}}var Hm=function(){var n=Lm,t=Um,e=Mm(0),r=null,i=Bm,u=Om,o=Ym,a=null;function c(){var c,f,s=+n.apply(this,arguments),l=+t.apply(this,arguments),h=i.apply(this,arguments)-zm,d=u.apply(this,arguments)-zm,p=Nm(d-h),v=d>h;if(a||(a=c=Vi()),l1e-12)if(p>Rm-1e-12)a.moveTo(l*Tm(h),l*Em(h)),a.arc(0,0,l,h,d,!v),s>1e-12&&(a.moveTo(s*Tm(d),s*Em(d)),a.arc(0,0,s,d,h,v));else{var y,g,b=h,_=d,m=h,x=d,w=p,M=p,N=o.apply(this,arguments)/2,S=N>1e-12&&(r?+r.apply(this,arguments):Cm(s*s+l*l)),T=km(Nm(l-s)/2,+e.apply(this,arguments)),A=T,k=T;if(S>1e-12){var E=qm(S/s*Em(N)),C=qm(S/l*Em(N));(w-=2*E)>1e-12?(m+=E*=v?1:-1,x-=E):(w=0,m=x=(h+d)/2),(M-=2*C)>1e-12?(b+=C*=v?1:-1,_-=C):(M=0,b=_=(h+d)/2)}var P=l*Tm(b),z=l*Em(b),R=s*Tm(x),D=s*Em(x);if(T>1e-12){var q,L=l*Tm(_),U=l*Em(_),B=s*Tm(m),O=s*Em(m);if(p1e-12?k>1e-12?(y=Im(B,O,P,z,l,k,v),g=Im(L,U,R,D,l,k,v),a.moveTo(y.cx+y.x01,y.cy+y.y01),k1e-12&&w>1e-12?A>1e-12?(y=Im(R,D,L,U,s,-A,v),g=Im(P,z,B,O,s,-A,v),a.lineTo(y.cx+y.x01,y.cy+y.y01),A=s;--l)a.point(y[l],g[l]);a.lineEnd(),a.areaEnd()}v&&(y[f]=+n(h,f,c),g[f]=+e(h,f,c),a.point(t?+t(h,f,c):y[f],r?+r(h,f,c):g[f]))}if(d)return a=null,d+""||null}function f(){return $m().defined(i).curve(o).context(u)}return c.x=function(e){return arguments.length?(n="function"==typeof e?e:Mm(+e),t=null,c):n},c.x0=function(t){return arguments.length?(n="function"==typeof t?t:Mm(+t),c):n},c.x1=function(n){return arguments.length?(t=null==n?null:"function"==typeof n?n:Mm(+n),c):t},c.y=function(n){return arguments.length?(e="function"==typeof n?n:Mm(+n),r=null,c):e},c.y0=function(n){return arguments.length?(e="function"==typeof n?n:Mm(+n),c):e},c.y1=function(n){return arguments.length?(r=null==n?null:"function"==typeof n?n:Mm(+n),c):r},c.lineX0=c.lineY0=function(){return f().x(n).y(e)},c.lineY1=function(){return f().x(n).y(r)},c.lineX1=function(){return f().x(t).y(e)},c.defined=function(n){return arguments.length?(i="function"==typeof n?n:Mm(!!n),c):i},c.curve=function(n){return arguments.length?(o=n,null!=u&&(a=o(u)),c):o},c.context=function(n){return arguments.length?(null==n?u=a=null:a=o(u=n),c):u},c},Zm=function(n,t){return tn?1:t>=n?0:NaN},Qm=function(n){return n},Jm=function(){var n=Qm,t=Zm,e=null,r=Mm(0),i=Mm(Rm),u=Mm(0);function o(o){var a,c,f,s,l,h=o.length,d=0,p=new Array(h),v=new Array(h),y=+r.apply(this,arguments),g=Math.min(Rm,Math.max(-Rm,i.apply(this,arguments)-y)),b=Math.min(Math.abs(g)/h,u.apply(this,arguments)),_=b*(g<0?-1:1);for(a=0;a0&&(d+=l);for(null!=t?p.sort((function(n,e){return t(v[n],v[e])})):null!=e&&p.sort((function(n,t){return e(o[n],o[t])})),a=0,f=d?(g-h*_)/d:0;a0?l*f:0)+_,v[c]={data:o[c],index:a,value:l,startAngle:y,endAngle:s,padAngle:b};return v}return o.value=function(t){return arguments.length?(n="function"==typeof t?t:Mm(+t),o):n},o.sortValues=function(n){return arguments.length?(t=n,e=null,o):t},o.sort=function(n){return arguments.length?(e=n,t=null,o):e},o.startAngle=function(n){return arguments.length?(r="function"==typeof n?n:Mm(+n),o):r},o.endAngle=function(n){return arguments.length?(i="function"==typeof n?n:Mm(+n),o):i},o.padAngle=function(n){return arguments.length?(u="function"==typeof n?n:Mm(+n),o):u},o},Km=tx(Xm);function nx(n){this._curve=n}function tx(n){function t(t){return new nx(n(t))}return t._curve=n,t}function ex(n){var t=n.curve;return n.angle=n.x,delete n.x,n.radius=n.y,delete n.y,n.curve=function(n){return arguments.length?t(tx(n)):t()._curve},n}nx.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(n,t){this._curve.point(t*Math.sin(n),t*-Math.cos(n))}};var rx=function(){return ex($m().curve(Km))},ix=function(){var n=Wm().curve(Km),t=n.curve,e=n.lineX0,r=n.lineX1,i=n.lineY0,u=n.lineY1;return n.angle=n.x,delete n.x,n.startAngle=n.x0,delete n.x0,n.endAngle=n.x1,delete n.x1,n.radius=n.y,delete n.y,n.innerRadius=n.y0,delete n.y0,n.outerRadius=n.y1,delete n.y1,n.lineStartAngle=function(){return ex(e())},delete n.lineX0,n.lineEndAngle=function(){return ex(r())},delete n.lineX1,n.lineInnerRadius=function(){return ex(i())},delete n.lineY0,n.lineOuterRadius=function(){return ex(u())},delete n.lineY1,n.curve=function(n){return arguments.length?t(tx(n)):t()._curve},n},ux=function(n,t){return[(t=+t)*Math.cos(n-=Math.PI/2),t*Math.sin(n)]},ox=Array.prototype.slice;function ax(n){return n.source}function cx(n){return n.target}function fx(n){var t=ax,e=cx,r=Vm,i=Gm,u=null;function o(){var o,a=ox.call(arguments),c=t.apply(this,a),f=e.apply(this,a);if(u||(u=o=Vi()),n(u,+r.apply(this,(a[0]=c,a)),+i.apply(this,a),+r.apply(this,(a[0]=f,a)),+i.apply(this,a)),o)return u=null,o+""||null}return o.source=function(n){return arguments.length?(t=n,o):t},o.target=function(n){return arguments.length?(e=n,o):e},o.x=function(n){return arguments.length?(r="function"==typeof n?n:Mm(+n),o):r},o.y=function(n){return arguments.length?(i="function"==typeof n?n:Mm(+n),o):i},o.context=function(n){return arguments.length?(u=null==n?null:n,o):u},o}function sx(n,t,e,r,i){n.moveTo(t,e),n.bezierCurveTo(t=(t+r)/2,e,t,i,r,i)}function lx(n,t,e,r,i){n.moveTo(t,e),n.bezierCurveTo(t,e=(e+i)/2,r,e,r,i)}function hx(n,t,e,r,i){var u=ux(t,e),o=ux(t,e=(e+i)/2),a=ux(r,e),c=ux(r,i);n.moveTo(u[0],u[1]),n.bezierCurveTo(o[0],o[1],a[0],a[1],c[0],c[1])}function dx(){return fx(sx)}function px(){return fx(lx)}function vx(){var n=fx(hx);return n.angle=n.x,delete n.x,n.radius=n.y,delete n.y,n}var yx={draw:function(n,t){var e=Math.sqrt(t/Pm);n.moveTo(e,0),n.arc(0,0,e,0,Rm)}},gx={draw:function(n,t){var e=Math.sqrt(t/5)/2;n.moveTo(-3*e,-e),n.lineTo(-e,-e),n.lineTo(-e,-3*e),n.lineTo(e,-3*e),n.lineTo(e,-e),n.lineTo(3*e,-e),n.lineTo(3*e,e),n.lineTo(e,e),n.lineTo(e,3*e),n.lineTo(-e,3*e),n.lineTo(-e,e),n.lineTo(-3*e,e),n.closePath()}},bx=Math.sqrt(1/3),_x=2*bx,mx={draw:function(n,t){var e=Math.sqrt(t/_x),r=e*bx;n.moveTo(0,-e),n.lineTo(r,0),n.lineTo(0,e),n.lineTo(-r,0),n.closePath()}},xx=Math.sin(Pm/10)/Math.sin(7*Pm/10),wx=Math.sin(Rm/10)*xx,Mx=-Math.cos(Rm/10)*xx,Nx={draw:function(n,t){var e=Math.sqrt(.8908130915292852*t),r=wx*e,i=Mx*e;n.moveTo(0,-e),n.lineTo(r,i);for(var u=1;u<5;++u){var o=Rm*u/5,a=Math.cos(o),c=Math.sin(o);n.lineTo(c*e,-a*e),n.lineTo(a*r-c*i,c*r+a*i)}n.closePath()}},Sx={draw:function(n,t){var e=Math.sqrt(t),r=-e/2;n.rect(r,r,e,e)}},Tx=Math.sqrt(3),Ax={draw:function(n,t){var e=-Math.sqrt(t/(3*Tx));n.moveTo(0,2*e),n.lineTo(-Tx*e,-e),n.lineTo(Tx*e,-e),n.closePath()}},kx=Math.sqrt(3)/2,Ex=1/Math.sqrt(12),Cx=3*(Ex/2+1),Px={draw:function(n,t){var e=Math.sqrt(t/Cx),r=e/2,i=e*Ex,u=r,o=e*Ex+e,a=-u,c=o;n.moveTo(r,i),n.lineTo(u,o),n.lineTo(a,c),n.lineTo(-.5*r-kx*i,kx*r+-.5*i),n.lineTo(-.5*u-kx*o,kx*u+-.5*o),n.lineTo(-.5*a-kx*c,kx*a+-.5*c),n.lineTo(-.5*r+kx*i,-.5*i-kx*r),n.lineTo(-.5*u+kx*o,-.5*o-kx*u),n.lineTo(-.5*a+kx*c,-.5*c-kx*a),n.closePath()}},zx=[yx,gx,mx,Sx,Nx,Ax,Px],Rx=function(){var n=Mm(yx),t=Mm(64),e=null;function r(){var r;if(e||(e=r=Vi()),n.apply(this,arguments).draw(e,+t.apply(this,arguments)),r)return e=null,r+""||null}return r.type=function(t){return arguments.length?(n="function"==typeof t?t:Mm(t),r):n},r.size=function(n){return arguments.length?(t="function"==typeof n?n:Mm(+n),r):t},r.context=function(n){return arguments.length?(e=null==n?null:n,r):e},r},Dx=function(){};function qx(n,t,e){n._context.bezierCurveTo((2*n._x0+n._x1)/3,(2*n._y0+n._y1)/3,(n._x0+2*n._x1)/3,(n._y0+2*n._y1)/3,(n._x0+4*n._x1+t)/6,(n._y0+4*n._y1+e)/6)}function Lx(n){this._context=n}Lx.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:qx(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(n,t){switch(n=+n,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(n,t):this._context.moveTo(n,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:qx(this,n,t)}this._x0=this._x1,this._x1=n,this._y0=this._y1,this._y1=t}};var Ux=function(n){return new Lx(n)};function Bx(n){this._context=n}Bx.prototype={areaStart:Dx,areaEnd:Dx,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(n,t){switch(n=+n,t=+t,this._point){case 0:this._point=1,this._x2=n,this._y2=t;break;case 1:this._point=2,this._x3=n,this._y3=t;break;case 2:this._point=3,this._x4=n,this._y4=t,this._context.moveTo((this._x0+4*this._x1+n)/6,(this._y0+4*this._y1+t)/6);break;default:qx(this,n,t)}this._x0=this._x1,this._x1=n,this._y0=this._y1,this._y1=t}};var Ox=function(n){return new Bx(n)};function Yx(n){this._context=n}Yx.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(n,t){switch(n=+n,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var e=(this._x0+4*this._x1+n)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(e,r):this._context.moveTo(e,r);break;case 3:this._point=4;default:qx(this,n,t)}this._x0=this._x1,this._x1=n,this._y0=this._y1,this._y1=t}};var Fx=function(n){return new Yx(n)};function Ix(n,t){this._basis=new Lx(n),this._beta=t}Ix.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var n=this._x,t=this._y,e=n.length-1;if(e>0)for(var r,i=n[0],u=t[0],o=n[e]-i,a=t[e]-u,c=-1;++c<=e;)r=c/e,this._basis.point(this._beta*n[c]+(1-this._beta)*(i+r*o),this._beta*t[c]+(1-this._beta)*(u+r*a));this._x=this._y=null,this._basis.lineEnd()},point:function(n,t){this._x.push(+n),this._y.push(+t)}};var Hx=function n(t){function e(n){return 1===t?new Lx(n):new Ix(n,t)}return e.beta=function(t){return n(+t)},e}(.85);function jx(n,t,e){n._context.bezierCurveTo(n._x1+n._k*(n._x2-n._x0),n._y1+n._k*(n._y2-n._y0),n._x2+n._k*(n._x1-t),n._y2+n._k*(n._y1-e),n._x2,n._y2)}function Xx(n,t){this._context=n,this._k=(1-t)/6}Xx.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:jx(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(n,t){switch(n=+n,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(n,t):this._context.moveTo(n,t);break;case 1:this._point=2,this._x1=n,this._y1=t;break;case 2:this._point=3;default:jx(this,n,t)}this._x0=this._x1,this._x1=this._x2,this._x2=n,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Vx=function n(t){function e(n){return new Xx(n,t)}return e.tension=function(t){return n(+t)},e}(0);function Gx(n,t){this._context=n,this._k=(1-t)/6}Gx.prototype={areaStart:Dx,areaEnd:Dx,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(n,t){switch(n=+n,t=+t,this._point){case 0:this._point=1,this._x3=n,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=n,this._y4=t);break;case 2:this._point=3,this._x5=n,this._y5=t;break;default:jx(this,n,t)}this._x0=this._x1,this._x1=this._x2,this._x2=n,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var $x=function n(t){function e(n){return new Gx(n,t)}return e.tension=function(t){return n(+t)},e}(0);function Wx(n,t){this._context=n,this._k=(1-t)/6}Wx.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(n,t){switch(n=+n,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:jx(this,n,t)}this._x0=this._x1,this._x1=this._x2,this._x2=n,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Zx=function n(t){function e(n){return new Wx(n,t)}return e.tension=function(t){return n(+t)},e}(0);function Qx(n,t,e){var r=n._x1,i=n._y1,u=n._x2,o=n._y2;if(n._l01_a>1e-12){var a=2*n._l01_2a+3*n._l01_a*n._l12_a+n._l12_2a,c=3*n._l01_a*(n._l01_a+n._l12_a);r=(r*a-n._x0*n._l12_2a+n._x2*n._l01_2a)/c,i=(i*a-n._y0*n._l12_2a+n._y2*n._l01_2a)/c}if(n._l23_a>1e-12){var f=2*n._l23_2a+3*n._l23_a*n._l12_a+n._l12_2a,s=3*n._l23_a*(n._l23_a+n._l12_a);u=(u*f+n._x1*n._l23_2a-t*n._l12_2a)/s,o=(o*f+n._y1*n._l23_2a-e*n._l12_2a)/s}n._context.bezierCurveTo(r,i,u,o,n._x2,n._y2)}function Jx(n,t){this._context=n,this._alpha=t}Jx.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(n,t){if(n=+n,t=+t,this._point){var e=this._x2-n,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(n,t):this._context.moveTo(n,t);break;case 1:this._point=2;break;case 2:this._point=3;default:Qx(this,n,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=n,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Kx=function n(t){function e(n){return t?new Jx(n,t):new Xx(n,0)}return e.alpha=function(t){return n(+t)},e}(.5);function nw(n,t){this._context=n,this._alpha=t}nw.prototype={areaStart:Dx,areaEnd:Dx,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(n,t){if(n=+n,t=+t,this._point){var e=this._x2-n,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=n,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=n,this._y4=t);break;case 2:this._point=3,this._x5=n,this._y5=t;break;default:Qx(this,n,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=n,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var tw=function n(t){function e(n){return t?new nw(n,t):new Gx(n,0)}return e.alpha=function(t){return n(+t)},e}(.5);function ew(n,t){this._context=n,this._alpha=t}ew.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(n,t){if(n=+n,t=+t,this._point){var e=this._x2-n,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Qx(this,n,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=n,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var rw=function n(t){function e(n){return t?new ew(n,t):new Wx(n,0)}return e.alpha=function(t){return n(+t)},e}(.5);function iw(n){this._context=n}iw.prototype={areaStart:Dx,areaEnd:Dx,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(n,t){n=+n,t=+t,this._point?this._context.lineTo(n,t):(this._point=1,this._context.moveTo(n,t))}};var uw=function(n){return new iw(n)};function ow(n){return n<0?-1:1}function aw(n,t,e){var r=n._x1-n._x0,i=t-n._x1,u=(n._y1-n._y0)/(r||i<0&&-0),o=(e-n._y1)/(i||r<0&&-0),a=(u*i+o*r)/(r+i);return(ow(u)+ow(o))*Math.min(Math.abs(u),Math.abs(o),.5*Math.abs(a))||0}function cw(n,t){var e=n._x1-n._x0;return e?(3*(n._y1-n._y0)/e-t)/2:t}function fw(n,t,e){var r=n._x0,i=n._y0,u=n._x1,o=n._y1,a=(u-r)/3;n._context.bezierCurveTo(r+a,i+a*t,u-a,o-a*e,u,o)}function sw(n){this._context=n}function lw(n){this._context=new hw(n)}function hw(n){this._context=n}function dw(n){return new sw(n)}function pw(n){return new lw(n)}function vw(n){this._context=n}function yw(n){var t,e,r=n.length-1,i=new Array(r),u=new Array(r),o=new Array(r);for(i[0]=0,u[0]=2,o[0]=n[0]+2*n[1],t=1;t=0;--t)i[t]=(o[t]-i[t+1])/u[t];for(u[r-1]=(n[r]+i[r-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(n,t){switch(n=+n,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(n,t):this._context.moveTo(n,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(n,t);else{var e=this._x*(1-this._t)+n*this._t;this._context.lineTo(e,this._y),this._context.lineTo(e,t)}}this._x=n,this._y=t}};var _w=function(n){return new bw(n,.5)};function mw(n){return new bw(n,0)}function xw(n){return new bw(n,1)}var ww=function(n,t){if((i=n.length)>1)for(var e,r,i,u=1,o=n[t[0]],a=o.length;u=0;)e[t]=t;return e};function Nw(n,t){return n[t]}var Sw=function(){var n=Mm([]),t=Mw,e=ww,r=Nw;function i(i){var u,o,a=n.apply(this,arguments),c=i.length,f=a.length,s=new Array(f);for(u=0;u0){for(var e,r,i,u=0,o=n[0].length;u0)for(var e,r,i,u,o,a,c=0,f=n[t[0]].length;c0?(r[0]=u,r[1]=u+=i):i<0?(r[1]=o,r[0]=o+=i):(r[0]=0,r[1]=i)},kw=function(n,t){if((e=n.length)>0){for(var e,r=0,i=n[t[0]],u=i.length;r0&&(r=(e=n[t[0]]).length)>0){for(var e,r,i,u=0,o=1;ou&&(u=t,r=e);return r}var zw=function(n){var t=n.map(Rw);return Mw(n).sort((function(n,e){return t[n]-t[e]}))};function Rw(n){for(var t,e=0,r=-1,i=n.length;++r0)){if(u/=h,h<0){if(u0){if(u>l)return;u>s&&(s=u)}if(u=r-c,h||!(u<0)){if(u/=h,h<0){if(u>l)return;u>s&&(s=u)}else if(h>0){if(u0)){if(u/=d,d<0){if(u0){if(u>l)return;u>s&&(s=u)}if(u=i-f,d||!(u<0)){if(u/=d,d<0){if(u>l)return;u>s&&(s=u)}else if(d>0){if(u0||l<1)||(s>0&&(n[0]=[c+s*h,f+s*d]),l<1&&(n[1]=[c+l*h,f+l*d]),!0)}}}}}function Kw(n,t,e,r,i){var u=n[1];if(u)return!0;var o,a,c=n[0],f=n.left,s=n.right,l=f[0],h=f[1],d=s[0],p=s[1],v=(l+d)/2,y=(h+p)/2;if(p===h){if(v=r)return;if(l>d){if(c){if(c[1]>=i)return}else c=[v,e];u=[v,i]}else{if(c){if(c[1]1)if(l>d){if(c){if(c[1]>=i)return}else c=[(e-a)/o,e];u=[(i-a)/o,i]}else{if(c){if(c[1]=r)return}else c=[t,o*t+a];u=[r,o*r+a]}else{if(c){if(c[0]=-xM)){var d=c*c+f*f,p=s*s+l*l,v=(l*d-f*p)/h,y=(c*p-s*d)/h,g=iM.pop()||new uM;g.arc=n,g.site=i,g.x=v+o,g.y=(g.cy=y+a)+Math.sqrt(v*v+y*y),n.circle=g;for(var b=null,_=bM._;_;)if(g.y<_.y||g.y===_.y&&g.x<=_.x){if(!_.L){b=_.P;break}_=_.L}else{if(!_.R){b=_;break}_=_.R}bM.insert(b,g),b||(rM=g)}}}}function aM(n){var t=n.circle;t&&(t.P||(rM=t.N),bM.remove(t),iM.push(t),jw(t),n.circle=null)}var cM=[];function fM(){jw(this),this.edge=this.site=this.circle=null}function sM(n){var t=cM.pop()||new fM;return t.site=n,t}function lM(n){aM(n),yM.remove(n),cM.push(n),jw(n)}function hM(n){var t=n.circle,e=t.x,r=t.cy,i=[e,r],u=n.P,o=n.N,a=[n];lM(n);for(var c=u;c.circle&&Math.abs(e-c.circle.x)mM)a=a.L;else{if(!((i=u-vM(a,o))>mM)){r>-mM?(t=a.P,e=a):i>-mM?(t=a,e=a.N):t=e=a;break}if(!a.R){t=a;break}a=a.R}!function(n){gM[n.index]={site:n,halfedges:[]}}(n);var c=sM(n);if(yM.insert(t,c),t||e){if(t===e)return aM(t),e=sM(t.site),yM.insert(c,e),c.edge=e.edge=Ww(t.site,c.site),oM(t),void oM(e);if(e){aM(t),aM(e);var f=t.site,s=f[0],l=f[1],h=n[0]-s,d=n[1]-l,p=e.site,v=p[0]-s,y=p[1]-l,g=2*(h*y-d*v),b=h*h+d*d,_=v*v+y*y,m=[(y*b-d*_)/g+s,(h*_-v*b)/g+l];Qw(e.edge,f,p,m),c.edge=Ww(f,n,null,m),e.edge=Ww(n,p,null,m),oM(t),oM(e)}else c.edge=Ww(t.site,c.site)}}function pM(n,t){var e=n.site,r=e[0],i=e[1],u=i-t;if(!u)return r;var o=n.P;if(!o)return-1/0;var a=(e=o.site)[0],c=e[1],f=c-t;if(!f)return a;var s=a-r,l=1/u-1/f,h=s/f;return l?(-h+Math.sqrt(h*h-2*l*(s*s/(-2*f)-c+f/2+i-u/2)))/l+r:(r+a)/2}function vM(n,t){var e=n.N;if(e)return pM(e,t);var r=n.site;return r[1]===t?r[0]:1/0}var yM,gM,bM,_M,mM=1e-6,xM=1e-12;function wM(n,t){return t[1]-n[1]||t[0]-n[0]}function MM(n,t){var e,r,i,u=n.sort(wM).pop();for(_M=[],gM=new Array(n.length),yM=new $w,bM=new $w;;)if(i=rM,u&&(!i||u[1]mM||Math.abs(i[0][1]-i[1][1])>mM)||delete _M[u]}(o,a,c,f),function(n,t,e,r){var i,u,o,a,c,f,s,l,h,d,p,v,y=gM.length,g=!0;for(i=0;imM||Math.abs(v-h)>mM)&&(c.splice(a,0,_M.push(Zw(o,d,Math.abs(p-n)mM?[n,Math.abs(l-n)mM?[Math.abs(h-r)mM?[e,Math.abs(l-e)mM?[Math.abs(h-t)=a)return null;var c=n-i.site[0],f=t-i.site[1],s=c*c+f*f;do{i=u.cells[r=o],o=null,i.halfedges.forEach((function(e){var r=u.edges[e],a=r.left;if(a!==i.site&&a||(a=r.right)){var c=n-a[0],f=t-a[1],l=c*c+f*f;lr?(r+i)/2:Math.min(0,r)||Math.max(0,i),o>u?(u+o)/2:Math.min(0,u)||Math.max(0,o))}var BM=function(){var n,t,e=zM,r=RM,i=UM,u=qM,o=LM,a=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],f=250,s=gp,l=hn("start","zoom","end"),h=0;function d(n){n.property("__zoom",DM).on("wheel.zoom",m).on("mousedown.zoom",x).on("dblclick.zoom",w).filter(o).on("touchstart.zoom",M).on("touchmove.zoom",N).on("touchend.zoom touchcancel.zoom",S).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(n,t){return(t=Math.max(a[0],Math.min(a[1],t)))===n.k?n:new AM(t,n.x,n.y)}function v(n,t,e){var r=t[0]-e[0]*n.k,i=t[1]-e[1]*n.k;return r===n.x&&i===n.y?n:new AM(n.k,r,i)}function y(n){return[(+n[0][0]+ +n[1][0])/2,(+n[0][1]+ +n[1][1])/2]}function g(n,t,e){n.on("start.zoom",(function(){b(this,arguments).start()})).on("interrupt.zoom end.zoom",(function(){b(this,arguments).end()})).tween("zoom",(function(){var n=this,i=arguments,u=b(n,i),o=r.apply(n,i),a=null==e?y(o):"function"==typeof e?e.apply(n,i):e,c=Math.max(o[1][0]-o[0][0],o[1][1]-o[0][1]),f=n.__zoom,l="function"==typeof t?t.apply(n,i):t,h=s(f.invert(a).concat(c/f.k),l.invert(a).concat(c/l.k));return function(n){if(1===n)n=l;else{var t=h(n),e=c/t[2];n=new AM(e,a[0]-t[0]*e,a[1]-t[1]*e)}u.zoom(null,n)}}))}function b(n,t,e){return!e&&n.__zooming||new _(n,t)}function _(n,t){this.that=n,this.args=t,this.active=0,this.extent=r.apply(n,t),this.taps=0}function m(){if(e.apply(this,arguments)){var n=b(this,arguments),t=this.__zoom,r=Math.max(a[0],Math.min(a[1],t.k*Math.pow(2,u.apply(this,arguments)))),o=Re(this);if(n.wheel)n.mouse[0][0]===o[0]&&n.mouse[0][1]===o[1]||(n.mouse[1]=t.invert(n.mouse[0]=o)),clearTimeout(n.wheel);else{if(t.k===r)return;n.mouse=[o,t.invert(o)],sr(this),n.start()}PM(),n.wheel=setTimeout(f,150),n.zoom("mouse",i(v(p(t,r),n.mouse[0],n.mouse[1]),n.extent,c))}function f(){n.wheel=null,n.end()}}function x(){if(!t&&e.apply(this,arguments)){var n=b(this,arguments,!0),r=Nt(st.view).on("mousemove.zoom",f,!0).on("mouseup.zoom",s,!0),u=Re(this),o=st.clientX,a=st.clientY;At(st.view),CM(),n.mouse=[u,this.__zoom.invert(u)],sr(this),n.start()}function f(){if(PM(),!n.moved){var t=st.clientX-o,e=st.clientY-a;n.moved=t*t+e*e>h}n.zoom("mouse",i(v(n.that.__zoom,n.mouse[0]=Re(n.that),n.mouse[1]),n.extent,c))}function s(){r.on("mousemove.zoom mouseup.zoom",null),kt(st.view,n.moved),PM(),n.end()}}function w(){if(e.apply(this,arguments)){var n=this.__zoom,t=Re(this),u=n.invert(t),o=n.k*(st.shiftKey?.5:2),a=i(v(p(n,o),t,u),r.apply(this,arguments),c);PM(),f>0?Nt(this).transition().duration(f).call(g,a,t):Nt(this).call(d.transform,a)}}function M(){if(e.apply(this,arguments)){var t,r,i,u,o=st.touches,a=o.length,c=b(this,arguments,st.changedTouches.length===a);for(CM(),r=0;r-1};var s=function(t,n){var r=this.__data__,o=u(r,t);return o<0?(++this.size,r.push([t,n])):r[o][1]=n,this};function l(t){var n=-1,r=null==t?0:t.length;for(this.clear();++n-1&&t%1==0&&t<=9007199254740991}},913:function(t,n,r){"use strict";var o=r(744),e=Object(o.a)(Object,"create");var u=function(){this.__data__=e?e(null):{},this.size=0};var i=function(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n},c=Object.prototype.hasOwnProperty;var a=function(t){var n=this.__data__;if(e){var r=n[t];return"__lodash_hash_undefined__"===r?void 0:r}return c.call(n,t)?n[t]:void 0},f=Object.prototype.hasOwnProperty;var s=function(t){var n=this.__data__;return e?void 0!==n[t]:f.call(n,t)};var l=function(t,n){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=e&&void 0===n?"__lodash_hash_undefined__":n,this};function y(t){var n=-1,r=null==t?0:t.length;for(this.clear();++nprotvista-track\n

Published on NPM

\n

The protvista-track component is used to display protein features. These features have start and end positions (these can be the same if the feature only spans one amino-acid), a specific shape (rectangle is the default) and a colour. Features are passed through the data property. You can specify shapes and colours at an instance level (through a property) or individually in the feature data (see data below). In order to establish the scale, it is necessary to set the length property (length of the protein sequence in amino-acids).

\n

As protvista-track inherits from protvista-zoomable, it will respond to zooming changes, highlight events and emit events when interacting with features (helpful if you want to display tooltips).

\n

Loading data can be done directly through the data property, or through the use of a load event emitted by one of protvista-track's children (e.g. a data adapter with data-loader).

\n

There are two types of display available for protvista-track:

\n
    \n
  • overlapping will display all the features on one single line. This means that if a feature overlaps another one, it will be indistinguishable. This layout can be useful to display an overview, or when the data is very dense.
  • \n
  • non-overlapping will calculate the best vertical positions for each feature so that they don't overlap.
  • \n
\n

Demo

\n

Usage

\n
<protvista-track length="456" />
\n

Setting the data through property

\n
const track = document.querySelector('#my-track-id');\ntrack.data = myDataObject

Setting data through <data-loader>

\n
<protvista-track length="770">\n    <protvista-feature-adapter id="adapter1">\n        <data-loader>\n          <source src="https://www.ebi.ac.uk/proteins/api/features/P05067?categories=PTM" />\n        </data-loader>\n    </protvista-feature-adapter>\n</protvista-track>

API Reference

\n

Properties

\n

length: number

\n

The protein or nucleic acid sequence length.

\n

data: Array

\n

Array items take the following shape:

\n
{\n    accession: String,\n    start: Number,\n    end: Number,\n    color?: String,\n    shape?: rectangle|bridge|diamond|chevron|catFace|triangle|wave|hexagon|pentagon|circle|arrow|doubleBar,\n    tooltipContent?: String\n    locations: [\n        {\n            fragments: [\n                {\n                    start: Number,\n                    end: Number\n                }\n            ]\n        }\n    ]\n}
\n

Note: locations is an alternative to start-stop attributes, that expresses that a feature can appear in several locations, and also supports the idea of discontinuous features, by allowing to have fragments.

\n

So for example a single continuous feature, that only appears once can be represented in 2 ways. The classic {accession:'X', start:2, end:4} or a more verbose version: {accession:'X', locations: [{fragments: [{start:2, end:4}]}]} an both should generate a track like this:

\n
-XXX------

If the same feature appears in 2 places in the sequence, it can be represented using locations:

\n
{\n    accession: 'Y',\n    locations: [\n        {fragments: [{start:2, end:4}]},\n        {fragments: [{start:7, end:9}]}\n    ]\n}
\n

To generate a track like

\n
-YYY--YYY-

Finally a feature can also be discontinuous, to repesent this in our data we use fragments:

\n
{\n    accession: 'Z',\n    locations: [\n        {fragments: [\n            {start:2, end:4},\n            {start:7, end:9}]\n        }\n    ]\n}
\n

This expresses that the same instance of the feature Z is split in 2 fragments, from 2 to 4 and from 7 to 9. Which could be represented as

\n
-ZZZ==ZZZ-

layout?: overlapping(default)|non-overlapping(optional)

\n

The track layout. Non-overlapping uses a bumping algorhithm to make sure none of the features overlapp.

\n

shape?: see above

\n

Shape of all features within the track

\n

color?: see above

\n

Colour of all features within the track

\n

also see protvista-zoomable

\n'},1074:function(t){t.exports=JSON.parse('[{"accession":"feature1","start":1,"end":3,"color":"#339"},{"accession":"feature5","start":1,"end":3,"color":"#63e"},{"accession":"feature6","start":1,"end":3,"color":"#35d","shape":"rectangle"},{"accession":"feature6_2","start":1,"end":3,"color":"#35d","shape":"line"},{"accession":"feature7","start":2,"end":2,"color":"#3a3","shape":"bridge"},{"accession":"feature8","start":1,"end":2,"color":"#3a3","shape":"bridge"},{"accession":"feature9","start":2,"end":2,"color":"#33d","shape":"diamond"},{"accession":"feature10","start":2,"end":3,"color":"#33d","shape":"diamond"},{"accession":"feature11","start":2,"end":2,"color":"#3a3","shape":"chevron"},{"accession":"feature12","start":1,"end":2,"color":"#3a3","shape":"chevron"},{"accession":"feature13","start":2,"end":2,"color":"#d3d","shape":"catFace"},{"accession":"feature14","start":2,"end":3,"color":"#d3d","shape":"catFace"},{"accession":"feature15","start":2,"end":2,"color":"#3a3","shape":"triangle"},{"accession":"feature16","start":1,"end":2,"color":"#3a3","shape":"triangle"},{"accession":"feature17","start":2,"end":2,"color":"#d3d","shape":"wave"},{"accession":"feature18","start":2,"end":3,"color":"#d3d","shape":"wave"},{"accession":"feature15","start":2,"end":2,"color":"#3a3","shape":"hexagon"},{"accession":"feature16","start":1,"end":2,"color":"#3a3","shape":"hexagon"},{"accession":"feature17","start":2,"end":2,"color":"#d3d","shape":"pentagon"},{"accession":"feature18","start":2,"end":3,"color":"#d3d","shape":"pentagon"},{"accession":"feature19","start":2,"end":2,"color":"#3a3","shape":"circle"},{"accession":"feature20","start":1,"end":2,"color":"#3a3","shape":"circle"},{"accession":"feature21","start":2,"end":2,"color":"#d3d","shape":"arrow"},{"accession":"feature22","start":2,"end":3,"color":"#d3d","shape":"arrow"},{"accession":"feature19","start":2,"end":2,"color":"#3a3","shape":"doubleBar"},{"accession":"feature20","start":1,"end":2,"color":"#3a3","shape":"doubleBar"},{"accession":"feature21","start":1,"end":2,"color":"#f06","shape":"helix","fill":"transparent"},{"accession":"feature22","start":2,"end":2,"color":"#fc0","shape":"strand"}]')},166:function(t,e,n){"use strict";n.r(e);var r=n(0),o=n.n(r),i=n(629),a=n(620),c=n(603),s=n(111),l=n(35),u=n(1073),h=n.n(u),f=n(771),p=n(1074),d=n(871);function g(t){return(g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function m(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function y(t,e){for(var n=0;nt.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&void 0!==arguments[0]?arguments[0]:{},n=e.min,r=void 0===n?-1/0:n,o=e.max,a=void 0===o?1/0:o;i(this,t),this.segments=[],this.max=a,this.min=r,this.regionString=null}var e,n,o;return e=t,(n=[{key:"encode",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.segments.map((function(n){var r=n.start,o=n.end,i=n.color;if(e)return"".concat(r,":").concat(o).concat(i?":".concat(i):"");var a=r===t.min?"":r,c=o===t.max?"":o;return"".concat(a,":").concat(c).concat(i?":".concat(i):"")})).join(",")}},{key:"decode",value:function(t){var e=this;void 0!==t&&(this.regionString=t),this.regionString?this.segments=this.regionString.split(",").map((function(t){var n=r(t.split(":"),4),o=n[0],i=n[1],a=n[2];if(void 0!==n[3])throw new Error("there should be at most 2 ':' per region. Region: ".concat(t));var c=o?Number(o):e.min,s=i?Number(i):e.max,l=""!==a?a:void 0;if(c>s){var u=[s,c];c=u[0],s=u[1]}if(ce.max&&(s=e.max),Number.isNaN(c))throw new Error("The parsed value of ".concat(o," is NaN. Region: ").concat(t));if(Number.isNaN(s))throw new Error("The parsed value of ".concat(i," is NaN. Region: ").concat(t));if(l&&!l.match(/^#[0-9a-f]{6,8}$/i))throw new Error("The parsed value of ".concat(a," is not a color in hex format. Region: ").concat(t));return{start:c,end:s,color:l}})):this.segments=[]}}])&&a(e.prototype,n),o&&a(e,o),t}();function s(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:400;p(this,t),this.element=e,this.timeStampWheelOutside=0,this.resetScrollableTimeout=null,this.scrollDelay=n}var e,n,r;return e=t,(n=[{key:"setElementScrollable",value:function(t){this.element.setAttribute("scrollable",t)}},{key:"startResetScrollableTimer",value:function(){var t=this;this.resetScrollableTimeout&&clearTimeout(this.resetScrollableTimeout),this.resetScrollableTimeout=setTimeout((function(){t.setElementScrollable(!0),t.resetScrollableTimeout=null}),this.scrollDelay)}},{key:"blockScroll",value:function(t){this.timeStampWheelOutside=t,this.setElementScrollable(!1),this.startResetScrollableTimer()}},{key:"wheel",value:function(t){var e=t.target,n=t.timeStamp;this.element.contains(e)?n=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){c=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw i}}}}function b(t){return function(t){if(Array.isArray(t))return _(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||v(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(t,e){if(t){if("string"==typeof t)return _(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_(t,e):void 0}}function _(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&void 0!==arguments[0]?arguments[0]:null,e=[],n=[];if(null!==t&&"string"!=typeof t)throw new Error("The attribute text has to be of type string");if(t&&""!==t.trim()){var r=t.split(",").map((function(t){return t.split(":")}));if(r.length<2)throw new Error("There should be at least 2 points to create a scale");e=r.map((function(t){var e=t[0].trim().toUpperCase();if(!h(e))throw new Error("The color '".concat(e," is not valid'"));return e})),n=r.map((function(t,e){var n=parseFloat(t[1]);if(Number.isNaN(n))throw new Error("The second part of every point should be a number. Error in point ".concat(e,": ").concat(t));return n}))}return{range:e,domain:n}},R=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.keyFormatter,r=void 0===n?f:n,o=e.valueFormatter,i=void 0===o?f:o;if(null!==t&&"string"!=typeof t)throw new Error("The attribute text has to be of type string");if(t&&""!==t.trim()){var a=t.split(",").map((function(t){return t.split(":")})),c={};return a.forEach((function(t){if(2!==t.length)throw new Error("Bad block: ".concat(t.join(":"),"\n The blocks of the string should follow the format KEY:VALUE"));c[r(t[0])]=i(t[1])})),c}return{}},N=g,D=function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{initialValue:{top:0,bottom:0,left:0,right:0}},r=function(t){E(r,t);var e=A(r);function r(){var t;return w(this,r),(t=e.call(this)).margin=n.initialValue,t}return k(r,[{key:"attributeChangedCallback",value:function(t,e,n){e!==n&&F.includes(t)&&(this[t]=n),S(M(r.prototype),"attributeChangedCallback",this).call(this,t,e,n)}}],[{key:"observedAttributes",get:function(){return[].concat(b(S(M(r),"observedAttributes",this)),b(F))}}]),r}(t),o=y(P);try{var i=function(){var t=e.value;Object.defineProperty(r.prototype,"margin".concat(t),{get:function(){return this.margin[t]||0},set:function(e){this.margin[t]=+e}})};for(o.s();!(e=o.n()).done;)i()}catch(t){o.e(t)}finally{o.f()}return r}},594:function(t,e,n){"use strict";var r=n(608),o=n(604);e.a=function(t){return Object(o.a)(t)&&Object(r.a)(t)}},595:function(t,e,n){"use strict";e.a=function(t,e,n){for(var r=-1,o=null==t?0:t.length;++r-1}},598:function(t,e,n){"use strict";var r=n(614);var o=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)},i=Math.max;var a=function(t,e,n){return e=i(void 0===e?t.length-1:e,0),function(){for(var r=arguments,a=-1,c=i(r.length-e,0),s=Array(c);++a0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(l);e.a=function(t,e){return h(a(t,e,r.a),t+"")}},599:function(t,e,n){"use strict";var r=function(t,e,n,r){for(var o=t.length,i=n+(r?1:-1);r?i--:++i-1:!!a&&Object(o.a)(t,e,n)>-1},M=n(632),P=n(619),F=n(613),x=n(609);function T(t,e){for(var n=0;n5&&(t=this._ftWidth-5);var e=this._ftHeight/4;return"M0,"+e+"L"+t+","+e+"L"+t+","+3*e+"L0,"+3*e+"L0,"+e+"M"+t+",0L"+this._ftWidth+","+2*e+"L"+t+","+this._ftHeight+"Z"}}])&&T(e.prototype,n),r&&T(e,r),t}();function R(t,e){for(var n=0;nNumber(n.end)||Number(r.end)=0?(e._rows[n].push(t),e.featuresMap.set(t,n)):(e._rows.push([t]),e.featuresMap.set(t,e._rows.length-1))})),this._rowHeight=Math.min(this._layoutHeight/this._rows.length,this._minHeight)}},{key:"getOffset",value:function(){return this._rows.length*this._rowHeightt.length)&&(e=t.length);for(var n=0,r=new Array(e);n500&&(n=t.getSingleBaseWidth()<4?4:1),t._featureShape.getFeatureShape(t.getSingleBaseWidth()/2,t._layoutObj.getFeatureHeight(),n,t._getShape(e))})).attr("transform",(function(e){return"translate(".concat(t.getXFromSeqPosition(Number(e.feature.start)+Number(e.position)-1)+t.getSingleBaseWidth()/4,",\n ").concat(t._layoutObj.getFeatureYPos(e.feature),")")})).attr("fill","#06038D").style("fill-opacity",(function(t){var e=t.feature;return e.opacity?e.opacity:.9})).style("stroke-opacity",(function(t){var e=t.feature;return e.opacity?e.opacity:.9})).call(this.bindEvents,this)}},{key:"_applyFilters",value:function(){var t=this;if(!this._filters||this._filters.length<=0)this._data=this._originalData;else{var e=Object(M.a)(this._filters,"category"),n=Object.values(e).map((function(e){var n=e.map((function(e){return e.filterFn(t._originalData)}));return P.a.apply(void 0,V(n))})),r=F.a.apply(void 0,V(n));this._data=r}}},{key:"refresh",value:function(){var t=this;if(this.xScale&&this.seq_g){var e=this.seq_g.selectAll("g.fragment-group").data(this._data.reduce((function(t,e){return t.concat(e.locations.reduce((function(t,n){return t.concat(n.fragments.map((function(t){return Object.assign({},t,{feature:e})})))}),[]))}),[])),n=this.seq_g.selectAll("g.residue-group").data(this._data.reduce((function(t,e){var n;return t.concat([null===(n=e.ptms)||void 0===n?void 0:n.reduce((function(t){return t.concat((function(t){return Object.assign({},t,{feature:e,position:t.position})}))}),[])])}),[]));e.selectAll("path.feature").attr("d",(function(e){return t._featureShape.getFeatureShape(t.getSingleBaseWidth(),t._layoutObj.getFeatureHeight(e),e.end?e.end-e.start+1:1,t._getShape(e))})).attr("transform",(function(e){return"translate(".concat(t.getXFromSeqPosition(e.start),",").concat(t._layoutObj.getFeatureYPos(e.feature),")")})),n.selectAll("path.residue").attr("d",(function(e){var n=1;return t.length>500&&(n=t.getSingleBaseWidth()<4?4:1),t._featureShape.getFeatureShape(t.getSingleBaseWidth()/2,t._layoutObj.getFeatureHeight(e),n,t._getShape(e))})).attr("transform",(function(e){return"translate(".concat(t.getXFromSeqPosition(Number(e.feature.start)+Number(e.position)-1)+t.getSingleBaseWidth()/4,",").concat(t._layoutObj.getFeatureYPos(e.feature),")")})),e.selectAll("rect.outer-rectangle").attr("width",(function(e){return t.getSingleBaseWidth()*(e.end?e.end-e.start+1:1)})).attr("height",(function(e){return t._layoutObj.getFeatureHeight(e)})).attr("transform",(function(e){return"translate(".concat(t.getXFromSeqPosition(e.start),",").concat(t._layoutObj.getFeatureYPos(e.feature),")")})),this._updateHighlight()}}},{key:"_updateHighlight",value:function(){this.trackHighlighter.updateHighlight()}}])&&K(e.prototype,n),o&&K(e,o),a}(x.a);e.default=ot},609:function(t,e,n){"use strict";var r=n(585),o=n(593),i=n(665);function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function c(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=t&&("undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"]);if(null==n)return;var r,o,i=[],a=!0,c=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){c=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(c)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return s(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4?arguments[4]:void 0,a=arguments.length>5?arguments[5]:void 0,c=arguments.length>6?arguments[6]:void 0;e&&(e=e.feature?e.feature:e);var s={eventtype:t,coords:y._getClickCoords(),feature:e,target:c};return n&&(e&&e.fragments?s.highlight=e.fragments.map((function(t){return"".concat(t.start,":").concat(t.end)})).join(","):r.event&&r.event.shiftKey&&this._highlight?s.highlight="".concat(this._highlight,",").concat(i,":").concat(a):s.highlight=i&&a?"".concat(i,":").concat(a):null),o&&(s.selectedid=e&&e.protvistaFeatureId),new CustomEvent("change",{detail:s,bubbles:!0,cancelable:!0})}},{key:"bindEvents",value:function(t,e){t.on("mouseover",(function(t,n,r){e.dispatchEvent(e.createEvent("mouseover",t,"onmouseover"===e._highlightEvent,!1,t.start,t.end,r[n]))})).on("mouseout",(function(){e.dispatchEvent(e.createEvent("mouseout",null,"onmouseover"===e._highlightEvent))})).on("click",(function(t,n,r){e.dispatchEvent(e.createEvent("click",t,"onclick"===e._highlightEvent,!0,t.start,t.end,r[n]))}))}}])&&l(a.prototype,s),f&&l(a,f),y}(f(HTMLElement));e.a=Object(o.f)(y,{initialValue:{top:10,right:10,bottom:10,left:10}})},613:function(t,e,n){"use strict";var r=n(590),o=n(621),i=n(596),a=n(595),c=n(664),s=n(616),l=Math.min;var u=function(t,e,n){for(var u=n?a.a:i.a,h=t[0].length,f=t.length,p=f,d=Array(f),g=1/0,m=[];p--;){var y=t[p];p&&e&&(y=Object(r.a)(y,Object(c.a)(e))),g=l(y.length,g),d[p]=!n&&(e||h>=120&&y.length>=120)?new o.a(p&&y):void 0}y=t[0];var b=-1,v=d[0];t:for(;++b=200){var g=e?null:f(t);if(g)return Object(h.a)(g);u=!1,o=s.a,d=new i.a}else d=e?[]:p;t:for(;++rt.length)&&(e=t.length);for(var n=0,r=new Array(e);n".concat(t.map((function(t){var e,n,r=o.find((function(e){return e.name===t.code}));return r?"
  • ').concat(r.shortDescription,": ").concat(t.source?(e=t.source,(null===(n=e.name)||void 0===n?void 0:n.toLowerCase())==="PubMed".toLowerCase()?"".concat(e.id," (").concat(e.name," EuropePMC)"):" ").concat(e.id," ").concat(e.name?"(".concat(e.name,")"):"")):"","
  • "):""})).join(""),"\n "):""},h=function(t){return"
      ".concat(t.map((function(t){return'
    • '.concat(t.name," ").concat(t.url?'').concat(t.id,""):"".concat(t.name," ").concat(t.id),"
    • ")})).join(""),"
    ")},f={A:"alanine",S:"serine",T:"threonine",Y:"tyrosine"},p=function(t,e){var n=t.peptide,r=t.begin,o=Number(r)+e.position-1,i=n.charAt(e.position-1);return"".concat(o," phospho").concat(f[i])},d=function(t){var e="PROTEOMICS_PTM"===t.type?function(t){if(!t)return"";var e=t.flatMap((function(t){return t.dbReferences.map((function(t){return t.id}))})),n=i(new Set(e.flat()));return"\n
      ".concat(n.map((function(t){var e="Glue project"===t?"PXD012174":t;return"
    • ').concat(e,' (PRIDE\n ').concat("Glue project"===t?')
    • Publication: 31819260 (PubMed)
    • ':' PeptideAtlas)')})).join(""),"
    \n")}(t.ptms):u(t.evidences),n="PROTEOMICS_PTM"===t.type&&t.ptms.map((function(e){return p(t,e)})),r="PROTEOMICS_PTM"===t.type&&t.ptms.flatMap((function(t){return t.dbReferences.map((function(t){return t.id}))})),o=t.description;if("BINDING"===t.type||"Binding site"===t.type){var a="";t.ligandPart&&(a+="".concat(t.ligandPart.name," of ")),t.ligand&&(a+=t.ligand.name),t.description&&(a+="; ".concat(t.description)),o=a}try{return"\n ".concat(o?"
    Description

    ".concat(o,"

    "):"","\n ").concat(t.matchScore?"
    Match score

    ".concat(t.matchScore,"%

    "):"","\n ").concat(t.ftId?"
    Feature ID

    ".concat(t.ftId,"

    "):"","\n ").concat(t.alternativeSequence?"
    Alternative sequence

    ".concat(t.alternativeSequence,"

    "):"","\n ").concat(n?'
    PTMs
      '.concat(n.map((function(t){return"
    • ".concat(t,"
    • ")})).join(""),"
    \n "):"","\n ").concat(t.peptide&&"PROTEOMICS_PTM"===t.type?'
    Peptidoform

    '.concat(function(t,e){if(!e)return"";var n=e.map((function(t){return{name:t.name,position:t.position}})),r="",o=0;return n.forEach((function(e){r="".concat(r).concat(t.slice(o,e.position),"[").concat(e.name,"]"),o=e.position})),r="".concat(r).concat(t.slice(o)),"

    ".concat(r,"

    ")}(t.peptide,t.ptms),"

    "):"","\n ").concat(t.peptide&&"PROTEOMICS_PTM"!==t.type?"
    Peptide

    ".concat(t.peptide,"

    "):""," \n ").concat(t.xrefs?"
    Cross-references
    ".concat(h(t.xrefs)):"","\n ").concat(e?"
    Evidence
    ".concat(e):"","\n ").concat(t.ptms&&r&&!r.includes("Glue project")?'
    PTM statistical attributes
      '.concat(t.ptms.map((function(e){return e.dbReferences.map((function(n){return"
    • ".concat(n.id,'
    • \n
    • ').concat(p(t,e),'
    • \n
    • PubMed ID: \n ').concat(n.properties["Pubmed ID"],'\n
    • \n
    • Confidence score: ').concat(n.properties["Confidence score"],'
    • \n
    • Universal Spectrum Id: \n View on ProteomeXchange\n
    • \n
    • PSM Count: ').concat(n.properties["PSM Count"],'
    • \n
    • Site probability: ').concat(n.properties["Site probability"],"
    • \n ")})).join("")})).join(""),"
    "):"","\n ")}catch(t){return console.error(t),""}};function g(t){return(g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function m(t,e){for(var n=0;n0&&(e=function(t){return t.map((function(t){var e={};return t.begin&&(e.start=t.begin),s(s({},t),e)}))}(e=n.map((function(t){return S(S({},t),{},{tooltipContent:d(t),protvistaFeatureId:Object(r.a)()})})))),e},A=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&w(t,e)}(c,t);var e,n,r,o,i,a=(e=c,n=_(),function(){var t,r=O(e);if(n){var o=O(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return y(this,t)});function c(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,c),(t=a.call(this))._adaptedData=[],t}return r=c,(o=[{key:"connectedCallback",value:function(){this.subscribers=this.getAttribute("subscribers"),this._filters=this.getAttribute("filters")?this.getAttribute("filters").split(","):[],this._addLoaderListeners()}},{key:"data",set:function(t){this._emitEvent(t)}},{key:"subscribers",get:function(){return this._subscribers},set:function(t){t&&(this._subscribers=t.split(","))}},{key:"parseEntry",value:function(t){this._adaptedData=j(t)}},{key:"filterData",value:function(){var t=this;Array.isArray(this._adaptedData)&&this._filters.length>0&&(this._adaptedData=this._adaptedData.filter((function(e){return t._filters.includes(e.type)})))}},{key:"adaptedData",get:function(){return this._adaptedData}},{key:"_setSubscriberData",value:function(){var t=this;this.subscribers.forEach((function(e){var n=document.querySelector(e);n?n.data=t._adaptedData:console.error("Element with id '".concat(e,"' not found"))}))}},{key:"_emitEvent",value:function(t){this.parseEntry(t),this.filterData(),this.subscribers&&this._setSubscriberData(),this.dispatchEvent(new CustomEvent("load",{detail:{payload:this._adaptedData},bubbles:!0,cancelable:!0}))}},{key:"_addLoaderListeners",value:function(){var t=this;this.addEventListener("load",(function(e){if(e.target!==t){e.stopPropagation();try{if(e.detail.payload.errorMessage)throw e.detail.payload.errorMessage;t._emitEvent(e.detail.payload)}catch(e){t.dispatchEvent(new CustomEvent("error",{detail:e,bubbles:!0,cancelable:!0}))}}}))}}])&&m(r.prototype,o),i&&m(r,i),c}(b(HTMLElement));e.a=A},629:function(t,e,n){"use strict";n.d(e,"b",(function(){return y}));var r=n(675);function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return a(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return a(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,c=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return c=t.done,t},e:function(t){s=!0,i=t},f:function(){try{c||null==n.return||n.return()}finally{if(s)throw i}}}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n1&&void 0!==arguments[1]?arguments[1]:new Headers({accept:"application/json"}),n=m.get(t);if(n)return n;var r=g(void 0,void 0,void 0,regeneratorRuntime.mark((function n(){var r,o;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,window.fetch(t,{headers:e});case 2:if((r=n.sent).ok){n.next=5;break}throw new Error("Request Failed: Status = ".concat(r.status,"; URI = ").concat(t,"; Time = ").concat(new Date));case 5:if(204!==r.status){n.next=7;break}return n.abrupt("return",{payload:null,headers:r.headers});case 7:return n.next=9,r.json();case 9:return o=n.sent,n.abrupt("return",{payload:o,headers:r.headers});case 11:case"end":return n.stop()}}),n)})));return m.set(t,r),r.catch((function(){return m.delete(t)})),r},b=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&f(t,e)}(m,t);var e,n,o,a,l,u=(e=m,n=h(),function(){var t,r=p(e);if(n){var o=p(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return s(this,t)});function m(){var t;return d(this,m),(t=u.call(this))._data=null,t.selector=(t.getAttribute("selector")||"").trim()||function(t){return t},t}return o=m,l=[{key:"is",get:function(){return"data-loader"}}],(a=[{key:"fetch",value:function(){return g(this,void 0,void 0,regeneratorRuntime.mark((function t(){var e,n,o,a,c,s;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(l=this.children,(e=Array.from(l).filter((function(t){return t.matches('source[src], script[type="application/json"]')}))).length){t.next=3;break}return t.abrupt("return");case 3:n=[],a=i(e),t.prev=5,a.s();case 7:if((c=a.n()).done){t.next=31;break}if(s=c.value,t.prev=9,!(s instanceof HTMLSourceElement)){t.next=22;break}return t.t0=Object,t.t1=Object,t.t2={},t.next=16,y(s.src);case 16:t.t3=t.sent,t.t4=t.t1.assign.call(t.t1,t.t2,t.t3),t.t5={srcElement:s,src:s.src},o=t.t0.assign.call(t.t0,t.t4,t.t5),t.next=23;break;case 22:o={payload:JSON.parse(s.textContent)};case 23:return t.abrupt("break",31);case 26:t.prev=26,t.t6=t.catch(9),n.push(t.t6);case 29:t.next=7;break;case 31:t.next=36;break;case 33:t.prev=33,t.t7=t.catch(5),a.e(t.t7);case 36:return t.prev=36,a.f(),t.finish(36);case 39:if(o){t.next=43;break}this._errors=n;try{this.dispatchEvent(new CustomEvent("error",{detail:n,bubbles:!0,cancelable:!0}))}catch(t){console.error(t)}return t.abrupt("return");case 43:"string"==typeof this.selector?this._data=Object(r.a)(o.payload,this.selector):this._data=this.selector(o.payload),o.payload=this.data,this.dispatchEvent(new CustomEvent("load",{detail:o,bubbles:!0,cancelable:!0}));case 46:case"end":return t.stop()}var l}),t,this,[[5,33,36,39],[9,26]])})))}},{key:"data",get:function(){return this._data}},{key:"loaded",get:function(){return!!this.data}},{key:"errors",get:function(){return this._errors}},{key:"selector",get:function(){return this._selector},set:function(t){this._selector=t}},{key:"connectedCallback",value:function(){this.fetch()}}])&&c(o.prototype,a),l&&c(o,l),m}(l(HTMLElement));e.a=b},743:function(t,e,n){"use strict";var r,o=new Uint8Array(16);function i(){if(!r&&!(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(o)}var a=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var c=function(t){return"string"==typeof t&&a.test(t)},s=[],l=0;l<256;++l)s.push((l+256).toString(16).substr(1));var u,h,f=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(s[t[e+0]]+s[t[e+1]]+s[t[e+2]]+s[t[e+3]]+"-"+s[t[e+4]]+s[t[e+5]]+"-"+s[t[e+6]]+s[t[e+7]]+"-"+s[t[e+8]]+s[t[e+9]]+"-"+s[t[e+10]]+s[t[e+11]]+s[t[e+12]]+s[t[e+13]]+s[t[e+14]]+s[t[e+15]]).toLowerCase();if(!c(n))throw TypeError("Stringified UUID is invalid");return n},p=0,d=0;e.a=function(t,e,n){var r=e&&n||0,o=e||new Array(16),a=(t=t||{}).node||u,c=void 0!==t.clockseq?t.clockseq:h;if(null==a||null==c){var s=t.random||(t.rng||i)();null==a&&(a=u=[1|s[0],s[1],s[2],s[3],s[4],s[5]]),null==c&&(c=h=16383&(s[6]<<8|s[7]))}var l=void 0!==t.msecs?t.msecs:Date.now(),g=void 0!==t.nsecs?t.nsecs:d+1,m=l-p+(g-d)/1e4;if(m<0&&void 0===t.clockseq&&(c=c+1&16383),(m<0||l>p)&&void 0===t.nsecs&&(g=0),g>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");p=l,d=g,h=c;var y=(1e4*(268435455&(l+=122192928e5))+g)%4294967296;o[r++]=y>>>24&255,o[r++]=y>>>16&255,o[r++]=y>>>8&255,o[r++]=255&y;var b=l/4294967296*1e4&268435455;o[r++]=b>>>8&255,o[r++]=255&b,o[r++]=b>>>24&15|16,o[r++]=b>>>16&255,o[r++]=c>>>8|128,o[r++]=255&c;for(var v=0;v<6;++v)o[r+v]=a[v];return e||f(o)}},771:function(t){t.exports=JSON.parse('[{"accession":"feature1","start":10,"end":40,"color":"#342ea2"},{"accession":"feature2","locations":[{"fragments":[{"start":50,"end":160}]}],"color":"#A42ea2"},{"accession":"feature3","locations":[{"fragments":[{"start":155,"end":155}]},{"fragments":[{"start":158,"end":158}]}],"color":"#A4Aea2"},{"accession":"feature4","locations":[{"fragments":[{"start":200,"end":204},{"start":206,"end":210}]}]},{"accession":"feature5","start":40,"end":80,"color":"#A48ea9","ptms":[{"position":4},{"position":9}]}]')},871:function(t){t.exports=JSON.parse('[{"accession":"chain_A","locations":[{"fragments":[{"start":45,"end":100,"shape":"helix","fill":"transparent","color":"#f06"},{"start":110,"end":200,"shape":"helix","fill":"transparent","color":"#f06"},{"start":5,"end":15,"shape":"strand","color":"#fc0"},{"start":40,"end":43,"shape":"strand","color":"#fc0"}]}]},{"accession":"chain_D","locations":[{"fragments":[{"start":45,"end":51,"shape":"helix","fill":"transparent","color":"#f06"},{"start":55,"end":77,"shape":"helix","fill":"transparent","color":"#f06"},{"start":5,"end":15,"shape":"strand","color":"#fc0"},{"start":19,"end":26,"shape":"strand","color":"#fc0"}]}]}]')}}]); \ No newline at end of file diff --git a/v3/11.js b/v3/11.js new file mode 100644 index 000000000..0c0fdbf76 --- /dev/null +++ b/v3/11.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[11,4,24],{157:function(t,e,n){"use strict";n.r(e);var r=n(771),i={clear:{name:"clear",codeSample:"",dataSample:""},"protvista-navigation":{name:"protvista-navigation",codeSample:'\n '},"protvista-track":{name:"protvista-track",codeSample:'\n ',dataType:"json",dataSample:r},"protvista-sequence":{name:"protvista-sequence",codeSample:'\n ',dataType:"string",dataSample:"MAMYDDEFDTKASDLTFSPWVEVENWKDVTTRLRAIKFALQADRDKIPGVLSDLKTNCPYSAFKRFPDKSLYSVLSKEAVIAVAQIQSASGFKRRADEKNAVSGLVSVTPTQISQSASSSAATPVGLATVKPPRESDSAFQEDTFSYAKFDDASTAFHKALAYLEGLSLRPTYRRKFEKDMNVKWGGSGSAPSGAPAGGSSGSAPPTSGSSGSGAAPTPPPNP"}};e.default=i},160:function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(111),a=n(157),s=n(629),c=n(603),l=n(734),u=n(620),h=n(700);function f(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=t&&("undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"]);if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(t){s=!0,i=t}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return p(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);nt.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&void 0!==arguments[0]?arguments[0]:{},n=e.min,r=void 0===n?-1/0:n,i=e.max,a=void 0===i?1/0:i;o(this,t),this.segments=[],this.max=a,this.min=r,this.regionString=null}var e,n,i;return e=t,(n=[{key:"encode",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.segments.map((function(n){var r=n.start,i=n.end,o=n.color;if(e)return"".concat(r,":").concat(i).concat(o?":".concat(o):"");var a=r===t.min?"":r,s=i===t.max?"":i;return"".concat(a,":").concat(s).concat(o?":".concat(o):"")})).join(",")}},{key:"decode",value:function(t){var e=this;void 0!==t&&(this.regionString=t),this.regionString?this.segments=this.regionString.split(",").map((function(t){var n=r(t.split(":"),4),i=n[0],o=n[1],a=n[2];if(void 0!==n[3])throw new Error("there should be at most 2 ':' per region. Region: ".concat(t));var s=i?Number(i):e.min,c=o?Number(o):e.max,l=""!==a?a:void 0;if(s>c){var u=[c,s];s=u[0],c=u[1]}if(se.max&&(c=e.max),Number.isNaN(s))throw new Error("The parsed value of ".concat(i," is NaN. Region: ").concat(t));if(Number.isNaN(c))throw new Error("The parsed value of ".concat(o," is NaN. Region: ").concat(t));if(l&&!l.match(/^#[0-9a-f]{6,8}$/i))throw new Error("The parsed value of ".concat(a," is not a color in hex format. Region: ").concat(t));return{start:s,end:c,color:l}})):this.segments=[]}}])&&a(e.prototype,n),i&&a(e,i),t}();function c(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:400;p(this,t),this.element=e,this.timeStampWheelOutside=0,this.resetScrollableTimeout=null,this.scrollDelay=n}var e,n,r;return e=t,(n=[{key:"setElementScrollable",value:function(t){this.element.setAttribute("scrollable",t)}},{key:"startResetScrollableTimer",value:function(){var t=this;this.resetScrollableTimeout&&clearTimeout(this.resetScrollableTimeout),this.resetScrollableTimeout=setTimeout((function(){t.setElementScrollable(!0),t.resetScrollableTimeout=null}),this.scrollDelay)}},{key:"blockScroll",value:function(t){this.timeStampWheelOutside=t,this.setElementScrollable(!1),this.startResetScrollableTimer()}},{key:"wheel",value:function(t){var e=t.target,n=t.timeStamp;this.element.contains(e)?n=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function m(t){return function(t){if(Array.isArray(t))return _(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||v(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(t,e){if(t){if("string"==typeof t)return _(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_(t,e):void 0}}function _(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&void 0!==arguments[0]?arguments[0]:null,e=[],n=[];if(null!==t&&"string"!=typeof t)throw new Error("The attribute text has to be of type string");if(t&&""!==t.trim()){var r=t.split(",").map((function(t){return t.split(":")}));if(r.length<2)throw new Error("There should be at least 2 points to create a scale");e=r.map((function(t){var e=t[0].trim().toUpperCase();if(!h(e))throw new Error("The color '".concat(e," is not valid'"));return e})),n=r.map((function(t,e){var n=parseFloat(t[1]);if(Number.isNaN(n))throw new Error("The second part of every point should be a number. Error in point ".concat(e,": ").concat(t));return n}))}return{range:e,domain:n}},T=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.keyFormatter,r=void 0===n?f:n,i=e.valueFormatter,o=void 0===i?f:i;if(null!==t&&"string"!=typeof t)throw new Error("The attribute text has to be of type string");if(t&&""!==t.trim()){var a=t.split(",").map((function(t){return t.split(":")})),s={};return a.forEach((function(t){if(2!==t.length)throw new Error("Bad block: ".concat(t.join(":"),"\n The blocks of the string should follow the format KEY:VALUE"));s[r(t[0])]=o(t[1])})),s}return{}},D=g,N=function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{initialValue:{top:0,bottom:0,left:0,right:0}},r=function(t){E(r,t);var e=A(r);function r(){var t;return w(this,r),(t=e.call(this)).margin=n.initialValue,t}return S(r,[{key:"attributeChangedCallback",value:function(t,e,n){e!==n&&M.includes(t)&&(this[t]=n),k(P(r.prototype),"attributeChangedCallback",this).call(this,t,e,n)}}],[{key:"observedAttributes",get:function(){return[].concat(m(k(P(r),"observedAttributes",this)),m(M))}}]),r}(t),i=b(C);try{var o=function(){var t=e.value;Object.defineProperty(r.prototype,"margin".concat(t),{get:function(){return this.margin[t]||0},set:function(e){this.margin[t]=+e}})};for(i.s();!(e=i.n()).done;)o()}catch(t){i.e(t)}finally{i.f()}return r}},594:function(t,e,n){"use strict";var r=n(608),i=n(604);e.a=function(t){return Object(i.a)(t)&&Object(r.a)(t)}},595:function(t,e,n){"use strict";e.a=function(t,e,n){for(var r=-1,i=null==t?0:t.length;++r-1}},598:function(t,e,n){"use strict";var r=n(614);var i=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)},o=Math.max;var a=function(t,e,n){return e=o(void 0===e?t.length-1:e,0),function(){for(var r=arguments,a=-1,s=o(r.length-e,0),c=Array(s);++a0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(l);e.a=function(t,e){return h(a(t,e,r.a),t+"")}},599:function(t,e,n){"use strict";var r=function(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o-1:!!a&&Object(i.a)(t,e,n)>-1},P=n(632),C=n(619),M=n(613),F=n(609);function L(t,e){for(var n=0;n5&&(t=this._ftWidth-5);var e=this._ftHeight/4;return"M0,"+e+"L"+t+","+e+"L"+t+","+3*e+"L0,"+3*e+"L0,"+e+"M"+t+",0L"+this._ftWidth+","+2*e+"L"+t+","+this._ftHeight+"Z"}}])&&L(e.prototype,n),r&&L(e,r),t}();function T(t,e){for(var n=0;nNumber(n.end)||Number(r.end)=0?(e._rows[n].push(t),e.featuresMap.set(t,n)):(e._rows.push([t]),e.featuresMap.set(t,e._rows.length-1))})),this._rowHeight=Math.min(this._layoutHeight/this._rows.length,this._minHeight)}},{key:"getOffset",value:function(){return this._rows.length*this._rowHeightt.length)&&(e=t.length);for(var n=0,r=new Array(e);n500&&(n=t.getSingleBaseWidth()<4?4:1),t._featureShape.getFeatureShape(t.getSingleBaseWidth()/2,t._layoutObj.getFeatureHeight(),n,t._getShape(e))})).attr("transform",(function(e){return"translate(".concat(t.getXFromSeqPosition(Number(e.feature.start)+Number(e.position)-1)+t.getSingleBaseWidth()/4,",\n ").concat(t._layoutObj.getFeatureYPos(e.feature),")")})).attr("fill","#06038D").style("fill-opacity",(function(t){var e=t.feature;return e.opacity?e.opacity:.9})).style("stroke-opacity",(function(t){var e=t.feature;return e.opacity?e.opacity:.9})).call(this.bindEvents,this)}},{key:"_applyFilters",value:function(){var t=this;if(!this._filters||this._filters.length<=0)this._data=this._originalData;else{var e=Object(P.a)(this._filters,"category"),n=Object.values(e).map((function(e){var n=e.map((function(e){return e.filterFn(t._originalData)}));return C.a.apply(void 0,K(n))})),r=M.a.apply(void 0,K(n));this._data=r}}},{key:"refresh",value:function(){var t=this;if(this.xScale&&this.seq_g){var e=this.seq_g.selectAll("g.fragment-group").data(this._data.reduce((function(t,e){return t.concat(e.locations.reduce((function(t,n){return t.concat(n.fragments.map((function(t){return Object.assign({},t,{feature:e})})))}),[]))}),[])),n=this.seq_g.selectAll("g.residue-group").data(this._data.reduce((function(t,e){var n;return t.concat([null===(n=e.ptms)||void 0===n?void 0:n.reduce((function(t){return t.concat((function(t){return Object.assign({},t,{feature:e,position:t.position})}))}),[])])}),[]));e.selectAll("path.feature").attr("d",(function(e){return t._featureShape.getFeatureShape(t.getSingleBaseWidth(),t._layoutObj.getFeatureHeight(e),e.end?e.end-e.start+1:1,t._getShape(e))})).attr("transform",(function(e){return"translate(".concat(t.getXFromSeqPosition(e.start),",").concat(t._layoutObj.getFeatureYPos(e.feature),")")})),n.selectAll("path.residue").attr("d",(function(e){var n=1;return t.length>500&&(n=t.getSingleBaseWidth()<4?4:1),t._featureShape.getFeatureShape(t.getSingleBaseWidth()/2,t._layoutObj.getFeatureHeight(e),n,t._getShape(e))})).attr("transform",(function(e){return"translate(".concat(t.getXFromSeqPosition(Number(e.feature.start)+Number(e.position)-1)+t.getSingleBaseWidth()/4,",").concat(t._layoutObj.getFeatureYPos(e.feature),")")})),e.selectAll("rect.outer-rectangle").attr("width",(function(e){return t.getSingleBaseWidth()*(e.end?e.end-e.start+1:1)})).attr("height",(function(e){return t._layoutObj.getFeatureHeight(e)})).attr("transform",(function(e){return"translate(".concat(t.getXFromSeqPosition(e.start),",").concat(t._layoutObj.getFeatureYPos(e.feature),")")})),this._updateHighlight()}}},{key:"_updateHighlight",value:function(){this.trackHighlighter.updateHighlight()}}])&&Q(e.prototype,n),i&&Q(e,i),a}(F.a);e.default=it},609:function(t,e,n){"use strict";var r=n(585),i=n(593),o=n(665);function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=t&&("undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"]);if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(t){s=!0,i=t}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return c(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4?arguments[4]:void 0,a=arguments.length>5?arguments[5]:void 0,s=arguments.length>6?arguments[6]:void 0;e&&(e=e.feature?e.feature:e);var c={eventtype:t,coords:b._getClickCoords(),feature:e,target:s};return n&&(e&&e.fragments?c.highlight=e.fragments.map((function(t){return"".concat(t.start,":").concat(t.end)})).join(","):r.event&&r.event.shiftKey&&this._highlight?c.highlight="".concat(this._highlight,",").concat(o,":").concat(a):c.highlight=o&&a?"".concat(o,":").concat(a):null),i&&(c.selectedid=e&&e.protvistaFeatureId),new CustomEvent("change",{detail:c,bubbles:!0,cancelable:!0})}},{key:"bindEvents",value:function(t,e){t.on("mouseover",(function(t,n,r){e.dispatchEvent(e.createEvent("mouseover",t,"onmouseover"===e._highlightEvent,!1,t.start,t.end,r[n]))})).on("mouseout",(function(){e.dispatchEvent(e.createEvent("mouseout",null,"onmouseover"===e._highlightEvent))})).on("click",(function(t,n,r){e.dispatchEvent(e.createEvent("click",t,"onclick"===e._highlightEvent,!0,t.start,t.end,r[n]))}))}}])&&l(a.prototype,c),f&&l(a,f),b}(f(HTMLElement));e.a=Object(i.f)(b,{initialValue:{top:10,right:10,bottom:10,left:10}})},613:function(t,e,n){"use strict";var r=n(590),i=n(621),o=n(596),a=n(595),s=n(664),c=n(616),l=Math.min;var u=function(t,e,n){for(var u=n?a.a:o.a,h=t[0].length,f=t.length,p=f,d=Array(f),g=1/0,y=[];p--;){var b=t[p];p&&e&&(b=Object(r.a)(b,Object(s.a)(e))),g=l(b.length,g),d[p]=!n&&(e||h>=120&&b.length>=120)?new i.a(p&&b):void 0}b=t[0];var m=-1,v=d[0];t:for(;++m=200){var g=e?null:f(t);if(g)return Object(h.a)(g);u=!1,i=c.a,d=new o.a}else d=e?[]:p;t:for(;++rt.length)&&(e=t.length);for(var n=0,r=new Array(e);n".concat(t.map((function(t){var e,n,r=i.find((function(e){return e.name===t.code}));return r?"
  • ').concat(r.shortDescription,": ").concat(t.source?(e=t.source,(null===(n=e.name)||void 0===n?void 0:n.toLowerCase())==="PubMed".toLowerCase()?"".concat(e.id," (").concat(e.name," EuropePMC)"):" ").concat(e.id," ").concat(e.name?"(".concat(e.name,")"):"")):"","
  • "):""})).join(""),"\n "):""},h=function(t){return"
      ".concat(t.map((function(t){return'
    • '.concat(t.name," ").concat(t.url?'').concat(t.id,""):"".concat(t.name," ").concat(t.id),"
    • ")})).join(""),"
    ")},f={A:"alanine",S:"serine",T:"threonine",Y:"tyrosine"},p=function(t,e){var n=t.peptide,r=t.begin,i=Number(r)+e.position-1,o=n.charAt(e.position-1);return"".concat(i," phospho").concat(f[o])},d=function(t){var e="PROTEOMICS_PTM"===t.type?function(t){if(!t)return"";var e=t.flatMap((function(t){return t.dbReferences.map((function(t){return t.id}))})),n=o(new Set(e.flat()));return"\n
      ".concat(n.map((function(t){var e="Glue project"===t?"PXD012174":t;return"
    • ').concat(e,' (PRIDE\n ').concat("Glue project"===t?')
    • Publication: 31819260 (PubMed)
    • ':' PeptideAtlas)')})).join(""),"
    \n")}(t.ptms):u(t.evidences),n="PROTEOMICS_PTM"===t.type&&t.ptms.map((function(e){return p(t,e)})),r="PROTEOMICS_PTM"===t.type&&t.ptms.flatMap((function(t){return t.dbReferences.map((function(t){return t.id}))})),i=t.description;if("BINDING"===t.type||"Binding site"===t.type){var a="";t.ligandPart&&(a+="".concat(t.ligandPart.name," of ")),t.ligand&&(a+=t.ligand.name),t.description&&(a+="; ".concat(t.description)),i=a}try{return"\n ".concat(i?"
    Description

    ".concat(i,"

    "):"","\n ").concat(t.matchScore?"
    Match score

    ".concat(t.matchScore,"%

    "):"","\n ").concat(t.ftId?"
    Feature ID

    ".concat(t.ftId,"

    "):"","\n ").concat(t.alternativeSequence?"
    Alternative sequence

    ".concat(t.alternativeSequence,"

    "):"","\n ").concat(n?'
    PTMs
      '.concat(n.map((function(t){return"
    • ".concat(t,"
    • ")})).join(""),"
    \n "):"","\n ").concat(t.peptide&&"PROTEOMICS_PTM"===t.type?'
    Peptidoform

    '.concat(function(t,e){if(!e)return"";var n=e.map((function(t){return{name:t.name,position:t.position}})),r="",i=0;return n.forEach((function(e){r="".concat(r).concat(t.slice(i,e.position),"[").concat(e.name,"]"),i=e.position})),r="".concat(r).concat(t.slice(i)),"

    ".concat(r,"

    ")}(t.peptide,t.ptms),"

    "):"","\n ").concat(t.peptide&&"PROTEOMICS_PTM"!==t.type?"
    Peptide

    ".concat(t.peptide,"

    "):""," \n ").concat(t.xrefs?"
    Cross-references
    ".concat(h(t.xrefs)):"","\n ").concat(e?"
    Evidence
    ".concat(e):"","\n ").concat(t.ptms&&r&&!r.includes("Glue project")?'
    PTM statistical attributes
      '.concat(t.ptms.map((function(e){return e.dbReferences.map((function(n){return"
    • ".concat(n.id,'
    • \n
    • ').concat(p(t,e),'
    • \n
    • PubMed ID: \n ').concat(n.properties["Pubmed ID"],'\n
    • \n
    • Confidence score: ').concat(n.properties["Confidence score"],'
    • \n
    • Universal Spectrum Id: \n View on ProteomeXchange\n
    • \n
    • PSM Count: ').concat(n.properties["PSM Count"],'
    • \n
    • Site probability: ').concat(n.properties["Site probability"],"
    • \n ")})).join("")})).join(""),"
    "):"","\n ")}catch(t){return console.error(t),""}};function g(t){return(g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function y(t,e){for(var n=0;n0&&(e=function(t){return t.map((function(t){var e={};return t.begin&&(e.start=t.begin),c(c({},t),e)}))}(e=n.map((function(t){return k(k({},t),{},{tooltipContent:d(t),protvistaFeatureId:Object(r.a)()})})))),e},A=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&w(t,e)}(s,t);var e,n,r,i,o,a=(e=s,n=_(),function(){var t,r=O(e);if(n){var i=O(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return b(this,t)});function s(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),(t=a.call(this))._adaptedData=[],t}return r=s,(i=[{key:"connectedCallback",value:function(){this.subscribers=this.getAttribute("subscribers"),this._filters=this.getAttribute("filters")?this.getAttribute("filters").split(","):[],this._addLoaderListeners()}},{key:"data",set:function(t){this._emitEvent(t)}},{key:"subscribers",get:function(){return this._subscribers},set:function(t){t&&(this._subscribers=t.split(","))}},{key:"parseEntry",value:function(t){this._adaptedData=j(t)}},{key:"filterData",value:function(){var t=this;Array.isArray(this._adaptedData)&&this._filters.length>0&&(this._adaptedData=this._adaptedData.filter((function(e){return t._filters.includes(e.type)})))}},{key:"adaptedData",get:function(){return this._adaptedData}},{key:"_setSubscriberData",value:function(){var t=this;this.subscribers.forEach((function(e){var n=document.querySelector(e);n?n.data=t._adaptedData:console.error("Element with id '".concat(e,"' not found"))}))}},{key:"_emitEvent",value:function(t){this.parseEntry(t),this.filterData(),this.subscribers&&this._setSubscriberData(),this.dispatchEvent(new CustomEvent("load",{detail:{payload:this._adaptedData},bubbles:!0,cancelable:!0}))}},{key:"_addLoaderListeners",value:function(){var t=this;this.addEventListener("load",(function(e){if(e.target!==t){e.stopPropagation();try{if(e.detail.payload.errorMessage)throw e.detail.payload.errorMessage;t._emitEvent(e.detail.payload)}catch(e){t.dispatchEvent(new CustomEvent("error",{detail:e,bubbles:!0,cancelable:!0}))}}}))}}])&&y(r.prototype,i),o&&y(r,o),s}(m(HTMLElement));e.a=A},629:function(t,e,n){"use strict";n.d(e,"b",(function(){return b}));var r=n(675);function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return a(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return a(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,c=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){c=!0,o=t},f:function(){try{s||null==n.return||n.return()}finally{if(c)throw o}}}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n1&&void 0!==arguments[1]?arguments[1]:new Headers({accept:"application/json"}),n=y.get(t);if(n)return n;var r=g(void 0,void 0,void 0,regeneratorRuntime.mark((function n(){var r,i;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,window.fetch(t,{headers:e});case 2:if((r=n.sent).ok){n.next=5;break}throw new Error("Request Failed: Status = ".concat(r.status,"; URI = ").concat(t,"; Time = ").concat(new Date));case 5:if(204!==r.status){n.next=7;break}return n.abrupt("return",{payload:null,headers:r.headers});case 7:return n.next=9,r.json();case 9:return i=n.sent,n.abrupt("return",{payload:i,headers:r.headers});case 11:case"end":return n.stop()}}),n)})));return y.set(t,r),r.catch((function(){return y.delete(t)})),r},m=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&f(t,e)}(y,t);var e,n,i,a,l,u=(e=y,n=h(),function(){var t,r=p(e);if(n){var i=p(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return c(this,t)});function y(){var t;return d(this,y),(t=u.call(this))._data=null,t.selector=(t.getAttribute("selector")||"").trim()||function(t){return t},t}return i=y,l=[{key:"is",get:function(){return"data-loader"}}],(a=[{key:"fetch",value:function(){return g(this,void 0,void 0,regeneratorRuntime.mark((function t(){var e,n,i,a,s,c;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(l=this.children,(e=Array.from(l).filter((function(t){return t.matches('source[src], script[type="application/json"]')}))).length){t.next=3;break}return t.abrupt("return");case 3:n=[],a=o(e),t.prev=5,a.s();case 7:if((s=a.n()).done){t.next=31;break}if(c=s.value,t.prev=9,!(c instanceof HTMLSourceElement)){t.next=22;break}return t.t0=Object,t.t1=Object,t.t2={},t.next=16,b(c.src);case 16:t.t3=t.sent,t.t4=t.t1.assign.call(t.t1,t.t2,t.t3),t.t5={srcElement:c,src:c.src},i=t.t0.assign.call(t.t0,t.t4,t.t5),t.next=23;break;case 22:i={payload:JSON.parse(c.textContent)};case 23:return t.abrupt("break",31);case 26:t.prev=26,t.t6=t.catch(9),n.push(t.t6);case 29:t.next=7;break;case 31:t.next=36;break;case 33:t.prev=33,t.t7=t.catch(5),a.e(t.t7);case 36:return t.prev=36,a.f(),t.finish(36);case 39:if(i){t.next=43;break}this._errors=n;try{this.dispatchEvent(new CustomEvent("error",{detail:n,bubbles:!0,cancelable:!0}))}catch(t){console.error(t)}return t.abrupt("return");case 43:"string"==typeof this.selector?this._data=Object(r.a)(i.payload,this.selector):this._data=this.selector(i.payload),i.payload=this.data,this.dispatchEvent(new CustomEvent("load",{detail:i,bubbles:!0,cancelable:!0}));case 46:case"end":return t.stop()}var l}),t,this,[[5,33,36,39],[9,26]])})))}},{key:"data",get:function(){return this._data}},{key:"loaded",get:function(){return!!this.data}},{key:"errors",get:function(){return this._errors}},{key:"selector",get:function(){return this._selector},set:function(t){this._selector=t}},{key:"connectedCallback",value:function(){this.fetch()}}])&&s(i.prototype,a),l&&s(i,l),y}(l(HTMLElement));e.a=m},700:function(t,e,n){"use strict";var r=n(585),i=n(593);function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,e){for(var n=0;n0&&(this._padding=10)}},{key:"connectedCallback",value:function(){this._refreshWidth(),this.closest("protvista-manager")&&(this.manager=this.closest("protvista-manager"),this.manager.register(this)),this._length=parseFloat(this.getAttribute("length")),this._displaystart=parseFloat(this.getAttribute("displaystart"))||1,this._displayend=parseFloat(this.getAttribute("displayend"))||this._length,this._highlightStart=parseFloat(this.getAttribute("highlightStart")),this._highlightEnd=parseFloat(this.getAttribute("highlightEnd")),this._rulerstart=parseFloat(this.getAttribute("rulerStart"))||1,this._onResize=this._onResize.bind(this),this._createNavRuler()}},{key:"disconnectedCallback",value:function(){this.manager&&this.manager.unregister(this),this._ro&&this._ro.unobserve(this),window.removeEventListener("resize",this._onResize)}},{key:"attributeChangedCallback",value:function(t,e,n){e!==n&&(this["_".concat(t)]=parseFloat(n),this._updateNavRuler())}},{key:"width",get:function(){return this._width},set:function(t){this._width=t}},{key:"_createNavRuler",value:function(){var t=this;this._x=Object(r.scaleLinear)().range([this._padding,this.width-this._padding]),this._x.domain([this._rulerstart,this._rulerstart+this._length-1]),Object(r.select)(this).selectAll("div").remove(),this._container=Object(r.select)(this).append("div").attr("class","container"),this._svg=this._container.append("svg").attr("id","").attr("width",this.width).attr("height",this.height),this._xAxis=Object(r.axisBottom)(this._x),this._displaystartLabel=this._svg.append("text").attr("class","start-label").attr("x",0).attr("y",this.height-this._padding),this._displayendLabel=this._svg.append("text").attr("class","end-label").attr("x",this.width).attr("y",this.height-this._padding).attr("text-anchor","end"),this._axis=this._svg.append("g").attr("class","x axis").call(this._xAxis),this._viewport=Object(r.brushX)().extent([[this._padding,0],[this.width-this._padding,.51*this.height]]).on("brush",(function(){r.event.selection&&(t._displaystart=Object(r.format)("d")(t._x.invert(r.event.selection[0])),t._displayend=Object(r.format)("d")(t._x.invert(r.event.selection[1])),t.dontDispatch||t.dispatchEvent(new CustomEvent("change",{detail:{displayend:t._displayend,displaystart:t._displaystart,extra:{transform:r.event.transform}},bubbles:!0,cancelable:!0})),t._updateLabels(),t._updatePolygon())})),this._brushG=this._svg.append("g").attr("class","brush").call(this._viewport),this._brushG.call(this._viewport.move,[this._x(this._displaystart),this._x(this._displayend)]),this.polygon=this._svg.append("polygon").attr("class","zoom-polygon").attr("fill","#777").attr("fill-opacity","0.3"),this._updateNavRuler(),"ResizeObserver"in window&&(this._ro=new ResizeObserver(this._onResize),this._ro.observe(this)),window.addEventListener("resize",this._onResize)}},{key:"_onResize",value:function(){this._refreshWidth(),this._x=this._x.range([this._padding,this.width-this._padding]),this._svg.attr("width",this.width),this._viewport.extent([[this._padding,0],[this.width-this._padding,.51*this.height]]),this._brushG.call(this._viewport),this._updateNavRuler()}},{key:"_updateNavRuler",value:function(){this._x&&(this._container.style("padding-left","".concat(this.margin.left,"px")).style("padding-right","".concat(this.margin.right,"px")).style("padding-top","".concat(this.margin.top,"px")).style("padding-bottom","".concat(this.margin.bottom,"px")),this._x.domain([this._rulerstart,this._rulerstart+this._length-1]),this._axis.call(this._xAxis),this._updatePolygon(),this._updateLabels(),this._brushG&&(this.dontDispatch=!0,this._brushG.call(this._viewport.move,[this._x(this._displaystart),this._x(this._displayend)]),this.dontDispatch=!1))}},{key:"_updateLabels",value:function(){this._displaystartLabel&&this._displaystartLabel.text(this._displaystart),this._displayendLabel&&this._displayendLabel.attr("x",this.width).text(this._displayend)}},{key:"_updatePolygon",value:function(){this.polygon&&this.polygon.attr("points","".concat(this._x(this._displaystart),",").concat(this.height/2,"\n ").concat(this._x(this._displayend),",").concat(this.height/2,"\n ").concat(this.width,",").concat(this.height,"\n 0,").concat(this.height))}}])&&a(i.prototype,o),c&&a(i,c),p}(c(HTMLElement));e.a=Object(i.f)(p)},734:function(t,e,n){"use strict";var r=n(585),i=n(609);function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){for(var n=0;nthis.chHeight&&(this.xAxis=Object(r.axisBottom)(this.xScale).tickFormat((function(t){return Number.isInteger(t)?t:""})).ticks(this.numberOfTicks,"s"),this.axis.call(this.xAxis)),this.axis.attr("transform","translate(".concat(this.margin.left+i,",0)")),this.axis.select(".domain").remove(),this.axis.selectAll(".tick line").remove(),this.bases=this.seq_g.selectAll("text.base").data(s,(function(t){return t.start})),this.bases.enter().append("text").attr("class","base").attr("text-anchor","middle").attr("x",(function(e){return t.getXFromSeqPosition(e.start)+i})).text((function(t){return t.aa})).style("pointer-events","none").style("font-family","monospace"),this.bases.exit().remove(),this.bases.attr("x",(function(e){return t.getXFromSeqPosition(e.start)+i})),this.background=this.seq_bg.selectAll("rect.base_bg").data(s,(function(t){return t.start})),this.background.enter().append("rect").attr("class","base_bg feature").attr("height",this._height).merge(this.background).attr("width",e).attr("fill",(function(t){return Math.round(t.start)%2?"#ccc":"#eee"})).attr("x",(function(e){return t.getXFromSeqPosition(e.start)})).call(this.bindEvents,this),this.background.exit().remove(),this.seq_g.style("opacity",Math.min(1,n)),this.background.style("opacity",Math.min(1,n)),this._updateHighlight()}}},{key:"_updateHighlight",value:function(){this.trackHighlighter.updateHighlight()}}])&&s(e.prototype,n),o&&s(e,o),p}(i.a);e.a=g},743:function(t,e,n){"use strict";var r,i=new Uint8Array(16);function o(){if(!r&&!(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(i)}var a=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var s=function(t){return"string"==typeof t&&a.test(t)},c=[],l=0;l<256;++l)c.push((l+256).toString(16).substr(1));var u,h,f=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(c[t[e+0]]+c[t[e+1]]+c[t[e+2]]+c[t[e+3]]+"-"+c[t[e+4]]+c[t[e+5]]+"-"+c[t[e+6]]+c[t[e+7]]+"-"+c[t[e+8]]+c[t[e+9]]+"-"+c[t[e+10]]+c[t[e+11]]+c[t[e+12]]+c[t[e+13]]+c[t[e+14]]+c[t[e+15]]).toLowerCase();if(!s(n))throw TypeError("Stringified UUID is invalid");return n},p=0,d=0;e.a=function(t,e,n){var r=e&&n||0,i=e||new Array(16),a=(t=t||{}).node||u,s=void 0!==t.clockseq?t.clockseq:h;if(null==a||null==s){var c=t.random||(t.rng||o)();null==a&&(a=u=[1|c[0],c[1],c[2],c[3],c[4],c[5]]),null==s&&(s=h=16383&(c[6]<<8|c[7]))}var l=void 0!==t.msecs?t.msecs:Date.now(),g=void 0!==t.nsecs?t.nsecs:d+1,y=l-p+(g-d)/1e4;if(y<0&&void 0===t.clockseq&&(s=s+1&16383),(y<0||l>p)&&void 0===t.nsecs&&(g=0),g>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");p=l,d=g,h=s;var b=(1e4*(268435455&(l+=122192928e5))+g)%4294967296;i[r++]=b>>>24&255,i[r++]=b>>>16&255,i[r++]=b>>>8&255,i[r++]=255&b;var m=l/4294967296*1e4&268435455;i[r++]=m>>>8&255,i[r++]=255&m,i[r++]=m>>>24&15|16,i[r++]=m>>>16&255,i[r++]=s>>>8|128,i[r++]=255&s;for(var v=0;v<6;++v)i[r+v]=a[v];return e||f(i)}},771:function(t){t.exports=JSON.parse('[{"accession":"feature1","start":10,"end":40,"color":"#342ea2"},{"accession":"feature2","locations":[{"fragments":[{"start":50,"end":160}]}],"color":"#A42ea2"},{"accession":"feature3","locations":[{"fragments":[{"start":155,"end":155}]},{"fragments":[{"start":158,"end":158}]}],"color":"#A4Aea2"},{"accession":"feature4","locations":[{"fragments":[{"start":200,"end":204},{"start":206,"end":210}]}]},{"accession":"feature5","start":40,"end":80,"color":"#A48ea9","ptms":[{"position":4},{"position":9}]}]')}}]); \ No newline at end of file diff --git a/v3/12.js b/v3/12.js new file mode 100644 index 000000000..c3fcc91da --- /dev/null +++ b/v3/12.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[12],{1015:function(t,e){t.exports='

    protvista-datatable

    \n

    Published on NPM

    \n

    This component can be used to display a table of features.

    \n

    Wrapping it within <protvista-manager> will allow highlighting of features as well as hidding features which are out of the display when zooming.

    \n

    Demo

    \n

    Usage

    \n
    <protvista-datatable>\n  <table>\n    <thead>\n      <tr>\n        <th>Col 1</th>\n        <th>Col 2</th>\n        <th>Col 3</th>\n        <th>Col 4</th>\n      </tr>\n    </thead>\n    <tbody>\n      <tr data-id="row1">\n        <td>Lorem</td>\n        <td>ipsum</td>\n        <td>dolor</td>\n        <td>sit</td>\n      </tr>\n      <tr data-id="row2">\n        <td>Lorem</td>\n        <td>ipsum</td>\n        <td>dolor</td>\n        <td>sit</td>\n      </tr>\n      <tr data-group-for="row2">\n        <td>amet, consectetur adipiscing elit</td>\n      </tr>\n    </tbody>\n  </table>\n</protvista-datatable>
    \n

    Styling

    \n

    --protvista-datatable__hover: the background color of a row on mouse over

    \n

    --protvista-datatable__active: the background color of a row within a highlighted region

    \n

    --protvista-datatable__active--clicked: the background color of a clicked row

    \n

    Data attributes

    \n

    data-id

    \n

    The row id. Also passed in the "change" event triggered on row click

    \n

    data-group-for

    \n

    A grouped row is collapsed by default, and a trigger is added to the row with the corresponding data-id to collapse/expand it.

    \n

    data-filter

    \n

    Generate a dropdown filter for a given column. A select menu will be populated with values defined in data-filter-value. data-filter should be set on both the column header cell and the corresponding cells and have the same value to allow mapping.

    \n

    data-filter-value

    \n

    A value used to populate the data-filter select menu content. The value should reflect the content of the cell.

    \n

    API Reference

    \n

    Properties

    \n

    displaystart: number (optional)

    \n

    The start position of the selected region.

    \n

    displayend: number (optional)

    \n

    The end position of the selected region.

    \n

    highlight: string (optional)

    \n

    A comma separated list of regions to highlight.

    \n

    Each region follows the format: [start]:[end], where both [start] and [end] are optional numbers.

    \n

    selectedid: string (optional)

    \n

    The row id to select. Row ids are attributed based on the protvistaFeatureId attribute in each data point. These are added to the data in the various adapters.

    \n

    height: string (optional)

    \n

    The height of the table

    \n

    expandTable: boolean (false)

    \n

    Expands the table to show all the available rows (setting the height to auto instead of the specified/default height)

    \n

    noScrollToRow: boolean (false)

    \n

    Don't scroll to row if it has been selected

    \n

    noDeselect: boolean (false)

    \n

    Don't de-select row if clicking outside of table

    \n'},162:function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(917),a=n(603),s=n(701),l=n(700),c=n(620),u=n(629),h=n(111),f=n(1015),p=n.n(f),d=n(35);function g(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function b(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){g(o,r,i,a,s,"next",t)}function s(t){g(o,r,i,a,s,"throw",t)}a(void 0)}))}}function y(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=t&&("undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"]);if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(t){s=!0,i=t}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return m(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return m(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);nt.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&void 0!==arguments[0]?arguments[0]:{},n=e.min,r=void 0===n?-1/0:n,i=e.max,a=void 0===i?1/0:i;o(this,t),this.segments=[],this.max=a,this.min=r,this.regionString=null}var e,n,i;return e=t,(n=[{key:"encode",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.segments.map((function(n){var r=n.start,i=n.end,o=n.color;if(e)return"".concat(r,":").concat(i).concat(o?":".concat(o):"");var a=r===t.min?"":r,s=i===t.max?"":i;return"".concat(a,":").concat(s).concat(o?":".concat(o):"")})).join(",")}},{key:"decode",value:function(t){var e=this;void 0!==t&&(this.regionString=t),this.regionString?this.segments=this.regionString.split(",").map((function(t){var n=r(t.split(":"),4),i=n[0],o=n[1],a=n[2];if(void 0!==n[3])throw new Error("there should be at most 2 ':' per region. Region: ".concat(t));var s=i?Number(i):e.min,l=o?Number(o):e.max,c=""!==a?a:void 0;if(s>l){var u=[l,s];s=u[0],l=u[1]}if(se.max&&(l=e.max),Number.isNaN(s))throw new Error("The parsed value of ".concat(i," is NaN. Region: ").concat(t));if(Number.isNaN(l))throw new Error("The parsed value of ".concat(o," is NaN. Region: ").concat(t));if(c&&!c.match(/^#[0-9a-f]{6,8}$/i))throw new Error("The parsed value of ".concat(a," is not a color in hex format. Region: ").concat(t));return{start:s,end:l,color:c}})):this.segments=[]}}])&&a(e.prototype,n),i&&a(e,i),t}();function l(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:400;p(this,t),this.element=e,this.timeStampWheelOutside=0,this.resetScrollableTimeout=null,this.scrollDelay=n}var e,n,r;return e=t,(n=[{key:"setElementScrollable",value:function(t){this.element.setAttribute("scrollable",t)}},{key:"startResetScrollableTimer",value:function(){var t=this;this.resetScrollableTimeout&&clearTimeout(this.resetScrollableTimeout),this.resetScrollableTimeout=setTimeout((function(){t.setElementScrollable(!0),t.resetScrollableTimeout=null}),this.scrollDelay)}},{key:"blockScroll",value:function(t){this.timeStampWheelOutside=t,this.setElementScrollable(!1),this.startResetScrollableTimer()}},{key:"wheel",value:function(t){var e=t.target,n=t.timeStamp;this.element.contains(e)?n=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function m(t){return function(t){if(Array.isArray(t))return _(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||v(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(t,e){if(t){if("string"==typeof t)return _(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_(t,e):void 0}}function _(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&void 0!==arguments[0]?arguments[0]:null,e=[],n=[];if(null!==t&&"string"!=typeof t)throw new Error("The attribute text has to be of type string");if(t&&""!==t.trim()){var r=t.split(",").map((function(t){return t.split(":")}));if(r.length<2)throw new Error("There should be at least 2 points to create a scale");e=r.map((function(t){var e=t[0].trim().toUpperCase();if(!h(e))throw new Error("The color '".concat(e," is not valid'"));return e})),n=r.map((function(t,e){var n=parseFloat(t[1]);if(Number.isNaN(n))throw new Error("The second part of every point should be a number. Error in point ".concat(e,": ").concat(t));return n}))}return{range:e,domain:n}},R=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.keyFormatter,r=void 0===n?f:n,i=e.valueFormatter,o=void 0===i?f:i;if(null!==t&&"string"!=typeof t)throw new Error("The attribute text has to be of type string");if(t&&""!==t.trim()){var a=t.split(",").map((function(t){return t.split(":")})),s={};return a.forEach((function(t){if(2!==t.length)throw new Error("Bad block: ".concat(t.join(":"),"\n The blocks of the string should follow the format KEY:VALUE"));s[r(t[0])]=o(t[1])})),s}return{}},N=g,I=function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{initialValue:{top:0,bottom:0,left:0,right:0}},r=function(t){E(r,t);var e=A(r);function r(){var t;return w(this,r),(t=e.call(this)).margin=n.initialValue,t}return S(r,[{key:"attributeChangedCallback",value:function(t,e,n){e!==n&&L.includes(t)&&(this[t]=n),k(C(r.prototype),"attributeChangedCallback",this).call(this,t,e,n)}}],[{key:"observedAttributes",get:function(){return[].concat(m(k(C(r),"observedAttributes",this)),m(L))}}]),r}(t),i=y(F);try{var o=function(){var t=e.value;Object.defineProperty(r.prototype,"margin".concat(t),{get:function(){return this.margin[t]||0},set:function(e){this.margin[t]=+e}})};for(i.s();!(e=i.n()).done;)o()}catch(t){i.e(t)}finally{i.f()}return r}},594:function(t,e,n){"use strict";var r=n(608),i=n(604);e.a=function(t){return Object(i.a)(t)&&Object(r.a)(t)}},595:function(t,e,n){"use strict";e.a=function(t,e,n){for(var r=-1,i=null==t?0:t.length;++r-1}},598:function(t,e,n){"use strict";var r=n(614);var i=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)},o=Math.max;var a=function(t,e,n){return e=o(void 0===e?t.length-1:e,0),function(){for(var r=arguments,a=-1,s=o(r.length-e,0),l=Array(s);++a0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(c);e.a=function(t,e){return h(a(t,e,r.a),t+"")}},599:function(t,e,n){"use strict";var r=function(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o-1:!!a&&Object(i.a)(t,e,n)>-1},C=n(632),F=n(619),L=n(613),M=n(609);function P(t,e){for(var n=0;n5&&(t=this._ftWidth-5);var e=this._ftHeight/4;return"M0,"+e+"L"+t+","+e+"L"+t+","+3*e+"L0,"+3*e+"L0,"+e+"M"+t+",0L"+this._ftWidth+","+2*e+"L"+t+","+this._ftHeight+"Z"}}])&&P(e.prototype,n),r&&P(e,r),t}();function R(t,e){for(var n=0;nNumber(n.end)||Number(r.end)=0?(e._rows[n].push(t),e.featuresMap.set(t,n)):(e._rows.push([t]),e.featuresMap.set(t,e._rows.length-1))})),this._rowHeight=Math.min(this._layoutHeight/this._rows.length,this._minHeight)}},{key:"getOffset",value:function(){return this._rows.length*this._rowHeightt.length)&&(e=t.length);for(var n=0,r=new Array(e);n500&&(n=t.getSingleBaseWidth()<4?4:1),t._featureShape.getFeatureShape(t.getSingleBaseWidth()/2,t._layoutObj.getFeatureHeight(),n,t._getShape(e))})).attr("transform",(function(e){return"translate(".concat(t.getXFromSeqPosition(Number(e.feature.start)+Number(e.position)-1)+t.getSingleBaseWidth()/4,",\n ").concat(t._layoutObj.getFeatureYPos(e.feature),")")})).attr("fill","#06038D").style("fill-opacity",(function(t){var e=t.feature;return e.opacity?e.opacity:.9})).style("stroke-opacity",(function(t){var e=t.feature;return e.opacity?e.opacity:.9})).call(this.bindEvents,this)}},{key:"_applyFilters",value:function(){var t=this;if(!this._filters||this._filters.length<=0)this._data=this._originalData;else{var e=Object(C.a)(this._filters,"category"),n=Object.values(e).map((function(e){var n=e.map((function(e){return e.filterFn(t._originalData)}));return F.a.apply(void 0,$(n))})),r=L.a.apply(void 0,$(n));this._data=r}}},{key:"refresh",value:function(){var t=this;if(this.xScale&&this.seq_g){var e=this.seq_g.selectAll("g.fragment-group").data(this._data.reduce((function(t,e){return t.concat(e.locations.reduce((function(t,n){return t.concat(n.fragments.map((function(t){return Object.assign({},t,{feature:e})})))}),[]))}),[])),n=this.seq_g.selectAll("g.residue-group").data(this._data.reduce((function(t,e){var n;return t.concat([null===(n=e.ptms)||void 0===n?void 0:n.reduce((function(t){return t.concat((function(t){return Object.assign({},t,{feature:e,position:t.position})}))}),[])])}),[]));e.selectAll("path.feature").attr("d",(function(e){return t._featureShape.getFeatureShape(t.getSingleBaseWidth(),t._layoutObj.getFeatureHeight(e),e.end?e.end-e.start+1:1,t._getShape(e))})).attr("transform",(function(e){return"translate(".concat(t.getXFromSeqPosition(e.start),",").concat(t._layoutObj.getFeatureYPos(e.feature),")")})),n.selectAll("path.residue").attr("d",(function(e){var n=1;return t.length>500&&(n=t.getSingleBaseWidth()<4?4:1),t._featureShape.getFeatureShape(t.getSingleBaseWidth()/2,t._layoutObj.getFeatureHeight(e),n,t._getShape(e))})).attr("transform",(function(e){return"translate(".concat(t.getXFromSeqPosition(Number(e.feature.start)+Number(e.position)-1)+t.getSingleBaseWidth()/4,",").concat(t._layoutObj.getFeatureYPos(e.feature),")")})),e.selectAll("rect.outer-rectangle").attr("width",(function(e){return t.getSingleBaseWidth()*(e.end?e.end-e.start+1:1)})).attr("height",(function(e){return t._layoutObj.getFeatureHeight(e)})).attr("transform",(function(e){return"translate(".concat(t.getXFromSeqPosition(e.start),",").concat(t._layoutObj.getFeatureYPos(e.feature),")")})),this._updateHighlight()}}},{key:"_updateHighlight",value:function(){this.trackHighlighter.updateHighlight()}}])&&J(e.prototype,n),i&&J(e,i),a}(M.a);e.default=it},609:function(t,e,n){"use strict";var r=n(585),i=n(593),o=n(665);function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=t&&("undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"]);if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(t){s=!0,i=t}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return l(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4?arguments[4]:void 0,a=arguments.length>5?arguments[5]:void 0,s=arguments.length>6?arguments[6]:void 0;e&&(e=e.feature?e.feature:e);var l={eventtype:t,coords:y._getClickCoords(),feature:e,target:s};return n&&(e&&e.fragments?l.highlight=e.fragments.map((function(t){return"".concat(t.start,":").concat(t.end)})).join(","):r.event&&r.event.shiftKey&&this._highlight?l.highlight="".concat(this._highlight,",").concat(o,":").concat(a):l.highlight=o&&a?"".concat(o,":").concat(a):null),i&&(l.selectedid=e&&e.protvistaFeatureId),new CustomEvent("change",{detail:l,bubbles:!0,cancelable:!0})}},{key:"bindEvents",value:function(t,e){t.on("mouseover",(function(t,n,r){e.dispatchEvent(e.createEvent("mouseover",t,"onmouseover"===e._highlightEvent,!1,t.start,t.end,r[n]))})).on("mouseout",(function(){e.dispatchEvent(e.createEvent("mouseout",null,"onmouseover"===e._highlightEvent))})).on("click",(function(t,n,r){e.dispatchEvent(e.createEvent("click",t,"onclick"===e._highlightEvent,!0,t.start,t.end,r[n]))}))}}])&&c(a.prototype,l),f&&c(a,f),y}(f(HTMLElement));e.a=Object(i.f)(y,{initialValue:{top:10,right:10,bottom:10,left:10}})},613:function(t,e,n){"use strict";var r=n(590),i=n(621),o=n(596),a=n(595),s=n(664),l=n(616),c=Math.min;var u=function(t,e,n){for(var u=n?a.a:o.a,h=t[0].length,f=t.length,p=f,d=Array(f),g=1/0,b=[];p--;){var y=t[p];p&&e&&(y=Object(r.a)(y,Object(s.a)(e))),g=c(y.length,g),d[p]=!n&&(e||h>=120&&y.length>=120)?new i.a(p&&y):void 0}y=t[0];var m=-1,v=d[0];t:for(;++m=200){var g=e?null:f(t);if(g)return Object(h.a)(g);u=!1,i=l.a,d=new o.a}else d=e?[]:p;t:for(;++rt.length)&&(e=t.length);for(var n=0,r=new Array(e);n".concat(t.map((function(t){var e,n,r=i.find((function(e){return e.name===t.code}));return r?"
  • ').concat(r.shortDescription,": ").concat(t.source?(e=t.source,(null===(n=e.name)||void 0===n?void 0:n.toLowerCase())==="PubMed".toLowerCase()?"".concat(e.id," (").concat(e.name," EuropePMC)"):" ").concat(e.id," ").concat(e.name?"(".concat(e.name,")"):"")):"","
  • "):""})).join(""),"\n "):""},h=function(t){return"
      ".concat(t.map((function(t){return'
    • '.concat(t.name," ").concat(t.url?'').concat(t.id,""):"".concat(t.name," ").concat(t.id),"
    • ")})).join(""),"
    ")},f={A:"alanine",S:"serine",T:"threonine",Y:"tyrosine"},p=function(t,e){var n=t.peptide,r=t.begin,i=Number(r)+e.position-1,o=n.charAt(e.position-1);return"".concat(i," phospho").concat(f[o])},d=function(t){var e="PROTEOMICS_PTM"===t.type?function(t){if(!t)return"";var e=t.flatMap((function(t){return t.dbReferences.map((function(t){return t.id}))})),n=o(new Set(e.flat()));return"\n
      ".concat(n.map((function(t){var e="Glue project"===t?"PXD012174":t;return"
    • ').concat(e,' (PRIDE\n ').concat("Glue project"===t?')
    • Publication: 31819260 (PubMed)
    • ':' PeptideAtlas)')})).join(""),"
    \n")}(t.ptms):u(t.evidences),n="PROTEOMICS_PTM"===t.type&&t.ptms.map((function(e){return p(t,e)})),r="PROTEOMICS_PTM"===t.type&&t.ptms.flatMap((function(t){return t.dbReferences.map((function(t){return t.id}))})),i=t.description;if("BINDING"===t.type||"Binding site"===t.type){var a="";t.ligandPart&&(a+="".concat(t.ligandPart.name," of ")),t.ligand&&(a+=t.ligand.name),t.description&&(a+="; ".concat(t.description)),i=a}try{return"\n ".concat(i?"
    Description

    ".concat(i,"

    "):"","\n ").concat(t.matchScore?"
    Match score

    ".concat(t.matchScore,"%

    "):"","\n ").concat(t.ftId?"
    Feature ID

    ".concat(t.ftId,"

    "):"","\n ").concat(t.alternativeSequence?"
    Alternative sequence

    ".concat(t.alternativeSequence,"

    "):"","\n ").concat(n?'
    PTMs
      '.concat(n.map((function(t){return"
    • ".concat(t,"
    • ")})).join(""),"
    \n "):"","\n ").concat(t.peptide&&"PROTEOMICS_PTM"===t.type?'
    Peptidoform

    '.concat(function(t,e){if(!e)return"";var n=e.map((function(t){return{name:t.name,position:t.position}})),r="",i=0;return n.forEach((function(e){r="".concat(r).concat(t.slice(i,e.position),"[").concat(e.name,"]"),i=e.position})),r="".concat(r).concat(t.slice(i)),"

    ".concat(r,"

    ")}(t.peptide,t.ptms),"

    "):"","\n ").concat(t.peptide&&"PROTEOMICS_PTM"!==t.type?"
    Peptide

    ".concat(t.peptide,"

    "):""," \n ").concat(t.xrefs?"
    Cross-references
    ".concat(h(t.xrefs)):"","\n ").concat(e?"
    Evidence
    ".concat(e):"","\n ").concat(t.ptms&&r&&!r.includes("Glue project")?'
    PTM statistical attributes
      '.concat(t.ptms.map((function(e){return e.dbReferences.map((function(n){return"
    • ".concat(n.id,'
    • \n
    • ').concat(p(t,e),'
    • \n
    • PubMed ID: \n ').concat(n.properties["Pubmed ID"],'\n
    • \n
    • Confidence score: ').concat(n.properties["Confidence score"],'
    • \n
    • Universal Spectrum Id: \n View on ProteomeXchange\n
    • \n
    • PSM Count: ').concat(n.properties["PSM Count"],'
    • \n
    • Site probability: ').concat(n.properties["Site probability"],"
    • \n ")})).join("")})).join(""),"
    "):"","\n ")}catch(t){return console.error(t),""}};function g(t){return(g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function b(t,e){for(var n=0;n0&&(e=function(t){return t.map((function(t){var e={};return t.begin&&(e.start=t.begin),l(l({},t),e)}))}(e=n.map((function(t){return k(k({},t),{},{tooltipContent:d(t),protvistaFeatureId:Object(r.a)()})})))),e},A=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&w(t,e)}(s,t);var e,n,r,i,o,a=(e=s,n=_(),function(){var t,r=O(e);if(n){var i=O(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return y(this,t)});function s(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),(t=a.call(this))._adaptedData=[],t}return r=s,(i=[{key:"connectedCallback",value:function(){this.subscribers=this.getAttribute("subscribers"),this._filters=this.getAttribute("filters")?this.getAttribute("filters").split(","):[],this._addLoaderListeners()}},{key:"data",set:function(t){this._emitEvent(t)}},{key:"subscribers",get:function(){return this._subscribers},set:function(t){t&&(this._subscribers=t.split(","))}},{key:"parseEntry",value:function(t){this._adaptedData=j(t)}},{key:"filterData",value:function(){var t=this;Array.isArray(this._adaptedData)&&this._filters.length>0&&(this._adaptedData=this._adaptedData.filter((function(e){return t._filters.includes(e.type)})))}},{key:"adaptedData",get:function(){return this._adaptedData}},{key:"_setSubscriberData",value:function(){var t=this;this.subscribers.forEach((function(e){var n=document.querySelector(e);n?n.data=t._adaptedData:console.error("Element with id '".concat(e,"' not found"))}))}},{key:"_emitEvent",value:function(t){this.parseEntry(t),this.filterData(),this.subscribers&&this._setSubscriberData(),this.dispatchEvent(new CustomEvent("load",{detail:{payload:this._adaptedData},bubbles:!0,cancelable:!0}))}},{key:"_addLoaderListeners",value:function(){var t=this;this.addEventListener("load",(function(e){if(e.target!==t){e.stopPropagation();try{if(e.detail.payload.errorMessage)throw e.detail.payload.errorMessage;t._emitEvent(e.detail.payload)}catch(e){t.dispatchEvent(new CustomEvent("error",{detail:e,bubbles:!0,cancelable:!0}))}}}))}}])&&b(r.prototype,i),o&&b(r,o),s}(m(HTMLElement));e.a=A},629:function(t,e,n){"use strict";n.d(e,"b",(function(){return y}));var r=n(675);function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return a(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return a(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,l=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){l=!0,o=t},f:function(){try{s||null==n.return||n.return()}finally{if(l)throw o}}}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n1&&void 0!==arguments[1]?arguments[1]:new Headers({accept:"application/json"}),n=b.get(t);if(n)return n;var r=g(void 0,void 0,void 0,regeneratorRuntime.mark((function n(){var r,i;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,window.fetch(t,{headers:e});case 2:if((r=n.sent).ok){n.next=5;break}throw new Error("Request Failed: Status = ".concat(r.status,"; URI = ").concat(t,"; Time = ").concat(new Date));case 5:if(204!==r.status){n.next=7;break}return n.abrupt("return",{payload:null,headers:r.headers});case 7:return n.next=9,r.json();case 9:return i=n.sent,n.abrupt("return",{payload:i,headers:r.headers});case 11:case"end":return n.stop()}}),n)})));return b.set(t,r),r.catch((function(){return b.delete(t)})),r},m=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&f(t,e)}(b,t);var e,n,i,a,c,u=(e=b,n=h(),function(){var t,r=p(e);if(n){var i=p(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return l(this,t)});function b(){var t;return d(this,b),(t=u.call(this))._data=null,t.selector=(t.getAttribute("selector")||"").trim()||function(t){return t},t}return i=b,c=[{key:"is",get:function(){return"data-loader"}}],(a=[{key:"fetch",value:function(){return g(this,void 0,void 0,regeneratorRuntime.mark((function t(){var e,n,i,a,s,l;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(c=this.children,(e=Array.from(c).filter((function(t){return t.matches('source[src], script[type="application/json"]')}))).length){t.next=3;break}return t.abrupt("return");case 3:n=[],a=o(e),t.prev=5,a.s();case 7:if((s=a.n()).done){t.next=31;break}if(l=s.value,t.prev=9,!(l instanceof HTMLSourceElement)){t.next=22;break}return t.t0=Object,t.t1=Object,t.t2={},t.next=16,y(l.src);case 16:t.t3=t.sent,t.t4=t.t1.assign.call(t.t1,t.t2,t.t3),t.t5={srcElement:l,src:l.src},i=t.t0.assign.call(t.t0,t.t4,t.t5),t.next=23;break;case 22:i={payload:JSON.parse(l.textContent)};case 23:return t.abrupt("break",31);case 26:t.prev=26,t.t6=t.catch(9),n.push(t.t6);case 29:t.next=7;break;case 31:t.next=36;break;case 33:t.prev=33,t.t7=t.catch(5),a.e(t.t7);case 36:return t.prev=36,a.f(),t.finish(36);case 39:if(i){t.next=43;break}this._errors=n;try{this.dispatchEvent(new CustomEvent("error",{detail:n,bubbles:!0,cancelable:!0}))}catch(t){console.error(t)}return t.abrupt("return");case 43:"string"==typeof this.selector?this._data=Object(r.a)(i.payload,this.selector):this._data=this.selector(i.payload),i.payload=this.data,this.dispatchEvent(new CustomEvent("load",{detail:i,bubbles:!0,cancelable:!0}));case 46:case"end":return t.stop()}var c}),t,this,[[5,33,36,39],[9,26]])})))}},{key:"data",get:function(){return this._data}},{key:"loaded",get:function(){return!!this.data}},{key:"errors",get:function(){return this._errors}},{key:"selector",get:function(){return this._selector},set:function(t){this._selector=t}},{key:"connectedCallback",value:function(){this.fetch()}}])&&s(i.prototype,a),c&&s(i,c),b}(c(HTMLElement));e.a=m},700:function(t,e,n){"use strict";var r=n(585),i=n(593);function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,e){for(var n=0;n0&&(this._padding=10)}},{key:"connectedCallback",value:function(){this._refreshWidth(),this.closest("protvista-manager")&&(this.manager=this.closest("protvista-manager"),this.manager.register(this)),this._length=parseFloat(this.getAttribute("length")),this._displaystart=parseFloat(this.getAttribute("displaystart"))||1,this._displayend=parseFloat(this.getAttribute("displayend"))||this._length,this._highlightStart=parseFloat(this.getAttribute("highlightStart")),this._highlightEnd=parseFloat(this.getAttribute("highlightEnd")),this._rulerstart=parseFloat(this.getAttribute("rulerStart"))||1,this._onResize=this._onResize.bind(this),this._createNavRuler()}},{key:"disconnectedCallback",value:function(){this.manager&&this.manager.unregister(this),this._ro&&this._ro.unobserve(this),window.removeEventListener("resize",this._onResize)}},{key:"attributeChangedCallback",value:function(t,e,n){e!==n&&(this["_".concat(t)]=parseFloat(n),this._updateNavRuler())}},{key:"width",get:function(){return this._width},set:function(t){this._width=t}},{key:"_createNavRuler",value:function(){var t=this;this._x=Object(r.scaleLinear)().range([this._padding,this.width-this._padding]),this._x.domain([this._rulerstart,this._rulerstart+this._length-1]),Object(r.select)(this).selectAll("div").remove(),this._container=Object(r.select)(this).append("div").attr("class","container"),this._svg=this._container.append("svg").attr("id","").attr("width",this.width).attr("height",this.height),this._xAxis=Object(r.axisBottom)(this._x),this._displaystartLabel=this._svg.append("text").attr("class","start-label").attr("x",0).attr("y",this.height-this._padding),this._displayendLabel=this._svg.append("text").attr("class","end-label").attr("x",this.width).attr("y",this.height-this._padding).attr("text-anchor","end"),this._axis=this._svg.append("g").attr("class","x axis").call(this._xAxis),this._viewport=Object(r.brushX)().extent([[this._padding,0],[this.width-this._padding,.51*this.height]]).on("brush",(function(){r.event.selection&&(t._displaystart=Object(r.format)("d")(t._x.invert(r.event.selection[0])),t._displayend=Object(r.format)("d")(t._x.invert(r.event.selection[1])),t.dontDispatch||t.dispatchEvent(new CustomEvent("change",{detail:{displayend:t._displayend,displaystart:t._displaystart,extra:{transform:r.event.transform}},bubbles:!0,cancelable:!0})),t._updateLabels(),t._updatePolygon())})),this._brushG=this._svg.append("g").attr("class","brush").call(this._viewport),this._brushG.call(this._viewport.move,[this._x(this._displaystart),this._x(this._displayend)]),this.polygon=this._svg.append("polygon").attr("class","zoom-polygon").attr("fill","#777").attr("fill-opacity","0.3"),this._updateNavRuler(),"ResizeObserver"in window&&(this._ro=new ResizeObserver(this._onResize),this._ro.observe(this)),window.addEventListener("resize",this._onResize)}},{key:"_onResize",value:function(){this._refreshWidth(),this._x=this._x.range([this._padding,this.width-this._padding]),this._svg.attr("width",this.width),this._viewport.extent([[this._padding,0],[this.width-this._padding,.51*this.height]]),this._brushG.call(this._viewport),this._updateNavRuler()}},{key:"_updateNavRuler",value:function(){this._x&&(this._container.style("padding-left","".concat(this.margin.left,"px")).style("padding-right","".concat(this.margin.right,"px")).style("padding-top","".concat(this.margin.top,"px")).style("padding-bottom","".concat(this.margin.bottom,"px")),this._x.domain([this._rulerstart,this._rulerstart+this._length-1]),this._axis.call(this._xAxis),this._updatePolygon(),this._updateLabels(),this._brushG&&(this.dontDispatch=!0,this._brushG.call(this._viewport.move,[this._x(this._displaystart),this._x(this._displayend)]),this.dontDispatch=!1))}},{key:"_updateLabels",value:function(){this._displaystartLabel&&this._displaystartLabel.text(this._displaystart),this._displayendLabel&&this._displayendLabel.attr("x",this.width).text(this._displayend)}},{key:"_updatePolygon",value:function(){this.polygon&&this.polygon.attr("points","".concat(this._x(this._displaystart),",").concat(this.height/2,"\n ").concat(this._x(this._displayend),",").concat(this.height/2,"\n ").concat(this.width,",").concat(this.height,"\n 0,").concat(this.height))}}])&&a(i.prototype,o),l&&a(i,l),p}(l(HTMLElement));e.a=Object(i.f)(p)},701:function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t){return function(t){if(Array.isArray(t))return o(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return o(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n1&&void 0!==arguments[1]?arguments[1]:0,n=(l[t[e+0]]+l[t[e+1]]+l[t[e+2]]+l[t[e+3]]+"-"+l[t[e+4]]+l[t[e+5]]+"-"+l[t[e+6]]+l[t[e+7]]+"-"+l[t[e+8]]+l[t[e+9]]+"-"+l[t[e+10]]+l[t[e+11]]+l[t[e+12]]+l[t[e+13]]+l[t[e+14]]+l[t[e+15]]).toLowerCase();if(!s(n))throw TypeError("Stringified UUID is invalid");return n},p=0,d=0;e.a=function(t,e,n){var r=e&&n||0,i=e||new Array(16),a=(t=t||{}).node||u,s=void 0!==t.clockseq?t.clockseq:h;if(null==a||null==s){var l=t.random||(t.rng||o)();null==a&&(a=u=[1|l[0],l[1],l[2],l[3],l[4],l[5]]),null==s&&(s=h=16383&(l[6]<<8|l[7]))}var c=void 0!==t.msecs?t.msecs:Date.now(),g=void 0!==t.nsecs?t.nsecs:d+1,b=c-p+(g-d)/1e4;if(b<0&&void 0===t.clockseq&&(s=s+1&16383),(b<0||c>p)&&void 0===t.nsecs&&(g=0),g>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");p=c,d=g,h=s;var y=(1e4*(268435455&(c+=122192928e5))+g)%4294967296;i[r++]=y>>>24&255,i[r++]=y>>>16&255,i[r++]=y>>>8&255,i[r++]=255&y;var m=c/4294967296*1e4&268435455;i[r++]=m>>>8&255,i[r++]=255&m,i[r++]=m>>>24&15|16,i[r++]=m>>>16&255,i[r++]=s>>>8|128,i[r++]=255&s;for(var v=0;v<6;++v)i[r+v]=a[v];return e||f(i)}},917:function(t,e,n){"use strict";var r,i,o,a,s,l,c=n(63),u=n(593);function h(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}var f,p,d=Object(c.b)(r||(r=h(["pd-group-trigger__expanded"]))),g=Object(c.b)(i||(i=h(["active"]))),b=Object(c.b)(o||(o=h(["transparent"]))),y=Object(c.b)(a||(a=h(["overlapped"]))),m=Object(c.b)(s||(s=h(["hidden"]))),v=Object(c.b)(l||(l=h(["\n protvista-datatable table {\n width: 100%;\n padding: 0;\n margin: 0;\n border-spacing: 0;\n }\n\n protvista-datatable table th {\n position: sticky;\n position: -webkit-sticky;\n position: -moz-sticky;\n position: -ms-sticky;\n position: -o-sticky;\n text-align: left;\n vertical-align: top;\n background-color: var(--protvista-datable__header-background, #fff);\n color: var(--protvista-datable__header-text, #393b42);\n text-overflow: ellipsis;\n top: 0;\n text-transform: uppercase;\n z-index: 400;\n }\n\n protvista-datatable table th .filter-wrap {\n display: flex;\n flex-direction: column;\n }\n\n protvista-datatable table th .filter-wrap select {\n width: fit-content;\n }\n\n protvista-datatable table td,\n protvista-datatable table th {\n padding: 0.2rem;\n border-bottom: 1px solid #c2c4c4;\n }\n\n protvista-datatable table tr:hover:not(.","):not(.",') {\n background-color: var(--protvista-datatable__hover, #f1f1f1);\n }\n\n protvista-datatable table td {\n cursor: pointer;\n }\n\n protvista-datatable table .pd-group-trigger {\n width: 1rem;\n }\n\n protvista-datatable table .pd-group-trigger button {\n background: none;\n border: none;\n padding: 0.2rem; // increase click area\n position: relative;\n text-decoration: none;\n cursor: pointer;\n transition: background 250ms ease-in-out, transform 150ms ease;\n -webkit-appearance: none;\n -moz-appearance: none;\n }\n\n protvista-datatable table .pd-group-trigger button:before {\n display: inline-block;\n content: " ";\n border-style: solid;\n border-width: 0.4rem 0 0.4rem 0.6rem;\n border-color: transparent transparent transparent #161d39;\n transition-duration: 0.3s;\n transition-property: transform;\n }\n\n protvista-datatable table .pd-group-trigger button.',":before {\n transform: rotate(90deg);\n }\n\n protvista-datatable table td:nth-child(1) {\n border-left: 0.5rem solid transparent;\n }\n\n protvista-datatable table ."," td:nth-child(1) {\n border-left: 0.5rem solid\n var(--protvista-datatable__overlapped, rgba(255, 0, 0, 0.8));\n }\n\n protvista-datatable table ."," {\n background-color: var(\n --protvista-datatable__active,\n rgba(255, 235, 59, 0.3)\n ) !important;\n }\n\n protvista-datatable table ."," {\n opacity: 0.2;\n }\n protvista-datatable table ."," td:hover {\n cursor: default;\n background-color: inherit;\n }\n\n protvista-datatable table ."," {\n display: none;\n }\n\n protvista-datatable table tr[data-group-for] td {\n padding-left: 1.7rem;\n padding-bottom: 0.7rem;\n }\n\n protvista-datatable table .odd {\n background-color: var(--protvista-datatable__odd, #e4e8eb);\n }\n\n protvista-datatable table .even {\n background-color: var(--protvista-datatable__even, #fff);\n }\n"])),g,b,d,y,g,b,b,m);function _(t){return(_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function w(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}function O(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=t&&("undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"]);if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(t){s=!0,i=t}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||k(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function S(t){return function(t){if(Array.isArray(t))return E(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||k(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function k(t,e){if(t){if("string"==typeof t)return E(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?E(t,e):void 0}}function E(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}(this.selectedFilters);try{for(r.s();!(n=r.n()).done;){var i=O(n.value,2),o=i[0],a=i[1],s=void 0;if((s=t.dataset.groupFor?this.querySelector('[data-id="'.concat(t.dataset.groupFor,'"]')).querySelector('[data-filter="'.concat(o,'"]')):t.querySelector('[data-filter="'.concat(o,'"]')))&&s.dataset.filterValue!==a)return!1}}catch(t){r.e(t)}finally{r.f()}return e}},{key:"updateRowStyling",value:function(){var t,e=this,n=0;null===(t=this.rows)||void 0===t||t.forEach((function(t){e.isRowVisible(t)?t.classList.remove(m.cssText):t.classList.add(m.cssText),t.dataset.groupFor||n++;var r=t.dataset,i=r.start,o=r.end;if(t.classList.add(n%2==0?"even":"odd"),!e.selectedid||e.selectedid!==t.dataset.id&&t.dataset.groupFor!==e.selectedid?t.classList.remove(g.cssText):t.classList.add(g.cssText),function(t,e,n,r){return t>r||e=r}(e.highlight[0],e.highlight[1],Number(i),Number(o))?t.classList.add(y.cssText):t.classList.remove(y.cssText),t.dataset.groupFor){var a=e.columns.length+1;t.cells[0].colSpan=a-t.cells.length+1}}))}},{key:"scrollIntoView",value:function(){if(this.selectedid){var t=this.querySelector('[data-id="'.concat(this.selectedid,'"]'));null==t||t.scrollIntoView({behavior:"smooth",block:"center"})}}},{key:"render",value:function(){var t=this.expandTable||this.hasAttribute("expand-table")?"height: auto":"max-height:".concat(this.height);return Object(c.c)(f||(f=w(['\n
    protvista-filter\n

    Published on NPM

    \n

    A custom element to filter data

    \n

    Usage

    \n
    <protvista-filter for="filtered-component-id"></protvista-filter>
    \n

    API Reference

    \n

    Properties

    \n

    filters: Array

    \n

    The filter configuration

    \n
    [\n  {\n    name: "filter_name",\n    type: {\n      name: "group_name",\n      text: "Group Label"\n    },\n    options: {\n      labels: ["Filter option label"],\n      colors: ["#333"] // Array so you can specify colour ranges\n    },\n    filterData: item => {} // the filter function\n  }\n];
    \n

    Events

    \n

    When an option is selected, a change event is emitted, with type activefilters. It contains an array of the selected filters, which contains callback function to apply to the data.

    \n'},170:function(t,e,n){"use strict";n.r(e);var r,i,o,a,c,u=n(0),s=n.n(u),l=n(629),f=n(803),h=n(63),p=n(632);function d(t){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function g(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}function y(t,e){for(var n=0;n","\n
    \n ","\n
    \n "])),n,e[n].map((function(e){return Object(h.c)(o||(o=g(["\n ","\n "])),t.getCheckBox(e))})))})))}},{key:"getCheckBox",value:function(t){var e=this,n=t.name,r=t.options,i=r.labels;null==r.colors.length&&(r.colors=[r.colors]);var o=r.colors.length>1;return Object(h.c)(a||(a=g(['\n \n \n \n \n ',"\n \n \n "])),o?"compound":"",n,(function(){return e.toggleFilter(n)}),"background: ".concat(o?"\n linear-gradient(".concat(r.colors[0],",\n ").concat(r.colors[1],")\n "):r.colors[0],";"),i.join("/"))}},{key:"toggleFilter",value:function(t){var e=this;this.selectedFilters.has(t)?this.selectedFilters.delete(t):this.selectedFilters.add(t),this.dispatchEvent(new CustomEvent("change",{bubbles:!0,composed:!0,detail:{type:"filters",handler:"property",for:this.for,value:this.filters.filter((function(t){return e.selectedFilters.has(t.name)})).map((function(t){return{category:t.type.name,filterFn:t.filterData}}))}}))}}])&&y(e.prototype,n),u&&y(e,u),l}(h.a),S=n(603),k=n(745),E=n(620),j=n(701),M=n(111),x=n(35),P=n(1016),A=n.n(P),C=Math.sqrt(50),N=Math.sqrt(10),F=Math.sqrt(2);function R(t,e,n){var r=(e-t)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),o=r/Math.pow(10,i);return i>=0?(o>=C?10:o>=N?5:o>=F?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=C?10:o>=N?5:o>=F?2:1)}var L=function(t,e){return te?1:t>=e?0:NaN},D=function(t){var e=t,n=t;function r(t,e,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r>>1;n(t[o],e)<0?r=o+1:i=o}return r}return 1===t.length&&(e=function(e,n){return t(e)-n},n=function(t){return function(e,n){return L(t(e),n)}}(t)),{left:r,center:function(t,n,i,o){null==i&&(i=0),null==o&&(o=t.length);var a=r(t,n,i,o-1);return a>i&&e(t[a-1],n)>-e(t[a],n)?a-1:a},right:function(t,e,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r>>1;n(t[o],e)>0?i=o:r=o+1}return r}}};var T=D(L),I=T.right,H=(T.left,D((function(t){return null===t?NaN:+t})).center,I),q=function(t,e,n){t.prototype=e.prototype=n,n.constructor=t};function B(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function W(){}var V="\\s*([+-]?\\d+)\\s*",z="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",U="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",G=/^#([0-9a-f]{3,8})$/,Z=new RegExp("^rgb\\("+[V,V,V]+"\\)$"),X=new RegExp("^rgb\\("+[U,U,U]+"\\)$"),$=new RegExp("^rgba\\("+[V,V,V,z]+"\\)$"),Y=new RegExp("^rgba\\("+[U,U,U,z]+"\\)$"),K=new RegExp("^hsl\\("+[z,U,U]+"\\)$"),Q=new RegExp("^hsla\\("+[z,U,U,z]+"\\)$"),J={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};function tt(){return this.rgb().formatHex()}function et(){return this.rgb().formatRgb()}function nt(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=G.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?rt(e):3===n?new ct(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?it(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?it(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Z.exec(t))?new ct(e[1],e[2],e[3],1):(e=X.exec(t))?new ct(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=$.exec(t))?it(e[1],e[2],e[3],e[4]):(e=Y.exec(t))?it(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=K.exec(t))?ft(e[1],e[2]/100,e[3]/100,1):(e=Q.exec(t))?ft(e[1],e[2]/100,e[3]/100,e[4]):J.hasOwnProperty(t)?rt(J[t]):"transparent"===t?new ct(NaN,NaN,NaN,0):null}function rt(t){return new ct(t>>16&255,t>>8&255,255&t,1)}function it(t,e,n,r){return r<=0&&(t=e=n=NaN),new ct(t,e,n,r)}function ot(t){return t instanceof W||(t=nt(t)),t?new ct((t=t.rgb()).r,t.g,t.b,t.opacity):new ct}function at(t,e,n,r){return 1===arguments.length?ot(t):new ct(t,e,n,null==r?1:r)}function ct(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function ut(){return"#"+lt(this.r)+lt(this.g)+lt(this.b)}function st(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function lt(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function ft(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new pt(t,e,n,r)}function ht(t){if(t instanceof pt)return new pt(t.h,t.s,t.l,t.opacity);if(t instanceof W||(t=nt(t)),!t)return new pt;if(t instanceof pt)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,c=o-i,u=(o+i)/2;return c?(a=e===o?(n-r)/c+6*(n0&&u<1?0:a,new pt(a,c,u,t.opacity)}function pt(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function dt(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function gt(t,e,n,r,i){var o=t*t,a=o*t;return((1-3*t+3*o-a)*e+(4-6*o+3*a)*n+(1+3*t+3*o-3*a)*r+a*i)/6}q(W,nt,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:tt,formatHex:tt,formatHsl:function(){return ht(this).formatHsl()},formatRgb:et,toString:et}),q(ct,at,B(W,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new ct(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new ct(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){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:ut,formatHex:ut,formatRgb:st,toString:st})),q(pt,(function(t,e,n,r){return 1===arguments.length?ht(t):new pt(t,e,n,null==r?1:r)}),B(W,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new pt(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new pt(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new ct(dt(t>=240?t-240:t+120,i,r),dt(t,i,r),dt(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var yt=function(t){return function(){return t}};function mt(t,e){return function(n){return t+n*e}}function bt(t){return 1==(t=+t)?vt:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):yt(isNaN(e)?n:e)}}function vt(t,e){var n=e-t;return n?mt(t,n):yt(isNaN(t)?e:t)}var _t=function t(e){var n=bt(e);function r(t,e){var r=n((t=at(t)).r,(e=at(e)).r),i=n(t.g,e.g),o=n(t.b,e.b),a=vt(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=o(e),t.opacity=a(e),t+""}}return r.gamma=t,r}(1);function wt(t){return function(e){var n,r,i=e.length,o=new Array(i),a=new Array(i),c=new Array(i);for(n=0;n=1?(n=1,e-1):Math.floor(n*e),i=t[r],o=t[r+1],a=r>0?t[r-1]:2*i-o,c=ro&&(i=e.slice(o,i),c[a]?c[a]+=i:c[++a]=i),(n=n[0])===(r=r[0])?c[a]?c[a]+=r:c[++a]=r:(c[++a]=null,u.push({i:a,x:jt(n,r)})),o=At.lastIndex;return oe&&(n=t,t=e,e=n),s=function(n){return Math.max(t,Math.min(e,n))}),r=u>2?qt:Ht,i=o=null,f}function f(e){return null==e||isNaN(e=+e)?n:(i||(i=r(a.map(t),c,u)))(t(s(e)))}return f.invert=function(n){return s(e((o||(o=r(c,a.map(t),jt)))(n)))},f.domain=function(t){return arguments.length?(a=Array.from(t,Lt),l()):a.slice()},f.range=function(t){return arguments.length?(c=Array.from(t),l()):c.slice()},f.rangeRound=function(t){return c=Array.from(t),u=Rt,l()},f.clamp=function(t){return arguments.length?(s=!!t||Tt,l()):s!==Tt},f.interpolate=function(t){return arguments.length?(u=t,l()):u},f.unknown=function(t){return arguments.length?(n=t,f):n},function(n,r){return t=n,e=r,l()}}function Vt(){return Wt()(Tt,Tt)}function zt(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}var Ut=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Gt(t){if(!(e=Ut.exec(t)))throw new Error("invalid format: "+t);var e;return new Zt({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function Zt(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}Gt.prototype=Zt.prototype,Zt.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};function Xt(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}var $t,Yt,Kt,Qt,Jt=function(t){return(t=Xt(Math.abs(t)))?t[1]:NaN},te=function(t,e){var n=Xt(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")},ee={"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return te(100*t,e)},r:te,s:function(t,e){var n=Xt(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-($t=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Xt(t,Math.max(0,e+o-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}},ne=function(t){return t},re=Array.prototype.map,ie=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];Yt=function(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?ne:(e=re.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,o=[],a=0,c=e[0],u=0;i>0&&c>0&&(u+c+1>r&&(c=Math.max(1,r-u)),o.push(t.substring(i-=c,i+c)),!((u+=c+1)>r));)c=e[a=(a+1)%e.length];return o.reverse().join(n)}),i=void 0===t.currency?"":t.currency[0]+"",o=void 0===t.currency?"":t.currency[1]+"",a=void 0===t.decimal?".":t.decimal+"",c=void 0===t.numerals?ne:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(re.call(t.numerals,String)),u=void 0===t.percent?"%":t.percent+"",s=void 0===t.minus?"−":t.minus+"",l=void 0===t.nan?"NaN":t.nan+"";function f(t){var e=(t=Gt(t)).fill,n=t.align,f=t.sign,h=t.symbol,p=t.zero,d=t.width,g=t.comma,y=t.precision,m=t.trim,b=t.type;"n"===b?(g=!0,b="g"):ee[b]||(void 0===y&&(y=12),m=!0,b="g"),(p||"0"===e&&"="===n)&&(p=!0,e="0",n="=");var v="$"===h?i:"#"===h&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",_="$"===h?o:/[%p]/.test(b)?u:"",w=ee[b],O=/[defgprs%]/.test(b);function S(t){var i,o,u,h=v,S=_;if("c"===b)S=w(t)+S,t="";else{var k=(t=+t)<0||1/t<0;if(t=isNaN(t)?l:w(Math.abs(t),y),m&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),k&&0==+t&&"+"!==f&&(k=!1),h=(k?"("===f?f:s:"-"===f||"("===f?"":f)+h,S=("s"===b?ie[8+$t/3]:"")+S+(k&&"("===f?")":""),O)for(i=-1,o=t.length;++i(u=t.charCodeAt(i))||u>57){S=(46===u?a+t.slice(i+1):t.slice(i))+S,t=t.slice(0,i);break}}g&&!p&&(t=r(t,1/0));var E=h.length+t.length+S.length,j=E>1)+h+t+S+j.slice(E);break;default:t=j+h+t+S}return c(t)}return y=void 0===y?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),S.toString=function(){return t+""},S}return{format:f,formatPrefix:function(t,e){var n=f(((t=Gt(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(Jt(e)/3))),i=Math.pow(10,-r),o=ie[8+r/3];return function(t){return n(i*t)+o}}}}({thousands:",",grouping:[3],currency:["$",""]}),Kt=Yt.format,Qt=Yt.formatPrefix;function oe(t,e,n,r){var i,o=function(t,e,n){var r=Math.abs(e-t)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=C?i*=10:o>=N?i*=5:o>=F&&(i*=2),e0)return[t];if((r=e0){var u=Math.round(t/a),s=Math.round(e/a);for(u*ae&&--s,o=new Array(i=s-u+1);++ce&&--f,o=new Array(i=f-l+1);++c0;){if((i=R(u,s,n))===r)return o[a]=u,o[c]=s,e(o);if(i>0)u=Math.floor(u/i)*i,s=Math.ceil(s/i)*i;else{if(!(i<0))break;u=Math.ceil(u*i)/i,s=Math.floor(s*i)/i}r=i}return t},t}function ce(t){return function(t){if(Array.isArray(t))return ue(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return ue(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ue(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ue(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0?he:Oe.find((function(t){return"nonDisease"===t.name})).filterData(r)[0].variants.length>0?pe:Oe.find((function(t){return"uncertain"===t.name})).filterData(r)[0].variants.length>0?ye:Oe.find((function(t){return"predicted"===t.name})).filterData(r)[0].variants.length>0?(e=t.polyphenScore,n=t.siftScore,Se((n||0+(1-e?e:1))/(e&&n?2:1))):ye},Ee=Oe,je=[{name:"Type",type:{name:"Type",text:"Filter Type"},options:{labels:["Dissulfide bond"],colors:["#CCC"]},filterData:function(t){return t.filter((function(t){return"DISULFID"===t.type}))}},{name:"carbohyd",type:{name:"Type",text:"Filter Type"},options:{labels:["Carbohydrate"],colors:["#CCC"]},filterData:function(t){return t.filter((function(t){return"CARBOHYD"===t.type}))}}];e.default=function(){Object(M.a)("protvista-variation",f.a),Object(M.a)("data-loader",l.a),Object(M.a)("protvista-track",S.default),Object(M.a)("protvista-feature-adapter",E.a),Object(M.a)("protvista-variation-adapter",k.a),Object(M.a)("protvista-manager",j.a),Object(M.a)("protvista-filter",O);var t=Object(u.useRef)(null),e=Object(u.useRef)(null),n=Object(u.useRef)(null);return Object(u.useEffect)((function(){null!==t&&(t.current.filters=Ee,n.current.filters=je),null!==e&&(e.current.colorConfig=ke)})),s.a.createElement(u.Fragment,null,s.a.createElement(x.default,{content:A.a}),s.a.createElement("protvista-manager",{attributes:"activefilters filters"},s.a.createElement("h3",null,"Track Filter"),s.a.createElement("div",{style:{display:"flex"}},s.a.createElement("protvista-filter",{style:{minWidth:"20%"},for:"my-track",ref:n}),s.a.createElement("protvista-track",{style:{minWidth:"70%"},length:"770",id:"my-track"},s.a.createElement("protvista-feature-adapter",{id:"adapter1"},s.a.createElement("data-loader",null,s.a.createElement("source",{src:"https://www.ebi.ac.uk/proteins/api/features/P05067?categories=PTM"}))))),s.a.createElement("h3",null,"Variation filter"),s.a.createElement("div",{style:{display:"flex"}},s.a.createElement("protvista-filter",{style:{minWidth:"20%"},for:"my-variation-track",ref:t}),s.a.createElement("protvista-variation",{length:"770",style:{minWidth:"70%"},id:"my-variation-track",ref:e},s.a.createElement("protvista-variation-adapter",null,s.a.createElement("data-loader",null,s.a.createElement("source",{src:"https://www.ebi.ac.uk/proteins/api/variation/P05067"})))))))}},593:function(t,e,n){"use strict";function r(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=t&&("undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"]);if(null==n)return;var r,i,o=[],a=!0,c=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(t){c=!0,i=t}finally{try{a||null==n.return||n.return()}finally{if(c)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return i(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&void 0!==arguments[0]?arguments[0]:{},n=e.min,r=void 0===n?-1/0:n,i=e.max,a=void 0===i?1/0:i;o(this,t),this.segments=[],this.max=a,this.min=r,this.regionString=null}var e,n,i;return e=t,(n=[{key:"encode",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.segments.map((function(n){var r=n.start,i=n.end,o=n.color;if(e)return"".concat(r,":").concat(i).concat(o?":".concat(o):"");var a=r===t.min?"":r,c=i===t.max?"":i;return"".concat(a,":").concat(c).concat(o?":".concat(o):"")})).join(",")}},{key:"decode",value:function(t){var e=this;void 0!==t&&(this.regionString=t),this.regionString?this.segments=this.regionString.split(",").map((function(t){var n=r(t.split(":"),4),i=n[0],o=n[1],a=n[2];if(void 0!==n[3])throw new Error("there should be at most 2 ':' per region. Region: ".concat(t));var c=i?Number(i):e.min,u=o?Number(o):e.max,s=""!==a?a:void 0;if(c>u){var l=[u,c];c=l[0],u=l[1]}if(ce.max&&(u=e.max),Number.isNaN(c))throw new Error("The parsed value of ".concat(i," is NaN. Region: ").concat(t));if(Number.isNaN(u))throw new Error("The parsed value of ".concat(o," is NaN. Region: ").concat(t));if(s&&!s.match(/^#[0-9a-f]{6,8}$/i))throw new Error("The parsed value of ".concat(a," is not a color in hex format. Region: ").concat(t));return{start:c,end:u,color:s}})):this.segments=[]}}])&&a(e.prototype,n),i&&a(e,i),t}();function u(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:400;p(this,t),this.element=e,this.timeStampWheelOutside=0,this.resetScrollableTimeout=null,this.scrollDelay=n}var e,n,r;return e=t,(n=[{key:"setElementScrollable",value:function(t){this.element.setAttribute("scrollable",t)}},{key:"startResetScrollableTimer",value:function(){var t=this;this.resetScrollableTimeout&&clearTimeout(this.resetScrollableTimeout),this.resetScrollableTimeout=setTimeout((function(){t.setElementScrollable(!0),t.resetScrollableTimeout=null}),this.scrollDelay)}},{key:"blockScroll",value:function(t){this.timeStampWheelOutside=t,this.setElementScrollable(!1),this.startResetScrollableTimer()}},{key:"wheel",value:function(t){var e=t.target,n=t.timeStamp;this.element.contains(e)?n=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,c=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){c=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw o}}}}function b(t){return function(t){if(Array.isArray(t))return _(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||v(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(t,e){if(t){if("string"==typeof t)return _(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_(t,e):void 0}}function _(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&void 0!==arguments[0]?arguments[0]:null,e=[],n=[];if(null!==t&&"string"!=typeof t)throw new Error("The attribute text has to be of type string");if(t&&""!==t.trim()){var r=t.split(",").map((function(t){return t.split(":")}));if(r.length<2)throw new Error("There should be at least 2 points to create a scale");e=r.map((function(t){var e=t[0].trim().toUpperCase();if(!f(e))throw new Error("The color '".concat(e," is not valid'"));return e})),n=r.map((function(t,e){var n=parseFloat(t[1]);if(Number.isNaN(n))throw new Error("The second part of every point should be a number. Error in point ".concat(e,": ").concat(t));return n}))}return{range:e,domain:n}},L=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.keyFormatter,r=void 0===n?h:n,i=e.valueFormatter,o=void 0===i?h:i;if(null!==t&&"string"!=typeof t)throw new Error("The attribute text has to be of type string");if(t&&""!==t.trim()){var a=t.split(",").map((function(t){return t.split(":")})),c={};return a.forEach((function(t){if(2!==t.length)throw new Error("Bad block: ".concat(t.join(":"),"\n The blocks of the string should follow the format KEY:VALUE"));c[r(t[0])]=o(t[1])})),c}return{}},D=g,T=function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{initialValue:{top:0,bottom:0,left:0,right:0}},r=function(t){E(r,t);var e=M(r);function r(){var t;return w(this,r),(t=e.call(this)).margin=n.initialValue,t}return S(r,[{key:"attributeChangedCallback",value:function(t,e,n){e!==n&&C.includes(t)&&(this[t]=n),k(P(r.prototype),"attributeChangedCallback",this).call(this,t,e,n)}}],[{key:"observedAttributes",get:function(){return[].concat(b(k(P(r),"observedAttributes",this)),b(C))}}]),r}(t),i=m(A);try{var o=function(){var t=e.value;Object.defineProperty(r.prototype,"margin".concat(t),{get:function(){return this.margin[t]||0},set:function(e){this.margin[t]=+e}})};for(i.s();!(e=i.n()).done;)o()}catch(t){i.e(t)}finally{i.f()}return r}},594:function(t,e,n){"use strict";var r=n(608),i=n(604);e.a=function(t){return Object(i.a)(t)&&Object(r.a)(t)}},595:function(t,e,n){"use strict";e.a=function(t,e,n){for(var r=-1,i=null==t?0:t.length;++r-1}},598:function(t,e,n){"use strict";var r=n(614);var i=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)},o=Math.max;var a=function(t,e,n){return e=o(void 0===e?t.length-1:e,0),function(){for(var r=arguments,a=-1,c=o(r.length-e,0),u=Array(c);++a0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(s);e.a=function(t,e){return f(a(t,e,r.a),t+"")}},599:function(t,e,n){"use strict";var r=function(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o-1:!!a&&Object(i.a)(t,e,n)>-1},P=n(632),A=n(619),C=n(613),N=n(609);function F(t,e){for(var n=0;n5&&(t=this._ftWidth-5);var e=this._ftHeight/4;return"M0,"+e+"L"+t+","+e+"L"+t+","+3*e+"L0,"+3*e+"L0,"+e+"M"+t+",0L"+this._ftWidth+","+2*e+"L"+t+","+this._ftHeight+"Z"}}])&&F(e.prototype,n),r&&F(e,r),t}();function L(t,e){for(var n=0;nNumber(n.end)||Number(r.end)=0?(e._rows[n].push(t),e.featuresMap.set(t,n)):(e._rows.push([t]),e.featuresMap.set(t,e._rows.length-1))})),this._rowHeight=Math.min(this._layoutHeight/this._rows.length,this._minHeight)}},{key:"getOffset",value:function(){return this._rows.length*this._rowHeightt.length)&&(e=t.length);for(var n=0,r=new Array(e);n500&&(n=t.getSingleBaseWidth()<4?4:1),t._featureShape.getFeatureShape(t.getSingleBaseWidth()/2,t._layoutObj.getFeatureHeight(),n,t._getShape(e))})).attr("transform",(function(e){return"translate(".concat(t.getXFromSeqPosition(Number(e.feature.start)+Number(e.position)-1)+t.getSingleBaseWidth()/4,",\n ").concat(t._layoutObj.getFeatureYPos(e.feature),")")})).attr("fill","#06038D").style("fill-opacity",(function(t){var e=t.feature;return e.opacity?e.opacity:.9})).style("stroke-opacity",(function(t){var e=t.feature;return e.opacity?e.opacity:.9})).call(this.bindEvents,this)}},{key:"_applyFilters",value:function(){var t=this;if(!this._filters||this._filters.length<=0)this._data=this._originalData;else{var e=Object(P.a)(this._filters,"category"),n=Object.values(e).map((function(e){var n=e.map((function(e){return e.filterFn(t._originalData)}));return A.a.apply(void 0,$(n))})),r=C.a.apply(void 0,$(n));this._data=r}}},{key:"refresh",value:function(){var t=this;if(this.xScale&&this.seq_g){var e=this.seq_g.selectAll("g.fragment-group").data(this._data.reduce((function(t,e){return t.concat(e.locations.reduce((function(t,n){return t.concat(n.fragments.map((function(t){return Object.assign({},t,{feature:e})})))}),[]))}),[])),n=this.seq_g.selectAll("g.residue-group").data(this._data.reduce((function(t,e){var n;return t.concat([null===(n=e.ptms)||void 0===n?void 0:n.reduce((function(t){return t.concat((function(t){return Object.assign({},t,{feature:e,position:t.position})}))}),[])])}),[]));e.selectAll("path.feature").attr("d",(function(e){return t._featureShape.getFeatureShape(t.getSingleBaseWidth(),t._layoutObj.getFeatureHeight(e),e.end?e.end-e.start+1:1,t._getShape(e))})).attr("transform",(function(e){return"translate(".concat(t.getXFromSeqPosition(e.start),",").concat(t._layoutObj.getFeatureYPos(e.feature),")")})),n.selectAll("path.residue").attr("d",(function(e){var n=1;return t.length>500&&(n=t.getSingleBaseWidth()<4?4:1),t._featureShape.getFeatureShape(t.getSingleBaseWidth()/2,t._layoutObj.getFeatureHeight(e),n,t._getShape(e))})).attr("transform",(function(e){return"translate(".concat(t.getXFromSeqPosition(Number(e.feature.start)+Number(e.position)-1)+t.getSingleBaseWidth()/4,",").concat(t._layoutObj.getFeatureYPos(e.feature),")")})),e.selectAll("rect.outer-rectangle").attr("width",(function(e){return t.getSingleBaseWidth()*(e.end?e.end-e.start+1:1)})).attr("height",(function(e){return t._layoutObj.getFeatureHeight(e)})).attr("transform",(function(e){return"translate(".concat(t.getXFromSeqPosition(e.start),",").concat(t._layoutObj.getFeatureYPos(e.feature),")")})),this._updateHighlight()}}},{key:"_updateHighlight",value:function(){this.trackHighlighter.updateHighlight()}}])&&Q(e.prototype,n),i&&Q(e,i),a}(N.a);e.default=it},609:function(t,e,n){"use strict";var r=n(585),i=n(593),o=n(665);function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function c(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=t&&("undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"]);if(null==n)return;var r,i,o=[],a=!0,c=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(t){c=!0,i=t}finally{try{a||null==n.return||n.return()}finally{if(c)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return u(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4?arguments[4]:void 0,a=arguments.length>5?arguments[5]:void 0,c=arguments.length>6?arguments[6]:void 0;e&&(e=e.feature?e.feature:e);var u={eventtype:t,coords:m._getClickCoords(),feature:e,target:c};return n&&(e&&e.fragments?u.highlight=e.fragments.map((function(t){return"".concat(t.start,":").concat(t.end)})).join(","):r.event&&r.event.shiftKey&&this._highlight?u.highlight="".concat(this._highlight,",").concat(o,":").concat(a):u.highlight=o&&a?"".concat(o,":").concat(a):null),i&&(u.selectedid=e&&e.protvistaFeatureId),new CustomEvent("change",{detail:u,bubbles:!0,cancelable:!0})}},{key:"bindEvents",value:function(t,e){t.on("mouseover",(function(t,n,r){e.dispatchEvent(e.createEvent("mouseover",t,"onmouseover"===e._highlightEvent,!1,t.start,t.end,r[n]))})).on("mouseout",(function(){e.dispatchEvent(e.createEvent("mouseout",null,"onmouseover"===e._highlightEvent))})).on("click",(function(t,n,r){e.dispatchEvent(e.createEvent("click",t,"onclick"===e._highlightEvent,!0,t.start,t.end,r[n]))}))}}])&&s(a.prototype,u),h&&s(a,h),m}(h(HTMLElement));e.a=Object(i.f)(m,{initialValue:{top:10,right:10,bottom:10,left:10}})},613:function(t,e,n){"use strict";var r=n(590),i=n(621),o=n(596),a=n(595),c=n(664),u=n(616),s=Math.min;var l=function(t,e,n){for(var l=n?a.a:o.a,f=t[0].length,h=t.length,p=h,d=Array(h),g=1/0,y=[];p--;){var m=t[p];p&&e&&(m=Object(r.a)(m,Object(c.a)(e))),g=s(m.length,g),d[p]=!n&&(e||f>=120&&m.length>=120)?new i.a(p&&m):void 0}m=t[0];var b=-1,v=d[0];t:for(;++b=200){var g=e?null:h(t);if(g)return Object(f.a)(g);l=!1,i=u.a,d=new o.a}else d=e?[]:p;t:for(;++rt.length)&&(e=t.length);for(var n=0,r=new Array(e);n".concat(t.map((function(t){var e,n,r=i.find((function(e){return e.name===t.code}));return r?"
  • ').concat(r.shortDescription,": ").concat(t.source?(e=t.source,(null===(n=e.name)||void 0===n?void 0:n.toLowerCase())==="PubMed".toLowerCase()?"".concat(e.id," (").concat(e.name," EuropePMC)"):" ").concat(e.id," ").concat(e.name?"(".concat(e.name,")"):"")):"","
  • "):""})).join(""),"\n "):""},f=function(t){return"
      ".concat(t.map((function(t){return'
    • '.concat(t.name," ").concat(t.url?'').concat(t.id,""):"".concat(t.name," ").concat(t.id),"
    • ")})).join(""),"
    ")},h={A:"alanine",S:"serine",T:"threonine",Y:"tyrosine"},p=function(t,e){var n=t.peptide,r=t.begin,i=Number(r)+e.position-1,o=n.charAt(e.position-1);return"".concat(i," phospho").concat(h[o])},d=function(t){var e="PROTEOMICS_PTM"===t.type?function(t){if(!t)return"";var e=t.flatMap((function(t){return t.dbReferences.map((function(t){return t.id}))})),n=o(new Set(e.flat()));return"\n
      ".concat(n.map((function(t){var e="Glue project"===t?"PXD012174":t;return"
    • ').concat(e,' (PRIDE\n ').concat("Glue project"===t?')
    • Publication: 31819260 (PubMed)
    • ':' PeptideAtlas)')})).join(""),"
    \n")}(t.ptms):l(t.evidences),n="PROTEOMICS_PTM"===t.type&&t.ptms.map((function(e){return p(t,e)})),r="PROTEOMICS_PTM"===t.type&&t.ptms.flatMap((function(t){return t.dbReferences.map((function(t){return t.id}))})),i=t.description;if("BINDING"===t.type||"Binding site"===t.type){var a="";t.ligandPart&&(a+="".concat(t.ligandPart.name," of ")),t.ligand&&(a+=t.ligand.name),t.description&&(a+="; ".concat(t.description)),i=a}try{return"\n ".concat(i?"
    Description

    ".concat(i,"

    "):"","\n ").concat(t.matchScore?"
    Match score

    ".concat(t.matchScore,"%

    "):"","\n ").concat(t.ftId?"
    Feature ID

    ".concat(t.ftId,"

    "):"","\n ").concat(t.alternativeSequence?"
    Alternative sequence

    ".concat(t.alternativeSequence,"

    "):"","\n ").concat(n?'
    PTMs
      '.concat(n.map((function(t){return"
    • ".concat(t,"
    • ")})).join(""),"
    \n "):"","\n ").concat(t.peptide&&"PROTEOMICS_PTM"===t.type?'
    Peptidoform

    '.concat(function(t,e){if(!e)return"";var n=e.map((function(t){return{name:t.name,position:t.position}})),r="",i=0;return n.forEach((function(e){r="".concat(r).concat(t.slice(i,e.position),"[").concat(e.name,"]"),i=e.position})),r="".concat(r).concat(t.slice(i)),"

    ".concat(r,"

    ")}(t.peptide,t.ptms),"

    "):"","\n ").concat(t.peptide&&"PROTEOMICS_PTM"!==t.type?"
    Peptide

    ".concat(t.peptide,"

    "):""," \n ").concat(t.xrefs?"
    Cross-references
    ".concat(f(t.xrefs)):"","\n ").concat(e?"
    Evidence
    ".concat(e):"","\n ").concat(t.ptms&&r&&!r.includes("Glue project")?'
    PTM statistical attributes
      '.concat(t.ptms.map((function(e){return e.dbReferences.map((function(n){return"
    • ".concat(n.id,'
    • \n
    • ').concat(p(t,e),'
    • \n
    • PubMed ID: \n ').concat(n.properties["Pubmed ID"],'\n
    • \n
    • Confidence score: ').concat(n.properties["Confidence score"],'
    • \n
    • Universal Spectrum Id: \n View on ProteomeXchange\n
    • \n
    • PSM Count: ').concat(n.properties["PSM Count"],'
    • \n
    • Site probability: ').concat(n.properties["Site probability"],"
    • \n ")})).join("")})).join(""),"
    "):"","\n ")}catch(t){return console.error(t),""}};function g(t){return(g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function y(t,e){for(var n=0;n0&&(e=function(t){return t.map((function(t){var e={};return t.begin&&(e.start=t.begin),u(u({},t),e)}))}(e=n.map((function(t){return k(k({},t),{},{tooltipContent:d(t),protvistaFeatureId:Object(r.a)()})})))),e},M=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&w(t,e)}(c,t);var e,n,r,i,o,a=(e=c,n=_(),function(){var t,r=O(e);if(n){var i=O(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return m(this,t)});function c(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,c),(t=a.call(this))._adaptedData=[],t}return r=c,(i=[{key:"connectedCallback",value:function(){this.subscribers=this.getAttribute("subscribers"),this._filters=this.getAttribute("filters")?this.getAttribute("filters").split(","):[],this._addLoaderListeners()}},{key:"data",set:function(t){this._emitEvent(t)}},{key:"subscribers",get:function(){return this._subscribers},set:function(t){t&&(this._subscribers=t.split(","))}},{key:"parseEntry",value:function(t){this._adaptedData=j(t)}},{key:"filterData",value:function(){var t=this;Array.isArray(this._adaptedData)&&this._filters.length>0&&(this._adaptedData=this._adaptedData.filter((function(e){return t._filters.includes(e.type)})))}},{key:"adaptedData",get:function(){return this._adaptedData}},{key:"_setSubscriberData",value:function(){var t=this;this.subscribers.forEach((function(e){var n=document.querySelector(e);n?n.data=t._adaptedData:console.error("Element with id '".concat(e,"' not found"))}))}},{key:"_emitEvent",value:function(t){this.parseEntry(t),this.filterData(),this.subscribers&&this._setSubscriberData(),this.dispatchEvent(new CustomEvent("load",{detail:{payload:this._adaptedData},bubbles:!0,cancelable:!0}))}},{key:"_addLoaderListeners",value:function(){var t=this;this.addEventListener("load",(function(e){if(e.target!==t){e.stopPropagation();try{if(e.detail.payload.errorMessage)throw e.detail.payload.errorMessage;t._emitEvent(e.detail.payload)}catch(e){t.dispatchEvent(new CustomEvent("error",{detail:e,bubbles:!0,cancelable:!0}))}}}))}}])&&y(r.prototype,i),o&&y(r,o),c}(b(HTMLElement));e.a=M},629:function(t,e,n){"use strict";n.d(e,"b",(function(){return m}));var r=n(675);function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return a(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return a(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,c=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return c=t.done,t},e:function(t){u=!0,o=t},f:function(){try{c||null==n.return||n.return()}finally{if(u)throw o}}}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n1&&void 0!==arguments[1]?arguments[1]:new Headers({accept:"application/json"}),n=y.get(t);if(n)return n;var r=g(void 0,void 0,void 0,regeneratorRuntime.mark((function n(){var r,i;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,window.fetch(t,{headers:e});case 2:if((r=n.sent).ok){n.next=5;break}throw new Error("Request Failed: Status = ".concat(r.status,"; URI = ").concat(t,"; Time = ").concat(new Date));case 5:if(204!==r.status){n.next=7;break}return n.abrupt("return",{payload:null,headers:r.headers});case 7:return n.next=9,r.json();case 9:return i=n.sent,n.abrupt("return",{payload:i,headers:r.headers});case 11:case"end":return n.stop()}}),n)})));return y.set(t,r),r.catch((function(){return y.delete(t)})),r},b=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&h(t,e)}(y,t);var e,n,i,a,s,l=(e=y,n=f(),function(){var t,r=p(e);if(n){var i=p(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return u(this,t)});function y(){var t;return d(this,y),(t=l.call(this))._data=null,t.selector=(t.getAttribute("selector")||"").trim()||function(t){return t},t}return i=y,s=[{key:"is",get:function(){return"data-loader"}}],(a=[{key:"fetch",value:function(){return g(this,void 0,void 0,regeneratorRuntime.mark((function t(){var e,n,i,a,c,u;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(s=this.children,(e=Array.from(s).filter((function(t){return t.matches('source[src], script[type="application/json"]')}))).length){t.next=3;break}return t.abrupt("return");case 3:n=[],a=o(e),t.prev=5,a.s();case 7:if((c=a.n()).done){t.next=31;break}if(u=c.value,t.prev=9,!(u instanceof HTMLSourceElement)){t.next=22;break}return t.t0=Object,t.t1=Object,t.t2={},t.next=16,m(u.src);case 16:t.t3=t.sent,t.t4=t.t1.assign.call(t.t1,t.t2,t.t3),t.t5={srcElement:u,src:u.src},i=t.t0.assign.call(t.t0,t.t4,t.t5),t.next=23;break;case 22:i={payload:JSON.parse(u.textContent)};case 23:return t.abrupt("break",31);case 26:t.prev=26,t.t6=t.catch(9),n.push(t.t6);case 29:t.next=7;break;case 31:t.next=36;break;case 33:t.prev=33,t.t7=t.catch(5),a.e(t.t7);case 36:return t.prev=36,a.f(),t.finish(36);case 39:if(i){t.next=43;break}this._errors=n;try{this.dispatchEvent(new CustomEvent("error",{detail:n,bubbles:!0,cancelable:!0}))}catch(t){console.error(t)}return t.abrupt("return");case 43:"string"==typeof this.selector?this._data=Object(r.a)(i.payload,this.selector):this._data=this.selector(i.payload),i.payload=this.data,this.dispatchEvent(new CustomEvent("load",{detail:i,bubbles:!0,cancelable:!0}));case 46:case"end":return t.stop()}var s}),t,this,[[5,33,36,39],[9,26]])})))}},{key:"data",get:function(){return this._data}},{key:"loaded",get:function(){return!!this.data}},{key:"errors",get:function(){return this._errors}},{key:"selector",get:function(){return this._selector},set:function(t){this._selector=t}},{key:"connectedCallback",value:function(){this.fetch()}}])&&c(i.prototype,a),s&&c(i,s),y}(s(HTMLElement));e.a=b},701:function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t){return function(t){if(Array.isArray(t))return o(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return o(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n1&&void 0!==arguments[1]?arguments[1]:0,n=(u[t[e+0]]+u[t[e+1]]+u[t[e+2]]+u[t[e+3]]+"-"+u[t[e+4]]+u[t[e+5]]+"-"+u[t[e+6]]+u[t[e+7]]+"-"+u[t[e+8]]+u[t[e+9]]+"-"+u[t[e+10]]+u[t[e+11]]+u[t[e+12]]+u[t[e+13]]+u[t[e+14]]+u[t[e+15]]).toLowerCase();if(!c(n))throw TypeError("Stringified UUID is invalid");return n},p=0,d=0;e.a=function(t,e,n){var r=e&&n||0,i=e||new Array(16),a=(t=t||{}).node||l,c=void 0!==t.clockseq?t.clockseq:f;if(null==a||null==c){var u=t.random||(t.rng||o)();null==a&&(a=l=[1|u[0],u[1],u[2],u[3],u[4],u[5]]),null==c&&(c=f=16383&(u[6]<<8|u[7]))}var s=void 0!==t.msecs?t.msecs:Date.now(),g=void 0!==t.nsecs?t.nsecs:d+1,y=s-p+(g-d)/1e4;if(y<0&&void 0===t.clockseq&&(c=c+1&16383),(y<0||s>p)&&void 0===t.nsecs&&(g=0),g>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");p=s,d=g,f=c;var m=(1e4*(268435455&(s+=122192928e5))+g)%4294967296;i[r++]=m>>>24&255,i[r++]=m>>>16&255,i[r++]=m>>>8&255,i[r++]=255&m;var b=s/4294967296*1e4&268435455;i[r++]=b>>>8&255,i[r++]=255&b,i[r++]=b>>>24&15|16,i[r++]=b>>>16&255,i[r++]=c>>>8|128,i[r++]=255&c;for(var v=0;v<6;++v)i[r+v]=a[v];return e||h(i)}},745:function(t,e,n){"use strict";var r,i,o,a,c,u,s,l=n(620),f=n(743),h=n(632),p=function(t){return"\n
    Variant

    ".concat(t.wildType," > ").concat(t.alternativeSequence||"","

    \n ").concat(t.populationFrequencies?(o=t.populationFrequencies,"
    Population frequencies
    ".concat(o.map((function(t){return"

    ".concat(t.frequency," - ").concat(t.populationName," (").concat(t.source,")

    ")})).join(""))):"","\n ").concat(t.consequenceType?"
    Consequence

    ".concat(t.consequenceType,"

    "):"","\n ").concat(t.somaticStatus?"
    Somatic

    ".concat(0===t.somaticStatus?"No":"Yes","

    "):"","\n ").concat(t.genomicLocation?"
    Location

    ".concat(t.genomicLocation,"

    "):"","\n ").concat(t.ftId?"
    Feature ID

    ".concat(t.ftId,"

    "):"","\n ").concat(t.descriptions?(i=t.descriptions,"
    Description
    ".concat(i.map((function(t){return"

    ".concat(t.value,"

    ")})).join(""),"\n ")):"","\n ").concat(t.association?(r=t.association,null==r?void 0:r.map((function(t){return"\n

    Disease association

    ".concat(t.name,"

    \n ").concat(t.description?"<>".concat(t.description,"

    "):"","\n ").concat(t.dbReferences?"
    Cross-references
    ".concat(Object(l.b)(t.dbReferences)):"","\n ").concat(Object(l.c)(t.evidences),"\n ")})).join("")):"","\n ").concat(t.predictions?(e=t.predictions,n=Object(h.a)(e,"predAlgorithmNameType"),Object.keys(n).map((function(t){var e=Object(h.a)(n[t],"predictionValType");return{algorithm:t,values:Object.keys(e).map((function(t){return{name:t,count:e[t].length}}))}})).map((function(t){return"
    ".concat(t.algorithm,'
      ').concat(t.values.map((function(t){return"
    • ".concat(t.name,"
    • ")})).join(""),"
    ")})).join("")):"","\n ").concat(function(t){if(t.locations.some((function(t){return"EnsemblViruses"===t.source}))){var e=t.xrefs.find((function(t){return"ENA"===t.name}));return e.id?'
    Ensembl COVID-19
    \n

    \n ').concat(e.id,"\n

    "):""}return""}(t),"\n \n ");var e,n,r,i,o};function d(t){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function g(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function y(t,e){for(var n=0;n0,tooltipContent:p(t),protvistaFeatureId:Object(f.a)()});var e,n,i}));return n?{sequence:e,variants:n}:null}(t)}}])&&y(e.prototype,n),i&&y(e,i),a}(l.a);e.a=O},803:function(t,e,n){"use strict";var r=n(603),i=n(585),o=n(619),a=n(613),c=n(632);var u=function(t){var e=t.variants,n=t.sequence;if(!n||!e)return null;var r=n.split("").map((function(t,e){return{type:"VARIANT",normal:t,pos:e+1,variants:[]}}));return e.forEach((function(t){r[t.start-1]&&r[t.start-1].variants.push(t)})),r};function s(t,e){for(var n=0;nt.length)&&(e=t.length);for(var n=0,r=new Array(e);n\n protvista-variation {\n display: flex;\n width: 100%;\n }\n \n protvista-variation svg {\n background-color: #fff;\n }\n \n protvista-variation circle {\n opacity: 0.6;\n }\n protvista-variation circle:hover {\n opacity: 0.9;\n }\n protvista-variation .tick line,\n protvista-variation .axis path {\n opacity: 0.1;\n }\n \n .protvista-highlight {\n fill: #ffe999;\n }\n \n protvista-variation .variation-y-right line,\n protvista-variation .axis path {\n fill: none;\n stroke: none;\n }\n \n \n "}}],(n=[{key:"connectedCallback",value:function(){y(w(f.prototype),"connectedCallback",this).call(this);var t=document.createElement("style");t.innerHTML=f.css,this.appendChild(t),this._height=Number(this.getAttribute("height"))?Number(this.getAttribute("height")):430,this._width=this._width?this._width:0,this._yScale=Object(i.scaleLinear)(),this._yScale=Object(i.scalePoint)().domain(k).range([0,this._height-this.margin.top-this.margin.bottom])}},{key:"processData",value:function(t){this._originalData=u(t)}},{key:"_createFeatures",value:function(){this._variationPlot=new l;var t=y(w(f.prototype),"svg",this).select("g.sequence-features"),e=t.attr("transform","translate(0, ".concat(this.margin.top,")")).append("g");this._series=e.datum(this._data),this._axisLeft=t.append("g"),this._axisRight=t.append("g"),this.updateScale()}},{key:"filters",set:function(t){g(w(f.prototype),"filters",t,this,!0),this.updateData(this._data),this.refresh()}},{key:"_applyFilters",value:function(){var t=this;if(!this._filters||this._filters.length<=0)this._data=this._originalData;else{var e=Object(c.a)(this._filters,"category"),n=Object.values(e).map((function(e){var n=e.map((function(e){return e.filterFn(t._originalData)}));return E(n,o.a)}));this._data=E(n,a.a)}}},{key:"colorConfig",get:function(){return this._colorConfig},set:function(t){this._colorConfig=t}},{key:"refresh",value:function(){this._series&&(this.updateScale(),this._series.call(this._variationPlot.drawVariationPlot,this),this._updateHighlight())}},{key:"updateScale",value:function(){this._yAxisLScale=Object(i.axisLeft)().scale(this._yScale).tickSize(-this.getWidthWithMargins()),this._yAxisRScale=Object(i.axisRight)().scale(this._yScale),this._axisLeft.attr("class","variation-y-left axis").attr("transform","translate(".concat(this.margin.left,",0)")).call(this._yAxisLScale),this._axisRight.attr("transform","translate(".concat(this.getWidthWithMargins()-this.margin.right+2,", 0)")).attr("class","variation-y-right axis").call(this._yAxisRScale)}},{key:"updateData",value:function(t){this._series&&this._series.datum(t)}}])&&p(e.prototype,n),r&&p(e,r),f}(r.default);e.a=j}}]); \ No newline at end of file diff --git a/v3/14.js b/v3/14.js new file mode 100644 index 000000000..3d2ea57ee --- /dev/null +++ b/v3/14.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[14],{1095:function(t,e){t.exports='

    protvista-variation-graph

    \n

    Published on NPM

    \n

    A graph to display the number of variants.

    \n

    Usage

    \n
    <protvista-variation-graph></protvista-variation-graph>
    \n

    API Reference

    \n

    Properties

    \n

    also see protvista-track

    \n'},167:function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(629),a=n(870),c=n(745),s=n(111),u=n(35),l=n(1095),f=n.n(l);function h(t){return(h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function p(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function d(t,e){for(var n=0;nt.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&void 0!==arguments[0]?arguments[0]:{},n=e.min,r=void 0===n?-1/0:n,i=e.max,a=void 0===i?1/0:i;o(this,t),this.segments=[],this.max=a,this.min=r,this.regionString=null}var e,n,i;return e=t,(n=[{key:"encode",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.segments.map((function(n){var r=n.start,i=n.end,o=n.color;if(e)return"".concat(r,":").concat(i).concat(o?":".concat(o):"");var a=r===t.min?"":r,c=i===t.max?"":i;return"".concat(a,":").concat(c).concat(o?":".concat(o):"")})).join(",")}},{key:"decode",value:function(t){var e=this;void 0!==t&&(this.regionString=t),this.regionString?this.segments=this.regionString.split(",").map((function(t){var n=r(t.split(":"),4),i=n[0],o=n[1],a=n[2];if(void 0!==n[3])throw new Error("there should be at most 2 ':' per region. Region: ".concat(t));var c=i?Number(i):e.min,s=o?Number(o):e.max,u=""!==a?a:void 0;if(c>s){var l=[s,c];c=l[0],s=l[1]}if(ce.max&&(s=e.max),Number.isNaN(c))throw new Error("The parsed value of ".concat(i," is NaN. Region: ").concat(t));if(Number.isNaN(s))throw new Error("The parsed value of ".concat(o," is NaN. Region: ").concat(t));if(u&&!u.match(/^#[0-9a-f]{6,8}$/i))throw new Error("The parsed value of ".concat(a," is not a color in hex format. Region: ").concat(t));return{start:c,end:s,color:u}})):this.segments=[]}}])&&a(e.prototype,n),i&&a(e,i),t}();function s(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:400;p(this,t),this.element=e,this.timeStampWheelOutside=0,this.resetScrollableTimeout=null,this.scrollDelay=n}var e,n,r;return e=t,(n=[{key:"setElementScrollable",value:function(t){this.element.setAttribute("scrollable",t)}},{key:"startResetScrollableTimer",value:function(){var t=this;this.resetScrollableTimeout&&clearTimeout(this.resetScrollableTimeout),this.resetScrollableTimeout=setTimeout((function(){t.setElementScrollable(!0),t.resetScrollableTimeout=null}),this.scrollDelay)}},{key:"blockScroll",value:function(t){this.timeStampWheelOutside=t,this.setElementScrollable(!1),this.startResetScrollableTimer()}},{key:"wheel",value:function(t){var e=t.target,n=t.timeStamp;this.element.contains(e)?n=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,c=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){c=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw o}}}}function b(t){return function(t){if(Array.isArray(t))return _(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||v(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(t,e){if(t){if("string"==typeof t)return _(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_(t,e):void 0}}function _(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&void 0!==arguments[0]?arguments[0]:null,e=[],n=[];if(null!==t&&"string"!=typeof t)throw new Error("The attribute text has to be of type string");if(t&&""!==t.trim()){var r=t.split(",").map((function(t){return t.split(":")}));if(r.length<2)throw new Error("There should be at least 2 points to create a scale");e=r.map((function(t){var e=t[0].trim().toUpperCase();if(!f(e))throw new Error("The color '".concat(e," is not valid'"));return e})),n=r.map((function(t,e){var n=parseFloat(t[1]);if(Number.isNaN(n))throw new Error("The second part of every point should be a number. Error in point ".concat(e,": ").concat(t));return n}))}return{range:e,domain:n}},N=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.keyFormatter,r=void 0===n?h:n,i=e.valueFormatter,o=void 0===i?h:i;if(null!==t&&"string"!=typeof t)throw new Error("The attribute text has to be of type string");if(t&&""!==t.trim()){var a=t.split(",").map((function(t){return t.split(":")})),c={};return a.forEach((function(t){if(2!==t.length)throw new Error("Bad block: ".concat(t.join(":"),"\n The blocks of the string should follow the format KEY:VALUE"));c[r(t[0])]=o(t[1])})),c}return{}},x=g,D=function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{initialValue:{top:0,bottom:0,left:0,right:0}},r=function(t){k(r,t);var e=P(r);function r(){var t;return O(this,r),(t=e.call(this)).margin=n.initialValue,t}return S(r,[{key:"attributeChangedCallback",value:function(t,e,n){e!==n&&F.includes(t)&&(this[t]=n),E(C(r.prototype),"attributeChangedCallback",this).call(this,t,e,n)}}],[{key:"observedAttributes",get:function(){return[].concat(b(E(C(r),"observedAttributes",this)),b(F))}}]),r}(t),i=m(M);try{var o=function(){var t=e.value;Object.defineProperty(r.prototype,"margin".concat(t),{get:function(){return this.margin[t]||0},set:function(e){this.margin[t]=+e}})};for(i.s();!(e=i.n()).done;)o()}catch(t){i.e(t)}finally{i.f()}return r}},594:function(t,e,n){"use strict";var r=n(608),i=n(604);e.a=function(t){return Object(i.a)(t)&&Object(r.a)(t)}},595:function(t,e,n){"use strict";e.a=function(t,e,n){for(var r=-1,i=null==t?0:t.length;++r-1}},598:function(t,e,n){"use strict";var r=n(614);var i=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)},o=Math.max;var a=function(t,e,n){return e=o(void 0===e?t.length-1:e,0),function(){for(var r=arguments,a=-1,c=o(r.length-e,0),s=Array(c);++a0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(u);e.a=function(t,e){return f(a(t,e,r.a),t+"")}},599:function(t,e,n){"use strict";var r=function(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o-1:!!a&&Object(i.a)(t,e,n)>-1},C=n(632),M=n(619),F=n(613),L=n(609);function T(t,e){for(var n=0;n5&&(t=this._ftWidth-5);var e=this._ftHeight/4;return"M0,"+e+"L"+t+","+e+"L"+t+","+3*e+"L0,"+3*e+"L0,"+e+"M"+t+",0L"+this._ftWidth+","+2*e+"L"+t+","+this._ftHeight+"Z"}}])&&T(e.prototype,n),r&&T(e,r),t}();function N(t,e){for(var n=0;nNumber(n.end)||Number(r.end)=0?(e._rows[n].push(t),e.featuresMap.set(t,n)):(e._rows.push([t]),e.featuresMap.set(t,e._rows.length-1))})),this._rowHeight=Math.min(this._layoutHeight/this._rows.length,this._minHeight)}},{key:"getOffset",value:function(){return this._rows.length*this._rowHeightt.length)&&(e=t.length);for(var n=0,r=new Array(e);n500&&(n=t.getSingleBaseWidth()<4?4:1),t._featureShape.getFeatureShape(t.getSingleBaseWidth()/2,t._layoutObj.getFeatureHeight(),n,t._getShape(e))})).attr("transform",(function(e){return"translate(".concat(t.getXFromSeqPosition(Number(e.feature.start)+Number(e.position)-1)+t.getSingleBaseWidth()/4,",\n ").concat(t._layoutObj.getFeatureYPos(e.feature),")")})).attr("fill","#06038D").style("fill-opacity",(function(t){var e=t.feature;return e.opacity?e.opacity:.9})).style("stroke-opacity",(function(t){var e=t.feature;return e.opacity?e.opacity:.9})).call(this.bindEvents,this)}},{key:"_applyFilters",value:function(){var t=this;if(!this._filters||this._filters.length<=0)this._data=this._originalData;else{var e=Object(C.a)(this._filters,"category"),n=Object.values(e).map((function(e){var n=e.map((function(e){return e.filterFn(t._originalData)}));return M.a.apply(void 0,Y(n))})),r=F.a.apply(void 0,Y(n));this._data=r}}},{key:"refresh",value:function(){var t=this;if(this.xScale&&this.seq_g){var e=this.seq_g.selectAll("g.fragment-group").data(this._data.reduce((function(t,e){return t.concat(e.locations.reduce((function(t,n){return t.concat(n.fragments.map((function(t){return Object.assign({},t,{feature:e})})))}),[]))}),[])),n=this.seq_g.selectAll("g.residue-group").data(this._data.reduce((function(t,e){var n;return t.concat([null===(n=e.ptms)||void 0===n?void 0:n.reduce((function(t){return t.concat((function(t){return Object.assign({},t,{feature:e,position:t.position})}))}),[])])}),[]));e.selectAll("path.feature").attr("d",(function(e){return t._featureShape.getFeatureShape(t.getSingleBaseWidth(),t._layoutObj.getFeatureHeight(e),e.end?e.end-e.start+1:1,t._getShape(e))})).attr("transform",(function(e){return"translate(".concat(t.getXFromSeqPosition(e.start),",").concat(t._layoutObj.getFeatureYPos(e.feature),")")})),n.selectAll("path.residue").attr("d",(function(e){var n=1;return t.length>500&&(n=t.getSingleBaseWidth()<4?4:1),t._featureShape.getFeatureShape(t.getSingleBaseWidth()/2,t._layoutObj.getFeatureHeight(e),n,t._getShape(e))})).attr("transform",(function(e){return"translate(".concat(t.getXFromSeqPosition(Number(e.feature.start)+Number(e.position)-1)+t.getSingleBaseWidth()/4,",").concat(t._layoutObj.getFeatureYPos(e.feature),")")})),e.selectAll("rect.outer-rectangle").attr("width",(function(e){return t.getSingleBaseWidth()*(e.end?e.end-e.start+1:1)})).attr("height",(function(e){return t._layoutObj.getFeatureHeight(e)})).attr("transform",(function(e){return"translate(".concat(t.getXFromSeqPosition(e.start),",").concat(t._layoutObj.getFeatureYPos(e.feature),")")})),this._updateHighlight()}}},{key:"_updateHighlight",value:function(){this.trackHighlighter.updateHighlight()}}])&&Q(e.prototype,n),i&&Q(e,i),a}(L.a);e.default=it},609:function(t,e,n){"use strict";var r=n(585),i=n(593),o=n(665);function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function c(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=t&&("undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"]);if(null==n)return;var r,i,o=[],a=!0,c=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(t){c=!0,i=t}finally{try{a||null==n.return||n.return()}finally{if(c)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return s(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4?arguments[4]:void 0,a=arguments.length>5?arguments[5]:void 0,c=arguments.length>6?arguments[6]:void 0;e&&(e=e.feature?e.feature:e);var s={eventtype:t,coords:m._getClickCoords(),feature:e,target:c};return n&&(e&&e.fragments?s.highlight=e.fragments.map((function(t){return"".concat(t.start,":").concat(t.end)})).join(","):r.event&&r.event.shiftKey&&this._highlight?s.highlight="".concat(this._highlight,",").concat(o,":").concat(a):s.highlight=o&&a?"".concat(o,":").concat(a):null),i&&(s.selectedid=e&&e.protvistaFeatureId),new CustomEvent("change",{detail:s,bubbles:!0,cancelable:!0})}},{key:"bindEvents",value:function(t,e){t.on("mouseover",(function(t,n,r){e.dispatchEvent(e.createEvent("mouseover",t,"onmouseover"===e._highlightEvent,!1,t.start,t.end,r[n]))})).on("mouseout",(function(){e.dispatchEvent(e.createEvent("mouseout",null,"onmouseover"===e._highlightEvent))})).on("click",(function(t,n,r){e.dispatchEvent(e.createEvent("click",t,"onclick"===e._highlightEvent,!0,t.start,t.end,r[n]))}))}}])&&u(a.prototype,s),h&&u(a,h),m}(h(HTMLElement));e.a=Object(i.f)(m,{initialValue:{top:10,right:10,bottom:10,left:10}})},613:function(t,e,n){"use strict";var r=n(590),i=n(621),o=n(596),a=n(595),c=n(664),s=n(616),u=Math.min;var l=function(t,e,n){for(var l=n?a.a:o.a,f=t[0].length,h=t.length,p=h,d=Array(h),g=1/0,y=[];p--;){var m=t[p];p&&e&&(m=Object(r.a)(m,Object(c.a)(e))),g=u(m.length,g),d[p]=!n&&(e||f>=120&&m.length>=120)?new i.a(p&&m):void 0}m=t[0];var b=-1,v=d[0];t:for(;++b=200){var g=e?null:h(t);if(g)return Object(f.a)(g);l=!1,i=s.a,d=new o.a}else d=e?[]:p;t:for(;++rt.length)&&(e=t.length);for(var n=0,r=new Array(e);n".concat(t.map((function(t){var e,n,r=i.find((function(e){return e.name===t.code}));return r?"
  • ').concat(r.shortDescription,": ").concat(t.source?(e=t.source,(null===(n=e.name)||void 0===n?void 0:n.toLowerCase())==="PubMed".toLowerCase()?"".concat(e.id," (").concat(e.name," EuropePMC)"):" ").concat(e.id," ").concat(e.name?"(".concat(e.name,")"):"")):"","
  • "):""})).join(""),"\n "):""},f=function(t){return"
      ".concat(t.map((function(t){return'
    • '.concat(t.name," ").concat(t.url?'').concat(t.id,""):"".concat(t.name," ").concat(t.id),"
    • ")})).join(""),"
    ")},h={A:"alanine",S:"serine",T:"threonine",Y:"tyrosine"},p=function(t,e){var n=t.peptide,r=t.begin,i=Number(r)+e.position-1,o=n.charAt(e.position-1);return"".concat(i," phospho").concat(h[o])},d=function(t){var e="PROTEOMICS_PTM"===t.type?function(t){if(!t)return"";var e=t.flatMap((function(t){return t.dbReferences.map((function(t){return t.id}))})),n=o(new Set(e.flat()));return"\n
      ".concat(n.map((function(t){var e="Glue project"===t?"PXD012174":t;return"
    • ').concat(e,' (PRIDE\n ').concat("Glue project"===t?')
    • Publication: 31819260 (PubMed)
    • ':' PeptideAtlas)')})).join(""),"
    \n")}(t.ptms):l(t.evidences),n="PROTEOMICS_PTM"===t.type&&t.ptms.map((function(e){return p(t,e)})),r="PROTEOMICS_PTM"===t.type&&t.ptms.flatMap((function(t){return t.dbReferences.map((function(t){return t.id}))})),i=t.description;if("BINDING"===t.type||"Binding site"===t.type){var a="";t.ligandPart&&(a+="".concat(t.ligandPart.name," of ")),t.ligand&&(a+=t.ligand.name),t.description&&(a+="; ".concat(t.description)),i=a}try{return"\n ".concat(i?"
    Description

    ".concat(i,"

    "):"","\n ").concat(t.matchScore?"
    Match score

    ".concat(t.matchScore,"%

    "):"","\n ").concat(t.ftId?"
    Feature ID

    ".concat(t.ftId,"

    "):"","\n ").concat(t.alternativeSequence?"
    Alternative sequence

    ".concat(t.alternativeSequence,"

    "):"","\n ").concat(n?'
    PTMs
      '.concat(n.map((function(t){return"
    • ".concat(t,"
    • ")})).join(""),"
    \n "):"","\n ").concat(t.peptide&&"PROTEOMICS_PTM"===t.type?'
    Peptidoform

    '.concat(function(t,e){if(!e)return"";var n=e.map((function(t){return{name:t.name,position:t.position}})),r="",i=0;return n.forEach((function(e){r="".concat(r).concat(t.slice(i,e.position),"[").concat(e.name,"]"),i=e.position})),r="".concat(r).concat(t.slice(i)),"

    ".concat(r,"

    ")}(t.peptide,t.ptms),"

    "):"","\n ").concat(t.peptide&&"PROTEOMICS_PTM"!==t.type?"
    Peptide

    ".concat(t.peptide,"

    "):""," \n ").concat(t.xrefs?"
    Cross-references
    ".concat(f(t.xrefs)):"","\n ").concat(e?"
    Evidence
    ".concat(e):"","\n ").concat(t.ptms&&r&&!r.includes("Glue project")?'
    PTM statistical attributes
      '.concat(t.ptms.map((function(e){return e.dbReferences.map((function(n){return"
    • ".concat(n.id,'
    • \n
    • ').concat(p(t,e),'
    • \n
    • PubMed ID: \n ').concat(n.properties["Pubmed ID"],'\n
    • \n
    • Confidence score: ').concat(n.properties["Confidence score"],'
    • \n
    • Universal Spectrum Id: \n View on ProteomeXchange\n
    • \n
    • PSM Count: ').concat(n.properties["PSM Count"],'
    • \n
    • Site probability: ').concat(n.properties["Site probability"],"
    • \n ")})).join("")})).join(""),"
    "):"","\n ")}catch(t){return console.error(t),""}};function g(t){return(g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function y(t,e){for(var n=0;n0&&(e=function(t){return t.map((function(t){var e={};return t.begin&&(e.start=t.begin),s(s({},t),e)}))}(e=n.map((function(t){return E(E({},t),{},{tooltipContent:d(t),protvistaFeatureId:Object(r.a)()})})))),e},P=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&O(t,e)}(c,t);var e,n,r,i,o,a=(e=c,n=_(),function(){var t,r=w(e);if(n){var i=w(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return m(this,t)});function c(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,c),(t=a.call(this))._adaptedData=[],t}return r=c,(i=[{key:"connectedCallback",value:function(){this.subscribers=this.getAttribute("subscribers"),this._filters=this.getAttribute("filters")?this.getAttribute("filters").split(","):[],this._addLoaderListeners()}},{key:"data",set:function(t){this._emitEvent(t)}},{key:"subscribers",get:function(){return this._subscribers},set:function(t){t&&(this._subscribers=t.split(","))}},{key:"parseEntry",value:function(t){this._adaptedData=j(t)}},{key:"filterData",value:function(){var t=this;Array.isArray(this._adaptedData)&&this._filters.length>0&&(this._adaptedData=this._adaptedData.filter((function(e){return t._filters.includes(e.type)})))}},{key:"adaptedData",get:function(){return this._adaptedData}},{key:"_setSubscriberData",value:function(){var t=this;this.subscribers.forEach((function(e){var n=document.querySelector(e);n?n.data=t._adaptedData:console.error("Element with id '".concat(e,"' not found"))}))}},{key:"_emitEvent",value:function(t){this.parseEntry(t),this.filterData(),this.subscribers&&this._setSubscriberData(),this.dispatchEvent(new CustomEvent("load",{detail:{payload:this._adaptedData},bubbles:!0,cancelable:!0}))}},{key:"_addLoaderListeners",value:function(){var t=this;this.addEventListener("load",(function(e){if(e.target!==t){e.stopPropagation();try{if(e.detail.payload.errorMessage)throw e.detail.payload.errorMessage;t._emitEvent(e.detail.payload)}catch(e){t.dispatchEvent(new CustomEvent("error",{detail:e,bubbles:!0,cancelable:!0}))}}}))}}])&&y(r.prototype,i),o&&y(r,o),c}(b(HTMLElement));e.a=P},629:function(t,e,n){"use strict";n.d(e,"b",(function(){return m}));var r=n(675);function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return a(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return a(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,c=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return c=t.done,t},e:function(t){s=!0,o=t},f:function(){try{c||null==n.return||n.return()}finally{if(s)throw o}}}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n1&&void 0!==arguments[1]?arguments[1]:new Headers({accept:"application/json"}),n=y.get(t);if(n)return n;var r=g(void 0,void 0,void 0,regeneratorRuntime.mark((function n(){var r,i;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,window.fetch(t,{headers:e});case 2:if((r=n.sent).ok){n.next=5;break}throw new Error("Request Failed: Status = ".concat(r.status,"; URI = ").concat(t,"; Time = ").concat(new Date));case 5:if(204!==r.status){n.next=7;break}return n.abrupt("return",{payload:null,headers:r.headers});case 7:return n.next=9,r.json();case 9:return i=n.sent,n.abrupt("return",{payload:i,headers:r.headers});case 11:case"end":return n.stop()}}),n)})));return y.set(t,r),r.catch((function(){return y.delete(t)})),r},b=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&h(t,e)}(y,t);var e,n,i,a,u,l=(e=y,n=f(),function(){var t,r=p(e);if(n){var i=p(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return s(this,t)});function y(){var t;return d(this,y),(t=l.call(this))._data=null,t.selector=(t.getAttribute("selector")||"").trim()||function(t){return t},t}return i=y,u=[{key:"is",get:function(){return"data-loader"}}],(a=[{key:"fetch",value:function(){return g(this,void 0,void 0,regeneratorRuntime.mark((function t(){var e,n,i,a,c,s;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(u=this.children,(e=Array.from(u).filter((function(t){return t.matches('source[src], script[type="application/json"]')}))).length){t.next=3;break}return t.abrupt("return");case 3:n=[],a=o(e),t.prev=5,a.s();case 7:if((c=a.n()).done){t.next=31;break}if(s=c.value,t.prev=9,!(s instanceof HTMLSourceElement)){t.next=22;break}return t.t0=Object,t.t1=Object,t.t2={},t.next=16,m(s.src);case 16:t.t3=t.sent,t.t4=t.t1.assign.call(t.t1,t.t2,t.t3),t.t5={srcElement:s,src:s.src},i=t.t0.assign.call(t.t0,t.t4,t.t5),t.next=23;break;case 22:i={payload:JSON.parse(s.textContent)};case 23:return t.abrupt("break",31);case 26:t.prev=26,t.t6=t.catch(9),n.push(t.t6);case 29:t.next=7;break;case 31:t.next=36;break;case 33:t.prev=33,t.t7=t.catch(5),a.e(t.t7);case 36:return t.prev=36,a.f(),t.finish(36);case 39:if(i){t.next=43;break}this._errors=n;try{this.dispatchEvent(new CustomEvent("error",{detail:n,bubbles:!0,cancelable:!0}))}catch(t){console.error(t)}return t.abrupt("return");case 43:"string"==typeof this.selector?this._data=Object(r.a)(i.payload,this.selector):this._data=this.selector(i.payload),i.payload=this.data,this.dispatchEvent(new CustomEvent("load",{detail:i,bubbles:!0,cancelable:!0}));case 46:case"end":return t.stop()}var u}),t,this,[[5,33,36,39],[9,26]])})))}},{key:"data",get:function(){return this._data}},{key:"loaded",get:function(){return!!this.data}},{key:"errors",get:function(){return this._errors}},{key:"selector",get:function(){return this._selector},set:function(t){this._selector=t}},{key:"connectedCallback",value:function(){this.fetch()}}])&&c(i.prototype,a),u&&c(i,u),y}(u(HTMLElement));e.a=b},743:function(t,e,n){"use strict";var r,i=new Uint8Array(16);function o(){if(!r&&!(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(i)}var a=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var c=function(t){return"string"==typeof t&&a.test(t)},s=[],u=0;u<256;++u)s.push((u+256).toString(16).substr(1));var l,f,h=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(s[t[e+0]]+s[t[e+1]]+s[t[e+2]]+s[t[e+3]]+"-"+s[t[e+4]]+s[t[e+5]]+"-"+s[t[e+6]]+s[t[e+7]]+"-"+s[t[e+8]]+s[t[e+9]]+"-"+s[t[e+10]]+s[t[e+11]]+s[t[e+12]]+s[t[e+13]]+s[t[e+14]]+s[t[e+15]]).toLowerCase();if(!c(n))throw TypeError("Stringified UUID is invalid");return n},p=0,d=0;e.a=function(t,e,n){var r=e&&n||0,i=e||new Array(16),a=(t=t||{}).node||l,c=void 0!==t.clockseq?t.clockseq:f;if(null==a||null==c){var s=t.random||(t.rng||o)();null==a&&(a=l=[1|s[0],s[1],s[2],s[3],s[4],s[5]]),null==c&&(c=f=16383&(s[6]<<8|s[7]))}var u=void 0!==t.msecs?t.msecs:Date.now(),g=void 0!==t.nsecs?t.nsecs:d+1,y=u-p+(g-d)/1e4;if(y<0&&void 0===t.clockseq&&(c=c+1&16383),(y<0||u>p)&&void 0===t.nsecs&&(g=0),g>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");p=u,d=g,f=c;var m=(1e4*(268435455&(u+=122192928e5))+g)%4294967296;i[r++]=m>>>24&255,i[r++]=m>>>16&255,i[r++]=m>>>8&255,i[r++]=255&m;var b=u/4294967296*1e4&268435455;i[r++]=b>>>8&255,i[r++]=255&b,i[r++]=b>>>24&15|16,i[r++]=b>>>16&255,i[r++]=c>>>8|128,i[r++]=255&c;for(var v=0;v<6;++v)i[r+v]=a[v];return e||h(i)}},745:function(t,e,n){"use strict";var r,i,o,a,c,s,u,l=n(620),f=n(743),h=n(632),p=function(t){return"\n
    Variant

    ".concat(t.wildType," > ").concat(t.alternativeSequence||"","

    \n ").concat(t.populationFrequencies?(o=t.populationFrequencies,"
    Population frequencies
    ".concat(o.map((function(t){return"

    ".concat(t.frequency," - ").concat(t.populationName," (").concat(t.source,")

    ")})).join(""))):"","\n ").concat(t.consequenceType?"
    Consequence

    ".concat(t.consequenceType,"

    "):"","\n ").concat(t.somaticStatus?"
    Somatic

    ".concat(0===t.somaticStatus?"No":"Yes","

    "):"","\n ").concat(t.genomicLocation?"
    Location

    ".concat(t.genomicLocation,"

    "):"","\n ").concat(t.ftId?"
    Feature ID

    ".concat(t.ftId,"

    "):"","\n ").concat(t.descriptions?(i=t.descriptions,"
    Description
    ".concat(i.map((function(t){return"

    ".concat(t.value,"

    ")})).join(""),"\n ")):"","\n ").concat(t.association?(r=t.association,null==r?void 0:r.map((function(t){return"\n

    Disease association

    ".concat(t.name,"

    \n ").concat(t.description?"<>".concat(t.description,"

    "):"","\n ").concat(t.dbReferences?"
    Cross-references
    ".concat(Object(l.b)(t.dbReferences)):"","\n ").concat(Object(l.c)(t.evidences),"\n ")})).join("")):"","\n ").concat(t.predictions?(e=t.predictions,n=Object(h.a)(e,"predAlgorithmNameType"),Object.keys(n).map((function(t){var e=Object(h.a)(n[t],"predictionValType");return{algorithm:t,values:Object.keys(e).map((function(t){return{name:t,count:e[t].length}}))}})).map((function(t){return"
    ".concat(t.algorithm,'
      ').concat(t.values.map((function(t){return"
    • ".concat(t.name,"
    • ")})).join(""),"
    ")})).join("")):"","\n ").concat(function(t){if(t.locations.some((function(t){return"EnsemblViruses"===t.source}))){var e=t.xrefs.find((function(t){return"ENA"===t.name}));return e.id?'
    Ensembl COVID-19
    \n

    \n ').concat(e.id,"\n

    "):""}return""}(t),"\n \n ");var e,n,r,i,o};function d(t){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function g(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function y(t,e){for(var n=0;n0,tooltipContent:p(t),protvistaFeatureId:Object(f.a)()});var e,n,i}));return n?{sequence:e,variants:n}:null}(t)}}])&&y(e.prototype,n),i&&y(e,i),a}(l.a);e.a=w},870:function(t,e,n){"use strict";var r=n(603),i=n(585);function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return c(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);nt.sequence.length||(this._totalsArray.total[c]++,o&&o.find((function(t){return!0===t.disease}))&&this._totalsArray.diseaseTotal[c]++)}}catch(t){n.e(t)}finally{n.f()}this._createTrack()}}},{key:"_createTrack",value:function(){Object(i.select)(this).selectAll("svg").remove(),this.svg=Object(i.select)(this).append("svg").attr("width",this.width).attr("height",this._height),this.trackHighlighter.appendHighlightTo(this.svg),this._initYScale(),this.refresh()}},{key:"_initYScale",value:function(){this._yScale.domain([0,Math.max(Object(i.max)(this._totalsArray.total),Object(i.max)(this._totalsArray.diseaseTotal))]).range([this._height,0])}},{key:"refresh",value:function(){this.svg&&(this.svg.selectAll("path").remove(),this.svg.append("path").attr("d",this._line(this._totalsArray.diseaseTotal)).attr("fill","none").attr("stroke","red").attr("transform","translate(0,0)"),this.svg.append("path").attr("d",this._line(this._totalsArray.total)).attr("fill","none").attr("stroke","darkgrey").attr("transform","translate(0,0)"),this._updateHighlight())}}])&&s(e.prototype,n),r&&s(e,r),c}(r.default);e.a=d}}]); \ No newline at end of file diff --git a/v3/15.js b/v3/15.js new file mode 100644 index 000000000..d189bfedc --- /dev/null +++ b/v3/15.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[15],{1011:function(t,e){t.exports='

    nightingale-linegraph-track

    \n

    Published on NPM

    \n

    Nightingale line graph track component is used to display multiple line graphs (either linear or d3 curves). It inherits from Protvista-track.

    \n

    Usage

    \n
    <nightingale-linegraph-track></nightingale-linegraph-track>
    \n

    API Reference

    \n

    Properties

    \n

    length: number

    \n

    The protein or nucleic acid sequence length.

    \n

    height: number (optional)

    \n

    The height of the track.

    \n

    data: Array

    \n

    The data expects the following structure.

    \n
    {\n    name: String,\n    range:[min, max],\n    colour?: Line colour,\n        (Colour will be assigned if not provided. Use "none" for no line colour)\n    fill?: Create area plot using given fill colour (default "none"),\n    lineCurve?: 'curveLinear'(default)|'curveBasis'|'curveCardinal'|'curveStep'|'curveNatural',\n        (More curves - https://github.com/d3/d3-shape/blob/v2.0.0/README.md#curves)\n    values: [\n        {\n            position: Number,\n            value: Number\n        }\n    ]\n}
    \n

    also see protvista-track

    \n'},159:function(t,e,n){"use strict";n.r(e);var i=n(0),r=n.n(i),o=n(859),a=n(111),l=n(35),s=n(1011),u=n.n(s),c=n(860);e.default=function(){return Object(i.useEffect)((function(){Object(a.a)("nightingale-linegraph-track",o.a),document.querySelector("#track").data=c}),[]),r.a.createElement(i.Fragment,null,r.a.createElement(l.default,{content:u.a}),r.a.createElement("nightingale-linegraph-track",{id:"track",length:"100",height:"50"}))}},593:function(t,e,n){"use strict";function i(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=t&&("undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"]);if(null==n)return;var i,r,o=[],a=!0,l=!1;try{for(n=n.call(t);!(a=(i=n.next()).done)&&(o.push(i.value),!e||o.length!==e);a=!0);}catch(t){l=!0,r=t}finally{try{a||null==n.return||n.return()}finally{if(l)throw r}}return o}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n0&&void 0!==arguments[0]?arguments[0]:{},n=e.min,i=void 0===n?-1/0:n,r=e.max,a=void 0===r?1/0:r;o(this,t),this.segments=[],this.max=a,this.min=i,this.regionString=null}var e,n,r;return e=t,(n=[{key:"encode",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.segments.map((function(n){var i=n.start,r=n.end,o=n.color;if(e)return"".concat(i,":").concat(r).concat(o?":".concat(o):"");var a=i===t.min?"":i,l=r===t.max?"":r;return"".concat(a,":").concat(l).concat(o?":".concat(o):"")})).join(",")}},{key:"decode",value:function(t){var e=this;void 0!==t&&(this.regionString=t),this.regionString?this.segments=this.regionString.split(",").map((function(t){var n=i(t.split(":"),4),r=n[0],o=n[1],a=n[2];if(void 0!==n[3])throw new Error("there should be at most 2 ':' per region. Region: ".concat(t));var l=r?Number(r):e.min,s=o?Number(o):e.max,u=""!==a?a:void 0;if(l>s){var c=[s,l];l=c[0],s=c[1]}if(le.max&&(s=e.max),Number.isNaN(l))throw new Error("The parsed value of ".concat(r," is NaN. Region: ").concat(t));if(Number.isNaN(s))throw new Error("The parsed value of ".concat(o," is NaN. Region: ").concat(t));if(u&&!u.match(/^#[0-9a-f]{6,8}$/i))throw new Error("The parsed value of ".concat(a," is not a color in hex format. Region: ").concat(t));return{start:l,end:s,color:u}})):this.segments=[]}}])&&a(e.prototype,n),r&&a(e,r),t}();function s(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:400;p(this,t),this.element=e,this.timeStampWheelOutside=0,this.resetScrollableTimeout=null,this.scrollDelay=n}var e,n,i;return e=t,(n=[{key:"setElementScrollable",value:function(t){this.element.setAttribute("scrollable",t)}},{key:"startResetScrollableTimer",value:function(){var t=this;this.resetScrollableTimeout&&clearTimeout(this.resetScrollableTimeout),this.resetScrollableTimeout=setTimeout((function(){t.setElementScrollable(!0),t.resetScrollableTimeout=null}),this.scrollDelay)}},{key:"blockScroll",value:function(t){this.timeStampWheelOutside=t,this.setElementScrollable(!1),this.startResetScrollableTimer()}},{key:"wheel",value:function(t){var e=t.target,n=t.timeStamp;this.element.contains(e)?n=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,l=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){l=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw o}}}}function y(t){return function(t){if(Array.isArray(t))return _(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||b(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(t,e){if(t){if("string"==typeof t)return _(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_(t,e):void 0}}function _(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n0&&void 0!==arguments[0]?arguments[0]:null,e=[],n=[];if(null!==t&&"string"!=typeof t)throw new Error("The attribute text has to be of type string");if(t&&""!==t.trim()){var i=t.split(",").map((function(t){return t.split(":")}));if(i.length<2)throw new Error("There should be at least 2 points to create a scale");e=i.map((function(t){var e=t[0].trim().toUpperCase();if(!h(e))throw new Error("The color '".concat(e," is not valid'"));return e})),n=i.map((function(t,e){var n=parseFloat(t[1]);if(Number.isNaN(n))throw new Error("The second part of every point should be a number. Error in point ".concat(e,": ").concat(t));return n}))}return{range:e,domain:n}},H=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.keyFormatter,i=void 0===n?f:n,r=e.valueFormatter,o=void 0===r?f:r;if(null!==t&&"string"!=typeof t)throw new Error("The attribute text has to be of type string");if(t&&""!==t.trim()){var a=t.split(",").map((function(t){return t.split(":")})),l={};return a.forEach((function(t){if(2!==t.length)throw new Error("Bad block: ".concat(t.join(":"),"\n The blocks of the string should follow the format KEY:VALUE"));l[i(t[0])]=o(t[1])})),l}return{}},P=d,R=function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{initialValue:{top:0,bottom:0,left:0,right:0}},i=function(t){E(i,t);var e=A(i);function i(){var t;return w(this,i),(t=e.call(this)).margin=n.initialValue,t}return k(i,[{key:"attributeChangedCallback",value:function(t,e,n){e!==n&&x.includes(t)&&(this[t]=n),O(C(i.prototype),"attributeChangedCallback",this).call(this,t,e,n)}}],[{key:"observedAttributes",get:function(){return[].concat(y(O(C(i),"observedAttributes",this)),y(x))}}]),i}(t),r=v(F);try{var o=function(){var t=e.value;Object.defineProperty(i.prototype,"margin".concat(t),{get:function(){return this.margin[t]||0},set:function(e){this.margin[t]=+e}})};for(r.s();!(e=r.n()).done;)o()}catch(t){r.e(t)}finally{r.f()}return i}},594:function(t,e,n){"use strict";var i=n(608),r=n(604);e.a=function(t){return Object(r.a)(t)&&Object(i.a)(t)}},595:function(t,e,n){"use strict";e.a=function(t,e,n){for(var i=-1,r=null==t?0:t.length;++i-1}},598:function(t,e,n){"use strict";var i=n(614);var r=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)},o=Math.max;var a=function(t,e,n){return e=o(void 0===e?t.length-1:e,0),function(){for(var i=arguments,a=-1,l=o(i.length-e,0),s=Array(l);++a0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(u);e.a=function(t,e){return h(a(t,e,i.a),t+"")}},599:function(t,e,n){"use strict";var i=function(t,e,n,i){for(var r=t.length,o=n+(i?1:-1);i?o--:++o-1:!!a&&Object(r.a)(t,e,n)>-1},C=n(632),F=n(619),x=n(613),T=n(609);function N(t,e){for(var n=0;n5&&(t=this._ftWidth-5);var e=this._ftHeight/4;return"M0,"+e+"L"+t+","+e+"L"+t+","+3*e+"L0,"+3*e+"L0,"+e+"M"+t+",0L"+this._ftWidth+","+2*e+"L"+t+","+this._ftHeight+"Z"}}])&&N(e.prototype,n),i&&N(e,i),t}();function H(t,e){for(var n=0;nNumber(n.end)||Number(i.end)=0?(e._rows[n].push(t),e.featuresMap.set(t,n)):(e._rows.push([t]),e.featuresMap.set(t,e._rows.length-1))})),this._rowHeight=Math.min(this._layoutHeight/this._rows.length,this._minHeight)}},{key:"getOffset",value:function(){return this._rows.length*this._rowHeightt.length)&&(e=t.length);for(var n=0,i=new Array(e);n500&&(n=t.getSingleBaseWidth()<4?4:1),t._featureShape.getFeatureShape(t.getSingleBaseWidth()/2,t._layoutObj.getFeatureHeight(),n,t._getShape(e))})).attr("transform",(function(e){return"translate(".concat(t.getXFromSeqPosition(Number(e.feature.start)+Number(e.position)-1)+t.getSingleBaseWidth()/4,",\n ").concat(t._layoutObj.getFeatureYPos(e.feature),")")})).attr("fill","#06038D").style("fill-opacity",(function(t){var e=t.feature;return e.opacity?e.opacity:.9})).style("stroke-opacity",(function(t){var e=t.feature;return e.opacity?e.opacity:.9})).call(this.bindEvents,this)}},{key:"_applyFilters",value:function(){var t=this;if(!this._filters||this._filters.length<=0)this._data=this._originalData;else{var e=Object(C.a)(this._filters,"category"),n=Object.values(e).map((function(e){var n=e.map((function(e){return e.filterFn(t._originalData)}));return F.a.apply(void 0,$(n))})),i=x.a.apply(void 0,$(n));this._data=i}}},{key:"refresh",value:function(){var t=this;if(this.xScale&&this.seq_g){var e=this.seq_g.selectAll("g.fragment-group").data(this._data.reduce((function(t,e){return t.concat(e.locations.reduce((function(t,n){return t.concat(n.fragments.map((function(t){return Object.assign({},t,{feature:e})})))}),[]))}),[])),n=this.seq_g.selectAll("g.residue-group").data(this._data.reduce((function(t,e){var n;return t.concat([null===(n=e.ptms)||void 0===n?void 0:n.reduce((function(t){return t.concat((function(t){return Object.assign({},t,{feature:e,position:t.position})}))}),[])])}),[]));e.selectAll("path.feature").attr("d",(function(e){return t._featureShape.getFeatureShape(t.getSingleBaseWidth(),t._layoutObj.getFeatureHeight(e),e.end?e.end-e.start+1:1,t._getShape(e))})).attr("transform",(function(e){return"translate(".concat(t.getXFromSeqPosition(e.start),",").concat(t._layoutObj.getFeatureYPos(e.feature),")")})),n.selectAll("path.residue").attr("d",(function(e){var n=1;return t.length>500&&(n=t.getSingleBaseWidth()<4?4:1),t._featureShape.getFeatureShape(t.getSingleBaseWidth()/2,t._layoutObj.getFeatureHeight(e),n,t._getShape(e))})).attr("transform",(function(e){return"translate(".concat(t.getXFromSeqPosition(Number(e.feature.start)+Number(e.position)-1)+t.getSingleBaseWidth()/4,",").concat(t._layoutObj.getFeatureYPos(e.feature),")")})),e.selectAll("rect.outer-rectangle").attr("width",(function(e){return t.getSingleBaseWidth()*(e.end?e.end-e.start+1:1)})).attr("height",(function(e){return t._layoutObj.getFeatureHeight(e)})).attr("transform",(function(e){return"translate(".concat(t.getXFromSeqPosition(e.start),",").concat(t._layoutObj.getFeatureYPos(e.feature),")")})),this._updateHighlight()}}},{key:"_updateHighlight",value:function(){this.trackHighlighter.updateHighlight()}}])&&J(e.prototype,n),r&&J(e,r),a}(T.a);e.default=rt},609:function(t,e,n){"use strict";var i=n(585),r=n(593),o=n(665);function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function l(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=t&&("undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"]);if(null==n)return;var i,r,o=[],a=!0,l=!1;try{for(n=n.call(t);!(a=(i=n.next()).done)&&(o.push(i.value),!e||o.length!==e);a=!0);}catch(t){l=!0,r=t}finally{try{a||null==n.return||n.return()}finally{if(l)throw r}}return o}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return s(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4?arguments[4]:void 0,a=arguments.length>5?arguments[5]:void 0,l=arguments.length>6?arguments[6]:void 0;e&&(e=e.feature?e.feature:e);var s={eventtype:t,coords:v._getClickCoords(),feature:e,target:l};return n&&(e&&e.fragments?s.highlight=e.fragments.map((function(t){return"".concat(t.start,":").concat(t.end)})).join(","):i.event&&i.event.shiftKey&&this._highlight?s.highlight="".concat(this._highlight,",").concat(o,":").concat(a):s.highlight=o&&a?"".concat(o,":").concat(a):null),r&&(s.selectedid=e&&e.protvistaFeatureId),new CustomEvent("change",{detail:s,bubbles:!0,cancelable:!0})}},{key:"bindEvents",value:function(t,e){t.on("mouseover",(function(t,n,i){e.dispatchEvent(e.createEvent("mouseover",t,"onmouseover"===e._highlightEvent,!1,t.start,t.end,i[n]))})).on("mouseout",(function(){e.dispatchEvent(e.createEvent("mouseout",null,"onmouseover"===e._highlightEvent))})).on("click",(function(t,n,i){e.dispatchEvent(e.createEvent("click",t,"onclick"===e._highlightEvent,!0,t.start,t.end,i[n]))}))}}])&&u(a.prototype,s),f&&u(a,f),v}(f(HTMLElement));e.a=Object(r.f)(v,{initialValue:{top:10,right:10,bottom:10,left:10}})},613:function(t,e,n){"use strict";var i=n(590),r=n(621),o=n(596),a=n(595),l=n(664),s=n(616),u=Math.min;var c=function(t,e,n){for(var c=n?a.a:o.a,h=t[0].length,f=t.length,p=f,g=Array(f),d=1/0,m=[];p--;){var v=t[p];p&&e&&(v=Object(i.a)(v,Object(l.a)(e))),d=u(v.length,d),g[p]=!n&&(e||h>=120&&v.length>=120)?new r.a(p&&v):void 0}v=t[0];var y=-1,b=g[0];t:for(;++y=200){var d=e?null:f(t);if(d)return Object(h.a)(d);c=!1,r=s.a,g=new o.a}else g=e?[]:p;t:for(;++it.length)&&(e=t.length);for(var n=0,i=new Array(e);nu.xScale(u.end)+u.getSingleBaseWidth())r.selectAll(".mouse-per-line circle").style("opacity","0"),r.selectAll(".mouse-per-line text").style("opacity","0");else{var n={},i=Math.floor(u.xScale.invert(e[0]));r.selectAll(".mouse-per-line circle").style("opacity",(function(t){var e=t.values.find((function(t){return t.position===i}));return e&&e.value?"1":"0"})),r.selectAll(".mouse-per-line text").style("opacity","1"),r.selectAll(".mouse-per-line text").text((function(t){var e=t.values.find((function(t){return t.position===i}));return n[t.name]=e,e?e.value:""})),r.selectAll(".mouse-per-line").attr("transform",(function(t,n){for(var i=0,r=l.nodes()[n].getTotalLength(),o=null,a={};o=Math.floor((i+r)/2),a=l.nodes()[n].getPointAtLength(o),o!==r&&o!==i||a.x===e[0];)if(a.x>e[0])r=o;else{if(!(a.x-1}},598:function(t,e,n){"use strict";var r=n(614);var i=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)},o=Math.max;var u=function(t,e,n){return e=o(void 0===e?t.length-1:e,0),function(){for(var r=arguments,u=-1,a=o(r.length-e,0),l=Array(a);++u0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(s);e.a=function(t,e){return f(u(t,e,r.a),t+"")}},599:function(t,e,n){"use strict";var r=function(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o=120&&b.length>=120)?new i.a(p&&b):void 0}b=t[0];var m=-1,g=v[0];t:for(;++m=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var u,a=!0,l=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){l=!0,u=t},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw u}}}}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n1?e-1:0),r=1;r=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,u=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return u=t.done,t},e:function(t){a=!0,o=t},f:function(){try{u||null==n.return||n.return()}finally{if(a)throw o}}}}function d(t){return function(t){if(Array.isArray(t))return b(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||y(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(t,e){if(t){if("string"==typeof t)return b(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?b(t,e):void 0}}function b(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n>>0,1)}},{key:"_$Em",value:function(){var t=this;this.constructor.elementProperties.forEach((function(e,n){t.hasOwnProperty(n)&&(t._$Et.set(n,t[n]),delete t[n])}))}},{key:"createRenderRoot",value:function(){var t,e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return function(t,e){a?t.adoptedStyleSheets=e.map((function(t){return t instanceof CSSStyleSheet?t:t.styleSheet})):e.forEach((function(e){var n=document.createElement("style"),r=window.litNonce;void 0!==r&&n.setAttribute("nonce",r),n.textContent=e.cssText,t.appendChild(n)}))}(e,this.constructor.elementStyles),e}},{key:"connectedCallback",value:function(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$Eg)||void 0===t||t.forEach((function(t){var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}},{key:"enableUpdating",value:function(t){}},{key:"disconnectedCallback",value:function(){var t;null===(t=this._$Eg)||void 0===t||t.forEach((function(t){var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}},{key:"attributeChangedCallback",value:function(t,e,n){this._$AK(t,n)}},{key:"_$ES",value:function(t,e){var n,r,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:R,o=this.constructor._$Eh(t,i);if(void 0!==o&&!0===i.reflect){var u=(null!==(r=null===(n=i.converter)||void 0===n?void 0:n.toAttribute)&&void 0!==r?r:x.toAttribute)(e,i.type);this._$Ei=t,null==u?this.removeAttribute(o):this.setAttribute(o,u),this._$Ei=null}}},{key:"_$AK",value:function(t,e){var n,r,i,o=this.constructor,u=o._$Eu.get(t);if(void 0!==u&&this._$Ei!==u){var a=o.getPropertyOptions(u),l=a.converter,s=null!==(i=null!==(r=null===(n=l)||void 0===n?void 0:n.fromAttribute)&&void 0!==r?r:"function"==typeof l?l:null)&&void 0!==i?i:x.fromAttribute;this._$Ei=u,this[u]=s(e,a.type),this._$Ei=null}}},{key:"requestUpdate",value:function(t,e,n){var r=!0;void 0!==t&&(((n=n||this.constructor.getPropertyOptions(t)).hasChanged||T)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===n.reflect&&this._$Ei!==t&&(void 0===this._$E_&&(this._$E_=new Map),this._$E_.set(t,n))):r=!1),!this.isUpdatePending&&r&&(this._$Ep=this._$EC())}},{key:"_$EC",value:(u=regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.isUpdatePending=!0,t.prev=1,t.next=4,this._$Ep;case 4:t.next=9;break;case 6:t.prev=6,t.t0=t.catch(1),Promise.reject(t.t0);case 9:if(e=this.scheduleUpdate(),t.t1=null!=e,!t.t1){t.next=14;break}return t.next=14,e;case 14:return t.abrupt("return",!this.isUpdatePending);case 15:case"end":return t.stop()}}),t,this,[[1,6]])})),l=function(){var t=this,e=arguments;return new Promise((function(n,r){var i=u.apply(t,e);function o(t){g(i,n,r,o,a,"next",t)}function a(t){g(i,n,r,o,a,"throw",t)}o(void 0)}))},function(){return l.apply(this,arguments)})},{key:"scheduleUpdate",value:function(){return this.performUpdate()}},{key:"performUpdate",value:function(){var t,e=this;if(this.isUpdatePending){this.hasUpdated,this._$Et&&(this._$Et.forEach((function(t,n){return e[n]=t})),this._$Et=void 0);var n=!1,r=this._$AL;try{(n=this.shouldUpdate(r))?(this.willUpdate(r),null===(t=this._$Eg)||void 0===t||t.forEach((function(t){var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(r)):this._$EU()}catch(t){throw n=!1,this._$EU(),t}n&&this._$AE(r)}}},{key:"willUpdate",value:function(t){}},{key:"_$AE",value:function(t){var e;null===(e=this._$Eg)||void 0===e||e.forEach((function(t){var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}},{key:"_$EU",value:function(){this._$AL=new Map,this.isUpdatePending=!1}},{key:"updateComplete",get:function(){return this.getUpdateComplete()}},{key:"getUpdateComplete",value:function(){return this._$Ep}},{key:"shouldUpdate",value:function(t){return!0}},{key:"update",value:function(t){var e=this;void 0!==this._$E_&&(this._$E_.forEach((function(t,n){return e._$ES(n,e[n],t)})),this._$E_=void 0),this._$EU()}},{key:"updated",value:function(t){}},{key:"firstUpdated",value:function(t){}}],o=[{key:"addInitializer",value:function(t){var e;null!==(e=this.l)&&void 0!==e||(this.l=[]),this.l.push(t)}},{key:"observedAttributes",get:function(){var t=this;this.finalize();var e=[];return this.elementProperties.forEach((function(n,r){var i=t._$Eh(r,n);void 0!==i&&(t._$Eu.set(i,r),e.push(i))})),e}},{key:"createProperty",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:R;if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){var n="symbol"==m(t)?Symbol():"__"+t,r=this.getPropertyDescriptor(t,n,e);void 0!==r&&Object.defineProperty(this.prototype,t,r)}}},{key:"getPropertyDescriptor",value:function(t,e,n){return{get:function(){return this[e]},set:function(r){var i=this[t];this[e]=r,this.requestUpdate(t,i,n)},configurable:!0,enumerable:!0}}},{key:"getPropertyOptions",value:function(t){return this.elementProperties.get(t)||R}},{key:"finalize",value:function(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;var t=Object.getPrototypeOf(this);if(t.finalize(),this.elementProperties=new Map(t.elementProperties),this._$Eu=new Map,this.hasOwnProperty("properties")){var e,n=this.properties,r=v([].concat(d(Object.getOwnPropertyNames(n)),d(Object.getOwnPropertySymbols(n))));try{for(r.s();!(e=r.n()).done;){var i=e.value;this.createProperty(i,n[i])}}catch(t){r.e(t)}finally{r.f()}}return this.elementStyles=this.finalizeStyles(this.styles),!0}},{key:"finalizeStyles",value:function(t){var e=[];if(Array.isArray(t)){var n,r=v(new Set(t.flat(1/0).reverse()));try{for(r.s();!(n=r.n()).done;){var i=n.value;e.unshift(p(i))}}catch(t){r.e(t)}finally{r.f()}}else void 0!==t&&e.push(p(t));return e}},{key:"_$Eh",value:function(t,e){var n=e.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof t?t.toLowerCase():void 0}}],i&&_(r.prototype,i),o&&_(r,o),c}(A(HTMLElement));function H(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&M(t,e)}function M(t,e){return(M=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function N(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=D(t);if(e){var i=D(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return I(this,n)}}function I(t,e){return!e||"object"!==F(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function D(t){return(D=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function B(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=V(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,u=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return u=t.done,t},e:function(t){a=!0,o=t},f:function(){try{u||null==n.return||n.return()}finally{if(a)throw o}}}}function z(t){return function(t){if(Array.isArray(t))return W(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||V(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function L(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=t&&("undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"]);if(null==n)return;var r,i,o=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);u=!0);}catch(t){a=!0,i=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw i}}return o}(t,e)||V(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function V(t,e){if(t){if("string"==typeof t)return W(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?W(t,e):void 0}}function W(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n"),tt=document,et=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return tt.createComment(t)},nt=function(t){return null===t||"object"!=F(t)&&"function"!=typeof t},rt=Array.isArray,it=function(t){var e;return rt(t)||"function"==typeof(null===(e=t)||void 0===e?void 0:e[Symbol.iterator])},ot=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ut=/-->/g,at=/>/g,lt=/>|[ \n \r](?:([^\s"'>=/]+)([ \n \r]*=[ \n \r]*(?:[^ \n \r"'`<>=]|("|')|))|$)/g,st=/'/g,ct=/"/g,ft=/^(?:script|style|textarea)$/i,ht=function(t){return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i":"",u=ot,a=0;a"===c[0]?(u=null!=n?n:ot,f=-1):void 0===c[1]?f=-2:(f=u.lastIndex-c[2].length,s=c[1],u=void 0===c[3]?lt:'"'===c[3]?ct:st):u===ct||u===st?u=lt:u===ut||u===at?u=ot:(u=lt,n=void 0);var p=u===lt&&t[a+1].startsWith("/>")?" ":"";o+=u===ot?l+Y:f>=0?(i.push(s),l.slice(0,f)+"$lit$"+l.slice(f)+Q+p):l+Q+(-2===f?(i.push(void 0),a):p)}var v=o+(t[r]||"")+(2===e?"":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==G?G.createHTML(v):v,i]},gt=function(){function t(e,n){var r,i=e.strings,o=e._$litType$;J(this,t),this.parts=[];var u=0,a=0,l=i.length-1,s=this.parts,c=L(mt(i,o),2),f=c[0],h=c[1];if(this.el=t.createElement(f,n),bt.currentNode=this.el.content,2===o){var p=this.el.content,v=p.firstChild;v.remove(),p.append.apply(p,z(v.childNodes))}for(;null!==(r=bt.nextNode())&&s.length0){r.textContent=Z?Z.emptyScript:"";for(var k=0;k2&&void 0!==arguments[2]?arguments[2]:t,a=arguments.length>3?arguments[3]:void 0;if(e===vt)return e;var l=void 0!==a?null===(n=u._$Cl)||void 0===n?void 0:n[a]:u._$Cu,s=nt(e)?void 0:e._$litDirective$;return(null==l?void 0:l.constructor)!==s&&(null===(r=null==l?void 0:l._$AO)||void 0===r||r.call(l,!1),void 0===s?l=void 0:(l=new s(t))._$AT(t,u,a),void 0!==a?(null!==(i=(o=u)._$Cl)&&void 0!==i?i:o._$Cl=[])[a]=l:u._$Cu=l),void 0!==l&&(e=_t(t,l._$AS(t,e.values),l,a)),e}var $t,At,wt=function(){function t(e,n){J(this,t),this.v=[],this._$AN=void 0,this._$AD=e,this._$AM=n}return K(t,[{key:"parentNode",get:function(){return this._$AM.parentNode}},{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"p",value:function(t){var e,n=this._$AD,r=n.el.content,i=n.parts,o=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:tt).importNode(r,!0);bt.currentNode=o;for(var u=bt.nextNode(),a=0,l=0,s=i[0];void 0!==s;){if(a===s.index){var c=void 0;2===s.type?c=new St(u,u.nextSibling,this,t):1===s.type?c=new s.ctor(u,s.name,s.strings,this,t):6===s.type&&(c=new Ct(u,this,t)),this.v.push(c),s=i[++l]}a!==(null==s?void 0:s.index)&&(u=bt.nextNode(),a++)}return o}},{key:"m",value:function(t){var e,n=0,r=B(this.v);try{for(r.s();!(e=r.n()).done;){var i=e.value;void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,n),n+=i.strings.length-2):i._$AI(t[n])),n++}}catch(t){r.e(t)}finally{r.f()}}}]),t}(),St=function(){function t(e,n,r,i){var o;J(this,t),this.type=2,this._$AH=dt,this._$AN=void 0,this._$AA=e,this._$AB=n,this._$AM=r,this.options=i,this._$Cg=null===(o=null==i?void 0:i.isConnected)||void 0===o||o}return K(t,[{key:"_$AU",get:function(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cg}},{key:"parentNode",get:function(){var t=this._$AA.parentNode,e=this._$AM;return void 0!==e&&11===t.nodeType&&(t=e.parentNode),t}},{key:"startNode",get:function(){return this._$AA}},{key:"endNode",get:function(){return this._$AB}},{key:"_$AI",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this;t=_t(this,t,e),nt(t)?t===dt||null==t||""===t?(this._$AH!==dt&&this._$AR(),this._$AH=dt):t!==this._$AH&&t!==vt&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.S(t):it(t)?this.A(t):this.$(t)}},{key:"M",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._$AB;return this._$AA.parentNode.insertBefore(t,e)}},{key:"S",value:function(t){this._$AH!==t&&(this._$AR(),this._$AH=this.M(t))}},{key:"$",value:function(t){this._$AH!==dt&&nt(this._$AH)?this._$AA.nextSibling.data=t:this.S(tt.createTextNode(t)),this._$AH=t}},{key:"T",value:function(t){var e,n=t.values,r=t._$litType$,i="number"==typeof r?this._$AC(t):(void 0===r.el&&(r.el=gt.createElement(r.h,this.options)),r);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===i)this._$AH.m(n);else{var o=new wt(i,this),u=o.p(this.options);o.m(n),this.S(u),this._$AH=o}}},{key:"_$AC",value:function(t){var e=yt.get(t.strings);return void 0===e&&yt.set(t.strings,e=new gt(t)),e}},{key:"A",value:function(e){rt(this._$AH)||(this._$AH=[],this._$AR());var n,r,i=this._$AH,o=0,u=B(e);try{for(u.s();!(r=u.n()).done;){var a=r.value;o===i.length?i.push(n=new t(this.M(et()),this.M(et()),this,this.options)):n=i[o],n._$AI(a),o++}}catch(t){u.e(t)}finally{u.f()}o0&&void 0!==arguments[0]?arguments[0]:this._$AA.nextSibling,n=arguments.length>1?arguments[1]:void 0;for(null===(t=this._$AP)||void 0===t||t.call(this,!1,!0,n);e&&e!==this._$AB;){var r=e.nextSibling;e.remove(),e=r}}},{key:"setConnected",value:function(t){var e;void 0===this._$AM&&(this._$Cg=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}]),t}(),Ot=function(){function t(e,n,r,i,o){J(this,t),this.type=1,this._$AH=dt,this._$AN=void 0,this.element=e,this.name=n,this._$AM=i,this.options=o,r.length>2||""!==r[0]||""!==r[1]?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=dt}return K(t,[{key:"tagName",get:function(){return this.element.tagName}},{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"_$AI",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=this.strings,o=!1;if(void 0===i)t=_t(this,t,e,0),(o=!nt(t)||t!==this._$AH&&t!==vt)&&(this._$AH=t);else{var u,a,l=t;for(t=i[0],u=0;u1&&void 0!==arguments[1]?arguments[1]:this;if((t=null!==(e=_t(this,t,n,0))&&void 0!==e?e:dt)!==vt){var r=this._$AH,i=t===dt&&r!==dt||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,o=t!==dt&&(r===dt||i);i&&this.element.removeEventListener(this.name,this,r),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}}},{key:"handleEvent",value:function(t){var e,n;"function"==typeof this._$AH?this._$AH.call(null!==(n=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==n?n:this.element,t):this._$AH.handleEvent(t)}}]),n}(Ot),Ct=function(){function t(e,n,r){J(this,t),this.element=e,this.type=6,this._$AN=void 0,this._$AM=n,this.options=r}return K(t,[{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"_$AI",value:function(t){_t(this,t)}}]),t}(),xt=window.litHtmlPolyfillSupport;function Tt(t){return(Tt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Rt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ut(t,e){for(var n=0;nprotvista-structure\n

    Published on NPM

    \n

    A native web component wrapper around Mol*

    \n

    Usage

    \n
    <!-- With UniProt Accession -->\n<protvista-structure accession="P06493" structureId="4YC3" />\n<!-- With a specific PDBe entry selected and the entry table being hidden -->\n<protvista-structure\n  accession="P06493"\n  highlight="209:220"\n  structureId="4YC3"\n  hide-table\n/>
    \n

    API Reference

    \n

    Properties

    \n

    accession

    \n

    A UniProt protein accession.

    \n

    highlight

    \n

    This is a comma separated list of numerical ranges represented as a string e.g. "1-5,10-20". When available, it will highlight all the residues corresponding to the given sequence positions.

    \n

    structureId

    \n

    The id of the structure to display for the provided accession.

    \n

    height

    \n

    The optional height of both table -- if visible, and the 3D structure. By default the value is set to 480px. This should be a string value, representing a valid CSS value for an element's height property.

    \n

    uniprot-mapping-url

    \n

    Optional custom URL for fetching the mapping from PDB to UniProt. The lowercase PDB ID is appended here.

    \n

    alphafold-mapping-url

    \n

    Optional custom URL for fetching the AlphaFold prediction metadata and mapping. The AlphaFold structure ID is appended here.

    \n

    custom-download-url

    \n

    Optional custom URL for downloading cif structure files. The lowercase PDB ID is appended to it, including .cif suffix.

    \n

    use-ctrl-to-zoom

    \n

    Analogous to protvista-zoomable, use control key when scrolling to zoom the viewer

    \n'},1072:function(t){t.exports=JSON.parse('[{"databaseType":"PDB","id":"1AAP","properties":{"Method":"X-ray","Resolution":"1.50 A","Chains":"A/B=287-344"}},{"databaseType":"PDB","id":"1AMB","properties":{"Method":"NMR","Resolution":"-","Chains":"A=672-699"}},{"databaseType":"PDB","id":"1AMC","properties":{"Method":"NMR","Resolution":"-","Chains":"A=672-699"}},{"databaseType":"PDB","id":"1AML","properties":{"Method":"NMR","Resolution":"-","Chains":"A=672-711"}},{"databaseType":"PDB","id":"1BA4","properties":{"Method":"NMR","Resolution":"-","Chains":"A=672-711"}},{"databaseType":"PDB","id":"1BA6","properties":{"Method":"NMR","Resolution":"-","Chains":"A=672-711"}},{"databaseType":"PDB","id":"1BJB","properties":{"Method":"NMR","Resolution":"-","Chains":"A=672-699"}},{"databaseType":"PDB","id":"1BJC","properties":{"Method":"NMR","Resolution":"-","Chains":"A=672-699"}},{"databaseType":"PDB","id":"1BRC","properties":{"Method":"X-ray","Resolution":"2.50 A","Chains":"I=287-342"}},{"databaseType":"PDB","id":"1CA0","properties":{"Method":"X-ray","Resolution":"2.10 A","Chains":"D/I=289-342"}},{"databaseType":"PDB","id":"1HZ3","properties":{"Method":"NMR","Resolution":"-","Chains":"A=681-706"}},{"databaseType":"PDB","id":"1IYT","properties":{"Method":"NMR","Resolution":"-","Chains":"A=672-713"}},{"databaseType":"PDB","id":"1MWP","properties":{"Method":"X-ray","Resolution":"1.80 A","Chains":"A=28-123"}},{"databaseType":"PDB","id":"1OWT","properties":{"Method":"NMR","Resolution":"-","Chains":"A=124-189"}},{"databaseType":"PDB","id":"1QCM","properties":{"Method":"NMR","Resolution":"-","Chains":"A=696-706"}},{"databaseType":"PDB","id":"1QWP","properties":{"Method":"NMR","Resolution":"-","Chains":"A=696-706"}},{"databaseType":"PDB","id":"1QXC","properties":{"Method":"NMR","Resolution":"-","Chains":"A=696-706"}},{"databaseType":"PDB","id":"1QYT","properties":{"Method":"NMR","Resolution":"-","Chains":"A=696-706"}},{"databaseType":"PDB","id":"1TAW","properties":{"Method":"X-ray","Resolution":"1.80 A","Chains":"B=287-344"}},{"databaseType":"PDB","id":"1TKN","properties":{"Method":"NMR","Resolution":"-","Chains":"A=460-569"}},{"databaseType":"PDB","id":"1UO7","properties":{"Method":"Model","Resolution":"-","Chains":"A=672-713"}},{"databaseType":"PDB","id":"1UO8","properties":{"Method":"Model","Resolution":"-","Chains":"A=672-713"}},{"databaseType":"PDB","id":"1UOA","properties":{"Method":"Model","Resolution":"-","Chains":"A=672-713"}},{"databaseType":"PDB","id":"1UOI","properties":{"Method":"Model","Resolution":"-","Chains":"A=672-713"}},{"databaseType":"PDB","id":"1X11","properties":{"Method":"X-ray","Resolution":"2.50 A","Chains":"C/D=754-766"}},{"databaseType":"PDB","id":"1Z0Q","properties":{"Method":"NMR","Resolution":"-","Chains":"A=672-713"}},{"databaseType":"PDB","id":"1ZE7","properties":{"Method":"NMR","Resolution":"-","Chains":"A=672-687"}},{"databaseType":"PDB","id":"1ZE9","properties":{"Method":"NMR","Resolution":"-","Chains":"A=672-687"}},{"databaseType":"PDB","id":"1ZJD","properties":{"Method":"X-ray","Resolution":"2.60 A","Chains":"B=289-344"}},{"databaseType":"PDB","id":"2BEG","properties":{"Method":"NMR","Resolution":"-","Chains":"A/B/C/D/E=672-713"}},{"databaseType":"PDB","id":"2BOM","properties":{"Method":"Model","Resolution":"-","Chains":"A/B=681-713"}},{"databaseType":"PDB","id":"2BP4","properties":{"Method":"NMR","Resolution":"-","Chains":"A=672-687"}},{"databaseType":"PDB","id":"2FJZ","properties":{"Method":"X-ray","Resolution":"1.61 A","Chains":"A=133-189"}},{"databaseType":"PDB","id":"2FK1","properties":{"Method":"X-ray","Resolution":"1.60 A","Chains":"A=133-189"}},{"databaseType":"PDB","id":"2FK2","properties":{"Method":"X-ray","Resolution":"1.65 A","Chains":"A=133-189"}},{"databaseType":"PDB","id":"2FK3","properties":{"Method":"X-ray","Resolution":"2.40 A","Chains":"A/B/C/D/E/F/G/H=133-189"}},{"databaseType":"PDB","id":"2FKL","properties":{"Method":"X-ray","Resolution":"2.50 A","Chains":"A/B=124-189"}},{"databaseType":"PDB","id":"2FMA","properties":{"Method":"X-ray","Resolution":"0.85 A","Chains":"A=133-189"}},{"databaseType":"PDB","id":"2G47","properties":{"Method":"X-ray","Resolution":"2.10 A","Chains":"C/D=672-711"}},{"databaseType":"PDB","id":"2IPU","properties":{"Method":"X-ray","Resolution":"1.65 A","Chains":"P/Q=672-679"}},{"databaseType":"PDB","id":"2LFM","properties":{"Method":"NMR","Resolution":"-","Chains":"A=672-711"}},{"databaseType":"PDB","id":"2LLM","properties":{"Method":"NMR","Resolution":"-","Chains":"A=686-726"}},{"databaseType":"PDB","id":"2LMN","properties":{"Method":"NMR","Resolution":"-","Chains":"A/B/C/D/E/F/G/H/I/J/K/L=672-711"}},{"databaseType":"PDB","id":"2LMO","properties":{"Method":"NMR","Resolution":"-","Chains":"A/B/C/D/E/F/G/H/I/J/K/L=672-711"}}]')},172:function(t,e,r){"use strict";r.r(e);var n=r(0),i=r.n(n),o=r(629),a=r(1099),s=(r(1051),r(1098)),u=r(1001),c=r(991),l=r(879),h=r(669),f=r(575),p=r(730),d=r(597),b=r(581),y=r(576),g=r(573),m=r(651),v=r(580),w=r(824),_=r(647),A=r(835),S=r(617),k=r(972),E=r(587),R=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(t){o(t)}}function s(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))},O=function(t){return!!t&&f.d.isFromPdbArchive(t)},P={local_metric_values:{label_asym_id:v.a.Schema.str,label_comp_id:v.a.Schema.str,label_seq_id:v.a.Schema.int,metric_id:v.a.Schema.int,metric_value:v.a.Schema.float,model_id:v.a.Schema.int,ordinal_id:v.a.Schema.int}},M=function(t,e){var r=function(t,e){if(_.a.is(e.sourceData)&&e.sourceData.data.frame.categoryNames.includes(t)){var r=e.sourceData.data.frame.categories[t].getField("metric_value");if(r&&0!==r.rowCount)return{timestamp_utc:r.str(0)||Object(k.a)(new Date)}}}("ma_qa_metric_local",e);if(r)return{info:r,data:function(t,e){for(var r=new Map,n=e.label_asym_id,i=e.label_seq_id,o=e.metric_value,a=e._rowCount,s=[],u=0;u50&&c<=70?h="Low":c>70&&c<=90?h="Medium":c>90&&(h="High"),r.set(l,[c,h]),Object(E.l)(s,h)}return{score:f.c.fromResidueMap(r),category:s}}(e,function(t){if(!_.a.is(t.sourceData))throw new Error("Data format must be mmCIF.");return{residues:Object(w.c)(P.local_metric_values,t.sourceData.data.frame.categories.ma_qa_metric_local)}}(e).residues)}};function C(t,e,r){return R(this,void 0,void 0,regeneratorRuntime.mark((function t(){var r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=M(0,e),t.abrupt("return",{value:r});case 2:case"end":return t.stop()}}),t)})))}function T(t){if(!f.n.isAtomic(t.unit))return[-1,"No Score"];var e=B.get(t.unit.model).value;if(!e||!e.data)return[-1,"No Score"];var r=t.unit.residueIndex[t.element];return e.data.score.has(r)?e.data.score.get(r):[-1,"No Score"]}var x=[];var j={serverUrl:g.a.Text("",{description:"JSON API Server URL"})},B=A.a.createProvider({label:"AF Confidence Score",descriptor:Object(S.b)({name:"af_confidence_score"}),type:"static",defaultParams:j,getParams:function(t){return j},isApplicable:function(t){return O(t)},obtain:function(t,e,r){return R(void 0,void 0,void 0,regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return Object.assign(Object.assign({},g.a.getDefaultValues(j)),r),t.next=3,C(0,e);case 3:return n=t.sent,t.abrupt("return",n);case 5:case"end":return t.stop()}}),t)})))}});var D={"No Score":b.a.fromRgb(170,170,170),"Very low":b.a.fromRgb(255,125,69),Low:b.a.fromRgb(255,219,19),Medium:b.a.fromRgb(101,203,243),High:b.a.fromRgb(0,83,214)},N={type:g.a.MappedStatic("score",{score:g.a.Group({}),category:g.a.Group({kind:g.a.Text()})})};var F={name:"af-confidence",label:"AF Confidence",category:"Validation",factory:function t(e,r){var n;if(e.structure&&!e.structure.isEmpty&&e.structure.models[0].customProperties.has(B.descriptor))if("score"===r.type.name)n=function(t){if(f.h.Location.is(t)){var e=T(t);return D[e[1]]}return D["No Score"]};else{var i=r.type.params.kind;n=function(t){if(f.h.Location.is(t)){var e=T(t);return e[1]===i?D[e[1]]:D["No Score"]}return D["No Score"]}}else n=function(){return D["No Score"]};return{factory:t,granularity:"group",color:n,props:r,description:"Assigns residue colors according to the AF Confidence score"}},getParams:function(t){var e=function(t){if(!t)return x;var e=B.get(t.models[0]).value;return e&&e.data?e.data.category:x}(t.structure);return 0===e.length?{type:g.a.MappedStatic("score",{score:g.a.Group({})})}:{type:g.a.MappedStatic("score",{score:g.a.Group({}),category:g.a.Group({kind:g.a.Select(e[0],g.a.arrayToOptions(e))},{isFlat:!0})})}},defaultValues:g.a.getDefaultValues(N),isApplicable:function(t){var e;return O(null===(e=t.structure)||void 0===e?void 0:e.models[0])},ensureCustomProperties:{attach:function(t,e){return e.structure?B.attach(t,e.structure.models[0],void 0,!0):Promise.resolve()},detach:function(t){return t.structure&&t.structure.models[0].customProperties.reference(B.descriptor,!1)}}};function I(t){return(I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function L(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function V(t,e){for(var r=0;r0?"Confidence score: ".concat(i[0]," ( ").concat(i[1]," )"):""}}},t}return e=o,(r=[{key:"register",value:function(){this.ctx.customModelProperties.register(this.provider,this.params.autoAttach),this.ctx.managers.lociLabels.addProvider(this.labelAfConfScore),this.ctx.representation.structure.themes.colorThemeRegistry.add(F)}},{key:"update",value:function(t){var e=this.params.autoAttach!==t.autoAttach;return this.params.autoAttach=t.autoAttach,this.params.showTooltip=t.showTooltip,this.ctx.customModelProperties.setDefaultAutoAttach(this.provider.descriptor.name,this.params.autoAttach),e}},{key:"unregister",value:function(){this.ctx.customModelProperties.unregister(B.descriptor.name),this.ctx.managers.lociLabels.removeProvider(this.labelAfConfScore),this.ctx.representation.structure.themes.colorThemeRegistry.remove(F)}}])&&V(e.prototype,r),n&&V(e,n),o}(m.a.Handler),params:function(){return{autoAttach:g.a.Boolean(!1),showTooltip:g.a.Boolean(!0)}}});r(1069);function z(t){return function(t){if(Array.isArray(t))return W(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return W(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return W(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function W(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}(o[1]);try{for(u.s();!(i=u.n()).done;){var c=i.value;if(c.unp_end-c.unp_start!=c.end.residue_number-c.start.residue_number)throw new mt("Mismatch between protein sequence and structure residues");var l="UP_PDB"===n?c.unp_start:c.start.residue_number,h="UP_PDB"===n?c.unp_end:c.end.residue_number;t>=l&&t<=h&&(a=c),e>=l&&e<=h&&(s=c)}}catch(t){u.e(t)}finally{u.f()}if(null===a||null===s)return null;var f="UP_PDB"===n?1:-1;return{entity:a.entity_id,chain:a.chain_id,start:t+f*(a.start.residue_number-a.unp_start),end:e+f*(s.start.residue_number-s.unp_start)}})).filter(Boolean);if(!i.length)throw new mt("Start or end coordinate outside of mapping range");return i};function wt(t){return(wt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function _t(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=t&&("undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"]);if(null==r)return;var n,i,o=[],a=!0,s=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(o.push(n.value),!e||o.length!==e);a=!0);}catch(t){s=!0,i=t}finally{try{a||null==r.return||r.return()}finally{if(s)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return At(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return At(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function At(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);rt.length)&&(e=t.length);for(var r=0,n=new Array(e);rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==arguments[0]?arguments[0]:{},r=e.min,n=void 0===r?-1/0:r,i=e.max,a=void 0===i?1/0:i;o(this,t),this.segments=[],this.max=a,this.min=n,this.regionString=null}var e,r,i;return e=t,(r=[{key:"encode",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.segments.map((function(r){var n=r.start,i=r.end,o=r.color;if(e)return"".concat(n,":").concat(i).concat(o?":".concat(o):"");var a=n===t.min?"":n,s=i===t.max?"":i;return"".concat(a,":").concat(s).concat(o?":".concat(o):"")})).join(",")}},{key:"decode",value:function(t){var e=this;void 0!==t&&(this.regionString=t),this.regionString?this.segments=this.regionString.split(",").map((function(t){var r=n(t.split(":"),4),i=r[0],o=r[1],a=r[2];if(void 0!==r[3])throw new Error("there should be at most 2 ':' per region. Region: ".concat(t));var s=i?Number(i):e.min,u=o?Number(o):e.max,c=""!==a?a:void 0;if(s>u){var l=[u,s];s=l[0],u=l[1]}if(se.max&&(u=e.max),Number.isNaN(s))throw new Error("The parsed value of ".concat(i," is NaN. Region: ").concat(t));if(Number.isNaN(u))throw new Error("The parsed value of ".concat(o," is NaN. Region: ").concat(t));if(c&&!c.match(/^#[0-9a-f]{6,8}$/i))throw new Error("The parsed value of ".concat(a," is not a color in hex format. Region: ").concat(t));return{start:s,end:u,color:c}})):this.segments=[]}}])&&a(e.prototype,r),i&&a(e,i),t}();function u(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:400;p(this,t),this.element=e,this.timeStampWheelOutside=0,this.resetScrollableTimeout=null,this.scrollDelay=r}var e,r,n;return e=t,(r=[{key:"setElementScrollable",value:function(t){this.element.setAttribute("scrollable",t)}},{key:"startResetScrollableTimer",value:function(){var t=this;this.resetScrollableTimeout&&clearTimeout(this.resetScrollableTimeout),this.resetScrollableTimeout=setTimeout((function(){t.setElementScrollable(!0),t.resetScrollableTimeout=null}),this.scrollDelay)}},{key:"blockScroll",value:function(t){this.timeStampWheelOutside=t,this.setElementScrollable(!1),this.startResetScrollableTimer()}},{key:"wheel",value:function(t){var e=t.target,r=t.timeStamp;this.element.contains(e)?r=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function m(t){return function(t){if(Array.isArray(t))return w(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||v(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(t,e){if(t){if("string"==typeof t)return w(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?w(t,e):void 0}}function w(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==arguments[0]?arguments[0]:null,e=[],r=[];if(null!==t&&"string"!=typeof t)throw new Error("The attribute text has to be of type string");if(t&&""!==t.trim()){var n=t.split(",").map((function(t){return t.split(":")}));if(n.length<2)throw new Error("There should be at least 2 points to create a scale");e=n.map((function(t){var e=t[0].trim().toUpperCase();if(!h(e))throw new Error("The color '".concat(e," is not valid'"));return e})),r=n.map((function(t,e){var r=parseFloat(t[1]);if(Number.isNaN(r))throw new Error("The second part of every point should be a number. Error in point ".concat(e,": ").concat(t));return r}))}return{range:e,domain:r}},D=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.keyFormatter,n=void 0===r?f:r,i=e.valueFormatter,o=void 0===i?f:i;if(null!==t&&"string"!=typeof t)throw new Error("The attribute text has to be of type string");if(t&&""!==t.trim()){var a=t.split(",").map((function(t){return t.split(":")})),s={};return a.forEach((function(t){if(2!==t.length)throw new Error("Bad block: ".concat(t.join(":"),"\n The blocks of the string should follow the format KEY:VALUE"));s[n(t[0])]=o(t[1])})),s}return{}},N=b,F=function(t){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{initialValue:{top:0,bottom:0,left:0,right:0}},n=function(t){E(n,t);var e=O(n);function n(){var t;return _(this,n),(t=e.call(this)).margin=r.initialValue,t}return S(n,[{key:"attributeChangedCallback",value:function(t,e,r){e!==r&&T.includes(t)&&(this[t]=r),k(M(n.prototype),"attributeChangedCallback",this).call(this,t,e,r)}}],[{key:"observedAttributes",get:function(){return[].concat(m(k(M(n),"observedAttributes",this)),m(T))}}]),n}(t),i=g(C);try{var o=function(){var t=e.value;Object.defineProperty(n.prototype,"margin".concat(t),{get:function(){return this.margin[t]||0},set:function(e){this.margin[t]=+e}})};for(i.s();!(e=i.n()).done;)o()}catch(t){i.e(t)}finally{i.f()}return n}},629:function(t,e,r){"use strict";r.d(e,"b",(function(){return g}));var n=r(675);function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return a(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return a(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return s=t.done,t},e:function(t){u=!0,o=t},f:function(){try{s||null==r.return||r.return()}finally{if(u)throw o}}}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r1&&void 0!==arguments[1]?arguments[1]:new Headers({accept:"application/json"}),r=y.get(t);if(r)return r;var n=b(void 0,void 0,void 0,regeneratorRuntime.mark((function r(){var n,i;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,window.fetch(t,{headers:e});case 2:if((n=r.sent).ok){r.next=5;break}throw new Error("Request Failed: Status = ".concat(n.status,"; URI = ").concat(t,"; Time = ").concat(new Date));case 5:if(204!==n.status){r.next=7;break}return r.abrupt("return",{payload:null,headers:n.headers});case 7:return r.next=9,n.json();case 9:return i=r.sent,r.abrupt("return",{payload:i,headers:n.headers});case 11:case"end":return r.stop()}}),r)})));return y.set(t,n),n.catch((function(){return y.delete(t)})),n},m=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&f(t,e)}(y,t);var e,r,i,a,c,l=(e=y,r=h(),function(){var t,n=p(e);if(r){var i=p(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return u(this,t)});function y(){var t;return d(this,y),(t=l.call(this))._data=null,t.selector=(t.getAttribute("selector")||"").trim()||function(t){return t},t}return i=y,c=[{key:"is",get:function(){return"data-loader"}}],(a=[{key:"fetch",value:function(){return b(this,void 0,void 0,regeneratorRuntime.mark((function t(){var e,r,i,a,s,u;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(c=this.children,(e=Array.from(c).filter((function(t){return t.matches('source[src], script[type="application/json"]')}))).length){t.next=3;break}return t.abrupt("return");case 3:r=[],a=o(e),t.prev=5,a.s();case 7:if((s=a.n()).done){t.next=31;break}if(u=s.value,t.prev=9,!(u instanceof HTMLSourceElement)){t.next=22;break}return t.t0=Object,t.t1=Object,t.t2={},t.next=16,g(u.src);case 16:t.t3=t.sent,t.t4=t.t1.assign.call(t.t1,t.t2,t.t3),t.t5={srcElement:u,src:u.src},i=t.t0.assign.call(t.t0,t.t4,t.t5),t.next=23;break;case 22:i={payload:JSON.parse(u.textContent)};case 23:return t.abrupt("break",31);case 26:t.prev=26,t.t6=t.catch(9),r.push(t.t6);case 29:t.next=7;break;case 31:t.next=36;break;case 33:t.prev=33,t.t7=t.catch(5),a.e(t.t7);case 36:return t.prev=36,a.f(),t.finish(36);case 39:if(i){t.next=43;break}this._errors=r;try{this.dispatchEvent(new CustomEvent("error",{detail:r,bubbles:!0,cancelable:!0}))}catch(t){console.error(t)}return t.abrupt("return");case 43:"string"==typeof this.selector?this._data=Object(n.a)(i.payload,this.selector):this._data=this.selector(i.payload),i.payload=this.data,this.dispatchEvent(new CustomEvent("load",{detail:i,bubbles:!0,cancelable:!0}));case 46:case"end":return t.stop()}var c}),t,this,[[5,33,36,39],[9,26]])})))}},{key:"data",get:function(){return this._data}},{key:"loaded",get:function(){return!!this.data}},{key:"errors",get:function(){return this._errors}},{key:"selector",get:function(){return this._selector},set:function(t){this._selector=t}},{key:"connectedCallback",value:function(){this.fetch()}}])&&s(i.prototype,a),c&&s(i,c),y}(c(HTMLElement));e.a=m},701:function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t){return function(t){if(Array.isArray(t))return o(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return o(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return o(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}(this.selectedFilters);try{for(n.s();!(r=n.n()).done;){var i=A(r.value,2),o=i[0],a=i[1],s=void 0;if((s=t.dataset.groupFor?this.querySelector('[data-id="'.concat(t.dataset.groupFor,'"]')).querySelector('[data-filter="'.concat(o,'"]')):t.querySelector('[data-filter="'.concat(o,'"]')))&&s.dataset.filterValue!==a)return!1}}catch(t){n.e(t)}finally{n.f()}return e}},{key:"updateRowStyling",value:function(){var t,e=this,r=0;null===(t=this.rows)||void 0===t||t.forEach((function(t){e.isRowVisible(t)?t.classList.remove(m.cssText):t.classList.add(m.cssText),t.dataset.groupFor||r++;var n=t.dataset,i=n.start,o=n.end;if(t.classList.add(r%2==0?"even":"odd"),!e.selectedid||e.selectedid!==t.dataset.id&&t.dataset.groupFor!==e.selectedid?t.classList.remove(b.cssText):t.classList.add(b.cssText),function(t,e,r,n){return t>n||e=n}(e.highlight[0],e.highlight[1],Number(i),Number(o))?t.classList.add(g.cssText):t.classList.remove(g.cssText),t.dataset.groupFor){var a=e.columns.length+1;t.cells[0].colSpan=a-t.cells.length+1}}))}},{key:"scrollIntoView",value:function(){if(this.selectedid){var t=this.querySelector('[data-id="'.concat(this.selectedid,'"]'));null==t||t.scrollIntoView({behavior:"smooth",block:"center"})}}},{key:"render",value:function(){var t=this.expandTable||this.hasAttribute("expand-table")?"height: auto":"max-height:".concat(this.height);return Object(c.c)(f||(f=_(['\n
    protvista-coloured-sequence\n

    Published on NPM

    \n

    Use this component to paint a track that uses the sequence to paint a color depending on each residue.

    \n

    Useful to display hydrophobicity, isoelectric points, or any feature were a color can represent a residue.

    \n

    Usage

    \n
    <protvista-coloured-sequence length="770" scale="hydrophobicity-scale" />
    \n

    API Reference

    \n

    Properties

    \n

    data: string

    \n

    The sequence to use for the track.

    \n

    scale: string

    \n

    The scale attribute is the mapping between a residue and a numeric value.

    \n

    The value of this parameter could be either one of the predifined scales, or a custom scale indicating the values.

    \n

    The list of predefined scales:

    \n
      \n
    • hydrophobicity-scale
    • \n
    • hydrophobicity-interface-scale
    • \n
    • hydrophobicity-octanol-scale
    • \n
    • isoelectric-point-scale
    • \n
    \n

    The format for the custom scale is a comma separated list of pairs. Where each pair is a [KEY]:[VALUE].\nFor example:

    \n

    A:0.5,M:-3,P:3

    \n

    If a residue in the sequence is not defined in the used scale, the value used will be 0.

    \n

    color_range: string

    \n

    The color range attribute allow to define the colors to use when painting the values.

    \n

    The component will use this range to create a scale that can be interpolated.

    \n

    The default color_range is #ffdd00:-2,#0000FF:2 indicating that a value of -2 should be painted Yellow (#ffdd00) and\na value of 2 should be blue (#0000FF). And values in between will be interpolated.

    \n

    The format requires at least 2 points, and if more than 2 are given, the interpolation would be calculated in between segments.\nFor example, #ffdd00:-2,white:0,#0000FF:2 where white is now representing the value0.

    \n

    Notice that HTML color names are also supported, as in the example above.

    \n

    start: number (optional)

    \n

    The start position of the selected region.

    \n

    end: number (optional)

    \n

    The end position of the selected region.

    \n

    highlight: string (optional)

    \n

    A comma separated list of regions to highlight.

    \n

    Each region follows the format: [start]:[end], where both [start] and [end] are optional numbers.

    \n

    Events

    \n

    Listens to

    \n

    --

    \n

    Emits

    \n

    change event with highlight start and end in the payload

    \n'},161:function(e,t,n){"use strict";n.r(t);var o=n(0),r=n.n(o),a=n(861),i=n(111),c=n(1014),s=n.n(c),l=n(35);function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var n=0;n=0)switch(this._scale){case"hydrophobicity-scale":return s;case"hydrophobicity-interface-scale":return i;case"isoelectric-point-scale":return l;case"hydrophobicity-octanol-scale":return c;default:return null}if(/([ILFVMPWHTEQCYASNDRGK]:-?\d+\.?\d*)(,[ILFVMPWHTEQCYASNDRGK]:-?\d+\.?\d*)*/.test(this._scale))try{e=Object(a.d)(this._scale,{keyFormatter:function(e){return e.toUpperCase()},valueFormatter:function(e){return parseFloat(e)}})}catch(e){console.error("Couldn't parse the given scale ".concat(this._scale),e)}return e}},{key:"refresh",value:function(){var e=this;if(this.seq_g){var t=this.getScaleFromAttribute();if(null===t)return void console.error("The attribute scale is not valid.");var n=Object(o.scaleLinear)();this.colorScale=m,this._color_range&&(this.colorScale=Object(a.a)(this._color_range)),n.domain(this.colorScale.domain).range(this.colorScale.range);var r=this.getSingleBaseWidth(),i=Math.round(Math.max(0,this._displaystart-2)),c=Math.round(Math.min(this.sequence.length,this._displayend+1)),s=this.sequence.slice(i,c).split("").map((function(e,o){var r=e.toUpperCase()in t?t[e.toUpperCase()]:0;return{start:1+i+o,end:1+i+o,aa:e,value:r,colour:n(r)}}));this.residues=this.seq_g.selectAll("rect.base_bg").data(r<8?[]:s,(function(e){return e.start})),this.residues.enter().append("rect").attr("class","base_bg feature").attr("data-base",(function(e){return e.aa})).attr("data-pos",(function(e){return e.start})).attr("height",this._height).merge(this.residues).attr("width",r).attr("fill",(function(e){return e.colour})).attr("x",(function(t){var n=t.start;return e.getXFromSeqPosition(n)})).call(this.bindEvents,this),this.residues.exit().remove();var l=this.gradient.selectAll("stop").data(this.sequence.split(""));l.enter().append("stop").merge(l).attr("offset",(function(t,n){return(n+.5)/e.sequence.length})).attr("stop-color",(function(e){return n(e.toUpperCase()in t?t[e.toUpperCase()]:0)})),this.gradient.exit().remove(),this.seq_greadient.attr("x",this.getXFromSeqPosition(1)).attr("y",0).attr("height",this._height).attr("width",this.getXFromSeqPosition(this.sequence.length)-this.getXFromSeqPosition(0)).style("opacity",r<8?1:8/r).attr("fill","url(#scale-gradient-".concat(this.uniqueID,")")),this._updateHighlight()}}}])&&d(t.prototype,n),u&&d(t,u),g}(r.a);t.a=v},862:function(e){e.exports=JSON.parse('{"I":-0.31,"L":-0.56,"F":-1.13,"V":0.07,"M":-0.23,"P":0.45,"W":-1.85,"H":0.17,"T":0.14,"E":-0.01,"Q":0.58,"C":-0.24,"Y":-0.94,"A":0.17,"S":0.13,"N":0.42,"D":-0.07,"R":0.81,"G":0.01,"K":0.99}')},863:function(e){e.exports=JSON.parse('{"I":-1.12,"L":-1.25,"F":-1.71,"V":-0.46,"M":-0.67,"P":0.14,"W":-2.09,"H":0.11,"T":0.25,"E":0.11,"Q":0.77,"C":-0.02,"Y":-0.71,"A":0.5,"S":0.46,"N":0.85,"D":0.43,"R":1.15,"G":3.63,"K":3.64}')},864:function(e){e.exports=JSON.parse('{"I":-0.81,"L":-0.69,"F":-0.58,"V":-0.53,"M":-0.44,"P":-0.31,"W":-0.24,"H":-0.06,"T":0.11,"E":1.61,"Q":0.19,"C":0.22,"Y":0.23,"A":0.33,"S":0.33,"N":0.43,"D":2.41,"R":1,"G":1.14,"K":1.81}')},865:function(e){e.exports=JSON.parse('{"I":6.04,"L":6.04,"F":5.91,"V":6.02,"M":5.74,"P":6.3,"W":5.88,"H":7.64,"T":5.6,"E":3.08,"Q":5.65,"C":5.02,"Y":5.63,"A":6.11,"S":5.68,"N":5.41,"D":2.87,"R":10.76,"G":6.06,"K":9.47}')}}]); \ No newline at end of file diff --git a/v3/19.js b/v3/19.js new file mode 100644 index 000000000..9b84c4ce1 --- /dev/null +++ b/v3/19.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[19],{1049:function(t,e){t.exports='

    protvista-navigation

    \n

    Published on NPM

    \n

    This custom element can be used to zoom and navigate along the sequence displayed in ProtVista. When a user interacts with the component, a change event is triggered which uses to change displaystart and displayend values on relevant custom elements.

    \n

    Demo

    \n

    Usage

    \n
    <protvista-navigation\n  length="456"\n  displaystart="143"\n  displayend="400"\n  highlightStart="23"\n  highlightEnd="45"\n  rulerstart="50"\n/>
    \n

    API Reference

    \n

    length: number

    \n

    The protein or nucleic acid sequence length.

    \n

    displaystart: number (optional)

    \n

    The start position of the selected region.

    \n

    displayend: number (optional)

    \n

    The end position of the selected region.

    \n

    highlightStart: number (optional)

    \n

    The start position of the highlighted region.

    \n

    highlightEnd: number (optional)

    \n

    The end position of the highlighted region.

    \n

    rulerstart: number (optional)

    \n

    The starting coordinate of the ruler.

    \n

    also see protvista-zoomable

    \n'},164:function(t,e,n){"use strict";n.r(e);var i=n(0),r=n.n(i),o=n(700),a=n(111),s=n(35),l=n(1049),h=n.n(l);e.default=function(t){return Object(a.a)("protvista-navigation",o.a),r.a.createElement(i.Fragment,null,r.a.createElement(s.default,{content:h.a}),r.a.createElement("protvista-navigation",{length:"456",displaystart:"143",displayend:"400",highlightStart:"23",highlightEnd:"45",rulerstart:"50"}))}},593:function(t,e,n){"use strict";function i(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=t&&("undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"]);if(null==n)return;var i,r,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(i=n.next()).done)&&(o.push(i.value),!e||o.length!==e);a=!0);}catch(t){s=!0,r=t}finally{try{a||null==n.return||n.return()}finally{if(s)throw r}}return o}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n0&&void 0!==arguments[0]?arguments[0]:{},n=e.min,i=void 0===n?-1/0:n,r=e.max,a=void 0===r?1/0:r;o(this,t),this.segments=[],this.max=a,this.min=i,this.regionString=null}var e,n,r;return e=t,(n=[{key:"encode",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.segments.map((function(n){var i=n.start,r=n.end,o=n.color;if(e)return"".concat(i,":").concat(r).concat(o?":".concat(o):"");var a=i===t.min?"":i,s=r===t.max?"":r;return"".concat(a,":").concat(s).concat(o?":".concat(o):"")})).join(",")}},{key:"decode",value:function(t){var e=this;void 0!==t&&(this.regionString=t),this.regionString?this.segments=this.regionString.split(",").map((function(t){var n=i(t.split(":"),4),r=n[0],o=n[1],a=n[2];if(void 0!==n[3])throw new Error("there should be at most 2 ':' per region. Region: ".concat(t));var s=r?Number(r):e.min,l=o?Number(o):e.max,h=""!==a?a:void 0;if(s>l){var c=[l,s];s=c[0],l=c[1]}if(se.max&&(l=e.max),Number.isNaN(s))throw new Error("The parsed value of ".concat(r," is NaN. Region: ").concat(t));if(Number.isNaN(l))throw new Error("The parsed value of ".concat(o," is NaN. Region: ").concat(t));if(h&&!h.match(/^#[0-9a-f]{6,8}$/i))throw new Error("The parsed value of ".concat(a," is not a color in hex format. Region: ").concat(t));return{start:s,end:l,color:h}})):this.segments=[]}}])&&a(e.prototype,n),r&&a(e,r),t}();function l(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:400;p(this,t),this.element=e,this.timeStampWheelOutside=0,this.resetScrollableTimeout=null,this.scrollDelay=n}var e,n,i;return e=t,(n=[{key:"setElementScrollable",value:function(t){this.element.setAttribute("scrollable",t)}},{key:"startResetScrollableTimer",value:function(){var t=this;this.resetScrollableTimeout&&clearTimeout(this.resetScrollableTimeout),this.resetScrollableTimeout=setTimeout((function(){t.setElementScrollable(!0),t.resetScrollableTimeout=null}),this.scrollDelay)}},{key:"blockScroll",value:function(t){this.timeStampWheelOutside=t,this.setElementScrollable(!1),this.startResetScrollableTimer()}},{key:"wheel",value:function(t){var e=t.target,n=t.timeStamp;this.element.contains(e)?n=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function y(t){return function(t){if(Array.isArray(t))return _(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||v(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(t,e){if(t){if("string"==typeof t)return _(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_(t,e):void 0}}function _(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n0&&void 0!==arguments[0]?arguments[0]:null,e=[],n=[];if(null!==t&&"string"!=typeof t)throw new Error("The attribute text has to be of type string");if(t&&""!==t.trim()){var i=t.split(",").map((function(t){return t.split(":")}));if(i.length<2)throw new Error("There should be at least 2 points to create a scale");e=i.map((function(t){var e=t[0].trim().toUpperCase();if(!u(e))throw new Error("The color '".concat(e," is not valid'"));return e})),n=i.map((function(t,e){var n=parseFloat(t[1]);if(Number.isNaN(n))throw new Error("The second part of every point should be a number. Error in point ".concat(e,": ").concat(t));return n}))}return{range:e,domain:n}},q=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.keyFormatter,i=void 0===n?f:n,r=e.valueFormatter,o=void 0===r?f:r;if(null!==t&&"string"!=typeof t)throw new Error("The attribute text has to be of type string");if(t&&""!==t.trim()){var a=t.split(",").map((function(t){return t.split(":")})),s={};return a.forEach((function(t){if(2!==t.length)throw new Error("Bad block: ".concat(t.join(":"),"\n The blocks of the string should follow the format KEY:VALUE"));s[i(t[0])]=o(t[1])})),s}return{}},z=g,L=function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{initialValue:{top:0,bottom:0,left:0,right:0}},i=function(t){O(i,t);var e=j(i);function i(){var t;return w(this,i),(t=e.call(this)).margin=n.initialValue,t}return S(i,[{key:"attributeChangedCallback",value:function(t,e,n){e!==n&&N.includes(t)&&(this[t]=n),E(R(i.prototype),"attributeChangedCallback",this).call(this,t,e,n)}}],[{key:"observedAttributes",get:function(){return[].concat(y(E(R(i),"observedAttributes",this)),y(N))}}]),i}(t),r=b(T);try{var o=function(){var t=e.value;Object.defineProperty(i.prototype,"margin".concat(t),{get:function(){return this.margin[t]||0},set:function(e){this.margin[t]=+e}})};for(r.s();!(e=r.n()).done;)o()}catch(t){r.e(t)}finally{r.f()}return i}},700:function(t,e,n){"use strict";var i=n(585),r=n(593);function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,e){for(var n=0;n0&&(this._padding=10)}},{key:"connectedCallback",value:function(){this._refreshWidth(),this.closest("protvista-manager")&&(this.manager=this.closest("protvista-manager"),this.manager.register(this)),this._length=parseFloat(this.getAttribute("length")),this._displaystart=parseFloat(this.getAttribute("displaystart"))||1,this._displayend=parseFloat(this.getAttribute("displayend"))||this._length,this._highlightStart=parseFloat(this.getAttribute("highlightStart")),this._highlightEnd=parseFloat(this.getAttribute("highlightEnd")),this._rulerstart=parseFloat(this.getAttribute("rulerStart"))||1,this._onResize=this._onResize.bind(this),this._createNavRuler()}},{key:"disconnectedCallback",value:function(){this.manager&&this.manager.unregister(this),this._ro&&this._ro.unobserve(this),window.removeEventListener("resize",this._onResize)}},{key:"attributeChangedCallback",value:function(t,e,n){e!==n&&(this["_".concat(t)]=parseFloat(n),this._updateNavRuler())}},{key:"width",get:function(){return this._width},set:function(t){this._width=t}},{key:"_createNavRuler",value:function(){var t=this;this._x=Object(i.scaleLinear)().range([this._padding,this.width-this._padding]),this._x.domain([this._rulerstart,this._rulerstart+this._length-1]),Object(i.select)(this).selectAll("div").remove(),this._container=Object(i.select)(this).append("div").attr("class","container"),this._svg=this._container.append("svg").attr("id","").attr("width",this.width).attr("height",this.height),this._xAxis=Object(i.axisBottom)(this._x),this._displaystartLabel=this._svg.append("text").attr("class","start-label").attr("x",0).attr("y",this.height-this._padding),this._displayendLabel=this._svg.append("text").attr("class","end-label").attr("x",this.width).attr("y",this.height-this._padding).attr("text-anchor","end"),this._axis=this._svg.append("g").attr("class","x axis").call(this._xAxis),this._viewport=Object(i.brushX)().extent([[this._padding,0],[this.width-this._padding,.51*this.height]]).on("brush",(function(){i.event.selection&&(t._displaystart=Object(i.format)("d")(t._x.invert(i.event.selection[0])),t._displayend=Object(i.format)("d")(t._x.invert(i.event.selection[1])),t.dontDispatch||t.dispatchEvent(new CustomEvent("change",{detail:{displayend:t._displayend,displaystart:t._displaystart,extra:{transform:i.event.transform}},bubbles:!0,cancelable:!0})),t._updateLabels(),t._updatePolygon())})),this._brushG=this._svg.append("g").attr("class","brush").call(this._viewport),this._brushG.call(this._viewport.move,[this._x(this._displaystart),this._x(this._displayend)]),this.polygon=this._svg.append("polygon").attr("class","zoom-polygon").attr("fill","#777").attr("fill-opacity","0.3"),this._updateNavRuler(),"ResizeObserver"in window&&(this._ro=new ResizeObserver(this._onResize),this._ro.observe(this)),window.addEventListener("resize",this._onResize)}},{key:"_onResize",value:function(){this._refreshWidth(),this._x=this._x.range([this._padding,this.width-this._padding]),this._svg.attr("width",this.width),this._viewport.extent([[this._padding,0],[this.width-this._padding,.51*this.height]]),this._brushG.call(this._viewport),this._updateNavRuler()}},{key:"_updateNavRuler",value:function(){this._x&&(this._container.style("padding-left","".concat(this.margin.left,"px")).style("padding-right","".concat(this.margin.right,"px")).style("padding-top","".concat(this.margin.top,"px")).style("padding-bottom","".concat(this.margin.bottom,"px")),this._x.domain([this._rulerstart,this._rulerstart+this._length-1]),this._axis.call(this._xAxis),this._updatePolygon(),this._updateLabels(),this._brushG&&(this.dontDispatch=!0,this._brushG.call(this._viewport.move,[this._x(this._displaystart),this._x(this._displayend)]),this.dontDispatch=!1))}},{key:"_updateLabels",value:function(){this._displaystartLabel&&this._displaystartLabel.text(this._displaystart),this._displayendLabel&&this._displayendLabel.attr("x",this.width).text(this._displayend)}},{key:"_updatePolygon",value:function(){this.polygon&&this.polygon.attr("points","".concat(this._x(this._displaystart),",").concat(this.height/2,"\n ").concat(this._x(this._displayend),",").concat(this.height/2,"\n ").concat(this.width,",").concat(this.height,"\n 0,").concat(this.height))}}])&&a(r.prototype,o),l&&a(r,l),p}(l(HTMLElement));e.a=Object(r.f)(p)}}]); \ No newline at end of file diff --git a/v3/2.js b/v3/2.js new file mode 100644 index 000000000..24173dba3 --- /dev/null +++ b/v3/2.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[2],{665:function(t,e,n){"use strict";(function(t){var n=function(){if("undefined"!=typeof Map)return Map;function t(t,e){var n=-1;return t.some((function(t,r){return t[0]===e&&(n=r,!0)})),n}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(e){var n=t(this.__entries__,e),r=this.__entries__[n];return r&&r[1]},e.prototype.set=function(e,n){var r=t(this.__entries__,e);~r?this.__entries__[r][1]=n:this.__entries__.push([e,n])},e.prototype.delete=function(e){var n=this.__entries__,r=t(n,e);~r&&n.splice(r,1)},e.prototype.has=function(e){return!!~t(this.__entries__,e)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(t,e){void 0===e&&(e=null);for(var n=0,r=this.__entries__;n0},t.prototype.connect_=function(){r&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),c?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){r&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(t){var e=t.propertyName,n=void 0===e?"":e;s.some((function(t){return!!~n.indexOf(t)}))&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),h=function(t,e){for(var n=0,r=Object.keys(e);n0},t}(),g="undefined"!=typeof WeakMap?new WeakMap:new n,E=function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=a.getInstance(),r=new w(e,n,this);g.set(this,r)};["observe","unobserve","disconnect"].forEach((function(t){E.prototype[t]=function(){var e;return(e=g.get(this))[t].apply(e,arguments)}}));var O=void 0!==i.ResizeObserver?i.ResizeObserver:E;e.a=O}).call(this,n(112))}}]); \ No newline at end of file diff --git a/v3/20.js b/v3/20.js new file mode 100644 index 000000000..263f9af4c --- /dev/null +++ b/v3/20.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[20],{1007:function(e){e.exports=JSON.parse('{"value":[[1,1,0.0010538101196289062],[1,2,0.92578125],[1,3,0.67041015625],[1,4,0.1741943359375],[1,5,0.039703369140625],[1,6,0.1099853515625],[1,7,0.005870819091796875],[1,8,0.021636962890625],[1,9,0.0027751922607421875],[1,10,0.00577545166015625],[1,11,0.005054473876953125],[1,12,0.008148193359375],[1,13,0.0093231201171875],[1,14,0.00872039794921875],[1,15,0.0144500732421875],[1,16,0.00681304931640625],[1,17,0.07928466796875],[1,18,0.019378662109375],[1,19,0.0535888671875],[1,20,0.017547607421875],[1,21,0.0101165771484375],[1,22,0.020751953125],[1,23,0.01551055908203125],[1,24,0.0145721435546875],[1,25,0.024383544921875],[1,26,0.01561737060546875],[1,27,0.00972747802734375],[1,28,0.011505126953125],[1,29,0.0176239013671875],[1,30,0.006679534912109375],[1,31,0.005718231201171875],[1,32,0.01009368896484375],[1,33,0.00832366943359375],[1,34,0.00411224365234375],[1,35,0.003742218017578125],[1,36,0.004779815673828125],[1,37,0.0032901763916015625],[1,38,0.0037784576416015625],[1,39,0.0026874542236328125],[1,40,0.003814697265625],[1,43,0.0034732818603515625],[1,44,0.0027103424072265625],[1,45,0.0032520294189453125],[1,46,0.00305938720703125],[1,47,0.002758026123046875],[1,48,0.00360870361328125],[1,49,0.0040130615234375],[1,50,0.005504608154296875],[1,51,0.00391387939453125],[1,52,0.0036754608154296875],[1,53,0.0031909942626953125],[1,54,0.004123687744140625],[1,55,0.0047760009765625],[1,56,0.0032138824462890625],[1,57,0.00384521484375],[1,58,0.0033168792724609375],[1,59,0.0030117034912109375],[1,60,0.0027141571044921875],[1,61,0.002933502197265625],[1,62,0.00301361083984375],[1,63,0.0028553009033203125],[1,64,0.0024051666259765625],[1,65,0.002094268798828125],[1,66,0.0022125244140625],[1,67,0.0018644332885742188],[1,68,0.001987457275390625],[1,69,0.0020351409912109375],[1,70,0.0019073486328125],[1,71,0.0024242401123046875],[1,72,0.0016765594482421875],[1,73,0.0024051666259765625],[1,74,0.001873016357421875],[1,75,0.0018625259399414062],[1,76,0.0018415451049804688],[1,77,0.0015392303466796875],[1,78,0.00142669677734375],[1,79,0.0017757415771484375],[1,80,0.0015201568603515625],[1,81,0.0014362335205078125],[1,82,0.001678466796875],[1,83,0.001712799072265625],[1,84,0.0025272369384765625],[1,85,0.0025196075439453125],[1,86,0.0019159317016601562],[1,87,0.0021114349365234375],[1,88,0.0015916824340820312],[1,89,0.001728057861328125],[1,90,0.0013914108276367188],[1,91,0.0016384124755859375],[1,92,0.0014123916625976562],[1,93,0.00197601318359375],[1,94,0.0021457672119140625],[1,95,0.001712799072265625],[1,96,0.0016889572143554688],[1,97,0.0014524459838867188],[1,98,0.00142669677734375],[1,99,0.0012617111206054688],[1,100,0.001590728759765625],[1,101,0.0017833709716796875],[1,102,0.0021610260009765625],[1,103,0.0021953582763671875],[1,104,0.00197601318359375],[1,105,0.0018796920776367188],[1,106,0.0020389556884765625],[1,107,0.002140045166015625],[1,108,0.0019588470458984375],[1,109,0.0023326873779296875],[1,110,0.0022602081298828125],[1,111,0.00238800048828125],[1,112,0.0021953582763671875],[1,113,0.002117156982421875],[1,114,0.0018434524536132812],[1,115,0.0021495819091796875],[1,116,0.0020656585693359375],[1,117,0.0027980804443359375],[1,118,0.0028972625732421875],[1,119,0.0029544830322265625],[1,120,0.0030975341796875],[1,121,0.0029582977294921875],[1,122,0.00257110595703125],[1,123,0.0026416778564453125],[1,124,0.0027484893798828125],[1,125,0.0033550262451171875],[1,126,0.0038604736328125],[1,127,0.0041046142578125],[1,128,0.004756927490234375],[1,129,0.00408935546875],[1,130,0.00397491455078125],[1,131,0.004169464111328125],[1,132,0.002960205078125],[1,133,0.0034427642822265625],[1,134,0.00274658203125],[1,135,0.0028209686279296875],[1,136,0.0024871826171875],[1,137,0.0028591156005859375],[1,138,0.0028591156005859375],[1,139,0.0036334991455078125],[1,140,0.0038928985595703125],[1,141,0.004119873046875],[1,142,0.0043182373046875],[1,143,0.004482269287109375],[1,144,0.004756927490234375],[1,145,0.0044403076171875],[1,146,0.003787994384765625],[1,147,0.0029850006103515625],[1,148,0.002735137939453125],[1,149,0.003185272216796875],[1,150,0.003543853759765625],[1,151,0.004055023193359375],[1,152,0.0044097900390625],[1,153,0.00696563720703125],[2,2,0.00588226318359375],[2,3,0.97216796875],[2,4,0.60302734375],[2,5,0.0770263671875],[2,6,0.201904296875],[2,7,0.01042938232421875],[2,8,0.022735595703125],[2,9,0.0019779205322265625],[2,10,0.0023822784423828125],[2,11,0.00251007080078125],[2,12,0.0079193115234375],[2,13,0.00795745849609375],[2,14,0.006313323974609375],[2,15,0.008392333984375],[2,16,0.004360198974609375],[2,17,0.097900390625],[2,18,0.02886962890625],[2,19,0.1207275390625],[2,20,0.044342041015625],[2,21,0.01552581787109375],[2,22,0.0193328857421875],[2,23,0.0110321044921875],[2,24,0.006542205810546875],[2,25,0.0108795166015625],[2,26,0.00833892822265625],[2,27,0.00487518310546875],[2,28,0.00732421875],[2,29,0.00838470458984375],[2,30,0.0036754608154296875],[2,31,0.0035114288330078125],[2,32,0.006053924560546875],[2,33,0.0053558349609375],[2,34,0.0031604766845703125],[2,35,0.0032863616943359375],[2,36,0.0038356781005859375],[2,37,0.0031299591064453125],[2,38,0.003131866455078125],[2,39,0.0025177001953125],[2,40,0.0031642913818359375],[2,43,0.0026111602783203125],[2,44,0.0024433135986328125],[2,45,0.0026950836181640625],[2,46,0.002567291259765625],[2,47,0.0022525787353515625],[2,48,0.003139495849609375],[2,49,0.003017425537109375],[2,50,0.005229949951171875],[2,51,0.0029544830322265625],[2,52,0.00319671630859375],[2,53,0.0027256011962890625],[2,54,0.003490447998046875],[2,55,0.003856658935546875],[2,56,0.0025882720947265625],[2,57,0.0030879974365234375],[2,58,0.002651214599609375],[2,59,0.00251007080078125],[2,60,0.002292633056640625],[2,61,0.00252532958984375],[2,62,0.0026569366455078125],[2,63,0.00257110595703125],[2,64,0.0022258758544921875],[2,65,0.0016193389892578125],[2,66,0.0018529891967773438],[2,67,0.00165557861328125],[2,68,0.00167083740234375],[2,69,0.0017528533935546875],[2,70,0.001552581787109375],[2,71,0.001979827880859375],[2,72,0.0013599395751953125],[2,73,0.0019702911376953125],[2,74,0.0016536712646484375],[2,75,0.0015850067138671875],[2,76,0.001483917236328125],[2,77,0.001285552978515625],[2,78,0.001194000244140625],[2,79,0.0014781951904296875],[2,80,0.0012874603271484375],[2,81,0.0010662078857421875],[2,82,0.001247406005859375],[2,83,0.0013036727905273438],[2,84,0.0019283294677734375],[2,85,0.0018243789672851562],[2,86,0.0013647079467773438],[2,87,0.0014371871948242188],[2,88,0.001262664794921875],[2,89,0.0013360977172851562],[2,90,0.0010824203491210938],[2,91,0.0013742446899414062],[2,92,0.0011816024780273438],[2,93,0.0017299652099609375],[2,94,0.0018205642700195312],[2,95,0.0013256072998046875],[2,96,0.0014333724975585938],[2,97,0.0011072158813476562],[2,98,0.0011243820190429688],[2,99,0.0009355545043945312],[2,100,0.0011386871337890625],[2,101,0.0012598037719726562],[2,102,0.001495361328125],[2,103,0.0014934539794921875],[2,104,0.0012731552124023438],[2,105,0.0012111663818359375],[2,106,0.0012445449829101562],[2,107,0.0012884140014648438],[2,108,0.00119781494140625],[2,109,0.0015201568603515625],[2,110,0.0016489028930664062],[2,111,0.001819610595703125],[2,112,0.0016412734985351562],[2,113,0.001491546630859375],[2,114,0.001293182373046875],[2,115,0.00144195556640625],[2,116,0.0013742446899414062],[2,117,0.0018310546875],[2,118,0.002155303955078125],[2,119,0.0020198822021484375],[2,120,0.002025604248046875],[2,121,0.0019292831420898438],[2,122,0.0015277862548828125],[2,123,0.0016698837280273438],[2,124,0.0015926361083984375],[2,125,0.002109527587890625],[2,126,0.0024166107177734375],[2,127,0.002811431884765625],[2,128,0.0032501220703125],[2,129,0.00302886962890625],[2,130,0.0027923583984375],[2,131,0.00273895263671875],[2,132,0.00186920166015625],[2,133,0.0022907257080078125],[2,134,0.0018472671508789062],[2,135,0.0021209716796875],[2,136,0.0017595291137695312],[2,137,0.0022029876708984375],[2,138,0.0019025802612304688],[2,139,0.00275421142578125],[2,140,0.002899169921875],[2,141,0.00316619873046875],[2,142,0.0031642913818359375],[2,143,0.003223419189453125],[2,144,0.0033740997314453125],[2,145,0.00341796875],[2,146,0.0025005340576171875],[2,147,0.001956939697265625],[2,148,0.0017642974853515625],[2,149,0.0019512176513671875],[2,150,0.0022754669189453125],[2,151,0.0028743743896484375],[2,152,0.0028228759765625],[2,153,0.00521087646484375],[3,3,0.0002789497375488281],[3,4,0.97607421875],[3,5,0.62451171875],[3,6,0.80908203125],[3,7,0.020050048828125],[3,8,0.064697265625],[3,9,0.000591278076171875],[3,10,0.0006899833679199219],[3,11,0.001312255859375],[3,12,0.005157470703125],[3,13,0.006351470947265625],[3,14,0.004581451416015625],[3,15,0.003658294677734375],[3,16,0.0021457672119140625],[3,17,0.251953125],[3,18,0.045654296875],[3,19,0.27783203125],[3,20,0.076416015625],[3,21,0.0170135498046875],[3,22,0.01523590087890625],[3,23,0.00762176513671875],[3,24,0.0015249252319335938],[3,25,0.0013589859008789062],[3,26,0.00262451171875],[3,27,0.0033321380615234375],[3,28,0.0038318634033203125],[3,29,0.00481414794921875],[3,30,0.002567291259765625],[3,31,0.002719879150390625],[3,32,0.004764556884765625],[3,33,0.004695892333984375],[3,34,0.0028934478759765625],[3,35,0.002994537353515625],[3,36,0.00406646728515625],[3,37,0.0033206939697265625],[3,38,0.003406524658203125],[3,39,0.002593994140625],[3,40,0.003215789794921875],[3,43,0.0026378631591796875],[3,44,0.0029354095458984375],[3,45,0.003398895263671875],[3,46,0.0030364990234375],[3,47,0.002826690673828125],[3,48,0.003932952880859375],[3,49,0.0034198760986328125],[3,50,0.00530242919921875],[3,51,0.003543853759765625],[3,52,0.00370025634765625],[3,53,0.00318145751953125],[3,54,0.0034389495849609375],[3,55,0.004119873046875],[3,56,0.0023365020751953125],[3,57,0.003215789794921875],[3,58,0.002536773681640625],[3,59,0.0026264190673828125],[3,60,0.00247955322265625],[3,61,0.002803802490234375],[3,62,0.0028400421142578125],[3,63,0.0028209686279296875],[3,64,0.0022830963134765625],[3,65,0.0016002655029296875],[3,66,0.00183868408203125],[3,67,0.0015687942504882812],[3,68,0.001720428466796875],[3,69,0.0018482208251953125],[3,70,0.0014905929565429688],[3,71,0.002025604248046875],[3,72,0.0013380050659179688],[3,73,0.0021266937255859375],[3,74,0.0016260147094726562],[3,75,0.0015087127685546875],[3,76,0.0013666152954101562],[3,77,0.0011653900146484375],[3,78,0.0010128021240234375],[3,79,0.0013322830200195312],[3,80,0.001129150390625],[3,81,0.0008568763732910156],[3,82,0.000988006591796875],[3,83,0.0009832382202148438],[3,84,0.0015735626220703125],[3,85,0.0014486312866210938],[3,86,0.0010175704956054688],[3,87,0.0010843276977539062],[3,88,0.0010118484497070312],[3,89,0.0010194778442382812],[3,90,0.0008502006530761719],[3,91,0.0010786056518554688],[3,92,0.0009241104125976562],[3,93,0.0013952255249023438],[3,94,0.0016422271728515625],[3,95,0.0010862350463867188],[3,96,0.0012617111206054688],[3,97,0.0008997917175292969],[3,98,0.0009655952453613281],[3,99,0.0006952285766601562],[3,100,0.000919342041015625],[3,101,0.0009713172912597656],[3,102,0.0012073516845703125],[3,103,0.001224517822265625],[3,104,0.00096893310546875],[3,105,0.0009121894836425781],[3,106,0.0008893013000488281],[3,107,0.0009450912475585938],[3,108,0.0008692741394042969],[3,109,0.0011920928955078125],[3,110,0.0014190673828125],[3,111,0.0015668869018554688],[3,112,0.00135040283203125],[3,113,0.0012331008911132812],[3,114,0.001010894775390625],[3,115,0.0011243820190429688],[3,116,0.0009965896606445312],[3,117,0.0014238357543945312],[3,118,0.0017404556274414062],[3,119,0.0016050338745117188],[3,120,0.0015439987182617188],[3,121,0.001476287841796875],[3,122,0.0010995864868164062],[3,123,0.001354217529296875],[3,124,0.0012302398681640625],[3,125,0.0017852783203125],[3,126,0.0020847320556640625],[3,127,0.002532958984375],[3,128,0.003124237060546875],[3,129,0.0029964447021484375],[3,130,0.0027561187744140625],[3,131,0.00270843505859375],[3,132,0.0016870498657226562],[3,133,0.0023326873779296875],[3,134,0.001827239990234375],[3,135,0.002140045166015625],[3,136,0.0019102096557617188],[3,137,0.0021343231201171875],[3,138,0.00188446044921875],[3,139,0.0026798248291015625],[3,140,0.003170013427734375],[3,141,0.0035190582275390625],[3,142,0.0033512115478515625],[3,143,0.0032367706298828125],[3,144,0.0034542083740234375],[3,145,0.0036144256591796875],[3,146,0.002544403076171875],[3,147,0.00189208984375],[3,148,0.0015544891357421875],[3,149,0.0016851425170898438],[3,150,0.0019235610961914062],[3,151,0.002391815185546875],[3,152,0.0024547576904296875],[3,153,0.0038738250732421875],[4,4,0.0016460418701171875],[4,5,0.9736328125],[4,6,0.85205078125],[4,7,0.0254974365234375],[4,8,0.00806427001953125],[4,9,0.0007658004760742188],[4,10,0.0011262893676757812],[4,11,0.0024547576904296875],[4,12,0.007843017578125],[4,13,0.0096893310546875],[4,14,0.01175689697265625],[4,15,0.004276275634765625],[4,16,0.0015163421630859375],[4,17,0.04083251953125],[4,18,0.0267181396484375],[4,19,0.284423828125],[4,20,0.251953125],[4,21,0.05145263671875],[4,22,0.0299072265625],[4,23,0.01142120361328125],[4,24,0.0020275115966796875],[4,25,0.0016918182373046875],[4,26,0.004329681396484375],[4,27,0.0027980804443359375],[4,28,0.003925323486328125],[4,29,0.005153656005859375],[4,30,0.00421142578125],[4,31,0.004184722900390625],[4,32,0.005222320556640625],[4,33,0.005237579345703125],[4,34,0.00432586669921875],[4,35,0.00391387939453125],[4,36,0.004932403564453125],[4,37,0.0035533905029296875],[4,38,0.003749847412109375],[4,39,0.002948760986328125],[4,40,0.0029735565185546875],[4,43,0.0027256011962890625],[4,44,0.00328826904296875],[4,45,0.0035724639892578125],[4,46,0.0035686492919921875],[4,47,0.002704620361328125],[4,48,0.003368377685546875],[4,49,0.0026988983154296875],[4,50,0.0048675537109375],[4,51,0.003143310546875],[4,52,0.0038738250732421875],[4,53,0.003185272216796875],[4,54,0.0030994415283203125],[4,55,0.0031299591064453125],[4,56,0.0019855499267578125],[4,57,0.00279998779296875],[4,58,0.00258636474609375],[4,59,0.0026607513427734375],[4,60,0.002643585205078125],[4,61,0.002918243408203125],[4,62,0.0029239654541015625],[4,63,0.00272369384765625],[4,64,0.0022335052490234375],[4,65,0.0015058517456054688],[4,66,0.001983642578125],[4,67,0.001682281494140625],[4,68,0.001857757568359375],[4,69,0.0019683837890625],[4,70,0.0014982223510742188],[4,71,0.0020236968994140625],[4,72,0.0013685226440429688],[4,73,0.002185821533203125],[4,74,0.0017261505126953125],[4,75,0.00153350830078125],[4,76,0.0013446807861328125],[4,77,0.0011472702026367188],[4,78,0.0009899139404296875],[4,79,0.0012369155883789062],[4,80,0.0010633468627929688],[4,81,0.0007715225219726562],[4,82,0.0009098052978515625],[4,83,0.0008573532104492188],[4,84,0.0013704299926757812],[4,85,0.001247406005859375],[4,86,0.0008840560913085938],[4,87,0.0009369850158691406],[4,88,0.0008668899536132812],[4,89,0.0008649826049804688],[4,90,0.0007433891296386719],[4,91,0.0009608268737792969],[4,92,0.0008392333984375],[4,93,0.0012884140014648438],[4,94,0.0015010833740234375],[4,95,0.000972747802734375],[4,96,0.0011348724365234375],[4,97,0.0008335113525390625],[4,98,0.000881195068359375],[4,99,0.0006341934204101562],[4,100,0.0007953643798828125],[4,101,0.0008220672607421875],[4,102,0.0009984970092773438],[4,103,0.0009927749633789062],[4,104,0.0008025169372558594],[4,105,0.0007691383361816406],[4,106,0.0007519721984863281],[4,107,0.0008044242858886719],[4,108,0.0007390975952148438],[4,109,0.0009908676147460938],[4,110,0.0011653900146484375],[4,111,0.0013170242309570312],[4,112,0.0011625289916992188],[4,113,0.0010547637939453125],[4,114,0.0008912086486816406],[4,115,0.0009474754333496094],[4,116,0.0008597373962402344],[4,117,0.0012464523315429688],[4,118,0.001461029052734375],[4,119,0.001331329345703125],[4,120,0.0012998580932617188],[4,121,0.0011777877807617188],[4,122,0.0008578300476074219],[4,123,0.001117706298828125],[4,124,0.0009860992431640625],[4,125,0.0013589859008789062],[4,126,0.001598358154296875],[4,127,0.0020427703857421875],[4,128,0.0024814605712890625],[4,129,0.0025386810302734375],[4,130,0.0023326873779296875],[4,131,0.0024261474609375],[4,132,0.001552581787109375],[4,133,0.002269744873046875],[4,134,0.001766204833984375],[4,135,0.0020847320556640625],[4,136,0.0019025802612304688],[4,137,0.0020580291748046875],[4,138,0.00177001953125],[4,139,0.002651214599609375],[4,140,0.003040313720703125],[4,141,0.003505706787109375],[4,142,0.0030765533447265625],[4,143,0.0028076171875],[4,144,0.00341033935546875],[4,145,0.003200531005859375],[4,146,0.0023365020751953125],[4,147,0.0016984939575195312],[4,148,0.001461029052734375],[4,149,0.00150299072265625],[4,150,0.00167083740234375],[4,151,0.0019626617431640625],[4,152,0.002025604248046875],[4,153,0.003215789794921875],[5,5,0.0012950897216796875],[5,6,0.98388671875],[5,7,0.328125],[5,8,0.01495361328125],[5,9,0.003856658935546875],[5,10,0.002040863037109375],[5,11,0.0026683807373046875],[5,12,0.01032257080078125],[5,13,0.006351470947265625],[5,14,0.0096282958984375],[5,15,0.0025806427001953125],[5,16,0.0037384033203125],[5,17,0.0181732177734375],[5,18,0.01123046875],[5,19,0.78759765625],[5,20,0.77587890625],[5,21,0.3955078125],[5,22,0.0252685546875],[5,23,0.0166015625],[5,24,0.002521514892578125],[5,25,0.0014591217041015625],[5,26,0.0033721923828125],[5,27,0.00078582763671875],[5,28,0.0004558563232421875],[5,29,0.0018978118896484375],[5,30,0.00177764892578125],[5,31,0.003337860107421875],[5,32,0.004596710205078125],[5,33,0.00479888916015625],[5,34,0.004360198974609375],[5,35,0.004009246826171875],[5,36,0.00550079345703125],[5,37,0.003841400146484375],[5,38,0.004299163818359375],[5,39,0.00287628173828125],[5,40,0.0021419525146484375],[5,43,0.0023479461669921875],[5,44,0.003269195556640625],[5,45,0.0037212371826171875],[5,46,0.00316619873046875],[5,47,0.002849578857421875],[5,48,0.00290679931640625],[5,49,0.0018434524536132812],[5,50,0.0033550262451171875],[5,51,0.002391815185546875],[5,52,0.0026493072509765625],[5,53,0.0027561187744140625],[5,54,0.0021514892578125],[5,55,0.002162933349609375],[5,56,0.0014657974243164062],[5,57,0.0024242401123046875],[5,58,0.0022525787353515625],[5,59,0.003017425537109375],[5,60,0.0027637481689453125],[5,61,0.00330352783203125],[5,62,0.003009796142578125],[5,63,0.0029735565185546875],[5,64,0.00237274169921875],[5,65,0.00171661376953125],[5,66,0.002105712890625],[5,67,0.002109527587890625],[5,68,0.002185821533203125],[5,69,0.00225830078125],[5,70,0.0018453598022460938],[5,71,0.0019044876098632812],[5,72,0.0014696121215820312],[5,73,0.00217437744140625],[5,74,0.0018281936645507812],[5,75,0.0014982223510742188],[5,76,0.0013408660888671875],[5,77,0.0010309219360351562],[5,78,0.0009174346923828125],[5,79,0.0010986328125],[5,80,0.0009102821350097656],[5,81,0.0006799697875976562],[5,82,0.000759124755859375],[5,83,0.0007543563842773438],[5,84,0.0012187957763671875],[5,85,0.001155853271484375],[5,86,0.0007815361022949219],[5,87,0.0008363723754882812],[5,88,0.0007262229919433594],[5,89,0.0007085800170898438],[5,90,0.0006208419799804688],[5,91,0.0008668899536132812],[5,92,0.000789642333984375],[5,93,0.0013065338134765625],[5,94,0.0014162063598632812],[5,95,0.0009403228759765625],[5,96,0.0009870529174804688],[5,97,0.0007295608520507812],[5,98,0.0007166862487792969],[5,99,0.0005640983581542969],[5,100,0.0006642341613769531],[5,101,0.0007052421569824219],[5,102,0.0008749961853027344],[5,103,0.0008587837219238281],[5,104,0.0006890296936035156],[5,105,0.0006875991821289062],[5,106,0.0007224082946777344],[5,107,0.000782012939453125],[5,108,0.0006837844848632812],[5,109,0.0009222030639648438],[5,110,0.001064300537109375],[5,111,0.001209259033203125],[5,112,0.0010051727294921875],[5,113,0.0009217262268066406],[5,114,0.0007619857788085938],[5,115,0.0008220672607421875],[5,116,0.0007190704345703125],[5,117,0.00115203857421875],[5,118,0.0013074874877929688],[5,119,0.0011472702026367188],[5,120,0.001132965087890625],[5,121,0.0009722709655761719],[5,122,0.0007991790771484375],[5,123,0.0009889602661132812],[5,124,0.000865936279296875],[5,125,0.001148223876953125],[5,126,0.0014896392822265625],[5,127,0.001800537109375],[5,128,0.0022907257080078125],[5,129,0.002288818359375],[5,130,0.0023193359375],[5,131,0.002399444580078125],[5,132,0.0016193389892578125],[5,133,0.0022869110107421875],[5,134,0.0020236968994140625],[5,135,0.002346038818359375],[5,136,0.0020046234130859375],[5,137,0.002231597900390625],[5,138,0.0018682479858398438],[5,139,0.002574920654296875],[5,140,0.003276824951171875],[5,141,0.0035724639892578125],[5,142,0.003292083740234375],[5,143,0.00299835205078125],[5,144,0.003505706787109375],[5,145,0.002838134765625],[5,146,0.0022983551025390625],[5,147,0.0016317367553710938],[5,148,0.0014295578002929688],[5,149,0.0013523101806640625],[5,150,0.001434326171875],[5,151,0.0015630722045898438],[5,152,0.0015897750854492188],[5,153,0.002452850341796875],[6,6,0.000010967254638671875],[6,7,0.9951171875],[6,8,0.9658203125],[6,9,0.0090484619140625],[6,10,0.004192352294921875],[6,11,0.00201416015625],[6,12,0.01044464111328125],[6,13,0.006336212158203125],[6,14,0.005229949951171875],[6,15,0.016510009765625],[6,16,0.01070404052734375],[6,17,0.7822265625],[6,18,0.7509765625],[6,19,0.84130859375],[6,20,0.7412109375],[6,21,0.0093536376953125],[6,22,0.021728515625],[6,23,0.0635986328125],[6,24,0.002635955810546875],[6,25,0.0012760162353515625],[6,26,0.00543975830078125],[6,27,0.000766754150390625],[6,28,0.00022995471954345703],[6,29,0.0018215179443359375],[6,30,0.0015058517456054688],[6,31,0.0013256072998046875],[6,32,0.0020751953125],[6,33,0.003475189208984375],[6,34,0.003330230712890625],[6,35,0.00579833984375],[6,36,0.00803375244140625],[6,37,0.005096435546875],[6,38,0.00656890869140625],[6,39,0.0035686492919921875],[6,40,0.0017547607421875],[6,43,0.0015020370483398438],[6,44,0.004314422607421875],[6,45,0.00446319580078125],[6,46,0.00310516357421875],[6,47,0.0026226043701171875],[6,48,0.003997802734375],[6,49,0.00226593017578125],[6,50,0.005237579345703125],[6,51,0.0027561187744140625],[6,52,0.003570556640625],[6,53,0.00310516357421875],[6,54,0.002712249755859375],[6,55,0.0029926300048828125],[6,56,0.001857757568359375],[6,57,0.002979278564453125],[6,58,0.0031528472900390625],[6,59,0.003917694091796875],[6,60,0.0038852691650390625],[6,61,0.004390716552734375],[6,62,0.004734039306640625],[6,63,0.003963470458984375],[6,64,0.00336456298828125],[6,65,0.0029125213623046875],[6,66,0.003910064697265625],[6,67,0.0040435791015625],[6,68,0.0036029815673828125],[6,69,0.0033702850341796875],[6,70,0.0027179718017578125],[6,71,0.002971649169921875],[6,72,0.0018510818481445312],[6,73,0.002658843994140625],[6,74,0.002208709716796875],[6,75,0.001926422119140625],[6,76,0.0017690658569335938],[6,77,0.0012960433959960938],[6,78,0.0012311935424804688],[6,79,0.0014190673828125],[6,80,0.0011491775512695312],[6,81,0.0008544921875],[6,82,0.0010051727294921875],[6,83,0.0010852813720703125],[6,84,0.0018339157104492188],[6,85,0.001667022705078125],[6,86,0.0011987686157226562],[6,87,0.0011568069458007812],[6,88,0.0010404586791992188],[6,89,0.0010862350463867188],[6,90,0.000988006591796875],[6,91,0.0013217926025390625],[6,92,0.001232147216796875],[6,93,0.00218963623046875],[6,94,0.0022335052490234375],[6,95,0.00139617919921875],[6,96,0.0014505386352539062],[6,97,0.001007080078125],[6,98,0.0010004043579101562],[6,99,0.000804901123046875],[6,100,0.00090789794921875],[6,101,0.0009527206420898438],[6,102,0.0011358261108398438],[6,103,0.0010814666748046875],[6,104,0.0008697509765625],[6,105,0.0008945465087890625],[6,106,0.0009698867797851562],[6,107,0.0010557174682617188],[6,108,0.0009112358093261719],[6,109,0.001224517822265625],[6,110,0.0013580322265625],[6,111,0.0014772415161132812],[6,112,0.0012493133544921875],[6,113,0.0011434555053710938],[6,114,0.0009603500366210938],[6,115,0.0010251998901367188],[6,116,0.0008611679077148438],[6,117,0.0014085769653320312],[6,118,0.0015230178833007812],[6,119,0.0012912750244140625],[6,120,0.0013246536254882812],[6,121,0.0011281967163085938],[6,122,0.0009245872497558594],[6,123,0.00115203857421875],[6,124,0.0009889602661132812],[6,125,0.0012264251708984375],[6,126,0.001621246337890625],[6,127,0.001964569091796875],[6,128,0.0025787353515625],[6,129,0.0026264190673828125],[6,130,0.0027332305908203125],[6,131,0.0030155181884765625],[6,132,0.0018701553344726562],[6,133,0.003314971923828125],[6,134,0.0026111602783203125],[6,135,0.003841400146484375],[6,136,0.0030345916748046875],[6,137,0.003543853759765625],[6,138,0.0026149749755859375],[6,139,0.0036468505859375],[6,140,0.00418853759765625],[6,141,0.004638671875],[6,142,0.00400543212890625],[6,143,0.0038356781005859375],[6,144,0.004322052001953125],[6,145,0.003124237060546875],[6,146,0.0023822784423828125],[6,147,0.0017976760864257812],[6,148,0.0016164779663085938],[6,149,0.001529693603515625],[6,150,0.0016918182373046875],[6,151,0.00165557861328125],[6,152,0.0014667510986328125],[6,153,0.002239227294921875],[7,7,2.980232238769531e-7],[7,8,0.99267578125],[7,9,0.92578125],[7,10,0.0156707763671875],[7,11,0.00882720947265625],[7,12,0.002262115478515625],[7,13,0.0011701583862304688],[7,14,0.004436492919921875],[7,15,0.00884246826171875],[7,16,0.1314697265625],[7,17,0.57421875],[7,18,0.87158203125],[7,19,0.7802734375],[7,20,0.81591796875],[7,21,0.05712890625],[7,22,0.5234375],[7,23,0.80029296875],[7,24,0.054901123046875],[7,25,0.0183563232421875],[7,26,0.453369140625],[7,27,0.007175445556640625],[7,28,0.0010967254638671875],[7,29,0.00870513916015625],[7,30,0.0033855438232421875],[7,31,0.0005702972412109375],[7,32,0.000499725341796875],[7,33,0.001678466796875],[7,34,0.0038166046142578125],[7,35,0.004058837890625],[7,36,0.0070953369140625],[7,37,0.005603790283203125],[7,38,0.0101470947265625],[7,39,0.002796173095703125],[7,40,0.0014829635620117188],[7,43,0.0013780593872070312],[7,44,0.004604339599609375],[7,45,0.0030803680419921875],[7,46,0.0008363723754882812],[7,47,0.00122833251953125],[7,48,0.0033321380615234375],[7,49,0.002384185791015625],[7,50,0.007709503173828125],[7,51,0.003631591796875],[7,52,0.00476837158203125],[7,53,0.003910064697265625],[7,54,0.0031528472900390625],[7,55,0.00507354736328125],[7,56,0.00235748291015625],[7,57,0.0027980804443359375],[7,58,0.00335693359375],[7,59,0.005619049072265625],[7,60,0.005252838134765625],[7,61,0.007457733154296875],[7,62,0.00675201416015625],[7,63,0.005462646484375],[7,64,0.0045318603515625],[7,65,0.004627227783203125],[7,66,0.005924224853515625],[7,67,0.005619049072265625],[7,68,0.0054779052734375],[7,69,0.00548553466796875],[7,70,0.0045166015625],[7,71,0.0044097900390625],[7,72,0.002445220947265625],[7,73,0.003704071044921875],[7,74,0.0028095245361328125],[7,75,0.002197265625],[7,76,0.0019006729125976562],[7,77,0.0014190673828125],[7,78,0.00131988525390625],[7,79,0.0015802383422851562],[7,80,0.0011997222900390625],[7,81,0.0009565353393554688],[7,82,0.0011272430419921875],[7,83,0.0012683868408203125],[7,84,0.0021572113037109375],[7,85,0.0019779205322265625],[7,86,0.0014486312866210938],[7,87,0.0013151168823242188],[7,88,0.0011796951293945312],[7,89,0.00128173828125],[7,90,0.0011844635009765625],[7,91,0.0015096664428710938],[7,92,0.0014972686767578125],[7,93,0.0028629302978515625],[7,94,0.0026798248291015625],[7,95,0.0017328262329101562],[7,96,0.001514434814453125],[7,97,0.0011110305786132812],[7,98,0.0011386871337890625],[7,99,0.0009527206420898438],[7,100,0.0010137557983398438],[7,101,0.00102996826171875],[7,102,0.0012664794921875],[7,103,0.0011587142944335938],[7,104,0.0008869171142578125],[7,105,0.0009889602661132812],[7,106,0.0011796951293945312],[7,107,0.00128936767578125],[7,108,0.0010538101196289062],[7,109,0.0013179779052734375],[7,110,0.0013952255249023438],[7,111,0.001560211181640625],[7,112,0.0012025833129882812],[7,113,0.0011758804321289062],[7,114,0.0009665489196777344],[7,115,0.0010824203491210938],[7,116,0.0008115768432617188],[7,117,0.001495361328125],[7,118,0.0014286041259765625],[7,119,0.0012254714965820312],[7,120,0.0012969970703125],[7,121,0.0010881423950195312],[7,122,0.0009717941284179688],[7,123,0.0012187957763671875],[7,124,0.0009918212890625],[7,125,0.0012159347534179688],[7,126,0.0016546249389648438],[7,127,0.0018901824951171875],[7,128,0.002513885498046875],[7,129,0.0025691986083984375],[7,130,0.003047943115234375],[7,131,0.0035247802734375],[7,132,0.002101898193359375],[7,133,0.00403594970703125],[7,134,0.0031452178955078125],[7,135,0.004985809326171875],[7,136,0.004055023193359375],[7,137,0.004772186279296875],[7,138,0.0033206939697265625],[7,139,0.00421142578125],[7,140,0.0047454833984375],[7,141,0.004913330078125],[7,142,0.004077911376953125],[7,143,0.0036163330078125],[7,144,0.0037937164306640625],[7,145,0.00344085693359375],[7,146,0.0023937225341796875],[7,147,0.0018243789672851562],[7,148,0.001773834228515625],[7,149,0.0016012191772460938],[7,150,0.0017681121826171875],[7,151,0.0016231536865234375],[7,152,0.0014371871948242188],[7,153,0.001956939697265625],[8,8,0],[8,9,0.98583984375],[8,10,0.94287109375],[8,11,0.0183258056640625],[8,12,0.0057220458984375],[8,13,0.002719879150390625],[8,14,0.010589599609375],[8,15,0.646484375],[8,16,0.70654296875],[8,17,0.82177734375],[8,18,0.52587890625],[8,19,0.030364990234375],[8,20,0.01233673095703125],[8,21,0.007266998291015625],[8,22,0.012481689453125],[8,23,0.08062744140625],[8,24,0.0049285888671875],[8,25,0.0027141571044921875],[8,26,0.038543701171875],[8,27,0.003147125244140625],[8,28,0.0005068778991699219],[8,29,0.00604248046875],[8,30,0.004695892333984375],[8,31,0.0005106925964355469],[8,32,0.0005617141723632812],[8,33,0.003894805908203125],[8,34,0.002826690673828125],[8,35,0.0035400390625],[8,36,0.006748199462890625],[8,37,0.00444793701171875],[8,38,0.005542755126953125],[8,39,0.003108978271484375],[8,40,0.003509521484375],[8,43,0.0028667449951171875],[8,44,0.0028324127197265625],[8,45,0.0025424957275390625],[8,46,0.0018320083618164062],[8,47,0.002197265625],[8,48,0.004886627197265625],[8,49,0.003376007080078125],[8,50,0.00946044921875],[8,51,0.003322601318359375],[8,52,0.0050506591796875],[8,53,0.0032520294189453125],[8,54,0.00333404541015625],[8,55,0.0038356781005859375],[8,56,0.001598358154296875],[8,57,0.0013895034790039062],[8,58,0.0029048919677734375],[8,59,0.003658294677734375],[8,60,0.006107330322265625],[8,61,0.00925445556640625],[8,62,0.00701141357421875],[8,63,0.00559234619140625],[8,64,0.005279541015625],[8,65,0.00496673583984375],[8,66,0.006500244140625],[8,67,0.00536346435546875],[8,68,0.005828857421875],[8,69,0.006908416748046875],[8,70,0.00476837158203125],[8,71,0.005733489990234375],[8,72,0.0024738311767578125],[8,73,0.004245758056640625],[8,74,0.0031452178955078125],[8,75,0.0024051666259765625],[8,76,0.0023555755615234375],[8,77,0.0015735626220703125],[8,78,0.00164031982421875],[8,79,0.0019044876098632812],[8,80,0.0014591217041015625],[8,81,0.0012006759643554688],[8,82,0.0013875961303710938],[8,83,0.0016193389892578125],[8,84,0.0026454925537109375],[8,85,0.002429962158203125],[8,86,0.0018243789672851562],[8,87,0.0015773773193359375],[8,88,0.0015239715576171875],[8,89,0.0016632080078125],[8,90,0.0016422271728515625],[8,91,0.0020084381103515625],[8,92,0.0019178390502929688],[8,93,0.00368499755859375],[8,94,0.003582000732421875],[8,95,0.00225830078125],[8,96,0.0017986297607421875],[8,97,0.00138092041015625],[8,98,0.0014066696166992188],[8,99,0.001132965087890625],[8,100,0.0011415481567382812],[8,101,0.0011339187622070312],[8,102,0.0013713836669921875],[8,103,0.0012350082397460938],[8,104,0.000949859619140625],[8,105,0.0010824203491210938],[8,106,0.0013437271118164062],[8,107,0.0015106201171875],[8,108,0.001155853271484375],[8,109,0.0014314651489257812],[8,110,0.0014638900756835938],[8,111,0.001636505126953125],[8,112,0.0012388229370117188],[8,113,0.0012388229370117188],[8,114,0.00102996826171875],[8,115,0.0011501312255859375],[8,116,0.0008435249328613281],[8,117,0.0015039443969726562],[8,118,0.0014429092407226562],[8,119,0.0012350082397460938],[8,120,0.0012912750244140625],[8,121,0.0010967254638671875],[8,122,0.0010557174682617188],[8,123,0.0013179779052734375],[8,124,0.0010747909545898438],[8,125,0.0012683868408203125],[8,126,0.0016698837280273438],[8,127,0.0018463134765625],[8,128,0.0024394989013671875],[8,129,0.0025691986083984375],[8,130,0.0031337738037109375],[8,131,0.0041656494140625],[8,132,0.0022449493408203125],[8,133,0.004856109619140625],[8,134,0.0032863616943359375],[8,135,0.005641937255859375],[8,136,0.00441741943359375],[8,137,0.005229949951171875],[8,138,0.0038604736328125],[8,139,0.005046844482421875],[8,140,0.005260467529296875],[8,141,0.005458831787109375],[8,142,0.004367828369140625],[8,143,0.0037441253662109375],[8,144,0.00417327880859375],[8,145,0.00377655029296875],[8,146,0.002483367919921875],[8,147,0.0016374588012695312],[8,148,0.0017690658569335938],[8,149,0.0015516281127929688],[8,150,0.001800537109375],[8,151,0.00159454345703125],[8,152,0.0013780593872070312],[8,153,0.0017480850219726562],[9,9,0],[9,10,0.98046875],[9,11,0.763671875],[9,12,0.03619384765625],[9,13,0.01470184326171875],[9,14,0.25],[9,15,0.6142578125],[9,16,0.783203125],[9,17,0.4501953125],[9,18,0.5087890625],[9,19,0.028472900390625],[9,20,0.011444091796875],[9,21,0.00795745849609375],[9,22,0.0323486328125],[9,23,0.353759765625],[9,24,0.0257415771484375],[9,25,0.015411376953125],[9,26,0.75341796875],[9,27,0.058380126953125],[9,28,0.0025386810302734375],[9,29,0.317626953125],[9,30,0.23583984375],[9,31,0.002044677734375],[9,32,0.002422332763671875],[9,33,0.022186279296875],[9,34,0.0026226043701171875],[9,35,0.000888824462890625],[9,36,0.0016546249389648438],[9,37,0.0027599334716796875],[9,38,0.0023956298828125],[9,39,0.0021686553955078125],[9,40,0.015380859375],[9,43,0.009490966796875],[9,44,0.003971099853515625],[9,45,0.00954437255859375],[9,46,0.00926971435546875],[9,47,0.00972747802734375],[9,48,0.0164337158203125],[9,49,0.0057525634765625],[9,50,0.0186004638671875],[9,51,0.0022907257080078125],[9,52,0.0039825439453125],[9,53,0.002979278564453125],[9,54,0.0019664764404296875],[9,55,0.004718780517578125],[9,56,0.0003654956817626953],[9,57,0.0009784698486328125],[9,58,0.0009241104125976562],[9,59,0.0026836395263671875],[9,60,0.00411224365234375],[9,61,0.009002685546875],[9,62,0.00656890869140625],[9,63,0.007083892822265625],[9,64,0.005878448486328125],[9,65,0.005390167236328125],[9,66,0.005954742431640625],[9,67,0.004131317138671875],[9,68,0.00479888916015625],[9,69,0.00334930419921875],[9,70,0.00225067138671875],[9,71,0.00403594970703125],[9,72,0.0022430419921875],[9,73,0.004390716552734375],[9,74,0.0027637481689453125],[9,75,0.00231170654296875],[9,76,0.0024261474609375],[9,77,0.00140380859375],[9,78,0.0016269683837890625],[9,79,0.0018434524536132812],[9,80,0.0014715194702148438],[9,81,0.0011320114135742188],[9,82,0.0013141632080078125],[9,83,0.0015344619750976562],[9,84,0.002826690673828125],[9,85,0.0024471282958984375],[9,86,0.0018062591552734375],[9,87,0.0015954971313476562],[9,88,0.001552581787109375],[9,89,0.0017690658569335938],[9,90,0.00168609619140625],[9,91,0.00209808349609375],[9,92,0.002094268798828125],[9,93,0.004413604736328125],[9,94,0.00423431396484375],[9,95,0.00286865234375],[9,96,0.0020751953125],[9,97,0.0015430450439453125],[9,98,0.0014486312866210938],[9,99,0.0012464523315429688],[9,100,0.0013027191162109375],[9,101,0.0013103485107421875],[9,102,0.0016117095947265625],[9,103,0.0014333724975585938],[9,104,0.001148223876953125],[9,105,0.0013017654418945312],[9,106,0.0016126632690429688],[9,107,0.0017566680908203125],[9,108,0.0013799667358398438],[9,109,0.0016908645629882812],[9,110,0.0017528533935546875],[9,111,0.001987457275390625],[9,112,0.00144195556640625],[9,113,0.0014810562133789062],[9,114,0.001132965087890625],[9,115,0.0012655258178710938],[9,116,0.000911712646484375],[9,117,0.0017194747924804688],[9,118,0.0016345977783203125],[9,119,0.0014257431030273438],[9,120,0.00147247314453125],[9,121,0.001209259033203125],[9,122,0.0011653900146484375],[9,123,0.0015354156494140625],[9,124,0.001201629638671875],[9,125,0.0014371871948242188],[9,126,0.001861572265625],[9,127,0.00197601318359375],[9,128,0.002613067626953125],[9,129,0.002742767333984375],[9,130,0.0035381317138671875],[9,131,0.005359649658203125],[9,132,0.0022869110107421875],[9,133,0.004497528076171875],[9,134,0.003040313720703125],[9,135,0.0048828125],[9,136,0.00440216064453125],[9,137,0.005157470703125],[9,138,0.0052947998046875],[9,139,0.005817413330078125],[9,140,0.006763458251953125],[9,141,0.00634002685546875],[9,142,0.005634307861328125],[9,143,0.0050506591796875],[9,144,0.0050201416015625],[9,145,0.00634765625],[9,146,0.0036067962646484375],[9,147,0.0018701553344726562],[9,148,0.0025844573974609375],[9,149,0.0019779205322265625],[9,150,0.002445220947265625],[9,151,0.0018548965454101562],[9,152,0.0016012191772460938],[9,153,0.002105712890625],[10,10,0.0000050067901611328125],[10,11,0.98193359375],[10,12,0.435546875],[10,13,0.07965087890625],[10,14,0.63916015625],[10,15,0.78076171875],[10,16,0.66064453125],[10,17,0.0758056640625],[10,18,0.01776123046875],[10,19,0.005016326904296875],[10,20,0.0023345947265625],[10,21,0.0029506683349609375],[10,22,0.00266265869140625],[10,23,0.00853729248046875],[10,24,0.0022735595703125],[10,25,0.000850677490234375],[10,26,0.021728515625],[10,27,0.00373077392578125],[10,28,0.0005311965942382812],[10,29,0.0109710693359375],[10,30,0.0157012939453125],[10,31,0.0005826950073242188],[10,32,0.0005364418029785156],[10,33,0.006412506103515625],[10,34,0.00159454345703125],[10,35,0.0008444786071777344],[10,36,0.0016155242919921875],[10,37,0.0021800994873046875],[10,38,0.0013427734375],[10,39,0.0017185211181640625],[10,40,0.007350921630859375],[10,43,0.005481719970703125],[10,44,0.0019855499267578125],[10,45,0.0142669677734375],[10,46,0.0223541259765625],[10,47,0.056549072265625],[10,48,0.26953125],[10,49,0.0111236572265625],[10,50,0.0161285400390625],[10,51,0.001445770263671875],[10,52,0.00396728515625],[10,53,0.0017232894897460938],[10,54,0.0011758804321289062],[10,55,0.007595062255859375],[10,56,0.0011425018310546875],[10,57,0.0038471221923828125],[10,58,0.0031337738037109375],[10,59,0.001537322998046875],[10,60,0.0014429092407226562],[10,61,0.002834320068359375],[10,62,0.002948760986328125],[10,63,0.005767822265625],[10,64,0.00391387939453125],[10,65,0.0024871826171875],[10,66,0.0031280517578125],[10,67,0.0010557174682617188],[10,68,0.0011234283447265625],[10,69,0.00125885009765625],[10,70,0.0008955001831054688],[10,71,0.0029087066650390625],[10,72,0.0011987686157226562],[10,73,0.0030002593994140625],[10,74,0.0022869110107421875],[10,75,0.0014715194702148438],[10,76,0.00238800048828125],[10,77,0.0010957717895507812],[10,78,0.0015039443969726562],[10,79,0.0014982223510742188],[10,80,0.0013971328735351562],[10,81,0.00102996826171875],[10,82,0.0012273788452148438],[10,83,0.0013265609741210938],[10,84,0.00263214111328125],[10,85,0.0022945404052734375],[10,86,0.0017223358154296875],[10,87,0.0015001296997070312],[10,88,0.0015716552734375],[10,89,0.0016021728515625],[10,90,0.0015993118286132812],[10,91,0.0021514892578125],[10,92,0.002193450927734375],[10,93,0.004364013671875],[10,94,0.00450897216796875],[10,95,0.00313568115234375],[10,96,0.002124786376953125],[10,97,0.0014009475708007812],[10,98,0.001247406005859375],[10,99,0.001071929931640625],[10,100,0.0011663436889648438],[10,101,0.001209259033203125],[10,102,0.0013904571533203125],[10,103,0.0013027191162109375],[10,104,0.0010290145874023438],[10,105,0.001155853271484375],[10,106,0.001331329345703125],[10,107,0.0014429092407226562],[10,108,0.0012235641479492188],[10,109,0.001590728759765625],[10,110,0.0017709732055664062],[10,111,0.0019083023071289062],[10,112,0.001369476318359375],[10,113,0.0014295578002929688],[10,114,0.0010557174682617188],[10,115,0.0010976791381835938],[10,116,0.0008740425109863281],[10,117,0.001514434814453125],[10,118,0.0015630722045898438],[10,119,0.0012750625610351562],[10,120,0.0013332366943359375],[10,121,0.0011167526245117188],[10,122,0.001079559326171875],[10,123,0.0013742446899414062],[10,124,0.0011014938354492188],[10,125,0.0012989044189453125],[10,126,0.0016527175903320312],[10,127,0.00177764892578125],[10,128,0.0021800994873046875],[10,129,0.0022602081298828125],[10,130,0.0025005340576171875],[10,131,0.004711151123046875],[10,132,0.0013952255249023438],[10,133,0.002777099609375],[10,134,0.0017414093017578125],[10,135,0.0029144287109375],[10,136,0.0025787353515625],[10,137,0.003719329833984375],[10,138,0.0036029815673828125],[10,139,0.003734588623046875],[10,140,0.00481414794921875],[10,141,0.005340576171875],[10,142,0.005077362060546875],[10,143,0.0038661956787109375],[10,144,0.0035724639892578125],[10,145,0.006317138671875],[10,146,0.0021724700927734375],[10,147,0.0014390945434570312],[10,148,0.001953125],[10,149,0.0013828277587890625],[10,150,0.0020236968994140625],[10,151,0.001674652099609375],[10,152,0.00146484375],[10,153,0.00199127197265625],[11,11,8.344650268554688e-7],[11,12,0.98828125],[11,13,0.89013671875],[11,14,0.8154296875],[11,15,0.488525390625],[11,16,0.25439453125],[11,17,0.016571044921875],[11,18,0.0079498291015625],[11,19,0.004123687744140625],[11,20,0.005344390869140625],[11,21,0.0073089599609375],[11,22,0.00302886962890625],[11,23,0.00492095947265625],[11,24,0.003173828125],[11,25,0.0020599365234375],[11,26,0.03533935546875],[11,27,0.00907135009765625],[11,28,0.002033233642578125],[11,29,0.03228759765625],[11,30,0.18017578125],[11,31,0.0032291412353515625],[11,32,0.0025768280029296875],[11,33,0.087890625],[11,34,0.00763702392578125],[11,35,0.001312255859375],[11,36,0.00281524658203125],[11,37,0.004909515380859375],[11,38,0.00975799560546875],[11,39,0.0214691162109375],[11,40,0.414306640625],[11,43,0.2222900390625],[11,44,0.0229644775390625],[11,45,0.2266845703125],[11,46,0.7109375],[11,47,0.7626953125],[11,48,0.697265625],[11,49,0.0919189453125],[11,50,0.0208892822265625],[11,51,0.0017948150634765625],[11,52,0.0014677047729492188],[11,53,0.000713348388671875],[11,54,0.0008463859558105469],[11,55,0.00988006591796875],[11,56,0.00223541259765625],[11,57,0.04931640625],[11,58,0.0148468017578125],[11,59,0.0055999755859375],[11,60,0.002162933349609375],[11,61,0.002971649169921875],[11,62,0.0023326873779296875],[11,63,0.005413055419921875],[11,64,0.002941131591796875],[11,65,0.0011377334594726562],[11,66,0.00077056884765625],[11,67,0.0003123283386230469],[11,68,0.0009579658508300781],[11,69,0.0009784698486328125],[11,70,0.0004818439483642578],[11,71,0.0016164779663085938],[11,72,0.0003447532653808594],[11,73,0.00124359130859375],[11,74,0.0011529922485351562],[11,75,0.0011510848999023438],[11,76,0.0018148422241210938],[11,77,0.00064849853515625],[11,78,0.0010395050048828125],[11,79,0.0010471343994140625],[11,80,0.0009245872497558594],[11,81,0.0011005401611328125],[11,82,0.0010089874267578125],[11,83,0.001239776611328125],[11,84,0.002178192138671875],[11,85,0.0019350051879882812],[11,86,0.0018758773803710938],[11,87,0.001209259033203125],[11,88,0.0017061233520507812],[11,89,0.0011835098266601562],[11,90,0.00131988525390625],[11,91,0.0015211105346679688],[11,92,0.0014810562133789062],[11,93,0.003208160400390625],[11,94,0.0030059814453125],[11,95,0.002986907958984375],[11,96,0.0016689300537109375],[11,97,0.0013246536254882812],[11,98,0.0010671615600585938],[11,99,0.0009527206420898438],[11,100,0.0010843276977539062],[11,101,0.001079559326171875],[11,102,0.0013303756713867188],[11,103,0.0012121200561523438],[11,104,0.0009899139404296875],[11,105,0.0011615753173828125],[11,106,0.0013208389282226562],[11,107,0.0014276504516601562],[11,108,0.0012664794921875],[11,109,0.00157928466796875],[11,110,0.0018262863159179688],[11,111,0.00199127197265625],[11,112,0.0012969970703125],[11,113,0.0015382766723632812],[11,114,0.0009655952453613281],[11,115,0.0010442733764648438],[11,116,0.0007753372192382812],[11,117,0.0014696121215820312],[11,118,0.0014123916625976562],[11,119,0.0011997222900390625],[11,120,0.0011844635009765625],[11,121,0.0009794235229492188],[11,122,0.00101470947265625],[11,123,0.0013246536254882812],[11,124,0.0010824203491210938],[11,125,0.00115203857421875],[11,126,0.0016489028930664062],[11,127,0.0015850067138671875],[11,128,0.0020084381103515625],[11,129,0.0019254684448242188],[11,130,0.002399444580078125],[11,131,0.005207061767578125],[11,132,0.0011796951293945312],[11,133,0.0025310516357421875],[11,134,0.0009908676147460938],[11,135,0.0014371871948242188],[11,136,0.0023021697998046875],[11,137,0.002735137939453125],[11,138,0.002880096435546875],[11,139,0.0025634765625],[11,140,0.0037403106689453125],[11,141,0.0038604736328125],[11,142,0.005435943603515625],[11,143,0.00820159912109375],[11,144,0.01001739501953125],[11,145,0.0184173583984375],[11,146,0.00506591796875],[11,147,0.002521514892578125],[11,148,0.003108978271484375],[11,149,0.0018253326416015625],[11,150,0.002696990966796875],[11,151,0.0021228790283203125],[11,152,0.0018987655639648438],[11,153,0.002353668212890625],[12,12,0],[12,13,0.97998046875],[12,14,0.58349609375],[12,15,0.10406494140625],[12,16,0.0269317626953125],[12,17,0.00554656982421875],[12,18,0.0083465576171875],[12,19,0.0054779052734375],[12,20,0.01538848876953125],[12,21,0.01434326171875],[12,22,0.00975799560546875],[12,23,0.006473541259765625],[12,24,0.0063323974609375],[12,25,0.004177093505859375],[12,26,0.01129150390625],[12,27,0.003582000732421875],[12,28,0.002475738525390625],[12,29,0.0087432861328125],[12,30,0.0286712646484375],[12,31,0.00260162353515625],[12,32,0.002887725830078125],[12,33,0.03118896484375],[12,34,0.00690460205078125],[12,35,0.0023956298828125],[12,36,0.005451202392578125],[12,37,0.006275177001953125],[12,38,0.01197052001953125],[12,39,0.03045654296875],[12,40,0.09027099609375],[12,43,0.035491943359375],[12,44,0.0184173583984375],[12,45,0.14111328125],[12,46,0.422119140625],[12,47,0.8828125],[12,48,0.82080078125],[12,49,0.036041259765625],[12,50,0.01192474365234375],[12,51,0.001529693603515625],[12,52,0.00261688232421875],[12,53,0.000583648681640625],[12,54,0.0008115768432617188],[12,55,0.030731201171875],[12,56,0.00969696044921875],[12,57,0.72021484375],[12,58,0.2373046875],[12,59,0.04315185546875],[12,60,0.01166534423828125],[12,61,0.010223388671875],[12,62,0.0017242431640625],[12,63,0.005100250244140625],[12,64,0.0031585693359375],[12,65,0.000972747802734375],[12,66,0.0015583038330078125],[12,67,0.0013647079467773438],[12,68,0.0118255615234375],[12,69,0.0294647216796875],[12,70,0.0036640167236328125],[12,71,0.01148223876953125],[12,72,0.0008006095886230469],[12,73,0.0016698837280273438],[12,74,0.0015249252319335938],[12,75,0.0008664131164550781],[12,76,0.001125335693359375],[12,77,0.0003821849822998047],[12,78,0.0006260871887207031],[12,79,0.0007238388061523438],[12,80,0.0007224082946777344],[12,81,0.0008749961853027344],[12,82,0.0008502006530761719],[12,83,0.0010480880737304688],[12,84,0.0020503997802734375],[12,85,0.0017976760864257812],[12,86,0.0017910003662109375],[12,87,0.0012407302856445312],[12,88,0.002025604248046875],[12,89,0.0010843276977539062],[12,90,0.0015974044799804688],[12,91,0.0012569427490234375],[12,92,0.0015935897827148438],[12,93,0.0016937255859375],[12,94,0.0025920867919921875],[12,95,0.00439453125],[12,96,0.001628875732421875],[12,97,0.0016727447509765625],[12,98,0.001110076904296875],[12,99,0.0009522438049316406],[12,100,0.00098419189453125],[12,101,0.0009832382202148438],[12,102,0.001338958740234375],[12,103,0.0011739730834960938],[12,104,0.0008940696716308594],[12,105,0.0010366439819335938],[12,106,0.001148223876953125],[12,107,0.0011959075927734375],[12,108,0.0010929107666015625],[12,109,0.0012407302856445312],[12,110,0.0015649795532226562],[12,111,0.0016651153564453125],[12,112,0.00112152099609375],[12,113,0.001308441162109375],[12,114,0.0008502006530761719],[12,115,0.0008382797241210938],[12,116,0.0007157325744628906],[12,117,0.0012750625610351562],[12,118,0.0012807846069335938],[12,119,0.0011262893676757812],[12,120,0.00106048583984375],[12,121,0.0009207725524902344],[12,122,0.0010042190551757812],[12,123,0.0012674331665039062],[12,124,0.0011663436889648438],[12,125,0.0011548995971679688],[12,126,0.0016918182373046875],[12,127,0.0017719268798828125],[12,128,0.0021152496337890625],[12,129,0.002063751220703125],[12,130,0.002773284912109375],[12,131,0.0080413818359375],[12,132,0.001895904541015625],[12,133,0.006439208984375],[12,134,0.0017213821411132812],[12,135,0.0025920867919921875],[12,136,0.0033016204833984375],[12,137,0.0024089813232421875],[12,138,0.004062652587890625],[12,139,0.00266265869140625],[12,140,0.0037384033203125],[12,141,0.004154205322265625],[12,142,0.005481719970703125],[12,143,0.00824737548828125],[12,144,0.01058197021484375],[12,145,0.0176544189453125],[12,146,0.0059814453125],[12,147,0.0030765533447265625],[12,148,0.004268646240234375],[12,149,0.00283050537109375],[12,150,0.0038299560546875],[12,151,0.0021572113037109375],[12,152,0.0016927719116210938],[12,153,0.002197265625],[13,13,0.0000013709068298339844],[13,14,0.96142578125],[13,15,0.2208251953125],[13,16,0.032623291015625],[13,17,0.00679779052734375],[13,18,0.0026874542236328125],[13,19,0.005218505859375],[13,20,0.014190673828125],[13,21,0.011505126953125],[13,22,0.005634307861328125],[13,23,0.003757476806640625],[13,24,0.0032520294189453125],[13,25,0.002597808837890625],[13,26,0.0041656494140625],[13,27,0.001438140869140625],[13,28,0.0010280609130859375],[13,29,0.00748443603515625],[13,30,0.0179290771484375],[13,31,0.0015850067138671875],[13,32,0.00235748291015625],[13,33,0.05889892578125],[13,34,0.00617218017578125],[13,35,0.0016202926635742188],[13,36,0.0057830810546875],[13,37,0.0096435546875],[13,38,0.0428466796875],[13,39,0.267822265625],[13,40,0.43505859375],[13,43,0.097412109375],[13,44,0.049560546875],[13,45,0.462158203125],[13,46,0.53369140625],[13,47,0.74853515625],[13,48,0.3369140625],[13,49,0.01152801513671875],[13,50,0.003604888916015625],[13,51,0.00102996826171875],[13,52,0.00283050537109375],[13,53,0.0011625289916992188],[13,54,0.0007266998291015625],[13,55,0.0047607421875],[13,56,0.0025959014892578125],[13,57,0.08428955078125],[13,58,0.13134765625],[13,59,0.019317626953125],[13,60,0.01105499267578125],[13,61,0.01493072509765625],[13,62,0.0026264190673828125],[13,63,0.005603790283203125],[13,64,0.003025054931640625],[13,65,0.0011129379272460938],[13,66,0.0017232894897460938],[13,67,0.0014104843139648438],[13,68,0.00545501708984375],[13,69,0.0066986083984375],[13,70,0.00164031982421875],[13,71,0.0037994384765625],[13,72,0.0015392303466796875],[13,73,0.0025959014892578125],[13,74,0.0015401840209960938],[13,75,0.0009675025939941406],[13,76,0.0016794204711914062],[13,77,0.0006070137023925781],[13,78,0.001010894775390625],[13,79,0.0010251998901367188],[13,80,0.0009379386901855469],[13,81,0.0009446144104003906],[13,82,0.000850677490234375],[13,83,0.0011529922485351562],[13,84,0.00200653076171875],[13,85,0.0019054412841796875],[13,86,0.0017986297607421875],[13,87,0.0015048980712890625],[13,88,0.0020618438720703125],[13,89,0.001422882080078125],[13,90,0.00173187255859375],[13,91,0.0014705657958984375],[13,92,0.00228118896484375],[13,93,0.0024242401123046875],[13,94,0.00390625],[13,95,0.004009246826171875],[13,96,0.00168609619140625],[13,97,0.0013837814331054688],[13,98,0.0008950233459472656],[13,99,0.0007781982421875],[13,100,0.0008001327514648438],[13,101,0.0008363723754882812],[13,102,0.0011882781982421875],[13,103,0.0010385513305664062],[13,104,0.0008029937744140625],[13,105,0.0009293556213378906],[13,106,0.0010204315185546875],[13,107,0.0010833740234375],[13,108,0.0009679794311523438],[13,109,0.0011539459228515625],[13,110,0.0014743804931640625],[13,111,0.0016965866088867188],[13,112,0.001094818115234375],[13,113,0.0012912750244140625],[13,114,0.0007801055908203125],[13,115,0.0008077621459960938],[13,116,0.0006241798400878906],[13,117,0.0012760162353515625],[13,118,0.0011920928955078125],[13,119,0.0011453628540039062],[13,120,0.0010328292846679688],[13,121,0.0008816719055175781],[13,122,0.001033782958984375],[13,123,0.0012378692626953125],[13,124,0.0010099411010742188],[13,125,0.0010776519775390625],[13,126,0.0016012191772460938],[13,127,0.0014715194702148438],[13,128,0.0019779205322265625],[13,129,0.001850128173828125],[13,130,0.00289154052734375],[13,131,0.00670623779296875],[13,132,0.0022640228271484375],[13,133,0.004489898681640625],[13,134,0.002353668212890625],[13,135,0.00274658203125],[13,136,0.00345611572265625],[13,137,0.00356292724609375],[13,138,0.004390716552734375],[13,139,0.0029144287109375],[13,140,0.0035419464111328125],[13,141,0.00385284423828125],[13,142,0.005420684814453125],[13,143,0.00836181640625],[13,144,0.01074981689453125],[13,145,0.015625],[13,146,0.00725555419921875],[13,147,0.00357818603515625],[13,148,0.004451751708984375],[13,149,0.0028076171875],[13,150,0.0037326812744140625],[13,151,0.0018758773803710938],[13,152,0.0015745162963867188],[13,153,0.0020751953125],[14,14,6.556510925292969e-7],[14,15,0.9873046875],[14,16,0.91162109375],[14,17,0.022064208984375],[14,18,0.00672149658203125],[14,19,0.00142669677734375],[14,20,0.0020198822021484375],[14,21,0.004100799560546875],[14,22,0.0013761520385742188],[14,23,0.001094818115234375],[14,24,0.001194000244140625],[14,25,0.0013780593872070312],[14,26,0.0166015625],[14,27,0.0016164779663085938],[14,28,0.0009088516235351562],[14,29,0.056884765625],[14,30,0.0760498046875],[14,31,0.0014858245849609375],[14,32,0.003643035888671875],[14,33,0.2486572265625],[14,34,0.00640869140625],[14,35,0.0014429092407226562],[14,36,0.006580352783203125],[14,37,0.0088958740234375],[14,38,0.0863037109375],[14,39,0.10205078125],[14,40,0.5888671875],[14,43,0.12646484375],[14,44,0.036895751953125],[14,45,0.140380859375],[14,46,0.2232666015625],[14,47,0.17431640625],[14,48,0.0280609130859375],[14,49,0.00641632080078125],[14,50,0.0028553009033203125],[14,51,0.00160980224609375],[14,52,0.0028533935546875],[14,53,0.001804351806640625],[14,54,0.001285552978515625],[14,55,0.001178741455078125],[14,56,0.0004544258117675781],[14,57,0.002838134765625],[14,58,0.00411224365234375],[14,59,0.0020580291748046875],[14,60,0.0025806427001953125],[14,61,0.004024505615234375],[14,62,0.002445220947265625],[14,63,0.003696441650390625],[14,64,0.0018215179443359375],[14,65,0.0010852813720703125],[14,66,0.0012350082397460938],[14,67,0.0009646415710449219],[14,68,0.0011854171752929688],[14,69,0.0015392303466796875],[14,70,0.0009889602661132812],[14,71,0.0018405914306640625],[14,72,0.0007452964782714844],[14,73,0.0013074874877929688],[14,74,0.0009508132934570312],[14,75,0.000606536865234375],[14,76,0.0009446144104003906],[14,77,0.00036215782165527344],[14,78,0.0005202293395996094],[14,79,0.0006222724914550781],[14,80,0.0005059242248535156],[14,81,0.0004181861877441406],[14,82,0.00047779083251953125],[14,83,0.0005564689636230469],[14,84,0.0011749267578125],[14,85,0.0011920928955078125],[14,86,0.0009598731994628906],[14,87,0.0009188652038574219],[14,88,0.0009112358093261719],[14,89,0.0009593963623046875],[14,90,0.0008540153503417969],[14,91,0.0011224746704101562],[14,92,0.0012178421020507812],[14,93,0.0022125244140625],[14,94,0.0023212432861328125],[14,95,0.0017147064208984375],[14,96,0.0008420944213867188],[14,97,0.0005979537963867188],[14,98,0.0004417896270751953],[14,99,0.000400543212890625],[14,100,0.00043511390686035156],[14,101,0.0004730224609375],[14,102,0.0007100105285644531],[14,103,0.0006194114685058594],[14,104,0.0004589557647705078],[14,105,0.0005311965942382812],[14,106,0.0005578994750976562],[14,107,0.000614166259765625],[14,108,0.0005426406860351562],[14,109,0.0006737709045410156],[14,110,0.0008840560913085938],[14,111,0.001010894775390625],[14,112,0.0006189346313476562],[14,113,0.0007076263427734375],[14,114,0.0004467964172363281],[14,115,0.0004630088806152344],[14,116,0.00036907196044921875],[14,117,0.0007567405700683594],[14,118,0.000751495361328125],[14,119,0.0006494522094726562],[14,120,0.0005893707275390625],[14,121,0.0004799365997314453],[14,122,0.0005655288696289062],[14,123,0.0006723403930664062],[14,124,0.0005331039428710938],[14,125,0.0006055831909179688],[14,126,0.0009489059448242188],[14,127,0.0010004043579101562],[14,128,0.0013971328735351562],[14,129,0.0015277862548828125],[14,130,0.0020751953125],[14,131,0.0035190582275390625],[14,132,0.0014677047729492188],[14,133,0.004383087158203125],[14,134,0.0015535354614257812],[14,135,0.003108978271484375],[14,136,0.0021514892578125],[14,137,0.0025997161865234375],[14,138,0.0025348663330078125],[14,139,0.002269744873046875],[14,140,0.002544403076171875],[14,141,0.0031757354736328125],[14,142,0.0035381317138671875],[14,143,0.00347900390625],[14,144,0.004756927490234375],[14,145,0.007717132568359375],[14,146,0.00374603271484375],[14,147,0.0021839141845703125],[14,148,0.003894805908203125],[14,149,0.003116607666015625],[14,150,0.004161834716796875],[14,151,0.0015048980712890625],[14,152,0.0011434555053710938],[14,153,0.00171661376953125],[15,15,2.980232238769531e-7],[15,16,0.986328125],[15,17,0.90576171875],[15,18,0.0136260986328125],[15,19,0.003635406494140625],[15,20,0.0004744529724121094],[15,21,0.00047779083251953125],[15,22,0.0005536079406738281],[15,23,0.001544952392578125],[15,24,0.000682830810546875],[15,25,0.000423431396484375],[15,26,0.007442474365234375],[15,27,0.001171112060546875],[15,28,0.00019490718841552734],[15,29,0.0081787109375],[15,30,0.0092315673828125],[15,31,0.0006814002990722656],[15,32,0.0008959770202636719],[15,33,0.014404296875],[15,34,0.0025577545166015625],[15,35,0.0012359619140625],[15,36,0.00284576416015625],[15,37,0.004650115966796875],[15,38,0.005039215087890625],[15,39,0.0033283233642578125],[15,40,0.0189056396484375],[15,43,0.0072479248046875],[15,44,0.004444122314453125],[15,45,0.004024505615234375],[15,46,0.006603240966796875],[15,47,0.007598876953125],[15,48,0.00618743896484375],[15,49,0.00209808349609375],[15,50,0.001922607421875],[15,51,0.0011444091796875],[15,52,0.003139495849609375],[15,53,0.00252532958984375],[15,54,0.0010585784912109375],[15,55,0.0006341934204101562],[15,56,0.0002617835998535156],[15,57,0.000812530517578125],[15,58,0.0013217926025390625],[15,59,0.0015649795532226562],[15,60,0.0033321380615234375],[15,61,0.005401611328125],[15,62,0.003116607666015625],[15,63,0.003078460693359375],[15,64,0.0019321441650390625],[15,65,0.0017147064208984375],[15,66,0.00212860107421875],[15,67,0.0015783309936523438],[15,68,0.00222015380859375],[15,69,0.00183868408203125],[15,70,0.0015192031860351562],[15,71,0.0020885467529296875],[15,72,0.0010156631469726562],[15,73,0.0016622543334960938],[15,74,0.0010023117065429688],[15,75,0.0006389617919921875],[15,76,0.0007967948913574219],[15,77,0.0004076957702636719],[15,78,0.00046944618225097656],[15,79,0.0006556510925292969],[15,80,0.0004372596740722656],[15,81,0.0003924369812011719],[15,82,0.00044226646423339844],[15,83,0.0005245208740234375],[15,84,0.001102447509765625],[15,85,0.0010242462158203125],[15,86,0.0008320808410644531],[15,87,0.0008101463317871094],[15,88,0.0007476806640625],[15,89,0.0008525848388671875],[15,90,0.00081634521484375],[15,91,0.0009713172912597656],[15,92,0.0011501312255859375],[15,93,0.002101898193359375],[15,94,0.0022106170654296875],[15,95,0.001407623291015625],[15,96,0.0007309913635253906],[15,97,0.0005483627319335938],[15,98,0.00043487548828125],[15,99,0.0003914833068847656],[15,100,0.0004253387451171875],[15,101,0.00047278404235839844],[15,102,0.0007214546203613281],[15,103,0.0006313323974609375],[15,104,0.00046181678771972656],[15,105,0.0005364418029785156],[15,106,0.0006055831909179688],[15,107,0.0006384849548339844],[15,108,0.000530242919921875],[15,109,0.0006551742553710938],[15,110,0.0008063316345214844],[15,111,0.0009403228759765625],[15,112,0.0005693435668945312],[15,113,0.0006313323974609375],[15,114,0.0004277229309082031],[15,115,0.0004401206970214844],[15,116,0.00033664703369140625],[15,117,0.0007739067077636719],[15,118,0.0007314682006835938],[15,119,0.0006399154663085938],[15,120,0.0005774497985839844],[15,121,0.0004711151123046875],[15,122,0.0005617141723632812],[15,123,0.0006275177001953125],[15,124,0.0005121231079101562],[15,125,0.0005578994750976562],[15,126,0.0009236335754394531],[15,127,0.0009274482727050781],[15,128,0.0012836456298828125],[15,129,0.0013332366943359375],[15,130,0.002044677734375],[15,131,0.00334930419921875],[15,132,0.0017414093017578125],[15,133,0.004711151123046875],[15,134,0.001979827880859375],[15,135,0.0036182403564453125],[15,136,0.002552032470703125],[15,137,0.0029296875],[15,138,0.00238800048828125],[15,139,0.002330780029296875],[15,140,0.002567291259765625],[15,141,0.00286865234375],[15,142,0.0027675628662109375],[15,143,0.002399444580078125],[15,144,0.0032596588134765625],[15,145,0.00472259521484375],[15,146,0.003025054931640625],[15,147,0.0016107559204101562],[15,148,0.003238677978515625],[15,149,0.0025482177734375],[15,150,0.0034046173095703125],[15,151,0.00127410888671875],[15,152,0.0010013580322265625],[15,153,0.0014982223510742188],[16,16,0],[16,17,0.9892578125],[16,18,0.96484375],[16,19,0.017486572265625],[16,20,0.0028820037841796875],[16,21,0.00101470947265625],[16,22,0.028778076171875],[16,23,0.0853271484375],[16,24,0.006465911865234375],[16,25,0.0306854248046875],[16,26,0.74462890625],[16,27,0.017303466796875],[16,28,0.0018215179443359375],[16,29,0.703125],[16,30,0.2216796875],[16,31,0.0018815994262695312],[16,32,0.0070953369140625],[16,33,0.1009521484375],[16,34,0.0028553009033203125],[16,35,0.001056671142578125],[16,36,0.00366973876953125],[16,37,0.0040130615234375],[16,38,0.007213592529296875],[16,39,0.006137847900390625],[16,40,0.06512451171875],[16,43,0.0172119140625],[16,44,0.0083465576171875],[16,45,0.00516510009765625],[16,46,0.004611968994140625],[16,47,0.0029544830322265625],[16,48,0.003376007080078125],[16,49,0.0013265609741210938],[16,50,0.0025634765625],[16,51,0.0026798248291015625],[16,52,0.00318145751953125],[16,53,0.002826690673828125],[16,54,0.0017576217651367188],[16,55,0.0010290145874023438],[16,56,0.000339508056640625],[16,57,0.0005884170532226562],[16,58,0.0011262893676757812],[16,59,0.00174713134765625],[16,60,0.002857208251953125],[16,61,0.004241943359375],[16,62,0.0029659271240234375],[16,63,0.0023441314697265625],[16,64,0.001728057861328125],[16,65,0.0017499923706054688],[16,66,0.002483367919921875],[16,67,0.002048492431640625],[16,68,0.0027256011962890625],[16,69,0.0019588470458984375],[16,70,0.0015726089477539062],[16,71,0.001373291015625],[16,72,0.0006909370422363281],[16,73,0.0008096694946289062],[16,74,0.00066375732421875],[16,75,0.0004646778106689453],[16,76,0.0005164146423339844],[16,77,0.0002741813659667969],[16,78,0.00030994415283203125],[16,79,0.0005140304565429688],[16,80,0.00038242340087890625],[16,81,0.0002856254577636719],[16,82,0.0003724098205566406],[16,83,0.0004513263702392578],[16,84,0.0009474754333496094],[16,85,0.000823974609375],[16,86,0.0006170272827148438],[16,87,0.0006232261657714844],[16,88,0.00049591064453125],[16,89,0.0006546974182128906],[16,90,0.0005450248718261719],[16,91,0.0006246566772460938],[16,92,0.0006861686706542969],[16,93,0.0012578964233398438],[16,94,0.001392364501953125],[16,95,0.0009417533874511719],[16,96,0.0005164146423339844],[16,97,0.0004076957702636719],[16,98,0.0003814697265625],[16,99,0.0003314018249511719],[16,100,0.0003647804260253906],[16,101,0.00041794776916503906],[16,102,0.0006732940673828125],[16,103,0.0005855560302734375],[16,104,0.00039315223693847656],[16,105,0.0004665851593017578],[16,106,0.0005269050598144531],[16,107,0.0005660057067871094],[16,108,0.000415802001953125],[16,109,0.0005283355712890625],[16,110,0.0006227493286132812],[16,111,0.0007414817810058594],[16,112,0.00045990943908691406],[16,113,0.00048828125],[16,114,0.00035691261291503906],[16,115,0.0003662109375],[16,116,0.00027561187744140625],[16,117,0.0006093978881835938],[16,118,0.0005917549133300781],[16,119,0.0005321502685546875],[16,120,0.0004673004150390625],[16,121,0.0003714561462402344],[16,122,0.00041294097900390625],[16,123,0.0005078315734863281],[16,124,0.000362396240234375],[16,125,0.0004467964172363281],[16,126,0.0007343292236328125],[16,127,0.0007925033569335938],[16,128,0.0011777877807617188],[16,129,0.0011529922485351562],[16,130,0.0016088485717773438],[16,131,0.0023822784423828125],[16,132,0.0011119842529296875],[16,133,0.002559661865234375],[16,134,0.0012369155883789062],[16,135,0.0023212432861328125],[16,136,0.0014514923095703125],[16,137,0.0018053054809570312],[16,138,0.0013942718505859375],[16,139,0.0017442703247070312],[16,140,0.0019931793212890625],[16,141,0.002155303955078125],[16,142,0.002197265625],[16,143,0.001903533935546875],[16,144,0.003170013427734375],[16,145,0.0049896240234375],[16,146,0.0034198760986328125],[16,147,0.0014638900756835938],[16,148,0.0029544830322265625],[16,149,0.0030364990234375],[16,150,0.003948211669921875],[16,151,0.0013751983642578125],[16,152,0.00103759765625],[16,153,0.0016393661499023438],[17,17,7.152557373046875e-7],[17,18,0.990234375],[17,19,0.182861328125],[17,20,0.01033782958984375],[17,21,0.0014352798461914062],[17,22,0.0124053955078125],[17,23,0.018463134765625],[17,24,0.0011920928955078125],[17,25,0.002105712890625],[17,26,0.0157623291015625],[17,27,0.0007715225219726562],[17,28,0.00015687942504882812],[17,29,0.00583648681640625],[17,30,0.0020046234130859375],[17,31,0.0004839897155761719],[17,32,0.00055694580078125],[17,33,0.00279998779296875],[17,34,0.00139617919921875],[17,35,0.0013589859008789062],[17,36,0.0021877288818359375],[17,37,0.0025577545166015625],[17,38,0.001811981201171875],[17,39,0.00228118896484375],[17,40,0.001995086669921875],[17,43,0.0014362335205078125],[17,44,0.0024623870849609375],[17,45,0.0015668869018554688],[17,46,0.0005068778991699219],[17,47,0.0006322860717773438],[17,48,0.0008187294006347656],[17,49,0.001003265380859375],[17,50,0.0022945404052734375],[17,51,0.0017414093017578125],[17,52,0.003208160400390625],[17,53,0.00344085693359375],[17,54,0.0022182464599609375],[17,55,0.002292633056640625],[17,56,0.0012102127075195312],[17,57,0.002223968505859375],[17,58,0.00157928466796875],[17,59,0.0018310546875],[17,60,0.00177764892578125],[17,61,0.0022258758544921875],[17,62,0.001983642578125],[17,63,0.0017023086547851562],[17,64,0.00128173828125],[17,65,0.0013427734375],[17,66,0.0014982223510742188],[17,67,0.0015993118286132812],[17,68,0.0015363693237304688],[17,69,0.0016078948974609375],[17,70,0.0013685226440429688],[17,71,0.001087188720703125],[17,72,0.0007424354553222656],[17,73,0.0009055137634277344],[17,74,0.0006623268127441406],[17,75,0.00057220458984375],[17,76,0.0006580352783203125],[17,77,0.000438690185546875],[17,78,0.0004382133483886719],[17,79,0.0007300376892089844],[17,80,0.0005130767822265625],[17,81,0.0004134178161621094],[17,82,0.00046944618225097656],[17,83,0.0006194114685058594],[17,84,0.0011644363403320312],[17,85,0.0009641647338867188],[17,86,0.0007176399230957031],[17,87,0.0007562637329101562],[17,88,0.000621795654296875],[17,89,0.0007658004760742188],[17,90,0.0006556510925292969],[17,91,0.0007309913635253906],[17,92,0.000835418701171875],[17,93,0.0014286041259765625],[17,94,0.0013456344604492188],[17,95,0.0009751319885253906],[17,96,0.0006322860717773438],[17,97,0.0005326271057128906],[17,98,0.0004818439483642578],[17,99,0.00045752525329589844],[17,100,0.0004916191101074219],[17,101,0.0005574226379394531],[17,102,0.0008525848388671875],[17,103,0.0007481575012207031],[17,104,0.00051116943359375],[17,105,0.0006055831909179688],[17,106,0.000698089599609375],[17,107,0.0007414817810058594],[17,108,0.000537872314453125],[17,109,0.0006723403930664062],[17,110,0.0007448196411132812],[17,111,0.0009083747863769531],[17,112,0.0005846023559570312],[17,113,0.0006170272827148438],[17,114,0.00046753883361816406],[17,115,0.0004992485046386719],[17,116,0.00035834312438964844],[17,117,0.0008068084716796875],[17,118,0.0007543563842773438],[17,119,0.0006699562072753906],[17,120,0.0006079673767089844],[17,121,0.0005021095275878906],[17,122,0.0005331039428710938],[17,123,0.0006322860717773438],[17,124,0.0005002021789550781],[17,125,0.0005893707275390625],[17,126,0.0010051727294921875],[17,127,0.0009813308715820312],[17,128,0.0013484954833984375],[17,129,0.00116729736328125],[17,130,0.0017299652099609375],[17,131,0.00226593017578125],[17,132,0.0012998580932617188],[17,133,0.0023555755615234375],[17,134,0.0014753341674804688],[17,135,0.0020904541015625],[17,136,0.00154876708984375],[17,137,0.0018215179443359375],[17,138,0.001377105712890625],[17,139,0.0016937255859375],[17,140,0.0020236968994140625],[17,141,0.002208709716796875],[17,142,0.0021915435791015625],[17,143,0.0019683837890625],[17,144,0.0029468536376953125],[17,145,0.0035266876220703125],[17,146,0.002559661865234375],[17,147,0.0012264251708984375],[17,148,0.0017309188842773438],[17,149,0.0019378662109375],[17,150,0.00275421142578125],[17,151,0.0012826919555664062],[17,152,0.0010709762573242188],[17,153,0.0016489028930664062],[18,18,0.00009495019912719727],[18,19,0.998046875],[18,20,0.6943359375],[18,21,0.177978515625],[18,22,0.935546875],[18,23,0.83154296875],[18,24,0.049102783203125],[18,25,0.67041015625],[18,26,0.78759765625],[18,27,0.00478363037109375],[18,28,0.0033740997314453125],[18,29,0.3701171875],[18,30,0.00569915771484375],[18,31,0.0005145072937011719],[18,32,0.0011377334594726562],[18,33,0.0027637481689453125],[18,34,0.0006618499755859375],[18,35,0.0006237030029296875],[18,36,0.0011730194091796875],[18,37,0.002742767333984375],[18,38,0.0012521743774414062],[18,39,0.0020961761474609375],[18,40,0.0008211135864257812],[18,43,0.001087188720703125],[18,44,0.0026454925537109375],[18,45,0.0015211105346679688],[18,46,0.0005240440368652344],[18,47,0.0006461143493652344],[18,48,0.0011472702026367188],[18,49,0.001220703125],[18,50,0.0020694732666015625],[18,51,0.00164031982421875],[18,52,0.0022907257080078125],[18,53,0.0026912689208984375],[18,54,0.0017652511596679688],[18,55,0.0021648406982421875],[18,56,0.00142669677734375],[18,57,0.00168609619140625],[18,58,0.0015869140625],[18,59,0.00119781494140625],[18,60,0.0011205673217773438],[18,61,0.001529693603515625],[18,62,0.001384735107421875],[18,63,0.00121307373046875],[18,64,0.00090789794921875],[18,65,0.0007910728454589844],[18,66,0.0010347366333007812],[18,67,0.0008368492126464844],[18,68,0.000774383544921875],[18,69,0.00070953369140625],[18,70,0.0005931854248046875],[18,71,0.00054168701171875],[18,72,0.0003712177276611328],[18,73,0.0004725456237792969],[18,74,0.00043129920959472656],[18,75,0.0003936290740966797],[18,76,0.00043892860412597656],[18,77,0.0003094673156738281],[18,78,0.0003228187561035156],[18,79,0.0005192756652832031],[18,80,0.00039958953857421875],[18,81,0.0003154277801513672],[18,82,0.00038623809814453125],[18,83,0.0004978179931640625],[18,84,0.0009655952453613281],[18,85,0.0008101463317871094],[18,86,0.0005702972412109375],[18,87,0.000591278076171875],[18,88,0.0005002021789550781],[18,89,0.0005888938903808594],[18,90,0.00048279762268066406],[18,91,0.0005183219909667969],[18,92,0.0005474090576171875],[18,93,0.0009183883666992188],[18,94,0.0009508132934570312],[18,95,0.000736236572265625],[18,96,0.0005631446838378906],[18,97,0.0004248619079589844],[18,98,0.0004420280456542969],[18,99,0.00041961669921875],[18,100,0.00048804283142089844],[18,101,0.0005702972412109375],[18,102,0.0009045600891113281],[18,103,0.0007758140563964844],[18,104,0.0005435943603515625],[18,105,0.0006008148193359375],[18,106,0.0006742477416992188],[18,107,0.0006823539733886719],[18,108,0.0005059242248535156],[18,109,0.0006570816040039062],[18,110,0.0007543563842773438],[18,111,0.000896453857421875],[18,112,0.0006165504455566406],[18,113,0.0005807876586914062],[18,114,0.00045371055603027344],[18,115,0.0004687309265136719],[18,116,0.0003662109375],[18,117,0.0007071495056152344],[18,118,0.0007157325744628906],[18,119,0.000667572021484375],[18,120,0.0005517005920410156],[18,121,0.0004553794860839844],[18,122,0.0004715919494628906],[18,123,0.0005598068237304688],[18,124,0.00042128562927246094],[18,125,0.0005650520324707031],[18,126,0.0008287429809570312],[18,127,0.0008754730224609375],[18,128,0.00115966796875],[18,129,0.0009527206420898438],[18,130,0.0012350082397460938],[18,131,0.001331329345703125],[18,132,0.0007266998291015625],[18,133,0.001178741455078125],[18,134,0.0007357597351074219],[18,135,0.000995635986328125],[18,136,0.0008287429809570312],[18,137,0.0009832382202148438],[18,138,0.0007977485656738281],[18,139,0.0011272430419921875],[18,140,0.0014400482177734375],[18,141,0.001667022705078125],[18,142,0.0017538070678710938],[18,143,0.0016260147094726562],[18,144,0.002292633056640625],[18,145,0.003002166748046875],[18,146,0.0021266937255859375],[18,147,0.0010547637939453125],[18,148,0.0014791488647460938],[18,149,0.0018396377563476562],[18,150,0.0026798248291015625],[18,151,0.0013189315795898438],[18,152,0.0011386871337890625],[18,153,0.0018825531005859375],[19,19,0.000028967857360839844],[19,20,0.9990234375],[19,21,0.98388671875],[19,22,0.9521484375],[19,23,0.56201171875],[19,24,0.00722503662109375],[19,25,0.0204315185546875],[19,26,0.0053253173828125],[19,27,0.0005893707275390625],[19,28,0.00031256675720214844],[19,29,0.0015544891357421875],[19,30,0.0003871917724609375],[19,31,0.000274658203125],[19,32,0.0004992485046386719],[19,33,0.001888275146484375],[19,34,0.0015411376953125],[19,35,0.0026988983154296875],[19,36,0.00423431396484375],[19,37,0.0050048828125],[19,38,0.00399017333984375],[19,39,0.0024261474609375],[19,40,0.001735687255859375],[19,43,0.001399993896484375],[19,44,0.00261688232421875],[19,45,0.00199127197265625],[19,46,0.0009860992431640625],[19,47,0.0009450912475585938],[19,48,0.0012979507446289062],[19,49,0.0009918212890625],[19,50,0.00193023681640625],[19,51,0.0015745162963867188],[19,52,0.002288818359375],[19,53,0.002803802490234375],[19,54,0.0020198822021484375],[19,55,0.0021762847900390625],[19,56,0.001308441162109375],[19,57,0.0018215179443359375],[19,58,0.001399993896484375],[19,59,0.001171112060546875],[19,60,0.0012063980102539062],[19,61,0.0016660690307617188],[19,62,0.00151824951171875],[19,63,0.0012531280517578125],[19,64,0.0009741783142089844],[19,65,0.0007619857788085938],[19,66,0.0008358955383300781],[19,67,0.00072479248046875],[19,68,0.000728607177734375],[19,69,0.0007538795471191406],[19,70,0.0006384849548339844],[19,71,0.0007157325744628906],[19,72,0.0005407333374023438],[19,73,0.000720977783203125],[19,74,0.0006132125854492188],[19,75,0.0006561279296875],[19,76,0.0006661415100097656],[19,77,0.0005578994750976562],[19,78,0.0005788803100585938],[19,79,0.0008878707885742188],[19,80,0.0007162094116210938],[19,81,0.0005812644958496094],[19,82,0.0007038116455078125],[19,83,0.0008687973022460938],[19,84,0.0015687942504882812],[19,85,0.0013990402221679688],[19,86,0.0009975433349609375],[19,87,0.0010738372802734375],[19,88,0.0008153915405273438],[19,89,0.0010223388671875],[19,90,0.0007929801940917969],[19,91,0.0008816719055175781],[19,92,0.0009279251098632812],[19,93,0.0013399124145507812],[19,94,0.0014524459838867188],[19,95,0.00115966796875],[19,96,0.0008859634399414062],[19,97,0.0007534027099609375],[19,98,0.0007681846618652344],[19,99,0.0007338523864746094],[19,100,0.0008363723754882812],[19,101,0.0010128021240234375],[19,102,0.0015783309936523438],[19,103,0.001331329345703125],[19,104,0.0009975433349609375],[19,105,0.001071929931640625],[19,106,0.00118255615234375],[19,107,0.0011539459228515625],[19,108,0.0008950233459472656],[19,109,0.0010995864868164062],[19,110,0.0012378692626953125],[19,111,0.00150299072265625],[19,112,0.001079559326171875],[19,113,0.000995635986328125],[19,114,0.0007982254028320312],[19,115,0.0008616447448730469],[19,116,0.0006895065307617188],[19,117,0.0012722015380859375],[19,118,0.0012845993041992188],[19,119,0.00116729736328125],[19,120,0.0009908676147460938],[19,121,0.0008091926574707031],[19,122,0.0008716583251953125],[19,123,0.0009675025939941406],[19,124,0.0007939338684082031],[19,125,0.0010232925415039062],[19,126,0.001445770263671875],[19,127,0.0015316009521484375],[19,128,0.001857757568359375],[19,129,0.0014486312866210938],[19,130,0.0017757415771484375],[19,131,0.001789093017578125],[19,132,0.0010347366333007812],[19,133,0.0013179779052734375],[19,134,0.001010894775390625],[19,135,0.0011377334594726562],[19,136,0.0009860992431640625],[19,137,0.00113677978515625],[19,138,0.0010061264038085938],[19,139,0.0013523101806640625],[19,140,0.0019102096557617188],[19,141,0.0022830963134765625],[19,142,0.002353668212890625],[19,143,0.00222015380859375],[19,144,0.0028057098388671875],[19,145,0.0036983489990234375],[19,146,0.002399444580078125],[19,147,0.0012292861938476562],[19,148,0.0015716552734375],[19,149,0.001922607421875],[19,150,0.00247955322265625],[19,151,0.0016880035400390625],[19,152,0.001636505126953125],[19,153,0.002414703369140625],[20,20,0.0000010132789611816406],[20,21,0.99755859375],[20,22,0.89599609375],[20,23,0.94140625],[20,24,0.04168701171875],[20,25,0.004978179931640625],[20,26,0.003665924072265625],[20,27,0.0006723403930664062],[20,28,0.0001748800277709961],[20,29,0.0006656646728515625],[20,30,0.0003788471221923828],[20,31,0.0014781951904296875],[20,32,0.0027370452880859375],[20,33,0.006977081298828125],[20,34,0.00461578369140625],[20,35,0.0038204193115234375],[20,36,0.00540924072265625],[20,37,0.00479888916015625],[20,38,0.004852294921875],[20,39,0.002582550048828125],[20,40,0.0016107559204101562],[20,43,0.00125885009765625],[20,44,0.00235748291015625],[20,45,0.0019092559814453125],[20,46,0.0014944076538085938],[20,47,0.0012187957763671875],[20,48,0.0015010833740234375],[20,49,0.0011434555053710938],[20,50,0.001667022705078125],[20,51,0.0012388229370117188],[20,52,0.0018978118896484375],[20,53,0.0016880035400390625],[20,54,0.001216888427734375],[20,55,0.0012340545654296875],[20,56,0.0005865097045898438],[20,57,0.000965118408203125],[20,58,0.0006623268127441406],[20,59,0.0005140304565429688],[20,60,0.0005064010620117188],[20,61,0.0008115768432617188],[20,62,0.0008955001831054688],[20,63,0.0007963180541992188],[20,64,0.0006155967712402344],[20,65,0.0004100799560546875],[20,66,0.00042247772216796875],[20,67,0.00028634071350097656],[20,68,0.0003185272216796875],[20,69,0.0003261566162109375],[20,70,0.00026035308837890625],[20,71,0.0003268718719482422],[20,72,0.0002491474151611328],[20,73,0.0003924369812011719],[20,74,0.00035309791564941406],[20,75,0.00036597251892089844],[20,76,0.0003662109375],[20,77,0.0002951622009277344],[20,78,0.000293731689453125],[20,79,0.0005431175231933594],[20,80,0.0004353523254394531],[20,81,0.0003523826599121094],[20,82,0.000446319580078125],[20,83,0.0005097389221191406],[20,84,0.000995635986328125],[20,85,0.0008935928344726562],[20,86,0.000606536865234375],[20,87,0.0007138252258300781],[20,88,0.0005202293395996094],[20,89,0.0005903244018554688],[20,90,0.00046896934509277344],[20,91,0.0005154609680175781],[20,92,0.0005030632019042969],[20,93,0.0007610321044921875],[20,94,0.0009512901306152344],[20,95,0.0007519721984863281],[20,96,0.0006289482116699219],[20,97,0.0005121231079101562],[20,98,0.000537872314453125],[20,99,0.00048732757568359375],[20,100,0.0005793571472167969],[20,101,0.0007338523864746094],[20,102,0.0012216567993164062],[20,103,0.0010223388671875],[20,104,0.0006694793701171875],[20,105,0.0007205009460449219],[20,106,0.00074005126953125],[20,107,0.0007181167602539062],[20,108,0.0005564689636230469],[20,109,0.0007448196411132812],[20,110,0.0008740425109863281],[20,111,0.0010194778442382812],[20,112,0.0006895065307617188],[20,113,0.00067138671875],[20,114,0.0005006790161132812],[20,115,0.0005130767822265625],[20,116,0.0004315376281738281],[20,117,0.0007891654968261719],[20,118,0.0008258819580078125],[20,119,0.0008230209350585938],[20,120,0.0006203651428222656],[20,121,0.0005211830139160156],[20,122,0.0005283355712890625],[20,123,0.0006394386291503906],[20,124,0.000484466552734375],[20,125,0.0006670951843261719],[20,126,0.000911712646484375],[20,127,0.0009493827819824219],[20,128,0.0012025833129882812],[20,129,0.0008573532104492188],[20,130,0.0009984970092773438],[20,131,0.0009608268737792969],[20,132,0.0005249977111816406],[20,133,0.0006136894226074219],[20,134,0.0005016326904296875],[20,135,0.0005245208740234375],[20,136,0.0005350112915039062],[20,137,0.00052642822265625],[20,138,0.0005211830139160156],[20,139,0.0007658004760742188],[20,140,0.00115203857421875],[20,141,0.0013942718505859375],[20,142,0.0013608932495117188],[20,143,0.00133514404296875],[20,144,0.0015821456909179688],[20,145,0.0015363693237304688],[20,146,0.001129150390625],[20,147,0.0006127357482910156],[20,148,0.0007381439208984375],[20,149,0.0011358261108398438],[20,150,0.001369476318359375],[20,151,0.0010433197021484375],[20,152,0.00119781494140625],[20,153,0.0018835067749023438],[21,21,0.00002008676528930664],[21,22,0.9970703125],[21,23,0.91162109375],[21,24,0.468017578125],[21,25,0.11962890625],[21,26,0.004642486572265625],[21,27,0.00144195556640625],[21,28,0.0006084442138671875],[21,29,0.00052642822265625],[21,30,0.0001735687255859375],[21,31,0.0004353523254394531],[21,32,0.0008153915405273438],[21,33,0.00360107421875],[21,34,0.00457763671875],[21,35,0.004238128662109375],[21,36,0.004222869873046875],[21,37,0.00418853759765625],[21,38,0.003055572509765625],[21,39,0.0021152496337890625],[21,40,0.00138092041015625],[21,43,0.0009899139404296875],[21,44,0.002349853515625],[21,45,0.00220489501953125],[21,46,0.0011625289916992188],[21,47,0.0011234283447265625],[21,48,0.00118255615234375],[21,49,0.0007238388061523438],[21,50,0.0013017654418945312],[21,51,0.0008916854858398438],[21,52,0.0013494491577148438],[21,53,0.0011491775512695312],[21,54,0.0008778572082519531],[21,55,0.0011625289916992188],[21,56,0.00048351287841796875],[21,57,0.0008330345153808594],[21,58,0.0005559921264648438],[21,59,0.0004210472106933594],[21,60,0.00040912628173828125],[21,61,0.0006709098815917969],[21,62,0.0008249282836914062],[21,63,0.0007915496826171875],[21,64,0.0005984306335449219],[21,65,0.0003638267517089844],[21,66,0.000377655029296875],[21,67,0.00026917457580566406],[21,68,0.0003018379211425781],[21,69,0.0003006458282470703],[21,70,0.0002579689025878906],[21,71,0.0002880096435546875],[21,72,0.00023055076599121094],[21,73,0.00040078163146972656],[21,74,0.0003604888916015625],[21,75,0.00043129920959472656],[21,76,0.000396728515625],[21,77,0.0003211498260498047],[21,78,0.00033926963806152344],[21,79,0.0006432533264160156],[21,80,0.0005483627319335938],[21,81,0.0004706382751464844],[21,82,0.0005593299865722656],[21,83,0.0006709098815917969],[21,84,0.0012874603271484375],[21,85,0.0012273788452148438],[21,86,0.0008802413940429688],[21,87,0.0009984970092773438],[21,88,0.0007524490356445312],[21,89,0.0008378028869628906],[21,90,0.0006546974182128906],[21,91,0.0006961822509765625],[21,92,0.0007352828979492188],[21,93,0.0010557174682617188],[21,94,0.0011730194091796875],[21,95,0.0010433197021484375],[21,96,0.0008578300476074219],[21,97,0.0007462501525878906],[21,98,0.0007066726684570312],[21,99,0.0006604194641113281],[21,100,0.0007624626159667969],[21,101,0.0009341239929199219],[21,102,0.0015163421630859375],[21,103,0.0012664794921875],[21,104,0.0008392333984375],[21,105,0.0008764266967773438],[21,106,0.0008916854858398438],[21,107,0.0008540153503417969],[21,108,0.0006642341613769531],[21,109,0.0008707046508789062],[21,110,0.0009489059448242188],[21,111,0.00116729736328125],[21,112,0.0007796287536621094],[21,113,0.0007429122924804688],[21,114,0.00057220458984375],[21,115,0.0005855560302734375],[21,116,0.00048422813415527344],[21,117,0.000919342041015625],[21,118,0.0008606910705566406],[21,119,0.0009570121765136719],[21,120,0.0007266998291015625],[21,121,0.0006017684936523438],[21,122,0.0006337165832519531],[21,123,0.0007276535034179688],[21,124,0.000553131103515625],[21,125,0.0007424354553222656],[21,126,0.0010576248168945312],[21,127,0.0010967254638671875],[21,128,0.0013866424560546875],[21,129,0.0009732246398925781],[21,130,0.0010890960693359375],[21,131,0.0009775161743164062],[21,132,0.0005154609680175781],[21,133,0.0005521774291992188],[21,134,0.00048160552978515625],[21,135,0.0004773139953613281],[21,136,0.0004930496215820312],[21,137,0.0005202293395996094],[21,138,0.0005097389221191406],[21,139,0.0007314682006835938],[21,140,0.00110626220703125],[21,141,0.0014476776123046875],[21,142,0.001453399658203125],[21,143,0.0014123916625976562],[21,144,0.001758575439453125],[21,145,0.0018568038940429688],[21,146,0.001220703125],[21,147,0.0007038116455078125],[21,148,0.0006923675537109375],[21,149,0.0010557174682617188],[21,150,0.001186370849609375],[21,151,0.000995635986328125],[21,152,0.001163482666015625],[21,153,0.001949310302734375],[22,22,0.00021004676818847656],[22,23,0.9970703125],[22,24,0.9306640625],[22,25,0.955078125],[22,26,0.452392578125],[22,27,0.005619049072265625],[22,28,0.03338623046875],[22,29,0.08599853515625],[22,30,0.0008091926574707031],[22,31,0.0003266334533691406],[22,32,0.0006761550903320312],[22,33,0.0003724098205566406],[22,34,0.0002579689025878906],[22,35,0.0004734992980957031],[22,36,0.0009350776672363281],[22,37,0.00209808349609375],[22,38,0.001049041748046875],[22,39,0.0012302398681640625],[22,40,0.00021779537200927734],[22,43,0.00010752677917480469],[22,44,0.0013885498046875],[22,45,0.001468658447265625],[22,46,0.0011339187622070312],[22,47,0.0007266998291015625],[22,48,0.00118255615234375],[22,49,0.0007090568542480469],[22,50,0.0011377334594726562],[22,51,0.0008697509765625],[22,52,0.001186370849609375],[22,53,0.0010747909545898438],[22,54,0.0009493827819824219],[22,55,0.001129150390625],[22,56,0.00041866302490234375],[22,57,0.0006580352783203125],[22,58,0.00045299530029296875],[22,59,0.00042057037353515625],[22,60,0.0003876686096191406],[22,61,0.0005693435668945312],[22,62,0.0007891654968261719],[22,63,0.0006971359252929688],[22,64,0.0005803108215332031],[22,65,0.0003628730773925781],[22,66,0.00035953521728515625],[22,67,0.00026798248291015625],[22,68,0.0002777576446533203],[22,69,0.0002567768096923828],[22,70,0.0002334117889404297],[22,71,0.00021076202392578125],[22,72,0.0001684427261352539],[22,73,0.00028204917907714844],[22,74,0.0002570152282714844],[22,75,0.0003254413604736328],[22,76,0.0003094673156738281],[22,77,0.00023984909057617188],[22,78,0.00025081634521484375],[22,79,0.0005273818969726562],[22,80,0.00042557716369628906],[22,81,0.00037932395935058594],[22,82,0.00043582916259765625],[22,83,0.0005321502685546875],[22,84,0.0010442733764648438],[22,85,0.0010023117065429688],[22,86,0.0007157325744628906],[22,87,0.0008044242858886719],[22,88,0.0006251335144042969],[22,89,0.0006551742553710938],[22,90,0.0005130767822265625],[22,91,0.0005393028259277344],[22,92,0.0005755424499511719],[22,93,0.0008139610290527344],[22,94,0.0009331703186035156],[22,95,0.0007967948913574219],[22,96,0.000652313232421875],[22,97,0.0005483627319335938],[22,98,0.0005335807800292969],[22,99,0.0004878044128417969],[22,100,0.0005578994750976562],[22,101,0.0006780624389648438],[22,102,0.0011739730834960938],[22,103,0.0009756088256835938],[22,104,0.0006232261657714844],[22,105,0.0006556510925292969],[22,106,0.0006732940673828125],[22,107,0.0006456375122070312],[22,108,0.0005011558532714844],[22,109,0.0006756782531738281],[22,110,0.0007615089416503906],[22,111,0.0009264945983886719],[22,112,0.0006213188171386719],[22,113,0.0005846023559570312],[22,114,0.000453948974609375],[22,115,0.0004642009735107422],[22,116,0.0003819465637207031],[22,117,0.000732421875],[22,118,0.000713348388671875],[22,119,0.0008068084716796875],[22,120,0.0005950927734375],[22,121,0.0004940032958984375],[22,122,0.0005006790161132812],[22,123,0.000579833984375],[22,124,0.00042629241943359375],[22,125,0.0005655288696289062],[22,126,0.0008044242858886719],[22,127,0.00077056884765625],[22,128,0.0010347366333007812],[22,129,0.0006737709045410156],[22,130,0.0008420944213867188],[22,131,0.0007524490356445312],[22,132,0.0003864765167236328],[22,133,0.0004093647003173828],[22,134,0.0003592967987060547],[22,135,0.0003504753112792969],[22,136,0.0003757476806640625],[22,137,0.0004169940948486328],[22,138,0.0004000663757324219],[22,139,0.0005807876586914062],[22,140,0.0009279251098632812],[22,141,0.0011758804321289062],[22,142,0.0012989044189453125],[22,143,0.001148223876953125],[22,144,0.0014495849609375],[22,145,0.001407623291015625],[22,146,0.0012102127075195312],[22,147,0.0005621910095214844],[22,148,0.0005936622619628906],[22,149,0.0009694099426269531],[22,150,0.0012159347534179688],[22,151,0.0009307861328125],[22,152,0.0010986328125],[22,153,0.001789093017578125],[23,23,0.00019097328186035156],[23,24,0.99853515625],[23,25,0.95458984375],[23,26,0.95263671875],[23,27,0.06011962890625],[23,28,0.011993408203125],[23,29,0.01425933837890625],[23,30,0.002033233642578125],[23,31,0.00026535987854003906],[23,32,0.0001118779182434082],[23,33,0.00016450881958007812],[23,34,0.0004775524139404297],[23,35,0.001903533935546875],[23,36,0.00482177734375],[23,37,0.0056915283203125],[23,38,0.0015001296997070312],[23,39,0.001583099365234375],[23,40,0.00016999244689941406],[23,43,0.00006121397018432617],[23,44,0.0014886856079101562],[23,45,0.0010271072387695312],[23,46,0.00036907196044921875],[23,47,0.0006585121154785156],[23,48,0.0008869171142578125],[23,49,0.0007739067077636719],[23,50,0.0012464523315429688],[23,51,0.001346588134765625],[23,52,0.0017118453979492188],[23,53,0.0014696121215820312],[23,54,0.0011091232299804688],[23,55,0.001194000244140625],[23,56,0.0005369186401367188],[23,57,0.0007519721984863281],[23,58,0.0004897117614746094],[23,59,0.00044536590576171875],[23,60,0.00046825408935546875],[23,61,0.0007314682006835938],[23,62,0.0008687973022460938],[23,63,0.0008220672607421875],[23,64,0.0006923675537109375],[23,65,0.0004601478576660156],[23,66,0.0004448890686035156],[23,67,0.00033593177795410156],[23,68,0.00035691261291503906],[23,69,0.00027751922607421875],[23,70,0.0002849102020263672],[23,71,0.00024437904357910156],[23,72,0.0001990795135498047],[23,73,0.0003237724304199219],[23,74,0.00030231475830078125],[23,75,0.0003578662872314453],[23,76,0.0003578662872314453],[23,77,0.00028395652770996094],[23,78,0.0002944469451904297],[23,79,0.0006237030029296875],[23,80,0.0004849433898925781],[23,81,0.0004382133483886719],[23,82,0.0005059242248535156],[23,83,0.0006213188171386719],[23,84,0.0012454986572265625],[23,85,0.0011835098266601562],[23,86,0.0008563995361328125],[23,87,0.0009341239929199219],[23,88,0.0007076263427734375],[23,89,0.0007648468017578125],[23,90,0.0006022453308105469],[23,91,0.0006136894226074219],[23,92,0.0006518363952636719],[23,93,0.0009813308715820312],[23,94,0.0010623931884765625],[23,95,0.0009446144104003906],[23,96,0.0007252693176269531],[23,97,0.0006098747253417969],[23,98,0.0006184577941894531],[23,99,0.0005693435668945312],[23,100,0.0006504058837890625],[23,101,0.0008029937744140625],[23,102,0.0014743804931640625],[23,103,0.0012264251708984375],[23,104,0.0007367134094238281],[23,105,0.0007882118225097656],[23,106,0.0008211135864257812],[23,107,0.0007801055908203125],[23,108,0.0005555152893066406],[23,109,0.0007772445678710938],[23,110,0.000885009765625],[23,111,0.001079559326171875],[23,112,0.0006890296936035156],[23,113,0.0006651878356933594],[23,114,0.0005106925964355469],[23,115,0.0005440711975097656],[23,116,0.0004012584686279297],[23,117,0.00084686279296875],[23,118,0.0007796287536621094],[23,119,0.0008912086486816406],[23,120,0.0006585121154785156],[23,121,0.0005259513854980469],[23,122,0.0005412101745605469],[23,123,0.0006198883056640625],[23,124,0.0004382133483886719],[23,125,0.00054931640625],[23,126,0.0008444786071777344],[23,127,0.00079345703125],[23,128,0.001068115234375],[23,129,0.00069427490234375],[23,130,0.00093841552734375],[23,131,0.0008578300476074219],[23,132,0.0004477500915527344],[23,133,0.00046062469482421875],[23,134,0.0004367828369140625],[23,135,0.00041294097900390625],[23,136,0.0004439353942871094],[23,137,0.00048828125],[23,138,0.0005044937133789062],[23,139,0.0006861686706542969],[23,140,0.0010709762573242188],[23,141,0.0014696121215820312],[23,142,0.0016756057739257812],[23,143,0.0014276504516601562],[23,144,0.0018873214721679688],[23,145,0.0017242431640625],[23,146,0.0014390945434570312],[23,147,0.0007653236389160156],[23,148,0.0008196830749511719],[23,149,0.0013065338134765625],[23,150,0.0016613006591796875],[23,151,0.0011501312255859375],[23,152,0.00118255615234375],[23,153,0.0018310546875],[24,24,0.0002225637435913086],[24,25,0.99755859375],[24,26,0.9208984375],[24,27,0.57470703125],[24,28,0.25439453125],[24,29,0.01003265380859375],[24,30,0.0024890899658203125],[24,31,0.0010929107666015625],[24,32,0.00035881996154785156],[24,33,0.00007408857345581055],[24,34,0.0002206563949584961],[24,35,0.0010547637939453125],[24,36,0.0024662017822265625],[24,37,0.0069427490234375],[24,38,0.0023975372314453125],[24,39,0.0026378631591796875],[24,40,0.0003597736358642578],[24,43,0.0001239776611328125],[24,44,0.0016460418701171875],[24,45,0.0014133453369140625],[24,46,0.0004935264587402344],[24,47,0.0007138252258300781],[24,48,0.001129150390625],[24,49,0.0005230903625488281],[24,50,0.0013494491577148438],[24,51,0.0004515647888183594],[24,52,0.000888824462890625],[24,53,0.0007839202880859375],[24,54,0.00054931640625],[24,55,0.0005307197570800781],[24,56,0.00021910667419433594],[24,57,0.0004048347473144531],[24,58,0.0003190040588378906],[24,59,0.00032329559326171875],[24,60,0.0003781318664550781],[24,61,0.000583648681640625],[24,62,0.0007181167602539062],[24,63,0.0007262229919433594],[24,64,0.0006251335144042969],[24,65,0.0004405975341796875],[24,66,0.0004184246063232422],[24,67,0.00034689903259277344],[24,68,0.00032138824462890625],[24,69,0.0002841949462890625],[24,70,0.00028705596923828125],[24,71,0.00023937225341796875],[24,72,0.00017821788787841797],[24,73,0.00029468536376953125],[24,74,0.0002789497375488281],[24,75,0.00034308433532714844],[24,76,0.0003135204315185547],[24,77,0.0002532005310058594],[24,78,0.00024962425231933594],[24,79,0.0005598068237304688],[24,80,0.0004436969757080078],[24,81,0.0004208087921142578],[24,82,0.00047206878662109375],[24,83,0.0006237030029296875],[24,84,0.0013036727905273438],[24,85,0.0012636184692382812],[24,86,0.0008974075317382812],[24,87,0.0009813308715820312],[24,88,0.0007448196411132812],[24,89,0.00080108642578125],[24,90,0.0006475448608398438],[24,91,0.0006103515625],[24,92,0.0006837844848632812],[24,93,0.0009784698486328125],[24,94,0.0010833740234375],[24,95,0.0010213851928710938],[24,96,0.0007801055908203125],[24,97,0.0006856918334960938],[24,98,0.0006761550903320312],[24,99,0.0006513595581054688],[24,100,0.0007185935974121094],[24,101,0.0008511543273925781],[24,102,0.0015811920166015625],[24,103,0.001361846923828125],[24,104,0.0008053779602050781],[24,105,0.0008463859558105469],[24,106,0.0009140968322753906],[24,107,0.0008368492126464844],[24,108,0.0005540847778320312],[24,109,0.0007524490356445312],[24,110,0.0008668899536132812],[24,111,0.0010175704956054688],[24,112,0.0006866455078125],[24,113,0.0006241798400878906],[24,114,0.0004775524139404297],[24,115,0.000514984130859375],[24,116,0.0003566741943359375],[24,117,0.0007739067077636719],[24,118,0.0006575584411621094],[24,119,0.000789642333984375],[24,120,0.0006093978881835938],[24,121,0.0004787445068359375],[24,122,0.0005102157592773438],[24,123,0.0005664825439453125],[24,124,0.0003712177276611328],[24,125,0.0004551410675048828],[24,126,0.000774383544921875],[24,127,0.0006456375122070312],[24,128,0.0008993148803710938],[24,129,0.0005373954772949219],[24,130,0.0008440017700195312],[24,131,0.0007371902465820312],[24,132,0.0003864765167236328],[24,133,0.00037479400634765625],[24,134,0.00037479400634765625],[24,135,0.00034689903259277344],[24,136,0.0003604888916015625],[24,137,0.0004119873046875],[24,138,0.00042366981506347656],[24,139,0.00052642822265625],[24,140,0.0008440017700195312],[24,141,0.0010738372802734375],[24,142,0.00128936767578125],[24,143,0.0010833740234375],[24,144,0.0014867782592773438],[24,145,0.0013523101806640625],[24,146,0.0013360977172851562],[24,147,0.0007071495056152344],[24,148,0.0007524490356445312],[24,149,0.00110626220703125],[24,150,0.0014362335205078125],[24,151,0.0009889602661132812],[24,152,0.0010013580322265625],[24,153,0.0015497207641601562],[25,25,0.0002486705780029297],[25,26,0.9990234375],[25,27,0.9287109375],[25,28,0.98095703125],[25,29,0.9609375],[25,30,0.0028076171875],[25,31,0.0027141571044921875],[25,32,0.00437164306640625],[25,33,0.0004405975341796875],[25,34,0.00016820430755615234],[25,35,0.00015985965728759766],[25,36,0.00017762184143066406],[25,37,0.00666046142578125],[25,38,0.0003361701965332031],[25,39,0.00244903564453125],[25,40,0.00016617774963378906],[25,43,0.00013303756713867188],[25,44,0.0009512901306152344],[25,45,0.0005636215209960938],[25,46,0.00032401084899902344],[25,47,0.0005502700805664062],[25,48,0.0005230903625488281],[25,49,0.0004458427429199219],[25,50,0.0009059906005859375],[25,51,0.0003268718719482422],[25,52,0.0006856918334960938],[25,53,0.0005774497985839844],[25,54,0.0004076957702636719],[25,55,0.00028634071350097656],[25,56,0.00011110305786132812],[25,57,0.00021696090698242188],[25,58,0.00018107891082763672],[25,59,0.00023365020751953125],[25,60,0.0002741813659667969],[25,61,0.000457763671875],[25,62,0.0006732940673828125],[25,63,0.0006856918334960938],[25,64,0.0005731582641601562],[25,65,0.00038170814514160156],[25,66,0.0002989768981933594],[25,67,0.0002589225769042969],[25,68,0.00020742416381835938],[25,69,0.00021600723266601562],[25,70,0.00021600723266601562],[25,71,0.00017130374908447266],[25,72,0.0001354217529296875],[25,73,0.0002123117446899414],[25,74,0.0002079010009765625],[25,75,0.0002448558807373047],[25,76,0.00025916099548339844],[25,77,0.0002014636993408203],[25,78,0.0002052783966064453],[25,79,0.0004677772521972656],[25,80,0.00038242340087890625],[25,81,0.0003762245178222656],[25,82,0.0004439353942871094],[25,83,0.0005617141723632812],[25,84,0.0012273788452148438],[25,85,0.0011749267578125],[25,86,0.000911712646484375],[25,87,0.0009493827819824219],[25,88,0.00074005126953125],[25,89,0.0007839202880859375],[25,90,0.0006546974182128906],[25,91,0.0006103515625],[25,92,0.0006747245788574219],[25,93,0.0009322166442871094],[25,94,0.000972747802734375],[25,95,0.0009503364562988281],[25,96,0.0007004737854003906],[25,97,0.0006341934204101562],[25,98,0.0006060600280761719],[25,99,0.0005993843078613281],[25,100,0.0006427764892578125],[25,101,0.0007567405700683594],[25,102,0.001323699951171875],[25,103,0.0011339187622070312],[25,104,0.0007052421569824219],[25,105,0.0007405281066894531],[25,106,0.0007905960083007812],[25,107,0.0007352828979492188],[25,108,0.0004792213439941406],[25,109,0.0006155967712402344],[25,110,0.0006771087646484375],[25,111,0.0007905960083007812],[25,112,0.0005450248718261719],[25,113,0.0005097389221191406],[25,114,0.0003864765167236328],[25,115,0.0004215240478515625],[25,116,0.0002810955047607422],[25,117,0.0005936622619628906],[25,118,0.0004763603210449219],[25,119,0.000583648681640625],[25,120,0.0004622936248779297],[25,121,0.0003712177276611328],[25,122,0.0003581047058105469],[25,123,0.0004189014434814453],[25,124,0.00026679039001464844],[25,125,0.00032448768615722656],[25,126,0.0005326271057128906],[25,127,0.0004353523254394531],[25,128,0.0006461143493652344],[25,129,0.0003795623779296875],[25,130,0.0006017684936523438],[25,131,0.0005421638488769531],[25,132,0.0002827644348144531],[25,133,0.00029087066650390625],[25,134,0.00028014183044433594],[25,135,0.0002779960632324219],[25,136,0.00028705596923828125],[25,137,0.0003535747528076172],[25,138,0.00035953521728515625],[25,139,0.0004572868347167969],[25,140,0.0007243156433105469],[25,141,0.0008549690246582031],[25,142,0.000980377197265625],[25,143,0.0007696151733398438],[25,144,0.0013055801391601562],[25,145,0.0012369155883789062],[25,146,0.00106048583984375],[25,147,0.0005402565002441406],[25,148,0.0007314682006835938],[25,149,0.0010223388671875],[25,150,0.0011882781982421875],[25,151,0.0008511543273925781],[25,152,0.0008668899536132812],[25,153,0.0013427734375],[26,26,0.00005614757537841797],[26,27,0.99951171875],[26,28,0.97607421875],[26,29,0.986328125],[26,30,0.9697265625],[26,31,0.0012636184692382812],[26,32,0.0002703666687011719],[26,33,0.0006017684936523438],[26,34,0.0003819465637207031],[26,35,0.00018286705017089844],[26,36,0.0000692605972290039],[26,37,0.0023593902587890625],[26,38,0.0002999305725097656],[26,39,0.002162933349609375],[26,40,0.0016450881958007812],[26,43,0.0021495819091796875],[26,44,0.0022411346435546875],[26,45,0.0010938644409179688],[26,46,0.0010986328125],[26,47,0.0011501312255859375],[26,48,0.001201629638671875],[26,49,0.0010204315185546875],[26,50,0.00222015380859375],[26,51,0.0008082389831542969],[26,52,0.0014095306396484375],[26,53,0.00109100341796875],[26,54,0.0009331703186035156],[26,55,0.00036454200744628906],[26,56,0.00010687112808227539],[26,57,0.00018668174743652344],[26,58,0.00044536590576171875],[26,59,0.0005164146423339844],[26,60,0.0006070137023925781],[26,61,0.0010824203491210938],[26,62,0.0011758804321289062],[26,63,0.0009303092956542969],[26,64,0.0006613731384277344],[26,65,0.0004565715789794922],[26,66,0.0004820823669433594],[26,67,0.0002453327178955078],[26,68,0.0003421306610107422],[26,69,0.00016999244689941406],[26,70,0.00019097328186035156],[26,71,0.000148773193359375],[26,72,0.00008738040924072266],[26,73,0.00013208389282226562],[26,74,0.0001304149627685547],[26,75,0.00015163421630859375],[26,76,0.00016987323760986328],[26,77,0.00013589859008789062],[26,78,0.0001360177993774414],[26,79,0.0003371238708496094],[26,80,0.0002474784851074219],[26,81,0.0002608299255371094],[26,82,0.00030112266540527344],[26,83,0.0003910064697265625],[26,84,0.0008854866027832031],[26,85,0.0009069442749023438],[26,86,0.0006937980651855469],[26,87,0.0007104873657226562],[26,88,0.0005536079406738281],[26,89,0.0005931854248046875],[26,90,0.0004925727844238281],[26,91,0.0004673004150390625],[26,92,0.0004787445068359375],[26,93,0.0007085800170898438],[26,94,0.0007371902465820312],[26,95,0.0007309913635253906],[26,96,0.0005049705505371094],[26,97,0.00043582916259765625],[26,98,0.00043392181396484375],[26,99,0.0004229545593261719],[26,100,0.0004584789276123047],[26,101,0.0005393028259277344],[26,102,0.0010042190551757812],[26,103,0.0008511543273925781],[26,104,0.000499725341796875],[26,105,0.0005373954772949219],[26,106,0.0005726814270019531],[26,107,0.0005373954772949219],[26,108,0.00034618377685546875],[26,109,0.0004527568817138672],[26,110,0.0005035400390625],[26,111,0.00058746337890625],[26,112,0.0003941059112548828],[26,113,0.00036835670471191406],[26,114,0.0002808570861816406],[26,115,0.00030612945556640625],[26,116,0.0001919269561767578],[26,117,0.0003986358642578125],[26,118,0.00031447410583496094],[26,119,0.00037169456481933594],[26,120,0.00030422210693359375],[26,121,0.0002467632293701172],[26,122,0.00023496150970458984],[26,123,0.00028824806213378906],[26,124,0.00018477439880371094],[26,125,0.00021409988403320312],[26,126,0.00034427642822265625],[26,127,0.0002753734588623047],[26,128,0.00044345855712890625],[26,129,0.0002453327178955078],[26,130,0.0004127025604248047],[26,131,0.0003895759582519531],[26,132,0.0002008676528930664],[26,133,0.00022673606872558594],[26,134,0.00021600723266601562],[26,135,0.00024127960205078125],[26,136,0.00024890899658203125],[26,137,0.0003151893615722656],[26,138,0.0003418922424316406],[26,139,0.0003952980041503906],[26,140,0.0006971359252929688],[26,141,0.000782012939453125],[26,142,0.0010576248168945312],[26,143,0.000949859619140625],[26,144,0.0014019012451171875],[26,145,0.002323150634765625],[26,146,0.0013256072998046875],[26,147,0.0006303787231445312],[26,148,0.0009541511535644531],[26,149,0.00128936767578125],[26,150,0.001506805419921875],[26,151,0.0008902549743652344],[26,152,0.0008006095886230469],[26,153,0.001201629638671875],[27,27,0.00018262863159179688],[27,28,0.99951171875],[27,29,0.982421875],[27,30,0.990234375],[27,31,0.97705078125],[27,32,0.00045418739318847656],[27,33,0.00022220611572265625],[27,34,0.0008573532104492188],[27,35,0.0004241466522216797],[27,36,0.00034117698669433594],[27,37,0.0005517005920410156],[27,38,0.00023496150970458984],[27,39,0.001148223876953125],[27,40,0.0008554458618164062],[27,43,0.002231597900390625],[27,44,0.0024585723876953125],[27,45,0.0013742446899414062],[27,46,0.0006089210510253906],[27,47,0.0014200210571289062],[27,48,0.0009598731994628906],[27,49,0.0009188652038574219],[27,50,0.0018939971923828125],[27,51,0.0011396408081054688],[27,52,0.001773834228515625],[27,53,0.0010623931884765625],[27,54,0.000820159912109375],[27,55,0.0005221366882324219],[27,56,0.0002372264862060547],[27,57,0.0002758502960205078],[27,58,0.00045752525329589844],[27,59,0.0004744529724121094],[27,60,0.0006461143493652344],[27,61,0.0009412765502929688],[27,62,0.0013065338134765625],[27,63,0.0013475418090820312],[27,64,0.0008840560913085938],[27,65,0.0005011558532714844],[27,66,0.00045108795166015625],[27,67,0.0003075599670410156],[27,68,0.0003097057342529297],[27,69,0.00020003318786621094],[27,70,0.00020122528076171875],[27,71,0.00014281272888183594],[27,72,0.00009053945541381836],[27,73,0.0001360177993774414],[27,74,0.00013208389282226562],[27,75,0.00014352798461914062],[27,76,0.00015878677368164062],[27,77,0.0001341104507446289],[27,78,0.00012862682342529297],[27,79,0.0003273487091064453],[27,80,0.0002529621124267578],[27,81,0.0002460479736328125],[27,82,0.0003027915954589844],[27,83,0.0003724098205566406],[27,84,0.0010280609130859375],[27,85,0.001033782958984375],[27,86,0.0007257461547851562],[27,87,0.0007505416870117188],[27,88,0.0005550384521484375],[27,89,0.000598907470703125],[27,90,0.0004754066467285156],[27,91,0.00044417381286621094],[27,92,0.0004687309265136719],[27,93,0.000720977783203125],[27,94,0.0007367134094238281],[27,95,0.000713348388671875],[27,96,0.0005064010620117188],[27,97,0.0004425048828125],[27,98,0.00045037269592285156],[27,99,0.0004177093505859375],[27,100,0.00046753883361816406],[27,101,0.000560760498046875],[27,102,0.0010080337524414062],[27,103,0.0009293556213378906],[27,104,0.0005154609680175781],[27,105,0.0005598068237304688],[27,106,0.0005984306335449219],[27,107,0.000522613525390625],[27,108,0.0003376007080078125],[27,109,0.00043392181396484375],[27,110,0.0004820823669433594],[27,111,0.0005693435668945312],[27,112,0.00037288665771484375],[27,113,0.0003612041473388672],[27,114,0.00027441978454589844],[27,115,0.00029087066650390625],[27,116,0.00017499923706054688],[27,117,0.00037384033203125],[27,118,0.0002999305725097656],[27,119,0.00032782554626464844],[27,120,0.00026416778564453125],[27,121,0.00023698806762695312],[27,122,0.0002205371856689453],[27,123,0.0002677440643310547],[27,124,0.0001615285873413086],[27,125,0.00020122528076171875],[27,126,0.000316619873046875],[27,127,0.000255584716796875],[27,128,0.0004105567932128906],[27,129,0.00023865699768066406],[27,130,0.0004024505615234375],[27,131,0.0003829002380371094],[27,132,0.0001957416534423828],[27,133,0.00022840499877929688],[27,134,0.00022101402282714844],[27,135,0.00024509429931640625],[27,136,0.0002415180206298828],[27,137,0.00031566619873046875],[27,138,0.0003573894500732422],[27,139,0.0004363059997558594],[27,140,0.0007195472717285156],[27,141,0.0008764266967773438],[27,142,0.0011615753173828125],[27,143,0.0008935928344726562],[27,144,0.0018215179443359375],[27,145,0.00323486328125],[27,146,0.0027294158935546875],[27,147,0.000759124755859375],[27,148,0.0008158683776855469],[27,149,0.001186370849609375],[27,150,0.001468658447265625],[27,151,0.0009403228759765625],[27,152,0.0008687973022460938],[27,153,0.0012645721435546875],[28,28,0.0001042485237121582],[28,29,0.99951171875],[28,30,0.970703125],[28,31,0.98828125],[28,32,0.974609375],[28,33,0.0003941059112548828],[28,34,0.00020205974578857422],[28,35,0.0005736351013183594],[28,36,0.00040411949157714844],[28,37,0.0005064010620117188],[28,38,0.0003178119659423828],[28,39,0.0006318092346191406],[28,40,0.00034427642822265625],[28,43,0.000576019287109375],[28,44,0.0008516311645507812],[28,45,0.0003268718719482422],[28,46,0.0002090930938720703],[28,47,0.000919342041015625],[28,48,0.00048065185546875],[28,49,0.0002803802490234375],[28,50,0.000499725341796875],[28,51,0.00022709369659423828],[28,52,0.0006084442138671875],[28,53,0.0004520416259765625],[28,54,0.00028443336486816406],[28,55,0.00021445751190185547],[28,56,0.000052809715270996094],[28,57,0.00014030933380126953],[28,58,0.00009542703628540039],[28,59,0.00019478797912597656],[28,60,0.0002307891845703125],[28,61,0.0003752708435058594],[28,62,0.0006489753723144531],[28,63,0.0008549690246582031],[28,64,0.0005784034729003906],[28,65,0.0003552436828613281],[28,66,0.00025534629821777344],[28,67,0.0002677440643310547],[28,68,0.00018608570098876953],[28,69,0.00016224384307861328],[28,70,0.0001773834228515625],[28,71,0.00012189149856567383],[28,72,0.00008553266525268555],[28,73,0.00011670589447021484],[28,74,0.00011426210403442383],[28,75,0.0001239776611328125],[28,76,0.00012946128845214844],[28,77,0.00012373924255371094],[28,78,0.000110626220703125],[28,79,0.0002994537353515625],[28,80,0.00023031234741210938],[28,81,0.0002541542053222656],[28,82,0.0003120899200439453],[28,83,0.0003719329833984375],[28,84,0.0010309219360351562],[28,85,0.00106048583984375],[28,86,0.0007395744323730469],[28,87,0.0007967948913574219],[28,88,0.0006189346313476562],[28,89,0.0006532669067382812],[28,90,0.0005335807800292969],[28,91,0.0004649162292480469],[28,92,0.0004696846008300781],[28,93,0.0006694793701171875],[28,94,0.000667572021484375],[28,95,0.0006837844848632812],[28,96,0.0005016326904296875],[28,97,0.0004487037658691406],[28,98,0.0004420280456542969],[28,99,0.00044798851013183594],[28,100,0.00048065185546875],[28,101,0.0005502700805664062],[28,102,0.0009469985961914062],[28,103,0.0008835792541503906],[28,104,0.0005145072937011719],[28,105,0.0005645751953125],[28,106,0.0005793571472167969],[28,107,0.0004978179931640625],[28,108,0.0003075599670410156],[28,109,0.0003719329833984375],[28,110,0.0004029273986816406],[28,111,0.0004565715789794922],[28,112,0.0003218650817871094],[28,113,0.00031828880310058594],[28,114,0.00023937225341796875],[28,115,0.00024437904357910156],[28,116,0.0001462697982788086],[28,117,0.0003027915954589844],[28,118,0.00021457672119140625],[28,119,0.00024509429931640625],[28,120,0.0001989603042602539],[28,121,0.00018262863159179688],[28,122,0.0001800060272216797],[28,123,0.00020515918731689453],[28,124,0.0001245737075805664],[28,125,0.00014543533325195312],[28,126,0.00023937225341796875],[28,127,0.00018095970153808594],[28,128,0.0003037452697753906],[28,129,0.00016117095947265625],[28,130,0.00029158592224121094],[28,131,0.00028228759765625],[28,132,0.0001468658447265625],[28,133,0.00017023086547851562],[28,134,0.00017261505126953125],[28,135,0.00018155574798583984],[28,136,0.00017440319061279297],[28,137,0.00021839141845703125],[28,138,0.00023555755615234375],[28,139,0.00027871131896972656],[28,140,0.00044846534729003906],[28,141,0.0004744529724121094],[28,142,0.0006437301635742188],[28,143,0.00048542022705078125],[28,144,0.0009503364562988281],[28,145,0.0013151168823242188],[28,146,0.0009632110595703125],[28,147,0.0003972053527832031],[28,148,0.0005121231079101562],[28,149,0.0006871223449707031],[28,150,0.0008573532104492188],[28,151,0.0005526542663574219],[28,152,0.0005340576171875],[28,153,0.0008473396301269531],[29,29,0.000010907649993896484],[29,30,1],[29,31,0.9814453125],[29,32,0.990234375],[29,33,0.97216796875],[29,34,0.0005054473876953125],[29,35,0.00010454654693603516],[29,36,0.000301361083984375],[29,37,0.0010385513305664062],[29,38,0.00634002685546875],[29,39,0.0051727294921875],[29,40,0.042633056640625],[29,43,0.04986572265625],[29,44,0.00698089599609375],[29,45,0.0016460418701171875],[29,46,0.0011272430419921875],[29,47,0.0011434555053710938],[29,48,0.00034046173095703125],[29,49,0.00030612945556640625],[29,50,0.0002384185791015625],[29,51,0.000396728515625],[29,52,0.000553131103515625],[29,53,0.0006146430969238281],[29,54,0.00036644935607910156],[29,55,0.00017631053924560547],[29,56,0.00012826919555664062],[29,57,0.00011742115020751953],[29,58,0.00023698806762695312],[29,59,0.00022912025451660156],[29,60,0.00030040740966796875],[29,61,0.0005178451538085938],[29,62,0.0006685256958007812],[29,63,0.0009126663208007812],[29,64,0.0005359649658203125],[29,65,0.0003273487091064453],[29,66,0.0002472400665283203],[29,67,0.00018525123596191406],[29,68,0.00015938282012939453],[29,69,0.0001131296157836914],[29,70,0.0001285076141357422],[29,71,0.00009459257125854492],[29,72,0.00005918741226196289],[29,73,0.00008004903793334961],[29,74,0.0000832676887512207],[29,75,0.00007677078247070312],[29,76,0.00008827447891235352],[29,77,0.00008356571197509766],[29,78,0.00007647275924682617],[29,79,0.000202178955078125],[29,80,0.00014591217041015625],[29,81,0.00017213821411132812],[29,82,0.00021004676818847656],[29,83,0.00023984909057617188],[29,84,0.0006780624389648438],[29,85,0.0006728172302246094],[29,86,0.0005207061767578125],[29,87,0.0005097389221191406],[29,88,0.00042247772216796875],[29,89,0.0004239082336425781],[29,90,0.0003654956817626953],[29,91,0.00032329559326171875],[29,92,0.0003261566162109375],[29,93,0.00048351287841796875],[29,94,0.0004379749298095703],[29,95,0.0004546642303466797],[29,96,0.000316619873046875],[29,97,0.00027632713317871094],[29,98,0.00027561187744140625],[29,99,0.00028133392333984375],[29,100,0.00030422210693359375],[29,101,0.00034332275390625],[29,102,0.0006136894226074219],[29,103,0.0005631446838378906],[29,104,0.0003228187561035156],[29,105,0.0003604888916015625],[29,106,0.00037670135498046875],[29,107,0.00033164024353027344],[29,108,0.00020360946655273438],[29,109,0.00024199485778808594],[29,110,0.00025844573974609375],[29,111,0.00030159950256347656],[29,112,0.00021648406982421875],[29,113,0.0002105236053466797],[29,114,0.0001575946807861328],[29,115,0.00016188621520996094],[29,116,0.00009626150131225586],[29,117,0.0001951456069946289],[29,118,0.0001316070556640625],[29,119,0.0001512765884399414],[29,120,0.00012445449829101562],[29,121,0.00011676549911499023],[29,122,0.00010836124420166016],[29,123,0.00013649463653564453],[29,124,0.00008547306060791016],[29,125,0.00009864568710327148],[29,126,0.0001633167266845703],[29,127,0.00012117624282836914],[29,128,0.0002079010009765625],[29,129,0.00010645389556884766],[29,130,0.0002009868621826172],[29,131,0.00020122528076171875],[29,132,0.0001010894775390625],[29,133,0.00012886524200439453],[29,134,0.00012552738189697266],[29,135,0.00015783309936523438],[29,136,0.00013828277587890625],[29,137,0.00019049644470214844],[29,138,0.00020575523376464844],[29,139,0.0002567768096923828],[29,140,0.0004334449768066406],[29,141,0.0004718303680419922],[29,142,0.0006947517395019531],[29,143,0.0005140304565429688],[29,144,0.00110626220703125],[29,145,0.0017604827880859375],[29,146,0.001018524169921875],[29,147,0.0004684925079345703],[29,148,0.0007724761962890625],[29,149,0.0011911392211914062],[29,150,0.0012836456298828125],[29,151,0.0007429122924804688],[29,152,0.0005950927734375],[29,153,0.0008916854858398438],[30,30,0.0000057220458984375],[30,31,1],[30,32,0.9892578125],[30,33,0.9912109375],[30,34,0.97314453125],[30,35,0.0005488395690917969],[30,36,0.00015628337860107422],[30,37,0.0009222030639648438],[30,38,0.02001953125],[30,39,0.0280914306640625],[30,40,0.2293701171875],[30,43,0.69287109375],[30,44,0.10858154296875],[30,45,0.0186309814453125],[30,46,0.051971435546875],[30,47,0.010711669921875],[30,48,0.0033206939697265625],[30,49,0.00450897216796875],[30,50,0.0025043487548828125],[30,51,0.0012807846069335938],[30,52,0.0017595291137695312],[30,53,0.0011644363403320312],[30,54,0.0009493827819824219],[30,55,0.00022649765014648438],[30,56,0.00007474422454833984],[30,57,0.00007772445678710938],[30,58,0.00030040740966796875],[30,59,0.0005598068237304688],[30,60,0.0005936622619628906],[30,61,0.00054931640625],[30,62,0.0012722015380859375],[30,63,0.0015878677368164062],[30,64,0.0008854866027832031],[30,65,0.00046753883361816406],[30,66,0.0011758804321289062],[30,67,0.00021505355834960938],[30,68,0.0008254051208496094],[30,69,0.00016617774963378906],[30,70,0.00014352798461914062],[30,71,0.00011217594146728516],[30,72,0.00005459785461425781],[30,73,0.00007909536361694336],[30,74,0.00009065866470336914],[30,75,0.00008440017700195312],[30,76,0.00009530782699584961],[30,77,0.00008916854858398438],[30,78,0.0000851750373840332],[30,79,0.00019621849060058594],[30,80,0.00014400482177734375],[30,81,0.00014829635620117188],[30,82,0.00018036365509033203],[30,83,0.00021076202392578125],[30,84,0.0005879402160644531],[30,85,0.0006160736083984375],[30,86,0.0004940032958984375],[30,87,0.0004639625549316406],[30,88,0.00041222572326660156],[30,89,0.0003952980041503906],[30,90,0.0003299713134765625],[30,91,0.0003104209899902344],[30,92,0.000301361083984375],[30,93,0.0004856586456298828],[30,94,0.00044155120849609375],[30,95,0.00045800209045410156],[30,96,0.00032973289489746094],[30,97,0.0002772808074951172],[30,98,0.00027632713317871094],[30,99,0.00027108192443847656],[30,100,0.0002970695495605469],[30,101,0.00033855438232421875],[30,102,0.0005979537963867188],[30,103,0.0005631446838378906],[30,104,0.0003204345703125],[30,105,0.00037384033203125],[30,106,0.0003829002380371094],[30,107,0.0003333091735839844],[30,108,0.00020503997802734375],[30,109,0.00024628639221191406],[30,110,0.0002601146697998047],[30,111,0.0002913475036621094],[30,112,0.000209808349609375],[30,113,0.00020503997802734375],[30,114,0.00015616416931152344],[30,115,0.0001583099365234375],[30,116,0.00009167194366455078],[30,117,0.0001773834228515625],[30,118,0.00013172626495361328],[30,119,0.00014591217041015625],[30,120,0.00011861324310302734],[30,121,0.00011807680130004883],[30,122,0.00011330842971801758],[30,123,0.000141143798828125],[30,124,0.00009149312973022461],[30,125,0.00010967254638671875],[30,126,0.00017309188842773438],[30,127,0.00013780593872070312],[30,128,0.00023293495178222656],[30,129,0.00011932849884033203],[30,130,0.00022101402282714844],[30,131,0.00022745132446289062],[30,132,0.00010854005813598633],[30,133,0.00016307830810546875],[30,134,0.00014674663543701172],[30,135,0.00020194053649902344],[30,136,0.00017786026000976562],[30,137,0.00024771690368652344],[30,138,0.0003108978271484375],[30,139,0.000400543212890625],[30,140,0.000720977783203125],[30,141,0.0009016990661621094],[30,142,0.0013399124145507812],[30,143,0.0013456344604492188],[30,144,0.0034542083740234375],[30,145,0.005458831787109375],[30,146,0.004863739013671875],[30,147,0.0010824203491210938],[30,148,0.00118255615234375],[30,149,0.0017328262329101562],[30,150,0.00228118896484375],[30,151,0.0013151168823242188],[30,152,0.0010251998901367188],[30,153,0.001239776611328125],[31,31,0.000004887580871582031],[31,32,1],[31,33,0.97412109375],[31,34,0.98876953125],[31,35,0.98046875],[31,36,0.00063323974609375],[31,37,0.0007691383361816406],[31,38,0.000957489013671875],[31,39,0.0019245147705078125],[31,40,0.0033092498779296875],[31,43,0.1400146484375],[31,44,0.0139312744140625],[31,45,0.0016155242919921875],[31,46,0.0008091926574707031],[31,47,0.003490447998046875],[31,48,0.0009632110595703125],[31,49,0.0007290840148925781],[31,50,0.0006775856018066406],[31,51,0.0011806488037109375],[31,52,0.0016851425170898438],[31,53,0.0010061264038085938],[31,54,0.0006690025329589844],[31,55,0.0004582405090332031],[31,56,0.0002562999725341797],[31,57,0.0001456737518310547],[31,58,0.0004024505615234375],[31,59,0.000370025634765625],[31,60,0.0004253387451171875],[31,61,0.0008001327514648438],[31,62,0.0010623931884765625],[31,63,0.0020885467529296875],[31,64,0.0010890960693359375],[31,65,0.0004858970642089844],[31,66,0.00037598609924316406],[31,67,0.0003261566162109375],[31,68,0.0002646446228027344],[31,69,0.0001589059829711914],[31,70,0.00016236305236816406],[31,71,0.00009524822235107422],[31,72,0.00006943941116333008],[31,73,0.00010251998901367188],[31,74,0.00009703636169433594],[31,75,0.00009083747863769531],[31,76,0.0000903010368347168],[31,77,0.00009334087371826172],[31,78,0.00008726119995117188],[31,79,0.0002092123031616211],[31,80,0.0001461505889892578],[31,81,0.0001480579376220703],[31,82,0.00017082691192626953],[31,83,0.00019931793212890625],[31,84,0.0006418228149414062],[31,85,0.0006647109985351562],[31,86,0.00048160552978515625],[31,87,0.0004742145538330078],[31,88,0.0003867149353027344],[31,89,0.00039267539978027344],[31,90,0.0003135204315185547],[31,91,0.0002770423889160156],[31,92,0.00028133392333984375],[31,93,0.0004153251647949219],[31,94,0.0004069805145263672],[31,95,0.00041365623474121094],[31,96,0.00029921531677246094],[31,97,0.0002570152282714844],[31,98,0.0002484321594238281],[31,99,0.0002371072769165039],[31,100,0.0002541542053222656],[31,101,0.0003046989440917969],[31,102,0.0005178451538085938],[31,103,0.0004901885986328125],[31,104,0.0002810955047607422],[31,105,0.00032329559326171875],[31,106,0.000331878662109375],[31,107,0.00027751922607421875],[31,108,0.0001671314239501953],[31,109,0.00020122528076171875],[31,110,0.00022029876708984375],[31,111,0.00023174285888671875],[31,112,0.00017333030700683594],[31,113,0.00016832351684570312],[31,114,0.0001316070556640625],[31,115,0.00012493133544921875],[31,116,0.00007605552673339844],[31,117,0.000148773193359375],[31,118,0.00011450052261352539],[31,119,0.00012242794036865234],[31,120,0.00009465217590332031],[31,121,0.00010061264038085938],[31,122,0.00009638071060180664],[31,123,0.00011968612670898438],[31,124,0.0000787973403930664],[31,125,0.00009763240814208984],[31,126,0.0001596212387084961],[31,127,0.00012183189392089844],[31,128,0.00021338462829589844],[31,129,0.00010889768600463867],[31,130,0.0002052783966064453],[31,131,0.0002124309539794922],[31,132,0.00010704994201660156],[31,133,0.00013375282287597656],[31,134,0.0001354217529296875],[31,135,0.00015747547149658203],[31,136,0.00014913082122802734],[31,137,0.0002110004425048828],[31,138,0.00025844573974609375],[31,139,0.00033283233642578125],[31,140,0.0005350112915039062],[31,141,0.0006337165832519531],[31,142,0.0009212493896484375],[31,143,0.0006885528564453125],[31,144,0.0023345947265625],[31,145,0.0036334991455078125],[31,146,0.0036334991455078125],[31,147,0.0007162094116210938],[31,148,0.0008025169372558594],[31,149,0.00142669677734375],[31,150,0.0019702911376953125],[31,151,0.0012359619140625],[31,152,0.0008630752563476562],[31,153,0.0012044906616210938],[32,32,0.0000030994415283203125],[32,33,0.99951171875],[32,34,0.97802734375],[32,35,0.9912109375],[32,36,0.958984375],[32,37,0.002613067626953125],[32,38,0.1361083984375],[32,39,0.003940582275390625],[32,40,0.00864410400390625],[32,43,0.072265625],[32,44,0.004245758056640625],[32,45,0.00036525726318359375],[32,46,0.0003294944763183594],[32,47,0.0012445449829101562],[32,48,0.0005254745483398438],[32,49,0.0002892017364501953],[32,50,0.00020933151245117188],[32,51,0.00036263465881347656],[32,52,0.0007252693176269531],[32,53,0.00046563148498535156],[32,54,0.0003342628479003906],[32,55,0.0002498626708984375],[32,56,0.00010412931442260742],[32,57,0.00011873245239257812],[32,58,0.00015354156494140625],[32,59,0.00030875205993652344],[32,60,0.0003306865692138672],[32,61,0.00037360191345214844],[32,62,0.0008592605590820312],[32,63,0.0013599395751953125],[32,64,0.0008473396301269531],[32,65,0.00034427642822265625],[32,66,0.0002162456512451172],[32,67,0.00023651123046875],[32,68,0.000186920166015625],[32,69,0.00014519691467285156],[32,70,0.00015044212341308594],[32,71,0.0001023411750793457],[32,72,0.00007420778274536133],[32,73,0.00010293722152709961],[32,74,0.00010800361633300781],[32,75,0.00009143352508544922],[32,76,0.00009065866470336914],[32,77,0.00009334087371826172],[32,78,0.00008827447891235352],[32,79,0.00018739700317382812],[32,80,0.00012683868408203125],[32,81,0.0001392364501953125],[32,82,0.0001609325408935547],[32,83,0.00018393993377685547],[32,84,0.0005335807800292969],[32,85,0.0005693435668945312],[32,86,0.0004057884216308594],[32,87,0.00040721893310546875],[32,88,0.00035691261291503906],[32,89,0.0003743171691894531],[32,90,0.00031256675720214844],[32,91,0.0002779960632324219],[32,92,0.00027561187744140625],[32,93,0.0004143714904785156],[32,94,0.00039124488830566406],[32,95,0.0004048347473144531],[32,96,0.0003066062927246094],[32,97,0.0002741813659667969],[32,98,0.0002627372741699219],[32,99,0.0002574920654296875],[32,100,0.00025844573974609375],[32,101,0.0002865791320800781],[32,102,0.0004436969757080078],[32,103,0.00041866302490234375],[32,104,0.0002605915069580078],[32,105,0.0003008842468261719],[32,106,0.00031566619873046875],[32,107,0.0002655982971191406],[32,108,0.00015592575073242188],[32,109,0.00018405914306640625],[32,110,0.00018835067749023438],[32,111,0.00019073486328125],[32,112,0.00015664100646972656],[32,113,0.00015437602996826172],[32,114,0.0001214742660522461],[32,115,0.00011020898818969727],[32,116,0.00007176399230957031],[32,117,0.00013756752014160156],[32,118,0.0000941157341003418],[32,119,0.00010412931442260742],[32,120,0.00007665157318115234],[32,121,0.0000845193862915039],[32,122,0.00008624792098999023],[32,123,0.00010466575622558594],[32,124,0.00007277727127075195],[32,125,0.00008511543273925781],[32,126,0.0001443624496459961],[32,127,0.00010120868682861328],[32,128,0.0001747608184814453],[32,129,0.00009119510650634766],[32,130,0.0001766681671142578],[32,131,0.00019049644470214844],[32,132,0.00010293722152709961],[32,133,0.00012099742889404297],[32,134,0.00012922286987304688],[32,135,0.00013828277587890625],[32,136,0.00013518333435058594],[32,137,0.00017118453979492188],[32,138,0.00020813941955566406],[32,139,0.0002256631851196289],[32,140,0.000347137451171875],[32,141,0.00035190582275390625],[32,142,0.0005950927734375],[32,143,0.00042748451232910156],[32,144,0.0010652542114257812],[32,145,0.0019502639770507812],[32,146,0.0012807846069335938],[32,147,0.00035309791564941406],[32,148,0.0005970001220703125],[32,149,0.001129150390625],[32,150,0.0014362335205078125],[32,151,0.0008168220520019531],[32,152,0.0006132125854492188],[32,153,0.000865936279296875],[33,33,0.000014960765838623047],[33,34,0.99951171875],[33,35,0.98095703125],[33,36,0.986328125],[33,37,0.129638671875],[33,38,0.953125],[33,39,0.3076171875],[33,40,0.82177734375],[33,43,0.7841796875],[33,44,0.28759765625],[33,45,0.03466796875],[33,46,0.034423828125],[33,47,0.00644683837890625],[33,48,0.0007638931274414062],[33,49,0.0011987686157226562],[33,50,0.00029754638671875],[33,51,0.0005831718444824219],[33,52,0.0013055801391601562],[33,53,0.0011758804321289062],[33,54,0.0009326934814453125],[33,55,0.0011272430419921875],[33,56,0.0001156926155090332],[33,57,0.000053048133850097656],[33,58,0.00035858154296875],[33,59,0.0007071495056152344],[33,60,0.0008673667907714844],[33,61,0.0011167526245117188],[33,62,0.0015230178833007812],[33,63,0.0023784637451171875],[33,64,0.0014123916625976562],[33,65,0.0005278587341308594],[33,66,0.0012102127075195312],[33,67,0.00018608570098876953],[33,68,0.0005898475646972656],[33,69,0.00016808509826660156],[33,70,0.00015592575073242188],[33,71,0.00013399124145507812],[33,72,0.00006604194641113281],[33,73,0.00009679794311523438],[33,74,0.0001004338264465332],[33,75,0.00009000301361083984],[33,76,0.00009107589721679688],[33,77,0.0000889897346496582],[33,78,0.00009101629257202148],[33,79,0.00019741058349609375],[33,80,0.0001266002655029297],[33,81,0.00014352798461914062],[33,82,0.0001678466796875],[33,83,0.0002028942108154297],[33,84,0.0006175041198730469],[33,85,0.0006394386291503906],[33,86,0.0004987716674804688],[33,87,0.000431060791015625],[33,88,0.00039577484130859375],[33,89,0.0003647804260253906],[33,90,0.00029659271240234375],[33,91,0.00026798248291015625],[33,92,0.0002696514129638672],[33,93,0.0004248619079589844],[33,94,0.00038623809814453125],[33,95,0.0003933906555175781],[33,96,0.00028634071350097656],[33,97,0.0002532005310058594],[33,98,0.0002524852752685547],[33,99,0.00025177001953125],[33,100,0.0002536773681640625],[33,101,0.0002846717834472656],[33,102,0.0004639625549316406],[33,103,0.0004267692565917969],[33,104,0.0002529621124267578],[33,105,0.0002875328063964844],[33,106,0.00030803680419921875],[33,107,0.0002589225769042969],[33,108,0.0001531839370727539],[33,109,0.00018155574798583984],[33,110,0.00018739700317382812],[33,111,0.000194549560546875],[33,112,0.0001571178436279297],[33,113,0.00014472007751464844],[33,114,0.00011920928955078125],[33,115,0.00011301040649414062],[33,116,0.00007271766662597656],[33,117,0.00014162063598632812],[33,118,0.00010269880294799805],[33,119,0.000118255615234375],[33,120,0.00008398294448852539],[33,121,0.00008440017700195312],[33,122,0.00008428096771240234],[33,123,0.00011521577835083008],[33,124,0.00008022785186767578],[33,125,0.00008958578109741211],[33,126,0.00015246868133544922],[33,127,0.00010800361633300781],[33,128,0.00018775463104248047],[33,129,0.00009799003601074219],[33,130,0.00020265579223632812],[33,131,0.00021958351135253906],[33,132,0.0001157522201538086],[33,133,0.00016188621520996094],[33,134,0.0001589059829711914],[33,135,0.0002110004425048828],[33,136,0.00018966197967529297],[33,137,0.00024437904357910156],[33,138,0.0003781318664550781],[33,139,0.0003859996795654297],[33,140,0.0005817413330078125],[33,141,0.0005955696105957031],[33,142,0.0012083053588867188],[33,143,0.0017557144165039062],[33,144,0.004535675048828125],[33,145,0.00516510009765625],[33,146,0.00449371337890625],[33,147,0.0007958412170410156],[33,148,0.0007686614990234375],[33,149,0.001453399658203125],[33,150,0.0018243789672851562],[33,151,0.00128173828125],[33,152,0.0008540153503417969],[33,153,0.00104522705078125],[34,34,0.0002720355987548828],[34,35,0.99951171875],[34,36,0.9638671875],[34,37,0.72412109375],[34,38,0.7080078125],[34,39,0.160400390625],[34,40,0.1695556640625],[34,43,0.7685546875],[34,44,0.513671875],[34,45,0.019287109375],[34,46,0.01166534423828125],[34,47,0.00565338134765625],[34,48,0.0012063980102539062],[34,49,0.0019197463989257812],[34,50,0.0008687973022460938],[34,51,0.0013828277587890625],[34,52,0.0025539398193359375],[34,53,0.0017642974853515625],[34,54,0.0014371871948242188],[34,55,0.0008344650268554688],[34,56,0.00023674964904785156],[34,57,0.00012230873107910156],[34,58,0.0004916191101074219],[34,59,0.000728607177734375],[34,60,0.0010461807250976562],[34,61,0.0013189315795898438],[34,62,0.00205230712890625],[34,63,0.00324249267578125],[34,64,0.0016756057739257812],[34,65,0.0005025863647460938],[34,66,0.0002608299255371094],[34,67,0.00017631053924560547],[34,68,0.0003685951232910156],[34,69,0.0001647472381591797],[34,70,0.00017547607421875],[34,71,0.00014412403106689453],[34,72,0.00009316205978393555],[34,73,0.00012540817260742188],[34,74,0.00013208389282226562],[34,75,0.00011777877807617188],[34,76,0.00012993812561035156],[34,77,0.0001138448715209961],[34,78,0.0001112818717956543],[34,79,0.00020575523376464844],[34,80,0.0001380443572998047],[34,81,0.0001423358917236328],[34,82,0.00016641616821289062],[34,83,0.00020694732666015625],[34,84,0.0005693435668945312],[34,85,0.000637054443359375],[34,86,0.0004184246063232422],[34,87,0.0003643035888671875],[34,88,0.000335693359375],[34,89,0.0002970695495605469],[34,90,0.0002410411834716797],[34,91,0.00023102760314941406],[34,92,0.00022912025451660156],[34,93,0.0003552436828613281],[34,94,0.0003600120544433594],[34,95,0.00033974647521972656],[34,96,0.00026917457580566406],[34,97,0.00022029876708984375],[34,98,0.00023627281188964844],[34,99,0.00024008750915527344],[34,100,0.0002465248107910156],[34,101,0.00028252601623535156],[34,102,0.00045990943908691406],[34,103,0.00043320655822753906],[34,104,0.0002613067626953125],[34,105,0.0003018379211425781],[34,106,0.0003285408020019531],[34,107,0.0002560615539550781],[34,108,0.00016045570373535156],[34,109,0.00018358230590820312],[34,110,0.0001888275146484375],[34,111,0.00018715858459472656],[34,112,0.00015270709991455078],[34,113,0.0001418590545654297],[34,114,0.00011676549911499023],[34,115,0.0001100301742553711],[34,116,0.00007295608520507812],[34,117,0.0001354217529296875],[34,118,0.00010889768600463867],[34,119,0.00012290477752685547],[34,120,0.00009071826934814453],[34,121,0.00008463859558105469],[34,122,0.00008398294448852539],[34,123,0.00010645389556884766],[34,124,0.00007480382919311523],[34,125,0.00008690357208251953],[34,126,0.0001361370086669922],[34,127,0.00010186433792114258],[34,128,0.00017654895782470703],[34,129,0.00010347366333007812],[34,130,0.00016629695892333984],[34,131,0.00018405914306640625],[34,132,0.00010699033737182617],[34,133,0.0001538991928100586],[34,134,0.0001609325408935547],[34,135,0.0001844167709350586],[34,136,0.0002086162567138672],[34,137,0.0002810955047607422],[34,138,0.0004258155822753906],[34,139,0.0004298686981201172],[34,140,0.0005970001220703125],[34,141,0.0007228851318359375],[34,142,0.0021953582763671875],[34,143,0.0032024383544921875],[34,144,0.00865936279296875],[34,145,0.01117706298828125],[34,146,0.00943756103515625],[34,147,0.0020580291748046875],[34,148,0.0012521743774414062],[34,149,0.0012836456298828125],[34,150,0.0020885467529296875],[34,151,0.0015773773193359375],[34,152,0.00121307373046875],[34,153,0.0013570785522460938],[35,35,0.0008268356323242188],[35,36,0.99951171875],[35,37,0.86474609375],[35,38,0.056915283203125],[35,39,0.007232666015625],[35,40,0.004062652587890625],[35,43,0.0657958984375],[35,44,0.00978851318359375],[35,45,0.0006575584411621094],[35,46,0.0005807876586914062],[35,47,0.003391265869140625],[35,48,0.0016002655029296875],[35,49,0.0013723373413085938],[35,50,0.0011014938354492188],[35,51,0.00151824951171875],[35,52,0.0018930435180664062],[35,53,0.0015468597412109375],[35,54,0.0013036727905273438],[35,55,0.001636505126953125],[35,56,0.0008649826049804688],[35,57,0.0006704330444335938],[35,58,0.0008649826049804688],[35,59,0.0009675025939941406],[35,60,0.0010395050048828125],[35,61,0.0019969940185546875],[35,62,0.001995086669921875],[35,63,0.002338409423828125],[35,64,0.001468658447265625],[35,65,0.0006313323974609375],[35,66,0.0006422996520996094],[35,67,0.0003948211669921875],[35,68,0.0003941059112548828],[35,69,0.00029468536376953125],[35,70,0.00025463104248046875],[35,71,0.0002219676971435547],[35,72,0.000156402587890625],[35,73,0.00020956993103027344],[35,74,0.00024056434631347656],[35,75,0.00018835067749023438],[35,76,0.0002472400665283203],[35,77,0.00018489360809326172],[35,78,0.00018322467803955078],[35,79,0.0002968311309814453],[35,80,0.0001742839813232422],[35,81,0.00020015239715576172],[35,82,0.00022029876708984375],[35,83,0.0002684593200683594],[35,84,0.0006680488586425781],[35,85,0.0007343292236328125],[35,86,0.0005540847778320312],[35,87,0.0004477500915527344],[35,88,0.0003993511199951172],[35,89,0.0003573894500732422],[35,90,0.0002918243408203125],[35,91,0.0002627372741699219],[35,92,0.0002567768096923828],[35,93,0.0003790855407714844],[35,94,0.00041222572326660156],[35,95,0.0003497600555419922],[35,96,0.0002808570861816406],[35,97,0.00022339820861816406],[35,98,0.0002288818359375],[35,99,0.00023889541625976562],[35,100,0.0002503395080566406],[35,101,0.0002994537353515625],[35,102,0.00043511390686035156],[35,103,0.0004367828369140625],[35,104,0.0002422332763671875],[35,105,0.00026869773864746094],[35,106,0.00028395652770996094],[35,107,0.00022482872009277344],[35,108,0.00014162063598632812],[35,109,0.00017154216766357422],[35,110,0.00017786026000976562],[35,111,0.00018358230590820312],[35,112,0.00016117095947265625],[35,113,0.00013625621795654297],[35,114,0.0001093149185180664],[35,115,0.00009942054748535156],[35,116,0.0000712275505065918],[35,117,0.0001366138458251953],[35,118,0.00010728836059570312],[35,119,0.00010985136032104492],[35,120,0.00009071826934814453],[35,121,0.00008416175842285156],[35,122,0.00008893013000488281],[35,123,0.0001157522201538086],[35,124,0.00008553266525268555],[35,125,0.00009489059448242188],[35,126,0.00015354156494140625],[35,127,0.00012922286987304688],[35,128,0.00021123886108398438],[35,129,0.0001348257064819336],[35,130,0.000186920166015625],[35,131,0.0001842975616455078],[35,132,0.00012314319610595703],[35,133,0.00015044212341308594],[35,134,0.00017714500427246094],[35,135,0.00018274784088134766],[35,136,0.00023984909057617188],[35,137,0.0002503395080566406],[35,138,0.0004420280456542969],[35,139,0.00040912628173828125],[35,140,0.0005536079406738281],[35,141,0.0005803108215332031],[35,142,0.0011882781982421875],[35,143,0.0010623931884765625],[35,144,0.0037078857421875],[35,145,0.0038909912109375],[35,146,0.004062652587890625],[35,147,0.0007562637329101562],[35,148,0.0006418228149414062],[35,149,0.0011653900146484375],[35,150,0.001987457275390625],[35,151,0.001384735107421875],[35,152,0.0009093284606933594],[35,153,0.001064300537109375],[36,36,0.00039005279541015625],[36,37,0.998046875],[36,38,0.97119140625],[36,39,0.037322998046875],[36,40,0.040069580078125],[36,43,0.1383056640625],[36,44,0.01953125],[36,45,0.0013103485107421875],[36,46,0.0004868507385253906],[36,47,0.00286102294921875],[36,48,0.0017642974853515625],[36,49,0.0011949539184570312],[36,50,0.0013093948364257812],[36,51,0.0018444061279296875],[36,52,0.002105712890625],[36,53,0.001483917236328125],[36,54,0.0015544891357421875],[36,55,0.001983642578125],[36,56,0.00139617919921875],[36,57,0.0009565353393554688],[36,58,0.0015935897827148438],[36,59,0.0008096694946289062],[36,60,0.001316070556640625],[36,61,0.0025615692138671875],[36,62,0.0020961761474609375],[36,63,0.002536773681640625],[36,64,0.0016040802001953125],[36,65,0.0008244514465332031],[36,66,0.000823974609375],[36,67,0.0004127025604248047],[36,68,0.0005755424499511719],[36,69,0.000339508056640625],[36,70,0.0003223419189453125],[36,71,0.000270843505859375],[36,72,0.00018835067749023438],[36,73,0.000247955322265625],[36,74,0.0002884864807128906],[36,75,0.00022709369659423828],[36,76,0.00029778480529785156],[36,77,0.0002256631851196289],[36,78,0.00022101402282714844],[36,79,0.000339508056640625],[36,80,0.00019431114196777344],[36,81,0.00019288063049316406],[36,82,0.00020813941955566406],[36,83,0.0002734661102294922],[36,84,0.0006012916564941406],[36,85,0.0008082389831542969],[36,86,0.0005679130554199219],[36,87,0.00041937828063964844],[36,88,0.00042819976806640625],[36,89,0.0003390312194824219],[36,90,0.000293731689453125],[36,91,0.00026988983154296875],[36,92,0.0002346038818359375],[36,93,0.00036835670471191406],[36,94,0.00040459632873535156],[36,95,0.0003075599670410156],[36,96,0.00025725364685058594],[36,97,0.00019025802612304688],[36,98,0.00020694732666015625],[36,99,0.00019156932830810547],[36,100,0.00022602081298828125],[36,101,0.00028228759765625],[36,102,0.0004086494445800781],[36,103,0.0004246234893798828],[36,104,0.0002243518829345703],[36,105,0.0002315044403076172],[36,106,0.00024116039276123047],[36,107,0.00018668174743652344],[36,108,0.0001251697540283203],[36,109,0.00015783309936523438],[36,110,0.0001747608184814453],[36,111,0.00017452239990234375],[36,112,0.00015091896057128906],[36,113,0.00013053417205810547],[36,114,0.0000978708267211914],[36,115,0.00008577108383178711],[36,116,0.00006389617919921875],[36,117,0.00012290477752685547],[36,118,0.0001112222671508789],[36,119,0.00010645389556884766],[36,120,0.00009393692016601562],[36,121,0.00008481740951538086],[36,122,0.00007617473602294922],[36,123,0.00009894371032714844],[36,124,0.00007367134094238281],[36,125,0.00009864568710327148],[36,126,0.0001195669174194336],[36,127,0.0001289844512939453],[36,128,0.00018453598022460938],[36,129,0.0001533031463623047],[36,130,0.0001671314239501953],[36,131,0.00016069412231445312],[36,132,0.00010138750076293945],[36,133,0.00013136863708496094],[36,134,0.0001341104507446289],[36,135,0.00015532970428466797],[36,136,0.00024390220642089844],[36,137,0.0002238750457763672],[36,138,0.0004935264587402344],[36,139,0.0004127025604248047],[36,140,0.0006079673767089844],[36,141,0.0006566047668457031],[36,142,0.001132965087890625],[36,143,0.001117706298828125],[36,144,0.0036144256591796875],[36,145,0.0029506683349609375],[36,146,0.003082275390625],[36,147,0.000736236572265625],[36,148,0.0006856918334960938],[36,149,0.0010700225830078125],[36,150,0.0017156600952148438],[36,151,0.0011758804321289062],[36,152,0.0008788108825683594],[36,153,0.0009908676147460938],[37,37,0.0004916191101074219],[37,38,0.99609375],[37,39,0.4873046875],[37,40,0.03912353515625],[37,43,0.2705078125],[37,44,0.41943359375],[37,45,0.0164947509765625],[37,46,0.001949310302734375],[37,47,0.003582000732421875],[37,48,0.0018262863159179688],[37,49,0.00168609619140625],[37,50,0.0016012191772460938],[37,51,0.004558563232421875],[37,52,0.004955291748046875],[37,53,0.00421142578125],[37,54,0.00385284423828125],[37,55,0.00363922119140625],[37,56,0.00206756591796875],[37,57,0.001041412353515625],[37,58,0.0011072158813476562],[37,59,0.00141143798828125],[37,60,0.0018720626831054688],[37,61,0.003910064697265625],[37,62,0.003559112548828125],[37,63,0.006439208984375],[37,64,0.003025054931640625],[37,65,0.0012083053588867188],[37,66,0.0012845993041992188],[37,67,0.000576019287109375],[37,68,0.0005922317504882812],[37,69,0.0005335807800292969],[37,70,0.0004093647003173828],[37,71,0.00036263465881347656],[37,72,0.0002503395080566406],[37,73,0.00035452842712402344],[37,74,0.0003070831298828125],[37,75,0.00024509429931640625],[37,76,0.0003726482391357422],[37,77,0.00027179718017578125],[37,78,0.00031948089599609375],[37,79,0.00044918060302734375],[37,80,0.00022482872009277344],[37,81,0.0002493858337402344],[37,82,0.00024509429931640625],[37,83,0.000331878662109375],[37,84,0.0007228851318359375],[37,85,0.0009317398071289062],[37,86,0.0008168220520019531],[37,87,0.00045013427734375],[37,88,0.0005178451538085938],[37,89,0.0003993511199951172],[37,90,0.0003249645233154297],[37,91,0.0002951622009277344],[37,92,0.0002465248107910156],[37,93,0.00039458274841308594],[37,94,0.00048422813415527344],[37,95,0.0003123283386230469],[37,96,0.00025844573974609375],[37,97,0.00017845630645751953],[37,98,0.0001951456069946289],[37,99,0.00019741058349609375],[37,100,0.00023353099822998047],[37,101,0.0003325939178466797],[37,102,0.00048065185546875],[37,103,0.00045800209045410156],[37,104,0.0002644062042236328],[37,105,0.0002579689025878906],[37,106,0.000263214111328125],[37,107,0.00020766258239746094],[37,108,0.0001423358917236328],[37,109,0.00019240379333496094],[37,110,0.00020647048950195312],[37,111,0.0002186298370361328],[37,112,0.00017762184143066406],[37,113,0.0001628398895263672],[37,114,0.00012135505676269531],[37,115,0.00011497735977172852],[37,116,0.00008720159530639648],[37,117,0.00014448165893554688],[37,118,0.00014543533325195312],[37,119,0.00015664100646972656],[37,120,0.00011837482452392578],[37,121,0.00011080503463745117],[37,122,0.00010329484939575195],[37,123,0.00012731552124023438],[37,124,0.00011181831359863281],[37,125,0.00014019012451171875],[37,126,0.00015926361083984375],[37,127,0.00018477439880371094],[37,128,0.0002491474151611328],[37,129,0.0002231597900390625],[37,130,0.0002262592315673828],[37,131,0.0002263784408569336],[37,132,0.00015294551849365234],[37,133,0.0001914501190185547],[37,134,0.0001850128173828125],[37,135,0.00023877620697021484],[37,136,0.0004200935363769531],[37,137,0.0003085136413574219],[37,138,0.0006785392761230469],[37,139,0.0005812644958496094],[37,140,0.0012254714965820312],[37,141,0.0014810562133789062],[37,142,0.00432586669921875],[37,143,0.0042877197265625],[37,144,0.00893402099609375],[37,145,0.00670623779296875],[37,146,0.0061187744140625],[37,147,0.0018939971923828125],[37,148,0.0010843276977539062],[37,149,0.0013179779052734375],[37,150,0.0018930435180664062],[37,151,0.0015668869018554688],[37,152,0.0012102127075195312],[37,153,0.0013780593872070312],[38,38,0.000029921531677246094],[38,39,0.99853515625],[38,40,0.93701171875],[38,43,0.763671875],[38,44,0.59130859375],[38,45,0.0989990234375],[38,46,0.01232147216796875],[38,47,0.0036468505859375],[38,48,0.000583648681640625],[38,49,0.0010633468627929688],[38,50,0.0004203319549560547],[38,51,0.0035915374755859375],[38,52,0.005741119384765625],[38,53,0.0025920867919921875],[38,54,0.0031261444091796875],[38,55,0.0015764236450195312],[38,56,0.0002448558807373047],[38,57,0.0000833272933959961],[38,58,0.0010805130004882812],[38,59,0.00043272972106933594],[38,60,0.0008373260498046875],[38,61,0.004367828369140625],[38,62,0.0017290115356445312],[38,63,0.003101348876953125],[38,64,0.0014772415161132812],[38,65,0.00038743019104003906],[38,66,0.0005431175231933594],[38,67,0.00013184547424316406],[38,68,0.0008363723754882812],[38,69,0.0001920461654663086],[38,70,0.0003345012664794922],[38,71,0.00027823448181152344],[38,72,0.00019979476928710938],[38,73,0.0003058910369873047],[38,74,0.0002677440643310547],[38,75,0.00021839141845703125],[38,76,0.0003590583801269531],[38,77,0.0003056526184082031],[38,78,0.00037217140197753906],[38,79,0.00045752525329589844],[38,80,0.0002307891845703125],[38,81,0.00023126602172851562],[38,82,0.0002130270004272461],[38,83,0.000278472900390625],[38,84,0.000461578369140625],[38,85,0.0007061958312988281],[38,86,0.0005469322204589844],[38,87,0.0002875328063964844],[38,88,0.0003476142883300781],[38,89,0.0002522468566894531],[38,90,0.00020956993103027344],[38,91,0.00020694732666015625],[38,92,0.00016832351684570312],[38,93,0.0003046989440917969],[38,94,0.0003638267517089844],[38,95,0.0002143383026123047],[38,96,0.00018548965454101562],[38,97,0.00010788440704345703],[38,98,0.0001157522201538086],[38,99,0.00010383129119873047],[38,100,0.00012409687042236328],[38,101,0.0001672506332397461],[38,102,0.00024247169494628906],[38,103,0.0002353191375732422],[38,104,0.00013017654418945312],[38,105,0.00012993812561035156],[38,106,0.0001285076141357422],[38,107,0.0001062154769897461],[38,108,0.00008320808410644531],[38,109,0.00013756752014160156],[38,110,0.00012946128845214844],[38,111,0.00013589859008789062],[38,112,0.00011080503463745117],[38,113,0.00010114908218383789],[38,114,0.00007194280624389648],[38,115,0.00006526708602905273],[38,116,0.00005048513412475586],[38,117,0.00008016824722290039],[38,118,0.00008559226989746094],[38,119,0.00009196996688842773],[38,120,0.00007849931716918945],[38,121,0.00008100271224975586],[38,122,0.00007236003875732422],[38,123,0.00010514259338378906],[38,124,0.00010097026824951172],[38,125,0.00012731552124023438],[38,126,0.00014352798461914062],[38,127,0.00015807151794433594],[38,128,0.00022840499877929688],[38,129,0.00019741058349609375],[38,130,0.0001990795135498047],[38,131,0.00022149085998535156],[38,132,0.00015115737915039062],[38,133,0.0002589225769042969],[38,134,0.0002167224884033203],[38,135,0.0002772808074951172],[38,136,0.0004134178161621094],[38,137,0.00029015541076660156],[38,138,0.0007410049438476562],[38,139,0.0004334449768066406],[38,140,0.0007729530334472656],[38,141,0.0009350776672363281],[38,142,0.0027484893798828125],[38,143,0.003787994384765625],[38,144,0.00545501708984375],[38,145,0.0041961669921875],[38,146,0.004116058349609375],[38,147,0.0013418197631835938],[38,148,0.0009598731994628906],[38,149,0.0011615753173828125],[38,150,0.0019168853759765625],[38,151,0.0015420913696289062],[38,152,0.001110076904296875],[38,153,0.0012559890747070312],[39,39,0.000014483928680419922],[39,40,0.994140625],[39,43,0.8427734375],[39,44,0.8447265625],[39,45,0.7421875],[39,46,0.0880126953125],[39,47,0.02423095703125],[39,48,0.0017042160034179688],[39,49,0.002468109130859375],[39,50,0.0003504753112792969],[39,51,0.0009465217590332031],[39,52,0.0020160675048828125],[39,53,0.001781463623046875],[39,54,0.00061798095703125],[39,55,0.00020051002502441406],[39,56,0.00016295909881591797],[39,57,0.0001888275146484375],[39,58,0.0078125],[39,59,0.0003447532653808594],[39,60,0.0012664794921875],[39,61,0.05755615234375],[39,62,0.003925323486328125],[39,63,0.00777435302734375],[39,64,0.0017766952514648438],[39,65,0.0003647804260253906],[39,66,0.0012187957763671875],[39,67,0.00006580352783203125],[39,68,0.000102996826171875],[39,69,0.00006115436553955078],[39,70,0.00011539459228515625],[39,71,0.00017786026000976562],[39,72,0.0001550912857055664],[39,73,0.0002694129943847656],[39,74,0.0002027750015258789],[39,75,0.00021028518676757812],[39,76,0.00034046173095703125],[39,77,0.0003170967102050781],[39,78,0.0004076957702636719],[39,79,0.0005578994750976562],[39,80,0.00025725364685058594],[39,81,0.0002989768981933594],[39,82,0.0002772808074951172],[39,83,0.0003612041473388672],[39,84,0.0005145072937011719],[39,85,0.0007567405700683594],[39,86,0.0007085800170898438],[39,87,0.00028228759765625],[39,88,0.0003676414489746094],[39,89,0.000232696533203125],[39,90,0.0001747608184814453],[39,91,0.00017070770263671875],[39,92,0.00013339519500732422],[39,93,0.0002808570861816406],[39,94,0.0002980232238769531],[39,95,0.00017023086547851562],[39,96,0.00014829635620117188],[39,97,0.0000941157341003418],[39,98,0.0000972747802734375],[39,99,0.00008064508438110352],[39,100,0.00009268522262573242],[39,101,0.00012695789337158203],[39,102,0.0001876354217529297],[39,103,0.00017940998077392578],[39,104,0.00010293722152709961],[39,105,0.00010031461715698242],[39,106,0.00009679794311523438],[39,107,0.00008320808410644531],[39,108,0.0000629425048828125],[39,109,0.00009882450103759766],[39,110,0.00009739398956298828],[39,111,0.00010186433792114258],[39,112,0.00008958578109741211],[39,113,0.00008952617645263672],[39,114,0.000058710575103759766],[39,115,0.000053048133850097656],[39,116,0.00004220008850097656],[39,117,0.00006300210952758789],[39,118,0.00007641315460205078],[39,119,0.00008869171142578125],[39,120,0.000080108642578125],[39,121,0.00008249282836914062],[39,122,0.00007170438766479492],[39,123,0.00011265277862548828],[39,124,0.00011557340621948242],[39,125,0.00015020370483398438],[39,126,0.000156402587890625],[39,127,0.00022602081298828125],[39,128,0.00030112266540527344],[39,129,0.00023818016052246094],[39,130,0.00020694732666015625],[39,131,0.00027823448181152344],[39,132,0.00021767616271972656],[39,133,0.0004305839538574219],[39,134,0.0002951622009277344],[39,135,0.00032067298889160156],[39,136,0.0004067420959472656],[39,137,0.0003342628479003906],[39,138,0.0008521080017089844],[39,139,0.0005283355712890625],[39,140,0.0011749267578125],[39,141,0.0019197463989257812],[39,142,0.00798797607421875],[39,143,0.00736236572265625],[39,144,0.01506805419921875],[39,145,0.00948333740234375],[39,146,0.00688934326171875],[39,147,0.0021076202392578125],[39,148,0.001068115234375],[39,149,0.0011568069458007812],[39,150,0.0019779205322265625],[39,151,0.0015773773193359375],[39,152,0.001239776611328125],[39,153,0.0013446807861328125],[40,40,0.000019669532775878906],[40,43,0.99560546875],[40,44,0.76611328125],[40,45,0.7568359375],[40,46,0.59521484375],[40,47,0.1712646484375],[40,48,0.0170440673828125],[40,49,0.05859375],[40,50,0.002704620361328125],[40,51,0.0017690658569335938],[40,52,0.0036716461181640625],[40,53,0.0012731552124023438],[40,54,0.0009670257568359375],[40,55,0.00032401084899902344],[40,56,0.0019702911376953125],[40,57,0.001644134521484375],[40,58,0.0399169921875],[40,59,0.0011348724365234375],[40,60,0.0043182373046875],[40,61,0.05047607421875],[40,62,0.004398345947265625],[40,63,0.008087158203125],[40,64,0.0045623779296875],[40,65,0.0016193389892578125],[40,66,0.00266265869140625],[40,67,0.00020003318786621094],[40,68,0.00033664703369140625],[40,69,0.00010764598846435547],[40,70,0.00032329559326171875],[40,71,0.0004353523254394531],[40,72,0.00017452239990234375],[40,73,0.00029659271240234375],[40,74,0.000270843505859375],[40,75,0.00023376941680908203],[40,76,0.0004100799560546875],[40,77,0.00034880638122558594],[40,78,0.0004622936248779297],[40,79,0.0004944801330566406],[40,80,0.00028133392333984375],[40,81,0.0003147125244140625],[40,82,0.0002522468566894531],[40,83,0.0003495216369628906],[40,84,0.00038433074951171875],[40,85,0.0006775856018066406],[40,86,0.0009436607360839844],[40,87,0.000247955322265625],[40,88,0.0004165172576904297],[40,89,0.0001964569091796875],[40,90,0.00016999244689941406],[40,91,0.0001552104949951172],[40,92,0.00010693073272705078],[40,93,0.0003135204315185547],[40,94,0.0002841949462890625],[40,95,0.0001647472381591797],[40,96,0.00013720989227294922],[40,97,0.00009578466415405273],[40,98,0.00009715557098388672],[40,99,0.00007718801498413086],[40,100,0.0000896453857421875],[40,101,0.00010591745376586914],[40,102,0.0001571178436279297],[40,103,0.0001436471939086914],[40,104,0.00009423494338989258],[40,105,0.00008922815322875977],[40,106,0.00009423494338989258],[40,107,0.00007975101470947266],[40,108,0.00006264448165893555],[40,109,0.00009870529174804688],[40,110,0.00009173154830932617],[40,111,0.00009620189666748047],[40,112,0.00007802248001098633],[40,113,0.00008171796798706055],[40,114,0.00005602836608886719],[40,115,0.000049948692321777344],[40,116,0.00004374980926513672],[40,117,0.00006151199340820312],[40,118,0.00007492303848266602],[40,119,0.00008130073547363281],[40,120,0.0000787973403930664],[40,121,0.00008779764175415039],[40,122,0.0000826120376586914],[40,123,0.0001270771026611328],[40,124,0.00015783309936523438],[40,125,0.0001857280731201172],[40,126,0.0001996755599975586],[40,127,0.00023412704467773438],[40,128,0.000354766845703125],[40,129,0.00027561187744140625],[40,130,0.0002605915069580078],[40,131,0.00037288665771484375],[40,132,0.0002598762512207031],[40,133,0.0006976127624511719],[40,134,0.0003495216369628906],[40,135,0.0005197525024414062],[40,136,0.0007176399230957031],[40,137,0.0006442070007324219],[40,138,0.0015420913696289062],[40,139,0.0006017684936523438],[40,140,0.0012836456298828125],[40,141,0.0022602081298828125],[40,142,0.007526397705078125],[40,143,0.00881195068359375],[40,144,0.01464080810546875],[40,145,0.01552581787109375],[40,146,0.0096893310546875],[40,147,0.003330230712890625],[40,148,0.0014781951904296875],[40,149,0.0012521743774414062],[40,150,0.0021572113037109375],[40,151,0.0016946792602539062],[40,152,0.00131988525390625],[40,153,0.0013189315795898438],[43,43,0.0011005401611328125],[43,44,0.99609375],[43,45,0.67724609375],[43,46,0.62646484375],[43,47,0.08465576171875],[43,48,0.01045989990234375],[43,49,0.0390625],[43,50,0.00115203857421875],[43,51,0.001186370849609375],[43,52,0.001708984375],[43,53,0.001628875732421875],[43,54,0.0004863739013671875],[43,55,0.00029730796813964844],[43,56,0.0025348663330078125],[43,57,0.00200653076171875],[43,58,0.0543212890625],[43,59,0.0020294189453125],[43,60,0.004302978515625],[43,61,0.058837890625],[43,62,0.006378173828125],[43,63,0.01111602783203125],[43,64,0.00698089599609375],[43,65,0.0015697479248046875],[43,66,0.0066986083984375],[43,67,0.00037789344787597656],[43,68,0.0009946823120117188],[43,69,0.0002079010009765625],[43,70,0.000354766845703125],[43,71,0.00036334991455078125],[43,72,0.00025653839111328125],[43,73,0.0003781318664550781],[43,74,0.00030803680419921875],[43,75,0.00026798248291015625],[43,76,0.0003459453582763672],[43,77,0.00029754638671875],[43,78,0.00035691261291503906],[43,79,0.0004684925079345703],[43,80,0.00022161006927490234],[43,81,0.00030231475830078125],[43,82,0.0001881122589111328],[43,83,0.0003108978271484375],[43,84,0.00036716461181640625],[43,85,0.0007243156433105469],[43,86,0.0007867813110351562],[43,87,0.00016999244689941406],[43,88,0.0003056526184082031],[43,89,0.0001666545867919922],[43,90,0.0001583099365234375],[43,91,0.0001226663589477539],[43,92,0.00008916854858398438],[43,93,0.00025200843811035156],[43,94,0.0002396106719970703],[43,95,0.00013780593872070312],[43,96,0.00010222196578979492],[43,97,0.00008785724639892578],[43,98,0.00009125471115112305],[43,99,0.00007343292236328125],[43,100,0.00007456541061401367],[43,101,0.00008487701416015625],[43,102,0.0001442432403564453],[43,103,0.0001456737518310547],[43,104,0.00008004903793334961],[43,105,0.00007408857345581055],[43,106,0.00009250640869140625],[43,107,0.00007647275924682617],[43,108,0.000057816505432128906],[43,109,0.00007957220077514648],[43,110,0.00007528066635131836],[43,111,0.00007450580596923828],[43,112,0.00005751848220825195],[43,113,0.000060617923736572266],[43,114,0.0000445246696472168],[43,115,0.000044405460357666016],[43,116,0.000041604042053222656],[43,117,0.00006127357482910156],[43,118,0.00008100271224975586],[43,119,0.00010657310485839844],[43,120,0.00009012222290039062],[43,121,0.00010442733764648438],[43,122,0.00009381771087646484],[43,123,0.0001399517059326172],[43,124,0.00016164779663085938],[43,125,0.00018715858459472656],[43,126,0.00019788742065429688],[43,127,0.0002262592315673828],[43,128,0.000278472900390625],[43,129,0.00022339820861816406],[43,130,0.00023472309112548828],[43,131,0.00041103363037109375],[43,132,0.00025653839111328125],[43,133,0.0006871223449707031],[43,134,0.00037741661071777344],[43,135,0.0005340576171875],[43,136,0.0008406639099121094],[43,137,0.0005478858947753906],[43,138,0.0016698837280273438],[43,139,0.0005393028259277344],[43,140,0.0017242431640625],[43,141,0.004268646240234375],[43,142,0.0110931396484375],[43,143,0.0160675048828125],[43,144,0.043914794921875],[43,145,0.046844482421875],[43,146,0.026641845703125],[43,147,0.0064697265625],[43,148,0.003265380859375],[43,149,0.0015096664428710938],[43,150,0.0023345947265625],[43,151,0.0019216537475585938],[43,152,0.001552581787109375],[43,153,0.0016374588012695312],[44,44,0.009033203125],[44,45,0.9892578125],[44,46,0.64404296875],[44,47,0.080322265625],[44,48,0.0110931396484375],[44,49,0.043731689453125],[44,50,0.0019330978393554688],[44,51,0.001636505126953125],[44,52,0.0023651123046875],[44,53,0.001506805419921875],[44,54,0.0005502700805664062],[44,55,0.0005249977111816406],[44,56,0.00495147705078125],[44,57,0.00234222412109375],[44,58,0.06787109375],[44,59,0.0016717910766601562],[44,60,0.0068817138671875],[44,61,0.196533203125],[44,62,0.00934600830078125],[44,63,0.01617431640625],[44,64,0.0035228729248046875],[44,65,0.0008974075317382812],[44,66,0.0173187255859375],[44,67,0.00043511390686035156],[44,68,0.0025920867919921875],[44,69,0.00023293495178222656],[44,70,0.0002930164337158203],[44,71,0.0002613067626953125],[44,72,0.00027108192443847656],[44,73,0.0004582405090332031],[44,74,0.00039196014404296875],[44,75,0.00029850006103515625],[44,76,0.00046896934509277344],[44,77,0.0002617835998535156],[44,78,0.00032520294189453125],[44,79,0.00035881996154785156],[44,80,0.0001552104949951172],[44,81,0.00026869773864746094],[44,82,0.00011211633682250977],[44,83,0.00015783309936523438],[44,84,0.0003139972686767578],[44,85,0.0005407333374023438],[44,86,0.0003867149353027344],[44,87,0.00009208917617797852],[44,88,0.00019037723541259766],[44,89,0.00011241436004638672],[44,90,0.0001188516616821289],[44,91,0.00012046098709106445],[44,92,0.00009047985076904297],[44,93,0.00026702880859375],[44,94,0.0002231597900390625],[44,95,0.00014925003051757812],[44,96,0.00011479854583740234],[44,97,0.00011235475540161133],[44,98,0.00010311603546142578],[44,99,0.00009268522262573242],[44,100,0.00007975101470947266],[44,101,0.00008350610733032227],[44,102,0.00012636184692382812],[44,103,0.0001323223114013672],[44,104,0.00007641315460205078],[44,105,0.00008589029312133789],[44,106,0.0001214146614074707],[44,107,0.00009554624557495117],[44,108,0.00007069110870361328],[44,109,0.00006890296936035156],[44,110,0.00007396936416625977],[44,111,0.00007468461990356445],[44,112,0.000047206878662109375],[44,113,0.00005328655242919922],[44,114,0.00004380941390991211],[44,115,0.000050067901611328125],[44,116,0.000052988529205322266],[44,117,0.00006949901580810547],[44,118,0.0000934600830078125],[44,119,0.0001226663589477539],[44,120,0.00011026859283447266],[44,121,0.00012362003326416016],[44,122,0.00011944770812988281],[44,123,0.0001703500747680664],[44,124,0.00022673606872558594],[44,125,0.00021839141845703125],[44,126,0.0002849102020263672],[44,127,0.00026345252990722656],[44,128,0.0003669261932373047],[44,129,0.0002655982971191406],[44,130,0.000347137451171875],[44,131,0.0007038116455078125],[44,132,0.00038886070251464844],[44,133,0.00098419189453125],[44,134,0.0005712509155273438],[44,135,0.0006756782531738281],[44,136,0.001361846923828125],[44,137,0.000782012939453125],[44,138,0.0032176971435546875],[44,139,0.0008478164672851562],[44,140,0.004398345947265625],[44,141,0.00597381591796875],[44,142,0.043487548828125],[44,143,0.0748291015625],[44,144,0.2086181640625],[44,145,0.1202392578125],[44,146,0.06402587890625],[44,147,0.01151275634765625],[44,148,0.005268096923828125],[44,149,0.002071380615234375],[44,150,0.0027446746826171875],[44,151,0.00241851806640625],[44,152,0.0018377304077148438],[44,153,0.0018310546875],[45,45,0.1273193359375],[45,46,0.98828125],[45,47,0.6640625],[45,48,0.04473876953125],[45,49,0.265869140625],[45,50,0.007740020751953125],[45,51,0.004276275634765625],[45,52,0.00257110595703125],[45,53,0.0009274482727050781],[45,54,0.0003876686096191406],[45,55,0.0015430450439453125],[45,56,0.01690673828125],[45,57,0.009246826171875],[45,58,0.482421875],[45,59,0.004062652587890625],[45,60,0.00937652587890625],[45,61,0.423095703125],[45,62,0.0035305023193359375],[45,63,0.003498077392578125],[45,64,0.001049041748046875],[45,65,0.0003561973571777344],[45,66,0.06396484375],[45,67,0.00047206878662109375],[45,68,0.00550079345703125],[45,69,0.00016450881958007812],[45,70,0.00007671117782592773],[45,71,0.00008690357208251953],[45,72,0.00006788969039916992],[45,73,0.00034046173095703125],[45,74,0.0004162788391113281],[45,75,0.0004241466522216797],[45,76,0.0004401206970214844],[45,77,0.0002574920654296875],[45,78,0.00023615360260009766],[45,79,0.0002989768981933594],[45,80,0.0001671314239501953],[45,81,0.0002532005310058594],[45,82,0.00009912252426147461],[45,83,0.00012612342834472656],[45,84,0.00025153160095214844],[45,85,0.00031876564025878906],[45,86,0.00016260147094726562],[45,87,0.00006264448165893555],[45,88,0.00008195638656616211],[45,89,0.00006920099258422852],[45,90,0.00007164478302001953],[45,91,0.0001016855239868164],[45,92,0.00007593631744384766],[45,93,0.000274658203125],[45,94,0.00021457672119140625],[45,95,0.0001367330551147461],[45,96,0.00010508298873901367],[45,97,0.0001327991485595703],[45,98,0.00009512901306152344],[45,99,0.00009685754776000977],[45,100,0.00008112192153930664],[45,101,0.00008744001388549805],[45,102,0.0001246929168701172],[45,103,0.0001170039176940918],[45,104,0.00006729364395141602],[45,105,0.00007915496826171875],[45,106,0.0001170039176940918],[45,107,0.00009500980377197266],[45,108,0.000064849853515625],[45,109,0.0000635385513305664],[45,110,0.00006681680679321289],[45,111,0.000057756900787353516],[45,112,0.000038623809814453125],[45,113,0.00004082918167114258],[45,114,0.0000368952751159668],[45,115,0.00004202127456665039],[45,116,0.000057220458984375],[45,117,0.00006031990051269531],[45,118,0.00008696317672729492],[45,119,0.00011259317398071289],[45,120,0.0001188516616821289],[45,121,0.00012636184692382812],[45,122,0.0001373291015625],[45,123,0.0001779794692993164],[45,124,0.00030231475830078125],[45,125,0.00023889541625976562],[45,126,0.0003695487976074219],[45,127,0.0003476142883300781],[45,128,0.0005092620849609375],[45,129,0.00041294097900390625],[45,130,0.0004703998565673828],[45,131,0.0008993148803710938],[45,132,0.00032210350036621094],[45,133,0.00045299530029296875],[45,134,0.00014710426330566406],[45,135,0.00009626150131225586],[45,136,0.0002130270004272461],[45,137,0.00012302398681640625],[45,138,0.0015554428100585938],[45,139,0.0005059242248535156],[45,140,0.002685546875],[45,141,0.004100799560546875],[45,142,0.0279083251953125],[45,143,0.073974609375],[45,144,0.1300048828125],[45,145,0.08575439453125],[45,146,0.0229644775390625],[45,147,0.007175445556640625],[45,148,0.00386810302734375],[45,149,0.0010662078857421875],[45,150,0.001979827880859375],[45,151,0.0016355514526367188],[45,152,0.0015726089477539062],[45,153,0.0017976760864257812],[46,46,0.1898193359375],[46,47,0.99267578125],[46,48,0.92041015625],[46,49,0.841796875],[46,50,0.026885986328125],[46,51,0.00141143798828125],[46,52,0.00018477439880371094],[46,53,0.00006407499313354492],[46,54,0.00010019540786743164],[46,55,0.0024089813232421875],[46,56,0.03668212890625],[46,57,0.019256591796875],[46,58,0.5458984375],[46,59,0.005390167236328125],[46,60,0.004291534423828125],[46,61,0.057037353515625],[46,62,0.0007534027099609375],[46,63,0.0015325546264648438],[46,64,0.0007853507995605469],[46,65,0.00025534629821777344],[46,66,0.008026123046875],[46,67,0.0003235340118408203],[46,68,0.00519561767578125],[46,69,0.0003104209899902344],[46,70,0.00011962652206420898],[46,71,0.000052988529205322266],[46,72,0.000015497207641601562],[46,73,0.00018477439880371094],[46,74,0.00026702880859375],[46,75,0.0002892017364501953],[46,76,0.00023508071899414062],[46,77,0.0000851750373840332],[46,78,0.000029921531677246094],[46,79,0.00011932849884033203],[46,80,0.00005918741226196289],[46,81,0.00016558170318603516],[46,82,0.000057637691497802734],[46,83,0.00012826919555664062],[46,84,0.00014734268188476562],[46,85,0.00021696090698242188],[46,86,0.00007641315460205078],[46,87,0.000016033649444580078],[46,88,0.000021159648895263672],[46,89,0.00003153085708618164],[46,90,0.00009775161743164062],[46,91,0.00007349252700805664],[46,92,0.00012922286987304688],[46,93,0.00048732757568359375],[46,94,0.00017690658569335938],[46,95,0.00018835067749023438],[46,96,0.00012135505676269531],[46,97,0.00015234947204589844],[46,98,0.0000858306884765625],[46,99,0.0000832676887512207],[46,100,0.00007003545761108398],[46,101,0.00006765127182006836],[46,102,0.0000928640365600586],[46,103,0.00007426738739013672],[46,104,0.000048279762268066406],[46,105,0.00005441904067993164],[46,106,0.00008386373519897461],[46,107,0.00007355213165283203],[46,108,0.00005513429641723633],[46,109,0.00004202127456665039],[46,110,0.00004786252975463867],[46,111,0.00004363059997558594],[46,112,0.00002777576446533203],[46,113,0.00002950429916381836],[46,114,0.000025510787963867188],[46,115,0.00002962350845336914],[46,116,0.00004208087921142578],[46,117,0.000043392181396484375],[46,118,0.00005608797073364258],[46,119,0.0000750422477722168],[46,120,0.00008207559585571289],[46,121,0.00010901689529418945],[46,122,0.0001195669174194336],[46,123,0.00016939640045166016],[46,124,0.0003154277801513672],[46,125,0.0002124309539794922],[46,126,0.00042057037353515625],[46,127,0.00040984153747558594],[46,128,0.0005617141723632812],[46,129,0.000469207763671875],[46,130,0.00046753883361816406],[46,131,0.0007157325744628906],[46,132,0.00006818771362304688],[46,133,0.00011807680130004883],[46,134,0.000031828880310058594],[46,135,0.00005644559860229492],[46,136,0.000059604644775390625],[46,137,0.00009679794311523438],[46,138,0.00025773048400878906],[46,139,0.0003228187561035156],[46,140,0.001026153564453125],[46,141,0.002960205078125],[46,142,0.007106781005859375],[46,143,0.0183868408203125],[46,144,0.0369873046875],[46,145,0.09832763671875],[46,146,0.0139007568359375],[46,147,0.00476837158203125],[46,148,0.0029048919677734375],[46,149,0.0014028549194335938],[46,150,0.0027065277099609375],[46,151,0.0016231536865234375],[46,152,0.0017652511596679688],[46,153,0.00167083740234375],[47,47,0.00801849365234375],[47,48,0.9931640625],[47,49,0.394287109375],[47,50,0.0022563934326171875],[47,51,0.0004127025604248047],[47,52,0.0002665519714355469],[47,53,0.0000407099723815918],[47,54,0.00010144710540771484],[47,55,0.0016021728515625],[47,56,0.0030879974365234375],[47,57,0.9619140625],[47,58,0.96240234375],[47,59,0.0498046875],[47,60,0.0083465576171875],[47,61,0.07611083984375],[47,62,0.0004608631134033203],[47,63,0.0006208419799804688],[47,64,0.00023436546325683594],[47,65,0.00005078315734863281],[47,66,0.0030155181884765625],[47,67,0.00010913610458374023],[47,68,0.00783538818359375],[47,69,0.0006518363952636719],[47,70,0.00006192922592163086],[47,71,0.00008046627044677734],[47,72,0.0000209808349609375],[47,73,0.00005614757537841797],[47,74,0.00014209747314453125],[47,75,0.0004124641418457031],[47,76,0.00033783912658691406],[47,77,0.00008100271224975586],[47,78,0.00004738569259643555],[47,79,0.00008159875869750977],[47,80,0.00019741058349609375],[47,81,0.0003383159637451172],[47,82,0.00014662742614746094],[47,83,0.0003428459167480469],[47,84,0.0002460479736328125],[47,85,0.00013184547424316406],[47,86,0.00006282329559326172],[47,87,0.00002753734588623047],[47,88,0.000012099742889404297],[47,89,0.00003075599670410156],[47,90,0.0000027418136596679688],[47,91,0.000008106231689453125],[47,92,0.000036656856536865234],[47,93,0.000028848648071289062],[47,94,0.00008153915405273438],[47,95,0.00016510486602783203],[47,96,0.00012445449829101562],[47,97,0.0001506805419921875],[47,98,0.00008344650268554688],[47,99,0.00007957220077514648],[47,100,0.00006562471389770508],[47,101,0.00005429983139038086],[47,102,0.00007730722427368164],[47,103,0.00005990266799926758],[47,104,0.00003814697265625],[47,105,0.0000426173210144043],[47,106,0.000057637691497802734],[47,107,0.00005620718002319336],[47,108,0.00003814697265625],[47,109,0.000026285648345947266],[47,110,0.0000336766242980957],[47,111,0.00003522634506225586],[47,112,0.000021755695343017578],[47,113,0.000019490718841552734],[47,114,0.00002002716064453125],[47,115,0.00002193450927734375],[47,116,0.000042378902435302734],[47,117,0.0000400543212890625],[47,118,0.00006240606307983398],[47,119,0.00007414817810058594],[47,120,0.00009250640869140625],[47,121,0.00011748075485229492],[47,122,0.00020051002502441406],[47,123,0.00025534629821777344],[47,124,0.0003120899200439453],[47,125,0.00022864341735839844],[47,126,0.0002627372741699219],[47,127,0.00043702125549316406],[47,128,0.0005831718444824219],[47,129,0.0003342628479003906],[47,130,0.00015425682067871094],[47,131,0.00013136863708496094],[47,132,0.00001329183578491211],[47,133,0.000036776065826416016],[47,134,0.000016510486602783203],[47,135,0.00002586841583251953],[47,136,0.00006109476089477539],[47,137,0.00004303455352783203],[47,138,0.0002262592315673828],[47,139,0.0003287792205810547],[47,140,0.0012636184692382812],[47,141,0.003231048583984375],[47,142,0.00514984130859375],[47,143,0.00811767578125],[47,144,0.0107574462890625],[47,145,0.020843505859375],[47,146,0.004364013671875],[47,147,0.0020771026611328125],[47,148,0.0021648406982421875],[47,149,0.000774383544921875],[47,150,0.0019397735595703125],[47,151,0.0017147064208984375],[47,152,0.0016651153564453125],[47,153,0.001468658447265625],[48,48,0.0015611648559570312],[48,49,0.9921875],[48,50,0.8984375],[48,51,0.0020599365234375],[48,52,0.00034046173095703125],[48,53,0.00007396936416625977],[48,54,0.0004718303680419922],[48,55,0.93359375],[48,56,0.88525390625],[48,57,0.98779296875],[48,58,0.66796875],[48,59,0.001201629638671875],[48,60,0.0010242462158203125],[48,61,0.0008435249328613281],[48,62,0.0000997781753540039],[48,63,0.0008268356323242188],[48,64,0.0002574920654296875],[48,65,0.000029742717742919922],[48,66,0.00019598007202148438],[48,67,0.00004476308822631836],[48,68,0.0017423629760742188],[48,69,0.00238037109375],[48,70,0.00040984153747558594],[48,71,0.004833221435546875],[48,72,0.0002892017364501953],[48,73,0.00009202957153320312],[48,74,0.0005750656127929688],[48,75,0.0001838207244873047],[48,76,0.000054955482482910156],[48,77,0.00002777576446533203],[48,78,0.000040590763092041016],[48,79,0.000036656856536865234],[48,80,0.000022530555725097656],[48,81,0.00011736154556274414],[48,82,0.000021219253540039062],[48,83,0.00018918514251708984],[48,84,0.00012129545211791992],[48,85,0.00007206201553344727],[48,86,0.00010609626770019531],[48,87,0.000005781650543212891],[48,88,0.000010967254638671875],[48,89,0.000018596649169921875],[48,90,0.0000026226043701171875],[48,91,0.0000034570693969726562],[48,92,0.0006594657897949219],[48,93,0.000010013580322265625],[48,94,0.000011742115020751953],[48,95,0.000037610530853271484],[48,96,0.00005835294723510742],[48,97,0.000522613525390625],[48,98,0.00004279613494873047],[48,99,0.000045239925384521484],[48,100,0.000046253204345703125],[48,101,0.000031113624572753906],[48,102,0.00005710124969482422],[48,103,0.000038504600524902344],[48,104,0.00002759695053100586],[48,105,0.00003129243850708008],[48,106,0.00004124641418457031],[48,107,0.000032007694244384766],[48,108,0.00002294778823852539],[48,109,0.000016927719116210938],[48,110,0.000022530555725097656],[48,111,0.000022113323211669922],[48,112,0.000012159347534179688],[48,113,0.000013470649719238281],[48,114,0.000014066696166992188],[48,115,0.000015079975128173828],[48,116,0.00002682209014892578],[48,117,0.00003135204315185547],[48,118,0.00004684925079345703],[48,119,0.00006407499313354492],[48,120,0.00006204843521118164],[48,121,0.00009065866470336914],[48,122,0.00007575750350952148],[48,123,0.00005942583084106445],[48,124,0.00010162591934204102],[48,125,0.00006765127182006836],[48,126,0.00011664628982543945],[48,127,0.00016045570373535156],[48,128,0.0006632804870605469],[48,129,0.00038504600524902344],[48,130,0.00026297569274902344],[48,131,0.00020229816436767578],[48,132,0.000010907649993896484],[48,133,0.00014257431030273438],[48,134,0.000023305416107177734],[48,135,0.00009131431579589844],[48,136,0.00032806396484375],[48,137,0.00011116266250610352],[48,138,0.00033092498779296875],[48,139,0.0001811981201171875],[48,140,0.0005064010620117188],[48,141,0.0012769699096679688],[48,142,0.0034885406494140625],[48,143,0.0022449493408203125],[48,144,0.002536773681640625],[48,145,0.01265716552734375],[48,146,0.00243377685546875],[48,147,0.0012063980102539062],[48,148,0.0034236907958984375],[48,149,0.0004405975341796875],[48,150,0.0013675689697265625],[48,151,0.0008058547973632812],[48,152,0.0015573501586914062],[48,153,0.0013408660888671875],[49,49,0.00018262863159179688],[49,50,0.99560546875],[49,51,0.96826171875],[49,52,0.00168609619140625],[49,53,0.0003070831298828125],[49,54,0.00115966796875],[49,55,0.826171875],[49,56,0.9853515625],[49,57,0.6728515625],[49,58,0.3408203125],[49,59,0.0003781318664550781],[49,60,0.00027942657470703125],[49,61,0.000675201416015625],[49,62,0.0002980232238769531],[49,63,0.0014982223510742188],[49,64,0.00033545494079589844],[49,65,0.0000883340835571289],[49,66,0.0005903244018554688],[49,67,0.000036656856536865234],[49,68,0.2052001953125],[49,69,0.00005358457565307617],[49,70,0.0010061264038085938],[49,71,0.0001544952392578125],[49,72,0.00006788969039916992],[49,73,0.0000623464584350586],[49,74,0.00011795759201049805],[49,75,0.00007855892181396484],[49,76,0.00007450580596923828],[49,77,0.000008285045623779297],[49,78,0.00016379356384277344],[49,79,0.0002372264862060547],[49,80,0.00005608797073364258],[49,81,0.0001964569091796875],[49,82,0.00005751848220825195],[49,83,0.0000864267349243164],[49,84,0.0001316070556640625],[49,85,0.00009870529174804688],[49,86,0.000050187110900878906],[49,87,0.00003784894943237305],[49,88,0.00002276897430419922],[49,89,0.00001043081283569336],[49,90,0.000004112720489501953],[49,91,0.000005364418029785156],[49,92,0.000009000301361083984],[49,93,0.0000064373016357421875],[49,94,0.000009179115295410156],[49,95,0.0000591278076171875],[49,96,0.00005793571472167969],[49,97,0.00003349781036376953],[49,98,0.000023305416107177734],[49,99,0.00008112192153930664],[49,100,0.00009232759475708008],[49,101,0.00008380413055419922],[49,102,0.00010967254638671875],[49,103,0.000052988529205322266],[49,104,0.00003719329833984375],[49,105,0.000049233436584472656],[49,106,0.00005030632019042969],[49,107,0.00003069639205932617],[49,108,0.00003230571746826172],[49,109,0.000020742416381835938],[49,110,0.00002664327621459961],[49,111,0.000026285648345947266],[49,112,0.000017523765563964844],[49,113,0.00002294778823852539],[49,114,0.000046253204345703125],[49,115,0.0000470280647277832],[49,116,0.00010901689529418945],[49,117,0.0000845789909362793],[49,118,0.00017499923706054688],[49,119,0.00026607513427734375],[49,120,0.00019550323486328125],[49,121,0.00017595291137695312],[49,122,0.000022590160369873047],[49,123,0.00001531839370727539],[49,124,0.00004076957702636719],[49,125,0.000024199485778808594],[49,126,0.00007063150405883789],[49,127,0.00015473365783691406],[49,128,0.00048160552978515625],[49,129,0.00026488304138183594],[49,130,0.00007528066635131836],[49,131,0.00006836652755737305],[49,132,0.0000029802322387695312],[49,133,0.0000133514404296875],[49,134,0.000008463859558105469],[49,135,0.000011324882507324219],[49,136,0.00012993812561035156],[49,137,0.000027179718017578125],[49,138,0.00023853778839111328],[49,139,0.00025391578674316406],[49,140,0.0005335807800292969],[49,141,0.002803802490234375],[49,142,0.002864837646484375],[49,143,0.006862640380859375],[49,144,0.036163330078125],[49,145,0.498291015625],[49,146,0.01629638671875],[49,147,0.0035800933837890625],[49,148,0.01275634765625],[49,149,0.0006055831909179688],[49,150,0.0021038055419921875],[49,151,0.0017595291137695312],[49,152,0.002227783203125],[49,153,0.0028209686279296875],[50,50,0.00005447864532470703],[50,51,0.98876953125],[50,52,0.09326171875],[50,53,0.0018434524536132812],[50,54,0.525390625],[50,55,0.99072265625],[50,56,0.75634765625],[50,57,0.001018524169921875],[50,58,0.0003514289855957031],[50,59,0.00010496377944946289],[50,60,0.00005424022674560547],[50,61,0.00011640787124633789],[50,62,0.00012129545211791992],[50,63,0.00042247772216796875],[50,64,0.00017499923706054688],[50,65,0.00007104873657226562],[50,66,0.00004106760025024414],[50,67,0.000006496906280517578],[50,68,0.00031948089599609375],[50,69,0.000033855438232421875],[50,70,0.0003044605255126953],[50,71,0.0024566650390625],[50,72,0.0003292560577392578],[50,73,0.0012331008911132812],[50,74,0.00004273653030395508],[50,75,0.0000635385513305664],[50,76,0.0006775856018066406],[50,77,0.00006264448165893555],[50,78,0.0005035400390625],[50,79,0.0005669593811035156],[50,80,0.000025928020477294922],[50,81,0.00022399425506591797],[50,82,0.00003212690353393555],[50,83,0.000031948089599609375],[50,84,0.00013875961303710938],[50,85,0.00013077259063720703],[50,86,0.0001863241195678711],[50,87,0.0000095367431640625],[50,88,0.0000661015510559082],[50,89,0.000007212162017822266],[50,90,0.00002187490463256836],[50,91,0.00001728534698486328],[50,92,0.00019288063049316406],[50,93,0.000009953975677490234],[50,94,0.00001823902130126953],[50,95,0.000013709068298339844],[50,96,0.00009679794311523438],[50,97,0.00002384185791015625],[50,98,0.000027835369110107422],[50,99,0.00006788969039916992],[50,100,0.00007742643356323242],[50,101,0.00006079673767089844],[50,102,0.0001246929168701172],[50,103,0.00008016824722290039],[50,104,0.00006109476089477539],[50,105,0.000048995018005371094],[50,106,0.000038623809814453125],[50,107,0.000028431415557861328],[50,108,0.000022113323211669922],[50,109,0.000025928020477294922],[50,110,0.00002777576446533203],[50,111,0.000030100345611572266],[50,112,0.00002187490463256836],[50,113,0.000018715858459472656],[50,114,0.00002568960189819336],[50,115,0.00003218650817871094],[50,116,0.00010496377944946289],[50,117,0.0000476837158203125],[50,118,0.00010228157043457031],[50,119,0.0001423358917236328],[50,120,0.00007450580596923828],[50,121,0.00007206201553344727],[50,122,0.0000133514404296875],[50,123,0.000018417835235595703],[50,124,0.000042438507080078125],[50,125,0.000016450881958007812],[50,126,0.00010770559310913086],[50,127,0.00014829635620117188],[50,128,0.00045680999755859375],[50,129,0.0003178119659423828],[50,130,0.0001289844512939453],[50,131,0.00006490945816040039],[50,132,0.000005602836608886719],[50,133,0.000024080276489257812],[50,134,0.00003314018249511719],[50,135,0.00001806020736694336],[50,136,0.00101470947265625],[50,137,0.0000749826431274414],[50,138,0.00035643577575683594],[50,139,0.00007140636444091797],[50,140,0.00041747093200683594],[50,141,0.0008459091186523438],[50,142,0.0010709762573242188],[50,143,0.0005307197570800781],[50,144,0.001262664794921875],[50,145,0.0184478759765625],[50,146,0.0016269683837890625],[50,147,0.0005936622619628906],[50,148,0.00321197509765625],[50,149,0.00024056434631347656],[50,150,0.0018682479858398438],[50,151,0.0006966590881347656],[50,152,0.00247955322265625],[50,153,0.00301361083984375],[51,51,0.000029146671295166016],[51,52,0.99853515625],[51,53,0.9853515625],[51,54,0.98291015625],[51,55,0.779296875],[51,56,0.9248046875],[51,57,0.0005116462707519531],[51,58,0.00028514862060546875],[51,59,0.00010293722152709961],[51,60,0.00011831521987915039],[51,61,0.00022745132446289062],[51,62,0.0007719993591308594],[51,63,0.0011510848999023438],[51,64,0.0005631446838378906],[51,65,0.00046896934509277344],[51,66,0.00011199712753295898],[51,67,0.00002193450927734375],[51,68,0.0013895034790039062],[51,69,0.00005501508712768555],[51,70,0.043212890625],[51,71,0.000514984130859375],[51,72,0.0035610198974609375],[51,73,0.0005779266357421875],[51,74,0.000018835067749023438],[51,75,0.0000813603401184082],[51,76,0.007442474365234375],[51,77,0.0007119178771972656],[51,78,0.4921875],[51,79,0.5908203125],[51,80,0.0013885498046875],[51,81,0.048187255859375],[51,82,0.00019490718841552734],[51,83,0.00014710426330566406],[51,84,0.00004839897155761719],[51,85,0.00002962350845336914],[51,86,0.000030517578125],[51,87,0.000041961669921875],[51,88,0.00006729364395141602],[51,89,0.000009953975677490234],[51,90,0.000012993812561035156],[51,91,0.000007987022399902344],[51,92,0.000007808208465576172],[51,93,0.000006735324859619141],[51,94,0.00001436471939086914],[51,95,0.00001055002212524414],[51,96,0.00005424022674560547],[51,97,0.000009775161743164062],[51,98,0.000002205371856689453],[51,99,0.000004291534423828125],[51,100,0.000004291534423828125],[51,101,0.00001823902130126953],[51,102,0.00010204315185546875],[51,103,0.00008910894393920898],[51,104,0.00008511543273925781],[51,105,0.00004017353057861328],[51,106,0.000024557113647460938],[51,107,0.000007987022399902344],[51,108,0.00001233816146850586],[51,109,0.000008285045623779297],[51,110,0.00002390146255493164],[51,111,0.00003129243850708008],[51,112,0.000029206275939941406],[51,113,0.000009238719940185547],[51,114,0.000005900859832763672],[51,115,0.00001245737075805664],[51,116,0.000024139881134033203],[51,117,0.000027894973754882812],[51,118,0.0000527501106262207],[51,119,0.00016045570373535156],[51,120,0.000009834766387939453],[51,121,0.000011980533599853516],[51,122,0.00001811981201171875],[51,123,0.0002086162567138672],[51,124,0.0005044937133789062],[51,125,0.00005650520324707031],[51,126,0.00008445978164672852],[51,127,0.00005078315734863281],[51,128,0.00008851289749145508],[51,129,0.00012969970703125],[51,130,0.00004202127456665039],[51,131,0.00003707408905029297],[51,132,0.000009238719940185547],[51,133,0.000021398067474365234],[51,134,0.000050902366638183594],[51,135,0.000015079975128173828],[51,136,0.0006251335144042969],[51,137,0.00003743171691894531],[51,138,0.00022983551025390625],[51,139,0.0002543926239013672],[51,140,0.0003502368927001953],[51,141,0.0011043548583984375],[51,142,0.0010309219360351562],[51,143,0.0014848709106445312],[51,144,0.0059356689453125],[51,145,0.354248046875],[51,146,0.01459503173828125],[51,147,0.00417327880859375],[51,148,0.1314697265625],[51,149,0.0018835067749023438],[51,150,0.045196533203125],[51,151,0.001468658447265625],[51,152,0.004772186279296875],[51,153,0.01262664794921875],[52,52,0.000013470649719238281],[52,53,0.99853515625],[52,54,0.2322998046875],[52,55,0.0006814002990722656],[52,56,0.0016336441040039062],[52,57,0.0000629425048828125],[52,58,0.00016379356384277344],[52,59,0.0003952980041503906],[52,60,0.0005660057067871094],[52,61,0.000885009765625],[52,62,0.0007929801940917969],[52,63,0.000885009765625],[52,64,0.0008153915405273438],[52,65,0.0004677772521972656],[52,66,0.0004012584686279297],[52,67,0.00009542703628540039],[52,68,0.0002560615539550781],[52,69,0.000021457672119140625],[52,70,0.00041961669921875],[52,71,0.00012803077697753906],[52,72,0.001163482666015625],[52,73,0.0033721923828125],[52,74,0.00016927719116210938],[52,75,0.0008535385131835938],[52,76,0.190673828125],[52,77,0.0760498046875],[52,78,0.3154296875],[52,79,0.791015625],[52,80,0.005886077880859375],[52,81,0.033172607421875],[52,82,0.00009679794311523438],[52,83,0.00006973743438720703],[52,84,0.0002391338348388672],[52,85,0.0004343986511230469],[52,86,0.00014710426330566406],[52,87,0.00015294551849365234],[52,88,0.00034928321838378906],[52,89,0.000031948089599609375],[52,90,0.00024390220642089844],[52,91,0.00006091594696044922],[52,92,0.0004336833953857422],[52,93,0.0002999305725097656],[52,94,0.00016033649444580078],[52,95,0.00015306472778320312],[52,96,0.00017070770263671875],[52,97,0.000053942203521728516],[52,98,0.000011086463928222656],[52,99,0.000019669532775878906],[52,100,0.000027239322662353516],[52,101,0.00005257129669189453],[52,102,0.0001938343048095703],[52,103,0.00020265579223632812],[52,104,0.00018978118896484375],[52,105,0.000032782554626464844],[52,106,0.00001817941665649414],[52,107,0.00001823902130126953],[52,108,0.00002658367156982422],[52,109,0.000016450881958007812],[52,110,0.000029921531677246094],[52,111,0.000032842159271240234],[52,112,0.00002300739288330078],[52,113,0.000011146068572998047],[52,114,0.000009655952453613281],[52,115,0.000023126602172851562],[52,116,0.000023305416107177734],[52,117,0.00004649162292480469],[52,118,0.00009995698928833008],[52,119,0.0003514289855957031],[52,120,0.000009834766387939453],[52,121,0.00003808736801147461],[52,122,0.00007063150405883789],[52,123,0.0045166015625],[52,124,0.0031414031982421875],[52,125,0.0013761520385742188],[52,126,0.0005593299865722656],[52,127,0.0000966787338256836],[52,128,0.0000966191291809082],[52,129,0.00016999244689941406],[52,130,0.00010120868682861328],[52,131,0.00008529424667358398],[52,132,0.0000336766242980957],[52,133,0.00001609325408935547],[52,134,0.00018405914306640625],[52,135,0.000037610530853271484],[52,136,0.001583099365234375],[52,137,0.00005370378494262695],[52,138,0.0005807876586914062],[52,139,0.00031685829162597656],[52,140,0.0011081695556640625],[52,141,0.00229644775390625],[52,142,0.00261688232421875],[52,143,0.0008687973022460938],[52,144,0.0017614364624023438],[52,145,0.041473388671875],[52,146,0.004520416259765625],[52,147,0.0014629364013671875],[52,148,0.0291748046875],[52,149,0.0016269683837890625],[52,150,0.11761474609375],[52,151,0.00318145751953125],[52,152,0.028900146484375],[52,153,0.1463623046875],[53,53,0.0022144317626953125],[53,54,0.9990234375],[53,55,0.0023975372314453125],[53,56,0.0058746337890625],[53,57,0.00009071826934814453],[53,58,0.000011801719665527344],[53,59,0.0001169443130493164],[53,60,0.0001392364501953125],[53,61,0.0007948875427246094],[53,62,0.0010471343994140625],[53,63,0.001190185546875],[53,64,0.0008134841918945312],[53,65,0.0005006790161132812],[53,66,0.00004106760025024414],[53,67,0.000023424625396728516],[53,68,0.00019693374633789062],[53,69,0.00004869699478149414],[53,70,0.008087158203125],[53,71,0.0007481575012207031],[53,72,0.88134765625],[53,73,0.341552734375],[53,74,0.0010051727294921875],[53,75,0.01397705078125],[53,76,0.9462890625],[53,77,0.9130859375],[53,78,0.9404296875],[53,79,0.92724609375],[53,80,0.003551483154296875],[53,81,0.015594482421875],[53,82,0.000033855438232421875],[53,83,0.000025033950805664062],[53,84,0.00024008750915527344],[53,85,0.00023448467254638672],[53,86,0.000054776668548583984],[53,87,0.0001704692840576172],[53,88,0.00006687641143798828],[53,89,0.000009059906005859375],[53,90,0.000055789947509765625],[53,91,0.000005185604095458984],[53,92,0.0000034570693969726562],[53,93,0.000008463859558105469],[53,94,0.000005364418029785156],[53,95,0.000011146068572998047],[53,96,0.000013053417205810547],[53,97,0.00012576580047607422],[53,98,0.000013947486877441406],[53,99,0.0000349879264831543],[53,100,0.00003349781036376953],[53,101,0.000022113323211669922],[53,102,0.00007337331771850586],[53,103,0.0000445246696472168],[53,104,0.00003933906555175781],[53,105,0.0000013113021850585938],[53,106,7.748603820800781e-7],[53,107,8.940696716308594e-7],[53,108,0.0000013113021850585938],[53,109,0.000003039836883544922],[53,110,0.00001800060272216797],[53,111,0.00005060434341430664],[53,112,0.000017404556274414062],[53,113,0.000002205371856689453],[53,114,0.0000020265579223632812],[53,115,0.000009179115295410156],[53,116,0.000022113323211669922],[53,117,0.000034749507904052734],[53,118,0.00008177757263183594],[53,119,0.00022482872009277344],[53,120,0.000005543231964111328],[53,121,0.00001806020736694336],[53,122,0.00012230873107910156],[53,123,0.03399658203125],[53,124,0.1092529296875],[53,125,0.0207366943359375],[53,126,0.0239715576171875],[53,127,0.0002684593200683594],[53,128,0.00005608797073364258],[53,129,0.00003349781036376953],[53,130,0.00001901388168334961],[53,131,0.00043582916259765625],[53,132,0.0003795623779296875],[53,133,0.0000718235969543457],[53,134,0.0003647804260253906],[53,135,0.00002282857894897461],[53,136,0.0006232261657714844],[53,137,0.000024616718292236328],[53,138,0.00009506940841674805],[53,139,0.0004363059997558594],[53,140,0.0013790130615234375],[53,141,0.002658843994140625],[53,142,0.0026035308837890625],[53,143,0.0005679130554199219],[53,144,0.000732421875],[53,145,0.01308441162109375],[53,146,0.002025604248046875],[53,147,0.0007476806640625],[53,148,0.0197601318359375],[53,149,0.00147247314453125],[53,150,0.0869140625],[53,151,0.005832672119140625],[53,152,0.0341796875],[53,153,0.1854248046875],[54,54,0.0010156631469726562],[54,55,0.998046875],[54,56,0.98876953125],[54,57,0.00014781951904296875],[54,58,0.00005900859832763672],[54,59,0.000019431114196777344],[54,60,0.00005161762237548828],[54,61,0.00007045269012451172],[54,62,0.0005064010620117188],[54,63,0.0012311935424804688],[54,64,0.0009322166442871094],[54,65,0.0004634857177734375],[54,66,0.000022351741790771484],[54,67,0.000004351139068603516],[54,68,0.0006251335144042969],[54,69,0.00019848346710205078],[54,70,0.9794921875],[54,71,0.9833984375],[54,72,0.98876953125],[54,73,0.7724609375],[54,74,0.0012979507446289062],[54,75,0.002838134765625],[54,76,0.9443359375],[54,77,0.129150390625],[54,78,0.9267578125],[54,79,0.11151123046875],[54,80,0.0006632804870605469],[54,81,0.0017480850219726562],[54,82,0.00001806020736694336],[54,83,0.000027954578399658203],[54,84,0.0002281665802001953],[54,85,0.00021529197692871094],[54,86,0.00001621246337890625],[54,87,0.00013518333435058594],[54,88,0.000018715858459472656],[54,89,6.556510925292969e-7],[54,90,0.00004607439041137695],[54,91,0.0000013113021850585938],[54,92,0.000004351139068603516],[54,93,0.000015974044799804688],[54,94,0.000013589859008789062],[54,95,0.00009042024612426758],[54,96,0.000010788440704345703],[54,97,0.0003790855407714844],[54,98,0.000022292137145996094],[54,99,0.000029027462005615234],[54,100,0.000018596649169921875],[54,101,0.000016570091247558594],[54,102,0.0001575946807861328],[54,103,0.00006526708602905273],[54,104,0.00002753734588623047],[54,105,0.0000013113021850585938],[54,106,0.0000010728836059570312],[54,107,0.0000014901161193847656],[54,108,0.0000016093254089355469],[54,109,0.0000017881393432617188],[54,110,0.0000030994415283203125],[54,111,0.000037729740142822266],[54,112,0.000002205371856689453],[54,113,7.748603820800781e-7],[54,114,7.748603820800781e-7],[54,115,0.000007867813110351562],[54,116,0.000016868114471435547],[54,117,0.00003921985626220703],[54,118,0.00008130073547363281],[54,119,0.00011074542999267578],[54,120,0.000011146068572998047],[54,121,0.000012695789337158203],[54,122,0.00006401538848876953],[54,123,0.0010747909545898438],[54,124,0.26904296875],[54,125,0.00150299072265625],[54,126,0.034271240234375],[54,127,0.000217437744140625],[54,128,0.00008469820022583008],[54,129,0.00002086162567138672],[54,130,0.00009042024612426758],[54,131,0.00890350341796875],[54,132,0.04510498046875],[54,133,0.0018758773803710938],[54,134,0.0369873046875],[54,135,0.000028967857360839844],[54,136,0.0007915496826171875],[54,137,0.0000037550926208496094],[54,138,0.00005161762237548828],[54,139,0.00039577484130859375],[54,140,0.001895904541015625],[54,141,0.0018510818481445312],[54,142,0.0023632049560546875],[54,143,0.0002903938293457031],[54,144,0.0005216598510742188],[54,145,0.00942230224609375],[54,146,0.0009436607360839844],[54,147,0.0002665519714355469],[54,148,0.0095672607421875],[54,149,0.00042891502380371094],[54,150,0.00878143310546875],[54,151,0.001277923583984375],[54,152,0.007022857666015625],[54,153,0.01116943359375],[55,55,0.0013256072998046875],[55,56,0.99755859375],[55,57,0.99169921875],[55,58,0.00018310546875],[55,59,0.00007975101470947266],[55,60,0.00002092123031616211],[55,61,0.00005823373794555664],[55,62,0.0003123283386230469],[55,63,0.0017070770263671875],[55,64,0.0007772445678710938],[55,65,0.000396728515625],[55,66,0.000024020671844482422],[55,67,0.000016033649444580078],[55,68,0.0001137852668762207],[55,69,0.046844482421875],[55,70,0.91259765625],[55,71,0.9931640625],[55,72,0.262939453125],[55,73,0.0307464599609375],[55,74,0.00012946128845214844],[55,75,0.00021326541900634766],[55,76,0.00455474853515625],[55,77,0.00006288290023803711],[55,78,0.0005216598510742188],[55,79,0.00014972686767578125],[55,80,0.000012636184692382812],[55,81,0.00005882978439331055],[55,82,0.000016927719116210938],[55,83,0.0000133514404296875],[55,84,0.00004190206527709961],[55,85,0.00005048513412475586],[55,86,0.000054776668548583984],[55,87,0.000005602836608886719],[55,88,0.0000045299530029296875],[55,89,5.960464477539063e-8],[55,90,0.0000017881393432617188],[55,91,4.172325134277344e-7],[55,92,4.76837158203125e-7],[55,93,0.0000018477439880371094],[55,94,0.000003516674041748047],[55,95,0.000008761882781982422],[55,96,0.000003516674041748047],[55,97,0.000006139278411865234],[55,98,0.0000016093254089355469],[55,99,0.000001430511474609375],[55,100,0.000008761882781982422],[55,101,0.00001519918441772461],[55,102,0.00004786252975463867],[55,103,0.0000247955322265625],[55,104,0.000027179718017578125],[55,105,0.000011146068572998047],[55,106,0.00003075599670410156],[55,107,0.000009000301361083984],[55,108,0.0000033974647521972656],[55,109,0.000005245208740234375],[55,110,0.000002682209014892578],[55,111,0.000060498714447021484],[55,112,0.000010848045349121094],[55,113,0.000007450580596923828],[55,114,0.000005066394805908203],[55,115,0.0000029802322387695312],[55,116,0.000012874603271484375],[55,117,0.000017821788787841797],[55,118,0.00001919269561767578],[55,119,0.00006812810897827148],[55,120,0.00001811981201171875],[55,121,0.00001341104507446289],[55,122,0.000004351139068603516],[55,123,0.000004887580871582031],[55,124,0.00003629922866821289],[55,125,0.0000040531158447265625],[55,126,0.00003629922866821289],[55,127,0.000015676021575927734],[55,128,0.0000073909759521484375],[55,129,0.000008821487426757812],[55,130,0.000011026859283447266],[55,131,0.0012302398681640625],[55,132,0.000019311904907226562],[55,133,0.0002579689025878906],[55,134,0.000027000904083251953],[55,135,0.000006318092346191406],[55,136,0.0000960230827331543],[55,137,0.000023305416107177734],[55,138,0.000054836273193359375],[55,139,0.0002923011779785156],[55,140,0.0006041526794433594],[55,141,0.0011434555053710938],[55,142,0.0011615753173828125],[55,143,0.00022077560424804688],[55,144,0.00035452842712402344],[55,145,0.00347137451171875],[55,146,0.00029015541076660156],[55,147,0.000058710575103759766],[55,148,0.00083160400390625],[55,149,0.00019657611846923828],[55,150,0.0002760887145996094],[55,151,0.00027179718017578125],[55,152,0.0011272430419921875],[55,153,0.000774383544921875],[56,56,0.00003349781036376953],[56,57,0.998046875],[56,58,0.8173828125],[56,59,0.0004222393035888672],[56,60,0.00009047985076904297],[56,61,0.00020575523376464844],[56,62,0.00020360946655273438],[56,63,0.0012884140014648438],[56,64,0.00023245811462402344],[56,65,0.0001621246337890625],[56,66,0.002887725830078125],[56,67,0.00004673004150390625],[56,68,0.998046875],[56,69,0.94091796875],[56,70,0.99658203125],[56,71,0.52783203125],[56,72,0.00025582313537597656],[56,73,0.00009202957153320312],[56,74,0.000012755393981933594],[56,75,0.00002491474151611328],[56,76,0.00005930662155151367],[56,77,0.00003612041473388672],[56,78,0.006000518798828125],[56,79,0.0006804466247558594],[56,80,0.00012201070785522461],[56,81,0.0003528594970703125],[56,82,0.00009161233901977539],[56,83,0.00007289648056030273],[56,84,0.00007337331771850586],[56,85,0.00006842613220214844],[56,86,0.000033736228942871094],[56,87,0.000015020370483398438],[56,88,0.00005042552947998047],[56,89,0.0000020265579223632812],[56,90,0.000008881092071533203],[56,91,0.0000010132789611816406],[56,92,4.172325134277344e-7],[56,93,0.000004291534423828125],[56,94,0.0000028014183044433594],[56,95,0.0000045299530029296875],[56,96,0.000007450580596923828],[56,97,0.000007510185241699219],[56,98,0.0000024437904357910156],[56,99,0.000003814697265625],[56,100,0.000004887580871582031],[56,101,0.000010251998901367188],[56,102,0.00004202127456665039],[56,103,0.00002664327621459961],[56,104,0.00002205371856689453],[56,105,0.000019609928131103516],[56,106,0.00002396106719970703],[56,107,0.000009000301361083984],[56,108,0.0000024437904357910156],[56,109,0.00000947713851928711],[56,110,8.344650268554688e-7],[56,111,0.00003993511199951172],[56,112,0.000002384185791015625],[56,113,2.980232238769531e-7],[56,114,5.364418029785156e-7],[56,115,0.0000036954879760742188],[56,116,0.000005602836608886719],[56,117,0.00003618001937866211],[56,118,0.00004023313522338867],[56,119,0.00008356571197509766],[56,120,0.00002491474151611328],[56,121,0.000013768672943115234],[56,122,0.000009894371032714844],[56,123,0.000016927719116210938],[56,124,0.0000782012939453125],[56,125,0.0000026226043701171875],[56,126,0.000023126602172851562],[56,127,0.00009208917617797852],[56,128,0.00005644559860229492],[56,129,0.000014901161193847656],[56,130,0.000006556510925292969],[56,131,0.00004273653030395508],[56,132,0.000005424022674560547],[56,133,0.00007206201553344727],[56,134,0.0006132125854492188],[56,135,0.00006145238876342773],[56,136,0.5810546875],[56,137,0.000038564205169677734],[56,138,0.0007381439208984375],[56,139,0.00007784366607666016],[56,140,0.00015664100646972656],[56,141,0.002712249755859375],[56,142,0.0018978118896484375],[56,143,0.0076751708984375],[56,144,0.025604248046875],[56,145,0.351806640625],[56,146,0.006072998046875],[56,147,0.001758575439453125],[56,148,0.0226287841796875],[56,149,0.00051116943359375],[56,150,0.0015840530395507812],[56,151,0.0006570816040039062],[56,152,0.00165557861328125],[56,153,0.001239776611328125],[57,57,0.000006794929504394531],[57,58,0.99853515625],[57,59,0.9755859375],[57,60,0.0003197193145751953],[57,61,0.0003809928894042969],[57,62,0.00005453824996948242],[57,63,0.00018978118896484375],[57,64,0.00008761882781982422],[57,65,0.000020563602447509766],[57,66,0.0001347064971923828],[57,67,0.00003361701965332031],[57,68,0.99560546875],[57,69,0.99755859375],[57,70,0.54833984375],[57,71,0.5927734375],[57,72,0.0001169443130493164],[57,73,0.00004380941390991211],[57,74,0.00004863739013671875],[57,75,0.00005370378494262695],[57,76,0.000016629695892333984],[57,77,0.000004947185516357422],[57,78,0.000026047229766845703],[57,79,0.000007867813110351562],[57,80,0.000016927719116210938],[57,81,0.000011146068572998047],[57,82,0.000005543231964111328],[57,83,0.0000064373016357421875],[57,84,0.000015914440155029297],[57,85,0.00003135204315185547],[57,86,0.000003874301910400391],[57,87,0.000006139278411865234],[57,88,0.0000026226043701171875],[57,89,2.980232238769531e-7],[57,90,6.556510925292969e-7],[57,91,5.364418029785156e-7],[57,92,4.172325134277344e-7],[57,93,0.00006401538848876953],[57,94,0.0000152587890625],[57,95,0.00005888938903808594],[57,96,0.00004780292510986328],[57,97,0.000010192394256591797],[57,98,0.0000073909759521484375],[57,99,0.000016987323760986328],[57,100,0.000005125999450683594],[57,101,0.000011146068572998047],[57,102,0.000018715858459472656],[57,103,0.000011146068572998047],[57,104,0.000010132789611816406],[57,105,0.000011920928955078125],[57,106,0.00002002716064453125],[57,107,0.000005364418029785156],[57,108,0.000007331371307373047],[57,109,0.000009000301361083984],[57,110,0.0000029802322387695312],[57,111,0.000026285648345947266],[57,112,0.000012695789337158203],[57,113,0.0000011920928955078125],[57,114,8.344650268554688e-7],[57,115,0.000004410743713378906],[57,116,0.000002205371856689453],[57,117,0.000009119510650634766],[57,118,0.000016808509826660156],[57,119,0.00005072355270385742],[57,120,0.000027060508728027344],[57,121,0.000007331371307373047],[57,122,0.000005304813385009766],[57,123,0.000004887580871582031],[57,124,0.000010311603546142578],[57,125,0.000004887580871582031],[57,126,0.00002664327621459961],[57,127,0.00003910064697265625],[57,128,0.00010198354721069336],[57,129,0.00005412101745605469],[57,130,0.000049233436584472656],[57,131,0.000029981136322021484],[57,132,0.000005662441253662109],[57,133,0.00028896331787109375],[57,134,0.000017583370208740234],[57,135,0.00009775161743164062],[57,136,0.000027060508728027344],[57,137,0.000006198883056640625],[57,138,0.000013589859008789062],[57,139,0.000004172325134277344],[57,140,0.000051021575927734375],[57,141,0.00020599365234375],[57,142,0.00041961669921875],[57,143,0.00038933753967285156],[57,144,0.0009131431579589844],[57,145,0.0035858154296875],[57,146,0.00017333030700683594],[57,147,0.00003504753112792969],[57,148,0.00024378299713134766],[57,149,0.00008749961853027344],[57,150,0.0009317398071289062],[57,151,0.0002663135528564453],[57,152,0.0008563995361328125],[57,153,0.0007295608520507812],[58,58,0.000009298324584960938],[58,59,0.99658203125],[58,60,0.93359375],[58,61,0.9677734375],[58,62,0.003055572509765625],[58,63,0.0006990432739257812],[58,64,0.00017440319061279297],[58,65,0.0002942085266113281],[58,66,0.9365234375],[58,67,0.8935546875],[58,68,0.9970703125],[58,69,0.401123046875],[58,70,0.0001087188720703125],[58,71,0.00007712841033935547],[58,72,0.000027120113372802734],[58,73,0.000029385089874267578],[58,74,0.00003552436828613281],[58,75,0.00005793571472167969],[58,76,0.00006562471389770508],[58,77,0.00003910064697265625],[58,78,0.000006854534149169922],[58,79,0.000016629695892333984],[58,80,0.00005888938903808594],[58,81,0.000015020370483398438],[58,82,0.00006031990051269531],[58,83,0.000007331371307373047],[58,84,0.00015866756439208984],[58,85,0.00007176399230957031],[58,86,0.000011444091796875],[58,87,0.0000017285346984863281],[58,88,0.000010073184967041016],[58,89,9.5367431640625e-7],[58,90,5.364418029785156e-7],[58,91,6.556510925292969e-7],[58,92,4.76837158203125e-7],[58,93,0.00000858306884765625],[58,94,0.000007092952728271484],[58,95,0.0000769495964050293],[58,96,0.0000464320182800293],[58,97,0.0000311732292175293],[58,98,0.000011146068572998047],[58,99,0.000017881393432617188],[58,100,0.000013053417205810547],[58,101,0.000013947486877441406],[58,102,0.000013947486877441406],[58,103,0.000007569789886474609],[58,104,0.0000045299530029296875],[58,105,0.000005602836608886719],[58,106,0.000010013580322265625],[58,107,0.000007569789886474609],[58,108,0.00000947713851928711],[58,109,0.000015735626220703125],[58,110,0.000008940696716308594],[58,111,0.00004571676254272461],[58,112,0.000004708766937255859],[58,113,0.0000022649765014648438],[58,114,0.00000286102294921875],[58,115,0.000006020069122314453],[58,116,0.0000012516975402832031],[58,117,0.0000095367431640625],[58,118,0.000015974044799804688],[58,119,0.00003695487976074219],[58,120,0.0000502467155456543],[58,121,0.000016570091247558594],[58,122,0.00001043081283569336],[58,123,0.000019848346710205078],[58,124,0.000011980533599853516],[58,125,0.000011563301086425781],[58,126,0.000057756900787353516],[58,127,0.000045180320739746094],[58,128,0.00006395578384399414],[58,129,0.000024020671844482422],[58,130,0.0000133514404296875],[58,131,0.000007450580596923828],[58,132,0.0000010132789611816406],[58,133,0.00000858306884765625],[58,134,0.000005781650543212891],[58,135,0.00006115436553955078],[58,136,0.00008171796798706055],[58,137,0.00005716085433959961],[58,138,0.00048828125],[58,139,0.00006175041198730469],[58,140,0.00007510185241699219],[58,141,0.000911712646484375],[58,142,0.00214385986328125],[58,143,0.0304107666015625],[58,144,0.045318603515625],[58,145,0.0517578125],[58,146,0.0014123916625976562],[58,147,0.00030231475830078125],[58,148,0.0010662078857421875],[58,149,0.0008969306945800781],[58,150,0.0007658004760742188],[58,151,0.0007762908935546875],[58,152,0.0011129379272460938],[58,153,0.0008482933044433594],[59,59,8.344650268554688e-7],[59,60,0.99755859375],[59,61,0.06756591796875],[59,62,0.0011444091796875],[59,63,0.00007617473602294922],[59,64,0.000024497509002685547],[59,65,0.00014328956604003906],[59,66,0.04876708984375],[59,67,0.9951171875],[59,68,0.990234375],[59,69,0.99462890625],[59,70,0.00011229515075683594],[59,71,0.00007236003875732422],[59,72,0.000013828277587890625],[59,73,0.000049948692321777344],[59,74,0.00022363662719726562],[59,75,0.00024127960205078125],[59,76,0.0001615285873413086],[59,77,0.00006973743438720703],[59,78,0.000019550323486328125],[59,79,0.00003057718276977539],[59,80,0.0000616908073425293],[59,81,0.0000400543212890625],[59,82,0.00002682209014892578],[59,83,0.0000059604644775390625],[59,84,0.00007104873657226562],[59,85,0.00015234947204589844],[59,86,0.0000020265579223632812],[59,87,4.76837158203125e-7],[59,88,0.000005424022674560547],[59,89,0.000003933906555175781],[59,90,0.000004708766937255859],[59,91,0.00010573863983154297],[59,92,0.000005543231964111328],[59,93,0.0005908012390136719],[59,94,0.00002199411392211914],[59,95,0.00004857778549194336],[59,96,0.00009292364120483398],[59,97,0.00002872943878173828],[59,98,0.00001055002212524414],[59,99,0.000024616718292236328],[59,100,0.000007987022399902344],[59,101,0.000012695789337158203],[59,102,0.000011563301086425781],[59,103,0.0000073909759521484375],[59,104,0.000005662441253662109],[59,105,0.000005662441253662109],[59,106,0.000011026859283447266],[59,107,0.000006616115570068359],[59,108,0.00002187490463256836],[59,109,0.000011086463928222656],[59,110,0.000005543231964111328],[59,111,0.0000033974647521972656],[59,112,0.0000014901161193847656],[59,113,0.0000011324882507324219],[59,114,4.172325134277344e-7],[59,115,5.960464477539062e-7],[59,116,4.172325134277344e-7],[59,117,0.000011026859283447266],[59,118,0.00004398822784423828],[59,119,0.00003612041473388672],[59,120,0.00006014108657836914],[59,121,0.000014543533325195312],[59,122,0.000029087066650390625],[59,123,0.0000330805778503418],[59,124,0.0000661611557006836],[59,125,0.00002276897430419922],[59,126,0.00009357929229736328],[59,127,0.00007259845733642578],[59,128,0.00011831521987915039],[59,129,0.000052094459533691406],[59,130,0.00013434886932373047],[59,131,0.000009179115295410156],[59,132,0.000004827976226806641],[59,133,0.00011903047561645508],[59,134,0.0000393986701965332],[59,135,0.78857421875],[59,136,0.00455474853515625],[59,137,0.0144195556640625],[59,138,0.00011229515075683594],[59,139,0.00002580881118774414],[59,140,0.000011801719665527344],[59,141,0.00009340047836303711],[59,142,0.00019884109497070312],[59,143,0.0006952285766601562],[59,144,0.0007348060607910156],[59,145,0.0006289482116699219],[59,146,0.0003533363342285156],[59,147,0.00004112720489501953],[59,148,0.0001518726348876953],[59,149,0.00030612945556640625],[59,150,0.0013332366943359375],[59,151,0.0010089874267578125],[59,152,0.0011568069458007812],[59,153,0.0009708404541015625],[60,60,0.000012874603271484375],[60,61,0.99658203125],[60,62,0.935546875],[60,63,0.009124755859375],[60,64,0.001007080078125],[60,65,0.5322265625],[60,66,0.8671875],[60,67,0.98974609375],[60,68,0.035736083984375],[60,69,0.0003733634948730469],[60,70,0.00005799531936645508],[60,71,0.00002300739288330078],[60,72,0.00005811452865600586],[60,73,0.00016605854034423828],[60,74,0.00024580955505371094],[60,75,0.0002186298370361328],[60,76,0.0002319812774658203],[60,77,0.0001195073127746582],[60,78,0.00012886524200439453],[60,79,0.00017499923706054688],[60,80,0.00012505054473876953],[60,81,0.00009125471115112305],[60,82,0.00009578466415405273],[60,83,0.000008463859558105469],[60,84,0.00011301040649414062],[60,85,0.00012874603271484375],[60,86,0.000010371208190917969],[60,87,9.5367431640625e-7],[60,88,0.000008046627044677734],[60,89,0.000006377696990966797],[60,90,0.0000019669532775878906],[60,91,0.00002092123031616211],[60,92,0.000006616115570068359],[60,93,0.00004881620407104492],[60,94,0.00004458427429199219],[60,95,0.00005543231964111328],[60,96,0.00006443262100219727],[60,97,0.000056862831115722656],[60,98,0.00002294778823852539],[60,99,0.00003039836883544922],[60,100,0.000011146068572998047],[60,101,0.000013589859008789062],[60,102,0.000012218952178955078],[60,103,0.000008165836334228516],[60,104,0.0000064373016357421875],[60,105,0.000006198883056640625],[60,106,0.000012218952178955078],[60,107,0.00001245737075805664],[60,108,0.00002181529998779297],[60,109,0.000024080276489257812],[60,110,0.000043332576751708984],[60,111,0.00004953145980834961],[60,112,0.000008225440979003906],[60,113,0.00000947713851928711],[60,114,0.0000025033950805664062],[60,115,0.0000013709068298339844],[60,116,0.0000017285346984863281],[60,117,0.000030219554901123047],[60,118,0.00005322694778442383],[60,119,0.000052809715270996094],[60,120,0.00006943941116333008],[60,121,0.0000368952751159668],[60,122,0.00006723403930664062],[60,123,0.0000635981559753418],[60,124,0.00007736682891845703],[60,125,0.00003641843795776367],[60,126,0.0000858306884765625],[60,127,0.00006377696990966797],[60,128,0.00009357929229736328],[60,129,0.00004750490188598633],[60,130,0.0001163482666015625],[60,131,0.00006955862045288086],[60,132,0.000028133392333984375],[60,133,0.00002872943878173828],[60,134,0.000010728836059570312],[60,135,0.0016031265258789062],[60,136,0.00004875659942626953],[60,137,0.037811279296875],[60,138,0.00048732757568359375],[60,139,0.0003800392150878906],[60,140,0.00019121170043945312],[60,141,0.00014209747314453125],[60,142,0.0006189346313476562],[60,143,0.005153656005859375],[60,144,0.0014562606811523438],[60,145,0.0005249977111816406],[60,146,0.0004105567932128906],[60,147,0.000057578086853027344],[60,148,0.00010979175567626953],[60,149,0.00025844573974609375],[60,150,0.0009713172912597656],[60,151,0.0009140968322753906],[60,152,0.0009441375732421875],[60,153,0.0007643699645996094],[61,61,0.0004982948303222656],[61,62,0.9921875],[61,63,0.148681640625],[61,64,0.0061492919921875],[61,65,0.60986328125],[61,66,0.986328125],[61,67,0.77001953125],[61,68,0.008544921875],[61,69,0.0001895427703857422],[61,70,0.00001621246337890625],[61,71,0.00003904104232788086],[61,72,0.00015747547149658203],[61,73,0.0004620552062988281],[61,74,0.0004181861877441406],[61,75,0.00020122528076171875],[61,76,0.0003943443298339844],[61,77,0.000171661376953125],[61,78,0.0002455711364746094],[61,79,0.0002338886260986328],[61,80,0.00009369850158691406],[61,81,0.00008255243301391602],[61,82,0.0000928640365600586],[61,83,0.000009000301361083984],[61,84,0.00004416704177856445],[61,85,0.000037789344787597656],[61,86,0.00004035234451293945],[61,87,0.0000037550926208496094],[61,88,0.000010788440704345703],[61,89,0.000007748603820800781],[61,90,0.0000029206275939941406],[61,91,0.00003594160079956055],[61,92,0.00006687641143798828],[61,93,0.00017523765563964844],[61,94,0.00007039308547973633],[61,95,0.00015175342559814453],[61,96,0.00005835294723510742],[61,97,0.0001125335693359375],[61,98,0.00002110004425048828],[61,99,0.00004845857620239258],[61,100,0.000011920928955078125],[61,101,0.000016987323760986328],[61,102,0.000011861324310302734],[61,103,0.000008106231689453125],[61,104,0.000007092952728271484],[61,105,0.000007569789886474609],[61,106,0.00001710653305053711],[61,107,0.000016510486602783203],[61,108,0.00005072355270385742],[61,109,0.000030875205993652344],[61,110,0.000057816505432128906],[61,111,0.00011271238327026367],[61,112,0.000051140785217285156],[61,113,0.00016510486602783203],[61,114,0.00004476308822631836],[61,115,0.000018894672393798828],[61,116,0.000006854534149169922],[61,117,0.000030994415283203125],[61,118,0.00003546476364135742],[61,119,0.000058770179748535156],[61,120,0.00009161233901977539],[61,121,0.00004017353057861328],[61,122,0.00013017654418945312],[61,123,0.00006341934204101562],[61,124,0.00018453598022460938],[61,125,0.00005352497100830078],[61,126,0.0001112818717956543],[61,127,0.00006335973739624023],[61,128,0.00016260147094726562],[61,129,0.00005888938903808594],[61,130,0.00017440319061279297],[61,131,0.00014710426330566406],[61,132,0.00007683038711547852],[61,133,0.000035881996154785156],[61,134,0.000009834766387939453],[61,135,0.00020360946655273438],[61,136,0.000064849853515625],[61,137,0.0012340545654296875],[61,138,0.006443023681640625],[61,139,0.001483917236328125],[61,140,0.0009794235229492188],[61,141,0.0014524459838867188],[61,142,0.01456451416015625],[61,143,0.5087890625],[61,144,0.07464599609375],[61,145,0.00431060791015625],[61,146,0.0009369850158691406],[61,147,0.00031280517578125],[61,148,0.00026917457580566406],[61,149,0.0009479522705078125],[61,150,0.0015544891357421875],[61,151,0.0014600753784179688],[61,152,0.0012226104736328125],[61,153,0.0010576248168945312],[62,62,0.0002033710479736328],[62,63,0.9931640625],[62,64,0.94677734375],[62,65,0.95703125],[62,66,0.8125],[62,67,0.11431884765625],[62,68,0.00044536590576171875],[62,69,0.00003075599670410156],[62,70,0.00004881620407104492],[62,71,0.00005334615707397461],[62,72,0.00028824806213378906],[62,73,0.0002397298812866211],[62,74,0.0002658367156982422],[62,75,0.00013685226440429688],[62,76,0.00027370452880859375],[62,77,0.0001703500747680664],[62,78,0.00028896331787109375],[62,79,0.0003294944763183594],[62,80,0.00021064281463623047],[62,81,0.00020360946655273438],[62,82,0.00016701221466064453],[62,83,0.00003701448440551758],[62,84,0.00009012222290039062],[62,85,0.0000807642936706543],[62,86,0.00018131732940673828],[62,87,0.000022590160369873047],[62,88,0.000027239322662353516],[62,89,0.000017344951629638672],[62,90,0.000009179115295410156],[62,91,0.00005751848220825195],[62,92,0.00009876489639282227],[62,93,0.0007195472717285156],[62,94,0.00026416778564453125],[62,95,0.0001342296600341797],[62,96,0.00010949373245239258],[62,97,0.00013244152069091797],[62,98,0.00004661083221435547],[62,99,0.00006943941116333008],[62,100,0.000034749507904052734],[62,101,0.00003415346145629883],[62,102,0.00002384185791015625],[62,103,0.0000152587890625],[62,104,0.000013470649719238281],[62,105,0.000012636184692382812],[62,106,0.00002372264862060547],[62,107,0.00002294778823852539],[62,108,0.00007075071334838867],[62,109,0.00005030632019042969],[62,110,0.00010579824447631836],[62,111,0.00022590160369873047],[62,112,0.00005263090133666992],[62,113,0.00008183717727661133],[62,114,0.00004553794860839844],[62,115,0.000025928020477294922],[62,116,0.000030875205993652344],[62,117,0.00007724761962890625],[62,118,0.00007677078247070312],[62,119,0.00012105703353881836],[62,120,0.00013971328735351562],[62,121,0.00006192922592163086],[62,122,0.0001226663589477539],[62,123,0.00008279085159301758],[62,124,0.00020813941955566406],[62,125,0.00007516145706176758],[62,126,0.0001023411750793457],[62,127,0.00007128715515136719],[62,128,0.00013709068298339844],[62,129,0.00006181001663208008],[62,130,0.00012540817260742188],[62,131,0.0001251697540283203],[62,132,0.00015735626220703125],[62,133,0.00012946128845214844],[62,134,0.00003445148468017578],[62,135,0.00010091066360473633],[62,136,0.00003904104232788086],[62,137,0.0025119781494140625],[62,138,0.0026531219482421875],[62,139,0.029327392578125],[62,140,0.00215911865234375],[62,141,0.003536224365234375],[62,142,0.0103607177734375],[62,143,0.1259765625],[62,144,0.00310516357421875],[62,145,0.0002460479736328125],[62,146,0.0002532005310058594],[62,147,0.00015294551849365234],[62,148,0.00021731853485107422],[62,149,0.0003345012664794922],[62,150,0.0007047653198242188],[62,151,0.0009555816650390625],[62,152,0.0007953643798828125],[62,153,0.000789642333984375],[63,63,0.000058591365814208984],[63,64,0.98193359375],[63,65,0.68701171875],[63,66,0.0138397216796875],[63,67,0.00197601318359375],[63,68,0.00014066696166992188],[63,69,0.0003867149353027344],[63,70,0.0003693103790283203],[63,71,0.0003693103790283203],[63,72,0.00028896331787109375],[63,73,0.00020766258239746094],[63,74,0.0002613067626953125],[63,75,0.0001354217529296875],[63,76,0.0002589225769042969],[63,77,0.00016200542449951172],[63,78,0.00035953521728515625],[63,79,0.00045013427734375],[63,80,0.0002410411834716797],[63,81,0.0003814697265625],[63,82,0.0002009868621826172],[63,83,0.00017333030700683594],[63,84,0.00020802021026611328],[63,85,0.00101470947265625],[63,86,0.0014238357543945312],[63,87,0.00026798248291015625],[63,88,0.00006985664367675781],[63,89,0.0001538991928100586],[63,90,0.00019812583923339844],[63,91,0.0010766983032226562],[63,92,0.00022995471954345703],[63,93,0.0009613037109375],[63,94,0.0003986358642578125],[63,95,0.0002522468566894531],[63,96,0.0001512765884399414],[63,97,0.0002086162567138672],[63,98,0.0000718832015991211],[63,99,0.0001016855239868164],[63,100,0.00005519390106201172],[63,101,0.00005155801773071289],[63,102,0.0000324249267578125],[63,103,0.000018358230590820312],[63,104,0.000014960765838623047],[63,105,0.000011980533599853516],[63,106,0.000024080276489257812],[63,107,0.00002372264862060547],[63,108,0.00008279085159301758],[63,109,0.00008350610733032227],[63,110,0.000179290771484375],[63,111,0.0003256797790527344],[63,112,0.00025463104248046875],[63,113,0.0003628730773925781],[63,114,0.0003361701965332031],[63,115,0.0004570484161376953],[63,116,0.0002961158752441406],[63,117,0.0003693103790283203],[63,118,0.00030303001403808594],[63,119,0.0002484321594238281],[63,120,0.00026869773864746094],[63,121,0.00008761882781982422],[63,122,0.00023925304412841797],[63,123,0.00008612871170043945],[63,124,0.00023221969604492188],[63,125,0.00006967782974243164],[63,126,0.00010180473327636719],[63,127,0.00007963180541992188],[63,128,0.0001289844512939453],[63,129,0.00006335973739624023],[63,130,0.00012063980102539062],[63,131,0.00013720989227294922],[63,132,0.0002624988555908203],[63,133,0.00043392181396484375],[63,134,0.0002567768096923828],[63,135,0.00024056434631347656],[63,136,0.000028252601623535156],[63,137,0.0004696846008300781],[63,138,0.0008826255798339844],[63,139,0.00537109375],[63,140,0.007274627685546875],[63,141,0.08282470703125],[63,142,0.046661376953125],[63,143,0.12451171875],[63,144,0.004619598388671875],[63,145,0.00020241737365722656],[63,146,0.00016629695892333984],[63,147,0.0002875328063964844],[63,148,0.00024259090423583984],[63,149,0.0002503395080566406],[63,150,0.0005693435668945312],[63,151,0.0006928443908691406],[63,152,0.0007243156433105469],[63,153,0.0007014274597167969],[64,64,0.00022482872009277344],[64,65,0.99072265625],[64,66,0.0487060546875],[64,67,0.001007080078125],[64,68,0.00007647275924682617],[64,69,0.000016748905181884766],[64,70,0.0002512931823730469],[64,71,0.00008916854858398438],[64,72,0.000194549560546875],[64,73,0.00016045570373535156],[64,74,0.00012683868408203125],[64,75,0.00004589557647705078],[64,76,0.00015151500701904297],[64,77,0.00009500980377197266],[64,78,0.00022459030151367188],[64,79,0.0002880096435546875],[64,80,0.0003132820129394531],[64,81,0.00014972686767578125],[64,82,0.00006842613220214844],[64,83,0.00018596649169921875],[64,84,0.00020825862884521484],[64,85,0.004383087158203125],[64,86,0.034881591796875],[64,87,0.003208160400390625],[64,88,0.00016605854034423828],[64,89,0.00013363361358642578],[64,90,0.000011444091796875],[64,91,0.00004607439041137695],[64,92,0.000019788742065429688],[64,93,0.0003314018249511719],[64,94,0.00017690658569335938],[64,95,0.00009572505950927734],[64,96,0.00003713369369506836],[64,97,0.00009357929229736328],[64,98,0.000024318695068359375],[64,99,0.00005835294723510742],[64,100,0.000022232532501220703],[64,101,0.00002294778823852539],[64,102,0.000017404556274414062],[64,103,0.00000959634780883789],[64,104,0.000005781650543212891],[64,105,0.000003516674041748047],[64,106,0.000011026859283447266],[64,107,0.00000667572021484375],[64,108,0.000040471553802490234],[64,109,0.000026702880859375],[64,110,0.0000768899917602539],[64,111,0.00014638900756835938],[64,112,0.00002950429916381836],[64,113,0.000031054019927978516],[64,114,0.000016570091247558594],[64,115,0.000023066997528076172],[64,116,0.0000054836273193359375],[64,117,0.000022709369659423828],[64,118,0.0001671314239501953],[64,119,0.00005251169204711914],[64,120,0.00006943941116333008],[64,121,0.00009316205978393555],[64,122,0.00006705522537231445],[64,123,0.00006818771362304688],[64,124,0.00007385015487670898],[64,125,0.00003641843795776367],[64,126,0.0000527501106262207],[64,127,0.000033915042877197266],[64,128,0.00005435943603515625],[64,129,0.000020503997802734375],[64,130,0.00003820657730102539],[64,131,0.0000769495964050293],[64,132,0.00011557340621948242],[64,133,0.00017750263214111328],[64,134,0.0000960230827331543],[64,135,0.00004595518112182617],[64,136,0.0000152587890625],[64,137,0.00030350685119628906],[64,138,0.003185272216796875],[64,139,0.939453125],[64,140,0.830078125],[64,141,0.72314453125],[64,142,0.1904296875],[64,143,0.4755859375],[64,144,0.006011962890625],[64,145,0.0001976490020751953],[64,146,0.00013399124145507812],[64,147,0.0003657341003417969],[64,148,0.00008815526962280273],[64,149,0.0001920461654663086],[64,150,0.0003941059112548828],[64,151,0.0006289482116699219],[64,152,0.0006875991821289062],[64,153,0.0006670951843261719],[65,65,0.0006222724914550781],[65,66,0.99755859375],[65,67,0.9609375],[65,68,0.00018656253814697266],[65,69,0.000045180320739746094],[65,70,0.000034749507904052734],[65,71,0.00004982948303222656],[65,72,0.00005418062210083008],[65,73,0.00008875131607055664],[65,74,0.00007349252700805664],[65,75,0.000025153160095214844],[65,76,0.00008720159530639648],[65,77,0.00005173683166503906],[65,78,0.0000998377799987793],[65,79,0.000056803226470947266],[65,80,0.00005555152893066406],[65,81,0.000012040138244628906],[65,82,0.000005543231964111328],[65,83,0.00014829635620117188],[65,84,0.00004762411117553711],[65,85,0.0006699562072753906],[65,86,0.0226287841796875],[65,87,0.004474639892578125],[65,88,0.0013265609741210938],[65,89,0.0017881393432617188],[65,90,0.000019550323486328125],[65,91,0.00003355741500854492],[65,92,0.000003635883331298828],[65,93,0.000021398067474365234],[65,94,0.00006288290023803711],[65,95,0.00008678436279296875],[65,96,0.000025153160095214844],[65,97,0.00003725290298461914],[65,98,0.000012278556823730469],[65,99,0.000030934810638427734],[65,100,0.000009179115295410156],[65,101,0.000018537044525146484],[65,102,0.000009775161743164062],[65,103,0.000004947185516357422],[65,104,0.000003159046173095703],[65,105,0.000002682209014892578],[65,106,0.000008285045623779297],[65,107,0.000005424022674560547],[65,108,0.00003069639205932617],[65,109,0.000035643577575683594],[65,110,0.00006717443466186523],[65,111,0.00024318695068359375],[65,112,0.00003463029861450195],[65,113,0.000014066696166992188],[65,114,0.000002205371856689453],[65,115,0.000011205673217773438],[65,116,0.000004291534423828125],[65,117,0.000004708766937255859],[65,118,0.000022590160369873047],[65,119,0.000008404254913330078],[65,120,0.000005364418029785156],[65,121,0.000011742115020751953],[65,122,0.000006020069122314453],[65,123,0.000010192394256591797],[65,124,0.000012934207916259766],[65,125,0.000011086463928222656],[65,126,0.00003254413604736328],[65,127,0.000020742416381835938],[65,128,0.000033736228942871094],[65,129,0.000013709068298339844],[65,130,0.00004774332046508789],[65,131,0.00004780292510986328],[65,132,0.00006103515625],[65,133,0.000007331371307373047],[65,134,0.00001430511474609375],[65,135,0.00003904104232788086],[65,136,0.00009942054748535156],[65,137,0.92626953125],[65,138,0.978515625],[65,139,0.9931640625],[65,140,0.294189453125],[65,141,0.01385498046875],[65,142,0.02178955078125],[65,143,0.66796875],[65,144,0.006023406982421875],[65,145,0.00020647048950195312],[65,146,0.00007599592208862305],[65,147,0.000209808349609375],[65,148,0.000042557716369628906],[65,149,0.00012540817260742188],[65,150,0.0001188516616821289],[65,151,0.0004391670227050781],[65,152,0.0005478858947753906],[65,153,0.0005140304565429688],[66,66,0.0004744529724121094],[66,67,0.99755859375],[66,68,0.99609375],[66,69,0.00003045797348022461],[66,70,0.000014901161193847656],[66,71,0.0000040531158447265625],[66,72,0.000004708766937255859],[66,73,0.00003236532211303711],[66,74,0.00010216236114501953],[66,75,0.000042438507080078125],[66,76,0.00008308887481689453],[66,77,0.0000247955322265625],[66,78,0.000005304813385009766],[66,79,0.000009894371032714844],[66,80,0.00008571147918701172],[66,81,0.000007450580596923828],[66,82,0.00000768899917602539],[66,83,0.00022172927856445312],[66,84,0.00011998414993286133],[66,85,0.0007319450378417969],[66,86,0.1168212890625],[66,87,0.00007241964340209961],[66,88,0.0021572113037109375],[66,89,0.000012695789337158203],[66,90,0.000002205371856689453],[66,91,0.0000032782554626464844],[66,92,3.5762786865234375e-7],[66,93,0.000005304813385009766],[66,94,0.00003123283386230469],[66,95,0.00002384185791015625],[66,96,0.000011026859283447266],[66,97,0.000006556510925292969],[66,98,0.0000021457672119140625],[66,99,0.00001233816146850586],[66,100,0.000005424022674560547],[66,101,0.000013530254364013672],[66,102,0.000016510486602783203],[66,103,0.000009000301361083984],[66,104,0.00000476837158203125],[66,105,0.0000034570693969726562],[66,106,0.00001537799835205078],[66,107,0.00000762939453125],[66,108,0.000015556812286376953],[66,109,0.000018715858459472656],[66,110,0.000017344951629638672],[66,111,0.000044465065002441406],[66,112,0.000005185604095458984],[66,113,0.000002384185791015625],[66,114,2.384185791015625e-7],[66,115,5.364418029785156e-7],[66,116,4.76837158203125e-7],[66,117,7.152557373046875e-7],[66,118,0.000006079673767089844],[66,119,0.000005662441253662109],[66,120,0.0000020265579223632812],[66,121,0.000012695789337158203],[66,122,0.0000033974647521972656],[66,123,0.00001138448715209961],[66,124,0.000014603137969970703],[66,125,0.000008046627044677734],[66,126,0.00004208087921142578],[66,127,0.000032067298889160156],[66,128,0.000048160552978515625],[66,129,0.00002568960189819336],[66,130,0.00004029273986816406],[66,131,0.000020265579223632812],[66,132,0.000006616115570068359],[66,133,0.00000286102294921875],[66,134,8.940696716308594e-7],[66,135,0.000009417533874511719],[66,136,0.146240234375],[66,137,0.74853515625],[66,138,0.99755859375],[66,139,0.2568359375],[66,140,0.043060302734375],[66,141,0.0099029541015625],[66,142,0.126708984375],[66,143,0.92138671875],[66,144,0.375732421875],[66,145,0.0361328125],[66,146,0.0011463165283203125],[66,147,0.007354736328125],[66,148,0.0002796649932861328],[66,149,0.00005626678466796875],[66,150,0.00012165307998657227],[66,151,0.00043082237243652344],[66,152,0.0007982254028320312],[66,153,0.0007877349853515625],[67,67,0.0000019669532775878906],[67,68,0.99609375],[67,69,0.31103515625],[67,70,0.000011920928955078125],[67,71,0.000004887580871582031],[67,72,0.0000030994415283203125],[67,73,0.000035881996154785156],[67,74,0.00010907649993896484],[67,75,0.00003337860107421875],[67,76,0.0000597834587097168],[67,77,0.0000045299530029296875],[67,78,0.000002682209014892578],[67,79,0.000004887580871582031],[67,80,0.000009894371032714844],[67,81,0.000002682209014892578],[67,82,0.0000017881393432617188],[67,83,0.000012993812561035156],[67,84,0.000005245208740234375],[67,85,0.00001722574234008789],[67,86,0.000039637088775634766],[67,87,0.000019609928131103516],[67,88,0.00013256072998046875],[67,89,0.0006418228149414062],[67,90,0.000026404857635498047],[67,91,0.0004420280456542969],[67,92,0.0000027418136596679688],[67,93,0.0000553131103515625],[67,94,0.0000133514404296875],[67,95,0.000003635883331298828],[67,96,0.000011265277862548828],[67,97,0.000002205371856689453],[67,98,0.0000013709068298339844],[67,99,0.0000018477439880371094],[67,100,0.000002562999725341797],[67,101,0.00001239776611328125],[67,102,0.000016689300537109375],[67,103,0.000010788440704345703],[67,104,0.000009179115295410156],[67,105,0.000006616115570068359],[67,106,0.000021576881408691406],[67,107,0.000006854534149169922],[67,108,0.000005841255187988281],[67,109,0.000023245811462402344],[67,110,0.00000286102294921875],[67,111,0.000009953975677490234],[67,112,0.0000017881393432617188],[67,113,0.0000026226043701171875],[67,114,6.556510925292969e-7],[67,115,0.0000013113021850585938],[67,116,7.748603820800781e-7],[67,117,7.152557373046875e-7],[67,118,0.0000012516975402832031],[67,119,0.000010907649993896484],[67,120,0.0000015497207641601562],[67,121,0.0000019073486328125],[67,122,0.0000010728836059570312],[67,123,0.000006496906280517578],[67,124,0.000012576580047607422],[67,125,0.0000032782554626464844],[67,126,0.00003063678741455078],[67,127,0.00002855062484741211],[67,128,0.00004553794860839844],[67,129,0.000013232231140136719],[67,130,0.000033020973205566406],[67,131,0.000002086162567138672],[67,132,0.000002682209014892578],[67,133,0.0000013709068298339844],[67,134,0.0000054836273193359375],[67,135,0.98828125],[67,136,0.97119140625],[67,137,0.99755859375],[67,138,0.810546875],[67,139,0.00019025802612304688],[67,140,0.00018739700317382812],[67,141,0.00012093782424926758],[67,142,0.0008425712585449219],[67,143,0.0025959014892578125],[67,144,0.0005335807800292969],[67,145,0.00023651123046875],[67,146,0.000013053417205810547],[67,147,0.000012874603271484375],[67,148,0.00004929304122924805],[67,149,0.000011801719665527344],[67,150,0.00005078315734863281],[67,151,0.00009590387344360352],[67,152,0.00038361549377441406],[67,153,0.00023746490478515625],[68,68,3.5762786865234375e-7],[68,69,0.99951171875],[68,70,0.99951171875],[68,71,0.000007987022399902344],[68,72,0.000003159046173095703],[68,73,0.000019431114196777344],[68,74,0.00008547306060791016],[68,75,0.00004488229751586914],[68,76,0.000005245208740234375],[68,77,0.0000027418136596679688],[68,78,0.00003534555435180664],[68,79,0.000006258487701416016],[68,80,0.000030159950256347656],[68,81,0.000014424324035644531],[68,82,0.000023663043975830078],[68,83,0.000047147274017333984],[68,84,0.00004482269287109375],[68,85,0.00008124113082885742],[68,86,0.00009059906005859375],[68,87,0.000013709068298339844],[68,88,0.0011491775512695312],[68,89,0.000007450580596923828],[68,90,0.00005131959915161133],[68,91,0.0000035762786865234375],[68,92,0.0000011324882507324219],[68,93,0.000006556510925292969],[68,94,0.0000019669532775878906],[68,95,9.5367431640625e-7],[68,96,0.000004410743713378906],[68,97,0.0000034570693969726562],[68,98,0.000002205371856689453],[68,99,0.0000035762786865234375],[68,100,0.000005364418029785156],[68,101,0.000011742115020751953],[68,102,0.000035822391510009766],[68,103,0.000025331974029541016],[68,104,0.000020444393157958984],[68,105,0.000008702278137207031],[68,106,0.000044405460357666016],[68,107,0.000009298324584960938],[68,108,0.000006198883056640625],[68,109,0.000015914440155029297],[68,110,7.152557373046875e-7],[68,111,0.0000021457672119140625],[68,112,1.7881393432617188e-7],[68,113,2.980232238769531e-7],[68,114,1.1920928955078125e-7],[68,115,2.980232238769531e-7],[68,116,0.0000011920928955078125],[68,117,0.000003516674041748047],[68,118,0.000003993511199951172],[68,119,0.00003653764724731445],[68,120,0.0000021457672119140625],[68,121,0.0000037550926208496094],[68,122,0.0000023245811462402344],[68,123,0.0000015497207641601562],[68,124,0.000022232532501220703],[68,125,0.0000010728836059570312],[68,126,0.000007271766662597656],[68,127,0.00002384185791015625],[68,128,0.00003904104232788086],[68,129,0.00005447864532470703],[68,130,0.000041544437408447266],[68,131,0.0000034570693969726562],[68,132,2.384185791015625e-7],[68,133,0.000004410743713378906],[68,134,0.002063751220703125],[68,135,0.9501953125],[68,136,0.99951171875],[68,137,0.248046875],[68,138,0.7578125],[68,139,0.00009846687316894531],[68,140,0.00006949901580810547],[68,141,0.00027179718017578125],[68,142,0.0012922286987304688],[68,143,0.015167236328125],[68,144,0.016510009765625],[68,145,0.043975830078125],[68,146,0.0003256797790527344],[68,147,0.00022673606872558594],[68,148,0.0004444122314453125],[68,149,0.00004184246063232422],[68,150,0.00003719329833984375],[68,151,0.0009889602661132812],[68,152,0.0006961822509765625],[68,153,0.000701904296875],[69,69,0.000002086162567138672],[69,70,0.99658203125],[69,71,0.9833984375],[69,72,0.000009655952453613281],[69,73,0.000004351139068603516],[69,74,0.000003993511199951172],[69,75,0.000005781650543212891],[69,76,9.5367431640625e-7],[69,77,2.384185791015625e-7],[69,78,0.000009834766387939453],[69,79,0.0000018477439880371094],[69,80,0.0000054836273193359375],[69,81,0.0000036954879760742188],[69,82,0.0000016689300537109375],[69,83,0.000010788440704345703],[69,84,0.000003337860107421875],[69,85,0.00002390146255493164],[69,86,8.344650268554688e-7],[69,87,5.960464477539062e-7],[69,88,0.000004112720489501953],[69,89,0.0000011920928955078125],[69,90,0.000021338462829589844],[69,91,0.00007367134094238281],[69,92,0.000016570091247558594],[69,93,0.78515625],[69,94,0.0004775524139404297],[69,95,0.00002396106719970703],[69,96,0.0000021457672119140625],[69,97,0.000002086162567138672],[69,98,3.5762786865234375e-7],[69,99,0.0000016093254089355469],[69,100,0.000006079673767089844],[69,101,0.000012278556823730469],[69,102,0.000046312808990478516],[69,103,0.000022113323211669922],[69,104,0.000018894672393798828],[69,105,0.0000045299530029296875],[69,106,0.000012874603271484375],[69,107,0.000006198883056640625],[69,108,0.0000023245811462402344],[69,109,0.0000019669532775878906],[69,110,0.000002384185791015625],[69,111,0.0000013709068298339844],[69,112,2.384185791015625e-7],[69,113,3.5762786865234375e-7],[69,114,5.960464477539063e-8],[69,115,1.7881393432617188e-7],[69,116,0.0000013113021850585938],[69,117,0.000002086162567138672],[69,118,0.000010251998901367188],[69,119,0.000031113624572753906],[69,120,0.000010311603546142578],[69,121,7.152557373046875e-7],[69,122,8.344650268554688e-7],[69,123,1.7881393432617188e-7],[69,124,0.000007987022399902344],[69,125,1.7881393432617188e-7],[69,126,0.000005781650543212891],[69,127,0.000004112720489501953],[69,128,0.00000476837158203125],[69,129,0.000027418136596679688],[69,130,0.000014185905456542969],[69,131,0.000018715858459472656],[69,132,0.000005364418029785156],[69,133,0.98779296875],[69,134,0.92822265625],[69,135,0.99755859375],[69,136,0.57421875],[69,137,0.000017642974853515625],[69,138,0.000028908252716064453],[69,139,0.000004231929779052734],[69,140,0.000007987022399902344],[69,141,0.00005459785461425781],[69,142,0.00015091896057128906],[69,143,0.000021576881408691406],[69,144,0.000025451183319091797],[69,145,0.000046193599700927734],[69,146,0.000009119510650634766],[69,147,0.0000017285346984863281],[69,148,0.000012159347534179688],[69,149,8.344650268554688e-7],[69,150,0.00009894371032714844],[69,151,0.00004088878631591797],[69,152,0.0003707408905029297],[69,153,0.00022530555725097656],[70,70,0.0000018477439880371094],[70,71,0.99658203125],[70,72,0.9990234375],[70,73,0.000020325183868408203],[70,74,0.000004410743713378906],[70,75,0.0000024437904357910156],[70,76,0.0000616312026977539],[70,77,0.000044226646423339844],[70,78,0.66845703125],[70,79,0.0002446174621582031],[70,80,0.00003540515899658203],[70,81,0.000056743621826171875],[70,82,0.00004583597183227539],[70,83,0.000028133392333984375],[70,84,0.00008535385131835938],[70,85,0.00009483098983764648],[70,86,0.000014066696166992188],[70,87,0.000009238719940185547],[70,88,0.00012129545211791992],[70,89,0.000006794929504394531],[70,90,0.25341796875],[70,91,0.00001430511474609375],[70,92,0.00001531839370727539],[70,93,0.0015020370483398438],[70,94,0.00002968311309814453],[70,95,0.00006347894668579102],[70,96,0.000003933906555175781],[70,97,0.0018377304077148438],[70,98,0.0000023245811462402344],[70,99,0.000016868114471435547],[70,100,0.000005304813385009766],[70,101,0.000014662742614746094],[70,102,0.00032520294189453125],[70,103,0.00008165836334228516],[70,104,0.000042438507080078125],[70,105,0.000004231929779052734],[70,106,0.000004410743713378906],[70,107,0.0000012516975402832031],[70,108,0.0000036954879760742188],[70,109,0.0000011920928955078125],[70,110,0.0000014901161193847656],[70,111,0.0000011920928955078125],[70,112,4.172325134277344e-7],[70,113,8.940696716308594e-7],[70,114,0.0000023245811462402344],[70,115,0.0000030994415283203125],[70,116,0.000007510185241699219],[70,117,0.000025033950805664062],[70,118,0.000014901161193847656],[70,119,0.00023996829986572266],[70,120,0.000012695789337158203],[70,121,0.0000059604644775390625],[70,122,0.000044465065002441406],[70,123,0.000020802021026611328],[70,124,0.48193359375],[70,125,0.000018417835235595703],[70,126,0.00007808208465576172],[70,127,0.000008404254913330078],[70,128,0.000002682209014892578],[70,129,0.000005125999450683594],[70,130,0.000003337860107421875],[70,131,0.00002485513687133789],[70,132,0.1689453125],[70,133,0.93017578125],[70,134,0.99951171875],[70,135,0.85107421875],[70,136,0.9990234375],[70,137,0.00002568960189819336],[70,138,0.0000374913215637207],[70,139,0.000014960765838623047],[70,140,0.0000171661376953125],[70,141,0.0005049705505371094],[70,142,0.00007748603820800781],[70,143,0.00007081031799316406],[70,144,0.00005739927291870117],[70,145,0.00023674964904785156],[70,146,0.00002950429916381836],[70,147,0.000013887882232666016],[70,148,0.00006592273712158203],[70,149,0.000022351741790771484],[70,150,0.000016808509826660156],[70,151,0.00009626150131225586],[70,152,0.00047969818115234375],[70,153,0.0003757476806640625],[71,71,0.000043392181396484375],[71,72,0.9951171875],[71,73,0.77001953125],[71,74,0.00004881620407104492],[71,75,0.000012099742889404297],[71,76,0.0012426376342773438],[71,77,0.000034809112548828125],[71,78,0.0001302957534790039],[71,79,0.0000036954879760742188],[71,80,6.556510925292969e-7],[71,81,0.0000019073486328125],[71,82,0.0000017881393432617188],[71,83,0.000009179115295410156],[71,84,0.000012576580047607422],[71,85,0.000029325485229492188],[71,86,0.000019729137420654297],[71,87,0.000008761882781982422],[71,88,0.0000045299530029296875],[71,89,0.0000016689300537109375],[71,90,0.000002086162567138672],[71,91,8.344650268554688e-7],[71,92,0.000007033348083496094],[71,93,0.0006389617919921875],[71,94,0.0040740966796875],[71,95,0.004180908203125],[71,96,0.000004172325134277344],[71,97,0.000025093555450439453],[71,98,8.344650268554688e-7],[71,99,5.364418029785156e-7],[71,100,0.0000018477439880371094],[71,101,0.000006735324859619141],[71,102,0.0000559687614440918],[71,103,0.00002390146255493164],[71,104,0.00001043081283569336],[71,105,0.000010669231414794922],[71,106,0.0000029206275939941406],[71,107,5.364418029785156e-7],[71,108,0.0000014901161193847656],[71,109,4.76837158203125e-7],[71,110,0.0000017285346984863281],[71,111,0.0000010728836059570312],[71,112,1.7881393432617188e-7],[71,113,5.960464477539063e-8],[71,114,5.364418029785156e-7],[71,115,0.0000011324882507324219],[71,116,0.000004172325134277344],[71,117,7.152557373046875e-7],[71,118,0.000005364418029785156],[71,119,0.0000209808349609375],[71,120,0.0000032782554626464844],[71,121,2.980232238769531e-7],[71,122,0.0000010132789611816406],[71,123,2.980232238769531e-7],[71,124,0.000053763389587402344],[71,125,0.0000069141387939453125],[71,126,0.00026297569274902344],[71,127,0.0000069141387939453125],[71,128,0.000004470348358154297],[71,129,0.000007092952728271484],[71,130,0.000015676021575927734],[71,131,0.9970703125],[71,132,0.95166015625],[71,133,0.99755859375],[71,134,0.415283203125],[71,135,0.000007987022399902344],[71,136,0.00001800060272216797],[71,137,0.0000019073486328125],[71,138,0.000007927417755126953],[71,139,0.00004011392593383789],[71,140,0.00007224082946777344],[71,141,0.000125885009765625],[71,142,0.00010567903518676758],[71,143,0.00008028745651245117],[71,144,0.00004285573959350586],[71,145,0.00002300739288330078],[71,146,0.000032007694244384766],[71,147,0.000006735324859619141],[71,148,0.000006377696990966797],[71,149,4.76837158203125e-7],[71,150,0.000006556510925292969],[71,151,0.0000152587890625],[71,152,0.00013518333435058594],[71,153,0.00010114908218383789],[72,72,0.00005984306335449219],[72,73,0.99951171875],[72,74,0.1878662109375],[72,75,0.0007014274597167969],[72,76,0.998046875],[72,77,0.443603515625],[72,78,0.9755859375],[72,79,0.00011068582534790039],[72,80,0.000013053417205810547],[72,81,0.000009059906005859375],[72,82,0.000013709068298339844],[72,83,0.000012218952178955078],[72,84,0.00009703636169433594],[72,85,0.00007492303848266602],[72,86,0.0000603795051574707],[72,87,0.00006562471389770508],[72,88,0.00002110004425048828],[72,89,0.000009119510650634766],[72,90,0.000029802322387695312],[72,91,0.0000020265579223632812],[72,92,0.00004482269287109375],[72,93,0.000011026859283447266],[72,94,0.00006872415542602539],[72,95,0.38037109375],[72,96,0.00007683038711547852],[72,97,0.90185546875],[72,98,0.00004100799560546875],[72,99,0.00004750490188598633],[72,100,0.00002205371856689453],[72,101,0.00003546476364135742],[72,102,0.0006647109985351562],[72,103,0.000058650970458984375],[72,104,0.000021398067474365234],[72,105,0.000004172325134277344],[72,106,0.0000037550926208496094],[72,107,0.000003337860107421875],[72,108,0.000019848346710205078],[72,109,0.000002205371856689453],[72,110,0.0000029206275939941406],[72,111,0.000004231929779052734],[72,112,0.0000010728836059570312],[72,113,0.0000019669532775878906],[72,114,0.0000035762786865234375],[72,115,0.000011086463928222656],[72,116,0.000014066696166992188],[72,117,0.00005072355270385742],[72,118,0.00007283687591552734],[72,119,0.000037610530853271484],[72,120,0.000013649463653564453],[72,121,0.000006556510925292969],[72,122,0.000011920928955078125],[72,123,0.000057637691497802734],[72,124,0.96826171875],[72,125,0.47705078125],[72,126,0.9970703125],[72,127,0.0007467269897460938],[72,128,0.00045013427734375],[72,129,0.000022530555725097656],[72,130,0.000012636184692382812],[72,131,0.99365234375],[72,132,0.99951171875],[72,133,0.292236328125],[72,134,0.9228515625],[72,135,0.000012695789337158203],[72,136,0.000016689300537109375],[72,137,0.000005781650543212891],[72,138,0.0000438690185546875],[72,139,0.00006502866744995117],[72,140,0.0001399517059326172],[72,141,0.0000998377799987793],[72,142,0.0001323223114013672],[72,143,0.00007027387619018555],[72,144,0.0000635981559753418],[72,145,0.000046193599700927734],[72,146,0.00006777048110961914],[72,147,0.00003629922866821289],[72,148,0.000021159648895263672],[72,149,0.000023186206817626953],[72,150,0.000006139278411865234],[72,151,0.000041544437408447266],[72,152,0.0002199411392211914],[72,153,0.0003681182861328125],[73,73,0.00001895427703857422],[73,74,0.99951171875],[73,75,0.9951171875],[73,76,0.998046875],[73,77,0.00003546476364135742],[73,78,0.000046312808990478516],[73,79,0.0000032782554626464844],[73,80,7.748603820800781e-7],[73,81,0.000003039836883544922],[73,82,0.000008463859558105469],[73,83,0.00002753734588623047],[73,84,0.00007474422454833984],[73,85,0.00003606081008911133],[73,86,0.000017523765563964844],[73,87,0.00001537799835205078],[73,88,0.00004106760025024414],[73,89,0.000026524066925048828],[73,90,0.000005304813385009766],[73,91,1.7881393432617188e-7],[73,92,0.0000017285346984863281],[73,93,5.960464477539062e-7],[73,94,0.000011444091796875],[73,95,0.0009613037109375],[73,96,0.000005662441253662109],[73,97,0.000019788742065429688],[73,98,6.556510925292969e-7],[73,99,4.172325134277344e-7],[73,100,0.0000030994415283203125],[73,101,0.00001800060272216797],[73,102,0.0001589059829711914],[73,103,0.00003212690353393555],[73,104,0.000005841255187988281],[73,105,0.000003516674041748047],[73,106,0.0000045299530029296875],[73,107,8.940696716308594e-7],[73,108,7.152557373046875e-7],[73,109,1.7881393432617188e-7],[73,110,7.748603820800781e-7],[73,111,0.000025928020477294922],[73,112,0.000005662441253662109],[73,113,0.000006318092346191406],[73,114,0.000011026859283447266],[73,115,0.000003159046173095703],[73,116,0.000035822391510009766],[73,117,0.000026702880859375],[73,118,0.00002676248550415039],[73,119,0.000021517276763916016],[73,120,0.00001138448715209961],[73,121,0.0000032782554626464844],[73,122,0.0000010728836059570312],[73,123,0.0000011920928955078125],[73,124,0.000006616115570068359],[73,125,0.000018715858459472656],[73,126,0.97607421875],[73,127,0.0001628398895263672],[73,128,0.0003490447998046875],[73,129,0.00017321109771728516],[73,130,0.0009589195251464844],[73,131,0.99853515625],[73,132,0.247802734375],[73,133,0.000012993812561035156],[73,134,0.000011682510375976562],[73,135,0.0000016689300537109375],[73,136,0.000006318092346191406],[73,137,0.00001341104507446289],[73,138,0.00005704164505004883],[73,139,0.0000362396240234375],[73,140,0.00005221366882324219],[73,141,0.00005918741226196289],[73,142,0.00007659196853637695],[73,143,0.0000432133674621582],[73,144,0.000045180320739746094],[73,145,0.00006151199340820312],[73,146,0.00004464387893676758],[73,147,0.000024378299713134766],[73,148,0.00010460615158081055],[73,149,0.000012278556823730469],[73,150,0.000027060508728027344],[73,151,0.00003796815872192383],[73,152,0.0003452301025390625],[73,153,0.0001138448715209961],[74,74,2.384185791015625e-7],[74,75,1],[74,76,0.98583984375],[74,77,0.00006514787673950195],[74,78,0.000026404857635498047],[74,79,0.000009059906005859375],[74,80,0.000016868114471435547],[74,81,0.00005936622619628906],[74,82,0.00007069110870361328],[74,83,0.000051856040954589844],[74,84,0.00005990266799926758],[74,85,0.00003695487976074219],[74,86,0.000044286251068115234],[74,87,0.000041484832763671875],[74,88,0.0001074075698852539],[74,89,0.00003641843795776367],[74,90,0.000006318092346191406],[74,91,0.000002086162567138672],[74,92,0.000007331371307373047],[74,93,8.344650268554688e-7],[74,94,0.000034749507904052734],[74,95,0.2587890625],[74,96,0.0019369125366210938],[74,97,0.0002942085266113281],[74,98,0.000017821788787841797],[74,99,0.0000018477439880371094],[74,100,0.00001329183578491211],[74,101,0.00007325410842895508],[74,102,0.00029587745666503906],[74,103,0.00010132789611816406],[74,104,0.000045359134674072266],[74,105,0.0000032186508178710938],[74,106,0.0000010132789611816406],[74,107,0.000001430511474609375],[74,108,0.000002086162567138672],[74,109,0.0000011920928955078125],[74,110,0.000003337860107421875],[74,111,0.000012993812561035156],[74,112,0.000006854534149169922],[74,113,0.000023245811462402344],[74,114,0.000015020370483398438],[74,115,0.000007748603820800781],[74,116,0.00006365776062011719],[74,117,0.00003504753112792969],[74,118,0.00003647804260253906],[74,119,0.000025033950805664062],[74,120,0.00004118680953979492],[74,121,0.000029921531677246094],[74,122,0.0000030994415283203125],[74,123,0.000004649162292480469],[74,124,0.000007927417755126953],[74,125,0.0001773834228515625],[74,126,0.9990234375],[74,127,0.572265625],[74,128,0.99560546875],[74,129,0.99267578125],[74,130,0.99365234375],[74,131,0.99560546875],[74,132,0.6005859375],[74,133,0.000006258487701416016],[74,134,0.0000027418136596679688],[74,135,0.0000034570693969726562],[74,136,0.000008225440979003906],[74,137,0.000017762184143066406],[74,138,0.00005322694778442383],[74,139,0.000021576881408691406],[74,140,0.000025033950805664062],[74,141,0.00004082918167114258],[74,142,0.000027239322662353516],[74,143,0.000022411346435546875],[74,144,0.000027894973754882812],[74,145,0.000036716461181640625],[74,146,0.00003796815872192383],[74,147,0.000037729740142822266],[74,148,0.00006538629531860352],[74,149,0.00006145238876342773],[74,150,0.00004696846008300781],[74,151,0.0002605915069580078],[74,152,0.0002551078796386719],[74,153,0.00010329484939575195],[75,75,0.011871337890625],[75,76,0.998046875],[75,77,0.2100830078125],[75,78,0.00009334087371826172],[75,79,0.000009357929229736328],[75,80,0.00000286102294921875],[75,81,0.000011563301086425781],[75,82,0.000014066696166992188],[75,83,0.00005620718002319336],[75,84,0.00007718801498413086],[75,85,0.000026702880859375],[75,86,0.00003594160079956055],[75,87,0.000021576881408691406],[75,88,0.000027298927307128906],[75,89,0.000020444393157958984],[75,90,0.000018298625946044922],[75,91,0.0000054836273193359375],[75,92,0.0000064373016357421875],[75,93,7.748603820800781e-7],[75,94,0.000002682209014892578],[75,95,0.00003921985626220703],[75,96,0.000015556812286376953],[75,97,0.00003534555435180664],[75,98,0.00004374980926513672],[75,99,0.0000035762786865234375],[75,100,0.00001138448715209961],[75,101,0.00009351968765258789],[75,102,0.0005965232849121094],[75,103,0.0002092123031616211],[75,104,0.0001531839370727539],[75,105,0.000011086463928222656],[75,106,0.0000027418136596679688],[75,107,0.0000016689300537109375],[75,108,0.000005125999450683594],[75,109,0.0000030994415283203125],[75,110,0.00001800060272216797],[75,111,0.000274658203125],[75,112,0.0002048015594482422],[75,113,0.00010263919830322266],[75,114,0.00009179115295410156],[75,115,0.00003546476364135742],[75,116,0.00006496906280517578],[75,117,0.00004416704177856445],[75,118,0.000045239925384521484],[75,119,0.00003218650817871094],[75,120,0.00011169910430908203],[75,121,0.00002294778823852539],[75,122,0.0000020265579223632812],[75,123,0.000010788440704345703],[75,124,0.00001901388168334961],[75,125,0.05987548828125],[75,126,0.9912109375],[75,127,0.2393798828125],[75,128,0.0552978515625],[75,129,0.045135498046875],[75,130,0.00013077259063720703],[75,131,0.00007838010787963867],[75,132,0.00005841255187988281],[75,133,0.000002384185791015625],[75,134,0.000006496906280517578],[75,135,0.000017464160919189453],[75,136,0.00015878677368164062],[75,137,0.00003236532211303711],[75,138,0.000052928924560546875],[75,139,0.000017762184143066406],[75,140,0.000035822391510009766],[75,141,0.0000374913215637207],[75,142,0.000034809112548828125],[75,143,0.00002849102020263672],[75,144,0.000027120113372802734],[75,145,0.00004291534423828125],[75,146,0.00006395578384399414],[75,147,0.00008660554885864258],[75,148,0.0001348257064819336],[75,149,0.000024199485778808594],[75,150,0.00005638599395751953],[75,151,0.00018453598022460938],[75,152,0.0003571510314941406],[75,153,0.0004858970642089844],[76,76,0.00019240379333496094],[76,77,0.9990234375],[76,78,0.83642578125],[76,79,0.00010901689529418945],[76,80,0.000012636184692382812],[76,81,0.00001233816146850586],[76,82,0.000011146068572998047],[76,83,0.000029385089874267578],[76,84,0.00008851289749145508],[76,85,0.00007510185241699219],[76,86,0.00004589557647705078],[76,87,0.000014662742614746094],[76,88,0.000007808208465576172],[76,89,0.000021338462829589844],[76,90,0.000006377696990966797],[76,91,5.960464477539062e-7],[76,92,0.0000016689300537109375],[76,93,4.76837158203125e-7],[76,94,0.0000016093254089355469],[76,95,0.000028789043426513672],[76,96,0.0000030994415283203125],[76,97,0.00017392635345458984],[76,98,0.000011086463928222656],[76,99,0.000002384185791015625],[76,100,0.000007152557373046875],[76,101,0.000005245208740234375],[76,102,0.00011044740676879883],[76,103,0.000053942203521728516],[76,104,0.000029265880584716797],[76,105,0.000003516674041748047],[76,106,2.980232238769531e-7],[76,107,4.172325134277344e-7],[76,108,0.0000011324882507324219],[76,109,5.364418029785156e-7],[76,110,0.000004172325134277344],[76,111,0.00008434057235717773],[76,112,0.000010609626770019531],[76,113,0.000014483928680419922],[76,114,0.000003635883331298828],[76,115,0.000005125999450683594],[76,116,0.000009655952453613281],[76,117,0.000009894371032714844],[76,118,0.00006175041198730469],[76,119,0.00009262561798095703],[76,120,0.00002092123031616211],[76,121,0.000004410743713378906],[76,122,0.000006794929504394531],[76,123,0.000018775463104248047],[76,124,0.006443023681640625],[76,125,0.66259765625],[76,126,0.9970703125],[76,127,0.0003445148468017578],[76,128,0.00007027387619018555],[76,129,0.00008153915405273438],[76,130,0.000007927417755126953],[76,131,0.023162841796875],[76,132,0.14990234375],[76,133,0.0000028014183044433594],[76,134,0.00002396106719970703],[76,135,0.0000011920928955078125],[76,136,0.000009179115295410156],[76,137,0.000023365020751953125],[76,138,0.00006812810897827148],[76,139,0.00003439188003540039],[76,140,0.00006443262100219727],[76,141,0.00007623434066772461],[76,142,0.00006604194641113281],[76,143,0.000060617923736572266],[76,144,0.0000616312026977539],[76,145,0.00007009506225585938],[76,146,0.0001518726348876953],[76,147,0.00006264448165893555],[76,148,0.00003123283386230469],[76,149,0.000009715557098388672],[76,150,0.00002491474151611328],[76,151,0.00001990795135498047],[76,152,0.0003597736358642578],[76,153,0.003650665283203125],[77,77,0.00021648406982421875],[77,78,0.99951171875],[77,79,0.8369140625],[77,80,0.08544921875],[77,81,0.00006568431854248047],[77,82,0.000007808208465576172],[77,83,0.000017762184143066406],[77,84,0.000048995018005371094],[77,85,0.00004178285598754883],[77,86,0.000028967857360839844],[77,87,0.000015497207641601562],[77,88,0.0000029206275939941406],[77,89,0.000008046627044677734],[77,90,0.000008881092071533203],[77,91,1.1920928955078125e-7],[77,92,7.748603820800781e-7],[77,93,4.172325134277344e-7],[77,94,0.0000010132789611816406],[77,95,0.000004470348358154297],[77,96,0.0000013709068298339844],[77,97,0.0008535385131835938],[77,98,0.0416259765625],[77,99,0.0001468658447265625],[77,100,0.0357666015625],[77,101,0.00009435415267944336],[77,102,0.00016880035400390625],[77,103,0.000026345252990722656],[77,104,0.000011861324310302734],[77,105,0.000016391277313232422],[77,106,7.748603820800781e-7],[77,107,2.980232238769531e-7],[77,108,0.0000010132789611816406],[77,109,4.76837158203125e-7],[77,110,0.00000286102294921875],[77,111,0.00003337860107421875],[77,112,0.0000015497207641601562],[77,113,0.0000013113021850585938],[77,114,0.0000011920928955078125],[77,115,0.0000029206275939941406],[77,116,0.00000959634780883789],[77,117,0.00001043081283569336],[77,118,0.00004953145980834961],[77,119,0.000040531158447265625],[77,120,0.000007212162017822266],[77,121,0.000010848045349121094],[77,122,0.000015020370483398438],[77,123,0.9892578125],[77,124,0.95947265625],[77,125,0.99853515625],[77,126,0.88134765625],[77,127,0.005168914794921875],[77,128,0.00004184246063232422],[77,129,0.0000057220458984375],[77,130,0.0000011324882507324219],[77,131,0.000006854534149169922],[77,132,0.00012731552124023438],[77,133,0.0000010132789611816406],[77,134,0.000008344650268554688],[77,135,1.1920928955078125e-7],[77,136,0.000004172325134277344],[77,137,0.000003635883331298828],[77,138,0.000011801719665527344],[77,139,0.000004112720489501953],[77,140,0.000019729137420654297],[77,141,0.00005984306335449219],[77,142,0.00003153085708618164],[77,143,0.000032961368560791016],[77,144,0.00002968311309814453],[77,145,0.0000368952751159668],[77,146,0.00005429983139038086],[77,147,0.000021159648895263672],[77,148,0.0000368952751159668],[77,149,0.000005662441253662109],[77,150,0.00007444620132446289],[77,151,0.00025177001953125],[77,152,0.032135009765625],[77,153,0.382080078125],[78,78,0.000008821487426757812],[78,79,0.9990234375],[78,80,0.2384033203125],[78,81,0.65234375],[78,82,0.00004786252975463867],[78,83,0.00004780292510986328],[78,84,0.000019073486328125],[78,85,0.000024020671844482422],[78,86,0.000007331371307373047],[78,87,0.000010073184967041016],[78,88,0.0000845789909362793],[78,89,0.000007212162017822266],[78,90,0.0005822181701660156],[78,91,0.000002682209014892578],[78,92,0.0000034570693969726562],[78,93,0.0000064373016357421875],[78,94,0.000005424022674560547],[78,95,0.000008404254913330078],[78,96,0.000003159046173095703],[78,97,0.0086822509765625],[78,98,0.0000941157341003418],[78,99,0.00559234619140625],[78,100,0.00479888916015625],[78,101,0.0001270771026611328],[78,102,0.00003927946090698242],[78,103,0.000008225440979003906],[78,104,0.000002205371856689453],[78,105,0.00000667572021484375],[78,106,8.940696716308594e-7],[78,107,8.940696716308594e-7],[78,108,0.000003635883331298828],[78,109,0.0000019073486328125],[78,110,0.0000033974647521972656],[78,111,0.0000152587890625],[78,112,0.0000013113021850585938],[78,113,0.0000025033950805664062],[78,114,0.000006973743438720703],[78,115,0.0000033974647521972656],[78,116,0.00005453824996948242],[78,117,0.000002562999725341797],[78,118,0.0000029802322387695312],[78,119,0.0000036954879760742188],[78,120,0.0000021457672119140625],[78,121,0.00001138448715209961],[78,122,0.1845703125],[78,123,0.9970703125],[78,124,0.998046875],[78,125,0.841796875],[78,126,0.0030918121337890625],[78,127,0.000025510787963867188],[78,128,0.000006020069122314453],[78,129,0.0000050067901611328125],[78,130,0.0000030994415283203125],[78,131,0.0000069141387939453125],[78,132,0.0015897750854492188],[78,133,0.000007033348083496094],[78,134,0.0184173583984375],[78,135,0.000004470348358154297],[78,136,0.0005741119384765625],[78,137,0.000003039836883544922],[78,138,0.000014185905456542969],[78,139,0.000010848045349121094],[78,140,0.000012755393981933594],[78,141,0.00011748075485229492],[78,142,0.00009769201278686523],[78,143,0.000042438507080078125],[78,144,0.000051140785217285156],[78,145,0.00023865699768066406],[78,146,0.00003820657730102539],[78,147,0.000021219253540039062],[78,148,0.000762939453125],[78,149,0.000029146671295166016],[78,150,0.0011320114135742188],[78,151,0.0004153251647949219],[78,152,0.0035247802734375],[78,153,0.09246826171875],[79,79,0.000022590160369873047],[79,80,0.99951171875],[79,81,0.99755859375],[79,82,0.00006079673767089844],[79,83,0.00003898143768310547],[79,84,0.000004947185516357422],[79,85,0.000005304813385009766],[79,86,5.364418029785156e-7],[79,87,0.0000013113021850585938],[79,88,0.000010609626770019531],[79,89,0.0000022649765014648438],[79,90,0.00001615285873413086],[79,91,0.000002086162567138672],[79,92,0.0000022649765014648438],[79,93,0.0000393986701965332],[79,94,0.000038623809814453125],[79,95,0.000003874301910400391],[79,96,5.960464477539062e-7],[79,97,0.000007092952728271484],[79,98,0.000004827976226806641],[79,99,0.000013768672943115234],[79,100,0.00036644935607910156],[79,101,0.00006598234176635742],[79,102,0.00008022785186767578],[79,103,0.000012159347534179688],[79,104,0.0000017285346984863281],[79,105,0.000002205371856689453],[79,106,8.344650268554688e-7],[79,107,6.556510925292969e-7],[79,108,0.000003039836883544922],[79,109,0.0000095367431640625],[79,110,0.00004589557647705078],[79,111,0.00010579824447631836],[79,112,0.00010412931442260742],[79,113,0.000026166439056396484],[79,114,0.0000040531158447265625],[79,115,0.0000018477439880371094],[79,116,0.000018537044525146484],[79,117,5.364418029785156e-7],[79,118,0.0000016093254089355469],[79,119,0.0000032186508178710938],[79,120,0.0000023245811462402344],[79,121,0.000042557716369628906],[79,122,0.00015354156494140625],[79,123,0.97705078125],[79,124,0.0023040771484375],[79,125,0.0004189014434814453],[79,126,0.000017583370208740234],[79,127,0.0000050067901611328125],[79,128,0.00002086162567138672],[79,129,0.00005418062210083008],[79,130,0.00003343820571899414],[79,131,0.000004589557647705078],[79,132,0.0000027418136596679688],[79,133,7.748603820800781e-7],[79,134,0.000005841255187988281],[79,135,7.748603820800781e-7],[79,136,0.000011801719665527344],[79,137,0.0000018477439880371094],[79,138,0.0000036954879760742188],[79,139,0.000012934207916259766],[79,140,0.000032782554626464844],[79,141,0.000213623046875],[79,142,0.00010824203491210938],[79,143,0.000029385089874267578],[79,144,0.00003910064697265625],[79,145,0.0004401206970214844],[79,146,0.00004744529724121094],[79,147,0.000021636486053466797],[79,148,0.021575927734375],[79,149,0.0001590251922607422],[79,150,0.97314453125],[79,151,0.409423828125],[79,152,0.7080078125],[79,153,0.7255859375],[80,80,0.0000171661376953125],[80,81,0.9970703125],[80,82,0.1390380859375],[80,83,0.0001971721649169922],[80,84,0.000016927719116210938],[80,85,0.000007510185241699219],[80,86,0.0000020265579223632812],[80,87,0.000004470348358154297],[80,88,0.00001436471939086914],[80,89,0.0000022649765014648438],[80,90,0.00002777576446533203],[80,91,0.000010848045349121094],[80,92,0.000007510185241699219],[80,93,0.00007230043411254883],[80,94,0.00022292137145996094],[80,95,0.00005638599395751953],[80,96,0.000004351139068603516],[80,97,0.0000069141387939453125],[80,98,0.000004112720489501953],[80,99,0.00015878677368164062],[80,100,0.732421875],[80,101,0.01290130615234375],[80,102,0.0386962890625],[80,103,0.0030956268310546875],[80,104,0.00006496906280517578],[80,105,0.000034689903259277344],[80,106,0.000004827976226806641],[80,107,0.000003337860107421875],[80,108,0.0000037550926208496094],[80,109,0.00005638599395751953],[80,110,0.00014328956604003906],[80,111,0.00014853477478027344],[80,112,0.00011181831359863281],[80,113,0.000012993812561035156],[80,114,0.0000029802322387695312],[80,115,0.0000016093254089355469],[80,116,0.0000451207160949707],[80,117,0.0000016093254089355469],[80,118,0.000004947185516357422],[80,119,0.00003069639205932617],[80,120,0.000018298625946044922],[80,121,0.98291015625],[80,122,0.92724609375],[80,123,0.9990234375],[80,124,0.0002644062042236328],[80,125,0.0000743865966796875],[80,126,0.0000034570693969726562],[80,127,0.000007212162017822266],[80,128,0.00003975629806518555],[80,129,0.00007802248001098633],[80,130,0.00006389617919921875],[80,131,0.000017523765563964844],[80,132,0.000006318092346191406],[80,133,0.0000028014183044433594],[80,134,0.000019669532775878906],[80,135,0.0000028014183044433594],[80,136,0.0000247955322265625],[80,137,0.0000018477439880371094],[80,138,0.000006139278411865234],[80,139,0.000008702278137207031],[80,140,0.00004398822784423828],[80,141,0.00020062923431396484],[80,142,0.0002777576446533203],[80,143,0.0001042485237121582],[80,144,0.000034332275390625],[80,145,0.00006145238876342773],[80,146,0.000014126300811767578],[80,147,0.00001043081283569336],[80,148,0.00023865699768066406],[80,149,0.00012373924255371094],[80,150,0.86767578125],[80,151,0.9794921875],[80,152,0.86474609375],[80,153,0.58984375],[81,81,0.000031113624572753906],[81,82,0.9990234375],[81,83,0.92333984375],[81,84,0.00021648406982421875],[81,85,0.000027418136596679688],[81,86,0.0000851750373840332],[81,87,0.000019788742065429688],[81,88,0.0010223388671875],[81,89,0.0000033974647521972656],[81,90,0.000019669532775878906],[81,91,0.0000034570693969726562],[81,92,0.000005125999450683594],[81,93,0.0001519918441772461],[81,94,0.0002613067626953125],[81,95,0.00016117095947265625],[81,96,0.000020384788513183594],[81,97,0.000007987022399902344],[81,98,0.0000019073486328125],[81,99,0.000010967254638671875],[81,100,0.0001590251922607422],[81,101,0.00026226043701171875],[81,102,0.0009160041809082031],[81,103,0.00003743171691894531],[81,104,0.0000033974647521972656],[81,105,0.0000027418136596679688],[81,106,0.00000286102294921875],[81,107,0.0000073909759521484375],[81,108,0.00000858306884765625],[81,109,0.00003504753112792969],[81,110,0.00014269351959228516],[81,111,0.00007110834121704102],[81,112,0.00004988908767700195],[81,113,0.000002562999725341797],[81,114,0.0000019669532775878906],[81,115,0.0000010132789611816406],[81,116,0.0008783340454101562],[81,117,0.000006318092346191406],[81,118,0.000015556812286376953],[81,119,0.00011974573135375977],[81,120,0.00004684925079345703],[81,121,0.95751953125],[81,122,0.990234375],[81,123,0.9619140625],[81,124,0.000553131103515625],[81,125,0.000006377696990966797],[81,126,0.000008702278137207031],[81,127,0.00003927946090698242],[81,128,0.000039458274841308594],[81,129,0.00003457069396972656],[81,130,0.00003790855407714844],[81,131,0.000016391277313232422],[81,132,0.000011920928955078125],[81,133,0.0000019073486328125],[81,134,0.000004291534423828125],[81,135,8.344650268554688e-7],[81,136,0.00002944469451904297],[81,137,8.344650268554688e-7],[81,138,0.000024318695068359375],[81,139,0.00000476837158203125],[81,140,0.000017464160919189453],[81,141,0.00004988908767700195],[81,142,0.00014328956604003906],[81,143,0.0002872943878173828],[81,144,0.0006055831909179688],[81,145,0.007843017578125],[81,146,0.000537872314453125],[81,147,0.0005130767822265625],[81,148,0.99267578125],[81,149,0.990234375],[81,150,0.99560546875],[81,151,0.9375],[81,152,0.08135986328125],[81,153,0.054229736328125],[82,82,0.000022292137145996094],[82,83,0.998046875],[82,84,0.9892578125],[82,85,0.0001289844512939453],[82,86,0.000568389892578125],[82,87,0.00009572505950927734],[82,88,0.00044155120849609375],[82,89,0.0000018477439880371094],[82,90,0.000010848045349121094],[82,91,0.000005304813385009766],[82,92,0.000012695789337158203],[82,93,0.00011342763900756836],[82,94,0.0001347064971923828],[82,95,0.0000769495964050293],[82,96,0.0000355839729309082],[82,97,0.000004291534423828125],[82,98,5.960464477539062e-7],[82,99,0.000016748905181884766],[82,100,0.000050902366638183594],[82,101,0.0035076141357421875],[82,102,0.049407958984375],[82,103,0.0003631114959716797],[82,104,0.00001239776611328125],[82,105,0.0000026226043701171875],[82,106,0.0000045299530029296875],[82,107,0.000018477439880371094],[82,108,0.000010669231414794922],[82,109,0.000014543533325195312],[82,110,0.00007772445678710938],[82,111,0.00004857778549194336],[82,112,0.000017881393432617188],[82,113,0.0000015497207641601562],[82,114,0.0000017881393432617188],[82,115,0.000006079673767089844],[82,116,0.006725311279296875],[82,117,0.00015211105346679688],[82,118,0.027252197265625],[82,119,0.97705078125],[82,120,0.9599609375],[82,121,0.99853515625],[82,122,0.89453125],[82,123,0.000024318695068359375],[82,124,0.000009357929229736328],[82,125,0.000005424022674560547],[82,126,0.0000641942024230957],[82,127,0.00005257129669189453],[82,128,0.000046253204345703125],[82,129,0.000022292137145996094],[82,130,0.000015854835510253906],[82,131,0.000014841556549072266],[82,132,0.000014960765838623047],[82,133,0.0000020265579223632812],[82,134,0.0000029206275939941406],[82,135,7.152557373046875e-7],[82,136,0.000014960765838623047],[82,137,1.1920928955078125e-7],[82,138,0.000018894672393798828],[82,139,0.0000019669532775878906],[82,140,0.000041544437408447266],[82,141,0.000029206275939941406],[82,142,0.00011414289474487305],[82,143,0.00011670589447021484],[82,144,0.00005549192428588867],[82,145,0.00009620189666748047],[82,146,0.0001556873321533203],[82,147,0.0012722015380859375],[82,148,0.880859375],[82,149,0.99462890625],[82,150,0.161376953125],[82,151,0.85009765625],[82,152,0.00402069091796875],[82,153,0.00168609619140625],[83,83,0.000019252300262451172],[83,84,0.9951171875],[83,85,0.95458984375],[83,86,0.9912109375],[83,87,0.830078125],[83,88,0.9853515625],[83,89,0.00004124641418457031],[83,90,0.00006592273712158203],[83,91,0.000010073184967041016],[83,92,0.000016570091247558594],[83,93,0.00010818243026733398],[83,94,0.00013589859008789062],[83,95,0.00008827447891235352],[83,96,0.0000451207160949707],[83,97,0.000012934207916259766],[83,98,0.00000286102294921875],[83,99,0.000018715858459472656],[83,100,0.000008702278137207031],[83,101,0.00021064281463623047],[83,102,0.00021505355834960938],[83,103,0.000017523765563964844],[83,104,0.0000045299530029296875],[83,105,0.000003933906555175781],[83,106,0.000014066696166992188],[83,107,0.00002968311309814453],[83,108,0.0000336766242980957],[83,109,0.000028133392333984375],[83,110,0.0001220703125],[83,111,0.000038564205169677734],[83,112,0.000014722347259521484],[83,113,0.0000034570693969726562],[83,114,0.000013232231140136719],[83,115,0.00009834766387939453],[83,116,0.8603515625],[83,117,0.0823974609375],[83,118,0.9931640625],[83,119,0.8583984375],[83,120,0.7236328125],[83,121,0.0029773712158203125],[83,122,0.478271484375],[83,123,0.00003057718276977539],[83,124,0.000010251998901367188],[83,125,0.000014185905456542969],[83,126,0.00007998943328857422],[83,127,0.00009274482727050781],[83,128,0.00004982948303222656],[83,129,0.00002300739288330078],[83,130,0.000014722347259521484],[83,131,0.000008225440979003906],[83,132,0.000018894672393798828],[83,133,0.00001424551010131836],[83,134,0.00001901388168334961],[83,135,0.000004112720489501953],[83,136,0.0006389617919921875],[83,137,0.000006139278411865234],[83,138,0.57177734375],[83,139,0.0006265640258789062],[83,140,0.382080078125],[83,141,0.0032558441162109375],[83,142,0.0264739990234375],[83,143,0.02288818359375],[83,144,0.0036468505859375],[83,145,0.0026226043701171875],[83,146,0.0006461143493652344],[83,147,0.986328125],[83,148,0.990234375],[83,149,0.3828125],[83,150,0.00018084049224853516],[83,151,0.0002961158752441406],[83,152,0.00005739927291870117],[83,153,0.00004857778549194336],[84,84,0.000019490718841552734],[84,85,0.9970703125],[84,86,0.76611328125],[84,87,0.0003085136413574219],[84,88,0.00018835067749023438],[84,89,0.0000028014183044433594],[84,90,0.000008046627044677734],[84,91,0.000028014183044433594],[84,92,0.000043451786041259766],[84,93,0.00017189979553222656],[84,94,0.00009036064147949219],[84,95,0.00007355213165283203],[84,96,0.00005882978439331055],[84,97,0.00011968612670898438],[84,98,0.000015795230865478516],[84,99,0.00002765655517578125],[84,100,0.000005304813385009766],[84,101,0.00001811981201171875],[84,102,0.00008338689804077148],[84,103,0.00008732080459594727],[84,104,0.0001252889633178711],[84,105,0.00005346536636352539],[84,106,0.00016546249389648438],[84,107,0.0000743865966796875],[84,108,0.0001302957534790039],[84,109,0.00006496906280517578],[84,110,0.00009173154830932617],[84,111,0.00009119510650634766],[84,112,0.00004655122756958008],[84,113,0.000031948089599609375],[84,114,0.000003993511199951172],[84,115,0.000010073184967041016],[84,116,0.00008022785186767578],[84,117,0.00025963783264160156],[84,118,0.939453125],[84,119,0.888671875],[84,120,0.00034618377685546875],[84,121,0.00011360645294189453],[84,122,0.00006133317947387695],[84,123,0.0000021457672119140625],[84,124,0.000009357929229736328],[84,125,0.000018715858459472656],[84,126,0.00010859966278076172],[84,127,0.0000655055046081543],[84,128,0.00005167722702026367],[84,129,0.000018537044525146484],[84,130,0.000013887882232666016],[84,131,0.000015556812286376953],[84,132,0.000013649463653564453],[84,133,0.000009357929229736328],[84,134,0.00007671117782592773],[84,135,0.000009655952453613281],[84,136,0.000029802322387695312],[84,137,0.0000010728836059570312],[84,138,0.00008809566497802734],[84,139,0.000015854835510253906],[84,140,0.016448974609375],[84,141,0.01314544677734375],[84,142,0.213623046875],[84,143,0.005374908447265625],[84,144,0.0041961669921875],[84,145,0.0011968612670898438],[84,146,0.034942626953125],[84,147,0.9697265625],[84,148,0.6220703125],[84,149,0.974609375],[84,150,0.000179290771484375],[84,151,0.00025534629821777344],[84,152,0.00013327598571777344],[84,153,0.00009882450103759766],[85,85,0.0007305145263671875],[85,86,0.9990234375],[85,87,0.002201080322265625],[85,88,0.00015795230865478516],[85,89,0.000009000301361083984],[85,90,0.000007569789886474609],[85,91,0.000133514404296875],[85,92,0.00004851818084716797],[85,93,0.00011724233627319336],[85,94,0.00003904104232788086],[85,95,0.00004762411117553711],[85,96,0.00002390146255493164],[85,97,0.00011336803436279297],[85,98,0.00010496377944946289],[85,99,0.0003571510314941406],[85,100,0.000049173831939697266],[85,101,0.000011622905731201172],[85,102,0.00003224611282348633],[85,103,0.0001590251922607422],[85,104,0.00010907649993896484],[85,105,0.00008738040924072266],[85,106,0.00015342235565185547],[85,107,0.00006151199340820312],[85,108,0.00010544061660766602],[85,109,0.00005501508712768555],[85,110,0.00009799003601074219],[85,111,0.00011324882507324219],[85,112,0.00021147727966308594],[85,113,0.00006103515625],[85,114,0.000002205371856689453],[85,115,0.00000762939453125],[85,116,0.0000286102294921875],[85,117,0.0001424551010131836],[85,118,0.96875],[85,119,0.02740478515625],[85,120,0.00004172325134277344],[85,121,0.0000045299530029296875],[85,122,0.000005602836608886719],[85,123,0.000004649162292480469],[85,124,0.000026941299438476562],[85,125,0.0000718832015991211],[85,126,0.00004476308822631836],[85,127,0.00003737211227416992],[85,128,0.000033020973205566406],[85,129,0.000013768672943115234],[85,130,0.000011742115020751953],[85,131,0.000010848045349121094],[85,132,0.000025153160095214844],[85,133,0.000018358230590820312],[85,134,0.00009256601333618164],[85,135,0.0000851750373840332],[85,136,0.00006479024887084961],[85,137,0.000005900859832763672],[85,138,0.0010662078857421875],[85,139,0.00032329559326171875],[85,140,0.9697265625],[85,141,0.90283203125],[85,142,0.88818359375],[85,143,0.1807861328125],[85,144,0.050872802734375],[85,145,0.001983642578125],[85,146,0.048797607421875],[85,147,0.97607421875],[85,148,0.0014810562133789062],[85,149,0.0005292892456054688],[85,150,0.000011682510375976562],[85,151,0.00002950429916381836],[85,152,0.0005216598510742188],[85,153,0.00039768218994140625],[86,86,0.000006258487701416016],[86,87,0.99755859375],[86,88,0.994140625],[86,89,0.000023365020751953125],[86,90,0.000006616115570068359],[86,91,0.000007033348083496094],[86,92,0.00001633167266845703],[86,93,0.00007855892181396484],[86,94,0.00007539987564086914],[86,95,0.00006628036499023438],[86,96,0.000016033649444580078],[86,97,0.000020325183868408203],[86,98,0.000025212764739990234],[86,99,0.000013947486877441406],[86,100,0.0000017881393432617188],[86,101,0.00000762939453125],[86,102,0.000010788440704345703],[86,103,0.00007367134094238281],[86,104,0.000029325485229492188],[86,105,0.0000616312026977539],[86,106,0.000024497509002685547],[86,107,0.00001537799835205078],[86,108,0.00004225969314575195],[86,109,0.000041604042053222656],[86,110,0.00013947486877441406],[86,111,0.0002505779266357422],[86,112,0.00003534555435180664],[86,113,0.000026285648345947266],[86,114,0.000005125999450683594],[86,115,0.000038564205169677734],[86,116,0.00115966796875],[86,117,0.00025534629821777344],[86,118,0.9892578125],[86,119,0.0002048015594482422],[86,120,0.000023663043975830078],[86,121,0.000002384185791015625],[86,122,0.000011324882507324219],[86,123,9.5367431640625e-7],[86,124,0.000007510185241699219],[86,125,0.000019490718841552734],[86,126,0.00005620718002319336],[86,127,0.00003784894943237305],[86,128,0.00003141164779663086],[86,129,0.000016629695892333984],[86,130,0.000014781951904296875],[86,131,0.000014722347259521484],[86,132,0.000024199485778808594],[86,133,0.000009834766387939453],[86,134,0.000009357929229736328],[86,135,9.5367431640625e-7],[86,136,0.0002982616424560547],[86,137,0.00008082389831542969],[86,138,0.98876953125],[86,139,0.9814453125],[86,140,0.98095703125],[86,141,0.5888671875],[86,142,0.82568359375],[86,143,0.81787109375],[86,144,0.06304931640625],[86,145,0.002880096435546875],[86,146,0.00201416015625],[86,147,0.96875],[86,148,0.059844970703125],[86,149,0.0000794529914855957],[86,150,0.000006318092346191406],[86,151,0.000009179115295410156],[86,152,0.0009207725524902344],[86,153,0.0005464553833007812],[87,87,0.000026226043701171875],[87,88,0.998046875],[87,89,0.64599609375],[87,90,0.000011801719665527344],[87,91,0.0000037550926208496094],[87,92,8.940696716308594e-7],[87,93,0.000011980533599853516],[87,94,0.000005424022674560547],[87,95,0.000020444393157958984],[87,96,0.0000033974647521972656],[87,97,0.000006735324859619141],[87,98,0.0000133514404296875],[87,99,0.00002282857894897461],[87,100,0.000002205371856689453],[87,101,0.00007891654968261719],[87,102,0.00004279613494873047],[87,103,0.00003653764724731445],[87,104,0.000016868114471435547],[87,105,0.000011026859283447266],[87,106,0.0000059604644775390625],[87,107,0.000004708766937255859],[87,108,0.000012576580047607422],[87,109,0.000017583370208740234],[87,110,0.0001569986343383789],[87,111,0.00011539459228515625],[87,112,0.000013530254364013672],[87,113,0.000048279762268066406],[87,114,0.00004088878631591797],[87,115,0.818359375],[87,116,0.96826171875],[87,117,0.99365234375],[87,118,0.99755859375],[87,119,0.0278167724609375],[87,120,0.055999755859375],[87,121,0.000007152557373046875],[87,122,0.00002944469451904297],[87,123,6.556510925292969e-7],[87,124,0.000006020069122314453],[87,125,0.0000073909759521484375],[87,126,0.000025272369384765625],[87,127,0.000027954578399658203],[87,128,0.00003218650817871094],[87,129,0.000010311603546142578],[87,130,0.000013709068298339844],[87,131,0.000008881092071533203],[87,132,0.00002586841583251953],[87,133,0.0000059604644775390625],[87,134,0.000011801719665527344],[87,135,5.960464477539062e-7],[87,136,0.000011146068572998047],[87,137,0.0008740425109863281],[87,138,0.8125],[87,139,0.99609375],[87,140,0.96484375],[87,141,0.0029888153076171875],[87,142,0.0019273757934570312],[87,143,0.001277923583984375],[87,144,0.00011801719665527344],[87,145,0.00004011392593383789],[87,146,0.000013649463653564453],[87,147,0.0001544952392578125],[87,148,0.00007075071334838867],[87,149,0.00000947713851928711],[87,150,0.000003516674041748047],[87,151,0.000017821788787841797],[87,152,0.0002484321594238281],[87,153,0.00034737586975097656],[88,88,0.0000020265579223632812],[88,89,0.99853515625],[88,90,0.9970703125],[88,91,0.000006794929504394531],[88,92,0.000003159046173095703],[88,93,0.000002682209014892578],[88,94,0.000007987022399902344],[88,95,0.0000026226043701171875],[88,96,0.0000011324882507324219],[88,97,0.000007569789886474609],[88,98,0.000005245208740234375],[88,99,0.0004334449768066406],[88,100,0.000010013580322265625],[88,101,0.0014848709106445312],[88,102,0.0000762939453125],[88,103,0.000033736228942871094],[88,104,0.0000057220458984375],[88,105,0.000003874301910400391],[88,106,0.00001633167266845703],[88,107,0.0000023245811462402344],[88,108,0.000016450881958007812],[88,109,0.000003814697265625],[88,110,0.0000054836273193359375],[88,111,0.0000027418136596679688],[88,112,0.0000054836273193359375],[88,113,0.00006633996963500977],[88,114,0.011077880859375],[88,115,0.8681640625],[88,116,0.998046875],[88,117,0.074951171875],[88,118,0.063232421875],[88,119,0.00004494190216064453],[88,120,0.054107666015625],[88,121,0.00004017353057861328],[88,122,0.305908203125],[88,123,0.000006079673767089844],[88,124,0.00012922286987304688],[88,125,0.0000012516975402832031],[88,126,0.00000286102294921875],[88,127,0.000029146671295166016],[88,128,0.00005245208740234375],[88,129,0.00005227327346801758],[88,130,0.00003975629806518555],[88,131,0.00003331899642944336],[88,132,0.000011920928955078125],[88,133,0.0000022649765014648438],[88,134,0.00011241436004638672],[88,135,0.000007092952728271484],[88,136,0.9970703125],[88,137,0.98974609375],[88,138,0.99755859375],[88,139,0.88916015625],[88,140,0.06402587890625],[88,141,0.00060272216796875],[88,142,0.00223541259765625],[88,143,0.00830078125],[88,144,0.0003337860107421875],[88,145,0.00017261505126953125],[88,146,0.0000699162483215332],[88,147,0.0014524459838867188],[88,148,0.000751495361328125],[88,149,0.000018596649169921875],[88,150,0.000023365020751953125],[88,151,0.00004303455352783203],[88,152,0.00026297569274902344],[88,153,0.00034236907958984375],[89,89,0.0000021457672119140625],[89,90,0.99560546875],[89,91,0.9951171875],[89,92,0.000007867813110351562],[89,93,0.0000017285346984863281],[89,94,0.000003933906555175781],[89,95,7.748603820800781e-7],[89,96,3.5762786865234375e-7],[89,97,0.000004231929779052734],[89,98,0.0000013709068298339844],[89,99,0.00009226799011230469],[89,100,0.0000026226043701171875],[89,101,0.00006973743438720703],[89,102,0.00003212690353393555],[89,103,0.00004392862319946289],[89,104,0.000006258487701416016],[89,105,0.000002205371856689453],[89,106,0.000009655952453613281],[89,107,0.0000012516975402832031],[89,108,0.000019490718841552734],[89,109,0.00000286102294921875],[89,110,0.000008344650268554688],[89,111,0.000014960765838623047],[89,112,0.000016033649444580078],[89,113,0.9873046875],[89,114,0.896484375],[89,115,0.998046875],[89,116,0.78955078125],[89,117,0.0001214146614074707],[89,118,0.000007927417755126953],[89,119,0.0000040531158447265625],[89,120,0.000005066394805908203],[89,121,0.000004291534423828125],[89,122,0.000072479248046875],[89,123,0.0000011920928955078125],[89,124,0.000008761882781982422],[89,125,5.960464477539063e-8],[89,126,0.0000013113021850585938],[89,127,0.000012993812561035156],[89,128,0.00002950429916381836],[89,129,0.00004029273986816406],[89,130,0.000038623809814453125],[89,131,0.00000947713851928711],[89,132,0.000003635883331298828],[89,133,5.960464477539062e-7],[89,134,0.000011920928955078125],[89,135,0.053314208984375],[89,136,0.90283203125],[89,137,0.99853515625],[89,138,0.2041015625],[89,139,0.353759765625],[89,140,0.00013446807861328125],[89,141,0.00009435415267944336],[89,142,0.00006139278411865234],[89,143,0.00003832578659057617],[89,144,0.00001895427703857422],[89,145,0.000023663043975830078],[89,146,0.00006866455078125],[89,147,0.000013768672943115234],[89,148,0.000005602836608886719],[89,149,0.000018835067749023438],[89,150,0.0001323223114013672],[89,151,0.00020647048950195312],[89,152,0.0003542900085449219],[89,153,0.00026345252990722656],[90,90,0.000003933906555175781],[90,91,0.99658203125],[90,92,0.89599609375],[90,93,0.000012159347534179688],[90,94,0.000007867813110351562],[90,95,0.000004708766937255859],[90,96,0.000008940696716308594],[90,97,0.45166015625],[90,98,0.0000432133674621582],[90,99,0.9140625],[90,100,0.00007110834121704102],[90,101,0.0028533935546875],[90,102,0.00016129016876220703],[90,103,0.00010037422180175781],[90,104,0.0000546574592590332],[90,105,0.000014603137969970703],[90,106,0.0014514923095703125],[90,107,0.000009238719940185547],[90,108,0.7626953125],[90,109,0.000004410743713378906],[90,110,0.00000864267349243164],[90,111,0.000020325183868408203],[90,112,0.0014753341674804688],[90,113,0.9892578125],[90,114,0.99609375],[90,115,0.51025390625],[90,116,0.9248046875],[90,117,0.00003421306610107422],[90,118,0.0000032782554626464844],[90,119,0.000004291534423828125],[90,120,0.000020682811737060547],[90,121,0.00002282857894897461],[90,122,0.087158203125],[90,123,0.00002866983413696289],[90,124,0.755859375],[90,125,0.000003516674041748047],[90,126,0.000008225440979003906],[90,127,0.000016808509826660156],[90,128,0.000016450881958007812],[90,129,0.00013566017150878906],[90,130,0.000003159046173095703],[90,131,0.0000029802322387695312],[90,132,0.00007700920104980469],[90,133,0.000004589557647705078],[90,134,0.9990234375],[90,135,0.95263671875],[90,136,0.99853515625],[90,137,0.533203125],[90,138,0.00009459257125854492],[90,139,0.000026464462280273438],[90,140,0.000008285045623779297],[90,141,0.00004947185516357422],[90,142,0.000012040138244628906],[90,143,0.00001233816146850586],[90,144,0.00001424551010131836],[90,145,0.00003135204315185547],[90,146,0.00003731250762939453],[90,147,0.000006377696990966797],[90,148,0.000011742115020751953],[90,149,0.0000021457672119140625],[90,150,0.000008106231689453125],[90,151,0.000014781951904296875],[90,152,0.00012302398681640625],[90,153,0.00023162364959716797],[91,91,0.00001150369644165039],[91,92,0.99853515625],[91,93,0.99853515625],[91,94,0.000005066394805908203],[91,95,0.000005781650543212891],[91,96,0.0000037550926208496094],[91,97,0.0001399517059326172],[91,98,0.000002682209014892578],[91,99,0.00006514787673950195],[91,100,9.5367431640625e-7],[91,101,0.00001430511474609375],[91,102,0.00008594989776611328],[91,103,0.0000521540641784668],[91,104,0.000007808208465576172],[91,105,0.0000017285346984863281],[91,106,0.000008463859558105469],[91,107,0.000009238719940185547],[91,108,0.06781005859375],[91,109,0.000012755393981933594],[91,110,0.00099945068359375],[91,111,0.806640625],[91,112,0.845703125],[91,113,0.9990234375],[91,114,0.198486328125],[91,115,0.000034928321838378906],[91,116,0.00006133317947387695],[91,117,0.0000024437904357910156],[91,118,0.000006616115570068359],[91,119,0.000017464160919189453],[91,120,0.000004172325134277344],[91,121,0.000003635883331298828],[91,122,0.000005364418029785156],[91,123,4.172325134277344e-7],[91,124,0.0000057220458984375],[91,125,4.76837158203125e-7],[91,126,4.76837158203125e-7],[91,127,7.748603820800781e-7],[91,128,0.0000013709068298339844],[91,129,0.000009655952453613281],[91,130,0.0000023245811462402344],[91,131,7.152557373046875e-7],[91,132,0.000008106231689453125],[91,133,0.000004410743713378906],[91,134,0.998046875],[91,135,0.99951171875],[91,136,0.388671875],[91,137,0.76904296875],[91,138,0.0000432133674621582],[91,139,0.000009357929229736328],[91,140,0.00001341104507446289],[91,141,0.0001544952392578125],[91,142,0.0001220703125],[91,143,0.00004398822784423828],[91,144,0.00003820657730102539],[91,145,0.00018835067749023438],[91,146,0.000032067298889160156],[91,147,0.000010728836059570312],[91,148,0.000020384788513183594],[91,149,0.0000017285346984863281],[91,150,0.000009298324584960938],[91,151,0.000016629695892333984],[91,152,0.00005245208740234375],[91,153,0.00009846687316894531],[92,92,0.00012445449829101562],[92,93,0.99560546875],[92,94,0.98046875],[92,95,0.9658203125],[92,96,0.9365234375],[92,97,0.998046875],[92,98,0.000044405460357666016],[92,99,0.004016876220703125],[92,100,0.000007331371307373047],[92,101,0.000011146068572998047],[92,102,0.00010144710540771484],[92,103,0.00022077560424804688],[92,104,0.00002950429916381836],[92,105,0.00003921985626220703],[92,106,0.0000718235969543457],[92,107,0.000031054019927978516],[92,108,0.9990234375],[92,109,0.9970703125],[92,110,0.99853515625],[92,111,0.99072265625],[92,112,0.99853515625],[92,113,0.92578125],[92,114,0.00951385498046875],[92,115,0.000017583370208740234],[92,116,0.0000054836273193359375],[92,117,0.000009775161743164062],[92,118,0.000007450580596923828],[92,119,0.000022292137145996094],[92,120,0.000013232231140136719],[92,121,0.00007206201553344727],[92,122,0.00001233816146850586],[92,123,7.748603820800781e-7],[92,124,0.001392364501953125],[92,125,0.0000029206275939941406],[92,126,0.00020432472229003906],[92,127,0.00023686885833740234],[92,128,0.0009641647338867188],[92,129,0.00004214048385620117],[92,130,0.00007164478302001953],[92,131,0.000011980533599853516],[92,132,0.92333984375],[92,133,0.80712890625],[92,134,0.99951171875],[92,135,0.19287109375],[92,136,0.000006616115570068359],[92,137,0.000007927417755126953],[92,138,0.0000014901161193847656],[92,139,0.000003039836883544922],[92,140,0.000016391277313232422],[92,141,0.00007218122482299805],[92,142,0.00008153915405273438],[92,143,0.000039458274841308594],[92,144,0.000043332576751708984],[92,145,0.0000603795051574707],[92,146,0.000030100345611572266],[92,147,0.000010013580322265625],[92,148,0.000022590160369873047],[92,149,0.000005364418029785156],[92,150,0.000010788440704345703],[92,151,0.000017642974853515625],[92,152,0.00004029273986816406],[92,153,0.0001380443572998047],[93,93,0.0010576248168945312],[93,94,0.99853515625],[93,95,0.3037109375],[93,96,0.000016391277313232422],[93,97,0.00005328655242919922],[93,98,0.0000011324882507324219],[93,99,0.0000026226043701171875],[93,100,0.0000032186508178710938],[93,101,0.000007510185241699219],[93,102,0.00005030632019042969],[93,103,0.00021195411682128906],[93,104,0.00008589029312133789],[93,105,0.000036776065826416016],[93,106,0.000005066394805908203],[93,107,0.000003516674041748047],[93,108,0.000014483928680419922],[93,109,0.00003808736801147461],[93,110,0.943359375],[93,111,0.1597900390625],[93,112,0.000019431114196777344],[93,113,0.000043451786041259766],[93,114,0.00002467632293701172],[93,115,0.0000035762786865234375],[93,116,0.000010967254638671875],[93,117,0.000010848045349121094],[93,118,0.00008165836334228516],[93,119,0.00008553266525268555],[93,120,0.00011807680130004883],[93,121,0.000028848648071289062],[93,122,0.000004827976226806641],[93,123,1.1920928955078125e-7],[93,124,0.000011324882507324219],[93,125,3.5762786865234375e-7],[93,126,0.0000014901161193847656],[93,127,0.0000022649765014648438],[93,128,0.000004649162292480469],[93,129,0.000003039836883544922],[93,130,0.000010848045349121094],[93,131,0.000007987022399902344],[93,132,0.0289306640625],[93,133,0.99951171875],[93,134,0.99755859375],[93,135,0.9990234375],[93,136,0.00000667572021484375],[93,137,0.000004887580871582031],[93,138,0.0000037550926208496094],[93,139,0.000013709068298339844],[93,140,0.00007677078247070312],[93,141,0.00010627508163452148],[93,142,0.00011247396469116211],[93,143,0.00014162063598632812],[93,144,0.00006341934204101562],[93,145,0.0001513957977294922],[93,146,0.000030875205993652344],[93,147,0.00002872943878173828],[93,148,0.000029921531677246094],[93,149,0.000007331371307373047],[93,150,0.0000171661376953125],[93,151,0.000020384788513183594],[93,152,0.00008338689804077148],[93,153,0.00024819374084472656],[94,94,0.0005125999450683594],[94,95,1],[94,96,0.00015997886657714844],[94,97,0.000024497509002685547],[94,98,0.000004351139068603516],[94,99,0.000003635883331298828],[94,100,0.000007569789886474609],[94,101,0.00008171796798706055],[94,102,0.0001990795135498047],[94,103,0.0002486705780029297],[94,104,0.00027251243591308594],[94,105,0.00003713369369506836],[94,106,0.000004172325134277344],[94,107,0.00000959634780883789],[94,108,0.00002199411392211914],[94,109,0.00011175870895385742],[94,110,0.99462890625],[94,111,0.00156402587890625],[94,112,0.000022411346435546875],[94,113,0.000005364418029785156],[94,114,0.000004947185516357422],[94,115,0.000018417835235595703],[94,116,0.000024259090423583984],[94,117,0.00006479024887084961],[94,118,0.0000514984130859375],[94,119,0.00005716085433959961],[94,120,0.0002593994140625],[94,121,0.00011622905731201172],[94,122,0.000027000904083251953],[94,123,5.960464477539062e-7],[94,124,0.00000959634780883789],[94,125,1.7881393432617188e-7],[94,126,0.0000407099723815918],[94,127,0.000018596649169921875],[94,128,0.0012693405151367188],[94,129,0.00007128715515136719],[94,130,0.5712890625],[94,131,0.461669921875],[94,132,0.9443359375],[94,133,0.99951171875],[94,134,0.004787445068359375],[94,135,0.000013470649719238281],[94,136,0.000003993511199951172],[94,137,0.000005424022674560547],[94,138,0.00003933906555175781],[94,139,0.000035822391510009766],[94,140,0.0000540614128112793],[94,141,0.00004023313522338867],[94,142,0.00004011392593383789],[94,143,0.000028371810913085938],[94,144,0.00003081560134887695],[94,145,0.00007987022399902344],[94,146,0.000028014183044433594],[94,147,0.000016510486602783203],[94,148,0.00003260374069213867],[94,149,0.0000069141387939453125],[94,150,0.00002396106719970703],[94,151,0.000022411346435546875],[94,152,0.0001379251480102539],[94,153,0.00029015541076660156],[95,95,0.00008916854858398438],[95,96,0.99951171875],[95,97,0.9970703125],[95,98,0.000012099742889404297],[95,99,0.000005185604095458984],[95,100,0.0000018477439880371094],[95,101,0.0000054836273193359375],[95,102,0.00015091896057128906],[95,103,0.0003304481506347656],[95,104,0.000052988529205322266],[95,105,0.000016033649444580078],[95,106,0.00001138448715209961],[95,107,0.000012874603271484375],[95,108,0.0002961158752441406],[95,109,0.06768798828125],[95,110,0.9521484375],[95,111,0.00005459785461425781],[95,112,0.00001704692840576172],[95,113,0.000002384185791015625],[95,114,0.0000064373016357421875],[95,115,0.0000040531158447265625],[95,116,0.000013530254364013672],[95,117,0.000022113323211669922],[95,118,0.00015473365783691406],[95,119,0.00009971857070922852],[95,120,0.00031566619873046875],[95,121,0.00009262561798095703],[95,122,0.0000040531158447265625],[95,123,8.940696716308594e-7],[95,124,0.0004425048828125],[95,125,0.000018835067749023438],[95,126,0.95166015625],[95,127,0.051177978515625],[95,128,0.91259765625],[95,129,0.036407470703125],[95,130,0.9921875],[95,131,0.9853515625],[95,132,0.998046875],[95,133,0.99462890625],[95,134,0.1737060546875],[95,135,0.0000037550926208496094],[95,136,0.0000016689300537109375],[95,137,0.0000016093254089355469],[95,138,0.00003635883331298828],[95,139,0.000048279762268066406],[95,140,0.000051021575927734375],[95,141,0.00003737211227416992],[95,142,0.00003451108932495117],[95,143,0.00002574920654296875],[95,144,0.0000330805778503418],[95,145,0.00007516145706176758],[95,146,0.000022411346435546875],[95,147,0.000019729137420654297],[95,148,0.00003898143768310547],[95,149,0.000009417533874511719],[95,150,0.00003522634506225586],[95,151,0.00003451108932495117],[95,152,0.00015807151794433594],[95,153,0.0002682209014892578],[96,96,0.00007301568984985352],[96,97,0.99853515625],[96,98,0.52392578125],[96,99,0.000021338462829589844],[96,100,0.000012159347534179688],[96,101,0.000008046627044677734],[96,102,0.0002372264862060547],[96,103,0.0004119873046875],[96,104,0.00005429983139038086],[96,105,0.00008559226989746094],[96,106,0.00002866983413696289],[96,107,0.927734375],[96,108,0.98681640625],[96,109,0.9951171875],[96,110,0.83544921875],[96,111,0.000035762786865234375],[96,112,0.01739501953125],[96,113,0.000009179115295410156],[96,114,0.00001728534698486328],[96,115,0.0000013113021850585938],[96,116,0.000004947185516357422],[96,117,0.00001633167266845703],[96,118,0.000362396240234375],[96,119,0.00012826919555664062],[96,120,0.0003695487976074219],[96,121,0.000028848648071289062],[96,122,0.0000095367431640625],[96,123,0.0000015497207641601562],[96,124,0.000043392181396484375],[96,125,0.00009387731552124023],[96,126,0.85107421875],[96,127,0.97900390625],[96,128,0.9716796875],[96,129,0.0606689453125],[96,130,0.65478515625],[96,131,0.000213623046875],[96,132,0.96240234375],[96,133,0.00001341104507446289],[96,134,0.00006681680679321289],[96,135,0.0000013113021850585938],[96,136,0.0000013709068298339844],[96,137,0.000003814697265625],[96,138,0.000015974044799804688],[96,139,0.000027835369110107422],[96,140,0.000041961669921875],[96,141,0.000025451183319091797],[96,142,0.000020742416381835938],[96,143,0.000014960765838623047],[96,144,0.000023245811462402344],[96,145,0.00006282329559326172],[96,146,0.000015974044799804688],[96,147,0.00001150369644165039],[96,148,0.00001615285873413086],[96,149,0.000007927417755126953],[96,150,0.000016033649444580078],[96,151,0.000024497509002685547],[96,152,0.0001418590545654297],[96,153,0.00019991397857666016],[97,97,0.0000013709068298339844],[97,98,0.9990234375],[97,99,0.998046875],[97,100,0.00005716085433959961],[97,101,0.00005453824996948242],[97,102,0.000027954578399658203],[97,103,0.000012159347534179688],[97,104,0.000019609928131103516],[97,105,0.00005942583084106445],[97,106,0.0012578964233398438],[97,107,0.72021484375],[97,108,0.9990234375],[97,109,0.1551513671875],[97,110,0.00021338462829589844],[97,111,0.00003337860107421875],[97,112,0.1463623046875],[97,113,0.00019788742065429688],[97,114,0.0245513916015625],[97,115,0.000013530254364013672],[97,116,0.000054836273193359375],[97,117,0.00001245737075805664],[97,118,0.0007185935974121094],[97,119,0.0007524490356445312],[97,120,0.000026106834411621094],[97,121,0.000012516975402832031],[97,122,0.00009548664093017578],[97,123,0.00008165836334228516],[97,124,0.99658203125],[97,125,0.986328125],[97,126,0.9951171875],[97,127,0.91259765625],[97,128,0.303466796875],[97,129,0.0003428459167480469],[97,130,0.0006470680236816406],[97,131,0.0002503395080566406],[97,132,0.998046875],[97,133,0.0010814666748046875],[97,134,0.9833984375],[97,135,0.000005841255187988281],[97,136,0.0000069141387939453125],[97,137,0.0000019073486328125],[97,138,0.000008225440979003906],[97,139,0.00002008676528930664],[97,140,0.00011473894119262695],[97,141,0.000045418739318847656],[97,142,0.00003427267074584961],[97,143,0.000029206275939941406],[97,144,0.000028252601623535156],[97,145,0.00007921457290649414],[97,146,0.000021517276763916016],[97,147,0.000007987022399902344],[97,148,0.000012278556823730469],[97,149,0.000005066394805908203],[97,150,0.000004410743713378906],[97,151,0.000005543231964111328],[97,152,0.000044405460357666016],[97,153,0.0002446174621582031],[98,98,5.960464477539063e-8],[98,99,0.994140625],[98,100,0.9638671875],[98,101,0.00022459030151367188],[98,102,0.00006079673767089844],[98,103,0.00006747245788574219],[98,104,0.00006586313247680664],[98,105,0.98486328125],[98,106,0.9609375],[98,107,0.99462890625],[98,108,0.95068359375],[98,109,0.00006645917892456055],[98,110,0.000020503997802734375],[98,111,0.000004291534423828125],[98,112,0.00004559755325317383],[98,113,0.00004416704177856445],[98,114,0.000675201416015625],[98,115,0.000003635883331298828],[98,116,0.000024318695068359375],[98,117,0.0000040531158447265625],[98,118,0.0002371072769165039],[98,119,0.00010752677917480469],[98,120,0.0000095367431640625],[98,121,0.000002682209014892578],[98,122,0.000028073787689208984],[98,123,0.035400390625],[98,124,0.91796875],[98,125,0.99853515625],[98,126,0.56005859375],[98,127,0.98876953125],[98,128,0.007335662841796875],[98,129,0.00006133317947387695],[98,130,0.000008821487426757812],[98,131,0.000006318092346191406],[98,132,0.0006399154663085938],[98,133,7.152557373046875e-7],[98,134,0.000012278556823730469],[98,135,4.172325134277344e-7],[98,136,0.0000010132789611816406],[98,137,0.0000012516975402832031],[98,138,0.000017344951629638672],[98,139,0.000009357929229736328],[98,140,0.000034332275390625],[98,141,0.00002110004425048828],[98,142,0.000012934207916259766],[98,143,0.000007808208465576172],[98,144,0.000011622905731201172],[98,145,0.000016570091247558594],[98,146,0.000011086463928222656],[98,147,0.0000019073486328125],[98,148,0.000004947185516357422],[98,149,0.000003337860107421875],[98,150,0.000003516674041748047],[98,151,0.0000050067901611328125],[98,152,0.000044405460357666016],[98,153,0.00031280517578125],[99,99,0],[99,100,0.9912109375],[99,101,0.98291015625],[99,102,0.0005087852478027344],[99,103,0.00013566017150878906],[99,104,0.0102386474609375],[99,105,0.92236328125],[99,106,0.99658203125],[99,107,0.32421875],[99,108,0.9931640625],[99,109,0.00029015541076660156],[99,110,0.00003808736801147461],[99,111,0.000024259090423583984],[99,112,0.023101806640625],[99,113,0.0030231475830078125],[99,114,0.9833984375],[99,115,0.0010433197021484375],[99,116,0.54541015625],[99,117,0.00005173683166503906],[99,118,0.00005841255187988281],[99,119,0.00003135204315185547],[99,120,0.0004520416259765625],[99,121,0.0000400543212890625],[99,122,0.978515625],[99,123,0.85791015625],[99,124,0.9921875],[99,125,0.58837890625],[99,126,0.00007081031799316406],[99,127,0.0005941390991210938],[99,128,0.0000622868537902832],[99,129,0.000038564205169677734],[99,130,0.000003993511199951172],[99,131,0.000003159046173095703],[99,132,0.00014400482177734375],[99,133,0.0000010728836059570312],[99,134,0.004825592041015625],[99,135,8.940696716308594e-7],[99,136,0.000013649463653564453],[99,137,0.0000024437904357910156],[99,138,0.0000030994415283203125],[99,139,0.000006139278411865234],[99,140,0.00003212690353393555],[99,141,0.000041961669921875],[99,142,0.00004374980926513672],[99,143,0.000027000904083251953],[99,144,0.000022530555725097656],[99,145,0.000038564205169677734],[99,146,0.000012040138244628906],[99,147,0.00000286102294921875],[99,148,0.0000024437904357910156],[99,149,0.0000015497207641601562],[99,150,0.0000016093254089355469],[99,151,0.000007331371307373047],[99,152,0.00002664327621459961],[99,153,0.00043582916259765625],[100,100,8.940696716308594e-7],[100,101,0.97802734375],[100,102,0.46240234375],[100,103,0.27490234375],[100,104,0.8935546875],[100,105,0.9873046875],[100,106,0.491455078125],[100,107,0.0003218650817871094],[100,108,0.0004477500915527344],[100,109,0.00005835294723510742],[100,110,0.00004035234451293945],[100,111,0.00003808736801147461],[100,112,0.00004303455352783203],[100,113,0.000024497509002685547],[100,114,0.0031871795654296875],[100,115,0.00013637542724609375],[100,116,0.0022640228271484375],[100,117,0.00003921985626220703],[100,118,0.000004351139068603516],[100,119,0.000004231929779052734],[100,120,0.0006890296936035156],[100,121,0.187744140625],[100,122,0.9873046875],[100,123,0.99560546875],[100,124,0.68212890625],[100,125,0.83642578125],[100,126,0.00009918212890625],[100,127,0.00034308433532714844],[100,128,0.000033915042877197266],[100,129,0.00004303455352783203],[100,130,0.000010728836059570312],[100,131,0.000004470348358154297],[100,132,0.000015795230865478516],[100,133,5.960464477539062e-7],[100,134,0.000007092952728271484],[100,135,5.960464477539063e-8],[100,136,0.0000011920928955078125],[100,137,7.152557373046875e-7],[100,138,0.0000018477439880371094],[100,139,0.000006496906280517578],[100,140,0.000040650367736816406],[100,141,0.0000476837158203125],[100,142,0.000028252601623535156],[100,143,0.00001233816146850586],[100,144,0.00002759695053100586],[100,145,0.000029325485229492188],[100,146,0.000014781951904296875],[100,147,0.000001430511474609375],[100,148,0.0000016689300537109375],[100,149,0.0000020265579223632812],[100,150,0.000008761882781982422],[100,151,0.0005345344543457031],[100,152,0.0028667449951171875],[100,153,0.016815185546875],[101,101,0.0000026226043701171875],[101,102,0.99462890625],[101,103,0.51904296875],[101,104,0.9931640625],[101,105,0.5439453125],[101,106,0.79443359375],[101,107,0.0002799034118652344],[101,108,0.0010089874267578125],[101,109,0.0000502467155456543],[101,110,0.00006920099258422852],[101,111,0.00006961822509765625],[101,112,0.00011336803436279297],[101,113,0.00015807151794433594],[101,114,0.66796875],[101,115,0.04400634765625],[101,116,0.9560546875],[101,117,0.1746826171875],[101,118,0.00014829635620117188],[101,119,0.00019621849060058594],[101,120,0.9814453125],[101,121,0.79541015625],[101,122,0.98974609375],[101,123,0.147705078125],[101,124,0.0013275146484375],[101,125,0.0002601146697998047],[101,126,0.000007152557373046875],[101,127,0.000024616718292236328],[101,128,0.00003916025161743164],[101,129,0.00011539459228515625],[101,130,0.00011640787124633789],[101,131,0.000034689903259277344],[101,132,0.000010132789611816406],[101,133,0.000003159046173095703],[101,134,0.000008881092071533203],[101,135,2.384185791015625e-7],[101,136,0.0000034570693969726562],[101,137,6.556510925292969e-7],[101,138,9.5367431640625e-7],[101,139,9.5367431640625e-7],[101,140,0.000007331371307373047],[101,141,0.00008881092071533203],[101,142,0.00006258487701416016],[101,143,0.000028431415557861328],[101,144,0.00004947185516357422],[101,145,0.00006937980651855469],[101,146,0.000025451183319091797],[101,147,0.0000017881393432617188],[101,148,0.000003039836883544922],[101,149,0.000003993511199951172],[101,150,0.000007212162017822266],[101,151,0.00022077560424804688],[101,152,0.00017547607421875],[101,153,0.001499176025390625],[102,102,0.000009715557098388672],[102,103,0.9951171875],[102,104,0.99072265625],[102,105,0.0005741119384765625],[102,106,0.0010213851928710938],[102,107,0.000015497207641601562],[102,108,0.00003159046173095703],[102,109,0.0001728534698486328],[102,110,0.0002970695495605469],[102,111,0.00022840499877929688],[102,112,0.00011080503463745117],[102,113,0.000047326087951660156],[102,114,0.0056304931640625],[102,115,0.001293182373046875],[102,116,0.09161376953125],[102,117,0.1463623046875],[102,118,0.0004363059997558594],[102,119,0.047576904296875],[102,120,0.94970703125],[102,121,0.9208984375],[102,122,0.58154296875],[102,123,0.0020198822021484375],[102,124,0.00009137392044067383],[102,125,0.00008004903793334961],[102,126,0.00016117095947265625],[102,127,0.000054895877838134766],[102,128,0.00010877847671508789],[102,129,0.0002033710479736328],[102,130,0.0001995563507080078],[102,131,0.0001061558723449707],[102,132,0.00030803680419921875],[102,133,0.000010967254638671875],[102,134,0.000057637691497802734],[102,135,0.0000059604644775390625],[102,136,0.000019252300262451172],[102,137,0.00001150369644165039],[102,138,0.000007987022399902344],[102,139,0.000007092952728271484],[102,140,0.0000483393669128418],[102,141,0.00010275840759277344],[102,142,0.00008916854858398438],[102,143,0.00008052587509155273],[102,144,0.00014221668243408203],[102,145,0.00021266937255859375],[102,146,0.00008386373519897461],[102,147,0.000017404556274414062],[102,148,0.000008463859558105469],[102,149,0.0000502467155456543],[102,150,0.00005066394805908203],[102,151,0.006488800048828125],[102,152,0.001781463623046875],[102,153,0.0037326812744140625],[103,103,0.000014662742614746094],[103,104,0.99560546875],[103,105,0.10333251953125],[103,106,0.0004100799560546875],[103,107,0.000012218952178955078],[103,108,0.000025451183319091797],[103,109,0.0002713203430175781],[103,110,0.0006561279296875],[103,111,0.0005779266357421875],[103,112,0.00018835067749023438],[103,113,0.00006258487701416016],[103,114,0.0002598762512207031],[103,115,0.00005841255187988281],[103,116,0.00039505958557128906],[103,117,0.0005769729614257812],[103,118,0.000041604042053222656],[103,119,0.00023055076599121094],[103,120,0.01495361328125],[103,121,0.156494140625],[103,122,0.0017337799072265625],[103,123,0.0007839202880859375],[103,124,0.000015139579772949219],[103,125,0.000046253204345703125],[103,126,0.00004178285598754883],[103,127,0.00003159046173095703],[103,128,0.00009685754776000977],[103,129,0.00008296966552734375],[103,130,0.00009483098983764648],[103,131,0.0000692605972290039],[103,132,0.00011169910430908203],[103,133,0.00003063678741455078],[103,134,0.00017201900482177734],[103,135,0.00007325410842895508],[103,136,0.0001125335693359375],[103,137,0.00010561943054199219],[103,138,0.00007963180541992188],[103,139,0.00004887580871582031],[103,140,0.00009572505950927734],[103,141,0.00007361173629760742],[103,142,0.00003361701965332031],[103,143,0.000026941299438476562],[103,144,0.00005418062210083008],[103,145,0.00013327598571777344],[103,146,0.000064849853515625],[103,147,0.00004458427429199219],[103,148,0.0000133514404296875],[103,149,0.00002199411392211914],[103,150,0.000013172626495361328],[103,151,0.0005855560302734375],[103,152,0.0008645057678222656],[103,153,0.0020771026611328125],[104,104,0.00006479024887084961],[104,105,0.99755859375],[104,106,0.98583984375],[104,107,0.00012421607971191406],[104,108,0.00005555152893066406],[104,109,0.00009459257125854492],[104,110,0.0008139610290527344],[104,111,0.0011701583862304688],[104,112,0.00017654895782470703],[104,113,0.00002849102020263672],[104,114,0.01580810546875],[104,115,0.00036525726318359375],[104,116,0.005397796630859375],[104,117,0.0007877349853515625],[104,118,0.000030159950256347656],[104,119,0.00003075599670410156],[104,120,0.012054443359375],[104,121,0.0002187490463256836],[104,122,0.0020389556884765625],[104,123,0.000056862831115722656],[104,124,0.000008881092071533203],[104,125,0.000032007694244384766],[104,126,0.000003039836883544922],[104,127,0.000015854835510253906],[104,128,0.0001404285430908203],[104,129,0.000033020973205566406],[104,130,0.00005435943603515625],[104,131,0.000012636184692382812],[104,132,0.000023484230041503906],[104,133,0.000002562999725341797],[104,134,0.00002086162567138672],[104,135,0.000011682510375976562],[104,136,0.000017940998077392578],[104,137,0.00004690885543823242],[104,138,0.0000794529914855957],[104,139,0.00006431341171264648],[104,140,0.00007653236389160156],[104,141,0.000037729740142822266],[104,142,0.00003069639205932617],[104,143,0.00001609325408935547],[104,144,0.00003361701965332031],[104,145,0.00005269050598144531],[104,146,0.000028967857360839844],[104,147,0.000033795833587646484],[104,148,0.000013053417205810547],[104,149,0.000010073184967041016],[104,150,0.000005602836608886719],[104,151,0.000012755393981933594],[104,152,0.00004494190216064453],[104,153,0.00022220611572265625],[105,105,0.00009441375732421875],[105,106,0.9970703125],[105,107,0.79833984375],[105,108,0.00012290477752685547],[105,109,0.00006854534149169922],[105,110,0.000018358230590820312],[105,111,0.000006496906280517578],[105,112,0.000021755695343017578],[105,113,0.000005424022674560547],[105,114,0.0009860992431640625],[105,115,0.000021696090698242188],[105,116,0.00011175870895385742],[105,117,0.000012636184692382812],[105,118,0.000032007694244384766],[105,119,0.000004947185516357422],[105,120,0.00008565187454223633],[105,121,0.000020503997802734375],[105,122,0.0005669593811035156],[105,123,0.004840850830078125],[105,124,0.00018978118896484375],[105,125,0.07330322265625],[105,126,0.000027298927307128906],[105,127,0.00403594970703125],[105,128,0.00006240606307983398],[105,129,0.000033855438232421875],[105,130,0.000007748603820800781],[105,131,0.000018537044525146484],[105,132,0.000007092952728271484],[105,133,0.0000018477439880371094],[105,134,0.000010371208190917969],[105,135,0.000007152557373046875],[105,136,0.000004172325134277344],[105,137,0.00001329183578491211],[105,138,0.0000152587890625],[105,139,0.000023186206817626953],[105,140,0.00003159046173095703],[105,141,0.00002562999725341797],[105,142,0.000017881393432617188],[105,143,0.000014543533325195312],[105,144,0.000023484230041503906],[105,145,0.00005072355270385742],[105,146,0.000015020370483398438],[105,147,0.000030100345611572266],[105,148,0.000048279762268066406],[105,149,0.00003534555435180664],[105,150,0.000008046627044677734],[105,151,0.000008046627044677734],[105,152,0.000059664249420166016],[105,153,0.0003719329833984375],[106,106,7.152557373046875e-7],[106,107,0.9990234375],[106,108,0.99853515625],[106,109,0.00004875659942626953],[106,110,0.000007808208465576172],[106,111,0.000008463859558105469],[106,112,0.19140625],[106,113,0.0012226104736328125],[106,114,0.974609375],[106,115,0.0016422271728515625],[106,116,0.00395965576171875],[106,117,0.0000400543212890625],[106,118,0.00012934207916259766],[106,119,0.000015616416931152344],[106,120,0.00011670589447021484],[106,121,0.000006020069122314453],[106,122,0.0004820823669433594],[106,123,0.000011742115020751953],[106,124,0.00007325410842895508],[106,125,0.000021636486053466797],[106,126,0.000005066394805908203],[106,127,0.00007593631744384766],[106,128,0.000012040138244628906],[106,129,0.000008881092071533203],[106,130,0.0000014901161193847656],[106,131,8.940696716308594e-7],[106,132,0.0000057220458984375],[106,133,5.960464477539062e-7],[106,134,0.000010132789611816406],[106,135,0.0000010728836059570312],[106,136,0.000001430511474609375],[106,137,0.000002562999725341797],[106,138,0.000008463859558105469],[106,139,0.000025093555450439453],[106,140,0.00007098913192749023],[106,141,0.00006502866744995117],[106,142,0.00003832578659057617],[106,143,0.000026047229766845703],[106,144,0.00003266334533691406],[106,145,0.0000407099723815918],[106,146,0.000017642974853515625],[106,147,0.000021696090698242188],[106,148,0.00004851818084716797],[106,149,0.000041484832763671875],[106,150,0.000021517276763916016],[106,151,0.00001519918441772461],[106,152,0.000030875205993652344],[106,153,0.00012564659118652344],[107,107,8.940696716308594e-7],[107,108,0.99755859375],[107,109,0.9765625],[107,110,0.00005513429641723633],[107,111,0.000012636184692382812],[107,112,0.1456298828125],[107,113,0.00008636713027954102],[107,114,0.0008711814880371094],[107,115,0.0000023245811462402344],[107,116,0.000007152557373046875],[107,117,0.000006794929504394531],[107,118,0.000023424625396728516],[107,119,0.000016987323760986328],[107,120,0.00001424551010131836],[107,121,5.960464477539062e-7],[107,122,0.000008285045623779297],[107,123,0.0000020265579223632812],[107,124,0.000025451183319091797],[107,125,0.00026345252990722656],[107,126,0.000037610530853271484],[107,127,0.62890625],[107,128,0.0021877288818359375],[107,129,0.000040590763092041016],[107,130,0.000005602836608886719],[107,131,0.0000020265579223632812],[107,132,0.00002491474151611328],[107,133,7.152557373046875e-7],[107,134,0.000005781650543212891],[107,135,0.0000012516975402832031],[107,136,0.0000013709068298339844],[107,137,0.000009000301361083984],[107,138,0.000005125999450683594],[107,139,0.000011742115020751953],[107,140,0.000029742717742919922],[107,141,0.000023424625396728516],[107,142,0.000013053417205810547],[107,143,0.000010788440704345703],[107,144,0.000013113021850585938],[107,145,0.000019550323486328125],[107,146,0.000007212162017822266],[107,147,0.000010073184967041016],[107,148,0.000021755695343017578],[107,149,0.000022292137145996094],[107,150,0.000026226043701171875],[107,151,0.00005060434341430664],[107,152,0.00012612342834472656],[107,153,0.00014901161193847656],[108,108,0.000021696090698242188],[108,109,0.99853515625],[108,110,0.0201873779296875],[108,111,0.0006098747253417969],[108,112,0.99755859375],[108,113,0.86962890625],[108,114,0.9931640625],[108,115,0.00004547834396362305],[108,116,0.00014865398406982422],[108,117,0.000020563602447509766],[108,118,0.0002288818359375],[108,119,0.000213623046875],[108,120,0.00002855062484741211],[108,121,0.000006258487701416016],[108,122,0.00005447864532470703],[108,123,0.000004947185516357422],[108,124,0.08843994140625],[108,125,0.00006628036499023438],[108,126,0.00006073713302612305],[108,127,0.0019178390502929688],[108,128,0.00019359588623046875],[108,129,0.000009298324584960938],[108,130,0.000010311603546142578],[108,131,0.0000035762786865234375],[108,132,0.0222320556640625],[108,133,0.000021457672119140625],[108,134,0.1378173828125],[108,135,0.000010848045349121094],[108,136,0.0000059604644775390625],[108,137,0.0000050067901611328125],[108,138,0.000005781650543212891],[108,139,0.00003528594970703125],[108,140,0.00006246566772460938],[108,141,0.00005626678466796875],[108,142,0.000032067298889160156],[108,143,0.000021696090698242188],[108,144,0.00002777576446533203],[108,145,0.000027239322662353516],[108,146,0.000012934207916259766],[108,147,0.000011265277862548828],[108,148,0.000047087669372558594],[108,149,0.000015139579772949219],[108,150,0.00003439188003540039],[108,151,0.00010353326797485352],[108,152,0.00009238719940185547],[108,153,0.00017547607421875],[109,109,0.00010192394256591797],[109,110,1],[109,111,0.96923828125],[109,112,0.99755859375],[109,113,0.000020325183868408203],[109,114,0.00003039836883544922],[109,115,0.0000017881393432617188],[109,116,0.000003814697265625],[109,117,0.000014066696166992188],[109,118,0.0001112222671508789],[109,119,0.00006204843521118164],[109,120,0.00020015239715576172],[109,121,0.000008881092071533203],[109,122,0.000004649162292480469],[109,123,0.0000016093254089355469],[109,124,0.000014841556549072266],[109,125,0.000003159046173095703],[109,126,0.000025093555450439453],[109,127,0.0007605552673339844],[109,128,0.0031719207763671875],[109,129,0.000035703182220458984],[109,130,0.00008696317672729492],[109,131,0.000005245208740234375],[109,132,0.00035643577575683594],[109,133,0.000006020069122314453],[109,134,0.000032961368560791016],[109,135,0.0000012516975402832031],[109,136,5.364418029785156e-7],[109,137,0.0000022649765014648438],[109,138,0.000008285045623779297],[109,139,0.00002682209014892578],[109,140,0.00004118680953979492],[109,141,0.00003045797348022461],[109,142,0.000017583370208740234],[109,143,0.0000133514404296875],[109,144,0.000017523765563964844],[109,145,0.000026404857635498047],[109,146,0.000010728836059570312],[109,147,0.00001049041748046875],[109,148,0.000014960765838623047],[109,149,0.000009834766387939453],[109,150,0.000013828277587890625],[109,151,0.00002300739288330078],[109,152,0.00007665157318115234],[109,153,0.0001544952392578125],[110,110,2.980232238769531e-7],[110,111,1],[110,112,0.98974609375],[110,113,0.00005370378494262695],[110,114,0.00001537799835205078],[110,115,0.000002562999725341797],[110,116,0.000021636486053466797],[110,117,0.00005799531936645508],[110,118,0.00014925003051757812],[110,119,0.000053942203521728516],[110,120,0.0004057884216308594],[110,121,0.000043451786041259766],[110,122,0.000013530254364013672],[110,123,0.000003337860107421875],[110,124,0.000013530254364013672],[110,125,8.940696716308594e-7],[110,126,0.00001531839370727539],[110,127,0.00003510713577270508],[110,128,0.0007662773132324219],[110,129,0.000058591365814208984],[110,130,0.0012178421020507812],[110,131,0.000022292137145996094],[110,132,0.001888275146484375],[110,133,0.004833221435546875],[110,134,0.00024580955505371094],[110,135,0.00002950429916381836],[110,136,0.0000019073486328125],[110,137,0.000007510185241699219],[110,138,0.000028431415557861328],[110,139,0.00006091594696044922],[110,140,0.0000661015510559082],[110,141,0.000051021575927734375],[110,142,0.000030994415283203125],[110,143,0.000022590160369873047],[110,144,0.00002855062484741211],[110,145,0.00004458427429199219],[110,146,0.00002092123031616211],[110,147,0.000019490718841552734],[110,148,0.000035762786865234375],[110,149,0.00001043081283569336],[110,150,0.000017702579498291016],[110,151,0.000026166439056396484],[110,152,0.00008088350296020508],[110,153,0.00023746490478515625],[111,111,0.00016069412231445312],[111,112,0.9990234375],[111,113,0.348388671875],[111,114,0.000037789344787597656],[111,115,0.000005245208740234375],[111,116,0.000002205371856689453],[111,117,0.000035643577575683594],[111,118,0.0002751350402832031],[111,119,0.00008124113082885742],[111,120,0.00015735626220703125],[111,121,0.000021398067474365234],[111,122,0.00001621246337890625],[111,123,0.000005602836608886719],[111,124,0.000013768672943115234],[111,125,3.5762786865234375e-7],[111,126,0.0000013113021850585938],[111,127,0.0000024437904357910156],[111,128,0.000010073184967041016],[111,129,0.00001233816146850586],[111,130,0.000006377696990966797],[111,131,0.0000023245811462402344],[111,132,0.000013053417205810547],[111,133,0.00001800060272216797],[111,134,0.00004673004150390625],[111,135,0.00009077787399291992],[111,136,0.0000016093254089355469],[111,137,0.000006973743438720703],[111,138,0.000025272369384765625],[111,139,0.00008869171142578125],[111,140,0.00010496377944946289],[111,141,0.00007826089859008789],[111,142,0.00003248453140258789],[111,143,0.000025570392608642578],[111,144,0.00003123283386230469],[111,145,0.00005418062210083008],[111,146,0.000024497509002685547],[111,147,0.000027179718017578125],[111,148,0.00003236532211303711],[111,149,0.000011682510375976562],[111,150,0.000013768672943115234],[111,151,0.00002664327621459961],[111,152,0.00008791685104370117],[111,153,0.00030040740966796875],[112,112,0.0001550912857055664],[112,113,0.99951171875],[112,114,0.921875],[112,115,0.000023424625396728516],[112,116,0.000005245208740234375],[112,117,0.000008046627044677734],[112,118,0.00004756450653076172],[112,119,0.000026702880859375],[112,120,0.000008821487426757812],[112,121,0.000022172927856445312],[112,122,0.000006556510925292969],[112,123,0.0000011324882507324219],[112,124,0.000027835369110107422],[112,125,7.748603820800781e-7],[112,126,0.0000030994415283203125],[112,127,0.000007212162017822266],[112,128,0.000011861324310302734],[112,129,0.000013113021850585938],[112,130,0.000002086162567138672],[112,131,4.172325134277344e-7],[112,132,0.000010669231414794922],[112,133,0.0000016093254089355469],[112,134,0.00005269050598144531],[112,135,0.000006735324859619141],[112,136,9.5367431640625e-7],[112,137,0.0000014901161193847656],[112,138,4.172325134277344e-7],[112,139,0.0000024437904357910156],[112,140,0.0000064373016357421875],[112,141,0.00005340576171875],[112,142,0.00003236532211303711],[112,143,0.00001430511474609375],[112,144,0.00002574920654296875],[112,145,0.000047266483306884766],[112,146,0.000023484230041503906],[112,147,0.000029981136322021484],[112,148,0.000021517276763916016],[112,149,0.000008225440979003906],[112,150,0.000012814998626708984],[112,151,0.00002765655517578125],[112,152,0.00010067224502563477],[112,153,0.00032901763916015625],[113,113,0.0007939338684082031],[113,114,0.9990234375],[113,115,0.818359375],[113,116,0.000025391578674316406],[113,117,0.000008225440979003906],[113,118,0.000005364418029785156],[113,119,0.000005066394805908203],[113,120,0.000001430511474609375],[113,121,4.76837158203125e-7],[113,122,0.000006854534149169922],[113,123,4.76837158203125e-7],[113,124,0.00001341104507446289],[113,125,4.172325134277344e-7],[113,126,5.960464477539062e-7],[113,127,0.0000013113021850585938],[113,128,0.000003039836883544922],[113,129,0.000010669231414794922],[113,130,0.0000027418136596679688],[113,131,2.384185791015625e-7],[113,132,0.0000057220458984375],[113,133,0.0000011324882507324219],[113,134,0.0014104843139648438],[113,135,0.048919677734375],[113,136,0.00005698204040527344],[113,137,0.00640869140625],[113,138,0.000003039836883544922],[113,139,0.000006794929504394531],[113,140,0.0000095367431640625],[113,141,0.00014901161193847656],[113,142,0.00007259845733642578],[113,143,0.000036716461181640625],[113,144,0.0000374913215637207],[113,145,0.00005626678466796875],[113,146,0.00004416704177856445],[113,147,0.000020444393157958984],[113,148,0.000009894371032714844],[113,149,0.0000050067901611328125],[113,150,0.000008344650268554688],[113,151,0.000014603137969970703],[113,152,0.00006514787673950195],[113,153,0.00019228458404541016],[114,114,2.980232238769531e-7],[114,115,0.99853515625],[114,116,0.994140625],[114,117,0.000009894371032714844],[114,118,0.000006496906280517578],[114,119,0.000001430511474609375],[114,120,0.00006031990051269531],[114,121,0.000005125999450683594],[114,122,0.055816650390625],[114,123,0.000010073184967041016],[114,124,0.0123138427734375],[114,125,0.000004291534423828125],[114,126,0.000004231929779052734],[114,127,0.000008702278137207031],[114,128,0.000014960765838623047],[114,129,0.00004029273986816406],[114,130,0.0000032782554626464844],[114,131,0.0000013709068298339844],[114,132,0.0000059604644775390625],[114,133,6.556510925292969e-7],[114,134,0.0006608963012695312],[114,135,0.0000050067901611328125],[114,136,0.000032842159271240234],[114,137,0.0000073909759521484375],[114,138,8.344650268554688e-7],[114,139,0.0000017881393432617188],[114,140,0.0000019669532775878906],[114,141,0.000030875205993652344],[114,142,0.000034332275390625],[114,143,0.000015854835510253906],[114,144,0.00010037422180175781],[114,145,0.00009173154830932617],[114,146,0.000033795833587646484],[114,147,0.0000024437904357910156],[114,148,0.0000017881393432617188],[114,149,0.0000012516975402832031],[114,150,0.00000476837158203125],[114,151,0.000012218952178955078],[114,152,0.00011038780212402344],[114,153,0.0002319812774658203],[115,115,0.000003814697265625],[115,116,0.99853515625],[115,117,0.9697265625],[115,118,0.000027179718017578125],[115,119,0.00000864267349243164],[115,120,0.0003142356872558594],[115,121,0.0000016093254089355469],[115,122,0.00005131959915161133],[115,123,5.364418029785156e-7],[115,124,0.000008165836334228516],[115,125,0.0000011920928955078125],[115,126,0.000009000301361083984],[115,127,0.00006788969039916992],[115,128,0.00004869699478149414],[115,129,0.0000794529914855957],[115,130,0.00002580881118774414],[115,131,0.0000064373016357421875],[115,132,0.000004172325134277344],[115,133,2.980232238769531e-7],[115,134,0.000004947185516357422],[115,135,8.940696716308594e-7],[115,136,0.00001710653305053711],[115,137,0.0005998611450195312],[115,138,0.000023066997528076172],[115,139,0.0008249282836914062],[115,140,0.000032842159271240234],[115,141,0.000025451183319091797],[115,142,0.000011205673217773438],[115,143,0.000014066696166992188],[115,144,0.00013136863708496094],[115,145,0.00007289648056030273],[115,146,0.00002759695053100586],[115,147,0.000003635883331298828],[115,148,0.000001430511474609375],[115,149,0.000004887580871582031],[115,150,0.000008702278137207031],[115,151,0.00004076957702636719],[115,152,0.00009936094284057617],[115,153,0.0002129077911376953],[116,116,0.0000584721565246582],[116,117,0.9990234375],[116,118,0.0799560546875],[116,119,0.00022113323211669922],[116,120,0.99853515625],[116,121,0.0016851425170898438],[116,122,0.998046875],[116,123,0.00006139278411865234],[116,124,0.000461578369140625],[116,125,0.000004947185516357422],[116,126,0.000005066394805908203],[116,127,0.000012695789337158203],[116,128,0.00009560585021972656],[116,129,0.0001304149627685547],[116,130,0.00008994340896606445],[116,131,0.00006431341171264648],[116,132,0.000010073184967041016],[116,133,0.0000024437904357910156],[116,134,0.00002568960189819336],[116,135,0.0000010728836059570312],[116,136,0.0010652542114257812],[116,137,0.000012755393981933594],[116,138,0.0003361701965332031],[116,139,0.00009614229202270508],[116,140,0.00007611513137817383],[116,141,0.000025093555450439453],[116,142,0.000026047229766845703],[116,143,0.00004762411117553711],[116,144,0.00006008148193359375],[116,145,0.00003975629806518555],[116,146,0.000010251998901367188],[116,147,0.000034809112548828125],[116,148,0.00002384185791015625],[116,149,0.000011265277862548828],[116,150,0.00001627206802368164],[116,151,0.00003534555435180664],[116,152,0.00016248226165771484],[116,153,0.00039458274841308594],[117,117,0.0001214146614074707],[117,118,0.99951171875],[117,119,0.9990234375],[117,120,0.998046875],[117,121,0.000007867813110351562],[117,122,0.0003447532653808594],[117,123,0.0000020265579223632812],[117,124,0.0000016689300537109375],[117,125,0.000003933906555175781],[117,126,0.000008046627044677734],[117,127,0.00003731250762939453],[117,128,0.00007528066635131836],[117,129,0.000030934810638427734],[117,130,0.000031948089599609375],[117,131,0.000020802021026611328],[117,132,0.00002300739288330078],[117,133,0.0000013709068298339844],[117,134,0.000004112720489501953],[117,135,5.960464477539063e-8],[117,136,0.000002205371856689453],[117,137,0.0000010132789611816406],[117,138,0.000024259090423583984],[117,139,0.00017452239990234375],[117,140,0.0003402233123779297],[117,141,0.00004935264587402344],[117,142,0.000026285648345947266],[117,143,0.00005251169204711914],[117,144,0.000026106834411621094],[117,145,0.00002396106719970703],[117,146,0.000004649162292480469],[117,147,0.000013768672943115234],[117,148,0.0000045299530029296875],[117,149,0.000006020069122314453],[117,150,0.0000029802322387695312],[117,151,0.000012755393981933594],[117,152,0.00013828277587890625],[117,153,0.0005278587341308594],[118,118,0.0000010132789611816406],[118,119,1],[118,120,0.97314453125],[118,121,0.000015914440155029297],[118,122,0.000028789043426513672],[118,123,0.000006198883056640625],[118,124,0.000007808208465576172],[118,125,0.00003045797348022461],[118,126,0.00006175041198730469],[118,127,0.00009489059448242188],[118,128,0.0000737905502319336],[118,129,0.00004756450653076172],[118,130,0.000024318695068359375],[118,131,0.00002181529998779297],[118,132,0.000059723854064941406],[118,133,0.00000858306884765625],[118,134,0.000005781650543212891],[118,135,0.0000012516975402832031],[118,136,0.0000035762786865234375],[118,137,8.940696716308594e-7],[118,138,0.0008411407470703125],[118,139,0.0660400390625],[118,140,0.87939453125],[118,141,0.032958984375],[118,142,0.0089874267578125],[118,143,0.00428009033203125],[118,144,0.0002682209014892578],[118,145,0.00004285573959350586],[118,146,0.0000775456428527832],[118,147,0.0175628662109375],[118,148,0.00013494491577148438],[118,149,0.00013637542724609375],[118,150,0.0000050067901611328125],[118,151,0.000017404556274414062],[118,152,0.0000705718994140625],[118,153,0.0002999305725097656],[119,119,0.0321044921875],[119,120,0.9990234375],[119,121,0.06829833984375],[119,122,0.000007569789886474609],[119,123,0.00001049041748046875],[119,124,0.000004291534423828125],[119,125,0.000048100948333740234],[119,126,0.000053763389587402344],[119,127,0.0000966191291809082],[119,128,0.0000667572021484375],[119,129,0.000025451183319091797],[119,130,0.00001621246337890625],[119,131,0.000012099742889404297],[119,132,0.0000286102294921875],[119,133,0.00001239776611328125],[119,134,0.00021660327911376953],[119,135,0.000006318092346191406],[119,136,0.000013887882232666016],[119,137,0.0000011920928955078125],[119,138,0.000005304813385009766],[119,139,0.000009179115295410156],[119,140,0.0004811286926269531],[119,141,0.00023746490478515625],[119,142,0.00029778480529785156],[119,143,0.00018274784088134766],[119,144,0.00005793571472167969],[119,145,0.000022232532501220703],[119,146,0.000023245811462402344],[119,147,0.00035881996154785156],[119,148,0.0000940561294555664],[119,149,0.0012445449829101562],[119,150,0.000018835067749023438],[119,151,0.00008147954940795898],[119,152,0.000022351741790771484],[119,153,0.00008785724639892578],[120,120,0.0010900497436523438],[120,121,0.99951171875],[120,122,0.99951171875],[120,123,0.000005245208740234375],[120,124,0.000002086162567138672],[120,125,0.000012278556823730469],[120,126,0.0000286102294921875],[120,127,0.00010949373245239258],[120,128,0.00011307001113891602],[120,129,0.0000578761100769043],[120,130,0.00003403425216674805],[120,131,0.00003063678741455078],[120,132,0.000032067298889160156],[120,133,0.00001990795135498047],[120,134,0.000005304813385009766],[120,135,0.0000012516975402832031],[120,136,0.000002205371856689453],[120,137,1.7881393432617188e-7],[120,138,0.0000036954879760742188],[120,139,0.0000024437904357910156],[120,140,0.000025272369384765625],[120,141,0.00003463029861450195],[120,142,0.000024020671844482422],[120,143,0.00002872943878173828],[120,144,0.000029325485229492188],[120,145,0.0000064373016357421875],[120,146,0.000006377696990966797],[120,147,0.00001823902130126953],[120,148,0.00001615285873413086],[120,149,0.00003147125244140625],[120,150,0.00000852346420288086],[120,151,0.00007086992263793945],[120,152,0.000027000904083251953],[120,153,0.00015020370483398438],[121,121,0.0013408660888671875],[121,122,0.99609375],[121,123,0.5166015625],[121,124,0.000014066696166992188],[121,125,0.000002562999725341797],[121,126,0.0000010132789611816406],[121,127,0.000004827976226806641],[121,128,0.000012040138244628906],[121,129,0.00002664327621459961],[121,130,0.00003159046173095703],[121,131,0.000008821487426757812],[121,132,0.00002950429916381836],[121,133,8.940696716308594e-7],[121,134,0.000014722347259521484],[121,135,7.152557373046875e-7],[121,136,0.000002205371856689453],[121,137,5.960464477539063e-8],[121,138,9.5367431640625e-7],[121,139,4.172325134277344e-7],[121,140,0.000003159046173095703],[121,141,0.0000311732292175293],[121,142,0.00001710653305053711],[121,143,0.000034928321838378906],[121,144,0.000014424324035644531],[121,145,0.000008821487426757812],[121,146,0.000006616115570068359],[121,147,0.00002199411392211914],[121,148,0.00017201900482177734],[121,149,0.15478515625],[121,150,0.0009784698486328125],[121,151,0.9384765625],[121,152,0.033966064453125],[121,153,0.0230560302734375],[122,122,0.0000050067901611328125],[122,123,0.99951171875],[122,124,0.93212890625],[122,125,0.000013232231140136719],[122,126,0.000003933906555175781],[122,127,0.0000016093254089355469],[122,128,0.000007152557373046875],[122,129,0.000014841556549072266],[122,130,0.00001901388168334961],[122,131,0.000003516674041748047],[122,132,0.000003814697265625],[122,133,0.0000011920928955078125],[122,134,0.000044465065002441406],[122,135,8.940696716308594e-7],[122,136,0.00009936094284057617],[122,137,8.344650268554688e-7],[122,138,0.000009655952453613281],[122,139,0.0000024437904357910156],[122,140,0.0000152587890625],[122,141,0.00006133317947387695],[122,142,0.0000445246696472168],[122,143,0.000037789344787597656],[122,144,0.000022232532501220703],[122,145,0.000014185905456542969],[122,146,0.000006377696990966797],[122,147,0.000013828277587890625],[122,148,0.00022649765014648438],[122,149,0.00004589557647705078],[122,150,0.000028133392333984375],[122,151,0.001251220703125],[122,152,0.0006375312805175781],[122,153,0.004276275634765625],[123,123,0.000008165836334228516],[123,124,0.9990234375],[123,125,0.99755859375],[123,126,0.00001811981201171875],[123,127,0.000012993812561035156],[123,128,0.000003933906555175781],[123,129,0.0000057220458984375],[123,130,0.0000013709068298339844],[123,131,4.172325134277344e-7],[123,132,0.0000024437904357910156],[123,133,2.384185791015625e-7],[123,134,0.000026881694793701172],[123,135,2.980232238769531e-7],[123,136,0.000008225440979003906],[123,137,4.172325134277344e-7],[123,138,0.000004351139068603516],[123,139,0.000004708766937255859],[123,140,0.00004363059997558594],[123,141,0.00012505054473876953],[123,142,0.0002853870391845703],[123,143,0.00006937980651855469],[123,144,0.000025510787963867188],[123,145,0.000013709068298339844],[123,146,0.000024259090423583984],[123,147,0.000005900859832763672],[123,148,0.00008058547973632812],[123,149,0.00004267692565917969],[123,150,0.0006871223449707031],[123,151,0.04205322265625],[123,152,0.1031494140625],[123,153,0.317138671875],[124,124,0.000024080276489257812],[124,125,0.998046875],[124,126,0.63623046875],[124,127,0.00015735626220703125],[124,128,0.000009119510650634766],[124,129,0.00002110004425048828],[124,130,0.000006258487701416016],[124,131,0.00003647804260253906],[124,132,0.478271484375],[124,133,0.0001043081283569336],[124,134,0.82177734375],[124,135,0.000023424625396728516],[124,136,0.004161834716796875],[124,137,0.000005185604095458984],[124,138,0.000013768672943115234],[124,139,0.000006318092346191406],[124,140,0.00003457069396972656],[124,141,0.00014781951904296875],[124,142,0.00034332275390625],[124,143,0.000051856040954589844],[124,144,0.0000502467155456543],[124,145,0.000054717063903808594],[124,146,0.000054895877838134766],[124,147,0.00000768899917602539],[124,148,0.00002849102020263672],[124,149,0.000003159046173095703],[124,150,0.000011026859283447266],[124,151,0.00003713369369506836],[124,152,0.00013685226440429688],[124,153,0.003314971923828125],[125,125,0.000026941299438476562],[125,126,0.9990234375],[125,127,0.9970703125],[125,128,0.00010728836059570312],[125,129,0.000013589859008789062],[125,130,0.0000026226043701171875],[125,131,0.00001704692840576172],[125,132,0.0570068359375],[125,133,0.0000037550926208496094],[125,134,0.00007492303848266602],[125,135,7.152557373046875e-7],[125,136,0.0000027418136596679688],[125,137,0.0000027418136596679688],[125,138,0.00002950429916381836],[125,139,0.000008285045623779297],[125,140,0.00003445148468017578],[125,141,0.00006598234176635742],[125,142,0.00007641315460205078],[125,143,0.00004297494888305664],[125,144,0.00004595518112182617],[125,145,0.00013756752014160156],[125,146,0.000058591365814208984],[125,147,0.000007033348083496094],[125,148,0.000011444091796875],[125,149,0.000004947185516357422],[125,150,0.00000947713851928711],[125,151,0.00003790855407714844],[125,152,0.0004677772521972656],[125,153,0.00905609130859375],[126,126,0.00007897615432739258],[126,127,0.998046875],[126,128,0.99560546875],[126,129,0.00582122802734375],[126,130,0.214111328125],[126,131,0.87646484375],[126,132,0.9970703125],[126,133,0.00017833709716796875],[126,134,0.0042877197265625],[126,135,0.0000011920928955078125],[126,136,0.000006616115570068359],[126,137,0.00003159046173095703],[126,138,0.00007194280624389648],[126,139,0.00005370378494262695],[126,140,0.0000845789909362793],[126,141,0.00007599592208862305],[126,142,0.00008803606033325195],[126,143,0.00011146068572998047],[126,144,0.00009572505950927734],[126,145,0.00024080276489257812],[126,146,0.00009304285049438477],[126,147,0.00003147125244140625],[126,148,0.00005525350570678711],[126,149,0.0000059604644775390625],[126,150,0.000013887882232666016],[126,151,0.00002014636993408203],[126,152,0.000037550926208496094],[126,153,0.00021028518676757812],[127,127,0.006252288818359375],[127,128,0.99951171875],[127,129,0.0018873214721679688],[127,130,0.0005288124084472656],[127,131,0.001659393310546875],[127,132,0.099365234375],[127,133,0.000025153160095214844],[127,134,0.0000921487808227539],[127,135,0.000001430511474609375],[127,136,0.000005781650543212891],[127,137,0.00003236532211303711],[127,138,0.00014019012451171875],[127,139,0.000056743621826171875],[127,140,0.00006157159805297852],[127,141,0.00006103515625],[127,142,0.00006139278411865234],[127,143,0.00004929304122924805],[127,144,0.00005984306335449219],[127,145,0.0002598762512207031],[127,146,0.00008493661880493164],[127,147,0.00004488229751586914],[127,148,0.0000654458999633789],[127,149,0.000039637088775634766],[127,150,0.00007808208465576172],[127,151,0.0001354217529296875],[127,152,0.00009912252426147461],[127,153,0.00016355514526367188],[128,128,0.0007948875427246094],[128,129,0.9990234375],[128,130,0.99658203125],[128,131,0.05291748046875],[128,132,0.80615234375],[128,133,0.000020682811737060547],[128,134,0.000016808509826660156],[128,135,0.000001430511474609375],[128,136,0.000007092952728271484],[128,137,0.000024080276489257812],[128,138,0.00008213520050048828],[128,139,0.00007534027099609375],[128,140,0.00007361173629760742],[128,141,0.00007539987564086914],[128,142,0.00007772445678710938],[128,143,0.00005269050598144531],[128,144,0.00007897615432739258],[128,145,0.0003528594970703125],[128,146,0.00011491775512695312],[128,147,0.0000489354133605957],[128,148,0.00007784366607666016],[128,149,0.00003236532211303711],[128,150,0.0001099705696105957],[128,151,0.00007206201553344727],[128,152,0.00016450881958007812],[128,153,0.00015854835510253906],[129,129,0.00015091896057128906],[129,130,1],[129,131,0.0013799667358398438],[129,132,0.00019621849060058594],[129,133,0.000008881092071533203],[129,134,0.000012695789337158203],[129,135,0.000015735626220703125],[129,136,0.00002765655517578125],[129,137,0.00003832578659057617],[129,138,0.00006145238876342773],[129,139,0.00005906820297241211],[129,140,0.00005608797073364258],[129,141,0.00005120038986206055],[129,142,0.000048100948333740234],[129,143,0.00004029273986816406],[129,144,0.00004857778549194336],[129,145,0.0002186298370361328],[129,146,0.00006014108657836914],[129,147,0.000023126602172851562],[129,148,0.00003403425216674805],[129,149,0.000015914440155029297],[129,150,0.00004285573959350586],[129,151,0.000025987625122070312],[129,152,0.00009638071060180664],[129,153,0.00025773048400878906],[130,130,0.00022172927856445312],[130,131,1],[130,132,0.93798828125],[130,133,0.0003485679626464844],[130,134,0.000005245208740234375],[130,135,0.0000032782554626464844],[130,136,0.000005424022674560547],[130,137,0.000039458274841308594],[130,138,0.00009846687316894531],[130,139,0.000057816505432128906],[130,140,0.000039517879486083984],[130,141,0.00004839897155761719],[130,142,0.00004750490188598633],[130,143,0.000025570392608642578],[130,144,0.00003314018249511719],[130,145,0.00018918514251708984],[130,146,0.0000393986701965332],[130,147,0.000015079975128173828],[130,148,0.000037610530853271484],[130,149,0.000011742115020751953],[130,150,0.000038504600524902344],[130,151,0.000023484230041503906],[130,152,0.0001189112663269043],[130,153,0.0002617835998535156],[131,131,0.00002390146255493164],[131,132,0.9990234375],[131,133,0.98681640625],[131,134,0.000015795230865478516],[131,135,0.0000025033950805664062],[131,136,0.0000026226043701171875],[131,137,0.00004023313522338867],[131,138,0.000046312808990478516],[131,139,0.00004792213439941406],[131,140,0.00004112720489501953],[131,141,0.00003987550735473633],[131,142,0.0000508427619934082],[131,143,0.00004035234451293945],[131,144,0.00005900859832763672],[131,145,0.00018906593322753906],[131,146,0.00003784894943237305],[131,147,0.00001537799835205078],[131,148,0.000016570091247558594],[131,149,0.000006139278411865234],[131,150,0.000019252300262451172],[131,151,0.000012993812561035156],[131,152,0.00005125999450683594],[131,153,0.00010293722152709961],[132,132,0.000023126602172851562],[132,133,0.998046875],[132,134,0.998046875],[132,135,0.000009059906005859375],[132,136,0.00000286102294921875],[132,137,0.000006079673767089844],[132,138,0.000004351139068603516],[132,139,0.00003319978713989258],[132,140,0.000056624412536621094],[132,141,0.00006663799285888672],[132,142,0.0000833272933959961],[132,143,0.000054895877838134766],[132,144,0.000053763389587402344],[132,145,0.00008630752563476562],[132,146,0.00002562999725341797],[132,147,0.000008046627044677734],[132,148,0.00002384185791015625],[132,149,0.0000064373016357421875],[132,150,0.00002181529998779297],[132,151,0.00007212162017822266],[132,152,0.00009387731552124023],[132,153,0.00012022256851196289],[133,133,0.000002384185791015625],[133,134,0.99609375],[133,135,0.5908203125],[133,136,0.000009775161743164062],[133,137,0.0000021457672119140625],[133,138,0.0000028014183044433594],[133,139,0.000014007091522216797],[133,140,0.000028848648071289062],[133,141,0.00012445449829101562],[133,142,0.00013494491577148438],[133,143,0.00007915496826171875],[133,144,0.00005447864532470703],[133,145,0.00008350610733032227],[133,146,0.000028192996978759766],[133,147,0.000008344650268554688],[133,148,0.000013589859008789062],[133,149,0.000004351139068603516],[133,150,0.000012218952178955078],[133,151,0.00001245737075805664],[133,152,0.00005352497100830078],[133,153,0.00007301568984985352],[134,134,0.000002682209014892578],[134,135,0.9990234375],[134,136,0.99951171875],[134,137,0.000005781650543212891],[134,138,0.000003337860107421875],[134,139,0.00000667572021484375],[134,140,0.000007033348083496094],[134,141,0.000202178955078125],[134,142,0.0001537799835205078],[134,143,0.000015974044799804688],[134,144,0.000015735626220703125],[134,145,0.000049173831939697266],[134,146,0.00008696317672729492],[134,147,0.000004410743713378906],[134,148,0.000008821487426757812],[134,149,0.00002002716064453125],[134,150,0.000012874603271484375],[134,151,0.00007975101470947266],[134,152,0.0002605915069580078],[134,153,0.00020933151245117188],[135,135,1.1920928955078125e-7],[135,136,0.99658203125],[135,137,0.99365234375],[135,138,0.000009655952453613281],[135,139,0.0000020265579223632812],[135,140,0.000004589557647705078],[135,141,0.00014901161193847656],[135,142,0.0001386404037475586],[135,143,0.000017821788787841797],[135,144,0.000014841556549072266],[135,145,0.00002187490463256836],[135,146,0.000027179718017578125],[135,147,0.0000019669532775878906],[135,148,0.000007033348083496094],[135,149,0.0000028014183044433594],[135,150,0.000022172927856445312],[135,151,0.000017344951629638672],[135,152,0.00006651878356933594],[135,153,0.00006729364395141602],[136,136,3.5762786865234375e-7],[136,137,0.99462890625],[136,138,0.9990234375],[136,139,0.00002759695053100586],[136,140,0.00002485513687133789],[136,141,0.0002117156982421875],[136,142,0.0003044605255126953],[136,143,0.00238800048828125],[136,144,0.0005197525024414062],[136,145,0.0006260871887207031],[136,146,0.00003927946090698242],[136,147,0.0000489354133605957],[136,148,0.0001766681671142578],[136,149,0.00000667572021484375],[136,150,0.00001138448715209961],[136,151,0.000025391578674316406],[136,152,0.00020432472229003906],[136,153,0.00025463104248046875],[137,137,3.5762786865234375e-7],[137,138,0.9951171875],[137,139,0.9501953125],[137,140,0.00012683868408203125],[137,141,0.0002065896987915039],[137,142,0.00035762786865234375],[137,143,0.0013666152954101562],[137,144,0.00010782480239868164],[137,145,0.0000311732292175293],[137,146,0.000006496906280517578],[137,147,0.000009894371032714844],[137,148,0.000011801719665527344],[137,149,0.000005424022674560547],[137,150,0.000028192996978759766],[137,151,0.00004315376281738281],[137,152,0.00014495849609375],[137,153,0.00013113021850585938],[138,138,0.0000018477439880371094],[138,139,0.99560546875],[138,140,0.97119140625],[138,141,0.01026153564453125],[138,142,0.09991455078125],[138,143,0.8955078125],[138,144,0.031280517578125],[138,145,0.005550384521484375],[138,146,0.0004949569702148438],[138,147,0.0858154296875],[138,148,0.0016040802001953125],[138,149,0.000010848045349121094],[138,150,0.000012040138244628906],[138,151,0.00006157159805297852],[138,152,0.00038886070251464844],[138,153,0.000579833984375],[139,139,0.000008881092071533203],[139,140,0.99609375],[139,141,0.008941650390625],[139,142,0.00815582275390625],[139,143,0.34130859375],[139,144,0.0005197525024414062],[139,145,0.000032007694244384766],[139,146,0.000018298625946044922],[139,147,0.00034165382385253906],[139,148,0.000039577484130859375],[139,149,0.000006079673767089844],[139,150,0.00003218650817871094],[139,151,0.00017595291137695312],[139,152,0.0005350112915039062],[139,153,0.00046324729919433594],[140,140,0.0009112358093261719],[140,141,0.99560546875],[140,142,0.923828125],[140,143,0.86279296875],[140,144,0.007251739501953125],[140,145,0.00016736984252929688],[140,146,0.0004940032958984375],[140,147,0.60400390625],[140,148,0.0006747245788574219],[140,149,0.00005614757537841797],[140,150,0.000027835369110107422],[140,151,0.0002911090850830078],[140,152,0.0009670257568359375],[140,153,0.0011167526245117188],[141,141,0.0006651878356933594],[141,142,0.9931640625],[141,143,0.41455078125],[141,144,0.01312255859375],[141,145,0.0004162788391113281],[141,146,0.0024013519287109375],[141,147,0.1639404296875],[141,148,0.000942230224609375],[141,149,0.00011056661605834961],[141,150,0.0001220703125],[141,151,0.00043582916259765625],[141,152,0.0011234283447265625],[141,153,0.0011587142944335938],[142,142,0.0006818771362304688],[142,143,0.99267578125],[142,144,0.9228515625],[142,145,0.0078887939453125],[142,146,0.3525390625],[142,147,0.826171875],[142,148,0.0030727386474609375],[142,149,0.00017595291137695312],[142,150,0.0000787973403930664],[142,151,0.0003962516784667969],[142,152,0.0018663406372070312],[142,153,0.002105712890625],[143,143,0.02801513671875],[143,144,0.9912109375],[143,145,0.0247802734375],[143,146,0.0218505859375],[143,147,0.94287109375],[143,148,0.038360595703125],[143,149,0.0006933212280273438],[143,150,0.00007027387619018555],[143,151,0.00024008750915527344],[143,152,0.0014095306396484375],[143,153,0.0016422271728515625],[144,144,0.0085296630859375],[144,145,0.9990234375],[144,146,0.990234375],[144,147,0.98828125],[144,148,0.2012939453125],[144,149,0.00012302398681640625],[144,150,0.00010770559310913086],[144,151,0.00001996755599975586],[144,152,0.0005106925964355469],[144,153,0.0005993843078613281],[145,145,0.0009679794311523438],[145,146,0.99951171875],[145,147,0.96484375],[145,148,0.9951171875],[145,149,0.0008258819580078125],[145,150,0.002170562744140625],[145,151,0.00009310245513916016],[145,152,0.00020134449005126953],[145,153,0.0003657341003417969],[146,146,0.0007214546203613281],[146,147,1],[146,148,0.97119140625],[146,149,0.00246429443359375],[146,150,0.0006799697875976562],[146,151,0.00002491474151611328],[146,152,0.00009989738464355469],[146,153,0.00021147727966308594],[147,147,0.0206756591796875],[147,148,0.99951171875],[147,149,0.1461181640625],[147,150,0.00012445449829101562],[147,151,0.000028967857360839844],[147,152,0.000018477439880371094],[147,153,0.00007355213165283203],[148,148,0.0015726089477539062],[148,149,0.998046875],[148,150,0.97607421875],[148,151,0.0004420280456542969],[148,152,0.0006380081176757812],[148,153,0.0016384124755859375],[149,149,0.0006399154663085938],[149,150,0.9951171875],[149,151,0.9208984375],[149,152,0.0037441253662109375],[149,153,0.005222320556640625],[150,150,0.0002911090850830078],[150,151,0.98876953125],[150,152,0.72900390625],[150,153,0.29150390625],[151,151,0.002315521240234375],[151,152,0.9912109375],[151,153,0.1983642578125],[152,152,0.01183319091796875],[152,153,0.94921875],[153,153,0.03485107421875]]}')},1008:function(e,t){e.exports='

    nightingale-heatmap

    \n

    Published on NPM

    \n

    Nightingale Heatmap component is used to generate a heatmap visualisation.

    \n

    Usage

    \n

    The below example is using residues contacts data based on the distance.

    \n
    <nightingale-heatmap></nightingale-heatmap>
    \n

    API Reference

    \n

    Properties

    \n

    width: number

    \n

    The width specifies the width of the heat map.

    \n

    height: number

    \n

    The height specifies the height of the heat map.

    \n

    symmetric: boolean

    \n

    It supports symmetric matrix.

    \n

    data: Array

    \n

    The data array is of the following structure.

    \n
    [\n  [1, 1, 0.2],\n  [1, 2, 0.8],\n  [2, 2, 0.5],\n];
    \n'},175:function(e,t,n){"use strict";n.r(t);var r=n(0),a=n.n(r),i=n(585);function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||h(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,a,i=[],o=!0,c=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){c=!0,a=e}finally{try{o||null==n.return||n.return()}finally{if(c)throw a}}return i}(e,t)||h(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(e,t){if(e){if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=100?.25*u-.25*u%10:u>=20?.25*u-.25*u%5:Math.floor(.25*u);u>0&&f<=u;)l.push(Math.min(u,f)),f+=h;var p=Object(i.axisBottom)(this.x).tickSize(3).tickValues(l);c.append("g").style("font-size",15).attr("transform","translate(0,".concat(this.canvasHeight,")")).call(p).select(".domain").remove();var d=Object(i.axisLeft)(this.y).tickSize(3).tickValues(l);c.append("g").style("font-size",15).call(d).select(".domain").remove(),c.append("text").attr("transform","translate(".concat(this.canvasWidth/2,",").concat(this.canvasHeight+n,")")).style("text-anchor","middle").text("Residue"),c.append("text").attr("transform","rotate(-90)").attr("y",0-o).attr("x",0-this.canvasHeight/2).attr("dy","1em").style("text-anchor","middle").text("Residue"),this.refreshHeatmap(e),Object(i.select)(".canvas-heatmap").on("mousemove",(function(){var n=Math.floor(t.x.domain().length*i.event.offsetX/t.x.range()[1]),r=Math.floor(t.y.domain().length*i.event.offsetY/t.y.range()[1]);if(n>=0&&r>=0){var a=t.x.domain()[n],o=t.y.domain()[r];t.refreshHeatmap(e,[a,o]),t._dispatchSelectionPoint("mousemove",t,{xPoint:a,yPoint:o})}})),Object(i.select)(".canvas-heatmap").on("mouseout",(function(){t.refreshHeatmap(e),t._dispatchSelectionPoint("mouseout",t)}))}},{key:"refreshHeatmap",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(this.context.clearRect(0,0,this.canvasWidth,this.canvasHeight),this.x.bandwidth()<1){var r=[],a=Math.ceil(1/this.x.bandwidth());e.forEach((function(e){if(r.push(e),r.length===a){var n=r.reduce((function(e,t){return e+t[2]}),0),i=c(e);i[2]=n/a,t.drawRect(i),r=[]}}))}else e.forEach((function(e){t.drawRect(e)}));2===n.length&&this.drawRect(n,!0)}},{key:"drawRect",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=Object(i.scaleLinear)().domain([0,1]).range(["darkblue","yellow"]);this.context.beginPath(),this.context.fillStyle=t?"black":n(e[2]),this.context.fillRect(this.x(e[0]),this.y(e[1]),Math.ceil(this.x.bandwidth()),Math.ceil(this.y.bandwidth())),this.symmetricMap&&!t&&this.context.fillRect(this.x(e[1]),this.y(e[0]),Math.ceil(this.x.bandwidth()),Math.ceil(this.y.bandwidth()))}}])&&f(r.prototype,a),o&&f(r,o),u}(d(HTMLElement)),w=n(111),x=n(1007),O=n(35),j=n(1008),_=n.n(j);function S(e){return(S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function k(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function R(e,t){for(var n=0;n=e.length?{done:!0}:{done:!1,value:e[m++]}},e:function(e){throw e},f:c}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var A,i=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){u=!0,A=e},f:function(){try{i||null==n.return||n.return()}finally{if(u)throw A}}}}function l(e,s){if(e){if("string"==typeof e)return h(e,s);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(e,s):void 0}}function h(e,s){(null==s||s>e.length)&&(s=e.length);for(var n=0,m=new Array(s);n=m&&null!=a&&null!==(A=a.children)&&void 0!==A&&A.length?(a._children=a.children,a.children=null):null!=a&&null!==(i=a._children)&&void 0!==i&&i.length&&(a.children=a._children,a._children=null),null!=a&&null!==(u=a.children)&&void 0!==u&&u.length){var q,o=[],d=p(a.children);try{for(d.s();!(q=d.n()).done;){var S=q.value;o.push(e(S,n+1,m,c))}}catch(e){d.e(e)}finally{d.f()}a.children=o}return a},B=function(e,s){var n=Math.abs(e.angle-s.angle)/2;return 2*e.radius*Math.sin(n)},U=function(e){!function(e,s){if("function"!=typeof s&&null!==s)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(s&&s.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),s&&d(e,s)}(a,e);var s,n,c,A=S(a);function a(){var e;return function(e,s){if(!(e instanceof s))throw new TypeError("Cannot call a class as a function")}(this,a),(e=A.call(this)).side=100,e["weight-attribute"]="value",e["weight-attribute-label"]="Value",e["name-attribute"]="name",e["id-attribute"]="id",e["max-depth"]=1/0,e["font-size"]=10,e.activeSegment=null,e.holdSegment=!1,e.topOptions=y,e.handleMousemove=function(s){!e.root||e.activeSegment&&e.holdSegment||e.selectNodeByPosition(s.offsetX-e.side/2,s.offsetY-e.side/2)},e.handleClick=function(s){e.root&&(e.holdSegment=!e.holdSegment,e.holdSegment||e.selectNodeByPosition(s.offsetX-e.side/2,s.offsetY-e.side/2))},e}return s=a,(n=[{key:"prepareTree",value:function(){var e,s,n,m;this._data&&(this.dataWithValues=M(this._data,0,this["max-depth"],this["weight-attribute"]),this.root=(e=this.dataWithValues,s=this.side/2,n=this["weight-attribute"],m=Object(u.hierarchy)(e).sort((function(e,s){return s[n]-e[n]})),Object(u.partition)().size([2*Math.PI,s])(m)))}},{key:"data",get:function(){return this._data},set:function(e){e!==this._data&&(this._data=e,this.prepareTree(),this.renderCanvas())}},{key:"colorFn",value:function(){return Object(u.scaleOrdinal)(Object(u.quantize)(u.interpolateRainbow,this.topOptions.length+1)).domain(this.topOptions.map((function(e,s){return s})))}},{key:"getColor",value:function(e){return 1===e.depth?this.getColorBySuperKingdom(e.data[this["name-attribute"]]):this.getColor(e.parent)}},{key:"getColorBySuperKingdom",value:function(e){return this.colorFn()(this.topOptions.indexOf((null==e?void 0:e.toLowerCase())||null))}},{key:"updated",value:function(e){(e.has("side")||e.has("max-depth")||e.has("weight-attribute"))&&this.prepareTree(),this.renderCanvas()}},{key:"renderCanvas",value:function(){var e=Object(u.select)(this).select("canvas");if(e.node()&&this._data){var s=e.node().getContext("2d"),n=this.side,m=this.side;s.clearRect(0,0,n,m),s.strokeStyle="white",this.root&&(this.renderArcs(s,n,m),this.renderLabels(s,n,m),this["show-label"]&&this.renderActiveSegmentInfo(s))}}},{key:"renderArcs",value:function(e,s,n){var m,c=this,A=p(this.root.descendants().filter((function(e){return e.depth&&e.depth<=c["max-depth"]})));try{for(A.s();!(m=A.n()).done;){var i,u,a=m.value;e.beginPath(),e.lineWidth=1,e.globalAlpha=.9-.05*(a.depth-1);var q=e.lineWidth,o=e.globalAlpha;e.fillStyle=this.getColor(a),e.arc(s/2,n/2,a.y1,a.x0,a.x1),e.arc(s/2,n/2,a.y0,a.x1,a.x0,!0),a.data[this["id-attribute"]]===(null===(i=this.activeSegment)||void 0===i||null===(u=i.data)||void 0===u?void 0:u[this["id-attribute"]])&&(e.lineWidth=4,e.globalAlpha=1),e.stroke(),e.fill(),e.lineWidth=q,e.globalAlpha=o}}catch(e){A.e(e)}finally{A.f()}}},{key:"renderLabels",value:function(e,s,n){var m=this;e.fillStyle="black",e.font="".concat(this["font-size"],"px Arial"),e.textBaseline="middle",e.textAlign="center";var c,A=p(this.root.descendants().filter((function(e){return e.depth&&e.depth<=m["max-depth"]&&(e.y0+e.y1)/2*(e.x1-e.x0)>10})));try{for(A.s();!(c=A.n()).done;){var i,u,a=c.value,q=(a.x0+a.x1)/2,o=(a.y0+a.y1)/2;e.save(),e.translate(s/2,n/2),e.rotate(q),e.translate(o,0);var d=!1,S=a.y1-a.y0;if(Math.abs(a.x1-a.x0)>Math.PI/2)d=!0;else{var D=B({angle:a.x0,radius:a.y0},{angle:a.x1,radius:a.y0});D>a.y1-a.y0&&(d=!0,S=D)}d?(e.rotate(Math.PI/2),q>0&&qMath.PI/2&&q<1.5*Math.PI&&e.rotate(Math.PI),e.fillText(a.data[this["name-attribute"]]||(a.data.rank?"[No ".concat(a.data.rank,"]"):"No name"),0,0,a.data[this["id-attribute"]]===(null===(i=this.activeSegment)||void 0===i||null===(u=i.data)||void 0===u?void 0:u[this["id-attribute"]])?void 0:S-2),e.restore()}}catch(e){A.e(e)}finally{A.f()}}},{key:"renderActiveSegmentInfo",value:function(e){this.activeSegment&&(e.textAlign="left",e.font="bold 12px Arial",e.fillText("Name:",10,10),e.fillText(this["weight-attribute-label"],10,40),e.font="12px Arial",e.fillText(this.activeSegment.data[this["name-attribute"]],15,25),e.fillText(function e(s,n){return s[n]?s[n]:s.children?s.children.reduce((function(s,m){return s+e(m,n)}),0):0}(this.activeSegment.data,this["weight-attribute"]),15,55))}},{key:"selectNodeByPosition",value:function(e,s){var n,m,c=this,A=Math.sqrt(e*e+s*s),i=0===e?0:Math.atan(s/e),u=0===s?0:Math.atan(e/s),a=this.activeSegment;this.activeSegment=null,this.root.descendants().filter((function(e){return e.depth})).forEach((function(n){var m=0;n.y1>A&&A>n.y0&&(e>0&&s>0?m=i:e<0&&s>0?m=Math.PI/2+Math.abs(u):e<0&&s<0?m=Math.PI+Math.abs(i):e>0&&s<0&&(m=1.5*Math.PI+Math.abs(u)),n.x1>m&&m>n.x0&&(c.activeSegment=n))})),a!==this.activeSegment&&(null!==(n=this.activeSegment)&&void 0!==n&&n.data&&!this.activeSegment.data.lineage&&(this.activeSegment.data.lineage=function e(s,n,m){return s.parent?[].concat(t(e(s.parent,n,m)),[{name:s.data[n],id:s.data[m]}]):[{name:s.data[n],id:s.data[m]}]}(this.activeSegment,this["name-attribute"],this["id-attribute"])),this.dispatchEvent(new CustomEvent("taxon-hover",{detail:null===(m=this.activeSegment)||void 0===m?void 0:m.data,bubbles:!0,cancelable:!0})),this.renderCanvas())}},{key:"createRenderRoot",value:function(){return this}},{key:"firstUpdated",value:function(){var e,s;null===(e=this.getElementsByTagName("canvas"))||void 0===e||e[0].addEventListener("click",this.handleClick),null===(s=this.getElementsByTagName("canvas"))||void 0===s||s[0].addEventListener("mousemove",this.handleMousemove)}},{key:"disconnectedCallback",value:function(){var e,s;o(r(a.prototype),"disconnectedCallback",this).call(this),null===(e=this.getElementsByTagName("canvas"))||void 0===e||e[0].removeEventListener("click",this.handleClick),null===(s=this.getElementsByTagName("canvas"))||void 0===s||s[0].removeEventListener("mousemove",this.handleMousemove)}},{key:"render",value:function(){return Object(i.c)(m||(e=[' \n Nightingale Sunburst\n '],s||(s=e.slice(0)),m=Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(s)}}))),this.side,this.side);var e,s}}])&&q(s.prototype,n),c&&q(s,c),a}(i.a);P(U,"properties",{side:{type:Number},"weight-attribute":{type:String},"weight-attribute-label":{type:String},"name-attribute":{type:String},"id-attribute":{type:String},"max-depth":{type:Number},"font-size":{type:Number},"show-label":{type:Boolean}});var N=U,G=n(111),g=n(1012),E=n(35),K=n(1013),T=n.n(K);function V(e,s){return function(e){if(Array.isArray(e))return e}(e)||function(e,s){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var m,c,A=[],i=!0,u=!1;try{for(n=n.call(e);!(i=(m=n.next()).done)&&(A.push(m.value),!s||A.length!==s);i=!0);}catch(e){u=!0,c=e}finally{try{i||null==n.return||n.return()}finally{if(u)throw c}}return A}(e,s)||function(e,s){if(!e)return;if("string"==typeof e)return W(e,s);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return W(e,s)}(e,s)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function W(e,s){(null==s||s>e.length)&&(s=e.length);for(var n=0,m=new Array(s);ninteraction-viewer\n

    Published on NPM

    \n

    An adjacency graph visualisation of protein interaction data.

    \n

    Usage

    \n
    <interaction-viewer accession="O60941"></interaction-viewer>
    \n

    API

    \n
      \n
    • accession changing the accession will cause the component to fetch the data for the given entry
    • \n
    \n

    Dependencies

    \n

    This component uses Custom elements V1 (https://www.webcomponents.org/polyfills/), which requires the use of a polyfill in certain browsers.

    \n

    Contact

    \n

    For support contact help@uniprot.org and please put interaction viewer in the subject line.

    \n

    License

    \n

    Distributed under the Apache License 2.0

    \n'},171:function(t,e,n){"use strict";n.r(e);var r,o,c,i,a=n(0),s=n.n(a),l=n(35),u=n(1006),f=n.n(u),p=n(801),d=n(915);function h(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}function y(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function b(t,e){for(var n=0;n=0;a--)(o=t[a])&&(i=(c<3?o(i):c>3?o(e,n,i):o(e,n))||i);return c>3&&i&&Object.defineProperty(e,n,i),i},x=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&v(t,e)}(s,t);var e,n,i,a=m(s);function s(){return y(this,s),a.apply(this,arguments)}return e=s,(n=[{key:"handleChange",value:function(t){var e=t.target.value;this.dispatchEvent(new CustomEvent("filter-select",{detail:e?JSON.parse(e):[],composed:!0}))}},{key:"handleReset",value:function(){this.dispatchEvent(new CustomEvent("filter-select",{detail:[],composed:!0}))}},{key:"render",value:function(){var t,e=this;return Object(p.c)(r||(r=h(["\n
    \n
    \n Filter\n ",'\n
    \n '])),this.accession,e,JSON.stringify(null===(t=this.processedData)||void 0===t?void 0:t.filterConfig))}}])&&ut(e.prototype,n),r&&ut(e,r),c}(p.a);mt.styles=at,vt([Object(d.b)({type:String,reflect:!0})],mt.prototype,"accession",void 0),vt([Object(d.b)({type:Number,reflect:!0})],mt.prototype,"maxInteractors",void 0),vt([Object(d.c)()],mt.prototype,"processedData",void 0),vt([Object(d.c)()],mt.prototype,"filteredAccessions",void 0);mt=vt([Object(d.a)("interaction-viewer")],mt),e.default=function(t){return s.a.createElement(a.Fragment,null,s.a.createElement(l.default,{content:f.a}),s.a.createElement("interaction-viewer",{accession:"O00311"}))}},629:function(t,e,n){"use strict";n.d(e,"b",(function(){return v}));var r=n(675);function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function c(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return i(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,c=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw c}}}}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n1&&void 0!==arguments[1]?arguments[1]:new Headers({accept:"application/json"}),n=b.get(t);if(n)return n;var r=y(void 0,void 0,void 0,regeneratorRuntime.mark((function n(){var r,o;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,window.fetch(t,{headers:e});case 2:if((r=n.sent).ok){n.next=5;break}throw new Error("Request Failed: Status = ".concat(r.status,"; URI = ").concat(t,"; Time = ").concat(new Date));case 5:if(204!==r.status){n.next=7;break}return n.abrupt("return",{payload:null,headers:r.headers});case 7:return n.next=9,r.json();case 9:return o=n.sent,n.abrupt("return",{payload:o,headers:r.headers});case 11:case"end":return n.stop()}}),n)})));return b.set(t,r),r.catch((function(){return b.delete(t)})),r},m=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&p(t,e)}(b,t);var e,n,o,i,l,u=(e=b,n=f(),function(){var t,r=d(e);if(n){var o=d(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return s(this,t)});function b(){var t;return h(this,b),(t=u.call(this))._data=null,t.selector=(t.getAttribute("selector")||"").trim()||function(t){return t},t}return o=b,l=[{key:"is",get:function(){return"data-loader"}}],(i=[{key:"fetch",value:function(){return y(this,void 0,void 0,regeneratorRuntime.mark((function t(){var e,n,o,i,a,s;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(l=this.children,(e=Array.from(l).filter((function(t){return t.matches('source[src], script[type="application/json"]')}))).length){t.next=3;break}return t.abrupt("return");case 3:n=[],i=c(e),t.prev=5,i.s();case 7:if((a=i.n()).done){t.next=31;break}if(s=a.value,t.prev=9,!(s instanceof HTMLSourceElement)){t.next=22;break}return t.t0=Object,t.t1=Object,t.t2={},t.next=16,v(s.src);case 16:t.t3=t.sent,t.t4=t.t1.assign.call(t.t1,t.t2,t.t3),t.t5={srcElement:s,src:s.src},o=t.t0.assign.call(t.t0,t.t4,t.t5),t.next=23;break;case 22:o={payload:JSON.parse(s.textContent)};case 23:return t.abrupt("break",31);case 26:t.prev=26,t.t6=t.catch(9),n.push(t.t6);case 29:t.next=7;break;case 31:t.next=36;break;case 33:t.prev=33,t.t7=t.catch(5),i.e(t.t7);case 36:return t.prev=36,i.f(),t.finish(36);case 39:if(o){t.next=43;break}this._errors=n;try{this.dispatchEvent(new CustomEvent("error",{detail:n,bubbles:!0,cancelable:!0}))}catch(t){console.error(t)}return t.abrupt("return");case 43:"string"==typeof this.selector?this._data=Object(r.a)(o.payload,this.selector):this._data=this.selector(o.payload),o.payload=this.data,this.dispatchEvent(new CustomEvent("load",{detail:o,bubbles:!0,cancelable:!0}));case 46:case"end":return t.stop()}var l}),t,this,[[5,33,36,39],[9,26]])})))}},{key:"data",get:function(){return this._data}},{key:"loaded",get:function(){return!!this.data}},{key:"errors",get:function(){return this._errors}},{key:"selector",get:function(){return this._selector},set:function(t){this._selector=t}},{key:"connectedCallback",value:function(){this.fetch()}}])&&a(o.prototype,i),l&&a(o,l),b}(l(HTMLElement));e.a=m}}]); \ No newline at end of file diff --git a/v3/23.js b/v3/23.js new file mode 100644 index 000000000..04bbb8825 --- /dev/null +++ b/v3/23.js @@ -0,0 +1,10 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[23],{1096:function(t,e,n){(function(t){var n,r,i,o;function l(t){return function(t){if(Array.isArray(t))return u(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||c(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function s(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=t&&("undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"]);if(null==n)return;var r,i,o=[],l=!0,a=!1;try{for(n=n.call(t);!(l=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);l=!0);}catch(t){a=!0,i=t}finally{try{l||null==n.return||n.return()}finally{if(a)throw i}}return o}(t,e)||c(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(t,e){if(t){if("string"==typeof t)return u(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(t,e):void 0}}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&(n.attributes=e),this.push(n))},s.prototype.delete=function(t){return t<=0?this:this.push({delete:t})},s.prototype.retain=function(t,e){if(t<=0)return this;var n={retain:t};return null!=e&&"object"==_(e)&&Object.keys(e).length>0&&(n.attributes=e),this.push(n)},s.prototype.push=function(t){var e=this.ops.length,n=this.ops[e-1];if(t=o(!0,{},t),"object"==_(n)){if("number"==typeof t.delete&&"number"==typeof n.delete)return this.ops[e-1]={delete:n.delete+t.delete},this;if("number"==typeof n.delete&&null!=t.insert&&(e-=1,"object"!=_(n=this.ops[e-1])))return this.ops.unshift(t),this;if(i(t.attributes,n.attributes)){if("string"==typeof t.insert&&"string"==typeof n.insert)return this.ops[e-1]={insert:n.insert+t.insert},"object"==_(t.attributes)&&(this.ops[e-1].attributes=t.attributes),this;if("number"==typeof t.retain&&"number"==typeof n.retain)return this.ops[e-1]={retain:n.retain+t.retain},"object"==_(t.attributes)&&(this.ops[e-1].attributes=t.attributes),this}}return e===this.ops.length?this.ops.push(t):this.ops.splice(e,0,t),this},s.prototype.chop=function(){var t=this.ops[this.ops.length-1];return t&&t.retain&&!t.attributes&&this.ops.pop(),this},s.prototype.filter=function(t){return this.ops.filter(t)},s.prototype.forEach=function(t){this.ops.forEach(t)},s.prototype.map=function(t){return this.ops.map(t)},s.prototype.partition=function(t){var e=[],n=[];return this.forEach((function(r){(t(r)?e:n).push(r)})),[e,n]},s.prototype.reduce=function(t,e){return this.ops.reduce(t,e)},s.prototype.changeLength=function(){return this.reduce((function(t,e){return e.insert?t+l.length(e):e.delete?t-e.delete:t}),0)},s.prototype.length=function(){return this.reduce((function(t,e){return t+l.length(e)}),0)},s.prototype.slice=function(t,e){t=t||0,"number"!=typeof e&&(e=1/0);for(var n=[],r=l.iterator(this.ops),i=0;i0&&n.next(o.retain-a)}for(var c=new s(r);e.hasNext()||n.hasNext();)if("insert"===n.peekType())c.push(n.next());else if("delete"===e.peekType())c.push(e.next());else{var u=Math.min(e.peekLength(),n.peekLength()),h=e.next(u),f=n.next(u);if("number"==typeof f.retain){var d={};"number"==typeof h.retain?d.retain=u:d.insert=h.insert;var p=l.attributes.compose(h.attributes,f.attributes,"number"==typeof h.retain);if(p&&(d.attributes=p),c.push(d),!n.hasNext()&&i(c.ops[c.ops.length-1],d)){var g=new s(e.rest());return c.concat(g).chop()}}else"number"==typeof f.delete&&"number"==typeof h.retain&&c.push(f)}return c.chop()},s.prototype.concat=function(t){var e=new s(this.ops.slice());return t.ops.length>0&&(e.push(t.ops[0]),e.ops=e.ops.concat(t.ops.slice(1))),e},s.prototype.diff=function(t,e){if(this.ops===t.ops)return new s;var n=[this,t].map((function(e){return e.map((function(n){if(null!=n.insert)return"string"==typeof n.insert?n.insert:a;throw new Error("diff() called "+(e===t?"on":"with")+" non-document")})).join("")})),o=new s,c=r(n[0],n[1],e),u=l.iterator(this.ops),h=l.iterator(t.ops);return c.forEach((function(t){for(var e=t[1].length;e>0;){var n=0;switch(t[0]){case r.INSERT:n=Math.min(h.peekLength(),e),o.push(h.next(n));break;case r.DELETE:n=Math.min(e,u.peekLength()),u.next(n),o.delete(n);break;case r.EQUAL:n=Math.min(u.peekLength(),h.peekLength(),e);var a=u.next(n),s=h.next(n);i(a.insert,s.insert)?o.retain(n,l.attributes.diff(a.attributes,s.attributes)):o.push(s).delete(n)}e-=n}})),o.chop()},s.prototype.eachLine=function(t,e){e=e||"\n";for(var n=l.iterator(this.ops),r=new s,i=0;n.hasNext();){if("insert"!==n.peekType())return;var o=n.peek(),a=l.length(o)-n.peekLength(),c="string"==typeof o.insert?o.insert.indexOf(e,a)-a:-1;if(c<0)r.push(n.next());else if(c>0)r.push(n.next(c));else{if(!1===t(r,n.next(1).attributes||{},i))return;i+=1,r=new s}}r.length()>0&&t(r,{},i)},s.prototype.transform=function(t,e){if(e=!!e,"number"==typeof t)return this.transformPosition(t,e);for(var n=l.iterator(this.ops),r=l.iterator(t.ops),i=new s;n.hasNext()||r.hasNext();)if("insert"!==n.peekType()||!e&&"insert"===r.peekType())if("insert"===r.peekType())i.push(r.next());else{var o=Math.min(n.peekLength(),r.peekLength()),a=n.next(o),c=r.next(o);if(a.delete)continue;c.delete?i.push(c):i.retain(o,l.attributes.transform(a.attributes,c.attributes,e))}else i.retain(l.length(n.next()));return i.chop()},s.prototype.transformPosition=function(t,e){e=!!e;for(var n=l.iterator(this.ops),r=0;n.hasNext()&&r<=t;){var i=n.peekLength(),o=n.peekType();n.next(),"delete"!==o?("insert"===o&&(r1&&void 0!==arguments[1]?arguments[1]:i.ANY;if("string"==typeof t)e=s[t]||o[t];else if(t instanceof Text||t.nodeType===Node.TEXT_NODE)e=s.text;else if("number"==typeof t)t&i.LEVEL&i.BLOCK?e=s.block:t&i.LEVEL&i.INLINE&&(e=s.inline);else if(t instanceof HTMLElement){var r=(t.getAttribute("class")||"").split(/\s+/);for(var c in r)if(e=l[r[c]])break;e=e||a[t.tagName]}return null==e?null:n&i.LEVEL&e.scope&&n&i.TYPE&e.scope?e:null}e.DATA_KEY="__blot",function(t){t[t.TYPE=3]="TYPE",t[t.LEVEL=12]="LEVEL",t[t.ATTRIBUTE=13]="ATTRIBUTE",t[t.BLOT=14]="BLOT",t[t.INLINE=7]="INLINE",t[t.BLOCK=11]="BLOCK",t[t.BLOCK_BLOT=10]="BLOCK_BLOT",t[t.INLINE_BLOT=6]="INLINE_BLOT",t[t.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",t[t.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",t[t.ANY=15]="ANY"}(i=e.Scope||(e.Scope={})),e.create=function(t,e){var n=c(t);if(null==n)throw new r("Unable to create ".concat(t," blot"));var i=n,o=t instanceof Node||t.nodeType===Node.TEXT_NODE?t:i.create(e);return new i(o,e)},e.find=function t(n){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return null==n?null:null!=n[e.DATA_KEY]?n[e.DATA_KEY].blot:r?t(n.parentNode,r):null},e.query=c,e.register=function t(){for(var e=arguments.length,n=new Array(e),i=0;i1)return n.map((function(e){return t(e)}));var c=n[0];if("string"!=typeof c.blotName&&"string"!=typeof c.attrName)throw new r("Invalid definition");if("abstract"===c.blotName)throw new r("Cannot register abstract class");return s[c.blotName||c.attrName]=c,"string"==typeof c.keyName?o[c.keyName]=c:(null!=c.className&&(l[c.className]=c),null!=c.tagName&&(Array.isArray(c.tagName)?c.tagName=c.tagName.map((function(t){return t.toUpperCase()})):c.tagName=c.tagName.toUpperCase(),(Array.isArray(c.tagName)?c.tagName:[c.tagName]).forEach((function(t){null!=a[t]&&null!=c.className||(a[t]=c)})))),c}},function(t,e,n){(function(e){var n=function(){"use strict";function t(t,e){return null!=e&&t instanceof e}var n,r,i;try{n=Map}catch(t){n=function(){}}try{r=Set}catch(t){r=function(){}}try{i=Promise}catch(t){i=function(){}}function o(l,s,c,u,h){"object"==_(s)&&(c=s.depth,u=s.prototype,h=s.includeNonEnumerable,s=s.circular);var f=[],d=[],p=void 0!==e;return void 0===s&&(s=!0),void 0===c&&(c=1/0),function l(c,g){if(null===c)return null;if(0===g)return c;var y,v;if("object"!=_(c))return c;if(t(c,n))y=new n;else if(t(c,r))y=new r;else if(t(c,i))y=new i((function(t,e){c.then((function(e){t(l(e,g-1))}),(function(t){e(l(t,g-1))}))}));else if(o.__isArray(c))y=[];else if(o.__isRegExp(c))y=new RegExp(c.source,a(c)),c.lastIndex&&(y.lastIndex=c.lastIndex);else if(o.__isDate(c))y=new Date(c.getTime());else{if(p&&e.isBuffer(c))return y=e.allocUnsafe?e.allocUnsafe(c.length):new e(c.length),c.copy(y),y;t(c,Error)?y=Object.create(c):void 0===u?(v=Object.getPrototypeOf(c),y=Object.create(v)):(y=Object.create(u),v=u)}if(s){var m=f.indexOf(c);if(-1!=m)return d[m];f.push(c),d.push(y)}for(var A in t(c,n)&&c.forEach((function(t,e){var n=l(e,g-1),r=l(t,g-1);y.set(n,r)})),t(c,r)&&c.forEach((function(t){var e=l(t,g-1);y.add(e)})),c){var b;v&&(b=Object.getOwnPropertyDescriptor(v,A)),b&&null==b.set||(y[A]=l(c[A],g-1))}if(Object.getOwnPropertySymbols){var q=Object.getOwnPropertySymbols(c);for(A=0;A0&&"number"!=typeof t[0])}t.exports=function t(e,n,f){var d=f||{};return!!(d.strict?o(e,n):e===n)||(!e||!n||"object"!=_(e)&&"object"!=_(n)?d.strict?o(e,n):e==n:function(e,n,o){var f,d;if(_(e)!=_(n))return!1;if(u(e)||u(n))return!1;if(e.prototype!==n.prototype)return!1;if(i(e)!==i(n))return!1;var p=l(e),g=l(n);if(p!==g)return!1;if(p||g)return e.source===n.source&&a(e)===a(n);if(s(e)&&s(n))return c.call(e)===c.call(n);var y=h(e),v=h(n);if(y!==v)return!1;if(y||v){if(e.length!==n.length)return!1;for(f=0;f=0;f--)if(m[f]!=A[f])return!1;for(f=m.length-1;f>=0;f--)if(!t(e[d=m[f]],n[d],o))return!1;return!0}(e,n,d))}},function(t,e,n){t.exports={align:{"":n(70),center:n(71),right:n(72),justify:n(73)},background:n(74),blockquote:n(75),bold:n(76),clean:n(77),code:n(31),"code-block":n(31),color:n(78),direction:{"":n(79),rtl:n(80)},float:{center:n(81),full:n(82),left:n(83),right:n(84)},formula:n(85),header:{1:n(86),2:n(87)},italic:n(88),image:n(89),indent:{"+1":n(90),"-1":n(91)},link:n(92),list:{ordered:n(93),bullet:n(94),check:n(95)},script:{sub:n(96),super:n(97)},strike:n(98),underline:n(99),video:n(100)}},function(t,e,n){var r=n(5),i=n(2),o={attributes:{compose:function(t,e,n){"object"!=_(t)&&(t={}),"object"!=_(e)&&(e={});var r=i(!0,{},e);for(var o in n||(r=Object.keys(r).reduce((function(t,e){return null!=r[e]&&(t[e]=r[e]),t}),{})),t)void 0!==t[o]&&void 0===e[o]&&(r[o]=t[o]);return Object.keys(r).length>0?r:void 0},diff:function(t,e){"object"!=_(t)&&(t={}),"object"!=_(e)&&(e={});var n=Object.keys(t).concat(Object.keys(e)).reduce((function(n,i){return r(t[i],e[i])||(n[i]=void 0===e[i]?null:e[i]),n}),{});return Object.keys(n).length>0?n:void 0},transform:function(t,e,n){if("object"!=_(t))return e;if("object"==_(e)){if(!n)return e;var r=Object.keys(e).reduce((function(n,r){return void 0===t[r]&&(n[r]=e[r]),n}),{});return Object.keys(r).length>0?r:void 0}}},iterator:function(t){return new l(t)},length:function(t){return"number"==typeof t.delete?t.delete:"number"==typeof t.retain?t.retain:"string"==typeof t.insert?t.insert.length:1}};function l(t){this.ops=t,this.index=0,this.offset=0}l.prototype.hasNext=function(){return this.peekLength()<1/0},l.prototype.next=function(t){t||(t=1/0);var e=this.ops[this.index];if(e){var n=this.offset,r=o.length(e);if(t>=r-n?(t=r-n,this.index+=1,this.offset=0):this.offset+=t,"number"==typeof e.delete)return{delete:t};var i={};return e.attributes&&(i.attributes=e.attributes),"number"==typeof e.retain?i.retain=t:"string"==typeof e.insert?i.insert=e.insert.substr(n,t):i.insert=e.insert,i}return{retain:1/0}},l.prototype.peek=function(){return this.ops[this.index]},l.prototype.peekLength=function(){return this.ops[this.index]?o.length(this.ops[this.index])-this.offset:1/0},l.prototype.peekType=function(){return this.ops[this.index]?"number"==typeof this.ops[this.index].delete?"delete":"number"==typeof this.ops[this.index].retain?"retain":"insert":"retain"},l.prototype.rest=function(){if(this.hasNext()){if(0===this.offset)return this.ops.slice(this.index);var t=this.offset,e=this.index,n=this.next(),r=this.ops.slice(this.index);return this.offset=t,this.index=e,[n].concat(r)}return[]},t.exports=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3);e.default=function(){function t(e,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};p(this,t),this.attrName=e,this.keyName=n;var o=r.Scope.TYPE&r.Scope.ATTRIBUTE;null!=i.scope?this.scope=i.scope&r.Scope.LEVEL|o:this.scope=r.Scope.ATTRIBUTE,null!=i.whitelist&&(this.whitelist=i.whitelist)}return d(t,[{key:"add",value:function(t,e){return!!this.canAdd(t,e)&&(t.setAttribute(this.keyName,e),!0)}},{key:"canAdd",value:function(t,e){return null!=r.query(t,r.Scope.BLOT&(this.scope|r.Scope.TYPE))&&(null==this.whitelist||("string"==typeof e?this.whitelist.indexOf(e.replace(/["']/g,""))>-1:this.whitelist.indexOf(e)>-1))}},{key:"remove",value:function(t){t.removeAttribute(this.keyName)}},{key:"value",value:function(t){var e=t.getAttribute(this.keyName);return this.canAdd(t,e)&&e?e:""}}],[{key:"keys",value:function(t){return[].map.call(t.attributes,(function(t){return t.name}))}}]),t}()},function(t,e,n){"use strict";var r=n(21),i="function"==typeof Symbol&&"symbol"==_(Symbol("foo")),o=Object.prototype.toString,l=Array.prototype.concat,a=Object.defineProperty,s=a&&function(){var t={};try{for(var e in a(t,"x",{enumerable:!1,value:t}),t)return!1;return t.x===t}catch(t){return!1}}(),c=function(t,e,n,r){var i;(!(e in t)||"function"==typeof(i=r)&&"[object Function]"===o.call(i)&&r())&&(s?a(t,e,{configurable:!0,enumerable:!1,value:n,writable:!0}):t[e]=n)},u=function(t,e){var n=arguments.length>2?arguments[2]:{},o=r(e);i&&(o=l.call(o,Object.getOwnPropertySymbols(e)));for(var a=0;a1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Number.MAX_VALUE,i=[],o=r;return this.children.forEachAt(e,r,(function(e,r,l){(null==t.blotName&&t(e)||null!=t.blotName&&e instanceof t)&&i.push(e),e instanceof n&&(i=i.concat(e.descendants(t,r,o))),o-=l})),i}},{key:"detach",value:function(){this.children.forEach((function(t){t.detach()})),h(k(n.prototype),"detach",this).call(this)}},{key:"formatAt",value:function(t,e,n,r){this.children.forEachAt(t,e,(function(t,e,i){t.formatAt(e,i,n,r)}))}},{key:"insertAt",value:function(t,e,n){var r=s(this.children.find(t),2),i=r[0],l=r[1];if(i)i.insertAt(l,e,n);else{var a=null==n?o.create("text",e):o.create(e,n);this.appendChild(a)}}},{key:"insertBefore",value:function(t,e){if(null!=this.statics.allowedChildren&&!this.statics.allowedChildren.some((function(e){return t instanceof e})))throw new o.ParchmentError("Cannot insert ".concat(t.statics.blotName," into ").concat(this.statics.blotName));t.insertInto(this,e)}},{key:"length",value:function(){return this.children.reduce((function(t,e){return t+e.length()}),0)}},{key:"moveChildren",value:function(t,e){this.children.forEach((function(n){t.insertBefore(n,e)}))}},{key:"optimize",value:function(t){if(h(k(n.prototype),"optimize",this).call(this,t),0===this.children.length)if(null!=this.statics.defaultChild){var e=o.create(this.statics.defaultChild);this.appendChild(e),e.optimize(t)}else this.remove()}},{key:"path",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this.children.find(t,e),i=s(r,2),o=i[0],l=i[1],a=[[this,t]];return o instanceof n?a.concat(o.path(l,e)):(null!=o&&a.push([o,l]),a)}},{key:"removeChild",value:function(t){this.children.remove(t)}},{key:"replace",value:function(t){t instanceof n&&t.moveChildren(this),h(k(n.prototype),"replace",this).call(this,t)}},{key:"split",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!e){if(0===t)return this;if(t===this.length())return this.next}var n=this.clone();return this.parent.insertBefore(n,this.next),this.children.forEachAt(t,this.length(),(function(t,r,i){t=t.split(r,e),n.appendChild(t)})),n}},{key:"unwrap",value:function(){this.moveChildren(this.parent,this.next),this.remove()}},{key:"update",value:function(t,e){var n=this,r=[],i=[];t.forEach((function(t){t.target===n.domNode&&"childList"===t.type&&(r.push.apply(r,t.addedNodes),i.push.apply(i,t.removedNodes))})),i.forEach((function(t){if(!(null!=t.parentNode&&"IFRAME"!==t.tagName&&document.body.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var e=o.find(t);null!=e&&(null!=e.domNode.parentNode&&e.domNode.parentNode!==n.domNode||e.detach())}})),r.filter((function(t){return t.parentNode==n.domNode})).sort((function(t,e){return t===e?0:t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1})).forEach((function(t){var e=null;null!=t.nextSibling&&(e=o.find(t.nextSibling));var r=a(t);r.next==e&&null!=r.next||(null!=r.parent&&r.parent.removeChild(n),n.insertBefore(r,e||void 0))}))}}]),n}(i.default);function a(t){var e=o.find(t);if(null==e)try{e=o.create(t)}catch(n){e=o.create(o.Scope.INLINE),[].slice.call(t.childNodes).forEach((function(t){e.domNode.appendChild(t)})),t.parentNode&&t.parentNode.replaceChild(e.domNode,t),e.attach()}return e}e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(8),i=n(18),o=n(12),l=n(3),a=function(t){g(n,t);var e=y(n);function n(t){var r;return p(this,n),(r=e.call(this,t)).attributes=new i.default(r.domNode),r}return d(n,[{key:"format",value:function(t,e){var n=l.query(t);n instanceof r.default?this.attributes.attribute(n,e):e&&(null==n||t===this.statics.blotName&&this.formats()[t]===e||this.replaceWith(t,e))}},{key:"formats",value:function(){var t=this.attributes.values(),e=this.statics.formats(this.domNode);return null!=e&&(t[this.statics.blotName]=e),t}},{key:"replaceWith",value:function(t,e){var r=h(k(n.prototype),"replaceWith",this).call(this,t,e);return this.attributes.copy(r),r}},{key:"update",value:function(t,e){var r=this;h(k(n.prototype),"update",this).call(this,t,e),t.some((function(t){return t.target===r.domNode&&"attributes"===t.type}))&&this.attributes.build()}},{key:"wrap",value:function(t,e){var r=h(k(n.prototype),"wrap",this).call(this,t,e);return r instanceof n&&r.statics.scope===this.statics.scope&&this.attributes.move(r),r}}],[{key:"formats",value:function(t){return"string"==typeof this.tagName||(Array.isArray(this.tagName)?t.tagName.toLowerCase():void 0)}}]),n}(o.default);e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(17),i=n(3),o=function(t){g(n,t);var e=y(n);function n(){return p(this,n),e.apply(this,arguments)}return d(n,[{key:"index",value:function(t,e){return this.domNode===t||this.domNode.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(e,1):-1}},{key:"position",value:function(t,e){var n=[].indexOf.call(this.parent.domNode.childNodes,this.domNode);return t>0&&(n+=1),[this.parent.domNode,n]}},{key:"value",value:function(){return a({},this.statics.blotName,this.statics.value(this.domNode)||!0)}}],[{key:"value",value:function(t){return!0}}]),n}(r.default);o.scope=i.Scope.INLINE_BLOT,e.default=o},function(t,e,n){"use strict";var r=n(58);t.exports=Function.prototype.bind||r},function(t,e,n){"use strict";var r=n(15),i=n(24),o=i("%Function.prototype.apply%"),l=i("%Function.prototype.call%"),a=i("%Reflect.apply%",!0)||r.call(l,o),s=i("%Object.getOwnPropertyDescriptor%",!0),c=i("%Object.defineProperty%",!0),u=i("%Math.max%");if(c)try{c({},"a",{value:1})}catch(t){c=null}t.exports=function(t){var e=a(r,l,arguments);if(s&&c){var n=s(e,"length");n.configurable&&c(e,"length",{value:1+u(0,t.length-(arguments.length-1))})}return e};var h=function(){return a(r,o,arguments)};c?c(t.exports,"apply",{value:h}):t.exports.apply=h},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3),i=function(){function t(e){p(this,t),this.domNode=e,this.domNode[r.DATA_KEY]={blot:this}}return d(t,[{key:"statics",get:function(){return this.constructor}},{key:"attach",value:function(){null!=this.parent&&(this.scroll=this.parent.scroll)}},{key:"clone",value:function(){var t=this.domNode.cloneNode(!1);return r.create(t)}},{key:"detach",value:function(){null!=this.parent&&this.parent.removeChild(this),delete this.domNode[r.DATA_KEY]}},{key:"deleteAt",value:function(t,e){this.isolate(t,e).remove()}},{key:"formatAt",value:function(t,e,n,i){var o=this.isolate(t,e);if(null!=r.query(n,r.Scope.BLOT)&&i)o.wrap(n,i);else if(null!=r.query(n,r.Scope.ATTRIBUTE)){var l=r.create(this.statics.scope);o.wrap(l),l.format(n,i)}}},{key:"insertAt",value:function(t,e,n){var i=null==n?r.create("text",e):r.create(e,n),o=this.split(t);this.parent.insertBefore(i,o)}},{key:"insertInto",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;null!=this.parent&&this.parent.children.remove(this);var n=null;t.children.insertBefore(this,e),null!=e&&(n=e.domNode),this.domNode.parentNode==t.domNode&&this.domNode.nextSibling==n||t.domNode.insertBefore(this.domNode,n),this.parent=t,this.attach()}},{key:"isolate",value:function(t,e){var n=this.split(t);return n.split(e),n}},{key:"length",value:function(){return 1}},{key:"offset",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.parent;return null==this.parent||this==t?0:this.parent.children.offset(this)+this.parent.offset(t)}},{key:"optimize",value:function(t){null!=this.domNode[r.DATA_KEY]&&delete this.domNode[r.DATA_KEY].mutations}},{key:"remove",value:function(){null!=this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),this.detach()}},{key:"replace",value:function(t){null!=t.parent&&(t.parent.insertBefore(this,t.next),t.remove())}},{key:"replaceWith",value:function(t,e){var n="string"==typeof t?r.create(t,e):t;return n.replace(this),n}},{key:"split",value:function(t,e){return 0===t?this:this.next}},{key:"update",value:function(t,e){}},{key:"wrap",value:function(t,e){var n="string"==typeof t?r.create(t,e):t;return null!=this.parent&&this.parent.insertBefore(n,this.next),n.appendChild(this),n}}],[{key:"create",value:function(t){if(null==this.tagName)throw new r.ParchmentError("Blot definition missing tagName");var e;return Array.isArray(this.tagName)?("string"==typeof t&&(t=t.toUpperCase(),parseInt(t).toString()===t&&(t=parseInt(t))),e="number"==typeof t?document.createElement(this.tagName[t-1]):this.tagName.indexOf(t)>-1?document.createElement(t):document.createElement(this.tagName[0])):e=document.createElement(this.tagName),this.className&&e.classList.add(this.className),e}}]),t}();i.blotName="abstract",e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(8),i=n(19),o=n(20),l=n(3);e.default=function(){function t(e){p(this,t),this.attributes={},this.domNode=e,this.build()}return d(t,[{key:"attribute",value:function(t,e){e?t.add(this.domNode,e)&&(null!=t.value(this.domNode)?this.attributes[t.attrName]=t:delete this.attributes[t.attrName]):(t.remove(this.domNode),delete this.attributes[t.attrName])}},{key:"build",value:function(){var t=this;this.attributes={};var e=r.default.keys(this.domNode),n=i.default.keys(this.domNode),a=o.default.keys(this.domNode);e.concat(n).concat(a).forEach((function(e){var n=l.query(e,l.Scope.ATTRIBUTE);n instanceof r.default&&(t.attributes[n.attrName]=n)}))}},{key:"copy",value:function(t){var e=this;Object.keys(this.attributes).forEach((function(n){var r=e.attributes[n].value(e.domNode);t.format(n,r)}))}},{key:"move",value:function(t){var e=this;this.copy(t),Object.keys(this.attributes).forEach((function(t){e.attributes[t].remove(e.domNode)})),this.attributes={}}},{key:"values",value:function(){var t=this;return Object.keys(this.attributes).reduce((function(e,n){return e[n]=t.attributes[n].value(t.domNode),e}),{})}}]),t}()},function(t,e,n){"use strict";function r(t,e){return(t.getAttribute("class")||"").split(/\s+/).filter((function(t){return 0===t.indexOf(e+"-")}))}Object.defineProperty(e,"__esModule",{value:!0});var i=function(t){g(n,t);var e=y(n);function n(){return p(this,n),e.apply(this,arguments)}return d(n,[{key:"add",value:function(t,e){return!!this.canAdd(t,e)&&(this.remove(t),t.classList.add("".concat(this.keyName,"-").concat(e)),!0)}},{key:"remove",value:function(t){r(t,this.keyName).forEach((function(e){t.classList.remove(e)})),0===t.classList.length&&t.removeAttribute("class")}},{key:"value",value:function(t){var e=(r(t,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(t,e)?e:""}}],[{key:"keys",value:function(t){return(t.getAttribute("class")||"").split(/\s+/).map((function(t){return t.split("-").slice(0,-1).join("-")}))}}]),n}(n(8).default);e.default=i},function(t,e,n){"use strict";function r(t){var e=t.split("-"),n=e.slice(1).map((function(t){return t[0].toUpperCase()+t.slice(1)})).join("");return e[0]+n}Object.defineProperty(e,"__esModule",{value:!0});var i=function(t){g(n,t);var e=y(n);function n(){return p(this,n),e.apply(this,arguments)}return d(n,[{key:"add",value:function(t,e){return!!this.canAdd(t,e)&&(t.style[r(this.keyName)]=e,!0)}},{key:"remove",value:function(t){t.style[r(this.keyName)]="",t.getAttribute("style")||t.removeAttribute("style")}},{key:"value",value:function(t){var e=t.style[r(this.keyName)];return this.canAdd(t,e)?e:""}}],[{key:"keys",value:function(t){return(t.getAttribute("style")||"").split(";").map((function(t){return t.split(":")[0].trim()}))}}]),n}(n(8).default);e.default=i},function(t,e,n){"use strict";var r=Array.prototype.slice,i=n(22),o=Object.keys,l=o?function(t){return o(t)}:n(55),a=Object.keys;l.shim=function(){return Object.keys?function(){var t=Object.keys(arguments);return t&&t.length===arguments.length}(1,2)||(Object.keys=function(t){return i(t)?a(r.call(t)):a(t)}):Object.keys=l,Object.keys||l},t.exports=l},function(t,e,n){"use strict";var r=Object.prototype.toString;t.exports=function(t){var e=r.call(t),n="[object Arguments]"===e;return n||(n="[object Array]"!==e&&null!==t&&"object"==_(t)&&"number"==typeof t.length&&t.length>=0&&"[object Function]"===r.call(t.callee)),n}},function(t,e,n){"use strict";var r=n(24),i=n(16),o=i(r("String.prototype.indexOf"));t.exports=function(t,e){var n=r(t,!!e);return"function"==typeof n&&o(t,".prototype.")>-1?i(n):n}},function(t,e,n){"use strict";var r=SyntaxError,i=Function,o=TypeError,l=function(t){try{return i('"use strict"; return ('+t+").constructor;")()}catch(t){}},a=Object.getOwnPropertyDescriptor;if(a)try{a({},"")}catch(t){a=null}var s=function(){throw new o},c=a?function(){try{return s}catch(t){try{return a(arguments,"callee").get}catch(t){return s}}}():s,u=n(57)(),h=Object.getPrototypeOf||function(t){return t.__proto__},f={},d="undefined"==typeof Uint8Array?void 0:h(Uint8Array),p={"%AggregateError%":"undefined"==typeof AggregateError?void 0:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?void 0:ArrayBuffer,"%ArrayIteratorPrototype%":u?h([][Symbol.iterator]()):void 0,"%AsyncFromSyncIteratorPrototype%":void 0,"%AsyncFunction%":f,"%AsyncGenerator%":f,"%AsyncGeneratorFunction%":f,"%AsyncIteratorPrototype%":f,"%Atomics%":"undefined"==typeof Atomics?void 0:Atomics,"%BigInt%":"undefined"==typeof BigInt?void 0:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?void 0:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?void 0:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?void 0:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?void 0:FinalizationRegistry,"%Function%":i,"%GeneratorFunction%":f,"%Int8Array%":"undefined"==typeof Int8Array?void 0:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?void 0:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?void 0:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":u?h(h([][Symbol.iterator]())):void 0,"%JSON%":"object"==("undefined"==typeof JSON?"undefined":_(JSON))?JSON:void 0,"%Map%":"undefined"==typeof Map?void 0:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&u?h((new Map)[Symbol.iterator]()):void 0,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?void 0:Promise,"%Proxy%":"undefined"==typeof Proxy?void 0:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?void 0:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?void 0:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&u?h((new Set)[Symbol.iterator]()):void 0,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?void 0:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":u?h(""[Symbol.iterator]()):void 0,"%Symbol%":u?Symbol:void 0,"%SyntaxError%":r,"%ThrowTypeError%":c,"%TypedArray%":d,"%TypeError%":o,"%Uint8Array%":"undefined"==typeof Uint8Array?void 0:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?void 0:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?void 0:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?void 0:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?void 0:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?void 0:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?void 0:WeakSet},g={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},y=n(15),v=n(59),m=y.call(Function.call,Array.prototype.concat),A=y.call(Function.apply,Array.prototype.splice),b=y.call(Function.call,String.prototype.replace),q=y.call(Function.call,String.prototype.slice),E=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,k=/\\(\\)?/g,x=function(t){var e=q(t,0,1),n=q(t,-1);if("%"===e&&"%"!==n)throw new r("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==e)throw new r("invalid intrinsic syntax, expected opening `%`");var i=[];return b(t,E,(function(t,e,n,r){i[i.length]=n?b(r,k,"$1"):e||t})),i},C=function(t,e){var n,i=t;if(v(g,i)&&(i="%"+(n=g[i])[0]+"%"),v(p,i)){var a=p[i];if(a===f&&(a=function t(e){var n;if("%AsyncFunction%"===e)n=l("async function () {}");else if("%GeneratorFunction%"===e)n=l("function* () {}");else if("%AsyncGeneratorFunction%"===e)n=l("async function* () {}");else if("%AsyncGenerator%"===e){var r=t("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===e){var i=t("%AsyncGenerator%");i&&(n=h(i.prototype))}return p[e]=n,n}(i)),void 0===a&&!e)throw new o("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:n,name:i,value:a}}throw new r("intrinsic "+t+" does not exist!")};t.exports=function(t,e){if("string"!=typeof t||0===t.length)throw new o("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new o('"allowMissing" argument must be a boolean');var n=x(t),i=n.length>0?n[0]:"",l=C("%"+i+"%",e),s=l.name,c=l.value,u=!1,h=l.alias;h&&(i=h[0],A(n,m([0,1],h)));for(var f=1,d=!0;f=n.length){var E=a(c,g);c=(d=!!E)&&"get"in E&&!("originalValue"in E.get)?E.get:c[g]}else d=v(c,g),c=c[g];d&&!u&&(p[s]=c)}}return c}},function(t,e,n){"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==_(Symbol.iterator))return!0;var t={},e=Symbol("test"),n=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var r=Object.getOwnPropertySymbols(t);if(1!==r.length||r[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(t,e);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},function(t,e,n){"use strict";var r=function(t){return t!=t};t.exports=function(t,e){return 0===t&&0===e?1/t==1/e:t===e||!(!r(t)||!r(e))}},function(t,e,n){"use strict";var r=n(26);t.exports=function(){return"function"==typeof Object.is?Object.is:r}},function(t,e,n){"use strict";var r=Object,i=TypeError;t.exports=function(){if(null!=this&&this!==r(this))throw new i("RegExp.prototype.flags getter called on non-object");var t="";return this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.dotAll&&(t+="s"),this.unicode&&(t+="u"),this.sticky&&(t+="y"),t}},function(t,e,n){"use strict";var r=n(28),i=n(9).supportsDescriptors,o=Object.getOwnPropertyDescriptor,l=TypeError;t.exports=function(){if(!i)throw new l("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");if("gim"===/a/gim.flags){var t=o(RegExp.prototype,"flags");if(t&&"function"==typeof t.get&&"boolean"==typeof/a/.dotAll)return t.get}return r}},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==("undefined"==typeof window?"undefined":_(window))&&(n=window)}t.exports=n},function(t,e){t.exports=''},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e){function n(t,e){for(var n=0;n'},function(t,e,n){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=function(t,e){var n,r,i,o=t[1]||"",l=t[3];if(!l)return o;if(e&&"function"==typeof btoa){var a=(n=l,r=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),i="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(r),"/*# ".concat(i," */")),s=l.sources.map((function(t){return"/*# sourceURL=".concat(l.sourceRoot||"").concat(t," */")}));return[o].concat(s).concat([a]).join("\n")}return[o].join("\n")}(e,t);return e[2]?"@media ".concat(e[2]," {").concat(n,"}"):n})).join("")},e.i=function(t,n,r){"string"==typeof t&&(t=[[null,t,""]]);var i={};if(r)for(var o=0;o1&&this.append.apply(this,e.slice(1))}},{key:"contains",value:function(t){for(var e,n=this.iterator();e=n();)if(e===t)return!0;return!1}},{key:"insertBefore",value:function(t,e){t&&(t.next=e,null!=e?(t.prev=e.prev,null!=e.prev&&(e.prev.next=t),e.prev=t,e===this.head&&(this.head=t)):null!=this.tail?(this.tail.next=t,t.prev=this.tail,this.tail=t):(t.prev=null,this.head=this.tail=t),this.length+=1)}},{key:"offset",value:function(t){for(var e=0,n=this.head;null!=n;){if(n===t)return e;e+=n.length(),n=n.next}return-1}},{key:"remove",value:function(t){this.contains(t)&&(null!=t.prev&&(t.prev.next=t.next),null!=t.next&&(t.next.prev=t.prev),t===this.head&&(this.head=t.next),t===this.tail&&(this.tail=t.prev),this.length-=1)}},{key:"iterator",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.head;return function(){var e=t;return null!=t&&(t=t.next),e}}},{key:"find",value:function(t){for(var e,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this.iterator();e=r();){var i=e.length();if(tl?n(r,t-l,Math.min(e,l+c-t)):n(r,0,Math.min(c,t+e-l)),l+=c}}},{key:"map",value:function(t){return this.reduce((function(e,n){return e.push(t(n)),e}),[])}},{key:"reduce",value:function(t,e){for(var n,r=this.iterator();n=r();)e=t(e,n);return e}}]),t}()},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(12),i=n(3),o={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},l=function(t){g(n,t);var e=y(n);function n(t){var r;return p(this,n),(r=e.call(this,t)).scroll=m(r),r.observer=new MutationObserver((function(t){r.update(t)})),r.observer.observe(r.domNode,o),r.attach(),r}return d(n,[{key:"detach",value:function(){h(k(n.prototype),"detach",this).call(this),this.observer.disconnect()}},{key:"deleteAt",value:function(t,e){this.update(),0===t&&e===this.length()?this.children.forEach((function(t){t.remove()})):h(k(n.prototype),"deleteAt",this).call(this,t,e)}},{key:"formatAt",value:function(t,e,r,i){this.update(),h(k(n.prototype),"formatAt",this).call(this,t,e,r,i)}},{key:"insertAt",value:function(t,e,r){this.update(),h(k(n.prototype),"insertAt",this).call(this,t,e,r)}},{key:"optimize",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};h(k(n.prototype),"optimize",this).call(this,o);for(var l=[].slice.call(this.observer.takeRecords());l.length>0;)e.push(l.pop());for(var a=function e(n){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];null!=n&&n!==t&&null!=n.domNode.parentNode&&(null==n.domNode[i.DATA_KEY].mutations&&(n.domNode[i.DATA_KEY].mutations=[]),r&&e(n.parent))},s=function t(e){null!=e.domNode[i.DATA_KEY]&&null!=e.domNode[i.DATA_KEY].mutations&&(e instanceof r.default&&e.children.forEach(t),e.optimize(o))},c=e,u=0;c.length>0;u+=1){if(u>=100)throw new Error("[Parchment] Maximum optimize iterations reached");for(c.forEach((function(t){var e=i.find(t.target,!0);null!=e&&(e.domNode===t.target&&("childList"===t.type?(a(i.find(t.previousSibling,!1)),[].forEach.call(t.addedNodes,(function(t){var e=i.find(t,!1);a(e,!1),e instanceof r.default&&e.children.forEach((function(t){a(t,!1)}))}))):"attributes"===t.type&&a(e.prev)),a(e))})),this.children.forEach(s),l=(c=[].slice.call(this.observer.takeRecords())).slice();l.length>0;)e.push(l.pop())}}},{key:"update",value:function(t){var e=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(t=t||this.observer.takeRecords()).map((function(t){var e=i.find(t.target,!0);return null==e?null:null==e.domNode[i.DATA_KEY].mutations?(e.domNode[i.DATA_KEY].mutations=[t],e):(e.domNode[i.DATA_KEY].mutations.push(t),null)})).forEach((function(t){null!=t&&t!==e&&null!=t.domNode[i.DATA_KEY]&&t.update(t.domNode[i.DATA_KEY].mutations||[],r)})),null!=this.domNode[i.DATA_KEY].mutations&&h(k(n.prototype),"update",this).call(this,this.domNode[i.DATA_KEY].mutations,r),this.optimize(t,r)}}]),n}(r.default);l.blotName="scroll",l.defaultChild="block",l.scope=i.Scope.BLOCK_BLOT,l.tagName="DIV",e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(13),i=n(3),o=function(t){g(n,t);var e=y(n);function n(){return p(this,n),e.apply(this,arguments)}return d(n,[{key:"format",value:function(t,e){var i=this;t!==this.statics.blotName||e?h(k(n.prototype),"format",this).call(this,t,e):(this.children.forEach((function(t){t instanceof r.default||(t=t.wrap(n.blotName,!0)),i.attributes.copy(t)})),this.unwrap())}},{key:"formatAt",value:function(t,e,r,o){null!=this.formats()[r]||i.query(r,i.Scope.ATTRIBUTE)?this.isolate(t,e).format(r,o):h(k(n.prototype),"formatAt",this).call(this,t,e,r,o)}},{key:"optimize",value:function(t){h(k(n.prototype),"optimize",this).call(this,t);var e=this.formats();if(0===Object.keys(e).length)return this.unwrap();var r=this.next;r instanceof n&&r.prev===this&&function(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(var n in t)if(t[n]!==e[n])return!1;return!0}(e,r.formats())&&(r.moveChildren(this),r.remove())}}],[{key:"formats",value:function(t){if(t.tagName!==n.tagName)return h(k(n),"formats",this).call(this,t)}}]),n}(r.default);o.blotName="inline",o.scope=i.Scope.INLINE_BLOT,o.tagName="SPAN",e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(13),i=n(3),o=function(t){g(n,t);var e=y(n);function n(){return p(this,n),e.apply(this,arguments)}return d(n,[{key:"format",value:function(t,e){null!=i.query(t,i.Scope.BLOCK)&&(t!==this.statics.blotName||e?h(k(n.prototype),"format",this).call(this,t,e):this.replaceWith(n.blotName))}},{key:"formatAt",value:function(t,e,r,o){null!=i.query(r,i.Scope.BLOCK)?this.format(r,o):h(k(n.prototype),"formatAt",this).call(this,t,e,r,o)}},{key:"insertAt",value:function(t,e,r){if(null==r||null!=i.query(e,i.Scope.INLINE))h(k(n.prototype),"insertAt",this).call(this,t,e,r);else{var o=this.split(t),l=i.create(e,r);o.parent.insertBefore(l,o)}}},{key:"update",value:function(t,e){navigator.userAgent.match(/Trident/)?this.build():h(k(n.prototype),"update",this).call(this,t,e)}}],[{key:"formats",value:function(t){var e=i.query(n.blotName).tagName;if(t.tagName!==e)return h(k(n),"formats",this).call(this,t)}}]),n}(r.default);o.blotName="block",o.scope=i.Scope.BLOCK_BLOT,o.tagName="P",e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(t){g(n,t);var e=y(n);function n(){return p(this,n),e.apply(this,arguments)}return d(n,[{key:"format",value:function(t,e){h(k(n.prototype),"formatAt",this).call(this,0,this.length(),t,e)}},{key:"formatAt",value:function(t,e,r,i){0===t&&e===this.length()?this.format(r,i):h(k(n.prototype),"formatAt",this).call(this,t,e,r,i)}},{key:"formats",value:function(){return this.statics.formats(this.domNode)}}],[{key:"formats",value:function(t){}}]),n}(n(14).default);e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(14),i=n(3),o=function(t){g(n,t);var e=y(n);function n(t){var r;return p(this,n),(r=e.call(this,t)).text=r.statics.value(r.domNode),r}return d(n,[{key:"deleteAt",value:function(t,e){this.domNode.data=this.text=this.text.slice(0,t)+this.text.slice(t+e)}},{key:"index",value:function(t,e){return this.domNode===t?e:-1}},{key:"insertAt",value:function(t,e,r){null==r?(this.text=this.text.slice(0,t)+e+this.text.slice(t),this.domNode.data=this.text):h(k(n.prototype),"insertAt",this).call(this,t,e,r)}},{key:"length",value:function(){return this.text.length}},{key:"optimize",value:function(t){h(k(n.prototype),"optimize",this).call(this,t),this.text=this.statics.value(this.domNode),0===this.text.length?this.remove():this.next instanceof n&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())}},{key:"position",value:function(t){return[this.domNode,t]}},{key:"split",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!e){if(0===t)return this;if(t===this.length())return this.next}var n=i.create(this.domNode.splitText(t));return this.parent.insertBefore(n,this.next),this.text=this.statics.value(this.domNode),n}},{key:"update",value:function(t,e){var n=this;t.some((function(t){return"characterData"===t.type&&t.target===n.domNode}))&&(this.text=this.statics.value(this.domNode))}},{key:"value",value:function(){return this.text}}],[{key:"create",value:function(t){return document.createTextNode(t)}},{key:"value",value:function(t){var e=t.data;return e.normalize&&(e=e.normalize()),e}}]),n}(r.default);o.blotName="text",o.scope=i.Scope.INLINE_BLOT,e.default=o},function(t,e){var n=document.createElement("div");if(n.classList.toggle("test-class",!1),n.classList.contains("test-class")){var r=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(t,e){return arguments.length>1&&!this.contains(t)==!e?e:r.call(this,t)}}String.prototype.startsWith||(String.prototype.startsWith=function(t,e){return e=e||0,this.substr(e,t.length)===t}),String.prototype.endsWith||(String.prototype.endsWith=function(t,e){var n=this.toString();("number"!=typeof e||!isFinite(e)||Math.floor(e)!==e||e>n.length)&&(e=n.length),e-=t.length;var r=n.indexOf(t,e);return-1!==r&&r===e}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(t){if(null===this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var e,n=Object(this),r=n.length>>>0,i=arguments[1],o=0;oe.length?t:e,s=t.length>e.length?e:t,c=a.indexOf(s);if(-1!=c)return l=[[1,a.substring(0,c)],[0,s],[1,a.substring(c+s.length)]],t.length>e.length&&(l[0][0]=l[2][0]=-1),l;if(1==s.length)return[[-1,t],[1,e]];var u=function(t,e){var n=t.length>e.length?t:e,r=t.length>e.length?e:t;if(n.length<4||2*r.length=t.length?[r,l,a,s,h]:null}var a,s,c,u,h,f=l(n,r,Math.ceil(n.length/4)),d=l(n,r,Math.ceil(n.length/2));return f||d?(a=d?f&&f[4].length>d[4].length?f:d:f,t.length>e.length?(s=a[0],c=a[1],u=a[2],h=a[3]):(u=a[0],h=a[1],s=a[2],c=a[3]),[s,c,u,h,a[4]]):null}(t,e);if(u){var h=u[0],f=u[1],d=u[2],p=u[3],g=u[4],y=n(h,d),v=n(f,p);return y.concat([[0,g]],v)}return function(t,e){for(var n=t.length,i=e.length,o=Math.ceil((n+i)/2),l=o,a=2*o,s=new Array(a),c=new Array(a),u=0;un)p+=2;else if(b>i)d+=2;else if(f&&(k=l+h-m)>=0&&k=q)return r(t,e,x,b)}}for(var E=-v+g;E<=v-y;E+=2){for(var k=l+E,_=(q=E==-v||E!=v&&c[k-1]n)y+=2;else if(_>i)g+=2;else if(!f&&(A=l+h-E)>=0&&A=(q=n-q))return r(t,e,x,b)}}}return[[-1,t],[1,e]]}(t,e)}(t=t.substring(0,t.length-s),e=e.substring(0,e.length-s));return c&&h.unshift([0,c]),u&&h.push([0,u]),function t(e){e.push([0,""]);for(var n,r=0,l=0,a=0,s="",c="";r1?(0!==l&&0!==a&&(0!==(n=i(c,s))&&(r-l-a>0&&0==e[r-l-a-1][0]?e[r-l-a-1][1]+=c.substring(0,n):(e.splice(0,0,[0,c.substring(0,n)]),r++),c=c.substring(n),s=s.substring(n)),0!==(n=o(c,s))&&(e[r][1]=c.substring(c.length-n)+e[r][1],c=c.substring(0,c.length-n),s=s.substring(0,s.length-n))),0===l?e.splice(r-a,l+a,[1,c]):0===a?e.splice(r-l,l+a,[-1,s]):e.splice(r-l-a,l+a,[-1,s],[1,c]),r=r-l-a+(l?1:0)+(a?1:0)+1):0!==r&&0==e[r-1][0]?(e[r-1][1]+=e[r][1],e.splice(r,1)):r++,a=0,l=0,s="",c=""}""===e[e.length-1][1]&&e.pop();var u=!1;for(r=1;r0&&r.splice(i+2,0,[l[0],s]),a(r,i,3)}return t}(h,l)),function(t){for(var e=!1,n=function(t){return t.charCodeAt(0)>=56320&&t.charCodeAt(0)<=57343},r=2;r=55296&&i.charCodeAt(i.length-1)<=56319&&-1===t[r-1][0]&&n(t[r-1][1])&&1===t[r][0]&&n(t[r][1])&&(e=!0,t[r-1][1]=t[r-2][1].slice(-1)+t[r-1][1],t[r][1]=t[r-2][1].slice(-1)+t[r][1],t[r-2][1]=t[r-2][1].slice(0,-1));var i;if(!e)return t;var o=[];for(r=0;r0&&o.push(t[r]);return o}(h)}function r(t,e,r,i){var o=t.substring(0,r),l=e.substring(0,i),a=t.substring(r),s=e.substring(i),c=n(o,l),u=n(a,s);return c.concat(u)}function i(t,e){if(!t||!e||t.charAt(0)!=e.charAt(0))return 0;for(var n=0,r=Math.min(t.length,e.length),i=r,o=0;n=0&&r>=e-1;r--)if(r+10&&!i.call(t,0))for(var g=0;g0)for(var y=0;y=0&&"[object Array]"!==i(t)&&"[object Function]"===i(t.callee)},a=function(){return o(arguments)}();o.isLegacyArguments=l,t.exports=a?o:l},function(t,e,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,i=n(25);t.exports=function(){return"function"==typeof r&&"function"==typeof Symbol&&"symbol"==_(r("foo"))&&"symbol"==_(Symbol("bar"))&&i()}},function(t,e,n){"use strict";var r="Function.prototype.bind called on incompatible ",i=Array.prototype.slice,o=Object.prototype.toString;t.exports=function(t){var e=this;if("function"!=typeof e||"[object Function]"!==o.call(e))throw new TypeError(r+e);for(var n,l=i.call(arguments,1),a=function(){if(this instanceof n){var r=e.apply(this,l.concat(i.call(arguments)));return Object(r)===r?r:this}return e.apply(t,l.concat(i.call(arguments)))},s=Math.max(0,e.length-l.length),c=[],u=0;u + * @license MIT + */ +var r=n(67),i=n(68),o=n(69);function l(){return s.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(t,e){if(l()=l())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+l().toString(16)+" bytes");return 0|t}function p(t,e){if(s.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return D(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return F(t).length;default:if(r)return D(t).length;e=(""+e).toLowerCase(),r=!0}}function g(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return S(this,e,n);case"utf8":case"utf-8":return C(this,e,n);case"ascii":return w(this,e,n);case"latin1":case"binary":return N(this,e,n);case"base64":return x(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function y(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function v(t,e,n,r,i){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof e&&(e=s.from(e,r)),s.isBuffer(e))return 0===e.length?-1:m(t,e,n,r,i);if("number"==typeof e)return e&=255,s.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):m(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function m(t,e,n,r,i){var o,l=1,a=t.length,s=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;l=2,a/=2,s/=2,n/=2}function c(t,e){return 1===l?t[e]:t.readUInt16BE(e*l)}if(i){var u=-1;for(o=n;oa&&(n=a-s),o=n;o>=0;o--){for(var h=!0,f=0;fi&&(r=i):r=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var l=0;l>8,i=n%256,o.push(i),o.push(r);return o}(e,t.length-n),t,n,r)}function x(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function C(t,e,n){n=Math.min(t.length,n);for(var r=[],i=e;i239?4:c>223?3:c>191?2:1;if(i+h<=n)switch(h){case 1:c<128&&(u=c);break;case 2:128==(192&(o=t[i+1]))&&(s=(31&c)<<6|63&o)>127&&(u=s);break;case 3:o=t[i+1],l=t[i+2],128==(192&o)&&128==(192&l)&&(s=(15&c)<<12|(63&o)<<6|63&l)>2047&&(s<55296||s>57343)&&(u=s);break;case 4:o=t[i+1],l=t[i+2],a=t[i+3],128==(192&o)&&128==(192&l)&&128==(192&a)&&(s=(15&c)<<18|(63&o)<<12|(63&l)<<6|63&a)>65535&&s<1114112&&(u=s)}null===u?(u=65533,h=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),i+=h}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);for(var n="",r=0;rr)&&(n=r);for(var i="",o=e;on)throw new RangeError("Trying to access beyond buffer length")}function O(t,e,n,r,i,o){if(!s.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}function L(t,e,n,r){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-n,2);i>>8*(r?i:1-i)}function R(t,e,n,r){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-n,4);i>>8*(r?i:3-i)&255}function P(t,e,n,r,i,o){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function I(t,e,n,r,o){return o||P(t,0,n,4),i.write(t,e,n,r,23,4),n+4}function j(t,e,n,r,o){return o||P(t,0,n,8),i.write(t,e,n,r,52,8),n+8}e.Buffer=s,e.SlowBuffer=function(t){return+t!=t&&(t=0),s.alloc(+t)},e.INSPECT_MAX_BYTES=50,s.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=l(),s.poolSize=8192,s._augment=function(t){return t.__proto__=s.prototype,t},s.from=function(t,e,n){return c(null,t,e,n)},s.TYPED_ARRAY_SUPPORT&&(s.prototype.__proto__=Uint8Array.prototype,s.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&s[Symbol.species]===s&&Object.defineProperty(s,Symbol.species,{value:null,configurable:!0})),s.alloc=function(t,e,n){return function(t,e,n,r){return u(e),e<=0?a(t,e):void 0!==n?"string"==typeof r?a(t,e).fill(n,r):a(t,e).fill(n):a(t,e)}(null,t,e,n)},s.allocUnsafe=function(t){return h(null,t)},s.allocUnsafeSlow=function(t){return h(null,t)},s.isBuffer=function(t){return!(null==t||!t._isBuffer)},s.compare=function(t,e){if(!s.isBuffer(t)||!s.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,r=e.length,i=0,o=Math.min(n,r);i0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),""},s.prototype.compare=function(t,e,n,r,i){if(!s.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return-1;if(e>=n)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(r>>>=0),l=(n>>>=0)-(e>>>=0),a=Math.min(o,l),c=this.slice(r,i),u=t.slice(e,n),h=0;hi)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return A(this,t,e,n);case"utf8":case"utf-8":return b(this,t,e,n);case"ascii":return q(this,t,e,n);case"latin1":case"binary":return E(this,t,e,n);case"base64":return k(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},s.prototype.slice=function(t,e){var n,r=this.length;if((t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e0&&(i*=256);)r+=this[t+--e]*i;return r},s.prototype.readUInt8=function(t,e){return e||T(t,1,this.length),this[t]},s.prototype.readUInt16LE=function(t,e){return e||T(t,2,this.length),this[t]|this[t+1]<<8},s.prototype.readUInt16BE=function(t,e){return e||T(t,2,this.length),this[t]<<8|this[t+1]},s.prototype.readUInt32LE=function(t,e){return e||T(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},s.prototype.readUInt32BE=function(t,e){return e||T(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},s.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||T(t,e,this.length);for(var r=this[t],i=1,o=0;++o=(i*=128)&&(r-=Math.pow(2,8*e)),r},s.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||T(t,e,this.length);for(var r=e,i=1,o=this[t+--r];r>0&&(i*=256);)o+=this[t+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},s.prototype.readInt8=function(t,e){return e||T(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},s.prototype.readInt16LE=function(t,e){e||T(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt16BE=function(t,e){e||T(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt32LE=function(t,e){return e||T(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},s.prototype.readInt32BE=function(t,e){return e||T(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},s.prototype.readFloatLE=function(t,e){return e||T(t,4,this.length),i.read(this,t,!0,23,4)},s.prototype.readFloatBE=function(t,e){return e||T(t,4,this.length),i.read(this,t,!1,23,4)},s.prototype.readDoubleLE=function(t,e){return e||T(t,8,this.length),i.read(this,t,!0,52,8)},s.prototype.readDoubleBE=function(t,e){return e||T(t,8,this.length),i.read(this,t,!1,52,8)},s.prototype.writeUIntLE=function(t,e,n,r){t=+t,e|=0,n|=0,r||O(this,t,e,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[e]=255&t;++o=0&&(o*=256);)this[e+i]=t/o&255;return e+n},s.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||O(this,t,e,1,255,0),s.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},s.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||O(this,t,e,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):L(this,t,e,!0),e+2},s.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||O(this,t,e,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):L(this,t,e,!1),e+2},s.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||O(this,t,e,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):R(this,t,e,!0),e+4},s.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||O(this,t,e,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):R(this,t,e,!1),e+4},s.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);O(this,t,e,n,i-1,-i)}var o=0,l=1,a=0;for(this[e]=255&t;++o>0)-a&255;return e+n},s.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);O(this,t,e,n,i-1,-i)}var o=n-1,l=1,a=0;for(this[e+o]=255&t;--o>=0&&(l*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/l>>0)-a&255;return e+n},s.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||O(this,t,e,1,127,-128),s.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},s.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||O(this,t,e,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):L(this,t,e,!0),e+2},s.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||O(this,t,e,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):L(this,t,e,!1),e+2},s.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||O(this,t,e,4,2147483647,-2147483648),s.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):R(this,t,e,!0),e+4},s.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||O(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):R(this,t,e,!1),e+4},s.prototype.writeFloatLE=function(t,e,n){return I(this,t,e,!0,n)},s.prototype.writeFloatBE=function(t,e,n){return I(this,t,e,!1,n)},s.prototype.writeDoubleLE=function(t,e,n){return j(this,t,e,!0,n)},s.prototype.writeDoubleBE=function(t,e,n){return j(this,t,e,!1,n)},s.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e=0;--i)t[i+e]=this[i+n];else if(o<1e3||!s.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(o=e;o55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(l+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function F(t){return r.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(U,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function H(t,e,n,r){for(var i=0;i=e.length||i>=t.length);++i)e[i+n]=t[i];return i}}).call(this,n(30))},function(t,e,n){"use strict";e.byteLength=function(t){var e=c(t),n=e[0],r=e[1];return 3*(n+r)/4-r},e.toByteArray=function(t){var e,n,r=c(t),l=r[0],a=r[1],s=new o(function(t,e,n){return 3*(e+n)/4-n}(0,l,a)),u=0,h=a>0?l-4:l;for(n=0;n>16&255,s[u++]=e>>8&255,s[u++]=255&e;return 2===a&&(e=i[t.charCodeAt(n)]<<2|i[t.charCodeAt(n+1)]>>4,s[u++]=255&e),1===a&&(e=i[t.charCodeAt(n)]<<10|i[t.charCodeAt(n+1)]<<4|i[t.charCodeAt(n+2)]>>2,s[u++]=e>>8&255,s[u++]=255&e),s},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],l=0,a=n-i;la?a:l+16383));return 1===i?(e=t[n-1],o.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],o.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),o.join("")};for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,s=l.length;a0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function u(t,e,n){for(var i,o,l=[],a=e;a>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return l.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(t,e){ +/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ +e.read=function(t,e,n,r,i){var o,l,a=8*i-r-1,s=(1<>1,u=-7,h=n?i-1:0,f=n?-1:1,d=t[e+h];for(h+=f,o=d&(1<<-u)-1,d>>=-u,u+=a;u>0;o=256*o+t[e+h],h+=f,u-=8);for(l=o&(1<<-u)-1,o>>=-u,u+=r;u>0;l=256*l+t[e+h],h+=f,u-=8);if(0===o)o=1-c;else{if(o===s)return l?NaN:1/0*(d?-1:1);l+=Math.pow(2,r),o-=c}return(d?-1:1)*l*Math.pow(2,o-r)},e.write=function(t,e,n,r,i,o){var l,a,s,c=8*o-i-1,u=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:o-1,p=r?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,l=u):(l=Math.floor(Math.log(e)/Math.LN2),e*(s=Math.pow(2,-l))<1&&(l--,s*=2),(e+=l+h>=1?f/s:f*Math.pow(2,1-h))*s>=2&&(l++,s/=2),l+h>=u?(a=0,l=u):l+h>=1?(a=(e*s-1)*Math.pow(2,i),l+=h):(a=e*Math.pow(2,h-1)*Math.pow(2,i),l=0));i>=8;t[n+d]=255&a,d+=p,a/=256,i-=8);for(l=l<0;t[n+d]=255&l,d+=p,l/=256,c-=8);t[n+d-p]|=128*g}},function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},function(t,e){t.exports=''},function(t,e){t.exports=''},function(t,e){t.exports=''},function(t,e){t.exports=''},function(t,e){t.exports=''},function(t,e){t.exports=''},function(t,e){t.exports=''},function(t,e){t.exports=''},function(t,e){t.exports=''},function(t,e){t.exports=''},function(t,e){t.exports=''},function(t,e){t.exports=''},function(t,e){t.exports=''},function(t,e){t.exports=''},function(t,e){t.exports=''},function(t,e){t.exports=''},function(t,e){t.exports=''},function(t,e){t.exports=''},function(t,e){t.exports=''},function(t,e){t.exports=''},function(t,e){t.exports=''},function(t,e){t.exports=''},function(t,e){t.exports=''},function(t,e){t.exports=''},function(t,e){t.exports=''},function(t,e){t.exports=''},function(t,e){t.exports=''},function(t,e){t.exports=''},function(t,e){t.exports=''},function(t,e){t.exports=''},function(t,e){t.exports=''},function(t,e,n){var r=n(102),i=n(103);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[t.i,i,""]]),r(i,{insert:"head",singleton:!1}),t.exports=i.locals||{}},function(t,e,n){"use strict";var r,i=function(){var t={};return function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}t[e]=n}return t[e]}}(),o=[];function l(t){for(var e=-1,n=0;n li::before {\n pointer-events: none;\n}\n.ql-clipboard {\n left: -100000px;\n height: 1px;\n overflow-y: hidden;\n position: absolute;\n top: 50%;\n}\n.ql-clipboard p {\n margin: 0;\n padding: 0;\n}\n.ql-editor {\n box-sizing: border-box;\n line-height: 1.42;\n height: 100%;\n outline: none;\n overflow-y: auto;\n padding: 12px 15px;\n tab-size: 4;\n -moz-tab-size: 4;\n text-align: left;\n white-space: pre-wrap;\n word-wrap: break-word;\n}\n.ql-editor > * {\n cursor: text;\n}\n.ql-editor p,\n.ql-editor ol,\n.ql-editor ul,\n.ql-editor pre,\n.ql-editor blockquote,\n.ql-editor h1,\n.ql-editor h2,\n.ql-editor h3,\n.ql-editor h4,\n.ql-editor h5,\n.ql-editor h6 {\n margin: 0;\n padding: 0;\n counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;\n}\n.ql-editor ol,\n.ql-editor ul {\n padding-left: 1.5em;\n}\n.ql-editor ol > li,\n.ql-editor ul > li {\n list-style-type: none;\n}\n.ql-editor ul > li::before {\n content: '\\2022';\n}\n.ql-editor ul[data-checked=true],\n.ql-editor ul[data-checked=false] {\n pointer-events: none;\n}\n.ql-editor ul[data-checked=true] > li *,\n.ql-editor ul[data-checked=false] > li * {\n pointer-events: all;\n}\n.ql-editor ul[data-checked=true] > li::before,\n.ql-editor ul[data-checked=false] > li::before {\n color: #777;\n cursor: pointer;\n pointer-events: all;\n}\n.ql-editor ul[data-checked=true] > li::before {\n content: '\\2611';\n}\n.ql-editor ul[data-checked=false] > li::before {\n content: '\\2610';\n}\n.ql-editor li::before {\n display: inline-block;\n white-space: nowrap;\n width: 1.2em;\n}\n.ql-editor li:not(.ql-direction-rtl)::before {\n margin-left: -1.5em;\n margin-right: 0.3em;\n text-align: right;\n}\n.ql-editor li.ql-direction-rtl::before {\n margin-left: 0.3em;\n margin-right: -1.5em;\n}\n.ql-editor ol li:not(.ql-direction-rtl),\n.ql-editor ul li:not(.ql-direction-rtl) {\n padding-left: 1.5em;\n}\n.ql-editor ol li.ql-direction-rtl,\n.ql-editor ul li.ql-direction-rtl {\n padding-right: 1.5em;\n}\n.ql-editor ol li {\n counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;\n counter-increment: list-0;\n}\n.ql-editor ol li:before {\n content: counter(list-0, decimal) '. ';\n}\n.ql-editor ol li.ql-indent-1 {\n counter-increment: list-1;\n}\n.ql-editor ol li.ql-indent-1:before {\n content: counter(list-1, lower-alpha) '. ';\n}\n.ql-editor ol li.ql-indent-1 {\n counter-reset: list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;\n}\n.ql-editor ol li.ql-indent-2 {\n counter-increment: list-2;\n}\n.ql-editor ol li.ql-indent-2:before {\n content: counter(list-2, lower-roman) '. ';\n}\n.ql-editor ol li.ql-indent-2 {\n counter-reset: list-3 list-4 list-5 list-6 list-7 list-8 list-9;\n}\n.ql-editor ol li.ql-indent-3 {\n counter-increment: list-3;\n}\n.ql-editor ol li.ql-indent-3:before {\n content: counter(list-3, decimal) '. ';\n}\n.ql-editor ol li.ql-indent-3 {\n counter-reset: list-4 list-5 list-6 list-7 list-8 list-9;\n}\n.ql-editor ol li.ql-indent-4 {\n counter-increment: list-4;\n}\n.ql-editor ol li.ql-indent-4:before {\n content: counter(list-4, lower-alpha) '. ';\n}\n.ql-editor ol li.ql-indent-4 {\n counter-reset: list-5 list-6 list-7 list-8 list-9;\n}\n.ql-editor ol li.ql-indent-5 {\n counter-increment: list-5;\n}\n.ql-editor ol li.ql-indent-5:before {\n content: counter(list-5, lower-roman) '. ';\n}\n.ql-editor ol li.ql-indent-5 {\n counter-reset: list-6 list-7 list-8 list-9;\n}\n.ql-editor ol li.ql-indent-6 {\n counter-increment: list-6;\n}\n.ql-editor ol li.ql-indent-6:before {\n content: counter(list-6, decimal) '. ';\n}\n.ql-editor ol li.ql-indent-6 {\n counter-reset: list-7 list-8 list-9;\n}\n.ql-editor ol li.ql-indent-7 {\n counter-increment: list-7;\n}\n.ql-editor ol li.ql-indent-7:before {\n content: counter(list-7, lower-alpha) '. ';\n}\n.ql-editor ol li.ql-indent-7 {\n counter-reset: list-8 list-9;\n}\n.ql-editor ol li.ql-indent-8 {\n counter-increment: list-8;\n}\n.ql-editor ol li.ql-indent-8:before {\n content: counter(list-8, lower-roman) '. ';\n}\n.ql-editor ol li.ql-indent-8 {\n counter-reset: list-9;\n}\n.ql-editor ol li.ql-indent-9 {\n counter-increment: list-9;\n}\n.ql-editor ol li.ql-indent-9:before {\n content: counter(list-9, decimal) '. ';\n}\n.ql-editor .ql-indent-1:not(.ql-direction-rtl) {\n padding-left: 3em;\n}\n.ql-editor li.ql-indent-1:not(.ql-direction-rtl) {\n padding-left: 4.5em;\n}\n.ql-editor .ql-indent-1.ql-direction-rtl.ql-align-right {\n padding-right: 3em;\n}\n.ql-editor li.ql-indent-1.ql-direction-rtl.ql-align-right {\n padding-right: 4.5em;\n}\n.ql-editor .ql-indent-2:not(.ql-direction-rtl) {\n padding-left: 6em;\n}\n.ql-editor li.ql-indent-2:not(.ql-direction-rtl) {\n padding-left: 7.5em;\n}\n.ql-editor .ql-indent-2.ql-direction-rtl.ql-align-right {\n padding-right: 6em;\n}\n.ql-editor li.ql-indent-2.ql-direction-rtl.ql-align-right {\n padding-right: 7.5em;\n}\n.ql-editor .ql-indent-3:not(.ql-direction-rtl) {\n padding-left: 9em;\n}\n.ql-editor li.ql-indent-3:not(.ql-direction-rtl) {\n padding-left: 10.5em;\n}\n.ql-editor .ql-indent-3.ql-direction-rtl.ql-align-right {\n padding-right: 9em;\n}\n.ql-editor li.ql-indent-3.ql-direction-rtl.ql-align-right {\n padding-right: 10.5em;\n}\n.ql-editor .ql-indent-4:not(.ql-direction-rtl) {\n padding-left: 12em;\n}\n.ql-editor li.ql-indent-4:not(.ql-direction-rtl) {\n padding-left: 13.5em;\n}\n.ql-editor .ql-indent-4.ql-direction-rtl.ql-align-right {\n padding-right: 12em;\n}\n.ql-editor li.ql-indent-4.ql-direction-rtl.ql-align-right {\n padding-right: 13.5em;\n}\n.ql-editor .ql-indent-5:not(.ql-direction-rtl) {\n padding-left: 15em;\n}\n.ql-editor li.ql-indent-5:not(.ql-direction-rtl) {\n padding-left: 16.5em;\n}\n.ql-editor .ql-indent-5.ql-direction-rtl.ql-align-right {\n padding-right: 15em;\n}\n.ql-editor li.ql-indent-5.ql-direction-rtl.ql-align-right {\n padding-right: 16.5em;\n}\n.ql-editor .ql-indent-6:not(.ql-direction-rtl) {\n padding-left: 18em;\n}\n.ql-editor li.ql-indent-6:not(.ql-direction-rtl) {\n padding-left: 19.5em;\n}\n.ql-editor .ql-indent-6.ql-direction-rtl.ql-align-right {\n padding-right: 18em;\n}\n.ql-editor li.ql-indent-6.ql-direction-rtl.ql-align-right {\n padding-right: 19.5em;\n}\n.ql-editor .ql-indent-7:not(.ql-direction-rtl) {\n padding-left: 21em;\n}\n.ql-editor li.ql-indent-7:not(.ql-direction-rtl) {\n padding-left: 22.5em;\n}\n.ql-editor .ql-indent-7.ql-direction-rtl.ql-align-right {\n padding-right: 21em;\n}\n.ql-editor li.ql-indent-7.ql-direction-rtl.ql-align-right {\n padding-right: 22.5em;\n}\n.ql-editor .ql-indent-8:not(.ql-direction-rtl) {\n padding-left: 24em;\n}\n.ql-editor li.ql-indent-8:not(.ql-direction-rtl) {\n padding-left: 25.5em;\n}\n.ql-editor .ql-indent-8.ql-direction-rtl.ql-align-right {\n padding-right: 24em;\n}\n.ql-editor li.ql-indent-8.ql-direction-rtl.ql-align-right {\n padding-right: 25.5em;\n}\n.ql-editor .ql-indent-9:not(.ql-direction-rtl) {\n padding-left: 27em;\n}\n.ql-editor li.ql-indent-9:not(.ql-direction-rtl) {\n padding-left: 28.5em;\n}\n.ql-editor .ql-indent-9.ql-direction-rtl.ql-align-right {\n padding-right: 27em;\n}\n.ql-editor li.ql-indent-9.ql-direction-rtl.ql-align-right {\n padding-right: 28.5em;\n}\n.ql-editor .ql-video {\n display: block;\n max-width: 100%;\n}\n.ql-editor .ql-video.ql-align-center {\n margin: 0 auto;\n}\n.ql-editor .ql-video.ql-align-right {\n margin: 0 0 0 auto;\n}\n.ql-editor .ql-bg-black {\n background-color: #000;\n}\n.ql-editor .ql-bg-red {\n background-color: #e60000;\n}\n.ql-editor .ql-bg-orange {\n background-color: #f90;\n}\n.ql-editor .ql-bg-yellow {\n background-color: #ff0;\n}\n.ql-editor .ql-bg-green {\n background-color: #008a00;\n}\n.ql-editor .ql-bg-blue {\n background-color: #06c;\n}\n.ql-editor .ql-bg-purple {\n background-color: #93f;\n}\n.ql-editor .ql-color-white {\n color: #fff;\n}\n.ql-editor .ql-color-red {\n color: #e60000;\n}\n.ql-editor .ql-color-orange {\n color: #f90;\n}\n.ql-editor .ql-color-yellow {\n color: #ff0;\n}\n.ql-editor .ql-color-green {\n color: #008a00;\n}\n.ql-editor .ql-color-blue {\n color: #06c;\n}\n.ql-editor .ql-color-purple {\n color: #93f;\n}\n.ql-editor .ql-font-serif {\n font-family: Georgia, Times New Roman, serif;\n}\n.ql-editor .ql-font-monospace {\n font-family: Monaco, Courier New, monospace;\n}\n.ql-editor .ql-size-small {\n font-size: 0.75em;\n}\n.ql-editor .ql-size-large {\n font-size: 1.5em;\n}\n.ql-editor .ql-size-huge {\n font-size: 2.5em;\n}\n.ql-editor .ql-direction-rtl {\n direction: rtl;\n text-align: inherit;\n}\n.ql-editor .ql-align-center {\n text-align: center;\n}\n.ql-editor .ql-align-justify {\n text-align: justify;\n}\n.ql-editor .ql-align-right {\n text-align: right;\n}\n.ql-editor.ql-blank::before {\n color: rgba(0,0,0,0.6);\n content: attr(data-placeholder);\n font-style: italic;\n left: 15px;\n pointer-events: none;\n position: absolute;\n right: 15px;\n}\n","",{version:3,sources:["webpack://../../node_modules/quill/dist/quill.core.css"],names:[],mappings:"AAAA;;;;;EAKE;AACF;EACE,sBAAsB;EACtB,yCAAyC;EACzC,eAAe;EACf,YAAY;EACZ,WAAW;EACX,kBAAkB;AACpB;AACA;EACE,kBAAkB;AACpB;AACA;EACE,oBAAoB;AACtB;AACA;EACE,eAAe;EACf,WAAW;EACX,kBAAkB;EAClB,kBAAkB;EAClB,QAAQ;AACV;AACA;EACE,SAAS;EACT,UAAU;AACZ;AACA;EACE,sBAAsB;EACtB,iBAAiB;EACjB,YAAY;EACZ,aAAa;EACb,gBAAgB;EAChB,kBAAkB;EAClB,WAAW;EACX,gBAAgB;EAChB,gBAAgB;EAChB,qBAAqB;EACrB,qBAAqB;AACvB;AACA;EACE,YAAY;AACd;AACA;;;;;;;;;;;EAWE,SAAS;EACT,UAAU;EACV,6EAA6E;AAC/E;AACA;;EAEE,mBAAmB;AACrB;AACA;;EAEE,qBAAqB;AACvB;AACA;EACE,gBAAgB;AAClB;AACA;;EAEE,oBAAoB;AACtB;AACA;;EAEE,mBAAmB;AACrB;AACA;;EAEE,WAAW;EACX,eAAe;EACf,mBAAmB;AACrB;AACA;EACE,gBAAgB;AAClB;AACA;EACE,gBAAgB;AAClB;AACA;EACE,qBAAqB;EACrB,mBAAmB;EACnB,YAAY;AACd;AACA;EACE,mBAAmB;EACnB,mBAAmB;EACnB,iBAAiB;AACnB;AACA;EACE,kBAAkB;EAClB,oBAAoB;AACtB;AACA;;EAEE,mBAAmB;AACrB;AACA;;EAEE,oBAAoB;AACtB;AACA;EACE,6EAA6E;EAC7E,yBAAyB;AAC3B;AACA;EACE,sCAAsC;AACxC;AACA;EACE,yBAAyB;AAC3B;AACA;EACE,0CAA0C;AAC5C;AACA;EACE,sEAAsE;AACxE;AACA;EACE,yBAAyB;AAC3B;AACA;EACE,0CAA0C;AAC5C;AACA;EACE,+DAA+D;AACjE;AACA;EACE,yBAAyB;AAC3B;AACA;EACE,sCAAsC;AACxC;AACA;EACE,wDAAwD;AAC1D;AACA;EACE,yBAAyB;AAC3B;AACA;EACE,0CAA0C;AAC5C;AACA;EACE,iDAAiD;AACnD;AACA;EACE,yBAAyB;AAC3B;AACA;EACE,0CAA0C;AAC5C;AACA;EACE,0CAA0C;AAC5C;AACA;EACE,yBAAyB;AAC3B;AACA;EACE,sCAAsC;AACxC;AACA;EACE,mCAAmC;AACrC;AACA;EACE,yBAAyB;AAC3B;AACA;EACE,0CAA0C;AAC5C;AACA;EACE,4BAA4B;AAC9B;AACA;EACE,yBAAyB;AAC3B;AACA;EACE,0CAA0C;AAC5C;AACA;EACE,qBAAqB;AACvB;AACA;EACE,yBAAyB;AAC3B;AACA;EACE,sCAAsC;AACxC;AACA;EACE,iBAAiB;AACnB;AACA;EACE,mBAAmB;AACrB;AACA;EACE,kBAAkB;AACpB;AACA;EACE,oBAAoB;AACtB;AACA;EACE,iBAAiB;AACnB;AACA;EACE,mBAAmB;AACrB;AACA;EACE,kBAAkB;AACpB;AACA;EACE,oBAAoB;AACtB;AACA;EACE,iBAAiB;AACnB;AACA;EACE,oBAAoB;AACtB;AACA;EACE,kBAAkB;AACpB;AACA;EACE,qBAAqB;AACvB;AACA;EACE,kBAAkB;AACpB;AACA;EACE,oBAAoB;AACtB;AACA;EACE,mBAAmB;AACrB;AACA;EACE,qBAAqB;AACvB;AACA;EACE,kBAAkB;AACpB;AACA;EACE,oBAAoB;AACtB;AACA;EACE,mBAAmB;AACrB;AACA;EACE,qBAAqB;AACvB;AACA;EACE,kBAAkB;AACpB;AACA;EACE,oBAAoB;AACtB;AACA;EACE,mBAAmB;AACrB;AACA;EACE,qBAAqB;AACvB;AACA;EACE,kBAAkB;AACpB;AACA;EACE,oBAAoB;AACtB;AACA;EACE,mBAAmB;AACrB;AACA;EACE,qBAAqB;AACvB;AACA;EACE,kBAAkB;AACpB;AACA;EACE,oBAAoB;AACtB;AACA;EACE,mBAAmB;AACrB;AACA;EACE,qBAAqB;AACvB;AACA;EACE,kBAAkB;AACpB;AACA;EACE,oBAAoB;AACtB;AACA;EACE,mBAAmB;AACrB;AACA;EACE,qBAAqB;AACvB;AACA;EACE,cAAc;EACd,eAAe;AACjB;AACA;EACE,cAAc;AAChB;AACA;EACE,kBAAkB;AACpB;AACA;EACE,sBAAsB;AACxB;AACA;EACE,yBAAyB;AAC3B;AACA;EACE,sBAAsB;AACxB;AACA;EACE,sBAAsB;AACxB;AACA;EACE,yBAAyB;AAC3B;AACA;EACE,sBAAsB;AACxB;AACA;EACE,sBAAsB;AACxB;AACA;EACE,WAAW;AACb;AACA;EACE,cAAc;AAChB;AACA;EACE,WAAW;AACb;AACA;EACE,WAAW;AACb;AACA;EACE,cAAc;AAChB;AACA;EACE,WAAW;AACb;AACA;EACE,WAAW;AACb;AACA;EACE,4CAA4C;AAC9C;AACA;EACE,2CAA2C;AAC7C;AACA;EACE,iBAAiB;AACnB;AACA;EACE,gBAAgB;AAClB;AACA;EACE,gBAAgB;AAClB;AACA;EACE,cAAc;EACd,mBAAmB;AACrB;AACA;EACE,kBAAkB;AACpB;AACA;EACE,mBAAmB;AACrB;AACA;EACE,iBAAiB;AACnB;AACA;EACE,sBAAsB;EACtB,+BAA+B;EAC/B,kBAAkB;EAClB,UAAU;EACV,oBAAoB;EACpB,kBAAkB;EAClB,WAAW;AACb",sourcesContent:["/*!\n * Quill Editor v1.3.7\n * https://quilljs.com/\n * Copyright (c) 2014, Jason Chen\n * Copyright (c) 2013, salesforce.com\n */\n.ql-container {\n box-sizing: border-box;\n font-family: Helvetica, Arial, sans-serif;\n font-size: 13px;\n height: 100%;\n margin: 0px;\n position: relative;\n}\n.ql-container.ql-disabled .ql-tooltip {\n visibility: hidden;\n}\n.ql-container.ql-disabled .ql-editor ul[data-checked] > li::before {\n pointer-events: none;\n}\n.ql-clipboard {\n left: -100000px;\n height: 1px;\n overflow-y: hidden;\n position: absolute;\n top: 50%;\n}\n.ql-clipboard p {\n margin: 0;\n padding: 0;\n}\n.ql-editor {\n box-sizing: border-box;\n line-height: 1.42;\n height: 100%;\n outline: none;\n overflow-y: auto;\n padding: 12px 15px;\n tab-size: 4;\n -moz-tab-size: 4;\n text-align: left;\n white-space: pre-wrap;\n word-wrap: break-word;\n}\n.ql-editor > * {\n cursor: text;\n}\n.ql-editor p,\n.ql-editor ol,\n.ql-editor ul,\n.ql-editor pre,\n.ql-editor blockquote,\n.ql-editor h1,\n.ql-editor h2,\n.ql-editor h3,\n.ql-editor h4,\n.ql-editor h5,\n.ql-editor h6 {\n margin: 0;\n padding: 0;\n counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;\n}\n.ql-editor ol,\n.ql-editor ul {\n padding-left: 1.5em;\n}\n.ql-editor ol > li,\n.ql-editor ul > li {\n list-style-type: none;\n}\n.ql-editor ul > li::before {\n content: '\\2022';\n}\n.ql-editor ul[data-checked=true],\n.ql-editor ul[data-checked=false] {\n pointer-events: none;\n}\n.ql-editor ul[data-checked=true] > li *,\n.ql-editor ul[data-checked=false] > li * {\n pointer-events: all;\n}\n.ql-editor ul[data-checked=true] > li::before,\n.ql-editor ul[data-checked=false] > li::before {\n color: #777;\n cursor: pointer;\n pointer-events: all;\n}\n.ql-editor ul[data-checked=true] > li::before {\n content: '\\2611';\n}\n.ql-editor ul[data-checked=false] > li::before {\n content: '\\2610';\n}\n.ql-editor li::before {\n display: inline-block;\n white-space: nowrap;\n width: 1.2em;\n}\n.ql-editor li:not(.ql-direction-rtl)::before {\n margin-left: -1.5em;\n margin-right: 0.3em;\n text-align: right;\n}\n.ql-editor li.ql-direction-rtl::before {\n margin-left: 0.3em;\n margin-right: -1.5em;\n}\n.ql-editor ol li:not(.ql-direction-rtl),\n.ql-editor ul li:not(.ql-direction-rtl) {\n padding-left: 1.5em;\n}\n.ql-editor ol li.ql-direction-rtl,\n.ql-editor ul li.ql-direction-rtl {\n padding-right: 1.5em;\n}\n.ql-editor ol li {\n counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;\n counter-increment: list-0;\n}\n.ql-editor ol li:before {\n content: counter(list-0, decimal) '. ';\n}\n.ql-editor ol li.ql-indent-1 {\n counter-increment: list-1;\n}\n.ql-editor ol li.ql-indent-1:before {\n content: counter(list-1, lower-alpha) '. ';\n}\n.ql-editor ol li.ql-indent-1 {\n counter-reset: list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;\n}\n.ql-editor ol li.ql-indent-2 {\n counter-increment: list-2;\n}\n.ql-editor ol li.ql-indent-2:before {\n content: counter(list-2, lower-roman) '. ';\n}\n.ql-editor ol li.ql-indent-2 {\n counter-reset: list-3 list-4 list-5 list-6 list-7 list-8 list-9;\n}\n.ql-editor ol li.ql-indent-3 {\n counter-increment: list-3;\n}\n.ql-editor ol li.ql-indent-3:before {\n content: counter(list-3, decimal) '. ';\n}\n.ql-editor ol li.ql-indent-3 {\n counter-reset: list-4 list-5 list-6 list-7 list-8 list-9;\n}\n.ql-editor ol li.ql-indent-4 {\n counter-increment: list-4;\n}\n.ql-editor ol li.ql-indent-4:before {\n content: counter(list-4, lower-alpha) '. ';\n}\n.ql-editor ol li.ql-indent-4 {\n counter-reset: list-5 list-6 list-7 list-8 list-9;\n}\n.ql-editor ol li.ql-indent-5 {\n counter-increment: list-5;\n}\n.ql-editor ol li.ql-indent-5:before {\n content: counter(list-5, lower-roman) '. ';\n}\n.ql-editor ol li.ql-indent-5 {\n counter-reset: list-6 list-7 list-8 list-9;\n}\n.ql-editor ol li.ql-indent-6 {\n counter-increment: list-6;\n}\n.ql-editor ol li.ql-indent-6:before {\n content: counter(list-6, decimal) '. ';\n}\n.ql-editor ol li.ql-indent-6 {\n counter-reset: list-7 list-8 list-9;\n}\n.ql-editor ol li.ql-indent-7 {\n counter-increment: list-7;\n}\n.ql-editor ol li.ql-indent-7:before {\n content: counter(list-7, lower-alpha) '. ';\n}\n.ql-editor ol li.ql-indent-7 {\n counter-reset: list-8 list-9;\n}\n.ql-editor ol li.ql-indent-8 {\n counter-increment: list-8;\n}\n.ql-editor ol li.ql-indent-8:before {\n content: counter(list-8, lower-roman) '. ';\n}\n.ql-editor ol li.ql-indent-8 {\n counter-reset: list-9;\n}\n.ql-editor ol li.ql-indent-9 {\n counter-increment: list-9;\n}\n.ql-editor ol li.ql-indent-9:before {\n content: counter(list-9, decimal) '. ';\n}\n.ql-editor .ql-indent-1:not(.ql-direction-rtl) {\n padding-left: 3em;\n}\n.ql-editor li.ql-indent-1:not(.ql-direction-rtl) {\n padding-left: 4.5em;\n}\n.ql-editor .ql-indent-1.ql-direction-rtl.ql-align-right {\n padding-right: 3em;\n}\n.ql-editor li.ql-indent-1.ql-direction-rtl.ql-align-right {\n padding-right: 4.5em;\n}\n.ql-editor .ql-indent-2:not(.ql-direction-rtl) {\n padding-left: 6em;\n}\n.ql-editor li.ql-indent-2:not(.ql-direction-rtl) {\n padding-left: 7.5em;\n}\n.ql-editor .ql-indent-2.ql-direction-rtl.ql-align-right {\n padding-right: 6em;\n}\n.ql-editor li.ql-indent-2.ql-direction-rtl.ql-align-right {\n padding-right: 7.5em;\n}\n.ql-editor .ql-indent-3:not(.ql-direction-rtl) {\n padding-left: 9em;\n}\n.ql-editor li.ql-indent-3:not(.ql-direction-rtl) {\n padding-left: 10.5em;\n}\n.ql-editor .ql-indent-3.ql-direction-rtl.ql-align-right {\n padding-right: 9em;\n}\n.ql-editor li.ql-indent-3.ql-direction-rtl.ql-align-right {\n padding-right: 10.5em;\n}\n.ql-editor .ql-indent-4:not(.ql-direction-rtl) {\n padding-left: 12em;\n}\n.ql-editor li.ql-indent-4:not(.ql-direction-rtl) {\n padding-left: 13.5em;\n}\n.ql-editor .ql-indent-4.ql-direction-rtl.ql-align-right {\n padding-right: 12em;\n}\n.ql-editor li.ql-indent-4.ql-direction-rtl.ql-align-right {\n padding-right: 13.5em;\n}\n.ql-editor .ql-indent-5:not(.ql-direction-rtl) {\n padding-left: 15em;\n}\n.ql-editor li.ql-indent-5:not(.ql-direction-rtl) {\n padding-left: 16.5em;\n}\n.ql-editor .ql-indent-5.ql-direction-rtl.ql-align-right {\n padding-right: 15em;\n}\n.ql-editor li.ql-indent-5.ql-direction-rtl.ql-align-right {\n padding-right: 16.5em;\n}\n.ql-editor .ql-indent-6:not(.ql-direction-rtl) {\n padding-left: 18em;\n}\n.ql-editor li.ql-indent-6:not(.ql-direction-rtl) {\n padding-left: 19.5em;\n}\n.ql-editor .ql-indent-6.ql-direction-rtl.ql-align-right {\n padding-right: 18em;\n}\n.ql-editor li.ql-indent-6.ql-direction-rtl.ql-align-right {\n padding-right: 19.5em;\n}\n.ql-editor .ql-indent-7:not(.ql-direction-rtl) {\n padding-left: 21em;\n}\n.ql-editor li.ql-indent-7:not(.ql-direction-rtl) {\n padding-left: 22.5em;\n}\n.ql-editor .ql-indent-7.ql-direction-rtl.ql-align-right {\n padding-right: 21em;\n}\n.ql-editor li.ql-indent-7.ql-direction-rtl.ql-align-right {\n padding-right: 22.5em;\n}\n.ql-editor .ql-indent-8:not(.ql-direction-rtl) {\n padding-left: 24em;\n}\n.ql-editor li.ql-indent-8:not(.ql-direction-rtl) {\n padding-left: 25.5em;\n}\n.ql-editor .ql-indent-8.ql-direction-rtl.ql-align-right {\n padding-right: 24em;\n}\n.ql-editor li.ql-indent-8.ql-direction-rtl.ql-align-right {\n padding-right: 25.5em;\n}\n.ql-editor .ql-indent-9:not(.ql-direction-rtl) {\n padding-left: 27em;\n}\n.ql-editor li.ql-indent-9:not(.ql-direction-rtl) {\n padding-left: 28.5em;\n}\n.ql-editor .ql-indent-9.ql-direction-rtl.ql-align-right {\n padding-right: 27em;\n}\n.ql-editor li.ql-indent-9.ql-direction-rtl.ql-align-right {\n padding-right: 28.5em;\n}\n.ql-editor .ql-video {\n display: block;\n max-width: 100%;\n}\n.ql-editor .ql-video.ql-align-center {\n margin: 0 auto;\n}\n.ql-editor .ql-video.ql-align-right {\n margin: 0 0 0 auto;\n}\n.ql-editor .ql-bg-black {\n background-color: #000;\n}\n.ql-editor .ql-bg-red {\n background-color: #e60000;\n}\n.ql-editor .ql-bg-orange {\n background-color: #f90;\n}\n.ql-editor .ql-bg-yellow {\n background-color: #ff0;\n}\n.ql-editor .ql-bg-green {\n background-color: #008a00;\n}\n.ql-editor .ql-bg-blue {\n background-color: #06c;\n}\n.ql-editor .ql-bg-purple {\n background-color: #93f;\n}\n.ql-editor .ql-color-white {\n color: #fff;\n}\n.ql-editor .ql-color-red {\n color: #e60000;\n}\n.ql-editor .ql-color-orange {\n color: #f90;\n}\n.ql-editor .ql-color-yellow {\n color: #ff0;\n}\n.ql-editor .ql-color-green {\n color: #008a00;\n}\n.ql-editor .ql-color-blue {\n color: #06c;\n}\n.ql-editor .ql-color-purple {\n color: #93f;\n}\n.ql-editor .ql-font-serif {\n font-family: Georgia, Times New Roman, serif;\n}\n.ql-editor .ql-font-monospace {\n font-family: Monaco, Courier New, monospace;\n}\n.ql-editor .ql-size-small {\n font-size: 0.75em;\n}\n.ql-editor .ql-size-large {\n font-size: 1.5em;\n}\n.ql-editor .ql-size-huge {\n font-size: 2.5em;\n}\n.ql-editor .ql-direction-rtl {\n direction: rtl;\n text-align: inherit;\n}\n.ql-editor .ql-align-center {\n text-align: center;\n}\n.ql-editor .ql-align-justify {\n text-align: justify;\n}\n.ql-editor .ql-align-right {\n text-align: right;\n}\n.ql-editor.ql-blank::before {\n color: rgba(0,0,0,0.6);\n content: attr(data-placeholder);\n font-style: italic;\n left: 15px;\n pointer-events: none;\n position: absolute;\n right: 15px;\n}\n"],sourceRoot:""}]),e.default=i},function(t,e,n){"use strict";n.r(e),n.d(e,"cleanUpText",(function(){return $n})),n.d(e,"formatSequence",(function(){return Zn}));var r=n(32),i=n.n(r),o=n(33),c=n.n(o),u=n(34),f=n.n(u),A=n(35),b=n.n(A),q=n(10),E=n.n(q),x=n(36),C=n.n(x),w=n(0),N=n.n(w),S=(n(53),n(1)),B=n.n(S),T=n(7),O=n.n(T),L=n(2),R=n.n(L),P=function(t){g(n,t);var e=y(n);function n(){return p(this,n),e.apply(this,arguments)}return d(n,[{key:"insertInto",value:function(t,e){0===t.children.length?h(k(n.prototype),"insertInto",this).call(this,t,e):this.remove()}},{key:"length",value:function(){return 0}},{key:"value",value:function(){return""}}],[{key:"value",value:function(){}}]),n}(N.a.Embed);P.blotName="break",P.tagName="BR";var I=P,j=function(t){g(n,t);var e=y(n);function n(){return p(this,n),e.apply(this,arguments)}return n}(N.a.Text),U=function(t){g(n,t);var e=y(n);function n(){return p(this,n),e.apply(this,arguments)}return d(n,[{key:"formatAt",value:function(t,e,r,i){if(n.compare(this.statics.blotName,r)<0&&N.a.query(r,N.a.Scope.BLOT)){var o=this.isolate(t,e);i&&o.wrap(r,i)}else h(k(n.prototype),"formatAt",this).call(this,t,e,r,i)}},{key:"optimize",value:function(t){if(h(k(n.prototype),"optimize",this).call(this,t),this.parent instanceof n&&n.compare(this.statics.blotName,this.parent.statics.blotName)>0){var e=this.parent.isolate(this.offset(),this.length());this.moveChildren(e),e.wrap(this)}}}],[{key:"compare",value:function(t,e){var r=n.order.indexOf(t),i=n.order.indexOf(e);return r>=0||i>=0?r-i:t===e?0:t0&&(t1&&void 0!==arguments[1]&&arguments[1];if(e&&(0===t||t>=this.length()-1)){var r=this.clone();return 0===t?(this.parent.insertBefore(r,this),this):(this.parent.insertBefore(r,this.next),r)}var i=h(k(n.prototype),"split",this).call(this,t,e);return this.cache={},i}}]),n}(N.a.Block);function H(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return null==t?e:("function"==typeof t.formats&&(e=R()(e,t.formats())),null==t.parent||"scroll"==t.parent.blotName||t.parent.statics.scope!==t.statics.scope?e:H(t.parent,e))}F.blotName="block",F.tagName="P",F.defaultChild="break",F.allowedChildren=[M,N.a.Embed,j];var z=function(t){g(n,t);var e=y(n);function n(){return p(this,n),e.apply(this,arguments)}return n}(M);z.blotName="code",z.tagName="CODE";var K=function(t){g(n,t);var e=y(n);function n(){return p(this,n),e.apply(this,arguments)}return d(n,[{key:"delta",value:function(){var t=this,e=this.domNode.textContent;return e.endsWith("\n")&&(e=e.slice(0,-1)),e.split("\n").reduce((function(e,n){return e.insert(n).insert("\n",t.formats())}),new B.a)}},{key:"format",value:function(t,e){if(t!==this.statics.blotName||!e){var r=s(this.descendant(j,this.length()-1),1)[0];null!=r&&r.deleteAt(r.length()-1,1),h(k(n.prototype),"format",this).call(this,t,e)}}},{key:"formatAt",value:function(t,e,r,i){if(0!==e&&null!=N.a.query(r,N.a.Scope.BLOCK)&&(r!==this.statics.blotName||i!==this.statics.formats(this.domNode))){var o=this.newlineIndex(t);if(!(o<0||o>=t+e)){var l=this.newlineIndex(t,!0)+1,a=o-l+1,s=this.isolate(l,a),c=s.next;s.format(r,i),c instanceof n&&c.formatAt(0,t-l+e-a,r,i)}}}},{key:"insertAt",value:function(t,e,n){if(null==n){var r=s(this.descendant(j,t),2),i=r[0],o=r[1];i.insertAt(o,e)}}},{key:"length",value:function(){var t=this.domNode.textContent.length;return this.domNode.textContent.endsWith("\n")?t:t+1}},{key:"newlineIndex",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e)return this.domNode.textContent.slice(0,t).lastIndexOf("\n");var n=this.domNode.textContent.slice(t).indexOf("\n");return n>-1?t+n:-1}},{key:"optimize",value:function(t){this.domNode.textContent.endsWith("\n")||this.appendChild(N.a.create("text","\n")),h(k(n.prototype),"optimize",this).call(this,t);var e=this.next;null!=e&&e.prev===this&&e.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===e.statics.formats(e.domNode)&&(e.optimize(t),e.moveChildren(this),e.remove())}},{key:"replace",value:function(t){h(k(n.prototype),"replace",this).call(this,t),[].slice.call(this.domNode.querySelectorAll("*")).forEach((function(t){var e=N.a.find(t);null==e?t.parentNode.removeChild(t):e instanceof N.a.Embed?e.remove():e.unwrap()}))}}],[{key:"create",value:function(t){var e=h(k(n),"create",this).call(this,t);return e.setAttribute("spellcheck",!1),e}},{key:"formats",value:function(){return!0}}]),n}(F);K.blotName="code-block",K.tagName="PRE",K.TAB=" ";var Y=function(t){g(n,t);var e=y(n);function n(t,r){var i;return p(this,n),(i=e.call(this,t)).selection=r,i.textNode=document.createTextNode(n.CONTENTS),i.domNode.appendChild(i.textNode),i._length=0,i}return d(n,[{key:"detach",value:function(){null!=this.parent&&this.parent.removeChild(this)}},{key:"format",value:function(t,e){if(0!==this._length)return h(k(n.prototype),"format",this).call(this,t,e);for(var r=this,i=0;null!=r&&r.statics.scope!==N.a.Scope.BLOCK_BLOT;)i+=r.offset(r.parent),r=r.parent;null!=r&&(this._length=n.CONTENTS.length,r.optimize(),r.formatAt(i,n.CONTENTS.length,t,e),this._length=0)}},{key:"index",value:function(t,e){return t===this.textNode?0:h(k(n.prototype),"index",this).call(this,t,e)}},{key:"length",value:function(){return this._length}},{key:"position",value:function(){return[this.textNode,this.textNode.data.length]}},{key:"remove",value:function(){h(k(n.prototype),"remove",this).call(this),this.parent=null}},{key:"restore",value:function(){var t,e;if(!this.selection.composing&&null!=this.parent){var r,i,o,l=this.textNode,a=this.selection.getNativeRange();for(null!=a&&a.start.node===l&&a.end.node===l&&(c=[l,a.start.offset,a.end.offset],r=c[0],i=c[1],o=c[2]);null!=this.domNode.lastChild&&this.domNode.lastChild!==this.textNode;){var c;this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode)}if(this.textNode.data!==n.CONTENTS){var u=this.textNode.data.split(n.CONTENTS).join("");this.next instanceof j?(r=this.next.domNode,this.next.insertAt(0,u),this.textNode.data=n.CONTENTS):(this.textNode.data=u,this.parent.insertBefore(N.a.create(this.textNode),this),this.textNode=document.createTextNode(n.CONTENTS),this.domNode.appendChild(this.textNode))}return this.remove(),null!=i?(t=[i,o].map((function(t){return Math.max(0,Math.min(r.data.length,t-1))})),i=(e=s(t,2))[0],o=e[1],{startNode:r,startOffset:i,endNode:r,endOffset:o}):void 0}}},{key:"update",value:function(t,e){var n=this;if(t.some((function(t){return"characterData"===t.type&&t.target===n.textNode}))){var r=this.restore();r&&(e.range=r)}}},{key:"value",value:function(){return""}}],[{key:"value",value:function(){}}]),n}(N.a.Embed);Y.blotName="cursor",Y.className="ql-cursor",Y.tagName="span",Y.CONTENTS="\ufeff";var V=Y,W=n(4),X=n.n(W),Z=n(5),G=n.n(Z),$=/^[ -~]*$/;function J(t,e){return Object.keys(e).reduce((function(n,r){return null==t[r]||(e[r]===t[r]?n[r]=e[r]:Array.isArray(e[r])?e[r].indexOf(t[r])<0&&(n[r]=e[r].concat([t[r]])):n[r]=[e[r],t[r]]),n}),{})}var Q=function(){function t(e){p(this,t),this.scroll=e,this.delta=this.getDelta()}return d(t,[{key:"applyDelta",value:function(t){var e=this,n=!1;this.scroll.update();var r=this.scroll.length();return this.scroll.batchStart(),(t=function(t){return t.reduce((function(t,e){if(1===e.insert){var n=X()(e.attributes);return delete n.image,t.insert({image:e.attributes.image},n)}if(null==e.attributes||!0!==e.attributes.list&&!0!==e.attributes.bullet||((e=X()(e)).attributes.list?e.attributes.list="ordered":(e.attributes.list="bullet",delete e.attributes.bullet)),"string"==typeof e.insert){var r=e.insert.replace(/\r\n/g,"\n").replace(/\r/g,"\n");return t.insert(r,e.attributes)}return t.push(e)}),new B.a)}(t)).reduce((function(t,i){var o=i.retain||i.delete||i.insert.length||1,l=i.attributes||{};if(null!=i.insert){if("string"==typeof i.insert){var a=i.insert;a.endsWith("\n")&&n&&(n=!1,a=a.slice(0,-1)),t>=r&&!a.endsWith("\n")&&(n=!0),e.scroll.insertAt(t,a);var c=s(e.scroll.line(t),2),u=c[0],h=c[1],f=R()({},H(u));if(u instanceof F){var d=s(u.descendant(N.a.Leaf,h),1)[0];f=R()(f,H(d))}l=O.a.attributes.diff(f,l)||{}}else if("object"==_(i.insert)){var p=Object.keys(i.insert)[0];if(null==p)return t;e.scroll.insertAt(t,p,i.insert[p])}r+=o}return Object.keys(l).forEach((function(n){e.scroll.formatAt(t,o,n,l[n])})),t+o}),0),t.reduce((function(t,n){return"number"==typeof n.delete?(e.scroll.deleteAt(t,n.delete),t):t+(n.retain||n.insert.length||1)}),0),this.scroll.batchEnd(),this.update(t)}},{key:"deleteText",value:function(t,e){return this.scroll.deleteAt(t,e),this.update((new B.a).retain(t).delete(e))}},{key:"formatLine",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.scroll.update(),Object.keys(r).forEach((function(i){if(null==n.scroll.whitelist||n.scroll.whitelist[i]){var o=n.scroll.lines(t,Math.max(e,1)),l=e;o.forEach((function(e){var o=e.length();if(e instanceof K){var a=t-e.offset(n.scroll),s=e.newlineIndex(a+l)-a+1;e.formatAt(a,s,i,r[i])}else e.format(i,r[i]);l-=o}))}})),this.scroll.optimize(),this.update((new B.a).retain(t).retain(e,X()(r)))}},{key:"formatText",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object.keys(r).forEach((function(i){n.scroll.formatAt(t,e,i,r[i])})),this.update((new B.a).retain(t).retain(e,X()(r)))}},{key:"getContents",value:function(t,e){return this.delta.slice(t,t+e)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce((function(t,e){return t.concat(e.delta())}),new B.a)}},{key:"getFormat",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[],r=[];0===e?this.scroll.path(t).forEach((function(t){var e=s(t,1)[0];e instanceof F?n.push(e):e instanceof N.a.Leaf&&r.push(e)})):(n=this.scroll.lines(t,e),r=this.scroll.descendants(N.a.Leaf,t,e));var i=[n,r].map((function(t){if(0===t.length)return{};for(var e=H(t.shift());Object.keys(e).length>0;){var n=t.shift();if(null==n)return e;e=J(H(n),e)}return e}));return R.a.apply(R.a,i)}},{key:"getText",value:function(t,e){return this.getContents(t,e).filter((function(t){return"string"==typeof t.insert})).map((function(t){return t.insert})).join("")}},{key:"insertEmbed",value:function(t,e,n){return this.scroll.insertAt(t,e,n),this.update((new B.a).retain(t).insert(a({},e,n)))}},{key:"insertText",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e=e.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),this.scroll.insertAt(t,e),Object.keys(r).forEach((function(i){n.scroll.formatAt(t,e.length,i,r[i])})),this.update((new B.a).retain(t).insert(e,X()(r)))}},{key:"isBlank",value:function(){if(0==this.scroll.children.length)return!0;if(this.scroll.children.length>1)return!1;var t=this.scroll.children.head;return t.statics.blotName===F.blotName&&!(t.children.length>1)&&t.children.head instanceof I}},{key:"removeFormat",value:function(t,e){var n=this.getText(t,e),r=s(this.scroll.line(t+e),2),i=r[0],o=r[1],l=0,a=new B.a;null!=i&&(l=i instanceof K?i.newlineIndex(o)-o+1:i.length()-o,a=i.delta().slice(o,o+l-1).insert("\n"));var c=this.getContents(t,e+l).diff((new B.a).insert(n).concat(a)),u=(new B.a).retain(t).concat(c);return this.applyDelta(u)}},{key:"update",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0,r=this.delta;if(1===e.length&&"characterData"===e[0].type&&e[0].target.data.match($)&&N.a.find(e[0].target)){var i=N.a.find(e[0].target),o=H(i),l=i.offset(this.scroll),a=e[0].oldValue.replace(V.CONTENTS,""),s=(new B.a).insert(a),c=(new B.a).insert(i.value());t=(new B.a).retain(l).concat(s.diff(c,n)).reduce((function(t,e){return e.insert?t.insert(e.insert,o):t.push(e)}),new B.a),this.delta=r.compose(t)}else this.delta=this.getDelta(),t&&G()(r.compose(t),this.delta)||(t=r.diff(this.delta,n));return t}}]),t}(),tt=n(37),et=n.n(tt),nt=["error","warn","log","info"],rt="warn";function it(t){for(var e,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i1?e-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:{};p(this,t),this.quill=e,this.options=n};ut.DEFAULTS={};var ht=ut,ft=lt("quill:selection"),dt=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;p(this,t),this.index=e,this.length=n},pt=function(){function t(e,n){var r=this;p(this,t),this.emitter=n,this.scroll=e,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=N.a.create("cursor",this),this.lastRange=this.savedRange=new dt(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,(function(){r.mouseDown||setTimeout(r.update.bind(r,ct.sources.USER),1)})),this.emitter.on(ct.events.EDITOR_CHANGE,(function(t,e){t===ct.events.TEXT_CHANGE&&e.length()>0&&r.update(ct.sources.SILENT)})),this.emitter.on(ct.events.SCROLL_BEFORE_UPDATE,(function(){if(r.hasFocus()){var t=r.getNativeRange();null!=t&&t.start.node!==r.cursor.textNode&&r.emitter.once(ct.events.SCROLL_UPDATE,(function(){try{r.setNativeRange(t.start.node,t.start.offset,t.end.node,t.end.offset)}catch(t){}}))}})),this.emitter.on(ct.events.SCROLL_OPTIMIZE,(function(t,e){if(e.range){var n=e.range,i=n.startNode,o=n.startOffset,l=n.endNode,a=n.endOffset;r.setNativeRange(i,o,l,a)}})),this.update(ct.sources.SILENT)}return d(t,[{key:"handleComposition",value:function(){var t=this;this.root.addEventListener("compositionstart",(function(){t.composing=!0})),this.root.addEventListener("compositionend",(function(){if(t.composing=!1,t.cursor.parent){var e=t.cursor.restore();if(!e)return;setTimeout((function(){t.setNativeRange(e.startNode,e.startOffset,e.endNode,e.endOffset)}),1)}}))}},{key:"handleDragging",value:function(){var t=this;this.emitter.listenDOM("mousedown",document.body,(function(){t.mouseDown=!0})),this.emitter.listenDOM("mouseup",document.body,(function(){t.mouseDown=!1,t.update(ct.sources.USER)}))}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(t,e){if(null==this.scroll.whitelist||this.scroll.whitelist[t]){this.scroll.update();var n=this.getNativeRange();if(null!=n&&n.native.collapsed&&!N.a.query(t,N.a.Scope.BLOCK)){if(n.start.node!==this.cursor.textNode){var r=N.a.find(n.start.node,!1);if(null==r)return;if(r instanceof N.a.Leaf){var i=r.split(n.start.offset);r.parent.insertBefore(this.cursor,i)}else r.insertBefore(this.cursor,n.start.node);this.cursor.attach()}this.cursor.format(t,e),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(t){var e,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=this.scroll.length();t=Math.min(t,i-1),r=Math.min(t+r,i-1)-t;var o,l=this.scroll.leaf(t),a=s(l,2),c=a[0],u=a[1];if(null==c)return null;var h=c.position(u,!0),f=s(h,2);o=f[0],u=f[1];var d=document.createRange();if(r>0)return d.setStart(o,u),c=(e=s(this.scroll.leaf(t+r),2))[0],u=e[1],null==c?null:(o=(n=s(c.position(u,!0),2))[0],u=n[1],d.setEnd(o,u),d.getBoundingClientRect());var p,g="left";return o instanceof Text?(u0&&(g="right")),{bottom:p.top+p.height,height:p.height,left:p[g],right:p[g],top:p.top,width:0}}},{key:"getNativeRange",value:function(){var t=document.getSelection();if(null==t||t.rangeCount<=0)return null;var e=t.getRangeAt(0);if(null==e)return null;var n=this.normalizeNative(e);return ft.info("getNativeRange",n),n}},{key:"getRange",value:function(){var t=this.getNativeRange();return null==t?[null,null]:[this.normalizedToRange(t),t]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(t){var e=this,n=[[t.start.node,t.start.offset]];t.native.collapsed||n.push([t.end.node,t.end.offset]);var r=n.map((function(t){var n=s(t,2),r=n[0],i=n[1],o=N.a.find(r,!0),l=o.offset(e.scroll);return 0===i?l:o instanceof N.a.Container?l+o.length():l+o.index(r,i)})),i=Math.min(Math.max.apply(Math,l(r)),this.scroll.length()-1),o=Math.min.apply(Math,[i].concat(l(r)));return new dt(o,i-o)}},{key:"normalizeNative",value:function(t){if(!gt(this.root,t.startContainer)||!t.collapsed&&!gt(this.root,t.endContainer))return null;var e={start:{node:t.startContainer,offset:t.startOffset},end:{node:t.endContainer,offset:t.endOffset},native:t};return[e.start,e.end].forEach((function(t){for(var e=t.node,n=t.offset;!(e instanceof Text)&&e.childNodes.length>0;)if(e.childNodes.length>n)e=e.childNodes[n],n=0;else{if(e.childNodes.length!==n)break;n=(e=e.lastChild)instanceof Text?e.data.length:e.childNodes.length+1}t.node=e,t.offset=n})),e}},{key:"rangeToNative",value:function(t){var e=this,n=t.collapsed?[t.index]:[t.index,t.index+t.length],r=[],i=this.scroll.length();return n.forEach((function(t,n){var o;t=Math.min(i-1,t);var l,a=s(e.scroll.leaf(t),2),c=a[0],u=a[1];l=(o=s(c.position(u,0!==n),2))[0],u=o[1],r.push(l,u)})),r.length<2&&(r=r.concat(r)),r}},{key:"scrollIntoView",value:function(t){var e=this.lastRange;if(null!=e){var n=this.getBounds(e.index,e.length);if(null!=n){var r=this.scroll.length()-1,i=s(this.scroll.line(Math.min(e.index,r)),1)[0],o=i;if(e.length>0&&(o=s(this.scroll.line(Math.min(e.index+e.length,r)),1)[0]),null!=i&&null!=o){var l=t.getBoundingClientRect();n.topl.bottom&&(t.scrollTop+=n.bottom-l.bottom)}}}}},{key:"setNativeRange",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e,i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(ft.info("setNativeRange",t,e,n,r),null==t||null!=this.root.parentNode&&null!=t.parentNode&&null!=n.parentNode){var o=document.getSelection();if(null!=o)if(null!=t){this.hasFocus()||this.root.focus();var l=(this.getNativeRange()||{}).native;if(null==l||i||t!==l.startContainer||e!==l.startOffset||n!==l.endContainer||r!==l.endOffset){"BR"==t.tagName&&(e=[].indexOf.call(t.parentNode.childNodes,t),t=t.parentNode),"BR"==n.tagName&&(r=[].indexOf.call(n.parentNode.childNodes,n),n=n.parentNode);var a=document.createRange();a.setStart(t,e),a.setEnd(n,r),o.removeAllRanges(),o.addRange(a)}}else o.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ct.sources.API;if("string"==typeof e&&(n=e,e=!1),ft.info("setRange",t),null!=t){var r=this.rangeToNative(t);this.setNativeRange.apply(this,l(r).concat([e]))}else this.setNativeRange(null);this.update(n)}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ct.sources.USER,e=this.lastRange,n=this.getRange(),r=s(n,2),i=r[0],o=r[1];if(this.lastRange=i,null!=this.lastRange&&(this.savedRange=this.lastRange),!G()(e,this.lastRange)){var l,a;!this.composing&&null!=o&&o.native.collapsed&&o.start.node!==this.cursor.textNode&&this.cursor.restore();var c=[ct.events.SELECTION_CHANGE,X()(this.lastRange),X()(e),t];(l=this.emitter).emit.apply(l,[ct.events.EDITOR_CHANGE].concat(c)),t!==ct.sources.SILENT&&(a=this.emitter).emit.apply(a,c)}}}]),t}();function gt(t,e){try{e.parentNode}catch(t){return!1}return e instanceof Text&&(e=e.parentNode),t.contains(e)}var yt=function(){function t(e,n){p(this,t),this.quill=e,this.options=n,this.modules={}}return d(t,[{key:"init",value:function(){var t=this;Object.keys(this.options.modules).forEach((function(e){null==t.modules[e]&&t.addModule(e)}))}},{key:"addModule",value:function(t){var e=this.quill.constructor.import("modules/"+t);return this.modules[t]=new e(this.quill,this.options.modules[t]||{}),this.modules[t]}}]),t}();yt.DEFAULTS={modules:{}},yt.themes={default:yt};var vt=yt,mt=lt("quill"),At=function(){function t(e){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(p(this,t),this.options=function(e,n){if((n=R()(!0,{container:e,modules:{clipboard:!0,keyboard:!0,history:!0}},n)).theme&&n.theme!==t.DEFAULTS.theme){if(n.theme=t.import("themes/"+n.theme),null==n.theme)throw new Error("Invalid theme ".concat(n.theme,". Did you register it?"))}else n.theme=vt;var r=R()(!0,{},n.theme.DEFAULTS);[r,n].forEach((function(t){t.modules=t.modules||{},Object.keys(t.modules).forEach((function(e){!0===t.modules[e]&&(t.modules[e]={})}))}));var i=Object.keys(r.modules).concat(Object.keys(n.modules)).reduce((function(e,n){var r=t.import("modules/"+n);return null==r?mt.error("Cannot load ".concat(n," module. Are you sure you registered it?")):e[n]=r.DEFAULTS||{},e}),{});return null!=n.modules&&n.modules.toolbar&&n.modules.toolbar.constructor!==Object&&(n.modules.toolbar={container:n.modules.toolbar}),n=R()(!0,{},t.DEFAULTS,{modules:i},r,n),["bounds","container","scrollingContainer"].forEach((function(t){"string"==typeof n[t]&&(n[t]=document.querySelector(n[t]))})),n.modules=Object.keys(n.modules).reduce((function(t,e){return n.modules[e]&&(t[e]=n.modules[e]),t}),{}),n}(e,r),this.container=this.options.container,null==this.container)return mt.error("Invalid Quill container",e);this.options.debug&&t.debug(this.options.debug);var i=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.root.setAttribute("data-gramm",!1),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new ct,this.scroll=N.a.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new Q(this.scroll),this.selection=new pt(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(ct.events.EDITOR_CHANGE,(function(t){t===ct.events.TEXT_CHANGE&&n.root.classList.toggle("ql-blank",n.editor.isBlank())})),this.emitter.on(ct.events.SCROLL_UPDATE,(function(t,e){var r=n.selection.lastRange,i=r&&0===r.length?r.index:void 0;bt.call(n,(function(){return n.editor.update(null,e,i)}),t)}));var o=this.clipboard.convert("
    ".concat(i,"


    "));this.setContents(o),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return d(t,[{key:"addContainer",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("string"==typeof t){var n=t;(t=document.createElement("div")).classList.add(n)}return this.container.insertBefore(t,e),t}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(t,e,n){var r,i=this;return r=s(qt(t,e,n),4),t=r[0],e=r[1],n=r[3],bt.call(this,(function(){return i.editor.deleteText(t,e)}),n,t,-1*e)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.scroll.enable(t),this.container.classList.toggle("ql-disabled",!t)}},{key:"focus",value:function(){var t=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=t,this.scrollIntoView()}},{key:"format",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ct.sources.API;return bt.call(this,(function(){var r=n.getSelection(!0),i=new B.a;if(null==r)return i;if(N.a.query(t,N.a.Scope.BLOCK))i=n.editor.formatLine(r.index,r.length,a({},t,e));else{if(0===r.length)return n.selection.format(t,e),i;i=n.editor.formatText(r.index,r.length,a({},t,e))}return n.setSelection(r,ct.sources.SILENT),i}),r)}},{key:"formatLine",value:function(t,e,n,r,i){var o,l,a=this;return o=s(qt(t,e,n,r,i),4),t=o[0],e=o[1],l=o[2],i=o[3],bt.call(this,(function(){return a.editor.formatLine(t,e,l)}),i,t,0)}},{key:"formatText",value:function(t,e,n,r,i){var o,l,a=this;return o=s(qt(t,e,n,r,i),4),t=o[0],e=o[1],l=o[2],i=o[3],bt.call(this,(function(){return a.editor.formatText(t,e,l)}),i,t,0)}},{key:"getBounds",value:function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;e="number"==typeof t?this.selection.getBounds(t,n):this.selection.getBounds(t.index,t.length);var r=this.container.getBoundingClientRect();return{bottom:e.bottom-r.top,height:e.height,left:e.left-r.left,right:e.right-r.left,top:e.top-r.top,width:e.width}}},{key:"getContents",value:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-e;return e=(t=s(qt(e,n),2))[0],n=t[1],this.editor.getContents(e,n)}},{key:"getFormat",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getSelection(!0),e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return"number"==typeof t?this.editor.getFormat(t,e):this.editor.getFormat(t.index,t.length)}},{key:"getIndex",value:function(t){return t.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(t){return this.scroll.leaf(t)}},{key:"getLine",value:function(t){return this.scroll.line(t)}},{key:"getLines",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;return"number"!=typeof t?this.scroll.lines(t.index,t.length):this.scroll.lines(t,e)}},{key:"getModule",value:function(t){return this.theme.modules[t]}},{key:"getSelection",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return t&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-e;return e=(t=s(qt(e,n),2))[0],n=t[1],this.editor.getText(e,n)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(e,n,r){var i=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.sources.API;return bt.call(this,(function(){return i.editor.insertEmbed(e,n,r)}),o,e)}},{key:"insertText",value:function(t,e,n,r,i){var o,l,a=this;return o=s(qt(t,0,n,r,i),4),t=o[0],l=o[2],i=o[3],bt.call(this,(function(){return a.editor.insertText(t,e,l)}),i,t,e.length)}},{key:"isEnabled",value:function(){return!this.container.classList.contains("ql-disabled")}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function(t,e,n){this.clipboard.dangerouslyPasteHTML(t,e,n)}},{key:"removeFormat",value:function(t,e,n){var r,i=this;return r=s(qt(t,e,n),4),t=r[0],e=r[1],n=r[3],bt.call(this,(function(){return i.editor.removeFormat(t,e)}),n,t)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ct.sources.API;return bt.call(this,(function(){t=new B.a(t);var n=e.getLength(),r=e.editor.deleteText(0,n),i=e.editor.applyDelta(t),o=i.ops[i.ops.length-1];return null!=o&&"string"==typeof o.insert&&"\n"===o.insert[o.insert.length-1]&&(e.editor.deleteText(e.getLength()-1,1),i.delete(1)),r.compose(i)}),n)}},{key:"setSelection",value:function(e,n,r){var i;null==e?this.selection.setRange(null,n||t.sources.API):(e=(i=s(qt(e,n,r),4))[0],n=i[1],r=i[3],this.selection.setRange(new dt(e,n),r),r!==ct.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer))}},{key:"setText",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ct.sources.API,n=(new B.a).insert(t);return this.setContents(n,e)}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ct.sources.USER,e=this.scroll.update(t);return this.selection.update(t),e}},{key:"updateContents",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ct.sources.API;return bt.call(this,(function(){return t=new B.a(t),e.editor.applyDelta(t,n)}),n,!0)}}],[{key:"debug",value:function(t){!0===t&&(t="log"),lt.level(t)}},{key:"find",value:function(t){return t.__quill||N.a.find(t)}},{key:"import",value:function(t){return null==this.imports[t]&&mt.error("Cannot import ".concat(t,". Are you sure it was registered?")),this.imports[t]}},{key:"register",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("string"!=typeof t){var i=t.attrName||t.blotName;"string"==typeof i?this.register("formats/"+i,t,e):Object.keys(t).forEach((function(r){n.register(r,t[r],e)}))}else null==this.imports[t]||r||mt.warn("Overwriting ".concat(t," with"),e),this.imports[t]=e,(t.startsWith("blots/")||t.startsWith("formats/"))&&"abstract"!==e.blotName?N.a.register(e):t.startsWith("modules")&&"function"==typeof e.register&&e.register()}}]),t}();function bt(t,e,n,r){if(this.options.strict&&!this.isEnabled()&&e===ct.sources.USER)return new B.a;var i=null==n?null:this.getSelection(),o=this.editor.delta,l=t();if(null!=i&&(!0===n&&(n=i.index),null==r?i=Et(i,l,e):0!==r&&(i=Et(i,n,r,e)),this.setSelection(i,ct.sources.SILENT)),l.length()>0){var a,s,c=[ct.events.TEXT_CHANGE,l,o,e];(a=this.emitter).emit.apply(a,[ct.events.EDITOR_CHANGE].concat(c)),e!==ct.sources.SILENT&&(s=this.emitter).emit.apply(s,c)}return l}function qt(t,e,n,r,i){var o={};return"number"==typeof t.index&&"number"==typeof t.length?"number"!=typeof e?(i=r,r=n,n=e,e=t.length,t=t.index):(e=t.length,t=t.index):"number"!=typeof e&&(i=r,r=n,n=e,e=0),"object"==_(n)?(o=n,i=r):"string"==typeof n&&(null!=r?o[n]=r:i=n),[t,e,o,i=i||ct.sources.API]}function Et(t,e,n,r){var i,o,l,a;return null==t?null:(e instanceof B.a?(l=(i=s([t.index,t.index+t.length].map((function(t){return e.transformPosition(t,r!==ct.sources.USER)})),2))[0],a=i[1]):(l=(o=s([t.index,t.index+t.length].map((function(t){return t=0?t+n:Math.max(e,t+n)})),2))[0],a=o[1]),new dt(l,a-l))}At.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},At.events=ct.events,At.sources=ct.sources,At.version="undefined"==typeof QUILL_VERSION?"dev":QUILL_VERSION,At.imports={delta:B.a,parchment:N.a,"core/module":ht,"core/theme":vt};var kt=function(t){g(n,t);var e=y(n);function n(){return p(this,n),e.apply(this,arguments)}return n}(N.a.Container);kt.allowedChildren=[F,D,kt];var _t=kt,xt=function(t){g(n,t);var e=y(n);function n(t){var r;return p(this,n),(r=e.call(this,t)).contentNode=document.createElement("span"),r.contentNode.setAttribute("contenteditable",!1),[].slice.call(r.domNode.childNodes).forEach((function(t){r.contentNode.appendChild(t)})),r.leftGuard=document.createTextNode("\ufeff"),r.rightGuard=document.createTextNode("\ufeff"),r.domNode.appendChild(r.leftGuard),r.domNode.appendChild(r.contentNode),r.domNode.appendChild(r.rightGuard),r}return d(n,[{key:"index",value:function(t,e){return t===this.leftGuard?0:t===this.rightGuard?1:h(k(n.prototype),"index",this).call(this,t,e)}},{key:"restore",value:function(t){var e,n,r=t.data.split("\ufeff").join("");if(t===this.leftGuard)if(this.prev instanceof j){var i=this.prev.length();this.prev.insertAt(i,r),e={startNode:this.prev.domNode,startOffset:i+r.length}}else n=document.createTextNode(r),this.parent.insertBefore(N.a.create(n),this),e={startNode:n,startOffset:r.length};else t===this.rightGuard&&(this.next instanceof j?(this.next.insertAt(0,r),e={startNode:this.next.domNode,startOffset:r.length}):(n=document.createTextNode(r),this.parent.insertBefore(N.a.create(n),this.next),e={startNode:n,startOffset:r.length}));return t.data="\ufeff",e}},{key:"update",value:function(t,e){var n=this;t.forEach((function(t){if("characterData"===t.type&&(t.target===n.leftGuard||t.target===n.rightGuard)){var r=n.restore(t.target);r&&(e.range=r)}}))}}]),n}(N.a.Embed);function Ct(t){return t instanceof F||t instanceof D}var wt=function(t){g(n,t);var e=y(n);function n(t,r){var i;return p(this,n),(i=e.call(this,t)).emitter=r.emitter,Array.isArray(r.whitelist)&&(i.whitelist=r.whitelist.reduce((function(t,e){return t[e]=!0,t}),{})),i.domNode.addEventListener("DOMNodeInserted",(function(){})),i.optimize(),i.enable(),i}return d(n,[{key:"batchStart",value:function(){this.batch=!0}},{key:"batchEnd",value:function(){this.batch=!1,this.optimize()}},{key:"deleteAt",value:function(t,e){var r=s(this.line(t),2),i=r[0],o=r[1],l=s(this.line(t+e),1)[0];if(h(k(n.prototype),"deleteAt",this).call(this,t,e),null!=l&&i!==l&&o>0){if(i instanceof D||l instanceof D)return void this.optimize();if(i instanceof K){var a=i.newlineIndex(i.length(),!0);if(a>-1&&(i=i.split(a+1))===l)return void this.optimize()}else if(l instanceof K){var c=l.newlineIndex(0);c>-1&&l.split(c+1)}var u=l.children.head instanceof I?null:l.children.head;i.moveChildren(l,u),i.remove()}this.optimize()}},{key:"enable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.domNode.setAttribute("contenteditable",t)}},{key:"formatAt",value:function(t,e,r,i){(null==this.whitelist||this.whitelist[r])&&(h(k(n.prototype),"formatAt",this).call(this,t,e,r,i),this.optimize())}},{key:"insertAt",value:function(t,e,r){if(null==r||null==this.whitelist||this.whitelist[e]){if(t>=this.length())if(null==r||null==N.a.query(e,N.a.Scope.BLOCK)){var i=N.a.create(this.statics.defaultChild);this.appendChild(i),null==r&&e.endsWith("\n")&&(e=e.slice(0,-1)),i.insertAt(0,e,r)}else{var o=N.a.create(e,r);this.appendChild(o)}else h(k(n.prototype),"insertAt",this).call(this,t,e,r);this.optimize()}}},{key:"insertBefore",value:function(t,e){if(t.statics.scope===N.a.Scope.INLINE_BLOT){var r=N.a.create(this.statics.defaultChild);r.appendChild(t),t=r}h(k(n.prototype),"insertBefore",this).call(this,t,e)}},{key:"leaf",value:function(t){return this.path(t).pop()||[null,-1]}},{key:"line",value:function(t){return t===this.length()?this.line(t-1):this.descendant(Ct,t)}},{key:"lines",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE,n=function t(e,n,r){var i=[],o=r;return e.children.forEachAt(n,r,(function(e,n,r){Ct(e)?i.push(e):e instanceof N.a.Container&&(i=i.concat(t(e,n,o))),o-=r})),i};return n(this,t,e)}},{key:"optimize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!0!==this.batch&&(h(k(n.prototype),"optimize",this).call(this,t,e),t.length>0&&this.emitter.emit(ct.events.SCROLL_OPTIMIZE,t,e))}},{key:"path",value:function(t){return h(k(n.prototype),"path",this).call(this,t).slice(1)}},{key:"update",value:function(t){if(!0!==this.batch){var e=ct.sources.USER;"string"==typeof t&&(e=t),Array.isArray(t)||(t=this.observer.takeRecords()),t.length>0&&this.emitter.emit(ct.events.SCROLL_BEFORE_UPDATE,e,t),h(k(n.prototype),"update",this).call(this,t.concat([])),t.length>0&&this.emitter.emit(ct.events.SCROLL_UPDATE,e,t)}}}]),n}(N.a.Scroll);wt.blotName="scroll",wt.className="ql-editor",wt.tagName="DIV",wt.defaultChild="block",wt.allowedChildren=[F,D,_t];var Nt=wt,St={scope:N.a.Scope.BLOCK,whitelist:["right","center","justify"]},Bt=new N.a.Attributor.Attribute("align","align",St),Tt=new N.a.Attributor.Class("align","ql-align",St),Ot=new N.a.Attributor.Style("align","text-align",St),Lt=function(t){g(n,t);var e=y(n);function n(){return p(this,n),e.apply(this,arguments)}return d(n,[{key:"value",value:function(t){var e=h(k(n.prototype),"value",this).call(this,t);return e.startsWith("rgb(")?"#"+(e=e.replace(/^[^\d]+/,"").replace(/[^\d]+$/,"")).split(",").map((function(t){return("00"+parseInt(t).toString(16)).slice(-2)})).join(""):e}}]),n}(N.a.Attributor.Style),Rt=new N.a.Attributor.Class("color","ql-color",{scope:N.a.Scope.INLINE}),Pt=new Lt("color","color",{scope:N.a.Scope.INLINE}),It=new N.a.Attributor.Class("background","ql-bg",{scope:N.a.Scope.INLINE}),jt=new Lt("background","background-color",{scope:N.a.Scope.INLINE}),Ut={scope:N.a.Scope.BLOCK,whitelist:["rtl"]},Mt=new N.a.Attributor.Attribute("direction","dir",Ut),Dt=new N.a.Attributor.Class("direction","ql-direction",Ut),Ft=new N.a.Attributor.Style("direction","direction",Ut),Ht={scope:N.a.Scope.INLINE,whitelist:["serif","monospace"]},zt=new N.a.Attributor.Class("font","ql-font",Ht),Kt=new(function(t){g(n,t);var e=y(n);function n(){return p(this,n),e.apply(this,arguments)}return d(n,[{key:"value",value:function(t){return h(k(n.prototype),"value",this).call(this,t).replace(/["']/g,"")}}]),n}(N.a.Attributor.Style))("font","font-family",Ht),Yt=new N.a.Attributor.Class("size","ql-size",{scope:N.a.Scope.INLINE,whitelist:["small","large","huge"]}),Vt=new N.a.Attributor.Style("size","font-size",{scope:N.a.Scope.INLINE,whitelist:["10px","18px","32px"]}),Wt=lt("quill:clipboard"),Xt="__ql-matcher",Zt=[[Node.TEXT_NODE,function(t,e){var n=t.data;if("O:P"===t.parentNode.tagName)return e.insert(n.trim());if(0===n.trim().length&&t.parentNode.classList.contains("ql-clipboard"))return e;if(!te(t.parentNode).whiteSpace.startsWith("pre")){var r=function(t,e){return(e=e.replace(/[^\u00a0]/g,"")).length<1&&t?" ":e};n=(n=n.replace(/\r\n/g," ").replace(/\n/g," ")).replace(/\s\s+/g,r.bind(r,!0)),(null==t.previousSibling&&ne(t.parentNode)||null!=t.previousSibling&&ne(t.previousSibling))&&(n=n.replace(/^\s+/,r.bind(r,!1))),(null==t.nextSibling&&ne(t.parentNode)||null!=t.nextSibling&&ne(t.nextSibling))&&(n=n.replace(/\s+$/,r.bind(r,!1)))}return e.insert(n)}],[Node.TEXT_NODE,ie],["br",function(t,e){return ee(e,"\n")||e.insert("\n"),e}],[Node.ELEMENT_NODE,ie],[Node.ELEMENT_NODE,function(t,e){var n=N.a.query(t);if(null==n)return e;if(n.prototype instanceof N.a.Embed){var r={},i=n.value(t);null!=i&&(r[n.blotName]=i,e=(new B.a).insert(r,n.formats(t)))}else"function"==typeof n.formats&&(e=Qt(e,n.blotName,n.formats(t)));return e}],[Node.ELEMENT_NODE,oe],[Node.ELEMENT_NODE,function(t,e){var n=N.a.Attributor.Attribute.keys(t),r=N.a.Attributor.Class.keys(t),i=N.a.Attributor.Style.keys(t),o={};return n.concat(r).concat(i).forEach((function(e){var n=N.a.query(e,N.a.Scope.ATTRIBUTE);null!=n&&(o[n.attrName]=n.value(t),o[n.attrName])||(null==(n=Gt[e])||n.attrName!==e&&n.keyName!==e||(o[n.attrName]=n.value(t)||void 0),null==(n=$t[e])||n.attrName!==e&&n.keyName!==e||(n=$t[e],o[n.attrName]=n.value(t)||void 0))})),Object.keys(o).length>0&&(e=Qt(e,o)),e}],[Node.ELEMENT_NODE,function(t,e){var n={},r=t.style||{};return r.fontStyle&&"italic"===te(t).fontStyle&&(n.italic=!0),r.fontWeight&&(te(t).fontWeight.startsWith("bold")||parseInt(te(t).fontWeight)>=700)&&(n.bold=!0),Object.keys(n).length>0&&(e=Qt(e,n)),parseFloat(r.textIndent||0)>0&&(e=(new B.a).insert("\t").concat(e)),e}],["li",function(t,e){var n=N.a.query(t);if(null==n||"list-item"!==n.blotName||!ee(e,"\n"))return e;for(var r=-1,i=t.parentNode;!i.classList.contains("ql-clipboard");)"list"===(N.a.query(i)||{}).blotName&&(r+=1),i=i.parentNode;return r<=0?e:e.compose((new B.a).retain(e.length()-1).retain(1,{indent:r}))}],["b",re.bind(re,"bold")],["i",re.bind(re,"italic")],["style",function(){return new B.a}]],Gt=[Bt,Mt].reduce((function(t,e){return t[e.keyName]=e,t}),{}),$t=[Ot,jt,Pt,Ft,Kt,Vt].reduce((function(t,e){return t[e.keyName]=e,t}),{}),Jt=function(t){g(n,t);var e=y(n);function n(t,r){var i;return p(this,n),(i=e.call(this,t,r)).quill.root.addEventListener("paste",i.onPaste.bind(m(i))),i.container=i.quill.addContainer("ql-clipboard"),i.container.setAttribute("contenteditable",!0),i.container.setAttribute("tabindex",-1),i.matchers=[],Zt.concat(i.options.matchers).forEach((function(t){var e=s(t,2),n=e[0],o=e[1];(r.matchVisual||o!==oe)&&i.addMatcher(n,o)})),i}return d(n,[{key:"addMatcher",value:function(t,e){this.matchers.push([t,e])}},{key:"convert",value:function(t){if("string"==typeof t)return this.container.innerHTML=t.replace(/\>\r?\n +\<"),this.convert();var e=this.quill.getFormat(this.quill.selection.savedRange.index);if(e[K.blotName]){var n=this.container.innerText;return this.container.innerHTML="",(new B.a).insert(n,a({},K.blotName,e[K.blotName]))}var r=s(this.prepareMatching(),2),i=r[0],o=r[1],l=function t(e,n,r){return e.nodeType===e.TEXT_NODE?r.reduce((function(t,n){return n(e,t)}),new B.a):e.nodeType===e.ELEMENT_NODE?[].reduce.call(e.childNodes||[],(function(i,o){var l=t(o,n,r);return o.nodeType===e.ELEMENT_NODE&&(l=n.reduce((function(t,e){return e(o,t)}),l),l=(o[Xt]||[]).reduce((function(t,e){return e(o,t)}),l)),i.concat(l)}),new B.a):new B.a}(this.container,i,o);return ee(l,"\n")&&null==l.ops[l.ops.length-1].attributes&&(l=l.compose((new B.a).retain(l.length()-1).delete(1))),Wt.log("convert",this.container.innerHTML,l),this.container.innerHTML="",l}},{key:"dangerouslyPasteHTML",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:At.sources.API;if("string"==typeof t)this.quill.setContents(this.convert(t),e),this.quill.setSelection(0,At.sources.SILENT);else{var r=this.convert(e);this.quill.updateContents((new B.a).retain(t).concat(r),n),this.quill.setSelection(t+r.length(),At.sources.SILENT)}}},{key:"onPaste",value:function(t){var e=this;if(!t.defaultPrevented&&this.quill.isEnabled()){var n=this.quill.getSelection(),r=(new B.a).retain(n.index),i=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(At.sources.SILENT),setTimeout((function(){r=r.concat(e.convert()).delete(n.length),e.quill.updateContents(r,At.sources.USER),e.quill.setSelection(r.length()-n.length,At.sources.SILENT),e.quill.scrollingContainer.scrollTop=i,e.quill.focus()}),1)}}},{key:"prepareMatching",value:function(){var t=this,e=[],n=[];return this.matchers.forEach((function(r){var i=s(r,2),o=i[0],l=i[1];switch(o){case Node.TEXT_NODE:n.push(l);break;case Node.ELEMENT_NODE:e.push(l);break;default:[].forEach.call(t.container.querySelectorAll(o),(function(t){t[Xt]=t[Xt]||[],t[Xt].push(l)}))}})),[e,n]}}]),n}(ht);function Qt(t,e,n){return"object"==_(e)?Object.keys(e).reduce((function(t,n){return Qt(t,n,e[n])}),t):t.reduce((function(t,r){return r.attributes&&r.attributes[e]?t.push(r):t.insert(r.insert,R()({},a({},e,n),r.attributes))}),new B.a)}function te(t){return t.nodeType!==Node.ELEMENT_NODE?{}:t["__ql-computed-style"]||(t["__ql-computed-style"]=window.getComputedStyle(t))}function ee(t,e){for(var n="",r=t.ops.length-1;r>=0&&n.length-1}function re(t,e,n){return Qt(n,t,!0)}function ie(t,e){return ee(e,"\n")||(ne(t)||e.length()>0&&t.nextSibling&&ne(t.nextSibling))&&e.insert("\n"),e}function oe(t,e){if(ne(t)&&null!=t.nextElementSibling&&!ee(e,"\n\n")){var n=t.offsetHeight+parseFloat(te(t).marginTop)+parseFloat(te(t).marginBottom);t.nextElementSibling.offsetTop>t.offsetTop+1.5*n&&e.insert("\n")}return e}Jt.DEFAULTS={matchers:[],matchVisual:!0};var le=function(t){g(n,t);var e=y(n);function n(t,r){var i;return p(this,n),(i=e.call(this,t,r)).lastRecorded=0,i.ignoreChange=!1,i.clear(),i.quill.on(At.events.EDITOR_CHANGE,(function(t,e,n,r){t!==At.events.TEXT_CHANGE||i.ignoreChange||(i.options.userOnly&&r!==At.sources.USER?i.transform(e):i.record(e,n))})),i.quill.keyboard.addBinding({key:"Z",shortKey:!0},i.undo.bind(m(i))),i.quill.keyboard.addBinding({key:"Z",shortKey:!0,shiftKey:!0},i.redo.bind(m(i))),/Win/i.test(navigator.platform)&&i.quill.keyboard.addBinding({key:"Y",shortKey:!0},i.redo.bind(m(i))),i}return d(n,[{key:"change",value:function(t,e){if(0!==this.stack[t].length){var n=this.stack[t].pop();this.stack[e].push(n),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(n[t],At.sources.USER),this.ignoreChange=!1;var r=function(t){var e=t.reduce((function(t,e){return t+(e.delete||0)}),0),n=t.length()-e;return function(t){var e=t.ops[t.ops.length-1];return null!=e&&(null!=e.insert?"string"==typeof e.insert&&e.insert.endsWith("\n"):null!=e.attributes&&Object.keys(e.attributes).some((function(t){return null!=N.a.query(t,N.a.Scope.BLOCK)})))}(t)&&(n-=1),n}(n[t]);this.quill.setSelection(r)}}},{key:"clear",value:function(){this.stack={undo:[],redo:[]}}},{key:"cutoff",value:function(){this.lastRecorded=0}},{key:"record",value:function(t,e){if(0!==t.ops.length){this.stack.redo=[];var n=this.quill.getContents().diff(e),r=Date.now();if(this.lastRecorded+this.options.delay>r&&this.stack.undo.length>0){var i=this.stack.undo.pop();n=n.compose(i.undo),t=i.redo.compose(t)}else this.lastRecorded=r;this.stack.undo.push({redo:t,undo:n}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(t){this.stack.undo.forEach((function(e){e.undo=t.transform(e.undo,!0),e.redo=t.transform(e.redo,!0)})),this.stack.redo.forEach((function(e){e.undo=t.transform(e.undo,!0),e.redo=t.transform(e.redo,!0)}))}},{key:"undo",value:function(){this.change("undo","redo")}}]),n}(ht);le.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};var ae=lt("quill:keyboard"),se=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",ce=function(t){g(n,t);var e=y(n);function n(t,r){var i;return p(this,n),(i=e.call(this,t,r)).bindings={},Object.keys(i.options.bindings).forEach((function(e){("list autofill"!==e||null==t.scroll.whitelist||t.scroll.whitelist.list)&&i.options.bindings[e]&&i.addBinding(i.options.bindings[e])})),i.addBinding({key:n.keys.ENTER,shiftKey:null},pe),i.addBinding({key:n.keys.ENTER,metaKey:null,ctrlKey:null,altKey:null},(function(){})),/Firefox/i.test(navigator.userAgent)?(i.addBinding({key:n.keys.BACKSPACE},{collapsed:!0},he),i.addBinding({key:n.keys.DELETE},{collapsed:!0},fe)):(i.addBinding({key:n.keys.BACKSPACE},{collapsed:!0,prefix:/^.?$/},he),i.addBinding({key:n.keys.DELETE},{collapsed:!0,suffix:/^.?$/},fe)),i.addBinding({key:n.keys.BACKSPACE},{collapsed:!1},de),i.addBinding({key:n.keys.DELETE},{collapsed:!1},de),i.addBinding({key:n.keys.BACKSPACE,altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},he),i.listen(),i}return d(n,[{key:"addBinding",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=ve(t);if(null==r||null==r.key)return ae.warn("Attempted to add invalid keyboard binding",r);"function"==typeof e&&(e={handler:e}),"function"==typeof n&&(n={handler:n}),r=R()(r,e,n),this.bindings[r.key]=this.bindings[r.key]||[],this.bindings[r.key].push(r)}},{key:"listen",value:function(){var t=this;this.quill.root.addEventListener("keydown",(function(e){if(!e.defaultPrevented){var r=e.which||e.keyCode,i=(t.bindings[r]||[]).filter((function(t){return n.match(e,t)}));if(0!==i.length){var o=t.quill.getSelection();if(null!=o&&t.quill.hasFocus()){var l=s(t.quill.getLine(o.index),2),a=l[0],c=l[1],u=s(t.quill.getLeaf(o.index),2),h=u[0],f=u[1],d=s(0===o.length?[h,f]:t.quill.getLeaf(o.index+o.length),2),p=d[0],g=d[1],y=h instanceof N.a.Text?h.value().slice(0,f):"",v=p instanceof N.a.Text?p.value().slice(g):"",m={collapsed:0===o.length,empty:0===o.length&&a.length()<=1,format:t.quill.getFormat(o),offset:c,prefix:y,suffix:v};i.some((function(e){if(null!=e.collapsed&&e.collapsed!==m.collapsed)return!1;if(null!=e.empty&&e.empty!==m.empty)return!1;if(null!=e.offset&&e.offset!==m.offset)return!1;if(Array.isArray(e.format)){if(e.format.every((function(t){return null==m.format[t]})))return!1}else if("object"==_(e.format)&&!Object.keys(e.format).every((function(t){return!0===e.format[t]?null!=m.format[t]:!1===e.format[t]?null==m.format[t]:G()(e.format[t],m.format[t])})))return!1;return!(null!=e.prefix&&!e.prefix.test(m.prefix)||null!=e.suffix&&!e.suffix.test(m.suffix)||!0===e.handler.call(t,o,m))}))&&e.preventDefault()}}}}))}}],[{key:"match",value:function(t,e){return e=ve(e),!["altKey","ctrlKey","metaKey","shiftKey"].some((function(n){return!!e[n]!==t[n]&&null!==e[n]}))&&e.key===(t.which||t.keyCode)}}]),n}(ht);function ue(t,e){var n,r=t===ce.keys.LEFT?"prefix":"suffix";return a(n={key:t,shiftKey:e,altKey:null},r,/^$/),a(n,"handler",(function(n){var r=n.index;return t===ce.keys.RIGHT&&(r+=n.length+1),!(s(this.quill.getLeaf(r),1)[0]instanceof N.a.Embed&&(t===ce.keys.LEFT?e?this.quill.setSelection(n.index-1,n.length+1,At.sources.USER):this.quill.setSelection(n.index-1,At.sources.USER):e?this.quill.setSelection(n.index,n.length+1,At.sources.USER):this.quill.setSelection(n.index+n.length+1,At.sources.USER),1))})),n}function he(t,e){if(!(0===t.index||this.quill.getLength()<=1)){var n=s(this.quill.getLine(t.index),1)[0],r={};if(0===e.offset){var i=s(this.quill.getLine(t.index-1),1)[0];if(null!=i&&i.length()>1){var o=n.formats(),l=this.quill.getFormat(t.index-1,1);r=O.a.attributes.diff(o,l)||{}}}var a=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(e.prefix)?2:1;this.quill.deleteText(t.index-a,a,At.sources.USER),Object.keys(r).length>0&&this.quill.formatLine(t.index-a,a,r,At.sources.USER),this.quill.focus()}}function fe(t,e){var n=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(e.suffix)?2:1;if(!(t.index>=this.quill.getLength()-n)){var r={},i=0,o=s(this.quill.getLine(t.index),1)[0];if(e.offset>=o.length()-1){var l=s(this.quill.getLine(t.index+1),1)[0];if(l){var a=o.formats(),c=this.quill.getFormat(t.index,1);r=O.a.attributes.diff(a,c)||{},i=l.length()}}this.quill.deleteText(t.index,n,At.sources.USER),Object.keys(r).length>0&&this.quill.formatLine(t.index+i-1,n,r,At.sources.USER)}}function de(t){var e=this.quill.getLines(t),n={};if(e.length>1){var r=e[0].formats(),i=e[e.length-1].formats();n=O.a.attributes.diff(i,r)||{}}this.quill.deleteText(t,At.sources.USER),Object.keys(n).length>0&&this.quill.formatLine(t.index,1,n,At.sources.USER),this.quill.setSelection(t.index,At.sources.SILENT),this.quill.focus()}function pe(t,e){var n=this;t.length>0&&this.quill.scroll.deleteAt(t.index,t.length);var r=Object.keys(e.format).reduce((function(t,n){return N.a.query(n,N.a.Scope.BLOCK)&&!Array.isArray(e.format[n])&&(t[n]=e.format[n]),t}),{});this.quill.insertText(t.index,"\n",r,At.sources.USER),this.quill.setSelection(t.index+1,At.sources.SILENT),this.quill.focus(),Object.keys(e.format).forEach((function(t){null==r[t]&&(Array.isArray(e.format[t])||"link"!==t&&n.quill.format(t,e.format[t],At.sources.USER))}))}function ge(t){return{key:ce.keys.TAB,shiftKey:!t,format:{"code-block":!0},handler:function(e){var n=N.a.query("code-block"),r=e.index,i=e.length,o=s(this.quill.scroll.descendant(n,r),2),l=o[0],a=o[1];if(null!=l){var c=this.quill.getIndex(l),u=l.newlineIndex(a,!0)+1,h=l.newlineIndex(c+a+i),f=l.domNode.textContent.slice(u,h).split("\n");a=0,f.forEach((function(e,o){t?(l.insertAt(u+a,n.TAB),a+=n.TAB.length,0===o?r+=n.TAB.length:i+=n.TAB.length):e.startsWith(n.TAB)&&(l.deleteAt(u+a,n.TAB.length),a-=n.TAB.length,0===o?r-=n.TAB.length:i-=n.TAB.length),a+=e.length+1})),this.quill.update(At.sources.USER),this.quill.setSelection(r,i,At.sources.SILENT)}}}}function ye(t){return{key:t[0].toUpperCase(),shortKey:!0,handler:function(e,n){this.quill.format(t,!n.format[t],At.sources.USER)}}}function ve(t){if("string"==typeof t||"number"==typeof t)return ve({key:t});if("object"==_(t)&&(t=X()(t,!1)),"string"==typeof t.key)if(null!=ce.keys[t.key.toUpperCase()])t.key=ce.keys[t.key.toUpperCase()];else{if(1!==t.key.length)return null;t.key=t.key.toUpperCase().charCodeAt(0)}return t.shortKey&&(t[se]=t.shortKey,delete t.shortKey),t}ce.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},ce.DEFAULTS={bindings:{bold:ye("bold"),italic:ye("italic"),underline:ye("underline"),indent:{key:ce.keys.TAB,format:["blockquote","indent","list"],handler:function(t,e){if(e.collapsed&&0!==e.offset)return!0;this.quill.format("indent","+1",At.sources.USER)}},outdent:{key:ce.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(t,e){if(e.collapsed&&0!==e.offset)return!0;this.quill.format("indent","-1",At.sources.USER)}},"outdent backspace":{key:ce.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(t,e){null!=e.format.indent?this.quill.format("indent","-1",At.sources.USER):null!=e.format.list&&this.quill.format("list",!1,At.sources.USER)}},"indent code-block":ge(!0),"outdent code-block":ge(!1),"remove tab":{key:ce.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(t){this.quill.deleteText(t.index-1,1,At.sources.USER)}},tab:{key:ce.keys.TAB,handler:function(t){this.quill.history.cutoff();var e=(new B.a).retain(t.index).delete(t.length).insert("\t");this.quill.updateContents(e,At.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(t.index+1,At.sources.SILENT)}},"list empty enter":{key:ce.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(t,e){this.quill.format("list",!1,At.sources.USER),e.format.indent&&this.quill.format("indent",!1,At.sources.USER)}},"checklist enter":{key:ce.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(t){var e=s(this.quill.getLine(t.index),2),n=e[0],r=e[1],i=R()({},n.formats(),{list:"checked"}),o=(new B.a).retain(t.index).insert("\n",i).retain(n.length()-r-1).retain(1,{list:"unchecked"});this.quill.updateContents(o,At.sources.USER),this.quill.setSelection(t.index+1,At.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:ce.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(t,e){var n=s(this.quill.getLine(t.index),2),r=n[0],i=n[1],o=(new B.a).retain(t.index).insert("\n",e.format).retain(r.length()-i-1).retain(1,{header:null});this.quill.updateContents(o,At.sources.USER),this.quill.setSelection(t.index+1,At.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(t,e){var n,r=e.prefix.length,i=s(this.quill.getLine(t.index),2),o=i[0],l=i[1];if(l>r)return!0;switch(e.prefix.trim()){case"[]":case"[ ]":n="unchecked";break;case"[x]":n="checked";break;case"-":case"*":n="bullet";break;default:n="ordered"}this.quill.insertText(t.index," ",At.sources.USER),this.quill.history.cutoff();var a=(new B.a).retain(t.index-l).delete(r+1).retain(o.length()-2-l).retain(1,{list:n});this.quill.updateContents(a,At.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(t.index-r,At.sources.SILENT)}},"code exit":{key:ce.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(t){var e=s(this.quill.getLine(t.index),2),n=e[0],r=e[1],i=(new B.a).retain(t.index+n.length()-r-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(i,At.sources.USER)}},"embed left":ue(ce.keys.LEFT,!1),"embed left shift":ue(ce.keys.LEFT,!0),"embed right":ue(ce.keys.RIGHT,!1),"embed right shift":ue(ce.keys.RIGHT,!0)}},At.register({"blots/block":F,"blots/block/embed":D,"blots/break":I,"blots/container":_t,"blots/cursor":V,"blots/embed":xt,"blots/inline":M,"blots/scroll":Nt,"blots/text":j,"modules/clipboard":Jt,"modules/history":le,"modules/keyboard":ce}),N.a.register(F,I,V,M,Nt,j);var me=At,Ae=new(function(t){g(n,t);var e=y(n);function n(){return p(this,n),e.apply(this,arguments)}return d(n,[{key:"add",value:function(t,e){if("+1"===e||"-1"===e){var r=this.value(t)||0;e="+1"===e?r+1:r-1}return 0===e?(this.remove(t),!0):h(k(n.prototype),"add",this).call(this,t,e)}},{key:"canAdd",value:function(t,e){return h(k(n.prototype),"canAdd",this).call(this,t,e)||h(k(n.prototype),"canAdd",this).call(this,t,parseInt(e))}},{key:"value",value:function(t){return parseInt(h(k(n.prototype),"value",this).call(this,t))||void 0}}]),n}(N.a.Attributor.Class))("indent","ql-indent",{scope:N.a.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]}),be=function(t){g(n,t);var e=y(n);function n(){return p(this,n),e.apply(this,arguments)}return n}(F);be.blotName="blockquote",be.tagName="blockquote";var qe=be,Ee=function(t){g(n,t);var e=y(n);function n(){return p(this,n),e.apply(this,arguments)}return d(n,null,[{key:"formats",value:function(t){return this.tagName.indexOf(t.tagName)+1}}]),n}(F);Ee.blotName="header",Ee.tagName=["H1","H2","H3","H4","H5","H6"];var ke=Ee,_e=function(t){g(n,t);var e=y(n);function n(){return p(this,n),e.apply(this,arguments)}return d(n,[{key:"format",value:function(t,e){t!==xe.blotName||e?h(k(n.prototype),"format",this).call(this,t,e):this.replaceWith(N.a.create(this.statics.scope))}},{key:"remove",value:function(){null==this.prev&&null==this.next?this.parent.remove():h(k(n.prototype),"remove",this).call(this)}},{key:"replaceWith",value:function(t,e){return this.parent.isolate(this.offset(this.parent),this.length()),t===this.parent.statics.blotName?(this.parent.replaceWith(t,e),this):(this.parent.unwrap(),h(k(n.prototype),"replaceWith",this).call(this,t,e))}}],[{key:"formats",value:function(t){return t.tagName===this.tagName?void 0:h(k(n),"formats",this).call(this,t)}}]),n}(F);_e.blotName="list-item",_e.tagName="LI";var xe=function(t){g(n,t);var e=y(n);function n(t){var r;p(this,n),r=e.call(this,t);var i=function(e){if(e.target.parentNode===t){var n=r.statics.formats(t),i=N.a.find(e.target);"checked"===n?i.format("list","unchecked"):"unchecked"===n&&i.format("list","checked")}};return t.addEventListener("touchstart",i),t.addEventListener("mousedown",i),r}return d(n,[{key:"format",value:function(t,e){this.children.length>0&&this.children.tail.format(t,e)}},{key:"formats",value:function(){return a({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(t,e){if(t instanceof _e)h(k(n.prototype),"insertBefore",this).call(this,t,e);else{var r=null==e?this.length():e.offset(this),i=this.split(r);i.parent.insertBefore(t,i)}}},{key:"optimize",value:function(t){h(k(n.prototype),"optimize",this).call(this,t);var e=this.next;null!=e&&e.prev===this&&e.statics.blotName===this.statics.blotName&&e.domNode.tagName===this.domNode.tagName&&e.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(e.moveChildren(this),e.remove())}},{key:"replace",value:function(t){if(t.statics.blotName!==this.statics.blotName){var e=N.a.create(this.statics.defaultChild);t.moveChildren(e),this.appendChild(e)}h(k(n.prototype),"replace",this).call(this,t)}}],[{key:"create",value:function(t){var e="ordered"===t?"OL":"UL",r=h(k(n),"create",this).call(this,e);return"checked"!==t&&"unchecked"!==t||r.setAttribute("data-checked","checked"===t),r}},{key:"formats",value:function(t){return"OL"===t.tagName?"ordered":"UL"===t.tagName?t.hasAttribute("data-checked")?"true"===t.getAttribute("data-checked")?"checked":"unchecked":"bullet":void 0}}]),n}(_t);xe.blotName="list",xe.scope=N.a.Scope.BLOCK_BLOT,xe.tagName=["OL","UL"],xe.defaultChild="list-item",xe.allowedChildren=[_e];var Ce=function(t){g(n,t);var e=y(n);function n(){return p(this,n),e.apply(this,arguments)}return d(n,[{key:"optimize",value:function(t){h(k(n.prototype),"optimize",this).call(this,t),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:"create",value:function(){return h(k(n),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),n}(M);Ce.blotName="bold",Ce.tagName=["STRONG","B"];var we=Ce,Ne=function(t){g(n,t);var e=y(n);function n(){return p(this,n),e.apply(this,arguments)}return n}(we);Ne.blotName="italic",Ne.tagName=["EM","I"];var Se=Ne,Be=function(t){g(n,t);var e=y(n);function n(){return p(this,n),e.apply(this,arguments)}return d(n,[{key:"format",value:function(t,e){if(t!==this.statics.blotName||!e)return h(k(n.prototype),"format",this).call(this,t,e);e=this.constructor.sanitize(e),this.domNode.setAttribute("href",e)}}],[{key:"create",value:function(t){var e=h(k(n),"create",this).call(this,t);return t=this.sanitize(t),e.setAttribute("href",t),e.setAttribute("rel","noopener noreferrer"),e.setAttribute("target","_blank"),e}},{key:"formats",value:function(t){return t.getAttribute("href")}},{key:"sanitize",value:function(t){return Te(t,this.PROTOCOL_WHITELIST)?t:this.SANITIZED_URL}}]),n}(M);function Te(t,e){var n=document.createElement("a");n.href=t;var r=n.href.slice(0,n.href.indexOf(":"));return e.indexOf(r)>-1}Be.blotName="link",Be.tagName="A",Be.SANITIZED_URL="about:blank",Be.PROTOCOL_WHITELIST=["http","https","mailto","tel"];var Oe=function(t){g(n,t);var e=y(n);function n(){return p(this,n),e.apply(this,arguments)}return d(n,null,[{key:"create",value:function(t){return"super"===t?document.createElement("sup"):"sub"===t?document.createElement("sub"):h(k(n),"create",this).call(this,t)}},{key:"formats",value:function(t){return"SUB"===t.tagName?"sub":"SUP"===t.tagName?"super":void 0}}]),n}(M);Oe.blotName="script",Oe.tagName=["SUB","SUP"];var Le=Oe,Re=function(t){g(n,t);var e=y(n);function n(){return p(this,n),e.apply(this,arguments)}return n}(M);Re.blotName="strike",Re.tagName="S";var Pe=Re,Ie=function(t){g(n,t);var e=y(n);function n(){return p(this,n),e.apply(this,arguments)}return n}(M);Ie.blotName="underline",Ie.tagName="U";var je=Ie,Ue=["alt","height","width"],Me=function(t){g(n,t);var e=y(n);function n(){return p(this,n),e.apply(this,arguments)}return d(n,[{key:"format",value:function(t,e){Ue.indexOf(t)>-1?e?this.domNode.setAttribute(t,e):this.domNode.removeAttribute(t):h(k(n.prototype),"format",this).call(this,t,e)}}],[{key:"create",value:function(t){var e=h(k(n),"create",this).call(this,t);return"string"==typeof t&&e.setAttribute("src",this.sanitize(t)),e}},{key:"formats",value:function(t){return Ue.reduce((function(e,n){return t.hasAttribute(n)&&(e[n]=t.getAttribute(n)),e}),{})}},{key:"match",value:function(t){return/\.(jpe?g|gif|png)$/.test(t)||/^data:image\/.+;base64/.test(t)}},{key:"sanitize",value:function(t){return Te(t,["http","https","data"])?t:"//:0"}},{key:"value",value:function(t){return t.getAttribute("src")}}]),n}(N.a.Embed);Me.blotName="image",Me.tagName="IMG";var De=Me,Fe=["height","width"],He=function(t){g(n,t);var e=y(n);function n(){return p(this,n),e.apply(this,arguments)}return d(n,[{key:"format",value:function(t,e){Fe.indexOf(t)>-1?e?this.domNode.setAttribute(t,e):this.domNode.removeAttribute(t):h(k(n.prototype),"format",this).call(this,t,e)}}],[{key:"create",value:function(t){var e=h(k(n),"create",this).call(this,t);return e.setAttribute("frameborder","0"),e.setAttribute("allowfullscreen",!0),e.setAttribute("src",this.sanitize(t)),e}},{key:"formats",value:function(t){return Fe.reduce((function(e,n){return t.hasAttribute(n)&&(e[n]=t.getAttribute(n)),e}),{})}},{key:"sanitize",value:function(t){return Be.sanitize(t)}},{key:"value",value:function(t){return t.getAttribute("src")}}]),n}(D);He.blotName="video",He.className="ql-video",He.tagName="IFRAME";var ze=He,Ke=function(t){g(n,t);var e=y(n);function n(){return p(this,n),e.apply(this,arguments)}return d(n,null,[{key:"create",value:function(t){var e=h(k(n),"create",this).call(this,t);return"string"==typeof t&&(window.katex.render(t,e,{throwOnError:!1,errorColor:"#f00"}),e.setAttribute("data-value",t)),e}},{key:"value",value:function(t){return t.getAttribute("data-value")}}]),n}(xt);Ke.blotName="formula",Ke.className="ql-formula",Ke.tagName="SPAN";var Ye=function(t){g(n,t);var e=y(n);function n(){return p(this,n),e.apply(this,arguments)}return d(n,[{key:"replaceWith",value:function(t){this.domNode.textContent=this.domNode.textContent,this.attach(),h(k(n.prototype),"replaceWith",this).call(this,t)}},{key:"highlight",value:function(t){var e=this.domNode.textContent;this.cachedText!==e&&((e.trim().length>0||null==this.cachedText)&&(this.domNode.innerHTML=t(e),this.domNode.normalize(),this.attach()),this.cachedText=e)}}]),n}(K);Ye.className="ql-syntax";var Ve=new N.a.Attributor.Class("token","hljs",{scope:N.a.Scope.INLINE}),We=function(t){g(n,t);var e=y(n);function n(t,r){var i;if(p(this,n),"function"!=typeof(i=e.call(this,t,r)).options.highlight)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var o=null;return i.quill.on(At.events.SCROLL_OPTIMIZE,(function(){clearTimeout(o),o=setTimeout((function(){i.highlight(),o=null}),i.options.interval)})),i.highlight(),v(i)}return d(n,[{key:"highlight",value:function(){var t=this;if(!this.quill.selection.composing){this.quill.update(At.sources.USER);var e=this.quill.getSelection();this.quill.scroll.descendants(Ye).forEach((function(e){e.highlight(t.options.highlight)})),this.quill.update(At.sources.SILENT),null!=e&&this.quill.setSelection(e,At.sources.SILENT)}}}],[{key:"register",value:function(){At.register(Ve,!0),At.register(Ye,!0)}}]),n}(ht);We.DEFAULTS={highlight:null==window.hljs?null:function(t){return window.hljs.highlightAuto(t).value},interval:1e3};var Xe=lt("quill:toolbar"),Ze=function(t){g(n,t);var e=y(n);function n(t,r){var i;if(p(this,n),i=e.call(this,t,r),Array.isArray(i.options.container)){var o=document.createElement("div");!function(t,e){Array.isArray(e[0])||(e=[e]),e.forEach((function(e){var n=document.createElement("span");n.classList.add("ql-formats"),e.forEach((function(t){if("string"==typeof t)Ge(n,t);else{var e=Object.keys(t)[0],r=t[e];Array.isArray(r)?function(t,e,n){var r=document.createElement("select");r.classList.add("ql-"+e),n.forEach((function(t){var e=document.createElement("option");!1!==t?e.setAttribute("value",t):e.setAttribute("selected","selected"),r.appendChild(e)})),t.appendChild(r)}(n,e,r):Ge(n,e,r)}})),t.appendChild(n)}))}(o,i.options.container),t.container.parentNode.insertBefore(o,t.container),i.container=o}else"string"==typeof i.options.container?i.container=document.querySelector(i.options.container):i.container=i.options.container;return i.container instanceof HTMLElement?(i.container.classList.add("ql-toolbar"),i.controls=[],i.handlers={},Object.keys(i.options.handlers).forEach((function(t){i.addHandler(t,i.options.handlers[t])})),[].forEach.call(i.container.querySelectorAll("button, select"),(function(t){i.attach(t)})),i.quill.on(At.events.EDITOR_CHANGE,(function(t,e){t===At.events.SELECTION_CHANGE&&i.update(e)})),i.quill.on(At.events.SCROLL_OPTIMIZE,(function(){var t=s(i.quill.selection.getRange(),1)[0];i.update(t)})),v(i)):v(i,Xe.error("Container required for toolbar",i.options))}return d(n,[{key:"addHandler",value:function(t,e){this.handlers[t]=e}},{key:"attach",value:function(t){var e=this,n=[].find.call(t.classList,(function(t){return 0===t.indexOf("ql-")}));if(n){if(n=n.slice("ql-".length),"BUTTON"===t.tagName&&t.setAttribute("type","button"),null==this.handlers[n]){if(null!=this.quill.scroll.whitelist&&null==this.quill.scroll.whitelist[n])return void Xe.warn("ignoring attaching to disabled format",n,t);if(null==N.a.query(n))return void Xe.warn("ignoring attaching to nonexistent format",n,t)}var r="SELECT"===t.tagName?"change":"click";t.addEventListener(r,(function(r){var i;if("SELECT"===t.tagName){if(t.selectedIndex<0)return;var o=t.options[t.selectedIndex];i=!o.hasAttribute("selected")&&(o.value||!1)}else i=!t.classList.contains("ql-active")&&(t.value||!t.hasAttribute("value")),r.preventDefault();e.quill.focus();var l=s(e.quill.selection.getRange(),1)[0];if(null!=e.handlers[n])e.handlers[n].call(e,i);else if(N.a.query(n).prototype instanceof N.a.Embed){if(!(i=prompt("Enter "+n)))return;e.quill.updateContents((new B.a).retain(l.index).delete(l.length).insert(a({},n,i)),At.sources.USER)}else e.quill.format(n,i,At.sources.USER);e.update(l)})),this.controls.push([n,t])}}},{key:"update",value:function(t){var e=null==t?{}:this.quill.getFormat(t);this.controls.forEach((function(n){var r=s(n,2),i=r[0],o=r[1];if("SELECT"===o.tagName){var l;if(null==t)l=null;else if(null==e[i])l=o.querySelector("option[selected]");else if(!Array.isArray(e[i])){var a=e[i];"string"==typeof a&&(a=a.replace(/\"/g,'\\"')),l=o.querySelector('option[value="'.concat(a,'"]'))}null==l?(o.value="",o.selectedIndex=-1):l.selected=!0}else if(null==t)o.classList.remove("ql-active");else if(o.hasAttribute("value")){var c=e[i]===o.getAttribute("value")||null!=e[i]&&e[i].toString()===o.getAttribute("value")||null==e[i]&&!o.getAttribute("value");o.classList.toggle("ql-active",c)}else o.classList.toggle("ql-active",null!=e[i])}))}}]),n}(ht);function Ge(t,e,n){var r=document.createElement("button");r.setAttribute("type","button"),r.classList.add("ql-"+e),null!=n&&(r.value=n),t.appendChild(r)}Ze.DEFAULTS={},Ze.DEFAULTS={container:null,handlers:{clean:function(){var t=this,e=this.quill.getSelection();if(null!=e)if(0==e.length){var n=this.quill.getFormat();Object.keys(n).forEach((function(e){null!=N.a.query(e,N.a.Scope.INLINE)&&t.quill.format(e,!1)}))}else this.quill.removeFormat(e,At.sources.USER)},direction:function(t){var e=this.quill.getFormat().align;"rtl"===t&&null==e?this.quill.format("align","right",At.sources.USER):t||"right"!==e||this.quill.format("align",!1,At.sources.USER),this.quill.format("direction",t,At.sources.USER)},indent:function(t){var e=this.quill.getSelection(),n=this.quill.getFormat(e),r=parseInt(n.indent||0);if("+1"===t||"-1"===t){var i="+1"===t?1:-1;"rtl"===n.direction&&(i*=-1),this.quill.format("indent",r+i,At.sources.USER)}},link:function(t){!0===t&&(t=prompt("Enter link URL:")),this.quill.format("link",t,At.sources.USER)},list:function(t){var e=this.quill.getSelection(),n=this.quill.getFormat(e);"check"===t?"checked"===n.list||"unchecked"===n.list?this.quill.format("list",!1,At.sources.USER):this.quill.format("list","unchecked",At.sources.USER):this.quill.format("list",t,At.sources.USER)}}};var $e=n(6),Je=n.n($e),Qe=n(38),tn=n.n(Qe),en=0;function nn(t,e){t.setAttribute(e,!("true"===t.getAttribute(e)))}var rn=function(){function t(e){var n=this;p(this,t),this.select=e,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",(function(){n.togglePicker()})),this.label.addEventListener("keydown",(function(t){switch(t.keyCode){case ce.keys.ENTER:n.togglePicker();break;case ce.keys.ESCAPE:n.escape(),t.preventDefault()}})),this.select.addEventListener("change",this.update.bind(this))}return d(t,[{key:"togglePicker",value:function(){this.container.classList.toggle("ql-expanded"),nn(this.label,"aria-expanded"),nn(this.options,"aria-hidden")}},{key:"buildItem",value:function(t){var e=this,n=document.createElement("span");return n.tabIndex="0",n.setAttribute("role","button"),n.classList.add("ql-picker-item"),t.hasAttribute("value")&&n.setAttribute("data-value",t.getAttribute("value")),t.textContent&&n.setAttribute("data-label",t.textContent),n.addEventListener("click",(function(){e.selectItem(n,!0)})),n.addEventListener("keydown",(function(t){switch(t.keyCode){case ce.keys.ENTER:e.selectItem(n,!0),t.preventDefault();break;case ce.keys.ESCAPE:e.escape(),t.preventDefault()}})),n}},{key:"buildLabel",value:function(){var t=document.createElement("span");return t.classList.add("ql-picker-label"),t.innerHTML=tn.a,t.tabIndex="0",t.setAttribute("role","button"),t.setAttribute("aria-expanded","false"),this.container.appendChild(t),t}},{key:"buildOptions",value:function(){var t=this,e=document.createElement("span");e.classList.add("ql-picker-options"),e.setAttribute("aria-hidden","true"),e.tabIndex="-1",e.id="ql-picker-options-"+en,en+=1,this.label.setAttribute("aria-controls",e.id),this.options=e,[].slice.call(this.select.options).forEach((function(n){var r=t.buildItem(n);e.appendChild(r),!0===n.selected&&t.selectItem(r)})),this.container.appendChild(e)}},{key:"buildPicker",value:function(){var t=this;[].slice.call(this.select.attributes).forEach((function(e){t.container.setAttribute(e.name,e.value)})),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}},{key:"escape",value:function(){var t=this;this.close(),setTimeout((function(){return t.label.focus()}),1)}},{key:"close",value:function(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}},{key:"selectItem",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.container.querySelector(".ql-selected");if(t!==n&&(null!=n&&n.classList.remove("ql-selected"),null!=t&&(t.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(t.parentNode.children,t),t.hasAttribute("data-value")?this.label.setAttribute("data-value",t.getAttribute("data-value")):this.label.removeAttribute("data-value"),t.hasAttribute("data-label")?this.label.setAttribute("data-label",t.getAttribute("data-label")):this.label.removeAttribute("data-label"),e))){if("function"==typeof Event)this.select.dispatchEvent(new Event("change"));else if("object"==("undefined"==typeof Event?"undefined":_(Event))){var r=document.createEvent("Event");r.initEvent("change",!0,!0),this.select.dispatchEvent(r)}this.close()}}},{key:"update",value:function(){var t;if(this.select.selectedIndex>-1){var e=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];t=this.select.options[this.select.selectedIndex],this.selectItem(e)}else this.selectItem(null);var n=null!=t&&t!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",n)}}]),t}(),on=function(t){g(n,t);var e=y(n);function n(t,r){var i;return p(this,n),(i=e.call(this,t)).label.innerHTML=r,i.container.classList.add("ql-color-picker"),[].slice.call(i.container.querySelectorAll(".ql-picker-item"),0,7).forEach((function(t){t.classList.add("ql-primary")})),i}return d(n,[{key:"buildItem",value:function(t){var e=h(k(n.prototype),"buildItem",this).call(this,t);return e.style.backgroundColor=t.getAttribute("value")||"",e}},{key:"selectItem",value:function(t,e){h(k(n.prototype),"selectItem",this).call(this,t,e);var r=this.label.querySelector(".ql-color-label"),i=t&&t.getAttribute("data-value")||"";r&&("line"===r.tagName?r.style.stroke=i:r.style.fill=i)}}]),n}(rn),ln=function(t){g(n,t);var e=y(n);function n(t,r){var i;return p(this,n),(i=e.call(this,t)).container.classList.add("ql-icon-picker"),[].forEach.call(i.container.querySelectorAll(".ql-picker-item"),(function(t){t.innerHTML=r[t.getAttribute("data-value")||""]})),i.defaultItem=i.container.querySelector(".ql-selected"),i.selectItem(i.defaultItem),i}return d(n,[{key:"selectItem",value:function(t,e){h(k(n.prototype),"selectItem",this).call(this,t,e),t=t||this.defaultItem,this.label.innerHTML=t.innerHTML}}]),n}(rn),an=function(){function t(e,n){var r=this;p(this,t),this.quill=e,this.boundsContainer=n||document.body,this.root=e.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,this.quill.root===this.quill.scrollingContainer&&this.quill.root.addEventListener("scroll",(function(){r.root.style.marginTop=-1*r.quill.root.scrollTop+"px"})),this.hide()}return d(t,[{key:"hide",value:function(){this.root.classList.add("ql-hidden")}},{key:"position",value:function(t){var e=t.left+t.width/2-this.root.offsetWidth/2,n=t.bottom+this.quill.root.scrollTop;this.root.style.left=e+"px",this.root.style.top=n+"px",this.root.classList.remove("ql-flip");var r=this.boundsContainer.getBoundingClientRect(),i=this.root.getBoundingClientRect(),o=0;if(i.right>r.right&&(o=r.right-i.right,this.root.style.left=e+o+"px"),i.leftr.bottom){var l=i.bottom-i.top,a=t.bottom-t.top+l;this.root.style.top=n-a+"px",this.root.classList.add("ql-flip")}return o}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),t}(),sn=[!1,"center","right","justify"],cn=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],un=[!1,"serif","monospace"],hn=["1","2","3",!1],fn=["small",!1,"large","huge"],dn=function(t){g(n,t);var e=y(n);function n(t,r){var i;return p(this,n),i=e.call(this,t,r),t.emitter.listenDOM("click",document.body,(function e(n){if(!document.body.contains(t.root))return document.body.removeEventListener("click",e);null==i.tooltip||i.tooltip.root.contains(n.target)||document.activeElement===i.tooltip.textbox||i.quill.hasFocus()||i.tooltip.hide(),null!=i.pickers&&i.pickers.forEach((function(t){t.container.contains(n.target)||t.close()}))})),i}return d(n,[{key:"addModule",value:function(t){var e=h(k(n.prototype),"addModule",this).call(this,t);return"toolbar"===t&&this.extendToolbar(e),e}},{key:"buildButtons",value:function(t,e){t.forEach((function(t){(t.getAttribute("class")||"").split(/\s+/).forEach((function(n){if(n.startsWith("ql-")&&(n=n.slice("ql-".length),null!=e[n]))if("direction"===n)t.innerHTML=e[n][""]+e[n].rtl;else if("string"==typeof e[n])t.innerHTML=e[n];else{var r=t.value||"";null!=r&&e[n][r]&&(t.innerHTML=e[n][r])}}))}))}},{key:"buildPickers",value:function(t,e){var n=this;this.pickers=t.map((function(t){if(t.classList.contains("ql-align"))return null==t.querySelector("option")&&gn(t,sn),new ln(t,e.align);if(t.classList.contains("ql-background")||t.classList.contains("ql-color")){var n=t.classList.contains("ql-background")?"background":"color";return null==t.querySelector("option")&&gn(t,cn,"background"===n?"#ffffff":"#000000"),new on(t,e[n])}return null==t.querySelector("option")&&(t.classList.contains("ql-font")?gn(t,un):t.classList.contains("ql-header")?gn(t,hn):t.classList.contains("ql-size")&&gn(t,fn)),new rn(t)})),this.quill.on(ct.events.EDITOR_CHANGE,(function(){n.pickers.forEach((function(t){t.update()}))}))}}]),n}(vt);dn.DEFAULTS=R()(!0,{},vt.DEFAULTS,{modules:{toolbar:{handlers:{formula:function(){this.quill.theme.tooltip.edit("formula")},image:function(){var t=this,e=this.container.querySelector("input.ql-image[type=file]");null==e&&((e=document.createElement("input")).setAttribute("type","file"),e.setAttribute("accept","image/png, image/gif, image/jpeg, image/bmp, image/x-icon"),e.classList.add("ql-image"),e.addEventListener("change",(function(){if(null!=e.files&&null!=e.files[0]){var n=new FileReader;n.onload=function(n){var r=t.quill.getSelection(!0);t.quill.updateContents((new B.a).retain(r.index).delete(r.length).insert({image:n.target.result}),ct.sources.USER),t.quill.setSelection(r.index+1,ct.sources.SILENT),e.value=""},n.readAsDataURL(e.files[0])}})),this.container.appendChild(e)),e.click()},video:function(){this.quill.theme.tooltip.edit("video")}}}}});var pn=function(t){g(n,t);var e=y(n);function n(t,r){var i;return p(this,n),(i=e.call(this,t,r)).textbox=i.root.querySelector('input[type="text"]'),i.listen(),i}return d(n,[{key:"listen",value:function(){var t=this;this.textbox.addEventListener("keydown",(function(e){ce.match(e,"enter")?(t.save(),e.preventDefault()):ce.match(e,"escape")&&(t.cancel(),e.preventDefault())}))}},{key:"cancel",value:function(){this.hide()}},{key:"edit",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"link",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),null!=e?this.textbox.value=e:t!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+t)||""),this.root.setAttribute("data-mode",t)}},{key:"restoreFocus",value:function(){var t=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=t}},{key:"save",value:function(){var t=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":var e=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",t,ct.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",t,ct.sources.USER)),this.quill.root.scrollTop=e;break;case"video":t=function(t){var e=t.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||t.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return e?(e[1]||"https")+"://www.youtube.com/embed/"+e[2]+"?showinfo=0":(e=t.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(e[1]||"https")+"://player.vimeo.com/video/"+e[2]+"/":t}(t);case"formula":if(!t)break;var n=this.quill.getSelection(!0);if(null!=n){var r=n.index+n.length;this.quill.insertEmbed(r,this.root.getAttribute("data-mode"),t,ct.sources.USER),"formula"===this.root.getAttribute("data-mode")&&this.quill.insertText(r+1," ",ct.sources.USER),this.quill.setSelection(r+2,ct.sources.USER)}}this.textbox.value="",this.hide()}}]),n}(an);function gn(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];e.forEach((function(e){var r=document.createElement("option");e===n?r.setAttribute("selected","selected"):r.setAttribute("value",e),t.appendChild(r)}))}var yn=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],vn=function(t){g(n,t);var e=y(n);function n(t,r){var i;return p(this,n),null!=r.modules.toolbar&&null==r.modules.toolbar.container&&(r.modules.toolbar.container=yn),(i=e.call(this,t,r)).quill.container.classList.add("ql-bubble"),i}return d(n,[{key:"extendToolbar",value:function(t){this.tooltip=new mn(this.quill,this.options.bounds),this.tooltip.root.appendChild(t.container),this.buildButtons([].slice.call(t.container.querySelectorAll("button")),Je.a),this.buildPickers([].slice.call(t.container.querySelectorAll("select")),Je.a)}}]),n}(dn);vn.DEFAULTS=R()(!0,{},dn.DEFAULTS,{modules:{toolbar:{handlers:{link:function(t){t?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var mn=function(t){g(n,t);var e=y(n);function n(t,r){var i;return p(this,n),(i=e.call(this,t,r)).quill.on(ct.events.EDITOR_CHANGE,(function(t,e,n,r){if(t===ct.events.SELECTION_CHANGE)if(null!=e&&e.length>0&&r===ct.sources.USER){i.show(),i.root.style.left="0px",i.root.style.width="",i.root.style.width=i.root.offsetWidth+"px";var o=i.quill.getLines(e.index,e.length);if(1===o.length)i.position(i.quill.getBounds(e));else{var l=o[o.length-1],a=i.quill.getIndex(l),s=Math.min(l.length()-1,e.index+e.length-a),c=i.quill.getBounds(new dt(a,s));i.position(c)}}else document.activeElement!==i.textbox&&i.quill.hasFocus()&&i.hide()})),i}return d(n,[{key:"listen",value:function(){var t=this;h(k(n.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",(function(){t.root.classList.remove("ql-editing")})),this.quill.on(ct.events.SCROLL_OPTIMIZE,(function(){setTimeout((function(){if(!t.root.classList.contains("ql-hidden")){var e=t.quill.getSelection();null!=e&&t.position(t.quill.getBounds(e))}}),1)}))}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(t){var e=h(k(n.prototype),"position",this).call(this,t),r=this.root.querySelector(".ql-tooltip-arrow");if(r.style.marginLeft="",0===e)return e;r.style.marginLeft=-1*e-r.offsetWidth/2+"px"}}]),n}(pn);mn.TEMPLATE=['','
    ','','',"
    "].join("");var An=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],bn=function(t){g(n,t);var e=y(n);function n(t,r){var i;return p(this,n),null!=r.modules.toolbar&&null==r.modules.toolbar.container&&(r.modules.toolbar.container=An),(i=e.call(this,t,r)).quill.container.classList.add("ql-snow"),i}return d(n,[{key:"extendToolbar",value:function(t){t.container.classList.add("ql-snow"),this.buildButtons([].slice.call(t.container.querySelectorAll("button")),Je.a),this.buildPickers([].slice.call(t.container.querySelectorAll("select")),Je.a),this.tooltip=new qn(this.quill,this.options.bounds),t.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},(function(e,n){t.handlers.link.call(t,!n.format.link)}))}}]),n}(dn);bn.DEFAULTS=R()(!0,{},dn.DEFAULTS,{modules:{toolbar:{handlers:{link:function(t){if(t){var e=this.quill.getSelection();if(null==e||0==e.length)return;var n=this.quill.getText(e);/^\S+@\S+\.\S+$/.test(n)&&0!==n.indexOf("mailto:")&&(n="mailto:"+n),this.quill.theme.tooltip.edit("link",n)}else this.quill.format("link",!1)}}}}});var qn=function(t){g(n,t);var e=y(n);function n(t,r){var i;return p(this,n),(i=e.call(this,t,r)).preview=i.root.querySelector("a.ql-preview"),i}return d(n,[{key:"listen",value:function(){var t=this;h(k(n.prototype),"listen",this).call(this),this.root.querySelector("a.ql-action").addEventListener("click",(function(e){t.root.classList.contains("ql-editing")?t.save():t.edit("link",t.preview.textContent),e.preventDefault()})),this.root.querySelector("a.ql-remove").addEventListener("click",(function(e){if(null!=t.linkRange){var n=t.linkRange;t.restoreFocus(),t.quill.formatText(n,"link",!1,ct.sources.USER),delete t.linkRange}e.preventDefault(),t.hide()})),this.quill.on(ct.events.SELECTION_CHANGE,(function(e,n,r){if(null!=e){if(0===e.length&&r===ct.sources.USER){var i=s(t.quill.scroll.descendant(Be,e.index),2),o=i[0],l=i[1];if(null!=o){t.linkRange=new dt(e.index-l,o.length());var a=Be.formats(o.domNode);return t.preview.textContent=a,t.preview.setAttribute("href",a),t.show(),void t.position(t.quill.getBounds(t.linkRange))}}else delete t.linkRange;t.hide()}}))}},{key:"show",value:function(){h(k(n.prototype),"show",this).call(this),this.root.removeAttribute("data-mode")}}]),n}(pn);qn.TEMPLATE=['','','',''].join("");var En=bn;me.register({"attributors/attribute/direction":Mt,"attributors/class/align":Tt,"attributors/class/background":It,"attributors/class/color":Rt,"attributors/class/direction":Dt,"attributors/class/font":zt,"attributors/class/size":Yt,"attributors/style/align":Ot,"attributors/style/background":jt,"attributors/style/color":Pt,"attributors/style/direction":Ft,"attributors/style/font":Kt,"attributors/style/size":Vt},!0),me.register({"formats/align":Tt,"formats/direction":Dt,"formats/indent":Ae,"formats/background":jt,"formats/color":Pt,"formats/font":zt,"formats/size":Yt,"formats/blockquote":qe,"formats/code-block":K,"formats/header":ke,"formats/list":xe,"formats/bold":we,"formats/code":z,"formats/italic":Se,"formats/link":Be,"formats/script":Le,"formats/strike":Pe,"formats/underline":je,"formats/image":De,"formats/video":ze,"formats/list/item":_e,"modules/formula":function(t){g(n,t);var e=y(n);function n(){var t;if(p(this,n),t=e.call(this),null==window.katex)throw new Error("Formula module requires KaTeX.");return v(t)}return d(n,null,[{key:"register",value:function(){At.register(Ke,!0)}}]),n}(ht),"modules/syntax":We,"modules/toolbar":Ze,"themes/bubble":vn,"themes/snow":En,"ui/icons":Je.a,"ui/picker":rn,"ui/icon-picker":ln,"ui/color-picker":on,"ui/tooltip":an},!0);var kn=me;n(101);var _n=function(t){var e=_(t);return null!=t&&("object"==e||"function"==e)},xn=n(40),Cn="object"==("undefined"==typeof self?"undefined":_(self))&&self&&self.Object===Object&&self,wn=xn.a||Cn||Function("return this")(),Nn=function(){return wn.Date.now()},Sn=/\s/,Bn=/^\s+/,Tn=function(t){return t?t.slice(0,function(t){for(var e=t.length;e--&&Sn.test(t.charAt(e)););return e}(t)+1).replace(Bn,""):t},On=wn.Symbol,Ln=Object.prototype,Rn=Ln.hasOwnProperty,Pn=Ln.toString,In=On?On.toStringTag:void 0,jn=Object.prototype.toString,Un=On?On.toStringTag:void 0,Mn=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Un&&Un in Object(t)?function(t){var e=Rn.call(t,In),n=t[In];try{t[In]=void 0;var r=!0}catch(t){}var i=Pn.call(t);return r&&(e?t[In]=n:delete t[In]),i}(t):function(t){return jn.call(t)}(t)},Dn=function(t){return"symbol"==_(t)||function(t){return null!=t&&"object"==_(t)}(t)&&"[object Symbol]"==Mn(t)},Fn=/^[-+]0x[0-9a-f]+$/i,Hn=/^0b[01]+$/i,zn=/^0o[0-7]+$/i,Kn=parseInt,Yn=function(t){if("number"==typeof t)return t;if(Dn(t))return NaN;if(_n(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=_n(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Tn(t);var n=Hn.test(t);return n||zn.test(t)?Kn(t.slice(2),n?2:8):Fn.test(t)?NaN:+t},Vn=Math.max,Wn=Math.min,Xn={dna:"AGTCN ",protein:"ACDEFGHIKLMNPQRSTVWY "},Zn=function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:50,r=t.trim(),i="",o=0;o0&&o%n==0&&(i="".concat(i.trim(),"\n")),i+="".concat(r.slice(o,o+e)," ");return i.trim()},Gn=function(t,e){var n=Object.keys(e).map(Number);if(!n.length)return t;var r="",i=0;return t.split("\n").forEach((function(t){r+="".concat(t,"\n");var o=t.replace(/\s/g,"").length;n.filter((function(t){return i1&&void 0!==arguments[1]?arguments[1]:Xn.protein,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=arguments.length>5&&void 0!==arguments[5]&&arguments[5],l=arguments.length>6&&void 0!==arguments[6]?arguments[6]:Zn,a=[],s=-1;return t.trim().startsWith(">")||(a.push({header:o?"":"Generated Header [".concat(Math.round(1e4*Math.random()),"]"),sequence:"",comments:{}}),s=0),t.trim().split("\n").forEach((function(t){if(t.startsWith(">"))a.push({header:t.slice(1).trim(),sequence:"",comments:{}}),s++;else if(t.startsWith(";")){if(!r){var i=a[s].sequence.length;i in a[s].comments||(a[s].comments[i]=""),a[s].comments[i]+=" ".concat(t.slice(1).trim())}}else a[s].sequence+=t.trim().replace(/\s/g,"").replace(new RegExp("([^".concat(e,"])"),n?"g":"ig"),"")})),(i?a.slice(0,1):a).map((function(t){var e=t.header,n=t.sequence,r=t.comments;return"".concat(e?"> ".concat(e,"\n"):"").concat(Gn(l(n),r))})).join("\n\n")},Jn=function(t,e,n){return null!==e&&e1&&void 0!==arguments[1]&&arguments[1],n=t.getText().trim();if(e||er.trim()!==n.trim()){er=n,t.removeFormat(0,n.length);var r=0,i=0,o=!1,l=0,a=!1,s=!t["disable-header-check"]&&!n.trim().startsWith(">"),c=null;n.split("\n").forEach((function(e){if(e.startsWith(">"))t.formatText(r,e.length,"bold",!0),0!==r&&Jn(t,l,r)&&(a=!0),l=0,i++,(s&&1===i||2===i)&&(c=r);else if(t["allow-comments"]&&e.startsWith(";"))t.formatText(r,e.length,"color","rgb(173, 198, 255)");else{l+=e.replace(/\s/g,"").length;var n=0;e.split(new RegExp("([^".concat(t.alphabet,"])"),t["case-sensitive"]?"":"i")).forEach((function(e,i){i%2==1&&(t.formatText(r+n,e.length,{color:"rgb(255, 0, 0)",background:"rgba(255, 0, 0, 0.5)",bold:!0}),o=!0),n+=e.length}))}r+=e.length+1})),Jn(t,l,r)&&(a=!0);var u={multipleSequences:i>1,hasInvalidCharacters:o,missingFirstHeader:s,tooShort:a,headerCheckRequiredForMultipleSequences:t["disable-header-check"]&&!t.single};t.single&&u.multipleSequences&&c&&t.formatText(c,n.length-c,{background:"rgba(255, 0, 0, 0.5)"}),JSON.stringify(u)!==JSON.stringify(t.errors)&&(t.errors=u,t.valid=!Qn(Object.values(u)),tr(t),t.container.dispatchEvent(new CustomEvent("error-change",{bubbles:!0,detail:{errors:u}})))}},rr=function(t,e,n,r,i,o,l,a){kn.register("modules/formatter",(function(t){t.on("text-change",function(t,e,n){var r,i,o,l,a,s,c=0,u=!1,h=!1,f=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function d(e){var n=r,o=i;return r=i=void 0,c=e,l=t.apply(o,n)}function p(t){return c=t,a=setTimeout(y,e),u?d(t):l}function g(t){var n=t-s;return void 0===s||n>=e||n<0||h&&t-c>=o}function y(){var t=Nn();if(g(t))return v(t);a=setTimeout(y,function(t){var n=e-(t-s);return h?Wn(n,o-(t-c)):n}(t))}function v(t){return a=void 0,f&&r?d(t):(r=i=void 0,l)}function m(){var t=Nn(),n=g(t);if(r=arguments,i=this,s=t,n){if(void 0===a)return p(s);if(h)return clearTimeout(a),a=setTimeout(y,e),d(s)}return void 0===a&&(a=setTimeout(y,e)),l}return e=Yn(e)||0,_n(n)&&(u=!!n.leading,o=(h="maxWait"in n)?Vn(Yn(n.maxWait)||0,e):o,f="trailing"in n?!!n.trailing:f),m.cancel=function(){void 0!==a&&clearTimeout(a),c=0,r=s=i=a=void 0},m.flush=function(){return void 0===a?l:v(Nn())},m}((function(){return nr(t)}),200))}));var s=new kn(t,{formats:["bold","italic","color","background"],placeholder:"Enter your sequence",modules:{formatter:!0}});return s.errors={multipleSequences:!1,hasInvalidCharacters:!1,missingFirstHeader:!1,tooShort:!1,headerCheckRequiredForMultipleSequences:!1},s.alphabet=e,s["case-sensitive"]=n,s["allow-comments"]=o,s["min-sequence-length"]=i,s["disable-header-check"]=a,s.single=r,s.formatSequence=l,s.format=function(){return nr(s,!0)},s.cleanUp=function(){var t=$n(s.getText(),s.alphabet,s["case-sensitive"],!s["allow-comments"],s.single,s["disable-header-check"],s.formatSequence);s.setText(t),s.format()},s},ir=function(t){f()(n,t);var e=function(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=E()(t);if(e){var i=E()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return b()(this,n)}}(n);function n(){var t;return i()(this,n),(t=e.call(this)).quill=null,t.alphabet=Xn.protein,t["min-sequence-length"]=1,t["case-sensitive"]=!1,t["allow-comments"]=!1,t["disable-header-check"]=!1,t.single=!1,t}return c()(n,[{key:"connectedCallback",value:function(){this.firstRender()}},{key:"attributeChangedCallback",value:function(t,e,n){var r=this,i=this._getInnerDiv();if(i&&this.quill){if(e!==n)if("width"===t||"height"===t){var o=this.getAttribute(t);i&&null!==o&&""!==o.trim()&&(i.style[t]=o)}else if("inner-style"===t){var l=i.style.width,a=i.style.height;i.setAttribute("style",n),i.style.width=i.style.width||l,i.style.height=i.style.height||a}else this.quill&&("alphabet"===t&&n in Xn?this.quill[t]=Xn[n]:-1!==["single","case-sensitive","allow-comments","disable-header-check"].indexOf(t)?this.quill[t]="true"===n:this.quill[t]="min-sequence-length"===t?parseInt(n,10):n,this.quill.format())}else requestAnimationFrame((function(){return r.attributeChangedCallback(t,e,n)}))}},{key:"formatSequence",set:function(t){if("function"!=typeof t)throw new Error("Only functions are supported for this parameter");this.quill&&(this.quill.formatSequence=t)}},{key:"sequence",get:function(){return this.quill.getText()}},{key:"errors",get:function(){return this.quill.errors}},{key:"_getInnerDiv",value:function(){var t=this.getElementsByClassName("sequence-editor");return t&&t.length?t[0]:null}},{key:"cleanUp",value:function(){this.quill.cleanUp()}},{key:"firstRender",value:function(){var t=this,e=this.getAttribute("name")||"sequence";this.innerHTML="\n \n
    \n \n '),this.quill=new rr("#".concat(this.getAttribute("id")||"","sequence-editor"),this.alphabet,this["case-sensitive"],this.single,this["min-sequence-length"],this["allow-comments"],Zn,this["disable-header-check"]),this.quill.on("text-change",(function(){t.querySelector("input[name=".concat(e,"]")).value=t.sequence}))}}],[{key:"observedAttributes",get:function(){return["alphabet","case-sensitive","single","width","height","min-sequence-length","allow-comments","inner-style","disable-header-check"]}}]),n}(C()(HTMLElement));window.customElements&&customElements.define("textarea-sequence",ir),e.default=ir}])},"object"==_(e)&&"object"==_(t)?t.exports=o():(r=[],void 0===(i="function"==typeof(n=o)?n.apply(e,r):n)||(t.exports=i))}).call(this,n(158)(t))},1097:function(t,e){t.exports='

    textarea-sequence

    \n

    A custom element that creates a formatted text area to capture sequences. It uses QuillJS to format the textarea.

    \n

    Usage

    \n
    <textarea-sequence\n  id="textareaID"\n  height="10em"\n  min-sequence-length="10"\n  single="true"\n/>
    \n

    This readme is been use as a road map. A 🚧 emoji indicates that this feature is under construction.

    \n

    Features

    \n
      \n
    • Formats the sequence interactively following the FastA format.
        \n
      • ✅ Highlights headers
      • \n
      • ✅ Highlights bases/residues that are not part of it's alphabet.
      • \n
      • ✅ Highlights if the file includes multiple sequences, when the option single is included.
      • \n
      • ✅ Greys out comment lines (i.e. starts with ;)
      • \n
      \n
    • \n
    • ✅ CleanUp funtionality.
    • \n
    • ✅ Error reporting.
    • \n
    • ✅ Highlights the textarea border if there are errors or is valid.
    • \n
    • ✅ Creates a hidden input that mirrors the value in quill, so it is included when a form is submitted.
    • \n
    \n

    API reference

    \n

    Parameters

    \n
    alphabet
    \n

    Either a string explicitly listing the valid characters in the sequence or one of the predefined alphabets:

    \n
      \n
    • "protein": "ACDEFGHIKLMNPQRSTVWY "
    • \n
    • "dna": "AGTCN "
    • \n
    \n

    type: enum('dna'|'protein') | string\ndefaultValue: "protein"

    \n
    case-sensitive
    \n

    Indicates if the checks against the alphabet should consider the sequence casing

    \n

    type: boolean\ndefaultValue: false

    \n
    single
    \n

    Indicates if the textarea should only allow a single sequence

    \n

    type: boolean\ndefaultValue: false

    \n
    disable-header-check
    \n

    Indicates if the checks against the alphabet should consider the absence of the header.\nThis will only makes sense if the attribute single is also true, if it's not, the value of\nthe error headerCheckRequiredForMultipleSequences will be true.

    \n

    type: boolean\ndefaultValue: false

    \n
    min-sequence-length
    \n

    Defines the minimum number of bases required in the textarea

    \n

    type: number\ndefaultValue: 0

    \n
    height
    \n

    Height of the textarea element.

    \n

    type: auto|<length>|<percentage>\ndefaultValue: "auto"

    \n
    width
    \n

    Width of the textarea element:

    \n

    type: auto|<length>|<percentage>\ndefaultValue: "auto"

    \n
    inner-style
    \n

    Inline CSS style for the main container. The attributes width and height would have higher priority of any value for height and width created in the inline style.

    \n

    type: <CSSStyleDeclaration>\ndefaultValue:

    \n
            border: 1px solid #ccc;\n        font-family: 'Courier New', Courier, monospace; font-size: 1em;\n        letter-spacing: .1rem;\n        height: auto;\n        margin: 0 auto;\n        width: auto;

    Properties

    \n

    sequence [Read Only]

    \n

    The current value of the text-area.

    \n

    type: string

    \n

    errors [Read Only]

    \n

    The current value of the error report. In the shape of an object, where the keys are the type of error, and their values are booleans indicating if the current text has that error.

    \n

    type: object

    \n

    Example:

    \n
    {\n  hasInvalidCharacters: false,\n  missingFirstHeader: false,\n  multipleSequences: false,\n  tooShort: true, // The current sequence is too short\n  headerCheckRequiredForMultipleSequences: false,\n}
    \n

    quill

    \n

    We use quill to apply the formatting of the textarea. The object related to it, is exposed in this parameter.\nSee the Quill API documentation for more details of what can you do with this object.

    \n

    type: object

    \n

    formatSequence

    \n

    A formatting function to use in the cleanUp method. It should add desired spaces a line splits.

    \n

    The signature of the function should be:

    \n

    <string> formatSequence(<string> sequence)

    \n

    type: function\ndefaultValue: Splits the sequence in lines of 50, adding a space every 10 characters

    \n

    parameters:

    \n
      \n
    • sequence: type: string
    • \n
    \n

    Returns

    \n
      \n
    • string
    • \n
    \n

    Note: This parameter can be overwritten, so you can define such format. For example, to avoid any formatting you can pass the identity function:

    \n
    document.getElementByID("textareaID").formatSequence = (x) => x;
    \n

    Methods

    \n

    cleanUp()

    \n

    This method tries to clean up the current sequence in the textarea, in the following way:

    \n
      \n
    • Adds a generated header to the sequence in case is missing
    • \n
    • Removes any character that is not included in the current alphabet
    • \n
    • Trims lines and get rid of spaces
    • \n
    • If the attribute single is true, it will keep the first sequence and remove the rest.
    • \n
    • Executes the formatSequence function to include spaces and line lengths.
    • \n
    \n

    Events

    \n

    error-change

    \n

    Is dispatched when there is a change in the reported errors. Includes the errors object in the details.

    \n

    Usage example:

    \n
    element.addEventListener("error-change", (e) => {\n  console.log(e.detail.errors);\n});
    \n

    Quill Events

    \n

    As mentioned before, we use quill, and its instance is exposed in the parameter quill. Quill implement some events, that you could also use. See the Quill API documentation for more details.

    \n

    Usage Example:

    \n
    element.quill.on("text-change", (e) => {\n  console.log(element.sequence);\n});
    \n

    Exposed functions

    \n

    We have exposed some functions tht can be use without having to load the web component:

    \n

    formatSequence(sequence, block = 10, line = 50)

    \n

    Splits a string into lines of length line with block of block length separated by white spaces.

    \n

    parameters:

    \n
      \n
    • sequence: type: string
    • \n
    • block: type: number\ndefault: 10
    • \n
    • line: type: number\ndefault: 50
    • \n
    \n

    Returns:

    \n
      \n
    • string
    • \n
    \n

    Usage example:

    \n
    import { formatSequence } from "textarea-sequence";\nconst seq = "XXXXXXXXXXXXXXX";\nformatSequence(seq, 4, 8); // 'XXXX XXXX\\nXXXX XXX'\nformatSequence(seq, 2, 8); // 'XX XX XX XX\\nXX XX XX X'\nformatSequence(seq, 5, 10); // 'XXXXX XXXXX\\nXXXXX'
    \n

    cleanUpText(text,alphabet = alphabets.protein, caseSensitive = false, removeComments = true, single = true, format = formatSequence)

    \n

    Takes a sequence and transform it, applying the following heuristics:

    \n
      \n
    • removes any character that's not in the alphabet.
    • \n
    • Generates a header if the sequence doesn't have one
    • \n
    • formats the sequence using the goven function. default: blocks of 10 chars separated with a white space and lines of 50 bases.
    • \n
    • If case_sensitive is true cases mismatches are removed.
    • \n
    • If removeComments is true, removes any line that starts with ;
    • \n
    • If single is true, removes any sequence after the first one.
    • \n
    \n

    When all of those things are executed, the string is formatted with the function format().

    \n

    parameters:

    \n
      \n
    • text: type: string
    • \n
    • alphabet: type: string\ndefault: "ACDEFGHIKLMNPQRSTVWY "
    • \n
    • caseSensitive: type: boolean\ndefault: false
    • \n
    • removeComments: type: boolean\ndefault: true
    • \n
    • single: type: boolean\ndefault: true
    • \n
    • format: type: function\ndefault: formatSequence
    • \n
    \n'},168:function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(1096),l=n.n(o),a=n(111),s=n(35),c=n(1097),u=n.n(c);function h(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function f(t){for(var e=1;et.length)&&(e=t.length);for(var n=0,r=new Array(e);n'},"protvista-track":{name:"protvista-track",codeSample:'\n ',dataType:"json",dataSample:e},"protvista-sequence":{name:"protvista-sequence",codeSample:'\n ',dataType:"string",dataSample:"MAMYDDEFDTKASDLTFSPWVEVENWKDVTTRLRAIKFALQADRDKIPGVLSDLKTNCPYSAFKRFPDKSLYSVLSKEAVIAVAQIQSASGFKRRADEKNAVSGLVSVTPTQISQSASSSAATPVGLATVKPPRESDSAFQEDTFSYAKFDDASTAFHKALAYLEGLSLRPTYRRKFEKDMNVKWGGSGSAPSGAPAGGSSGSAPPTSGSSGSGAAPTPPPNP"}};a.default=s},771:function(t){t.exports=JSON.parse('[{"accession":"feature1","start":10,"end":40,"color":"#342ea2"},{"accession":"feature2","locations":[{"fragments":[{"start":50,"end":160}]}],"color":"#A42ea2"},{"accession":"feature3","locations":[{"fragments":[{"start":155,"end":155}]},{"fragments":[{"start":158,"end":158}]}],"color":"#A4Aea2"},{"accession":"feature4","locations":[{"fragments":[{"start":200,"end":204},{"start":206,"end":210}]}]},{"accession":"feature5","start":40,"end":80,"color":"#A48ea9","ptms":[{"position":4},{"position":9}]}]')}}]); \ No newline at end of file diff --git a/v3/25.js b/v3/25.js new file mode 100644 index 000000000..2a669eaa6 --- /dev/null +++ b/v3/25.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[25],{1050:function(e,t){e.exports='

    protvista-sequence

    \n

    Published on NPM

    \n

    This custom element displays the sequence in the selected region if the zoom level allows it, otherwise it displays the axis legend of the selected region. As it inherits from , it supports highlighting.

    \n

    Demo

    \n

    Usage

    \n

    Setting sequence through property

    \n
    <protvista-sequence length="456" />
    \n
    const protvistaSequence = document.querySelectAll('#my-protvista-sequence-id');\nprotvistaSequence.sequence = proteinSequence;

    Setting sequence through attribute

    \n
    <protvista-sequence length="456" sequence="RFQAEGSLKK..." />
    \n

    API Reference

    \n

    Properties

    \n

    sequence: string

    \n

    The sequence to display

    \n

    length: number

    \n

    The protein or nucleic acid sequence length.

    \n

    numberofticks: number

    \n

    The number of ticks in the displayed sequence.

    \n

    also see protvista-zoomable

    \n'},165:function(e,t,n){"use strict";n.r(t);var o=n(0),r=n.n(o),i=n(734),s=n(111),c=n(35),a=n(1050),u=n.n(a);function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){for(var n=0;n0&&o(b)?r>1?t(b,r-1,o,a,c):Object(n.a)(c,b):a||(c[c.length]=b)}return c}},749:function(t,e){t.exports=function(t){if(!t.webpackPolyfill){var e=Object.create(t);e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),Object.defineProperty(e,"exports",{enumerable:!0}),e.webpackPolyfill=1}return e}},920:function(t,e,r){"use strict";var n=r(643),o=r(604);var a=function(t){return Object(o.a)(t)&&"[object Arguments]"==Object(n.a)(t)},c=Object.prototype,u=c.hasOwnProperty,i=c.propertyIsEnumerable,f=a(function(){return arguments}())?a:function(t){return Object(o.a)(t)&&u.call(t,"callee")&&!i.call(t,"callee")};e.a=f},932:function(t,e,r){"use strict";(function(t){var n=r(699),o=r(1009);function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var c="object"==("undefined"==typeof exports?"undefined":a(exports))&&exports&&!exports.nodeType&&exports,u=c&&"object"==a(t)&&t&&!t.nodeType&&t,i=u&&u.exports===c?n.a.Buffer:void 0,f=(i?i.isBuffer:void 0)||o.a;e.a=f}).call(this,r(749)(t))},933:function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=/^(?:0|[1-9]\d*)$/;e.a=function(t,e){var r=n(t);return!!(e=null==e?9007199254740991:e)&&("number"==r||"symbol"!=r&&o.test(t))&&t>-1&&t%1==0&&tu))return!1;var f=a.get(t),b=a.get(e);if(f&&b)return f==e&&b==t;var s=-1,l=!0,y=2&r?new j.a:void 0;for(a.set(t,e),a.set(e,t);++st.length)&&(e=t.length);for(var n=0,i=new Array(e);n0&&void 0!==arguments[0]?arguments[0]:{},n=e.min,i=void 0===n?-1/0:n,r=e.max,a=void 0===r?1/0:r;o(this,t),this.segments=[],this.max=a,this.min=i,this.regionString=null}var e,n,r;return e=t,(n=[{key:"encode",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.segments.map((function(n){var i=n.start,r=n.end,o=n.color;if(e)return"".concat(i,":").concat(r).concat(o?":".concat(o):"");var a=i===t.min?"":i,s=r===t.max?"":r;return"".concat(a,":").concat(s).concat(o?":".concat(o):"")})).join(",")}},{key:"decode",value:function(t){var e=this;void 0!==t&&(this.regionString=t),this.regionString?this.segments=this.regionString.split(",").map((function(t){var n=i(t.split(":"),4),r=n[0],o=n[1],a=n[2];if(void 0!==n[3])throw new Error("there should be at most 2 ':' per region. Region: ".concat(t));var s=r?Number(r):e.min,l=o?Number(o):e.max,c=""!==a?a:void 0;if(s>l){var h=[l,s];s=h[0],l=h[1]}if(se.max&&(l=e.max),Number.isNaN(s))throw new Error("The parsed value of ".concat(r," is NaN. Region: ").concat(t));if(Number.isNaN(l))throw new Error("The parsed value of ".concat(o," is NaN. Region: ").concat(t));if(c&&!c.match(/^#[0-9a-f]{6,8}$/i))throw new Error("The parsed value of ".concat(a," is not a color in hex format. Region: ").concat(t));return{start:s,end:l,color:c}})):this.segments=[]}}])&&a(e.prototype,n),r&&a(e,r),t}();function l(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:400;g(this,t),this.element=e,this.timeStampWheelOutside=0,this.resetScrollableTimeout=null,this.scrollDelay=n}var e,n,i;return e=t,(n=[{key:"setElementScrollable",value:function(t){this.element.setAttribute("scrollable",t)}},{key:"startResetScrollableTimer",value:function(){var t=this;this.resetScrollableTimeout&&clearTimeout(this.resetScrollableTimeout),this.resetScrollableTimeout=setTimeout((function(){t.setElementScrollable(!0),t.resetScrollableTimeout=null}),this.scrollDelay)}},{key:"blockScroll",value:function(t){this.timeStampWheelOutside=t,this.setElementScrollable(!1),this.startResetScrollableTimer()}},{key:"wheel",value:function(t){var e=t.target,n=t.timeStamp;this.element.contains(e)?n=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function b(t){return function(t){if(Array.isArray(t))return _(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||v(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(t,e){if(t){if("string"==typeof t)return _(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_(t,e):void 0}}function _(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n0&&void 0!==arguments[0]?arguments[0]:null,e=[],n=[];if(null!==t&&"string"!=typeof t)throw new Error("The attribute text has to be of type string");if(t&&""!==t.trim()){var i=t.split(",").map((function(t){return t.split(":")}));if(i.length<2)throw new Error("There should be at least 2 points to create a scale");e=i.map((function(t){var e=t[0].trim().toUpperCase();if(!u(e))throw new Error("The color '".concat(e," is not valid'"));return e})),n=i.map((function(t,e){var n=parseFloat(t[1]);if(Number.isNaN(n))throw new Error("The second part of every point should be a number. Error in point ".concat(e,": ").concat(t));return n}))}return{range:e,domain:n}},q=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.keyFormatter,i=void 0===n?f:n,r=e.valueFormatter,o=void 0===r?f:r;if(null!==t&&"string"!=typeof t)throw new Error("The attribute text has to be of type string");if(t&&""!==t.trim()){var a=t.split(",").map((function(t){return t.split(":")})),s={};return a.forEach((function(t){if(2!==t.length)throw new Error("Bad block: ".concat(t.join(":"),"\n The blocks of the string should follow the format KEY:VALUE"));s[i(t[0])]=o(t[1])})),s}return{}},H=m,z=function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{initialValue:{top:0,bottom:0,left:0,right:0}},i=function(t){x(i,t);var e=A(i);function i(){var t;return w(this,i),(t=e.call(this)).margin=n.initialValue,t}return S(i,[{key:"attributeChangedCallback",value:function(t,e,n){e!==n&&C.includes(t)&&(this[t]=n),E(T(i.prototype),"attributeChangedCallback",this).call(this,t,e,n)}}],[{key:"observedAttributes",get:function(){return[].concat(b(E(T(i),"observedAttributes",this)),b(C))}}]),i}(t),r=y(R);try{var o=function(){var t=e.value;Object.defineProperty(i.prototype,"margin".concat(t),{get:function(){return this.margin[t]||0},set:function(e){this.margin[t]=+e}})};for(r.s();!(e=r.n()).done;)o()}catch(t){r.e(t)}finally{r.f()}return i}},609:function(t,e,n){"use strict";var i=n(585),r=n(593),o=n(665);function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=t&&("undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"]);if(null==n)return;var i,r,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(i=n.next()).done)&&(o.push(i.value),!e||o.length!==e);a=!0);}catch(t){s=!0,r=t}finally{try{a||null==n.return||n.return()}finally{if(s)throw r}}return o}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return l(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4?arguments[4]:void 0,a=arguments.length>5?arguments[5]:void 0,s=arguments.length>6?arguments[6]:void 0;e&&(e=e.feature?e.feature:e);var l={eventtype:t,coords:y._getClickCoords(),feature:e,target:s};return n&&(e&&e.fragments?l.highlight=e.fragments.map((function(t){return"".concat(t.start,":").concat(t.end)})).join(","):i.event&&i.event.shiftKey&&this._highlight?l.highlight="".concat(this._highlight,",").concat(o,":").concat(a):l.highlight=o&&a?"".concat(o,":").concat(a):null),r&&(l.selectedid=e&&e.protvistaFeatureId),new CustomEvent("change",{detail:l,bubbles:!0,cancelable:!0})}},{key:"bindEvents",value:function(t,e){t.on("mouseover",(function(t,n,i){e.dispatchEvent(e.createEvent("mouseover",t,"onmouseover"===e._highlightEvent,!1,t.start,t.end,i[n]))})).on("mouseout",(function(){e.dispatchEvent(e.createEvent("mouseout",null,"onmouseover"===e._highlightEvent))})).on("click",(function(t,n,i){e.dispatchEvent(e.createEvent("click",t,"onclick"===e._highlightEvent,!0,t.start,t.end,i[n]))}))}}])&&c(a.prototype,l),f&&c(a,f),y}(f(HTMLElement));e.a=Object(r.f)(y,{initialValue:{top:10,right:10,bottom:10,left:10}})},734:function(t,e,n){"use strict";var i=n(585),r=n(609);function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){for(var n=0;nthis.chHeight&&(this.xAxis=Object(i.axisBottom)(this.xScale).tickFormat((function(t){return Number.isInteger(t)?t:""})).ticks(this.numberOfTicks,"s"),this.axis.call(this.xAxis)),this.axis.attr("transform","translate(".concat(this.margin.left+r,",0)")),this.axis.select(".domain").remove(),this.axis.selectAll(".tick line").remove(),this.bases=this.seq_g.selectAll("text.base").data(s,(function(t){return t.start})),this.bases.enter().append("text").attr("class","base").attr("text-anchor","middle").attr("x",(function(e){return t.getXFromSeqPosition(e.start)+r})).text((function(t){return t.aa})).style("pointer-events","none").style("font-family","monospace"),this.bases.exit().remove(),this.bases.attr("x",(function(e){return t.getXFromSeqPosition(e.start)+r})),this.background=this.seq_bg.selectAll("rect.base_bg").data(s,(function(t){return t.start})),this.background.enter().append("rect").attr("class","base_bg feature").attr("height",this._height).merge(this.background).attr("width",e).attr("fill",(function(t){return Math.round(t.start)%2?"#ccc":"#eee"})).attr("x",(function(e){return t.getXFromSeqPosition(e.start)})).call(this.bindEvents,this),this.background.exit().remove(),this.seq_g.style("opacity",Math.min(1,n)),this.background.style("opacity",Math.min(1,n)),this._updateHighlight()}}},{key:"_updateHighlight",value:function(){this.trackHighlighter.updateHighlight()}}])&&s(e.prototype,n),o&&s(e,o),g}(r.a);e.a=m}}]); \ No newline at end of file diff --git a/v3/5.js b/v3/5.js new file mode 100644 index 000000000..91b62ba51 --- /dev/null +++ b/v3/5.js @@ -0,0 +1,64 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[5],Array(572).concat([function(e,t,r){"use strict";r.d(t,"c",(function(){return a})),r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return o})),r.d(t,"d",(function(){return s})),r.d(t,"e",(function(){return u})); +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ +var n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var i=function(){return(i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0&&a[a.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]0&&0===n.length?e.defaultValue:n}return"object-list"===e.type?Array.isArray(t)?t.map((function(t){return A(e.element,t,r?"all":"skip")})):e.defaultValue:t}function A(e,t,r){if("object"!==d(t)||null===t)return r?m(e):t;for(var n=Object.create(null),a=0,i=Object.keys(e);a0?t[0][0]:void 0}e.Essential={isEssential:!0},e.Optional=function(e){var t=Object(a.a)({},e);return t.isOptional=!0,t},e.Value=function(e,r){return t({type:"value",defaultValue:e},r)},e.Select=r,e.MultiSelect=function(e,r,n){var a=t({type:"multi-select",defaultValue:e,options:r},n);return(null==n?void 0:n.emptyValue)&&(a.emptyValue=n.emptyValue),a},e.Boolean=function(e,r){return t({type:"boolean",defaultValue:e},r)},e.Text=function(e,r){return void 0===e&&(e=""),t({type:"text",defaultValue:e},r)},e.Color=function(e,r){var n=t({type:"color",defaultValue:e},r);return(null==r?void 0:r.isExpanded)&&(n.isExpanded=r.isExpanded),n},e.ColorList=function(e,r){var n;if("string"==typeof e){var a=Object(c.e)(e);n={kind:"qualitative"!==a.type?"interpolate":"set",colors:a.list}}else n=e;return t({type:"color-list",presetKind:(null==r?void 0:r.presetKind)||"all",defaultValue:n,offsets:!!(null==r?void 0:r.offsets)},r)},e.Vec3=function(e,r,a){return t(n({type:"vec3",defaultValue:e},r),a)},e.Mat4=function(e,r){return t({type:"mat4",defaultValue:e},r)},e.Url=function(e,r){return t({type:"url",defaultValue:"string"==typeof e?l.a.Url(e):l.a.Url(e.url,{body:e.body})},r)},e.File=function(e){var r=t({type:"file",defaultValue:null},e);return(null==e?void 0:e.accept)&&(r.accept=e.accept),r},e.FileList=function(e){var r=t({type:"file-list",defaultValue:null},e);return(null==e?void 0:e.accept)&&(r.accept=e.accept),r},e.Numeric=function(e,r,a){var i=t(n({type:"number",defaultValue:e},r),a);return(null==a?void 0:a.immediateUpdate)&&(i.immediateUpdate=!0),i},e.Interval=function(e,r,a){return t(n({type:"interval",defaultValue:e},r),a)},e.LineGraph=function(e,r){return t({type:"line-graph",defaultValue:e},r)},e.Group=p,e.EmptyGroup=function(e){return p({},e)},e.Mapped=function(e,n,a,i){var o=E(e,n);return t({type:"mapped",defaultValue:{name:o,params:a(o).defaultValue},select:r(o,n,i),map:a},i)},e.MappedStatic=function(e,n,a){var i=(null==a?void 0:a.options)?a.options:Object.keys(n).map((function(e){return[e,n[e].label||Object(u.d)(e)]})),o=E(e,i);return t({type:"mapped",defaultValue:{name:o,params:n[o].defaultValue},select:r(o,i,a),map:function(e){return n[e]}},a)},e.ObjectList=function(e,r,n){return t({type:"object-list",element:e,getLabel:r,ctor:f,defaultValue:(null==n?void 0:n.defaultValue)||[]},n)},e.ValueRef=function(e,r,n){var a;return t({type:"value-ref",defaultValue:{ref:null!==(a=null==n?void 0:n.defaultRef)&&void 0!==a?a:"",getValue:h},getOptions:e,resolveRef:r},n)},e.DataRef=function(e){var r;return t({type:"data-ref",defaultValue:{ref:null!==(r=null==e?void 0:e.defaultRef)&&void 0!==r?r:"",getValue:h}},e)},e.Converted=function(e,t,r){return{type:"converted",defaultValue:t(r.defaultValue),converted:r,fromValue:e,toValue:t}},e.Conditioned=function(e,n,a,i,o){var s=Object.keys(n).map((function(e){return[e,e]}));return t({type:"conditioned",select:r(a(e),s,o),defaultValue:e,conditionParams:n,conditionForValue:a,conditionedValue:i},o)},e.Script=function(e,r){return t({type:"script",defaultValue:e},r)},e.For=function(e){return 0},e.getDefaultValues=m,e.resolveRefs=x,e.setDefaultValues=function(e,t){for(var r=0,n=Object.keys(e);r=0;o--)i=(i+t[n[o]])*r[o];return i}function o(e,t){for(var r=[],n=0;n0?0:-1,this.prev=new Int32Array(e),this.next=new Int32Array(e);for(var t=0;t=0&&(r[n]=a,t[e]=-1),a>=0&&(t[a]=n,r[e]=-1),e===this.head&&(this.head=n<0?a:n)},e.prototype.has=function(e){return this.prev[e]>=0||this.next[e]>=0||this.head===e},e}(),l=r(583);!function(e){function t(){return new Map}e.Empty=new Map,e.keyArray=function(e){return Object(l.n)(e.keys())},e.Mutable=t,e.asImmutable=function(e){return e},e.copy=function(e){for(var r=t(),n=e.keys();;){var a=n.next(),i=a.done,o=a.value;if(i)break;r.set(o,e.get(o))}return r},e.addFrom=function(e,t){for(var r=t.keys();;){var n=r.next(),a=n.done,i=n.value;if(a)break;e.set(i,t.get(i))}return e}}(u||(u={}));r(774)},function(e,t,r){"use strict";r.d(t,"d",(function(){return u.a})),r.d(t,"e",(function(){return u.b})),r.d(t,"a",(function(){return a.a})),r.d(t,"b",(function(){return i.a})),r.d(t,"c",(function(){return o.a})),r.d(t,"j",(function(){return l})),r.d(t,"f",(function(){return d})),r.d(t,"g",(function(){return f})),r.d(t,"k",(function(){return h})),r.d(t,"l",(function(){return m})),r.d(t,"h",(function(){return g})),r.d(t,"i",(function(){return v}));var n,a=r(773),i=r(873),o=r(750);function s(e,t){return e-t}!function(e){var t=function(){function e(){this.size=0}return e.prototype.has=function(e){return!1},e.prototype.forEach=function(e,t){return t},e}(),r=function(){function e(e){this.idx=e,this.size=1}return e.prototype.has=function(e){return e===this.idx},e.prototype.forEach=function(e,t){return e(this.idx,t),t},e}(),n=function(){function e(e,t){this.mask=e,this.size=t,this.length=e.length}return e.prototype.has=function(e){return es&&(s=f)}if(o===s)return new a(o);if(o/s<1/12){for(var l=new Set,d=0,p=e;dn&&(n=t))})),r/n<1/12){var a=new Set;return t.forEach((function(t){e.has(t)||a.add(t)})),o(a)}var i=new Uint8Array(n+1);return t.forEach((function(t){e.has(t)||(i[t]=1)})),u(i,r)}}(n||(n={}));var u=r(751);function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var l=function(){};function d(e,t){var r=e.length;if(r!==t.length)return!1;for(var n=0;n146&&++t,e>148&&++t,e>155&&++t,e>160&&++t,e>161&&++t,e>166&&++t,e>167&&++t,e-1+t}(e):c[e];return void 0===t||void 0===h[t]?-1:t}(t);if(i<0)return console.warn("Unknown spacegroup '"+t+"', returning a 'P 1' with cellsize [1, 1, 1]"),e.Zero;var o=r[0]*r[1]*r[2],s=a[0],u=a[1],l=a[2],d=r[0],p=r[1],f=r[2],m=Math.cos(u),g=(Math.cos(s)-Math.cos(u)*Math.cos(l))/Math.sin(l),b=Math.sqrt(1-m*m-g*g),v=[d,0,0],y=[Math.cos(l)*p,Math.sin(l)*p,0],x=[m*f,g*f,b*f],O=n.c.ofRows([[v[0],y[0],x[0],0],[0,y[1],x[1],0],[0,0,x[2],0],[0,0,0,1]]);return{index:i,size:r,volume:o,anglesInRadians:a,toFractional:n.c.invert(n.c.zero(),O),fromFractional:O}}e.Zero=t("P 1",n.g.create(1,1,1),n.g.create(Math.PI/2,Math.PI/2,Math.PI/2)),e.isZero=function(e){return!e||0===e.index&&1===e.size[0]&&1===e.size[1]&&1===e.size[1]},e.create=t}(d||(d={})),function(e){function t(e){var t=u[e.index].map((function(e){return r=o[(t=s[e])[0]],a=o[t[1]],i=o[t[2]],n.c.ofRows([r,a,i,[0,0,0,1]]);var t,r,a,i}));return{name:h[e.index],num:m[e.index],cell:e,operators:t}}e.ZeroP1=t(d.Zero),e.create=t;var r=Object(n.g)(),a=Object(n.c)();function c(e,t,i,o,s,u){return n.g.set(r,i,o,s),n.c.fromTranslation(a,r),n.c.mul(u,n.c.mul(u,n.c.mul(u,e.cell.fromFractional,a),e.operators[t]),e.cell.toFractional)}e.setOperatorMatrix=c,e.getSymmetryOperator=function(e,t,r,a,o){var s=c(e,t,r,a,o,n.c.zero());return i.a.create(t+1+"_"+(5+r)+(5+a)+(5+o),s,{hkl:n.g.create(r,a,o),spgrOp:t})};var l=Object(n.g)(),p=Object(n.g)(),f=Object(n.g)(),g=Object(n.g)();function b(e,t,r){var n=[];if(e>0?n.push("+X"):e<0&&n.push("-X"),t>0?n.push("+Y"):t<0&&n.push("-Y"),r>0?n.push("+Z"):r<0&&n.push("-Z"),1===n.length)return"+"===n[0].charAt(0)?n[0].substr(1):n[0];if(2===n.length){var a=n[0].charAt(0),i=n[1].charAt(0);if("+"===a)return""+n[0].substr(1)+n[1];if("+"===i)return""+n[1].substr(1)+n[0]}throw new Error("unknown rotation '"+n+"', "+e+" "+t+" "+r)}function v(e){switch(e){case.5:return"1/2";case 1/4:return"1/4";case 3/4:return"3/4";case 1/3:return"1/3";case 2/3:return"2/3";case 1/6:return"1/6";case 5/6:return"5/6"}return""}function y(e,t){return""===t?e:e.length>2?e+"+"+t:"-"===e.charAt(0)?""+t+e:t+"+"+e}e.getSymmetryOperatorRef=function(e,t,a,o,s,u){var c=n.c.zero();n.g.set(r,a,o,s),n.g.floor(l,u),n.c.copy(c,e.operators[t]),n.g.floor(p,n.g.transformMat4(p,u,c)),n.c.getTranslation(g,c),n.g.sub(g,g,p),n.g.add(g,g,l),n.g.add(g,g,r),n.c.setTranslation(c,g),n.c.mul(c,e.cell.fromFractional,c),n.c.mul(c,c,e.cell.toFractional),n.g.sub(f,p,l);var d=a-f[0],h=o-f[1],m=s-f[2];return i.a.create(t+1+"_"+(5+d)+(5+h)+(5+m),c,{hkl:n.g.create(d,h,m),spgrOp:t})},e.getOperatorXyz=function(e){return[y(b(e[0],e[4],e[8]),v(e[12])),y(b(e[1],e[5],e[9]),v(e[13])),y(b(e[2],e[6],e[10]),v(e[14]))].join(",")}}(p||(p={})),function(e){e.add=function(e,t,r){e.squaredDistances[e.count]=r,e.indices[e.count++]=t},e.reset=function(e){e.count=0},e.create=function(){return{count:0,indices:[],squaredDistances:[]}},e.copy=function(e,t){for(var r=0;r0){var p=Math.ceil(c/l),f=Math.pow(p/(u[0]*u[1]*u[2]),1/3);i=[Math.ceil(u[0]*f),Math.ceil(u[1]*f),Math.ceil(u[2]*f)],a=[u[0]/i[0],u[1]/i[1],u[2]/i[2]]}else a=u,i=[1,1,1];var h={x:e.x,y:e.y,z:e.z,indices:s,radius:e.radius};return function(e){for(var t=e.expandedBox,r=e.size,n=r[0],a=r[1],i=r[2],o=e.data,s=o.x,u=o.y,c=o.z,l=o.radius,d=o.indices,p=e.elementCount,f=e.delta,h=n*a*i,m=t.min,g=m[0],v=m[1],y=m[2],x=0,O=0,j=new Uint32Array(h),S=new Int32Array(p),_=0;_x&&(x=l[w])}for(var T=new Int32Array(O),I=(w=0,0);w0&&(j[w]=I+1,T[I]=k,I+=1)}var M=new Uint32Array(O);for(w=1;w0){var L=B-1;R[M[L]+D[L]]=w,D[L]+=1}}return{size:e.size,bucketArray:R,bucketCounts:T,bucketOffset:M,grid:j,delta:f,min:e.expandedBox.min,data:e.data,maxRadius:x,expandedBox:e.expandedBox,boundingBox:e.boundingBox,boundingSphere:e.boundingSphere}}({size:i,data:h,expandedBox:o,boundingBox:t.box,boundingSphere:t.sphere,elementCount:c,delta:a})}(e,t,r);this.ctx={grid:a,x:.1,y:.1,z:.1,radius:.1,isCheck:!1},this.boundary={box:a.boundingBox,sphere:a.boundingSphere},this.buckets={offset:a.bucketOffset,count:a.bucketCounts,array:a.bucketArray},this.result=f.create()}return e.prototype.find=function(e,t,r,n,a){this.ctx.x=e,this.ctx.y=t,this.ctx.z=r,this.ctx.radius=n,this.ctx.isCheck=!1;var i=null!=a?a:this.result;return x(this.ctx,i),i},e.prototype.check=function(e,t,r,n){return this.ctx.x=e,this.ctx.y=t,this.ctx.z=r,this.ctx.radius=n,this.ctx.isCheck=!0,x(this.ctx,this.result)},e}();function x(e,t){var r=e.grid,n=r.min,a=r.size,i=a[0],o=a[1],s=a[2],u=r.bucketOffset,c=r.bucketCounts,l=r.bucketArray,d=r.grid,p=r.data,h=p.x,m=p.y,g=p.z,v=p.indices,y=p.radius,x=r.delta,O=r.maxRadius,j=e.radius,S=e.isCheck,_=e.x,w=e.y,C=e.z,A=j+O,E=A*A;f.reset(t);var P=Math.max(0,Math.floor((_-A-n[0])/x[0])),T=Math.max(0,Math.floor((w-A-n[1])/x[1])),I=Math.max(0,Math.floor((C-A-n[2])/x[2])),k=Math.min(i-1,Math.floor((_+A-n[0])/x[0])),M=Math.min(o-1,Math.floor((w+A-n[1])/x[1])),D=Math.min(s-1,Math.floor((C+A-n[2])/x[2]));if(P>k||T>M||I>D)return!1;for(var R=P;R<=k;R++)for(var B=T;B<=M;B++)for(var L=I;L<=D;L++){var N=d[(R*o+B)*s+L];if(0!==N)for(var F=N-1,z=u[F],U=z+c[F],V=z;V0&&Math.sqrt(X)-y[H]>j)continue;if(S)return!0;f.add(t,l[V],X)}}}return t.count>0}var O=r(779);function j(){return j.empty()}!function(e){function t(){return{origin:Object(n.g)(),dirA:Object(n.g)(),dirB:Object(n.g)(),dirC:Object(n.g)()}}function r(e,t){return n.g.copy(e.origin,t.origin),n.g.copy(e.dirA,t.dirA),n.g.copy(e.dirB,t.dirB),n.g.copy(e.dirC,t.dirC),e}function a(e,t){return n.g.set(e,2*n.g.magnitude(t.dirA),2*n.g.magnitude(t.dirB),2*n.g.magnitude(t.dirC))}e.create=function(e,t,r,n){return{origin:e,dirA:t,dirB:r,dirC:n}},e.empty=t,e.copy=r,e.clone=function(e){return r(t(),e)},e.size=a;var i=Object(n.g)();e.volume=function(e){return a(i,e),i[0]*i[1]*i[2]},e.normalize=function(e,t){return n.g.copy(e.origin,t.origin),n.g.normalize(e.dirA,t.dirA),n.g.normalize(e.dirB,t.dirB),n.g.normalize(e.dirC,t.dirC),e};var o=n.b.zero();e.transform=function(e,t,r){n.g.transformMat4(e.origin,t.origin,r);var a=n.b.directionTransform(o,r);return n.g.transformMat3(e.dirA,t.dirA,a),n.g.transformMat3(e.dirB,t.dirB,a),n.g.transformMat3(e.dirC,t.dirC,a),e}}(j||(j={}))},function(e,t,r){"use strict";r.d(t,"b",(function(){return i.a})),r.d(t,"a",(function(){return s.a})),r.d(t,"c",(function(){return l}));var n,a,i=r(819),o=r(939);(n||(n={})).Synchronous=o.a,function(e){e.format=function(e){return function e(t,r){void 0===r&&(r="");var n=t.progress;if(!t.children.length)return n.isIndeterminate?""+r+n.taskName+": "+n.message:""+r+n.taskName+": ["+n.current+"/"+n.max+"] "+n.message;var a=r+" |_ ",i=t.children.map((function(t){return e(t,a)}));return n.isIndeterminate?""+r+n.taskName+": "+n.message+"\n"+i.join("\n"):""+r+n.taskName+": ["+n.current+"/"+n.max+"] "+n.message+"\n"+i.join("\n")}(e.root)}}(a||(a={}));var s=r(880),u=r(572);var c=r(677);function l(e,t,r,n,a){return Object(u.b)(this,void 0,void 0,(function(){var i,o,s,l,d,p,f;return Object(u.d)(this,(function(u){switch(u.label){case 0:if(i=Math.max(t,0),o=0,s=0,e.isSynchronous)return n(Number.MAX_SAFE_INTEGER,r),[2,r];l=Object(c.b)(),d=0,p=0,u.label=1;case 1:return(d=n(i,r))>0?(o+=d,f=Object(c.b)()-l,p+=f,s+=f,e.shouldUpdate?[4,a(e,r,o)]:[3,3]):[3,4];case 2:u.sent(),i=Math.round(p*o/s)+1,l=Object(c.b)(),p=0,u.label=3;case 3:return[3,1];case 4:return e.shouldUpdate?[4,a(e,r,o)]:[3,6];case 5:u.sent(),u.label=6;case 6:return[2,r]}}))}))}},function(e,t,r){"use strict";r.d(t,"c",(function(){return y})),r.d(t,"d",(function(){return v})),r.d(t,"a",(function(){return d})),r.d(t,"b",(function(){return n}));var n={};r.r(n),r.d(n,"getArrayBounds",(function(){return i})),r.d(n,"createArray",(function(){return o})),r.d(n,"fillArrayValues",(function(){return s})),r.d(n,"createAndFillArray",(function(){return u})),r.d(n,"isTypedArray",(function(){return c})),r.d(n,"typedArrayWindow",(function(){return l}));var a=r(572);function i(e,t){return{start:t&&void 0!==t.start?Math.max(Math.min(t.start,e-1),0):0,end:t&&void 0!==t.end?Math.min(t.end,e):e}}function o(e,t){var r=t&&void 0!==t.array?t.array:Array,n=i(e,t),a=n.start,o=n.end;return{array:new r(o-a),start:a,end:o}}function s(e,t,r){for(var n=0,a=t.length;n=0}))}function g(e){return s(e,(function(e,t){var r=[];return u.doPreOrder(t.tree,t.tree.transforms.get(e.transform.ref),r,(function(e,t,r){r.push(e.ref)})),r.map((function(e){return t.cells.get(e)}))}))}function b(e){return s(e,(function(e,t){var r=[];return t.tree.children.get(e.transform.ref).forEach((function(e){return r.push(t.cells.get(e))})),r}))}function y(e,t){return f(e,(function(e){return!!e.obj&&e.obj.type===t.type}))}function x(e,t){return d(c(e,(function(e,r){return E(r.tree,r.cells,e.transform.ref,t)})))}function O(e,t){return d(c(e,(function(e,r){return I(r.tree,r.cells,e.transform.ref,t)})))}function j(e,t){return d(c(e,(function(e,r){return T(r.tree,r.cells,e.transform.ref,t)})))}function S(e,t){return f(e,(function(e){return e.transform.transformer===t}))}function _(e,t){return d(c(e,(function(e,r){return P(r.tree,r.cells,e.transform.ref,t)})))}function w(e,t){return d(c(e,(function(e,r){return k(r.tree,r.cells,e.transform.ref,t)})))}function C(e){return d(c(e,(function(e,t){return t.cells.get(t.tree.transforms.get(e.transform.ref).parent)})))}function A(e,t,r,n,a){for(var i=e.transforms.get(r),o=void 0;;){i=e.transforms.get(i.parent);var s=t.get(i.ref);if(s.obj&&n(s)&&(o=s,a))return o;if(i.ref===l.a.RootRef)return o}}function E(e,t,r,n){return A(e,t,r,n,!0)}function P(e,t,r,n){return A(e,t,r,n,!1)}function T(e,t,r,n){return E(e,t,r,Array.isArray(n)?function(e){return n.indexOf(e.transform.transformer)>=0}:function(e){return e.transform.transformer===n})}function I(e,t,r,n){return E(e,t,r,M(n))}function k(e,t,r,n){return P(e,t,r,M(n))}function M(e){return Array.isArray(e)?function(t){for(var r=0,n=e;r=0)||(r.ref=e.ref,!1)}function B(e,t,r){if(e.tags)for(var n=r.tags.size,a=0,i=0,o=e.tags;i0&&this.signal.next({v:this.queue[0],stillPresent:!0})},e.prototype.remove=function(e){var t=Object(p.j)(this.queue,e);return t&&this.signal.next({v:e,stillPresent:!1}),t},e.prototype.waitFor=function(e){var t=this;return new Promise((function(r){var n=t.signal.subscribe((function(t){var a=t.v,i=t.stillPresent;a===e&&(n.unsubscribe(),r(i))}))}))},e}(),M=r(627),D=r(637),R=function(){function e(e,t){var r=this;this.errorFree=!0,this.ev=j.a.create(),this.globalContext=void 0,this.events={cell:{stateUpdated:this.ev(),created:this.ev(),removed:this.ev()},object:{updated:this.ev(),created:this.ev(),removed:this.ev()},log:this.ev(),changed:this.ev(),historyUpdated:this.ev()},this.behaviors={currentObject:this.ev.behavior({state:this,ref:l.a.RootRef}),isUpdating:this.ev.behavior(!1)},this.actions=new C,this.cells=new Map,this.spine=new T.a.Impl(this.cells),this.tryGetCellData=function(e){var t,n,a=null===(n=null===(t=r.cells.get(e))||void 0===t?void 0:t.obj)||void 0===n?void 0:n.data;if(!e)throw new Error("Cell '"+e+"' data undefined.");return a},this.historyCapacity=5,this.history=[],this.undoingHistory=!1,this.inTransaction=!1,this.inTransactionError=!1,this._inUpdate=!1,this.reverted=!1,this.updateQueue=new k,this._tree=u.createEmpty(l.a.createRoot(t&&t.rootState)).asTransient();var n=this._tree.root;this.runTask=t.runTask,void 0!==(null==t?void 0:t.historyCapacity)&&(this.historyCapacity=t.historyCapacity),this.cells.set(n.ref,{parent:this,transform:n,sourceRef:void 0,obj:e,status:"ok",state:Object(v.a)({},n.state),errorText:void 0,params:{definition:{},values:{}},paramsNormalizedVersion:n.version,dependencies:{dependentBy:[],dependsOn:[]},cache:{}}),this.globalContext=t&&t.globalContext}return Object.defineProperty(e.prototype,"tree",{get:function(){return this._tree},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"transforms",{get:function(){return this._tree.transforms},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"current",{get:function(){return this.behaviors.currentObject.value.ref},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"root",{get:function(){return this.cells.get(this._tree.root.ref)},enumerable:!1,configurable:!0}),e.prototype.build=function(){return new O.Root(this.tree,this)},e.prototype.addHistory=function(e,t){0!==this.historyCapacity&&(this.history.unshift([e,t||"Update"]),this.history.length>this.historyCapacity&&this.history.pop(),this.events.historyUpdated.next({state:this}))},e.prototype.clearHistory=function(){0!==this.history.length&&(this.history=[],this.events.historyUpdated.next({state:this}))},Object.defineProperty(e.prototype,"latestUndoLabel",{get:function(){return this.history.length>0?this.history[0][1]:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"canUndo",{get:function(){return this.history.length>0},enumerable:!1,configurable:!0}),e.prototype.undo=function(){var e=this;return x.b.create("Undo",(function(t){return Object(v.b)(e,void 0,void 0,(function(){var e;return Object(v.d)(this,(function(r){switch(r.label){case 0:if(!(e=this.history.shift()))return[2];this.events.historyUpdated.next({state:this}),this.undoingHistory=!0,r.label=1;case 1:return r.trys.push([1,,3,4]),[4,this.updateTree(e[0],{canUndo:!1}).runInContext(t)];case 2:return r.sent(),[3,4];case 3:return this.undoingHistory=!1,[7];case 4:return[2]}}))}))}))},e.prototype.getSnapshot=function(){return{tree:u.toJSON(this._tree)}},e.prototype.setSnapshot=function(e){var t=u.fromJSON(e.tree);return this.updateTree(t)},e.prototype.setCurrent=function(e){this.behaviors.currentObject.next({state:this,ref:e})},e.prototype.updateCellState=function(e,t){var r=this.cells.get(e);if(r){var n="function"==typeof t?t(r.state):t;l.a.assignState(r.state,n)&&(r.transform=this._tree.assignState(r.transform.ref,n),this.events.cell.stateUpdated.next({state:this,ref:e,cell:r}))}},e.prototype.dispose=function(){this.ev.dispose(),this.actions.dispose()},e.prototype.select=function(e){return b.select(e,this)},e.prototype.selectQ=function(e){return"string"==typeof e?b.select(e,this):b.select(e(b.Generators),this)},e.prototype.applyAction=function(e,t,r){var n=this;return void 0===r&&(r=l.a.RootRef),x.b.create("Apply Action",(function(a){var i=n.cells.get(r);if(!i)throw new Error("'"+r+"' does not exist.");if("ok"!==i.status)throw new Error("Action cannot be applied to a cell with status '"+i.status+"'");return $(e.definition.run({ref:r,cell:i,a:i.obj,params:t,state:n},n.globalContext),a)}))},e.prototype.transaction=function(e,t){var r=this;return x.b.create("State Transaction",(function(n){return Object(v.b)(r,void 0,void 0,(function(){var r,a,i,o;return Object(v.d)(this,(function(s){switch(s.label){case 0:r=this.inTransaction,a=this._tree.asImmutable(),i=!1,s.label=1;case 1:return s.trys.push([1,5,8,9]),r||this.behaviors.isUpdating.next(!0),this.inTransaction=!0,this.inTransactionError=!1,[4,e(n)];case 2:return s.sent(),this.inTransactionError?(i=!0,[4,this.updateTree(a).runInContext(n)]):[3,4];case 3:s.sent(),s.label=4;case 4:return[3,9];case 5:return o=s.sent(),i?[3,7]:(i=!0,[4,this.updateTree(a).runInContext(n)]);case 6:s.sent(),this.events.log.next(A.a.error(""+o)),s.label=7;case 7:if(r)throw this.inTransactionError=!0,o;if(null==t?void 0:t.rethrowErrors)throw o;return[3,9];case 8:return r||(this.inTransaction=!1,this.events.changed.next({state:this,inTransaction:!1}),this.behaviors.isUpdating.next(!1),i||((null==t?void 0:t.canUndo)?this.addHistory(a,"string"==typeof t.canUndo?t.canUndo:void 0):this.clearHistory())),[7];case 9:return[2]}}))}))}))},Object.defineProperty(e.prototype,"inUpdate",{get:function(){return this._inUpdate},enumerable:!1,configurable:!0}),e.prototype.updateTree=function(e,t){var r=this,n={tree:e,options:t};return x.b.create("Update Tree",(function(a){return Object(v.b)(r,void 0,void 0,(function(){var r,i,o,u;return Object(v.d)(this,(function(c){switch(c.label){case 0:return[4,this.updateQueue.enqueue(n)];case 1:if(!c.sent())return[2];this._inUpdate=!0,r=(null==t?void 0:t.canUndo)?this._tree.asImmutable():void 0,i=!1,this.inTransaction||this.behaviors.isUpdating.next(!0),c.label=2;case 2:if(c.trys.push([2,,7,8]),O.is(e)){if(e.editInfo.applied)throw new Error("This builder has already been applied. Create a new builder for further state updates");e.editInfo.applied=!0}return this.reverted=!1,t&&(t.revertIfAborted||t.revertOnError)?[4,this._revertibleTreeUpdate(a,n,t)]:[3,4];case 3:return u=c.sent(),[3,6];case 4:return[4,this._updateTree(a,n)];case 5:u=c.sent(),c.label=6;case 6:return o=u,i=this.reverted,o.ctx.hadError&&(this.inTransactionError=!0),o.cell?[2,new s(o.cell.transform.ref,this)]:[2];case 7:return this._inUpdate=!1,this.updateQueue.handled(n),this.inTransaction||(this.behaviors.isUpdating.next(!1),(null==t?void 0:t.canUndo)?i||this.addHistory(r,"string"==typeof t.canUndo?t.canUndo:void 0):this.undoingHistory||this.clearHistory()),[7];case 8:return[2]}}))}))}),(function(){r.updateQueue.remove(n)}))},e.prototype._revertibleTreeUpdate=function(e,t,r){return Object(v.b)(this,void 0,void 0,(function(){var n,a;return Object(v.d)(this,(function(i){switch(i.label){case 0:return n=this.tree,[4,this._updateTree(e,t)];case 1:return a=i.sent(),(a.ctx.hadError||a.ctx.wasAborted)&&r.revertOnError||a.ctx.wasAborted&&r.revertIfAborted?(this.reverted=!0,[4,this._updateTree(e,{tree:n,options:t.options})]):[3,3];case 2:return[2,i.sent()];case 3:return[2,a]}}))}))},e.prototype._updateTree=function(e,t){return Object(v.b)(this,void 0,void 0,(function(){var r,n,a;return Object(v.d)(this,(function(i){switch(i.label){case 0:r=!1,n=this.updateTreeAndCreateCtx(t.tree,e,t.options),i.label=1;case 1:return i.trys.push([1,,3,4]),[4,L(n)];case 2:return r=i.sent(),O.isTo(t.tree)?(a=this.select(t.tree.ref)[0],[2,{ctx:n,cell:a}]):[2,{ctx:n}];case 3:return this.spine.current=void 0,r&&this.events.changed.next({state:this,inTransaction:this.inTransaction}),[7];case 4:return[2]}}))}))},e.prototype.updateTreeAndCreateCtx=function(e,t,r){var n=(O.is(e)?e.getTree():e).asTransient(),a=this._tree;this._tree=n;var i=this.cells,o={parent:this,editInfo:O.is(e)?e.editInfo:void 0,errorFree:this.errorFree,taskCtx:t,oldTree:a,tree:n,cells:this.cells,spine:this.spine,results:[],options:Object(v.a)(Object(v.a)({},B),r),changed:!1,hadError:!1,wasAborted:!1,newCurrent:void 0,getCellData:function(e){var t;return null===(t=i.get(e).obj)||void 0===t?void 0:t.data}};return this.errorFree=!0,o},e}();(w=R||(R={})).create=function(e,t){return new w(e,t)},(w.ObjectEvent||(w.ObjectEvent={})).isCell=function(e,t){return!!t&&e.ref===t.transform.ref&&e.state===t.parent};var B={doNotLogTiming:!1,doNotUpdateCurrent:!0,revertIfAborted:!1,revertOnError:!1,canUndo:!1};function L(e){return Object(v.b)(this,void 0,void 0,(function(){var t,r,a,i,o,s,c,l,d,p,f,h,m,g,b,y,x,O,j,S,_,w,C,A,E,P,T,I,k;return Object(v.d)(this,(function(v){switch(v.label){case 0:if(t=!(!e.editInfo||1!==e.editInfo.count||!e.editInfo.lastUpdate||e.editInfo.sourceTree!==e.oldTree),a=[],t)r=[],i=[e.editInfo.lastUpdate];else{for(r=function(e){var t={newTree:e.tree,cells:e.cells,deletes:[]};return u.doPostOrder(e.oldTree,e.oldTree.root,t,F),t.deletes}(e),I=e.parent.current,o=!1,s=0,c=r;s=0;b--)(S=e.cells.get(r[b]))&&Z(S.transform,S.obj,null==S?void 0:S.transform.params,S.cache,e.parent.globalContext);for(d=0,p=r;d0||i.length>0||e.changed]}var M,R,B}))}))}function N(e,t,r){var a=r.cells.get(e.ref);return a&&a.transform.version===e.version?"error"!==a.status&&(!a||a.obj!==n.Null):(r.roots.push(e.ref),!1)}function F(e,t,r){!r.newTree.transforms.has(e.ref)&&r.cells.has(e.ref)&&r.deletes.push(e.ref)}function z(e,t,r){var n=r.cells.get(e.ref);n&&l.a.syncState(n.state,e.state)&&r.parent.events.cell.stateUpdated.next({state:r.parent,ref:e.ref,cell:n})}function U(e,t,r,n){var a=e.cells.get(t),i=a.status!==r;a.status=r,a.errorText=n,i&&e.parent.events.cell.stateUpdated.next({state:e.parent,ref:t,cell:a})}function V(e,t,r){r.cells.get(e.ref).transform=e,U(r,e.ref,"pending")}function H(e){for(var t=0,r=e.dependencies.dependsOn;t=e.currentSize)u.set(f,c);else for(d=0,p=f.length;d=e.currentSize&&t(e);var o=e.currentChunk,s=e.currentIndex;return o[s]=r,o[s+1]=n,o[s+2]=a,o[s+3]=i,e.currentIndex+=4,e.elementCount++},e.add3=function(e,r,n,a){e.currentIndex>=e.currentSize&&t(e);var i=e.currentChunk,o=e.currentIndex;return i[o]=r,i[o+1]=n,i[o+2]=a,e.currentIndex+=3,e.elementCount++},e.add2=function(e,r,n){e.currentIndex>=e.currentSize&&t(e);var a=e.currentChunk,i=e.currentIndex;return a[i]=r,a[i+1]=n,e.currentIndex+=2,e.elementCount++},e.add=function(e,r){return e.currentIndex>=e.currentSize&&t(e),e.currentChunk[e.currentIndex]=r,e.currentIndex+=1,e.elementCount++},e.addRepeat=function(e,r,n){for(var a=0;a=e.currentSize&&t(e),e.currentChunk[e.currentIndex++]=n,e.elementCount++;return e.elementCount},e.addMany=function(e,r){for(var n=e.elementSize,a=0,i=r.length;a=e.currentSize&&t(e);for(var o=e.currentChunk,s=0;su[d].key){m=!1;break}}if(l&&m){for(d=0;d>4;return t=(3735928559^t)+(t<<5),t^=t>>11}function l(e,t){var r=23;return r=31*(r=31*r+e|0)+t|0,r=(3735928559^(r^=r>>4))+(r<<5),r^=r>>11}function d(e,t,r){var n=23;return n=31*(n=31*(n=31*n+e|0)+t|0)+r|0,n=(3735928559^(n^=n>>4))+(n<<5),n^=n>>11}function p(e,t,r,n){var a=23;return a=31*(a=31*(a=31*(a=31*a+e|0)+t|0)+r|0)+n|0,a=(3735928559^(a^=a>>4))+(a<<5),a^=a>>11}function f(e){for(var t=0,r=0,n=e.length;r>>0}r(580),function(){function e(e){this.getKey=e,this.map=new Map,this.keys=[],this.groups=[]}e.prototype.add=function(e){var t=this.getKey(e);if(this.map.has(t)){(r=this.map.get(t))[r.length]=e}else{var r=[e];this.map.set(t,r),this.keys[this.keys.length]=t,this.groups[this.groups.length]=r}},e.prototype.getGrouping=function(){return{keys:this.keys,groups:this.groups,map:this.map}}}();var g=r(878)},function(e,t,r){"use strict";r.d(t,"c",(function(){return h})),r.d(t,"g",(function(){return m})),r.d(t,"b",(function(){return b})),r.d(t,"f",(function(){return v})),r.d(t,"e",(function(){return y})),r.d(t,"a",(function(){return x})),r.d(t,"d",(function(){return g}));var n=r(575),a=r(802),i=r(644),o=r(578),s=r(574),u=r(634),c=r(573),l=r(577),d=r(686),p=r(635),f=r(899),h={kind:"every-loci"};function m(e){return!!e&&"every-loci"===e.kind}var g,b={kind:"empty-loci"};function v(e){return!!e&&"empty-loci"===e.kind}function y(e){return!!e&&"data-loci"===e.kind}function x(e,t,r,n,a){return{kind:"data-loci",tag:e,data:t,elements:r,getBoundingSphere:n,getLabel:a}}!function(e){var t=new d.a("98");function r(e,t){var r;if("every-loci"!==e.kind&&"empty-loci"!==e.kind)return t||(t=Object(o.g)()),"structure-loci"===e.kind?o.g.copy(t,e.structure.boundary.sphere):"element-loci"===e.kind?o.g.copy(t,n.h.Loci.getBoundary(e).sphere):"bond-loci"===e.kind?a.a.getBoundingSphere(e,t):"shape-loci"===e.kind?o.g.copy(t,e.shape.geometry.boundingSphere):"group-loci"===e.kind?i.b.getBoundingSphere(e,t):"data-loci"===e.kind?null===(r=e.getBoundingSphere)||void 0===r?void 0:r.call(e,t):"volume-loci"===e.kind?f.a.getBoundingSphere(e.volume,t):"isosurface-loci"===e.kind?f.a.Isosurface.getBoundingSphere(e.volume,e.isoValue,t):"cell-loci"===e.kind?f.a.Cell.getBoundingSphere(e.volume,e.indices,t):void 0}e.getBundleBoundingSphere=function(e){var n=e.loci.map((function(e){return r(e)})).filter((function(e){return!!e}));t.reset();for(var a=0,i=n;at&&(t=e[r]);return t}function a(e){for(var t=1/0,r=0,n=e.length;rr&&(r=e[n]);return[t,r]}function o(e,t,r){void 0===t&&(t=1),void 0===r&&(r=0);for(var n=e.length,a=0,i=r;i=0)&&(e.push(t),!0)}function f(e,t){var r=e.indexOf(t);if(r<0)return!1;for(var n=r,a=e.length-1;n=3*t?e.normalBuffer.ref.value:new Float32Array(3*t);o===e.normalBuffer.ref.value&&o.fill(0,0,3*t),Object(u.b)(n,a,o,t,r),i.e.update(e.normalBuffer,o)},e.checkForDuplicateVertices=function(e,t){void 0===t&&(t=3);for(var r=e.vertexBuffer.ref.value,n=new Map,a=function(e,t){return e[0].toFixed(t)+"|"+e[1].toFixed(t)+"|"+e[2].toFixed(t)},i=0,s=Object(o.g)(),u=0,c=e.vertexCount;u=1,e.writeDepth=e.opaque}}(n||(n={}))},function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var n,a=r(574),i=r(583),o=r(589),s=r(658),u=r(716),c=Object(a.g)(),l=Object(a.b)(),d=Object(a.g)(),p=Object(a.g)(),f=Object(a.g)(),h=Object(a.g)(),m=a.g.fromArray,g=a.g.triangleNormal,b=a.g.copy,v=a.g.transformMat4,y=a.g.transformMat3,x=a.b.directionTransform,O=i.a.add3,j=i.a.add;!function(e){function t(e,t,r,n){var a=e.vertices,i=e.normals,o=e.indices,s=e.groups,u=e.currentGroup,l=a.elementCount;O(a,t[0],t[1],t[2]),O(a,r[0],r[1],r[2]),O(a,n[0],n[1],n[2]),g(c,t,r,n);for(var d=0;d<3;++d)O(i,c[0],c[1],c[2]),j(s,u);O(o,l,l+1,l+2)}function r(e,t,r){for(var n=r.vertices,a=r.normals,i=r.indices,o=e.vertices,s=e.normals,u=e.indices,d=e.groups,p=e.currentGroup,f=o.elementCount,h=x(l,t),g=0,b=n.length;g65536?0:r.ISPG,u=b.f.create(s||"P 1",a,o),c=m.g.create(r.MAPC-1,r.MAPR-1,r.MAPS-1),l=m.e.convertToCanonicalAxisIndicesFastToSlow(c),d=[r.NX,r.NY,r.NZ],p=l([r.NC,r.NR,r.NS]),h=function(e){return 0===e.originX&&0===e.originY&&0===e.originZ?m.g.create(e.NCSTART,e.NRSTART,e.NSSTART):m.g.create(e.originX/(e.xLength/e.NX),e.originY/(e.yLength/e.NY),e.originZ/(e.zLength/e.NZ))}(r),(null==t?void 0:t.offset)&&m.g.add(h,h,t.offset),g=l(h),S=m.g.create(g[0]/d[0],g[1]/d[1],g[2]/d[2]),_=m.g.create(p[0]/d[0],p[1]/d[1],p[2]/d[2]),w=m.e.Space(p,m.e.invertAxisOrder(c),function(e){var t=Object(y.a)(e);switch(t){case x.a.Float32:return Float32Array;case x.a.Int8:return Int8Array;case x.a.Int16:return Int16Array;case x.a.Uint16:return Uint16Array}throw Error(t+" is not a supported value format.")}(r)),C=m.e.create(w,m.e.Data1(n)),A=0===r.AMIN&&0===r.AMAX&&0===r.AMEAN&&0===r.ARMS,[2,{label:null==t?void 0:t.label,entryId:null==t?void 0:t.entryId,grid:{transform:{kind:"spacegroup",cell:u,fractionalBox:b.b.create(S,m.g.add(m.g.zero(),S,_))},cells:C,stats:{min:isNaN(r.AMIN)||A?Object(O.g)(n):r.AMIN,max:isNaN(r.AMAX)||A?Object(O.e)(n):r.AMAX,mean:isNaN(r.AMEAN)||A?Object(O.f)(n):r.AMEAN,sigma:isNaN(r.ARMS)||0===r.ARMS?Object(O.k)(n):r.ARMS}},sourceData:i.create(e),customProperties:new j.a,_propertyData:Object.create(null)}]}))}))}))}!function(e){e.is=function(e){return"ccp4"===(null==e?void 0:e.kind)},e.create=function(e){return{kind:"ccp4",name:e.name,data:e}}}(i||(i={}));var _,w=r(905);function C(e,t){var r=this;return g.b.create("Create Volume",(function(n){return Object(f.b)(r,void 0,void 0,(function(){var r,n,a,i,o,s,u,c,l,d,p,h;return Object(f.d)(this,(function(f){return r=e.header,n=e.values,a=m.g.create(r.xlen,r.ylen,r.zlen),t&&t.voxelSize&&m.g.mul(a,a,t.voxelSize),i=m.g.create(Object(v.c)(r.alpha),Object(v.c)(r.beta),Object(v.c)(r.gamma)),o=b.f.create("P 1",a,i),s=[r.xRate,r.yRate,r.zRate],u=[r.xExtent,r.yExtent,r.zExtent],c=[r.xStart,r.yStart,r.zStart],l=m.g.create(c[0]/s[0],c[1]/s[1],c[2]/s[2]),d=m.g.create(u[0]/s[0],u[1]/s[1],u[2]/s[2]),p=m.e.Space(u,[0,1,2],Float32Array),h=m.e.create(p,m.e.Data1(n)),[2,{label:null==t?void 0:t.label,entryId:null==t?void 0:t.entryId,grid:{transform:{kind:"spacegroup",cell:o,fractionalBox:b.b.create(l,m.g.add(m.g.zero(),l,d))},cells:h,stats:{min:Object(O.g)(n),max:Object(O.e)(n),mean:Object(O.f)(n),sigma:void 0!==r.sigma?r.sigma:Object(O.k)(n)}},sourceData:_.create(e),customProperties:new j.a,_propertyData:Object.create(null)}]}))}))}))}!function(e){e.is=function(e){return"dsn6"===(null==e?void 0:e.kind)},e.create=function(e){return{kind:"dsn6",name:e.name,data:e}}}(_||(_={}));var A,E=r(959);function P(e,t){var r=this;return g.b.create("Create Volume",(function(){return Object(f.b)(r,void 0,void 0,(function(){var r,n,a,i,o,s;return Object(f.d)(this,(function(u){return r=e.header,n=e.values,a=m.e.Space(r.dim,[0,1,2],Float64Array),i=m.e.create(a,m.e.Data1(n)),o=m.c.fromTranslation(Object(m.c)(),r.min),s=m.c.fromScaling(Object(m.c)(),r.h),m.c.mul(o,o,s),[2,{label:null==t?void 0:t.label,entryId:null==t?void 0:t.entryId,grid:{transform:{kind:"matrix",matrix:o},cells:i,stats:{min:Object(O.g)(n),max:Object(O.e)(n),mean:Object(O.f)(n),sigma:Object(O.k)(n)}},sourceData:A.create(e),customProperties:new j.a,_propertyData:Object.create(null)}]}))}))}))}!function(e){e.is=function(e){return"dx"===(null==e?void 0:e.kind)},e.create=function(e){return{kind:"dx",name:e.name,data:e}}}(A||(A={}));var T=l.b.BuiltIn({name:"volume-from-ccp4",display:{name:"Volume from CCP4/MRC/MAP",description:"Create Volume from CCP4/MRC/MAP data"},from:l.a.Format.Ccp4,to:l.a.Volume.Data,params:function(e){return{voxelSize:c.a.Vec3(m.g.create(1,1,1)),offset:c.a.Vec3(m.g.create(0,0,0)),entryId:c.a.Text("")}}})({apply:function(e){var t=this,r=e.a,n=e.params;return g.b.create("Create volume from CCP4/MRC/MAP",(function(e){return Object(f.b)(t,void 0,void 0,(function(){var t,a;return Object(f.d)(this,(function(i){switch(i.label){case 0:return[4,S(r.data,Object(f.a)(Object(f.a)({},n),{label:r.data.name||r.label})).runInContext(e)];case 1:return t=i.sent(),a={label:t.label||"Volume",description:"Volume "+r.data.header.NX+"×"+r.data.header.NX+"×"+r.data.header.NX},[2,new l.a.Volume.Data(t,a)]}}))}))}))},dispose:function(e){var t=e.b;null==t||t.data.customProperties.dispose()}}),I=l.b.BuiltIn({name:"volume-from-dsn6",display:{name:"Volume from DSN6/BRIX",description:"Create Volume from DSN6/BRIX data"},from:l.a.Format.Dsn6,to:l.a.Volume.Data,params:function(e){return{voxelSize:c.a.Vec3(m.g.create(1,1,1)),entryId:c.a.Text("")}}})({apply:function(e){var t=this,r=e.a,n=e.params;return g.b.create("Create volume from DSN6/BRIX",(function(e){return Object(f.b)(t,void 0,void 0,(function(){var t,a;return Object(f.d)(this,(function(i){switch(i.label){case 0:return[4,C(r.data,Object(f.a)(Object(f.a)({},n),{label:r.data.name||r.label})).runInContext(e)];case 1:return t=i.sent(),a={label:t.label||"Volume",description:"Volume "+r.data.header.xExtent+"×"+r.data.header.yExtent+"×"+r.data.header.zExtent},[2,new l.a.Volume.Data(t,a)]}}))}))}))},dispose:function(e){var t=e.b;null==t||t.data.customProperties.dispose()}}),k=l.b.BuiltIn({name:"volume-from-cube",display:{name:"Volume from Cube",description:"Create Volume from Cube data"},from:l.a.Format.Cube,to:l.a.Volume.Data,params:function(e){return{dataIndex:e?c.a.Select(0,e.data.header.dataSetIds.map((function(e,t){return[t,""+e]}))):c.a.Numeric(0),entryId:c.a.Text("")}}})({apply:function(e){var t=this,r=e.a,n=e.params;return g.b.create("Create volume from Cube",(function(e){return Object(f.b)(t,void 0,void 0,(function(){var t,a;return Object(f.d)(this,(function(i){switch(i.label){case 0:return[4,Object(E.b)(r.data,Object(f.a)(Object(f.a)({},n),{label:r.data.name||r.label})).runInContext(e)];case 1:return t=i.sent(),a={label:t.label||"Volume",description:"Volume "+r.data.header.dim[0]+"×"+r.data.header.dim[1]+"×"+r.data.header.dim[2]},[2,new l.a.Volume.Data(t,a)]}}))}))}))},dispose:function(e){var t=e.b;null==t||t.data.customProperties.dispose()}}),M=l.b.BuiltIn({name:"volume-from-dx",display:{name:"Parse DX",description:"Create volume from DX data."},from:l.a.Format.Dx,to:l.a.Volume.Data})({apply:function(e){var t=this,r=e.a;return g.b.create("Parse DX",(function(e){return Object(f.b)(t,void 0,void 0,(function(){var t,n;return Object(f.d)(this,(function(a){switch(a.label){case 0:return[4,P(r.data,{label:r.data.name||r.label}).runInContext(e)];case 1:return t=a.sent(),n={label:t.label||"Volume",description:"Volume "+r.data.header.dim[0]+"×"+r.data.header.dim[1]+"×"+r.data.header.dim[2]},[2,new l.a.Volume.Data(t,n)]}}))}))}))},dispose:function(e){var t=e.b;null==t||t.data.customProperties.dispose()}}),D=l.b.BuiltIn({name:"volume-from-density-server-cif",display:{name:"Volume from density-server CIF",description:"Identify and create all separate models in the specified CIF data block"},from:l.a.Format.Cif,to:l.a.Volume.Data,params:function(e){if(!e)return{blockHeader:c.a.Optional(c.a.Text(void 0,{description:"Header of the block to parse. If none is specifed, the 1st data block in the file is used."})),entryId:c.a.Text("")};var t=e.data.blocks.slice(1);return{blockHeader:c.a.Optional(c.a.Select(t[0]&&t[0].header,t.map((function(e){return[e.header,e.header]})),{description:"Header of the block to parse"})),entryId:c.a.Text("")}}})({isApplicable:function(e){return e.data.blocks.length>0},apply:function(e){var t=this,r=e.a,n=e.params;return g.b.create("Parse density-server CIF",(function(e){return Object(f.b)(t,void 0,void 0,(function(){var t,a,i,o,s,u,c,d,p,m;return Object(f.d)(this,(function(f){switch(f.label){case 0:if(t=n.blockHeader||r.data.blocks[1].header,!(a=r.data.blocks.find((function(e){return e.header===t}))))throw new Error("Data block '"+[t]+"' not found.");return i=h.a.schema.densityServer(a),[4,Object(w.b)(i,{entryId:n.entryId}).runInContext(e)];case 1:return o=f.sent(),s=o.grid.cells.space.dimensions,u=s[0],c=s[1],d=s[2],p={label:null!==(m=n.entryId)&&void 0!==m?m:i.volume_data_3d_info.name.value(0),description:"Volume "+u+"×"+c+"×"+d},[2,new l.a.Volume.Data(o,p)]}}))}))}))},dispose:function(e){var t=e.b;null==t||t.data.customProperties.dispose()}}),R=l.b.BuiltIn({name:"assign-color-volume",display:{name:"Assign Color Volume",description:"Assigns another volume to be available for coloring."},from:l.a.Volume.Data,to:l.a.Volume.Data,isDecorator:!0,params:function(e,t){if(!e)return{ref:c.a.Text()};var r=t.state.data.select(s.e.Generators.root.subtree().ofType(l.a.Volume.Data).filter((function(t){var r;return!!t.obj&&!(null===(r=t.obj)||void 0===r?void 0:r.data.colorVolume)&&t.obj!==e})));return 0===r.length?{ref:c.a.Text("",{isHidden:!0})}:{ref:c.a.Select(r[0].transform.ref,r.map((function(e){return[e.transform.ref,e.obj.label]})))}}})({apply:function(e){var t=this,r=e.a,n=e.params,a=e.dependencies;return g.b.create("Assign Color Volume",(function(e){return Object(f.b)(t,void 0,void 0,(function(){var e,t,i;return Object(f.d)(this,(function(o){if(!a||!a[n.ref])throw new Error("Dependency not available.");return e=a[n.ref].data,t=Object(f.a)(Object(f.a)({},r.data),{colorVolume:e}),i={label:r.label,description:"Volume + Colors"},[2,new l.a.Volume.Data(t,i)]}))}))}))}}),B={Data:o,Misc:n,Model:p,Volume:a,Representation:r(800),Shape:r(967)}},,,function(e,t,r){"use strict";r.d(t,"m",(function(){return a})),r.d(t,"l",(function(){return i})),r.d(t,"a",(function(){return o})),r.d(t,"j",(function(){return s})),r.d(t,"i",(function(){return u})),r.d(t,"d",(function(){return c})),r.d(t,"c",(function(){return l})),r.d(t,"k",(function(){return d})),r.d(t,"f",(function(){return p})),r.d(t,"e",(function(){return f})),r.d(t,"g",(function(){return h})),r.d(t,"h",(function(){return g})),r.d(t,"b",(function(){return O}));var n=r(572);function a(e,t){var r={},n={},a={},i={},o={},s={};return Object.keys(e).forEach((function(u){var c=e[u];"attribute"===c.type&&(r[u]=t[u]),"define"===c.type&&(n[u]=t[u]),"texture"===c.type&&void 0!==t[u]&&(a[u]=t[u]),"uniform"===c.type&&void 0!==t[u]&&("material"===c.variant?o[u]=t[u]:"buffered"===c.variant?s[u]=t[u]:i[u]=t[u])})),{attributeValues:r,defineValues:n,textureValues:a,uniformValues:i,materialUniformValues:o,bufferedUniformValues:s}}function i(e){var t={};return Object.keys(e).forEach((function(r){t[r]=e[r].ref.version})),t}function o(e,t,r){return{type:"attribute",kind:e,itemSize:t,divisor:r}}function s(e,t){return{type:"uniform",kind:e,variant:t}}function u(e,t,r,n){return{type:"texture",kind:e,format:t,dataType:r,filter:n}}function c(e){return{type:"elements",kind:e}}function l(e,t){return{type:"define",kind:e,options:t}}function d(e){return{type:"value",kind:e}}var p={uModel:s("m4"),uView:s("m4"),uInvView:s("m4"),uModelView:s("m4"),uInvModelView:s("m4"),uProjection:s("m4"),uInvProjection:s("m4"),uModelViewProjection:s("m4"),uInvModelViewProjection:s("m4"),uIsOrtho:s("f"),uPixelRatio:s("f"),uViewportHeight:s("f"),uViewport:s("v4"),uViewOffset:s("v2"),uDrawingBufferSize:s("v2"),uCameraPosition:s("v3"),uCameraDir:s("v3"),uNear:s("f"),uFar:s("f"),uFogNear:s("f"),uFogFar:s("f"),uFogColor:s("v3"),uTransparentBackground:s("b"),uClipObjectType:s("i[]"),uClipObjectInvert:s("b[]"),uClipObjectPosition:s("v3[]"),uClipObjectRotation:s("v4[]"),uClipObjectScale:s("v3[]"),uLightIntensity:s("f"),uAmbientIntensity:s("f"),uMetalness:s("f"),uRoughness:s("f"),uReflectivity:s("f"),uPickingAlphaThreshold:s("f"),uInteriorDarkening:s("f"),uInteriorColorFlag:s("b"),uInteriorColor:s("v3"),uHighlightColor:s("v3"),uSelectColor:s("v3"),uXrayEdgeFalloff:s("f"),uRenderWboit:s("b")},f={tDepth:u("texture","depth","ushort","nearest")},h={uObjectId:s("i")},m={uColor:s("v3","material"),uColorTexDim:s("v2"),uColorGridDim:s("v3"),uColorGridTransform:s("v4"),tColor:u("image-uint8","rgb","ubyte","nearest"),tPalette:u("image-uint8","rgb","ubyte","nearest"),tColorGrid:u("texture","rgb","ubyte","linear"),dColorType:l("string",["uniform","attribute","instance","group","groupInstance","vertex","vertexInstance","volume","volumeInstance"]),dUsePalette:l("boolean")},g={uSize:s("f","material"),uSizeTexDim:s("v2"),tSize:u("image-uint8","rgb","ubyte","nearest"),dSizeType:l("string",["uniform","attribute","instance","group","groupInstance"]),uSizeFactor:s("f")},b={uMarkerTexDim:s("v2"),tMarker:u("image-uint8","alpha","ubyte","nearest")},v={uOverpaintTexDim:s("v2"),tOverpaint:u("image-uint8","rgba","ubyte","nearest"),dOverpaint:l("boolean")},y={uTransparencyTexDim:s("v2"),tTransparency:u("image-uint8","alpha","ubyte","nearest"),dTransparency:l("boolean"),transparencyAverage:d("number")},x={dClipObjectCount:l("number"),dClipVariant:l("string",["instance","pixel"]),uClippingTexDim:s("v2"),tClipping:u("image-uint8","alpha","ubyte","nearest"),dClipping:l("boolean")},O=Object(n.a)(Object(n.a)(Object(n.a)(Object(n.a)(Object(n.a)(Object(n.a)({},m),b),v),y),x),{aInstance:o("float32",1,1),aTransform:o("float32",16,1),uAlpha:s("f","material"),uVertexCount:s("i"),uInstanceCount:s("i"),uGroupCount:s("i"),uInvariantBoundingSphere:s("v4"),drawCount:d("number"),instanceCount:d("number"),alpha:d("number"),matrix:d("m4"),transform:d("float32"),extraTransform:d("float32"),hasReflection:d("boolean"),boundingSphere:d("sphere"),invariantBoundingSphere:d("sphere")})},,function(e,t,r){"use strict";r.d(t,"b",(function(){return a})),r.d(t,"a",(function(){return i}));var n=r(577);function a(e){return e}!function(e){e.getUUID=function(e){return e.__key||(e.__key=n.c.create22()),e.__key}}(a||(a={}));var i=function(){function e(){this._list=[],this._set=new Set,this._refs=new Map,this._assets=new Map}return Object.defineProperty(e.prototype,"all",{get:function(){return this._list},enumerable:!1,configurable:!0}),e.prototype.add=function(e){this._set.has(e)||(this._list.push(e),this._set.add(e))},e.prototype.reference=function(e,t){var r=this._refs.get(e)||0;r+=t?1:-1,this._refs.set(e,Math.max(r,0))},e.prototype.hasReference=function(e){return(this._refs.get(e)||0)>0},e.prototype.has=function(e){return this._set.has(e)},e.prototype.assets=function(e,t){var r=this._assets.get(e);if(r)for(var n=0,a=r;n 0.1) {\n if (intMod(marker, 2.0) > 0.1) {\n gl_FragColor.rgb = mix(uHighlightColor, gl_FragColor.rgb, 0.3);\n gl_FragColor.a = max(0.02, gl_FragColor.a); // for direct-volume rendering\n } else {\n gl_FragColor.rgb = mix(uSelectColor, gl_FragColor.rgb, 0.3);\n }\n}\n",assign_clipping_varying:"\n#if dClipObjectCount != 0 && defined(dClipping)\n vClipping = readFromTexture(tClipping, aInstance * float(uGroupCount) + group, uClippingTexDim).a;\n#endif\n",assign_color_varying:"\n#if defined(dRenderVariant_color)\n #if defined(dColorType_attribute)\n vColor.rgb = aColor;\n #elif defined(dColorType_instance)\n vColor.rgb = readFromTexture(tColor, aInstance, uColorTexDim).rgb;\n #elif defined(dColorType_group)\n vColor.rgb = readFromTexture(tColor, group, uColorTexDim).rgb;\n #elif defined(dColorType_groupInstance)\n vColor.rgb = readFromTexture(tColor, aInstance * float(uGroupCount) + group, uColorTexDim).rgb;\n #elif defined(dColorType_vertex)\n vColor.rgb = readFromTexture(tColor, VertexID, uColorTexDim).rgb;\n #elif defined(dColorType_vertexInstance)\n vColor.rgb = readFromTexture(tColor, int(aInstance) * uVertexCount + VertexID, uColorTexDim).rgb;\n #elif defined(dColorType_volume)\n vec3 gridPos = (uColorGridTransform.w * (position - uColorGridTransform.xyz)) / uColorGridDim;\n vColor.rgb = texture3dFrom2dLinear(tColorGrid, gridPos, uColorGridDim, uColorTexDim).rgb;\n #elif defined(dColorType_volumeInstance)\n vec3 gridPos = (uColorGridTransform.w * (vModelPosition - uColorGridTransform.xyz)) / uColorGridDim;\n vColor.rgb = texture3dFrom2dLinear(tColorGrid, gridPos, uColorGridDim, uColorTexDim).rgb;\n #endif\n\n #ifdef dUsePalette\n vPaletteV = ((vColor.r * 256.0 * 256.0 * 255.0 + vColor.g * 256.0 * 255.0 + vColor.b * 255.0) - 1.0) / 16777215.0;\n #endif\n\n #ifdef dOverpaint\n vOverpaint = readFromTexture(tOverpaint, aInstance * float(uGroupCount) + group, uOverpaintTexDim);\n #endif\n#elif defined(dRenderVariant_pick)\n #if defined(dRenderVariant_pickObject)\n vColor = vec4(encodeFloatRGB(float(uObjectId)), 1.0);\n #elif defined(dRenderVariant_pickInstance)\n vColor = vec4(encodeFloatRGB(aInstance), 1.0);\n #elif defined(dRenderVariant_pickGroup)\n vColor = vec4(encodeFloatRGB(group), 1.0);\n #endif\n#endif\n\n#ifdef dTransparency\n vGroup = group;\n vTransparency = readFromTexture(tTransparency, aInstance * float(uGroupCount) + group, uTransparencyTexDim).a;\n#endif\n",assign_group:"\n#ifdef dGeoTexture\n float group = decodeFloatRGB(readFromTexture(tGroup, VertexID, uGeoTexDim).rgb);\n#else\n float group = aGroup;\n#endif\n",assign_marker_varying:"\nvMarker = readFromTexture(tMarker, aInstance * float(uGroupCount) + group, uMarkerTexDim).a;\n",assign_material_color:"\n#if defined(dRenderVariant_color)\n #if defined(dUsePalette)\n vec4 material = vec4(texture2D(tPalette, vec2(vPaletteV, 0.5)).rgb, uAlpha);\n #elif defined(dColorType_uniform)\n vec4 material = vec4(uColor, uAlpha);\n #elif defined(dColorType_varying)\n vec4 material = vec4(vColor.rgb, uAlpha);\n #endif\n\n // mix material with overpaint\n #if defined(dOverpaint)\n material.rgb = mix(material.rgb, vOverpaint.rgb, vOverpaint.a);\n #endif\n#elif defined(dRenderVariant_pick)\n vec4 material = vColor;\n#elif defined(dRenderVariant_depth)\n #ifdef enabledFragDepth\n vec4 material = packDepthToRGBA(gl_FragDepthEXT);\n #else\n vec4 material = packDepthToRGBA(gl_FragCoord.z);\n #endif\n#endif\n\n// apply screendoor transparency\n#if defined(dTransparency)\n float ta = 1.0 - vTransparency;\n\n #if defined(dRenderVariant_pick)\n if (ta < uPickingAlphaThreshold)\n discard; // ignore so the element below can be picked\n #else\n #if defined(dRenderVariant_colorBlended)\n float at = 0.0;\n\n // shift by view-offset during multi-sample rendering to allow for blending\n vec2 coord = gl_FragCoord.xy + uViewOffset * 0.25;\n\n const mat4 thresholdMatrix = mat4(\n 1.0 / 17.0, 9.0 / 17.0, 3.0 / 17.0, 11.0 / 17.0,\n 13.0 / 17.0, 5.0 / 17.0, 15.0 / 17.0, 7.0 / 17.0,\n 4.0 / 17.0, 12.0 / 17.0, 2.0 / 17.0, 10.0 / 17.0,\n 16.0 / 17.0, 8.0 / 17.0, 14.0 / 17.0, 6.0 / 17.0\n );\n int ci = int(intMod(coord.x, 4.0));\n int ri = int(intMod(coord.y, 4.0));\n #if __VERSION__ == 100\n vec4 i = vec4(float(ci * 4 + ri));\n vec4 v = thresholdMatrix[0] * vec4(equal(i, vec4(0.0, 1.0, 2.0, 3.0))) +\n thresholdMatrix[1] * vec4(equal(i, vec4(4.0, 5.0, 6.0, 7.0))) +\n thresholdMatrix[2] * vec4(equal(i, vec4(8.0, 9.0, 10.0, 11.0))) +\n thresholdMatrix[3] * vec4(equal(i, vec4(12.0, 13.0, 14.0, 15.0)));\n at = v.x + v.y + v.z + v.w;\n #else\n at = thresholdMatrix[ci][ri];\n #endif\n\n if (ta < 0.99 && (ta < 0.01 || ta < at)) {\n discard;\n }\n #elif defined(dRenderVariant_colorWboit)\n material.a *= ta;\n #endif\n #endif\n#endif\n",assign_position:"\nmat4 model = uModel * aTransform;\nmat4 modelView = uView * model;\n#ifdef dGeoTexture\n vec3 position = readFromTexture(tPosition, VertexID, uGeoTexDim).xyz;\n#else\n vec3 position = aPosition;\n#endif\nvec4 position4 = vec4(position, 1.0);\n// for accessing tColorGrid in vert shader and for clipping in frag shader\nvModelPosition = (model * position4).xyz;\nvec4 mvPosition = modelView * position4;\nvViewPosition = mvPosition.xyz;\ngl_Position = uProjection * mvPosition;\n",assign_size:"\n#if defined(dSizeType_uniform)\n float size = uSize;\n#elif defined(dSizeType_attribute)\n float size = aSize;\n#elif defined(dSizeType_instance)\n float size = decodeFloatRGB(readFromTexture(tSize, aInstance, uSizeTexDim).rgb);\n#elif defined(dSizeType_group)\n float size = decodeFloatRGB(readFromTexture(tSize, group, uSizeTexDim).rgb);\n#elif defined(dSizeType_groupInstance)\n float size = decodeFloatRGB(readFromTexture(tSize, aInstance * float(uGroupCount) + group, uSizeTexDim).rgb);\n#endif\n\n#if defined(dSizeType_instance) || defined(dSizeType_group) || defined(dSizeType_groupInstance)\n size /= 100.0; // NOTE factor also set in TypeScript\n#endif\n\nsize *= uSizeFactor;\n",check_picking_alpha:"\nfloat viewZ = depthToViewZ(uIsOrtho, fragmentDepth, uNear, uFar);\nfloat fogFactor = smoothstep(uFogNear, uFogFar, abs(viewZ));\nfloat alpha = (1.0 - fogFactor) * uAlpha;\nif (uAlpha < uPickingAlphaThreshold || alpha < 0.1)\n discard; // ignore so the element below can be picked\n",clip_instance:"\n#if defined(dClipVariant_instance) && dClipObjectCount != 0\n int flag = 0;\n #if defined(dClipping)\n flag = int(floor(vClipping * 255.0 + 0.5));\n #endif\n\n vec4 mCenter = uModel * aTransform * vec4(uInvariantBoundingSphere.xyz, 1.0);\n if (clipTest(vec4(mCenter.xyz, uInvariantBoundingSphere.w), flag))\n // move out of [ -w, +w ] to 'discard' in vert shader\n gl_Position.z = 2.0 * gl_Position.w;\n#endif\n",clip_pixel:"\n#if defined(dClipVariant_pixel) && dClipObjectCount != 0\n #if defined(dClipping)\n int clippingFlag = int(floor(vClipping * 255.0 + 0.5));\n #else\n int clippingFlag = 0;\n #endif\n\n if (clipTest(vec4(vModelPosition, 0.0), clippingFlag))\n discard;\n#endif\n",color_frag_params:"\n#if defined(dRenderVariant_color)\n #if defined(dColorType_uniform)\n uniform vec3 uColor;\n #elif defined(dColorType_varying)\n varying vec4 vColor;\n #endif\n\n #ifdef dOverpaint\n varying vec4 vOverpaint;\n #endif\n#elif defined(dRenderVariant_pick)\n #if __VERSION__ == 100\n varying vec4 vColor;\n #else\n flat in vec4 vColor;\n #endif\n#endif\n\n#ifdef dTransparency\n varying float vGroup;\n varying float vTransparency;\n#endif\n\n#ifdef dUsePalette\n uniform sampler2D tPalette;\n varying float vPaletteV;\n#endif\n",color_vert_params:"\n#if defined(dRenderVariant_color)\n #if defined(dColorType_uniform)\n uniform vec3 uColor;\n #elif defined(dColorType_attribute)\n varying vec4 vColor;\n attribute vec3 aColor;\n #elif defined(dColorType_texture)\n varying vec4 vColor;\n uniform vec2 uColorTexDim;\n uniform sampler2D tColor;\n #elif defined(dColorType_grid)\n varying vec4 vColor;\n uniform vec2 uColorTexDim;\n uniform vec3 uColorGridDim;\n uniform vec4 uColorGridTransform;\n uniform sampler2D tColorGrid;\n #endif\n\n #ifdef dOverpaint\n varying vec4 vOverpaint;\n uniform vec2 uOverpaintTexDim;\n uniform sampler2D tOverpaint;\n #endif\n#elif defined(dRenderVariant_pick)\n #if __VERSION__ == 100\n varying vec4 vColor;\n #else\n flat out vec4 vColor;\n #endif\n#endif\n\n#ifdef dTransparency\n varying float vGroup;\n varying float vTransparency;\n uniform vec2 uTransparencyTexDim;\n uniform sampler2D tTransparency;\n#endif\n\n#ifdef dUsePalette\n varying float vPaletteV;\n#endif\n",common_clip:"\n#if dClipObjectCount != 0\n vec3 quaternionTransform(vec4 q, vec3 v) {\n vec3 t = 2.0 * cross(q.xyz, v);\n return v + q.w * t + cross(q.xyz, t);\n }\n\n vec4 computePlane(vec3 normal, vec3 inPoint) {\n return vec4(normalize(normal), -dot(normal, inPoint));\n }\n\n float planeSD(vec4 plane, vec3 center) {\n return -dot(plane.xyz, center - plane.xyz * -plane.w);\n }\n\n float sphereSD(vec3 position, vec4 rotation, vec3 size, vec3 center) {\n return (\n length(quaternionTransform(vec4(-rotation.x, -rotation.y, -rotation.z, rotation.w), center - position) / size) - 1.0\n ) * min(min(size.x, size.y), size.z);\n }\n\n float cubeSD(vec3 position, vec4 rotation, vec3 size, vec3 center) {\n vec3 d = abs(quaternionTransform(vec4(-rotation.x, -rotation.y, -rotation.z, rotation.w), center - position)) - size;\n return min(max(d.x, max(d.y, d.z)), 0.0) + length(max(d, 0.0));\n }\n\n float cylinderSD(vec3 position, vec4 rotation, vec3 size, vec3 center) {\n vec3 t = quaternionTransform(vec4(-rotation.x, -rotation.y, -rotation.z, rotation.w), center - position);\n\n vec2 d = abs(vec2(length(t.xz), t.y)) - size.xy;\n return min(max(d.x, d.y), 0.0) + length(max(d, 0.0));\n }\n\n float infiniteConeSD(vec3 position, vec4 rotation, vec3 size, vec3 center) {\n vec3 t = quaternionTransform(vec4(-rotation.x, -rotation.y, -rotation.z, rotation.w), center - position);\n\n float q = length(t.xy);\n return dot(size.xy, vec2(q, t.z));\n }\n\n float getSignedDistance(vec3 center, int type, vec3 position, vec4 rotation, vec3 scale) {\n if (type == 1) {\n vec3 normal = quaternionTransform(rotation, vec3(0.0, 1.0, 0.0));\n vec4 plane = computePlane(normal, position);\n return planeSD(plane, center);\n } else if (type == 2) {\n return sphereSD(position, rotation, scale * 0.5, center);\n } else if (type == 3) {\n return cubeSD(position, rotation, scale * 0.5, center);\n } else if (type == 4) {\n return cylinderSD(position, rotation, scale * 0.5, center);\n } else if (type == 5) {\n return infiniteConeSD(position, rotation, scale * 0.5, center);\n } else {\n return 0.1;\n }\n }\n\n #if __VERSION__ == 100\n // 8-bit\n int bitwiseAnd(int a, int b) {\n int d = 128;\n int result = 0;\n for (int i = 0; i < 8; ++i) {\n if (d <= 0) break;\n if (a >= d && b >= d) result += d;\n if (a >= d) a -= d;\n if (b >= d) b -= d;\n d /= 2;\n }\n return result;\n }\n\n bool hasBit(int mask, int bit) {\n return bitwiseAnd(mask, bit) == 0;\n }\n #else\n bool hasBit(int mask, int bit) {\n return (mask & bit) == 0;\n }\n #endif\n\n // flag is a bit-flag for clip-objects to ignore (note, object ids start at 1 not 0)\n bool clipTest(vec4 sphere, int flag) {\n for (int i = 0; i < dClipObjectCount; ++i) {\n if (flag == 0 || hasBit(flag, i + 1)) {\n // TODO take sphere radius into account?\n bool test = getSignedDistance(sphere.xyz, uClipObjectType[i], uClipObjectPosition[i], uClipObjectRotation[i], uClipObjectScale[i]) <= 0.0;\n if ((!uClipObjectInvert[i] && test) || (uClipObjectInvert[i] && !test)) {\n return true;\n }\n }\n }\n return false;\n }\n#endif\n",common_frag_params:"\nuniform int uObjectId;\nuniform int uInstanceCount;\nuniform int uGroupCount;\n\n#if dClipObjectCount != 0\n uniform int uClipObjectType[dClipObjectCount];\n uniform bool uClipObjectInvert[dClipObjectCount];\n uniform vec3 uClipObjectPosition[dClipObjectCount];\n uniform vec4 uClipObjectRotation[dClipObjectCount];\n uniform vec3 uClipObjectScale[dClipObjectCount];\n\n #if defined(dClipping)\n #if __VERSION__ == 100\n varying float vClipping;\n #else\n flat in float vClipping;\n #endif\n #endif\n#endif\n\nuniform vec3 uHighlightColor;\nuniform vec3 uSelectColor;\n#if __VERSION__ == 100\n varying float vMarker;\n#else\n flat in float vMarker;\n#endif\n\nvarying vec3 vModelPosition;\nvarying vec3 vViewPosition;\n\nuniform vec2 uViewOffset;\n\nuniform float uNear;\nuniform float uFar;\nuniform float uIsOrtho;\n\nuniform float uFogNear;\nuniform float uFogFar;\nuniform vec3 uFogColor;\n\nuniform float uAlpha;\nuniform float uPickingAlphaThreshold;\nuniform bool uTransparentBackground;\n\nuniform float uInteriorDarkening;\nuniform bool uInteriorColorFlag;\nuniform vec3 uInteriorColor;\nbool interior;\n\nuniform float uXrayEdgeFalloff;\n\nuniform mat4 uProjection;\n",common_vert_params:"\nuniform mat4 uProjection, uModel, uView;\nuniform vec3 uCameraPosition;\n\nuniform int uObjectId;\nuniform int uVertexCount;\nuniform int uInstanceCount;\nuniform int uGroupCount;\nuniform vec4 uInvariantBoundingSphere;\n\n#if dClipObjectCount != 0\n uniform int uClipObjectType[dClipObjectCount];\n uniform bool uClipObjectInvert[dClipObjectCount];\n uniform vec3 uClipObjectPosition[dClipObjectCount];\n uniform vec4 uClipObjectRotation[dClipObjectCount];\n uniform vec3 uClipObjectScale[dClipObjectCount];\n\n #if defined(dClipping)\n uniform vec2 uClippingTexDim;\n uniform sampler2D tClipping;\n #if __VERSION__ == 100\n varying float vClipping;\n #else\n flat out float vClipping;\n #endif\n #endif\n#endif\n\nuniform vec2 uMarkerTexDim;\nuniform sampler2D tMarker;\n#if __VERSION__ == 100\n varying float vMarker;\n#else\n flat out float vMarker;\n#endif\n\nvarying vec3 vModelPosition;\nvarying vec3 vViewPosition;\n\n#if __VERSION__ == 100\n attribute float aVertex;\n #define VertexID int(aVertex)\n#else\n // not using gl_VertexID but aVertex to ensure there is an active attribute with divisor 0\n // since FF 85 this is not needed anymore but lets keep it for backwards compatibility\n // https://bugzilla.mozilla.org/show_bug.cgi?id=1679693\n // see also note in src/mol-gl/webgl/render-item.ts\n attribute float aVertex;\n #define VertexID int(aVertex)\n // #define VertexID gl_VertexID\n#endif\n",common:"\n// TODO find a better place for these convenience defines\n\n#if defined(dRenderVariant_colorBlended) || defined(dRenderVariant_colorWboit)\n #define dRenderVariant_color\n#endif\n\n#if defined(dRenderVariant_pickObject) || defined(dRenderVariant_pickInstance) || defined(dRenderVariant_pickGroup)\n #define dRenderVariant_pick\n#endif\n\n#if defined(dColorType_instance) || defined(dColorType_group) || defined(dColorType_groupInstance) || defined(dColorType_vertex) || defined(dColorType_vertexInstance)\n #define dColorType_texture\n#endif\n\n#if defined(dColorType_volume) || defined(dColorType_volumeInstance)\n #define dColorType_grid\n#endif\n\n#if defined(dColorType_attribute) || defined(dColorType_texture) || defined(dColorType_grid)\n #define dColorType_varying\n#endif\n\n//\n\n#define PI 3.14159265\n#define RECIPROCAL_PI 0.31830988618\n#define EPSILON 1e-6\n\n#define saturate(a) clamp(a, 0.0, 1.0)\n\nfloat intDiv(const in float a, const in float b) { return float(int(a) / int(b)); }\nvec2 ivec2Div(const in vec2 a, const in vec2 b) { return vec2(ivec2(a) / ivec2(b)); }\nfloat intMod(const in float a, const in float b) { return a - b * float(int(a) / int(b)); }\nint imod(const in int a, const in int b) { return a - b * (a / b); }\n\nfloat pow2(const in float x) { return x * x; }\n\nconst float maxFloat = 10000.0; // NOTE constant also set in TypeScript\nconst float floatLogFactor = 9.210440366976517; // log(maxFloat + 1.0);\nfloat encodeFloatLog(const in float value) { return log(value + 1.0) / floatLogFactor; }\nfloat decodeFloatLog(const in float value) { return exp(value * floatLogFactor) - 1.0; }\n\nvec3 encodeFloatRGB(in float value) {\n value = clamp(value, 0.0, 16777216.0 - 1.0) + 1.0;\n vec3 c = vec3(0.0);\n c.b = mod(value, 256.0);\n value = floor(value / 256.0);\n c.g = mod(value, 256.0);\n value = floor(value / 256.0);\n c.r = mod(value, 256.0);\n return c / 255.0;\n}\nfloat decodeFloatRGB(const in vec3 rgb) {\n return (rgb.r * 256.0 * 256.0 * 255.0 + rgb.g * 256.0 * 255.0 + rgb.b * 255.0) - 1.0;\n}\n\nvec2 packUnitIntervalToRG(const in float v) {\n vec2 enc;\n enc.xy = vec2(fract(v * 256.0), v);\n enc.y -= enc.x * (1.0 / 256.0);\n enc.xy *= 256.0 / 255.0;\n\n return enc;\n}\n\nfloat unpackRGToUnitInterval(const in vec2 enc) {\n return dot(enc, vec2(255.0 / (256.0 * 256.0), 255.0 / 256.0));\n}\n\nvec3 screenSpaceToViewSpace(const in vec3 ssPos, const in mat4 invProjection) {\n vec4 p = vec4(ssPos * 2.0 - 1.0, 1.0);\n p = invProjection * p;\n return p.xyz / p.w;\n}\n\nconst float PackUpscale = 256.0 / 255.0; // fraction -> 0..1 (including 1)\nconst float UnpackDownscale = 255.0 / 256.0; // 0..1 -> fraction (excluding 1)\nconst vec3 PackFactors = vec3(256.0 * 256.0 * 256.0, 256.0 * 256.0, 256.0);\nconst vec4 UnpackFactors = UnpackDownscale / vec4(PackFactors, 1.0);\nconst float ShiftRight8 = 1.0 / 256.0;\n\nvec4 packDepthToRGBA(const in float v) {\n vec4 r = vec4(fract(v * PackFactors), v);\n r.yzw -= r.xyz * ShiftRight8; // tidy overflow\n return r * PackUpscale;\n}\nfloat unpackRGBAToDepth(const in vec4 v) {\n return dot(v, UnpackFactors);\n}\n\nvec4 sRGBToLinear(const in vec4 c) {\n return vec4(mix(pow(c.rgb * 0.9478672986 + vec3(0.0521327014), vec3(2.4)), c.rgb * 0.0773993808, vec3(lessThanEqual(c.rgb, vec3(0.04045)))), c.a);\n}\nvec4 linearTosRGB(const in vec4 c) {\n return vec4(mix(pow(c.rgb, vec3(0.41666)) * 1.055 - vec3(0.055), c.rgb * 12.92, vec3(lessThanEqual(c.rgb, vec3(0.0031308)))), c.a);\n}\n\nfloat linearizeDepth(const in float depth, const in float near, const in float far) {\n return (2.0 * near) / (far + near - depth * (far - near));\n}\n\nfloat perspectiveDepthToViewZ(const in float invClipZ, const in float near, const in float far) {\n return (near * far) / ((far - near) * invClipZ - far);\n}\n\nfloat orthographicDepthToViewZ(const in float linearClipZ, const in float near, const in float far) {\n return linearClipZ * (near - far) - near;\n}\n\nfloat depthToViewZ(const in float isOrtho, const in float linearClipZ, const in float near, const in float far) {\n return isOrtho == 1.0 ? orthographicDepthToViewZ(linearClipZ, near, far) : perspectiveDepthToViewZ(linearClipZ, near, far);\n}\n\n#if __VERSION__ == 100\n // transpose\n\n float transpose(const in float m) {\n return m;\n }\n\n mat2 transpose2(const in mat2 m) {\n return mat2(\n m[0][0], m[1][0],\n m[0][1], m[1][1]\n );\n }\n\n mat3 transpose3(const in mat3 m) {\n return mat3(\n m[0][0], m[1][0], m[2][0],\n m[0][1], m[1][1], m[2][1],\n m[0][2], m[1][2], m[2][2]\n );\n }\n\n mat4 transpose4(const in mat4 m) {\n return mat4(\n m[0][0], m[1][0], m[2][0], m[3][0],\n m[0][1], m[1][1], m[2][1], m[3][1],\n m[0][2], m[1][2], m[2][2], m[3][2],\n m[0][3], m[1][3], m[2][3], m[3][3]\n );\n }\n\n // inverse\n\n float inverse(const in float m) {\n return 1.0 / m;\n }\n\n mat2 inverse2(const in mat2 m) {\n return mat2(m[1][1],-m[0][1],\n -m[1][0], m[0][0]) / (m[0][0]*m[1][1] - m[0][1]*m[1][0]);\n }\n\n mat3 inverse3(const in mat3 m) {\n float a00 = m[0][0], a01 = m[0][1], a02 = m[0][2];\n float a10 = m[1][0], a11 = m[1][1], a12 = m[1][2];\n float a20 = m[2][0], a21 = m[2][1], a22 = m[2][2];\n\n float b01 = a22 * a11 - a12 * a21;\n float b11 = -a22 * a10 + a12 * a20;\n float b21 = a21 * a10 - a11 * a20;\n\n float det = a00 * b01 + a01 * b11 + a02 * b21;\n\n return mat3(b01, (-a22 * a01 + a02 * a21), (a12 * a01 - a02 * a11),\n b11, (a22 * a00 - a02 * a20), (-a12 * a00 + a02 * a10),\n b21, (-a21 * a00 + a01 * a20), (a11 * a00 - a01 * a10)) / det;\n }\n\n mat4 inverse4(const in mat4 m) {\n float\n a00 = m[0][0], a01 = m[0][1], a02 = m[0][2], a03 = m[0][3],\n a10 = m[1][0], a11 = m[1][1], a12 = m[1][2], a13 = m[1][3],\n a20 = m[2][0], a21 = m[2][1], a22 = m[2][2], a23 = m[2][3],\n a30 = m[3][0], a31 = m[3][1], a32 = m[3][2], a33 = m[3][3],\n\n b00 = a00 * a11 - a01 * a10,\n b01 = a00 * a12 - a02 * a10,\n b02 = a00 * a13 - a03 * a10,\n b03 = a01 * a12 - a02 * a11,\n b04 = a01 * a13 - a03 * a11,\n b05 = a02 * a13 - a03 * a12,\n b06 = a20 * a31 - a21 * a30,\n b07 = a20 * a32 - a22 * a30,\n b08 = a20 * a33 - a23 * a30,\n b09 = a21 * a32 - a22 * a31,\n b10 = a21 * a33 - a23 * a31,\n b11 = a22 * a33 - a23 * a32,\n\n det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n\n return mat4(\n a11 * b11 - a12 * b10 + a13 * b09,\n a02 * b10 - a01 * b11 - a03 * b09,\n a31 * b05 - a32 * b04 + a33 * b03,\n a22 * b04 - a21 * b05 - a23 * b03,\n a12 * b08 - a10 * b11 - a13 * b07,\n a00 * b11 - a02 * b08 + a03 * b07,\n a32 * b02 - a30 * b05 - a33 * b01,\n a20 * b05 - a22 * b02 + a23 * b01,\n a10 * b10 - a11 * b08 + a13 * b06,\n a01 * b08 - a00 * b10 - a03 * b06,\n a30 * b04 - a31 * b02 + a33 * b00,\n a21 * b02 - a20 * b04 - a23 * b00,\n a11 * b07 - a10 * b09 - a12 * b06,\n a00 * b09 - a01 * b07 + a02 * b06,\n a31 * b01 - a30 * b03 - a32 * b00,\n a20 * b03 - a21 * b01 + a22 * b00) / det;\n }\n#else\n #define transpose2(m) transpose(m)\n #define transpose3(m) transpose(m)\n #define transpose4(m) transpose(m)\n\n #define inverse2(m) inverse(m)\n #define inverse3(m) inverse(m)\n #define inverse4(m) inverse(m)\n#endif\n",float_to_rgba:"\n // floatToRgba adapted from https://github.com/equinor/glsl-float-to-rgba\n // MIT License, Copyright (c) 2020 Equinor\n\n float shiftRight (float v, float amt) {\n v = floor(v) + 0.5;\n return floor(v / exp2(amt));\n }\n float shiftLeft (float v, float amt) {\n return floor(v * exp2(amt) + 0.5);\n }\n float maskLast (float v, float bits) {\n return mod(v, shiftLeft(1.0, bits));\n }\n float extractBits (float num, float from, float to) {\n from = floor(from + 0.5); to = floor(to + 0.5);\n return maskLast(shiftRight(num, from), to - from);\n }\n\n vec4 floatToRgba(float texelFloat, bool littleEndian) {\n if (texelFloat == 0.0) return vec4(0.0, 0.0, 0.0, 0.0);\n float sign = texelFloat > 0.0 ? 0.0 : 1.0;\n texelFloat = abs(texelFloat);\n float exponent = floor(log2(texelFloat));\n float biased_exponent = exponent + 127.0;\n float fraction = ((texelFloat / exp2(exponent)) - 1.0) * 8388608.0;\n float t = biased_exponent / 2.0;\n float last_bit_of_biased_exponent = fract(t) * 2.0;\n float remaining_bits_of_biased_exponent = floor(t);\n float byte4 = extractBits(fraction, 0.0, 8.0) / 255.0;\n float byte3 = extractBits(fraction, 8.0, 16.0) / 255.0;\n float byte2 = (last_bit_of_biased_exponent * 128.0 + extractBits(fraction, 16.0, 23.0)) / 255.0;\n float byte1 = (sign * 128.0 + remaining_bits_of_biased_exponent) / 255.0;\n return (\n littleEndian\n ? vec4(byte4, byte3, byte2, byte1)\n : vec4(byte1, byte2, byte3, byte4)\n );\n }\n",light_frag_params:"\nuniform float uLightIntensity;\nuniform float uAmbientIntensity;\nuniform float uReflectivity;\nuniform float uMetalness;\nuniform float uRoughness;\n\nstruct PhysicalMaterial {\n vec3 diffuseColor;\n float specularRoughness;\n vec3 specularColor;\n};\n\nstruct IncidentLight {\n vec3 color;\n vec3 direction;\n};\n\nstruct ReflectedLight {\n vec3 directDiffuse;\n vec3 directSpecular;\n vec3 indirectDiffuse;\n};\n\nstruct GeometricContext {\n vec3 position;\n vec3 normal;\n vec3 viewDir;\n};\n\nvec3 F_Schlick(const in vec3 specularColor, const in float dotLH) {\n // Original approximation by Christophe Schlick '94\n // float fresnel = pow( 1.0 - dotLH, 5.0 );\n // Optimized variant (presented by Epic at SIGGRAPH '13)\n // https://cdn2.unrealengine.com/Resources/files/2013SiggraphPresentationsNotes-26915738.pdf\n float fresnel = exp2((-5.55473 * dotLH - 6.98316) * dotLH);\n return (1.0 - specularColor) * fresnel + specularColor;\n}\n\n// Moving Frostbite to Physically Based Rendering 3.0 - page 12, listing 2\n// https://seblagarde.files.wordpress.com/2015/07/course_notes_moving_frostbite_to_pbr_v32.pdf\nfloat G_GGX_SmithCorrelated(const in float alpha, const in float dotNL, const in float dotNV) {\n float a2 = pow2(alpha);\n // dotNL and dotNV are explicitly swapped. This is not a mistake.\n float gv = dotNL * sqrt(a2 + (1.0 - a2) * pow2(dotNV));\n float gl = dotNV * sqrt(a2 + (1.0 - a2) * pow2(dotNL));\n return 0.5 / max(gv + gl, EPSILON);\n}\n\n// Microfacet Models for Refraction through Rough Surfaces - equation (33)\n// http://graphicrants.blogspot.com/2013/08/specular-brdf-reference.html\n// alpha is \"roughness squared\" in Disney’s reparameterization\nfloat D_GGX(const in float alpha, const in float dotNH) {\n float a2 = pow2(alpha);\n float denom = pow2(dotNH) * (a2 - 1.0) + 1.0; // avoid alpha = 0 with dotNH = 1\n return RECIPROCAL_PI * a2 / pow2(denom);\n}\n\nvec3 BRDF_Diffuse_Lambert(const in vec3 diffuseColor) {\n return RECIPROCAL_PI * diffuseColor;\n}\n\n// GGX Distribution, Schlick Fresnel, GGX-Smith Visibility\nvec3 BRDF_Specular_GGX(const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float roughness) {\n float alpha = pow2(roughness); // UE4's roughness\n vec3 halfDir = normalize(incidentLight.direction + geometry.viewDir);\n\n float dotNL = saturate(dot(geometry.normal, incidentLight.direction));\n float dotNV = saturate(dot(geometry.normal, geometry.viewDir));\n float dotNH = saturate(dot(geometry.normal, halfDir));\n float dotLH = saturate(dot(incidentLight.direction, halfDir));\n\n vec3 F = F_Schlick(specularColor, dotLH);\n float G = G_GGX_SmithCorrelated(alpha, dotNL, dotNV);\n float D = D_GGX(alpha, dotNH);\n return F * (G * D);\n}\n\n// ref: https://www.unrealengine.com/blog/physically-based-shading-on-mobile - environmentBRDF for GGX on mobile\nvec3 BRDF_Specular_GGX_Environment(const in GeometricContext geometry, const in vec3 specularColor, const in float roughness) {\n float dotNV = saturate(dot(geometry.normal, geometry.viewDir));\n const vec4 c0 = vec4(-1, -0.0275, -0.572, 0.022);\n const vec4 c1 = vec4(1, 0.0425, 1.04, -0.04);\n vec4 r = roughness * c0 + c1;\n float a004 = min(r.x * r.x, exp2(-9.28 * dotNV)) * r.x + r.y;\n vec2 AB = vec2(-1.04, 1.04) * a004 + r.zw;\n return specularColor * AB.x + AB.y;\n}\n\nvoid RE_Direct_Physical(const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n float dotNL = saturate(dot(geometry.normal, directLight.direction));\n vec3 irradiance = dotNL * directLight.color;\n irradiance *= PI; // punctual light\n\n reflectedLight.directSpecular += irradiance * BRDF_Specular_GGX(directLight, geometry, material.specularColor, material.specularRoughness);\n reflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert(material.diffuseColor);\n}\n\nvoid RE_IndirectDiffuse_Physical(const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n reflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert(material.diffuseColor);\n}\n",matrix_scale:"\nfloat matrixScale(in mat4 m){\n vec4 r = m[0];\n return sqrt(r[0] * r[0] + r[1] * r[1] + r[2] * r[2]);\n}\n",normal_frag_params:"\nvarying vec3 vNormal;\n",read_from_texture:"\nvec4 readFromTexture(const in sampler2D tex, const in float i, const in vec2 dim) {\n float x = intMod(i, dim.x);\n float y = floor(intDiv(i, dim.x));\n vec2 uv = (vec2(x, y) + 0.5) / dim;\n return texture2D(tex, uv);\n}\n\nvec4 readFromTexture(const in sampler2D tex, const in int i, const in vec2 dim) {\n int x = imod(i, int(dim.x));\n int y = i / int(dim.x);\n vec2 uv = (vec2(x, y) + 0.5) / dim;\n return texture2D(tex, uv);\n}\n",rgba_to_float:'\n // rgbaToFloat adapted from https://github.com/ihmeuw/glsl-rgba-to-float\n // BSD 3-Clause License\n //\n // Copyright (c) 2019, Institute for Health Metrics and Evaluation All rights reserved.\n // Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n // - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n // - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n // - Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n //\n // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,\n // INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,\n // OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n // OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n // OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED\n // OF THE POSSIBILITY OF SUCH DAMAGE.\n\n ivec4 floatsToBytes(vec4 inputFloats, bool littleEndian) {\n ivec4 bytes = ivec4(inputFloats * 255.0);\n return (\n littleEndian\n ? bytes.abgr\n : bytes\n );\n }\n\n // Break the four bytes down into an array of 32 bits.\n void bytesToBits(const in ivec4 bytes, out bool bits[32]) {\n for (int channelIndex = 0; channelIndex < 4; ++channelIndex) {\n float acc = float(bytes[channelIndex]);\n for (int indexInByte = 7; indexInByte >= 0; --indexInByte) {\n float powerOfTwo = exp2(float(indexInByte));\n bool bit = acc >= powerOfTwo;\n bits[channelIndex * 8 + (7 - indexInByte)] = bit;\n acc = mod(acc, powerOfTwo);\n }\n }\n }\n\n // Compute the exponent of the 32-bit float.\n float getExponent(bool bits[32]) {\n const int startIndex = 1;\n const int bitStringLength = 8;\n const int endBeforeIndex = startIndex + bitStringLength;\n float acc = 0.0;\n int pow2 = bitStringLength - 1;\n for (int bitIndex = startIndex; bitIndex < endBeforeIndex; ++bitIndex) {\n acc += float(bits[bitIndex]) * exp2(float(pow2--));\n }\n return acc;\n }\n\n // Compute the mantissa of the 32-bit float.\n float getMantissa(bool bits[32], bool subnormal) {\n const int startIndex = 9;\n const int bitStringLength = 23;\n const int endBeforeIndex = startIndex + bitStringLength;\n // Leading/implicit/hidden bit convention:\n // If the number is not subnormal (with exponent 0), we add a leading 1 digit.\n float acc = float(!subnormal) * exp2(float(bitStringLength));\n int pow2 = bitStringLength - 1;\n for (int bitIndex = startIndex; bitIndex < endBeforeIndex; ++bitIndex) {\n acc += float(bits[bitIndex]) * exp2(float(pow2--));\n }\n return acc;\n }\n\n // Parse the float from its 32 bits.\n float bitsToFloat(bool bits[32]) {\n float signBit = float(bits[0]) * -2.0 + 1.0;\n float exponent = getExponent(bits);\n bool subnormal = abs(exponent - 0.0) < 0.01;\n float mantissa = getMantissa(bits, subnormal);\n float exponentBias = 127.0;\n return signBit * mantissa * exp2(exponent - exponentBias - 23.0);\n }\n\n float rgbaToFloat(vec4 texelRGBA, bool littleEndian) {\n ivec4 rgbaBytes = floatsToBytes(texelRGBA, littleEndian);\n bool bits[32];\n bytesToBits(rgbaBytes, bits);\n return bitsToFloat(bits);\n }\n',size_vert_params:"\n#if defined(dSizeType_uniform)\n uniform float uSize;\n#elif defined(dSizeType_attribute)\n attribute float aSize;\n#elif defined(dSizeType_instance) || defined(dSizeType_group) || defined(dSizeType_groupInstance)\n uniform vec2 uSizeTexDim;\n uniform sampler2D tSize;\n#endif\n\nuniform float uSizeFactor;\n",texture3d_from_1d_trilinear:"\nvec4 texture3dFrom1dTrilinear(const in sampler2D tex, const in vec3 pos, const in vec3 gridDim, const in vec2 texDim, const in float offset) {\n float gdYZ = gridDim.z * gridDim.y;\n float gdZ = gridDim.z;\n vec3 p0 = floor(pos * gridDim);\n vec3 p1 = ceil(pos * gridDim);\n vec3 pd = (pos * gridDim - p0) / (p1 - p0);\n vec4 s000 = readFromTexture(tex, offset + p0.z + p0.y * gdZ + p0.x * gdYZ, texDim);\n vec4 s100 = readFromTexture(tex, offset + p0.z + p0.y * gdZ + p1.x * gdYZ, texDim);\n vec4 s001 = readFromTexture(tex, offset + p1.z + p0.y * gdZ + p0.x * gdYZ, texDim);\n vec4 s101 = readFromTexture(tex, offset + p1.z + p0.y * gdZ + p1.x * gdYZ, texDim);\n vec4 s010 = readFromTexture(tex, offset + p0.z + p1.y * gdZ + p0.x * gdYZ, texDim);\n vec4 s110 = readFromTexture(tex, offset + p0.z + p1.y * gdZ + p1.x * gdYZ, texDim);\n vec4 s011 = readFromTexture(tex, offset + p1.z + p1.y * gdZ + p0.x * gdYZ, texDim);\n vec4 s111 = readFromTexture(tex, offset + p1.z + p1.y * gdZ + p1.x * gdYZ, texDim);\n vec4 s00 = mix(s000, s100, pd.x);\n vec4 s01 = mix(s001, s101, pd.x);\n vec4 s10 = mix(s010, s110, pd.x);\n vec4 s11 = mix(s011, s111, pd.x);\n vec4 s0 = mix(s00, s10, pd.y);\n vec4 s1 = mix(s01, s11, pd.y);\n return mix(s0, s1, pd.z);\n}\n",texture3d_from_2d_linear:"\nvec4 texture3dFrom2dLinear(sampler2D tex, vec3 pos, vec3 gridDim, vec2 texDim) {\n float zSlice0 = floor(pos.z * gridDim.z);\n float column0 = intMod(zSlice0 * gridDim.x, texDim.x) / gridDim.x;\n float row0 = floor(intDiv(zSlice0 * gridDim.x, texDim.x));\n vec2 coord0 = (vec2(column0 * gridDim.x, row0 * gridDim.y) + (pos.xy * gridDim.xy)) / texDim;\n vec4 color0 = texture2D(tex, coord0);\n\n float zSlice1 = zSlice0 + 1.0;\n float column1 = intMod(zSlice1 * gridDim.x, texDim.x) / gridDim.x;\n float row1 = floor(intDiv(zSlice1 * gridDim.x, texDim.x));\n vec2 coord1 = (vec2(column1 * gridDim.x, row1 * gridDim.y) + (pos.xy * gridDim.xy)) / texDim;\n vec4 color1 = texture2D(tex, coord1);\n\n float delta0 = abs((pos.z * gridDim.z) - zSlice0);\n return mix(color0, color1, delta0);\n}\n",texture3d_from_2d_nearest:"\nvec4 texture3dFrom2dNearest(sampler2D tex, vec3 pos, vec3 gridDim, vec2 texDim) {\n float zSlice = floor(pos.z * gridDim.z + 0.5); // round to nearest z-slice\n float column = intMod(zSlice * gridDim.x, texDim.x) / gridDim.x;\n float row = floor(intDiv(zSlice * gridDim.x, texDim.x));\n vec2 coord = (vec2(column * gridDim.x, row * gridDim.y) + (pos.xy * gridDim.xy)) / texDim;\n return texture2D(tex, coord);\n}\n",wboit_params:"\n#if defined(dRenderVariant_colorWboit)\n #if !defined(dRenderMode_volume) && !defined(dRenderMode_isosurface)\n uniform sampler2D tDepth;\n uniform vec2 uDrawingBufferSize;\n\n float getDepth(const in vec2 coords) {\n // always packed due to merged depth from primitives and volumes\n return unpackRGBAToDepth(texture2D(tDepth, coords));\n }\n #endif\n#endif\n\nuniform bool uRenderWboit;\n\nfloat calcDepth(const in vec3 pos) {\n vec2 clipZW = pos.z * uProjection[2].zw + uProjection[3].zw;\n return 0.5 + 0.5 * clipZW.x / clipZW.y;\n}\n",wboit_write:"\n#if defined(dRenderVariant_colorWboit)\n if (!uRenderWboit) {\n if (preFogAlpha < 1.0) {\n discard;\n }\n } else if (uRenderWboit) {\n // the 'fragmentDepth > 0.99' check is to handle precision issues with packed depth\n if (preFogAlpha != 1.0 && !interior && (fragmentDepth < getDepth(gl_FragCoord.xy / uDrawingBufferSize) || fragmentDepth > 0.99)) {\n float alpha = gl_FragColor.a;\n float wboitWeight = alpha * clamp(pow(1.0 - fragmentDepth, 2.0), 0.01, 1.0);\n gl_FragColor = vec4(gl_FragColor.rgb * alpha * wboitWeight, alpha);\n // extra alpha is to handle pre-multiplied alpha\n #if !defined(dRenderMode_volume) && !defined(dRenderMode_isosurface)\n gl_FragData[1] = vec4((uTransparentBackground ? alpha : 1.0) * alpha * wboitWeight);\n #else\n gl_FragData[1] = vec4(alpha * alpha * wboitWeight);\n #endif\n } else {\n discard;\n }\n }\n#endif\n"},s=/^(?!\/\/)\s*#include\s+(\S+)/gim,u=/[ \t]*\/\/.*\n/g,c=/[ \t]*\/\*[\s\S]*?\*\//g,l=/\n{2,}/g;function d(e){return e.replace(s,(function(e,t){var r=o[t];if(!r)throw new Error("empty chunk, '"+t+"'");return r})).trim().replace(u,"\n").replace(c,"\n").replace(l,"\n")}function p(e,t,r,n,a){return void 0===n&&(n={}),void 0===a&&(a={}),{id:i(),name:e,vert:d(t),frag:d(r),extensions:n,outTypes:a}}var f=p("points","\nprecision highp float;\nprecision highp int;\n\n#include common\n#include read_from_texture\n#include common_vert_params\n#include color_vert_params\n#include size_vert_params\n#include common_clip\n\nuniform float uPixelRatio;\nuniform float uViewportHeight;\n\nattribute vec3 aPosition;\nattribute mat4 aTransform;\nattribute float aInstance;\nattribute float aGroup;\n\nvoid main(){\n #include assign_group\n #include assign_color_varying\n #include assign_marker_varying\n #include assign_clipping_varying\n #include assign_position\n #include assign_size\n\n #ifdef dPointSizeAttenuation\n gl_PointSize = size * uPixelRatio * ((uViewportHeight / 2.0) / -mvPosition.z) * 5.0;\n #else\n gl_PointSize = size * uPixelRatio;\n #endif\n\n gl_Position = uProjection * mvPosition;\n\n #include clip_instance\n}\n","\nprecision highp float;\nprecision highp int;\n\n#include common\n#include common_frag_params\n#include color_frag_params\n#include common_clip\n#include wboit_params\n\n#ifdef dPointFilledCircle\n uniform float uPointEdgeBleach;\n#endif\n\nconst vec2 center = vec2(0.5);\nconst float radius = 0.5;\n\nvoid main(){\n #include clip_pixel\n\n float fragmentDepth = gl_FragCoord.z;\n bool interior = false;\n #include assign_material_color\n\n #if defined(dRenderVariant_pick)\n #include check_picking_alpha\n gl_FragColor = material;\n #elif defined(dRenderVariant_depth)\n gl_FragColor = material;\n #elif defined(dRenderVariant_color)\n gl_FragColor = material;\n\n #ifdef dPointFilledCircle\n float dist = distance(gl_PointCoord, center);\n float alpha = 1.0 - smoothstep(radius - uPointEdgeBleach, radius, dist);\n if (alpha < 0.0001) discard;\n gl_FragColor.a *= alpha;\n #endif\n\n #include apply_marker_color\n #include apply_fog\n #include wboit_write\n #endif\n}\n",{drawBuffers:"optional"}),h=p("spheres",'\nprecision highp float;\nprecision highp int;\n\n#include common\n#include read_from_texture\n#include common_vert_params\n#include color_vert_params\n#include size_vert_params\n#include common_clip\n\nuniform mat4 uModelView;\nuniform mat4 uInvProjection;\n\nattribute vec3 aPosition;\nattribute vec2 aMapping;\nattribute mat4 aTransform;\nattribute float aInstance;\nattribute float aGroup;\n\nvarying float vRadius;\nvarying float vRadiusSq;\nvarying vec3 vPoint;\nvarying vec3 vPointViewPosition;\n\n#include matrix_scale\n\nconst mat4 D = mat4(\n 1.0, 0.0, 0.0, 0.0,\n 0.0, 1.0, 0.0, 0.0,\n 0.0, 0.0, 1.0, 0.0,\n 0.0, 0.0, 0.0, -1.0\n);\n\n/**\n * Compute point size and center using the technique described in:\n * "GPU-Based Ray-Casting of Quadratic Surfaces" http://dl.acm.org/citation.cfm?id=2386396\n * by Christian Sigg, Tim Weyrich, Mario Botsch, Markus Gross.\n */\nvoid quadraticProjection(const in float radius, const in vec3 position){\n vec2 xbc, ybc;\n\n mat4 T = mat4(\n radius, 0.0, 0.0, 0.0,\n 0.0, radius, 0.0, 0.0,\n 0.0, 0.0, radius, 0.0,\n position.x, position.y, position.z, 1.0\n );\n\n mat4 R = transpose4(uProjection * uModelView * aTransform * T);\n float A = dot(R[3], D * R[3]);\n float B = -2.0 * dot(R[0], D * R[3]);\n float C = dot(R[0], D * R[0]);\n xbc[0] = (-B - sqrt(B * B - 4.0 * A * C)) / (2.0 * A);\n xbc[1] = (-B + sqrt(B * B - 4.0 * A * C)) / (2.0 * A);\n float sx = abs(xbc[0] - xbc[1]) * 0.5;\n\n A = dot(R[3], D * R[3]);\n B = -2.0 * dot(R[1], D * R[3]);\n C = dot(R[1], D * R[1]);\n ybc[0] = (-B - sqrt(B * B - 4.0 * A * C)) / (2.0 * A);\n ybc[1] = (-B + sqrt(B * B - 4.0 * A * C)) / (2.0 * A);\n float sy = abs(ybc[0] - ybc[1]) * 0.5;\n\n gl_Position.xy = vec2(0.5 * (xbc.x + xbc.y), 0.5 * (ybc.x + ybc.y));\n gl_Position.xy -= aMapping * vec2(sx, sy);\n gl_Position.xy *= gl_Position.w;\n}\n\n\nvoid main(void){\n #include assign_group\n #include assign_color_varying\n #include assign_marker_varying\n #include assign_clipping_varying\n #include assign_size\n\n vRadius = size * matrixScale(uModelView);\n\n vec4 position4 = vec4(aPosition, 1.0);\n vec4 mvPosition = uModelView * aTransform * position4;\n mvPosition.z -= vRadius; // avoid clipping, added again in fragment shader\n\n gl_Position = uProjection * vec4(mvPosition.xyz, 1.0);\n quadraticProjection(size, aPosition);\n\n vRadiusSq = vRadius * vRadius;\n vec4 vPoint4 = uInvProjection * gl_Position;\n vPoint = vPoint4.xyz / vPoint4.w;\n vPointViewPosition = -mvPosition.xyz / mvPosition.w;\n\n vModelPosition = (uModel * aTransform * position4).xyz; // for clipping in frag shader\n\n #include clip_instance\n}\n',"\nprecision highp float;\nprecision highp int;\n\n#include common\n#include common_frag_params\n#include color_frag_params\n#include light_frag_params\n#include common_clip\n#include wboit_params\n\nvarying float vRadius;\nvarying float vRadiusSq;\nvarying vec3 vPoint;\nvarying vec3 vPointViewPosition;\n\nvec3 cameraPos;\nvec3 cameraNormal;\n\nbool Impostor(out vec3 cameraPos, out vec3 cameraNormal){\n vec3 cameraSpherePos = -vPointViewPosition;\n cameraSpherePos.z += vRadius;\n\n vec3 rayOrigin = mix(vec3(0.0, 0.0, 0.0), vPoint, uIsOrtho);\n vec3 rayDirection = mix(normalize(vPoint), vec3(0.0, 0.0, 1.0), uIsOrtho);\n vec3 cameraSphereDir = mix(cameraSpherePos, rayOrigin - cameraSpherePos, uIsOrtho);\n\n float B = dot(rayDirection, cameraSphereDir);\n float det = B * B + vRadiusSq - dot(cameraSphereDir, cameraSphereDir);\n\n if (det < 0.0){\n discard;\n return false;\n }\n\n float sqrtDet = sqrt(det);\n float posT = mix(B + sqrtDet, B + sqrtDet, uIsOrtho);\n float negT = mix(B - sqrtDet, sqrtDet - B, uIsOrtho);\n\n cameraPos = rayDirection * negT + rayOrigin;\n\n\n if (calcDepth(cameraPos) <= 0.0) {\n cameraPos = rayDirection * posT + rayOrigin;\n interior = true;\n } else {\n interior = false;\n }\n\n cameraNormal = normalize(cameraPos - cameraSpherePos);\n cameraNormal *= float(!interior) * 2.0 - 1.0;\n\n return !interior;\n}\n\nvoid main(void){\n #include clip_pixel\n\n bool flag = Impostor(cameraPos, cameraNormal);\n #ifndef dDoubleSided\n if (interior)\n discard;\n #endif\n\n vec3 vViewPosition = cameraPos;\n gl_FragDepthEXT = calcDepth(vViewPosition);\n if (!flag && gl_FragDepthEXT >= 0.0) {\n gl_FragDepthEXT = 0.0 + (0.0000001 / vRadius);\n }\n\n // bugfix (mac only?)\n if (gl_FragDepthEXT < 0.0) discard;\n if (gl_FragDepthEXT > 1.0) discard;\n\n float fragmentDepth = gl_FragDepthEXT;\n #include assign_material_color\n\n #if defined(dRenderVariant_pick)\n #include check_picking_alpha\n gl_FragColor = material;\n #elif defined(dRenderVariant_depth)\n gl_FragColor = material;\n #elif defined(dRenderVariant_color)\n #ifdef dIgnoreLight\n gl_FragColor = material;\n #else\n vec3 normal = -cameraNormal;\n #include apply_light_color\n #endif\n\n #include apply_interior_color\n #include apply_marker_color\n #include apply_fog\n #include wboit_write\n #endif\n}\n",{fragDepth:"required",drawBuffers:"optional"}),m=p("cylinders","\nprecision highp float;\nprecision highp int;\n\n#include common\n#include read_from_texture\n#include common_vert_params\n#include color_vert_params\n#include size_vert_params\n#include common_clip\n\nuniform mat4 uModelView;\n\nattribute mat4 aTransform;\nattribute float aInstance;\nattribute float aGroup;\n\nattribute vec3 aMapping;\nattribute vec3 aStart;\nattribute vec3 aEnd;\nattribute float aScale;\nattribute float aCap;\n\nvarying mat4 vTransform;\nvarying vec3 vStart;\nvarying vec3 vEnd;\nvarying float vSize;\nvarying float vCap;\n\nuniform float uIsOrtho;\nuniform vec3 uCameraDir;\n\nvoid main() {\n #include assign_group\n #include assign_color_varying\n #include assign_marker_varying\n #include assign_clipping_varying\n #include assign_size\n\n mat4 modelTransform = uModel * aTransform;\n\n vTransform = aTransform;\n vStart = (modelTransform * vec4(aStart, 1.0)).xyz;\n vEnd = (modelTransform * vec4(aEnd, 1.0)).xyz;\n vSize = size * aScale;\n vCap = aCap;\n\n vModelPosition = (vStart + vEnd) * 0.5;\n vec3 camDir = -mix(normalize(vModelPosition - uCameraPosition), uCameraDir, uIsOrtho);\n vec3 dir = vEnd - vStart;\n // ensure cylinder 'dir' is pointing towards the camera\n if(dot(camDir, dir) < 0.0) dir = -dir;\n\n vec3 left = cross(camDir, dir);\n vec3 up = cross(left, dir);\n left = vSize * normalize(left);\n up = vSize * normalize(up);\n\n // move vertex in object-space from center to corner\n vModelPosition += aMapping.x * dir + aMapping.y * left + aMapping.z * up;\n\n vec4 mvPosition = uView * vec4(vModelPosition, 1.0);\n vViewPosition = mvPosition.xyz;\n gl_Position = uProjection * mvPosition;\n\n #include clip_instance\n}\n","\nprecision highp float;\nprecision highp int;\n\nuniform mat4 uView;\n\nvarying mat4 vTransform;\nvarying vec3 vStart;\nvarying vec3 vEnd;\nvarying float vSize;\nvarying float vCap;\n\nuniform vec3 uCameraDir;\nuniform vec3 uCameraPosition;\n\n#include common\n#include common_frag_params\n#include color_frag_params\n#include light_frag_params\n#include common_clip\n#include wboit_params\n\n// adapted from https://www.shadertoy.com/view/4lcSRn\n// The MIT License, Copyright 2016 Inigo Quilez\nbool CylinderImpostor(\n in vec3 rayOrigin, in vec3 rayDir,\n in vec3 start, in vec3 end, in float radius,\n out vec4 intersection, out bool interior\n){\n vec3 ba = end - start;\n vec3 oc = rayOrigin - start;\n\n float baba = dot(ba, ba);\n float bard = dot(ba, rayDir);\n float baoc = dot(ba, oc);\n\n float k2 = baba - bard*bard;\n float k1 = baba * dot(oc, rayDir) - baoc * bard;\n float k0 = baba * dot(oc, oc) - baoc * baoc - radius * radius * baba;\n\n float h = k1 * k1 - k2 * k0;\n if (h < 0.0) return false;\n\n bool topCap = (vCap > 0.9 && vCap < 1.1) || vCap >= 2.9;\n bool bottomCap = (vCap > 1.9 && vCap < 2.1) || vCap >= 2.9;\n\n // body outside\n h = sqrt(h);\n float t = (-k1 - h) / k2;\n float y = baoc + t * bard;\n if (y > 0.0 && y < baba) {\n interior = false;\n intersection = vec4(t, (oc + t * rayDir - ba * y / baba) / radius);\n return true;\n }\n\n if (topCap && y < 0.0) {\n // top cap\n t = -baoc / bard;\n if (abs(k1 + k2 * t) < h) {\n interior = false;\n intersection = vec4(t, ba * sign(y) / baba);\n return true;\n }\n } else if(bottomCap && y >= 0.0) {\n // bottom cap\n t = (baba - baoc) / bard;\n if (abs(k1 + k2 * t) < h) {\n interior = false;\n intersection = vec4(t, ba * sign(y) / baba);\n return true;\n }\n }\n\n #ifdef dDoubleSided\n // body inside\n h = -h;\n t = (-k1 - h) / k2;\n y = baoc + t * bard;\n if (y > 0.0 && y < baba) {\n interior = true;\n intersection = vec4(t, (oc + t * rayDir - ba * y / baba) / radius);\n return true;\n }\n\n // TODO: handle inside caps???\n #endif\n\n return false;\n}\n\nvoid main() {\n #include clip_pixel\n\n vec3 rayDir = mix(normalize(vModelPosition - uCameraPosition), uCameraDir, uIsOrtho);\n\n vec4 intersection;\n bool interior;\n bool hit = CylinderImpostor(vModelPosition, rayDir, vStart, vEnd, vSize, intersection, interior);\n if (!hit) discard;\n\n vec3 vViewPosition = vModelPosition + intersection.x * rayDir;\n vViewPosition = (uView * vec4(vViewPosition, 1.0)).xyz;\n gl_FragDepthEXT = calcDepth(vViewPosition);\n\n // bugfix (mac only?)\n if (gl_FragDepthEXT < 0.0) discard;\n if (gl_FragDepthEXT > 1.0) discard;\n\n float fragmentDepth = gl_FragDepthEXT;\n #include assign_material_color\n\n #if defined(dRenderVariant_pick)\n #include check_picking_alpha\n gl_FragColor = material;\n #elif defined(dRenderVariant_depth)\n gl_FragColor = material;\n #elif defined(dRenderVariant_color)\n #ifdef dIgnoreLight\n gl_FragColor = material;\n #else\n mat3 normalMatrix = transpose3(inverse3(mat3(uView)));\n vec3 normal = normalize(normalMatrix * -normalize(intersection.yzw));\n #include apply_light_color\n #endif\n\n #include apply_interior_color\n #include apply_marker_color\n #include apply_fog\n #include wboit_write\n #endif\n}\n",{fragDepth:"required",drawBuffers:"optional"}),g=p("text","\nprecision highp float;\nprecision highp int;\n\n#include common\n#include read_from_texture\n#include common_vert_params\n#include color_vert_params\n#include size_vert_params\n#include common_clip\n\nuniform mat4 uModelView;\n\nattribute vec3 aPosition;\nattribute vec2 aMapping;\nattribute float aDepth;\nattribute vec2 aTexCoord;\nattribute mat4 aTransform;\nattribute float aInstance;\nattribute float aGroup;\n\nuniform float uOffsetX;\nuniform float uOffsetY;\nuniform float uOffsetZ;\n\n// uniform bool ortho;\nuniform float uPixelRatio;\nuniform float uViewportHeight;\n\nvarying vec2 vTexCoord;\n\n#include matrix_scale\n\nvoid main(void){\n #include assign_group\n #include assign_color_varying\n #include assign_marker_varying\n #include assign_clipping_varying\n #include assign_size\n\n vTexCoord = aTexCoord;\n\n float scale = matrixScale(uModelView);\n\n float offsetX = uOffsetX * scale;\n float offsetY = uOffsetY * scale;\n float offsetZ = (uOffsetZ + aDepth * 0.95) * scale;\n\n vec4 position4 = vec4(aPosition, 1.0);\n vec4 mvPosition = uModelView * aTransform * position4;\n\n vModelPosition = (uModel * aTransform * position4).xyz; // for clipping in frag shader\n\n // TODO\n // #ifdef FIXED_SIZE\n // if (ortho) {\n // scale /= pixelRatio * ((uViewportHeight / 2.0) / -uCameraPosition.z) * 0.1;\n // } else {\n // scale /= pixelRatio * ((uViewportHeight / 2.0) / -mvPosition.z) * 0.1;\n // }\n // #endif\n\n vec4 mvCorner = vec4(mvPosition.xyz, 1.0);\n\n if (vTexCoord.x == 10.0) { // indicates background plane\n // move a bit to the back, taking distance to camera into account to avoid z-fighting\n offsetZ -= 0.001 * distance(uCameraPosition, (uProjection * mvCorner).xyz);\n }\n\n mvCorner.xy += aMapping * size * scale;\n mvCorner.x += offsetX;\n mvCorner.y += offsetY;\n\n // TODO\n // if(ortho){\n // mvCorner.xyz += normalize(-uCameraPosition) * offsetZ;\n // } else {\n // mvCorner.xyz += normalize(-mvCorner.xyz) * offsetZ;\n // }\n mvCorner.xyz += normalize(-mvCorner.xyz) * offsetZ;\n\n gl_Position = uProjection * mvCorner;\n\n vViewPosition = -mvCorner.xyz;\n\n #include clip_instance\n}\n","\nprecision highp float;\nprecision highp int;\n\n#include common\n#include common_frag_params\n#include color_frag_params\n#include common_clip\n#include wboit_params\n\nuniform sampler2D tFont;\n\nuniform vec3 uBorderColor;\nuniform float uBorderWidth;\nuniform vec3 uBackgroundColor;\nuniform float uBackgroundOpacity;\n\nvarying vec2 vTexCoord;\n\nconst float smoothness = 32.0;\nconst float gamma = 2.2;\n\nvoid main2(){\n gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);\n}\n\nvoid main(){\n #include clip_pixel\n\n float fragmentDepth = gl_FragCoord.z;\n bool interior = false;\n #include assign_material_color\n\n if (vTexCoord.x > 1.0) {\n gl_FragColor = vec4(uBackgroundColor, uBackgroundOpacity * material.a);\n } else {\n // retrieve signed distance\n float sdf = texture2D(tFont, vTexCoord).a + uBorderWidth;\n\n // perform adaptive anti-aliasing of the edges\n float w = clamp(smoothness * (abs(dFdx(vTexCoord.x)) + abs(dFdy(vTexCoord.y))), 0.0, 0.5);\n float a = smoothstep(0.5 - w, 0.5 + w, sdf);\n\n // gamma correction for linear attenuation\n a = pow(a, 1.0 / gamma);\n\n if (a < 0.5) discard;\n material.a *= a;\n\n // add border\n float t = 0.5 + uBorderWidth;\n if (uBorderWidth > 0.0 && sdf < t) {\n material.xyz = mix(uBorderColor, material.xyz, smoothstep(t - w, t, sdf));\n }\n\n gl_FragColor = material;\n }\n\n #if defined(dRenderVariant_pick)\n #include check_picking_alpha\n #elif defined(dRenderVariant_depth)\n gl_FragColor = material;\n #elif defined(dRenderVariant_color)\n #include apply_marker_color\n #include apply_fog\n #include wboit_write\n #endif\n}\n",{standardDerivatives:"required",drawBuffers:"optional"}),b=p("lines","\nprecision highp float;\nprecision highp int;\n\n#include common\n#include read_from_texture\n#include common_vert_params\n#include color_vert_params\n#include size_vert_params\n#include common_clip\n\nuniform float uPixelRatio;\nuniform float uViewportHeight;\n\nattribute mat4 aTransform;\nattribute float aInstance;\nattribute float aGroup;\n\nattribute vec2 aMapping;\nattribute vec3 aStart;\nattribute vec3 aEnd;\n\nvoid trimSegment(const in vec4 start, inout vec4 end) {\n // trim end segment so it terminates between the camera plane and the near plane\n // conservative estimate of the near plane\n float a = uProjection[2][2]; // 3rd entry in 3rd column\n float b = uProjection[3][2]; // 3rd entry in 4th column\n float nearEstimate = -0.5 * b / a;\n float alpha = (nearEstimate - start.z) / (end.z - start.z);\n end.xyz = mix(start.xyz, end.xyz, alpha);\n}\n\nvoid main(){\n #include assign_group\n #include assign_color_varying\n #include assign_marker_varying\n #include assign_clipping_varying\n #include assign_size\n\n mat4 modelView = uView * uModel * aTransform;\n\n // camera space\n vec4 start = modelView * vec4(aStart, 1.0);\n vec4 end = modelView * vec4(aEnd, 1.0);\n\n // assign position\n vec4 position4 = vec4((aMapping.y < 0.5) ? aStart : aEnd, 1.0);\n vec4 mvPosition = modelView * position4;\n vViewPosition = mvPosition.xyz;\n\n vModelPosition = (uModel * aTransform * position4).xyz; // for clipping in frag shader\n\n // special case for perspective projection, and segments that terminate either in, or behind, the camera plane\n // clearly the gpu firmware has a way of addressing this issue when projecting into ndc space\n // but we need to perform ndc-space calculations in the shader, so we must address this issue directly\n // perhaps there is a more elegant solution -- WestLangley\n bool perspective = (uProjection[2][3] == -1.0); // 4th entry in the 3rd column\n if (perspective) {\n if (start.z < 0.0 && end.z >= 0.0) {\n trimSegment(start, end);\n } else if (end.z < 0.0 && start.z >= 0.0) {\n trimSegment(end, start);\n }\n }\n\n // clip space\n vec4 clipStart = uProjection * start;\n vec4 clipEnd = uProjection * end;\n\n // ndc space\n vec2 ndcStart = clipStart.xy / clipStart.w;\n vec2 ndcEnd = clipEnd.xy / clipEnd.w;\n\n // direction\n vec2 dir = ndcEnd - ndcStart;\n\n // account for clip-space aspect ratio\n dir.x *= uPixelRatio;\n dir = normalize(dir);\n\n // perpendicular to dir\n vec2 offset = vec2(dir.y, - dir.x);\n\n // undo aspect ratio adjustment\n dir.x /= uPixelRatio;\n offset.x /= uPixelRatio;\n\n // sign flip\n if (aMapping.x < 0.0) offset *= -1.0;\n\n // calculate linewidth\n float linewidth;\n #ifdef dLineSizeAttenuation\n linewidth = size * uPixelRatio * ((uViewportHeight / 2.0) / -start.z) * 5.0;\n #else\n linewidth = size * uPixelRatio;\n #endif\n\n // adjust for linewidth\n offset *= linewidth;\n\n // adjust for clip-space to screen-space conversion\n offset /= uViewportHeight;\n\n // select end\n vec4 clip = (aMapping.y < 0.5) ? clipStart : clipEnd;\n\n // back to clip space\n offset *= clip.w;\n clip.xy += offset;\n gl_Position = clip;\n\n #include clip_instance\n}\n","\nprecision highp float;\nprecision highp int;\n\n#include common\n#include common_frag_params\n#include color_frag_params\n#include common_clip\n#include wboit_params\n\nvoid main(){\n #include clip_pixel\n\n bool interior = false;\n float fragmentDepth = gl_FragCoord.z;\n #include assign_material_color\n\n #if defined(dRenderVariant_pick)\n #include check_picking_alpha\n gl_FragColor = material;\n #elif defined(dRenderVariant_depth)\n gl_FragColor = material;\n #elif defined(dRenderVariant_color)\n gl_FragColor = material;\n\n #include apply_marker_color\n #include apply_fog\n #include wboit_write\n #endif\n}\n",{drawBuffers:"optional"}),v=p("mesh","\nprecision highp float;\nprecision highp int;\nprecision highp sampler2D;\n\n#include common\n#include read_from_texture\n#include common_vert_params\n#include color_vert_params\n#include common_clip\n\n#if defined(dColorType_grid)\n #include texture3d_from_2d_linear\n#endif\n\n#ifdef dGeoTexture\n uniform vec2 uGeoTexDim;\n uniform sampler2D tPosition;\n uniform sampler2D tGroup;\n uniform sampler2D tNormal;\n#else\n attribute vec3 aPosition;\n attribute float aGroup;\n attribute vec3 aNormal;\n#endif\nattribute mat4 aTransform;\nattribute float aInstance;\n\nvarying vec3 vNormal;\n\nvoid main(){\n #include assign_group\n #include assign_marker_varying\n #include assign_clipping_varying\n #include assign_position\n #include assign_color_varying\n #include clip_instance\n\n #ifdef dGeoTexture\n vec3 normal = readFromTexture(tNormal, VertexID, uGeoTexDim).xyz;\n #else\n vec3 normal = aNormal;\n #endif\n mat3 normalMatrix = transpose3(inverse3(mat3(modelView)));\n vec3 transformedNormal = normalize(normalMatrix * normalize(normal));\n #if defined(dFlipSided) && !defined(dDoubleSided) // TODO checking dDoubleSided should not be required, ASR\n transformedNormal = -transformedNormal;\n #endif\n vNormal = transformedNormal;\n}\n","\nprecision highp float;\nprecision highp int;\n\n#include common\n#include common_frag_params\n#include color_frag_params\n#include light_frag_params\n#include normal_frag_params\n#include common_clip\n#include wboit_params\n\nvoid main() {\n #include clip_pixel\n\n // Workaround for buggy gl_FrontFacing (e.g. on some integrated Intel GPUs)\n #if defined(enabledStandardDerivatives)\n vec3 fdx = dFdx(vViewPosition);\n vec3 fdy = dFdy(vViewPosition);\n vec3 faceNormal = normalize(cross(fdx,fdy));\n bool frontFacing = dot(vNormal, faceNormal) > 0.0;\n #else\n bool frontFacing = dot(vNormal, vViewPosition) < 0.0;\n #endif\n\n #if defined(dFlipSided)\n interior = frontFacing;\n #else\n interior = !frontFacing;\n #endif\n\n float fragmentDepth = gl_FragCoord.z;\n #include assign_material_color\n\n #if defined(dRenderVariant_pick)\n #include check_picking_alpha\n gl_FragColor = material;\n #elif defined(dRenderVariant_depth)\n gl_FragColor = material;\n #elif defined(dRenderVariant_color)\n #ifdef dIgnoreLight\n gl_FragColor = material;\n #else\n #if defined(dFlatShaded) && defined(enabledStandardDerivatives)\n vec3 normal = -faceNormal;\n #else\n vec3 normal = -normalize(vNormal);\n #ifdef dDoubleSided\n normal = normal * (float(frontFacing) * 2.0 - 1.0);\n #endif\n #endif\n #include apply_light_color\n #endif\n\n #include apply_interior_color\n #include apply_marker_color\n #include apply_fog\n #include wboit_write\n #endif\n}\n",{standardDerivatives:"optional",drawBuffers:"optional"}),y=p("direct-volume","\nprecision highp float;\n\nattribute vec3 aPosition;\nattribute mat4 aTransform;\nattribute float aInstance;\n\nuniform mat4 uModelView;\nuniform mat4 uProjection;\nuniform vec4 uInvariantBoundingSphere;\n\nvarying vec3 vOrigPos;\nvarying float vInstance;\nvarying vec4 vBoundingSphere;\nvarying mat4 vTransform;\n\nuniform vec3 uBboxSize;\nuniform vec3 uBboxMin;\nuniform vec3 uBboxMax;\nuniform vec3 uGridDim;\nuniform mat4 uTransform;\n\nuniform mat4 uUnitToCartn;\n\nvoid main() {\n vec4 unitCoord = vec4(aPosition + vec3(0.5), 1.0);\n vec4 mvPosition = uModelView * aTransform * uUnitToCartn * unitCoord;\n\n vOrigPos = (aTransform * uUnitToCartn * unitCoord).xyz;\n vInstance = aInstance;\n vBoundingSphere = vec4(\n (aTransform * vec4(uInvariantBoundingSphere.xyz, 1.0)).xyz,\n uInvariantBoundingSphere.w\n );\n vTransform = aTransform;\n\n gl_Position = uProjection * mvPosition;\n\n // move z position to near clip plane (but not too close to get precision issues)\n gl_Position.z = gl_Position.w - 0.01;\n}\n","\nprecision highp float;\nprecision highp int;\n\n#include common\n#include light_frag_params\n\n#if dClipObjectCount != 0\n uniform int uClipObjectType[dClipObjectCount];\n uniform bool uClipObjectInvert[dClipObjectCount];\n uniform vec3 uClipObjectPosition[dClipObjectCount];\n uniform vec4 uClipObjectRotation[dClipObjectCount];\n uniform vec3 uClipObjectScale[dClipObjectCount];\n#endif\n#include common_clip\n\n#include read_from_texture\n#include texture3d_from_1d_trilinear\n#include texture3d_from_2d_nearest\n#include texture3d_from_2d_linear\n\nuniform mat4 uProjection, uTransform, uModelView, uModel, uView;\nuniform vec3 uCameraDir;\n\nuniform sampler2D tDepth;\nuniform vec2 uDrawingBufferSize;\n\nvarying vec3 vOrigPos;\nvarying float vInstance;\nvarying vec4 vBoundingSphere;\nvarying mat4 vTransform;\n\nuniform mat4 uInvView;\nuniform vec2 uIsoValue;\nuniform vec3 uGridDim;\nuniform vec3 uBboxSize;\nuniform sampler2D tTransferTex;\nuniform float uTransferScale;\nuniform float uStepScale;\nuniform float uJumpLength;\n\nuniform int uObjectId;\nuniform int uVertexCount;\nuniform int uInstanceCount;\nuniform int uGroupCount;\n\nuniform vec3 uHighlightColor;\nuniform vec3 uSelectColor;\nuniform vec2 uMarkerTexDim;\nuniform sampler2D tMarker;\n\nuniform float uFogNear;\nuniform float uFogFar;\nuniform vec3 uFogColor;\n\nuniform float uAlpha;\nuniform float uPickingAlphaThreshold;\nuniform bool uTransparentBackground;\n\nuniform float uInteriorDarkening;\nuniform bool uInteriorColorFlag;\nuniform vec3 uInteriorColor;\nbool interior;\n\nuniform float uNear;\nuniform float uFar;\nuniform float uIsOrtho;\n\nuniform vec3 uCellDim;\nuniform vec3 uCameraPosition;\nuniform mat4 uCartnToUnit;\n\n#if __VERSION__ != 100\n // for webgl1 this is given as a 'define'\n uniform int uMaxSteps;\n#endif\n\n#if defined(dGridTexType_2d)\n precision highp sampler2D;\n uniform sampler2D tGridTex;\n uniform vec3 uGridTexDim;\n#elif defined(dGridTexType_3d)\n precision highp sampler3D;\n uniform sampler3D tGridTex;\n#endif\n\n#if defined(dRenderVariant_color)\n #if defined(dColorType_uniform)\n uniform vec3 uColor;\n #elif defined(dColorType_texture)\n uniform vec2 uColorTexDim;\n uniform sampler2D tColor;\n #endif\n\n #ifdef dOverpaint\n varying vec4 vOverpaint;\n uniform vec2 uOverpaintTexDim;\n uniform sampler2D tOverpaint;\n #endif\n#endif\n\n#if defined(dGridTexType_2d)\n vec4 textureVal(vec3 pos) {\n return texture3dFrom2dLinear(tGridTex, pos + (vec3(0.5, 0.5, 0.0) / uGridDim), uGridDim, uGridTexDim.xy);\n }\n vec4 textureGroup(vec3 pos) {\n return texture3dFrom2dNearest(tGridTex, pos + (vec3(0.5, 0.5, 0.0) / uGridDim), uGridDim, uGridTexDim.xy);\n }\n#elif defined(dGridTexType_3d)\n vec4 textureVal(vec3 pos) {\n return texture(tGridTex, pos + (vec3(0.5) / uGridDim));\n }\n vec4 textureGroup(vec3 pos) {\n return texelFetch(tGridTex, ivec3(pos * uGridDim), 0);\n }\n#endif\n\n#include wboit_params\n\nvec4 transferFunction(float value) {\n return texture2D(tTransferTex, vec2(value, 0.0));\n}\n\nfloat getDepth(const in vec2 coords) {\n #ifdef depthTextureSupport\n if (!uRenderWboit) {\n // in case of opaque volumes (and depth texture support)\n return texture2D(tDepth, coords).r;\n } else {\n return unpackRGBAToDepth(texture2D(tDepth, coords));\n }\n #else\n return unpackRGBAToDepth(texture2D(tDepth, coords));\n #endif\n}\n\nconst float gradOffset = 0.5;\n\nvec3 v3m4(vec3 p, mat4 m) {\n return (m * vec4(p, 1.0)).xyz;\n}\n\nfloat preFogAlphaBlended = 0.0;\n\nvec4 raymarch(vec3 startLoc, vec3 step, vec3 rayDir) {\n #if defined(dRenderVariant_color) && !defined(dIgnoreLight)\n mat3 normalMatrix = transpose3(inverse3(mat3(uModelView * vTransform)));\n #endif\n mat4 cartnToUnit = uCartnToUnit * inverse4(vTransform);\n #if defined(dClipVariant_pixel) && dClipObjectCount != 0\n mat4 modelTransform = uModel * vTransform * uTransform;\n #endif\n mat4 modelViewTransform = uModelView * vTransform * uTransform;\n\n vec3 scaleVol = vec3(1.0) / uGridDim;\n vec3 pos = startLoc;\n vec4 cell;\n float prevValue = -1.0;\n float value = 0.0;\n vec4 src = vec4(0.0);\n vec4 dst = vec4(0.0);\n bool hit = false;\n float fragmentDepth;\n\n vec3 posMin = vec3(0.0);\n vec3 posMax = vec3(1.0) - vec3(1.0) / uGridDim;\n\n vec3 unitPos;\n vec3 isoPos;\n\n vec3 nextPos;\n float nextValue;\n\n vec3 color = vec3(0.45, 0.55, 0.8);\n vec3 gradient = vec3(1.0);\n vec3 dx = vec3(gradOffset * scaleVol.x, 0.0, 0.0);\n vec3 dy = vec3(0.0, gradOffset * scaleVol.y, 0.0);\n vec3 dz = vec3(0.0, 0.0, gradOffset * scaleVol.z);\n\n float maxDist = min(vBoundingSphere.w * 2.0, uFar - uNear);\n float maxDistSq = maxDist * maxDist;\n\n for (int i = 0; i < uMaxSteps; ++i) {\n // break when beyond bounding-sphere or far-plane\n vec3 distVec = startLoc - pos;\n if (dot(distVec, distVec) > maxDistSq) break;\n\n unitPos = v3m4(pos, cartnToUnit);\n\n // continue when outside of grid\n if (unitPos.x > posMax.x || unitPos.y > posMax.y || unitPos.z > posMax.z ||\n unitPos.x < posMin.x || unitPos.y < posMin.y || unitPos.z < posMin.z\n ) {\n if (hit) break;\n prevValue = value;\n pos += step;\n continue;\n }\n\n cell = textureVal(unitPos);\n value = cell.a; // current voxel value\n\n if (uJumpLength > 0.0 && value < 0.01) {\n nextPos = pos + rayDir * uJumpLength;\n nextValue = textureVal(v3m4(nextPos, cartnToUnit)).a;\n if (nextValue < 0.01) {\n prevValue = nextValue;\n pos = nextPos;\n continue;\n }\n }\n\n #if defined(dRenderMode_isosurface)\n if (prevValue > 0.0 && ( // there was a prev Value\n (prevValue < uIsoValue.x && value > uIsoValue.x) || // entering isosurface\n (prevValue > uIsoValue.x && value < uIsoValue.x) // leaving isosurface\n )) {\n isoPos = v3m4(mix(pos - step, pos, ((prevValue - uIsoValue.x) / ((prevValue - uIsoValue.x) - (value - uIsoValue.x)))), cartnToUnit);\n\n vec4 mvPosition = modelViewTransform * vec4(isoPos * uGridDim, 1.0);\n\n #if defined(dClipVariant_pixel) && dClipObjectCount != 0\n vec3 vModelPosition = v3m4(isoPos * uGridDim, modelTransform);\n if (clipTest(vec4(vModelPosition, 0.0), 0)) {\n prevValue = value;\n pos += step;\n continue;\n }\n #endif\n\n float depth = calcDepth(mvPosition.xyz);\n if (depth > getDepth(gl_FragCoord.xy / uDrawingBufferSize))\n break;\n\n #ifdef enabledFragDepth\n if (!hit) {\n gl_FragDepthEXT = depth;\n }\n #endif\n\n #if defined(dRenderVariant_pickObject)\n return vec4(encodeFloatRGB(float(uObjectId)), 1.0);\n #elif defined(dRenderVariant_pickInstance)\n return vec4(encodeFloatRGB(vInstance), 1.0);\n #elif defined(dRenderVariant_pickGroup)\n #ifdef dPackedGroup\n return vec4(textureGroup(floor(isoPos * uGridDim + 0.5) / uGridDim).rgb, 1.0);\n #else\n vec3 g = floor(isoPos * uGridDim + 0.5);\n return vec4(encodeFloatRGB(g.z + g.y * uGridDim.z + g.x * uGridDim.z * uGridDim.y), 1.0);\n #endif\n #elif defined(dRenderVariant_depth)\n #ifdef enabledFragDepth\n return packDepthToRGBA(gl_FragDepthEXT);\n #else\n return packDepthToRGBA(depth);\n #endif\n #elif defined(dRenderVariant_color)\n #ifdef dPackedGroup\n float group = decodeFloatRGB(textureGroup(floor(isoPos * uGridDim + 0.5) / uGridDim).rgb);\n #else\n vec3 g = floor(isoPos * uGridDim + 0.5);\n float group = g.z + g.y * uGridDim.z + g.x * uGridDim.z * uGridDim.y;\n #endif\n\n #if defined(dColorType_uniform)\n color = uColor;\n #elif defined(dColorType_instance)\n color = readFromTexture(tColor, vInstance, uColorTexDim).rgb;\n #elif defined(dColorType_group)\n color = readFromTexture(tColor, group, uColorTexDim).rgb;\n #elif defined(dColorType_groupInstance)\n color = readFromTexture(tColor, vInstance * float(uGroupCount) + group, uColorTexDim).rgb;\n #elif defined(dColorType_vertex)\n color = texture3dFrom1dTrilinear(tColor, isoPos, uGridDim, uColorTexDim, 0.0).rgb;\n #elif defined(dColorType_vertexInstance)\n color = texture3dFrom1dTrilinear(tColor, isoPos, uGridDim, uColorTexDim, vInstance * float(uVertexCount)).rgb;\n #endif\n\n // handle flipping and negative isosurfaces\n #ifdef dFlipSided\n bool flipped = value < uIsoValue.y; // flipped\n #else\n bool flipped = value > uIsoValue.y;\n #endif\n interior = value < uIsoValue.x && flipped;\n #ifndef dDoubleSided\n if (interior) {\n prevValue = value;\n pos += step;\n continue;\n }\n #endif\n vec3 vViewPosition = mvPosition.xyz;\n vec4 material = vec4(color, uAlpha);\n\n #ifdef dIgnoreLight\n gl_FragColor = material;\n #else\n #if defined(dFlatShaded)\n // nearest grid point\n isoPos = floor(isoPos * uGridDim + 0.5) / uGridDim;\n #endif\n #ifdef dPackedGroup\n // compute gradient by central differences\n gradient.x = textureVal(isoPos - dx).a - textureVal(isoPos + dx).a;\n gradient.y = textureVal(isoPos - dy).a - textureVal(isoPos + dy).a;\n gradient.z = textureVal(isoPos - dz).a - textureVal(isoPos + dz).a;\n #else\n gradient = textureVal(isoPos).xyz * 2.0 - 1.0;\n #endif\n vec3 normal = -normalize(normalMatrix * normalize(gradient));\n normal = normal * (float(flipped) * 2.0 - 1.0);\n normal = normal * -(float(interior) * 2.0 - 1.0);\n #include apply_light_color\n #endif\n\n float vMarker = readFromTexture(tMarker, vInstance * float(uGroupCount) + group, uMarkerTexDim).a;\n #include apply_interior_color\n #include apply_marker_color\n\n preFogAlphaBlended = (1.0 - preFogAlphaBlended) * gl_FragColor.a + preFogAlphaBlended;\n fragmentDepth = depth;\n #include apply_fog\n\n src = gl_FragColor;\n\n if (!uTransparentBackground) {\n // done in 'apply_fog' otherwise\n src.rgb *= src.a;\n }\n dst = (1.0 - dst.a) * src + dst; // standard blending\n #endif\n\n #ifdef dSingleLayer\n break;\n #endif\n\n hit = true;\n }\n prevValue = value;\n #elif defined(dRenderMode_volume)\n vec4 mvPosition = modelViewTransform * vec4(unitPos * uGridDim, 1.0);\n if (calcDepth(mvPosition.xyz) > getDepth(gl_FragCoord.xy / uDrawingBufferSize))\n break;\n\n #if defined(dClipVariant_pixel) && dClipObjectCount != 0\n vec3 vModelPosition = v3m4(unitPos * uGridDim, modelTransform);\n if (clipTest(vec4(vModelPosition, 0.0), 0)) {\n prevValue = value;\n pos += step;\n continue;\n }\n #endif\n\n #if defined(dRenderVariant_color)\n vec3 vViewPosition = mvPosition.xyz;\n vec4 material = transferFunction(value);\n\n #ifdef dIgnoreLight\n gl_FragColor.rgb = material.rgb;\n #else\n if (material.a >= 0.01) {\n #ifdef dPackedGroup\n // compute gradient by central differences\n gradient.x = textureVal(unitPos - dx).a - textureVal(unitPos + dx).a;\n gradient.y = textureVal(unitPos - dy).a - textureVal(unitPos + dy).a;\n gradient.z = textureVal(unitPos - dz).a - textureVal(unitPos + dz).a;\n #else\n gradient = cell.xyz * 2.0 - 1.0;\n #endif\n vec3 normal = -normalize(normalMatrix * normalize(gradient));\n #include apply_light_color\n } else {\n gl_FragColor.rgb = material.rgb;\n }\n #endif\n\n gl_FragColor.a = material.a * uAlpha * uTransferScale;\n\n #ifdef dPackedGroup\n float group = decodeFloatRGB(textureGroup(floor(unitPos * uGridDim + 0.5) / uGridDim).rgb);\n #else\n vec3 g = floor(unitPos * uGridDim + 0.5);\n float group = g.z + g.y * uGridDim.z + g.x * uGridDim.z * uGridDim.y;\n #endif\n\n float vMarker = readFromTexture(tMarker, vInstance * float(uGroupCount) + group, uMarkerTexDim).a;\n #include apply_marker_color\n\n preFogAlphaBlended = (1.0 - preFogAlphaBlended) * gl_FragColor.a + preFogAlphaBlended;\n fragmentDepth = calcDepth(mvPosition.xyz);\n #include apply_fog\n\n src = gl_FragColor;\n\n if (!uTransparentBackground) {\n // done in 'apply_fog' otherwise\n src.rgb *= src.a;\n }\n dst = (1.0 - dst.a) * src + dst; // standard blending\n #endif\n #endif\n\n // break if the color is opaque enough\n if (dst.a > 0.95)\n break;\n\n pos += step;\n }\n\n #if defined(dRenderMode_isosurface) && defined(enabledFragDepth)\n // ensure depth is written everywhere\n if (!hit)\n gl_FragDepthEXT = 1.0;\n #endif\n\n return dst;\n}\n\n// TODO: support float texture for higher precision values???\n// TODO: support clipping exclusion texture support\n\nvoid main() {\n if (gl_FrontFacing)\n discard;\n\n #if defined(dRenderVariant_pick) || defined(dRenderVariant_depth)\n #if defined(dRenderMode_volume)\n // always ignore pick & depth for volume\n discard;\n #elif defined(dRenderMode_isosurface)\n if (uAlpha < uPickingAlphaThreshold)\n discard; // ignore so the element below can be picked\n #endif\n #endif\n\n vec3 rayDir = mix(normalize(vOrigPos - uCameraPosition), uCameraDir, uIsOrtho);\n vec3 step = rayDir * uStepScale;\n\n float boundingSphereNear = distance(vBoundingSphere.xyz, uCameraPosition) - vBoundingSphere.w;\n float d = max(uNear, boundingSphereNear) - mix(0.0, distance(vOrigPos, uCameraPosition), uIsOrtho);\n vec3 start = mix(uCameraPosition, vOrigPos, uIsOrtho) + (d * rayDir);\n gl_FragColor = raymarch(start, step, rayDir);\n\n #if defined(dRenderVariant_pick) || defined(dRenderVariant_depth)\n // discard when nothing was hit\n if (gl_FragColor == vec4(0.0))\n discard;\n #endif\n\n #if defined(dRenderVariant_color)\n #if defined(dRenderMode_isosurface) && defined(enabledFragDepth)\n float fragmentDepth = gl_FragDepthEXT;\n #else\n float fragmentDepth = calcDepth((uModelView * vec4(start, 1.0)).xyz);\n #endif\n float preFogAlpha = clamp(preFogAlphaBlended, 0.0, 1.0);\n interior = false;\n #include wboit_write\n #endif\n}\n",{fragDepth:"optional",drawBuffers:"optional"}),x=p("image","\nprecision highp float;\nprecision highp int;\n\n#include common\n#include common_vert_params\n\nattribute vec3 aPosition;\nattribute vec2 aUv;\nattribute mat4 aTransform;\nattribute float aInstance;\n\nvarying vec2 vUv;\nvarying float vInstance;\n\nvoid main() {\n #include assign_position\n\n vUv = aUv;\n vInstance = aInstance;\n}\n","\nprecision highp float;\nprecision highp int;\n\n#include common\n#include read_from_texture\n#include common_frag_params\n#include common_clip\n#include wboit_params\n\nuniform vec2 uImageTexDim;\nuniform sampler2D tImageTex;\nuniform sampler2D tGroupTex;\n\nuniform vec2 uMarkerTexDim;\nuniform sampler2D tMarker;\n\nvarying vec2 vUv;\nvarying float vInstance;\n\n#if defined(dInterpolation_catmulrom) || defined(dInterpolation_mitchell) || defined(dInterpolation_bspline)\n #define dInterpolation_cubic\n#endif\n\n#if defined(dInterpolation_cubic)\n #if defined(dInterpolation_catmulrom) || defined(dInterpolation_mitchell)\n #if defined(dInterpolation_catmulrom)\n const float B = 0.0;\n const float C = 0.5;\n #elif defined(dInterpolation_mitchell)\n const float B = 0.333;\n const float C = 0.333;\n #endif\n\n float cubicFilter(float x){\n float f = x;\n if (f < 0.0) {\n f = -f;\n }\n if (f < 1.0) {\n return ((12.0 - 9.0 * B - 6.0 * C) * (f * f * f) +\n (-18.0 + 12.0 * B + 6.0 * C) * (f * f) +\n (6.0 - 2.0 * B)) / 6.0;\n }else if (f >= 1.0 && f < 2.0){\n return ((-B - 6.0 * C) * ( f * f * f)\n + (6.0 * B + 30.0 * C) * (f * f) +\n (-(12.0 * B) - 48.0 * C) * f +\n 8.0 * B + 24.0 * C) / 6.0;\n }else{\n return 0.0;\n }\n }\n #elif defined(dInterpolation_bspline)\n float cubicFilter(float x) {\n float f = x;\n if (f < 0.0) {\n f = -f;\n }\n if (f >= 0.0 && f <= 1.0){\n return (2.0 / 3.0) + (0.5) * (f * f * f) - (f * f);\n } else if (f > 1.0 && f <= 2.0) {\n return 1.0 / 6.0 * pow((2.0 - f), 3.0);\n }\n return 1.0;\n }\n #endif\n\n vec4 biCubic(sampler2D tex, vec2 texCoord) {\n vec2 texelSize = 1.0 / uImageTexDim;\n texCoord -= texelSize / 2.0;\n vec4 nSum = vec4(0.0);\n float nDenom = 0.0;\n vec2 cell = fract(texCoord * uImageTexDim);\n for (float m = -1.0; m <= 2.0; ++m) {\n for (float n = -1.0; n <= 2.0; ++n) {\n vec4 vecData = texture2D(tex, texCoord + texelSize * vec2(m, n));\n float c = cubicFilter(m - cell.x) * cubicFilter(-n + cell.y);\n nSum += vecData * c;\n nDenom += c;\n }\n }\n return nSum / nDenom;\n }\n#endif\n\nvoid main() {\n #include clip_pixel\n\n #if defined(dInterpolation_cubic)\n vec4 imageData = biCubic(tImageTex, vUv);\n #else\n vec4 imageData = texture2D(tImageTex, vUv);\n #endif\n imageData.a = clamp(imageData.a, 0.0, 1.0);\n if (imageData.a > 0.9) imageData.a = 1.0;\n\n float fragmentDepth = gl_FragCoord.z;\n bool interior = false;\n\n #if defined(dRenderVariant_pick)\n if (imageData.a < 0.3)\n discard;\n\n #if defined(dRenderVariant_pickObject)\n gl_FragColor = vec4(encodeFloatRGB(float(uObjectId)), 1.0);\n #elif defined(dRenderVariant_pickInstance)\n gl_FragColor = vec4(encodeFloatRGB(vInstance), 1.0);\n #elif defined(dRenderVariant_pickGroup)\n gl_FragColor = vec4(texture2D(tGroupTex, vUv).rgb, 1.0);\n #endif\n #elif defined(dRenderVariant_depth)\n if (imageData.a < 0.05)\n discard;\n\n gl_FragColor = packDepthToRGBA(gl_FragCoord.z);\n #elif defined(dRenderVariant_color)\n if (imageData.a < 0.05)\n discard;\n\n gl_FragColor = imageData;\n gl_FragColor.a *= uAlpha;\n\n float group = decodeFloatRGB(texture2D(tGroupTex, vUv).rgb);\n float vMarker = readFromTexture(tMarker, vInstance * float(uGroupCount) + group, uMarkerTexDim).a;\n\n #include apply_marker_color\n #include apply_fog\n #include wboit_write\n #endif\n}\n",{drawBuffers:"optional"});function O(e,t,r,n){var o=function(e){if(void 0===e)return"";var t=[];for(var r in e){var n=e[r].ref.value;if(void 0!==n)if("string"==typeof n)t.push("#define "+r+"_"+n);else if("number"==typeof n)t.push("#define "+r+" "+n);else{if("boolean"!=typeof n)throw new Error("unknown define type");n&&t.push("#define "+r)}}return t.join("\n")+"\n"}(r),s=Object(a.q)(e)?"#version 300 es\n#define attribute in\n#define varying out\n#define texture2D texture\n":"",u=Object(a.q)(e)?function(e,t,r,n){var a=["#version 300 es","layout(location = 0) out highp "+(n[0]||"vec4")+" out_FragData0;"];if(r.standardDerivatives&&a.push("#define enabledStandardDerivatives"),r.fragDepth&&a.push("#define enabledFragDepth"),r.drawBuffers){a.push("#define requiredDrawBuffers");for(var i=1,o=e.getParameter(e.MAX_DRAW_BUFFERS);i0?(n.bindTextures(r,0),n.bindTextures(W,r.length)):n.bindTextures(W,0);else{var a=K[t];n.id===O.currentProgramId&&n.id===re&&-1!==g&&g===O.currentMaterialId||(n.id!==O.currentProgramId&&n.use(),n.setUniforms(R),O.currentMaterialId=g,re=n.id),n.setUniforms(D),n.setUniforms(L),r&&r.length>0?(n.bindTextures(r,0),n.bindTextures(W,r.length)):n.bindTextures(W,0),a?(a.bind(),q&&q.bind()):(q&&q.bind(),n.bindAttributes(X)),O.currentRenderItemId=y}if(d.a)try{Object(l.a)(e.gl)}catch(e){throw new Error("Framebuffer error rendering item id "+y+": '"+e+"'")}if(q?_.drawElementsInstanced(z,J,q._dataType,0,$):_.drawArraysInstanced(z,0,J,$),d.a)try{Object(o.a)(e.gl)}catch(e){throw new Error("Draw error rendering item id "+y+": '"+e+"'")}}},update:function(){if(function(e){e.attributes=!1,e.defines=!1,e.elements=!1,e.textures=!1}(ee),u.aVertex){var t=u.uVertexCount.ref.value;u.aVertex.ref.value.length=A.ref.value.length)m.updateSubData(A.ref.value,0,m.length);else{m.destroy();var g=n[s],y=g.itemSize,O=g.divisor;X[a][1]=j.attribute(A.ref.value,y,O),ee.attributes=!0}F[s]=A.ref.version}}if(q&&u.elements.ref.version!==F.elements&&(q.length>=u.elements.ref.value.length?q.updateSubData(u.elements.ref.value,0,q.length):(q.destroy(),q=j.elements(u.elements.ref.value),ee.elements=!0),F.elements=u.elements.ref.version),ee.attributes||ee.defines||ee.elements)for(var S=0,_=b;S<_.length;S++){s=_[S];var C=K[s];C&&C.destroy(),K[s]=w?j.vertexArray(U[s],X,q):null}for(a=0,i=W.length;a>2),l=a+3>>2,d=l+(o-4*l>>2),p=a,f=Math.min(4*l,o),h=Math.max(a,4*d),m=o;switch(r){case n.Highlight:for(var g=l;g0?Math.ceil(e/n):0;return{width:n,height:a,length:n*a*t}}(e,t),i=a.length,o=a.width,s=a.height;return{array:n=n&&n.length>=i?n:new r(i),width:o,height:s}}function s(e,t){void 0===t&&(t=1);var r=e.array,n=e.width,a=e.height,i=r.length/(n*a),o=new Uint8ClampedArray(n*a*4);if(1===i)for(var s=0;s1e5?c:l}function p(e,t,r){var i=3*r,o=d(t);o.reset();for(var s=0,c=3*t;sn&&(r=o,n=s)}return r}function c(e,t){return e*t}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}r.d(t,"a",(function(){return i})),r.d(t,"d",(function(){return s})),r.d(t,"e",(function(){return u})),r.d(t,"b",(function(){return c})),r.d(t,"c",(function(){return l}));var a=Object.prototype.hasOwnProperty;function i(e,t){for(var r=0,n=Object.keys(t);rr-t)return!1;for(var i=0;i]+>/g,"")}},function(e,t,r){"use strict";r.d(t,"g",(function(){return m})),r.d(t,"e",(function(){return g})),r.d(t,"f",(function(){return b})),r.d(t,"c",(function(){return v})),r.d(t,"b",(function(){return y})),r.d(t,"m",(function(){return x})),r.d(t,"l",(function(){return O})),r.d(t,"d",(function(){return j})),r.d(t,"a",(function(){return S})),r.d(t,"j",(function(){return C})),r.d(t,"h",(function(){return A})),r.d(t,"o",(function(){return P})),r.d(t,"n",(function(){return T})),r.d(t,"p",(function(){return I})),r.d(t,"k",(function(){return k})),r.d(t,"i",(function(){return M}));var n=r(572),a=r(575),i=r(574),o=r(737),s=r(576),u=r(584),c=r(906),l=r(698),d=r(587),p=r(573),f=r(782),h=r(578);function m(e,t,r){var n=t.elements,i=t.model;if(-1!==s.d.indexOf(n,r)){for(var o=i.atomicHierarchy.residueAtomSegments,c=o.index,l=o.offsets,d=c[r],p=[],f=l[d],h=l[d+1];f=u?r.aTransform.ref.value:new Float32Array(u),l=0;ls?Math.sqrt(i/s):t.resolution;return Object(n.a)(Object(n.a)({},t),{resolution:u})}var S={ignoreHydrogens:p.a.Boolean(!1,{description:"Whether or not to include hydrogen atoms in the surface calculation."}),traceOnly:p.a.Boolean(!1,{description:"Whether or not to only use trace atoms in the surface calculation."}),includeParent:p.a.Boolean(!1,{description:"Include elements of the parent structure in surface calculation to get a surface patch of the current structure."})},_=(p.a.getDefaultValues(S),Object(i.g)());function w(e,t,r,n){return i.g.squaredDistance(i.g.set(_,e,t,r),n)}function C(e,t,r){var n,i,o=r.ignoreHydrogens,u=r.traceOnly,l=r.includeParent,p=l?e.root.unitMap.get(t.id):t,h=function(e){switch(e.kind){case 0:return e.model.atomicConformation;case 1:return e.model.coarseConformation.spheres;case 2:return e.model.coarseConformation.gaussians}}(p),m=h.x,g=h.y,b=h.z,v=p.elements,y=t.boundary.sphere,x=y.center,O=y.radius,j=(O+7)*(O+7);if(o||u||l&&p!==t){for(var S=[],_=[],C=0,A=v.length;Cj||(S.push(E),_.push(C)))}n=s.f.ofSortedArray(S),i=_}else n=v,i=Object(d.o)(new Int32Array(n.length));l&&p!==t&&function(e,t,r){for(var n=0,a=t.length,i=0,o=r.length;it&&(t=s)}return t+1}function M(e){for(var t=0,r=0,n=e.unitSymmetryGroups;rt&&(t=a)}return t}},function(e,t,r){"use strict";r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return i})),r.d(t,"c",(function(){return s}));var n=function(){function e(e,t){this.getHash=e,this.areEqual=t,this.size=0,this.byHash=new Map}return e.prototype.add=function(e){var t=this.getHash(e);if(this.byHash.has(t)){for(var r=this.byHash.get(t),n=0,a=r.length;n=n;)i=e.charCodeAt(--a);return e.substring(n,a+1)}!function(e){function t(e){return e.data.substring(e.tokenStart,e.tokenEnd)}function r(e){for(var t=e.data;e.position=a;)o=n.charCodeAt(--i);return e.tokenStart=a,e.tokenEnd=i+1,e.position=r,e}e.getTokenString=t,e.reset=function(e){e.position=0,e.lineNumber=1,e.tokenStart=0,e.tokenEnd=0},e.eatLine=r,e.markStart=function(e){e.tokenStart=e.position},e.markLine=o,e.readLine=function(e){return o(e),t(e)},e.readLineTrim=function(e){o(e);var r=e.position;return u(e,e.tokenStart,e.tokenEnd),e.position=r,t(e)},e.markLines=function(e,t){var r=n.create(e.data,2*t);return s(e,t,r),r},e.readLines=function(t,r){for(var n=[],a=0;an.indicesLenMinus2&&function(e){var t=new Uint32Array(1.61*e.indices.length|0);t.set(e.indices),e.indices=t,e.indicesLenMinus2=t.length-2|0}(n),n.indices[n.offset++]=t,n.indices[n.offset++]=r,e.count++}e.add=t,e.addToken=function(e,r){t(e,r.tokenStart,r.tokenEnd)},e.addUnchecked=function(e,t,r){e.indices[e.offset++]=t,e.indices[e.offset++]=r,e.count++},e.create=function(e,t){return{data:e,indicesLenMinus2:(t=Math.max(10,t))-2|0,count:0,offset:0,indices:new Uint32Array(t)}}}(n||(n={}))},function(e,t,r){"use strict";var n;r.d(t,"a",(function(){return n})),function(e){e.error=function(e,r){return void 0===r&&(r=-1),new t(e,r)},e.success=function(e,t){return void 0===t&&(t=[]),new r(e,t)};var t=function(){function e(e,t){this.message=e,this.line=t,this.isError=!0}return e.prototype.toString=function(){return this.line>=0?"[Line "+this.line+"] "+this.message:this.message},e}();e.Error=t;var r=function(e,t){this.result=e,this.warnings=t,this.isError=!1};e.Success=r}(n||(n={}))},,function(e,t,r){"use strict";function n(e,t){void 0===e&&(e=0),void 0===t&&(t=Number.MAX_SAFE_INTEGER);var r=e;return function(){var e=r;return r=(r+1)%t,e}}r.d(t,"a",(function(){return n}))},,function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return a}));var n,a,i=r(577),o=r(576),s=r(726),u=r(574),c=r(578),l=r(755),d=r(965),p=r(966),f=r(737),h=r(714),m=r(607);!function(e){function t(e){var t=e.transforms.length,r=a.Location(e);return Object(m.a)(e.groupCount,t,1,(function(e,t){return r.group=e,r.instance=t,r}))}e.create=function(e,t,r,n,a,o,c){return{id:i.c.create22(),name:e,sourceData:t,geometry:r,transforms:c||[u.c.identity()],get groupCount(){return s.a.getGroupCount(r)},getColor:n,getSize:a,getLabel:o}},e.getTheme=function(e){return{color:Object(p.a)({shape:e},{}),size:Object(d.a)({shape:e},{})}},e.groupIterator=t,e.createTransform=function(e,t){for(var r=t&&t.aTransform.ref.value.length>=16*e.length?t.aTransform.ref.value:new Float32Array(16*e.length),n=0,a=e.length;ns.lineCount&&(i.e.update(s.mappingBuffer,e),i.e.update(s.indexBuffer,t));return s.lineCount=o,i.e.update(s.groupBuffer,r),i.e.update(s.startBuffer,n),i.e.update(s.endBuffer,a),s}(e,t,r,a,o,u,c):function(e,t,r,a,o,u){var c,l=Object(m.g)(),d=-1,p=-1,f={kind:"lines",lineCount:u,mappingBuffer:i.e.create(e),indexBuffer:i.e.create(t),groupBuffer:i.e.create(r),startBuffer:i.e.create(a),endBuffer:i.e.create(o),get boundingSphere(){var e=n(f);if(e!==d){var t=Object(h.a)(f.startBuffer.ref.value,4*f.lineCount,4),r=Object(h.a)(f.endBuffer.ref.value,4*f.lineCount,4);m.g.expandBySphere(l,t,r),d=e}return l},get groupMapping(){return f.groupBuffer.ref.version!==p&&(c=Object(s.c)(f.groupBuffer.ref.value,f.lineCount,4),p=f.groupBuffer.ref.version),c},setBoundingSphere:function(e){m.g.copy(l,e),d=n(f)}};return f}(e,t,r,a,o,u)}function r(e){return t(e?e.mappingBuffer.ref.value:new Float32Array(0),e?e.indexBuffer.ref.value:new Uint32Array(0),e?e.groupBuffer.ref.value:new Float32Array(0),e?e.startBuffer.ref.value:new Float32Array(0),e?e.endBuffer.ref.value:new Float32Array(0),0,e)}function n(e){return Object(y.l)([e.lineCount,e.mappingBuffer.ref.version,e.indexBuffer.ref.version,e.groupBuffer.ref.version,e.startBuffer.ref.version,e.endBuffer.ref.version])}function O(e,t){var r=4*e.lineCount,n=t.instanceCount.ref.value,a=Object(d.b)(),i=a.position,s=e.startBuffer.ref.value,u=e.endBuffer.ref.value,c=t.aTransform.ref.value;return Object(d.a)(r,n,2,(function(e,t){var r=e%4==0?s:u;return t<0?o.g.fromArray(i,r,3*e):o.g.transformMat4Offset(i,r,c,0,3*e,16*t),a}))}function j(e,t,r,n,s){var d=r.instanceCount,p=r.groupCount,f=O(e,t),y=Object(u.a)(r,f,n.color),j=Object(l.a)(r,n.size),S=Object(c.a)(d*p),_=Object(b.c)(),w=Object(v.c)(),C=Object(x.d)(),A={drawCount:2*e.lineCount*3,vertexCount:4*e.lineCount,groupCount:p,instanceCount:d},E=m.g.clone(e.boundingSphere),P=Object(h.b)(E,t.aTransform.ref.value,d);return Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)({aMapping:e.mappingBuffer,aGroup:e.groupBuffer,aStart:e.startBuffer,aEnd:e.endBuffer,elements:e.indexBuffer,boundingSphere:i.e.create(P),invariantBoundingSphere:i.e.create(E),uInvariantBoundingSphere:i.e.create(o.h.ofSphere(E))},y),j),S),_),w),C),t),g.a.createValues(s,A)),{uSizeFactor:i.e.create(s.sizeFactor),dLineSizeAttenuation:i.e.create(s.lineSizeAttenuation),dDoubleSided:i.e.create(!0),dFlipSided:i.e.create(!1)})}e.create=t,e.createEmpty=r,e.fromMesh=function(e,t){for(var r=e.vertexBuffer.ref.value,n=e.indexBuffer.ref.value,a=e.groupBuffer.ref.value,i=p.a.create(3*e.triangleCount,e.triangleCount/10,t),o=0,s=3*e.triangleCount;o[+ "+f(e-1,"other "+Object(s.b)(r))+"]"}function m(e,t){void 0===t&&(t={});var r=Object(n.a)(Object(n.a)({},d),t),i=function(e,t,r,n,i){void 0===t&&(t=!1);void 0===r&&(r=!1);void 0===n&&(n=!1);void 0===i&&(i=!1);var o=e.structureCount,s=e.chainCount,u=e.residueCount,c=e.conformationCount,l=e.elementCount;if(t||1!==l||0!==u||0!==s){if(t||0!==l||1!==u||0!==s){if(t||0!==l||0!==u||1!==s){if(t){d=[];return o>0&&d.push(f(o,"Structure")),s>0&&d.push(f(s,"Chain")),u>0&&d.push(f(u,"Residue")),c>0&&d.push(f(c,"Conformation")),l>0&&d.push(f(l,"Element")),d.join(" + ")}var d=[];return o>0&&d.push(1===o?v(e.firstStructureLoc,{hidePrefix:r,condensed:n,granularity:"structure",reverse:i}):h(o,e.firstStructureLoc,"structure",r,i,n)),s>0&&(d.push(1===s?v(e.firstChainLoc,{condensed:n,granularity:"chain",hidePrefix:r,reverse:i}):h(s,e.firstChainLoc,"chain",r,i,n)),r=!0),u>0&&(d.push(1===u?v(e.firstResidueLoc,{condensed:n,granularity:"residue",hidePrefix:r,reverse:i}):h(u,e.firstResidueLoc,"residue",r,i,n)),r=!0),c>0&&(d.push(1===c?v(e.firstConformationLoc,{condensed:n,granularity:"conformation",hidePrefix:r,reverse:i}):h(c,e.firstConformationLoc,"conformation",r,i,n)),r=!0),l>0&&d.push(1===l?v(e.firstElementLoc,{condensed:n,granularity:"element",hidePrefix:r,reverse:i}):h(l,e.firstElementLoc,"element",r,i,n)),d.join(" + ")}var p=e.firstChainLoc.unit,m=a.n.isAtomic(p)&&1===function(e){var t=e.elements,r=e.model.atomicHierarchy,n=r.chainAtomSegments,a=r.residueAtomSegments,i=n.offsets[n.index[t[0]]],o=n.offsets[n.index[t[t.length-1]]+1]-1;return a.index[o]-a.index[i]+1}(p)||a.n.Traits.is(p.traits,1)?"residue":"chain";return v(e.firstChainLoc,{hidePrefix:r,condensed:n,granularity:m,reverse:i})}return v(e.firstResidueLoc,{hidePrefix:r,condensed:n,granularity:"residue",reverse:i})}return v(e.firstElementLoc,{hidePrefix:r,condensed:n,granularity:"element",reverse:i})}(e,r.countsOnly,r.hidePrefix,r.condensed,r.reverse);return r.htmlStyling?i:Object(s.e)(i)}function g(e,t){return void 0===t&&(t={}),b({loci:[a.h.Loci(e.aStructure,[{unit:e.aUnit,indices:o.d.ofSingleton(e.aIndex)}]),a.h.Loci(e.bStructure,[{unit:e.bUnit,indices:o.d.ofSingleton(e.bIndex)}])]},t)}function b(e,t){void 0===t&&(t={});var r=Object(n.a)(Object(n.a)({},d),t),i=function(e,t){for(var r=t.granularity,n=t.hidePrefix,i=t.reverse,s=t.condensed,u=!0,c=0,l=e.loci;c0){var O=[f[0].join(" | ")];for(v=1,x=f.length;v")}return(f=e.loci.map((function(e){return p(e,t)}))).filter((function(e){return!!e})).join(s?" — ":"
    ")}(e,r);return r.htmlStyling?i:Object(s.e)(i)}function v(e,t){var r,a;void 0===t&&(t={});var i=Object(n.a)(Object(n.a)({},d),t),o=y(e,i.granularity,i.hidePrefix,i.reverse||i.condensed),u=i.condensed?null!==(a=null===(r=o[0])||void 0===r?void 0:r.replace(/\[.*\]/g,"").trim())&&void 0!==a?a:"":o.filter((function(e){return!!e})).join(" | ");return i.htmlStyling?u:Object(s.e)(u)}function y(e,t,r,n){void 0===t&&(t="element"),void 0===r&&(r=!1),void 0===n&&(n=!1);var i=[];if(!r){var o=e.unit.model.entry;o.length>30&&(o=o.substr(0,27)+"…"),i.push(""+o+""),"structure"!==t&&(i.push("Model "+e.unit.model.modelNum+""),i.push("Instance "+e.unit.conformation.operator.name+""))}return a.n.isAtomic(e.unit)?i.push.apply(i,function(e,t,r){void 0===r&&(r=!1);var n=a.h.Location.residueIndex(e),i=a.i.chain.label_asym_id(e),o=a.i.chain.auth_asym_id(e),s=0===e.unit.model.atomicHierarchy.residues.label_seq_id.valueKind(n),u=a.i.residue.label_seq_id(e),c=a.i.residue.auth_seq_id(e),l=a.i.residue.pdbx_PDB_ins_code(e),d=a.i.atom.label_comp_id(e),p=a.i.atom.label_atom_id(e),f=a.i.atom.label_alt_id(e),h=a.i.atom.occupancy(e),m=a.i.residue.microheterogeneityCompIds(e),g="residue"===t&&m.length>1?"("+m.join("|")+")":d,b=[];switch(t){case"element":b.push(""+p+""+(f?"%"+f:""));case"conformation":"conformation"===t&&f&&b.push("Conformation "+f+"");case"residue":var v=u!==c&&s?u:c;b.push(""+g+" "+v+""+(v!==c?" [auth "+c+"]":"")+""+(l||"")+"");case"chain":i===o?b.push(""+i+""):"chain"===t&&a.n.Traits.is(e.unit.traits,1)?b.push("[auth "+o+"]"):b.push(""+i+" [auth "+o+"]")}b.length>0&&1!==h&&!r&&(b[0]=b[0]+" [occupancy "+Math.round(100*h)/100+"]");return b.reverse()}(e,t,n)):a.n.isCoarse(e.unit)?i.push.apply(i,function(e,t){var r=a.i.coarse.asym_id(e),n=a.i.coarse.seq_id_begin(e),i=a.i.coarse.seq_id_end(e),o=[];switch(t){case"element":case"conformation":case"residue":if(n===i){var s=a.i.coarse.entityKey(e),u=e.unit.model.sequence.byEntityKey[s].sequence.compId.value(n-1);o.push(""+u+" "+n+"")}else o.push(""+n+"-"+i+"");case"chain":o.push(""+r+"")}return o.reverse()}(e,t)):i.push("Unknown"),n?i.reverse():i}function x(e,t){void 0===t&&(t={});var r=Object(n.a)(Object(n.a)(Object(n.a)({},d),{measureOnly:!1,unitLabel:"Å"}),t),a=e.loci.map((function(e){return i.d.getCenter(e)})),o=a[0],s=a[1],c=u.g.distance(o,s).toFixed(2)+" "+r.unitLabel;if(r.measureOnly)return c;var l=b(e,r);return r.condensed?c+" | "+l:"Distance "+c+"
    "+l}function O(e,t){void 0===t&&(t={});var r=Object(n.a)(Object(n.a)(Object(n.a)({},d),{measureOnly:!1}),t),a=e.loci.map((function(e){return i.d.getCenter(e)})),o=a[0],s=a[1],l=a[2],p=u.g.sub(Object(u.g)(),o,s),f=u.g.sub(Object(u.g)(),l,s),h=Object(c.f)(u.g.angle(p,f)).toFixed(2)+"°";if(r.measureOnly)return h;var m=b(e,r);return r.condensed?h+" | "+m:"Angle "+h+"
    "+m}function j(e,t){void 0===t&&(t={});var r=Object(n.a)(Object(n.a)(Object(n.a)({},d),{measureOnly:!1}),t),a=e.loci.map((function(e){return i.d.getCenter(e)})),o=a[0],s=a[1],l=a[2],p=a[3],f=Object(c.f)(u.g.dihedralAngle(o,s,l,p)).toFixed(2)+"°";if(r.measureOnly)return f;var h=b(e,r);return r.condensed?f+" | "+h:"Dihedral "+f+"
    "+h}},function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var n,a=r(572),i=r(592),o=r(582),s=r(579),u=r(573),c=r(577);!function(e){var t=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(a.c)(t,e),t}(i.a.Create({name:"Root",typeClass:"Root"}));e.Root=t;var r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(a.c)(t,e),t}(i.a.Create({name:"Category",typeClass:"Object"}));e.Category=r;var n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(a.c)(t,e),t}(i.a.CreateBehavior({name:"Behavior"}));e.Behavior=n,e.Categories={common:"Common",representation:"Representation",interaction:"Interaction","custom-props":"Custom Properties",misc:"Miscellaneous"},e.CreateCategory=i.b.BuiltIn({name:"create-behavior-category",display:{name:"Behavior Category"},from:t,to:r,params:{label:u.a.Text("",{isHidden:!0})}})({apply:function(e){var t=e.params;return new r({},{label:t.label})}});var l=new Map;e.getCategoryId=function(e){return l.get(e.id)},e.create=function(e){var r=i.b.CreateBuiltIn({name:e.name,display:e.display,from:[t],to:[n],params:e.params,apply:function(t,r){var a=t.params,i=e.label?e.label(a):{label:e.display.name,description:e.display.description};return new n(new e.ctor(r,a),i)},update:function(e){var t=this,r=e.b,n=e.newParams;return s.b.create("Update Behavior",(function(){return Object(a.b)(t,void 0,void 0,(function(){return Object(a.d)(this,(function(e){switch(e.label){case 0:return r.data.update?[4,r.data.update(n)]:[2,o.g.UpdateResult.Unchanged];case 1:return[2,e.sent()?o.g.UpdateResult.Updated:o.g.UpdateResult.Unchanged]}}))}))}))},canAutoUpdate:e.canAutoUpdate});return l.set(r.id,e.category),r},e.simpleCommandHandler=function(e,t){return function(){function r(e){this.ctx=e,this.sub=void 0}return r.prototype.register=function(){var r=this;this.sub=e.subscribe(this.ctx,(function(e){return t(e,r.ctx)}))},r.prototype.unregister=function(){this.sub&&this.sub.unsubscribe(),this.sub=void 0},r}()};var d=function(){function e(e,t){this.ctx=e,this.params=t,this.subs=[]}return e.prototype.subscribeCommand=function(e,t){this.subs.push(e.subscribe(this.ctx,t))},e.prototype.subscribeObservable=function(e,t){this.subs.push(e.subscribe(t))},e.prototype.track=function(e){this.subs.push(e)},e.prototype.unregister=function(){for(var e=0,t=this.subs;e>16&255)+", "+(e>>8&255)+", "+(255&e)+")"},e.toHexString=function(e){return"0x"+("000000"+e.toString(16)).slice(-6)},e.toRgbString=function(t){return"RGB: "+e.toRgb(t).join(", ")},e.toRgb=function(e){return[e>>16&255,e>>8&255,255&e]},e.toRgbNormalized=function(e){return[(e>>16&255)/255,(e>>8&255)/255,(255&e)/255]},e.fromRgb=t,e.fromNormalizedRgb=r,e.fromArray=function(e,r){return t(e[r],e[r+1],e[r+2])},e.fromNormalizedArray=function(e,t){return r(e[t],e[t+1],e[t+2])},e.toArray=function(e,t,r){return t[r]=e>>16&255,t[r+1]=e>>8&255,t[r+2]=255&e,t},e.toArrayNormalized=function(e,t,r){return t[r]=(e>>16&255)/255,t[r+1]=(e>>8&255)/255,t[r+2]=(255&e)/255,t},e.toVec3=function(e,t){return e[0]=t>>16&255,e[1]=t>>8&255,e[2]=255&t,e},e.toVec3Normalized=function(e,t){return e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255,e},e.interpolate=function(e,t,r){var n=e>>16&255,a=e>>8&255,i=255&e;return n+((t>>16&255)-n)*r<<16|a+((t>>8&255)-a)*r<<8|i+((255&t)-i)*r};var i=[0,0,0];function o(e,t){return n.a.fromColor(i,e),n.a.toColor(n.a.saturate(i,i,t))}e.saturate=o,e.desaturate=function(e,t){return o(e,-t)};var s=[0,0,0];function u(e,t){return a.a.fromColor(s,e),a.a.toColor(a.a.darken(s,s,t))}function c(e){return e<.04045?.0773993808*e:Math.pow(.9478672986*e+.0521327014,2.4)}function l(e){return e<.0031308?12.92*e:1.055*Math.pow(e,.41666)-.055}e.darken=u,e.lighten=function(e,t){return u(e,-t)},e.sRGBToLinear=function(e){return r(c((e>>16&255)/255),c((e>>8&255)/255),c((255&e)/255))},e.linearToSRGB=function(e){return r(l((e>>16&255)/255),l((e>>8&255)/255),l((255&e)/255))}}(i||(i={}))},function(e,t,r){"use strict";function n(e,t,r){return(e-t)/(r-t)}function a(e,t,r){return Math.max(t,Math.min(r,e))}function i(e){return a(e,0,1)}function o(e,t,r){return e+(t-e)*r}function s(e,t,r,n,a,i){var o=(r-e)*i,s=(n-t)*i,u=a*a;return(2*t-2*r+o+s)*(a*u)+(-3*t+3*r-2*o-s)*u+o*a+t}function u(e,t,r,n){var a=1-n;return a*a*e+2*a*n*t+n*n*r}function c(e,t,r){return(r=i(n(r,e,t)))*r*(3-2*r)}r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return o})),r.d(t,"e",(function(){return s})),r.d(t,"c",(function(){return u})),r.d(t,"d",(function(){return c}))},function(e,t,r){"use strict";r.d(t,"a",(function(){return a})); +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ +var n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};function a(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}},function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=r(577),a=r(628),i=r(581),o=r(574),s=r(678),u=r(726),c=r(763);function l(e,t,r,l){var f=function(e,t,r,l){switch(u.a.getGranularity(e,r.granularity)){case"uniform":return function(e,t,r){return function(e,t){return t?(n.e.update(t.uColor,i.a.toVec3Normalized(t.uColor.ref.value,e)),n.e.updateIfChanged(t.dColorType,"uniform"),t):{uColor:n.e.create(i.a.toVec3Normalized(Object(o.g)(),e)),tColor:n.e.create({array:new Uint8Array(3),width:1,height:1}),tColorGrid:n.e.create(Object(c.a)()),tPalette:n.e.create({array:new Uint8Array(3),width:1,height:1}),uColorTexDim:n.e.create(o.f.create(1,1)),uColorGridDim:n.e.create(o.g.create(1,1,1)),uColorGridTransform:n.e.create(o.h.create(0,0,0,1)),dColorType:n.e.create("uniform"),dUsePalette:n.e.create(!1)}}(t(s.b,!1),r)}(0,r.color,l);case"instance":return function(e,t,r){var n=e.instanceCount,o=Object(a.c)(Math.max(1,n),3,Uint8Array,r&&r.tColor.ref.value.array);e.reset();for(;e.hasNext;){var s=e.move(),u=s.location,c=s.isSecondary,l=s.instanceIndex;i.a.toArray(t(u,c),o.array,3*l),e.skipInstance()}return d(o,"instance",r)}(e,r.color,l);case"group":return function(e,t,r){var n=e.groupCount,o=Object(a.c)(Math.max(1,n),3,Uint8Array,r&&r.tColor.ref.value.array);e.reset();for(;e.hasNext&&!e.isNextNewInstance;){var s=e.move(),u=s.location,c=s.isSecondary,l=s.groupIndex;i.a.toArray(t(u,c),o.array,3*l)}return d(o,"group",r)}(e,r.color,l);case"groupInstance":return function(e,t,r){var n=e.groupCount,o=e.instanceCount*n,s=Object(a.c)(Math.max(1,o),3,Uint8Array,r&&r.tColor.ref.value.array);e.reset();for(;e.hasNext;){var u=e.move(),c=u.location,l=u.isSecondary,p=u.index;i.a.toArray(t(c,l),s.array,3*p)}return d(s,"groupInstance",r)}(e,r.color,l);case"vertex":return function(e,t,r){var n=e.groupCount,o=e.stride,s=Object(a.c)(Math.max(1,n),3,Uint8Array,r&&r.tColor.ref.value.array);e.reset(),e.voidInstances();for(;e.hasNext&&!e.isNextNewInstance;)for(var u=e.move(),c=u.location,l=u.isSecondary,p=u.groupIndex,f=t(c,l),h=0;hthis.width+n)&&(a.y>this.height+n||a.ythis.width+n?o.f.create(this.width+n,a.y):a.y>this.height+n?o.f.create(a.x,this.height+n):a.ythis.width+i||n.y>this.height+i||n.y=0;return Object(a.jsx)(m.a,Object(n.a)({onClick:e.toggle(i),disabled:e.props.isDisabled,style:{marginTop:"1px"}},{children:Object(a.jsx)("span",Object(n.a)({style:{float:s?"left":"right"}},{children:s?"✓ "+o:o+" ✗"}),void 0)}),i)}))}),void 0)]},void 0)},t}(i.PureComponent),ie=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={isExpanded:!!t.props.param.isExpanded,showHelp:!1},t.onChangeParam=function(e){var r;t.change(Object(n.a)(Object(n.a)({},t.props.value),((r={})[e.name]=e.value,r)))},t.toggleExpanded=function(){return t.setState({isExpanded:!t.state.isExpanded})},t}return Object(n.c)(t,e),t.prototype.change=function(e){this.props.onChange({name:this.props.name,param:this.props.param,value:e})},t.prototype.pivoted=function(){var e=this.props.param.pivot,t=this.props.param.params,r=t[e],i=I(r),o=Object(a.jsx)(i,{name:e,param:r,value:this.props.value[e],onChange:this.onChangeParam,onEnter:this.props.onEnter,isDisabled:this.props.isDisabled},void 0);if(!this.state.isExpanded)return Object(a.jsxs)("div",Object(n.a)({className:"msp-mapped-parameter-group"},{children:[o,Object(a.jsx)(m.f,{svg:O.K,onClick:this.toggleExpanded,toggleState:this.state.isExpanded,title:"More Options"},void 0)]}),void 0);for(var s=Object.create(null),u=0,c=Object.keys(t);u=e.length)e.tokenType=6;else{e.tokenStart=e.position,e.tokenEnd=e.position,e.isEscaped=!1;var r=e.data.charCodeAt(e.position);switch(r){case 35:!function(e){for(;e.position=5&&95===e.data.charCodeAt(e.tokenStart+4)?!function(e){var t=e.data.charCodeAt(e.tokenStart);return(68===t||100===t)&&((65===(t=e.data.charCodeAt(e.tokenStart+1))||97===t)&&((84===(t=e.data.charCodeAt(e.tokenStart+2))||116===t)&&(65===(t=e.data.charCodeAt(e.tokenStart+3))||97===t)))}(e)?!function(e){var t=e.data.charCodeAt(e.tokenStart);return(83===t||115===t)&&((65===(t=e.data.charCodeAt(e.tokenStart+1))||97===t)&&((86===(t=e.data.charCodeAt(e.tokenStart+2))||118===t)&&(69===(t=e.data.charCodeAt(e.tokenStart+3))||101===t)))}(e)?!function(e){if(e.tokenEnd-e.tokenStart!=5)return!1;var t=e.data.charCodeAt(e.tokenStart);return(76===t||108===t)&&((79===(t=e.data.charCodeAt(e.tokenStart+1))||111===t)&&((79===(t=e.data.charCodeAt(e.tokenStart+2))||111===t)&&(80===(t=e.data.charCodeAt(e.tokenStart+3))||112===t)))}(e)?e.tokenType=3:e.tokenType=2:e.tokenType=1:e.tokenType=0:e.tokenType=3}}}function m(e){for(h(e);5===e.tokenType;)h(e)}function g(){return{categoryNames:[],categoryData:Object.create(null)}}function b(e,t){for(var r=Object.create(null),n=0,i=e;n0&&r.push(v(u,s,c)),s=e.substring(o.tokenStart+5,o.tokenEnd),u=g(),c=[],m(o),[3,6]);case 2:if(1!==w)return[3,3];if(o.tokenEnd-o.tokenStart==5)h.categoryNames.length>0&&(c[c.length]=(A=h,E=O,a.a(A.categoryNames,b(A.categoryNames,A.categoryData),E))),o.inSaveFrame=!1;else{if(o.inSaveFrame)return[2,S(o.lineNumber,"Save frames cannot be nested.")];o.inSaveFrame=!0,O=e.substring(o.tokenStart+5,o.tokenEnd),h=g()}return m(o),[3,6];case 3:return 2!==w?[3,5]:[4,j(o,o.inSaveFrame?h:u)];case 4:return(C=n.sent()).hasError?[2,S(C.errorLine,C.errorMessage)]:[3,6];case 5:if(4!==w)return console.log(o.tokenType,i.b.getTokenString(o)),[2,S(o.lineNumber,"Unexpected token. Expected data_, loop_, or data name.")];if((C=function(e,t){for(var r=e.tokenStart,n=d(e),i=p(e,n),o=Object.create(null),s=[],u=!0;u;){if(4!==e.tokenType||!l(e,r,n)){u=!1;break}var c=f(e).substring(i.length+1);if(m(e),3!==e.tokenType)return{hasError:!0,errorLine:e.lineNumber,errorMessage:"Expected value."};o[c]=a.c.ofTokens({data:e.data,indices:[e.tokenStart,e.tokenEnd],count:1}),s[s.length]=c,m(e)}return y(t,i.substr(1),1,s,o),{hasError:!1,errorLine:0,errorMessage:""}}(o,o.inSaveFrame?h:u)).hasError)return[2,S(C.errorLine,C.errorMessage)];n.label=6;case 6:return[3,1];case 7:return o.inSaveFrame?[2,S(o.lineNumber,"Unfinished save frame ("+x.header+").")]:((u.categoryNames.length>0||c.length>0)&&r.push(v(u,s,c)),[2,_(a.d(r))])}var A,E}))}))}function C(e){var t=this;return s.b.create("Parse CIF",(function(r){return Object(n.b)(t,void 0,void 0,(function(){return Object(n.d)(this,(function(t){switch(t.label){case 0:return[4,w(e,r)];case 1:return[2,t.sent()]}}))}))}))}var A=r(580),E=r(854),P=r(718);var T=r(949);function I(e){for(var t=Object.create(null),r=Object.create(null),n=0,a=e.columns;nt[r])return!1;return!0}(t,r.version.match(/(\d)\.(\d)\.\d/).slice(1).map((function(e){return+e})))?(i=a.d(r.dataBlocks.map((function(e){for(var t=Object.create(null),r=0,n=e.categories;r=t.hue[0]&&f[0]<=t.hue[1]&&f[1]>=t.chroma[0]&&f[1]<=t.chroma[1]&&f[2]>=t.luminance[0]&&f[2]<=t.luminance[1]&&h[0]>=e[0]-2&&h[0]<=e[0]+2&&h[1]>=e[1]-2&&h[1]<=e[1]+2&&h[2]>=e[2]-2&&h[2]<=e[2]+2}function g(e,t){void 0===t&&(t={});var r=Object(n.a)(Object(n.a)({},i.a.getDefaultValues(d)),t);if(e<=0)return[];var a=function(e,t){for(var r=new Map,n=1.001*Math.cbrt(e),a=(t.hue[1]-t.hue[0])/n,i=(t.chroma[1]-t.chroma[0])/n,u=(t.luminance[1]-t.luminance[0])/n,c=t.hue[0];c<=t.hue[1];c+=a)for(var l=t.chroma[0];l<=t.chroma[1];l+=i)for(var d=t.luminance[0];d<=t.luminance[1];d+=u){var p=o.a.fromHcl(Object(o.a)(),s.a.create(c,l,d));m(p,t)&&r.set(p.toString(),p)}return Array.from(r.values())}(Math.max(r.minSampleCount,5*e),r);if(a.length=e));b+=g);for(var v=1;v<=r.clusteringStepCount;++v){var y=Object(u.b)(h);for(b=0;b0;){for(var n=r[r.length-1],a=0,i=Number.MIN_SAFE_INTEGER,o=0;oi&&(i=s,a=o)}r.push(t.splice(a,1)[0])}return r}(f).map((function(e){return o.a.toColor(e)}))}var b=r(702),v=r(876),y={type:"generate",colorList:"red-yellow-blue"};function x(e){void 0===e&&(e={});var t=Object(n.a)(Object(n.a)({},y),e);return{palette:i.a.MappedStatic(t.type,{colors:i.a.Group({list:i.a.ColorList(t.colorList)},{isFlat:!0}),generate:i.a.Group(Object(n.a)(Object(n.a)({},d),{maxCount:i.a.Numeric(75,{min:1,max:250,step:1})}),{isFlat:!0})},{options:[["colors","Color List"],["generate","Generate Distinct"]]})}}i.a.getDefaultValues(x());var O={valueLabel:function(e){return""+(e+1)},minLabel:"Start",maxLabel:"End"};function j(e,t,r){var i,o,s;if(void 0===r&&(r={}),"colors"===t.palette.name&&"interpolate"===t.palette.params.list.kind){var u=t.palette.params.list,c=[0,e-1],l=Object(n.a)(Object(n.a)({},O),r),d=l.minLabel,p=l.maxLabel,f=u.colors;0===f.length&&(f=Object(b.e)(y.colorList).list);var h=v.a.create({listOrName:f,domain:c,minLabel:d,maxLabel:p});s=h.legend,o=h.color}else{var m;"colors"===t.palette.name?0===(m=t.palette.params.list.colors.map((function(e){return Array.isArray(e)?e[0]:e}))).length&&(m=Object(b.e)("dark-2").list.map((function(e){return Array.isArray(e)?e[0]:e}))):(e=Math.min(e,t.palette.params.maxCount),m=g(e,t.palette.params));for(var x=null!==(i=r.valueLabel)&&void 0!==i?i:O.valueLabel,j=m.length,S=[],_=0;_1&&"0"===i[i.length-1];)i=i.substr(0,i.length-1);return r>0?r+"h"+n+"m"+a+"."+i+"s":n>0?n+"m"+a+"."+i+"s":a>0?a+"."+i+"s":e.toFixed(0)+"ms"}}).call(this,r(717))},function(e,t,r){"use strict";r.d(t,"b",(function(){return n})),r.d(t,"a",(function(){return a}));var n={kind:"null-location"};function a(e,t,r){return{kind:"data-location",tag:e,data:t,element:r}}},function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return l}));var n,a=r(572),i=r(767),o=r(807),s=r(573),u=r(631);function c(e){return e.map((function(e){return[e.name,e.provider.label,e.provider.category]}))}!function(e){function t(){return{color:i.a.Empty,size:o.a.Empty}}e.create=function(e,r,n,a){a=a||t();var i=n.colorTheme,o=n.sizeTheme;return a.color=e.colorThemeRegistry.create(i.name,r,i.params),a.size=e.sizeThemeRegistry.create(o.name,r,o.params),a},e.createEmpty=t,e.ensureDependencies=function(e,t,r,n){var i,o;return Object(a.b)(this,void 0,void 0,(function(){return Object(a.d)(this,(function(a){switch(a.label){case 0:return[4,null===(i=t.colorThemeRegistry.get(n.colorTheme.name).ensureCustomProperties)||void 0===i?void 0:i.attach(e,r)];case 1:return a.sent(),[4,null===(o=t.sizeThemeRegistry.get(n.sizeTheme.name).ensureCustomProperties)||void 0===o?void 0:o.attach(e,r)];case 2:return a.sent(),[2]}}))}))},e.releaseDependencies=function(e,t,r){var n,a;null===(n=e.colorThemeRegistry.get(r.colorTheme.name).ensureCustomProperties)||void 0===n||n.detach(t),null===(a=e.sizeThemeRegistry.get(r.sizeTheme.name).ensureCustomProperties)||void 0===a||a.detach(t)}}(n||(n={}));var l=function(){function e(e,t){var r=this;this.emptyProvider=t,this._list=[],this._map=new Map,this._name=new Map,Object(u.c)(e,(function(e,t){if(e.name!==t)throw new Error("Fix build in themes to have matching names. "+e.name+" "+t);r.add(e)}))}return Object.defineProperty(e.prototype,"default",{get:function(){return this._list[0]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"list",{get:function(){return this._list},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"types",{get:function(){return c(this._list)},enumerable:!1,configurable:!0}),e.prototype.sort=function(){this._list.sort((function(e,t){return e.provider.category===t.provider.category?e.provider.labelt.provider.label?1:0:e.provider.category 3 or rank 0 are currently not supported.");var l=t.dimensions[0],d=t.dimensions[1],p=t.dimensions[2];for(i=0;i0}));return n.length?{instance:r,rowCount:n.reduce((function(e,t){return e+t.rowCount}),0),source:n.map((function(e){return{data:e.data,keys:function(){return e.keys?e.keys():c.a.Range(0,e.rowCount-1)},rowCount:e.rowCount}}))}:{instance:r,rowCount:0,source:[]}}var y=function(){function e(){this.builder=s.a.create(),this.encoded=!1,this.dataBlockCreated=!1,this.filter=a.DefaultFilter,this.formatter=a.DefaultFormatter,this.isBinary=!1,this.binaryEncodingProvider=void 0}return e.prototype.setFilter=function(e){this.filter=e||a.DefaultFilter},e.prototype.isCategoryIncluded=function(e){return this.filter.includeCategory(e)},e.prototype.setFormatter=function(e){this.formatter=e||a.DefaultFormatter},e.prototype.startDataBlock=function(e){this.dataBlockCreated=!0,s.a.write(this.builder,"data_"+(e||"").replace(/[ \n\t]/g,"").toUpperCase()+"\n#\n")},e.prototype.writeCategory=function(e,t,r){if(this.encoded)throw new Error("The writer contents have already been encoded, no more writing.");if(!this.dataBlockCreated)throw new Error("No data block created.");if((null==r?void 0:r.ignoreFilter)||this.filter.includeCategory(e.name)){var n=v(e,t),i=n.instance,o=n.rowCount,u=n.source;o&&(1===o?function(e,t,r,n,a,i){var o=b(t),u=r[0],c=u.data,l=o.reduce((function(t,r){return a.includeField(e.name,r.name)?Math.max(t,r.name.length):0}),0);if(0===l)return;l+=e.name.length+6;for(var d=u.keys().move(),p=O(e.name,t.fields,i),f=0;f=0?(S(e,l),!0):function(e,t){if(!t)return s.a.writeSafe(e,". "),!1;for(var r=t.charCodeAt(0),n=!1,a=0,i=!1,o=!1,u=0,c=t.length-1;u<=c;u++){switch(t.charCodeAt(u)){case 9:n=!0;break;case 10:return S(e,t),!0;case 32:n=!0;break;case 34:if(u&&u===c)break;if(i)return S(e,t),!0;o=!0,n=!0,a=0;break;case 39:if(u&&u===c)break;if(o)return S(e,t),!0;i=!0,n=!0,a=1}}n||35!==r&&36!==r&&59!==r&&91!==r&&93!==r&&95!==r||(n=!0);n?(s.a.writeSafe(e,a?'"':"'"),s.a.writeSafe(e,t),s.a.writeSafe(e,a?'" ':"' ")):(s.a.writeSafe(e,t),s.a.writeSafe(e," "));return!1}(e,l);1===d?function(e,t){s.a.writeInteger(e,t),s.a.whitespace1(e)}(e,l):function(e,t,r){s.a.writeFloat(e,t,r),s.a.whitespace1(e)}(e,l,a)}return!1}function O(e,t,r){for(var n,a=[],i=0,o=t;i=0){if(t<128)return 1;if(t<256)return 2;if(t<65536)return 3;if(t<4294967296)return 5;throw new Error("Number too big 0x"+t.toString(16))}if(t>=-32)return 1;if(t>=-128)return 2;if(t>=-32768)return 3;if(t>=-2147483648)return 5;throw new Error("Number too small -0x"+t.toString(16).substr(1))}if("boolean"===r||null==t)return 1;if("object"===r){var i,o=0;if(Array.isArray(t)){i=t.length;for(var s=0;s=0){if(t<128)return r.setUint8(a,t),1;if(t<256)return r.setUint8(a,204),r.setUint8(a+1,t),2;if(t<65536)return r.setUint8(a,205),r.setUint16(a+1,t),3;if(t<4294967296)return r.setUint8(a,206),r.setUint32(a+1,t),5;throw new Error("Number too big 0x"+t.toString(16))}if(t>=-32)return r.setInt8(a,t),1;if(t>=-128)return r.setUint8(a,208),r.setInt8(a+1,t),2;if(t>=-32768)return r.setUint8(a,209),r.setInt16(a+1,t),3;if(t>=-2147483648)return r.setUint8(a,210),r.setInt32(a+1,t),5;throw new Error("Number too small -0x"+(-t).toString(16).substr(1))}if(null==t)return r.setUint8(a,192),1;if("boolean"===i)return r.setUint8(a,t?195:194),1;if("object"===i){var c,l=0,d=Array.isArray(t),p=void 0;if(d?c=t.length:(p=Object.keys(t),c=p.length),c<16?(r.setUint8(a,c|(d?144:128)),l=1):c<65536?(r.setUint8(a,d?220:222),r.setUint16(a+1,c),l=3):c<4294967296&&(r.setUint8(a,d?221:223),r.setUint32(a+1,c),l=5),d)for(var f=0;f0&&(i=1/Math.sqrt(i),e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i),e}function h(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function m(e,t,r){var n=t[0],a=t[1],i=t[2],o=r[0],s=r[1],u=r[2];return e[0]=a*u-i*s,e[1]=i*o-n*u,e[2]=n*s-a*o,e}e.zero=t,e.clone=function(e){var r=t();return r[0]=e[0],r[1]=e[1],r[2]=e[2],r},e.hasNaN=function(e){return isNaN(e[0])||isNaN(e[1])||isNaN(e[2])},e.setNaN=function(e){return e[0]=NaN,e[1]=NaN,e[2]=NaN,e},e.fromObj=function(e){return r(e.x,e.y,e.z)},e.toObj=function(e){return{x:e[0],y:e[1],z:e[2]}},e.fromArray=function(e,t,r){return e[0]=t[r+0],e[1]=t[r+1],e[2]=t[r+2],e},e.toArray=function(e,t,r){return t[r+0]=e[0],t[r+1]=e[1],t[r+2]=e[2],t},e.create=r,e.ofArray=function(e){var r=t();return r[0]=e[0],r[1]=e[1],r[2]=e[2],r},e.set=function(e,t,r,n){return e[0]=t,e[1]=r,e[2]=n,e},e.copy=o,e.add=s,e.sub=u,e.mul=function(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e},e.div=function(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e},e.scale=c,e.scaleAndAdd=l,e.scaleAndSub=function(e,t,r,n){return e[0]=t[0]-r[0]*n,e[1]=t[1]-r[1]*n,e[2]=t[2]-r[2]*n,e},e.addScalar=function(e,t,r){return e[0]=t[0]+r,e[1]=t[1]+r,e[2]=t[2]+r,e},e.subScalar=function(e,t,r){return e[0]=t[0]-r,e[1]=t[1]-r,e[2]=t[2]-r,e},e.round=function(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e},e.ceil=function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e},e.floor=function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e},e.trunc=function(e,t){return e[0]=Math.trunc(t[0]),e[1]=Math.trunc(t[1]),e[2]=Math.trunc(t[2]),e},e.abs=function(e,t){return e[0]=Math.abs(t[0]),e[1]=Math.abs(t[1]),e[2]=Math.abs(t[2]),e},e.min=function(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e},e.max=function(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e},e.distance=function(e,t){var r=t[0]-e[0],n=t[1]-e[1],a=t[2]-e[2];return Math.sqrt(r*r+n*n+a*a)},e.squaredDistance=function(e,t){var r=t[0]-e[0],n=t[1]-e[1],a=t[2]-e[2];return r*r+n*n+a*a},e.magnitude=function(e){var t=e[0],r=e[1],n=e[2];return Math.sqrt(t*t+r*r+n*n)},e.squaredMagnitude=d,e.setMagnitude=function(e,t,r){return c(e,f(e,t),r)},e.negate=p,e.inverse=function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e},e.normalize=f,e.dot=h,e.cross=m,e.lerp=function(e,t,r,n){var a=t[0],i=t[1],o=t[2];return e[0]=a+n*(r[0]-a),e[1]=i+n*(r[1]-i),e[2]=o+n*(r[2]-o),e};var g=t();function b(e,t){var r=Math.sqrt(d(e)*d(t));if(0===r)return Math.PI/2;var n=h(e,t)/r;return Math.acos(Object(a.a)(n,-1,1))}e.slerp=function(e,t,r,n){var i=Object(a.a)(h(t,r),-1,1),o=Math.acos(i)*n;return l(g,r,t,-i),f(g,g),s(e,c(e,t,Math.cos(o)),c(g,g,Math.sin(o)))},e.hermite=function(e,t,r,n,a,i){var o=i*i,s=o*(2*i-3)+1,u=o*(i-2)+i,c=o*(i-1),l=o*(3-2*i);return e[0]=t[0]*s+r[0]*u+n[0]*c+a[0]*l,e[1]=t[1]*s+r[1]*u+n[1]*c+a[1]*l,e[2]=t[2]*s+r[2]*u+n[2]*c+a[2]*l,e},e.bezier=function(e,t,r,n,a,i){var o=1-i,s=o*o,u=i*i,c=s*o,l=3*i*s,d=3*u*o,p=u*i;return e[0]=t[0]*c+r[0]*l+n[0]*d+a[0]*p,e[1]=t[1]*c+r[1]*l+n[1]*d+a[1]*p,e[2]=t[2]*c+r[2]*l+n[2]*d+a[2]*p,e},e.quadraticBezier=function(e,t,r,n,i){return e[0]=Object(a.c)(t[0],r[0],n[0],i),e[1]=Object(a.c)(t[1],r[1],n[1],i),e[2]=Object(a.c)(t[2],r[2],n[2],i),e},e.spline=function(e,t,r,n,i,o,s){return e[0]=Object(a.e)(t[0],r[0],n[0],i[0],o,s),e[1]=Object(a.e)(t[1],r[1],n[1],i[1],o,s),e[2]=Object(a.e)(t[2],r[2],n[2],i[2],o,s),e},e.random=function(e,t){var r=2*Math.random()*Math.PI,n=2*Math.random()-1,a=Math.sqrt(1-n*n)*t;return e[0]=Math.cos(r)*a,e[1]=Math.sin(r)*a,e[2]=n*t,e},e.transformMat4=function(e,t,r){var n=t[0],a=t[1],i=t[2],o=1/(r[3]*n+r[7]*a+r[11]*i+r[15]||1);return e[0]=(r[0]*n+r[4]*a+r[8]*i+r[12])*o,e[1]=(r[1]*n+r[5]*a+r[9]*i+r[13])*o,e[2]=(r[2]*n+r[6]*a+r[10]*i+r[14])*o,e},e.transformMat4Offset=function(e,t,r,n,a,i){var o=t[0+a],s=t[1+a],u=t[2+a],c=1/(r[3+i]*o+r[7+i]*s+r[11+i]*u+r[15+i]||1);return e[0+n]=(r[0+i]*o+r[4+i]*s+r[8+i]*u+r[12+i])*c,e[1+n]=(r[1+i]*o+r[5+i]*s+r[9+i]*u+r[13+i])*c,e[2+n]=(r[2+i]*o+r[6+i]*s+r[10+i]*u+r[14+i])*c,e},e.transformMat3=function(e,t,r){var n=t[0],a=t[1],i=t[2];return e[0]=n*r[0]+a*r[3]+i*r[6],e[1]=n*r[1]+a*r[4]+i*r[7],e[2]=n*r[2]+a*r[5]+i*r[8],e},e.transformQuat=function(e,t,r){var n=t[0],a=t[1],i=t[2],o=r[0],s=r[1],u=r[2],c=r[3],l=c*n+s*i-u*a,d=c*a+u*n-o*i,p=c*i+o*a-s*n,f=-o*n-s*a-u*i;return e[0]=l*c+f*-o+d*-u-p*-s,e[1]=d*c+f*-s+p*-o-l*-u,e[2]=p*c+f*-u+l*-s-d*-o,e},e.angle=b;var v=t(),y=t(),x=t(),O=t(),j=t(),S=t(),_=t();e.dihedralAngle=function(e,t,r,n){u(v,e,t),u(y,r,t),u(x,t,r),u(O,n,r),m(j,v,y),m(S,x,O);var a=b(j,S);return m(_,j,S),h(y,_)>0?a:-a},e.exactEquals=function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]},e.equals=function(e,t){var r=e[0],n=e[1],a=e[2],o=t[0],s=t[1],u=t[2];return Math.abs(r-o)<=i.a*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(n-s)<=i.a*Math.max(1,Math.abs(n),Math.abs(s))&&Math.abs(a-u)<=i.a*Math.max(1,Math.abs(a),Math.abs(u))};var w=t();function C(e,t,r){return c(e,r,h(r,t)/d(r))}e.makeRotation=function(t,r,a){var o=b(r,a);if(Math.abs(o)<1e-4)return n.a.setIdentity(t);if(Math.abs(o-Math.PI)0?o(e,t):p(e,o(e,t)),e};var E=t(),P=t();e.triangleNormal=function(e,t,r,n){return u(E,r,t),u(P,n,t),f(e,m(e,E,P))},e.toString=function(e,t){return"["+e[0].toPrecision(t)+" "+e[1].toPrecision(t)+" "+e[2].toPrecision(t)+"]"},e.origin=r(0,0,0),e.unit=r(1,1,1),e.negUnit=r(-1,-1,-1),e.unitX=r(1,0,0),e.unitY=r(0,1,0),e.unitZ=r(0,0,1),e.negUnitX=r(-1,0,0),e.negUnitY=r(0,-1,0),e.negUnitZ=r(0,0,-1)}(o||(o={}))},function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var n,a=r(878);!function(e){e.toArray=function(e){return Object(a.d)(e.values())},e.isSuperset=function(e,t){var r=!0;return t.forEach((function(t){e.has(t)||(r=!1)})),r},e.add=function(e){for(var t=[],r=1;rthis.maxDist[e]&&(this.maxDist[e]=r,a.a.copy(this.extrema[2*e+1],t))},e.prototype.computeSphereExtrema=function(e,t,r){var n=a.a.dot(this.dir[e],t);n-rthis.maxDist[e]&&(this.maxDist[e]=n+r,a.a.scaleAndAdd(this.extrema[2*e+1],t,this.dir[e],r))},e.prototype.includeSphere=function(e){if(o.g.hasExtrema(e)&&e.extrema.length>1)for(var t=0,r=e.extrema;t1)for(var t=0,r=e.extrema;t0),t):{tOverpaint:n.b.create(r),uOverpaintTexDim:n.b.create(a.f.create(r.width,r.height)),dOverpaint:n.b.create(e>0)}}var l={array:new Uint8Array(4),width:1,height:1};function d(e){return e?(n.b.update(e.tOverpaint,l),n.b.update(e.uOverpaintTexDim,a.f.create(1,1)),e):{tOverpaint:n.b.create(l),uOverpaintTexDim:n.b.create(a.f.create(1,1)),dOverpaint:n.b.create(!1)}}},function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"e",(function(){return s})),r.d(t,"b",(function(){return u})),r.d(t,"d",(function(){return c})),r.d(t,"c",(function(){return d}));var n=r(751),a=r(574),i=r(628);function o(e,t,r,n){for(var a=t;a0),n.b.updateIfChanged(t.transparencyAverage,s(r.array,e)),t):{tTransparency:n.b.create(r),uTransparencyTexDim:n.b.create(a.f.create(r.width,r.height)),dTransparency:n.b.create(e>0),transparencyAverage:n.b.create(0)}}var l={array:new Uint8Array(1),width:1,height:1};function d(e){return e?(n.b.update(e.tTransparency,l),n.b.update(e.uTransparencyTexDim,a.f.create(1,1)),e):{tTransparency:n.b.create(l),uTransparencyTexDim:n.b.create(a.f.create(1,1)),dTransparency:n.b.create(!1),transparencyAverage:n.b.create(0)}}},function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return s})),r.d(t,"c",(function(){return u})),r.d(t,"d",(function(){return l}));var n=r(751),a=r(574),i=r(628);function o(e,t,r,n){for(var a=t;a0),t):{dClipObjectCount:n.b.create(0),dClipVariant:n.b.create("instance"),tClipping:n.b.create(r),uClippingTexDim:n.b.create(a.f.create(r.width,r.height)),dClipping:n.b.create(e>0)}}var c={array:new Uint8Array(1),width:1,height:1};function l(e){return e?(n.b.update(e.tClipping,c),n.b.update(e.uClippingTexDim,a.f.create(1,1)),e):{dClipObjectCount:n.b.create(0),dClipVariant:n.b.create("instance"),tClipping:n.b.create(c),uClippingTexDim:n.b.create(a.f.create(1,1)),dClipping:n.b.create(!1)}}},function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var n,a=r(572),i=r(573),o=r(577),s=r(607),u=r(657),c=r(709),l=r(667),d=r(610),p=r(578),f=r(628),h=r(581),m=r(574),g=r(1004),b=r(655),v=r(601),y=r(687),x=r(688),O=r(583),j=r(725),S=r(689);function _(e,t,r,n){for(var a=0,i=0,o=0,s=4*r;oa&&(a=c);var l=Math.abs(e[u+1]);l>a&&(a=l);var d=Math.abs(t[o]);d>i&&(i=d)}return Math.max(i,n+n*a)}!function(e){function t(e,t,r,a,i,s,u,c,l){return l?function(e,t,r,n,a,i,s,u,c){return c.charCount=u,o.e.update(c.fontTexture,e),o.e.update(c.centerBuffer,t),o.e.update(c.mappingBuffer,r),o.e.update(c.depthBuffer,n),o.e.update(c.indexBuffer,a),o.e.update(c.groupBuffer,i),o.e.update(c.tcoordBuffer,s),c}(e,t,r,a,i,s,u,c,l):function(e,t,r,a,i,s,u,c){var l,d=Object(p.g)(),h=-1,m=-1,g={kind:"text",charCount:c,fontTexture:o.e.create(e),centerBuffer:o.e.create(t),mappingBuffer:o.e.create(r),depthBuffer:o.e.create(a),indexBuffer:o.e.create(i),groupBuffer:o.e.create(s),tcoordBuffer:o.e.create(u),get boundingSphere(){var e=n(g);if(e!==h){var t=Object(f.a)(g.centerBuffer.ref.value,4*g.charCount,4);p.g.copy(d,t),h=e}return d},get groupMapping(){return g.groupBuffer.ref.version!==m&&(l=Object(j.c)(g.groupBuffer.ref.value,g.charCount,4),m=g.groupBuffer.ref.version),l},setBoundingSphere:function(e){p.g.copy(d,e),h=n(g)}};return g}(e,t,r,a,i,s,u,c)}function r(e){return t(e?e.fontTexture.ref.value:Object(f.c)(0,1,Uint8Array),e?e.centerBuffer.ref.value:new Float32Array(0),e?e.mappingBuffer.ref.value:new Float32Array(0),e?e.depthBuffer.ref.value:new Float32Array(0),e?e.indexBuffer.ref.value:new Uint32Array(0),e?e.groupBuffer.ref.value:new Float32Array(0),e?e.tcoordBuffer.ref.value:new Float32Array(0),0,e)}function n(e){return Object(O.l)([e.charCount,e.fontTexture.ref.version,e.centerBuffer.ref.version,e.mappingBuffer.ref.version,e.depthBuffer.ref.version,e.indexBuffer.ref.version,e.groupBuffer.ref.version,e.tcoordBuffer.ref.version])}function w(e,t){var r=4*e.charCount,n=t.instanceCount.ref.value,a=Object(s.b)(),i=a.position,o=e.centerBuffer.ref.value,u=t.aTransform.ref.value;return Object(s.a)(r,n,4,(function(e,t){return t<0?m.g.fromArray(i,o,3*e):m.g.transformMat4Offset(i,o,u,0,3*e,16*t),a}))}function C(e,t,r,n,i){var s=r.instanceCount,d=r.groupCount,g=w(e,t),O=Object(u.a)(r,g,n.color),j=Object(c.a)(r,n.size),C=Object(l.a)(s*d),A=Object(y.c)(),E=Object(x.c)(),P=Object(S.d)(),T={drawCount:2*e.charCount*3,vertexCount:4*e.charCount,groupCount:d,instanceCount:s},I=_(e.mappingBuffer.ref.value,e.depthBuffer.ref.value,e.charCount,Object(c.b)(j)),k=p.g.expand(Object(p.g)(),e.boundingSphere,I),M=Object(f.b)(k,t.aTransform.ref.value,s);return Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)({aPosition:e.centerBuffer,aMapping:e.mappingBuffer,aDepth:e.depthBuffer,aGroup:e.groupBuffer,elements:e.indexBuffer,boundingSphere:o.e.create(M),invariantBoundingSphere:o.e.create(k),uInvariantBoundingSphere:o.e.create(m.h.ofSphere(k))},O),j),C),A),E),P),t),{aTexCoord:e.tcoordBuffer,tFont:e.fontTexture,padding:o.e.create(I)}),v.a.createValues(i,T)),{uSizeFactor:o.e.create(i.sizeFactor),uBorderWidth:o.e.create(Object(b.a)(i.borderWidth/2,0,.5)),uBorderColor:o.e.create(h.a.toArrayNormalized(i.borderColor,m.g.zero(),0)),uOffsetX:o.e.create(i.offsetX),uOffsetY:o.e.create(i.offsetY),uOffsetZ:o.e.create(i.offsetZ),uBackgroundColor:o.e.create(h.a.toArrayNormalized(i.backgroundColor,m.g.zero(),0)),uBackgroundOpacity:o.e.create(i.backgroundOpacity)})}function A(e,t){v.a.updateRenderableState(e,t),e.pickable=!1,e.opaque=!1,e.writeDepth=!0}e.create=t,e.createEmpty=r,e.Params=Object(a.a)(Object(a.a)(Object(a.a)({},v.a.Params),g.a),{sizeFactor:i.a.Numeric(1,{min:0,max:10,step:.1}),borderWidth:i.a.Numeric(0,{min:0,max:.5,step:.01}),borderColor:i.a.Color(d.a.grey),offsetX:i.a.Numeric(0,{min:0,max:10,step:.1}),offsetY:i.a.Numeric(0,{min:0,max:10,step:.1}),offsetZ:i.a.Numeric(0,{min:0,max:10,step:.1}),background:i.a.Boolean(!1),backgroundMargin:i.a.Numeric(.2,{min:0,max:1,step:.01}),backgroundColor:i.a.Color(d.a.grey),backgroundOpacity:i.a.Numeric(1,{min:0,max:1,step:.01}),tether:i.a.Boolean(!1),tetherLength:i.a.Numeric(1,{min:0,max:5,step:.1}),tetherBaseWidth:i.a.Numeric(.3,{min:0,max:1,step:.01}),attachment:i.a.Select("middle-center",[["bottom-left","bottom-left"],["bottom-center","bottom-center"],["bottom-right","bottom-right"],["middle-left","middle-left"],["middle-center","middle-center"],["middle-right","middle-right"],["top-left","top-left"],["top-center","top-center"],["top-right","top-right"]])}),e.Utils={Params:e.Params,createEmpty:r,createValues:C,createValuesSimple:function(t,r,n,o,s){var u=v.a.createSimple(n,o,s),c=Object(a.a)(Object(a.a)({},i.a.getDefaultValues(e.Params)),r);return C(t,u.transform,u.locationIterator,u.theme,c)},updateValues:function(e,t){v.a.updateValues(e,t),o.e.updateIfChanged(e.uSizeFactor,t.sizeFactor),o.e.updateIfChanged(e.uBorderWidth,t.borderWidth),h.a.fromNormalizedArray(e.uBorderColor.ref.value,0)!==t.borderColor&&(h.a.toArrayNormalized(t.borderColor,e.uBorderColor.ref.value,0),o.e.update(e.uBorderColor,e.uBorderColor.ref.value));o.e.updateIfChanged(e.uOffsetX,t.offsetX),o.e.updateIfChanged(e.uOffsetY,t.offsetY),o.e.updateIfChanged(e.uOffsetZ,t.offsetZ),h.a.fromNormalizedArray(e.uBackgroundColor.ref.value,0)!==t.backgroundColor&&(h.a.toArrayNormalized(t.backgroundColor,e.uBackgroundColor.ref.value,0),o.e.update(e.uBackgroundColor,e.uBackgroundColor.ref.value));o.e.updateIfChanged(e.uBackgroundOpacity,t.backgroundOpacity)},updateBoundingSphere:function(e,t){var r=_(e.aMapping.ref.value,e.aDepth.ref.value,t.charCount,Object(c.b)(e)),n=p.g.expand(Object(p.g)(),t.boundingSphere,r),a=Object(f.b)(n,e.aTransform.ref.value,e.instanceCount.ref.value);p.g.equals(a,e.boundingSphere.ref.value)||o.e.update(e.boundingSphere,a);p.g.equals(n,e.invariantBoundingSphere.ref.value)||(o.e.update(e.invariantBoundingSphere,n),o.e.update(e.uInvariantBoundingSphere,m.h.fromSphere(e.uInvariantBoundingSphere.ref.value,n)));o.e.update(e.padding,r)},createRenderableState:function(e){var t=v.a.createRenderableState(e);return A(t,e),t},updateRenderableState:A,createPositionIterator:w}}(n||(n={}))},function(e,t,r){"use strict";r.d(t,"b",(function(){return s})),r.d(t,"a",(function(){return c})),r.d(t,"c",(function(){return p}));var n=r(574),a=Object(n.g)(),i=Object(n.g)(),o=Object(n.g)();function s(e,t){for(var r=t.length,s=c(r/3),u=0;u0?[V,C]:[C,V],G=H[0],q=H[1];k.currentGroup=N;if(0===U)B.radiusTop=B.radiusBottom=z,B.topCap=G,B.bottomCap=q,Object(s.a)(k,M,D,.5,B);else if(1===U)B.radiusTop=B.radiusBottom=z*E,B.topCap=B.bottomCap=P,Object(s.c)(k,M,D,.5,L,B);else if(2===U||3===U||5===U||6===U){var W=2===U?2:3===U?3:1.5,X=z*(g/(.5*W)),Y=(z-X)*b;y(R,M,D,c?c(N):null),B.topCap=G,B.bottomCap=q,5===U||6===U?(B.radiusTop=B.radiusBottom=z,Object(s.a)(k,M,D,.5,B),B.radiusTop=B.radiusBottom=z*g,B.topCap=B.bottomCap=P,S(R,R,4.5*Y),j(M,M,R),j(D,D,R),Object(s.c)(k,M,D,.5,3,B),6===U&&(S(R,R,4.5*Y*2),O(M,M,R),O(D,D,R),Object(s.c)(k,M,D,.5,3,B))):(S(R,R,Y),B.radiusTop=B.radiusBottom=X,3===W&&Object(s.a)(k,M,D,.5,B),Object(s.b)(k,M,D,.5,R,B))}else 4===U&&(x(m,m,.475),O(M,M,m),j(D,D,m),B.radiusTop=B.radiusBottom=z,B.topCap=G,B.bottomCap=q,Object(s.a)(k,M,D,.5,B))}return o.a.getMesh(k)}function C(e,t,r,a){var i=t.linkCount,o=t.referencePosition,s=t.position,u=t.style,c=t.radius,l=t.ignore,f=t.stub;if(!i)return d.a.createEmpty(a);for(var h=r.linkScale,g=r.linkSpacing,b=r.linkCap,v=r.dashCount,_=r.dashScale,w=r.dashCap,C=r.stubCap,A=2*i,E=p.a.create(A,A/4,a),P=Object(n.g)(),T=Object(n.g)(),I=Object(n.g)(),k=Object(n.g)(),M=v%2==1?v:v+1,D=.5-.25/M,R=0,B=i;R0?[]:this.currentUnit},e.prototype.addElement=function(e){this.currentUnit[this.currentUnit.length]=e,this.elementCount++},e.prototype.addElementRange=function(e,t,r){for(var n=t;n1&&Object(u.q)(c);var f=s.getChild(a.f.ofSortedArray(c)),h=r.add(f.id,f);f!==h&&(f=h.applyOperator(f.id,f.conformation.operator,!0)),t[t.length]=f}else t[t.length]=s,r.add(s.id,s)}return K.create(t,{parent:this.parent})},e.prototype.getStructure=function(){return this._getStructure(!1)},e.prototype.getStructureDeduplicate=function(){return this._getStructure(!0)},e.prototype.setSingletonLocation=function(e){var t=this.ids[0];e.unit=this.parent.unitMap.get(t),e.element=this.unitMap.get(t)[0]},Object.defineProperty(e.prototype,"isEmpty",{get:function(){return 0===this.elementCount},enumerable:!1,configurable:!0}),e}(),h=r(802),m=r(708);function g(e,t){for(var r=1;t--;)r*=e--;return r}var b=function(){function e(e,t){var r,n;this.array=e,this.hasNext=!1,this.index=(1<r?0:g(r,n)/g(n,n)),this.maxIndex=1<0&&t<=e.length}return e.prototype.move=function(){if(this.hasNext){for(var e=0,t=0,r=this.index;r;r>>>=1,e++)1&r&&(this.value[t++]=this.array[e]);this.index=function(e){var t=e&-e,r=e+t;return r|((r&-r)/t>>1)-1}(this.index),this.hasNext=this.index0&&d.length>0)for(var f=l.length,m=d.length,g=0,b=Math.max(f,m);g500?W:X;r.reset();for(var n=0,a=t.length;n0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"customPropertyDescriptors",{get:function(){return this.state.customProps||(this.state.customProps=new F.a),this.state.customProps},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentPropertyData",{get:function(){return this.state.propertyData||(this.state.propertyData=Object.create(null)),this.state.propertyData},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"inheritedPropertyData",{get:function(){return this.parent?this.parent.currentPropertyData:this.currentPropertyData},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"polymerResidueCount",{get:function(){return-1===this.state.polymerResidueCount&&(this.state.polymerResidueCount=function(e){for(var t=e.units,r=0,n=0,a=t.length;n0&&(r+=1);return r}(this)),this.state.polymerUnitCount},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"uniqueElementCount",{get:function(){return-1===this.state.uniqueElementCount&&(this.state.uniqueElementCount=function(e){for(var t=e.unitSymmetryGroups,r=0,n=0,a=t.length;n1)throw new Error("The structure is based on multiple models and has neither a master- nor a representative-model.");return this.state.model=e[0],this.state.model},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"masterModel",{get:function(){return this.state.masterModel},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"representativeModel",{get:function(){return this.state.representativeModel},enumerable:!1,configurable:!0}),e.prototype.hasElement=function(e){return!!this.unitMap.has(e.unit.id)&&a.f.has(this.unitMap.get(e.unit.id).elements,e.element)},e.prototype.getModelIndex=function(e){return this.models.indexOf(e)},e.prototype.remapModel=function(t){for(var r=[],n=0,a=this.unitSymmetryGroups;n0?t[0].id:0,d=0,p=t.length;d0&&f(s,e,e.coarseHierarchy.spheres,1),g.gaussians.count>0&&f(s,e,e.coarseHierarchy.gaussians,2)),s.getStructure()}function d(e,t){var r=e.atomicHierarchy.index.getEntityFromChain(t);return"water"===e.entities.data.type.value(r)}function f(e,t,r,n){for(var i=r.chainElementSegments,s=0;s0,this.hasNext&&(this.elements=e.units[0].elements,this.maxIdx=this.elements.length-1,this.current.unit=e.units[0])}return e.prototype.move=function(){return this.advance(),this.current.element=this.elements[this.idx],this.current},e.prototype.advance=function(){if(this.idx=this.structure.units.length?this.hasNext=!1:(this.current.unit=this.structure.units[this.unitIndex],this.elements=this.current.unit.elements,this.maxIdx=this.elements.length-1,0===this.maxIdx&&(this.hasNext=this.unitIndex+10}))}e.distance=function(e,t){if(0===e.elementCount||0===t.elementCount)return 0;for(var r=e.units,n=Number.MAX_VALUE,a=0,i=r.length;a=h.id||!i(l,h)||(h.elements.length>=l.elements.length?t(l,h):t(h,l))}}}},e.eachAtomicHierarchyElement=function(e,t){for(var r=t.chain,n=t.residue,i=t.atom,o=c.a.Location.create(e),s=0,u=e.units;s=i.largeResidueCount*a?function(e,t){var r=_(e);return r.length>=1&&r[0].units.length>t.highSymmetryUnitCount}(t,i)?j.Huge:j.Gigantic:function(e,t){var r=_(e);return 1===r.length&&r[0].units.length>2&&r[0].units[0].polymerElements.length0)for(var n=parseInt(e.substring(0,r)),a=parseInt(e.substr(r+1)),i=n;i<=a;i++)t[t.length]=i.toString();else t[t.length]=e.trim()})),a[a.length]=t})),a}var h,m,g=r(705);function b(e){if(0!==e._rowCount){for(var t=e.id,r=e.matrix,o=e.vector,s=n.a.struct_ncs_oper.matrix.space,u=n.a.struct_ncs_oper.vector.space,c=[],l=0;l=0}function n(e){return e}e.RootRef="-=root=-",e.areStatesEqual=function(e,t){return!!e.isHidden!=!!t.isHidden||!!e.isCollapsed!=!!t.isCollapsed||!!e.isGhost!=!!t.isGhost||!!e.isLocked!=!!t.isLocked},e.isStateChange=function(e,t){return!!t&&(void 0!==t.isCollapsed&&e.isCollapsed!==t.isCollapsed||(void 0!==t.isHidden&&e.isHidden!==t.isHidden||(void 0!==t.isGhost&&e.isGhost!==t.isGhost||void 0!==t.isLocked&&e.isLocked!==t.isLocked)))},e.assignState=function(e,t){if(!t)return!1;for(var r=!1,n=0,a=Object.keys(t);na.d.max(n)||t(e)c.cylinderCount&&(i.e.update(c.mappingBuffer,e),i.e.update(c.indexBuffer,t));return c.cylinderCount=u,i.e.update(c.groupBuffer,r),i.e.update(c.startBuffer,n),i.e.update(c.endBuffer,a),i.e.update(c.scaleBuffer,o),i.e.update(c.capBuffer,s),c}(e,t,r,a,o,u,c,l,d):function(e,t,r,a,o,u,c,l){var d,p=Object(h.g)(),m=-1,g=-1,b={kind:"cylinders",cylinderCount:l,mappingBuffer:i.e.create(e),indexBuffer:i.e.create(t),groupBuffer:i.e.create(r),startBuffer:i.e.create(a),endBuffer:i.e.create(o),scaleBuffer:i.e.create(u),capBuffer:i.e.create(c),get boundingSphere(){var e=n(b);if(e!==m){var t=Object(f.a)(b.startBuffer.ref.value,6*b.cylinderCount,6),r=Object(f.a)(b.endBuffer.ref.value,6*b.cylinderCount,6);h.g.expandBySphere(p,t,r),m=e}return p},get groupMapping(){return b.groupBuffer.ref.version!==g&&(d=Object(s.c)(b.groupBuffer.ref.value,b.cylinderCount,6),g=b.groupBuffer.ref.version),d},setBoundingSphere:function(e){h.g.copy(p,e),m=n(b)}};return b}(e,t,r,a,o,u,c,l)}function r(e){return t(e?e.mappingBuffer.ref.value:new Float32Array(0),e?e.indexBuffer.ref.value:new Uint32Array(0),e?e.groupBuffer.ref.value:new Float32Array(0),e?e.startBuffer.ref.value:new Float32Array(0),e?e.endBuffer.ref.value:new Float32Array(0),e?e.scaleBuffer.ref.value:new Float32Array(0),e?e.capBuffer.ref.value:new Float32Array(0),0,e)}function n(e){return Object(v.l)([e.cylinderCount,e.mappingBuffer.ref.version,e.indexBuffer.ref.version,e.groupBuffer.ref.version,e.startBuffer.ref.version,e.endBuffer.ref.version,e.scaleBuffer.ref.version,e.capBuffer.ref.version])}function x(e,t){var r=6*e.cylinderCount,n=t.instanceCount.ref.value,a=Object(d.b)(),i=a.position,s=e.startBuffer.ref.value,u=e.endBuffer.ref.value,c=t.aTransform.ref.value;return Object(d.a)(r,n,2,(function(e,t){var r=e%6==0?s:u;return t<0?o.g.fromArray(i,r,3*e):o.g.transformMat4Offset(i,r,c,0,3*e,16*t),a}))}function O(e,t,r,n,s){var d=r.instanceCount,p=r.groupCount,v=x(e,t),O=Object(u.a)(r,v,n.color),j=Object(l.a)(r,n.size),S=Object(c.a)(d*p),_=Object(g.c)(),w=Object(b.c)(),C=Object(y.d)(),A={drawCount:4*e.cylinderCount*3,vertexCount:6*e.cylinderCount,groupCount:p,instanceCount:d},E=Object(l.b)(j)*s.sizeFactor,P=h.g.clone(e.boundingSphere),T=Object(f.b)(P,t.aTransform.ref.value,d);return Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)({aMapping:e.mappingBuffer,aGroup:e.groupBuffer,aStart:e.startBuffer,aEnd:e.endBuffer,aScale:e.scaleBuffer,aCap:e.capBuffer,elements:e.indexBuffer,boundingSphere:i.e.create(T),invariantBoundingSphere:i.e.create(P),uInvariantBoundingSphere:i.e.create(o.h.ofSphere(P))},O),j),S),_),w),C),t),{padding:i.e.create(E)}),m.a.createValues(s,A)),{uSizeFactor:i.e.create(s.sizeFactor*s.sizeAspectRatio),dDoubleSided:i.e.create(s.doubleSided),dIgnoreLight:i.e.create(s.ignoreLight),dXrayShaded:i.e.create(s.xrayShaded)})}function j(e,t){m.a.updateRenderableState(e,t),e.opaque=e.opaque&&!t.xrayShaded,e.writeDepth=e.opaque}e.create=t,e.createEmpty=r,e.transform=function(e,t){var r=e.startBuffer.ref.value;Object(s.e)(t,r,0,6*e.cylinderCount),i.e.update(e.startBuffer,r);var n=e.endBuffer.ref.value;Object(s.e)(t,n,0,6*e.cylinderCount),i.e.update(e.endBuffer,n)},e.Params=Object(a.a)(Object(a.a)({},m.a.Params),{sizeFactor:p.a.Numeric(1,{min:0,max:10,step:.1}),sizeAspectRatio:p.a.Numeric(1,{min:0,max:3,step:.01}),doubleSided:p.a.Boolean(!1,m.a.CustomQualityParamInfo),ignoreLight:p.a.Boolean(!1,m.a.ShadingCategory),xrayShaded:p.a.Boolean(!1,m.a.ShadingCategory)}),e.Utils={Params:e.Params,createEmpty:r,createValues:O,createValuesSimple:function(t,r,n,i,o){var s=m.a.createSimple(n,i,o),u=Object(a.a)(Object(a.a)({},p.a.getDefaultValues(e.Params)),r);return O(t,s.transform,s.locationIterator,s.theme,u)},updateValues:function(e,t){m.a.updateValues(e,t),i.e.updateIfChanged(e.uSizeFactor,t.sizeFactor*t.sizeAspectRatio),i.e.updateIfChanged(e.dDoubleSided,t.doubleSided),i.e.updateIfChanged(e.dIgnoreLight,t.ignoreLight),i.e.updateIfChanged(e.dXrayShaded,t.xrayShaded)},updateBoundingSphere:function(e,t){var r=h.g.clone(t.boundingSphere),n=Object(f.b)(r,e.aTransform.ref.value,e.instanceCount.ref.value);h.g.equals(n,e.boundingSphere.ref.value)||i.e.update(e.boundingSphere,n);h.g.equals(r,e.invariantBoundingSphere.ref.value)||(i.e.update(e.invariantBoundingSphere,r),i.e.update(e.uInvariantBoundingSphere,o.h.fromSphere(e.uInvariantBoundingSphere.ref.value,r)))},createRenderableState:function(e){var t=m.a.createRenderableState(e);return j(t,e),t},updateRenderableState:j,createPositionIterator:x}}(n||(n={}))},function(e,t,r){"use strict";r.d(t,"i",(function(){return a})),r.d(t,"h",(function(){return i})),r.d(t,"b",(function(){return o})),r.d(t,"a",(function(){return s})),r.d(t,"e",(function(){return u})),r.d(t,"c",(function(){return c})),r.d(t,"d",(function(){return l})),r.d(t,"f",(function(){return d})),r.d(t,"g",(function(){return p}));var n=r(586);r(576);function a(e,t){return e.model.atomicHierarchy.atoms.type_symbol.value(e.elements[t])}function i(e,t){return e.model.atomicHierarchy.atoms.pdbx_formal_charge.value(e.elements[t])}function o(e,t){return e.model.atomicHierarchy.atoms.label_atom_id.value(e.elements[t])}function s(e,t){return e.model.atomicHierarchy.atoms.label_alt_id.value(e.elements[t])}function u(e,t){return e.model.atomicHierarchy.atoms.label_comp_id.value(e.elements[t])}function c(e,t,r){return function(e,t,r){for(var a=0,i=e.interUnitBonds.getEdgeIndices(r,t.id),o=0,s=i.length;o=o?o:a},e.prototype.findAtom=function(e){var t=this.findResidue(e);return t<0?-1:void 0===e.label_alt_id?b(this.residueOffsets[t],this.residueOffsets[t+1],this.map.label_atom_id,e.label_atom_id):v(this.residueOffsets[t],this.residueOffsets[t+1],this.map.label_atom_id,this.map.label_alt_id,e.label_atom_id,e.label_alt_id)},e.prototype.findAtomAuth=function(e){var t=this.findResidueAuth(e);return t<0?-1:void 0===e.label_alt_id?b(this.residueOffsets[t],this.residueOffsets[t+1],this.map.auth_atom_id,e.auth_atom_id):v(this.residueOffsets[t],this.residueOffsets[t+1],this.map.auth_atom_id,this.map.label_alt_id,e.auth_atom_id,e.label_alt_id)},e.prototype.findAtomOnResidue=function(e,t,r){return void 0===r?b(this.residueOffsets[e],this.residueOffsets[e+1],this.map.label_atom_id,t):v(this.residueOffsets[e],this.residueOffsets[e+1],this.map.label_atom_id,this.map.label_alt_id,t,r)},e.prototype.findAtomsOnResidue=function(e,t){return function(e,t,r,n){for(var a=e;a=l[d+1]&&(d+=1,p=0),s[f]=++p;i.label_seq_id=a.a.ofIntArray(s)}return a.d.columnToArray(i,"label_seq_id",Int32Array),a.d.columnToArray(i,"auth_seq_id",Int32Array),P(n,"label_atom_id","auth_atom_id"),P(n,"label_comp_id","auth_comp_id"),P(i,"label_seq_id","auth_seq_id"),P(o,"label_asym_id","auth_asym_id"),{atoms:n,residues:i,chains:o,atomSourceIndex:t}}(e,t,p),h=function(e,t){var r=new Map;if(!w.a.is(t))return r;var n=Object(A.a)(C.a,t.data.frame).molstar_atom_site_operator_mapping;if(0===n._rowCount)return r;for(var i=new Map,o=new Map,s=0;s1&&(r.push(d,f-1),n.push(f-1,f),d=f),f===l-1&&r.push(d,f),p=h}return{polymerRanges:k.a.ofSortedRanges(r),gapRanges:k.a.ofSortedRanges(n)}}var F=r(683),z={hierarchy:S.Empty,conformation:void 0};function U(e,t){var r=e.ihm_sphere_obj_site,a=e.ihm_gaussian_obj_site;if(0===r._rowCount&&0===a._rowCount)return z;var i=V(r),o=function(e){return{x:e.Cartn_x.toArray({array:Float32Array}),y:e.Cartn_y.toArray({array:Float32Array}),z:e.Cartn_z.toArray({array:Float32Array}),radius:e.object_radius.toArray({array:Float32Array}),rmsf:e.rmsf.toArray({array:Float32Array})}}(r),s=B(i,e.entities),u=N(i,t.chemicalComponentMap),c=V(a),l=function(e){for(var t=F.a.ihm_gaussian_obj_site.covariance_matrix.space,r=[],n=e.covariance_matrix,a=0,i=n.rowCount;a0)for(var r=e.chem_comp.id,n=0,i=r.rowCount;n0)for(var r=e.pdbx_chem_comp_identifier,n=r.comp_id,a=r.type,i=r.identifier,o=0,s=n.rowCount;o0){var l=e.chem_comp,d=l.id;for(a=l.type,o=0,s=d.rowCount;o0){var c=e.struct_asym,l=(u=c.id,c.entity_id);for(o=0,s=u.rowCount;o0?[4,de(r,e,a,t)]:[3,2];case 1:return s=n.sent(),[3,4];case 2:return[4,ce(r,e,a,t)];case 3:s=n.sent(),n.label=4;case 4:for(i=s,u=0;u0?o[o.length-1]:void 0),o.push(m),l=d,[3,1];case 3:return[2,o]}}))}))}function le(e,t){for(var r=new Map,n=e._rowCount,i=0;it&&(r=t,n=e);var i=Object(a.f)(r,n);return!this.included.has(i)&&(this.included.add(i),this.xs[this.xs.length]=r,this.ys[this.ys.length]=n,!0)},e.prototype.getGraph=function(){return u(this.vertexCount,this.xs,this.ys)},e.prototype.getEdgeBuiler=function(){return new n(this.vertexCount,this.xs,this.ys)},e}();function u(t,r,n){var a=new e.EdgeBuilder(t,r,n);return a.addAllEdges(),a.createGraph({})}e.UniqueEdgeBuilder=s,e.fromVertexPairs=u,e.induceByVertices=function(e,t){for(var n=e.b,i=e.offset,o=e.vertexCount,s=e.edgeProps,u=new Int32Array(o),c=0,l=t.length;cc&&0!==u[n[p]]&&d++;var h=new Int32Array(t.length+1),m=new Int32Array(2*d),g=new Int32Array(2*d),b=new Int32Array(2*d),v=0,y=0;for(c=0;c0;){for(var p=l.pop(),f=o[p],h=u[p],m=u[p+1];h=0&&(l.push(d.head),o[d.head]=++s,d.remove(d.head))}return{componentCount:t,componentIndex:o}},e.areVertexSetsConnected=function(e,t,r,n){if(i.f.areIntersecting(t,r))return!0;if(n<1)return!1;for(var a=new Set,o=0,s=t.length;o1&&e(t,c,n,a-1,o)}(e,t,r,n,a)}}(n||(n={}))},function(e,t,r){"use strict";r.d(t,"a",(function(){return w})),r.d(t,"b",(function(){return C})),r.d(t,"c",(function(){return A}));var n=r(574),a=r(602),i=r(691),o=r(572),s={radiusTop:1,radiusBottom:1,height:1,radialSegments:8,heightSegments:1,topCap:!1,bottomCap:!1,thetaStart:0,thetaLength:2*Math.PI};var u=r(902),c=r(787),l=r(583),d=new Map,p=n.g.create(0,1,0),f=Object(n.g)(),h=Object(n.g)(),m=Object(n.g)(),g=Object(n.c)(),b=Object(n.c)(),v=Object(n.g)(),y=Object(n.c)(),x=Object(n.g)(),O=Object(n.g)();function j(e,t,r,a,i){return n.g.setMagnitude(h,r,a/2),n.g.add(m,t,h),i?n.g.matchDirection(O,p,h):n.g.copy(O,p),n.c.fromScaling(y,n.g.set(v,1,a,1)),n.g.makeRotation(b,O,h),n.c.mul(e,b,y),n.c.setTranslation(e,m)}var S=new Int32Array(9);function _(e){var t=function(e){var t,r,n,a,i,o,u,c,d;return S[0]=Math.round(1e3*(null!==(t=e.radiusTop)&&void 0!==t?t:s.radiusTop)),S[1]=Math.round(1e3*(null!==(r=e.radiusBottom)&&void 0!==r?r:s.radiusBottom)),S[2]=Math.round(1e3*(null!==(n=e.height)&&void 0!==n?n:s.height)),S[3]=null!==(a=e.radialSegments)&&void 0!==a?a:s.radialSegments,S[4]=null!==(i=e.heightSegments)&&void 0!==i?i:s.heightSegments,S[5]=(null!==(o=e.topCap)&&void 0!==o?o:s.topCap)?1:0,S[6]=(null!==(u=e.bottomCap)&&void 0!==u?u:s.bottomCap)?1:0,S[7]=Math.round(1e3*(null!==(c=e.thetaStart)&&void 0!==c?c:s.thetaStart)),S[8]=Math.round(1e3*(null!==(d=e.thetaLength)&&void 0!==d?d:s.thetaLength)),Object(l.l)(S)}(e),r=d.get(t);if(void 0===r){if(e.radialSegments&&e.radialSegments<=4){var a=Math.max(3,e.radialSegments),p=Object(u.e)(Object(c.a)(a,!0,e.radiusTop),e);r=Object(i.c)(p,n.c.rotX90)}else r=function(e){var t=Object(o.a)(Object(o.a)({},s),e),r=t.radiusTop,a=t.radiusBottom,i=t.height,u=t.radialSegments,c=t.heightSegments,l=t.topCap,d=t.bottomCap,p=t.thetaStart,f=t.thetaLength,h=[],m=[],g=[],b=0,v=[],y=i/2;return function(){for(var e=n.g.zero(),t=(a-r)/i,o=0;o<=c;++o){for(var s=[],l=o/c,d=l*(a-r)+r,x=0;x<=u;++x){var O=x/u*f+p,j=Math.sin(O),S=Math.cos(O);m.push(d*j,-l*i+y,d*S),n.g.normalize(e,n.g.set(e,j,t,S)),g.push.apply(g,e),s.push(b++)}v.push(s)}for(x=0;x0&&x(!0),d&&a>0&&x(!1),{vertices:new Float32Array(m),normals:new Float32Array(g),indices:new Uint32Array(h)};function x(e){for(var t=!0===e?r:a,n=!0===e?1:-1,i=b,o=1;o<=u;++o)m.push(0,y*n,0),g.push(0,n,0),++b;var s=b;for(o=0;o<=u;++o){var c=o/u*f+p,l=Math.cos(c),d=Math.sin(c);m.push(t*d,y*n,t*l),g.push(0,n,0),++b}for(o=0;o1)for(var r=1;r9||o<0)return i*a|0;a=10*a+o|0}return i*a}function i(e,t,r,n){return 43===t.charCodeAt(r)&&r++,e*Math.pow(10,a(t,r,n))}function o(e,t,r){for(;t=0&&c<10)){if(-2===c){for(++n;n=0&&c<10))return 53===c||21===c?i(a*(o+s/u),e,n+1,r):a*(o+s/u);s=10*s+c,u*=10,++n}return a*(o+s/u)}if(53===c||21===c)return i(a*o,e,n+1,r);break}o=10*o+c,++n}return a*o}function u(e,t,r){return 43===e.charCodeAt(t)&&t++,function(e,t,r){for(45===e.charCodeAt(t)&&t++;t9||n<0)return!1}return!0}(e,t,r)?2:3}function c(e){var t=0,r=e.length;if(45===e.charCodeAt(t)&&++t,46===e.charCodeAt(t)&&r-t==1)return 3;for(;t=0&&n<10)){if(-2===n){++t;for(var a=!1;t=0&&n<10))return 53===n||21===n?u(e,t+1,r):3;a=!0,++t}return a?1:0}if(53===n||21===n)return 0===t||1===t&&45===e.charCodeAt(0)?3:u(e,t+1,r);break}++t}return t===r?0:3}r.d(t,"e",(function(){return n})),r.d(t,"d",(function(){return a})),r.d(t,"c",(function(){return o})),r.d(t,"b",(function(){return s})),r.d(t,"a",(function(){return c}))},function(e,t,r){var n,a,i;function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}i=function(){"use strict";var e=Array.prototype.slice;function t(e,t){t&&(e.prototype=Object.create(t.prototype)),e.prototype.constructor=e}function r(e){return s(e)?e:H(e)}function n(e){return u(e)?e:G(e)}function a(e){return c(e)?e:q(e)}function i(e){return s(e)&&!l(e)?e:W(e)}function s(e){return!(!e||!e[p])}function u(e){return!(!e||!e[f])}function c(e){return!(!e||!e[h])}function l(e){return u(e)||c(e)}function d(e){return!(!e||!e[m])}t(n,r),t(a,r),t(i,r),r.isIterable=s,r.isKeyed=u,r.isIndexed=c,r.isAssociative=l,r.isOrdered=d,r.Keyed=n,r.Indexed=a,r.Set=i;var p="@@__IMMUTABLE_ITERABLE__@@",f="@@__IMMUTABLE_KEYED__@@",h="@@__IMMUTABLE_INDEXED__@@",m="@@__IMMUTABLE_ORDERED__@@",g={},b={value:!1},v={value:!1};function y(e){return e.value=!1,e}function x(e){e&&(e.value=!0)}function O(){}function j(e,t){t=t||0;for(var r=Math.max(0,e.length-t),n=new Array(r),a=0;a>>0;if(""+r!==t||4294967295===r)return NaN;t=r}return t<0?S(e)+t:t}function w(){return!0}function C(e,t,r){return(0===e||void 0!==r&&e<=-r)&&(void 0===t||void 0!==r&&t>=r)}function A(e,t){return P(e,t,0)}function E(e,t){return P(e,t,t)}function P(e,t,r){return void 0===e?r:e<0?Math.max(0,t+e):void 0===t?e:Math.min(t,e)}var T,I,k,M="function"==typeof Symbol&&Symbol.iterator,D=M||"@@iterator";function R(e){this.next=e}function B(e,t,r,n){var a=0===e?t:1===e?r:[t,r];return n?n.value=a:n={value:a,done:!1},n}function L(){return{value:void 0,done:!0}}function N(e){return!!U(e)}function F(e){return e&&"function"==typeof e.next}function z(e){var t=U(e);return t&&t.call(e)}function U(e){var t=e&&(M&&e[M]||e["@@iterator"]);if("function"==typeof t)return t}function V(e){return e&&"number"==typeof e.length}function H(e){return null==e?J():s(e)?e.toSeq():function(e){var t=te(e)||"object"===o(e)&&new Y(e);if(!t)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+e);return t}(e)}function G(e){return null==e?J().toKeyedSeq():s(e)?u(e)?e.toSeq():e.fromEntrySeq():$(e)}function q(e){return null==e?J():s(e)?u(e)?e.entrySeq():e.toIndexedSeq():ee(e)}function W(e){return(null==e?J():s(e)?u(e)?e.entrySeq():e:ee(e)).toSetSeq()}function X(e){this._array=e,this.size=e.length}function Y(e){var t=Object.keys(e);this._object=e,this._keys=t,this.size=t.length}function K(e){this._iterable=e,this.size=e.length||e.size}function Q(e){this._iterator=e,this._iteratorCache=[]}function Z(e){return!(!e||!e["@@__IMMUTABLE_SEQ__@@"])}function J(){return T||(T=new X([]))}function $(e){var t=Array.isArray(e)?new X(e).fromEntrySeq():F(e)?new Q(e).fromEntrySeq():N(e)?new K(e).fromEntrySeq():"object"===o(e)?new Y(e):void 0;if(!t)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+e);return t}function ee(e){var t=te(e);if(!t)throw new TypeError("Expected Array or iterable object of values: "+e);return t}function te(e){return V(e)?new X(e):F(e)?new Q(e):N(e)?new K(e):void 0}function re(e,t,r,n){var a=e._cache;if(a){for(var i=a.length-1,o=0;o<=i;o++){var s=a[r?i-o:o];if(!1===t(s[1],n?s[0]:o,e))return o+1}return o}return e.__iterateUncached(t,r)}function ne(e,t,r,n){var a=e._cache;if(a){var i=a.length-1,o=0;return new R((function(){var e=a[r?i-o:o];return o++>i?{value:void 0,done:!0}:B(t,n?e[0]:o-1,e[1])}))}return e.__iteratorUncached(t,r)}function ae(e,t){return t?function e(t,r,n,a){return Array.isArray(r)?t.call(a,n,q(r).map((function(n,a){return e(t,n,a,r)}))):oe(r)?t.call(a,n,G(r).map((function(n,a){return e(t,n,a,r)}))):r}(t,e,"",{"":e}):ie(e)}function ie(e){return Array.isArray(e)?q(e).map(ie).toList():oe(e)?G(e).map(ie).toMap():e}function oe(e){return e&&(e.constructor===Object||void 0===e.constructor)}function se(e,t){if(e===t||e!=e&&t!=t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if((e=e.valueOf())===(t=t.valueOf())||e!=e&&t!=t)return!0;if(!e||!t)return!1}return!("function"!=typeof e.equals||"function"!=typeof t.equals||!e.equals(t))}function ue(e,t){if(e===t)return!0;if(!s(t)||void 0!==e.size&&void 0!==t.size&&e.size!==t.size||void 0!==e.__hash&&void 0!==t.__hash&&e.__hash!==t.__hash||u(e)!==u(t)||c(e)!==c(t)||d(e)!==d(t))return!1;if(0===e.size&&0===t.size)return!0;var r=!l(e);if(d(e)){var n=e.entries();return t.every((function(e,t){var a=n.next().value;return a&&se(a[1],e)&&(r||se(a[0],t))}))&&n.next().done}var a=!1;if(void 0===e.size)if(void 0===t.size)"function"==typeof e.cacheResult&&e.cacheResult();else{a=!0;var i=e;e=t,t=i}var o=!0,p=t.__iterate((function(t,n){if(r?!e.has(t):a?!se(t,e.get(n,g)):!se(e.get(n,g),t))return o=!1,!1}));return o&&e.size===p}function ce(e,t){if(!(this instanceof ce))return new ce(e,t);if(this._value=e,this.size=void 0===t?1/0:Math.max(0,t),0===this.size){if(I)return I;I=this}}function le(e,t){if(!e)throw new Error(t)}function de(e,t,r){if(!(this instanceof de))return new de(e,t,r);if(le(0!==r,"Cannot step a Range by 0"),e=e||0,void 0===t&&(t=1/0),r=void 0===r?1:Math.abs(r),tn?{value:void 0,done:!0}:B(e,a,r[t?n-a++:a++])}))},t(Y,G),Y.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},Y.prototype.has=function(e){return this._object.hasOwnProperty(e)},Y.prototype.__iterate=function(e,t){for(var r=this._object,n=this._keys,a=n.length-1,i=0;i<=a;i++){var o=n[t?a-i:i];if(!1===e(r[o],o,this))return i+1}return i},Y.prototype.__iterator=function(e,t){var r=this._object,n=this._keys,a=n.length-1,i=0;return new R((function(){var o=n[t?a-i:i];return i++>a?{value:void 0,done:!0}:B(e,o,r[o])}))},Y.prototype[m]=!0,t(K,q),K.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var r=z(this._iterable),n=0;if(F(r))for(var a;!(a=r.next()).done&&!1!==e(a.value,n++,this););return n},K.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var r=z(this._iterable);if(!F(r))return new R(L);var n=0;return new R((function(){var t=r.next();return t.done?t:B(e,n++,t.value)}))},t(Q,q),Q.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);for(var r,n=this._iterator,a=this._iteratorCache,i=0;i=n.length){var t=r.next();if(t.done)return t;n[a]=t.value}return B(e,a,n[a++])}))},t(ce,q),ce.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},ce.prototype.get=function(e,t){return this.has(e)?this._value:t},ce.prototype.includes=function(e){return se(this._value,e)},ce.prototype.slice=function(e,t){var r=this.size;return C(e,t,r)?this:new ce(this._value,E(t,r)-A(e,r))},ce.prototype.reverse=function(){return this},ce.prototype.indexOf=function(e){return se(this._value,e)?0:-1},ce.prototype.lastIndexOf=function(e){return se(this._value,e)?this.size:-1},ce.prototype.__iterate=function(e,t){for(var r=0;r=0&&t=0&&rr?{value:void 0,done:!0}:B(e,i++,o)}))},de.prototype.equals=function(e){return e instanceof de?this._start===e._start&&this._end===e._end&&this._step===e._step:ue(this,e)},t(pe,r),t(fe,pe),t(he,pe),t(me,pe),pe.Keyed=fe,pe.Indexed=he,pe.Set=me;var ge="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(e,t){var r=65535&(e|=0),n=65535&(t|=0);return r*n+((e>>>16)*n+r*(t>>>16)<<16>>>0)|0};function be(e){return e>>>1&1073741824|3221225471&e}function ve(e){if(!1===e||null==e)return 0;if("function"==typeof e.valueOf&&(!1===(e=e.valueOf())||null==e))return 0;if(!0===e)return 1;var t=o(e);if("number"===t){if(e!=e||e===1/0)return 0;var r=0|e;for(r!==e&&(r^=4294967295*e);e>4294967295;)r^=e/=4294967295;return be(r)}if("string"===t)return e.length>Ce?function(e){var t=Pe[e];return void 0===t&&(t=ye(e),Ee===Ae&&(Ee=0,Pe={}),Ee++,Pe[e]=t),t}(e):ye(e);if("function"==typeof e.hashCode)return e.hashCode();if("object"===t)return function(e){var t;if(Se&&void 0!==(t=xe.get(e)))return t;if(void 0!==(t=e[we]))return t;if(!je){if(void 0!==(t=e.propertyIsEnumerable&&e.propertyIsEnumerable[we]))return t;if(void 0!==(t=function(e){if(e&&e.nodeType>0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}(e)))return t}if(t=++_e,1073741824&_e&&(_e=0),Se)xe.set(e,t);else{if(void 0!==Oe&&!1===Oe(e))throw new Error("Non-extensible objects are not allowed as keys.");if(je)Object.defineProperty(e,we,{enumerable:!1,configurable:!1,writable:!1,value:t});else if(void 0!==e.propertyIsEnumerable&&e.propertyIsEnumerable===e.constructor.prototype.propertyIsEnumerable)e.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},e.propertyIsEnumerable[we]=t;else{if(void 0===e.nodeType)throw new Error("Unable to set a non-enumerable property on object.");e[we]=t}}return t}(e);if("function"==typeof e.toString)return ye(e.toString());throw new Error("Value type "+t+" cannot be hashed.")}function ye(e){for(var t=0,r=0;r=t.length)throw new Error("Missing value for key: "+t[r]);e.set(t[r],t[r+1])}}))},Ie.prototype.toString=function(){return this.__toString("Map {","}")},Ie.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},Ie.prototype.set=function(e,t){return We(this,e,t)},Ie.prototype.setIn=function(e,t){return this.updateIn(e,g,(function(){return t}))},Ie.prototype.remove=function(e){return We(this,e,g)},Ie.prototype.deleteIn=function(e){return this.updateIn(e,(function(){return g}))},Ie.prototype.update=function(e,t,r){return 1===arguments.length?e(this):this.updateIn([e],t,r)},Ie.prototype.updateIn=function(e,t,r){r||(r=t,t=void 0);var n=function e(t,r,n,a){var i=t===g,o=r.next();if(o.done){var s=i?n:t,u=a(s);return u===s?t:u}le(i||t&&t.set,"invalid keyPath");var c=o.value,l=i?g:t.get(c,g),d=e(l,r,n,a);return d===l?t:d===g?t.remove(c):(i?qe():t).set(c,d)}(this,Qt(e),t,r);return n===g?void 0:n},Ie.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):qe()},Ie.prototype.merge=function(){return Qe(this,void 0,arguments)},Ie.prototype.mergeWith=function(t){var r=e.call(arguments,1);return Qe(this,t,r)},Ie.prototype.mergeIn=function(t){var r=e.call(arguments,1);return this.updateIn(t,qe(),(function(e){return"function"==typeof e.merge?e.merge.apply(e,r):r[r.length-1]}))},Ie.prototype.mergeDeep=function(){return Qe(this,Ze,arguments)},Ie.prototype.mergeDeepWith=function(t){var r=e.call(arguments,1);return Qe(this,Je(t),r)},Ie.prototype.mergeDeepIn=function(t){var r=e.call(arguments,1);return this.updateIn(t,qe(),(function(e){return"function"==typeof e.mergeDeep?e.mergeDeep.apply(e,r):r[r.length-1]}))},Ie.prototype.sort=function(e){return jt(Ft(this,e))},Ie.prototype.sortBy=function(e,t){return jt(Ft(this,t,e))},Ie.prototype.withMutations=function(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this},Ie.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new O)},Ie.prototype.asImmutable=function(){return this.__ensureOwner()},Ie.prototype.wasAltered=function(){return this.__altered},Ie.prototype.__iterator=function(e,t){return new Ue(this,e,t)},Ie.prototype.__iterate=function(e,t){var r=this,n=0;return this._root&&this._root.iterate((function(t){return n++,e(t[1],t[0],r)}),t),n},Ie.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Ge(this.size,this._root,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},Ie.isMap=ke;var Me,De="@@__IMMUTABLE_MAP__@@",Re=Ie.prototype;function Be(e,t){this.ownerID=e,this.entries=t}function Le(e,t,r){this.ownerID=e,this.bitmap=t,this.nodes=r}function Ne(e,t,r){this.ownerID=e,this.count=t,this.nodes=r}function Fe(e,t,r){this.ownerID=e,this.keyHash=t,this.entries=r}function ze(e,t,r){this.ownerID=e,this.keyHash=t,this.entry=r}function Ue(e,t,r){this._type=t,this._reverse=r,this._stack=e._root&&He(e._root)}function Ve(e,t){return B(e,t[0],t[1])}function He(e,t){return{node:e,index:0,__prev:t}}function Ge(e,t,r,n){var a=Object.create(Re);return a.size=e,a._root=t,a.__ownerID=r,a.__hash=n,a.__altered=!1,a}function qe(){return Me||(Me=Ge(0))}function We(e,t,r){var n,a;if(e._root){var i=y(b),o=y(v);if(n=Xe(e._root,e.__ownerID,0,void 0,t,r,i,o),!o.value)return e;a=e.size+(i.value?r===g?-1:1:0)}else{if(r===g)return e;a=1,n=new Be(e.__ownerID,[[t,r]])}return e.__ownerID?(e.size=a,e._root=n,e.__hash=void 0,e.__altered=!0,e):n?Ge(a,n):qe()}function Xe(e,t,r,n,a,i,o,s){return e?e.update(t,r,n,a,i,o,s):i===g?e:(x(s),x(o),new ze(t,n,[a,i]))}function Ye(e){return e.constructor===ze||e.constructor===Fe}function Ke(e,t,r,n,a){if(e.keyHash===n)return new Fe(t,n,[e.entry,a]);var i,o=31&(0===r?e.keyHash:e.keyHash>>>r),s=31&(0===r?n:n>>>r);return new Le(t,1<>1&1431655765))+(e>>2&858993459))+(e>>4)&252645135,e+=e>>8,127&(e+=e>>16)}function tt(e,t,r,n){var a=n?e:j(e);return a[t]=r,a}Re[De]=!0,Re.delete=Re.remove,Re.removeIn=Re.deleteIn,Be.prototype.get=function(e,t,r,n){for(var a=this.entries,i=0,o=a.length;i=rt)return function(e,t,r,n){e||(e=new O);for(var a=new ze(e,ve(r),[r,n]),i=0;i>>e)),i=this.bitmap;return 0==(i&a)?n:this.nodes[et(i&a-1)].get(e+5,t,r,n)},Le.prototype.update=function(e,t,r,n,a,i,o){void 0===r&&(r=ve(n));var s=31&(0===t?r:r>>>t),u=1<=nt)return function(e,t,r,n,a){for(var i=0,o=new Array(32),s=0;0!==r;s++,r>>>=1)o[s]=1&r?t[i++]:void 0;return o[n]=a,new Ne(e,i+1,o)}(e,p,c,s,h);if(l&&!h&&2===p.length&&Ye(p[1^d]))return p[1^d];if(l&&h&&1===p.length&&Ye(h))return h;var m=e&&e===this.ownerID,b=l?h?c:c^u:c|u,v=l?h?tt(p,d,h,m):function(e,t,r){var n=e.length-1;if(r&&t===n)return e.pop(),e;for(var a=new Array(n),i=0,o=0;o>>e),i=this.nodes[a];return i?i.get(e+5,t,r,n):n},Ne.prototype.update=function(e,t,r,n,a,i,o){void 0===r&&(r=ve(n));var s=31&(0===t?r:r>>>t),u=a===g,c=this.nodes,l=c[s];if(u&&!l)return this;var d=Xe(l,e,t+5,r,n,a,i,o);if(d===l)return this;var p=this.count;if(l){if(!d&&--p0&&n<32?ht(0,n,5,null,new ct(r.toArray())):t.withMutations((function(e){e.setSize(n),r.forEach((function(t,r){return e.set(r,t)}))})))}function ot(e){return!(!e||!e[st])}t(it,he),it.of=function(){return this(arguments)},it.prototype.toString=function(){return this.__toString("List [","]")},it.prototype.get=function(e,t){if((e=_(this,e))>=0&&e=e.size||t<0)return e.withMutations((function(e){t<0?yt(e,t).set(0,r):yt(e,0,t+1).set(t,r)}));t+=e._origin;var n=e._tail,a=e._root,i=y(v);return t>=Ot(e._capacity)?n=gt(n,e.__ownerID,0,t,r,i):a=gt(a,e.__ownerID,e._level,t,r,i),i.value?e.__ownerID?(e._root=a,e._tail=n,e.__hash=void 0,e.__altered=!0,e):ht(e._origin,e._capacity,e._level,a,n):e}(this,e,t)},it.prototype.remove=function(e){return this.has(e)?0===e?this.shift():e===this.size-1?this.pop():this.splice(e,1):this},it.prototype.insert=function(e,t){return this.splice(e,0,t)},it.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=5,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):mt()},it.prototype.push=function(){var e=arguments,t=this.size;return this.withMutations((function(r){yt(r,0,t+e.length);for(var n=0;n>>t&31;if(n>=this.array.length)return new ct([],e);var a,i=0===n;if(t>0){var o=this.array[n];if((a=o&&o.removeBefore(e,t-5,r))===o&&i)return this}if(i&&!a)return this;var s=bt(this,e);if(!i)for(var u=0;u>>t&31;if(a>=this.array.length)return this;if(t>0){var i=this.array[a];if((n=i&&i.removeAfter(e,t-5,r))===i&&a===this.array.length-1)return this}var o=bt(this,e);return o.array.splice(a+1),n&&(o.array[a]=n),o};var lt,dt,pt={};function ft(e,t){var r=e._origin,n=e._capacity,a=Ot(n),i=e._tail;return o(e._root,e._level,0);function o(e,s,u){return 0===s?function(e,o){var s=o===a?i&&i.array:e&&e.array,u=o>r?0:r-o,c=n-o;return c>32&&(c=32),function(){if(u===c)return pt;var e=t?--c:u++;return s&&s[e]}}(e,u):function(e,a,i){var s,u=e&&e.array,c=i>r?0:r-i>>a,l=1+(n-i>>a);return l>32&&(l=32),function(){for(;;){if(s){var e=s();if(e!==pt)return e;s=null}if(c===l)return pt;var r=t?--l:c++;s=o(u&&u[r],a-5,i+(r<>>r&31,u=e&&s0){var c=e&&e.array[s],l=gt(c,t,r-5,n,a,i);return l===c?e:((o=bt(e,t)).array[s]=l,o)}return u&&e.array[s]===a?e:(x(i),o=bt(e,t),void 0===a&&s===o.array.length-1?o.array.pop():o.array[s]=a,o)}function bt(e,t){return t&&e&&t===e.ownerID?e:new ct(e?e.array.slice():[],t)}function vt(e,t){if(t>=Ot(e._capacity))return e._tail;if(t<1<0;)r=r.array[t>>>n&31],n-=5;return r}}function yt(e,t,r){void 0!==t&&(t|=0),void 0!==r&&(r|=0);var n=e.__ownerID||new O,a=e._origin,i=e._capacity,o=a+t,s=void 0===r?i:r<0?i+r:a+r;if(o===a&&s===i)return e;if(o>=s)return e.clear();for(var u=e._level,c=e._root,l=0;o+l<0;)c=new ct(c&&c.array.length?[void 0,c]:[],n),l+=1<<(u+=5);l&&(o+=l,a+=l,s+=l,i+=l);for(var d=Ot(i),p=Ot(s);p>=1<d?new ct([],n):f;if(f&&p>d&&o5;g-=5){var b=d>>>g&31;m=m.array[b]=bt(m.array[b],n)}m.array[d>>>5&31]=f}if(s=p)o-=p,s-=p,u=5,c=null,h=h&&h.removeBefore(n,0,o);else if(o>a||p>>u&31;if(v!==p>>>u&31)break;v&&(l+=(1<a&&(c=c.removeBefore(n,u,o-l)),c&&pi&&(i=c.size),s(u)||(c=c.map((function(e){return ae(e)}))),n.push(c)}return i>e.size&&(e=e.setSize(i)),$e(e,t,n)}function Ot(e){return e<32?0:e-1>>>5<<5}function jt(e){return null==e?wt():St(e)?e:wt().withMutations((function(t){var r=n(e);Te(r.size),r.forEach((function(e,r){return t.set(r,e)}))}))}function St(e){return ke(e)&&d(e)}function _t(e,t,r,n){var a=Object.create(jt.prototype);return a.size=e?e.size:0,a._map=e,a._list=t,a.__ownerID=r,a.__hash=n,a}function wt(){return dt||(dt=_t(qe(),mt()))}function Ct(e,t,r){var n,a,i=e._map,o=e._list,s=i.get(t),u=void 0!==s;if(r===g){if(!u)return e;o.size>=32&&o.size>=2*i.size?(n=(a=o.filter((function(e,t){return void 0!==e&&s!==t}))).toKeyedSeq().map((function(e){return e[0]})).flip().toMap(),e.__ownerID&&(n.__ownerID=a.__ownerID=e.__ownerID)):(n=i.remove(t),a=s===o.size-1?o.pop():o.set(s,void 0))}else if(u){if(r===o.get(s)[1])return e;n=i,a=o.set(s,[t,r])}else n=i.set(t,o.size),a=o.set(o.size,[t,r]);return e.__ownerID?(e.size=n.size,e._map=n,e._list=a,e.__hash=void 0,e):_t(n,a)}function At(e,t){this._iter=e,this._useKeys=t,this.size=e.size}function Et(e){this._iter=e,this.size=e.size}function Pt(e){this._iter=e,this.size=e.size}function Tt(e){this._iter=e,this.size=e.size}function It(e){var t=Xt(e);return t._iter=e,t.size=e.size,t.flip=function(){return e},t.reverse=function(){var t=e.reverse.apply(this);return t.flip=function(){return e.reverse()},t},t.has=function(t){return e.includes(t)},t.includes=function(t){return e.has(t)},t.cacheResult=Yt,t.__iterateUncached=function(t,r){var n=this;return e.__iterate((function(e,r){return!1!==t(r,e,n)}),r)},t.__iteratorUncached=function(t,r){if(2===t){var n=e.__iterator(t,r);return new R((function(){var e=n.next();if(!e.done){var t=e.value[0];e.value[0]=e.value[1],e.value[1]=t}return e}))}return e.__iterator(1===t?0:1,r)},t}function kt(e,t,r){var n=Xt(e);return n.size=e.size,n.has=function(t){return e.has(t)},n.get=function(n,a){var i=e.get(n,g);return i===g?a:t.call(r,i,n,e)},n.__iterateUncached=function(n,a){var i=this;return e.__iterate((function(e,a,o){return!1!==n(t.call(r,e,a,o),a,i)}),a)},n.__iteratorUncached=function(n,a){var i=e.__iterator(2,a);return new R((function(){var a=i.next();if(a.done)return a;var o=a.value,s=o[0];return B(n,s,t.call(r,o[1],s,e),a)}))},n}function Mt(e,t){var r=Xt(e);return r._iter=e,r.size=e.size,r.reverse=function(){return e},e.flip&&(r.flip=function(){var t=It(e);return t.reverse=function(){return e.flip()},t}),r.get=function(r,n){return e.get(t?r:-1-r,n)},r.has=function(r){return e.has(t?r:-1-r)},r.includes=function(t){return e.includes(t)},r.cacheResult=Yt,r.__iterate=function(t,r){var n=this;return e.__iterate((function(e,r){return t(e,r,n)}),!r)},r.__iterator=function(t,r){return e.__iterator(t,!r)},r}function Dt(e,t,r,n){var a=Xt(e);return n&&(a.has=function(n){var a=e.get(n,g);return a!==g&&!!t.call(r,a,n,e)},a.get=function(n,a){var i=e.get(n,g);return i!==g&&t.call(r,i,n,e)?i:a}),a.__iterateUncached=function(a,i){var o=this,s=0;return e.__iterate((function(e,i,u){if(t.call(r,e,i,u))return s++,a(e,n?i:s-1,o)}),i),s},a.__iteratorUncached=function(a,i){var o=e.__iterator(2,i),s=0;return new R((function(){for(;;){var i=o.next();if(i.done)return i;var u=i.value,c=u[0],l=u[1];if(t.call(r,l,c,e))return B(a,n?c:s++,l,i)}}))},a}function Rt(e,t,r,n){var a=e.size;if(void 0!==t&&(t|=0),void 0!==r&&(r===1/0?r=a:r|=0),C(t,r,a))return e;var i=A(t,a),o=E(r,a);if(i!=i||o!=o)return Rt(e.toSeq().cacheResult(),t,r,n);var s,u=o-i;u==u&&(s=u<0?0:u);var c=Xt(e);return c.size=0===s?s:e.size&&s||void 0,!n&&Z(e)&&s>=0&&(c.get=function(t,r){return(t=_(this,t))>=0&&ts)return{value:void 0,done:!0};var e=a.next();return n||1===t?e:B(t,u-1,0===t?void 0:e.value[1],e)}))},c}function Bt(e,t,r,n){var a=Xt(e);return a.__iterateUncached=function(a,i){var o=this;if(i)return this.cacheResult().__iterate(a,i);var s=!0,u=0;return e.__iterate((function(e,i,c){if(!s||!(s=t.call(r,e,i,c)))return u++,a(e,n?i:u-1,o)})),u},a.__iteratorUncached=function(a,i){var o=this;if(i)return this.cacheResult().__iterator(a,i);var s=e.__iterator(2,i),u=!0,c=0;return new R((function(){var e,i,l;do{if((e=s.next()).done)return n||1===a?e:B(a,c++,0===a?void 0:e.value[1],e);var d=e.value;i=d[0],l=d[1],u&&(u=t.call(r,l,i,o))}while(u);return 2===a?e:B(a,i,l,e)}))},a}function Lt(e,t){var r=u(e),a=[e].concat(t).map((function(e){return s(e)?r&&(e=n(e)):e=r?$(e):ee(Array.isArray(e)?e:[e]),e})).filter((function(e){return 0!==e.size}));if(0===a.length)return e;if(1===a.length){var i=a[0];if(i===e||r&&u(i)||c(e)&&c(i))return i}var o=new X(a);return r?o=o.toKeyedSeq():c(e)||(o=o.toSetSeq()),(o=o.flatten(!0)).size=a.reduce((function(e,t){if(void 0!==e){var r=t.size;if(void 0!==r)return e+r}}),0),o}function Nt(e,t,r){var n=Xt(e);return n.__iterateUncached=function(n,a){var i=0,o=!1;return function e(u,c){var l=this;u.__iterate((function(a,u){return(!t||c0}function Vt(e,t,n){var a=Xt(e);return a.size=new X(n).map((function(e){return e.size})).min(),a.__iterate=function(e,t){for(var r,n=this.__iterator(1,t),a=0;!(r=n.next()).done&&!1!==e(r.value,a++,this););return a},a.__iteratorUncached=function(e,a){var i=n.map((function(e){return e=r(e),z(a?e.reverse():e)})),o=0,s=!1;return new R((function(){var r;return s||(r=i.map((function(e){return e.next()})),s=r.some((function(e){return e.done}))),s?{value:void 0,done:!0}:B(e,o++,t.apply(null,r.map((function(e){return e.value}))))}))},a}function Ht(e,t){return Z(e)?t:e.constructor(t)}function Gt(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function qt(e){return Te(e.size),S(e)}function Wt(e){return u(e)?n:c(e)?a:i}function Xt(e){return Object.create((u(e)?G:c(e)?q:W).prototype)}function Yt(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):H.prototype.cacheResult.call(this)}function Kt(e,t){return e>t?1:e=0;r--)t={value:arguments[r],next:t};return this.__ownerID?(this.size=e,this._head=t,this.__hash=void 0,this.__altered=!0,this):Or(e,t)},gr.prototype.pushAll=function(e){if(0===(e=a(e)).size)return this;Te(e.size);var t=this.size,r=this._head;return e.reverse().forEach((function(e){t++,r={value:e,next:r}})),this.__ownerID?(this.size=t,this._head=r,this.__hash=void 0,this.__altered=!0,this):Or(t,r)},gr.prototype.pop=function(){return this.slice(1)},gr.prototype.unshift=function(){return this.push.apply(this,arguments)},gr.prototype.unshiftAll=function(e){return this.pushAll(e)},gr.prototype.shift=function(){return this.pop.apply(this,arguments)},gr.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):jr()},gr.prototype.slice=function(e,t){if(C(e,t,this.size))return this;var r=A(e,this.size);if(E(t,this.size)!==this.size)return he.prototype.slice.call(this,e,t);for(var n=this.size-r,a=this._head;r--;)a=a.next;return this.__ownerID?(this.size=n,this._head=a,this.__hash=void 0,this.__altered=!0,this):Or(n,a)},gr.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Or(this.size,this._head,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},gr.prototype.__iterate=function(e,t){if(t)return this.reverse().__iterate(e);for(var r=0,n=this._head;n&&!1!==e(n.value,r++,this);)n=n.next;return r},gr.prototype.__iterator=function(e,t){if(t)return this.reverse().__iterator(e);var r=0,n=this._head;return new R((function(){if(n){var t=n.value;return n=n.next,B(e,r++,t)}return{value:void 0,done:!0}}))},gr.isStack=br;var vr,yr="@@__IMMUTABLE_STACK__@@",xr=gr.prototype;function Or(e,t,r,n){var a=Object.create(xr);return a.size=e,a._head=t,a.__ownerID=r,a.__hash=n,a.__altered=!1,a}function jr(){return vr||(vr=Or(0))}function Sr(e,t){var r=function(r){e.prototype[r]=t[r]};return Object.keys(t).forEach(r),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach(r),e}xr[yr]=!0,xr.withMutations=Re.withMutations,xr.asMutable=Re.asMutable,xr.asImmutable=Re.asImmutable,xr.wasAltered=Re.wasAltered,r.Iterator=R,Sr(r,{toArray:function(){Te(this.size);var e=new Array(this.size||0);return this.valueSeq().__iterate((function(t,r){e[r]=t})),e},toIndexedSeq:function(){return new Et(this)},toJS:function(){return this.toSeq().map((function(e){return e&&"function"==typeof e.toJS?e.toJS():e})).__toJS()},toJSON:function(){return this.toSeq().map((function(e){return e&&"function"==typeof e.toJSON?e.toJSON():e})).__toJS()},toKeyedSeq:function(){return new At(this,!0)},toMap:function(){return Ie(this.toKeyedSeq())},toObject:function(){Te(this.size);var e={};return this.__iterate((function(t,r){e[r]=t})),e},toOrderedMap:function(){return jt(this.toKeyedSeq())},toOrderedSet:function(){return lr(u(this)?this.valueSeq():this)},toSet:function(){return rr(u(this)?this.valueSeq():this)},toSetSeq:function(){return new Pt(this)},toSeq:function(){return c(this)?this.toIndexedSeq():u(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return gr(u(this)?this.valueSeq():this)},toList:function(){return it(u(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(e,t){return 0===this.size?e+t:e+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+t},concat:function(){var t=e.call(arguments,0);return Ht(this,Lt(this,t))},includes:function(e){return this.some((function(t){return se(t,e)}))},entries:function(){return this.__iterator(2)},every:function(e,t){Te(this.size);var r=!0;return this.__iterate((function(n,a,i){if(!e.call(t,n,a,i))return r=!1,!1})),r},filter:function(e,t){return Ht(this,Dt(this,e,t,!0))},find:function(e,t,r){var n=this.findEntry(e,t);return n?n[1]:r},forEach:function(e,t){return Te(this.size),this.__iterate(t?e.bind(t):e)},join:function(e){Te(this.size),e=void 0!==e?""+e:",";var t="",r=!0;return this.__iterate((function(n){r?r=!1:t+=e,t+=null!=n?n.toString():""})),t},keys:function(){return this.__iterator(0)},map:function(e,t){return Ht(this,kt(this,e,t))},reduce:function(e,t,r){var n,a;return Te(this.size),arguments.length<2?a=!0:n=t,this.__iterate((function(t,i,o){a?(a=!1,n=t):n=e.call(r,n,t,i,o)})),n},reduceRight:function(e,t,r){var n=this.toKeyedSeq().reverse();return n.reduce.apply(n,arguments)},reverse:function(){return Ht(this,Mt(this,!0))},slice:function(e,t){return Ht(this,Rt(this,e,t,!0))},some:function(e,t){return!this.every(Er(e),t)},sort:function(e){return Ht(this,Ft(this,e))},values:function(){return this.__iterator(1)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some((function(){return!0}))},count:function(e,t){return S(e?this.toSeq().filter(e,t):this)},countBy:function(e,t){return function(e,t,r){var n=Ie().asMutable();return e.__iterate((function(a,i){n.update(t.call(r,a,i,e),0,(function(e){return e+1}))})),n.asImmutable()}(this,e,t)},equals:function(e){return ue(this,e)},entrySeq:function(){var e=this;if(e._cache)return new X(e._cache);var t=e.toSeq().map(Ar).toIndexedSeq();return t.fromEntrySeq=function(){return e.toSeq()},t},filterNot:function(e,t){return this.filter(Er(e),t)},findEntry:function(e,t,r){var n=r;return this.__iterate((function(r,a,i){if(e.call(t,r,a,i))return n=[a,r],!1})),n},findKey:function(e,t){var r=this.findEntry(e,t);return r&&r[0]},findLast:function(e,t,r){return this.toKeyedSeq().reverse().find(e,t,r)},findLastEntry:function(e,t,r){return this.toKeyedSeq().reverse().findEntry(e,t,r)},findLastKey:function(e,t){return this.toKeyedSeq().reverse().findKey(e,t)},first:function(){return this.find(w)},flatMap:function(e,t){return Ht(this,function(e,t,r){var n=Wt(e);return e.toSeq().map((function(a,i){return n(t.call(r,a,i,e))})).flatten(!0)}(this,e,t))},flatten:function(e){return Ht(this,Nt(this,e,!0))},fromEntrySeq:function(){return new Tt(this)},get:function(e,t){return this.find((function(t,r){return se(r,e)}),void 0,t)},getIn:function(e,t){for(var r,n=this,a=Qt(e);!(r=a.next()).done;){var i=r.value;if((n=n&&n.get?n.get(i,g):g)===g)return t}return n},groupBy:function(e,t){return function(e,t,r){var n=u(e),a=(d(e)?jt():Ie()).asMutable();e.__iterate((function(i,o){a.update(t.call(r,i,o,e),(function(e){return(e=e||[]).push(n?[o,i]:i),e}))}));var i=Wt(e);return a.map((function(t){return Ht(e,i(t))}))}(this,e,t)},has:function(e){return this.get(e,g)!==g},hasIn:function(e){return this.getIn(e,g)!==g},isSubset:function(e){return e="function"==typeof e.includes?e:r(e),this.every((function(t){return e.includes(t)}))},isSuperset:function(e){return(e="function"==typeof e.isSubset?e:r(e)).isSubset(this)},keyOf:function(e){return this.findKey((function(t){return se(t,e)}))},keySeq:function(){return this.toSeq().map(Cr).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},lastKeyOf:function(e){return this.toKeyedSeq().reverse().keyOf(e)},max:function(e){return zt(this,e)},maxBy:function(e,t){return zt(this,t,e)},min:function(e){return zt(this,e?Pr(e):kr)},minBy:function(e,t){return zt(this,t?Pr(t):kr,e)},rest:function(){return this.slice(1)},skip:function(e){return this.slice(Math.max(0,e))},skipLast:function(e){return Ht(this,this.toSeq().reverse().skip(e).reverse())},skipWhile:function(e,t){return Ht(this,Bt(this,e,t,!0))},skipUntil:function(e,t){return this.skipWhile(Er(e),t)},sortBy:function(e,t){return Ht(this,Ft(this,t,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return Ht(this,this.toSeq().reverse().take(e).reverse())},takeWhile:function(e,t){return Ht(this,function(e,t,r){var n=Xt(e);return n.__iterateUncached=function(n,a){var i=this;if(a)return this.cacheResult().__iterate(n,a);var o=0;return e.__iterate((function(e,a,s){return t.call(r,e,a,s)&&++o&&n(e,a,i)})),o},n.__iteratorUncached=function(n,a){var i=this;if(a)return this.cacheResult().__iterator(n,a);var o=e.__iterator(2,a),s=!0;return new R((function(){if(!s)return{value:void 0,done:!0};var e=o.next();if(e.done)return e;var a=e.value,u=a[0],c=a[1];return t.call(r,c,u,i)?2===n?e:B(n,u,c,e):(s=!1,{value:void 0,done:!0})}))},n}(this,e,t))},takeUntil:function(e,t){return this.takeWhile(Er(e),t)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=function(e){if(e.size===1/0)return 0;var t=d(e),r=u(e),n=t?1:0;return function(e,t){return t=ge(t,3432918353),t=ge(t<<15|t>>>-15,461845907),t=ge(t<<13|t>>>-13,5),t=ge((t=(t+3864292196|0)^e)^t>>>16,2246822507),t=be((t=ge(t^t>>>13,3266489909))^t>>>16)}(e.__iterate(r?t?function(e,t){n=31*n+Mr(ve(e),ve(t))|0}:function(e,t){n=n+Mr(ve(e),ve(t))|0}:t?function(e){n=31*n+ve(e)|0}:function(e){n=n+ve(e)|0}),n)}(this))}});var _r=r.prototype;_r[p]=!0,_r[D]=_r.values,_r.__toJS=_r.toArray,_r.__toStringMapper=Tr,_r.inspect=_r.toSource=function(){return this.toString()},_r.chain=_r.flatMap,_r.contains=_r.includes,Sr(n,{flip:function(){return Ht(this,It(this))},mapEntries:function(e,t){var r=this,n=0;return Ht(this,this.toSeq().map((function(a,i){return e.call(t,[i,a],n++,r)})).fromEntrySeq())},mapKeys:function(e,t){var r=this;return Ht(this,this.toSeq().flip().map((function(n,a){return e.call(t,n,a,r)})).flip())}});var wr=n.prototype;function Cr(e,t){return t}function Ar(e,t){return[t,e]}function Er(e){return function(){return!e.apply(this,arguments)}}function Pr(e){return function(){return-e.apply(this,arguments)}}function Tr(e){return"string"==typeof e?JSON.stringify(e):String(e)}function Ir(){return j(arguments)}function kr(e,t){return et?-1:0}function Mr(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}return wr[f]=!0,wr[D]=_r.entries,wr.__toJS=_r.toObject,wr.__toStringMapper=function(e,t){return JSON.stringify(t)+": "+Tr(e)},Sr(a,{toKeyedSeq:function(){return new At(this,!1)},filter:function(e,t){return Ht(this,Dt(this,e,t,!1))},findIndex:function(e,t){var r=this.findEntry(e,t);return r?r[0]:-1},indexOf:function(e){var t=this.keyOf(e);return void 0===t?-1:t},lastIndexOf:function(e){var t=this.lastKeyOf(e);return void 0===t?-1:t},reverse:function(){return Ht(this,Mt(this,!1))},slice:function(e,t){return Ht(this,Rt(this,e,t,!1))},splice:function(e,t){var r=arguments.length;if(t=Math.max(0|t,0),0===r||2===r&&!t)return this;e=A(e,e<0?this.count():this.size);var n=this.slice(0,e);return Ht(this,1===r?n:n.concat(j(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var r=this.findLastEntry(e,t);return r?r[0]:-1},first:function(){return this.get(0)},flatten:function(e){return Ht(this,Nt(this,e,!1))},get:function(e,t){return(e=_(this,e))<0||this.size===1/0||void 0!==this.size&&e>this.size?t:this.find((function(t,r){return r===e}),void 0,t)},has:function(e){return(e=_(this,e))>=0&&(void 0!==this.size?this.size===1/0||e1?t-1:0),n=1;n3?t.i-4:t.i:Array.isArray(e)?1:f(e)?2:h(e)?3:0}function c(e,t){return 2===u(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function l(e,t){return 2===u(e)?e.get(t):e[t]}function d(e,t,r){var n=u(e);2===n?e.set(t,r):3===n?(e.delete(t),e.add(r)):e[t]=r}function p(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function f(e){return U&&e instanceof Map}function h(e){return V&&e instanceof Set}function m(e){return e.o||e.t}function g(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=K(e);delete t[W];for(var r=Y(t),n=0;n1&&(e.set=e.add=e.clear=e.delete=v),Object.freeze(e),t&&s(e,(function(e,t){return b(t,!0)}),!0)),e}function v(){a(2)}function y(e){return null==e||"object"!=n(e)||Object.isFrozen(e)}function x(e){var t=Q[e];return t||a(18,e),t}function O(){return F}function j(e,t){t&&(x("Patches"),e.u=[],e.s=[],e.v=t)}function S(e){_(e),e.p.forEach(C),e.p=null}function _(e){e===F&&(F=e.l)}function w(e){return F={p:[],l:F,h:e,m:!0,_:0}}function C(e){var t=e[W];0===t.i||1===t.i?t.j():t.g=!0}function A(e,t){t._=t.p.length;var r=t.p[0],n=void 0!==e&&e!==r;return t.h.O||x("ES5").S(t,e,n),n?(r[W].P&&(S(t),a(4)),o(e)&&(e=E(t,e),t.l||T(t,e)),t.u&&x("Patches").M(r[W],e,t.u,t.s)):e=E(t,r,[]),S(t),t.u&&t.v(t.u,t.s),e!==G?e:void 0}function E(e,t,r){if(y(t))return t;var n=t[W];if(!n)return s(t,(function(a,i){return P(e,n,t,a,i,r)}),!0),t;if(n.A!==e)return t;if(!n.P)return T(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var a=4===n.i||5===n.i?n.o=g(n.k):n.o;s(3===n.i?new Set(a):a,(function(t,i){return P(e,n,a,t,i,r)})),T(e,a,!1),r&&e.u&&x("Patches").R(n,r,e.u,e.s)}return n.o}function P(e,t,r,n,a,s){if(i(a)){var u=E(e,a,s&&t&&3!==t.i&&!c(t.D,n)?s.concat(n):void 0);if(d(r,n,u),!i(u))return;e.m=!1}if(o(a)&&!y(a)){if(!e.h.F&&e._<1)return;E(e,a),t&&t.A.l||T(e,a)}}function T(e,t,r){void 0===r&&(r=!1),e.h.F&&e.m&&b(t,r)}function I(e,t){var r=e[W];return(r?m(r):e)[t]}function k(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Object.getPrototypeOf(r)}}function M(e){e.P||(e.P=!0,e.l&&M(e.l))}function D(e){e.o||(e.o=g(e.t))}function R(e,t,r){var n=f(t)?x("MapSet").N(t,r):h(t)?x("MapSet").T(t,r):e.O?function(e,t){var r=Array.isArray(e),n={i:r?1:0,A:t?t.A:O(),P:!1,I:!1,D:{},l:t,t:e,k:null,o:null,j:null,C:!1},a=n,i=Z;r&&(a=[n],i=J);var o=Proxy.revocable(a,i),s=o.revoke,u=o.proxy;return n.k=u,n.j=s,u}(t,r):x("ES5").J(t,r);return(r?r.A:O()).p.push(n),n}function B(e){return i(e)||a(22,e),function e(t){if(!o(t))return t;var r,n=t[W],a=u(t);if(n){if(!n.P&&(n.i<4||!x("ES5").K(n)))return n.t;n.I=!0,r=L(t,a),n.I=!1}else r=L(t,a);return s(r,(function(t,a){n&&l(n.t,t)===a||d(r,t,e(a))})),3===a?new Set(r):r}(e)}function L(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return g(e)}r.d(t,"b",(function(){return ee})),r.d(t,"c",(function(){return te}));var N,F,z="undefined"!=typeof Symbol&&"symbol"==n(Symbol("x")),U="undefined"!=typeof Map,V="undefined"!=typeof Set,H="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,G=z?Symbol.for("immer-nothing"):((N={})["immer-nothing"]=!0,N),q=z?Symbol.for("immer-draftable"):"__$immer_draftable",W=z?Symbol.for("immer-state"):"__$immer_state",X=("undefined"!=typeof Symbol&&Symbol.iterator,""+Object.prototype.constructor),Y="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,K=Object.getOwnPropertyDescriptors||function(e){var t={};return Y(e).forEach((function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)})),t},Q={},Z={get:function(e,t){if(t===W)return e;var r=m(e);if(!c(r,t))return function(e,t,r){var n,a=k(t,r);return a?"value"in a?a.value:null===(n=a.get)||void 0===n?void 0:n.call(e.k):void 0}(e,r,t);var n=r[t];return e.I||!o(n)?n:n===I(e.t,t)?(D(e),e.o[t]=R(e.A.h,n,e)):n},has:function(e,t){return t in m(e)},ownKeys:function(e){return Reflect.ownKeys(m(e))},set:function(e,t,r){var n=k(m(e),t);if(null==n?void 0:n.set)return n.set.call(e.k,r),!0;if(!e.P){var a=I(m(e),t),i=null==a?void 0:a[W];if(i&&i.t===r)return e.o[t]=r,e.D[t]=!1,!0;if(p(r,a)&&(void 0!==r||c(e.t,t)))return!0;D(e),M(e)}return e.o[t]===r&&"number"!=typeof r||(e.o[t]=r,e.D[t]=!0,!0)},deleteProperty:function(e,t){return void 0!==I(e.t,t)||t in e.t?(e.D[t]=!1,D(e),M(e)):delete e.D[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=m(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n?{writable:!0,configurable:1!==e.i||"length"!==t,enumerable:n.enumerable,value:r[t]}:n},defineProperty:function(){a(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){a(12)}},J={};s(Z,(function(e,t){J[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),J.deleteProperty=function(e,t){return Z.deleteProperty.call(this,e[0],t)},J.set=function(e,t,r){return Z.set.call(this,e[0],t,r,e[0])};var $=new(function(){function e(e){var t=this;this.O=H,this.F=!0,this.produce=function(e,r,i){if("function"==typeof e&&"function"!=typeof r){var s=r;r=e;var u=t;return function(e){var t=this;void 0===e&&(e=s);for(var n=arguments.length,a=Array(n>1?n-1:0),i=1;i1?n-1:0),i=1;i=0;r--){var n=t[r];if(0===n.path.length&&"replace"===n.op){e=n.value;break}}var a=x("Patches").$;return i(e)?a(e,t):this.produce(e,(function(e){return a(e,t.slice(r+1))}))},e}()),ee=$.produce,te=($.produceWithPatches.bind($),$.setAutoFreeze.bind($));$.setUseProxies.bind($),$.applyPatches.bind($),$.createDraft.bind($),$.finishDraft.bind($);t.a=ee},function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var n,a=r(715),i=r(705);!function(e){e.Descriptor={name:"index_pair_bonds"},e.Provider=i.a.create(e.Descriptor),e.fromData=function(e){var t=e.pairs,r=e.count;return function(e,t,r,n){for(var i=new a.a.EdgeBuilder(n,e,t),o=new Int8Array(i.slotCount),s=new Array(i.slotCount),u=new Array(i.slotCount),c=0,l=i.edgeCount;ct[1]?1:0})),Q=[[["A","DA"],"Adenosine"],[["C","DC"],"Cytidine"],[["T","DT"],"Thymidine"],[["G","DG"],"Guanosine"],[["I","DI"],"Inosine"],[["U","DU"],"Uridine"],[["N","DN"],"Unknown"]].sort((function(e,t){return e[1]t[1]?1:0}));function Z(e,t,r){var n=e[0],a=e[1];void 0===r&&(r=0);var i=1!==n.length||J.has(n[0])?a+" ("+n.join(", ")+")":"["+n[0]+"] "+a;return d(i,s.a.struct.modifier.union([s.a.struct.generator.atomGroups({"residue-test":s.a.core.set.has([s.a.set.apply(s.a,n),s.a.ammp("auth_comp_id")])})]),{category:t,priority:r,description:i})}var J=c.a.unionMany(o.b,o.l,o.e,o.n);function $(e){for(var t=new Set,r=0,n=e;r0)return 1<=0)return 1<=0&&t[1]>=0&&t[0]"),f(s.a.core.rel.gre,"gre",">="),f(s.a.core.rel.inRange,"in-range"),f(s.a.core.str.concat,"concat"),f(s.a.core.str.match,"regex.match"),f(s.a.core.list.getAt,"list.get"),f(s.a.core.set.has,"set.has"),f(s.a.core.set.isSubset,"set.subset")],["Structure",["Types",f(s.a.structureQuery.type.entityType,"ent-type"),f(s.a.structureQuery.type.authResidueId,"auth-resid"),f(s.a.structureQuery.type.labelResidueId,"label-resid"),f(s.a.structureQuery.type.ringFingerprint,"ringfp"),f(s.a.structureQuery.type.bondFlags,"bond-flags")],["Slots",f(s.a.structureQuery.slot.elementSetReduce,"atom.set.reduce.value")],["Generators",f(s.a.structureQuery.generator.atomGroups,"sel.atom.atom-groups"),f(s.a.structureQuery.generator.queryInSelection,"sel.atom.query-in-selection"),f(s.a.structureQuery.generator.rings,"sel.atom.rings"),f(s.a.structureQuery.generator.empty,"sel.atom.empty"),f(s.a.structureQuery.generator.all,"sel.atom.all"),f(s.a.structureQuery.generator.bondedAtomicPairs,"sel.atom.bonded-pairs"),h(Object(o.d)("sel.atom.atoms",o.b.Dictionary({0:Object(o.a)(u.a.Bool,{isOptional:!0,defaultValue:!0,description:"Test applied to each atom."})}),c.a.ElementSelection,"A selection of singleton atom sets."),(function(e){return l.a.struct.generator.atomGroups({"atom-test":p(e,0,!0)})})),h(Object(o.d)("sel.atom.res",o.b.Dictionary({0:Object(o.a)(u.a.Bool,{isOptional:!0,defaultValue:!0,description:"Test applied to the 1st atom of each residue."})}),c.a.ElementSelection,"A selection of atom sets grouped by residue."),(function(e){return l.a.struct.generator.atomGroups({"residue-test":p(e,0,!0),"group-by":l.a.ammp("residueKey")})})),h(Object(o.d)("sel.atom.chains",o.b.Dictionary({0:Object(o.a)(u.a.Bool,{isOptional:!0,defaultValue:!0,description:"Test applied to the 1st atom of each chain."})}),c.a.ElementSelection,"A selection of atom sets grouped by chain."),(function(e){return l.a.struct.generator.atomGroups({"chain-test":p(e,0,!0),"group-by":l.a.ammp("chainKey")})}))],["Modifiers",f(s.a.structureQuery.modifier.queryEach,"sel.atom.query-each"),f(s.a.structureQuery.modifier.intersectBy,"sel.atom.intersect-by"),f(s.a.structureQuery.modifier.exceptBy,"sel.atom.except-by"),f(s.a.structureQuery.modifier.unionBy,"sel.atom.union-by"),f(s.a.structureQuery.modifier.union,"sel.atom.union"),f(s.a.structureQuery.modifier.cluster,"sel.atom.cluster"),f(s.a.structureQuery.modifier.includeSurroundings,"sel.atom.include-surroundings"),f(s.a.structureQuery.modifier.surroundingLigands,"sel.atom.surrounding-ligands"),f(s.a.structureQuery.modifier.includeConnected,"sel.atom.include-connected"),f(s.a.structureQuery.modifier.expandProperty,"sel.atom.expand-property")],["Filters",f(s.a.structureQuery.filter.pick,"sel.atom.pick"),f(s.a.structureQuery.filter.first,"sel.atom.first"),f(s.a.structureQuery.filter.withSameAtomProperties,"sel.atom.with-same-atom-properties"),f(s.a.structureQuery.filter.intersectedBy,"sel.atom.intersected-by"),f(s.a.structureQuery.filter.within,"sel.atom.within"),f(s.a.structureQuery.filter.isConnectedTo,"sel.atom.is-connected-to")],["Combinators",f(s.a.structureQuery.combinator.intersect,"sel.atom.intersect"),f(s.a.structureQuery.combinator.merge,"sel.atom.merge"),f(s.a.structureQuery.combinator.distanceCluster,"sel.atom.dist-cluster")],["Atom Set Properties",f(s.a.structureQuery.atomSet.atomCount,"atom.set.atom-count"),f(s.a.structureQuery.atomSet.countQuery,"atom.set.count-query"),f(s.a.structureQuery.atomSet.reduce,"atom.set.reduce"),f(s.a.structureQuery.atomSet.propertySet,"atom.set.property")],["Atom Properties",f(s.a.structureQuery.atomProperty.core.elementSymbol,"atom.el"),f(s.a.structureQuery.atomProperty.core.vdw,"atom.vdw"),f(s.a.structureQuery.atomProperty.core.mass,"atom.mass"),f(s.a.structureQuery.atomProperty.core.atomicNumber,"atom.atomic-number"),f(s.a.structureQuery.atomProperty.core.x,"atom.x"),f(s.a.structureQuery.atomProperty.core.y,"atom.y"),f(s.a.structureQuery.atomProperty.core.z,"atom.z"),f(s.a.structureQuery.atomProperty.core.sourceIndex,"atom.src-index"),f(s.a.structureQuery.atomProperty.core.operatorName,"atom.op-name"),f(s.a.structureQuery.atomProperty.core.modelIndex,"atom.model-index"),f(s.a.structureQuery.atomProperty.core.modelLabel,"atom.model-label"),f(s.a.structureQuery.atomProperty.core.atomKey,"atom.key"),f(s.a.structureQuery.atomProperty.core.bondCount,"atom.bond-count"),f(s.a.structureQuery.atomProperty.topology.connectedComponentKey,"atom.key.molecule"),f(s.a.structureQuery.atomProperty.macromolecular.authResidueId,"atom.auth-resid"),f(s.a.structureQuery.atomProperty.macromolecular.labelResidueId,"atom.label-resid"),f(s.a.structureQuery.atomProperty.macromolecular.residueKey,"atom.key.res"),f(s.a.structureQuery.atomProperty.macromolecular.chainKey,"atom.key.chain"),f(s.a.structureQuery.atomProperty.macromolecular.entityKey,"atom.key.entity"),f(s.a.structureQuery.atomProperty.macromolecular.isHet,"atom.is-het"),f(s.a.structureQuery.atomProperty.macromolecular.id,"atom.id"),f(s.a.structureQuery.atomProperty.macromolecular.label_atom_id,"atom.label_atom_id"),f(s.a.structureQuery.atomProperty.macromolecular.label_alt_id,"atom.label_alt_id","atom.altloc"),f(s.a.structureQuery.atomProperty.macromolecular.label_comp_id,"atom.label_comp_id"),f(s.a.structureQuery.atomProperty.macromolecular.label_asym_id,"atom.label_asym_id"),f(s.a.structureQuery.atomProperty.macromolecular.label_entity_id,"atom.label_entity_id"),f(s.a.structureQuery.atomProperty.macromolecular.label_seq_id,"atom.label_seq_id"),f(s.a.structureQuery.atomProperty.macromolecular.auth_atom_id,"atom.auth_atom_id","atom.name"),f(s.a.structureQuery.atomProperty.macromolecular.auth_comp_id,"atom.auth_comp_id","atom.resname"),f(s.a.structureQuery.atomProperty.macromolecular.auth_asym_id,"atom.auth_asym_id","atom.chain"),f(s.a.structureQuery.atomProperty.macromolecular.auth_seq_id,"atom.auth_seq_id","atom.resno"),f(s.a.structureQuery.atomProperty.macromolecular.pdbx_PDB_ins_code,"atom.pdbx_PDB_ins_code","atom.inscode"),f(s.a.structureQuery.atomProperty.macromolecular.pdbx_formal_charge,"atom.pdbx_formal_charge"),f(s.a.structureQuery.atomProperty.macromolecular.occupancy,"atom.occupancy"),f(s.a.structureQuery.atomProperty.macromolecular.B_iso_or_equiv,"atom.B_iso_or_equiv","atom.bfactor"),f(s.a.structureQuery.atomProperty.macromolecular.entityType,"atom.entity-type"),f(s.a.structureQuery.atomProperty.macromolecular.entitySubtype,"atom.entity-subtype"),f(s.a.structureQuery.atomProperty.macromolecular.entityPrdId,"atom.entity-prd-id"),f(s.a.structureQuery.atomProperty.macromolecular.entityDescription,"atom.entity-description"),f(s.a.structureQuery.atomProperty.macromolecular.objectPrimitive,"atom.object-primitive"),f(s.a.structureQuery.atomProperty.macromolecular.chemCompType,"atom.chem-comp-type"),f(s.a.structureQuery.atomProperty.macromolecular.secondaryStructureKey,"atom.key.sec-struct"),f(s.a.structureQuery.atomProperty.macromolecular.isModified,"atom.is-modified"),f(s.a.structureQuery.atomProperty.macromolecular.modifiedParentName,"atom.modified-parent")],["Bond Properties",f(s.a.structureQuery.bondProperty.order,"bond.order"),f(s.a.structureQuery.bondProperty.length,"bond.length"),f(s.a.structureQuery.bondProperty.atomA,"bond.atom-a"),f(s.a.structureQuery.bondProperty.atomB,"bond.atom-b"),h(Object(o.d)("bond.is",o.b.List(c.a.BondFlag),u.a.Bool,"Test if the current bond has at least one (or all if partial = false) of the specified flags: "+u.a.oneOfValues(c.a.BondFlag).join(", ")),(function(e){return l.a.core.flags.hasAny([l.a.struct.bondProperty.flags(),l.a.struct.type.bondFlags(d(e))])}))]]],b=[];!function e(t){for(var r=0,n=t;r0?"'...":"'",i=e.length-n>12?"...'":"'";return" at line "+r.line+" column "+r.column+", got "+a+e.slice(n,n+12)+i}(n,a));throw new Error(i)},e.prototype.or=function(t){return e.alt(this,t)},e.prototype.trim=function(e){return this.wrap(e,e)},e.prototype.wrap=function(t,r){return S(1,"string"==typeof t?e.string(t):t,this,"string"==typeof r?e.string(r):r)},e.prototype.thru=function(e){return e(this)},e.prototype.then=function(e){return S(1,this,e)},e.prototype.many=function(){var t=this;return new e((function(e,r){for(var n=[],a=void 0;;){if(!(a=C(t._(e,r),a)).status)return C(_(r,n),a);if(r===a.index)throw new Error("infinite loop detected in .many() parser --- calling .many() on a parser which can accept zero characters is usually the cause");r=a.index,n.push(a.value)}}))},e.prototype.times=function(t,r){var n=this,a=void 0===r?t:r;return new e((function(e,r){var i,o=[],s=void 0,u=void 0;for(i=0;it.furthest)return e;var r=e.furthest===t.furthest?function(e,t){var r=e.length,n=t.length;if(0===r)return t;if(0===n)return e;for(var a=new Set,i=[],o=0;o=0}))},e.noneOf=function(e){return c((function(t){return e.indexOf(t)<0}))},e.range=function(e,t){return c((function(r){return e<=r&&r<=t})).desc(e+"-"+t)},e.takeWhile=function(t){return new e((function(e,r){for(var n=r;n=e.length?w(t,"any character"):_(t+1,e.charAt(t))})),e.all=new e((function(e,t){return _(e.length,e.slice(t))})),e.eof=new e((function(e,t){return t1)switch(t.charAt(0)){case".":return l.a.atomName(t.substr(1));case"_":return l.a.struct.type.elementSymbol([t.substr(1)])}return"true"===t||"false"!==t&&(function(e){return/-?(0|[1-9][0-9]*)([.][0-9]+)?([eE][+-]?[0-9]+)?/.test(e)&&!isNaN(+e)}(t)?+t:i.a.Symbol(t));case"list":switch(e.bracket){case"[":return l.a.core.type.list(g(e.nodes).map(m));case"{":return l.a.core.type.set(g(e.nodes).map(m));case"(":var r=m(e.nodes[0]);return i.a.Apply(r,function(e){if(e.length<=1)return;if(!function(e){for(var t=1,r=e.length;t1&&":"===n.value.charAt(0))return!0}return!1}(e)){for(var t=[],r=1,n=e.length;r1&&":"===s.value.charAt(0)){var u=s.value.substr(1);for(++r;r=n)throw new Error("There must be a value foolowed a named arg ':"+u+"'.");a[u]=m(e[r]),isNaN(+u)&&(i=!1)}else a[o++]=m(s)}if(i){var c=Object.keys(a).map((function(e){return+e})).sort((function(e,t){return e-t})),l=!0;for(r=0,n=c.length;r0&&i.a.set(e.firstElementLoc,t,o,s[u.d.start(a)]),l===s.length)e.unitCount+=1,1===e.unitCount&&i.a.set(e.firstUnitLoc,t,o,s[u.d.start(a)]);else if(1===l){if(c.a.Traits.is(o.traits,1))return;e.elementCount+=1,1===e.elementCount&&i.a.set(e.firstElementLoc,t,o,s[u.d.start(a)])}else if(c.a.isAtomic(o))for(var f=o.model.atomicHierarchy.residueAtomSegments,h=f.index,m=f.offsets,g=o.model.atomicHierarchy.atoms.label_alt_id,b=0,v=function(){d.clear();var n=0,c=s[u.d.getAt(a,b)],f=h[c];for(r(d,g.value(c),1),++b,++n;br)return!1;return!0}function c(e,t,r,n){e[4*r+t]=n}function l(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function d(e,t){var r=t[0],n=t[1],a=t[2],i=t[3],o=t[4],s=t[5],u=t[6],c=t[7],l=t[8],d=t[9],p=t[10],f=t[11],h=t[12],m=t[13],g=t[14],b=t[15],v=r*s-n*o,y=r*u-a*o,x=r*c-i*o,O=n*u-a*s,j=n*c-i*s,S=a*c-i*u,_=l*m-d*h,w=l*g-p*h,C=l*b-f*h,A=d*g-p*m,E=d*b-f*m,P=p*b-f*g,T=v*P-y*E+x*A+O*C-j*w+S*_;return!!T&&(T=1/T,e[0]=(s*P-u*E+c*A)*T,e[1]=(a*E-n*P-i*A)*T,e[2]=(m*S-g*j+b*O)*T,e[3]=(p*j-d*S-f*O)*T,e[4]=(u*C-o*P-c*w)*T,e[5]=(r*P-a*C+i*w)*T,e[6]=(g*x-h*S-b*y)*T,e[7]=(l*S-p*x+f*y)*T,e[8]=(o*E-s*C+c*_)*T,e[9]=(n*C-r*E-i*_)*T,e[10]=(h*j-m*x+b*v)*T,e[11]=(d*x-l*j-f*v)*T,e[12]=(s*w-o*A-u*_)*T,e[13]=(r*A-n*w+a*_)*T,e[14]=(m*y-h*O-g*v)*T,e[15]=(l*O-d*y+p*v)*T,!0)}function p(e,t,r){var n=t[0],a=t[1],i=t[2],o=t[3],s=t[4],u=t[5],c=t[6],l=t[7],d=t[8],p=t[9],f=t[10],h=t[11],m=t[12],g=t[13],b=t[14],v=t[15],y=r[0],x=r[1],O=r[2],j=r[3];return e[0]=y*n+x*s+O*d+j*m,e[1]=y*a+x*u+O*p+j*g,e[2]=y*i+x*c+O*f+j*b,e[3]=y*o+x*l+O*h+j*v,y=r[4],x=r[5],O=r[6],j=r[7],e[4]=y*n+x*s+O*d+j*m,e[5]=y*a+x*u+O*p+j*g,e[6]=y*i+x*c+O*f+j*b,e[7]=y*o+x*l+O*h+j*v,y=r[8],x=r[9],O=r[10],j=r[11],e[8]=y*n+x*s+O*d+j*m,e[9]=y*a+x*u+O*p+j*g,e[10]=y*i+x*c+O*f+j*b,e[11]=y*o+x*l+O*h+j*v,y=r[12],x=r[13],O=r[14],j=r[15],e[12]=y*n+x*s+O*d+j*m,e[13]=y*a+x*u+O*p+j*g,e[14]=y*i+x*c+O*f+j*b,e[15]=y*o+x*l+O*h+j*v,e}function f(e,t,r){var a,o,s,u=r[0],c=r[1],l=r[2],d=Math.sqrt(u*u+c*c+l*l);return Math.abs(d)0?(n=2*Math.sqrt(r+1),e[3]=.25*n,e[0]=(t[6]-t[9])/n,e[1]=(t[8]-t[2])/n,e[2]=(t[1]-t[4])/n):t[0]>t[5]&&t[0]>t[10]?(n=2*Math.sqrt(1+t[0]-t[5]-t[10]),e[3]=(t[6]-t[9])/n,e[0]=.25*n,e[1]=(t[1]+t[4])/n,e[2]=(t[8]+t[2])/n):t[5]>t[10]?(n=2*Math.sqrt(1+t[5]-t[0]-t[10]),e[3]=(t[8]-t[2])/n,e[0]=(t[1]+t[4])/n,e[1]=.25*n,e[2]=(t[6]+t[9])/n):(n=2*Math.sqrt(1+t[10]-t[0]-t[5]),e[3]=(t[1]-t[4])/n,e[0]=(t[8]+t[2])/n,e[1]=(t[6]+t[9])/n,e[2]=.25*n),e},e.extractRotation=function(e,t){var r=1/Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]),n=1/Math.sqrt(t[4]*t[4]+t[5]*t[5]+t[6]*t[6]),a=1/Math.sqrt(t[8]*t[8]+t[9]*t[9]+t[10]*t[10]);return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=0,e[4]=t[4]*n,e[5]=t[5]*n,e[6]=t[6]*n,e[7]=0,e[8]=t[8]*a,e[9]=t[9]*a,e[10]=t[10]*a,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},e.transpose=function(e,t){if(e===t){var r=t[1],n=t[2],a=t[3],i=t[6],o=t[7],s=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=r,e[6]=t[9],e[7]=t[13],e[8]=n,e[9]=i,e[11]=t[14],e[12]=a,e[13]=o,e[14]=s}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e},e.tryInvert=d,e.invert=function(e,t){return d(e,t)||console.warn("non-invertible matrix.",t),e},e.mul=p,e.mulOffset=function(e,t,r,n,a,i){var o=t[0+a],s=t[1+a],u=t[2+a],c=t[3+a],l=t[4+a],d=t[5+a],p=t[6+a],f=t[7+a],h=t[8+a],m=t[9+a],g=t[10+a],b=t[11+a],v=t[12+a],y=t[13+a],x=t[14+a],O=t[15+a],j=r[0+i],S=r[1+i],_=r[2+i],w=r[3+i];return e[0+n]=j*o+S*l+_*h+w*v,e[1+n]=j*s+S*d+_*m+w*y,e[2+n]=j*u+S*p+_*g+w*x,e[3+n]=j*c+S*f+_*b+w*O,j=r[4+i],S=r[5+i],_=r[6+i],w=r[7+i],e[4+n]=j*o+S*l+_*h+w*v,e[5+n]=j*s+S*d+_*m+w*y,e[6+n]=j*u+S*p+_*g+w*x,e[7+n]=j*c+S*f+_*b+w*O,j=r[8+i],S=r[9+i],_=r[10+i],w=r[11+i],e[8+n]=j*o+S*l+_*h+w*v,e[9+n]=j*s+S*d+_*m+w*y,e[10+n]=j*u+S*p+_*g+w*x,e[11+n]=j*c+S*f+_*b+w*O,j=r[12+i],S=r[13+i],_=r[14+i],w=r[15+i],e[12+n]=j*o+S*l+_*h+w*v,e[13+n]=j*s+S*d+_*m+w*y,e[14+n]=j*u+S*p+_*g+w*x,e[15+n]=j*c+S*f+_*b+w*O,e},e.mul3=function(e,t,r,n){return p(e,p(e,t,r),n)},e.translate=function(e,t,r){var n,a,i,o,s,u,c,l,d,p,f,h,m=r[0],g=r[1],b=r[2];return t===e?(e[12]=t[0]*m+t[4]*g+t[8]*b+t[12],e[13]=t[1]*m+t[5]*g+t[9]*b+t[13],e[14]=t[2]*m+t[6]*g+t[10]*b+t[14],e[15]=t[3]*m+t[7]*g+t[11]*b+t[15]):(n=t[0],a=t[1],i=t[2],o=t[3],s=t[4],u=t[5],c=t[6],l=t[7],d=t[8],p=t[9],f=t[10],h=t[11],e[0]=n,e[1]=a,e[2]=i,e[3]=o,e[4]=s,e[5]=u,e[6]=c,e[7]=l,e[8]=d,e[9]=p,e[10]=f,e[11]=h,e[12]=n*m+s*g+d*b+t[12],e[13]=a*m+u*g+p*b+t[13],e[14]=i*m+c*g+f*b+t[14],e[15]=o*m+l*g+h*b+t[15]),e},e.fromTranslation=function(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=t[0],e[13]=t[1],e[14]=t[2],e[15]=1,e},e.setTranslation=function(e,t){return e[12]=t[0],e[13]=t[1],e[14]=t[2],e},e.setAxes=function(e,t,r,n){return e[0]=r[0],e[4]=r[1],e[8]=r[2],e[1]=n[0],e[5]=n[1],e[9]=n[2],e[2]=t[0],e[6]=t[1],e[10]=t[2],e},e.rotate=function(e,t,a,i){var o,s,u,c,l,d,p,f,h,m,g,b,v,y,x,O,j,S,_,w,C,A,E,P,T=i[0],I=i[1],k=i[2],M=Math.sqrt(T*T+I*I+k*k);return Math.abs(M)0&&(l*=f=1/Math.sqrt(f),d*=f,p*=f);var h=u*p-c*d,m=c*l-s*p,g=s*d-u*l;return(f=h*h+m*m+g*g)>0&&(h*=f=1/Math.sqrt(f),m*=f,g*=f),e[0]=h,e[1]=m,e[2]=g,e[3]=0,e[4]=d*g-p*m,e[5]=p*h-l*g,e[6]=l*m-d*h,e[7]=0,e[8]=l,e[9]=d,e[10]=p,e[11]=0,e[12]=a,e[13]=i,e[14]=o,e[15]=1,e},e.fromPermutation=function(e,t){o(e);for(var r=0;r<4;r++){c(e,r,t[r],1)}return e},e.getMaxScaleOnAxis=function(e){var t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],r=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],n=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,r,n))};var h=[1,0,0],m=[0,1,0],g=[0,0,1];e.rotX90=f(t(),Object(a.c)(90),h),e.rotX180=f(t(),Object(a.c)(180),h),e.rotY90=f(t(),Object(a.c)(90),m),e.rotY180=f(t(),Object(a.c)(180),m),e.rotY270=f(t(),Object(a.c)(270),m),e.rotZ90=f(t(),Object(a.c)(90),g),e.rotZ180=f(t(),Object(a.c)(180),g),e.rotXY90=p(t(),e.rotX90,e.rotY90),e.rotZY90=p(t(),e.rotZ90,e.rotY90),e.rotZYZ90=p(t(),e.rotZY90,e.rotZ90),e.rotZ90X180=p(t(),e.rotZ90,e.rotX180),e.rotY90Z180=p(t(),e.rotY90,e.rotZ180),e.id=r()}(i||(i={}))},function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var n,a=r(1100),i=r(1105);!function(e){e.create=function(){var e=new o,t=function(){return e.create()};return t.dispose=function(){return e.dispose()},t.behavior=function(t){return e.behavior(t)},t}}(n||(n={}));var o=function(){function e(){this._eventList=[],this._disposed=!1}return e.prototype.create=function(){var e=new a.a;return this._eventList.push(e),e},e.prototype.behavior=function(e){var t=new i.a(e);return this._eventList.push(t),t},e.prototype.dispose=function(){if(!this._disposed){for(var e=0,t=this._eventList;e=16*t?r.aTransform.ref.value:new Float32Array(16*t);c.set(e),n.e.update(r.aTransform,c);var l=r.extraTransform.ref.value.length>=16*t?r.extraTransform.ref.value:new Float32Array(16*t);n.e.update(r.extraTransform,d(l,t));var f=r.aInstance.ref.value.length>=t?r.aInstance.ref.value:new Float32Array(t);return n.e.update(r.aInstance,Object(i.o)(f,t)),n.e.update(r.hasReflection,u),p(r),r}return{aTransform:n.e.create(new Float32Array(e)),matrix:n.e.create(a.c.identity()),transform:n.e.create(e),extraTransform:n.e.create(d(new Float32Array(16*t),t)),uInstanceCount:n.e.create(t),instanceCount:n.e.create(t),aInstance:n.e.create(Object(i.o)(new Float32Array(t))),hasReflection:n.e.create(u)}}var c=new Float32Array(16);function l(e){return u(new Float32Array(c),1,e)}function d(e,t){for(var r=0;r=r&&t0&&n>0&&p(e)>=d(t)&&d(e)<=p(t)}function S(e,t){return f(e)?!f(t)||c(e)<=c(t)&&l(e)>=l(t):0===f(t)}function _(e,t){var r=c(e);if(t<=r)return 0;var n=l(e);return t>=n?n-r:t-r}function w(e,t,r){var n=c(r),a=c(e);if(t<=n+a)return n;var i=l(r);return t>=i+a?i:t-a}function C(e,t,r){return o(_(e,t),_(e,r+1))}function A(e,t){return j(e,t)?o(Math.max(c(e),c(t)),Math.min(l(e),l(t))):a}function E(e,t){return f(C(e,d(t),p(t)))}(x=y||(y={})).Empty=a,x.ofSingleton=function(e){return i(e,e)},x.ofRange=i,x.ofBounds=o,x.ofLength=s,x.is=u,x.has=g,x.indexOf=b,x.getAt=v,x.start=c,x.end=l,x.min=d,x.max=p,x.size=f,x.hashCode=h,x.toString=m,x.areEqual=O,x.areIntersecting=j,x.isSubInterval=S,x.findPredecessorIndex=_,x.findPredecessorIndexInInterval=w,x.findRange=C,x.intersectionSize=E,x.intersect=A},function(e,t,r){"use strict";r.d(t,"a",(function(){return O}));var n=r(572),a=r(583),i=r(607),o=r(628),s=r(578),u=r(574),c=r(577),l=r(573),d=r(786),p=r(601),f=r(657),h=r(667),m=r(687),g=r(688),b=r(655),v=r(581);function y(e){return e.map((function(e){return{x:e[0],alpha:e[1]}}))}function x(e,t,r){for(var a,i,o,s,u,l,d=Object(n.e)(Object(n.e)([{x:0,alpha:0},{x:0,alpha:0}],e),[{x:1,alpha:0},{x:1,alpha:0}]),p=v.c.create({domain:[0,1],listOrName:t}),f=r?r.ref.value.array:new Uint8Array(1024),h=0,m=e.length+1,g=0;g0?"3d":"2d"),uGridTexDim:_,tGridTex:d,uGridStats:A,uCellDim:t.cellDim,uCartnToUnit:t.cartnToUnit,uUnitToCartn:t.unitToCartn,dPackedGroup:t.packedGroup,dSingleLayer:c.e.create(Q),dDoubleSided:c.e.create(l.doubleSided),dFlatShaded:c.e.create(l.flatShaded),dFlipSided:c.e.create(l.flipSided),dIgnoreLight:c.e.create(l.ignoreLight),dXrayShaded:c.e.create(l.xrayShaded)})}e.create=function(e,r,n,a,i,o,l,d,p){return p?function(e,t,r,n,a,i,o,s,l){var d=i.getWidth(),p=i.getHeight(),f=i.getDepth();return c.e.update(l.gridDimension,t),c.e.update(l.gridTexture,i),c.e.update(l.gridTextureDim,u.g.set(l.gridTextureDim.ref.value,d,p,f)),c.e.update(l.gridStats,u.h.set(l.gridStats.ref.value,o.min,o.max,o.mean,o.sigma)),c.e.update(l.bboxMin,e.min),c.e.update(l.bboxMax,e.max),c.e.update(l.bboxSize,u.g.sub(l.bboxSize.ref.value,e.max,e.min)),c.e.update(l.transform,r),c.e.update(l.cellDim,a),c.e.update(l.unitToCartn,n),c.e.update(l.cartnToUnit,u.c.invert(Object(u.c)(),n)),c.e.updateIfChanged(l.packedGroup,s),l}(e,r,n,a,i,o,l,d,p):function(e,r,n,a,i,o,l,d){var p=Object(s.g)(),f=-1,h=o.getWidth(),m=o.getHeight(),g=o.getDepth(),b={kind:"direct-volume",gridDimension:c.e.create(r),gridTexture:c.e.create(o),gridTextureDim:c.e.create(u.g.create(h,m,g)),gridStats:c.e.create(u.h.create(l.min,l.max,l.mean,l.sigma)),bboxMin:c.e.create(e.min),bboxMax:c.e.create(e.max),bboxSize:c.e.create(u.g.sub(Object(u.g)(),e.max,e.min)),transform:c.e.create(n),cellDim:c.e.create(i),unitToCartn:c.e.create(a),cartnToUnit:c.e.create(u.c.invert(Object(u.c)(),a)),get boundingSphere(){var e=t(b);if(e!==f){var r=function(e,t){return s.g.fromDimensionsAndTransform(Object(s.g)(),e,t)}(b.gridDimension.ref.value,b.transform.ref.value);s.g.copy(p,r),f=e}return p},packedGroup:c.e.create(d),setBoundingSphere:function(e){s.g.copy(p,e),f=t(b)}};return b}(e,r,n,a,i,o,l,d)},e.createEmpty=r,e.createRenderModeParam=d,e.Params=Object(n.a)(Object(n.a)({},p.a.Params),{doubleSided:l.a.Boolean(!1,p.a.CustomQualityParamInfo),flipSided:l.a.Boolean(!1,p.a.ShadingCategory),flatShaded:l.a.Boolean(!1,p.a.ShadingCategory),ignoreLight:l.a.Boolean(!1,p.a.ShadingCategory),xrayShaded:l.a.Boolean(!1,p.a.ShadingCategory),renderMode:d(),stepsPerCell:l.a.Numeric(5,{min:1,max:20,step:1}),jumpLength:l.a.Numeric(0,{min:0,max:20,step:.1})}),e.Utils={Params:e.Params,createEmpty:r,createValues:A,createValuesSimple:function(t,r,a,i,o){var s=p.a.createSimple(a,i,o),u=Object(n.a)(Object(n.a)({},l.a.getDefaultValues(e.Params)),r);return A(t,s.transform,s.locationIterator,s.theme,u)},updateValues:function(e,t){if(c.e.updateIfChanged(e.alpha,t.alpha),c.e.updateIfChanged(e.uAlpha,t.alpha),c.e.updateIfChanged(e.dDoubleSided,t.doubleSided),c.e.updateIfChanged(e.dFlatShaded,t.flatShaded),c.e.updateIfChanged(e.dFlipSided,t.flipSided),c.e.updateIfChanged(e.dIgnoreLight,t.ignoreLight),c.e.updateIfChanged(e.dXrayShaded,t.xrayShaded),c.e.updateIfChanged(e.dRenderMode,t.renderMode.name),"isosurface"===t.renderMode.name)c.e.updateIfChanged(e.uIsoValue,b(e.uIsoValue.ref.value,t.renderMode.params.isoValue,e.uGridStats.ref.value)),c.e.updateIfChanged(e.dSingleLayer,t.renderMode.params.singleLayer);else if("volume"===t.renderMode.name){x(y(t.renderMode.params.controlPoints),t.renderMode.params.list.colors,e.tTransferTex)}c.e.updateIfChanged(e.uMaxSteps,v(e.uGridDim.ref.value,t.stepsPerCell)),c.e.updateIfChanged(e.uStepScale,O(e.uCellDim.ref.value,t.stepsPerCell)),c.e.updateIfChanged(e.uTransferScale,C(t.stepsPerCell)),c.e.updateIfChanged(e.uJumpLength,t.jumpLength)},updateBoundingSphere:function(e,t){var r=s.g.clone(t.boundingSphere),n=Object(o.b)(r,e.aTransform.ref.value,e.instanceCount.ref.value);s.g.equals(n,e.boundingSphere.ref.value)||c.e.update(e.boundingSphere,n);s.g.equals(r,e.invariantBoundingSphere.ref.value)||(c.e.update(e.invariantBoundingSphere,r),c.e.update(e.uInvariantBoundingSphere,u.h.fromSphere(e.uInvariantBoundingSphere.ref.value,r)))},createRenderableState:function(e){var t=p.a.createRenderableState(e);return t.opaque=!1,t.writeDepth="isosurface"===e.renderMode.name,t},updateRenderableState:function(e,t){p.a.updateRenderableState(e,t),e.opaque=!1,e.writeDepth="isosurface"===t.renderMode.name},createPositionIterator:function(e,t){var r=e.transform.ref.value,n=e.gridDimension.ref.value,a=n[0],o=n[1],s=n[2],c=a*o*s,l=t.instanceCount.ref.value,d=Object(i.b)(),p=d.position,f=t.aTransform.ref.value;return Object(i.a)(c,l,1,(function(e,t){var n=Math.floor(e/s);return p[0]=Math.floor(n/o),p[1]=n%o,p[2]=e%s,u.g.transformMat4(p,p,r),t>=0&&u.g.transformMat4Offset(p,p,f,0,0,16*t),d}))}}}(O||(O={}))},,function(e,t,r){"use strict";(function(e){r.d(t,"a",(function(){return n}));var n,a=r(677);!function(t){var r="undefined"!=typeof btoa?btoa:function(t){return e.from(t).toString("base64")},n=[];t.create22=function(){for(var e=+new Date+Object(a.b)(),t=0;t<16;t++)n[t]=String.fromCharCode((e+255*Math.random())%255|0),e=Math.floor(e/255);return r(n.join("")).replace(/\+/g,"-").replace(/\//g,"_").substr(0,22)},t.createv4=function(){var e=+new Date+Object(a.b)();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var r=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"===t?r:3&r|8).toString(16)}))},t.is=function(e){return"string"==typeof e}}(n||(n={}))}).call(this,r(1057).Buffer)},function(e,t,r){"use strict";r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return o}));var n,a=r(642);!function(e){e.create=function(e){return{ref:e}},e.set=function(e,t){return e.ref=t,e}}(n||(n={}));var i,o,s=Object(a.a)(0,2147483647);!function(e){e.create=function(e,t){return{id:s(),version:0,value:e,metadata:t}},e.withValue=function(e,t){return{id:e.id,version:e.version+1,value:t,metadata:e.metadata}}}(i||(i={})),function(e){function t(e,t){return n.set(e,i.withValue(e.ref,t))}e.create=function(e,t){return n.create(i.create(e,t))},e.update=t,e.set=function(e,t){return n.set(e,t)},e.updateIfChanged=function(e,r){return e.ref.value!==r?t(e,r):e}}(o||(o={}))},function(e,t,r){"use strict";r.d(t,"b",(function(){return i})),r.d(t,"a",(function(){return o})),r.d(t,"c",(function(){return s}));var n=r(580),a=r(718);function i(e){return function(t){return o(e,t)}}function o(e,t){var r=e.data,i=e.indices,o=e.count,u=t.valueType,c="str"===u?function(e){return r.substring(i[2*e],i[2*e+1])}:"int"===u?function(e){return Object(a.d)(r,i[2*e],i[2*e+1])||0}:function(e){return Object(a.b)(r,i[2*e],i[2*e+1])||0};return{schema:t,__array:void 0,isDefined:!0,rowCount:o,value:c,valueKind:function(e){return 0},toArray:function(e){return n.b.createAndFillArray(o,c,e)},areValuesEqual:s(e)}}function s(e){var t=e.data,r=e.indices;return function(e,n){var a=r[2*e],i=r[2*n],o=r[2*e+1]-a;if(o!==r[2*n+1]-i)return!1;for(var s=0;s=0){var u=n(e[o],t,r);u<0?a=-1:u>a&&(a=u)}var c=Math.abs(e[o]);if(c>r){var l=Math.floor(Math.log10(Math.abs(c)))+1;l>i&&(i=l)}}return{mantissaDigits:a,integerDigits:i}}function o(e){e=e.trim();var t=parseInt(e,10);return!isNaN(t)&&t.toString()===e}function s(e){if(!isFinite(e))return 0;for(var t=1,r=0;Math.round(e*t)/t!==e;)t*=10,++r;return r}function u(e,t){return parseFloat(e.toPrecision(t))}r.d(t,"c",(function(){return a})),r.d(t,"a",(function(){return i})),r.d(t,"d",(function(){return o})),r.d(t,"b",(function(){return s})),r.d(t,"e",(function(){return u}))},function(e,t,r){"use strict";r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return n})),r.d(t,"d",(function(){return o})),r.d(t,"c",(function(){return s})),r.d(t,"e",(function(){return u}));var n,a=r(830);function i(e,t){var r=t||{},n=r.description,a=void 0===n?void 0:n,i=r.isOptional,o=void 0!==i&&i,s=r.isRest,u=void 0!==s&&s,c=r.defaultValue;return{type:e,isOptional:o,isRest:u,defaultValue:void 0===c?void 0:c,description:a}}function o(e,t,r,n){var i=function e(t){return a.a.Apply(a.a.Symbol(e.id),t)};return i.info={namespace:"",name:e,description:n},i.id="",i.args=t,i.type=r,i}function s(e,t,r,i){var o=function e(t){return a.a.Apply(a.a.Symbol(e.id),t)};return o.info={namespace:e,name:t,description:i},o.id=e+"."+t,o.args=n.None,o.type=r,o}function u(e){var t=e;return"function"==typeof t&&!!t.info&&!!t.args&&"string"==typeof t.info.namespace&&!!t.type}!function(e){function t(e){return{kind:"dictionary",map:e,"@type":0}}e.None=t({}),e.Dictionary=t,e.List=function(e,t){var r=(t||{}).nonEmpty;return{kind:"list",type:e,nonEmpty:void 0!==r&&r,"@type":0}}}(n||(n={}))},function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(684),a=r(779),i=function(){function e(){this.count=0,this.center=Object(n.a)(),this.radiusSq=0}return e.prototype.reset=function(){n.a.set(this.center,0,0,0),this.radiusSq=0,this.count=0},e.prototype.includeStep=function(e){n.a.add(this.center,this.center,e),this.count++},e.prototype.finishedIncludeStep=function(){0!==this.count&&n.a.scale(this.center,this.center,1/this.count)},e.prototype.radiusStep=function(e){var t=n.a.squaredDistance(e,this.center);t>this.radiusSq&&(this.radiusSq=t)},e.prototype.radiusSphereStep=function(e,t){var r=n.a.distance(e,this.center)+t,a=r*r;a>this.radiusSq&&(this.radiusSq=a)},e.prototype.getSphere=function(e){return e||(e=Object(a.a)()),n.a.copy(e.center,this.center),e.radius=Math.sqrt(this.radiusSq),e},e.prototype.getCount=function(){return this.count},e}();!function(e){var t=new e,r=Object(n.a)(),a=Object(n.a)();e.fromArrays=function(e,a){var i=e.x,o=e.y,s=e.z;t.reset();for(var u=i.length,c=0;c0&&(o[o.length]=l.getChild(p))}else o[o.length]=l}return n.b.create(o,{parent:e.parent||t.parent})}},function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var n,a=r(572),i=r(573),o=r(577),s=r(617),u=r(635);!function(e){function t(e){var t=this,r=e.descriptor.name,n="root"===e.type?"inheritedPropertyData":"currentPropertyData",s=function(t){return r in t[n]||(t[n][r]={props:Object(a.a)({},i.a.getDefaultValues(e.getParams(t))),data:o.d.create(void 0)}),t[n][r]},u=function(e,t,a){var i=s(e);e[n][r]={props:t,data:o.d.withValue(i.data,a)}};return{label:e.label,descriptor:e.descriptor,isHidden:e.isHidden,getParams:function(t){var r=i.a.clone(e.getParams(t));return i.a.setDefaultValues(r,s(t).props),r},defaultParams:e.defaultParams,isApplicable:e.isApplicable,attach:function(r,n,o,c){return void 0===o&&(o={}),Object(a.b)(t,void 0,void 0,(function(){var t,l,d,p,f,h;return Object(a.d)(this,(function(a){switch(a.label){case 0:return c&&n.customPropertyDescriptors.reference(e.descriptor,!0),"root"===e.type&&(n=n.root),t=s(n.root).props,l=s(n),d=i.a.merge(e.defaultParams,t,o),l.data.value&&i.a.areEqual(e.defaultParams,l.props,d)?[2]:[4,e.obtain(r,n,d)];case 1:return p=a.sent(),f=p.value,h=p.assets,n.customPropertyDescriptors.add(e.descriptor),n.customPropertyDescriptors.assets(e.descriptor,h),u(n,d,f),[2]}}))}))},ref:function(t,r){return t.customPropertyDescriptors.reference(e.descriptor,r)},get:function(e){return s(e).data},set:function(t,r,n){void 0===r&&(r={}),"root"===e.type&&(t=t.root);var a=s(t),o=i.a.merge(e.defaultParams,a.props,r);i.a.areEqual(e.defaultParams,a.props,o)||(u(t,o,n),t.customPropertyDescriptors.assets(e.descriptor))},props:function(e){return s(e).props}}}e.createProvider=t,e.createSimple=function(e,r,n){var o=this,c={value:i.a.Value(n,{isHidden:!0})};return t({label:Object(u.d)(e),descriptor:Object(s.b)({name:e}),isHidden:!0,type:r,defaultParams:c,getParams:function(){return{value:i.a.Value(n,{isHidden:!0})}},isApplicable:function(){return!0},obtain:function(e,t,r){return Object(a.b)(o,void 0,void 0,(function(){return Object(a.d)(this,(function(e){return[2,Object(a.a)(Object(a.a)({},i.a.getDefaultValues(c)),r)]}))}))}})}}(n||(n={}))},function(e,t,r){"use strict";r.d(t,"b",(function(){return o})),r.d(t,"a",(function(){return s})),r.d(t,"c",(function(){return d}));var n=r(655),a=r(958),i=r(574);Object(a.b)(10001);function o(e,t,r){return e=Object(n.a)(e,0,16777215)+1,t[r+2]=e%256,e=Math.floor(e/256),t[r+1]=e%256,e=Math.floor(e/256),t[r]=e%256,t}function s(e,t,r){return 256*Math.floor(e)*256+256*Math.floor(t)+Math.floor(r)-1}var u=i.g.create(16777216,65536,256),c=i.h.create(255/256/u[0],255/256/u[1],255/256/u[2],255/256/1),l=Object(i.h)();function d(e,t,r,n){return i.h.set(l,e/255,t/255,r/255,n/255),i.h.dot(l,c)}},function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var n,a=r(583),i=r(648),o=r(574),s=Object(o.g)(),u=Object(o.g)(),c=Object(o.g)(),l=a.a.add,d=a.a.add3;!function(e){e.create=function(e,t,r){void 0===e&&(e=2048),void 0===t&&(t=1024);var n=a.a.create(Float32Array,1,t,r?r.groupBuffer.ref.value:e),p=a.a.create(Float32Array,3,t,r?r.startBuffer.ref.value:e),f=a.a.create(Float32Array,3,t,r?r.endBuffer.ref.value:e),h=function(e,t,r,a,i,o,s){for(var u=0;u<4;++u)d(p,e,t,r),d(f,a,i,o),l(n,s)},m=function(e,t,r,n){var a=o.g.distance(e,t),i=Math.floor(r/2),l=1/r;o.g.sub(c,t,e);for(var d=0;dr.lineCount)&&function(e,t,r){for(var n=0;no.sphereCount&&(i.e.update(o.mappingBuffer,t),i.e.update(o.indexBuffer,r));return o.sphereCount=a,i.e.update(o.centerBuffer,e),i.e.update(o.groupBuffer,n),o}(e,t,r,a,o,s):function(e,t,r,a,o){var s,u=Object(d.g)(),c=-1,p=-1,f={kind:"spheres",sphereCount:o,centerBuffer:i.e.create(e),mappingBuffer:i.e.create(t),indexBuffer:i.e.create(r),groupBuffer:i.e.create(a),get boundingSphere(){var e=n(f);if(e!==c){var t=Object(l.a)(f.centerBuffer.ref.value,4*f.sphereCount,4);d.g.copy(u,t),c=e}return u},get groupMapping(){return f.groupBuffer.ref.version!==p&&(s=Object(b.c)(f.groupBuffer.ref.value,f.sphereCount,4),p=f.groupBuffer.ref.version),s},setBoundingSphere:function(e){d.g.copy(u,e),c=n(f)}};return f}(e,t,r,a,o)}function r(e){return t(e?e.centerBuffer.ref.value:new Float32Array(0),e?e.mappingBuffer.ref.value:new Float32Array(0),e?e.indexBuffer.ref.value:new Uint32Array(0),e?e.groupBuffer.ref.value:new Float32Array(0),0,e)}function n(e){return Object(g.l)([e.sphereCount,e.centerBuffer.ref.version,e.mappingBuffer.ref.version,e.indexBuffer.ref.version,e.groupBuffer.ref.version])}function x(e,t){var r=4*e.sphereCount,n=t.instanceCount.ref.value,a=Object(s.b)(),i=a.position,o=e.centerBuffer.ref.value,u=t.aTransform.ref.value;return Object(s.a)(r,n,4,(function(e,t){return t<0?y.g.fromArray(i,o,3*e):y.g.transformMat4Offset(i,o,u,0,3*e,16*t),a}))}function O(e,t,r,n,o){var s=r.instanceCount,g=r.groupCount,b=x(e,t),O=Object(u.a)(r,b,n.color),j=Object(p.a)(r,n.size),S=Object(c.a)(s*g),_=Object(h.c)(),w=Object(m.c)(),C=Object(v.d)(),A={drawCount:2*e.sphereCount*3,vertexCount:4*e.sphereCount,groupCount:g,instanceCount:s},E=e.boundingSphere.radius?Object(p.b)(j)*o.sizeFactor:0,P=d.g.expand(Object(d.g)(),e.boundingSphere,E),T=Object(l.b)(P,t.aTransform.ref.value,s);return Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)({aPosition:e.centerBuffer,aMapping:e.mappingBuffer,aGroup:e.groupBuffer,elements:e.indexBuffer,boundingSphere:i.e.create(T),invariantBoundingSphere:i.e.create(P),uInvariantBoundingSphere:i.e.create(y.h.ofSphere(P))},O),j),S),_),w),C),t),{padding:i.e.create(E)}),f.a.createValues(o,A)),{uSizeFactor:i.e.create(o.sizeFactor),dDoubleSided:i.e.create(o.doubleSided),dIgnoreLight:i.e.create(o.ignoreLight),dXrayShaded:i.e.create(o.xrayShaded)})}function j(e,t){f.a.updateRenderableState(e,t),e.opaque=e.opaque&&!t.xrayShaded,e.writeDepth=e.opaque}e.create=t,e.createEmpty=r,e.Params=Object(a.a)(Object(a.a)({},f.a.Params),{sizeFactor:o.a.Numeric(1,{min:0,max:10,step:.1}),doubleSided:o.a.Boolean(!1,f.a.CustomQualityParamInfo),ignoreLight:o.a.Boolean(!1,f.a.ShadingCategory),xrayShaded:o.a.Boolean(!1,f.a.ShadingCategory)}),e.Utils={Params:e.Params,createEmpty:r,createValues:O,createValuesSimple:function(t,r,n,i,s){var u=f.a.createSimple(n,i,s),c=Object(a.a)(Object(a.a)({},o.a.getDefaultValues(e.Params)),r);return O(t,u.transform,u.locationIterator,u.theme,c)},updateValues:function(e,t){f.a.updateValues(e,t),i.e.updateIfChanged(e.uSizeFactor,t.sizeFactor),i.e.updateIfChanged(e.dDoubleSided,t.doubleSided),i.e.updateIfChanged(e.dIgnoreLight,t.ignoreLight),i.e.updateIfChanged(e.dXrayShaded,t.xrayShaded)},updateBoundingSphere:function(e,t){var r=t.boundingSphere.radius?Object(p.b)(e)*e.uSizeFactor.ref.value:0,n=d.g.expand(Object(d.g)(),t.boundingSphere,r),a=Object(l.b)(n,e.aTransform.ref.value,e.instanceCount.ref.value);d.g.equals(a,e.boundingSphere.ref.value)||i.e.update(e.boundingSphere,a);d.g.equals(n,e.invariantBoundingSphere.ref.value)||(i.e.update(e.invariantBoundingSphere,n),i.e.update(e.uInvariantBoundingSphere,y.h.fromSphere(e.uInvariantBoundingSphere.ref.value,n)));i.e.update(e.padding,r)},createRenderableState:function(e){var t=f.a.createRenderableState(e);return j(t,e),t},updateRenderableState:j,createPositionIterator:x}}(n||(n={}))},function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var n,a=r(572),i=r(577),o=r(578),s=r(573),u=r(607),c=r(657),l=r(667),d=r(601),p=r(687),f=r(688),h=r(628),m=r(574),g=r(689),b=r(678);!function(e){var t=function(){function e(){this.index=0,this.textures=[]}return e.prototype.get=function(){return this.textures[this.index]},e.prototype.set=function(e,t,r){this.textures[this.index]=Object.assign(this.textures[this.index]||{},{vertex:e,group:t,normal:r}),this.index=(this.index+1)%2},e.prototype.destroy=function(){for(var e=0,t=this.textures;er.lowestElementCount?"lowest":n>r.lowerElementCount?"lower":n>r.lowElementCount?"low":n>r.mediumElementCount?"medium":n>r.highElementCount?"high":"higher"}function p(e,t){var r=Object(i.h)(e.quality,"auto"),n=Object(i.h)(e.detail,1),a=Object(i.h)(e.radialSegments,12),l=Object(i.h)(e.linearSegments,8),p=Object(i.h)(e.resolution,2),f=Object(i.h)(e.probePositions,12),h=Object(i.h)(e.doubleSided,!0),m=0;if("auto"===r)if(t instanceof o.g)r=d(t.root),m=function(e){if(1===e.root.models.length){var t=u.a.Provider.get(e.root.model);if(t&&"P 1"===t.spacegroup.name&&!s.f.isZero(t.spacegroup.cell))return t.spacegroup.cell.volume}return s.b.volume(e.root.boundary.box)}(t);else if(c.b.is(t)){var g=t.grid.cells.space.dimensions;r=(m=g[0]*g[1]*g[2])<1e7?"medium":"low"}switch(r){case"highest":n=3,a=36,l=18,p=.1,f=72,h=!0;break;case"higher":n=3,a=28,l=14,p=.3,f=48,h=!0;break;case"high":n=2,a=20,l=10,p=.5,f=36,h=!0;break;case"medium":n=1,a=12,l=8,p=.8,f=24,h=!0;break;case"low":n=0,a=8,l=3,p=1.3,f=24,h=!1;break;case"lower":n=0,a=4,l=2,p=3,f=12,h=!1;break;case"lowest":n=0,a=2,l=1,p=8,f=12,h=!1}return p=Math.max(p,m/5e8),p=Math.min(p,20),(void 0!==e.alpha&&e.alpha<1||e.xrayShaded)&&(h=!1),{detail:n,radialSegments:a,linearSegments:l,resolution:p,probePositions:f,doubleSided:h}}},function(e,t,r){"use strict";r.d(t,"j",(function(){return h})),r.d(t,"e",(function(){return m})),r.d(t,"d",(function(){return g})),r.d(t,"g",(function(){return b})),r.d(t,"a",(function(){return v})),r.d(t,"f",(function(){return y})),r.d(t,"c",(function(){return x})),r.d(t,"h",(function(){return O})),r.d(t,"b",(function(){return j})),r.d(t,"i",(function(){return S}));var n=r(572),a=r(748),i=r(648),o=r(589),s=r(785),u=r(761),c=r(710),l=r(690),d=r(762),p=r(573),f=r(636);function h(e){return p.a.MultiSelect(e,f.b,{description:"For which kinds of units/chains to show the representation visuals."})}var m={unitKinds:h(["atomic","spheres"]),includeParent:p.a.Boolean(!1,{isHidden:!0})},g=Object(n.a)({},o.a.Params),b=Object(n.a)({},u.a.Params),v=Object(n.a)({},c.a.Params),y=Object(n.a)({},s.a.Params),x=Object(n.a)({},i.a.Params),O=Object(n.a)({},l.a.Params),j=Object(n.a)({},a.a.Params),S=Object(n.a)({},d.a.Params)},function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(572),a=r(573),i=r(848),o=r(757),s=r(617),u=Object(n.a)({},i.b),c=o.a.createProvider({label:"Interactions",descriptor:Object(s.b)({name:"molstar_computed_interactions"}),type:"local",defaultParams:u,getParams:function(e){return u},isApplicable:function(e){return!e.isCoarseGrained},obtain:function(e,t,r){return Object(n.b)(void 0,void 0,void 0,(function(){var o,s;return Object(n.d)(this,(function(c){switch(c.label){case 0:return o=Object(n.a)(Object(n.a)({},a.a.getDefaultValues(u)),r),s={},[4,Object(i.c)(e,t,o)];case 1:return[2,(s.value=c.sent(),s)]}}))}))}})},function(e,t,r){"use strict";r.d(t,"a",(function(){return it}));var n=r(581),a=r(575),i=r(821),o=r(573),s=r(703),u=Object(n.a)(13421772),c={};var l={name:"carbohydrate-symbol",label:"Carbohydrate Symbol",category:"Residue Property",factory:function e(t,r){var n;if(t.structure){var o=t.structure.carbohydrates,c=o.elements,l=o.getElementIndices,d=function(e,t){if(!a.n.isAtomic(e))return u;var r=l(e,t);return r.length>0?c[r[0]].component.color:u};n=function(e,t){return t?i.b.Secondary:a.h.Location.is(e)?d(e.unit,e.element):a.b.isLocation(e)?d(e.aUnit,e.aUnit.elements[e.aIndex]):u}}else n=function(){return u};return{factory:e,granularity:"group",color:n,props:r,description:"Assigns colors according to the Symbol Nomenclature for Glycans (SNFG).",legend:Object(s.b)(i.a)}},getParams:function(e){return c},defaultValues:o.a.getDefaultValues(c),isApplicable:function(e){return!!e.structure&&e.structure.models.some((function(e){return a.d.hasCarbohydrate(e)}))}},d=r(946),p=r(577),f=r(679),h=r(838),m=r(572),g=r(576),b=r(673),v=Object(n.a)(13421772),y=Object(m.a)({},Object(b.b)({type:"colors",colorList:"red-yellow-blue"}));var x={name:"element-index",label:"Element Index",category:"Atom Property",factory:function e(t,r){var n,i;if(t.structure){for(var o=t.structure.root.units,s=o.length,u=new Map,c=new Map,l=0,d=0;dM.d["dark-2"].list.length&&(t.palette.defaultValue.name="colors",t.palette.defaultValue.params=Object(m.a)(Object(m.a)({},t.palette.defaultValue.params),{list:{kind:"interpolate",colors:Object(M.e)("dark-2").list}})),t},defaultValues:o.a.getDefaultValues(R),isApplicable:function(e){return!!e.structure}},F=Object(n.a)(13421772),z=Object(m.a)({},Object(b.b)({type:"colors",colorList:"dark-2"}));function U(e){for(var t=0,r=e.units,n=0,a=r.length;n0&&++t;return t}var V={name:"polymer-index",label:"Polymer Chain Instance",category:"Chain Property",factory:function e(t,r){var n,i;if(t.structure){var o=Object(b.a)(U(t.structure.root),r);i=o.legend;for(var s=t.structure.root.units,u=new Map,c=0,l=0,d=s.length;c0&&(u.set(s[c].id,o.color(l)),++l);n=function(e){var t;return a.h.Location.is(e)?t=u.get(e.unit.id):a.b.isLocation(e)&&(t=u.get(e.aUnit.id)),void 0!==t?t:F}}else n=function(){return F};return{factory:e,granularity:"instance",color:n,props:r,description:"Gives every polymer chain instance a unique color based on the position (index) of the polymer in the list of polymers in the structure.",legend:i}},getParams:function(e){var t=o.a.clone(z);return e.structure&&U(e.structure.root)>M.d["dark-2"].list.length&&(t.palette.defaultValue.name="colors",t.palette.defaultValue.params=Object(m.a)(Object(m.a)({},t.palette.defaultValue.params),{list:{kind:"interpolate",colors:Object(M.e)("dark-2").list}})),t},defaultValues:o.a.getDefaultValues(z),isApplicable:function(e){return!!e.structure}},H=Object(n.b)({ALA:9240460,ARG:124,ASN:16743536,ASP:10485826,CYS:16777072,GLN:16731212,GLU:6684672,GLY:15658734,HIS:7368959,ILE:19456,LEU:4546117,LYS:4671416,MET:12099650,PHE:5459026,PRO:5395026,SER:16740418,THR:12078080,TRP:5195264,TYR:9203788,VAL:16747775,A:14423100,G:3329330,I:10145074,C:16766720,T:4286945,U:4251856,DA:14423100,DG:3329330,DI:10145074,DC:16766720,DT:4286945,DU:4251856,APN:14423100,GPN:3329330,CPN:16766720,TPN:4286945}),G=Object(n.a)(16711935),q={saturation:o.a.Numeric(0,{min:-6,max:6,step:.1}),lightness:o.a.Numeric(1,{min:-6,max:6,step:.1})};function W(e,t){return e.model.atomicHierarchy.atoms.label_comp_id.value(t)}function X(e,t){var r=e.coarseElements.seq_id_begin.value(t);if(r===e.coarseElements.seq_id_end.value(t)){var n=e.coarseElements.entityKey[t];return e.model.sequence.byEntityKey[n].sequence.compId.value(r-1)}}function Y(e,t){var r=e[t];return void 0===r?G:r}var K={name:"residue-name",label:"Residue Name",category:"Residue Property",factory:function e(t,r){var n=Object(O.e)(H,r.saturation,r.lightness);return{factory:e,granularity:"group",preferSmoothing:!0,color:function(e){if(a.h.Location.is(e)){if(a.n.isAtomic(e.unit)){var t=W(e.unit,e.element);return Y(n,t)}if(t=X(e.unit,e.element))return Y(n,t)}else if(a.b.isLocation(e)){if(a.n.isAtomic(e.aUnit)){t=W(e.aUnit,e.aUnit.elements[e.aIndex]);return Y(n,t)}if(t=X(e.aUnit,e.aUnit.elements[e.aIndex]))return Y(n,t)}return G},props:r,description:"Assigns a color to every residue according to its name.",legend:Object(s.b)(Object.keys(H).map((function(e){return[e,H[e]]})).concat([["Unknown",G]]))}},getParams:function(e){return q},defaultValues:o.a.getDefaultValues(q),isApplicable:function(e){return!!e.structure}},Q=r(586),Z=r(768),J=r(583),$=Object(n.b)({alphaHelix:16711808,threeTenHelix:10485888,piHelix:6291584,betaTurn:6324479,betaStrand:16762880,coil:16777215,bend:6740169,turn:45670,dna:11403518,rna:16580962,carbohydrate:10921722}),ee=Object(n.a)(8421504),te={saturation:o.a.Numeric(-1,{min:-6,max:6,step:.1}),lightness:o.a.Numeric(0,{min:-6,max:6,step:.1})};function re(e,t,r,n){var i=Q.m.create(0);if(n&&a.n.isAtomic(t)){var o=n.get(t.invariantId);o&&(i=o.type[o.getIndex(t.residueIndex[r])])}if(Q.m.is(i,2))return Q.m.is(i,2048)?e.threeTenHelix:Q.m.is(i,32768)?e.piHelix:e.alphaHelix;if(Q.m.is(i,4))return e.betaStrand;if(Q.m.is(i,8))return e.bend;if(Q.m.is(i,16))return e.turn;var s=Object(A.b)(t,r);return 7===s?e.dna:6===s?e.rna:9===s?e.carbohydrate:5===s?e.coil:ee}var ne={name:"secondary-structure",label:"Secondary Structure",category:"Residue Property",factory:function e(t,r){var n=t.structure&&Z.a.get(t.structure),i=n?Object(J.i)(n.id,n.version):-1,o=Object(O.e)($,r.saturation,r.lightness);return{factory:e,granularity:"group",preferSmoothing:!0,color:function(e){return a.h.Location.is(e)?re(o,e.unit,e.element,null==n?void 0:n.value):a.b.isLocation(e)?re(o,e.aUnit,e.aUnit.elements[e.aIndex],null==n?void 0:n.value):ee},props:r,contextHash:i,description:"Assigns a color based on the type of secondary structure and basic molecule type.",legend:Object(s.b)(Object.keys($).map((function(e){return[e,$[e]]})).concat([["Other",ee]]))}},getParams:function(e){return te},defaultValues:o.a.getDefaultValues(te),isApplicable:function(e){return!!e.structure},ensureCustomProperties:{attach:function(e,t){return t.structure?Z.a.attach(e,t.structure,void 0,!0):Promise.resolve()},detach:function(e){return e.structure&&Z.a.ref(e.structure,!1)}}},ae=Object(n.a)(13421772),ie={list:o.a.ColorList("turbo",{presetKind:"scale"})};function oe(e,t){var r=e.model;switch(e.kind){case 0:var n=r.atomicHierarchy.residueAtomSegments.index[t];return r.atomicHierarchy.residues.label_seq_id.value(n);case 1:return Math.round((r.coarseHierarchy.spheres.seq_id_begin.value(t)+r.coarseHierarchy.spheres.seq_id_end.value(t))/2);case 2:return Math.round((r.coarseHierarchy.gaussians.seq_id_begin.value(t)+r.coarseHierarchy.gaussians.seq_id_end.value(t))/2)}}function se(e,t){var r=e.model,n="";switch(e.kind){case 0:var a=r.atomicHierarchy.chainAtomSegments.index[t];n=r.atomicHierarchy.chains.label_entity_id.value(a);break;case 1:n=r.coarseHierarchy.spheres.entity_id.value(t);break;case 2:n=r.coarseHierarchy.gaussians.entity_id.value(t)}if(""===n)return 0;var i=r.entities.getEntityIndex(n);if(-1===i)return 0;var o=r.sequence.byEntityKey[i];return void 0===o?0:o.sequence.length}var ue={name:"sequence-id",label:"Sequence Id",category:"Residue Property",factory:function e(t,r){var i=n.c.create({listOrName:r.list.colors,minLabel:"Start",maxLabel:"End"});return{factory:e,granularity:"group",preferSmoothing:!0,color:function(e){if(a.h.Location.is(e)){var t=e.unit,r=e.element;if((n=oe(t,r))>0)if(o=se(t,r))return i.setDomain(0,o-1),i.color(n)}else if(a.b.isLocation(e)){var n,o,s=e.aUnit,u=e.aIndex;if((n=oe(s,s.elements[u]))>0)if(o=se(s,s.elements[u]))return i.setDomain(0,o-1),i.color(n)}return ae},props:r,description:"Gives every polymer residue a color based on its `seq_id` value.",legend:i?i.legend:void 0}},getParams:function(e){return ie},defaultValues:o.a.getDefaultValues(ie),isApplicable:function(e){return!!e.structure}},ce=r(966),le=Object(n.a)(13421772),de=Object(m.a)({},Object(b.b)({type:"colors",colorList:"dark-2"}));var pe={name:"unit-index",label:"Chain Instance",category:"Chain Property",factory:function e(t,r){var n,i;if(t.structure){var o=t.structure.root.units,s=Object(b.a)(o.length,r);i=s.legend;for(var u=new Map,c=0,l=o.length;cM.d["dark-2"].list.length&&(t.palette.defaultValue.name="colors",t.palette.defaultValue.params=Object(m.a)(Object(m.a)({},t.palette.defaultValue.params),{list:{kind:"interpolate",colors:Object(M.e)("dark-2").list}})),t},defaultValues:o.a.getDefaultValues(de),isApplicable:function(e){return!!e.structure}},fe=Object(n.a)(16777113),he={domain:o.a.Interval([0,100]),list:o.a.ColorList("red-white-blue",{presetKind:"scale"})};function me(e,t){return a.n.isAtomic(e)?e.model.atomicConformation.B_iso_or_equiv.value(t):a.n.isSpheres(e)?e.model.coarseConformation.spheres.rmsf[t]:0}var ge={name:"uncertainty",label:"Uncertainty/Disorder",category:"Atom Property",factory:function e(t,r){var i=n.c.create({reverse:!0,domain:r.domain,listOrName:r.list.colors});return{factory:e,granularity:"group",preferSmoothing:!0,color:function(e){return a.h.Location.is(e)?i.color(me(e.unit,e.element)):a.b.isLocation(e)?i.color(me(e.aUnit,e.aUnit.elements[e.aIndex])):fe},props:r,description:"Assigns a color based on the uncertainty or disorder of an element's position, e.g. B-factor or RMSF, depending on the data availability and experimental technique.",legend:i?i.legend:void 0}},getParams:function(e){return he},defaultValues:o.a.getDefaultValues(he),isApplicable:function(e){return!!e.structure&&e.structure.models.some((function(e){return e.atomicConformation.B_iso_or_equiv.isDefined||e.coarseHierarchy.isDefined}))}},be=r(753),ve=r(647),ye=Object(n.a)(16448250),xe=Object(m.a)({},Object(b.b)({type:"colors",colorList:"dark-2"}));function Oe(e,t){return e+"|"+t}function je(e,t,r,n,a,i){return e+"|"+t+"|"+r+"|"+(i||(a||n))}function Se(e,t,r,n,a,i,o,s){for(var u=a.entity_id,c=a.pdbx_src_id,l=a.pdbx_beg_seq_num,d=a.pdbx_end_seq_num,p=0,f=a._rowCount;pM.d["dark-2"].list.length&&(t.palette.defaultValue.name="colors",t.palette.defaultValue.params=Object(m.a)(Object(m.a)({},t.palette.defaultValue.params),{list:{kind:"interpolate",colors:Object(M.e)("dark-2").list}})),t},defaultValues:o.a.getDefaultValues(xe),isApplicable:function(e){return!!e.structure}},Ce=Object(n.a)(15658734),Ae=Object(m.a)({},h.b);var Ee={name:"illustrative",label:"Illustrative",category:"Miscellaneous",factory:function e(t,r){var i=Object(h.a)(t,r),o=i.color;function s(e,t){var r=o(e,!1);return"C"===t?n.a.lighten(r,.8):r}return{factory:e,granularity:"group",preferSmoothing:!0,color:function(e){if(a.h.Location.is(e)&&a.n.isAtomic(e.unit)){var t=e.unit.model.atomicHierarchy.atoms.type_symbol.value(e.element);return s(e,t)}if(a.b.isLocation(e)&&a.n.isAtomic(e.aUnit)){var r=e.aUnit.elements[e.aIndex];t=e.aUnit.model.atomicHierarchy.atoms.type_symbol.value(r);return s(e,t)}return Ce},props:r,description:"Assigns an illustrative color that gives every chain a unique color with lighter carbons (inspired by David Goodsell's Molecule of the Month style).",legend:i.legend}},getParams:function(e){return Ae},defaultValues:o.a.getDefaultValues(Ae),isApplicable:function(e){return!!e.structure}},Pe={list:o.a.ColorList("red-yellow-green",{presetKind:"scale"}),scale:o.a.Select("DGwif",[["DGwif","DG water-membrane"],["DGwoct","DG water-octanol"],["Oct-IF","DG difference"]])};var Te={DGwif:0,DGwoct:1,"Oct-IF":2};function Ie(e,t){return e.model.atomicHierarchy.atoms.label_comp_id.value(t)}function ke(e,t){var r=e.coarseElements.seq_id_begin.value(t);if(r===e.coarseElements.seq_id_end.value(t)){var n=e.coarseElements.entityKey[t];return e.model.sequence.byEntityKey[n].sequence.compId.value(r-1)}}var Me={name:"hydrophobicity",label:"Hydrophobicity",category:"Residue Property",factory:function e(t,r){var i=Te[r.scale],o=1/0,s=-1/0;for(var u in Q.k){var c=Q.k[u][i];o=Math.min(o,c),s=Math.max(s,c)}var l=n.c.create({listOrName:r.list.colors,domain:[s,o],minLabel:"Hydrophobic",maxLabel:"Hydrophilic"});return{factory:e,granularity:"group",preferSmoothing:!0,color:function(e){var t;return a.h.Location.is(e)?t=a.n.isAtomic(e.unit)?Ie(e.unit,e.element):ke(e.unit,e.element):a.b.isLocation(e)&&(t=a.n.isAtomic(e.aUnit)?Ie(e.aUnit,e.aUnit.elements[e.aIndex]):ke(e.aUnit,e.aUnit.elements[e.aIndex])),l.color(t?function(e,t){var r=Q.k[e];return void 0===r?0:r[t]}(t,i):0)},props:r,description:'Assigns a color to every amino acid according to the "Experimentally determined hydrophobicity scale for proteins at membrane interfaces" by Wimely and White (doi:10.1038/nsb1096-842).',legend:l?l.legend:void 0}},getParams:function(e){return Pe},defaultValues:o.a.getDefaultValues(Pe),isApplicable:function(e){return!!e.structure}},De=Object(n.a)(13421772),Re=Object(m.a)({},Object(b.b)({type:"colors",colorList:"purples"}));var Be={name:"model-index",label:"Model Index",category:"Chain Property",factory:function e(t,r){var n,i,o,s;if(t.structure){for(var u=t.structure.root.models,c=0,l=0,d=u;l0&&a.d.TrajectoryInfo.get(e.structure.models[0]).size>1}},Le=Object(n.a)(13421772),Ne={domain:o.a.Interval([0,1]),list:o.a.ColorList("purples",{presetKind:"scale"})};function Fe(e,t){return a.n.isAtomic(e)?e.model.atomicConformation.occupancy.value(t):0}var ze={name:"occupancy",label:"Occupancy",category:"Atom Property",factory:function e(t,r){var i=n.c.create({reverse:!1,domain:r.domain,listOrName:r.list.colors});return{factory:e,granularity:"group",preferSmoothing:!0,color:function(e){return a.h.Location.is(e)?i.color(Fe(e.unit,e.element)):a.b.isLocation(e)?i.color(Fe(e.aUnit,e.aUnit.elements[e.aIndex])):Le},props:r,description:"Assigns a color based on the occupancy of an atom.",legend:i?i.legend:void 0}},getParams:function(e){return Ne},defaultValues:o.a.getDefaultValues(Ne),isApplicable:function(e){return!!e.structure&&e.structure.models.some((function(e){return e.atomicConformation.occupancy.isDefined}))}},Ue=Object(n.a)(13421772),Ve=Object(m.a)({},Object(b.b)({type:"colors",colorList:"dark-2"}));function He(e){return e.map((function(e){return(""+(e+1e4)).padStart(5,"0")})).join("")}function Ge(e){var t=Object(be.c)(1e4,0);return[parseInt(e.substr(0,t))-1e4,parseInt(e.substr(t,t))-1e4,parseInt(e.substr(t+t,t))-1e4]}function qe(e){return e.map((function(e){return e+5})).join("")}function We(e){for(var t=new Map,r=new Set,n=0,a=e.units.length;nM.d["dark-2"].list.length&&(t.palette.defaultValue.name="colors",t.palette.defaultValue.params=Object(m.a)(Object(m.a)({},t.palette.defaultValue.params),{list:{kind:"interpolate",colors:Object(M.e)("dark-2").list}})),t},defaultValues:o.a.getDefaultValues(Ve),isApplicable:function(e){return!!e.structure}},Ye=r(903),Ke=Object(n.a)(16777113),Qe={domain:o.a.Interval([-1,1]),list:o.a.ColorList("red-white-blue",{presetKind:"scale"})};function Ze(e,t){var r;return null===(r=Ye.a.Provider.get(e.model))||void 0===r?void 0:r.data.value(t)}var Je={name:"partial-charge",label:"Partial Charge",category:"Atom Property",factory:function e(t,r){var i=n.c.create({domain:r.domain,listOrName:r.list.colors});return{factory:e,granularity:"group",preferSmoothing:!0,color:function(e){var t;return a.h.Location.is(e)?void 0!==(t=Ze(e.unit,e.element))?i.color(t):Ke:a.b.isLocation(e)&&void 0!==(t=Ze(e.aUnit,e.aUnit.elements[e.aIndex]))?i.color(t):Ke},props:r,description:"Assigns a color based on the partial charge of an atom.",legend:i?i.legend:void 0}},getParams:function(e){return Qe},defaultValues:o.a.getDefaultValues(Qe),isApplicable:function(e){return!!e.structure&&e.structure.models.some((function(e){return void 0!==Ye.a.Provider.get(e)}))}},$e=Object(n.a)(16448250),et=Object(m.a)({},Object(b.b)({type:"colors",colorList:"many-distinct"}));var tt={name:"atom-id",label:"Atom Id",category:"Atom Property",factory:function e(t,r){var n,i;if(t.structure){var o=a.h.Location.create(t.structure.root),s=function(e){for(var t=new Map,r=0,n=e.models;r-.5||(m[m.length]=A,g[g.length]=B,b[b.length]=H)}}}}}return function(e,t,r,n){for(var a=new c.a.DirectedEdgeBuilder(e,t,r),i=new Float32Array(a.slotCount),o=0,s=a.edgeCount;o0&&(t.secondStart-e.secondEnd<6&&t.firstStart-e.firstEnd<3||t.secondStart-e.secondEnd<3)}function x(e){return f.is(e,8)||f.is(e,1)||f.is(e,16)}var O=r(578),j=r(576),S=r(782);var _={oldDefinition:o.a.Boolean(!0,{description:"Whether to use the old DSSP convention for the annotation of turns and helices, causes them to be two residues shorter"}),oldOrdering:o.a.Boolean(!0,{description:"Alpha-helices are preferred over 3-10 helices"})};function w(e,t){return Object(n.b)(this,void 0,void 0,(function(){var r,i,o,c,l,d,h,m,y,_,w,k,M,D,R,B,L,N,F,z,U;return Object(n.d)(this,(function(n){for(r=function(e){for(var t=e.model.atomicHierarchy.index,r=e.proteinElements,n=e.residueIndex,a=r.length,i=new Uint32Array(a),o=new Int32Array(a),s=new Int32Array(a),u=new Int32Array(a),c=new Int32Array(a),l=0;l6.25)continue e}var j=o[y-2],S=o[y],_=o[y+2],w=i[j],C=i[S],A=i[_];d(w,p),d(C,f),d(A,h),s.g.sub(b,p,f),s.g.sub(v,f,h);var E=Object(u.f)(s.g.angle(b,v));E&&E>70&&(r[y]|=32)}}(k),function(e){for(var t,r,n=e.proteinInfo,a=e.hbonds,i=e.flags,o=e.bridges,s=a.offset,u=a.b,c=0,l=n.residueIndices.length;cf||((t=c+1)!==(r=f)&&-1!==a.getDirectedEdgeIndex(r,t+1)&&(i[t]|=2,i[r]|=2,o[o.length]=new g(t,r,0)),(t=c)!==(r=f-1)&&-1!==a.getDirectedEdgeIndex(r-1,t)&&(i[t]|=2,i[r]|=2,o[o.length]=new g(r,t,0)),(t=c)!==(r=f)&&-1!==a.getDirectedEdgeIndex(r,t)&&(i[t]|=2,i[r]|=2,o[o.length]=new g(r,t,1)),(t=c+1)!==(r=f-1)&&-1!==a.getDirectedEdgeIndex(r-1,t+1)&&(i[t]|=2,i[r]|=2,o[o.length]=new g(r,t,1)))}o.sort((function(e,t){return e.partner1>t.partner1?1:e.partner12?Object(n.k)(t,e[0],e[t-1],e[t>>1]):Object(n.j)(t,e[0],e[t-1]):0}function b(e){var t=e.length;return t>5?"["+e[0]+", "+e[1]+", ..., "+e[t-1]+"], length "+t:"["+e.join(", ")+"]"}function v(e,t){var r=e.length;return 0===r?-1:e[0]<=t&&t<=e[r-1]?C(e,t,0,r):-1}function y(e,t,r){return x(e,t,a.a.start(r),a.a.end(r))}function x(e,t,r,n){return 0===e.length||n<=r?-1:e[r]<=t&&t<=e[n-1]?C(e,t,r,n):-1}function O(e,t){return v(e,t)>=0}function j(e,t){if(e===t)return!0;var r=e.length;if(r!==t.length||e[0]!==t[0]||e[r-1]!==t[r-1])return!1;for(var n=0;ne[r-1]?r:A(e,t,0,r)}function _(e,t,r){var n=a.a.start(r),i=a.a.end(r),o=e[n];return t<=o?n:i>n&&t>e[i-1]?i:t-o<=11?function(e,t,r,n){for(var a=r;ai){for(var o=a;o<=i;o++)if(t===e[o])return o;return-1}var s=a+i>>1,u=e[s];if(tu))return s;a=s+1}}return-1}function A(e,t,r,n){for(var a=r,i=n-1;ai){for(var o=a;o<=i;o++)if(t<=e[o])return o;return i+1}var s=a+i>>1,u=e[s];if(tu))return s;a=s+1}}return a>i?i+1:e[a]>=t?a:a+1}function E(e,t){if(e===t)return!0;for(var r=z(e,t),n=r.startI,a=r.startJ,i=r.endI,o=r.endJ;nu))return!0;a++}}return!1}function P(e,t){if(e===t)return!0;var r=t.length,n=z(e,t),a=n.startI,i=n.startJ,o=n.endI,s=n.endJ;if(s-il?i++:(a++,i++,u++)}return u===r}function T(e,t){if(e===t)return e;var r=e.length,n=t.length;if(0===r)return t;if(0===n)return e;if(e[0]>t[0])return T(t,e);var a=z(e,t),i=a.startI,o=a.startJ,s=a.endI,u=a.endJ,c=k(e,t,i,o,s,u);if(c===r&&c===n||c===n)return e;if(c===r)return t;var l=new Int32Array(r+n-c),d=0,p=0,f=0;for(d=0;dt[p];)l[f++]=t[p++];for(;dm?(l[f++]=m,p++):(l[f++]=h,d++,p++)}for(;dl?s++:(o++,s++,u++)}return u}function M(e,t){if(e===t)return e;var r=z(e,t),n=r.startI,a=r.startJ,o=r.endI,s=r.endJ,u=k(e,t,n,a,o,s),c=e.length,l=t.length;if(!u)return i;if(u===c&&u===l||u===l)return t;if(u===c)return e;for(var d=new Int32Array(u),p=0,f=n,h=a;fg||(d[p++]=m,f++),h++)}return d}function D(e,t){if(e===t)return i;for(var r=e.length,n=z(e,t),a=n.startI,o=n.startJ,s=n.endI,u=n.endJ,c=a,l=o,d=0;cg?l++:(c++,l++,d++)}if(!d)return e;if(d>=r)return i;for(var p=new Int32Array(r-d),f=0,h=0;hg||c++,l++)}for(;cg?l++:(c++,l++,d++)}var p=e.length;if(!d)return i;if(d===p)return Object(n.g)(0,e.length-1);var f=new Int32Array(d),h=0;for(c=a,l=o;cg||(f[h++]=c,c++),l++)}return f}var L,N,F={startI:0,startJ:0,endI:0,endJ:0};function z(e,t){var r=e.length,n=t.length,a=r/n;return r>=128||n>=128||a<=.34||a>=2.99?(F.startI=S(e,d(t)),F.startJ=S(t,d(e)),F.endI=S(e,p(t)),F.endJ=S(t,p(e))):(F.startI=0,F.startJ=0,F.endI=r,F.endJ=n),F}(N=L||(L={})).Empty=i,N.ofUnsortedArray=u,N.ofSingleton=o,N.ofSortedArray=s,N.ofRange=c,N.ofBounds=function(e,t){return c(e,t-1)},N.is=l,N.has=O,N.indexOf=v,N.indexOfInInterval=y,N.indexOfInRange=x,N.start=d,N.end=p,N.min=f,N.max=h,N.size=m,N.hashCode=g,N.toString=b,N.areEqual=j,N.areIntersecting=E,N.isSubset=P,N.union=T,N.intersect=M,N.subtract=D,N.findPredecessorIndex=S,N.findPredecessorIndexInInterval=_,N.findRange=w,N.intersectionSize=I,N.deduplicate=R,N.indicesOf=B},,,,function(e,t,r){"use strict";var n;r.d(t,"a",(function(){return n})),function(e){e.create=function(e){return e},e.has=function(e,t){return 0!=(e&t)},e.hasAll=function(e,t){return!!t&&(e&t)===t}}(n||(n={}))},function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var n,a=function(){function e(e){this.xs=[],this.index=-1,this.length=0,this.hasNext=!1,this.length=e.length,this.hasNext=e.length>0,this.xs=e,this.index=-1,this.lastValue=e.length>0?e[0]:void 0}return e.prototype.move=function(){return++this.index,this.lastValue=this.xs[this.index],this.hasNext=this.index=e}return e.prototype.move=function(){return++this.value,this.hasNext=this.value>>0&127|0;else if(i<2048)e[t++]=i>>>6&31|192,e[t++]=i>>>0&63|128;else if(i<65536)e[t++]=i>>>12&15|224,e[t++]=i>>>6&63|128,e[t++]=i>>>0&63|128;else{if(!(i<1114112))throw new Error("bad codepoint "+i);e[t++]=i>>>18&7|240,e[t++]=i>>>12&63|128,e[t++]=i>>>6&63|128,e[t++]=i>>>0&63|128}}}r.d(t,"c",(function(){return n})),r.d(t,"b",(function(){return s})),r.d(t,"a",(function(){return u}));var a=function(){for(var e=[],t=0;t<1024;t++)e[t]=String.fromCharCode(t);return e}();function i(e){throw new Error(e)}var o="undefined"!=typeof TextDecoder?new TextDecoder:void 0;function s(e,t,r){if(o){var n=t||r!==e.length?e.subarray(t,t+r):e;return o.decode(n)}return function(e,t,r){for(var n=a,o=void 0,s=[],u=0,c=t,l=t+r;c0&&(o[o.length]=s.slice(0,u).join("")),o.join("")):s.slice(0,u).join("")}(e,t,r)}function u(e){for(var t=0,r=0,n=e.length;r0&&(s/=d,u/=d,c/=d),p=0;pl&&(l=b)}return{center:a.g.create(s,u,c),radius:Math.sqrt(l)}},e.transform=function(e,r,n){return a.g.transformMat4(e.center,r.center,n),e.radius=r.radius*a.c.getMaxScaleOnAxis(n),t(r)&&o(e,r.extrema.map((function(e){return a.g.transformMat4(Object(a.g)(),e,n)}))),e},e.translate=function(e,r,n){return a.g.add(e.center,r.center,n),t(r)&&o(e,r.extrema.map((function(e){return a.g.add(Object(a.g)(),e,n)}))),e},e.toArray=function(e,t,r){a.g.toArray(e.center,t,r),t[r+3]=e.radius},e.fromArray=function(e,t,r){return a.g.fromArray(e.center,t,r),e.radius=t[r+3],e},e.fromBox3D=function(t,r){return a.g.scale(t.center,a.g.add(t.center,r.max,r.min),.5),t.radius=a.g.distance(t.center,r.max),e.setExtrema(t,[a.g.create(r.min[0],r.min[1],r.min[2]),a.g.create(r.max[0],r.max[1],r.max[2]),a.g.create(r.max[0],r.min[1],r.min[2]),a.g.create(r.min[0],r.max[1],r.max[2]),a.g.create(r.min[0],r.min[1],r.max[2]),a.g.create(r.max[0],r.min[1],r.max[2]),a.g.create(r.max[0],r.max[1],r.min[2]),a.g.create(r.min[0],r.max[1],r.min[2])]),t},e.fromAxes3D=function(e,t){return a.g.copy(e.center,t.origin),e.radius=Math.max(a.g.magnitude(t.dirA),a.g.magnitude(t.dirB),a.g.magnitude(t.dirC)),e};var s=Object(a.g)();e.fromDimensionsAndTransform=function(t,r,n){var i=r[0],o=r[1],u=r[2],c=a.g.create(0,0,0);a.g.transformMat4(c,c,n);var l=a.g.create(i,o,u);a.g.transformMat4(l,l,n);var d=a.g.create(i,0,0);a.g.transformMat4(d,d,n);var p=a.g.create(0,o,u);a.g.transformMat4(p,p,n);var f=a.g.create(0,0,u);a.g.transformMat4(f,f,n);var h=a.g.create(i,0,u);a.g.transformMat4(h,h,n);var m=a.g.create(i,o,0);a.g.transformMat4(m,m,n);var g=a.g.create(0,o,0);a.g.transformMat4(g,g,n),a.g.add(s,c,l),a.g.scale(s,s,.5);var b=Math.max(a.g.distance(c,l),a.g.distance(d,p));return e.set(t,s,b/2),e.setExtrema(t,[c,l,d,p,f,h,m,g]),t};var u=Object(a.g)();e.addVec3=function(t,r,n){return a.g.distance(r.center,n)e.radius)return!1}return!0}return a.g.distance(e.center,r.center)+r.radius<=e.radius},e.overlaps=function(e,t){return a.g.distance(e.center,t.center)<=e.radius+t.radius},e.distance=function(e,t){return a.g.distance(e.center,t.center)-e.radius+t.radius}}(o||(o={}))},function(e,t,r){"use strict";r.d(t,"d",(function(){return u})),r.d(t,"a",(function(){return c})),r.d(t,"e",(function(){return l})),r.d(t,"b",(function(){return d})),r.d(t,"c",(function(){return n})),r.d(t,"h",(function(){return p})),r.d(t,"g",(function(){return f})),r.d(t,"f",(function(){return h}));var n,a=r(572),i=r(580),o=r(718),s=r(752);function u(e,t){return{name:t,blocks:e}}function c(e,t,r,n){return void 0===n&&(n=[]),{categoryNames:e,header:r,categories:t,saveFrames:n,getField:function(e){var r=e.split("."),n=r[0],a=r[1];return t[n].getField(a||"")}}}function l(e,t,r){return{categoryNames:e,header:r,categories:t}}function d(e,t,r,n){return{rowCount:t,name:e,fieldNames:Object(a.e)([],r),getField:function(e){return n[e]}}}function p(e,t,r,n){var a=r?0:1;switch(t){case 1:return"brackets"===n?function(t){return e+"["+(t+a)+"]"}:function(t){return e+"_"+(t+a)};case 2:return"brackets"===n?function(t,r){return e+"["+(t+a)+"]["+(r+a)+"]"}:function(t,r){return e+"_"+(t+a)+(r+a)};case 3:return"brackets"===n?function(t,r,n){return e+"["+(t+a)+"]["+(r+a)+"]["+(n+a)+"]"}:function(t,r,n){return e+"_"+(t+a)+(r+a)+(n+a)};default:throw new Error("Tensors with rank > 3 or rank 0 are currently not supported.")}}function f(e,t,r,n){var a=t.create();if(1===t.rank)for(var i=t.dimensions[0],o=0;o 3 or rank 0 are currently not supported.");var l=t.dimensions[0],d=t.dimensions[1],p=t.dimensions[2];for(o=0;o0?i.a.Schema.float:i.a.Schema.int}!function(e){function t(e,t){var r=Object.keys(t);return{rowCount:r.length>0?t[r[0]].rowCount:0,name:e,fieldNames:r,getField:function(e){return t[e]}}}e.empty=function(e){return{rowCount:0,name:e,fieldNames:[],getField:function(e){}}},e.ofFields=t,e.ofTable=function(e,r){for(var a={},i=0,o=r._columns;i1)return 0;if(0===n)return 1;var a=r.charCodeAt(0);return 46===a?1:63===a?2:0},areValuesEqual:function(t,r){return e[t]===e[r]},toStringArray:function(n){return n?i.b.createAndFillArray(t,r,n):e},toIntArray:function(e){return i.b.createAndFillArray(t,n,e)},toFloatArray:function(e){return i.b.createAndFillArray(t,a,e)}}}function r(e){var t,r,n,a=e.rowCount,s=e.valueKind,u=e.areValuesEqual,c=e.isDefined;switch(e.schema.valueType){case"float":case"int":t=function(t){return""+e.value(t)},r=e.value,n=e.value;break;case"str":t=e.value,r=function(t){var r=e.value(t);return Object(o.d)(r,0,r.length)||0},n=function(t){var r=e.value(t);return Object(o.b)(r,0,r.length)||0};break;case"list":var l=e.schema.separator;t=function(t){return e.value(t).join(l)},r=function(e){return NaN},n=function(e){return NaN};break;default:throw new Error("unsupported valueType '"+e.schema.valueType+"'")}return{__array:void 0,binaryEncoding:void 0,isDefined:c,rowCount:a,str:t,int:r,float:n,valueKind:s,areValuesEqual:u,toStringArray:function(e){return i.b.createAndFillArray(a,t,e)},toIntArray:function(e){return i.b.createAndFillArray(a,r,e)},toFloatArray:function(e){return i.b.createAndFillArray(a,n,e)}}}e.ofString=function(e){return t([e])},e.ofStrings=t,e.ofNumbers=function(e){var t=e.length,r=function(t){return""+e[t]},n=function(t){return e[t]},a=function(r){return!r||r.array&&e instanceof r.array?e:i.b.createAndFillArray(t,n,r)};return{__array:void 0,binaryEncoding:void 0,isDefined:!0,rowCount:t,str:r,int:n,float:n,valueKind:function(e){return 0},areValuesEqual:function(t,r){return e[t]===e[r]},toStringArray:function(e){return i.b.createAndFillArray(t,r,e)},toIntArray:a,toFloatArray:a}},e.ofTokens=function(e){var t=e.data,r=e.indices,n=e.count,a=function(e){var n=t.substring(r[2*e],r[2*e+1]);return"."===n||"?"===n?"":n},u=function(e){return Object(o.d)(t,r[2*e],r[2*e+1])||0},c=function(e){return Object(o.b)(t,r[2*e],r[2*e+1])||0};return{__array:void 0,binaryEncoding:void 0,isDefined:!0,rowCount:n,str:a,int:u,float:c,valueKind:function(e){var n=r[2*e],a=r[2*e+1]-n;if(a>1)return 0;if(0===a)return 1;var i=t.charCodeAt(n);return 46===i?1:63===i?2:0},areValuesEqual:Object(s.c)(e),toStringArray:function(e){return i.b.createAndFillArray(n,a,e)},toIntArray:function(e){return i.b.createAndFillArray(n,u,e)},toFloatArray:function(e){return i.b.createAndFillArray(n,c,e)}}},e.ofColumn=r,e.ofUndefined=function(e,t){return r(i.a.Undefined(e,t))}}(n||(n={}))},function(e,t,r){"use strict";var n;r.d(t,"a",(function(){return n})),function(e){function t(e,t,r){return{kind:"value",namespace:e,name:t,parent:r}}function r(e,t,r,n){for(var a=Object.create(null),i=0,o=n;i25e4){var h=o.b.computeBounding(e);return{box:h,sphere:o.g.fromBox3D(Object(o.g)(),h)}}var m=f>1e4?u:c;m.reset();for(var g=0;g=0&&t[1]<=0&&r[1]>=0&&t[2]<=0&&r[2]>=0&&(c[0]=s.e.getSymmetryOperator(a,0,0,0,0));for(var l=a.cell.toFractional,d=u.g.transformMat4(Object(u.g)(),n,l),p=0;p1)return t(r,i.ref);var s=a.transforms.get(i.parent);if(!s.state.isGhost)return t(r,i.ref);i=s}}))}function y(e){d.a.State.ToggleExpanded.subscribe(e,(function(e){var t=e.state,r=e.ref;return t.updateCellState(r,(function(e){return{isCollapsed:!e.isCollapsed}}))}))}function x(e){d.a.State.ToggleVisibility.subscribe(e,(function(e){var t=e.state,r=e.ref;return O(t,r,!t.cells.get(r).state.isHidden)}))}function O(e,t,r){s.h.doPreOrder(e.tree,e.transforms.get(t),{state:e,value:r},j)}function j(e,t,r){r.state.updateCellState(e.ref,{isHidden:r.value})}function S(e){d.a.Interactivity.Object.Highlight.subscribe(e,(function(t){var r=t.state,n=t.ref;if(e.canvas3d&&!e.isBusy){e.managers.interactivity.lociHighlights.clearHighlights();for(var i=0,s="string"==typeof n?[n]:n;iR.drawingBufferWidth||z+V<0||U>R.drawingBufferHeight||U+H<0)return!1;var n=!1;X.update(se);var i=q.update(),o=e||i||t||ie;ie=!1;var s=J.update(o,f.multiSample);if(o||s){var u=q;"on"===f.camera.stereo.name&&(W.update(),u=W),S.c.isEnabled(f.multiSample)?J.render(Y,u,G,K,!0,f.transparentBackground,f):a.draw.render(Y,u,G,K,!0,f.transparentBackground,f.postprocessing),Q.dirty=!0,n=!0}return n}(!!e)&&ne&&T.next(Object(s.b)()-E)}function le(e){ie=ie||!!e}var de=0;function pe(e,t){se=e,me(null==t?void 0:t.isSynchronous),q.transition.tick(se),(null==t?void 0:t.manualDraw)||(ce(!1),q.transition.inTransition||r.isContextLost||Z.tick(se))}function fe(){pe(Object(s.b)()),de=N(fe)}function he(e,t){var n="on"===f.camera.stereo.name?W:q;return r.isContextLost?void 0:Q.identify(e,t,n)}function me(e){void 0===e&&(e=!1),function(e){if(!G.needsCommit)return!0;if(C.g.copy(ge,G.boundingSphereVisible),!G.commit(e?void 0:250))return!1;K.debug.isEnabled&&K.debug.update();f.camera.manualReset||0!==j.value&&!function(){if(0===q.state.radiusMax)return!0;if(q.transition.inTransition||te)return!1;var e=!0;C.g.set(be,q.state.target,q.state.radius);for(var t=0,r=G.renderables;tbe.radius||i>a.radius||a.radius>q.state.radiusMax)&&!C.g.includes(ge,a))return!0;C.g.overlaps(be,a)&&(e=!1)}}}return e}()||($=!0);0===ge.radius&&(ee=0);q.setState({radiusMax:G.boundingSphere.radius},0),j.next(v.size),A.a&&ve();return!0}(e)&&(!function(){if(!$)return;var e=G.boundingSphereVisible,t=e.center,r=e.radius,n=X.props.autoAdjustMinMaxDistance;if("on"===n.name){var a=n.params.minDistanceFactor*r+n.params.minDistancePadding,o=Math.max(n.params.maxDistanceFactor*r,n.params.maxDistanceMin);X.setProps({minDistance:a,maxDistance:o})}if(r>0){var s=void 0===ee?f.cameraResetDurationMs:ee,u=q.getFocus(t,r),c="function"==typeof te?te(G,q):te,l=c?Object(i.a)(Object(i.a)({},u),c):u;q.setState(Object(i.a)(Object(i.a)({},l),{radiusMax:G.boundingSphere.radius}),s)}ee=void 0,te=void 0,$=!1}(),oe&&(K.debug.isEnabled&&K.debug.update(),ce(!0),oe=!1),M.next(Object(s.b)()))}var ge=Object(C.g)(),be=Object(C.g)();function ve(){console.table(G.renderables.map((function(e){return{drawCount:e.values.drawCount.ref.value,instanceCount:e.values.instanceCount.ref.value,materialId:e.materialId,renderItemId:e.id}}))),console.log(r.stats);var e=r.resources.getByteCounts(),t=e.texture,n=e.attribute,a=e.elements;console.log({texture:(t/1024/1024).toFixed(3)+" MiB",attribute:(n/1024/1024).toFixed(3)+" MiB",elements:(a/1024/1024).toFixed(3)+" MiB"})}function ye(e){!function(e){if(y.has(e))return;y.set(e,e.updated.subscribe((function(t){e.state.syncManually||ye(e)})))}(e);var t=v.get(e),r=new Set;e.renderObjects.forEach((function(e){return r.add(e)})),t?x.a.areEqual(r,t)||(r.forEach((function(e){t.has(e)||G.add(e)})),t.forEach((function(e){r.has(e)||G.remove(e)}))):e.renderObjects.forEach((function(e){return G.add(e)})),v.set(e,r),G.update(e.renderObjects,!1),oe=!0,A.a&&ve()}function xe(){var e=G.boundingSphere.radius>0?100-Math.round(q.transition.target.radius/G.boundingSphere.radius*100):0;return{camera:{mode:q.state.mode,helper:Object(i.a)({},K.camera.props),stereo:Object(i.a)({},f.camera.stereo),manualReset:!!f.camera.manualReset},cameraFog:q.state.fog>0?{name:"on",params:{intensity:q.state.fog}}:{name:"off",params:{}},cameraClipping:{far:q.state.clipFar,radius:e},cameraResetDurationMs:f.cameraResetDurationMs,transparentBackground:f.transparentBackground,viewport:f.viewport,postprocessing:Object(i.a)({},f.postprocessing),multiSample:Object(i.a)({},f.multiSample),renderer:Object(i.a)({},Y.props),trackball:Object(i.a)({},X.props),debug:Object(i.a)({},K.debug.props),handle:Object(i.a)({},K.handle.props)}}var Oe=L.subscribe((function(){Q.dirty=!0,ce(!0),ce(!0)})),je=new o.a(0);function Se(e){void 0===e&&(e=!0),a.updateSize(),_e(),we(),e&&le(!0),je.next(+new Date)}return{webgl:r,add:ye,remove:function(e){!function(e){var t=y.get(e);t&&(t.unsubscribe(),y.delete(e))}(e);var t=v.get(e);t&&(t.forEach((function(e){return G.remove(e)})),v.delete(e),oe=!0,A.a&&ve())},commit:me,update:function(e,t){if(e){if(!v.has(e))return;G.update(e.renderObjects,!!t)}else G.update(void 0,!!t);oe=!0},clear:function(){y.forEach((function(e){return e.unsubscribe()})),y.clear(),v.clear(),G.clear(),K.debug.clear(),le(!0),j.next(v.size)},syncVisibility:function(){0===q.state.radiusMax&&($=!0,ee=0),G.syncVisibility()&&K.debug.isEnabled&&K.debug.update(),le(!0)},requestDraw:le,tick:pe,animate:function(){ue=!1,X.start(Object(s.b)()),0===de&&fe()},resetTime:function(e){E=e,X.start(e)},pause:function(e){void 0===e&&(e=!1),ue=e,F(de),de=0},resume:function(){ue=!1},identify:he,mark:function(e,t){var r=e.repr,n=e.loci,a=!1;if(r?a=r.mark(n,t):(a=K.handle.mark(n,t),a=K.camera.mark(n,t)||a,v.forEach((function(e,r){a=r.mark(n,t)||a}))),a){G.update(void 0,!0),K.handle.scene.update(void 0,!0),K.camera.scene.update(void 0,!0);var i=Q.dirty;ce(!0),Q.dirty=i}},getLoci:ae,handleResize:Se,requestResize:function(){re=!0},requestCameraReset:function(e){ee=null==e?void 0:e.durationMs,te=null==e?void 0:e.snapshot,$=!0},camera:q,boundingSphere:G.boundingSphere,boundingSphereVisible:G.boundingSphereVisible,get notifyDidDraw(){return ne},set notifyDidDraw(e){ne=e},didDraw:T,commited:M,reprCount:j,resized:je,setProps:function(e,t){var r,n,a;void 0===t&&(t=!1);var i="function"==typeof e?Object(P.b)(xe(),e):e,o=Object.create(null);if(i.camera&&void 0!==i.camera.mode&&i.camera.mode!==q.state.mode&&(o.mode=i.camera.mode),void 0!==i.cameraFog&&i.cameraFog.params){var s="on"===i.cameraFog.name?i.cameraFog.params.intensity:0;s!==q.state.fog&&(o.fog=s)}if(void 0!==i.cameraClipping&&(void 0!==i.cameraClipping.far&&i.cameraClipping.far!==q.state.clipFar&&(o.clipFar=i.cameraClipping.far),void 0!==i.cameraClipping.radius)){var u=G.boundingSphere.radius/100*(100-i.cameraClipping.radius);u>0&&u!==o.radius&&(o.radius=Math.max(u,.01))}(Object.keys(o).length>0&&q.setState(o),(null===(r=i.camera)||void 0===r?void 0:r.helper)&&K.camera.setProps(i.camera.helper),void 0!==(null===(n=i.camera)||void 0===n?void 0:n.manualReset)&&(f.camera.manualReset=i.camera.manualReset),void 0!==(null===(a=i.camera)||void 0===a?void 0:a.stereo)&&Object.assign(f.camera.stereo,i.camera.stereo),void 0!==i.cameraResetDurationMs&&(f.cameraResetDurationMs=i.cameraResetDurationMs),void 0!==i.transparentBackground&&(f.transparentBackground=i.transparentBackground),void 0!==i.viewport)&&(f.viewport===i.viewport||f.viewport.name===i.viewport.name&&Object(D.k)(f.viewport.params,i.viewport.params)||(f.viewport=i.viewport,_e(),we()));i.postprocessing&&Object.assign(f.postprocessing,i.postprocessing),i.multiSample&&Object.assign(f.multiSample,i.multiSample),i.renderer&&Y.setProps(i.renderer),i.trackball&&X.setProps(i.trackball),i.debug&&K.debug.setProps(i.debug),i.handle&&K.handle.setProps(i.handle),"orthographic"===o.mode&&(f.camera.stereo.name="off"),t||le(!0)},getImagePass:function(e){return void 0===e&&(e={}),new w.a(r,Y,G,q,K,a.draw.wboitEnabled,e)},getRenderObjects:function(){var e=[];return G.forEach((function(t,r){return e.push(r)})),e},get props(){return xe()},get input(){return n},get stats(){return Y.stats},get interaction(){return Z.events},dispose:function(){Oe.unsubscribe(),G.clear(),K.debug.clear(),X.dispose(),Y.dispose(),Z.dispose()}};function _e(){var e=z,t=U,n=V,a=H;"canvas"===f.viewport.name?(z=0,U=0,V=R.drawingBufferWidth,H=R.drawingBufferHeight):"static-frame"===f.viewport.name?(z=f.viewport.params.x*r.pixelRatio,H=f.viewport.params.height*r.pixelRatio,U=R.drawingBufferHeight-H-f.viewport.params.y*r.pixelRatio,V=f.viewport.params.width*r.pixelRatio):"relative-frame"===f.viewport.name&&(z=Math.round(f.viewport.params.x*R.drawingBufferWidth),H=Math.round(f.viewport.params.height*R.drawingBufferHeight),U=Math.round(R.drawingBufferHeight-H-f.viewport.params.y*R.drawingBufferHeight),V=Math.round(f.viewport.params.width*R.drawingBufferWidth)),e===z&&t===U&&n===V&&a===H||(ie=!0)}function we(){Q.setViewport(z,U,V,H),Y.setViewport(z,U,V,H),p.a.set(q.viewport,z,U,V,H),p.a.set(X.viewport,z,U,V,H)}}}(L||(L={}))}).call(this,r(820).setImmediate,r(820).clearImmediate)},function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(728),a=r(635);function i(e,t,r){return void 0===t&&(t=""),void 0===r&&(r=""),i.create(e,t,r)}!function(e){function t(e){return e.triggers.map(r.format).join(" or ")}function r(e,t){return r.create(e,t)}e.create=function(e,t,r){return void 0===t&&(t=""),void 0===r&&(r=""),{triggers:e,action:t,description:r}},e.Empty={triggers:[],action:"",description:""},e.isEmpty=function(e){return 0===e.triggers.length||e.triggers.every((function(e){return void 0===e.buttons&&void 0===e.modifiers}))},e.match=function(e,t,n){return e.triggers.some((function(e){return r.match(e,t,n)}))},e.formatTriggers=t,e.format=function(e,r){void 0===r&&(r="");var n=e.description||Object(a.d)(r);return Object(a.c)(n,{triggers:""+t(e)+""})},e.Trigger=r,function(e){e.create=function(e,t){return{buttons:e,modifiers:t}},e.Empty={},e.match=function(e,t,r){var a=e.buttons,i=e.modifiers;return void 0!==a&&(a===t||n.a.has(a,t))&&(!i||n.c.areEqual(i,r))},e.format=function(e){var t=[],r=function(e){var t=[];void 0===e?t.push("any mouse button"):0===e?t.push("mouse hover"):(o.has(e,1)&&t.push("left mouse button"),o.has(e,2)&&t.push("right mouse button"),o.has(e,4)&&t.push("wheel/middle mouse button"),o.has(e,8)&&t.push("three fingers"));return t.join(" + ")}(e.buttons);r&&t.push(r);var n=function(e,t){var r=[];e?(e.alt&&r.push("alt key"),e.control&&r.push("control key"),e.meta&&r.push("meta/command key"),e.shift&&r.push("shift key"),t&&0===r.length&&r.push("no key")):t&&r.push("any key");return r.join(" + ")}(e.modifiers);return n&&t.push(n),t.join(" + ")}}(r=e.Trigger||(e.Trigger={}))}(i||(i={}));var o=n.a},function(e,t,r){"use strict";r.d(t,"b",(function(){return O})),r.d(t,"a",(function(){return j})),r.d(t,"c",(function(){return S}));var n=r(572),a=r(722),i=r(747),o=r(716),s=r(658),u=r(589),c=r(602),l=r(850),d=r(578),p=r(574),f=r(584),h=r(644),m=r(741),g=r(610),b=r(626),v=r(573),y=r(810),x=Object(n.a)(Object(n.a)({},u.a.Params),{alpha:Object(n.a)(Object(n.a)({},u.a.Params.alpha),{defaultValue:.51}),ignoreLight:Object(n.a)(Object(n.a)({},u.a.Params.ignoreLight),{defaultValue:!0}),colorX:v.a.Color(g.a.red,{isEssential:!0}),colorY:v.a.Color(g.a.green,{isEssential:!0}),colorZ:v.a.Color(g.a.blue,{isEssential:!0}),scale:v.a.Numeric(.33,{min:.1,max:2,step:.1},{isEssential:!0})}),O={axes:v.a.MappedStatic("on",{on:v.a.Group(x),off:v.a.Group({})},{cycle:!0,description:"Show camera orientation axes"})},j=function(){function e(e,t){var r=this;void 0===t&&(t={}),this.webgl=e,this.props={axes:{name:"off",params:{}}},this.eachGroup=function(e,t){if(!r.renderObject)return!1;if(!S(e))return!1;for(var n=!1,a=r.renderObject.values.uGroupCount.ref.value,o=0,s=e.elements;o=0)e.ctx.managers.interactivity.lociHighlights.highlightOnly({repr:n.repr,loci:f.b});else{var o=!1;d.a.match(e.params.bindings.hoverHighlightOnly,a,i)&&(e.ctx.managers.interactivity.lociHighlights.highlightOnly({loci:n.loci}),o=!0),d.a.match(e.params.bindings.hoverHighlightOnlyExtend,a,i)&&(e.ctx.managers.interactivity.lociHighlights.highlightOnlyExtend({loci:n.loci}),o=!0),o||e.ctx.managers.interactivity.lociHighlights.highlightOnly({repr:n.repr,loci:f.b})}})),this.ctx.managers.interactivity.lociHighlights.addProvider(this.lociMarkProvider)},t.prototype.unregister=function(){this.ctx.managers.interactivity.lociHighlights.removeProvider(this.lociMarkProvider)},t}(s.a.Handler),params:function(){return y},display:{name:"Highlight Loci on Canvas"}}),O={clickSelect:d.a.Empty,clickToggleExtend:Object(d.a)([b(1,g.create({shift:!0}))],"Toggle extended selection","${triggers} to extend selection along polymer"),clickSelectOnly:d.a.Empty,clickToggle:Object(d.a)([b(1,g.create())],"Toggle selection","${triggers} on element"),clickDeselect:d.a.Empty,clickDeselectAllOnEmpty:Object(d.a)([b(1,g.create())],"Deselect all","Click on nothing using ${triggers}")},j={bindings:p.a.Value(O,{isHidden:!0}),ignore:p.a.Value([],{isHidden:!0}),mark:p.a.Boolean(!0)},S=s.a.create({name:"representation-select-loci",category:"interaction",ctor:function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.lociMarkProvider=function(e,t){n.ctx.canvas3d&&n.params.mark&&n.ctx.canvas3d.mark({loci:e.loci},t)},n.spine=new u.a.Impl(t.state.data.cells),n}return Object(n.c)(t,e),t.prototype.applySelectMark=function(e,t){var r=this.ctx.state.data.cells.get(e);if(r&&i.a.isRepresentation3D(r.obj)){this.spine.current=r;var n=this.spine.getRootOfType(i.a.Molecule.Structure);if(n){t&&this.lociMarkProvider({loci:h.g.Loci(n.data)},a.a.Deselect);var o=this.ctx.managers.structure.selection.getLoci(n.data);this.lociMarkProvider({loci:o},a.a.Select)}}},t.prototype.register=function(){var e=this,t=function(e){return!f.d.isEmpty(e.loci)},r=[["clickSelect",function(t){return e.ctx.managers.interactivity.lociSelects.select(t)},t],["clickToggle",function(t){return e.ctx.managers.interactivity.lociSelects.toggle(t)},t],["clickToggleExtend",function(t){return e.ctx.managers.interactivity.lociSelects.toggleExtend(t)},t],["clickSelectOnly",function(t){return e.ctx.managers.interactivity.lociSelects.selectOnly(t)},t],["clickDeselect",function(t){return e.ctx.managers.interactivity.lociSelects.deselect(t)},t],["clickDeselectAllOnEmpty",function(){return e.ctx.managers.interactivity.lociSelects.deselectAll()},function(e){return f.d.isEmpty(e.loci)}]];r.sort((function(t,r){var n=e.params.bindings[t[0]],a=e.params.bindings[r[0]],i=0===n.triggers.length?0:Object(m.e)(n.triggers.map((function(e){return g.size(e.modifiers)})));return(0===a.triggers.length?0:Object(m.e)(a.triggers.map((function(e){return g.size(e.modifiers)}))))-i})),this.subscribeObservable(this.ctx.behaviors.interaction.click,(function(t){var n,a=t.current,i=t.button,o=t.modifiers;if(e.ctx.canvas3d&&!e.ctx.isBusy&&e.ctx.selectionMode&&!((null===(n=e.params.ignore)||void 0===n?void 0:n.indexOf(a.loci.kind))>=0))for(var s=0,u=r;s")},group:function(e){return e.toString().replace(/Model [0-9]+/g,"Models")},priority:100}}return e.prototype.register=function(){this.ctx.managers.lociLabels.addProvider(this.f)},e.prototype.unregister=function(){this.ctx.managers.lociLabels.removeProvider(this.f)},e}(),display:{name:"Provide Default Loci Label"}}),w={clickFocus:Object(d.a)([b(1,g.create())],"Representation Focus","Click element using ${triggers}"),clickFocusAdd:Object(d.a)([b(1,g.create({shift:!0}))],"Representation Focus Add","Click element using ${triggers}"),clickFocusSelectMode:Object(d.a)([],"Representation Focus","Click element using ${triggers}"),clickFocusAddSelectMode:Object(d.a)([],"Representation Focus Add","Click element using ${triggers}")},C={bindings:p.a.Value(w,{isHidden:!0})},A=s.a.create({name:"representation-focus-loci",category:"interaction",ctor:function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.c)(t,e),t.prototype.register=function(){var e=this;this.subscribeObservable(this.ctx.behaviors.interaction.click,(function(t){var r,n=t.current,a=t.button,i=t.modifiers,o=e.params.bindings,s=o.clickFocus,u=o.clickFocusAdd,c=o.clickFocusSelectMode,l=o.clickFocusAddSelectMode,p=e.ctx.managers.interactivity.props.granularity;if("residue"===p||"element"===p){var h=e.ctx.selectionMode?c:s,m=d.a.match(h,a,i),g=e.ctx.selectionMode?l:u,b=d.a.match(g,a,i);if(m||b){var v=f.d.normalize(n.loci,"residue"),y=e.ctx.managers.structure.focus.current;if(y&&f.d.areEqual(y.loci,v))e.ctx.managers.structure.focus.clear();else if(m)e.ctx.managers.structure.focus.setFromLoci(v);else{e.ctx.managers.structure.focus.addFromLoci(v);var x=null===(r=e.ctx.managers.structure.focus.current)||void 0===r?void 0:r.loci;x&&e.ctx.managers.camera.focusLoci(x)}}}}))},t}(s.a.Handler),params:function(){return C},display:{name:"Representation Focus Loci on Canvas"}})},function(e,t,r){"use strict";r.r(t),r.d(t,"StructureRepresentation3D",(function(){return tr})),r.d(t,"ExplodeStructureRepresentation3D",(function(){return nr})),r.d(t,"SpinStructureRepresentation3D",(function(){return ar})),r.d(t,"UnwindStructureAssemblyRepresentation3D",(function(){return rr})),r.d(t,"OverpaintStructureRepresentation3DFromScript",(function(){return ir})),r.d(t,"OverpaintStructureRepresentation3DFromBundle",(function(){return or})),r.d(t,"TransparencyStructureRepresentation3DFromScript",(function(){return sr})),r.d(t,"TransparencyStructureRepresentation3DFromBundle",(function(){return ur})),r.d(t,"ClippingStructureRepresentation3DFromScript",(function(){return cr})),r.d(t,"ClippingStructureRepresentation3DFromBundle",(function(){return lr})),r.d(t,"VolumeRepresentation3D",(function(){return dr})),r.d(t,"VolumeRepresentation3DHelpers",(function(){return Kt})),r.d(t,"ShapeRepresentation3D",(function(){return pr})),r.d(t,"ModelUnitcell3D",(function(){return fr})),r.d(t,"StructureBoundingBox3D",(function(){return hr})),r.d(t,"StructureSelectionsDistance3D",(function(){return mr})),r.d(t,"StructureSelectionsAngle3D",(function(){return gr})),r.d(t,"StructureSelectionsDihedral3D",(function(){return br})),r.d(t,"StructureSelectionsLabel3D",(function(){return vr})),r.d(t,"StructureSelectionsOrientation3D",(function(){return yr}));var n=r(572),a=r(575),i=r(649),o=r(582),s=r(579),u=r(679),c=r(573),l=r(592),d=r(610),p=r(726),f=r(591),h=r(644),m=r(1100),g=r(714),b=r(764),v=r(667),y=r(626),x=r(577),O=r(657),j=r(709),S=r(584),_=r(576),w=r(741),C=r(627);function A(e,t,r){void 0===r&&(r={});var a,i,o,l,d=0,A=new m.a,E=f.a.createState(),P=Object(g.c)(),T=[],I=u.a.createEmpty(),k=c.a.getDefaultValues(t.Params);r.modifyState&&f.a.updateState(E,r.modifyState(E));var M=b.a.create();function D(e,t){return Object(S.g)(e)||h.a.isLoci(e)&&e.shape===i?t(_.b.ofBounds(0,i.groupCount*i.transforms.length)):function(e,t,r){if(!h.b.isLoci(e))return!1;if(e.shape!==t)return!1;for(var n=!1,a=t.groupCount,i=e.groups,o=0,s=i;o=x)){var _=o.f.indexOf(e.elements,x);if(!(_<0||m&&"H"===n.value(x))){var w=i.distance[v];(-1===w||void 0===w||Object(O.b)(C(e,h,x),w,.5))&&(c[c.length]=f,l[l.length]=_,p[p.length]=i.order[v],d[d.length]=i.flag[v])}}}return S(c,l,p,d,a,!1)}(e):function(e,t){for(var r=e.model.atomicConformation,n=r.x,a=r.y,i=r.z,s=e.elements.length,u=e.elements,c=e.residueIndex,l=e.chainIndex,d=e.model.atomicHierarchy.atoms,p=d.type_symbol,f=d.label_atom_id,h=d.label_alt_id,b=d.label_comp_id,x=e.model.atomicHierarchy.residues.label_seq_id,O=e.model.atomicHierarchy.index,j=e.model.sequence.byEntityKey,_=e.lookup3d,w=y.a.Provider.get(e.model),C=v.a.Provider.get(e.model),E=y.a.isExhaustive(e.model),P=[],T=[],I=[],k=[],M=-1,D=void 0,R=!0,B=!0,L=!0,N=A,F=0;F0?je:me<0?ue:(ue+Object(m.e)(me))/1.95)){P[P.length]=F,T[T.length]=pe,k[k.length]=Object(g.b)(J,te,f.value(fe)),I[I.length]=32|(be?2:1);var Se=x.value(ve);Z===Se&&(B=!1),Math.abs(Z-Se)>1&&(L=!1)}}}}}}}}}}return S(P,T,k,I,s,R||B&&L)}(e,r)}var P=r(695),T=r(746),I=Object(x.g)(),k=Object(x.g)();function M(e,t,r,n){return e.conformation.position(t,I),r.conformation.position(n,k),x.g.distance(I,k)}var D,R=Object(x.c)(),B=Object(x.g)();function L(e,t){var r=new d.a.Builder;if(t.noCompute||e.isCoarseGrained)return new h(r.getMap());var n=1===e.models.length&&b.a.Provider.get(e.model);if(n){for(var a=n.edgeProps.distance,i=!1,s=0,u=a.length;sK))if(r.forceCompute||!z){var J=r.forceCompute?void 0:F&&F.byAtomIndex.get(Z);if(J&&J.length){for(var $=!1,ee=0,te=J;ee4||(n.add(Q,De,{order:re.order,flag:re.flags}),$=!0))}if($)continue}if(!H){var oe=D.value(Z),se=t.lookup3d.find(B[0],B[1],B[2],4),ue=se.indices,ce=se.count,le=se.squaredDistances;if(0!==ce)for(var de=Object(m.c)(v.value(Z)),pe=Object(m.f)(de),fe=Object(m.e)(de),he=j.value(Z),me=m.b.has(de),ge=S.value(Z),be=_.value(i[Z]),ve=0;ve0?_e:xe<0?fe:(fe+Object(m.e)(xe))/1.95)){var we=E.value(Re),Ce=P.value(p[Re]);n.add(Q,De,{order:Object(g.a)(be,Ce,ge,we),flag:32|(je?2:1)})}}}}}}}else for(var Ae=z.edgeProps,Ee=Ae.order,Pe=Ae.distance,Te=Ae.flag,Ie=U.value(Z),ke=z.offset[Ie],Me=z.offset[Ie+1];ket[1](e)})),f(a.a.core.rel.gre,(function(e,t){return t[0](e)>=t[1](e)})),f(a.a.core.rel.inRange,(function(e,t){var r=t[0](e);return r>=t[1](e)&&r<=t[2](e)})),f(a.a.core.math.add,(function(e,t){var r=0;if("number"==typeof t.length)for(var n=0,a=t.length;n(t=Math.abs(t))?(t/=e,e*Math.sqrt(1+t*t)):t>0?(e/=t,t*Math.sqrt(1+e*e)):0}function s(e,t,r,a){var s=0,u=0,c=e.rows,l=e.cols,d=c,p=l;d>16)?D:-D,e[l*t+p]=M;for(f=0;f<2;f++)for(d=0;d0?S>n&&(n=S):S>s&&(s=S),a.a.projectPointOnVector(h,a.a.fromArray(h,e,x),v,g);var _=a.a.dot(v,a.a.normalize(m,a.a.sub(m,h,g))),w=a.a.distance(h,g);_>0?w>l&&(l=w):w>d&&(d=w),a.a.projectPointOnVector(h,a.a.fromArray(h,e,x),y,g);var C=a.a.dot(y,a.a.normalize(m,a.a.sub(m,h,g))),A=a.a.distance(h,g);C>0?A>p&&(p=A):A>f&&(f=A)}var E=a.a.setMagnitude(Object(a.a)(),b,(n+s)/2),P=a.a.setMagnitude(Object(a.a)(),v,(l+d)/2),T=a.a.setMagnitude(Object(a.a)(),y,(p+f)/2),I=Object(a.a)(),k=function(e,t,n){a.a.copy(r,g),a.a.scaleAndAdd(r,r,b,e),a.a.scaleAndAdd(r,r,v,t),a.a.scaleAndAdd(r,r,y,n),a.a.add(I,I,r)};return k(n,l,p),k(n,l,-f),k(n,-d,-f),k(n,-d,p),k(-s,-d,-f),k(-s,-d,p),k(-s,l,p),k(-s,l,-f),a.a.scale(I,I,1/8),c.a.create(I,E,P,T)}e.calculateBoxAxes=l}(u||(u={}))},function(e,t,r){"use strict";r.d(t,"a",(function(){return S}));var n=r(572),a=r(573),i=r(575),o=r(840),s=r(841),u=r(711),c=r(627),l=r(576),d=r(586),p=new i.b.ElementBondIterator,f=new i.b.ElementBondIterator;var h=new i.b.ElementBondIterator,m=new i.b.ElementBondIterator;function g(e,t,r,n){var a=Object(u.d)(e,t,r,"H"),i=Object(u.i)(t,r),l=Object(u.h)(t,r),g="always"===n.assignCharge||"auto"===n.assignCharge&&0===l,b="always"===n.assignH||"auto"===n.assignH&&0===a,v=Object(u.c)(e,t,r),y=function(e,t,r){for(var n=0,a=t.bonds,i=a.offset,o=a.edgeProps,s=o.flags,u=o.order,c=i[r],l=i[r+1];c1)return!0;if(a){var o=Object(u.i)(i.otherUnit,i.otherIndex);for(f.setElement(e,i.otherUnit,i.otherIndex);f.hasNext;){var s=f.move();if(s.order>1){if(("P"===o||"S"===o)&&"O"===Object(u.i)(s.otherUnit,s.otherIndex))continue;return!0}}}}return!1}(e,t,r),O=y-v>0,j=0,S=8;switch(i){case"H":g&&(0===v?(l=1,S=0):1===v&&(l=0,S=1));break;case"C":g&&(l=0),b&&(j=Math.max(0,4-y-Math.abs(l))),S=Object(s.b)(v+j+Math.max(0,-l));break;case"N":if(g)if(b)if(x&&y<4)l=v-a==1&&y-a==2?1:0;else for(h.setElement(e,t,r);h.hasNext;){var _=h.move(),w=Object(u.i)(_.otherUnit,_.otherIndex);if("S"===w||Object(o.c)(w)){l=0;break}l=1}else l=y-3;b&&(j=Math.max(0,3-y+l)),S=x&&!O?Object(s.b)(v+j-l):Object(s.b)(v+j+1-l);break;case"O":if(g&&(b||(l=y-2),1===y)){h.setElement(e,t,r);e:for(;h.hasNext;){var C=h.move();for(m.setElement(e,C.otherUnit,C.otherIndex);m.hasNext;){var A=m.move();if((A.otherUnit!==t||A.otherIndex!==r)&&"O"===Object(u.i)(A.otherUnit,A.otherIndex)&&2===A.order){l=-1;break e}}}}b&&(j=Math.max(0,2-y+l)),S=x&&!O?Object(s.b)(v+j-l+1):Object(s.b)(v+j-l+2);break;case"S":g&&(b||(l=y<=3&&0===Object(u.d)(e,t,r,"O")?y-2:0)),b&&y<2&&(j=Math.max(0,2-y+l)),y<=3&&(S=Object(s.b)(v+j-l+2));break;case"F":case"CL":case"BR":case"I":case"AT":g&&(l=y-1);break;case"LI":case"NA":case"K":case"RB":case"CS":case"FR":g&&(l=1-y);break;case"BE":case"MG":case"CA":case"SR":case"BA":case"RA":g&&(l=2-y);break;default:c.a&&console.warn("Requested charge, protonation for an unhandled element",i)}return[l,j,j+a,S]}function b(e,t,r){var n,a=t.elements.length,i=new Int8Array(a),o=new Int8Array(a),s=new Int8Array(a),u=new Int8Array(a),c=!!e.parent;if(c){var d=e.root.unitMap.get(t.id);if((n=l.f.indicesOf(d.elements,t.elements)).length!==t.elements.length)throw new Error("expected to find an index for every element");t=d,e=e.root}for(var p=0;p0)&&d.copySnapshot(this._source,this.camera.state),this.inTransition||d.copySnapshot(this._target,this.camera.state),d.copySnapshot(this._target,t),this._target.radius>this._target.radiusMax&&(this._target.radius=this._target.radiusMax),this._target.radius<.01&&(this._target.radius=.01),this._target.radiusMax<.01&&(this._target.radiusMax=.01),!this.inTransition&&r<=0||void 0!==t.mode&&t.mode!==this.camera.state.mode?this.finish(this._target):(this.inTransition=!0,this.func=n||e.defaultTransition,(!this.inTransition||r>0)&&(this.start=this.t,this.durationMs=r))},e.prototype.tick=function(e){this.t=e,this.update()},e.prototype.finish=function(e){d.copySnapshot(this.camera.state,e),this.inTransition=!1},e.prototype.update=function(){if(this.inTransition){var e=Math.min((this.t-this.start)/this.durationMs,1);1!==e?(this.func(this._current,e,this._source,this._target),d.copySnapshot(this.camera.state,this._current)):this.finish(this._target)}},e}();n=u||(u={}),a=i.d.identity(),n.defaultTransition=function(e,t,r,n){d.copySnapshot(e,n),i.d.slerp(a,i.d.Identity,i.d.rotationTo(a,r.up,n.up),t),i.g.transformQuat(e.up,r.up,a),i.g.lerp(e.target,r.target,n.target,t),i.g.lerp(e.position,r.position,n.position,t),e.radius=Object(s.b)(r.radius,n.radius,t),e.radiusMax=Object(s.b)(r.radiusMax,n.radiusMax,t),e.fov=Object(s.b)(r.fov,n.fov,t),e.fog=Object(s.b)(r.fog,n.fog,t)};var c,l=r(1105),d=function(){function e(t,r,n){void 0===r&&(r=o.a.create(0,0,128,128)),void 0===n&&(n={}),this.view=i.c.identity(),this.projection=i.c.identity(),this.projectionView=i.c.identity(),this.inverseProjectionView=i.c.identity(),this.state=e.createDefaultSnapshot(),this.viewOffset=e.ViewOffset(),this.near=1,this.far=1e4,this.fogNear=5e3,this.fogFar=1e4,this.zoom=1,this.transition=new u(this),this.stateChanged=new l.a(this.state),this.prevProjection=i.c.identity(),this.prevView=i.c.identity(),this.deltaDirection=Object(i.g)(),this.newPosition=Object(i.g)(),this.viewport=r,this.pixelScale=n.pixelScale||1,e.copySnapshot(this.state,t)}return Object.defineProperty(e.prototype,"pixelRatio",{get:function(){return("undefined"!=typeof window?window.devicePixelRatio:1)*this.pixelScale},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"position",{get:function(){return this.state.position},set:function(e){i.g.copy(this.state.position,e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"up",{get:function(){return this.state.up},set:function(e){i.g.copy(this.state.up,e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"target",{get:function(){return this.state.target},set:function(e){i.g.copy(this.state.target,e)},enumerable:!1,configurable:!0}),e.prototype.update=function(){var e=this.state;if(0===e.radiusMax)return!1;var t=2*Math.tan(e.fov/2)*i.g.distance(e.position,e.target);switch(this.zoom=this.viewport.height/t,function(e){var t=e.state,r=t.radius,n=t.radiusMax,a=(t.mode,t.fog),o=t.clipFar;r<.01&&(r=.01);var s=o?r:n,u=i.g.distance(e.position,e.target),c=u-r,l=u+s,d=u-s*(-(50-a)/50),p=l;c=Math.max(Math.min(n,5),c),l=Math.max(5,l);c===l&&(l=c+.01);e.near=c,e.far=2*l,e.fogNear=d,e.fogFar=p}(this),this.state.mode){case"orthographic":!function(e){var t=e.viewport,r=e.zoom,n=e.near,a=e.far,o=e.viewOffset,s=-t.width/2,u=t.width/2,c=t.height/2,l=-t.height/2,d=(u-s)/(2*r),p=(c-l)/(2*r),f=(u+s)/2,h=(c+l)/2,m=f-d,g=f+d,b=h+p,v=h-p;if(o.enabled){var y=r/(o.width/o.fullWidth),x=r/(o.height/o.fullHeight),O=(u-s)/o.width,j=(c-l)/o.height;m+=O*(o.offsetX/y),g=m+O*(o.width/y),b-=j*(o.offsetY/x),v=b-j*(o.height/x)}i.c.ortho(e.projection,m,g,b,v,n,a),i.c.lookAt(e.view,e.position,e.target,e.up)}(this);break;case"perspective":!function(e){var t=e.viewport.width/e.viewport.height,r=e.near,n=e.far,a=e.viewOffset,o=r*Math.tan(.5*e.state.fov),s=2*o,u=t*s,c=-.5*u;a.enabled&&(c+=a.offsetX*u/a.fullWidth,o-=a.offsetY*s/a.fullHeight,u*=a.width/a.fullWidth,s*=a.height/a.fullHeight);i.c.perspective(e.projection,c,c+u,o,o-s,r,n),i.c.lookAt(e.view,e.position,e.target,e.up)}(this);break;default:throw new Error("unknown camera mode")}var r=!i.c.areEqual(this.projection,this.prevProjection,i.a)||!i.c.areEqual(this.view,this.prevView,i.a);if(r){if(i.c.mul(this.projectionView,this.projection,this.view),!i.c.tryInvert(this.inverseProjectionView,this.projectionView))return i.c.copy(this.view,this.prevView),i.c.copy(this.projection,this.prevProjection),i.c.mul(this.projectionView,this.projection,this.view),!1;i.c.copy(this.prevView,this.view),i.c.copy(this.prevProjection,this.projection)}return r},e.prototype.setState=function(e,t){this.transition.apply(e,t),this.stateChanged.next(e)},e.prototype.getSnapshot=function(){return e.copySnapshot(e.createDefaultSnapshot(),this.state)},e.prototype.getTargetDistance=function(t){return e.targetDistance(t,this.state.fov,this.viewport.width,this.viewport.height)},e.prototype.getFocus=function(t,r,n,a){var o=Math.max(r,.01),s=this.getTargetDistance(o);i.g.sub(this.deltaDirection,this.target,this.position),a&&i.g.matchDirection(this.deltaDirection,a,this.deltaDirection),i.g.setMagnitude(this.deltaDirection,this.deltaDirection,s),i.g.sub(this.newPosition,t,this.deltaDirection);var u=e.copySnapshot(e.createDefaultSnapshot(),this.state);return u.target=i.g.clone(t),u.radius=o,u.position=i.g.clone(this.newPosition),n&&i.g.matchDirection(u.up,n,u.up),u},e.prototype.getInvariantFocus=function(t,r,n,a){var o=Math.max(r,.01),s=this.getTargetDistance(o);i.g.copy(this.deltaDirection,a),i.g.setMagnitude(this.deltaDirection,this.deltaDirection,s),i.g.sub(this.newPosition,t,this.deltaDirection);var u=e.copySnapshot(e.createDefaultSnapshot(),this.state);return u.target=i.g.clone(t),u.radius=o,u.position=i.g.clone(this.newPosition),i.g.copy(u.up,n),u},e.prototype.focus=function(e,t,r,n,a){t>0&&this.setState(this.getFocus(e,t,n,a),r)},e.prototype.project=function(e,t){return Object(o.b)(e,t,this.viewport,this.projectionView)},e.prototype.unproject=function(e,t){return Object(o.c)(e,t,this.viewport,this.inverseProjectionView)},e}();(c=d||(d={})).ViewOffset=function(){return{enabled:!1,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}},c.setViewOffset=function(e,t,r,n,a,i,o){e.fullWidth=t,e.fullHeight=r,e.offsetX=n,e.offsetY=a,e.width=i,e.height=o},c.copyViewOffset=function(e,t){e.enabled=t.enabled,e.fullWidth=t.fullWidth,e.fullHeight=t.fullHeight,e.offsetX=t.offsetX,e.offsetY=t.offsetY,e.width=t.width,e.height=t.height},c.targetDistance=function(e,t,r,n){var a=Math.max(e,.01),i=n=0&&i>=0&&u>=0&&(++l,s.a.add3(o,a,i,u))},get:function(){var e=s.a.compact(n,!0),r=s.a.compact(a,!0),d=s.a.compact(o,!0),p=s.a.compact(i,!0);return u.a.create(e,d,r,p,c,l,t)}}}(f,t),[4,new h(a,m,r).run()];case 1:return n.sent(),[2,m.get()]}}))}))}))}function f(e,t){var r=this;return a.b.create("Marching Cubes Lines",(function(a){return Object(n.b)(r,void 0,void 0,(function(){var r,u,p,f,m,g,b;return Object(n.d)(this,(function(n){switch(n.label){case 0:return r=l(e),u=d(r),p=u.dX,f=u.dY,m=u.dZ,g=Math.min(262144,Math.max(p*f*m/32,1024)),b=function(e,t){var r=s.a.create(Float32Array,3,e),n=s.a.create(Float32Array,1,e),a=s.a.create(Float32Array,2,e),u=0;return{addVertex:function(e,t,n){return s.a.add3(r,e,t,n)},addNormal:function(){return o.j},addGroup:function(e){s.a.add(n,e)},addTriangle:function(e,t,r,n,o){var c=e[t],l=e[r],d=e[n];c>=0&&l>=0&&d>=0&&(i.a[t][r]&o&&(++u,s.a.add2(a,e[t],e[r])),i.a[r][n]&o&&(++u,s.a.add2(a,e[r],e[n])),i.a[t][n]&o&&(++u,s.a.add2(a,e[t],e[n])))},get:function(){for(var e=s.a.compact(r,!0),i=s.a.compact(a,!0),o=s.a.compact(n,!0),l=c.a.create(u,u/10,t),d=0;d0)return n-1;var a=this.scalarField,o=this.scalarFieldGet,s=i.b[e],u=s.a,c=s.b,l=u.i+this.i,d=u.j+this.j,p=u.k+this.k,f=c.i+this.i,h=c.j+this.j,m=c.k+this.k,g=o(a,l,d,p),b=o(a,f,h,m),v=(this.isoLevel-g)/(g-b);if(this.idField){var y=this.idFieldGet(this.idField,l,d,p),x=this.idFieldGet(this.idField,f,h,m),O=v<.5?y:x;if(-1===O&&(O=v<.5?x:y),-2===O)return-1;this.builder.addGroup(O)}else this.builder.addGroup(0);var j=this.builder.addVertex(l+v*(l-f),d+v*(d-h),p+v*(p-m));this.verticesOnEdges[r]=j+1;var S=o(a,Math.max(0,l-1),d,p)-o(a,Math.min(this.nX-1,l+1),d,p),_=o(a,l,Math.max(0,d-1),p)-o(a,l,Math.min(this.nY-1,d+1),p),w=o(a,l,d,Math.max(0,p-1))-o(a,l,d,Math.min(this.nZ,p+1)),C=S+v*(S-(o(a,Math.max(0,f-1),h,m)-o(a,Math.min(this.nX-1,f+1),h,m))),A=_+v*(_-(o(a,f,Math.max(0,h-1),m)-o(a,f,Math.min(this.nY-1,h+1),m))),E=w+v*(w-(o(a,f,h,Math.max(0,m-1))-o(a,f,h,Math.min(this.nZ-1,m+1))));return this.isoLevel>=0?this.builder.addNormal(C,A,E):this.builder.addNormal(-C,-A,-E),j},e.prototype.get=function(e,t,r){return this.scalarFieldGet(this.scalarField,e,t,r)},e.prototype.processCell=function(e,t,r,n){var a=0;if(this.get(e,t,r)0&&(this.vertList[0]=this.interpolate(0)),(2&o)>0&&(this.vertList[1]=this.interpolate(1)),(4&o)>0&&(this.vertList[2]=this.interpolate(2)),(8&o)>0&&(this.vertList[3]=this.interpolate(3)),(16&o)>0&&(this.vertList[4]=this.interpolate(4)),(32&o)>0&&(this.vertList[5]=this.interpolate(5)),(64&o)>0&&(this.vertList[6]=this.interpolate(6)),(128&o)>0&&(this.vertList[7]=this.interpolate(7)),(256&o)>0&&(this.vertList[8]=this.interpolate(8)),(512&o)>0&&(this.vertList[9]=this.interpolate(9)),(1024&o)>0&&(this.vertList[10]=this.interpolate(10)),(2048&o)>0&&(this.vertList[11]=this.interpolate(11));for(var s=i.e[a],u=0;u=0?this.builder.addTriangle(this.vertList,c,l,d,n):this.builder.addTriangle(this.vertList,d,l,c,n)}}},e}()},,,,function(e,t,r){"use strict";function n(e,t,r){return e[t]-e[r]}function a(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function i(e,t,r,n){var a=r+n>>1;return t(e,r,n)>0?t(e,r,a)>0?t(e,a,n)>0?a:n:r:t(e,n,a)>0?t(e,a,r)>0?a:r:n}function o(e,t,r){var n=e.cmp,a=e.swap,o=e.data,s=e.parts,u=t+1,c=r;for(a(o,t,i(o,n,t,r));n(o,c,t)>0;)--c;for(var l=t+1;l<=c;l++){var d=n(o,l,t);if(d>0){for(a(o,l,c),--c;n(o,c,t)>0;)--c;l--}else 0===d&&(a(o,l,u),u++)}for(l=t;l=t&&a(n,s,s+1)>0;)i(n,s,s+1),s-=1}function u(e,t,r){for(var n=e.parts;tc;)--u;for(var l=r+1;l<=u;l++){var d=e[l];if(d>c){for(a(e,l,u),--u;e[u]>c;)--u;l--}else d===c&&(a(e,l,s),++s)}for(l=r;l=t&&e[i]>a;)e[i+1]=e[i],i-=1;e[i+1]=a}}function d(e,t){return void 0===t&&(t=n),function(e,t,r,i){void 0===i&&(i=n);i===n?function e(t,r,n,a){for(;nr)return!1;return!0}function u(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e}function c(e,t){if(e===t){var r=t[1],n=t[2],a=t[5];e[1]=t[3],e[2]=t[6],e[3]=r,e[5]=t[7],e[6]=n,e[7]=a}else e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8];return e}function l(e,t){var r=t[0],n=t[1],a=t[2],i=t[3],o=t[4],s=t[5],u=t[6],c=t[7],l=t[8],d=l*o-s*c,p=-l*i+s*u,f=c*i-o*u,h=r*d+n*p+a*f;return h?(h=1/h,e[0]=d*h,e[1]=(-l*n+a*c)*h,e[2]=(s*n-a*o)*h,e[3]=p*h,e[4]=(l*r-a*u)*h,e[5]=(-s*r+a*i)*h,e[6]=f*h,e[7]=(-c*r+n*u)*h,e[8]=(o*r-n*i)*h,e):(console.warn("non-invertible matrix.",t),e)}function d(e){var t=e[0],r=e[1],n=e[2],a=e[3],i=e[4],o=e[5],s=e[6],u=e[7],c=e[8];return t*(c*i-o*u)+r*(-c*a+o*s)+n*(u*a-i*s)}function p(e){return e[0]+e[4]+e[8]}function f(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e[4]=t[4]-r[4],e[5]=t[5]-r[5],e[6]=t[6]-r[6],e[7]=t[7]-r[7],e[8]=t[8]-r[8],e}function h(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*r,e[5]=t[5]*r,e[6]=t[6]*r,e[7]=t[7]*r,e[8]=t[8]*r,e}e.isIdentity=function(e,t){return s(e,o,void 0===t?n.a:t)},e.hasNaN=function(e){for(var t=0;t<9;t++)if(isNaN(e[t]))return!0;return!1},e.clone=function(e){return u(t(),e)},e.areEqual=s,e.setValue=function(e,t,r,n){e[3*r+t]=n},e.getValue=function(e,t,r){return e[3*r+t]},e.copy=u,e.transpose=c,e.invert=l,e.symmtricFromUpper=function(e,t){return e===t?(e[3]=t[1],e[6]=t[2],e[7]=t[5]):(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[1],e[4]=t[4],e[5]=t[5],e[6]=t[2],e[7]=t[5],e[8]=t[8]),e},e.symmtricFromLower=function(e,t){return e===t?(e[1]=t[3],e[2]=t[6],e[5]=t[7]):(e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[3],e[4]=t[4],e[5]=t[7],e[6]=t[6],e[7]=t[7],e[8]=t[8]),e},e.determinant=d,e.trace=p,e.sub=f,e.add=function(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e[4]=t[4]+r[4],e[5]=t[5]+r[5],e[6]=t[6]+r[6],e[7]=t[7]+r[7],e[8]=t[8]+r[8],e},e.mul=function(e,t,r){var n=t[0],a=t[1],i=t[2],o=t[3],s=t[4],u=t[5],c=t[6],l=t[7],d=t[8],p=r[0],f=r[1],h=r[2],m=r[3],g=r[4],b=r[5],v=r[6],y=r[7],x=r[8];return e[0]=p*n+f*o+h*c,e[1]=p*a+f*s+h*l,e[2]=p*i+f*u+h*d,e[3]=m*n+g*o+b*c,e[4]=m*a+g*s+b*l,e[5]=m*i+g*u+b*d,e[6]=v*n+y*o+x*c,e[7]=v*a+y*s+x*l,e[8]=v*i+y*u+x*d,e},e.subScalar=function(e,t,r){return e[0]=t[0]-r,e[1]=t[1]-r,e[2]=t[2]-r,e[3]=t[3]-r,e[4]=t[4]-r,e[5]=t[5]-r,e[6]=t[6]-r,e[7]=t[7]-r,e[8]=t[8]-r,e},e.addScalar=function(e,t,r){return e[0]=t[0]+r,e[1]=t[1]+r,e[2]=t[2]+r,e[3]=t[3]+r,e[4]=t[4]+r,e[5]=t[5]+r,e[6]=t[6]+r,e[7]=t[7]+r,e[8]=t[8]+r,e},e.mulScalar=h;var m=Math.PI/3,g=t();e.symmetricEigenvalues=function(t,r){var n=r[1]*r[1]+r[2]*r[2]+r[5]*r[5];if(0===n)t[0]=r[0],t[1]=r[4],t[2]=r[8];else{var a=p(r)/3,i=r[0]-a,o=r[4]-a,s=r[8]-a,u=i*i+o*o+s*s+2*n,c=Math.sqrt(u/6);h(g,e.Identity,a),f(g,r,g),h(g,g,1/c);var l=d(g)/2,b=l<=-1?m:l>=1?0:Math.acos(l)/3;t[0]=a+2*c*Math.cos(b),t[2]=a+2*c*Math.cos(b+2*m),t[1]=3*a-t[0]-t[2]}return t};var b=[.1,0,0],v=[.1,0,0],y=[.1,0,0],x=[.1,0,0],O=[.1,0,0],j=[.1,0,0];e.eigenvector=function(e,t,r){a.a.set(b,t[0]-r,t[1],t[2]),a.a.set(v,t[1],t[4]-r,t[5]),a.a.set(y,t[2],t[5],t[8]-r),a.a.cross(x,b,v),a.a.cross(O,b,y),a.a.cross(j,v,y);var n=a.a.dot(x,x),i=a.a.dot(O,O),o=a.a.dot(j,j),s=n,u=0;return i>s&&(s=i,u=1),o>s&&(u=2),0===u?a.a.scale(e,x,1/Math.sqrt(n)):1===u?a.a.scale(e,O,1/Math.sqrt(i)):a.a.scale(e,j,1/Math.sqrt(o)),e},e.directionTransform=function(e,t){return i(e,t),l(e,e),c(e,e),e},e.Identity=r()}(i||(i={}))},function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(684),a=r(646);function i(){return i.zero()}!function(e){function t(){var e=[.1,0,0,0];return e[0]=0,e}function r(){var e=t();return e[3]=1,e}function i(e,t,r){r*=.5;var n=Math.sin(r);return e[0]=n*t[0],e[1]=n*t[1],e[2]=n*t[2],e[3]=Math.cos(r),e}function o(e,t,r,n){var a,i,o,s,u,c=t[0],l=t[1],d=t[2],p=t[3],f=r[0],h=r[1],m=r[2],g=r[3];return(i=c*f+l*h+d*m+p*g)<0&&(i=-i,f=-f,h=-h,m=-m,g=-g),1-i>1e-6?(a=Math.acos(i),o=Math.sin(a),s=Math.sin((1-n)*a)/o,u=Math.sin(n*a)/o):(s=1-n,u=n),e[0]=s*c+u*f,e[1]=s*l+u*h,e[2]=s*d+u*m,e[3]=s*p+u*g,e}function s(e,t){var r,n=t[0]+t[4]+t[8];if(n>0)r=Math.sqrt(n+1),e[3]=.5*r,r=.5/r,e[0]=(t[5]-t[7])*r,e[1]=(t[6]-t[2])*r,e[2]=(t[1]-t[3])*r;else{var a=0;t[4]>t[0]&&(a=1),t[8]>t[3*a+a]&&(a=2);var i=(a+1)%3,o=(a+2)%3;r=Math.sqrt(t[3*a+a]-t[3*i+i]-t[3*o+o]+1),e[a]=.5*r,r=.5/r,e[3]=(t[3*i+o]-t[3*o+i])*r,e[i]=(t[3*i+a]+t[3*a+i])*r,e[o]=(t[3*o+a]+t[3*a+o])*r}return e}e.zero=t,e.identity=r,e.setIdentity=function(e){e[0]=0,e[1]=0,e[2]=0,e[3]=1},e.hasNaN=function(e){return isNaN(e[0])||isNaN(e[1])||isNaN(e[2])||isNaN(e[3])},e.create=function(e,t,n,a){var i=r();return i[0]=e,i[1]=t,i[2]=n,i[3]=a,i},e.setAxisAngle=i,e.getAxisAngle=function(e,t){var r=2*Math.acos(t[3]),n=Math.sin(r/2);return 0!==n?(e[0]=t[0]/n,e[1]=t[1]/n,e[2]=t[2]/n):(e[0]=1,e[1]=0,e[2]=0),r},e.multiply=function(e,t,r){var n=t[0],a=t[1],i=t[2],o=t[3],s=r[0],u=r[1],c=r[2],l=r[3];return e[0]=n*l+o*s+a*c-i*u,e[1]=a*l+o*u+i*s-n*c,e[2]=i*l+o*c+n*u-a*s,e[3]=o*l-n*s-a*u-i*c,e},e.rotateX=function(e,t,r){r*=.5;var n=t[0],a=t[1],i=t[2],o=t[3],s=Math.sin(r),u=Math.cos(r);return e[0]=n*u+o*s,e[1]=a*u+i*s,e[2]=i*u-a*s,e[3]=o*u-n*s,e},e.rotateY=function(e,t,r){r*=.5;var n=t[0],a=t[1],i=t[2],o=t[3],s=Math.sin(r),u=Math.cos(r);return e[0]=n*u-i*s,e[1]=a*u+o*s,e[2]=i*u+n*s,e[3]=o*u-a*s,e},e.rotateZ=function(e,t,r){r*=.5;var n=t[0],a=t[1],i=t[2],o=t[3],s=Math.sin(r),u=Math.cos(r);return e[0]=n*u+a*s,e[1]=a*u-n*s,e[2]=i*u+o*s,e[3]=o*u-i*s,e},e.calculateW=function(e,t){var r=t[0],n=t[1],a=t[2];return e[0]=r,e[1]=n,e[2]=a,e[3]=Math.sqrt(Math.abs(1-r*r-n*n-a*a)),e},e.slerp=o,e.invert=function(e,t){var r=t[0],n=t[1],a=t[2],i=t[3],o=r*r+n*n+a*a+i*i,s=o?1/o:0;return e[0]=-r*s,e[1]=-n*s,e[2]=-a*s,e[3]=i*s,e},e.conjugate=function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=t[3],e},e.fromMat3=s;var u=[0,0,0];function c(e,t){var r=t[0],n=t[1],a=t[2],i=t[3],o=r*r+n*n+a*a+i*i;return o>0&&(o=1/Math.sqrt(o),e[0]=r*o,e[1]=n*o,e[2]=a*o,e[3]=i*o),e}e.fromUnitVec3=function(e,t,r){var i=n.a.dot(t,r)+1;return iMath.abs(t[2])?n.a.set(u,-t[1],t[0],0):n.a.set(u,0,-t[2],t[1])):n.a.cross(u,t,r),e[0]=u[0],e[1]=u[1],e[2]=u[2],e[3]=i,c(e,e),e},e.clone=function(e){var r=t();return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r},e.toArray=function(e,t,r){return t[r+0]=e[0],t[r+1]=e[1],t[r+2]=e[2],t[r+3]=e[3],t},e.fromArray=function(e,t,r){return e[0]=t[r+0],e[1]=t[r+1],e[2]=t[r+2],e[3]=t[r+3],e},e.copy=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e},e.set=function(e,t,r,n,a){return e[0]=t,e[1]=r,e[2]=n,e[3]=a,e},e.add=function(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e},e.normalize=c;var l=[0,0,0],d=[1,0,0],p=[0,1,0];e.rotationTo=function(e,t,r){var a=n.a.dot(t,r);return a<-.999999?(n.a.cross(l,d,t),n.a.magnitude(l)<1e-6&&n.a.cross(l,p,t),n.a.normalize(l,l),i(e,l,Math.PI),e):a>.999999?(e[0]=0,e[1]=0,e[2]=0,e[3]=1,e):(n.a.cross(l,t,r),e[0]=l[0],e[1]=l[1],e[2]=l[2],e[3]=1+a,c(e,e))};var f=t(),h=t();e.sqlerp=function(e,t,r,n,a,i){return o(f,t,a,i),o(h,r,n,i),o(e,f,h,2*i*(1-i)),e};var m=[0,0,0,0,0,0,0,0,0];e.setAxes=function(e,t,r,n){return m[0]=r[0],m[3]=r[1],m[6]=r[2],m[1]=n[0],m[4]=n[1],m[7]=n[2],m[2]=-t[0],m[5]=-t[1],m[8]=-t[2],c(e,s(e,m))},e.toString=function(e,t){return"["+e[0].toPrecision(t)+" "+e[1].toPrecision(t)+" "+e[2].toPrecision(t)+" "+e[3].toPrecision(t)+"]"},e.Identity=r()}(i||(i={}))},function(e,t,r){"use strict";r.d(t,"c",(function(){return d})),r.d(t,"a",(function(){return p})),r.d(t,"b",(function(){return x}));var n=r(572),a=r(579),i=r(994),o=r(776),s=r(720);function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var c,l="undefined"==typeof document?r(1062):XMLHttpRequest;function d(e,t){return b(e,t)}function p(e){return"string"==typeof e?y(e,e,"string"):y(e.title,e.url,e.type||"string",e.body,e.headers)}function f(e){return e?"Failed to download data. Possible reasons: Resource is not available, or CORS is not allowed on the server.":"Failed to open file."}function h(e,t,r){return new Promise((function(n,a){if(function(e){if(e instanceof FileReader)return e.readyState===FileReader.DONE;if(e instanceof XMLHttpRequest)return e.readyState===XMLHttpRequest.DONE;throw new Error("unknown data type")}(r)){var i=r.error;null!=i?a(null!=i?i:f(r instanceof XMLHttpRequest)):n(r)}else{var o=!1;r.onerror=function(e){if(!o){var t=e.target.error;a(null!=t?t:f(r instanceof XMLHttpRequest))}},r.onprogress=function(r){if(e.shouldUpdate&&!o)try{r.lengthComputable?e.update({message:t,isIndeterminate:!1,current:r.loaded,max:r.total}):e.update({message:t+" "+(r.loaded/1024/1024).toFixed(2)+" MB",isIndeterminate:!0})}catch(r){o=!0,a(r)}},r.onload=function(e){n(r)}}}))}function m(e,t,r){return Object(n.b)(this,void 0,void 0,(function(){var a,o;return Object(n.d)(this,(function(n){switch(n.label){case 0:switch(r){case c.None:return[3,1];case c.Gzip:return[3,2];case c.Zip:return[3,3]}return[3,5];case 1:return[2,t];case 2:return[2,Object(i.b)(e,t)];case 3:return[4,Object(i.c)(e,t.buffer)];case 4:if(a=n.sent(),1!==(o=Object.keys(a)).length)throw new Error("can only decompress zip files with a single entry");return[2,a[o[0]]];case 5:return[2]}}))}))}function g(e,t,r,a){return Object(n.b)(this,void 0,void 0,(function(){var s,u,l;return Object(n.d)(this,(function(n){switch(n.label){case 0:if(s=t.result,null===(u=s instanceof ArrayBuffer?new Uint8Array(s):s))throw new Error("no data given");if(a===c.None)return[3,4];if(!(u instanceof Uint8Array))throw new Error("need Uint8Array for decompression");return[4,m(e,u,a)];case 1:return l=n.sent(),"string"!==r?[3,3]:[4,e.update({message:"Decoding text..."})];case 2:return n.sent(),u=Object(o.b)(l,0,l.length),[3,4];case 3:u=l,n.label=4;case 4:return"binary"===r&&u instanceof Uint8Array?[2,u]:[3,5];case 5:return"zip"===r&&u instanceof Uint8Array?[4,Object(i.c)(e,u.buffer)]:[3,7];case 6:return[2,n.sent()];case 7:if("string"===r&&"string"==typeof u)return[2,u];if("xml"===r&&"string"==typeof u)return[2,(new DOMParser).parseFromString(u,"application/xml")];if("json"===r&&"string"==typeof u)return[2,JSON.parse(u)];n.label=8;case 8:throw new Error("could not get requested response data '"+r+"'")}}))}))}function b(e,t){var r=this,i=void 0;return a.b.create("Read File",(function(a){return Object(n.b)(r,void 0,void 0,(function(){var r,o;return Object(n.d)(this,(function(n){switch(n.label){case 0:return n.trys.push([0,,5,6]),i=new FileReader,r="zip"===t?c.None:(s=e.name,/\.gz$/i.test(s)?c.Gzip:/\.zip$/i.test(s)?c.Zip:c.None),"binary"===t||"zip"===t||r!==c.None?i.readAsArrayBuffer(e):i.readAsText(e),[4,a.update({message:"Opening file...",canAbort:!0})];case 1:return n.sent(),[4,h(a,"Reading...",i)];case 2:return o=n.sent(),[4,a.update({message:"Processing file...",canAbort:!1})];case 3:return n.sent(),[4,g(a,o,t,r)];case 4:return[2,n.sent()];case 5:return i=void 0,[7];case 6:return[2]}var s}))}))}),(function(){i&&i.abort()}))}!function(e){e[e.None=0]="None",e[e.Gzip=1]="Gzip",e[e.Zip=2]="Zip"}(c||(c={}));var v=function(){function e(){}return e.get=function(){return this.pool.length?this.pool.pop():new l},e.emptyFunc=function(){},e.deposit=function(t){this.pool.length=200&&e.status<400){var r=e.response;if(v.deposit(e),("binary"===t||"zip"===t)&&r instanceof ArrayBuffer)return new Uint8Array(r);if("string"===t&&"string"==typeof r)return r;if("xml"===t&&r instanceof XMLDocument)return r;if("json"===t&&"object"===u(r))return r;throw new Error("could not get requested response data '"+t+"'")}throw v.deposit(e),new Error("Download failed with status code "+e.status)}(f,r)]}}))}))}),(function(){c&&(c.abort(),c=void 0)}))}function x(e,t,r,a){return Object(n.b)(this,void 0,void 0,(function(){var i,o,u,c,l,d,p,f,h,m,g,b;return Object(n.d)(this,(function(n){switch(n.label){case 0:return i=r.length,o=new Array(r.length),[4,e.update({message:"Downloading...",current:0,max:i})];case 1:for(n.sent(),u=[],c=[],l=0,d=Math.min(i,a);l0?[4,Promise.race(u)]:[3,6];case 3:if(f=n.sent(),h=r[f.index],m=c.indexOf(f.index),p++,"error"===f.kind&&!h.canFail)throw new Error(h.url+": "+f.error);return e.shouldUpdate?[4,e.update({message:"Downloading...",current:p,max:i})]:[3,5];case 4:n.sent(),n.label=5;case 5:return o[f.index]=f,u=u.filter(O,m),c=c.filter(O,m),l=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},r(1061),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,r(112))},function(e,t,r){"use strict";r.d(t,"b",(function(){return o})),r.d(t,"f",(function(){return u})),r.d(t,"e",(function(){return c})),r.d(t,"d",(function(){return d})),r.d(t,"a",(function(){return p})),r.d(t,"c",(function(){return m}));var n,a,i=r(581),o=Object(i.b)({Blue:37052,Green:42577,Yellow:16765952,Orange:16021792,Pink:16162465,Purple:10830745,LightBlue:9424105,Brown:10582605,Red:15539236,Secondary:15854817});(n={})[0]="Hexose",n[1]="HexNAc",n[2]="Hexosamine",n[3]="Hexuronate",n[4]="Deoxyhexose",n[5]="DeoxyhexNAc",n[6]="Di-deoxyhexose",n[7]="Pentose",n[8]="Deoxynonulosonate",n[9]="Di-deoxynonulosonate",n[10]="Unknown",n[11]="Assigned";var s=((a={})[0]=0,a[1]=1,a[2]=2,a[3]=3,a[4]=4,a[5]=5,a[6]=6,a[7]=7,a[8]=8,a[9]=9,a[10]=10,a[11]=11,a);function u(e,t){return 10===e?4===t?12:5===t?13:6===t?14:7===t?15:10:s[e]}var c={abbr:"Unk",name:"Unknown",color:o.Secondary,type:10},l=[{abbr:"Glc",name:"Glucose",color:o.Blue,type:0},{abbr:"Man",name:"Mannose",color:o.Green,type:0},{abbr:"Gal",name:"Galactose",color:o.Yellow,type:0},{abbr:"Gul",name:"Gulose",color:o.Orange,type:0},{abbr:"Alt",name:"Altrose",color:o.Pink,type:0},{abbr:"All",name:"Allose",color:o.Purple,type:0},{abbr:"Tal",name:"Talose",color:o.LightBlue,type:0},{abbr:"Ido",name:"Idose",color:o.Brown,type:0},{abbr:"GlcNAc",name:"N-Acetyl Glucosamine",color:o.Blue,type:1},{abbr:"ManNAc",name:"N-Acetyl Mannosamine",color:o.Green,type:1},{abbr:"GalNAc",name:"N-Acetyl Galactosamine",color:o.Yellow,type:1},{abbr:"GulNAc",name:"N-Acetyl Gulosamine",color:o.Orange,type:1},{abbr:"AltNAc",name:"N-Acetyl Altrosamine",color:o.Pink,type:1},{abbr:"AllNAc",name:"N-Acetyl Allosamine",color:o.Purple,type:1},{abbr:"TalNAc",name:"N-Acetyl Talosamine",color:o.LightBlue,type:1},{abbr:"IdoNAc",name:"N-Acetyl Idosamine",color:o.Brown,type:1},{abbr:"GlcN",name:"Glucosamine",color:o.Blue,type:2},{abbr:"ManN",name:"Mannosamine",color:o.Green,type:2},{abbr:"GalN",name:"Galactosamine",color:o.Yellow,type:2},{abbr:"GulN",name:"Gulosamine",color:o.Orange,type:2},{abbr:"AltN",name:"Altrosamine",color:o.Pink,type:2},{abbr:"AllN",name:"Allosamine",color:o.Purple,type:2},{abbr:"TalN",name:"Talosamine",color:o.LightBlue,type:2},{abbr:"IdoN",name:"Idosamine",color:o.Brown,type:2},{abbr:"GlcA",name:"Glucuronic Acid",color:o.Blue,type:3},{abbr:"ManA",name:"Mannuronic Acid",color:o.Green,type:3},{abbr:"GalA",name:"Galacturonic Acid",color:o.Yellow,type:3},{abbr:"GulA",name:"Guluronic Acid",color:o.Orange,type:3},{abbr:"AltA",name:"Altruronic Acid",color:o.Pink,type:3},{abbr:"AllA",name:"Alluronic Acid",color:o.Purple,type:3},{abbr:"TalA",name:"Taluronic Acid",color:o.LightBlue,type:3},{abbr:"IdoA",name:"Iduronic Acid",color:o.Brown,type:3},{abbr:"Qui",name:"Quinovose",color:o.Blue,type:4},{abbr:"Rha",name:"Rhamnose",color:o.Green,type:4},{abbr:"6dGul",name:"6-Deoxy Gulose",color:o.Orange,type:4},{abbr:"6dAlt",name:"6-Deoxy Altrose",color:o.Pink,type:4},{abbr:"6dTal",name:"6-Deoxy Talose",color:o.LightBlue,type:4},{abbr:"Fuc",name:"Fucose",color:o.Red,type:4},{abbr:"QuiNAc",name:"N-Acetyl Quinovosamine",color:o.Blue,type:5},{abbr:"RhaNAc",name:"N-Acetyl Rhamnosamine",color:o.Green,type:5},{abbr:"6dAltNAc",name:"N-Acetyl 6-Deoxy Altrosamine",color:o.Pink,type:5},{abbr:"6dTalNAc",name:"N-Acetyl 6-Deoxy Talosamine",color:o.LightBlue,type:5},{abbr:"FucNAc",name:"N-Acetyl Fucosamine",color:o.Red,type:5},{abbr:"Oli",name:"Olivose",color:o.Blue,type:6},{abbr:"Tyv",name:"Tyvelose",color:o.Green,type:6},{abbr:"Abe",name:"Abequose",color:o.Orange,type:6},{abbr:"Par",name:"Paratose",color:o.Pink,type:6},{abbr:"Dig",name:"Digitoxose",color:o.Purple,type:6},{abbr:"Col",name:"Colitose",color:o.LightBlue,type:6},{abbr:"Ara",name:"Arabinose",color:o.Green,type:7},{abbr:"Lyx",name:"Lyxose",color:o.Yellow,type:7},{abbr:"Xyl",name:"Xylose",color:o.Orange,type:7},{abbr:"Rib",name:"Ribose",color:o.Pink,type:7},{abbr:"Kdn",name:"Keto-Deoxy Nonulonic Acid",color:o.Green,type:8},{abbr:"Neu5Ac",name:"N-Acetyl Neuraminic Acid",color:o.Purple,type:8},{abbr:"Neu5Gc",name:"N-Glycolyl Neuraminic Acid",color:o.LightBlue,type:8},{abbr:"Neu",name:"Neuraminic Acid",color:o.Brown,type:8},{abbr:"Sia",name:"Sialic acid",color:o.Red,type:8},{abbr:"Pse",name:"Pseudaminic Acid",color:o.Green,type:9},{abbr:"Leg",name:"Legionaminic Acid",color:o.Yellow,type:9},{abbr:"Aci",name:"Acinetaminic Acid",color:o.Pink,type:9},{abbr:"4eLeg",name:"4-Epilegionaminic Acid",color:o.LightBlue,type:9},{abbr:"Bac",name:"Bacillosamine",color:o.Blue,type:10},{abbr:"LDmanHep",name:"L-Glycero-D-Manno Heptose",color:o.Green,type:10},{abbr:"Kdo",name:"Keto-Deoxy Octulonic Acid",color:o.Yellow,type:10},{abbr:"Dha",name:"3-Deoxy Lyxo-Heptulosaric Acid",color:o.Orange,type:10},{abbr:"DDmanHep",name:"D-Glycero-D-Manno-Heptose",color:o.Pink,type:10},{abbr:"MurNAc",name:"N-Acetyl Muramic Acid",color:o.Purple,type:10},{abbr:"MurNGc",name:"N-Glycolyl Muramic Acid",color:o.LightBlue,type:10},{abbr:"Mur",name:"Muramic Acid",color:o.Brown,type:10},{abbr:"Api",name:"Apicose",color:o.Green,type:11},{abbr:"Fru",name:"Fructose",color:o.Green,type:11},{abbr:"Tag",name:"Tagatose",color:o.Yellow,type:11},{abbr:"Sor",name:"Sorbose",color:o.Orange,type:11},{abbr:"Psi",name:"Psicose",color:o.Pink,type:11}],d=function(){for(var e=new Map,t=0,r=l.length;te.max[0]||t[1]e.max[1]||t[2]e.max[2])}}(o||(o={}))},function(e,t,r){"use strict";r.d(t,"b",(function(){return u})),r.d(t,"a",(function(){return c}));var n,a,i=r(572),o=r(891),s=r(753);function u(e){return n.classify(e)}function c(e){return a.classify(e)}!function(e){function t(e,t){return e>=0?Math.ceil((e+1)/t):Math.ceil((e+1)/(-t-1))}function r(e,r,n){var a=e.limit8,i=e.limit16;r.pack8+=t(n,a),r.pack16+=t(n,i),r.count+=1}function n(e,r){e.pack8+=t(r,127),e.pack16+=t(r,32767),e.count+=1}function a(e){return 4*e.count<2*e.pack16?{length:4*e.count,elem:4}:2*e.pack1610)return o.b.by(o.b.byteArray);if(0===r)return n.classify(e);for(var i=function(e){for(var t=1,r=0;r"+n+" #"+a),h.push(u+"×"+c+"×"+l+" Å"),h.push("α="+d+"° β="+p+"° γ="+f+"°"),h.join(" | ")}}(n||(n={}))},function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var n,a=r(738),i=r(680),o=r(705),s=r(647),u={U:a.a.atom_site_anisotrop.U,U_esd:a.a.atom_site_anisotrop.U_esd};!function(e){e.Schema=u,e.Descriptor={name:"atom_site_anisotrop",cifExport:{prefix:"",categories:[{name:"atom_site_anisotrop",instance:function(t){return e.Provider.get(t.firstModel)&&s.a.is(t.firstModel.sourceData)?i.a.Category.ofTable(t.firstModel.sourceData.data.db.atom_site_anisotrop):i.a.Category.Empty}}]}},e.Provider=o.a.create(e.Descriptor),e.getElementToAnsiotrop=function(e,t){var r=new Int32Array(e.rowCount);r.fill(-1);for(var n=0,a=e.rowCount;n=0)return!0;return!1}e.Descriptor={name:"struct_conn",cifExport:{prefix:"",categories:[{name:"struct_conn",instance:function(r){var n=e.Provider.get(r.firstModel);if(!n||0===n.entries.length)return i.a.Category.Empty;for(var a=r.structures[0],o=[],s=0,u=n.entries;s.95},e.getAtomIndexFromEntries=function(e){for(var t=new Map,r=0,n=e;r=0){var A=d.value(_);r&&!S&&A&&!i.has(A)||(m[m.length]=C)}}}n[n.length]={unit:u.unit,indices:a.f.ofSortedArray(m)}}else n[n.length]=u}return e(t.structure,n)}function b(e){switch(e.kind){case 0:return e.model.atomicHierarchy.chainAtomSegments;case 1:return e.model.coarseHierarchy.spheres.chainElementSegments;case 2:return e.model.coarseHierarchy.gaussians.chainElementSegments}}function v(e){return e.unit.elements.length===a.d.size(e.indices)}function y(e){return e.length>12&&e[e.length-1]-e[0]==e.length-1?a.b.ofRange(e[0],e[e.length-1]):a.f.ofSortedArray(e)}function x(e,t,r){for(var n=b(e).index,i=e.elements,o=0,s=0,u=i.length;s0&&(r[r.length]={unit:e,indices:y(l)})}else r[r.length]={unit:e,indices:a.b.ofBounds(0,o)}}function O(e,t,r,n,i){for(var o=b(e.elements[0].unit).index,s=new Set,c=t;c0&&n.push({unit:t,indices:i})}})),e(r,n)},e.union=function t(r,n){if(r.elements.length>n.elements.length)return t(n,r);if(e.isEmpty(r))return n;for(var i=new Map,o=0,s=r.elements;on.elements.length)return t(n,r);if(e.isEmpty(r))return e.isEmpty(n);for(var i=new Map,o=0,s=r.elements;o12)i[i.length]=t[l],i[i.length]=t[d-1];else for(var p=l;p1,_.modelLabel,_.modelIndex))}for(var w=new Map,C=(v=0,O.length);v0&&(u[u.length]=o.a.core.set.has([o.a.core.type.set(n),s]));for(var c=0,l=r.length/2;c1?o.a.core.logic.or(u):u[0],"chain-test":a.length>1?o.a.core.set.has([o.a.core.type.set(a),i]):o.a.core.rel.eq([i,a[0]]),"entity-test":o.a.core.logic.and([o.a.core.rel.eq([o.a.struct.atomProperty.core.modelLabel(),p]),o.a.core.rel.eq([o.a.struct.atomProperty.core.modelIndex(),f])])}))}else E.push(o.a.struct.generator.atomGroups({"atom-test":u.length>1?o.a.core.logic.or(u):u[0],"chain-test":a.length>1?o.a.core.set.has([o.a.core.type.set(a),i]):o.a.core.rel.eq([i,a[0]])}))})),o.a.struct.modifier.union([1===E.length?E[0]:o.a.struct.combinator.merge(E.map((function(e){return o.a.struct.modifier.union([e])})))])}}(m||(m={}))},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var a;r.d(t,"a",(function(){return a})),function(e){function t(e){return!!e&&!!e.head&&"object"===n(e)}function r(e){return!!e&&"string"==typeof e.name}e.Symbol=function(e){return{name:e}},e.Apply=function(e,t){return t?{head:e,args:t}:{head:e}},e.isArgumentsArray=function(e){return!!e&&Array.isArray(e)},e.isArgumentsMap=function(e){return!!e&&!Array.isArray(e)},e.isLiteral=function(e){return!t(e)&&!r(e)},e.isApply=t,e.isSymbol=r}(a||(a={}))},function(e,t,r){"use strict";r.d(t,"b",(function(){return i})),r.d(t,"a",(function(){return o})),r.d(t,"c",(function(){return s}));var n=r(754);function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t,r){return Object(n.d)("",e,t,r)}function o(e){!function e(t,r,i){if(Object(n.e)(i))return i.info.namespace=t,i.info.name=i.info.name||u(r),void(i.id=i.info.namespace+"."+i.info.name);for(var o=""+(i["@namespace"]||u(r)),s=t?t+"."+o:o,c=0,l=Object.keys(i);c>8&255}},e.ensureLittleEndian=function(t,n,a,i,o){e.IsNativeEndianLittle||!a||i<=1||r(t,n,a,i,o)}}(n||(n={}))},function(e,t,r){"use strict";r.d(t,"b",(function(){return c})),r.d(t,"a",(function(){return p})),r.d(t,"c",(function(){return f}));var n=r(572),a=r(575),i=r(581),o=r(573),s=r(673),u=Object(i.a)(16448250),c=Object(n.a)({asymId:o.a.Select("auth",o.a.arrayToOptions(["auth","label"]))},Object(s.b)({type:"colors",colorList:"many-distinct"}));function l(e,t){var r=function(e,t){switch(e.kind){case 0:return"auth"===t?a.i.chain.auth_asym_id:a.i.chain.label_asym_id;case 1:case 2:return a.i.coarse.asym_id}}(e.unit,t)(e);return e.structure.root.models.length>1?d(e.unit.model,r):r}function d(e,t){return t+"|"+((a.d.Index.get(e).value||0)+1)}function p(e,t){var r,n;if(e.structure){var i=a.h.Location.create(e.structure.root),o=function(e,t){for(var r=new Map,n=function(n){var i=a.d.AsymIdOffset.get(n).value,o=("auth"===t?null==i?void 0:i.auth:null==i?void 0:i.label)||0,s=0;n.properties.structAsymMap.forEach((function(a,i){var u=a.auth_id,c="auth"===t?u:i,l=e.models.length>1?d(n,c):c;r.has(l)||(r.set(l,s+o),++s)}))},i=0,o=e.models;i=21&&t<=29||t>=39&&t<=47||t>=72&&t<=79||t>=104&&t<=108}function d(e){return function(e){return i.has(e)}(e)||function(e){return o.has(e)}(e)||function(e){var t=Object(n.a)(e);return t>=57&&t<=71}(e)||function(e){var t=Object(n.a)(e);return t>=89&&t<=103}(e)||l(e)||function(e){return s.has(e)}(e)}},function(e,t,r){"use strict";r.d(t,"e",(function(){return o})),r.d(t,"b",(function(){return s})),r.d(t,"a",(function(){return u})),r.d(t,"c",(function(){return h})),r.d(t,"d",(function(){return m}));var n=r(630),a=r(574),i=r(711);function o(e){switch(e){case 0:return"Spherical";case 1:return"Terminal";case 2:return"Linear";case 3:return"Trigonal";case 4:return"Tetrahedral";case 5:return"Trigonal Bi-Pyramidal";case 6:return"Octahedral";case 7:return"Square Planar";case 8:return"Unknown"}}function s(e){switch(e){case 0:return 0;case 1:return 1;case 2:return 2;case 3:return 3;case 4:return 4;default:return 8}}var u=new Map([[2,Object(n.c)(180)],[3,Object(n.c)(120)],[4,Object(n.c)(109.4721)],[6,Object(n.c)(90)]]),c=Object(a.g)(),l=Object(a.g)(),d=Object(a.g)(),p=Object(a.g)(),f=Object(a.g)();function h(e,t,r,n,o){var s=[];return t.conformation.position(t.elements[r],d),n.conformation.position(n.elements[o],p),a.g.sub(c,p,d),Object(i.g)(e,t,r,(function(e,t){"H"!==Object(i.i)(e,t)&&(e.conformation.position(e.elements[t],f),a.g.sub(l,f,d),s.push(a.g.angle(c,l)))})),s}function m(e,t,r,n,o){t.conformation.position(t.elements[r],d),n.conformation.position(n.elements[o],p),a.g.sub(c,p,d);var s,u,h=[Object(a.g)(),Object(a.g)()],m=0;if(Object(i.g)(e,t,r,(function(e,t){m>1||"H"!==Object(i.i)(e,t)&&(s=e,u=t,e.conformation.position(e.elements[t],f),a.g.sub(h[m++],f,d))})),1===m&&s&&u&&Object(i.g)(e,s,u,(function(e,n){m>1||e===t&&n===r||"H"!==Object(i.i)(e,n)&&(e.conformation.position(e.elements[n],f),a.g.sub(h[m++],f,d))})),2===m)return a.g.cross(l,h[0],h[1]),Math.abs(Math.PI/2-a.g.angle(l,c))}},function(e,t,r){"use strict";function n(e,t){return e+("/"===e[e.length-1]||"/"===t[0]?"":"/")+t}r.d(t,"a",(function(){return n}))},function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var n,a=r(572),i=r(647),o=r(617),s=r(835);!function(e){var t=this;function r(e){if(i.a.is(e.sourceData)){var t=e.sourceData.data.frame.categories.atom_site,r=t.getField("db_name"),n=t.getField("db_acc"),a=t.getField("db_num"),o=t.getField("db_res");if(r&&n&&a&&o){for(var s=e.atomicHierarchy.atomSourceIndex,u=e.atomicHierarchy.residueAtomSegments,c=u.count,l=u.offsets,d=new Array(c),p=new Array(c),f=new Array(c),h=new Array(c),m=0;m=0},obtain:function(e,n){return Object(a.b)(t,void 0,void 0,(function(){return Object(a.d)(this,(function(e){return[2,{value:r(n)}]}))}))}}),e.getKey=function(t){var r=t.unit.model,n=e.Provider.get(r).value;if(!n)return"";var a=t.unit.elements[t.element],i=r.atomicHierarchy.residueAtomSegments.offsets[a];return n.accession[i]},e.getLabel=function(t){var r=t.unit.model,n=e.Provider.get(r).value;if(n){var a=t.unit.elements[t.element],i=r.atomicHierarchy.residueAtomSegments.offsets[a],o=n.dbName[i];if(o)return o+" "+n.accession[i]+" "+n.num[i]+" "+n.residue[i]}}}(n||(n={}))},function(e,t,r){"use strict";r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return i}));var n=r(949);function a(e){return e}function i(e,t){if("bcif"===e.ext)try{if(Object(n.a)(t).encoder.startsWith("VolumeServer"))return"dscif"}catch(e){}else if("cif"===e.ext){var r=t;if(r.startsWith("data_SERVER\n#\n_density_server_result"))return"dscif";if(r.includes("atom_site_fract_x")||r.includes("atom_site.fract_x"))return"coreCif"}return-1}},function(e,t,r){"use strict";r.d(t,"c",(function(){return h})),r.d(t,"d",(function(){return m})),r.d(t,"a",(function(){return g})),r.d(t,"b",(function(){return b}));var n=r(649),a=r(576),i=r(646),o=r(684),s=r(758),u=o.a.set,c=o.a.normalize,l=o.a.sub,d=o.a.addScalar,p=o.a.scale,f=o.a.toArray;function h(e,t,r,o){var s=!1;if(n.b.isLoci(e)){if(!n.b.areEquivalent(e.volume,t))return!1;o(a.b.ofLength(t.grid.cells.data.length))&&(s=!0)}else if(n.b.Isosurface.isLoci(e)){if(!n.b.areEquivalent(e.volume,t))return!1;if(r){if(!n.b.IsoValue.areSame(e.isoValue,r,t.grid.stats))return!1;o(a.b.ofLength(t.grid.cells.data.length))&&(s=!0)}else for(var u=t.grid,c=u.stats,l=u.cells.data,d=c.sigma,p=n.b.IsoValue.toAbsolute(e.isoValue,c).absoluteValue,f=0,h=l.length;f=1&&i<=3){t=0,r=0;var c=I.g.sub(Object(I.g)(),u.target,u.position),l=I.g.cross(Object(I.g)(),c,u.up);(s=Object(I.g)())[i-1]=1,o=I.g.cross(Object(I.g)(),s,l),0===I.g.magnitude(o)&&(o=c)}else t===i?r=(r+1)%2:(t=i,r=0),4===i?(s=r?I.g.unitX:I.g.unitY,o=I.g.negUnitZ):5===i?(s=r?I.g.unitX:I.g.unitZ,o=I.g.negUnitY):(s=r?I.g.unitY:I.g.unitZ,o=I.g.negUnitX);e.ctx.canvas3d.requestCameraReset({snapshot:function(e,t){return t.getInvariantFocus(e.boundingSphereVisible.center,e.boundingSphereVisible.radius,s,o)}})}}))},t}(u.a.Handler),params:function(){return{}},display:{name:"Camera Axis Helper"}}),N=r(575),F=r(582),z=u.a.create({name:"structure-info-prop",category:"custom-props",display:{name:"Structure Info"},ctor:function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(w.c)(t,e),Object.defineProperty(t.prototype,"maxModelIndex",{get:function(){for(var e,t,r=-1,n=0,a=this.ctx.state.data.select(F.e.Generators.rootsOfType(l.a.Molecule.Model));nr&&(r=o)}return r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxStructureIndex",{get:function(){for(var e,t,r=-1,n=0,a=this.ctx.state.data.select(F.e.Generators.rootsOfType(l.a.Molecule.Structure));nr&&(r=o)}return r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"asymIdOffset",{get:function(){for(var e,t=0,r=0,n=0,a=this.ctx.state.data.select(F.e.Generators.rootsOfType(l.a.Molecule.Model));nK)continue e}++z}o[i[v]]+=u*z*T*T}}}(t,n,Math.min(n+5e3,r.length)),a.label=4;case 4:return n+=5e3,[3,1];case 5:return[2]}}))}))}var $,ee=r(576),te={numberOfSpherePoints:A.a.Numeric(92,{min:12,max:360,step:1},{description:"Number of sphere points to sample per atom: 92 (original paper), 960 (BioJava), 3000 (EPPIC) - see Shrake A, Rupley JA: Environment and exposure to solvent of protein atoms. Lysozyme and insulin. J Mol Biol 1973."}),probeSize:A.a.Numeric(1.4,{min:.1,max:4,step:.01},{description:"Corresponds to the size of a water molecule: 1.4 (original paper), 1.5 (occassionally used)"}),nonPolymer:A.a.Boolean(!1,{description:"Include non-polymer atoms as occluders."}),traceOnly:A.a.Boolean(!1,{description:"Compute only using alpha-carbons, if true increase probeSize accordingly (e.g., 4 A). Considers only canonical amino acids."})};!function(e){function t(e,t,n){return Object(w.b)(this,void 0,void 0,(function(){var a,i,o;return Object(w.d)(this,(function(s){switch(s.label){case 0:return function(e){var t=X.d.residue.key,r=X.d.atom,n=r.type_symbol,a=r.label_atom_id,i=r.label_comp_id,o=e.structure,s=e.atomRadiusType,u=e.serialResidueIndex,c=X.c.Location.create(o),l=0,d=0,p=-1;c.structure=o;for(var f=0,h=0,m=o.units.length;f("+a.size+" "+(a.size>1?"Residues sum":"Residue")+")")+": "+i.toFixed(2)+" Å2"}if("structure-loci"===e.kind){var l;if(!(l=ce.get(e.structure).value)||e.structure.customPropertyDescriptors.hasReference(ce.descriptor))return;return"Accessible Surface Area (Whole Structure): "+Object(me.n)(l.area).toFixed(2)+" Å2"}}var xe=Object(ge.c)("Buried Protein Residues",be.a.struct.modifier.union([be.a.struct.modifier.wholeResidues([be.a.struct.modifier.union([be.a.struct.generator.atomGroups({"chain-test":be.a.core.rel.eq([be.a.ammp("objectPrimitive"),"atomistic"]),"residue-test":ue.isBuried.symbol()})])])]),{description:"Select buried protein residues.",category:ge.a.Residue,ensureCustomProperties:function(e,t){return ce.attach(e,t)}}),Oe=Object(ge.c)("Accessible Protein Residues",be.a.struct.modifier.union([be.a.struct.modifier.wholeResidues([be.a.struct.modifier.union([be.a.struct.generator.atomGroups({"chain-test":be.a.core.rel.eq([be.a.ammp("objectPrimitive"),"atomistic"]),"residue-test":ue.isAccessible.symbol()})])])]),{description:"Select accessible protein residues.",category:ge.a.Residue,ensureCustomProperties:function(e,t){return ce.attach(e,t)}}),je=r(766),Se=r(731),_e=r(909),we=r(969),Ce=r(999),Ae=u.a.create({name:"computed-interactions-prop",category:"custom-props",display:{name:"Interactions"},ctor:function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.provider=je.a,t.labelProvider={label:function(e){if(t.params.showTooltip)switch(e.kind){case"element-loci":if(0===e.elements.length)return;for(var r=[],n=0,a=t.getStructures(e.structure);nTypes "+l.join(", ")),d.length&&p.push("Groups "+d.join(", ")),p.length&&r.push("Interaction Feature: "+p.join(" | "))}}}}}return r.length?r.join("
    "):void 0;default:return}}},t}return Object(w.c)(t,e),t.prototype.getStructures=function(e){var t=[],r=this.ctx.helpers.substructureParent.get(e);if(r)for(var n=0,a=this.ctx.state.data.select(F.e.Generators.ofType(l.a.Molecule.Structure,r.transform.ref));nCharge "+d+" | Ideal Geometry "+Object(Ie.e)(p)+" | Implicit H "+f+" | Total H "+h)}}}}}return r.length?r.join("
    "):void 0;default:return}}},t}return Object(w.c)(t,e),t.prototype.getStructures=function(e){var t=[],r=this.ctx.helpers.substructureParent.get(e);if(r)for(var n=0,a=this.ctx.state.data.select(F.e.Generators.ofType(l.a.Molecule.Structure,r.transform.ref));n=0&&a(o,d,r)}else if(t.coarseHierarchy.isDefined){var p=t.coarseHierarchy.spheres.findSequenceKey(i,c,l);if(p>=0)a(s,p,r);else{var f=t.coarseHierarchy.gaussians.findSequenceKey(i,c,l);f>=0&&a(u,f,r)}}}for(var o=new Map,s=new Map,u=new Map,c=[],l=0;l")}e.distance=n,e.Location=function(e,t,r){return Object(tt.a)("cross-link-restraints",{structure:t,crossLinkRestraints:e},r)},e.isLocation=function(e){return!!e&&"data-location"===e.kind&&"cross-link-restraints"===e.tag},e.areLocationsEqual=function(e,t){return e.data.structure===t.data.structure&&e.data.crossLinkRestraints===t.data.crossLinkRestraints&&e.element===t.element},e.locationLabel=function(e){return a(e.data.crossLinkRestraints,e.element)},e.Loci=function(e,t,r){return Object(C.a)("cross-link-restraints",{structure:e,crossLinkRestraints:t},r,(function(e){return i(t,r,e)}),(function(){return o(e,t,r)}))},e.isLoci=function(e){return!!e&&"data-loci"===e.kind&&"interactions"===e.tag},e.getBoundingSphere=i,e.getLabel=o}($e||($e={}));var dt=Object(w.a)(Object(w.a)(Object(w.a)({},Ke.g),Ye.a),{sizeFactor:A.a.Numeric(.5,{min:0,max:10,step:.1})});function pt(e){return Object(Ke.h)({defaultProps:A.a.getDefaultValues(dt),createGeometry:lt,createLocationIterator:ft,getLoci:ht,eachLocation:mt,setUpdateState:function(e,t,r){e.createGeometry=t.sizeFactor!==r.sizeFactor||t.radialSegments!==r.radialSegments||t.linkCap!==r.linkCap}},e)}function ft(e){var t=at.get(e).value,r=t.pairs.length,n=$e.Location(t,e);return Object(Xe.a)(r,1,1,(function(e){return n.element=e,n}),!0)}function ht(e,t,r){var n=e.objectId,a=e.groupId;if(r===n){var i=at.get(t).value;if(i.pairs[a])return $e.Loci(t,i,[a])}return C.b}function mt(e,t,r){var n=!1;if($e.isLoci(e)){if(!N.g.areEquivalent(e.data.structure,t))return!1;var a=at.get(t).value;if(e.data.crossLinkRestraints!==a)return!1;for(var i=0,o=e.elements;i0?this.atomicBond=this.currentAtomicBondStack.pop():this.atomicBond=void 0},e.prototype.pushCurrentStructure=function(){this.currentStructure&&this.currentStructureStack.push(this.currentStructure)},e.prototype.popCurrentStructure=function(){this.currentStructureStack.length?this.currentStructure=this.currentStructureStack.pop():this.currentStructure=void 0},e.prototype.pushInputStructure=function(e){this.inputStructureStack.push(this.inputStructure),this.inputStructure=e},e.prototype.popInputStructure=function(){if(0===this.inputStructureStack.length)throw new Error("Must push before pop.");this.inputStructure=this.inputStructureStack.pop()},e.prototype.throwIfTimedOut=function(){if(0!==this.timeoutMs&&Object(l.b)()-this.timeCreated>this.timeoutMs)throw new Error("The query took too long to execute (> "+this.timeoutMs/1e3+"s).")},e.prototype.tryGetCurrentSelection=function(){if(!this.currentSelection)throw new Error("The current selection is not assigned.");return this.currentSelection},e}(),f=function(){function e(){this.a=c.c.Location.create(void 0),this.aIndex=0,this.b=c.c.Location.create(void 0),this.bIndex=0,this.type=0,this.order=0,this.testFn=d.defaultBondTest}return e.prototype.setStructure=function(e){this.a.structure=e,this.b.structure=e},e.prototype.setTestFn=function(e){this.testFn=e||d.defaultBondTest},e.prototype.test=function(e,t){return!!this.testFn(e)||!!t&&(this.swap(),this.testFn(e))},e.prototype.swap=function(){var e=this.aIndex;this.aIndex=this.bIndex,this.bIndex=e;var t=this.a.unit;this.a.unit=this.b.unit,this.b.unit=t;var r=this.a.element;this.a.element=this.b.element,this.b.element=r},Object.defineProperty(e.prototype,"length",{get:function(){return c.c.Location.distance(this.a,this.b)},enumerable:!1,configurable:!0}),e}();(s||(s={})).run=function(e,t,r){return e(new p(t,r))};var h=r(572),m=r(637),g=r(576),b=r(695),v=r(756),y=function(){function e(e){this.source=e,this.set=Object(m.a)(c.b.hashCode,c.b.areUnitIdsAndIndicesEqual),this.structures=[],this.allSingletons=!0}return e.prototype.add=function(e){e.elementCount&&(1!==e.elementCount&&(this.allSingletons=!1),this.set.add(e)&&(this.structures[this.structures.length]=e))},e.prototype.getSelection=function(){return this.allSingletons?u.a.Singletons(this.source,Object(v.e)(this.source,this.structures)):u.a.Sequence(this.source,this.structures)},e}(),x=function(){function e(e){this.source=e,this.builders=[],this.builderMap=new Map}return e.prototype.add=function(e,t,r){var n=this.builderMap.get(e);n||(n=this.source.subsetBuilder(!0),this.builders[this.builders.length]=n,this.builderMap.set(e,n)),n.addToUnit(t,r)},e.prototype.allSingletons=function(){for(var e=0,t=this.builders.length;e1)return!1;return!0},e.prototype.singletonSelection=function(){for(var e=this.source.subsetBuilder(!0),t=c.c.Location.create(this.source),r=0,n=this.builders.length;r0?m.c.create():this.currentUnit},e.prototype.addElement=function(e){m.c.add(this.currentUnit,e,e)&&this.elementCount++},e.prototype.commitUnit=function(){0===this.currentUnit.array.length||this.unitMap.has(this.parentId)||(this.ids[this.ids.length]=this.parentId,this.unitMap.set(this.parentId,this.currentUnit),this.parentId=-1)},e.prototype.getStructure=function(){if(this.isEmpty)return b.a.Empty;var e=[];Object(k.q)(this.ids);for(var t=M.a.UnitEquivalenceBuilder(),r=0,n=this.ids.length;r1&&Object(k.q)(o);var u=i.getChild(g.f.ofSortedArray(o)),c=t.add(u.id,u);u!==c&&(u=c.applyOperator(u.id,u.conformation.operator,!0)),e[e.length]=u}else e[e.length]=i,t.add(i.id,i)}return b.a.create(e,{parent:this.parent})},Object.defineProperty(e.prototype,"isEmpty",{get:function(){return 0===this.elementCount},enumerable:!1,configurable:!0}),e}(),R=r(731),B=r(647),L=r(708),N=function(){function e(e){var t;this.index=new Map,this.checkOperator=!1,this.checkOperator=null!==(t=null==e?void 0:e.checkOperator)&&void 0!==t&&t}return e.prototype.add=function(e){var t=this.index.get(e.label_asym_id);t||(t=new Map,this.index.set(e.label_asym_id,t));var r=t.get(e.label_seq_id);return r||(r=[],t.set(e.label_seq_id,r)),!this._find(e,r)&&(r.push(e),!0)},e.prototype.hasLabelAsymId=function(e){return this.index.has(e)},e.prototype.has=function(e){var t,r,n=F(e);if(this.index.has(n)){var a=this.index.get(n),i=z(e);if(a.has(i))for(var o=a.get(i),s=U(e),u=V(e),c=H(e),l=null!==(t=G(e))&&void 0!==t?t:"1_555",d=0,p=o;dr&&(r=l)}}return e.throwIfTimedOut(),r}function J(e,t){return function(r){var n=e(r);if(t.elementRadius){var a=Object(h.a)(Object(h.a)({},t),{elementRadius:t.elementRadius,elementRadiusClosure:Q(r,t.elementRadius),sourceMaxRadius:Z(r,t.elementRadius)});if(u.a.isSingleton(n)){var i=K(r,r.inputStructure,n.structure,a);return u.a.Singletons(r.inputStructure,i)}for(var o=new y(r.inputStructure),s=0,c=n.structures;s=0)_.addElementRange(h,y.start,y.end);else if(d.hasLabelAsymId(x))for(b.setSegment(y);b.hasNext;){S=b.move();c.element=h[S.start],d.has(c)&&_.addElementRange(h,S.start,S.end)}}_.commitUnit(),e.throwIfTimedOut()}}var A=Object(v.e)(e.inputStructure,[_.getStructure(),a]);if(n){for(var E=new D(e.inputStructure),P=e.inputStructure.lookup3d,T=0,I=A.units;T0;){var o=i.pop();n.add(o);for(var s=this.vertices.get(o),u=0,c=this.edges.get(o);u0){var a=r.structure.units[0],i=b.a.create([a.getChild(g.f.ofSingleton(a.elements[0]))],{parent:t.inputStructure});n.add(i)}}else r.structures.length>0&&n.add(r.structures[0]);return n.getSelection()}}function be(e,t,r){var n=e.currentStructure.units,a=e.pushCurrentElement();a.structure=e.currentStructure;for(var i=0,o=n;it}},e.gte=function(e,t){return function(r){return e(r)>=t}},e.inSet=function(e,t){if((i=t)&&i.has)return function(r){return t.has(e(r))};if(0===t.length)return r;for(var n=new Set,a=0;an.angleMax)){var h=Object(M.c)(e,l.unit,p,c.unit,d);if(0!==h.length&&!h.some((function(e){return z-e>n.angleMax})))return 5}}}(e,r,n,t)}}}},G=r(586),q={distanceMax:o.a.Numeric(3.5,{min:1,max:5,step:.1}),backbone:o.a.Boolean(!0,{description:"Include backbone-to-backbone hydrogen bonds"}),accAngleDevMax:o.a.Numeric(45,{min:0,max:180,step:1},{description:"Max deviation from ideal acceptor angle"}),donAngleDevMax:o.a.Numeric(45,{min:0,max:180,step:1},{description:"Max deviation from ideal donor angle"}),accOutOfPlaneAngleMax:o.a.Numeric(90,{min:0,max:180,step:1}),donOutOfPlaneAngleMax:o.a.Numeric(45,{min:0,max:180,step:1})},W=Object(i.a)(Object(i.a)({},q),{water:o.a.Boolean(!1,{description:"Include water-to-water hydrogen bonds"}),sulfurDistanceMax:o.a.Numeric(4.1,{min:1,max:5,step:.1})}),X=Object(i.a)({},q);function Y(e,t){var r=d.a.get(e).value;if(!r)throw Error("expected valence model to be available");var n=r.get(t.id);if(!n)throw Error("expected valence model for unit to be available");return n}function K(e,t){var r=e.rings,n=r.elementAromaticRingIndices,a=r.all,i=n.get(t);if(void 0===i)return!1;for(var o=0,s=i.length;on.maxDonAngleDev}))){if(3===t.idealGeometry[a])if(void 0!==(h=Object(M.d)(e,t.unit,a,r.unit,i))&&h>n.maxDonOutOfPlaneAngle)return;var p=Object(M.c)(e,r.unit,i,t.unit,a),f=M.a.get(r.idealGeometry[i])||ee;if(!p.some((function(e){return f-e>n.maxAccAngleDev}))){var h;if(3===r.idealGeometry[i])if(void 0!==(h=Object(M.d)(e,r.unit,i,t.unit,a))&&h>n.maxAccOutOfPlaneAngle)return;return!0}}}}function re(e,t,r,n,a){var i=t.types[t.feature],o=r.types[r.feature];if(u=o,5===(s=i)&&4===u||4===s&&5===u){var s,u,c,l,d,p,f=5===o?[t,r]:[r,t],h=f[0],m=f[1],g=h.members[h.offsets[h.feature]],b=m.members[m.offsets[m.feature]];if(!(n>("S"===Object(O.i)(h.unit,g)||"S"===Object(O.i)(m.unit,b)?a.maxSulfurDistSq:a.maxDistSq)))if(a.includeWater||(c=h.unit,l=g,d=m.unit,p=b,!Q(c,l)||!Q(d,p)))if(te(e,h,m,a))return 4}}var ne=n.Provider([4],(function(e,t,r){for(var n=Y(e,t).totalH,a=t.elements,i=t.model.atomicConformation,o=i.x,s=i.y,u=i.z,c=t.rings.elementAromaticRingIndices,l=0,d=a.length;l0&&("N"===p||"O"===p||"S"===p))&&r.add(4,0,o[a[l]],s[a[l]],u[a[l]],l)}})),ae=n.Provider([9],(function(e,t,r){for(var n=Y(e,t).totalH,a=t.elements,i=t.model.atomicConformation,o=i.x,s=i.y,u=i.z,c=0,l=a.length;c0&&(Object(O.d)(e,t,c,"N")>0||Object(O.d)(e,t,c,"O")>0||K(t,c))&&r.add(9,0,o[a[c]],s[a[c]],u[a[c]],c)})),ie=n.Provider([5],(function(e,t,r){for(var n=Y(e,t),a=n.charge,i=n.implicitH,o=n.idealGeometry,s=t.elements,u=t.model.atomicConformation,c=u.x,l=u.y,d=u.z,p=t.rings.elementAromaticRingIndices,f=function(e){r.add(5,0,c[s[e]],l[s[e]],d[s[e]],e)},h=0,m=s.length;h0&&!c.has(v)&&r.add(1,0,o[a[v]],s[a[v]],u[a[v]],v)}}})),Be=n.Provider([3],(function(e,t,r){for(var n=t.elements,a=t.model.atomicConformation,i=a.x,o=a.y,s=a.z,u=0,c=t.rings.aromaticRings;u=Pe-a.angleDevMax)return 3;if(u<=a.angleDevMax+Te&&u>=Te-a.angleDevMax)return 3}}}(0,r,n,0,t)}}}},Fe={name:"cation-pi",params:be,createTester:function(e){var t=function(e){return{offsetMax:e.offsetMax}}(e);return{maxDistance:e.distanceMax,requiredFeatures:new Set([3,1]),getType:function(e,r,n,a){return function(e,t,r,n,a){var i,o,s=t.types[t.feature],u=r.types[r.feature];if(o=u,3===(i=s)&&1===o||1===i&&3===o){var c=3===s?[t,r]:[r,t],l=c[0],d=c[1];if(Ae(Ie,l),Ee(d,l,Ie)<=a.offsetMax)return 2}}(0,r,n,0,t)}}}},ze={distanceMax:o.a.Numeric(4,{min:1,max:5,step:.1})};var Ue=n.Provider([8],(function(e,t,r){for(var n=t.elements,a=t.model.atomicConformation,i=a.x,o=a.y,s=a.z,u=function(a,u){var c=Object(O.i)(t,a),l=!1;"C"===c?(l=!0,Object(O.g)(e,t,a,(function(e,t){var r=Object(O.i)(e,t);"C"!==r&&"H"!==r&&(l=!1)}))):"F"===c&&(l=!0),l&&r.add(8,0,i[n[a]],o[n[a]],s[n[a]],a)},c=0,l=n.length;c1||g[c+1]-g[c]>1)&&(b.granularity="residue"),[t(r,a),Object(lt.b)(s.b.Location(e,i,p[f[o]],e,u,m[g[c]]),b)].join("
    ")}e.Location=function(e,t,r,n,a,i){return Object(st.a)("interactions",{structure:t,interactions:e},{unitA:r,indexA:n,unitB:a,indexB:i})},e.isLocation=function(e){return!!e&&"data-location"===e.kind&&"interactions"===e.tag},e.areLocationsEqual=function(e,t){return e.data.structure===t.data.structure&&e.data.interactions===t.data.interactions&&e.element.indexA===t.element.indexA&&e.element.indexB===t.element.indexB&&e.element.unitA===t.element.unitA&&e.element.unitB===t.element.unitB},e.locationLabel=function(e){return t(e.data.interactions,e.element)},e.Loci=function(e,t,n){return Object(ct.a)("interactions",{structure:e,interactions:t},n,(function(e){return r(t,n,e)}),(function(){return a(e,t,n)}))},e.isLoci=function(e){return!!e&&"data-loci"===e.kind&&"interactions"===e.tag},e.getBoundingSphere=r,e.getLabel=a}(ot||(ot={}));var pt=[ne,ae,ie,De,Re,Be,U,V,Ue,Qe,Ze],ft={ionic:Le,"pi-stacking":Ne,"cation-pi":Fe,"halogen-bonds":H,"hydrogen-bonds":oe,"weak-hydrogen-bonds":se,hydrophobic:Ve,"metal-coordination":Je};var ht=function(e){void 0===e&&(e=[]);var t=Object.create(null);return Object.keys(ft).forEach((function(r){t[r]=o.a.MappedStatic(e.includes(r)?"on":"off",{on:o.a.Group(ft[r].params),off:o.a.Group({})},{cycle:!0})})),t}(["cation-pi","pi-stacking","hydrogen-bonds","halogen-bonds","metal-coordination"]),mt={providers:o.a.Group(ht,{isFlat:!0}),contacts:o.a.Group(j,{label:"Advanced Options"})};function gt(e,t,r){return Object(i.b)(this,void 0,void 0,(function(){var u,c,f,g,b,v,y,x,O,j,_,w,C,A,E,P;return Object(i.d)(this,(function(M){switch(M.label){case 0:return u=Object(i.a)(Object(i.a)({},o.a.getDefaultValues(mt)),r),[4,d.a.attach(e,t)];case 1:M.sent(),c=[],Object(dt.a)(ft).forEach((function(e){var t=u.providers[e],r=t.name,n=t.params;"on"===r&&c.push(ft[e].createTester(n))})),f=new Set,c.forEach((function(e){return He.a.add(f,e.requiredFeatures)})),g=pt.filter((function(e){return He.a.areIntersecting(f,e.types)})),b=l.a.Mutable(),v=l.a.Mutable(),y=0,x=t.unitSymmetryGroups.length,M.label=2;case 2:return yj)){var E=h.find(b[0],b[1],b[2],v),P=E.indices,I=E.count,M=E.squaredDistances;if(0!==I){w.feature=A;for(var D=0;De)return!1;for(;;){var a;if(!(a=w.tryGetAdd()))break;if(S(a),++n%100==0&&Object(l.b)()-t>e)return!1}return r.sort(g),!0}(e)},get needsCommit(){return!w.isEmpty},has:function(e){return t.has(e)},clear:function(){for(var e=0,n=r.length;e0},e.hasProtein=function(e){for(var t=e.entities.subtype,r=0,n=t.rowCount;r=0)return!0}return!1}function x(e){if(!f.a.is(e.sourceData))return!1;for(var t=e.sourceData.data.db,r=0;r=0)return!0}return!1}function O(e){if(!f.a.is(e.sourceData))return!1;if(!y(e))return!1;var t=e.sourceData.data.db.pdbx_database_status.status_code_sf;return t.isDefined&&"REL"===t.value(0)}function j(e){if(!f.a.is(e.sourceData))return!1;for(var t=e.sourceData.data.db,r=t.pdbx_database_related,n=r.db_name,a=r.content_type,i=0,o=t.pdbx_database_related._rowCount;i=0)return!0}return!1},e.hasXrayMap=O,e.hasEmMap=j,e.hasDensityMap=S,e.probablyHasDensityMap=function(e){if(!f.a.is(e.sourceData))return!1;var t=e.sourceData.data.db;return S(e)||r(e)&&(!t.exptl.method.isDefined||y(e)&&(!t.pdbx_database_status.status_code_sf.isDefined||2===t.pdbx_database_status.status_code_sf.valueKind(0))||x(e)&&!t.pdbx_database_related.db_name.isDefined)}}(u||(u={}))},function(e,t,r){"use strict";r.d(t,"a",(function(){return m})),r.d(t,"b",(function(){return x}));var n=r(576),a=r(715),i=r(586),o=r(583),s=r(587);function u(e){for(var t=function(e,t){return{startVertex:0,endVertex:0,count:0,visited:new Int32Array(t),queue:new Int32Array(t),pred:new Int32Array(t),left:new Int32Array(4),right:new Int32Array(4),color:new Int32Array(t),currentColor:0,currentAltLoc:"",hasAltLoc:!1,rings:[],currentRings:[],unit:e,bonds:e.bonds,altLoc:e.model.atomicHierarchy.atoms.label_alt_id}}(e,function(e){var t=n.e.transientSegments(e.model.atomicHierarchy.residueAtomSegments,e.elements),r=0;for(;t.hasNext;){var a=t.move();r=Math.max(r,a.end-a.start)}return r}(e)),r=n.e.transientSegments(e.model.atomicHierarchy.residueAtomSegments,e.elements);r.hasNext;){var a=r.move();l(t,a.start,a.end)}return t.rings}function c(e){e.count=e.endVertex-e.startVertex;for(var t=e.visited,r=e.pred,n=e.color,a=0;a=0||p(e,o)}else for(var l=0;l=0))(u=e.altLoc.value(a[e.startVertex+o]))&&u!==e.currentAltLoc||p(e,o)}}o=0;for(var d=e.currentRings.length;o=0;d--)b[v++]=e.startVertex+u[d];if(Object(o.q)(b),e.hasAltLoc)for(var y=0,x=e.currentRings.length;y=a)&&i.d.isCovalent(p[x])){if(e.hasAltLoc){var j=e.altLoc.value(c[O]);if(j&&e.currentAltLoc!==j)continue}var S=O-n;o[S]>0?u[S]!==g&&u[g]!==S&&d(e,g,S):(o[S]=1,s[m++]=S,u[S]=g)}}}function f(e){for(var t=e.length,r=new Int32Array(2*t),n=0;n=b||p.addEdge(i,b)}}}var v=a.a.connectedComponents(p.getGraph()),y=v.componentIndex,x=[];for(s=0;s=0&&(r.has(s)?r.get(s).push(o):r.set(s,[o]))}}!function(e){function t(e){return function(e){for(var t=e.length,r=new Array(t),n=0;n=e.capacity){var a=e.entries.first;n=a.value.data,e.entries.remove(a)}return e.entries.addLast(function(e,t){return{key:e,data:t}}(t,r)),n};var h=r(842),m=r(672),g=r(905),b=r(597),v=r(582),y=r(575),x=r(584),O=r(720),j=r(894),S=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(i.c)(t,e),t}(s.a.CreateBehavior({name:"Volume Streaming"}));!function(e){function t(e,t,r,n,a){var i,s,c,l;return void 0===a&&(a={}),o.a.Group({isoValue:u.b.createIsoValueParam(null!==(i=a.isoValue)&&void 0!==i?i:r,n),color:o.a.Color(null!==(s=a.color)&&void 0!==s?s:t),wireframe:o.a.Boolean(null!==(c=a.wireframe)&&void 0!==c&&c),opacity:o.a.Numeric(null!==(l=a.opacity)&&void 0!==l?l:.3,{min:0,max:1,step:.01})},{label:e,isExpanded:!0})}e.RootTag="volume-streaming-info";var r={byteOffset:0,rate:1,sampleCount:[1,1,1],valuesInfo:[{mean:0,min:-1,max:1,sigma:.1},{mean:0,min:-1,max:1,sigma:.1}]};function a(n){var a=n.entryData,i=n.defaultView,s=n.structure,p=n.channelParams,f=void 0===p?{}:p,h=a||{kind:"em",header:{sampling:[r],availablePrecisions:[{precision:0,maxVoxels:0}]},emDefaultContourLevel:u.b.IsoValue.relative(0)},m=s&&s.boundary.box||Object(c.b)();return{view:o.a.MappedStatic(i||("em"===h.kind?"cell":"selection-box"),{off:o.a.Group({}),box:o.a.Group({bottomLeft:o.a.Vec3(m.min),topRight:o.a.Vec3(m.max)},{description:"Static box defined by cartesian coords.",isFlat:!0}),"selection-box":o.a.Group({radius:o.a.Numeric(5,{min:0,max:50,step:.5},{description:"Radius in Å within which the volume is shown."}),bottomLeft:o.a.Vec3(l.g.create(0,0,0),{},{isHidden:!0}),topRight:o.a.Vec3(l.g.create(0,0,0),{},{isHidden:!0})},{description:"Box around focused element.",isFlat:!0}),cell:o.a.Group({}),auto:o.a.Group({radius:o.a.Numeric(5,{min:0,max:50,step:.5},{description:"Radius in Å within which the volume is shown."}),selectionDetailLevel:o.a.Select(Math.min(6,h.header.availablePrecisions.length-1),h.header.availablePrecisions.map((function(e,t){return[t,t+1+" [ "+(0|Math.pow(e.maxVoxels,1/3))+"^3 cells ]"]})),{label:"Selection Detail",description:"Determines the maximum number of voxels. Depending on the size of the volume options are in the range from 0 (0.52M voxels) to 6 (25.17M voxels)."}),isSelection:o.a.Boolean(!1,{isHidden:!0}),bottomLeft:o.a.Vec3(m.min,{},{isHidden:!0}),topRight:o.a.Vec3(m.max,{},{isHidden:!0})},{description:"Box around focused element.",isFlat:!0})},{options:e.ViewTypeOptions,description:'Controls what of the volume is displayed. "Off" hides the volume alltogether. "Bounded box" shows the volume inside the given box. "Around Interaction" shows the volume around the focused element/atom. "Whole Structure" shows the volume for the whole structure.'}),detailLevel:o.a.Select(Math.min(3,h.header.availablePrecisions.length-1),h.header.availablePrecisions.map((function(e,t){return[t,t+1+" [ "+(0|Math.pow(e.maxVoxels,1/3))+"^3 cells ]"]})),{description:"Determines the maximum number of voxels. Depending on the size of the volume options are in the range from 0 (0.52M voxels) to 6 (25.17M voxels)."}),channels:"em"===h.kind?o.a.Group({em:t("EM",Object(d.a)(6524815),h.emDefaultContourLevel||u.b.IsoValue.relative(1),h.header.sampling[0].valuesInfo[0],f.em)},{isFlat:!0}):o.a.Group({"2fo-fc":t("2Fo-Fc",Object(d.a)(3367602),u.b.IsoValue.relative(1.5),h.header.sampling[0].valuesInfo[0],f["2fo-fc"]),"fo-fc(+ve)":t("Fo-Fc(+ve)",Object(d.a)(3390259),u.b.IsoValue.relative(3),h.header.sampling[0].valuesInfo[1],f["fo-fc(+ve)"]),"fo-fc(-ve)":t("Fo-Fc(-ve)",Object(d.a)(12268339),u.b.IsoValue.relative(-3),h.header.sampling[0].valuesInfo[1],f["fo-fc(-ve)"])},{isFlat:!0})}}e.createParams=function(e){void 0===e&&(e={});var t=e.data,r=e.defaultView,n=e.channelParams,i=new Map;t&&t.entries.forEach((function(e){return i.set(e.dataId,e)}));var s=t?t.entries.map((function(e){return[e.dataId,e.dataId]})):[],u=t?t.entries[0].dataId:"";return{entry:o.a.Mapped(u,s,(function(e){return o.a.Group(a({entryData:i.get(e),defaultView:r,structure:t&&t.structure,channelParams:n}))}))}},e.createEntryParams=a,e.ViewTypeOptions=[["off","Off"],["box","Bounded Box"],["selection-box","Around Focus"],["cell","Whole Structure"],["auto","Auto"]],e.ChannelTypeOptions=[["em","em"],["2fo-fc","2fo-fc"],["fo-fc(+ve)","fo-fc(+ve)"],["fo-fc(-ve)","fo-fc(-ve)"]];var f=function(e){function t(t,r){var a=e.call(this,t,{})||this;return a.plugin=t,a.data=r,a.cache=n.create(25),a.params={},a.lastLoci=x.b,a.ref="",a.channels={},a._invTransform=Object(l.c)(),a.infoMap=new Map,a.data.entries.forEach((function(e){return a.infoMap.set(e.dataId,e)})),a}return Object(i.c)(t,e),Object.defineProperty(t.prototype,"info",{get:function(){return this.infoMap.get(this.params.entry.name)},enumerable:!1,configurable:!0}),t.prototype.queryData=function(e){return Object(i.b)(this,void 0,void 0,(function(){var t,r,a,o,s,u,c,l,d;return Object(i.d)(this,(function(i){switch(i.label){case 0:return t=Object(h.a)(this.data.serverUrl,this.info.kind+"/"+this.info.dataId.toLowerCase()),e?(r=e.min,a=e.max,t+="/box/"+r.map((function(e){return Math.round(1e3*e)/1e3})).join(",")+"/"+a.map((function(e){return Math.round(1e3*e)/1e3})).join(",")):t+="/cell",o=this.params.entry.params.detailLevel,"auto"===this.params.entry.params.view.name&&this.params.entry.params.view.params.isSelection&&(o=this.params.entry.params.view.params.selectionDetailLevel),t+="?detail="+o,(s=n.get(this.cache,t))?[2,s.data]:(u=O.a.getUrlAsset(this.plugin.managers.asset,t),[4,this.plugin.runTask(this.plugin.managers.asset.resolve(u,"binary"))]);case 1:return c=i.sent(),[4,this.parseCif(c.data)];case 2:return(l=i.sent())?((d=n.set(this.cache,t,{data:l,asset:c}))&&d.asset.dispose(),[2,l]):[2]}}))}))},t.prototype.parseCif=function(e){return Object(i.b)(this,void 0,void 0,(function(){var t,r,n,a,o,s;return Object(i.d)(this,(function(i){switch(i.label){case 0:return[4,this.plugin.runTask(m.a.parseBinary(e))];case 1:if((t=i.sent()).isError)return this.plugin.log.error("VolumeStreaming, parsing CIF: "+t.toString()),[2];if(t.result.blocks.length<2)return this.plugin.log.error("VolumeStreaming: Invalid data."),[2];r={},n=1,i.label=2;case 2:return n=0;r--)t=i(t,e.encoding[r]);return t}function i(e,t){switch(t.kind){case"ByteArray":switch(t.type){case 4:return e;case 1:return function(e){return new Int8Array(e.buffer,e.byteOffset)}(e);case 2:return function(e){return u(e,2,Int16Array)}(e);case 5:return function(e){return u(e,2,Uint16Array)}(e);case 3:return function(e){return u(e,4,Int32Array)}(e);case 6:return function(e){return u(e,4,Uint32Array)}(e);case 32:return function(e){return u(e,4,Float32Array)}(e);case 33:return function(e){return u(e,8,Float64Array)}(e);default:throw new Error("Unsupported ByteArray type.")}case"FixedPoint":return function(e,t){for(var r=e.length,n=s(t.srcType,r),a=1/t.factor,i=0;i0&&(e.chunks[e.chunks.length]=e.current.length===e.offset?e.current.join(""):e.current.slice(0,e.offset).join("")),e.chunks.join("")):e.current.length===e.offset?e.current.join(""):e.current.splice(0,e.offset).join("")},e.getSize=function(e){for(var t=0,r=0,n=e.chunks;r0&&(e.current.length===e.offset?e.chunks[e.chunks.length]=e.current.join(""):e.chunks[e.chunks.length]=e.current.slice(0,e.offset).join(""),e.offset=0),e.chunks};var t=[];function r(e,r){r>0&&n(e,t[r])}function n(e,t){e.offset===e.capacity&&(e.chunks[e.chunks.length]=e.current.join(""),e.offset=0),e.current[e.offset++]=t}!function(){for(var e="",r=0;r<512;r++)t[r]=e,e+=" "}(),e.newline=function(e){n(e,"\n")},e.whitespace=r,e.whitespace1=function(e){n(e," ")},e.write=function(e,t){t&&(e.offset===e.capacity&&(e.chunks[e.chunks.length]=e.current.join(""),e.offset=0),e.current[e.offset++]=t)},e.writeSafe=n,e.writePadLeft=function(e,t,a){t?(r(e,a-t.length),n(e,t)):r(e,a)},e.writePadRight=function(e,t,a){if(t){var i=a-t.length;n(e,t),r(e,i)}else r(e,a)},e.writeInteger=function(e,t){n(e,""+t)},e.writeIntegerAndSpace=function(e,t){n(e,t+" ")},e.writeIntegerPadLeft=function(e,t,a){var i=""+t;r(e,a-i.length),n(e,i)},e.writeIntegerPadRight=function(e,t,a){var i=""+t,o=a-i.length;n(e,i),r(e,o)},e.writeFloat=function(e,t,r){n(e,""+Math.round(r*t)/r)},e.writeFloatPadLeft=function(e,t,a,i){var o=""+Math.round(a*t)/a;r(e,i-o.length),n(e,o)},e.writeFloatPadRight=function(e,t,a,i){var o=""+Math.round(a*t)/a,s=i-o.length;n(e,o),r(e,s)}}(n||(n={}))},function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(630),a=r(875);function i(){return i.zero()}!function(e){function t(){var e=[.1,0,0];return e[0]=0,e}e.zero=t,e.create=function(e,r,n){var a=t();return a[0]=e,a[1]=r,a[2]=n,a};var r=[0,0,0];e.fromColor=function(e,t){return a.a.toHcl(e,a.a.fromColor(r,t))},e.fromLab=function(e,t){return a.a.toHcl(e,t)};var i=[0,0,0];function o(e,t){var r=t[0],a=t[1],i=t[2];return isNaN(r)&&(r=0),r=Object(n.c)(r),e[0]=i,e[1]=Math.cos(r)*a,e[2]=Math.sin(r)*a,e}function s(e,t,r){return e[0]=t[0],e[1]=Math.max(0,t[1]+l*r),e[2]=t[2],e}e.toColor=function(e){return a.a.toColor(o(i,e))},e.toLab=o,e.copy=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},e.saturate=s,e.desaturate=function(e,t,r){return s(e,t,-r)};var u=[0,0,0];function c(e,t,r){return o(u,t),a.a.toHcl(e,a.a.darken(u,u,r))}e.darken=c,e.lighten=function(e,t,r){return c(e,t,-r)};var l=18}(i||(i={}))},function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var n=r(654),a=r(874),i=r(630),o=r(655);function s(){return s.zero()}!function(e){function t(){var e=[.1,0,0];return e[0]=0,e}function r(e,t){var r=t[0],n=t[1],a=t[2],o=Math.sqrt(n*n+a*a),s=(Object(i.f)(Math.atan2(a,n))+360)%360;return 0===Math.round(1e4*o)&&(s=Number.NaN),e[0]=s,e[1]=o,e[2]=r,e}function s(e,t,r){return e[0]=t[0]-l*r,e[1]=t[1],e[2]=t[2],e}e.zero=t,e.create=function(e,r,n){var a=t();return a[0]=e,a[1]=r,a[2]=n,a},e.fromColor=function(e,t){var r=n.a.toRgb(t),a=function(e,t,r){e=v(e),t=v(t),r=v(r);var n=y((.4124564*e+.3575761*t+.1804375*r)/d),a=y((.2126729*e+.7151522*t+.072175*r)/p),i=y((.0193339*e+.119192*t+.9503041*r)/f);return[n,a,i]}(r[0],r[1],r[2]),i=a[0],o=a[1],s=a[2],u=116*o-16;return e[0]=u<0?0:u,e[1]=500*(i-o),e[2]=200*(o-s),e},e.fromHcl=function(e,t){return a.a.toLab(e,t)},e.toColor=function(e){var t=(e[0]+16)/116,r=isNaN(e[1])?t:t+e[1]/500,a=isNaN(e[2])?t:t-e[2]/200;t=p*b(t);var i=g(3.2404542*(r=d*b(r))-1.5371385*t-.4985314*(a=f*b(a))),s=g(-.969266*r+1.8760108*t+.041556*a),u=g(.0556434*r-.2040259*t+1.0572252*a);return n.a.fromRgb(Math.round(Object(o.a)(i,0,255)),Math.round(Object(o.a)(s,0,255)),Math.round(Object(o.a)(u,0,255)))},e.toHcl=r,e.copy=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},e.darken=s,e.lighten=function(e,t,r){return s(e,t,-r)};var u=[0,0,0];function c(e,t,n){return r(u,t),a.a.toLab(e,a.a.saturate(u,u,n))}e.saturate=c,e.desaturate=function(e,t,r){return c(e,t,-r)};var l=18,d=.95047,p=1,f=1.08883,h=.137931034,m=.12841855;function g(e){return 255*(e<=.00304?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function b(e){return e>.206896552?e*e*e:m*(e-h)}function v(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function y(e){return e>.008856452?Math.pow(e,1/3):e/m+h}}(s||(s={}))},function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var n,a=r(572),i=r(654),o=r(702),s=r(577),u=r(703),c=r(576),l=r(655),d={domain:[0,1],reverse:!1,listOrName:"red-yellow-blue",minLabel:"",maxLabel:""};!function(e){e.create=function(e){var t=Object(a.a)(Object(a.a)({},d),e),r=t.domain,n=t.reverse,p=t.listOrName,f="string"==typeof p?Object(o.e)(p).list:p,h=n?f.slice().reverse():f,m=h.length-1,g=0,b=0,v=0;function y(e,t){g=(v=t)-(b=e)||1}y(r[0],r[1]);var x,O=Object(s.h)(e.minLabel,b.toString()),j=Object(s.h)(e.maxLabel,v.toString());if(h.every((function(e){return Array.isArray(e)}))){var S=Object(a.e)([],h);S.sort((function(e,t){return e[1]-t[1]}));var _=S.map((function(e){return e[0]})),w=c.f.ofSortedArray(S.map((function(e){return e[1]}))),C=_.length-1;x=function(e){var t=Object(l.a)((e-b)/g,0,1),r=c.f.findPredecessorIndex(w,t);if(0===r)return _[b];if(r>C)return _[C];var n=w[r-1],a=w[r],o=Object(l.a)((t-n)/(a-n),0,1);return i.a.interpolate(_[r-1],_[r],o)}}else x=function(e){var t=Math.min(h.length-1,Math.max(0,(e-b)/g*m)),r=Math.floor(t),n=h[r],a=h[Math.ceil(t)];return i.a.interpolate(n,a,t-r)};return{color:x,colorToArray:function(e,t,r){i.a.toArray(x(e),t,r)},normalizedColorToArray:function(e,t,r){i.a.toArrayNormalized(x(e),t,r)},setDomain:y,get legend(){return Object(u.a)(O,j,h)}}}}(n||(n={}))},function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var n,a=r(583);!function(e){e.Zero=0;var t,r,n=(t=new ArrayBuffer(8),r=new ArrayBuffer(8),{_int32:new Int32Array(t),_float64:new Float64Array(t),_int32_1:new Int32Array(r),_float64_1:new Float64Array(r)}),i=n._int32,o=n._float64,s=n._int32_1,u=n._float64_1;e.is=function(e){return"number"==typeof e},e.create=function(e,t){return i[0]=e,i[1]=t,o[0]},e.fst=function(e){return o[0]=e,i[0]},e.snd=function(e){return o[0]=e,i[1]},e.areEqual=function(e,t){return o[0]=e,u[0]=t,i[0]===s[0]&&i[1]===s[1]},e.compare=function(e,t){o[0]=e,u[0]=t;var r=i[0]-s[0];return 0!==r?r:i[1]-s[1]},e.compareInArray=function(e,t,r){o[0]=e[t],u[0]=e[r];var n=i[0]-s[0];return 0!==n?n:i[1]-s[1]},e.hashCode=function(e){return o[0]=e,Object(a.i)(i[0],i[1])},e.toString=function(e){return o[0]=e,"("+i[0]+", "+i[1]+")"}}(n||(n={}))},function(e,t,r){"use strict";function n(e,t){for(var r=0,n=e.length;r0&&u?[4,t.builders.data.downloadBlob({sources:o.map((function(e,t){return{id:""+t,url:e.url,isBinary:e.isBinary}})),maxConcurrency:6},{state:{isGhost:!0}})]:[3,4];case 1:return e=n.sent(),[4,t.builders.structure.parseTrajectory(e,{formats:o.map((function(e,t){return{id:""+t,format:"cif"}}))})];case 2:return h=n.sent(),[4,t.builders.structure.hierarchy.applyPreset(h,"default",{structure:p,showUnitcell:d,representationPreset:l,representationPresetParams:r.source.params.options.representationParams})];case 3:return n.sent(),[3,10];case 4:a=0,i=o,n.label=5;case 5:return a=4||/^[1-9][0-9]*$/.test(e))}));i=0}))}(r)?null===(u=t.theme)||void 0===u?void 0:u.symmetryColor:m,typeParams:d,ballAndStickColor:g}},e.updateFocusRepr=function(e,t,r,n){return e.state.updateBehavior(l.a,(function(a){var i=Object(d.a)(e,t,"ball-and-stick",r||"element-symbol",n);a.surroundingsParams.colorTheme=i,a.targetParams.colorTheme=i}))}}(b||(b={}));var v=b.CommonParams,y=b.reprBuilder,x=b.updateFocusRepr,O=b({id:"preset-structure-representation-auto",display:{name:"Automatic",description:"Show representations based on the size of the structure. Smaller structures are shown with more detail than larger ones, ranging from atomistic display to coarse surfaces."},params:function(){return v},apply:function(e,t,r){var a,i,u=null===(i=null===(a=s.d.resolveAndCheck(r.state.data,e))||void 0===a?void 0:a.obj)||void 0===i?void 0:i.data;if(!u)return{};var l=r.config.get(c.a.Structure.SizeThresholds)||o.g.DefaultSizeThresholds,d=o.g.getSize(u,l),p=u.polymerResidueCount/u.polymerGapCount;switch(d){case o.g.Size.Gigantic:case o.g.Size.Huge:return w.apply(e,t,r);case o.g.Size.Large:return C.apply(e,t,r);case o.g.Size.Medium:if(p>3)return S.apply(e,t,r);case o.g.Size.Small:return A.apply(e,Object(n.a)(Object(n.a)({},t),{showCarbohydrateSymbol:!0}),r);default:Object(g.b)(d)}}}),j=b({id:"preset-structure-representation-empty",display:{name:"Empty",description:"Removes all existing representations."},apply:function(e,t,r){return Object(n.b)(this,void 0,void 0,(function(){return Object(n.d)(this,(function(e){return[2,{}]}))}))}}),S=b({id:"preset-structure-representation-polymer-and-ligand",display:{name:"Polymer & Ligand",group:"Basic",description:"Shows polymers as Cartoon, ligands as Ball & Stick, carbohydrates as 3D-SNFG and water molecules semi-transparent."},params:function(){return v},apply:function(e,t,r){var a,i,o,u,c,l,d,p,f,h;return Object(n.b)(this,void 0,void 0,(function(){var m,g,b,v,O,j,S,_,w,C,A,P,T,I,k;return Object(n.d)(this,(function(M){switch(M.label){case 0:return(m=s.d.resolveAndCheck(r.state.data,e))?(k={},[4,E(r,m,"polymer")]):[2,{}];case 1:return k.polymer=M.sent(),[4,E(r,m,"ligand")];case 2:return k.ligand=M.sent(),[4,E(r,m,"non-standard")];case 3:return k.nonStandard=M.sent(),[4,E(r,m,"branched",{label:"Carbohydrate"})];case 4:return k.branched=M.sent(),[4,E(r,m,"water")];case 5:return k.water=M.sent(),[4,E(r,m,"ion")];case 6:return k.ion=M.sent(),[4,E(r,m,"lipid")];case 7:return k.lipid=M.sent(),[4,E(r,m,"coarse")];case 8:return k.coarse=M.sent(),g=k,b=m.obj.data,v={sizeFactor:b.isCoarseGrained?.8:.2},O=((null===(o=null===(i=null===(a=g.water)||void 0===a?void 0:a.obj)||void 0===i?void 0:i.data)||void 0===o?void 0:o.elementCount)||0)>5e4?"line":"ball-and-stick",j=((null===(l=null===(c=null===(u=g.lipid)||void 0===u?void 0:u.obj)||void 0===c?void 0:c.data)||void 0===l?void 0:l.elementCount)||0)>2e4?"line":"ball-and-stick",S=y(r,t,b),_=S.update,w=S.builder,C=S.typeParams,A=S.color,P=S.symmetryColor,T=S.ballAndStickColor,I={polymer:w.buildRepresentation(_,g.polymer,{type:"cartoon",typeParams:Object(n.a)(Object(n.a)({},C),v),color:P},{tag:"polymer"}),ligand:w.buildRepresentation(_,g.ligand,{type:"ball-and-stick",typeParams:C,color:A,colorParams:T},{tag:"ligand"}),nonStandard:w.buildRepresentation(_,g.nonStandard,{type:"ball-and-stick",typeParams:C,color:A,colorParams:T},{tag:"non-standard"}),branchedBallAndStick:w.buildRepresentation(_,g.branched,{type:"ball-and-stick",typeParams:Object(n.a)(Object(n.a)({},C),{alpha:.3}),color:A,colorParams:T},{tag:"branched-ball-and-stick"}),branchedSnfg3d:w.buildRepresentation(_,g.branched,{type:"carbohydrate",typeParams:C,color:A},{tag:"branched-snfg-3d"}),water:w.buildRepresentation(_,g.water,{type:O,typeParams:Object(n.a)(Object(n.a)({},C),{alpha:.6}),color:A,colorParams:{carbonColor:{name:"element-symbol",params:{}}}},{tag:"water"}),ion:w.buildRepresentation(_,g.ion,{type:"ball-and-stick",typeParams:C,color:A,colorParams:{carbonColor:{name:"element-symbol",params:{}}}},{tag:"ion"}),lipid:w.buildRepresentation(_,g.lipid,{type:j,typeParams:Object(n.a)(Object(n.a)({},C),{alpha:.6}),color:A,colorParams:{carbonColor:{name:"element-symbol",params:{}}}},{tag:"lipid"}),coarse:w.buildRepresentation(_,g.coarse,{type:"spacefill",typeParams:C,color:A||"chain-id"},{tag:"coarse"})},[4,_.commit({revertOnError:!1})];case 9:return M.sent(),[4,x(r,b,null===(p=null===(d=t.theme)||void 0===d?void 0:d.focus)||void 0===p?void 0:p.name,null===(h=null===(f=t.theme)||void 0===f?void 0:f.focus)||void 0===h?void 0:h.params)];case 10:return M.sent(),[2,{components:g,representations:I}]}}))}))}}),_=b({id:"preset-structure-representation-protein-and-nucleic",display:{name:"Protein & Nucleic",group:"Basic",description:"Shows proteins as Cartoon and RNA/DNA as Gaussian Surface."},params:function(){return v},apply:function(e,t,r){var a,i,o,u;return Object(n.b)(this,void 0,void 0,(function(){var c,l,d,p,f,h,m,g,b,v,O,j;return Object(n.d)(this,(function(S){switch(S.label){case 0:return(c=s.d.resolveAndCheck(r.state.data,e))?(j={},[4,P(r,c,"protein")]):[2,{}];case 1:return j.protein=S.sent(),[4,P(r,c,"nucleic")];case 2:return j.nucleic=S.sent(),l=j,d=c.obj.data,p={sizeFactor:d.isCoarseGrained?.8:.2},f={radiusOffset:d.isCoarseGrained?2:0,smoothness:d.isCoarseGrained?1:1.5},h=y(r,t,d),m=h.update,g=h.builder,b=h.typeParams,v=h.symmetryColor,O={protein:g.buildRepresentation(m,l.protein,{type:"cartoon",typeParams:Object(n.a)(Object(n.a)({},b),p),color:v},{tag:"protein"}),nucleic:g.buildRepresentation(m,l.nucleic,{type:"gaussian-surface",typeParams:Object(n.a)(Object(n.a)({},b),f),color:v},{tag:"nucleic"})},[4,m.commit({revertOnError:!0})];case 3:return S.sent(),[4,x(r,d,null===(i=null===(a=t.theme)||void 0===a?void 0:a.focus)||void 0===i?void 0:i.name,null===(u=null===(o=t.theme)||void 0===o?void 0:o.focus)||void 0===u?void 0:u.params)];case 4:return S.sent(),[2,{components:l,representations:O}]}}))}))}}),w=b({id:"preset-structure-representation-coarse-surface",display:{name:"Coarse Surface",group:"Basic",description:"Shows polymers and lipids as coarse Gaussian Surface."},params:function(){return v},apply:function(e,t,r){var a,i,u,c;return Object(n.b)(this,void 0,void 0,(function(){var l,d,p,f,h,m,g,b,v,O,j,S;return Object(n.d)(this,(function(_){switch(_.label){case 0:return(l=s.d.resolveAndCheck(r.state.data,e))?(S={},[4,E(r,l,"polymer")]):[2,{}];case 1:return S.polymer=_.sent(),[4,E(r,l,"lipid")];case 2:return S.lipid=_.sent(),d=S,p=l.obj.data,f=o.g.getSize(p),h=Object.create(null),f===o.g.Size.Gigantic?Object.assign(h,{traceOnly:!p.isCoarseGrained,radiusOffset:2,smoothness:1,visuals:["structure-gaussian-surface-mesh"]}):f===o.g.Size.Huge?Object.assign(h,{radiusOffset:p.isCoarseGrained?2:0,smoothness:1}):p.isCoarseGrained&&Object.assign(h,{radiusOffset:2,smoothness:1}),m=y(r,t,p),g=m.update,b=m.builder,v=m.typeParams,O=m.symmetryColor,j={polymer:b.buildRepresentation(g,d.polymer,{type:"gaussian-surface",typeParams:Object(n.a)(Object(n.a)({},v),h),color:O},{tag:"polymer"}),lipid:b.buildRepresentation(g,d.lipid,{type:"gaussian-surface",typeParams:Object(n.a)(Object(n.a)({},v),h),color:O},{tag:"lipid"})},[4,g.commit({revertOnError:!0})];case 3:return _.sent(),[4,x(r,p,null===(i=null===(a=t.theme)||void 0===a?void 0:a.focus)||void 0===i?void 0:i.name,null===(c=null===(u=t.theme)||void 0===u?void 0:u.focus)||void 0===c?void 0:c.params)];case 4:return _.sent(),[2,{components:d,representations:j}]}}))}))}}),C=b({id:"preset-structure-representation-polymer-cartoon",display:{name:"Polymer Cartoon",group:"Basic",description:"Shows polymers as Cartoon."},params:function(){return v},apply:function(e,t,r){var a,i,o,u;return Object(n.b)(this,void 0,void 0,(function(){var c,l,d,p,f,h,m,g,b,v,O;return Object(n.d)(this,(function(j){switch(j.label){case 0:return(c=s.d.resolveAndCheck(r.state.data,e))?(O={},[4,E(r,c,"polymer")]):[2,{}];case 1:return O.polymer=j.sent(),l=O,d=c.obj.data,p={sizeFactor:d.isCoarseGrained?.8:.2},f=y(r,t,d),h=f.update,m=f.builder,g=f.typeParams,b=f.symmetryColor,v={polymer:m.buildRepresentation(h,l.polymer,{type:"cartoon",typeParams:Object(n.a)(Object(n.a)({},g),p),color:b},{tag:"polymer"})},[4,h.commit({revertOnError:!0})];case 2:return j.sent(),[4,x(r,d,null===(i=null===(a=t.theme)||void 0===a?void 0:a.focus)||void 0===i?void 0:i.name,null===(u=null===(o=t.theme)||void 0===o?void 0:o.focus)||void 0===u?void 0:u.params)];case 3:return j.sent(),[2,{components:l,representations:v}]}}))}))}}),A=b({id:"preset-structure-representation-atomic-detail",display:{name:"Atomic Detail",group:"Basic",description:"Shows everything in atomic detail with Ball & Stick."},params:function(){return Object(n.a)(Object(n.a)({},v),{showCarbohydrateSymbol:a.a.Boolean(!1)})},apply:function(e,t,r){return Object(n.b)(this,void 0,void 0,(function(){var a,i,o,u,c,l,d,p,f,g,b,v,x,O,j,S,_,w,C,A,P,T;return Object(n.d)(this,(function(I){switch(I.label){case 0:return(a=s.d.resolveAndCheck(r.state.data,e))?(P={},[4,E(r,a,"all")]):[2,{}];case 1:return P.all=I.sent(),P.branched=void 0,i=P,o=a.obj.data,u=o.elementCount>1e5,c=o.atomicResidueCount&&o.elementCount>1e3&&o.atomicResidueCount/o.elementCount<3,l=o.models[0],d=!!h.a.Provider.get(l)||m.a.isExhaustive(l),p="ball-and-stick",o.isCoarseGrained?p=o.elementCount>1e6?"point":"spacefill":c&&!d?p="spacefill":u&&(p="line"),(f=t.showCarbohydrateSymbol&&!u&&!c)?(b=(g=Object).assign,v=[i],T={},[4,E(r,a,"branched",{label:"Carbohydrate"})]):[3,3];case 2:b.apply(g,v.concat([(T.branched=I.sent(),T)])),I.label=3;case 3:return x=y(r,t,o),O=x.update,j=x.builder,S=x.typeParams,_=x.color,w=x.ballAndStickColor,C=c&&!d?{carbonColor:{name:"element-symbol",params:{}}}:w,A={all:j.buildRepresentation(O,i.all,{type:p,typeParams:S,color:_,colorParams:C},{tag:"all"})},f&&Object.assign(A,{snfg3d:j.buildRepresentation(O,i.branched,{type:"carbohydrate",typeParams:Object(n.a)(Object(n.a)({},S),{alpha:.4,visuals:["carbohydrate-symbol"]}),color:_},{tag:"snfg-3d"})}),[4,O.commit({revertOnError:!0})];case 4:return I.sent(),[2,{components:i,representations:A}]}}))}))}});function E(e,t,r,n){return e.builders.structure.tryCreateComponentStatic(t,r,n)}function P(e,t,r,n){return e.builders.structure.tryCreateComponentFromSelection(t,u.b[r],"selection-"+r,n)}var T={empty:j,auto:O,"atomic-detail":A,"polymer-cartoon":C,"polymer-and-ligand":S,"protein-and-nucleic":_,"coarse-surface":w}},function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var n,a=r(577);!function(e){e.create=function(e,t,r,n){return{id:a.c.create22(),label:e,basic:t,sourceData:n,bonds:r}}}(n||(n={}))},function(e,t,r){"use strict";r.d(t,"c",(function(){return s})),r.d(t,"e",(function(){return u})),r.d(t,"d",(function(){return c})),r.d(t,"b",(function(){return n})),r.d(t,"a",(function(){return a}));var n,a,i=r(580),o=r(738),s={type_symbol:i.a.Schema.Aliased(o.a.atom_site.type_symbol),label_atom_id:o.a.atom_site.label_atom_id,auth_atom_id:o.a.atom_site.auth_atom_id,label_alt_id:o.a.atom_site.label_alt_id,label_comp_id:o.a.atom_site.label_comp_id,auth_comp_id:o.a.atom_site.auth_comp_id,pdbx_formal_charge:o.a.atom_site.pdbx_formal_charge},u={group_PDB:o.a.atom_site.group_PDB,label_seq_id:o.a.atom_site.label_seq_id,auth_seq_id:o.a.atom_site.auth_seq_id,pdbx_PDB_ins_code:o.a.atom_site.pdbx_PDB_ins_code},c={label_asym_id:o.a.atom_site.label_asym_id,auth_asym_id:o.a.atom_site.auth_asym_id,label_entity_id:o.a.atom_site.label_entity_id};!function(e){e.EmptyResidueKey=function(){return{label_entity_id:"",label_asym_id:"",auth_seq_id:0,pdbx_PDB_ins_code:void 0}}}(n||(n={})),function(e){function t(e,t){return e.residueAtomSegments.index[e.chainAtomSegments.offsets[t]]}function r(e,t){return e.residueAtomSegments.index[e.chainAtomSegments.offsets[t+1]-1]+1}e.chainStartResidueIndex=t,e.chainEndResidueIndexExcl=r,e.chainResidueCount=function(e,n){return r(e,n)-t(e,n)}}(a||(a={}))},function(e,t,r){"use strict";r.d(t,"c",(function(){return n})),r.d(t,"d",(function(){return o})),r.d(t,"b",(function(){return s})),r.d(t,"a",(function(){return u}));var n={H:1,D:1,T:1,HE:2,LI:3,BE:4,B:5,C:6,N:7,O:8,F:9,NE:10,NA:11,MG:12,AL:13,SI:14,P:15,S:16,CL:17,AR:18,K:19,CA:20,SC:21,TI:22,V:23,CR:24,MN:25,FE:26,CO:27,NI:28,CU:29,ZN:30,GA:31,GE:32,AS:33,SE:34,BR:35,KR:36,RB:37,SR:38,Y:39,ZR:40,NB:41,MO:42,TC:43,RU:44,RH:45,PD:46,AG:47,CD:48,IN:49,SN:50,SB:51,TE:52,I:53,XE:54,CS:55,BA:56,LA:57,CE:58,PR:59,ND:60,PM:61,SM:62,EU:63,GD:64,TB:65,DY:66,HO:67,ER:68,TM:69,YB:70,LU:71,HF:72,TA:73,W:74,RE:75,OS:76,IR:77,PT:78,AU:79,HG:80,TL:81,PB:82,BI:83,PO:84,AT:85,RN:86,FR:87,RA:88,AC:89,TH:90,PA:91,U:92,NP:93,PU:94,AM:95,CM:96,BK:97,CF:98,ES:99,FM:100,MD:101,NO:102,LR:103,RF:104,DB:105,SG:106,BH:107,HS:108,MT:109},a={1:1.1,2:1.4,3:1.81,4:1.53,5:1.92,6:1.7,7:1.55,8:1.52,9:1.47,10:1.54,11:2.27,12:1.73,13:1.84,14:2.1,15:1.8,16:1.8,17:1.75,18:1.88,19:2.75,20:2.31,21:2.3,22:2.15,23:2.05,24:2.05,25:2.05,26:2.05,27:2,28:2,29:2,30:2.1,31:1.87,32:2.11,33:1.85,34:1.9,35:1.83,36:2.02,37:3.03,38:2.49,39:2.4,40:2.3,41:2.15,42:2.1,43:2.05,44:2.05,45:2,46:2.05,47:2.1,48:2.2,49:2.2,50:1.93,51:2.17,52:2.06,53:1.98,54:2.16,55:3.43,56:2.68,57:2.5,58:2.48,59:2.47,60:2.45,61:2.43,62:2.42,63:2.4,64:2.38,65:2.37,66:2.35,67:2.33,68:2.32,69:2.3,70:2.28,71:2.27,72:2.25,73:2.2,74:2.1,75:2.05,76:2,77:2,78:2.05,79:2.1,80:2.05,81:1.96,82:2.02,83:2.07,84:1.97,85:2.02,86:2.2,87:3.48,88:2.83,89:2,90:2.4,91:2,92:2.3,93:2,94:2,95:2,96:2,97:2,98:2,99:2,100:2,101:2,102:2,103:2,104:2,105:2,106:2,107:2,108:2,109:2},i={1:1.008,2:4.0026,3:6.94,4:9.0122,5:10.81,6:10.81,7:14.007,8:15.999,9:18.998,10:20.18,11:22.99,12:24.305,13:26.982,14:28.085,15:30.974,16:32.06,17:35.45,18:39.948,19:39.098,20:40.078,21:44.956,22:47.867,23:50.942,24:51.996,25:54.938,26:55.845,27:58.933,28:58.693,29:63.546,30:65.38,31:69.723,32:72.63,33:74.922,34:78.971,35:79.904,36:83.798,37:85.468,38:87.62,39:88.906,40:91.224,41:92.906,42:95.95,43:96.906,44:101.07,45:102.91,46:106.42,47:107.87,48:112.41,49:114.82,50:118.71,51:121.76,52:127.6,53:127.6,54:131.29,55:132.91,56:137.33,57:138.91,58:140.12,59:140.91,60:144.24,61:144.912,62:150.36,63:151.96,64:157.25,65:158.93,66:162.5,67:164.93,68:167.26,69:168.93,70:173.05,71:174.97,72:178.49,73:180.95,74:183.84,75:186.21,76:190.23,77:192.22,78:195.08,79:196.97,80:200.59,81:204.38,82:207.2,83:208.98,84:1.97,85:2.02,86:2.2,87:3.48,88:2.83,89:2,90:232.04,91:231.04,92:238.03,93:237.048,94:244.064,95:243.061,96:247.07,97:247.07,98:251.079,99:252.083,100:257.095,101:258.098,102:259.101,103:262.11,104:267.122,105:270.131,106:271.134,107:270.133,108:270.134,109:278.156};function o(e){var t=n[e];return void 0===t?1.7:a[t]}function s(e){var t=n[e];return void 0===t?10.81:i[t]}function u(e){var t=n[e];return void 0===t?0:t}},function(e,t,r){"use strict";r.d(t,"b",(function(){return a})),r.d(t,"a",(function(){return n}));var n,a="0.3.0";!function(e){e.getDataType=function(e){return e instanceof Int8Array?1:e instanceof Int16Array?2:e instanceof Int32Array?3:e instanceof Uint8Array?4:e instanceof Uint16Array?5:e instanceof Uint32Array?6:e instanceof Float32Array?32:e instanceof Float64Array?33:3},e.isSignedIntegerDataType=function(e){if(e instanceof Int8Array||e instanceof Int16Array||e instanceof Int32Array)return!0;for(var t=0,r=e.length;t0?(n+=Math.ceil(o/t),o%t==0&&(n+=1)):(n+=Math.ceil(o/r),o%r==0&&(n+=1))}return n}e.byteArray=c,e.fixedPoint=function(e){return function(t){return function(e,t){for(var r=o.a.getDataType(e),n=new Int32Array(e.length),a=0,i=e.length;a=r?n-1:0|Math.round((p-t)/u)}return{encodings:[{kind:"IntervalQuantization",min:t,max:r,numSteps:n,srcType:i}],data:c}}(a,e,t,r,n)}},e.runLength=function(e){var t=o.a.getDataType(e);if(void 0===t&&(e=new Int32Array(e),t=3),!e.length)return{encodings:[{kind:"RunLength",srcType:t,srcSize:0}],data:new Int32Array(0)};for(var r=2,n=1,a=e.length;n=0)for(;u>=r;)i[o]=r,++o,u-=r;else for(;u<=n;)i[o]=n,++o,u-=n;i[o]=u,++o}var l=c(i);return{encodings:[{kind:"IntegerPacking",byteCount:t.bytesPerElement,isUnsigned:!t.isSigned,srcSize:a},l.encodings[0]],data:l.data}}(e,t)},e.stringArray=function(e){var t=Object.create(null),r=[],n=new Int32Array(e.length),a=i.a.create(Int32Array,1,Math.min(1024,e.length<32?e.length+1:Math.round(e.length/8)+1));i.a.add(a,0);for(var o=0,u=0,c=0,l=e;cl||g===l&&c.value(m)===d)break;m++}}!function(e){e.Descriptor={name:"model_secondary_structure"},e.Provider=s.a.create(e.Descriptor),e.fromStruct=function(e,t,r){var n=new Map,s=[{kind:"none"}],c=function(e,t){if(e._rowCount>0){if(0!==e.beg_label_seq_id.valueKind(0)||0!==e.end_label_seq_id.valueKind(0))return"auth"}else if(t&&(0!==t.beg_label_seq_id.valueKind(0)||0!==t.end_label_seq_id.valueKind(0)))return"auth";return"label"}(e,t);!function(e,t,r,n){if(!e._rowCount)return;for(var i=e.beg_label_asym_id,o=e.beg_label_seq_id,s=e.beg_auth_seq_id,u=e.pdbx_beg_PDB_ins_code,c=e.end_label_seq_id,l=e.end_auth_seq_id,d=e.pdbx_end_PDB_ins_code,p=e.pdbx_PDB_helix_class,f=e.conf_type_id,h=e.details,m="label"===t?o:s,g="label"===t?c:l,b=0,v=e._rowCount;b0&&function(e,t,r,n){for(var a=e.chainAtomSegments.count,o=e.chains.label_asym_id,s=e.residues,c=s.auth_seq_id,l=s.label_seq_id,d=s.pdbx_PDB_ins_code,p="label"===t?l:c,f=0;fr&&(e=(a=[r,e])[0],r=a[1],t=(i=[n,t])[0],n=i[1]),o.get(e+"|"+t+"|"+r+"|"+n)||1}},function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var n,a=r(705),i=r(617),o=r(580),s=r(680),u=r(647),c=r(824);!function(e){var t,r="molstar_global_model_transform_info";function n(t){return e.Provider.get(t)}e.Schema=((t={})[r]={matrix:o.a.Schema.Matrix(4,4,o.a.Schema.float)},t),e.Descriptor=Object(i.b)({name:r,cifExport:{categories:[{name:r,instance:function(t){var r=n(t.firstModel);if(!r)return s.a.Category.Empty;var a=o.d.ofRows(e.Schema.molstar_global_model_transform_info,[{matrix:r}]);return s.a.Category.ofTable(a)}}],prefix:"molstar"}}),e.Provider=a.a.create(e.Descriptor),e.attach=function(t,r){t.customProperties.has(e.Descriptor)||t.customProperties.add(e.Descriptor),e.Provider.set(t,r)},e.get=n,e.fromMmCif=function(t){if(u.a.is(t.sourceData)){var n=t.sourceData.data.frame.categories[r];if(n){var a=Object(c.c)(e.Schema[r],n);if(0!==a._rowCount)return a.matrix.value(0)}}},e.hasData=function(e){if(!u.a.is(e.sourceData))return!1;var t=e.sourceData.data.frame.categories[r];return!!t&&t.rowCount>0},e.writeMmCif=function(t,n){t.writeCategory({name:r,instance:function(){var t=o.d.ofRows(e.Schema.molstar_global_model_transform_info,[{matrix:n}]);return s.a.Category.ofTable(t)}})}}(n||(n={}))},function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return l}));var n,a=r(781),i=r(953),o=r(754),s=r(831);function u(e,t){return Object(s.b)(o.b.Dictionary({0:Object(o.a)(n.ElementReference,{isOptional:!0,defaultValue:"slot.current-atom"})}),e,t)}function c(e,t){return Object(s.b)(o.b.None,e,t)}!function(e){e.ElementSymbol=a.a.Value("Structure","ElementSymbol"),e.AtomName=a.a.Value("Structure","AtomName"),e.BondFlag=a.a.OneOf("Structure","BondFlag",a.a.Str,["covalent","metallic","ion","hydrogen","sulfide","computed","aromatic"]),e.BondFlags=i.a.Flags(e.BondFlag,"BondFlags"),e.SecondaryStructureFlag=a.a.OneOf("Structure","SecondaryStructureFlag",a.a.Str,["alpha","beta","3-10","pi","sheet","strand","helix","turn","none"]),e.SecondaryStructureFlags=i.a.Flags(e.SecondaryStructureFlag,"SecondaryStructureFlag"),e.RingFingerprint=a.a.Value("Structure","RingFingerprint"),e.EntityType=a.a.OneOf("Structure","EntityType",a.a.Str,["polymer","non-polymer","water","branched"]),e.EntitySubtype=a.a.OneOf("Structure","EntitySubtype",a.a.Str,["other","polypeptide(D)","polypeptide(L)","polydeoxyribonucleotide","polyribonucleotide","polydeoxyribonucleotide/polyribonucleotide hybrid","cyclic-pseudo-peptide","peptide nucleic acid","oligosaccharide"]),e.ObjectPrimitive=a.a.OneOf("Structure","ObjectPrimitive",a.a.Str,["atomistic","sphere","gaussian","other"]),e.ResidueId=a.a.Value("Structure","ResidueId"),e.ElementSet=a.a.Value("Structure","ElementSet"),e.ElementSelection=a.a.Value("Structure","ElementSelection"),e.ElementReference=a.a.Value("Structure","ElementReference"),e.ElementSelectionQuery=i.a.Fn(e.ElementSelection,"ElementSelectionQuery")}(n||(n={}));var l={"@header":"Structure Queries",type:{"@header":"Types",elementSymbol:Object(s.b)(o.b.Dictionary({0:Object(o.a)(a.a.Str)}),n.ElementSymbol,"Create element symbol representation from a string value."),atomName:Object(s.b)(o.b.Dictionary({0:Object(o.a)(a.a.AnyValue)}),n.AtomName,"Convert a value to an atom name."),entityType:Object(s.b)(o.b.Dictionary({0:Object(o.a)(n.EntityType)}),n.EntityType,"Create normalized representation of entity type: "+a.a.oneOfValues(n.EntityType).join(", ")+"."),bondFlags:Object(s.b)(o.b.List(n.BondFlag),n.BondFlags,"Create bond flags representation from a list of strings. Allowed flags: "+a.a.oneOfValues(n.BondFlag).join(", ")+"."),ringFingerprint:Object(s.b)(o.b.List(n.ElementSymbol,{nonEmpty:!0}),n.RingFingerprint,"Create ring fingerprint from the supplied atom element list."),secondaryStructureFlags:Object(s.b)(o.b.List(n.SecondaryStructureFlag),n.SecondaryStructureFlags,"Create secondary structure flags representation from a list of strings. Allowed flags: "+a.a.oneOfValues(n.SecondaryStructureFlag).join(", ")+"."),authResidueId:Object(s.b)(o.b.Dictionary({0:Object(o.a)(a.a.Str,{description:"auth_asym_id"}),1:Object(o.a)(a.a.Num,{description:"auth_seq_id"}),2:Object(o.a)(a.a.Str,{description:"pdbx_PDB_ins_code",isOptional:!0})}),n.ResidueId,'Residue identifier based on "auth_" annotation.'),labelResidueId:Object(s.b)(o.b.Dictionary({0:Object(o.a)(a.a.Str,{description:"label_entity_id"}),1:Object(o.a)(a.a.Str,{description:"label_asym_id"}),2:Object(o.a)(a.a.Num,{description:"label_seq_id"}),3:Object(o.a)(a.a.Str,{description:"pdbx_PDB_ins_code",isOptional:!0})}),n.ResidueId,'Residue identifier based on mmCIF\'s "label_" annotation.')},slot:{"@header":"Iteration Slots",element:Object(s.b)(o.b.None,n.ElementReference,"A reference to the current element."),elementSetReduce:Object(s.b)(o.b.None,a.a.Variable("a",a.a.AnyValue,!0),"Current value of the element set reducer.")},generator:{"@header":"Generators",all:Object(s.b)(o.b.None,n.ElementSelectionQuery,"The entire structure."),atomGroups:Object(s.b)(o.b.Dictionary({"entity-test":Object(o.a)(a.a.Bool,{isOptional:!0,defaultValue:!0,description:"Test for the 1st atom of every entity"}),"chain-test":Object(o.a)(a.a.Bool,{isOptional:!0,defaultValue:!0,description:"Test for the 1st atom of every chain"}),"residue-test":Object(o.a)(a.a.Bool,{isOptional:!0,defaultValue:!0,description:"Test for the 1st atom every residue"}),"atom-test":Object(o.a)(a.a.Bool,{isOptional:!0,defaultValue:!0}),"group-by":Object(o.a)(a.a.Any,{isOptional:!0,defaultValue:"atom-key",description:"Group atoms to sets based on this property. Default: each atom has its own set"})}),n.ElementSelectionQuery,"Return all atoms for which the tests are satisfied, grouped into sets."),bondedAtomicPairs:Object(s.b)(o.b.Dictionary({0:Object(o.a)(a.a.Bool,{isOptional:!0,defaultValue:"true for covalent bonds",description:"Test each bond with this predicate. Each bond is visited twice with swapped atom order."})}),n.ElementSelectionQuery,"Return all pairs of atoms for which the test is satisfied."),rings:Object(s.b)(o.b.Dictionary({fingerprint:Object(o.a)(n.RingFingerprint,{isOptional:!0}),"only-aromatic":Object(o.a)(a.a.Bool,{isOptional:!0,defaultValue:!1})}),n.ElementSelectionQuery,"Return all rings or those with the specified fingerprint and/or only aromatic rings."),queryInSelection:Object(s.b)(o.b.Dictionary({0:Object(o.a)(n.ElementSelectionQuery),query:Object(o.a)(n.ElementSelectionQuery),"in-complement":Object(o.a)(a.a.Bool,{isOptional:!0,defaultValue:!1})}),n.ElementSelectionQuery,"Executes query only on atoms that are in the source selection."),empty:Object(s.b)(o.b.None,n.ElementSelectionQuery,"Nada.")},modifier:{"@header":"Selection Modifications",queryEach:Object(s.b)(o.b.Dictionary({0:Object(o.a)(n.ElementSelectionQuery),query:Object(o.a)(n.ElementSelectionQuery)}),n.ElementSelectionQuery,"Query every atom set in the input selection separately."),intersectBy:Object(s.b)(o.b.Dictionary({0:Object(o.a)(n.ElementSelectionQuery),by:Object(o.a)(n.ElementSelectionQuery)}),n.ElementSelectionQuery,"Intersect each atom set from the first sequence from atoms in the second one."),exceptBy:Object(s.b)(o.b.Dictionary({0:Object(o.a)(n.ElementSelectionQuery),by:Object(o.a)(n.ElementSelectionQuery)}),n.ElementSelectionQuery,"Remove all atoms from 'selection' that occur in 'by'."),unionBy:Object(s.b)(o.b.Dictionary({0:Object(o.a)(n.ElementSelectionQuery),by:Object(o.a)(n.ElementSelectionQuery)}),n.ElementSelectionQuery,"For each atom set A in the orginal sequence, combine all atoms sets in the target selection that intersect with A."),union:Object(s.b)(o.b.Dictionary({0:Object(o.a)(n.ElementSelectionQuery)}),n.ElementSelectionQuery,"Collects all atom sets in the sequence into a single atom set."),cluster:Object(s.b)(o.b.Dictionary({0:Object(o.a)(n.ElementSelectionQuery),"min-distance":Object(o.a)(a.a.Num,{isOptional:!0,defaultValue:0}),"max-distance":Object(o.a)(a.a.Num),"min-size":Object(o.a)(a.a.Num,{description:"Minimal number of sets to merge, must be at least 2",isOptional:!0,defaultValue:2}),"max-size":Object(o.a)(a.a.Num,{description:"Maximal number of sets to merge, if not set, no limit",isOptional:!0})}),n.ElementSelectionQuery,"Combines atom sets that have mutual distance in the interval [min-radius, max-radius]. Minimum/maximum size determines how many atom sets can be combined."),includeSurroundings:Object(s.b)(o.b.Dictionary({0:Object(o.a)(n.ElementSelectionQuery),radius:Object(o.a)(a.a.Num),"atom-radius":Object(o.a)(a.a.Num,{isOptional:!0,defaultValue:0,description:"Value added to each atom before the distance check, for example VDW radius. Using this argument is computationally demanding."}),"as-whole-residues":Object(o.a)(a.a.Bool,{isOptional:!0})}),n.ElementSelectionQuery,"For each atom set in the selection, include all surrouding atoms/residues that are within the specified radius."),surroundingLigands:Object(s.b)(o.b.Dictionary({0:Object(o.a)(n.ElementSelectionQuery),radius:Object(o.a)(a.a.Num),"include-water":Object(o.a)(a.a.Bool,{isOptional:!0,defaultValue:!0})}),n.ElementSelectionQuery,"Find all ligands components around the source query."),includeConnected:Object(s.b)(o.b.Dictionary({0:Object(o.a)(n.ElementSelectionQuery),"bond-test":Object(o.a)(a.a.Bool,{isOptional:!0,defaultValue:"true for covalent bonds"}),"layer-count":Object(o.a)(a.a.Num,{isOptional:!0,defaultValue:1,description:"Number of bonded layers to include."}),"fixed-point":Object(o.a)(a.a.Bool,{isOptional:!0,defaultValue:!1,description:"Continue adding layers as long as new connections exist."}),"as-whole-residues":Object(o.a)(a.a.Bool,{isOptional:!0})}),n.ElementSelectionQuery,"Pick all atom sets that are connected to the target."),wholeResidues:Object(s.b)(o.b.Dictionary({0:Object(o.a)(n.ElementSelectionQuery)}),n.ElementSelectionQuery,"Expand the selection to whole residues."),expandProperty:Object(s.b)(o.b.Dictionary({0:Object(o.a)(n.ElementSelectionQuery),property:Object(o.a)(a.a.AnyValue)}),n.ElementSelectionQuery,"To each atom set in the selection, add all atoms that have the same property value that was already present in the set.")},filter:{"@header":"Selection Filters",pick:Object(s.b)(o.b.Dictionary({0:Object(o.a)(n.ElementSelectionQuery),test:Object(o.a)(a.a.Bool)}),n.ElementSelectionQuery,"Pick all atom sets that satisfy the test."),first:Object(s.b)(o.b.Dictionary({0:Object(o.a)(n.ElementSelectionQuery)}),n.ElementSelectionQuery,"Take the 1st atom set in the sequence."),withSameAtomProperties:Object(s.b)(o.b.Dictionary({0:Object(o.a)(n.ElementSelectionQuery),source:Object(o.a)(n.ElementSelectionQuery),property:Object(o.a)(a.a.Any)}),n.ElementSelectionQuery,"Pick all atom sets for which the set of given atom properties is a subset of the source properties."),intersectedBy:Object(s.b)(o.b.Dictionary({0:Object(o.a)(n.ElementSelectionQuery),by:Object(o.a)(n.ElementSelectionQuery)}),n.ElementSelectionQuery,"Pick all atom sets that have non-zero intersection with the target."),within:Object(s.b)(o.b.Dictionary({0:Object(o.a)(n.ElementSelectionQuery),target:Object(o.a)(n.ElementSelectionQuery),"min-radius":Object(o.a)(a.a.Num,{isOptional:!0,defaultValue:0}),"max-radius":Object(o.a)(a.a.Num),"atom-radius":Object(o.a)(a.a.Num,{isOptional:!0,defaultValue:0,description:"Value added to each atom before the distance check, for example VDW radius. Using this argument is computationally demanding."}),invert:Object(o.a)(a.a.Bool,{isOptional:!0,defaultValue:!1,description:"If true, pick only atom sets that are further than the specified radius."})}),n.ElementSelectionQuery,"Pick all atom sets from selection that have any atom within the radius of any atom from target."),isConnectedTo:Object(s.b)(o.b.Dictionary({0:Object(o.a)(n.ElementSelectionQuery),target:Object(o.a)(n.ElementSelectionQuery),"bond-test":Object(o.a)(a.a.Bool,{isOptional:!0,defaultValue:"true for covalent bonds"}),disjunct:Object(o.a)(a.a.Bool,{isOptional:!0,defaultValue:!0,description:"If true, there must exist a bond to an atom that lies outside the given atom set to pass test."}),invert:Object(o.a)(a.a.Bool,{isOptional:!0,defaultValue:!1,description:"If true, return atom sets that are not connected."})}),n.ElementSelectionQuery,"Pick all atom sets that are connected to the target.")},combinator:{"@header":"Selection Combinators",intersect:Object(s.b)(o.b.List(n.ElementSelectionQuery),n.ElementSelectionQuery,"Return all unique atom sets that appear in all of the source selections."),merge:Object(s.b)(o.b.List(n.ElementSelectionQuery),n.ElementSelectionQuery,"Merges multiple selections into a single one. Only unique atom sets are kept."),distanceCluster:Object(s.b)(o.b.Dictionary({matrix:Object(o.a)(i.a.List(i.a.List(a.a.Num)),{description:"Distance matrix, represented as list of rows (num[][])). Lower triangle is min distance, upper triangle is max distance."}),selections:Object(o.a)(i.a.List(n.ElementSelectionQuery),{description:"A list of held selections."})}),n.ElementSelectionQuery,"Pick combinations of atom sets from the source sequences that are mutually within distances specified by a matrix.")},atomSet:{"@header":"Atom Sets",atomCount:Object(s.b)(o.b.None,a.a.Num),countQuery:Object(s.b)(o.b.Dictionary({0:Object(o.a)(n.ElementSelectionQuery)}),a.a.Num,"Counts the number of occurences of a specific query inside the current atom set."),reduce:Object(s.b)(o.b.Dictionary({initial:Object(o.a)(a.a.Variable("a",a.a.AnyValue,!0),{description:"Initial value assigned to slot.atom-set-reduce. Current atom is set to the 1st atom of the current set for this."}),value:Object(o.a)(a.a.Variable("a",a.a.AnyValue,!0),{description:"Expression executed for each atom in the set"})}),a.a.Variable("a",a.a.AnyValue,!0),"Execute the value expression for each atom in the current atom set and return the result. Works the same way as Array.reduce in JavaScript (``result = value(value(...value(initial)))``)"),propertySet:Object(s.b)(o.b.Dictionary({0:Object(o.a)(i.a.ConstrainedVar)}),i.a.Set(i.a.ConstrainedVar),"Returns a set with all values of the given property in the current atom set.")},atomProperty:{"@header":"Atom Properties",core:{"@header":"Core Properties",elementSymbol:u(n.ElementSymbol),vdw:u(a.a.Num,"Van der Waals radius"),mass:u(a.a.Num,"Atomic weight"),atomicNumber:u(a.a.Num,"Atomic number"),x:u(a.a.Num,"Cartesian X coordinate"),y:u(a.a.Num,"Cartesian Y coordinate"),z:u(a.a.Num,"Cartesian Z coordinate"),atomKey:u(a.a.AnyValue,"Unique value for each atom. Main use case is grouping of atoms."),bondCount:Object(s.b)(o.b.Dictionary({0:Object(o.a)(n.ElementReference,{isOptional:!0,defaultValue:"slot.current-atom"}),flags:Object(o.a)(n.BondFlags,{isOptional:!0,defaultValue:"covalent"})}),a.a.Num,"Number of bonds (by default only covalent bonds are counted)."),sourceIndex:u(a.a.Num,"Index of the atom/element in the input file."),operatorName:u(a.a.Str,"Name of the symmetry operator applied to this element."),modelIndex:u(a.a.Num,"Index of the model in the input file."),modelLabel:u(a.a.Str,"Label/header of the model in the input file.")},topology:{connectedComponentKey:u(a.a.AnyValue,"Unique value for each connected component.")},macromolecular:{"@header":"Macromolecular Properties (derived from the mmCIF format)",authResidueId:u(n.ResidueId,"type.auth-residue-id symbol executed on current atom's residue"),labelResidueId:u(n.ResidueId,"type.label-residue-id symbol executed on current atom's residue"),residueKey:u(a.a.AnyValue,"Unique value for each tuple ``(label_entity_id,auth_asym_id, auth_seq_id, pdbx_PDB_ins_code)``, main use case is grouping of atoms"),chainKey:u(a.a.AnyValue,"Unique value for each tuple ``(label_entity_id, auth_asym_id)``, main use case is grouping of atoms"),entityKey:u(a.a.AnyValue,"Unique value for each tuple ``label_entity_id``, main use case is grouping of atoms"),isHet:u(a.a.Bool,"Equivalent to atom_site.group_PDB !== ATOM"),id:u(a.a.Num,"_atom_site.id"),label_atom_id:u(n.AtomName),label_alt_id:u(a.a.Str),label_comp_id:u(a.a.Str),label_asym_id:u(a.a.Str),label_entity_id:u(a.a.Str),label_seq_id:u(a.a.Num),auth_atom_id:u(n.AtomName),auth_comp_id:u(a.a.Str),auth_asym_id:u(a.a.Str),auth_seq_id:u(a.a.Num),pdbx_PDB_ins_code:u(a.a.Str),pdbx_formal_charge:u(a.a.Num),occupancy:u(a.a.Num),B_iso_or_equiv:u(a.a.Num),entityType:u(n.EntityType,"Type of the entity as defined in mmCIF (polymer, non-polymer, branched, water)"),entitySubtype:u(n.EntitySubtype,"Subtype of the entity as defined in mmCIF _entity_poly.type and _pdbx_entity_branch.type (other, polypeptide(D), polypeptide(L), polydeoxyribonucleotide, polyribonucleotide, polydeoxyribonucleotide/polyribonucleotide hybrid, cyclic-pseudo-peptide, peptide nucleic acid, oligosaccharide)"),entityPrdId:u(a.a.Str,"The PRD ID of the entity."),entityDescription:u(i.a.List(a.a.Str)),objectPrimitive:u(n.ObjectPrimitive,"Type of the primitive object used to model this segment as defined in mmCIF/IHM (atomistic, sphere, gaussian, other)"),secondaryStructureKey:u(a.a.AnyValue,"Unique value for each secondary structure element."),secondaryStructureFlags:u(n.SecondaryStructureFlags),isModified:u(a.a.Bool,"True if the atom belongs to modification of a standard residue."),modifiedParentName:u(a.a.Str,"'3-letter' code of the modifed parent residue."),isNonStandard:u(a.a.Bool,"True if this is a non-standard residue."),chemCompType:u(a.a.Str,"Type of the chemical component as defined in mmCIF.")}},bondProperty:{"@header":"Bond Properties",flags:c(n.BondFlags),order:c(a.a.Num),length:c(a.a.Num),atomA:c(n.ElementReference),atomB:c(n.ElementReference)}}},function(e,t,r){"use strict";r.r(t),r.d(t,"defaultBondTest",(function(){return l})),r.d(t,"atomicSequence",(function(){return d})),r.d(t,"water",(function(){return p})),r.d(t,"atomicHet",(function(){return f})),r.d(t,"spheres",(function(){return h})),r.d(t,"bundleElementImpl",(function(){return m})),r.d(t,"bundleGenerator",(function(){return g}));var n=r(576),a=r(731),i=r(634),o=r(695),s=r(707),u=r(586),c=r(897);function l(e){return u.d.isCovalent(e.atomicBond.type)}function d(){return function(e){for(var t=e.inputStructure,r=a.a.Location.create(t),u=[],c=0,l=t.units;c=8)continue}u.push(d)}}}return s.a.Singletons(t,o.a.create(u,{parent:t}))}}function h(){return function(e){for(var t=e.inputStructure,r=[],n=0,a=t.units;n2)c.push(u[f],u[h-1]);else for(var m=f;ms.a.max(c.ranges)){s.a.forEach(c.ranges,(function(e,t){return d[t]=o[e]}));for(f=0,h=l;fa.f.max(c.set)){for(f=0,h=l;fs&&(h=e.IsoValue.absolute(s)):r.relativeValued&&(h=e.IsoValue.relative(d)),p.a.Conditioned(h,{absolute:p.a.Converted((function(t){return e.IsoValue.toAbsolute(t,a.a.One.stats).absoluteValue}),(function(t){return e.IsoValue.absolute(t)}),p.a.Numeric(u,{min:o,max:s,step:Object(f.e)(c/100,2)})),relative:p.a.Converted((function(t){return e.IsoValue.toRelative(t,a.a.One.stats).relativeValue}),(function(t){return e.IsoValue.relative(t)}),p.a.Numeric(Math.min(1,d),{min:l,max:d,step:Object(f.e)(Math.round((s-o)/c)/100,2)}))},(function(e){return"absolute"===e.kind?"absolute":"relative"}),(function(t,r){return"absolute"===r?e.IsoValue.toAbsolute(t,i):e.IsoValue.toRelative(t,i)}),{isEssential:!0})}e.createIsoValueParam=r,e.IsoValueParam=r(e.IsoValue.relative(2)),e.One={label:"",grid:a.a.One,sourceData:{kind:"",name:"",data:{}},customProperties:new d.a,_propertyData:Object.create(null)},e.areEquivalent=function(e,t){return a.a.areEquivalent(e.grid,t.grid)},e.isEmpty=function(e){return a.a.isEmpty(e.grid)},e.isOrbitals=function(e){return!!c.a.is(e.sourceData)&&e.sourceData.data.header.orbitals},e.Loci=function(e){return{kind:"volume-loci",volume:e}},e.isLoci=function(e){return!!e&&"volume-loci"===e.kind},e.areLociEqual=function(e,t){return e.volume===t.volume},e.isLociEmpty=function(e){return a.a.isEmpty(e.volume.grid)},e.getBoundingSphere=function(e,t){return a.a.getBoundingSphere(e.grid,t)},function(t){t.Loci=function(e,t){return{kind:"isosurface-loci",volume:e,isoValue:t}},t.isLoci=function(e){return!!e&&"isosurface-loci"===e.kind},t.areLociEqual=function(t,r){return t.volume===r.volume&&e.IsoValue.areSame(t.isoValue,r.isoValue,t.volume.grid.stats)},t.isLociEmpty=function(e){return 0===e.volume.grid.cells.data.length},t.getBoundingSphere=function(t,r,n){return e.getBoundingSphere(t,n)}}(e.Isosurface||(e.Isosurface={})),function(e){e.Loci=function(e,t){return{kind:"cell-loci",volume:e,indices:t}},e.isLoci=function(e){return!!e&&"cell-loci"===e.kind},e.areLociEqual=function(e,t){return e.volume===t.volume&&i.d.areEqual(e.indices,t.indices)},e.isLociEmpty=function(e){return 0===i.d.size(e.indices)};var t=new u.a("98"),r=Object(s.g)();e.getBoundingSphere=function(e,n,u){t.reset();for(var c=a.a.getGridToCartesianTransform(e.grid),l=e.grid.cells.space.getCoords,d=0,p=i.d.size(n);do&&(o=d)}var p=u.g.create(t,o);return u.g.setExtrema(p,r),p}(d.cornerBuffer.ref.value);u.g.copy(n,t),a=e}return n}};return d}(e,t,r)},e.createEmpty=t,e.Params=Object(a.a)(Object(a.a)({},p.a.Params),{interpolation:d.a.Select("bspline",d.a.objectToOptions(S))}),e.Utils={Params:e.Params,createEmpty:t,createValues:r,createValuesSimple:function(t,n,i,o,s){var u=p.a.createSimple(i,o,s),c=Object(a.a)(Object(a.a)({},d.a.getDefaultValues(e.Params)),n);return r(t,u.transform,u.locationIterator,u.theme,c)},updateValues:function(e,t){p.a.updateValues(e,t),l.e.updateIfChanged(e.dInterpolation,t.interpolation)},updateBoundingSphere:function(e,t){var r=u.g.clone(t.boundingSphere),n=Object(s.b)(r,e.aTransform.ref.value,e.instanceCount.ref.value);u.g.equals(n,e.boundingSphere.ref.value)||l.e.update(e.boundingSphere,n);u.g.equals(r,e.invariantBoundingSphere.ref.value)||(l.e.update(e.invariantBoundingSphere,r),l.e.update(e.uInvariantBoundingSphere,c.h.fromSphere(e.uInvariantBoundingSphere.ref.value,r)))},createRenderableState:function(e){var t=p.a.createRenderableState(e);return t.opaque=!1,t},updateRenderableState:function(e,t){p.a.updateRenderableState(e,t),e.opaque=!1},createPositionIterator:function(){return Object(o.a)(1,1,1,(function(){return y.b}))}}}(n||(n={}))},function(e,t,r){"use strict";r.d(t,"d",(function(){return u})),r.d(t,"a",(function(){return c})),r.d(t,"b",(function(){return l})),r.d(t,"c",(function(){return d}));var n=r(572),a=r(642),i=Object(a.a)();function o(e){var t=e.createBuffer();if(null===t)throw new Error("Could not create WebGL buffer");return t}function s(e,t,r,n){var a=o(e),s=function(e,t){switch(t){case"static":return e.STATIC_DRAW;case"dynamic":return e.DYNAMIC_DRAW;case"stream":return e.STREAM_DRAW}}(e,r),u=function(e,t){switch(t){case"attribute":return e.ARRAY_BUFFER;case"elements":return e.ELEMENT_ARRAY_BUFFER;case"uniform":return e.UNIFORM_BUFFER}}(e,n),c=function(e,t){if(t instanceof Uint8Array)return e.UNSIGNED_BYTE;if(t instanceof Int8Array)return e.BYTE;if(t instanceof Uint16Array)return e.UNSIGNED_SHORT;if(t instanceof Int16Array)return e.SHORT;if(t instanceof Uint32Array)return e.UNSIGNED_INT;if(t instanceof Int32Array)return e.INT;if(t instanceof Float32Array)return e.FLOAT;throw new Error("Should nevver happen")}(e,t),l=t.BYTES_PER_ELEMENT,d=t.length;function p(t){e.bindBuffer(u,a),e.bufferData(u,t,s)}p(t);var f=!1;return{id:i(),_usageHint:s,_bufferType:u,_dataType:c,_bpe:l,length:d,getBuffer:function(){return a},updateData:p,updateSubData:function(t,r,n){e.bindBuffer(u,a),n-r===t.length?e.bufferSubData(u,0,t):e.bufferSubData(u,r*l,t.subarray(r,r+n))},reset:function(){a=o(e),p(t)},destroy:function(){f||(e.deleteBuffer(a),f=!0)}}}function u(e,t,r){switch(t){case"int32":switch(r){case 1:return e.INT;case 2:return e.INT_VEC2;case 3:return e.INT_VEC3;case 4:return e.INT_VEC4}break;case"float32":switch(r){case 1:return e.FLOAT;case 2:return e.FLOAT_VEC2;case 3:return e.FLOAT_VEC3;case 4:return e.FLOAT_VEC4;case 16:return e.FLOAT_MAT4}}throw new Error("unknown attribute type for kind '"+t+"' and itemSize '"+r+"'")}function c(e,t,r,a,i,o){void 0===o&&(o="dynamic");var u=t.instancedArrays,c=s(e,r,o,"attribute"),l=c._bufferType,d=c._dataType,p=c._bpe;return Object(n.a)(Object(n.a)({},c),{bind:function(t){if(e.bindBuffer(l,c.getBuffer()),16===a)for(var r=0;r<4;++r)e.enableVertexAttribArray(t+r),e.vertexAttribPointer(t+r,4,d,!1,16*p,4*r*p),u.vertexAttribDivisor(t+r,i);else e.enableVertexAttribArray(t),e.vertexAttribPointer(t,a,d,!1,0,0),u.vertexAttribDivisor(t,i)}})}function l(e,t,r){var n=[];return Object.keys(t).forEach((function(a){var i=t[a];"attribute"===i.type&&(n[n.length]=[a,e.resources.attribute(r[a].ref.value,i.itemSize,i.divisor)])})),n}function d(e,t,r){void 0===r&&(r="static");var a=s(e,t,r,"elements");return Object(n.a)(Object(n.a)({},a),{bind:function(){e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,a.getBuffer())}})}},function(e,t,r){"use strict";r.d(t,"e",(function(){return y})),r.d(t,"a",(function(){return x})),r.d(t,"d",(function(){return O})),r.d(t,"c",(function(){return j})),r.d(t,"g",(function(){return S})),r.d(t,"b",(function(){return _})),r.d(t,"f",(function(){return w}));var n,a,i,o,s,u=r(572),c=r(574),l=r(691),d=r(787),p=Object(c.g)(),f=Object(c.g)(),h=Object(c.g)(),m=Object(c.g)(),g=Object(c.g)(),b=Object(c.g)(),v={height:1,topCap:!0,bottomCap:!0};function y(e,t){var r=e.length/3;if(r<3)throw new Error("need at least 3 points to build a prism");var n=Object(u.a)(Object(u.a)({},v),t),a=n.height,i=n.topCap,o=n.bottomCap,s=2*r,d=4*r,y=(i?1:0)+(o?1:0);3===r?(s+=y,d+=3*y):4===r?(s+=2*y,d+=4*y):(s+=y*r,d+=y*r*3);var x=Object(l.a)(s,d),O=.5*a;c.g.set(p,0,0,-O),c.g.set(f,0,0,O);for(var j=0;j0&&g.push(["assembly","Assembly"]),a&&(g.push(["symmetry-mates","Symmetry Mates"]),g.push(["symmetry","Symmetry (indices)"]),g.push(["symmetry-assembly","Symmetry (assembly)"])),{type:u.a.MappedStatic(t||"model",m,{options:g})}},e.canAutoUpdate=function(e,t){return"symmetry-assembly"!==t.name&&("symmetry"!==t.name||"symmetry"!==e.name)},e.create=function(e,o,s,u){return Object(a.b)(this,void 0,void 0,(function(){var c,l;return Object(a.d)(this,(function(a){if(!(c=p.a.Provider.get(s))||!u||"model"===u.name)return l=i.g.ofModel(s),[2,new d.a.Molecule.Structure(l,{label:"Model",description:i.g.elementDescription(l)})];if("auto"===u.name)return 0===c.assemblies.length?(l=i.g.ofModel(s),[2,new d.a.Molecule.Structure(l,{label:"Model",description:i.g.elementDescription(l)})]):[2,t(e,o,s)];if("assembly"===u.name)return[2,t(e,o,s,u.params.id)];if("symmetry"===u.name)return[2,r(o,s,u.params.ijkMin,u.params.ijkMax)];if("symmetry-mates"===u.name)return[2,n(o,s,u.params.radius)];if("symmetry-assembly"===u.name)return[2,f(o,s,u.params.generators,c)];throw new Error("Unknown represetation type: "+u.name)}))}))}}(n||(n={}))},function(e,t,r){"use strict";r.d(t,"b",(function(){return c})),r.d(t,"a",(function(){return n}));var n,a=r(572),i=r(579),o=r(578),s=r(574),u=r(617);function c(e,t){var r=this;return i.b.create("Create Volume",(function(i){return Object(a.b)(r,void 0,void 0,(function(){var r,i,c,l,d,p,f,h,m,g;return Object(a.d)(this,(function(a){return r=e.volume_data_3d_info,i=e.volume_data_3d,c=o.f.create(r.spacegroup_number.value(0),s.g.ofArray(r.spacegroup_cell_size.value(0)),s.g.scale(s.g.zero(),s.g.ofArray(r.spacegroup_cell_angles.value(0)),Math.PI/180)),l=r.axis_order.value(0),d=s.e.convertToCanonicalAxisIndicesFastToSlow(l),p=d(r.sample_count.value(0)),f=s.e.Space(p,s.e.invertAxisOrder(l),Float32Array),h=s.e.create(f,s.e.Data1(i.values.toArray({array:Float32Array}))),m=s.g.ofArray(d(r.origin.value(0))),g=s.g.ofArray(d(r.dimensions.value(0))),[2,{label:null==t?void 0:t.label,entryId:null==t?void 0:t.entryId,grid:{transform:{kind:"spacegroup",cell:c,fractionalBox:o.b.create(m,s.g.add(s.g.zero(),m,g))},cells:h,stats:{min:r.min_sampled.value(0),max:r.max_sampled.value(0),mean:r.mean_sampled.value(0),sigma:r.sigma_sampled.value(0)}},sourceData:n.create(e),customProperties:new u.a,_propertyData:Object.create(null)}]}))}))}))}!function(e){e.is=function(e){return"dscif"===(null==e?void 0:e.kind)},e.create=function(e){return{kind:"dscif",name:e._name,data:e}}}(n||(n={}))},function(e,t,r){"use strict";r.d(t,"a",(function(){return u})),r.d(t,"b",(function(){return c}));var n=r(575),a=r(698),i=r(573),o={scale:i.a.Numeric(1,{min:.1,max:5,step:.1})};function s(e,t){return n.n.isAtomic(e)?Object(a.h)(e.model.atomicHierarchy.atoms.type_symbol.value(t)):n.n.isSpheres(e)?e.model.coarseConformation.spheres.radius[t]:0}function u(e,t){var r=void 0===t.scale?1:t.scale;return{factory:u,granularity:"group",size:function(e){return n.h.Location.is(e)?r*s(e.unit,e.element):n.b.isLocation(e)?r*Math.min(s(e.aUnit,e.aUnit.elements[e.aIndex]),s(e.bUnit,e.bUnit.elements[e.bIndex])):1*r},props:t,description:"Assigns a physical size, i.e. vdW radius for atoms or given radius for coarse spheres."}}var c={name:"physical",label:"Physical",category:"",factory:u,getParams:function(e){return o},defaultValues:i.a.getDefaultValues(o),isApplicable:function(e){return!!e.structure}}},function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=r(574),a=r(602),i=r(658),o=n.c.identity(),s=Object(n.g)();function u(e,t,r,u,c,l){a.a.addPrimitive(e,function(e,t,r,a,i){return n.g.add(s,t,r),n.c.targetTo(e,t,s,a),n.c.setTranslation(e,t),n.c.scale(e,e,i)}(o,t,r,u,c),Object(i.b)(l))}},function(e,t,r){"use strict";r.d(t,"a",(function(){return y}));var n,a=r(572),i=r(999),o=r(969),s=r(575),u=r(794),c=r(612),l=r(846),d=r(666),p=r(582),f=r(807),h=r(573),m=r(597),g=["target","surroundings","interactions"];!function(e){e.TargetSel="structure-focus-target-sel",e.TargetRepr="structure-focus-target-repr",e.SurrSel="structure-focus-surr-sel",e.SurrRepr="structure-focus-surr-repr",e.SurrNciRepr="structure-focus-surr-nci-repr"}(n||(n={}));var b=new Set([n.TargetSel,n.TargetRepr,n.SurrSel,n.SurrRepr,n.SurrNciRepr]),v=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.currentSource=void 0,t}return Object(a.c)(t,e),Object.defineProperty(t.prototype,"surrLabel",{get:function(){return"[Focus] Surroundings ("+this.params.expandRadius+" Å)"},enumerable:!1,configurable:!0}),t.prototype.getReprParams=function(e){return Object(a.a)(Object(a.a)({},this.params.targetParams),{type:{name:e.type.name,params:Object(a.a)(Object(a.a)({},e.type.params),{ignoreHydrogens:this.params.ignoreHydrogens})}})},t.prototype.ensureShape=function(e){var t,r=this.plugin.state.data,a=r.tree,o=r.build(),u=p.e.findUniqueTagsInSubtree(a,e.transform.ref,b);u[n.TargetSel]||(u[n.TargetSel]=o.to(e).apply(c.a.Model.StructureSelectionFromBundle,{bundle:s.h.Bundle.Empty,label:"[Focus] Target"},{tags:n.TargetSel}).ref),u[n.SurrSel]||(u[n.SurrSel]=o.to(e).apply(c.a.Model.StructureSelectionFromExpression,{expression:d.a.struct.generator.empty(),label:this.surrLabel},{tags:n.SurrSel}).ref);var l=this.params.components;return l.indexOf("target")>=0&&!u[n.TargetRepr]&&(u[n.TargetRepr]=o.to(u[n.TargetSel]).apply(c.a.Representation.StructureRepresentation3D,this.getReprParams(this.params.targetParams),{tags:n.TargetRepr}).ref),l.indexOf("surroundings")>=0&&!u[n.SurrRepr]&&(u[n.SurrRepr]=o.to(u[n.SurrSel]).apply(c.a.Representation.StructureRepresentation3D,this.getReprParams(this.params.surroundingsParams),{tags:n.SurrRepr}).ref),l.indexOf("interactions")>=0&&!u[n.SurrNciRepr]&&e.obj&&i.a.isApplicable(null===(t=e.obj)||void 0===t?void 0:t.data)&&(u[n.SurrNciRepr]=o.to(u[n.SurrSel]).apply(c.a.Representation.StructureRepresentation3D,this.params.nciParams,{tags:n.SurrNciRepr}).ref),{state:r,builder:o,refs:u}},t.prototype.clear=function(e){var t=this.plugin.state.data;this.currentSource=void 0;var r=t.select(p.e.Generators.byRef(e).subtree().withTag(n.TargetSel)),i=t.select(p.e.Generators.byRef(e).subtree().withTag(n.SurrSel));if(0!==r.length||0!==i.length){for(var o=t.build(),u=s.h.Bundle.Empty,l=0,f=r;l=0,c=0,l=r.select(o.withTag(n.TargetRepr));c=0,d=0,f=r.select(o.withTag(n.SurrRepr));d=0,h=0,g=r.select(o.withTag(n.SurrNciRepr));h(m=e.b[u]))){for(var l=s[h],d=s[h+1];l(m=e.b[u]))){for(l=s[h],d=s[h+1];l1?(l.pop()||"").toLowerCase():"",p=t.match(/^(.+):\/\/(.+)$/);p&&(i=p[1].toLowerCase(),t=p[2]||"");var f=t.substring(0,t.lastIndexOf("/")+1);if(n.includes(d)){r=d;var h=t.length-d.length-1;d=(t.substr(0,h).split(".").pop()||"").toLowerCase();var m=c.length-d.length-1;c=c.substr(0,m)}else r=!1;return{path:t,name:u,ext:d,base:c,dir:f,compressed:r,binary:a.includes(d),protocol:i,query:s,src:e}}},,function(e,t,r){"use strict";r.d(t,"b",(function(){return D})),r.d(t,"c",(function(){return R})),r.d(t,"a",(function(){return B}));var n=r(572),a=r(668),i=r(615),o=r(618),s=r(577),u=r(625),c=r(624),l=r(574),d=r(573),p=r(694),f=r(581),h={edgeThresholdMin:d.a.Numeric(.0312,{min:.0312,max:.0833,step:1e-4},{description:"Trims the algorithm from processing darks."}),edgeThresholdMax:d.a.Numeric(.063,{min:.063,max:.333,step:.001},{description:"The minimum amount of local contrast required to apply algorithm."}),iterations:d.a.Numeric(12,{min:0,max:16,step:1},{description:"Number of edge exploration steps."}),subpixelQuality:d.a.Numeric(.3,{min:0,max:1,step:.01},{description:"Choose the amount of sub-pixel aliasing removal."})},m=function(){function e(e,t){var r,i,o,d,p,f,h;this.webgl=e,this.renderable=(r=e,o=(i=t).getWidth(),d=i.getHeight(),p=Object(n.a)(Object(n.a)({},a.c),{tColor:s.e.create(i),uTexSizeInv:s.e.create(l.f.create(1/o,1/d)),dEdgeThresholdMin:s.e.create(.0312),dEdgeThresholdMax:s.e.create(.125),dIterations:s.e.create(12),dSubpixelQuality:s.e.create(.3)}),f=Object(n.a)({},g),h=Object(u.a)(r,"triangles",b,f,p),Object(c.a)(h,p))}return e.prototype.updateState=function(e){var t=this.webgl,r=t.gl,n=t.state;n.enable(r.SCISSOR_TEST),n.disable(r.BLEND),n.disable(r.DEPTH_TEST),n.depthMask(!1);var a=e.x,i=e.y,o=e.width,s=e.height;r.viewport(a,i,o,s),r.scissor(a,i,o,s),n.clearColor(0,0,0,1),r.clear(r.COLOR_BUFFER_BIT)},e.prototype.setSize=function(e,t){s.e.update(this.renderable.values.uTexSizeInv,l.f.set(this.renderable.values.uTexSizeInv.ref.value,1/e,1/t))},e.prototype.update=function(e,t){var r=this.renderable.values,n=t.edgeThresholdMin,a=t.edgeThresholdMax,i=t.iterations,o=t.subpixelQuality,u=!1;r.tColor.ref.value!==e&&(s.e.update(this.renderable.values.tColor,e),u=!0),r.dEdgeThresholdMin.ref.value!==n&&(u=!0),s.e.updateIfChanged(r.dEdgeThresholdMin,n),r.dEdgeThresholdMax.ref.value!==a&&(u=!0),s.e.updateIfChanged(r.dEdgeThresholdMax,a),r.dIterations.ref.value!==i&&(u=!0),s.e.updateIfChanged(r.dIterations,i),r.dSubpixelQuality.ref.value!==o&&(u=!0),s.e.updateIfChanged(r.dSubpixelQuality,o),u&&this.renderable.update()},e.prototype.render=function(e,t){t?t.bind():this.webgl.unbindFramebuffer(),this.updateState(e),this.renderable.render()},e}(),g=Object(n.a)(Object(n.a)({},a.b),{tColor:Object(i.i)("texture","rgba","ubyte","linear"),uTexSizeInv:Object(i.j)("v2"),dEdgeThresholdMin:Object(i.c)("number"),dEdgeThresholdMax:Object(i.c)("number"),dIterations:Object(i.c)("number"),dSubpixelQuality:Object(i.c)("number")}),b=Object(o.g)("fxaa",p.a,"\nprecision highp float;\nprecision highp int;\nprecision highp sampler2D;\n\nuniform sampler2D tColor;\nuniform vec2 uTexSizeInv;\n\n// adapted from https://github.com/kosua20/Rendu\n// MIT License Copyright (c) 2017 Simon Rodriguez\n\n#define QUALITY(q) ((q) < 5 ? 1.0 : ((q) > 5 ? ((q) < 10 ? 2.0 : ((q) < 11 ? 4.0 : 8.0)) : 1.5))\n\nfloat rgb2luma(vec3 rgb){\n return sqrt(dot(rgb, vec3(0.299, 0.587, 0.114)));\n}\n\nfloat sampleLuma(vec2 uv) {\n return rgb2luma(texture2D(tColor, uv).rgb);\n}\n\nfloat sampleLuma(vec2 uv, float uOffset, float vOffset) {\n uv += uTexSizeInv * vec2(uOffset, vOffset);\n return sampleLuma(uv);\n}\n\nvoid main(void) {\n vec2 coords = gl_FragCoord.xy * uTexSizeInv;\n vec2 inverseScreenSize = uTexSizeInv;\n\n vec4 colorCenter = texture2D(tColor, coords);\n\n // Luma at the current fragment\n float lumaCenter = rgb2luma(colorCenter.rgb);\n\n // Luma at the four direct neighbours of the current fragment.\n float lumaDown = sampleLuma(coords, 0.0, -1.0);\n float lumaUp = sampleLuma(coords, 0.0, 1.0);\n float lumaLeft = sampleLuma(coords, -1.0, 0.0);\n float lumaRight = sampleLuma(coords, 1.0, 0.0);\n\n // Find the maximum and minimum luma around the current fragment.\n float lumaMin = min(lumaCenter, min(min(lumaDown, lumaUp), min(lumaLeft, lumaRight)));\n float lumaMax = max(lumaCenter, max(max(lumaDown, lumaUp), max(lumaLeft, lumaRight)));\n\n // Compute the delta.\n float lumaRange = lumaMax - lumaMin;\n\n // If the luma variation is lower that a threshold (or if we are in a really dark area),\n // we are not on an edge, don't perform any AA.\n if (lumaRange < max(dEdgeThresholdMin, lumaMax * dEdgeThresholdMax)) {\n gl_FragColor = colorCenter;\n return;\n }\n\n // Query the 4 remaining corners lumas.\n float lumaDownLeft = sampleLuma(coords, -1.0, -1.0);\n float lumaUpRight = sampleLuma(coords, 1.0, 1.0);\n float lumaUpLeft = sampleLuma(coords, -1.0, 1.0);\n float lumaDownRight = sampleLuma(coords, 1.0, -1.0);\n\n // Combine the four edges lumas (using intermediary variables for future computations\n // with the same values).\n float lumaDownUp = lumaDown + lumaUp;\n float lumaLeftRight = lumaLeft + lumaRight;\n\n // Same for corners\n float lumaLeftCorners = lumaDownLeft + lumaUpLeft;\n float lumaDownCorners = lumaDownLeft + lumaDownRight;\n float lumaRightCorners = lumaDownRight + lumaUpRight;\n float lumaUpCorners = lumaUpRight + lumaUpLeft;\n\n // Compute an estimation of the gradient along the horizontal and vertical axis.\n float edgeHorizontal = abs(-2.0 * lumaLeft + lumaLeftCorners) + abs(-2.0 * lumaCenter + lumaDownUp) * 2.0 + abs(-2.0 * lumaRight + lumaRightCorners);\n float edgeVertical = abs(-2.0 * lumaUp + lumaUpCorners) + abs(-2.0 * lumaCenter + lumaLeftRight) * 2.0 + abs(-2.0 * lumaDown + lumaDownCorners);\n\n // Is the local edge horizontal or vertical ?\n bool isHorizontal = (edgeHorizontal >= edgeVertical);\n\n // Choose the step size (one pixel) accordingly.\n float stepLength = isHorizontal ? inverseScreenSize.y : inverseScreenSize.x;\n\n // Select the two neighboring texels lumas in the opposite direction to the local edge.\n float luma1 = isHorizontal ? lumaDown : lumaLeft;\n float luma2 = isHorizontal ? lumaUp : lumaRight;\n // Compute gradients in this direction.\n float gradient1 = luma1 - lumaCenter;\n float gradient2 = luma2 - lumaCenter;\n\n // Which direction is the steepest ?\n bool is1Steepest = abs(gradient1) >= abs(gradient2);\n\n // Gradient in the corresponding direction, normalized.\n float gradientScaled = 0.25 * max(abs(gradient1), abs(gradient2));\n\n // Average luma in the correct direction.\n float lumaLocalAverage = 0.0;\n if(is1Steepest){\n // Switch the direction\n stepLength = -stepLength;\n lumaLocalAverage = 0.5 * (luma1 + lumaCenter);\n } else {\n lumaLocalAverage = 0.5 * (luma2 + lumaCenter);\n }\n\n // Shift UV in the correct direction by half a pixel.\n vec2 currentUv = coords;\n if(isHorizontal){\n currentUv.y += stepLength * 0.5;\n } else {\n currentUv.x += stepLength * 0.5;\n }\n\n // Compute offset (for each iteration step) in the right direction.\n vec2 offset = isHorizontal ? vec2(inverseScreenSize.x, 0.0) : vec2(0.0, inverseScreenSize.y);\n // Compute UVs to explore on each side of the edge, orthogonally.\n // The QUALITY allows us to step faster.\n vec2 uv1 = currentUv - offset * QUALITY(0);\n vec2 uv2 = currentUv + offset * QUALITY(0);\n\n // Read the lumas at both current extremities of the exploration segment,\n // and compute the delta wrt to the local average luma.\n float lumaEnd1 = sampleLuma(uv1);\n float lumaEnd2 = sampleLuma(uv2);\n lumaEnd1 -= lumaLocalAverage;\n lumaEnd2 -= lumaLocalAverage;\n\n // If the luma deltas at the current extremities is larger than the local gradient,\n // we have reached the side of the edge.\n bool reached1 = abs(lumaEnd1) >= gradientScaled;\n bool reached2 = abs(lumaEnd2) >= gradientScaled;\n bool reachedBoth = reached1 && reached2;\n\n // If the side is not reached, we continue to explore in this direction.\n if(!reached1){\n uv1 -= offset * QUALITY(1);\n }\n if(!reached2){\n uv2 += offset * QUALITY(1);\n }\n\n // If both sides have not been reached, continue to explore.\n if(!reachedBoth){\n for(int i = 2; i < dIterations; i++){\n // If needed, read luma in 1st direction, compute delta.\n if(!reached1){\n lumaEnd1 = sampleLuma(uv1);\n lumaEnd1 = lumaEnd1 - lumaLocalAverage;\n }\n // If needed, read luma in opposite direction, compute delta.\n if(!reached2){\n lumaEnd2 = sampleLuma(uv2);\n lumaEnd2 = lumaEnd2 - lumaLocalAverage;\n }\n // If the luma deltas at the current extremities is larger than the local gradient,\n // we have reached the side of the edge.\n reached1 = abs(lumaEnd1) >= gradientScaled;\n reached2 = abs(lumaEnd2) >= gradientScaled;\n reachedBoth = reached1 && reached2;\n\n // If the side is not reached, we continue to explore in this direction,\n // with a variable quality.\n if(!reached1){\n uv1 -= offset * QUALITY(i);\n }\n if(!reached2){\n uv2 += offset * QUALITY(i);\n }\n\n // If both sides have been reached, stop the exploration.\n if(reachedBoth){\n break;\n }\n }\n }\n\n // Compute the distances to each side edge of the edge (!).\n float distance1 = isHorizontal ? (coords.x - uv1.x) : (coords.y - uv1.y);\n float distance2 = isHorizontal ? (uv2.x - coords.x) : (uv2.y - coords.y);\n\n // In which direction is the side of the edge closer ?\n bool isDirection1 = distance1 < distance2;\n float distanceFinal = min(distance1, distance2);\n\n // Thickness of the edge.\n float edgeThickness = (distance1 + distance2);\n\n // Is the luma at center smaller than the local average ?\n bool isLumaCenterSmaller = lumaCenter < lumaLocalAverage;\n\n // If the luma at center is smaller than at its neighbour,\n // the delta luma at each end should be positive (same variation).\n bool correctVariation1 = (lumaEnd1 < 0.0) != isLumaCenterSmaller;\n bool correctVariation2 = (lumaEnd2 < 0.0) != isLumaCenterSmaller;\n\n // Only keep the result in the direction of the closer side of the edge.\n bool correctVariation = isDirection1 ? correctVariation1 : correctVariation2;\n\n // UV offset: read in the direction of the closest side of the edge.\n float pixelOffset = - distanceFinal / edgeThickness + 0.5;\n\n // If the luma variation is incorrect, do not offset.\n float finalOffset = correctVariation ? pixelOffset : 0.0;\n\n // Sub-pixel shifting\n // Full weighted average of the luma over the 3x3 neighborhood.\n float lumaAverage = (1.0 / 12.0) * (2.0 * (lumaDownUp + lumaLeftRight) + lumaLeftCorners + lumaRightCorners);\n // Ratio of the delta between the global average and the center luma,\n // over the luma range in the 3x3 neighborhood.\n float subPixelOffset1 = clamp(abs(lumaAverage - lumaCenter) / lumaRange, 0.0, 1.0);\n float subPixelOffset2 = (-2.0 * subPixelOffset1 + 3.0) * subPixelOffset1 * subPixelOffset1;\n // Compute a sub-pixel offset based on this delta.\n float subPixelOffsetFinal = subPixelOffset2 * subPixelOffset2 * float(dSubpixelQuality);\n\n // Pick the biggest of the two offsets.\n finalOffset = max(finalOffset, subPixelOffsetFinal);\n\n // Compute the final UV coordinates.\n vec2 finalUv = coords;\n if(isHorizontal){\n finalUv.y += finalOffset * stepLength;\n } else {\n finalUv.x += finalOffset * stepLength;\n }\n\n // Read the color at the new UV coordinates, and use it.\n gl_FragColor = texture2D(tColor, finalUv);\n}\n");var v=r(763),y=r(712),x=r(627),O={edgeThreshold:d.a.Numeric(.1,{min:.05,max:.15,step:.01}),maxSearchSteps:d.a.Numeric(16,{min:0,max:32,step:1})},j=function(){function e(e,t){if(this.webgl=e,this._supported=!1,"undefined"!=typeof HTMLImageElement){var r=t.getWidth(),i=t.getHeight();this.edgesTarget=e.createRenderTarget(r,i,!1,"uint8","linear"),this.weightsTarget=e.createRenderTarget(r,i,!1,"uint8","linear"),this.edgesRenderable=function(e,t){var r=t.getWidth(),i=t.getHeight(),o=Object(n.a)(Object(n.a)({},a.c),{tColor:s.e.create(t),uTexSizeInv:s.e.create(l.f.create(1/r,1/i)),uViewport:s.e.create(Object(l.h)()),dEdgeThreshold:s.e.create(.1)}),d=Object(n.a)({},S),p=Object(u.a)(e,"triangles",_,d,o);return Object(c.a)(p,o)}(e,t),this.weightsRenderable=function(e,t){var r=t.getWidth(),i=t.getHeight(),o=Object(v.b)(e.gl,e.extensions,"image-uint8","rgb","ubyte","linear"),d=Object(v.b)(e.gl,e.extensions,"image-uint8","rgba","ubyte","nearest"),p=Object(n.a)(Object(n.a)({},a.c),{tEdges:s.e.create(t),tArea:s.e.create(o),tSearch:s.e.create(d),uTexSizeInv:s.e.create(l.f.create(1/r,1/i)),uViewport:s.e.create(Object(l.h)()),dMaxSearchSteps:s.e.create(8)});Object(v.d)("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAIwCAIAAACOVPcQAACBeklEQVR42u39W4xlWXrnh/3WWvuciIzMrKxrV8/0rWbY0+SQFKcb4owIkSIFCjY9AC1BT/LYBozRi+EX+cV+8IMsYAaCwRcBwjzMiw2jAWtgwC8WR5Q8mDFHZLNHTarZGrLJJllt1W2qKrsumZWZcTvn7L3W54e1vrXX3vuciLPPORFR1XE2EomorB0nVuz//r71re/y/1eMvb4Cb3N11xV/PP/2v4UBAwJG/7H8urx6/25/Gf8O5hypMQ0EEEQwAqLfoN/Z+97f/SW+/NvcgQk4sGBJK6H7N4PFVL+K+e0N11yNfkKvwUdwdlUAXPHHL38oa15f/i/46Ih6SuMSPmLAYAwyRKn7dfMGH97jaMFBYCJUgotIC2YAdu+LyW9vvubxAP8kAL8H/koAuOKP3+q6+xGnd5kdYCeECnGIJViwGJMAkQKfDvB3WZxjLKGh8VSCCzhwEWBpMc5/kBbjawT4HnwJfhr+pPBIu7uu+OOTo9vsmtQcniMBGkKFd4jDWMSCRUpLjJYNJkM+IRzQ+PQvIeAMTrBS2LEiaiR9b/5PuT6Ap/AcfAFO4Y3dA3DFH7/VS+M8k4baEAQfMI4QfbVDDGIRg7GKaIY52qAjTAgTvGBAPGIIghOCYAUrGFNgzA7Q3QhgCwfwAnwe5vDejgG44o/fbm1C5ZlYQvQDARPAIQGxCWBM+wWl37ZQESb4gImexGMDouhGLx1Cst0Saa4b4AqO4Hk4gxo+3DHAV/nx27p3JziPM2pVgoiia5MdEzCGULprIN7gEEeQ5IQxEBBBQnxhsDb5auGmAAYcHMA9eAAz8PBol8/xij9+C4Djlim4gJjWcwZBhCBgMIIYxGAVIkH3ZtcBuLdtRFMWsPGoY9rN+HoBji9VBYdwD2ZQg4cnO7OSq/z4rU5KKdwVbFAjNojCQzTlCLPFSxtamwh2jMUcEgg2Wm/6XgErIBhBckQtGN3CzbVacERgCnfgLswhnvqf7QyAq/z4rRZm1YglYE3affGITaZsdIe2FmMIpnOCap25I6jt2kCwCW0D1uAD9sZctNGXcQIHCkINDQgc78aCr+zjtw3BU/ijdpw3zhCwcaONwBvdeS2YZKkJNJsMPf2JKEvC28RXxxI0ASJyzQCjCEQrO4Q7sFArEzjZhaFc4cdv+/JFdKULM4px0DfUBI2hIsy06BqLhGTQEVdbfAIZXYMPesq6VoCHICzUyjwInO4Y411//LYLs6TDa9wvg2CC2rElgAnpTBziThxaL22MYhzfkghz6GAs2VHbbdM91VZu1MEEpupMMwKyVTb5ij9+u4VJG/5EgEMMmFF01cFai3isRbKbzb+YaU/MQbAm2XSMoUPAmvZzbuKYRIFApbtlrfFuUGd6vq2hXNnH78ZLh/iFhsQG3T4D1ib7k5CC6vY0DCbtrohgLEIClXiGtl10zc0CnEGIhhatLBva7NP58Tvw0qE8yWhARLQ8h4+AhQSP+I4F5xoU+VilGRJs6wnS7ruti/4KvAY/CfdgqjsMy4pf8fodQO8/gnuX3f/3xi3om1/h7THr+co3x93PP9+FBUfbNUjcjEmhcrkT+8K7ml7V10Jo05mpIEFy1NmCJWx9SIKKt+EjAL4Ez8EBVOB6havuT/rByPvHXK+9zUcfcbb254+9fydJknYnRr1oGfdaiAgpxu1Rx/Rek8KISftx3L+DfsLWAANn8Hvw0/AFeAGO9DFV3c6D+CcWbL8Dj9e7f+T1k8AZv/d7+PXWM/Z+VvdCrIvuAKO09RpEEQJM0Ci6+B4xhTWr4cZNOvhktabw0ta0rSJmqz3Yw5/AKXwenod7cAhTmBSPKf6JBdvH8IP17h95pXqw50/+BFnj88fev4NchyaK47OPhhtI8RFSvAfDSNh0Ck0p2gLxGkib5NJj/JWCr90EWQJvwBzO4AHcgztwAFN1evHPUVGwfXON+0debT1YeGON9Yy9/63X+OguiwmhIhQhD7l4sMqlG3D86Suc3qWZ4rWjI1X7u0Ytw6x3rIMeIOPDprfe2XzNgyj6PahhBjO4C3e6puDgXrdg+/5l948vF3bqwZetZ+z9Rx9zdIY5pInPK4Nk0t+l52xdK2B45Qd87nM8fsD5EfUhIcJcERw4RdqqH7Yde5V7m1vhNmtedkz6EDzUMF/2jJYWbC+4fzzA/Y+/8PPH3j9dcBAPIRP8JLXd5BpAu03aziOL3VVHZzz3CXWDPWd+SH2AnxIqQoTZpo9Ckc6HIrFbAbzNmlcg8Ag8NFDDAhbJvTBZXbC94P7t68EXfv6o+21gUtPETU7bbkLxvNKRFG2+KXzvtObonPP4rBvsgmaKj404DlshFole1Glfh02fE7bYR7dZ82oTewIBGn1Md6CG6YUF26X376oevOLzx95vhUmgblI6LBZwTCDY7vMq0op5WVXgsObOXJ+1x3qaBl9j1FeLxbhU9w1F+Wiba6s1X/TBz1LnUfuYDi4r2C69f1f14BWfP+p+W2GFKuC9phcELMYRRLur9DEZTUdEH+iEqWdaM7X4WOoPGI+ZYD2+wcQ+y+ioHUZ9dTDbArzxmi/bJI9BND0Ynd6lBdve/butBw8+f/T9D3ABa3AG8W3VPX4hBin+bj8dMMmSpp5pg7fJ6xrBFE2WQQEWnV8Qg3FbAWzYfM1rREEnmvkN2o1+acG2d/9u68GDzx91v3mAjb1zkpqT21OipPKO0b9TO5W0nTdOmAQm0TObts3aBKgwARtoPDiCT0gHgwnbArzxmtcLc08HgF1asN0C4Ms/fvD5I+7PhfqyXE/b7RbbrGyRQRT9ARZcwAUmgdoz0ehJ9Fn7QAhUjhDAQSw0bV3T3WbNa59jzmiP6GsWbGXDX2ytjy8+f9T97fiBPq9YeLdBmyuizZHaqXITnXiMUEEVcJ7K4j3BFPurtB4bixW8wTpweL8DC95szWMOqucFYGsWbGU7p3TxxxefP+r+oTVktxY0v5hbq3KiOKYnY8ddJVSBxuMMVffNbxwIOERShst73HZ78DZrHpmJmH3K6sGz0fe3UUj0eyRrSCGTTc+rjVNoGzNSv05srAxUBh8IhqChiQgVNIIBH3AVPnrsnXQZbLTm8ammv8eVXn/vWpaTem5IXRlt+U/LA21zhSb9cye6jcOfCnOwhIAYXAMVTUNV0QhVha9xjgA27ODJbLbmitt3tRN80lqG6N/khgot4ZVlOyO4WNg3OIMzhIZQpUEHieg2im6F91hB3I2tubql6BYNN9Hj5S7G0G2tahslBWKDnOiIvuAEDzakDQKDNFQT6gbn8E2y4BBubM230YIpBnDbMa+y3dx0n1S0BtuG62lCCXwcY0F72T1VRR3t2ONcsmDjbmzNt9RFs2LO2hQNyb022JisaI8rAWuw4HI3FuAIhZdOGIcdjLJvvObqlpqvWTJnnQbyi/1M9O8UxWhBs//H42I0q1Yb/XPGONzcmm+ri172mHKvZBpHkJaNJz6v9jxqiklDj3U4CA2ugpAaYMWqNXsdXbmJNd9egCnJEsphXNM+MnK3m0FCJ5S1kmJpa3DgPVbnQnPGWIDspW9ozbcO4K/9LkfaQO2KHuqlfFXSbdNzcEcwoqNEFE9zcIXu9/6n/ym/BC/C3aJLzEKPuYVlbFnfhZ8kcWxV3dbv4bKl28566wD+8C53aw49lTABp9PWbsB+knfc/Li3eVizf5vv/xmvnPKg5ihwKEwlrcHqucuVcVOxEv8aH37E3ZqpZypUulrHEtIWKUr+txHg+ojZDGlwnqmkGlzcVi1dLiNSJiHjfbRNOPwKpx9TVdTn3K05DBx4psIk4Ei8aCkJahRgffk4YnEXe07T4H2RR1u27E6wfQsBDofUgjFUFnwC2AiVtA+05J2zpiDK2Oa0c5fmAecN1iJzmpqFZxqYBCYhFTCsUNEmUnIcZ6aEA5rQVhEywG6w7HSW02XfOoBlQmjwulOFQAg66SvJblrTEX1YtJ3uG15T/BH1OfOQeuR8g/c0gdpT5fx2SKbs9EfHTKdM8A1GaJRHLVIwhcGyydZsbifAFVKl5EMKNU2Hryo+06BeTgqnxzYjThVySDikbtJPieco75lYfKAJOMEZBTjoITuWHXXZVhcUDIS2hpiXHV9Ku4u44bN5OYLDOkJo8w+xJSMbhBRHEdEs9JZUCkQrPMAvaHyLkxgkEHxiNkx/x2YB0mGsQ8EUWj/stW5YLhtS5SMu+/YBbNPDCkGTUybN8krRLBGPlZkVOA0j+a1+rkyQKWGaPHPLZOkJhioQYnVZ2hS3zVxMtgC46KuRwbJNd9nV2PHgb36F194ecf/Yeu2vAFe5nm/bRBFrnY4BauE8ERmZRFUn0k8hbftiVYSKMEme2dJCJSCGYAlNqh87bXOPdUkGy24P6d1ll21MBqqx48Fvv8ZHH8HZFY7j/uAq1xMJUFqCSUlJPmNbIiNsmwuMs/q9CMtsZsFO6SprzCS1Z7QL8xCQClEelpjTduDMsmWD8S1PT152BtvmIGvUeDA/yRn83u/x0/4qxoPHjx+PXY9pqX9bgMvh/Nz9kpP4pOe1/fYf3axUiMdHLlPpZCNjgtNFAhcHEDxTumNONhHrBduW+vOyY++70WWnPXj98eA4kOt/mj/5E05l9+O4o8ePx67HFqyC+qSSnyselqjZGaVK2TadbFLPWAQ4NBhHqDCCV7OTpo34AlSSylPtIdd2AJZlyzYQrDJ5lcWGNceD80CunPLGGzsfD+7wRb95NevJI5docQ3tgCyr5bGnyaPRlmwNsFELViOOx9loebGNq2moDOKpHLVP5al2cymWHbkfzGXL7kfRl44H9wZy33tvt+PB/Xnf93e+nh5ZlU18wCiRUa9m7kib9LYuOk+hudQNbxwm0AQqbfloimaB2lM5fChex+ylMwuTbfmXQtmWlenZljbdXTLuOxjI/fDDHY4Hjx8/Hrse0zXfPFxbUN1kKqSCCSk50m0Ajtx3ub9XHBKHXESb8iO6E+qGytF4nO0OG3SXzbJlhxBnKtKyl0NwybjvYCD30aMdjgePHz8eu56SVTBbgxJMliQ3Oauwg0QHxXE2Ez/EIReLdQj42Gzb4CLS0YJD9xUx7bsi0vJi5mUbW1QzL0h0PFk17rtiIPfJk52MB48fPx67npJJwyrBa2RCCQRTbGZSPCxTPOiND4G2pYyOQ4h4jINIJh5wFU1NFZt+IsZ59LSnDqBjZ2awbOku+yInunLcd8VA7rNnOxkPHj9+PGY9B0MWJJNozOJmlglvDMXDEozdhQWbgs/U6oBanGzLrdSNNnZFjOkmbi5bNt1lX7JLLhn3vXAg9/h4y/Hg8ePHI9dzQMEkWCgdRfYykYKnkP7D4rIujsujaKPBsB54vE2TS00ccvFY/Tth7JXeq1hz+qgVy04sAJawTsvOknHfCwdyT062HA8eP348Zj0vdoXF4pilKa2BROed+9fyw9rWRXeTFXESMOanvDZfJuJaSXouQdMdDJZtekZcLLvEeK04d8m474UDuaenW44Hjx8/Xns9YYqZpszGWB3AN/4VHw+k7WSFtJ3Qicuqb/NlVmgXWsxh570xg2UwxUw3WfO6B5nOuO8aA7lnZxuPB48fPx6znm1i4bsfcbaptF3zNT78eFPtwi1OaCNOqp1x3zUGcs/PN++AGD1+fMXrSVm2baTtPhPahbPhA71wIHd2bXzRa69nG+3CraTtPivahV/55tXWg8fyRY/9AdsY8VbSdp8V7cKrrgdfM//z6ILQFtJ2nxHtwmuoB4/kf74+gLeRtvvMaBdeSz34+vifx0YG20jbfTa0C6+tHrwe//NmOG0L8EbSdp8R7cLrrQe/996O+ai3ujQOskpTNULa7jOjXXj99eCd8lHvoFiwsbTdZ0a78PrrwTvlo966pLuRtB2fFe3Cm6oHP9kNH/W2FryxtN1nTLvwRurBO+Kj3pWXHidtx2dFu/Bm68Fb81HvykuPlrb7LGkX3mw9eGs+6h1Y8MbSdjegXcguQLjmevDpTQLMxtJ2N6NdyBZu9AbrwVvwUW+LbteULUpCdqm0HTelXbhNPe8G68Gb8lFvVfYfSNuxvrTdTWoXbozAzdaDZzfkorOj1oxVxlIMlpSIlpLrt8D4hrQL17z+c3h6hU/wv4Q/utps4+bm+6P/hIcf0JwQ5oQGPBL0eKPTYEXTW+eL/2DKn73J9BTXYANG57hz1cEMviVf/4tf5b/6C5pTQkMIWoAq7hTpOJjtAM4pxKu5vg5vXeUrtI09/Mo/5H+4z+Mp5xULh7cEm2QbRP2tFIKR7WM3fPf/jZ3SWCqLM2l4NxID5zB72HQXv3jj/8mLR5xXNA5v8EbFQEz7PpRfl1+MB/hlAN65qgDn3wTgH13hK7T59bmP+NIx1SHHU84nLOITt3iVz8mNO+lPrjGAnBFqmioNn1mTyk1ta47R6d4MrX7tjrnjYUpdUbv2rVr6YpVfsGG58AG8Ah9eyUN8CX4WfgV+G8LVWPDGb+Zd4cU584CtqSbMKxauxTg+dyn/LkVgA+IR8KHtejeFKRtTmLLpxN6mYVLjYxwXf5x2VofiZcp/lwKk4wGOpYDnoIZPdg/AAbwMfx0+ge9dgZvYjuqKe4HnGnykYo5TvJbG0Vj12JagRhwKa44H95ShkZa5RyLGGdfYvG7aw1TsF6iapPAS29mNS3NmsTQZCmgTzFwgL3upCTgtBTRwvGMAKrgLn4evwin8+afJRcff+8izUGUM63GOOuAs3tJkw7J4kyoNreqrpO6cYLQeFUd7TTpr5YOTLc9RUUogUOVJQ1GYJaFLAW0oTmKyYS46ZooP4S4EON3xQ5zC8/CX4CnM4c1PE8ApexpoYuzqlP3d4S3OJP8ZDK7cKWNaTlqmgDiiHwl1YsE41w1zT4iRTm3DBqxvOUsbMKKDa/EHxagtnta072ejc3DOIh5ojvh8l3tk1JF/AV6FU6jh3U8HwEazLgdCLYSQ+MYiAI2ltomkzttUb0gGHdSUUgsIYjTzLG3mObX4FBRaYtpDVNZrih9TgTeYOBxsEnN1gOCTM8Bsw/ieMc75w9kuAT6A+/AiHGvN/+Gn4KRkiuzpNNDYhDGFndWRpE6SVfm8U5bxnSgVV2jrg6JCKmneqey8VMFgq2+AM/i4L4RUbfSi27lNXZ7R7W9RTcq/q9fk4Xw3AMQd4I5ifAZz8FcVtm9SAom/dyN4lczJQW/kC42ZrHgcCoIf1oVMKkVItmMBi9cOeNHGLqOZk+QqQmrbc5YmYgxELUUN35z2iohstgfLIFmcMV7s4CFmI74L9+EFmGsi+tGnAOD4Yk9gIpo01Y4cA43BWGygMdr4YZekG3OBIUXXNukvJS8tqa06e+lSDCtnqqMFu6hWHXCF+WaYt64m9QBmNxi7Ioy7D+fa1yHw+FMAcPt7SysFLtoG4PXAk7JOA3aAxBRqUiAdU9Yp5lK3HLSRFtOim0sa8euEt08xvKjYjzeJ2GU7YawexrnKI9tmobInjFXCewpwriY9+RR4aaezFhMhGCppKwom0ChrgFlKzyPKkGlTW1YQrE9HJqu8hKGgMc6hVi5QRq0PZxNfrYNgE64utmRv6KKHRpxf6VDUaOvNP5jCEx5q185My/7RKz69UQu2im5k4/eownpxZxNLwiZ1AZTO2ZjWjkU9uaB2HFn6Q3u0JcsSx/qV9hTEApRzeBLDJQXxYmTnq7bdLa3+uqFrxLJ5w1TehnNHx5ECvCh2g2c3hHH5YsfdaSKddztfjQ6imKFGSyFwlLzxEGPp6r5IevVjk1AMx3wMqi1NxDVjLBiPs9tbsCkIY5we5/ML22zrCScFxnNtzsr9Wcc3CnD+pYO+4VXXiDE0oc/vQQ/fDK3oPESJMYXNmJa/DuloJZkcTpcYE8lIH8Dz8DJMiynNC86Mb2lNaaqP/+L7f2fcE/yP7/Lde8xfgSOdMxvOixZf/9p3+M4hT1+F+zApxg9XfUvYjc8qX2lfOOpK2gNRtB4flpFu9FTKCp2XJRgXnX6olp1zyYjTKJSkGmLE2NjUr1bxFM4AeAAHBUFIeSLqXR+NvH/M9fOnfHzOD2vCSyQJKzfgsCh+yi/Mmc35F2fUrw7miW33W9hBD1vpuUojFphIyvg7aTeoymDkIkeW3XLHmguMzbIAJejN6B5MDrhipE2y6SoFRO/AK/AcHHZHNIfiWrEe/C6cr3f/yOvrQKB+zMM55/GQdLDsR+ifr5Fiuu+/y+M78LzOE5dsNuXC3PYvYWd8NXvphLSkJIasrlD2/HOqQ+RjcRdjKTGWYhhVUm4yxlyiGPuMsZR7sMCHUBeTuNWA7if+ifXgc/hovftHXs/DV+Fvwe+f8shzMiMcweFgBly3//vwJfg5AN4450fn1Hd1Rm1aBLu22Dy3y3H2+OqMemkbGZ4jozcDjJf6596xOLpC0eMTHbKnxLxH27uZ/bMTGs2jOaMOY4m87CfQwF0dw53oa1k80JRuz/XgS+8fX3N9Af4qPIMfzKgCp4H5TDGe9GGeFPzSsZz80SlPTxXjgwJmC45njzgt2vbQ4b4OAdUK4/vWhO8d8v6EE8fMUsfakXbPpFJeLs2ubM/qdm/la3WP91uWhxXHjoWhyRUq2iJ/+5mA73zwIIo+LoZ/SgvIRjAd1IMvvn98PfgOvAJfhhm8scAKVWDuaRaK8aQ9f7vuPDH6Bj47ZXau7rqYJ66mTDwEDU6lLbCjCK0qTXyl5mnDoeNRxanj3FJbaksTk0faXxHxLrssgPkWB9LnA/MFleXcJozzjwsUvUG0X/QCve51qkMDXp9mtcyOy3rwBfdvVJK7D6/ACSzg3RoruIq5UDeESfEmVclDxnniU82vxMLtceD0hGZWzBNPMM/jSPne2OVatiTKUpY5vY7gc0LdUAWeWM5tH+O2I66AOWw9xT2BuyRVLGdoDHUsVRXOo/c+ZdRXvFfnxWyIV4upFLCl9eAL7h8Zv0QH8Ry8pA2cHzQpGesctVA37ZtklBTgHjyvdSeKY/RZw/kJMk0Y25cSNRWSigQtlULPTw+kzuJPeYEkXjQRpoGZobYsLF79pyd1dMRHInbgFTZqNLhDqiIsTNpoex2WLcy0/X6rHcdMMQvFSd5dWA++4P7xv89deACnmr36uGlL69bRCL6BSZsS6c0TU2TKK5gtWCzgAOOwQcurqk9j8whvziZSMLcq5hbuwBEsYjopUBkqw1yYBGpLA97SRElEmx5MCInBY5vgLk94iKqSWmhIGmkJ4Bi9m4L645J68LyY4wsFYBfUg5feP/6gWWm58IEmKQM89hq7KsZNaKtP5TxxrUZZVkNmMJtjbKrGxLNEbHPJxhqy7lAmbC32ZqeF6lTaknRWcYaFpfLUBh/rwaQycCCJmW15Kstv6jRHyJFry2C1ahkkIW0LO75s61+owxK1y3XqweX9m5YLM2DPFeOjn/iiqCKJ+yKXF8t5Yl/kNsqaSCryxPq5xWTFIaP8KSW0RYxqupaUf0RcTNSSdJZGcKYdYA6kdtrtmyBckfKXwqk0pHpUHlwWaffjNRBYFPUDWa8e3Lt/o0R0CdisKDM89cX0pvRHEfM8ca4t0s2Xx4kgo91MPQJ/0c9MQYq0co8MBh7bz1fio0UUHLR4aAIOvOmoYO6kwlEVODSSTliWtOtH6sPkrtctF9ZtJ9GIerBskvhdVS5cFNv9s1BU0AbdUgdK4FG+dRnjFmDTzniRMdZO1QhzMK355vigbdkpz9P6qjUGE5J2qAcXmwJ20cZUiAD0z+pGMx6xkzJkmEf40Hr4qZfVg2XzF9YOyoV5BjzVkUJngKf8lgNYwKECEHrCNDrWZzMlflS3yBhr/InyoUgBc/lKT4pxVrrC6g1YwcceK3BmNxZcAtz3j5EIpqguh9H6wc011YN75cKDLpFDxuwkrPQmUwW4KTbj9mZTwBwLq4aQMUZbHm1rylJ46dzR0dua2n3RYCWZsiHROeywyJGR7mXKlpryyCiouY56sFkBWEnkEB/raeh/Sw4162KeuAxMQpEkzy5alMY5wamMsWKKrtW2WpEWNnReZWONKWjrdsKZarpFjqCslq773PLmEhM448Pc3+FKr1+94vv/rfw4tEcu+lKTBe4kZSdijBrykwv9vbCMPcLQTygBjzVckSLPRVGslqdunwJ4oegtFOYb4SwxNgWLCmD7T9kVjTv5YDgpo0XBmN34Z/rEHp0sgyz7lngsrm4lvMm2Mr1zNOJYJ5cuxuQxwMGJq/TP5emlb8fsQBZviK4t8hFL+zbhtlpwaRSxQRWfeETjuauPsdGxsBVdO7nmP4xvzSoT29pRl7kGqz+k26B3Oy0YNV+SXbbQas1ctC/GarskRdFpKczVAF1ZXnLcpaMuzVe6lZ2g/1ndcvOVgRG3sdUAY1bKD6achijMPdMxV4muKVorSpiDHituH7rSTs7n/4y5DhRXo4FVBN4vO/zbAcxhENzGbHCzU/98Mcx5e7a31kWjw9FCe/zNeYyQjZsWb1uc7U33pN4Mji6hCLhivqfa9Ss6xLg031AgfesA/l99m9fgvnaF9JoE6bYKmkGNK3aPbHB96w3+DnxFm4hs0drLsk7U8kf/N/CvwQNtllna0rjq61sH8L80HAuvwH1tvBy2ChqWSCaYTaGN19sTvlfzFD6n+iKTbvtayfrfe9ueWh6GJFoxLdr7V72a5ZpvHcCPDzma0wTO4EgbLyedxstO81n57LYBOBzyfsOhUKsW1J1BB5vr/tz8RyqOFylQP9Tvst2JALsC5lsH8PyQ40DV4ANzYa4dedNiKNR1s+x2wwbR7q4/4cTxqEk4LWDebfisuo36JXLiWFjOtLrlNWh3K1rRS4xvHcDNlFnNmWBBAl5SWaL3oPOfnvbr5pdjVnEaeBJSYjuLEkyLLsWhKccadmOphZkOPgVdalj2QpSmfOsADhMWE2ZBu4+EEJI4wKTAuCoC4xwQbWXBltpxbjkXJtKxxabo9e7tyhlgb6gNlSbUpMh+l/FaqzVwewGu8BW1Zx7pTpQDJUjb8tsUTW6+GDXbMn3mLbXlXJiGdggxFAoUrtPS3wE4Nk02UZG2OOzlk7fRs7i95QCLo3E0jtrjnM7SR3uS1p4qtS2nJ5OwtQVHgOvArLBFijZUV9QtSl8dAY5d0E0hM0w3HS2DpIeB6m/A1+HfhJcGUq4sOxH+x3f5+VO+Ds9rYNI7zPXOYWPrtf8bYMx6fuOAX5jzNR0PdsuON+X1f7EERxMJJoU6GkTEWBvVolVlb5lh3tKCg6Wx1IbaMDdJ+9sUCc5KC46hKGCk3IVOS4TCqdBNfUs7Kd4iXf2RjnT/LLysJy3XDcHLh/vde3x8DoGvwgsa67vBk91G5Pe/HbOe7xwym0NXbtiuuDkGO2IJDh9oQvJ4cY4vdoqLDuoH9Zl2F/ofsekn8lkuhIlhQcffUtSjytFyp++p6NiE7Rqx/lodgKVoceEp/CP4FfjrquZaTtj2AvH5K/ywpn7M34K/SsoYDAdIN448I1/0/wveW289T1/lX5xBzc8N5IaHr0XMOQdHsIkDuJFifj20pBm5jzwUv9e2FhwRsvhAbalCIuIw3bhJihY3p6nTFFIZgiSYjfTf3aXuOjmeGn4bPoGvwl+CFzTRczBIuHBEeImHc37/lGfwZR0cXzVDOvaKfNHvwe+suZ771K/y/XcBlsoN996JpBhoE2toYxOznNEOS5TJc6Id5GEXLjrWo+LEWGNpPDU4WAwsIRROu+1vM+0oW37z/MBN9kqHnSArwPfgFJ7Cq/Ai3Ie7g7ncmI09v8sjzw9mzOAEXoIHxURueaAce5V80f/DOuuZwHM8vsMb5wBzOFWM7wymTXPAEvm4vcFpZ2ut0VZRjkiP2MlmLd6DIpbGSiHOjdnUHN90hRYmhTnmvhzp1iKDNj+b7t5hi79lWGwQ+HN9RsfFMy0FXbEwhfuczKgCbyxYwBmcFhhvo/7a44v+i3XWcwDP86PzpGQYdWh7csP5dBvZ1jNzdxC8pBGuxqSW5vw40nBpj5JhMwvOzN0RWqERHMr4Lv1kWX84xLR830G3j6yqZ1a8UstTlW+qJPOZ+sZ7xZPKTJLhiNOAFd6tk+jrTH31ncLOxid8+nzRb128HhUcru/y0Wn6iT254YPC6FtVSIMoW2sk727AhvTtrWKZTvgsmckfXYZWeNRXx/3YQ2OUxLDrbHtN11IwrgXT6c8dATDwLniYwxzO4RzuQqTKSC5gAofMZ1QBK3zQ4JWobFbcvJm87FK+6JXrKahLn54m3p+McXzzYtP8VF/QpJuh1OwieElEoI1pRxPS09FBrkq2tWCU59+HdhNtTIqKm8EBrw2RTOEDpG3IKo2Y7mFdLm3ZeVjYwVw11o/oznceMve4CgMfNym/utA/d/ILMR7gpXzRy9eDsgLcgbs8O2Va1L0zzIdwGGemTBuwROHeoMShkUc7P+ISY3KH5ZZeWqO8mFTxQYeXTNuzvvK5FGPdQfuu00DwYFY9dyhctEt+OJDdnucfpmyhzUJzfsJjr29l8S0bXBfwRS9ZT26tmMIdZucch5ZboMz3Nio3nIOsYHCGoDT4kUA9MiXEp9Xsui1S8th/kbWIrMBxDGLodWUQIWcvnXy+9M23xPiSMOiRPqM+YMXkUN3gXFrZJwXGzUaMpJfyRS9ZT0lPe8TpScuRlbMHeUmlaKDoNuy62iWNTWNFYjoxFzuJs8oR+RhRx7O4SVNSXpa0ZJQ0K1LAHDQ+D9IepkMXpcsq5EVCvClBUIzDhDoyKwDw1Lc59GbTeORivugw1IcuaEOaGWdNm+Ps5fQ7/tm0DjMegq3yM3vb5j12qUId5UZD2oxDSEWOZMSqFl/W+5oynWDa/aI04tJRQ2eTXusg86SQVu/nwSYwpW6wLjlqIzwLuxGIvoAvul0PS+ZNz0/akp/pniO/8JDnGyaCkzbhl6YcqmK/69prxPqtpx2+Km9al9sjL+rwMgHw4jE/C8/HQ3m1vBuL1fldbzd8mOueVJ92syqdEY4KJjSCde3mcRw2TA6szxedn+zwhZMps0XrqEsiUjnC1hw0TELC2Ek7uAAdzcheXv1BYLagspxpzSAoZZUsIzIq35MnFQ9DOrlNB30jq3L4pkhccKUAA8/ocvN1Rzx9QyOtERs4CVsJRK/DF71kPYrxYsGsm6RMh4cps5g1DOmM54Ly1ii0Hd3Y/BMk8VWFgBVmhqrkJCPBHAolwZaWzLR9Vb7bcWdX9NyUYE+uB2BKfuaeBUcjDljbYVY4DdtsVWvzRZdWnyUzDpjNl1Du3aloAjVJTNDpcIOVVhrHFF66lLfJL1zJr9PQ2nFJSBaKoDe+sAvLufZVHVzYh7W0h/c6AAZ+7Tvj6q9j68G/cTCS/3n1vLKHZwNi+P+pS0WkZNMBMUl+LDLuiE4omZy71r3UFMwNJV+VJ/GC5ixVUkBStsT4gGKh0Gm4Oy3qvq7Lbmq24nPdDuDR9deR11XzP4vFu3TYzfnIyiSVmgizUYGqkIXNdKTY9pgb9D2Ix5t0+NHkVzCdU03suWkkVZAoCONCn0T35gAeW38de43mf97sMOpSvj4aa1KYUm58USI7Wxxes03bAZdRzk6UtbzMaCQ6IxO0dy7X+XsjoD16hpsBeGz9dfzHj+R/Hp8nCxZRqkEDTaCKCSywjiaoMJ1TITE9eg7Jqnq8HL6gDwiZb0u0V0Rr/rmvqjxKuaLCX7ZWXTvAY+uvm3z8CP7nzVpngqrJpZKwWnCUjIviYVlirlGOzPLI3SMVyp/elvBUjjDkNhrtufFFErQ8pmdSlbK16toBHlt/HV8uHMX/vEGALkV3RJREiSlopxwdMXOZPLZ+ix+kAHpMKIk8UtE1ygtquttwxNhphrIZ1IBzjGF3IIGxGcBj6q8bHJBG8T9vdsoWrTFEuebEZuVxhhClH6P5Zo89OG9fwHNjtNQTpD0TG9PJLEYqvEY6Rlxy+ZZGfL0Aj62/bnQCXp//eeM4KzfQVJbgMQbUjlMFIm6TpcfWlZje7NBSV6IsEVmumWIbjiloUzQX9OzYdo8L1wjw2PrrpimONfmfNyzKklrgnEkSzT5QWYQW40YShyzqsRmMXbvVxKtGuYyMKaU1ugenLDm5Ily4iT14fP11Mx+xJv+zZ3MvnfdFqxU3a1W/FTB4m3Qfsyc1XUcdVhDeUDZXSFHHLQj/Y5jtC7ZqM0CXGwB4bP11i3LhOvzPGygYtiUBiwQV/4wFO0majijGsafHyRLu0yG6q35cL1rOpVxr2s5cM2jJYMCdc10Aj6q/blRpWJ//+dmm5psMl0KA2+AFRx9jMe2WbC4jQxnikd4DU8TwUjRVacgdlhmr3bpddzuJ9zXqr2xnxJfzP29RexdtjDVZqzkqa6PyvcojGrfkXiJ8SEtml/nYskicv0ivlxbqjemwUjMw5evdg8fUX9nOiC/lf94Q2i7MURk9nW1MSj5j8eAyV6y5CN2S6qbnw3vdA1Iwq+XOSCl663udN3IzLnrt+us25cI1+Z83SXQUldqQq0b5XOT17bGpLd6ssN1VMPf8c+jG8L3NeCnMdF+Ra3fRa9dft39/LuZ/3vwHoHrqGmQFafmiQw6eyzMxS05K4bL9uA+SKUQzCnSDkqOGokXyJvbgJ/BHI+qvY69//4rl20NsmK2ou2dTsyIALv/91/8n3P2Aao71WFGi8KKv1fRC5+J67Q/507/E/SOshqN5TsmYIjVt+kcjAx98iz/4SaojbIV1rexE7/C29HcYD/DX4a0rBOF5VTu7omsb11L/AWcVlcVZHSsqGuXLLp9ha8I//w3Mv+T4Ew7nTBsmgapoCrNFObIcN4pf/Ob/mrvHTGqqgAupL8qWjWPS9m/31jAe4DjA+4+uCoQoT/zOzlrNd3qd4SdphFxsUvYwGWbTWtISc3wNOWH+kHBMfc6kpmpwPgHWwqaSUG2ZWWheYOGQGaHB+eQ/kn6b3pOgLV+ODSn94wDvr8Bvb70/LLuiPPEr8OGVWfDmr45PZyccEmsVXZGe1pRNX9SU5+AVQkNTIVPCHF/jGmyDC9j4R9LfWcQvfiETmgMMUCMN1uNCakkweZsowdYobiMSlnKA93u7NzTXlSfe+SVbfnPQXmg9LpYAQxpwEtONyEyaueWM4FPjjyjG3uOaFmBTWDNgBXGEiQpsaWhnAqIijB07Dlsy3fUGeP989xbWkyf+FF2SNEtT1E0f4DYYVlxFlbaSMPIRMk/3iMU5pME2SIWJvjckciebkQuIRRyhUvkHg/iUljG5kzVog5hV7vIlCuBrmlhvgPfNHQM8lCf+FEGsYbMIBC0qC9a0uuy2wLXVbLBaP5kjHokCRxapkQyzI4QEcwgYHRZBp+XEFTqXFuNVzMtjXLJgX4gAid24Hjwc4N3dtVSe+NNiwTrzH4WVUOlDobUqr1FuAgYllc8pmzoVrELRHSIW8ViPxNy4xwjBpyR55I6J220qQTZYR4guvUICJiSpr9gFFle4RcF/OMB7BRiX8sSfhpNSO3lvEZCQfLUVTKT78Ek1LRLhWN+yLyTnp8qWUZ46b6vxdRGXfHVqx3eI75YaLa4iNNiK4NOW7wPW6lhbSOF9/M9qw8e/aoB3d156qTzxp8pXx5BKAsYSTOIIiPkp68GmTq7sZtvyzBQaRLNxIZ+paozHWoLFeExIhRBrWitHCAHrCF7/thhD8JhYz84wg93QRV88wLuLY8zF8sQ36qF1J455bOlgnELfshKVxYOXKVuKx0jaj22sczTQqPqtV/XDgpswmGTWWMSDw3ssyUunLLrVPGjYRsH5ggHeHSWiV8kT33ycFSfMgkoOK8apCye0J6VW6GOYvffgU9RWsukEi2kUV2nl4dOYUzRik9p7bcA4ggdJ53LxKcEe17B1R8eqAd7dOepV8sTXf5lhejoL85hUdhDdknPtKHFhljOT+bdq0hxbm35p2nc8+Ja1Iw+tJykgp0EWuAAZYwMVwac5KzYMslhvgHdHRrxKnvhTYcfKsxTxtTETkjHO7rr3zjoV25lAQHrqpV7bTiy2aXMmUhTBnKS91jhtR3GEoF0oLnWhWNnYgtcc4N0FxlcgT7yz3TgNIKkscx9jtV1ZKpWW+Ub1tc1eOv5ucdgpx+FJy9pgbLE7xDyXb/f+hLHVGeitHOi6A7ybo3sF8sS7w7cgdk0nJaOn3hLj3uyD0Zp5pazFIUXUpuTTU18d1EPkDoX8SkmWTnVIozEdbTcZjoqxhNHf1JrSS/AcvHjZ/SMHhL/7i5z+POsTUh/8BvNfYMTA8n+yU/MlTZxSJDRStqvEuLQKWwDctMTQogUDyQRoTQG5Kc6oQRE1yV1jCA7ri7jdZyK0sYTRjCR0Hnnd+y7nHxNgTULqw+8wj0mQKxpYvhjm9uSUxg+TTy7s2GtLUGcywhXSKZN275GsqlclX90J6bRI1aouxmgL7Q0Nen5ziM80SqMIo8cSOo+8XplT/5DHNWsSUr/6lLN/QQ3rDyzLruEW5enpf7KqZoShEduuSFOV7DLX7Ye+GmXb6/hnNNqKsVXuMDFpb9Y9eH3C6NGEzuOuI3gpMH/I6e+zDiH1fXi15t3vA1czsLws0TGEtmPEJdiiFPwlwKbgLHAFk4P6ZyPdymYYHGE0dutsChQBl2JcBFlrEkY/N5bQeXQ18gjunuMfMfsBlxJSx3niO485fwO4fGD5T/+3fPQqkneWVdwnw/3bMPkW9Wbqg+iC765Zk+xcT98ibKZc2EdgHcLoF8cSOo/Oc8fS+OyEULF4g4sJqXVcmfMfsc7A8v1/yfGXmL9I6Fn5pRwZhsPv0TxFNlAfZCvG+Oohi82UC5f/2IsJo0cTOm9YrDoKhFPEUr/LBYTUNht9zelHXDqwfPCIw4owp3mOcIQcLttWXFe3VZ/j5H3cIc0G6oPbCR+6Y2xF2EC5cGUm6wKC5tGEzhsWqw5hNidUiKX5gFWE1GXh4/Qplw4sVzOmx9QxU78g3EF6wnZlEN4FzJ1QPSLEZz1KfXC7vd8ssGdIbNUYpVx4UapyFUHzJoTOo1McSkeNn1M5MDQfs4qQuhhX5vQZFw8suwWTcyYTgioISk2YdmkhehG4PkE7w51inyAGGaU+uCXADabGzJR1fn3lwkty0asIo8cROm9Vy1g0yDxxtPvHDAmpu+PKnM8Ix1wwsGw91YJqhteaWgjYBmmQiebmSpwKKzE19hx7jkzSWOm66oPbzZ8Yj6kxVSpYjVAuvLzYMCRo3oTQecOOjjgi3NQ4l9K5/hOGhNTdcWVOTrlgYNkEXINbpCkBRyqhp+LdRB3g0OU6rMfW2HPCFFMV9nSp+uB2woepdbLBuJQyaw/ZFysXrlXwHxI0b0LovEkiOpXGA1Ijagf+KUNC6rKNa9bQnLFqYNkEnMc1uJrg2u64ELPBHpkgWbmwKpJoDhMwNbbGzAp7Yg31wS2T5rGtzit59PrKhesWG550CZpHEzpv2NGRaxlNjbMqpmEIzygJqQfjypycs2pg2cS2RY9r8HUqkqdEgKTWtWTKoRvOBPDYBltja2SO0RGjy9UHtxwRjA11ujbKF+ti5cIR9eCnxUg6owidtyoU5tK4NLji5Q3HCtiyF2IqLGYsHViOXTXOYxucDqG0HyttqYAKqYo3KTY1ekyDXRAm2AWh9JmsVh/ccg9WJ2E8YjG201sPq5ULxxX8n3XLXuMInbft2mk80rRGjCGctJ8/GFdmEQ9Ug4FlE1ll1Y7jtiraqm5Fe04VV8lvSVBL8hiPrfFVd8+7QH3Qbu2ipTVi8cvSGivc9cj8yvH11YMHdNSERtuOslM97feYFOPKzGcsI4zW0YGAbTAOaxCnxdfiYUmVWslxiIblCeAYr9VYR1gM7GmoPrilunSxxeT3DN/2eBQ9H11+nk1adn6VK71+5+Jfct4/el10/7KBZfNryUunWSCPxPECk1rdOv1WVSrQmpC+Tl46YD3ikQYcpunSQgzVB2VHFhxHVGKDgMEY5GLlQnP7FMDzw7IacAWnO6sBr12u+XanW2AO0wQ8pknnFhsL7KYIqhkEPmEXFkwaN5KQphbkUmG72wgw7WSm9RiL9QT925hkjiVIIhphFS9HKI6/8QAjlpXqg9W2C0apyaVDwKQwrwLY3j6ADR13ZyUNByQXHQu6RY09Hu6zMqXRaNZGS/KEJs0cJEe9VH1QdvBSJv9h09eiRmy0V2uJcqHcShcdvbSNg5fxkenkVprXM9rDVnX24/y9MVtncvbKY706anNl3ASll9a43UiacVquXGhvq4s2FP62NGKfQLIQYu9q1WmdMfmUrDGt8eDS0cXozH/fjmUH6Jruvm50hBDSaEU/2Ru2LEN/dl006TSc/g7tfJERxGMsgDUEr104pfWH9lQaN+M4KWQjwZbVc2rZVNHsyHal23wZtIs2JJqtIc/WLXXRFCpJkfE9jvWlfFbsNQ9pP5ZBS0zKh4R0aMFj1IjTcTnvi0Zz2rt7NdvQb2mgbju1plsH8MmbnEk7KbK0b+wC2iy3aX3szW8xeZvDwET6hWZYwqTXSSG+wMETKum0Dq/q+x62gt2ua2ppAo309TRk9TPazfV3qL9H8z7uhGqGqxNVg/FKx0HBl9OVUORn8Q8Jx9gFttGQUDr3tzcXX9xGgN0EpzN9mdZ3GATtPhL+CjxFDmkeEU6x56kqZRusLzALXVqkCN7zMEcqwjmywDQ6OhyUe0Xao1Qpyncrg6wKp9XfWDsaZplElvQ/b3sdweeghorwBDlHzgk1JmMc/wiERICVy2VJFdMjFuLQSp3S0W3+sngt2njwNgLssFGVQdJ0tu0KH4ky1LW4yrbkuaA6Iy9oz/qEMMXMMDWyIHhsAyFZc2peV9hc7kiKvfULxCl9iddfRK1f8kk9qvbdOoBtOg7ZkOZ5MsGrSHsokgLXUp9y88smniwWyuFSIRVmjplga3yD8Uij5QS1ZiM4U3Qw5QlSm2bXjFe6jzzBFtpg+/YBbLAWG7OPynNjlCw65fukGNdkJRf7yM1fOxVzbxOJVocFoYIaGwH22mIQkrvu1E2nGuebxIgW9U9TSiukPGU+Lt++c3DJPKhyhEEbXCQLUpae2exiKy6tMPe9mDRBFCEMTWrtwxN8qvuGnt6MoihKWS5NSyBhbH8StXoAz8PLOrRgLtOT/+4vcu+7vDLnqNvztOq7fmd8sMmY9Xzn1zj8Dq8+XVdu2Nv0IIySgEdQo3xVHps3Q5i3fLFsV4aiqzAiBhbgMDEd1uh8qZZ+lwhjkgokkOIv4xNJmyncdfUUzgB4oFMBtiu71Xumpz/P+cfUP+SlwFExwWW62r7b+LSPxqxn/gvMZ5z9C16t15UbNlq+jbGJtco7p8wbYlL4alSyfWdeuu0j7JA3JFNuVAwtst7F7FhWBbPFNKIUORndWtLraFLmMu7KFVDDOzqkeaiN33YAW/r76wR4XDN/yN1z7hejPau06EddkS/6XThfcz1fI/4K736fO48vlxt2PXJYFaeUkFS8U15XE3428xdtn2kc8GQlf1vkIaNRRnOMvLTWrZbElEHeLWi1o0dlKPAh1MVgbbVquPJ5+Cr8LU5/H/+I2QlHIU2ClXM9G8v7Rr7oc/hozfUUgsPnb3D+I+7WF8kNO92GY0SNvuxiE+2Bt8prVJTkzE64sfOstxuwfxUUoyk8VjcTlsqe2qITSFoSj6Epd4KsT6BZOWmtgE3hBfir8IzZDwgV4ZTZvD8VvPHERo8v+vL1DASHTz/i9OlKueHDjK5Rnx/JB1Vb1ioXdBra16dmt7dgik10yA/FwJSVY6XjA3oy4SqM2frqDPPSRMex9qs3XQtoWxMj7/Er8GWYsXgjaVz4OYumP2+9kbxvny/6kvWsEBw+fcb5bInc8APdhpOSs01tEqIkoiZjbAqKMruLbJYddHuHFRIyJcbdEdbl2sVLaySygunutBg96Y2/JjKRCdyHV+AEFtTvIpbKIXOamknYSiB6KV/0JetZITgcjjk5ZdaskBtWO86UF0ap6ozGXJk2WNiRUlCPFir66lzdm/SLSuK7EUdPz8f1z29Skq6F1fXg8+5UVR6bszncP4Tn4KUkkdJ8UFCY1zR1i8RmL/qQL3rlei4THG7OODlnKko4oI01kd3CaM08Ia18kC3GNoVaO9iDh+hWxSyTXFABXoau7Q6q9OxYg/OVEMw6jdbtSrJ9cBcewGmaZmg+bvkUnUUaGr+ZfnMH45Ivevl61hMcXsxYLFTu1hTm2zViCp7u0o5l+2PSUh9bDj6FgYypufBDhqK2+oXkiuHFHR3zfj+9PtA8oR0xnqX8qn+sx3bFODSbbF0X8EUvWQ8jBIcjo5bRmLOljDNtcqNtOe756h3l0VhKa9hDd2l1eqmsnh0MNMT/Cqnx6BInumhLT8luljzQ53RiJeA/0dxe5NK0o2fA1+GLXr6eNQWHNUOJssQaTRlGpLHKL9fD+IrQzTOMZS9fNQD4AnRNVxvTdjC+fJdcDDWQcyB00B0t9BDwTxXgaAfzDZ/DBXzRnfWMFRwuNqocOmX6OKNkY63h5n/fFcB28McVHqnXZVI27K0i4rDLNE9lDKV/rT+udVbD8dFFu2GGZ8mOt0kAXcoX3ZkIWVtw+MNf5NjR2FbivROHmhV1/pj2egv/fMGIOWTIWrV3Av8N9imV9IWml36H6cUjqEWNv9aNc+veb2sH46PRaHSuMBxvtW+twxctq0z+QsHhux8Q7rCY4Ct8lqsx7c6Sy0dl5T89rIeEuZKoVctIk1hNpfavER6yyH1Vvm3MbsUHy4ab4hWr/OZPcsRBphnaV65/ZcdYPNNwsjN/djlf9NqCw9U5ExCPcdhKxUgLSmfROpLp4WSUr8ojdwbncbvCf+a/YzRaEc6QOvXcGO256TXc5Lab9POvB+AWY7PigWYjzhifbovuunzRawsO24ZqQQAqguBtmpmPB7ysXJfyDDaV/aPGillgz1MdQg4u5MYaEtBNNHFjkRlSpd65lp4hd2AVPTfbV7FGpyIOfmNc/XVsPfg7vzaS/3nkvLL593ANLvMuRMGpQIhiF7kUEW9QDpAUbTWYBcbp4WpacHHY1aacqQyjGZS9HI3yCBT9kUZJhVOD+zUDvEH9ddR11fzPcTDQ5TlgB0KwqdXSavk9BC0pKp0WmcuowSw07VXmXC5guzSa4p0UvRw2lbDiYUx0ExJJRzWzi6Gm8cnEkfXXsdcG/M/jAJa0+bmCgdmQ9CYlNlSYZOKixmRsgiFxkrmW4l3KdFKv1DM8tk6WxPYJZhUUzcd8Kdtgrw/gkfXXDT7+avmfVak32qhtkg6NVdUS5wgkru1YzIkSduTW1FDwVWV3JQVJVuieTc0y4iDpFwc7/BvSalvKdQM8sv662cevz/+8sQVnjVAT0W2wLllw1JiMhJRxgDjCjLQsOzSFSgZqx7lAW1JW0e03yAD3asC+GD3NbQhbe+mN5GXH1F83KDOM4n/e5JIuH4NpdQARrFPBVptUNcjj4cVMcFSRTE2NpR1LEYbYMmfWpXgP9KejaPsLUhuvLCsVXznAG9dfx9SR1ud/3hZdCLHb1GMdPqRJgqDmm76mHbvOXDtiO2QPUcKo/TWkQ0i2JFXpBoo7vij1i1Lp3ADAo+qvG3V0rM//vFnnTE4hxd5Ka/Cor5YEdsLVJyKtDgVoHgtW11pWSjolPNMnrlrVj9Fv2Qn60twMwKPqr+N/wvr8z5tZcDsDrv06tkqyzESM85Ycv6XBWA2birlNCXrI6VbD2lx2L0vQO0QVTVVLH4SE67fgsfVXv8n7sz7/85Z7cMtbE6f088wSaR4kCkCm10s6pKbJhfqiUNGLq+0gLWC6eUAZFPnLjwqtKd8EwGvWX59t7iPW4X/eAN1svgRVSY990YZg06BD1ohLMtyFTI4pKTJsS9xREq9EOaPWiO2gpms7397x6nQJkbh+Fz2q/rqRROX6/M8bJrqlVW4l6JEptKeUFuMYUbtCQ7CIttpGc6MY93x1r1vgAnRXvY5cvwWPqb9uWQm+lP95QxdNMeWhOq1x0Db55C7GcUv2ZUuN6n8iKzsvOxibC//Yfs9Na8r2Rlz02vXXDT57FP/zJi66/EJSmsJKa8QxnoqW3VLQ+jZVUtJwJ8PNX1NQCwfNgdhhHD9on7PdRdrdGPF28rJr1F+3LBdeyv+8yYfLoMYet1vX4upNAjVvwOUWnlNXJXlkzk5Il6kqeoiL0C07qno+/CYBXq/+utlnsz7/Mzvy0tmI4zm4ag23PRN3t/CWryoUVJGm+5+K8RJ0V8Hc88/XHUX/HfiAq7t+BH+x6v8t438enWmdJwFA6ZINriLGKv/95f8lT9/FnyA1NMVEvQyaXuu+gz36f/DD73E4pwqpLcvm/o0Vle78n//+L/NPvoefp1pTJye6e4A/D082FERa5/opeH9zpvh13cNm19/4v/LDe5xMWTi8I0Ta0qKlK27AS/v3/r+/x/2GO9K2c7kVMonDpq7//jc5PKCxeNPpFVzaRr01wF8C4Pu76hXuX18H4LduTr79guuFD3n5BHfI+ZRFhY8w29TYhbbLi/bvBdqKE4fUgg1pBKnV3FEaCWOWyA+m3WpORZr/j+9TKJtW8yBTF2/ZEODI9/QavHkVdGFp/Pjn4Q+u5hXapsP5sOH+OXXA1LiKuqJxiMNbhTkbdJTCy4llEt6NnqRT4dhg1V3nbdrm6dYMecA1yTOL4PWTE9L5VzPFlLBCvlG58AhehnN4uHsAYinyJ+AZ/NkVvELbfOBUuOO5syBIEtiqHU1k9XeISX5bsimrkUUhnGDxourN8SgUsCZVtKyGbyGzHXdjOhsAvOAswSRyIBddRdEZWP6GZhNK/yjwew9ehBo+3jEADu7Ay2n8mDc+TS7awUHg0OMzR0LABhqLD4hJEh/BEGyBdGlSJoXYXtr+3HS4ijzVpgi0paWXtdruGTknXBz+11qT1Q2inxaTzQCO46P3lfLpyS4fou2PH/PupwZgCxNhGlj4IvUuWEsTkqMWm6i4xCSMc9N1RDQoCVcuGItJ/MRWefais+3synowi/dESgJjkilnWnBTGvRWmaw8oR15257t7CHmCf8HOn7cwI8+NQBXMBEmAa8PMRemrNCEhLGEhDQKcGZWS319BX9PFBEwGTbRBhLbDcaV3drFcDqk5kCTd2JF1Wp0HraqBx8U0wwBTnbpCadwBA/gTH/CDrcCs93LV8E0YlmmcyQRQnjBa8JESmGUfIjK/7fkaDJpmD2QptFNVJU1bbtIAjjWQizepOKptRjbzR9Kag6xZmMLLjHOtcLT3Tx9o/0EcTT1XN3E45u24AiwEypDJXihKjQxjLprEwcmRKclaDNZCVqr/V8mYWyFADbusiY5hvgFoU2vio49RgJLn5OsReRFN6tabeetiiy0V7KFHT3HyZLx491u95sn4K1QQSPKM9hNT0wMVvAWbzDSVdrKw4zRjZMyJIHkfq1VAVCDl/bUhNKlGq0zGr05+YAceXVPCttVk0oqjVwMPt+BBefx4yPtGVkUsqY3CHDPiCM5ngupUwCdbkpd8kbPrCWHhkmtIKLEetF2499eS1jZlIPGYnlcPXeM2KD9vLS0bW3ktYNqUllpKLn5ZrsxlIzxvDu5eHxzGLctkZLEY4PgSOg2IUVVcUONzUDBEpRaMoXNmUc0tFZrTZquiLyKxrSm3DvIW9Fil+AkhXu5PhEPx9mUNwqypDvZWdKlhIJQY7vn2OsnmBeOWnYZ0m1iwbbw1U60by5om47iHRV6fOgzjMf/DAZrlP40Z7syxpLK0lJ0gqaAK1c2KQKu7tabTXkLFz0sCftuwX++MyNeNn68k5Buq23YQhUh0SNTJa1ioQ0p4nUG2y0XilF1JqODqdImloPS4Bp111DEWT0jJjVv95uX9BBV7eB3bUWcu0acSVM23YZdd8R8UbQUxJ9wdu3oMuhdt929ME+mh6JXJ8di2RxbTi6TbrDquqV4aUKR2iwT6aZbyOwEXN3DUsWr8Hn4EhwNyHuXHh7/pdaUjtR7vnDh/d8c9xD/s5f501eQ1+CuDiCvGhk1AN/4Tf74RfxPwD3toLarR0zNtsnPzmS64KIRk861dMWCU8ArasG9T9H0ZBpsDGnjtAOM2+/LuIb2iIUGXNgl5ZmKD/Tw8TlaAuihaFP5yrw18v4x1898zIdP+DDAX1bM3GAMvPgRP/cJn3zCW013nrhHkrITyvYuwOUkcHuKlRSW5C6rzIdY4ppnF7J8aAJbQepgbJYBjCY9usGXDKQxq7RZfh9eg5d1UHMVATRaD/4BHK93/1iAgYZ/+jqPn8Dn4UExmWrpa3+ZOK6MvM3bjwfzxNWA2dhs8+51XHSPJiaAhGSpWevEs5xHLXcEGFXYiCONySH3fPWq93JIsBiSWvWyc3CAN+EcXoT7rCSANloPPoa31rt/5PUA/gp8Q/jDD3hyrjzlR8VkanfOvB1XPubt17vzxAfdSVbD1pzAnfgyF3ycadOTOTXhpEUoLC1HZyNGW3dtmjeXgr2r56JNmRwdNNWaQVBddd6rh4MhviEB9EFRD/7RGvePvCbwAL4Mx/D6M541hHO4D3e7g6PafdcZVw689z7NGTwo5om7A8sPhccT6qKcl9NJl9aM/9kX+e59Hh1yPqGuCCZxuITcsmNaJ5F7d0q6J3H48TO1/+M57085q2icdu2U+W36Ldllz9Agiv4YGljoEN908EzvDOrBF98/vtJwCC/BF2AG75xxEmjmMIcjxbjoaxqOK3/4hPOZzhMPBpYPG44CM0dTVm1LjLtUWWVz1Bcf8tEx0zs8O2A2YVHRxKYOiy/aOVoAaMu0i7ubu43njjmd4ibMHU1sIDHaQNKrZND/FZYdk54oCXetjq7E7IVl9eAL7t+oHnwXXtLx44czzoRFHBztYVwtH1d+NOMkupZ5MTM+gUmq90X+Bh9zjRlmaQ+m7YMqUL/veemcecAtOJ0yq1JnVlN27di2E0+Klp1tAJ4KRw1eMI7aJjsO3R8kPSI3fUFXnIOfdQe86sIIVtWDL7h//Ok6vj8vwDk08NEcI8zz7OhBy+WwalzZeZ4+0XniRfst9pAJqQHDGLzVQ2pheZnnv1OWhwO43/AgcvAEXEVVpa4db9sGvNK8wjaENHkfFQ4Ci5i7dqnQlPoLQrHXZDvO3BIXZbJOBrOaEbML6sFL798I4FhKihjHMsPjBUZYCMFr6nvaArxqXPn4lCa+cHfSa2cP27g3Z3ziYTRrcbQNGLQmGF3F3cBdzzzX7AILx0IB9rbwn9kx2G1FW3Inic+ZLIsVvKR8Zwfj0l1fkqo8LWY1M3IX14OX3r9RKTIO+d9XzAI8qRPGPn/4NC2n6o4rN8XJ82TOIvuVA8zLKUHRFgBCetlDZlqR1gLKjS39xoE7Bt8UvA6BxuEDjU3tFsEijgA+615tmZkXKqiEENrh41iLDDZNq4pKTWR3LZfnos81LOuNa15cD956vLMsJd1rqYp51gDUQqMYm2XsxnUhD2jg1DM7SeuJxxgrmpfISSXVIJIS5qJJSvJPEQ49DQTVIbYWJ9QWa/E2+c/oPK1drmC7WSfJRNKBO5Yjvcp7Gc3dmmI/Xh1kDTEuiSnWqQf37h+fTMhGnDf6dsS8SQfQWlqqwXXGlc/PEZ/SC5mtzIV0nAshlQdM/LvUtYutrEZ/Y+EAFtq1k28zQhOwLr1AIeANzhF8t9qzTdZf2qRKO6MWE9ohBYwibbOmrFtNmg3mcS+tB28xv2uKd/agYCvOP+GkSc+0lr7RXzyufL7QbkUpjLjEWFLqOIkAGu2B0tNlO9Eau2W1qcOUvVRgKzypKIQZ5KI3q0MLzqTNRYqiZOqmtqloIRlmkBHVpHmRYV6/HixbO6UC47KOFJnoMrVyr7wYz+SlW6GUaghYbY1I6kkxA2W1fSJokUdSh2LQ1GAimRGm0MT+uu57H5l7QgOWxERpO9moLRPgTtquWCfFlGlIjQaRly9odmzMOWY+IBO5tB4sW/0+VWGUh32qYk79EidWKrjWuiLpiVNGFWFRJVktyeXWmbgBBzVl8anPuXyNJlBJOlKLTgAbi/EYHVHxWiDaVR06GnHQNpJcWcK2jJtiCfG2sEHLzuI66sGrMK47nPIInPnu799935aOK2cvmvubrE38ZzZjrELCmXM2hM7UcpXD2oC3+ECVp7xtIuxptJ0jUr3sBmBS47TVxlvJ1Sqb/E0uLdvLj0lLr29ypdd/eMX3f6lrxGlKwKQxEGvw0qHbkbwrF3uHKwVENbIV2wZ13kNEF6zD+x24aLNMfDTCbDPnEikZFyTNttxWBXDaBuM8KtI2rmaMdUY7cXcUPstqTGvBGSrFWIpNMfbdea990bvAOC1YX0qbc6smDS1mPxSJoW4fwEXvjMmhlijDRq6qale6aJEuFGoppYDoBELQzLBuh/mZNx7jkinv0EtnUp50lO9hbNK57lZaMAWuWR5Yo9/kYwcYI0t4gWM47Umnl3YmpeBPqSyNp3K7s2DSAS/39KRuEN2bS4xvowV3dFRMx/VFcp2Yp8w2nTO9hCXtHG1kF1L4KlrJr2wKfyq77R7MKpFKzWlY9UkhYxyHWW6nBWPaudvEAl3CGcNpSXPZ6R9BbBtIl6cHL3gIBi+42CYXqCx1gfGWe7Ap0h3luyXdt1MKy4YUT9xSF01G16YEdWsouW9mgDHd3veyA97H+Ya47ZmEbqMY72oPztCGvK0onL44AvgC49saZKkWRz4veWljE1FHjbRJaWv6ZKKtl875h4CziFCZhG5rx7tefsl0aRT1bMHZjm8dwL/6u7wCRysaQblQoG5yAQN5zpatMNY/+yf8z+GLcH/Qn0iX2W2oEfXP4GvwQHuIL9AYGnaO3zqAX6946nkgqZNnUhx43DIdQtMFeOPrgy/y3Yd85HlJWwjLFkU3kFwq28xPnuPhMWeS+tDLV9Otllq7pQCf3uXJDN9wFDiUTgefHaiYbdfi3b3u8+iY6TnzhgehI1LTe8lcd7s1wJSzKbahCRxKKztTLXstGAiu3a6rPuQs5pk9TWAan5f0BZmGf7Ylxzzk/A7PAs4QPPPAHeFQ2hbFHszlgZuKZsJcUmbDC40sEU403cEjczstOEypa+YxevL4QBC8oRYqWdK6b7sK25tfE+oDZgtOQ2Jg8T41HGcBE6fTWHn4JtHcu9S7uYgU5KSCkl/mcnq+5/YBXOEr6lCUCwOTOM1taOI8mSxx1NsCXBEmLKbMAg5MkwbLmpBaFOPrNSlO2HnLiEqW3tHEwd8AeiQLmn+2gxjC3k6AxREqvKcJbTEzlpLiw4rNZK6oJdidbMMGX9FULKr0AkW+2qDEPBNNm5QAt2Ik2nftNWHetubosHLo2nG4vQA7GkcVCgVCgaDixHqo9UUn1A6OshapaNR/LPRYFV8siT1cCtJE0k/3WtaNSuUZYKPnsVIW0xXWnMUxq5+En4Kvw/MqQmVXnAXj9Z+9zM98zM/Agy7F/qqj2Nh67b8HjFnPP3iBn/tkpdzwEJX/whIcQUXOaikeliCRGUk7tiwF0rItwMEhjkZ309hikFoRAmLTpEXWuHS6y+am/KB/fM50aLEhGnSMwkpxzOov4H0AvgovwJ1iGzDLtJn/9BU+fAINfwUe6FHSLhu83viV/+/HrOePX+STT2B9uWGbrMHHLldRBlhS/CJQmcRxJFqZica01XixAZsYiH1uolZxLrR/SgxVIJjkpQP4PE9sE59LKLr7kltSBogS5tyszzH8Fvw8/AS8rNOg0xUS9fIaHwb+6et8Q/gyvKRjf5OusOzGx8evA/BP4IP11uN/grca5O0lcsPLJ5YjwI4QkJBOHa0WdMZYGxPbh2W2nR9v3WxEWqgp/G3+6VZbRLSAAZ3BhdhAaUL33VUSw9yjEsvbaQ9u4A/gGXwZXoEHOuU1GSj2chf+Mo+f8IcfcAxfIKVmyunRbYQVnoevwgfw3TXXcw++xNuP4fhyueEUNttEduRVaDttddoP0eSxLe2LENk6itYxlrxBNBYrNNKSQmeaLcm9c8UsaB5WyO6675yyQIAWSDpBVoA/gxmcwEvwoDv0m58UE7gHn+fJOa8/Ywan8EKRfjsopF83eCglX/Sfr7OeaRoQfvt1CGvIDccH5BCvw1sWIzRGC/66t0VTcLZQZtm6PlAasbOJ9iwWtUo7biktTSIPxnR24jxP1ZKaqq+2RcXM9OrBAm/AAs7hDJ5bNmGb+KIfwCs8a3jnjBrOFeMjHSCdbKr+2uOLfnOd9eiA8Hvvwwq54VbP2OqwkB48Ytc4YEOiH2vTXqodabfWEOzso4qxdbqD5L6tbtNPECqbhnA708DZH4QOJUXqScmUlks7Ot6FBuZw3n2mEbaUX7kDzxHOOQk8nKWMzAzu6ZZ8sOFw4RK+6PcuXo9tB4SbMz58ApfKDXf3szjNIIbGpD5TKTRxGkEMLjLl+K3wlWXBsCUxIDU+jbOiysESqAy1MGUJpXgwbTWzNOVEziIXZrJ+VIztl1PUBxTSo0dwn2bOmfDRPD3TRTGlfbCJvO9KvuhL1hMHhB9wPuPRLGHcdOWG2xc0U+5bQtAJT0nRTewXL1pgk2+rZAdeWmz3jxAqfNQQdzTlbF8uJ5ecEIWvTkevAHpwz7w78QujlD/Lr491bD8/1vhM2yrUQRrWXNQY4fGilfctMWYjL72UL/qS9eiA8EmN88nbNdour+PBbbAjOjIa4iBhfFg6rxeKdEGcL6p3EWR1Qq2Qkhs2DrnkRnmN9tG2EAqmgPw6hoL7Oza7B+3SCrR9tRftko+Lsf2F/mkTndN2LmzuMcKTuj/mX2+4Va3ki16+nnJY+S7MefpkidxwnV+4wkXH8TKnX0tsYzYp29DOOoSW1nf7nTh2akYiWmcJOuTidSaqESrTYpwjJJNVGQr+rLI7WsqerHW6Kp/oM2pKuV7T1QY9gjqlZp41/WfKpl56FV/0kvXQFRyeQ83xaTu5E8p5dNP3dUF34ihyI3GSpeCsywSh22ZJdWto9winhqifb7VRvgktxp13vyjrS0EjvrRfZ62uyqddSWaWYlwTPAtJZ2oZ3j/Sgi/mi+6vpzesfAcWNA0n8xVyw90GVFGuZjTXEQy+6GfLGLMLL523f5E0OmxVjDoOuRiH91RKU+vtoCtH7TgmvBLvtFXWLW15H9GTdVw8ow4IlRLeHECN9ym1e9K0I+Cbnhgv4Yu+aD2HaQJ80XDqOzSGAV4+4yCqBxrsJAX6ZTIoX36QnvzhhzzMfFW2dZVLOJfo0zbce5OvwXMFaZ81mOnlTVXpDZsQNuoYWveketKb5+6JOOsgX+NTm7H49fUTlx+WLuWL7qxnOFh4BxpmJx0p2gDzA/BUARuS6phR+pUsY7MMboAHx5xNsSVfVZcYSwqCKrqon7zM+8ecCkeS4nm3rINuaWvVNnMRI1IRpxTqx8PZUZ0Br/UEduo3B3hNvmgZfs9gQPj8vIOxd2kndir3awvJ6BLvoUuOfFWNYB0LR1OQJoUySKb9IlOBx74q1+ADC2G6rOdmFdJcD8BkfualA+BdjOOzP9uUhGUEX/TwhZsUduwRr8wNuXKurCixLBgpQI0mDbJr9dIqUuV+92ngkJZ7xduCk2yZKbfWrH1VBiTg9VdzsgRjW3CVXCvAwDd+c1z9dWw9+B+8MJL/eY15ZQ/HqvTwVdsZn5WQsgRRnMaWaecu3jFvMBEmgg+FJFZsnSl0zjB9OqPYaBD7qmoVyImFvzi41usesV0julaAR9dfR15Xzv9sEruRDyk1nb+QaLU67T885GTls6YgcY+UiMa25M/pwGrbCfzkvR3e0jjtuaFtnwuagHTSb5y7boBH119HXhvwP487jJLsLJ4XnUkHX5sLbS61dpiAXRoZSCrFJ+EjpeU3puVfitngYNo6PJrAigKktmwjyQdZpfq30mmtulaAx9Zfx15Xzv+cyeuiBFUs9zq8Kq+XB9a4PVvph3GV4E3y8HENJrN55H1X2p8VyqSKwVusJDKzXOZzplWdzBUFK9e+B4+uv468xvI/b5xtSAkBHQaPvtqWzllVvEOxPbuiE6+j2pvjcKsbvI7txnRErgfH7LdXqjq0IokKzga14GzQ23SSbCQvO6r+Or7SMIr/efOkkqSdMnj9mBx2DRsiY29Uj6+qK9ZrssCKaptR6HKURdwUYeUWA2kPzVKQO8ku2nU3Anhs/XWkBx3F/7wJtCTTTIKftthue1ty9xvNYLY/zo5KSbIuKbXpbEdSyeRyYdAIwKY2neyoc3+k1XUaufYga3T9daMUx/r8z1s10ITknIO0kuoMt+TB8jK0lpayqqjsJ2qtXAYwBU932zinimgmd6mTRDnQfr88q36NAI+tv24E8Pr8zxtasBqx0+xHH9HhlrwsxxNUfKOHQaZBITNf0uccj8GXiVmXAuPEAKSdN/4GLHhs/XWj92dN/uetNuBMnVR+XWDc25JLjo5Mg5IZIq226tmCsip2zZliL213YrTlL2hcFjpCduyim3M7/eB16q/blQsv5X/esDRbtJeabLIosWy3ycavwLhtxdWzbMmHiBTiVjJo6lCLjXZsi7p9PEPnsq6X6wd4bP11i0rD5fzPm/0A6brrIsllenZs0lCJlU4abakR59enZKrKe3BZihbTxlyZ2zl1+g0wvgmA166/bhwDrcn/7Ddz0eWZuJvfSESug6NzZsox3Z04FIxz0mUjMwVOOVTq1CQ0AhdbBGVdjG/CgsfUX7esJl3K/7ytWHRv683praW/8iDOCqWLLhpljDY1ZpzK75QiaZoOTpLKl60auHS/97oBXrv+umU9+FL+5+NtLFgjqVLCdbmj7pY5zPCPLOHNCwXGOcLquOhi8CmCWvbcuO73XmMUPab+ug3A6/A/78Bwe0bcS2+tgHn4J5pyS2WbOck0F51Vq3LcjhLvZ67p1ABbaL2H67bg78BfjKi/jr3+T/ABV3ilLmNXTI2SpvxWBtt6/Z//D0z/FXaGbSBgylzlsEGp+5//xrd4/ae4d8DUUjlslfIYS3t06HZpvfQtvv0N7AHWqtjP2pW08QD/FLy//da38vo8PNlKHf5y37Dxdfe/oj4kVIgFq3koLReSR76W/bx//n9k8jonZxzWTANVwEniDsg87sOSd/z7//PvMp3jQiptGVWFX2caezzAXwfgtzYUvbr0iozs32c3Uge7varH+CNE6cvEYmzbPZ9hMaYDdjK4V2iecf6EcEbdUDVUARda2KzO/JtCuDbNQB/iTeL0EG1JSO1jbXS+nLxtPMDPw1fh5+EPrgSEKE/8Gry5A73ui87AmxwdatyMEBCPNOCSKUeRZ2P6Myb5MRvgCHmA9ywsMifU+AYXcB6Xa5GibUC5TSyerxyh0j6QgLVpdyhfArRTTLqQjwe4HOD9s92D4Ap54odXAPBWLAwB02igG5Kkc+piN4lvODIFGAZgT+EO4Si1s7fjSR7vcQETUkRm9O+MXyo9OYhfe4xt9STQ2pcZRLayCV90b4D3jR0DYAfyxJ+eywg2IL7NTMXna7S/RpQ63JhWEM8U41ZyQGjwsVS0QBrEKLu8xwZsbi4wLcCT+OGidPIOCe1PiSc9Qt+go+vYqB7cG+B9d8cAD+WJPz0Am2gxXgU9IneOqDpAAXOsOltVuMzpdakJXrdPCzXiNVUpCeOos5cxnpQT39G+XVLhs1osQVvJKPZyNq8HDwd4d7pNDuWJPxVX7MSzqUDU6gfadKiNlUFTzLeFHHDlzO4kpa7aiKhBPGKwOqxsBAmYkOIpipyXcQSPlRTf+Tii0U3EJGaZsDER2qoB3h2hu0qe+NNwUooYU8y5mILbJe6OuX+2FTKy7bieTDAemaQyQ0CPthljSWO+xmFDIYiESjM5xKd6Ik5lvLq5GrQ3aCMLvmCA9wowLuWJb9xF59hVVP6O0CrBi3ZjZSNOvRy+I6klNVRJYRBaEzdN+imiUXQ8iVF8fsp+W4JXw7WISW7fDh7lptWkCwZ4d7QTXyBPfJMYK7SijjFppGnlIVJBJBYj7eUwtiP1IBXGI1XCsjNpbjENVpSAJ2hq2LTywEly3hUYazt31J8w2+aiLx3g3fohXixPfOMYm6zCGs9LVo9MoW3MCJE7R5u/WsOIjrqBoHUO0bJE9vxBpbhsd3+Nb4/vtPCZ4oZYCitNeYuC/8UDvDvy0qvkiW/cgqNqRyzqSZa/s0mqNGjtKOoTm14zZpUauiQgVfqtQiZjq7Q27JNaSK5ExRcrGCXO1FJYh6jR6CFqK7bZdQZ4t8g0rSlPfP1RdBtqaa9diqtzJkQ9duSryi2brQXbxDwbRUpFMBHjRj8+Nt7GDKgvph9okW7LX47gu0SpGnnFQ1S1lYldOsC7hYteR574ZuKs7Ei1lBsfdz7IZoxzzCVmmVqaSySzQbBVAWDek+N4jh9E/4VqZrJjPwiv9BC1XcvOWgO8275CVyBPvAtTVlDJfZkaZGU7NpqBogAj/xEHkeAuJihWYCxGN6e8+9JtSegFXF1TrhhLGP1fak3pebgPz192/8gB4d/6WT7+GdYnpH7hH/DJzzFiYPn/vjW0SgNpTNuPIZoAEZv8tlGw4+RLxy+ZjnKa5NdFoC7UaW0aduoYse6+bXg1DLg6UfRYwmhGEjqPvF75U558SANrElK/+MdpXvmqBpaXOa/MTZaa1DOcSiLaw9j0NNNst3c+63c7EKTpkvKHzu6bPbP0RkuHAVcbRY8ijP46MIbQeeT1mhA+5PV/inyDdQipf8LTvMXbwvoDy7IruDNVZKTfV4CTSRUYdybUCnGU7KUTDxLgCknqUm5aAW6/1p6eMsOYsphLzsHrE0Y/P5bQedx1F/4yPHnMB3/IOoTU9+BL8PhtjuFKBpZXnYNJxTuv+2XqolKR2UQgHhS5novuxVySJhBNRF3SoKK1XZbbXjVwWNyOjlqWJjrWJIy+P5bQedyldNScP+HZ61xKSK3jyrz+NiHG1hcOLL/+P+PDF2gOkekKGiNWKgJ+8Z/x8Iv4DdQHzcpZyF4v19I27w9/yPGDFQvmEpKtqv/TLiWMfn4sofMm9eAH8Ao0zzh7h4sJqYtxZd5/D7hkYPneDzl5idlzNHcIB0jVlQ+8ULzw/nc5/ojzl2juE0apD7LRnJxe04dMz2iOCFNtGFpTuXA5AhcTRo8mdN4kz30nVjEC4YTZQy4gpC7GlTlrePKhGsKKgeXpCYeO0MAd/GH7yKQUlXPLOasOH3FnSphjHuDvEu4gB8g66oNbtr6eMbFIA4fIBJkgayoXriw2XEDQPJrQeROAlY6aeYOcMf+IVYTU3XFlZufMHinGywaW3YLpObVBAsbjF4QJMsVUSayjk4voPsHJOQfPWDhCgDnmDl6XIRerD24HsGtw86RMHOLvVSHrKBdeVE26gKB5NKHzaIwLOmrqBWJYZDLhASG16c0Tn+CdRhWDgWXnqRZUTnPIHuMJTfLVpkoYy5CzylHVTGZMTwkGAo2HBlkQplrJX6U+uF1wZz2uwS1SQ12IqWaPuO4baZaEFBdukksJmkcTOm+YJSvoqPFzxFA/YUhIvWxcmSdPWTWwbAKVp6rxTtPFUZfKIwpzm4IoMfaYQLWgmlG5FME2gdBgm+J7J+rtS/XBbaVLsR7bpPQnpMFlo2doWaVceHk9+MkyguZNCJ1He+kuHTWyQAzNM5YSUg/GlTk9ZunAsg1qELVOhUSAK0LABIJHLKbqaEbHZLL1VA3VgqoiOKXYiS+HRyaEKgsfIqX64HYWbLRXy/qWoylIV9gudL1OWBNgBgTNmxA6b4txDT4gi3Ri7xFSLxtXpmmYnzAcWDZgY8d503LFogz5sbonDgkKcxGsWsE1OI+rcQtlgBBCSOKD1mtqYpIU8cTvBmAT0yZe+zUzeY92fYjTtGipXLhuR0ePoHk0ofNWBX+lo8Z7pAZDk8mEw5L7dVyZZoE/pTewbI6SNbiAL5xeygW4xPRuLCGbhcO4RIeTMFYHEJkYyEO9HmJfXMDEj/LaH781wHHZEtqSQ/69UnGpzH7LKIAZEDSPJnTesJTUa+rwTepI9dLJEawYV+ZkRn9g+QirD8vF8Mq0jFQ29js6kCS3E1+jZIhgPNanHdHFqFvPJLHqFwQqbIA4jhDxcNsOCCQLDomaL/dr5lyJaJU6FxPFjO3JOh3kVMcROo8u+C+jo05GjMF3P3/FuDLn5x2M04xXULPwaS6hBYki+MrMdZJSgPHlcB7nCR5bJ9Kr5ACUn9jk5kivdd8tk95SOGrtqu9lr2IhK65ZtEl7ZKrp7DrqwZfRUSN1el7+7NJxZbywOC8neNKTch5vsTEMNsoCCqHBCqIPRjIPkm0BjvFODGtto99rCl+d3wmHkW0FPdpZtC7MMcVtGFQjJLX5bdQ2+x9ypdc313uj8xlsrfuLgWXz1cRhZvJYX0iNVBRcVcmCXZs6aEf3RQF2WI/TcCbKmGU3IOoDJGDdDub0+hYckt6PlGu2BcxmhbTdj/klhccLGJMcqRjMJP1jW2ETqLSWJ/29MAoORluJ+6LPffBZbi5gqi5h6catQpmOT7/OFf5UorRpLzCqcMltBLhwd1are3kztrSzXO0LUbXRQcdLh/RdSZ+swRm819REDrtqzC4es6Gw4JCKlSnjYVpo0xeq33PrADbFLL3RuCmObVmPN+24kfa+AojDuM4umKe2QwCf6EN906HwjujaitDs5o0s1y+k3lgbT2W2i7FJdnwbLXhJUBq/9liTctSmFC/0OqUinb0QddTWamtjbHRFuWJJ6NpqZ8vO3fZJ37Db+2GkaPYLGHs7XTTdiFQJ68SkVJFVmY6McR5UycflNCsccHFaV9FNbR4NttLxw4pQ7wJd066Z0ohVbzihaxHVExd/ay04oxUKWt+AsdiQ9OUyZ2krzN19IZIwafSTFgIBnMV73ADj7V/K8u1MaY2sJp2HWm0f41tqwajEvdHWOJs510MaAqN4aoSiPCXtN2KSi46dUxHdaMquar82O1x5jqhDGvqmoE9LfxcY3zqA7/x3HA67r9ZG4O6Cuxu12/+TP+eLP+I+HErqDDCDVmBDO4larujNe7x8om2rMug0MX0rL1+IWwdwfR+p1TNTyNmVJ85ljWzbWuGv8/C7HD/izjkHNZNYlhZcUOKVzKFUxsxxN/kax+8zPWPSFKw80rJr9Tizyj3o1gEsdwgWGoxPezDdZ1TSENE1dLdNvuKL+I84nxKesZgxXVA1VA1OcL49dFlpFV5yJMhzyCmNQ+a4BqusPJ2bB+xo8V9u3x48VVIEPS/mc3DvAbXyoYr6VgDfh5do5hhHOCXMqBZUPhWYbWZECwVJljLgMUWOCB4MUuMaxGNUQDVI50TQ+S3kFgIcu2qKkNSHVoM0SHsgoZxP2d5HH8B9woOk4x5bPkKtAHucZsdykjxuIpbUrSILgrT8G7G5oCW+K0990o7E3T6AdW4TilH5kDjds+H64kS0mz24grtwlzDHBJqI8YJQExotPvoC4JBq0lEjjQkyBZ8oH2LnRsQ4Hu1QsgDTJbO8fQDnllitkxuVskoiKbRF9VwzMDvxHAdwB7mD9yCplhHFEyUWHx3WtwCbSMMTCUCcEmSGlg4gTXkHpZXWQ7kpznK3EmCHiXInqndkQjunG5kxTKEeGye7jWz9cyMR2mGiFQ15ENRBTbCp+Gh86vAyASdgmJq2MC6hoADQ3GosP0QHbnMHjyBQvQqfhy/BUbeHd5WY/G/9LK/8Ka8Jd7UFeNWEZvzPb458Dn8DGLOe3/wGL/4xP+HXlRt+M1PE2iLhR8t+lfgxsuh7AfO2AOf+owWhSZRYQbd622hbpKWKuU+XuvNzP0OseRDa+mObgDHJUSc/pKx31QdKffQ5OIJpt8GWjlgTwMc/w5MPCR/yl1XC2a2Yut54SvOtMev55Of45BOat9aWG27p2ZVORRvnEk1hqWMVUmqa7S2YtvlIpspuF1pt0syuZS2NV14mUidCSfzQzg+KqvIYCMljIx2YK2AO34fX4GWdu5xcIAb8MzTw+j/lyWM+Dw/gjs4GD6ehNgA48kX/AI7XXM/XAN4WHr+9ntywqoCakCqmKP0rmQrJJEErG2Upg1JObr01lKQy4jskWalKYfJ/EDLMpjNSHFEUAde2fltaDgmrNaWQ9+AAb8I5vKjz3L1n1LriB/BXkG/wwR9y/oRX4LlioHA4LzP2inzRx/DWmutRweFjeP3tNeSGlaE1Fde0OS11yOpmbIp2u/jF1n2RRZviJM0yBT3IZl2HWImKjQOxIyeU325b/qWyU9Moj1o07tS0G7qJDoGHg5m8yeCxMoEH8GU45tnrNM84D2l297DQ9t1YP7jki/7RmutRweEA77/HWXOh3HCxkRgldDQkAjNTMl2Iloc1qN5JfJeeTlyTRzxURTdn1Ixv2uKjs12AbdEWlBtmVdk2k7FFwj07PCZ9XAwW3dG+8xKzNFr4EnwBZpy9Qzhh3jDXebBpYcpuo4fQ44u+fD1dweEnHzI7v0xuuOALRUV8rXpFyfSTQYkhd7IHm07jpyhlkCmI0ALYqPTpUxXS+z4jgDj1Pflvmz5ecuItpIBxyTHpSTGWd9g1ApfD/bvwUhL4nT1EzqgX7cxfCcNmb3mPL/qi9SwTHJ49oj5ZLjccbTG3pRmlYi6JCG0mQrAt1+i2UXTZ2dv9IlQpN5naMYtviaXlTrFpoMsl3bOAFEa8sqPj2WCMrx3Yjx99qFwO59Aw/wgx+HlqNz8oZvA3exRDvuhL1jMQHPaOJ0+XyA3fp1OfM3qObEVdhxjvynxNMXQV4+GJyvOEFqeQBaIbbO7i63rpxCltdZShPFxkjM2FPVkn3TG+Rp9pO3l2RzFegGfxGDHIAh8SteR0C4HopXzRF61nheDw6TFN05Ebvq8M3VKKpGjjO6r7nhudTEGMtYM92HTDaR1FDMXJ1eThsbKfywyoWwrzRSXkc51flG3vIid62h29bIcFbTGhfV+faaB+ohj7dPN0C2e2lC96+XouFByen9AsunLDJZ9z7NExiUc0OuoYW6UZkIyx2YUR2z6/TiRjyKMx5GbbjLHvHuf7YmtKghf34LJfx63Yg8vrvN2zC7lY0x0tvKezo4HmGYDU+Gab6dFL+KI761lDcNifcjLrrr9LWZJctG1FfU1uwhoQE22ObjdfkSzY63CbU5hzs21WeTddH2BaL11Gi7lVdlxP1nkxqhnKhVY6knS3EPgVGg1JpN5cP/hivujOelhXcPj8HC/LyI6MkteVjlolBdMmF3a3DbsuAYhL44dxzthWSN065xxUd55Lmf0wRbOYOqH09/o9WbO2VtFdaMb4qBgtFJoT1SqoN8wPXMoXLb3p1PUEhxfnnLzGzBI0Ku7FxrKsNJj/8bn/H8fPIVOd3rfrklUB/DOeO+nkghgSPzrlPxluCMtOnDL4Yml6dK1r3vsgMxgtPOrMFUZbEUbTdIzii5beq72G4PD0DKnwjmBULUVFmy8t+k7fZ3pKc0Q4UC6jpVRqS9Umv8bxw35flZVOU1X7qkjnhZlsMbk24qQ6Hz7QcuL6sDC0iHHki96Uh2UdvmgZnjIvExy2TeJdMDZNSbdZyAHe/Yd1xsQhHiKzjh7GxQ4yqMPaywPkjMamvqrYpmO7Knad+ZQC5msCuAPWUoxrxVhrGv7a+KLXFhyONdTMrZ7ke23qiO40ZJUyzgYyX5XyL0mV7NiUzEs9mjtbMN0dERqwyAJpigad0B3/zRV7s4PIfXSu6YV/MK7+OrYe/JvfGMn/PHJe2fyUdtnFrKRNpXV0Y2559aWPt/G4BlvjTMtXlVIWCnNyA3YQBDmYIodFz41PvXPSa6rq9lWZawZ4dP115HXV/M/tnFkkrBOdzg6aP4pID+MZnTJ1SuuB6iZlyiox4HT2y3YBtkUKWooacBQUDTpjwaDt5poBHl1/HXltwP887lKKXxNUEyPqpGTyA699UqY/lt9yGdlUKra0fFWS+36iylVWrAyd7Uw0CZM0z7xKTOduznLIjG2Hx8cDPLb+OvK6Bv7n1DYci4CxUuRxrjBc0bb4vD3rN5Zz36ntLb83eVJIB8LiIzCmn6SMPjlX+yNlTjvIGjs+QzHPf60Aj62/jrzG8j9vYMFtm1VoRWCJdmw7z9N0t+c8cxZpPeK4aTRicS25QhrVtUp7U578chk4q04Wx4YoQSjFryUlpcQ1AbxZ/XVMknIU//OGl7Q6z9Zpxi0+3yFhSkjUDpnCIUhLWVX23KQ+L9vKvFKI0ZWFQgkDLvBoylrHNVmaw10zwCPrr5tlodfnf94EWnQ0lFRWy8pW9LbkLsyUVDc2NSTHGDtnD1uMtchjbCeb1mpxFP0YbcClhzdLu6lfO8Bj6q+bdT2sz/+8SZCV7VIxtt0DUn9L7r4cLYWDSXnseEpOGFuty0qbOVlS7NNzs5FOGJUqQpl2Q64/yBpZf90sxbE+//PGdZ02HSipCbmD6NItmQ4Lk5XUrGpDMkhbMm2ZVheNYV+VbUWTcv99+2NyX1VoafSuC+AN6q9bFIMv5X/eagNWXZxEa9JjlMwNWb00akGUkSoepp1/yRuuqHGbUn3UdBSTxBU6SEVklzWRUkPndVvw2PrrpjvxOvzPmwHc0hpmq82npi7GRro8dXp0KXnUQmhZbRL7NEVp1uuZmO45vuzKsHrktS3GLWXODVjw+vXXLYx4Hf7njRPd0i3aoAGX6W29GnaV5YdyDj9TFkakje7GHYzDoObfddHtOSpoi2SmzJHrB3hM/XUDDEbxP2/oosszcRlehWXUvzHv4TpBVktHqwenFo8uLVmy4DKLa5d3RtLrmrM3aMFr1183E4sewf+85VWeg1c5ag276NZrM9IJVNcmLEvDNaV62aq+14IAOGFsBt973Ra8Xv11YzXwNfmft7Jg2oS+XOyoC8/cwzi66Dhmgk38kUmP1CUiYWOX1bpD2zWXt2FCp7uq8703APAa9dfNdscR/M/bZLIyouVxqJfeWvG9Je+JVckHQ9+CI9NWxz+blX/KYYvO5n2tAP/vrlZ7+8/h9y+9qeB/Hnt967e5mevX10rALDWK//FaAT5MXdBXdP0C/BAes792c40H+AiAp1e1oH8HgH94g/Lttx1gp63op1eyoM/Bvw5/G/7xFbqJPcCXnmBiwDPb/YKO4FX4OjyCb289db2/Noqicw4i7N6TVtoz8tNwDH+8x/i6Ae7lmaQVENzJFb3Di/BFeAwz+Is9SjeQySpPqbLFlNmyz47z5a/AF+AYFvDmHqibSXTEzoT4Gc3OALaqAP4KPFUJ6n+1x+rGAM6Zd78bgJ0a8QN4GU614vxwD9e1Amy6CcskNrczLx1JIp6HE5UZD/DBHrFr2oNlgG4Odv226BodoryjGJ9q2T/AR3vQrsOCS0ctXZi3ruLlhpFDJYl4HmYtjQCP9rhdn4suySLKDt6wLcC52h8xPlcjju1fn+yhuw4LZsAGUuo2b4Fx2UwQu77uqRHXGtg92aN3tQCbFexc0uk93vhTXbct6y7MulLycoUljx8ngDMBg1tvJjAazpEmOtxlzclvj1vQf1Tx7QlPDpGpqgtdSKz/d9/hdy1vTfFHSmC9dGDZbLiezz7Ac801HirGZsWjydfZyPvHXL/Y8Mjzg8BxTZiuwKz4Eb8sBE9zznszmjvFwHKPIWUnwhqfVRcd4Ck0K6ate48m1oOfrX3/yOtvAsJ8zsPAM89sjnddmuLuDPjX9Bu/L7x7xpMzFk6nWtyQfPg278Gn4Aekz2ZgOmU9eJ37R14vwE/BL8G3aibCiWMWWDQ0ZtkPMnlcGeAu/Ag+8ZyecU5BPuy2ILD+sQqyZhAKmn7XZd+jIMTN9eBL7x95xVLSX4On8EcNlXDqmBlqS13jG4LpmGbkF/0CnOi3H8ETOIXzmnmtb0a16Tzxj1sUvQCBiXZGDtmB3KAefPH94xcUa/6vwRn80GOFyjEXFpba4A1e8KQfFF+259tx5XS4egYn8fQsLGrqGrHbztr+uByTahWuL1NUGbDpsnrwBfePPwHHIf9X4RnM4Z2ABWdxUBlqQ2PwhuDxoS0vvqB1JzS0P4h2nA/QgTrsJFn+Y3AOjs9JFC07CGWX1oNX3T/yHOzgDjwPn1PM3g9Jk9lZrMEpxnlPmBbjyo2+KFXRU52TJM/2ALcY57RUzjObbjqxVw++4P6RAOf58pcVsw9Daje3htriYrpDOonre3CudSe6bfkTEgHBHuDiyu5MCsc7BHhYDx7ePxLjqigXZsw+ijMHFhuwBmtoTPtOxOrTvYJDnC75dnUbhfwu/ZW9AgYd+peL68HD+0emKquiXHhWjJg/UrkJYzuiaL3E9aI/ytrCvAd4GcYZMCkSQxfUg3v3j8c4e90j5ZTPdvmJJGHnOCI2nHS8081X013pHuBlV1gB2MX1YNmWLHqqGN/TWmG0y6clJWthxNUl48q38Bi8vtMKyzzpFdSDhxZ5WBA5ZLt8Jv3895DduBlgbPYAj8C4B8hO68FDkoh5lydC4FiWvBOVqjYdqjiLv92t8yPDjrDaiHdUD15qkSURSGmXJwOMSxWAXYwr3zaAufJ66l+94vv3AO+vPcD7aw/w/toDvL/2AO+vPcD7aw/wHuD9tQd4f+0B3l97gPfXHuD9tQd4f+0B3l97gG8LwP8G/AL8O/A5OCq0Ys2KIdv/qOIXG/4mvFAMF16gZD+2Xvu/B8as5+8bfllWyg0zaNO5bfXj6vfhhwD86/Aq3NfRS9t9WPnhfnvCIw/CT8GLcFTMnpntdF/z9V+PWc/vWoIH+FL3Znv57PitcdGP4R/C34avw5fgRVUInCwbsn1yyA8C8zm/BH8NXoXnVE6wVPjdeCI38kX/3+Ct9dbz1pTmHFRu+Hm4O9Ch3clr99negxfwj+ER/DR8EV6B5+DuQOnTgUw5rnkY+FbNU3gNXh0o/JYTuWOvyBf9FvzX663HH/HejO8LwAl8Hl5YLTd8q7sqA3wbjuExfAFegQdwfyDoSkWY8swzEf6o4Qyewefg+cHNbqMQruSL/u/WWc+E5g7vnnEXgDmcDeSGb/F4cBcCgT+GGRzDU3hZYburAt9TEtHgbM6JoxJ+6NMzzTcf6c2bycv2+KK/f+l6LBzw5IwfqZJhA3M472pWT/ajKxnjv4AFnMEpnBTPND6s2J7qHbPAqcMK74T2mZ4VGB9uJA465It+/eL1WKhYOD7xHOkr1ajK7d0C4+ke4Hy9qXZwpgLr+Znm/uNFw8xQOSy8H9IzjUrd9+BIfenYaylf9FsXr8fBAadnPIEDna8IBcwlxnuA0/Wv6GAWPd7dDIKjMdSWueAsBj4M7TOd06qBbwDwKr7oleuxMOEcTuEZTHWvDYUO7aHqAe0Bbq+HEFRzOz7WVoTDQkVds7A4sIIxfCQdCefFRoIOF/NFL1mPab/nvOakSL/Q1aFtNpUb/nFOVX6gzyg/1nISyDfUhsokIzaBR9Kxm80s5mK+6P56il1jXic7nhQxsxSm3OwBHl4fFdLqi64nDQZvqE2at7cWAp/IVvrN6/BFL1mPhYrGMBfOi4PyjuSGf6wBBh7p/FZTghCNWGgMzlBbrNJoPJX2mW5mwZfyRffXo7OFi5pZcS4qZUrlViptrXtw+GQoyhDPS+ANjcGBNRiLCQDPZPMHuiZfdFpPSTcQwwKYdRNqpkjm7AFeeT0pJzALgo7g8YYGrMHS0iocy+YTm2vyRUvvpXCIpQ5pe666TJrcygnScUf/p0NDs/iAI/nqDHC8TmQT8x3NF91l76oDdQGwu61Z6E0ABv7uO1dbf/37Zlv+Zw/Pbh8f1s4Avur6657/+YYBvur6657/+YYBvur6657/+YYBvur6657/+aYBvuL6657/+VMA8FXWX/f8zzcN8BXXX/f8zzcNMFdbf93zP38KLPiK6697/uebtuArrr/u+Z9vGmCusP6653/+1FjwVdZf9/zPN7oHX339dc//fNMu+irrr3v+50+Bi+Zq6697/uebA/jz8Pudf9ht/fWv517J/XUzAP8C/BAeX9WCDrUpZ3/dEMBxgPcfbtTVvsYV5Yn32u03B3Ac4P3b8I+vxNBKeeL9dRMAlwO83959qGO78sT769oB7g3w/vGVYFzKE++v6wV4OMD7F7tckFkmT7y/rhHgpQO8b+4Y46XyxPvrugBeNcB7BRiX8sT767oAvmCA9woAHsoT76+rBJjLBnh3txOvkifeX1dswZcO8G6N7sXyxPvr6i340gHe3TnqVfLE++uKAb50gHcXLnrX8sR7gNdPRqwzwLu7Y/FO5Yn3AK9jXCMGeHdgxDuVJ75VAI8ljP7PAb3/RfjcZfePHBB+79dpfpH1CanN30d+mT1h9GqAxxJGM5LQeeQ1+Tb+EQJrElLb38VHQ94TRq900aMIo8cSOo+8Dp8QfsB8zpqE1NO3OI9Zrj1h9EV78PqE0WMJnUdeU6E+Jjyk/hbrEFIfeWbvId8H9oTRFwdZaxJGvziW0Hn0gqYB/wyZ0PwRlxJST+BOw9m77Amj14ii1yGM/txYQudN0qDzGe4EqfA/5GJCagsHcPaEPWH0esekSwmjRxM6b5JEcZ4ww50ilvAOFxBSx4yLW+A/YU8YvfY5+ALC6NGEzhtmyZoFZoarwBLeZxUhtY4rc3bKnjB6TKJjFUHzJoTOozF2YBpsjcyxDgzhQ1YRUse8+J4wenwmaylB82hC5w0zoRXUNXaRBmSMQUqiWSWkLsaVqc/ZE0aPTFUuJWgeTei8SfLZQeMxNaZSIzbII4aE1Nmr13P2hNHjc9E9guYNCZ032YlNwESMLcZiLQHkE4aE1BFg0yAR4z1h9AiAGRA0jyZ03tyIxWMajMPWBIsxYJCnlITU5ShiHYdZ94TR4wCmSxg9jtB5KyPGYzymAYexWEMwAPIsAdYdV6aObmNPGD0aYLoEzaMJnTc0Ygs+YDw0GAtqxBjkuP38bMRWCHn73xNGjz75P73WenCEJnhwyVe3AEe8TtKdJcYhBl97wuhNAObK66lvD/9J9NS75v17wuitAN5fe4D31x7g/bUHeH/tAd5fe4D3AO+vPcD7aw/w/toDvL/2AO+vPcD7aw/w/toDvAd4f/24ABzZ8o+KLsSLS+Pv/TqTb3P4hKlQrTGh+fbIBT0Axqznnb+L/V2mb3HkN5Mb/nEHeK7d4IcDld6lmDW/iH9E+AH1MdOw/Jlu2T1xNmY98sv4wHnD7D3uNHu54WUuOsBTbQuvBsPT/UfzNxGYzwkP8c+Yz3C+r/i6DcyRL/rZ+utRwWH5PmfvcvYEt9jLDS/bg0/B64DWKrQM8AL8FPwS9beQCe6EMKNZYJol37jBMy35otdaz0Bw2H/C2Smc7+WGB0HWDELBmOByA3r5QONo4V+DpzR/hFS4U8wMW1PXNB4TOqYz9urxRV++ntWCw/U59Ty9ebdWbrgfRS9AYKKN63ZokZVygr8GZ/gfIhZXIXPsAlNjPOLBby5c1eOLvmQ9lwkOy5x6QV1j5TYqpS05JtUgUHUp5toHGsVfn4NX4RnMCe+AxTpwmApTYxqMxwfCeJGjpXzRF61nbcHhUBPqWze9svwcHJ+S6NPscKrEjug78Dx8Lj3T8D4YxGIdxmJcwhi34fzZUr7olevZCw5vkOhoClq5zBPZAnygD/Tl9EzDh6kl3VhsHYcDEb+hCtJSvuiV69kLDm+WycrOTArHmB5/VYyP6jOVjwgGawk2zQOaTcc1L+aLXrKeveDwZqlKrw8U9Y1p66uK8dEzdYwBeUQAY7DbyYNezBfdWQ97weEtAKYQg2xJIkuveAT3dYeLGH+ShrWNwZgN0b2YL7qznr3g8JYAo5bQBziPjx7BPZ0d9RCQp4UZbnFdzBddor4XHN4KYMrB2qHFRIzzcLAHQZ5the5ovui94PCWAPefaYnxIdzRwdHCbuR4B+tbiy96Lzi8E4D7z7S0mEPd+eqO3cT53Z0Y8SV80XvB4Z0ADJi/f7X113f+7p7/+UYBvur6657/+YYBvur6657/+aYBvuL6657/+aYBvuL6657/+aYBvuL6657/+aYBvuL6657/+VMA8FXWX/f8z58OgK+y/rrnf75RgLna+uue//lTA/CV1V/3/M837aKvvv6653++UQvmauuve/7nTwfAV1N/3fM/fzr24Cuuv+75nz8FFnxl9dc9//MOr/8/glixwRuUfM4AAAAASUVORK5CYII=",p.tArea,o),Object(v.d)("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAAAhCAAAAABIXyLAAAAAOElEQVRIx2NgGAWjYBSMglEwEICREYRgFBZBqDCSLA2MGPUIVQETE9iNUAqLR5gIeoQKRgwXjwAAGn4AtaFeYLEAAAAASUVORK5CYII=",p.tSearch,d);var f=Object(n.a)({},w),h=Object(u.a)(e,"triangles",C,f,p);return Object(c.a)(h,p)}(e,this.edgesTarget.texture),this.blendRenderable=function(e,t,r){var i=t.getWidth(),o=t.getHeight(),d=Object(n.a)(Object(n.a)({},a.c),{tColor:s.e.create(t),tWeights:s.e.create(r),uTexSizeInv:s.e.create(l.f.create(1/i,1/o)),uViewport:s.e.create(Object(l.h)())}),p=Object(n.a)({},A),f=Object(u.a)(e,"triangles",E,p,d);return Object(c.a)(f,d)}(e,t,this.weightsTarget.texture),this._supported=!0}else x.a&&console.log('Missing "HTMLImageElement" required for "SMAA"')}return Object.defineProperty(e.prototype,"supported",{get:function(){return this._supported},enumerable:!1,configurable:!0}),e.prototype.updateState=function(e){var t=this.webgl,r=t.gl,n=t.state;n.enable(r.SCISSOR_TEST),n.disable(r.BLEND),n.disable(r.DEPTH_TEST),n.depthMask(!1);var a=e.x,i=e.y,o=e.width,u=e.height;r.viewport(a,i,o,u),r.scissor(a,i,o,u),n.clearColor(0,0,0,1),r.clear(r.COLOR_BUFFER_BIT),s.e.update(this.edgesRenderable.values.uViewport,y.a.toVec4(this.edgesRenderable.values.uViewport.ref.value,e)),s.e.update(this.weightsRenderable.values.uViewport,y.a.toVec4(this.weightsRenderable.values.uViewport.ref.value,e)),s.e.update(this.blendRenderable.values.uViewport,y.a.toVec4(this.blendRenderable.values.uViewport.ref.value,e))},e.prototype.setSize=function(e,t){var r=this.edgesTarget.getWidth(),n=this.edgesTarget.getHeight();e===r&&t===n||(this.edgesTarget.setSize(e,t),this.weightsTarget.setSize(e,t),s.e.update(this.edgesRenderable.values.uTexSizeInv,l.f.set(this.edgesRenderable.values.uTexSizeInv.ref.value,1/e,1/t)),s.e.update(this.weightsRenderable.values.uTexSizeInv,l.f.set(this.weightsRenderable.values.uTexSizeInv.ref.value,1/e,1/t)),s.e.update(this.blendRenderable.values.uTexSizeInv,l.f.set(this.blendRenderable.values.uTexSizeInv.ref.value,1/e,1/t)))},e.prototype.update=function(e,t){var r=!1;this.edgesRenderable.values.tColor.ref.value!==e&&(s.e.update(this.edgesRenderable.values.tColor,e),r=!0),this.edgesRenderable.values.dEdgeThreshold.ref.value!==t.edgeThreshold&&(s.e.update(this.edgesRenderable.values.dEdgeThreshold,t.edgeThreshold),r=!0),r&&this.edgesRenderable.update(),this.weightsRenderable.values.dMaxSearchSteps.ref.value!==t.maxSearchSteps&&(s.e.update(this.weightsRenderable.values.dMaxSearchSteps,t.maxSearchSteps),this.weightsRenderable.update()),this.blendRenderable.values.tColor.ref.value!==e&&(s.e.update(this.blendRenderable.values.tColor,e),this.blendRenderable.update())},e.prototype.render=function(e,t){this.edgesTarget.bind(),this.updateState(e),this.edgesRenderable.render(),this.weightsTarget.bind(),this.updateState(e),this.weightsRenderable.render(),t?t.bind():this.webgl.unbindFramebuffer(),this.updateState(e),this.blendRenderable.render()},e}(),S=Object(n.a)(Object(n.a)({},a.b),{tColor:Object(i.i)("texture","rgba","ubyte","linear"),uTexSizeInv:Object(i.j)("v2"),uViewport:Object(i.j)("v4"),dEdgeThreshold:Object(i.c)("number")}),_=Object(o.g)("smaa-edges","\nprecision highp float;\n\nattribute vec2 aPosition;\nuniform vec2 uQuadScale;\n\nuniform vec2 uTexSizeInv;\nuniform vec4 uViewport;\n\nvarying vec2 vUv;\nvarying vec4 vOffset[3];\n\nvoid SMAAEdgeDetectionVS(vec2 texCoord) {\n vOffset[0] = texCoord.xyxy + uTexSizeInv.xyxy * vec4(-1.0, 0.0, 0.0, 1.0); // WebGL port note: Changed sign in W component\n vOffset[1] = texCoord.xyxy + uTexSizeInv.xyxy * vec4(1.0, 0.0, 0.0, -1.0); // WebGL port note: Changed sign in W component\n vOffset[2] = texCoord.xyxy + uTexSizeInv.xyxy * vec4(-2.0, 0.0, 0.0, 2.0); // WebGL port note: Changed sign in W component\n}\n\nvoid main() {\n vec2 scale = uViewport.zw * uTexSizeInv;\n vec2 shift = uViewport.xy * uTexSizeInv;\n vUv = (aPosition + 1.0) * 0.5 * scale + shift;\n SMAAEdgeDetectionVS(vUv);\n vec2 position = aPosition * uQuadScale - vec2(1.0, 1.0) + uQuadScale;\n gl_Position = vec4(position, 0.0, 1.0);\n}\n","\nprecision highp float;\nprecision highp int;\nprecision highp sampler2D;\n\nuniform sampler2D tColor;\nuniform vec2 uTexSizeInv;\n\nvarying vec2 vUv;\nvarying vec4 vOffset[3];\n\nvec4 SMAAColorEdgeDetectionPS(vec2 texcoord, vec4 offset[3], sampler2D colorTex) {\n vec2 threshold = vec2(dEdgeThreshold, dEdgeThreshold);\n\n // Calculate color deltas:\n vec4 delta;\n vec3 C = texture2D(colorTex, texcoord).rgb;\n\n vec3 Cleft = texture2D(colorTex, offset[0].xy).rgb;\n vec3 t = abs(C - Cleft);\n delta.x = max(max(t.r, t.g), t.b);\n\n vec3 Ctop = texture2D(colorTex, offset[0].zw).rgb;\n t = abs(C - Ctop);\n delta.y = max(max(t.r, t.g), t.b);\n\n // We do the usual threshold:\n vec2 edges = step(threshold, delta.xy);\n\n // Then discard if there is no edge:\n if (dot(edges, vec2(1.0, 1.0 )) == 0.0)\n discard;\n\n // Calculate right and bottom deltas:\n vec3 Cright = texture2D(colorTex, offset[1].xy).rgb;\n t = abs( C - Cright );\n delta.z = max(max(t.r, t.g), t.b);\n\n vec3 Cbottom = texture2D(colorTex, offset[1].zw).rgb;\n t = abs(C - Cbottom);\n delta.w = max(max(t.r, t.g), t.b);\n\n // Calculate the maximum delta in the direct neighborhood:\n float maxDelta = max(max(max(delta.x, delta.y), delta.z), delta.w );\n\n // Calculate left-left and top-top deltas:\n vec3 Cleftleft = texture2D(colorTex, offset[2].xy).rgb;\n t = abs( C - Cleftleft );\n delta.z = max(max(t.r, t.g), t.b);\n\n vec3 Ctoptop = texture2D(colorTex, offset[2].zw).rgb;\n t = abs(C - Ctoptop);\n delta.w = max(max(t.r, t.g), t.b);\n\n // Calculate the final maximum delta:\n maxDelta = max(max(maxDelta, delta.z), delta.w);\n\n // Local contrast adaptation in action:\n edges.xy *= step(0.5 * maxDelta, delta.xy);\n\n return vec4(edges, 0.0, 0.0);\n}\n\nvoid main() {\n gl_FragColor = SMAAColorEdgeDetectionPS(vUv, vOffset, tColor);\n}\n");var w=Object(n.a)(Object(n.a)({},a.b),{tEdges:Object(i.i)("texture","rgba","ubyte","linear"),tArea:Object(i.i)("texture","rgb","ubyte","linear"),tSearch:Object(i.i)("texture","rgba","ubyte","nearest"),uTexSizeInv:Object(i.j)("v2"),uViewport:Object(i.j)("v4"),dMaxSearchSteps:Object(i.c)("number")}),C=Object(o.g)("smaa-weights","\nprecision highp float;\n\nattribute vec2 aPosition;\nuniform vec2 uQuadScale;\n\nuniform vec2 uTexSizeInv;\nuniform vec4 uViewport;\n\nvarying vec2 vUv;\nvarying vec4 vOffset[3];\nvarying vec2 vPixCoord;\n\nvoid SMAABlendingWeightCalculationVS(vec2 texCoord) {\n vPixCoord = texCoord / uTexSizeInv;\n\n // We will use these offsets for the searches later on (see @PSEUDO_GATHER4):\n vOffset[0] = texCoord.xyxy + uTexSizeInv.xyxy * vec4(-0.25, 0.125, 1.25, 0.125); // WebGL port note: Changed sign in Y and W components\n vOffset[1] = texCoord.xyxy + uTexSizeInv.xyxy * vec4(-0.125, 0.25, -0.125, -1.25); // WebGL port note: Changed sign in Y and W components\n\n // And these for the searches, they indicate the ends of the loops:\n vOffset[2] = vec4(vOffset[0].xz, vOffset[1].yw) + vec4(-2.0, 2.0, -2.0, 2.0) * uTexSizeInv.xxyy * float(dMaxSearchSteps);\n}\n\nvoid main() {\n vec2 scale = uViewport.zw * uTexSizeInv;\n vec2 shift = uViewport.xy * uTexSizeInv;\n vUv = (aPosition + 1.0) * 0.5 * scale + shift;\n SMAABlendingWeightCalculationVS(vUv);\n vec2 position = aPosition * uQuadScale - vec2(1.0, 1.0) + uQuadScale;\n gl_Position = vec4(position, 0.0, 1.0);\n}\n","\nprecision highp float;\nprecision highp int;\nprecision highp sampler2D;\n\n#define SMAASampleLevelZeroOffset(tex, coord, offset) texture2D(tex, coord + float(offset) * uTexSizeInv, 0.0)\n\n#define SMAA_AREATEX_MAX_DISTANCE 16\n#define SMAA_AREATEX_PIXEL_SIZE (1.0 / vec2(160.0, 560.0))\n#define SMAA_AREATEX_SUBTEX_SIZE (1.0 / 7.0)\n\nuniform sampler2D tEdges;\nuniform sampler2D tArea;\nuniform sampler2D tSearch;\nuniform vec2 uTexSizeInv;\n\nvarying vec2 vUv;\nvarying vec4 vOffset[3];\nvarying vec2 vPixCoord;\n\n#if __VERSION__ == 100\n vec2 round(vec2 x) {\n return sign(x) * floor(abs(x) + 0.5);\n }\n#endif\n\nfloat SMAASearchLength(sampler2D searchTex, vec2 e, float bias, float scale) {\n // Not required if searchTex accesses are set to point:\n // float2 SEARCH_TEX_PIXEL_SIZE = 1.0 / float2(66.0, 33.0);\n // e = float2(bias, 0.0) + 0.5 * SEARCH_TEX_PIXEL_SIZE +\n // e * float2(scale, 1.0) * float2(64.0, 32.0) * SEARCH_TEX_PIXEL_SIZE;\n e.r = bias + e.r * scale;\n return 255.0 * texture2D(searchTex, e, 0.0).r;\n}\n\nfloat SMAASearchXLeft(sampler2D edgesTex, sampler2D searchTex, vec2 texCoord, float end) {\n /**\n * @PSEUDO_GATHER4\n * This texCoord has been offset by (-0.25, -0.125) in the vertex shader to\n * sample between edge, thus fetching four edges in a row.\n * Sampling with different offsets in each direction allows to disambiguate\n * which edges are active from the four fetched ones.\n */\n vec2 e = vec2(0.0, 1.0);\n\n for (int i = 0; i < dMaxSearchSteps; i++) { // WebGL port note: Changed while to for\n e = texture2D( edgesTex, texCoord, 0.0).rg;\n texCoord -= vec2(2.0, 0.0) * uTexSizeInv;\n if (!(texCoord.x > end && e.g > 0.8281 && e.r == 0.0)) break;\n }\n\n // We correct the previous (-0.25, -0.125) offset we applied:\n texCoord.x += 0.25 * uTexSizeInv.x;\n\n // The searches are bias by 1, so adjust the coords accordingly:\n texCoord.x += uTexSizeInv.x;\n\n // Disambiguate the length added by the last step:\n texCoord.x += 2.0 * uTexSizeInv.x; // Undo last step\n texCoord.x -= uTexSizeInv.x * SMAASearchLength(searchTex, e, 0.0, 0.5);\n\n return texCoord.x;\n}\n\nfloat SMAASearchXRight(sampler2D edgesTex, sampler2D searchTex, vec2 texCoord, float end) {\n vec2 e = vec2( 0.0, 1.0 );\n\n for (int i = 0; i < dMaxSearchSteps; i++) { // WebGL port note: Changed while to for\n e = texture2D(edgesTex, texCoord, 0.0).rg;\n texCoord += vec2(2.0, 0.0) * uTexSizeInv;\n if (!(texCoord.x < end && e.g > 0.8281 && e.r == 0.0)) break;\n }\n\n texCoord.x -= 0.25 * uTexSizeInv.x;\n texCoord.x -= uTexSizeInv.x;\n texCoord.x -= 2.0 * uTexSizeInv.x;\n texCoord.x += uTexSizeInv.x * SMAASearchLength( searchTex, e, 0.5, 0.5 );\n\n return texCoord.x;\n}\n\nfloat SMAASearchYUp(sampler2D edgesTex, sampler2D searchTex, vec2 texCoord, float end) {\n vec2 e = vec2( 1.0, 0.0 );\n\n for (int i = 0; i < dMaxSearchSteps; i++) { // WebGL port note: Changed while to for\n e = texture2D(edgesTex, texCoord, 0.0).rg;\n texCoord += vec2(0.0, 2.0) * uTexSizeInv; // WebGL port note: Changed sign\n if (!(texCoord.y > end && e.r > 0.8281 && e.g == 0.0)) break;\n }\n\n texCoord.y -= 0.25 * uTexSizeInv.y; // WebGL port note: Changed sign\n texCoord.y -= uTexSizeInv.y; // WebGL port note: Changed sign\n texCoord.y -= 2.0 * uTexSizeInv.y; // WebGL port note: Changed sign\n texCoord.y += uTexSizeInv.y * SMAASearchLength(searchTex, e.gr, 0.0, 0.5); // WebGL port note: Changed sign\n\n return texCoord.y;\n}\n\nfloat SMAASearchYDown(sampler2D edgesTex, sampler2D searchTex, vec2 texCoord, float end) {\n vec2 e = vec2( 1.0, 0.0 );\n\n for (int i = 0; i < dMaxSearchSteps; i++) { // WebGL port note: Changed while to for\n e = texture2D(edgesTex, texCoord, 0.0).rg;\n texCoord -= vec2( 0.0, 2.0 ) * uTexSizeInv; // WebGL port note: Changed sign\n if (!(texCoord.y < end && e.r > 0.8281 && e.g == 0.0)) break;\n }\n\n texCoord.y += 0.25 * uTexSizeInv.y; // WebGL port note: Changed sign\n texCoord.y += uTexSizeInv.y; // WebGL port note: Changed sign\n texCoord.y += 2.0 * uTexSizeInv.y; // WebGL port note: Changed sign\n texCoord.y -= uTexSizeInv.y * SMAASearchLength(searchTex, e.gr, 0.5, 0.5); // WebGL port note: Changed sign\n\n return texCoord.y;\n}\n\nvec2 SMAAArea(sampler2D areaTex, vec2 dist, float e1, float e2, float offset) {\n // Rounding prevents precision errors of bilinear filtering:\n vec2 texCoord = float(SMAA_AREATEX_MAX_DISTANCE) * round(4.0 * vec2(e1, e2)) + dist;\n\n // We do a scale and bias for mapping to texel space:\n texCoord = SMAA_AREATEX_PIXEL_SIZE * texCoord + (0.5 * SMAA_AREATEX_PIXEL_SIZE);\n\n // Move to proper place, according to the subpixel offset:\n texCoord.y += SMAA_AREATEX_SUBTEX_SIZE * offset;\n\n return texture2D(areaTex, texCoord, 0.0).rg;\n}\n\nvec4 SMAABlendingWeightCalculationPS(vec2 texCoord, vec2 pixCoord, vec4 offset[3], sampler2D edgesTex, sampler2D areaTex, sampler2D searchTex, ivec4 subsampleIndices) {\n vec4 weights = vec4(0.0, 0.0, 0.0, 0.0);\n\n vec2 e = texture2D(edgesTex, texCoord).rg;\n\n if (e.g > 0.0) { // Edge at north\n vec2 d;\n\n // Find the distance to the left:\n vec2 coords;\n coords.x = SMAASearchXLeft(edgesTex, searchTex, offset[0].xy, offset[2].x );\n coords.y = offset[1].y; // offset[1].y = texCoord.y - 0.25 * uTexSizeInv.y (@CROSSING_OFFSET)\n d.x = coords.x;\n\n // Now fetch the left crossing edges, two at a time using bilinear\n // filtering. Sampling at -0.25 (see @CROSSING_OFFSET) enables to\n // discern what value each edge has:\n float e1 = texture2D(edgesTex, coords, 0.0).r;\n\n // Find the distance to the right:\n coords.x = SMAASearchXRight(edgesTex, searchTex, offset[0].zw, offset[2].y);\n d.y = coords.x;\n\n // We want the distances to be in pixel units (doing this here allow to\n // better interleave arithmetic and memory accesses):\n d = d / uTexSizeInv.x - pixCoord.x;\n\n // SMAAArea below needs a sqrt, as the areas texture is compressed\n // quadratically:\n vec2 sqrt_d = sqrt(abs(d));\n\n // Fetch the right crossing edges:\n coords.y -= 1.0 * uTexSizeInv.y; // WebGL port note: Added\n float e2 = SMAASampleLevelZeroOffset(edgesTex, coords, ivec2(1, 0)).r;\n\n // Ok, we know how this pattern looks like, now it is time for getting\n // the actual area:\n weights.rg = SMAAArea(areaTex, sqrt_d, e1, e2, float(subsampleIndices.y));\n }\n\n if (e.r > 0.0) { // Edge at west\n vec2 d;\n\n // Find the distance to the top:\n vec2 coords;\n\n coords.y = SMAASearchYUp(edgesTex, searchTex, offset[1].xy, offset[2].z );\n coords.x = offset[0].x; // offset[1].x = texCoord.x - 0.25 * uTexSizeInv.x;\n d.x = coords.y;\n\n // Fetch the top crossing edges:\n float e1 = texture2D(edgesTex, coords, 0.0).g;\n\n // Find the distance to the bottom:\n coords.y = SMAASearchYDown(edgesTex, searchTex, offset[1].zw, offset[2].w);\n d.y = coords.y;\n\n // We want the distances to be in pixel units:\n d = d / uTexSizeInv.y - pixCoord.y;\n\n // SMAAArea below needs a sqrt, as the areas texture is compressed\n // quadratically:\n vec2 sqrt_d = sqrt(abs(d));\n\n // Fetch the bottom crossing edges:\n coords.y -= 1.0 * uTexSizeInv.y; // WebGL port note: Added\n float e2 = SMAASampleLevelZeroOffset(edgesTex, coords, ivec2(0, 1)).g;\n\n // Get the area for this direction:\n weights.ba = SMAAArea(areaTex, sqrt_d, e1, e2, float(subsampleIndices.x));\n }\n\n return weights;\n}\n\nvoid main() {\n gl_FragColor = SMAABlendingWeightCalculationPS(vUv, vPixCoord, vOffset, tEdges, tArea, tSearch, ivec4(0.0));\n}\n");var A=Object(n.a)(Object(n.a)({},a.b),{tColor:Object(i.i)("texture","rgba","ubyte","linear"),tWeights:Object(i.i)("texture","rgba","ubyte","linear"),uTexSizeInv:Object(i.j)("v2"),uViewport:Object(i.j)("v4")}),E=Object(o.g)("smaa-blend","\nprecision highp float;\n\nattribute vec2 aPosition;\nuniform vec2 uQuadScale;\n\nuniform vec2 uTexSizeInv;\nuniform vec4 uViewport;\n\nvarying vec2 vUv;\nvarying vec4 vOffset[2];\n\nvoid SMAANeighborhoodBlendingVS(vec2 texCoord) {\n vOffset[0] = texCoord.xyxy + uTexSizeInv.xyxy * vec4(-1.0, 0.0, 0.0, 1.0); // WebGL port note: Changed sign in W component\n vOffset[1] = texCoord.xyxy + uTexSizeInv.xyxy * vec4(1.0, 0.0, 0.0, -1.0); // WebGL port note: Changed sign in W component\n}\n\nvoid main() {\n vec2 scale = uViewport.zw * uTexSizeInv;\n vec2 shift = uViewport.xy * uTexSizeInv;\n vUv = (aPosition + 1.0) * 0.5 * scale + shift;\n SMAANeighborhoodBlendingVS(vUv);\n vec2 position = aPosition * uQuadScale - vec2(1.0, 1.0) + uQuadScale;\n gl_Position = vec4(position, 0.0, 1.0);\n}\n","\nprecision highp float;\nprecision highp int;\nprecision highp sampler2D;\n\nuniform sampler2D tWeights;\nuniform sampler2D tColor;\nuniform vec2 uTexSizeInv;\n\nvarying vec2 vUv;\nvarying vec4 vOffset[2];\n\nvec4 SMAANeighborhoodBlendingPS(vec2 texCoord, vec4 offset[2], sampler2D colorTex, sampler2D blendTex) {\n // Fetch the blending weights for current pixel:\n vec4 a;\n a.xz = texture2D(blendTex, texCoord).xz;\n a.y = texture2D(blendTex, offset[1].zw).g;\n a.w = texture2D(blendTex, offset[1].xy).a;\n\n // Is there any blending weight with a value greater than 0.0?\n if (dot(a, vec4(1.0, 1.0, 1.0, 1.0)) < 1e-5) {\n return texture2D(colorTex, texCoord, 0.0);\n } else {\n // Up to 4 lines can be crossing a pixel (one through each edge). We\n // favor blending by choosing the line with the maximum weight for each\n // direction:\n vec2 offset;\n offset.x = a.a > a.b ? a.a : -a.b; // left vs. right\n offset.y = a.g > a.r ? -a.g : a.r; // top vs. bottom // WebGL port note: Changed signs\n\n // Then we go in the direction that has the maximum weight:\n if (abs(offset.x) > abs(offset.y)) { // horizontal vs. vertical\n offset.y = 0.0;\n } else {\n offset.x = 0.0;\n }\n\n // Fetch the opposite color and lerp by hand:\n vec4 C = texture2D(colorTex, texCoord, 0.0);\n texCoord += sign(offset) * uTexSizeInv;\n vec4 Cop = texture2D(colorTex, texCoord, 0.0);\n float s = abs(offset.x) > abs(offset.y) ? abs(offset.x) : abs(offset.y);\n\n // WebGL port note: Added gamma correction\n C.xyz = pow(C.xyz, vec3(2.2));\n Cop.xyz = pow(Cop.xyz, vec3(2.2));\n vec4 mixed = mix(C, Cop, s);\n mixed.xyz = pow(mixed.xyz, vec3(1.0 / 2.2));\n\n return mixed;\n }\n}\n\nvoid main() {\n gl_FragColor = SMAANeighborhoodBlendingPS(vUv, vOffset, tColor, tWeights);\n}\n");var P=Object(n.a)(Object(n.a)({},a.b),{tDepth:Object(i.i)("texture","rgba","ubyte","nearest"),uTexSize:Object(i.j)("v2"),dOrthographic:Object(i.c)("number"),uNear:Object(i.j)("f"),uFar:Object(i.j)("f"),uMaxPossibleViewZDiff:Object(i.j)("f")});var T=Object(n.a)(Object(n.a)({},a.b),{tDepth:Object(i.i)("texture","rgba","ubyte","nearest"),uSamples:Object(i.j)("v3[]"),dNSamples:Object(i.c)("number"),uProjection:Object(i.j)("m4"),uInvProjection:Object(i.j)("m4"),uBounds:Object(i.j)("v4"),uTexSize:Object(i.j)("v2"),uRadius:Object(i.j)("f"),uBias:Object(i.j)("f")});var I=Object(n.a)(Object(n.a)({},a.b),{tSsaoDepth:Object(i.i)("texture","rgba","ubyte","nearest"),uTexSize:Object(i.j)("v2"),uKernel:Object(i.j)("f[]"),dOcclusionKernelSize:Object(i.c)("number"),uBlurDirectionX:Object(i.j)("f"),uBlurDirectionY:Object(i.j)("f"),uMaxPossibleViewZDiff:Object(i.j)("f"),uNear:Object(i.j)("f"),uFar:Object(i.j)("f"),uBounds:Object(i.j)("v4"),dOrthographic:Object(i.c)("number")});function k(e,t,r){var i=Object(n.a)(Object(n.a)({},a.c),{tSsaoDepth:s.e.create(t),uTexSize:s.e.create(l.f.create(t.getWidth(),t.getHeight())),uKernel:s.e.create([0]),dOcclusionKernelSize:s.e.create(1),uBlurDirectionX:s.e.create("horizontal"===r?1:0),uBlurDirectionY:s.e.create("vertical"===r?1:0),uMaxPossibleViewZDiff:s.e.create(.5),uNear:s.e.create(0),uFar:s.e.create(1e4),uBounds:s.e.create(Object(l.h)()),dOrthographic:s.e.create(0)}),d=Object(n.a)({},I),f=Object(o.g)("ssao_blur",p.a,"\nprecision highp float;\nprecision highp int;\nprecision highp sampler2D;\n\nuniform sampler2D tSsaoDepth;\nuniform vec2 uTexSize;\nuniform vec4 uBounds;\n\nuniform float uKernel[dOcclusionKernelSize];\n\nuniform float uBlurDirectionX;\nuniform float uBlurDirectionY;\n\nuniform float uMaxPossibleViewZDiff;\n\nuniform float uNear;\nuniform float uFar;\n\n#include common\n\nfloat getViewZ(const in float depth) {\n #if dOrthographic == 1\n return orthographicDepthToViewZ(depth, uNear, uFar);\n #else\n return perspectiveDepthToViewZ(depth, uNear, uFar);\n #endif\n}\n\nbool isBackground(const in float depth) {\n return depth == 1.0;\n}\n\nbool outsideBounds(const in vec2 p) {\n return p.x < uBounds.x || p.y < uBounds.y || p.x > uBounds.z || p.y > uBounds.w;\n}\n\nvoid main(void) {\n vec2 coords = gl_FragCoord.xy / uTexSize;\n\n vec2 packedDepth = texture2D(tSsaoDepth, coords).zw;\n\n if (outsideBounds(coords)) {\n gl_FragColor = vec4(packUnitIntervalToRG(1.0), packedDepth);\n return;\n }\n\n float selfDepth = unpackRGToUnitInterval(packedDepth);\n // if background and if second pass\n if (isBackground(selfDepth) && uBlurDirectionY != 0.0) {\n gl_FragColor = vec4(packUnitIntervalToRG(1.0), packedDepth);\n return;\n }\n\n float selfViewZ = getViewZ(selfDepth);\n\n vec2 offset = vec2(uBlurDirectionX, uBlurDirectionY) / uTexSize;\n\n float sum = 0.0;\n float kernelSum = 0.0;\n // only if kernelSize is odd\n for (int i = -dOcclusionKernelSize / 2; i <= dOcclusionKernelSize / 2; i++) {\n vec2 sampleCoords = coords + float(i) * offset;\n if (outsideBounds(sampleCoords)) {\n continue;\n }\n\n vec4 sampleSsaoDepth = texture2D(tSsaoDepth, sampleCoords);\n\n float sampleDepth = unpackRGToUnitInterval(sampleSsaoDepth.zw);\n if (isBackground(sampleDepth)) {\n continue;\n }\n\n if (abs(float(i)) > 1.0) { // abs is not defined for int in webgl1\n float sampleViewZ = getViewZ(sampleDepth);\n if (abs(selfViewZ - sampleViewZ) > uMaxPossibleViewZDiff) {\n continue;\n }\n }\n\n float kernel = uKernel[int(abs(float(i)))]; // abs is not defined for int in webgl1\n float sampleValue = unpackRGToUnitInterval(sampleSsaoDepth.xy);\n\n sum += kernel * sampleValue;\n kernelSum += kernel;\n }\n\n gl_FragColor = vec4(packUnitIntervalToRG(sum / kernelSum), packedDepth);\n}\n"),h=Object(u.a)(e,"triangles",f,d,i);return Object(c.a)(h,i)}var M=Object(n.a)(Object(n.a)({},a.b),{tSsaoDepth:Object(i.i)("texture","rgba","ubyte","nearest"),tColor:Object(i.i)("texture","rgba","ubyte","nearest"),tDepth:Object(i.i)("texture","rgba","ubyte","nearest"),tOutlines:Object(i.i)("texture","rgba","ubyte","nearest"),uTexSize:Object(i.j)("v2"),dOrthographic:Object(i.c)("number"),uNear:Object(i.j)("f"),uFar:Object(i.j)("f"),uFogNear:Object(i.j)("f"),uFogFar:Object(i.j)("f"),uFogColor:Object(i.j)("v3"),uTransparentBackground:Object(i.j)("b"),uMaxPossibleViewZDiff:Object(i.j)("f"),dOcclusionEnable:Object(i.c)("boolean"),dOutlineEnable:Object(i.c)("boolean"),dOutlineScale:Object(i.c)("number"),uOutlineThreshold:Object(i.j)("f")});var D={occlusion:d.a.MappedStatic("on",{on:d.a.Group({samples:d.a.Numeric(32,{min:1,max:256,step:1}),radius:d.a.Numeric(5,{min:0,max:10,step:.1},{description:"Final radius is 2^x."}),bias:d.a.Numeric(.8,{min:0,max:3,step:.1}),blurKernelSize:d.a.Numeric(15,{min:1,max:25,step:2})}),off:d.a.Group({})},{cycle:!0,description:"Darken occluded crevices with the ambient occlusion effect"}),outline:d.a.MappedStatic("off",{on:d.a.Group({scale:d.a.Numeric(1,{min:1,max:5,step:1}),threshold:d.a.Numeric(.33,{min:.01,max:1,step:.01})}),off:d.a.Group({})},{cycle:!0,description:"Draw outline around 3D objects"}),antialiasing:d.a.MappedStatic("smaa",{fxaa:d.a.Group(h),smaa:d.a.Group(O),off:d.a.Group({})},{options:[["fxaa","FXAA"],["smaa","SMAA"],["off","Off"]],description:"Smooth pixel edges"})},R=function(){function e(e,t){this.webgl=e,this.ssaoScale=this.calcSsaoScale();var r=t.colorTarget,i=t.depthTexture,d=r.getWidth(),f=r.getHeight();this.nSamples=1,this.blurKernelSize=1,this.target=e.createRenderTarget(d,f,!1,"uint8","linear"),this.outlinesTarget=e.createRenderTarget(d,f,!1),this.outlinesRenderable=function(e,t){var r=Object(n.a)(Object(n.a)({},a.c),{tDepth:s.e.create(t),uTexSize:s.e.create(l.f.create(t.getWidth(),t.getHeight())),dOrthographic:s.e.create(0),uNear:s.e.create(1),uFar:s.e.create(1e4),uMaxPossibleViewZDiff:s.e.create(.5)}),i=Object(n.a)({},P),d=Object(o.g)("outlines",p.a,"\nprecision highp float;\nprecision highp int;\nprecision highp sampler2D;\n\nuniform sampler2D tDepth;\nuniform vec2 uTexSize;\n\nuniform float uNear;\nuniform float uFar;\n\nuniform float uMaxPossibleViewZDiff;\n\n#include common\n\nfloat getViewZ(const in float depth) {\n #if dOrthographic == 1\n return orthographicDepthToViewZ(depth, uNear, uFar);\n #else\n return perspectiveDepthToViewZ(depth, uNear, uFar);\n #endif\n}\n\nfloat getDepth(const in vec2 coords) {\n return unpackRGBAToDepth(texture2D(tDepth, coords));\n}\n\nbool isBackground(const in float depth) {\n return depth == 1.0;\n}\n\nvoid main(void) {\n float backgroundViewZ = uFar + 3.0 * uMaxPossibleViewZDiff;\n\n vec2 coords = gl_FragCoord.xy / uTexSize;\n vec2 invTexSize = 1.0 / uTexSize;\n\n float selfDepth = getDepth(coords);\n float selfViewZ = isBackground(selfDepth) ? backgroundViewZ : getViewZ(getDepth(coords));\n\n float outline = 1.0;\n float bestDepth = 1.0;\n\n for (int y = -1; y <= 1; y++) {\n for (int x = -1; x <= 1; x++) {\n vec2 sampleCoords = coords + vec2(float(x), float(y)) * invTexSize;\n float sampleDepth = getDepth(sampleCoords);\n float sampleViewZ = isBackground(sampleDepth) ? backgroundViewZ : getViewZ(sampleDepth);\n\n if (abs(selfViewZ - sampleViewZ) > uMaxPossibleViewZDiff && selfDepth > sampleDepth && sampleDepth <= bestDepth) {\n outline = 0.0;\n bestDepth = sampleDepth;\n }\n }\n }\n\n gl_FragColor = vec4(outline, packUnitIntervalToRG(bestDepth), 0.0);\n}\n"),f=Object(u.a)(e,"triangles",d,i,r);return Object(c.a)(f,r)}(e,i),this.randomHemisphereVector=[];for(var h=0;h<256;h++){var m=Object(l.g)();m[0]=2*Math.random()-1,m[1]=2*Math.random()-1,m[2]=Math.random(),l.g.normalize(m,m),l.g.scale(m,m,Math.random()),this.randomHemisphereVector.push(m)}this.ssaoFramebuffer=e.resources.framebuffer(),this.ssaoBlurFirstPassFramebuffer=e.resources.framebuffer(),this.ssaoBlurSecondPassFramebuffer=e.resources.framebuffer();var g=Math.floor(d*this.ssaoScale),b=Math.floor(f*this.ssaoScale);this.ssaoDepthTexture=e.resources.texture("image-uint8","rgba","ubyte","nearest"),this.ssaoDepthTexture.define(g,b),this.ssaoDepthTexture.attachFramebuffer(this.ssaoFramebuffer,"color0"),this.ssaoDepthBlurProxyTexture=e.resources.texture("image-uint8","rgba","ubyte","nearest"),this.ssaoDepthBlurProxyTexture.define(g,b),this.ssaoDepthBlurProxyTexture.attachFramebuffer(this.ssaoBlurFirstPassFramebuffer,"color0"),this.ssaoDepthTexture.attachFramebuffer(this.ssaoBlurSecondPassFramebuffer,"color0"),this.ssaoRenderable=function(e,t){var r=Object(n.a)(Object(n.a)({},a.c),{tDepth:s.e.create(t),uSamples:s.e.create([0,0,1]),dNSamples:s.e.create(1),uProjection:s.e.create(l.c.identity()),uInvProjection:s.e.create(l.c.identity()),uBounds:s.e.create(Object(l.h)()),uTexSize:s.e.create(l.f.create(e.gl.drawingBufferWidth,e.gl.drawingBufferHeight)),uRadius:s.e.create(8),uBias:s.e.create(.025)}),i=Object(n.a)({},T),d=Object(o.g)("ssao",p.a,"\nprecision highp float;\nprecision highp int;\nprecision highp sampler2D;\n\n#include common\n\nuniform sampler2D tDepth;\nuniform vec2 uTexSize;\nuniform vec4 uBounds;\n\nuniform vec3 uSamples[dNSamples];\n\nuniform mat4 uProjection;\nuniform mat4 uInvProjection;\n\nuniform float uRadius;\nuniform float uBias;\n\nfloat smootherstep(float edge0, float edge1, float x) {\n x = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);\n return x * x * x * (x * (x * 6.0 - 15.0) + 10.0);\n}\n\nfloat noise(const in vec2 coords) {\n float a = 12.9898;\n float b = 78.233;\n float c = 43758.5453;\n float dt = dot(coords, vec2(a,b));\n float sn = mod(dt, PI);\n return abs(fract(sin(sn) * c)); // is abs necessary?\n}\n\nvec2 getNoiseVec2(const in vec2 coords) {\n return vec2(noise(coords), noise(coords + vec2(PI, 2.71828)));\n}\n\nbool isBackground(const in float depth) {\n return depth == 1.0;\n}\n\nbool outsideBounds(const in vec2 p) {\n return p.x < uBounds.x || p.y < uBounds.y || p.x > uBounds.z || p.y > uBounds.w;\n}\n\nfloat getDepth(const in vec2 coords) {\n return outsideBounds(coords) ? 1.0 : unpackRGBAToDepth(texture2D(tDepth, coords));\n}\n\nvec3 normalFromDepth(const in float depth, const in float depth1, const in float depth2, vec2 offset1, vec2 offset2) {\n vec3 p1 = vec3(offset1, depth1 - depth);\n vec3 p2 = vec3(offset2, depth2 - depth);\n\n vec3 normal = cross(p1, p2);\n normal.z = -normal.z;\n\n return normalize(normal);\n}\n\n// StarCraft II Ambient Occlusion by [Filion and McNaughton 2008]\nvoid main(void) {\n vec2 invTexSize = 1.0 / uTexSize;\n vec2 selfCoords = gl_FragCoord.xy * invTexSize;\n\n float selfDepth = getDepth(selfCoords);\n vec2 selfPackedDepth = packUnitIntervalToRG(selfDepth);\n\n if (isBackground(selfDepth)) {\n gl_FragColor = vec4(packUnitIntervalToRG(0.0), selfPackedDepth);\n return;\n }\n\n vec2 offset1 = vec2(0.0, invTexSize.y);\n vec2 offset2 = vec2(invTexSize.x, 0.0);\n\n float selfDepth1 = getDepth(selfCoords + offset1);\n float selfDepth2 = getDepth(selfCoords + offset2);\n\n vec3 selfViewNormal = normalFromDepth(selfDepth, selfDepth1, selfDepth2, offset1, offset2);\n vec3 selfViewPos = screenSpaceToViewSpace(vec3(selfCoords, selfDepth), uInvProjection);\n\n vec3 randomVec = normalize(vec3(getNoiseVec2(selfCoords) * 2.0 - 1.0, 0.0));\n\n vec3 tangent = normalize(randomVec - selfViewNormal * dot(randomVec, selfViewNormal));\n vec3 bitangent = cross(selfViewNormal, tangent);\n mat3 TBN = mat3(tangent, bitangent, selfViewNormal);\n\n float occlusion = 0.0;\n for(int i = 0; i < dNSamples; i++){\n vec3 sampleViewPos = TBN * uSamples[i];\n sampleViewPos = selfViewPos + sampleViewPos * uRadius;\n\n vec4 offset = vec4(sampleViewPos, 1.0);\n offset = uProjection * offset;\n offset.xyz = (offset.xyz / offset.w) * 0.5 + 0.5;\n\n float sampleViewZ = screenSpaceToViewSpace(vec3(offset.xy, getDepth(offset.xy)), uInvProjection).z;\n\n occlusion += step(sampleViewPos.z + 0.025, sampleViewZ) * smootherstep(0.0, 1.0, uRadius / abs(selfViewPos.z - sampleViewZ));\n }\n occlusion = 1.0 - (uBias * occlusion / float(dNSamples));\n\n vec2 packedOcclusion = packUnitIntervalToRG(occlusion);\n\n gl_FragColor = vec4(packedOcclusion, selfPackedDepth);\n}\n"),f=Object(u.a)(e,"triangles",d,i,r);return Object(c.a)(f,r)}(e,i),this.ssaoBlurFirstPassRenderable=k(e,this.ssaoDepthTexture,"horizontal"),this.ssaoBlurSecondPassRenderable=k(e,this.ssaoDepthBlurProxyTexture,"vertical"),this.renderable=function(e,t,r,i,d){var f=Object(n.a)(Object(n.a)({},a.c),{tSsaoDepth:s.e.create(d),tColor:s.e.create(t),tDepth:s.e.create(r),tOutlines:s.e.create(i),uTexSize:s.e.create(l.f.create(t.getWidth(),t.getHeight())),dOrthographic:s.e.create(0),uNear:s.e.create(1),uFar:s.e.create(1e4),uFogNear:s.e.create(1e4),uFogFar:s.e.create(1e4),uFogColor:s.e.create(l.g.create(1,1,1)),uTransparentBackground:s.e.create(!1),uMaxPossibleViewZDiff:s.e.create(.5),dOcclusionEnable:s.e.create(!1),dOutlineEnable:s.e.create(!1),dOutlineScale:s.e.create(1),uOutlineThreshold:s.e.create(.33)}),h=Object(n.a)({},M),m=Object(o.g)("postprocessing",p.a,"\nprecision highp float;\nprecision highp int;\nprecision highp sampler2D;\n\nuniform sampler2D tSsaoDepth;\nuniform sampler2D tColor;\nuniform sampler2D tDepth;\nuniform sampler2D tOutlines;\nuniform vec2 uTexSize;\n\nuniform float uNear;\nuniform float uFar;\nuniform float uFogNear;\nuniform float uFogFar;\nuniform vec3 uFogColor;\nuniform bool uTransparentBackground;\n\nuniform float uOcclusionBias;\nuniform float uOcclusionRadius;\n\nuniform float uMaxPossibleViewZDiff;\n\nconst vec3 occlusionColor = vec3(0.0);\n\n#include common\n\nfloat getViewZ(const in float depth) {\n #if dOrthographic == 1\n return orthographicDepthToViewZ(depth, uNear, uFar);\n #else\n return perspectiveDepthToViewZ(depth, uNear, uFar);\n #endif\n}\n\nfloat getDepth(const in vec2 coords) {\n return unpackRGBAToDepth(texture2D(tDepth, coords));\n}\n\nbool isBackground(const in float depth) {\n return depth == 1.0;\n}\n\nfloat getOutline(const in vec2 coords, out float closestTexel) {\n float backgroundViewZ = uFar + 3.0 * uMaxPossibleViewZDiff;\n vec2 invTexSize = 1.0 / uTexSize;\n\n float selfDepth = getDepth(coords);\n float selfViewZ = isBackground(selfDepth) ? backgroundViewZ : getViewZ(selfDepth);\n\n float outline = 1.0;\n closestTexel = 1.0;\n for (int y = -dOutlineScale; y <= dOutlineScale; y++) {\n for (int x = -dOutlineScale; x <= dOutlineScale; x++) {\n if (x * x + y * y > dOutlineScale * dOutlineScale) {\n continue;\n }\n\n vec2 sampleCoords = coords + vec2(float(x), float(y)) * invTexSize;\n\n vec4 sampleOutlineCombined = texture2D(tOutlines, sampleCoords);\n float sampleOutline = sampleOutlineCombined.r;\n float sampleOutlineDepth = unpackRGToUnitInterval(sampleOutlineCombined.gb);\n\n if (sampleOutline == 0.0 && sampleOutlineDepth < closestTexel && abs(selfViewZ - sampleOutlineDepth) > uMaxPossibleViewZDiff) {\n outline = 0.0;\n closestTexel = sampleOutlineDepth;\n }\n }\n }\n return outline;\n}\n\nfloat getSsao(vec2 coords) {\n float rawSsao = unpackRGToUnitInterval(texture2D(tSsaoDepth, coords).xy);\n if (rawSsao > 0.999) {\n return 1.0;\n } else if (rawSsao > 0.001) {\n return rawSsao;\n }\n // treat values close to 0.0 as errors and return no occlusion\n return 1.0;\n}\n\nvoid main(void) {\n vec2 coords = gl_FragCoord.xy / uTexSize;\n vec4 color = texture2D(tColor, coords);\n\n float viewDist;\n float fogFactor;\n\n #ifdef dOcclusionEnable\n float depth = getDepth(coords);\n if (!isBackground(depth)) {\n viewDist = abs(getViewZ(depth));\n fogFactor = smoothstep(uFogNear, uFogFar, viewDist);\n float occlusionFactor = getSsao(coords);\n if (!uTransparentBackground) {\n color.rgb = mix(mix(occlusionColor, uFogColor, fogFactor), color.rgb, occlusionFactor);\n } else {\n color.rgb = mix(occlusionColor * (1.0 - fogFactor), color.rgb, occlusionFactor);\n }\n }\n #endif\n\n // outline needs to be handled after occlusion to keep them clean\n #ifdef dOutlineEnable\n float closestTexel;\n float outline = getOutline(coords, closestTexel);\n\n if (outline == 0.0) {\n color.rgb *= outline;\n viewDist = abs(getViewZ(closestTexel));\n fogFactor = smoothstep(uFogNear, uFogFar, viewDist);\n if (!uTransparentBackground) {\n color.rgb = mix(color.rgb, uFogColor, fogFactor);\n } else {\n color.a = 1.0 - fogFactor;\n }\n }\n #endif\n\n gl_FragColor = color;\n}\n"),g=Object(u.a)(e,"triangles",m,h,f);return Object(c.a)(g,f)}(e,r.texture,i,this.outlinesTarget.texture,this.ssaoDepthTexture)}return e.isEnabled=function(e){return"on"===e.occlusion.name||"on"===e.outline.name},e.prototype.calcSsaoScale=function(){return Math.min(1,1/this.webgl.pixelRatio)},e.prototype.setSize=function(e,t){var r=this.renderable.values.uTexSize.ref.value,n=r[0],a=r[1],i=this.calcSsaoScale();if(e!==n||t!==a||this.ssaoScale!==i){this.ssaoScale=i;var o=Math.floor(e*this.ssaoScale),u=Math.floor(t*this.ssaoScale);this.target.setSize(e,t),this.outlinesTarget.setSize(e,t),this.ssaoDepthTexture.define(o,u),this.ssaoDepthBlurProxyTexture.define(o,u),s.e.update(this.renderable.values.uTexSize,l.f.set(this.renderable.values.uTexSize.ref.value,e,t)),s.e.update(this.outlinesRenderable.values.uTexSize,l.f.set(this.outlinesRenderable.values.uTexSize.ref.value,e,t)),s.e.update(this.ssaoRenderable.values.uTexSize,l.f.set(this.ssaoRenderable.values.uTexSize.ref.value,o,u)),s.e.update(this.ssaoBlurFirstPassRenderable.values.uTexSize,l.f.set(this.ssaoBlurFirstPassRenderable.values.uTexSize.ref.value,o,u)),s.e.update(this.ssaoBlurSecondPassRenderable.values.uTexSize,l.f.set(this.ssaoBlurSecondPassRenderable.values.uTexSize.ref.value,o,u))}},e.prototype.updateState=function(e,t,r,n){var a=!1,i=!1,o=!1,u="orthographic"===e.state.mode?1:0,c="on"===n.outline.name,d="on"===n.occlusion.name,p=l.c.identity();if(l.c.invert(p,e.projection),"on"===n.occlusion.name){s.e.update(this.ssaoRenderable.values.uProjection,e.projection),s.e.update(this.ssaoRenderable.values.uInvProjection,p);var h=this.renderable.values.uTexSize.ref.value,m=h[0],g=h[1],b=this.ssaoRenderable.values.uBounds,v=e.viewport,y=this.ssaoScale;if(l.h.set(b.ref.value,Math.floor(v.x*y)/(m*y),Math.floor(v.y*y)/(g*y),Math.ceil((v.x+v.width)*y)/(m*y),Math.ceil((v.y+v.height)*y)/(g*y)),s.e.update(b,b.ref.value),s.e.update(this.ssaoBlurFirstPassRenderable.values.uBounds,b.ref.value),s.e.update(this.ssaoBlurSecondPassRenderable.values.uBounds,b.ref.value),s.e.updateIfChanged(this.ssaoBlurFirstPassRenderable.values.uNear,e.near),s.e.updateIfChanged(this.ssaoBlurSecondPassRenderable.values.uNear,e.near),s.e.updateIfChanged(this.ssaoBlurFirstPassRenderable.values.uFar,e.far),s.e.updateIfChanged(this.ssaoBlurSecondPassRenderable.values.uFar,e.far),this.ssaoBlurFirstPassRenderable.values.dOrthographic.ref.value!==u&&(o=!0),s.e.updateIfChanged(this.ssaoBlurFirstPassRenderable.values.dOrthographic,u),s.e.updateIfChanged(this.ssaoBlurSecondPassRenderable.values.dOrthographic,u),this.nSamples!==n.occlusion.params.samples&&(i=!0,this.nSamples=n.occlusion.params.samples,s.e.update(this.ssaoRenderable.values.uSamples,function(e,t){for(var r=[],n=0;n= 8');var p,f=!1,h=new C.a(0);if(Object(a.q)(e)){var m=e.createBuffer(),g=void 0,b=void 0,v=!1,y=function(){e.bindBuffer(e.PIXEL_PACK_BUFFER,m),e.getBufferSubData(e.PIXEL_PACK_BUFFER,0,g),e.bindBuffer(e.PIXEL_PACK_BUFFER,null),v=!1,b(),b=void 0,g=void 0};p=function(t,r,n,a,i){return new Promise((function(o,s){v?s("Can not call multiple readPixelsAsync at the same time"):(v=!0,e.bindBuffer(e.PIXEL_PACK_BUFFER,m),e.bufferData(e.PIXEL_PACK_BUFFER,n*a*4,e.STREAM_READ),e.readPixels(t,r,n,a,e.RGBA,e.UNSIGNED_BYTE,0),e.bindBuffer(e.PIXEL_PACK_BUFFER,null),b=o,g=i,D(e,y))}))}}else p=function(t,a,i,o,s){return Object(n.b)(r,void 0,void 0,(function(){return Object(n.d)(this,(function(r){return L(e,t,a,i,o,s),[2]}))}))};var x=new Set;return{gl:e,isWebGL2:Object(a.q)(e),get pixelRatio(){return("undefined"!=typeof window?window.devicePixelRatio:1)*(t.pixelScale||1)},extensions:i,state:o,stats:s,resources:l,get maxTextureSize(){return d.maxTextureSize},get max3dTextureSize(){return d.max3dTextureSize},get maxRenderbufferSize(){return d.maxRenderbufferSize},get maxDrawBuffers(){return d.maxDrawBuffers},get maxTextureImageUnits(){return d.maxTextureImageUnits},namedComputeRenderables:Object.create(null),namedFramebuffers:Object.create(null),namedTextures:Object.create(null),get isContextLost(){return f||e.isContextLost()},contextRestored:h,setContextLost:function(){f=!0},handleContextRestored:function(t){Object.assign(i,u(e)),o.reset(),o.currentMaterialId=-1,o.currentProgramId=-1,o.currentRenderItemId=-1,l.reset(),x.forEach((function(e){return e.reset()})),null==t||t(),f=!1,h.next(Object(A.b)())},createRenderTarget:function(t,r,a,i,o){var s=Object(w.b)(e,l,t,r,a,i,o);return x.add(s),Object(n.a)(Object(n.a)({},s),{destroy:function(){s.destroy(),x.delete(s)}})},unbindFramebuffer:function(){return I(e)},readPixels:function(t,r,n,a,i){L(e,t,r,n,a,i)},readPixelsAsync:p,waitForGpuCommandsComplete:function(){return function(e){return new Promise((function(t){Object(a.q)(e)?D(e,t):(R||(console.info("Sync object not supported in WebGL"),R=!0),B(e),t())}))}(e)},waitForGpuCommandsCompleteSync:function(){return B(e)},getDrawingBufferPixelData:function(){return function(e){var t=e.drawingBufferWidth,r=e.drawingBufferHeight,n=new Uint8Array(t*r*4);return I(e),e.viewport(0,0,t,r),L(e,0,0,t,r,n),c.a.flipY(c.a.create(n,t,r))}(e)},clear:function(t,r,n,a){I(e),o.enable(e.SCISSOR_TEST),o.depthMask(!0),o.colorMask(!0,!0,!0,!0),o.clearColor(t,r,n,a),e.viewport(0,0,e.drawingBufferWidth,e.drawingBufferHeight),e.scissor(0,0,e.drawingBufferWidth,e.drawingBufferHeight),e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT)},destroy:function(t){var r;l.destroy(),function(e){for(var t=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),r=0;r0?[4,t.managers.structure.hierarchy.remove(null==_?void 0:_.toArray())]:[3,19]:[2];case 18:a.sent(),a.label=19;case 19:return w=S.cell.obj,P=n.build().to(O.ref).apply(A,s.a.getDefaultValues(f.a.createParams({data:w.data,defaultView:i.defaultView,channelParams:i.options.channelParams})),{ref:i.options.behaviorRef?i.options.behaviorRef:void 0}),"em"===i.method?P.apply(E,{channel:"em"},{state:{isGhost:!0},tags:"em"}):(P.apply(E,{channel:"2fo-fc"},{state:{isGhost:!0},tags:"2fo-fc"}),P.apply(E,{channel:"fo-fc(+ve)"},{state:{isGhost:!0},tags:"fo-fc(+ve)"}),P.apply(E,{channel:"fo-fc(-ve)"},{state:{isGhost:!0},tags:"fo-fc(-ve)"})),[4,n.updateTree(P).runInContext(e)];case 20:return a.sent(),[2]}}))}))}))})),_=d.b.build({display:{name:"Boxify Volume Streaming",description:"Make the current box permanent."},from:f.a,isApplicable:function(e){return"selection-box"===e.data.params.entry.params.view.name}})((function(e,t){var r=e.a,n=e.ref,i=e.state,o=r.data.params;if("selection-box"===o.entry.params.view.name){var s=b.b.create(v.g.clone(o.entry.params.view.params.bottomLeft),v.g.clone(o.entry.params.view.params.topRight)),u=o.entry.params.view.params.radius;b.b.expand(s,s,v.g.create(u,u,u));var c=Object(a.a)(Object(a.a)({},o),{entry:{name:o.entry.name,params:Object(a.a)(Object(a.a)({},o.entry.params),{view:{name:"box",params:{bottomLeft:s.min,topRight:s.max}}})}});return i.updateTree(i.build().to(n).update(c))}})),w={dataId:s.a.Text(""),source:s.a.MappedStatic("x-ray",{em:s.a.Group({isoValue:l.b.createIsoValueParam(l.b.IsoValue.relative(1))}),"x-ray":s.a.Group({})})},C=i.b.BuiltIn({name:"create-volume-streaming-info",display:{name:"Volume Streaming Info"},from:i.a.Molecule.Structure,to:o,params:function(e){return{serverUrl:s.a.Text("https://ds.litemol.org"),entries:s.a.ObjectList(w,(function(e){return e.dataId}),{defaultValue:[{dataId:"",source:{name:"x-ray",params:{}}}]})}}})({apply:function(e,t){var r=e.a,n=e.params;return u.b.create("",(function(e){return Object(a.b)(void 0,void 0,void 0,(function(){var i,s,u,d,p,f,h,m;return Object(a.d)(this,(function(a){switch(a.label){case 0:i=[],s=0,u=n.entries.length,a.label=1;case 1:return s=r&&s<=n}(e,t):o.a.is(t)?function(e,t){var r=o.a.min(t),n=o.a.max(t);if(n-r+1==0)return!0;var a=i.a.min(e),s=i.a.max(e);if(rs)return!1;var u=i.a.findRange(e,r,n);return o.a.size(u)===o.a.size(t)}(e,t):i.a.isSubset(e,t)}function _(e,t){return o.a.is(e)?o.a.findPredecessorIndex(e,t):i.a.findPredecessorIndex(e,t)}function w(e,t,r){return o.a.is(e)?o.a.findPredecessorIndexInInterval(e,t,r):i.a.findPredecessorIndexInInterval(e,t,r)}function C(e,t,r){return o.a.is(e)?o.a.findRange(e,t,r):i.a.findRange(e,t,r)}function A(e,t){return o.a.is(e)?o.a.is(t)?o.a.intersectionSize(e,t):D(t,e):o.a.is(t)?D(e,t):i.a.intersectionSize(e,t)}function E(e,t){return o.a.is(e)?o.a.is(t)?function(e,t){if(o.a.areEqual(e,t))return e;var r=o.a.size(e),n=o.a.size(t);if(!n)return e;if(!r)return t;var a,i,s,u,c=o.a.min(e),l=o.a.min(t);if(function(e,t){var r=p(e),n=p(t);return 0===r&&0===n||r>0&&n>0&&b(e)>=g(t)&&g(e)<=b(t)}(e,t))return o.a.ofRange(Math.min(c,l),Math.max(o.a.max(e),o.a.max(t)));c=b(t):0===p(t)}(t,e))return t;for(var n=o.a.min(t),a=o.a.max(t),s=i.a.findRange(e,n,a),u=o.a.start(s),c=o.a.end(s),l=new Int32Array(u+(e.length-c)+r),f=0,h=0;hO||(l++,h++),v++)}if(0===l)return s;if(l===a&&l===o)return e;var y=new Int32Array(l);for(f=0,h=0,v=u;hO||(y[f++]=v,h++),v++)}return d(y)}(a=n||(n={})).Empty=s,a.ofSingleton=u,a.ofRange=c,a.ofBounds=l,a.ofSortedArray=d,a.has=f,a.indexOf=h,a.getAt=m,a.min=g,a.max=b,a.start=v,a.end=y,a.size=p,a.hashCode=x,a.areEqual=O,a.areIntersecting=j,a.isSubset=S,a.union=E,a.intersect=P,a.indexedIntersect=B,a.subtract=T,a.findPredecessorIndex=_,a.findPredecessorIndexInInterval=w,a.findRange=C,a.intersectionSize=A,a.forEach=function(e,t,r){return function(e,t,r){if(o.a.is(e))for(var n=o.a.min(e),a=n,i=o.a.max(e);a<=i;a++)t(a,a-n,r);else for(a=0,i=e.length;a=n.a.max(a)?-1:n.a.findPredecessorIndex(a,r-1);return n.a.findRange(t,n.a.getAt(a,i),n.a.getAt(a,i+1)-1)}var d,p,f=function(){function e(e,t,r,n){this.segments=e,this.segmentMap=t,this.set=r,this.segmentMin=0,this.segmentMax=0,this.setRange=a.a.Empty,this.value={index:0,start:0,end:0},this.hasNext=!1,this.setRange=n,this.updateSegmentRange()}return e.prototype.move=function(){for(;this.hasNext;){if(this.updateValue()){this.value.index=this.segmentMin++,this.hasNext=this.segmentMax>=this.segmentMin&&a.a.size(this.setRange)>0;break}this.updateSegmentRange()}return this.value},e.prototype.updateValue=function(){var e=this.segments[this.segmentMin+1],t=n.a.findPredecessorIndexInInterval(this.set,e,this.setRange);return this.value.start=a.a.start(this.setRange),this.value.end=t,this.setRange=a.a.ofBounds(t,a.a.end(this.setRange)),t>this.value.start},e.prototype.updateSegmentRange=function(){var e=a.a.min(this.setRange),t=a.a.max(this.setRange);t=this.segmentMin)},e.prototype.setSegment=function(e){this.setRange=a.a.ofBounds(e.start,e.end),this.updateSegmentRange()},e}();function h(e,t,r){var i=void 0!==r?a.a.ofBounds(r.start,r.end):a.a.ofBounds(0,n.a.size(t));return new f(e.offsets,e.index,t,i)}(p=d||(d={})).create=o,p.ofOffsets=s,p.count=u,p.getSegment=c,p.projectValue=l,p.transientSegments=h},function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(953),a=r(895),i=r(781),o=r(754),s=r(831),u={"@header":"Internal Queries",generator:{"@header":"Generators",bundleElement:Object(s.b)(o.b.Dictionary({groupedUnits:Object(o.a)(i.a.Any),set:Object(o.a)(i.a.Any),ranges:Object(o.a)(i.a.Any)}),i.a.Any),bundle:Object(s.b)(o.b.Dictionary({elements:Object(o.a)(i.a.Any)}),a.a.ElementSelectionQuery,"A selection with single structure containing represented by the bundle."),current:Object(s.b)(o.b.None,a.a.ElementSelectionQuery,"Current selection provided by the query context. Avoid using this in State Transforms.")}},c={core:n.b,structureQuery:a.b,internal:u};Object(s.a)(c);var l=Object(s.c)(c);!function(){for(var e=Object.create(null),t=0,r=l;t=t?u=t-1:u<0&&(u=0),i[u]++}return{min:r,max:n,binWidth:a,counts:i}}!function(e){e.One={transform:{kind:"matrix",matrix:i.c.identity()},cells:i.e.create(i.e.Space([1,1,1],[0,1,2]),i.e.Data1([0])),stats:{min:0,max:0,mean:0,sigma:0}};var t=i.c.zero(),r=i.c.zero();e.getGridToCartesianTransform=function(e){if("matrix"===e.transform.kind)return i.c.copy(Object(i.c)(),e.transform.matrix);if("spacegroup"===e.transform.kind){var n=e.cells.space,o=i.c.fromScaling(t,i.g.div(i.g.zero(),a.b.size(i.g.zero(),e.transform.fractionalBox),i.g.ofArray(n.dimensions))),s=i.c.fromTranslation(r,e.transform.fractionalBox.min);return i.c.mul3(i.c.zero(),e.transform.cell.fromFractional,s,o)}return i.c.identity()},e.areEquivalent=function(e,t){return e===t},e.isEmpty=function(e){return 0===e.cells.data.length},e.getBoundingSphere=function(t,r){r||(r=Object(a.g)());var n=t.cells.space.dimensions,i=e.getGridToCartesianTransform(t);return a.g.fromDimensionsAndTransform(r,n,i)},e.getHistogram=function(e,t){var r=e._historams;return r||(r=e._historams={}),r[t]||(r[t]=function(e,t,r){if(r)return s(e,t,r.min,r.max);var n=Object(o.h)(e);return s(e,t,n[0],n[1])}(e.cells.data,t,{min:e.stats.min,max:e.stats.max})),r[t]}}(n||(n={}))},function(e,t,r){"use strict";r.d(t,"b",(function(){return g})),r.d(t,"c",(function(){return b})),r.d(t,"a",(function(){return y}));var n=r(572),a=r(668),i=r(615),o=r(577),s=r(574),u=r(618),c=r(625),l=r(624),d=r(573),p=r(810),f=r(694),h=Object(n.a)(Object(n.a)({},a.b),{tColor:Object(i.i)("texture","rgba","ubyte","nearest"),uTexSize:Object(i.j)("v2"),uWeight:Object(i.j)("f")}),m=Object(u.g)("compose",f.a,"\nprecision highp float;\nprecision highp sampler2D;\n\nuniform sampler2D tColor;\nuniform vec2 uTexSize;\nuniform float uWeight;\n\nvoid main() {\n vec2 coords = gl_FragCoord.xy / uTexSize;\n gl_FragColor = texture2D(tColor, coords) * uWeight;\n}\n");var g={mode:d.a.Select("off",[["off","Off"],["on","On"],["temporal","Temporal"]]),sampleLevel:d.a.Numeric(2,{min:0,max:5,step:1})},b=function(){function e(e,t){this.webgl=e,this.drawPass=t;var r=e.extensions,i=r.colorBufferFloat,u=r.textureFloat,d=r.colorBufferHalfFloat,p=r.textureHalfFloat,f=t.colorTarget.getWidth(),g=t.colorTarget.getHeight();this.colorTarget=e.createRenderTarget(f,g,!1);var b,v,y,x,O,j=d&&p?"fp16":i&&u?"float32":"uint8";this.composeTarget=e.createRenderTarget(f,g,!1,j),this.holdTarget=e.createRenderTarget(f,g,!1),this.compose=(b=e,v=t.colorTarget.texture,y=Object(n.a)(Object(n.a)({},a.c),{tColor:o.e.create(v),uTexSize:o.e.create(s.f.create(v.getWidth(),v.getHeight())),uWeight:o.e.create(1)}),x=Object(n.a)({},h),O=Object(c.a)(b,"triangles",m,x,y),Object(l.a)(O,y))}return e.isEnabled=function(e){return"off"!==e.mode},e.prototype.syncSize=function(){var e=this.drawPass.colorTarget.getWidth(),t=this.drawPass.colorTarget.getHeight(),r=this.compose.values.uTexSize.ref.value,n=r[0],a=r[1];e===n&&t===a||(this.colorTarget.setSize(e,t),this.composeTarget.setSize(e,t),this.holdTarget.setSize(e,t),o.e.update(this.compose.values.uTexSize,s.f.set(this.compose.values.uTexSize.ref.value,e,t)))},e.prototype.render=function(e,t,r,n,a,i,o,s){return"temporal"===s.multiSample.mode?this.renderTemporalMultiSample(e,t,r,n,a,i,o,s):(this.renderMultiSample(t,r,n,a,i,o,s),e)},e.prototype.bindOutputTarget=function(e){e?this.webgl.unbindFramebuffer():this.colorTarget.bind()},e.prototype.renderMultiSample=function(e,t,r,n,a,i,s){var u=this.compose,c=this.composeTarget,l=this.drawPass,d=this.webgl,f=d.gl,h=d.state,m=v[Math.max(0,Math.min(s.multiSample.sampleLevel,5))],g=t.viewport,b=g.x,y=g.y,x=g.width,O=g.height,j=1/m.length;t.viewOffset.enabled=!0,o.e.update(u.values.tColor,l.getColorTarget(s.postprocessing).texture),u.update();for(var S=0;S=y.length)return-2;var x=r.viewport,O=x.x,j=x.y,S=x.width,_=x.height,w=1/y.length;if(-1===e)h.render(t,r,n,a,!1,s,u.postprocessing),o.e.update(l.values.uWeight,1),o.e.update(l.values.tColor,h.getColorTarget(u.postprocessing).texture),l.update(),f.bind(),b.disable(g.BLEND),b.disable(g.DEPTH_TEST),b.depthMask(!1),g.viewport(O,j,S,_),g.scissor(O,j,S,_),l.render(),e+=1;else{r.viewOffset.enabled=!0,o.e.update(l.values.tColor,h.getColorTarget(u.postprocessing).texture),o.e.update(l.values.uWeight,w),l.update();for(var C=Math.pow(2,Math.max(0,u.multiSample.sampleLevel-2)),A=0;A=y.length)break}}this.bindOutputTarget(i),g.viewport(O,j,S,_),g.scissor(O,j,S,_);var P=e*w;return P>0&&(o.e.update(l.values.uWeight,1),o.e.update(l.values.tColor,d.texture),l.update(),b.disable(g.BLEND),l.render()),P<1&&(o.e.update(l.values.uWeight,1-P),o.e.update(l.values.tColor,f.texture),l.update(),0===P?b.disable(g.BLEND):b.enable(g.BLEND),l.render()),r.viewOffset.enabled=!1,r.update(),e>=y.length?-2:e},e}(),v=[[[0,0]],[[4,4],[-4,-4]],[[-2,-6],[6,-2],[-6,2],[2,6]],[[1,-3],[-1,3],[5,1],[-3,-5],[-5,5],[-7,-1],[3,7],[7,-7]],[[1,1],[-1,-3],[-3,2],[4,-1],[-5,-2],[2,5],[5,3],[3,-5],[-2,6],[0,-7],[-4,-6],[-6,4],[-8,0],[7,-4],[6,7],[-7,-8]],[[-4,-7],[-7,-5],[-3,-5],[-5,-4],[-1,-4],[-2,-2],[-6,-1],[-4,0],[-7,1],[-1,2],[-6,3],[-3,3],[-7,6],[-3,6],[-5,7],[-1,7],[5,-7],[1,-6],[6,-5],[4,-4],[2,-3],[7,-2],[1,-1],[4,-1],[2,1],[6,2],[0,4],[4,4],[2,5],[7,5],[5,6],[3,7]]];v.forEach((function(e){e.forEach((function(e){e[0]*=.0625,e[1]*=.0625}))}));var y=function(){function e(e){this.multiSamplePass=e,this.sampleIndex=-2}return e.prototype.update=function(e,t){return e&&(this.sampleIndex=-1),"temporal"===t.mode&&-2!==this.sampleIndex},e.prototype.render=function(e,t,r,n,a,i,o){this.sampleIndex=this.multiSamplePass.render(this.sampleIndex,e,t,r,n,a,i,o)},e}()},,,,,,,,,,,,,,function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var n=new(function(){function e(){this.shouldUpdate=!1,this.isSynchronous=!0}return e.prototype.update=function(e,t){},e}())},function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(882),a=r(883),i={closed:!0,next:function(e){},error:function(e){if(n.a.useDeprecatedSynchronousErrorHandling)throw e;Object(a.a)(e)},complete:function(){}}},function(e,t,r){"use strict";function n(e){return"function"==typeof e}r.d(t,"a",(function(){return n}))},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e){return null!==e&&"object"===n(e)}r.d(t,"a",(function(){return a}))},function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var n=function(){function e(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return e.prototype=Object.create(Error.prototype),e}()},function(e,t,r){"use strict";function n(e){return e}r.d(t,"a",(function(){return n}))},function(e,t,r){"use strict";var n;r.d(t,"a",(function(){return n})),function(e){e.message=function(e){return{type:"message",timestamp:new Date,message:e}},e.error=function(e){return{type:"error",timestamp:new Date,message:e}},e.warning=function(e){return{type:"warning",timestamp:new Date,message:e}},e.info=function(e){return{type:"info",timestamp:new Date,message:e}}}(n||(n={}))},function(e,t,r){"use strict";r.d(t,"a",(function(){return c})),r.d(t,"b",(function(){return l}));var n=r(581),a=r(573),i=r(703),o=r(577),s=Object(n.a)(13421772),u={value:a.a.Color(s)};function c(e,t){var r=Object(o.h)(t.value,s);return{factory:c,granularity:"uniform",color:function(){return r},props:t,description:"Gives everything the same, uniform color.",legend:Object(i.b)([["uniform",r]])}}var l={name:"uniform",label:"Uniform",category:"Miscellaneous",factory:c,getParams:function(e){return u},defaultValues:a.a.getDefaultValues(u),isApplicable:function(e){return!0}}},function(e,t,r){"use strict";r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return o}));var n=r(573),a={value:n.a.Numeric(1,{min:0,max:20,step:.1})};function i(e,t){var r=t.value;return{factory:i,granularity:"uniform",size:function(){return r},props:t,description:"Gives everything the same, uniform size."}}var o={name:"uniform",label:"Uniform",category:"",factory:i,getParams:function(e){return a},defaultValues:n.a.getDefaultValues(a),isApplicable:function(e){return!0}}},function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return a})),r.d(t,"c",(function(){return i}));var n=13330===new Uint16Array(new Uint8Array([18,52]).buffer)[0];function a(e,t){for(var r=new ArrayBuffer(e.length),n=new Uint8Array(r),a=0,i=e.length;a28672){for(var t=[],r=0;r= 2nd and <= 3rd.")},math:{"@header":"Math",add:u(a.a.Num),sub:u(a.a.Num),mult:u(a.a.Num),div:c(a.a.Num,a.a.Num),pow:c(a.a.Num,a.a.Num),mod:c(a.a.Num,a.a.Num),min:u(a.a.Num),max:u(a.a.Num),floor:s(a.a.Num),ceil:s(a.a.Num),roundInt:s(a.a.Num),abs:s(a.a.Num),sqrt:s(a.a.Num),cbrt:s(a.a.Num),sin:s(a.a.Num),cos:s(a.a.Num),tan:s(a.a.Num),asin:s(a.a.Num),acos:s(a.a.Num),atan:s(a.a.Num),sinh:s(a.a.Num),cosh:s(a.a.Num),tanh:s(a.a.Num),exp:s(a.a.Num),log:s(a.a.Num),log10:s(a.a.Num),atan2:c(a.a.Num,a.a.Num)},str:{"@header":"Strings",concat:u(a.a.Str),match:Object(o.b)(i.b.Dictionary({0:Object(i.a)(n.Regex),1:Object(i.a)(a.a.Str)}),a.a.Bool)},list:{"@header":"Lists",getAt:Object(o.b)(i.b.Dictionary({0:Object(i.a)(n.List()),1:Object(i.a)(a.a.Num)}),n.AnyVar),equal:Object(o.b)(i.b.Dictionary({0:Object(i.a)(n.List()),1:Object(i.a)(n.List())}),a.a.Bool)},set:{"@header":"Sets",has:Object(o.b)(i.b.Dictionary({0:Object(i.a)(n.Set(n.ConstrainedVar)),1:Object(i.a)(n.ConstrainedVar)}),a.a.Bool,"Check if the the 1st argument includes the value of the 2nd."),isSubset:Object(o.b)(i.b.Dictionary({0:Object(i.a)(n.Set(n.ConstrainedVar)),1:Object(i.a)(n.Set(n.ConstrainedVar))}),a.a.Bool,"Check if the the 1st argument is a subset of the 2nd.")},flags:{"@header":"Flags",hasAny:Object(o.b)(i.b.Dictionary({0:Object(i.a)(n.Flags(n.ConstrainedVar)),1:Object(i.a)(n.Flags(n.ConstrainedVar))}),a.a.Bool,"Check if the the 1st argument has at least one of the 2nd one's flags."),hasAll:Object(o.b)(i.b.Dictionary({0:Object(i.a)(n.Flags(n.ConstrainedVar)),1:Object(i.a)(n.Flags(n.ConstrainedVar))}),a.a.Bool,"Check if the the 1st argument has all 2nd one's flags.")}};Object(o.a)(l);var d=Object(o.c)(l);!function(){for(var e=Object.create(null),t=0,r=d;to||c.addElement(v[b.indices[y]])}c.commitUnit()}}},e.prototype.check=function(e,t,r,n){var a=this.structure.units,o=this.unitLookup.find(e,t,r,n);if(0===o.count)return!1;for(var s=0,u=o.count;s1&&(void 0!==s&&s!==i.a.IsNativeEndianLittle||!i.a.IsNativeEndianLittle)&&i.a.flipByteOrder(e.readBuffer,e.valuesBuffer,n,e.elementByteSize,o),[2,e.values]}}))}))}!function(e){e.Float32="float32",e.Int8="int8",e.Int16="int16",e.Uint16="uint16"}(n||(n={}))},function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return f}));var n=new ArrayBuffer(4);new Int32Array(n),new Float32Array(n);var a=new ArrayBuffer(4),i=new Int32Array(a),o=new Float32Array(a);function s(e){return function(e){var t=e<-126?-126:e;return i[0]=(1<<23)*(t+126.94269504),o[0]}(1.44269504*e)}var u=new ArrayBuffer(8);new Int32Array(u),new Float32Array(u);var c=new ArrayBuffer(4),l=new Int32Array(c),d=new Float32Array(c);function p(e){return d[0]=e,1.1920928955078125e-7*l[0]-126.94269504}function f(e){return.6931471805599453*p(e)}Math.PI,Math.PI,Math.PI,Math.PI,Math.PI,Math.PI,Math.PI,Math.PI,Math.PI;var h=new ArrayBuffer(16);new Int32Array(h),new Float32Array(h);var m=new ArrayBuffer(8);new Int32Array(m),new Float32Array(m);var g=new ArrayBuffer(4);new Int32Array(g),new Float32Array(g);Math.PI},function(e,t,r){"use strict";r.d(t,"b",(function(){return c})),r.d(t,"a",(function(){return n}));var n,a=r(572),i=r(574),o=r(579),s=r(587),u=r(617);function c(e,t){var r=this;return o.b.create("Create Volume",(function(){return Object(a.b)(r,void 0,void 0,(function(){var r,o,c,l,d,p,f,h,m,g,b,v,y,x,O,j,S;return Object(a.d)(this,(function(a){if(r=e.header,o=e.values,c=i.e.Space(r.dim,[0,1,2],Float64Array),0===r.dataSetIds.length)l=o;else for(d=r.dim,p=d[0],f=d[1],h=d[2],m=((null==t?void 0:t.dataIndex)||0)+1,g=0,b=0,l=new Float64Array(p*f*h),v=0;vr.cylinderCount)&&function(e,t,r){for(var n=0;n0?e.entries[0].snapshot.id:void 0,this.updateState({current:u,entries:r.asImmutable(),isPlaying:!1,nextSnapshotDelayInMs:e.playback?e.playback.nextSnapshotDelayInMs:t.DefaultNextSnapshotDelayInMs}),this.events.changed.next(),u?(c=this.getEntry(u),(d=c&&c.snapshot)?[4,this.plugin.state.setSnapshot(d)]:[2]):[2];case 1:return n.sent(),e.playback&&e.playback.isPlaying&&this.play(!0),[2,d]}}))}))},t.prototype.syncCurrent=function(e){var r=this.plugin.state.getSnapshot(null==e?void 0:e.params);0!==this.state.entries.size&&this.state.current?this.replace(this.state.current,r):this.add(t.Entry(r,{name:null==e?void 0:e.name,description:null==e?void 0:e.description}))},t.prototype.getStateSnapshot=function(e){return this.syncCurrent(e),{timestamp:+new Date,version:l.a,name:e&&e.name,description:e&&e.description,current:this.state.current,playback:{isPlaying:!(!e||!e.playOnLoad),nextSnapshotDelayInMs:this.state.nextSnapshotDelayInMs},entries:this.state.entries.valueSeq().toArray()}},t.prototype.serialize=function(e){return Object(n.b)(this,void 0,void 0,(function(){var t,r,a,i,u,c,l,d,p,f,h,m,g,b,v;return Object(n.d)(this,(function(n){switch(n.label){case 0:return t=JSON.stringify(this.getStateSnapshot({params:null==e?void 0:e.params}),null,2),(null==e?void 0:e.type)&&"json"!==e.type&&"molj"!==e.type?[3,1]:[2,new Blob([t],{type:"application/json;charset=utf-8"})];case 1:r=new Uint8Array(Object(o.a)(t)),Object(o.c)(r,0,t),a={"state.json":r},i=[],u=0,c=this.plugin.managers.asset.assets,n.label=2;case 2:return u0&&(g=JSON.stringify(i,null,2),b=new Uint8Array(Object(o.a)(g)),Object(o.c)(b,0,g),a["assets.json"]=b),[4,this.plugin.runTask(Object(s.a)(a))];case 6:return v=n.sent(),[2,new Blob([v],{type:"application/zip"})]}}))}))},t.prototype.open=function(e){return Object(n.b)(this,void 0,void 0,(function(){var r,a,i,o,s,l,d,p,f,h,m,g,b,v,y,x;return Object(n.d)(this,(function(n){switch(n.label){case 0:return n.trys.push([0,8,,9]),(r=e.name.toLowerCase()).endsWith("json")||r.endsWith("molj")?[4,this.plugin.runTask(Object(u.c)(e,"string"))]:[3,2];case 1:return a=n.sent(),y=JSON.parse(a),t.isStateSnapshot(y)?[2,this.setStateSnapshot(y)]:t.isStateSnapshot(y.data)?[2,this.setStateSnapshot(y.data)]:(this.plugin.state.setSnapshot(y),[3,7]);case 2:return[4,this.plugin.runTask(Object(u.c)(e,"zip"))];case 3:return a=n.sent(),i=Object.create(null),Object(c.c)(a,(function(e,t){if("state.json"!==t&&"assets.json"!==t){var r=t.substring(t.indexOf("/")+1);i[r]=new File([e],r)}})),o=new File([a["state.json"]],"state.json"),[4,this.plugin.runTask(Object(u.c)(o,"string"))];case 4:return s=n.sent(),a["assets.json"]?(l=new File([a["assets.json"]],"assets.json"),f=(p=JSON).parse,[4,this.plugin.runTask(Object(u.c)(l,"string"))]):[3,6];case 5:for(d=f.apply(p,[n.sent()]),h=0,m=d;hc.x+c.width||t>c.y+c.height)){this.dirty&&(this.render(r),this.syncBuffers());var l=e-c.x,d=t-c.y,p=Math.floor(l*u),f=Math.floor(d*u),h=this.getId(p,f,this.objectBuffer);if(-1!==h&&h!==s){var m=this.getId(p,f,this.instanceBuffer);if(-1!==m&&m!==s){var g=this.getId(p,f,this.groupBuffer);if(-1!==g&&g!==s){var b=this.getDepth(p,f),v=n.g.create(e,c.height-t,b);if(i.a.is(r)){var y=Math.floor(c.width/2);e>c.x+y?(v[0]=c.x+2*(l-y),Object(o.c)(v,v,c,r.right.inverseProjectionView)):(v[0]=c.x+2*l,Object(o.c)(v,v,c,r.left.inverseProjectionView))}else Object(o.c)(v,v,c,r.inverseProjectionView);return{id:{objectId:h,instanceId:m,groupId:g},position:v}}}}}}},e}()},function(e,t,r){"use strict";r.d(t,"b",(function(){return O})),r.d(t,"a",(function(){return j}));var n=r(572),a=r(850),i=r(602),o=r(574),s=r(658),u=r(589),c=r(610),l=r(716),d=r(577),p=r(578),f=r(573),h=r(722),m=r(644),g=r(584),b=r(626),v=r(741),y=r(576),x=Object(n.a)(Object(n.a)({},u.a.Params),{alpha:Object(n.a)(Object(n.a)({},u.a.Params.alpha),{defaultValue:1}),ignoreLight:Object(n.a)(Object(n.a)({},u.a.Params.ignoreLight),{defaultValue:!0}),colorX:f.a.Color(c.a.red,{isEssential:!0}),colorY:f.a.Color(c.a.green,{isEssential:!0}),colorZ:f.a.Color(c.a.blue,{isEssential:!0}),scale:f.a.Numeric(.33,{min:.1,max:2,step:.1},{isEssential:!0})}),O={handle:f.a.MappedStatic("off",{on:f.a.Group(x),off:f.a.Group({})},{cycle:!0,description:"Show handle tool"})},j=function(){function e(e,t){var r=this;void 0===t&&(t={}),this.webgl=e,this.props={handle:{name:"off",params:{}}},this._transform=Object(o.c)(),this.eachGroup=function(e,t){if(!r.renderObject)return!1;if(!_(e))return!1;for(var n=!1,a=r.renderObject.values.uGroupCount.ref.value,i=0,o=e.elements;i1&&e.state.data.updateCellState(o.ref,{isGhost:!1}),[2,{trajectory:s}]}}))}))},visuals:o},u={label:"cifCore",description:"CIF Core",category:"Trajectory",stringExtensions:["cif"],isApplicable:function(e,t){return"cif"===e.ext&&"coreCif"===Object(i.b)(e,t)},parse:function(e,t,r){return Object(n.b)(void 0,void 0,void 0,(function(){var i,o,s,u,c;return Object(n.d)(this,(function(n){switch(n.label){case 0:return i=e.state.data,[4,(o=i.build().to(t).apply(a.a.Data.ParseCif,void 0,{state:{isGhost:!0}})).apply(a.a.Model.TrajectoryFromCifCore,void 0,{tags:null==r?void 0:r.trajectoryTags}).commit({revertOnError:!0})];case 1:return s=n.sent(),((null===(c=null===(u=o.selector.cell)||void 0===u?void 0:u.obj)||void 0===c?void 0:c.data.blocks.length)||0)>1&&e.state.data.updateCellState(o.ref,{isGhost:!1}),[2,{trajectory:s}]}}))}))},visuals:o};function c(e,t){var r=this;return function(a,i,o){return Object(n.b)(r,void 0,void 0,(function(){return Object(n.d)(this,(function(r){switch(r.label){case 0:return[4,a.state.data.build().to(i).apply(e,t,{tags:null==o?void 0:o.trajectoryTags}).commit({revertOnError:!0})];case 1:return[2,{trajectory:r.sent()}]}}))}))}}var l={label:"PDB",description:"PDB",category:"Trajectory",stringExtensions:["pdb","ent"],parse:c(a.a.Model.TrajectoryFromPDB),visuals:o},d={label:"PDBQT",description:"PDBQT",category:"Trajectory",stringExtensions:["pdbqt"],parse:c(a.a.Model.TrajectoryFromPDB,{isPdbqt:!0}),visuals:o},p={label:"XYZ",description:"XYZ",category:"Trajectory",stringExtensions:["xyz"],parse:c(a.a.Model.TrajectoryFromXYZ),visuals:o},f=[["mmcif",s],["cifCore",u],["pdb",l],["pdbqt",d],["gro",{label:"GRO",description:"GRO",category:"Trajectory",stringExtensions:["gro"],binaryExtensions:[],parse:c(a.a.Model.TrajectoryFromGRO),visuals:o}],["xyz",p],["mol",{label:"MOL",description:"MOL",category:"Trajectory",stringExtensions:["mol"],parse:c(a.a.Model.TrajectoryFromMOL),visuals:o}],["sdf",{label:"SDF",description:"SDF",category:"Trajectory",stringExtensions:["sdf","sd"],parse:c(a.a.Model.TrajectoryFromSDF),visuals:o}],["mol2",{label:"MOL2",description:"MOL2",category:"Trajectory",stringExtensions:["mol2"],parse:c(a.a.Model.TrajectoryFromMOL2),visuals:o}]]},function(e,t,r){"use strict";r.d(t,"a",(function(){return c})),r.d(t,"b",(function(){return l}));var n=r(572),a=r(588),i=r(0),o=r(606),s=r(577);function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={isChanging:!1,current:0},t.begin=function(){t.setState({isChanging:!0})},t.end=function(e){t.setState({isChanging:!1}),t.props.onChange(e)},t.updateCurrent=function(e){var r,n;t.setState({current:e}),null===(n=(r=t.props).onChangeImmediate)||void 0===n||n.call(r,e)},t.updateManually=function(e){t.setState({isChanging:!0});var r=e;1===t.props.step&&(r=Math.round(r)),rt.props.max&&(r=t.props.max),t.setState({current:r,isChanging:!0})},t.onManualBlur=function(){t.setState({isChanging:!1}),t.props.onChange(t.state.current)},t}return Object(n.c)(t,e),t.getDerivedStateFromProps=function(e,t){return t.isChanging||e.value===t.current?null:{current:e.value}},t.prototype.render=function(){var e=this.props.step;return void 0===e&&(e=1),Object(a.jsxs)("div",Object(n.a)({className:"msp-slider"},{children:[Object(a.jsx)("div",{children:Object(a.jsx)(v,{min:this.props.min,max:this.props.max,step:e,value:this.state.current,disabled:this.props.disabled,onBeforeChange:this.begin,onChange:this.updateCurrent,onAfterChange:this.end},void 0)},void 0),Object(a.jsx)("div",{children:Object(a.jsx)(o.h,{numeric:!0,delayMs:50,value:this.state.current,blurOnEnter:!0,onBlur:this.onManualBlur,isDisabled:this.props.disabled,onChange:this.updateManually},void 0)},void 0)]}),void 0)},t}(i.Component),l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={isChanging:!1,current:[0,1]},t.begin=function(){t.setState({isChanging:!0})},t.end=function(e){t.setState({isChanging:!1}),t.props.onChange(e)},t.updateCurrent=function(e){t.setState({current:e})},t.updateMax=function(e){var r=e;1===t.props.step&&(r=Math.round(r)),rt.props.max&&(r=t.props.max),t.props.onChange([t.state.current[0],r])},t.updateMin=function(e){var r=e;1===t.props.step&&(r=Math.round(r)),rt.state.current[1]?r=t.state.current[1]:r>t.props.max&&(r=t.props.max),t.props.onChange([r,t.state.current[1]])},t}return Object(n.c)(t,e),t.getDerivedStateFromProps=function(e,t){return t.isChanging||e.value[0]===t.current[0]&&e.value[1]===t.current[1]?null:{current:e.value}},t.prototype.render=function(){var e=this.props.step;return void 0===e&&(e=1),Object(a.jsxs)("div",Object(n.a)({className:"msp-slider2"},{children:[Object(a.jsx)("div",{children:Object(a.jsx)(o.h,{numeric:!0,delayMs:50,value:this.state.current[0],onEnter:this.props.onEnter,blurOnEnter:!0,isDisabled:this.props.disabled,onChange:this.updateMin},void 0)},void 0),Object(a.jsx)("div",{children:Object(a.jsx)(v,{min:this.props.min,max:this.props.max,step:e,value:this.state.current,disabled:this.props.disabled,onBeforeChange:this.begin,onChange:this.updateCurrent,onAfterChange:this.end,range:!0,allowCross:!0},void 0)},void 0),Object(a.jsx)("div",{children:Object(a.jsx)(o.h,{numeric:!0,delayMs:50,value:this.state.current[1],onEnter:this.props.onEnter,blurOnEnter:!0,isDisabled:this.props.disabled,onChange:this.updateMax},void 0)},void 0)]}),void 0)},t}(i.Component);function d(e){for(var t=[],r={}.hasOwnProperty,n=0;n1||"touchend"===e.type.toLowerCase()&&e.touches.length>0}function f(e,t){return e?t.touches[0].clientY:t.touches[0].pageX}function h(e,t){return e?t.clientY:t.pageX}function m(e,t){var r=t.getBoundingClientRect();return e?r.top+.5*r.height:r.left+.5*r.width}function g(e){e.stopPropagation(),e.preventDefault()}var b=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.c)(t,e),t.prototype.render=function(){var e=this.props,t=e.className,r=e.tipFormatter,n=e.vertical,i=e.offset,o=e.value,s=e.index,u=n?{bottom:i+"%"}:{left:i+"%"};return Object(a.jsx)("div",{className:t,style:u,title:r(o,s)},void 0)},t}(i.Component),v=function(e){function t(t){var r=e.call(this,t)||this;r.sliderElement=i.createRef(),r.handleElements=[],r.dragOffset=0,r.startPosition=0,r.startValue=0,r._getPointsCache=void 0,r.onMouseDown=function(e){if(0===e.button){var t=h(r.props.vertical,e);if(r.isEventFromHandle(e)){var n=m(r.props.vertical,e.target);r.dragOffset=t-n,t=n}else r.dragOffset=0;r.onStart(t),r.addDocumentEvents("mouse"),g(e)}},r.onTouchMove=function(e){if(p(e))r.end("touch");else{var t=f(r.props.vertical,e);r.onMove(e,t-r.dragOffset)}},r.onTouchStart=function(e){if(!p(e)){var t=f(r.props.vertical,e);if(r.isEventFromHandle(e)){var n=m(r.props.vertical,e.target);r.dragOffset=t-n,t=n}else r.dragOffset=0;r.onStart(t),r.addDocumentEvents("touch"),g(e)}},r.eventHandlers={touchmove:function(e){return r.onTouchMove(e)},touchend:function(e){return r.end("touch")},mousemove:function(e){return r.onMouseMove(e)},mouseup:function(e){return r.end("mouse")}},r.calcOffset=function(e){var t=r.props,n=t.min;return 100*((e-n)/(t.max-n))};var n,a=t.range,o=t.min,s=t.max,u=a?Array.apply(null,Array(+a+1)).map((function(){return o})):o,c="defaultValue"in t?t.defaultValue:u,l=void 0!==t.value?t.value:c,d=(a?l:[o,l]).map((function(e){return r.trimAlignValue(e)}));return n=a&&d[0]===d[d.length-1]&&d[0]===s?0:d.length-1,r.state={handle:null,recent:n,bounds:d},r}return Object(n.c)(t,e),t.prototype.componentDidUpdate=function(e){var t=this;if("value"in this.props||"min"in this.props||"max"in this.props){var r=this.state.bounds;if(e.range){var n=(a=this.props.value||r).map((function(e){return t.trimAlignValue(e,t.props)}));if(n.every((function(e,t){return e===r[t]})))return;this.setState({bounds:n}),r.some((function(e){return t.isValueOutOfBounds(e,t.props)}))&&this.props.onChange(n)}else{var a=void 0!==this.props.value?this.props.value:r[1],i=this.trimAlignValue(a,this.props);if(i===r[1]&&r[0]===e.min)return;this.setState({bounds:[e.min,i]}),this.isValueOutOfBounds(r[1],this.props)&&this.props.onChange(i)}}},t.prototype.onChange=function(e){var t=this.props;!("value"in t)?this.setState(e):void 0!==e.handle&&this.setState({handle:e.handle});var r=Object(n.a)(Object(n.a)({},this.state),e),a=t.range?r.bounds:r.bounds[1];t.onChange(a)},t.prototype.onMouseMove=function(e){var t=h(this.props.vertical,e);this.onMove(e,t-this.dragOffset)},t.prototype.onMove=function(e,t){g(e);var r=this.props,a=this.state,i=t-this.startPosition,o=(i=this.props.vertical?-i:i)/this.getSliderLength()*(r.max-r.min),s=this.trimAlignValue(this.startValue+o);if(s!==a.bounds[a.handle]){var u=Object(n.e)([],a.bounds);u[a.handle]=s;var c=a.handle;if(r.pushable){var l=a.bounds[c];this.pushSurroundingHandles(u,c,l)}else r.allowCross&&(u.sort((function(e,t){return e-t})),c=u.indexOf(s));this.onChange({handle:c,bounds:u})}},t.prototype.onStart=function(e){this.props.onBeforeChange(this.getValue());var t=this.calcValueByPos(e);this.startValue=t,this.startPosition=e;var r=this.state,a=r.bounds,i=1;if(this.props.range){for(var o=0,s=1;sa[s]&&(o=s);Math.abs(a[o+1]-t)=0&&(r=t.length-t.indexOf(".")-1),r},t.prototype.getSliderLength=function(){var e=this.sliderElement.current;return e?this.props.vertical?e.clientHeight:e.clientWidth:0},t.prototype.getSliderStart=function(){var e=this.sliderElement.current.getBoundingClientRect();return this.props.vertical?e.top:e.left},t.prototype.getValue=function(){var e=this.state.bounds;return this.props.range?e:e[1]},t.prototype.addDocumentEvents=function(e){"touch"===e?(document.addEventListener("touchmove",this.eventHandlers.touchmove),document.addEventListener("touchend",this.eventHandlers.touchend)):"mouse"===e&&(document.addEventListener("mousemove",this.eventHandlers.mousemove),document.addEventListener("mouseup",this.eventHandlers.mouseup))},t.prototype.calcValue=function(e){var t=this.props,r=t.vertical,n=t.min,a=t.max,i=Math.abs(e/this.getSliderLength());return r?(1-i)*(a-n)+n:i*(a-n)+n},t.prototype.calcValueByPos=function(e){var t=e-this.getSliderStart();return this.trimAlignValue(this.calcValue(t))},t.prototype.end=function(e){this.removeEvents(e),this.props.onAfterChange(this.getValue()),this.setState({handle:null})},t.prototype.isEventFromHandle=function(e){for(var t=0,r=this.handleElements;tt.max},t.prototype.pushHandle=function(e,t,r,n){for(var a=e[t],i=e[t];r*(i-a)=n.length||a<0)return!1;var i=t+r,o=n[a],s=this.props.pushable,u=r*(e[i]-o);return!!this.pushHandle(e,i,r,+s-u)&&(e[t]=o,!0)},t.prototype.pushSurroundingHandles=function(e,t,r){var n=this.props.pushable,a=e[t],i=0;if(e[t+1]-a=l&&(p=l),!d&&null!=a&&a>0&&p<=i[a-1]&&(p=i[a-1]),!d&&null!=a&&a=i[a+1]&&(p=i[a+1]);var f=Object.keys(s).map(parseFloat);if(null!==u){var h=Math.round((p-c)/u)*u+c;f.push(h)}var m=f.map((function(e){return Math.abs(p-e)})),g=f[m.indexOf(Math.min.apply(Math,m))];return null!==u?parseFloat(g.toFixed(this.getPrecision(u))):g},t.prototype.render=function(){var e,t=this,r=this.state,o=r.handle,u=r.bounds,c=this.props,l=c.className,p=c.prefixCls,f=c.disabled,h=c.vertical,m=c.range,g=c.step,b=c.marks,v=c.tipFormatter,y=this.props.handle,x=u.map(this.calcOffset),O=p+"-handle",j=u.map((function(e,t){var r;return d(((r={})[O]=!0,r[O+"-"+(t+1)]=!0,r[O+"-lower"]=0===t,r[O+"-upper"]=t===u.length-1,r))})),S={prefixCls:p,noTip:null===g||null===v,tipFormatter:v,vertical:h};if(this.handleElements.length!==u.length){this.handleElements=[];for(var _=0;_0)throw new Error("dcd format with fixed atoms unsupported, aborting");var m=r.NATOM,g=4*m;for(c=0,u=r.NSET;c=o)return"";var s=n+r;return s>o&&(s=o),Object(c.c)(a,n,s)}:"int"===s?function(e){var n=i[2*e]+t;return n>i[2*e+1]?0:Object(l.e)(a,n,n+r)}:function(e){var n=i[2*e]+t;return n>i[2*e+1]?0:Object(l.c)(a,n,n+r)};return{schema:n,__array:void 0,isDefined:!0,rowCount:o,value:d,valueKind:function(e){return 0},toArray:function(e){return u.b.createAndFillArray(o,d,e)},areValuesEqual:function(e,t){return d(e)===d(t)}}}(e,t,r,n)}}function p(e){return Object(n.b)(this,void 0,void 0,(function(){var t,r,a,i,o,s,l,p,f,h,m;return Object(n.d)(this,(function(n){switch(n.label){case 0:return t=e.tokenizer,r=e.numberOfAtoms,[4,c.b.readLinesAsync(t,r,e.runtimeCtx,1e5)];case 1:return a=n.sent(),i=t.data.substring(a.indices[0],a.indices[1]).substring(20),o=i.match(/\.\d+/g),s=6===o.length,e.header.hasVelocities=s,e.header.precision.position=o[0].length-1,e.header.precision.velocity=s?o[3].length-1:0,20,l=e.header.precision.position+5,p=20+3*l,f=e.header.precision.velocity+4,h=d(a),m=u.a.Undefined(e.numberOfAtoms,u.a.Schema.float),[2,{count:e.numberOfAtoms,residueNumber:h(0,5,u.a.Schema.int),residueName:h(5,5,u.a.Schema.str),atomName:h(10,5,u.a.Schema.str),atomNumber:h(15,5,u.a.Schema.int),x:h(20,l,u.a.Schema.float),y:h(20+l,l,u.a.Schema.float),z:h(20+2*l,l,u.a.Schema.float),vx:s?h(p,f,u.a.Schema.float):m,vy:s?h(p+f,f,u.a.Schema.float):m,vz:s?h(p+2*f,f,u.a.Schema.float):m}]}}))}))}function f(e,t){return Object(n.b)(this,void 0,void 0,(function(){var r,i,o,s,u;return Object(n.d)(this,(function(n){switch(n.label){case 0:return r=Object(c.b)(e),[4,t.update({message:"Parsing...",current:0,max:e.length})];case 1:n.sent(),i=[],n.label=2;case 2:return r.position=0?(r.timeInPs=parseFloat(n.substring(a+2)),r.title=n.substring(0,a).trim(),r.title&&","===r.title[r.title.length-1]&&(r.title=r.title.substring(0,r.title.length-1))):r.title=n}(o=function(e,t){return{tokenizer:e,header:{title:"",timeInPs:0,hasVelocities:!1,precision:{position:0,velocity:0},box:[0,0,0]},numberOfAtoms:0,runtimeCtx:t}}(r,t)),function(e){var t=e.tokenizer;c.b.markLine(t);var r=c.b.getTokenString(t);e.numberOfAtoms=parseInt(r)}(o),[4,p(o)]):[3,4];case 3:return s=n.sent(),function(e){var t=e.tokenizer,r=c.b.readLine(t).trim().split(/\s+/g);e.header.box=[+r[0],+r[1],+r[2]]}(o),i.push({header:o.header,atoms:s}),[3,2];case 4:return u={structures:i},[2,a.a.success(u)]}}))}))}function h(e){var t=this;return i.b.create("Parse GRO",(function(r){return Object(n.b)(t,void 0,void 0,(function(){return Object(n.d)(this,(function(t){switch(t.label){case 0:return[4,f(e,r)];case 1:return[2,t.sent()]}}))}))}))}function m(e,t,r){var o=this;return void 0===r&&(r=!1),i.b.create("Parse PDB",(function(i){return Object(n.b)(o,void 0,void 0,(function(){var o,s,u;return Object(n.d)(this,(function(n){switch(n.label){case 0:return s=(o=a.a).success,u={},[4,c.b.readAllLinesAsync(e,i)];case 1:return[2,s.apply(o,[(u.lines=n.sent(),u.id=t,u.isPdbqt=r,u)])]}}))}))}))}var g=r(574),b=r(581),v=r(602),y=r(589),x=r(644),O=r(583),j=r(587),S=r(573),_=r(610),w=r(631),C=r(635);function A(e){var t=e&&e.getElement("vertex"),r=e&&e.getElement("material"),a={group:"",vRed:"",vGreen:"",vBlue:"",mRed:"",mGreen:"",mBlue:""},i=[["",""]],o=[["",""]];if(t){for(var s=0,u=t.propertyNames.length;s=Math.PI||c>=Math.PI||l>=Math.PI?r():t(g.g.create(i,o,s),g.g.create(u,c,l))}}(L||(L={}));var N=r(646);function F(e){var t=this;return i.b.create("Parse DCD",(function(r){return Object(n.b)(t,void 0,void 0,(function(){var t,a,i,o,s,u,c,l,d;return Object(n.d)(this,(function(n){switch(n.label){case 0:return[4,r.update("Converting to coordinates")];case 1:for(n.sent(),t=e.header,a=t.DELTA?Object(R.b)(20.45482949774598*t.DELTA,"ps"):Object(R.b)(1,"step"),i=t.ISTART>=1?Object(R.b)((t.ISTART-1)*a.value,a.unit):Object(R.b)(0,a.unit),o=[],s=0,u=e.frames.length;s=-1&&d[1]<=1&&d[3]>=-1&&d[3]<=1&&d[4]>=-1&&d[4]<=1?l.cell=L.create(g.g.create(d[0],d[2],d[5]),g.g.create(Object(B.c)(90-90*Math.asin(d[1])/B.d),Object(B.c)(90-90*Math.asin(d[3])/B.d),Object(B.c)(90-90*Math.asin(d[4])/B.d))):d[0]<0||d[1]<0||d[2]<0||d[3]<0||d[4]<0||d[5]<0||d[3]>180||d[4]>180||d[5]>180?l.cell=L.fromBasis(g.g.create(d[0],d[1],d[3]),g.g.create(d[1],d[2],d[4]),g.g.create(d[3],d[4],d[5])):l.cell=L.create(g.g.create(d[0],d[2],d[5]),g.g.create(Object(B.c)(Object(N.b)(d[1],0,N.a)?90:d[1]),Object(B.c)(Object(N.b)(d[3],0,N.a)?90:d[3]),Object(B.c)(Object(N.b)(d[4],0,N.a)?90:d[4])))),o.push(l);return[2,R.a.create(o,a,i)]}}))}))}))}function z(e,t,r,n){for(var a=r,i=n-1,o=t.charCodeAt(a);(32===o||o>=48&&o<=57)&&a<=i;)o=t.charCodeAt(++a);for(o=t.charCodeAt(i);(32===o||o>=48&&o<=57)&&i>=a;)o=t.charCodeAt(--i);if(a===++i)return c.a.add(e,a,i);if(a+1===i)return c.a.add(e,a,i);if(o=t.charCodeAt(a),a+2===i){var s=t.charCodeAt(a+1);if(!((78!==o&&110!==o||65!==s&&97!==s)&&(67!==o&&99!==o||76!==s&&108!==s)&&(70!==o&&102!==o||69!==s&&101!==s)&&(83!==o&&115!==o||73!==s&&105!==s)&&(66!==o&&98!==o||82!==s&&114!==s)&&(65!==o&&97!==o||83!==s&&115!==s)))return c.a.add(e,a,a+2)}if(67===o||99===o||72===o||104===o||78===o||110===o||79===o||111===o||80===o||112===o||83===o||115===o)return c.a.add(e,a,a+1);c.a.add(e,a,a)}var U=/^[\s\d]+|[\s\d]+$/g;function V(e){var t=(e=e.replace(U,"").toUpperCase()).length;if(0===t)return e;if(1===t)return e;if(2===t&&("NA"===e||"CL"===e||"FE"===e||"SI"===e||"BR"===e||"AS"===e))return e;if(3===t){if("SOD"===e)return"NA";if("POT"===e)return"K";if("CES"===e)return"CS";if("CAL"===e)return"CA";if("CLA"===e)return"CL"}var r=e[0];return"C"===r||"H"===r||"N"===r||"O"===r||"P"===r||"S"===r?r:""}var H,G=r(586),q=r(685),W=r(683),X=[new Set(["CA"]),new Set(["C"]),new Set(["N"])],Y=[new Set(["P","O3'","O3*"]),new Set(["C4'","C4*"]),new Set(["O2'","O2*","F2'","F2*"])],K=[new Set(["P","O3'","O3*"]),new Set(["C3'","C3*"]),new Set(["O2'","O2*","F2'","F2*"])],Q=new Set(["FMN","NCN","FNS","FMA"]),Z=(H=new Map,[{id:"HIS",name:"HISTIDINE",type:"L-peptide linking"},{id:"ARG",name:"ARGININE",type:"L-peptide linking"},{id:"LYS",name:"LYSINE",type:"L-peptide linking"},{id:"ILE",name:"ISOLEUCINE",type:"L-peptide linking"},{id:"PHE",name:"PHENYLALANINE",type:"L-peptide linking"},{id:"LEU",name:"LEUCINE",type:"L-peptide linking"},{id:"TRP",name:"TRYPTOPHAN",type:"L-peptide linking"},{id:"ALA",name:"ALANINE",type:"L-peptide linking"},{id:"MET",name:"METHIONINE",type:"L-peptide linking"},{id:"CYS",name:"CYSTEINE",type:"L-peptide linking"},{id:"ASN",name:"ASPARAGINE",type:"L-peptide linking"},{id:"VAL",name:"VALINE",type:"L-peptide linking"},{id:"GLY",name:"GLYCINE",type:"peptide linking"},{id:"SER",name:"SERINE",type:"L-peptide linking"},{id:"GLN",name:"GLUTAMINE",type:"L-peptide linking"},{id:"TYR",name:"TYROSINE",type:"L-peptide linking"},{id:"ASP",name:"ASPARTIC ACID",type:"L-peptide linking"},{id:"GLU",name:"GLUTAMIC ACID",type:"L-peptide linking"},{id:"THR",name:"THREONINE",type:"L-peptide linking"},{id:"PRO",name:"PROLINE",type:"L-peptide linking"},{id:"SEC",name:"SELENOCYSTEINE",type:"L-peptide linking"},{id:"PYL",name:"PYRROLYSINE",type:"L-peptide linking"},{id:"MSE",name:"SELENOMETHIONINE",type:"L-peptide linking"},{id:"SEP",name:"PHOSPHOSERINE",type:"L-peptide linking"},{id:"TPO",name:"PHOSPHOTHREONINE",type:"L-peptide linking"},{id:"PTR",name:"O-PHOSPHOTYROSINE",type:"L-peptide linking"},{id:"PCA",name:"PYROGLUTAMIC ACID",type:"L-peptide linking"},{id:"A",name:"ADENOSINE-5'-MONOPHOSPHATE",type:"RNA linking"},{id:"C",name:"CYTIDINE-5'-MONOPHOSPHATE",type:"RNA linking"},{id:"T",name:"THYMIDINE-5'-MONOPHOSPHATE",type:"RNA linking"},{id:"G",name:"GUANOSINE-5'-MONOPHOSPHATE",type:"RNA linking"},{id:"I",name:"INOSINIC ACID",type:"RNA linking"},{id:"U",name:"URIDINE-5'-MONOPHOSPHATE",type:"RNA linking"},{id:"DA",name:"2'-DEOXYADENOSINE-5'-MONOPHOSPHATE",type:"DNA linking"},{id:"DC",name:"2'-DEOXYCYTIDINE-5'-MONOPHOSPHATE",type:"DNA linking"},{id:"DT",name:"THYMIDINE-5'-MONOPHOSPHATE",type:"DNA linking"},{id:"DG",name:"2'-DEOXYGUANOSINE-5'-MONOPHOSPHATE",type:"DNA linking"},{id:"DI",name:"2'-DEOXYINOSINE-5'-MONOPHOSPHATE",type:"DNA linking"},{id:"DU",name:"2'-DEOXYURIDINE-5'-MONOPHOSPHATE",type:"DNA linking"}].forEach((function(e){return H.set(e.id,e)})),H),J=function(){var e=new Map;return[{id:"ZN2",name:"ZINC ION",type:"Ion"},{id:"SOD",name:"SODIUM ION",type:"Ion"},{id:"CES",name:"CESIUM ION",type:"Ion"},{id:"CLA",name:"CHLORIDE ION",type:"Ion"},{id:"CAL",name:"CALCIUM ION",type:"Ion"},{id:"POT",name:"POTASSIUM ION",type:"Ion"}].forEach((function(t){return e.set(t.id,t)})),e}(),$=function(){function e(e,t){this.seqId=e,this.atomId=t,this.namesMap=new Map,this.comps=new Map,this.ids=[],this.names=[],this.types=[],this.mon_nstd_flags=[]}return e.prototype.set=function(e){this.comps.set(e.id,e),this.ids.push(e.id),this.names.push(e.name),this.types.push(e.type),this.mon_nstd_flags.push(G.h.has(e.id)?"y":"n")},e.prototype.getAtomIds=function(e){for(var t=new Set,r=this.seqId.value(e);e=t;)a+="ABCDEFGHIJKLMNOPQRSTUVWXYZ"[(r=Math.floor(r/t))%t],n+=1;return n>=5&&console.warn("getChainId overflow"),a})),ne=function(){function e(){this.count=0,this.ids=[],this.types=[],this.descriptions=[],this.compoundsMap=new Map,this.namesMap=new Map,this.heteroMap=new Map,this.chainMap=new Map}return e.prototype.set=function(e,t){this.count+=1,this.ids.push(""+this.count),this.types.push(e),this.descriptions.push([t])},e.prototype.getEntityId=function(e,t,r,n){return 2===t?(void 0===this.waterId&&(this.set("water",(null==n?void 0:n.customName)||"Water"),this.waterId=""+this.count),this.waterId):Object(G.w)(t)?this.compoundsMap.has(r)?this.compoundsMap.get(r):(this.chainMap.has(r)||(this.set("polymer",(null==n?void 0:n.customName)||"Polymer "+(this.chainMap.size+1)),this.chainMap.set(r,""+this.count)),this.chainMap.get(r)):(this.heteroMap.has(e)||(this.set("non-polymer",(null==n?void 0:n.customName)||this.namesMap.get(e)||e),this.heteroMap.set(e,""+this.count)),this.heteroMap.get(e))},e.prototype.getEntityTable=function(){return u.d.ofPartialColumns(W.a.entity,{id:u.a.ofStringArray(this.ids),type:u.a.ofStringAliasArray(this.types),pdbx_description:u.a.ofStringListArray(this.descriptions)},this.count)},e.prototype.setCompounds=function(e){for(var t=0,r=e.length;t=66?c.a.addToken(e.B_iso_or_equiv,c.b.trim(r,n+60,n+66)):c.a.add(e.B_iso_or_equiv,0,0),i&&c.a.addToken(e.partial_charge,c.b.trim(r,n+70,n+76)),s>=78&&!i?(c.b.trim(r,n+76,n+78),r.tokenStart=78?(c.b.trim(r,n+76,n+78),r.tokenStartw||void 0===j[w]&&(u.push("covale"+y),c.push("covale"),l.push(n.label_asym_id.str(O)),p.push(n.auth_seq_id.int(O)),d.push(n.label_seq_id.int(O)),f.push(n.label_atom_id.str(O)),h.push(n.label_asym_id.str(w)),g.push(n.auth_seq_id.int(w)),m.push(n.label_seq_id.int(w)),b.push(n.label_atom_id.str(w)),y+=1))}}}var C={id:ue.c.ofStrings(u),conn_type_id:ue.c.ofStrings(c),ptnr1_label_asym_id:ue.c.ofStrings(l),ptnr1_auth_seq_id:ue.c.ofNumbers(p),ptnr1_label_seq_id:ue.c.ofNumbers(d),ptnr1_label_atom_id:ue.c.ofStrings(f),ptnr2_label_asym_id:ue.c.ofStrings(h),ptnr2_label_seq_id:ue.c.ofNumbers(m),ptnr2_auth_seq_id:ue.c.ofNumbers(g),ptnr2_label_atom_id:ue.c.ofStrings(b)};return ue.b.ofFields("struct_conn",C)}(t,v[0],v[1],M)),D={entity:ue.b.ofTable("entity",f.getEntityTable()),chem_comp:ue.b.ofTable("chem_comp",E.getChemCompTable()),atom_site:ue.b.ofFields("atom_site",M),atom_site_anisotrop:ue.b.ofFields("atom_site_anisotrop",xe(p))},R=0,B=h;R0&&(g=u.a.ofIntArray(u.a.mapToArray(i.atomIdxA,(function(e){return e-1}),Int32Array)),b=u.a.ofIntArray(u.a.mapToArray(i.atomIdxB,(function(e){return e-1}),Int32Array)),v=u.a.asArrayColumn(i.order,Int32Array),y=We.a.fromData({pairs:{indexA:g,indexB:b,order:v},count:a.count}),We.a.Provider.set(m.representative,y)),[2,m]}}))}))}!function(e){e.is=function(e){return"mol"===(null==e?void 0:e.kind)},e.create=function(e){return{kind:"mol",name:e.title,data:e}}}(qe||(qe={}));var Ye,Ke,Qe,Ze=r(578),Je=r(697),$e=r(826);function et(e,t,r){var a;return Object(n.b)(this,void 0,void 0,(function(){var i,o,s,c,l,d,p,f,h,m,b,v,y,x,j,S,_,w,C,A,E,P,T,I,k,M,D,R,B,L,N,F,z,U,H,G,q,X,Y,K,Q,Z,J,ee,te,re,ie,oe,se,ue,ce,le;return Object(n.d)(this,(function(n){switch(n.label){case 0:for(i=e.atom_site._rowCount,o=u.a.ofConst("MOL",i,u.a.Schema.str),s=u.a.ofConst("A",i,u.a.Schema.str),c=u.a.ofConst(1,i,u.a.Schema.int),l=function(e){var t=e.cell,r=function(e){var t=e.IT_number.value(0),r=e["name_H-M_full"].value(0);return e.IT_number.isDefined?(e["name_H-M_full"].isDefined,t):r}(e.space_group),n=Ze.f.create(r,g.g.create(t.length_a.value(0),t.length_b.value(0),t.length_c.value(0)),g.g.scale(Object(g.g)(),g.g.create(t.angle_alpha.value(0),t.angle_beta.value(0),t.angle_gamma.value(0)),Math.PI/180));return{spacegroup:Ze.e.create(n),assemblies:[],isNonStandardCrystalFrame:!1,ncsOperators:[]}}(e),d=l.spacegroup.cell.fromFractional,p=e.atom_site,f=p.fract_x,h=p.fract_y,m=p.fract_z,b=new Float32Array(i),v=new Float32Array(i),y=new Float32Array(i),x=Object(g.g)(),oe=0;oe0&&(L=B.representative,Je.a.Provider.set(L,l),(N=e.geom_bond._rowCount)>0)){for(F={},z=e.atom_site.label,oe=0,U=z.rowCount;oeATOM"!==it(t)&&t.position5?Object(ze.b)(b)(u.a.Schema.str):_,subst_id:d>6?Object(ze.b)(v)(u.a.Schema.int):S,subst_name:d>7?Object(ze.b)(y)(u.a.Schema.str):_,charge:d>8?Object(ze.b)(x)(u.a.Schema.float):j,status_bit:d>9?Object(ze.b)(O)(u.a.Schema.str):_}]}}))}))}function lt(e){return Object(n.b)(this,void 0,void 0,(function(){var t,r,a,o,s,l,d,p,f,h,m,g,b,v;return Object(n.d)(this,(function(n){switch(n.label){case 0:for(t=e.tokenizer,r=e.molecule;"@BOND"!==it(t)&&t.position4?Object(ze.b)(g)(u.a.Schema.str):u.a.Undefined(r.num_bonds,u.a.Schema.str)}]}}))}))}function dt(e,t,r){return Object(n.b)(this,void 0,void 0,(function(){var i,o,s,u,l,d;return Object(n.d)(this,(function(n){switch(n.label){case 0:i=Object(c.b)(t),e.update({message:"Parsing...",current:0,max:t.length}),o=[],n.label=1;case 1:return i.positionMOLECULE"!==it(t)&&t.position")){r.mol_type=a,at(t);var i=it(t);if(!i.startsWith("@")){r.charge_type=i,at(t);var o=it(t);if(!o.startsWith("@")){r.status_bits=o,at(t);var s=it(t);s.startsWith("@")||(r.mol_comment=s)}}}}(s=function(e,t){return{tokenizer:e,molecule:{mol_name:"",num_atoms:0,num_bonds:0,num_subst:0,num_feat:0,num_sets:0,mol_type:"",charge_type:"",status_bits:"",mol_comment:""},runtimeCtx:t}}(i,e)),[4,ct(s)]):[3,4];case 2:return u=n.sent(),[4,lt(s)];case 3:for(l=n.sent(),o.push({molecule:s.molecule,atoms:u,bonds:l}),rt(i);"@MOLECULE"!==it(i)&&i.position0&&(O=u.a.ofIntArray(u.a.mapToArray(c.origin_atom_id,(function(e){return e-1}),Int32Array)),j=u.a.ofIntArray(u.a.mapToArray(c.target_atom_id,(function(e){return e-1}),Int32Array)),S=u.a.ofIntArray(u.a.mapToArray(c.bond_type,(function(e){switch(e){case"ar":case"am":case"un":return 1;case"du":case"nc":return 0;default:return parseInt(e)}}),Int8Array)),_=u.a.ofIntArray(u.a.mapToArray(c.bond_type,(function(e){switch(e){case"ar":return 17;case"du":case"nc":return 0;case"am":case"un":default:return 1}}),Int8Array)),w=We.a.fromData({pairs:{indexA:O,indexB:j,order:S,flag:_},count:s.count}),C=x.representative,We.a.Provider.set(C,w),we.a.Provider.set(C,{data:s.charge,type:l.charge_type}),r.push(C)),n.label=3;case 3:return++a,[3,1];case 4:return[2,new Ie.a(r)]}}))}))}(e,t)}))}!function(e){e.is=function(e){return"mol2"===(null==e?void 0:e.kind)},e.create=function(e){return{kind:"mol2",name:e.name,data:e}}}(st||(st={}));var ht,mt,gt=new Uint32Array([0,0,0,0,0,0,0,0,0,8,10,12,16,20,25,32,40,50,64,80,101,128,161,203,256,322,406,512,645,812,1024,1290,1625,2048,2580,3250,4096,5060,6501,8192,10321,13003,16384,20642,26007,32768,41285,52015,65536,82570,104031,131072,165140,208063,262144,330280,416127,524287,660561,832255,1048576,1321122,1664510,2097152,2642245,3329021,4194304,5284491,6658042,8388607,10568983,13316085,16777216]);function bt(){throw new Error("(xdrfile error) Undefined error.")}function vt(e,t){return Object(n.b)(this,void 0,void 0,(function(){var r,a,i,o,s,u,c,l,d,p,f,h,m,g,b,v,y,x,O,j,S,_,w,C,A,E,P,T,I,k,M,D,R;return Object(n.d)(this,(function(n){switch(n.label){case 0:r=new DataView(t.buffer,t.byteOffset),i=(a={frames:[],boxes:[],times:[],timeOffset:0,deltaTime:0}).frames,o=a.boxes,s=a.times,u=[0,0,0,0,0,0],c=[0,0,0],l=[0,0,0],d=[0,0,0],p=[.1,.1,.1],f=[.1,.1,.1],h=0,m=ht.buf,n.label=1;case 1:for(g=void 0,b=r.getInt32(h+4),h+=12,s.push(r.getFloat32(h)),h+=4,v=new Float32Array(9),T=0;T<9;++T)v[T]=10*r.getFloat32(h),h+=4;if(o.push(v),b<=9)for(g={count:b/3,x:new Float32Array(b/3),y:new Float32Array(b/3),z:new Float32Array(b/3)},T=0;T16777215?(l[0]=ht.sizeOfInt(c[0]),l[1]=ht.sizeOfInt(c[1]),l[2]=ht.sizeOfInt(c[2]),j=0):j=ht.sizeOfInts(3,c),S=r.getInt32(h),h+=4,w=gt[_=9>(_=S-1)?9:_]/2|0,C=gt[S]/2|0,d[0]=d[1]=d[2]=gt[S],A=4*Math.ceil(r.getInt32(h)/4),h+=4,E=1/O,P=0,T=0,p[0]=p[1]=p[2]=0;T0)for(p[0]=p[1]=p[2]=0,M=0;M9?gt[S-1]/2|0:0):k>0&&(w=C,C=gt[S]/2|0),d[0]=d[1]=d[2]=gt[S],0!==d[0]&&0!==d[1]&&0!==d[2]||bt()}h+=A}for(R=0;R=t.length?[3,4]:[3,1];case 4:return s.length>=1&&(a.timeOffset=s[0]),s.length>=2&&(a.deltaTime=s[1]-s[0]),[2,a]}}))}))}function yt(e){var t=this;return i.b.create("Parse XTC",(function(r){return Object(n.b)(t,void 0,void 0,(function(){var t,i;return Object(n.d)(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),r.update({canAbort:!0,message:"Parsing trajectory..."}),[4,vt(r,e)];case 1:return t=n.sent(),[2,a.a.success(t)];case 2:return i=n.sent(),[2,a.a.error(""+i)];case 3:return[2]}}))}))}))}function xt(e){var t=this;return i.b.create("Parse XTC",(function(r){return Object(n.b)(t,void 0,void 0,(function(){var t,a,i,o,s,u,c,l,d;return Object(n.d)(this,(function(n){switch(n.label){case 0:return[4,r.update("Converting to coordinates")];case 1:for(n.sent(),t=Object(R.b)(e.deltaTime,"step"),a=Object(R.b)(e.timeOffset,t.unit),i=[],o=0,s=e.frames.length;o=e.data.length-1?0:+c.b.readLine(e);isNaN(t)&&(t=0);for(var r=c.b.readLine(e),n=new Float64Array(t),a=new Float64Array(t),i=new Float64Array(t),o=new Array(t),s=0;s=t&&r<32;)r++,t<<=1;return r};var t=new Uint8Array(32);e.sizeOfInts=function(e,r){var n=1,a=0;t[0]=1;for(var i=0;i>=8;for(;0!==s;)t[o++]=255&s,s>>=8;n=o}var u=1;for(n--;t[n]>=u;)a++,u*=2;return a+8*n};var r=new ArrayBuffer(24);e.buf=new Int32Array(r);var n=new Uint32Array(r);function a(t,r,a){for(var i=a,o=(1<=8;)l|=(u=u<<8|t[r+c++])>>s<0&&(s>(s-=i)&(1<>n[1]&255}e.decodeBits=a;var o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];e.decodeInts=function(e,t,r,n,s){var u=r,c=0;for(o[0]=0,o[1]=0,o[2]=0,o[3]=0;u>8;)o[c++]=i(e,t),u-=8;u>0&&(o[c++]=a(e,t,u));for(var l=2;l>0;l--){for(var d=0,p=n[l],f=c-1;f>=0;f--){var h=(d=d<<8|o[f])/p|0;o[f]=h,d-=h*p}s[l]=d}s[0]=o[0]|o[1]<<8|o[2]<<16|o[3]<<24}}(ht||(ht={})),function(e){e.is=function(e){return"xyz"===(null==e?void 0:e.kind)},e.create=function(e){return{kind:"xyz",name:"xyz",data:e}}}(mt||(mt={}));var wt;function Ct(e){var t=c.b.readLine(e).trim(),r=c.b.readLine(e).trim(),n=c.b.readLine(e).trim(),a=c.b.readLine(e),i=+a.substr(0,3),o=+a.substr(3,3);if(!Number.isNaN(i)&&!Number.isNaN(o))return{molFile:{title:t,program:r,comment:n,atoms:Ue(e,i),bonds:Ve(e,o)},dataItems:function(e){for(var t=c.a.create(e.data,32),r=c.a.create(e.data,32);e.position ")){c.a.add(t,e.tokenStart+2,e.tokenEnd),c.b.markLine(e);for(var a=e.tokenStart,i=e.tokenEnd,o=!1;e.position ")){c.a.add(r,a,i),o=!0;break}i=e.tokenEnd}o||c.a.add(r,a,i)}}return{dataHeader:Object(ze.b)(t)(u.a.Schema.str),data:Object(ze.b)(r)(u.a.Schema.str)}}(e)};for(;e.position0},apply:function(e){var t=this,r=e.a,a=e.params;return i.b.create("Parse mmCIF",(function(e){return Object(n.b)(t,void 0,void 0,(function(){var t,i,o,s;return Object(n.d)(this,(function(n){switch(n.label){case 0:if(t=a.blockHeader||r.data.blocks[0].header,!(i=r.data.blocks.find((function(e){return e.header===t}))))throw new Error("Data block '"+[t]+"' not found.");return[4,Object(se.b)(i).runInContext(e)];case 1:if(0===(o=n.sent()).frameCount)throw new Error("No models found.");return s=Rt(o),[2,new Ne.a.Molecule.Trajectory(o,s)]}}))}))}))}}),Lt=Ne.b.BuiltIn({name:"trajectory-from-pdb",display:{name:"Parse PDB",description:"Parse PDB string and create trajectory."},from:[Ne.a.Data.String],to:Ne.a.Molecule.Trajectory,params:{isPdbqt:S.a.Boolean(!1)}})({apply:function(e){var t=this,r=e.a,a=e.params;return i.b.create("Parse PDB",(function(e){return Object(n.b)(t,void 0,void 0,(function(){var t,i,o;return Object(n.d)(this,(function(n){switch(n.label){case 0:return[4,m(r.data,r.label,a.isPdbqt).runInContext(e)];case 1:if((t=n.sent()).isError)throw new Error(t.message);return[4,Ce(t.result).runInContext(e)];case 2:return i=n.sent(),o=Rt(i),[2,new Ne.a.Molecule.Trajectory(i,o)]}}))}))}))}}),Nt=Ne.b.BuiltIn({name:"trajectory-from-gro",display:{name:"Parse GRO",description:"Parse GRO string and create trajectory."},from:[Ne.a.Data.String],to:Ne.a.Molecule.Trajectory})({apply:function(e){var t=this,r=e.a;return i.b.create("Parse GRO",(function(e){return Object(n.b)(t,void 0,void 0,(function(){var t,a,i;return Object(n.d)(this,(function(n){switch(n.label){case 0:return[4,h(r.data).runInContext(e)];case 1:if((t=n.sent()).isError)throw new Error(t.message);return[4,oe(t.result).runInContext(e)];case 2:return a=n.sent(),i=Rt(a),[2,new Ne.a.Molecule.Trajectory(a,i)]}}))}))}))}}),Ft=Ne.b.BuiltIn({name:"trajectory-from-xyz",display:{name:"Parse XYZ",description:"Parse XYZ string and create trajectory."},from:[Ne.a.Data.String],to:Ne.a.Molecule.Trajectory})({apply:function(e){var t=this,r=e.a;return i.b.create("Parse XYZ",(function(e){return Object(n.b)(t,void 0,void 0,(function(){var t,a,i;return Object(n.d)(this,(function(n){switch(n.label){case 0:return[4,St(r.data).runInContext(e)];case 1:if((t=n.sent()).isError)throw new Error(t.message);return[4,_t(t.result).runInContext(e)];case 2:return a=n.sent(),i=Rt(a),[2,new Ne.a.Molecule.Trajectory(a,i)]}}))}))}))}}),zt=Ne.b.BuiltIn({name:"trajectory-from-mol",display:{name:"Parse MOL",description:"Parse MOL string and create trajectory."},from:[Ne.a.Data.String],to:Ne.a.Molecule.Trajectory})({apply:function(e){var t=this,r=e.a;return i.b.create("Parse MOL",(function(e){return Object(n.b)(t,void 0,void 0,(function(){var t,a,o;return Object(n.d)(this,(function(n){switch(n.label){case 0:return[4,Ge(r.data).runInContext(e)];case 1:if((t=n.sent()).isError)throw new Error(t.message);return[4,(s=t.result,i.b.create("Parse MOL",(function(e){return Xe(s,void 0,e)}))).runInContext(e)];case 2:return a=n.sent(),o=Rt(a),[2,new Ne.a.Molecule.Trajectory(a,o)]}var s}))}))}))}}),Ut=Ne.b.BuiltIn({name:"trajectory-from-sdf",display:{name:"Parse SDF",description:"Parse SDF string and create trajectory."},from:[Ne.a.Data.String],to:Ne.a.Molecule.Trajectory})({apply:function(e){var t=this,r=e.a;return i.b.create("Parse SDF",(function(e){return Object(n.b)(t,void 0,void 0,(function(){var t,a,o,s,u,c,l,d,p,f,h;return Object(n.d)(this,(function(n){switch(n.label){case 0:return[4,Et(r.data).runInContext(e)];case 1:if((t=n.sent()).isError)throw new Error(t.message);a=[],o=0,s=t.result.compounds,n.label=2;case 2:return o0},apply:function(e){var t=this,r=e.a,a=e.params;return i.b.create("Model from Trajectory",(function(e){return Object(n.b)(t,void 0,void 0,(function(){var t,o,s,u;return Object(n.d)(this,(function(n){switch(n.label){case 0:return(t=a.modelIndex%r.data.frameCount)<0&&(t+=r.data.frameCount),[4,i.b.resolveInContext(r.data.getFrameAtIndex(t),e)];case 1:return o=n.sent(),s="Model "+(t+1),u=1===r.data.frameCount?void 0:"of "+r.data.frameCount,[2,new Ne.a.Molecule.Model(o,{label:s,description:u})]}}))}))}))},interpolate:function(e,t,r){return{modelIndex:r>=1?t.modelIndex:e.modelIndex+Math.floor((t.modelIndex-e.modelIndex+1)*r)}},dispose:function(e){var t=e.b;null==t||t.data.customProperties.dispose()}}),Yt=Ne.b.BuiltIn({name:"structure-from-trajectory",display:{name:"Structure from Trajectory",description:"Create a molecular structure from a trajectory."},from:Ne.a.Molecule.Trajectory,to:Ne.a.Molecule.Structure})({apply:function(e){var t=this,r=e.a;return i.b.create("Build Structure",(function(e){return Object(n.b)(t,void 0,void 0,(function(){var t,a;return Object(n.d)(this,(function(n){switch(n.label){case 0:return[4,Ie.g.ofTrajectory(r.data,e)];case 1:return t=n.sent(),a={label:"Ensemble",description:Ie.g.elementDescription(t)},[2,new Ne.a.Molecule.Structure(t,a)]}}))}))}))},dispose:function(e){var t=e.b;null==t||t.data.customPropertyDescriptors.dispose()}}),Kt=Ne.b.BuiltIn({name:"structure-from-model",display:{name:"Structure",description:"Create a molecular structure (model, assembly, or symmetry) from the specified model."},from:Ne.a.Molecule.Model,to:Ne.a.Molecule.Structure,params:function(e){return Be.a.getParams(e&&e.data)}})({canAutoUpdate:function(e){var t=e.oldParams,r=e.newParams;return Be.a.canAutoUpdate(t.type,r.type)},apply:function(e,t){var r=this,a=e.a,o=e.params;return i.b.create("Build Structure",(function(e){return Object(n.b)(r,void 0,void 0,(function(){return Object(n.d)(this,(function(r){return[2,Be.a.create(t,e,a.data,o&&o.type)]}))}))}))},update:function(e){var t=e.a,r=e.b,n=e.oldParams,a=e.newParams;return Object(Re.g)(n,a)?r.data.model===t.data?De.g.UpdateResult.Unchanged:Ie.d.areHierarchiesEqual(t.data,r.data.model)?(r.data=r.data.remapModel(t.data),De.g.UpdateResult.Updated):De.g.UpdateResult.Recreate:De.g.UpdateResult.Recreate},dispose:function(e){var t=e.b;null==t||t.data.customPropertyDescriptors.dispose()}}),Qt=Object(g.g)(),Zt=Object(g.c)(),Jt=Object(g.c)(),$t=Ne.b.BuiltIn({name:"transform-structure-conformation",display:{name:"Transform Conformation"},isDecorator:!0,from:Ne.a.Molecule.Structure,to:Ne.a.Molecule.Structure,params:{transform:S.a.MappedStatic("components",{components:S.a.Group({axis:S.a.Vec3(g.g.create(1,0,0)),angle:S.a.Numeric(0,{min:-180,max:180,step:.1}),translation:S.a.Vec3(g.g.create(0,0,0))},{isFlat:!0}),matrix:S.a.Group({data:S.a.Mat4(g.c.identity()),transpose:S.a.Boolean(!1)},{isFlat:!0})},{label:"Kind"})}})({canAutoUpdate:function(e){return"matrix"!==e.newParams.transform.name},apply:function(e){var t=e.a,r=e.params,n=Object(g.c)();if("components"===r.transform.name){var a=r.transform.params,i=a.axis,o=a.angle,s=a.translation,u=t.data.boundary.sphere.center;g.c.fromTranslation(Zt,g.g.negate(Qt,u)),g.c.fromTranslation(Jt,g.g.add(Qt,u,s));var c=g.c.fromRotation(Object(g.c)(),Math.PI/180*o,g.g.normalize(Object(g.g)(),i));g.c.mul3(n,Jt,c,Zt)}else"matrix"===r.transform.name&&(g.c.copy(n,r.transform.params.data),r.transform.params.transpose&&g.c.transpose(n,n));var l=Ie.g.transform(t.data,n);return new Ne.a.Molecule.Structure(l,{label:t.label,description:t.description+" [Transformed]"})},dispose:function(e){var t=e.b;null==t||t.data.customPropertyDescriptors.dispose()}}),er=Ne.b.BuiltIn({name:"structure-selection-from-expression",display:{name:"Selection",description:"Create a molecular structure from the specified expression."},from:Ne.a.Molecule.Structure,to:Ne.a.Molecule.Structure,params:function(){return{expression:S.a.Value(ke.a.struct.generator.all,{isHidden:!0}),label:S.a.Optional(S.a.Text("",{isHidden:!0}))}}})({apply:function(e){var t=e.a,r=e.params,n=e.cache,a=Te.createAndRun(t.data,r.expression),i=a.selection,o=a.entry;if(n.entry=o,Ie.k.isEmpty(i))return De.c.Null;var s=Ie.k.unionStructure(i),u={label:""+(r.label||"Selection"),description:Ie.g.elementDescription(s)};return new Ne.a.Molecule.Structure(s,u)},update:function(e){var t=e.a,r=e.b,n=e.oldParams,a=e.newParams,i=e.cache;if(n.expression!==a.expression)return De.g.UpdateResult.Recreate;var o=i.entry;if(o.currentStructure===t.data)return De.g.UpdateResult.Unchanged;var s=Te.updateStructure(o,t.data);return Ie.k.isEmpty(s)?De.g.UpdateResult.Null:(Te.updateStructureObject(r,s,a.label),De.g.UpdateResult.Updated)},dispose:function(e){var t=e.b;null==t||t.data.customPropertyDescriptors.dispose()}}),tr=Ne.b.BuiltIn({name:"structure-multi-selection-from-expression",display:{name:"Multi-structure Measurement Selection",description:"Create selection object from multiple structures."},from:Ne.a.Root,to:Ne.a.Molecule.Structure.Selections,params:function(){return{selections:S.a.ObjectList({key:S.a.Text(void 0,{description:"A unique key."}),ref:S.a.Text(),groupId:S.a.Optional(S.a.Text()),expression:S.a.Value(ke.a.struct.generator.empty)},(function(e){return e.ref}),{isHidden:!0}),isTransitive:S.a.Optional(S.a.Boolean(!1,{isHidden:!0,description:"Remap the selections from the original structure if structurally equivalent."})),label:S.a.Optional(S.a.Text("",{isHidden:!0}))}}})({apply:function(e){for(var t=e.params,r=e.cache,n=e.dependencies,a=new Map,i=[],o=0,s=0,u=t.selections;s0}},getDuration:function(e){return{kind:"fixed",durationMs:e.durationInMs}},initialState:function(){return{t:0}},setup:function(e,t,r){for(var n=r.state.data,a=e.target&&"all"!==e.target?e.target:c.f.RootRef,i=n.select(c.e.Generators.ofType(s.a.Molecule.Structure.Representation3D,a)),o=n.build(),l=!1,d=0,p=i;d0||(l=!0,o.to(f).apply(u.a.Representation.UnwindStructureAssemblyRepresentation3D,{t:0},{tags:"animate-assembly-unwind"}))}if(l)return o.commit({doNotUpdateCurrent:!0})},teardown:function(e,t,r){var n=r.state.data,a=n.select(c.e.Generators.ofType(s.a.Molecule.Structure.Representation3DState).withTag("animate-assembly-unwind"));if(0!==a.length){for(var i=n.build(),o=0,u=a;o=1?(f=!0,p=1):p%=1,h=0,m=i;h=.99999?(null===(n=r.plugin.canvas3d)||void 0===n||n.requestCameraReset({snapshot:i,durationMs:0}),[2,{kind:"finished"}]):(u=2*Math.PI*s*r.params.speed*("ccw"===r.params.direction?-1:1),m.a.sub(g,i.position,i.target),m.a.normalize(b,i.up),h.a.setAxisAngle(v,b,u),m.a.transformQuat(g,g,v),c=m.a.add(Object(m.a)(),i.target,g),null===(a=r.plugin.canvas3d)||void 0===a||a.requestCameraReset({snapshot:Object(o.a)(Object(o.a)({},i),{position:c}),durationMs:0}),[2,{kind:"next",state:e}])}))}))}}),x=i.create({name:"built-in.animate-model-index",display:{name:"Animate Trajectory"},isExportable:!0,params:function(){return{mode:d.a.MappedStatic("loop",{palindrome:d.a.Group({}),loop:d.a.Group({direction:d.a.Select("forward",[["forward","Forward"],["backward","Backward"]])}),once:d.a.Group({direction:d.a.Select("forward",[["forward","Forward"],["backward","Backward"]])},{isFlat:!0})},{options:[["palindrome","Palindrome"],["loop","Loop"],["once","Once"]]}),duration:d.a.MappedStatic("fixed",{fixed:d.a.Group({durationInS:d.a.Numeric(5,{min:1,max:120,step:.1},{description:"Duration in seconds"})},{isFlat:!0}),computed:d.a.Group({targetFps:d.a.Numeric(30,{min:5,max:250,step:1},{label:"Target FPS"})},{isFlat:!0}),sequential:d.a.Group({maxFps:d.a.Numeric(30,{min:5,max:60,step:1})},{isFlat:!0})})}},canApply:function(e){for(var t=e.state.data,r=0,n=t.select(c.e.Generators.ofTransformer(u.a.Model.ModelFromTrajectory));r1)return{canApply:!0}}return{canApply:!1,reason:"No trajectory to animate"}},getDuration:function(e,t){var r;if("fixed"===(null===(r=e.duration)||void 0===r?void 0:r.name))return{kind:"fixed",durationMs:1e3*e.duration.params.durationInS};if("computed"===e.duration.name){for(var n=t.state.data,a=0,i=0,o=n.select(c.e.Generators.ofTransformer(u.a.Model.ModelFromTrajectory));i0&&t.current-t.lastApplied<1e3/r.params.duration.params.maxFps)return[2,{kind:"skip"}];if(n=r.plugin.state.data,0===(a=n.select(c.e.Generators.ofTransformer(u.a.Model.ModelFromTrajectory))).length)return[2,{kind:"finished"}];for(i=n.build(),d=r.params,p=e.palindromeDirections||{},f=!1,h=!0,m=function(e){var r=c.e.findAncestorOfType(n.tree,n.cells,e.transform.ref,s.a.Molecule.Trajectory);if(!r||!r.obj)return"continue";var a=r.obj;if(a.data.frameCount<=1)return"continue";i.to(e).update((function(r){var n=a.data.frameCount;if(1===n)return r;if(h=!1,"sequential"===d.duration.name){var i=1;if("once"===d.mode.name){if(-1===(i="backward"===d.mode.params.direction?-1:1)&&0===r.modelIndex||1===i&&r.modelIndex===n-1)return f=!0,r}else"palindrome"===d.mode.name&&(i=0===r.modelIndex?1:r.modelIndex===n-1?-1:p[e.transform.ref]||1);return p[e.transform.ref]=i,(u=(r.modelIndex+i)%n)<0&&(u+=n),f=f||-1===i&&0===u||1===i&&u===n-1,{modelIndex:u}}var o="fixed"===d.duration.name?1e3*d.duration.params.durationInS:Math.ceil(1e3*a.data.frameCount/d.duration.params.targetFps),s=t.current%o/o;"loop"===d.mode.name&&"backward"===d.mode.params.direction&&(s=1-s),"palindrome"===d.mode.name&&(s*=2)>1&&(s=2-s);var u=Math.min(Math.floor(a.data.frameCount*s),a.data.frameCount-1);return f=f||u===a.data.frameCount-1,{modelIndex:u}}))},g=0,b=a;g1}},setup:function(e,t,r){var n=r.managers.snapshot.state.entries.get(0);O(r,n,!0)},getDuration:function(e,t){return{kind:"fixed",durationMs:t.managers.snapshot.state.entries.toArray().reduce((function(e,t){var r;return e+(null!==(r=t.snapshot.durationInMs)&&void 0!==r?r:0)}),0)}},initialState:function(e,t){var r=t.managers.snapshot.state.entries.toArray();return{totalDuration:r.reduce((function(e,t){var r;return e+(null!==(r=t.snapshot.durationInMs)&&void 0!==r?r:0)}),0),snapshots:r,currentIndex:0}},apply:function(e,t,r){var n;return Object(o.b)(this,void 0,void 0,(function(){var a,i,s,u,c;return Object(o.d)(this,(function(l){if(t.current>=e.totalDuration)return[2,{kind:"finished"}];for(a=0,i=0,s=0,u=e.snapshots;s=e.snapshots.length?[2,{kind:"finished"}]:i===e.currentIndex?[2,{kind:"skip"}]:(O(r.plugin,e.snapshots[i]),[2,{kind:"next",state:Object(o.a)(Object(o.a)({},e),{currentIndex:i})}])}))}))}}),_=r(846),w=r(908),C=r(879),A=r(579),E=r(912),P=r(720),T=c.b.build({from:s.a.Root,display:{name:"Download Density",description:"Load a density from the provided source and create its default visual."},params:function(e,t){var r=t.dataFormats.options;return{source:d.a.MappedStatic("pdb-xray",{"pdb-xray":d.a.Group({provider:d.a.Group({id:d.a.Text("1tqn",{label:"Id"}),server:d.a.Select("rcsb",[["pdbe","PDBe"],["rcsb","RCSB PDB"]])},{pivot:"id"}),type:d.a.Select("2fofc",[["2fofc","2Fo-Fc"],["fofc","Fo-Fc"]])},{isFlat:!0}),"pdb-xray-ds":d.a.Group({provider:d.a.Group({id:d.a.Text("1tqn",{label:"Id"}),server:d.a.Select("pdbe",[["pdbe","PDBe"],["rcsb","RCSB PDB"]])},{pivot:"id"}),detail:d.a.Numeric(3,{min:0,max:6,step:1},{label:"Detail"})},{isFlat:!0}),"pdb-emd-ds":d.a.Group({provider:d.a.Group({id:d.a.Text("emd-8004",{label:"Id"}),server:d.a.Select("pdbe",[["pdbe","PDBe"],["rcsb","RCSB PDB"]])},{pivot:"id"}),detail:d.a.Numeric(3,{min:0,max:6,step:1},{label:"Detail"})},{isFlat:!0}),url:d.a.Group({url:d.a.Url(""),isBinary:d.a.Boolean(!1),format:d.a.Select("auto",r)},{isFlat:!0})},{options:[["pdb-xray","PDB X-ray maps"],["pdb-emd-ds","PDB EMD Density Server"],["pdb-xray-ds","PDB X-ray Density Server"],["url","URL"]]})}}})((function(e,t){var r=e.params;return A.b.create("Download Density",(function(e){return Object(o.b)(void 0,void 0,void 0,(function(){var e,n,a,i,s,u,c,l;return Object(o.d)(this,(function(o){switch(o.label){case 0:switch((e=r.source).name){case"url":n=e.params;break;case"pdb-xray":n="pdbe"===e.params.provider.server?{url:P.a.Url("2fofc"===e.params.type?"http://www.ebi.ac.uk/pdbe/coordinates/files/"+e.params.provider.id.toLowerCase()+".ccp4":"http://www.ebi.ac.uk/pdbe/coordinates/files/"+e.params.provider.id.toLowerCase()+"_diff.ccp4"),isBinary:!0,label:"PDBe X-ray map: "+e.params.provider.id}:{url:P.a.Url("2fofc"===e.params.type?"https://edmaps.rcsb.org/maps/"+e.params.provider.id.toLowerCase()+"_2fofc.dsn6":"https://edmaps.rcsb.org/maps/"+e.params.provider.id.toLowerCase()+"_fofc.dsn6"),isBinary:!0,label:"RCSB X-ray map: "+e.params.provider.id};break;case"pdb-emd-ds":n="pdbe"===e.params.provider.server?{url:P.a.Url("https://www.ebi.ac.uk/pdbe/densities/emd/"+e.params.provider.id.toLowerCase()+"/cell?detail="+e.params.detail),isBinary:!0,label:"PDBe EMD Density Server: "+e.params.provider.id}:{url:P.a.Url("https://maps.rcsb.org/em/"+e.params.provider.id.toLowerCase()+"/cell?detail="+e.params.detail),isBinary:!0,label:"RCSB PDB EMD Density Server: "+e.params.provider.id};break;case"pdb-xray-ds":n="pdbe"===e.params.provider.server?{url:P.a.Url("https://www.ebi.ac.uk/pdbe/densities/x-ray/"+e.params.provider.id.toLowerCase()+"/cell?detail="+e.params.detail),isBinary:!0,label:"PDBe X-ray Density Server: "+e.params.provider.id}:{url:P.a.Url("https://maps.rcsb.org/x-ray/"+e.params.provider.id.toLowerCase()+"/cell?detail="+e.params.detail),isBinary:!0,label:"RCSB PDB X-ray Density Server: "+e.params.provider.id};break;default:throw new Error(e.name+" not supported.")}return[4,t.builders.data.download(n)];case 1:switch(i=o.sent(),s=void 0,e.name){case"url":n=e.params,a="auto"===e.params.format?t.dataFormats.auto(Object(E.a)(P.a.getUrl(n.url)),null===(c=i.cell)||void 0===c?void 0:c.obj):t.dataFormats.get(e.params.format);break;case"pdb-xray":s=e.params.provider.id,a="pdbe"===e.params.provider.server?t.dataFormats.get("ccp4"):t.dataFormats.get("dsn6");break;case"pdb-emd-ds":case"pdb-xray-ds":s=e.params.provider.id,a=t.dataFormats.get("dscif");break;default:throw new Error(e.name+" not supported.")}return a?[4,a.parse(t,i,{entryId:s})]:(t.log.warn("DownloadDensity: Format provider not found."),[2]);case 2:return u=o.sent(),[4,null===(l=a.visuals)||void 0===l?void 0:l.call(a,t,u)];case 3:return o.sent(),[2]}}))}))}))})),I=c.b.build({display:{name:"Assign Volume Colors",description:"Assigns another volume to be available for coloring."},from:s.a.Volume.Data,isApplicable:function(e){return!e.data.colorVolume},params:function(e,t){var r=t.state.data.select(c.e.Generators.root.subtree().ofType(s.a.Volume.Data).filter((function(t){var r;return!!t.obj&&!(null===(r=t.obj)||void 0===r?void 0:r.data.colorVolume)&&t.obj!==e})));return 0===r.length?{ref:d.a.Text("",{isHidden:!0,label:"Volume"})}:{ref:d.a.Select(r[0].transform.ref,r.map((function(e){return[e.transform.ref,e.obj.label]})),{label:"Volume"})}}})((function(e,t){var r=e.ref,n=e.params;e.state;return t.build().to(r).apply(u.a.Volume.AssignColorVolume,{ref:n.ref},{dependsOn:[n.ref]}).commit()})),k=c.b.build({display:{name:"Open Files",description:"Load one or more files and optionally create default visuals"},from:s.a.Root,params:function(e,t){var r=t.dataFormats,n=r.extensions,a=r.options;return{files:d.a.FileList({accept:Array.from(n.values()).map((function(e){return"."+e})).join(",")+",.gz,.zip",multiple:!0}),format:d.a.MappedStatic("auto",{auto:d.a.EmptyGroup(),specific:d.a.Select(a[0][0],a)}),visuals:d.a.Boolean(!0,{description:"Add default visuals"})}}})((function(e,t){var r=e.params,n=e.state;return A.b.create("Open Files",(function(e){return Object(o.b)(void 0,void 0,void 0,(function(){return Object(o.d)(this,(function(a){switch(a.label){case 0:return t.behaviors.layout.leftPanelTabName.next("data"),[4,n.transaction((function(){return Object(o.b)(void 0,void 0,void 0,(function(){var e,n,a,i,s,u,c,l,d,p,f;return Object(o.d)(this,(function(o){switch(o.label){case 0:if(null===r.files)return t.log.error("No file(s) selected"),[2];e=0,n=r.files,o.label=1;case 1:if(!(e1}},initialState:function(){return{}},apply:function(e,t,r){return Object(o.b)(this,void 0,void 0,(function(){var e,n,a,i,s,u,d,p,f,h,m,g,b,v,y,x,O,j,S,_;return Object(o.d)(this,(function(o){switch(o.label){case 0:if((e=r.plugin.managers.snapshot.state.entries).size<2)return[2,{kind:"finished"}];if(n=t.current%r.params.transtionDurationInMs/r.params.transtionDurationInMs,a=Math.floor(t.current/r.params.transtionDurationInMs)%e.size,(i=Math.ceil(t.current/r.params.transtionDurationInMs))===a&&i++,i%=e.size,s=e.get(a).snapshot,u=e.get(i).snapshot,!s.data||!u.data)return[2,{kind:"skip"}];for(d=s.data.tree.transforms,p=u.data.tree.transforms,f=r.plugin.state.data,h=f.build(),m=0,g=d;m0||(a=!0,n.to(d.transform.ref).apply(u.a.Representation.SpinStructureRepresentation3D,{t:0},{tags:"animate-structure-spin"}));return a?[2,n.commit({doNotUpdateCurrent:!0})]:[2]}))}))},teardown:function(e,t,r){var n=r.state.data,a=n.select(c.e.Generators.ofType(s.a.Molecule.Structure.Representation3DState).withTag("animate-structure-spin"));if(0!==a.length){for(var i=n.build(),o=0,u=a;o0&&(u.e.update(w.values.tPreviousLevel,x[o-_].texture),w.update()),e.state.currentRenderItemId=-1,a.viewport(0,0,E,E),a.scissor(0,0,E,E),Object(p.q)(a)?a.clearBufferiv(a.COLOR,0,[0,0,0,0]):a.clear(a.COLOR_BUFFER_BIT),a.scissor(0,0,n[0],n[1]),w.render(),f.bind(0),a.copyTexSubImage2D(a.TEXTURE_2D,0,C,0,0,0,E,E),f.unbind(0),C+=E}a.finish();var P=Math.max(1,function(e,t){var r=e.gl,n=e.resources,a=h(e,t);e.state.currentRenderItemId=-1,e.namedFramebuffers["histopyramid-sum"]||(e.namedFramebuffers["histopyramid-sum"]=n.framebuffer());var i=e.namedFramebuffers["histopyramid-sum"];return e.namedTextures["histopyramid-sum"]||(e.namedTextures["histopyramid-sum"]=Object(p.q)(r)?n.texture("image-int32","rgba","int","nearest"):n.texture("image-uint8","rgba","ubyte","nearest"),e.namedTextures["histopyramid-sum"].define(1,1)),e.namedTextures["histopyramid-sum"].attachFramebuffer(i,0),function(e){var t=e.gl,r=e.state;r.disable(t.CULL_FACE),r.disable(t.BLEND),r.disable(t.DEPTH_TEST),r.disable(t.SCISSOR_TEST),r.depthMask(!1),r.colorMask(!0,!0,!0,!0),r.clearColor(0,0,0,0)}(e),r.viewport(0,0,1,1),a.render(),r.finish(),e.readPixels(0,0,1,1,Object(p.q)(r)?g:m),e.unbindFramebuffer(),Object(p.q)(r)?g[0]:Object(l.a)(m[0],m[1],m[2])}(e,x[0].texture));return{pyramidTex:f,count:P,height:Math.ceil(P/Math.pow(2,o)),levels:o,scale:r}}var w,C,A=r(911),E=r(628);function P(){if(void 0!==w)return w;for(var e=(w=Object(E.c)(256,1,Uint8Array)).array,t=0,r=A.e.length;t= uGridDim.x || posXYZ.y >= uGridDim.y || posXYZ.z >= uGridDim.z)\n c = 0.0;\n\n // get total triangles to generate for calculated MC case from triCount texture\n float totalTrianglesToGenerate = texture2D(tTriCount, vec2(intMod(c, 16.), floor(c / 16.)) / 16.).a;\n gl_FragColor = vec4(vec3(totalTrianglesToGenerate * 3.0), c / 255.0);\n}\n"),g=Object(i.a)(e,"triangles",m,h,f);return Object(a.a)(g,f)}(e,t,r,o,l,p);return e.namedComputeRenderables["active-voxels"]}var M=Object(n.a)(Object(n.a)({},c.b),{tTriIndices:Object(o.i)("image-uint8","alpha","ubyte","nearest"),tActiveVoxelsPyramid:Object(o.i)("texture","rgba","float","nearest"),tActiveVoxelsBase:Object(o.i)("texture","rgba","float","nearest"),tVolumeData:Object(o.i)("texture","rgba","ubyte","nearest"),uIsoValue:Object(o.j)("f"),uSize:Object(o.j)("f"),uLevels:Object(o.j)("f"),uCount:Object(o.j)("f"),uInvert:Object(o.j)("b"),uGridDim:Object(o.j)("v3"),uGridTexDim:Object(o.j)("v3"),uGridTransform:Object(o.j)("m4"),uScale:Object(o.j)("v2"),dPackedGroup:Object(o.c)("boolean")});function D(e,t,r,o,l,p,f,h,m,g,b,v,y){if(e.namedComputeRenderables.isosurface){var x=e.namedComputeRenderables.isosurface.values;u.e.update(x.tActiveVoxelsPyramid,t),u.e.update(x.tActiveVoxelsBase,r),u.e.update(x.tVolumeData,o),u.e.updateIfChanged(x.uIsoValue,h),u.e.updateIfChanged(x.uSize,Math.pow(2,m)),u.e.updateIfChanged(x.uLevels,m),u.e.updateIfChanged(x.uCount,b),u.e.updateIfChanged(x.uInvert,v),u.e.update(x.uGridDim,l),u.e.update(x.uGridTexDim,p),u.e.update(x.uGridTransform,f),u.e.update(x.uScale,g),u.e.update(x.dPackedGroup,y),e.namedComputeRenderables.isosurface.update()}else e.namedComputeRenderables.isosurface=function(e,t,r,o,l,p,f,h,m,g,b,v,y){var x=Object(n.a)(Object(n.a)({},c.c),{tTriIndices:u.e.create(T()),tActiveVoxelsPyramid:u.e.create(t),tActiveVoxelsBase:u.e.create(r),tVolumeData:u.e.create(o),uIsoValue:u.e.create(h),uSize:u.e.create(Math.pow(2,m)),uLevels:u.e.create(m),uCount:u.e.create(b),uInvert:u.e.create(v),uGridDim:u.e.create(l),uGridTexDim:u.e.create(p),uGridTransform:u.e.create(f),uScale:u.e.create(g),dPackedGroup:u.e.create(y)}),O=Object(n.a)({},M),j=Object(s.g)("isosurface",d.a,"\nprecision highp float;\nprecision highp int;\nprecision highp sampler2D;\n\n#if __VERSION__ == 100\n uniform sampler2D tActiveVoxelsPyramid;\n#else\n precision highp isampler2D;\n uniform isampler2D tActiveVoxelsPyramid;\n#endif\n\nuniform sampler2D tActiveVoxelsBase;\nuniform sampler2D tVolumeData;\nuniform sampler2D tTriIndices;\n\nuniform float uIsoValue;\nuniform float uLevels;\nuniform float uSize;\nuniform float uCount;\nuniform bool uInvert;\n\nuniform vec3 uGridDim;\nuniform vec3 uGridTexDim;\nuniform mat4 uGridTransform;\n\n// scale to volume data coord\nuniform vec2 uScale;\n\n#include common\n\n// cube corners (excluding origin)\nconst vec3 c1 = vec3(1., 0., 0.);\nconst vec3 c2 = vec3(1., 1., 0.);\nconst vec3 c3 = vec3(0., 1., 0.);\nconst vec3 c4 = vec3(0., 0., 1.);\nconst vec3 c5 = vec3(1., 0., 1.);\nconst vec3 c6 = vec3(1., 1., 1.);\nconst vec3 c7 = vec3(0., 1., 1.);\n\nvec3 index3dFrom2d(vec2 coord) {\n vec2 gridTexPos = coord * uGridTexDim.xy;\n vec2 columnRow = ivec2Div(gridTexPos, uGridDim.xy);\n vec2 posXY = gridTexPos - columnRow * uGridDim.xy;\n float posZ = columnRow.y * intDiv(uGridTexDim.x, uGridDim.x) + columnRow.x;\n return vec3(posXY, posZ);\n}\n\nvec4 texture3dFrom2dNearest(sampler2D tex, vec3 pos, vec3 gridDim, vec2 texDim) {\n float zSlice = floor(pos.z * gridDim.z + 0.5); // round to nearest z-slice\n float column = intDiv(intMod(zSlice * gridDim.x, texDim.x), gridDim.x);\n float row = intDiv(zSlice * gridDim.x, texDim.x);\n vec2 coord = (vec2(column * gridDim.x, row * gridDim.y) + (pos.xy * gridDim.xy)) / (texDim / uScale);\n return texture2D(tex, coord + 0.5 / (texDim / uScale));\n}\n\nvec4 voxel(vec3 pos) {\n pos = min(max(vec3(0.0), pos), uGridDim - vec3(1.0));\n return texture3dFrom2dNearest(tVolumeData, pos / uGridDim, uGridDim, uGridTexDim.xy);\n}\n\nvec4 voxelPadded(vec3 pos) {\n pos = min(max(vec3(0.0), pos), uGridDim - vec3(vec2(2.0), 1.0)); // remove xy padding\n return texture3dFrom2dNearest(tVolumeData, pos / uGridDim, uGridDim, uGridTexDim.xy);\n}\n\nint idot2(const in ivec2 a, const in ivec2 b) {\n return a.x * b.x + a.y * b.y;\n}\n\nint idot4(const in ivec4 a, const in ivec4 b) {\n return a.x * b.x + a.y * b.y + a.z * b.z + a.w * b.w;\n}\n\n#if __VERSION__ == 100\n int pyramidVoxel(vec2 pos) {\n return int(decodeFloatRGB(texture2D(tActiveVoxelsPyramid, pos / (vec2(1.0, 0.5) * uSize)).rgb));\n }\n#else\n int pyramidVoxel(vec2 pos) {\n return texture2D(tActiveVoxelsPyramid, pos / (vec2(1.0, 0.5) * uSize)).r;\n }\n#endif\n\nvec4 baseVoxel(vec2 pos) {\n return texture2D(tActiveVoxelsBase, pos / uSize);\n}\n\nvoid main(void) {\n // get 1D index\n int vI = int(gl_FragCoord.x) + int(gl_FragCoord.y) * int(uSize);\n\n // ignore 1D indices outside of the grid\n if(vI >= int(uCount)) discard;\n\n ivec2 offset = ivec2(int(uSize) - 2, 0);\n\n int start = 0;\n ivec4 starts = ivec4(0);\n ivec4 ends = ivec4(0);\n int diff = 2;\n ivec4 m = ivec4(0);\n ivec2 position = ivec2(0);\n ivec4 vI4 = ivec4(vI);\n\n ivec2 relativePosition = ivec2(0);\n int end = 0;\n ivec2 pos1 = ivec2(0);\n ivec2 pos2 = ivec2(0);\n ivec2 pos3 = ivec2(0);\n ivec2 pos4 = ivec2(0);\n ivec3 vI3 = ivec3(vI);\n ivec3 mask = ivec3(0);\n\n // traverse the different levels of the pyramid\n for(int i = 1; i < 14; i++) {\n if(float(i) >= uLevels) break;\n\n offset.x -= diff;\n diff *= 2;\n relativePosition = position + offset;\n\n end = start + pyramidVoxel(vec2(relativePosition));\n pos1 = ivec2(relativePosition);\n starts.x = start;\n ends.x = end;\n pos2 = ivec2(relativePosition + ivec2(1, 0));\n starts.y = ends.x;\n ends.y = ends.x + pyramidVoxel(vec2(pos2));\n pos3 = relativePosition + ivec2(0, 1);\n starts.z = ends.y;\n ends.z = ends.y + pyramidVoxel(vec2(pos3));\n pos4 = relativePosition + ivec2(1, 1);\n starts.w = ends.z;\n mask = ivec3(greaterThanEqual(vI3, starts.rgb)) * ivec3(lessThan(vI3, ends.rgb));\n m = ivec4(mask, 1 - int(any(bvec3(mask))));\n\n relativePosition = m.x * pos1 + m.y * pos2 + m.z * pos3 + m.w * pos4;\n start = idot4(m, starts);\n position = 2 * (relativePosition - offset);\n }\n\n end = start + int(baseVoxel(vec2(position)).r * 255.0);\n pos1 = position;\n starts.x = start;\n ends.x = end;\n pos2 = position + ivec2(1, 0);\n starts.y = ends.x;\n ends.y = ends.x + int(baseVoxel(vec2(pos2)).r * 255.0);\n pos3 = position + ivec2(0, 1);\n starts.z = ends.y;\n ends.z = ends.y + int(baseVoxel(vec2(pos3)).r * 255.0);\n pos4 = position + ivec2(1, 1);\n starts.w = ends.z;\n mask = ivec3(greaterThanEqual(vI3, starts.rgb)) * ivec3(lessThan(vI3, ends.rgb));\n m = ivec4(mask, 1 - int(any(bvec3(mask))));\n position = m.x * pos1 + m.y * pos2 + m.z * pos3 + m.w * pos4;\n\n vec2 coord2d = (vec2(position) / uSize) / uScale;\n vec3 coord3d = floor(index3dFrom2d(coord2d) + 0.5);\n\n float edgeIndex = floor(baseVoxel(vec2(position)).a * 255.0 + 0.5);\n\n // current vertex for the up to 15 MC cases\n int currentVertex = vI - idot4(m, starts);\n\n // ensure winding-order is the same for negative and positive iso-levels\n if (uInvert) {\n int v = imod(currentVertex + 1, 3);\n if (v == 1) currentVertex += 2;\n else if (v == 0) currentVertex -= 2;\n }\n\n // get index into triIndices table\n int mcIndex = 16 * int(edgeIndex) + currentVertex;\n vec4 mcData = texture2D(tTriIndices, vec2(imod(mcIndex, 64), mcIndex / 64) / 64.);\n\n // bit mask to avoid conditionals (see comment below) for getting MC case corner\n vec4 m0 = vec4(floor(mcData.a * 255.0 + 0.5));\n\n // get edge value masks\n vec4 m1 = vec4(equal(m0, vec4(0., 1., 2., 3.)));\n vec4 m2 = vec4(equal(m0, vec4(4., 5., 6., 7.)));\n vec4 m3 = vec4(equal(m0, vec4(8., 9., 10., 11.)));\n\n // apply bit masks\n vec3 b0 = coord3d +\n m1.y * c1 +\n m1.z * c2 +\n m1.w * c3 +\n m2.x * c4 +\n m2.y * c5 +\n m2.z * c6 +\n m2.w * c7 +\n m3.y * c1 +\n m3.z * c2 +\n m3.w * c3;\n vec3 b1 = coord3d +\n m1.x * c1 +\n m1.y * c2 +\n m1.z * c3 +\n m2.x * c5 +\n m2.y * c6 +\n m2.z * c7 +\n m2.w * c4 +\n m3.x * c4 +\n m3.y * c5 +\n m3.z * c6 +\n m3.w * c7;\n\n // the conditionals that are avoided by above bitmasks\n // vec3 b0 = coord3d;\n // vec3 b1 = coord3d;\n // if (mcIndex == 0.0) {\n // b1 += c1;\n // } else if (mcIndex == 1.0) {\n // b0 += c1; b1 += c2;\n // } else if (mcIndex == 2.0) {\n // b0 += c2; b1 += c3;\n // } else if (mcIndex == 3.0) {\n // b0 += c3;\n // } else if (mcIndex == 4.0) {\n // b0 += c4; b1 += c5;\n // } else if (mcIndex == 5.0) {\n // b0 += c5; b1 += c6;\n // } else if (mcIndex == 6.0) {\n // b0 += c6; b1 += c7;\n // } else if (mcIndex == 7.0) {\n // b0 += c7; b1 += c4;\n // } else if (mcIndex == 8.0) {\n // b1 += c4;\n // } else if (mcIndex == 9.0) {\n // b0 += c1; b1 += c5;\n // } else if (mcIndex == 10.0) {\n // b0 += c2; b1 += c6;\n // } else if (mcIndex == 11.0) {\n // b0 += c3; b1 += c7;\n // }\n // b0 = floor(b0 + 0.5);\n // b1 = floor(b1 + 0.5);\n\n vec4 d0 = voxel(b0);\n vec4 d1 = voxel(b1);\n\n float v0 = d0.a;\n float v1 = d1.a;\n\n float t = (uIsoValue - v0) / (v0 - v1);\n gl_FragData[0].xyz = (uGridTransform * vec4(b0 + t * (b0 - b1), 1.0)).xyz;\n\n // group id\n #if __VERSION__ == 100\n // webgl1 does not support 'flat' interpolation (i.e. no interpolation)\n // so we ensure a constant group id per triangle here\n #ifdef dPackedGroup\n gl_FragData[1] = vec4(voxel(coord3d).rgb, 1.0);\n #else\n vec3 gridDim = uGridDim - vec3(1.0, 1.0, 0.0); // remove xy padding\n float group = coord3d.z + coord3d.y * gridDim.z + coord3d.x * gridDim.z * gridDim.y;\n gl_FragData[1] = vec4(group > 16777215.5 ? vec3(1.0) : encodeFloatRGB(group), 1.0);\n #endif\n #else\n #ifdef dPackedGroup\n gl_FragData[1] = vec4(t < 0.5 ? d0.rgb : d1.rgb, 1.0);\n #else\n vec3 b = t < 0.5 ? b0 : b1;\n vec3 gridDim = uGridDim - vec3(1.0, 1.0, 0.0); // remove xy padding\n float group = b.z + b.y * gridDim.z + b.x * gridDim.z * gridDim.y;\n gl_FragData[1] = vec4(group > 16777215.5 ? vec3(1.0) : encodeFloatRGB(group), 1.0);\n #endif\n #endif\n\n // normals from gradients\n vec3 n0 = -normalize(vec3(\n voxelPadded(b0 - c1).a - voxelPadded(b0 + c1).a,\n voxelPadded(b0 - c3).a - voxelPadded(b0 + c3).a,\n voxelPadded(b0 - c4).a - voxelPadded(b0 + c4).a\n ));\n vec3 n1 = -normalize(vec3(\n voxelPadded(b1 - c1).a - voxelPadded(b1 + c1).a,\n voxelPadded(b1 - c3).a - voxelPadded(b1 + c3).a,\n voxelPadded(b1 - c4).a - voxelPadded(b1 + c4).a\n ));\n gl_FragData[2].xyz = -vec3(\n n0.x + t * (n0.x - n1.x),\n n0.y + t * (n0.y - n1.y),\n n0.z + t * (n0.z - n1.z)\n );\n\n // ensure normal-direction is the same for negative and positive iso-levels\n if (uInvert) {\n gl_FragData[2].xyz *= -1.0;\n }\n\n // apply normal matrix\n gl_FragData[2].xyz *= transpose3(inverse3(mat3(uGridTransform)));\n}\n",{drawBuffers:"required"}),S=Object(i.a)(e,"triangles",j,O,x);return Object(a.a)(S,x)}(e,t,r,o,l,p,f,h,m,g,b,v,y);return e.namedComputeRenderables.isosurface}function R(e,t,r,n,a,i,o,s,u,c,l,d){var f=function(e,t,r,n,a,i){var o=e.gl,s=e.resources,u=t.getWidth(),c=t.getHeight();e.namedFramebuffers["active-voxels"]||(e.namedFramebuffers["active-voxels"]=s.framebuffer());var l=e.namedFramebuffers["active-voxels"];l.bind(),e.namedTextures["active-voxels"]||(e.namedTextures["active-voxels"]=s.texture("image-uint8","rgba","ubyte","nearest"));var d=e.namedTextures["active-voxels"];d.define(u,c);var p=k(e,t,r,n,a,i);return e.state.currentRenderItemId=-1,d.attachFramebuffer(l,0),function(e){var t=e.gl,r=e.state;r.disable(t.CULL_FACE),r.disable(t.BLEND),r.disable(t.DEPTH_TEST),r.enable(t.SCISSOR_TEST),r.depthMask(!1),r.colorMask(!0,!0,!0,!0),r.clearColor(0,0,0,0)}(e),o.viewport(0,0,u,c),o.scissor(0,0,u,c),o.clear(o.COLOR_BUFFER_BIT),o.scissor(0,0,n[0],n[1]),p.render(),o.finish(),d}(e,t,r,n,o,a);return function(e,t,r,n,a,i,o,s,u,c,l,d,f){var h=e.gl,m=e.resources,g=e.extensions,b=n.pyramidTex,v=n.height,y=n.levels,x=n.scale,O=n.count,j=b.getWidth();e.namedFramebuffers.isosurface||(e.namedFramebuffers.isosurface=m.framebuffer());var S=e.namedFramebuffers.isosurface;Object(p.q)(h)?(l||(l=g.colorBufferHalfFloat&&g.textureHalfFloat?m.texture("image-float16","rgba","fp16","nearest"):m.texture("image-float32","rgba","float","nearest")),d||(d=m.texture("image-uint8","rgba","ubyte","nearest")),f||(f=g.colorBufferHalfFloat&&g.textureHalfFloat?m.texture("image-float16","rgba","fp16","nearest"):m.texture("image-float32","rgba","float","nearest"))):(l||(l=m.texture("image-float32","rgba","float","nearest")),d||(d=m.texture("image-float32","rgba","float","nearest")),f||(f=m.texture("image-float32","rgba","float","nearest"))),l.define(j,v),d.define(j,v),f.define(j,v),l.attachFramebuffer(S,0),d.attachFramebuffer(S,1),f.attachFramebuffer(S,2);var _=D(e,b,t,r,a,i,o,s,y,x,O,u,c);e.state.currentRenderItemId=-1;var w=e.extensions.drawBuffers;if(!w)throw new Error("need WebGL draw buffers");return S.bind(),w.drawBuffers([w.COLOR_ATTACHMENT0,w.COLOR_ATTACHMENT1,w.COLOR_ATTACHMENT2]),function(e){var t=e.gl,r=e.state;r.disable(t.CULL_FACE),r.disable(t.BLEND),r.disable(t.DEPTH_TEST),r.disable(t.SCISSOR_TEST),r.depthMask(!1),r.colorMask(!0,!0,!0,!0),r.clearColor(0,0,0,0)}(e),h.viewport(0,0,j,v),h.clear(h.COLOR_BUFFER_BIT),_.render(),h.finish(),{vertexTexture:l,groupTexture:d,normalTexture:f,vertexCount:O}}(e,f,t,_(e,f,a,n),r,n,i,o,s,u,c,l,d)}},function(e,t,r){"use strict";r.r(t),r.d(t,"Download",(function(){return J})),r.d(t,"DownloadBlob",(function(){return $})),r.d(t,"RawData",(function(){return ee})),r.d(t,"ReadFile",(function(){return te})),r.d(t,"ParseBlob",(function(){return re})),r.d(t,"ParseCif",(function(){return ne})),r.d(t,"ParseCube",(function(){return ae})),r.d(t,"ParsePsf",(function(){return ie})),r.d(t,"ParsePly",(function(){return oe})),r.d(t,"ParseCcp4",(function(){return se})),r.d(t,"ParseDsn6",(function(){return ue})),r.d(t,"ParseDx",(function(){return ce})),r.d(t,"ImportString",(function(){return le})),r.d(t,"ImportJson",(function(){return de})),r.d(t,"ParseJson",(function(){return pe})),r.d(t,"LazyVolume",(function(){return fe}));var n=r(572),a=r(955),i=r(672),o=r(579),s=r(640),u=r(956),c=r(837);function l(e){var t=e.xExtent,r=e.yExtent,n=e.zExtent;return{xBlocks:Math.ceil(t/8),yBlocks:Math.ceil(r/8),zBlocks:Math.ceil(n/8)}}function d(e){return Object(n.b)(this,void 0,void 0,(function(){var t,r,a,i;return Object(n.d)(this,(function(n){switch(n.label){case 0:return[4,e.readBuffer(0,512)];case 1:return t=n.sent().buffer,r=String.fromCharCode.apply(null,t),a=r.startsWith(":-)"),i=a||100===t.readInt16LE(36),[2,{header:a?(o=r,{xStart:parseInt(o.substr(10,5)),yStart:parseInt(o.substr(15,5)),zStart:parseInt(o.substr(20,5)),xExtent:parseInt(o.substr(32,5)),yExtent:parseInt(o.substr(38,5)),zExtent:parseInt(o.substr(42,5)),xRate:parseInt(o.substr(52,5)),yRate:parseInt(o.substr(58,5)),zRate:parseInt(o.substr(62,5)),xlen:parseFloat(o.substr(73,10)),ylen:parseFloat(o.substr(83,10)),zlen:parseFloat(o.substr(93,10)),alpha:parseFloat(o.substr(103,10)),beta:parseFloat(o.substr(113,10)),gamma:parseFloat(o.substr(123,10)),divisor:parseFloat(o.substr(138,12)),summand:parseInt(o.substr(155,8)),sigma:parseFloat(o.substr(170,12))}):function(e,t){var r=t?function(t){return e.readInt16LE(2*t)}:function(t){return e.readInt16BE(2*t)},n=1/r(17);return{xStart:r(0),yStart:r(1),zStart:r(2),xExtent:r(3),yExtent:r(4),zExtent:r(5),xRate:r(6),yRate:r(7),zRate:r(8),xlen:r(9)*n,ylen:r(10)*n,zlen:r(11)*n,alpha:r(12)*n,beta:r(13)*n,gamma:r(14)*n,divisor:r(15)/100,summand:r(16),sigma:void 0}}(t,i),littleEndian:i}]}var o}))}))}function p(e,t,r,a){return Object(n.b)(this,void 0,void 0,(function(){var i,o,s,u,d,p,f,h,m,g,b,v,y,x,O,j,S,_,w;return Object(n.d)(this,(function(n){for(a||c.a.flipByteOrderInPlace2(t.buffer),i=e.divisor,o=e.summand,s=e.xExtent,u=e.yExtent,d=e.zExtent,p=l(e),f=p.xBlocks,h=p.yBlocks,m=p.zBlocks,g=0,b=0;b=0){var S=r(2,4);0===S&&(S=1);for(var _=0;_>8&255}function o(e,t){return 16777216*e[t+3]+(e[t+2]<<16|e[t+1]<<8|e[t])}function s(e,t,r){e[t]=255&r,e[t+1]=r>>8&255,e[t+2]=r>>16&255,e[t+3]=r>>24&255}function u(e,t,r){for(var n,a,i="",o=0;o>>1:r>>>=1;e[t]=r}return e}();function d(e,t,r){return 4294967295^function(e,t,r,n){for(var a=0;a>>8;return e}(4294967295,e,t,r)}var p,f,h=(p=Uint16Array,f=Uint32Array,{next_code:new p(16),bl_count:new p(16),ordr:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],of0:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],exb:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],ldef:new p(32),df0:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],dxb:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],ddef:new f(32),flmap:new p(512),fltree:[],fdmap:new p(32),fdtree:[],lmap:new p(32768),ltree:[],ttree:[],dmap:new p(32768),dtree:[],imap:new p(512),itree:[],rev15:new p(32768),lhst:new f(286),dhst:new f(30),ihst:new f(19),lits:new f(15e3),strt:new p(65536),prev:new p(32768)});function m(e,t,r){for(var n=e.length,a=h.rev15,i=0;i>1,s=e[i+1],u=o<<4|s,c=t-s,l=e[i]<>>15-t]=u,l++}}function g(e,t){for(var r=e.length,n=h.bl_count,a=0;a<=t;a++)n[a]=0;for(a=1;a>>n}}function v(e,t,r){return Object(n.b)(this,void 0,void 0,(function(){var a;return Object(n.d)(this,(function(n){switch(n.label){case 0:if(3===t[0]&&0===t[1])return[2,r||new Uint8Array(0)];a=function(e,t){var r=void 0===t;return void 0===t&&(t=new Uint8Array(e.length>>>2<<3)),{data:e,buf:t,noBuf:r,BFINAL:0,off:0,pos:0}}(t,r),n.label=1;case 1:return 0!==a.BFINAL?[3,4]:e.shouldUpdate?[4,e.update({message:"Inflating blocks...",current:a.pos,max:t.length})]:[3,3];case 2:n.sent(),n.label=3;case 3:return function(e,t){for(var r=e.data,n=e.noBuf,a=e.buf,i=e.BFINAL,o=e.off,s=e.pos,u=0;0===i&&uA&&(A=E)}s+=3*w,g(h.itree,A),m(h.itree,A,h.imap),c=h.lmap,l=h.dmap,s=x(h.imap,(1<>>4;if(k>>>8==0)a[o++]=k;else{if(256===k)break;var M=o+k-254;if(k>264){var D=h.ldef[k-257];M=o+(D>>>3)+j(r,s,7&D),s+=7&D}var R=l[_(r,s)&p];s+=15&R;var B=R>>>4,L=h.ddef[B],N=(L>>>4)+S(r,s,15&L);for(s+=15&L,n&&(a=y(a,o+(1<<17)));o>>3),z=r[F-4]|r[F-3]<<8;n&&(a=y(a,o+z)),a.set(new Uint8Array(r.buffer,r.byteOffset+F,z),o),s=F+z<<3,o+=z}}e.buf=a,e.BFINAL=i,e.off=o,e.pos=s}(a,100),[3,1];case 4:return[2,a.buf.length===a.off?a.buf:a.buf.slice(0,a.off)]}}))}))}function y(e,t){var r=e.length;if(t<=r)return e;var n=new Uint8Array(Math.max(r<<1,t));return n.set(e,0),n}function x(e,t,r,n,a,i){for(var o=0;o>>4;if(u<=15)i[o]=u,o++;else{var c=0,l=0;16===u?(l=3+j(n,a,2),a+=2,c=i[o-1]):17===u?(l=3+j(n,a,3),a+=3):18===u&&(l=11+j(n,a,7),a+=7);for(var d=o+l;o>>1;ia&&(a=s),i++}for(;i>>3]|e[1+(t>>>3)]<<8)>>>(7&t)&(1<>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16)>>>(7&t)&(1<>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16)>>>(7&t)}function w(e,t,r){for(var n=[],a=e.length,i=t.length,o=0;or&&(!function(e,t,r){var n=0,a=1<t;n++){var o=e[n].d;e[n].d=t,i+=a-(1<>>=r-t;for(;i>0;){(o=e[n].d)=0;n--)e[n].d===t&&i<0&&(e[n].d--,i++);0!==i&&console.log("debt left")}(u,r,g),g=r);for(o=0;o>>1|(1431655765&t)<<1))>>>2|(858993459&t)<<2))>>>4|(252645135&t)<<4))>>>8|(16711935&t)<<8,h.rev15[e]=(t>>>16|t<<16)>>>17}function r(e,t,r){for(;0!=t--;)e.push(0,r)}for(e=0;e<32;e++)h.ldef[e]=h.of0[e]<<3|h.exb[e],h.ddef[e]=h.df0[e]<<4|h.dxb[e];r(h.fltree,144,8),r(h.fltree,112,9),r(h.fltree,24,7),r(h.fltree,8,8),g(h.fltree,9),m(h.fltree,9,h.flmap),b(h.fltree,9),r(h.fdtree,32,5),g(h.fdtree,5),m(h.fdtree,5,h.fdmap),b(h.fdtree,5),r(h.itree,19,0),r(h.ltree,286,0),r(h.dtree,30,0),r(h.ttree,320,0)}();var C=[[0,0,0,0,0],[4,4,8,4,0],[4,5,16,8,0],[4,6,16,16,0],[4,10,16,32,0],[8,16,32,32,0],[8,16,128,128,0],[8,32,128,256,0],[32,128,258,1024,1],[32,258,258,4096,1]];function A(e,t,r,a,i){return Object(n.b)(this,void 0,void 0,(function(){var o,s,u,c,l,d,p,f,m,g,b,v;return Object(n.d)(this,(function(n){switch(n.label){case 0:if(o=function(e,t,r,n){var a=h.lits,i=h.strt,o=h.prev;return{data:e,out:t,opt:C[n],i:0,pos:r<<3,cvrd:0,dlen:e.length,li:0,lc:0,bs:0,ebits:0,c:0,nc:0,lits:a,strt:i,prev:o}}(t,r,a,i),s=o.dlen,0===i){for(u=o.i,c=o.pos;u>>3]}s>2&&(o.nc=T(t,0),o.strt[o.nc]=0),n.label=1;case 1:return o.i14e3||l>26697)&&n-o>100&&(u>>16,S=65535&O,_=B(j,h.of0);h.lhst[257+_]++;var w=B(S,h.df0);h.dhst[w]++,p+=h.exb[_]+h.dxb[w],g[c]=j<<23|o-u,g[c+1]=S<<16|_<<8|w,c+=2,u=o+j}else h.lhst[r[o]]++;l++}}e.i=o,e.pos=s,e.cvrd=u,e.li=c,e.lc=l,e.bs=d,e.ebits=p,e.c=f,e.nc=m}(o,1048576),[3,1];case 4:for(d=o.li,p=o.cvrd,f=o.pos,m=o.i,g=o.lits,b=o.bs,v=o.ebits,b===m&&0!==t.length||(p>>3]}}))}))}function E(e,t,r,n,a,i){var o=32767&t,s=r[o],u=o-s+32768&32767;if(s===o||n!==T(e,t-u))return 0;for(var c=0,l=0,d=Math.min(32767,t);u<=d&&0!=--i&&s!==o;){if(0===c||e[t+c]===e[t+c-u]){var p=P(e,t,u);if(p>c){if(l=u,(c=p)>=a)break;u+2f&&(f=g,s=m)}}}u+=(o=s)-(s=r[o])+32768&32767}return c<<16|l}function P(e,t,r){if(e[t]!==e[t-r]||e[t+1]!==e[t+1-r]||e[t+2]!==e[t+2-r])return 0;var n=t,a=Math.min(e.length,t+258);for(t+=3;t4&&0===h.itree[1+(h.ordr[u-1]<<1)];)u--;return[e,t,s,n,i,u,r,a]}(),l=c[0],d=c[1],p=c[2],f=c[3],m=c[4],v=c[5],y=c[6],x=c[7],O=32+(0==(u+3&7)?0:8-(u+3&7))+(o<<3),j=n+M(h.fltree,h.lhst)+M(h.fdtree,h.dhst),S=n+M(h.ltree,h.lhst)+M(h.dtree,h.dhst);S+=14+3*v+M(h.itree,h.ihst)+(2*h.ihst[16]+3*h.ihst[17]+7*h.ihst[18]);for(var _=0;_<286;_++)h.lhst[_]=0;for(_=0;_<30;_++)h.dhst[_]=0;for(_=0;_<19;_++)h.ihst[_]=0;var C=O>>23,U=T+(8388607&B);T>16,G=V>>8&255,q=255&V;N(s,u=L(257+G,A,s,u),z-h.of0[G]),F(s,u=L(q,E,s,u+=h.exb[G]),H-h.df0[q]),u+=h.dxb[q],T+=z}}u=L(256,A,s,u)}return u}function k(e,t,r,n,a){var i=a>>>3;return n[i]=r,n[i+1]=r>>>8,n[i+2]=255-n[i],n[i+3]=255-n[i+1],i+=4,n.set(new Uint8Array(e.buffer,t,r),i),a+(r+4<<3)}function M(e,t){for(var r=0,n=0;n15&&(N(r,n,o),n+=s)}return n}function R(e,t){for(var r=e.length;2!==r&&0===e[r-1];)r-=2;for(var n=0;n>>1,138))<11?t.push(17,c-3):t.push(18,c-11),n+=2*c-2}else if(a===s&&i===a&&o===a){for(u=n+5;u+2>>1,6);t.push(16,c-3),n+=2*c-2}else t.push(a,0)}return r>>>1}function B(e,t){var r=0;return t[16|r]<=e&&(r|=16),t[8|r]<=e&&(r|=8),t[4|r]<=e&&(r|=4),t[2|r]<=e&&(r|=2),t[1|r]<=e&&(r|=1),r}function L(e,t,r,n){return F(r,n,t[e<<1]),n+t[1+(e<<1)]}function N(e,t,r){r<<=7&t;var n=t>>>3;e[n]|=r,e[n+1]|=r>>>8}function F(e,t,r){r<<=7&t;var n=t>>>3;e[n]|=r,e[n+1]|=r>>>8,e[n+2]|=r>>>16}var z=r(579);function U(e,t,r){return void 0===r&&(r=!1),Object(n.b)(this,void 0,void 0,(function(){var i,s,u,c,l,d,p,f,h,m,g,b,v;return Object(n.d)(this,(function(n){switch(n.label){case 0:for(i=Object.create(null),s=new Uint8Array(t),u=s.length-4;101010256!==o(s,u);)u--;c=u,c+=4,l=a(s,c+=4),c+=2,c+=2,d=o(s,c+=4),c+=4,c=d,p=0,n.label=1;case 1:return p>0,p=o(t,t.length-4),void 0===r&&(r=new Uint8Array(p)),f=new Uint8Array(t.buffer,t.byteOffset+s,t.length-s-8),[4,H(e,f,r)];case 1:return h=n.sent(),m=d(h,0,h.length),l!==m&&console.error("ungzip: checksums don't match"),[2,h]}var g}))}))}function q(e,t,r){return Object(n.b)(this,void 0,void 0,(function(){var a,i;return Object(n.d)(this,(function(n){switch(n.label){case 0:return void 0===r&&(r={level:6}),a=new Uint8Array(50+Math.floor(1.1*t.length)),[4,A(e,t,a,0,r.level)];case 1:return i=n.sent(),[2,new Uint8Array(a.buffer,0,i)]}}))}))}function W(e,t){return void 0===t&&(t=!1),z.b.create("Zip",(function(r){return function(e,t,r){void 0===r&&(r=!1);return Object(n.b)(this,void 0,void 0,(function(){var a,o,u,l,p,f,h,m,g,b,v,y,x,O,j,S,_,w,C,A;return Object(n.d)(this,(function(n){switch(n.label){case 0:for(l in a=0,o={},u=[],t)u.push(l);p=0,n.label=1;case 1:return p>6,e[t+a+1]=128|o>>0&63,a+=2;else if(0==(4294901760&o))e[t+a]=224|o>>12,e[t+a+1]=128|o>>6&63,e[t+a+2]=128|o>>0&63,a+=3;else{if(0!=(4292870144&o))throw"e";e[t+a]=240|o>>18,e[t+a+1]=128|o>>12&63,e[t+a+2]=128|o>>6&63,e[t+a+3]=128|o>>0&63,a+=4}}return a}(e,t,r),0===a&&(e.set(u,t),t+=u.length),t}},,,function(e,t,r){"use strict";r.d(t,"a",(function(){return Ae}));var n=r(572),a=r(591),i=r(573),o=r(649),s=r(589),u=r(811),c=r(741),l=r(726),d=r(679),p=r(737),f=r(714),h=r(584),m=r(576),g=r(764),b=r(767),v=r(577),y=r(709),x=r(657),O=r(601),j=r(1100),S=r(579),_=r(727);function w(e,t){var r,a,i,s,u,O,j,S,w=e.defaultProps,C=e.createGeometry,A=e.createLocationIterator,E=e.getLoci,P=e.eachLocation,T=e.setUpdateState,I=e.mustRecreate,k=e.dispose,M=e.geometryUtils,D=M.updateValues,R=M.updateBoundingSphere,B=M.updateRenderableState,L=M.createPositionIterator,N=g.a.create(),F=Object.assign({},w),z=d.a.createEmpty();function U(e){if(N.createNew){if(j=A(s),!e)throw new Error("expected geometry to be given");r=function(e,t,r,n,a,i){var o=l.a.getUtils(t),s=o.createValues,u=o.createRenderableState,c=s(t,Object(p.a)(),r,n,a),d=u(a);return Object(f.a)(t.kind,c,d,i)}(0,e,j,i,a,t),S=L(e,r.values)}else{if(!r)throw new Error("expected renderObject to be available");if(j.reset(),N.createGeometry){if(!e)throw new Error("expected geometry to be given");v.e.updateIfChanged(r.values.drawCount,l.a.getDrawCount(e)),v.e.updateIfChanged(r.values.uVertexCount,l.a.getVertexCount(e))}(N.updateTransform||N.createGeometry)&&(R(r.values,e||O),S=L(e||O,r.values)),N.updateSize&&"uSize"in r.values&&Object(y.a)(j,i.size,r.values),N.updateColor&&Object(x.a)(j,S,i.color,r.values),D(r.values,a),B(r.state,a)}F=a,z=i,u=s,e&&(O=e)}function V(e,t){return Object(h.g)(e)?t(m.b.ofBounds(0,j.groupCount*j.instanceCount)):P(e,u,F,t)}return{get groupCount(){return j?j.count:0},get renderObject(){return r},createOrUpdate:function(e,t,c,l){return void 0===c&&(c={}),Object(n.b)(this,void 0,void 0,(function(){var d;return Object(n.d)(this,(function(n){return function(e,t,n){if(!n&&!u)throw new Error("missing volume");a=Object.assign({},F,t),i=e,s=n,g.a.reset(N),r&&u&&o.b.areEquivalent(s,u)||(N.createNew=!0),N.createNew?N.createGeometry=!0:(T(N,n,a,F,i,z),b.a.areEqual(e.color,z.color)||(N.updateColor=!0),N.createGeometry&&(N.updateColor=!0))}(t,c,l||u),N.createGeometry?(d=C(e,s,i,a,O),[2,Object(_.c)(d)?d.then(U):U(d)]):(U(),[2])}))}))},getLoci:function(e){return r?E(e,u,F,r.id):h.b},mark:function(e,t){return c.a.mark(r,e,t,V)},setVisibility:function(e){c.a.setVisibility(r,e)},setAlphaFactor:function(e){c.a.setAlphaFactor(r,e)},setPickable:function(e){c.a.setPickable(r,e)},setColorOnly:function(e){c.a.setColorOnly(r,e)},setTransform:function(e,t){c.a.setTransform(r,e,t)},setOverpaint:function(e){return c.a.setOverpaint(r,e,V,!0)},setTransparency:function(e){return c.a.setTransparency(r,e,V,!0)},setClipping:function(e){return c.a.setClipping(r,e,V,!0)},destroy:function(){null==k||k(O),r&&(r.state.disposed=!0,r=void 0)},mustRecreate:I}}Object(n.a)({},O.a.Params);function C(e,t,r,o,s){var u,c,l,p,m=0,b=t.webgl,v=new j.a,y=Object(f.c)(),x=[],O=a.a.createState(),_=d.a.createEmpty();return{label:e,get groupCount(){return u?u.groupCount:0},get props(){return p},get params(){return l},get state(){return O},get theme(){return _},renderObjects:x,updated:v,createOrUpdate:function(e,a){var s=this;void 0===e&&(e={}),a&&a!==c&&(l=r(t,a),c=a,p||(p=i.a.getDefaultValues(l)));var d=Object(g.b)(Object.assign({},p,e),c);return Object.assign(p,e,d),S.b.create("Creating or updating VolumeRepresentation",(function(e){return Object(n.b)(s,void 0,void 0,(function(){var t,r;return Object(n.d)(this,(function(n){switch(n.label){case 0:return u?(null===(r=u.mustRecreate)||void 0===r?void 0:r.call(u,c,p,b))&&(u.destroy(),u=o(y,c,p,b)):u=o(y,c,p,b),(t=u.createOrUpdate({webgl:b,runtime:e},_,p,a))?[4,t]:[3,2];case 1:n.sent(),n.label=2;case 2:return x.length=0,u&&u.renderObject&&x.push(u.renderObject),v.next(m++),[2]}}))}))}))},setState:function(e){void 0!==e.visible&&u&&u.setVisibility(e.visible),void 0!==e.alphaFactor&&u&&u.setAlphaFactor(e.alphaFactor),void 0!==e.pickable&&u&&u.setPickable(e.pickable),void 0!==e.overpaint&&u&&u.setOverpaint(e.overpaint),void 0!==e.transparency&&u&&u.setTransparency(e.transparency),void 0!==e.transform&&u&&u.setTransform(e.transform),a.a.updateState(O,e)},setTheme:function(e){_=e},getLoci:function(e){return void 0===e?s(c,p):u?u.getLoci(e):h.b},mark:function(e,t){return!!u&&u.mark(e,t)},destroy:function(){u&&u.destroy()}}}var A=r(607),E=r(678),P=r(648),T=r(574),I=r(587),k=r(845),M=r(762),D=r(992),R=r(617),B={isoValue:o.b.IsoValueParam};function L(e,t){var r=e.grid.cells.space.dimensions;return Object(k.d)(r,1).powerOfTwoSize<=t.maxTextureSize/2}function N(e,t,r,n){return r.tryUseGpu&&n&&function(e){return e.extensions.colorBufferFloat&&e.extensions.textureFloat&&e.extensions.drawBuffers}(n)&&L(t,n)?function(e){return w({defaultProps:i.a.getDefaultValues(W),createGeometry:X,createLocationIterator:function(e){return Object(A.a)(e.grid.cells.data.length,1,1,(function(){return E.b}))},getLoci:z,eachLocation:U,setUpdateState:function(e,t,r,n){o.b.IsoValue.areSame(r.isoValue,n.isoValue,t.grid.stats)||(e.createGeometry=!0)},geometryUtils:M.a.Utils,mustRecreate:function(e,t,r){return!t.tryUseGpu||!r||!L(e,r)},dispose:function(e){e.vertexTexture.ref.value.destroy(),e.groupTexture.ref.value.destroy(),e.normalTexture.ref.value.destroy(),e.doubleBuffer.destroy()}},e)}(e):function(e){return w({defaultProps:i.a.getDefaultValues(W),createGeometry:V,createLocationIterator:function(e){return Object(A.a)(e.grid.cells.data.length,1,1,(function(){return E.b}))},getLoci:z,eachLocation:U,setUpdateState:function(e,t,r,n){o.b.IsoValue.areSame(r.isoValue,n.isoValue,t.grid.stats)||(e.createGeometry=!0)},geometryUtils:s.a.Utils,mustRecreate:function(e,t,r){return t.tryUseGpu&&!!r&&L(e,r)}},e)}(e)}function F(e,t){return o.b.Isosurface.Loci(e,t.isoValue)}function z(e,t,r,n){var a=e.objectId,i=e.groupId;return n===a?o.b.Cell.Loci(t,m.b.ofSingleton(i)):h.b}function U(e,t,r,n){return Object(k.c)(e,t,r.isoValue,n)}function V(e,t,r,a,i){return Object(n.b)(this,void 0,void 0,(function(){var r,c,l;return Object(n.d)(this,(function(n){switch(n.label){case 0:return e.runtime.update({message:"Marching cubes..."}),r=Object(I.o)(new Int32Array(t.grid.cells.data.length)),[4,Object(u.b)({isoLevel:o.b.IsoValue.toAbsolute(a.isoValue,t.grid.stats).absoluteValue,scalarField:t.grid.cells,idField:T.e.create(t.grid.cells.space,T.e.Data1(r))},i).runAsChild(e.runtime)];case 1:return c=n.sent(),l=o.a.getGridToCartesianTransform(t.grid),s.a.transform(c,l),e.webgl&&!e.webgl.isWebGL2&&s.a.uniformTriangleGroup(c,!1),c.setBoundingSphere(o.b.getBoundingSphere(t)),[2,c]}}))}))}var H,G,q,W=Object(n.a)(Object(n.a)(Object(n.a)(Object(n.a)({},s.a.Params),M.a.Params),B),{quality:Object(n.a)(Object(n.a)({},s.a.Params.quality),{isEssential:!1}),tryUseGpu:i.a.Boolean(!0)});function X(e,t,r,a,i){return Object(n.b)(this,void 0,void 0,(function(){var r,s,u,c,l,d,p,f,h,m,g,b,v,y;return Object(n.d)(this,(function(n){if(!e.webgl)throw new Error("webgl context required to create volume isosurface texture-mesh");return r=t.grid.stats,s=r.max,u=r.min,c=s-u,l=o.b.IsoValue.toAbsolute(a.isoValue,t.grid.stats).absoluteValue,d=(l-u)/c,p=H.get(t,e.webgl),f=p.texture,h=p.gridDimension,m=p.gridTexDim,g=p.gridTexScale,b=p.transform,v=null==i?void 0:i.doubleBuffer.get(),y=Object(D.a)(e.webgl,f,h,m,g,b,d,l<0,!1,null==v?void 0:v.vertex,null==v?void 0:v.group,null==v?void 0:v.normal),[2,M.a.create(y.vertexCount,1,y.vertexTexture,y.groupTexture,y.normalTexture,o.b.getBoundingSphere(t),i)]}))}))}function Y(e,t,r,a,i){return Object(n.b)(this,void 0,void 0,(function(){var r,s,c;return Object(n.d)(this,(function(n){switch(n.label){case 0:return e.runtime.update({message:"Marching cubes..."}),r=Object(I.o)(new Int32Array(t.grid.cells.data.length)),[4,Object(u.a)({isoLevel:o.b.IsoValue.toAbsolute(a.isoValue,t.grid.stats).absoluteValue,scalarField:t.grid.cells,idField:T.e.create(t.grid.cells.space,T.e.Data1(r))},i).runAsChild(e.runtime)];case 1:return s=n.sent(),c=o.a.getGridToCartesianTransform(t.grid),P.a.transform(s,c),s.setBoundingSphere(o.b.getBoundingSphere(t)),[2,s]}}))}))}G=H||(H={}),q="volume-isosurface-texture",G.descriptor=Object(R.b)({name:q}),G.get=function(e,t){var r=t.resources,n=o.a.getGridToCartesianTransform(e.grid),a=T.g.clone(e.grid.cells.space.dimensions),i=Object(k.d)(a,1),s=i.width,u=i.height,c=i.powerOfTwoSize,l=T.g.create(s,u,0),d=T.f.create(s/c,u/c);if(c>t.maxTextureSize/2)throw new Error("volume too large for gpu isosurface extraction");if(!e._propertyData[q]){e._propertyData[q]=r.texture("image-uint8","alpha","ubyte","linear");var p=e._propertyData[q];p.define(c,c),p.load(Object(k.a)(e,"data",1),!0),e.customProperties.add(G.descriptor),e.customProperties.assets(G.descriptor,[{dispose:function(){return p.destroy()}}])}return a[0]+=1,a[1]+=1,{texture:e._propertyData[q],transform:n,gridDimension:a,gridTexDim:l,gridTexScale:d}};var K=Object(n.a)(Object(n.a)(Object(n.a)({},P.a.Params),B),{quality:Object(n.a)(Object(n.a)({},P.a.Params.quality),{isEssential:!1}),sizeFactor:i.a.Numeric(3,{min:0,max:10,step:.1})});function Q(e){return w({defaultProps:i.a.getDefaultValues(K),createGeometry:Y,createLocationIterator:function(e){return Object(A.a)(e.grid.cells.data.length,1,1,(function(){return E.b}))},getLoci:z,eachLocation:U,setUpdateState:function(e,t,r,n){o.b.IsoValue.areSame(r.isoValue,n.isoValue,t.grid.stats)||(e.createGeometry=!0)},geometryUtils:P.a.Utils},e)}var Z={solid:function(e,t){return C("Isosurface mesh",e,t,N,F)},wireframe:function(e,t){return C("Isosurface wireframe",e,t,Q,F)}},J=Object(n.a)(Object(n.a)(Object(n.a)({},W),K),{visuals:i.a.MultiSelect(["solid"],i.a.objectToOptions(Z))});var $={name:"isosurface",label:"Isosurface",description:"Displays a triangulated isosurface of volumetric data.",factory:function(e,t){return a.a.createMulti("Isosurface",e,t,a.a.StateBuilder,Z)},getParams:function(e,t){var r=i.a.clone(J);return r.isoValue=o.b.createIsoValueParam(o.b.IsoValue.relative(2),t.grid.stats),r},defaultValues:i.a.getDefaultValues(J),defaultColorTheme:{name:"uniform"},defaultSizeTheme:{name:"uniform"},isApplicable:function(e){return!o.b.isEmpty(e)}},ee=r(631),te=r(900),re=r(725),ne=r(581),ae=r(758);function ie(e,t,r,a,i){return Object(n.b)(this,void 0,void 0,(function(){var e,s,u,c,l,d,p,f,h,m,g,b,v,y,x,O,j,S,_,w,C,A,P,T,I,k,M,D,R,B,L,N,F,z,U,V,H,G;return Object(n.d)(this,(function(n){for(e=a.dimension.name,s=a.isoValue,u=t.grid.cells,c=u.space,l=u.data,d=t.grid.stats,p=d.min,f=d.max,h=o.b.IsoValue.toAbsolute(s,t.grid.stats).absoluteValue,m=r.color.color(E.b,!1),g=ne.a.toRgbNormalized(m),b=g[0],v=g[1],y=g[2],x=oe(t.grid,a),O=x.width,j=x.height,S=x.x,_=x.y,w=x.z,C=x.x0,A=x.y0,P=x.z0,T=x.nx,I=x.ny,k=x.nz,M=new Float32Array("x"===e?[S,0,0,S,_,0,S,0,w,S,_,w]:"y"===e?[0,_,0,S,_,0,0,_,w,S,_,w]:[0,0,w,0,_,w,S,0,w,S,_,w]),D=new Uint8Array(O*j*4),R=function(e,t){for(var r=e.cells.space,n=oe(e,t),a=n.width,i=n.height,o=n.x0,s=n.y0,u=n.z0,c=n.nx,l=n.ny,d=n.nz,p=new Uint8Array(a*i*4),f=0,h=s;h=h?255:0,B+=4;return V={width:O,height:j,array:D,flipY:!0},H={width:O,height:j,array:R,flipY:!0},G=o.a.getGridToCartesianTransform(t.grid),Object(re.e)(G,M,0,4),[2,te.a.create(V,M,H,i)]}))}))}function oe(e,t){var r,n,a,i,o,s=t.dimension,u=s.name,c=s.params,l=0,d=0,p=0,f=e.cells.space.dimensions,h=f[0],m=f[1],g=f[2];return"x"===u?(i=m-1,o=g-1,r=g,n=m,h=(l=a=c)+1):"y"===u?(a=h-1,o=g-1,r=g,n=h,m=(d=i=c)+1):(a=h-1,i=m-1,r=h,n=m,g=(p=o=c)+1),{width:r,height:n,x:a,y:i,z:o,x0:l,y0:d,z0:p,nx:h,ny:m,nz:g}}function se(e,t){var r=function(e,t){for(var r=e.cells.space,n=oe(e,t),a=n.width,i=n.height,o=n.x0,s=n.y0,u=n.z0,c=n.nx,l=n.ny,d=n.nz,p=new Uint32Array(a*i),f=0,h=s;ht.maxTextureSize/2)throw new Error("volume too large for direct-volume rendering");var c=Object(k.a)(r,"normals"),l=o.a.getGridToCartesianTransform(r.grid),d=ge(a,l),p=n?n.gridTexture.ref.value:t.resources.texture("image-uint8","rgba","ubyte","linear");p.load(c);var f=ve(r.grid),h=f.unitToCartn,m=f.cellDim;return me.a.create(d,a,l,h,m,p,r.grid.stats,!1,n)}function ve(e){if("matrix"===e.transform.kind)return{unitToCartn:T.c.mul(Object(T.c)(),e.transform.matrix,T.c.fromScaling(Object(T.c)(),e.cells.space.dimensions)),cellDim:T.c.getScaling(Object(T.g)(),e.transform.matrix)};var t=e.transform.fractionalBox,r=he.b.size(Object(T.g)(),t);return{unitToCartn:T.c.mul3(Object(T.c)(),e.transform.cell.fromFractional,T.c.fromTranslation(Object(T.c)(),t.min),T.c.fromScaling(Object(T.c)(),r)),cellDim:T.g.div(Object(T.g)(),e.transform.cell.size,e.cells.space.dimensions)}}function ye(e,t,r,n){var a=r.grid.cells.space.dimensions;if(Math.max.apply(Math,a)>t.max3dTextureSize/2)throw new Error("volume too large for direct-volume rendering");var i=Object(k.b)(r),s=o.a.getGridToCartesianTransform(r.grid),u=ge(a,s),c=n?n.gridTexture.ref.value:t.resources.texture("volume-uint8","rgba","ubyte","linear");c.load(i);var l=ve(r.grid),d=l.unitToCartn,p=l.cellDim;return me.a.create(u,a,s,d,p,c,r.grid.stats,!1,n)}function xe(e,t,r,a,i){return Object(n.b)(this,void 0,void 0,(function(){var r;return Object(n.d)(this,(function(n){if(e.runtime,void 0===(r=e.webgl))throw new Error("DirectVolumeVisual requires `webgl` in props");return[2,r.isWebGL2?ye(0,r,t,i):be(0,r,t,i)]}))}))}function Oe(e,t){return"isosurface"===t.renderMode.name?o.b.Isosurface.Loci(e,t.renderMode.params.isoValue):o.b.Loci(e)}function je(e,t,r,n){var a=e.objectId,i=e.groupId;return n===a?o.b.Cell.Loci(t,m.b.ofSingleton(i)):h.b}function Se(e,t,r,n){var a="isosurface"===r.renderMode.name?r.renderMode.params.isoValue:void 0;return Object(k.c)(e,t,a,n)}var _e=Object(n.a)(Object(n.a)({},me.a.Params),{quality:Object(n.a)(Object(n.a)({},me.a.Params.quality),{isEssential:!1})});function we(e){return w({defaultProps:i.a.getDefaultValues(_e),createGeometry:xe,createLocationIterator:function(e){return Object(A.a)(e.grid.cells.data.length,1,1,(function(){return E.b}))},getLoci:je,eachLocation:Se,setUpdateState:function(e,t,r,n){},geometryUtils:me.a.Utils,dispose:function(e){e.gridTexture.ref.value.destroy()}},e)}var Ce={name:"direct-volume",label:"Direct Volume",description:"Direct rendering of volumetric data.",factory:function(e,t){return C("Direct Volume",e,t,we,Oe)},getParams:function(e,t){var r=i.a.clone(_e);return r.renderMode=me.a.createRenderModeParam(t.grid.stats),r},defaultValues:i.a.getDefaultValues(_e),defaultColorTheme:{name:"uniform"},defaultSizeTheme:{name:"uniform"},isApplicable:function(e){return!o.b.isEmpty(e)}},Ae=function(e){function t(){var r=e.call(this)||this;return Object(ee.c)(t.BuiltIn,(function(e,t){if(e.name!==t)throw new Error("Fix BuiltInVolumeRepresentations to have matching names. "+e.name+" "+t);r.add(e)})),r}return Object(n.c)(t,e),t}(a.b);(Ae||(Ae={})).BuiltIn={isosurface:$,slice:fe,"direct-volume":Ce}},function(e,t,r){"use strict";r.d(t,"a",(function(){return _}));var n=r(572),a=r(964),i=r(668),o=r(615),s=r(624),u=r(618),c=r(625),l=r(577),d=r(574),p=r(694),f=r(910),h=r(627),m=Object(n.a)(Object(n.a)({},i.b),{tWboitA:Object(o.i)("texture","rgba","float","nearest"),tWboitB:Object(o.i)("texture","rgba","float","nearest"),uTexSize:Object(o.j)("v2")}),g=Object(u.g)("evaluate-wboit",p.a,"\nprecision highp float;\n\nuniform sampler2D tWboitA;\nuniform sampler2D tWboitB;\nuniform vec2 uTexSize;\n\nvoid main() {\n vec2 coords = gl_FragCoord.xy / uTexSize;\n\n vec4 accum = texture2D(tWboitA, coords);\n float r = 1.0 - accum.a;\n\n accum.a = texture2D(tWboitB, coords).r;\n // divisor needs to allow very small values for nice fading\n gl_FragColor = vec4(accum.rgb / clamp(accum.a, 0.00000001, 50000.0), r);\n}\n");var b=function(){function e(t,r,a){if(this.webgl=t,this._supported=!1,e.isSupported(t)){var o,u,p,f,h,b,v=t.resources;this.textureA=v.texture("image-float32","rgba","float","nearest"),this.textureA.define(r,a),this.textureB=v.texture("image-float32","rgba","float","nearest"),this.textureB.define(r,a),this.renderable=(o=t,u=this.textureA,p=this.textureB,f=Object(n.a)(Object(n.a)({},i.c),{tWboitA:l.e.create(u),tWboitB:l.e.create(p),uTexSize:l.e.create(d.f.create(u.getWidth(),u.getHeight()))}),h=Object(n.a)({},m),b=Object(c.a)(o,"triangles",g,h,f),Object(s.a)(b,f)),this.framebuffer=v.framebuffer(),this._supported=!0,this._init()}}return Object.defineProperty(e.prototype,"supported",{get:function(){return this._supported},enumerable:!1,configurable:!0}),e.prototype.bind=function(){var e=this.webgl,t=e.state,r=e.gl;this.framebuffer.bind(),t.clearColor(0,0,0,1),r.clear(r.COLOR_BUFFER_BIT),t.disable(r.DEPTH_TEST),t.blendFuncSeparate(r.ONE,r.ONE,r.ZERO,r.ONE_MINUS_SRC_ALPHA),t.enable(r.BLEND)},e.prototype.render=function(){var e=this.webgl,t=e.state,r=e.gl;t.blendFuncSeparate(r.SRC_ALPHA,r.ONE_MINUS_SRC_ALPHA,r.ONE,r.ONE_MINUS_SRC_ALPHA),t.enable(r.BLEND),this.renderable.update(),this.renderable.render()},e.prototype.setSize=function(e,t){var r=this.renderable.values.uTexSize.ref.value,n=r[0],a=r[1];e===n&&t===a||(this.textureA.define(e,t),this.textureB.define(e,t),l.e.update(this.renderable.values.uTexSize,d.f.set(this.renderable.values.uTexSize.ref.value,e,t)))},e.prototype.reset=function(){this._supported&&this._init()},e.prototype._init=function(){var e=this.webgl.extensions.drawBuffers;this.framebuffer.bind(),e.drawBuffers([e.COLOR_ATTACHMENT0,e.COLOR_ATTACHMENT1]),this.textureA.attachFramebuffer(this.framebuffer,"color0"),this.textureB.attachFramebuffer(this.framebuffer,"color1")},e.isSupported=function(e){var t=e.extensions,r=t.drawBuffers,n=t.textureFloat,a=t.colorBufferFloat,i=t.depthTexture;if(n&&a&&i&&r)return!0;if(h.a){var o=[];n||o.push("textureFloat"),a||o.push("colorBufferFloat"),i||o.push("depthTexture"),r||o.push("drawBuffers"),console.log('Missing "'+o.join('", "')+'" extensions required for "wboit"')}return!1},e}(),v=r(914),y=Object(n.a)(Object(n.a)({},i.b),{tDepthPrimitives:Object(o.i)("texture","depth","ushort","nearest"),tDepthVolumes:Object(o.i)("texture","depth","ushort","nearest"),uTexSize:Object(o.j)("v2"),dPackedDepth:Object(o.c)("boolean")}),x=Object(u.g)("depth-merge",p.a,"\nprecision highp float;\nprecision highp sampler2D;\n\nuniform sampler2D tDepthPrimitives;\nuniform sampler2D tDepthVolumes;\nuniform vec2 uTexSize;\n\n#include common\n\nfloat getDepth(const in vec2 coords, sampler2D tDepth) {\n #ifdef dPackedDepth\n return unpackRGBAToDepth(texture2D(tDepth, coords));\n #else\n return texture2D(tDepth, coords).r;\n #endif\n}\n\nvoid main() {\n vec2 coords = gl_FragCoord.xy / uTexSize;\n float depth = min(getDepth(coords, tDepthPrimitives), getDepth(coords, tDepthVolumes));\n gl_FragColor = packDepthToRGBA(depth);\n}\n");var O=Object(n.a)(Object(n.a)({},i.b),{tColor:Object(o.i)("texture","rgba","ubyte","nearest"),uTexSize:Object(o.j)("v2")}),j=Object(u.g)("copy",p.a,"\nprecision highp float;\nprecision highp sampler2D;\n\nuniform sampler2D tColor;\nuniform vec2 uTexSize;\n\nvoid main() {\n vec2 coords = gl_FragCoord.xy / uTexSize;\n gl_FragColor = texture2D(tColor, coords);\n}\n");function S(e,t){var r=Object(n.a)(Object(n.a)({},i.c),{tColor:l.e.create(t),uTexSize:l.e.create(d.f.create(t.getWidth(),t.getHeight()))}),a=Object(n.a)({},O),o=Object(c.a)(e,"triangles",j,a,r);return Object(s.a)(o,r)}var _=function(){function e(e,t,r,o){this.webgl=e;var u,p,f,h,m,g,O,j=e.extensions,_=e.resources,w=e.isWebGL2;this.drawTarget=Object(a.a)(e.gl),this.colorTarget=e.createRenderTarget(t,r,!0,"uint8","linear"),this.packedDepth=!j.depthTexture,this.depthTarget=e.createRenderTarget(t,r),this.depthTexture=this.depthTarget.texture,this.depthTargetPrimitives=this.packedDepth?e.createRenderTarget(t,r):null,this.depthTargetVolumes=this.packedDepth?e.createRenderTarget(t,r):null,this.depthTexturePrimitives=this.depthTargetPrimitives?this.depthTargetPrimitives.texture:_.texture("image-depth","depth",w?"float":"ushort","nearest"),this.depthTextureVolumes=this.depthTargetVolumes?this.depthTargetVolumes.texture:_.texture("image-depth","depth",w?"float":"ushort","nearest"),this.packedDepth||(this.depthTexturePrimitives.define(t,r),this.depthTextureVolumes.define(t,r)),this.depthMerge=(u=e,p=this.depthTexturePrimitives,f=this.depthTextureVolumes,h=this.packedDepth,m=Object(n.a)(Object(n.a)({},i.c),{tDepthPrimitives:l.e.create(p),tDepthVolumes:l.e.create(f),uTexSize:l.e.create(d.f.create(p.getWidth(),p.getHeight())),dPackedDepth:l.e.create(h)}),g=Object(n.a)({},y),O=Object(c.a)(u,"triangles",x,g,m),Object(s.a)(O,m)),this.wboit=o?new b(e,t,r):void 0,this.postprocessing=new v.c(e,this),this.antialiasing=new v.a(e,this),this.copyFboTarget=S(e,this.colorTarget.texture),this.copyFboPostprocessing=S(e,this.postprocessing.target.texture)}return Object.defineProperty(e.prototype,"wboitEnabled",{get:function(){var e;return!!(null===(e=this.wboit)||void 0===e?void 0:e.supported)},enumerable:!1,configurable:!0}),e.prototype.reset=function(){var e;null===(e=this.wboit)||void 0===e||e.reset()},e.prototype.setSize=function(e,t){var r,n=this.colorTarget.getWidth(),a=this.colorTarget.getHeight();e===n&&t===a||(this.colorTarget.setSize(e,t),this.depthTarget.setSize(e,t),this.depthTargetPrimitives?this.depthTargetPrimitives.setSize(e,t):this.depthTexturePrimitives.define(e,t),this.depthTargetVolumes?this.depthTargetVolumes.setSize(e,t):this.depthTextureVolumes.define(e,t),l.e.update(this.depthMerge.values.uTexSize,d.f.set(this.depthMerge.values.uTexSize.ref.value,e,t)),l.e.update(this.copyFboTarget.values.uTexSize,d.f.set(this.copyFboTarget.values.uTexSize.ref.value,e,t)),l.e.update(this.copyFboPostprocessing.values.uTexSize,d.f.set(this.copyFboPostprocessing.values.uTexSize.ref.value,e,t)),(null===(r=this.wboit)||void 0===r?void 0:r.supported)&&this.wboit.setSize(e,t),this.postprocessing.setSize(e,t),this.antialiasing.setSize(e,t))},e.prototype._depthMerge=function(){var e=this.webgl,t=e.state,r=e.gl;this.depthMerge.update(),this.depthTarget.bind(),t.disable(r.BLEND),t.disable(r.DEPTH_TEST),t.disable(r.CULL_FACE),t.depthMask(!1),t.clearColor(1,1,1,1),r.clear(r.COLOR_BUFFER_BIT),this.depthMerge.render()},e.prototype._renderWboit=function(e,t,r,n,a){var i;if(!(null===(i=this.wboit)||void 0===i?void 0:i.supported))throw new Error("expected wboit to be supported");this.colorTarget.bind(),e.clear(!0),this.depthTexturePrimitives.attachFramebuffer(this.colorTarget.framebuffer,"depth"),this.colorTarget.bind(),e.clearDepth(),e.renderWboitOpaque(r.primitives,t,null),this.depthTextureVolumes.attachFramebuffer(this.colorTarget.framebuffer,"depth"),this.colorTarget.bind(),e.clearDepth(),e.renderWboitOpaque(r.volumes,t,this.depthTexturePrimitives),this._depthMerge(),v.c.isEnabled(a)&&this.postprocessing.render(t,!1,n,e.props.backgroundColor,a),this.wboit.bind(),e.renderWboitTransparent(r.primitives,t,this.depthTexture),e.renderWboitTransparent(r.volumes,t,this.depthTexture),v.c.isEnabled(a)?(this.depthTexturePrimitives.attachFramebuffer(this.postprocessing.target.framebuffer,"depth"),this.postprocessing.target.bind()):(this.depthTexturePrimitives.attachFramebuffer(this.colorTarget.framebuffer,"depth"),this.colorTarget.bind()),this.wboit.render()},e.prototype._renderBlended=function(e,t,r,n,a,i){if(n?this.drawTarget.bind():(this.colorTarget.bind(),this.packedDepth||this.depthTexturePrimitives.attachFramebuffer(this.colorTarget.framebuffer,"depth")),e.clear(!0),e.renderBlendedOpaque(r.primitives,t,null),!n){this.depthTargetPrimitives&&(this.depthTargetPrimitives.bind(),e.clear(!1),e.renderDepth(r.primitives,t,null),this.colorTarget.bind()),this.packedDepth||(this.depthTextureVolumes.attachFramebuffer(this.colorTarget.framebuffer,"depth"),e.clearDepth()),e.renderBlendedVolumeOpaque(r.volumes,t,this.depthTexturePrimitives),this.depthTargetVolumes&&(this.depthTargetVolumes.bind(),e.clear(!1),e.renderDepth(r.volumes,t,this.depthTexturePrimitives),this.colorTarget.bind()),this._depthMerge(),this.colorTarget.bind(),v.c.isEnabled(i)&&this.postprocessing.render(t,!1,a,e.props.backgroundColor,i),e.renderBlendedVolumeTransparent(r.volumes,t,this.depthTexturePrimitives);var o=v.c.isEnabled(i)?this.postprocessing.target:this.colorTarget;this.packedDepth||this.depthTexturePrimitives.attachFramebuffer(o.framebuffer,"depth"),o.bind()}e.renderBlendedTransparent(r.primitives,t,null)},e.prototype._render=function(e,t,r,n,a,i,o){var s=r.volumes.renderables.length>0,u=v.c.isEnabled(o),c=v.a.isEnabled(o),l=t.viewport,d=l.x,p=l.y,f=l.width,h=l.height;e.setViewport(d,p,f,h),e.update(t),i&&!c&&a&&(this.drawTarget.bind(),e.clear(!1)),this.wboitEnabled?this._renderWboit(e,t,r,i,o):this._renderBlended(e,t,r,!s&&!u&&!c&&a,i,o),u?this.postprocessing.target.bind():!a||s||this.wboitEnabled?this.colorTarget.bind():this.drawTarget.bind(),n.debug.isEnabled&&(n.debug.syncVisibility(),e.renderBlended(n.debug.scene,t,null)),n.handle.isEnabled&&e.renderBlended(n.handle.scene,t,null),n.camera.isEnabled&&(n.camera.update(t),e.update(n.camera.camera),e.renderBlended(n.camera.scene,n.camera.camera,null)),c?this.antialiasing.render(t,a,o):a&&(this.drawTarget.bind(),this.webgl.state.disable(this.webgl.gl.DEPTH_TEST),u?this.copyFboPostprocessing.render():(s||this.wboitEnabled)&&this.copyFboTarget.render()),this.webgl.gl.flush()},e.prototype.render=function(e,t,r,n,a,i,o){e.setTransparentBackground(i),e.setDrawingBufferSize(this.colorTarget.getWidth(),this.colorTarget.getHeight()),f.a.is(t)?(this._render(e,t.left,r,n,a,i,o),this._render(e,t.right,r,n,a,i,o)):this._render(e,t,r,n,a,i,o)},e.prototype.getColorTarget=function(e){return v.a.isEnabled(e)?this.antialiasing.target:v.c.isEnabled(e)?this.postprocessing.target:this.colorTarget},e}()},function(e,t,r){"use strict";r.d(t,"a",(function(){return R}));var n=r(572),a=r(573),i=r(591),o=r(633),s=r(575),u=r(574),c=r(584),l=r(576),d=r(589),p=r(766),f=r(693),h=r(611),m=r(607),g=r(848),b=r(578);function v(e,t,r,a,i,o){return Object(n.b)(this,void 0,void 0,(function(){var c,h,m,g,v,y,x,O,j,S,_,w,C,A,E,P,T,I,k;return Object(n.d)(this,(function(n){return s.n.isAtomic(t)?(c=r.child,h=null==c?void 0:c.unitMap.get(t.id),c&&!h?[2,d.a.createEmpty(o)]:(m=s.h.Location.create(r,t),g=p.a.get(r).value,v=g.unitsFeatures.get(t.id),y=g.unitsContacts.get(t.id),x=v.x,O=v.y,j=v.z,S=v.members,_=v.offsets,w=y.edgeCount,C=y.a,A=y.b,E=y.edgeProps.flag,P=i.sizeFactor,w?(T={linkCount:2*w,position:function(e,t,r){u.g.set(e,x[C[r]],O[C[r]],j[C[r]]),u.g.set(t,x[A[r]],O[A[r]],j[A[r]])},style:function(e){return 1},radius:function(e){m.element=t.elements[S[_[C[e]]]];var r=a.size.size(m);m.element=t.elements[S[_[A[e]]]];var n=a.size.size(m);return Math.min(r,n)*P},ignore:function(e){return 1===E[e]||!!h&&!l.f.has(h.elements,t.elements[S[_[C[e]]]])}},I=Object(f.d)(e,T,i,o),k=b.g.expand(Object(b.g)(),(null!=h?h:t).boundary.sphere,1*P),I.setBoundingSphere(k),[2,I]):[2,d.a.createEmpty(o)])):[2,d.a.createEmpty(o)]}))}))}var y=Object(n.a)(Object(n.a)(Object(n.a)({},h.g),f.a),{sizeFactor:a.a.Numeric(.3,{min:0,max:10,step:.01}),dashCount:a.a.Numeric(6,{min:2,max:10,step:2}),dashScale:a.a.Numeric(.4,{min:0,max:2,step:.1}),includeParent:a.a.Boolean(!1)});function x(e){return Object(h.h)({defaultProps:a.a.getDefaultValues(y),createGeometry:v,createLocationIterator:S,getLoci:O,eachLocation:j,setUpdateState:function(e,t,r,n,a,i,o){e.createGeometry=t.sizeFactor!==r.sizeFactor||t.dashCount!==r.dashCount||t.dashScale!==r.dashScale||t.dashCap!==r.dashCap||t.radialSegments!==r.radialSegments;var s=p.a.get(i.structure).version;e.info.interactionsHash!==s&&(e.createGeometry=!0,e.updateTransform=!0,e.updateColor=!0,e.info.interactionsHash=s)}},e)}function O(e,t,r){var n=e.objectId,a=e.instanceId,i=e.groupId;if(r===n){var o=t.structure,s=t.group,u=o.unitMap.get(s.units[a].id),l=p.a.get(o).value,d=l.unitsContacts.get(u.id),f=d.a,h=d.b;return g.a.Loci(o,l,[{unitA:u,indexA:f[i],unitB:u,indexB:h[i]},{unitA:u,indexA:h[i],unitB:u,indexB:f[i]}])}return c.b}function j(e,t,r,n){var a=!1;if(g.a.isLoci(e)){var i=t.structure,o=t.group;if(!s.g.areEquivalent(e.data.structure,i))return!1;var u=p.a.get(i).value;if(e.data.interactions!==u)return!1;for(var c=o.units[0],d=2*(v=u.unitsContacts.get(c.id)).edgeCount,f=0,h=e.elements;f0&&p.a.isApplicable(e)},ensureCustomProperties:{attach:function(e,t){return p.a.attach(e,t,void 0,!0)},detach:function(e){return p.a.ref(e,!1)}},getData:function(e,t){return t.includeParent?e.asParent():e},mustRecreate:function(e,t){return e.includeParent!==t.includeParent}})},function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n={HIS:"H",ARG:"R",LYS:"K",ILE:"I",PHE:"F",LEU:"L",TRP:"W",ALA:"A",MET:"M",PRO:"P",CYS:"C",ASN:"N",VAL:"V",GLY:"G",SER:"S",GLN:"Q",TYR:"Y",ASP:"D",GLU:"E",THR:"T",SEC:"U",PYL:"O",HSD:"H",HSE:"H",HSP:"H",LSN:"K",ASPP:"D",GLUP:"E",HID:"H",HIE:"H",HIP:"H",LYN:"K",ASH:"D",GLH:"E"},a={DA:"A",DC:"C",DG:"G",DT:"T",DU:"U"},i={A:"A",C:"C",G:"G",T:"T",U:"U"};function o(e){return n[e]||"X"}function s(e){return i[e]||"X"}function u(e){return a[e]||"X"}var c,l=r(580);!function(e){e.getSequenceString=function(e){var t=e.code.toArray();return(t instanceof Array?t:Array.from(t)).join("")},e.ofResidueNames=function(e,r){if(0===r.rowCount)throw new Error("cannot be empty");var n=function(e){for(var t=0,r=Math.min(e.rowCount,10);t0?function(e){var n=r(e);return"X"===n&&t.has(e)?r(t.get(e)):n}:r}(e),a=[],i=[],c=[],d=new Map,p=0,f=new Map,h=0,m=r.rowCount;h0?[4,new Promise((function(e){t.onChildrenFinished=e}))]:[3,5]):[3,6];case 4:a.sent(),a.label=5;case 5:e.onAbort&&e.onAbort(),a.label=6;case 6:throw u.a&&console.error(s),s;case 7:return[2]}}))}))}function y(e){throw e.abortToken.treeAborted||(e.abortToken.treeAborted=!0,function e(t){var r=t.progress;r.isIndeterminate=!0,r.canAbort=!1,r.message="Aborting...";for(var n=0,a=t.children;nthis.info.updateRateMs},enumerable:!1,configurable:!0}),e.prototype.updateProgress=function(e){if(this.checkAborted(),e){var t=this.node.progress;"string"==typeof e?(t.message=e,t.isIndeterminate=!0):(void 0!==e.canAbort&&(t.canAbort=e.canAbort),void 0!==e.message&&(t.message=e.message),void 0!==e.current&&(t.current=e.current),void 0!==e.max&&(t.max=e.max),t.isIndeterminate=void 0===t.current||void 0===t.max,void 0!==e.isIndeterminate&&(t.isIndeterminate=e.isIndeterminate))}},e.prototype.update=function(e,t){if(this.lastUpdatedTime=Object(o.b)(),this.updateProgress(e),!t)return x(this.info,this.lastUpdatedTime),this.checkAborted(),s.a.immediatePromise()},e.prototype.runChild=function(t,r){return Object(a.b)(this,void 0,void 0,(function(){var n,o,s,u,c,l,d;return Object(a.d)(this,(function(a){switch(a.label){case 0:this.updateProgress(r),n={progress:h(t),children:[]},(o=this.node.children).push(n),s=new e(this.info,n),a.label=1;case 1:return a.trys.push([1,3,4,5]),[4,v(t,s)];case 2:return[2,a.sent()];case 3:if(u=a.sent(),i.a.isAbort(u)&&this.isAborted)return[2,void 0];throw u;case 4:if((c=o.indexOf(n))>=0){for(l=c,d=o.length-1;ln&&(this.currentX=0,this.currentY+=this.scratchH),this.currentY+this.scratchH>a)return console.warn("canvas to small"),this.placeholder;this.mapped[e]={x:this.currentX,y:this.currentY,w:this.scratchW,h:this.scratchH,nw:this.scratchW/this.lineHeight,nh:this.scratchH/this.lineHeight};for(var o=0;o>2,o=new Uint8Array(a),s=new Uint32Array(o.buffer,0,i),u=0,c=0;c0?1:-1}),Number.isInteger||(Number.isInteger=function(e){return"number"==typeof e&&isFinite(e)&&e>-9007199254740992&&e<9007199254740992&&Math.floor(e)===e}),Number.isNaN||(Number.isNaN=function(e){return e!=e}),Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(null==e)throw new TypeError("Cannot convert first argument to object");for(var t,r=Object(e),n=!1,a=1;a1?arguments[1]:void 0,s=o?Number(o):0;Number.isNaN(s)&&(s=0);var u=Math.min(Math.max(s,0),r);if(i+u>r)return!1;for(var c=-1;++cr.length)&&(t=r.length),t-=e.length;var n=r.indexOf(e,t);return-1!==n&&n===t}),String.prototype.repeat||(String.prototype.repeat=function(e){if(null===this)throw new TypeError("can't convert "+this+" to object");var t=""+this;if(e=+e,Number.isNaN(e)&&(e=0),e<0)throw new RangeError("repeat count must be non-negative");if(e===1/0)throw new RangeError("repeat count must be less than infinity");if(e=Math.floor(e),0===t.length||0===e)return"";if(t.length*e>=1<<28)throw new RangeError("repeat count must not overflow maximum string size");for(var r="";1==(1&e)&&(r+=t),0!==(e>>>=1);)t+=t;return r}),String.prototype.includes||(String.prototype.includes=function(e,t){return"number"!=typeof t&&(t=0),!(t+e.length>this.length)&&-1!==this.indexOf(e,t)}),Array.prototype.includes||(Array.prototype.includes=function(e){if(null==this)throw new TypeError("Array.prototype.includes called on null or undefined");var t=Object(this),r=parseInt(t.length,10)||0;if(0===r)return!1;var n,a,i=parseInt(arguments[1],10)||0;for(i>=0?n=i:(n=r+i)<0&&(n=0);n0?1:-1)*Math.floor(Math.abs(t)):t}(e);return Math.min(Math.max(t,0),u)},function(e){var t=this,r=Object(e);if(null==e)throw new TypeError("Array.from requires an array-like object - not null or undefined");var n,a=arguments.length>1?arguments[1]:void 0;if(void 0!==a){if(!s(a))throw new TypeError("Array.from: when provided, the second argument must be a function");arguments.length>2&&(n=arguments[2])}for(var i,o=c(r.length),u=s(t)?Object(new t(o)):new Array(o),l=0;l>>0;if("function"!=typeof e)throw TypeError("predicate must be a function");for(var n=arguments[1],a=0;a>>0,n=arguments[1],a=n>>0,i=a<0?Math.max(r+a,0):Math.min(a,r),o=arguments[2],s=void 0===o?r:o>>0,u=s<0?Math.max(r+s,0):Math.min(s,r);i>>0,a=e>>0,i=a<0?Math.max(n+a,0):Math.min(a,n),o=t>>0,s=o<0?Math.max(n+o,0):Math.min(o,n),u=arguments[2],c=void 0===u?n:u>>0,l=c<0?Math.max(n+c,0):Math.min(c,n),d=Math.min(l-s,n-i),p=1;for(s0;)s in r?r[i]=r[s]:delete r[i],s+=p,i+=p,d--;return r},configurable:!0,writable:!0}),Int8Array.prototype.copyWithin||Object.defineProperty(Int8Array.prototype,"copyWithin",{value:Array.prototype.copyWithin}),Int16Array.prototype.copyWithin||Object.defineProperty(Int16Array.prototype,"copyWithin",{value:Array.prototype.copyWithin}),Int32Array.prototype.copyWithin||Object.defineProperty(Int32Array.prototype,"copyWithin",{value:Array.prototype.copyWithin}),Uint8Array.prototype.copyWithin||Object.defineProperty(Uint8Array.prototype,"copyWithin",{value:Array.prototype.copyWithin}),Uint16Array.prototype.copyWithin||Object.defineProperty(Uint16Array.prototype,"copyWithin",{value:Array.prototype.copyWithin}),Uint32Array.prototype.copyWithin||Object.defineProperty(Uint32Array.prototype,"copyWithin",{value:Array.prototype.copyWithin}),Float32Array.prototype.copyWithin||Object.defineProperty(Float32Array.prototype,"copyWithin",{value:Array.prototype.copyWithin}),Float64Array.prototype.copyWithin||Object.defineProperty(Float64Array.prototype,"copyWithin",{value:Array.prototype.copyWithin})},function(e,t,r){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE){0;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}}(),e.exports=r(1053)},function(e,t,r){"use strict"; +/** @license React v17.0.2 + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var a=r(0),i=r(113),o=r(1054);function s(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;rt}return!1}function v(e,t,r,n,a,i,o){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=n,this.attributeNamespace=a,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=o}var y={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){y[e]=new v(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];y[t]=new v(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){y[e]=new v(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){y[e]=new v(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){y[e]=new v(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){y[e]=new v(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){y[e]=new v(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){y[e]=new v(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){y[e]=new v(e,5,!1,e.toLowerCase(),null,!1,!1)}));var x=/[\-:]([a-z])/g;function O(e){return e[1].toUpperCase()}function j(e,t,r,n){var a=y.hasOwnProperty(t)?y[t]:null;(null!==a?0===a.type:!n&&(2--u||i[s]!==o[u])return"\n"+i[s].replace(" at new "," at ")}while(1<=s&&0<=u);break}}}finally{W=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?q(e):""}function Y(e){switch(e.tag){case 5:return q(e.type);case 16:return q("Lazy");case 13:return q("Suspense");case 19:return q("SuspenseList");case 0:case 2:case 15:return e=X(e.type,!1);case 11:return e=X(e.type.render,!1);case 22:return e=X(e.type._render,!1);case 1:return e=X(e.type,!0);default:return""}}function K(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case C:return"Fragment";case w:return"Portal";case E:return"Profiler";case A:return"StrictMode";case k:return"Suspense";case M:return"SuspenseList"}if("object"===n(e))switch(e.$$typeof){case T:return(e.displayName||"Context")+".Consumer";case P:return(e._context.displayName||"Context")+".Provider";case I:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case D:return K(e.type);case B:return K(e._render);case R:t=e._payload,e=e._init;try{return K(e(t))}catch(e){}}return null}function Q(e){switch(n(e)){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function Z(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function J(e){e._valueTracker||(e._valueTracker=function(e){var t=Z(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==r&&"function"==typeof r.get&&"function"==typeof r.set){var a=r.get,i=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(e){n=""+e,i.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function $(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=Z(e)?e.checked?"true":"false":e.value),(e=n)!==r&&(t.setValue(e),!0)}function ee(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function te(e,t){var r=t.checked;return i({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=r?r:e._wrapperState.initialChecked})}function re(e,t){var r=null==t.defaultValue?"":t.defaultValue,n=null!=t.checked?t.checked:t.defaultChecked;r=Q(null!=t.value?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function ne(e,t){null!=(t=t.checked)&&j(e,"checked",t,!1)}function ae(e,t){ne(e,t);var r=Q(t.value),n=t.type;if(null!=r)"number"===n?(0===r&&""===e.value||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if("submit"===n||"reset"===n)return void e.removeAttribute("value");t.hasOwnProperty("value")?oe(e,t.type,r):t.hasOwnProperty("defaultValue")&&oe(e,t.type,Q(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function ie(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!("submit"!==n&&"reset"!==n||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}""!==(r=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==r&&(e.name=r)}function oe(e,t,r){"number"===t&&ee(e.ownerDocument)===e||(null==r?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}function se(e,t){return e=i({children:void 0},t),(t=function(e){var t="";return a.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(t.children))&&(e.children=t),e}function ue(e,t,r,n){if(e=e.options,t){t={};for(var a=0;a=r.length))throw Error(s(93));r=r[0]}t=r}null==t&&(t=""),r=t}e._wrapperState={initialValue:Q(r)}}function de(e,t){var r=Q(t.value),n=Q(t.defaultValue);null!=r&&((r=""+r)!==e.value&&(e.value=r),null==t.defaultValue&&e.defaultValue!==r&&(e.defaultValue=r)),null!=n&&(e.defaultValue=""+n)}function pe(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}var fe="http://www.w3.org/1999/xhtml",he="http://www.w3.org/2000/svg";function me(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ge(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?me(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var be,ve=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,r,n,a){MSApp.execUnsafeLocalFunction((function(){return e(t,r)}))}:e}((function(e,t){if(e.namespaceURI!==he||"innerHTML"in e)e.innerHTML=t;else{for((be=be||document.createElement("div")).innerHTML=""+t.valueOf().toString()+"",t=be.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}}));function ye(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&3===r.nodeType)return void(r.nodeValue=t)}e.textContent=t}var xe={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Oe=["Webkit","ms","Moz","O"];function je(e,t,r){return null==t||"boolean"==typeof t||""===t?"":r||"number"!=typeof t||0===t||xe.hasOwnProperty(e)&&xe[e]?(""+t).trim():t+"px"}function Se(e,t){for(var r in e=e.style,t)if(t.hasOwnProperty(r)){var n=0===r.indexOf("--"),a=je(r,t[r],n);"float"===r&&(r="cssFloat"),n?e.setProperty(r,a):e[r]=a}}Object.keys(xe).forEach((function(e){Oe.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),xe[t]=xe[e]}))}));var _e=i({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function we(e,t){if(t){if(_e[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(s(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(s(60));if("object"!==n(t.dangerouslySetInnerHTML)||!("__html"in t.dangerouslySetInnerHTML))throw Error(s(61))}if(null!=t.style&&"object"!==n(t.style))throw Error(s(62))}}function Ce(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function Ae(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Ee=null,Pe=null,Te=null;function Ie(e){if(e=ea(e)){if("function"!=typeof Ee)throw Error(s(280));var t=e.stateNode;t&&(t=ra(t),Ee(e.stateNode,e.type,t))}}function ke(e){Pe?Te?Te.push(e):Te=[e]:Pe=e}function Me(){if(Pe){var e=Pe,t=Te;if(Te=Pe=null,Ie(e),t)for(e=0;e(n=31-qt(n))?0:1<r;r++)t.push(e);return t}function Gt(e,t,r){e.pendingLanes|=t;var n=t-1;e.suspendedLanes&=n,e.pingedLanes&=n,(e=e.eventTimes)[t=31-qt(t)]=r}var qt=Math.clz32?Math.clz32:function(e){return 0===e?32:31-(Wt(e)/Xt|0)|0},Wt=Math.log,Xt=Math.LN2;var Yt=o.unstable_UserBlockingPriority,Kt=o.unstable_runWithPriority,Qt=!0;function Zt(e,t,r,n){Ne||Be();var a=$t,i=Ne;Ne=!0;try{Re(a,e,t,r,n)}finally{(Ne=i)||ze()}}function Jt(e,t,r,n){Kt(Yt,$t.bind(null,e,t,r,n))}function $t(e,t,r,n){var a;if(Qt)if((a=0==(4&t))&&0=Rr),Nr=String.fromCharCode(32),Fr=!1;function zr(e,t){switch(e){case"keyup":return-1!==Mr.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ur(e){return"object"===n(e=e.detail)&&"data"in e?e.data:null}var Vr=!1;var Hr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Gr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Hr[e.type]:"textarea"===t}function qr(e,t,r,n){ke(n),0<(t=Dn(t,"onChange")).length&&(r=new fr("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var Wr=null,Xr=null;function Yr(e){Cn(e,0)}function Kr(e){if($(ta(e)))return e}function Qr(e,t){if("change"===e)return t}var Zr=!1;if(p){var Jr;if(p){var $r="oninput"in document;if(!$r){var en=document.createElement("div");en.setAttribute("oninput","return;"),$r="function"==typeof en.oninput}Jr=$r}else Jr=!1;Zr=Jr&&(!document.documentMode||9=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=dn(n)}}function fn(){for(var e=window,t=ee();t instanceof e.HTMLIFrameElement;){try{var r="string"==typeof t.contentWindow.location.href}catch(e){r=!1}if(!r)break;t=ee((e=t.contentWindow).document)}return t}function hn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var mn=p&&"documentMode"in document&&11>=document.documentMode,gn=null,bn=null,vn=null,yn=!1;function xn(e,t,r){var n=r.window===r?r.document:9===r.nodeType?r:r.ownerDocument;yn||null==gn||gn!==ee(n)||("selectionStart"in(n=gn)&&hn(n)?n={start:n.selectionStart,end:n.selectionEnd}:n={anchorNode:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset},vn&&ln(vn,n)||(vn=n,0<(n=Dn(bn,"onSelect")).length&&(t=new fr("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=gn)))}Bt("cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),Bt("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),Bt(Rt,2);for(var On="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),jn=0;jnia||(e.current=aa[ia],aa[ia]=null,ia--)}function ua(e,t){ia++,aa[ia]=e.current,e.current=t}var ca={},la=oa(ca),da=oa(!1),pa=ca;function fa(e,t){var r=e.type.contextTypes;if(!r)return ca;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var a,i={};for(a in r)i[a]=t[a];return n&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function ha(e){return null!=(e=e.childContextTypes)}function ma(){sa(da),sa(la)}function ga(e,t,r){if(la.current!==ca)throw Error(s(168));ua(la,t),ua(da,r)}function ba(e,t,r){var n=e.stateNode;if(e=t.childContextTypes,"function"!=typeof n.getChildContext)return r;for(var a in n=n.getChildContext())if(!(a in e))throw Error(s(108,K(t)||"Unknown",a));return i({},r,n)}function va(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ca,pa=la.current,ua(la,e),ua(da,da.current),!0}function ya(e,t,r){var n=e.stateNode;if(!n)throw Error(s(169));r?(e=ba(e,t,pa),n.__reactInternalMemoizedMergedChildContext=e,sa(da),sa(la),ua(la,e)):sa(da),ua(da,r)}var xa=null,Oa=null,ja=o.unstable_runWithPriority,Sa=o.unstable_scheduleCallback,_a=o.unstable_cancelCallback,wa=o.unstable_shouldYield,Ca=o.unstable_requestPaint,Aa=o.unstable_now,Ea=o.unstable_getCurrentPriorityLevel,Pa=o.unstable_ImmediatePriority,Ta=o.unstable_UserBlockingPriority,Ia=o.unstable_NormalPriority,ka=o.unstable_LowPriority,Ma=o.unstable_IdlePriority,Da={},Ra=void 0!==Ca?Ca:function(){},Ba=null,La=null,Na=!1,Fa=Aa(),za=1e4>Fa?Aa:function(){return Aa()-Fa};function Ua(){switch(Ea()){case Pa:return 99;case Ta:return 98;case Ia:return 97;case ka:return 96;case Ma:return 95;default:throw Error(s(332))}}function Va(e){switch(e){case 99:return Pa;case 98:return Ta;case 97:return Ia;case 96:return ka;case 95:return Ma;default:throw Error(s(332))}}function Ha(e,t){return e=Va(e),ja(e,t)}function Ga(e,t,r){return e=Va(e),Sa(e,t,r)}function qa(){if(null!==La){var e=La;La=null,_a(e)}Wa()}function Wa(){if(!Na&&null!==Ba){Na=!0;var e=0;try{var t=Ba;Ha(99,(function(){for(;ep?(g=d,d=null):g=d.sibling;var b=h(n,d,s[p],u);if(null===b){null===d&&(d=g);break}e&&d&&null===b.alternate&&t(n,d),i=o(b,i,p),null===l?c=b:l.sibling=b,l=b,d=g}if(p===s.length)return r(n,d),c;if(null===d){for(;pg?(b=p,p=null):b=p.sibling;var y=h(n,p,v.value,c);if(null===y){null===p&&(p=b);break}e&&p&&null===y.alternate&&t(n,p),i=o(y,i,g),null===d?l=y:d.sibling=y,d=y,p=b}if(v.done)return r(n,p),l;if(null===p){for(;!v.done;g++,v=u.next())null!==(v=f(n,v.value,c))&&(i=o(v,i,g),null===d?l=v:d.sibling=v,d=v);return l}for(p=a(n,p);!v.done;g++,v=u.next())null!==(v=m(p,n,g,v.value,c))&&(e&&null!==v.alternate&&p.delete(null===v.key?g:v.key),i=o(v,i,g),null===d?l=v:d.sibling=v,d=v);return e&&p.forEach((function(e){return t(n,e)})),l}return function(e,a,o,c){var l="object"===n(o)&&null!==o&&o.type===C&&null===o.key;l&&(o=o.props.children);var d="object"===n(o)&&null!==o;if(d)switch(o.$$typeof){case _:e:{for(d=o.key,l=a;null!==l;){if(l.key===d){switch(l.tag){case 7:if(o.type===C){r(e,l.sibling),(a=i(l,o.props.children)).return=e,e=a;break e}break;default:if(l.elementType===o.type){r(e,l.sibling),(a=i(l,o.props)).ref=xi(e,l,o),a.return=e,e=a;break e}}r(e,l);break}t(e,l),l=l.sibling}o.type===C?((a=Hu(o.props.children,e.mode,c,o.key)).return=e,e=a):((c=Vu(o.type,o.key,o.props,null,e.mode,c)).ref=xi(e,a,o),c.return=e,e=c)}return u(e);case w:e:{for(l=o.key;null!==a;){if(a.key===l){if(4===a.tag&&a.stateNode.containerInfo===o.containerInfo&&a.stateNode.implementation===o.implementation){r(e,a.sibling),(a=i(a,o.children||[])).return=e,e=a;break e}r(e,a);break}t(e,a),a=a.sibling}(a=Wu(o,e.mode,c)).return=e,e=a}return u(e)}if("string"==typeof o||"number"==typeof o)return o=""+o,null!==a&&6===a.tag?(r(e,a.sibling),(a=i(a,o)).return=e,e=a):(r(e,a),(a=qu(o,e.mode,c)).return=e,e=a),u(e);if(yi(o))return g(e,a,o,c);if(G(o))return b(e,a,o,c);if(d&&Oi(e,o),void 0===o&&!l)switch(e.tag){case 1:case 22:case 0:case 11:case 15:throw Error(s(152,K(e.type)||"Component"))}return r(e,a)}}var Si=ji(!0),_i=ji(!1),wi={},Ci=oa(wi),Ai=oa(wi),Ei=oa(wi);function Pi(e){if(e===wi)throw Error(s(174));return e}function Ti(e,t){switch(ua(Ei,t),ua(Ai,e),ua(Ci,wi),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:ge(null,"");break;default:t=ge(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}sa(Ci),ua(Ci,t)}function Ii(){sa(Ci),sa(Ai),sa(Ei)}function ki(e){Pi(Ei.current);var t=Pi(Ci.current),r=ge(t,e.type);t!==r&&(ua(Ai,e),ua(Ci,r))}function Mi(e){Ai.current===e&&(sa(Ci),sa(Ai))}var Di=oa(0);function Ri(e){for(var t=e;null!==t;){if(13===t.tag){var r=t.memoizedState;if(null!==r&&(null===(r=r.dehydrated)||"$?"===r.data||"$!"===r.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(64&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Bi=null,Li=null,Ni=!1;function Fi(e,t){var r=Fu(5,null,null,0);r.elementType="DELETED",r.type="DELETED",r.stateNode=t,r.return=e,r.flags=8,null!==e.lastEffect?(e.lastEffect.nextEffect=r,e.lastEffect=r):e.firstEffect=e.lastEffect=r}function zi(e,t){switch(e.tag){case 5:var r=e.type;return null!==(t=1!==t.nodeType||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);case 13:default:return!1}}function Ui(e){if(Ni){var t=Li;if(t){var r=t;if(!zi(e,t)){if(!(t=qn(r.nextSibling))||!zi(e,t))return e.flags=-1025&e.flags|2,Ni=!1,void(Bi=e);Fi(Bi,r)}Bi=e,Li=qn(t.firstChild)}else e.flags=-1025&e.flags|2,Ni=!1,Bi=e}}function Vi(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;Bi=e}function Hi(e){if(e!==Bi)return!1;if(!Ni)return Vi(e),Ni=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!Un(t,e.memoizedProps))for(t=Li;t;)Fi(e,t),t=qn(t.nextSibling);if(Vi(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(s(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var r=e.data;if("/$"===r){if(0===t){Li=qn(e.nextSibling);break e}t--}else"$"!==r&&"$!"!==r&&"$?"!==r||t++}e=e.nextSibling}Li=null}}else Li=Bi?qn(e.stateNode.nextSibling):null;return!0}function Gi(){Li=Bi=null,Ni=!1}var qi=[];function Wi(){for(var e=0;ei))throw Error(s(301));i+=1,Ji=Zi=null,t.updateQueue=null,Xi.current=ko,e=r(n,a)}while(eo)}if(Xi.current=Po,t=null!==Zi&&null!==Zi.next,Ki=0,Ji=Zi=Qi=null,$i=!1,t)throw Error(s(300));return e}function ao(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Ji?Qi.memoizedState=Ji=e:Ji=Ji.next=e,Ji}function io(){if(null===Zi){var e=Qi.alternate;e=null!==e?e.memoizedState:null}else e=Zi.next;var t=null===Ji?Qi.memoizedState:Ji.next;if(null!==t)Ji=t,Zi=e;else{if(null===e)throw Error(s(310));e={memoizedState:(Zi=e).memoizedState,baseState:Zi.baseState,baseQueue:Zi.baseQueue,queue:Zi.queue,next:null},null===Ji?Qi.memoizedState=Ji=e:Ji=Ji.next=e}return Ji}function oo(e,t){return"function"==typeof t?t(e):t}function so(e){var t=io(),r=t.queue;if(null===r)throw Error(s(311));r.lastRenderedReducer=e;var n=Zi,a=n.baseQueue,i=r.pending;if(null!==i){if(null!==a){var o=a.next;a.next=i.next,i.next=o}n.baseQueue=a=i,r.pending=null}if(null!==a){a=a.next,n=n.baseState;var u=o=i=null,c=a;do{var l=c.lane;if((Ki&l)===l)null!==u&&(u=u.next={lane:0,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null}),n=c.eagerReducer===e?c.eagerState:e(n,c.action);else{var d={lane:l,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null};null===u?(o=u=d,i=n):u=u.next=d,Qi.lanes|=l,Bs|=l}c=c.next}while(null!==c&&c!==a);null===u?i=n:u.next=o,un(n,t.memoizedState)||(Do=!0),t.memoizedState=n,t.baseState=i,t.baseQueue=u,r.lastRenderedState=n}return[t.memoizedState,r.dispatch]}function uo(e){var t=io(),r=t.queue;if(null===r)throw Error(s(311));r.lastRenderedReducer=e;var n=r.dispatch,a=r.pending,i=t.memoizedState;if(null!==a){r.pending=null;var o=a=a.next;do{i=e(i,o.action),o=o.next}while(o!==a);un(i,t.memoizedState)||(Do=!0),t.memoizedState=i,null===t.baseQueue&&(t.baseState=i),r.lastRenderedState=i}return[i,n]}function co(e,t,r){var n=t._getVersion;n=n(t._source);var a=t._workInProgressVersionPrimary;if(null!==a?e=a===n:(e=e.mutableReadLanes,(e=(Ki&e)===e)&&(t._workInProgressVersionPrimary=n,qi.push(t))),e)return r(t._source);throw qi.push(t),Error(s(350))}function lo(e,t,r,n){var a=Es;if(null===a)throw Error(s(349));var i=t._getVersion,o=i(t._source),u=Xi.current,c=u.useState((function(){return co(a,t,r)})),l=c[1],d=c[0];c=Ji;var p=e.memoizedState,f=p.refs,h=f.getSnapshot,m=p.source;p=p.subscribe;var g=Qi;return e.memoizedState={refs:f,source:t,subscribe:n},u.useEffect((function(){f.getSnapshot=r,f.setSnapshot=l;var e=i(t._source);if(!un(o,e)){e=r(t._source),un(d,e)||(l(e),e=uu(g),a.mutableReadLanes|=e&a.pendingLanes),e=a.mutableReadLanes,a.entangledLanes|=e;for(var n=a.entanglements,s=e;0r?98:r,(function(){e(!0)})),Ha(97<\/script>",e=e.removeChild(e.firstChild)):"string"==typeof n.is?e=u.createElement(r,{is:n.is}):(e=u.createElement(r),"select"===r&&(u=e,n.multiple?u.multiple=!0:n.size&&(u.size=n.size))):e=u.createElementNS(e,r),e[Kn]=t,e[Qn]=n,qo(e,t),t.stateNode=e,u=Ce(r,n),r){case"dialog":An("cancel",e),An("close",e),a=n;break;case"iframe":case"object":case"embed":An("load",e),a=n;break;case"video":case"audio":for(a=0;aUs&&(t.flags|=64,o=!0,ns(n,!1),t.lanes=33554432)}else{if(!o)if(null!==(e=Ri(u))){if(t.flags|=64,o=!0,null!==(r=e.updateQueue)&&(t.updateQueue=r,t.flags|=4),ns(n,!0),null===n.tail&&"hidden"===n.tailMode&&!u.alternate&&!Ni)return null!==(t=t.lastEffect=n.lastEffect)&&(t.nextEffect=null),null}else 2*za()-n.renderingStartTime>Us&&1073741824!==r&&(t.flags|=64,o=!0,ns(n,!1),t.lanes=33554432);n.isBackwards?(u.sibling=t.child,t.child=u):(null!==(r=n.last)?r.sibling=u:t.child=u,n.last=u)}return null!==n.tail?(r=n.tail,n.rendering=r,n.tail=r.sibling,n.lastEffect=t.lastEffect,n.renderingStartTime=za(),r.sibling=null,t=Di.current,ua(Di,o?1&t|2:1&t),r):null;case 23:case 24:return vu(),null!==e&&null!==e.memoizedState!=(null!==t.memoizedState)&&"unstable-defer-without-hiding"!==n.mode&&(t.flags|=4),null}throw Error(s(156,t.tag))}function is(e){switch(e.tag){case 1:ha(e.type)&&ma();var t=e.flags;return 4096&t?(e.flags=-4097&t|64,e):null;case 3:if(Ii(),sa(da),sa(la),Wi(),0!=(64&(t=e.flags)))throw Error(s(285));return e.flags=-4097&t|64,e;case 5:return Mi(e),null;case 13:return sa(Di),4096&(t=e.flags)?(e.flags=-4097&t|64,e):null;case 19:return sa(Di),null;case 4:return Ii(),null;case 10:return ei(e),null;case 23:case 24:return vu(),null;default:return null}}function os(e,t){try{var r="",n=t;do{r+=Y(n),n=n.return}while(n);var a=r}catch(e){a="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:a}}function ss(e,t){try{console.error(t.value)}catch(e){setTimeout((function(){throw e}))}}qo=function(e,t){for(var r=t.child;null!==r;){if(5===r.tag||6===r.tag)e.appendChild(r.stateNode);else if(4!==r.tag&&null!==r.child){r.child.return=r,r=r.child;continue}if(r===t)break;for(;null===r.sibling;){if(null===r.return||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}},Wo=function(e,t,r,a){var o=e.memoizedProps;if(o!==a){e=t.stateNode,Pi(Ci.current);var s,u=null;switch(r){case"input":o=te(e,o),a=te(e,a),u=[];break;case"option":o=se(e,o),a=se(e,a),u=[];break;case"select":o=i({},o,{value:void 0}),a=i({},a,{value:void 0}),u=[];break;case"textarea":o=ce(e,o),a=ce(e,a),u=[];break;default:"function"!=typeof o.onClick&&"function"==typeof a.onClick&&(e.onclick=Ln)}for(p in we(r,a),r=null,o)if(!a.hasOwnProperty(p)&&o.hasOwnProperty(p)&&null!=o[p])if("style"===p){var l=o[p];for(s in l)l.hasOwnProperty(s)&&(r||(r={}),r[s]="")}else"dangerouslySetInnerHTML"!==p&&"children"!==p&&"suppressContentEditableWarning"!==p&&"suppressHydrationWarning"!==p&&"autoFocus"!==p&&(c.hasOwnProperty(p)?u||(u=[]):(u=u||[]).push(p,null));for(p in a){var d=a[p];if(l=null!=o?o[p]:void 0,a.hasOwnProperty(p)&&d!==l&&(null!=d||null!=l))if("style"===p)if(l){for(s in l)!l.hasOwnProperty(s)||d&&d.hasOwnProperty(s)||(r||(r={}),r[s]="");for(s in d)d.hasOwnProperty(s)&&l[s]!==d[s]&&(r||(r={}),r[s]=d[s])}else r||(u||(u=[]),u.push(p,r)),r=d;else"dangerouslySetInnerHTML"===p?(d=d?d.__html:void 0,l=l?l.__html:void 0,null!=d&&l!==d&&(u=u||[]).push(p,d)):"children"===p?"string"!=typeof d&&"number"!=typeof d||(u=u||[]).push(p,""+d):"suppressContentEditableWarning"!==p&&"suppressHydrationWarning"!==p&&(c.hasOwnProperty(p)?(null!=d&&"onScroll"===p&&An("scroll",e),u||l===d||(u=[])):"object"===n(d)&&null!==d&&d.$$typeof===L?d.toString():(u=u||[]).push(p,d))}r&&(u=u||[]).push("style",r);var p=u;(t.updateQueue=p)&&(t.flags|=4)}},Xo=function(e,t,r,n){r!==n&&(t.flags|=4)};var us="function"==typeof WeakMap?WeakMap:Map;function cs(e,t,r){(r=si(-1,r)).tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){qs||(qs=!0,Ws=n),ss(0,t)},r}function ls(e,t,r){(r=si(-1,r)).tag=3;var n=e.type.getDerivedStateFromError;if("function"==typeof n){var a=t.value;r.payload=function(){return ss(0,t),n(a)}}var i=e.stateNode;return null!==i&&"function"==typeof i.componentDidCatch&&(r.callback=function(){"function"!=typeof n&&(null===Xs?Xs=new Set([this]):Xs.add(this),ss(0,t));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),r}var ds="function"==typeof WeakSet?WeakSet:Set;function ps(e){var t=e.ref;if(null!==t)if("function"==typeof t)try{t(null)}catch(t){Ru(e,t)}else t.current=null}function fs(e,t){switch(t.tag){case 0:case 11:case 15:case 22:return;case 1:if(256&t.flags&&null!==e){var r=e.memoizedProps,n=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?r:Ya(t.type,r),n),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:return void(256&t.flags&&Gn(t.stateNode.containerInfo));case 5:case 6:case 4:case 17:return}throw Error(s(163))}function hs(e,t,r){switch(r.tag){case 0:case 11:case 15:case 22:if(null!==(t=null!==(t=r.updateQueue)?t.lastEffect:null)){e=t=t.next;do{if(3==(3&e.tag)){var n=e.create;e.destroy=n()}e=e.next}while(e!==t)}if(null!==(t=null!==(t=r.updateQueue)?t.lastEffect:null)){e=t=t.next;do{var a=e;n=a.next,0!=(4&(a=a.tag))&&0!=(1&a)&&(ku(r,e),Iu(r,e)),e=n}while(e!==t)}return;case 1:return e=r.stateNode,4&r.flags&&(null===t?e.componentDidMount():(n=r.elementType===r.type?t.memoizedProps:Ya(r.type,t.memoizedProps),e.componentDidUpdate(n,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),void(null!==(t=r.updateQueue)&&di(r,t,e));case 3:if(null!==(t=r.updateQueue)){if(e=null,null!==r.child)switch(r.child.tag){case 5:e=r.child.stateNode;break;case 1:e=r.child.stateNode}di(r,t,e)}return;case 5:return e=r.stateNode,void(null===t&&4&r.flags&&zn(r.type,r.memoizedProps)&&e.focus());case 6:case 4:case 12:return;case 13:return void(null===r.memoizedState&&(r=r.alternate,null!==r&&(r=r.memoizedState,null!==r&&(r=r.dehydrated,null!==r&&St(r)))));case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(s(163))}function ms(e,t){for(var r=e;;){if(5===r.tag){var n=r.stateNode;if(t)"function"==typeof(n=n.style).setProperty?n.setProperty("display","none","important"):n.display="none";else{n=r.stateNode;var a=r.memoizedProps.style;a=null!=a&&a.hasOwnProperty("display")?a.display:null,n.style.display=je("display",a)}}else if(6===r.tag)r.stateNode.nodeValue=t?"":r.memoizedProps;else if((23!==r.tag&&24!==r.tag||null===r.memoizedState||r===e)&&null!==r.child){r.child.return=r,r=r.child;continue}if(r===e)break;for(;null===r.sibling;){if(null===r.return||r.return===e)return;r=r.return}r.sibling.return=r.return,r=r.sibling}}function gs(e,t){if(Oa&&"function"==typeof Oa.onCommitFiberUnmount)try{Oa.onCommitFiberUnmount(xa,t)}catch(e){}switch(t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var r=e=e.next;do{var n=r,a=n.destroy;if(n=n.tag,void 0!==a)if(0!=(4&n))ku(t,r);else{n=t;try{a()}catch(e){Ru(n,e)}}r=r.next}while(r!==e)}break;case 1:if(ps(t),"function"==typeof(e=t.stateNode).componentWillUnmount)try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(e){Ru(t,e)}break;case 5:ps(t);break;case 4:xs(e,t)}}function bs(e){e.alternate=null,e.child=null,e.dependencies=null,e.firstEffect=null,e.lastEffect=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.return=null,e.updateQueue=null}function vs(e){return 5===e.tag||3===e.tag||4===e.tag}function ys(e){e:{for(var t=e.return;null!==t;){if(vs(t))break e;t=t.return}throw Error(s(160))}var r=t;switch(t=r.stateNode,r.tag){case 5:var n=!1;break;case 3:case 4:t=t.containerInfo,n=!0;break;default:throw Error(s(161))}16&r.flags&&(ye(t,""),r.flags&=-17);e:t:for(r=e;;){for(;null===r.sibling;){if(null===r.return||vs(r.return)){r=null;break e}r=r.return}for(r.sibling.return=r.return,r=r.sibling;5!==r.tag&&6!==r.tag&&18!==r.tag;){if(2&r.flags)continue t;if(null===r.child||4===r.tag)continue t;r.child.return=r,r=r.child}if(!(2&r.flags)){r=r.stateNode;break e}}n?function e(t,r,n){var a=t.tag,i=5===a||6===a;if(i)t=i?t.stateNode:t.stateNode.instance,r?8===n.nodeType?n.parentNode.insertBefore(t,r):n.insertBefore(t,r):(8===n.nodeType?(r=n.parentNode).insertBefore(t,n):(r=n).appendChild(t),null!==(n=n._reactRootContainer)&&void 0!==n||null!==r.onclick||(r.onclick=Ln));else if(4!==a&&null!==(t=t.child))for(e(t,r,n),t=t.sibling;null!==t;)e(t,r,n),t=t.sibling}(e,r,t):function e(t,r,n){var a=t.tag,i=5===a||6===a;if(i)t=i?t.stateNode:t.stateNode.instance,r?n.insertBefore(t,r):n.appendChild(t);else if(4!==a&&null!==(t=t.child))for(e(t,r,n),t=t.sibling;null!==t;)e(t,r,n),t=t.sibling}(e,r,t)}function xs(e,t){for(var r,n,a=t,i=!1;;){if(!i){i=a.return;e:for(;;){if(null===i)throw Error(s(160));switch(r=i.stateNode,i.tag){case 5:n=!1;break e;case 3:case 4:r=r.containerInfo,n=!0;break e}i=i.return}i=!0}if(5===a.tag||6===a.tag){e:for(var o=e,u=a,c=u;;)if(gs(o,c),null!==c.child&&4!==c.tag)c.child.return=c,c=c.child;else{if(c===u)break e;for(;null===c.sibling;){if(null===c.return||c.return===u)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}n?(o=r,u=a.stateNode,8===o.nodeType?o.parentNode.removeChild(u):o.removeChild(u)):r.removeChild(a.stateNode)}else if(4===a.tag){if(null!==a.child){r=a.stateNode.containerInfo,n=!0,a.child.return=a,a=a.child;continue}}else if(gs(e,a),null!==a.child){a.child.return=a,a=a.child;continue}if(a===t)break;for(;null===a.sibling;){if(null===a.return||a.return===t)return;4===(a=a.return).tag&&(i=!1)}a.sibling.return=a.return,a=a.sibling}}function Os(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var n=r=r.next;do{3==(3&n.tag)&&(e=n.destroy,n.destroy=void 0,void 0!==e&&e()),n=n.next}while(n!==r)}return;case 1:return;case 5:if(null!=(r=t.stateNode)){n=t.memoizedProps;var a=null!==e?e.memoizedProps:n;e=t.type;var i=t.updateQueue;if(t.updateQueue=null,null!==i){for(r[Qn]=n,"input"===e&&"radio"===n.type&&null!=n.name&&ne(r,n),Ce(e,a),t=Ce(e,n),a=0;aa&&(a=o),r&=~i}if(r=a,10<(r=(120>(r=za()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*_s(r/1960))-r)){e.timeoutHandle=Vn(Au.bind(null,e),r);break}Au(e);break;case 5:Au(e);break;default:throw Error(s(329))}}return du(e,za()),e.callbackNode===t?pu.bind(null,e):null}function fu(e,t){for(t&=~Ns,t&=~Ls,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0 component higher in the tree to provide a loading indicator or placeholder to display.")}5!==Ms&&(Ms=2),c=os(c,u),f=s;do{switch(f.tag){case 3:o=c,f.flags|=4096,t&=-t,f.lanes|=t,ci(f,cs(0,o,t));break e;case 1:o=c;var j=f.type,S=f.stateNode;if(0==(64&f.flags)&&("function"==typeof j.getDerivedStateFromError||null!==S&&"function"==typeof S.componentDidCatch&&(null===Xs||!Xs.has(S)))){f.flags|=4096,t&=-t,f.lanes|=t,ci(f,ls(f,o,t));break e}}f=f.return}while(null!==f)}Cu(r)}catch(e){t=e,Ps===r&&null!==r&&(Ps=r=r.return);continue}break}}function Ou(){var e=ws.current;return ws.current=Po,null===e?Po:e}function ju(e,t){var r=As;As|=16;var n=Ou();for(Es===e&&Ts===t||yu(e,t);;)try{Su();break}catch(t){xu(e,t)}if($a(),As=r,ws.current=n,null!==Ps)throw Error(s(261));return Es=null,Ts=0,Ms}function Su(){for(;null!==Ps;)wu(Ps)}function _u(){for(;null!==Ps&&!wa();)wu(Ps)}function wu(e){var t=Hs(e.alternate,e,Is);e.memoizedProps=e.pendingProps,null===t?Cu(e):Ps=t,Cs.current=null}function Cu(e){var t=e;do{var r=t.alternate;if(e=t.return,0==(2048&t.flags)){if(null!==(r=as(r,t,Is)))return void(Ps=r);if(24!==(r=t).tag&&23!==r.tag||null===r.memoizedState||0!=(1073741824&Is)||0==(4&r.mode)){for(var n=0,a=r.child;null!==a;)n|=a.lanes|a.childLanes,a=a.sibling;r.childLanes=n}null!==e&&0==(2048&e.flags)&&(null===e.firstEffect&&(e.firstEffect=t.firstEffect),null!==t.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=t.firstEffect),e.lastEffect=t.lastEffect),1o&&(u=o,o=j,j=u),u=pn(y,j),i=pn(y,o),u&&i&&(1!==O.rangeCount||O.anchorNode!==u.node||O.anchorOffset!==u.offset||O.focusNode!==i.node||O.focusOffset!==i.offset)&&((x=x.createRange()).setStart(u.node,u.offset),O.removeAllRanges(),j>o?(O.addRange(x),O.extend(i.node,i.offset)):(x.setEnd(i.node,i.offset),O.addRange(x))))),x=[];for(O=y;O=O.parentNode;)1===O.nodeType&&x.push({element:O,left:O.scrollLeft,top:O.scrollTop});for("function"==typeof y.focus&&y.focus(),y=0;yza()-zs?yu(e,0):Ns|=r),du(e,t)}function Lu(e,t){var r=e.stateNode;null!==r&&r.delete(t),0===(t=0)&&(0==(2&(t=e.mode))?t=1:0==(4&t)?t=99===Ua()?1:2:(0===nu&&(nu=Rs),0===(t=Vt(62914560&~nu))&&(t=4194304))),r=su(),null!==(e=lu(e,t))&&(Gt(e,t,r),du(e,r))}function Nu(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function Fu(e,t,r,n){return new Nu(e,t,r,n)}function zu(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Uu(e,t){var r=e.alternate;return null===r?((r=Fu(e.tag,t,e.key,e.mode)).elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.nextEffect=null,r.firstEffect=null,r.lastEffect=null),r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Vu(e,t,r,a,i,o){var u=2;if(a=e,"function"==typeof e)zu(e)&&(u=1);else if("string"==typeof e)u=5;else e:switch(e){case C:return Hu(r.children,i,o,t);case N:u=8,i|=16;break;case A:u=8,i|=1;break;case E:return(e=Fu(12,r,t,8|i)).elementType=E,e.type=E,e.lanes=o,e;case k:return(e=Fu(13,r,t,i)).type=k,e.elementType=k,e.lanes=o,e;case M:return(e=Fu(19,r,t,i)).elementType=M,e.lanes=o,e;case F:return Gu(r,i,o,t);case z:return(e=Fu(24,r,t,i)).elementType=z,e.lanes=o,e;default:if("object"===n(e)&&null!==e)switch(e.$$typeof){case P:u=10;break e;case T:u=9;break e;case I:u=11;break e;case D:u=14;break e;case R:u=16,a=null;break e;case B:u=22;break e}throw Error(s(130,null==e?e:n(e),""))}return(t=Fu(u,r,t,i)).elementType=e,t.type=a,t.lanes=o,t}function Hu(e,t,r,n){return(e=Fu(7,e,n,t)).lanes=r,e}function Gu(e,t,r,n){return(e=Fu(23,e,n,t)).elementType=F,e.lanes=r,e}function qu(e,t,r){return(e=Fu(6,e,null,t)).lanes=r,e}function Wu(e,t,r){return(t=Fu(4,null!==e.children?e.children:[],e.key,t)).lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Xu(e,t,r){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=r,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=Ht(0),this.expirationTimes=Ht(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ht(0),this.mutableSourceEagerHydrationData=null}function Yu(e,t,r){var n=3=O},s=function(){},t.unstable_forceFrameRate=function(e){0>e||125>>1,a=e[n];if(!(void 0!==a&&0A(o,r))void 0!==u&&0>A(u,o)?(e[n]=u,e[s]=r,n=s):(e[n]=o,e[i]=r,n=i);else{if(!(void 0!==u&&0>A(u,r)))break e;e[n]=u,e[s]=r,n=s}}}return t}return null}function A(e,t){var r=e.sortIndex-t.sortIndex;return 0!==r?r:e.id-t.id}var E=[],P=[],T=1,I=null,k=3,M=!1,D=!1,R=!1;function B(e){for(var t=w(P);null!==t;){if(null===t.callback)C(P);else{if(!(t.startTime<=e))break;C(P),t.sortIndex=t.expirationTime,_(E,t)}t=w(P)}}function L(e){if(R=!1,B(e),!D)if(null!==w(E))D=!0,a(N);else{var t=w(P);null!==t&&i(L,t.startTime-e)}}function N(e,r){D=!1,R&&(R=!1,o()),M=!0;var n=k;try{for(B(r),I=w(E);null!==I&&(!(I.expirationTime>r)||e&&!t.unstable_shouldYield());){var a=I.callback;if("function"==typeof a){I.callback=null,k=I.priorityLevel;var s=a(I.expirationTime<=r);r=t.unstable_now(),"function"==typeof s?I.callback=s:I===w(E)&&C(E),B(r)}else C(E);I=w(E)}if(null!==I)var u=!0;else{var c=w(P);null!==c&&i(L,c.startTime-r),u=!1}return u}finally{I=null,k=n,M=!1}}var F=s;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){D||M||(D=!0,a(N))},t.unstable_getCurrentPriorityLevel=function(){return k},t.unstable_getFirstCallbackNode=function(){return w(E)},t.unstable_next=function(e){switch(k){case 1:case 2:case 3:var t=3;break;default:t=k}var r=k;k=t;try{return e()}finally{k=r}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=F,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var r=k;k=e;try{return t()}finally{k=r}},t.unstable_scheduleCallback=function(e,r,s){var u=t.unstable_now();switch("object"===n(s)&&null!==s?s="number"==typeof(s=s.delay)&&0u?(e.sortIndex=s,_(P,e),null===w(E)&&e===w(P)&&(R?o():R=!0,i(L,s-u))):(e.sortIndex=c,_(E,e),D||M||(D=!0,a(N))),e},t.unstable_wrapCallback=function(e){var t=k;return function(){var r=k;k=t;try{return e.apply(this,arguments)}finally{k=r}}}},function(e,t,r){"use strict"; +/** @license React v16.14.0 + * react-jsx-runtime.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var n=r(0),a=60103;if(t.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var i=Symbol.for;a=i("react.element"),t.Fragment=i("react.fragment")}var o=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s=Object.prototype.hasOwnProperty,u={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,r){var n,i={},c=null,l=null;for(n in void 0!==r&&(c=""+r),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(l=t.ref),t)s.call(t,n)&&!u.hasOwnProperty(n)&&(i[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===i[n]&&(i[n]=t[n]);return{$$typeof:a,type:e,key:c,ref:l,props:i,_owner:o.current}}t.jsx=c,t.jsxs=c},function(e,t,r){"use strict";(function(e){ +/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ +var n=r(1058),a=r(1059),i=r(1060);function o(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(o()=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|e}function h(e,t){if(u.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return z(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return U(e).length;default:if(n)return z(e).length;t=(""+t).toLowerCase(),n=!0}}function m(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return P(this,t,r);case"utf8":case"utf-8":return C(this,t,r);case"ascii":return A(this,t,r);case"latin1":case"binary":return E(this,t,r);case"base64":return w(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function g(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function b(e,t,r,n,a){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=a?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(a)return-1;r=e.length-1}else if(r<0){if(!a)return-1;r=0}if("string"==typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:v(e,t,r,n,a);if("number"==typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?a?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):v(e,[t],r,n,a);throw new TypeError("val must be string, number or Buffer")}function v(e,t,r,n,a){var i,o=1,s=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;o=2,s/=2,u/=2,r/=2}function c(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(a){var l=-1;for(i=r;is&&(r=s-u),i=r;i>=0;i--){for(var d=!0,p=0;pa&&(n=a):n=a;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var o=0;o>8,a=r%256,i.push(a),i.push(n);return i}(t,e.length-r),e,r,n)}function w(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function C(e,t,r){r=Math.min(e.length,r);for(var n=[],a=t;a239?4:c>223?3:c>191?2:1;if(a+d<=r)switch(d){case 1:c<128&&(l=c);break;case 2:128==(192&(i=e[a+1]))&&(u=(31&c)<<6|63&i)>127&&(l=u);break;case 3:i=e[a+1],o=e[a+2],128==(192&i)&&128==(192&o)&&(u=(15&c)<<12|(63&i)<<6|63&o)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:i=e[a+1],o=e[a+2],s=e[a+3],128==(192&i)&&128==(192&o)&&128==(192&s)&&(u=(15&c)<<18|(63&i)<<12|(63&o)<<6|63&s)>65535&&u<1114112&&(l=u)}null===l?(l=65533,d=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),a+=d}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),""},u.prototype.compare=function(e,t,r,n,a){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===a&&(a=this.length),t<0||r>e.length||n<0||a>this.length)throw new RangeError("out of range index");if(n>=a&&t>=r)return 0;if(n>=a)return-1;if(t>=r)return 1;if(this===e)return 0;for(var i=(a>>>=0)-(n>>>=0),o=(r>>>=0)-(t>>>=0),s=Math.min(i,o),c=this.slice(n,a),l=e.slice(t,r),d=0;da)&&(r=a),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return y(this,e,t,r);case"utf8":case"utf-8":return x(this,e,t,r);case"ascii":return O(this,e,t,r);case"latin1":case"binary":return j(this,e,t,r);case"base64":return S(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function A(e,t,r){var n="";r=Math.min(e.length,r);for(var a=t;an)&&(r=n);for(var a="",i=t;ir)throw new RangeError("Trying to access beyond buffer length")}function k(e,t,r,n,a,i){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>a||te.length)throw new RangeError("Index out of range")}function M(e,t,r,n){t<0&&(t=65535+t+1);for(var a=0,i=Math.min(e.length-r,2);a>>8*(n?a:1-a)}function D(e,t,r,n){t<0&&(t=4294967295+t+1);for(var a=0,i=Math.min(e.length-r,4);a>>8*(n?a:3-a)&255}function R(e,t,r,n,a,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function B(e,t,r,n,i){return i||R(e,0,r,4),a.write(e,t,r,n,23,4),r+4}function L(e,t,r,n,i){return i||R(e,0,r,8),a.write(e,t,r,n,52,8),r+8}u.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t0&&(a*=256);)n+=this[e+--t]*a;return n},u.prototype.readUInt8=function(e,t){return t||I(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||I(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||I(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||I(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||I(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||I(e,t,this.length);for(var n=this[e],a=1,i=0;++i=(a*=128)&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||I(e,t,this.length);for(var n=t,a=1,i=this[e+--n];n>0&&(a*=256);)i+=this[e+--n]*a;return i>=(a*=128)&&(i-=Math.pow(2,8*t)),i},u.prototype.readInt8=function(e,t){return t||I(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||I(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){t||I(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return t||I(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||I(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||I(e,4,this.length),a.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||I(e,4,this.length),a.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||I(e,8,this.length),a.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||I(e,8,this.length),a.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||k(this,e,t,r,Math.pow(2,8*r)-1,0);var a=1,i=0;for(this[t]=255&e;++i=0&&(i*=256);)this[t+a]=e/i&255;return t+r},u.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||k(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||k(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):M(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||k(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):M(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||k(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):D(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||k(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):D(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var a=Math.pow(2,8*r-1);k(this,e,t,r,a-1,-a)}var i=0,o=1,s=0;for(this[t]=255&e;++i>0)-s&255;return t+r},u.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var a=Math.pow(2,8*r-1);k(this,e,t,r,a-1,-a)}var i=r-1,o=1,s=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||k(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||k(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):M(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||k(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):M(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||k(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):D(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||k(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):D(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,r){return B(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return B(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return L(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return L(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--a)e[a+t]=this[a+r];else if(i<1e3||!u.TYPED_ARRAY_SUPPORT)for(a=0;a>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i55295&&r<57344){if(!a){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&i.push(239,191,189);continue}a=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),a=r;continue}r=65536+(a-55296<<10|r-56320)}else a&&(t-=3)>-1&&i.push(239,191,189);if(a=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function U(e){return n.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(N,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function V(e,t,r,n){for(var a=0;a=t.length||a>=e.length);++a)t[a+r]=e[a];return a}}).call(this,r(112))},function(e,t,r){"use strict";t.byteLength=function(e){var t=c(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,n=c(e),o=n[0],s=n[1],u=new i(function(e,t,r){return 3*(t+r)/4-r}(0,o,s)),l=0,d=s>0?o-4:o;for(r=0;r>16&255,u[l++]=t>>8&255,u[l++]=255&t;2===s&&(t=a[e.charCodeAt(r)]<<2|a[e.charCodeAt(r+1)]>>4,u[l++]=255&t);1===s&&(t=a[e.charCodeAt(r)]<<10|a[e.charCodeAt(r+1)]<<4|a[e.charCodeAt(r+2)]>>2,u[l++]=t>>8&255,u[l++]=255&t);return u},t.fromByteArray=function(e){for(var t,r=e.length,a=r%3,i=[],o=0,s=r-a;os?s:o+16383));1===a?(t=e[r-1],i.push(n[t>>2]+n[t<<4&63]+"==")):2===a&&(t=(e[r-2]<<8)+e[r-1],i.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return i.join("")};for(var n=[],a=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=o.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function l(e,t,r){for(var a,i,o=[],s=t;s>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return o.join("")}a["-".charCodeAt(0)]=62,a["_".charCodeAt(0)]=63},function(e,t){ +/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ +t.read=function(e,t,r,n,a){var i,o,s=8*a-n-1,u=(1<>1,l=-7,d=r?a-1:0,p=r?-1:1,f=e[t+d];for(d+=p,i=f&(1<<-l)-1,f>>=-l,l+=s;l>0;i=256*i+e[t+d],d+=p,l-=8);for(o=i&(1<<-l)-1,i>>=-l,l+=n;l>0;o=256*o+e[t+d],d+=p,l-=8);if(0===i)i=1-c;else{if(i===u)return o?NaN:1/0*(f?-1:1);o+=Math.pow(2,n),i-=c}return(f?-1:1)*o*Math.pow(2,i-n)},t.write=function(e,t,r,n,a,i){var o,s,u,c=8*i-a-1,l=(1<>1,p=23===a?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:i-1,h=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=l):(o=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-o))<1&&(o--,u*=2),(t+=o+d>=1?p/u:p*Math.pow(2,1-d))*u>=2&&(o++,u/=2),o+d>=l?(s=0,o=l):o+d>=1?(s=(t*u-1)*Math.pow(2,a),o+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,a),o=0));a>=8;e[r+f]=255&s,f+=h,s/=256,a-=8);for(o=o<0;e[r+f]=255&o,f+=h,o/=256,c-=8);e[r+f-h]|=128*m}},function(e,t){var r={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},function(e,t,r){(function(e,t){!function(e,r){"use strict";if(!e.setImmediate){var n,a,i,o,s,u=1,c={},l=!1,d=e.document,p=Object.getPrototypeOf&&Object.getPrototypeOf(e);p=p&&p.setTimeout?p:e,"[object process]"==={}.toString.call(e.process)?n=function(e){t.nextTick((function(){h(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,r=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=r,t}}()?e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){h(e.data)},n=function(e){i.port2.postMessage(e)}):d&&"onreadystatechange"in d.createElement("script")?(a=d.documentElement,n=function(e){var t=d.createElement("script");t.onreadystatechange=function(){h(e),t.onreadystatechange=null,a.removeChild(t),t=null},a.appendChild(t)}):n=function(e){setTimeout(h,0,e)}:(o="setImmediate$"+Math.random()+"$",s=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(o)&&h(+t.data.slice(o.length))},e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent("onmessage",s),n=function(t){e.postMessage(o+t,"*")}),p.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),r=0;r0||(null===(a=c.values.dXrayShaded)||void 0===a?void 0:a.ref.value))&&N(c,"colorBlended")}},renderWboitOpaque:function(e,t,n){var a,i,o;u.disable(r.BLEND),u.enable(r.DEPTH_TEST),u.depthMask(!0),F(e,t,n,!1);for(var s=e.renderables,c=0,l=s.length;c0||"volume"===(null===(n=c.values.dRenderMode)||void 0===n?void 0:n.ref.value)||(null===(a=c.values.dPointFilledCircle)||void 0===a?void 0:a.ref.value)||c.values.uBackgroundColor||(null===(i=c.values.dXrayShaded)||void 0===i?void 0:i.ref.value))&&N(c,"colorWboit")}},setProps:function(e){void 0!==e.backgroundColor&&e.backgroundColor!==g.backgroundColor&&(g.backgroundColor=e.backgroundColor,i.a.toVec3Normalized(j,g.backgroundColor),o.e.update(R.uFogColor,a.g.copy(R.uFogColor.ref.value,j))),void 0!==e.pickingAlphaThreshold&&e.pickingAlphaThreshold!==g.pickingAlphaThreshold&&(g.pickingAlphaThreshold=e.pickingAlphaThreshold,o.e.update(R.uPickingAlphaThreshold,g.pickingAlphaThreshold)),void 0!==e.interiorDarkening&&e.interiorDarkening!==g.interiorDarkening&&(g.interiorDarkening=e.interiorDarkening,o.e.update(R.uInteriorDarkening,g.interiorDarkening)),void 0!==e.interiorColorFlag&&e.interiorColorFlag!==g.interiorColorFlag&&(g.interiorColorFlag=e.interiorColorFlag,o.e.update(R.uInteriorColorFlag,g.interiorColorFlag)),void 0!==e.interiorColor&&e.interiorColor!==g.interiorColor&&(g.interiorColor=e.interiorColor,o.e.update(R.uInteriorColor,i.a.toVec3Normalized(R.uInteriorColor.ref.value,g.interiorColor))),void 0!==e.highlightColor&&e.highlightColor!==g.highlightColor&&(g.highlightColor=e.highlightColor,o.e.update(R.uHighlightColor,i.a.toVec3Normalized(R.uHighlightColor.ref.value,g.highlightColor))),void 0!==e.selectColor&&e.selectColor!==g.selectColor&&(g.selectColor=e.selectColor,o.e.update(R.uSelectColor,i.a.toVec3Normalized(R.uSelectColor.ref.value,g.selectColor))),void 0!==e.xrayEdgeFalloff&&e.xrayEdgeFalloff!==g.xrayEdgeFalloff&&(g.xrayEdgeFalloff=e.xrayEdgeFalloff,o.e.update(R.uXrayEdgeFalloff,g.xrayEdgeFalloff)),void 0!==e.style&&(g.style=e.style,Object.assign(b,m(e.style)),o.e.updateIfChanged(R.uLightIntensity,b.lightIntensity),o.e.updateIfChanged(R.uAmbientIntensity,b.ambientIntensity),o.e.updateIfChanged(R.uMetalness,b.metalness),o.e.updateIfChanged(R.uRoughness,b.roughness),o.e.updateIfChanged(R.uReflectivity,b.reflectivity)),void 0===e.clip||Object(o.g)(e.clip,g.clip)||(g.clip=e.clip,Object.assign(y,v(e.clip,y)),o.e.update(R.uClipObjectPosition,y.objects.position),o.e.update(R.uClipObjectRotation,y.objects.rotation),o.e.update(R.uClipObjectScale,y.objects.scale),o.e.update(R.uClipObjectType,y.objects.type))},setViewport:function(e,t,i,s){r.viewport(e,t,i,s),r.scissor(e,t,i,s),e===x.x&&t===x.y&&i===x.width&&s===x.height||(n.a.set(x,e,t,i,s),o.e.update(R.uViewportHeight,s),o.e.update(R.uViewport,a.h.set(R.uViewport.ref.value,e,t,i,s)))},setTransparentBackground:function(e){S=e},setDrawingBufferSize:function(e,t){e===O[0]&&t===O[1]||o.e.update(R.uDrawingBufferSize,a.f.set(O,e,t))},props:g,get stats(){return{programCount:e.stats.resourceCounts.program,shaderCount:e.stats.resourceCounts.shader,attributeCount:e.stats.resourceCounts.attribute,elementsCount:e.stats.resourceCounts.elements,framebufferCount:e.stats.resourceCounts.framebuffer,renderbufferCount:e.stats.resourceCounts.renderbuffer,textureCount:e.stats.resourceCounts.texture,vertexArrayCount:e.stats.resourceCounts.vertexArray,drawCount:c.drawCount,instanceCount:c.instanceCount,instancedDrawCount:c.instancedDrawCount}},dispose:function(){}}}}(g||(g={}))},function(e,t,r){"use strict";r.d(t,"b",(function(){return h})),r.d(t,"a",(function(){return n}));var n,a=r(572),i=r(574),o=r(712),s=r(728),u=r(573),c=r(630),l=r(797),d=(s.a,s.c),p=l.a.Trigger,f={dragRotate:Object(l.a)([p(1,d.create())],"Rotate","Drag using ${triggers}"),dragRotateZ:Object(l.a)([p(1,d.create({shift:!0}))],"Rotate around z-axis","Drag using ${triggers}"),dragPan:Object(l.a)([p(2,d.create()),p(1,d.create({control:!0}))],"Pan","Drag using ${triggers}"),dragZoom:l.a.Empty,dragFocus:Object(l.a)([p(8,d.create())],"Focus","Drag using ${triggers}"),dragFocusZoom:Object(l.a)([p(4,d.create())],"Focus and zoom","Drag using ${triggers}"),scrollZoom:Object(l.a)([p(4,d.create())],"Zoom","Scroll using ${triggers}"),scrollFocus:Object(l.a)([p(4,d.create({shift:!0}))],"Clip","Scroll using ${triggers}"),scrollFocusZoom:l.a.Empty},h={noScroll:u.a.Boolean(!0,{isHidden:!0}),rotateSpeed:u.a.Numeric(5,{min:1,max:10,step:1}),zoomSpeed:u.a.Numeric(7,{min:1,max:15,step:1}),panSpeed:u.a.Numeric(1,{min:.1,max:5,step:.1}),spin:u.a.Boolean(!1,{description:"Spin the 3D scene around the x-axis in view space"}),spinSpeed:u.a.Numeric(1,{min:-20,max:20,step:1}),staticMoving:u.a.Boolean(!0,{isHidden:!0}),dynamicDampingFactor:u.a.Numeric(.2,{},{isHidden:!0}),minDistance:u.a.Numeric(.01,{},{isHidden:!0}),maxDistance:u.a.Numeric(1e150,{},{isHidden:!0}),bindings:u.a.Value(f,{isHidden:!0}),autoAdjustMinMaxDistance:u.a.MappedStatic("on",{off:u.a.EmptyGroup(),on:u.a.Group({minDistanceFactor:u.a.Numeric(0),minDistancePadding:u.a.Numeric(5),maxDistanceFactor:u.a.Numeric(10),maxDistanceMin:u.a.Numeric(20)})},{isHidden:!0})};!function(e){e.create=function(e,t,r){void 0===r&&(r={});var n=Object(a.a)(Object(a.a)({},u.a.getDefaultValues(h)),r),s=o.a.clone(t.viewport),d=!1,p=e.drag.subscribe((function(e){var r=e.x,a=e.y,o=e.pageX,u=e.pageY,c=e.buttons,d=e.modifiers,p=e.isStart,f=Y(r,a);if(p&&f)return;if(!p&&!b)return;b=!0;var h=l.a.match(n.bindings.dragRotate,c,d),m=l.a.match(n.bindings.dragRotateZ,c,d),g=l.a.match(n.bindings.dragPan,c,d),v=l.a.match(n.bindings.dragZoom,c,d),y=l.a.match(n.bindings.dragFocus,c,d),j=l.a.match(n.bindings.dragFocusZoom,c,d);(function(e,t){i.f.set(L,(e-.5*s.width-s.x)/(.5*s.width),(s.height+2*(s.y-t))/s.width)})(o,u),function(e,t){i.f.set(B,(e-s.x)/s.width,(t-s.y)/s.height)}(o,u),p&&(h&&(i.f.copy(O,L),i.f.copy(x,O)),m&&(i.f.copy(w,L),i.f.copy(_,w)),(v||j)&&(i.f.copy(A,B),i.f.copy(E,A)),y&&(i.f.copy(P,B),i.f.copy(T,P)),g&&(i.f.copy(I,B),i.f.copy(k,I)));h&&i.f.copy(O,L);m&&i.f.copy(w,L);(v||j)&&i.f.copy(E,B);y&&i.f.copy(T,B);if(j){var S=i.g.distance(t.state.position,t.state.target);t.setState({radius:S/5})}g&&i.f.copy(k,B)})),f=e.interactionEnd.subscribe((function(){b=!1})),m=e.wheel.subscribe((function(e){var t=e.x,r=e.y,a=e.dx,i=e.dy,o=e.dz,s=e.buttons,u=e.modifiers;if(Y(t,r))return;var d=Object(c.a)(a,i,o);l.a.match(n.bindings.scrollZoom,s,u)&&(E[1]+=1e-4*d);l.a.match(n.bindings.scrollFocus,s,u)&&(T[1]+=1e-4*d)})),g=e.pinch.subscribe((function(e){var t=e.fraction,r=e.buttons,a=e.modifiers;l.a.match(n.bindings.scrollZoom,r,a)&&(b=!0,E[1]+=.1*(t-1))})),b=!1,v=Object(i.g)(),y=Object(i.g)(),x=Object(i.f)(),O=Object(i.f)(),j=Object(i.g)(),S=0,_=Object(i.f)(),w=Object(i.f)(),C=0,A=Object(i.f)(),E=Object(i.f)(),P=Object(i.f)(),T=Object(i.f)(),I=Object(i.f)(),k=Object(i.f)(),M=i.g.clone(t.target),D=i.g.clone(t.position),R=i.g.clone(t.up),B=Object(i.f)(),L=Object(i.f)(),N=Object(i.g)(),F=Object(i.d)(),z=Object(i.g)(),U=Object(i.g)(),V=Object(i.g)(),H=Object(i.g)(),G=Object(i.d)(),q=Object(i.f)(),W=Object(i.g)(),X=Object(i.g)();function Y(t,r){return t*=e.pixelRatio,r*=e.pixelRatio,t>s.x+s.width||e.height-r>s.y+s.height||t0&&function(e){if(0===n.spinSpeed)return;var t=(n.spinSpeed||0)/1e3;Z[0]=60*Math.min(Math.abs(e),125)/1e3*t,b||i.f.add(O,x,Z)}(r-K),i.g.sub(y,t.position,t.target),function(){var r=O[0]-x[0],a=O[1]-x[1];i.g.set(H,r,a,0);var o=e.width/e.height,s=i.g.magnitude(H)*n.rotateSpeed*e.pixelRatio*o;s?(i.g.sub(y,t.position,t.target),i.g.normalize(z,y),i.g.normalize(U,t.up),i.g.normalize(V,i.g.cross(V,U,z)),i.g.setMagnitude(U,U,a),i.g.setMagnitude(V,V,r),i.g.add(H,U,V),i.g.normalize(N,i.g.cross(N,H,y)),i.d.setAxisAngle(F,N,s),i.g.transformQuat(y,y,F),i.g.transformQuat(t.up,t.up,F),i.g.copy(j,N),S=s):!n.staticMoving&&S&&(S*=Math.sqrt(1-n.dynamicDampingFactor),i.g.sub(y,t.position,t.target),i.d.setAxisAngle(F,j,S),i.g.transformQuat(y,y,F),i.g.transformQuat(t.up,t.up,F)),i.f.copy(x,O)}(),a=w[0]-_[0],o=w[1]-_[1],(s=n.rotateSpeed*(-a+o)*-.05)?(i.g.sub(y,t.position,t.target),i.d.setAxisAngle(G,y,s),i.g.transformQuat(t.up,t.up,G),C=s):!n.staticMoving&&C&&(C*=Math.sqrt(1-n.dynamicDampingFactor),i.g.sub(y,t.position,t.target),i.d.setAxisAngle(G,y,C),i.g.transformQuat(t.up,t.up,G)),i.f.copy(_,w),1!==(u=1+(E[1]-A[1])*n.zoomSpeed)&&u>0&&i.g.scale(y,y,u),n.staticMoving?i.f.copy(A,E):A[1]+=(E[1]-A[1])*n.dynamicDampingFactor,function(){var e=(T[1]-P[1])*n.zoomSpeed;if(0!==e){var r=Math.max(1,t.state.radius+t.state.radius*e);t.setState({radius:r})}n.staticMoving?i.f.copy(P,T):P[1]+=(T[1]-P[1])*n.dynamicDampingFactor}(),function(){if(i.f.sub(q,i.f.copy(q,k),I),i.f.squaredMagnitude(q)){var r=e.pixelRatio*n.panSpeed;q[0]*=1/t.zoom*t.viewport.width*r,q[1]*=1/t.zoom*t.viewport.height*r,i.g.cross(X,i.g.copy(X,y),t.up),i.g.setMagnitude(X,X,q[0]),i.g.setMagnitude(W,t.up,q[1]),i.g.add(X,X,W),i.g.add(t.position,t.position,X),i.g.add(t.target,t.target,X),n.staticMoving?i.f.copy(I,k):(i.f.sub(q,k,I),i.f.scale(q,q,n.dynamicDampingFactor),i.f.add(I,I,q))}}(),i.g.add(t.position,t.target,y),c=Math.min(Math.max(1e3*t.state.radiusMax,.01),n.maxDistance),i.g.squaredMagnitude(y)>c*c&&(i.g.setMagnitude(y,y,c),i.g.add(t.position,t.target,y),i.f.copy(A,E),i.f.copy(P,T)),i.g.squaredMagnitude(y)i.a&&i.g.copy(v,t.position),K=r)}var Z=i.f.create(.005,0);return{viewport:s,get props(){return n},setProps:function(e){Object.assign(n,e)},start:function(e){K=-1,Q(e)},update:Q,reset:function(){i.g.copy(t.target,M),i.g.copy(t.position,D),i.g.copy(t.up,R),i.g.sub(y,t.position,t.target),i.g.copy(v,t.position)},dispose:function(){d||(d=!0,p.unsubscribe(),m.unsubscribe(),g.unsubscribe(),f.unsubscribe())}}}}(n||(n={}))},function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var n=r(591),a=r(728),i=r(736),o=r(574),s=function(){function e(e,t,r,o,s){var u=this;void 0===s&&(s=30),this.canvasIdentify=e,this.getLoci=t,this.input=r,this.camera=o,this.maxFps=s,this.ev=i.a.create(),this.events={hover:this.ev(),drag:this.ev(),click:this.ev()},this.startX=-1,this.startY=-1,this.endX=-1,this.endY=-1,this.id=void 0,this.position=void 0,this.currentIdentifyT=0,this.isInteracting=!1,this.prevLoci=n.a.Loci.Empty,this.prevT=0,this.inside=!1,this.buttons=a.a.create(0),this.button=a.a.create(0),this.modifiers=a.c.None,r.drag.subscribe((function(e){var t=e.x,r=e.y,n=e.buttons,a=e.button,i=e.modifiers;u.isInteracting=!0,u.drag(t,r,n,a,i)})),r.move.subscribe((function(e){var t=e.x,r=e.y,n=e.inside,a=e.buttons,i=e.button,o=e.modifiers;n&&!u.isInteracting&&u.move(t,r,a,i,o)})),r.leave.subscribe((function(){u.leave()})),r.click.subscribe((function(e){var t=e.x,r=e.y,n=e.buttons,a=e.button,i=e.modifiers;u.outsideViewport(t,r)||u.click(t,r,n,a,i)})),r.interactionEnd.subscribe((function(){u.isInteracting=!1})),r.modifiers.subscribe((function(e){u.modify(e)}))}return e.prototype.identify=function(e,t){var r=this.startX!==this.endX||this.startY!==this.endY;if(2!==e){if(r){var a=this.canvasIdentify(this.endX,this.endY);this.id=null==a?void 0:a.id,this.position=null==a?void 0:a.position,this.startX=this.endX,this.startY=this.endY}if(1===e){var i=this.getLoci(this.id);return this.events.click.next({current:i,buttons:this.buttons,button:this.button,modifiers:this.modifiers,page:o.f.create(this.endX,this.endY),position:this.position}),void(this.prevLoci=i)}if(this.inside&&this.currentIdentifyT===t&&r&&!this.outsideViewport(this.endX,this.endY)){var s=this.getLoci(this.id);this.events.hover.next({current:s,buttons:this.buttons,button:this.button,modifiers:this.modifiers,page:o.f.create(this.endX,this.endY),position:this.position}),this.prevLoci=s}}else r&&!n.a.Loci.isEmpty(this.prevLoci)&&(this.events.drag.next({current:this.prevLoci,buttons:this.buttons,button:this.button,modifiers:this.modifiers,pageStart:o.f.create(this.startX,this.startY),pageEnd:o.f.create(this.endX,this.endY)}),this.startX=this.endX,this.startY=this.endY)},e.prototype.tick=function(e){this.inside&&e-this.prevT>1e3/this.maxFps&&(this.prevT=e,this.currentIdentifyT=e,this.identify(this.isInteracting?2:0,e))},e.prototype.leave=function(){this.inside=!1,n.a.Loci.isEmpty(this.prevLoci)||(this.prevLoci=n.a.Loci.Empty,this.events.hover.next({current:this.prevLoci,buttons:this.buttons,button:this.button,modifiers:this.modifiers}))},e.prototype.move=function(e,t,r,n,a){this.inside=!0,this.buttons=r,this.button=n,this.modifiers=a,this.endX=e,this.endY=t},e.prototype.click=function(e,t,r,n,a){this.endX=e,this.endY=t,this.buttons=r,this.button=n,this.modifiers=a,this.identify(1,0)},e.prototype.drag=function(e,t,r,n,a){this.endX=e,this.endY=t,this.buttons=r,this.button=n,this.modifiers=a,this.identify(2,0)},e.prototype.modify=function(e){a.c.areEqual(e,this.modifiers)||(this.modifiers=e,this.events.hover.next({current:this.prevLoci,buttons:this.buttons,button:this.button,modifiers:this.modifiers,page:o.f.create(this.endX,this.endY),position:this.position}))},e.prototype.outsideViewport=function(e,t){var r=this.input,n=this.camera.viewport;return e*=r.pixelRatio,t*=r.pixelRatio,e>n.x+n.width||r.height-t>n.y+n.height||e.msp-material-icon,.msp-plugin .msp-control-row button>.msp-material-icon{margin-left:0;margin-right:.4em}.msp-plugin .msp-btn-childless>.msp-material-icon{margin-left:0;margin-right:0}.msp-plugin .msp-btn-icon{border:none;height:32px;width:32px;line-height:32px;padding:0;text-align:center}.msp-plugin .msp-btn-icon:hover{color:#ae5d04;background-color:#e9e6e0;border:none;outline-offset:-1px !important;outline:1px solid #c9c3b3 !important}.msp-plugin .msp-btn-icon[disabled],.msp-plugin .msp-btn-icon[disabled]:hover,.msp-plugin .msp-btn-icon[disabled]:active{color:#9c835f}.msp-plugin .msp-btn-icon-small{border:none;height:32px;width:20px;line-height:32px;padding:0;text-align:center}.msp-plugin .msp-btn-icon-small:hover{color:#ae5d04;background-color:#e9e6e0;border:none;outline-offset:-1px !important;outline:1px solid #c9c3b3 !important}.msp-plugin .msp-btn-icon-small[disabled],.msp-plugin .msp-btn-icon-small[disabled]:hover,.msp-plugin .msp-btn-icon-small[disabled]:active{color:#9c835f}.msp-plugin .msp-btn-link{font-weight:normal;border-radius:0}.msp-plugin .msp-btn-link,.msp-plugin .msp-btn-link:active,.msp-plugin .msp-btn-link.active,.msp-plugin .msp-btn-link[disabled],fieldset[disabled] .msp-plugin .msp-btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.msp-plugin .msp-btn-link,.msp-plugin .msp-btn-link:hover,.msp-plugin .msp-btn-link:focus,.msp-plugin .msp-btn-link:active{border-color:transparent}.msp-plugin .msp-btn-link:hover,.msp-plugin .msp-btn-link:focus{text-decoration:none;background-color:transparent}.msp-plugin .msp-btn-link[disabled]:hover,.msp-plugin .msp-btn-link[disabled]:focus,fieldset[disabled] .msp-plugin .msp-btn-link:hover,fieldset[disabled] .msp-plugin .msp-btn-link:focus{text-decoration:none}.msp-plugin .msp-btn-link .msp-icon{font-size:100%}.msp-plugin .msp-btn-link,.msp-plugin .msp-btn-link:active,.msp-plugin .msp-btn-link:focus{color:#332b1f;text-decoration:none}.msp-plugin .msp-btn-link:hover{color:#ae5d04;text-decoration:none}.msp-plugin .msp-btn-link-toggle-on{color:#332b1f}.msp-plugin .msp-btn-link-toggle-off,.msp-plugin .msp-btn-link-toggle-off:active,.msp-plugin .msp-btn-link-toggle-off:focus{color:#9c835f !important}.msp-plugin .msp-btn-link-toggle-off:hover,.msp-plugin .msp-btn-link-toggle-on:hover{color:#ae5d04 !important}.msp-plugin .msp-btn-action,.msp-plugin .msp-btn-action:active,.msp-plugin .msp-btn-action:focus{color:#332b1f;background:#f3f2ee}.msp-plugin .msp-btn-action:hover{color:#ae5d04;background:#f9f8f6}.msp-plugin .msp-btn-action[disabled],.msp-plugin .msp-btn-action[disabled]:hover,.msp-plugin .msp-btn-action[disabled]:active,.msp-plugin .msp-btn-action[disabled]:focus{color:#362e21}.msp-plugin .msp-btn-commit-on,.msp-plugin .msp-btn-commit-on:active,.msp-plugin .msp-btn-commit-on:focus{color:#974102;background:#f2f1ed}.msp-plugin .msp-btn-commit-on:hover{color:#ae5d04;background:#f8f7f4}.msp-plugin .msp-btn-commit-on[disabled],.msp-plugin .msp-btn-commit-on[disabled]:hover,.msp-plugin .msp-btn-commit-on[disabled]:active,.msp-plugin .msp-btn-commit-on[disabled]:focus{color:#9c4302}.msp-plugin .msp-btn-commit-off,.msp-plugin .msp-btn-commit-off:active,.msp-plugin .msp-btn-commit-off:focus{color:#332b1f;background:#f6f5f3}.msp-plugin .msp-btn-commit-off:hover{color:#ae5d04;background:#fcfbfa}.msp-plugin .msp-btn-commit-off[disabled],.msp-plugin .msp-btn-commit-off[disabled]:hover,.msp-plugin .msp-btn-commit-off[disabled]:active,.msp-plugin .msp-btn-commit-off[disabled]:focus{color:#362e21}.msp-plugin .msp-btn-remove:hover{color:#F2F4F7}.msp-plugin .msp-btn-commit-on:hover{color:#fc6c03}.msp-plugin .msp-btn-action{height:32px;line-height:32px}.msp-plugin input[type="file"]{display:block}.msp-plugin input[type="range"]{display:block;width:100%}.msp-plugin select[multiple],.msp-plugin select[size]{height:auto}.msp-plugin textarea.msp-form-control,.msp-plugin textarea.msp-btn{height:auto}.msp-plugin .msp-control-top-offset{margin-top:1px}.msp-plugin .msp-btn-commit{text-align:right;padding-top:0;padding-bottom:0;padding-right:10px;padding-left:0;line-height:32px;border:none;overflow:hidden;font-weight:bold}.msp-plugin .msp-btn-commit .msp-icon{display:block-inline;line-height:32px;width:32px;text-align:center}.msp-plugin select.msp-form-control,.msp-plugin select.msp-btn,.msp-plugin .msp-control-row select{background:none;background-color:#f3f2ee;background-size:8px 12px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAUCAMAAACzvE1FAAAADFBMVEUzMzMzMzMzMzMzMzMKAG/3AAAAA3RSTlMAf4C/aSLHAAAAPElEQVR42q3NMQ4AIAgEQTn//2cLdRKppSGzBYwzVXvznNWs8C58CiussPJj8h6NwgorrKRdTvuV9v16Afn0AYFOB7aYAAAAAElFTkSuQmCC);background-repeat:no-repeat;background-position:right 10px center;padding-right:24px}.msp-plugin select.msp-form-control:-moz-focusring,.msp-plugin select.msp-btn:-moz-focusring,.msp-plugin .msp-control-row select:-moz-focusring{color:transparent;text-shadow:0 0 0 #332b1f}.msp-plugin .msp-default-bg{background:#eeece7}.msp-plugin .msp-transparent-bg{background:transparent}.msp-plugin .msp-no-hover-outline:hover{color:#ae5d04;background-color:inherit;border:none;outline-offset:0 !important;outline:none !important}.msp-plugin .msp-icon-inline{margin-right:8px}.msp-plugin .msp-control-row{position:relative;height:32px;background:#eeece7;margin-top:1px}.msp-plugin .msp-control-row>span.msp-control-row-label,.msp-plugin .msp-control-row>button.msp-control-button-label{line-height:32px;display:block;width:120px;text-align:right;padding:0 10px;color:#63533c;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;cursor:default}.msp-plugin .msp-control-row>button.msp-control-button-label{background:#eeece7;cursor:pointer}.msp-plugin .msp-control-row .msp-control-current{background:#eeece7}.msp-plugin .msp-control-row>div.msp-control-row-ctrl{position:absolute;left:120px;top:0;right:0;bottom:0}.msp-plugin .msp-control-row>div{background:#f3f2ee}.msp-plugin .msp-control-row>.msp-flex-row{background:#eeece7}.msp-plugin .msp-control-label-short>span{width:80px !important}.msp-plugin .msp-control-label-short>div:nth-child(2){left:80px !important}.msp-plugin .msp-control-col-2{float:left;width:50%}.msp-plugin .msp-control-group{position:relative}.msp-plugin .msp-toggle-button .msp-icon{display:inline-block;margin-right:6px}.msp-plugin .msp-toggle-button>div>button:hover{border-color:#e9e6e0 !important;border:none;outline-offset:-1px !important;outline:1px solid #c9c3b3 !important}.msp-plugin .msp-slider>div:first-child{position:absolute;top:0;left:18px;bottom:0;right:62px;display:flex}.msp-plugin .msp-slider>div:last-child{position:absolute;height:32px;line-height:32px;text-align:center;right:0;width:50px;top:0;bottom:0}.msp-plugin .msp-slider input[type=text]{padding-right:6px;padding-left:4px;font-size:80%;text-align:right}.msp-plugin .msp-slider2>div:first-child{position:absolute;height:32px;line-height:32px;text-align:center;left:0;width:25px;top:0;bottom:0;font-size:80%}.msp-plugin .msp-slider2>div:nth-child(2){position:absolute;top:0;left:35px;bottom:0;right:37px;display:flex}.msp-plugin .msp-slider2>div:last-child{position:absolute;height:32px;line-height:32px;text-align:center;right:0;width:25px;top:0;bottom:0;font-size:80%}.msp-plugin .msp-slider2 input[type=text]{padding-right:4px;padding-left:4px;font-size:80%;text-align:center}.msp-plugin .msp-toggle-color-picker button{border:10px solid #f3f2ee !important;margin:0;text-align:center;padding-right:10px;padding-left:10px}.msp-plugin .msp-toggle-color-picker button:hover{border-color:#e9e6e0 !important;border:none;outline-offset:-1px !important;outline:1px solid #c9c3b3 !important}.msp-plugin .msp-toggle-color-picker .msp-color-picker{position:absolute;z-index:100000;background:#eeece7;border-top:1px solid #eeece7;padding-bottom:5px;width:100%}.msp-plugin .msp-toggle-color-picker-above .msp-color-picker{top:-85px;height:85px}.msp-plugin .msp-toggle-color-picker-below .msp-color-picker{top:32px;height:80px}.msp-plugin .msp-control-offset{padding-left:10px}.msp-plugin .msp-accent-offset{padding-left:1px;margin-left:8px;border-left:2px solid #e98b39}.msp-plugin .msp-control-group-wrapper{margin-bottom:0px;margin-top:1px}.msp-plugin .msp-control-group-header{background:#eeece7}.msp-plugin .msp-control-group-header>button,.msp-plugin .msp-control-group-header div{padding-left:4px;text-align:left;height:24px !important;line-height:24px !important;font-size:85% !important;background:#eeece7 !important;color:#63533c}.msp-plugin .msp-control-group-header .msp-icon{height:24px !important;line-height:24px !important}.msp-plugin .msp-control-group-header>span{padding-left:5px;line-height:21.33333px;font-size:70%;background:#eeece7;color:#63533c}.msp-plugin .msp-control-current{background:#eeece7}.msp-plugin .msp-control-group-footer{background:#e3e0d8;height:5px;font-size:1px;margin-top:1px}.msp-plugin .msp-control-group-expander{display:block;position:absolute;line-height:32px;padding:0;left:0;top:0;width:120px;text-align:left;background:transparent}.msp-plugin .msp-control-group-expander .msp-icon{line-height:29px;width:31px;text-align:center;font-size:100%}.msp-plugin .msp-plugin-layout_controls{position:absolute;left:10px;top:10px}.msp-plugin .msp-plugin-layout_controls>button:first-child{margin-right:6px}.msp-plugin .msp-empty-control{display:none}.msp-plugin .msp-control .msp-btn-block,.msp-plugin .msp-control .msp-control-row button,.msp-plugin .msp-control-row .msp-control button{margin-bottom:0px;margin-top:0px}.msp-plugin .msp-row-text{height:32px;position:relative;background:#eeece7;margin-top:1px}.msp-plugin .msp-row-text>div{line-height:32px;text-align:center;color:#63533c}.msp-plugin .msp-help span{display:none}.msp-plugin .msp-help:hover span{display:inline-block;background:linear-gradient(#eeece7, rgba(238,236,231,0.8))}.msp-plugin .msp-help-text{position:relative;background:#eeece7;margin-top:1px}.msp-plugin .msp-help-text>div{padding:5px 10px;text-align:left;color:#63533c}.msp-plugin .msp-help-description{font-style:italic}.msp-plugin .msp-help-legend{padding-top:10px}.msp-plugin .msp-scale-legend>div{width:100%;height:30px}.msp-plugin .msp-scale-legend>div>span{padding:5px;color:white;font-weight:bold;background-color:rgba(0,0,0,0.2)}.msp-plugin .msp-table-legend>div{margin-right:5px;display:inline-flex}.msp-plugin .msp-table-legend>div .msp-table-legend-color{width:30px;height:20px}.msp-plugin .msp-table-legend>div .msp-table-legend-text{margin:0 5px}.msp-plugin .msp-image-preview{position:relative;background:#eeece7;margin-top:1px;padding:10px}.msp-plugin .msp-image-preview canvas{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.msp-plugin .msp-image-preview>span{margin-top:6px;display:block;text-align:center;font-size:80%;line-height:15px}.msp-plugin .msp-copy-image-wrapper{position:relative}.msp-plugin .msp-copy-image-wrapper div{font-weight:bold;padding:3px;margin:1px 0;width:100%;background:#f3f2ee;text-align:center}.msp-plugin .msp-copy-image-wrapper img{margin-top:1px}.msp-plugin .msp-slider-base{position:relative;height:14px;padding:5px 0;width:100%;border-radius:6px;align-self:center;box-sizing:border-box;-webkit-tap-highlight-color:rgba(0,0,0,0)}.msp-plugin .msp-slider-base *{box-sizing:border-box;-webkit-tap-highlight-color:rgba(0,0,0,0)}.msp-plugin .msp-slider-base-rail{position:absolute;width:100%;background-color:#e0ddd4;height:4px;border-radius:2px}.msp-plugin .msp-slider-base-track{position:absolute;left:0;height:4px;border-radius:6px;background-color:tint(#332b1f, 60%)}.msp-plugin .msp-slider-base-handle{position:absolute;margin-left:-11px;margin-top:-9px;width:22px;height:22px;cursor:pointer;border-radius:50%;background-color:#332b1f;border:4px solid #e0ddd4}.msp-plugin .msp-slider-base-handle:hover{background-color:#ae5d04}.msp-plugin .msp-slider-base-mark{position:absolute;top:18px;left:0;width:100%;font-size:12px}.msp-plugin .msp-slider-base-mark-text{position:absolute;display:inline-block;vertical-align:middle;text-align:center;cursor:pointer;color:#999}.msp-plugin .msp-slider-base-mark-text-active{color:#666}.msp-plugin .msp-slider-base-step{position:absolute;width:100%;height:4px;background:transparent}.msp-plugin .msp-slider-base-dot{position:absolute;bottom:-2px;margin-left:-4px;width:8px;height:8px;border:2px solid #e9e9e9;background-color:#fff;cursor:pointer;border-radius:50%;vertical-align:middle}.msp-plugin .msp-slider-base-dot:first-child{margin-left:-4px}.msp-plugin .msp-slider-base-dot:last-child{margin-left:-4px}.msp-plugin .msp-slider-base-dot-active{border-color:tint(#332b1f, 50%)}.msp-plugin .msp-slider-base-disabled{background:#eeece7;opacity:0.35}.msp-plugin .msp-slider-base-disabled .msp-slider-base-handle,.msp-plugin .msp-slider-base-disabled .msp-slider-base-dot{cursor:not-allowed}.msp-plugin .msp-slider-base-disabled .msp-slider-base-mark-text,.msp-plugin .msp-slider-base-disabled .msp-slider-base-dot{cursor:not-allowed !important}.msp-plugin .msp-description{padding:10px;font-size:85%;background:#eeece7;text-align:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;font-weight:light;cursor:default}.msp-plugin .msp-description:not(:first-child){border-top:1px solid #e0ddd4}.msp-plugin .msp-color-picker input{color:black !important}.msp-plugin .msp-no-webgl{position:absolute;width:100%;height:100%;left:0;top:0;display:table;text-align:center;background:#eeece7}.msp-plugin .msp-no-webgl>div{display:table-cell;vertical-align:middle;text-align:center;width:100%;height:100%}.msp-plugin .msp-no-webgl>div b{font-size:120%}.msp-plugin .msp-loader-msp-btn-file{position:relative;overflow:hidden}.msp-plugin .msp-loader-msp-btn-file input[type=file]{position:absolute;top:0;right:0;min-width:100%;min-height:100%;font-size:100px;text-align:right;filter:alpha(opacity=0);opacity:0;outline:none;background:white;cursor:inherit;display:block}.msp-plugin .msp-controls-section{margin-bottom:10px}.msp-plugin .msp-combined-color-button{border:4px solid #f3f2ee !important;margin:0;text-align:center;padding-right:10px;padding-left:10px}.msp-plugin .msp-combined-color-button:hover{border-color:#e9e6e0 !important;border:none;outline-offset:-1px !important;outline:1px solid #c9c3b3 !important}.msp-plugin .msp-combined-color-swatch{width:100%;display:grid;grid-gap:1px;grid-template-columns:repeat(6, auto)}.msp-plugin .msp-combined-color-swatch .msp-btn:hover,.msp-plugin .msp-combined-color-swatch .msp-control-row button:hover,.msp-plugin .msp-control-row .msp-combined-color-swatch button:hover{outline-offset:-1px !important;outline:1px solid #c9c3b3 !important}.msp-plugin .msp-action-select{position:relative}.msp-plugin .msp-action-select select{padding-left:42px}.msp-plugin .msp-action-select option:first-child{color:#63533c}.msp-plugin .msp-action-select>.msp-icon{display:block;top:0;left:10px;position:absolute;line-height:32px}.msp-plugin .msp-simple-help-section{height:28px;line-height:28px;margin-top:5px;margin-bottom:5px;padding:0 10px;font-weight:500;background:#eeece7;color:#332b1f}.msp-plugin .msp-left-panel-controls-buttons{position:absolute;width:32px;top:0;bottom:0;padding-top:10px;background:#eeece7}.msp-plugin .msp-left-panel-controls-buttons-bottom{position:absolute;bottom:0}.msp-plugin .msp-left-panel-controls-button-data-dirty{position:absolute;width:6px;height:6px;background:#e98b39;border-radius:3px;right:6px;bottom:6px}.msp-plugin .msp-left-panel-controls .msp-scrollable-container{left:33px}.msp-plugin .msp-mapped-parameter-group{position:relative}.msp-plugin .msp-mapped-parameter-group>.msp-control-row:first-child>div:nth-child(2){right:33px}.msp-plugin .msp-mapped-parameter-group>button:first-child{right:33px}.msp-plugin .msp-mapped-parameter-group>.msp-btn-icon{position:absolute;right:0;width:32px;top:0;padding:0}.msp-plugin .msp-shape-filled{fill:#332b1f;stroke:#332b1f}.msp-plugin .msp-shape-empty{fill:none;stroke:#332b1f}.msp-plugin .msp-no-overflow{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.msp-plugin .msp-25-lower-contrast-text{color:#826e4f}.msp-plugin .msp-expandable-group-color-stripe{position:absolute;left:0;top:30px;width:120px;height:2px}.msp-plugin .msp-section-header{height:32px;line-height:32px;margin-top:10px;margin-bottom:10px;text-align:right;padding:0 10px;font-weight:bold;background:#eeece7;overflow:hidden;cursor:default}.msp-plugin .msp-section-header>.msp-icon{display:block;float:left}.msp-plugin .msp-section-header>small{font-weight:normal}.msp-plugin .msp-current-header{height:32px;line-height:32px;margin-bottom:10px;text-align:center;font-weight:bold;background:#eeece7}.msp-plugin .msp-flex-row{margin-top:1px;background:#eeece7;display:flex;flex-direction:row;width:inherit;height:32px}.msp-plugin .msp-flex-row>.msp-flex-item{margin:0;flex:1 1 auto;margin-right:1px;overflow:hidden}.msp-plugin .msp-flex-row>.msp-flex-item:last-child{margin-right:0}.msp-plugin .msp-flex-row>select,.msp-plugin .msp-flex-row>button{margin:0;flex:1 1 auto;margin-right:1px;height:32px;overflow:hidden}.msp-plugin .msp-flex-row .msp-btn-icon,.msp-plugin .msp-flex-row .msp-btn-icon-small{flex:0 0 32px;max-width:32px}.msp-plugin .msp-flex-row>select{background:none}.msp-plugin .msp-flex-row>select>option[value=_]{display:none}.msp-plugin .msp-flex-row>select:last-child,.msp-plugin .msp-flex-row>button:last-child{margin-right:0}.msp-plugin .msp-flex-row>button.msp-control-button-label{background:#eeece7}.msp-plugin .msp-state-list{list-style:none}.msp-plugin .msp-state-list>li{position:relative;overflow:hidden}.msp-plugin .msp-state-list>li>button:first-child{text-align:left;border-left:10px solid #d5d0c3 !important}.msp-plugin .msp-state-list>li>div{position:absolute;right:0;top:0}.msp-plugin .msp-tree-row{position:relative;margin-top:0;margin-bottom:1px;background:transparent}.msp-plugin .msp-tree-row-current .msp-btn-tree-label{border-radius:0 !important}.msp-plugin .msp-tree-row-current .msp-btn-tree-label>span{font-weight:bold}.msp-plugin .msp-tree-row .msp-btn-tree-label{text-align:left;border-radius:0 0 0 8px;border-left-width:4px;border-left-style:solid}.msp-plugin .msp-tree-row .msp-btn-tree-label>small{color:#726046}.msp-plugin .msp-tree-updates-wrapper .msp-control-group-header:last-child{margin-bottom:1px}.msp-plugin .msp-viewport-top-left-controls{position:absolute;left:10px;top:10px}.msp-plugin .msp-viewport-top-left-controls .msp-traj-controls{line-height:32px;float:left;margin-right:10px;background-color:#f3f2ee}.msp-plugin .msp-viewport-top-left-controls .msp-traj-controls>span{color:#332b1f;margin-left:10px;margin-right:10px;font-size:85%;display:inline-block}.msp-plugin .msp-viewport-top-left-controls .msp-state-snapshot-viewport-controls{line-height:32px;float:left;margin-right:10px}.msp-plugin .msp-viewport-top-left-controls .msp-state-snapshot-viewport-controls>button{background-color:#f3f2ee}.msp-plugin .msp-viewport-top-left-controls .msp-state-snapshot-viewport-controls>select{display:inline-block;width:200px;margin-right:10px}.msp-plugin .msp-viewport-top-left-controls .msp-animation-viewport-controls{line-height:32px;float:left;margin-right:10px;position:relative}.msp-plugin .msp-viewport-top-left-controls .msp-animation-viewport-controls>div:first-child{position:relative;display:inline-block}.msp-plugin .msp-viewport-top-left-controls .msp-animation-viewport-controls>div:first-child>button{position:relative}.msp-plugin .msp-viewport-top-left-controls .msp-animation-viewport-controls .msp-animation-viewport-controls-select{width:290px;position:absolute;left:0;margin-top:10px;background:#e0ddd4}.msp-plugin .msp-viewport-top-left-controls .msp-animation-viewport-controls .msp-animation-viewport-controls-select .msp-control-row:first-child{margin-top:0}.msp-plugin .msp-selection-viewport-controls{position:relative;margin:10px auto 0 auto;width:430px}.msp-plugin .msp-selection-viewport-controls-actions{position:absolute;width:100%;top:32px;background:#e0ddd4}.msp-plugin .msp-selection-viewport-controls>.msp-flex-row .msp-btn,.msp-plugin .msp-selection-viewport-controls>.msp-flex-row .msp-control-row button,.msp-plugin .msp-control-row .msp-selection-viewport-controls>.msp-flex-row button{padding:0 5px}.msp-plugin .msp-selection-viewport-controls select.msp-form-control,.msp-plugin .msp-selection-viewport-controls select.msp-btn,.msp-plugin .msp-selection-viewport-controls .msp-control-row select,.msp-plugin .msp-control-row .msp-selection-viewport-controls select{padding:0 5px;text-align:center;background:#f3f2ee;flex:0 0 80px;text-overflow:ellipsis}.msp-plugin .msp-param-object-list-item{margin-top:1px;position:relative}.msp-plugin .msp-param-object-list-item>button{text-align:left}.msp-plugin .msp-param-object-list-item>button>span{font-weight:bold}.msp-plugin .msp-param-object-list-item>div{position:absolute;right:0;top:0}.msp-plugin .msp-state-actions .msp-transform-wrapper:last-child{margin-bottom:10px}.msp-plugin .msp-button-row{display:flex;flex-direction:row;height:32px;width:inherit}.msp-plugin .msp-button-row>button{margin:0;flex:1 1 auto;margin-right:1px;height:32px;text-align-last:center;background:none;padding:0 10px;overflow:hidden}.msp-plugin .msp-action-menu-options-no-header,.msp-plugin .msp-action-menu-options .msp-control-group-children{max-height:300px;overflow:hidden;overflow-y:auto}.msp-plugin .msp-action-menu-options .msp-control-row,.msp-plugin .msp-action-menu-options button,.msp-plugin .msp-action-menu-options .msp-icon,.msp-plugin .msp-action-menu-options .msp-flex-row{height:24px;line-height:24px}.msp-plugin .msp-action-menu-options button{text-align:left}.msp-plugin .msp-action-menu-options .msp-action-menu-button{margin-top:1px;display:flex}.msp-plugin .msp-action-menu-options .msp-action-menu-button .msp-icon{margin-right:6px}.msp-plugin .msp-representation-entry{position:relative}.msp-plugin .msp-representation-entry>.msp-control-group-header>.msp-btn,.msp-plugin .msp-control-row .msp-representation-entry>.msp-control-group-header>button{font-weight:bold}.msp-plugin .msp-representation-entry>.msp-control-group-header>.msp-icon,.msp-plugin .msp-representation-entry>.msp-control-group-header>.msp-btn-link{line-height:24px;height:24px}.msp-plugin .msp-parameter-matrix input{flex:1 1 auto;min-width:0}.msp-plugin .msp-btn-apply-simple{text-align:left}.msp-plugin .msp-btn-apply-simple .msp-icon{margin-right:10px}.msp-plugin .msp-type-class-Root{border-left-color:#eeece7}.msp-plugin .msp-type-class-Group{border-left-color:#e98b39}.msp-plugin .msp-type-class-Data{border-left-color:#bfc8c9}.msp-plugin .msp-type-class-Object{border-left-color:#54d98c}.msp-plugin .msp-type-class-Representation3D{border-left-color:#4aa3df}.msp-plugin .msp-type-class-Behavior{border-left-color:#b07cc6}.msp-plugin .msp-accent-color-cyan{color:#bfc8c9}.msp-plugin .msp-accent-bg-cyan{background:#bfc8c9}.msp-plugin .msp-transform-header-brand-cyan{border-bottom:1px solid #bfc8c9}.msp-plugin .msp-transform-header-brand-cyan:active,.msp-plugin .msp-transform-header-brand-cyan:focus{border-bottom:1px solid #bfc8c9}.msp-plugin .msp-accent-color-red{color:#ef8b80}.msp-plugin .msp-accent-bg-red{background:#ef8b80}.msp-plugin .msp-transform-header-brand-red{border-bottom:1px solid #ef8b80}.msp-plugin .msp-transform-header-brand-red:active,.msp-plugin .msp-transform-header-brand-red:focus{border-bottom:1px solid #ef8b80}.msp-plugin .msp-accent-color-gray{color:#46637f}.msp-plugin .msp-accent-bg-gray{background:#46637f}.msp-plugin .msp-transform-header-brand-gray{border-bottom:1px solid #46637f}.msp-plugin .msp-transform-header-brand-gray:active,.msp-plugin .msp-transform-header-brand-gray:focus{border-bottom:1px solid #46637f}.msp-plugin .msp-accent-color-green{color:#54d98c}.msp-plugin .msp-accent-bg-green{background:#54d98c}.msp-plugin .msp-transform-header-brand-green{border-bottom:1px solid #54d98c}.msp-plugin .msp-transform-header-brand-green:active,.msp-plugin .msp-transform-header-brand-green:focus{border-bottom:1px solid #54d98c}.msp-plugin .msp-accent-color-purple{color:#b07cc6}.msp-plugin .msp-accent-bg-purple{background:#b07cc6}.msp-plugin .msp-transform-header-brand-purple{border-bottom:1px solid #b07cc6}.msp-plugin .msp-transform-header-brand-purple:active,.msp-plugin .msp-transform-header-brand-purple:focus{border-bottom:1px solid #b07cc6}.msp-plugin .msp-accent-color-blue{color:#4aa3df}.msp-plugin .msp-accent-bg-blue{background:#4aa3df}.msp-plugin .msp-transform-header-brand-blue{border-bottom:1px solid #4aa3df}.msp-plugin .msp-transform-header-brand-blue:active,.msp-plugin .msp-transform-header-brand-blue:focus{border-bottom:1px solid #4aa3df}.msp-plugin .msp-accent-color-orange{color:#e98b39}.msp-plugin .msp-accent-bg-orange{background:#e98b39}.msp-plugin .msp-transform-header-brand-orange{border-bottom:1px solid #e98b39}.msp-plugin .msp-transform-header-brand-orange:active,.msp-plugin .msp-transform-header-brand-orange:focus{border-bottom:1px solid #e98b39}.msp-plugin .msp-volume-channel-inline-controls>:first-child{position:absolute;left:0;top:0;height:32px;right:32px}.msp-plugin .msp-volume-channel-inline-controls .msp-slider>div:first-child{right:42px}.msp-plugin .msp-volume-channel-inline-controls .msp-slider>div:last-child{width:30px}.msp-plugin .msp-volume-channel-inline-controls>button{position:absolute;right:0;width:32px;top:0;padding:0}.msp-plugin .msp-volume-channel-inline-controls>button .msp-material-icon{margin-right:0}.msp-plugin .msp-list-unstyled{padding-left:0;list-style:none}.msp-plugin .msp-task-state{line-height:32px}.msp-plugin .msp-task-state>span{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;cursor:default}.msp-plugin .msp-overlay-tasks{position:absolute;display:flex;top:0;left:0;bottom:0;right:0;height:100%;width:100%;z-index:1000;justify-content:center;align-items:center;background:rgba(0,0,0,0.25)}.msp-plugin .msp-overlay-tasks .msp-task-state>div{height:32px;margin-top:1px;position:relative;width:100%;background:#eeece7}.msp-plugin .msp-overlay-tasks .msp-task-state>div>div{height:32px;line-height:32px;display:inline-block;padding:0 10px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;cursor:default;white-space:nowrap;background:#eeece7;position:absolute}.msp-plugin .msp-overlay-tasks .msp-task-state>div>button{display:inline-block;margin-top:-3px}.msp-plugin .msp-background-tasks{position:absolute;left:0;bottom:0;z-index:1000}.msp-plugin .msp-background-tasks .msp-task-state>div{height:32px;margin-top:1px;position:relative;width:100%;background:#eeece7}.msp-plugin .msp-background-tasks .msp-task-state>div>div{height:32px;line-height:32px;display:inline-block;padding:0 10px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;cursor:default;white-space:nowrap;background:#eeece7;position:absolute}.msp-plugin .msp-background-tasks .msp-task-state>div>button{display:inline-block;margin-top:-3px}.msp-plugin .msp-viewport{position:absolute;left:0;top:0;right:0;bottom:0;background:black}.msp-plugin .msp-viewport .msp-btn-link{background:rgba(0,0,0,0.2)}.msp-plugin .msp-viewport-expanded{position:fixed;z-index:1000}.msp-plugin .msp-viewport-host3d{position:absolute;left:0;top:0;right:0;bottom:0;-webkit-user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-touch-callout:none;touch-action:manipulation}.msp-plugin .msp-viewport-host3d>canvas{background-color:#eeece7;background-image:linear-gradient(45deg, lightgrey 25%, transparent 25%, transparent 75%, lightgrey 75%, lightgrey),linear-gradient(45deg, lightgrey 25%, transparent 25%, transparent 75%, lightgrey 75%, lightgrey);background-size:60px 60px;background-position:0 0, 30px 30px}.msp-plugin .msp-viewport-controls{position:absolute;right:10px;top:10px;width:32px}.msp-plugin .msp-viewport-controls-buttons{text-align:right;position:relative}.msp-plugin .msp-viewport-controls-buttons>div{position:relative;margin-bottom:4px}.msp-plugin .msp-viewport-controls-buttons button{padding:0;text-align:center;width:32px;position:relative}.msp-plugin .msp-viewport-controls-buttons .msp-btn-link-toggle-off{color:#9c835f}.msp-plugin .msp-viewport-controls-buttons .msp-btn-link:hover{color:#ae5d04}.msp-plugin .msp-semi-transparent-background{background:#eeece7;opacity:0.5;position:absolute;top:0;left:0;width:100%;height:100%}.msp-plugin .msp-viewport-controls-panel{width:290px;top:0;right:36px;position:absolute;background:#e0ddd4}.msp-plugin .msp-viewport-controls-panel .msp-control-group-wrapper:first-child{padding-top:0}.msp-plugin .msp-viewport-controls-panel .msp-viewport-controls-panel-controls{overflow-y:auto;max-height:400px}.msp-plugin .msp-highlight-toast-wrapper{position:absolute;right:10px;bottom:10px;max-width:95%;z-index:10000}.msp-plugin .msp-highlight-info{color:#ae5d04;padding:3px 10px;background:#eeece7;text-align:right;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;cursor:default}.msp-plugin .msp-highlight-info-additional{font-size:85%;display:inline-block;color:#fa911e}.msp-plugin .msp-log-wrap{position:absolute;right:0;top:0;left:0;bottom:0;overflow:hidden}.msp-plugin .msp-log{position:absolute;right:-20px;top:0;left:0;bottom:0;overflow-y:scroll;overflow-x:hidden;font-size:90%;background:#e0ddd4}.msp-plugin .msp-log{font-size:90%;color:#433829}.msp-plugin .msp-log ul{padding:0;margin:0}.msp-plugin .msp-log li{clear:both;margin:0;background:#eeece7;position:relative}.msp-plugin .msp-log li:not(:last-child){border-bottom:1px solid #cec9ba}.msp-plugin .msp-log .msp-log-entry{margin-left:110px;background:#ebe8e3;padding:3px 25px 3px 10px}.msp-plugin .msp-log .msp-log-timestamp{padding:3px 10px 3px 10px;float:left;text-align:right;width:110px;color:#726046;font-size:100%}.msp-plugin .msp-log .msp-log-timestamp small{font-size:100%}.msp-plugin .msp-log .label{margin-top:-3px;font-size:7pt}.msp-plugin .msp-log-entry-badge{position:absolute;left:0;top:0;bottom:0;width:6px}.msp-plugin .msp-log-entry-message{background:#0CCA5D}.msp-plugin .msp-log-entry-info{background:#5E3673}.msp-plugin .msp-log-entry-error{background:#FD354B}.msp-plugin .msp-log-entry-warning{background:#FCC937}.msp-plugin .msp-sequence{position:absolute;right:0;top:0;left:0;bottom:0;background:#eeece7}.msp-plugin .msp-sequence-select{position:relative;height:24px;width:100%;margin-bottom:1px;background:#e0ddd4;text-align:left}.msp-plugin .msp-sequence-select>span{display:inline-block;line-height:24px;padding:0 10px;font-size:85%;font-weight:bold;cursor:default}.msp-plugin .msp-sequence-select>select{display:inline-block;max-width:120px;width:auto;text-overflow:ellipsis;font-size:85%;height:24px;line-height:24px;background-size:6px 8px;background-color:#e0ddd4}.msp-plugin .msp-sequence-wrapper{word-break:break-word;padding:10px 10px 3px 10px;user-select:none}.msp-plugin .msp-sequence-wrapper-non-empty{font-size:85%;line-height:180%;font-family:"Courier New", monospace;background:#f3f2ee;width:100%;overflow-y:auto;overflow-x:hidden;position:absolute;top:25px;left:0;bottom:0;right:0}.msp-plugin .msp-sequence-chain-label{margin-left:10px;margin-top:10px;user-select:none;color:#ae5d04;font-size:90%;line-height:90%;padding-left:0.2em}.msp-plugin .msp-sequence-wrapper span{cursor:pointer}.msp-plugin .msp-sequence-wrapper .msp-sequence-residue-long{margin:0em 0.2em 0em 0.2em}.msp-plugin .msp-sequence-wrapper .msp-sequence-residue-long-begin{margin:0em 0.2em 0em 0em}.msp-plugin .msp-sequence-wrapper .msp-sequence-label{color:#ae5d04;font-size:90%;line-height:90%;padding-bottom:1em;padding-left:0.2em}.msp-plugin .msp-sequence-wrapper .msp-sequence-number{color:#ae5d04;word-break:keep-all;cursor:default;position:relative;top:-1.1em;left:3.1em;padding:0px;margin-left:-3em;font-size:80%}.msp-plugin .msp-sequence-wrapper .msp-sequence-number-long{left:3.3em}.msp-plugin .msp-sequence-wrapper .msp-sequence-number-long-negative{left:2.7em}.msp-plugin .msp-sequence-wrapper .msp-sequence-number-negative{left:2.5em}.msp-plugin .msp-sequence-wrapper .msp-sequence-present{color:#332b1f}.msp-plugin .msp-sequence-wrapper .msp-sequence-missing{color:#9c835f}.msp-plugin .msp-transformer .msp-entity-badge{position:absolute;top:0;right:0;height:32px;line-height:32px;width:32px}.msp-plugin .msp-layout-right,.msp-plugin .msp-layout-left{background:#e0ddd4}.msp-plugin .msp-transformer-wrapper{position:relative}.msp-plugin .msp-transformer-wrapper .msp-entity-badge{left:0;top:0}.msp-plugin .msp-transformer-wrapper:first-child .msp-panel-description-content{top:33px}.msp-plugin .msp-transformer-wrapper:not(:first-child) .msp-panel-description-content{bottom:33px}.msp-plugin .msp-transform-wrapper{margin-bottom:10px}.msp-plugin .msp-transform-wrapper-collapsed{margin-bottom:1px}.msp-plugin .msp-transform-update-wrapper{margin-bottom:1px}.msp-plugin .msp-transform-update-wrapper-collapsed{margin-bottom:1px}.msp-plugin .msp-transform-update-wrapper>.msp-transform-header>button,.msp-plugin .msp-transform-update-wrapper-collapsed>.msp-transform-header>button{text-align:left;padding-left:32px;line-height:24px;background:#e9e6e0}.msp-plugin .msp-transform-wrapper>.msp-transform-header>button{text-align:left;background:#eeece7;font-weight:bold;padding-right:5px}.msp-plugin .msp-transform-header{position:relative}.msp-plugin .msp-transform-header>button>small{font-weight:normal;float:right}.msp-plugin .msp-transform-header>button>span:first-child{margin-right:10px}.msp-plugin .msp-transform-header>button:hover{color:#63533c}.msp-plugin .msp-transform-header-brand{margin-bottom:-1px}.msp-plugin .msp-transform-header-brand svg{fill:#332b1f;stroke:#332b1f}.msp-plugin .msp-transform-default-params{background:#eeece7;position:absolute;left:0;top:0;width:32px;padding:0}.msp-plugin .msp-transform-default-params:hover{background:#fff}.msp-plugin .msp-transform-apply-wrap{position:relative;margin-top:1px;width:100%;height:32px}.msp-plugin .msp-transform-refresh{width:87px;margin-left:33px;background:#eeece7;text-align:right}.msp-plugin .msp-transform-apply{display:block;position:absolute;left:120px;right:0;top:0}.msp-plugin .msp-transform-apply-wider{margin-left:33px}.msp-plugin .msp-data-beh{margin:10px 0 !important}.msp-plugin .msp-toast-container{position:relative;z-index:1001}.msp-plugin .msp-toast-container .msp-toast-entry{color:#332b1f;background:#e0ddd4;position:relative;float:right;min-height:32px;margin-top:10px;border:1px solid #cec9ba;display:table}.msp-plugin .msp-toast-container .msp-toast-entry .msp-toast-title{height:100%;line-height:32px;padding:0 10px;background:#eeece7;font-weight:bold;display:table-cell;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;font-weight:light;cursor:pointer}.msp-plugin .msp-toast-container .msp-toast-entry .msp-toast-message{padding:3px 42px 3px 10px;display:table-cell}.msp-plugin .msp-toast-container .msp-toast-entry .msp-toast-message a{text-decoration:none;color:#974102;font-weight:bold}.msp-plugin .msp-toast-container .msp-toast-entry .msp-toast-message a:hover{text-decoration:underline;color:#fc6c03}.msp-plugin .msp-toast-container .msp-toast-entry .msp-toast-message a:active,.msp-plugin .msp-toast-container .msp-toast-entry .msp-toast-message a:focus{color:#974102;outline-offset:0;outline:none}.msp-plugin .msp-toast-container .msp-toast-entry .msp-toast-hide{position:absolute;width:42px;right:0;top:0;bottom:0}.msp-plugin .msp-toast-container .msp-toast-entry .msp-toast-hide .msp-btn-icon{background:transparent;position:absolute;top:1px;right:0;left:0;bottom:0;width:100%;text-align:right;padding-right:5px}.msp-plugin .msp-help-row{position:relative;height:32px;background:#eeece7;margin-top:1px;display:table;width:100%}.msp-plugin .msp-help-row>span{width:120px;text-align:right;padding:3px 10px;color:#63533c;display:table-cell;font-weight:bold;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;cursor:default}.msp-plugin .msp-help-row>div{background:#f3f2ee;position:relative;padding:3px 10px;display:table-cell}.msp-plugin .msp-canvas{width:100%;height:100%;background-color:#f3f2ee}.msp-plugin .msp-canvas text{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.msp-plugin .msp-canvas circle{stroke:black;stroke-width:10;stroke-opacity:.3}.msp-plugin .msp-canvas circle:hover{fill:#ae5d04;stroke:black;stroke-width:10px}.msp-plugin .msp-canvas .info{fill:white;stroke:black;stroke-width:3}.msp-plugin .msp-canvas .show{visibility:visible}.msp-plugin .msp-canvas .hide{visibility:hidden}.msp-plugin .msp-canvas .delete-button rect{fill:#ED4337;stroke:black}.msp-plugin .msp-canvas .delete-button text{stroke:white;fill:white}.msp-plugin .msp-canvas .delete-button:hover{stroke:black;stroke-width:3;fill:#ff6961}.msp-plugin .msp-canvas .infoCircle:hover{fill:#4c66b2}.msp-plugin .msp-canvas:focus{outline:none}.msp-plugin .msp-logo{display:block;position:absolute;bottom:10px;right:10px;height:32px;width:100px;background-repeat:no-repeat;background-position:bottom right;background-size:auto;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFcAAAAgCAYAAABn7+QVAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAACHDwAAjA8AAP1SAACBQAAAfXkAAOmLAAA85QAAGcxzPIV3AAAKL2lDQ1BJQ0MgUHJvZmlsZQAASMedlndUVNcWh8+9d3qhzTACUobeu8AA0nuTXkVhmBlgKAMOMzSxIaICEUVEmiJIUMSA0VAkVkSxEBRUsAckCCgxGEVULG9G1ouurLz38vL746xv7bP3ufvsvc9aFwCSpy+XlwZLAZDKE/CDPJzpEZFRdOwAgAEeYIApAExWRrpfsHsIEMnLzYWeIXICXwQB8HpYvAJw09AzgE4H/5+kWel8geiYABGbszkZLBEXiDglS5Auts+KmBqXLGYYJWa+KEERy4k5YZENPvsssqOY2ak8tojFOaezU9li7hXxtkwhR8SIr4gLM7mcLBHfErFGijCVK+I34thUDjMDABRJbBdwWIkiNhExiR8S5CLi5QDgSAlfcdxXLOBkC8SXcklLz+FzExIFdB2WLt3U2ppB9+RkpXAEAsMAJiuZyWfTXdJS05m8HAAW7/xZMuLa0kVFtjS1trQ0NDMy/apQ/3Xzb0rc20V6Gfi5ZxCt/4vtr/zSGgBgzIlqs/OLLa4KgM4tAMjd+2LTOACApKhvHde/ug9NPC+JAkG6jbFxVlaWEZfDMhIX9A/9T4e/oa++ZyQ+7o/y0F058UxhioAurhsrLSVNyKdnpDNZHLrhn4f4Hwf+dR4GQZx4Dp/DE0WEiaaMy0sQtZvH5gq4aTw6l/efmvgPw/6kxbkWidL4EVBjjIDUdSpAfu0HKAoRINH7xV3/o2+++DAgfnnhKpOLc//vN/1nwaXiJYOb8DnOJSiEzhLyMxf3xM8SoAEBSAIqkAfKQB3oAENgBqyALXAEbsAb+IMQEAlWAxZIBKmAD7JAHtgECkEx2An2gGpQBxpBM2gFx0EnOAXOg0vgGrgBboP7YBRMgGdgFrwGCxAEYSEyRIHkIRVIE9KHzCAGZA+5Qb5QEBQJxUIJEA8SQnnQZqgYKoOqoXqoGfoeOgmdh65Ag9BdaAyahn6H3sEITIKpsBKsBRvDDNgJ9oFD4FVwArwGzoUL4B1wJdwAH4U74PPwNfg2PAo/g+cQgBARGqKKGCIMxAXxR6KQeISPrEeKkAqkAWlFupE+5CYyiswgb1EYFAVFRxmibFGeqFAUC7UGtR5VgqpGHUZ1oHpRN1FjqFnURzQZrYjWR9ugvdAR6AR0FroQXYFuQrejL6JvoyfQrzEYDA2jjbHCeGIiMUmYtZgSzD5MG+YcZhAzjpnDYrHyWH2sHdYfy8QKsIXYKuxR7FnsEHYC+wZHxKngzHDuuCgcD5ePq8AdwZ3BDeEmcQt4Kbwm3gbvj2fjc/Cl+EZ8N/46fgK/QJAmaBPsCCGEJMImQiWhlXCR8IDwkkgkqhGtiYFELnEjsZJ4jHiZOEZ8S5Ih6ZFcSNEkIWkH6RDpHOku6SWZTNYiO5KjyALyDnIz+QL5EfmNBEXCSMJLgi2xQaJGokNiSOK5JF5SU9JJcrVkrmSF5AnJ65IzUngpLSkXKabUeqkaqZNSI1Jz0hRpU2l/6VTpEukj0lekp2SwMloybjJsmQKZgzIXZMYpCEWd4kJhUTZTGikXKRNUDFWb6kVNohZTv6MOUGdlZWSXyYbJZsvWyJ6WHaUhNC2aFy2FVko7ThumvVuitMRpCWfJ9iWtS4aWzMstlXOU48gVybXJ3ZZ7J0+Xd5NPlt8l3yn/UAGloKcQqJClsF/hosLMUupS26WspUVLjy+9pwgr6ikGKa5VPKjYrzinpKzkoZSuVKV0QWlGmabsqJykXK58RnlahaJir8JVKVc5q/KULkt3oqfQK+m99FlVRVVPVaFqveqA6oKatlqoWr5am9pDdYI6Qz1evVy9R31WQ0XDTyNPo0XjniZek6GZqLlXs09zXktbK1xrq1an1pS2nLaXdq52i/YDHbKOg84anQadW7oYXYZusu4+3Rt6sJ6FXqJejd51fVjfUp+rv09/0ABtYG3AM2gwGDEkGToZZhq2GI4Z0Yx8jfKNOo2eG2sYRxnvMu4z/mhiYZJi0mhy31TG1Ns037Tb9HczPTOWWY3ZLXOyubv5BvMu8xfL9Jdxlu1fdseCYuFnsdWix+KDpZUl37LVctpKwyrWqtZqhEFlBDBKGJet0dbO1husT1m/tbG0Edgct/nN1tA22faI7dRy7eWc5Y3Lx+3U7Jh29Xaj9nT7WPsD9qMOqg5MhwaHx47qjmzHJsdJJ12nJKejTs+dTZz5zu3O8y42Lutczrkirh6uRa4DbjJuoW7Vbo/c1dwT3FvcZz0sPNZ6nPNEe/p47vIc8VLyYnk1e816W3mv8+71IfkE+1T7PPbV8+X7dvvBft5+u/0erNBcwVvR6Q/8vfx3+z8M0A5YE/BjICYwILAm8EmQaVBeUF8wJTgm+Ejw6xDnkNKQ+6E6ocLQnjDJsOiw5rD5cNfwsvDRCOOIdRHXIhUiuZFdUdiosKimqLmVbiv3rJyItogujB5epb0qe9WV1QqrU1afjpGMYcaciEXHhsceiX3P9Gc2MOfivOJq42ZZLqy9rGdsR3Y5e5pjxynjTMbbxZfFTyXYJexOmE50SKxInOG6cKu5L5I8k+qS5pP9kw8lf0oJT2lLxaXGpp7kyfCSeb1pymnZaYPp+umF6aNrbNbsWTPL9+E3ZUAZqzK6BFTRz1S/UEe4RTiWaZ9Zk/kmKyzrRLZ0Ni+7P0cvZ3vOZK577rdrUWtZa3vyVPM25Y2tc1pXvx5aH7e+Z4P6hoINExs9Nh7eRNiUvOmnfJP8svxXm8M3dxcoFWwsGN/isaWlUKKQXziy1XZr3TbUNu62ge3m26u2fyxiF10tNimuKH5fwiq5+o3pN5XffNoRv2Og1LJ0/07MTt7O4V0Ouw6XSZfllo3v9tvdUU4vLyp/tSdmz5WKZRV1ewl7hXtHK30ru6o0qnZWva9OrL5d41zTVqtYu712fh9739B+x/2tdUp1xXXvDnAP3Kn3qO9o0GqoOIg5mHnwSWNYY9+3jG+bmxSaips+HOIdGj0cdLi32aq5+YjikdIWuEXYMn00+uiN71y/62o1bK1vo7UVHwPHhMeefh/7/fBxn+M9JxgnWn/Q/KG2ndJe1AF15HTMdiZ2jnZFdg2e9D7Z023b3f6j0Y+HTqmeqjkte7r0DOFMwZlPZ3PPzp1LPzdzPuH8eE9Mz/0LERdu9Qb2Dlz0uXj5kvulC31OfWcv210+dcXmysmrjKud1yyvdfRb9Lf/ZPFT+4DlQMd1q+tdN6xvdA8uHzwz5DB0/qbrzUu3vG5du73i9uBw6PCdkeiR0TvsO1N3U+6+uJd5b+H+xgfoB0UPpR5WPFJ81PCz7s9to5ajp8dcx/ofBz++P84af/ZLxi/vJwqekJ9UTKpMNk+ZTZ2adp++8XTl04ln6c8WZgp/lf619rnO8x9+c/ytfzZiduIF/8Wn30teyr889GrZq565gLlHr1NfL8wXvZF/c/gt423fu/B3kwtZ77HvKz/ofuj+6PPxwafUT5/+BQOY8/xvJtwPAAAACXBIWXMAAC4iAAAuIgGq4t2SAAANMElEQVRoQ92aB1xURx7H/69sY5eOFBELCipESsSC0RCMJRZMrICHGiMmGjWaqDk7YEsuGok5TS6xi56KGtsFG6jBiAYLKhqVc8GGBZG+fd97N+/twNJWFksS7/v5DG/nN/OG/fze/838Z4CA/wMCE9d9W8oQ3mUMBSojBTqWAuBQAweHIC56lanXHw8xJixM6qhQNcX1KuQykluyKzMPVxvF5XUh3hIpgFSiQz8AJBItSKU6sCsX55P9byLxxRKwYl3W5O6dg5o62IMRmcpyBBz87wNYcyH3R4iL+gh3+8MhHaTqYJKUKO2dPYTigIqza1MlLZLnzh3arQ/uZzVn14YOIGRyJWXrqgR5U6VI1kRJS92VBEEry+wrAnC3F04XL3cY4OMF7/p6weC2zSDQzQG3/IlM7dspdPmU0VxtLqYf5haM6HYOBYLVUwcXByQy92JxXioexUzFhT5cySn3TrjrC4WP3EsPHuPfZGJVZg4HCdt/wF0aT8LWUHT/jTpl4fZU3KNBSHytQ0D33uDR0qfjoqg3hmOpQU65d4u2cW4X6NCyJ1ZeIeKSFRC3p1q4kzYdmzr6Zk98p6rsj+rhi0KoFe5gIm53M/ypDhbNJQgC3kbTFUGSi+LiwmgsWyQ5zk9McESCZ8gEVHvF1kneWJI5CJT2SHWDbUQ0vNbEvqr4OClwCyZ+RzSQ+psomqOwUgOL5vL4BIdCi/aBvtJb3AdYsoirs0usnWfH1vbNOmPlFWHmWlve2DFB3t0nhvh0qm2wRRZuG+ksFyUlDe4qcbYRJ0H8v6NxSxVPNZcnPPJDIAlY8PWnXWVYqsPhZb3lDAfzW3T50xbmZ+MfyFhbRcr7yNj1EZ1gdb+O8DFvMKk7it4+ywYjY11k0s1po8KpmA4tITUmnHaWS5HBKJKr0aC5zXw6QJvgNzyhXDIZS3UgCN3UJq3fdLd188PKs3H8+Bjpvn2x/jv2TwnbsOezt3/YPavTss3TXXHzi4U3Vic/+H5gq+7rkLEkmgb5yWwVb3CnNiFAcD+aOtaGaMobmzrqLaoyIwlC11RkNB/JvPGCiGjQXJ43h8QCSRGzEqeG1Xmah77u48QCPdM7NBYrjSPveJg069i7H2UcjUpndWSZrZ3bFRfHlic8nL1TnezcM2Vyh0dLtsbnzdu8JHHW5qVt8G3Pj9qOT4RYluOE/UYllQZPCvFxMik1cbGRSKsbWwlKUPhxhDGxZJ25Ls28oX2X3k60HmZiqQqDTj+rqX8fB7lTC6xYT2569zA9Jb5m7xz8r3aB03uE9fpOFP7WYujZ/TPo22MSDOs1FT4ePBfG9ZvQsod/12kUJf190prli4YnJ6Mt2HOSMKICGLL/5su3Tn6wPxMYZE4lvMH/RAZP6NjaJGBsJSJIi3mrTg6d9bAYem05YSxS6WJgQdR2LFtnLk9oxFigRaKpq2aEuWMJDizu6UlQosltuo3FivU8zgyOkEhkRzz941u2CogDxyYhgMzDrWb4rMXN0Q36vN4TZr43XuTt0WyeoiR/MwqV509JqgzOSx+77zcw8nGM4UMx2r+5qYJpqpByHVztcc3E+QdFXJWx8dE78MgCDaZYldi5eIB/jwj577/+NB9VJ/GajmHj2nYZKpPZNW5aVJ9v2ULDwlaXdsvFYlvzpo1l9PD4yXUoKStAY3MgFjuAexNvcFA4C+32NgqY3HcofHFg18ioH1adRSHyjdBgCQJaQ/y2SFyzAIMKuSkp+1YAepIOGwZ1Bgo9UGu4gCK2z9ZfoEit3yMI1X8XxZwh+B2al2/7jOnfbsKqGaNeB7RYgmsAmvJi2LHkbwaC0baXyElKKpVe7f/JVlpsY4978Abp0PxsvqcSVVZfMGoud3Z44+HZ8vOeG2m3GWOkntNwK8CTgky4eiWJK9fqflUZJRe0jFirZmgvDSPu29or2PmdzhEgpkVC3/ziIpiRvL1ETUua74+NLed3aEnRg4IC3F2Edp6DNx/AmqxcXLMeFK0w3M8L1yxToTfCtCNZUKTRY8VMZv4TyC/VxFiM3OM7N0BudiaMW/g9VgBkto7QIWyYKDstaSEYGdo3dEQNY/n5/EbKJHBq2QPcOozBWk24K00UGgM3QuI2GisA5cVXIOdyYqHeKBo0cEDSaSwLLNu8TJ5968o6LQORI3oMETRPRycI9GrhkHH7Di/UjQpEvzYeQnlZKMQ0rB1Y/25+xO4M2Fl61/KcazTo4W5ONuRcOIUVEx3CI0Fqax8lljsO9w2tuTMuyksHVcHvwKHX2xIcU9aFsgmQEbR5MX50aztQYJzWu19NY3lmjp6pekIrxmbfvv6woLQQqwCBzZujn0SYqfbX5KkLGprVL51IXgMcW5VdgFgqh4DwkaR/WAxBi837Co5j4Hbmj3wucglL9cJy4ENKzRkVf5+q9Bqnpol9WKpDYuR0DfoKabcL8rGCotfBEQ0GLy41ewk81VyWIfYV3lNmXj2NNizVaNvtPfBBc2B1Hl07BKqi2xkkyf0HSxYg0D7eFn9G5rJ69EAYfXj4zgos1QtaYoq16G2qRCYWA0dw5oFqcb9cAyfvPG50ufq4FI/wdPg5t777+VKoNh1ZPzVbIAiWIwl69qm9G9Lad+kJFF5QKFosXCthjXrI/W0jsCw5G62+Tz0D5p8mU3sxrp7FWwClZKYcHWMawvKqvuf6PZh86HwBusW6VY0g/FzlEru0mHAsPB05mnN3X7sHKzNz+K91Df2o+VQIorDBVGz2lpPHvhobdvRy+v7ewT2HYrUmdy/tBU3po5Ren55MP7e+a6MP2F8aHLHXqr9ExO8Y46oQr08bFS6cflkD/1gT+wYLH1aeydGCSD8Q5ox5Ymo1YdUmgqTI2ZkpWziDToMVM0adCpRntrAERc/B0qvFImSsrWAsWdvYx/j1rkRtYNBGo+bbk9gnGKZ19Q0GgzgVlm4yJeQYq8ydsfb4eW158a6LaTuxYkaZuQN0mrLtb39y/KkL2V+Shdved7URrz9Wj7Fn7xfBuAOZuGbiTqkKRu09Y8HgtkFg5A3+qcpgq8zloUT0vItpyUZthXlq0amKQfnbTgNw5AIsvTos3o2SYGL10vAA0r8eY/mdV4nWgBUz26/eqWMwz7JeQeDrbIcM1idgyXpzp6xOyzHoVBuyUrdiBeD6ySQw6DVr+n9+XImlBmE5ggHOiGs8wleg0G7e8urEQwBNEuavywjpYY2BGse8oQ9QHjgM7bK0/ApfiWDslhOGEq1+NZZqwnH526/cOVbdYP7K13OelKcBY/O5ICKsNpeHFJMJ1zL2aVQlBaAqfgDKswdUKIFYhJutAqVqDznDI1xDdbRVFkkc6YzDQ9piqX448HNSmE+jitVq/mkU4OqzERd9sEJnGNJ/W7pgcGalsTp9FDLRdF5QGwJ0wNpEoAhOi0GGao0M8Fe+DkzpIEgYpMY9G2fuxMRj+axBvyrryEbITtsIjNGwcuDnvzzEzVahJ+gsVnURfTK/Vg6uYUDSNH8gVG/0Ltqy6E2FVNajjYf5WFNZ8AhQcvb88zxvsIEZzBvcV4hYYyQsiP4Jt9YPbyAycgcytM2qn4G/moz9qMpYnkaZK0CIv8y9cKQk72JqkYqAZVi1GmlAxXVGX3DdWHYGKwDurSLBxrb1yLRDo/ftTxkflpQyxW5lyhTJ97vm+azYNneWiCJ+HtxtICnCeTZ/wH0m9yaQHHNAEJ6X+ZGHeINLtLpIiIusP2JrwxspJyLyyzVL+WttY3kabe74xCNFBMd+xXDcl2MTfinBcqPggP5Kfe+bqimTomTwWkg8tPaNjLC3bX5CxtKljjqxViGzyfFrFfTFB/3GK3w9zTvd49eyobCsNGPvlCl1ziKeGWQwxI2sYWx2QamwsFWWcQfO4hbM9EgNLIiaK1zrofGRy8PQ34o1mmf+Hyz5/nub9Kprh4qVS4WzBR6SFEOLVv3hze7zYOiAFTDqveUQ03829O0yDJrYm8+Lr9+/AztOn1SxHPNy/xoqklxEi9qAo7kPq0rGvcIBaOIah3s0yDOZO/rro6rIxDP1Pi1rIBKABb3tiIqCw0fzL38GmvKbuMUyOoMODmf9Ct8d3l3CsfpByR9Pu4KbXg5zhjxBUZlSp8yPPoF7NIhwWG5jb5/h16kbltBrShLw+K4SCvOVCYt2no7HslWg7e9iW5fWcxVNvIGmGVMRGYEoO4zmykLhsBx3heTk4VSgW+lENSObQ8n9POSOHUEi90L97dHOlQKtXg9FFSVwu+A+XLmbx5Tp2F1qhvr7d7Ezb+MhBPjD8tdbNA+SSGSgYwmUGpFwo7AczuYX/an/iEdM6B3qKqbZAbguIKJQEZEosYSLi3efzsKyVZxd3/V1Cc0FisQMGsMAUqkBXfXoqgXChjlgF/LAfCiLOXfuQ5G2tDRcY5CGaRhxO41R4qJlRJSaEZVrjOLbapY6Z9BASkJswn18Sw2CVqx/t5ghncoZElQsBTqm8u+X3A0UaRm48gcD8D/XZskfp8IFSwAAAABJRU5ErkJggg==")}.msp-plugin .msp-plugin-content{color:#332b1f}\n\n',""]),t.default=a},,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,r){"use strict";r.d(t,"a",(function(){return xm}));var n=r(572),a=r(0),i=r(1052),o=r(588),s=r(577),u=r(600),c=r(879),l=r(612),d=r(597),p=r(606),f=r(605),h=r(662),m=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.updateParams=function(e){var r;t.plugin.managers.animation.updateParams(((r={})[e.name]=e.value,r))},t.updateCurrentParams=function(e){var r;t.plugin.managers.animation.updateCurrentParams(((r={})[e.name]=e.value,r))},t.startOrStop=function(){var e=t.plugin.managers.animation;"playing"===e.state.animationState?e.stop():(t.props.onStart&&t.props.onStart(),e.start())},t}return Object(n.c)(t,e),t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.managers.animation.events.updated,(function(){return e.forceUpdate()}))},t.prototype.render=function(){var e,t,r=this.plugin.managers.animation;if(r.isEmpty)return null;var a="playing"===r.state.animationState,i=null===(t=(e=r.current.anim).canApply)||void 0===t?void 0:t.call(e,this.plugin);return Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)(h.a,{params:r.getParams(),values:r.state.params,onChange:this.updateParams,isDisabled:a},void 0),Object(o.jsx)(h.a,{params:r.current.params,values:r.current.paramValues,onChange:this.updateCurrentParams,isDisabled:a},void 0),Object(o.jsx)("div",Object(n.a)({className:"msp-flex-row"},{children:Object(o.jsx)(p.a,Object(n.a)({icon:"playing"!==r.state.animationState?void 0:f.P,onClick:this.startOrStop,disabled:void 0!==i&&!1===i.canApply},{children:"playing"===r.state.animationState?"Stop":void 0===i||i.canApply?"Start":i.reason||"Start"}),void 0)}),void 0)]},void 0)},t}(u.c),g=r(794),b=r(601),v=r(766),y=r(575),x=r(756),O=r(795),j=r(579),S=r(610),_=r(631),w=r(573),C=r(659),A=r(582),E=r(789),P=r(581),T=r(584);function I(e,t,r,a,i){return Object(n.b)(this,void 0,void 0,(function(){var o=this;return Object(n.d)(this,(function(s){switch(s.label){case 0:return[4,k(e,t,(function(e,t,s){return Object(n.b)(o,void 0,void 0,(function(){var o,u,c,d,p;return Object(n.d)(this,(function(f){switch(f.label){case 0:return i&&i.length>0&&!i.includes(t.params.values.type.name)?[2]:(o=t.obj.data.sourceData,[4,a(o.root)]);case 1:return u=f.sent(),T.d.isEmpty(u)?[2]:(c={bundle:y.h.Bundle.fromLoci(u),color:-1===r?Object(P.a)(0):r,clear:-1===r},s?(d=Object(n.e)(Object(n.e)([],s.params.values.layers),[c]),p=M(d,o),e.to(s).update(E.a.toBundle(p))):(p=M([c],o),e.to(t.transform.ref).apply(l.a.Representation.OverpaintStructureRepresentation3DFromBundle,E.a.toBundle(p),{tags:"overpaint-controls"})),[2])}}))}))}))];case 1:return s.sent(),[2]}}))}))}function k(e,t,r){return Object(n.b)(this,void 0,void 0,(function(){var a,i,o,s,u,c,d,p,f;return Object(n.d)(this,(function(n){switch(n.label){case 0:a=e.state.data,i=a.build(),o=0,s=t,n.label=1;case 1:if(!(o0&&!i.includes(t.params.values.type.name)?[2]:(o=t.obj.data.sourceData,[4,a(o.root)]);case 1:return u=f.sent(),T.d.isEmpty(u)?[2]:(c={bundle:y.h.Bundle.fromLoci(u),groups:r},s?(d=Object(n.e)(Object(n.e)([],s.params.values.layers),[c]),p=F(d,o),e.to(s).update(B.a.toBundle(p))):(p=F([c],o),e.to(t.transform.ref).apply(l.a.Representation.ClippingStructureRepresentation3DFromBundle,B.a.toBundle(p),{tags:"clipping-controls"})),[2])}}))}))}))];case 1:return s.sent(),[2]}}))}))}function N(e,t,r){return Object(n.b)(this,void 0,void 0,(function(){var a,i,o,s,u,c,d,p,f;return Object(n.d)(this,(function(n){switch(n.label){case 0:a=e.state.data,i=a.build(),o=0,s=t,n.label=1;case 1:if(!(o0&&!i.includes(t.params.values.type.name)?[2]:(o=t.obj.data.sourceData,[4,a(o.root)]);case 1:return u=f.sent(),T.d.isEmpty(u)?[2]:(c={bundle:y.h.Bundle.fromLoci(u),value:r},s?(d=Object(n.e)(Object(n.e)([],s.params.values.layers),[c]),p=H(d,o),e.to(s).update(z.a.toBundle(p))):(p=H([c],o),e.to(t.transform.ref).apply(l.a.Representation.TransparencyStructureRepresentation3DFromBundle,z.a.toBundle(p),{tags:"transparency-controls"})),[2])}}))}))}))];case 1:return s.sent(),[2]}}))}))}function V(e,t,r){return Object(n.b)(this,void 0,void 0,(function(){var a,i,o,s,u,c,d,p,f;return Object(n.d)(this,(function(n){switch(n.label){case 0:a=e.state.data,i=a.build(),o=0,s=t,n.label=1;case 1:if(!(o"]]:[]),options:w.a.Group({label:w.a.Text(""),checkExisting:w.a.Boolean(!!(null==t?void 0:t.checkExisting),{help:function(){return{description:"Checks if a selection with the specifield elements already exists to avoid creating duplicate components."}}})})}},e.getThemeParams=function(e,r){var n=e.query.structure.registry.options;return{selection:w.a.Select(n[1][0],n,{isHidden:!1}),action:w.a.MappedStatic("color",{color:w.a.Group({color:w.a.Color(S.a.blue,{isExpanded:!0})},{isFlat:!0}),reset:w.a.EmptyGroup({label:"Reset Color"}),transparency:w.a.Group({value:w.a.Numeric(.5,{min:0,max:1,step:.01})},{isFlat:!0}),clipping:w.a.Group({excludeGroups:w.a.MultiSelect([],w.a.objectToOptions(B.a.Groups.Names))},{isFlat:!0})}),representations:w.a.MultiSelect([],t(e,r),{emptyValue:"All"})}},e.getRepresentationTypes=t}(q||(q={}));var W=r(685),X=r(592),Y=r(853);function K(e,t){var r=function(e,t){return{state:e,oldHierarchy:t,hierarchy:Q(),changed:!1,added:new Set}}(e,t||Q());return function(e,t){var r={tree:e,state:t};ye(r,e.root)}(e.tree,r),t&&t.refs.forEach(be,r),{hierarchy:r.hierarchy,added:r.added,changed:r.changed}}function Q(){return{trajectories:[],models:[],structures:[],refs:new Map}}function Z(e){return{kind:"trajectory",cell:e,version:e.transform.version,models:[]}}function J(e,t){return{kind:"model",cell:e,version:e.transform.version,trajectory:t,structures:[]}}function $(e,t){return{kind:"model-properties",cell:e,version:e.transform.version,model:t}}function ee(e,t){return{kind:"model-unitcell",cell:e,version:e.transform.version,model:t}}function te(e,t){return{kind:"structure",cell:e,version:e.transform.version,model:t,components:[]}}function re(e,t){return{kind:"structure-properties",cell:e,version:e.transform.version,structure:t}}function ne(e,t){return{kind:"structure-transform",cell:e,version:e.transform.version,structure:t}}function ae(e,t){return{kind:"structure-volume-streaming",cell:e,version:e.transform.version,structure:t}}function ie(e){return e.transform.tags?Object(n.e)([],e.transform.tags).sort().join():e.transform.ref}function oe(e,t){return{kind:"structure-component",cell:e,version:e.transform.version,structure:t,key:ie(e),representations:[]}}function se(e,t){return{kind:"structure-representation",cell:e,version:e.transform.version,component:t}}function ue(e,t){return{kind:"generic-representation",cell:e,version:e.transform.version,parent:t}}function ce(e,t,r,n){for(var a=[],i=4;i0?[e[0]]:[]:n},t.prototype.sync=function(e){if(e||!this.dataState.inUpdate)if(this.state.syncedTree!==this.dataState.tree){this.state.syncedTree=this.dataState.tree;var t=K(this.plugin.state.data,this.current);if(t.changed){var r=t.hierarchy,a=this.syncCurrent(r.trajectories,t.added),i=this.syncCurrent(r.models,t.added),o=this.syncCurrent(r.structures,t.added);this._currentComponentGroups=void 0,this._currentSelectionSet=void 0,this.state.hierarchy=r,this.state.selection.trajectories=a,this.state.selection.models=i,this.state.selection.structures=o,e?(this.state.notified=!0,this.behaviors.selection.next({hierarchy:r,trajectories:a,models:i,structures:o})):this.state.notified=!1}}else e&&!this.state.notified&&(this.state.notified=!0,this.behaviors.selection.next(Object(n.a)({hierarchy:this.state.hierarchy},this.state.selection)))},t.prototype.updateCurrent=function(e,t){for(var r=this.current,n="add"===t?W.a.union(this.seletionSet,new Set(e.map((function(e){return e.cell.transform.ref})))):W.a.difference(this.seletionSet,new Set(e.map((function(e){return e.cell.transform.ref})))),a=[],i=[],o=[],s=0,u=r.trajectories;s0?[4,this.clearTrajectory(o)]:[3,3]:[3,6];case 2:n.sent(),n.label=3;case 3:return[4,this.plugin.builders.structure.hierarchy.applyPreset(o.cell,t,r)];case 4:n.sent(),n.label=5;case 5:return a++,[3,1];case 6:return[2]}}))}))}))},t.prototype.updateStructure=function(e,t){return Object(n.b)(this,void 0,void 0,(function(){var r=this;return Object(n.d)(this,(function(a){switch(a.label){case 0:return[4,this.plugin.dataTransaction((function(){return Object(n.b)(r,void 0,void 0,(function(){var r,a;return Object(n.d)(this,(function(n){switch(n.label){case 0:return r=A.h.getDecoratorRoot(this.dataState.tree,e.cell.transform.ref),a=this.dataState.tree.children.get(r).toArray(),[4,this.remove(a,!1)];case 1:return n.sent(),[4,this.plugin.state.updateTransform(this.plugin.state.data,e.cell.transform.ref,t,"Structure Type")];case 2:return n.sent(),[4,this.plugin.builders.structure.representation.applyPreset(e.cell.transform.ref,"auto")];case 3:return n.sent(),[2]}}))}))}),{canUndo:"Structure Type"})];case 1:return a.sent(),d.a.Camera.Reset(this.plugin),[2]}}))}))},t.prototype.clearTrajectory=function(e){for(var t=this.dataState.build(),r=0,n=e.models;r0&&t.push(Object(o.jsx)("div",{children:Object(o.jsx)(Pe,{refs:i,labelMultiple:s},void 0)},n))})),t.length>0?t:null},enumerable:!1,configurable:!0}),t.prototype.render=function(){return Object(o.jsx)(o.Fragment,{children:Object(o.jsxs)("div",Object(n.a)({style:{marginTop:"6px"}},{children:[this.unitcell,this.customControls]}),void 0)},void 0)},t}(u.d)),Pe=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={showOptions:!1},t.toggleVisibility=function(e){e.preventDefault(),t.plugin.managers.structure.hierarchy.toggleVisibility(t.props.refs),e.currentTarget.blur()},t.highlight=function(e){e.preventDefault(),t.pivot.cell.parent&&d.a.Interactivity.Object.Highlight(t.plugin,{state:t.pivot.cell.parent,ref:t.props.refs.map((function(e){return e.cell.transform.ref}))})},t.clearHighlight=function(e){e.preventDefault(),d.a.Interactivity.ClearHighlights(t.plugin)},t.focus=function(e){var r;e.preventDefault();for(var n=!0,a=0,i=t.props.refs;a0&&r.push(Object(n.e)([je.a.Header("Set Coloring",{isIndependent:!0})],this.colorByActions)),t.canBeModified(this.props.group[0])&&r.push([je.a.Header("Modify by Selection"),je.a.Item("Include",(function(){return t.modifyByCurrentSelection(e.props.group,"union")}),{icon:f.fb}),je.a.Item("Subtract",(function(){return t.modifyByCurrentSelection(e.props.group,"subtract")}),{icon:f.Z}),je.a.Item("Intersect",(function(){return t.modifyByCurrentSelection(e.props.group,"intersect")}),{icon:f.I})]),r.push(je.a.Item("Select This",(function(){return t.selectThis(e.props.group)}),{icon:f.V})),t.canBeModified(this.props.group[0])&&r.push(je.a.Item("Edit Label",this.toggleLabel)),r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"reprLabel",{get:function(){var e,t=this.pivot;return 0===t.representations.length?"No repr.":1===t.representations.length?null===(e=t.representations[0].cell.obj)||void 0===e?void 0:e.label:t.representations.length+" reprs"},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e,t=this,r=this.pivot,a=r.cell,i=null===(e=a.obj)||void 0===e?void 0:e.label,s=this.reprLabel;return Object(o.jsxs)(o.Fragment,{children:[Object(o.jsxs)("div",Object(n.a)({className:"msp-flex-row"},{children:[Object(o.jsxs)(p.a,Object(n.a)({noOverflow:!0,className:"msp-control-button-label",title:i+". Click to focus.",onClick:this.focus,onMouseEnter:this.highlight,onMouseLeave:this.clearHighlight,style:{textAlign:"left"}},{children:[i,Object(o.jsx)("small",Object(n.a)({className:"msp-25-lower-contrast-text",style:{float:"right"}},{children:s}),void 0)]}),void 0),Object(o.jsx)(p.f,{svg:a.state.isHidden?f.gb:f.hb,toggleState:!1,onClick:this.toggleVisible,title:(a.state.isHidden?"Show":"Hide")+" component",small:!0,className:"msp-form-control",flex:!0},void 0),Object(o.jsx)(p.f,{svg:f.B,toggleState:!1,onClick:this.remove,title:"Remove",small:!0,className:"msp-form-control",flex:!0},void 0),Object(o.jsx)(p.f,{svg:f.K,onClick:this.toggleAction,title:"Actions",toggleState:"action"===this.state.action,className:"msp-form-control",flex:!0},void 0)]}),void 0),"label"===this.state.action&&Object(o.jsx)("div",Object(n.a)({className:"msp-control-offset",style:{marginBottom:"6px"}},{children:Object(o.jsx)(p.c,{label:"Label",control:Object(o.jsxs)("div",Object(n.a)({style:{display:"flex",textAlignLast:"center"}},{children:[Object(o.jsx)(p.h,{onChange:this.updateLabel,value:i,style:{flex:"1 1 auto",minWidth:0},className:"msp-form-control",blurOnEnter:!0,blurOnEscape:!0},void 0),Object(o.jsx)(p.f,{svg:f.r,onClick:this.toggleLabel,className:"msp-form-control msp-control-button-label",flex:!0},void 0)]}),void 0)},void 0)}),void 0),"action"===this.state.action&&Object(o.jsxs)("div",Object(n.a)({className:"msp-accent-offset"},{children:[Object(o.jsx)("div",Object(n.a)({style:{marginBottom:"6px"}},{children:Object(o.jsx)(je.a,{items:this.actions,onSelect:this.selectAction,noOffset:!0},void 0)}),void 0),Object(o.jsx)("div",Object(n.a)({style:{marginBottom:"6px"}},{children:r.representations.map((function(e){return Object(o.jsx)(Be,{group:t.props.group,representation:e},e.cell.transform.ref)}))}),void 0)]}),void 0)]},void 0)},t}(u.d),Be=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.remove=function(){return t.plugin.managers.structure.component.removeRepresentations(t.props.group,t.props.representation)},t.toggleVisible=function(e){e.preventDefault(),e.currentTarget.blur(),t.plugin.managers.structure.component.toggleVisibility(t.props.group,t.props.representation)},t.update=function(e){return t.plugin.managers.structure.component.updateRepresentations(t.props.group,t.props.representation,e)},t}return Object(n.c)(t,e),t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.state.events.cell.stateUpdated,(function(t){A.a.ObjectEvent.isCell(t,e.props.representation.cell)&&e.forceUpdate()}))},t.prototype.render=function(){var e,t=this.props.representation.cell;return Object(o.jsxs)("div",Object(n.a)({className:"msp-representation-entry"},{children:[t.parent&&Object(o.jsx)(p.d,Object(n.a)({header:((null===(e=t.obj)||void 0===e?void 0:e.label)||"")+" Representation",noOffset:!0},{children:Object(o.jsx)(Ae,{state:t.parent,transform:t.transform,customHeader:"none",customUpdate:this.update,noMargin:!0},void 0)}),void 0),Object(o.jsx)(p.f,{svg:f.B,onClick:this.remove,title:"Remove",small:!0,className:"msp-default-bg",toggleState:!1,style:{position:"absolute",top:0,right:"32px",lineHeight:"24px",height:"24px",textAlign:"right",width:"44px",paddingRight:"6px",background:"none"}},void 0),Object(o.jsx)(p.f,{svg:this.props.representation.cell.state.isHidden?f.gb:f.hb,toggleState:!1,onClick:this.toggleVisible,title:"Toggle Visibility",small:!0,className:"msp-default-bg",style:{position:"absolute",top:0,right:0,lineHeight:"24px",height:"24px",textAlign:"right",width:"32px",paddingRight:"6px",background:"none"}},void 0)]}),void 0)},t}(u.d),Le=r(587),Ne=r(792),Fe={distanceUnitLabel:w.a.Text("Å",{isEssential:!0}),textColor:Ne.b.textColor},ze=w.a.getDefaultValues(Fe),Ue=function(e){function t(t){var r=e.call(this,{labels:[],distances:[],angles:[],dihedrals:[],orientations:[],options:ze})||this;return r.plugin=t,r.behaviors={state:r.ev.behavior(r.state)},r._empty=[],t.state.data.events.changed.subscribe((function(e){e.inTransaction||t.behaviors.state.isAnimating.value||r.sync()})),t.behaviors.state.isAnimating.subscribe((function(e){e||t.behaviors.state.isUpdating.value||r.sync()})),r}return Object(n.c)(t,e),t.prototype.stateUpdated=function(){this.behaviors.state.next(this.state)},t.prototype.getGroup=function(){var e=this.plugin.state.data,t=A.e.findTagInSubtree(e.tree,A.f.RootRef,"measurement-group"),r=this.plugin.state.data.build();return t?r.to(t):r.toRoot().group(l.a.Misc.CreateGroup,{label:"Measurements"},{tags:"measurement-group"})},t.prototype.setOptions=function(e){return Object(n.b)(this,void 0,void 0,(function(){var t,r,a,i,o,s,u,c,l,p;return Object(n.d)(this,(function(n){switch(n.label){case 0:for(this.updateState({options:e})&&this.stateUpdated(),t=this.plugin.state.data.build(),r=0,a=this.state.distances;r1&&Object(o.jsx)(p.f,{svg:f.f,small:!0,className:"msp-form-control",onClick:function(){return r.moveHistory(e,"up")},flex:"20px",title:"Move up"},void 0),a.length>1&&Object(o.jsx)(p.f,{svg:f.c,small:!0,className:"msp-form-control",onClick:function(){return r.moveHistory(e,"down")},flex:"20px",title:"Move down"},void 0),Object(o.jsx)(p.f,{svg:f.B,small:!0,className:"msp-form-control",onClick:function(){return r.plugin.managers.structure.selection.modifyHistory(e,"remove")},flex:!0,title:"Remove"},void 0)]}),e.id)},t.prototype.add=function(){for(var e=this.plugin.managers.structure.selection.additionsHistory,t=[],r=0,a=Math.min(e.length,4);r0&&Object(o.jsx)("div",Object(n.a)({className:"msp-control-offset"},{children:t}),void 0),0===t.length&&Object(o.jsx)("div",Object(n.a)({className:"msp-control-offset msp-help-text"},{children:Object(o.jsxs)("div",Object(n.a)({className:"msp-help-description"},{children:[Object(o.jsx)(f.H,{svg:f.F,inline:!0},void 0),"Add one or more selections (toggle ",Object(o.jsx)(ot,{inline:!0},void 0)," mode)"]}),void 0)}),void 0)]},void 0)},t.prototype.render=function(){return Object(o.jsxs)(o.Fragment,{children:[Object(o.jsxs)("div",Object(n.a)({className:"msp-flex-row"},{children:[Object(o.jsx)(p.i,{icon:f.b,label:"Add",toggle:this.toggleAdd,isSelected:"add"===this.state.action,disabled:this.state.isBusy,className:"msp-btn-apply-simple"},void 0),Object(o.jsx)(p.i,{icon:f.eb,label:"",title:"Options",toggle:this.toggleOptions,isSelected:"options"===this.state.action,disabled:this.state.isBusy,style:{flex:"0 0 40px",padding:0}},void 0)]}),void 0),"add"===this.state.action&&this.add(),"options"===this.state.action&&Object(o.jsx)(vt,{},void 0)]},void 0)},t}(u.d),vt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={isDisabled:!1},t.changed=function(e){t.plugin.managers.structure.measurement.setOptions(e)},t}return Object(n.c)(t,e),t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.managers.structure.measurement.behaviors.state,(function(){e.forceUpdate()})),this.subscribe(this.plugin.behaviors.state.isBusy,(function(t){e.setState({isDisabled:t})}))},t.prototype.render=function(){var e=this.plugin.managers.structure.measurement.state;return Object(o.jsx)("div",Object(n.a)({className:"msp-control-offset"},{children:Object(o.jsx)(h.a,{params:Fe,values:e.options,onChangeValues:this.changed,isDisabled:this.state.isDisabled},void 0)}),void 0)},t}(u.d),yt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={showUpdate:!1},t.delete=function(){d.a.State.RemoveObject(t.plugin,{state:t.props.cell.parent,ref:t.props.cell.transform.parent,removeParentGhosts:!0})},t.toggleVisibility=function(e){e.preventDefault(),d.a.State.ToggleVisibility(t.plugin,{state:t.props.cell.parent,ref:t.props.cell.transform.parent}),e.currentTarget.blur()},t.highlight=function(){var e;if(t.selections){t.plugin.managers.interactivity.lociHighlights.clearHighlights();for(var r=0,n=t.lociArray;r":""},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"actions",{get:function(){var e=this;return this.props.cell.sourceRef,[je.a.Item("Select This",(function(){return e.plugin.managers.structure.selection.fromSelections(e.props.cell.sourceRef)}),{icon:f.V})]},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=this.props.cell,t=e.obj;return t?Object(o.jsxs)(o.Fragment,{children:[Object(o.jsxs)("div",Object(n.a)({className:"msp-flex-row",onMouseEnter:this.highlight,onMouseLeave:this.clearHighlight},{children:[Object(o.jsx)("button",Object(n.a)({className:"msp-form-control msp-control-button-label msp-no-overflow",title:"Click to focus. Hover to highlight.",onClick:this.focus,style:{width:"auto",textAlign:"left"}},{children:Object(o.jsx)("span",{dangerouslySetInnerHTML:{__html:this.label}},void 0)}),void 0),Object(o.jsx)(p.f,{svg:e.state.isHidden?f.gb:f.hb,toggleState:!1,small:!0,className:"msp-form-control",onClick:this.toggleVisibility,flex:!0,title:e.state.isHidden?"Show":"Hide"},void 0),Object(o.jsx)(p.f,{svg:f.B,small:!0,className:"msp-form-control",onClick:this.delete,flex:!0,title:"Delete",toggleState:!1},void 0),Object(o.jsx)(p.f,{svg:f.K,className:"msp-form-control",onClick:this.toggleUpdate,flex:!0,title:"Actions",toggleState:this.state.showUpdate},void 0)]}),t.id),this.state.showUpdate&&e.parent&&Object(o.jsx)(o.Fragment,{children:Object(o.jsxs)("div",Object(n.a)({className:"msp-accent-offset"},{children:[Object(o.jsx)(je.a,{items:this.actions,onSelect:this.selectAction,noOffset:!0},void 0),Object(o.jsx)(p.d,Object(n.a)({header:"Options",noOffset:!0},{children:Object(o.jsx)(Ae,{state:e.parent,transform:e.transform,customHeader:"none",autoHideApply:!0},void 0)}),void 0)]}),void 0)},void 0)]},void 0):null},t}(u.d),xt=r(576);function Ot(e,t,r,n){for(var a=xt.f.indexOf(t.unit.elements,t.element),i=y.h.Loci(t.structure,[{unit:t.unit,indices:xt.d.ofSingleton(a)}]),o="residue"===n?y.h.Loci.extendToWholeResidues(i):y.h.Loci.extendToWholeChains(i),s=y.i.entity.pdbx_description(t).join(", "),u=0,c=r.units;u1&&(p+=" | "+d.elements[0].unit.conformation.operator.name);var f={label:p,category:s,loci:d};e.has(s)?e.get(s).push(f):e.set(s,[f])}}function jt(e){for(var t=new Map,r=y.h.Location.create(e),n=0,a=e.unitSymmetryGroups;n0&&r.push(Object(n.e)([je.a.Header(o.label,{description:o.label})],je.a.createItems(s,{label:function(e){return e.label},category:function(e){return e.category},description:function(e){return e.label}})))}}return r})),t.selectAction=function(e,r){if(e&&t.state.showAction){var n=e.value;(null==r?void 0:r.shiftKey)?t.plugin.managers.structure.focus.addFromLoci(n.loci):t.plugin.managers.structure.focus.set(n),t.focusCamera()}else t.setState({showAction:!1})},t.toggleAction=function(){return t.setState({showAction:!t.state.showAction})},t.focusCamera=function(){var e=t.plugin.managers.structure.focus.current;e&&t.plugin.managers.camera.focusLoci(e.loci)},t.clear=function(){t.plugin.managers.structure.focus.clear(),t.plugin.managers.camera.reset()},t.highlightCurrent=function(){var e=t.plugin.managers.structure.focus.current;e&&t.plugin.managers.interactivity.lociHighlights.highlightOnly({loci:e.loci},!1)},t.clearHighlights=function(){t.plugin.managers.interactivity.lociHighlights.clearHighlights()},t}return Object(n.c)(t,e),t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.managers.structure.focus.behaviors.current,(function(t){e.getSelectionItems([]),e.forceUpdate()})),this.subscribe(this.plugin.managers.structure.focus.events.historyUpdated,(function(t){e.forceUpdate()})),this.subscribe(this.plugin.behaviors.state.isBusy,(function(t){e.setState({isBusy:t,showAction:!1})}))},Object.defineProperty(t.prototype,"isDisabled",{get:function(){return this.state.isBusy||0===this.actionItems.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"actionItems",{get:function(){var e=[],t=this.plugin.managers.structure.focus.history;t.length>0&&e.push(Object(n.e)([je.a.Header("History",{description:"Previously focused on items."})],je.a.createItems(t,{label:function(e){return e.label},description:function(e){return e.category&&e.label!==e.category?e.category+" | "+e.label:e.label}})));var r=this.getSelectionItems(this.plugin.managers.structure.hierarchy.selection.structures);1===r.length&&(r[0][0].initiallyExpanded=!0);var a=[];return r.length>0&&a.push.apply(a,r),e.length>0&&a.push.apply(a,e),a},enumerable:!1,configurable:!0}),t.prototype.getToggleBindingLabel=function(){var e,t=this.plugin.state.behaviors.transforms.get($e.FocusLoci.id);if(!t)return"";var r=null===(e=t.params)||void 0===e?void 0:e.bindings.clickFocus;return!r||Je.a.isEmpty(r)?"":Je.a.formatTriggers(r)},t.prototype.render=function(){var e=this.plugin.managers.structure.focus.current,t=(null==e?void 0:e.label)||"Nothing Focused",r="Click to Center Camera";if(!e){r="Select focus using the menu";var a=this.getToggleBindingLabel();a&&(r+="\nor use '"+a+"' on element")}return Object(o.jsxs)(o.Fragment,{children:[Object(o.jsxs)("div",Object(n.a)({className:"msp-flex-row"},{children:[Object(o.jsx)(p.a,Object(n.a)({noOverflow:!0,onClick:this.focusCamera,title:r,onMouseEnter:this.highlightCurrent,onMouseLeave:this.clearHighlights,disabled:this.isDisabled||!e,style:{textAlignLast:e?"left":void 0}},{children:t}),void 0),e&&Object(o.jsx)(p.f,{svg:f.o,onClick:this.clear,title:"Clear",className:"msp-form-control",flex:!0,disabled:this.isDisabled},void 0),Object(o.jsx)(p.i,{icon:f.q,title:"Select a focus target to center on an show its surroundings. Hold shift to focus on multiple targets.",toggle:this.toggleAction,isSelected:this.state.showAction,disabled:this.isDisabled,style:{flex:"0 0 40px",padding:0}},void 0)]}),void 0),this.state.showAction&&Object(o.jsx)(je.a,{items:this.actionItems,onSelect:this.selectAction},void 0)]},void 0)},t}(u.c),_t=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.item=function(e){var r,n,a,i,o,s,u,c,l,d,p=t.plugin.managers.structure.hierarchy.seletionSet;switch(e.kind){case"model":(f=null===(r=e.cell.obj)||void 0===r?void 0:r.data)&&y.d.TrajectoryInfo.get(f).size>1&&(d=(null===(n=e.cell.obj)||void 0===n?void 0:n.data.entryId)+" | Model "+(y.d.TrajectoryInfo.get(f).index+1)+" of "+y.d.TrajectoryInfo.get(f).size),d=(null===(a=e.cell.obj)||void 0===a?void 0:a.data.entryId)+" | "+(null===(i=e.cell.obj)||void 0===i?void 0:i.label);break;case"structure":var f;if((f=null===(o=e.cell.obj)||void 0===o?void 0:o.data.models[0])&&y.d.TrajectoryInfo.get(f).size>1){d=f.entryId+" | "+(null===(s=e.cell.obj)||void 0===s?void 0:s.label)+" (Model "+(y.d.TrajectoryInfo.get(f).index+1)+" of "+y.d.TrajectoryInfo.get(f).size+")";break}if(f){d=f.entryId+" | "+(null===(u=e.cell.obj)||void 0===u?void 0:u.label);break}d=""+(null===(c=e.cell.obj)||void 0===c?void 0:c.label);break;default:d=null===(l=e.cell.obj)||void 0===l?void 0:l.label}return{kind:"item",label:d||e.kind,selected:p.has(e.cell.transform.ref),value:[e]}},t.getTrajectoryItems=function(e){var r;return 0===e.models.length?t.item(e):Object(n.e)([je.a.Header(null===(r=e.cell.obj)||void 0===r?void 0:r.label)],e.models.map(t.getModelItems))},t.getModelItems=function(e){var r,a,i;if(0===e.structures.length)return t.item(e);if(1===e.structures.length){var o=t.plugin.managers.structure.hierarchy.seletionSet,s=e.structures[0];return{label:(null===(r=e.cell.obj)||void 0===r?void 0:r.label)+" | "+(null===(a=s.cell.obj)||void 0===a?void 0:a.label),selected:o.has(s.cell.transform.ref),value:[e,s]}}return Object(n.e)([je.a.Header(null===(i=e.cell.obj)||void 0===i?void 0:i.label)],e.structures.map(t.item))},t.selectHierarchy=function(e){if(e&&0!==e.length){for(var r=[],n=0,a=e;n1&&t.push(Object(n.e)([je.a.Header("Trajectories")],e.trajectories.map(this.item))),(e.models.length>1||e.trajectories.length>1)&&t.push(Object(n.e)([je.a.Header("Models")],e.models.map(this.item))),1===e.trajectories.length&&1===e.models.length?t.push.apply(t,e.structures.map(this.item)):e.structures.length>0&&t.push(Object(n.e)([je.a.Header("Structures")],e.structures.map(this.item))),t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isEmpty",{get:function(){var e=this.plugin.managers.structure.hierarchy.current,t=e.structures,r=e.models;return 0===e.trajectories.length&&0===r.length&&0===t.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"label",{get:function(){var e,t,r,n,a,i,o,s,u,c,l,d,p,f,h=this.plugin.managers.structure.hierarchy.selection,m=h.structures,g=h.models,b=h.trajectories;if(1===m.length)return(null===(t=null===(e=(_=m[0]).model)||void 0===e?void 0:e.trajectory)||void 0===t?void 0:t.models)&&1===_.model.trajectory.models.length?null===(r=_.cell.obj)||void 0===r?void 0:r.data.label:_.model?(null===(n=_.model.cell.obj)||void 0===n?void 0:n.label)+" | "+(null===(a=_.cell.obj)||void 0===a?void 0:a.data.label):null===(i=_.cell.obj)||void 0===i?void 0:i.data.label;if(m.length>1){for(var v=m[0],x=null===(o=null==v?void 0:v.model)||void 0===o?void 0:o.trajectory,O=!0,j=0,S=m;j0){x=g[0].trajectory;if(1===g.length){var w=null===(c=g[0].cell.obj)||void 0===c?void 0:c.data;return w&&y.d.TrajectoryInfo.get(w).size>1?(null===(l=null==x?void 0:x.cell.obj)||void 0===l?void 0:l.label)+" | Model "+(y.d.TrajectoryInfo.get(w).index+1)+" of "+y.d.TrajectoryInfo.get(w).size:(null===(d=null==x?void 0:x.cell.obj)||void 0===d?void 0:d.label)+" | Model"}O=!0;for(var C=0,A=g;C0?1===b.length?(null===(f=b[0].cell.obj)||void 0===f?void 0:f.label)+" trajectory":b.length+" trajectories":0===b.length&&0===g.length&&0===m.length?"Nothing Loaded":"Nothing Selected"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"presetActions",{get:function(){var e=[],t=this.plugin.managers.structure.hierarchy.selection.trajectories;if(0===t.length)return e;var r=this.plugin.builders.structure.hierarchy.getPresets(t[0].cell.obj);if(t.length>1){for(var n=new Set(r),a=1;a0&&Object(o.jsx)(p.f,{svg:f.i,className:"msp-form-control",flex:"40px",onClick:this.togglePreset,title:"Apply a structure presets to the current hierarchy.",toggleState:"presets"===this.state.show,disabled:e},void 0)]}),void 0),"hierarchy"===this.state.show&&Object(o.jsx)(je.a,{items:this.hierarchyItems,onSelect:this.selectHierarchy,multiselect:!0},void 0),"presets"===this.state.show&&Object(o.jsx)(je.a,{items:t,onSelect:this.applyPreset},void 0),this.modelIndex,this.structureType,this.transform,Object(o.jsxs)("div",Object(n.a)({style:{marginTop:"6px"}},{children:[Object(o.jsx)(St,{},void 0),Object(o.jsx)(lt,{hideOnEmpty:!0},void 0)]}),void 0)]},void 0)},t}(u.a);function wt(e,t){var r=function(e,t){return{state:e,oldHierarchy:t,hierarchy:Ct(),changed:!1,added:new Set}}(e,t||Ct());return function(e,t){var r={tree:e,state:t};Bt(r,e.root)}(e.tree,r),t&&t.refs.forEach(Dt,r),{hierarchy:r.hierarchy,added:r.added,changed:r.changed}}function Ct(){return{volumes:[],lazyVolumes:[],refs:new Map}}function At(e){return{kind:"volume",cell:e,version:e.transform.version,representations:[]}}function Et(e){return{kind:"lazy-volume",cell:e,version:e.transform.version}}function Pt(e,t){return{kind:"volume-representation",cell:e,version:e.transform.version,volume:t}}function Tt(e,t,r,n){for(var a=[],i=4;i0&&Object(o.jsx)("div",Object(n.a)({style:{marginTop:"6px"}},{children:r.representations.map((function(e){return Object(o.jsx)(Xt,{representation:e},e.cell.transform.ref)}))}),void 0)]},void 0)},t}(u.a),Xt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={action:void 0},t.remove=function(){return t.plugin.managers.volume.hierarchy.remove([t.props.representation],!0)},t.toggleVisible=function(e){e.preventDefault(),e.currentTarget.blur(),t.plugin.managers.volume.hierarchy.toggleVisibility([t.props.representation])},t.toggleUpdate=function(){return t.setState({action:"update"===t.state.action?void 0:"update"})},t.highlight=function(e){e.preventDefault(),t.props.representation.cell.parent&&d.a.Interactivity.Object.Highlight(t.plugin,{state:t.props.representation.cell.parent,ref:t.props.representation.cell.transform.ref})},t.clearHighlight=function(e){e.preventDefault(),d.a.Interactivity.ClearHighlights(t.plugin)},t.focus=function(){var e,r=t.props.representation,n=null===(e=t.props.representation.cell.obj)||void 0===e?void 0:e.data.repr.renderObjects;r.cell.state.isHidden&&t.plugin.managers.volume.hierarchy.toggleVisibility([t.props.representation],"show"),t.plugin.managers.camera.focusRenderObjects(n,{extraRadius:1})},t}return Object(n.c)(t,e),t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.state.events.cell.stateUpdated,(function(t){A.a.ObjectEvent.isCell(t,e.props.representation.cell)&&e.forceUpdate()}))},t.prototype.render=function(){var e,t,r,a=this.props.representation.cell;return Object(o.jsxs)(o.Fragment,{children:[Object(o.jsxs)("div",Object(n.a)({className:"msp-flex-row"},{children:[Object(o.jsxs)(p.a,Object(n.a)({noOverflow:!0,className:"msp-control-button-label",title:(null===(e=a.obj)||void 0===e?void 0:e.label)+". Click to focus.",onClick:this.focus,onMouseEnter:this.highlight,onMouseLeave:this.clearHighlight,style:{textAlign:"left"}},{children:[null===(t=a.obj)||void 0===t?void 0:t.label,Object(o.jsx)("small",Object(n.a)({className:"msp-25-lower-contrast-text",style:{float:"right"}},{children:null===(r=a.obj)||void 0===r?void 0:r.description}),void 0)]}),void 0),Object(o.jsx)(p.f,{svg:a.state.isHidden?f.gb:f.hb,toggleState:!1,onClick:this.toggleVisible,title:(a.state.isHidden?"Show":"Hide")+" component",small:!0,className:"msp-form-control",flex:!0},void 0),Object(o.jsx)(p.f,{svg:f.B,onClick:this.remove,title:"Remove",small:!0},void 0),Object(o.jsx)(p.f,{svg:f.K,onClick:this.toggleUpdate,title:"Actions",toggleState:"update"===this.state.action},void 0)]}),void 0),"update"===this.state.action&&!!a.parent&&Object(o.jsx)("div",Object(n.a)({style:{marginBottom:"6px"},className:"msp-accent-offset"},{children:Object(o.jsx)(Ae,{state:a.parent,transform:a.transform,customHeader:"none",noMargin:!0},void 0)}),void 0)]},void 0)},t}(u.d),Yt=r(669),Kt=r(735),Qt=r(834);function Zt(e,t){if(Math.abs(e)>Math.abs(t)){var r=t/e;return Math.abs(e)*Math.sqrt(1+r*r)}if(0!==t){r=e/t;return Math.abs(t)*Math.sqrt(1+r*r)}return 0}(Vt=Ut||(Ut={})).createCache=function(e){return{size:e,matrix:Qt.a.create(e,e),eigenValues:new Float64Array(e),D:new Float64Array(e),E:new Float64Array(e)}},Vt.compute=function(e){!function(e,t,r,n,a){for(var i=0;i0;a--){for(var i=0,o=0,s=0;s0&&(l=-l),r[a]=i*l,o-=c*l,t[a-1]=c-l,u=0;uu){var l=0;do{l+=1;var d=t[u],p=Zt(j=(t[u+1]-d)/(2*r[u]),1);j<0&&(p=-p),t[u]=r[u]/(j+p),t[u+1]=r[u]*(j+p);var f=t[u+1],h=d-t[u];for(a=u+2;a=u;a--){b=g,g=m,x=y,d=m*r[a],h=m*j,p=Zt(j,r[a]),r[a+1]=y*p,y=r[a]/p,j=(m=j/p)*t[a]-y*d,t[a+1]=h+y*(m*d+y*t[a]);for(var O=0;O=1e3)throw"SVD: Not converging."}while(Math.abs(r[u])>s*o)}t[u]=t[u]+i,r[u]=0}for(a=0;a=a[d][p]?(e="S",t=o[d][p]):a[d][p]>=i[d][p]?(e="V",t=a[d][p]):(e="H",t=i[d][p]);d>0&&p>0;)"S"===e?o[d][p]===o[d-1][p-1]+r(d-1,p-1)?(f=s[d-1]+f,h=u[p-1]+h,--d,--p,e="S"):o[d][p]===a[d][p]?e="V":o[d][p]===i[d][p]?e="H":(--d,--p):"V"===e?a[d][p]===a[d-1][p]+c?(f=s[d-1]+f,h="-"+h,--d,e="V"):a[d][p]===o[d-1][p]+l?(f=s[d-1]+f,h="-"+h,--d,e="S"):--d:"H"===e&&(i[d][p]===i[d][p-1]+c?(f="-"+f,h=u[p-1]+h,--p,e="H"):i[d][p]===o[d][p-1]+l?(f="-"+f,h=u[p-1]+h,--p,e="S"):--p);for(;d>0;)f=s[d-1]+f,h="-"+h,--d;for(;p>0;)f="-"+f,h=u[p-1]+h,--p;return{aliA:f,aliB:h,score:t}},e}();function dr(e){return e.model.sequence.byEntityKey[function(e){switch(e.kind){case 0:return e.model.atomicHierarchy.index.getEntityFromChain(e.chainIndex[e.elements[0]]);case 1:return e.model.coarseHierarchy.spheres.entityKey[e.elements[0]];case 2:return e.model.coarseHierarchy.gaussians.entityKey[e.elements[0]]}}(e)].sequence}!function(e){function t(e){var t=new Map;if(ar.f.isAtomic(e.unit))for(var r=e.unit.model.atomicHierarchy.residues.label_seq_id,n=e.unit.residueIndex,a=0,i=xt.d.size(e.indices);a=t)break}if(n>=t)break}return r}var br=r(843);function vr(e){for(var t=new Map,r=0;r1&&Object(o.jsx)(p.f,{svg:f.f,small:!0,className:"msp-form-control",onClick:function(){return r.moveHistory(e,"up")},flex:"20px",title:"Move up"},void 0),a.length>1&&Object(o.jsx)(p.f,{svg:f.c,small:!0,className:"msp-form-control",onClick:function(){return r.moveHistory(e,"down")},flex:"20px",title:"Move down"},void 0),Object(o.jsx)(p.f,{svg:f.B,small:!0,className:"msp-form-control",onClick:function(){return r.plugin.managers.structure.selection.modifyHistory(e,"remove")},flex:!0,title:"Remove"},void 0)]}),e.id)},t.prototype.atomsLociEntry=function(e,t){var r=this;return Object(o.jsxs)("div",{children:[Object(o.jsx)("div",Object(n.a)({className:"msp-control-group-header"},{children:Object(o.jsx)("div",Object(n.a)({className:"msp-no-overflow",title:e.label},{children:e.label}),void 0)}),void 0),Object(o.jsx)("div",Object(n.a)({className:"msp-control-offset"},{children:e.atoms.map((function(e,t){return r.historyEntry(e,t)}))}),void 0)]},t)},Object.defineProperty(t.prototype,"chainEntries",{get:function(){var e=this,t=y.h.Location.create(),r=[];return this.plugin.managers.structure.selection.entries.forEach((function(n,a){var i=n.selection,o=A.d.resolveAndCheck(e.plugin.state.data,a);if(o&&!y.h.Loci.isEmpty(i)){var s=y.h.Loci.getFirstLocation(i,t);if(!(i.elements.length>1||"polymer"!==y.i.entity.type(s))){var u=y.h.Stats.ofLoci(i),c=Object(Ve.g)(u,{countsOnly:!0}),l=Object(Ve.e)(s,{reverse:!0,granularity:"chain"}).split("|"),d=c+" | "+l[0]+" | "+l[l.length-1];r.push({loci:i,label:d,cell:o})}}})),r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"atomEntries",{get:function(){for(var e=this,t=new Map,r=this.plugin.managers.structure.selection.additionsHistory,n=0,a=r.length;n0&&Object(o.jsx)("div",Object(n.a)({className:"msp-control-offset"},{children:t.map((function(t,r){return e.lociEntry(t,r)}))}),void 0),t.length<2&&Object(o.jsx)("div",Object(n.a)({className:"msp-control-offset msp-help-text"},{children:Object(o.jsxs)("div",Object(n.a)({className:"msp-help-description"},{children:[Object(o.jsx)(f.H,{svg:f.F,inline:!0},void 0),"Add 2 or more selections (toggle ",Object(o.jsx)(ot,{inline:!0},void 0)," mode) from separate structures. Selections must be limited to single polymer chains or residues therein."]}),void 0)}),void 0),t.length>1&&Object(o.jsx)(p.a,Object(n.a)({title:"Superpose structures by selected chains.",className:"msp-btn-commit msp-btn-commit-on",onClick:this.superposeChains,style:{marginTop:"1px"}},{children:"Superpose"}),void 0)]},void 0)},t.prototype.addByAtoms=function(){var e=this,t=this.atomEntries;return Object(o.jsxs)(o.Fragment,{children:[t.length>0&&Object(o.jsx)("div",Object(n.a)({className:"msp-control-offset"},{children:t.map((function(t,r){return e.atomsLociEntry(t,r)}))}),void 0),t.length<2&&Object(o.jsx)("div",Object(n.a)({className:"msp-control-offset msp-help-text"},{children:Object(o.jsxs)("div",Object(n.a)({className:"msp-help-description"},{children:[Object(o.jsx)(f.H,{svg:f.F,inline:!0},void 0),"Add 1 or more selections (toggle ",Object(o.jsx)(ot,{inline:!0},void 0)," mode) from separate structures. Selections must be limited to single atoms."]}),void 0)}),void 0),t.length>1&&Object(o.jsx)(p.a,Object(n.a)({title:"Superpose structures by selected atoms.",className:"msp-btn-commit msp-btn-commit-on",onClick:this.superposeAtoms,style:{marginTop:"1px"}},{children:"Superpose"}),void 0)]},void 0)},t.prototype.superposeByDbMapping=function(){return Object(o.jsx)(o.Fragment,{children:Object(o.jsx)(p.a,Object(n.a)({icon:f.bb,title:"Superpose structures using database mapping.",className:"msp-btn msp-btn-block",onClick:this.superposeDb,style:{marginTop:"1px"},disabled:this.state.isBusy},{children:"DB"}),void 0)},void 0)},t.prototype.render=function(){return Object(o.jsxs)(o.Fragment,{children:[Object(o.jsxs)("div",Object(n.a)({className:"msp-flex-row"},{children:[Object(o.jsx)(p.i,{icon:f.bb,label:"Chains",toggle:this.toggleByChains,isSelected:"byChains"===this.state.action,disabled:this.state.isBusy},void 0),Object(o.jsx)(p.i,{icon:f.ab,label:"Atoms",toggle:this.toggleByAtoms,isSelected:"byAtoms"===this.state.action,disabled:this.state.isBusy},void 0),this.state.canUseDb&&this.superposeByDbMapping(),Object(o.jsx)(p.i,{icon:f.eb,label:"",title:"Options",toggle:this.toggleOptions,isSelected:"options"===this.state.action,disabled:this.state.isBusy,style:{flex:"0 0 40px",padding:0}},void 0)]}),void 0),"byChains"===this.state.action&&this.addByChains(),"byAtoms"===this.state.action&&this.addByAtoms(),"options"===this.state.action&&Object(o.jsx)("div",Object(n.a)({className:"msp-control-offset"},{children:Object(o.jsx)(h.a,{params:jr,values:this.state.options,onChangeValues:this.setOptions,isDisabled:this.state.isBusy},void 0)}),void 0)]},void 0)},t}(u.d),wr=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={show:!1,label:""},t.update=function(){var e=t.plugin.state.data,r=e.selectQ((function(e){return e.ofTransformer(l.a.Model.ModelFromTrajectory)}));if(0!==r.length){for(var n="",a=0,i=new Set,o=0,s=r;o1){if(i.has(u.sourceRef))return void t.setState({show:!1});if(i.add(u.sourceRef),a++,!n)n="Model "+(u.transform.params.modelIndex+1)+" / "+c.data.frameCount}}}a>1&&(n=""),t.setState({show:a>0,label:n})}else t.setState({show:!1})},t.reset=function(){return d.a.State.ApplyAction(t.plugin,{state:t.plugin.state.data,action:c.UpdateTrajectory.create({action:"reset"})})},t.prev=function(){return d.a.State.ApplyAction(t.plugin,{state:t.plugin.state.data,action:c.UpdateTrajectory.create({action:"advance",by:-1})})},t.next=function(){return d.a.State.ApplyAction(t.plugin,{state:t.plugin.state.data,action:c.UpdateTrajectory.create({action:"advance",by:1})})},t}return Object(n.c)(t,e),t.prototype.componentDidMount=function(){this.subscribe(this.plugin.state.data.events.changed,this.update),this.subscribe(this.plugin.behaviors.state.isAnimating,this.update)},t.prototype.render=function(){var e=this.plugin.behaviors.state.isAnimating.value;return!this.state.show||e&&!this.state.label?null:Object(o.jsxs)("div",Object(n.a)({className:"msp-traj-controls"},{children:[!e&&Object(o.jsx)(p.f,{svg:f.W,title:"First Model",onClick:this.reset,disabled:e},void 0),!e&&Object(o.jsx)(p.f,{svg:f.L,title:"Previous Model",onClick:this.prev,disabled:e},void 0),!e&&Object(o.jsx)(p.f,{svg:f.M,title:"Next Model",onClick:this.next,disabled:e},void 0),!!this.state.label&&Object(o.jsx)("span",{children:this.state.label},void 0)]}),void 0)},t}(u.c),Cr=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={isBusy:!1,show:!0},t.keyUp=function(e){if(e.ctrlKey&&!t.state.isBusy&&e.target===document.body){var r=t.plugin.managers.snapshot;if(37===e.keyCode||"ArrowLeft"===e.key)r.state.isPlaying&&r.stop(),t.prev();else if(38===e.keyCode||"ArrowUp"===e.key){if(r.state.isPlaying&&r.stop(),0===r.state.entries.size)return;var n=r.state.entries.get(0);t.update(n.snapshot.id)}else if(39===e.keyCode||"ArrowRight"===e.key)r.state.isPlaying&&r.stop(),t.next();else if(40===e.keyCode||"ArrowDown"===e.key){if(r.state.isPlaying&&r.stop(),0===r.state.entries.size)return;var a=r.state.entries.get(r.state.entries.size-1);t.update(a.snapshot.id)}}},t.change=function(e){"none"!==e.target.value&&t.update(e.target.value)},t.prev=function(){var e=t.plugin.managers.snapshot,r=e.getNextId(e.state.current,-1);r&&t.update(r)},t.next=function(){var e=t.plugin.managers.snapshot,r=e.getNextId(e.state.current,1);r&&t.update(r)},t.togglePlay=function(){t.plugin.managers.snapshot.togglePlay()},t}return Object(n.c)(t,e),t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.managers.snapshot.events.changed,(function(){return e.forceUpdate()})),this.subscribe(this.plugin.behaviors.state.isBusy,(function(t){return e.setState({isBusy:t})})),this.subscribe(this.plugin.behaviors.state.isAnimating,(function(t){return e.setState({isBusy:t})})),window.addEventListener("keyup",this.keyUp,!1)},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),window.removeEventListener("keyup",this.keyUp,!1)},t.prototype.update=function(e){return Object(n.b)(this,void 0,void 0,(function(){return Object(n.d)(this,(function(t){switch(t.label){case 0:return this.setState({isBusy:!0}),[4,d.a.State.Snapshots.Apply(this.plugin,{id:e})];case 1:return t.sent(),this.setState({isBusy:!1}),[2]}}))}))},t.prototype.render=function(){var e=this.plugin.managers.snapshot,t=e.state.entries.size;if(t<2||!this.state.show)return null;var r=e.state.current,a=e.state.isPlaying;return Object(o.jsxs)("div",Object(n.a)({className:"msp-state-snapshot-viewport-controls"},{children:[Object(o.jsxs)("select",Object(n.a)({className:"msp-form-control",value:r||"none",onChange:this.change,disabled:this.state.isBusy||a},{children:[!r&&Object(o.jsx)("option",{value:"none"},"none"),e.state.entries.valueSeq().map((function(e,r){return Object(o.jsxs)("option",Object(n.a)({value:e.snapshot.id},{children:["["+(r+1)+"/"+t+"]"," ",e.name||new Date(e.timestamp).toLocaleString()]}),e.snapshot.id)}))]}),void 0),Object(o.jsx)(p.f,{svg:a?f.X:f.P,title:a?"Pause":"Cycle States",onClick:this.togglePlay,disabled:!a&&this.state.isBusy},void 0),!a&&Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)(p.f,{svg:f.L,title:"Previous State",onClick:this.prev,disabled:this.state.isBusy||a},void 0),Object(o.jsx)(p.f,{svg:f.M,title:"Next State",onClick:this.next,disabled:this.state.isBusy||a},void 0)]},void 0)]}),void 0)},t}(u.c),Ar=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={isEmpty:!0,isExpanded:!1,isBusy:!1,isAnimating:!1,isPlaying:!1},t.toggleExpanded=function(){return t.setState({isExpanded:!t.state.isExpanded})},t.stop=function(){t.plugin.managers.animation.stop(),t.plugin.managers.snapshot.stop()},t}return Object(n.c)(t,e),t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.managers.snapshot.events.changed,(function(){e.plugin.managers.snapshot.state.isPlaying?e.setState({isPlaying:!0,isExpanded:!1}):e.setState({isPlaying:!1})})),this.subscribe(this.plugin.behaviors.state.isBusy,(function(t){t?e.setState({isBusy:!0,isExpanded:!1,isEmpty:e.plugin.state.data.tree.transforms.size<2}):e.setState({isBusy:!1,isEmpty:e.plugin.state.data.tree.transforms.size<2})})),this.subscribe(this.plugin.behaviors.state.isAnimating,(function(t){t?e.setState({isAnimating:!0,isExpanded:!1}):e.setState({isAnimating:!1})}))},t.prototype.render=function(){var e=this.plugin.managers.snapshot.state.isPlaying;if(e||this.state.isEmpty||this.plugin.managers.animation.isEmpty||!this.plugin.config.get(Yt.a.Viewport.ShowAnimation))return null;var t=this.state.isAnimating;return Object(o.jsxs)("div",Object(n.a)({className:"msp-animation-viewport-controls"},{children:[Object(o.jsxs)("div",{children:[Object(o.jsx)("div",{className:"msp-semi-transparent-background"},void 0),Object(o.jsx)(p.f,{svg:t||e?f.X:f.Y,transparent:!0,title:t?"Stop":"Select Animation",onClick:t||e?this.stop:this.toggleExpanded,toggleState:this.state.isExpanded,disabled:!t&&!e&&(this.state.isBusy||this.state.isPlaying||this.state.isEmpty)},void 0)]},void 0),this.state.isExpanded&&!this.state.isBusy&&Object(o.jsx)("div",Object(n.a)({className:"msp-animation-viewport-controls-select"},{children:Object(o.jsx)(m,{onStart:this.toggleExpanded},void 0)}),void 0)]}),void 0)},t}(u.c),Er=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onMouseMove=function(e){0===e.buttons&&e.stopPropagation()},t}return Object(n.c)(t,e),t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.behaviors.interaction.selectionMode,(function(){return e.forceUpdate()}))},t.prototype.render=function(){return this.plugin.selectionMode?Object(o.jsx)("div",Object(n.a)({className:"msp-selection-viewport-controls",onMouseMove:this.onMouseMove},{children:Object(o.jsx)(ct,{},void 0)}),void 0):null},t}(u.c),Pr=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={labels:[]},t}return Object(n.c)(t,e),t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.behaviors.labels.highlight,(function(t){return e.setState({labels:t.labels})}))},t.prototype.render=function(){return 0===this.state.labels.length?null:Object(o.jsx)("div",Object(n.a)({className:"msp-highlight-info"},{children:this.state.labels.map((function(e,t){return Object(o.jsx)("div",{dangerouslySetInnerHTML:{__html:e}},""+t)}))}),void 0)},t}(u.c),Tr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.c)(t,e),t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.state.behaviors.events.changed,(function(){return e.forceUpdate()}))},t.prototype.render=function(){var e=this,t=[];return this.plugin.customStructureControls.forEach((function(r,n){t.push(Object(o.jsx)(r,{initiallyCollapsed:e.props.initiallyCollapsed},n))})),t.length>0?Object(o.jsx)(o.Fragment,{children:t},void 0):null},t}(u.c),Ir=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.c)(t,e),t.prototype.render=function(){return Object(o.jsxs)(o.Fragment,{children:[Object(o.jsxs)("div",Object(n.a)({className:"msp-section-header"},{children:[Object(o.jsx)(f.H,{svg:f.l},void 0),"Structure Tools"]}),void 0),Object(o.jsx)(_t,{},void 0),Object(o.jsx)(mt,{},void 0),Object(o.jsx)(Or,{},void 0),Object(o.jsx)(Te,{},void 0),this.plugin.config.get(Yt.a.VolumeStreaming.Enabled)&&Object(o.jsx)(qt,{},void 0),Object(o.jsx)(Wt,{},void 0),Object(o.jsx)(Tr,{},void 0)]},void 0)},t}(u.c),kr=r(796),Mr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.c)(t,e),Object.defineProperty(t.prototype,"current",{get:function(){return this.props.state.behaviors.currentObject.value},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.state.events.object.updated,(function(t){var r=t.ref,n=t.state,a=e.current;a.ref===r&&a.state===n&&e.forceUpdate()})),this.subscribe(this.plugin.state.data.actions.events.added,(function(){return e.forceUpdate()})),this.subscribe(this.plugin.state.data.actions.events.removed,(function(){return e.forceUpdate()}))},t.prototype.render=function(){var e=this,t=this.props,r=t.state,a=t.nodeRef,i=r.cells.get(a),s=r.actions.fromCell(i,this.plugin);if(0===s.length)return null;var u=i.transform.transformer.definition,c=i.obj?i.obj.label:u.display&&u.display.name||u.name;return Object(o.jsxs)("div",Object(n.a)({className:"msp-state-actions"},{children:[!this.props.hideHeader&&Object(o.jsxs)("div",Object(n.a)({className:"msp-section-header"},{children:[Object(o.jsx)(f.H,{svg:f.v},void 0)," ","Actions ("+c+")"]}),void 0),s.map((function(t,n){return Object(o.jsx)(Gt,{state:r,action:t,nodeRef:a,initiallyCollapsed:0===n?!e.props.alwaysExpandFirst&&e.props.initiallyCollapsed:e.props.initiallyCollapsed},""+t.id)}))]}),void 0)},t}(u.c),Dr=r(719),Rr=r(846),Br=r(722),Lr=r(696);function Nr(e){return e&&"function"==typeof e.schedule}var Fr=r(656),zr=r(721);var Ur=function(){function e(e,t){this.project=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new Vr(e,this.project,this.thisArg))},e}(),Vr=function(e){function t(t,r,n){var a=e.call(this,t)||this;return a.project=r,a.count=0,a.thisArg=n||a,a}return Fr.a(t,e),t.prototype._next=function(e){var t;try{t=this.project.call(this.thisArg,e,this.count++)}catch(e){return void this.destination.error(e)}this.destination.next(t)},t}(zr.a),Hr=function(e){return function(t){for(var r=0,n=e.length;r0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},t}(nn),un=r(944);function cn(e){return void 0===e&&(e=Number.POSITIVE_INFINITY),an(un.a,e)}function ln(e,t){return t?$r(e,t):new Lr.a(Hr(e))}function dn(){for(var e=[],t=0;t1&&"number"==typeof e[e.length-1]&&(r=e.pop())):"number"==typeof a&&(r=e.pop()),null===n&&1===e.length&&e[0]instanceof Lr.a?e[0]:cn(r)(ln(e,n))}var pn,fn=function(e){function t(r){var a=e.call(this)||this;return a.plugin=r,a.data=A.a.create(new X.a.Root({}),{runTask:a.plugin.runTask,globalContext:a.plugin,historyCapacity:a.plugin.config.get(Yt.a.State.HistoryCapacity)}),a.behaviors=A.a.create(new Rr.b.Root({}),{runTask:a.plugin.runTask,globalContext:a.plugin,rootState:{isLocked:!0}}),a.events={cell:{stateUpdated:dn(a.data.events.cell.stateUpdated,a.behaviors.events.cell.stateUpdated),created:dn(a.data.events.cell.created,a.behaviors.events.cell.created),removed:dn(a.data.events.cell.removed,a.behaviors.events.cell.removed)},object:{created:dn(a.data.events.object.created,a.behaviors.events.object.created),removed:dn(a.data.events.object.removed,a.behaviors.events.object.removed),updated:dn(a.data.events.object.updated,a.behaviors.events.object.updated)}},a.snapshotParams=a.ev.behavior(t.DefaultSnapshotParams),a.setSnapshotParams=function(e){a.snapshotParams.next(Object(n.a)(Object(n.a)({},t.DefaultSnapshotParams),e))},a}return Object(n.c)(t,e),Object.defineProperty(t.prototype,"animation",{get:function(){return this.plugin.managers.animation},enumerable:!1,configurable:!0}),t.prototype.getSnapshot=function(e){var t,r,a=Object(n.a)(Object(n.a)({},this.snapshotParams.value),e);return{id:s.c.create22(),data:a.data?this.data.getSnapshot():void 0,behaviour:a.behavior?this.behaviors.getSnapshot():void 0,animation:a.animation?this.animation.getSnapshot():void 0,startAnimation:a.startAnimation?!!a.startAnimation:void 0,camera:a.camera?{current:this.plugin.canvas3d.camera.getSnapshot(),transitionStyle:a.cameraTransition.name,transitionDurationInMs:"animate"===(null===(t=null==a?void 0:a.cameraTransition)||void 0===t?void 0:t.name)?a.cameraTransition.params.durationInMs:void 0}:void 0,canvas3d:a.canvas3d?{props:null===(r=this.plugin.canvas3d)||void 0===r?void 0:r.props}:void 0,interactivity:a.interactivity?{props:this.plugin.managers.interactivity.props}:void 0,structureFocus:this.plugin.managers.structure.focus.getSnapshot(),durationInMs:null==a?void 0:a.durationInMs}},t.prototype.setSnapshot=function(e){var t;return Object(n.b)(this,void 0,void 0,(function(){var r;return Object(n.d)(this,(function(n){switch(n.label){case 0:return[4,this.animation.stop()];case 1:return n.sent(),e.behaviour?[4,this.plugin.runTask(this.behaviors.setSnapshot(e.behaviour))]:[3,3];case 2:n.sent(),n.label=3;case 3:return e.data?[4,this.plugin.runTask(this.data.setSnapshot(e.data))]:[3,5];case 4:n.sent(),n.label=5;case 5:return(null===(t=e.canvas3d)||void 0===t?void 0:t.props)?(r=w.a.normalizeParams(kr.c,e.canvas3d.props,"children"),[4,d.a.Canvas3D.SetSettings(this.plugin,{settings:r})]):[3,7];case 6:n.sent(),n.label=7;case 7:return e.interactivity&&e.interactivity.props&&this.plugin.managers.interactivity.setProps(e.interactivity.props),e.structureFocus&&this.plugin.managers.structure.focus.setSnapshot(e.structureFocus),e.animation&&this.animation.setSnapshot(e.animation),e.camera&&d.a.Camera.Reset(this.plugin,{snapshot:e.camera.current,durationMs:"animate"===e.camera.transitionStyle?e.camera.transitionDurationInMs:void 0}),e.startAnimation&&this.animation.start(),[2]}}))}))},t.prototype.updateTransform=function(e,t,r,n){var a=e.build().to(t).update(r);return d.a.State.Update(this.plugin,{state:e,tree:a,options:{canUndo:n}})},t.prototype.updateBehavior=function(e,t){var r=this.behaviors.build();if(this.behaviors.tree.transforms.has(e.id))r.to(e.id).update(t);else{var n=e.createDefaultParams(void 0,this.plugin);r.to(Rr.b.getCategoryId(e)).apply(e,Object(Br.b)(n,t),{ref:e.id})}return this.plugin.runTask(this.behaviors.updateTree(r))},t.prototype.dispose=function(){this.behaviors.cells.forEach((function(e){Rr.b.Behavior.is(e.obj)&&e.obj.data.unregister()})),e.prototype.dispose.call(this),this.data.dispose(),this.behaviors.dispose(),this.animation.dispose()},t}(C.a);(pn=fn||(fn={})).SnapshotParams={durationInMs:w.a.Numeric(1500,{min:100,max:15e3,step:100},{label:"Duration in ms"}),data:w.a.Boolean(!0),behavior:w.a.Boolean(!1),animation:w.a.Boolean(!0),startAnimation:w.a.Boolean(!1),canvas3d:w.a.Boolean(!0),interactivity:w.a.Boolean(!0),camera:w.a.Boolean(!0),cameraTransition:w.a.MappedStatic("animate",{animate:w.a.Group({durationInMs:w.a.Numeric(250,{min:100,max:5e3,step:500},{label:"Duration in ms"})}),instant:w.a.Group({})},{options:[["animate","Animate"],["instant","Instant"]]})},pn.DefaultSnapshotParams=w.a.getDefaultValues(pn.SnapshotParams);var hn=r(677),mn=r(842),gn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.c)(t,e),t.prototype.render=function(){var e;return Object(o.jsxs)("div",{children:[Object(o.jsx)(p.g,{icon:f.T,title:"Plugin State"},void 0),Object(o.jsx)("div",Object(n.a)({style:{marginBottom:"10px"}},{children:Object(o.jsx)(p.d,Object(n.a)({header:"Save Options",initiallyExpanded:!1},{children:Object(o.jsx)(vn,{},void 0)}),void 0)}),void 0),Object(o.jsx)(yn,{},void 0),Object(o.jsx)(xn,{},void 0),Object(o.jsx)(p.g,{title:"Save as File",accent:"blue"},void 0),Object(o.jsx)(bn,{},void 0),"none"!==(null===(e=this.plugin.spec.components)||void 0===e?void 0:e.remoteState)&&Object(o.jsx)(On,{},void 0)]},void 0)},t}(u.c),bn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.downloadToFileJson=function(){var e,r;null===(r=(e=t.props).onAction)||void 0===r||r.call(e),d.a.State.Snapshots.DownloadToFile(t.plugin,{type:"json"})},t.downloadToFileZip=function(){var e,r;null===(r=(e=t.props).onAction)||void 0===r||r.call(e),d.a.State.Snapshots.DownloadToFile(t.plugin,{type:"zip"})},t.open=function(e){var r,n;e.target.files&&e.target.files[0]?(null===(n=(r=t.props).onAction)||void 0===n||n.call(r),d.a.State.Snapshots.OpenFile(t.plugin,{file:e.target.files[0]})):t.plugin.log.error("No state file selected")},t}return Object(n.c)(t,e),t.prototype.render=function(){return Object(o.jsxs)(o.Fragment,{children:[Object(o.jsxs)("div",Object(n.a)({className:"msp-flex-row"},{children:[Object(o.jsx)(p.a,Object(n.a)({icon:f.E,onClick:this.downloadToFileJson,title:"Save the state description. Input data are loaded using the provided sources. Does not work if local files are used as input."},{children:"State"}),void 0),Object(o.jsx)(p.a,Object(n.a)({icon:f.E,onClick:this.downloadToFileZip,title:"Save the state including the input data."},{children:"Session"}),void 0),Object(o.jsxs)("div",Object(n.a)({className:"msp-btn msp-btn-block msp-btn-action msp-loader-msp-btn-file"},{children:[Object(o.jsx)(f.H,{svg:f.N,inline:!0},void 0)," Open ",Object(o.jsx)("input",{onChange:this.open,type:"file",multiple:!1,accept:".molx,.molj"},void 0)]}),void 0)]}),void 0),Object(o.jsxs)("div",Object(n.a)({className:"msp-help-text",style:{padding:"10px"}},{children:[Object(o.jsx)(f.H,{svg:f.ib},void 0)," This is an experimental feature and stored states/sessions might not be openable in a future version."]}),void 0)]},void 0)},t}(u.c),vn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.c)(t,e),t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.state.snapshotParams,(function(){return e.forceUpdate()}))},t.prototype.render=function(){return Object(o.jsx)(h.a,{params:fn.SnapshotParams,values:this.plugin.state.snapshotParams.value,onChangeValues:this.plugin.state.setSnapshotParams},void 0)},t}(u.c),yn=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.state={params:w.a.getDefaultValues(t.Params)},r.add=function(){d.a.State.Snapshots.Add(r.plugin,{name:r.state.params.name,description:r.state.params.description})},r.updateParams=function(e){return r.setState({params:e})},r.clear=function(){d.a.State.Snapshots.Clear(r.plugin,{})},r}return Object(n.c)(t,e),t.prototype.shouldComponentUpdate=function(e,t){return!Object(s.l)(this.props,e)||!Object(s.l)(this.state,t)},t.prototype.render=function(){return Object(o.jsxs)("div",{children:[Object(o.jsx)(h.a,{params:t.Params,values:this.state.params,onEnter:this.add,onChangeValues:this.updateParams},void 0),Object(o.jsxs)("div",Object(n.a)({className:"msp-flex-row"},{children:[Object(o.jsx)(p.f,{onClick:this.clear,svg:f.B,title:"Remove All"},void 0),Object(o.jsx)(p.a,Object(n.a)({onClick:this.add,icon:f.b,style:{textAlign:"right"},commit:!0},{children:"Add"}),void 0)]}),void 0)]},void 0)},t.Params={name:w.a.Text(),description:w.a.Text()},t}(u.c),xn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.apply=function(e){var r=e.currentTarget.getAttribute("data-id");r&&d.a.State.Snapshots.Apply(t.plugin,{id:r})},t.remove=function(e){var r=e.currentTarget.getAttribute("data-id");r&&d.a.State.Snapshots.Remove(t.plugin,{id:r})},t.moveUp=function(e){var r=e.currentTarget.getAttribute("data-id");r&&d.a.State.Snapshots.Move(t.plugin,{id:r,dir:-1})},t.moveDown=function(e){var r=e.currentTarget.getAttribute("data-id");r&&d.a.State.Snapshots.Move(t.plugin,{id:r,dir:1})},t.replace=function(e){var r=e.currentTarget.getAttribute("data-id");r&&d.a.State.Snapshots.Replace(t.plugin,{id:r})},t}return Object(n.c)(t,e),t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.managers.snapshot.events.changed,(function(){return e.forceUpdate()}))},t.prototype.render=function(){var e=this,t=this.plugin.managers.snapshot.state.current;return Object(o.jsx)("ul",Object(n.a)({style:{listStyle:"none",marginTop:"10px"},className:"msp-state-list"},{children:this.plugin.managers.snapshot.state.entries.map((function(r){return Object(o.jsxs)("li",Object(n.a)({className:"msp-flex-row"},{children:[Object(o.jsxs)(p.a,Object(n.a)({"data-id":r.snapshot.id,onClick:e.apply,className:"msp-no-overflow"},{children:[Object(o.jsx)("span",Object(n.a)({style:{fontWeight:r.snapshot.id===t?"bold":void 0}},{children:r.name||new Date(r.timestamp).toLocaleString()}),void 0)," ",Object(o.jsx)("small",{children:(r.snapshot.durationInMs?Object(hn.a)(r.snapshot.durationInMs,!1)+(r.description?", ":""):"")+(r.description?r.description:"")},void 0)]}),void 0),Object(o.jsx)(p.f,{svg:f.f,"data-id":r.snapshot.id,title:"Move Up",onClick:e.moveUp,flex:"20px"},void 0),Object(o.jsx)(p.f,{svg:f.c,"data-id":r.snapshot.id,title:"Move Down",onClick:e.moveDown,flex:"20px"},void 0),Object(o.jsx)(p.f,{svg:f.db,"data-id":r.snapshot.id,title:"Replace",onClick:e.replace,flex:"20px"},void 0),Object(o.jsx)(p.f,{svg:f.B,"data-id":r.snapshot.id,title:"Remove",onClick:e.remove,flex:"20px"},void 0)]}),r.snapshot.id)}))}),void 0)},t}(u.c),On=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.Params={name:w.a.Text(),options:w.a.Group({description:w.a.Text(),playOnLoad:w.a.Boolean(!1),serverUrl:w.a.Text(t.plugin.config.get(Yt.a.State.CurrentServer))})},t.state={params:w.a.getDefaultValues(t.Params),entries:Object(Dr.OrderedMap)(),isBusy:!1},t.ListOnlyParams={options:w.a.Group({serverUrl:w.a.Text(t.plugin.config.get(Yt.a.State.CurrentServer))},{isFlat:!0})},t._mounted=!1,t.refresh=function(){return Object(n.b)(t,void 0,void 0,(function(){var e,t,r,a,i,o;return Object(n.d)(this,(function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),this.setState({isBusy:!0}),this.plugin.config.set(Yt.a.State.CurrentServer,this.state.params.options.serverUrl),[4,this.plugin.runTask(this.plugin.fetch({url:this.serverUrl("list"),type:"json"}))];case 1:for((e=s.sent()||[]).sort((function(e,t){return e.isSticky===t.isSticky?e.timestamp-t.timestamp:e.isSticky?-1:1})),t=Object(Dr.OrderedMap)().asMutable(),r=0,a=e;r0&&(a=a.substr(0,i)),window.open(a+"?snapshot-url="+encodeURIComponent(r.url),"_blank"),[2]):[2]}))}))},t}return Object(n.c)(t,e),t.prototype.render=function(){var e=this;return Object(o.jsx)("ul",Object(n.a)({style:{listStyle:"none",marginTop:"10px"},className:"msp-state-list"},{children:this.props.entries.valueSeq().map((function(t){return Object(o.jsxs)("li",Object(n.a)({className:"msp-flex-row"},{children:[Object(o.jsxs)(p.a,Object(n.a)({"data-id":t.id,onClick:e.props.fetch,disabled:e.props.isBusy,onContextMenu:e.open,title:"Click to download, right-click to open in a new tab."},{children:[t.name||new Date(t.timestamp).toLocaleString()," ",Object(o.jsx)("small",{children:t.description},void 0)]}),void 0),!t.isSticky&&e.props.remove&&Object(o.jsx)(p.f,{svg:f.B,"data-id":t.id,title:"Remove",onClick:e.props.remove,disabled:e.props.isBusy,small:!0},void 0)]}),t.id)}))}),void 0)},t}(u.d);function Sn(e,t){return function(r){return r.lift(new _n(e,t))}}var _n=function(){function e(e,t){this.predicate=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new wn(e,this.predicate,this.thisArg))},e}(),wn=function(e){function t(t,r,n){var a=e.call(this,t)||this;return a.predicate=r,a.thisArg=n,a.count=0,a}return Fr.a(t,e),t.prototype._next=function(e){var t;try{t=this.predicate.call(this.thisArg,e,this.count++)}catch(e){return void this.destination.error(e)}t&&this.destination.next(e)},t}(zr.a),Cn=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n.pending=!1,n}return Fr.a(t,e),t.prototype.schedule=function(e,t){if(void 0===t&&(t=0),this.closed)return this;this.state=e;var r=this.id,n=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(n,r,t)),this.pending=!0,this.delay=t,this.id=this.id||this.requestAsyncId(n,this.id,t),this},t.prototype.requestAsyncId=function(e,t,r){return void 0===r&&(r=0),setInterval(e.flush.bind(e,this),r)},t.prototype.recycleAsyncId=function(e,t,r){if(void 0===r&&(r=0),null!==r&&this.delay===r&&!1===this.pending)return t;clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var r=this._execute(e,t);if(r)return r;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var r=!1,n=void 0;try{this.work(e)}catch(e){r=!0,n=!!e&&e||new Error(e)}if(r)return this.unsubscribe(),n},t.prototype._unsubscribe=function(){var e=this.id,t=this.scheduler,r=t.actions,n=r.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==n&&r.splice(n,1),null!=e&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null},t}(function(e){function t(t,r){return e.call(this)||this}return Fr.a(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(Jr.a)),An=function(){function e(t,r){void 0===r&&(r=e.now),this.SchedulerAction=t,this.now=r}return e.prototype.schedule=function(e,t,r){return void 0===t&&(t=0),new this.SchedulerAction(this,e).schedule(r,t)},e.now=function(){return Date.now()},e}(),En=new(function(e){function t(r,n){void 0===n&&(n=An.now);var a=e.call(this,r,(function(){return t.delegate&&t.delegate!==a?t.delegate.now():n()}))||this;return a.actions=[],a.active=!1,a.scheduled=void 0,a}return Fr.a(t,e),t.prototype.schedule=function(r,n,a){return void 0===n&&(n=0),t.delegate&&t.delegate!==this?t.delegate.schedule(r,n,a):e.prototype.schedule.call(this,r,n,a)},t.prototype.flush=function(e){var t=this.actions;if(this.active)t.push(e);else{var r;this.active=!0;do{if(r=e.execute(e.state,e.delay))break}while(e=t.shift());if(this.active=!1,r){for(;e=t.shift();)e.unsubscribe();throw r}}},t}(An))(Cn);function Pn(e,t){return void 0===t&&(t=En),function(r){return r.lift(new Tn(e,t))}}var Tn=function(){function e(e,t){this.dueTime=e,this.scheduler=t}return e.prototype.call=function(e,t){return t.subscribe(new In(e,this.dueTime,this.scheduler))},e}(),In=function(e){function t(t,r,n){var a=e.call(this,t)||this;return a.dueTime=r,a.scheduler=n,a.debouncedSubscription=null,a.lastValue=null,a.hasValue=!1,a}return Fr.a(t,e),t.prototype._next=function(e){this.clearDebounce(),this.lastValue=e,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(kn,this.dueTime,this))},t.prototype._complete=function(){this.debouncedNext(),this.destination.complete()},t.prototype.debouncedNext=function(){if(this.clearDebounce(),this.hasValue){var e=this.lastValue;this.lastValue=null,this.hasValue=!1,this.destination.next(e)}},t.prototype.clearDebounce=function(){var e=this.debouncedSubscription;null!==e&&(this.remove(e),e.unsubscribe(),this.debouncedSubscription=null)},t}(zr.a);function kn(e){e.debouncedNext()}var Mn=r(885),Dn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={showActions:!0},t}return Object(n.c)(t,e),t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.state.events.cell.created,(function(t){t.cell.transform.parent===A.f.RootRef&&e.forceUpdate()})),this.subscribe(this.plugin.state.events.cell.removed,(function(t){t.parent===A.f.RootRef&&e.forceUpdate()}))},t.getDerivedStateFromProps=function(e,t){var r=e.state.tree.root.ref,n=0===e.state.tree.children.get(r).size;return t.showActions===n?null:{showActions:n}},t.prototype.render=function(){var e=this.props.state.tree.root.ref;return this.state.showActions?Object(o.jsxs)("div",Object(n.a)({style:{margin:"10px",cursor:"default"}},{children:[Object(o.jsx)("p",{children:"Nothing to see here yet."},void 0),Object(o.jsxs)("p",{children:["Structures and Volumes can be loaded from the ",Object(o.jsx)(f.H,{svg:f.G},void 0)," tab."]},void 0)]}),void 0):Object(o.jsx)(Rn,{cell:this.props.state.cells.get(e),depth:0},void 0)},t}(u.c),Rn=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.state={isCollapsed:!!r.props.cell.state.isCollapsed,isNull:t.isNull(r.props.cell),showLabel:t.showLabel(r.props.cell)},r}return Object(n.c)(t,e),t.prototype.is=function(e){return e.ref===this.ref&&e.state===this.props.cell.parent},Object.defineProperty(t.prototype,"ref",{get:function(){return this.props.cell.transform.ref},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.state.events.cell.stateUpdated,(function(r){e.props.cell===r.cell&&e.is(r)&&r.state.cells.has(e.ref)&&(e.state.isCollapsed===!!r.cell.state.isCollapsed&&e.state.isNull===t.isNull(r.cell)&&e.state.showLabel===t.showLabel(r.cell)||e.forceUpdate())})),this.subscribe(this.plugin.state.events.cell.created,(function(t){e.props.cell.parent===t.state&&e.ref===t.cell.transform.parent&&e.forceUpdate()})),this.subscribe(this.plugin.state.events.cell.removed,(function(t){e.props.cell.parent===t.state&&e.ref===t.parent&&e.forceUpdate()}))},t.getDerivedStateFromProps=function(e,r){var n=t.isNull(e.cell),a=t.showLabel(e.cell);return!!e.cell.state.isCollapsed===r.isCollapsed&&r.isNull===n&&r.showLabel===a?null:{isCollapsed:!!e.cell.state.isCollapsed,isNull:n,showLabel:a}},t.hasDecorator=function(e){var t,r=e.parent.tree.children.get(e.transform.ref);return 1===r.size&&!!(null===(t=e.parent)||void 0===t?void 0:t.tree.transforms.get(r.first()).transformer.definition.isDecorator)},t.isNull=function(e){return!e||!e.parent||e.obj===A.c.Null||!e.parent.tree.transforms.has(e.transform.ref)},t.showLabel=function(e){return e.transform.ref!==A.f.RootRef&&("ok"!==e.status||!e.state.isGhost&&!t.hasDecorator(e))},t.prototype.render=function(){var e=this;if(this.state.isNull)return null;var r=this.props.cell,a=r.parent.tree.children.get(this.ref);if(!this.state.showLabel)return 0===a.size?null:Object(o.jsx)(o.Fragment,{children:a.map((function(n){return Object(o.jsx)(t,{cell:r.parent.cells.get(n),depth:e.props.depth},n)}))},void 0);var i=this.props.depth+1;return Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)(Bn,{cell:r,depth:this.props.depth},void 0),0===a.size?void 0:Object(o.jsx)("div",Object(n.a)({style:{display:this.state.isCollapsed?"none":"block"}},{children:a.map((function(e){return Object(o.jsx)(t,{cell:r.parent.cells.get(e),depth:i},e)}))}),void 0)]},void 0)},t}(u.c),Bn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={isCurrent:t.props.cell.parent.current===t.ref,isCollapsed:!!t.props.cell.state.isCollapsed,action:void 0,currentAction:void 0},t.setCurrent=function(e){null==e||e.preventDefault(),null==e||e.currentTarget.blur(),d.a.State.SetCurrentObject(t.plugin,{state:t.props.cell.parent,ref:t.ref})},t.setCurrentRoot=function(e){null==e||e.preventDefault(),null==e||e.currentTarget.blur(),d.a.State.SetCurrentObject(t.plugin,{state:t.props.cell.parent,ref:A.f.RootRef})},t.remove=function(e){null==e||e.preventDefault(),d.a.State.RemoveObject(t.plugin,{state:t.props.cell.parent,ref:t.ref,removeParentGhosts:!0})},t.toggleVisible=function(e){e.preventDefault(),d.a.State.ToggleVisibility(t.plugin,{state:t.props.cell.parent,ref:t.ref}),e.currentTarget.blur()},t.toggleExpanded=function(e){e.preventDefault(),d.a.State.ToggleExpanded(t.plugin,{state:t.props.cell.parent,ref:t.ref}),e.currentTarget.blur()},t.highlight=function(e){e.preventDefault(),d.a.Interactivity.Object.Highlight(t.plugin,{state:t.props.cell.parent,ref:t.ref}),e.currentTarget.blur()},t.clearHighlight=function(e){e.preventDefault(),d.a.Interactivity.ClearHighlights(t.plugin),e.currentTarget.blur()},t.hideApply=function(){t.setCurrentRoot()},t.selectAction=function(e){e&&(null==e?void 0:e.value)()},t}return Object(n.c)(t,e),t.prototype.is=function(e){return e.ref===this.ref&&e.state===this.props.cell.parent},Object.defineProperty(t.prototype,"ref",{get:function(){return this.props.cell.transform.ref},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.state.events.cell.stateUpdated.pipe(Sn((function(t){return e.is(t)})),Pn(33)),(function(t){e.forceUpdate()})),this.subscribe(this.props.cell.parent.behaviors.currentObject,(function(t){e.is(t)?t.state.transforms.has(e.ref)&&e._setCurrent(e.props.cell.parent.current===e.ref,!!e.props.cell.state.isCollapsed):e.state.isCurrent&&t.state.transforms.has(e.ref)&&e._setCurrent(e.props.cell.parent.current===e.ref,e.state.isCollapsed)}))},t.prototype._setCurrent=function(e,t){e?this.setState({isCurrent:e,action:"options",currentAction:void 0,isCollapsed:t}):this.setState({isCurrent:e,action:void 0,currentAction:void 0,isCollapsed:t})},t.getDerivedStateFromProps=function(e,t){var r=e.cell.parent.current===e.cell.transform.ref,n=!!e.cell.state.isCollapsed;return t.isCollapsed===n&&t.isCurrent===r?null:{isCurrent:r,isCollapsed:n,action:void 0,currentAction:void 0}},Object.defineProperty(t.prototype,"actions",{get:function(){var e=this,t=this.props.cell,r=Object(n.e)([],t.parent.actions.fromCell(t,this.plugin));if(0!==r.length)return r.sort((function(e,t){return e.definition.display.name=0;i--){var s=r[i];a.push(Object(o.jsx)(Ae,{state:t.parent,transform:s.transform,noMargin:!0,wrapInExpander:!0,expanderHeaderLeftMargin:e},s.transform.transformer.id+"-"+i))}return Object(o.jsx)("div",Object(n.a)({className:"msp-tree-updates-wrapper"},{children:a}),void 0)},t.prototype.render=function(){var e=this.props.cell,t=e.transform;if(!e)return null;var r,a=this.is(e.parent.behaviors.currentObject.value),i="error"!==e.status&&"ok"!==e.status;if("error"!==e.status&&e.obj){var s=e.obj,u=s.label+" "+(s.description?s.description:"");r=Object(o.jsxs)(p.a,Object(n.a)({className:"msp-btn-tree-label msp-type-class-"+s.type.typeClass,noOverflow:!0,disabled:i,title:u,onClick:this.state.isCurrent?this.setCurrentRoot:this.setCurrent},{children:[Object(o.jsx)("span",{children:s.label},void 0)," ",s.description?Object(o.jsx)("small",{children:s.description},void 0):void 0]}),void 0)}else{var c="error"===e.status?e.errorText:t.transformer.definition.display.name;r=Object(o.jsxs)(p.a,Object(n.a)({className:"msp-btn-tree-label msp-no-hover-outline",noOverflow:!0,title:c,onClick:this.state.isCurrent?this.setCurrentRoot:this.setCurrent,disabled:i},{children:["error"===e.status&&Object(o.jsxs)("b",{children:["[",e.status,"]"]},void 0)," ",Object(o.jsx)("span",{children:c},void 0)]}),void 0)}var l=e.parent.tree.children.get(this.ref),d=e.state,h=Object(o.jsx)(p.f,{svg:d.isCollapsed?f.e:f.d,flex:"20px",disabled:i,onClick:this.toggleExpanded,transparent:!0,className:"msp-no-hover-outline",style:{visibility:l.size>0?"visible":"hidden"}},void 0),m=e.state.isLocked?void 0:Object(o.jsx)(p.f,{svg:f.B,onClick:this.remove,disabled:i,small:!0,toggleState:!1},void 0),g=Object(o.jsx)(p.f,{svg:d.isHidden?f.gb:f.hb,toggleState:!1,disabled:i,small:!0,onClick:this.toggleVisible},void 0),b={marginLeft:8*this.props.depth+"px"},v=Object(o.jsxs)("div",Object(n.a)({className:"msp-flex-row msp-tree-row"+(a?" msp-tree-row-current":""),onMouseEnter:this.highlight,onMouseLeave:this.clearHighlight,style:b},{children:[h,r,m,g]}),void 0);if(!a)return v;if("apply"===this.state.action&&this.state.currentAction)return Object(o.jsxs)("div",Object(n.a)({style:{marginBottom:"1px"}},{children:[v,Object(o.jsx)(p.b,Object(n.a)({header:"Apply "+this.state.currentAction.definition.display.name,initialExpanded:!0,hideExpander:!0,hideOffset:!1,onHeaderClick:this.hideApply,topRightIcon:f.t,headerLeftMargin:8*this.props.depth+21+"px"},{children:Object(o.jsx)(Gt,{onApply:this.hideApply,state:this.props.cell.parent,action:this.state.currentAction,nodeRef:this.props.cell.transform.ref,hideHeader:!0,noMargin:!0},void 0)}),void 0)]}),void 0);if("options"===this.state.action){var y=this.actions,x=this.updates(8*this.props.depth+21+"px");return Object(o.jsxs)("div",Object(n.a)({style:{marginBottom:"1px"}},{children:[v,x,y&&Object(o.jsx)("div",Object(n.a)({style:{marginLeft:8*this.props.depth+21+"px",marginTop:"-1px"}},{children:Object(o.jsx)(je.a,{items:y,onSelect:this.selectAction},void 0)}),void 0)]}),void 0)}return v},t}(u.c),Ln=function(e){function t(){var t,r=e.apply(this,arguments)||this;return r.state={tab:r.plugin.behaviors.layout.leftPanelTabName.value},r.set=function(e){if(r.state.tab===e)return r.setState({tab:"none"},(function(){return r.plugin.behaviors.layout.leftPanelTabName.next("none")})),void d.a.Layout.Update(r.plugin,{state:{regionState:Object(n.a)(Object(n.a)({},r.plugin.layout.state.regionState),{left:"collapsed"})}});r.setState({tab:e},(function(){return r.plugin.behaviors.layout.leftPanelTabName.next(e)})),"full"!==r.plugin.layout.state.regionState.left&&d.a.Layout.Update(r.plugin,{state:{regionState:Object(n.a)(Object(n.a)({},r.plugin.layout.state.regionState),{left:"full"})}})},r.tabs={none:Object(o.jsx)(o.Fragment,{},void 0),root:Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)(p.g,{icon:f.G,title:"Home"},void 0),Object(o.jsx)(Mr,{state:r.plugin.state.data,nodeRef:A.f.RootRef,hideHeader:!0,initiallyCollapsed:!0,alwaysExpandFirst:!0},void 0),"none"!==(null===(t=r.plugin.spec.components)||void 0===t?void 0:t.remoteState)&&Object(o.jsx)(On,{listOnly:!0},void 0)]},void 0),data:Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)(p.g,{icon:f.a,title:Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)(zn,{},void 0)," State Tree"]},void 0)},void 0),Object(o.jsx)(Dn,{state:r.plugin.state.data},void 0)]},void 0),states:Object(o.jsx)(gn,{},void 0),settings:Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)(p.g,{icon:f.eb,title:"Plugin Settings"},void 0),Object(o.jsx)(Fn,{},void 0)]},void 0),help:Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)(p.g,{icon:f.F,title:"Help"},void 0),Object(o.jsx)(it,{},void 0)]},void 0)},r}return Object(n.c)(t,e),t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.behaviors.layout.leftPanelTabName,(function(t){e.state.tab!==t&&e.setState({tab:t}),"none"===t&&"collapsed"!==e.plugin.layout.state.regionState.left&&d.a.Layout.Update(e.plugin,{state:{regionState:Object(n.a)(Object(n.a)({},e.plugin.layout.state.regionState),{left:"collapsed"})}})})),this.subscribe(this.plugin.state.data.events.changed,(function(t){var r=t.state;"data"===e.state.tab&&1===r.cells.size&&e.set("root")}))},t.prototype.render=function(){var e=this,t=this.state.tab;return Object(o.jsxs)("div",Object(n.a)({className:"msp-left-panel-controls"},{children:[Object(o.jsxs)("div",Object(n.a)({className:"msp-left-panel-controls-buttons"},{children:[Object(o.jsx)(p.f,{svg:f.G,toggleState:"root"===t,transparent:!0,onClick:function(){return e.set("root")},title:"Home"},void 0),Object(o.jsx)(Nn,{set:this.set},void 0),Object(o.jsx)(p.f,{svg:f.T,toggleState:"states"===t,transparent:!0,onClick:function(){return e.set("states")},title:"Plugin State"},void 0),Object(o.jsx)(p.f,{svg:f.F,toggleState:"help"===t,transparent:!0,onClick:function(){return e.set("help")},title:"Help"},void 0),Object(o.jsx)("div",Object(n.a)({className:"msp-left-panel-controls-buttons-bottom"},{children:Object(o.jsx)(p.f,{svg:f.eb,toggleState:"settings"===t,transparent:!0,onClick:function(){return e.set("settings")},title:"Settings"},void 0)}),void 0)]}),void 0),Object(o.jsx)("div",Object(n.a)({className:"msp-scrollable-container"},{children:this.tabs[t]}),void 0)]}),void 0)},t}(u.c),Nn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={changed:!1},t}return Object(n.c)(t,e),Object.defineProperty(t.prototype,"tab",{get:function(){return this.plugin.behaviors.layout.leftPanelTabName.value},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.behaviors.layout.leftPanelTabName,(function(t){"data"===e.tab?e.setState({changed:!1}):e.forceUpdate()})),this.subscribe(this.plugin.state.data.events.changed,(function(t){"data"!==e.tab&&e.setState({changed:!0})}))},t.prototype.render=function(){var e=this;return Object(o.jsx)(p.f,{svg:f.a,toggleState:"data"===this.tab,transparent:!0,onClick:function(){return e.props.set("data")},title:"State Tree",style:{position:"relative"},extraContent:this.state.changed?Object(o.jsx)("div",{className:"msp-left-panel-controls-button-data-dirty"},void 0):void 0},void 0)},t}(u.c),Fn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.setSettings=function(e){var r;d.a.Canvas3D.SetSettings(t.plugin,{settings:(r={},r[e.name]=e.value,r)})},t}return Object(n.c)(t,e),t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.events.canvas3d.settingsUpdated,(function(){return e.forceUpdate()})),this.subscribe(this.plugin.layout.events.updated,(function(){return e.forceUpdate()})),this.subscribe(this.plugin.canvas3d.camera.stateChanged,(function(t){void 0===t.radiusMax&&void 0===t.radius||e.forceUpdate()}))},t.prototype.render=function(){return Object(o.jsxs)(o.Fragment,{children:[this.plugin.canvas3d&&Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)(p.g,{title:"Viewport"},void 0),Object(o.jsx)(h.a,{params:kr.c,values:this.plugin.canvas3d.props,onChange:this.setSettings},void 0)]},void 0),Object(o.jsx)(p.g,{title:"Behavior"},void 0),Object(o.jsx)(Dn,{state:this.plugin.state.behaviors},void 0)]},void 0)},t}(u.c),zn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.remove=function(e){e.preventDefault(),d.a.State.RemoveObject(t.plugin,{state:t.plugin.state.data,ref:A.f.RootRef})},t}return Object(n.c)(t,e),t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.state.events.cell.created,(function(t){t.cell.transform.parent===A.f.RootRef&&e.forceUpdate()})),this.subscribe(this.plugin.state.events.cell.removed,(function(t){t.parent===A.f.RootRef&&e.forceUpdate()}))},t.prototype.render=function(){return 0===this.plugin.state.data.tree.children.get(A.f.RootRef).size?null:Object(o.jsx)(p.f,{svg:f.B,onClick:this.remove,title:"Remove All",style:{display:"inline-block"},small:!0,className:"msp-no-hover-outline",transparent:!0},void 0)},t}(u.c),Un=r(728),Vn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.parentDiv=a.createRef(),t.lastMouseOverSeqIdx=-1,t.highlightQueue=new _e.a,t.lociHighlightProvider=function(e,r){t.props.sequenceWrapper.markResidue(e.loci,r)&&t.updateMarker()},t.lociSelectionProvider=function(e,r){t.props.sequenceWrapper.markResidue(e.loci,r)&&t.updateMarker()},t.contextMenu=function(e){e.preventDefault()},t.mouseDownLoci=void 0,t.mouseDown=function(e){e.stopPropagation();var r=t.getSeqIdx(e),n=t.getLoci(r),a=Object(Un.e)(e.nativeEvent),i=Object(Un.d)(e.nativeEvent),o=Object(Un.f)(e.nativeEvent);t.click(n,a,i,o),t.mouseDownLoci=n},t.mouseUp=function(e){if(e.stopPropagation(),void 0!==t.mouseDownLoci){var r=t.getSeqIdx(e),n=t.getLoci(r);if(n&&!y.h.Loci.areEqual(t.mouseDownLoci,n)){var a=Object(Un.e)(e.nativeEvent),i=Object(Un.d)(e.nativeEvent),o=Object(Un.f)(e.nativeEvent),s=t.mouseDownLoci.elements[0],u=n.elements[0],c=Math.min(xt.d.min(s.indices),xt.d.min(u.indices)),l=Math.max(xt.d.max(s.indices),xt.d.max(u.indices)),d=y.h.Loci(n.structure,[{unit:s.unit,indices:xt.d.ofRange(c,l)}]);t.click(y.h.Loci.subtract(d,t.mouseDownLoci),a,i,o)}t.mouseDownLoci=void 0}},t.location=y.h.Location.create(void 0),t.mouseMove=function(e){e.stopPropagation();var r=Object(Un.e)(e.nativeEvent),a=Object(Un.d)(e.nativeEvent),i=Object(Un.f)(e.nativeEvent),o=e.target;if(!o||!o.getAttribute){if(-1===t.lastMouseOverSeqIdx)return;return t.lastMouseOverSeqIdx=-1,void t.highlightQueue.next({seqIdx:-1,buttons:r,button:a,modifiers:i})}var s=o.hasAttribute("data-seqid")?+o.getAttribute("data-seqid"):-1;if(t.lastMouseOverSeqIdx!==s)if(t.lastMouseOverSeqIdx=s,void 0!==t.mouseDownLoci){var u=t.getLoci(s);t.hover(u,0,0,Object(n.a)(Object(n.a)({},i),{shift:!0}))}else t.highlightQueue.next({seqIdx:s,buttons:r,button:a,modifiers:i})},t.mouseLeave=function(e){if(e.stopPropagation(),t.mouseDownLoci=void 0,-1!==t.lastMouseOverSeqIdx){t.lastMouseOverSeqIdx=-1;var r=Object(Un.e)(e.nativeEvent),n=Object(Un.d)(e.nativeEvent),a=Object(Un.f)(e.nativeEvent);t.highlightQueue.next({seqIdx:-1,buttons:r,button:n,modifiers:a})}},t}return Object(n.c)(t,e),Object.defineProperty(t.prototype,"sequenceNumberPeriod",{get:function(){return void 0!==this.props.sequenceNumberPeriod?this.props.sequenceNumberPeriod:this.props.sequenceWrapper.length>10?10:this.getSequenceNumber(this.props.sequenceWrapper.length-1).length>1?5:1},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){var e=this;this.plugin.managers.interactivity.lociHighlights.addProvider(this.lociHighlightProvider),this.plugin.managers.interactivity.lociSelects.addProvider(this.lociSelectionProvider),this.subscribe(Pn(15)(this.highlightQueue),(function(t){var r=e.getLoci(t.seqIdx<0?void 0:t.seqIdx);e.hover(r,t.buttons,t.button,t.modifiers)}))},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.plugin.managers.interactivity.lociHighlights.removeProvider(this.lociHighlightProvider),this.plugin.managers.interactivity.lociSelects.removeProvider(this.lociSelectionProvider)},t.prototype.getLoci=function(e){if(void 0!==e){var t=this.props.sequenceWrapper.getLoci(e);if(!y.h.Loci.isEmpty(t))return t}},t.prototype.getSeqIdx=function(e){var t=void 0,r=e.target;return r&&r.getAttribute&&(t=r.hasAttribute("data-seqid")?+r.getAttribute("data-seqid"):void 0),t},t.prototype.hover=function(e,t,r,n){var a={current:He.a.Loci.Empty,buttons:t,button:r,modifiers:n};void 0===e||y.h.Loci.isEmpty(e)||(a.current={loci:e}),this.plugin.behaviors.interaction.hover.next(a)},t.prototype.click=function(e,t,r,n){var a={current:He.a.Loci.Empty,buttons:t,button:r,modifiers:n};void 0===e||y.h.Loci.isEmpty(e)||(a.current={loci:e}),this.plugin.behaviors.interaction.click.next(a)},t.prototype.getBackgroundColor=function(e){return void 0===e&&console.error("unexpected marker value"),0===e?"":e%2==0?"rgb(51, 255, 25)":"rgb(255, 102, 153)"},t.prototype.getResidueClass=function(e,t){return t.length>1?this.props.sequenceWrapper.residueClass(e)+(0===e?" msp-sequence-residue-long-begin":" msp-sequence-residue-long"):this.props.sequenceWrapper.residueClass(e)},t.prototype.residue=function(e,t,r){return Object(o.jsx)("span",Object(n.a)({"data-seqid":e,style:{backgroundColor:this.getBackgroundColor(r)},className:this.getResidueClass(e,t)},{children:"​"+t+"​"}),e)},t.prototype.getSequenceNumberClass=function(e,t,r){var n=["msp-sequence-number"];return t.startsWith("-")?r.length>1&&e>0?n.push("msp-sequence-number-long-negative"):n.push("msp-sequence-number-negative"):r.length>1&&e>0&&n.push("msp-sequence-number-long"),n.join(" ")},t.prototype.getSequenceNumber=function(e){var t="",r=this.props.sequenceWrapper.getLoci(e),n=y.h.Loci.getFirstLocation(r,this.location);if(n)if(y.n.isAtomic(n.unit)){var a=y.i.residue.auth_seq_id(n),i=y.i.residue.pdbx_PDB_ins_code(n);t=""+a+(i||"")}else y.n.isCoarse(n.unit)&&(t=""+(e+1));return t},t.prototype.padSeqNum=function(e){return e.length<5?e+new Array(5-e.length+1).join(" "):e},t.prototype.getSequenceNumberSpan=function(e,t){var r=this.getSequenceNumber(e);return Object(o.jsx)("span",Object(n.a)({className:this.getSequenceNumberClass(e,r,t)},{children:this.padSeqNum(r)}),"marker-"+e)},t.prototype.updateMarker=function(){if(this.parentDiv.current)for(var e=this.parentDiv.current.children,t=this.props.sequenceWrapper.markerArray,r=!this.props.hideSequenceNumbers,n=this.sequenceNumberPeriod,a=0,i=0,o=t.length;i=n}}));return y.k.toLociWithSourceUnits(y.j.run(a,this.data.structure))},t}(Hn);function qn(e,t,r,n){var a=e.unit,i=a.model,o=a.elements,s=i.atomicHierarchy.residueAtomSegments.index,u=i.atomicHierarchy.residues.label_seq_id;return xt.d.forEachSegment(e.indices,(function(e){return s[o[e]]}),(function(e){var a=u.value(e);Object(Ge.d)(r,n(a),t)})),!0}function Wn(e,t,r,n){var a=e.unit,i=a.model,o=a.elements,s=y.n.isSpheres(e.unit)?i.coarseHierarchy.spheres.seq_id_begin:i.coarseHierarchy.gaussians.seq_id_begin,u=y.n.isSpheres(e.unit)?i.coarseHierarchy.spheres.seq_id_end:i.coarseHierarchy.gaussians.seq_id_end;return xt.d.forEach(e.indices,(function(e){for(var a=o[e],i=n(s.value(a)),c=n(u.value(a));i<=c;i++)Object(Ge.d)(r,i,t)})),!0}var Xn=function(e){function t(t){for(var r=this,n=[],a=new Map,i=new Map,o=new Map,s=0,u=t.units.length;s0&&i.push(n+" residues"),i.push(a+" elements");var h=new Uint8Array(1);return(r=e.call(this,t,h,1)||this).label="Whole Chain ("+i.join(", ")+")",r.unitIndices=s,r.loci=y.h.Loci(r.data.structure,u),r}return Object(n.c)(t,e),t.prototype.residueLabel=function(e){return this.label},t.prototype.residueColor=function(e){return S.a.black},t.prototype.residueClass=function(e){return"msp-sequence-present"},t.prototype.mark=function(e,t){var r=!1,n=this.data.structure;if(y.h.Loci.is(e)){if(!y.g.areRootsEquivalent(e.structure,n))return!1;for(var a=0,i=(e=y.h.Loci.remap(e,n)).elements;a0){var h={structure:r,units:l},m=void 0;if((f=l[0]).polymerElements.length){var g=y.h.Location.create(r,f,f.elements[0]),b=f.model.sequence.byEntityKey[y.i.entity.key(g)];if(b&&b.sequence.length<=5e3)m=new Gn(h);else{var v=l.reduce((function(e,t){return e+t.polymerElements.length}),0);m=y.n.isAtomic(f)||v>5e3?new Yn(h):new Kn(h)}}else if(y.n.isAtomic(f)){m=l.reduce((function(e,t){return e+t.residueCount}),0)>5e3?new Yn(h):new Xn(h)}else console.warn("should not happen, expecting coarse units to be polymeric"),m=new Yn(h);return m.markResidue(t.getLoci(r),Ge.a.Select),m}return"No sequence available"}function $n(e,t){void 0===t&&(t=!1);for(var r=[],n=y.h.Location.create(e),a=new Set,i=0,o=e.units;i0&&this.setState(this.getInitialState()),this.subscribe(this.plugin.state.events.object.updated,(function(t){var r=t.ref,n=t.obj;r===e.state.structureRef&&n&&n.type===X.a.Molecule.Structure.type&&n.data!==e.state.structure&&e.sync()})),this.subscribe(this.plugin.state.events.object.created,(function(t){var r=t.obj;r&&r.type===X.a.Molecule.Structure.type&&e.sync()})),this.subscribe(this.plugin.state.events.object.removed,(function(t){var r=t.obj;r&&r.type===X.a.Molecule.Structure.type&&r.data===e.state.structure&&e.sync()}))},t.prototype.sync=function(){var e=ra(this.plugin.state.data);Object(Le.a)(e.all,this.state.structureOptions.all)||this.setState(this.getInitialState())},t.prototype.getStructure=function(e){var t=this.plugin.state.data.select(e)[0];return e&&t&&t.obj?t.obj.data:y.g.Empty},t.prototype.getSequenceWrapper=function(e){return{wrapper:Jn(this.state,this.plugin.managers.structure.selection),label:w.a.optionLabel(e.chain,this.state.chainGroupId)+" | "+w.a.optionLabel(e.entity,this.state.modelEntityId)}},t.prototype.getSequenceWrappers=function(e){if("single"===this.state.mode)return[this.getSequenceWrapper(e)];for(var t=this.getStructure(this.state.structureRef),r=[],n=0,a=$n(t,"polymers"===this.state.mode);n1&&Object(o.jsx)(o.Fragment,{children:Object(o.jsx)(h.c,{title:"[Instance] "+w.a.optionLabel(e.operator,t.operator),param:e.operator,name:"operator",value:t.operator,onChange:this.setParamProps},void 0)},void 0)]}),void 0),Object(o.jsx)(ia,{children:r.map((function(e,r){var i="string"==typeof e.wrapper?Object(o.jsx)("div",Object(n.a)({className:"msp-sequence-wrapper"},{children:e.wrapper}),r):Object(o.jsx)(Vn,{sequenceWrapper:e.wrapper},r);return"single"===t.mode?i:Object(o.jsxs)(a.Fragment,{children:[Object(o.jsx)("div",Object(n.a)({className:"msp-sequence-chain-label"},{children:e.label}),void 0),i]},r)}))},void 0)]}),void 0)},t}(u.c);function ia(e){var t=e.children;return Object(o.jsx)("div",Object(n.a)({className:"msp-sequence-wrapper-non-empty"},{children:t}),void 0)}var oa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={tracked:Object(Dr.OrderedMap)()},t}return Object(n.c)(t,e),t.prototype.componentDidMount=function(){var e,t=this,r=!!(null===(e=this.plugin.spec.components)||void 0===e?void 0:e.hideTaskOverlay);this.subscribe(this.plugin.events.task.progress.pipe(Sn((function(e){return"background"===e.level&&(r||!e.useOverlay)}))),(function(e){t.setState({tracked:t.state.tracked.set(e.id,e)})})),this.subscribe(this.plugin.events.task.finished,(function(e){var r=e.id;t.setState({tracked:t.state.tracked.delete(r)})}))},t.prototype.render=function(){return Object(o.jsx)("div",Object(n.a)({className:"msp-background-tasks"},{children:this.state.tracked.valueSeq().map((function(e){return Object(o.jsx)(sa,{event:e},e.id)}))}),void 0)},t}(u.c),sa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.abort=function(){t.plugin.managers.task.requestAbort(t.props.event.progress.root.progress.taskId,"User Request")},t}return Object(n.c)(t,e),t.prototype.render=function(){var e=this.props.event.progress.root,t=function e(t){if(0===t.children.length)return 1;for(var r=0,n=0,a=t.children;n0?Object(o.jsxs)(o.Fragment,{children:["[",t," subtask(s)]"]},void 0):void 0;return Object(o.jsx)("div",Object(n.a)({className:"msp-task-state"},{children:Object(o.jsxs)("div",{children:[e.progress.canAbort&&Object(o.jsx)(p.f,{svg:f.p,onClick:this.abort,title:"Abort"},void 0),Object(o.jsxs)("div",{children:[e.progress.message," ",r," ",a]},void 0)]},void 0)}),void 0)},t}(u.c);var ua=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={tracked:Object(Dr.OrderedMap)()},t}return Object(n.c)(t,e),t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.events.task.progress.pipe(Sn((function(e){return!!e.useOverlay}))),(function(t){e.setState({tracked:e.state.tracked.set(t.id,t)})})),this.subscribe(this.plugin.events.task.finished,(function(t){var r=t.id;e.setState({tracked:e.state.tracked.delete(r)})}))},t.prototype.render=function(){return 0===this.state.tracked.size?null:Object(o.jsx)("div",Object(n.a)({className:"msp-overlay-tasks"},{children:this.state.tracked.valueSeq().map((function(e){return Object(o.jsx)(sa,{event:e},e.id)}))}),void 0)},t}(u.c),ca=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.hide=function(){(t.props.entry.hide||function(){}).call(null)},t}return Object(n.c)(t,e),t.prototype.render=function(){var e=this,t=this.props.entry,r="string"==typeof t.message?Object(o.jsx)("div",{dangerouslySetInnerHTML:{__html:t.message}},void 0):Object(o.jsx)("div",{children:Object(o.jsx)(t.message,{},void 0)},void 0);return Object(o.jsxs)("div",Object(n.a)({className:"msp-toast-entry"},{children:[Object(o.jsx)("div",Object(n.a)({className:"msp-toast-title",onClick:function(){return e.hide()}},{children:t.title}),void 0),Object(o.jsx)("div",Object(n.a)({className:"msp-toast-message"},{children:r}),void 0),Object(o.jsx)("div",{className:"msp-toast-clear"},void 0),Object(o.jsx)("div",Object(n.a)({className:"msp-toast-hide"},{children:Object(o.jsx)(p.f,{svg:f.p,onClick:this.hide,title:"Hide",className:"msp-no-hover-outline"},void 0)}),void 0)]}),void 0)},t}(u.c),la=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.c)(t,e),t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.managers.toast.events.changed,(function(){return e.forceUpdate()}))},t.prototype.render=function(){var e=this.plugin.managers.toast.state;if(!e.entries.count())return null;var t=[];return e.entries.forEach((function(e,r){return t.push(e)})),t.sort((function(e,t){return e.serialNumber-t.serialNumber})),Object(o.jsx)("div",Object(n.a)({className:"msp-toast-container"},{children:t.map((function(e){return Object(o.jsx)(ca,{entry:e},e.serialNumber)}))}),void 0)},t}(u.c),da=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.container=a.createRef(),t.canvas=a.createRef(),t.state={noWebGl:!1,showLogo:!0},t.handleLogo=function(){var e;t.setState({showLogo:!(null===(e=t.plugin.canvas3d)||void 0===e?void 0:e.reprCount.value)})},t}return Object(n.c)(t,e),t.prototype.componentDidMount=function(){this.canvas.current&&this.container.current&&this.plugin.initViewer(this.canvas.current,this.container.current)?(this.handleLogo(),this.subscribe(this.plugin.canvas3d.reprCount,this.handleLogo)):this.setState({noWebGl:!0})},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this)},t.prototype.renderMissing=function(){if(this.props.noWebGl){var e=this.props.noWebGl;return Object(o.jsx)(e,{},void 0)}return Object(o.jsx)("div",Object(n.a)({className:"msp-no-webgl"},{children:Object(o.jsxs)("div",{children:[Object(o.jsx)("p",{children:Object(o.jsx)("b",{children:"WebGL does not seem to be available."},void 0)},void 0),Object(o.jsx)("p",{children:"This can be caused by an outdated browser, graphics card driver issue, or bad weather. Sometimes, just restarting the browser helps."},void 0),Object(o.jsxs)("p",{children:["For a list of supported browsers, refer to ",Object(o.jsx)("a",Object(n.a)({href:"http://caniuse.com/#feat=webgl",target:"_blank"},{children:"http://caniuse.com/#feat=webgl"}),void 0),"."]},void 0)]},void 0)}),void 0)},t.prototype.render=function(){if(this.state.noWebGl)return this.renderMissing();var e=this.props.logo;return Object(o.jsxs)("div",Object(n.a)({className:this.props.parentClassName||"msp-viewport",style:this.props.parentStyle},{children:[Object(o.jsx)("div",Object(n.a)({className:this.props.hostClassName||"msp-viewport-host3d",style:this.props.hostStyle,ref:this.container},{children:Object(o.jsx)("canvas",{ref:this.canvas},void 0)}),void 0),this.state.showLogo&&e&&Object(o.jsx)(e,{},void 0)]}),void 0)},t}(u.c);function pa(e){var t=Object(a.useState)(null==e?void 0:e.value),r=t[0],n=t[1];return Object(a.useEffect)((function(){if(e){var t=!0,a=e.subscribe((function(e){t?(t=!1,e!==r&&n(e)):n(e)}));return function(){a.unsubscribe()}}void 0!==r&&n(void 0)}),[e]),r}var fa=function(e){var t=e.plugin,r=e.cropFrameColor,i=t.helpers.viewportScreenshot,s=Object(a.useState)(null),u=s[0],c=s[1],l=Object(a.useRef)(null),d=Object(a.useRef)(e);return Object(a.useEffect)((function(){d.current=e}),Object.values(e)),Object(a.useEffect)((function(){u!==l.current&&c(l.current)})),Object(a.useEffect)((function(){var e,r=!1,n=[];function a(e,t){e&&n.push(e.subscribe(t))}function o(){var e=d.current;!e.suspend&&l.current&&ma(i,l.current,e.customBackground,e.borderColor,e.borderWidth),l.current||(r=!0)}var s=setInterval((function(){r&&(r=!1,o())}),125);a(t.events.canvas3d.settingsUpdated,(function(){return r=!0})),a(null===(e=t.canvas3d)||void 0===e?void 0:e.didDraw,(function(){return r=!0})),a(t.state.data.behaviors.isUpdating,(function(e){e||(r=!0)})),a(i.behaviors.values,(function(){return r=!0})),a(i.behaviors.cropParams,(function(){return r=!0}));var u=void 0;"undefined"!=typeof ResizeObserver&&(u=new ResizeObserver((function(){return r=!0})));var c=l.current;return null==u||u.observe(c),o(),function(){clearInterval(s),n.forEach((function(e){return e.unsubscribe()})),null==u||u.unobserve(c)}}),[i]),Object(a.useLayoutEffect)((function(){l.current&&ma(i,l.current,e.customBackground,e.borderColor,e.borderWidth)}),Object(n.e)([],Object.values(e))),Object(o.jsx)(o.Fragment,{children:Object(o.jsxs)("div",Object(n.a)({style:{position:"relative",width:"100%",height:"100%"}},{children:[Object(o.jsx)("canvas",{ref:l,onContextMenu:function(e){e.preventDefault(),e.stopPropagation()},style:{display:"block",width:"100%",height:"100%"}},void 0),Object(o.jsx)(ga,{plugin:t,canvas:u,color:r},void 0)]}),void 0)},void 0)},ha=a.memo(fa,(function(e,t){return Object(_.d)(e,t)}));function ma(e,t,r,n,a){var i=e.getPreview(),o=i.canvas,s=i.width,u=i.height,c=t.getContext("2d");if(c){var l=t.clientWidth,d=t.clientHeight;t.width=l,t.height=d,c.clearRect(0,0,l,d);var p=va(s,u,l,d);if(r)c.fillStyle=r,c.fillRect(p.x,p.y,p.width,p.height);else if(e.values.transparent)for(var f=13,h=0;hp.width?p.width-h:f,y=m+f>p.height?p.height-m:f;c.fillRect(g,b,v,y)}if(c.drawImage(o,p.x,p.y,p.width,p.height),n&&a){var x=a;c.rect(p.x,p.y,p.width,p.height),c.rect(p.x+x,p.y+x,p.width-2*x,p.height-2*x),c.fillStyle=n,c.fill("evenodd")}}}function ga(e){var t,r=e.plugin,i=e.canvas,s=e.color,u=void 0===s?"rgba(255, 87, 45, 0.75)":s,c=r.helpers.viewportScreenshot,l=pa(null==c?void 0:c.behaviors.values),d=pa(null==c?void 0:c.behaviors.cropParams),p=pa(null==c?void 0:c.behaviors.relativeCrop),f=Object(a.useRef)({x:0,y:0,width:0,height:0});pa("viewport"===(null==l?void 0:l.resolution.name)?null===(t=r.canvas3d)||void 0===t?void 0:t.resized:void 0);var h=a.useState(""),m=h[0],g=h[1],b=Object(a.useState)([0,0]),v=b[0],y=b[1],x=Object(a.useState)([0,0]),O=x[0],j=x[1];if(!c||!i)return null;var S=c.getSizeAndViewport(),_=va(S.width,S.height,i.clientWidth,i.clientHeight),w={x:_.x+Math.floor(_.width*p.x),y:_.y+Math.floor(_.height*p.y),width:Math.ceil(_.width*p.width),height:Math.ceil(_.height*p.height)},C=ba(w),A=ba(_);if("move"===m?(C.l+=O[0]-v[0],C.r+=O[0]-v[0],C.t+=O[1]-v[1],C.b+=O[1]-v[1]):m&&(m.indexOf("left")>=0?C.l+=O[0]-v[0]:m.indexOf("right")>=0&&(C.r+=O[0]-v[0]),m.indexOf("top")>=0?C.t+=O[1]-v[1]:m.indexOf("bottom")>=0&&(C.b+=O[1]-v[1])),C.l>C.r){var E=C.l;C.l=C.r,C.r=E}if(C.t>C.b){E=C.t;C.t=C.b,C.b=E}C.l=Math.min(A.r-40,Math.max(A.l,C.l)),C.r=Math.max(A.l+40,Math.min(A.r,C.r)),C.t=Math.min(A.b-40,Math.max(A.t,C.t)),C.b=Math.max(A.t+40,Math.min(A.b,C.b)),w.x=C.l,w.y=C.t,w.width=C.r-C.l+1,w.height=C.b-C.t+1,f.current=w;var P=function(e){e.preventDefault(),j([e.pageX,e.pageY])},T=function(e){e.preventDefault();var t=e.touches[0];j([t.pageX,t.pageY])},I=function(e){e.preventDefault(),g(e.currentTarget.getAttribute("data-drag"));var t=e.touches[0],r=[t.pageX,t.pageY];y(r),j(r),window.addEventListener("touchend",D),window.addEventListener("touchmove",T)},k=function(e){e.preventDefault(),g(e.currentTarget.getAttribute("data-drag"));var t=[e.pageX,e.pageY];y(t),j(t),window.addEventListener("mouseup",M),window.addEventListener("mousemove",P)},M=function e(){window.removeEventListener("mouseup",e),window.removeEventListener("mousemove",P),R()},D=function e(){window.removeEventListener("touchend",e),window.removeEventListener("touchmove",T),R()};function R(){var e=f.current;d.auto&&(null==c||c.behaviors.cropParams.next(Object(n.a)(Object(n.a)({},d),{auto:!1}))),null==c||c.behaviors.relativeCrop.next({x:(e.x-_.x)/_.width,y:(e.y-_.y)/_.height,width:e.width/_.width,height:e.height/_.height}),g("");var t=[0,0];y(t),j(t)}var B=function(e){e.preventDefault(),e.stopPropagation()},L="3px solid "+u;return Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)("div",{"data-drag":"move",style:{position:"absolute",left:w.x,top:w.y,width:w.width,height:w.height,border:L,cursor:"move"},onMouseDown:k,onTouchStart:I,draggable:!1,onContextMenu:B},void 0),Object(o.jsx)("div",{"data-drag":"left",style:{position:"absolute",left:w.x-4,top:w.y+4,width:16,height:w.height-4,background:"transparent",cursor:"w-resize"},onMouseDown:k,onTouchStart:I,draggable:!1,onContextMenu:B},void 0),Object(o.jsx)("div",{"data-drag":"right",style:{position:"absolute",left:C.r-8,top:w.y,width:16,height:w.height-4,background:"transparent",cursor:"w-resize"},onMouseDown:k,onTouchStart:I,draggable:!1,onContextMenu:B},void 0),Object(o.jsx)("div",{"data-drag":"top",style:{position:"absolute",left:w.x-4,top:w.y-4,width:w.width+8,height:16,background:"transparent",cursor:"n-resize"},onMouseDown:k,onTouchStart:I,draggable:!1,onContextMenu:B},void 0),Object(o.jsx)("div",{"data-drag":"bottom",style:{position:"absolute",left:w.x-4,top:C.b-8,width:w.width+8,height:16,background:"transparent",cursor:"n-resize"},onMouseDown:k,onTouchStart:I,draggable:!1,onContextMenu:B},void 0),Object(o.jsx)("div",{"data-drag":"top, left",style:{position:"absolute",left:C.l-4,top:C.t-4,width:16,height:16,background:"transparent",cursor:"nw-resize"},onMouseDown:k,onTouchStart:I,draggable:!1,onContextMenu:B},void 0),Object(o.jsx)("div",{"data-drag":"bottom, right",style:{position:"absolute",left:C.r-8,top:C.b-8,width:16,height:16,background:"transparent",cursor:"nw-resize"},onMouseDown:k,onTouchStart:I,draggable:!1,onContextMenu:B},void 0),Object(o.jsx)("div",{"data-drag":"top, right",style:{position:"absolute",left:C.r-8,top:C.t-4,width:16,height:16,background:"transparent",cursor:"ne-resize"},onMouseDown:k,onTouchStart:I,draggable:!1,onContextMenu:B},void 0),Object(o.jsx)("div",{"data-drag":"bottom, left",style:{position:"absolute",left:C.l-4,top:C.b-8,width:16,height:16,background:"transparent",cursor:"ne-resize"},onMouseDown:k,onTouchStart:I,draggable:!1,onContextMenu:B},void 0)]},void 0)}function ba(e){return{l:e.x,t:e.y,r:e.x+e.width-1,b:e.y+e.height-1}}function va(e,t,r,n){var a=e/t;if(a<=r/n){var i=n*a;return{x:Math.round((r-i)/2),y:0,width:Math.round(i),height:n}}i=r/a;return{x:0,y:Math.round((n-i)/2),width:r,height:Math.round(i)}}var ya=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={showPreview:!0,isDisabled:!1},t.download=function(){var e;null===(e=t.plugin.helpers.viewportScreenshot)||void 0===e||e.download(),t.props.close()},t.copy=function(){return Object(n.b)(t,void 0,void 0,(function(){var e;return Object(n.d)(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,null===(e=this.plugin.helpers.viewportScreenshot)||void 0===e?void 0:e.copyToClipboard()];case 1:return t.sent(),d.a.Toast.Show(this.plugin,{message:"Copied to clipboard.",title:"Screenshot",timeoutMs:1500}),[3,3];case 2:return t.sent(),[2,this.copyImg()];case 3:return[2]}}))}))},t.copyImg=function(){return Object(n.b)(t,void 0,void 0,(function(){var e,t;return Object(n.d)(this,(function(r){switch(r.label){case 0:return[4,null===(t=this.plugin.helpers.viewportScreenshot)||void 0===t?void 0:t.getImageDataUri()];case 1:return e=r.sent(),this.setState({imageData:e}),[2]}}))}))},t.open=function(e){e.target.files&&e.target.files[0]&&d.a.State.Snapshots.OpenFile(t.plugin,{file:e.target.files[0]})},t}return Object(n.c)(t,e),t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.state.data.behaviors.isUpdating,(function(t){e.setState({isDisabled:t})}))},t.prototype.componentWillUnmount=function(){this.setState({imageData:void 0})},t.prototype.render=function(){var e,t=this,r=!!(null===(e=navigator.clipboard)||void 0===e?void 0:e.write);return Object(o.jsxs)("div",{children:[this.state.showPreview&&Object(o.jsxs)("div",Object(n.a)({className:"msp-image-preview"},{children:[Object(o.jsx)(ha,{plugin:this.plugin},void 0),Object(o.jsx)(Oa,{plugin:this.plugin},void 0)]}),void 0),Object(o.jsxs)("div",Object(n.a)({className:"msp-flex-row"},{children:[!this.state.imageData&&Object(o.jsx)(p.a,Object(n.a)({icon:f.w,onClick:r?this.copy:this.copyImg,disabled:this.state.isDisabled},{children:"Copy"}),void 0),this.state.imageData&&Object(o.jsx)(p.a,Object(n.a)({onClick:function(){return t.setState({imageData:void 0})},disabled:this.state.isDisabled},{children:"Clear"}),void 0),Object(o.jsx)(p.a,Object(n.a)({icon:f.E,onClick:this.download,disabled:this.state.isDisabled},{children:"Download"}),void 0)]}),void 0),this.state.imageData&&Object(o.jsxs)("div",Object(n.a)({className:"msp-row msp-copy-image-wrapper"},{children:[Object(o.jsx)("div",{children:"Right click below + Copy Image"},void 0),Object(o.jsx)("img",{src:this.state.imageData,style:{width:"100%",height:32,display:"block"}},void 0)]}),void 0),Object(o.jsx)(xa,{plugin:this.plugin,isDisabled:this.state.isDisabled},void 0),Object(o.jsxs)(p.d,Object(n.a)({header:"State"},{children:[Object(o.jsx)(bn,{onAction:this.props.close},void 0),Object(o.jsx)(p.d,Object(n.a)({header:"Save Options",initiallyExpanded:!1,noOffset:!0},{children:Object(o.jsx)(vn,{},void 0)}),void 0)]}),void 0)]},void 0)},t}(u.c);function xa(e){var t=e.plugin,r=e.isDisabled,n=t.helpers.viewportScreenshot,a=pa(n.behaviors.values);return Object(o.jsx)(h.a,{params:n.params,values:a,onChangeValues:function(e){return n.behaviors.values.next(e)},isDisabled:r},void 0)}function Oa(e){var t=e.plugin.helpers.viewportScreenshot,r=pa(null==t?void 0:t.behaviors.cropParams);return pa(null==t?void 0:t.behaviors.relativeCrop),t?Object(o.jsxs)("div",Object(n.a)({style:{width:"100%",height:"24px",marginTop:"8px"}},{children:[Object(o.jsx)(p.i,{icon:f.y,title:"Auto-crop",inline:!0,isSelected:r.auto,style:{background:"transparent",float:"left",width:"auto",height:"24px",lineHeight:"24px"},toggle:function(){return t.toggleAutocrop()},label:"Auto-crop "+(r.auto?"On":"Off")},void 0),!r.auto&&Object(o.jsx)(p.a,{icon:f.z,title:"Crop",style:{background:"transparent",float:"right",height:"24px",lineHeight:"24px",width:"24px",padding:"0"},onClick:function(){return t.autocrop()}},void 0),!r.auto&&!t.isFullFrame&&Object(o.jsx)(p.a,{icon:f.x,title:"Reset Crop",style:{background:"transparent",float:"right",height:"24px",lineHeight:"24px",width:"24px",padding:"0"},onClick:function(){return t.resetCrop()}},void 0)]}),void 0):null}var ja,Sa=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.c)(t,e),t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.events.canvas3d.settingsUpdated,(function(){return e.forceUpdate()})),this.subscribe(this.plugin.canvas3d.camera.stateChanged,(function(t){void 0===t.radiusMax&&void 0===t.radius||e.forceUpdate()}))},t.prototype.render=function(){return this.plugin.canvas3d?Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)(h.b,{mapping:Ca},void 0),Object(o.jsx)(at,{},void 0)]},void 0):null},t}(u.c),_a={sequence:"Sequence",log:"Log",left:"Left Panel"},wa={spin:w.a.Group({spin:kr.c.trackball.params.spin,speed:kr.c.trackball.params.spinSpeed},{pivot:"spin"}),camera:kr.c.camera,background:w.a.Group({color:w.a.Color(Object(P.a)(16579577),{label:"Background",description:"Custom background color"}),transparent:w.a.Boolean(!1)},{pivot:"color"}),lighting:w.a.Group({renderStyle:kr.c.renderer.params.style,occlusion:kr.c.postprocessing.params.occlusion,outline:kr.c.postprocessing.params.outline,fog:kr.c.cameraFog},{pivot:"renderStyle"}),clipping:w.a.Group(Object(n.a)(Object(n.a)({},kr.c.cameraClipping.params),kr.c.renderer.params.clip.params),{pivot:"radius"}),layout:w.a.MultiSelect([],w.a.objectToOptions(_a))},Ca=(ja={params:function(e){var t,r=w.a.clone(wa),n=null===(t=e.spec.components)||void 0===t?void 0:t.controls;if(n){var a=[];"none"!==n.top&&a.push(["sequence",_a.sequence]),"none"!==n.bottom&&a.push(["log",_a.log]),"none"!==n.left&&a.push(["left",_a.left]),r.layout.options=a}return r},target:function(e){var t,r,n=null===(t=e.spec.components)||void 0===t?void 0:t.controls,a=e.layout.state.regionState,i=[];return"hidden"===a.top||n&&"none"===n.top||i.push("sequence"),"hidden"===a.bottom||n&&"none"===n.bottom||i.push("log"),"hidden"===a.left||n&&"none"===n.left||i.push("left"),{canvas:null===(r=e.canvas3d)||void 0===r?void 0:r.props,layout:i}}},function(e){var t=e.values,r=e.update,n=e.apply;return{params:"function"==typeof ja.params?ja.params:function(e){return ja.params},getTarget:ja.target,getValues:t,update:function(e,t){var n=ja.target(t);return Object(Br.b)(n,(function(n){return r(e,n,t)}))},apply:n||function(){}}})({values:function(e,t){var r=e.canvas,a=r.renderer;return{layout:e.layout,spin:{spin:!!r.trackball.spin,speed:r.trackball.spinSpeed},camera:r.camera,background:{color:a.backgroundColor,transparent:r.transparentBackground},lighting:{renderStyle:a.style,occlusion:r.postprocessing.occlusion,outline:r.postprocessing.outline,fog:r.cameraFog},clipping:Object(n.a)(Object(n.a)({},r.cameraClipping),r.renderer.clip)}},update:function(e,t){var r=t.canvas;r.trackball.spin=e.spin.spin,r.trackball.spinSpeed=e.spin.speed,r.camera=e.camera,r.transparentBackground=e.background.transparent,r.renderer.backgroundColor=e.background.color,r.renderer.style=e.lighting.renderStyle,r.postprocessing.occlusion=e.lighting.occlusion,r.postprocessing.outline=e.lighting.outline,r.cameraFog=e.lighting.fog,r.cameraClipping={radius:e.clipping.radius,far:e.clipping.far},r.renderer.clip={variant:e.clipping.variant,objects:e.clipping.objects},t.layout=e.layout},apply:function(e,t){return Object(n.b)(this,void 0,void 0,(function(){var r,a;return Object(n.d)(this,(function(n){switch(n.label){case 0:return[4,d.a.Canvas3D.SetSettings(t,{settings:e.canvas})];case 1:return n.sent(),r=e.layout.indexOf("left")<0,a=Object(Br.b)(t.layout.state,(function(n){n.regionState.top=e.layout.indexOf("sequence")>=0?"full":"hidden",n.regionState.bottom=e.layout.indexOf("log")>=0?"full":"hidden",n.regionState.left=r?"hidden":"none"===t.behaviors.layout.leftPanelTabName.value?"collapsed":"full"})),[4,d.a.Layout.Update(t,{state:a})];case 2:return n.sent(),r&&d.a.State.SetCurrentObject(t,{state:t.state.data,ref:A.f.RootRef}),[2]}}))}))}}),Aa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.allCollapsedState={isSettingsExpanded:!1,isScreenshotExpanded:!1},t.state=Object(n.a)({},t.allCollapsedState),t.resetCamera=function(){d.a.Camera.Reset(t.plugin,{})},t.toggleSettingsExpanded=t.toggle("isSettingsExpanded"),t.toggleScreenshotExpanded=t.toggle("isScreenshotExpanded"),t.toggleControls=function(){d.a.Layout.Update(t.plugin,{state:{showControls:!t.plugin.layout.state.showControls}})},t.toggleExpanded=function(){d.a.Layout.Update(t.plugin,{state:{isExpanded:!t.plugin.layout.state.isExpanded}})},t.setSettings=function(e){var r;d.a.Canvas3D.SetSettings(t.plugin,{settings:(r={},r[e.name]=e.value,r)})},t.setLayout=function(e){var r;d.a.Layout.Update(t.plugin,{state:(r={},r[e.name]=e.value,r)})},t.screenshot=function(){var e;null===(e=t.plugin.helpers.viewportScreenshot)||void 0===e||e.download()},t.onMouseMove=function(e){0===e.buttons&&e.stopPropagation()},t}return Object(n.c)(t,e),t.prototype.toggle=function(e){var t=this;return function(r){var a;t.setState(Object(n.a)(Object(n.a)({},t.allCollapsedState),((a={})[e]=!t.state[e],a))),null==r||r.currentTarget.blur()}},t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.events.canvas3d.settingsUpdated,(function(){return e.forceUpdate()})),this.subscribe(this.plugin.layout.events.updated,(function(){return e.forceUpdate()}))},t.prototype.icon=function(e,t,r,n){return void 0===n&&(n=!0),Object(o.jsx)(p.f,{svg:e,toggleState:n,onClick:t,title:r,style:{background:"transparent"}},void 0)},t.prototype.render=function(){return Object(o.jsxs)("div",Object(n.a)({className:"msp-viewport-controls",onMouseMove:this.onMouseMove},{children:[Object(o.jsxs)("div",Object(n.a)({className:"msp-viewport-controls-buttons"},{children:[Object(o.jsxs)("div",{children:[Object(o.jsx)("div",{className:"msp-semi-transparent-background"},void 0),this.icon(f.g,this.resetCamera,"Reset Camera")]},void 0),Object(o.jsxs)("div",{children:[Object(o.jsx)("div",{className:"msp-semi-transparent-background"},void 0),this.icon(f.m,this.toggleScreenshotExpanded,"Screenshot / State Snapshot",this.state.isScreenshotExpanded)]},void 0),Object(o.jsxs)("div",{children:[Object(o.jsx)("div",{className:"msp-semi-transparent-background"},void 0),this.plugin.config.get(Yt.a.Viewport.ShowControls)&&this.icon(f.k,this.toggleControls,"Toggle Controls Panel",this.plugin.layout.state.showControls),this.plugin.config.get(Yt.a.Viewport.ShowExpand)&&this.icon(f.D,this.toggleExpanded,"Toggle Expanded Viewport",this.plugin.layout.state.isExpanded),this.plugin.config.get(Yt.a.Viewport.ShowSettings)&&this.icon(f.eb,this.toggleSettingsExpanded,"Settings / Controls Info",this.state.isSettingsExpanded)]},void 0),this.plugin.config.get(Yt.a.Viewport.ShowSelectionMode)&&Object(o.jsxs)("div",{children:[Object(o.jsx)("div",{className:"msp-semi-transparent-background"},void 0),Object(o.jsx)(ot,{},void 0)]},void 0)]}),void 0),this.state.isScreenshotExpanded&&Object(o.jsx)("div",Object(n.a)({className:"msp-viewport-controls-panel"},{children:Object(o.jsx)(p.b,Object(n.a)({header:"Screenshot / State",title:"Click to close.",initialExpanded:!0,hideExpander:!0,hideOffset:!0,onHeaderClick:this.toggleScreenshotExpanded,topRightIcon:f.t,noTopMargin:!0,childrenClassName:"msp-viewport-controls-panel-controls"},{children:Object(o.jsx)(ya,{close:this.toggleScreenshotExpanded},void 0)}),void 0)}),void 0),this.state.isSettingsExpanded&&Object(o.jsx)("div",Object(n.a)({className:"msp-viewport-controls-panel"},{children:Object(o.jsx)(p.b,Object(n.a)({header:"Settings / Controls Info",title:"Click to close.",initialExpanded:!0,hideExpander:!0,hideOffset:!0,onHeaderClick:this.toggleSettingsExpanded,topRightIcon:f.t,noTopMargin:!0,childrenClassName:"msp-viewport-controls-panel-controls"},{children:Object(o.jsx)(Sa,{},void 0)}),void 0)}),void 0)]}),void 0)},t}(u.c),Ea=function(){return Object(o.jsx)("a",{className:"msp-logo",href:"https://molstar.org",target:"_blank"},void 0)},Pa=function(){return Object(o.jsx)(da,{logo:Ea},void 0)},Ta=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.c)(t,e),t.prototype.region=function(e,t){return Object(o.jsx)("div",Object(n.a)({className:"msp-layout-region msp-layout-"+e},{children:Object(o.jsx)("div",Object(n.a)({className:"msp-layout-static"},{children:t}),void 0)}),void 0)},t.prototype.render=function(){return Object(o.jsx)(u.b.Provider,Object(n.a)({value:this.props.plugin},{children:Object(o.jsx)(Ia,{},void 0)}),void 0)},t}(a.Component),Ia=(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Object(n.c)(t,e),t.prototype.render=function(){return Object(o.jsx)(u.b.Provider,Object(n.a)({value:this.props.plugin},{children:Object(o.jsx)("div",Object(n.a)({className:"msp-plugin"},{children:this.props.children}),void 0)}),void 0)}}(a.Component),function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onDrop=function(e){var r;if(e.preventDefault(),e.dataTransfer.items){for(var n=0;n>2,s=new Uint8Array(i),u=new Uint32Array(s.buffer,0,o),c=0,l=0;l1},params:function(e,t){return Object(n.a)({useDefaultIfSingleModel:w.a.Optional(w.a.Boolean(!1)),representationPresetParams:w.a.Optional(w.a.Group(Za.b.CommonParams))},ii(e,t))},apply:function(e,t,r){var a,i;return Object(n.b)(this,void 0,void 0,(function(){var o,s,u,c,l,d,p,f,h,m;return Object(n.d)(this,(function(n){switch(n.label){case 0:if(!(o=null===(i=null===(a=A.d.resolveAndCheck(r.state.data,e))||void 0===a?void 0:a.obj)||void 0===i?void 0:i.data))return[2,{}];if(1===o.frameCount&&t.useDefaultIfSingleModel)return[2,oi.apply(e,t,r)];s=r.builders.structure,u=[],c=[],l=0,n.label=1;case 1:return l0&&(o=r[0].data&&Si(r[0].data)||Lt.b.IsoValue.relative(1.5),i[0]=a.to(r[0]).apply(l.a.Representation.VolumeRepresentation3D,R.VolumeRepresentation3DHelpers.getDefaultParamsStatic(e,"isosurface",{isoValue:o,alpha:1},"uniform",{value:S.a.teal})).selector),r.length>1&&(s=R.VolumeRepresentation3DHelpers.getDefaultParamsStatic(e,"isosurface",{isoValue:Lt.b.IsoValue.relative(3),alpha:.3},"uniform",{value:S.a.green}),u=R.VolumeRepresentation3DHelpers.getDefaultParamsStatic(e,"isosurface",{isoValue:Lt.b.IsoValue.relative(-3),alpha:.3},"uniform",{value:S.a.red}),i[i.length]=a.to(r[1]).apply(l.a.Representation.VolumeRepresentation3D,s).selector,i[i.length]=a.to(r[1]).apply(l.a.Representation.VolumeRepresentation3D,u).selector),[4,a.commit()];case 1:return n.sent(),[2,i]}}))}))}})]],Pi=[["ply",Object(yi.a)({label:"PLY",description:"PLY",category:"Shape",stringExtensions:["ply"],parse:function(e,t){return Object(n.b)(void 0,void 0,void 0,(function(){var r,a;return Object(n.d)(this,(function(n){switch(n.label){case 0:return r=e.state.data.build().to(t).apply(l.a.Data.ParsePly,{},{state:{isGhost:!0}}),a=r.apply(l.a.Model.ShapeFromPly),[4,r.commit()];case 1:return n.sent(),[2,{format:r.selector,shape:a.selector}]}}))}))},visuals:function(e,t){return e.state.data.build().to(t.shape).apply(l.a.Representation.ShapeRepresentation3D).commit()}})]],Ti=[["psf",Object(yi.a)({label:"PSF",description:"PSF",category:"Structure",stringExtensions:["psf"],parse:function(e,t){return Object(n.b)(void 0,void 0,void 0,(function(){var r,a;return Object(n.d)(this,(function(n){switch(n.label){case 0:return r=e.state.data.build().to(t).apply(l.a.Data.ParsePsf,{},{state:{isGhost:!0}}),a=r.apply(l.a.Model.TopologyFromPsf),[4,r.commit()];case 1:return n.sent(),[2,{format:r.selector,topology:a.selector}]}}))}))}})],["dcd",Object(yi.a)({label:"DCD",description:"DCD",category:"Structure",binaryExtensions:["dcd"],parse:function(e,t){return e.state.data.build().to(t).apply(l.a.Model.CoordinatesFromDcd).commit()}})],["xtc",Object(yi.a)({label:"XTC",description:"XTC",category:"Structure",binaryExtensions:["xtc"],parse:function(e,t){return e.state.data.build().to(t).apply(l.a.Model.CoordinatesFromXtc).commit()}})]],Ii=function(){function e(){this._list=[],this._map=new Map,this._extensions=void 0,this._binaryExtensions=void 0,this._options=void 0;for(var e=0,t=Ei;e=0||a.stringExtensions&&a.stringExtensions.indexOf(e.ext)>=0)&&(i=!0),i&&(!a.isApplicable||a.isApplicable(e,t.data)))return a}},e.prototype.get=function(e){if(this._map.has(e))return this._map.get(e);throw new Error("unknown data format name '"+e+"'")},Object.defineProperty(e.prototype,"list",{get:function(){return this._list},enumerable:!1,configurable:!0}),e}(),ki=function(e){function t(t){var r=e.call(this,{params:{current:""},animationState:"stopped"})||this;return r.context=t,r.map=new Map,r._animations=[],r.currentTime=0,r._params=void 0,r.events={updated:r.ev(),applied:r.ev()},r.isStopped=!0,r.isApplying=!1,r}return Object(n.c)(t,e),Object.defineProperty(t.prototype,"isEmpty",{get:function(){return 0===this._animations.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"current",{get:function(){return this._current},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"animations",{get:function(){return this._animations},enumerable:!1,configurable:!0}),t.prototype.triggerUpdate=function(){this.events.updated.next()},t.prototype.triggerApply=function(){this.events.applied.next()},t.prototype.getParams=function(){return this._params||(this._params={current:w.a.Select(this._animations[0]&&this._animations[0].name,this._animations.map((function(e){return[e.name,e.display.name]})),{label:"Animation"})}),this._params},t.prototype.updateParams=function(e){if(!this.isEmpty){this.updateState({params:Object(n.a)(Object(n.a)({},this.state.params),e)});var t=this.map.get(this.state.params.current),r=t.params(this.context);this._current={anim:t,params:r,paramValues:w.a.getDefaultValues(r),state:{},startedTime:-1,lastTime:0},this.triggerUpdate()}},t.prototype.updateCurrentParams=function(e){this.isEmpty||(this._current.paramValues=Object(n.a)(Object(n.a)({},this._current.paramValues),e),this.triggerUpdate())},t.prototype.register=function(e){this.map.has(e.name)?this.context.log.error("Animation '"+e.name+"' is already registered."):(this._params=void 0,this.map.set(e.name,e),this._animations.push(e),1===this._animations.length?this.updateParams({current:e.name}):this.triggerUpdate())},t.prototype.play=function(e,t){return Object(n.b)(this,void 0,void 0,(function(){return Object(n.d)(this,(function(r){switch(r.label){case 0:return[4,this.stop()];case 1:return r.sent(),this.map.has(e.name)||this.register(e),this.updateParams({current:e.name}),this.updateCurrentParams(t),[4,this.start()];case 2:return r.sent(),[2]}}))}))},t.prototype.tick=function(e,t){return Object(n.b)(this,void 0,void 0,(function(){return Object(n.d)(this,(function(r){switch(r.label){case 0:return this.currentTime=e,this.isStopped?[2]:t?[4,this.applyFrame()]:[3,2];case 1:return r.sent(),[3,3];case 2:this.applyAsync(),r.label=3;case 3:return[2]}}))}))},t.prototype.start=function(){return Object(n.b)(this,void 0,void 0,(function(){var e,t,r;return Object(n.d)(this,(function(n){switch(n.label){case 0:return this.updateState({animationState:"playing"}),this.context.behaviors.state.isAnimating.value||this.context.behaviors.state.isAnimating.next(!0),this.triggerUpdate(),e=this._current.anim,t=this._current.anim.initialState(this._current.paramValues,this.context),e.setup?[4,e.setup(this._current.paramValues,t,this.context)]:[3,2];case 1:(r=n.sent())&&(t=r),n.label=2;case 2:return this._current.lastTime=0,this._current.startedTime=-1,this._current.state=t,this.isStopped=!1,[2]}}))}))},t.prototype.stop=function(){return Object(n.b)(this,void 0,void 0,(function(){var e;return Object(n.d)(this,(function(t){switch(t.label){case 0:return this.isStopped=!0,"stopped"===this.state.animationState?[3,3]:(e=this._current.anim).teardown?[4,e.teardown(this._current.paramValues,this._current.state,this.context)]:[3,2];case 1:t.sent(),t.label=2;case 2:this.updateState({animationState:"stopped"}),this.triggerUpdate(),t.label=3;case 3:return this.context.behaviors.state.isAnimating.value&&this.context.behaviors.state.isAnimating.next(!1),[2]}}))}))},Object.defineProperty(t.prototype,"isAnimating",{get:function(){return"playing"===this.state.animationState},enumerable:!1,configurable:!0}),t.prototype.applyAsync=function(){return Object(n.b)(this,void 0,void 0,(function(){return Object(n.d)(this,(function(e){switch(e.label){case 0:if(this.isApplying)return[2];this.isApplying=!0,e.label=1;case 1:return e.trys.push([1,,3,4]),[4,this.applyFrame()];case 2:return e.sent(),[3,4];case 3:return this.isApplying=!1,[7];case 4:return[2]}}))}))},t.prototype.applyFrame=function(){return Object(n.b)(this,void 0,void 0,(function(){var e,t;return Object(n.d)(this,(function(r){switch(r.label){case 0:return e=this.currentTime,this._current.startedTime<0&&(this._current.startedTime=e),[4,this._current.anim.apply(this._current.state,{lastApplied:this._current.lastTime,current:e-this._current.startedTime},{params:this._current.paramValues,plugin:this.context})];case 1:return"finished"===(t=r.sent()).kind?this.stop():"next"===t.kind&&(this._current.state=t.state,this._current.lastTime=e-this._current.startedTime),this.triggerApply(),[2]}}))}))},t.prototype.getSnapshot=function(){return this.current?{state:this.state,current:{paramValues:this._current.paramValues,state:this._current.anim.stateSerialization?this._current.anim.stateSerialization.toJSON(this._current.state):this._current.state}}:{state:this.state}},t.prototype.setSnapshot=function(e){this.isEmpty||(this.updateState({animationState:e.state.animationState}),this.updateParams(e.state.params),e.current&&(this.current.paramValues=e.current.paramValues,this.current.state=this._current.anim.stateSerialization?this._current.anim.stateSerialization.fromJSON(e.current.state):e.current.state,this.triggerUpdate(),"playing"===this.state.animationState&&this.resume()))},t.prototype.resume=function(){return Object(n.b)(this,void 0,void 0,(function(){var e;return Object(n.d)(this,(function(t){switch(t.label){case 0:return this._current.lastTime=0,this._current.startedTime=-1,e=this._current.anim,this.context.behaviors.state.isAnimating.value||this.context.behaviors.state.isAnimating.next(!0),e.setup?[4,e.setup(this._current.paramValues,this._current.state,this.context)]:[3,2];case 1:t.sent(),t.label=2;case 2:return this.isStopped=!1,[2]}}))}))},t}(C.b),Mi=r(686),Di={minRadius:5,extraRadius:4,durationMs:250},Ri=function(){function e(e){this.plugin=e,this.boundaryHelper=new Mi.a("98")}return e.prototype.transformedLoci=function(e){var t,r;if(y.h.Loci.is(e)){var n=null===(r=null===(t=this.plugin.helpers.substructureParent.get(e.structure))||void 0===t?void 0:t.obj)||void 0===r?void 0:r.data;n&&(e=y.h.Loci.remap(e,n))}return e},e.prototype.focusRenderObjects=function(e,t){if(e){for(var r=[],n=0,a=e;n1){for(var n=[],a=0,i=e;a1&&t[0]!==t[1]?r:t[0];e.labels.push(1===n?a:a+" || × "+n+"")})),this.isDirty=!1}return this.labels},e}(),Li=r(970),Ni=function(e){function t(t){var r=e.call(this,{history:[]})||this;r.plugin=t,r.events={historyUpdated:r.ev()},r.behaviors={current:r.ev.behavior(void 0)},t.state.data.events.object.removed.subscribe((function(e){var t,n,a=e.obj;if(X.a.Molecule.Structure.is(a)){(null===(n=r.current)||void 0===n?void 0:n.loci.structure)===a.data&&r.clear();for(var i=[],o=0,s=r.history;oa.radius||p>d.viewport.height/d.zoom)&&r.plugin.managers.camera.focusSphere(a,{durationMs:0})}}})),r}return Object(n.c)(t,e),Object.defineProperty(t.prototype,"current",{get:function(){return this.state.current},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"history",{get:function(){return this.state.history},enumerable:!1,configurable:!0}),t.prototype.tryAddHistory=function(e){if(!y.h.Loci.isEmpty(e.loci)){for(var t=0,r=void 0,n=0,a=this.state.history;n8&&this.state.history.pop(),this.events.historyUpdated.next()}},t.prototype.set=function(e){this.tryAddHistory(e),this.state.current&&y.h.Loci.areEqual(this.state.current.loci,e.loci)||(this.state.current=e,this.behaviors.current.next(e))},t.prototype.setFromLoci=function(e){var t=T.d.normalize(e);y.h.Loci.is(t)&&!y.h.Loci.isEmpty(t)?this.set({loci:t,label:Object(Ve.f)(t,{reverse:!0,hidePrefix:!0,htmlStyling:!1})}):this.clear()},t.prototype.addFromLoci=function(e){var t=this.state.current&&y.h.Loci.is(e)&&e.structure===this.state.current.loci.structure?y.h.Loci.union(e,this.state.current.loci):e;this.setFromLoci(t)},t.prototype.clear=function(){this.state.current&&(this.state.current=void 0,this.behaviors.current.next(void 0))},t.prototype.getSnapshot=function(){if(!this.current)return{};var e=this.plugin.helpers.substructureParent.get(this.current.loci.structure),t=null==e?void 0:e.transform.ref;return t?{current:{label:this.current.label,ref:t,bundle:y.h.Bundle.fromLoci(this.current.loci),category:this.current.category}}:{}},t.prototype.setSnapshot=function(e){var t,r;if(e.current){var n=e.current,a=n.label,i=n.ref,o=n.bundle,s=n.category,u=null===(r=null===(t=this.plugin.state.data.select(A.e.Generators.byRef(i))[0])||void 0===t?void 0:t.obj)||void 0===r?void 0:r.data;if(u){var c=y.h.Bundle.toLoci(o,u);this.set({label:a,loci:c,category:s})}}else this.clear()},t}(C.b),Fi=r(808),zi=new Mi.a("98"),Ui=function(e){function t(t){var r=e.call(this,{entries:new Map,additionsHistory:[],stats:{structureCount:0,elementCount:0,label:"Nothing Selected"}})||this;return r.plugin=t,r.events={changed:r.ev(),additionsHistoryUpdated:r.ev(),loci:{add:r.ev(),remove:r.ev(),clear:r.ev()}},t.helpers.substructureParent.events.removed.subscribe((function(e){return r.onRemove(e.ref,e.obj)})),t.helpers.substructureParent.events.updated.subscribe((function(e){return r.onUpdate(e.ref,e.oldObj,e.obj)})),r}return Object(n.c)(t,e),Object.defineProperty(t.prototype,"entries",{get:function(){return this.state.entries},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"additionsHistory",{get:function(){return this.state.additionsHistory},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"stats",{get:function(){return this.state.stats||(this.state.stats=this.calcStats()),this.state.stats},enumerable:!1,configurable:!0}),t.prototype.getEntry=function(e){var t=this.plugin.helpers.substructureParent.get(e,!0);if(t){var r=t.transform.ref;if(!this.entries.has(r)){var n=new Vi(y.h.Loci(e,[]));return this.entries.set(r,n),n}return this.entries.get(r)}},t.prototype.calcStats=function(){var e=0,t=0,r=y.h.Stats.create();this.entries.forEach((function(n){var a=n.selection.elements;if(a.length){e+=1;for(var i=0,o=a.length;i24&&this.additionsHistory.pop(),this.events.additionsHistoryUpdated.next()}},t.prototype.clearHistory=function(){0!==this.state.additionsHistory.length&&(this.state.additionsHistory=[],this.events.additionsHistoryUpdated.next())},t.prototype.clearHistoryForStructure=function(e){for(var t=[],r=0,n=this.state.additionsHistory;ra&&(n=(t=[a,n])[0],a=t[1]),d[n+1]-d[n]==1&&(n=(r=[a,n])[0],a=r[1]);for(var o=A.get(n),s=0,l=d[n],p=d[n+1];ls&&(s=m,O(i[f],v))}}return s>0?v:null},position:function(e,t,n){if(O(i[u[n]],e),O(i[c[n]],t),g){var a=function(e){return j.element=i[u[e]],r.size.size(j)*h}(n),o=function(e){return j.element=i[c[e]],r.size.size(j)*h}(n),s=Math.min(a,o)*m,l=Math.sqrt(Math.max(0,a*a-s*s))-.05,d=Math.sqrt(Math.max(0,o*o-s*s))-.05;if(l<=.01&&d<=.01)return;qa.g.normalize(x,qa.g.sub(x,t,e)),qa.g.scaleAndAdd(e,e,x,l),qa.g.scaleAndAdd(t,t,x,-d)}},style:function(e){var t=p[e],r=f[e];if(ho(r,2)||ho(r,4))return 1;if(3===t)return 3;if(b){var n=u[e],a=c[e],i=E.get(n),o=E.get(a),s=i&&o?Object(Le.b)(i,o):0;if(s||ho(r,16))return 2===s?6:5}return 2===t?2:0},radius:function(e){return function(e){return S.aIndex=u[e],S.bIndex=c[e],r.size.size(S)*h}(e)*m},ignore:io(t,e,n),stub:a}}function go(e,t,r,n,a,i){if(!y.n.isAtomic(t))return fo.a.createEmpty(i);if(!t.bonds.edgeCount)return fo.a.createEmpty(i);var o=r.child,s=null==o?void 0:o.unitMap.get(t.id);if(o&&!s)return fo.a.createEmpty(i);var u=mo(t,r,n,a),c=Object(Ki.c)(e,u,a,i),l=ei.g.expand(Object(ei.g)(),(null!=s?s:t).boundary.sphere,1*a.sizeFactor);return c.setBoundingSphere(l),c}function bo(e,t,r,n,a,i){if(!y.n.isAtomic(t))return Yi.a.createEmpty(i);if(!t.bonds.edgeCount)return Yi.a.createEmpty(i);var o=r.child,s=null==o?void 0:o.unitMap.get(t.id);if(o&&!s)return Yi.a.createEmpty(i);var u=mo(t,r,n,a),c=Object(Ki.d)(e,u,a,i),l=ei.g.expand(Object(ei.g)(),(null!=s?s:t).boundary.sphere,1*a.sizeFactor);return c.setBoundingSphere(l),c}var vo=Object(n.a)(Object(n.a)(Object(n.a)(Object(n.a)({},Qi.g),Qi.a),ro),{sizeFactor:w.a.Numeric(.3,{min:0,max:10,step:.01}),sizeAspectRatio:w.a.Numeric(2/3,{min:0,max:3,step:.01}),tryUseImpostor:w.a.Boolean(!0),includeParent:w.a.Boolean(!1)});function yo(e,t,r,n){return r.tryUseImpostor&&n&&n.extensions.fragDepth?function(e){return Object(Qi.b)({defaultProps:w.a.getDefaultValues(vo),createGeometry:go,createLocationIterator:Hi.fromGroup,getLoci:so,eachLocation:uo,setUpdateState:function(e,t,r,n,a,i,o){e.createGeometry=t.sizeAspectRatio!==r.sizeAspectRatio||t.linkScale!==r.linkScale||t.linkSpacing!==r.linkSpacing||t.ignoreHydrogens!==r.ignoreHydrogens||t.linkCap!==r.linkCap||t.dashCount!==r.dashCount||t.dashScale!==r.dashScale||t.dashCap!==r.dashCap||t.stubCap!==r.stubCap||!Object(s.f)(t.includeTypes,r.includeTypes)||!Object(s.f)(t.excludeTypes,r.excludeTypes)||t.adjustCylinderLength!==r.adjustCylinderLength||t.aromaticBonds!==r.aromaticBonds;var u=i.group.units[0],c=o.group.units[0];y.n.isAtomic(u)&&y.n.isAtomic(c)&&(po.a.areEqual(u.bonds,c.bonds)||(e.createGeometry=!0,e.updateTransform=!0,e.updateColor=!0,e.updateSize=!0))},mustRecreate:function(e,t,r){return!t.tryUseImpostor||!r}},e)}(e):function(e){return Object(Qi.h)({defaultProps:w.a.getDefaultValues(vo),createGeometry:bo,createLocationIterator:Hi.fromGroup,getLoci:so,eachLocation:uo,setUpdateState:function(e,t,r,n,a,i,o){e.createGeometry=t.sizeFactor!==r.sizeFactor||t.sizeAspectRatio!==r.sizeAspectRatio||t.radialSegments!==r.radialSegments||t.linkScale!==r.linkScale||t.linkSpacing!==r.linkSpacing||t.ignoreHydrogens!==r.ignoreHydrogens||t.linkCap!==r.linkCap||t.dashCount!==r.dashCount||t.dashScale!==r.dashScale||t.dashCap!==r.dashCap||t.stubCap!==r.stubCap||!Object(s.f)(t.includeTypes,r.includeTypes)||!Object(s.f)(t.excludeTypes,r.excludeTypes)||t.adjustCylinderLength!==r.adjustCylinderLength||t.aromaticBonds!==r.aromaticBonds;var u=i.group.units[0],c=o.group.units[0];y.n.isAtomic(u)&&y.n.isAtomic(c)&&(po.a.areEqual(u.bonds,c.bonds)||(e.createGeometry=!0,e.updateTransform=!0,e.updateColor=!0,e.updateSize=!0))},mustRecreate:function(e,t,r){return t.tryUseImpostor&&!!r}},e)}(e)}var xo=r(670),Oo=r(769),jo=new y.b.ElementBondIterator;function So(e,t,r,n){for(jo.setElement(t,r,n);jo.hasNext;){var a=jo.move();return a.otherUnit.conformation.position(a.otherUnit.elements[a.otherIndex],e),e}return null}var _o=Object(qa.g)();function wo(e,t,r){var n,a=y.h.Location.create(e),i=y.b.Location(e,void 0,void 0,e,void 0,void 0),o=e.interUnitBonds,u=o.edgeCount,c=o.edges,l=r.sizeFactor,d=r.sizeAspectRatio,p=r.adjustCylinderLength,f=r.aromaticBonds,h=Object(qa.g)(),m=e.child;r.includeParent&&m&&(n=function(t){var r=c[t],n=m.unitMap.get(r.unitA),a=m.unitMap.get(r.unitB),i=e.unitMap.get(r.unitA).elements[r.indexA],o=e.unitMap.get(r.unitB).elements[r.indexB];return n&&Oo.a.has(n.elements,i)&&(!a||!Oo.a.has(a.elements,o))});return{linkCount:u,referencePosition:function(t){var r,n,a,i,o=c[t];if(o.unitAo.unitB))throw new Error("same units in createInterUnitBondCylinderMesh");r=e.unitMap.get(o.unitB),n=e.unitMap.get(o.unitA),a=o.indexB,i=o.indexA}return So(_o,e,r,a)||So(_o,e,n,i)},position:function(r,n,i){var o=c[i],s=e.unitMap.get(o.unitA),u=e.unitMap.get(o.unitB);if(s.conformation.position(s.elements[o.indexA],r),u.conformation.position(u.elements[o.indexB],n),p){var f=function(r){var n=c[r];return a.unit=e.unitMap.get(n.unitA),a.element=a.unit.elements[n.indexA],t.size.size(a)*l}(i),m=function(r){var n=c[r];return a.unit=e.unitMap.get(n.unitB),a.element=a.unit.elements[n.indexB],t.size.size(a)*l}(i),g=Math.min(f,m)*d,b=Math.sqrt(Math.max(0,f*f-g*g))-.05,v=Math.sqrt(Math.max(0,m*m-g*g))-.05;if(b<=.01&&v<=.01)return;qa.g.normalize(h,qa.g.sub(h,n,r)),qa.g.scaleAndAdd(r,r,h,b),qa.g.scaleAndAdd(n,n,h,-v)}},style:function(e){var t=c[e].props.order,r=s.a.create(c[e].props.flag);return Zi.d.is(r,2)||Zi.d.is(r,4)?1:3===t?3:f&&Zi.d.is(r,16)?5:2===t?2:0},radius:function(r){return function(r){var n=c[r];return i.aUnit=e.unitMap.get(n.unitA),i.aIndex=n.indexA,i.bUnit=e.unitMap.get(n.unitB),i.bIndex=n.indexB,t.size.size(i)*l}(r)*d},ignore:oo(e,r),stub:n}}function Co(e,t,r,n,a){if(!t.interUnitBonds.edgeCount)return fo.a.createEmpty(a);var i=wo(t,r,n),o=Object(Ki.c)(e,i,n,a),s=t.child,u=ei.g.expand(Object(ei.g)(),(null!=s?s:t).boundary.sphere,1*n.sizeFactor);return o.setBoundingSphere(u),o}function Ao(e,t,r,n,a){if(!t.interUnitBonds.edgeCount)return Yi.a.createEmpty(a);var i=wo(t,r,n),o=Object(Ki.d)(e,i,n,a),s=t.child,u=ei.g.expand(Object(ei.g)(),(null!=s?s:t).boundary.sphere,1*n.sizeFactor);return o.setBoundingSphere(u),o}var Eo=Object(n.a)(Object(n.a)(Object(n.a)(Object(n.a)({},xo.g),xo.a),ro),{sizeFactor:w.a.Numeric(.3,{min:0,max:10,step:.01}),sizeAspectRatio:w.a.Numeric(2/3,{min:0,max:3,step:.01}),tryUseImpostor:w.a.Boolean(!0),includeParent:w.a.Boolean(!1)});function Po(e,t,r,n){return r.tryUseImpostor&&n&&n.extensions.fragDepth?function(e){return Object(xo.b)({defaultProps:w.a.getDefaultValues(Eo),createGeometry:Co,createLocationIterator:Hi.fromStructure,getLoci:co,eachLocation:lo,setUpdateState:function(e,t,r){e.createGeometry=t.sizeAspectRatio!==r.sizeAspectRatio||t.linkScale!==r.linkScale||t.linkSpacing!==r.linkSpacing||t.ignoreHydrogens!==r.ignoreHydrogens||t.linkCap!==r.linkCap||t.dashCount!==r.dashCount||t.dashScale!==r.dashScale||t.dashCap!==r.dashCap||t.stubCap!==r.stubCap||!Object(s.f)(t.includeTypes,r.includeTypes)||!Object(s.f)(t.excludeTypes,r.excludeTypes)||t.adjustCylinderLength!==r.adjustCylinderLength},mustRecreate:function(e,t,r){return!t.tryUseImpostor||!r}},e)}(e):function(e){return Object(xo.h)({defaultProps:w.a.getDefaultValues(Eo),createGeometry:Ao,createLocationIterator:Hi.fromStructure,getLoci:co,eachLocation:lo,setUpdateState:function(e,t,r){e.createGeometry=t.sizeFactor!==r.sizeFactor||t.sizeAspectRatio!==r.sizeAspectRatio||t.radialSegments!==r.radialSegments||t.linkScale!==r.linkScale||t.linkSpacing!==r.linkSpacing||t.ignoreHydrogens!==r.ignoreHydrogens||t.linkCap!==r.linkCap||t.dashCount!==r.dashCount||t.dashScale!==r.dashScale||t.dashCap!==r.dashCap||t.stubCap!==r.stubCap||!Object(s.f)(t.includeTypes,r.includeTypes)||!Object(s.f)(t.excludeTypes,r.excludeTypes)||t.adjustCylinderLength!==r.adjustCylinderLength},mustRecreate:function(e,t,r){return t.tryUseImpostor&&!!r}},e)}(e)}var To,Io=r(804),ko=r(602),Mo=r(658),Do=r(761),Ro=new Float32Array([-1,1,-1,-1,1,1,1,-1]),Bo=new Uint16Array([0,1,2,1,3,2]),Lo=Ka.a.add3,No=Ka.a.add2,Fo=Ka.a.add;(To||(To={})).create=function(e,t,r){void 0===e&&(e=2048),void 0===t&&(t=1024),e*=4,t*=4;var n=Ka.a.create(Float32Array,3,t,r?r.centerBuffer.ref.value:e),a=Ka.a.create(Float32Array,2,t,r?r.mappingBuffer.ref.value:e),i=Ka.a.create(Uint32Array,3,t/2,r?r.indexBuffer.ref.value:e/2),o=Ka.a.create(Float32Array,1,t,r?r.groupBuffer.ref.value:e);return{add:function(e,t,r,s){for(var u=n.elementCount,c=0;c<4;++c)Lo(n,e,t,r),No(a,Ro[2*c],Ro[2*c+1]),Fo(o,s);Lo(i,u+Bo[0],u+Bo[1],u+Bo[2]),Lo(i,u+Bo[3],u+Bo[4],u+Bo[5])},getSpheres:function(){var e=Ka.a.compact(n,!0),t=Ka.a.compact(a,!0),s=Ka.a.compact(i,!0),u=Ka.a.compact(o,!0);return Do.a.create(e,t,s,u,n.elementCount/4,r)}}};var zo,Uo,Vo=qa.g.add;function Ho(e,t,r){var n=r.ignoreHydrogens,a=r.traceOnly,i=t.model.atomicHierarchy.derived.atom.atomicNumber,o=y.n.isCoarse(t),s=e.child,u=null==s?void 0:s.unitMap.get(t.id);if(s&&!u)throw new Error("expected childUnit to exist if child exists");if(s||n||a)return function(e){return!!u&&!xt.f.has(u.elements,e)||!o&&n&&Object(eo.n)(i,e)||a&&!Object(eo.p)(t,e)}}function Go(e,t,r,n,a,i){var o=r.child,s=null==o?void 0:o.unitMap.get(t.id);if(o&&!s)return Yi.a.createEmpty(i);for(var u,c=a.detail,l=a.sizeFactor,d=t.elements,p=d.length,f=p*Object(Io.b)(c),h=ko.a.createState(f,f/2,i),m=Object(qa.g)(),g=t.conformation.invariantPosition,b=Ho(r,t,a),v=y.h.Location.create(r,t),x=n.size.size,O=Object(qa.g)(),j=0,S=0,_=0;_j&&(j=w),Object(Mo.a)(h,m,w*l,c)}qa.g.scale(O,O,1/S),u=i&&qa.g.distance(O,i.boundingSphere.center)/i.boundingSphere.radius<1?ei.g.clone(i.boundingSphere):ei.g.expand(Object(ei.g)(),(null!=s?s:t).boundary.sphere,j*l+.05);var C=ko.a.getMesh(h);return C.setBoundingSphere(u),C}function qo(e,t,r,n,a,i){var o=r.child,s=null==o?void 0:o.unitMap.get(t.id);if(o&&!s)return Do.a.createEmpty(i);for(var u,c=t.elements,l=c.length,d=To.create(l,l/2,i),p=Object(qa.g)(),f=t.conformation.invariantPosition,h=Ho(r,t,a),m=y.h.Location.create(r,t),g=n.size.size,b=Object(qa.g)(),v=0,x=0,O=0;Ov&&(v=j)}qa.g.scale(b,b,1/x),u=i&&qa.g.distance(b,i.boundingSphere.center)/i.boundingSphere.radius<1?ei.g.clone(i.boundingSphere):ei.g.expand(Object(ei.g)(),(null!=s?s:t).boundary.sphere,v*a.sizeFactor+.05);var S=d.getSpheres();return S.setBoundingSphere(u),S}function Wo(e,t,r){var n=!1;if(!y.h.Loci.is(e))return!1;var a=t.structure,i=t.group;if(!y.g.areEquivalent(e.structure,a))return!1;for(var o=i.elements.length,s=0,u=e.elements;s0},getData:function(e,t){return t.includeParent?e.asParent():e},mustRecreate:function(e,t){return e.includeParent!==t.includeParent}});function is(e,t,r,n,a){var i=t.carbohydrates,o=i.links,s=i.elements,u=n.linkSizeFactor,c=y.h.Location.create(t),l={linkCount:o.length,position:function(e,t,r){var n=o[r];qa.g.copy(e,s[n.carbohydrateIndexA].geometry.center),qa.g.copy(t,s[n.carbohydrateIndexB].geometry.center)},radius:function(e){var t=o[e],n=s[t.carbohydrateIndexA],a=n.unit.rings.all[n.ringIndex];return c.unit=n.unit,c.element=n.unit.elements[a[0]],r.size.size(c)*u}};return Object(Ki.d)(e,l,n,a)}var os=Object(n.a)(Object(n.a)(Object(n.a)({},Qi.g),Ki.a),{linkSizeFactor:w.a.Numeric(.3,{min:0,max:3,step:.01})});function ss(e){return Object(xo.h)({defaultProps:w.a.getDefaultValues(os),createGeometry:is,createLocationIterator:us,getLoci:cs,eachLocation:ls,setUpdateState:function(e,t,r){e.createGeometry=t.linkSizeFactor!==r.linkSizeFactor||t.radialSegments!==r.radialSegments||t.linkCap!==r.linkCap}},e)}function us(e){var t=e.carbohydrates,r=t.elements,n=t.links,a=n.length,i=y.h.Location.create(e);return Object(Ji.a)(a,1,1,(function(e){var t=n[e],a=r[t.carbohydrateIndexA],o=a.unit.rings.all[a.ringIndex];return i.unit=a.unit,i.element=a.unit.elements[o[0]],i}),!0)}function cs(e,t,r){var n=e.objectId,a=e.groupId;if(r===n){var i=t.carbohydrates,o=i.links,s=i.elements,u=o[a],c=s[u.carbohydrateIndexA],l=s[u.carbohydrateIndexB];return y.h.Loci.union(Object(eo.f)(t,c.unit,c.residueIndex,c.altId),Object(eo.f)(t,l.unit,l.residueIndex,l.altId))}return T.b}function ls(e,t,r){var n=!1;if(!y.h.Loci.is(e))return!1;if(!y.g.areEquivalent(e.structure,t))return!1;for(var a=t.carbohydrates.getLinkIndices,i=function(e,t){if(!y.n.isAtomic(e))return"continue";xt.d.forEach(t,(function(t){for(var i=a(e,e.elements[t]),o=0,s=i.length;ol)continue;a=!1}t(n[c-1],n[c],i-1,i,0),++i}}}(e,t)}}function bu(e,t){switch(e.kind){case 0:return function(e,t){var r=mu.a.transientSegments(hc(e),e.elements),n=xt.e.transientSegments(e.model.atomicHierarchy.residueAtomSegments,e.elements),a=e.model.atomicHierarchy.derived.residue.traceElementIndex,i=0;for(;r.hasNext;)for(n.setSegment(r.move());n.hasNext;){var o=n.move().index;t(a[o],i),++i}}(e,t);case 1:case 2:return function(e,t){var r=mu.a.transientSegments(hc(e),e.elements),n=e.elements,a=0;for(;r.hasNext;)for(var i=r.move(),o=i.start,s=i.end,u=o,c=s;uthis.residueSegmentMax){var t;e=void 0!==(t=this.cyclicPolymerMap.get(this.residueSegmentMax))?t+(e-this.residueSegmentMax-1):this.residueSegmentMax}return e},e.prototype.getSecStruc=function(e){if(this.secondaryStructure){var t=this.secondaryStructure,r=t.type[(0,t.getIndex)(e)];return Au(r)?2:r}return Pu},e.prototype.setControlPoint=function(e,t,r,n,a){(function(e){return Zi.m.is(e,4)})(a)||this.helixOrientationCenters&&Au(a)?qa.g.scale(e,qa.g.add(e,t,qa.g.add(e,n,qa.g.add(e,r,r))),1/4):qa.g.copy(e,r)},e.prototype.setFromToVector=function(e,t,r){this.value.isCoarseBackbone||this.helixOrientationCenters&&Au(r)?qa.g.set(e,1,0,0):(this.atomicPos(ku,this.directionFromElementIndex[t]),this.atomicPos(Mu,this.directionToElementIndex[t]),qa.g.sub(e,Mu,ku))},e.prototype.setDirection=function(e,t,r,n){qa.g.matchDirection(ku,t,r),qa.g.matchDirection(Mu,n,r),qa.g.scale(e,qa.g.add(e,ku,qa.g.add(e,Mu,qa.g.add(e,r,r))),1/4)},e.prototype.move=function(){var e=this.residueIt,t=this.polymerIt,r=this.value;if(0===this.state)for(;t.hasNext;)if(this.polymerSegment=t.move(),e.setSegment(this.polymerSegment),this.updateResidueSegmentRange(this.polymerSegment),e.hasNext){this.state=1;var n=this.residueAtomSegments.index[this.unit.elements[this.polymerSegment.start]],a=this.getResidueIndex(n-1);this.currSecStrucType=n===a?Pu:this.getSecStruc(a),this.nextSecStrucType=this.getSecStruc(n),this.currCoarseBackbone=-1===this.directionFromElementIndex[a]||-1===this.directionToElementIndex[a],this.nextCoarseBackbone=-1===this.directionFromElementIndex[n]||-1===this.directionToElementIndex[n];break}if(1===this.state){var i=e.move().index,o=this.getResidueIndex(i-3),s=this.getResidueIndex(i-2),u=this.getResidueIndex(i-1),c=this.getResidueIndex(i+1),l=this.getResidueIndex(i+2),d=this.getResidueIndex(i+3);this.prevSecStrucType=this.currSecStrucType,this.currSecStrucType=this.nextSecStrucType,this.nextSecStrucType=i===c?Pu:this.getSecStruc(c),this.prevCoarseBackbone=this.currCoarseBackbone,this.currCoarseBackbone=this.nextCoarseBackbone,this.nextCoarseBackbone=-1===this.directionFromElementIndex[c]||-1===this.directionToElementIndex[c],r.secStrucType=this.currSecStrucType,r.secStrucFirst=this.prevSecStrucType!==this.currSecStrucType,r.secStrucLast=this.currSecStrucType!==this.nextSecStrucType,r.isCoarseBackbone=this.currCoarseBackbone,r.coarseBackboneFirst=this.prevCoarseBackbone!==this.currCoarseBackbone,r.coarseBackboneLast=this.currCoarseBackbone!==this.nextCoarseBackbone,r.first=i===this.residueSegmentMin,r.last=i===this.residueSegmentMax,r.moleculeType=this.moleculeType[i],r.initial=i===u,r.final=i===c,r.centerPrev.element=this.traceElementIndex[u],r.center.element=this.traceElementIndex[i],r.centerNext.element=this.traceElementIndex[c];var p=this.getSecStruc(o),f=this.getSecStruc(s),h=this.getSecStruc(u),m=this.getSecStruc(i),g=this.getSecStruc(c),b=this.getSecStruc(l),v=this.getSecStruc(d);this.pos(this.p0,o,p),this.pos(this.p1,s,f),this.pos(this.p2,u,h),this.pos(this.p3,i,m),this.pos(this.p4,c,g),this.pos(this.p5,l,b),this.pos(this.p6,d,v);var y=Au(p),x=Au(f),O=Au(h),j=Au(m),S=Au(g),_=Au(b),w=Au(v);this.helixOrientationCenters&&(j!==O?j?(qa.g.copy(this.p0,this.p3),qa.g.copy(this.p1,this.p3),qa.g.copy(this.p2,this.p3)):O&&(qa.g.scale(Iu,qa.g.sub(Iu,this.p2,this.p3),2),qa.g.add(this.p2,this.p3,Iu),qa.g.add(this.p1,this.p2,Iu),qa.g.add(this.p0,this.p1,Iu)):j!==x?j?(qa.g.copy(this.p0,this.p2),qa.g.copy(this.p1,this.p2)):x&&(qa.g.scale(Iu,qa.g.sub(Iu,this.p1,this.p2),2),qa.g.add(this.p1,this.p2,Iu),qa.g.add(this.p0,this.p1,Iu)):j!==y&&(j?qa.g.copy(this.p0,this.p1):y&&(qa.g.scale(Iu,qa.g.sub(Iu,this.p0,this.p1),2),qa.g.add(this.p0,this.p1,Iu))),j!==S?j?(qa.g.copy(this.p4,this.p3),qa.g.copy(this.p5,this.p3),qa.g.copy(this.p6,this.p3)):S&&(qa.g.scale(Iu,qa.g.sub(Iu,this.p4,this.p3),2),qa.g.add(this.p4,this.p3,Iu),qa.g.add(this.p5,this.p4,Iu),qa.g.add(this.p6,this.p5,Iu)):j!==_?j?(qa.g.copy(this.p5,this.p4),qa.g.copy(this.p6,this.p4)):_&&(qa.g.scale(Iu,qa.g.sub(Iu,this.p5,this.p4),2),qa.g.add(this.p5,this.p4,Iu),qa.g.add(this.p6,this.p5,Iu)):j!==w&&(j?qa.g.copy(this.p6,this.p5):w&&(qa.g.scale(Iu,qa.g.sub(Iu,this.p6,this.p5),2),qa.g.add(this.p6,this.p5,Iu)))),this.setFromToVector(this.d01,u,h),this.setFromToVector(this.d12,i,m),this.setFromToVector(this.d23,c,g),this.setFromToVector(this.d34,l,b);var C=j&&this.helixOrientationCenters,A=1.5;i===u||m!==h&&C?(qa.g.setMagnitude(Iu,qa.g.sub(Iu,this.p3,this.p4),A),qa.g.add(this.p2,this.p3,Iu),qa.g.add(this.p1,this.p2,Iu),qa.g.add(this.p0,this.p1,Iu)):u===s||m!==f&&C?(qa.g.setMagnitude(Iu,qa.g.sub(Iu,this.p2,this.p3),A),qa.g.add(this.p1,this.p2,Iu),qa.g.add(this.p0,this.p1,Iu)):(s===o||m!==p&&C)&&(qa.g.setMagnitude(Iu,qa.g.sub(Iu,this.p1,this.p2),A),qa.g.add(this.p0,this.p1,Iu)),i===c||m!==g&&C?(qa.g.setMagnitude(Iu,qa.g.sub(Iu,this.p3,this.p2),A),qa.g.add(this.p4,this.p3,Iu),qa.g.add(this.p5,this.p4,Iu),qa.g.add(this.p6,this.p5,Iu)):c===l||m!==b&&C?(qa.g.setMagnitude(Iu,qa.g.sub(Iu,this.p4,this.p3),A),qa.g.add(this.p5,this.p4,Iu),qa.g.add(this.p6,this.p5,Iu)):(l===d||m!==v&&C)&&(qa.g.setMagnitude(Iu,qa.g.sub(Iu,this.p5,this.p4),A),qa.g.add(this.p6,this.p5,Iu)),this.setControlPoint(r.p0,this.p0,this.p1,this.p2,f),this.setControlPoint(r.p1,this.p1,this.p2,this.p3,h),this.setControlPoint(r.p2,this.p2,this.p3,this.p4,m),this.setControlPoint(r.p3,this.p3,this.p4,this.p5,g),this.setControlPoint(r.p4,this.p4,this.p5,this.p6,b),this.setDirection(r.d12,this.d01,this.d12,this.d23),this.setDirection(r.d23,this.d12,this.d23,this.d34),e.hasNext||(this.state=0)}return this.hasNext=e.hasNext||t.hasNext,this.value},e}(),Ru=function(){function e(e,t){switch(this.unit=e,this.state=0,this.hasNext=!1,this.polymerIt=mu.a.transientSegments(hc(e),e.elements),this.value=Tu(t,e),qa.g.set(this.value.d12,1,0,0),qa.g.set(this.value.d23,1,0,0),e.kind){case 1:this.conformation=e.model.coarseConformation.spheres;break;case 2:this.conformation=e.model.coarseConformation.gaussians}this.hasNext=this.polymerIt.hasNext}return e.prototype.getElementIndex=function(e){return Math.min(Math.max(this.polymerSegment.start,e),this.polymerSegment.end-1)},e.prototype.pos=function(e,t){var r=this.unit.elements[t];e[0]=this.conformation.x[r],e[1]=this.conformation.y[r],e[2]=this.conformation.z[r]},e.prototype.move=function(){if(0===this.state)for(;this.polymerIt.hasNext;)if(this.polymerSegment=this.polymerIt.move(),this.elementIndex=this.polymerSegment.start,this.elementIndex=this.polymerSegment.end&&(this.state=0)}return this.hasNext=this.elementIndex+1=0){s=u;break}}if(o<0)return!1;var c=o;for(u=i;u>s;u--){var l;if(!((l=r[u])<0)){var d=xt.d.indexOf(t,l);if(d>=0){c=d;break}}}return n(xt.b.ofRange(e+o,e+c))}function vc(e,t,r,n,a){var i=!1,o=a.unit.elements,s=a.unit.model.atomicHierarchy.derived.residue.traceElementIndex,u=a.unit.model.atomicHierarchy.residueAtomSegments.index,c=r(a.unit);if(xt.b.is(a.indices))i=0===xt.b.start(a.indices)&&xt.b.end(a.indices)===a.unit.elements.length?n(xt.b.ofBounds(e,e+t))||i:bc(e,c,s,n,f=u[o[xt.b.min(a.indices)]],h=u[o[xt.b.max(a.indices)]])||i;else for(var l=a.indices,d=0,p=l.length;d1)break;h=g,m++}d=m-1,i=bc(e,c,s,n,f,h)||i}return i}function yc(e){return e.polymerElements}function xc(e,t,r){var n=!1;if(!y.h.Loci.is(e))return!1;var a=t.structure,i=t.group;if(!y.g.areEquivalent(e.structure,a))return!1;for(var o=i.units[0].polymerElements.length,s=0,u=e.elements;s0?(Kl(Dl,t,0),Kl(Rl,t,3*a),g=s/$l(Jl(Bl,Rl,Dl))):nd(Ul,0,0,0);for(var b=0;b<=a;++b){var v=i[b],y=o[b],x=0===s?y:s*(1-b/a),O=3*b;Kl(Nl,r,O),Ql(Nl,Nl,x),Kl(Ll,n,O),Ql(Ll,Ll,v),s>0&&(Kl(Dl,r,O),Kl(Rl,n,O),Ql(Ul,rd(Ul,Dl,Rl),g)),Kl(Vl,t,O),Kl(Hl,r,O),Kl(Gl,n,O),Zl(Dl,Zl(Dl,Vl,Ll),Nl),Zl(Rl,Hl,Ul),ad(d,Dl[0],Dl[1],Dl[2]),ad(p,Rl[0],Rl[1],Rl[2]),Zl(Dl,Jl(Dl,Vl,Ll),Nl),ad(d,Dl[0],Dl[1],Dl[2]),ad(p,Rl[0],Rl[1],Rl[2]),ed(Rl,Gl),ad(d,Dl[0],Dl[1],Dl[2]),ad(p,Rl[0],Rl[1],Rl[2]),Jl(Dl,Jl(Dl,Vl,Ll),Nl),ad(d,Dl[0],Dl[1],Dl[2]),ad(p,Rl[0],Rl[1],Rl[2]),Zl(Rl,ed(Rl,Hl),Ul),ad(d,Dl[0],Dl[1],Dl[2]),ad(p,Rl[0],Rl[1],Rl[2]),Jl(Dl,Zl(Dl,Vl,Ll),Nl),ad(d,Dl[0],Dl[1],Dl[2]),ad(p,Rl[0],Rl[1],Rl[2]),td(Rl,Gl),ad(d,Dl[0],Dl[1],Dl[2]),ad(p,Rl[0],Rl[1],Rl[2]),Zl(Dl,Zl(Dl,Vl,Ll),Nl),ad(d,Dl[0],Dl[1],Dl[2]),ad(p,Rl[0],Rl[1],Rl[2])}for(b=0;b0){od(0,e,t,r,n,v=i[0],s,-(y=o[0])),od(0,e,t,r,n,v,-s,y)}c&&0===s&&od(3*a,e,t,r,n,v=i[a],-(y=o[a]),-y);b=0;for(var _=8*(a+1)+(u?4:s>0?8:0)+(c&&0===s?4:0);b<_;++b)id(h,l)}var ud=Object(qa.g)(),cd=Object(qa.g)(),ld=Object(qa.g)(),dd=Object(qa.g)(),pd=Object(qa.g)();function fd(e,t,r,n,a,i){e[0]=t[0]*a+r[0]*i+n[0],e[1]=t[1]*a+r[1]*i+n[1],e[2]=t[2]*a+r[2]*i+n[2]}var hd=qa.g.fromArray,md=qa.g.normalize,gd=qa.g.negate,bd=qa.g.copy,vd=qa.g.cross,yd=Ka.a.add3,xd=new Map;function Od(e,t,r,n,a,i,o,s,u,c){for(var l,d,p,f,h,m=e.currentGroup,g=e.vertices,b=e.normals,v=e.indices,y=e.groups,x=g.elementCount,O=function(e){if(!xd.has(e)){for(var t=[],r=[],n=0;n0&&(jd(kd,t,0),jd(Md,t,3*a),h=s/Sd(_d(Dd,Md,kd)));for(var m=0;m<=a;++m){var g=i[m],b=o[m],v=0===s?b:s*(1-m/a),y=3*m;jd(Bd,r,y),Cd(Bd,Bd,v),jd(Rd,n,y),Cd(Rd,Rd,g),s>0&&(jd(kd,r,y),jd(Md,n,y),Cd(Ld,Pd(Ld,kd,Md),h)),jd(Nd,t,y),jd(Fd,r,y),jd(zd,n,y),wd(kd,Nd,Bd),Ad(Md,zd),Td(c,kd[0],kd[1],kd[2]),Td(l,Md[0],Md[1],Md[2]),_d(kd,Nd,Bd),Td(c,kd[0],kd[1],kd[2]),Td(l,Md[0],Md[1],Md[2]),wd(kd,Nd,Bd),Ed(Md,zd),Td(c,kd[0],kd[1],kd[2]),Td(l,Md[0],Md[1],Md[2]),_d(kd,Nd,Bd),Td(c,kd[0],kd[1],kd[2]),Td(l,Md[0],Md[1],Md[2])}for(m=0;m0},ensureCustomProperties:{attach:function(e,t){return Object(n.b)(void 0,void 0,void 0,(function(){var r,a,i;return Object(n.d)(this,(function(n){switch(n.label){case 0:return[4,Ou.a.attach(e,t,void 0,!0)];case 1:n.sent(),r=0,a=t.models,n.label=2;case 2:return r0&&e.models.some((function(e){return Zd.a.Provider.isApplicable(e)}))},getData:function(e,t){return t.includeParent?e.asParent():e},mustRecreate:function(e,t){return e.includeParent!==t.includeParent}}),ip=r(624),op=(r(758),r(618)),sp=r(625),up=r(615),cp={drawCount:Object(up.k)("number"),instanceCount:Object(up.k)("number"),aRadius:Object(up.a)("float32",1,0),aPosition:Object(up.a)("float32",3,0),aGroup:Object(up.a)("float32",1,0),uCurrentSlice:Object(up.j)("f"),uCurrentX:Object(up.j)("f"),uCurrentY:Object(up.j)("f"),uBboxMin:Object(up.j)("v3","material"),uBboxSize:Object(up.j)("v3","material"),uGridDim:Object(up.j)("v3","material"),uGridTexDim:Object(up.j)("v3","material"),uGridTexScale:Object(up.j)("v2","material"),uAlpha:Object(up.j)("f","material"),uResolution:Object(up.j)("f","material"),uRadiusFactorInv:Object(up.j)("f","material"),tMinDistanceTex:Object(up.i)("texture","rgba","float","nearest"),dGridTexType:Object(up.c)("string",["2d","3d"]),dCalcType:Object(up.c)("string",["density","minDistance","groupId"])};function lp(e){return e.namedFramebuffers["gaussian-density"]||(e.namedFramebuffers["gaussian-density"]=e.resources.framebuffer()),e.namedFramebuffers["gaussian-density"]}function dp(e,t,r,n,a,i){var o="gaussian-density-"+e;return t.namedTextures[o]||(t.namedTextures[o]=t.resources.texture(r,n,a,i)),t.namedTextures[o]}function pp(e,t,r,n,a,i){return e.isWebGL2?function(e,t,r,n,a,i){return hp(function(e,t,r,n,a,i){var o=e.gl,u=e.resources,c=e.state,l=e.extensions,d=l.colorBufferFloat,p=l.textureFloat,f=l.colorBufferHalfFloat,h=l.textureHalfFloat,m=a.smoothness,g=a.resolution,b=bp(t,r,n,a),v=b.drawCount,y=b.positions,x=b.radii,O=b.groups,j=b.scale,S=b.expandedBox,_=b.dim,w=b.maxRadius,C=_[0],A=_[1],E=_[2],P=dp("min-dist-3d",e,"volume-uint8","rgba","ubyte","nearest");P.define(C,A,E);var T=qa.f.create(1,1),I=2*w,k=vp(e,v,y,x,O,P,S,_,_,T,m,g,I),M=k.values.uCurrentSlice,D=lp(e);D.bind(),yp(e),o.viewport(0,0,C,A),o.scissor(0,0,C,A),i||(i=f&&h?u.texture("volume-float16","rgba","fp16","linear"):d&&p?u.texture("volume-float32","rgba","float","linear"):u.texture("volume-uint8","rgba","ubyte","linear"));function R(e,t){c.currentRenderItemId=-1;for(var r=0;r=D&&(r-=D,n+=P,a=0,s.e.update(W,n)),s.e.update(q,a),s.e.update(G,i),u.viewport(a,n,E,P),u.scissor(a,n,E,P),V.render(),++r,a+=E;u.flush()}return X.bind(),yp(e),o||(o=h&&m?c.texture("image-float16","rgba","fp16","linear"):p&&f?c.texture("image-float32","rgba","float","linear"):c.texture("image-uint8","rgba","ubyte","linear")),o.define(F,z),Op(e,V),Y(o,!0),g&&(xp(e,V),Y(U,!0),jp(e,V),Y(o,!1)),{texture:o,scale:_,bbox:w,gridDim:C,gridTexDim:B,gridTexScale:L,radiusFactor:N,resolution:v}}function bp(e,t,r,n){for(var a=n.resolution,i=n.radiusOffset,o=1/a,s=e.indices,u=e.x,c=e.y,l=e.z,d=e.id,p=xt.d.size(s),f=new Float32Array(3*p),h=new Float32Array(p),m=new Float32Array(p),g=0,b=0;b0?"3d":"2d"),s.e.updateIfChanged(g.dCalcType,"density"),e.namedComputeRenderables["gaussian-density"].update()}else e.namedComputeRenderables["gaussian-density"]=function(e,t,r,a,i,o,u,c,l,d,p,f,h){var m=qa.g.sub(Object(qa.g)(),u.max,u.min),g={drawCount:s.e.create(t),instanceCount:s.e.create(1),aRadius:s.e.create(a),aPosition:s.e.create(r),aGroup:s.e.create(i),uCurrentSlice:s.e.create(0),uCurrentX:s.e.create(0),uCurrentY:s.e.create(0),uBboxMin:s.e.create(u.min),uBboxSize:s.e.create(m),uGridDim:s.e.create(c),uGridTexDim:s.e.create(l),uGridTexScale:s.e.create(d),uAlpha:s.e.create(p),uResolution:s.e.create(f),uRadiusFactorInv:s.e.create(1/h),tMinDistanceTex:s.e.create(o),dGridTexType:s.e.create(o.getDepth()>0?"3d":"2d"),dCalcType:s.e.create("density")},b=Object(n.a)({},cp),v=Object(op.g)("gaussian-density","\nprecision highp float;\n\nattribute vec3 aPosition;\nattribute float aRadius;\n\nvarying vec3 vPosition;\nvarying float vRadiusSqInv;\n\n#if defined(dCalcType_groupId)\n attribute float aGroup;\n varying float vGroup;\n#endif\n\nuniform vec3 uBboxSize;\nuniform vec3 uBboxMin;\nuniform float uResolution;\n\nvoid main() {\n vRadiusSqInv = 1.0 / (aRadius * aRadius);\n #if defined(dCalcType_groupId)\n vGroup = aGroup;\n #endif\n gl_PointSize = ceil(((aRadius * 3.0) / uResolution) + uResolution);\n vPosition = (aPosition - uBboxMin) / uResolution;\n gl_Position = vec4(((aPosition - uBboxMin) / uBboxSize) * 2.0 - 1.0, 1.0);\n}\n","\nprecision highp float;\n\nvarying vec3 vPosition;\nvarying float vRadiusSqInv;\n#if defined(dCalcType_groupId)\n #if defined(dGridTexType_2d)\n precision highp sampler2D;\n uniform sampler2D tMinDistanceTex;\n uniform vec3 uGridTexDim;\n #elif defined(dGridTexType_3d)\n precision highp sampler3D;\n uniform sampler3D tMinDistanceTex;\n #endif\n varying float vGroup;\n#endif\n\n#include common\n\nuniform vec3 uGridDim;\nuniform vec2 uGridTexScale;\nuniform float uCurrentSlice;\nuniform float uCurrentX;\nuniform float uCurrentY;\nuniform float uAlpha;\nuniform float uResolution;\nuniform float uRadiusFactorInv;\n\nvoid main() {\n vec2 v = gl_FragCoord.xy - vec2(uCurrentX, uCurrentY) - 0.5;\n vec3 fragPos = vec3(v.x, v.y, uCurrentSlice);\n float dist = distance(fragPos, vPosition) * uResolution;\n\n #if defined(dCalcType_density)\n float density = exp(-uAlpha * ((dist * dist) * vRadiusSqInv));\n gl_FragColor.a = density * uRadiusFactorInv;\n #elif defined(dCalcType_minDistance)\n gl_FragColor.a = 1.0 - dist * uRadiusFactorInv;\n #elif defined(dCalcType_groupId)\n #if defined(dGridTexType_2d)\n float minDistance = 1.0 - texture2D(tMinDistanceTex, (gl_FragCoord.xy) / (uGridTexDim.xy / uGridTexScale)).a;\n #elif defined(dGridTexType_3d)\n float minDistance = 1.0 - texelFetch(tMinDistanceTex, ivec3(gl_FragCoord.xy, uCurrentSlice), 0).a;\n #endif\n if (dist * uRadiusFactorInv > minDistance + uResolution * 0.05)\n discard;\n gl_FragColor.rgb = encodeFloatRGB(vGroup);\n #endif\n}\n"),y=Object(sp.a)(e,"points",v,b,g);return Object(ip.a)(y,g)}(e,t,r,a,i,o,u,c,l,d,p,f,h);return e.namedComputeRenderables["gaussian-density"]}function yp(e){var t=e.gl,r=e.state;r.disable(t.CULL_FACE),r.enable(t.BLEND),r.disable(t.DEPTH_TEST),r.enable(t.SCISSOR_TEST),r.depthMask(!1),r.clearColor(0,0,0,0)}function xp(e,t){var r=e.gl,n=e.state;if(s.e.update(t.values.dCalcType,"minDistance"),t.update(),n.colorMask(!1,!1,!1,!0),n.blendFunc(r.ONE,r.ONE),!e.extensions.blendMinMax)throw new Error("GPU gaussian surface calculation requires EXT_blend_minmax");n.blendEquation(e.extensions.blendMinMax.MAX)}function Op(e,t){var r=e.gl,n=e.state;s.e.update(t.values.dCalcType,"density"),t.update(),n.colorMask(!1,!1,!1,!0),n.blendFunc(r.ONE,r.ONE),n.blendEquation(r.FUNC_ADD)}function jp(e,t){var r=e.gl,n=e.state;s.e.update(t.values.dCalcType,"groupId"),t.update(),n.colorMask(!0,!0,!0,!1),n.blendFunc(r.ONE,r.ZERO),n.blendEquation(r.FUNC_ADD)}var Sp=r(958);function _p(e,t,r,a,i){return Object(n.b)(this,void 0,void 0,(function(){function o(){return Object(n.b)(this,void 0,void 0,(function(){var t;return Object(n.d)(this,(function(r){switch(r.label){case 0:t=0,r.label=1;case 1:return tF[J]&&(F[J]=Z,P[J]=m?m[r]:r)}}}(t,Math.min(t+U,g)),e.shouldUpdate?[4,e.update({message:"filling density grid",current:t,max:g})]:[3,3]):[3,4];case 2:r.sent(),r.label=3;case 3:return t+=U,[3,1];case 4:return[2]}}))}))}var s,u,c,l,d,p,f,h,m,g,b,v,y,x,O,j,S,_,w,C,A,E,P,T,I,k,M,D,R,B,L,N,F,z,U,V;return Object(n.d)(this,(function(e){switch(e.label){case 0:for(s=i.resolution,u=i.radiusOffset,c=i.smoothness,l=1/s,d=t.indices,p=t.x,f=t.y,h=t.z,m=t.id,g=xt.d.size(d),b=new Float32Array(g),v=0,y=0;y2)){var ie=2-ae,oe=E(J,ee,re);j[oe]+=H*ie,j[oe+1]+=G*ie,j[oe+2]+=q*ie,S[oe/3]+=ie}}}D=0;for(var se=S.length;Du.drawCount.ref.value||i!==u.stride.ref.value)&&s.e.update(u.aSample,Vp(c,i)),s.e.updateIfChanged(u.drawCount,c),s.e.updateIfChanged(u.instanceCount,t.instanceCount),s.e.updateIfChanged(u.stride,i),s.e.updateIfChanged(u.uTotalCount,t.vertexCount),s.e.updateIfChanged(u.uInstanceCount,t.instanceCount),s.e.updateIfChanged(u.uGroupCount,t.groupCount),s.e.update(u.aTransform,t.transformBuffer),s.e.update(u.aInstance,t.instanceBuffer),s.e.update(u.uGeoTexDim,qa.f.set(u.uGeoTexDim.ref.value,t.positionTexture.getWidth(),t.positionTexture.getHeight())),s.e.update(u.tPosition,t.positionTexture),s.e.update(u.tGroup,t.groupTexture),s.e.update(u.uColorTexDim,qa.f.set(u.uColorTexDim.ref.value,t.colorData.width,t.colorData.height)),s.e.update(u.tColor,t.colorData),s.e.updateIfChanged(u.dColorType,t.colorType),s.e.updateIfChanged(u.uCurrentSlice,0),s.e.updateIfChanged(u.uCurrentX,0),s.e.updateIfChanged(u.uCurrentY,0),s.e.update(u.uBboxMin,r.min),s.e.update(u.uBboxSize,o),s.e.updateIfChanged(u.uResolution,a),e.namedComputeRenderables["color-accumulate"].update()}else e.namedComputeRenderables["color-accumulate"]=function(e,t,r,a,i){var o=qa.g.sub(Object(qa.g)(),r.max,r.min),u=Math.round(t.vertexCount/i),c={drawCount:s.e.create(u),instanceCount:s.e.create(t.instanceCount),stride:s.e.create(i),uTotalCount:s.e.create(t.vertexCount),uInstanceCount:s.e.create(t.instanceCount),uGroupCount:s.e.create(t.groupCount),aTransform:s.e.create(t.transformBuffer),aInstance:s.e.create(t.instanceBuffer),aSample:s.e.create(Vp(u,i)),uGeoTexDim:s.e.create(qa.f.create(t.positionTexture.getWidth(),t.positionTexture.getHeight())),tPosition:s.e.create(t.positionTexture),tGroup:s.e.create(t.groupTexture),uColorTexDim:s.e.create(qa.f.create(t.colorData.width,t.colorData.height)),tColor:s.e.create(t.colorData),dColorType:s.e.create(t.colorType),uCurrentSlice:s.e.create(0),uCurrentX:s.e.create(0),uCurrentY:s.e.create(0),uBboxMin:s.e.create(r.min),uBboxSize:s.e.create(o),uResolution:s.e.create(a)},l=Object(n.a)({},Up),d=Object(op.g)("accumulate","\nprecision highp float;\n\n#include common\n#include read_from_texture\n\nuniform int uTotalCount;\nuniform int uGroupCount;\n\nattribute float aSample;\n#define SampleID int(aSample)\n\nattribute mat4 aTransform;\nattribute float aInstance;\n\nuniform vec2 uGeoTexDim;\nuniform sampler2D tPosition;\nuniform sampler2D tGroup;\n\nuniform vec2 uColorTexDim;\nuniform sampler2D tColor;\n\nvarying vec3 vPosition;\nvarying vec3 vColor;\n\nuniform vec3 uBboxSize;\nuniform vec3 uBboxMin;\nuniform float uResolution;\n\nvoid main() {\n vec3 position = readFromTexture(tPosition, SampleID, uGeoTexDim).xyz;\n float group = decodeFloatRGB(readFromTexture(tGroup, SampleID, uGeoTexDim).rgb);\n\n position = (aTransform * vec4(position, 1.0)).xyz;\n gl_PointSize = 7.0;\n vPosition = (position - uBboxMin) / uResolution;\n gl_Position = vec4(((position - uBboxMin) / uBboxSize) * 2.0 - 1.0, 1.0);\n\n #if defined(dColorType_group)\n vColor = readFromTexture(tColor, group, uColorTexDim).rgb;\n #elif defined(dColorType_groupInstance)\n vColor = readFromTexture(tColor, aInstance * float(uGroupCount) + group, uColorTexDim).rgb;\n #endif\n}\n","\nprecision highp float;\n\nvarying vec3 vPosition;\nvarying vec3 vColor;\n\nuniform float uCurrentSlice;\nuniform float uCurrentX;\nuniform float uCurrentY;\nuniform float uResolution;\n\nconst float p = 2.0;\n\nvoid main() {\n vec2 v = gl_FragCoord.xy - vec2(uCurrentX, uCurrentY) - 0.5;\n vec3 fragPos = vec3(v.x, v.y, uCurrentSlice);\n float dist = distance(fragPos, vPosition);\n if (dist > p) discard;\n\n gl_FragColor = vec4(vColor, 1.0) * (p - dist);\n}\n"),p=Object(sp.a)(e,"points",d,l,c);return Object(ip.a)(p,c)}(e,t,r,a,i);return e.namedComputeRenderables["color-accumulate"]}var Gp=Object(n.a)(Object(n.a)({},zp.b),{tColor:Object(up.i)("texture","rgba","float","nearest"),uTexSize:Object(up.j)("v2")});function qp(e,t){if(e.namedComputeRenderables["color-normalize"]){var r=e.namedComputeRenderables["color-normalize"].values;s.e.update(r.tColor,t),s.e.update(r.uTexSize,qa.f.set(r.uTexSize.ref.value,t.getWidth(),t.getHeight())),e.namedComputeRenderables["color-normalize"].update()}else e.namedComputeRenderables["color-normalize"]=function(e,t){var r=Object(n.a)(Object(n.a)({},zp.c),{tColor:s.e.create(t),uTexSize:s.e.create(qa.f.create(t.getWidth(),t.getHeight()))}),a=Object(n.a)({},Gp),i=Object(op.g)("normalize",Fp.a,"\nprecision highp float;\nprecision highp sampler2D;\n\nuniform sampler2D tColor;\nuniform vec2 uTexSize;\n\nvoid main(void) {\n vec2 coords = gl_FragCoord.xy / uTexSize;\n vec4 color = texture2D(tColor, coords);\n\n gl_FragColor.rgb = color.rgb / color.a;\n}\n"),o=Object(sp.a)(e,"triangles",i,a,r);return Object(ip.a)(o,r)}(e,t);return e.namedComputeRenderables["color-normalize"]}function Wp(e,t,r,n,a){var i=n.gl,o=n.resources,u=n.state,c=n.extensions,l=c.colorBufferHalfFloat,d=c.textureHalfFloat,p=e.colorType.endsWith("Instance"),f=ei.b.fromSphere3D(Object(ei.b)(),p?e.boundingSphere:e.invariantBoundingSphere),h=1/t,m=ei.b.scale(Object(ei.b)(),f,h),g=ei.b.size(Object(qa.g)(),m);qa.g.ceil(g,g),qa.g.add(g,g,qa.g.create(2,2,2));var b=f.min,v=g[0],y=g[1],x=g[2],O=function(e){var t=e[0]*e[1]*e[2],r=Math.sqrt(t),n=Math.pow(2,Math.ceil(Math.log(r)/Math.log(2))),a=0,i=e[1],o=1,s=e[2];return n=_&&(k-=_,M+=y,D=0,s.e.update(T,M)),s.e.update(P,D),s.e.update(E,R),i.viewport(D,M,v,y),i.scissor(D,M,v,y),C.render(),++k,D+=v;a||(a=o.texture("image-uint8","rgb","ubyte","linear")),a.define(j,S);var B=qp(n,w);!function(e){var t=e.gl,r=e.state;r.disable(t.CULL_FACE),r.enable(t.BLEND),r.disable(t.DEPTH_TEST),r.enable(t.SCISSOR_TEST),r.depthMask(!1),r.clearColor(0,0,0,0),r.blendFunc(t.ONE,t.ONE),r.blendEquation(t.FUNC_ADD)}(n),u.currentRenderItemId=-1,a.attachFramebuffer(I,0),i.viewport(0,0,j,S),i.scissor(0,0,j,S),i.clear(i.COLOR_BUFFER_BIT),B.render();var L=qa.h.create(b[0],b[1],b[2],h),N=p?"volumeInstance":"volume";return{texture:a,gridDim:g,gridTexDim:qa.f.create(j,S),gridTransform:L,type:N}}var Xp={smoothColors:w.a.MappedStatic("auto",{auto:w.a.Group({}),on:w.a.Group({resolutionFactor:w.a.Numeric(2,{min:.5,max:6,step:.1}),sampleStride:w.a.Numeric(3,{min:1,max:12,step:1})}),off:w.a.Group({})})};function Yp(e,t,r,n){if(("on"===e.smoothColors.name||"auto"===e.smoothColors.name&&t.color.preferSmoothing)&&r&&r<3&&n){var a=3;return"on"===e.smoothColors.name?(r*=e.smoothColors.params.resolutionFactor,a=e.smoothColors.params.sampleStride):(r*=2-Object(Bu.d)(0,1.1,r),(r=Math.max(.5,r))>1.2&&(a=2)),{resolution:r,stride:a,webgl:n}}}function Kp(e){return"group"===e||"groupInstance"===e}function Qp(e,t,r,n,a){if(Kp(e.dColorType.ref.value)){var i=Np({vertexCount:e.uVertexCount.ref.value,instanceCount:e.uInstanceCount.ref.value,groupCount:e.uGroupCount.ref.value,transformBuffer:e.aTransform.ref.value,instanceBuffer:e.aInstance.ref.value,positionBuffer:e.aPosition.ref.value,groupBuffer:e.aGroup.ref.value,colorData:e.tColor.ref.value,colorType:e.dColorType.ref.value,boundingSphere:e.boundingSphere.ref.value,invariantBoundingSphere:e.invariantBoundingSphere.ref.value},t,r,n,a);"volume"===i.kind?(s.e.updateIfChanged(e.dColorType,i.type),s.e.update(e.tColorGrid,i.texture),s.e.update(e.uColorTexDim,i.gridTexDim),s.e.update(e.uColorGridDim,i.gridDim),s.e.update(e.uColorGridTransform,i.gridTransform)):"vertex"===i.kind&&(s.e.updateIfChanged(e.dColorType,i.type),s.e.update(e.tColor,i.texture),s.e.update(e.uColorTexDim,i.texDim))}}function Zp(e,t,r,n,a){if(Kp(e.dColorType.ref.value)){r*=3;var i=Wp({vertexCount:e.uVertexCount.ref.value,instanceCount:e.uInstanceCount.ref.value,groupCount:e.uGroupCount.ref.value,transformBuffer:e.aTransform.ref.value,instanceBuffer:e.aInstance.ref.value,positionTexture:e.tPosition.ref.value,groupTexture:e.tGroup.ref.value,colorData:e.tColor.ref.value,colorType:e.dColorType.ref.value,boundingSphere:e.boundingSphere.ref.value,invariantBoundingSphere:e.invariantBoundingSphere.ref.value},t,r,n,a);s.e.updateIfChanged(e.dColorType,i.type),s.e.update(e.tColorGrid,i.texture),s.e.update(e.uColorTexDim,i.gridTexDim),s.e.update(e.uColorGridDim,i.gridDim),s.e.update(e.uColorGridTransform,i.gridTransform)}}var Jp=Object(n.a)(Object(n.a)(Object(n.a)({},wp),Xp),{ignoreHydrogens:w.a.Boolean(!1),tryUseGpu:w.a.Boolean(!0)}),$p=Object(n.a)(Object(n.a)(Object(n.a)({},Qi.g),Qi.m),Jp),ef=Object(n.a)(Object(n.a)(Object(n.a)({},xo.g),xo.k),Jp);function tf(e){return e.extensions.colorBufferFloat&&e.extensions.textureFloat&&e.extensions.blendMinMax&&e.extensions.drawBuffers}function rf(e,t,r){if(t.resolution>1)return!1;var n=r.maxTextureSize/3,a=Object(eo.l)(e.boundary.box,t.resolution,n*n);return a.areaCells0}}),bf=r(791),vf=r(906),yf=Object(n.a)(Object(n.a)({},xo.i),{background:w.a.Boolean(!0),backgroundMargin:w.a.Numeric(0,{min:0,max:1,step:.01}),backgroundColor:w.a.Color(S.a.black),backgroundOpacity:w.a.Numeric(.5,{min:0,max:1,step:.01}),level:w.a.Select("residue",[["chain","Chain"],["residue","Residue"],["element","Element"]]),chainScale:w.a.Numeric(10,{min:0,max:20,step:.1}),residueScale:w.a.Numeric(1,{min:0,max:20,step:.1}),elementScale:w.a.Numeric(.5,{min:0,max:20,step:.1})});function xf(e){return Object(xo.j)({defaultProps:w.a.getDefaultValues(yf),createGeometry:Of,createLocationIterator:zo.fromStructure,getLoci:Ko,eachLocation:Yo,setUpdateState:function(e,t,r){e.createGeometry=t.level!==r.level||"chain"===t.level&&t.chainScale!==r.chainScale||"residue"===t.level&&t.residueScale!==r.residueScale||"element"===t.level&&t.elementScale!==r.elementScale}},e)}function Of(e,t,r,n,a){switch(n.level){case"chain":return function(e,t,r,n,a){for(var i=y.h.Location.create(t),o=t.units,s=t.serialMapping,u=y.i.chain,c=u.auth_asym_id,l=u.label_asym_id,d=s.cumulativeUnitElementCount,p=o.length,f=n.chainScale,h=bf.a.create(n,p,p/2,a),m=0,g=o.length;m0}});var Af={probeRadius:w.a.Numeric(1.4,{min:0,max:10,step:.1},{description:"Radius of the probe tracing the molecular surface."}),resolution:w.a.Numeric(.5,{min:.01,max:20,step:.01},Object(n.a)({description:"Grid resolution/cell spacing."},b.a.CustomQualityParamInfo)),probePositions:w.a.Numeric(36,{min:12,max:90,step:1},Object(n.a)({description:"Number of positions tested for probe target intersection."},b.a.CustomQualityParamInfo))};w.a.getDefaultValues(Af);function Ef(e,t,r,a,i,o){return Object(n.b)(this,void 0,void 0,(function(){function s(e,t,r,n,a){if(-1!==p){if((s=p)!==n&&s!==a&&u(s,e,t,r))return s;p=-1}for(var i=0,o=_.count;i0&&fe0}}),zf=Object(n.a)(Object(n.a)({},Qi.g),{sizeFactor:w.a.Numeric(1,{min:0,max:2,step:.1}),detail:w.a.Numeric(0,{min:0,max:3,step:1},b.a.CustomQualityParamInfo)});function Uf(e){return Object(Qi.h)({defaultProps:w.a.getDefaultValues(zf),createGeometry:Vf,createLocationIterator:Hf,getLoci:Gf,eachLocation:qf,setUpdateState:function(e,t,r){e.createGeometry=t.sizeFactor!==r.sizeFactor||t.detail!==r.detail}},e)}function Vf(e,t,r,n,a,i){if(!function(e){if(y.n.Traits.is(e.traits,1))return!1;if(y.n.Traits.is(e.traits,2))return!1;if(y.n.isCoarse(e))return!0;if(0===e.elements.length)return!1;e.model.atomicHierarchy.derived.residue.moleculeType;var t=e.residueIndex[e.elements[0]],r=e.model.atomicHierarchy.derived.residue.moleculeType[t];return 3!==r&&2!==r}(t))return Yi.a.createEmpty(i);var o=a.detail,s=a.sizeFactor,u=ko.a.createState(256,128,i),c=t.principalAxes.boxAxes,l=c.origin,d=c.dirA,p=c.dirB,f=ei.a.size(Object(qa.g)(),c);qa.g.scale(f,f,s/2);var h=qa.g.create(f[2],f[1],f[0]);u.currentGroup=0,Object(Qd.a)(u,l,d,p,h,o+1);var m=ko.a.getMesh(u),g=ei.g.expand(Object(ei.g)(),t.boundary.sphere,1*a.sizeFactor);return m.setBoundingSphere(g),m}function Hf(e){var t=e.group,r=e.structure,n=t.units.length,a=y.h.Location.create(r);return Object(Ji.a)(1,n,1,(function(e,r){var n=t.units[r];return a.unit=n,a.element=n.elements[e],a}))}function Gf(e,t,r){var n=e.objectId,a=e.instanceId;if(r===n){var i=t.structure,o=t.group.units[a],s=xt.d.ofBounds(0,o.elements.length);return y.h.Loci(i,[{unit:o,indices:s}])}return T.b}function qf(e,t,r){var n=!1;if(!y.h.Loci.is(e))return!1;var a=t.structure,i=t.group;if(!y.g.areEquivalent(e.structure,a))return!1;for(var o=i.elements.length,s=0,u=e.elements;s0}}),Qf=r(785),Zf=Ka.a.add3,Jf=Ka.a.add;(Yf||(Yf={})).create=function(e,t,r){void 0===e&&(e=2048),void 0===t&&(t=1024);var n=Ka.a.create(Float32Array,3,t,r?r.centerBuffer.ref.value:e),a=Ka.a.create(Float32Array,1,t,r?r.groupBuffer.ref.value:e);return{add:function(e,t,r,i){Zf(n,e,t,r),Jf(a,i)},getPoints:function(){var e=Ka.a.compact(n,!0),t=Ka.a.compact(a,!0);return Qf.a.create(e,t,n.elementCount,r)}}};var $f=Object(n.a)(Object(n.a)({},Qi.i),{pointSizeAttenuation:w.a.Boolean(!0),ignoreHydrogens:w.a.Boolean(!1),traceOnly:w.a.Boolean(!1)});function eh(e,t,r,n,a,i){var o=r.child;if(o&&!o.unitMap.get(t.id))return Qf.a.createEmpty(i);var s=t.elements,u=s.length,c=Yf.create(u,u/10,i),l=Object(qa.g)(),d=t.conformation.invariantPosition,p=Ho(r,t,a);if(p)for(var f=0;f0}}),ih={sizeFactor:w.a.Numeric(.2,{min:0,max:10,step:.01}),detail:w.a.Numeric(0,{min:0,max:3,step:1},b.a.CustomQualityParamInfo),linearSegments:w.a.Numeric(8,{min:1,max:48,step:1},b.a.CustomQualityParamInfo),radialSegments:w.a.Numeric(16,{min:2,max:56,step:2},b.a.CustomQualityParamInfo)},oh=(w.a.getDefaultValues(ih),Object(qa.g)());function sh(e,t,r,n,a,i){var o=t.polymerElements.length;if(!o)return Yi.a.createEmpty(i);for(var s=a.sizeFactor,u=a.detail,c=a.linearSegments,l=a.radialSegments,d=c*l*o+(l+1)*o*2,p=ko.a.createState(d,d/10,i),f=Ku(c),h=f.curvePoints,m=f.normalVectors,g=f.binormalVectors,b=f.widthValues,v=f.heightValues,y=0,x=Eu(t,r,{ignoreSecondaryStructure:!0});x.hasNext;){var O=x.move();p.currentGroup=y;var j=Object(Zi.v)(O.moleculeType)?.3:.5;Qu(f,O,.5,j);var S=O.coarseBackboneFirst||O.first,_=O.coarseBackboneLast||O.last,w=n.size.size(O.centerPrev)*s,C=n.size.size(O.center)*s,A=n.size.size(O.centerNext)*s;lc(f,w,C,A,w,C,A,j);var E=c;if(O.initial){var P=c-(E=Math.max(Math.round(c*j),1));h.copyWithin(0,3*P),g.copyWithin(0,3*P),m.copyWithin(0,3*P),b.copyWithin(0,3*P),v.copyWithin(0,3*P),qa.g.fromArray(oh,h,3),qa.g.normalize(oh,qa.g.sub(oh,O.p2,oh)),qa.g.scaleAndAdd(oh,O.p2,oh,2*C),qa.g.toArray(oh,h,0)}else O.final&&(E=Math.max(Math.round(c*(1-j)),1),qa.g.fromArray(oh,h,3*E-3),qa.g.normalize(oh,qa.g.sub(oh,O.p2,oh)),qa.g.scaleAndAdd(oh,O.p2,oh,2*C),qa.g.toArray(oh,h,3*E));!0===O.initial&&!0===O.final?Object(Mo.a)(p,O.p2,2*C,u):2===l?Ud(p,h,m,g,E,b,v,0):4===l?sd(p,h,m,g,E,b,v,0,S,_):Od(p,h,m,g,E,l,b,v,S,_),++y}var T=ko.a.getMesh(p),I=ei.g.expand(Object(ei.g)(),t.boundary.sphere,1*a.sizeFactor);return T.setBoundingSphere(I),T}var uh=Object(n.a)(Object(n.a)({},Qi.g),ih);function ch(e){return Object(Qi.h)({defaultProps:w.a.getDefaultValues(uh),createGeometry:sh,createLocationIterator:dc.fromGroup,getLoci:gc,eachLocation:xc,setUpdateState:function(e,t,r){e.createGeometry=t.sizeFactor!==r.sizeFactor||t.detail!==r.detail||t.linearSegments!==r.linearSegments||t.radialSegments!==r.radialSegments}},e)}var lh={"polymer-tube":function(e,t){return Object(Jo.a)("Polymer tube mesh",e,t,ch)},"polymer-gap":function(e,t){return Object(Jo.a)("Polymer gap cylinder",e,t,Ml)}},dh=Object(n.a)(Object(n.a)(Object(n.a)({},uh),kl),{sizeFactor:w.a.Numeric(.2,{min:0,max:10,step:.01}),visuals:w.a.MultiSelect(["polymer-tube","polymer-gap"],w.a.objectToOptions(lh))});var ph=Object(es.b)({name:"putty",label:"Putty",description:"Displays a tube smoothly following the trace atoms of polymers.",factory:function(e,t){return He.a.createMulti("Putty",e,t,es.c,lh)},getParams:function(e,t){var r=w.a.clone(dh),n=!1,a=!1;return t.units.forEach((function(e){!n&&y.n.isAtomic(e)&&e.nucleotideElements.length&&(n=!0),!a&&e.gapElements.length&&(a=!0)})),r.visuals.defaultValue=["polymer-tube"],a&&r.visuals.defaultValue.push("polymer-gap"),r},defaultValues:w.a.getDefaultValues(dh),defaultColorTheme:{name:"chain-id"},defaultSizeTheme:{name:"uncertainty"},isApplicable:function(e){return e.polymerResidueCount>0}}),fh={"element-sphere":function(e,t){return Object(Jo.a)("Sphere mesh",e,t,Zo)}},hh=Object(n.a)({},Qo);var mh=Object(es.b)({name:"spacefill",label:"Spacefill",description:"Displays atomic/coarse elements as spheres.",factory:function(e,t){return He.a.createMulti("Spacefill",e,t,es.c,fh)},getParams:function(e,t){var r=w.a.clone(hh);return t.isCoarseGrained&&(r.sizeFactor.defaultValue=2),r},defaultValues:w.a.getDefaultValues(hh),defaultColorTheme:{name:"element-symbol"},defaultSizeTheme:{name:"physical"},isApplicable:function(e){return e.elementCount>0}}),gh=Zi.d.is;function bh(e,t,r,n,a,i){if(!y.n.isAtomic(t))return lf.a.createEmpty(i);var o=r.child,s=null==o?void 0:o.unitMap.get(t.id);if(o&&!s)return lf.a.createEmpty(i);var u=y.h.Location.create(r,t),c=t.elements,l=t.bonds,d=l.edgeCount,p=l.a,f=l.b,h=l.edgeProps,m=l.offset,g=h.order,b=h.flags,v=a.sizeFactor,x=a.aromaticBonds;if(!d)return lf.a.createEmpty(i);var O=Object(qa.g)(),j=t.conformation.invariantPosition,S=t.rings,_=S.elementRingIndices,w=S.elementAromaticRingIndices,C={linkCount:2*d,referencePosition:function(e){var t,r,n=p[e],a=f[e];n>a&&(n=(t=[a,n])[0],a=t[1]),m[n+1]-m[n]==1&&(n=(r=[a,n])[0],a=r[1]);for(var i=_.get(n),o=0,s=m[n],u=m[n+1];so&&(o=h,j(c[l],O))}}return o>0?O:null},position:function(e,t,r){j(c[p[r]],e),j(c[f[r]],t)},style:function(e){var t=g[e],r=b[e];if(gh(r,2)||gh(r,4))return 1;if(3===t)return 3;if(x){var n=p[e],a=f[e],i=w.get(n),o=w.get(a),s=i&&o?Object(Le.b)(i,o):0;if(s||gh(r,16))return 2===s?6:5}return 2===t?2:0},radius:function(e){u.element=c[p[e]];var t=n.size.size(u);u.element=c[f[e]];var r=n.size.size(u);return Math.min(t,r)*v},ignore:io(r,t,a)},A=Object(Ki.e)(e,C,a,i),E=ei.g.expand(Object(ei.g)(),(null!=s?s:t).boundary.sphere,1*v);return A.setBoundingSphere(E),A}var vh=Object(n.a)(Object(n.a)(Object(n.a)({},Qi.e),no),{includeParent:w.a.Boolean(!1)});function yh(e){return Object(Qi.f)({defaultProps:w.a.getDefaultValues(vh),createGeometry:bh,createLocationIterator:Hi.fromGroup,getLoci:so,eachLocation:uo,setUpdateState:function(e,t,r,n,a,i,o){e.createGeometry=t.sizeFactor!==r.sizeFactor||t.linkScale!==r.linkScale||t.linkSpacing!==r.linkSpacing||t.dashCount!==r.dashCount||t.ignoreHydrogens!==r.ignoreHydrogens||!Object(s.f)(t.includeTypes,r.includeTypes)||!Object(s.f)(t.excludeTypes,r.excludeTypes)||t.aromaticBonds!==r.aromaticBonds;var u=i.group.units[0],c=o.group.units[0];y.n.isAtomic(u)&&y.n.isAtomic(c)&&(po.a.areEqual(u.bonds,c.bonds)||(e.createGeometry=!0,e.updateTransform=!0,e.updateColor=!0,e.updateSize=!0))}},e)}var xh=new y.b.ElementBondIterator;function Oh(e,t,r,n){for(xh.setElement(t,r,n);xh.hasNext;){var a=xh.move();return a.otherUnit.conformation.position(a.otherUnit.elements[a.otherIndex],e),e}return null}function jh(e,t,r,n,a){var i=t.interUnitBonds,o=i.edgeCount,u=i.edges,c=n.sizeFactor,l=n.aromaticBonds;if(!o)return lf.a.createEmpty(a);var d=Object(qa.g)(),p=y.h.Location.create(),f={linkCount:o,referencePosition:function(e){var r,n,a,i,o=u[e];if(o.unitAo.unitB))throw new Error("same units in createInterUnitBondLines");r=t.unitMap.get(o.unitB),n=t.unitMap.get(o.unitA),a=o.indexB,i=o.indexA}return Oh(d,t,r,a)||Oh(d,t,n,i)},position:function(e,r,n){var a=u[n],i=t.unitMap.get(a.unitA),o=t.unitMap.get(a.unitB);i.conformation.position(i.elements[a.indexA],e),o.conformation.position(o.elements[a.indexB],r)},style:function(e){var t=u[e].props.order,r=s.a.create(u[e].props.flag);return Zi.d.is(r,2)||Zi.d.is(r,4)?1:3===t?3:l&&Zi.d.is(r,16)?5:2===t?2:0},radius:function(e){var n=u[e];p.structure=t,p.unit=t.unitMap.get(n.unitA),p.element=p.unit.elements[n.indexA];var a=r.size.size(p);p.unit=t.unitMap.get(n.unitB),p.element=p.unit.elements[n.indexB];var i=r.size.size(p);return Math.min(a,i)*c},ignore:oo(t,n)},h=Object(Ki.e)(e,f,n,a),m=t.child,g=ei.g.expand(Object(ei.g)(),(null!=m?m:t).boundary.sphere,1*n.sizeFactor);return h.setBoundingSphere(g),h}var Sh=Object(n.a)(Object(n.a)(Object(n.a)({},xo.e),no),{includeParent:w.a.Boolean(!1)});function _h(e){return Object(xo.f)({defaultProps:w.a.getDefaultValues(Sh),createGeometry:jh,createLocationIterator:Hi.fromStructure,getLoci:co,eachLocation:lo,setUpdateState:function(e,t,r){e.createGeometry=t.sizeFactor!==r.sizeFactor||t.linkScale!==r.linkScale||t.linkSpacing!==r.linkSpacing||t.dashCount!==r.dashCount||t.ignoreHydrogens!==r.ignoreHydrogens||!Object(s.f)(t.includeTypes,r.includeTypes)||!Object(s.f)(t.excludeTypes,r.excludeTypes)}},e)}var wh={"intra-bond":function(e,t){return Object(Jo.a)("Intra-unit bond line",e,t,yh)},"inter-bond":function(e,t){return Object($o.a)("Inter-unit bond line",e,t,_h)}},Ch=Object(n.a)(Object(n.a)(Object(n.a)({},vh),Sh),{includeParent:w.a.Boolean(!1),sizeFactor:w.a.Numeric(1.5,{min:.01,max:10,step:.01}),unitKinds:Object(ts.j)(["atomic"]),visuals:w.a.MultiSelect(["intra-bond","inter-bond"],w.a.objectToOptions(wh))});var Ah=Object(es.b)({name:"line",label:"Line",description:"Displays bonds as lines.",factory:function(e,t){return He.a.createMulti("Line",e,t,es.c,wh)},getParams:function(e,t){return w.a.clone(Ch)},defaultValues:w.a.getDefaultValues(Ch),defaultColorTheme:{name:"element-symbol"},defaultSizeTheme:{name:"uniform"},isApplicable:function(e){return e.elementCount>0},getData:function(e,t){return t.includeParent?e.asParent():e},mustRecreate:function(e,t){return e.includeParent!==t.includeParent}}),Eh=r(748);function Ph(e,t,r,a,i){return Object(n.b)(this,void 0,void 0,(function(){var r,o,s,u,c,l,d,p,f,h,m,g,b;return Object(n.d)(this,(function(n){switch(n.label){case 0:if(r=e.runtime,!(o=e.webgl)||!o.extensions.blendMinMax)throw new Error("GaussianDensityVolume requires `webgl` and `blendMinMax` extension");return s=i?i.gridTexture.ref.value:void 0,[4,Ip(t,a,o,s).runInContext(r)];case 1:return u=n.sent(),c=u.transform,l=u.texture,d=u.bbox,p=u.gridDim,f={min:0,max:1,mean:.04,sigma:.01},h=qa.c.mul(Object(qa.c)(),c,qa.c.fromScaling(Object(qa.c)(),p)),m=qa.c.getScaling(Object(qa.g)(),c),g=Eh.a.create(d,p,c,h,m,l,f,!0,i),b=ei.g.expand(Object(ei.g)(),t.boundary.sphere,a.radiusOffset+Object(eo.i)(t)),g.setBoundingSphere(b),[2,g]}}))}))}var Th=Object(n.a)(Object(n.a)(Object(n.a)({},xo.c),wp),{ignoreHydrogens:w.a.Boolean(!1)});function Ih(e){return Object(xo.d)({defaultProps:w.a.getDefaultValues(Th),createGeometry:Ph,createLocationIterator:zo.fromStructure,getLoci:Ko,eachLocation:Yo,setUpdateState:function(e,t,r){t.resolution!==r.resolution&&(e.createGeometry=!0),t.radiusOffset!==r.radiusOffset&&(e.createGeometry=!0),t.smoothness!==r.smoothness&&(e.createGeometry=!0),t.ignoreHydrogens!==r.ignoreHydrogens&&(e.createGeometry=!0),t.traceOnly!==r.traceOnly&&(e.createGeometry=!0),t.includeParent!==r.includeParent&&(e.createGeometry=!0)},dispose:function(e){e.gridTexture.ref.value.destroy()}},e)}function kh(e,t,r,a,i,o){return Object(n.b)(this,void 0,void 0,(function(){var a,s,u,c,l,d,p,f,h,m,g,b,v;return Object(n.d)(this,(function(n){switch(n.label){case 0:if(a=e.runtime,!(s=e.webgl))throw new Error("GaussianDensityVolume requires `webgl`");return u=o?o.gridTexture.ref.value:void 0,[4,Ep(r,t,i,s,u).runInContext(a)];case 1:return c=n.sent(),l=c.transform,d=c.texture,p=c.bbox,f=c.gridDim,h={min:0,max:1,mean:.04,sigma:.01},m=qa.c.mul(Object(qa.c)(),l,qa.c.fromScaling(Object(qa.c)(),f)),g=qa.c.getScaling(Object(qa.g)(),l),b=Eh.a.create(p,f,l,m,g,d,h,!0,o),v=ei.g.expand(Object(ei.g)(),t.boundary.sphere,i.radiusOffset+Object(eo.k)(t)),b.setBoundingSphere(v),[2,b]}}))}))}var Mh=Object(n.a)(Object(n.a)(Object(n.a)({},Qi.c),wp),{ignoreHydrogens:w.a.Boolean(!1)});function Dh(e){return Object(Qi.d)({defaultProps:w.a.getDefaultValues(Mh),createGeometry:kh,createLocationIterator:zo.fromGroup,getLoci:Xo,eachLocation:Wo,setUpdateState:function(e,t,r){t.resolution!==r.resolution&&(e.createGeometry=!0),t.radiusOffset!==r.radiusOffset&&(e.createGeometry=!0),t.smoothness!==r.smoothness&&(e.createGeometry=!0),t.ignoreHydrogens!==r.ignoreHydrogens&&(e.createGeometry=!0),t.traceOnly!==r.traceOnly&&(e.createGeometry=!0),t.includeParent!==r.includeParent&&(e.createGeometry=!0)},dispose:function(e){e.gridTexture.ref.value.destroy()}},e)}var Rh={"gaussian-volume":function(e,t){return Object(es.a)("Gaussian volume",e,t,Ih)},"units-gaussian-volume":function(e,t){return Object(es.d)("Units-Gaussian volume",e,t,Dh)}},Bh=Object(n.a)(Object(n.a)({},Th),{visuals:w.a.MultiSelect(["gaussian-volume"],w.a.objectToOptions(Rh))});var Lh=Object(es.b)({name:"gaussian-volume",label:"Gaussian Volume",description:"Displays a gaussian molecular density using direct volume rendering.",factory:function(e,t){return He.a.createMulti("Gaussian Volume",e,t,es.c,Rh)},getParams:function(e,t){var r=w.a.clone(Bh);return r.renderMode=Eh.a.createRenderModeParam({min:0,max:1,mean:.04,sigma:.01}),r.jumpLength=w.a.Numeric(4,{min:0,max:20,step:.1}),r},defaultValues:w.a.getDefaultValues(Bh),defaultColorTheme:{name:"chain-id"},defaultSizeTheme:{name:"uniform"},isApplicable:function(e){return e.elementCount>0}}),Nh=r(968),Fh=qa.g.scale,zh=qa.g.add,Uh=qa.g.sub,Vh=Object(n.a)(Object(n.a)(Object(n.a)({},Qi.g),Qi.a),{sizeFactor:w.a.Numeric(.3,{min:0,max:10,step:.01}),radialSegments:w.a.Numeric(16,{min:2,max:56,step:2},b.a.CustomQualityParamInfo),tryUseImpostor:w.a.Boolean(!0)});function Hh(e,t,r,n){return r.tryUseImpostor&&n&&n.extensions.fragDepth?function(e){return Object(Qi.b)({defaultProps:w.a.getDefaultValues(Vh),createGeometry:Gh,createLocationIterator:dc.fromGroup,getLoci:gc,eachLocation:xc,setUpdateState:function(e,t,r){},mustRecreate:function(e,t,r){return!t.tryUseImpostor||!r}},e)}(e):function(e){return Object(Qi.h)({defaultProps:w.a.getDefaultValues(Vh),createGeometry:qh,createLocationIterator:dc.fromGroup,getLoci:gc,eachLocation:xc,setUpdateState:function(e,t,r){e.createGeometry=t.sizeFactor!==r.sizeFactor||t.radialSegments!==r.radialSegments},mustRecreate:function(e,t,r){return t.tryUseImpostor&&!!r}},e)}(e)}function Gh(e,t,r,n,a,i){var o=t.polymerElements.length;if(!o)return fo.a.createEmpty(i);var s=2*o,u=Nh.a.create(s,s/4,i),c=t.conformation.invariantPosition,l=Object(qa.g)(),d=Object(qa.g)(),p=Object(qa.g)();gu(t,(function(e,t,r,n,a){c(e,l),c(t,d);var i=Object(Zi.v)(a)?.3:.5;zh(p,l,Fh(p,Uh(p,d,l),i)),u.add(l[0],l[1],l[2],p[0],p[1],p[2],1,!1,!1,r),u.add(p[0],p[1],p[2],d[0],d[1],d[2],1,!1,!1,n)}));var f=u.getCylinders(),h=ei.g.expand(Object(ei.g)(),t.boundary.sphere,1*a.sizeFactor);return f.setBoundingSphere(h),f}function qh(e,t,r,n,a,i){var o=t.polymerElements.length;if(!o)return Yi.a.createEmpty(i);var s=a.radialSegments,u=a.sizeFactor,c=2*s*o*2,l=ko.a.createState(c,c/10,i),d=t.conformation.invariantPosition,p=Object(qa.g)(),f=Object(qa.g)(),h={radiusTop:1,radiusBottom:1,radialSegments:s},m=y.h.Location.create(r,t),g=y.h.Location.create(r,t);gu(t,(function(e,t,r,a,i){m.element=e,g.element=t,d(m.element,p),d(g.element,f);var o=Object(Zi.v)(i)?.3:.5;h.radiusTop=h.radiusBottom=n.size.size(m)*u,l.currentGroup=r,Object(hu.a)(l,p,f,o,h),h.radiusTop=h.radiusBottom=n.size.size(g)*u,l.currentGroup=a,Object(hu.a)(l,f,p,1-o,h)}));var b=ko.a.getMesh(l),v=ei.g.expand(Object(ei.g)(),t.boundary.sphere,1*a.sizeFactor);return b.setBoundingSphere(v),b}var Wh=Object(n.a)(Object(n.a)(Object(n.a)({},Qi.g),Qi.k),{sizeFactor:w.a.Numeric(.3,{min:0,max:10,step:.01}),detail:w.a.Numeric(0,{min:0,max:3,step:1},b.a.CustomQualityParamInfo),tryUseImpostor:w.a.Boolean(!0)});function Xh(e,t,r,n){return r.tryUseImpostor&&n&&n.extensions.fragDepth?function(e){return Object(Qi.l)({defaultProps:w.a.getDefaultValues(Wh),createGeometry:Yh,createLocationIterator:dc.fromGroup,getLoci:gc,eachLocation:xc,setUpdateState:function(e,t,r){},mustRecreate:function(e,t,r){return!t.tryUseImpostor||!r}},e)}(e):function(e){return Object(Qi.h)({defaultProps:w.a.getDefaultValues(Wh),createGeometry:Kh,createLocationIterator:dc.fromGroup,getLoci:gc,eachLocation:xc,setUpdateState:function(e,t,r){e.createGeometry=t.sizeFactor!==r.sizeFactor||t.detail!==r.detail},mustRecreate:function(e,t,r){return t.tryUseImpostor&&!!r}},e)}(e)}function Yh(e,t,r,n,a,i){var o=t.polymerElements.length;if(!o)return Do.a.createEmpty(i);var s=To.create(o,o/2,i),u=t.conformation.invariantPosition,c=Object(qa.g)();bu(t,(function(e,t){u(e,c),s.add(c[0],c[1],c[2],t)}));var l=s.getSpheres(),d=ei.g.expand(Object(ei.g)(),t.boundary.sphere,1*a.sizeFactor);return l.setBoundingSphere(d),l}function Kh(e,t,r,n,a,i){var o=t.polymerElements.length;if(!o)return Yi.a.createEmpty(i);var s=a.detail,u=a.sizeFactor,c=o*Object(Io.b)(s),l=ko.a.createState(c,c/2,i),d=t.conformation.invariantPosition,p=Object(qa.g)(),f=y.h.Location.create(r,t);bu(t,(function(e,t){f.element=e,d(f.element,p),l.currentGroup=t,Object(Mo.a)(l,p,n.size.size(f)*u,s)}));var h=ko.a.getMesh(l),m=ei.g.expand(Object(ei.g)(),t.boundary.sphere,1*a.sizeFactor);return h.setBoundingSphere(m),h}var Qh={"polymer-backbone-cylinder":function(e,t){return Object(Jo.a)("Polymer backbone cylinder",e,t,Hh)},"polymer-backbone-sphere":function(e,t){return Object(Jo.a)("Polymer backbone sphere",e,t,Xh)},"polymer-gap":function(e,t){return Object(Jo.a)("Polymer gap cylinder",e,t,Ml)}},Zh=Object(n.a)(Object(n.a)(Object(n.a)(Object(n.a)({},Wh),Vh),kl),{sizeAspectRatio:w.a.Numeric(1,{min:.1,max:3,step:.1}),visuals:w.a.MultiSelect(["polymer-backbone-cylinder","polymer-backbone-sphere","polymer-gap"],w.a.objectToOptions(Qh))});var Jh=Object(es.b)({name:"backbone",label:"Backbone",description:"Displays polymer backbone with cylinders and spheres.",factory:function(e,t){return He.a.createMulti("Backbone",e,t,es.c,Qh)},getParams:function(e,t){var r=w.a.clone(Zh),n=!1;return t.units.forEach((function(e){!n&&e.gapElements.length&&(n=!0)})),r.visuals.defaultValue=["polymer-backbone-cylinder","polymer-backbone-sphere"],n&&r.visuals.defaultValue.push("polymer-gap"),r},defaultValues:w.a.getDefaultValues(Zh),defaultColorTheme:{name:"chain-id"},defaultSizeTheme:{name:"uniform"},isApplicable:function(e){return e.polymerResidueCount>0}}),$h=function(e){function t(){var r=e.call(this)||this;return Object(_.c)(t.BuiltIn,(function(e,t){if(e.name!==t)throw new Error("Fix BuiltInStructureRepresentations to have matching names. "+e.name+" "+t);r.add(e)})),r}return Object(n.c)(t,e),t}(He.b);($h||($h={})).BuiltIn={cartoon:Kd,backbone:Jh,"ball-and-stick":as,carbohydrate:fu,ellipsoid:ap,"gaussian-surface":gf,"gaussian-volume":Lh,label:Cf,line:Ah,"molecular-surface":Ff,orientation:Kf,point:ah,putty:ph,spacefill:mh};var em=r(997),tm=r(767),rm=r(807),nm=r(720),am=r(818),im=r(945),om=r(736),sm=function(){function e(e){var t=this;this.plugin=e,this.currentFrame=void 0,this._isAnimating=!1,this.frame=function(){t.tick(Object(hn.b)()),t._isAnimating&&(t.currentFrame=requestAnimationFrame(t.frame))}}return Object.defineProperty(e.prototype,"isAnimating",{get:function(){return this._isAnimating},enumerable:!1,configurable:!0}),e.prototype.tick=function(e,t){var r;return Object(n.b)(this,void 0,void 0,(function(){return Object(n.d)(this,(function(n){switch(n.label){case 0:return[4,this.plugin.managers.animation.tick(e,null==t?void 0:t.isSynchronous)];case 1:return n.sent(),null===(r=this.plugin.canvas3d)||void 0===r||r.tick(e,t),[2]}}))}))},e.prototype.resetTime=function(e){var t;void 0===e&&(e=Object(hn.b)()),null===(t=this.plugin.canvas3d)||void 0===t||t.resetTime(e)},e.prototype.start=function(e){var t;null===(t=this.plugin.canvas3d)||void 0===t||t.resume(),this._isAnimating=!0,this.resetTime(),(null==e?void 0:e.immediate)?this.frame():this.currentFrame=requestAnimationFrame(this.frame)},e.prototype.stop=function(e){var t;this._isAnimating=!1,void 0!==this.currentFrame&&(cancelAnimationFrame(this.currentFrame),this.currentFrame=void 0),(null==e?void 0:e.noDraw)&&(null===(t=this.plugin.canvas3d)||void 0===t||t.pause(null==e?void 0:e.noDraw))},e}(),um=r(651),cm=r(974),lm=function(){function e(e){var t=this;this.plugin=e,this.ev=om.a.create(),this.events={updated:this.ev(),removed:this.ev()},this.root=new Map,this.tracked=new Map,e.state.data.events.object.created.subscribe((function(e){t.addMapping(e.state,e.ref,e.obj)})),e.state.data.events.object.removed.subscribe((function(e){t.removeMapping(e.ref)&&t.events.removed.next({ref:e.ref,obj:e.obj})})),e.state.data.events.object.updated.subscribe((function(e){t.updateMapping(e.state,e.ref,e.oldObj,e.obj)&&t.events.updated.next({ref:e.ref,oldObj:e.oldObj,obj:e.obj})}))}return e.prototype.getDecorator=function(e){var t=this.plugin.state.data.tree,r=t.children.get(e);if(1!==r.size)return e;var n=r.first();return t.transforms.get(n).transformer.definition.isDecorator?this.getDecorator(n):e},e.prototype.get=function(e,t){void 0===t&&(t=!1);var r=this.root.get(e);if(r)return t?this.plugin.state.data.cells.get(r.ref):this.plugin.state.data.cells.get(this.getDecorator(r.ref))},e.prototype.addMapping=function(e,t,r){if(!X.a.Molecule.Structure.is(r))return!1;if(this.tracked.set(t,r.data),this.root.has(r.data)){this.root.get(r.data).count++}else{var n=e.select(A.e.Generators.byRef(t).rootOfType([X.a.Molecule.Structure]))[0];n?this.root.set(r.data,{ref:n.transform.ref,count:1}):this.root.set(r.data,{ref:t,count:1})}return!0},e.prototype.removeMapping=function(e){if(!this.tracked.has(e))return!1;var t=this.tracked.get(e);this.tracked.delete(e);var r=this.root.get(t);return r.count>1?r.count--:this.root.delete(t),!0},e.prototype.updateMapping=function(e,t,r,n){return!!X.a.Molecule.Structure.is(n)&&(this.removeMapping(t),this.addMapping(e,t,n),!0)},e.prototype.dispose=function(){this.ev.dispose()},e}(),dm=r(1003),pm=function(){function e(){this.ev=om.a.create(),this.id=0,this.runningTasks=new Set,this.abortRequests=new Map,this.options=new Map,this.currentContext=[],this.events={progress:this.ev(),finished:this.ev()}}return e.prototype.tryGetAbortTaskId=function(e){if(this.abortRequests.has(e.progress.taskId))return e.progress.taskId;for(var t=0,r=e.children;tu&&(u=f),dl&&(l=d)}if(s>u){var m=s;s=u,u=m}if(c>l){m=c;c=l,l=m}var g=u-s+1,b=l-c+1;s-=e*g,u+=e*g,c-=e*b,l+=e*b;var v={x:Math.max(0,s/n),y:Math.max(0,c/a),width:Math.min(1,(u-s+1)/n),height:Math.min(1,(l-c+1)/a)};this.behaviors.relativeCrop.next(v)},t.prototype.getPreview=function(e){void 0===e&&(e=320);var t=this.getSize(),r=t.width,n=t.height;if(!(r<=0||n<=0)){var a=r/n,i=0,o=0;a>1?(i=e,o=Math.round(e/a)):(o=e,i=Math.round(e*a));var s=this.plugin.canvas3d.props;this.previewPass.setProps({cameraHelper:{axes:this.values.axes},transparentBackground:this.values.transparent,postprocessing:s.postprocessing});var u=this.previewPass.getImageData(i,o),c=this.previewCanvas;c.width=u.width,c.height=u.height,this.previewData.image=u,this.previewData.background=s.renderer.backgroundColor,this.previewData.transparent=this.values.transparent;var l=c.getContext("2d");if(!l)throw new Error("Could not create canvas 2d context");return l.putImageData(u,0,0),this.cropParams.auto&&this.autocrop(),this.events.previewed.next(),{canvas:c,width:i,height:o}}},t.prototype.getSizeAndViewport=function(){var e=this.getSize(),t=e.width,r=e.height,n=this.relativeCrop,a={x:Math.floor(n.x*t),y:Math.floor(n.y*r),width:Math.ceil(n.width*t),height:Math.ceil(n.height*r)};return a.width+a.x>t&&(a.width=t-a.x),a.height+a.y>r&&(a.height=r-a.y),{width:t,height:r,viewport:a}},t.prototype.draw=function(e){return Object(n.b)(this,void 0,void 0,(function(){var t,r,a,i,o,s,u;return Object(n.d)(this,(function(n){switch(n.label){case 0:return t=this.getSizeAndViewport(),r=t.width,a=t.height,i=t.viewport,r<=0||a<=0?[2]:[4,e.update("Rendering image...")];case 1:return n.sent(),o=this.imagePass.getImageData(r,a,i),[4,e.update("Encoding image...")];case 2:if(n.sent(),(s=this.canvas).width=o.width,s.height=o.height,!(u=s.getContext("2d")))throw new Error("Could not create canvas 2d context");return u.putImageData(o,0,0),[2]}}))}))},t.prototype.copyToClipboardTask=function(){var e=this,t=navigator.clipboard;if(null==t?void 0:t.write)return j.b.create("Copy Image",(function(r){return Object(n.b)(e,void 0,void 0,(function(){var e,a;return Object(n.d)(this,(function(n){switch(n.label){case 0:return[4,this.draw(r)];case 1:return n.sent(),[4,r.update("Converting image...")];case 2:return n.sent(),[4,Ua(this.canvas,"png")];case 3:return e=n.sent(),a=new ClipboardItem({"image/png":e}),[4,t.write([a])];case 4:return n.sent(),this.plugin.log.message("Image copied to clipboard."),[2]}}))}))}));this.plugin.log.error("clipboard.write not supported!")},t.prototype.getImageDataUri=function(){var e=this;return this.plugin.runTask(j.b.create("Generate Image",(function(t){return Object(n.b)(e,void 0,void 0,(function(){return Object(n.d)(this,(function(e){switch(e.label){case 0:return[4,this.draw(t)];case 1:return e.sent(),[4,t.update("Converting image...")];case 2:return e.sent(),[2,this.canvas.toDataURL("png")]}}))}))})))},t.prototype.copyToClipboard=function(){var e=this.copyToClipboardTask();if(e)return this.plugin.runTask(e)},t.prototype.downloadTask=function(e){var t=this;return j.b.create("Download Image",(function(r){return Object(n.b)(t,void 0,void 0,(function(){var t;return Object(n.d)(this,(function(n){switch(n.label){case 0:return[4,this.draw(r)];case 1:return n.sent(),[4,r.update("Downloading image...")];case 2:return n.sent(),[4,Ua(this.canvas,"png")];case 3:return t=n.sent(),Object(mm.a)(t,null!=e?e:this.getFilename()),[2]}}))}))}))},t.prototype.download=function(e){this.plugin.runTask(this.downloadTask(e))},t}(C.a),bm=r(971),vm=function(e){function t(t){var r=e.call(this,t)||this;return r.spec=t,r.customParamEditors=new Map,r.initCustomParamEditors(),r}return Object(n.c)(t,e),t.prototype.initCustomParamEditors=function(){if(this.spec.customParamEditors)for(var e=0,t=this.spec.customParamEditors;e0?new Promise((function(e){setTimeout(e,t)})):Promise.resolve()).then(f.waitForRequestsToFinish).then(u)},i.contentDocument.open(),i.contentWindow.XMLHttpRequest=h,i.contentWindow.onerror=function(t){s.push({resourceType:"scriptExecution",msg:t})},i.contentDocument.write(""),i.contentDocument.write(a),i.contentDocument.close()}))}},i=function(t,e,n,o,i){var a,s,c,u,l,f,h,p=Math.max(t.scrollWidth,t.clientWidth),d=Math.max(t.scrollHeight,t.clientHeight);return e?(a=(f=function(t,e){var n=t.querySelector(e);if(n)return n;if(t.ownerDocument.querySelector(e)===t)return t;throw{message:"Clipping selector not found"}}(t,e).getBoundingClientRect()).top,s=f.left,c=f.width,u=f.height):(a=0,s=0,c=p,u=d),h=function(t,e,n,r){return{width:Math.max(t.width*r,e),height:Math.max(t.height*r,n)}}({width:c,height:u},n,o,i),l=r.getComputedStyle(t.ownerDocument.documentElement).fontSize,{left:s,top:a,width:h.width,height:h.height,viewportWidth:p,viewportHeight:d,rootFontSize:l}};o.calculateDocumentContentSize=function(t,e){return new Promise((function(n,o){var a,s=e.zoom||1;a=function(t,e,n){var o=Math.floor(t/n),i=Math.floor(e/n);return function(t,e,n){var r=t.createElement("iframe");return r.style.width=e+"px",r.style.height=n+"px",r.style.visibility="hidden",r.style.position="absolute",r.style.top=-1e4-n+"px",r.style.left=-1e4-e+"px",r.style.borderWidth=0,r.sandbox="allow-same-origin",r.scrolling="no",r}(r.document,o,i)}(e.width,e.height,s),r.document.getElementsByTagName("body")[0].appendChild(a),a.onload=function(){var c,u=a.contentDocument;try{c=i(function(t,e){var n=t.tagName;return e.querySelector(n)}(t,u),e.clip,e.width,e.height,s),n(c)}catch(t){o(t)}finally{r.document.getElementsByTagName("body")[0].removeChild(a)}},a.contentDocument.open(),a.contentDocument.write(""),a.contentDocument.write(function(t){var e=t.tagName.toLowerCase();return"html"===e||"body"===e?t.outerHTML:''+t.outerHTML+""}(t)),a.contentDocument.close()}))},o.parseHtmlFragment=function(t){var e=r.document.implementation.createHTMLDocument("");e.documentElement.innerHTML=t;var n=e.querySelector("body").firstChild;if(!n)throw"Invalid source";return n},o.parseHTML=function(t){var e=r.document.implementation.createHTMLDocument("");return e.documentElement.innerHTML=t,function(t,e){var n,o,i,a,s=/]*)?)>/im.exec(e),c=r.document.implementation.createHTMLDocument("");if(s)for(n="
    ",c.documentElement.innerHTML=n,i=c.querySelector("div"),o=0;o"],{type:"text/xml"}),!0}catch(t){}return!1})()&&t.URL?(s=r(i,!0),a(s).then((function(t){return o(s),!t&&a(r(i,!1)).then((function(t){return t}))}),(function(){return!1}))).then((function(t){e(!t)}),(function(){n()})):e(!1)}))},c=function(t){return(void 0===e&&(e=s()),e).then((function(e){return r(t,e)}))};return n.renderSvg=function(t){return new Promise((function(e,n){var r,i,a=function(){r&&o(r)};(i=new Image).onload=function(){i.onload=null,i.onerror=null,a(),e(i)},i.onerror=function(){a(),n()},c(t).then((function(t){r=t,i.src=r}),n)}))},n}(window),d=function(t,e,n,r){"use strict";var o={},i=function(t){var e=Object.keys(t);return e.length?" "+e.map((function(e){return e+'="'+t[e]+'"'})).join(" "):""},a=function(t,n,o){var a=r.serializeToString(t);e.validateXHTML(a);var s,c,u=function(t){var e,n;return e=Math.round(t.viewportWidth),n=Math.round(t.viewportHeight),{x:-t.left,y:-t.top,width:e,height:n}}(n);return c=(s=u).style||"",s.style=c+"float: left;",function(t){t.externalResourcesRequired=!0}(u),'"+a+""};return o.getSvgForDocument=function(t,e,r){return n.rewriteTagNameSelectorsToLowerCase(t),a(t,e,r)},o.drawDocumentAsSvg=function(t,r){return["hover","active","focus","target"].forEach((function(e){r[e]&&n.fakeUserAction(t,r[e],e)})),e.calculateDocumentContentSize(t,r).then((function(e){return o.getSvgForDocument(t,e,r.zoom)}))},o}(0,h,f,o),g=function(t,e,n,r,o,i){"use strict";var a={},s=function(t){return{message:"Error rendering page",originalError:t}},c=function(t){return o.renderSvg(t).then((function(e){return{image:e,svg:t}}),(function(t){throw s(t)}))},u=function(t,e,n){return r.drawDocumentAsSvg(t,n).then(c).then((function(t){return e&&function(t,e){try{e.getContext("2d").drawImage(t,0,0)}catch(t){throw s(t)}}(t.image,e),t}))};return a.rasterize=function(r,o,a){var s;return(s=t.clone(a)).inlineScripts=!0===a.executeJs,i.inlineReferences(r,s).then((function(t){return a.executeJs?function(t,r){return e.executeJavascript(t,r).then((function(t){var e=t.document;return n.persistInputValues(e),{document:e,errors:t.errors}}))}(r,a).then((function(e){return{element:e.document.documentElement,errors:t.concat(e.errors)}})):{element:r,errors:t}})).then((function(t){return u(t.element,o,a).then((function(e){return{image:e.image,svg:e.svg,errors:t.errors}}))}))},a}(u,h,f,d,p,c),function(t,e,n){"use strict";var r={},o=function(e){var n,r=function(t,e){var n=t?t.width:300,r=t?t.height:200;return{width:void 0!==e.width?e.width:n,height:void 0!==e.height?e.height:r}}(e.canvas,e.options);return(n=t.clone(e.options)).width=r.width,n.height=r.height,n};r.drawDocument=function(){var e=arguments[0],r=Array.prototype.slice.call(arguments,1),i=t.parseOptionalParameters(r),a=e.documentElement?e.documentElement:e;return n.rasterize(a,i.canvas,o(i))};var i=function(t,n,o){var i=e.parseHTML(t);return r.drawDocument(i,n,o)};r.drawHTML=function(){var e=arguments[0],n=Array.prototype.slice.call(arguments,1),r=t.parseOptionalParameters(n);return i(e,r.canvas,r.options)};var a=function(n,o,i){return e.loadDocument(n,i).then((function(e){var a=function(e,n,r){var o=document.implementation.createHTMLDocument("");o.replaceChild(e.documentElement,o.documentElement);var i=r?t.clone(r):{};return r.baseUrl||(i.baseUrl=n),{document:o,options:i}}(e,n,i);return r.drawDocument(a.document,o,a.options)}))};return r.drawURL=function(){var e=arguments[0],n=Array.prototype.slice.call(arguments,1),r=t.parseOptionalParameters(n);return a(e,r.canvas,r.options)},r}(u,h,g));var o,s,c,u,l,f,h,p,d,g}.apply(e,r))||(t.exports=o)},1035:function(t,e,n){(function(t,r){var o;function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)} +/*! https://mths.be/punycode v1.4.1 by @mathias */!function(a){var s="object"==i(e)&&e&&!e.nodeType&&e,c="object"==i(t)&&t&&!t.nodeType&&t,u="object"==(void 0===r?"undefined":i(r))&&r;u.global!==u&&u.window!==u&&u.self!==u||(a=u);var l,f,h=2147483647,p=/^xn--/,d=/[^\x20-\x7E]/,g=/[\x2E\u3002\uFF0E\uFF61]/g,y={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},m=Math.floor,v=String.fromCharCode;function b(t){throw new RangeError(y[t])}function _(t,e){for(var n=t.length,r=[];n--;)r[n]=e(t[n]);return r}function w(t,e){var n=t.split("@"),r="";return n.length>1&&(r=n[0]+"@",t=n[1]),r+_((t=t.replace(g,".")).split("."),e).join(".")}function S(t){for(var e,n,r=[],o=0,i=t.length;o=55296&&e<=56319&&o65535&&(e+=v((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=v(t)})).join("")}function E(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function x(t,e,n){var r=0;for(t=n?m(t/700):t>>1,t+=m(t/e);t>455;r+=36)t=m(t/35);return m(r+36*t/(t+38))}function A(t){var e,n,r,o,i,a,s,c,u,l,f,p=[],d=t.length,g=0,y=128,v=72;for((n=t.lastIndexOf("-"))<0&&(n=0),r=0;r=128&&b("not-basic"),p.push(t.charCodeAt(r));for(o=n>0?n+1:0;o=d&&b("invalid-input"),((c=(f=t.charCodeAt(o++))-48<10?f-22:f-65<26?f-65:f-97<26?f-97:36)>=36||c>m((h-g)/a))&&b("overflow"),g+=c*a,!(c<(u=s<=v?1:s>=v+26?26:s-v));s+=36)a>m(h/(l=36-u))&&b("overflow"),a*=l;v=x(g-i,e=p.length+1,0==i),m(g/e)>h-y&&b("overflow"),y+=m(g/e),g%=e,p.splice(g++,0,y)}return O(p)}function k(t){var e,n,r,o,i,a,s,c,u,l,f,p,d,g,y,_=[];for(p=(t=S(t)).length,e=128,n=0,i=72,a=0;a=e&&fm((h-n)/(d=r+1))&&b("overflow"),n+=(s-e)*d,e=s,a=0;ah&&b("overflow"),f==e){for(c=n,u=36;!(c<(l=u<=i?1:u>=i+26?26:u-i));u+=36)y=c-l,g=36-l,_.push(v(E(l+y%g,0))),c=m(y/g);_.push(v(E(c,0))),i=x(n,d,r==o),n=0,++r}++n,++e}return _.join("")}if(l={version:"1.4.1",ucs2:{decode:S,encode:O},decode:A,encode:k,toASCII:function(t){return w(t,(function(t){return d.test(t)?"xn--"+k(t):t}))},toUnicode:function(t){return w(t,(function(t){return p.test(t)?A(t.slice(4).toLowerCase()):t}))}},"object"==i(n(938))&&n(938))void 0===(o=function(){return l}.call(e,n,e,t))||(t.exports=o);else if(s&&c)if(t.exports==s)c.exports=l;else for(f in l)l.hasOwnProperty(f)&&(s[f]=l[f]);else a.punycode=l}(this)}).call(this,n(158)(t),n(112))},1036:function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}t.exports={isString:function(t){return"string"==typeof t},isObject:function(t){return"object"===r(t)&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}}},1037:function(t,e,n){"use strict";e.decode=e.parse=n(1038),e.encode=e.stringify=n(1039)},1038:function(t,e,n){"use strict";function r(t,e){return Object.prototype.hasOwnProperty.call(t,e)}t.exports=function(t,e,n,i){e=e||"&",n=n||"=";var a={};if("string"!=typeof t||0===t.length)return a;var s=/\+/g;t=t.split(e);var c=1e3;i&&"number"==typeof i.maxKeys&&(c=i.maxKeys);var u=t.length;c>0&&u>c&&(u=c);for(var l=0;l=0?(f=g.substr(0,y),h=g.substr(y+1)):(f=g,h=""),p=decodeURIComponent(f),d=decodeURIComponent(h),r(a,p)?o(a[p])?a[p].push(d):a[p]=[a[p],d]:a[p]=d}return a};var o=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},1039:function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=function(t){switch(r(t)){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};t.exports=function(t,e,n,c){return e=e||"&",n=n||"=",null===t&&(t=void 0),"object"===r(t)?a(s(t),(function(r){var s=encodeURIComponent(o(r))+n;return i(t[r])?a(t[r],(function(t){return s+encodeURIComponent(o(t))})).join(e):s+encodeURIComponent(o(t[r]))})).join(e):c?encodeURIComponent(o(c))+n+encodeURIComponent(o(t)):""};var i=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function a(t,e){if(t.map)return t.map(e);for(var n=[],r=0;r=0||!e&&t.namespaceURI===t.parentNode.namespaceURI?"":' xmlns="'+t.namespaceURI+'"'}(n,r),Array.prototype.forEach.call(n.attributes||n.attrs,(function(t){o+=function(t){var e=t.value;return" "+t.name+'="'+function(t){return t.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}(e)+'"'}(t)})),n.childNodes.length>0?(o+=">",o+=e(n),o+=""):o+="/>",o},r=function(t,r){var o=r&&r.rootNode;return"#document"===t.nodeName||"#document-fragment"===t.nodeName?e(t):t.tagName?n(t,o):"#text"===t.nodeName?function(t){var e=t.nodeValue||t.value||"";return e.replace(/&/g,"&").replace(//g,">")}(t):"#comment"===t.nodeName?function(t){return"\x3c!--"+t.data.replace(/-/g,"-")+"--\x3e"}(t):"#cdata-section"===t.nodeName?function(t){return""}(t):void 0};return{serializeToString:function(t){return r(t,{rootNode:!0}).replace(/[\x00-\x08\x0B\x0C\x0E-\x1F]/g,"")}}})?r.apply(e,o):r)||(t.exports=i)},1041:function(t,e,n){"use strict";var r=[new RegExp("^]*>This page contains the following errors:]*>(.+?)\n?"),new RegExp("^(.+)\n")],o=function(t){var e,n,o,i,a=(e=t,n=new XMLSerializer,Array.prototype.map.call(e.childNodes,(function(t){return n.serializeToString(t)})).join(""));for(o=0;o0&&"parsererror"===t.documentElement.childNodes[0].nodeName?t.documentElement.childNodes[0]:"html"===t.documentElement.tagName&&t.documentElement.childNodes&&t.documentElement.childNodes.length>0&&"body"===t.documentElement.childNodes[0].nodeName&&t.documentElement.childNodes[0].childNodes&&t.documentElement.childNodes[0].childNodes.length&&"parsererror"===t.documentElement.childNodes[0].childNodes[0].nodeName?t.documentElement.childNodes[0].childNodes[0]:void 0}(t);if(void 0!==n)throw e=o(n)||"Parse error",new Error(e)}(t),t}},1042:function(t,e,n){"use strict";var r=n(814),o=n(1043),i=n(1044),a=n(1045),s=n(872),c=function(t){return t.map((function(e,n){var o;return n===t.length-1&&(e={baseUrl:(o=e.baseUrl,r.joinUrl(o,"."))}),JSON.stringify(e)}))},u=function(t,e){return!1!==e.cache&&"none"!==e.cache&&e.cacheBucket?r.memoize(t,c,e.cacheBucket):t},l=function(t,e,n){var r=s.rulesForCssText(t);return a.loadCSSImportsForRules(r,e,n).then((function(e){return a.loadAndInlineCSSResourcesForRules(r,n).then((function(n){var o=e.errors.concat(n.errors),i=e.hasChanges||n.hasChanges;return i&&(t=s.cssRulesToText(r)),{hasChanges:i,content:t,errors:o}}))}))};e.loadAndInlineStyles=function(t,e){var n,o=function(t){var e=t.getElementsByTagName("style");return Array.prototype.filter.call(e,(function(t){return!t.attributes.type||"text/css"===t.attributes.type.value}))}(t),i=[],a=[];return(n=r.clone(e)).baseUrl=n.baseUrl||r.getDocumentBaseUrl(t),Promise.all(o.map((function(t){return function(t,e,n){var o=t.textContent;return u(l,e)(o,n,e).then((function(e){return e.hasChanges&&(t.childNodes[0].nodeValue=e.content),r.cloneArray(e.errors)}))}(t,n,a).then((function(t){i=i.concat(t)}))}))).then((function(){return i}))};var f=function(t,e){return r.ajax(t,e).then((function(t){return{content:t,cssRules:s.rulesForCssText(t)}})).then((function(e){var n=a.adjustPathsOfCssResources(t,e.cssRules);return{content:e.content,cssRules:e.cssRules,hasChanges:n}})).then((function(t){return a.loadCSSImportsForRules(t.cssRules,[],e).then((function(e){return{content:t.content,cssRules:t.cssRules,hasChanges:t.hasChanges||e.hasChanges,errors:e.errors}}))})).then((function(t){return a.loadAndInlineCSSResourcesForRules(t.cssRules,e).then((function(e){return{content:t.content,cssRules:t.cssRules,hasChanges:t.hasChanges||e.hasChanges,errors:t.errors.concat(e.errors)}}))})).then((function(t){var e=t.content;return t.hasChanges&&(e=s.cssRulesToText(t.cssRules)),{content:e,errors:t.errors}}))};e.loadAndInlineCssLinks=function(t,e){var n=function(t){var e=t.getElementsByTagName("link");return Array.prototype.filter.call(e,(function(t){return t.attributes.rel&&"stylesheet"===t.attributes.rel.value&&(!t.attributes.type||"text/css"===t.attributes.type.value)}))}(t),o=[];return Promise.all(n.map((function(t){return function(t,e){var n=t.attributes.href.value,o=r.getDocumentBaseUrl(t.ownerDocument),i=r.clone(e);return!i.baseUrl&&o&&(i.baseUrl=o),u(f,e)(n,i).then((function(t){return{content:t.content,errors:r.cloneArray(t.errors)}}))}(t,e).then((function(e){var n,r,i,a;n=t,r=e.content+"\n",a=n.parentNode,(r=r.trim())&&((i=n.ownerDocument.createElement("style")).type="text/css",i.appendChild(n.ownerDocument.createTextNode(r)),a.insertBefore(i,n)),a.removeChild(n),o=o.concat(e.errors)}),(function(t){o.push({resourceType:"stylesheet",url:t.url,msg:"Unable to load stylesheet "+t.url})}))}))).then((function(){return o}))},e.loadAndInlineImages=o.inline,e.loadAndInlineScript=i.inline,e.inlineReferences=function(t,n){var r=[],o=[e.loadAndInlineImages,e.loadAndInlineStyles,e.loadAndInlineCssLinks];return!1!==n.inlineScripts&&o.push(e.loadAndInlineScript),Promise.all(o.map((function(e){return e(t,n).then((function(t){r=r.concat(t)}))}))).then((function(){return r}))}},1043:function(t,e,n){"use strict";var r=n(814),o=function(t){return Array.prototype.slice.call(t)};e.inline=function(t,e){var n,i=o(t.getElementsByTagName("img")),a=o(t.getElementsByTagName("image")),s=(n=t.getElementsByTagName("input"),Array.prototype.filter.call(n,(function(t){return"image"===t.type}))),c=function(t){return t.filter((function(t){var e=null;return t.hasAttribute("src")?e=t.getAttribute("src"):t.hasAttributeNS("http://www.w3.org/1999/xlink","href")?e=t.getAttributeNS("http://www.w3.org/1999/xlink","href"):t.hasAttribute("href")&&(e=t.getAttribute("href")),null!==e&&!r.isDataUri(e)}))}(i=(i=i.concat(a)).concat(s));return r.collectAndReportErrors(c.map((function(t){return function(t,e){var n=null;t.hasAttribute("src")?n=t.getAttribute("src"):t.hasAttributeNS("http://www.w3.org/1999/xlink","href")?n=t.getAttributeNS("http://www.w3.org/1999/xlink","href"):t.hasAttribute("href")&&(n=t.getAttribute("href"));var o=r.getDocumentBaseUrl(t.ownerDocument),i=r.clone(e);return!i.baseUrl&&o&&(i.baseUrl=o),r.getDataURIForImageURL(n,i).then((function(t){return t}),(function(t){throw{resourceType:"image",url:t.url,msg:"Unable to load image "+t.url}}))}(t,e).then((function(e){t.attributes.src?t.attributes.src.value=e:t.attributes["xlink:href"]?t.attributes["xlink:href"].value=e:t.attributes.href&&(t.attributes.href.value=e)}))})))}},1044:function(t,e,n){"use strict";var r=n(814);e.inline=function(t,e){var n=function(t){var e=t.getElementsByTagName("script");return Array.prototype.filter.call(e,(function(t){return!!t.attributes.src}))}(t);return r.collectAndReportErrors(n.map((function(t){return function(t,e){var n=t.attributes.src.value,o=r.getDocumentBaseUrl(t.ownerDocument),i=r.clone(e);return!i.baseUrl&&o&&(i.baseUrl=o),r.ajax(n,i).catch((function(t){throw{resourceType:"script",url:t.url,msg:"Unable to load script "+t.url}}))}(t,e).then((function(e){!function(t,e){t.attributes.removeNamedItem("src"),t.textContent=e.replace(/<\//g,"<\\/")}(t,e)}))})))}},1045:function(t,e,n){"use strict";var r=n(814),o=n(872),i=n(1046),a=n(1047),s=function(t,e,n){t.style.setProperty(e,n,t.style.getPropertyPriority(e))},c=function(t){return t.filter((function(t){return t.type===window.CSSRule.STYLE_RULE&&(t.style.getPropertyValue("background-image")||t.style.getPropertyValue("background"))}))},u=function(t){var e=[];return t.forEach((function(t){t.style.getPropertyValue("background-image")?e.push({property:"background-image",value:t.style.getPropertyValue("background-image"),rule:t}):t.style.getPropertyValue("background")&&e.push({property:"background",value:t.style.getPropertyValue("background"),rule:t})})),e},l=function(t){return t.filter((function(t){return t.type===window.CSSRule.FONT_FACE_RULE&&t.style.getPropertyValue("src")}))},f=function(t){return t.filter((function(t){return t.type===window.CSSRule.IMPORT_RULE&&t.href}))},h=function(t){var e=[];return t.forEach((function(t,n){t.url&&!r.isDataUri(t.url)&&e.push(n)})),e},p=function(t){var e=[];return t.forEach((function(t,n){t.url&&!r.isDataUri(t.url)&&e.push(n)})),e};e.adjustPathsOfCssResources=function(t,e){var n=c(e),d=u(n),g=!1;return d.forEach((function(e){var n,o=i.parse(e.value),a=h(o);a.length>0&&(a.forEach((function(e){var n=o[e].url,i=r.joinUrl(t,n);o[e].url=i})),n=i.serialize(o),s(e.rule,e.property,n),g=!0)})),l(e).forEach((function(n){var i,s,c=n.style.getPropertyValue("src");try{i=a.parse(c)}catch(t){return}(s=p(i)).length>0&&(s.forEach((function(e){var n=i[e].url,o=r.joinUrl(t,n);i[e].url=o})),o.changeFontFaceRuleSrc(e,n,a.serialize(i)),g=!0)})),f(e).forEach((function(n){var i=n.href,a=r.joinUrl(t,i);o.exchangeRule(e,n,"@import url("+a+");"),g=!0})),g};var d=function(t,e,n){var r=t.indexOf(e);t.splice(r,1),n.forEach((function(e,n){t.splice(r+n,0,e)}))};e.loadCSSImportsForRules=function(t,n,i){var a=f(t),s=[],c=!1;return Promise.all(a.map((function(a){return function(t,n,i,a){var s,c=n.href;return c=o.unquoteString(c),s=r.joinUrl(a.baseUrl,c),i.indexOf(s)>=0?(d(t,n,[]),Promise.resolve([])):(i.push(s),r.ajax(c,a).then((function(r){var s=o.rulesForCssText(r);return e.loadCSSImportsForRules(s,i,a).then((function(r){return e.adjustPathsOfCssResources(c,s),d(t,n,s),r.errors}))}),(function(t){throw{resourceType:"stylesheet",url:t.url,msg:"Unable to load stylesheet "+t.url}})))}(t,a,n,i).then((function(t){s=s.concat(t),c=!0}),(function(t){s.push(t)}))}))).then((function(){return{hasChanges:c,errors:s}}))};var g=function(t,e){var n=c(t),o=u(n),a=[],l=!1;return Promise.all(o.map((function(t){return function(t,e){var n=i.parse(t),o=h(n),a=!1;return r.collectAndReportErrors(o.map((function(t){var o=n[t].url;return r.getDataURIForImageURL(o,e).then((function(e){n[t].url=e,a=!0}),(function(t){throw{resourceType:"backgroundImage",url:t.url,msg:"Unable to load background-image "+t.url}}))}))).then((function(t){return{backgroundValue:i.serialize(n),hasChanges:a,errors:t}}))}(t.value,e).then((function(e){e.hasChanges&&(s(t.rule,t.property,e.backgroundValue),l=!0),a=a.concat(e.errors)}))}))).then((function(){return{hasChanges:l,errors:a}}))},y=function(t,e){var n=l(t),i=[],s=!1;return Promise.all(n.map((function(n){return function(t,e){var n,o,i=!1;try{n=a.parse(t)}catch(t){n=[]}return o=p(n),r.collectAndReportErrors(o.map((function(t){var o=n[t],a=o.format||"woff";return r.binaryAjax(o.url,e).then((function(t){var e=btoa(t);o.url="data:font/"+a+";base64,"+e,i=!0}),(function(t){throw{resourceType:"fontFace",url:t.url,msg:"Unable to load font-face "+t.url}}))}))).then((function(t){return{srcDeclarationValue:a.serialize(n),hasChanges:i,errors:t}}))}(n.style.getPropertyValue("src"),e).then((function(e){e.hasChanges&&(o.changeFontFaceRuleSrc(t,n,e.srcDeclarationValue),s=!0),i=i.concat(e.errors)}))}))).then((function(){return{hasChanges:s,errors:i}}))};e.loadAndInlineCSSResourcesForRules=function(t,e){var n=!1,r=[];return Promise.all([g,y].map((function(o){return o(t,e).then((function(t){n=n||t.hasChanges,r=r.concat(t.errors)}))}))).then((function(){return{hasChanges:n,errors:r}}))}},1046:function(t,e,n){"use strict";var r=n(872);e.extractCssUrl=function(t){var e,n=/^url\(("[^"]+"|'[^']+'|[^\)]+)\)/;if(!n.test(t))throw new Error("Invalid url");return e=n.exec(t)[1],r.unquoteString(e.replace(/^[\t\r\f\n ]*(.+?)[\t\r\f\n ]*$/,"$1"))};e.parse=function(t){return function(t){var e,n="(url\\(\\s*(?:\"[^\"]*\"|'[^']*'|[^\\(]+)\\s*\\)|[^,\\s]+)",r=new RegExp("(?:\\s*(url\\(\\s*(?:\"[^\"]*\"|'[^']*'|[^\\(]+)\\s*\\)|[^,\\s]+))+","g"),o=[],i=function(t){var e,r=new RegExp(n,"g"),o=[];for(e=r.exec(t);e;)o.push(e[1]),e=r.exec(t);return o};if(t.match(new RegExp("^\\s*((?:\\s*(url\\(\\s*(?:\"[^\"]*\"|'[^']*'|[^\\(]+)\\s*\\)|[^,\\s]+))+)(?:\\s*,\\s*((?:\\s*(url\\(\\s*(?:\"[^\"]*\"|'[^']*'|[^\\(]+)\\s*\\)|[^,\\s]+))+))*\\s*$"))){for(e=r.exec(t);e;)o.push(i(e[0])),e=r.exec(t);return o}return[]}(t).map((function(t){var n=function(t){var n;for(n=0;n0){for(e=1,r=1;eb&&(b=m,_=[]),_.push(t))}function A(t,e,n){return new r(r.buildMessage(t,e),t,e,n)}function k(){var t,n;return(t=function t(){var n,r,o,a,s,u;if(n=m,(r=j())!==i){for(o=[],a=R();a!==i;)o.push(a),a=R();if(o!==i)if(44===e.charCodeAt(m)?(a=",",m++):(a=i,x(c)),a!==i){for(s=[],u=R();u!==i;)s.push(u),u=R();s!==i&&(u=t())!==i?(r=[r].concat(u),n=r):(m=n,n=i)}else m=n,n=i;else m=n,n=i}else m=n,n=i;return n===i&&(n=m,(r=j())!==i&&(r=[r]),n=r),n}())===i&&(t=m,(n="")!==i&&(n=[]),t=n),t}function j(){var t;return(t=function(){var t,n,r,o;if(t=m,(n=P())!==i){if(r=[],(o=R())!==i)for(;o!==i;)r.push(o),o=R();else r=i;r!==i&&(o=function(){var t,n,r,o;return t=m,"format("===e.substr(m,7)?(n="format(",m+=7):(n=i,x(f)),n!==i&&(r=C())!==i?(41===e.charCodeAt(m)?(o=")",m++):(o=i,x(l)),o!==i?t=n=r:(m=t,t=i)):(m=t,t=i),t}())!==i?t=n={url:n,format:o}:(m=t,t=i)}else m=t,t=i;return t===i&&(t=m,(n=P())!==i&&(n=function(t){return{url:t}}(n)),t=n),t}())===i&&(t=function(){var t,n,r,o;return t=m,"local("===e.substr(m,6)?(n="local(",m+=6):(n=i,x(h)),n!==i&&(r=C())!==i?(41===e.charCodeAt(m)?(o=")",m++):(o=i,x(l)),o!==i?t=n={local:r}:(m=t,t=i)):(m=t,t=i),t}()),t}function P(){var t,n,r,o;return t=m,"url("===e.substr(m,4)?(n="url(",m+=4):(n=i,x(u)),n!==i&&(r=C())!==i?(41===e.charCodeAt(m)?(o=")",m++):(o=i,x(l)),o!==i?t=n=r:(m=t,t=i)):(m=t,t=i),t}function C(){var t,n,r;if(m,t=[],p.test(e.charAt(m))?(n=e.charAt(m),m++):(n=i,x(d)),n!==i)for(;n!==i;)t.push(n),p.test(e.charAt(m))?(n=e.charAt(m),m++):(n=i,x(d));else t=i;return t!==i&&(r=t,t=T.extractValue(r.join(""))),t}function R(){var t;return g.test(e.charAt(m))?(t=e.charAt(m),m++):(t=i,x(y)),t}var T=t("../util");if((o=s())!==i&&m===e.length)return o;throw o!==i&&mprotvista-manager\n

    Published on NPM

    \n

    It is a container for all the tracks and other inner components (e.g. protvista-navigation).

    \n

    This component is in charge of capturing the events that its protvista descendent trigger, and adjust element attributes accordingly.

    \n

    A protvista descendent is any element in its subtree which tag name starts with 'protvista'.

    \n

    The children should fire events of the type change, and the detail object should contain the attributes type and value.

    \n

    Additionally, there are a set of pre-defined attributes which can be used with this component and will be propagated to descendents: displaystart, displayend, highlight and length. This is useful if you want to control things like zoom level from outside, for instance directly from your application.

    \n

    See it running Here.

    \n

    Usage

    \n
    <protvista-manager attributes="attr1 attr2"></protvista-manager>
    \n

    Here is an example of how the child components should fire the events:

    \n
    this.dispatchEvent(\n  new CustomEvent("change", {\n    detail: {\n      value: "New value",\n      type: "attr1",\n    },\n  })\n);
    \n

    API Reference

    \n

    Properties

    \n

    Attributes

    \n

    attributes: string

    \n

    displaystart?: number

    \n

    displayend?: number

    \n

    highlight?: start:end,start:end,...

    \n

    length?: number

    \n

    List of attributes that this component will be propagating.

    \n'},173:function(t,e,n){"use strict";n.r(e);var r,o,i=n(0),a=n.n(i),s=n(701),c=n(629),u=n(620),l=n(603),f=n(700),h=n(734),p=n(861),d=n(803),g=n(870),y=n(745),m=n(918),v=n(868),b=n.n(v),_=n(859),w=n(111),S=n(1032),O=n(1033),E=n(860),x=n(813),A=n(871),k=n(1034),j=n(28);function P(t){return(P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function C(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}function R(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function T(t,e){for(var n=0;n\n
    \n Use [CTRL] + scroll to zoom\n
    \n ')}this.innerHTML=e,this.overlay=this.getElementsByTagName("div")[0],this.ticking=!1,document.addEventListener("mouseover",(function(e){var r=e.pageX,o=e.pageY,i=n.getBoundingClientRect(),a=i.height,s=i.width,c=t.getOffsetTop(n),u=t.getOffsetLeft(n);r>u&&rc&&othis._length&&(r-=n-this._length),this._displaystart\n button {\n display: inline-block;\n border: none;\n padding: var(--button-padding-v, 0.5rem) var(--button-padding-h, 1rem);\n margin: var(--button-margin-v, 0) var(--button-margin-h, 0);\n text-decoration: none;\n background: var(--button-background, #d3d3d3);\n color: var(--button-text-color);\n font-family: var(--button-font-family, sans-serif);\n font-size: var(--button-font-size, 1rem);\n border-radius: var(--button-border-radius, 0);\n cursor: pointer;\n text-align: center;\n transition: var(\n --button-transition,\n background 250ms ease-in-out,\n transform 150ms ease\n );\n -webkit-appearance: none;\n -moz-appearance: none;\n }\n\n button:hover,\n button:focus {\n background: var(--button-background-focus);\n }\n \n \n \n ',"\n "])),(function(){return t.zoom("zoom-out")}),(function(){return t.zoom("zoom-in")}),this._zoomToSeq?Object(j.a)(Z||(Z=tt(["\n \n '])),(function(){return t.zoom("zoom-in-seq")})):"");Object(j.b)(e,this.shadowRoot)}}])&&et(r.prototype,o),i&&et(r,i),s}(rt(HTMLElement)),ut=n(35),lt=n(1048),ft=n.n(lt);function ht(t){return(ht="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function pt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function dt(t,e){for(var n=0;nt.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&void 0!==arguments[0]?arguments[0]:{},n=e.min,r=void 0===n?-1/0:n,o=e.max,a=void 0===o?1/0:o;i(this,t),this.segments=[],this.max=a,this.min=r,this.regionString=null}var e,n,o;return e=t,(n=[{key:"encode",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.segments.map((function(n){var r=n.start,o=n.end,i=n.color;if(e)return"".concat(r,":").concat(o).concat(i?":".concat(i):"");var a=r===t.min?"":r,s=o===t.max?"":o;return"".concat(a,":").concat(s).concat(i?":".concat(i):"")})).join(",")}},{key:"decode",value:function(t){var e=this;void 0!==t&&(this.regionString=t),this.regionString?this.segments=this.regionString.split(",").map((function(t){var n=r(t.split(":"),4),o=n[0],i=n[1],a=n[2];if(void 0!==n[3])throw new Error("there should be at most 2 ':' per region. Region: ".concat(t));var s=o?Number(o):e.min,c=i?Number(i):e.max,u=""!==a?a:void 0;if(s>c){var l=[c,s];s=l[0],c=l[1]}if(se.max&&(c=e.max),Number.isNaN(s))throw new Error("The parsed value of ".concat(o," is NaN. Region: ").concat(t));if(Number.isNaN(c))throw new Error("The parsed value of ".concat(i," is NaN. Region: ").concat(t));if(u&&!u.match(/^#[0-9a-f]{6,8}$/i))throw new Error("The parsed value of ".concat(a," is not a color in hex format. Region: ").concat(t));return{start:s,end:c,color:u}})):this.segments=[]}}])&&a(e.prototype,n),o&&a(e,o),t}();function c(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:400;p(this,t),this.element=e,this.timeStampWheelOutside=0,this.resetScrollableTimeout=null,this.scrollDelay=n}var e,n,r;return e=t,(n=[{key:"setElementScrollable",value:function(t){this.element.setAttribute("scrollable",t)}},{key:"startResetScrollableTimer",value:function(){var t=this;this.resetScrollableTimeout&&clearTimeout(this.resetScrollableTimeout),this.resetScrollableTimeout=setTimeout((function(){t.setElementScrollable(!0),t.resetScrollableTimeout=null}),this.scrollDelay)}},{key:"blockScroll",value:function(t){this.timeStampWheelOutside=t,this.setElementScrollable(!1),this.startResetScrollableTimer()}},{key:"wheel",value:function(t){var e=t.target,n=t.timeStamp;this.element.contains(e)?n=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function v(t){return function(t){if(Array.isArray(t))return _(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||b(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(t,e){if(t){if("string"==typeof t)return _(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_(t,e):void 0}}function _(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&void 0!==arguments[0]?arguments[0]:null,e=[],n=[];if(null!==t&&"string"!=typeof t)throw new Error("The attribute text has to be of type string");if(t&&""!==t.trim()){var r=t.split(",").map((function(t){return t.split(":")}));if(r.length<2)throw new Error("There should be at least 2 points to create a scale");e=r.map((function(t){var e=t[0].trim().toUpperCase();if(!f(e))throw new Error("The color '".concat(e," is not valid'"));return e})),n=r.map((function(t,e){var n=parseFloat(t[1]);if(Number.isNaN(n))throw new Error("The second part of every point should be a number. Error in point ".concat(e,": ").concat(t));return n}))}return{range:e,domain:n}},D=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.keyFormatter,r=void 0===n?h:n,o=e.valueFormatter,i=void 0===o?h:o;if(null!==t&&"string"!=typeof t)throw new Error("The attribute text has to be of type string");if(t&&""!==t.trim()){var a=t.split(",").map((function(t){return t.split(":")})),s={};return a.forEach((function(t){if(2!==t.length)throw new Error("Bad block: ".concat(t.join(":"),"\n The blocks of the string should follow the format KEY:VALUE"));s[r(t[0])]=i(t[1])})),s}return{}},M=g,N=function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{initialValue:{top:0,bottom:0,left:0,right:0}},r=function(t){x(r,t);var e=k(r);function r(){var t;return w(this,r),(t=e.call(this)).margin=n.initialValue,t}return O(r,[{key:"attributeChangedCallback",value:function(t,e,n){e!==n&&R.includes(t)&&(this[t]=n),E(P(r.prototype),"attributeChangedCallback",this).call(this,t,e,n)}}],[{key:"observedAttributes",get:function(){return[].concat(v(E(P(r),"observedAttributes",this)),v(R))}}]),r}(t),o=m(C);try{var i=function(){var t=e.value;Object.defineProperty(r.prototype,"margin".concat(t),{get:function(){return this.margin[t]||0},set:function(e){this.margin[t]=+e}})};for(o.s();!(e=o.n()).done;)i()}catch(t){o.e(t)}finally{o.f()}return r}},594:function(t,e,n){"use strict";var r=n(608),o=n(604);e.a=function(t){return Object(o.a)(t)&&Object(r.a)(t)}},595:function(t,e,n){"use strict";e.a=function(t,e,n){for(var r=-1,o=null==t?0:t.length;++r-1}},598:function(t,e,n){"use strict";var r=n(614);var o=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)},i=Math.max;var a=function(t,e,n){return e=i(void 0===e?t.length-1:e,0),function(){for(var r=arguments,a=-1,s=i(r.length-e,0),c=Array(s);++a0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(u);e.a=function(t,e){return f(a(t,e,r.a),t+"")}},599:function(t,e,n){"use strict";var r=function(t,e,n,r){for(var o=t.length,i=n+(r?1:-1);r?i--:++i-1:!!a&&Object(o.a)(t,e,n)>-1},P=n(632),C=n(619),R=n(613),T=n(609);function L(t,e){for(var n=0;n5&&(t=this._ftWidth-5);var e=this._ftHeight/4;return"M0,"+e+"L"+t+","+e+"L"+t+","+3*e+"L0,"+3*e+"L0,"+e+"M"+t+",0L"+this._ftWidth+","+2*e+"L"+t+","+this._ftHeight+"Z"}}])&&L(e.prototype,n),r&&L(e,r),t}();function D(t,e){for(var n=0;nNumber(n.end)||Number(r.end)=0?(e._rows[n].push(t),e.featuresMap.set(t,n)):(e._rows.push([t]),e.featuresMap.set(t,e._rows.length-1))})),this._rowHeight=Math.min(this._layoutHeight/this._rows.length,this._minHeight)}},{key:"getOffset",value:function(){return this._rows.length*this._rowHeightt.length)&&(e=t.length);for(var n=0,r=new Array(e);n500&&(n=t.getSingleBaseWidth()<4?4:1),t._featureShape.getFeatureShape(t.getSingleBaseWidth()/2,t._layoutObj.getFeatureHeight(),n,t._getShape(e))})).attr("transform",(function(e){return"translate(".concat(t.getXFromSeqPosition(Number(e.feature.start)+Number(e.position)-1)+t.getSingleBaseWidth()/4,",\n ").concat(t._layoutObj.getFeatureYPos(e.feature),")")})).attr("fill","#06038D").style("fill-opacity",(function(t){var e=t.feature;return e.opacity?e.opacity:.9})).style("stroke-opacity",(function(t){var e=t.feature;return e.opacity?e.opacity:.9})).call(this.bindEvents,this)}},{key:"_applyFilters",value:function(){var t=this;if(!this._filters||this._filters.length<=0)this._data=this._originalData;else{var e=Object(P.a)(this._filters,"category"),n=Object.values(e).map((function(e){var n=e.map((function(e){return e.filterFn(t._originalData)}));return C.a.apply(void 0,Q(n))})),r=R.a.apply(void 0,Q(n));this._data=r}}},{key:"refresh",value:function(){var t=this;if(this.xScale&&this.seq_g){var e=this.seq_g.selectAll("g.fragment-group").data(this._data.reduce((function(t,e){return t.concat(e.locations.reduce((function(t,n){return t.concat(n.fragments.map((function(t){return Object.assign({},t,{feature:e})})))}),[]))}),[])),n=this.seq_g.selectAll("g.residue-group").data(this._data.reduce((function(t,e){var n;return t.concat([null===(n=e.ptms)||void 0===n?void 0:n.reduce((function(t){return t.concat((function(t){return Object.assign({},t,{feature:e,position:t.position})}))}),[])])}),[]));e.selectAll("path.feature").attr("d",(function(e){return t._featureShape.getFeatureShape(t.getSingleBaseWidth(),t._layoutObj.getFeatureHeight(e),e.end?e.end-e.start+1:1,t._getShape(e))})).attr("transform",(function(e){return"translate(".concat(t.getXFromSeqPosition(e.start),",").concat(t._layoutObj.getFeatureYPos(e.feature),")")})),n.selectAll("path.residue").attr("d",(function(e){var n=1;return t.length>500&&(n=t.getSingleBaseWidth()<4?4:1),t._featureShape.getFeatureShape(t.getSingleBaseWidth()/2,t._layoutObj.getFeatureHeight(e),n,t._getShape(e))})).attr("transform",(function(e){return"translate(".concat(t.getXFromSeqPosition(Number(e.feature.start)+Number(e.position)-1)+t.getSingleBaseWidth()/4,",").concat(t._layoutObj.getFeatureYPos(e.feature),")")})),e.selectAll("rect.outer-rectangle").attr("width",(function(e){return t.getSingleBaseWidth()*(e.end?e.end-e.start+1:1)})).attr("height",(function(e){return t._layoutObj.getFeatureHeight(e)})).attr("transform",(function(e){return"translate(".concat(t.getXFromSeqPosition(e.start),",").concat(t._layoutObj.getFeatureYPos(e.feature),")")})),this._updateHighlight()}}},{key:"_updateHighlight",value:function(){this.trackHighlighter.updateHighlight()}}])&&$(e.prototype,n),o&&$(e,o),a}(T.a);e.default=ot},609:function(t,e,n){"use strict";var r=n(585),o=n(593),i=n(665);function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=t&&("undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"]);if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){s=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return c(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4?arguments[4]:void 0,a=arguments.length>5?arguments[5]:void 0,s=arguments.length>6?arguments[6]:void 0;e&&(e=e.feature?e.feature:e);var c={eventtype:t,coords:m._getClickCoords(),feature:e,target:s};return n&&(e&&e.fragments?c.highlight=e.fragments.map((function(t){return"".concat(t.start,":").concat(t.end)})).join(","):r.event&&r.event.shiftKey&&this._highlight?c.highlight="".concat(this._highlight,",").concat(i,":").concat(a):c.highlight=i&&a?"".concat(i,":").concat(a):null),o&&(c.selectedid=e&&e.protvistaFeatureId),new CustomEvent("change",{detail:c,bubbles:!0,cancelable:!0})}},{key:"bindEvents",value:function(t,e){t.on("mouseover",(function(t,n,r){e.dispatchEvent(e.createEvent("mouseover",t,"onmouseover"===e._highlightEvent,!1,t.start,t.end,r[n]))})).on("mouseout",(function(){e.dispatchEvent(e.createEvent("mouseout",null,"onmouseover"===e._highlightEvent))})).on("click",(function(t,n,r){e.dispatchEvent(e.createEvent("click",t,"onclick"===e._highlightEvent,!0,t.start,t.end,r[n]))}))}}])&&u(a.prototype,c),h&&u(a,h),m}(h(HTMLElement));e.a=Object(o.f)(m,{initialValue:{top:10,right:10,bottom:10,left:10}})},613:function(t,e,n){"use strict";var r=n(590),o=n(621),i=n(596),a=n(595),s=n(664),c=n(616),u=Math.min;var l=function(t,e,n){for(var l=n?a.a:i.a,f=t[0].length,h=t.length,p=h,d=Array(h),g=1/0,y=[];p--;){var m=t[p];p&&e&&(m=Object(r.a)(m,Object(s.a)(e))),g=u(m.length,g),d[p]=!n&&(e||f>=120&&m.length>=120)?new o.a(p&&m):void 0}m=t[0];var v=-1,b=d[0];t:for(;++v=200){var g=e?null:h(t);if(g)return Object(f.a)(g);l=!1,o=c.a,d=new i.a}else d=e?[]:p;t:for(;++rt.length)&&(e=t.length);for(var n=0,r=new Array(e);n".concat(t.map((function(t){var e,n,r=o.find((function(e){return e.name===t.code}));return r?"
  • ').concat(r.shortDescription,": ").concat(t.source?(e=t.source,(null===(n=e.name)||void 0===n?void 0:n.toLowerCase())==="PubMed".toLowerCase()?"".concat(e.id," (").concat(e.name," EuropePMC)"):" ").concat(e.id," ").concat(e.name?"(".concat(e.name,")"):"")):"","
  • "):""})).join(""),"\n "):""},f=function(t){return"
      ".concat(t.map((function(t){return'
    • '.concat(t.name," ").concat(t.url?'').concat(t.id,""):"".concat(t.name," ").concat(t.id),"
    • ")})).join(""),"
    ")},h={A:"alanine",S:"serine",T:"threonine",Y:"tyrosine"},p=function(t,e){var n=t.peptide,r=t.begin,o=Number(r)+e.position-1,i=n.charAt(e.position-1);return"".concat(o," phospho").concat(h[i])},d=function(t){var e="PROTEOMICS_PTM"===t.type?function(t){if(!t)return"";var e=t.flatMap((function(t){return t.dbReferences.map((function(t){return t.id}))})),n=i(new Set(e.flat()));return"\n
      ".concat(n.map((function(t){var e="Glue project"===t?"PXD012174":t;return"
    • ').concat(e,' (PRIDE\n ').concat("Glue project"===t?')
    • Publication: 31819260 (PubMed)
    • ':' PeptideAtlas)')})).join(""),"
    \n")}(t.ptms):l(t.evidences),n="PROTEOMICS_PTM"===t.type&&t.ptms.map((function(e){return p(t,e)})),r="PROTEOMICS_PTM"===t.type&&t.ptms.flatMap((function(t){return t.dbReferences.map((function(t){return t.id}))})),o=t.description;if("BINDING"===t.type||"Binding site"===t.type){var a="";t.ligandPart&&(a+="".concat(t.ligandPart.name," of ")),t.ligand&&(a+=t.ligand.name),t.description&&(a+="; ".concat(t.description)),o=a}try{return"\n ".concat(o?"
    Description

    ".concat(o,"

    "):"","\n ").concat(t.matchScore?"
    Match score

    ".concat(t.matchScore,"%

    "):"","\n ").concat(t.ftId?"
    Feature ID

    ".concat(t.ftId,"

    "):"","\n ").concat(t.alternativeSequence?"
    Alternative sequence

    ".concat(t.alternativeSequence,"

    "):"","\n ").concat(n?'
    PTMs
      '.concat(n.map((function(t){return"
    • ".concat(t,"
    • ")})).join(""),"
    \n "):"","\n ").concat(t.peptide&&"PROTEOMICS_PTM"===t.type?'
    Peptidoform

    '.concat(function(t,e){if(!e)return"";var n=e.map((function(t){return{name:t.name,position:t.position}})),r="",o=0;return n.forEach((function(e){r="".concat(r).concat(t.slice(o,e.position),"[").concat(e.name,"]"),o=e.position})),r="".concat(r).concat(t.slice(o)),"

    ".concat(r,"

    ")}(t.peptide,t.ptms),"

    "):"","\n ").concat(t.peptide&&"PROTEOMICS_PTM"!==t.type?"
    Peptide

    ".concat(t.peptide,"

    "):""," \n ").concat(t.xrefs?"
    Cross-references
    ".concat(f(t.xrefs)):"","\n ").concat(e?"
    Evidence
    ".concat(e):"","\n ").concat(t.ptms&&r&&!r.includes("Glue project")?'
    PTM statistical attributes
      '.concat(t.ptms.map((function(e){return e.dbReferences.map((function(n){return"
    • ".concat(n.id,'
    • \n
    • ').concat(p(t,e),'
    • \n
    • PubMed ID: \n ').concat(n.properties["Pubmed ID"],'\n
    • \n
    • Confidence score: ').concat(n.properties["Confidence score"],'
    • \n
    • Universal Spectrum Id: \n View on ProteomeXchange\n
    • \n
    • PSM Count: ').concat(n.properties["PSM Count"],'
    • \n
    • Site probability: ').concat(n.properties["Site probability"],"
    • \n ")})).join("")})).join(""),"
    "):"","\n ")}catch(t){return console.error(t),""}};function g(t){return(g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function y(t,e){for(var n=0;n0&&(e=function(t){return t.map((function(t){var e={};return t.begin&&(e.start=t.begin),c(c({},t),e)}))}(e=n.map((function(t){return E(E({},t),{},{tooltipContent:d(t),protvistaFeatureId:Object(r.a)()})})))),e},k=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&w(t,e)}(s,t);var e,n,r,o,i,a=(e=s,n=_(),function(){var t,r=S(e);if(n){var o=S(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return m(this,t)});function s(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),(t=a.call(this))._adaptedData=[],t}return r=s,(o=[{key:"connectedCallback",value:function(){this.subscribers=this.getAttribute("subscribers"),this._filters=this.getAttribute("filters")?this.getAttribute("filters").split(","):[],this._addLoaderListeners()}},{key:"data",set:function(t){this._emitEvent(t)}},{key:"subscribers",get:function(){return this._subscribers},set:function(t){t&&(this._subscribers=t.split(","))}},{key:"parseEntry",value:function(t){this._adaptedData=A(t)}},{key:"filterData",value:function(){var t=this;Array.isArray(this._adaptedData)&&this._filters.length>0&&(this._adaptedData=this._adaptedData.filter((function(e){return t._filters.includes(e.type)})))}},{key:"adaptedData",get:function(){return this._adaptedData}},{key:"_setSubscriberData",value:function(){var t=this;this.subscribers.forEach((function(e){var n=document.querySelector(e);n?n.data=t._adaptedData:console.error("Element with id '".concat(e,"' not found"))}))}},{key:"_emitEvent",value:function(t){this.parseEntry(t),this.filterData(),this.subscribers&&this._setSubscriberData(),this.dispatchEvent(new CustomEvent("load",{detail:{payload:this._adaptedData},bubbles:!0,cancelable:!0}))}},{key:"_addLoaderListeners",value:function(){var t=this;this.addEventListener("load",(function(e){if(e.target!==t){e.stopPropagation();try{if(e.detail.payload.errorMessage)throw e.detail.payload.errorMessage;t._emitEvent(e.detail.payload)}catch(e){t.dispatchEvent(new CustomEvent("error",{detail:e,bubbles:!0,cancelable:!0}))}}}))}}])&&y(r.prototype,o),i&&y(r,i),s}(v(HTMLElement));e.a=k},629:function(t,e,n){"use strict";n.d(e,"b",(function(){return m}));var r=n(675);function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return a(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return a(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,c=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){c=!0,i=t},f:function(){try{s||null==n.return||n.return()}finally{if(c)throw i}}}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n1&&void 0!==arguments[1]?arguments[1]:new Headers({accept:"application/json"}),n=y.get(t);if(n)return n;var r=g(void 0,void 0,void 0,regeneratorRuntime.mark((function n(){var r,o;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,window.fetch(t,{headers:e});case 2:if((r=n.sent).ok){n.next=5;break}throw new Error("Request Failed: Status = ".concat(r.status,"; URI = ").concat(t,"; Time = ").concat(new Date));case 5:if(204!==r.status){n.next=7;break}return n.abrupt("return",{payload:null,headers:r.headers});case 7:return n.next=9,r.json();case 9:return o=n.sent,n.abrupt("return",{payload:o,headers:r.headers});case 11:case"end":return n.stop()}}),n)})));return y.set(t,r),r.catch((function(){return y.delete(t)})),r},v=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&h(t,e)}(y,t);var e,n,o,a,u,l=(e=y,n=f(),function(){var t,r=p(e);if(n){var o=p(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return c(this,t)});function y(){var t;return d(this,y),(t=l.call(this))._data=null,t.selector=(t.getAttribute("selector")||"").trim()||function(t){return t},t}return o=y,u=[{key:"is",get:function(){return"data-loader"}}],(a=[{key:"fetch",value:function(){return g(this,void 0,void 0,regeneratorRuntime.mark((function t(){var e,n,o,a,s,c;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(u=this.children,(e=Array.from(u).filter((function(t){return t.matches('source[src], script[type="application/json"]')}))).length){t.next=3;break}return t.abrupt("return");case 3:n=[],a=i(e),t.prev=5,a.s();case 7:if((s=a.n()).done){t.next=31;break}if(c=s.value,t.prev=9,!(c instanceof HTMLSourceElement)){t.next=22;break}return t.t0=Object,t.t1=Object,t.t2={},t.next=16,m(c.src);case 16:t.t3=t.sent,t.t4=t.t1.assign.call(t.t1,t.t2,t.t3),t.t5={srcElement:c,src:c.src},o=t.t0.assign.call(t.t0,t.t4,t.t5),t.next=23;break;case 22:o={payload:JSON.parse(c.textContent)};case 23:return t.abrupt("break",31);case 26:t.prev=26,t.t6=t.catch(9),n.push(t.t6);case 29:t.next=7;break;case 31:t.next=36;break;case 33:t.prev=33,t.t7=t.catch(5),a.e(t.t7);case 36:return t.prev=36,a.f(),t.finish(36);case 39:if(o){t.next=43;break}this._errors=n;try{this.dispatchEvent(new CustomEvent("error",{detail:n,bubbles:!0,cancelable:!0}))}catch(t){console.error(t)}return t.abrupt("return");case 43:"string"==typeof this.selector?this._data=Object(r.a)(o.payload,this.selector):this._data=this.selector(o.payload),o.payload=this.data,this.dispatchEvent(new CustomEvent("load",{detail:o,bubbles:!0,cancelable:!0}));case 46:case"end":return t.stop()}var u}),t,this,[[5,33,36,39],[9,26]])})))}},{key:"data",get:function(){return this._data}},{key:"loaded",get:function(){return!!this.data}},{key:"errors",get:function(){return this._errors}},{key:"selector",get:function(){return this._selector},set:function(t){this._selector=t}},{key:"connectedCallback",value:function(){this.fetch()}}])&&s(o.prototype,a),u&&s(o,u),y}(u(HTMLElement));e.a=v},700:function(t,e,n){"use strict";var r=n(585),o=n(593);function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,e){for(var n=0;n0&&(this._padding=10)}},{key:"connectedCallback",value:function(){this._refreshWidth(),this.closest("protvista-manager")&&(this.manager=this.closest("protvista-manager"),this.manager.register(this)),this._length=parseFloat(this.getAttribute("length")),this._displaystart=parseFloat(this.getAttribute("displaystart"))||1,this._displayend=parseFloat(this.getAttribute("displayend"))||this._length,this._highlightStart=parseFloat(this.getAttribute("highlightStart")),this._highlightEnd=parseFloat(this.getAttribute("highlightEnd")),this._rulerstart=parseFloat(this.getAttribute("rulerStart"))||1,this._onResize=this._onResize.bind(this),this._createNavRuler()}},{key:"disconnectedCallback",value:function(){this.manager&&this.manager.unregister(this),this._ro&&this._ro.unobserve(this),window.removeEventListener("resize",this._onResize)}},{key:"attributeChangedCallback",value:function(t,e,n){e!==n&&(this["_".concat(t)]=parseFloat(n),this._updateNavRuler())}},{key:"width",get:function(){return this._width},set:function(t){this._width=t}},{key:"_createNavRuler",value:function(){var t=this;this._x=Object(r.scaleLinear)().range([this._padding,this.width-this._padding]),this._x.domain([this._rulerstart,this._rulerstart+this._length-1]),Object(r.select)(this).selectAll("div").remove(),this._container=Object(r.select)(this).append("div").attr("class","container"),this._svg=this._container.append("svg").attr("id","").attr("width",this.width).attr("height",this.height),this._xAxis=Object(r.axisBottom)(this._x),this._displaystartLabel=this._svg.append("text").attr("class","start-label").attr("x",0).attr("y",this.height-this._padding),this._displayendLabel=this._svg.append("text").attr("class","end-label").attr("x",this.width).attr("y",this.height-this._padding).attr("text-anchor","end"),this._axis=this._svg.append("g").attr("class","x axis").call(this._xAxis),this._viewport=Object(r.brushX)().extent([[this._padding,0],[this.width-this._padding,.51*this.height]]).on("brush",(function(){r.event.selection&&(t._displaystart=Object(r.format)("d")(t._x.invert(r.event.selection[0])),t._displayend=Object(r.format)("d")(t._x.invert(r.event.selection[1])),t.dontDispatch||t.dispatchEvent(new CustomEvent("change",{detail:{displayend:t._displayend,displaystart:t._displaystart,extra:{transform:r.event.transform}},bubbles:!0,cancelable:!0})),t._updateLabels(),t._updatePolygon())})),this._brushG=this._svg.append("g").attr("class","brush").call(this._viewport),this._brushG.call(this._viewport.move,[this._x(this._displaystart),this._x(this._displayend)]),this.polygon=this._svg.append("polygon").attr("class","zoom-polygon").attr("fill","#777").attr("fill-opacity","0.3"),this._updateNavRuler(),"ResizeObserver"in window&&(this._ro=new ResizeObserver(this._onResize),this._ro.observe(this)),window.addEventListener("resize",this._onResize)}},{key:"_onResize",value:function(){this._refreshWidth(),this._x=this._x.range([this._padding,this.width-this._padding]),this._svg.attr("width",this.width),this._viewport.extent([[this._padding,0],[this.width-this._padding,.51*this.height]]),this._brushG.call(this._viewport),this._updateNavRuler()}},{key:"_updateNavRuler",value:function(){this._x&&(this._container.style("padding-left","".concat(this.margin.left,"px")).style("padding-right","".concat(this.margin.right,"px")).style("padding-top","".concat(this.margin.top,"px")).style("padding-bottom","".concat(this.margin.bottom,"px")),this._x.domain([this._rulerstart,this._rulerstart+this._length-1]),this._axis.call(this._xAxis),this._updatePolygon(),this._updateLabels(),this._brushG&&(this.dontDispatch=!0,this._brushG.call(this._viewport.move,[this._x(this._displaystart),this._x(this._displayend)]),this.dontDispatch=!1))}},{key:"_updateLabels",value:function(){this._displaystartLabel&&this._displaystartLabel.text(this._displaystart),this._displayendLabel&&this._displayendLabel.attr("x",this.width).text(this._displayend)}},{key:"_updatePolygon",value:function(){this.polygon&&this.polygon.attr("points","".concat(this._x(this._displaystart),",").concat(this.height/2,"\n ").concat(this._x(this._displayend),",").concat(this.height/2,"\n ").concat(this.width,",").concat(this.height,"\n 0,").concat(this.height))}}])&&a(o.prototype,i),c&&a(o,c),p}(c(HTMLElement));e.a=Object(o.f)(p)},701:function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t){return function(t){if(Array.isArray(t))return i(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return i(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);nthis.chHeight&&(this.xAxis=Object(r.axisBottom)(this.xScale).tickFormat((function(t){return Number.isInteger(t)?t:""})).ticks(this.numberOfTicks,"s"),this.axis.call(this.xAxis)),this.axis.attr("transform","translate(".concat(this.margin.left+o,",0)")),this.axis.select(".domain").remove(),this.axis.selectAll(".tick line").remove(),this.bases=this.seq_g.selectAll("text.base").data(s,(function(t){return t.start})),this.bases.enter().append("text").attr("class","base").attr("text-anchor","middle").attr("x",(function(e){return t.getXFromSeqPosition(e.start)+o})).text((function(t){return t.aa})).style("pointer-events","none").style("font-family","monospace"),this.bases.exit().remove(),this.bases.attr("x",(function(e){return t.getXFromSeqPosition(e.start)+o})),this.background=this.seq_bg.selectAll("rect.base_bg").data(s,(function(t){return t.start})),this.background.enter().append("rect").attr("class","base_bg feature").attr("height",this._height).merge(this.background).attr("width",e).attr("fill",(function(t){return Math.round(t.start)%2?"#ccc":"#eee"})).attr("x",(function(e){return t.getXFromSeqPosition(e.start)})).call(this.bindEvents,this),this.background.exit().remove(),this.seq_g.style("opacity",Math.min(1,n)),this.background.style("opacity",Math.min(1,n)),this._updateHighlight()}}},{key:"_updateHighlight",value:function(){this.trackHighlighter.updateHighlight()}}])&&s(e.prototype,n),i&&s(e,i),p}(o.a);e.a=g},743:function(t,e,n){"use strict";var r,o=new Uint8Array(16);function i(){if(!r&&!(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(o)}var a=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var s=function(t){return"string"==typeof t&&a.test(t)},c=[],u=0;u<256;++u)c.push((u+256).toString(16).substr(1));var l,f,h=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(c[t[e+0]]+c[t[e+1]]+c[t[e+2]]+c[t[e+3]]+"-"+c[t[e+4]]+c[t[e+5]]+"-"+c[t[e+6]]+c[t[e+7]]+"-"+c[t[e+8]]+c[t[e+9]]+"-"+c[t[e+10]]+c[t[e+11]]+c[t[e+12]]+c[t[e+13]]+c[t[e+14]]+c[t[e+15]]).toLowerCase();if(!s(n))throw TypeError("Stringified UUID is invalid");return n},p=0,d=0;e.a=function(t,e,n){var r=e&&n||0,o=e||new Array(16),a=(t=t||{}).node||l,s=void 0!==t.clockseq?t.clockseq:f;if(null==a||null==s){var c=t.random||(t.rng||i)();null==a&&(a=l=[1|c[0],c[1],c[2],c[3],c[4],c[5]]),null==s&&(s=f=16383&(c[6]<<8|c[7]))}var u=void 0!==t.msecs?t.msecs:Date.now(),g=void 0!==t.nsecs?t.nsecs:d+1,y=u-p+(g-d)/1e4;if(y<0&&void 0===t.clockseq&&(s=s+1&16383),(y<0||u>p)&&void 0===t.nsecs&&(g=0),g>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");p=u,d=g,f=s;var m=(1e4*(268435455&(u+=122192928e5))+g)%4294967296;o[r++]=m>>>24&255,o[r++]=m>>>16&255,o[r++]=m>>>8&255,o[r++]=255&m;var v=u/4294967296*1e4&268435455;o[r++]=v>>>8&255,o[r++]=255&v,o[r++]=v>>>24&15|16,o[r++]=v>>>16&255,o[r++]=s>>>8|128,o[r++]=255&s;for(var b=0;b<6;++b)o[r+b]=a[b];return e||h(o)}},745:function(t,e,n){"use strict";var r,o,i,a,s,c,u,l=n(620),f=n(743),h=n(632),p=function(t){return"\n
    Variant

    ".concat(t.wildType," > ").concat(t.alternativeSequence||"","

    \n ").concat(t.populationFrequencies?(i=t.populationFrequencies,"
    Population frequencies
    ".concat(i.map((function(t){return"

    ".concat(t.frequency," - ").concat(t.populationName," (").concat(t.source,")

    ")})).join(""))):"","\n ").concat(t.consequenceType?"
    Consequence

    ".concat(t.consequenceType,"

    "):"","\n ").concat(t.somaticStatus?"
    Somatic

    ".concat(0===t.somaticStatus?"No":"Yes","

    "):"","\n ").concat(t.genomicLocation?"
    Location

    ".concat(t.genomicLocation,"

    "):"","\n ").concat(t.ftId?"
    Feature ID

    ".concat(t.ftId,"

    "):"","\n ").concat(t.descriptions?(o=t.descriptions,"
    Description
    ".concat(o.map((function(t){return"

    ".concat(t.value,"

    ")})).join(""),"\n ")):"","\n ").concat(t.association?(r=t.association,null==r?void 0:r.map((function(t){return"\n

    Disease association

    ".concat(t.name,"

    \n ").concat(t.description?"<>".concat(t.description,"

    "):"","\n ").concat(t.dbReferences?"
    Cross-references
    ".concat(Object(l.b)(t.dbReferences)):"","\n ").concat(Object(l.c)(t.evidences),"\n ")})).join("")):"","\n ").concat(t.predictions?(e=t.predictions,n=Object(h.a)(e,"predAlgorithmNameType"),Object.keys(n).map((function(t){var e=Object(h.a)(n[t],"predictionValType");return{algorithm:t,values:Object.keys(e).map((function(t){return{name:t,count:e[t].length}}))}})).map((function(t){return"
    ".concat(t.algorithm,'
      ').concat(t.values.map((function(t){return"
    • ".concat(t.name,"
    • ")})).join(""),"
    ")})).join("")):"","\n ").concat(function(t){if(t.locations.some((function(t){return"EnsemblViruses"===t.source}))){var e=t.xrefs.find((function(t){return"ENA"===t.name}));return e.id?'
    Ensembl COVID-19
    \n

    \n ').concat(e.id,"\n

    "):""}return""}(t),"\n \n ");var e,n,r,o,i};function d(t){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function g(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function y(t,e){for(var n=0;n0,tooltipContent:p(t),protvistaFeatureId:Object(f.a)()});var e,n,o}));return n?{sequence:e,variants:n}:null}(t)}}])&&y(e.prototype,n),o&&y(e,o),a}(l.a);e.a=S},803:function(t,e,n){"use strict";var r=n(603),o=n(585),i=n(619),a=n(613),s=n(632);var c=function(t){var e=t.variants,n=t.sequence;if(!n||!e)return null;var r=n.split("").map((function(t,e){return{type:"VARIANT",normal:t,pos:e+1,variants:[]}}));return e.forEach((function(t){r[t.start-1]&&r[t.start-1].variants.push(t)})),r};function u(t,e){for(var n=0;nt.length)&&(e=t.length);for(var n=0,r=new Array(e);n\n protvista-variation {\n display: flex;\n width: 100%;\n }\n \n protvista-variation svg {\n background-color: #fff;\n }\n \n protvista-variation circle {\n opacity: 0.6;\n }\n protvista-variation circle:hover {\n opacity: 0.9;\n }\n protvista-variation .tick line,\n protvista-variation .axis path {\n opacity: 0.1;\n }\n \n .protvista-highlight {\n fill: #ffe999;\n }\n \n protvista-variation .variation-y-right line,\n protvista-variation .axis path {\n fill: none;\n stroke: none;\n }\n \n \n "}}],(n=[{key:"connectedCallback",value:function(){y(w(f.prototype),"connectedCallback",this).call(this);var t=document.createElement("style");t.innerHTML=f.css,this.appendChild(t),this._height=Number(this.getAttribute("height"))?Number(this.getAttribute("height")):430,this._width=this._width?this._width:0,this._yScale=Object(o.scaleLinear)(),this._yScale=Object(o.scalePoint)().domain(E).range([0,this._height-this.margin.top-this.margin.bottom])}},{key:"processData",value:function(t){this._originalData=c(t)}},{key:"_createFeatures",value:function(){this._variationPlot=new l;var t=y(w(f.prototype),"svg",this).select("g.sequence-features"),e=t.attr("transform","translate(0, ".concat(this.margin.top,")")).append("g");this._series=e.datum(this._data),this._axisLeft=t.append("g"),this._axisRight=t.append("g"),this.updateScale()}},{key:"filters",set:function(t){g(w(f.prototype),"filters",t,this,!0),this.updateData(this._data),this.refresh()}},{key:"_applyFilters",value:function(){var t=this;if(!this._filters||this._filters.length<=0)this._data=this._originalData;else{var e=Object(s.a)(this._filters,"category"),n=Object.values(e).map((function(e){var n=e.map((function(e){return e.filterFn(t._originalData)}));return x(n,i.a)}));this._data=x(n,a.a)}}},{key:"colorConfig",get:function(){return this._colorConfig},set:function(t){this._colorConfig=t}},{key:"refresh",value:function(){this._series&&(this.updateScale(),this._series.call(this._variationPlot.drawVariationPlot,this),this._updateHighlight())}},{key:"updateScale",value:function(){this._yAxisLScale=Object(o.axisLeft)().scale(this._yScale).tickSize(-this.getWidthWithMargins()),this._yAxisRScale=Object(o.axisRight)().scale(this._yScale),this._axisLeft.attr("class","variation-y-left axis").attr("transform","translate(".concat(this.margin.left,",0)")).call(this._yAxisLScale),this._axisRight.attr("transform","translate(".concat(this.getWidthWithMargins()-this.margin.right+2,", 0)")).attr("class","variation-y-right axis").call(this._yAxisRScale)}},{key:"updateData",value:function(t){this._series&&this._series.datum(t)}}])&&p(e.prototype,n),r&&p(e,r),f}(r.default);e.a=A},813:function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"d",(function(){return o})),n.d(e,"e",(function(){return i})),n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){return s}));var r=[{accession:"IPR00001",locations:[{fragments:[{start:1,end:466}]}],color:"#cacaca"}],o=[{accession:"SF00001",locations:[{fragments:[{start:127,end:264},{start:279,end:385},{start:400,end:466}]}],color:"#7acaca"},{accession:"PF00001",locations:[{fragments:[{start:146,end:266}]},{fragments:[{start:346,end:466}]}],color:"#ca7aca"},{accession:"CD0001",locations:[{fragments:[{start:146,end:456}]}],color:"#caca7a"}],i=[{accession:"cd00108",locations:[{fragments:[{start:127,end:203}]}],color:"#cacaca",residues:[{accession:"KR",entry_accession:"cd00108",source_database:"CDD",locations:[{fragments:[{start:153,end:153,residues:"W"},{start:163,end:163,residues:"Y"},{start:184,end:184,residues:"W"},{start:186,end:186,residues:"F"},{start:194,end:194,residues:"Y"},{start:231,end:231,residus:"W"},{start:241,end:241,residues:"F"},{start:266,end:266,residues:"W"},{start:268,end:268,residues:"Y"},{start:276,end:276,residues:"W"},{start:325,end:325,residues:"W"},{start:335,end:335,residues:"V"},{start:360,end:360,residues:"W"},{start:362,end:362,residues:"F"},{start:370,end:370,residues:"V"},{start:411,end:411,residues:"W"},{start:421,end:421,residues:"H"},{start:447,end:447,residues:"W"},{start:449,end:449,residues:"Y"},{start:457,end:457,residues:"W"}],description:"ligand binding site"},{fragments:[{start:138,end:138,residues:"K"},{start:216,end:216,residues:"R"},{start:310,end:310,residues:"R"},{start:396,end:396,residues:"M"}],description:"putative domain interaction site"}]}]},{accession:"cd00108",locations:[{fragments:[{start:204,end:285}]}],color:"#c00aca",residues:[{accession:"KR",entry_accession:"cd00108",source_database:"CDD",locations:[{fragments:[{start:153,end:153,residues:"W"},{start:163,end:163,residues:"Y"},{start:184,end:184,residues:"W"},{start:186,end:186,residues:"F"},{start:194,end:194,residues:"Y"},{start:231,end:231,residus:"W"},{start:241,end:241,residues:"F"},{start:266,end:266,residues:"W"},{start:268,end:268,residues:"Y"},{start:276,end:276,residues:"W"},{start:325,end:325,residues:"W"},{start:335,end:335,residues:"V"},{start:360,end:360,residues:"W"},{start:362,end:362,residues:"F"},{start:370,end:370,residues:"V"},{start:411,end:411,residues:"W"},{start:421,end:421,residues:"H"},{start:447,end:447,residues:"W"},{start:449,end:449,residues:"Y"},{start:457,end:457,residues:"W"}],description:"ligand binding site"},{fragments:[{start:138,end:138,residues:"K"},{start:216,end:216,residues:"R"},{start:310,end:310,residues:"R"},{start:396,end:396,residues:"M"}],description:"putative domain interaction site"}]}]},{accession:"cd00108",source_database:"cdd",locations:[{fragments:[{start:298,end:380}]}],color:"#caca0a",entry_type:"domain",type:"entry",residues:[{accession:"KR",entry_accession:"cd00108",source_database:"CDD",locations:[{fragments:[{start:153,end:153,residues:"W"},{start:163,end:163,residues:"Y"},{start:184,end:184,residues:"W"},{start:186,end:186,residues:"F"},{start:194,end:194,residues:"Y"},{start:231,end:231,residus:"W"},{start:241,end:241,residues:"F"},{start:266,end:266,residues:"W"},{start:268,end:268,residues:"Y"},{start:276,end:276,residues:"W"},{start:325,end:325,residues:"W"},{start:335,end:335,residues:"V"},{start:360,end:360,residues:"W"},{start:362,end:362,residues:"F"},{start:370,end:370,residues:"V"},{start:411,end:411,residues:"W"},{start:421,end:421,residues:"H"},{start:447,end:447,residues:"W"},{start:449,end:449,residues:"Y"},{start:457,end:457,residues:"W"}],description:"ligand binding site"},{fragments:[{start:138,end:138,residues:"K"},{start:216,end:216,residues:"R"},{start:310,end:310,residues:"R"},{start:396,end:396,residues:"M"}],description:"putative domain interaction site"}]}]},{accession:"cd00108",source_database:"cdd",locations:[{fragments:[{start:384,end:466}]}],color:"#0acaca",entry_type:"domain",type:"entry",residues:[{accession:"KR",entry_accession:"cd00108",source_database:"CDD",locations:[{fragments:[{start:153,end:153,residues:"W"},{start:163,end:163,residues:"Y"},{start:184,end:184,residues:"W"},{start:186,end:186,residues:"F"},{start:194,end:194,residues:"Y"},{start:231,end:231,residus:"W"},{start:241,end:241,residues:"F"},{start:266,end:266,residues:"W"},{start:268,end:268,residues:"Y"},{start:276,end:276,residues:"W"},{start:325,end:325,residues:"W"},{start:335,end:335,residues:"V"},{start:360,end:360,residues:"W"},{start:362,end:362,residues:"F"},{start:370,end:370,residues:"V"},{start:411,end:411,residues:"W"},{start:421,end:421,residues:"H"},{start:447,end:447,residues:"W"},{start:449,end:449,residues:"Y"},{start:457,end:457,residues:"W"}],description:"ligand binding site"},{fragments:[{start:138,end:138,residues:"K"},{start:216,end:216,residues:"R"},{start:310,end:310,residues:"R"},{start:396,end:396,residues:"M"}],description:"putative domain interaction site"}]}]}],a="x y a b score\n191 225 0 8 0.9999824\n50 208 0 8 0.9999750\n46 207 0 8 0.9999180\n47 27 0 8 0.9999129\n43 207 0 8 0.9998918\n47 21 0 8 0.9998869\n126 195 0 8 0.9998656\n50 21 0 8 0.9998630\n19 184 0 8 0.9998622\n130 161 0 8 0.9998603\n95 33 0 8 0.9998345\n25 94 0 8 0.9997534\n15 181 0 8 0.8997336\n26 61 0 8 0.8997303",s=[[191,225,.9999824],[50,208,.999975],[46,207,.999918],[47,27,.9999129],[43,207,.9998918],[47,21,.9998869],[126,195,.9998656],[50,21,.999863],[19,184,.9998622],[130,161,.9998603],[95,33,.9998345],[25,94,.9997534],[15,181,.8997336],[26,61,.8997303]]},814:function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=n(937);e.getDocumentBaseUrl=function(t){return"about:blank"!==t.baseURI?t.baseURI:null},e.clone=function(t){var e,n={};for(e in t)t.hasOwnProperty(e)&&(n[e]=t[e]);return n},e.cloneArray=function(t){return Array.prototype.slice.apply(t,[0])},e.joinUrl=function(t,e){return t?o.resolve(t,e):e},e.isDataUri=function(t){return/^data:/.test(t)},e.collectAndReportErrors=function(t){var e=[];return Promise.all(t.map((function(t){return t.catch((function(t){e.push(t)}))}))).then((function(){return e}))};var i=null;e.ajax=function(t,n){return new Promise((function(r,o){var a,s=new window.XMLHttpRequest,c=e.joinUrl(n.baseUrl,t),u=function(){o({msg:"Unable to load url",url:c})};a=function(t,e){return!1===e||"none"===e||"repeated"===e?(null!==i&&"repeated"===e||(i=Date.now()),t+"?_="+i):t}(c,n.cache),s.addEventListener("load",(function(){200===s.status||0===s.status?r(s.response):u()}),!1),s.addEventListener("error",u,!1);try{s.open("GET",a,!0),s.overrideMimeType(n.mimeType),s.send(null)}catch(t){u()}}))},e.binaryAjax=function(t,n){var r=e.clone(n);return r.mimeType="text/plain; charset=x-user-defined",e.ajax(t,r).then((function(t){for(var e="",n=0;nt.length)&&(e=t.length);for(var n=0,r=new Array(e);nu.xScale(u.end)+u.getSingleBaseWidth())o.selectAll(".mouse-per-line circle").style("opacity","0"),o.selectAll(".mouse-per-line text").style("opacity","0");else{var n={},r=Math.floor(u.xScale.invert(e[0]));o.selectAll(".mouse-per-line circle").style("opacity",(function(t){var e=t.values.find((function(t){return t.position===r}));return e&&e.value?"1":"0"})),o.selectAll(".mouse-per-line text").style("opacity","1"),o.selectAll(".mouse-per-line text").text((function(t){var e=t.values.find((function(t){return t.position===r}));return n[t.name]=e,e?e.value:""})),o.selectAll(".mouse-per-line").attr("transform",(function(t,n){for(var r=0,o=s.nodes()[n].getTotalLength(),i=null,a={};i=Math.floor((r+o)/2),a=s.nodes()[n].getPointAtLength(i),i!==o&&i!==r||a.x===e[0];)if(a.x>e[0])o=i;else{if(!(a.x=0)switch(this._scale){case"hydrophobicity-scale":return c;case"hydrophobicity-interface-scale":return a;case"isoelectric-point-scale":return u;case"hydrophobicity-octanol-scale":return s;default:return null}if(/([ILFVMPWHTEQCYASNDRGK]:-?\d+\.?\d*)(,[ILFVMPWHTEQCYASNDRGK]:-?\d+\.?\d*)*/.test(this._scale))try{t=Object(i.d)(this._scale,{keyFormatter:function(t){return t.toUpperCase()},valueFormatter:function(t){return parseFloat(t)}})}catch(t){console.error("Couldn't parse the given scale ".concat(this._scale),t)}return t}},{key:"refresh",value:function(){var t=this;if(this.seq_g){var e=this.getScaleFromAttribute();if(null===e)return void console.error("The attribute scale is not valid.");var n=Object(r.scaleLinear)();this.colorScale=v,this._color_range&&(this.colorScale=Object(i.a)(this._color_range)),n.domain(this.colorScale.domain).range(this.colorScale.range);var o=this.getSingleBaseWidth(),a=Math.round(Math.max(0,this._displaystart-2)),s=Math.round(Math.min(this.sequence.length,this._displayend+1)),c=this.sequence.slice(a,s).split("").map((function(t,r){var o=t.toUpperCase()in e?e[t.toUpperCase()]:0;return{start:1+a+r,end:1+a+r,aa:t,value:o,colour:n(o)}}));this.residues=this.seq_g.selectAll("rect.base_bg").data(o<8?[]:c,(function(t){return t.start})),this.residues.enter().append("rect").attr("class","base_bg feature").attr("data-base",(function(t){return t.aa})).attr("data-pos",(function(t){return t.start})).attr("height",this._height).merge(this.residues).attr("width",o).attr("fill",(function(t){return t.colour})).attr("x",(function(e){var n=e.start;return t.getXFromSeqPosition(n)})).call(this.bindEvents,this),this.residues.exit().remove();var u=this.gradient.selectAll("stop").data(this.sequence.split(""));u.enter().append("stop").merge(u).attr("offset",(function(e,n){return(n+.5)/t.sequence.length})).attr("stop-color",(function(t){return n(t.toUpperCase()in e?e[t.toUpperCase()]:0)})),this.gradient.exit().remove(),this.seq_greadient.attr("x",this.getXFromSeqPosition(1)).attr("y",0).attr("height",this._height).attr("width",this.getXFromSeqPosition(this.sequence.length)-this.getXFromSeqPosition(0)).style("opacity",o<8?1:8/o).attr("fill","url(#scale-gradient-".concat(this.uniqueID,")")),this._updateHighlight()}}}])&&h(e.prototype,n),l&&h(e,l),y}(o.a);e.a=b},862:function(t){t.exports=JSON.parse('{"I":-0.31,"L":-0.56,"F":-1.13,"V":0.07,"M":-0.23,"P":0.45,"W":-1.85,"H":0.17,"T":0.14,"E":-0.01,"Q":0.58,"C":-0.24,"Y":-0.94,"A":0.17,"S":0.13,"N":0.42,"D":-0.07,"R":0.81,"G":0.01,"K":0.99}')},863:function(t){t.exports=JSON.parse('{"I":-1.12,"L":-1.25,"F":-1.71,"V":-0.46,"M":-0.67,"P":0.14,"W":-2.09,"H":0.11,"T":0.25,"E":0.11,"Q":0.77,"C":-0.02,"Y":-0.71,"A":0.5,"S":0.46,"N":0.85,"D":0.43,"R":1.15,"G":3.63,"K":3.64}')},864:function(t){t.exports=JSON.parse('{"I":-0.81,"L":-0.69,"F":-0.58,"V":-0.53,"M":-0.44,"P":-0.31,"W":-0.24,"H":-0.06,"T":0.11,"E":1.61,"Q":0.19,"C":0.22,"Y":0.23,"A":0.33,"S":0.33,"N":0.43,"D":2.41,"R":1,"G":1.14,"K":1.81}')},865:function(t){t.exports=JSON.parse('{"I":6.04,"L":6.04,"F":5.91,"V":6.02,"M":5.74,"P":6.3,"W":5.88,"H":7.64,"T":5.6,"E":3.08,"Q":5.65,"C":5.02,"Y":5.63,"A":6.11,"S":5.68,"N":5.41,"D":2.87,"R":10.76,"G":6.06,"K":9.47}')},868:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(585),a=n(603),s=n(869),c=i.scaleLinear([0,1],["orange","blue"]),u=function(t,e,n){return new CustomEvent("change",{detail:{type:t,target:e,highlight:n?n.map((function(t){return t+":"+t})).join(","):null},bubbles:!0,cancelable:!0})},l=function(t){function e(){var e=t.call(this)||this;return e._minDistance=0,e._minProbability=.7,e._rawData=null,e._linksData=null,e}return o(e,t),Object.defineProperty(e,"observedAttributes",{get:function(){return a.default.observedAttributes.concat("mindistance","minprobability")},enumerable:!1,configurable:!0}),e.prototype.attributeChangedCallback=function(e,n,r){"mindistance"===e&&n!==r?this.minDistance=+r:"minprobability"===e&&n!==r?this.minProbability=+r:t.prototype.attributeChangedCallback.call(this,e,n,r)},Object.defineProperty(e.prototype,"data",{set:function(t){if("string"==typeof t)this._rawData=s.parseToRowData(t);else{if(!Array.isArray(t))throw new Error("data is not in a valid format");this._rawData=t}this._data=s.getContactsObject(s.filterContacts(this._rawData,this._minDistance,this._minProbability)),this._createTrack()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"minDistance",{get:function(){return this._minDistance},set:function(t){this._minDistance=+t,this._rawData&&(this._data=s.getContactsObject(s.filterContacts(this._rawData,this._minDistance,this._minProbability)),this._createTrack())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"minProbability",{get:function(){return this._minProbability},set:function(t){this._minProbability=+t,this._rawData&&(this._data=s.getContactsObject(s.filterContacts(this._rawData,this._minDistance,this._minProbability)),this._createTrack())},enumerable:!1,configurable:!0}),e.prototype._getColor=function(t){return this._data.contacts[t]?c(this._data.contacts[t].size/this._data.maxNumberOfContacts):""},e.prototype._dispatchSelectNode=function(t){this._data.selected=t,this.dispatchEvent(u("mouseover",this,Array.from(this._data.contacts[t]).concat(+t).sort()))},e.prototype._createFeatures=function(){var t=this;this.removeEventListener("click",this._resetEventHandler),this.seq_g.selectAll("g.contact-group").remove();var e=this.seq_g.append("g").attr("class","contact-group");this._linksGroup=this.seq_g.append("g").attr("class","links-group"),this.contactPoints=e.selectAll(".contact-point").data(Object.keys(this._data.contacts)).enter().append("circle").attr("class","contact-point").attr("fill",(function(e){return t._getColor(e)})).attr("id",(function(t){return"cp_"+t})).style("stroke-width",2).on("mouseover",(function(e){t._data.isHold||(t._dispatchSelectNode(e),t.refresh())})).on("mouseout",(function(){t._data.isHold||(t._data.selected=void 0,t.dispatchEvent(u("mouseout",t)),t.refresh())})).on("click",(function(e){t._data.isHold=!t._data.isHold,t._data.isHold||t._dispatchSelectNode(e),t.refresh()})),this._linksData=s.contactObjectToLinkList(this._data.contacts)},e.prototype.getRadius=function(t){return(t?.6:.4)*Math.max(2,Math.min(this.height,this.getSingleBaseWidth()))},e.prototype.arc=function(t){var e=this.getXFromSeqPosition(t[0])+this.getSingleBaseWidth()/2,n=this.getXFromSeqPosition(t[1])+this.getSingleBaseWidth()/2,r=.5*this.height,o=this.getSingleBaseWidth();return"M "+e+" "+r+" C "+(e-o)+" "+-r/4+" "+(n+o)+" "+-r/4+" "+n+" "+r},e.prototype.refresh=function(){var t=this;this.contactPoints.attr("cx",(function(e){return t.getXFromSeqPosition(e)+t.getSingleBaseWidth()/2})).transition().attr("cy",.5*this.height).attr("r",(function(e){return t.getRadius(e===t._data.selected)})).attr("stroke",(function(e){return e===t._data.selected&&t._data.isHold?"rgb(127 255 127)":void 0})).style("opacity",(function(e){return e===t._data.selected?1:.4}));var e=this._data.selected?this._linksData.filter((function(e){return e.includes(+t._data.selected)})):[],n=this._linksGroup.selectAll(".contact-link").data(e,(function(t){return t[0]+"_"+t[1]}));n.exit().remove(),n.enter().append("path").attr("class","contact-link").attr("fill","transparent").attr("stroke",this._getColor(this._data.selected)).style("opacity",1).style("pointer-events","none").attr("d",(function(e){return t.arc(e)})).attr("id",(function(t){return"cn_"+t[0]+"_"+t[1]})),n.attr("d",(function(e){return t.arc(e)}))},e}(a.default);e.default=l},869:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.contactObjectToLinkList=e.getContactsObject=e.parseLinks=e.parseLinksAssociative=e.filterContacts=e.parseToRowData=void 0,e.parseToRowData=function(t){return t.split("\n").slice(1).map((function(t){if(""===t.trim())return null;var e=t.trim().split(" ");if(5===e.length){var n=e[0],r=e[1];e[2],e[3];return[+n,+r,+e[4]]}if(3===e.length)return[+(n=e[0]),+(r=e[1]),+e[2]];throw new Error("The file is not valid")})).filter(Boolean)},e.filterContacts=function(t,e,n){return t.filter((function(t){var r=t[0],o=t[1],i=t[2];return Math.abs(r-o)>=e&&i>n}))},e.parseLinksAssociative=function(t,n,r){var o=e.filterContacts(e.parseToRowData(t),n,r),i={},a=[];return o.forEach((function(t){var e=t[0],n=t[1];i[e]||i[n]?i[e]&&!i[n]?(i[n]=i[e],a[i[e]].push(n)):!i[e]&&i[n]?(i[e]=i[n],a[i[e]].push(e)):i[e]&&i[n]&&i[e]!==i[n]&&a[i[n]].forEach((function(t){a[i[e]].push(t),i[t]=i[e]})):(i[e]=a.length,i[n]=a.length,a.push([e,n]))})),{contacts:a.filter((function(t,e){return Object.values(i).includes(e)})).map((function(t){return t.sort((function(t,e){return t-e}))}))}},e.parseLinks=function(t,n,r){var o=e.parseToRowData(t);return e.getContactsObject(e.filterContacts(o,n,r))},e.getContactsObject=function(t){var e={};return t.forEach((function(t){var n=t[0],r=t[1];e[n]||(e[n]=new Set),e[r]||(e[r]=new Set),e[n].add(r),e[r].add(n)})),{contacts:e,maxNumberOfContacts:Math.max.apply(Math,Object.values(e).map((function(t){return t.size})))}},e.contactObjectToLinkList=function(t){var e=[],n=new Set;return Object.entries(t).forEach((function(t){var r=t[0];t[1].forEach((function(t){var o=r+"-"+t,i=[+r,+t];+r>+t&&(o=t+"-"+r,i=[+t,+r]),n.has(o)||(n.add(o),e.push(i))}))})),e},e.default=e.parseLinks},870:function(t,e,n){"use strict";var r=n(603),o=n(585);function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return s(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){c=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw i}}}}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);nt.sequence.length||(this._totalsArray.total[s]++,i&&i.find((function(t){return!0===t.disease}))&&this._totalsArray.diseaseTotal[s]++)}}catch(t){n.e(t)}finally{n.f()}this._createTrack()}}},{key:"_createTrack",value:function(){Object(o.select)(this).selectAll("svg").remove(),this.svg=Object(o.select)(this).append("svg").attr("width",this.width).attr("height",this._height),this.trackHighlighter.appendHighlightTo(this.svg),this._initYScale(),this.refresh()}},{key:"_initYScale",value:function(){this._yScale.domain([0,Math.max(Object(o.max)(this._totalsArray.total),Object(o.max)(this._totalsArray.diseaseTotal))]).range([this._height,0])}},{key:"refresh",value:function(){this.svg&&(this.svg.selectAll("path").remove(),this.svg.append("path").attr("d",this._line(this._totalsArray.diseaseTotal)).attr("fill","none").attr("stroke","red").attr("transform","translate(0,0)"),this.svg.append("path").attr("d",this._line(this._totalsArray.total)).attr("fill","none").attr("stroke","darkgrey").attr("transform","translate(0,0)"),this._updateHighlight())}}])&&c(e.prototype,n),r&&c(e,r),s}(r.default);e.a=d},871:function(t){t.exports=JSON.parse('[{"accession":"chain_A","locations":[{"fragments":[{"start":45,"end":100,"shape":"helix","fill":"transparent","color":"#f06"},{"start":110,"end":200,"shape":"helix","fill":"transparent","color":"#f06"},{"start":5,"end":15,"shape":"strand","color":"#fc0"},{"start":40,"end":43,"shape":"strand","color":"#fc0"}]}]},{"accession":"chain_D","locations":[{"fragments":[{"start":45,"end":51,"shape":"helix","fill":"transparent","color":"#f06"},{"start":55,"end":77,"shape":"helix","fill":"transparent","color":"#f06"},{"start":5,"end":15,"shape":"strand","color":"#fc0"},{"start":19,"end":26,"shape":"strand","color":"#fc0"}]}]}]')},872:function(t,e,n){"use strict";e.unquoteString=function(t){var e=/^"(.*)"$/,n=/^'(.*)'$/;return e.test(t)?t.replace(e,"$1"):n.test(t)?t.replace(n,"$1"):t},e.rulesForCssText=function(t){var e,n=document.implementation.createHTMLDocument(""),r=document.createElement("style");return r.textContent=t,n.body.appendChild(r),e=r.sheet.cssRules,Array.prototype.slice.call(e)},e.cssRulesToText=function(t){return t.reduce((function(t,e){return t+e.cssText}),"")},e.exchangeRule=function(t,n,r){var o=t.indexOf(n);t[o]=e.rulesForCssText(r)[0]},e.changeFontFaceRuleSrc=function(t,n,r){var o="@font-face { font-family: "+n.style.getPropertyValue("font-family")+"; ";n.style.getPropertyValue("font-style")&&(o+="font-style: "+n.style.getPropertyValue("font-style")+"; "),n.style.getPropertyValue("font-weight")&&(o+="font-weight: "+n.style.getPropertyValue("font-weight")+"; "),n.style.getPropertyValue("unicode-range")&&(o+="unicode-range: "+n.style.getPropertyValue("unicode-range")+"; "),o+="src: "+r+"}",e.exchangeRule(t,n,o)}},918:function(t,e,n){"use strict";var r=n(603);function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){for(var n=0;n=e.start&&t.end<=e.end}))}))}))})),t.locations=t.locations.filter((function(t){return t.fragments.length}))}},{key:"_getAccFromFeature",value:function(t){var e="";return"string"==typeof t?e=t:t.accession&&(e=t.accession),e}}],(n=[{key:"init",value:function(t,e){var n=0;if(this.height={},this.yPos={},this.maxYPos=0,t){this.innerPadding=3;for(var r={},o=0;o5&&void 0!==arguments[5]?arguments[5]:{},a=!(arguments.length>6&&void 0!==arguments[6])||arguments[6],s=0;s=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function p(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=a.end?(o.push({start:r.start,end:a.start-1,value:r.value}),o.push({start:a.start,end:a.end,value:a.value+r.value}),r=a.end===r.end?null:{start:a.end+1,end:r.end,value:r.value}):a.startr.end?(o.push({start:a.start,end:r.start-1,value:a.value}),o.push({start:r.start,end:r.end,value:a.value+r.value}),o.push({start:r.end+1,end:a.end,value:a.value}),r=null):a.end>=r.start&&a.end<=r.end?(a.start=a.start&&r.end=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function S(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n1&&void 0!==arguments[1]?arguments[1]:100,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=[];return n&&(r=y({start:1,end:e,value:0},r)),t.forEach((function(t){return t.locations.forEach((function(t){return t.fragments.forEach((function(t){r=y(t,r)}))}))})),r}(this._contributors,this._length),this._data&&this._createTrack()}},{key:"getLayout",value:function(){return new f({layoutHeight:this._height,expanded:this._expanded,padding:2})}},{key:"color",set:function(t){this._color!==t&&(this._color=t,this.refresh())}},{key:"_createResiduePaths",value:function(t){var e=this;return t.selectAll("g.residue").data((function(t){return t.fragments.map((function(e){return b(b({},e),{},{accession:t.accession,feature:b(b({},t.feature),{},{currentResidue:b(b({},e),{},{description:t.location.description})}),location:t.location,k:t.feature.k,i:t.i,j:t.j})}))})).enter().append("path").attr("class","feature rectangle residue").attr("d",(function(t){return e._featureShape.getFeatureShape(e.getSingleBaseWidth(),e._layoutObj.getFeatureHeight("".concat(t.accession,"_").concat(t.k,"_").concat(t.i,"_").concat(t.j)),t.end?t.end-t.start+1:1,"rectangle")})).attr("transform",(function(t){return"translate(".concat(e.getXFromSeqPosition(t.start),",").concat(C+e._layoutObj.getFeatureYPos("".concat(t.accession,"_").concat(t.k,"_").concat(t.i,"_").concat(t.j)),")")})).attr("fill",(function(t){return e._getFeatureColor(t)})).attr("stroke","transparent").call(this.bindEvents,this)}},{key:"_refreshResiduePaths",value:function(t,e){var n=this,r=new Set(t.data().map((function(t){return"".concat(t.feature.accession,"-").concat(t.location.description)}))).size;t.attr("d",(function(t){return n._featureShape.getFeatureShape(n.getSingleBaseWidth(),n._layoutObj.getFeatureHeight("".concat(t.accession,"_").concat(t.k,"_").concat(t.i,"_").concat(t.j)),t.end?t.end-t.start+1:1,"rectangle")})).attr("transform",(function(t){return"translate(".concat(n.getXFromSeqPosition(t.start),",").concat(C+n._layoutObj.getFeatureYPos("".concat(t.accession,"_").concat(t.k,"_").concat(t.i,"_").concat(t.j)),")")})).style("pointer-events",(function(t){return e||t.feature&&t.feature.expanded?"auto":"none"})).style("stroke",(function(){return e?null:"none"})).style("opacity",(function(){return e?null:.8/r})).attr("fill",(function(t){return e||t.feature&&t.feature.expanded?n._getFeatureColor(t):"white"}))}},{key:"_createFeatures",value:function(){var t=this;if(this._layoutObj.init(this._data,this._contributors),this._data.forEach((function(t,e){return t.k=e})),this.featuresG=this.seq_g.selectAll("g.feature-group").data(this._data).enter().append("g").attr("class","feature-group").attr("id",(function(t){return"g_".concat(t.accession)})),this.locations=this.featuresG.selectAll("g.location-group").data((function(t){return t.locations.map((function(e){return b(b({},e),{},{feature:t})}))})).enter().append("g").attr("class","location-group"),this.coverLines=this.locations.selectAll("line.cover").data((function(t){return[t.fragments.reduce((function(e,n){return{start:Math.min(e.start,n.start),end:Math.max(e.end,n.end),feature:t.feature}}),{start:1/0,end:-1/0})]})).enter().append("line").attr("class","cover"),this.features=this.locations.selectAll("path.feature").data((function(t){return t.fragments.map((function(e){return b(b({},e),{},{feature:t.feature,fragments:t.fragments})}))})).enter().append("path").attr("class",(function(e){return"".concat(t._getShape(e)," feature")})).on("click.expanded",(function(){t._expanded?t.removeAttribute("expanded"):t.setAttribute("expanded","expanded")})).call(this.bindEvents,this),this.residues_g=a._createResidueGroup(this.featuresG),this.residues_loc=this._createResiduePaths(this.residues_g),this._contributors){this._contributors.forEach((function(t,e){return t.k=e})),this.children_g||(this.children_g=this.svg.append("g").attr("class","children-features")),this.childrenGroup=this.children_g.append("g").attr("class","children-group"),this.childGroup=this.childrenGroup.selectAll("g.child-group").data(this._contributors).enter().append("g").attr("class","child-group");var e=this.childGroup.selectAll("g.child-location-group").data((function(e){return e.expanded=t._expanded,e.locations.map((function(t){return b(b({},t),{},{feature:e})}))})).enter().append("g").attr("class",(function(t,e){return"child-location-group clg-".concat(e)}));this.coverLinesChildren=e.selectAll("line.cover").data((function(t){return[t.fragments.reduce((function(e,n){return{start:Math.min(e.start,n.start),end:Math.max(e.end,n.end),feature:t.feature}}),{start:1/0,end:-1/0})]})).enter().append("line").attr("class","cover"),this.featureChildren=e.selectAll("path.child-fragment").data((function(t){return t.fragments.map((function(e){return b(b({},e),{},{feature:t.feature,fragments:t.fragments})}))})).enter().append("path").attr("class",(function(e){return"".concat(t._getShape(e)," child-fragment feature")})).call(this.bindEvents,this).on("click.expanded",(function(e){e.feature.expanded=!e.feature.expanded,t.refresh()})),this.child_residues_g=a._createResidueGroup(this.childGroup),this.child_residues_loc=this._createResiduePaths(this.child_residues_g),this._coverage&&this._coverage.length&&this._createCoverage()}this.svg.attr("height",this._layoutObj.maxYPos),this._haveCreatedFeatures=!0}},{key:"_createCoverage",value:function(){this._accession=this._data&&this._data[0]&&this._data[0].accession||"_",this.coverage_mask=this.svg.append("defs").append("mask").attr("id","mask-".concat(this._accession)),this.coverageMaskFragment=this.coverage_mask.selectAll("rect").data(this._coverage).enter().append("rect").attr("y",0).attr("height",this._height)}},{key:"_refreshCoverage",value:function(){var t=this;this.featuresG.attr("mask",this._expanded?null:"url(#mask-".concat(this._accession,")")),this.coverageMaskFragment.attr("x",(function(e){return t.getXFromSeqPosition(e.start)})).attr("width",(function(e){return t.getSingleBaseWidth()*(e.end-e.start+1)})).attr("fill","white").attr("opacity",(function(e){return(e.value/t._contributors.length+.3)/1.3}))}},{key:"_refreshFeatures",value:function(t){var e=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=new Set(t.data().map((function(t){return t.feature.accession}))).size;t.attr("d",(function(t){return e._featureShape.getFeatureShape(e.getSingleBaseWidth(),e._layoutObj.getFeatureHeight(t.feature),t.end?t.end-t.start+1:1,n?e._getShape(t.shape?t:t.feature):"rectangle")})).attr("fill",(function(t){return n?e._getFeatureColor(t.feature):"white"})).attr("opacity",n?1:.8/r).style("stroke",(function(t){return n?e._getFeatureColor(t.feature):"none"})).attr("transform",(function(t){return"translate(".concat(e.getXFromSeqPosition(t.start),",").concat(C+e._layoutObj.getFeatureYPos(t.feature),")")})).style("pointer-events",n?"auto":"none")}},{key:"_refreshCoverLine",value:function(t){var e=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];t.attr("x1",(function(t){return e.getXFromSeqPosition(t.start)})).attr("x2",(function(t){return e.getXFromSeqPosition(t.end+1)})).attr("y1",(function(t){return C+e._layoutObj.getFeatureYPos(t.feature)+e._layoutObj.getFeatureHeight(t.feature)/2})).attr("y2",(function(t){return C+e._layoutObj.getFeatureYPos(t.feature)+e._layoutObj.getFeatureHeight(t.feature)/2})).attr("stroke",(function(t){return e._getFeatureColor(t.feature)})).attr("visibility",n?"visible":"hidden")}},{key:"refresh",value:function(){var t=this;this._haveCreatedFeatures&&(this._layoutObj.expanded=this._expanded,this._layoutObj.init(this._data,this._contributors),this.height=this._layoutObj.maxYPos,this._refreshCoverLine(this.coverLines),this._refreshFeatures(this.features),this._refreshResiduePaths(this.residues_loc,this._expanded),this._contributors&&(this.childrenGroup.attr("visibility",this._expanded?"visible":"hidden"),this._refreshCoverLine(this.coverLinesChildren,this._expanded),this._refreshFeatures(this.featureChildren,this._expanded),this.child_residues_g.attr("visibility",(function(){return t._expanded?"visible":"hidden"})),this._refreshResiduePaths(this.child_residues_loc),this._coverage&&this._coverage.length&&this._refreshCoverage()),this._updateHighlight(),this.svg.attr("height",this._layoutObj.maxYPos))}}])&&E(e.prototype,n),o&&E(e,o),a}(r.default);e.a=R},937:function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=n(1035),i=n(1036);function a(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}e.parse=_,e.resolve=function(t,e){return _(t,!1,!0).resolve(e)},e.resolveObject=function(t,e){return t?_(t,!1,!0).resolveObject(e):e},e.format=function(t){i.isString(t)&&(t=_(t));return t instanceof a?t.format():a.prototype.format.call(t)},e.Url=a;var s=/^([a-z0-9.+-]+:)/i,c=/:[0-9]*$/,u=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,l=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),f=["'"].concat(l),h=["%","/","?",";","#"].concat(f),p=["/","?","#"],d=/^[+a-z0-9A-Z_-]{0,63}$/,g=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,y={javascript:!0,"javascript:":!0},m={javascript:!0,"javascript:":!0},v={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},b=n(1037);function _(t,e,n){if(t&&i.isObject(t)&&t instanceof a)return t;var r=new a;return r.parse(t,e,n),r}a.prototype.parse=function(t,e,n){if(!i.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+r(t));var a=t.indexOf("?"),c=-1!==a&&a127?F+="x":F+=L[D];if(!F.match(d)){var N=R.slice(0,j),I=R.slice(j+1),H=L.match(g);H&&(N.push(H[1]),I.unshift(H[2])),I.length&&(_="/"+I.join(".")+_),this.hostname=N.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),C||(this.hostname=o.toASCII(this.hostname));var q=this.port?":"+this.port:"",V=this.hostname||"";this.host=V+q,this.href+=this.host,C&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==_[0]&&(_="/"+_))}if(!y[O])for(j=0,T=f.length;j0)&&n.host.split("@"))&&(n.auth=P.shift(),n.host=n.hostname=P.shift());return n.search=t.search,n.query=t.query,i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!O.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var x=O.slice(-1)[0],A=(n.host||t.host||O.length>1)&&("."===x||".."===x)||""===x,k=0,j=O.length;j>=0;j--)"."===(x=O[j])?O.splice(j,1):".."===x?(O.splice(j,1),k++):k&&(O.splice(j,1),k--);if(!w&&!S)for(;k--;k)O.unshift("..");!w||""===O[0]||O[0]&&"/"===O[0].charAt(0)||O.unshift(""),A&&"/"!==O.join("/").substr(-1)&&O.push("");var P,C=""===O[0]||O[0]&&"/"===O[0].charAt(0);E&&(n.hostname=n.host=C?"":O.length?O.shift():"",(P=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=P.shift(),n.host=n.hostname=P.shift()));return(w=w||n.host&&O.length)&&!C&&O.unshift(""),O.length?n.pathname=O.join("/"):(n.pathname=null,n.path=null),i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=t.auth||n.auth,n.slashes=n.slashes||t.slashes,n.href=n.format(),n},a.prototype.parseHost=function(){var t=this.host,e=c.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},938:function(t,e){(function(e){t.exports=e}).call(this,{})}}]); \ No newline at end of file diff --git a/v3/7.js b/v3/7.js new file mode 100644 index 000000000..8d9ee0731 --- /dev/null +++ b/v3/7.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[7],{1075:function(t,e,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]8&&(c.sampleData=a.filter((function(t,e){return t.length&&e>8}))),n.push(c)}}return n};e.vcfToJSON=function(t,e){return i(void 0,void 0,void 0,(function(){var n,s;return o(this,(function(u){switch(u.label){case 0:return[4,c(t)];case 1:return n=u.sent(),(null==e?void 0:e.runVEP)?[4,(l=n.map((function(t){return t.vcfLine})),i(void 0,void 0,void 0,(function(){var t;return o(this,(function(e){switch(e.label){case 0:return[4,a.default.post("https://rest.ensembl.org/vep/homo_sapiens/region?uniprot=true",{variants:l},{headers:{"Content-Type":"application/json"}}).catch((function(t){throw new Error("Error loading VEP data: "+t)}))];case 1:return(t=e.sent())?[2,new Map(t.data.map((function(t){return[t.seq_region_name+":"+t.start,t]})))]:[2,null]}}))})))]:[3,3];case 2:if(s=u.sent())return[2,n.map((function(t){var e=s.get(t.chrom+":"+t.pos);return e?r(r({},t),{vep:e}):t}))];throw new Error("Could not load VEP data");case 3:return[2,n]}var l}))}))}},1076:function(t,e,n){t.exports=n(1077)},1077:function(t,e,n){"use strict";var r=n(660),i=n(981),o=n(1078),a=n(987);function c(t){var e=new o(t),n=i(o.prototype.request,e);return r.extend(n,o.prototype,e),r.extend(n,e),n}var s=c(n(984));s.Axios=o,s.create=function(t){return c(a(s.defaults,t))},s.Cancel=n(988),s.CancelToken=n(1091),s.isCancel=n(983),s.all=function(t){return Promise.all(t)},s.spread=n(1092),s.isAxiosError=n(1093),t.exports=s,t.exports.default=s},1078:function(t,e,n){"use strict";var r=n(660),i=n(982),o=n(1079),a=n(1080),c=n(987);function s(t){this.defaults=t,this.interceptors={request:new o,response:new o}}s.prototype.request=function(t){"string"==typeof t?(t=arguments[1]||{}).url=arguments[0]:t=t||{},(t=c(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var e=[a,void 0],n=Promise.resolve(t);for(this.interceptors.request.forEach((function(t){e.unshift(t.fulfilled,t.rejected)})),this.interceptors.response.forEach((function(t){e.push(t.fulfilled,t.rejected)}));e.length;)n=n.then(e.shift(),e.shift());return n},s.prototype.getUri=function(t){return t=c(this.defaults,t),i(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(t){s.prototype[t]=function(e,n){return this.request(c(n||{},{method:t,url:e,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(t){s.prototype[t]=function(e,n,r){return this.request(c(r||{},{method:t,url:e,data:n}))}})),t.exports=s},1079:function(t,e,n){"use strict";var r=n(660);function i(){this.handlers=[]}i.prototype.use=function(t,e){return this.handlers.push({fulfilled:t,rejected:e}),this.handlers.length-1},i.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},i.prototype.forEach=function(t){r.forEach(this.handlers,(function(e){null!==e&&t(e)}))},t.exports=i},1080:function(t,e,n){"use strict";var r=n(660),i=n(1081),o=n(983),a=n(984);function c(t){t.cancelToken&&t.cancelToken.throwIfRequested()}t.exports=function(t){return c(t),t.headers=t.headers||{},t.data=i(t.data,t.headers,t.transformRequest),t.headers=r.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete t.headers[e]})),(t.adapter||a.adapter)(t).then((function(e){return c(t),e.data=i(e.data,e.headers,t.transformResponse),e}),(function(e){return o(e)||(c(t),e&&e.response&&(e.response.data=i(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)}))}},1081:function(t,e,n){"use strict";var r=n(660);t.exports=function(t,e,n){return r.forEach(n,(function(n){t=n(t,e)})),t}},1082:function(t,e,n){"use strict";var r=n(660);t.exports=function(t,e){r.forEach(t,(function(n,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[r])}))}},1083:function(t,e,n){"use strict";var r=n(986);t.exports=function(t,e,n){var i=n.config.validateStatus;n.status&&i&&!i(n.status)?e(r("Request failed with status code "+n.status,n.config,null,n.request,n)):t(n)}},1084:function(t,e,n){"use strict";t.exports=function(t,e,n,r,i){return t.config=e,n&&(t.code=n),t.request=r,t.response=i,t.isAxiosError=!0,t.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},t}},1085:function(t,e,n){"use strict";var r=n(660);t.exports=r.isStandardBrowserEnv()?{write:function(t,e,n,i,o,a){var c=[];c.push(t+"="+encodeURIComponent(e)),r.isNumber(n)&&c.push("expires="+new Date(n).toGMTString()),r.isString(i)&&c.push("path="+i),r.isString(o)&&c.push("domain="+o),!0===a&&c.push("secure"),document.cookie=c.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},1086:function(t,e,n){"use strict";var r=n(1087),i=n(1088);t.exports=function(t,e){return t&&!r(e)?i(t,e):e}},1087:function(t,e,n){"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},1088:function(t,e,n){"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},1089:function(t,e,n){"use strict";var r=n(660),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];t.exports=function(t){var e,n,o,a={};return t?(r.forEach(t.split("\n"),(function(t){if(o=t.indexOf(":"),e=r.trim(t.substr(0,o)).toLowerCase(),n=r.trim(t.substr(o+1)),e){if(a[e]&&i.indexOf(e)>=0)return;a[e]="set-cookie"===e?(a[e]?a[e]:[]).concat([n]):a[e]?a[e]+", "+n:n}})),a):a}},1090:function(t,e,n){"use strict";var r=n(660);t.exports=r.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(t){var r=t;return e&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return t=i(window.location.href),function(e){var n=r.isString(e)?i(e):e;return n.protocol===t.protocol&&n.host===t.host}}():function(){return!0}},1091:function(t,e,n){"use strict";var r=n(988);function i(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise((function(t){e=t}));var n=this;t((function(t){n.reason||(n.reason=new r(t),e(n.reason))}))}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.source=function(){var t;return{token:new i((function(e){t=e})),cancel:t}},t.exports=i},1092:function(t,e,n){"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},1093:function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}t.exports=function(t){return"object"===r(t)&&!0===t.isAxiosError}},1094:function(t,e){t.exports='

    protvista-variation

    \n

    Published on NPM

    \n

    This custom element displays a matrix of amino-acid changes at a given position on the protein sequence. The advantage of a matrix-based approach is that even with a large number of variants (every single amino-acid change per location) the space taken by the visualisation on the screen doesn't change.

    \n

    Demo

    \n

    Usage

    \n
    <protvista-variation length="270"></protvista-variation>
    \n

    Setting the data through property

    \n
    const track = document.querySelector('#my-track-id');\ntrack.data = myDataObject

    Setting data through <data-loader>

    \n
    <protvista-variation length="770">\n    <protvista-variation-adapter>\n        <data-loader>\n          <source src="https://www.ebi.ac.uk/proteins/api/variation/P05067" />\n        </data-loader>\n    </protvista-variation-adapter>\n</protvista-variation>

    API Reference

    \n

    Properties

    \n

    data: Object

    \n
    {\n      sequence: string,\n      variants: [{\n          accession: String,\n          start: Number,\n          end: Number,\n          color?: String,\n          tooltipContent?: String\n      }]\n}

    height?: number (default 430)

    \n

    The height of the visualisation (in px).

    \n

    also see protvista-track

    \n'},174:function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(629),a=n(803),c=n(745),s=n(115),u=n(28),l=n(620),f=n(1075);function h(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=t&&("undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"]);if(null==n)return;var r,i,o=[],a=!0,c=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(t){c=!0,i=t}finally{try{a||null==n.return||n.return()}finally{if(c)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return p(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n1&&void 0!==arguments[1]?arguments[1]:1,r=arguments.length>2?arguments[2]:void 0;return"object"!==d(e)?"".concat(e,""):"".concat(Object.entries(e).map((function(e){var i=h(e,2),o=i[0],a=i[1];if(null==r?void 0:r.includes(o))return"";if(Array.isArray(a)){var c="".concat(a.map((function(e){return t(e,n++,r)})).join(""));return"

    ".concat(o,"

    ").concat(c,"
    ")}return"object"===d(a)?"

    ".concat(o,"

    ").concat(t(a,n++,r),"
    "):'').concat(o,'').concat(a,"")})).join(""))},v=function(t,e){return t.map((function(t){var n,r,i=null===(n=t.vep)||void 0===n?void 0:n.transcript_consequences.find((function(t){var n=t.swissprot,r=t.trembl;return n&&n.find((function(t){return t.startsWith(e)}))||r&&r.find((function(t){return t.startsWith(e)}))}));if(i){var o=h(null===(r=i.amino_acids)||void 0===r?void 0:r.split("/"),2),a=o[0],c=o[1];return{accession:t.id,variant:c,start:i.protein_start.toString(),begin:i.protein_start.toString(),end:i.protein_end.toString(),type:"variant",cytogeneticBand:"",genomicLocation:"",locations:[],consequenceType:"",xrefs:[],wildType:a,somaticStatus:0,sourceType:"VCF",xrefNames:[],hasPredictions:!1,tooltipContent:"".concat("").concat(m(t,0,["vcfLine","input"])),protvistaFeatureId:t.id}}return null})).filter((function(t){return t}))};function b(t){return(b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function _(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}function w(t,e){for(var n=0;ns){var l=[s,c];c=l[0],s=l[1]}if(ce.max&&(s=e.max),Number.isNaN(c))throw new Error("The parsed value of ".concat(i," is NaN. Region: ").concat(t));if(Number.isNaN(s))throw new Error("The parsed value of ".concat(o," is NaN. Region: ").concat(t));if(u&&!u.match(/^#[0-9a-f]{6,8}$/i))throw new Error("The parsed value of ".concat(a," is not a color in hex format. Region: ").concat(t));return{start:c,end:s,color:u}})):this.segments=[]}}])&&a(e.prototype,n),i&&a(e,i),t}();function s(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:400;p(this,t),this.element=e,this.timeStampWheelOutside=0,this.resetScrollableTimeout=null,this.scrollDelay=n}var e,n,r;return e=t,(n=[{key:"setElementScrollable",value:function(t){this.element.setAttribute("scrollable",t)}},{key:"startResetScrollableTimer",value:function(){var t=this;this.resetScrollableTimeout&&clearTimeout(this.resetScrollableTimeout),this.resetScrollableTimeout=setTimeout((function(){t.setElementScrollable(!0),t.resetScrollableTimeout=null}),this.scrollDelay)}},{key:"blockScroll",value:function(t){this.timeStampWheelOutside=t,this.setElementScrollable(!1),this.startResetScrollableTimer()}},{key:"wheel",value:function(t){var e=t.target,n=t.timeStamp;this.element.contains(e)?n=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,c=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){c=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw o}}}}function v(t){return function(t){if(Array.isArray(t))return _(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||b(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(t,e){if(t){if("string"==typeof t)return _(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_(t,e):void 0}}function _(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&void 0!==arguments[0]?arguments[0]:null,e=[],n=[];if(null!==t&&"string"!=typeof t)throw new Error("The attribute text has to be of type string");if(t&&""!==t.trim()){var r=t.split(",").map((function(t){return t.split(":")}));if(r.length<2)throw new Error("There should be at least 2 points to create a scale");e=r.map((function(t){var e=t[0].trim().toUpperCase();if(!f(e))throw new Error("The color '".concat(e," is not valid'"));return e})),n=r.map((function(t,e){var n=parseFloat(t[1]);if(Number.isNaN(n))throw new Error("The second part of every point should be a number. Error in point ".concat(e,": ").concat(t));return n}))}return{range:e,domain:n}},N=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.keyFormatter,r=void 0===n?h:n,i=e.valueFormatter,o=void 0===i?h:i;if(null!==t&&"string"!=typeof t)throw new Error("The attribute text has to be of type string");if(t&&""!==t.trim()){var a=t.split(",").map((function(t){return t.split(":")})),c={};return a.forEach((function(t){if(2!==t.length)throw new Error("Bad block: ".concat(t.join(":"),"\n The blocks of the string should follow the format KEY:VALUE"));c[r(t[0])]=o(t[1])})),c}return{}},F=g,D=function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{initialValue:{top:0,bottom:0,left:0,right:0}},r=function(t){j(r,t);var e=P(r);function r(){var t;return w(this,r),(t=e.call(this)).margin=n.initialValue,t}return S(r,[{key:"attributeChangedCallback",value:function(t,e,n){e!==n&&T.includes(t)&&(this[t]=n),E(A(r.prototype),"attributeChangedCallback",this).call(this,t,e,n)}}],[{key:"observedAttributes",get:function(){return[].concat(v(E(A(r),"observedAttributes",this)),v(T))}}]),r}(t),i=m(x);try{var o=function(){var t=e.value;Object.defineProperty(r.prototype,"margin".concat(t),{get:function(){return this.margin[t]||0},set:function(e){this.margin[t]=+e}})};for(i.s();!(e=i.n()).done;)o()}catch(t){i.e(t)}finally{i.f()}return r}},594:function(t,e,n){"use strict";var r=n(608),i=n(604);e.a=function(t){return Object(i.a)(t)&&Object(r.a)(t)}},595:function(t,e,n){"use strict";e.a=function(t,e,n){for(var r=-1,i=null==t?0:t.length;++r-1}},598:function(t,e,n){"use strict";var r=n(614);var i=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)},o=Math.max;var a=function(t,e,n){return e=o(void 0===e?t.length-1:e,0),function(){for(var r=arguments,a=-1,c=o(r.length-e,0),s=Array(c);++a0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(u);e.a=function(t,e){return f(a(t,e,r.a),t+"")}},599:function(t,e,n){"use strict";var r=function(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o-1:!!a&&Object(i.a)(t,e,n)>-1},A=n(632),x=n(619),T=n(613),R=n(609);function L(t,e){for(var n=0;n5&&(t=this._ftWidth-5);var e=this._ftHeight/4;return"M0,"+e+"L"+t+","+e+"L"+t+","+3*e+"L0,"+3*e+"L0,"+e+"M"+t+",0L"+this._ftWidth+","+2*e+"L"+t+","+this._ftHeight+"Z"}}])&&L(e.prototype,n),r&&L(e,r),t}();function N(t,e){for(var n=0;nNumber(n.end)||Number(r.end)=0?(e._rows[n].push(t),e.featuresMap.set(t,n)):(e._rows.push([t]),e.featuresMap.set(t,e._rows.length-1))})),this._rowHeight=Math.min(this._layoutHeight/this._rows.length,this._minHeight)}},{key:"getOffset",value:function(){return this._rows.length*this._rowHeightt.length)&&(e=t.length);for(var n=0,r=new Array(e);n500&&(n=t.getSingleBaseWidth()<4?4:1),t._featureShape.getFeatureShape(t.getSingleBaseWidth()/2,t._layoutObj.getFeatureHeight(),n,t._getShape(e))})).attr("transform",(function(e){return"translate(".concat(t.getXFromSeqPosition(Number(e.feature.start)+Number(e.position)-1)+t.getSingleBaseWidth()/4,",\n ").concat(t._layoutObj.getFeatureYPos(e.feature),")")})).attr("fill","#06038D").style("fill-opacity",(function(t){var e=t.feature;return e.opacity?e.opacity:.9})).style("stroke-opacity",(function(t){var e=t.feature;return e.opacity?e.opacity:.9})).call(this.bindEvents,this)}},{key:"_applyFilters",value:function(){var t=this;if(!this._filters||this._filters.length<=0)this._data=this._originalData;else{var e=Object(A.a)(this._filters,"category"),n=Object.values(e).map((function(e){var n=e.map((function(e){return e.filterFn(t._originalData)}));return x.a.apply(void 0,$(n))})),r=T.a.apply(void 0,$(n));this._data=r}}},{key:"refresh",value:function(){var t=this;if(this.xScale&&this.seq_g){var e=this.seq_g.selectAll("g.fragment-group").data(this._data.reduce((function(t,e){return t.concat(e.locations.reduce((function(t,n){return t.concat(n.fragments.map((function(t){return Object.assign({},t,{feature:e})})))}),[]))}),[])),n=this.seq_g.selectAll("g.residue-group").data(this._data.reduce((function(t,e){var n;return t.concat([null===(n=e.ptms)||void 0===n?void 0:n.reduce((function(t){return t.concat((function(t){return Object.assign({},t,{feature:e,position:t.position})}))}),[])])}),[]));e.selectAll("path.feature").attr("d",(function(e){return t._featureShape.getFeatureShape(t.getSingleBaseWidth(),t._layoutObj.getFeatureHeight(e),e.end?e.end-e.start+1:1,t._getShape(e))})).attr("transform",(function(e){return"translate(".concat(t.getXFromSeqPosition(e.start),",").concat(t._layoutObj.getFeatureYPos(e.feature),")")})),n.selectAll("path.residue").attr("d",(function(e){var n=1;return t.length>500&&(n=t.getSingleBaseWidth()<4?4:1),t._featureShape.getFeatureShape(t.getSingleBaseWidth()/2,t._layoutObj.getFeatureHeight(e),n,t._getShape(e))})).attr("transform",(function(e){return"translate(".concat(t.getXFromSeqPosition(Number(e.feature.start)+Number(e.position)-1)+t.getSingleBaseWidth()/4,",").concat(t._layoutObj.getFeatureYPos(e.feature),")")})),e.selectAll("rect.outer-rectangle").attr("width",(function(e){return t.getSingleBaseWidth()*(e.end?e.end-e.start+1:1)})).attr("height",(function(e){return t._layoutObj.getFeatureHeight(e)})).attr("transform",(function(e){return"translate(".concat(t.getXFromSeqPosition(e.start),",").concat(t._layoutObj.getFeatureYPos(e.feature),")")})),this._updateHighlight()}}},{key:"_updateHighlight",value:function(){this.trackHighlighter.updateHighlight()}}])&&J(e.prototype,n),i&&J(e,i),a}(R.a);e.default=it},609:function(t,e,n){"use strict";var r=n(585),i=n(593),o=n(665);function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function c(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=t&&("undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"]);if(null==n)return;var r,i,o=[],a=!0,c=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(t){c=!0,i=t}finally{try{a||null==n.return||n.return()}finally{if(c)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return s(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4?arguments[4]:void 0,a=arguments.length>5?arguments[5]:void 0,c=arguments.length>6?arguments[6]:void 0;e&&(e=e.feature?e.feature:e);var s={eventtype:t,coords:m._getClickCoords(),feature:e,target:c};return n&&(e&&e.fragments?s.highlight=e.fragments.map((function(t){return"".concat(t.start,":").concat(t.end)})).join(","):r.event&&r.event.shiftKey&&this._highlight?s.highlight="".concat(this._highlight,",").concat(o,":").concat(a):s.highlight=o&&a?"".concat(o,":").concat(a):null),i&&(s.selectedid=e&&e.protvistaFeatureId),new CustomEvent("change",{detail:s,bubbles:!0,cancelable:!0})}},{key:"bindEvents",value:function(t,e){t.on("mouseover",(function(t,n,r){e.dispatchEvent(e.createEvent("mouseover",t,"onmouseover"===e._highlightEvent,!1,t.start,t.end,r[n]))})).on("mouseout",(function(){e.dispatchEvent(e.createEvent("mouseout",null,"onmouseover"===e._highlightEvent))})).on("click",(function(t,n,r){e.dispatchEvent(e.createEvent("click",t,"onclick"===e._highlightEvent,!0,t.start,t.end,r[n]))}))}}])&&u(a.prototype,s),h&&u(a,h),m}(h(HTMLElement));e.a=Object(i.f)(m,{initialValue:{top:10,right:10,bottom:10,left:10}})},613:function(t,e,n){"use strict";var r=n(590),i=n(621),o=n(596),a=n(595),c=n(664),s=n(616),u=Math.min;var l=function(t,e,n){for(var l=n?a.a:o.a,f=t[0].length,h=t.length,p=h,d=Array(h),g=1/0,y=[];p--;){var m=t[p];p&&e&&(m=Object(r.a)(m,Object(c.a)(e))),g=u(m.length,g),d[p]=!n&&(e||f>=120&&m.length>=120)?new i.a(p&&m):void 0}m=t[0];var v=-1,b=d[0];t:for(;++v=200){var g=e?null:h(t);if(g)return Object(f.a)(g);l=!1,i=s.a,d=new o.a}else d=e?[]:p;t:for(;++rt.length)&&(e=t.length);for(var n=0,r=new Array(e);n".concat(t.map((function(t){var e,n,r=i.find((function(e){return e.name===t.code}));return r?"
  • ').concat(r.shortDescription,": ").concat(t.source?(e=t.source,(null===(n=e.name)||void 0===n?void 0:n.toLowerCase())==="PubMed".toLowerCase()?"".concat(e.id," (").concat(e.name," EuropePMC)"):" ").concat(e.id," ").concat(e.name?"(".concat(e.name,")"):"")):"","
  • "):""})).join(""),"\n "):""},f=function(t){return"
      ".concat(t.map((function(t){return'
    • '.concat(t.name," ").concat(t.url?'').concat(t.id,""):"".concat(t.name," ").concat(t.id),"
    • ")})).join(""),"
    ")},h={A:"alanine",S:"serine",T:"threonine",Y:"tyrosine"},p=function(t,e){var n=t.peptide,r=t.begin,i=Number(r)+e.position-1,o=n.charAt(e.position-1);return"".concat(i," phospho").concat(h[o])},d=function(t){var e="PROTEOMICS_PTM"===t.type?function(t){if(!t)return"";var e=t.flatMap((function(t){return t.dbReferences.map((function(t){return t.id}))})),n=o(new Set(e.flat()));return"\n
      ".concat(n.map((function(t){var e="Glue project"===t?"PXD012174":t;return"
    • ').concat(e,' (PRIDE\n ').concat("Glue project"===t?')
    • Publication: 31819260 (PubMed)
    • ':' PeptideAtlas)')})).join(""),"
    \n")}(t.ptms):l(t.evidences),n="PROTEOMICS_PTM"===t.type&&t.ptms.map((function(e){return p(t,e)})),r="PROTEOMICS_PTM"===t.type&&t.ptms.flatMap((function(t){return t.dbReferences.map((function(t){return t.id}))})),i=t.description;if("BINDING"===t.type||"Binding site"===t.type){var a="";t.ligandPart&&(a+="".concat(t.ligandPart.name," of ")),t.ligand&&(a+=t.ligand.name),t.description&&(a+="; ".concat(t.description)),i=a}try{return"\n ".concat(i?"
    Description

    ".concat(i,"

    "):"","\n ").concat(t.matchScore?"
    Match score

    ".concat(t.matchScore,"%

    "):"","\n ").concat(t.ftId?"
    Feature ID

    ".concat(t.ftId,"

    "):"","\n ").concat(t.alternativeSequence?"
    Alternative sequence

    ".concat(t.alternativeSequence,"

    "):"","\n ").concat(n?'
    PTMs
      '.concat(n.map((function(t){return"
    • ".concat(t,"
    • ")})).join(""),"
    \n "):"","\n ").concat(t.peptide&&"PROTEOMICS_PTM"===t.type?'
    Peptidoform

    '.concat(function(t,e){if(!e)return"";var n=e.map((function(t){return{name:t.name,position:t.position}})),r="",i=0;return n.forEach((function(e){r="".concat(r).concat(t.slice(i,e.position),"[").concat(e.name,"]"),i=e.position})),r="".concat(r).concat(t.slice(i)),"

    ".concat(r,"

    ")}(t.peptide,t.ptms),"

    "):"","\n ").concat(t.peptide&&"PROTEOMICS_PTM"!==t.type?"
    Peptide

    ".concat(t.peptide,"

    "):""," \n ").concat(t.xrefs?"
    Cross-references
    ".concat(f(t.xrefs)):"","\n ").concat(e?"
    Evidence
    ".concat(e):"","\n ").concat(t.ptms&&r&&!r.includes("Glue project")?'
    PTM statistical attributes
      '.concat(t.ptms.map((function(e){return e.dbReferences.map((function(n){return"
    • ".concat(n.id,'
    • \n
    • ').concat(p(t,e),'
    • \n
    • PubMed ID: \n ').concat(n.properties["Pubmed ID"],'\n
    • \n
    • Confidence score: ').concat(n.properties["Confidence score"],'
    • \n
    • Universal Spectrum Id: \n View on ProteomeXchange\n
    • \n
    • PSM Count: ').concat(n.properties["PSM Count"],'
    • \n
    • Site probability: ').concat(n.properties["Site probability"],"
    • \n ")})).join("")})).join(""),"
    "):"","\n ")}catch(t){return console.error(t),""}};function g(t){return(g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function y(t,e){for(var n=0;n0&&(e=function(t){return t.map((function(t){var e={};return t.begin&&(e.start=t.begin),s(s({},t),e)}))}(e=n.map((function(t){return E(E({},t),{},{tooltipContent:d(t),protvistaFeatureId:Object(r.a)()})})))),e},P=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&w(t,e)}(c,t);var e,n,r,i,o,a=(e=c,n=_(),function(){var t,r=O(e);if(n){var i=O(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return m(this,t)});function c(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,c),(t=a.call(this))._adaptedData=[],t}return r=c,(i=[{key:"connectedCallback",value:function(){this.subscribers=this.getAttribute("subscribers"),this._filters=this.getAttribute("filters")?this.getAttribute("filters").split(","):[],this._addLoaderListeners()}},{key:"data",set:function(t){this._emitEvent(t)}},{key:"subscribers",get:function(){return this._subscribers},set:function(t){t&&(this._subscribers=t.split(","))}},{key:"parseEntry",value:function(t){this._adaptedData=k(t)}},{key:"filterData",value:function(){var t=this;Array.isArray(this._adaptedData)&&this._filters.length>0&&(this._adaptedData=this._adaptedData.filter((function(e){return t._filters.includes(e.type)})))}},{key:"adaptedData",get:function(){return this._adaptedData}},{key:"_setSubscriberData",value:function(){var t=this;this.subscribers.forEach((function(e){var n=document.querySelector(e);n?n.data=t._adaptedData:console.error("Element with id '".concat(e,"' not found"))}))}},{key:"_emitEvent",value:function(t){this.parseEntry(t),this.filterData(),this.subscribers&&this._setSubscriberData(),this.dispatchEvent(new CustomEvent("load",{detail:{payload:this._adaptedData},bubbles:!0,cancelable:!0}))}},{key:"_addLoaderListeners",value:function(){var t=this;this.addEventListener("load",(function(e){if(e.target!==t){e.stopPropagation();try{if(e.detail.payload.errorMessage)throw e.detail.payload.errorMessage;t._emitEvent(e.detail.payload)}catch(e){t.dispatchEvent(new CustomEvent("error",{detail:e,bubbles:!0,cancelable:!0}))}}}))}}])&&y(r.prototype,i),o&&y(r,o),c}(v(HTMLElement));e.a=P},629:function(t,e,n){"use strict";n.d(e,"b",(function(){return m}));var r=n(675);function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return a(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return a(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,c=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return c=t.done,t},e:function(t){s=!0,o=t},f:function(){try{c||null==n.return||n.return()}finally{if(s)throw o}}}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n1&&void 0!==arguments[1]?arguments[1]:new Headers({accept:"application/json"}),n=y.get(t);if(n)return n;var r=g(void 0,void 0,void 0,regeneratorRuntime.mark((function n(){var r,i;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,window.fetch(t,{headers:e});case 2:if((r=n.sent).ok){n.next=5;break}throw new Error("Request Failed: Status = ".concat(r.status,"; URI = ").concat(t,"; Time = ").concat(new Date));case 5:if(204!==r.status){n.next=7;break}return n.abrupt("return",{payload:null,headers:r.headers});case 7:return n.next=9,r.json();case 9:return i=n.sent,n.abrupt("return",{payload:i,headers:r.headers});case 11:case"end":return n.stop()}}),n)})));return y.set(t,r),r.catch((function(){return y.delete(t)})),r},v=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&h(t,e)}(y,t);var e,n,i,a,u,l=(e=y,n=f(),function(){var t,r=p(e);if(n){var i=p(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return s(this,t)});function y(){var t;return d(this,y),(t=l.call(this))._data=null,t.selector=(t.getAttribute("selector")||"").trim()||function(t){return t},t}return i=y,u=[{key:"is",get:function(){return"data-loader"}}],(a=[{key:"fetch",value:function(){return g(this,void 0,void 0,regeneratorRuntime.mark((function t(){var e,n,i,a,c,s;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(u=this.children,(e=Array.from(u).filter((function(t){return t.matches('source[src], script[type="application/json"]')}))).length){t.next=3;break}return t.abrupt("return");case 3:n=[],a=o(e),t.prev=5,a.s();case 7:if((c=a.n()).done){t.next=31;break}if(s=c.value,t.prev=9,!(s instanceof HTMLSourceElement)){t.next=22;break}return t.t0=Object,t.t1=Object,t.t2={},t.next=16,m(s.src);case 16:t.t3=t.sent,t.t4=t.t1.assign.call(t.t1,t.t2,t.t3),t.t5={srcElement:s,src:s.src},i=t.t0.assign.call(t.t0,t.t4,t.t5),t.next=23;break;case 22:i={payload:JSON.parse(s.textContent)};case 23:return t.abrupt("break",31);case 26:t.prev=26,t.t6=t.catch(9),n.push(t.t6);case 29:t.next=7;break;case 31:t.next=36;break;case 33:t.prev=33,t.t7=t.catch(5),a.e(t.t7);case 36:return t.prev=36,a.f(),t.finish(36);case 39:if(i){t.next=43;break}this._errors=n;try{this.dispatchEvent(new CustomEvent("error",{detail:n,bubbles:!0,cancelable:!0}))}catch(t){console.error(t)}return t.abrupt("return");case 43:"string"==typeof this.selector?this._data=Object(r.a)(i.payload,this.selector):this._data=this.selector(i.payload),i.payload=this.data,this.dispatchEvent(new CustomEvent("load",{detail:i,bubbles:!0,cancelable:!0}));case 46:case"end":return t.stop()}var u}),t,this,[[5,33,36,39],[9,26]])})))}},{key:"data",get:function(){return this._data}},{key:"loaded",get:function(){return!!this.data}},{key:"errors",get:function(){return this._errors}},{key:"selector",get:function(){return this._selector},set:function(t){this._selector=t}},{key:"connectedCallback",value:function(){this.fetch()}}])&&c(i.prototype,a),u&&c(i,u),y}(u(HTMLElement));e.a=v},660:function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=n(981),o=Object.prototype.toString;function a(t){return"[object Array]"===o.call(t)}function c(t){return void 0===t}function s(t){return null!==t&&"object"===r(t)}function u(t){if("[object Object]"!==o.call(t))return!1;var e=Object.getPrototypeOf(t);return null===e||e===Object.prototype}function l(t){return"[object Function]"===o.call(t)}function f(t,e){if(null!=t)if("object"!==r(t)&&(t=[t]),a(t))for(var n=0,i=t.length;n1)for(var n=1;n1&&void 0!==arguments[1]?arguments[1]:0,n=(s[t[e+0]]+s[t[e+1]]+s[t[e+2]]+s[t[e+3]]+"-"+s[t[e+4]]+s[t[e+5]]+"-"+s[t[e+6]]+s[t[e+7]]+"-"+s[t[e+8]]+s[t[e+9]]+"-"+s[t[e+10]]+s[t[e+11]]+s[t[e+12]]+s[t[e+13]]+s[t[e+14]]+s[t[e+15]]).toLowerCase();if(!c(n))throw TypeError("Stringified UUID is invalid");return n},p=0,d=0;e.a=function(t,e,n){var r=e&&n||0,i=e||new Array(16),a=(t=t||{}).node||l,c=void 0!==t.clockseq?t.clockseq:f;if(null==a||null==c){var s=t.random||(t.rng||o)();null==a&&(a=l=[1|s[0],s[1],s[2],s[3],s[4],s[5]]),null==c&&(c=f=16383&(s[6]<<8|s[7]))}var u=void 0!==t.msecs?t.msecs:Date.now(),g=void 0!==t.nsecs?t.nsecs:d+1,y=u-p+(g-d)/1e4;if(y<0&&void 0===t.clockseq&&(c=c+1&16383),(y<0||u>p)&&void 0===t.nsecs&&(g=0),g>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");p=u,d=g,f=c;var m=(1e4*(268435455&(u+=122192928e5))+g)%4294967296;i[r++]=m>>>24&255,i[r++]=m>>>16&255,i[r++]=m>>>8&255,i[r++]=255&m;var v=u/4294967296*1e4&268435455;i[r++]=v>>>8&255,i[r++]=255&v,i[r++]=v>>>24&15|16,i[r++]=v>>>16&255,i[r++]=c>>>8|128,i[r++]=255&c;for(var b=0;b<6;++b)i[r+b]=a[b];return e||h(i)}},745:function(t,e,n){"use strict";var r,i,o,a,c,s,u,l=n(620),f=n(743),h=n(632),p=function(t){return"\n
    Variant

    ".concat(t.wildType," > ").concat(t.alternativeSequence||"","

    \n ").concat(t.populationFrequencies?(o=t.populationFrequencies,"
    Population frequencies
    ".concat(o.map((function(t){return"

    ".concat(t.frequency," - ").concat(t.populationName," (").concat(t.source,")

    ")})).join(""))):"","\n ").concat(t.consequenceType?"
    Consequence

    ".concat(t.consequenceType,"

    "):"","\n ").concat(t.somaticStatus?"
    Somatic

    ".concat(0===t.somaticStatus?"No":"Yes","

    "):"","\n ").concat(t.genomicLocation?"
    Location

    ".concat(t.genomicLocation,"

    "):"","\n ").concat(t.ftId?"
    Feature ID

    ".concat(t.ftId,"

    "):"","\n ").concat(t.descriptions?(i=t.descriptions,"
    Description
    ".concat(i.map((function(t){return"

    ".concat(t.value,"

    ")})).join(""),"\n ")):"","\n ").concat(t.association?(r=t.association,null==r?void 0:r.map((function(t){return"\n

    Disease association

    ".concat(t.name,"

    \n ").concat(t.description?"<>".concat(t.description,"

    "):"","\n ").concat(t.dbReferences?"
    Cross-references
    ".concat(Object(l.b)(t.dbReferences)):"","\n ").concat(Object(l.c)(t.evidences),"\n ")})).join("")):"","\n ").concat(t.predictions?(e=t.predictions,n=Object(h.a)(e,"predAlgorithmNameType"),Object.keys(n).map((function(t){var e=Object(h.a)(n[t],"predictionValType");return{algorithm:t,values:Object.keys(e).map((function(t){return{name:t,count:e[t].length}}))}})).map((function(t){return"
    ".concat(t.algorithm,'
      ').concat(t.values.map((function(t){return"
    • ".concat(t.name,"
    • ")})).join(""),"
    ")})).join("")):"","\n ").concat(function(t){if(t.locations.some((function(t){return"EnsemblViruses"===t.source}))){var e=t.xrefs.find((function(t){return"ENA"===t.name}));return e.id?'
    Ensembl COVID-19
    \n

    \n ').concat(e.id,"\n

    "):""}return""}(t),"\n \n ");var e,n,r,i,o};function d(t){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function g(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function y(t,e){for(var n=0;n0,tooltipContent:p(t),protvistaFeatureId:Object(f.a)()});var e,n,i}));return n?{sequence:e,variants:n}:null}(t)}}])&&y(e.prototype,n),i&&y(e,i),a}(l.a);e.a=O},803:function(t,e,n){"use strict";var r=n(603),i=n(585),o=n(619),a=n(613),c=n(632);var s=function(t){var e=t.variants,n=t.sequence;if(!n||!e)return null;var r=n.split("").map((function(t,e){return{type:"VARIANT",normal:t,pos:e+1,variants:[]}}));return e.forEach((function(t){r[t.start-1]&&r[t.start-1].variants.push(t)})),r};function u(t,e){for(var n=0;nt.length)&&(e=t.length);for(var n=0,r=new Array(e);n\n protvista-variation {\n display: flex;\n width: 100%;\n }\n \n protvista-variation svg {\n background-color: #fff;\n }\n \n protvista-variation circle {\n opacity: 0.6;\n }\n protvista-variation circle:hover {\n opacity: 0.9;\n }\n protvista-variation .tick line,\n protvista-variation .axis path {\n opacity: 0.1;\n }\n \n .protvista-highlight {\n fill: #ffe999;\n }\n \n protvista-variation .variation-y-right line,\n protvista-variation .axis path {\n fill: none;\n stroke: none;\n }\n \n \n "}}],(n=[{key:"connectedCallback",value:function(){y(w(f.prototype),"connectedCallback",this).call(this);var t=document.createElement("style");t.innerHTML=f.css,this.appendChild(t),this._height=Number(this.getAttribute("height"))?Number(this.getAttribute("height")):430,this._width=this._width?this._width:0,this._yScale=Object(i.scaleLinear)(),this._yScale=Object(i.scalePoint)().domain(E).range([0,this._height-this.margin.top-this.margin.bottom])}},{key:"processData",value:function(t){this._originalData=s(t)}},{key:"_createFeatures",value:function(){this._variationPlot=new l;var t=y(w(f.prototype),"svg",this).select("g.sequence-features"),e=t.attr("transform","translate(0, ".concat(this.margin.top,")")).append("g");this._series=e.datum(this._data),this._axisLeft=t.append("g"),this._axisRight=t.append("g"),this.updateScale()}},{key:"filters",set:function(t){g(w(f.prototype),"filters",t,this,!0),this.updateData(this._data),this.refresh()}},{key:"_applyFilters",value:function(){var t=this;if(!this._filters||this._filters.length<=0)this._data=this._originalData;else{var e=Object(c.a)(this._filters,"category"),n=Object.values(e).map((function(e){var n=e.map((function(e){return e.filterFn(t._originalData)}));return j(n,o.a)}));this._data=j(n,a.a)}}},{key:"colorConfig",get:function(){return this._colorConfig},set:function(t){this._colorConfig=t}},{key:"refresh",value:function(){this._series&&(this.updateScale(),this._series.call(this._variationPlot.drawVariationPlot,this),this._updateHighlight())}},{key:"updateScale",value:function(){this._yAxisLScale=Object(i.axisLeft)().scale(this._yScale).tickSize(-this.getWidthWithMargins()),this._yAxisRScale=Object(i.axisRight)().scale(this._yScale),this._axisLeft.attr("class","variation-y-left axis").attr("transform","translate(".concat(this.margin.left,",0)")).call(this._yAxisLScale),this._axisRight.attr("transform","translate(".concat(this.getWidthWithMargins()-this.margin.right+2,", 0)")).attr("class","variation-y-right axis").call(this._yAxisRScale)}},{key:"updateData",value:function(t){this._series&&this._series.datum(t)}}])&&p(e.prototype,n),r&&p(e,r),f}(r.default);e.a=k},981:function(t,e,n){"use strict";t.exports=function(t,e){return function(){for(var n=new Array(arguments.length),r=0;r=200&&t<300}};s.headers={common:{Accept:"application/json, text/plain, */*"}},r.forEach(["delete","get","head"],(function(t){s.headers[t]={}})),r.forEach(["post","put","patch"],(function(t){s.headers[t]=r.merge(o)})),t.exports=s}).call(this,n(717))},985:function(t,e,n){"use strict";var r=n(660),i=n(1083),o=n(1085),a=n(982),c=n(1086),s=n(1089),u=n(1090),l=n(986);t.exports=function(t){return new Promise((function(e,n){var f=t.data,h=t.headers;r.isFormData(f)&&delete h["Content-Type"];var p=new XMLHttpRequest;if(t.auth){var d=t.auth.username||"",g=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";h.Authorization="Basic "+btoa(d+":"+g)}var y=c(t.baseURL,t.url);if(p.open(t.method.toUpperCase(),a(y,t.params,t.paramsSerializer),!0),p.timeout=t.timeout,p.onreadystatechange=function(){if(p&&4===p.readyState&&(0!==p.status||p.responseURL&&0===p.responseURL.indexOf("file:"))){var r="getAllResponseHeaders"in p?s(p.getAllResponseHeaders()):null,o={data:t.responseType&&"text"!==t.responseType?p.response:p.responseText,status:p.status,statusText:p.statusText,headers:r,config:t,request:p};i(e,n,o),p=null}},p.onabort=function(){p&&(n(l("Request aborted",t,"ECONNABORTED",p)),p=null)},p.onerror=function(){n(l("Network Error",t,null,p)),p=null},p.ontimeout=function(){var e="timeout of "+t.timeout+"ms exceeded";t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(l(e,t,"ECONNABORTED",p)),p=null},r.isStandardBrowserEnv()){var m=(t.withCredentials||u(y))&&t.xsrfCookieName?o.read(t.xsrfCookieName):void 0;m&&(h[t.xsrfHeaderName]=m)}if("setRequestHeader"in p&&r.forEach(h,(function(t,e){void 0===f&&"content-type"===e.toLowerCase()?delete h[e]:p.setRequestHeader(e,t)})),r.isUndefined(t.withCredentials)||(p.withCredentials=!!t.withCredentials),t.responseType)try{p.responseType=t.responseType}catch(e){if("json"!==t.responseType)throw e}"function"==typeof t.onDownloadProgress&&p.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&p.upload&&p.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then((function(t){p&&(p.abort(),n(t),p=null)})),f||(f=null),p.send(f)}))}},986:function(t,e,n){"use strict";var r=n(1084);t.exports=function(t,e,n,i,o){var a=new Error(t);return r(a,e,n,i,o)}},987:function(t,e,n){"use strict";var r=n(660);t.exports=function(t,e){e=e||{};var n={},i=["url","method","data"],o=["headers","auth","proxy","params"],a=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],c=["validateStatus"];function s(t,e){return r.isPlainObject(t)&&r.isPlainObject(e)?r.merge(t,e):r.isPlainObject(e)?r.merge({},e):r.isArray(e)?e.slice():e}function u(i){r.isUndefined(e[i])?r.isUndefined(t[i])||(n[i]=s(void 0,t[i])):n[i]=s(t[i],e[i])}r.forEach(i,(function(t){r.isUndefined(e[t])||(n[t]=s(void 0,e[t]))})),r.forEach(o,u),r.forEach(a,(function(i){r.isUndefined(e[i])?r.isUndefined(t[i])||(n[i]=s(void 0,t[i])):n[i]=s(void 0,e[i])})),r.forEach(c,(function(r){r in e?n[r]=s(t[r],e[r]):r in t&&(n[r]=s(void 0,t[r]))}));var l=i.concat(o).concat(a).concat(c),f=Object.keys(t).concat(Object.keys(e)).filter((function(t){return-1===l.indexOf(t)}));return r.forEach(f,u),n}},988:function(t,e,n){"use strict";function r(t){this.message=t}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,t.exports=r}}]); \ No newline at end of file diff --git a/v3/8.js b/v3/8.js new file mode 100644 index 000000000..b6874693f --- /dev/null +++ b/v3/8.js @@ -0,0 +1,7 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[8,26],{1021:function(n,t,e){"use strict";(function(n,r){var o,i=e(1022);o="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n?n:r;var a=Object(i.a)(o);t.a=a}).call(this,e(112),e(749)(n))},1022:function(n,t,e){"use strict";function r(n){var t,e=n.Symbol;return"function"==typeof e?e.observable?t=e.observable:(t=e("observable"),e.observable=t):t="@@observable",t}e.d(t,"a",(function(){return r}))},1023:function(n,t,e){"use strict";(function(t){function r(n){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(n)}var o=e(113); +/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */function i(n,t){if(n===t)return 0;for(var e=n.length,r=t.length,o=0,i=Math.min(e,r);o=0;u--)if(l[u]!==f[u])return!1;for(u=l.length-1;u>=0;u--)if(a=l[u],!O(n[a],t[a],e,r))return!1;return!0}(n,t,e,o))}return e?n===t:n==t}function w(n){return"[object Arguments]"==Object.prototype.toString.call(n)}function _(n,t){if(!n||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(n);try{if(n instanceof t)return!0}catch(n){}return!Error.isPrototypeOf(t)&&!0===t.call({},n)}function S(n,t,e,r){var o;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof e&&(r=e,e=null),o=function(n){var t;try{n()}catch(n){t=n}return t}(t),r=(e&&e.name?" ("+e.name+").":".")+(r?" "+r:"."),n&&!o&&g(o,e,"Missing expected exception"+r);var i="string"==typeof r,a=!n&&o&&!e;if((!n&&c.isError(o)&&i&&_(o,e)||a)&&g(o,e,"Got unwanted exception"+r),n&&o&&e&&!_(o,e)||!n&&o)throw o}h.AssertionError=function(n){this.name="AssertionError",this.actual=n.actual,this.expected=n.expected,this.operator=n.operator,n.message?(this.message=n.message,this.generatedMessage=!1):(this.message=function(n){return b(v(n.actual),128)+" "+n.operator+" "+b(v(n.expected),128)}(this),this.generatedMessage=!0);var t=n.stackStartFunction||g;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var e=new Error;if(e.stack){var r=e.stack,o=y(t),i=r.indexOf("\n"+o);if(i>=0){var a=r.indexOf("\n",i+1);r=r.substring(a+1)}this.stack=r}}},c.inherits(h.AssertionError,Error),h.fail=g,h.ok=m,h.equal=function(n,t,e){n!=t&&g(n,t,e,"==",h.equal)},h.notEqual=function(n,t,e){n==t&&g(n,t,e,"!=",h.notEqual)},h.deepEqual=function(n,t,e){O(n,t,!1)||g(n,t,e,"deepEqual",h.deepEqual)},h.deepStrictEqual=function(n,t,e){O(n,t,!0)||g(n,t,e,"deepStrictEqual",h.deepStrictEqual)},h.notDeepEqual=function(n,t,e){O(n,t,!1)&&g(n,t,e,"notDeepEqual",h.notDeepEqual)},h.notDeepStrictEqual=function n(t,e,r){O(t,e,!0)&&g(t,e,r,"notDeepStrictEqual",n)},h.strictEqual=function(n,t,e){n!==t&&g(n,t,e,"===",h.strictEqual)},h.notStrictEqual=function(n,t,e){n===t&&g(n,t,e,"!==",h.notStrictEqual)},h.throws=function(n,t,e){S(!0,n,t,e)},h.doesNotThrow=function(n,t,e){S(!1,n,t,e)},h.ifError=function(n){if(n)throw n},h.strict=o((function n(t,e){t||g(t,!0,e,"==",n)}),h,{equal:h.strictEqual,deepEqual:h.deepStrictEqual,notEqual:h.notStrictEqual,notDeepEqual:h.notDeepStrictEqual}),h.strict.strict=h.strict;var j=Object.keys||function(n){var t=[];for(var e in n)u.call(n,e)&&t.push(e);return t}}).call(this,e(112))},1024:function(n,t,e){(function(n){function r(n){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(n)}var o=Object.getOwnPropertyDescriptors||function(n){for(var t=Object.keys(n),e={},r=0;r=o)return n;switch(n){case"%s":return String(r[e++]);case"%d":return Number(r[e++]);case"%j":try{return JSON.stringify(r[e++])}catch(n){return"[Circular]"}default:return n}})),c=r[e];e=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),y(e)?r.showHidden=e:e&&t._extend(r,e),m(r.showHidden)&&(r.showHidden=!1),m(r.depth)&&(r.depth=2),m(r.colors)&&(r.colors=!1),m(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=s),f(r,n,r.depth)}function s(n,t){var e=u.styles[t];return e?"["+u.colors[e][0]+"m"+n+"["+u.colors[e][1]+"m":n}function l(n,t){return n}function f(n,e,r){if(n.customInspect&&e&&j(e.inspect)&&e.inspect!==t.inspect&&(!e.constructor||e.constructor.prototype!==e)){var o=e.inspect(r,n);return g(o)||(o=f(n,o,r)),o}var i=function(n,t){if(m(t))return n.stylize("undefined","undefined");if(g(t)){var e="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return n.stylize(e,"string")}if(v(t))return n.stylize(""+t,"number");if(y(t))return n.stylize(""+t,"boolean");if(b(t))return n.stylize("null","null")}(n,e);if(i)return i;var a=Object.keys(e),c=function(n){var t={};return n.forEach((function(n,e){t[n]=!0})),t}(a);if(n.showHidden&&(a=Object.getOwnPropertyNames(e)),S(e)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return p(e);if(0===a.length){if(j(e)){var u=e.name?": "+e.name:"";return n.stylize("[Function"+u+"]","special")}if(O(e))return n.stylize(RegExp.prototype.toString.call(e),"regexp");if(_(e))return n.stylize(Date.prototype.toString.call(e),"date");if(S(e))return p(e)}var s,l="",w=!1,P=["{","}"];(d(e)&&(w=!0,P=["[","]"]),j(e))&&(l=" [Function"+(e.name?": "+e.name:"")+"]");return O(e)&&(l=" "+RegExp.prototype.toString.call(e)),_(e)&&(l=" "+Date.prototype.toUTCString.call(e)),S(e)&&(l=" "+p(e)),0!==a.length||w&&0!=e.length?r<0?O(e)?n.stylize(RegExp.prototype.toString.call(e),"regexp"):n.stylize("[Object]","special"):(n.seen.push(e),s=w?function(n,t,e,r,o){for(var i=[],a=0,c=t.length;a=0&&0,n+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return e[0]+(""===t?"":t+"\n ")+" "+n.join(",\n ")+" "+e[1];return e[0]+t+" "+n.join(", ")+" "+e[1]}(s,l,P)):P[0]+l+P[1]}function p(n){return"["+Error.prototype.toString.call(n)+"]"}function h(n,t,e,r,o,i){var a,c,u;if((u=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?c=u.set?n.stylize("[Getter/Setter]","special"):n.stylize("[Getter]","special"):u.set&&(c=n.stylize("[Setter]","special")),C(r,o)||(a="["+o+"]"),c||(n.seen.indexOf(u.value)<0?(c=b(e)?f(n,u.value,null):f(n,u.value,e-1)).indexOf("\n")>-1&&(c=i?c.split("\n").map((function(n){return" "+n})).join("\n").substr(2):"\n"+c.split("\n").map((function(n){return" "+n})).join("\n")):c=n.stylize("[Circular]","special")),m(a)){if(i&&o.match(/^\d+$/))return c;(a=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=n.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=n.stylize(a,"string"))}return a+": "+c}function d(n){return Array.isArray(n)}function y(n){return"boolean"==typeof n}function b(n){return null===n}function v(n){return"number"==typeof n}function g(n){return"string"==typeof n}function m(n){return void 0===n}function O(n){return w(n)&&"[object RegExp]"===P(n)}function w(n){return"object"===r(n)&&null!==n}function _(n){return w(n)&&"[object Date]"===P(n)}function S(n){return w(n)&&("[object Error]"===P(n)||n instanceof Error)}function j(n){return"function"==typeof n}function P(n){return Object.prototype.toString.call(n)}function E(n){return n<10?"0"+n.toString(10):n.toString(10)}t.debuglog=function(e){if(m(a)&&(a=n.env.NODE_DEBUG||""),e=e.toUpperCase(),!c[e])if(new RegExp("\\b"+e+"\\b","i").test(a)){var r=n.pid;c[e]=function(){var n=t.format.apply(t,arguments);console.error("%s %d: %s",e,r,n)}}else c[e]=function(){};return c[e]},t.inspect=u,u.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=d,t.isBoolean=y,t.isNull=b,t.isNullOrUndefined=function(n){return null==n},t.isNumber=v,t.isString=g,t.isSymbol=function(n){return"symbol"===r(n)},t.isUndefined=m,t.isRegExp=O,t.isObject=w,t.isDate=_,t.isError=S,t.isFunction=j,t.isPrimitive=function(n){return null===n||"boolean"==typeof n||"number"==typeof n||"string"==typeof n||"symbol"===r(n)||void 0===n},t.isBuffer=e(1025);var k=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function x(){var n=new Date,t=[E(n.getHours()),E(n.getMinutes()),E(n.getSeconds())].join(":");return[n.getDate(),k[n.getMonth()],t].join(" ")}function C(n,t){return Object.prototype.hasOwnProperty.call(n,t)}t.log=function(){console.log("%s - %s",x(),t.format.apply(t,arguments))},t.inherits=e(1026),t._extend=function(n,t){if(!t||!w(t))return n;for(var e=Object.keys(t),r=e.length;r--;)n[e[r]]=t[e[r]];return n};var T="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function A(n,t){if(!n){var e=new Error("Promise was rejected with a falsy value");e.reason=n,n=e}return t(n)}t.promisify=function(n){if("function"!=typeof n)throw new TypeError('The "original" argument must be of type Function');if(T&&n[T]){var t;if("function"!=typeof(t=n[T]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,T,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,e,r=new Promise((function(n,r){t=n,e=r})),o=[],i=0;i=0||(o[e]=n[e]);return o}var v=e(150),g=e.n(v),m=e(116),O="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?r.useLayoutEffect:r.useEffect,w=[],_=[null,null];function S(n,t){var e=n[1];return[t.payload,e+1]}function j(n,t,e){O((function(){return n.apply(void 0,t)}),e)}function P(n,t,e,r,o,i,a){n.current=r,t.current=o,e.current=!1,i.current&&(i.current=null,a())}function E(n,t,e,r,o,i,a,c,u,s){if(n){var l=!1,f=null,p=function(){if(!l){var n,e,p=t.getState();try{n=r(p,o.current)}catch(n){e=n,f=n}e||(f=null),n===i.current?a.current||u():(i.current=n,c.current=n,a.current=!0,s({type:"STORE_UPDATED",payload:{error:e}}))}};e.onStateChange=p,e.trySubscribe(),p();return function(){if(l=!0,e.tryUnsubscribe(),e.onStateChange=null,f)throw f}}}var k=function(){return[null,0]};function x(n,t){void 0===t&&(t={});var e=t,i=e.getDisplayName,a=void 0===i?function(n){return"ConnectAdvanced("+n+")"}:i,c=e.methodName,u=void 0===c?"connectAdvanced":c,l=e.renderCountProp,f=void 0===l?void 0:l,p=e.shouldHandleStateChanges,d=void 0===p||p,v=e.storeKey,O=void 0===v?"store":v,x=(e.withRef,e.forwardRef),C=void 0!==x&&x,T=e.context,A=void 0===T?s:T,R=b(e,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"]),q=A;return function(t){var e=t.displayName||t.name||"Component",i=a(e),c=y({},R,{getDisplayName:a,methodName:u,renderCountProp:f,shouldHandleStateChanges:d,storeKey:O,displayName:i,wrappedComponentName:e,WrappedComponent:t}),s=R.pure;var l=s?r.useMemo:function(n){return n()};function p(e){var i=Object(r.useMemo)((function(){var n=e.forwardedRef,t=b(e,["forwardedRef"]);return[e.context,n,t]}),[e]),a=i[0],u=i[1],s=i[2],f=Object(r.useMemo)((function(){return a&&a.Consumer&&Object(m.isContextConsumer)(o.a.createElement(a.Consumer,null))?a:q}),[a,q]),p=Object(r.useContext)(f),v=Boolean(e.store)&&Boolean(e.store.getState)&&Boolean(e.store.dispatch);Boolean(p)&&Boolean(p.store);var g=v?e.store:p.store,O=Object(r.useMemo)((function(){return function(t){return n(t.dispatch,c)}(g)}),[g]),x=Object(r.useMemo)((function(){if(!d)return _;var n=new h(g,v?null:p.subscription),t=n.notifyNestedSubs.bind(n);return[n,t]}),[g,v,p]),C=x[0],T=x[1],A=Object(r.useMemo)((function(){return v?p:y({},p,{subscription:C})}),[v,p,C]),R=Object(r.useReducer)(S,w,k),M=R[0][0],D=R[1];if(M&&M.error)throw M.error;var L=Object(r.useRef)(),F=Object(r.useRef)(s),B=Object(r.useRef)(),W=Object(r.useRef)(!1),H=l((function(){return B.current&&s===F.current?B.current:O(g.getState(),s)}),[g,M,s]);j(P,[F,L,W,s,H,B,T]),j(E,[d,g,C,O,F,L,W,B,T,D],[g,C,O]);var N=Object(r.useMemo)((function(){return o.a.createElement(t,y({},H,{ref:u}))}),[u,t,H]);return Object(r.useMemo)((function(){return d?o.a.createElement(f.Provider,{value:A},N):N}),[f,N,A])}var v=s?o.a.memo(p):p;if(v.WrappedComponent=t,v.displayName=i,C){var x=o.a.forwardRef((function(n,t){return o.a.createElement(v,y({},n,{forwardedRef:t}))}));return x.displayName=i,x.WrappedComponent=t,g()(x,t)}return g()(v,t)}}function C(n){return(C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(n)}function T(n,t){return n===t?0!==n||0!==t||1/n==1/t:n!=n&&t!=t}function A(n,t){if(T(n,t))return!0;if("object"!==C(n)||null===n||"object"!==C(t)||null===t)return!1;var e=Object.keys(n),r=Object.keys(t);if(e.length!==r.length)return!1;for(var o=0;o=0;r--){var o=t[r](n);if(o)return o}return function(t,r){throw new Error("Invalid value of type "+Z(n)+" for "+e+" argument when connecting component "+r.wrappedComponentName+".")}}function $(n,t){return n===t}function J(n){var t=void 0===n?{}:n,e=t.connectHOC,r=void 0===e?x:e,o=t.mapStateToPropsFactories,i=void 0===o?z:o,a=t.mapDispatchToPropsFactories,c=void 0===a?V:a,u=t.mergePropsFactories,s=void 0===u?G:u,l=t.selectorFactory,f=void 0===l?K:l;return function(n,t,e,o){void 0===o&&(o={});var a=o,u=a.pure,l=void 0===u||u,p=a.areStatesEqual,h=void 0===p?$:p,d=a.areOwnPropsEqual,v=void 0===d?A:d,g=a.areStatePropsEqual,m=void 0===g?A:g,O=a.areMergedPropsEqual,w=void 0===O?A:O,_=b(a,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),S=Q(n,i,"mapStateToProps"),j=Q(t,c,"mapDispatchToProps"),P=Q(e,s,"mergeProps");return r(f,y({methodName:"connect",getDisplayName:function(n){return"Connect("+n+")"},shouldHandleStateChanges:Boolean(n),initMapStateToProps:S,initMapDispatchToProps:j,initMergeProps:P,pure:l,areStatesEqual:h,areOwnPropsEqual:v,areStatePropsEqual:m,areMergedPropsEqual:w},_))}}var nn=J();var tn,en=e(114),rn=e.n(en);function on(n){for(var t=arguments.length,e=new Array(t>1?t-1:0),r=1;r=t?n:t)),n};function pn(n){return(pn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(n)}var hn=function(n){var t=pn(n);return null!=n&&("object"==t||"function"==t)},dn=e(641),yn=dn.a.Symbol,bn=Object.prototype,vn=bn.hasOwnProperty,gn=bn.toString,mn=yn?yn.toStringTag:void 0;var On=function(n){var t=vn.call(n,mn),e=n[mn];try{n[mn]=void 0;var r=!0}catch(n){}var o=gn.call(n);return r&&(t?n[mn]=e:delete n[mn]),o},wn=Object.prototype.toString;var _n=function(n){return wn.call(n)},Sn=yn?yn.toStringTag:void 0;var jn=function(n){return null==n?void 0===n?"[object Undefined]":"[object Null]":Sn&&Sn in Object(n)?On(n):_n(n)};function Pn(n){return(Pn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(n)}var En=function(n){return null!=n&&"object"==Pn(n)};function kn(n){return(kn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(n)}var xn=function(n){return"symbol"==kn(n)||En(n)&&"[object Symbol]"==jn(n)},Cn=/^\s+|\s+$/g,Tn=/^[-+]0x[0-9a-f]+$/i,An=/^0b[01]+$/i,Rn=/^0o[0-7]+$/i,qn=parseInt;var Mn=function(n){if("number"==typeof n)return n;if(xn(n))return NaN;if(hn(n)){var t="function"==typeof n.valueOf?n.valueOf():n;n=hn(t)?t+"":t}if("string"!=typeof n)return 0===n?n:+n;n=n.replace(Cn,"");var e=An.test(n);return e||Rn.test(n)?qn(n.slice(2),e?2:8):Tn.test(n)?NaN:+n};var Dn=function(n,t,e){return void 0===e&&(e=t,t=void 0),void 0!==e&&(e=(e=Mn(e))==e?e:0),void 0!==t&&(t=(t=Mn(t))==t?t:0),fn(Mn(n),t,e)},Ln=Array.isArray;function Fn(n){return(Fn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(n)}var Bn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Wn=/^\w*$/;var Hn=function(n,t){if(Ln(n))return!1;var e=Fn(n);return!("number"!=e&&"symbol"!=e&&"boolean"!=e&&null!=n&&!xn(n))||(Wn.test(n)||!Bn.test(n)||null!=t&&n in Object(t))};var Nn,In=function(n){if(!hn(n))return!1;var t=jn(n);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},Vn=dn.a["__core-js_shared__"],zn=(Nn=/[^.]+$/.exec(Vn&&Vn.keys&&Vn.keys.IE_PROTO||""))?"Symbol(src)_1."+Nn:"";var Yn=function(n){return!!zn&&zn in n},Gn=Function.prototype.toString;var Xn=function(n){if(null!=n){try{return Gn.call(n)}catch(n){}try{return n+""}catch(n){}}return""},Un=/^\[object .+?Constructor\]$/,Kn=Function.prototype,Zn=Object.prototype,Qn=Kn.toString,$n=Zn.hasOwnProperty,Jn=RegExp("^"+Qn.call($n).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var nt=function(n){return!(!hn(n)||Yn(n))&&(In(n)?Jn:Un).test(Xn(n))};var tt=function(n,t){return null==n?void 0:n[t]};var et=function(n,t){var e=tt(n,t);return nt(e)?e:void 0},rt=et(Object,"create");var ot=function(){this.__data__=rt?rt(null):{},this.size=0};var it=function(n){var t=this.has(n)&&delete this.__data__[n];return this.size-=t?1:0,t},at=Object.prototype.hasOwnProperty;var ct=function(n){var t=this.__data__;if(rt){var e=t[n];return"__lodash_hash_undefined__"===e?void 0:e}return at.call(t,n)?t[n]:void 0},ut=Object.prototype.hasOwnProperty;var st=function(n){var t=this.__data__;return rt?void 0!==t[n]:ut.call(t,n)};var lt=function(n,t){var e=this.__data__;return this.size+=this.has(n)?0:1,e[n]=rt&&void 0===t?"__lodash_hash_undefined__":t,this};function ft(n){var t=-1,e=null==n?0:n.length;for(this.clear();++t-1};var Ot=function(n,t){var e=this.__data__,r=yt(e,n);return r<0?(++this.size,e.push([n,t])):e[r][1]=t,this};function wt(n){var t=-1,e=null==n?0:n.length;for(this.clear();++t-1&&n%1==0&&n-1&&n%1==0&&n<=9007199254740991};var se=function(n,t,e){for(var r=-1,o=(t=zt(t,n)).length,i=!1;++r0&&r(u)?e>1?n(u,e-1,r,o,i):pe(i,u):o||(i[i.length]=u)}return i};var be=function(n){return(null==n?0:n.length)?ye(n,1):[]};var ve=function(n,t,e){switch(e.length){case 0:return n.call(t);case 1:return n.call(t,e[0]);case 2:return n.call(t,e[0],e[1]);case 3:return n.call(t,e[0],e[1],e[2])}return n.apply(t,e)},ge=Math.max;var me=function(n,t,e){return t=ge(void 0===t?n.length-1:t,0),function(){for(var r=arguments,o=-1,i=ge(r.length-t,0),a=Array(i);++o0){if(++t>=800)return arguments[0]}else t=0;return n.apply(void 0,arguments)}},Pe=je(_e);var Ee=function(n){return Pe(me(n,void 0,be),n+"")},ke=Ee((function(n,t){return null==n?{}:fe(n,t)}));var xe=function(n){return n?(n=Mn(n))===1/0||n===-1/0?17976931348623157e292*(n<0?-1:1):n==n?n:0:0===n?n:0};var Ce=function(n){var t=xe(n),e=t%1;return t==t?e?t-e:t:0},Te=dn.a.isFinite,Ae=Math.min;var Re=function(n){var t=Math[n];return function(n,e){if(n=Mn(n),(e=null==e?0:Ae(Ce(e),292))&&Te(n)){var r=(Vt(n)+"e").split("e"),o=t(r[0]+"e"+(+r[1]+e));return+((r=(Vt(o)+"e").split("e"))[0]+"e"+(+r[1]-e))}return t(n)}}("floor"),qe=e(1023);function Me(n,t){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),e.push.apply(e,r)}return e}function De(n){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{position:{xPos:0,yPos:0}},t=arguments.length>1?arguments[1]:void 0,e=n.position;switch(t.type){case Be.key:qe(void 0!==t.payload.xMovement||void 0!==t.payload.yMovement,"must contain at least xMovement or yMovement");var r=De({},e);return r.xPos+=t.payload.xMovement||0,r.yPos+=t.payload.yMovement||0,ze(n,r);case We.key:qe(void 0!==t.payload.xPos||void 0!==t.payload.yPos,"must contain at least xPos or yPos");var o={xPos:isNaN(t.payload.xPos)?e.xPos:t.payload.xPos,yPos:isNaN(t.payload.yPos)?e.yPos:t.payload.yPos};return ze(n,o);case He.key:qe(void 0!==t.payload.aaPos,"must contain at least aaPos");var i={xPos:n.props.tileWidth*(t.payload.aaPos-1),yPos:e.yPos};return ze(n,i);default:return n}};function Ge(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{position:{xPos:0,yPos:0},highlight:null},t=arguments.length>1?arguments[1]:void 0,e=n,r=n.position,o=n.highlight;switch(t.type){case Fe.key:e=De(De({},ke(e,["props","sequenceStats","sequences"])),t.payload);break;case We.key:case Be.key:case He.key:r=Ye(e,t).position;break;case Ne.key:o=t.payload;break;case Ie.key:o=null;break;default:return e}var i={xPosOffset:-r.xPos%e.props.tileWidth,yPosOffset:-r.yPos%e.props.tileWidth,currentViewSequence:Dn(Re(r.yPos/e.props.tileHeight),0,e.sequences.length-1),currentViewSequencePosition:Dn(Re(r.xPos/e.props.tileWidth),0,e.sequences.maxLength),position:r};return De(De(De({},e),i),{},{highlight:o})}var Xe=function(){this.__data__=new _t,this.size=0};var Ue=function(n){var t=this.__data__,e=t.delete(n);return this.size=t.size,e};var Ke=function(n){return this.__data__.get(n)};var Ze=function(n){return this.__data__.has(n)};var Qe=function(n,t){var e=this.__data__;if(e instanceof _t){var r=e.__data__;if(!St||r.length<199)return r.push([n,t]),this.size=++e.size,this;e=this.__data__=new qt(r)}return e.set(n,t),this.size=e.size,this};function $e(n){var t=this.__data__=new _t(n);this.size=t.size}$e.prototype.clear=Xe,$e.prototype.delete=Ue,$e.prototype.get=Ke,$e.prototype.has=Ze,$e.prototype.set=Qe;var Je=$e;var nr=function(n,t){for(var e=-1,r=null==n?0:n.length;++eo?0:o+t),(e=e>o?o:e)<0&&(e+=o),o=t>e?0:e-t>>>0,t>>>=0;for(var i=Array(o);++r1),t})),tr(n,Wr(n),e),r&&(e=Oo(e,7,Ao));for(var o=t.length;o--;)jo(e,t[o]);return e}));var qo=function(n){return function(t,e,r){for(var o=-1,i=Object(t),a=r(t),c=a.length;c--;){var u=a[n?c:++o];if(!1===e(i[u],u,i))break}return t}}();var Mo=function(n,t){return n&&qo(n,t,mr)};var Do=function(n){return"function"==typeof n?n:we};var Lo=function(n,t){return n&&Mo(n,Do(t))},Fo=function(n){this.defaultColor="#ffffff",this.type="static",this.map=n,this.getColor=function(n){return void 0!==this.map[n]?this.map[n]:this.defaultColor}},Bo=function(n,t){this.type="dyn",this.opt=t,void 0!==n.init?(n.init.call(this),this.getColor=n.run,this.reset=n.init,this.map=n.map):this.getColor=n},Wo={A:"#00a35c",R:"#00fc03",N:"#00eb14",D:"#00eb14",C:"#0000ff",Q:"#00f10e",E:"#00f10e",G:"#009d62",H:"#00d52a",I:"#0054ab",L:"#007b84",K:"#00ff00",M:"#009768",F:"#008778",P:"#00e01f",S:"#00d52a",T:"#00db24",W:"#00a857",Y:"#00e619",V:"#005fa0",B:"#00eb14",X:"#00b649",Z:"#00f10e"},Ho={A:"#e718e7",R:"#6f906f",N:"#1be41b",D:"#778877",C:"#23dc23",Q:"#926d92",E:"#ff00ff",G:"#00ff00",H:"#758a75",I:"#8a758a",L:"#ae51ae",K:"#a05fa0",M:"#ef10ef",F:"#986798",P:"#00ff00",S:"#36c936",T:"#47b847",W:"#8a758a",Y:"#21de21",V:"#857a85",B:"#49b649",X:"#758a75",Z:"#c936c9"},No={A:" #FF83FA",C:" #40E0D0",G:" #FF83FA",R:" #FF83FA",T:" #40E0D0",U:" #40E0D0",Y:" #40E0D0"},Io={A:"#5858a7",R:"#6b6b94",N:"#64649b",D:"#2121de",C:"#9d9d62",Q:"#8c8c73",E:"#0000ff",G:"#4949b6",H:"#60609f",I:"#ecec13",L:"#b2b24d",K:"#4747b8",M:"#82827d",F:"#c2c23d",P:"#2323dc",S:"#4949b6",T:"#9d9d62",W:"#c0c03f",Y:"#d3d32c",V:"#ffff00",B:"#4343bc",X:"#797986",Z:"#4747b8"},Vo={A:"#2cd3d3",R:"#708f8f",N:"#ff0000",D:"#e81717",C:"#a85757",Q:"#3fc0c0",E:"#778888",G:"#ff0000",H:"#708f8f",I:"#00ffff",L:"#1ce3e3",K:"#7e8181",M:"#1ee1e1",F:"#1ee1e1",P:"#f60909",S:"#e11e1e",T:"#738c8c",W:"#738c8c",Y:"#9d6262",V:"#07f8f8",B:"#f30c0c",X:"#7c8383",Z:"#5ba4a4"},zo="A".charCodeAt(0),Yo={init:function(){}},Go=new Set([""," ","-","_","."]);function Xo(n){return(Xo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(n)}Yo.run=function(n,t,e){if(!e||1!==e.progress||Go.has(n)||t>e.map.length/26)return"#ffffff";var r=n.charCodeAt(0)-zo;if(r<0||r>=26)return"#ffffff";var o=e.map[26*t+r]||0;return o>.8?"#6464ff":o>.6?"#9da5ff":o>.4?"#cccccc":"#ffffff"},Yo.map={"> 0.8":"#6464ff","> 0.6":"#9da5ff","> 0.4":"#cccccc","> 0":"#ffffff"};var Uo={aliphatic:{A:"#00639a",V:"#00639a",L:"#00639a",I:"#00639a",P:"#00639a"},aromatic:{F:"#00639a",W:"#00639a",Y:"#00639a",H:"#00639a"},buried:Wo,buried_index:Wo,charged:{D:"#00639a",E:"#00639a",K:"#00639a",R:"#00639a",H:"#00639a"},cinema:{A:"#BBBBBB",B:"grey",C:"yellow",D:"red",E:"red",F:"magenta",G:"brown",H:"#00FFFF",I:"#BBBBBB",J:"#fff",K:"#00FFFF",L:"#BBBBBB",M:"#BBBBBB",N:"green",O:"#fff",P:"brown",Q:"green",R:"#00FFFF",S:"green",T:"green",U:"#fff",V:"#BBBBBB",W:"magenta",X:"grey",Y:"magenta",Z:"grey",Gap:"grey"},clustal2:{A:"#80a0f0",R:"#f01505",N:"#00ff00",D:"#c048c0",C:"#f08080",Q:"#00ff00",E:"#c048c0",G:"#f09048",H:"#15a4a4",I:"#80a0f0",L:"#80a0f0",K:"#f01505",M:"#80a0f0",F:"#80a0f0",P:"#ffff00",S:"#00ff00",T:"#00ff00",W:"#80a0f0",Y:"#15a4a4",V:"#80a0f0",B:"#fff",X:"#fff",Z:"#fff"},clustal:{A:"orange",B:"#fff",C:"green",D:"red",E:"red",F:"blue",G:"orange",H:"red",I:"green",J:"#fff",K:"red",L:"green",M:"green",N:"#fff",O:"#fff",P:"orange",Q:"#fff",R:"red",S:"orange",T:"orange",U:"#fff",V:"green",W:"blue",X:"#fff",Y:"blue",Z:"#fff",Gap:"#fff"},helix:Ho,helix_propensity:Ho,hydro:{A:"#ad0052",B:"#0c00f3",C:"#c2003d",D:"#0c00f3",E:"#0c00f3",F:"#cb0034",G:"#6a0095",H:"#1500ea",I:"#ff0000",J:"#fff",K:"#0000ff",L:"#ea0015",M:"#b0004f",N:"#0c00f3",O:"#fff",P:"#4600b9",Q:"#0c00f3",R:"#0000ff",S:"#5e00a1",T:"#61009e",U:"#fff",V:"#f60009",W:"#5b00a4",X:"#680097",Y:"#4f00b0",Z:"#0c00f3"},lesk:{A:" orange",B:" #fff",C:" green",D:" red",E:" red",F:" green",G:" orange",H:" magenta",I:" green",J:" #fff",K:" red",L:" green",M:" green",N:" magenta",O:" #fff",P:" green",Q:" magenta",R:" red",S:" orange",T:" orange",U:" #fff",V:" green",W:" green",X:" #fff",Y:" green",Z:" #fff",Gap:" #fff"},mae:{A:" #77dd88",B:" #fff",C:" #99ee66",D:" #55bb33",E:" #55bb33",F:" #9999ff",G:" #77dd88",H:" #5555ff",I:" #66bbff",J:" #fff",K:" #ffcc77",L:" #66bbff",M:" #66bbff",N:" #55bb33",O:" #fff",P:" #eeaaaa",Q:" #55bb33",R:" #ffcc77",S:" #ff4455",T:" #ff4455",U:" #fff",V:" #66bbff",W:" #9999ff",X:" #fff",Y:" #9999ff",Z:" #fff",Gap:" #fff"},negative:{D:"#00639a",E:"#00639a"},nucleotide:{A:" #64F73F",C:" #FFB340",G:" #EB413C",T:" #3C88EE",U:" #3C88EE"},polar:{R:"#00639a",N:"#00639a",D:"#00639a",Q:"#00639a",E:"#00639a",G:"#00639a",H:"#00639a",K:"#00639a",S:"#00639a",T:"#00639a",Y:"#00639a"},positive:{K:"#00639a",R:"#00639a",H:"#00639a"},purine:No,purine_pyrimidine:No,serine_threonine:{S:"#00639a",T:"#00639a"},strand:Io,strand_propensity:Io,taylor:{A:"#ccff00",R:"#0000ff",N:"#cc00ff",D:"#ff0000",C:"#ffff00",Q:"#ff00cc",E:"#ff0066",G:"#ff9900",H:"#0066ff",I:"#66ff00",L:"#33ff00",K:"#6600ff",M:"#00ff00",F:"#00ff66",P:"#ffcc00",S:"#ff3300",T:"#ff6600",W:"#00ccff",Y:"#00ffcc",V:"#99ff00",B:"#fff",X:"#fff",Z:"#fff"},turn:Vo,turn_propensity:Vo,zappo:{A:"#ffafaf",R:"#6464ff",N:"#00ff00",D:"#ff0000",C:"#ffff00",Q:"#00ff00",E:"#ff0000",G:"#ff00ff",H:"#6464ff",I:"#ffafaf",L:"#ffafaf",K:"#6464ff",M:"#ffafaf",F:"#ffc800",P:"#ff00ff",S:"#00ff00",T:"#00ff00",W:"#ffc800",Y:"#ffc800",V:"#ffafaf",B:"#fff",X:"#fff",Z:"#fff"}},Ko={conservation:Yo},Zo=function(n){this.maps=Qo(Uo),this.dyn=Qo(Ko),this.opt=n};function Qo(n){if(null==n||"object"!==Xo(n))return n;var t=n.constructor();for(var e in n)n.hasOwnProperty(e)&&(t[e]=n[e]);return t}function $o(n,t){for(var e=0;ec))return!1;var s=i.get(n);if(s&&i.get(t))return s==t;var l=-1,f=!0,p=2&e?new pi:void 0;for(i.set(n,t),i.set(t,n);++l1?e[o-1]:void 0,a=o>2?e[2]:void 0;for(i=n.length>3&&"function"==typeof i?(o--,i):void 0,a&&Ki(e[0],e[1],a)&&(i=o<3?void 0:i,o=1),t=Object(t);++r0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0,i=n(r,o);if(r!==i)for(var a=0;a0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0,o={},i=!1,a=0;a0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,e=t.type,r=t.payload;switch(e){case ln.updateProps.key:return n=na(na({},n),r),"colorScheme"in r&&ea(n),n;case ln.updateProp.key:var o=r.key,i=r.value;return n=na(na({},n),{},ta({},o,i)),"colorScheme"===o&&ea(n),n;case ln.updateConservation.key:var a=r.progress,c=r.conservation;return n.conservation={progress:a,map:c},n.colorScheme.updateConservation(n.conservation),n;default:return void 0!==n.colorScheme&&ea(n),n}},sequences:(ra=ta({},ln.updateSequences,$i),oa=[],function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:oa,t=arguments.length>1?arguments[1]:void 0,e=t.type,r=t.payload;return ra.hasOwnProperty(e)?ra[e](n,r):n})}),{sequenceStats:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{currentViewSequence:0,currentViewSequencePosition:0},t=arguments.length>1?arguments[1]:void 0,e=arguments.length>2?arguments[2]:void 0;switch(t.type){case ln.updateProp.key:case ln.updateProps.key:case ln.updateSequences.key:if(e.props&&e.props.tileHeight&&e.props.tileWidth&&e.sequences){var r={};return r.nrXTiles=Math.ceil(e.props.width/e.props.tileWidth)+1,r.nrYTiles=Math.ceil(e.props.height/e.props.tileHeight)+1,r.fullWidth=e.props.tileWidth*e.sequences.maxLength,r.fullHeight=e.props.tileHeight*e.sequences.length,r}}return n}}),aa=["sequences","position"];function ca(n,t){if(null==n)return{};var e,r,o=function(n,t){if(null==n)return{};var e,r,o={},i=Object.keys(n);for(r=0;r=0||(o[e]=n[e]);return o}(n,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(n,e)&&(o[e]=n[e])}return o}var ua=function(n){u.a.checkPropTypes(ii,n,"prop","MSAViewer");var t=Qi({},ai,n),e=t.sequences,r=(t.position,ca(t,aa)),o=F(ia,!1);return o.dispatch(an(r)),o.dispatch(un(e)),o};var sa=function(n,t){void 0===n.nextFrame&&(n.nextFrame=window.requestAnimationFrame(function(){t(),this.nextFrame=void 0}.bind(n)))};function la(){return new Worker(e.p+"conservation.worker.worker.js")}function fa(n){return(fa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(n)}var pa=["msaStore"];function ha(){return(ha=Object.assign||function(n){for(var t=1;t=0||(o[e]=n[e]);return o}(n,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(n,e)&&(o[e]=n[e])}return o}function ya(n,t){for(var e=0;e2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3?arguments[3]:void 0;(Oa=new la).postMessage({sequences:t,sampleSize:e}),Oa.onmessage=function(e){n.dispatch(ln.updateConservation(e.data)),r&&r.current&&r.current.el&&r.current.el.current&&r.current.el.current.dispatchEvent(new CustomEvent("conservationProgress",{bubbles:!0,detail:e.data})),1===e.data.progress&&n.dispatch(ln.updateSequences(t))}},_a={sequences:"updateSequences"};Object.keys(ii).forEach((function(n){!(n in _a)&&ii[n]&&(_a[n]="updateProp")}));var Sa=Object.keys(_a),ja=function(n){return Wi(n,(function(n,t){return n[t.key]=t,n}),{})},Pa=ja(ln),Ea=ja(Ve),ka=function(n){var t=function(t){!function(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&ba(n,t)}(c,t);var e,r,i,a=va(c);function c(n){var t;!function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),t=a.call(this,n);var e=ke(n,Sa)||{};return t.el=o.a.createRef(),t.msaStore=n.msaStore,void 0!==e.sequences?(t.msaStore=ua(e),e.calculateConservation&&t.msaStore&&wa(t.msaStore,e.sequences,e.sampleSizeConservation,t.el)):console.warn("Check your MSA properties",e),t}return e=c,(r=[{key:"componentDidMount",value:function(){void 0!==this.props.position&&this.updatePosition(this.props.position)}},{key:"componentDidUpdate",value:function(n){var t=this.props;for(var e in ke(t,Sa))if(!Hi(n[e],t[e]))if("position"===e)this.updatePosition(t[e]);else if(e in _a){var r=void 0;switch("calculateConservation"===e&&(t[e]?wa(this.msaStore,this.props.sequences,this.props.sampleSizeConservation,this.el):Oa.terminate()),"sampleSizeConservation"===e&&(Oa&&Oa.terminate(),wa(this.msaStore,this.props.sequences,this.props.sampleSizeConservation,this.el)),_a[e]){case"updateProp":r=ln[_a[e]](e,t[e]);break;default:r=ln[_a[e]](t[e])}this.msaStore.dispatch(r)}else console.error(e," is unknown.")}},{key:"dispatch",value:function(n){if(n.type in Pa)this.msaStore.dispatch(n);else{if(!(n.type in Ea))throw new Error("Invalid action",n);this.el.current.positionStore.dispatch(n)}}},{key:"getColorMap",value:function(){var n=this.props.colorScheme,t={};try{t=this.msaStore.getState().props.colorScheme.scheme.map}catch(n){}return{name:n,map:t}}},{key:"render",value:function(){var t=Ro(this.props,Sa),e=t.msaStore,r=da(t,pa);return void 0===this.msaStore?o.a.createElement("div",null," Error initializing the MSAViewer. "):o.a.createElement(n,ha({ref:this.el,msaStore:e||this.msaStore},r))}}])&&ya(e.prototype,r),i&&ya(e,i),c}(r.Component);return Lo(ln,(function(n,e){t.prototype[e]=function(t){this.msaStore.dispatch(n(t))}})),Lo(Ve,(function(n,e){t.prototype[e]=function(t){var e=this;sa(this,(function(){e.el.current.positionStore.dispatch(n(t))}))}})),t},xa="FORWARD_SAME_PROP_NAME";function Ca(n,t){var e={},r=n;return Lo(t,(function(n,t){var o=function(n,t){var e={},r={};return Lo(n,(function(n,o){if(o in t){var i=t[o];e[i===xa?o:i]=n}else r[o]=n})),{forward:e,other:r}}(r,n);e[t]=o.forward,r=o.other})),{forward:e,other:r}}var Ta=Vr&&new Vr,Aa=Ta?function(n,t){return Ta.set(n,t),n}:we;var Ra=function(n){return function(){var t=arguments;switch(t.length){case 0:return new n;case 1:return new n(t[0]);case 2:return new n(t[0],t[1]);case 3:return new n(t[0],t[1],t[2]);case 4:return new n(t[0],t[1],t[2],t[3]);case 5:return new n(t[0],t[1],t[2],t[3],t[4]);case 6:return new n(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new n(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var e=lo(n.prototype),r=n.apply(e,t);return hn(r)?r:e}};var qa=function(n,t,e){var r=1&t,o=Ra(n);return function t(){var i=this&&this!==dn.a&&this instanceof t?o:n;return i.apply(r?e:this,arguments)}},Ma=Math.max;var Da=function(n,t,e,r){for(var o=-1,i=n.length,a=e.length,c=-1,u=t.length,s=Ma(i-a,0),l=Array(u+s),f=!r;++c1?"& ":"")+t[r],t=t.join(e>2?", ":" "),n.replace(rc,"{\n/* [wrapped with "+t+"] */\n")};var ic=function(n,t,e,r){for(var o=n.length,i=e+(r?1:-1);r?i--:++i-1},lc=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];var fc=function(n,t){return nr(lc,(function(e){var r="_."+e[0];t&e[1]&&!sc(n,r)&&n.push(r)})),n.sort()};var pc=function(n,t,e){var r=t+"";return Pe(n,oc(r,fc(ec(r),e)))};var hc=function(n,t,e,r,o,i,a,c,u,s){var l=8&t;t|=l?32:64,4&(t&=~(l?64:32))||(t&=-4);var f=[n,t,o,l?i:void 0,l?a:void 0,l?void 0:i,l?void 0:a,c,u,s],p=e.apply(void 0,f);return $a(n)&&Ja(p,f),p.placeholder=r,pc(p,n,t)};var dc=function(n){return n.placeholder},yc=Math.min;var bc=function(n,t){for(var e=n.length,r=yc(t.length,e),o=kr(n);r--;){var i=t[r];n[r]=Jt(i,e)?o[i]:void 0}return n};var vc=function(n,t){for(var e=-1,r=n.length,o=0,i=[];++e1&&m.reverse(),f&&s3&&void 0!==arguments[3]?arguments[3]:{};return nn(n,t,e,r)};function xc(n){return(xc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(n)}function Cc(n,t){return n===t}function Tc(n,t,e){if(null===t||null===e||t.length!==e.length)return!1;for(var r=t.length,o=0;o1&&void 0!==arguments[1]?arguments[1]:Cc,e=null,r=null;return function(){return Tc(t,e,arguments)||(r=n.apply(null,arguments)),e=arguments,r}}function Rc(n){var t=Array.isArray(n[0])?n[0]:n;if(!t.every((function(n){return"function"==typeof n}))){var e=t.map((function(n){return xc(n)})).join(", ");throw new Error("Selector creators expect all input-selectors to be functions, instead received the following types: ["+e+"]")}return t}function qc(n){for(var t=arguments.length,e=Array(t>1?t-1:0),r=1;r1,"Must provide methods for binding");for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{},e=t.withX,i=void 0!==e&&e,a=t.withY,c=void 0!==a&&a,s=function(t){Yc(r,t);var e=Xc(r);function r(n){var t;return Ic(this,r),Qc(Kc(t=e.call(this,n)),"updateFromPositionStore",(function(){qe(t.context&&t.context.positionMSAStore,"MSA PositionStore needs to be injected");var n=t.context.positionMSAStore.getState();t.position=t.position||{};var e=ke(n,["currentViewSequence","currentViewSequencePosition","xPosOffset","yPosOffset"]);n.position&&(e.xPos=n.position.xPos,e.yPos=n.position.yPos),t.setState({highlight:n.highlight,hasBeenInitialized:!0}),t.el.current&&t.shouldRerender(e)?(t.position=e,t.setState({position:t.position})):(Lo(e,(function(n,e){t.position[e]=n})),t.el.current&&t.updateScrollPosition())})),Qc(Kc(t),"shouldRerender",(function(n){var e=t.el.current;if(void 0!==e.shouldRerender)return e.shouldRerender(n);var r=e.props.cacheElements;return!!(c&&Math.abs(n.currentViewSequence-t.position.lastCurrentViewSequence)>=r)||!!(i&&Math.abs(n.currentViewSequencePosition-t.position.lastCurrentViewSequencePosition)>=r)})),Qc(Kc(t),"updateScrollPosition",(function(){var n=t.el.current;if(n&&void 0!==n.updateScrollPosition)n.updateScrollPosition();else if(n&&n.el&&n.el.current){if(i){var e=n.props.tileWidth,r=-t.position.xPosOffset;r+=(t.position.lastCurrentViewSequencePosition-t.position.lastStartXTile)*e,t.position.currentViewSequencePosition!==t.position.lastCurrentViewSequencePosition&&(r+=(t.position.currentViewSequencePosition-t.position.lastCurrentViewSequencePosition)*e),n.el.current.scrollLeft=r}if(c){var o=n.props.tileHeight,a=-t.position.yPosOffset;a+=(t.position.lastCurrentViewSequence-t.position.lastStartYTile)*o,t.position.currentViewSequence!==t.position.lastCurrentViewSequence&&(a+=(t.position.currentViewSequence-t.position.lastCurrentViewSequence)*o),n.el.current.scrollTop=a}}})),Qc(Kc(t),"dispatch",(function(n){t.context.positionMSAStore.dispatch(n)})),t.el=o.a.createRef(),t.state={highlight:null,hasBeenInitialized:!1},t}return zc(r,[{key:"componentDidMount",value:function(){this.unsubscribe=this.context.positionMSAStore.subscribe(this.updateFromPositionStore),this.updateScrollPosition(!0),this.updateFromPositionStore()}},{key:"componentDidUpdate",value:function(){this.updateScrollPosition()}},{key:"componentWillUnmount",value:function(){this.unsubscribe()}},{key:"render",value:function(){return this.state.hasBeenInitialized?o.a.createElement(n,Nc({ref:this.el,position:this.position,positionDispatch:this.dispatch,highlight:this.state.highlight},this.props)):null}}]),r}(r.PureComponent);return s.displayName="withPosition(".concat(n.displayName||n.name,")"),s.contextTypes={positionMSAStore:u.a.object},s};function Jc(n){return(Jc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(n)}function nu(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function tu(n,t){for(var e=0;e=0||(o[e]=n[e]);return o}(n,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(n,e)&&(o[e]=n[e])}return o}function fu(n,t){for(var e=0;e=0||(o[e]=n[e]);return o}(n,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(n,e)&&(o[e]=n[e])}return o}function Eu(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function ku(n,t){for(var e=0;e=0||(o[e]=n[e]);return o}(n,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(n,e)&&(o[e]=n[e])}return o}function zu(n,t){for(var e=0;et};var cs=function(n){return n&&n.length?is(n,we,as):void 0},us=function n(t,e){if(!this||this.constructor!==n)return new n(t);if(void 0===t||"string"==typeof t)throw new TypeError("you need to give the seq stat an array");this.resetSeqs(t),this.alphabetSize=4,this._useBackground=!1,this.useGaps=!1,this.ignoredChars=["-","*"],Qu(this,e)};us.prototype.addSeq=function(n){this.seqs.push(n),this._reset()},us.prototype.removeSeq=function(n){"number"==typeof n?this.seqs.splice(n,1):$u(this.seqs,function(t,e){n===t&&this.seqs.splice(e,1)}.bind(this)),this._reset()},us.prototype.addSeqs=function(n){n.forEach(function(n){this.addSeq(n)}.bind(this))},us.prototype.resetSeqs=function(n){if(this.seqs=[],!n instanceof Array||"at"in n){this.mseqs=n;var t=function(){var n=this.mseqs.pluck("seq");this.resetSeqs(n)};n.on("add change reset ",t,this),t.call(this)}else this.addSeqs(n),this._reset()};var ss=["consensus","frequency","maxLength","ic","gaps"];us.prototype._reset=function(){for(var n=0;n=0||(void 0===t[o]&&(t[o]={}),void 0===t[o][n]&&(t[o][n]=0),t[o][n]++,void 0===e[o]&&(e[o]=0),e[o]++)}))})),$u(t,(function(n,r){return $u(n,(function(n,o){return t[r][o]=n/e[r]}))})),this._frequency=t,t},us.prototype.backgroundCalc=function(){var n={},t=0;return $u(this.seqs,(function(e){$u(e,(function(e){return void 0===n[e]&&(n[e]=0),n[e]++,t++}))})),n=Ju(n,(function(n){return n/t})),this._background=n,n},us.prototype.icCalc=function(){var n=this.frequency();if(this._useBackground)var t=this.background();var e=this.ignoredChars,r=this._useBackground,o=ts(n,(function(n){return Wi(n,(function(n,o,i){return e.indexOf(i)>=0?n:(r&&(o/=t[i]),n-o*(Math.log(o)/Math.log(2)))}),0)}));return this._ic=o,o},us.prototype.conservation=function(n){var t=this.ic(),e=this.gaps(),r=this;n=n||this.alphabetSize;var o=Math.log(n)/Math.log(2),i=0;return ts(t,(function(n){var t=o-n;return r.useGaps&&(t*=1-e[i++]),t}))},us.prototype.conservResidue=function(n){var t,e=n?n.alphabetSize:void 0,r=this.ignoredChars;t=void 0!==n&&n.scaled?this.scale(this.conservation(e)):this.conservation(e);var o,i=this.frequency();return ts(i,(function(n,e){o=os(o(n),(function(n){return r.indexOf(n)>=0}));var i={};return $u(o,(function(r){i[r]=n[r]*t[e]})),i}))},us.prototype.conservResidue2=function(n){var t=this.frequency(),e=this.conservation(n),r=this.background();return ts(t,(function(n,o){return ts(n,(function(n){var i=Wi(t[o],(function(n,t){return n+t/r[o]}),0);return n/r[o]/i*e[o]}),0)}))},us.prototype.scale=function(n,t){t=t||this.alphabetSize;var e=Math.log(t)/Math.log(2);return ts(n,(function(n){return n/e}))},us.prototype.maxLengthCalc=function(){return 0===this.seqs.length?0:cs(this.seqs,(function(n){return n.length})).length},us.prototype.consensusCalc=function(){var n=new Array(this.maxLength());return $u(this.seqs,(function(t){$u(t,(function(t,e){void 0===n[e]&&(n[e]={}),void 0===n[e][t]&&(n[e][t]=0),n[e][t]++}))})),this._consensus=Wi(n,(function(n,t){var e;return e=Object.keys(t),n+cs(e,(function(n){return t[n]}))}),""),this._consensus},us.prototype.identityCalc=function(n){var t=n||this.consensus();return this._identity=this.seqs.map((function(n){for(var e=0,r=0,o=0;o=0||(o[e]=n[e]);return o}(n,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(n,e)&&(o[e]=n[e])}return o}function ms(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function Os(n,t){for(var e=0;e")}return e})).bind(this)}},{key:"render",value:function(){var n=this.props,t=n.cacheElements,e=(n.height,n.method,n.fillColor,n.dispatch,n.barStyle,n.barAttributes,gs(n,hs));return o.a.createElement(Zu,ds({tileComponent:this.bar(this.props),cacheElements:t,componentCache:this.cache},e))}}]),e}(r.PureComponent);vs(xs,"barAttributes",["tileWidth","height","fillColor","barStyle","barAttributes"]),xs.defaultProps={height:50,fillColor:"#999999",method:"conservation",cacheElements:10},xs.propTypes={method:u.a.oneOf(["information-content","conservation"]),height:u.a.number,fillColor:u.a.string,style:u.a.object,barStyle:u.a.object,barAttributes:u.a.object};var Cs=kc((function(n){return{sequences:n.sequences.raw,maxLength:n.sequences.maxLength,width:n.props.width,tileWidth:n.props.tileWidth,nrXTiles:n.sequenceStats.nrXTiles}}))(xs);function Ts(n){return(Ts="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(n)}var As=["index"],Rs=["cacheElements","markerSteps","startIndex","dispatch","markerComponent","markerStyle"];function qs(){return(qs=Object.assign||function(n){for(var t=1;t=0||(o[e]=n[e]);return o}(n,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(n,e)&&(o[e]=n[e])}return o}function Bs(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function Ws(n,t){for(var e=0;ethis.props.width),i&&(a|=this.props.fullHeight>this.props.height);break;case"hidden":a=!1;break;case"scroll":a=!0}return a}},{key:"shouldShow",value:function(){var n={withX:!0},t={withY:!0},e="initial"===this.props.overflowX?this.props.overflow:this.props.overflowX,r="initial"===this.props.overflowY?this.props.overflow:this.props.overflowY;return{showX:this.checkOverflow(e,n)&&this.checkOverflow(this.props.overflow,n),showY:this.checkOverflow(r,t)&&this.checkOverflow(this.props.overflow,t)}}},{key:"render",value:function(){var n=this.props,t=n.width,e=n.height,r=n.fullWidth,i=n.fullHeight,a={position:"absolute",overflowX:"auto",overflowY:"auto",width:t,height:e,transform:""},c=this.shouldShow(),u=c.showX,s=c.showY,l={height:1,width:1};return s||u?(u&&(l.width=r,a.overflowX="scroll","top"===this.props.positionX&&(a.transform+="rotateX(180deg)")),s&&(l.height=i,a.overflowY="scroll","left"===this.props.positionY&&(a.transform+="rotateY(180deg)")),o.a.createElement("div",{style:a,onScroll:this.onScroll,ref:this.el},o.a.createElement("div",{style:l}))):o.a.createElement("div",null)}}])&&bl(t.prototype,e),r&&bl(t,r),a}(r.PureComponent);Sl.defaultProps={overflow:"auto",overflowX:"initial",overflowY:"initial",positionX:"bottom",positionY:"right",scrollBarWidth:5},Sl.propTypes={overflow:u.a.oneOf(["hidden","auto","scroll"]),overflowX:u.a.oneOf(["hidden","auto","scroll","initial"]),overflowY:u.a.oneOf(["hidden","auto","scroll","initial"]),width:u.a.number.isRequired,height:u.a.number.isRequired,fullHeight:u.a.number.isRequired,fullWidth:u.a.number.isRequired,positionX:u.a.oneOf(["top","bottom"]),positionY:u.a.oneOf(["left","right"])};var jl=$c(Sl,{withX:!0,withY:!0});function Pl(n){return(Pl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(n)}function El(){return(El=Object.assign||function(n){for(var t=1;tn.length)&&(t=n.length);for(var e=0,r=new Array(t);e=this.props.sequences.raw.length)){var u=this.props.sequences.raw[e].sequence;if(!(r>=u.length)){var s=u[r];if(void 0!==s){var l=this.props.colorScheme.getColor(s,r),f=this.getOverlayFactor(s,r),p="".concat(s,"-").concat(l,"-").concat(f),h=this.props.residueTileCache.createTile({key:p,tileWidth:o,tileHeight:i,create:function(n){var o=n.canvas;return t.drawResidue({text:s,canvas:o,row:e,column:r,colorScheme:l,overlayFactor:f})}});this.props.ctx.drawImage(h,0,0,o,i,c,a,o,i)}}}}},{key:"getOverlayFactor",value:function(n,t){if(!this.props.overlayConservation||!this.props.conservation)return 1;var e=n.charCodeAt(0)-bf;if(e<0||e>=26)return 0;var r=this.props.conservation.map[26*t+e]||0;return Math.floor(5*r)/5}},{key:"drawResidue",value:function(n){n.row,n.column;var t=n.canvas,e=n.colorScheme,r=n.text,o=n.overlayFactor,i=void 0===o?1:o;t.globalAlpha=.7*i,t.fillStyle=e,t.fillRect(0,0,this.props.tileWidth,this.props.tileHeight),this.props.tileWidth<4||(this.props.border&&(t.globalAlpha=1,t.lineWidth=this.props.borderWidth,t.strokeStyle=this.props.borderStyle,t.strokeRect(0,0,this.props.tileWidth,this.props.tileHeight)),t.globalAlpha=Math.min(1,1/6*this.props.tileWidth+-1/6*4),t.fillStyle=this.props.textColor,t.font=this.props.textFont,t.textBaseline="middle",t.textAlign="center",t.fillText(r,this.props.tileWidth/2,this.props.tileHeight/2+1,this.props.tileWidth))}},{key:"draw",value:function(n){this.props=n;for(var t=this.props.startYTile;t0&&void 0!==arguments[0]?arguments[0]:{},e=t.maxElements;Of(this,n),this.maxElements=e||200,this.invalidate()}var t,e,r;return t=n,(e=[{key:"createTile",value:function(n){var t=this,e=n.key,r=n.tileWidth,o=n.tileHeight,i=n.create;if(e in this.cache)return this.cache[e].value;if(this.cachedElements>=this.maxElements){var a=mf(Object.keys(this.cache),(function(n){return t.cache[n].insertionTime}));delete this.cache[a]}var c=document.createElement("canvas");this.cache[e]={value:c,insertionTime:Date.now()},c.width=r,c.height=o;var u=c.getContext("2d");return this.cachedElements++,i({canvas:u}),c}},{key:"updateTileSpecs",value:function(n){return!Lc(n,this.spec)&&(this.invalidate(),this.spec=n,!0)}},{key:"invalidate",value:function(){this.cache={},this.spec={},this.cachedElements=0}}])&&wf(t.prototype,e),r&&wf(t,r),n}();function Sf(n,t){return n-n%t}function jf(n){return(jf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(n)}function Pf(n,t){return function(n){if(Array.isArray(n))return n}(n)||function(n,t){var e=n&&("undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"]);if(null==e)return;var r,o,i=[],a=!0,c=!1;try{for(e=e.call(n);!(a=(r=e.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(n){c=!0,o=n}finally{try{a||null==e.return||e.return()}finally{if(c)throw o}}return i}(n,t)||Ef(n,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ef(n,t){if(n){if("string"==typeof n)return kf(n,t);var e=Object.prototype.toString.call(n).slice(8,-1);return"Object"===e&&n.constructor&&(e=n.constructor.name),"Map"===e||"Set"===e?Array.from(n):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?kf(n,t):void 0}}function kf(n,t){(null==t||t>n.length)&&(t=n.length);for(var e=0,r=new Array(t);e0)){var a=s.mouseOverFeatureIds||[],c=s.sequencePositionToFeatureIds(r);Hi(a,c)||(s.mouseOverFeatureIds=c,Mf((t=qf(s),Df(i.prototype)),"draw",t).call(t))}}Mf((e=qf(s),Df(i.prototype)),"onMouseMove",e).call(e,n)})),Lf(qf(s),"onMouseLeave",(function(n){s.sendEvent("onResidueMouseLeave",s.currentMouseSequencePosition),s.currentMouseSequencePosition=void 0,s.mouseOverFeatureIds&&(s.mouseOverFeatureIds=void 0,Mf((r=qf(s),Df(i.prototype)),"draw",r).call(r)),Mf((a=qf(s),Df(i.prototype)),"onMouseLeave",a).call(a,n)})),Lf(qf(s),"onClick",(function(n){if(!s.mouseHasMoved){var t=s.currentPointerPosition(n);s.sendEvent("onResidueClick",t),s.props.features&&s.sequencePositionToFeatureIds(t).forEach((function(t){s.sendEvent("onFeatureClick",{event:n,id:t})}))}Mf((c=qf(s),Df(i.prototype)),"onClick",c).call(c,n)})),Lf(qf(s),"onDoubleClick",(function(n){var t=s.currentPointerPosition(n);s.sendEvent("onResidueDoubleClick",t),Mf((u=qf(s),Df(i.prototype)),"onDoubleClick",u).call(u,n)})),s.tileCache=new _f,s.residueTileCache=new _f,s.tilingGridManager=new vf,s}return t=i,(e=[{key:"hasOnMouseMoveProps",value:function(){return void 0!==this.props.onResidueMouseEnter||void 0!==this.props.onResidueMouseLeave||this.props.features&&this.props.features.length>0}},{key:"componentDidMount",value:function(){this.hasOnMouseMoveProps()&&this.container.current.addEventListener("mousemove",this.onMouseMove),Mf(Df(i.prototype),"componentDidMount",this).call(this)}},{key:"componentWillUnmount",value:function(){this.tileCache.invalidate(),this.residueTileCache.invalidate()}},{key:"drawScene",value:function(){var n=this.getTilePositions();this.updateTileSpecs(),this.drawTiles(n),this.drawHighlightedRegions(),this.ctx&&this.ctx.canvas.dispatchEvent(new CustomEvent("drawCompleted",{bubbles:!0}))}},{key:"getTilePositions",value:function(){var n=Math.max(0,this.props.position.currentViewSequencePosition-this.props.cacheElements),t=Math.max(0,this.props.position.currentViewSequence-this.props.cacheElements),e=Math.min(this.props.sequences.length,t+this.props.nrYTiles+2*this.props.cacheElements);return{startXTile:n,startYTile:t,endXTile:Math.min(this.props.sequences.maxLength,n+this.props.nrXTiles+2*this.props.cacheElements),endYTile:e}}},{key:"drawTiles",value:function(n){for(var t=n.startXTile,e=n.startYTile,r=n.endXTile,o=n.endYTile,i=this.props.xGridSize,a=this.props.yGridSize,c=Sf(e,a),u=Sf(t,i),s=c;s=n.length?{done:!0}:{done:!1,value:n[r++]}},e:function(n){throw n},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){e=e.call(n)},n:function(){var n=e.next();return a=n.done,n},e:function(n){c=!0,i=n},f:function(){try{a||null==e.return||e.return()}finally{if(c)throw i}}}}(this.props.highlight);try{for(e.s();!(t=e.n()).done;){var r=t.value;this.drawHighligtedRegion(r)}}catch(n){e.e(n)}finally{e.f()}}else this.drawHighligtedRegion(this.props.highlight);this.props.features&&this.props.features.forEach((function(t){n.drawHighligtedRegion(t)}))}},{key:"drawHighligtedRegion",value:function(n){var t;if(this.ctx&&n){var e=this.props.tileWidth*(1+n.residues.to-n.residues.from),r=this.props.tileHeight*(1+n.sequences.to-n.sequences.from),o=(n.sequences.from-this.props.position.currentViewSequence)*this.props.tileHeight+this.props.position.yPosOffset,i=(n.residues.from-1-this.props.position.currentViewSequencePosition)*this.props.tileWidth+this.props.position.xPosOffset,a=document.createElement("canvas");a.width=e,a.height=r;var c=a.getContext("2d"),u=null===(t=this.mouseOverFeatureIds)||void 0===t?void 0:t.some((function(t){return t===n.id}));c.globalAlpha=.3,c.fillStyle=u?n.mouseOverFillColor||"green":n.fillColor||"#9999FF",c.fillRect(0,0,e,r),c.globalAlpha=1,c.strokeStyle=u?n.mouseOverBorderColor||"black ":n.borderColor||"777700",c.lineWidth="4",c.rect(0,0,e,r),c.stroke(),this.ctx.drawImage(a,0,0,e,r,i,o,e,r)}}},{key:"positionToSequence",value:function(n){var t=this.props.sequences.raw,e=Dn(Re((this.props.position.yPos+n.yPos)/this.props.tileHeight),0,t.length-1),r=t[e],o=Dn(Re((this.props.position.xPos+n.xPos)/this.props.tileWidth),0,r.sequence.length-1);return{i:e,sequence:r,position:o,residue:r.sequence[o]}}},{key:"sequencePositionToFeatureIds",value:function(n){if(this.props.features)return this.props.features.filter((function(t){return t.id&&n.position>=t.residues.from-1&&n.position<=t.residues.to-1&&n.i>=t.sequences.from&&n.i<=t.sequences.to})).map((function(n){return n.id}))}},{key:"currentPointerPosition",value:function(n){var t=Pf(Qs.rel(n),2),e=t[0],r=t[1];return this.positionToSequence({xPos:e,yPos:r})}},{key:"sendEvent",value:function(n,t){void 0!==this.props[n]&&this.props[n](t)}},{key:"updateTileSpecs",value:function(){var n=["tileWidth","tileHeight","colorScheme","textFont","borderColor","overlayConservation","conservation"];this.tileCache.updateTileSpecs(ke(this.props,[].concat(n,["xGridSize","yGridSize","sequences"]))),this.residueTileCache.updateTileSpecs(ke(this.props,n))}},{key:"render",value:function(){return Mf(Df(i.prototype),"render",this).call(this)}}])&&Cf(t.prototype,e),r&&Cf(t,r),i}(Wl);Ff.defaultProps={showModBar:!1,xGridSize:10,yGridSize:10,border:!1,borderColor:"black",borderWidth:1,cacheElements:20,textColor:"black",textFont:"18px Arial",overflow:"hidden",overflowX:"auto",overflowY:"auto",scrollBarPositionX:"bottom",scrollBarPositionY:"right",overlayConservation:!1,conservation:null,sequenceDisableDragging:!1,highlight:null},Ff.propTypes={showModBar:u.a.bool,onResidueMouseEnter:u.a.func,onResidueMouseLeave:u.a.func,onResidueClick:u.a.func,onFeatureClick:u.a.func,highlight:u.a.oneOfType([u.a.object,u.a.array]),features:u.a.arrayOf(u.a.object),onResidueDoubleClick:u.a.func,xGridSize:u.a.number.isRequired,yGridSize:u.a.number.isRequired,cacheElements:u.a.number.isRequired,border:u.a.bool,borderColor:u.a.string,borderWidth:u.a.number,textColor:u.a.string,textFont:u.a.string,overflow:u.a.oneOf(["hidden","auto","scroll"]),overflowX:u.a.oneOf(["hidden","auto","scroll","initial"]),overflowY:u.a.oneOf(["hidden","auto","scroll","initial"]),scrollBarPositionX:u.a.oneOf(["top","bottom"]),scrollBarPositionY:u.a.oneOf(["left","right"]),overlayConservation:u.a.bool,onPositionUpdate:u.a.func,sequenceDisableDragging:u.a.bool},Ff.propKeys=Object.keys(Ff.propTypes);var Bf=$c(Ff,{withX:!0,withY:!0}),Wf=kc((function(n){var t=Math.min(n.props.width,n.sequences.maxLength*n.props.tileWidth),e=Math.min(n.props.height,n.sequences.length*n.props.tileHeight);return{sequences:n.sequences,width:t,height:e,highlight:n.props.highlight,tileWidth:n.props.tileWidth,tileHeight:n.props.tileHeight,colorScheme:n.props.colorScheme,overlayConservation:n.props.overlayConservation,conservation:n.props.overlayConservation?n.props.conservation:null,nrXTiles:n.sequenceStats.nrXTiles,nrYTiles:n.sequenceStats.nrYTiles,fullWidth:n.sequenceStats.fullWidth,fullHeight:n.sequenceStats.fullHeight}}))(Bf);var Hf=function(n,t){var e;return ui(n,(function(n,r,o){return!(e=t(n,r,o))})),!!e};var Nf=function(n,t,e){var r=Ln(n)?hi:Hf;return e&&Ki(n,t,e)&&(t=void 0),r(n,Fi(t,3))};function If(n){return(If="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(n)}function Vf(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function zf(n,t){for(var e=0;e=0||(o[e]=n[e]);return o}(n,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(n,e)&&(o[e]=n[e])}return o}var hh=function(n){var t=n.coordinateComponent,e=n.coordinateAttributes,r=void 0===e?{}:e,i=n.coordinateStyle,a=void 0===i?{}:i,c=ph(n,eh);if(t){var u=t;return o.a.createElement(u,c)}var s=c.start,l=c.end,f=c.tileHeight,p=lh(lh({},c),r);return o.a.createElement("div",uh({style:lh({height:f},a)},p),s,"-",l)},dh=function(n){!function(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&oh(n,t)}(a,n);var t,e,r,i=ih(a);function a(n){var t;return function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=i.call(this,n)).el=o.a.createRef(),t}return t=a,(e=[{key:"shouldRerender",value:function(){return!0}},{key:"render",value:function(){var n=this.props,t=n.height,e=n.width,r=n.tileHeight,i=n.tileWidth,a=n.position,c=n.coordinateComponent,u=n.coordinateAttributes,s=n.coordinateStyle,l=n.sequences,f={height:t,overflow:"hidden",position:"relative",whiteSpace:"nowrap"};this.props.position.lastCurrentViewSequence=a.currentViewSequence,this.props.position.lastStartYTile=0;var p=Math.round(a.xPos/i)+1,h=p+Math.round(e/i)-1,d=a.currentViewSequence,y=d+Math.ceil(t/r)+1,b=o.a.createElement("div",{style:{height:d*r}});return o.a.createElement("div",null,o.a.createElement("div",{style:f,ref:this.el},b,l.slice(a.currentViewSequence,y).map((function(n,t){return o.a.createElement(hh,{key:t,start:p,end:h,tileHeight:r,coordinateComponent:c,coordinateStyle:s,coordinateAttributes:u,sequence:n})}))))}}])&&rh(t.prototype,e),r&&rh(t,r),a}(r.PureComponent);dh.propTypes={width:u.a.number.isRequired,height:u.a.number.isRequired,tileWidth:u.a.number.isRequired,tileHeight:u.a.number.isRequired,position:u.a.shape({currentViewSequence:u.a.number.isRequired,currentViewSequencePosition:u.a.number.isRequired,lastCurrentViewSequence:u.a.number,lastStartYTile:u.a.number,xPos:u.a.number.isRequired,xPosOffset:u.a.number.isRequired,yPos:u.a.number.isRequired,yPosOffset:u.a.number.isRequired}).isRequired,coordinateComponent:u.a.oneOfType([u.a.object,u.a.func]),coordinateStyle:u.a.object,coordinateAttributes:u.a.object},dh.defaultProps={coordinateComponent:void 0,coordinateStyle:{},coordinateAttributes:{}};var yh=kc((function(n){return{width:n.props.width,height:n.props.height,tileHeight:n.props.tileHeight,tileWidth:n.props.tileWidth,sequences:n.sequences.raw}}))($c(dh,{withX:!0,withY:!0}));function bh(n){return(bh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(n)}function vh(n,t){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),e.push.apply(e,r)}return e}function gh(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}function mh(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function Oh(n,t){for(var e=0;e=0||(o[e]=n[e]);return o}(n,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(n,e)&&(o[e]=n[e])}return o}function Th(n,t){for(var e=0;en.length)&&(t=n.length);for(var e=0,r=new Array(t);e=0||(o[e]=n[e]);return o}(n,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(n,e)&&(o[e]=n[e])}return o}function Vh(n,t){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),e.push.apply(e,r)}return e}function zh(n){for(var t=1;t0&&(e.sampleSizeConservation=this["_sample-size-conservation"]),this["_text-font"]>0&&(e.sequenceTextFont=this.getAttribute("text-font")),this._hidelabel||(e.labelComponent=function(t){return function(n){var t=n.sequence,e=n.activeLabel,i=n.setActiveTrack,a={width:n.width,height:n.tileHeight,textAlign:"left",overflow:"hidden",display:"flex",alignItems:"center",fontWeight:"normal",fontSize:"14px",cursor:"pointer",boxSizing:"border-box",padding:"0 0.25rem",borderLeft:"0.2rem solid transparent",color:"#00639A",textTransform:"uppercase",flexShrink:0},c=gd(gd({},a),{},{fontWeight:"bold",borderLeft:"0.2rem solid #00639A"}),u=Object(r.useRef)(null);return Object(r.useEffect)((function(){u.current.addEventListener("click",(function(){return i(t.name)}))}),[u]),o.a.createElement("span",{style:t.name===e?c:a,ref:u},t.name)}({sequence:t.sequence,activeLabel:n.activeLabel,setActiveTrack:n.setActiveTrack,width:n._labelwidth,tileHeight:20})}),this._highlight&&"0:0"!==this._highlight){var i,c,u,s=new a.b({min:1,max:(null===(i=this._data)||void 0===i||null===(c=i[0])||void 0===c||null===(u=c.sequence)||void 0===u?void 0:u.length)||1});s.decode(this._highlight),e.highlight=s.segments.map((function(t){var e=t.start,r=t.end;return{sequences:{from:0,to:n._data.length},residues:{from:e,to:r}}}))}rn.a.render(o.a.createElement(ad,sd({},e,{ref:function(t){return n.el=t}})),this)}}])&&ld(t.prototype,e),c&&ld(t,c),s}(i.a),wd=e(700),_d=e(701),Sd=e(868),jd=e.n(Sd),Pd=e(111),Ed=e(35),kd=e(1031),xd=e.n(kd),Cd=e(156),Td=e(813);function Ad(){return(Ad=Object.assign||function(n){for(var t=1;tn.length)&&(t=n.length);for(var e=0,r=new Array(t);e0&&(g["sample-size-conservation"]=s),o.a.createElement(o.a.Fragment,null,o.a.createElement("h1",null,"protvista-msa"),o.a.createElement("div",{style:{display:"flex",flexDirection:"column"}},o.a.createElement("label",null,"colorScheme:",o.a.createElement("select",{value:t,onChange:v,onBlur:v},Md.map((function(n){return o.a.createElement("option",{key:n},n)})))),o.a.createElement("label",null,"overlayConservation:",o.a.createElement("input",{type:"checkbox",checked:a,onChange:function(){return c(!a)}})),o.a.createElement("label",null,"sampleSizeConservation:",o.a.createElement("input",{type:"number",value:s||"",onChange:function(n){return l(n.target.value)}}))),o.a.createElement("protvista-manager",{attributes:"length displaystart displayend highlight",displaystart:"1",displayend:"100",id:"example"},o.a.createElement("div",{style:{display:"flex",width:"100%"}},o.a.createElement("div",{style:{width:100,flexShrink:0}}),o.a.createElement("protvista-navigation",{length:b.length})),o.a.createElement("div",{style:{display:"flex",width:"100%"}},o.a.createElement("div",{style:{width:100,flexShrink:0,height:"20px",textAlign:"left",overflow:"hidden",fontWeight:"bold",fontSize:"14px",color:"rgb(0, 99, 154)",textTransform:"uppercase"}},"Contacts"),o.a.createElement("protvista-links",{id:"links-track",length:b.length,height:20,"use-ctrl-to-zoom":!0})),o.a.createElement("div",{style:{display:"flex",width:"100%"}},o.a.createElement("div",{style:{width:100,flexShrink:0,height:"20px",textAlign:"left",overflow:"hidden",fontWeight:"bold",fontSize:"14px",color:"rgb(0, 99, 154)",textTransform:"uppercase"}},"Contacts2"),o.a.createElement("protvista-links",{id:"links-track-2",length:b.length,height:20,"use-ctrl-to-zoom":!0})),o.a.createElement("protvista-msa",Ad({id:"msa-track",ref:f,length:b.length,height:"200",displaystart:"1",displayend:"50","use-ctrl-to-zoom":!0,labelWidth:100,colorscheme:t,"text-font":"16px sans-serif"},g))),o.a.createElement(Cd.default,null,h),o.a.createElement(Ed.default,{content:xd.a}))}},593:function(n,t,e){"use strict";function r(n,t){return function(n){if(Array.isArray(n))return n}(n)||function(n,t){var e=n&&("undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"]);if(null==e)return;var r,o,i=[],a=!0,c=!1;try{for(e=e.call(n);!(a=(r=e.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(n){c=!0,o=n}finally{try{a||null==e.return||e.return()}finally{if(c)throw o}}return i}(n,t)||function(n,t){if(!n)return;if("string"==typeof n)return o(n,t);var e=Object.prototype.toString.call(n).slice(8,-1);"Object"===e&&n.constructor&&(e=n.constructor.name);if("Map"===e||"Set"===e)return Array.from(n);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return o(n,t)}(n,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(n,t){(null==t||t>n.length)&&(t=n.length);for(var e=0,r=new Array(t);e0&&void 0!==arguments[0]?arguments[0]:{},e=t.min,r=void 0===e?-1/0:e,o=t.max,a=void 0===o?1/0:o;i(this,n),this.segments=[],this.max=a,this.min=r,this.regionString=null}var t,e,o;return t=n,(e=[{key:"encode",value:function(){var n=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.segments.map((function(e){var r=e.start,o=e.end,i=e.color;if(t)return"".concat(r,":").concat(o).concat(i?":".concat(i):"");var a=r===n.min?"":r,c=o===n.max?"":o;return"".concat(a,":").concat(c).concat(i?":".concat(i):"")})).join(",")}},{key:"decode",value:function(n){var t=this;void 0!==n&&(this.regionString=n),this.regionString?this.segments=this.regionString.split(",").map((function(n){var e=r(n.split(":"),4),o=e[0],i=e[1],a=e[2];if(void 0!==e[3])throw new Error("there should be at most 2 ':' per region. Region: ".concat(n));var c=o?Number(o):t.min,u=i?Number(i):t.max,s=""!==a?a:void 0;if(c>u){var l=[u,c];c=l[0],u=l[1]}if(ct.max&&(u=t.max),Number.isNaN(c))throw new Error("The parsed value of ".concat(o," is NaN. Region: ").concat(n));if(Number.isNaN(u))throw new Error("The parsed value of ".concat(i," is NaN. Region: ").concat(n));if(s&&!s.match(/^#[0-9a-f]{6,8}$/i))throw new Error("The parsed value of ".concat(a," is not a color in hex format. Region: ").concat(n));return{start:c,end:u,color:s}})):this.segments=[]}}])&&a(t.prototype,e),o&&a(t,o),n}();function u(n,t){for(var e=0;e1&&void 0!==arguments[1]?arguments[1]:400;h(this,n),this.element=t,this.timeStampWheelOutside=0,this.resetScrollableTimeout=null,this.scrollDelay=e}var t,e,r;return t=n,(e=[{key:"setElementScrollable",value:function(n){this.element.setAttribute("scrollable",n)}},{key:"startResetScrollableTimer",value:function(){var n=this;this.resetScrollableTimeout&&clearTimeout(this.resetScrollableTimeout),this.resetScrollableTimeout=setTimeout((function(){n.setElementScrollable(!0),n.resetScrollableTimeout=null}),this.scrollDelay)}},{key:"blockScroll",value:function(n){this.timeStampWheelOutside=n,this.setElementScrollable(!1),this.startResetScrollableTimer()}},{key:"wheel",value:function(n){var t=n.target,e=n.timeStamp;this.element.contains(t)?e=n.length?{done:!0}:{done:!1,value:n[r++]}},e:function(n){throw n},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){e=e.call(n)},n:function(){var n=e.next();return a=n.done,n},e:function(n){c=!0,i=n},f:function(){try{a||null==e.return||e.return()}finally{if(c)throw i}}}}function g(n){return function(n){if(Array.isArray(n))return O(n)}(n)||function(n){if("undefined"!=typeof Symbol&&null!=n[Symbol.iterator]||null!=n["@@iterator"])return Array.from(n)}(n)||m(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(n,t){if(n){if("string"==typeof n)return O(n,t);var e=Object.prototype.toString.call(n).slice(8,-1);return"Object"===e&&n.constructor&&(e=n.constructor.name),"Map"===e||"Set"===e?Array.from(n):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?O(n,t):void 0}}function O(n,t){(null==t||t>n.length)&&(t=n.length);for(var e=0,r=new Array(t);e0&&void 0!==arguments[0]?arguments[0]:null,t=[],e=[];if(null!==n&&"string"!=typeof n)throw new Error("The attribute text has to be of type string");if(n&&""!==n.trim()){var r=n.split(",").map((function(n){return n.split(":")}));if(r.length<2)throw new Error("There should be at least 2 points to create a scale");t=r.map((function(n){var t=n[0].trim().toUpperCase();if(!f(t))throw new Error("The color '".concat(t," is not valid'"));return t})),e=r.map((function(n,t){var e=parseFloat(n[1]);if(Number.isNaN(e))throw new Error("The second part of every point should be a number. Error in point ".concat(t,": ").concat(n));return e}))}return{range:t,domain:e}},D=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=t.keyFormatter,r=void 0===e?p:e,o=t.valueFormatter,i=void 0===o?p:o;if(null!==n&&"string"!=typeof n)throw new Error("The attribute text has to be of type string");if(n&&""!==n.trim()){var a=n.split(",").map((function(n){return n.split(":")})),c={};return a.forEach((function(n){if(2!==n.length)throw new Error("Bad block: ".concat(n.join(":"),"\n The blocks of the string should follow the format KEY:VALUE"));c[r(n[0])]=i(n[1])})),c}return{}},L=y,F=function(n){var t,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{initialValue:{top:0,bottom:0,left:0,right:0}},r=function(n){P(r,n);var t=k(r);function r(){var n;return w(this,r),(n=t.call(this)).margin=e.initialValue,n}return S(r,[{key:"attributeChangedCallback",value:function(n,t,e){t!==e&&A.includes(n)&&(this[n]=e),j(C(r.prototype),"attributeChangedCallback",this).call(this,n,t,e)}}],[{key:"observedAttributes",get:function(){return[].concat(g(j(C(r),"observedAttributes",this)),g(A))}}]),r}(n),o=v(T);try{var i=function(){var n=t.value;Object.defineProperty(r.prototype,"margin".concat(n),{get:function(){return this.margin[n]||0},set:function(t){this.margin[n]=+t}})};for(o.s();!(t=o.n()).done;)i()}catch(n){o.e(n)}finally{o.f()}return r}},594:function(n,t,e){"use strict";var r=e(608),o=e(604);t.a=function(n){return Object(o.a)(n)&&Object(r.a)(n)}},595:function(n,t,e){"use strict";t.a=function(n,t,e){for(var r=-1,o=null==n?0:n.length;++r-1}},598:function(n,t,e){"use strict";var r=e(614);var o=function(n,t,e){switch(e.length){case 0:return n.call(t);case 1:return n.call(t,e[0]);case 2:return n.call(t,e[0],e[1]);case 3:return n.call(t,e[0],e[1],e[2])}return n.apply(t,e)},i=Math.max;var a=function(n,t,e){return t=i(void 0===t?n.length-1:t,0),function(){for(var r=arguments,a=-1,c=i(r.length-t,0),u=Array(c);++a0){if(++t>=800)return arguments[0]}else t=0;return n.apply(void 0,arguments)}}(s);t.a=function(n,t){return f(a(n,t,r.a),n+"")}},599:function(n,t,e){"use strict";var r=function(n,t,e,r){for(var o=n.length,i=e+(r?1:-1);r?i--:++i-1:!!a&&Object(o.a)(n,t,e)>-1},C=e(632),T=e(619),A=e(613),R=e(609);function q(n,t){for(var e=0;e5&&(n=this._ftWidth-5);var t=this._ftHeight/4;return"M0,"+t+"L"+n+","+t+"L"+n+","+3*t+"L0,"+3*t+"L0,"+t+"M"+n+",0L"+this._ftWidth+","+2*t+"L"+n+","+this._ftHeight+"Z"}}])&&q(t.prototype,e),r&&q(t,r),n}();function D(n,t){for(var e=0;eNumber(e.end)||Number(r.end)=0?(t._rows[e].push(n),t.featuresMap.set(n,e)):(t._rows.push([n]),t.featuresMap.set(n,t._rows.length-1))})),this._rowHeight=Math.min(this._layoutHeight/this._rows.length,this._minHeight)}},{key:"getOffset",value:function(){return this._rows.length*this._rowHeightn.length)&&(t=n.length);for(var e=0,r=new Array(t);e500&&(e=n.getSingleBaseWidth()<4?4:1),n._featureShape.getFeatureShape(n.getSingleBaseWidth()/2,n._layoutObj.getFeatureHeight(),e,n._getShape(t))})).attr("transform",(function(t){return"translate(".concat(n.getXFromSeqPosition(Number(t.feature.start)+Number(t.position)-1)+n.getSingleBaseWidth()/4,",\n ").concat(n._layoutObj.getFeatureYPos(t.feature),")")})).attr("fill","#06038D").style("fill-opacity",(function(n){var t=n.feature;return t.opacity?t.opacity:.9})).style("stroke-opacity",(function(n){var t=n.feature;return t.opacity?t.opacity:.9})).call(this.bindEvents,this)}},{key:"_applyFilters",value:function(){var n=this;if(!this._filters||this._filters.length<=0)this._data=this._originalData;else{var t=Object(C.a)(this._filters,"category"),e=Object.values(t).map((function(t){var e=t.map((function(t){return t.filterFn(n._originalData)}));return T.a.apply(void 0,K(e))})),r=A.a.apply(void 0,K(e));this._data=r}}},{key:"refresh",value:function(){var n=this;if(this.xScale&&this.seq_g){var t=this.seq_g.selectAll("g.fragment-group").data(this._data.reduce((function(n,t){return n.concat(t.locations.reduce((function(n,e){return n.concat(e.fragments.map((function(n){return Object.assign({},n,{feature:t})})))}),[]))}),[])),e=this.seq_g.selectAll("g.residue-group").data(this._data.reduce((function(n,t){var e;return n.concat([null===(e=t.ptms)||void 0===e?void 0:e.reduce((function(n){return n.concat((function(n){return Object.assign({},n,{feature:t,position:n.position})}))}),[])])}),[]));t.selectAll("path.feature").attr("d",(function(t){return n._featureShape.getFeatureShape(n.getSingleBaseWidth(),n._layoutObj.getFeatureHeight(t),t.end?t.end-t.start+1:1,n._getShape(t))})).attr("transform",(function(t){return"translate(".concat(n.getXFromSeqPosition(t.start),",").concat(n._layoutObj.getFeatureYPos(t.feature),")")})),e.selectAll("path.residue").attr("d",(function(t){var e=1;return n.length>500&&(e=n.getSingleBaseWidth()<4?4:1),n._featureShape.getFeatureShape(n.getSingleBaseWidth()/2,n._layoutObj.getFeatureHeight(t),e,n._getShape(t))})).attr("transform",(function(t){return"translate(".concat(n.getXFromSeqPosition(Number(t.feature.start)+Number(t.position)-1)+n.getSingleBaseWidth()/4,",").concat(n._layoutObj.getFeatureYPos(t.feature),")")})),t.selectAll("rect.outer-rectangle").attr("width",(function(t){return n.getSingleBaseWidth()*(t.end?t.end-t.start+1:1)})).attr("height",(function(t){return n._layoutObj.getFeatureHeight(t)})).attr("transform",(function(t){return"translate(".concat(n.getXFromSeqPosition(t.start),",").concat(n._layoutObj.getFeatureYPos(t.feature),")")})),this._updateHighlight()}}},{key:"_updateHighlight",value:function(){this.trackHighlighter.updateHighlight()}}])&&$(t.prototype,e),o&&$(t,o),a}(R.a);t.default=on},609:function(n,t,e){"use strict";var r=e(585),o=e(593),i=e(665);function a(n){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(n)}function c(n,t){return function(n){if(Array.isArray(n))return n}(n)||function(n,t){var e=n&&("undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"]);if(null==e)return;var r,o,i=[],a=!0,c=!1;try{for(e=e.call(n);!(a=(r=e.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(n){c=!0,o=n}finally{try{a||null==e.return||e.return()}finally{if(c)throw o}}return i}(n,t)||function(n,t){if(!n)return;if("string"==typeof n)return u(n,t);var e=Object.prototype.toString.call(n).slice(8,-1);"Object"===e&&n.constructor&&(e=n.constructor.name);if("Map"===e||"Set"===e)return Array.from(n);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return u(n,t)}(n,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(n,t){(null==t||t>n.length)&&(t=n.length);for(var e=0,r=new Array(t);e1&&void 0!==arguments[1]?arguments[1]:null,e=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4?arguments[4]:void 0,a=arguments.length>5?arguments[5]:void 0,c=arguments.length>6?arguments[6]:void 0;t&&(t=t.feature?t.feature:t);var u={eventtype:n,coords:v._getClickCoords(),feature:t,target:c};return e&&(t&&t.fragments?u.highlight=t.fragments.map((function(n){return"".concat(n.start,":").concat(n.end)})).join(","):r.event&&r.event.shiftKey&&this._highlight?u.highlight="".concat(this._highlight,",").concat(i,":").concat(a):u.highlight=i&&a?"".concat(i,":").concat(a):null),o&&(u.selectedid=t&&t.protvistaFeatureId),new CustomEvent("change",{detail:u,bubbles:!0,cancelable:!0})}},{key:"bindEvents",value:function(n,t){n.on("mouseover",(function(n,e,r){t.dispatchEvent(t.createEvent("mouseover",n,"onmouseover"===t._highlightEvent,!1,n.start,n.end,r[e]))})).on("mouseout",(function(){t.dispatchEvent(t.createEvent("mouseout",null,"onmouseover"===t._highlightEvent))})).on("click",(function(n,e,r){t.dispatchEvent(t.createEvent("click",n,"onclick"===t._highlightEvent,!0,n.start,n.end,r[e]))}))}}])&&s(a.prototype,u),p&&s(a,p),v}(p(HTMLElement));t.a=Object(o.f)(v,{initialValue:{top:10,right:10,bottom:10,left:10}})},613:function(n,t,e){"use strict";var r=e(590),o=e(621),i=e(596),a=e(595),c=e(664),u=e(616),s=Math.min;var l=function(n,t,e){for(var l=e?a.a:i.a,f=n[0].length,p=n.length,h=p,d=Array(p),y=1/0,b=[];h--;){var v=n[h];h&&t&&(v=Object(r.a)(v,Object(c.a)(t))),y=s(v.length,y),d[h]=!e&&(t||f>=120&&v.length>=120)?new o.a(h&&v):void 0}v=n[0];var g=-1,m=d[0];n:for(;++g=200){var y=t?null:p(n);if(y)return Object(f.a)(y);l=!1,o=u.a,d=new i.a}else d=t?[]:h;n:for(;++r0&&(this._padding=10)}},{key:"connectedCallback",value:function(){this._refreshWidth(),this.closest("protvista-manager")&&(this.manager=this.closest("protvista-manager"),this.manager.register(this)),this._length=parseFloat(this.getAttribute("length")),this._displaystart=parseFloat(this.getAttribute("displaystart"))||1,this._displayend=parseFloat(this.getAttribute("displayend"))||this._length,this._highlightStart=parseFloat(this.getAttribute("highlightStart")),this._highlightEnd=parseFloat(this.getAttribute("highlightEnd")),this._rulerstart=parseFloat(this.getAttribute("rulerStart"))||1,this._onResize=this._onResize.bind(this),this._createNavRuler()}},{key:"disconnectedCallback",value:function(){this.manager&&this.manager.unregister(this),this._ro&&this._ro.unobserve(this),window.removeEventListener("resize",this._onResize)}},{key:"attributeChangedCallback",value:function(n,t,e){t!==e&&(this["_".concat(n)]=parseFloat(e),this._updateNavRuler())}},{key:"width",get:function(){return this._width},set:function(n){this._width=n}},{key:"_createNavRuler",value:function(){var n=this;this._x=Object(r.scaleLinear)().range([this._padding,this.width-this._padding]),this._x.domain([this._rulerstart,this._rulerstart+this._length-1]),Object(r.select)(this).selectAll("div").remove(),this._container=Object(r.select)(this).append("div").attr("class","container"),this._svg=this._container.append("svg").attr("id","").attr("width",this.width).attr("height",this.height),this._xAxis=Object(r.axisBottom)(this._x),this._displaystartLabel=this._svg.append("text").attr("class","start-label").attr("x",0).attr("y",this.height-this._padding),this._displayendLabel=this._svg.append("text").attr("class","end-label").attr("x",this.width).attr("y",this.height-this._padding).attr("text-anchor","end"),this._axis=this._svg.append("g").attr("class","x axis").call(this._xAxis),this._viewport=Object(r.brushX)().extent([[this._padding,0],[this.width-this._padding,.51*this.height]]).on("brush",(function(){r.event.selection&&(n._displaystart=Object(r.format)("d")(n._x.invert(r.event.selection[0])),n._displayend=Object(r.format)("d")(n._x.invert(r.event.selection[1])),n.dontDispatch||n.dispatchEvent(new CustomEvent("change",{detail:{displayend:n._displayend,displaystart:n._displaystart,extra:{transform:r.event.transform}},bubbles:!0,cancelable:!0})),n._updateLabels(),n._updatePolygon())})),this._brushG=this._svg.append("g").attr("class","brush").call(this._viewport),this._brushG.call(this._viewport.move,[this._x(this._displaystart),this._x(this._displayend)]),this.polygon=this._svg.append("polygon").attr("class","zoom-polygon").attr("fill","#777").attr("fill-opacity","0.3"),this._updateNavRuler(),"ResizeObserver"in window&&(this._ro=new ResizeObserver(this._onResize),this._ro.observe(this)),window.addEventListener("resize",this._onResize)}},{key:"_onResize",value:function(){this._refreshWidth(),this._x=this._x.range([this._padding,this.width-this._padding]),this._svg.attr("width",this.width),this._viewport.extent([[this._padding,0],[this.width-this._padding,.51*this.height]]),this._brushG.call(this._viewport),this._updateNavRuler()}},{key:"_updateNavRuler",value:function(){this._x&&(this._container.style("padding-left","".concat(this.margin.left,"px")).style("padding-right","".concat(this.margin.right,"px")).style("padding-top","".concat(this.margin.top,"px")).style("padding-bottom","".concat(this.margin.bottom,"px")),this._x.domain([this._rulerstart,this._rulerstart+this._length-1]),this._axis.call(this._xAxis),this._updatePolygon(),this._updateLabels(),this._brushG&&(this.dontDispatch=!0,this._brushG.call(this._viewport.move,[this._x(this._displaystart),this._x(this._displayend)]),this.dontDispatch=!1))}},{key:"_updateLabels",value:function(){this._displaystartLabel&&this._displaystartLabel.text(this._displaystart),this._displayendLabel&&this._displayendLabel.attr("x",this.width).text(this._displayend)}},{key:"_updatePolygon",value:function(){this.polygon&&this.polygon.attr("points","".concat(this._x(this._displaystart),",").concat(this.height/2,"\n ").concat(this._x(this._displayend),",").concat(this.height/2,"\n ").concat(this.width,",").concat(this.height,"\n 0,").concat(this.height))}}])&&a(o.prototype,i),u&&a(o,u),h}(u(HTMLElement));t.a=Object(o.f)(h)},701:function(n,t,e){"use strict";function r(n){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(n)}function o(n){return function(n){if(Array.isArray(n))return i(n)}(n)||function(n){if("undefined"!=typeof Symbol&&null!=n[Symbol.iterator]||null!=n["@@iterator"])return Array.from(n)}(n)||function(n,t){if(!n)return;if("string"==typeof n)return i(n,t);var e=Object.prototype.toString.call(n).slice(8,-1);"Object"===e&&n.constructor&&(e=n.constructor.name);if("Map"===e||"Set"===e)return Array.from(n);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return i(n,t)}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(n,t){(null==t||t>n.length)&&(t=n.length);for(var e=0,r=new Array(t);e1)for(var e=1;e=0||Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e}(n,["children","width","height","style"]);return o.default.createElement("svg",r({children:t,fill:"currentColor",preserveAspectRatio:"xMidYMid meet",height:i,width:e,style:c},u))};c.propTypes={children:i.default.node.isRequired,width:i.default.oneOfType([i.default.number,i.default.string]),height:i.default.oneOfType([i.default.number,i.default.string]),style:i.default.object},t.default=c},868:function(n,t,e){"use strict";var r,o=this&&this.__extends||(r=function(n,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e])})(n,t)},function(n,t){function e(){this.constructor=n}r(n,t),n.prototype=null===t?Object.create(t):(e.prototype=t.prototype,new e)});Object.defineProperty(t,"__esModule",{value:!0});var i=e(585),a=e(603),c=e(869),u=i.scaleLinear([0,1],["orange","blue"]),s=function(n,t,e){return new CustomEvent("change",{detail:{type:n,target:t,highlight:e?e.map((function(n){return n+":"+n})).join(","):null},bubbles:!0,cancelable:!0})},l=function(n){function t(){var t=n.call(this)||this;return t._minDistance=0,t._minProbability=.7,t._rawData=null,t._linksData=null,t}return o(t,n),Object.defineProperty(t,"observedAttributes",{get:function(){return a.default.observedAttributes.concat("mindistance","minprobability")},enumerable:!1,configurable:!0}),t.prototype.attributeChangedCallback=function(t,e,r){"mindistance"===t&&e!==r?this.minDistance=+r:"minprobability"===t&&e!==r?this.minProbability=+r:n.prototype.attributeChangedCallback.call(this,t,e,r)},Object.defineProperty(t.prototype,"data",{set:function(n){if("string"==typeof n)this._rawData=c.parseToRowData(n);else{if(!Array.isArray(n))throw new Error("data is not in a valid format");this._rawData=n}this._data=c.getContactsObject(c.filterContacts(this._rawData,this._minDistance,this._minProbability)),this._createTrack()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minDistance",{get:function(){return this._minDistance},set:function(n){this._minDistance=+n,this._rawData&&(this._data=c.getContactsObject(c.filterContacts(this._rawData,this._minDistance,this._minProbability)),this._createTrack())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minProbability",{get:function(){return this._minProbability},set:function(n){this._minProbability=+n,this._rawData&&(this._data=c.getContactsObject(c.filterContacts(this._rawData,this._minDistance,this._minProbability)),this._createTrack())},enumerable:!1,configurable:!0}),t.prototype._getColor=function(n){return this._data.contacts[n]?u(this._data.contacts[n].size/this._data.maxNumberOfContacts):""},t.prototype._dispatchSelectNode=function(n){this._data.selected=n,this.dispatchEvent(s("mouseover",this,Array.from(this._data.contacts[n]).concat(+n).sort()))},t.prototype._createFeatures=function(){var n=this;this.removeEventListener("click",this._resetEventHandler),this.seq_g.selectAll("g.contact-group").remove();var t=this.seq_g.append("g").attr("class","contact-group");this._linksGroup=this.seq_g.append("g").attr("class","links-group"),this.contactPoints=t.selectAll(".contact-point").data(Object.keys(this._data.contacts)).enter().append("circle").attr("class","contact-point").attr("fill",(function(t){return n._getColor(t)})).attr("id",(function(n){return"cp_"+n})).style("stroke-width",2).on("mouseover",(function(t){n._data.isHold||(n._dispatchSelectNode(t),n.refresh())})).on("mouseout",(function(){n._data.isHold||(n._data.selected=void 0,n.dispatchEvent(s("mouseout",n)),n.refresh())})).on("click",(function(t){n._data.isHold=!n._data.isHold,n._data.isHold||n._dispatchSelectNode(t),n.refresh()})),this._linksData=c.contactObjectToLinkList(this._data.contacts)},t.prototype.getRadius=function(n){return(n?.6:.4)*Math.max(2,Math.min(this.height,this.getSingleBaseWidth()))},t.prototype.arc=function(n){var t=this.getXFromSeqPosition(n[0])+this.getSingleBaseWidth()/2,e=this.getXFromSeqPosition(n[1])+this.getSingleBaseWidth()/2,r=.5*this.height,o=this.getSingleBaseWidth();return"M "+t+" "+r+" C "+(t-o)+" "+-r/4+" "+(e+o)+" "+-r/4+" "+e+" "+r},t.prototype.refresh=function(){var n=this;this.contactPoints.attr("cx",(function(t){return n.getXFromSeqPosition(t)+n.getSingleBaseWidth()/2})).transition().attr("cy",.5*this.height).attr("r",(function(t){return n.getRadius(t===n._data.selected)})).attr("stroke",(function(t){return t===n._data.selected&&n._data.isHold?"rgb(127 255 127)":void 0})).style("opacity",(function(t){return t===n._data.selected?1:.4}));var t=this._data.selected?this._linksData.filter((function(t){return t.includes(+n._data.selected)})):[],e=this._linksGroup.selectAll(".contact-link").data(t,(function(n){return n[0]+"_"+n[1]}));e.exit().remove(),e.enter().append("path").attr("class","contact-link").attr("fill","transparent").attr("stroke",this._getColor(this._data.selected)).style("opacity",1).style("pointer-events","none").attr("d",(function(t){return n.arc(t)})).attr("id",(function(n){return"cn_"+n[0]+"_"+n[1]})),e.attr("d",(function(t){return n.arc(t)}))},t}(a.default);t.default=l},869:function(n,t,e){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.contactObjectToLinkList=t.getContactsObject=t.parseLinks=t.parseLinksAssociative=t.filterContacts=t.parseToRowData=void 0,t.parseToRowData=function(n){return n.split("\n").slice(1).map((function(n){if(""===n.trim())return null;var t=n.trim().split(" ");if(5===t.length){var e=t[0],r=t[1];t[2],t[3];return[+e,+r,+t[4]]}if(3===t.length)return[+(e=t[0]),+(r=t[1]),+t[2]];throw new Error("The file is not valid")})).filter(Boolean)},t.filterContacts=function(n,t,e){return n.filter((function(n){var r=n[0],o=n[1],i=n[2];return Math.abs(r-o)>=t&&i>e}))},t.parseLinksAssociative=function(n,e,r){var o=t.filterContacts(t.parseToRowData(n),e,r),i={},a=[];return o.forEach((function(n){var t=n[0],e=n[1];i[t]||i[e]?i[t]&&!i[e]?(i[e]=i[t],a[i[t]].push(e)):!i[t]&&i[e]?(i[t]=i[e],a[i[t]].push(t)):i[t]&&i[e]&&i[t]!==i[e]&&a[i[e]].forEach((function(n){a[i[t]].push(n),i[n]=i[t]})):(i[t]=a.length,i[e]=a.length,a.push([t,e]))})),{contacts:a.filter((function(n,t){return Object.values(i).includes(t)})).map((function(n){return n.sort((function(n,t){return n-t}))}))}},t.parseLinks=function(n,e,r){var o=t.parseToRowData(n);return t.getContactsObject(t.filterContacts(o,e,r))},t.getContactsObject=function(n){var t={};return n.forEach((function(n){var e=n[0],r=n[1];t[e]||(t[e]=new Set),t[r]||(t[r]=new Set),t[e].add(r),t[r].add(e)})),{contacts:t,maxNumberOfContacts:Math.max.apply(Math,Object.values(t).map((function(n){return n.size})))}},t.contactObjectToLinkList=function(n){var t=[],e=new Set;return Object.entries(n).forEach((function(n){var r=n[0];n[1].forEach((function(n){var o=r+"-"+n,i=[+r,+n];+r>+n&&(o=n+"-"+r,i=[+n,+r]),e.has(o)||(e.add(o),t.push(i))}))})),t},t.default=t.parseLinks},935:function(n,t,e){"use strict";(function(n){function e(n){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(n)}var r="object"==(void 0===n?"undefined":e(n))&&n&&n.Object===Object&&n;t.a=r}).call(this,e(112))},936:function(n,t,e){"use strict";(function(n){var r=e(641);function o(n){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(n)}var i="object"==("undefined"==typeof exports?"undefined":o(exports))&&exports&&!exports.nodeType&&exports,a=i&&"object"==o(n)&&n&&!n.nodeType&&n,c=a&&a.exports===i?r.a.Buffer:void 0,u=c?c.allocUnsafe:void 0;t.a=function(n,t){if(t)return n.slice();var e=n.length,r=u?u(e):new n.constructor(e);return n.copy(r),r}}).call(this,e(749)(n))}}]); \ No newline at end of file diff --git a/v3/9.js b/v3/9.js new file mode 100644 index 000000000..2791250a7 --- /dev/null +++ b/v3/9.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[9],{1017:function(t,e){t.exports='

    protvista-interpro-track

    \n

    Published on NPM

    \n

    Interpro adpation of the track

    \n

    Usage

    \n
          <protvista-interpro-track length="456" start="34" end="400"></protvista-track>
    \n

    API Reference

    \n

    Properties

    \n

    length: number

    \n

    The protein or nucleic acid sequence length.

    \n

    start: number (optional)

    \n

    The start position of the selected region.

    \n

    end: number (optional)

    \n

    The end position of the selected region.

    \n

    highlightStart: number (optional)

    \n

    The start position of the highlighted region.

    \n

    highlightEnd: number (optional)

    \n

    The end position of the highlighted region.

    \n

    Events

    \n'},1018:function(t){t.exports=JSON.parse('[{"accession":"IPR016039","name":"Thiolase-like","source_database":"interpro","locations":[{"fragments":[{"start":5,"end":389}],"model_acc":null,"seq_feature":null}],"color":"#84862d","type":"homologous_superfamily","k":0}]')},1019:function(t){t.exports=JSON.parse('[{"accession":"SSF53901","name":"Thiolase-like","source_database":"ssf","type":"homologous_superfamily","locations":[{"fragments":[{"start":5,"end":262}],"model_acc":"0050445","seq_feature":null},{"fragments":[{"start":266,"end":389}],"model_acc":"0049940","seq_feature":null}],"color":"#bbd279","k":0,"expanded":true},{"accession":"G3DSA:3.40.47.10","name":"G3DSA:3.40.47.10","source_database":"cathgene3d","type":"homologous_superfamily","locations":[{"fragments":[{"start":9,"end":130},{"start":188,"end":260}],"model_acc":"1wdkC01","seq_feature":null},{"fragments":[{"start":138,"end":180},{"start":272,"end":384}],"model_acc":"1wdkC02","seq_feature":null}],"color":"#87c59c","k":1,"expanded":true}]')},1020:function(t){t.exports=JSON.parse('[{"accession":"cd01991","name":"Asn_Synthase_B_C","source_database":"cdd","locations":[{"description":"Molecular Tunnel","fragments":[{"residues":"L","start":262,"end":262},{"residues":"L","start":263,"end":263},{"residues":"S","start":264,"end":264},{"residues":"A","start":290,"end":290},{"residues":"G","start":291,"end":291},{"residues":"F","start":292,"end":292},{"residues":"V","start":350,"end":350},{"residues":"T","start":363,"end":363},{"residues":"G","start":364,"end":364},{"residues":"D","start":365,"end":365}]},{"description":"Ligand Binding Site","fragments":[{"residues":"L","start":262,"end":262},{"residues":"L","start":263,"end":263},{"residues":"S","start":264,"end":264},{"residues":"A","start":290,"end":290},{"residues":"G","start":291,"end":291},{"residues":"F","start":292,"end":292},{"residues":"V","start":350,"end":350},{"residues":"T","start":363,"end":363},{"residues":"G","start":364,"end":364},{"residues":"D","start":365,"end":365}]}]}]')},163:function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(629),a=n(620),s=n(918),c=n(111),u=n(35),l=n(1017),h=n.n(l),f=n(1018),p=n(1019),d=n(1020);function g(t){return(g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function y(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function m(t){for(var e=1;et.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&void 0!==arguments[0]?arguments[0]:{},n=e.min,r=void 0===n?-1/0:n,i=e.max,a=void 0===i?1/0:i;o(this,t),this.segments=[],this.max=a,this.min=r,this.regionString=null}var e,n,i;return e=t,(n=[{key:"encode",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.segments.map((function(n){var r=n.start,i=n.end,o=n.color;if(e)return"".concat(r,":").concat(i).concat(o?":".concat(o):"");var a=r===t.min?"":r,s=i===t.max?"":i;return"".concat(a,":").concat(s).concat(o?":".concat(o):"")})).join(",")}},{key:"decode",value:function(t){var e=this;void 0!==t&&(this.regionString=t),this.regionString?this.segments=this.regionString.split(",").map((function(t){var n=r(t.split(":"),4),i=n[0],o=n[1],a=n[2];if(void 0!==n[3])throw new Error("there should be at most 2 ':' per region. Region: ".concat(t));var s=i?Number(i):e.min,c=o?Number(o):e.max,u=""!==a?a:void 0;if(s>c){var l=[c,s];s=l[0],c=l[1]}if(se.max&&(c=e.max),Number.isNaN(s))throw new Error("The parsed value of ".concat(i," is NaN. Region: ").concat(t));if(Number.isNaN(c))throw new Error("The parsed value of ".concat(o," is NaN. Region: ").concat(t));if(u&&!u.match(/^#[0-9a-f]{6,8}$/i))throw new Error("The parsed value of ".concat(a," is not a color in hex format. Region: ").concat(t));return{start:s,end:c,color:u}})):this.segments=[]}}])&&a(e.prototype,n),i&&a(e,i),t}();function c(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:400;p(this,t),this.element=e,this.timeStampWheelOutside=0,this.resetScrollableTimeout=null,this.scrollDelay=n}var e,n,r;return e=t,(n=[{key:"setElementScrollable",value:function(t){this.element.setAttribute("scrollable",t)}},{key:"startResetScrollableTimer",value:function(){var t=this;this.resetScrollableTimeout&&clearTimeout(this.resetScrollableTimeout),this.resetScrollableTimeout=setTimeout((function(){t.setElementScrollable(!0),t.resetScrollableTimeout=null}),this.scrollDelay)}},{key:"blockScroll",value:function(t){this.timeStampWheelOutside=t,this.setElementScrollable(!1),this.startResetScrollableTimer()}},{key:"wheel",value:function(t){var e=t.target,n=t.timeStamp;this.element.contains(e)?n=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function b(t){return function(t){if(Array.isArray(t))return _(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||v(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(t,e){if(t){if("string"==typeof t)return _(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_(t,e):void 0}}function _(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&void 0!==arguments[0]?arguments[0]:null,e=[],n=[];if(null!==t&&"string"!=typeof t)throw new Error("The attribute text has to be of type string");if(t&&""!==t.trim()){var r=t.split(",").map((function(t){return t.split(":")}));if(r.length<2)throw new Error("There should be at least 2 points to create a scale");e=r.map((function(t){var e=t[0].trim().toUpperCase();if(!h(e))throw new Error("The color '".concat(e," is not valid'"));return e})),n=r.map((function(t,e){var n=parseFloat(t[1]);if(Number.isNaN(n))throw new Error("The second part of every point should be a number. Error in point ".concat(e,": ").concat(t));return n}))}return{range:e,domain:n}},T=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.keyFormatter,r=void 0===n?f:n,i=e.valueFormatter,o=void 0===i?f:i;if(null!==t&&"string"!=typeof t)throw new Error("The attribute text has to be of type string");if(t&&""!==t.trim()){var a=t.split(",").map((function(t){return t.split(":")})),s={};return a.forEach((function(t){if(2!==t.length)throw new Error("Bad block: ".concat(t.join(":"),"\n The blocks of the string should follow the format KEY:VALUE"));s[r(t[0])]=o(t[1])})),s}return{}},D=g,N=function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{initialValue:{top:0,bottom:0,left:0,right:0}},r=function(t){j(r,t);var e=E(r);function r(){var t;return O(this,r),(t=e.call(this)).margin=n.initialValue,t}return S(r,[{key:"attributeChangedCallback",value:function(t,e,n){e!==n&&F.includes(t)&&(this[t]=n),k(A(r.prototype),"attributeChangedCallback",this).call(this,t,e,n)}}],[{key:"observedAttributes",get:function(){return[].concat(b(k(A(r),"observedAttributes",this)),b(F))}}]),r}(t),i=m(C);try{var o=function(){var t=e.value;Object.defineProperty(r.prototype,"margin".concat(t),{get:function(){return this.margin[t]||0},set:function(e){this.margin[t]=+e}})};for(i.s();!(e=i.n()).done;)o()}catch(t){i.e(t)}finally{i.f()}return r}},594:function(t,e,n){"use strict";var r=n(608),i=n(604);e.a=function(t){return Object(i.a)(t)&&Object(r.a)(t)}},595:function(t,e,n){"use strict";e.a=function(t,e,n){for(var r=-1,i=null==t?0:t.length;++r-1}},598:function(t,e,n){"use strict";var r=n(614);var i=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)},o=Math.max;var a=function(t,e,n){return e=o(void 0===e?t.length-1:e,0),function(){for(var r=arguments,a=-1,s=o(r.length-e,0),c=Array(s);++a0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(u);e.a=function(t,e){return h(a(t,e,r.a),t+"")}},599:function(t,e,n){"use strict";var r=function(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o-1:!!a&&Object(i.a)(t,e,n)>-1},A=n(632),C=n(619),F=n(613),M=n(609);function R(t,e){for(var n=0;n5&&(t=this._ftWidth-5);var e=this._ftHeight/4;return"M0,"+e+"L"+t+","+e+"L"+t+","+3*e+"L0,"+3*e+"L0,"+e+"M"+t+",0L"+this._ftWidth+","+2*e+"L"+t+","+this._ftHeight+"Z"}}])&&R(e.prototype,n),r&&R(e,r),t}();function T(t,e){for(var n=0;nNumber(n.end)||Number(r.end)=0?(e._rows[n].push(t),e.featuresMap.set(t,n)):(e._rows.push([t]),e.featuresMap.set(t,e._rows.length-1))})),this._rowHeight=Math.min(this._layoutHeight/this._rows.length,this._minHeight)}},{key:"getOffset",value:function(){return this._rows.length*this._rowHeightt.length)&&(e=t.length);for(var n=0,r=new Array(e);n500&&(n=t.getSingleBaseWidth()<4?4:1),t._featureShape.getFeatureShape(t.getSingleBaseWidth()/2,t._layoutObj.getFeatureHeight(),n,t._getShape(e))})).attr("transform",(function(e){return"translate(".concat(t.getXFromSeqPosition(Number(e.feature.start)+Number(e.position)-1)+t.getSingleBaseWidth()/4,",\n ").concat(t._layoutObj.getFeatureYPos(e.feature),")")})).attr("fill","#06038D").style("fill-opacity",(function(t){var e=t.feature;return e.opacity?e.opacity:.9})).style("stroke-opacity",(function(t){var e=t.feature;return e.opacity?e.opacity:.9})).call(this.bindEvents,this)}},{key:"_applyFilters",value:function(){var t=this;if(!this._filters||this._filters.length<=0)this._data=this._originalData;else{var e=Object(A.a)(this._filters,"category"),n=Object.values(e).map((function(e){var n=e.map((function(e){return e.filterFn(t._originalData)}));return C.a.apply(void 0,V(n))})),r=F.a.apply(void 0,V(n));this._data=r}}},{key:"refresh",value:function(){var t=this;if(this.xScale&&this.seq_g){var e=this.seq_g.selectAll("g.fragment-group").data(this._data.reduce((function(t,e){return t.concat(e.locations.reduce((function(t,n){return t.concat(n.fragments.map((function(t){return Object.assign({},t,{feature:e})})))}),[]))}),[])),n=this.seq_g.selectAll("g.residue-group").data(this._data.reduce((function(t,e){var n;return t.concat([null===(n=e.ptms)||void 0===n?void 0:n.reduce((function(t){return t.concat((function(t){return Object.assign({},t,{feature:e,position:t.position})}))}),[])])}),[]));e.selectAll("path.feature").attr("d",(function(e){return t._featureShape.getFeatureShape(t.getSingleBaseWidth(),t._layoutObj.getFeatureHeight(e),e.end?e.end-e.start+1:1,t._getShape(e))})).attr("transform",(function(e){return"translate(".concat(t.getXFromSeqPosition(e.start),",").concat(t._layoutObj.getFeatureYPos(e.feature),")")})),n.selectAll("path.residue").attr("d",(function(e){var n=1;return t.length>500&&(n=t.getSingleBaseWidth()<4?4:1),t._featureShape.getFeatureShape(t.getSingleBaseWidth()/2,t._layoutObj.getFeatureHeight(e),n,t._getShape(e))})).attr("transform",(function(e){return"translate(".concat(t.getXFromSeqPosition(Number(e.feature.start)+Number(e.position)-1)+t.getSingleBaseWidth()/4,",").concat(t._layoutObj.getFeatureYPos(e.feature),")")})),e.selectAll("rect.outer-rectangle").attr("width",(function(e){return t.getSingleBaseWidth()*(e.end?e.end-e.start+1:1)})).attr("height",(function(e){return t._layoutObj.getFeatureHeight(e)})).attr("transform",(function(e){return"translate(".concat(t.getXFromSeqPosition(e.start),",").concat(t._layoutObj.getFeatureYPos(e.feature),")")})),this._updateHighlight()}}},{key:"_updateHighlight",value:function(){this.trackHighlighter.updateHighlight()}}])&&K(e.prototype,n),i&&K(e,i),a}(M.a);e.default=it},609:function(t,e,n){"use strict";var r=n(585),i=n(593),o=n(665);function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=t&&("undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"]);if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(t){s=!0,i=t}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return c(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4?arguments[4]:void 0,a=arguments.length>5?arguments[5]:void 0,s=arguments.length>6?arguments[6]:void 0;e&&(e=e.feature?e.feature:e);var c={eventtype:t,coords:m._getClickCoords(),feature:e,target:s};return n&&(e&&e.fragments?c.highlight=e.fragments.map((function(t){return"".concat(t.start,":").concat(t.end)})).join(","):r.event&&r.event.shiftKey&&this._highlight?c.highlight="".concat(this._highlight,",").concat(o,":").concat(a):c.highlight=o&&a?"".concat(o,":").concat(a):null),i&&(c.selectedid=e&&e.protvistaFeatureId),new CustomEvent("change",{detail:c,bubbles:!0,cancelable:!0})}},{key:"bindEvents",value:function(t,e){t.on("mouseover",(function(t,n,r){e.dispatchEvent(e.createEvent("mouseover",t,"onmouseover"===e._highlightEvent,!1,t.start,t.end,r[n]))})).on("mouseout",(function(){e.dispatchEvent(e.createEvent("mouseout",null,"onmouseover"===e._highlightEvent))})).on("click",(function(t,n,r){e.dispatchEvent(e.createEvent("click",t,"onclick"===e._highlightEvent,!0,t.start,t.end,r[n]))}))}}])&&u(a.prototype,c),f&&u(a,f),m}(f(HTMLElement));e.a=Object(i.f)(m,{initialValue:{top:10,right:10,bottom:10,left:10}})},613:function(t,e,n){"use strict";var r=n(590),i=n(621),o=n(596),a=n(595),s=n(664),c=n(616),u=Math.min;var l=function(t,e,n){for(var l=n?a.a:o.a,h=t[0].length,f=t.length,p=f,d=Array(f),g=1/0,y=[];p--;){var m=t[p];p&&e&&(m=Object(r.a)(m,Object(s.a)(e))),g=u(m.length,g),d[p]=!n&&(e||h>=120&&m.length>=120)?new i.a(p&&m):void 0}m=t[0];var b=-1,v=d[0];t:for(;++b=200){var g=e?null:f(t);if(g)return Object(h.a)(g);l=!1,i=c.a,d=new o.a}else d=e?[]:p;t:for(;++rt.length)&&(e=t.length);for(var n=0,r=new Array(e);n".concat(t.map((function(t){var e,n,r=i.find((function(e){return e.name===t.code}));return r?"
  • ').concat(r.shortDescription,": ").concat(t.source?(e=t.source,(null===(n=e.name)||void 0===n?void 0:n.toLowerCase())==="PubMed".toLowerCase()?"".concat(e.id," (").concat(e.name," EuropePMC)"):" ").concat(e.id," ").concat(e.name?"(".concat(e.name,")"):"")):"","
  • "):""})).join(""),"\n "):""},h=function(t){return"
      ".concat(t.map((function(t){return'
    • '.concat(t.name," ").concat(t.url?'').concat(t.id,""):"".concat(t.name," ").concat(t.id),"
    • ")})).join(""),"
    ")},f={A:"alanine",S:"serine",T:"threonine",Y:"tyrosine"},p=function(t,e){var n=t.peptide,r=t.begin,i=Number(r)+e.position-1,o=n.charAt(e.position-1);return"".concat(i," phospho").concat(f[o])},d=function(t){var e="PROTEOMICS_PTM"===t.type?function(t){if(!t)return"";var e=t.flatMap((function(t){return t.dbReferences.map((function(t){return t.id}))})),n=o(new Set(e.flat()));return"\n
      ".concat(n.map((function(t){var e="Glue project"===t?"PXD012174":t;return"
    • ').concat(e,' (PRIDE\n ').concat("Glue project"===t?')
    • Publication: 31819260 (PubMed)
    • ':' PeptideAtlas)')})).join(""),"
    \n")}(t.ptms):l(t.evidences),n="PROTEOMICS_PTM"===t.type&&t.ptms.map((function(e){return p(t,e)})),r="PROTEOMICS_PTM"===t.type&&t.ptms.flatMap((function(t){return t.dbReferences.map((function(t){return t.id}))})),i=t.description;if("BINDING"===t.type||"Binding site"===t.type){var a="";t.ligandPart&&(a+="".concat(t.ligandPart.name," of ")),t.ligand&&(a+=t.ligand.name),t.description&&(a+="; ".concat(t.description)),i=a}try{return"\n ".concat(i?"
    Description

    ".concat(i,"

    "):"","\n ").concat(t.matchScore?"
    Match score

    ".concat(t.matchScore,"%

    "):"","\n ").concat(t.ftId?"
    Feature ID

    ".concat(t.ftId,"

    "):"","\n ").concat(t.alternativeSequence?"
    Alternative sequence

    ".concat(t.alternativeSequence,"

    "):"","\n ").concat(n?'
    PTMs
      '.concat(n.map((function(t){return"
    • ".concat(t,"
    • ")})).join(""),"
    \n "):"","\n ").concat(t.peptide&&"PROTEOMICS_PTM"===t.type?'
    Peptidoform

    '.concat(function(t,e){if(!e)return"";var n=e.map((function(t){return{name:t.name,position:t.position}})),r="",i=0;return n.forEach((function(e){r="".concat(r).concat(t.slice(i,e.position),"[").concat(e.name,"]"),i=e.position})),r="".concat(r).concat(t.slice(i)),"

    ".concat(r,"

    ")}(t.peptide,t.ptms),"

    "):"","\n ").concat(t.peptide&&"PROTEOMICS_PTM"!==t.type?"
    Peptide

    ".concat(t.peptide,"

    "):""," \n ").concat(t.xrefs?"
    Cross-references
    ".concat(h(t.xrefs)):"","\n ").concat(e?"
    Evidence
    ".concat(e):"","\n ").concat(t.ptms&&r&&!r.includes("Glue project")?'
    PTM statistical attributes
      '.concat(t.ptms.map((function(e){return e.dbReferences.map((function(n){return"
    • ".concat(n.id,'
    • \n
    • ').concat(p(t,e),'
    • \n
    • PubMed ID: \n ').concat(n.properties["Pubmed ID"],'\n
    • \n
    • Confidence score: ').concat(n.properties["Confidence score"],'
    • \n
    • Universal Spectrum Id: \n View on ProteomeXchange\n
    • \n
    • PSM Count: ').concat(n.properties["PSM Count"],'
    • \n
    • Site probability: ').concat(n.properties["Site probability"],"
    • \n ")})).join("")})).join(""),"
    "):"","\n ")}catch(t){return console.error(t),""}};function g(t){return(g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function y(t,e){for(var n=0;n0&&(e=function(t){return t.map((function(t){var e={};return t.begin&&(e.start=t.begin),c(c({},t),e)}))}(e=n.map((function(t){return k(k({},t),{},{tooltipContent:d(t),protvistaFeatureId:Object(r.a)()})})))),e},E=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&O(t,e)}(s,t);var e,n,r,i,o,a=(e=s,n=_(),function(){var t,r=w(e);if(n){var i=w(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return m(this,t)});function s(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),(t=a.call(this))._adaptedData=[],t}return r=s,(i=[{key:"connectedCallback",value:function(){this.subscribers=this.getAttribute("subscribers"),this._filters=this.getAttribute("filters")?this.getAttribute("filters").split(","):[],this._addLoaderListeners()}},{key:"data",set:function(t){this._emitEvent(t)}},{key:"subscribers",get:function(){return this._subscribers},set:function(t){t&&(this._subscribers=t.split(","))}},{key:"parseEntry",value:function(t){this._adaptedData=P(t)}},{key:"filterData",value:function(){var t=this;Array.isArray(this._adaptedData)&&this._filters.length>0&&(this._adaptedData=this._adaptedData.filter((function(e){return t._filters.includes(e.type)})))}},{key:"adaptedData",get:function(){return this._adaptedData}},{key:"_setSubscriberData",value:function(){var t=this;this.subscribers.forEach((function(e){var n=document.querySelector(e);n?n.data=t._adaptedData:console.error("Element with id '".concat(e,"' not found"))}))}},{key:"_emitEvent",value:function(t){this.parseEntry(t),this.filterData(),this.subscribers&&this._setSubscriberData(),this.dispatchEvent(new CustomEvent("load",{detail:{payload:this._adaptedData},bubbles:!0,cancelable:!0}))}},{key:"_addLoaderListeners",value:function(){var t=this;this.addEventListener("load",(function(e){if(e.target!==t){e.stopPropagation();try{if(e.detail.payload.errorMessage)throw e.detail.payload.errorMessage;t._emitEvent(e.detail.payload)}catch(e){t.dispatchEvent(new CustomEvent("error",{detail:e,bubbles:!0,cancelable:!0}))}}}))}}])&&y(r.prototype,i),o&&y(r,o),s}(b(HTMLElement));e.a=E},629:function(t,e,n){"use strict";n.d(e,"b",(function(){return m}));var r=n(675);function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return a(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return a(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,c=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){c=!0,o=t},f:function(){try{s||null==n.return||n.return()}finally{if(c)throw o}}}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n1&&void 0!==arguments[1]?arguments[1]:new Headers({accept:"application/json"}),n=y.get(t);if(n)return n;var r=g(void 0,void 0,void 0,regeneratorRuntime.mark((function n(){var r,i;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,window.fetch(t,{headers:e});case 2:if((r=n.sent).ok){n.next=5;break}throw new Error("Request Failed: Status = ".concat(r.status,"; URI = ").concat(t,"; Time = ").concat(new Date));case 5:if(204!==r.status){n.next=7;break}return n.abrupt("return",{payload:null,headers:r.headers});case 7:return n.next=9,r.json();case 9:return i=n.sent,n.abrupt("return",{payload:i,headers:r.headers});case 11:case"end":return n.stop()}}),n)})));return y.set(t,r),r.catch((function(){return y.delete(t)})),r},b=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&f(t,e)}(y,t);var e,n,i,a,u,l=(e=y,n=h(),function(){var t,r=p(e);if(n){var i=p(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return c(this,t)});function y(){var t;return d(this,y),(t=l.call(this))._data=null,t.selector=(t.getAttribute("selector")||"").trim()||function(t){return t},t}return i=y,u=[{key:"is",get:function(){return"data-loader"}}],(a=[{key:"fetch",value:function(){return g(this,void 0,void 0,regeneratorRuntime.mark((function t(){var e,n,i,a,s,c;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(u=this.children,(e=Array.from(u).filter((function(t){return t.matches('source[src], script[type="application/json"]')}))).length){t.next=3;break}return t.abrupt("return");case 3:n=[],a=o(e),t.prev=5,a.s();case 7:if((s=a.n()).done){t.next=31;break}if(c=s.value,t.prev=9,!(c instanceof HTMLSourceElement)){t.next=22;break}return t.t0=Object,t.t1=Object,t.t2={},t.next=16,m(c.src);case 16:t.t3=t.sent,t.t4=t.t1.assign.call(t.t1,t.t2,t.t3),t.t5={srcElement:c,src:c.src},i=t.t0.assign.call(t.t0,t.t4,t.t5),t.next=23;break;case 22:i={payload:JSON.parse(c.textContent)};case 23:return t.abrupt("break",31);case 26:t.prev=26,t.t6=t.catch(9),n.push(t.t6);case 29:t.next=7;break;case 31:t.next=36;break;case 33:t.prev=33,t.t7=t.catch(5),a.e(t.t7);case 36:return t.prev=36,a.f(),t.finish(36);case 39:if(i){t.next=43;break}this._errors=n;try{this.dispatchEvent(new CustomEvent("error",{detail:n,bubbles:!0,cancelable:!0}))}catch(t){console.error(t)}return t.abrupt("return");case 43:"string"==typeof this.selector?this._data=Object(r.a)(i.payload,this.selector):this._data=this.selector(i.payload),i.payload=this.data,this.dispatchEvent(new CustomEvent("load",{detail:i,bubbles:!0,cancelable:!0}));case 46:case"end":return t.stop()}var u}),t,this,[[5,33,36,39],[9,26]])})))}},{key:"data",get:function(){return this._data}},{key:"loaded",get:function(){return!!this.data}},{key:"errors",get:function(){return this._errors}},{key:"selector",get:function(){return this._selector},set:function(t){this._selector=t}},{key:"connectedCallback",value:function(){this.fetch()}}])&&s(i.prototype,a),u&&s(i,u),y}(u(HTMLElement));e.a=b},743:function(t,e,n){"use strict";var r,i=new Uint8Array(16);function o(){if(!r&&!(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(i)}var a=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var s=function(t){return"string"==typeof t&&a.test(t)},c=[],u=0;u<256;++u)c.push((u+256).toString(16).substr(1));var l,h,f=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(c[t[e+0]]+c[t[e+1]]+c[t[e+2]]+c[t[e+3]]+"-"+c[t[e+4]]+c[t[e+5]]+"-"+c[t[e+6]]+c[t[e+7]]+"-"+c[t[e+8]]+c[t[e+9]]+"-"+c[t[e+10]]+c[t[e+11]]+c[t[e+12]]+c[t[e+13]]+c[t[e+14]]+c[t[e+15]]).toLowerCase();if(!s(n))throw TypeError("Stringified UUID is invalid");return n},p=0,d=0;e.a=function(t,e,n){var r=e&&n||0,i=e||new Array(16),a=(t=t||{}).node||l,s=void 0!==t.clockseq?t.clockseq:h;if(null==a||null==s){var c=t.random||(t.rng||o)();null==a&&(a=l=[1|c[0],c[1],c[2],c[3],c[4],c[5]]),null==s&&(s=h=16383&(c[6]<<8|c[7]))}var u=void 0!==t.msecs?t.msecs:Date.now(),g=void 0!==t.nsecs?t.nsecs:d+1,y=u-p+(g-d)/1e4;if(y<0&&void 0===t.clockseq&&(s=s+1&16383),(y<0||u>p)&&void 0===t.nsecs&&(g=0),g>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");p=u,d=g,h=s;var m=(1e4*(268435455&(u+=122192928e5))+g)%4294967296;i[r++]=m>>>24&255,i[r++]=m>>>16&255,i[r++]=m>>>8&255,i[r++]=255&m;var b=u/4294967296*1e4&268435455;i[r++]=b>>>8&255,i[r++]=255&b,i[r++]=b>>>24&15|16,i[r++]=b>>>16&255,i[r++]=s>>>8|128,i[r++]=255&s;for(var v=0;v<6;++v)i[r+v]=a[v];return e||f(i)}},918:function(t,e,n){"use strict";var r=n(603);function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){for(var n=0;n=e.start&&t.end<=e.end}))}))}))})),t.locations=t.locations.filter((function(t){return t.fragments.length}))}},{key:"_getAccFromFeature",value:function(t){var e="";return"string"==typeof t?e=t:t.accession&&(e=t.accession),e}}],(n=[{key:"init",value:function(t,e){var n=0;if(this.height={},this.yPos={},this.maxYPos=0,t){this.innerPadding=3;for(var r={},i=0;i5&&void 0!==arguments[5]?arguments[5]:{},a=!(arguments.length>6&&void 0!==arguments[6])||arguments[6],s=0;s=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function p(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=a.end?(i.push({start:r.start,end:a.start-1,value:r.value}),i.push({start:a.start,end:a.end,value:a.value+r.value}),r=a.end===r.end?null:{start:a.end+1,end:r.end,value:r.value}):a.startr.end?(i.push({start:a.start,end:r.start-1,value:a.value}),i.push({start:r.start,end:r.end,value:a.value+r.value}),i.push({start:r.end+1,end:a.end,value:a.value}),r=null):a.end>=r.start&&a.end<=r.end?(a.start=a.start&&r.end=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function w(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n1&&void 0!==arguments[1]?arguments[1]:100,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=[];return n&&(r=y({start:1,end:e,value:0},r)),t.forEach((function(t){return t.locations.forEach((function(t){return t.fragments.forEach((function(t){r=y(t,r)}))}))})),r}(this._contributors,this._length),this._data&&this._createTrack()}},{key:"getLayout",value:function(){return new h({layoutHeight:this._height,expanded:this._expanded,padding:2})}},{key:"color",set:function(t){this._color!==t&&(this._color=t,this.refresh())}},{key:"_createResiduePaths",value:function(t){var e=this;return t.selectAll("g.residue").data((function(t){return t.fragments.map((function(e){return v(v({},e),{},{accession:t.accession,feature:v(v({},t.feature),{},{currentResidue:v(v({},e),{},{description:t.location.description})}),location:t.location,k:t.feature.k,i:t.i,j:t.j})}))})).enter().append("path").attr("class","feature rectangle residue").attr("d",(function(t){return e._featureShape.getFeatureShape(e.getSingleBaseWidth(),e._layoutObj.getFeatureHeight("".concat(t.accession,"_").concat(t.k,"_").concat(t.i,"_").concat(t.j)),t.end?t.end-t.start+1:1,"rectangle")})).attr("transform",(function(t){return"translate(".concat(e.getXFromSeqPosition(t.start),",").concat(C+e._layoutObj.getFeatureYPos("".concat(t.accession,"_").concat(t.k,"_").concat(t.i,"_").concat(t.j)),")")})).attr("fill",(function(t){return e._getFeatureColor(t)})).attr("stroke","transparent").call(this.bindEvents,this)}},{key:"_refreshResiduePaths",value:function(t,e){var n=this,r=new Set(t.data().map((function(t){return"".concat(t.feature.accession,"-").concat(t.location.description)}))).size;t.attr("d",(function(t){return n._featureShape.getFeatureShape(n.getSingleBaseWidth(),n._layoutObj.getFeatureHeight("".concat(t.accession,"_").concat(t.k,"_").concat(t.i,"_").concat(t.j)),t.end?t.end-t.start+1:1,"rectangle")})).attr("transform",(function(t){return"translate(".concat(n.getXFromSeqPosition(t.start),",").concat(C+n._layoutObj.getFeatureYPos("".concat(t.accession,"_").concat(t.k,"_").concat(t.i,"_").concat(t.j)),")")})).style("pointer-events",(function(t){return e||t.feature&&t.feature.expanded?"auto":"none"})).style("stroke",(function(){return e?null:"none"})).style("opacity",(function(){return e?null:.8/r})).attr("fill",(function(t){return e||t.feature&&t.feature.expanded?n._getFeatureColor(t):"white"}))}},{key:"_createFeatures",value:function(){var t=this;if(this._layoutObj.init(this._data,this._contributors),this._data.forEach((function(t,e){return t.k=e})),this.featuresG=this.seq_g.selectAll("g.feature-group").data(this._data).enter().append("g").attr("class","feature-group").attr("id",(function(t){return"g_".concat(t.accession)})),this.locations=this.featuresG.selectAll("g.location-group").data((function(t){return t.locations.map((function(e){return v(v({},e),{},{feature:t})}))})).enter().append("g").attr("class","location-group"),this.coverLines=this.locations.selectAll("line.cover").data((function(t){return[t.fragments.reduce((function(e,n){return{start:Math.min(e.start,n.start),end:Math.max(e.end,n.end),feature:t.feature}}),{start:1/0,end:-1/0})]})).enter().append("line").attr("class","cover"),this.features=this.locations.selectAll("path.feature").data((function(t){return t.fragments.map((function(e){return v(v({},e),{},{feature:t.feature,fragments:t.fragments})}))})).enter().append("path").attr("class",(function(e){return"".concat(t._getShape(e)," feature")})).on("click.expanded",(function(){t._expanded?t.removeAttribute("expanded"):t.setAttribute("expanded","expanded")})).call(this.bindEvents,this),this.residues_g=a._createResidueGroup(this.featuresG),this.residues_loc=this._createResiduePaths(this.residues_g),this._contributors){this._contributors.forEach((function(t,e){return t.k=e})),this.children_g||(this.children_g=this.svg.append("g").attr("class","children-features")),this.childrenGroup=this.children_g.append("g").attr("class","children-group"),this.childGroup=this.childrenGroup.selectAll("g.child-group").data(this._contributors).enter().append("g").attr("class","child-group");var e=this.childGroup.selectAll("g.child-location-group").data((function(e){return e.expanded=t._expanded,e.locations.map((function(t){return v(v({},t),{},{feature:e})}))})).enter().append("g").attr("class",(function(t,e){return"child-location-group clg-".concat(e)}));this.coverLinesChildren=e.selectAll("line.cover").data((function(t){return[t.fragments.reduce((function(e,n){return{start:Math.min(e.start,n.start),end:Math.max(e.end,n.end),feature:t.feature}}),{start:1/0,end:-1/0})]})).enter().append("line").attr("class","cover"),this.featureChildren=e.selectAll("path.child-fragment").data((function(t){return t.fragments.map((function(e){return v(v({},e),{},{feature:t.feature,fragments:t.fragments})}))})).enter().append("path").attr("class",(function(e){return"".concat(t._getShape(e)," child-fragment feature")})).call(this.bindEvents,this).on("click.expanded",(function(e){e.feature.expanded=!e.feature.expanded,t.refresh()})),this.child_residues_g=a._createResidueGroup(this.childGroup),this.child_residues_loc=this._createResiduePaths(this.child_residues_g),this._coverage&&this._coverage.length&&this._createCoverage()}this.svg.attr("height",this._layoutObj.maxYPos),this._haveCreatedFeatures=!0}},{key:"_createCoverage",value:function(){this._accession=this._data&&this._data[0]&&this._data[0].accession||"_",this.coverage_mask=this.svg.append("defs").append("mask").attr("id","mask-".concat(this._accession)),this.coverageMaskFragment=this.coverage_mask.selectAll("rect").data(this._coverage).enter().append("rect").attr("y",0).attr("height",this._height)}},{key:"_refreshCoverage",value:function(){var t=this;this.featuresG.attr("mask",this._expanded?null:"url(#mask-".concat(this._accession,")")),this.coverageMaskFragment.attr("x",(function(e){return t.getXFromSeqPosition(e.start)})).attr("width",(function(e){return t.getSingleBaseWidth()*(e.end-e.start+1)})).attr("fill","white").attr("opacity",(function(e){return(e.value/t._contributors.length+.3)/1.3}))}},{key:"_refreshFeatures",value:function(t){var e=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=new Set(t.data().map((function(t){return t.feature.accession}))).size;t.attr("d",(function(t){return e._featureShape.getFeatureShape(e.getSingleBaseWidth(),e._layoutObj.getFeatureHeight(t.feature),t.end?t.end-t.start+1:1,n?e._getShape(t.shape?t:t.feature):"rectangle")})).attr("fill",(function(t){return n?e._getFeatureColor(t.feature):"white"})).attr("opacity",n?1:.8/r).style("stroke",(function(t){return n?e._getFeatureColor(t.feature):"none"})).attr("transform",(function(t){return"translate(".concat(e.getXFromSeqPosition(t.start),",").concat(C+e._layoutObj.getFeatureYPos(t.feature),")")})).style("pointer-events",n?"auto":"none")}},{key:"_refreshCoverLine",value:function(t){var e=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];t.attr("x1",(function(t){return e.getXFromSeqPosition(t.start)})).attr("x2",(function(t){return e.getXFromSeqPosition(t.end+1)})).attr("y1",(function(t){return C+e._layoutObj.getFeatureYPos(t.feature)+e._layoutObj.getFeatureHeight(t.feature)/2})).attr("y2",(function(t){return C+e._layoutObj.getFeatureYPos(t.feature)+e._layoutObj.getFeatureHeight(t.feature)/2})).attr("stroke",(function(t){return e._getFeatureColor(t.feature)})).attr("visibility",n?"visible":"hidden")}},{key:"refresh",value:function(){var t=this;this._haveCreatedFeatures&&(this._layoutObj.expanded=this._expanded,this._layoutObj.init(this._data,this._contributors),this.height=this._layoutObj.maxYPos,this._refreshCoverLine(this.coverLines),this._refreshFeatures(this.features),this._refreshResiduePaths(this.residues_loc,this._expanded),this._contributors&&(this.childrenGroup.attr("visibility",this._expanded?"visible":"hidden"),this._refreshCoverLine(this.coverLinesChildren,this._expanded),this._refreshFeatures(this.featureChildren,this._expanded),this.child_residues_g.attr("visibility",(function(){return t._expanded?"visible":"hidden"})),this._refreshResiduePaths(this.child_residues_loc),this._coverage&&this._coverage.length&&this._refreshCoverage()),this._updateHighlight(),this.svg.attr("height",this._layoutObj.maxYPos))}}])&&k(e.prototype,n),i&&k(e,i),a}(r.default);e.a=F}}]); \ No newline at end of file diff --git a/v3/conservation.worker.worker.js b/v3/conservation.worker.worker.js new file mode 100644 index 000000000..70bb82053 --- /dev/null +++ b/v3/conservation.worker.worker.js @@ -0,0 +1 @@ +!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";n.r(t),n.d(t,"calculateConservation",(function(){return o}));var r="A".charCodeAt(0),o=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=e&&e.length&&e[0].sequence.length||0,u=t?Math.min(t,e.length):e.length,a=t?e.slice(0,u):e,l=new Float32Array(26*o),i=0;i=26||l[d+p]++}for(var v=0;vNightingale - re-usable visualisations for the life sciences
    \ No newline at end of file diff --git a/v3/main.js b/v3/main.js new file mode 100644 index 000000000..698e9de58 --- /dev/null +++ b/v3/main.js @@ -0,0 +1,234 @@ +!function(e){function t(t){for(var n,a,i=t[0],o=t[1],s=0,c=[];s0;){var T=f[m],y=d.exec(T)[2],C=y.toLowerCase()+o,N=E.getAttribute(C);E.removeAttribute(C);var O=N.split(i);this.parts.push({type:"attribute",index:p,name:y,strings:O}),m+=O.length-1}}"TEMPLATE"===E.tagName&&(s.push(E),c.currentNode=E.content)}else if(3===E.nodeType){var R=E.data;if(R.indexOf(r)>=0){for(var I=E.parentNode,A=R.split(i),D=A.length-1,w=0;w=0&&e.slice(n)===t},c=function(e){return-1!==e.index},u=function(){return document.createComment("")},d=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/},function(e,t,n){var r=n(64)("wks"),a=n(40),i=n(2).Symbol,o="function"==typeof i;(e.exports=function(e){return r[e]||(r[e]=o&&i[e]||(o?i:a)("Symbol."+e))}).store=r},function(e,t,n){var r=n(24),a=Math.min;e.exports=function(e){return e>0?a(r(e),9007199254740991):0}},function(e,t){var n=e.exports={version:"2.6.12"};"number"==typeof __e&&(__e=n)},function(e,t,n){e.exports=!n(3)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(e,t,n){var r=n(4),a=n(117),i=n(36),o=Object.defineProperty;t.f=n(10)?Object.defineProperty:function(e,t,n){if(r(e),t=i(t,!0),r(n),a)try{return o(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){"use strict";n.d(t,"a",(function(){return y})),n.d(t,"d",(function(){return N})),n.d(t,"b",(function(){return O})),n.d(t,"e",(function(){return R})),n.d(t,"c",(function(){return D}));var r=n(34),a=n(15),i=n(13),o=n(49),s=n(38),l=n(6);function c(e,t,n){return(c="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=m(e)););return e}(e,t);if(r){var a=Object.getOwnPropertyDescriptor(r,t);return a.get?a.get.call(n):a.value}})(e,t,n||e)}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&d(e,t)}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m(e);if(t){var a=m(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return p(this,n)}}function p(e,t){return!t||"object"!==b(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function f(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return g(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return g(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:this.startNode;Object(a.b)(this.startNode.parentNode,e.nextSibling,this.endNode)}}]),e}(),O=function(){function e(t,n,r){if(E(this,e),this.value=void 0,this.__pendingValue=void 0,2!==r.length||""!==r[0]||""!==r[1])throw new Error("Boolean attributes can only contain a single expression");this.element=t,this.name=n,this.strings=r}return h(e,[{key:"setValue",value:function(e){this.__pendingValue=e}},{key:"commit",value:function(){for(;Object(r.a)(this.__pendingValue);){var e=this.__pendingValue;this.__pendingValue=i.a,e(this)}if(this.__pendingValue!==i.a){var t=!!this.__pendingValue;this.value!==t&&(t?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name),this.value=t),this.__pendingValue=i.a}}}]),e}(),R=function(e){u(n,e);var t=_(n);function n(e,r,a){var i;return E(this,n),(i=t.call(this,e,r,a)).single=2===a.length&&""===a[0]&&""===a[1],i}return h(n,[{key:"_createPart",value:function(){return new I(this)}},{key:"_getValue",value:function(){return this.single?this.parts[0].value:c(m(n.prototype),"_getValue",this).call(this)}},{key:"commit",value:function(){this.dirty&&(this.dirty=!1,this.element[this.name]=this._getValue())}}]),n}(y),I=function(e){u(n,e);var t=_(n);function n(){return E(this,n),t.apply(this,arguments)}return n}(C),A=!1;!function(){try{var e={get capture(){return A=!0,!1}};window.addEventListener("test",e,e),window.removeEventListener("test",e,e)}catch(e){}}();var D=function(){function e(t,n,r){var a=this;E(this,e),this.value=void 0,this.__pendingValue=void 0,this.element=t,this.eventName=n,this.eventContext=r,this.__boundHandleEvent=function(e){return a.handleEvent(e)}}return h(e,[{key:"setValue",value:function(e){this.__pendingValue=e}},{key:"commit",value:function(){for(;Object(r.a)(this.__pendingValue);){var e=this.__pendingValue;this.__pendingValue=i.a,e(this)}if(this.__pendingValue!==i.a){var t=this.__pendingValue,n=this.value,a=null==t||null!=n&&(t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive),o=null!=t&&(null==n||a);a&&this.element.removeEventListener(this.eventName,this.__boundHandleEvent,this.__options),o&&(this.__options=w(t),this.element.addEventListener(this.eventName,this.__boundHandleEvent,this.__options)),this.value=t,this.__pendingValue=i.a}}},{key:"handleEvent",value:function(e){"function"==typeof this.value?this.value.call(this.eventContext||this.element,e):this.value.handleEvent(e)}}]),e}(),w=function(e){return e&&(A?{capture:e.capture,passive:e.passive,once:e.once}:e.capture)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return a})); +/** + * @license + * Copyright (c) 2018 The Polymer Project Authors. All rights reserved. + * This code may only be used under the BSD style license found at + * http://polymer.github.io/LICENSE.txt + * The complete set of authors may be found at + * http://polymer.github.io/AUTHORS.txt + * The complete set of contributors may be found at + * http://polymer.github.io/CONTRIBUTORS.txt + * Code distributed by Google as part of the polymer project is also + * subject to an additional IP rights grant found at + * http://polymer.github.io/PATENTS.txt + */ +var r={},a={}},function(e,t,n){var r=n(30);e.exports=function(e){return Object(r(e))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"c",(function(){return a})),n.d(t,"b",(function(){return i})); +/** + * @license + * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. + * This code may only be used under the BSD style license found at + * http://polymer.github.io/LICENSE.txt + * The complete set of authors may be found at + * http://polymer.github.io/AUTHORS.txt + * The complete set of contributors may be found at + * http://polymer.github.io/CONTRIBUTORS.txt + * Code distributed by Google as part of the polymer project is also + * subject to an additional IP rights grant found at + * http://polymer.github.io/PATENTS.txt + */ +var r="undefined"!=typeof window&&null!=window.customElements&&void 0!==window.customElements.polyfillWrapFlushCallback,a=function(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;t!==n;){var a=t.nextSibling;e.insertBefore(t,r),t=a}},i=function(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;t!==n;){var r=t.nextSibling;e.removeChild(t),t=r}}},function(e,t,n){var r=n(2),a=n(19),i=n(18),o=n(40)("src"),s=n(182),l=(""+s).split("toString");n(9).inspectSource=function(e){return s.call(e)},(e.exports=function(e,t,n,s){var c="function"==typeof n;c&&(i(n,"name")||a(n,"name",t)),e[t]!==n&&(c&&(i(n,o)||a(n,o,e[t]?""+e[t]:l.join(String(t)))),e===r?e[t]=n:s?e[t]?e[t]=n:a(e,t,n):(delete e[t],a(e,t,n)))})(Function.prototype,"toString",(function(){return"function"==typeof this&&this[o]||s.call(this)}))},function(e,t,n){var r=n(1),a=n(3),i=n(30),o=/"/g,s=function(e,t,n,r){var a=String(i(e)),s="<"+t;return""!==n&&(s+=" "+n+'="'+String(r).replace(o,""")+'"'),s+">"+a+""};e.exports=function(e,t){var n={};n[e]=t(s),r(r.P+r.F*a((function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3})),"String",n)}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var r=n(11),a=n(39);e.exports=n(10)?function(e,t,n){return r.f(e,t,a(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var r=n(58),a=n(30);e.exports=function(e){return r(a(e))}},function(e,t,n){"use strict";var r=n(3);e.exports=function(e,t){return!!e&&r((function(){t?e.call(null,(function(){}),1):e.call(null)}))}},function(e,t,n){var r=n(23);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,a){return e.call(t,n,r,a)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t,n){var r=n(59),a=n(39),i=n(20),o=n(36),s=n(18),l=n(117),c=Object.getOwnPropertyDescriptor;t.f=n(10)?c:function(e,t){if(e=i(e),t=o(t,!0),l)try{return c(e,t)}catch(e){}if(s(e,t))return a(!r.f.call(e,t),e[t])}},function(e,t,n){var r=n(1),a=n(9),i=n(3);e.exports=function(e,t){var n=(a.Object||{})[e]||Object[e],o={};o[e]=t(n),r(r.S+r.F*i((function(){n(1)})),"Object",o)}},function(e,t,n){var r=n(22),a=n(58),i=n(14),o=n(8),s=n(133);e.exports=function(e,t){var n=1==e,l=2==e,c=3==e,u=4==e,d=6==e,_=5==e||d,p=t||s;return function(t,s,m){for(var f,g,E=i(t),S=a(E),h=r(s,m,3),b=o(S.length),v=0,T=n?p(t,b):l?p(t,0):void 0;b>v;v++)if((_||v in S)&&(g=h(f=S[v],v,E),e))if(n)T[v]=g;else if(g)switch(e){case 3:return!0;case 5:return f;case 6:return v;case 2:T.push(f)}else if(u)return!1;return d?-1:c||u?u:T}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return s.b})),n.d(t,"a",(function(){return l}));var r=n(12);function a(e,t){for(var n=0;n1?t-1:0),r=1;rn;)a[n]=t[n++];return a},De=function(e,t,n){q(e,t,{get:function(){return this._d[n]}})},we=function(e){var t,n,r,a,i,o,s=y(e),l=arguments.length,c=l>1?arguments[1]:void 0,d=void 0!==c,_=I(s);if(null!=_&&!C(_)){for(o=_.call(s),r=[],t=0;!(i=o.next()).done;t++)r.push(i.value);s=r}for(d&&l>2&&(c=u(c,arguments[2],2)),t=0,n=g(s.length),a=Re(this,n);n>t;t++)a[t]=d?c(s[t],t):s[t];return a},xe=function(){for(var e=0,t=arguments.length,n=Re(this,t);t>e;)n[e]=arguments[e++];return n},Me=!!j&&o((function(){me.call(new j(1))})),Le=function(){return me.apply(Me?_e.call(Oe(this)):Oe(this),arguments)},Pe={copyWithin:function(e,t){return B.call(Oe(this),e,t,arguments.length>2?arguments[2]:void 0)},every:function(e){return J(Oe(this),e,arguments.length>1?arguments[1]:void 0)},fill:function(e){return F.apply(Oe(this),arguments)},filter:function(e){return Ie(this,X(Oe(this),e,arguments.length>1?arguments[1]:void 0))},find:function(e){return ee(Oe(this),e,arguments.length>1?arguments[1]:void 0)},findIndex:function(e){return te(Oe(this),e,arguments.length>1?arguments[1]:void 0)},forEach:function(e){K(Oe(this),e,arguments.length>1?arguments[1]:void 0)},indexOf:function(e){return re(Oe(this),e,arguments.length>1?arguments[1]:void 0)},includes:function(e){return ne(Oe(this),e,arguments.length>1?arguments[1]:void 0)},join:function(e){return ue.apply(Oe(this),arguments)},lastIndexOf:function(e){return se.apply(Oe(this),arguments)},map:function(e){return Te(Oe(this),e,arguments.length>1?arguments[1]:void 0)},reduce:function(e){return le.apply(Oe(this),arguments)},reduceRight:function(e){return ce.apply(Oe(this),arguments)},reverse:function(){for(var e,t=Oe(this).length,n=Math.floor(t/2),r=0;r1?arguments[1]:void 0)},sort:function(e){return de.call(Oe(this),e)},subarray:function(e,t){var n=Oe(this),r=n.length,a=S(e,r);return new(M(n,n[Se]))(n.buffer,n.byteOffset+a*n.BYTES_PER_ELEMENT,g((void 0===t?r:S(t,r))-a))}},ke=function(e,t){return Ie(this,_e.call(Oe(this),e,t))},Ue=function(e){Oe(this);var t=Ne(arguments[1],1),n=this.length,r=y(e),a=g(r.length),i=0;if(a+t>n)throw V("Wrong length!");for(;i255?255:255&a),i.v[_](n*t+i.o,a,ye)}(this,n,e)},enumerable:!0})};h?(m=n((function(e,n,r,a){d(e,m,c,"_d");var i,o,s,l,u=0,_=0;if(T(n)){if(!(n instanceof $||"ArrayBuffer"==(l=v(n))||"SharedArrayBuffer"==l))return be in n?Ae(m,n):we.call(m,n);i=n,_=Ne(r,t);var f=n.byteLength;if(void 0===a){if(f%t)throw V("Wrong length!");if((o=f-_)<0)throw V("Wrong length!")}else if((o=g(a)*t)+_>f)throw V("Wrong length!");s=o/t}else s=E(n),i=new $(o=s*t);for(p(e,"_d",{b:i,o:_,l:o,e:s,v:new Q(i)});u=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n-1||n)&&-1===i.indexOf("--\x3e",o+1);var s=a.e.exec(i);t+=null===s?i+(n?f:a.g):i.substr(0,s.index)+s[1]+s[2]+a.b+s[3]+a.f}return t+=this.strings[e]}},{key:"getTemplateElement",value:function(){var e=document.createElement("template"),t=this.getHTML();return void 0!==m&&(t=m.createHTML(t)),e.innerHTML=t,e}}]),e}(),E=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(n,e);var t=l(n);function n(){return d(this,n),t.apply(this,arguments)}return p(n,[{key:"getHTML",value:function(){return"".concat(o(u(n.prototype),"getHTML",this).call(this),"")}},{key:"getTemplateElement",value:function(){var e=o(u(n.prototype),"getTemplateElement",this).call(this),t=e.content,a=t.firstChild;return t.removeChild(a),Object(r.c)(t,a.firstChild),e}}]),n}(g)},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t){e.exports=!1},function(e,t,n){var r=n(119),a=n(81);e.exports=Object.keys||function(e){return r(e,a)}},function(e,t,n){var r=n(24),a=Math.max,i=Math.min;e.exports=function(e,t){return(e=r(e))<0?a(e+t,0):i(e,t)}},function(e,t,n){var r=n(4),a=n(120),i=n(81),o=n(80)("IE_PROTO"),s=function(){},l=function(){var e,t=n(78)("iframe"),r=i.length;for(t.style.display="none",n(82).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("