codecharta-visualization 2.8.0 → 2.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,87 +1,87 @@
1
- import{a as wg,b as hl}from"./chunk-5TQNGGPT.js";import{a as fg,b as gg,c as Sg,d as Cg,f as Mg,g as _g,h as zg,i as $g,j as jg,k as Hg,l as Ug,m as Gg,n as Ud,o as Gd,p as Xd,q as o1}from"./chunk-5CE7PKV4.js";import{$ as Xm,$a as tp,$b as ci,$c as Qt,$d as ys,$e as Ps,$f as Pi,$g as f0,A as O,Aa as Ya,Ab as fp,Ac as Wp,Ad as Bn,Ae as Go,Af as Xn,Ag as e0,Ah as To,Ai as ng,Ba as Si,Bb as gp,Bc as ls,Bd as bo,Be as Jt,Bf as Dt,Bg as t0,Bh as $d,Bi as rg,Bj as Vg,C as M,Ca as Ci,Cb as bp,Cc as Op,Cd as vo,Ce as at,Cf as Kn,Ch as q0,Ci as jd,Cj as Bg,D as E,Db as F,Dc as cs,Dd as xo,De as Eo,Df as Nf,Dh as T0,Di as ti,Dl as t1,E as oe,Ea as tt,Eb as me,Ec as Fe,Ed as wo,Ee as bf,Ef as Qn,Eg as Zs,Eh as R0,Ei as pr,F as ne,Fa as it,Fb as Ge,Fc as zp,Fd as yo,Fe as Ts,Ff as Vf,Fg as i0,Fh as al,Fi as ag,Fj as Wg,G as ai,Ga as Za,Gb as vp,Gc as di,Gd as Wn,Ge as Hn,Gf as zs,Gg as o0,Gh as sl,Gi as ll,Gj as Og,Gl as i1,H as Fd,Ha as ze,Hb as De,Hc as $p,Hd as tf,He as Rs,Hf as Bf,Hg as Js,Hh as hr,Hi as sg,I as Ga,Ia as Be,Ib as mt,Ic as jp,Ie as As,If as $s,Ig as n0,Ih as A0,Ii as lg,Ij as ul,Il as n1,J as zm,Ja as zt,Jb as ct,Jc as ds,Jd as of,Je as vf,Jg as rr,Jh as I0,Ji as Vt,Jj as ml,K as ke,Ka as x,Kb as xp,Kc as ki,Ke as xf,Kf as Wf,Kg as r0,Kh as kt,Ki as Hr,Kl as r1,L as oo,La as Re,Lb as wp,Lc as qi,Ld as nf,Le as wf,Lg as a0,Lh as F0,Li as cg,M as Xa,Ma as we,Mb as yp,Mc as $r,Md as rf,Me as Is,Mf as Bd,Mg as zd,Mi as cl,Mj as Xg,N as $m,Na as qn,Nb as Sp,Nc as hs,Nd as Li,Ne as Fs,Nf as Of,Ng as s0,Nh as L0,Ni as Ur,Nj as Kg,O as Gt,Oa as Zm,Ob as zr,Oc as us,Od as af,Oe as yf,Of as Yn,Oh as D0,Oi as dg,Oj as Qg,P as jm,Pa as Ja,Pb as ro,Pc as ms,Pd as sf,Pe as Un,Pf as js,Ph as ur,Pi as hg,Qa as es,Qb as ji,Qc as Hp,Qd as lf,Qe as Ls,Qg as mi,Qh as mr,Qi as ug,R as Hm,Ra as ts,Rb as li,Rc as Fn,Rd as bs,Re as Pd,Rf as Hs,Rg as l0,Rh as ei,Ri as Gr,S as jo,Sb as ao,Sc as Up,Se as Nd,Sf as Zn,Sg as c0,Sh as P0,Si as dl,Sj as Yg,T as h,Ta as Tn,Tb as Cp,Tc as Gp,Te as Vd,Tf as Us,Tg as d0,Th as N0,Ti as mg,Tj as Zg,Tl as a1,Ua as Xt,Ub as Mp,Uc as Xp,Ud as vs,Ue as Sf,Uf as Wd,Ug as el,Ui as pg,Uj as Jg,Ul as s1,V as En,Va as Jm,Vb as gt,Vc as Kp,Vd as _t,Ve as Ds,Vf as zf,Vg as h0,Vi as Hd,Vj as e1,Vl as Kd,W as kn,Wa as Kt,Wb as An,Wc as ps,Wd as cf,We as Cf,Wf as Od,Wg as u0,Wi as bg,Wl as Xr,X as le,Xa as Mi,Xc as Qp,Xd as xs,Xe as Mf,Xf as $f,Xg as m0,Xi as vg,Xl as l1,Y as A,Yb as Dd,Yc as hi,Yd as So,Ye as _f,Yf as jf,Yg as p0,Z as Um,Za as ep,Zb as Hi,Zc as lo,Zd as ws,Ze as Ef,_ as Gm,_b as Ho,_c as co,_e as Di,_f as Jn,a as ae,aa as no,ab as te,ac as _p,ad as fs,ae as On,af as Ns,ag as Ni,ah as Et,b as Te,bb as ip,bc as $t,bd as Yp,be as zn,bg as Gs,bh as g0,bj as xg,c as to,ca as Km,cb as op,cc as as,cd as Zp,ce as Ss,cg as Hf,ch as ar,cj as yg,d as et,da as Qm,db as fe,dc as Ep,dd as Jp,de as Cs,df as kf,dg as Uf,dh as b0,e as Im,ea as Ym,eb as J,ed as Ee,ee as ui,ef as qf,eg as er,eh as Bi,ei as V0,f as Fm,fa as rt,fb as np,fd as Ti,fe as df,fg as Xs,fi as B0,g as Lm,ga as K,gb as Ue,gd as Ri,ge as $n,gg as Vi,gh as v0,gi as W0,h as Se,ha as Q,hd as Ai,he as Co,hg as Gf,hh as x0,hi as O0,i as ut,ia as si,ib as Rn,id as Mt,ie as Mo,ig as Xf,ih as tl,ii as z0,ij as Eg,j as Dm,ja as Ne,jb as Ld,jc as kp,jd as Ii,je as Ms,jg as tr,jh as il,ji as $0,jj as kg,k as io,ka as Ve,kb as rp,kc as qp,kd as Yt,ke as hf,kg as Pt,kh as w0,ki as j0,l as Ae,la as R,lb as ap,lc as Tp,ld as ho,le as _s,lg as ir,lh as y0,li as H0,m as Pm,ma as f,mb as sp,mc as Rp,md as Zt,mf as Tf,mg as or,mh as S0,mi as U0,mj as qg,n as Lt,na as p,nb as lp,nc as Ap,nd as uo,ne as uf,nf as Rf,ng as Ks,nh as C0,ni as G0,nj as Tg,o as wt,oa as W,oc as Ip,od as mo,oe as Es,of as Vs,og as Kf,oh as M0,oi as X0,oj as Rg,p as Nm,pa as _,pb as is,pc as Fp,pd as Fi,pe as mf,pf as Af,pg as Qf,pi as K0,q as Vm,qa as T,qb as cp,qc as Lp,qd as gs,qe as ks,qf as Bs,qg as Qs,qh as _0,qi as Q0,r as _n,ra as Ce,rb as dp,rc as Dp,rd as Ln,re as qs,rf as If,rg as Yf,rh as E0,ri as Y0,s as Ua,sb as hp,sc as Pp,sd as Dn,se as pf,sf as Ff,sg as jr,sh as k0,si as Z0,sj as Ag,t as wi,ta as ue,tb as up,tc as ss,td as ef,te as ff,tf as Lf,tg as Ys,th as ol,ti as J0,tj as Ig,u as Bm,ua as xe,ub as os,uc as In,ud as Pn,ue as Ke,uf as Ws,ug as nr,uh as nl,ui as eg,v as Ut,va as V,vb as mp,vc as Ei,vd as Nn,ve as Ze,vf as Df,vg as qo,vh as sr,vi as tg,vj as Fg,w as Wm,wa as re,wb as pp,wc as Np,wd as po,we as Uo,wf as Os,wg as Zf,wh as lr,wi as ig,wj as Lg,x as Le,xa as L,xb as _i,xc as Vp,xd as fo,xe as jn,xf as Pf,xg as Nt,xh as rl,xi as Wi,xj as Dg,y as Om,ya as Ka,yb as ns,yc as Bp,yd as go,ye as gf,yf as Gn,yg as bt,yh as cr,yi as og,yj as Pg,z as yi,za as Qa,zb as rs,zc as so,zd as Vn,ze as _o,zf as ko,zg as Jf,zh as dr,zi as Ui,zj as Ng}from"./chunk-Z4T4NBH3.js";var v2=et((Sh,b2)=>{"use strict";var{hasOwnProperty:ta}=Object.prototype,tn=yh();tn.configure=yh;tn.stringify=tn;tn.default=tn;Sh.stringify=tn;Sh.configure=yh;b2.exports=tn;var Ny=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;function Ao(t){return t.length<5e3&&!Ny.test(t)?`"${t}"`:JSON.stringify(t)}function xh(t,o){if(t.length>200||o)return t.sort(o);for(let e=1;e<t.length;e++){let i=t[e],n=e;for(;n!==0&&t[n-1]>i;)t[n]=t[n-1],n--;t[n]=i}return t}var Vy=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function wh(t){return Vy.call(t)!==void 0&&t.length!==0}function f2(t,o,e){t.length<e&&(e=t.length);let i=o===","?"":" ",n=`"0":${i}${t[0]}`;for(let r=1;r<e;r++)n+=`${o}"${r}":${i}${t[r]}`;return n}function By(t){if(ta.call(t,"circularValue")){let o=t.circularValue;if(typeof o=="string")return`"${o}"`;if(o==null)return o;if(o===Error||o===TypeError)return{toString(){throw new TypeError("Converting circular structure to JSON")}};throw new TypeError('The "circularValue" argument must be of type string or the value null or undefined')}return'"[Circular]"'}function Wy(t){let o;if(ta.call(t,"deterministic")&&(o=t.deterministic,typeof o!="boolean"&&typeof o!="function"))throw new TypeError('The "deterministic" argument must be of type boolean or comparator function');return o===void 0?!0:o}function Oy(t,o){let e;if(ta.call(t,o)&&(e=t[o],typeof e!="boolean"))throw new TypeError(`The "${o}" argument must be of type boolean`);return e===void 0?!0:e}function g2(t,o){let e;if(ta.call(t,o)){if(e=t[o],typeof e!="number")throw new TypeError(`The "${o}" argument must be of type number`);if(!Number.isInteger(e))throw new TypeError(`The "${o}" argument must be an integer`);if(e<1)throw new RangeError(`The "${o}" argument must be >= 1`)}return e===void 0?1/0:e}function en(t){return t===1?"1 item":`${t} items`}function zy(t){let o=new Set;for(let e of t)(typeof e=="string"||typeof e=="number")&&o.add(String(e));return o}function $y(t){if(ta.call(t,"strict")){let o=t.strict;if(typeof o!="boolean")throw new TypeError('The "strict" argument must be of type boolean');if(o)return e=>{let i=`Object can not safely be stringified. Received type ${typeof e}`;throw typeof e!="function"&&(i+=` (${e.toString()})`),new Error(i)}}}function yh(t){t=ae({},t);let o=$y(t);o&&(t.bigint===void 0&&(t.bigint=!1),"circularValue"in t||(t.circularValue=Error));let e=By(t),i=Oy(t,"bigint"),n=Wy(t),r=typeof n=="function"?n:void 0,a=g2(t,"maximumDepth"),s=g2(t,"maximumBreadth");function l(g,b,y,q,D,j){let k=b[g];switch(typeof k=="object"&&k!==null&&typeof k.toJSON=="function"&&(k=k.toJSON(g)),k=q.call(b,g,k),typeof k){case"string":return Ao(k);case"object":{if(k===null)return"null";if(y.indexOf(k)!==-1)return e;let N="",z=",",H=j;if(Array.isArray(k)){if(k.length===0)return"[]";if(a<y.length+1)return'"[Array]"';y.push(k),D!==""&&(j+=D,N+=`
1
+ import{a as xg,b as dl}from"./chunk-B44GAPHB.js";import{a as pg,b as fg,c as yg,d as Sg,f as Cg,g as Mg,h as Og,i as zg,j as $g,k as jg,l as Hg,m as Ug,n as Hd,o as Ud,p as Gd,q as i1}from"./chunk-T52C2UQI.js";import{$ as Gm,$a as Jm,$b as Hi,$c as lo,$d as xs,$e as _f,$f as Zn,$g as c0,$h as D0,$i as cl,$j as Qg,A as O,Aa as Ka,Ab as os,Ac as Vp,Ad as go,Ae as ff,Af,Ag as Qf,Ah as E0,Ai as Q0,Ba as Qa,Bb as ns,Bc as so,Bd as Vn,Be as _o,Bf as If,Bg as $r,Bh as tl,Bi as Y0,Bj as Rg,C as M,Ca as Si,Cb as pp,Cc as Bp,Cd as Bn,Ce as Go,Cf as Ff,Cg as Qs,Ch as il,Ci as Z0,Cj as Ag,D as E,Da as Ci,Db as fp,Dc as ss,Dd as bo,De as Jt,Df as Bs,Dg as nr,Dh as sr,Di as J0,E as oe,Eb as gp,Ec as Wp,Ed as vo,Ee as at,Ef as Lf,Eg as qo,Eh as lr,Ei as eg,Ej as Ig,F as ne,Fa as tt,Fb as F,Fc as ls,Fd as xo,Fe as Eo,Ff as Ws,Fg as Yf,Fh as ol,Fi as tg,Fj as Fg,G as ai,Ga as it,Gb as me,Gc as Fe,Gd as wo,Ge as gf,Gf as Df,Gg as Nt,Gh as cr,Gi as Wi,Gj as Lg,H as Id,Ha as Ya,Hb as Xe,Hc as Op,Hd as yo,He as qs,Hf as Gn,Hg as bt,Hh as dr,Hi as ig,Hj as Dg,I as Ua,Ia as ze,Ib as bp,Ic as di,Id as Wn,Ie as Hn,If as ko,Ig as Zf,Ih as To,Ii as Ui,Ij as Pg,J as Om,Ja as Be,Jb as De,Jc as zp,Jd as ef,Je as Ts,Jf as Xn,Jg as Jf,Ji as og,K as ke,Ka as zt,Kb as mt,Kc as $p,Ke as Rs,Kf as Dt,Kg as e0,Kh as zd,Ki as ng,Kj as Ng,L as oo,La as x,Lb as ct,Lc as cs,Ld as tf,Le as bf,Lf as Kn,Lh as k0,Li as $d,Lj as Vg,M as Ga,Ma as Re,Mb as vp,Mc as ki,Me as vf,Mf as Pf,Mh as q0,Mi as ti,Ml as e1,N as zm,Na as we,Nb as xp,Nc as qi,Nd as of,Ne as xf,Nf as Qn,Ng as t0,Nh as T0,Ni as al,O as Gt,Oa as qn,Ob as wp,Oc as zr,Od as nf,Oe as As,Of as Nf,Og as i0,Oh as nl,Oi as rg,Oj as Bg,P as $m,Pa as Ym,Pb as yp,Pc as ds,Pd as Li,Pe as Is,Pf as Os,Pg as Ys,Ph as rl,Pi as sl,Pj as Wg,Pl as t1,Qa as Za,Qb as Or,Qc as hs,Qd as rf,Qe as wf,Qf as Vf,Qg as o0,Qh as hr,Qi as ag,R as jm,Ra as Ja,Rb as ro,Rc as us,Rd as af,Re as Un,Rf as zs,Rg as rr,Rh as R0,Ri as sg,Rj as hl,Rl as o1,S as jo,Sa as es,Sb as ji,Sc as jp,Sd as sf,Se as Fs,Sg as n0,Sh as A0,Si as Vt,Sj as ul,T as h,Tb as li,Tc as Fn,Td as gs,Te as Dd,Tf as Bf,Tg as r0,Th as kt,Ti as jr,Tl as n1,Ua as Tn,Ub as ao,Uc as Hp,Ue as Pd,Ug as Od,Uh as I0,Ui as lg,V as En,Va as Xt,Vb as Sp,Vc as Up,Ve as Nd,Vf as Vd,Vg as a0,Vi as ll,Vj as Gg,W as kn,Wa as Zm,Wb as Cp,Wc as Gp,Wd as bs,We as yf,Wf,Wh as F0,Wi as Hr,Wj as Xg,X as le,Xb as gt,Xc as Xp,Xd as _t,Xe as Ls,Xf as Yn,Xh as L0,Xi as cg,Xj as Kg,Y as A,Ya as Kt,Yb as An,Yc as ms,Yd as lf,Ye as Sf,Yf as $s,Yg as mi,Yh as ur,Yi as dg,Z as Hm,Za as Mi,Zc as Kp,Zd as vs,Ze as Cf,Zg as s0,Zh as mr,Zi as hg,_ as Um,_b as Ld,_c as hi,_d as So,_e as Mf,_f as js,_g as l0,_h as ei,_i as Ur,a as ae,aa as no,ac as Ho,ad as co,af as Di,ag as Hs,ah as Zs,ai as P0,aj as ug,ak as Yg,am as r1,b as Te,bb as ep,bc as ci,bd as Qt,be as ws,bf as Ds,bg as Bd,bh as d0,bj as mg,bk as Zg,bm as a1,c as to,ca as Xm,cb as te,cc as Mp,cd as ps,ce as On,cf as Ps,cg as Of,ch as h0,cj as jd,ck as Jg,cm as Xd,d as et,da as Km,db as tp,dc as $t,dd as Qp,de as zn,dg as Wd,dh as u0,dj as gg,dm as Gr,e as Am,ea as Qm,eb as ip,ec as rs,ed as Yp,ee as ys,eg as zf,eh as m0,ej as bg,em as s1,f as Im,fa as rt,fb as fe,fc as _p,fd as Zp,fe as Ss,ff as Ef,fg as $f,g as Fm,ga as K,gb as J,gd as Ee,ge as ui,gf as kf,h as _e,ha as Q,hb as op,hd as Ti,he as cf,hg as Jn,hh as p0,i as ut,ib as Ue,id as Ri,ie as $n,ig as Pi,ih as Et,j as Lm,ja as si,jd as Ai,je as Co,jg as Ni,jh as f0,k as io,ka as Ne,kb as Rn,kd as Mt,ke as Mo,kg as Us,kh as ar,kj as vg,l as Ie,la as Ve,lb as Fd,lc as Ep,ld as Ii,le as Cs,lg as jf,lh as g0,lj as wg,m as Dm,ma as R,mb as np,mc as kp,md as Yt,me as df,mg as Hf,mh as Bi,n as Lt,na as f,nb as rp,nc as qp,nd as ho,ne as Ms,ng as er,ni as N0,o as wt,oa as p,ob as ap,oc as Tp,od as Zt,og as Gs,oh as b0,oi as V0,p as Pm,pa as W,pb as sp,pc as Rp,pd as uo,pe as hf,pg as Vi,ph as v0,pi as B0,q as Nm,qa as _,qc as Ap,qd as mo,qe as _s,qg as Uf,qh as Js,qi as W0,r as _n,ra as T,rb as ts,rc as Ip,rd as Fi,re as uf,rg as Gf,rh as el,ri as O0,rj as _g,s as Ha,sa as Se,sb as lp,sc as Fp,sd as fs,se as Es,sg as tr,sh as x0,si as z0,sj as Eg,t as wi,tb as cp,tc as Lp,td as Ln,te as ks,tg as Pt,th as w0,ti as $0,u as Vm,ua as ue,ub as dp,uc as Dp,ud as Dn,ue as mf,ug as ir,uh as y0,ui as j0,v as Ut,va as xe,vb as hp,vc as as,vd as Jp,ve as pf,vf as qf,vg as or,vh as S0,vi as H0,vj as kg,w as Bm,wa as V,wb as is,wc as In,wd as Pn,we as Ke,wf as Tf,wg as Xs,wh as C0,wi as U0,wj as qg,x as Le,xa as re,xb as up,xc as Ei,xd as Nn,xe as Ze,xf as Ns,xg as Xf,xi as G0,xj as Tg,y as Wm,ya as L,yb as mp,yc as Pp,yd as po,ye as Uo,yf as Rf,yg as Kf,yh as M0,yi as X0,z as yi,za as Xa,zb as _i,zc as Np,zd as fo,ze as jn,zf as Vs,zg as Ks,zh as _0,zi as K0}from"./chunk-6XSAPXQT.js";var b2=et((yh,g2)=>{"use strict";var{hasOwnProperty:ea}=Object.prototype,tn=wh();tn.configure=wh;tn.stringify=tn;tn.default=tn;yh.stringify=tn;yh.configure=wh;g2.exports=tn;var Dy=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;function Ao(e){return e.length<5e3&&!Dy.test(e)?`"${e}"`:JSON.stringify(e)}function vh(e,o){if(e.length>200||o)return e.sort(o);for(let t=1;t<e.length;t++){let i=e[t],n=t;for(;n!==0&&e[n-1]>i;)e[n]=e[n-1],n--;e[n]=i}return e}var Py=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function xh(e){return Py.call(e)!==void 0&&e.length!==0}function p2(e,o,t){e.length<t&&(t=e.length);let i=o===","?"":" ",n=`"0":${i}${e[0]}`;for(let r=1;r<t;r++)n+=`${o}"${r}":${i}${e[r]}`;return n}function Ny(e){if(ea.call(e,"circularValue")){let o=e.circularValue;if(typeof o=="string")return`"${o}"`;if(o==null)return o;if(o===Error||o===TypeError)return{toString(){throw new TypeError("Converting circular structure to JSON")}};throw new TypeError('The "circularValue" argument must be of type string or the value null or undefined')}return'"[Circular]"'}function Vy(e){let o;if(ea.call(e,"deterministic")&&(o=e.deterministic,typeof o!="boolean"&&typeof o!="function"))throw new TypeError('The "deterministic" argument must be of type boolean or comparator function');return o===void 0?!0:o}function By(e,o){let t;if(ea.call(e,o)&&(t=e[o],typeof t!="boolean"))throw new TypeError(`The "${o}" argument must be of type boolean`);return t===void 0?!0:t}function f2(e,o){let t;if(ea.call(e,o)){if(t=e[o],typeof t!="number")throw new TypeError(`The "${o}" argument must be of type number`);if(!Number.isInteger(t))throw new TypeError(`The "${o}" argument must be an integer`);if(t<1)throw new RangeError(`The "${o}" argument must be >= 1`)}return t===void 0?1/0:t}function en(e){return e===1?"1 item":`${e} items`}function Wy(e){let o=new Set;for(let t of e)(typeof t=="string"||typeof t=="number")&&o.add(String(t));return o}function Oy(e){if(ea.call(e,"strict")){let o=e.strict;if(typeof o!="boolean")throw new TypeError('The "strict" argument must be of type boolean');if(o)return t=>{let i=`Object can not safely be stringified. Received type ${typeof t}`;throw typeof t!="function"&&(i+=` (${t.toString()})`),new Error(i)}}}function wh(e){e=ae({},e);let o=Oy(e);o&&(e.bigint===void 0&&(e.bigint=!1),"circularValue"in e||(e.circularValue=Error));let t=Ny(e),i=By(e,"bigint"),n=Vy(e),r=typeof n=="function"?n:void 0,a=f2(e,"maximumDepth"),s=f2(e,"maximumBreadth");function l(g,b,y,q,D,j){let k=b[g];switch(typeof k=="object"&&k!==null&&typeof k.toJSON=="function"&&(k=k.toJSON(g)),k=q.call(b,g,k),typeof k){case"string":return Ao(k);case"object":{if(k===null)return"null";if(y.indexOf(k)!==-1)return t;let N="",z=",",H=j;if(Array.isArray(k)){if(k.length===0)return"[]";if(a<y.length+1)return'"[Array]"';y.push(k),D!==""&&(j+=D,N+=`
2
2
  ${j}`,z=`,
3
3
  ${j}`);let $=Math.min(k.length,s),qe=0;for(;qe<$-1;qe++){let Pe=l(String(qe),k,y,q,D,j);N+=Pe!==void 0?Pe:"null",N+=z}let be=l(String(qe),k,y,q,D,j);if(N+=be!==void 0?be:"null",k.length-1>s){let Pe=k.length-s-1;N+=`${z}"... ${en(Pe)} not stringified"`}return D!==""&&(N+=`
4
4
  ${H}`),y.pop(),`[${N}]`}let G=Object.keys(k),Y=G.length;if(Y===0)return"{}";if(a<y.length+1)return'"[Object]"';let X="",he="";D!==""&&(j+=D,z=`,
5
- ${j}`,X=" ");let Ie=Math.min(Y,s);n&&!wh(k)&&(G=xh(G,r)),y.push(k);for(let $=0;$<Ie;$++){let qe=G[$],be=l(qe,k,y,q,D,j);be!==void 0&&(N+=`${he}${Ao(qe)}:${X}${be}`,he=z)}if(Y>s){let $=Y-s;N+=`${he}"...":${X}"${en($)} not stringified"`,he=z}return D!==""&&he.length>1&&(N=`
5
+ ${j}`,X=" ");let Ae=Math.min(Y,s);n&&!xh(k)&&(G=vh(G,r)),y.push(k);for(let $=0;$<Ae;$++){let qe=G[$],be=l(qe,k,y,q,D,j);be!==void 0&&(N+=`${he}${Ao(qe)}:${X}${be}`,he=z)}if(Y>s){let $=Y-s;N+=`${he}"...":${X}"${en($)} not stringified"`,he=z}return D!==""&&he.length>1&&(N=`
6
6
  ${j}${N}
7
- ${H}`),y.pop(),`{${N}}`}case"number":return isFinite(k)?String(k):o?o(k):"null";case"boolean":return k===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(k);default:return o?o(k):void 0}}function d(g,b,y,q,D,j){switch(typeof b=="object"&&b!==null&&typeof b.toJSON=="function"&&(b=b.toJSON(g)),typeof b){case"string":return Ao(b);case"object":{if(b===null)return"null";if(y.indexOf(b)!==-1)return e;let k=j,N="",z=",";if(Array.isArray(b)){if(b.length===0)return"[]";if(a<y.length+1)return'"[Array]"';y.push(b),D!==""&&(j+=D,N+=`
7
+ ${H}`),y.pop(),`{${N}}`}case"number":return isFinite(k)?String(k):o?o(k):"null";case"boolean":return k===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(k);default:return o?o(k):void 0}}function d(g,b,y,q,D,j){switch(typeof b=="object"&&b!==null&&typeof b.toJSON=="function"&&(b=b.toJSON(g)),typeof b){case"string":return Ao(b);case"object":{if(b===null)return"null";if(y.indexOf(b)!==-1)return t;let k=j,N="",z=",";if(Array.isArray(b)){if(b.length===0)return"[]";if(a<y.length+1)return'"[Array]"';y.push(b),D!==""&&(j+=D,N+=`
8
8
  ${j}`,z=`,
9
- ${j}`);let Y=Math.min(b.length,s),X=0;for(;X<Y-1;X++){let Ie=d(String(X),b[X],y,q,D,j);N+=Ie!==void 0?Ie:"null",N+=z}let he=d(String(X),b[X],y,q,D,j);if(N+=he!==void 0?he:"null",b.length-1>s){let Ie=b.length-s-1;N+=`${z}"... ${en(Ie)} not stringified"`}return D!==""&&(N+=`
9
+ ${j}`);let Y=Math.min(b.length,s),X=0;for(;X<Y-1;X++){let Ae=d(String(X),b[X],y,q,D,j);N+=Ae!==void 0?Ae:"null",N+=z}let he=d(String(X),b[X],y,q,D,j);if(N+=he!==void 0?he:"null",b.length-1>s){let Ae=b.length-s-1;N+=`${z}"... ${en(Ae)} not stringified"`}return D!==""&&(N+=`
10
10
  ${k}`),y.pop(),`[${N}]`}y.push(b);let H="";D!==""&&(j+=D,z=`,
11
11
  ${j}`,H=" ");let G="";for(let Y of q){let X=d(Y,b[Y],y,q,D,j);X!==void 0&&(N+=`${G}${Ao(Y)}:${H}${X}`,G=z)}return D!==""&&G.length>1&&(N=`
12
12
  ${j}${N}
13
- ${k}`),y.pop(),`{${N}}`}case"number":return isFinite(b)?String(b):o?o(b):"null";case"boolean":return b===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(b);default:return o?o(b):void 0}}function c(g,b,y,q,D){switch(typeof b){case"string":return Ao(b);case"object":{if(b===null)return"null";if(typeof b.toJSON=="function"){if(b=b.toJSON(g),typeof b!="object")return c(g,b,y,q,D);if(b===null)return"null"}if(y.indexOf(b)!==-1)return e;let j=D;if(Array.isArray(b)){if(b.length===0)return"[]";if(a<y.length+1)return'"[Array]"';y.push(b),D+=q;let X=`
13
+ ${k}`),y.pop(),`{${N}}`}case"number":return isFinite(b)?String(b):o?o(b):"null";case"boolean":return b===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(b);default:return o?o(b):void 0}}function c(g,b,y,q,D){switch(typeof b){case"string":return Ao(b);case"object":{if(b===null)return"null";if(typeof b.toJSON=="function"){if(b=b.toJSON(g),typeof b!="object")return c(g,b,y,q,D);if(b===null)return"null"}if(y.indexOf(b)!==-1)return t;let j=D;if(Array.isArray(b)){if(b.length===0)return"[]";if(a<y.length+1)return'"[Array]"';y.push(b),D+=q;let X=`
14
14
  ${D}`,he=`,
15
- ${D}`,Ie=Math.min(b.length,s),$=0;for(;$<Ie-1;$++){let be=c(String($),b[$],y,q,D);X+=be!==void 0?be:"null",X+=he}let qe=c(String($),b[$],y,q,D);if(X+=qe!==void 0?qe:"null",b.length-1>s){let be=b.length-s-1;X+=`${he}"... ${en(be)} not stringified"`}return X+=`
15
+ ${D}`,Ae=Math.min(b.length,s),$=0;for(;$<Ae-1;$++){let be=c(String($),b[$],y,q,D);X+=be!==void 0?be:"null",X+=he}let qe=c(String($),b[$],y,q,D);if(X+=qe!==void 0?qe:"null",b.length-1>s){let be=b.length-s-1;X+=`${he}"... ${en(be)} not stringified"`}return X+=`
16
16
  ${j}`,y.pop(),`[${X}]`}let k=Object.keys(b),N=k.length;if(N===0)return"{}";if(a<y.length+1)return'"[Object]"';D+=q;let z=`,
17
- ${D}`,H="",G="",Y=Math.min(N,s);wh(b)&&(H+=f2(b,z,s),k=k.slice(b.length),Y-=b.length,G=z),n&&(k=xh(k,r)),y.push(b);for(let X=0;X<Y;X++){let he=k[X],Ie=c(he,b[he],y,q,D);Ie!==void 0&&(H+=`${G}${Ao(he)}: ${Ie}`,G=z)}if(N>s){let X=N-s;H+=`${G}"...": "${en(X)} not stringified"`,G=z}return G!==""&&(H=`
17
+ ${D}`,H="",G="",Y=Math.min(N,s);xh(b)&&(H+=p2(b,z,s),k=k.slice(b.length),Y-=b.length,G=z),n&&(k=vh(k,r)),y.push(b);for(let X=0;X<Y;X++){let he=k[X],Ae=c(he,b[he],y,q,D);Ae!==void 0&&(H+=`${G}${Ao(he)}: ${Ae}`,G=z)}if(N>s){let X=N-s;H+=`${G}"...": "${en(X)} not stringified"`,G=z}return G!==""&&(H=`
18
18
  ${D}${H}
19
- ${j}`),y.pop(),`{${H}}`}case"number":return isFinite(b)?String(b):o?o(b):"null";case"boolean":return b===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(b);default:return o?o(b):void 0}}function u(g,b,y){switch(typeof b){case"string":return Ao(b);case"object":{if(b===null)return"null";if(typeof b.toJSON=="function"){if(b=b.toJSON(g),typeof b!="object")return u(g,b,y);if(b===null)return"null"}if(y.indexOf(b)!==-1)return e;let q="",D=b.length!==void 0;if(D&&Array.isArray(b)){if(b.length===0)return"[]";if(a<y.length+1)return'"[Array]"';y.push(b);let H=Math.min(b.length,s),G=0;for(;G<H-1;G++){let X=u(String(G),b[G],y);q+=X!==void 0?X:"null",q+=","}let Y=u(String(G),b[G],y);if(q+=Y!==void 0?Y:"null",b.length-1>s){let X=b.length-s-1;q+=`,"... ${en(X)} not stringified"`}return y.pop(),`[${q}]`}let j=Object.keys(b),k=j.length;if(k===0)return"{}";if(a<y.length+1)return'"[Object]"';let N="",z=Math.min(k,s);D&&wh(b)&&(q+=f2(b,",",s),j=j.slice(b.length),z-=b.length,N=","),n&&(j=xh(j,r)),y.push(b);for(let H=0;H<z;H++){let G=j[H],Y=u(G,b[G],y);Y!==void 0&&(q+=`${N}${Ao(G)}:${Y}`,N=",")}if(k>s){let H=k-s;q+=`${N}"...":"${en(H)} not stringified"`}return y.pop(),`{${q}}`}case"number":return isFinite(b)?String(b):o?o(b):"null";case"boolean":return b===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(b);default:return o?o(b):void 0}}function m(g,b,y){if(arguments.length>1){let q="";if(typeof y=="number"?q=" ".repeat(Math.min(y,10)):typeof y=="string"&&(q=y.slice(0,10)),b!=null){if(typeof b=="function")return l("",{"":g},[],b,q,"");if(Array.isArray(b))return d("",g,[],zy(b),q,"")}if(q.length!==0)return c("",g,[],q,"")}return u("",g,[])}return m}});var _w=et((Eie,Mw)=>{"use strict";Mw.exports=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}});var Vo=et(xn=>{"use strict";var Xu,F9=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];xn.getSymbolSize=function(o){if(!o)throw new Error('"version" cannot be null or undefined');if(o<1||o>40)throw new Error('"version" should be in range from 1 to 40');return o*4+17};xn.getSymbolTotalCodewords=function(o){return F9[o]};xn.getBCHDigit=function(t){let o=0;for(;t!==0;)o++,t>>>=1;return o};xn.setToSJISFunction=function(o){if(typeof o!="function")throw new Error('"toSJISFunc" is not a valid function.');Xu=o};xn.isKanjiModeEnabled=function(){return typeof Xu<"u"};xn.toSJIS=function(o){return Xu(o)}});var sd=et(ri=>{"use strict";ri.L={bit:1};ri.M={bit:0};ri.Q={bit:3};ri.H={bit:2};function L9(t){if(typeof t!="string")throw new Error("Param is not a string");switch(t.toLowerCase()){case"l":case"low":return ri.L;case"m":case"medium":return ri.M;case"q":case"quartile":return ri.Q;case"h":case"high":return ri.H;default:throw new Error("Unknown EC Level: "+t)}}ri.isValid=function(o){return o&&typeof o.bit<"u"&&o.bit>=0&&o.bit<4};ri.from=function(o,e){if(ri.isValid(o))return o;try{return L9(o)}catch{return e}}});var qw=et((Tie,kw)=>{"use strict";function Ew(){this.buffer=[],this.length=0}Ew.prototype={get:function(t){let o=Math.floor(t/8);return(this.buffer[o]>>>7-t%8&1)===1},put:function(t,o){for(let e=0;e<o;e++)this.putBit((t>>>o-e-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){let o=Math.floor(this.length/8);this.buffer.length<=o&&this.buffer.push(0),t&&(this.buffer[o]|=128>>>this.length%8),this.length++}};kw.exports=Ew});var Rw=et((Rie,Tw)=>{"use strict";function Aa(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}Aa.prototype.set=function(t,o,e,i){let n=t*this.size+o;this.data[n]=e,i&&(this.reservedBit[n]=!0)};Aa.prototype.get=function(t,o){return this.data[t*this.size+o]};Aa.prototype.xor=function(t,o,e){this.data[t*this.size+o]^=e};Aa.prototype.isReserved=function(t,o){return this.reservedBit[t*this.size+o]};Tw.exports=Aa});var Aw=et(ld=>{"use strict";var D9=Vo().getSymbolSize;ld.getRowColCoords=function(o){if(o===1)return[];let e=Math.floor(o/7)+2,i=D9(o),n=i===145?26:Math.ceil((i-13)/(2*e-2))*2,r=[i-7];for(let a=1;a<e-1;a++)r[a]=r[a-1]-n;return r.push(6),r.reverse()};ld.getPositions=function(o){let e=[],i=ld.getRowColCoords(o),n=i.length;for(let r=0;r<n;r++)for(let a=0;a<n;a++)r===0&&a===0||r===0&&a===n-1||r===n-1&&a===0||e.push([i[r],i[a]]);return e}});var Lw=et(Fw=>{"use strict";var P9=Vo().getSymbolSize,Iw=7;Fw.getPositions=function(o){let e=P9(o);return[[0,0],[e-Iw,0],[0,e-Iw]]}});var Dw=et(nt=>{"use strict";nt.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var wn={N1:3,N2:3,N3:40,N4:10};nt.isValid=function(o){return o!=null&&o!==""&&!isNaN(o)&&o>=0&&o<=7};nt.from=function(o){return nt.isValid(o)?parseInt(o,10):void 0};nt.getPenaltyN1=function(o){let e=o.size,i=0,n=0,r=0,a=null,s=null;for(let l=0;l<e;l++){n=r=0,a=s=null;for(let d=0;d<e;d++){let c=o.get(l,d);c===a?n++:(n>=5&&(i+=wn.N1+(n-5)),a=c,n=1),c=o.get(d,l),c===s?r++:(r>=5&&(i+=wn.N1+(r-5)),s=c,r=1)}n>=5&&(i+=wn.N1+(n-5)),r>=5&&(i+=wn.N1+(r-5))}return i};nt.getPenaltyN2=function(o){let e=o.size,i=0;for(let n=0;n<e-1;n++)for(let r=0;r<e-1;r++){let a=o.get(n,r)+o.get(n,r+1)+o.get(n+1,r)+o.get(n+1,r+1);(a===4||a===0)&&i++}return i*wn.N2};nt.getPenaltyN3=function(o){let e=o.size,i=0,n=0,r=0;for(let a=0;a<e;a++){n=r=0;for(let s=0;s<e;s++)n=n<<1&2047|o.get(a,s),s>=10&&(n===1488||n===93)&&i++,r=r<<1&2047|o.get(s,a),s>=10&&(r===1488||r===93)&&i++}return i*wn.N3};nt.getPenaltyN4=function(o){let e=0,i=o.data.length;for(let r=0;r<i;r++)e+=o.data[r];return Math.abs(Math.ceil(e*100/i/5)-10)*wn.N4};function N9(t,o,e){switch(t){case nt.Patterns.PATTERN000:return(o+e)%2===0;case nt.Patterns.PATTERN001:return o%2===0;case nt.Patterns.PATTERN010:return e%3===0;case nt.Patterns.PATTERN011:return(o+e)%3===0;case nt.Patterns.PATTERN100:return(Math.floor(o/2)+Math.floor(e/3))%2===0;case nt.Patterns.PATTERN101:return o*e%2+o*e%3===0;case nt.Patterns.PATTERN110:return(o*e%2+o*e%3)%2===0;case nt.Patterns.PATTERN111:return(o*e%3+(o+e)%2)%2===0;default:throw new Error("bad maskPattern:"+t)}}nt.applyMask=function(o,e){let i=e.size;for(let n=0;n<i;n++)for(let r=0;r<i;r++)e.isReserved(r,n)||e.xor(r,n,N9(o,r,n))};nt.getBestMask=function(o,e){let i=Object.keys(nt.Patterns).length,n=0,r=1/0;for(let a=0;a<i;a++){e(a),nt.applyMask(a,o);let s=nt.getPenaltyN1(o)+nt.getPenaltyN2(o)+nt.getPenaltyN3(o)+nt.getPenaltyN4(o);nt.applyMask(a,o),s<r&&(r=s,n=a)}return n}});var Qu=et(Ku=>{"use strict";var Bo=sd(),cd=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],dd=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];Ku.getBlocksCount=function(o,e){switch(e){case Bo.L:return cd[(o-1)*4+0];case Bo.M:return cd[(o-1)*4+1];case Bo.Q:return cd[(o-1)*4+2];case Bo.H:return cd[(o-1)*4+3];default:return}};Ku.getTotalCodewordsCount=function(o,e){switch(e){case Bo.L:return dd[(o-1)*4+0];case Bo.M:return dd[(o-1)*4+1];case Bo.Q:return dd[(o-1)*4+2];case Bo.H:return dd[(o-1)*4+3];default:return}}});var Pw=et(ud=>{"use strict";var Ia=new Uint8Array(512),hd=new Uint8Array(256);(function(){let o=1;for(let e=0;e<255;e++)Ia[e]=o,hd[o]=e,o<<=1,o&256&&(o^=285);for(let e=255;e<512;e++)Ia[e]=Ia[e-255]})();ud.log=function(o){if(o<1)throw new Error("log("+o+")");return hd[o]};ud.exp=function(o){return Ia[o]};ud.mul=function(o,e){return o===0||e===0?0:Ia[hd[o]+hd[e]]}});var Nw=et(Fa=>{"use strict";var Yu=Pw();Fa.mul=function(o,e){let i=new Uint8Array(o.length+e.length-1);for(let n=0;n<o.length;n++)for(let r=0;r<e.length;r++)i[n+r]^=Yu.mul(o[n],e[r]);return i};Fa.mod=function(o,e){let i=new Uint8Array(o);for(;i.length-e.length>=0;){let n=i[0];for(let a=0;a<e.length;a++)i[a]^=Yu.mul(e[a],n);let r=0;for(;r<i.length&&i[r]===0;)r++;i=i.slice(r)}return i};Fa.generateECPolynomial=function(o){let e=new Uint8Array([1]);for(let i=0;i<o;i++)e=Fa.mul(e,new Uint8Array([1,Yu.exp(i)]));return e}});var Ww=et((Nie,Bw)=>{"use strict";var Vw=Nw();function Zu(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}Zu.prototype.initialize=function(o){this.degree=o,this.genPoly=Vw.generateECPolynomial(this.degree)};Zu.prototype.encode=function(o){if(!this.genPoly)throw new Error("Encoder not initialized");let e=new Uint8Array(o.length+this.degree);e.set(o);let i=Vw.mod(e,this.genPoly),n=this.degree-i.length;if(n>0){let r=new Uint8Array(this.degree);return r.set(i,n),r}return i};Bw.exports=Zu});var Ju=et(Ow=>{"use strict";Ow.isValid=function(o){return!isNaN(o)&&o>=1&&o<=40}});var em=et(Yi=>{"use strict";var zw="[0-9]+",V9="[A-Z $%*+\\-./:]+",La="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";La=La.replace(/u/g,"\\u");var B9="(?:(?![A-Z0-9 $%*+\\-./:]|"+La+`)(?:.|[\r
20
- ]))+`;Yi.KANJI=new RegExp(La,"g");Yi.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");Yi.BYTE=new RegExp(B9,"g");Yi.NUMERIC=new RegExp(zw,"g");Yi.ALPHANUMERIC=new RegExp(V9,"g");var W9=new RegExp("^"+La+"$"),O9=new RegExp("^"+zw+"$"),z9=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");Yi.testKanji=function(o){return W9.test(o)};Yi.testNumeric=function(o){return O9.test(o)};Yi.testAlphanumeric=function(o){return z9.test(o)}});var Wo=et(pt=>{"use strict";var $9=Ju(),tm=em();pt.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]};pt.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]};pt.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]};pt.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]};pt.MIXED={bit:-1};pt.getCharCountIndicator=function(o,e){if(!o.ccBits)throw new Error("Invalid mode: "+o);if(!$9.isValid(e))throw new Error("Invalid version: "+e);return e>=1&&e<10?o.ccBits[0]:e<27?o.ccBits[1]:o.ccBits[2]};pt.getBestModeForData=function(o){return tm.testNumeric(o)?pt.NUMERIC:tm.testAlphanumeric(o)?pt.ALPHANUMERIC:tm.testKanji(o)?pt.KANJI:pt.BYTE};pt.toString=function(o){if(o&&o.id)return o.id;throw new Error("Invalid mode")};pt.isValid=function(o){return o&&o.bit&&o.ccBits};function j9(t){if(typeof t!="string")throw new Error("Param is not a string");switch(t.toLowerCase()){case"numeric":return pt.NUMERIC;case"alphanumeric":return pt.ALPHANUMERIC;case"kanji":return pt.KANJI;case"byte":return pt.BYTE;default:throw new Error("Unknown mode: "+t)}}pt.from=function(o,e){if(pt.isValid(o))return o;try{return j9(o)}catch{return e}}});var Gw=et(yn=>{"use strict";var md=Vo(),H9=Qu(),$w=sd(),Oo=Wo(),im=Ju(),Hw=7973,jw=md.getBCHDigit(Hw);function U9(t,o,e){for(let i=1;i<=40;i++)if(o<=yn.getCapacity(i,e,t))return i}function Uw(t,o){return Oo.getCharCountIndicator(t,o)+4}function G9(t,o){let e=0;return t.forEach(function(i){let n=Uw(i.mode,o);e+=n+i.getBitsLength()}),e}function X9(t,o){for(let e=1;e<=40;e++)if(G9(t,e)<=yn.getCapacity(e,o,Oo.MIXED))return e}yn.from=function(o,e){return im.isValid(o)?parseInt(o,10):e};yn.getCapacity=function(o,e,i){if(!im.isValid(o))throw new Error("Invalid QR Code version");typeof i>"u"&&(i=Oo.BYTE);let n=md.getSymbolTotalCodewords(o),r=H9.getTotalCodewordsCount(o,e),a=(n-r)*8;if(i===Oo.MIXED)return a;let s=a-Uw(i,o);switch(i){case Oo.NUMERIC:return Math.floor(s/10*3);case Oo.ALPHANUMERIC:return Math.floor(s/11*2);case Oo.KANJI:return Math.floor(s/13);case Oo.BYTE:default:return Math.floor(s/8)}};yn.getBestVersionForData=function(o,e){let i,n=$w.from(e,$w.M);if(Array.isArray(o)){if(o.length>1)return X9(o,n);if(o.length===0)return 1;i=o[0]}else i=o;return U9(i.mode,i.getLength(),n)};yn.getEncodedBits=function(o){if(!im.isValid(o)||o<7)throw new Error("Invalid QR Code version");let e=o<<12;for(;md.getBCHDigit(e)-jw>=0;)e^=Hw<<md.getBCHDigit(e)-jw;return o<<12|e}});var Yw=et(Qw=>{"use strict";var om=Vo(),Kw=1335,K9=21522,Xw=om.getBCHDigit(Kw);Qw.getEncodedBits=function(o,e){let i=o.bit<<3|e,n=i<<10;for(;om.getBCHDigit(n)-Xw>=0;)n^=Kw<<om.getBCHDigit(n)-Xw;return(i<<10|n)^K9}});var Jw=et(($ie,Zw)=>{"use strict";var Q9=Wo();function Pr(t){this.mode=Q9.NUMERIC,this.data=t.toString()}Pr.getBitsLength=function(o){return 10*Math.floor(o/3)+(o%3?o%3*3+1:0)};Pr.prototype.getLength=function(){return this.data.length};Pr.prototype.getBitsLength=function(){return Pr.getBitsLength(this.data.length)};Pr.prototype.write=function(o){let e,i,n;for(e=0;e+3<=this.data.length;e+=3)i=this.data.substr(e,3),n=parseInt(i,10),o.put(n,10);let r=this.data.length-e;r>0&&(i=this.data.substr(e),n=parseInt(i,10),o.put(n,r*3+1))};Zw.exports=Pr});var t4=et((jie,e4)=>{"use strict";var Y9=Wo(),nm=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function Nr(t){this.mode=Y9.ALPHANUMERIC,this.data=t}Nr.getBitsLength=function(o){return 11*Math.floor(o/2)+6*(o%2)};Nr.prototype.getLength=function(){return this.data.length};Nr.prototype.getBitsLength=function(){return Nr.getBitsLength(this.data.length)};Nr.prototype.write=function(o){let e;for(e=0;e+2<=this.data.length;e+=2){let i=nm.indexOf(this.data[e])*45;i+=nm.indexOf(this.data[e+1]),o.put(i,11)}this.data.length%2&&o.put(nm.indexOf(this.data[e]),6)};e4.exports=Nr});var o4=et((Hie,i4)=>{"use strict";var Z9=Wo();function Vr(t){this.mode=Z9.BYTE,typeof t=="string"?this.data=new TextEncoder().encode(t):this.data=new Uint8Array(t)}Vr.getBitsLength=function(o){return o*8};Vr.prototype.getLength=function(){return this.data.length};Vr.prototype.getBitsLength=function(){return Vr.getBitsLength(this.data.length)};Vr.prototype.write=function(t){for(let o=0,e=this.data.length;o<e;o++)t.put(this.data[o],8)};i4.exports=Vr});var r4=et((Uie,n4)=>{"use strict";var J9=Wo(),e_=Vo();function Br(t){this.mode=J9.KANJI,this.data=t}Br.getBitsLength=function(o){return o*13};Br.prototype.getLength=function(){return this.data.length};Br.prototype.getBitsLength=function(){return Br.getBitsLength(this.data.length)};Br.prototype.write=function(t){let o;for(o=0;o<this.data.length;o++){let e=e_.toSJIS(this.data[o]);if(e>=33088&&e<=40956)e-=33088;else if(e>=57408&&e<=60351)e-=49472;else throw new Error("Invalid SJIS character: "+this.data[o]+`
21
- Make sure your charset is UTF-8`);e=(e>>>8&255)*192+(e&255),t.put(e,13)}};n4.exports=Br});var a4=et((Gie,rm)=>{"use strict";var Da={single_source_shortest_paths:function(t,o,e){var i={},n={};n[o]=0;var r=Da.PriorityQueue.make();r.push(o,0);for(var a,s,l,d,c,u,m,g,b;!r.empty();){a=r.pop(),s=a.value,d=a.cost,c=t[s]||{};for(l in c)c.hasOwnProperty(l)&&(u=c[l],m=d+u,g=n[l],b=typeof n[l]>"u",(b||g>m)&&(n[l]=m,r.push(l,m),i[l]=s))}if(typeof e<"u"&&typeof n[e]>"u"){var y=["Could not find a path from ",o," to ",e,"."].join("");throw new Error(y)}return i},extract_shortest_path_from_predecessor_list:function(t,o){for(var e=[],i=o,n;i;)e.push(i),n=t[i],i=t[i];return e.reverse(),e},find_path:function(t,o,e){var i=Da.single_source_shortest_paths(t,o,e);return Da.extract_shortest_path_from_predecessor_list(i,e)},PriorityQueue:{make:function(t){var o=Da.PriorityQueue,e={},i;t=t||{};for(i in o)o.hasOwnProperty(i)&&(e[i]=o[i]);return e.queue=[],e.sorter=t.sorter||o.default_sorter,e},default_sorter:function(t,o){return t.cost-o.cost},push:function(t,o){var e={value:t,cost:o};this.queue.push(e),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};typeof rm<"u"&&(rm.exports=Da)});var p4=et(Wr=>{"use strict";var Je=Wo(),c4=Jw(),d4=t4(),h4=o4(),u4=r4(),Pa=em(),pd=Vo(),t_=a4();function s4(t){return unescape(encodeURIComponent(t)).length}function Na(t,o,e){let i=[],n;for(;(n=t.exec(e))!==null;)i.push({data:n[0],index:n.index,mode:o,length:n[0].length});return i}function m4(t){let o=Na(Pa.NUMERIC,Je.NUMERIC,t),e=Na(Pa.ALPHANUMERIC,Je.ALPHANUMERIC,t),i,n;return pd.isKanjiModeEnabled()?(i=Na(Pa.BYTE,Je.BYTE,t),n=Na(Pa.KANJI,Je.KANJI,t)):(i=Na(Pa.BYTE_KANJI,Je.BYTE,t),n=[]),o.concat(e,i,n).sort(function(a,s){return a.index-s.index}).map(function(a){return{data:a.data,mode:a.mode,length:a.length}})}function am(t,o){switch(o){case Je.NUMERIC:return c4.getBitsLength(t);case Je.ALPHANUMERIC:return d4.getBitsLength(t);case Je.KANJI:return u4.getBitsLength(t);case Je.BYTE:return h4.getBitsLength(t)}}function i_(t){return t.reduce(function(o,e){let i=o.length-1>=0?o[o.length-1]:null;return i&&i.mode===e.mode?(o[o.length-1].data+=e.data,o):(o.push(e),o)},[])}function o_(t){let o=[];for(let e=0;e<t.length;e++){let i=t[e];switch(i.mode){case Je.NUMERIC:o.push([i,{data:i.data,mode:Je.ALPHANUMERIC,length:i.length},{data:i.data,mode:Je.BYTE,length:i.length}]);break;case Je.ALPHANUMERIC:o.push([i,{data:i.data,mode:Je.BYTE,length:i.length}]);break;case Je.KANJI:o.push([i,{data:i.data,mode:Je.BYTE,length:s4(i.data)}]);break;case Je.BYTE:o.push([{data:i.data,mode:Je.BYTE,length:s4(i.data)}])}}return o}function n_(t,o){let e={},i={start:{}},n=["start"];for(let r=0;r<t.length;r++){let a=t[r],s=[];for(let l=0;l<a.length;l++){let d=a[l],c=""+r+l;s.push(c),e[c]={node:d,lastCount:0},i[c]={};for(let u=0;u<n.length;u++){let m=n[u];e[m]&&e[m].node.mode===d.mode?(i[m][c]=am(e[m].lastCount+d.length,d.mode)-am(e[m].lastCount,d.mode),e[m].lastCount+=d.length):(e[m]&&(e[m].lastCount=d.length),i[m][c]=am(d.length,d.mode)+4+Je.getCharCountIndicator(d.mode,o))}}n=s}for(let r=0;r<n.length;r++)i[n[r]].end=0;return{map:i,table:e}}function l4(t,o){let e,i=Je.getBestModeForData(t);if(e=Je.from(o,i),e!==Je.BYTE&&e.bit<i.bit)throw new Error('"'+t+'" cannot be encoded with mode '+Je.toString(e)+`.
22
- Suggested mode is: `+Je.toString(i));switch(e===Je.KANJI&&!pd.isKanjiModeEnabled()&&(e=Je.BYTE),e){case Je.NUMERIC:return new c4(t);case Je.ALPHANUMERIC:return new d4(t);case Je.KANJI:return new u4(t);case Je.BYTE:return new h4(t)}}Wr.fromArray=function(o){return o.reduce(function(e,i){return typeof i=="string"?e.push(l4(i,null)):i.data&&e.push(l4(i.data,i.mode)),e},[])};Wr.fromString=function(o,e){let i=m4(o,pd.isKanjiModeEnabled()),n=o_(i),r=n_(n,e),a=t_.find_path(r.map,"start","end"),s=[];for(let l=1;l<a.length-1;l++)s.push(r.table[a[l]].node);return Wr.fromArray(i_(s))};Wr.rawSplit=function(o){return Wr.fromArray(m4(o,pd.isKanjiModeEnabled()))}});var g4=et(f4=>{"use strict";var gd=Vo(),sm=sd(),r_=qw(),a_=Rw(),s_=Aw(),l_=Lw(),dm=Dw(),hm=Qu(),c_=Ww(),fd=Gw(),d_=Yw(),h_=Wo(),lm=p4();function u_(t,o){let e=t.size,i=l_.getPositions(o);for(let n=0;n<i.length;n++){let r=i[n][0],a=i[n][1];for(let s=-1;s<=7;s++)if(!(r+s<=-1||e<=r+s))for(let l=-1;l<=7;l++)a+l<=-1||e<=a+l||(s>=0&&s<=6&&(l===0||l===6)||l>=0&&l<=6&&(s===0||s===6)||s>=2&&s<=4&&l>=2&&l<=4?t.set(r+s,a+l,!0,!0):t.set(r+s,a+l,!1,!0))}}function m_(t){let o=t.size;for(let e=8;e<o-8;e++){let i=e%2===0;t.set(e,6,i,!0),t.set(6,e,i,!0)}}function p_(t,o){let e=s_.getPositions(o);for(let i=0;i<e.length;i++){let n=e[i][0],r=e[i][1];for(let a=-2;a<=2;a++)for(let s=-2;s<=2;s++)a===-2||a===2||s===-2||s===2||a===0&&s===0?t.set(n+a,r+s,!0,!0):t.set(n+a,r+s,!1,!0)}}function f_(t,o){let e=t.size,i=fd.getEncodedBits(o),n,r,a;for(let s=0;s<18;s++)n=Math.floor(s/3),r=s%3+e-8-3,a=(i>>s&1)===1,t.set(n,r,a,!0),t.set(r,n,a,!0)}function cm(t,o,e){let i=t.size,n=d_.getEncodedBits(o,e),r,a;for(r=0;r<15;r++)a=(n>>r&1)===1,r<6?t.set(r,8,a,!0):r<8?t.set(r+1,8,a,!0):t.set(i-15+r,8,a,!0),r<8?t.set(8,i-r-1,a,!0):r<9?t.set(8,15-r-1+1,a,!0):t.set(8,15-r-1,a,!0);t.set(i-8,8,1,!0)}function g_(t,o){let e=t.size,i=-1,n=e-1,r=7,a=0;for(let s=e-1;s>0;s-=2)for(s===6&&s--;;){for(let l=0;l<2;l++)if(!t.isReserved(n,s-l)){let d=!1;a<o.length&&(d=(o[a]>>>r&1)===1),t.set(n,s-l,d),r--,r===-1&&(a++,r=7)}if(n+=i,n<0||e<=n){n-=i,i=-i;break}}}function b_(t,o,e){let i=new r_;e.forEach(function(l){i.put(l.mode.bit,4),i.put(l.getLength(),h_.getCharCountIndicator(l.mode,t)),l.write(i)});let n=gd.getSymbolTotalCodewords(t),r=hm.getTotalCodewordsCount(t,o),a=(n-r)*8;for(i.getLengthInBits()+4<=a&&i.put(0,4);i.getLengthInBits()%8!==0;)i.putBit(0);let s=(a-i.getLengthInBits())/8;for(let l=0;l<s;l++)i.put(l%2?17:236,8);return v_(i,t,o)}function v_(t,o,e){let i=gd.getSymbolTotalCodewords(o),n=hm.getTotalCodewordsCount(o,e),r=i-n,a=hm.getBlocksCount(o,e),s=i%a,l=a-s,d=Math.floor(i/a),c=Math.floor(r/a),u=c+1,m=d-c,g=new c_(m),b=0,y=new Array(a),q=new Array(a),D=0,j=new Uint8Array(t.buffer);for(let G=0;G<a;G++){let Y=G<l?c:u;y[G]=j.slice(b,b+Y),q[G]=g.encode(y[G]),b+=Y,D=Math.max(D,Y)}let k=new Uint8Array(i),N=0,z,H;for(z=0;z<D;z++)for(H=0;H<a;H++)z<y[H].length&&(k[N++]=y[H][z]);for(z=0;z<m;z++)for(H=0;H<a;H++)k[N++]=q[H][z];return k}function x_(t,o,e,i){let n;if(Array.isArray(t))n=lm.fromArray(t);else if(typeof t=="string"){let d=o;if(!d){let c=lm.rawSplit(t);d=fd.getBestVersionForData(c,e)}n=lm.fromString(t,d||40)}else throw new Error("Invalid data");let r=fd.getBestVersionForData(n,e);if(!r)throw new Error("The amount of data is too big to be stored in a QR Code");if(!o)o=r;else if(o<r)throw new Error(`
19
+ ${j}`),y.pop(),`{${H}}`}case"number":return isFinite(b)?String(b):o?o(b):"null";case"boolean":return b===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(b);default:return o?o(b):void 0}}function u(g,b,y){switch(typeof b){case"string":return Ao(b);case"object":{if(b===null)return"null";if(typeof b.toJSON=="function"){if(b=b.toJSON(g),typeof b!="object")return u(g,b,y);if(b===null)return"null"}if(y.indexOf(b)!==-1)return t;let q="",D=b.length!==void 0;if(D&&Array.isArray(b)){if(b.length===0)return"[]";if(a<y.length+1)return'"[Array]"';y.push(b);let H=Math.min(b.length,s),G=0;for(;G<H-1;G++){let X=u(String(G),b[G],y);q+=X!==void 0?X:"null",q+=","}let Y=u(String(G),b[G],y);if(q+=Y!==void 0?Y:"null",b.length-1>s){let X=b.length-s-1;q+=`,"... ${en(X)} not stringified"`}return y.pop(),`[${q}]`}let j=Object.keys(b),k=j.length;if(k===0)return"{}";if(a<y.length+1)return'"[Object]"';let N="",z=Math.min(k,s);D&&xh(b)&&(q+=p2(b,",",s),j=j.slice(b.length),z-=b.length,N=","),n&&(j=vh(j,r)),y.push(b);for(let H=0;H<z;H++){let G=j[H],Y=u(G,b[G],y);Y!==void 0&&(q+=`${N}${Ao(G)}:${Y}`,N=",")}if(k>s){let H=k-s;q+=`${N}"...":"${en(H)} not stringified"`}return y.pop(),`{${q}}`}case"number":return isFinite(b)?String(b):o?o(b):"null";case"boolean":return b===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(b);default:return o?o(b):void 0}}function m(g,b,y){if(arguments.length>1){let q="";if(typeof y=="number"?q=" ".repeat(Math.min(y,10)):typeof y=="string"&&(q=y.slice(0,10)),b!=null){if(typeof b=="function")return l("",{"":g},[],b,q,"");if(Array.isArray(b))return d("",g,[],Wy(b),q,"")}if(q.length!==0)return c("",g,[],q,"")}return u("",g,[])}return m}});var Mw=et((wie,Cw)=>{"use strict";Cw.exports=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}});var Vo=et(xn=>{"use strict";var Gu,T9=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];xn.getSymbolSize=function(o){if(!o)throw new Error('"version" cannot be null or undefined');if(o<1||o>40)throw new Error('"version" should be in range from 1 to 40');return o*4+17};xn.getSymbolTotalCodewords=function(o){return T9[o]};xn.getBCHDigit=function(e){let o=0;for(;e!==0;)o++,e>>>=1;return o};xn.setToSJISFunction=function(o){if(typeof o!="function")throw new Error('"toSJISFunc" is not a valid function.');Gu=o};xn.isKanjiModeEnabled=function(){return typeof Gu<"u"};xn.toSJIS=function(o){return Gu(o)}});var ad=et(ri=>{"use strict";ri.L={bit:1};ri.M={bit:0};ri.Q={bit:3};ri.H={bit:2};function R9(e){if(typeof e!="string")throw new Error("Param is not a string");switch(e.toLowerCase()){case"l":case"low":return ri.L;case"m":case"medium":return ri.M;case"q":case"quartile":return ri.Q;case"h":case"high":return ri.H;default:throw new Error("Unknown EC Level: "+e)}}ri.isValid=function(o){return o&&typeof o.bit<"u"&&o.bit>=0&&o.bit<4};ri.from=function(o,t){if(ri.isValid(o))return o;try{return R9(o)}catch{return t}}});var kw=et((Cie,Ew)=>{"use strict";function _w(){this.buffer=[],this.length=0}_w.prototype={get:function(e){let o=Math.floor(e/8);return(this.buffer[o]>>>7-e%8&1)===1},put:function(e,o){for(let t=0;t<o;t++)this.putBit((e>>>o-t-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(e){let o=Math.floor(this.length/8);this.buffer.length<=o&&this.buffer.push(0),e&&(this.buffer[o]|=128>>>this.length%8),this.length++}};Ew.exports=_w});var Tw=et((Mie,qw)=>{"use strict";function Ra(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}Ra.prototype.set=function(e,o,t,i){let n=e*this.size+o;this.data[n]=t,i&&(this.reservedBit[n]=!0)};Ra.prototype.get=function(e,o){return this.data[e*this.size+o]};Ra.prototype.xor=function(e,o,t){this.data[e*this.size+o]^=t};Ra.prototype.isReserved=function(e,o){return this.reservedBit[e*this.size+o]};qw.exports=Ra});var Rw=et(sd=>{"use strict";var A9=Vo().getSymbolSize;sd.getRowColCoords=function(o){if(o===1)return[];let t=Math.floor(o/7)+2,i=A9(o),n=i===145?26:Math.ceil((i-13)/(2*t-2))*2,r=[i-7];for(let a=1;a<t-1;a++)r[a]=r[a-1]-n;return r.push(6),r.reverse()};sd.getPositions=function(o){let t=[],i=sd.getRowColCoords(o),n=i.length;for(let r=0;r<n;r++)for(let a=0;a<n;a++)r===0&&a===0||r===0&&a===n-1||r===n-1&&a===0||t.push([i[r],i[a]]);return t}});var Fw=et(Iw=>{"use strict";var I9=Vo().getSymbolSize,Aw=7;Iw.getPositions=function(o){let t=I9(o);return[[0,0],[t-Aw,0],[0,t-Aw]]}});var Lw=et(nt=>{"use strict";nt.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var wn={N1:3,N2:3,N3:40,N4:10};nt.isValid=function(o){return o!=null&&o!==""&&!isNaN(o)&&o>=0&&o<=7};nt.from=function(o){return nt.isValid(o)?parseInt(o,10):void 0};nt.getPenaltyN1=function(o){let t=o.size,i=0,n=0,r=0,a=null,s=null;for(let l=0;l<t;l++){n=r=0,a=s=null;for(let d=0;d<t;d++){let c=o.get(l,d);c===a?n++:(n>=5&&(i+=wn.N1+(n-5)),a=c,n=1),c=o.get(d,l),c===s?r++:(r>=5&&(i+=wn.N1+(r-5)),s=c,r=1)}n>=5&&(i+=wn.N1+(n-5)),r>=5&&(i+=wn.N1+(r-5))}return i};nt.getPenaltyN2=function(o){let t=o.size,i=0;for(let n=0;n<t-1;n++)for(let r=0;r<t-1;r++){let a=o.get(n,r)+o.get(n,r+1)+o.get(n+1,r)+o.get(n+1,r+1);(a===4||a===0)&&i++}return i*wn.N2};nt.getPenaltyN3=function(o){let t=o.size,i=0,n=0,r=0;for(let a=0;a<t;a++){n=r=0;for(let s=0;s<t;s++)n=n<<1&2047|o.get(a,s),s>=10&&(n===1488||n===93)&&i++,r=r<<1&2047|o.get(s,a),s>=10&&(r===1488||r===93)&&i++}return i*wn.N3};nt.getPenaltyN4=function(o){let t=0,i=o.data.length;for(let r=0;r<i;r++)t+=o.data[r];return Math.abs(Math.ceil(t*100/i/5)-10)*wn.N4};function F9(e,o,t){switch(e){case nt.Patterns.PATTERN000:return(o+t)%2===0;case nt.Patterns.PATTERN001:return o%2===0;case nt.Patterns.PATTERN010:return t%3===0;case nt.Patterns.PATTERN011:return(o+t)%3===0;case nt.Patterns.PATTERN100:return(Math.floor(o/2)+Math.floor(t/3))%2===0;case nt.Patterns.PATTERN101:return o*t%2+o*t%3===0;case nt.Patterns.PATTERN110:return(o*t%2+o*t%3)%2===0;case nt.Patterns.PATTERN111:return(o*t%3+(o+t)%2)%2===0;default:throw new Error("bad maskPattern:"+e)}}nt.applyMask=function(o,t){let i=t.size;for(let n=0;n<i;n++)for(let r=0;r<i;r++)t.isReserved(r,n)||t.xor(r,n,F9(o,r,n))};nt.getBestMask=function(o,t){let i=Object.keys(nt.Patterns).length,n=0,r=1/0;for(let a=0;a<i;a++){t(a),nt.applyMask(a,o);let s=nt.getPenaltyN1(o)+nt.getPenaltyN2(o)+nt.getPenaltyN3(o)+nt.getPenaltyN4(o);nt.applyMask(a,o),s<r&&(r=s,n=a)}return n}});var Ku=et(Xu=>{"use strict";var Bo=ad(),ld=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],cd=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];Xu.getBlocksCount=function(o,t){switch(t){case Bo.L:return ld[(o-1)*4+0];case Bo.M:return ld[(o-1)*4+1];case Bo.Q:return ld[(o-1)*4+2];case Bo.H:return ld[(o-1)*4+3];default:return}};Xu.getTotalCodewordsCount=function(o,t){switch(t){case Bo.L:return cd[(o-1)*4+0];case Bo.M:return cd[(o-1)*4+1];case Bo.Q:return cd[(o-1)*4+2];case Bo.H:return cd[(o-1)*4+3];default:return}}});var Dw=et(hd=>{"use strict";var Aa=new Uint8Array(512),dd=new Uint8Array(256);(function(){let o=1;for(let t=0;t<255;t++)Aa[t]=o,dd[o]=t,o<<=1,o&256&&(o^=285);for(let t=255;t<512;t++)Aa[t]=Aa[t-255]})();hd.log=function(o){if(o<1)throw new Error("log("+o+")");return dd[o]};hd.exp=function(o){return Aa[o]};hd.mul=function(o,t){return o===0||t===0?0:Aa[dd[o]+dd[t]]}});var Pw=et(Ia=>{"use strict";var Qu=Dw();Ia.mul=function(o,t){let i=new Uint8Array(o.length+t.length-1);for(let n=0;n<o.length;n++)for(let r=0;r<t.length;r++)i[n+r]^=Qu.mul(o[n],t[r]);return i};Ia.mod=function(o,t){let i=new Uint8Array(o);for(;i.length-t.length>=0;){let n=i[0];for(let a=0;a<t.length;a++)i[a]^=Qu.mul(t[a],n);let r=0;for(;r<i.length&&i[r]===0;)r++;i=i.slice(r)}return i};Ia.generateECPolynomial=function(o){let t=new Uint8Array([1]);for(let i=0;i<o;i++)t=Ia.mul(t,new Uint8Array([1,Qu.exp(i)]));return t}});var Bw=et((Aie,Vw)=>{"use strict";var Nw=Pw();function Yu(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}Yu.prototype.initialize=function(o){this.degree=o,this.genPoly=Nw.generateECPolynomial(this.degree)};Yu.prototype.encode=function(o){if(!this.genPoly)throw new Error("Encoder not initialized");let t=new Uint8Array(o.length+this.degree);t.set(o);let i=Nw.mod(t,this.genPoly),n=this.degree-i.length;if(n>0){let r=new Uint8Array(this.degree);return r.set(i,n),r}return i};Vw.exports=Yu});var Zu=et(Ww=>{"use strict";Ww.isValid=function(o){return!isNaN(o)&&o>=1&&o<=40}});var Ju=et(Yi=>{"use strict";var Ow="[0-9]+",L9="[A-Z $%*+\\-./:]+",Fa="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";Fa=Fa.replace(/u/g,"\\u");var D9="(?:(?![A-Z0-9 $%*+\\-./:]|"+Fa+`)(?:.|[\r
20
+ ]))+`;Yi.KANJI=new RegExp(Fa,"g");Yi.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");Yi.BYTE=new RegExp(D9,"g");Yi.NUMERIC=new RegExp(Ow,"g");Yi.ALPHANUMERIC=new RegExp(L9,"g");var P9=new RegExp("^"+Fa+"$"),N9=new RegExp("^"+Ow+"$"),V9=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");Yi.testKanji=function(o){return P9.test(o)};Yi.testNumeric=function(o){return N9.test(o)};Yi.testAlphanumeric=function(o){return V9.test(o)}});var Wo=et(pt=>{"use strict";var B9=Zu(),em=Ju();pt.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]};pt.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]};pt.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]};pt.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]};pt.MIXED={bit:-1};pt.getCharCountIndicator=function(o,t){if(!o.ccBits)throw new Error("Invalid mode: "+o);if(!B9.isValid(t))throw new Error("Invalid version: "+t);return t>=1&&t<10?o.ccBits[0]:t<27?o.ccBits[1]:o.ccBits[2]};pt.getBestModeForData=function(o){return em.testNumeric(o)?pt.NUMERIC:em.testAlphanumeric(o)?pt.ALPHANUMERIC:em.testKanji(o)?pt.KANJI:pt.BYTE};pt.toString=function(o){if(o&&o.id)return o.id;throw new Error("Invalid mode")};pt.isValid=function(o){return o&&o.bit&&o.ccBits};function W9(e){if(typeof e!="string")throw new Error("Param is not a string");switch(e.toLowerCase()){case"numeric":return pt.NUMERIC;case"alphanumeric":return pt.ALPHANUMERIC;case"kanji":return pt.KANJI;case"byte":return pt.BYTE;default:throw new Error("Unknown mode: "+e)}}pt.from=function(o,t){if(pt.isValid(o))return o;try{return W9(o)}catch{return t}}});var Uw=et(yn=>{"use strict";var ud=Vo(),O9=Ku(),zw=ad(),Oo=Wo(),tm=Zu(),jw=7973,$w=ud.getBCHDigit(jw);function z9(e,o,t){for(let i=1;i<=40;i++)if(o<=yn.getCapacity(i,t,e))return i}function Hw(e,o){return Oo.getCharCountIndicator(e,o)+4}function $9(e,o){let t=0;return e.forEach(function(i){let n=Hw(i.mode,o);t+=n+i.getBitsLength()}),t}function j9(e,o){for(let t=1;t<=40;t++)if($9(e,t)<=yn.getCapacity(t,o,Oo.MIXED))return t}yn.from=function(o,t){return tm.isValid(o)?parseInt(o,10):t};yn.getCapacity=function(o,t,i){if(!tm.isValid(o))throw new Error("Invalid QR Code version");typeof i>"u"&&(i=Oo.BYTE);let n=ud.getSymbolTotalCodewords(o),r=O9.getTotalCodewordsCount(o,t),a=(n-r)*8;if(i===Oo.MIXED)return a;let s=a-Hw(i,o);switch(i){case Oo.NUMERIC:return Math.floor(s/10*3);case Oo.ALPHANUMERIC:return Math.floor(s/11*2);case Oo.KANJI:return Math.floor(s/13);case Oo.BYTE:default:return Math.floor(s/8)}};yn.getBestVersionForData=function(o,t){let i,n=zw.from(t,zw.M);if(Array.isArray(o)){if(o.length>1)return j9(o,n);if(o.length===0)return 1;i=o[0]}else i=o;return z9(i.mode,i.getLength(),n)};yn.getEncodedBits=function(o){if(!tm.isValid(o)||o<7)throw new Error("Invalid QR Code version");let t=o<<12;for(;ud.getBCHDigit(t)-$w>=0;)t^=jw<<ud.getBCHDigit(t)-$w;return o<<12|t}});var Qw=et(Kw=>{"use strict";var im=Vo(),Xw=1335,H9=21522,Gw=im.getBCHDigit(Xw);Kw.getEncodedBits=function(o,t){let i=o.bit<<3|t,n=i<<10;for(;im.getBCHDigit(n)-Gw>=0;)n^=Xw<<im.getBCHDigit(n)-Gw;return(i<<10|n)^H9}});var Zw=et((Nie,Yw)=>{"use strict";var U9=Wo();function Dr(e){this.mode=U9.NUMERIC,this.data=e.toString()}Dr.getBitsLength=function(o){return 10*Math.floor(o/3)+(o%3?o%3*3+1:0)};Dr.prototype.getLength=function(){return this.data.length};Dr.prototype.getBitsLength=function(){return Dr.getBitsLength(this.data.length)};Dr.prototype.write=function(o){let t,i,n;for(t=0;t+3<=this.data.length;t+=3)i=this.data.substr(t,3),n=parseInt(i,10),o.put(n,10);let r=this.data.length-t;r>0&&(i=this.data.substr(t),n=parseInt(i,10),o.put(n,r*3+1))};Yw.exports=Dr});var e4=et((Vie,Jw)=>{"use strict";var G9=Wo(),om=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function Pr(e){this.mode=G9.ALPHANUMERIC,this.data=e}Pr.getBitsLength=function(o){return 11*Math.floor(o/2)+6*(o%2)};Pr.prototype.getLength=function(){return this.data.length};Pr.prototype.getBitsLength=function(){return Pr.getBitsLength(this.data.length)};Pr.prototype.write=function(o){let t;for(t=0;t+2<=this.data.length;t+=2){let i=om.indexOf(this.data[t])*45;i+=om.indexOf(this.data[t+1]),o.put(i,11)}this.data.length%2&&o.put(om.indexOf(this.data[t]),6)};Jw.exports=Pr});var i4=et((Bie,t4)=>{"use strict";var X9=Wo();function Nr(e){this.mode=X9.BYTE,typeof e=="string"?this.data=new TextEncoder().encode(e):this.data=new Uint8Array(e)}Nr.getBitsLength=function(o){return o*8};Nr.prototype.getLength=function(){return this.data.length};Nr.prototype.getBitsLength=function(){return Nr.getBitsLength(this.data.length)};Nr.prototype.write=function(e){for(let o=0,t=this.data.length;o<t;o++)e.put(this.data[o],8)};t4.exports=Nr});var n4=et((Wie,o4)=>{"use strict";var K9=Wo(),Q9=Vo();function Vr(e){this.mode=K9.KANJI,this.data=e}Vr.getBitsLength=function(o){return o*13};Vr.prototype.getLength=function(){return this.data.length};Vr.prototype.getBitsLength=function(){return Vr.getBitsLength(this.data.length)};Vr.prototype.write=function(e){let o;for(o=0;o<this.data.length;o++){let t=Q9.toSJIS(this.data[o]);if(t>=33088&&t<=40956)t-=33088;else if(t>=57408&&t<=60351)t-=49472;else throw new Error("Invalid SJIS character: "+this.data[o]+`
21
+ Make sure your charset is UTF-8`);t=(t>>>8&255)*192+(t&255),e.put(t,13)}};o4.exports=Vr});var r4=et((Oie,nm)=>{"use strict";var La={single_source_shortest_paths:function(e,o,t){var i={},n={};n[o]=0;var r=La.PriorityQueue.make();r.push(o,0);for(var a,s,l,d,c,u,m,g,b;!r.empty();){a=r.pop(),s=a.value,d=a.cost,c=e[s]||{};for(l in c)c.hasOwnProperty(l)&&(u=c[l],m=d+u,g=n[l],b=typeof n[l]>"u",(b||g>m)&&(n[l]=m,r.push(l,m),i[l]=s))}if(typeof t<"u"&&typeof n[t]>"u"){var y=["Could not find a path from ",o," to ",t,"."].join("");throw new Error(y)}return i},extract_shortest_path_from_predecessor_list:function(e,o){for(var t=[],i=o,n;i;)t.push(i),n=e[i],i=e[i];return t.reverse(),t},find_path:function(e,o,t){var i=La.single_source_shortest_paths(e,o,t);return La.extract_shortest_path_from_predecessor_list(i,t)},PriorityQueue:{make:function(e){var o=La.PriorityQueue,t={},i;e=e||{};for(i in o)o.hasOwnProperty(i)&&(t[i]=o[i]);return t.queue=[],t.sorter=e.sorter||o.default_sorter,t},default_sorter:function(e,o){return e.cost-o.cost},push:function(e,o){var t={value:e,cost:o};this.queue.push(t),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};typeof nm<"u"&&(nm.exports=La)});var m4=et(Br=>{"use strict";var Je=Wo(),l4=Zw(),c4=e4(),d4=i4(),h4=n4(),Da=Ju(),md=Vo(),Y9=r4();function a4(e){return unescape(encodeURIComponent(e)).length}function Pa(e,o,t){let i=[],n;for(;(n=e.exec(t))!==null;)i.push({data:n[0],index:n.index,mode:o,length:n[0].length});return i}function u4(e){let o=Pa(Da.NUMERIC,Je.NUMERIC,e),t=Pa(Da.ALPHANUMERIC,Je.ALPHANUMERIC,e),i,n;return md.isKanjiModeEnabled()?(i=Pa(Da.BYTE,Je.BYTE,e),n=Pa(Da.KANJI,Je.KANJI,e)):(i=Pa(Da.BYTE_KANJI,Je.BYTE,e),n=[]),o.concat(t,i,n).sort(function(a,s){return a.index-s.index}).map(function(a){return{data:a.data,mode:a.mode,length:a.length}})}function rm(e,o){switch(o){case Je.NUMERIC:return l4.getBitsLength(e);case Je.ALPHANUMERIC:return c4.getBitsLength(e);case Je.KANJI:return h4.getBitsLength(e);case Je.BYTE:return d4.getBitsLength(e)}}function Z9(e){return e.reduce(function(o,t){let i=o.length-1>=0?o[o.length-1]:null;return i&&i.mode===t.mode?(o[o.length-1].data+=t.data,o):(o.push(t),o)},[])}function J9(e){let o=[];for(let t=0;t<e.length;t++){let i=e[t];switch(i.mode){case Je.NUMERIC:o.push([i,{data:i.data,mode:Je.ALPHANUMERIC,length:i.length},{data:i.data,mode:Je.BYTE,length:i.length}]);break;case Je.ALPHANUMERIC:o.push([i,{data:i.data,mode:Je.BYTE,length:i.length}]);break;case Je.KANJI:o.push([i,{data:i.data,mode:Je.BYTE,length:a4(i.data)}]);break;case Je.BYTE:o.push([{data:i.data,mode:Je.BYTE,length:a4(i.data)}])}}return o}function e_(e,o){let t={},i={start:{}},n=["start"];for(let r=0;r<e.length;r++){let a=e[r],s=[];for(let l=0;l<a.length;l++){let d=a[l],c=""+r+l;s.push(c),t[c]={node:d,lastCount:0},i[c]={};for(let u=0;u<n.length;u++){let m=n[u];t[m]&&t[m].node.mode===d.mode?(i[m][c]=rm(t[m].lastCount+d.length,d.mode)-rm(t[m].lastCount,d.mode),t[m].lastCount+=d.length):(t[m]&&(t[m].lastCount=d.length),i[m][c]=rm(d.length,d.mode)+4+Je.getCharCountIndicator(d.mode,o))}}n=s}for(let r=0;r<n.length;r++)i[n[r]].end=0;return{map:i,table:t}}function s4(e,o){let t,i=Je.getBestModeForData(e);if(t=Je.from(o,i),t!==Je.BYTE&&t.bit<i.bit)throw new Error('"'+e+'" cannot be encoded with mode '+Je.toString(t)+`.
22
+ Suggested mode is: `+Je.toString(i));switch(t===Je.KANJI&&!md.isKanjiModeEnabled()&&(t=Je.BYTE),t){case Je.NUMERIC:return new l4(e);case Je.ALPHANUMERIC:return new c4(e);case Je.KANJI:return new h4(e);case Je.BYTE:return new d4(e)}}Br.fromArray=function(o){return o.reduce(function(t,i){return typeof i=="string"?t.push(s4(i,null)):i.data&&t.push(s4(i.data,i.mode)),t},[])};Br.fromString=function(o,t){let i=u4(o,md.isKanjiModeEnabled()),n=J9(i),r=e_(n,t),a=Y9.find_path(r.map,"start","end"),s=[];for(let l=1;l<a.length-1;l++)s.push(r.table[a[l]].node);return Br.fromArray(Z9(s))};Br.rawSplit=function(o){return Br.fromArray(u4(o,md.isKanjiModeEnabled()))}});var f4=et(p4=>{"use strict";var fd=Vo(),am=ad(),t_=kw(),i_=Tw(),o_=Rw(),n_=Fw(),cm=Lw(),dm=Ku(),r_=Bw(),pd=Uw(),a_=Qw(),s_=Wo(),sm=m4();function l_(e,o){let t=e.size,i=n_.getPositions(o);for(let n=0;n<i.length;n++){let r=i[n][0],a=i[n][1];for(let s=-1;s<=7;s++)if(!(r+s<=-1||t<=r+s))for(let l=-1;l<=7;l++)a+l<=-1||t<=a+l||(s>=0&&s<=6&&(l===0||l===6)||l>=0&&l<=6&&(s===0||s===6)||s>=2&&s<=4&&l>=2&&l<=4?e.set(r+s,a+l,!0,!0):e.set(r+s,a+l,!1,!0))}}function c_(e){let o=e.size;for(let t=8;t<o-8;t++){let i=t%2===0;e.set(t,6,i,!0),e.set(6,t,i,!0)}}function d_(e,o){let t=o_.getPositions(o);for(let i=0;i<t.length;i++){let n=t[i][0],r=t[i][1];for(let a=-2;a<=2;a++)for(let s=-2;s<=2;s++)a===-2||a===2||s===-2||s===2||a===0&&s===0?e.set(n+a,r+s,!0,!0):e.set(n+a,r+s,!1,!0)}}function h_(e,o){let t=e.size,i=pd.getEncodedBits(o),n,r,a;for(let s=0;s<18;s++)n=Math.floor(s/3),r=s%3+t-8-3,a=(i>>s&1)===1,e.set(n,r,a,!0),e.set(r,n,a,!0)}function lm(e,o,t){let i=e.size,n=a_.getEncodedBits(o,t),r,a;for(r=0;r<15;r++)a=(n>>r&1)===1,r<6?e.set(r,8,a,!0):r<8?e.set(r+1,8,a,!0):e.set(i-15+r,8,a,!0),r<8?e.set(8,i-r-1,a,!0):r<9?e.set(8,15-r-1+1,a,!0):e.set(8,15-r-1,a,!0);e.set(i-8,8,1,!0)}function u_(e,o){let t=e.size,i=-1,n=t-1,r=7,a=0;for(let s=t-1;s>0;s-=2)for(s===6&&s--;;){for(let l=0;l<2;l++)if(!e.isReserved(n,s-l)){let d=!1;a<o.length&&(d=(o[a]>>>r&1)===1),e.set(n,s-l,d),r--,r===-1&&(a++,r=7)}if(n+=i,n<0||t<=n){n-=i,i=-i;break}}}function m_(e,o,t){let i=new t_;t.forEach(function(l){i.put(l.mode.bit,4),i.put(l.getLength(),s_.getCharCountIndicator(l.mode,e)),l.write(i)});let n=fd.getSymbolTotalCodewords(e),r=dm.getTotalCodewordsCount(e,o),a=(n-r)*8;for(i.getLengthInBits()+4<=a&&i.put(0,4);i.getLengthInBits()%8!==0;)i.putBit(0);let s=(a-i.getLengthInBits())/8;for(let l=0;l<s;l++)i.put(l%2?17:236,8);return p_(i,e,o)}function p_(e,o,t){let i=fd.getSymbolTotalCodewords(o),n=dm.getTotalCodewordsCount(o,t),r=i-n,a=dm.getBlocksCount(o,t),s=i%a,l=a-s,d=Math.floor(i/a),c=Math.floor(r/a),u=c+1,m=d-c,g=new r_(m),b=0,y=new Array(a),q=new Array(a),D=0,j=new Uint8Array(e.buffer);for(let G=0;G<a;G++){let Y=G<l?c:u;y[G]=j.slice(b,b+Y),q[G]=g.encode(y[G]),b+=Y,D=Math.max(D,Y)}let k=new Uint8Array(i),N=0,z,H;for(z=0;z<D;z++)for(H=0;H<a;H++)z<y[H].length&&(k[N++]=y[H][z]);for(z=0;z<m;z++)for(H=0;H<a;H++)k[N++]=q[H][z];return k}function f_(e,o,t,i){let n;if(Array.isArray(e))n=sm.fromArray(e);else if(typeof e=="string"){let d=o;if(!d){let c=sm.rawSplit(e);d=pd.getBestVersionForData(c,t)}n=sm.fromString(e,d||40)}else throw new Error("Invalid data");let r=pd.getBestVersionForData(n,t);if(!r)throw new Error("The amount of data is too big to be stored in a QR Code");if(!o)o=r;else if(o<r)throw new Error(`
23
23
  The chosen QR Code version cannot contain this amount of data.
24
24
  Minimum version required to store current data is: `+r+`.
25
- `);let a=b_(o,e,n),s=gd.getSymbolSize(o),l=new a_(s);return u_(l,o),m_(l),p_(l,o),cm(l,e,0),o>=7&&f_(l,o),g_(l,a),isNaN(i)&&(i=dm.getBestMask(l,cm.bind(null,l,e))),dm.applyMask(i,l),cm(l,e,i),{modules:l,version:o,errorCorrectionLevel:e,maskPattern:i,segments:n}}f4.create=function(o,e){if(typeof o>"u"||o==="")throw new Error("No input text");let i=sm.M,n,r;return typeof e<"u"&&(i=sm.from(e.errorCorrectionLevel,sm.M),n=fd.from(e.version),r=dm.from(e.maskPattern),e.toSJISFunc&&gd.setToSJISFunction(e.toSJISFunc)),x_(o,n,i,r)}});var um=et(Sn=>{"use strict";function b4(t){if(typeof t=="number"&&(t=t.toString()),typeof t!="string")throw new Error("Color should be defined as hex string");let o=t.slice().replace("#","").split("");if(o.length<3||o.length===5||o.length>8)throw new Error("Invalid hex color: "+t);(o.length===3||o.length===4)&&(o=Array.prototype.concat.apply([],o.map(function(i){return[i,i]}))),o.length===6&&o.push("F","F");let e=parseInt(o.join(""),16);return{r:e>>24&255,g:e>>16&255,b:e>>8&255,a:e&255,hex:"#"+o.slice(0,6).join("")}}Sn.getOptions=function(o){o||(o={}),o.color||(o.color={});let e=typeof o.margin>"u"||o.margin===null||o.margin<0?4:o.margin,i=o.width&&o.width>=21?o.width:void 0,n=o.scale||4;return{width:i,scale:i?4:n,margin:e,color:{dark:b4(o.color.dark||"#000000ff"),light:b4(o.color.light||"#ffffffff")},type:o.type,rendererOpts:o.rendererOpts||{}}};Sn.getScale=function(o,e){return e.width&&e.width>=o+e.margin*2?e.width/(o+e.margin*2):e.scale};Sn.getImageWidth=function(o,e){let i=Sn.getScale(o,e);return Math.floor((o+e.margin*2)*i)};Sn.qrToImageData=function(o,e,i){let n=e.modules.size,r=e.modules.data,a=Sn.getScale(n,i),s=Math.floor((n+i.margin*2)*a),l=i.margin*a,d=[i.color.light,i.color.dark];for(let c=0;c<s;c++)for(let u=0;u<s;u++){let m=(c*s+u)*4,g=i.color.light;if(c>=l&&u>=l&&c<s-l&&u<s-l){let b=Math.floor((c-l)/a),y=Math.floor((u-l)/a);g=d[r[b*n+y]?1:0]}o[m++]=g.r,o[m++]=g.g,o[m++]=g.b,o[m]=g.a}}});var v4=et(bd=>{"use strict";var mm=um();function w_(t,o,e){t.clearRect(0,0,o.width,o.height),o.style||(o.style={}),o.height=e,o.width=e,o.style.height=e+"px",o.style.width=e+"px"}function y_(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}bd.render=function(o,e,i){let n=i,r=e;typeof n>"u"&&(!e||!e.getContext)&&(n=e,e=void 0),e||(r=y_()),n=mm.getOptions(n);let a=mm.getImageWidth(o.modules.size,n),s=r.getContext("2d"),l=s.createImageData(a,a);return mm.qrToImageData(l.data,o,n),w_(s,r,a),s.putImageData(l,0,0),r};bd.renderToDataURL=function(o,e,i){let n=i;typeof n>"u"&&(!e||!e.getContext)&&(n=e,e=void 0),n||(n={});let r=bd.render(o,e,n),a=n.type||"image/png",s=n.rendererOpts||{};return r.toDataURL(a,s.quality)}});var y4=et(w4=>{"use strict";var S_=um();function x4(t,o){let e=t.a/255,i=o+'="'+t.hex+'"';return e<1?i+" "+o+'-opacity="'+e.toFixed(2).slice(1)+'"':i}function pm(t,o,e){let i=t+o;return typeof e<"u"&&(i+=" "+e),i}function C_(t,o,e){let i="",n=0,r=!1,a=0;for(let s=0;s<t.length;s++){let l=Math.floor(s%o),d=Math.floor(s/o);!l&&!r&&(r=!0),t[s]?(a++,s>0&&l>0&&t[s-1]||(i+=r?pm("M",l+e,.5+d+e):pm("m",n,0),n=0,r=!1),l+1<o&&t[s+1]||(i+=pm("h",a),a=0)):n++}return i}w4.render=function(o,e,i){let n=S_.getOptions(e),r=o.modules.size,a=o.modules.data,s=r+n.margin*2,l=n.color.light.a?"<path "+x4(n.color.light,"fill")+' d="M0 0h'+s+"v"+s+'H0z"/>':"",d="<path "+x4(n.color.dark,"stroke")+' d="'+C_(a,r,n.margin)+'"/>',c='viewBox="0 0 '+s+" "+s+'"',m='<svg xmlns="http://www.w3.org/2000/svg" '+(n.width?'width="'+n.width+'" height="'+n.width+'" ':"")+c+' shape-rendering="crispEdges">'+l+d+`</svg>
26
- `;return typeof i=="function"&&i(null,m),m}});var C4=et(Va=>{"use strict";var M_=_w(),fm=g4(),S4=v4(),__=y4();function gm(t,o,e,i,n){let r=[].slice.call(arguments,1),a=r.length,s=typeof r[a-1]=="function";if(!s&&!M_())throw new Error("Callback required as last argument");if(s){if(a<2)throw new Error("Too few arguments provided");a===2?(n=e,e=o,o=i=void 0):a===3&&(o.getContext&&typeof n>"u"?(n=i,i=void 0):(n=i,i=e,e=o,o=void 0))}else{if(a<1)throw new Error("Too few arguments provided");return a===1?(e=o,o=i=void 0):a===2&&!o.getContext&&(i=e,e=o,o=void 0),new Promise(function(l,d){try{let c=fm.create(e,i);l(t(c,o,i))}catch(c){d(c)}})}try{let l=fm.create(e,i);n(null,t(l,o,i))}catch(l){n(l)}}Va.create=fm.create;Va.toCanvas=gm.bind(null,S4.render);Va.toDataURL=gm.bind(null,S4.renderToDataURL);Va.toString=gm.bind(null,function(t,o,e){return __.render(t,e)})});var c1="codeChartaVersion",d1=(()=>{class t{constructor(){this.localStorageRepo=E(yp)}readSavedVersion(){return this.localStorageRepo.read(c1)}writeSavedVersion(e){this.localStorageRepo.write(c1,e)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=O({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var h1=(()=>{class t{constructor(){this.versionRepo=E(d1),this.currentVersion=wp.version,this.previousVersion=ke(null),this.shouldShowChangelog=ke(!1)}getSavedVersion(){return this.versionRepo.readSavedVersion()}saveCurrentVersion(){this.versionRepo.writeSavedVersion(this.currentVersion)}setPreviousVersion(e){this.previousVersion.set(e)}setShouldShowChangelog(e){this.shouldShowChangelog.set(e)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=O({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var pl=(()=>{class t{constructor(e){this.versionStore=e}get currentVersion(){return this.versionStore.currentVersion}get previousVersion(){return this.versionStore.previousVersion}get shouldShowChangelog(){return this.versionStore.shouldShowChangelog}synchronizeVersion(){let e=this.versionStore.getSavedVersion();if(e===null){this.versionStore.saveCurrentVersion();return}this.compareVersion(e,this.currentVersion)<0&&(this.versionStore.setPreviousVersion(e),this.versionStore.setShouldShowChangelog(!0),this.versionStore.saveCurrentVersion())}acknowledgeChangelog(){this.versionStore.setShouldShowChangelog(!1)}compareVersion(e,i){let n=this.parseSemver(e),r=this.parseSemver(i);return n.major!==r.major?n.major>r.major?1:-1:n.minor!==r.minor?n.minor>r.minor?1:-1:n.patch!==r.patch?n.patch>r.patch?1:-1:0}parseSemver(e){let i=e.split(".");return{major:Number.parseInt(i[0])||0,minor:Number.parseInt(i[1])||0,patch:Number.parseInt(i[2])||0}}static{this.\u0275fac=function(i){return new(i||t)(M(h1))}}static{this.\u0275prov=O({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function Jd(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Qo=Jd();function x1(t){Qo=t}var Xo={exec:()=>null};function $e(t,o=""){let e=typeof t=="string"?t:t.source,i={replace:(n,r)=>{let a=typeof r=="string"?r:r.source;return a=a.replace(It.caret,"$1"),e=e.replace(n,a),i},getRegex:()=>new RegExp(e,o)};return i}var y5=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),It={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}>`)},S5=/^(?:[ \t]*(?:\n|$))+/,C5=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,M5=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Zr=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,_5=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,eh=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,w1=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,y1=$e(w1).replace(/bull/g,eh).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),E5=$e(w1).replace(/bull/g,eh).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),th=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,k5=/^[^\n]+/,ih=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,q5=$e(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",ih).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),T5=$e(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,eh).getRegex(),xl="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",oh=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,R5=$e("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",oh).replace("tag",xl).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),S1=$e(th).replace("hr",Zr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",xl).getRegex(),A5=$e(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",S1).getRegex(),nh={blockquote:A5,code:C5,def:q5,fences:M5,heading:_5,hr:Zr,html:R5,lheading:y1,list:T5,newline:S5,paragraph:S1,table:Xo,text:k5},m1=$e("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Zr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",xl).getRegex(),I5=Te(ae({},nh),{lheading:E5,table:m1,paragraph:$e(th).replace("hr",Zr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",m1).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",xl).getRegex()}),F5=Te(ae({},nh),{html:$e(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",oh).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Xo,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:$e(th).replace("hr",Zr).replace("heading",` *#{1,6} *[^
27
- ]`).replace("lheading",y1).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()}),L5=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,D5=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,C1=/^( {2,}|\\)\n(?!\s*$)/,P5=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,fr=/[\p{P}\p{S}]/u,wl=/[\s\p{P}\p{S}]/u,rh=/[^\s\p{P}\p{S}]/u,N5=$e(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,wl).getRegex(),M1=/(?!~)[\p{P}\p{S}]/u,V5=/(?!~)[\s\p{P}\p{S}]/u,B5=/(?:[^\s\p{P}\p{S}]|~)/u,W5=$e(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",y5?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),_1=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,O5=$e(_1,"u").replace(/punct/g,fr).getRegex(),z5=$e(_1,"u").replace(/punct/g,M1).getRegex(),E1="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",$5=$e(E1,"gu").replace(/notPunctSpace/g,rh).replace(/punctSpace/g,wl).replace(/punct/g,fr).getRegex(),j5=$e(E1,"gu").replace(/notPunctSpace/g,B5).replace(/punctSpace/g,V5).replace(/punct/g,M1).getRegex(),H5=$e("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,rh).replace(/punctSpace/g,wl).replace(/punct/g,fr).getRegex(),U5=$e(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,fr).getRegex(),G5="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",X5=$e(G5,"gu").replace(/notPunctSpace/g,rh).replace(/punctSpace/g,wl).replace(/punct/g,fr).getRegex(),K5=$e(/\\(punct)/,"gu").replace(/punct/g,fr).getRegex(),Q5=$e(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Y5=$e(oh).replace("(?:-->|$)","-->").getRegex(),Z5=$e("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Y5).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),gl=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,J5=$e(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",gl).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),k1=$e(/^!?\[(label)\]\[(ref)\]/).replace("label",gl).replace("ref",ih).getRegex(),q1=$e(/^!?\[(ref)\](?:\[\])?/).replace("ref",ih).getRegex(),ey=$e("reflink|nolink(?!\\()","g").replace("reflink",k1).replace("nolink",q1).getRegex(),p1=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,ah={_backpedal:Xo,anyPunctuation:K5,autolink:Q5,blockSkip:W5,br:C1,code:D5,del:Xo,delLDelim:Xo,delRDelim:Xo,emStrongLDelim:O5,emStrongRDelimAst:$5,emStrongRDelimUnd:H5,escape:L5,link:J5,nolink:q1,punctuation:N5,reflink:k1,reflinkSearch:ey,tag:Z5,text:P5,url:Xo},ty=Te(ae({},ah),{link:$e(/^!?\[(label)\]\((.*?)\)/).replace("label",gl).getRegex(),reflink:$e(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",gl).getRegex()}),Qd=Te(ae({},ah),{emStrongRDelimAst:j5,emStrongLDelim:z5,delLDelim:U5,delRDelim:X5,url:$e(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",p1).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:$e(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",p1).getRegex()}),iy=Te(ae({},Qd),{br:$e(C1).replace("{2,}","*").getRegex(),text:$e(Qd.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),fl={normal:nh,gfm:I5,pedantic:F5},Kr={normal:ah,gfm:Qd,breaks:iy,pedantic:ty},oy={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},f1=t=>oy[t];function Oi(t,o){if(o){if(It.escapeTest.test(t))return t.replace(It.escapeReplace,f1)}else if(It.escapeTestNoEncode.test(t))return t.replace(It.escapeReplaceNoEncode,f1);return t}function g1(t){try{t=encodeURI(t).replace(It.percentDecode,"%")}catch{return null}return t}function b1(t,o){let e=t.replace(It.findPipe,(r,a,s)=>{let l=!1,d=a;for(;--d>=0&&s[d]==="\\";)l=!l;return l?"|":" |"}),i=e.split(It.splitPipe),n=0;if(i[0].trim()||i.shift(),i.length>0&&!i.at(-1)?.trim()&&i.pop(),o)if(i.length>o)i.splice(o);else for(;i.length<o;)i.push("");for(;n<i.length;n++)i[n]=i[n].trim().replace(It.slashPipe,"|");return i}function Qr(t,o,e){let i=t.length;if(i===0)return"";let n=0;for(;n<i;){let r=t.charAt(i-n-1);if(r===o&&!e)n++;else if(r!==o&&e)n++;else break}return t.slice(0,i-n)}function ny(t,o){if(t.indexOf(o[1])===-1)return-1;let e=0;for(let i=0;i<t.length;i++)if(t[i]==="\\")i++;else if(t[i]===o[0])e++;else if(t[i]===o[1]&&(e--,e<0))return i;return e>0?-2:-1}function ry(t,o=0){let e=o,i="";for(let n of t)if(n===" "){let r=4-e%4;i+=" ".repeat(r),e+=r}else i+=n,e++;return i}function v1(t,o,e,i,n){let r=o.href,a=o.title||null,s=t[1].replace(n.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:t[0].charAt(0)==="!"?"image":"link",raw:e,href:r,title:a,text:s,tokens:i.inlineTokens(s)};return i.state.inLink=!1,l}function ay(t,o,e){let i=t.match(e.other.indentCodeCompensation);if(i===null)return o;let n=i[1];return o.split(`
28
- `).map(r=>{let a=r.match(e.other.beginningSpace);if(a===null)return r;let[s]=a;return s.length>=n.length?r.slice(n.length):r}).join(`
29
- `)}var bl=class{options;rules;lexer;constructor(t){this.options=t||Qo}space(t){let o=this.rules.block.newline.exec(t);if(o&&o[0].length>0)return{type:"space",raw:o[0]}}code(t){let o=this.rules.block.code.exec(t);if(o){let e=o[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:o[0],codeBlockStyle:"indented",text:this.options.pedantic?e:Qr(e,`
30
- `)}}}fences(t){let o=this.rules.block.fences.exec(t);if(o){let e=o[0],i=ay(e,o[3]||"",this.rules);return{type:"code",raw:e,lang:o[2]?o[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):o[2],text:i}}}heading(t){let o=this.rules.block.heading.exec(t);if(o){let e=o[2].trim();if(this.rules.other.endingHash.test(e)){let i=Qr(e,"#");(this.options.pedantic||!i||this.rules.other.endingSpaceChar.test(i))&&(e=i.trim())}return{type:"heading",raw:o[0],depth:o[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(t){let o=this.rules.block.hr.exec(t);if(o)return{type:"hr",raw:Qr(o[0],`
31
- `)}}blockquote(t){let o=this.rules.block.blockquote.exec(t);if(o){let e=Qr(o[0],`
25
+ `);let a=m_(o,t,n),s=fd.getSymbolSize(o),l=new i_(s);return l_(l,o),c_(l),d_(l,o),lm(l,t,0),o>=7&&h_(l,o),u_(l,a),isNaN(i)&&(i=cm.getBestMask(l,lm.bind(null,l,t))),cm.applyMask(i,l),lm(l,t,i),{modules:l,version:o,errorCorrectionLevel:t,maskPattern:i,segments:n}}p4.create=function(o,t){if(typeof o>"u"||o==="")throw new Error("No input text");let i=am.M,n,r;return typeof t<"u"&&(i=am.from(t.errorCorrectionLevel,am.M),n=pd.from(t.version),r=cm.from(t.maskPattern),t.toSJISFunc&&fd.setToSJISFunction(t.toSJISFunc)),f_(o,n,i,r)}});var hm=et(Sn=>{"use strict";function g4(e){if(typeof e=="number"&&(e=e.toString()),typeof e!="string")throw new Error("Color should be defined as hex string");let o=e.slice().replace("#","").split("");if(o.length<3||o.length===5||o.length>8)throw new Error("Invalid hex color: "+e);(o.length===3||o.length===4)&&(o=Array.prototype.concat.apply([],o.map(function(i){return[i,i]}))),o.length===6&&o.push("F","F");let t=parseInt(o.join(""),16);return{r:t>>24&255,g:t>>16&255,b:t>>8&255,a:t&255,hex:"#"+o.slice(0,6).join("")}}Sn.getOptions=function(o){o||(o={}),o.color||(o.color={});let t=typeof o.margin>"u"||o.margin===null||o.margin<0?4:o.margin,i=o.width&&o.width>=21?o.width:void 0,n=o.scale||4;return{width:i,scale:i?4:n,margin:t,color:{dark:g4(o.color.dark||"#000000ff"),light:g4(o.color.light||"#ffffffff")},type:o.type,rendererOpts:o.rendererOpts||{}}};Sn.getScale=function(o,t){return t.width&&t.width>=o+t.margin*2?t.width/(o+t.margin*2):t.scale};Sn.getImageWidth=function(o,t){let i=Sn.getScale(o,t);return Math.floor((o+t.margin*2)*i)};Sn.qrToImageData=function(o,t,i){let n=t.modules.size,r=t.modules.data,a=Sn.getScale(n,i),s=Math.floor((n+i.margin*2)*a),l=i.margin*a,d=[i.color.light,i.color.dark];for(let c=0;c<s;c++)for(let u=0;u<s;u++){let m=(c*s+u)*4,g=i.color.light;if(c>=l&&u>=l&&c<s-l&&u<s-l){let b=Math.floor((c-l)/a),y=Math.floor((u-l)/a);g=d[r[b*n+y]?1:0]}o[m++]=g.r,o[m++]=g.g,o[m++]=g.b,o[m]=g.a}}});var b4=et(gd=>{"use strict";var um=hm();function g_(e,o,t){e.clearRect(0,0,o.width,o.height),o.style||(o.style={}),o.height=t,o.width=t,o.style.height=t+"px",o.style.width=t+"px"}function b_(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}gd.render=function(o,t,i){let n=i,r=t;typeof n>"u"&&(!t||!t.getContext)&&(n=t,t=void 0),t||(r=b_()),n=um.getOptions(n);let a=um.getImageWidth(o.modules.size,n),s=r.getContext("2d"),l=s.createImageData(a,a);return um.qrToImageData(l.data,o,n),g_(s,r,a),s.putImageData(l,0,0),r};gd.renderToDataURL=function(o,t,i){let n=i;typeof n>"u"&&(!t||!t.getContext)&&(n=t,t=void 0),n||(n={});let r=gd.render(o,t,n),a=n.type||"image/png",s=n.rendererOpts||{};return r.toDataURL(a,s.quality)}});var w4=et(x4=>{"use strict";var v_=hm();function v4(e,o){let t=e.a/255,i=o+'="'+e.hex+'"';return t<1?i+" "+o+'-opacity="'+t.toFixed(2).slice(1)+'"':i}function mm(e,o,t){let i=e+o;return typeof t<"u"&&(i+=" "+t),i}function x_(e,o,t){let i="",n=0,r=!1,a=0;for(let s=0;s<e.length;s++){let l=Math.floor(s%o),d=Math.floor(s/o);!l&&!r&&(r=!0),e[s]?(a++,s>0&&l>0&&e[s-1]||(i+=r?mm("M",l+t,.5+d+t):mm("m",n,0),n=0,r=!1),l+1<o&&e[s+1]||(i+=mm("h",a),a=0)):n++}return i}x4.render=function(o,t,i){let n=v_.getOptions(t),r=o.modules.size,a=o.modules.data,s=r+n.margin*2,l=n.color.light.a?"<path "+v4(n.color.light,"fill")+' d="M0 0h'+s+"v"+s+'H0z"/>':"",d="<path "+v4(n.color.dark,"stroke")+' d="'+x_(a,r,n.margin)+'"/>',c='viewBox="0 0 '+s+" "+s+'"',m='<svg xmlns="http://www.w3.org/2000/svg" '+(n.width?'width="'+n.width+'" height="'+n.width+'" ':"")+c+' shape-rendering="crispEdges">'+l+d+`</svg>
26
+ `;return typeof i=="function"&&i(null,m),m}});var S4=et(Na=>{"use strict";var w_=Mw(),pm=f4(),y4=b4(),y_=w4();function fm(e,o,t,i,n){let r=[].slice.call(arguments,1),a=r.length,s=typeof r[a-1]=="function";if(!s&&!w_())throw new Error("Callback required as last argument");if(s){if(a<2)throw new Error("Too few arguments provided");a===2?(n=t,t=o,o=i=void 0):a===3&&(o.getContext&&typeof n>"u"?(n=i,i=void 0):(n=i,i=t,t=o,o=void 0))}else{if(a<1)throw new Error("Too few arguments provided");return a===1?(t=o,o=i=void 0):a===2&&!o.getContext&&(i=t,t=o,o=void 0),new Promise(function(l,d){try{let c=pm.create(t,i);l(e(c,o,i))}catch(c){d(c)}})}try{let l=pm.create(t,i);n(null,e(l,o,i))}catch(l){n(l)}}Na.create=pm.create;Na.toCanvas=fm.bind(null,y4.render);Na.toDataURL=fm.bind(null,y4.renderToDataURL);Na.toString=fm.bind(null,function(e,o,t){return y_.render(e,t)})});var l1="codeChartaVersion",c1=(()=>{class e{constructor(){this.localStorageRepo=E(wp)}readSavedVersion(){return this.localStorageRepo.read(l1)}writeSavedVersion(t){this.localStorageRepo.write(l1,t)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=O({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var d1=(()=>{class e{constructor(){this.versionRepo=E(c1),this.currentVersion=xp.version,this.previousVersion=ke(null),this.shouldShowChangelog=ke(!1)}getSavedVersion(){return this.versionRepo.readSavedVersion()}saveCurrentVersion(){this.versionRepo.writeSavedVersion(this.currentVersion)}setPreviousVersion(t){this.previousVersion.set(t)}setShouldShowChangelog(t){this.shouldShowChangelog.set(t)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=O({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var ml=(()=>{class e{constructor(t){this.versionStore=t}get currentVersion(){return this.versionStore.currentVersion}get previousVersion(){return this.versionStore.previousVersion}get shouldShowChangelog(){return this.versionStore.shouldShowChangelog}synchronizeVersion(){let t=this.versionStore.getSavedVersion();if(t===null){this.versionStore.saveCurrentVersion();return}this.compareVersion(t,this.currentVersion)<0&&(this.versionStore.setPreviousVersion(t),this.versionStore.setShouldShowChangelog(!0),this.versionStore.saveCurrentVersion())}acknowledgeChangelog(){this.versionStore.setShouldShowChangelog(!1)}compareVersion(t,i){let n=this.parseSemver(t),r=this.parseSemver(i);return n.major!==r.major?n.major>r.major?1:-1:n.minor!==r.minor?n.minor>r.minor?1:-1:n.patch!==r.patch?n.patch>r.patch?1:-1:0}parseSemver(t){let i=t.split(".");return{major:Number.parseInt(i[0])||0,minor:Number.parseInt(i[1])||0,patch:Number.parseInt(i[2])||0}}static{this.\u0275fac=function(i){return new(i||e)(M(d1))}}static{this.\u0275prov=O({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function Zd(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Qo=Zd();function v1(e){Qo=e}var Xo={exec:()=>null};function $e(e,o=""){let t=typeof e=="string"?e:e.source,i={replace:(n,r)=>{let a=typeof r=="string"?r:r.source;return a=a.replace(It.caret,"$1"),t=t.replace(n,a),i},getRegex:()=>new RegExp(t,o)};return i}var x5=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),It={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}>`)},w5=/^(?:[ \t]*(?:\n|$))+/,y5=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,S5=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Yr=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,C5=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Jd=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,x1=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,w1=$e(x1).replace(/bull/g,Jd).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),M5=$e(x1).replace(/bull/g,Jd).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),eh=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,_5=/^[^\n]+/,th=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,E5=$e(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",th).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),k5=$e(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Jd).getRegex(),vl="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",ih=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,q5=$e("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",ih).replace("tag",vl).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),y1=$e(eh).replace("hr",Yr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",vl).getRegex(),T5=$e(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",y1).getRegex(),oh={blockquote:T5,code:y5,def:E5,fences:S5,heading:C5,hr:Yr,html:q5,lheading:w1,list:k5,newline:w5,paragraph:y1,table:Xo,text:_5},u1=$e("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Yr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",vl).getRegex(),R5=Te(ae({},oh),{lheading:M5,table:u1,paragraph:$e(eh).replace("hr",Yr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",u1).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",vl).getRegex()}),A5=Te(ae({},oh),{html:$e(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ih).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Xo,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:$e(eh).replace("hr",Yr).replace("heading",` *#{1,6} *[^
27
+ ]`).replace("lheading",w1).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()}),I5=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,F5=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,S1=/^( {2,}|\\)\n(?!\s*$)/,L5=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,pr=/[\p{P}\p{S}]/u,xl=/[\s\p{P}\p{S}]/u,nh=/[^\s\p{P}\p{S}]/u,D5=$e(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,xl).getRegex(),C1=/(?!~)[\p{P}\p{S}]/u,P5=/(?!~)[\s\p{P}\p{S}]/u,N5=/(?:[^\s\p{P}\p{S}]|~)/u,V5=$e(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",x5?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),M1=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,B5=$e(M1,"u").replace(/punct/g,pr).getRegex(),W5=$e(M1,"u").replace(/punct/g,C1).getRegex(),_1="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",O5=$e(_1,"gu").replace(/notPunctSpace/g,nh).replace(/punctSpace/g,xl).replace(/punct/g,pr).getRegex(),z5=$e(_1,"gu").replace(/notPunctSpace/g,N5).replace(/punctSpace/g,P5).replace(/punct/g,C1).getRegex(),$5=$e("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,nh).replace(/punctSpace/g,xl).replace(/punct/g,pr).getRegex(),j5=$e(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,pr).getRegex(),H5="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",U5=$e(H5,"gu").replace(/notPunctSpace/g,nh).replace(/punctSpace/g,xl).replace(/punct/g,pr).getRegex(),G5=$e(/\\(punct)/,"gu").replace(/punct/g,pr).getRegex(),X5=$e(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),K5=$e(ih).replace("(?:-->|$)","-->").getRegex(),Q5=$e("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",K5).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),fl=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,Y5=$e(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",fl).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),E1=$e(/^!?\[(label)\]\[(ref)\]/).replace("label",fl).replace("ref",th).getRegex(),k1=$e(/^!?\[(ref)\](?:\[\])?/).replace("ref",th).getRegex(),Z5=$e("reflink|nolink(?!\\()","g").replace("reflink",E1).replace("nolink",k1).getRegex(),m1=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,rh={_backpedal:Xo,anyPunctuation:G5,autolink:X5,blockSkip:V5,br:S1,code:F5,del:Xo,delLDelim:Xo,delRDelim:Xo,emStrongLDelim:B5,emStrongRDelimAst:O5,emStrongRDelimUnd:$5,escape:I5,link:Y5,nolink:k1,punctuation:D5,reflink:E1,reflinkSearch:Z5,tag:Q5,text:L5,url:Xo},J5=Te(ae({},rh),{link:$e(/^!?\[(label)\]\((.*?)\)/).replace("label",fl).getRegex(),reflink:$e(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",fl).getRegex()}),Kd=Te(ae({},rh),{emStrongRDelimAst:z5,emStrongLDelim:W5,delLDelim:j5,delRDelim:U5,url:$e(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",m1).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:$e(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",m1).getRegex()}),ey=Te(ae({},Kd),{br:$e(S1).replace("{2,}","*").getRegex(),text:$e(Kd.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),pl={normal:oh,gfm:R5,pedantic:A5},Xr={normal:rh,gfm:Kd,breaks:ey,pedantic:J5},ty={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},p1=e=>ty[e];function Oi(e,o){if(o){if(It.escapeTest.test(e))return e.replace(It.escapeReplace,p1)}else if(It.escapeTestNoEncode.test(e))return e.replace(It.escapeReplaceNoEncode,p1);return e}function f1(e){try{e=encodeURI(e).replace(It.percentDecode,"%")}catch{return null}return e}function g1(e,o){let t=e.replace(It.findPipe,(r,a,s)=>{let l=!1,d=a;for(;--d>=0&&s[d]==="\\";)l=!l;return l?"|":" |"}),i=t.split(It.splitPipe),n=0;if(i[0].trim()||i.shift(),i.length>0&&!i.at(-1)?.trim()&&i.pop(),o)if(i.length>o)i.splice(o);else for(;i.length<o;)i.push("");for(;n<i.length;n++)i[n]=i[n].trim().replace(It.slashPipe,"|");return i}function Kr(e,o,t){let i=e.length;if(i===0)return"";let n=0;for(;n<i;){let r=e.charAt(i-n-1);if(r===o&&!t)n++;else if(r!==o&&t)n++;else break}return e.slice(0,i-n)}function iy(e,o){if(e.indexOf(o[1])===-1)return-1;let t=0;for(let i=0;i<e.length;i++)if(e[i]==="\\")i++;else if(e[i]===o[0])t++;else if(e[i]===o[1]&&(t--,t<0))return i;return t>0?-2:-1}function oy(e,o=0){let t=o,i="";for(let n of e)if(n===" "){let r=4-t%4;i+=" ".repeat(r),t+=r}else i+=n,t++;return i}function b1(e,o,t,i,n){let r=o.href,a=o.title||null,s=e[1].replace(n.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:t,href:r,title:a,text:s,tokens:i.inlineTokens(s)};return i.state.inLink=!1,l}function ny(e,o,t){let i=e.match(t.other.indentCodeCompensation);if(i===null)return o;let n=i[1];return o.split(`
28
+ `).map(r=>{let a=r.match(t.other.beginningSpace);if(a===null)return r;let[s]=a;return s.length>=n.length?r.slice(n.length):r}).join(`
29
+ `)}var gl=class{options;rules;lexer;constructor(e){this.options=e||Qo}space(e){let o=this.rules.block.newline.exec(e);if(o&&o[0].length>0)return{type:"space",raw:o[0]}}code(e){let o=this.rules.block.code.exec(e);if(o){let t=o[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:o[0],codeBlockStyle:"indented",text:this.options.pedantic?t:Kr(t,`
30
+ `)}}}fences(e){let o=this.rules.block.fences.exec(e);if(o){let t=o[0],i=ny(t,o[3]||"",this.rules);return{type:"code",raw:t,lang:o[2]?o[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):o[2],text:i}}}heading(e){let o=this.rules.block.heading.exec(e);if(o){let t=o[2].trim();if(this.rules.other.endingHash.test(t)){let i=Kr(t,"#");(this.options.pedantic||!i||this.rules.other.endingSpaceChar.test(i))&&(t=i.trim())}return{type:"heading",raw:o[0],depth:o[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(e){let o=this.rules.block.hr.exec(e);if(o)return{type:"hr",raw:Kr(o[0],`
31
+ `)}}blockquote(e){let o=this.rules.block.blockquote.exec(e);if(o){let t=Kr(o[0],`
32
32
  `).split(`
33
- `),i="",n="",r=[];for(;e.length>0;){let a=!1,s=[],l;for(l=0;l<e.length;l++)if(this.rules.other.blockquoteStart.test(e[l]))s.push(e[l]),a=!0;else if(!a)s.push(e[l]);else break;e=e.slice(l);let d=s.join(`
33
+ `),i="",n="",r=[];for(;t.length>0;){let a=!1,s=[],l;for(l=0;l<t.length;l++)if(this.rules.other.blockquoteStart.test(t[l]))s.push(t[l]),a=!0;else if(!a)s.push(t[l]);else break;t=t.slice(l);let d=s.join(`
34
34
  `),c=d.replace(this.rules.other.blockquoteSetextReplace,`
35
35
  $1`).replace(this.rules.other.blockquoteSetextReplace2,"");i=i?`${i}
36
36
  ${d}`:d,n=n?`${n}
37
- ${c}`:c;let u=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,r,!0),this.lexer.state.top=u,e.length===0)break;let m=r.at(-1);if(m?.type==="code")break;if(m?.type==="blockquote"){let g=m,b=g.raw+`
38
- `+e.join(`
37
+ ${c}`:c;let u=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,r,!0),this.lexer.state.top=u,t.length===0)break;let m=r.at(-1);if(m?.type==="code")break;if(m?.type==="blockquote"){let g=m,b=g.raw+`
38
+ `+t.join(`
39
39
  `),y=this.blockquote(b);r[r.length-1]=y,i=i.substring(0,i.length-g.raw.length)+y.raw,n=n.substring(0,n.length-g.text.length)+y.text;break}else if(m?.type==="list"){let g=m,b=g.raw+`
40
- `+e.join(`
41
- `),y=this.list(b);r[r.length-1]=y,i=i.substring(0,i.length-m.raw.length)+y.raw,n=n.substring(0,n.length-g.raw.length)+y.raw,e=b.substring(r.at(-1).raw.length).split(`
42
- `);continue}}return{type:"blockquote",raw:i,tokens:r,text:n}}}list(t){let o=this.rules.block.list.exec(t);if(o){let e=o[1].trim(),i=e.length>1,n={type:"list",raw:"",ordered:i,start:i?+e.slice(0,-1):"",loose:!1,items:[]};e=i?`\\d{1,9}\\${e.slice(-1)}`:`\\${e}`,this.options.pedantic&&(e=i?e:"[*+-]");let r=this.rules.other.listItemRegex(e),a=!1;for(;t;){let l=!1,d="",c="";if(!(o=r.exec(t))||this.rules.block.hr.test(t))break;d=o[0],t=t.substring(d.length);let u=ry(o[2].split(`
43
- `,1)[0],o[1].length),m=t.split(`
40
+ `+t.join(`
41
+ `),y=this.list(b);r[r.length-1]=y,i=i.substring(0,i.length-m.raw.length)+y.raw,n=n.substring(0,n.length-g.raw.length)+y.raw,t=b.substring(r.at(-1).raw.length).split(`
42
+ `);continue}}return{type:"blockquote",raw:i,tokens:r,text:n}}}list(e){let o=this.rules.block.list.exec(e);if(o){let t=o[1].trim(),i=t.length>1,n={type:"list",raw:"",ordered:i,start:i?+t.slice(0,-1):"",loose:!1,items:[]};t=i?`\\d{1,9}\\${t.slice(-1)}`:`\\${t}`,this.options.pedantic&&(t=i?t:"[*+-]");let r=this.rules.other.listItemRegex(t),a=!1;for(;e;){let l=!1,d="",c="";if(!(o=r.exec(e))||this.rules.block.hr.test(e))break;d=o[0],e=e.substring(d.length);let u=oy(o[2].split(`
43
+ `,1)[0],o[1].length),m=e.split(`
44
44
  `,1)[0],g=!u.trim(),b=0;if(this.options.pedantic?(b=2,c=u.trimStart()):g?b=o[1].length+1:(b=u.search(this.rules.other.nonSpaceChar),b=b>4?1:b,c=u.slice(b),b+=o[1].length),g&&this.rules.other.blankLine.test(m)&&(d+=m+`
45
- `,t=t.substring(m.length+1),l=!0),!l){let y=this.rules.other.nextBulletRegex(b),q=this.rules.other.hrRegex(b),D=this.rules.other.fencesBeginRegex(b),j=this.rules.other.headingBeginRegex(b),k=this.rules.other.htmlBeginRegex(b),N=this.rules.other.blockquoteBeginRegex(b);for(;t;){let z=t.split(`
45
+ `,e=e.substring(m.length+1),l=!0),!l){let y=this.rules.other.nextBulletRegex(b),q=this.rules.other.hrRegex(b),D=this.rules.other.fencesBeginRegex(b),j=this.rules.other.headingBeginRegex(b),k=this.rules.other.htmlBeginRegex(b),N=this.rules.other.blockquoteBeginRegex(b);for(;e;){let z=e.split(`
46
46
  `,1)[0],H;if(m=z,this.options.pedantic?(m=m.replace(this.rules.other.listReplaceNesting," "),H=m):H=m.replace(this.rules.other.tabCharGlobal," "),D.test(m)||j.test(m)||k.test(m)||N.test(m)||y.test(m)||q.test(m))break;if(H.search(this.rules.other.nonSpaceChar)>=b||!m.trim())c+=`
47
47
  `+H.slice(b);else{if(g||u.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||D.test(u)||j.test(u)||q.test(u))break;c+=`
48
48
  `+m}g=!m.trim(),d+=z+`
49
- `,t=t.substring(z.length+1),u=H.slice(b)}}n.loose||(a?n.loose=!0:this.rules.other.doubleBlankLine.test(d)&&(a=!0)),n.items.push({type:"list_item",raw:d,task:!!this.options.gfm&&this.rules.other.listIsTask.test(c),loose:!1,text:c,tokens:[]}),n.raw+=d}let s=n.items.at(-1);if(s)s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd();else return;n.raw=n.raw.trimEnd();for(let l of n.items){if(this.lexer.state.top=!1,l.tokens=this.lexer.blockTokens(l.text,[]),l.task){if(l.text=l.text.replace(this.rules.other.listReplaceTask,""),l.tokens[0]?.type==="text"||l.tokens[0]?.type==="paragraph"){l.tokens[0].raw=l.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),l.tokens[0].text=l.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let c=this.lexer.inlineQueue.length-1;c>=0;c--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[c].src)){this.lexer.inlineQueue[c].src=this.lexer.inlineQueue[c].src.replace(this.rules.other.listReplaceTask,"");break}}let d=this.rules.other.listTaskCheckbox.exec(l.raw);if(d){let c={type:"checkbox",raw:d[0]+" ",checked:d[0]!=="[ ]"};l.checked=c.checked,n.loose?l.tokens[0]&&["paragraph","text"].includes(l.tokens[0].type)&&"tokens"in l.tokens[0]&&l.tokens[0].tokens?(l.tokens[0].raw=c.raw+l.tokens[0].raw,l.tokens[0].text=c.raw+l.tokens[0].text,l.tokens[0].tokens.unshift(c)):l.tokens.unshift({type:"paragraph",raw:c.raw,text:c.raw,tokens:[c]}):l.tokens.unshift(c)}}if(!n.loose){let d=l.tokens.filter(u=>u.type==="space"),c=d.length>0&&d.some(u=>this.rules.other.anyLine.test(u.raw));n.loose=c}}if(n.loose)for(let l of n.items){l.loose=!0;for(let d of l.tokens)d.type==="text"&&(d.type="paragraph")}return n}}html(t){let o=this.rules.block.html.exec(t);if(o)return{type:"html",block:!0,raw:o[0],pre:o[1]==="pre"||o[1]==="script"||o[1]==="style",text:o[0]}}def(t){let o=this.rules.block.def.exec(t);if(o){let e=o[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),i=o[2]?o[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",n=o[3]?o[3].substring(1,o[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):o[3];return{type:"def",tag:e,raw:o[0],href:i,title:n}}}table(t){let o=this.rules.block.table.exec(t);if(!o||!this.rules.other.tableDelimiter.test(o[2]))return;let e=b1(o[1]),i=o[2].replace(this.rules.other.tableAlignChars,"").split("|"),n=o[3]?.trim()?o[3].replace(this.rules.other.tableRowBlankLine,"").split(`
50
- `):[],r={type:"table",raw:o[0],header:[],align:[],rows:[]};if(e.length===i.length){for(let a of i)this.rules.other.tableAlignRight.test(a)?r.align.push("right"):this.rules.other.tableAlignCenter.test(a)?r.align.push("center"):this.rules.other.tableAlignLeft.test(a)?r.align.push("left"):r.align.push(null);for(let a=0;a<e.length;a++)r.header.push({text:e[a],tokens:this.lexer.inline(e[a]),header:!0,align:r.align[a]});for(let a of n)r.rows.push(b1(a,r.header.length).map((s,l)=>({text:s,tokens:this.lexer.inline(s),header:!1,align:r.align[l]})));return r}}lheading(t){let o=this.rules.block.lheading.exec(t);if(o){let e=o[1].trim();return{type:"heading",raw:o[0],depth:o[2].charAt(0)==="="?1:2,text:e,tokens:this.lexer.inline(e)}}}paragraph(t){let o=this.rules.block.paragraph.exec(t);if(o){let e=o[1].charAt(o[1].length-1)===`
51
- `?o[1].slice(0,-1):o[1];return{type:"paragraph",raw:o[0],text:e,tokens:this.lexer.inline(e)}}}text(t){let o=this.rules.block.text.exec(t);if(o)return{type:"text",raw:o[0],text:o[0],tokens:this.lexer.inline(o[0])}}escape(t){let o=this.rules.inline.escape.exec(t);if(o)return{type:"escape",raw:o[0],text:o[1]}}tag(t){let o=this.rules.inline.tag.exec(t);if(o)return!this.lexer.state.inLink&&this.rules.other.startATag.test(o[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(o[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(o[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(o[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:o[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:o[0]}}link(t){let o=this.rules.inline.link.exec(t);if(o){let e=o[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;let r=Qr(e.slice(0,-1),"\\");if((e.length-r.length)%2===0)return}else{let r=ny(o[2],"()");if(r===-2)return;if(r>-1){let a=(o[0].indexOf("!")===0?5:4)+o[1].length+r;o[2]=o[2].substring(0,r),o[0]=o[0].substring(0,a).trim(),o[3]=""}}let i=o[2],n="";if(this.options.pedantic){let r=this.rules.other.pedanticHrefTitle.exec(i);r&&(i=r[1],n=r[3])}else n=o[3]?o[3].slice(1,-1):"";return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?i=i.slice(1):i=i.slice(1,-1)),v1(o,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:n&&n.replace(this.rules.inline.anyPunctuation,"$1")},o[0],this.lexer,this.rules)}}reflink(t,o){let e;if((e=this.rules.inline.reflink.exec(t))||(e=this.rules.inline.nolink.exec(t))){let i=(e[2]||e[1]).replace(this.rules.other.multipleSpaceGlobal," "),n=o[i.toLowerCase()];if(!n){let r=e[0].charAt(0);return{type:"text",raw:r,text:r}}return v1(e,n,e[0],this.lexer,this.rules)}}emStrong(t,o,e=""){let i=this.rules.inline.emStrongLDelim.exec(t);if(!(!i||!i[1]&&!i[2]&&!i[3]&&!i[4]||i[4]&&e.match(this.rules.other.unicodeAlphaNumeric))&&(!(i[1]||i[3])||!e||this.rules.inline.punctuation.exec(e))){let n=[...i[0]].length-1,r,a,s=n,l=0,d=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,o=o.slice(-1*t.length+n);(i=d.exec(o))!==null;){if(r=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!r)continue;if(a=[...r].length,i[3]||i[4]){s+=a;continue}else if((i[5]||i[6])&&n%3&&!((n+a)%3)){l+=a;continue}if(s-=a,s>0)continue;a=Math.min(a,a+s+l);let c=[...i[0]][0].length,u=t.slice(0,n+i.index+c+a);if(Math.min(n,a)%2){let g=u.slice(1,-1);return{type:"em",raw:u,text:g,tokens:this.lexer.inlineTokens(g)}}let m=u.slice(2,-2);return{type:"strong",raw:u,text:m,tokens:this.lexer.inlineTokens(m)}}}}codespan(t){let o=this.rules.inline.code.exec(t);if(o){let e=o[2].replace(this.rules.other.newLineCharGlobal," "),i=this.rules.other.nonSpaceChar.test(e),n=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return i&&n&&(e=e.substring(1,e.length-1)),{type:"codespan",raw:o[0],text:e}}}br(t){let o=this.rules.inline.br.exec(t);if(o)return{type:"br",raw:o[0]}}del(t,o,e=""){let i=this.rules.inline.delLDelim.exec(t);if(i&&(!i[1]||!e||this.rules.inline.punctuation.exec(e))){let n=[...i[0]].length-1,r,a,s=n,l=this.rules.inline.delRDelim;for(l.lastIndex=0,o=o.slice(-1*t.length+n);(i=l.exec(o))!==null;){if(r=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!r||(a=[...r].length,a!==n))continue;if(i[3]||i[4]){s+=a;continue}if(s-=a,s>0)continue;a=Math.min(a,a+s);let d=[...i[0]][0].length,c=t.slice(0,n+i.index+d+a),u=c.slice(n,-n);return{type:"del",raw:c,text:u,tokens:this.lexer.inlineTokens(u)}}}}autolink(t){let o=this.rules.inline.autolink.exec(t);if(o){let e,i;return o[2]==="@"?(e=o[1],i="mailto:"+e):(e=o[1],i=e),{type:"link",raw:o[0],text:e,href:i,tokens:[{type:"text",raw:e,text:e}]}}}url(t){let o;if(o=this.rules.inline.url.exec(t)){let e,i;if(o[2]==="@")e=o[0],i="mailto:"+e;else{let n;do n=o[0],o[0]=this.rules.inline._backpedal.exec(o[0])?.[0]??"";while(n!==o[0]);e=o[0],o[1]==="www."?i="http://"+o[0]:i=o[0]}return{type:"link",raw:o[0],text:e,href:i,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(t){let o=this.rules.inline.text.exec(t);if(o){let e=this.lexer.state.inRawBlock;return{type:"text",raw:o[0],text:o[0],escaped:e}}}},pi=class Yd{tokens;options;state;inlineQueue;tokenizer;constructor(o){this.tokens=[],this.tokens.links=Object.create(null),this.options=o||Qo,this.options.tokenizer=this.options.tokenizer||new bl,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let e={other:It,block:fl.normal,inline:Kr.normal};this.options.pedantic?(e.block=fl.pedantic,e.inline=Kr.pedantic):this.options.gfm&&(e.block=fl.gfm,this.options.breaks?e.inline=Kr.breaks:e.inline=Kr.gfm),this.tokenizer.rules=e}static get rules(){return{block:fl,inline:Kr}}static lex(o,e){return new Yd(e).lex(o)}static lexInline(o,e){return new Yd(e).inlineTokens(o)}lex(o){o=o.replace(It.carriageReturn,`
52
- `),this.blockTokens(o,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let i=this.inlineQueue[e];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(o,e=[],i=!1){for(this.tokenizer.lexer=this,this.options.pedantic&&(o=o.replace(It.tabCharGlobal," ").replace(It.spaceLine,""));o;){let n;if(this.options.extensions?.block?.some(a=>(n=a.call({lexer:this},o,e))?(o=o.substring(n.raw.length),e.push(n),!0):!1))continue;if(n=this.tokenizer.space(o)){o=o.substring(n.raw.length);let a=e.at(-1);n.raw.length===1&&a!==void 0?a.raw+=`
53
- `:e.push(n);continue}if(n=this.tokenizer.code(o)){o=o.substring(n.raw.length);let a=e.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
49
+ `,e=e.substring(z.length+1),u=H.slice(b)}}n.loose||(a?n.loose=!0:this.rules.other.doubleBlankLine.test(d)&&(a=!0)),n.items.push({type:"list_item",raw:d,task:!!this.options.gfm&&this.rules.other.listIsTask.test(c),loose:!1,text:c,tokens:[]}),n.raw+=d}let s=n.items.at(-1);if(s)s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd();else return;n.raw=n.raw.trimEnd();for(let l of n.items){if(this.lexer.state.top=!1,l.tokens=this.lexer.blockTokens(l.text,[]),l.task){if(l.text=l.text.replace(this.rules.other.listReplaceTask,""),l.tokens[0]?.type==="text"||l.tokens[0]?.type==="paragraph"){l.tokens[0].raw=l.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),l.tokens[0].text=l.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let c=this.lexer.inlineQueue.length-1;c>=0;c--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[c].src)){this.lexer.inlineQueue[c].src=this.lexer.inlineQueue[c].src.replace(this.rules.other.listReplaceTask,"");break}}let d=this.rules.other.listTaskCheckbox.exec(l.raw);if(d){let c={type:"checkbox",raw:d[0]+" ",checked:d[0]!=="[ ]"};l.checked=c.checked,n.loose?l.tokens[0]&&["paragraph","text"].includes(l.tokens[0].type)&&"tokens"in l.tokens[0]&&l.tokens[0].tokens?(l.tokens[0].raw=c.raw+l.tokens[0].raw,l.tokens[0].text=c.raw+l.tokens[0].text,l.tokens[0].tokens.unshift(c)):l.tokens.unshift({type:"paragraph",raw:c.raw,text:c.raw,tokens:[c]}):l.tokens.unshift(c)}}if(!n.loose){let d=l.tokens.filter(u=>u.type==="space"),c=d.length>0&&d.some(u=>this.rules.other.anyLine.test(u.raw));n.loose=c}}if(n.loose)for(let l of n.items){l.loose=!0;for(let d of l.tokens)d.type==="text"&&(d.type="paragraph")}return n}}html(e){let o=this.rules.block.html.exec(e);if(o)return{type:"html",block:!0,raw:o[0],pre:o[1]==="pre"||o[1]==="script"||o[1]==="style",text:o[0]}}def(e){let o=this.rules.block.def.exec(e);if(o){let t=o[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),i=o[2]?o[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",n=o[3]?o[3].substring(1,o[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):o[3];return{type:"def",tag:t,raw:o[0],href:i,title:n}}}table(e){let o=this.rules.block.table.exec(e);if(!o||!this.rules.other.tableDelimiter.test(o[2]))return;let t=g1(o[1]),i=o[2].replace(this.rules.other.tableAlignChars,"").split("|"),n=o[3]?.trim()?o[3].replace(this.rules.other.tableRowBlankLine,"").split(`
50
+ `):[],r={type:"table",raw:o[0],header:[],align:[],rows:[]};if(t.length===i.length){for(let a of i)this.rules.other.tableAlignRight.test(a)?r.align.push("right"):this.rules.other.tableAlignCenter.test(a)?r.align.push("center"):this.rules.other.tableAlignLeft.test(a)?r.align.push("left"):r.align.push(null);for(let a=0;a<t.length;a++)r.header.push({text:t[a],tokens:this.lexer.inline(t[a]),header:!0,align:r.align[a]});for(let a of n)r.rows.push(g1(a,r.header.length).map((s,l)=>({text:s,tokens:this.lexer.inline(s),header:!1,align:r.align[l]})));return r}}lheading(e){let o=this.rules.block.lheading.exec(e);if(o){let t=o[1].trim();return{type:"heading",raw:o[0],depth:o[2].charAt(0)==="="?1:2,text:t,tokens:this.lexer.inline(t)}}}paragraph(e){let o=this.rules.block.paragraph.exec(e);if(o){let t=o[1].charAt(o[1].length-1)===`
51
+ `?o[1].slice(0,-1):o[1];return{type:"paragraph",raw:o[0],text:t,tokens:this.lexer.inline(t)}}}text(e){let o=this.rules.block.text.exec(e);if(o)return{type:"text",raw:o[0],text:o[0],tokens:this.lexer.inline(o[0])}}escape(e){let o=this.rules.inline.escape.exec(e);if(o)return{type:"escape",raw:o[0],text:o[1]}}tag(e){let o=this.rules.inline.tag.exec(e);if(o)return!this.lexer.state.inLink&&this.rules.other.startATag.test(o[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(o[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(o[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(o[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:o[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:o[0]}}link(e){let o=this.rules.inline.link.exec(e);if(o){let t=o[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;let r=Kr(t.slice(0,-1),"\\");if((t.length-r.length)%2===0)return}else{let r=iy(o[2],"()");if(r===-2)return;if(r>-1){let a=(o[0].indexOf("!")===0?5:4)+o[1].length+r;o[2]=o[2].substring(0,r),o[0]=o[0].substring(0,a).trim(),o[3]=""}}let i=o[2],n="";if(this.options.pedantic){let r=this.rules.other.pedanticHrefTitle.exec(i);r&&(i=r[1],n=r[3])}else n=o[3]?o[3].slice(1,-1):"";return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?i=i.slice(1):i=i.slice(1,-1)),b1(o,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:n&&n.replace(this.rules.inline.anyPunctuation,"$1")},o[0],this.lexer,this.rules)}}reflink(e,o){let t;if((t=this.rules.inline.reflink.exec(e))||(t=this.rules.inline.nolink.exec(e))){let i=(t[2]||t[1]).replace(this.rules.other.multipleSpaceGlobal," "),n=o[i.toLowerCase()];if(!n){let r=t[0].charAt(0);return{type:"text",raw:r,text:r}}return b1(t,n,t[0],this.lexer,this.rules)}}emStrong(e,o,t=""){let i=this.rules.inline.emStrongLDelim.exec(e);if(!(!i||!i[1]&&!i[2]&&!i[3]&&!i[4]||i[4]&&t.match(this.rules.other.unicodeAlphaNumeric))&&(!(i[1]||i[3])||!t||this.rules.inline.punctuation.exec(t))){let n=[...i[0]].length-1,r,a,s=n,l=0,d=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,o=o.slice(-1*e.length+n);(i=d.exec(o))!==null;){if(r=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!r)continue;if(a=[...r].length,i[3]||i[4]){s+=a;continue}else if((i[5]||i[6])&&n%3&&!((n+a)%3)){l+=a;continue}if(s-=a,s>0)continue;a=Math.min(a,a+s+l);let c=[...i[0]][0].length,u=e.slice(0,n+i.index+c+a);if(Math.min(n,a)%2){let g=u.slice(1,-1);return{type:"em",raw:u,text:g,tokens:this.lexer.inlineTokens(g)}}let m=u.slice(2,-2);return{type:"strong",raw:u,text:m,tokens:this.lexer.inlineTokens(m)}}}}codespan(e){let o=this.rules.inline.code.exec(e);if(o){let t=o[2].replace(this.rules.other.newLineCharGlobal," "),i=this.rules.other.nonSpaceChar.test(t),n=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return i&&n&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:o[0],text:t}}}br(e){let o=this.rules.inline.br.exec(e);if(o)return{type:"br",raw:o[0]}}del(e,o,t=""){let i=this.rules.inline.delLDelim.exec(e);if(i&&(!i[1]||!t||this.rules.inline.punctuation.exec(t))){let n=[...i[0]].length-1,r,a,s=n,l=this.rules.inline.delRDelim;for(l.lastIndex=0,o=o.slice(-1*e.length+n);(i=l.exec(o))!==null;){if(r=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!r||(a=[...r].length,a!==n))continue;if(i[3]||i[4]){s+=a;continue}if(s-=a,s>0)continue;a=Math.min(a,a+s);let d=[...i[0]][0].length,c=e.slice(0,n+i.index+d+a),u=c.slice(n,-n);return{type:"del",raw:c,text:u,tokens:this.lexer.inlineTokens(u)}}}}autolink(e){let o=this.rules.inline.autolink.exec(e);if(o){let t,i;return o[2]==="@"?(t=o[1],i="mailto:"+t):(t=o[1],i=t),{type:"link",raw:o[0],text:t,href:i,tokens:[{type:"text",raw:t,text:t}]}}}url(e){let o;if(o=this.rules.inline.url.exec(e)){let t,i;if(o[2]==="@")t=o[0],i="mailto:"+t;else{let n;do n=o[0],o[0]=this.rules.inline._backpedal.exec(o[0])?.[0]??"";while(n!==o[0]);t=o[0],o[1]==="www."?i="http://"+o[0]:i=o[0]}return{type:"link",raw:o[0],text:t,href:i,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(e){let o=this.rules.inline.text.exec(e);if(o){let t=this.lexer.state.inRawBlock;return{type:"text",raw:o[0],text:o[0],escaped:t}}}},pi=class Qd{tokens;options;state;inlineQueue;tokenizer;constructor(o){this.tokens=[],this.tokens.links=Object.create(null),this.options=o||Qo,this.options.tokenizer=this.options.tokenizer||new gl,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:It,block:pl.normal,inline:Xr.normal};this.options.pedantic?(t.block=pl.pedantic,t.inline=Xr.pedantic):this.options.gfm&&(t.block=pl.gfm,this.options.breaks?t.inline=Xr.breaks:t.inline=Xr.gfm),this.tokenizer.rules=t}static get rules(){return{block:pl,inline:Xr}}static lex(o,t){return new Qd(t).lex(o)}static lexInline(o,t){return new Qd(t).inlineTokens(o)}lex(o){o=o.replace(It.carriageReturn,`
52
+ `),this.blockTokens(o,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){let i=this.inlineQueue[t];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(o,t=[],i=!1){for(this.tokenizer.lexer=this,this.options.pedantic&&(o=o.replace(It.tabCharGlobal," ").replace(It.spaceLine,""));o;){let n;if(this.options.extensions?.block?.some(a=>(n=a.call({lexer:this},o,t))?(o=o.substring(n.raw.length),t.push(n),!0):!1))continue;if(n=this.tokenizer.space(o)){o=o.substring(n.raw.length);let a=t.at(-1);n.raw.length===1&&a!==void 0?a.raw+=`
53
+ `:t.push(n);continue}if(n=this.tokenizer.code(o)){o=o.substring(n.raw.length);let a=t.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
54
54
  `)?"":`
55
55
  `)+n.raw,a.text+=`
56
- `+n.text,this.inlineQueue.at(-1).src=a.text):e.push(n);continue}if(n=this.tokenizer.fences(o)){o=o.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.heading(o)){o=o.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.hr(o)){o=o.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.blockquote(o)){o=o.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.list(o)){o=o.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.html(o)){o=o.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.def(o)){o=o.substring(n.raw.length);let a=e.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
56
+ `+n.text,this.inlineQueue.at(-1).src=a.text):t.push(n);continue}if(n=this.tokenizer.fences(o)){o=o.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.heading(o)){o=o.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.hr(o)){o=o.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.blockquote(o)){o=o.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.list(o)){o=o.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.html(o)){o=o.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.def(o)){o=o.substring(n.raw.length);let a=t.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
57
57
  `)?"":`
58
58
  `)+n.raw,a.text+=`
59
- `+n.raw,this.inlineQueue.at(-1).src=a.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title},e.push(n));continue}if(n=this.tokenizer.table(o)){o=o.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.lheading(o)){o=o.substring(n.raw.length),e.push(n);continue}let r=o;if(this.options.extensions?.startBlock){let a=1/0,s=o.slice(1),l;this.options.extensions.startBlock.forEach(d=>{l=d.call({lexer:this},s),typeof l=="number"&&l>=0&&(a=Math.min(a,l))}),a<1/0&&a>=0&&(r=o.substring(0,a+1))}if(this.state.top&&(n=this.tokenizer.paragraph(r))){let a=e.at(-1);i&&a?.type==="paragraph"?(a.raw+=(a.raw.endsWith(`
59
+ `+n.raw,this.inlineQueue.at(-1).src=a.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title},t.push(n));continue}if(n=this.tokenizer.table(o)){o=o.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.lheading(o)){o=o.substring(n.raw.length),t.push(n);continue}let r=o;if(this.options.extensions?.startBlock){let a=1/0,s=o.slice(1),l;this.options.extensions.startBlock.forEach(d=>{l=d.call({lexer:this},s),typeof l=="number"&&l>=0&&(a=Math.min(a,l))}),a<1/0&&a>=0&&(r=o.substring(0,a+1))}if(this.state.top&&(n=this.tokenizer.paragraph(r))){let a=t.at(-1);i&&a?.type==="paragraph"?(a.raw+=(a.raw.endsWith(`
60
60
  `)?"":`
61
61
  `)+n.raw,a.text+=`
62
- `+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):e.push(n),i=r.length!==o.length,o=o.substring(n.raw.length);continue}if(n=this.tokenizer.text(o)){o=o.substring(n.raw.length);let a=e.at(-1);a?.type==="text"?(a.raw+=(a.raw.endsWith(`
62
+ `+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):t.push(n),i=r.length!==o.length,o=o.substring(n.raw.length);continue}if(n=this.tokenizer.text(o)){o=o.substring(n.raw.length);let a=t.at(-1);a?.type==="text"?(a.raw+=(a.raw.endsWith(`
63
63
  `)?"":`
64
64
  `)+n.raw,a.text+=`
65
- `+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):e.push(n);continue}if(o){let a="Infinite loop on byte: "+o.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,e}inline(o,e=[]){return this.inlineQueue.push({src:o,tokens:e}),e}inlineTokens(o,e=[]){this.tokenizer.lexer=this;let i=o,n=null;if(this.tokens.links){let l=Object.keys(this.tokens.links);if(l.length>0)for(;(n=this.tokenizer.rules.inline.reflinkSearch.exec(i))!==null;)l.includes(n[0].slice(n[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(n=this.tokenizer.rules.inline.anyPunctuation.exec(i))!==null;)i=i.slice(0,n.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let r;for(;(n=this.tokenizer.rules.inline.blockSkip.exec(i))!==null;)r=n[2]?n[2].length:0,i=i.slice(0,n.index+r)+"["+"a".repeat(n[0].length-r-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=this.options.hooks?.emStrongMask?.call({lexer:this},i)??i;let a=!1,s="";for(;o;){a||(s=""),a=!1;let l;if(this.options.extensions?.inline?.some(c=>(l=c.call({lexer:this},o,e))?(o=o.substring(l.raw.length),e.push(l),!0):!1))continue;if(l=this.tokenizer.escape(o)){o=o.substring(l.raw.length),e.push(l);continue}if(l=this.tokenizer.tag(o)){o=o.substring(l.raw.length),e.push(l);continue}if(l=this.tokenizer.link(o)){o=o.substring(l.raw.length),e.push(l);continue}if(l=this.tokenizer.reflink(o,this.tokens.links)){o=o.substring(l.raw.length);let c=e.at(-1);l.type==="text"&&c?.type==="text"?(c.raw+=l.raw,c.text+=l.text):e.push(l);continue}if(l=this.tokenizer.emStrong(o,i,s)){o=o.substring(l.raw.length),e.push(l);continue}if(l=this.tokenizer.codespan(o)){o=o.substring(l.raw.length),e.push(l);continue}if(l=this.tokenizer.br(o)){o=o.substring(l.raw.length),e.push(l);continue}if(l=this.tokenizer.del(o,i,s)){o=o.substring(l.raw.length),e.push(l);continue}if(l=this.tokenizer.autolink(o)){o=o.substring(l.raw.length),e.push(l);continue}if(!this.state.inLink&&(l=this.tokenizer.url(o))){o=o.substring(l.raw.length),e.push(l);continue}let d=o;if(this.options.extensions?.startInline){let c=1/0,u=o.slice(1),m;this.options.extensions.startInline.forEach(g=>{m=g.call({lexer:this},u),typeof m=="number"&&m>=0&&(c=Math.min(c,m))}),c<1/0&&c>=0&&(d=o.substring(0,c+1))}if(l=this.tokenizer.inlineText(d)){o=o.substring(l.raw.length),l.raw.slice(-1)!=="_"&&(s=l.raw.slice(-1)),a=!0;let c=e.at(-1);c?.type==="text"?(c.raw+=l.raw,c.text+=l.text):e.push(l);continue}if(o){let c="Infinite loop on byte: "+o.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return e}},vl=class{options;parser;constructor(t){this.options=t||Qo}space(t){return""}code({text:t,lang:o,escaped:e}){let i=(o||"").match(It.notSpaceStart)?.[0],n=t.replace(It.endingNewline,"")+`
66
- `;return i?'<pre><code class="language-'+Oi(i)+'">'+(e?n:Oi(n,!0))+`</code></pre>
67
- `:"<pre><code>"+(e?n:Oi(n,!0))+`</code></pre>
68
- `}blockquote({tokens:t}){return`<blockquote>
69
- ${this.parser.parse(t)}</blockquote>
70
- `}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:o}){return`<h${o}>${this.parser.parseInline(t)}</h${o}>
71
- `}hr(t){return`<hr>
72
- `}list(t){let o=t.ordered,e=t.start,i="";for(let a=0;a<t.items.length;a++){let s=t.items[a];i+=this.listitem(s)}let n=o?"ol":"ul",r=o&&e!==1?' start="'+e+'"':"";return"<"+n+r+`>
65
+ `+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):t.push(n);continue}if(o){let a="Infinite loop on byte: "+o.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,t}inline(o,t=[]){return this.inlineQueue.push({src:o,tokens:t}),t}inlineTokens(o,t=[]){this.tokenizer.lexer=this;let i=o,n=null;if(this.tokens.links){let l=Object.keys(this.tokens.links);if(l.length>0)for(;(n=this.tokenizer.rules.inline.reflinkSearch.exec(i))!==null;)l.includes(n[0].slice(n[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(n=this.tokenizer.rules.inline.anyPunctuation.exec(i))!==null;)i=i.slice(0,n.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let r;for(;(n=this.tokenizer.rules.inline.blockSkip.exec(i))!==null;)r=n[2]?n[2].length:0,i=i.slice(0,n.index+r)+"["+"a".repeat(n[0].length-r-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=this.options.hooks?.emStrongMask?.call({lexer:this},i)??i;let a=!1,s="";for(;o;){a||(s=""),a=!1;let l;if(this.options.extensions?.inline?.some(c=>(l=c.call({lexer:this},o,t))?(o=o.substring(l.raw.length),t.push(l),!0):!1))continue;if(l=this.tokenizer.escape(o)){o=o.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.tag(o)){o=o.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.link(o)){o=o.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.reflink(o,this.tokens.links)){o=o.substring(l.raw.length);let c=t.at(-1);l.type==="text"&&c?.type==="text"?(c.raw+=l.raw,c.text+=l.text):t.push(l);continue}if(l=this.tokenizer.emStrong(o,i,s)){o=o.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.codespan(o)){o=o.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.br(o)){o=o.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.del(o,i,s)){o=o.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.autolink(o)){o=o.substring(l.raw.length),t.push(l);continue}if(!this.state.inLink&&(l=this.tokenizer.url(o))){o=o.substring(l.raw.length),t.push(l);continue}let d=o;if(this.options.extensions?.startInline){let c=1/0,u=o.slice(1),m;this.options.extensions.startInline.forEach(g=>{m=g.call({lexer:this},u),typeof m=="number"&&m>=0&&(c=Math.min(c,m))}),c<1/0&&c>=0&&(d=o.substring(0,c+1))}if(l=this.tokenizer.inlineText(d)){o=o.substring(l.raw.length),l.raw.slice(-1)!=="_"&&(s=l.raw.slice(-1)),a=!0;let c=t.at(-1);c?.type==="text"?(c.raw+=l.raw,c.text+=l.text):t.push(l);continue}if(o){let c="Infinite loop on byte: "+o.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return t}},bl=class{options;parser;constructor(e){this.options=e||Qo}space(e){return""}code({text:e,lang:o,escaped:t}){let i=(o||"").match(It.notSpaceStart)?.[0],n=e.replace(It.endingNewline,"")+`
66
+ `;return i?'<pre><code class="language-'+Oi(i)+'">'+(t?n:Oi(n,!0))+`</code></pre>
67
+ `:"<pre><code>"+(t?n:Oi(n,!0))+`</code></pre>
68
+ `}blockquote({tokens:e}){return`<blockquote>
69
+ ${this.parser.parse(e)}</blockquote>
70
+ `}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:o}){return`<h${o}>${this.parser.parseInline(e)}</h${o}>
71
+ `}hr(e){return`<hr>
72
+ `}list(e){let o=e.ordered,t=e.start,i="";for(let a=0;a<e.items.length;a++){let s=e.items[a];i+=this.listitem(s)}let n=o?"ol":"ul",r=o&&t!==1?' start="'+t+'"':"";return"<"+n+r+`>
73
73
  `+i+"</"+n+`>
74
- `}listitem(t){return`<li>${this.parser.parse(t.tokens)}</li>
75
- `}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
76
- `}table(t){let o="",e="";for(let n=0;n<t.header.length;n++)e+=this.tablecell(t.header[n]);o+=this.tablerow({text:e});let i="";for(let n=0;n<t.rows.length;n++){let r=t.rows[n];e="";for(let a=0;a<r.length;a++)e+=this.tablecell(r[a]);i+=this.tablerow({text:e})}return i&&(i=`<tbody>${i}</tbody>`),`<table>
74
+ `}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>
75
+ `}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
76
+ `}table(e){let o="",t="";for(let n=0;n<e.header.length;n++)t+=this.tablecell(e.header[n]);o+=this.tablerow({text:t});let i="";for(let n=0;n<e.rows.length;n++){let r=e.rows[n];t="";for(let a=0;a<r.length;a++)t+=this.tablecell(r[a]);i+=this.tablerow({text:t})}return i&&(i=`<tbody>${i}</tbody>`),`<table>
77
77
  <thead>
78
78
  `+o+`</thead>
79
79
  `+i+`</table>
80
- `}tablerow({text:t}){return`<tr>
81
- ${t}</tr>
82
- `}tablecell(t){let o=this.parser.parseInline(t.tokens),e=t.header?"th":"td";return(t.align?`<${e} align="${t.align}">`:`<${e}>`)+o+`</${e}>
83
- `}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${Oi(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:o,tokens:e}){let i=this.parser.parseInline(e),n=g1(t);if(n===null)return i;t=n;let r='<a href="'+t+'"';return o&&(r+=' title="'+Oi(o)+'"'),r+=">"+i+"</a>",r}image({href:t,title:o,text:e,tokens:i}){i&&(e=this.parser.parseInline(i,this.parser.textRenderer));let n=g1(t);if(n===null)return Oi(e);t=n;let r=`<img src="${t}" alt="${Oi(e)}"`;return o&&(r+=` title="${Oi(o)}"`),r+=">",r}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Oi(t.text)}},sh=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}checkbox({raw:t}){return t}},fi=class Zd{options;renderer;textRenderer;constructor(o){this.options=o||Qo,this.options.renderer=this.options.renderer||new vl,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new sh}static parse(o,e){return new Zd(e).parse(o)}static parseInline(o,e){return new Zd(e).parseInline(o)}parse(o){this.renderer.parser=this;let e="";for(let i=0;i<o.length;i++){let n=o[i];if(this.options.extensions?.renderers?.[n.type]){let a=n,s=this.options.extensions.renderers[a.type].call({parser:this},a);if(s!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(a.type)){e+=s||"";continue}}let r=n;switch(r.type){case"space":{e+=this.renderer.space(r);break}case"hr":{e+=this.renderer.hr(r);break}case"heading":{e+=this.renderer.heading(r);break}case"code":{e+=this.renderer.code(r);break}case"table":{e+=this.renderer.table(r);break}case"blockquote":{e+=this.renderer.blockquote(r);break}case"list":{e+=this.renderer.list(r);break}case"checkbox":{e+=this.renderer.checkbox(r);break}case"html":{e+=this.renderer.html(r);break}case"def":{e+=this.renderer.def(r);break}case"paragraph":{e+=this.renderer.paragraph(r);break}case"text":{e+=this.renderer.text(r);break}default:{let a='Token with "'+r.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return e}parseInline(o,e=this.renderer){this.renderer.parser=this;let i="";for(let n=0;n<o.length;n++){let r=o[n];if(this.options.extensions?.renderers?.[r.type]){let s=this.options.extensions.renderers[r.type].call({parser:this},r);if(s!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(r.type)){i+=s||"";continue}}let a=r;switch(a.type){case"escape":{i+=e.text(a);break}case"html":{i+=e.html(a);break}case"link":{i+=e.link(a);break}case"image":{i+=e.image(a);break}case"checkbox":{i+=e.checkbox(a);break}case"strong":{i+=e.strong(a);break}case"em":{i+=e.em(a);break}case"codespan":{i+=e.codespan(a);break}case"br":{i+=e.br(a);break}case"del":{i+=e.del(a);break}case"text":{i+=e.text(a);break}default:{let s='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return i}},Yr=class{options;block;constructor(t){this.options=t||Qo}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(t=this.block){return t?pi.lex:pi.lexInline}provideParser(t=this.block){return t?fi.parse:fi.parseInline}},sy=class{defaults=Jd();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=fi;Renderer=vl;TextRenderer=sh;Lexer=pi;Tokenizer=bl;Hooks=Yr;constructor(...t){this.use(...t)}walkTokens(t,o){let e=[];for(let i of t)switch(e=e.concat(o.call(this,i)),i.type){case"table":{let n=i;for(let r of n.header)e=e.concat(this.walkTokens(r.tokens,o));for(let r of n.rows)for(let a of r)e=e.concat(this.walkTokens(a.tokens,o));break}case"list":{let n=i;e=e.concat(this.walkTokens(n.items,o));break}default:{let n=i;this.defaults.extensions?.childTokens?.[n.type]?this.defaults.extensions.childTokens[n.type].forEach(r=>{let a=n[r].flat(1/0);e=e.concat(this.walkTokens(a,o))}):n.tokens&&(e=e.concat(this.walkTokens(n.tokens,o)))}}return e}use(...t){let o=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(e=>{let i=ae({},e);if(i.async=this.defaults.async||i.async||!1,e.extensions&&(e.extensions.forEach(n=>{if(!n.name)throw new Error("extension name required");if("renderer"in n){let r=o.renderers[n.name];r?o.renderers[n.name]=function(...a){let s=n.renderer.apply(this,a);return s===!1&&(s=r.apply(this,a)),s}:o.renderers[n.name]=n.renderer}if("tokenizer"in n){if(!n.level||n.level!=="block"&&n.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let r=o[n.level];r?r.unshift(n.tokenizer):o[n.level]=[n.tokenizer],n.start&&(n.level==="block"?o.startBlock?o.startBlock.push(n.start):o.startBlock=[n.start]:n.level==="inline"&&(o.startInline?o.startInline.push(n.start):o.startInline=[n.start]))}"childTokens"in n&&n.childTokens&&(o.childTokens[n.name]=n.childTokens)}),i.extensions=o),e.renderer){let n=this.defaults.renderer||new vl(this.defaults);for(let r in e.renderer){if(!(r in n))throw new Error(`renderer '${r}' does not exist`);if(["options","parser"].includes(r))continue;let a=r,s=e.renderer[a],l=n[a];n[a]=(...d)=>{let c=s.apply(n,d);return c===!1&&(c=l.apply(n,d)),c||""}}i.renderer=n}if(e.tokenizer){let n=this.defaults.tokenizer||new bl(this.defaults);for(let r in e.tokenizer){if(!(r in n))throw new Error(`tokenizer '${r}' does not exist`);if(["options","rules","lexer"].includes(r))continue;let a=r,s=e.tokenizer[a],l=n[a];n[a]=(...d)=>{let c=s.apply(n,d);return c===!1&&(c=l.apply(n,d)),c}}i.tokenizer=n}if(e.hooks){let n=this.defaults.hooks||new Yr;for(let r in e.hooks){if(!(r in n))throw new Error(`hook '${r}' does not exist`);if(["options","block"].includes(r))continue;let a=r,s=e.hooks[a],l=n[a];Yr.passThroughHooks.has(r)?n[a]=d=>{if(this.defaults.async&&Yr.passThroughHooksRespectAsync.has(r))return(async()=>{let u=await s.call(n,d);return l.call(n,u)})();let c=s.call(n,d);return l.call(n,c)}:n[a]=(...d)=>{if(this.defaults.async)return(async()=>{let u=await s.apply(n,d);return u===!1&&(u=await l.apply(n,d)),u})();let c=s.apply(n,d);return c===!1&&(c=l.apply(n,d)),c}}i.hooks=n}if(e.walkTokens){let n=this.defaults.walkTokens,r=e.walkTokens;i.walkTokens=function(a){let s=[];return s.push(r.call(this,a)),n&&(s=s.concat(n.call(this,a))),s}}this.defaults=ae(ae({},this.defaults),i)}),this}setOptions(t){return this.defaults=ae(ae({},this.defaults),t),this}lexer(t,o){return pi.lex(t,o??this.defaults)}parser(t,o){return fi.parse(t,o??this.defaults)}parseMarkdown(t){return(o,e)=>{let i=ae({},e),n=ae(ae({},this.defaults),i),r=this.onError(!!n.silent,!!n.async);if(this.defaults.async===!0&&i.async===!1)return r(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof o>"u"||o===null)return r(new Error("marked(): input parameter is undefined or null"));if(typeof o!="string")return r(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(o)+", string expected"));if(n.hooks&&(n.hooks.options=n,n.hooks.block=t),n.async)return(async()=>{let a=n.hooks?await n.hooks.preprocess(o):o,s=await(n.hooks?await n.hooks.provideLexer(t):t?pi.lex:pi.lexInline)(a,n),l=n.hooks?await n.hooks.processAllTokens(s):s;n.walkTokens&&await Promise.all(this.walkTokens(l,n.walkTokens));let d=await(n.hooks?await n.hooks.provideParser(t):t?fi.parse:fi.parseInline)(l,n);return n.hooks?await n.hooks.postprocess(d):d})().catch(r);try{n.hooks&&(o=n.hooks.preprocess(o));let a=(n.hooks?n.hooks.provideLexer(t):t?pi.lex:pi.lexInline)(o,n);n.hooks&&(a=n.hooks.processAllTokens(a)),n.walkTokens&&this.walkTokens(a,n.walkTokens);let s=(n.hooks?n.hooks.provideParser(t):t?fi.parse:fi.parseInline)(a,n);return n.hooks&&(s=n.hooks.postprocess(s)),s}catch(a){return r(a)}}}onError(t,o){return e=>{if(e.message+=`
84
- Please report this to https://github.com/markedjs/marked.`,t){let i="<p>An error occurred:</p><pre>"+Oi(e.message+"",!0)+"</pre>";return o?Promise.resolve(i):i}if(o)return Promise.reject(e);throw e}}},Ko=new sy;function Qe(t,o){return Ko.parse(t,o)}Qe.options=Qe.setOptions=function(t){return Ko.setOptions(t),Qe.defaults=Ko.defaults,x1(Qe.defaults),Qe};Qe.getDefaults=Jd;Qe.defaults=Qo;Qe.use=function(...t){return Ko.use(...t),Qe.defaults=Ko.defaults,x1(Qe.defaults),Qe};Qe.walkTokens=function(t,o){return Ko.walkTokens(t,o)};Qe.parseInline=Ko.parseInline;Qe.Parser=fi;Qe.parser=fi.parse;Qe.Renderer=vl;Qe.TextRenderer=sh;Qe.Lexer=pi;Qe.lexer=pi.lex;Qe.Tokenizer=bl;Qe.Hooks=Yr;Qe.parse=Qe;var GE=Qe.options,XE=Qe.setOptions,KE=Qe.use,QE=Qe.walkTokens,YE=Qe.parseInline;var ZE=fi.parse,JE=pi.lex;function T1(){return{mangle:!1,walkTokens(t){if(t.type!=="link"||!t.href.startsWith("mailto:"))return;let o=t.href.substring(7),e=ly(o);t.href=`mailto:${e}`,!(t.tokens.length!==1||t.tokens[0].type!=="text"||t.tokens[0].text!==o)&&(t.autolink&&(t.autolink=!1),t.text=e,t.tokens[0].text=e)}}}function ly(t){let o="",e,i,n=t.length;for(e=0;e<n;e++)i=t.charCodeAt(e),Math.random()>.5&&(i="x"+i.toString(16)),o+="&#"+i+";";return o}var R1=`# Change Log - Visualization
80
+ `}tablerow({text:e}){return`<tr>
81
+ ${e}</tr>
82
+ `}tablecell(e){let o=this.parser.parseInline(e.tokens),t=e.header?"th":"td";return(e.align?`<${t} align="${e.align}">`:`<${t}>`)+o+`</${t}>
83
+ `}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${Oi(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:o,tokens:t}){let i=this.parser.parseInline(t),n=f1(e);if(n===null)return i;e=n;let r='<a href="'+e+'"';return o&&(r+=' title="'+Oi(o)+'"'),r+=">"+i+"</a>",r}image({href:e,title:o,text:t,tokens:i}){i&&(t=this.parser.parseInline(i,this.parser.textRenderer));let n=f1(e);if(n===null)return Oi(t);e=n;let r=`<img src="${e}" alt="${Oi(t)}"`;return o&&(r+=` title="${Oi(o)}"`),r+=">",r}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Oi(e.text)}},ah=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}checkbox({raw:e}){return e}},fi=class Yd{options;renderer;textRenderer;constructor(o){this.options=o||Qo,this.options.renderer=this.options.renderer||new bl,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new ah}static parse(o,t){return new Yd(t).parse(o)}static parseInline(o,t){return new Yd(t).parseInline(o)}parse(o){this.renderer.parser=this;let t="";for(let i=0;i<o.length;i++){let n=o[i];if(this.options.extensions?.renderers?.[n.type]){let a=n,s=this.options.extensions.renderers[a.type].call({parser:this},a);if(s!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(a.type)){t+=s||"";continue}}let r=n;switch(r.type){case"space":{t+=this.renderer.space(r);break}case"hr":{t+=this.renderer.hr(r);break}case"heading":{t+=this.renderer.heading(r);break}case"code":{t+=this.renderer.code(r);break}case"table":{t+=this.renderer.table(r);break}case"blockquote":{t+=this.renderer.blockquote(r);break}case"list":{t+=this.renderer.list(r);break}case"checkbox":{t+=this.renderer.checkbox(r);break}case"html":{t+=this.renderer.html(r);break}case"def":{t+=this.renderer.def(r);break}case"paragraph":{t+=this.renderer.paragraph(r);break}case"text":{t+=this.renderer.text(r);break}default:{let a='Token with "'+r.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return t}parseInline(o,t=this.renderer){this.renderer.parser=this;let i="";for(let n=0;n<o.length;n++){let r=o[n];if(this.options.extensions?.renderers?.[r.type]){let s=this.options.extensions.renderers[r.type].call({parser:this},r);if(s!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(r.type)){i+=s||"";continue}}let a=r;switch(a.type){case"escape":{i+=t.text(a);break}case"html":{i+=t.html(a);break}case"link":{i+=t.link(a);break}case"image":{i+=t.image(a);break}case"checkbox":{i+=t.checkbox(a);break}case"strong":{i+=t.strong(a);break}case"em":{i+=t.em(a);break}case"codespan":{i+=t.codespan(a);break}case"br":{i+=t.br(a);break}case"del":{i+=t.del(a);break}case"text":{i+=t.text(a);break}default:{let s='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return i}},Qr=class{options;block;constructor(e){this.options=e||Qo}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?pi.lex:pi.lexInline}provideParser(e=this.block){return e?fi.parse:fi.parseInline}},ry=class{defaults=Zd();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=fi;Renderer=bl;TextRenderer=ah;Lexer=pi;Tokenizer=gl;Hooks=Qr;constructor(...e){this.use(...e)}walkTokens(e,o){let t=[];for(let i of e)switch(t=t.concat(o.call(this,i)),i.type){case"table":{let n=i;for(let r of n.header)t=t.concat(this.walkTokens(r.tokens,o));for(let r of n.rows)for(let a of r)t=t.concat(this.walkTokens(a.tokens,o));break}case"list":{let n=i;t=t.concat(this.walkTokens(n.items,o));break}default:{let n=i;this.defaults.extensions?.childTokens?.[n.type]?this.defaults.extensions.childTokens[n.type].forEach(r=>{let a=n[r].flat(1/0);t=t.concat(this.walkTokens(a,o))}):n.tokens&&(t=t.concat(this.walkTokens(n.tokens,o)))}}return t}use(...e){let o=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(t=>{let i=ae({},t);if(i.async=this.defaults.async||i.async||!1,t.extensions&&(t.extensions.forEach(n=>{if(!n.name)throw new Error("extension name required");if("renderer"in n){let r=o.renderers[n.name];r?o.renderers[n.name]=function(...a){let s=n.renderer.apply(this,a);return s===!1&&(s=r.apply(this,a)),s}:o.renderers[n.name]=n.renderer}if("tokenizer"in n){if(!n.level||n.level!=="block"&&n.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let r=o[n.level];r?r.unshift(n.tokenizer):o[n.level]=[n.tokenizer],n.start&&(n.level==="block"?o.startBlock?o.startBlock.push(n.start):o.startBlock=[n.start]:n.level==="inline"&&(o.startInline?o.startInline.push(n.start):o.startInline=[n.start]))}"childTokens"in n&&n.childTokens&&(o.childTokens[n.name]=n.childTokens)}),i.extensions=o),t.renderer){let n=this.defaults.renderer||new bl(this.defaults);for(let r in t.renderer){if(!(r in n))throw new Error(`renderer '${r}' does not exist`);if(["options","parser"].includes(r))continue;let a=r,s=t.renderer[a],l=n[a];n[a]=(...d)=>{let c=s.apply(n,d);return c===!1&&(c=l.apply(n,d)),c||""}}i.renderer=n}if(t.tokenizer){let n=this.defaults.tokenizer||new gl(this.defaults);for(let r in t.tokenizer){if(!(r in n))throw new Error(`tokenizer '${r}' does not exist`);if(["options","rules","lexer"].includes(r))continue;let a=r,s=t.tokenizer[a],l=n[a];n[a]=(...d)=>{let c=s.apply(n,d);return c===!1&&(c=l.apply(n,d)),c}}i.tokenizer=n}if(t.hooks){let n=this.defaults.hooks||new Qr;for(let r in t.hooks){if(!(r in n))throw new Error(`hook '${r}' does not exist`);if(["options","block"].includes(r))continue;let a=r,s=t.hooks[a],l=n[a];Qr.passThroughHooks.has(r)?n[a]=d=>{if(this.defaults.async&&Qr.passThroughHooksRespectAsync.has(r))return(async()=>{let u=await s.call(n,d);return l.call(n,u)})();let c=s.call(n,d);return l.call(n,c)}:n[a]=(...d)=>{if(this.defaults.async)return(async()=>{let u=await s.apply(n,d);return u===!1&&(u=await l.apply(n,d)),u})();let c=s.apply(n,d);return c===!1&&(c=l.apply(n,d)),c}}i.hooks=n}if(t.walkTokens){let n=this.defaults.walkTokens,r=t.walkTokens;i.walkTokens=function(a){let s=[];return s.push(r.call(this,a)),n&&(s=s.concat(n.call(this,a))),s}}this.defaults=ae(ae({},this.defaults),i)}),this}setOptions(e){return this.defaults=ae(ae({},this.defaults),e),this}lexer(e,o){return pi.lex(e,o??this.defaults)}parser(e,o){return fi.parse(e,o??this.defaults)}parseMarkdown(e){return(o,t)=>{let i=ae({},t),n=ae(ae({},this.defaults),i),r=this.onError(!!n.silent,!!n.async);if(this.defaults.async===!0&&i.async===!1)return r(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof o>"u"||o===null)return r(new Error("marked(): input parameter is undefined or null"));if(typeof o!="string")return r(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(o)+", string expected"));if(n.hooks&&(n.hooks.options=n,n.hooks.block=e),n.async)return(async()=>{let a=n.hooks?await n.hooks.preprocess(o):o,s=await(n.hooks?await n.hooks.provideLexer(e):e?pi.lex:pi.lexInline)(a,n),l=n.hooks?await n.hooks.processAllTokens(s):s;n.walkTokens&&await Promise.all(this.walkTokens(l,n.walkTokens));let d=await(n.hooks?await n.hooks.provideParser(e):e?fi.parse:fi.parseInline)(l,n);return n.hooks?await n.hooks.postprocess(d):d})().catch(r);try{n.hooks&&(o=n.hooks.preprocess(o));let a=(n.hooks?n.hooks.provideLexer(e):e?pi.lex:pi.lexInline)(o,n);n.hooks&&(a=n.hooks.processAllTokens(a)),n.walkTokens&&this.walkTokens(a,n.walkTokens);let s=(n.hooks?n.hooks.provideParser(e):e?fi.parse:fi.parseInline)(a,n);return n.hooks&&(s=n.hooks.postprocess(s)),s}catch(a){return r(a)}}}onError(e,o){return t=>{if(t.message+=`
84
+ Please report this to https://github.com/markedjs/marked.`,e){let i="<p>An error occurred:</p><pre>"+Oi(t.message+"",!0)+"</pre>";return o?Promise.resolve(i):i}if(o)return Promise.reject(t);throw t}}},Ko=new ry;function Qe(e,o){return Ko.parse(e,o)}Qe.options=Qe.setOptions=function(e){return Ko.setOptions(e),Qe.defaults=Ko.defaults,v1(Qe.defaults),Qe};Qe.getDefaults=Zd;Qe.defaults=Qo;Qe.use=function(...e){return Ko.use(...e),Qe.defaults=Ko.defaults,v1(Qe.defaults),Qe};Qe.walkTokens=function(e,o){return Ko.walkTokens(e,o)};Qe.parseInline=Ko.parseInline;Qe.Parser=fi;Qe.parser=fi.parse;Qe.Renderer=bl;Qe.TextRenderer=ah;Qe.Lexer=pi;Qe.lexer=pi.lex;Qe.Tokenizer=gl;Qe.Hooks=Qr;Qe.parse=Qe;var $E=Qe.options,jE=Qe.setOptions,HE=Qe.use,UE=Qe.walkTokens,GE=Qe.parseInline;var XE=fi.parse,KE=pi.lex;function q1(){return{mangle:!1,walkTokens(e){if(e.type!=="link"||!e.href.startsWith("mailto:"))return;let o=e.href.substring(7),t=ay(o);e.href=`mailto:${t}`,!(e.tokens.length!==1||e.tokens[0].type!=="text"||e.tokens[0].text!==o)&&(e.autolink&&(e.autolink=!1),e.text=t,e.tokens[0].text=t)}}}function ay(e){let o="",t,i,n=e.length;for(t=0;t<n;t++)i=e.charCodeAt(t),Math.random()>.5&&(i="x"+i.toString(16)),o+="&#"+i+";";return o}var T1=`# Change Log - Visualization
85
85
 
86
86
  All notable changes to this project will be documented in this file.
87
87
 
@@ -90,6 +90,37 @@ and this project adheres to [Semantic Versioning](http://semver.org/)
90
90
 
91
91
  ## [unreleased] (Added \u{1F680} | Changed | Removed | Fixed \u{1F41E} | Chore \u{1F468}\u200D\u{1F4BB} \u{1F469}\u200D\u{1F4BB})
92
92
 
93
+ ## [2.9.0] - 2026-10-20
94
+
95
+ ### Added \u{1F680}
96
+
97
+ - **Declarations in the dependency view**: a file of a map that carries declarations opens on a double click into its classes, functions and other declarations, and is drawn as a small stack while it is closed.
98
+ - **Inspector in the dependency view**: an inspector beside the graph explains the selected file, declaration, folder, package or edge with what it uses, what uses it, its cycles and upward dependencies, in sections that open on a click, and marks in the graph the boxes of what the pointer rests on in it.
99
+ - **Badges in the dependency view**: badges on a closed box count the cycles that stay inside single files, the cycles between different files and the upward dependencies it hides, the Badges card switches each of them on and off and shows the ones it keeps, and a click on a badge lists what it counts in the inspector.
100
+ - **Folders or packages in the dependency view**: a map that declares packages can nest its files in those packages instead of their folders.
101
+ - **Kinds of use in the dependency view**: the dashes and arrowhead of an edge can tell how one declaration uses the other, such as inheriting from it or creating it.
102
+ - **Edge colours in the dependency view**: the colours of the four edge types can be changed.
103
+ - **Keyboard in the dependency view**: the boxes of the graph can be reached with the Tab key, walked through with the arrow keys, selected with Enter and opened or closed with Space.
104
+ - **Panning the dependency view**: holding Space or dragging with the right mouse button pans from anywhere in the graph, also from a box that a drag would otherwise move.
105
+ - **Resizable inspector**: the inspector of every view is resized by dragging its left edge, and a double click on that edge brings the default width back.
106
+ - **Steady view in the dependency view**: a box that is opened or closed keeps its place on screen, and an opened box that does not fit is brought into view whole.
107
+
108
+ ### Changed
109
+
110
+ - **Dependency view**: the view is no longer experimental, so its tab appears for every map with dependency data without switching it on in the global configuration first.
111
+ - **Focus in the dependency view**: focusing a folder or leaving it again keeps the boxes you opened and moved, and leaving it shows that folder where it lies in the whole graph.
112
+ - **Edges shown in the dependency view**: the graph starts with the edges in cycles and those pointing upward, without the plain dependencies, a reset button brings that choice back, a checkbox holds the edges shown for the box under the pointer to that choice too, and the card shows the lines of the edges shown instead of their names.
113
+ - **Tooltips in the dependency view**: the tooltip of a folder, file or package names it by its own name instead of its whole path.
114
+ - **Edge styles in the dependency view**: edges are drawn combined, spread or aside, combined and spread with curved or straight lines, aside now bows downward edges out to the left as it bows upward ones out to the right, and one window holds every setting of the edge style.
115
+
116
+ ### Removed
117
+
118
+ - **Level labels by path in the dependency view**: the levels are labelled by their own number alone.
119
+
120
+ ### Fixed \u{1F41E}
121
+
122
+ - **Zooming out in the dependency view after closing a box**: the graph stays in the middle and can still be moved, instead of getting stuck in a corner until the whole graph is shown again.
123
+
93
124
  ## [2.8.0] - 2026-10-05
94
125
 
95
126
  ### Added \u{1F680}
@@ -3577,9 +3608,9 @@ Fixed release issues
3577
3608
 
3578
3609
  - SonarImporter for importing projects from SonarQube.
3579
3610
  - ValidationTool for validating an existing json file.
3580
- `;var dy=["Added","Fixed","Changed","Removed","Chore"],yl=(()=>{class t{parseChangesBetweenVersions(e,i){Qe.use(T1());let r=Qe.parse(R1).split(`
3581
- `),a=this.findVersionLine(r,i),s=this.findVersionLine(r,e);if(a===-1||s===-1)return[];let l=r.slice(a,s+1);return this.extractCategories(l)}extractCategories(e){let i=[];for(let n of dy){let r=new RegExp(String.raw`<h3>${n}\b[^<]*</h3>`),a=this.findAllIndexes(e,r),s=[];for(let l of a){let d=l+2,c=this.findEndOfChanges(e,l);for(let u of e.slice(d,c))s.push(u)}s.length>0&&i.push({title:n,changes:s.join(`
3582
- `)})}return i}findAllIndexes(e,i){return e.reduce((n,r,a)=>(i.test(r)&&n.push(a),n),[])}findVersionLine(e,i){let n=new RegExp(String.raw`\[${i}]`);return e.findIndex(r=>n.test(r))}findEndOfChanges(e,i){return i+e.slice(i+1).findIndex(n=>/<h3>/.test(n)||/<h2>/.test(n))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=O({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var hy=["dialog"],uy=(t,o)=>o.title;function my(t,o){if(t&1&&(f(0,"div",15)(1,"div",24)(2,"span",25),x(3),p(),f(4,"h3",26),x(5),p(),f(6,"span",27),x(7),p()(),W(8,"div",28),p()),t&2){let e=o.$implicit,i=L();h(),R("ngClass",i.getCategoryHeaderClass(e.title)),h(),R("ngClass",i.getCategoryIconClass(e.title)),h(),we(" ",i.getCategoryEmoji(e.title)," "),h(2),we(" ",i.getCategoryLabel(e.title)," "),h(),R("ngClass",i.getCategoryCountClass(e.title)),h(),we(" ",i.getChangeCount(e.changes)," "),h(),R("innerHTML",e.changes,jm)}}var lh={Added:{emoji:"\u{1F680}",label:"Added",type:"added"},Fixed:{emoji:"\u{1F41E}",label:"Fixed",type:"fixed"},Changed:{emoji:"\u2728",label:"Changed",type:"changed"},Removed:{emoji:"\u{1F5D1}",label:"Removed",type:"removed"},Chore:{emoji:"\u{1F527}",label:"Maintenance",type:"chore"}},ch={added:{header:"bg-success/5",icon:"bg-success/10",count:"bg-success/10 text-success"},fixed:{header:"bg-info/5",icon:"bg-info/10",count:"bg-info/10 text-info"},changed:{header:"bg-warning/5",icon:"bg-warning/10",count:"bg-warning/10 text-warning"},removed:{header:"bg-error/5",icon:"bg-error/10",count:"bg-error/10 text-error"},chore:{header:"bg-neutral/5",icon:"bg-neutral/10",count:"bg-neutral/10 text-neutral"}},dh=(()=>{class t{constructor(e,i){this.versionService=e,this.changelogParserService=i,this.dialogElement=Ue.required("dialog"),this.previousVersion=this.versionService.previousVersion,this.currentVersion=this.versionService.currentVersion,this.shouldShowChangelog=this.versionService.shouldShowChangelog,this.changes=te(()=>{let n=this.previousVersion();return n?this.changelogParserService.parseChangesBetweenVersions(n,this.currentVersion):[]}),oo(()=>{if(this.shouldShowChangelog()){if(this.changes().length===0){this.versionService.acknowledgeChangelog();return}this.open()}})}open(){this.dialogElement().nativeElement.showModal()}close(){this.versionService.acknowledgeChangelog(),this.dialogElement().nativeElement.close()}getCategoryEmoji(e){return lh[e]?.emoji??"\u{1F4DD}"}getCategoryLabel(e){return lh[e]?.label??e}getCategoryType(e){return lh[e]?.type??"default"}getCategoryHeaderClass(e){let i=this.getCategoryType(e);return ch[i]?.header??"bg-base-200"}getCategoryIconClass(e){let i=this.getCategoryType(e);return ch[i]?.icon??"bg-base-300"}getCategoryCountClass(e){let i=this.getCategoryType(e);return ch[i]?.count??"bg-base-300 text-base-content"}getChangeCount(e){return(e.match(/<li>/gi)||[]).length}static{this.\u0275fac=function(i){return new(i||t)(le(pl),le(yl))}}static{this.\u0275cmp=A({type:t,selectors:[["cc-changelog-dialog"]],viewQuery:function(i,n){i&1&&tt(n.dialogElement,hy,5),i&2&&it()},decls:33,vars:2,consts:[["dialog",""],[1,"modal","backdrop-blur-sm"],[1,"modal-box","max-w-2xl","p-0","overflow-hidden","bg-gradient-to-b","from-base-100","to-base-200","shadow-2xl"],[1,"relative","px-8","pt-8","pb-6","bg-gradient-to-br","from-primary/5","via-transparent","to-accent/5"],[1,"absolute","top-0","right-0","w-32","h-32","bg-gradient-to-bl","from-primary/10","to-transparent","rounded-bl-full"],[1,"relative"],[1,"inline-block","px-3","py-1","mb-3","text-xs","font-semibold","tracking-wider","uppercase","rounded-full","bg-primary/10","text-primary"],[1,"text-3xl","font-bold","tracking-tight","text-base-content"],[1,"flex","items-center","gap-3","mt-3"],[1,"inline-flex","items-center","px-3","py-1.5","text-sm","font-mono","font-medium","rounded-lg","bg-base-200","text-base-content/70","border","border-base-300"],["fill","none","stroke","currentColor","viewBox","0 0 24 24",1,"w-5","h-5","text-base-content/40"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M13 7l5 5m0 0l-5 5m5-5H6"],[1,"inline-flex","items-center","px-3","py-1.5","text-sm","font-mono","font-semibold","rounded-lg","bg-primary/10","text-primary","border","border-primary/20"],[1,"px-8","py-6","max-h-[60vh]","overflow-y-auto"],[1,"flex","flex-col","gap-4"],[1,"rounded-xl","overflow-hidden","bg-base-100","border","border-base-300/50","shadow-sm"],[1,"px-8","py-5","border-t","border-base-300/50","bg-base-200/50"],[1,"flex","items-center","justify-between"],["href","https://github.com/MaibornWolff/codecharta/releases","target","_blank","rel","noopener noreferrer",1,"inline-flex","items-center","gap-2","text-sm","font-medium","transition-colors","text-primary","hover:text-primary/80"],["fill","none","stroke","currentColor","viewBox","0 0 24 24",1,"w-4","h-4"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"],[1,"btn","btn-primary","btn-sm","px-6",3,"click"],["method","dialog",1,"modal-backdrop","bg-base-content/60"],[3,"click"],[1,"flex","items-center","gap-3","px-4","py-3","border-b","border-base-200",3,"ngClass"],[1,"flex","items-center","justify-center","w-8","h-8","rounded-lg","text-base",3,"ngClass"],[1,"text-base","font-semibold","text-base-content"],[1,"ml-auto","px-2","py-0.5","text-xs","font-semibold","rounded-full",3,"ngClass"],[1,"px-6","py-4","text-sm","text-base-content/80","leading-snug","[&_a]:text-primary","[&_a]:hover:underline",3,"innerHTML"]],template:function(i,n){i&1&&(f(0,"dialog",1,0)(2,"div",2)(3,"div",3),W(4,"div",4),f(5,"div",5)(6,"span",6),x(7," Release Notes "),p(),f(8,"h2",7),x(9," What's new in CodeCharta? "),p(),f(10,"div",8)(11,"span",9),x(12),p(),ai(),f(13,"svg",10),W(14,"path",11),p(),Fd(),f(15,"span",12),x(16),p()()()(),f(17,"div",13)(18,"div",14),Ne(19,my,9,7,"div",15,uy),p()(),f(21,"div",16)(22,"div",17)(23,"a",18)(24,"span"),x(25,"View full changelog"),p(),ai(),f(26,"svg",19),W(27,"path",20),p()(),Fd(),f(28,"button",21),V("click",function(){return n.close()}),x(29," Got it "),p()()()(),f(30,"form",22)(31,"button",23),V("click",function(){return n.close()}),x(32,"close"),p()()()),i&2&&(h(12),we(" ",n.previousVersion()," "),h(4),we(" ",n.currentVersion," "),h(3),Ve(n.changes()))},dependencies:[lp],encapsulation:2})}}return t})();var I1=(()=>{class t{constructor(e,i){this.versionService=e,this.changelogParserService=i}get currentVersion(){return this.versionService.currentVersion}get previousVersion(){return this.versionService.previousVersion}get shouldShowChangelog(){return this.versionService.shouldShowChangelog}synchronizeVersion(){this.versionService.synchronizeVersion()}acknowledgeChangelog(){this.versionService.acknowledgeChangelog()}parseChangesBetweenVersions(e,i){return this.changelogParserService.parseChangesBetweenVersions(e,i)}static{this.\u0275fac=function(i){return new(i||t)(M(pl),M(yl))}}static{this.\u0275prov=O({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var F1=[rf,ps,Xp,Yp,Up,qi];var L1=(()=>{class t{constructor(e,i,n,r,a){this.store=e,this.threeSceneService=i,this.threeMapControlsService=n,this.actions$=r,this.globalSettingsFacade=a,this.autoFitRequests$=io(this.actions$.pipe(ct(di),Se(s=>({force:s.forceAutoFit}))),this.store.select(so).pipe(wi(1),Se(()=>({force:!1}))),ut(F1.map(s=>this.store.select(s))).pipe(wi(1),Se(()=>({force:!1})))),this.autoFitTo$=De(()=>this.autoFitRequests$.pipe(yi(this.globalSettingsFacade.resetCameraIfNewFileIsLoaded$()),Ae(([s,l])=>l||s.force),Ut(()=>this.threeSceneService.mapMeshChanged$.pipe(wt(1))),Le(()=>{this.threeMapControlsService.autoFitTo()})),{dispatch:!1})}static{this.\u0275fac=function(i){return new(i||t)(M(me),M(bt),M(Et),M(mt),M(pg))}}static{this.\u0275prov=O({token:t,factory:t.\u0275fac})}}return t})();var D1=[xs,So,ws,ys,On,zn,uf,Es,mf,cf,Ai,hi,lo,co,yo,wo,Nn,Ln,Dn,gs,bo,ho,Ti,vo,xo,ki,fo,Vn,el,Ii,Zt,Yt,Bn,qs,Ss,Cs,ui,Fi,Ri,Mt,Wn,$n,Co,Mo,uo,mo,go,po,ei];var Zo=Object.freeze({geometry:!0,colors:!0,labels:!0,arrows:!0}),py=new Map([[ki.type,{labels:!0}],[fo.type,{labels:!0}],[po.type,{labels:!0}],[go.type,{labels:!0}],[yo.type,{labels:!0}],[wo.type,{labels:!0}],[uo.type,{labels:!0}],[mo.type,{labels:!0}],[Zt.type,{arrows:!0}],[ho.type,{arrows:!0}],[Ti.type,{arrows:!0}],[vo.type,{arrows:!0}],[xo.type,{arrows:!0}],[Mt.type,{colors:!0}],[Ii.type,{colors:!0}],[Yt.type,{colors:!0}],[hi.type,{colors:!0}],[lo.type,{colors:!0}],[co.type,{colors:!0}],[Ai.type,{colors:!0}],[Nn.type,{colors:!0}],[$n.type,{colors:!0}],[Co.type,{colors:!0}],[Mo.type,{colors:!0}],[bo.type,{labels:!0,arrows:!0}]]);function P1(t){let o=py.get(t.type);return o?N1(o):ae({},Zo)}function N1(t){let o=t.geometry===!0,e=o||t.colors===!0;return{geometry:o,colors:e,labels:e||t.labels===!0,arrows:o||t.arrows===!0}}function V1(t){return N1({geometry:t.some(({geometry:o})=>o),colors:t.some(({colors:o})=>o),labels:t.some(({labels:o})=>o),arrows:t.some(({arrows:o})=>o)})}function W1(t,o,e,i){let n=new Map;for(let r of t){let a=o(r),s=n.get(a);s?s.push(r):n.set(a,[r])}return[...n.values()].flatMap(r=>hh(r,e,i))}function hh(t,o,e){let i=Math.floor(e);if(Number.isNaN(i)||i<=0)return[];let n=r=>fy(o(r));return t.length<=i?[...t].sort((r,a)=>n(a)-n(r)):gy(t,n,i)}function fy(t){return Number.isNaN(t)?Number.NEGATIVE_INFINITY:t}function gy(t,o,e){let i=[],n=Number.POSITIVE_INFINITY;for(let r of t){let a=o(r);if(i.length<e)B1(i,r,a,o);else if(a>n)i.pop(),B1(i,r,a,o);else continue;i.length===e&&(n=o(i[e-1]))}return i}function B1(t,o,e,i){let n=t.length;for(;n>0&&i(t[n-1])<e;)n--;t.splice(n,0,o)}var O1=Ge(Bf,Fn,ds,(t,o,e)=>new Set(by(t,o,e))),by=(t,o,e)=>{let i=[],n=Math.floor(e);if(Number.isNaN(n)||n<=0)return i;let r=t.get(o);if(r===void 0)return i;for(let a of r.keys())if(i.push(a),i.length>=n)break;return i};var z1=(t,o,e,i,n)=>{for(let r of o)if(r.visible=ci.none,r.attributes[e]!==void 0){let a=t.has(r.fromNodeName),s=t.has(r.toNodeName),l=i&&s,d=n&&a;d&&l?r.visible=ci.both:d?r.visible=ci.from:l&&(r.visible=ci.to)}};var $1=Ge(O1,Vs,Fn,Zp,Jp,(t,o,e,i,n)=>{let r=Sp(o);return z1(t,r,e,i,n),r});var br=(()=>{class t{constructor(e,i,n,r,a){this.store=e,this.ccStateSnapshot=i,this.mapStateReadWindow=n,this.sharedViewReadWindow=r,this.nodeInteraction=a}getState(){return this.ccStateSnapshot.get()}getMapState(){return this.mapStateReadWindow.getMapState()}getEdges(){return Vs(this.ccStateSnapshot.get())}getEdgeVisibility(){return $1(this.ccStateSnapshot.get())}getIdToNode(){return Nf(this.ccStateSnapshot.get())}hoverNode(e){this.nodeInteraction.hoverNode(e)}clearKeptHighlight(){this.nodeInteraction.clearKeptHighlight()}setRightClickedNodeData(e){this.store.dispatch(ks({value:e}))}setColorLabels(e){this.store.dispatch(Ai({value:e}))}static{this.\u0275fac=function(i){return new(i||t)(M(me),M(Pt),M(Ee),M(_t),M(qo))}}static{this.\u0275prov=O({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Cl=class t{constructor(o,e,i){this.badge=null,this.labelSize=i;let n=document.createElement("div");if(this.content=document.createElement("div"),this.content.style.cssText=t.buildContentStyles(i),o){let r=document.createElement("span");r.style.cssText="display: block; font-weight: 500;",r.textContent=o,this.content.appendChild(r)}if(e){let r=document.createElement("span");r.style.cssText=`display: block; font-size: ${10*i}px; color: #666; margin-top: 1px;`,r.textContent=e,this.content.appendChild(r)}n.appendChild(this.content),this.cssObject=new Zf(n),this.cssObject.center.set(.5,1)}getContentRect(){return this.content.getBoundingClientRect()}getContentElement(){return this.content}setOpacity(o){this.content.style.opacity=o}setTransform(o){this.content.style.transform=`translateY(${-20+o}px)`}setTransition(o){this.content.style.transition=o}setBadge(o){this.clearBadge(),this.badge=document.createElement("div"),this.badge.textContent=`+${o} more`,this.badge.style.cssText=`
3611
+ `;var ly=["Added","Fixed","Changed","Removed","Chore"],wl=(()=>{class e{parseChangesBetweenVersions(t,i){Qe.use(q1());let r=Qe.parse(T1).split(`
3612
+ `),a=this.findVersionLine(r,i),s=this.findVersionLine(r,t);if(a===-1||s===-1)return[];let l=r.slice(a,s+1);return this.extractCategories(l)}extractCategories(t){let i=[];for(let n of ly){let r=new RegExp(String.raw`<h3>${n}\b[^<]*</h3>`),a=this.findAllIndexes(t,r),s=[];for(let l of a){let d=l+2,c=this.findEndOfChanges(t,l);for(let u of t.slice(d,c))s.push(u)}s.length>0&&i.push({title:n,changes:s.join(`
3613
+ `)})}return i}findAllIndexes(t,i){return t.reduce((n,r,a)=>(i.test(r)&&n.push(a),n),[])}findVersionLine(t,i){let n=new RegExp(String.raw`\[${i}]`);return t.findIndex(r=>n.test(r))}findEndOfChanges(t,i){return i+t.slice(i+1).findIndex(n=>/<h3>/.test(n)||/<h2>/.test(n))}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=O({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var cy=["dialog"],dy=(e,o)=>o.title;function hy(e,o){if(e&1&&(f(0,"div",15)(1,"div",24)(2,"span",25),x(3),p(),f(4,"h3",26),x(5),p(),f(6,"span",27),x(7),p()(),W(8,"div",28),p()),e&2){let t=o.$implicit,i=L();h(),R("ngClass",i.getCategoryHeaderClass(t.title)),h(),R("ngClass",i.getCategoryIconClass(t.title)),h(),we(" ",i.getCategoryEmoji(t.title)," "),h(2),we(" ",i.getCategoryLabel(t.title)," "),h(),R("ngClass",i.getCategoryCountClass(t.title)),h(),we(" ",i.getChangeCount(t.changes)," "),h(),R("innerHTML",t.changes,$m)}}var sh={Added:{emoji:"\u{1F680}",label:"Added",type:"added"},Fixed:{emoji:"\u{1F41E}",label:"Fixed",type:"fixed"},Changed:{emoji:"\u2728",label:"Changed",type:"changed"},Removed:{emoji:"\u{1F5D1}",label:"Removed",type:"removed"},Chore:{emoji:"\u{1F527}",label:"Maintenance",type:"chore"}},lh={added:{header:"bg-success/5",icon:"bg-success/10",count:"bg-success/10 text-success"},fixed:{header:"bg-info/5",icon:"bg-info/10",count:"bg-info/10 text-info"},changed:{header:"bg-warning/5",icon:"bg-warning/10",count:"bg-warning/10 text-warning"},removed:{header:"bg-error/5",icon:"bg-error/10",count:"bg-error/10 text-error"},chore:{header:"bg-neutral/5",icon:"bg-neutral/10",count:"bg-neutral/10 text-neutral"}},ch=(()=>{class e{constructor(t,i){this.versionService=t,this.changelogParserService=i,this.dialogElement=Ue.required("dialog"),this.previousVersion=this.versionService.previousVersion,this.currentVersion=this.versionService.currentVersion,this.shouldShowChangelog=this.versionService.shouldShowChangelog,this.changes=te(()=>{let n=this.previousVersion();return n?this.changelogParserService.parseChangesBetweenVersions(n,this.currentVersion):[]}),oo(()=>{if(this.shouldShowChangelog()){if(this.changes().length===0){this.versionService.acknowledgeChangelog();return}this.open()}})}open(){this.dialogElement().nativeElement.showModal()}close(){this.versionService.acknowledgeChangelog(),this.dialogElement().nativeElement.close()}getCategoryEmoji(t){return sh[t]?.emoji??"\u{1F4DD}"}getCategoryLabel(t){return sh[t]?.label??t}getCategoryType(t){return sh[t]?.type??"default"}getCategoryHeaderClass(t){let i=this.getCategoryType(t);return lh[i]?.header??"bg-base-200"}getCategoryIconClass(t){let i=this.getCategoryType(t);return lh[i]?.icon??"bg-base-300"}getCategoryCountClass(t){let i=this.getCategoryType(t);return lh[i]?.count??"bg-base-300 text-base-content"}getChangeCount(t){return(t.match(/<li>/gi)||[]).length}static{this.\u0275fac=function(i){return new(i||e)(le(ml),le(wl))}}static{this.\u0275cmp=A({type:e,selectors:[["cc-changelog-dialog"]],viewQuery:function(i,n){i&1&&tt(n.dialogElement,cy,5),i&2&&it()},decls:33,vars:2,consts:[["dialog",""],[1,"modal","backdrop-blur-sm"],[1,"modal-box","max-w-2xl","p-0","overflow-hidden","bg-gradient-to-b","from-base-100","to-base-200","shadow-2xl"],[1,"relative","px-8","pt-8","pb-6","bg-gradient-to-br","from-primary/5","via-transparent","to-accent/5"],[1,"absolute","top-0","right-0","w-32","h-32","bg-gradient-to-bl","from-primary/10","to-transparent","rounded-bl-full"],[1,"relative"],[1,"inline-block","px-3","py-1","mb-3","text-xs","font-semibold","tracking-wider","uppercase","rounded-full","bg-primary/10","text-primary"],[1,"text-3xl","font-bold","tracking-tight","text-base-content"],[1,"flex","items-center","gap-3","mt-3"],[1,"inline-flex","items-center","px-3","py-1.5","text-sm","font-mono","font-medium","rounded-lg","bg-base-200","text-base-content/70","border","border-base-300"],["fill","none","stroke","currentColor","viewBox","0 0 24 24",1,"w-5","h-5","text-base-content/40"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M13 7l5 5m0 0l-5 5m5-5H6"],[1,"inline-flex","items-center","px-3","py-1.5","text-sm","font-mono","font-semibold","rounded-lg","bg-primary/10","text-primary","border","border-primary/20"],[1,"px-8","py-6","max-h-[60vh]","overflow-y-auto"],[1,"flex","flex-col","gap-4"],[1,"rounded-xl","overflow-hidden","bg-base-100","border","border-base-300/50","shadow-sm"],[1,"px-8","py-5","border-t","border-base-300/50","bg-base-200/50"],[1,"flex","items-center","justify-between"],["href","https://github.com/MaibornWolff/codecharta/releases","target","_blank","rel","noopener noreferrer",1,"inline-flex","items-center","gap-2","text-sm","font-medium","transition-colors","text-primary","hover:text-primary/80"],["fill","none","stroke","currentColor","viewBox","0 0 24 24",1,"w-4","h-4"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"],[1,"btn","btn-primary","btn-sm","px-6",3,"click"],["method","dialog",1,"modal-backdrop","bg-base-content/60"],[3,"click"],[1,"flex","items-center","gap-3","px-4","py-3","border-b","border-base-200",3,"ngClass"],[1,"flex","items-center","justify-center","w-8","h-8","rounded-lg","text-base",3,"ngClass"],[1,"text-base","font-semibold","text-base-content"],[1,"ml-auto","px-2","py-0.5","text-xs","font-semibold","rounded-full",3,"ngClass"],[1,"px-6","py-4","text-sm","text-base-content/80","leading-snug","[&_a]:text-primary","[&_a]:hover:underline",3,"innerHTML"]],template:function(i,n){i&1&&(f(0,"dialog",1,0)(2,"div",2)(3,"div",3),W(4,"div",4),f(5,"div",5)(6,"span",6),x(7," Release Notes "),p(),f(8,"h2",7),x(9," What's new in CodeCharta? "),p(),f(10,"div",8)(11,"span",9),x(12),p(),ai(),f(13,"svg",10),W(14,"path",11),p(),Id(),f(15,"span",12),x(16),p()()()(),f(17,"div",13)(18,"div",14),Ne(19,hy,9,7,"div",15,dy),p()(),f(21,"div",16)(22,"div",17)(23,"a",18)(24,"span"),x(25,"View full changelog"),p(),ai(),f(26,"svg",19),W(27,"path",20),p()(),Id(),f(28,"button",21),V("click",function(){return n.close()}),x(29," Got it "),p()()()(),f(30,"form",22)(31,"button",23),V("click",function(){return n.close()}),x(32,"close"),p()()()),i&2&&(h(12),we(" ",n.previousVersion()," "),h(4),we(" ",n.currentVersion," "),h(3),Ve(n.changes()))},dependencies:[sp],encapsulation:2})}}return e})();var A1=(()=>{class e{constructor(t,i){this.versionService=t,this.changelogParserService=i}get currentVersion(){return this.versionService.currentVersion}get previousVersion(){return this.versionService.previousVersion}get shouldShowChangelog(){return this.versionService.shouldShowChangelog}synchronizeVersion(){this.versionService.synchronizeVersion()}acknowledgeChangelog(){this.versionService.acknowledgeChangelog()}parseChangesBetweenVersions(t,i){return this.changelogParserService.parseChangesBetweenVersions(t,i)}static{this.\u0275fac=function(i){return new(i||e)(M(ml),M(wl))}}static{this.\u0275prov=O({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var I1=[nf,ms,Gp,Qp,Hp,qi];var F1=(()=>{class e{constructor(t,i,n,r,a){this.store=t,this.threeSceneService=i,this.threeMapControlsService=n,this.actions$=r,this.globalSettingsFacade=a,this.autoFitRequests$=io(this.actions$.pipe(ct(di),_e(s=>({force:s.forceAutoFit}))),this.store.select(so).pipe(wi(1),_e(()=>({force:!1}))),ut(I1.map(s=>this.store.select(s))).pipe(wi(1),_e(()=>({force:!1})))),this.autoFitTo$=De(()=>this.autoFitRequests$.pipe(yi(this.globalSettingsFacade.resetCameraIfNewFileIsLoaded$()),Ie(([s,l])=>l||s.force),Ut(()=>this.threeSceneService.mapMeshChanged$.pipe(wt(1))),Le(()=>{this.threeMapControlsService.autoFitTo()})),{dispatch:!1})}static{this.\u0275fac=function(i){return new(i||e)(M(me),M(bt),M(Et),M(mt),M(mg))}}static{this.\u0275prov=O({token:e,factory:e.\u0275fac})}}return e})();var L1=[vs,So,xs,ws,On,zn,hf,_s,uf,lf,Ai,hi,lo,co,yo,wo,Nn,Ln,Dn,fs,bo,ho,Ti,vo,xo,ki,fo,Vn,Zs,Ii,Zt,Yt,Bn,ks,ys,Ss,ui,Fi,Ri,Mt,Wn,$n,Co,Mo,uo,mo,go,po,ei];var Zo=Object.freeze({geometry:!0,colors:!0,labels:!0,arrows:!0}),uy=new Map([[ki.type,{labels:!0}],[fo.type,{labels:!0}],[po.type,{labels:!0}],[go.type,{labels:!0}],[yo.type,{labels:!0}],[wo.type,{labels:!0}],[uo.type,{labels:!0}],[mo.type,{labels:!0}],[Zt.type,{arrows:!0}],[ho.type,{arrows:!0}],[Ti.type,{arrows:!0}],[vo.type,{arrows:!0}],[xo.type,{arrows:!0}],[Mt.type,{colors:!0}],[Ii.type,{colors:!0}],[Yt.type,{colors:!0}],[hi.type,{colors:!0}],[lo.type,{colors:!0}],[co.type,{colors:!0}],[Ai.type,{colors:!0}],[Nn.type,{colors:!0}],[$n.type,{colors:!0}],[Co.type,{colors:!0}],[Mo.type,{colors:!0}],[bo.type,{labels:!0,arrows:!0}]]);function D1(e){let o=uy.get(e.type);return o?P1(o):ae({},Zo)}function P1(e){let o=e.geometry===!0,t=o||e.colors===!0;return{geometry:o,colors:t,labels:t||e.labels===!0,arrows:o||e.arrows===!0}}function N1(e){return P1({geometry:e.some(({geometry:o})=>o),colors:e.some(({colors:o})=>o),labels:e.some(({labels:o})=>o),arrows:e.some(({arrows:o})=>o)})}function B1(e,o,t,i){let n=new Map;for(let r of e){let a=o(r),s=n.get(a);s?s.push(r):n.set(a,[r])}return[...n.values()].flatMap(r=>dh(r,t,i))}function dh(e,o,t){let i=Math.floor(t);if(Number.isNaN(i)||i<=0)return[];let n=r=>my(o(r));return e.length<=i?[...e].sort((r,a)=>n(a)-n(r)):py(e,n,i)}function my(e){return Number.isNaN(e)?Number.NEGATIVE_INFINITY:e}function py(e,o,t){let i=[],n=Number.POSITIVE_INFINITY;for(let r of e){let a=o(r);if(i.length<t)V1(i,r,a,o);else if(a>n)i.pop(),V1(i,r,a,o);else continue;i.length===t&&(n=o(i[t-1]))}return i}function V1(e,o,t,i){let n=e.length;for(;n>0&&i(e[n-1])<t;)n--;e.splice(n,0,o)}var W1=Xe(Vf,Fn,cs,(e,o,t)=>new Set(fy(e,o,t))),fy=(e,o,t)=>{let i=[],n=Math.floor(t);if(Number.isNaN(n)||n<=0)return i;let r=e.get(o);if(r===void 0)return i;for(let a of r.keys())if(i.push(a),i.length>=n)break;return i};var O1=(e,o,t,i,n)=>{for(let r of o)if(r.visible=ci.none,r.attributes[t]!==void 0){let a=e.has(r.fromNodeName),s=e.has(r.toNodeName),l=i&&s,d=n&&a;d&&l?r.visible=ci.both:d?r.visible=ci.from:l&&(r.visible=ci.to)}};var z1=Xe(W1,Ns,Fn,Yp,Zp,(e,o,t,i,n)=>{let r=yp(o);return O1(e,r,t,i,n),r});var gr=(()=>{class e{constructor(t,i,n,r,a){this.store=t,this.ccStateSnapshot=i,this.mapStateReadWindow=n,this.sharedViewReadWindow=r,this.nodeInteraction=a}getState(){return this.ccStateSnapshot.get()}getMapState(){return this.mapStateReadWindow.getMapState()}getEdges(){return Ns(this.ccStateSnapshot.get())}getEdgeVisibility(){return z1(this.ccStateSnapshot.get())}getIdToNode(){return Pf(this.ccStateSnapshot.get())}hoverNode(t){this.nodeInteraction.hoverNode(t)}clearKeptHighlight(){this.nodeInteraction.clearKeptHighlight()}setRightClickedNodeData(t){this.store.dispatch(Es({value:t}))}setColorLabels(t){this.store.dispatch(Ai({value:t}))}static{this.\u0275fac=function(i){return new(i||e)(M(me),M(Pt),M(Ee),M(_t),M(qo))}}static{this.\u0275prov=O({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Sl=class e{constructor(o,t,i){this.badge=null,this.labelSize=i;let n=document.createElement("div");if(this.content=document.createElement("div"),this.content.style.cssText=e.buildContentStyles(i),o){let r=document.createElement("span");r.style.cssText="display: block; font-weight: 500;",r.textContent=o,this.content.appendChild(r)}if(t){let r=document.createElement("span");r.style.cssText=`display: block; font-size: ${10*i}px; color: #666; margin-top: 1px;`,r.textContent=t,this.content.appendChild(r)}n.appendChild(this.content),this.cssObject=new Yf(n),this.cssObject.center.set(.5,1)}getContentRect(){return this.content.getBoundingClientRect()}getContentElement(){return this.content}setOpacity(o){this.content.style.opacity=o}setTransform(o){this.content.style.transform=`translateY(${-20+o}px)`}setTransition(o){this.content.style.transition=o}setBadge(o){this.clearBadge(),this.badge=document.createElement("div"),this.badge.textContent=`+${o} more`,this.badge.style.cssText=`
3583
3614
  font-size: ${10*this.labelSize}px;
3584
3615
  color: #888;
3585
3616
  margin-top: 2px;
@@ -3602,26 +3633,26 @@ Fixed release issues
3602
3633
  transform: translateY(${-20}px);
3603
3634
  opacity: 0;
3604
3635
  transition: opacity 0.2s ease-out;
3605
- `}};var Ml=(()=>{class t{constructor(e){this.ccStateSnapshot=e}getValue(){return this.ccStateSnapshot.get()}isLabelsPerMapActive(){return js(this.ccStateSnapshot.get())}static{this.\u0275fac=function(i){return new(i||t)(M(Pt))}}static{this.\u0275prov=O({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var _l=(()=>{class t{constructor(e,i){this.stateAccessStore=e,this.threeSceneService=i,this.labels=[],this.suppressedLabel=null}getLabels(){return this.labels}getSuppressedLabel(){return this.suppressedLabel}addLeafLabel(e,i){this.createLabel(e,i,!1)}addSelectionLabel(e){this.createLabel(e,0,!0)}createLabel(e,i,n){let{mapState:r}=this.stateAccessStore.getValue(),{scaling:a,showMetricLabelNodeName:s,showMetricLabelNameValue:l,labelMode:d,labelSize:c}=r,{heightMetric:u,colorMetric:m}=r,g=new Ze(a.x,a.y,a.z),b="";if(s||n&&!l)b=e.name;else if(!l)return;let y="";if(l){let G=d===Hi.Color?m:u;y=`${e.attributes[G]} ${G}`}let q=new Cl(b,y,c),D=q.cssObject;D.userData={node:e};let j=e.height+Math.abs(e.heightDelta??0),k=Math.max(j,i),N=(e.x0-Od+e.width/2)*g.x,z=(e.y0-Od+e.length/2)*g.z;D.position.set(N,(e.z0+k)*g.y,z);let H=new Ze(N,(e.z0+j)*g.y,z);this.threeSceneService.labels.add(D),this.labels.push({labelElement:q,node:e,buildingTop:H,appliedOffset:0,isSelectionLabel:n})}clearLabels(){this.threeSceneService.labels.clear(),this.labels=[],this.suppressedLabel=null}clearSelectionLabel(){let e=this.labels.findIndex(n=>n.isSelectionLabel);if(e===-1)return;let[i]=this.labels.splice(e,1);i===this.suppressedLabel&&(this.suppressedLabel=null),this.threeSceneService.labels.remove(i.labelElement.cssObject)}hasLabelForNode(e){return this.labels.some(i=>i.node===e)}suppressLabelForNode(e){this.restoreSuppressedLabel();let i=this.labels.find(n=>n.node===e);i&&(this.suppressedLabel=i,i.labelElement.setTransition("opacity 0.2s ease-out"),i.labelElement.setOpacity("0"))}restoreSuppressedLabel(){this.suppressedLabel&&(this.suppressedLabel.labelElement.setOpacity("1"),this.suppressedLabel=null)}static{this.\u0275fac=function(i){return new(i||t)(M(Ml),M(bt))}}static{this.\u0275prov=O({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var El=(()=>{class t{constructor(e,i){this.threeRendererService=e,this.threeSceneService=i,this.connectorSegments=null,this.connectorPositions=null,this.connectorsDirty=!0,this.lastDrawnVertexCount=0,this.projectionVec=new Ze}drawConnectors(e,i){this.connectorSegments||this.initConnectors();let n=this.threeRendererService.camera;if(!n)return;let r=this.threeRendererService.labelRenderer?.domElement,a=r?r.clientHeight:window.innerHeight;if(a===0)return;let s=this.connectorPositions,l=0;for(let d of e){if(d.hidden||d.offset>100||d.label===i)continue;let c=d.label.buildingTop,u=d.label.labelElement.cssObject.position;if(u.y-c.y<.5)continue;if(l>=400)break;this.projectionVec.copy(u).project(n);let g=-20+d.offset;this.projectionVec.y-=g*2/a,this.projectionVec.unproject(n);let b=l*3;s[b]=c.x,s[b+1]=c.y,s[b+2]=c.z,l++;let y=l*3;s[y]=this.projectionVec.x,s[y+1]=this.projectionVec.y,s[y+2]=this.projectionVec.z,l++}this.connectorSegments.geometry.setDrawRange(0,l),this.connectorSegments.geometry.attributes.position.needsUpdate=!0,l!==this.lastDrawnVertexCount&&(this.connectorsDirty=!0),this.lastDrawnVertexCount=l}clearConnectors(){this.connectorSegments&&this.connectorSegments.geometry.setDrawRange(0,0),this.connectorsDirty=!0,this.lastDrawnVertexCount=0}isDirty(){return this.connectorsDirty}markClean(){this.connectorsDirty=!1}destroy(){this.connectorSegments&&(this.connectorSegments.geometry.dispose(),this.connectorSegments.material.dispose(),this.threeSceneService.scene.remove(this.connectorSegments),this.connectorSegments=null,this.connectorPositions=null)}initConnectors(){let e=400;this.connectorPositions=new Float32Array(e*3);let i=new Jt;i.setAttribute("position",new _o(this.connectorPositions,3)),i.setDrawRange(0,0);let n=new As({color:11842740,transparent:!0,opacity:.9,depthTest:!0});this.connectorSegments=new xf(i,n),this.connectorSegments.frustumCulled=!1,this.threeSceneService.scene.add(this.connectorSegments)}static{this.\u0275fac=function(i){return new(i||t)(M(Nt),M(bt))}}static{this.\u0275prov=O({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var K1=(()=>{class t{constructor(e,i,n,r,a){this.threeRendererService=e,this.tooltipService=i,this.labelCreationService=n,this.stateAccessStore=r,this.connectorDrawingService=a,this._suppressLayout=!1,this.threeRendererService.afterRender$.subscribe(()=>this.updateLabelLayout())}setSuppressLayout(e){this._suppressLayout=e}updateLabelLayout(){let e=this.labelCreationService.getLabels();if(this._suppressLayout||e.length===0){this.connectorDrawingService.clearConnectors(),this.clearBadges(e);return}this.clearBadges(e);let i=this.collectLabelInfos(e),n=this.tooltipService.getRect();this.resolveCollisions(i),this.resolveTooltipCollisions(i,n),this.applyCollisionOffsets(i);let r=this.labelCreationService.getSuppressedLabel();this.connectorDrawingService.drawConnectors(i,r),this.connectorDrawingService.isDirty()&&(this.connectorDrawingService.markClean(),this.threeRendererService.render())}destroy(){this.clearBadges(this.labelCreationService.getLabels()),this.labelCreationService.clearLabels(),this.connectorDrawingService.destroy()}clearBadges(e){for(let i of e)i.labelElement.clearBadge()}collectLabelInfos(e){let i=[];for(let n of e){let r=n.labelElement.getContentRect(),a={top:r.top-n.appliedOffset,bottom:r.bottom-n.appliedOffset,left:r.left,right:r.right,width:r.width,height:r.height,x:r.x,y:r.y-n.appliedOffset};i.push({label:n,rect:a,offset:0,hidden:!1})}return i}resolveCollisions(e){let{mapState:i}=this.stateAccessStore.getValue();if(!i.groupLabelCollisions)return;let n=this.labelCreationService.getSuppressedLabel(),r=e.filter(l=>l.label!==n);if(r.length===0)return;let a=this.buildCollisionGroups(r,this.stateAccessStore.isLabelsPerMapActive()),s=i.labelMode===Hi.Color?i.colorMetric:i.heightMetric;for(let l of a){if(l.length<=1)continue;let d=this.pickGroupWinner(l,s);for(let c of l)c!==d&&(c.hidden=!0);d.label.labelElement.setBadge(l.length-1)}}buildCollisionGroups(e,i){let n=e.length,r=Array.from({length:n},(c,u)=>u),a=i?e.map(c=>_s(c.label.node.path)):void 0,s=c=>{for(;r[c]!==c;)r[c]=r[r[c]],c=r[c];return c},l=(c,u)=>{let m=s(c),g=s(u);m!==g&&(r[m]=g)};for(let c=0;c<n;c++)for(let u=c+1;u<n;u++)a!==void 0&&a[c]!==a[u]||this.rectsOverlap(e[c].rect,e[u].rect)&&l(c,u);let d=new Map;for(let c=0;c<n;c++){let u=s(c);d.has(u)||d.set(u,[]),d.get(u).push(e[c])}return[...d.values()]}rectsOverlap(e,i){return e.right>i.left&&e.left<i.right&&e.bottom>i.top&&e.top<i.bottom}pickGroupWinner(e,i){let n=e[0],r=n.label.node.attributes[i]??0;for(let a=1;a<e.length;a++){let s=e[a].label.node.attributes[i]??0;(s>r||s===r&&e[a].label.node.path<n.label.node.path)&&(r=s,n=e[a])}return n}resolveTooltipCollisions(e,i){if(!i)return;let n=12,r=i.left-n,a=i.right+n,s=i.top-n,l=i.bottom+n,d=this.labelCreationService.getSuppressedLabel();for(let c of e){if(c.hidden||c.label===d)continue;let u=c.rect.top+c.offset,m=c.rect.bottom+c.offset,g=c.rect.right>r&&c.rect.left<a,b=m>s&&u<l;if(g&&b){let y=l+4-u;y>0&&(c.offset+=y)}}}applyCollisionOffsets(e){let i=this.labelCreationService.getSuppressedLabel();for(let n of e){let r=n.label.labelElement,a=n.label===i;n.hidden||n.offset>100?(r.setOpacity("0"),r.setTransform(0),n.label.appliedOffset=0):(r.setOpacity(a?"0":"1"),r.setTransform(n.offset),n.label.appliedOffset=n.offset)}}static{this.\u0275fac=function(i){return new(i||t)(M(Nt),M(Jn),M(_l),M(Ml),M(El))}}static{this.\u0275prov=O({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Q1=(()=>{class t{constructor(e,i){this.store=e,this.ccStateSnapshot=i}setLabelMode(e){this.store.dispatch(po({value:e}))}setAmountOfTopLabels(e){this.store.dispatch(ki({value:e}))}setLabelSize(e){this.store.dispatch(fo({value:e}))}setLabelsPerMap(e){this.store.dispatch(go({value:e}))}setShowMetricLabelNodeName(e){this.store.dispatch(yo({value:e}))}setShowMetricLabelNameValue(e){this.store.dispatch(wo({value:e}))}setColorLabels(e){this.store.dispatch(Ai({value:e}))}setGroupLabelCollisions(e){this.store.dispatch(mo({value:e}))}resetSettings(e){let i=ig(e,this.ccStateSnapshot.get());i.mapState?.amountOfTopLabels!==void 0&&(i.mapState.amountOfTopLabels=10),this.store.dispatch(ei({value:i}))}static{this.\u0275fac=function(i){return new(i||t)(M(me),M(Pt))}}static{this.\u0275prov=O({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function Ey(t,o){if(t&1){let e=ue();_(0,"div",5)(1,"input",17),re("change",function(){oe(e);let n=L();return ne(n.setLabelsPerMap(!1))}),T(),_(2,"input",18),re("change",function(){oe(e);let n=L();return ne(n.setLabelsPerMap(!0))}),T()()}if(t&2){let e=L();h(),xe("checked",!e.labelsPerMap()),h(),xe("checked",e.labelsPerMap())}}function ky(t,o){if(t&1){let e=ue();_(0,"div",14)(1,"span",19),x(2,"By Color Metric"),T(),_(3,"label",12)(4,"input",20),re("change",function(n){oe(e);let r=L();return ne(r.setColorLabel(n,"positive"))}),T(),Ce(5,"span",21),_(6,"span",22),x(7),T()(),_(8,"label",12)(9,"input",23),re("change",function(n){oe(e);let r=L();return ne(r.setColorLabel(n,"neutral"))}),T(),Ce(10,"span",21),_(11,"span",22),x(12),T()(),_(13,"label",12)(14,"input",24),re("change",function(n){oe(e);let r=L();return ne(r.setColorLabel(n,"negative"))}),T(),Ce(15,"span",21),_(16,"span",22),x(17),T()()()}if(t&2){let e=L();h(4),xe("checked",e.colorLabels().positive)("disabled",e.colorCategoryCounts().positive===0),h(),ze("background-color",e.mapColors().positive),h(2),we("(",e.colorCategoryCounts().positive,")"),h(2),xe("checked",e.colorLabels().neutral)("disabled",e.colorCategoryCounts().neutral===0),h(),ze("background-color",e.mapColors().neutral),h(2),we("(",e.colorCategoryCounts().neutral,")"),h(2),xe("checked",e.colorLabels().negative)("disabled",e.colorCategoryCounts().negative===0),h(),ze("background-color",e.mapColors().negative),h(2),we("(",e.colorCategoryCounts().negative,")")}}var gh=(()=>{class t{constructor(){this.mapStateReadWindow=E(Ee),this.fileStoreReadWindow=E(Fe),this.labelSettingsWriteStore=E(Q1),this.colorCategoryCountsStore=E(er),this.LabelMode=Hi,this.MIN_LABEL_SIZE=.75,this.MAX_LABEL_SIZE=2.5,this.LABEL_SIZE_STEP=.25,this.resetSettingsKeys=["mapState.amountOfTopLabels","mapState.labelSize","mapState.showMetricLabelNodeName","mapState.showMetricLabelNameValue","mapState.colorLabels","mapState.labelMode","mapState.groupLabelCollisions","mapState.labelsPerMap"],this.amountOfTopLabels=F(this.mapStateReadWindow.amountOfTopLabels$,{requireSync:!0}),this.labelSize=F(this.mapStateReadWindow.labelSize$,{requireSync:!0}),this.showMetricLabelNodeName=F(this.mapStateReadWindow.showMetricLabelNodeName$,{requireSync:!0}),this.showMetricLabelNodeValue=F(this.mapStateReadWindow.showMetricLabelNameValue$,{requireSync:!0}),this.colorLabels=F(this.mapStateReadWindow.colorLabels$,{requireSync:!0}),this.mapColors=F(this.mapStateReadWindow.mapColors$,{requireSync:!0}),this.isDeltaState=F(this.fileStoreReadWindow.isDeltaState$,{requireSync:!0}),this.labelMode=F(this.mapStateReadWindow.labelMode$,{requireSync:!0}),this.colorCategoryCounts=F(this.colorCategoryCountsStore.colorCategoryCounts$,{requireSync:!0}),this.groupLabelCollisions=F(this.mapStateReadWindow.groupLabelCollisions$,{requireSync:!0}),this.labelsPerMap=F(this.mapStateReadWindow.labelsPerMap$,{requireSync:!0}),this.areMultipleMapsVisible=F(this.fileStoreReadWindow.areMultipleMapsVisible$,{requireSync:!0}),this.showColorLabels=te(()=>this.labelMode()===Hi.Color&&!this.isDeltaState()),this.topLabelsTitle=te(()=>{let e=`Display the labels of the ${this.amountOfTopLabels()} highest buildings`;return this.labelsPerMap()&&this.areMultipleMapsVisible()?`${e} per map`:e}),this.applyDebouncedTopLabels=Ui(e=>{this.labelSettingsWriteStore.setAmountOfTopLabels(e)},t.DEBOUNCE_TIME),this.applyDebouncedLabelSize=Ui(e=>{this.labelSettingsWriteStore.setLabelSize(e)},t.DEBOUNCE_TIME)}static{this.DEBOUNCE_TIME=400}handleTopLabelsInput(e){let i=ng(e,0,50,{round:!0});if(!Number.isNaN(i)){if(i===this.amountOfTopLabels()){this.applyDebouncedTopLabels.cancel();return}this.applyDebouncedTopLabels(i)}}handleLabelSizeInput(e){let i=Number.parseFloat(e.target.value);if(Number.isNaN(i))return;let n=Math.min(2.5,Math.max(.75,i)),r=Math.round(n/.25)*.25,a=Math.round(r*100)/100;if(a===this.labelSize()){this.applyDebouncedLabelSize.cancel();return}this.applyDebouncedLabelSize(a)}setShowMetricLabelNodeName(e){this.labelSettingsWriteStore.setShowMetricLabelNodeName(e.target.checked)}setShowMetricLabelNameValue(e){this.labelSettingsWriteStore.setShowMetricLabelNameValue(e.target.checked)}setColorLabel(e,i){this.labelSettingsWriteStore.setColorLabels({[i]:e.target.checked})}setLabelMode(e){this.labelSettingsWriteStore.setLabelMode(e)}setGroupLabelCollisions(e){this.labelSettingsWriteStore.setGroupLabelCollisions(e.target.checked)}setLabelsPerMap(e){this.labelSettingsWriteStore.setLabelsPerMap(e)}resetSettings(){this.labelSettingsWriteStore.resetSettings(this.resetSettingsKeys)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["cc-label-settings-panel"]],hostAttrs:[1,"contents"],decls:33,vars:18,consts:[[3,"title"],[1,"text-sm"],[1,"flex","items-center","gap-2"],["type","range","aria-label","Top Labels","min","0","max","50",1,"range","range-primary","range-sm","flex-1",3,"input","value"],["type","number","aria-label","Top Labels","min","0","max","50",1,"input","input-sm","input-bordered","w-16","text-center",3,"input","value"],["aria-label","Top labels scope","title","Pick the top labels across all maps combined or separately for each map",1,"join","w-full"],["title","Scale floating label font size"],["type","range","aria-label","Label Size",1,"range","range-primary","range-sm","flex-1",3,"input","min","max","step","value"],["type","number","aria-label","Label Size",1,"input","input-sm","input-bordered","w-16","text-center",3,"input","min","max","step","value"],["aria-label","Label mode",1,"join","w-full"],["type","radio","name","labelMode","aria-label","Height",1,"join-item","btn","btn-sm","flex-1",3,"change","checked"],["type","radio","name","labelMode","aria-label","Color",1,"join-item","btn","btn-sm","flex-1",3,"change","checked"],[1,"flex","items-center","gap-2","cursor-pointer"],["type","checkbox",1,"checkbox","checkbox-sm","checkbox-primary",3,"change","checked"],[1,"flex","flex-col","gap-1"],["title","Reset label settings to their defaults",1,"btn","btn-outline","btn-error","gap-2",3,"click"],[1,"fa","fa-undo"],["type","radio","name","labelsPerMap","aria-label","All maps",1,"join-item","btn","btn-sm","flex-1",3,"change","checked"],["type","radio","name","labelsPerMap","aria-label","Per map",1,"join-item","btn","btn-sm","flex-1",3,"change","checked"],[1,"text-xs","opacity-60","mb-0.5"],["type","checkbox","aria-label","positive color label",1,"checkbox","checkbox-sm","checkbox-primary",3,"change","checked","disabled"],[1,"inline-block","w-4","h-4","rounded-sm"],[1,"text-xs","opacity-60"],["type","checkbox","aria-label","neutral color label",1,"checkbox","checkbox-sm","checkbox-primary",3,"change","checked","disabled"],["type","checkbox","aria-label","negative color label",1,"checkbox","checkbox-sm","checkbox-primary",3,"change","checked","disabled"]],template:function(i,n){i&1&&(_(0,"div",0)(1,"span",1),x(2,"Top Labels"),T(),_(3,"div",2)(4,"input",3),re("input",function(a){return n.handleTopLabelsInput(a)}),T(),_(5,"input",4),re("input",function(a){return n.handleTopLabelsInput(a)}),T()()(),K(6,Ey,3,2,"div",5),_(7,"div",6)(8,"span",1),x(9,"Label Size"),T(),_(10,"div",2)(11,"input",7),re("input",function(a){return n.handleLabelSizeInput(a)}),T(),_(12,"input",8),re("input",function(a){return n.handleLabelSizeInput(a)}),T()()(),_(13,"div",9)(14,"input",10),re("change",function(){return n.setLabelMode(n.LabelMode.Height)}),T(),_(15,"input",11),re("change",function(){return n.setLabelMode(n.LabelMode.Color)}),T()(),_(16,"label",12)(17,"input",13),re("change",function(a){return n.setShowMetricLabelNodeName(a)}),T(),_(18,"span"),x(19,"Show node names"),T()(),_(20,"label",12)(21,"input",13),re("change",function(a){return n.setShowMetricLabelNameValue(a)}),T(),_(22,"span"),x(23,"Show metric values"),T()(),_(24,"label",12)(25,"input",13),re("change",function(a){return n.setGroupLabelCollisions(a)}),T(),_(26,"span"),x(27,"Group overlapping labels"),T()(),K(28,ky,18,15,"div",14),_(29,"button",15),re("click",function(){return n.resetSettings()}),Ce(30,"i",16),_(31,"span"),x(32,"Reset label settings"),T()()),i&2&&(xe("title",n.topLabelsTitle()),h(4),xe("value",n.amountOfTopLabels()),h(),xe("value",n.amountOfTopLabels()),h(),Q(n.areMultipleMapsVisible()?6:-1),h(5),xe("min",n.MIN_LABEL_SIZE)("max",n.MAX_LABEL_SIZE)("step",n.LABEL_SIZE_STEP)("value",n.labelSize()),h(),xe("min",n.MIN_LABEL_SIZE)("max",n.MAX_LABEL_SIZE)("step",n.LABEL_SIZE_STEP)("value",n.labelSize()),h(2),xe("checked",n.labelMode()===n.LabelMode.Height),h(),xe("checked",n.labelMode()===n.LabelMode.Color),h(2),xe("checked",n.showMetricLabelNodeName()),h(4),xe("checked",n.showMetricLabelNodeValue()),h(4),xe("checked",n.groupLabelCollisions()),h(3),Q(n.showColorLabels()?28:-1))},encapsulation:2})}}return t})();var kl=(()=>{class t{constructor(e,i,n){this.labelCreationService=e,this.labelCollisionService=i,this.connectorDrawingService=n}addLeafLabel(e,i){this.labelCreationService.addLeafLabel(e,i)}addSelectionLabel(e){this.labelCreationService.addSelectionLabel(e)}clearLabels(){this.labelCreationService.clearLabels(),this.connectorDrawingService.clearConnectors()}clearSelectionLabel(){this.labelCreationService.clearSelectionLabel()}hasLabelForNode(e){return this.labelCreationService.hasLabelForNode(e)}suppressLabelForNode(e){this.labelCreationService.suppressLabelForNode(e)}restoreSuppressedLabel(){this.labelCreationService.restoreSuppressedLabel()}setSuppressLayout(e){this.labelCollisionService.setSuppressLayout(e)}destroy(){this.labelCollisionService.destroy(),this.connectorDrawingService.destroy()}static{this.\u0275fac=function(i){return new(i||t)(M(_l),M(K1),M(El))}}static{this.\u0275prov=O({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var e2=(()=>{class t{constructor(e,i,n,r){this.codeMapStore=e,this.sharedViewReadWindow=i,this.threeSceneService=n,this.threeMapVisibilityStore=r,this.map=new Map,this.VERTICES_PER_LINE=5,this.arrows=new Array,this.HIGHLIGHT_BUILDING_DELAY=1,this.debounceCalculation=Ui(a=>this.resetEdgesOfBuildings(a),this.HIGHLIGHT_BUILDING_DELAY),this.hoveredNodeSubscription=this.sharedViewReadWindow.hoveredNodePath$.pipe(Ae(()=>this.threeMapVisibilityStore.isMapShown()),Le(a=>{if(a!==null){let s=this.threeSceneService.getMapMesh()?.getMeshDescription().getBuildingByPath(a);this.onBuildingHovered(s)}else this.onBuildingUnhovered()})).subscribe(),this.resetEdgesOfBuildings=a=>{if(!this.codeMapStore.getMapState().isEdgeMetricVisible){this.scale();return}this.clearArrows(),this.showEdgesOfBuildings(this.isEdgeApplicableForBuilding(a)?a:void 0),this.scale()},this.onBuildingSelected=a=>{this.isEdgeApplicableForBuilding(a.building)&&(this.clearArrows(),this.showEdgesOfBuildings()),this.scale()},this.onBuildingDeselected=()=>{this.debounceCalculation.cancel(),this.clearArrows(),this.addEdgePreview()},this.threeSceneService.subscribe("onBuildingSelected",this.onBuildingSelected),this.threeSceneService.subscribe("onBuildingDeselected",this.onBuildingDeselected)}ngOnDestroy(){this.hoveredNodeSubscription.unsubscribe()}onBuildingHovered(e){this.debounceCalculation(e)}onBuildingUnhovered(){this.debounceCalculation.cancel();let{isEdgeMetricVisible:e}=this.codeMapStore.getMapState();e&&(this.clearArrows(),this.showEdgesOfBuildings()),this.scale()}clearArrows(){for(let e of this.arrows)e.traverse(i=>{i.geometry&&i.geometry.dispose(),i.material&&i.material.dispose()});this.arrows=[],this.threeSceneService.edgeArrows.children.length=0}addArrow(e,i,n){let r=this.codeMapStore.getMapState(),a=100*r.edgeHeight,s=this.createCurve(e,i,a),l=Wd.getNumber(r.mapColors[n?"outgoingEdge":"incomingEdge"]);this.highlightBuilding(n?i:e),this.setCurveColor(s,l)}addEdgePreview(){let e=this.codeMapStore.getEdgeVisibility();for(let i of e){let n=this.map.get(i.fromNodeName),r=this.map.get(i.toNodeName);if(n&&r&&i.visible!==ci.none&&i.visible){let a=100*this.codeMapStore.getMapState().edgeHeight,s=this.createCurve(n,r,a);this.previewMode(s,i.visible)}}}addEdgeMapBasedOnNodes(e){this.map=this.getNodesAsMap(e)}scale(){let{scaling:e}=this.codeMapStore.getMapState();for(let i of this.arrows)i.scale.x=e.x,i.scale.y=e.y,i.scale.z=e.z}isEdgeApplicableForBuilding(e){return this.codeMapStore.getMapState().isEdgeMetricVisible&&e&&!e.node.flat}showEdgesOfBuildings(e){let i=new Map,n=this.threeSceneService.getSelectedBuilding();if(n){let{node:r}=n;i.set(r.path,r)}if(e){let{node:r}=e;i.set(r.path,r)}i.size>0?this.buildPairingEdges(i):this.addEdgePreview()}buildPairingEdges(e){let{showIncomingEdges:i,showOutgoingEdges:n,edgeMetric:r}=this.codeMapStore.getMapState();if(!i&&!n)return;let a=this.codeMapStore.getEdges();for(let s of a){if(s.attributes[r]===void 0)continue;let l=this.map.get(s.fromNodeName);if(l===void 0)continue;let d=this.map.get(s.toNodeName);d!==void 0&&(n&&e.has(l.path)?(this.addArrow(l,d,!0),this.threeSceneService.applyHighlights()):i&&e.has(d.path)&&(this.addArrow(l,d,!1),this.threeSceneService.applyHighlights()))}}createCurve(e,i,n){let r=e.outgoingEdgePoint.clone(),a=i.incomingEdgePoint.clone(),s=Math.max(r.y+i.height,a.y+1)+n;return r.setY(s),a.setY(s),new wf(e.outgoingEdgePoint,r,a,i.incomingEdgePoint)}highlightBuilding(e){let i=this.threeSceneService.getMapMesh().getMeshDescription().getBuildingByPath(e.path);this.threeSceneService.addBuildingsToHighlightingList(i)}setCurveColor(e,i,n=50){let r=e.getPoints(n),a=this.buildLine(r,i);a.add(this.buildArrow(r)),this.threeSceneService.edgeArrows.add(a),this.arrows.push(a)}previewMode(e,i){if(i===ci.both||i===ci.from){let n=this.makeArrowFromBezier(e,!1);this.threeSceneService.edgeArrows.add(n),this.arrows.push(n)}if(i===ci.both||i===ci.to){let n=this.makeArrowFromBezier(e,!0);this.threeSceneService.edgeArrows.add(n),this.arrows.push(n)}}getNodesAsMap(e){let i=new Map;for(let n of e)i.set(n.path,n);return i}makeArrowFromBezier(e,i,n=50){let r=e.getPoints(n),{incomingEdge:a,outgoingEdge:s}=this.codeMapStore.getMapState().mapColors,l=i?a:s,d=i?r.slice(n+1-this.VERTICES_PER_LINE):r.slice(0,r.length-(n+1-this.VERTICES_PER_LINE));return this.buildEdge(d,Wd.getNumber(l))}buildEdge(e,i){let n=this.buildLine(e,i);return n.add(this.buildArrow(e)),n}buildLine(e,i=0){let n=new Jt;n.setFromPoints(e);let r=new As({color:i,linewidth:1});return new vf(n,r)}buildArrow(e,i=0,n=10,r=10){let a=e.at(-1).clone().sub(e.at(-2).clone()).normalize(),s=e.at(-1).clone();return a.y<0&&(s.y+=n+1),new _f(a,s,n+1,i,n,r)}static{this.\u0275fac=function(i){return new(i||t)(M(br),M(_t),M(bt),M(ir))}}static{this.\u0275prov=O({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Ro=()=>new Ls({color:16580095}),Jo=()=>new Ls({color:16580095}),Jr=()=>new Ls({color:16580095});var ql=class t{static buildCube(o){let e=1/o,i=(1-e)/2,n=new Eo(e,i,i),r=new Eo(i,e+i,i),a=new Eo(i,i,i),s=new Eo(e,e,i),l=new Eo(e,e+i,i);return t.newBuildCubeGroup(n,r,a,s,l)}static newBuildCubeGroup(o,e,i,n,r){let a=new Hn,{group:s,frontLeft:l,frontCenter:d,frontRight:c,middleLeft:u,middleCenter:m,middleRight:g,backLeft:b,backCenter:y,backRight:q}=t.buildCubeTopFace(o,i,n);a.add(s);let{group:D,frontLeftEdge:j,frontCenterFace:k,frontRightEdge:N,middleLeftFace:z,middleRightFace:H,backLeftEdge:G,backCenterFace:Y,backRightEdge:X}=t.buildCubeSides(e,r);return a.add(D),{group:a,top:{front:{left:l,center:d,right:c},middle:{left:u,center:m,right:g},back:{left:b,center:y,right:q}},sides:{front:{left:j,center:k,right:N},middle:{left:z,right:H},back:{left:G,center:Y,right:X}}}}static buildCubeTopFace(o,e,i){let n=new at(e,Jr()),r=new at(o,Ro()),a=new at(e,Jr()),s=new at(o,Ro()),l=new at(i,Jo()),d=new at(o,Jo()),c=new at(e,Jr()),u=new at(o,Ro()),m=new at(e,Jr()),g=i.parameters.height/2+e.parameters.height/2;n.position.x-=g,n.position.y-=g,r.position.y-=g,a.position.x+=g,a.position.y-=g,s.position.x-=g,s.rotation.z=Math.PI/2,d.position.x+=g,d.rotation.z=Math.PI/2,c.position.x-=g,c.position.y+=g,u.position.y+=g,m.position.x+=g,m.position.y+=g;let b=new Hn;return b.rotation.x=Math.PI/2,b.position.y+=g,b.add(n),b.add(r),b.add(a),b.add(s),b.add(l),b.add(d),b.add(c),b.add(u),b.add(m),{group:b,frontLeft:n,frontCenter:r,frontRight:a,middleLeft:s,middleCenter:l,middleRight:d,backLeft:c,backCenter:u,backRight:m}}static buildCubeSides(o,e){let i=new at(o,Ro()),n=new at(e,Jo()),r=new at(o,Ro()),a=new at(e,Jo()),s=new at(e,Jo()),l=new at(o,Ro()),d=new at(e,Jo()),c=new at(o,Ro()),u=e.parameters.width/2+o.parameters.width/2,m=o.parameters.width/2;i.position.x-=u,i.position.z+=u,n.position.z+=u,r.position.x+=u,r.position.z+=u,a.position.x-=u,a.rotation.y=Math.PI/2,s.position.x+=u,s.rotation.y=Math.PI/2,l.position.x-=u,l.position.z-=u,d.position.z-=u,c.position.x+=u,c.position.z-=u;let g=new Hn;return g.position.y-=m,g.add(i),g.add(n),g.add(r),g.add(a),g.add(s),g.add(l),g.add(d),g.add(c),{group:g,frontLeftEdge:i,frontCenterFace:n,frontRightEdge:r,middleLeftFace:a,middleRightFace:s,backLeftEdge:l,backCenterFace:d,backRightEdge:c}}};var t2=(()=>{class t{constructor(e,i){this.threeMapControlsService=e,this.cdr=i}ngOnInit(){this.maxZoom=this.threeMapControlsService.MAX_ZOOM,this.minZoom=this.threeMapControlsService.MIN_ZOOM,this.threeMapControlsService.zoomPercentage$.subscribe(e=>{this.zoomPercentage=e,this.cdr.detectChanges()})}onInput(e){let i=e.target,n=Number.parseFloat(i.value);this.threeMapControlsService.setZoomPercentage(n)}zoomIn(){this.threeMapControlsService.setZoomPercentage(Math.min(this.zoomPercentage+10,this.maxZoom))}zoomOut(){this.threeMapControlsService.setZoomPercentage(Math.max(this.zoomPercentage-10,this.minZoom))}static{this.\u0275fac=function(i){return new(i||t)(le(Et),le(Rn))}}static{this.\u0275cmp=A({type:t,selectors:[["cc-zoom-slider"]],decls:8,vars:4,consts:[[1,"absolute","right-[5px]","top-[10px]","m-2.5","flex","h-[150px]","flex-col","items-center","gap-2.5"],["data-testid","zoomIn",1,"m-0","cursor-pointer","border-none","bg-transparent","p-0","text-base","text-neutral-500",3,"click"],["type","range","id","zoomRange","data-testid","zoomRange","aria-label","Zoom level",1,"h-[100px]","w-[3px]","appearance-none","bg-neutral-500","text-neutral-500","opacity-70","outline-none","transition-opacity","duration-200","[-webkit-appearance:none]","[direction:rtl]","[writing-mode:vertical-lr]","[&::-moz-range-thumb]:h-[3px]","[&::-moz-range-thumb]:w-[10px]","[&::-moz-range-thumb]:cursor-pointer","[&::-moz-range-thumb]:bg-neutral-500","[&::-webkit-slider-thumb]:h-[3px]","[&::-webkit-slider-thumb]:w-[10px]","[&::-webkit-slider-thumb]:cursor-pointer","[&::-webkit-slider-thumb]:appearance-none","[&::-webkit-slider-thumb]:bg-neutral-500","[&::-webkit-slider-thumb]:[-webkit-appearance:none]",3,"input","min","max","value"],["data-testid","zoomOut",1,"m-0","cursor-pointer","border-none","bg-transparent","p-0","text-base","text-neutral-500",3,"click"],["id","zoomValue",1,"w-[30px]","text-center","text-[10px]","text-neutral-500"]],template:function(i,n){i&1&&(_(0,"div",0)(1,"button",1),re("click",function(){return n.zoomIn()}),x(2," + "),T(),_(3,"input",2),re("input",function(a){return n.onInput(a)}),T(),_(4,"button",3),re("click",function(){return n.zoomOut()}),x(5," - "),T(),_(6,"span",4),x(7),T()()),i&2&&(h(3),xe("min",n.minZoom)("max",n.maxZoom)("value",n.zoomPercentage),h(4),we("",n.zoomPercentage?.toFixed(0),"%"))},encapsulation:2})}}return t})();var ea=(()=>{class t{constructor(e){this.threeMapControlsService=e,this.eventEmitter=new Yf,this.currentlyHovered=null,this.isDragging=!1}init(e,i,n){this.cubeGroup=e,this.camera=i,this.renderer=n,this.initOrbitalControl(i,n),this.initRendererEventListeners(n)}resetIsDragging(){this.isDragging=!1}initOrbitalControl(e,i){this.controls=new Ks(e,i.domElement),this.controls.maxPolarAngle=Math.PI/2,this.controls.enableZoom=!1,this.controls.enablePan=!1,this.controls.rotateSpeed=1}initRendererEventListeners(e){e.domElement.addEventListener("mousemove",i=>this.onDocumentMouseMove(i)),e.domElement.addEventListener("mouseup",i=>this.onDocumentMouseUp(i)),e.domElement.addEventListener("mousedown",i=>this.onDocumentMouseClick(i,"mousedown")),e.domElement.addEventListener("dblclick",i=>this.onDocumentMouseClick(i,"dblclick")),e.domElement.addEventListener("mouseleave",i=>this.onWindowMouseLeave(i)),e.domElement.addEventListener("mouseenter",()=>this.onDocumentMouseEnter())}onDocumentMouseClick(e,i){this.isDragging=!0,this.checkMouseIntersection(e,i)}onWindowMouseLeave(e){(e.relatedTarget==null||!(e.relatedTarget instanceof HTMLCanvasElement))&&this.enableRotation(!1)}onDocumentMouseEnter(){this.enableRotation(!0)}enableRotation(e){this.controls.enableRotate=e}checkMouseIntersection(e,i){this.getCubeIntersectedByMouse(e)||this.eventEmitter.emit("viewCubeEventPropagation",{type:i,event:e})}getCubeIntersectedByMouse(e){let i=this.transformIntoCanvasVector(e),n=new Ds;n.setFromCamera(i,this.camera);let r=[];for(let s of ao(this.cubeGroup))$t(s)&&r.push(s.data);let[a]=n.intersectObjects(r);return a?a.object:null}transformIntoCanvasVector(e){let{domElement:i}=this.renderer,n=this.renderer.getPixelRatio(),r=i.getBoundingClientRect(),a=(e.clientX-r.left)/i.width*n*2-1,s=-((e.clientY-r.top)/i.height*n)*2+1;return new Ke(a,s)}propagateMovement(){if(this.isDragging){let e=this.camera.position;this.threeMapControlsService.rotateCameraInVectorDirection(-e.x,-e.y,-e.z)}return this.isDragging}onDocumentMouseMove(e){if(this.propagateMovement())return;let i=this.getCubeIntersectedByMouse(e);i?this.currentlyHovered&&i.uuid!==this.currentlyHovered.uuid?this.triggerViewCubeUnhoverEvent():this.currentlyHovered||this.triggerViewCubeHoverEvent(i):(this.currentlyHovered&&this.triggerViewCubeUnhoverEvent(),this.eventEmitter.emit("viewCubeEventPropagation",{type:"mousemove",event:e}))}onDocumentMouseUp(e){this.isDragging=!1;let i=this.getCubeIntersectedByMouse(e);i?this.eventEmitter.emit("viewCubeClicked",{cube:i}):this.eventEmitter.emit("viewCubeEventPropagation",{type:"mouseup",event:e})}triggerViewCubeHoverEvent(e){this.currentlyHovered=e,Ni(Pi.Pointer),this.eventEmitter.emit("viewCubeHoveredEvent",{cube:e})}triggerViewCubeUnhoverEvent(){this.currentlyHovered=null,Ni(Pi.Default),this.eventEmitter.emit("viewCubeUnHoveredEvent")}subscribe(e,i){this.eventEmitter.on(e,n=>{i(n)})}static{this.\u0275fac=function(i){return new(i||t)(M(Et))}}static{this.\u0275prov=O({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var bh=(()=>{class t{constructor(e,i,n){this.elementReference=e,this.threeMapControlsService=i,this.viewCubeMouseEvents=n,this.WIDTH=200,this.HEIGHT=200,this.LENGTH_VIEWCUBE=1,this.hoverInfo={cube:null,originalMaterial:null},this.cubeDefinition={top:null,sides:null},this.onCameraChanged=r=>{let a=this.calculateCameraPosition(r.camera);this.setCameraPosition(a),this.renderer.render(this.scene,this.camera)},this.onCubeHovered=r=>{this.hoverInfo={cube:r.cube,originalMaterial:r.cube.material},this.hoverInfo.cube.material.emissive=new jn(16777215),this.renderer.render(this.scene,this.camera)},this.onCubeUnhovered=()=>{this.hoverInfo.cube.material.emissive=new jn(0),this.hoverInfo.cube=null,this.renderer.render(this.scene,this.camera)},this.onCubeClicked=r=>{switch(r.cube){case this.cubeDefinition.top.front.left:this.threeMapControlsService.rotateCameraInVectorDirection(1,-1,1);break;case this.cubeDefinition.top.front.center:this.threeMapControlsService.rotateCameraInVectorDirection(0,-1,1);break;case this.cubeDefinition.top.front.right:this.threeMapControlsService.rotateCameraInVectorDirection(-1,-1,1);break;case this.cubeDefinition.top.middle.left:this.threeMapControlsService.rotateCameraInVectorDirection(1,-1,0);break;case this.cubeDefinition.top.middle.center:this.threeMapControlsService.rotateCameraInVectorDirection(0,-1,0);break;case this.cubeDefinition.top.middle.right:this.threeMapControlsService.rotateCameraInVectorDirection(-1,-1,0);break;case this.cubeDefinition.top.back.left:this.threeMapControlsService.rotateCameraInVectorDirection(1,-1,-1);break;case this.cubeDefinition.top.back.center:this.threeMapControlsService.rotateCameraInVectorDirection(0,-1,-1);break;case this.cubeDefinition.top.back.right:this.threeMapControlsService.rotateCameraInVectorDirection(-1,-1,-1);break;case this.cubeDefinition.sides.front.left:this.threeMapControlsService.rotateCameraInVectorDirection(1,0,-1);break;case this.cubeDefinition.sides.front.center:this.threeMapControlsService.rotateCameraInVectorDirection(0,0,0);break;case this.cubeDefinition.sides.front.right:this.threeMapControlsService.rotateCameraInVectorDirection(-1,0,-1);break;case this.cubeDefinition.sides.middle.left:this.threeMapControlsService.rotateCameraInVectorDirection(1,0,0);break;case this.cubeDefinition.sides.middle.right:this.threeMapControlsService.rotateCameraInVectorDirection(-1,0,0);break;case this.cubeDefinition.sides.back.left:this.threeMapControlsService.rotateCameraInVectorDirection(1,0,1);break;case this.cubeDefinition.sides.back.center:this.threeMapControlsService.rotateCameraInVectorDirection(0,0,1);break;case this.cubeDefinition.sides.back.right:this.threeMapControlsService.rotateCameraInVectorDirection(-1,0,1);break}}}ngOnInit(){this.initScene(),this.initLights(),this.initRenderer(this.elementReference.nativeElement),this.initCube(),this.initAxesHelper(),this.initCamera(),this.viewCubeMouseEvents.init(this.cubeGroup,this.camera,this.renderer),this.threeMapControlsService.subscribe("onCameraChanged",this.onCameraChanged),this.viewCubeMouseEvents.subscribe("viewCubeHoveredEvent",this.onCubeHovered),this.viewCubeMouseEvents.subscribe("viewCubeUnHoveredEvent",this.onCubeUnhovered),this.viewCubeMouseEvents.subscribe("viewCubeClicked",this.onCubeClicked)}initAxesHelper(){let e=new Ef(1.3),i=-(this.LENGTH_VIEWCUBE/2)+.01;e.position.x+=i,e.position.y+=i,e.position.z+=i,this.scene.add(e)}initCube(){let{group:e,top:i,sides:n}=ql.buildCube(1.9);this.cubeGroup=e,this.cubeDefinition.top=i,this.cubeDefinition.sides=n;let r=new Mf(this.cubeGroup,new jn(0));this.scene.add(this.cubeGroup),this.scene.add(r)}setCameraPosition(e){this.camera.position.set(e.x,e.y,e.z),this.camera.lookAt(0,0,0),this.camera.updateProjectionMatrix()}calculateCameraPosition(e){let i=this.threeMapControlsService.controls.target.clone();return e.position.clone().sub(i).normalize().multiplyScalar(3)}initScene(){this.scene=new Rs}initRenderer(e){this.renderer=new Ps({alpha:!0,antialias:!0}),this.renderer.setSize(this.WIDTH,this.HEIGHT),this.renderer.setPixelRatio(window.devicePixelRatio),e.appendChild(this.renderer.domElement)}initCamera(){this.camera=new Ts(45,this.WIDTH/this.HEIGHT,.1,1e3),this.camera.position.z=4}initLights(){this.lights=new Hn;let e=new Sf(7368816,2.8),i=new Vd(14737632,1.8);i.position.set(50,10,8).normalize();let n=new Vd(14737632,1.8);n.position.set(-50,10,-8).normalize(),this.lights.add(e),this.lights.add(i),this.lights.add(n),this.scene.add(this.lights)}static{this.\u0275fac=function(i){return new(i||t)(le(Gt),le(Et),le(ea))}}static{this.\u0275cmp=A({type:t,selectors:[["cc-view-cube"]],hostAttrs:[1,"absolute","right-0","top-[10px]","z-[11]","[transition:right_0.3s_ease]","[&.sideBarVisible]:right-[var(--cc-inspector-width)]"],decls:1,vars:0,template:function(i,n){i&1&&W(0,"cc-zoom-slider")},dependencies:[t2],encapsulation:2})}}return t})();var Tl=(function(t){return t[t.LeftClick=0]="LeftClick",t[t.RightClick=2]="RightClick",t})(Tl||{}),vr=(()=>{class t{constructor(e,i,n,r,a,s,l,d,c,u,m,g){this.threeCameraService=e,this.threeRendererService=i,this.threeSceneService=n,this.codeMapStore=r,this.fileStoreReadWindow=a,this.sharedViewReadWindow=s,this.threeMapVisibilityStore=l,this.labelSettingsFacade=d,this.tooltipService=c,this.viewCubeMouseEvents=u,this.threeViewerService=m,this.idToBuilding=g,this.THRESHOLD_FOR_MOUSE_MOVEMENT_TRACKING=3,this.mouse={x:0,y:0},this.oldMouse={x:0,y:0},this.mouseOnLastClick={x:0,y:0},this.isGrabbing=!1,this.isMoving=!1,this.raycaster=new Ds,this.subscriptions=[this.fileStoreReadWindow.visibleFileStates$.pipe(Le(()=>this.onFilesSelectionChanged())).subscribe(),this.sharedViewReadWindow.excludedNodes$.pipe(Le(b=>this.onExcludedNodesChanged(b))).subscribe(),this.sharedViewReadWindow.hoveredNodePath$.pipe(Le(b=>{b!==null?this.hoverNode(b):this.unhoverNode(!1)})).subscribe()],this.onViewCubeEventPropagation=b=>{switch(b.type){case"mousemove":this.onDocumentMouseMove(b.event);break;case"mouseup":this.onDocumentMouseUp(b.event);break;case"mousedown":this.onDocumentMouseDown(b.event);break;case"dblclick":this.onDocumentDoubleClick();break}},this.onDocumentMouseMove=b=>{this.mouse.x=b.clientX,this.mouse.y=b.clientY,this.updateHovering(),this.viewCubeMouseEvents.propagateMovement()}}ngOnDestroy(){for(let e of this.subscriptions)e.unsubscribe()}start(){this.registerEventListeners(),this.viewCubeMouseEvents.subscribe("viewCubeEventPropagation",this.onViewCubeEventPropagation)}registerEventListeners(){let e=this.threeRendererService.renderer.domElement;e.addEventListener("mousemove",this.onDocumentMouseMove),e.addEventListener("mouseup",i=>this.onDocumentMouseUp(i)),e.addEventListener("mousedown",i=>this.onDocumentMouseDown(i)),e.addEventListener("dblclick",()=>this.onDocumentDoubleClick()),e.addEventListener("mouseleave",i=>this.onDocumentMouseLeave(i)),e.addEventListener("mouseenter",()=>this.onDocumentMouseEnter()),e.addEventListener("wheel",Ui(()=>this.threeRendererService.render()))}hoverNode(e){if(this.isGrabbingOrMoving()||!this.threeMapVisibilityStore.isMapShown())return;let i=this.threeSceneService.getMapMesh();if(i){for(let n of i.getMeshDescription().buildings)if(n.node.path===e){this.hoverBuilding(n,!1);break}this.threeRendererService.render()}}unhoverNode(e=!0){this.threeMapVisibilityStore.isMapShown()&&(this.unhoverBuilding(e),this.threeRendererService.render())}onFilesSelectionChanged(){this.threeSceneService.clearSelection(),this.codeMapStore.clearKeptHighlight(),this.tooltipService.hide()}onExcludedNodesChanged(e){let i=this.sharedViewReadWindow.getSelectedNodePath();this.tooltipService.hide(),i!==null&&kp(e).isExcludedLeaf(i)&&this.threeSceneService.clearSelection(),this.unhoverBuilding()}updateHovering(){if(this.hasMouseMoved(this.oldMouse)){if(this.isGrabbingOrMoving()){this.tooltipService.hide(),this.labelSettingsFacade.restoreSuppressedLabel(),this.threeRendererService.render();return}this.oldMouse.x=this.mouse.x,this.oldMouse.y=this.mouse.y;let e=this.threeSceneService.getMapMesh();if(e){this.threeCameraService.camera.updateMatrixWorld(!1);let i=this.transformHTMLToSceneCoordinates(),n=this.threeCameraService.camera;n.isPerspectiveCamera&&this.raycaster.setFromCamera(i,n),this.intersectedBuilding=e.checkMouseRayMeshIntersection(i,n),this.updateHighlight(this.threeSceneService.getHighlightedBuilding(),this.intersectedBuilding)}}}updateHighlight(e,i){e?.id!==i?.id?(this.tooltipService.hide(),this.labelSettingsFacade.restoreSuppressedLabel(),e&&i&&!this.isGrabbingOrMoving()?(this.threeSceneService.prepareHighlightTransition(),this.showTooltipForBuilding(i),this.hoverBuilding(i)):(this.unhoverBuilding(),i&&!this.isGrabbingOrMoving()&&(this.showTooltipForBuilding(i),this.hoverBuilding(i)))):!i&&this.sharedViewReadWindow.getHoveredNodePath()!==null?(this.tooltipService.hide(),this.labelSettingsFacade.restoreSuppressedLabel(),this.unhoverBuilding()):i&&this.tooltipService.isVisible()&&this.tooltipService.updatePosition(this.mouse.x,this.mouse.y)}drawLabelSelectedBuilding(e){this.tooltipService.hide(),this.labelSettingsFacade.restoreSuppressedLabel(),this.labelSettingsFacade.clearSelectionLabel(),!(!e?.node?.isLeaf||this.labelSettingsFacade.hasLabelForNode(e.node))&&this.labelSettingsFacade.addSelectionLabel(e.node)}showTooltipForBuilding(e){this.labelSettingsFacade.hasLabelForNode(e.node)&&this.labelSettingsFacade.suppressLabelForNode(e.node),this.tooltipService.show(e.node,this.mouse.x,this.mouse.y)}enableOrbitalsRotation(e){this.threeViewerService.enableRotation(e),this.viewCubeMouseEvents.enableRotation(e)}onDocumentMouseEnter(){this.enableOrbitalsRotation(!0)}onDocumentMouseLeave(e){this.labelSettingsFacade.setSuppressLayout(!1),this.tooltipService.hide(),this.labelSettingsFacade.restoreSuppressedLabel(),this.unhoverBuilding(),e.relatedTarget instanceof HTMLCanvasElement||this.enableOrbitalsRotation(!1)}onDocumentDoubleClick(){let e=this.threeSceneService.getHighlightedBuilding(),i=this.threeSceneService.getSelectedBuilding(),n=e?.node.link;if(n&&!this.hasMouseMoved(this.mouseOnLastClick)&&window.open(n,"_blank"),i?.node.isLeaf){let r=i.node.link;if(r){window.open(r,"_blank");return}}}onDocumentMouseDown(e){e.button===Tl.RightClick&&(this.isMoving=!0,Ni(Pi.Moving)),e.button===Tl.LeftClick&&(this.isGrabbing=!0,Ni(Pi.Grabbing)),this.labelSettingsFacade.setSuppressLayout(!0),this.tooltipService.hide(),this.mouseOnLastClick={x:e.clientX,y:e.clientY},document.activeElement.blur()}onDocumentMouseUp(e){this.labelSettingsFacade.setSuppressLayout(!1),this.viewCubeMouseEvents.resetIsDragging(),e.button===Tl.LeftClick?this.onLeftClick():this.onRightClick(),this.intersectedBuilding!==void 0?Ni(Pi.Pointer):Ni(Pi.Default)}onRightClick(){this.isMoving=!1,this.intersectedBuilding&&!this.hasMouseMovedBeyondThreshold(this.mouseOnLastClick)&&this.codeMapStore.setRightClickedNodeData({nodeId:this.intersectedBuilding.node.path,xPositionOfRightClickEvent:this.mouse.x,yPositionOfRightClickEvent:this.mouse.y,origin:"codeMap"}),this.threeRendererService.render()}onLeftClick(){this.isGrabbing=!1,this.hasMouseMovedBeyondThreshold(this.mouseOnLastClick)||(this.intersectedBuilding?(this.threeSceneService.selectBuilding(this.intersectedBuilding),this.drawLabelSelectedBuilding(this.intersectedBuilding),this.showTooltipForBuilding(this.intersectedBuilding)):(this.threeSceneService.clearSelection(),this.labelSettingsFacade.clearSelectionLabel()),this.codeMapStore.clearKeptHighlight()),this.threeRendererService.render()}hasMouseMovedBeyondThreshold({x:e,y:i}){return Math.abs(this.mouse.x-e)>this.THRESHOLD_FOR_MOUSE_MOVEMENT_TRACKING||Math.abs(this.mouse.y-i)>this.THRESHOLD_FOR_MOUSE_MOVEMENT_TRACKING}hasMouseMoved({x:e,y:i}){return this.mouse.x!==e||this.mouse.y!==i}isGrabbingOrMoving(){return this.isGrabbing||this.isMoving}hoverBuilding(e,i=!0){Ni(Pi.Pointer);let r=this.codeMapStore.getIdToNode().get(e.node.id);for(let{data:a}of ao(r)){let s=this.idToBuilding.get(a.id);s&&this.threeSceneService.addBuildingsToHighlightingList(s)}this.threeSceneService.applyHighlights(),i&&this.codeMapStore.hoverNode(e.node.path)}transformHTMLToSceneCoordinates(){let{renderer:e,renderer:{domElement:i}}=this.threeRendererService,n=e.getPixelRatio(),r=i.getBoundingClientRect(),a=this.mouse.x/i.width*n*2-1,s=-((this.mouse.y-r.top)/i.height*n)*2+1;return{x:a,y:s}}unhoverBuilding(e=!0){this.isGrabbingOrMoving()||Ni(Pi.Default),this.threeSceneService.getConstantHighlight().size>0?this.threeSceneService.clearHoverHighlight():this.threeSceneService.clearHighlight(),e&&this.codeMapStore.hoverNode(null)}static{this.\u0275fac=function(i){return new(i||t)(M(or),M(Nt),M(bt),M(br),M(Fe),M(_t),M(ir),M(kl),M(Jn),M(ea),M(ar),M(Gs))}}static{this.\u0275prov=O({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var o2=(()=>{class t{constructor(e,i,n,r,a,s,l,d){this.codeMapStore=e,this.fileStoreReadWindow=i,this.threeSceneService=n,this.labelSettingsFacade=r,this.codeMapArrowService=a,this.threeStatsService=s,this.codeMapMouseEventService=l,this.colorCategoryCountsStore=d,this.nodesByColor={positive:[],neutral:[],negative:[]},this.subscription=this.fileStoreReadWindow.isLoadingFile$.pipe(Le(c=>c?this.onFileLoadingStarted():this.onFileLoadingFinished())).subscribe()}ngOnDestroy(){this.subscription.unsubscribe()}onFileLoadingStarted(){this.threeSceneService?.dispose()}onFileLoadingFinished(){this.threeStatsService?.resetPanels()}load(e,i=Zo){this.render(e,i),this.scaleMap(i)}render(e,i=Zo){i.geometry||this.visibleSortedNodes===void 0?this.rebuildBuildings(e):i.colors&&this.threeSceneService.recolorMapMesh(this.codeMapStore.getState()),i.colors&&this.getNodesMatchingColorSelector(this.unflattenedNodes),i.arrows&&this.setArrows(this.visibleSortedNodes)}rebuildBuildings(e){let i=this.getNodes(e),n=this.sortVisibleNodesByHeightDescending(i);this.visibleSortedNodes=n,this.unflattenedNodes=n.filter(({flat:a})=>!a);let r=this.codeMapStore.getState();if(this.threeSceneService.getMapMesh()?.canUpdateInPlace(n)){this.threeSceneService.updateMapMeshInPlace(i,n,r,Ei(r.files));return}this.setNewMapMesh(i,n)}setNewMapMesh(e,i){let n=this.codeMapStore.getState(),r=new Uf(i,n,Ei(n.files));this.threeSceneService.setMapMesh(e,r)}scaleMap(e=Zo){this.codeMapMouseEventService.unhoverNode(),this.codeMapArrowService.scale(),this.threeSceneService.scaleHeight(),e.labels&&(this.labelSettingsFacade.clearLabels(),this.setLabels(this.unflattenedNodes),this.codeMapMouseEventService.drawLabelSelectedBuilding(this.threeSceneService.getSelectedBuilding()))}getNodes(e){let i=this.codeMapStore.getState(),n=Gn(i),{mapState:{layoutAlgorithm:r},files:a}=i,s=Ei(a),l=Of(i)??e;switch(r){case gt.StreetMap:case gt.TreeMapStreet:return $f.createStreetLayoutNodes(l,i,n,of(i),s);case gt.SquarifiedTreeMap:return jf(l,i,n,s);default:return[]}}sortVisibleNodesByHeightDescending(e){return e.filter(i=>i.visible&&i.length>0&&i.width>0).sort((i,n)=>n.height-i.height)}getNodesMatchingColorSelector(e){let i=this.codeMapStore.getState(),n=i.mapState.colorRange;this.nodesByColor={positive:[],negative:[],neutral:[]};for(let r of e)if(r.isLeaf){let a=r.attributes[i.mapState.colorMetric];i.mapState.colorMetric==="unary"?this.nodesByColor.positive.push(r):a!==null&&(a<n.from?this.nodesByColor.positive.push(r):a<n.to?this.nodesByColor.neutral.push(r):this.nodesByColor.negative.push(r))}this.colorCategoryCountsStore.setColorCategoryCounts({positive:this.nodesByColor.positive.length,neutral:this.nodesByColor.neutral.length,negative:this.nodesByColor.negative.length}),this.uncheckEmptyColorLabels()}uncheckEmptyColorLabels(){let e=this.codeMapStore.getState().mapState.colorLabels,i={};for(let n of Dd)e[n]&&this.nodesByColor[n].length===0&&(i[n]=!1);Object.keys(i).length>0&&this.codeMapStore.setColorLabels(i)}setBuildingLabel(e,i){for(let n of e)this.labelSettingsFacade.addLeafLabel(n,i)}setLabels(e){if(this.labelSettingsFacade.clearLabels(),e===void 0||e.length===0)return;let i=this.codeMapStore.getState(),{showMetricLabelNodeName:n,showMetricLabelNameValue:r,colorLabels:a,amountOfTopLabels:s,labelMode:l}=i.mapState;if(n||r){let d=e[0].height,c=this.getTopNodeSelector(i,s);if(l===Hi.Color){let{colorMetric:u}=i.mapState,m=c(Dd.filter(g=>a[g]).flatMap(g=>this.nodesByColor[g]).filter(g=>Number.isFinite(g.attributes[u])),g=>g.attributes[u]);this.setBuildingLabel(m,d)}else{let u=c(e.filter(m=>m.isLeaf),m=>m.height??0);this.setBuildingLabel(u,d)}}}getTopNodeSelector(e,i){return js(e)?(n,r)=>W1(n,a=>_s(a.path),r,i):(n,r)=>hh(n,r,i)}setArrows(e){this.codeMapArrowService.clearArrows(),this.codeMapArrowService.addEdgeMapBasedOnNodes(e),this.codeMapArrowService.addEdgePreview();let i=this.threeSceneService.getSelectedBuilding();i&&this.codeMapArrowService.onBuildingSelected({building:i})}static{this.\u0275fac=function(i){return new(i||t)(M(br),M(Fe),M(bt),M(kl),M(e2),M(g0),M(vr),M(er))}}static{this.\u0275prov=O({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Fy=1e3/60,Rl=(()=>{class t{constructor(e,i,n,r,a,s,l,d){this.store=e,this.actions$=i,this.threeRendererService=n,this.codeMapRenderService=r,this.threeViewerService=a,this.activeViewStore=s,this.viewReadinessStore=l,this.errorHandler=d,this.pendingInvalidation=null,this.lastRenderedMapNode=null,this.actionsRequiringRender$=this.actions$.pipe(ct(...D1),Le(c=>{let u=P1(c);this.pendingInvalidation=this.pendingInvalidation?V1([this.pendingInvalidation,u]):u})),this.mapDataChange$=ut([this.store.select(Dt),this.actionsRequiringRender$]).pipe(Se(([c])=>c)),this.isMetricsMapShown$=ut([this.activeViewStore.activeView$,this.threeViewerService.isMapCanvasMounted$]).pipe(Se(([c,u])=>c==="metrics"&&u)),this.dataChangedWhileMetricsMapIsShown$=this.mapDataChange$.pipe(yi(this.isMetricsMapShown$),Le(([,c])=>{c||this.viewReadinessStore.markStale("metrics")}),Ae(([,c])=>c),Se(([c])=>c)),this.switchedToStaleMetricsView$=this.activeViewStore.activeView$.pipe(Ae(c=>c==="metrics"&&this.viewReadinessStore.isStale("metrics")),Ut(()=>this.threeViewerService.isMapCanvasMounted$.pipe(Ae(Boolean),wt(1))),yi(this.store.select(Dt)),Se(([,c])=>c)),this.renderCodeMap$=De(()=>io(this.dataChangedWhileMetricsMapIsShown$,this.switchedToStaleMetricsView$).pipe(Ae(c=>!!c.unifiedMapNode),Om(Fy,Lm,{leading:!1,trailing:!0}),yi(this.store.select(Qp)),Le(([c,u])=>this.renderMap(c,u)),Se(([c])=>c),_n()),{dispatch:!1})}renderMap(e,i){try{if(!i)return;this.codeMapRenderService.load(e.unifiedMapNode,this.consumeInvalidation(e.unifiedMapNode)),this.threeRendererService.render()}catch(n){this.errorHandler.handleError(n)}finally{al()}}consumeInvalidation(e){let i=e===this.lastRenderedMapNode?this.pendingInvalidation:null;return this.pendingInvalidation=null,this.lastRenderedMapNode=e,i??Zo}static{this.\u0275fac=function(i){return new(i||t)(M(me),M(mt),M(Nt),M(o2),M(ar),M(tr),M(hr),M(zm))}}static{this.\u0275prov=O({token:t,factory:t.\u0275fac})}}return t})();var Dy=350,n2=(()=>{class t{constructor(e,i,n,r){this.store=e,this.actions$=i,this.renderCodeMapEffect=n,this.viewReadinessStore=r,this.hideLoadingFileOnCommit$=De(()=>this.actions$.pipe(ct(di),Se(()=>$p({value:!1})))),this.markViewsStaleOnDataChange$=De(()=>io(this.store.select(so).pipe(wi(1)),this.actions$.pipe(ct(di))).pipe(Le(()=>{this.viewReadinessStore.markAllStale()})),{dispatch:!1}),this.markMetricsReadyOnRender$=De(()=>this.renderCodeMapEffect.renderCodeMap$.pipe(Lt(Dy),Ae(()=>this.viewReadinessStore.isStale("metrics")),Le(()=>{this.viewReadinessStore.markReady("metrics")})),{dispatch:!1})}static{this.\u0275fac=function(i){return new(i||t)(M(me),M(mt),M(Rl),M(hr))}}static{this.\u0275prov=O({token:t,factory:t.\u0275fac})}}return t})();var r2=[Rl,L1,n2];var a2="ExtensionRuleAction",vh=(t,...o)=>({type:a2,action:{effect:t},extensions:o}),s2=(()=>{class t{constructor(e,i){this.actions$=e,this.store=i,this.extensionPatternToRules$=this.actions$.pipe(ct(a2),Se(n=>({effect:n.action.effect,rules:fg(n.extensions.join(","))})),_n()),this.ruleForExtensions$=De(()=>this.extensionPatternToRules$.pipe(Ae(({effect:n})=>n==="flatten"||n==="exclude"),Le(({effect:n,rules:r})=>{this.store.dispatch(n==="flatten"?On({items:r}):So({items:r}))})),{dispatch:!1})}static{this.\u0275fac=function(i){return new(i||t)(M(mt),M(me))}}static{this.\u0275prov=O({token:t,factory:t.\u0275fac})}}return t})();var l2=[s2];var c2=[];var d2=[gg];var h2=(()=>{class t{constructor(e){this.store=e,this.updateAmountOfEdgePreviews$=De(()=>ut([this.store.select(zs),this.store.select(ds)]).pipe(wi(1),Ae(([i,n])=>n>i),Se(([i])=>Ti({value:i}))))}static{this.\u0275fac=function(i){return new(i||t)(M(me))}}static{this.\u0275prov=O({token:t,factory:t.\u0275fac})}}return t})();var Py=Ge(Gp,i0,(t,o)=>({heightMetric:t,isLinked:o})),u2=(()=>{class t{constructor(e){this.store=e,this.linkHeightAndColorMetric$=De(()=>this.store.select(Py).pipe(Ae(({isLinked:i})=>i),Se(({heightMetric:i})=>Mt({value:i}))))}static{this.\u0275fac=function(i){return new(i||t)(M(me))}}static{this.\u0275prov=O({token:t,factory:t.\u0275fac})}}return t})();var xr=t=>{let o=t.maxValue-t.minValue,e=Math.round(o/3),i=e+t.minValue,n=e*2+t.minValue;return{from:i,to:n}};var m2=(()=>{class t{constructor(e,i){this.actions$=e,this.store=i,this.resetColorRangeOnColorMetricChange$=De(()=>this.actions$.pipe(ct(Mt),Ut(()=>this.store.select(ko).pipe(wt(1))),Se(n=>Yt({value:xr(n)}))))}static{this.\u0275fac=function(i){return new(i||t)(M(mt),M(me))}}static{this.\u0275prov=O({token:t,factory:t.\u0275fac})}}return t})();var p2=(()=>{class t{constructor(e){this.store=e,this.resetIsEdgeMetricVisible$=De(()=>this.store.select(Fn).pipe(yi(this.store.select(Kp)),Ae(([,i])=>!i),Se(()=>Pn())))}static{this.\u0275fac=function(i){return new(i||t)(M(me))}}static{this.\u0275prov=O({token:t,factory:t.\u0275fac})}}return t})();var Ch=Im(v2(),1),bR=Ch.default.configure;var x2=Ch.default;var w2=(()=>{class t{constructor(e,i,n){this.store=e,this.mapStateReadWindow=i,this.metricsLensSourceReadWindow=n,this.updateMapColors$=De(()=>this.store.select($r).pipe(Se(r=>{let a=this.metricsLensSourceReadWindow.getAttributeDescriptors(),s=this.mapStateReadWindow.getMapColors();if(a[r]?.direction===1){let l=JSON.parse(x2(s)),d=l.negative;return l.negative=l.positive,l.positive=d,hi({value:l})}return hi({value:s??Qt})})))}static{this.\u0275fac=function(i){return new(i||t)(M(me),M(Ee),M(Bs))}}static{this.\u0275prov=O({token:t,factory:t.\u0275fac})}}return t})();var y2=[m2,w2,u2,p2,h2];var Al=0;function Il(t,o){let e=E(_i),i=E(pr),n=()=>{e.navigateByUrl(Vi.metrics,{replaceUrl:!0})};return{isOnView:()=>Xf(e.url)===t,redirect:n,redirectForMissingData:()=>{n(),i.show(o)}}}var Hy="This file has no dependency data \u2014 switched to the map view.",Uy="The dependency view is experimental \u2014 switch it on in the Global Configuration.",S2=(()=>{class t{constructor(){this.store=E(me),this.router=E(_i),this.toastService=E(pr),this.metricsViewRedirect=Il("dependencies",Hy),this.redirectAwayFromUnreachableDependencyView$=De(()=>ut([this.store.select(Zs),this.store.select(so),this.store.select(Rf),this.router.events.pipe(Ae(e=>e instanceof os),Bm(null))]).pipe(Lt(Al),Ae(([,e])=>e.length>0&&this.metricsViewRedirect.isOnView()),Se(([e,,i])=>Gy(e,i)),Ae(e=>e!==null),Le(e=>this.redirectToMetricsView(e))),{dispatch:!1})}redirectToMetricsView(e){if(e==="missing-dependency-data"){this.metricsViewRedirect.redirectForMissingData();return}this.metricsViewRedirect.redirect(),this.toastService.show(Uy)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=O({token:t,factory:t.\u0275fac})}}return t})();function Gy(t,o){return t?o?"missing-dependency-data":null:"switched-off"}var wr=(()=>{class t{constructor(e){this.store=e}setStandard(e){this.store.dispatch(Ip({files:e}))}removeFiles(e){this.store.dispatch(Ap({fileNames:e}))}setDelta(e,i){this.store.dispatch(Pp({referenceFile:e,comparisonFile:i}))}setDeltaReference(e){this.store.dispatch(Dp({file:e}))}setDeltaComparison(e){this.store.dispatch(Lp({file:e}))}switchReferenceAndComparison(){this.store.dispatch(Fp())}setFiles(e){this.store.dispatch(Rp({value:e}))}static{this.\u0275fac=function(i){return new(i||t)(M(me))}}static{this.\u0275prov=O({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Fl=(()=>{class t{constructor(e,i,n){this.fileStoreReadWindow=e,this.filesRepo=i,this.navBarWriteStore=n,this.lastSetFilesOfPreviousMode=[],this.subscription=this.fileStoreReadWindow.files$.pipe(Vm(),Ae(([r,a])=>Ei(r)!==Ei(a)||a.length===0),Le(([r,a])=>{this.lastSetFilesOfPreviousMode=a.length===0?a:r})).subscribe()}ngOnDestroy(){this.subscription.unsubscribe()}toggle(){let e=this.filesRepo.getFiles();if(!Ei(e)){this.lastSetFilesOfPreviousMode=this.filterNoneExisting(e,this.lastSetFilesOfPreviousMode);let n=this.lastSetFilesOfPreviousMode.find(a=>a.selectedAs===li.Reference)??e.find(a=>a.selectedAs===li.Partial);if(n===void 0)return;let r=this.lastSetFilesOfPreviousMode.find(a=>a.selectedAs===li.Comparison);this.navBarWriteStore.setDelta(n.file,r?.file);return}if(this.lastSetFilesOfPreviousMode.length>0){this.navBarWriteStore.setFiles(this.lastSetFilesOfPreviousMode);return}let i=e.find(n=>n.selectedAs===li.Reference)?.file;i!==void 0&&this.navBarWriteStore.setStandard([i])}filterNoneExisting(e,i){return i.filter(n=>e.find(r=>Vp(r.file,n.file)))}static{this.\u0275fac=function(i){return new(i||t)(M(Fe),M(Wp),M(wr))}}static{this.\u0275prov=O({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Ky="This file has no domain-language data \u2014 switched to the map view.",Qy="Left compare mode \u2014 the domain view shows a single word cloud.",C2=(()=>{class t{constructor(){this.store=E(me),this.router=E(_i),this.toastService=E(pr),this.fileSelectionModeService=E(Fl),this.metricsViewRedirect=Il("domain",Ky),this.unreachableReason$=ut([this.store.select(xg),this.store.select(cs)]).pipe(Se(([e,i])=>({reason:this.toUnreachableReason(e,i),wasOnDomainRoute:this.metricsViewRedirect.isOnView()})),Lt(Al),Ua({bufferSize:1,refCount:!0})),this.navigated$=this.router.events.pipe(Ae(e=>e instanceof os)),this.redirectAwayFromUnreachableDomainView$=De(()=>this.unreachableReason$.pipe(Ae(({reason:e,wasOnDomainRoute:i})=>e!==null&&i&&this.metricsViewRedirect.isOnView()),Le(({reason:e})=>this.redirectToMetricsView(e))),{dispatch:!1}),this.handleTheDomainViewBeingOpenedWhileUnreachable$=De(()=>this.navigated$.pipe(Ut(()=>this.unreachableReason$.pipe(wt(1))),Ae(({reason:e})=>e!==null&&this.metricsViewRedirect.isOnView()),Le(({reason:e})=>this.makeTheDomainViewReachable(e))),{dispatch:!1})}makeTheDomainViewReachable(e){if(e==="delta"){this.leaveCompareMode();return}this.redirectToMetricsView(e)}leaveCompareMode(){this.fileSelectionModeService.toggle(),this.toastService.show(Qy)}toUnreachableReason(e,i){return e?"missing-domain-data":i?"delta":null}redirectToMetricsView(e){if(e==="missing-domain-data"){this.metricsViewRedirect.redirectForMissingData();return}this.metricsViewRedirect.redirect()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=O({token:t,factory:t.\u0275fac})}}return t})();var M2=[C2,S2];var _2=(()=>{class t{constructor(e,i){this.guard=e,this.errorDialogService=i,this.showErrorDialogIfExcludedNodesResultInEmptyMap$=De(()=>this.guard.doExcludedNodesResultInEmptyMap$.pipe(Ae(n=>n.resultsInEmptyMap),Le(()=>{al(),this.errorDialogService.open({title:"Exclude Error",message:"Excluding all buildings is not possible."})})),{dispatch:!1}),this.addExcludedNodes$=De(()=>this.guard.doExcludedNodesResultInEmptyMap$.pipe(Ae(n=>!n.resultsInEmptyMap),Se(n=>So({items:n.items}))))}static{this.\u0275fac=function(i){return new(i||t)(M(sg),M(ls))}}static{this.\u0275prov=O({token:t,factory:t.\u0275fac})}}return t})();var E2=[_2];var k2=t=>t.some(o=>o.name==="rloc")?"rloc":"unary";var Yy=["rloc","real_lines_of_code","loc","lines_of_code","lines","statements","functions"],q2=["complexity","mcc","cognitive_complexity","sonar_complexity","sonar_cognitive_complexity","max_nesting_level","indentation_level"];function T2(t){return t.some(o=>o.maxValue>0)}function R2(t,o){let e=[],i;for(let n of t)if(n.maxValue&&(e.push(n.name),i=n.name,--o===0))return e;if(!i)throw new Error("there are no metrics available");for(;o-- >0;)e.push(i);return e}function A2(t){let o=[],e={AreaMetric:Yy,HeightMetric:q2,ColorMetric:q2},i=new Set(t.map(n=>n.name));for(let n in e)for(let r of e[n])if(i.has(r)){o.push(r);break}return o}function I2(t,o,e,i,n,r=!1){let a=new Set(e.map(b=>b.name)),s=new Set(i.map(b=>b.name)),l=b=>!!b&&a.has(b),d=b=>!!b&&s.has(b),c=n?t:Hr,u=r?{areaMetric:null,heightMetric:null,colorMetric:null,distributionMetric:null,edgeMetric:null}:o,m=Zy(c,u,e,l);if(m===null)return null;let g=u.edgeMetric;return d(c.edgeMetric)?g=c.edgeMetric:d(g)||(g=i[0]?.name),Te(ae({},m),{edgeMetric:g})}function Zy(t,o,e,i){let n=i(t.areaMetric)?t.areaMetric:o.areaMetric,r=i(t.heightMetric)?t.heightMetric:o.heightMetric,a=i(t.colorMetric)?t.colorMetric:o.colorMetric;if(i(n)&&i(r)&&i(a))return{areaMetric:n,heightMetric:r,colorMetric:a,distributionMetric:o.distributionMetric};if(!T2(e))return null;let[s,l,d]=Jy(e);return{areaMetric:i(t.areaMetric)?t.areaMetric:s,heightMetric:i(t.heightMetric)?t.heightMetric:l,colorMetric:i(t.colorMetric)?t.colorMetric:d,distributionMetric:k2(e)}}function Jy(t){let o=A2(t),[e,i,n]=o;return e&&i&&n?o:R2(t,3)}function F2(t){let o={};for(let e of t)for(let i of Object.keys(e))o[i]||(o[i]=e[i]);return o}function L2(t){let o={},e={};for(let i of t){for(let n of Object.keys(i.nodes))o[n]||(o[n]=i.nodes[n]);for(let n of Object.keys(i.edges))e[n]||(e[n]=i.edges[n])}return{nodes:o,edges:e}}var Ll=class{constructor(){this.wordsByTextPerPath=new Map}add(o,e,i){let n=this.wordsByTextOf(o);for(let r of e){let a=n.get(r.text);n.set(r.text,a?i(a,r):ae({},r))}}toDomainLensData(){let o={};for(let[e,i]of this.wordsByTextPerPath)o[e]=[...i.values()];return o}wordsByTextOf(o){let e=this.wordsByTextPerPath.get(o);return e||(e=new Map,this.wordsByTextPerPath.set(o,e)),e}};function D2(t,o){if(t.length===1)return t[0].settings.fileSettings.domainWords;let e=new Ll;for(let i of t)for(let[n,r]of Object.entries(i.settings.fileSettings.domainWords)){if(!o){e.add(n,r,Hd);continue}e.add(hf(i.fileMeta.fileName,n),r,Hd),n===zr.rootPath&&e.add(zr.rootPath,r,bg)}return e.toDomainLensData()}function P2(t,o){if(t.length===1)return t[0].settings.fileSettings.markedPackages;let e=new Map;for(let i of t)if(i.settings.fileSettings.markedPackages)for(let n of i.settings.fileSettings.markedPackages){let r={path:o?Ms(i.fileMeta.fileName,n.path):n.path,color:n.color};e.set(`${r.path}|${r.color}`,r)}return[...e.values()]}function N2(t,o){let e=new Map;for(let r of t)for(let a of r.settings.fileSettings.blacklist??[]){let s=o&&t.length>1?Ms(r.fileMeta.fileName,a.path):a.path;e.set(`${s}|${a.type}`,{path:s,type:a.type})}let i=[],n=[];for(let{path:r,type:a}of e.values())(a==="flatten"?n:i).push({path:r});return{excludedNodes:i,flattenedNodes:n}}var V2=(()=>{class t{constructor(e,i,n,r,a,s,l){this.actions$=e,this.store=i,this.ccStateSnapshot=n,this.fileStoreReadWindow=r,this.mapStateReadWindow=a,this.queryParamsService=s,this.loadInitialFileStore=l,this.fileSetTriggers$=io(this.actions$.pipe(ct(di),Se(d=>({kind:"fileSet",provenance:d}))),this.store.select(so).pipe(wi(1),Se(()=>({kind:"fileSet",provenance:null})))).pipe(_n()),this.fileSetChanged$=this.fileSetTriggers$.pipe(Pm(this.fileSetTriggers$.pipe(Lt(0))),Ae(d=>d.length>0),Se(d=>({kind:"fileSet",provenance:d.find(c=>c.provenance)?.provenance??null}))),this.reconcileFileSet$=De(()=>this.fileSetChanged$.pipe(Le(d=>{this.reconcile(d)})),{dispatch:!1}),this.reconcileMetricData$=De(()=>ut([this.store.select(Gn),this.store.select(Os)]).pipe(wi(1),Lt(0),Le(()=>{this.reconcile({kind:"metricData"})})),{dispatch:!1})}reconcile(e){e.kind==="fileSet"&&(this.mergeFileSettings(),this.updateFileRoot());let{nodeMetricData:i,edgeMetricData:n}=Xn(this.ccStateSnapshot.get());if(!i)return;let r=this.currentSelection(),a=I2(e.kind==="fileSet"?e.provenance?.urlMetrics??Hr:Hr,r,i,n,this.queryParamsService.hasFile(),e.kind==="fileSet"&&!!e.provenance?.forceDefaultMetrics);if(!a)return;this.applySelection(a,r);let s=a.colorMetric!==r.colorMetric;if(e.kind==="fileSet"||s){let l=Pf(i,a.colorMetric);this.store.dispatch(Yt({value:xr(l)}))}e.kind==="fileSet"&&(this.store.dispatch(ui()),this.updateVisibleTopLabels(),this.applyRestoredSettings(e.provenance?.restoredSettings??null))}applyRestoredSettings(e){e&&(this.loadInitialFileStore.applyMetricsLensSource(e.metricsLensSource),this.loadInitialFileStore.applyDependencyLensSource(e.dependencyLensSource),this.loadInitialFileStore.applyDomainLensSource(e.domainLensSource),this.loadInitialFileStore.applySharedView(e.sharedView))}mergeFileSettings(){let e=this.fileStoreReadWindow.getFiles(),i=In(e),n=Np(e),r=this.fileStoreReadWindow.getVisibleFileStates(),a=r.map(({file:d})=>d.settings.fileSettings.attributeTypes),s=r.map(({file:d})=>d.settings.fileSettings.attributeDescriptors),l=L2(a);this.store.dispatch(ei({value:{sharedView:Te(ae({},N2(i,n)),{markedPackages:P2(i,n)}),metricsLensSource:{attributeTypes:l.nodes,attributeDescriptors:F2(s)},dependencyLensSource:{attributeTypes:l.edges},domainLensSource:{words:D2(i,n)}}}))}updateFileRoot(){let e=this.fileStoreReadWindow.getReferenceFile();e&&zr.updateRoot(e.map.name)}currentSelection(){let{areaMetric:e,heightMetric:i,colorMetric:n,edgeMetric:r,distributionMetric:a}=this.mapStateReadWindow.getMapState();return{areaMetric:e,heightMetric:i,colorMetric:n,edgeMetric:r,distributionMetric:a}}applySelection(e,i){this.dispatchIfChanged(ms,e.distributionMetric,i.distributionMetric),this.dispatchIfChanged(Ri,e.areaMetric,i.areaMetric),this.dispatchIfChanged(Fi,e.heightMetric,i.heightMetric),this.dispatchIfChanged(Mt,e.colorMetric,i.colorMetric),this.dispatchIfChanged(Zt,e.edgeMetric,i.edgeMetric)}dispatchIfChanged(e,i,n){i!==n&&this.store.dispatch(e({value:i}))}updateVisibleTopLabels(){let e=Kn(this.ccStateSnapshot.get()),i=this.mapStateReadWindow.getAmountOfTopLabels();this.store.dispatch(ki({value:Math.min(i,tg(e))}))}static{this.\u0275fac=function(i){return new(i||t)(M(mt),M(me),M(Pt),M(Fe),M(Ee),M(cl),M(cg))}}static{this.\u0275prov=O({token:t,factory:t.\u0275fac})}}return t})();var tS=2e3;function B2(t){if(R0()||typeof requestIdleCallback!="function"){t();return}requestIdleCallback(()=>t(),{timeout:tS})}var iS=[Ai,yo,wo,hi,lo,co,Wn,vo,xo,ef,Pn,Nn,Dn,Ln,gs,bo,ho,Ti,ki,fo,Vn,uo,po,mo,go,Ii,Zt,Yt,Bn,Fi,ms,Mt,Ri],oS=[qs,Ss,ui,Cs,ui,xs,ys,So,On,ws,zn,$n,Co,Mo],nS=[Ff,If],rS=[kf],aS=[W0,O0,z0,U0,X0,$0,j0,B0,K0,Z0,V0,G0,Q0,Y0,H0],W2=[[...nS],[...rS],[...aS],[...iS],[...oS],[...b0],[...ss],ei].flat();var O2=500,sS=[...ss,ei],z2=(()=>{class t{constructor(e,i){this.actions$=e,this.ccStateSnapshot=i,this.isHoldingTheSpinner=!1,this.saveCcState$=De(()=>this.actions$.pipe(Ae(n=>n.type!==df.type),ct(...W2),Lt(O2),Le(()=>this.saveWhenIdle(()=>dg(this.ccStateSnapshot.get())))),{dispatch:!1}),this.saveCcFiles$=De(()=>this.actions$.pipe(ct(...sS),Le(()=>this.holdTheSpinnerIfTheFilesAreToBeWritten()),Lt(O2),Le(()=>this.saveWhenIdle(()=>ug(this.ccStateSnapshot.get().files).finally(()=>this.releaseTheSpinner())))),{dispatch:!1})}holdTheSpinnerIfTheFilesAreToBeWritten(){!this.isHoldingTheSpinner&&hg(this.ccStateSnapshot.get().files)&&(this.isHoldingTheSpinner=!0,q0())}releaseTheSpinner(){this.isHoldingTheSpinner&&(this.isHoldingTheSpinner=!1,T0())}saveWhenIdle(e){B2(()=>{e().catch(i=>console.error("Failed to persist the session:",i))})}static{this.\u0275fac=function(i){return new(i||t)(M(mt),M(Pt))}}static{this.\u0275prov=O({token:t,factory:t.\u0275fac})}}return t})();var $2=[Zt,Fi,Mt,Ri,Tp];var j2=(()=>{class t{constructor(e,i,n,r,a){this.actions$=e,this.mapStateReadWindow=i,this.fileStoreReadWindow=n,this.queryParamsService=r,this.store=a,this.saveMetricsInQueryParameters$=De(()=>this.actions$.pipe(ct(...$2),yi(this.store.select(Os)),Se(([,s])=>s&&s.length>0),Lt(100),Le(s=>{this.updateMetricQueryParameters(s)})),{dispatch:!1})}updateMetricQueryParameters(e){let{edgeMetric:i,heightMetric:n,colorMetric:r,areaMetric:a}=this.mapStateReadWindow.getMapState();this.queryParamsService.write({areaMetric:a,heightMetric:n,colorMetric:r,edgeMetric:i,isEdgeMetricDefined:e,currentFilesAreSampleFiles:this.fileStoreReadWindow.getCurrentFilesAreSampleFiles()})}static{this.\u0275fac=function(i){return new(i||t)(M(mt),M(Ee),M(Fe),M(cl),M(me))}}static{this.\u0275prov=O({token:t,factory:t.\u0275fac})}}return t})();var H2=[V2,z2,j2];var Dl=class{constructor(){this.detachedHandles=new Map}routeKey(o){return o.routeConfig?.path??null}shouldDetach(o){return this.routeKey(o)!==null}store(o,e){let i=this.routeKey(o);i!==null&&(e?this.detachedHandles.set(i,e):this.detachedHandles.delete(i))}shouldAttach(o){let e=this.routeKey(o);return e!==null&&this.detachedHandles.has(e)}retrieve(o){let e=this.routeKey(o);return e===null?null:this.detachedHandles.get(e)??null}shouldReuseRoute(o,e){return o.routeConfig===e.routeConfig}};var U2=(()=>{class t extends sp{constructor(){super(E(Ld),E(ap,{optional:!0})??void 0),this.platformLocation=E(Ld)}prepareExternalUrl(e){let i=new URL(this.platformLocation.href);return i.hash=super.prepareExternalUrl(e),i.toString()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=O({token:t,factory:t.\u0275fac})}}return t})();var Pl=t=>{let o=Gf(t.routeConfig?.path??"");return E(A0).announceSwitchTo(o)?lS():!0};function lS(){return new Promise(t=>requestAnimationFrame(()=>requestAnimationFrame(()=>t(!0))))}var G2={metricsLensSource:Lf,dependencyLensSource:qf,domainLensSource:N0,domainState:J0,preferences:f0,mapState:tf,sharedView:pf,files:zp,isLoadingFile:jp,currentFilesAreSampleFiles:Op},X2=t=>(o,e)=>{let i=P0(e)?eg(ae({},o),e.value):o;return t(i,e)};var K2=(()=>{class t{constructor(){this.store=E(me),this.domainSelectionStore=E(hl),this.letGoOfSelectionOutsideFocus$=De(()=>this.store.select(Li).pipe(Le(e=>{let i=this.domainSelectionStore.selectedNodePath();e&&i&&!wg(i,e)&&this.domainSelectionStore.clear()})),{dispatch:!1})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=O({token:t,factory:t.\u0275fac})}}return t})();var Q2=(()=>{class t{constructor(){this.actions$=E(mt),this.domainSelectionStore=E(hl),this.resetDomainSelectionAfterLoad$=De(()=>this.actions$.pipe(ct(di),Le(()=>this.domainSelectionStore.clear())),{dispatch:!1})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=O({token:t,factory:t.\u0275fac})}}return t})();var Y2=[Q2,K2];var Z2=(()=>{class t{constructor(){this.threeSceneService=E(bt),this.threeRendererService=E(Nt),this.codeMapMouseEventService=E(vr),this.sharedViewReadWindow=E(_t),this.threeMapVisibilityStore=E(ir)}start(){this.subscription?.unsubscribe(),this.subscription=this.whileTheMapIsShown(this.sharedViewReadWindow.selectedNodePath$).subscribe(e=>this.showOnTheMap(e)),this.subscription.add(this.whileTheMapIsShown(this.sharedViewReadWindow.keptHighlightPaths$).subscribe(e=>this.threeSceneService.showKeptHighlight(e)))}ngOnDestroy(){this.subscription?.unsubscribe()}whileTheMapIsShown(e){return ut([e,this.threeMapVisibilityStore.isMapShown$]).pipe(Ae(([,i])=>i),Se(([i])=>i))}showOnTheMap(e){let i=this.threeSceneService.getSelectedBuilding();this.threeSceneService.showSelection(e);let n=this.threeSceneService.getSelectedBuilding();n!==i&&(this.codeMapMouseEventService.drawLabelSelectedBuilding(n),this.threeRendererService.render())}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=O({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function dS(t,o){t&1&&(f(0,"div",1)(1,"div",2)(2,"span"),x(3," The graphics card stopped rendering the map, usually because it ran out of memory. Reload the page, and try a smaller map or a smaller browser window. "),p()()())}var Mh=(()=>{class t{constructor(e,i,n,r,a,s){this.inspectorVisibilityService=e,this.fileStoreReadWindow=i,this.threeViewerService=n,this.codeMapMouseEventService=r,this.sceneSelectionSyncService=a,this.elementReference=s,this.isLoadingFile$=this.fileStoreReadWindow.isLoadingFile$,this.isContextLost$=this.threeViewerService.isContextLost$}ngAfterViewInit(){this.threeViewerService.init(this.elementReference.nativeElement.querySelector("#codeMap")),this.codeMapMouseEventService.start(),this.sceneSelectionSyncService.start()}ngOnDestroy(){this.threeViewerService.stopAnimate(),this.threeViewerService.destroy()}static{this.\u0275fac=function(i){return new(i||t)(le(Sg),le(Fe),le(ar),le(vr),le(Z2),le(Gt))}}static{this.\u0275cmp=A({type:t,selectors:[["cc-code-map"]],decls:5,vars:9,consts:[["id","codeMap",1,"fixed","left-0","top-[var(--cc-bars-height,49px)]","z-0","h-full","w-full"],[1,"pointer-events-none","fixed","inset-0","z-[1000]","flex","items-center","justify-center","p-4"],["role","alert",1,"alert","alert-error","pointer-events-auto","max-w-md"]],template:function(i,n){i&1&&(f(0,"div",0),Kt(1,"async"),W(2,"cc-view-cube"),p(),K(3,dS,4,0,"div",1),Kt(4,"async")),i&2&&(Be("hidden",Mi(1,5,n.isLoadingFile$)),h(2),Be("sideBarVisible",n.inspectorVisibilityService.isVisible()),h(),Q(Mi(4,7,n.isContextLost$)?3:-1))},dependencies:[bh,is],encapsulation:2})}}return t})();var Nl=Ge(Dt,qi,(t,o)=>nr.getMetricDistribution(t.unifiedMapNode,o));var Vl=Ge(Yn,Zn,qi,Nl,(t,o,e,i)=>{let n=t||o;return!n||n.type===An.FILE?i:nr.getMetricDistribution(n,e)});var Bl=(()=>{class t{constructor(e){this.store=e,this.hoveredNodeMetricDistribution$=this.store.select(Vl),this.metricDistribution$=this.store.select(Nl)}static{this.\u0275fac=function(i){return new(i||t)(M(me))}}static{this.\u0275prov=O({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var J2=(()=>{class t{constructor(e){this.mapStateReadWindow=e,this.areaMetric$=this.mapStateReadWindow.areaMetric$,this.distributionMetric=Hp}static{this.\u0275fac=function(i){return new(i||t)(le(Ee))}}static{this.\u0275cmp=A({type:t,selectors:[["cc-distribution-metric"]],hostAttrs:[1,"mx-[5px]","flex","min-w-max","items-center","gap-1.5","text-xs"],decls:3,vars:3,consts:[[1,"fa","fa-pie-chart"]],template:function(i,n){i&1&&(Ce(0,"i",0),x(1),Kt(2,"async")),i&2&&(h(),we(" ",Mi(2,1,n.areaMetric$),`
3606
- `))},dependencies:[is],encapsulation:2})}}return t})();var eb=(()=>{class t{constructor(e){this.store=e,this.hoveredNodeMetricDistribution$=this.store.select(Vl),this.hoveredNode$=this.store.select(Yn),this.selectedNode$=this.store.select(Zn),this.flattenedItems$=this.store.select(nf)}dispatchRuleChange(e,i){sl(this.store,e,i)}static{this.\u0275fac=function(i){return new(i||t)(M(me))}}static{this.\u0275prov=O({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function mS(t){return`*.${t}`}function pS(t,o){return t===jr?o.others.filter(e=>e.fileExtension!==Ys).map(e=>e.fileExtension):[t]}function Wl(t,o,e){return pS(t,o).map(n=>{let r=mS(n);return e?.type===An.FOLDER?`${e.path}/**/${r}`:r})}var tb=(()=>{class t{constructor(e){this.extensionRulesStore=e,this.operationContext$=ut([this.extensionRulesStore.hoveredNodeMetricDistribution$,this.extensionRulesStore.hoveredNode$,this.extensionRulesStore.selectedNode$,this.extensionRulesStore.flattenedItems$]).pipe(Se(([i,n,r,a])=>({distribution:i,node:n||r,flattenedItems:a})))}show(e){this.operationContext$.pipe(wt(1)).subscribe(i=>{let n=Wl(e,i.distribution,i.node),r=this.createFlattenedItemsMap(i.flattenedItems),a=n.map(s=>r.get(s));this.extensionRulesStore.dispatchRuleChange("flatten",zn({items:a}))})}exclude(e){this.operationContext$.pipe(wt(1)).subscribe(i=>{let n=Wl(e,i.distribution,i.node);this.extensionRulesStore.dispatchRuleChange("exclude",vh("exclude",...n))})}flatten(e){this.operationContext$.pipe(wt(1)).subscribe(i=>{let n=Wl(e,i.distribution,i.node);this.extensionRulesStore.dispatchRuleChange("flatten",vh("flatten",...n))})}getIsFlattenedByFileExtension(e){return this.operationContext$.pipe(Se(i=>Wl(e,i.distribution,i.node).every(r=>i.flattenedItems.some(a=>a.path===r))))}createFlattenedItemsMap(e){let i=new Map;for(let n of e)i.set(n.path,n);return i}static{this.\u0275fac=function(i){return new(i||t)(M(eb))}}static{this.\u0275prov=O({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var ib=(()=>{class t{constructor(e,i,n){this.threeSceneService=e,this.metricDistributionStore=i,this.nodeInteraction=n,this.metricDistribution$=this.metricDistributionStore.metricDistribution$,this.fileExtensionsOfOthers=new Set,this.fileExtensionsOfNone=new Set,this.metricDistribution$.pipe(Nm(),Ae(r=>!!r)).subscribe(r=>{this.fileExtensionsOfOthers.clear();for(let a of r.others)this.fileExtensionsOfOthers.add(a.fileExtension);this.fileExtensionsOfNone.clear();for(let a of r.none)this.fileExtensionsOfNone.add(a.fileExtension)})}highlightExtension(e){switch(this.nodeInteraction.hoverFileExtensions(this.extensionsIn(e)),e){case jr:this.threeSceneService.highlightBuildingsByExtension(this.fileExtensionsOfOthers);break;case Ys:this.threeSceneService.highlightBuildingsWithoutExtensions();break;default:this.threeSceneService.highlightBuildingsByExtension(new Set([e]));break}}clearHighlightingOnFileExtensions(){this.nodeInteraction.hoverFileExtensions([]),this.threeSceneService.applyClearHighlights()}extensionsIn(e){return e===jr?[...this.fileExtensionsOfOthers]:[e]}static{this.\u0275fac=function(i){return new(i||t)(M(bt),M(Bl),M(qo))}}static{this.\u0275prov=O({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var bS=["menu"];function vS(t,o){if(t&1){let e=ue();_(0,"button",10),re("click",function(){oe(e);let n=L(2);return ne(n.show(n.fileExtension()))}),Ce(1,"i",11),_(2,"span",9),x(3,"Show"),T()()}}function xS(t,o){if(t&1){let e=ue();_(0,"button",12),re("click",function(){oe(e);let n=L(2);return ne(n.flatten(n.fileExtension()))}),Ce(1,"i",13),_(2,"span",9),x(3,"Flatten"),T()()}}function wS(t,o){if(t&1){let e=ue();_(0,"div",4,0),re("contextmenu",function(n){return n.preventDefault()}),K(2,vS,4,0,"button",5)(3,xS,4,0,"button",6),_(4,"button",7),re("click",function(){oe(e);let n=L();return ne(n.exclude(n.fileExtension()))}),Ce(5,"i",8),_(6,"span",9),x(7,"Exclude"),T()()()}if(t&2){let e=o,i=L();ze("left",e.left,"px")("bottom",e.bottom,"px"),h(2),Q(i.isFlattened()?2:3)}}var yS=192,_h=4,ob=(()=>{class t{constructor(e,i){this.extensionRulesService=e,this.highlightBuildingsByFileExtensionService=i,this.item=J.required(),this.showAbsoluteValues=J.required(),this.toggleShowAbsoluteValues=fe(),this.isFlattened=ke(!1),this.menuPosition=ke(null),this.menuRef=Ue("menu"),this.fileExtension=te(()=>this.item().fileExtension),this.hasFileExtension=te(()=>this.fileExtension()!=="None"),this.formattedTitle=te(()=>this.formatTitle(this.showAbsoluteValues(),this.item(),this.fileExtension()))}ngOnInit(){this.flattenSubscription=this.extensionRulesService.getIsFlattenedByFileExtension(this.fileExtension()).subscribe(e=>this.isFlattened.set(e))}ngOnDestroy(){this.flattenSubscription?.unsubscribe()}openContextMenu(e){if(e.preventDefault(),!this.hasFileExtension())return;let i=Math.max(_h,Math.min(e.clientX,window.innerWidth-yS-_h)),n=Math.max(_h,window.innerHeight-e.clientY);this.menuPosition.set({left:i,bottom:n})}closeContextMenu(){this.menuPosition.set(null)}onDocumentPointerDown(e){if(!this.menuPosition())return;let i=this.menuRef()?.nativeElement;i&&e.target instanceof Node&&i.contains(e.target)||this.closeContextMenu()}closeContextMenuOnViewportChange(){this.menuPosition()&&this.closeContextMenu()}flatten(e){this.extensionRulesService.flatten(e),this.closeContextMenu()}exclude(e){this.extensionRulesService.exclude(e),this.closeContextMenu()}show(e){this.extensionRulesService.show(e),this.closeContextMenu()}onHoverFileExtensionBar(e){this.highlightBuildingsByFileExtensionService.highlightExtension(e)}onUnhoverFileExtensionBar(){this.highlightBuildingsByFileExtensionService.clearHighlightingOnFileExtensions()}formatTitle(e,i,n){return e&&i.absoluteMetricValue||!e&&i.relativeMetricValue?e?`${n} ${i.absoluteMetricValue.toLocaleString()}`:`${n} ${i.relativeMetricValue.toFixed(2)}%`:"No data available"}get backgroundColor(){return this.item().color}get flexGrow(){return this.item().relativeMetricValue}get flexBasis(){return"0"}static{this.\u0275fac=function(i){return new(i||t)(le(tb),le(ib))}}static{this.\u0275cmp=A({type:t,selectors:[["cc-file-extension-bar-segment"]],viewQuery:function(i,n){i&1&&tt(n.menuRef,bS,5),i&2&&it()},hostAttrs:[1,"min-w-max","cursor-pointer","overflow-hidden","text-center","text-white"],hostVars:6,hostBindings:function(i,n){i&1&&V("pointerdown",function(a){return n.onDocumentPointerDown(a)},jo)("wheel",function(){return n.closeContextMenuOnViewportChange()},jo)("resize",function(){return n.closeContextMenuOnViewportChange()},Hm),i&2&&ze("background-color",n.backgroundColor)("flex-grow",n.flexGrow)("flex-basis",n.flexBasis)},inputs:{item:[1,"item"],showAbsoluteValues:[1,"showAbsoluteValues"]},outputs:{toggleShowAbsoluteValues:"toggleShowAbsoluteValues"},decls:4,vars:3,consts:[["menu",""],[1,"cc-bar-section",3,"click","contextmenu"],["data-test-id","formattedTitle",1,"cc-bar-section-text","my-0.5","whitespace-nowrap","px-2.5","text-[10px]",3,"mouseover","mouseleave","title"],[1,"fixed","z-[100]","w-48","rounded-box","border","border-base-300","bg-base-100","py-1","text-base-content","shadow-lg",3,"left","bottom"],[1,"fixed","z-[100]","w-48","rounded-box","border","border-base-300","bg-base-100","py-1","text-base-content","shadow-lg",3,"contextmenu"],["type","button","data-test-id","showBuilding",1,"flex","w-full","items-center","gap-3","px-4","py-2.5","text-left","text-sm","font-medium","hover:bg-base-200"],["type","button","data-test-id","flattenBuilding",1,"flex","w-full","items-center","gap-3","px-4","py-2.5","text-left","text-sm","font-medium","hover:bg-base-200"],["type","button","data-test-id","excludeBuilding",1,"flex","w-full","items-center","gap-3","px-4","py-2.5","text-left","text-sm","font-medium","hover:bg-base-200",3,"click"],[1,"w-4","text-center","fa-solid","fa-ban"],[1,"truncate"],["type","button","data-test-id","showBuilding",1,"flex","w-full","items-center","gap-3","px-4","py-2.5","text-left","text-sm","font-medium","hover:bg-base-200",3,"click"],[1,"w-4","text-center","fa-solid","fa-eye"],["type","button","data-test-id","flattenBuilding",1,"flex","w-full","items-center","gap-3","px-4","py-2.5","text-left","text-sm","font-medium","hover:bg-base-200",3,"click"],[1,"w-4","text-center","fa-solid","fa-arrows-down-to-line"]],template:function(i,n){if(i&1&&(_(0,"span",1),re("click",function(){return n.toggleShowAbsoluteValues.emit()})("contextmenu",function(a){return n.openContextMenu(a)}),_(1,"div",2),re("mouseover",function(){return n.onHoverFileExtensionBar(n.fileExtension())})("mouseleave",function(){return n.onUnhoverFileExtensionBar()}),x(2),T()(),K(3,wS,8,5,"div",3)),i&2){let r;h(),xe("title",n.formattedTitle()),h(),we(" ",n.formattedTitle()," "),h(),Q((r=n.menuPosition())?3:-1,r)}},encapsulation:2})}}return t})();var SS=(t,o)=>o.fileExtension;function CS(t,o){if(t&1){let e=ue();f(0,"cc-file-extension-bar-segment",4),V("toggleShowAbsoluteValues",function(){oe(e);let n=L();return ne(n.toggleShowAbsoluteValues())}),p()}if(t&2){let e=o.$implicit,i=L();R("item",e)("showAbsoluteValues",i.showAbsoluteValues())}}var Eh=(()=>{class t{constructor(){this.metricDistributionStore=E(Bl),this.showAbsoluteValues=ke(!1),this.metricDistribution=F(this.metricDistributionStore.hoveredNodeMetricDistribution$,{requireSync:!0})}toggleShowAbsoluteValues(){this.showAbsoluteValues.update(e=>!e)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["cc-file-extension-bar"]],hostAttrs:[1,"fixed","left-0","right-0","z-[70]","block","bg-base-100"],hostVars:2,hostBindings:function(i,n){i&2&&ze("bottom","var(--cc-bottom-bar-height, 32px)")},features:[Xt([{provide:ur,useValue:"--cc-file-extension-bar-height"}]),no([mr])],decls:5,vars:0,consts:[[1,"flex","h-[17px]","w-full"],["title","Distribution metric"],[1,"flex","w-full","gap-px"],[3,"item","showAbsoluteValues"],[3,"toggleShowAbsoluteValues","item","showAbsoluteValues"]],template:function(i,n){i&1&&(f(0,"div",0),W(1,"cc-distribution-metric",1),f(2,"div",2),Ne(3,CS,1,2,"cc-file-extension-bar-segment",3,SS),p()()),i&2&&(h(3),Ve(n.metricDistribution().visible))},dependencies:[J2,ob],encapsulation:2})}}return t})();var Ol=(()=>{class t{constructor(e){this.store=e,this.defaultCenterMapZoom=e0,this.centerMapZoom=F(this.store.select(t0),{requireSync:!0}),this.isFocused=F(this.store.select(Li).pipe(Se(Boolean)),{requireSync:!0})}static{this.\u0275fac=function(i){return new(i||t)(M(me))}}static{this.\u0275prov=O({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var yr=(()=>{class t{constructor(e){this.store=e}setPresentationMode(e){this.store.dispatch(d0({value:e}))}setCenterMapZoom(e){this.store.dispatch(Jf({value:e}))}unfocus(){this.store.dispatch(ui())}static{this.\u0275fac=function(i){return new(i||t)(M(me))}}static{this.\u0275prov=O({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var rb=(()=>{class t{constructor(){this.mapControls=E(Et),this.zoomMenuRequested=fe()}requestZoomMenu(e){e.preventDefault(),this.zoomMenuRequested.emit({x:e.clientX,y:e.clientY})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["cc-toolbox-center-map-button"]],outputs:{zoomMenuRequested:"zoomMenuRequested"},decls:1,vars:0,consts:[["label","Center map","icon","fa fa-compass","tooltip","Right-click to set the zoom level it centers at",3,"activated","contextmenu"]],template:function(i,n){i&1&&(f(0,"cc-bar-tool",0),V("activated",function(){return n.mapControls.autoFitTo()})("contextmenu",function(a){return n.requestZoomMenu(a)}),p())},dependencies:[tl],encapsulation:2})}}return t})();var ab=(()=>{class t{constructor(){this.mapControls=E(Et),this.readStore=E(Ol),this.writeStore=E(yr),this.anchor=J.required(),this.dismissed=fe(),this.centerMapZoom=this.readStore.centerMapZoom,this.minZoom=this.mapControls.MIN_ZOOM,this.maxZoom=this.mapControls.MAX_ZOOM}previewAndStore(e){this.writeStore.setCenterMapZoom(e),this.mapControls.setZoomPercentage(e)}useCurrentZoom(){this.writeStore.setCenterMapZoom(Math.round(this.mapControls.zoomPercentage$.value))}resetCenterMapZoom(){this.previewAndStore(this.readStore.defaultCenterMapZoom)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["cc-center-map-zoom-menu"]],hostAttrs:[1,"contents"],inputs:{anchor:[1,"anchor"]},outputs:{dismissed:"dismissed"},decls:10,vars:4,consts:[[3,"dismissed","anchor"],["data-testid","center-map-zoom-menu",1,"flex","w-64","flex-col","gap-2","px-3","py-2"],[1,"text-sm","font-semibold"],["ariaLabel","Center map zoom in percent",3,"valueChange","min","max","value"],[1,"flex","gap-2"],["type","button",1,"btn","btn-xs","flex-1",3,"click"],["type","button",1,"btn","btn-ghost","btn-xs",3,"click"]],template:function(i,n){i&1&&(f(0,"cc-floating-menu",0),V("dismissed",function(){return n.dismissed.emit()}),f(1,"div",1)(2,"span",2),x(3,"Center map zoom"),p(),f(4,"cc-slider-number-input",3),V("valueChange",function(a){return n.previewAndStore(a)}),p(),f(5,"div",4)(6,"button",5),V("click",function(){return n.useCurrentZoom()}),x(7,"Use current zoom"),p(),f(8,"button",6),V("click",function(){return n.resetCenterMapZoom()}),x(9,"Reset"),p()()()()),i&2&&(R("anchor",n.anchor()),h(4),R("min",n.minZoom)("max",n.maxZoom)("value",n.centerMapZoom()))},dependencies:[E0,ti],encapsulation:2})}}return t})();var sb=(()=>{class t{constructor(){this.preferencesReadWindow=E(mi),this.mapToolsWriteStore=E(yr),this.isPresentationMode=F(this.preferencesReadWindow.isPresentationMode$,{requireSync:!0}),this.tooltip=te(()=>this.isPresentationMode()?"Disable flashlight hover effect":"Enable flashlight hover effect")}handleToggle(){this.mapToolsWriteStore.setPresentationMode(!this.isPresentationMode())}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["cc-toolbox-presentation-mode-button"]],decls:1,vars:2,consts:[["label","Flashlight","icon","fa fa-lightbulb-o",3,"activated","pressed","tooltip"]],template:function(i,n){i&1&&(f(0,"cc-bar-tool",0),V("activated",function(){return n.handleToggle()}),p()),i&2&&R("pressed",n.isPresentationMode())("tooltip",n.tooltip())},dependencies:[tl],encapsulation:2})}}return t})();function MS(t,o){t&1&&W(0,"cc-bar-tools-divider")}function _S(t,o){if(t&1){let e=ue();f(0,"cc-center-map-zoom-menu",4),V("dismissed",function(){oe(e);let n=L();return ne(n.zoomMenuAnchor.set(null))}),p()}t&2&&R("anchor",o)}var kh=(()=>{class t{constructor(){this.writeStore=E(yr),this.isFocused=E(Ol).isFocused,this.zoomMenuAnchor=ke(null)}unfocus(){this.writeStore.unfocus()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["cc-map-tools"]],hostAttrs:[1,"flex","items-center","gap-0.5"],features:[Xt([{provide:ul,useExisting:Qg}])],decls:6,vars:3,consts:[["testId","metrics-bar-unfocus",3,"unfocused","isFocused"],[3,"zoomMenuRequested"],["view","metrics"],[3,"anchor"],[3,"dismissed","anchor"]],template:function(i,n){if(i&1&&(f(0,"cc-unfocus-tool",0),V("unfocused",function(){return n.unfocus()}),p(),K(1,MS,1,0,"cc-bar-tools-divider"),f(2,"cc-toolbox-center-map-button",1),V("zoomMenuRequested",function(a){return n.zoomMenuAnchor.set(a)}),p(),W(3,"cc-toolbox-presentation-mode-button")(4,"cc-toolbox-screenshot-button",2),K(5,_S,1,1,"cc-center-map-zoom-menu",3)),i&2){let r;R("isFocused",n.isFocused()),h(),Q(n.isFocused()?1:-1),h(4),Q((r=n.zoomMenuAnchor())?5:-1,r)}},dependencies:[il,rb,ab,sb,ml,ll],encapsulation:2})}}return t})();var lb=(t,o)=>Ge(Hs,Df,(e,i)=>{let n=e[o];return i[t][n]==="relative"?"x\u0342":"\u03A3"});var ES=t=>{if(!t)return[];let o=[];for(let{data:e}of ao(t))e.type===An.FOLDER&&!e.isExcluded&&o.push(e.path);return o.sort((e,i)=>e.localeCompare(i))},cb=Ge(Dt,t=>ES(t.unifiedMapNode));var kS=(t,o)=>{let e=new Map(t.map(i=>[i.path,0]));for(let i of o){if(!$t(i)||i.isExcluded)continue;let n=qS(e,i.path);n!==void 0&&e.set(n,e.get(n)+1)}return t.map(i=>Te(ae({},i),{fileCount:e.get(i.path)})).sort((i,n)=>i.path.localeCompare(n.path))};function qS(t,o){let e=o;for(;e;){if(t.has(e))return e;let i=e.lastIndexOf("/");e=i>0?e.slice(0,i):""}}var db=Ge(bs,Kn,kS);var hb=Ge(fs,t=>({leftColor:t.positive,middleColor:t.neutral,rightColor:t.negative}));var ub=Ge(ko,us,(t,o)=>({values:t.values,min:t.minValue,max:t.maxValue,from:o.from,to:o.to}));var mb=Ge(Dt,Qn,Li,({unifiedMapNode:t},o,e)=>e&&o.get(e)||t);var dt=(()=>{class t{constructor(e){this.store=e,this.metricData$=this.store.select(Xn),this.primaryMetricNames$=this.store.select(Hs),this.amountOfBuildingsWithSelectedEdgeMetric$=this.store.select(zs),this.selectedColorMetricData$=this.store.select(ko),this.metricColorRangeColors$=this.store.select(hb),this.metricColorRangeValues$=this.store.select(ub),this.markedPackagesWithCounts$=this.store.select(db),this.markableFolderPaths$=this.store.select(cb),this.hoveredNode$=this.store.select(Yn),this.selectedNode$=this.store.select(Zn),this.topLevelNode$=this.store.select(mb)}attributeTypeLabel$(e,i){return this.store.select(lb(e,i))}static{this.\u0275fac=function(i){return new(i||t)(M(me))}}static{this.\u0275prov=O({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var je=(()=>{class t{constructor(e){this.store=e}setAreaMetric(e){this.store.dispatch(Ri({value:e}))}setHeightMetric(e){this.store.dispatch(Fi({value:e}))}setColorMetric(e){this.store.dispatch(Mt({value:e}))}setEdgeMetric(e){this.store.dispatch(Zt({value:e}))}setLayoutAlgorithm(e){this.store.dispatch(Vn({value:e}))}setMaxTreeMapFiles(e){this.store.dispatch(el({value:e}))}setRadialLevels(e){this.store.dispatch(p0({value:e}))}setRadialFolderValue(e){this.store.dispatch(m0({value:e}))}setRadialFolderStyle(e){this.store.dispatch(h0({value:e}))}setRadialFolderTint(e){this.store.dispatch(u0({value:e}))}setMargin(e){this.store.dispatch(Bn({value:e}))}setInvertArea(e){this.store.dispatch(Ln({value:e}))}setEnableFloorLabels(e){this.store.dispatch(uo({value:e}))}setScaling(e){this.store.dispatch(bo({value:e}))}setInvertHeight(e){this.store.dispatch(Dn({value:e}))}setColorRange(e){this.store.dispatch(Yt({value:e}))}setColorMode(e){this.store.dispatch(Ii({value:e}))}setMapColors(e){this.store.dispatch(hi({value:e}))}invertColorRange(){this.store.dispatch(lo())}invertDeltaColors(){this.store.dispatch(co())}setEdgeHeight(e){this.store.dispatch(ho({value:e}))}setAmountOfEdgePreviews(e){this.store.dispatch(Ti({value:e}))}toggleEdgeMetricVisible(){this.store.dispatch(Pn())}setShowIncomingEdges(e){this.store.dispatch(vo({value:e}))}setShowOutgoingEdges(e){this.store.dispatch(xo({value:e}))}setShowOnlyBuildingsWithEdges(e){this.store.dispatch(Wn({value:e}))}toggleIsHeightAndColorMetricLinked(){this.store.dispatch(c0())}unlinkColorMetricFromHeightMetric(){this.store.dispatch(l0({value:!1}))}markPackage(e){this.store.dispatch(Co({packages:[e]}))}unmarkPackage(e){this.store.dispatch(Mo({path:e}))}static{this.\u0275fac=function(i){return new(i||t)(M(me))}}static{this.\u0275prov=O({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var pb=(()=>{class t{constructor(){this.mapStateReadWindow=E(Ee),this.metricsBarWriteStore=E(je),this.popoverId=J.required(),this.anchorName=J.required(),this.margin=F(this.mapStateReadWindow.margin$,{initialValue:0}),this.enableFloorLabels=F(this.mapStateReadWindow.enableFloorLabels$,{initialValue:!1}),this.isInvertedArea=F(this.mapStateReadWindow.invertArea$,{initialValue:!1}),this.resetKeys=["mapState.margin","mapState.invertArea","mapState.enableFloorLabels"]}setMargin(e){this.metricsBarWriteStore.setMargin(e)}setEnableFloorLabel(e){let i=e.target.checked;this.metricsBarWriteStore.setEnableFloorLabels(i)}toggleInvertingArea(e){let i=e.target.checked;this.metricsBarWriteStore.setInvertArea(i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["cc-area-settings-popover"]],hostAttrs:[1,"contents"],inputs:{popoverId:[1,"popoverId"],anchorName:[1,"anchorName"]},decls:14,vars:8,consts:[[3,"popoverId","anchorName"],["title","Amount of space between buildings in percent"],[1,"text-sm"],["ariaLabel","Margin",3,"valueChange","min","max","value"],[1,"flex","items-center","gap-2","cursor-pointer"],["type","checkbox",1,"checkbox","checkbox-sm","checkbox-primary",3,"change","checked"],["tooltip","Reset area metric settings to their defaults","label","Reset area metric settings",3,"settingsKeys"]],template:function(i,n){i&1&&(f(0,"cc-settings-popover-shell",0)(1,"div",1)(2,"span",2),x(3,"Margin"),p(),f(4,"cc-slider-number-input",3),V("valueChange",function(a){return n.setMargin(a)}),p()(),f(5,"label",4)(6,"input",5),V("change",function(a){return n.setEnableFloorLabel(a)}),p(),f(7,"span"),x(8,"Enable Floor Labels"),p()(),f(9,"label",4)(10,"input",5),V("change",function(a){return n.toggleInvertingArea(a)}),p(),f(11,"span"),x(12,"Invert Area"),p()(),W(13,"cc-reset-settings-button",6),p()),i&2&&(R("popoverId",n.popoverId())("anchorName",n.anchorName()),h(4),R("min",1)("max",100)("value",n.margin()),h(2),R("checked",n.enableFloorLabels()),h(4),R("checked",n.isInvertedArea()),h(3),R("settingsKeys",n.resetKeys))},dependencies:[Wi,kt,ti],encapsulation:2})}}return t})();var Cr=(()=>{class t{constructor(){this.metricsBarReadStore=E(dt),this.metricsLensFacade=E(Ws),this.popoverId=J.required(),this.anchorName=J.required(),this.placeholder=J("Search metric"),this.kind=J("node"),this.selected=J(null),this.metricSelected=fe(),this.metricData=F(this.metricsBarReadStore.metricData$,{initialValue:{nodeMetricData:[],edgeMetricData:[],nodeEdgeMetricsMap:new Map}}),this.descriptors=F(this.metricsLensFacade.descriptors$,{initialValue:{}}),this.options=te(()=>{let e=this.metricData();return this.kind()==="edge"?e.edgeMetricData:e.nodeMetricData})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["cc-metric-bar-select-popover"]],hostAttrs:[1,"contents"],inputs:{popoverId:[1,"popoverId"],anchorName:[1,"anchorName"],placeholder:[1,"placeholder"],kind:[1,"kind"],selected:[1,"selected"]},outputs:{metricSelected:"metricSelected"},decls:1,vars:6,consts:[[3,"metricSelected","popoverId","anchorName","placeholder","options","descriptors","selected"]],template:function(i,n){i&1&&(f(0,"cc-metric-select-popover",0),V("metricSelected",function(a){return n.metricSelected.emit(a)}),p()),i&2&&R("popoverId",n.popoverId())("anchorName",n.anchorName())("placeholder",n.placeholder())("options",n.options())("descriptors",n.descriptors())("selected",n.selected())},dependencies:[L0],encapsulation:2})}}return t})();var Mr=(()=>{class t{constructor(e){this.metricsBarReadStore=e,this.node$=ut([this.metricsBarReadStore.hoveredNode$,this.metricsBarReadStore.selectedNode$,this.metricsBarReadStore.topLevelNode$]).pipe(Se(([i,n,r])=>i??n??r),Ua({bufferSize:1,refCount:!0}))}createNodeObservable(){return this.node$}static{this.\u0275fac=function(i){return new(i||t)(M(dt))}}static{this.\u0275prov=O({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var zl=(()=>{class t{constructor(){this.nodeSelectionService=E(Mr),this.metricsBarReadStore=E(dt),this.metricFor=J.required(),this.attributeType=J("nodes"),this.node=F(this.nodeSelectionService.createNodeObservable()),this.isNodeALeaf=te(()=>{let e=this.node();return e?$t(e):!1}),this.selectorInputs=te(()=>({attributeType:this.attributeType(),metricFor:this.metricFor()})),this.attributeTypeLabel=F(bp(this.selectorInputs).pipe(Ut(({attributeType:e,metricFor:i})=>this.metricsBarReadStore.attributeTypeLabel$(e,i))))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["cc-metric-chooser-type"]],inputs:{metricFor:[1,"metricFor"],attributeType:[1,"attributeType"]},decls:2,vars:2,consts:[[3,"hidden"]],template:function(i,n){i&1&&(_(0,"span",0),x(1),T()),i&2&&(xe("hidden",n.isNodeALeaf()),h(),we(" ",n.attributeTypeLabel(),`
3607
- `))},encapsulation:2})}}return t})();function TS(t,o){if(t&1&&(f(0,"span",4),x(1),p()),t&2){let e=o;zt(e.styleClass),h(),we("\u0394",e.label)}}function RS(t,o){if(t&1&&(f(0,"span",2),W(1,"cc-metric-chooser-type",3),p(),f(2,"span",4),x(3),p(),K(4,TS,2,3,"span",5)),t&2){let e,i=o,n=L();h(),R("metricFor",n.metricFor()),h(2),Re(i.value),h(),Q((e=i.delta)?4:-1,e)}}function AS(t,o){t&1&&(f(0,"span",1),x(1,"\xA0"),p())}var $l=(()=>{class t{constructor(){this.nodeSelectionService=E(Mr),this.metricsBarReadStore=E(dt),this.metricFor=J.required(),this.node=F(this.nodeSelectionService.createNodeObservable()),this.primaryMetricNames=F(this.metricsBarReadStore.primaryMetricNames$),this.metricName=te(()=>this.primaryMetricNames()?.[this.metricFor()]??null),this.display=te(()=>IS(this.node(),this.metricName(),this.metricFor()))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["cc-metric-meta-value"]],inputs:{metricFor:[1,"metricFor"]},decls:3,vars:1,consts:[[1,"flex","items-center","justify-center","gap-1","text-xs","leading-tight","min-h-4"],["aria-hidden","true"],[1,"opacity-60"],[3,"metricFor"],[1,"font-medium"],[1,"font-medium",3,"class"]],template:function(i,n){if(i&1&&(f(0,"div",0),K(1,RS,5,3)(2,AS,2,0,"span",1),p()),i&2){let r;h(),Q((r=n.display())?1:2,r)}},dependencies:[zl],encapsulation:2})}}return t})();function IS(t,o,e){return!t||!o?null:{value:FS(t,o),delta:LS(t,o,e)}}function FS(t,o){let e=t.attributes?.[o];return typeof e=="number"?e.toLocaleString():"\u2014"}function LS(t,o,e){let i=t.deltas?.[o];return typeof i!="number"?null:{label:i.toLocaleString(),styleClass:DS(i,e)}}function DS(t,o){return o==="heightMetric"&&t>0?"text-success":t<0?"text-error":"text-base-content"}var PS=["*"],jl=(()=>{class t{constructor(){this.label=J.required(),this.metricName=J(""),this.metricFor=J.required(),this.placeholder=J(""),this.searchPopoverId=J.required(),this.searchAnchorName=J.required(),this.hasSettings=J(!0),this.settingsPopoverId=J.required(),this.settingsAnchorName=J.required(),this.testIdPrefix=J.required(),this.metricSelected=fe()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["cc-metric-segment"]],hostAttrs:[1,"contents"],inputs:{label:[1,"label"],metricName:[1,"metricName"],metricFor:[1,"metricFor"],placeholder:[1,"placeholder"],searchPopoverId:[1,"searchPopoverId"],searchAnchorName:[1,"searchAnchorName"],hasSettings:[1,"hasSettings"],settingsPopoverId:[1,"settingsPopoverId"],settingsAnchorName:[1,"settingsAnchorName"],testIdPrefix:[1,"testIdPrefix"]},outputs:{metricSelected:"metricSelected"},ngContentSelectors:PS,decls:5,vars:14,consts:[[3,"label","metricName","hasCog","cogPopoverId","cogAnchorName","searchPopoverId","searchAnchorName","testId","cogTestId"],["body","",1,"flex","flex-col","items-stretch","gap-1"],[3,"metricFor"],["kind","node",3,"metricSelected","popoverId","anchorName","placeholder","selected"]],template:function(i,n){i&1&&(Ka(),f(0,"cc-axis-card",0)(1,"div",1),W(2,"cc-metric-meta-value",2),p()(),f(3,"cc-metric-bar-select-popover",3),V("metricSelected",function(a){return n.metricSelected.emit(a)}),p(),Qa(4)),i&2&&(R("label",n.label())("metricName",n.metricName())("hasCog",n.hasSettings())("cogPopoverId",n.settingsPopoverId())("cogAnchorName",n.settingsAnchorName())("searchPopoverId",n.searchPopoverId())("searchAnchorName",n.searchAnchorName())("testId",n.testIdPrefix())("cogTestId",n.testIdPrefix()+"-cog"),h(2),R("metricFor",n.metricFor()),h(),R("popoverId",n.searchPopoverId())("anchorName",n.searchAnchorName())("placeholder",n.placeholder())("selected",n.metricName()))},dependencies:[Bi,$l,Cr],encapsulation:2})}}return t})();function NS(t,o){if(t&1&&W(0,"cc-area-settings-popover",1),t&2){let e=L();R("popoverId",e.settingsPopoverId)("anchorName",e.settingsAnchorName)}}var fb=(()=>{class t{constructor(){this.searchPopoverId="metric-select-popover-area",this.searchAnchorName="metric-segment-area",this.settingsPopoverId="metric-settings-popover-area",this.settingsAnchorName="metric-segment-area-cog",this.mapStateReadWindow=E(Ee),this.metricsBarWriteStore=E(je),this.isRadialLayout=Vt(),this.areaMetric=F(this.mapStateReadWindow.areaMetric$,{initialValue:""})}handleMetricSelected(e){this.metricsBarWriteStore.setAreaMetric(e)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["cc-area-segment"]],hostAttrs:[1,"contents"],decls:2,vars:7,consts:[["label","Area","metricFor","areaMetric","placeholder","Area Metric (highest value)","testIdPrefix","metric-segment-area",3,"metricSelected","metricName","searchPopoverId","searchAnchorName","settingsPopoverId","settingsAnchorName","hasSettings"],[3,"popoverId","anchorName"]],template:function(i,n){i&1&&(f(0,"cc-metric-segment",0),V("metricSelected",function(a){return n.handleMetricSelected(a)}),K(1,NS,1,2,"cc-area-settings-popover",1),p()),i&2&&(R("metricName",n.areaMetric())("searchPopoverId",n.searchPopoverId)("searchAnchorName",n.searchAnchorName)("settingsPopoverId",n.settingsPopoverId)("settingsAnchorName",n.settingsAnchorName)("hasSettings",!n.isRadialLayout()),h(),Q(n.isRadialLayout()?-1:1))},dependencies:[jl,pb],encapsulation:2})}}return t})();function VS(t,o){if(t&1&&(f(0,"span",3),x(1),p()),t&2){let e=L();h(),Re(e.count())}}var gb=(()=>{class t{constructor(e,i,n){this.mapStateReadWindow=e,this.metricsBarReadStore=i,this.metricsBarWriteStore=n,this.mapColorFor=J.required(),this.count=J(null),this.colorMetric=F(this.mapStateReadWindow.colorMetric$,{initialValue:""}),this.colorRange=F(this.mapStateReadWindow.colorRange$,{initialValue:{from:0,to:0}}),this.nodeMetricRange=F(this.metricsBarReadStore.selectedColorMetricData$,{initialValue:{values:[],minValue:0,maxValue:0}}),this.mapColors=F(this.mapStateReadWindow.mapColors$,{initialValue:Qt}),this.color=te(()=>this.mapColors()[this.mapColorFor()])}handleColorChange(e){this.metricsBarWriteStore.setMapColors({[this.mapColorFor()]:e})}static{this.\u0275fac=function(i){return new(i||t)(le(Ee),le(dt),le(je))}}static{this.\u0275cmp=A({type:t,selectors:[["cc-color-band-row"]],inputs:{mapColorFor:[1,"mapColorFor"],count:[1,"count"]},decls:6,vars:9,consts:[[1,"flex","items-center","gap-2"],[3,"colorChange","hexColor","ariaLabel"],[1,"min-w-0","flex-1","truncate","text-sm"],[1,"text-xs","opacity-60","tabular-nums"]],template:function(i,n){i&1&&(f(0,"div",0)(1,"cc-inline-color-picker",1),V("colorChange",function(a){return n.handleColorChange(a)}),p(),f(2,"span",2),x(3),Kt(4,"mapColorLabel"),p(),K(5,VS,2,1,"span",3),p()),i&2&&(h(),R("hexColor",n.color())("ariaLabel","Recolor "+n.mapColorFor()),h(2),we(" ",ep(4,4,n.mapColorFor(),n.colorRange(),n.nodeMetricRange(),n.colorMetric())," "),h(2),Q(n.count()!==null?5:-1))},dependencies:[To,Mg],encapsulation:2})}}return t})();function BS(t,o){if(t&1&&W(0,"cc-color-band-row",3)(1,"cc-color-band-row",4)(2,"cc-color-band-row",5),t&2){let e=L();R("count",e.colorCategoryCounts().positive),h(),R("count",e.colorCategoryCounts().neutral),h(),R("count",e.colorCategoryCounts().negative)}}function WS(t,o){t&1&&W(0,"cc-color-band-row",6)(1,"cc-color-band-row",7)}var bb=(()=>{class t{constructor(e,i){this.fileStoreReadWindow=e,this.colorCategoryCountsStore=i,this.isDeltaState=F(this.fileStoreReadWindow.isDeltaState$,{initialValue:!1}),this.colorCategoryCounts=F(this.colorCategoryCountsStore.colorCategoryCounts$,{initialValue:{positive:0,neutral:0,negative:0}})}static{this.\u0275fac=function(i){return new(i||t)(le(Fe),le(er))}}static{this.\u0275cmp=A({type:t,selectors:[["cc-color-bands-section"]],hostAttrs:[1,"contents"],decls:6,vars:1,consts:[[1,"flex","flex-col","gap-1"],[1,"text-xs","uppercase","tracking-wider","opacity-60"],["mapColorFor","selected"],["mapColorFor","positive",3,"count"],["mapColorFor","neutral",3,"count"],["mapColorFor","negative",3,"count"],["mapColorFor","positiveDelta"],["mapColorFor","negativeDelta"]],template:function(i,n){i&1&&(f(0,"div",0)(1,"span",1),x(2,"Bands"),p(),K(3,BS,3,3)(4,WS,2,0),W(5,"cc-color-band-row",2),p()),i&2&&(h(3),Q(n.isDeltaState()?4:3))},dependencies:[gb],encapsulation:2})}}return t})();function nn(t,o){return t==null||o==null?NaN:t<o?-1:t>o?1:t>=o?0:NaN}function qh(t,o){return t==null||o==null?NaN:o<t?-1:o>t?1:o>=t?0:NaN}function Hl(t){let o,e,i;t.length!==2?(o=nn,e=(s,l)=>nn(t(s),l),i=(s,l)=>t(s)-l):(o=t===nn||t===qh?t:OS,e=t,i=t);function n(s,l,d=0,c=s.length){if(d<c){if(o(l,l)!==0)return c;do{let u=d+c>>>1;e(s[u],l)<0?d=u+1:c=u}while(d<c)}return d}function r(s,l,d=0,c=s.length){if(d<c){if(o(l,l)!==0)return c;do{let u=d+c>>>1;e(s[u],l)<=0?d=u+1:c=u}while(d<c)}return d}function a(s,l,d=0,c=s.length){let u=n(s,l,d,c-1);return u>d&&i(s[u-1],l)>-i(s[u],l)?u-1:u}return{left:n,center:a,right:r}}function OS(){return 0}function Th(t){return t===null?NaN:+t}var vb=Hl(nn),xb=vb.right,zS=vb.left,$S=Hl(Th).center,Rh=xb;function Ul(t,o){let e,i;if(o===void 0)for(let n of t)n!=null&&(e===void 0?n>=n&&(e=i=n):(e>n&&(e=n),i<n&&(i=n)));else{let n=-1;for(let r of t)(r=o(r,++n,t))!=null&&(e===void 0?r>=r&&(e=i=r):(e>r&&(e=r),i<r&&(i=r)))}return[e,i]}var jS=Math.sqrt(50),HS=Math.sqrt(10),US=Math.sqrt(2);function Gl(t,o,e){let i=(o-t)/Math.max(0,e),n=Math.floor(Math.log10(i)),r=i/Math.pow(10,n),a=r>=jS?10:r>=HS?5:r>=US?2:1,s,l,d;return n<0?(d=Math.pow(10,-n)/a,s=Math.round(t*d),l=Math.round(o*d),s/d<t&&++s,l/d>o&&--l,d=-d):(d=Math.pow(10,n)*a,s=Math.round(t/d),l=Math.round(o/d),s*d<t&&++s,l*d>o&&--l),l<s&&.5<=e&&e<2?Gl(t,o,e*2):[s,l,d]}function Xl(t,o,e){if(o=+o,t=+t,e=+e,!(e>0))return[];if(t===o)return[t];let i=o<t,[n,r,a]=i?Gl(o,t,e):Gl(t,o,e);if(!(r>=n))return[];let s=r-n+1,l=new Array(s);if(i)if(a<0)for(let d=0;d<s;++d)l[d]=(r-d)/-a;else for(let d=0;d<s;++d)l[d]=(r-d)*a;else if(a<0)for(let d=0;d<s;++d)l[d]=(n+d)/-a;else for(let d=0;d<s;++d)l[d]=(n+d)*a;return l}function ia(t,o,e){return o=+o,t=+t,e=+e,Gl(t,o,e)[2]}function Ah(t,o,e){o=+o,t=+t,e=+e;let i=o<t,n=i?ia(o,t,e):ia(t,o,e);return(i?-1:1)*(n<0?1/-n:n)}function oa(t,o){let e;if(o===void 0)for(let i of t)i!=null&&(e<i||e===void 0&&i>=i)&&(e=i);else{let i=-1;for(let n of t)(n=o(n,++i,t))!=null&&(e<n||e===void 0&&n>=n)&&(e=n)}return e}function wb(t){return t}var Ih=1,Fh=2,Lh=3,na=4,yb=1e-6;function GS(t){return"translate("+t+",0)"}function XS(t){return"translate(0,"+t+")"}function KS(t){return o=>+t(o)}function QS(t,o){return o=Math.max(0,t.bandwidth()-o*2)/2,t.round()&&(o=Math.round(o)),e=>+t(e)+o}function YS(){return!this.__axis}function Sb(t,o){var e=[],i=null,n=null,r=6,a=6,s=3,l=typeof window<"u"&&window.devicePixelRatio>1?0:.5,d=t===Ih||t===na?-1:1,c=t===na||t===Fh?"x":"y",u=t===Ih||t===Lh?GS:XS;function m(g){var b=i??(o.ticks?o.ticks.apply(o,e):o.domain()),y=n??(o.tickFormat?o.tickFormat.apply(o,e):wb),q=Math.max(r,0)+s,D=o.range(),j=+D[0]+l,k=+D[D.length-1]+l,N=(o.bandwidth?QS:KS)(o.copy(),l),z=g.selection?g.selection():g,H=z.selectAll(".domain").data([null]),G=z.selectAll(".tick").data(b,o).order(),Y=G.exit(),X=G.enter().append("g").attr("class","tick"),he=G.select("line"),Ie=G.select("text");H=H.merge(H.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),G=G.merge(X),he=he.merge(X.append("line").attr("stroke","currentColor").attr(c+"2",d*r)),Ie=Ie.merge(X.append("text").attr("fill","currentColor").attr(c,d*q).attr("dy",t===Ih?"0em":t===Lh?"0.71em":"0.32em")),g!==z&&(H=H.transition(g),G=G.transition(g),he=he.transition(g),Ie=Ie.transition(g),Y=Y.transition(g).attr("opacity",yb).attr("transform",function($){return isFinite($=N($))?u($+l):this.getAttribute("transform")}),X.attr("opacity",yb).attr("transform",function($){var qe=this.parentNode.__axis;return u((qe&&isFinite(qe=qe($))?qe:N($))+l)})),Y.remove(),H.attr("d",t===na||t===Fh?a?"M"+d*a+","+j+"H"+l+"V"+k+"H"+d*a:"M"+l+","+j+"V"+k:a?"M"+j+","+d*a+"V"+l+"H"+k+"V"+d*a:"M"+j+","+l+"H"+k),G.attr("opacity",1).attr("transform",function($){return u(N($)+l)}),he.attr(c+"2",d*r),Ie.attr(c,d*q).text(y),z.filter(YS).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===Fh?"start":t===na?"end":"middle"),z.each(function(){this.__axis=N})}return m.scale=function(g){return arguments.length?(o=g,m):o},m.ticks=function(){return e=Array.from(arguments),m},m.tickArguments=function(g){return arguments.length?(e=g==null?[]:Array.from(g),m):e.slice()},m.tickValues=function(g){return arguments.length?(i=g==null?null:Array.from(g),m):i&&i.slice()},m.tickFormat=function(g){return arguments.length?(n=g,m):n},m.tickSize=function(g){return arguments.length?(r=a=+g,m):r},m.tickSizeInner=function(g){return arguments.length?(r=+g,m):r},m.tickSizeOuter=function(g){return arguments.length?(a=+g,m):a},m.tickPadding=function(g){return arguments.length?(s=+g,m):s},m.offset=function(g){return arguments.length?(l=+g,m):l},m}function Dh(t){return Sb(Lh,t)}function Ph(t){return Sb(na,t)}var ZS={value:()=>{}};function Mb(){for(var t=0,o=arguments.length,e={},i;t<o;++t){if(!(i=arguments[t]+"")||i in e||/[\s.]/.test(i))throw new Error("illegal type: "+i);e[i]=[]}return new Kl(e)}function Kl(t){this._=t}function JS(t,o){return t.trim().split(/^|\s+/).map(function(e){var i="",n=e.indexOf(".");if(n>=0&&(i=e.slice(n+1),e=e.slice(0,n)),e&&!o.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:i}})}Kl.prototype=Mb.prototype={constructor:Kl,on:function(t,o){var e=this._,i=JS(t+"",e),n,r=-1,a=i.length;if(arguments.length<2){for(;++r<a;)if((n=(t=i[r]).type)&&(n=e6(e[n],t.name)))return n;return}if(o!=null&&typeof o!="function")throw new Error("invalid callback: "+o);for(;++r<a;)if(n=(t=i[r]).type)e[n]=Cb(e[n],t.name,o);else if(o==null)for(n in e)e[n]=Cb(e[n],t.name,null);return this},copy:function(){var t={},o=this._;for(var e in o)t[e]=o[e].slice();return new Kl(t)},call:function(t,o){if((n=arguments.length-2)>0)for(var e=new Array(n),i=0,n,r;i<n;++i)e[i]=arguments[i+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(r=this._[t],i=0,n=r.length;i<n;++i)r[i].value.apply(o,e)},apply:function(t,o,e){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var i=this._[t],n=0,r=i.length;n<r;++n)i[n].value.apply(o,e)}};function e6(t,o){for(var e=0,i=t.length,n;e<i;++e)if((n=t[e]).name===o)return n.value}function Cb(t,o,e){for(var i=0,n=t.length;i<n;++i)if(t[i].name===o){t[i]=ZS,t=t.slice(0,i).concat(t.slice(i+1));break}return e!=null&&t.push({name:o,value:e}),t}var Nh=Mb;var Ql="http://www.w3.org/1999/xhtml",Vh={svg:"http://www.w3.org/2000/svg",xhtml:Ql,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Gi(t){var o=t+="",e=o.indexOf(":");return e>=0&&(o=t.slice(0,e))!=="xmlns"&&(t=t.slice(e+1)),Vh.hasOwnProperty(o)?{space:Vh[o],local:t}:t}function t6(t){return function(){var o=this.ownerDocument,e=this.namespaceURI;return e===Ql&&o.documentElement.namespaceURI===Ql?o.createElement(t):o.createElementNS(e,t)}}function i6(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Yl(t){var o=Gi(t);return(o.local?i6:t6)(o)}function o6(){}function rn(t){return t==null?o6:function(){return this.querySelector(t)}}function _b(t){typeof t!="function"&&(t=rn(t));for(var o=this._groups,e=o.length,i=new Array(e),n=0;n<e;++n)for(var r=o[n],a=r.length,s=i[n]=new Array(a),l,d,c=0;c<a;++c)(l=r[c])&&(d=t.call(l,l.__data__,c,r))&&("__data__"in l&&(d.__data__=l.__data__),s[c]=d);return new ht(i,this._parents)}function Bh(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function n6(){return[]}function ra(t){return t==null?n6:function(){return this.querySelectorAll(t)}}function r6(t){return function(){return Bh(t.apply(this,arguments))}}function Eb(t){typeof t=="function"?t=r6(t):t=ra(t);for(var o=this._groups,e=o.length,i=[],n=[],r=0;r<e;++r)for(var a=o[r],s=a.length,l,d=0;d<s;++d)(l=a[d])&&(i.push(t.call(l,l.__data__,d,a)),n.push(l));return new ht(i,n)}function aa(t){return function(){return this.matches(t)}}function Zl(t){return function(o){return o.matches(t)}}var a6=Array.prototype.find;function s6(t){return function(){return a6.call(this.children,t)}}function l6(){return this.firstElementChild}function kb(t){return this.select(t==null?l6:s6(typeof t=="function"?t:Zl(t)))}var c6=Array.prototype.filter;function d6(){return Array.from(this.children)}function h6(t){return function(){return c6.call(this.children,t)}}function qb(t){return this.selectAll(t==null?d6:h6(typeof t=="function"?t:Zl(t)))}function Tb(t){typeof t!="function"&&(t=aa(t));for(var o=this._groups,e=o.length,i=new Array(e),n=0;n<e;++n)for(var r=o[n],a=r.length,s=i[n]=[],l,d=0;d<a;++d)(l=r[d])&&t.call(l,l.__data__,d,r)&&s.push(l);return new ht(i,this._parents)}function Jl(t){return new Array(t.length)}function Rb(){return new ht(this._enter||this._groups.map(Jl),this._parents)}function sa(t,o){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=o}sa.prototype={constructor:sa,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,o){return this._parent.insertBefore(t,o)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function Ab(t){return function(){return t}}function u6(t,o,e,i,n,r){for(var a=0,s,l=o.length,d=r.length;a<d;++a)(s=o[a])?(s.__data__=r[a],i[a]=s):e[a]=new sa(t,r[a]);for(;a<l;++a)(s=o[a])&&(n[a]=s)}function m6(t,o,e,i,n,r,a){var s,l,d=new Map,c=o.length,u=r.length,m=new Array(c),g;for(s=0;s<c;++s)(l=o[s])&&(m[s]=g=a.call(l,l.__data__,s,o)+"",d.has(g)?n[s]=l:d.set(g,l));for(s=0;s<u;++s)g=a.call(t,r[s],s,r)+"",(l=d.get(g))?(i[s]=l,l.__data__=r[s],d.delete(g)):e[s]=new sa(t,r[s]);for(s=0;s<c;++s)(l=o[s])&&d.get(m[s])===l&&(n[s]=l)}function p6(t){return t.__data__}function Ib(t,o){if(!arguments.length)return Array.from(this,p6);var e=o?m6:u6,i=this._parents,n=this._groups;typeof t!="function"&&(t=Ab(t));for(var r=n.length,a=new Array(r),s=new Array(r),l=new Array(r),d=0;d<r;++d){var c=i[d],u=n[d],m=u.length,g=f6(t.call(c,c&&c.__data__,d,i)),b=g.length,y=s[d]=new Array(b),q=a[d]=new Array(b),D=l[d]=new Array(m);e(c,u,y,q,D,g,o);for(var j=0,k=0,N,z;j<b;++j)if(N=y[j]){for(j>=k&&(k=j+1);!(z=q[k])&&++k<b;);N._next=z||null}}return a=new ht(a,i),a._enter=s,a._exit=l,a}function f6(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function Fb(){return new ht(this._exit||this._groups.map(Jl),this._parents)}function Lb(t,o,e){var i=this.enter(),n=this,r=this.exit();return typeof t=="function"?(i=t(i),i&&(i=i.selection())):i=i.append(t+""),o!=null&&(n=o(n),n&&(n=n.selection())),e==null?r.remove():e(r),i&&n?i.merge(n).order():n}function Db(t){for(var o=t.selection?t.selection():t,e=this._groups,i=o._groups,n=e.length,r=i.length,a=Math.min(n,r),s=new Array(n),l=0;l<a;++l)for(var d=e[l],c=i[l],u=d.length,m=s[l]=new Array(u),g,b=0;b<u;++b)(g=d[b]||c[b])&&(m[b]=g);for(;l<n;++l)s[l]=e[l];return new ht(s,this._parents)}function Pb(){for(var t=this._groups,o=-1,e=t.length;++o<e;)for(var i=t[o],n=i.length-1,r=i[n],a;--n>=0;)(a=i[n])&&(r&&a.compareDocumentPosition(r)^4&&r.parentNode.insertBefore(a,r),r=a);return this}function Nb(t){t||(t=g6);function o(u,m){return u&&m?t(u.__data__,m.__data__):!u-!m}for(var e=this._groups,i=e.length,n=new Array(i),r=0;r<i;++r){for(var a=e[r],s=a.length,l=n[r]=new Array(s),d,c=0;c<s;++c)(d=a[c])&&(l[c]=d);l.sort(o)}return new ht(n,this._parents).order()}function g6(t,o){return t<o?-1:t>o?1:t>=o?0:NaN}function Vb(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function Bb(){return Array.from(this)}function Wb(){for(var t=this._groups,o=0,e=t.length;o<e;++o)for(var i=t[o],n=0,r=i.length;n<r;++n){var a=i[n];if(a)return a}return null}function Ob(){let t=0;for(let o of this)++t;return t}function zb(){return!this.node()}function $b(t){for(var o=this._groups,e=0,i=o.length;e<i;++e)for(var n=o[e],r=0,a=n.length,s;r<a;++r)(s=n[r])&&t.call(s,s.__data__,r,n);return this}function b6(t){return function(){this.removeAttribute(t)}}function v6(t){return function(){this.removeAttributeNS(t.space,t.local)}}function x6(t,o){return function(){this.setAttribute(t,o)}}function w6(t,o){return function(){this.setAttributeNS(t.space,t.local,o)}}function y6(t,o){return function(){var e=o.apply(this,arguments);e==null?this.removeAttribute(t):this.setAttribute(t,e)}}function S6(t,o){return function(){var e=o.apply(this,arguments);e==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}function jb(t,o){var e=Gi(t);if(arguments.length<2){var i=this.node();return e.local?i.getAttributeNS(e.space,e.local):i.getAttribute(e)}return this.each((o==null?e.local?v6:b6:typeof o=="function"?e.local?S6:y6:e.local?w6:x6)(e,o))}function ec(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function C6(t){return function(){this.style.removeProperty(t)}}function M6(t,o,e){return function(){this.style.setProperty(t,o,e)}}function _6(t,o,e){return function(){var i=o.apply(this,arguments);i==null?this.style.removeProperty(t):this.style.setProperty(t,i,e)}}function Hb(t,o,e){return arguments.length>1?this.each((o==null?C6:typeof o=="function"?_6:M6)(t,o,e??"")):Io(this.node(),t)}function Io(t,o){return t.style.getPropertyValue(o)||ec(t).getComputedStyle(t,null).getPropertyValue(o)}function E6(t){return function(){delete this[t]}}function k6(t,o){return function(){this[t]=o}}function q6(t,o){return function(){var e=o.apply(this,arguments);e==null?delete this[t]:this[t]=e}}function Ub(t,o){return arguments.length>1?this.each((o==null?E6:typeof o=="function"?q6:k6)(t,o)):this.node()[t]}function Gb(t){return t.trim().split(/^|\s+/)}function Wh(t){return t.classList||new Xb(t)}function Xb(t){this._node=t,this._names=Gb(t.getAttribute("class")||"")}Xb.prototype={add:function(t){var o=this._names.indexOf(t);o<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var o=this._names.indexOf(t);o>=0&&(this._names.splice(o,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function Kb(t,o){for(var e=Wh(t),i=-1,n=o.length;++i<n;)e.add(o[i])}function Qb(t,o){for(var e=Wh(t),i=-1,n=o.length;++i<n;)e.remove(o[i])}function T6(t){return function(){Kb(this,t)}}function R6(t){return function(){Qb(this,t)}}function A6(t,o){return function(){(o.apply(this,arguments)?Kb:Qb)(this,t)}}function Yb(t,o){var e=Gb(t+"");if(arguments.length<2){for(var i=Wh(this.node()),n=-1,r=e.length;++n<r;)if(!i.contains(e[n]))return!1;return!0}return this.each((typeof o=="function"?A6:o?T6:R6)(e,o))}function I6(){this.textContent=""}function F6(t){return function(){this.textContent=t}}function L6(t){return function(){var o=t.apply(this,arguments);this.textContent=o??""}}function Zb(t){return arguments.length?this.each(t==null?I6:(typeof t=="function"?L6:F6)(t)):this.node().textContent}function D6(){this.innerHTML=""}function P6(t){return function(){this.innerHTML=t}}function N6(t){return function(){var o=t.apply(this,arguments);this.innerHTML=o??""}}function Jb(t){return arguments.length?this.each(t==null?D6:(typeof t=="function"?N6:P6)(t)):this.node().innerHTML}function V6(){this.nextSibling&&this.parentNode.appendChild(this)}function e3(){return this.each(V6)}function B6(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function t3(){return this.each(B6)}function i3(t){var o=typeof t=="function"?t:Yl(t);return this.select(function(){return this.appendChild(o.apply(this,arguments))})}function W6(){return null}function o3(t,o){var e=typeof t=="function"?t:Yl(t),i=o==null?W6:typeof o=="function"?o:rn(o);return this.select(function(){return this.insertBefore(e.apply(this,arguments),i.apply(this,arguments)||null)})}function O6(){var t=this.parentNode;t&&t.removeChild(this)}function n3(){return this.each(O6)}function z6(){var t=this.cloneNode(!1),o=this.parentNode;return o?o.insertBefore(t,this.nextSibling):t}function $6(){var t=this.cloneNode(!0),o=this.parentNode;return o?o.insertBefore(t,this.nextSibling):t}function r3(t){return this.select(t?$6:z6)}function a3(t){return arguments.length?this.property("__data__",t):this.node().__data__}function j6(t){return function(o){t.call(this,o,this.__data__)}}function H6(t){return t.trim().split(/^|\s+/).map(function(o){var e="",i=o.indexOf(".");return i>=0&&(e=o.slice(i+1),o=o.slice(0,i)),{type:o,name:e}})}function U6(t){return function(){var o=this.__on;if(o){for(var e=0,i=-1,n=o.length,r;e<n;++e)r=o[e],(!t.type||r.type===t.type)&&r.name===t.name?this.removeEventListener(r.type,r.listener,r.options):o[++i]=r;++i?o.length=i:delete this.__on}}}function G6(t,o,e){return function(){var i=this.__on,n,r=j6(o);if(i){for(var a=0,s=i.length;a<s;++a)if((n=i[a]).type===t.type&&n.name===t.name){this.removeEventListener(n.type,n.listener,n.options),this.addEventListener(n.type,n.listener=r,n.options=e),n.value=o;return}}this.addEventListener(t.type,r,e),n={type:t.type,name:t.name,value:o,listener:r,options:e},i?i.push(n):this.__on=[n]}}function s3(t,o,e){var i=H6(t+""),n,r=i.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var l=0,d=s.length,c;l<d;++l)for(n=0,c=s[l];n<r;++n)if((a=i[n]).type===c.type&&a.name===c.name)return c.value}return}for(s=o?G6:U6,n=0;n<r;++n)this.each(s(i[n],o,e));return this}function l3(t,o,e){var i=ec(t),n=i.CustomEvent;typeof n=="function"?n=new n(o,e):(n=i.document.createEvent("Event"),e?(n.initEvent(o,e.bubbles,e.cancelable),n.detail=e.detail):n.initEvent(o,!1,!1)),t.dispatchEvent(n)}function X6(t,o){return function(){return l3(this,t,o)}}function K6(t,o){return function(){return l3(this,t,o.apply(this,arguments))}}function c3(t,o){return this.each((typeof o=="function"?K6:X6)(t,o))}function*d3(){for(var t=this._groups,o=0,e=t.length;o<e;++o)for(var i=t[o],n=0,r=i.length,a;n<r;++n)(a=i[n])&&(yield a)}var Oh=[null];function ht(t,o){this._groups=t,this._parents=o}function h3(){return new ht([[document.documentElement]],Oh)}function Q6(){return this}ht.prototype=h3.prototype={constructor:ht,select:_b,selectAll:Eb,selectChild:kb,selectChildren:qb,filter:Tb,data:Ib,enter:Rb,exit:Fb,join:Lb,merge:Db,selection:Q6,order:Pb,sort:Nb,call:Vb,nodes:Bb,node:Wb,size:Ob,empty:zb,each:$b,attr:jb,style:Hb,property:Ub,classed:Yb,text:Zb,html:Jb,raise:e3,lower:t3,append:i3,insert:o3,remove:n3,clone:r3,datum:a3,on:s3,dispatch:c3,[Symbol.iterator]:d3};var Xi=h3;function zh(t){return typeof t=="string"?new ht([[document.querySelector(t)]],[document.documentElement]):new ht([[t]],Oh)}function u3(t){let o;for(;o=t.sourceEvent;)t=o;return t}function $h(t,o){if(t=u3(t),o===void 0&&(o=t.currentTarget),o){var e=o.ownerSVGElement||o;if(e.createSVGPoint){var i=e.createSVGPoint();return i.x=t.clientX,i.y=t.clientY,i=i.matrixTransform(o.getScreenCTM().inverse()),[i.x,i.y]}if(o.getBoundingClientRect){var n=o.getBoundingClientRect();return[t.clientX-n.left-o.clientLeft,t.clientY-n.top-o.clientTop]}}return[t.pageX,t.pageY]}function tc(t,o,e){t.prototype=o.prototype=e,e.constructor=t}function jh(t,o){var e=Object.create(t.prototype);for(var i in o)e[i]=o[i];return e}function da(){}var la=.7,nc=1/la,_r="\\s*([+-]?\\d+)\\s*",ca="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",zi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Y6=/^#([0-9a-f]{3,8})$/,Z6=new RegExp(`^rgb\\(${_r},${_r},${_r}\\)$`),J6=new RegExp(`^rgb\\(${zi},${zi},${zi}\\)$`),e8=new RegExp(`^rgba\\(${_r},${_r},${_r},${ca}\\)$`),t8=new RegExp(`^rgba\\(${zi},${zi},${zi},${ca}\\)$`),i8=new RegExp(`^hsl\\(${ca},${zi},${zi}\\)$`),o8=new RegExp(`^hsla\\(${ca},${zi},${zi},${ca}\\)$`),m3={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};tc(da,bi,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:p3,formatHex:p3,formatHex8:n8,formatHsl:r8,formatRgb:f3,toString:f3});function p3(){return this.rgb().formatHex()}function n8(){return this.rgb().formatHex8()}function r8(){return y3(this).formatHsl()}function f3(){return this.rgb().formatRgb()}function bi(t){var o,e;return t=(t+"").trim().toLowerCase(),(o=Y6.exec(t))?(e=o[1].length,o=parseInt(o[1],16),e===6?g3(o):e===3?new Wt(o>>8&15|o>>4&240,o>>4&15|o&240,(o&15)<<4|o&15,1):e===8?ic(o>>24&255,o>>16&255,o>>8&255,(o&255)/255):e===4?ic(o>>12&15|o>>8&240,o>>8&15|o>>4&240,o>>4&15|o&240,((o&15)<<4|o&15)/255):null):(o=Z6.exec(t))?new Wt(o[1],o[2],o[3],1):(o=J6.exec(t))?new Wt(o[1]*255/100,o[2]*255/100,o[3]*255/100,1):(o=e8.exec(t))?ic(o[1],o[2],o[3],o[4]):(o=t8.exec(t))?ic(o[1]*255/100,o[2]*255/100,o[3]*255/100,o[4]):(o=i8.exec(t))?x3(o[1],o[2]/100,o[3]/100,1):(o=o8.exec(t))?x3(o[1],o[2]/100,o[3]/100,o[4]):m3.hasOwnProperty(t)?g3(m3[t]):t==="transparent"?new Wt(NaN,NaN,NaN,0):null}function g3(t){return new Wt(t>>16&255,t>>8&255,t&255,1)}function ic(t,o,e,i){return i<=0&&(t=o=e=NaN),new Wt(t,o,e,i)}function a8(t){return t instanceof da||(t=bi(t)),t?(t=t.rgb(),new Wt(t.r,t.g,t.b,t.opacity)):new Wt}function Er(t,o,e,i){return arguments.length===1?a8(t):new Wt(t,o,e,i??1)}function Wt(t,o,e,i){this.r=+t,this.g=+o,this.b=+e,this.opacity=+i}tc(Wt,Er,jh(da,{brighter(t){return t=t==null?nc:Math.pow(nc,t),new Wt(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?la:Math.pow(la,t),new Wt(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Wt(sn(this.r),sn(this.g),sn(this.b),rc(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:b3,formatHex:b3,formatHex8:s8,formatRgb:v3,toString:v3}));function b3(){return`#${an(this.r)}${an(this.g)}${an(this.b)}`}function s8(){return`#${an(this.r)}${an(this.g)}${an(this.b)}${an((isNaN(this.opacity)?1:this.opacity)*255)}`}function v3(){let t=rc(this.opacity);return`${t===1?"rgb(":"rgba("}${sn(this.r)}, ${sn(this.g)}, ${sn(this.b)}${t===1?")":`, ${t})`}`}function rc(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function sn(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function an(t){return t=sn(t),(t<16?"0":"")+t.toString(16)}function x3(t,o,e,i){return i<=0?t=o=e=NaN:e<=0||e>=1?t=o=NaN:o<=0&&(t=NaN),new gi(t,o,e,i)}function y3(t){if(t instanceof gi)return new gi(t.h,t.s,t.l,t.opacity);if(t instanceof da||(t=bi(t)),!t)return new gi;if(t instanceof gi)return t;t=t.rgb();var o=t.r/255,e=t.g/255,i=t.b/255,n=Math.min(o,e,i),r=Math.max(o,e,i),a=NaN,s=r-n,l=(r+n)/2;return s?(o===r?a=(e-i)/s+(e<i)*6:e===r?a=(i-o)/s+2:a=(o-e)/s+4,s/=l<.5?r+n:2-r-n,a*=60):s=l>0&&l<1?0:a,new gi(a,s,l,t.opacity)}function S3(t,o,e,i){return arguments.length===1?y3(t):new gi(t,o,e,i??1)}function gi(t,o,e,i){this.h=+t,this.s=+o,this.l=+e,this.opacity=+i}tc(gi,S3,jh(da,{brighter(t){return t=t==null?nc:Math.pow(nc,t),new gi(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?la:Math.pow(la,t),new gi(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,o=isNaN(t)||isNaN(this.s)?0:this.s,e=this.l,i=e+(e<.5?e:1-e)*o,n=2*e-i;return new Wt(Hh(t>=240?t-240:t+120,n,i),Hh(t,n,i),Hh(t<120?t+240:t-120,n,i),this.opacity)},clamp(){return new gi(w3(this.h),oc(this.s),oc(this.l),rc(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let t=rc(this.opacity);return`${t===1?"hsl(":"hsla("}${w3(this.h)}, ${oc(this.s)*100}%, ${oc(this.l)*100}%${t===1?")":`, ${t})`}`}}));function w3(t){return t=(t||0)%360,t<0?t+360:t}function oc(t){return Math.max(0,Math.min(1,t||0))}function Hh(t,o,e){return(t<60?o+(e-o)*t/60:t<180?e:t<240?o+(e-o)*(240-t)/60:o)*255}function Uh(t,o,e,i,n){var r=t*t,a=r*t;return((1-3*t+3*r-a)*o+(4-6*r+3*a)*e+(1+3*t+3*r-3*a)*i+a*n)/6}function C3(t){var o=t.length-1;return function(e){var i=e<=0?e=0:e>=1?(e=1,o-1):Math.floor(e*o),n=t[i],r=t[i+1],a=i>0?t[i-1]:2*n-r,s=i<o-1?t[i+2]:2*r-n;return Uh((e-i/o)*o,a,n,r,s)}}function M3(t){var o=t.length;return function(e){var i=Math.floor(((e%=1)<0?++e:e)*o),n=t[(i+o-1)%o],r=t[i%o],a=t[(i+1)%o],s=t[(i+2)%o];return Uh((e-i/o)*o,n,r,a,s)}}var ha=t=>()=>t;function l8(t,o){return function(e){return t+e*o}}function c8(t,o,e){return t=Math.pow(t,e),o=Math.pow(o,e)-t,e=1/e,function(i){return Math.pow(t+i*o,e)}}function _3(t){return(t=+t)==1?ac:function(o,e){return e-o?c8(o,e,t):ha(isNaN(o)?e:o)}}function ac(t,o){var e=o-t;return e?l8(t,e):ha(isNaN(t)?o:t)}var ln=(function t(o){var e=_3(o);function i(n,r){var a=e((n=Er(n)).r,(r=Er(r)).r),s=e(n.g,r.g),l=e(n.b,r.b),d=ac(n.opacity,r.opacity);return function(c){return n.r=a(c),n.g=s(c),n.b=l(c),n.opacity=d(c),n+""}}return i.gamma=t,i})(1);function E3(t){return function(o){var e=o.length,i=new Array(e),n=new Array(e),r=new Array(e),a,s;for(a=0;a<e;++a)s=Er(o[a]),i[a]=s.r||0,n[a]=s.g||0,r[a]=s.b||0;return i=t(i),n=t(n),r=t(r),s.opacity=1,function(l){return s.r=i(l),s.g=n(l),s.b=r(l),s+""}}}var d8=E3(C3),h8=E3(M3);function k3(t,o){o||(o=[]);var e=t?Math.min(o.length,t.length):0,i=o.slice(),n;return function(r){for(n=0;n<e;++n)i[n]=t[n]*(1-r)+o[n]*r;return i}}function q3(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function T3(t,o){var e=o?o.length:0,i=t?Math.min(e,t.length):0,n=new Array(i),r=new Array(e),a;for(a=0;a<i;++a)n[a]=cn(t[a],o[a]);for(;a<e;++a)r[a]=o[a];return function(s){for(a=0;a<i;++a)r[a]=n[a](s);return r}}function R3(t,o){var e=new Date;return t=+t,o=+o,function(i){return e.setTime(t*(1-i)+o*i),e}}function yt(t,o){return t=+t,o=+o,function(e){return t*(1-e)+o*e}}function A3(t,o){var e={},i={},n;(t===null||typeof t!="object")&&(t={}),(o===null||typeof o!="object")&&(o={});for(n in o)n in t?e[n]=cn(t[n],o[n]):i[n]=o[n];return function(r){for(n in e)i[n]=e[n](r);return i}}var Xh=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Gh=new RegExp(Xh.source,"g");function u8(t){return function(){return t}}function m8(t){return function(o){return t(o)+""}}function ua(t,o){var e=Xh.lastIndex=Gh.lastIndex=0,i,n,r,a=-1,s=[],l=[];for(t=t+"",o=o+"";(i=Xh.exec(t))&&(n=Gh.exec(o));)(r=n.index)>e&&(r=o.slice(e,r),s[a]?s[a]+=r:s[++a]=r),(i=i[0])===(n=n[0])?s[a]?s[a]+=n:s[++a]=n:(s[++a]=null,l.push({i:a,x:yt(i,n)})),e=Gh.lastIndex;return e<o.length&&(r=o.slice(e),s[a]?s[a]+=r:s[++a]=r),s.length<2?l[0]?m8(l[0].x):u8(o):(o=l.length,function(d){for(var c=0,u;c<o;++c)s[(u=l[c]).i]=u.x(d);return s.join("")})}function cn(t,o){var e=typeof o,i;return o==null||e==="boolean"?ha(o):(e==="number"?yt:e==="string"?(i=bi(o))?(o=i,ln):ua:o instanceof bi?ln:o instanceof Date?R3:q3(o)?k3:Array.isArray(o)?T3:typeof o.valueOf!="function"&&typeof o.toString!="function"||isNaN(o)?A3:yt)(t,o)}function Kh(t,o){return t=+t,o=+o,function(e){return Math.round(t*(1-e)+o*e)}}var I3=180/Math.PI,sc={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Qh(t,o,e,i,n,r){var a,s,l;return(a=Math.sqrt(t*t+o*o))&&(t/=a,o/=a),(l=t*e+o*i)&&(e-=t*l,i-=o*l),(s=Math.sqrt(e*e+i*i))&&(e/=s,i/=s,l/=s),t*i<o*e&&(t=-t,o=-o,l=-l,a=-a),{translateX:n,translateY:r,rotate:Math.atan2(o,t)*I3,skewX:Math.atan(l)*I3,scaleX:a,scaleY:s}}var lc;function F3(t){let o=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return o.isIdentity?sc:Qh(o.a,o.b,o.c,o.d,o.e,o.f)}function L3(t){return t==null?sc:(lc||(lc=document.createElementNS("http://www.w3.org/2000/svg","g")),lc.setAttribute("transform",t),(t=lc.transform.baseVal.consolidate())?(t=t.matrix,Qh(t.a,t.b,t.c,t.d,t.e,t.f)):sc)}function D3(t,o,e,i){function n(d){return d.length?d.pop()+" ":""}function r(d,c,u,m,g,b){if(d!==u||c!==m){var y=g.push("translate(",null,o,null,e);b.push({i:y-4,x:yt(d,u)},{i:y-2,x:yt(c,m)})}else(u||m)&&g.push("translate("+u+o+m+e)}function a(d,c,u,m){d!==c?(d-c>180?c+=360:c-d>180&&(d+=360),m.push({i:u.push(n(u)+"rotate(",null,i)-2,x:yt(d,c)})):c&&u.push(n(u)+"rotate("+c+i)}function s(d,c,u,m){d!==c?m.push({i:u.push(n(u)+"skewX(",null,i)-2,x:yt(d,c)}):c&&u.push(n(u)+"skewX("+c+i)}function l(d,c,u,m,g,b){if(d!==u||c!==m){var y=g.push(n(g)+"scale(",null,",",null,")");b.push({i:y-4,x:yt(d,u)},{i:y-2,x:yt(c,m)})}else(u!==1||m!==1)&&g.push(n(g)+"scale("+u+","+m+")")}return function(d,c){var u=[],m=[];return d=t(d),c=t(c),r(d.translateX,d.translateY,c.translateX,c.translateY,u,m),a(d.rotate,c.rotate,u,m),s(d.skewX,c.skewX,u,m),l(d.scaleX,d.scaleY,c.scaleX,c.scaleY,u,m),d=c=null,function(g){for(var b=-1,y=m.length,q;++b<y;)u[(q=m[b]).i]=q.x(g);return u.join("")}}}var Yh=D3(F3,"px, ","px)","deg)"),Zh=D3(L3,", ",")",")");var kr=0,pa=0,ma=0,N3=1e3,cc,fa,dc=0,dn=0,hc=0,ga=typeof performance=="object"&&performance.now?performance:Date,V3=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function va(){return dn||(V3(p8),dn=ga.now()+hc)}function p8(){dn=0}function ba(){this._call=this._time=this._next=null}ba.prototype=uc.prototype={constructor:ba,restart:function(t,o,e){if(typeof t!="function")throw new TypeError("callback is not a function");e=(e==null?va():+e)+(o==null?0:+o),!this._next&&fa!==this&&(fa?fa._next=this:cc=this,fa=this),this._call=t,this._time=e,Jh()},stop:function(){this._call&&(this._call=null,this._time=1/0,Jh())}};function uc(t,o,e){var i=new ba;return i.restart(t,o,e),i}function B3(){va(),++kr;for(var t=cc,o;t;)(o=dn-t._time)>=0&&t._call.call(void 0,o),t=t._next;--kr}function P3(){dn=(dc=ga.now())+hc,kr=pa=0;try{B3()}finally{kr=0,g8(),dn=0}}function f8(){var t=ga.now(),o=t-dc;o>N3&&(hc-=o,dc=t)}function g8(){for(var t,o=cc,e,i=1/0;o;)o._call?(i>o._time&&(i=o._time),t=o,o=o._next):(e=o._next,o._next=null,o=t?t._next=e:cc=e);fa=t,Jh(i)}function Jh(t){if(!kr){pa&&(pa=clearTimeout(pa));var o=t-dn;o>24?(t<1/0&&(pa=setTimeout(P3,t-ga.now()-hc)),ma&&(ma=clearInterval(ma))):(ma||(dc=ga.now(),ma=setInterval(f8,N3)),kr=1,V3(P3))}}function mc(t,o,e){var i=new ba;return o=o==null?0:+o,i.restart(n=>{i.stop(),t(n+o)},o,e),i}var b8=Nh("start","end","cancel","interrupt"),v8=[],z3=0,W3=1,fc=2,pc=3,O3=4,gc=5,xa=6;function Fo(t,o,e,i,n,r){var a=t.__transition;if(!a)t.__transition={};else if(e in a)return;x8(t,e,{name:o,index:i,group:n,on:b8,tween:v8,time:r.time,delay:r.delay,duration:r.duration,ease:r.ease,timer:null,state:z3})}function wa(t,o){var e=ft(t,o);if(e.state>z3)throw new Error("too late; already scheduled");return e}function St(t,o){var e=ft(t,o);if(e.state>pc)throw new Error("too late; already running");return e}function ft(t,o){var e=t.__transition;if(!e||!(e=e[o]))throw new Error("transition not found");return e}function x8(t,o,e){var i=t.__transition,n;i[o]=e,e.timer=uc(r,0,e.time);function r(d){e.state=W3,e.timer.restart(a,e.delay,e.time),e.delay<=d&&a(d-e.delay)}function a(d){var c,u,m,g;if(e.state!==W3)return l();for(c in i)if(g=i[c],g.name===e.name){if(g.state===pc)return mc(a);g.state===O3?(g.state=xa,g.timer.stop(),g.on.call("interrupt",t,t.__data__,g.index,g.group),delete i[c]):+c<o&&(g.state=xa,g.timer.stop(),g.on.call("cancel",t,t.__data__,g.index,g.group),delete i[c])}if(mc(function(){e.state===pc&&(e.state=O3,e.timer.restart(s,e.delay,e.time),s(d))}),e.state=fc,e.on.call("start",t,t.__data__,e.index,e.group),e.state===fc){for(e.state=pc,n=new Array(m=e.tween.length),c=0,u=-1;c<m;++c)(g=e.tween[c].value.call(t,t.__data__,e.index,e.group))&&(n[++u]=g);n.length=u+1}}function s(d){for(var c=d<e.duration?e.ease.call(null,d/e.duration):(e.timer.restart(l),e.state=gc,1),u=-1,m=n.length;++u<m;)n[u].call(t,c);e.state===gc&&(e.on.call("end",t,t.__data__,e.index,e.group),l())}function l(){e.state=xa,e.timer.stop(),delete i[o];for(var d in i)return;delete t.__transition}}function bc(t,o){var e=t.__transition,i,n,r=!0,a;if(e){o=o==null?null:o+"";for(a in e){if((i=e[a]).name!==o){r=!1;continue}n=i.state>fc&&i.state<gc,i.state=xa,i.timer.stop(),i.on.call(n?"interrupt":"cancel",t,t.__data__,i.index,i.group),delete e[a]}r&&delete t.__transition}}function $3(t){return this.each(function(){bc(this,t)})}function w8(t,o){var e,i;return function(){var n=St(this,t),r=n.tween;if(r!==e){i=e=r;for(var a=0,s=i.length;a<s;++a)if(i[a].name===o){i=i.slice(),i.splice(a,1);break}}n.tween=i}}function y8(t,o,e){var i,n;if(typeof e!="function")throw new Error;return function(){var r=St(this,t),a=r.tween;if(a!==i){n=(i=a).slice();for(var s={name:o,value:e},l=0,d=n.length;l<d;++l)if(n[l].name===o){n[l]=s;break}l===d&&n.push(s)}r.tween=n}}function j3(t,o){var e=this._id;if(t+="",arguments.length<2){for(var i=ft(this.node(),e).tween,n=0,r=i.length,a;n<r;++n)if((a=i[n]).name===t)return a.value;return null}return this.each((o==null?w8:y8)(e,t,o))}function qr(t,o,e){var i=t._id;return t.each(function(){var n=St(this,i);(n.value||(n.value={}))[o]=e.apply(this,arguments)}),function(n){return ft(n,i).value[o]}}function vc(t,o){var e;return(typeof o=="number"?yt:o instanceof bi?ln:(e=bi(o))?(o=e,ln):ua)(t,o)}function S8(t){return function(){this.removeAttribute(t)}}function C8(t){return function(){this.removeAttributeNS(t.space,t.local)}}function M8(t,o,e){var i,n=e+"",r;return function(){var a=this.getAttribute(t);return a===n?null:a===i?r:r=o(i=a,e)}}function _8(t,o,e){var i,n=e+"",r;return function(){var a=this.getAttributeNS(t.space,t.local);return a===n?null:a===i?r:r=o(i=a,e)}}function E8(t,o,e){var i,n,r;return function(){var a,s=e(this),l;return s==null?void this.removeAttribute(t):(a=this.getAttribute(t),l=s+"",a===l?null:a===i&&l===n?r:(n=l,r=o(i=a,s)))}}function k8(t,o,e){var i,n,r;return function(){var a,s=e(this),l;return s==null?void this.removeAttributeNS(t.space,t.local):(a=this.getAttributeNS(t.space,t.local),l=s+"",a===l?null:a===i&&l===n?r:(n=l,r=o(i=a,s)))}}function H3(t,o){var e=Gi(t),i=e==="transform"?Zh:vc;return this.attrTween(t,typeof o=="function"?(e.local?k8:E8)(e,i,qr(this,"attr."+t,o)):o==null?(e.local?C8:S8)(e):(e.local?_8:M8)(e,i,o))}function q8(t,o){return function(e){this.setAttribute(t,o.call(this,e))}}function T8(t,o){return function(e){this.setAttributeNS(t.space,t.local,o.call(this,e))}}function R8(t,o){var e,i;function n(){var r=o.apply(this,arguments);return r!==i&&(e=(i=r)&&T8(t,r)),e}return n._value=o,n}function A8(t,o){var e,i;function n(){var r=o.apply(this,arguments);return r!==i&&(e=(i=r)&&q8(t,r)),e}return n._value=o,n}function U3(t,o){var e="attr."+t;if(arguments.length<2)return(e=this.tween(e))&&e._value;if(o==null)return this.tween(e,null);if(typeof o!="function")throw new Error;var i=Gi(t);return this.tween(e,(i.local?R8:A8)(i,o))}function I8(t,o){return function(){wa(this,t).delay=+o.apply(this,arguments)}}function F8(t,o){return o=+o,function(){wa(this,t).delay=o}}function G3(t){var o=this._id;return arguments.length?this.each((typeof t=="function"?I8:F8)(o,t)):ft(this.node(),o).delay}function L8(t,o){return function(){St(this,t).duration=+o.apply(this,arguments)}}function D8(t,o){return o=+o,function(){St(this,t).duration=o}}function X3(t){var o=this._id;return arguments.length?this.each((typeof t=="function"?L8:D8)(o,t)):ft(this.node(),o).duration}function P8(t,o){if(typeof o!="function")throw new Error;return function(){St(this,t).ease=o}}function K3(t){var o=this._id;return arguments.length?this.each(P8(o,t)):ft(this.node(),o).ease}function N8(t,o){return function(){var e=o.apply(this,arguments);if(typeof e!="function")throw new Error;St(this,t).ease=e}}function Q3(t){if(typeof t!="function")throw new Error;return this.each(N8(this._id,t))}function Y3(t){typeof t!="function"&&(t=aa(t));for(var o=this._groups,e=o.length,i=new Array(e),n=0;n<e;++n)for(var r=o[n],a=r.length,s=i[n]=[],l,d=0;d<a;++d)(l=r[d])&&t.call(l,l.__data__,d,r)&&s.push(l);return new Ft(i,this._parents,this._name,this._id)}function Z3(t){if(t._id!==this._id)throw new Error;for(var o=this._groups,e=t._groups,i=o.length,n=e.length,r=Math.min(i,n),a=new Array(i),s=0;s<r;++s)for(var l=o[s],d=e[s],c=l.length,u=a[s]=new Array(c),m,g=0;g<c;++g)(m=l[g]||d[g])&&(u[g]=m);for(;s<i;++s)a[s]=o[s];return new Ft(a,this._parents,this._name,this._id)}function V8(t){return(t+"").trim().split(/^|\s+/).every(function(o){var e=o.indexOf(".");return e>=0&&(o=o.slice(0,e)),!o||o==="start"})}function B8(t,o,e){var i,n,r=V8(o)?wa:St;return function(){var a=r(this,t),s=a.on;s!==i&&(n=(i=s).copy()).on(o,e),a.on=n}}function J3(t,o){var e=this._id;return arguments.length<2?ft(this.node(),e).on.on(t):this.each(B8(e,t,o))}function W8(t){return function(){var o=this.parentNode;for(var e in this.__transition)if(+e!==t)return;o&&o.removeChild(this)}}function ev(){return this.on("end.remove",W8(this._id))}function tv(t){var o=this._name,e=this._id;typeof t!="function"&&(t=rn(t));for(var i=this._groups,n=i.length,r=new Array(n),a=0;a<n;++a)for(var s=i[a],l=s.length,d=r[a]=new Array(l),c,u,m=0;m<l;++m)(c=s[m])&&(u=t.call(c,c.__data__,m,s))&&("__data__"in c&&(u.__data__=c.__data__),d[m]=u,Fo(d[m],o,e,m,d,ft(c,e)));return new Ft(r,this._parents,o,e)}function iv(t){var o=this._name,e=this._id;typeof t!="function"&&(t=ra(t));for(var i=this._groups,n=i.length,r=[],a=[],s=0;s<n;++s)for(var l=i[s],d=l.length,c,u=0;u<d;++u)if(c=l[u]){for(var m=t.call(c,c.__data__,u,l),g,b=ft(c,e),y=0,q=m.length;y<q;++y)(g=m[y])&&Fo(g,o,e,y,m,b);r.push(m),a.push(c)}return new Ft(r,a,o,e)}var O8=Xi.prototype.constructor;function ov(){return new O8(this._groups,this._parents)}function z8(t,o){var e,i,n;return function(){var r=Io(this,t),a=(this.style.removeProperty(t),Io(this,t));return r===a?null:r===e&&a===i?n:n=o(e=r,i=a)}}function nv(t){return function(){this.style.removeProperty(t)}}function $8(t,o,e){var i,n=e+"",r;return function(){var a=Io(this,t);return a===n?null:a===i?r:r=o(i=a,e)}}function j8(t,o,e){var i,n,r;return function(){var a=Io(this,t),s=e(this),l=s+"";return s==null&&(l=s=(this.style.removeProperty(t),Io(this,t))),a===l?null:a===i&&l===n?r:(n=l,r=o(i=a,s))}}function H8(t,o){var e,i,n,r="style."+o,a="end."+r,s;return function(){var l=St(this,t),d=l.on,c=l.value[r]==null?s||(s=nv(o)):void 0;(d!==e||n!==c)&&(i=(e=d).copy()).on(a,n=c),l.on=i}}function rv(t,o,e){var i=(t+="")=="transform"?Yh:vc;return o==null?this.styleTween(t,z8(t,i)).on("end.style."+t,nv(t)):typeof o=="function"?this.styleTween(t,j8(t,i,qr(this,"style."+t,o))).each(H8(this._id,t)):this.styleTween(t,$8(t,i,o),e).on("end.style."+t,null)}function U8(t,o,e){return function(i){this.style.setProperty(t,o.call(this,i),e)}}function G8(t,o,e){var i,n;function r(){var a=o.apply(this,arguments);return a!==n&&(i=(n=a)&&U8(t,a,e)),i}return r._value=o,r}function av(t,o,e){var i="style."+(t+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(o==null)return this.tween(i,null);if(typeof o!="function")throw new Error;return this.tween(i,G8(t,o,e??""))}function X8(t){return function(){this.textContent=t}}function K8(t){return function(){var o=t(this);this.textContent=o??""}}function sv(t){return this.tween("text",typeof t=="function"?K8(qr(this,"text",t)):X8(t==null?"":t+""))}function Q8(t){return function(o){this.textContent=t.call(this,o)}}function Y8(t){var o,e;function i(){var n=t.apply(this,arguments);return n!==e&&(o=(e=n)&&Q8(n)),o}return i._value=t,i}function lv(t){var o="text";if(arguments.length<1)return(o=this.tween(o))&&o._value;if(t==null)return this.tween(o,null);if(typeof t!="function")throw new Error;return this.tween(o,Y8(t))}function cv(){for(var t=this._name,o=this._id,e=xc(),i=this._groups,n=i.length,r=0;r<n;++r)for(var a=i[r],s=a.length,l,d=0;d<s;++d)if(l=a[d]){var c=ft(l,o);Fo(l,t,e,d,a,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Ft(i,this._parents,t,e)}function dv(){var t,o,e=this,i=e._id,n=e.size();return new Promise(function(r,a){var s={value:a},l={value:function(){--n===0&&r()}};e.each(function(){var d=St(this,i),c=d.on;c!==t&&(o=(t=c).copy(),o._.cancel.push(s),o._.interrupt.push(s),o._.end.push(l)),d.on=o}),n===0&&r()})}var Z8=0;function Ft(t,o,e,i){this._groups=t,this._parents=o,this._name=e,this._id=i}function hv(t){return Xi().transition(t)}function xc(){return++Z8}var Ki=Xi.prototype;Ft.prototype=hv.prototype={constructor:Ft,select:tv,selectAll:iv,selectChild:Ki.selectChild,selectChildren:Ki.selectChildren,filter:Y3,merge:Z3,selection:ov,transition:cv,call:Ki.call,nodes:Ki.nodes,node:Ki.node,size:Ki.size,empty:Ki.empty,each:Ki.each,on:J3,attr:H3,attrTween:U3,style:rv,styleTween:av,text:sv,textTween:lv,remove:ev,tween:j3,delay:G3,duration:X3,ease:K3,easeVarying:Q3,end:dv,[Symbol.iterator]:Ki[Symbol.iterator]};function wc(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var J8={time:null,delay:0,duration:250,ease:wc};function e7(t,o){for(var e;!(e=t.__transition)||!(e=e[o]);)if(!(t=t.parentNode))throw new Error(`transition ${o} not found`);return e}function uv(t){var o,e;t instanceof Ft?(o=t._id,t=t._name):(o=xc(),(e=J8).time=va(),t=t==null?null:t+"");for(var i=this._groups,n=i.length,r=0;r<n;++r)for(var a=i[r],s=a.length,l,d=0;d<s;++d)(l=a[d])&&Fo(l,t,o,d,a,e||e7(l,o));return new Ft(i,this._parents,t,o)}Xi.prototype.interrupt=$3;Xi.prototype.transition=uv;var{abs:e$,max:t$,min:i$}=Math;function mv(t){return[+t[0],+t[1]]}function t7(t){return[mv(t[0]),mv(t[1])]}var o$={name:"x",handles:["w","e"].map(eu),input:function(t,o){return t==null?null:[[+t[0],o[0][1]],[+t[1],o[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},n$={name:"y",handles:["n","s"].map(eu),input:function(t,o){return t==null?null:[[o[0][0],+t[0]],[o[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},r$={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(eu),input:function(t){return t==null?null:t7(t)},output:function(t){return t}};function eu(t){return{type:t}}var tu=Math.PI,iu=2*tu,hn=1e-6,i7=iu-hn;function pv(t){this._+=t[0];for(let o=1,e=t.length;o<e;++o)this._+=arguments[o]+t[o]}function o7(t){let o=Math.floor(t);if(!(o>=0))throw new Error(`invalid digits: ${t}`);if(o>15)return pv;let e=10**o;return function(i){this._+=i[0];for(let n=1,r=i.length;n<r;++n)this._+=Math.round(arguments[n]*e)/e+i[n]}}var un=class{constructor(o){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=o==null?pv:o7(o)}moveTo(o,e){this._append`M${this._x0=this._x1=+o},${this._y0=this._y1=+e}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(o,e){this._append`L${this._x1=+o},${this._y1=+e}`}quadraticCurveTo(o,e,i,n){this._append`Q${+o},${+e},${this._x1=+i},${this._y1=+n}`}bezierCurveTo(o,e,i,n,r,a){this._append`C${+o},${+e},${+i},${+n},${this._x1=+r},${this._y1=+a}`}arcTo(o,e,i,n,r){if(o=+o,e=+e,i=+i,n=+n,r=+r,r<0)throw new Error(`negative radius: ${r}`);let a=this._x1,s=this._y1,l=i-o,d=n-e,c=a-o,u=s-e,m=c*c+u*u;if(this._x1===null)this._append`M${this._x1=o},${this._y1=e}`;else if(m>hn)if(!(Math.abs(u*l-d*c)>hn)||!r)this._append`L${this._x1=o},${this._y1=e}`;else{let g=i-a,b=n-s,y=l*l+d*d,q=g*g+b*b,D=Math.sqrt(y),j=Math.sqrt(m),k=r*Math.tan((tu-Math.acos((y+m-q)/(2*D*j)))/2),N=k/j,z=k/D;Math.abs(N-1)>hn&&this._append`L${o+N*c},${e+N*u}`,this._append`A${r},${r},0,0,${+(u*g>c*b)},${this._x1=o+z*l},${this._y1=e+z*d}`}}arc(o,e,i,n,r,a){if(o=+o,e=+e,i=+i,a=!!a,i<0)throw new Error(`negative radius: ${i}`);let s=i*Math.cos(n),l=i*Math.sin(n),d=o+s,c=e+l,u=1^a,m=a?n-r:r-n;this._x1===null?this._append`M${d},${c}`:(Math.abs(this._x1-d)>hn||Math.abs(this._y1-c)>hn)&&this._append`L${d},${c}`,i&&(m<0&&(m=m%iu+iu),m>i7?this._append`A${i},${i},0,1,${u},${o-s},${e-l}A${i},${i},0,1,${u},${this._x1=d},${this._y1=c}`:m>hn&&this._append`A${i},${i},0,${+(m>=tu)},${u},${this._x1=o+i*Math.cos(r)},${this._y1=e+i*Math.sin(r)}`)}rect(o,e,i,n){this._append`M${this._x0=this._x1=+o},${this._y0=this._y1=+e}h${i=+i}v${+n}h${-i}Z`}toString(){return this._}};function fv(){return new un}fv.prototype=un.prototype;function gv(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function mn(t,o){if(!isFinite(t)||t===0)return null;var e=(t=o?t.toExponential(o-1):t.toExponential()).indexOf("e"),i=t.slice(0,e);return[i.length>1?i[0]+i.slice(2):i,+t.slice(e+1)]}function $i(t){return t=mn(Math.abs(t)),t?t[1]:NaN}function bv(t,o){return function(e,i){for(var n=e.length,r=[],a=0,s=t[0],l=0;n>0&&s>0&&(l+s+1>i&&(s=Math.max(1,i-l)),r.push(e.substring(n-=s,n+s)),!((l+=s+1)>i));)s=t[a=(a+1)%t.length];return r.reverse().join(o)}}function vv(t){return function(o){return o.replace(/[0-9]/g,function(e){return t[+e]})}}var n7=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Lo(t){if(!(o=n7.exec(t)))throw new Error("invalid format: "+t);var o;return new yc({fill:o[1],align:o[2],sign:o[3],symbol:o[4],zero:o[5],width:o[6],comma:o[7],precision:o[8]&&o[8].slice(1),trim:o[9],type:o[10]})}Lo.prototype=yc.prototype;function yc(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}yc.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function xv(t){e:for(var o=t.length,e=1,i=-1,n;e<o;++e)switch(t[e]){case".":i=n=e;break;case"0":i===0&&(i=e),n=e;break;default:if(!+t[e])break e;i>0&&(i=0);break}return i>0?t.slice(0,i)+t.slice(n+1):t}var ya;function wv(t,o){var e=mn(t,o);if(!e)return ya=void 0,t.toPrecision(o);var i=e[0],n=e[1],r=n-(ya=Math.max(-8,Math.min(8,Math.floor(n/3)))*3)+1,a=i.length;return r===a?i:r>a?i+new Array(r-a+1).join("0"):r>0?i.slice(0,r)+"."+i.slice(r):"0."+new Array(1-r).join("0")+mn(t,Math.max(0,o+r-1))[0]}function ou(t,o){var e=mn(t,o);if(!e)return t+"";var i=e[0],n=e[1];return n<0?"0."+new Array(-n).join("0")+i:i.length>n+1?i.slice(0,n+1)+"."+i.slice(n+1):i+new Array(n-i.length+2).join("0")}var nu={"%":(t,o)=>(t*100).toFixed(o),b:t=>Math.round(t).toString(2),c:t=>t+"",d:gv,e:(t,o)=>t.toExponential(o),f:(t,o)=>t.toFixed(o),g:(t,o)=>t.toPrecision(o),o:t=>Math.round(t).toString(8),p:(t,o)=>ou(t*100,o),r:ou,s:wv,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function ru(t){return t}var yv=Array.prototype.map,Sv=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function Cv(t){var o=t.grouping===void 0||t.thousands===void 0?ru:bv(yv.call(t.grouping,Number),t.thousands+""),e=t.currency===void 0?"":t.currency[0]+"",i=t.currency===void 0?"":t.currency[1]+"",n=t.decimal===void 0?".":t.decimal+"",r=t.numerals===void 0?ru:vv(yv.call(t.numerals,String)),a=t.percent===void 0?"%":t.percent+"",s=t.minus===void 0?"\u2212":t.minus+"",l=t.nan===void 0?"NaN":t.nan+"";function d(u,m){u=Lo(u);var g=u.fill,b=u.align,y=u.sign,q=u.symbol,D=u.zero,j=u.width,k=u.comma,N=u.precision,z=u.trim,H=u.type;H==="n"?(k=!0,H="g"):nu[H]||(N===void 0&&(N=12),z=!0,H="g"),(D||g==="0"&&b==="=")&&(D=!0,g="0",b="=");var G=(m&&m.prefix!==void 0?m.prefix:"")+(q==="$"?e:q==="#"&&/[boxX]/.test(H)?"0"+H.toLowerCase():""),Y=(q==="$"?i:/[%p]/.test(H)?a:"")+(m&&m.suffix!==void 0?m.suffix:""),X=nu[H],he=/[defgprs%]/.test(H);N=N===void 0?6:/[gprs]/.test(H)?Math.max(1,Math.min(21,N)):Math.max(0,Math.min(20,N));function Ie($){var qe=G,be=Y,Pe,Oe,ve;if(H==="c")be=X($)+be,$="";else{$=+$;var ie=$<0||1/$<0;if($=isNaN($)?l:X(Math.abs($),N),z&&($=xv($)),ie&&+$==0&&y!=="+"&&(ie=!1),qe=(ie?y==="("?y:s:y==="-"||y==="("?"":y)+qe,be=(H==="s"&&!isNaN($)&&ya!==void 0?Sv[8+ya/3]:"")+be+(ie&&y==="("?")":""),he){for(Pe=-1,Oe=$.length;++Pe<Oe;)if(ve=$.charCodeAt(Pe),48>ve||ve>57){be=(ve===46?n+$.slice(Pe+1):$.slice(Pe))+be,$=$.slice(0,Pe);break}}}k&&!D&&($=o($,1/0));var Xe=qe.length+$.length+be.length,We=Xe<j?new Array(j-Xe+1).join(g):"";switch(k&&D&&($=o(We+$,We.length?j-be.length:1/0),We=""),b){case"<":$=qe+$+be+We;break;case"=":$=qe+We+$+be;break;case"^":$=We.slice(0,Xe=We.length>>1)+qe+$+be+We.slice(Xe);break;default:$=We+qe+$+be;break}return r($)}return Ie.toString=function(){return u+""},Ie}function c(u,m){var g=Math.max(-8,Math.min(8,Math.floor($i(m)/3)))*3,b=Math.pow(10,-g),y=d((u=Lo(u),u.type="f",u),{suffix:Sv[8+g/3]});return function(q){return y(b*q)}}return{format:d,formatPrefix:c}}var Sc,pn,Cc;au({thousands:",",grouping:[3],currency:["$",""]});function au(t){return Sc=Cv(t),pn=Sc.format,Cc=Sc.formatPrefix,Sc}function su(t){return Math.max(0,-$i(Math.abs(t)))}function lu(t,o){return Math.max(0,Math.max(-8,Math.min(8,Math.floor($i(o)/3)))*3-$i(Math.abs(t)))}function cu(t,o){return t=Math.abs(t),o=Math.abs(o)-t,Math.max(0,$i(o)-$i(t))+1}function Mv(t,o){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(o).domain(t);break}return this}function du(t){return function(){return t}}function hu(t){return+t}var _v=[0,1];function Tr(t){return t}function uu(t,o){return(o-=t=+t)?function(e){return(e-t)/o}:du(isNaN(o)?NaN:.5)}function r7(t,o){var e;return t>o&&(e=t,t=o,o=e),function(i){return Math.max(t,Math.min(o,i))}}function a7(t,o,e){var i=t[0],n=t[1],r=o[0],a=o[1];return n<i?(i=uu(n,i),r=e(a,r)):(i=uu(i,n),r=e(r,a)),function(s){return r(i(s))}}function s7(t,o,e){var i=Math.min(t.length,o.length)-1,n=new Array(i),r=new Array(i),a=-1;for(t[i]<t[0]&&(t=t.slice().reverse(),o=o.slice().reverse());++a<i;)n[a]=uu(t[a],t[a+1]),r[a]=e(o[a],o[a+1]);return function(s){var l=Rh(t,s,1,i)-1;return r[l](n[l](s))}}function Ev(t,o){return o.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function l7(){var t=_v,o=_v,e=cn,i,n,r,a=Tr,s,l,d;function c(){var m=Math.min(t.length,o.length);return a!==Tr&&(a=r7(t[0],t[m-1])),s=m>2?s7:a7,l=d=null,u}function u(m){return m==null||isNaN(m=+m)?r:(l||(l=s(t.map(i),o,e)))(i(a(m)))}return u.invert=function(m){return a(n((d||(d=s(o,t.map(i),yt)))(m)))},u.domain=function(m){return arguments.length?(t=Array.from(m,hu),c()):t.slice()},u.range=function(m){return arguments.length?(o=Array.from(m),c()):o.slice()},u.rangeRound=function(m){return o=Array.from(m),e=Kh,c()},u.clamp=function(m){return arguments.length?(a=m?!0:Tr,c()):a!==Tr},u.interpolate=function(m){return arguments.length?(e=m,c()):e},u.unknown=function(m){return arguments.length?(r=m,u):r},function(m,g){return i=m,n=g,c()}}function mu(){return l7()(Tr,Tr)}function pu(t,o,e,i){var n=Ah(t,o,e),r;switch(i=Lo(i??",f"),i.type){case"s":{var a=Math.max(Math.abs(t),Math.abs(o));return i.precision==null&&!isNaN(r=lu(n,a))&&(i.precision=r),Cc(i,a)}case"":case"e":case"g":case"p":case"r":{i.precision==null&&!isNaN(r=cu(n,Math.max(Math.abs(t),Math.abs(o))))&&(i.precision=r-(i.type==="e"));break}case"f":case"%":{i.precision==null&&!isNaN(r=su(n))&&(i.precision=r-(i.type==="%")*2);break}}return pn(i)}function c7(t){var o=t.domain;return t.ticks=function(e){var i=o();return Xl(i[0],i[i.length-1],e??10)},t.tickFormat=function(e,i){var n=o();return pu(n[0],n[n.length-1],e??10,i)},t.nice=function(e){e==null&&(e=10);var i=o(),n=0,r=i.length-1,a=i[n],s=i[r],l,d,c=10;for(s<a&&(d=a,a=s,s=d,d=n,n=r,r=d);c-- >0;){if(d=ia(a,s,e),d===l)return i[n]=a,i[r]=s,o(i);if(d>0)a=Math.floor(a/d)*d,s=Math.ceil(s/d)*d;else if(d<0)a=Math.ceil(a*d)/d,s=Math.floor(s*d)/d;else break;l=d}return t},t}function Rr(){var t=mu();return t.copy=function(){return Ev(t,Rr())},Mv.apply(t,arguments),c7(t)}function fn(t){return function(){return t}}function kv(t){let o=3;return t.digits=function(e){if(!arguments.length)return o;if(e==null)o=null;else{let i=Math.floor(e);if(!(i>=0))throw new RangeError(`invalid digits: ${e}`);o=i}return t},()=>new un(o)}var Cj=Array.prototype.slice;function qv(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function Tv(t){this._context=t}Tv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,o){switch(t=+t,o=+o,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,o):this._context.moveTo(t,o);break;case 1:this._point=2;default:this._context.lineTo(t,o);break}}};function Rv(t){return new Tv(t)}function Av(t){return t[0]}function Iv(t){return t[1]}function fu(t,o){var e=fn(!0),i=null,n=Rv,r=null,a=kv(s);t=typeof t=="function"?t:t===void 0?Av:fn(t),o=typeof o=="function"?o:o===void 0?Iv:fn(o);function s(l){var d,c=(l=qv(l)).length,u,m=!1,g;for(i==null&&(r=n(g=a())),d=0;d<=c;++d)!(d<c&&e(u=l[d],d,l))===m&&((m=!m)?r.lineStart():r.lineEnd()),m&&r.point(+t(u,d,l),+o(u,d,l));if(g)return r=null,g+""||null}return s.x=function(l){return arguments.length?(t=typeof l=="function"?l:fn(+l),s):t},s.y=function(l){return arguments.length?(o=typeof l=="function"?l:fn(+l),s):o},s.defined=function(l){return arguments.length?(e=typeof l=="function"?l:fn(!!l),s):e},s.curve=function(l){return arguments.length?(n=l,i!=null&&(r=n(i)),s):n},s.context=function(l){return arguments.length?(l==null?i=r=null:r=n(i=l),s):i},s}function Fv(t,o){this._context=t,this._t=o}Fv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,o){switch(t=+t,o=+o,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,o):this._context.moveTo(t,o);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,o),this._context.lineTo(t,o);else{var e=this._x*(1-this._t)+t*this._t;this._context.lineTo(e,this._y),this._context.lineTo(e,o)}break}}this._x=t,this._y=o}};function gu(t){return new Fv(t,0)}function Do(t,o,e){this.k=t,this.x=o,this.y=e}Do.prototype={constructor:Do,scale:function(t){return t===1?this:new Do(this.k*t,this.x,this.y)},translate:function(t,o){return t===0&o===0?this:new Do(this.k,this.x+this.k*t,this.y+this.k*o)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var bu=new Do(1,0,0);vu.prototype=Do.prototype;function vu(t){for(;!t.__zoom;)if(!(t=t.parentNode))return bu;return t.__zoom}var Lv=(()=>{class t{constructor(){this.elementRef=E(Gt),this.diagramWidth=550,this.diagramHeight=250,this.showAxisLabels=!0,this.ranksAreStale=!0,this.pendingRender=null,this.popoverAncestor=null,this.popoverToggleListener=e=>{e.newState==="open"&&this.pendingRender!==null&&this.render(this.pendingRender==="full")}}ngOnChanges(e){if(this.values.length===0)return;let i=!!(e.values||e.isAttributeDirectionInverted||e.colorMetric||e.diagramWidth||e.diagramHeight||e.showAxisLabels);if(i&&(this.ranksAreStale=!0),this.isHiddenInClosedPopover()){this.pendingRender=this.pendingRender==="full"||i?"full":"areas";return}this.render(i)}ngAfterViewInit(){this.popoverAncestor=this.elementRef.nativeElement.closest("[popover]"),this.popoverAncestor?.addEventListener("toggle",this.popoverToggleListener)}ngOnDestroy(){this.popoverAncestor?.removeEventListener("toggle",this.popoverToggleListener)}render(e){this.ranksAreStale&&(this.percentileRanks=this.isAttributeDirectionInverted?this.calculateReversedPercentileRanks(this.values):this.calculatePercentileRanks(this.values),this.updatePercentileToMetricValueMap(),this.ranksAreStale=!1),(e||!this.hasRenderedDiagram()||!this.updateAreas())&&this.renderDiagram(),this.pendingRender=null}isHiddenInClosedPopover(){let e=this.popoverAncestor??this.elementRef.nativeElement.closest("[popover]");if(!e)return!1;try{return!e.matches(":popover-open")}catch{return!1}}hasRenderedDiagram(){return!this.rangeDiagramContainer().select("svg").empty()}updateAreas(){let e=this.rangeDiagramContainer().select("g");if(e.empty()||e.select(".left-area").empty())return!1;let i=this.createXScale(),n=i(this.isAttributeDirectionInverted?this.calculateReversedPercentileFromMetricValue(this.currentRightValue):this.calculatePercentileFromMetricValue(this.currentLeftValue)),r=i(this.isAttributeDirectionInverted?this.calculateReversedPercentileFromMetricValue(this.currentLeftValue):this.calculatePercentileFromMetricValue(this.currentRightValue));return e.select(".left-area").attr("width",n).style("fill",this.isAttributeDirectionInverted?this.rightColor:this.leftColor),e.select(".middle-area").attr("x",n+this.framePadding).attr("width",r-n).style("fill",this.middleColor),e.select(".right-area").attr("x",r+this.framePadding).attr("width",this.frameWidth-2*this.framePadding-r).style("fill",this.isAttributeDirectionInverted?this.leftColor:this.rightColor),!0}updatePercentileToMetricValueMap(){this.percentileToMetricValueMap=new Map;let e=0;for(let i=0;i<=100;i++){for(;i>this.percentileRanks[e].x&&e<this.percentileRanks.length-1;)e++;this.percentileToMetricValueMap.set(i,this.percentileRanks[e].y)}}renderDiagram(){this.initializeDiagramDimesions(),this.clearDiagramContainer();let e=this.createSvg(),i=this.createGroup(e),n=this.createXScale(),r=this.createYScale();this.drawAxes(i,n,r),this.drawFrame(i),this.showAxisLabels&&this.drawLabels(i),this.drawAreas(i,n),this.drawLine(i),this.addCrossHair(i,n,r)}initializeDiagramDimesions(){this.svgWidth=this.diagramWidth,this.svgHeight=this.diagramHeight,this.frameMarginTop=10,this.frameMarginBottom=this.showAxisLabels?50:30,this.frameMarginLeft=this.showAxisLabels?50:40,this.frameMarginRight=10,this.framePadding=5,this.frameHeight=this.svgHeight-this.frameMarginTop-this.frameMarginBottom,this.frameWidth=this.svgWidth-this.frameMarginLeft-this.frameMarginRight,this.yLabelXOffset=80,this.xLabelYOffset=20}rangeDiagramContainer(){return zh(this.elementRef.nativeElement.querySelector("#cc-range-diagram-container"))}clearDiagramContainer(){this.rangeDiagramContainer().selectAll("*").remove()}createSvg(){return this.rangeDiagramContainer().append("svg").attr("width",this.svgWidth).attr("height",this.svgHeight)}createGroup(e){return e.append("g").attr("transform",`translate(${this.frameMarginLeft}, ${this.frameMarginTop})`).attr("display","flex").attr("justify-content","center")}drawFrame(e){e.append("path").attr("d",`M 0 0
3636
+ `}};var Cl=(()=>{class e{constructor(t){this.ccStateSnapshot=t}getValue(){return this.ccStateSnapshot.get()}isLabelsPerMapActive(){return $s(this.ccStateSnapshot.get())}static{this.\u0275fac=function(i){return new(i||e)(M(Pt))}}static{this.\u0275prov=O({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Ml=(()=>{class e{constructor(t,i){this.stateAccessStore=t,this.threeSceneService=i,this.labels=[],this.suppressedLabel=null}getLabels(){return this.labels}getSuppressedLabel(){return this.suppressedLabel}addLeafLabel(t,i){this.createLabel(t,i,!1)}addSelectionLabel(t){this.createLabel(t,0,!0)}createLabel(t,i,n){let{mapState:r}=this.stateAccessStore.getValue(),{scaling:a,showMetricLabelNodeName:s,showMetricLabelNameValue:l,labelMode:d,labelSize:c}=r,{heightMetric:u,colorMetric:m}=r,g=new Ze(a.x,a.y,a.z),b="";if(s||n&&!l)b=t.name;else if(!l)return;let y="";if(l){let G=d===Hi.Color?m:u;y=`${t.attributes[G]} ${G}`}let q=new Sl(b,y,c),D=q.cssObject;D.userData={node:t};let j=t.height+Math.abs(t.heightDelta??0),k=Math.max(j,i),N=(t.x0-Wd+t.width/2)*g.x,z=(t.y0-Wd+t.length/2)*g.z;D.position.set(N,(t.z0+k)*g.y,z);let H=new Ze(N,(t.z0+j)*g.y,z);this.threeSceneService.labels.add(D),this.labels.push({labelElement:q,node:t,buildingTop:H,appliedOffset:0,isSelectionLabel:n})}clearLabels(){this.threeSceneService.labels.clear(),this.labels=[],this.suppressedLabel=null}clearSelectionLabel(){let t=this.labels.findIndex(n=>n.isSelectionLabel);if(t===-1)return;let[i]=this.labels.splice(t,1);i===this.suppressedLabel&&(this.suppressedLabel=null),this.threeSceneService.labels.remove(i.labelElement.cssObject)}hasLabelForNode(t){return this.labels.some(i=>i.node===t)}suppressLabelForNode(t){this.restoreSuppressedLabel();let i=this.labels.find(n=>n.node===t);i&&(this.suppressedLabel=i,i.labelElement.setTransition("opacity 0.2s ease-out"),i.labelElement.setOpacity("0"))}restoreSuppressedLabel(){this.suppressedLabel&&(this.suppressedLabel.labelElement.setOpacity("1"),this.suppressedLabel=null)}static{this.\u0275fac=function(i){return new(i||e)(M(Cl),M(bt))}}static{this.\u0275prov=O({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var _l=(()=>{class e{constructor(t,i){this.threeRendererService=t,this.threeSceneService=i,this.connectorSegments=null,this.connectorPositions=null,this.connectorsDirty=!0,this.lastDrawnVertexCount=0,this.projectionVec=new Ze}drawConnectors(t,i){this.connectorSegments||this.initConnectors();let n=this.threeRendererService.camera;if(!n)return;let r=this.threeRendererService.labelRenderer?.domElement,a=r?r.clientHeight:window.innerHeight;if(a===0)return;let s=this.connectorPositions,l=0;for(let d of t){if(d.hidden||d.offset>100||d.label===i)continue;let c=d.label.buildingTop,u=d.label.labelElement.cssObject.position;if(u.y-c.y<.5)continue;if(l>=400)break;this.projectionVec.copy(u).project(n);let g=-20+d.offset;this.projectionVec.y-=g*2/a,this.projectionVec.unproject(n);let b=l*3;s[b]=c.x,s[b+1]=c.y,s[b+2]=c.z,l++;let y=l*3;s[y]=this.projectionVec.x,s[y+1]=this.projectionVec.y,s[y+2]=this.projectionVec.z,l++}this.connectorSegments.geometry.setDrawRange(0,l),this.connectorSegments.geometry.attributes.position.needsUpdate=!0,l!==this.lastDrawnVertexCount&&(this.connectorsDirty=!0),this.lastDrawnVertexCount=l}clearConnectors(){this.connectorSegments&&this.connectorSegments.geometry.setDrawRange(0,0),this.connectorsDirty=!0,this.lastDrawnVertexCount=0}isDirty(){return this.connectorsDirty}markClean(){this.connectorsDirty=!1}destroy(){this.connectorSegments&&(this.connectorSegments.geometry.dispose(),this.connectorSegments.material.dispose(),this.threeSceneService.scene.remove(this.connectorSegments),this.connectorSegments=null,this.connectorPositions=null)}initConnectors(){let t=400;this.connectorPositions=new Float32Array(t*3);let i=new Jt;i.setAttribute("position",new _o(this.connectorPositions,3)),i.setDrawRange(0,0);let n=new Rs({color:11842740,transparent:!0,opacity:.9,depthTest:!0});this.connectorSegments=new vf(i,n),this.connectorSegments.frustumCulled=!1,this.threeSceneService.scene.add(this.connectorSegments)}static{this.\u0275fac=function(i){return new(i||e)(M(Nt),M(bt))}}static{this.\u0275prov=O({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var X1=(()=>{class e{constructor(t,i,n,r,a){this.threeRendererService=t,this.tooltipService=i,this.labelCreationService=n,this.stateAccessStore=r,this.connectorDrawingService=a,this._suppressLayout=!1,this.threeRendererService.afterRender$.subscribe(()=>this.updateLabelLayout())}setSuppressLayout(t){this._suppressLayout=t}updateLabelLayout(){let t=this.labelCreationService.getLabels();if(this._suppressLayout||t.length===0){this.connectorDrawingService.clearConnectors(),this.clearBadges(t);return}this.clearBadges(t);let i=this.collectLabelInfos(t),n=this.tooltipService.getRect();this.resolveCollisions(i),this.resolveTooltipCollisions(i,n),this.applyCollisionOffsets(i);let r=this.labelCreationService.getSuppressedLabel();this.connectorDrawingService.drawConnectors(i,r),this.connectorDrawingService.isDirty()&&(this.connectorDrawingService.markClean(),this.threeRendererService.render())}destroy(){this.clearBadges(this.labelCreationService.getLabels()),this.labelCreationService.clearLabels(),this.connectorDrawingService.destroy()}clearBadges(t){for(let i of t)i.labelElement.clearBadge()}collectLabelInfos(t){let i=[];for(let n of t){let r=n.labelElement.getContentRect(),a={top:r.top-n.appliedOffset,bottom:r.bottom-n.appliedOffset,left:r.left,right:r.right,width:r.width,height:r.height,x:r.x,y:r.y-n.appliedOffset};i.push({label:n,rect:a,offset:0,hidden:!1})}return i}resolveCollisions(t){let{mapState:i}=this.stateAccessStore.getValue();if(!i.groupLabelCollisions)return;let n=this.labelCreationService.getSuppressedLabel(),r=t.filter(l=>l.label!==n);if(r.length===0)return;let a=this.buildCollisionGroups(r,this.stateAccessStore.isLabelsPerMapActive()),s=i.labelMode===Hi.Color?i.colorMetric:i.heightMetric;for(let l of a){if(l.length<=1)continue;let d=this.pickGroupWinner(l,s);for(let c of l)c!==d&&(c.hidden=!0);d.label.labelElement.setBadge(l.length-1)}}buildCollisionGroups(t,i){let n=t.length,r=Array.from({length:n},(c,u)=>u),a=i?t.map(c=>Ms(c.label.node.path)):void 0,s=c=>{for(;r[c]!==c;)r[c]=r[r[c]],c=r[c];return c},l=(c,u)=>{let m=s(c),g=s(u);m!==g&&(r[m]=g)};for(let c=0;c<n;c++)for(let u=c+1;u<n;u++)a!==void 0&&a[c]!==a[u]||this.rectsOverlap(t[c].rect,t[u].rect)&&l(c,u);let d=new Map;for(let c=0;c<n;c++){let u=s(c);d.has(u)||d.set(u,[]),d.get(u).push(t[c])}return[...d.values()]}rectsOverlap(t,i){return t.right>i.left&&t.left<i.right&&t.bottom>i.top&&t.top<i.bottom}pickGroupWinner(t,i){let n=t[0],r=n.label.node.attributes[i]??0;for(let a=1;a<t.length;a++){let s=t[a].label.node.attributes[i]??0;(s>r||s===r&&t[a].label.node.path<n.label.node.path)&&(r=s,n=t[a])}return n}resolveTooltipCollisions(t,i){if(!i)return;let n=12,r=i.left-n,a=i.right+n,s=i.top-n,l=i.bottom+n,d=this.labelCreationService.getSuppressedLabel();for(let c of t){if(c.hidden||c.label===d)continue;let u=c.rect.top+c.offset,m=c.rect.bottom+c.offset,g=c.rect.right>r&&c.rect.left<a,b=m>s&&u<l;if(g&&b){let y=l+4-u;y>0&&(c.offset+=y)}}}applyCollisionOffsets(t){let i=this.labelCreationService.getSuppressedLabel();for(let n of t){let r=n.label.labelElement,a=n.label===i;n.hidden||n.offset>100?(r.setOpacity("0"),r.setTransform(0),n.label.appliedOffset=0):(r.setOpacity(a?"0":"1"),r.setTransform(n.offset),n.label.appliedOffset=n.offset)}}static{this.\u0275fac=function(i){return new(i||e)(M(Nt),M(Jn),M(Ml),M(Cl),M(_l))}}static{this.\u0275prov=O({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var K1=(()=>{class e{constructor(t,i){this.store=t,this.ccStateSnapshot=i}setLabelMode(t){this.store.dispatch(po({value:t}))}setAmountOfTopLabels(t){this.store.dispatch(ki({value:t}))}setLabelSize(t){this.store.dispatch(fo({value:t}))}setLabelsPerMap(t){this.store.dispatch(go({value:t}))}setShowMetricLabelNodeName(t){this.store.dispatch(yo({value:t}))}setShowMetricLabelNameValue(t){this.store.dispatch(wo({value:t}))}setColorLabels(t){this.store.dispatch(Ai({value:t}))}setGroupLabelCollisions(t){this.store.dispatch(mo({value:t}))}resetSettings(t){let i=tg(t,this.ccStateSnapshot.get());i.mapState?.amountOfTopLabels!==void 0&&(i.mapState.amountOfTopLabels=10),this.store.dispatch(ei({value:i}))}static{this.\u0275fac=function(i){return new(i||e)(M(me),M(Pt))}}static{this.\u0275prov=O({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function My(e,o){if(e&1){let t=ue();_(0,"div",5)(1,"input",17),re("change",function(){oe(t);let n=L();return ne(n.setLabelsPerMap(!1))}),T(),_(2,"input",18),re("change",function(){oe(t);let n=L();return ne(n.setLabelsPerMap(!0))}),T()()}if(e&2){let t=L();h(),xe("checked",!t.labelsPerMap()),h(),xe("checked",t.labelsPerMap())}}function _y(e,o){if(e&1){let t=ue();_(0,"div",14)(1,"span",19),x(2,"By Color Metric"),T(),_(3,"label",12)(4,"input",20),re("change",function(n){oe(t);let r=L();return ne(r.setColorLabel(n,"positive"))}),T(),Se(5,"span",21),_(6,"span",22),x(7),T()(),_(8,"label",12)(9,"input",23),re("change",function(n){oe(t);let r=L();return ne(r.setColorLabel(n,"neutral"))}),T(),Se(10,"span",21),_(11,"span",22),x(12),T()(),_(13,"label",12)(14,"input",24),re("change",function(n){oe(t);let r=L();return ne(r.setColorLabel(n,"negative"))}),T(),Se(15,"span",21),_(16,"span",22),x(17),T()()()}if(e&2){let t=L();h(4),xe("checked",t.colorLabels().positive)("disabled",t.colorCategoryCounts().positive===0),h(),ze("background-color",t.mapColors().positive),h(2),we("(",t.colorCategoryCounts().positive,")"),h(2),xe("checked",t.colorLabels().neutral)("disabled",t.colorCategoryCounts().neutral===0),h(),ze("background-color",t.mapColors().neutral),h(2),we("(",t.colorCategoryCounts().neutral,")"),h(2),xe("checked",t.colorLabels().negative)("disabled",t.colorCategoryCounts().negative===0),h(),ze("background-color",t.mapColors().negative),h(2),we("(",t.colorCategoryCounts().negative,")")}}var fh=(()=>{class e{constructor(){this.mapStateReadWindow=E(Ee),this.fileStoreReadWindow=E(Fe),this.labelSettingsWriteStore=E(K1),this.colorCategoryCountsStore=E(er),this.LabelMode=Hi,this.MIN_LABEL_SIZE=.75,this.MAX_LABEL_SIZE=2.5,this.LABEL_SIZE_STEP=.25,this.resetSettingsKeys=["mapState.amountOfTopLabels","mapState.labelSize","mapState.showMetricLabelNodeName","mapState.showMetricLabelNameValue","mapState.colorLabels","mapState.labelMode","mapState.groupLabelCollisions","mapState.labelsPerMap"],this.amountOfTopLabels=F(this.mapStateReadWindow.amountOfTopLabels$,{requireSync:!0}),this.labelSize=F(this.mapStateReadWindow.labelSize$,{requireSync:!0}),this.showMetricLabelNodeName=F(this.mapStateReadWindow.showMetricLabelNodeName$,{requireSync:!0}),this.showMetricLabelNodeValue=F(this.mapStateReadWindow.showMetricLabelNameValue$,{requireSync:!0}),this.colorLabels=F(this.mapStateReadWindow.colorLabels$,{requireSync:!0}),this.mapColors=F(this.mapStateReadWindow.mapColors$,{requireSync:!0}),this.isDeltaState=F(this.fileStoreReadWindow.isDeltaState$,{requireSync:!0}),this.labelMode=F(this.mapStateReadWindow.labelMode$,{requireSync:!0}),this.colorCategoryCounts=F(this.colorCategoryCountsStore.colorCategoryCounts$,{requireSync:!0}),this.groupLabelCollisions=F(this.mapStateReadWindow.groupLabelCollisions$,{requireSync:!0}),this.labelsPerMap=F(this.mapStateReadWindow.labelsPerMap$,{requireSync:!0}),this.areMultipleMapsVisible=F(this.fileStoreReadWindow.areMultipleMapsVisible$,{requireSync:!0}),this.showColorLabels=te(()=>this.labelMode()===Hi.Color&&!this.isDeltaState()),this.topLabelsTitle=te(()=>{let t=`Display the labels of the ${this.amountOfTopLabels()} highest buildings`;return this.labelsPerMap()&&this.areMultipleMapsVisible()?`${t} per map`:t}),this.applyDebouncedTopLabels=Ui(t=>{this.labelSettingsWriteStore.setAmountOfTopLabels(t)},e.DEBOUNCE_TIME),this.applyDebouncedLabelSize=Ui(t=>{this.labelSettingsWriteStore.setLabelSize(t)},e.DEBOUNCE_TIME)}static{this.DEBOUNCE_TIME=400}handleTopLabelsInput(t){let i=og(t,0,50,{round:!0});if(!Number.isNaN(i)){if(i===this.amountOfTopLabels()){this.applyDebouncedTopLabels.cancel();return}this.applyDebouncedTopLabels(i)}}handleLabelSizeInput(t){let i=Number.parseFloat(t.target.value);if(Number.isNaN(i))return;let n=Math.min(2.5,Math.max(.75,i)),r=Math.round(n/.25)*.25,a=Math.round(r*100)/100;if(a===this.labelSize()){this.applyDebouncedLabelSize.cancel();return}this.applyDebouncedLabelSize(a)}setShowMetricLabelNodeName(t){this.labelSettingsWriteStore.setShowMetricLabelNodeName(t.target.checked)}setShowMetricLabelNameValue(t){this.labelSettingsWriteStore.setShowMetricLabelNameValue(t.target.checked)}setColorLabel(t,i){this.labelSettingsWriteStore.setColorLabels({[i]:t.target.checked})}setLabelMode(t){this.labelSettingsWriteStore.setLabelMode(t)}setGroupLabelCollisions(t){this.labelSettingsWriteStore.setGroupLabelCollisions(t.target.checked)}setLabelsPerMap(t){this.labelSettingsWriteStore.setLabelsPerMap(t)}resetSettings(){this.labelSettingsWriteStore.resetSettings(this.resetSettingsKeys)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=A({type:e,selectors:[["cc-label-settings-panel"]],hostAttrs:[1,"contents"],decls:33,vars:18,consts:[[3,"title"],[1,"text-sm"],[1,"flex","items-center","gap-2"],["type","range","aria-label","Top Labels","min","0","max","50",1,"range","range-primary","range-sm","flex-1",3,"input","value"],["type","number","aria-label","Top Labels","min","0","max","50",1,"input","input-sm","input-bordered","w-16","text-center",3,"input","value"],["aria-label","Top labels scope","title","Pick the top labels across all maps combined or separately for each map",1,"join","w-full"],["title","Scale floating label font size"],["type","range","aria-label","Label Size",1,"range","range-primary","range-sm","flex-1",3,"input","min","max","step","value"],["type","number","aria-label","Label Size",1,"input","input-sm","input-bordered","w-16","text-center",3,"input","min","max","step","value"],["aria-label","Label mode",1,"join","w-full"],["type","radio","name","labelMode","aria-label","Height",1,"join-item","btn","btn-sm","flex-1",3,"change","checked"],["type","radio","name","labelMode","aria-label","Color",1,"join-item","btn","btn-sm","flex-1",3,"change","checked"],[1,"flex","items-center","gap-2","cursor-pointer"],["type","checkbox",1,"checkbox","checkbox-sm","checkbox-primary",3,"change","checked"],[1,"flex","flex-col","gap-1"],["title","Reset label settings to their defaults",1,"btn","btn-outline","btn-error","gap-2",3,"click"],[1,"fa","fa-undo"],["type","radio","name","labelsPerMap","aria-label","All maps",1,"join-item","btn","btn-sm","flex-1",3,"change","checked"],["type","radio","name","labelsPerMap","aria-label","Per map",1,"join-item","btn","btn-sm","flex-1",3,"change","checked"],[1,"text-xs","opacity-60","mb-0.5"],["type","checkbox","aria-label","positive color label",1,"checkbox","checkbox-sm","checkbox-primary",3,"change","checked","disabled"],[1,"inline-block","w-4","h-4","rounded-sm"],[1,"text-xs","opacity-60"],["type","checkbox","aria-label","neutral color label",1,"checkbox","checkbox-sm","checkbox-primary",3,"change","checked","disabled"],["type","checkbox","aria-label","negative color label",1,"checkbox","checkbox-sm","checkbox-primary",3,"change","checked","disabled"]],template:function(i,n){i&1&&(_(0,"div",0)(1,"span",1),x(2,"Top Labels"),T(),_(3,"div",2)(4,"input",3),re("input",function(a){return n.handleTopLabelsInput(a)}),T(),_(5,"input",4),re("input",function(a){return n.handleTopLabelsInput(a)}),T()()(),K(6,My,3,2,"div",5),_(7,"div",6)(8,"span",1),x(9,"Label Size"),T(),_(10,"div",2)(11,"input",7),re("input",function(a){return n.handleLabelSizeInput(a)}),T(),_(12,"input",8),re("input",function(a){return n.handleLabelSizeInput(a)}),T()()(),_(13,"div",9)(14,"input",10),re("change",function(){return n.setLabelMode(n.LabelMode.Height)}),T(),_(15,"input",11),re("change",function(){return n.setLabelMode(n.LabelMode.Color)}),T()(),_(16,"label",12)(17,"input",13),re("change",function(a){return n.setShowMetricLabelNodeName(a)}),T(),_(18,"span"),x(19,"Show node names"),T()(),_(20,"label",12)(21,"input",13),re("change",function(a){return n.setShowMetricLabelNameValue(a)}),T(),_(22,"span"),x(23,"Show metric values"),T()(),_(24,"label",12)(25,"input",13),re("change",function(a){return n.setGroupLabelCollisions(a)}),T(),_(26,"span"),x(27,"Group overlapping labels"),T()(),K(28,_y,18,15,"div",14),_(29,"button",15),re("click",function(){return n.resetSettings()}),Se(30,"i",16),_(31,"span"),x(32,"Reset label settings"),T()()),i&2&&(xe("title",n.topLabelsTitle()),h(4),xe("value",n.amountOfTopLabels()),h(),xe("value",n.amountOfTopLabels()),h(),Q(n.areMultipleMapsVisible()?6:-1),h(5),xe("min",n.MIN_LABEL_SIZE)("max",n.MAX_LABEL_SIZE)("step",n.LABEL_SIZE_STEP)("value",n.labelSize()),h(),xe("min",n.MIN_LABEL_SIZE)("max",n.MAX_LABEL_SIZE)("step",n.LABEL_SIZE_STEP)("value",n.labelSize()),h(2),xe("checked",n.labelMode()===n.LabelMode.Height),h(),xe("checked",n.labelMode()===n.LabelMode.Color),h(2),xe("checked",n.showMetricLabelNodeName()),h(4),xe("checked",n.showMetricLabelNodeValue()),h(4),xe("checked",n.groupLabelCollisions()),h(3),Q(n.showColorLabels()?28:-1))},encapsulation:2})}}return e})();var El=(()=>{class e{constructor(t,i,n){this.labelCreationService=t,this.labelCollisionService=i,this.connectorDrawingService=n}addLeafLabel(t,i){this.labelCreationService.addLeafLabel(t,i)}addSelectionLabel(t){this.labelCreationService.addSelectionLabel(t)}clearLabels(){this.labelCreationService.clearLabels(),this.connectorDrawingService.clearConnectors()}clearSelectionLabel(){this.labelCreationService.clearSelectionLabel()}hasLabelForNode(t){return this.labelCreationService.hasLabelForNode(t)}suppressLabelForNode(t){this.labelCreationService.suppressLabelForNode(t)}restoreSuppressedLabel(){this.labelCreationService.restoreSuppressedLabel()}setSuppressLayout(t){this.labelCollisionService.setSuppressLayout(t)}destroy(){this.labelCollisionService.destroy(),this.connectorDrawingService.destroy()}static{this.\u0275fac=function(i){return new(i||e)(M(Ml),M(X1),M(_l))}}static{this.\u0275prov=O({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var J1=(()=>{class e{constructor(t,i,n,r){this.codeMapStore=t,this.sharedViewReadWindow=i,this.threeSceneService=n,this.threeMapVisibilityStore=r,this.map=new Map,this.VERTICES_PER_LINE=5,this.arrows=new Array,this.HIGHLIGHT_BUILDING_DELAY=1,this.debounceCalculation=Ui(a=>this.resetEdgesOfBuildings(a),this.HIGHLIGHT_BUILDING_DELAY),this.hoveredNodeSubscription=this.sharedViewReadWindow.hoveredNodePath$.pipe(Ie(()=>this.threeMapVisibilityStore.isMapShown()),Le(a=>{if(a!==null){let s=this.threeSceneService.getMapMesh()?.getMeshDescription().getBuildingByPath(a);this.onBuildingHovered(s)}else this.onBuildingUnhovered()})).subscribe(),this.resetEdgesOfBuildings=a=>{if(!this.codeMapStore.getMapState().isEdgeMetricVisible){this.scale();return}this.clearArrows(),this.showEdgesOfBuildings(this.isEdgeApplicableForBuilding(a)?a:void 0),this.scale()},this.onBuildingSelected=a=>{this.isEdgeApplicableForBuilding(a.building)&&(this.clearArrows(),this.showEdgesOfBuildings()),this.scale()},this.onBuildingDeselected=()=>{this.debounceCalculation.cancel(),this.clearArrows(),this.addEdgePreview()},this.threeSceneService.subscribe("onBuildingSelected",this.onBuildingSelected),this.threeSceneService.subscribe("onBuildingDeselected",this.onBuildingDeselected)}ngOnDestroy(){this.hoveredNodeSubscription.unsubscribe()}onBuildingHovered(t){this.debounceCalculation(t)}onBuildingUnhovered(){this.debounceCalculation.cancel();let{isEdgeMetricVisible:t}=this.codeMapStore.getMapState();t&&(this.clearArrows(),this.showEdgesOfBuildings()),this.scale()}clearArrows(){for(let t of this.arrows)t.traverse(i=>{i.geometry&&i.geometry.dispose(),i.material&&i.material.dispose()});this.arrows=[],this.threeSceneService.edgeArrows.children.length=0}addArrow(t,i,n){let r=this.codeMapStore.getMapState(),a=100*r.edgeHeight,s=this.createCurve(t,i,a),l=Bd.getNumber(r.mapColors[n?"outgoingEdge":"incomingEdge"]);this.highlightBuilding(n?i:t),this.setCurveColor(s,l)}addEdgePreview(){let t=this.codeMapStore.getEdgeVisibility();for(let i of t){let n=this.map.get(i.fromNodeName),r=this.map.get(i.toNodeName);if(n&&r&&i.visible!==ci.none&&i.visible){let a=100*this.codeMapStore.getMapState().edgeHeight,s=this.createCurve(n,r,a);this.previewMode(s,i.visible)}}}addEdgeMapBasedOnNodes(t){this.map=this.getNodesAsMap(t)}scale(){let{scaling:t}=this.codeMapStore.getMapState();for(let i of this.arrows)i.scale.x=t.x,i.scale.y=t.y,i.scale.z=t.z}isEdgeApplicableForBuilding(t){return this.codeMapStore.getMapState().isEdgeMetricVisible&&t&&!t.node.flat}showEdgesOfBuildings(t){let i=new Map,n=this.threeSceneService.getSelectedBuilding();if(n){let{node:r}=n;i.set(r.path,r)}if(t){let{node:r}=t;i.set(r.path,r)}i.size>0?this.buildPairingEdges(i):this.addEdgePreview()}buildPairingEdges(t){let{showIncomingEdges:i,showOutgoingEdges:n,edgeMetric:r}=this.codeMapStore.getMapState();if(!i&&!n)return;let a=this.codeMapStore.getEdges();for(let s of a){if(s.attributes[r]===void 0)continue;let l=this.map.get(s.fromNodeName);if(l===void 0)continue;let d=this.map.get(s.toNodeName);d!==void 0&&(n&&t.has(l.path)?(this.addArrow(l,d,!0),this.threeSceneService.applyHighlights()):i&&t.has(d.path)&&(this.addArrow(l,d,!1),this.threeSceneService.applyHighlights()))}}createCurve(t,i,n){let r=t.outgoingEdgePoint.clone(),a=i.incomingEdgePoint.clone(),s=Math.max(r.y+i.height,a.y+1)+n;return r.setY(s),a.setY(s),new xf(t.outgoingEdgePoint,r,a,i.incomingEdgePoint)}highlightBuilding(t){let i=this.threeSceneService.getMapMesh().getMeshDescription().getBuildingByPath(t.path);this.threeSceneService.addBuildingsToHighlightingList(i)}setCurveColor(t,i,n=50){let r=t.getPoints(n),a=this.buildLine(r,i);a.add(this.buildArrow(r)),this.threeSceneService.edgeArrows.add(a),this.arrows.push(a)}previewMode(t,i){if(i===ci.both||i===ci.from){let n=this.makeArrowFromBezier(t,!1);this.threeSceneService.edgeArrows.add(n),this.arrows.push(n)}if(i===ci.both||i===ci.to){let n=this.makeArrowFromBezier(t,!0);this.threeSceneService.edgeArrows.add(n),this.arrows.push(n)}}getNodesAsMap(t){let i=new Map;for(let n of t)i.set(n.path,n);return i}makeArrowFromBezier(t,i,n=50){let r=t.getPoints(n),{incomingEdge:a,outgoingEdge:s}=this.codeMapStore.getMapState().mapColors,l=i?a:s,d=i?r.slice(n+1-this.VERTICES_PER_LINE):r.slice(0,r.length-(n+1-this.VERTICES_PER_LINE));return this.buildEdge(d,Bd.getNumber(l))}buildEdge(t,i){let n=this.buildLine(t,i);return n.add(this.buildArrow(t)),n}buildLine(t,i=0){let n=new Jt;n.setFromPoints(t);let r=new Rs({color:i,linewidth:1});return new bf(n,r)}buildArrow(t,i=0,n=10,r=10){let a=t.at(-1).clone().sub(t.at(-2).clone()).normalize(),s=t.at(-1).clone();return a.y<0&&(s.y+=n+1),new Mf(a,s,n+1,i,n,r)}static{this.\u0275fac=function(i){return new(i||e)(M(gr),M(_t),M(bt),M(ir))}}static{this.\u0275prov=O({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Ro=()=>new Fs({color:16580095}),Jo=()=>new Fs({color:16580095}),Zr=()=>new Fs({color:16580095});var kl=class e{static buildCube(o){let t=1/o,i=(1-t)/2,n=new Eo(t,i,i),r=new Eo(i,t+i,i),a=new Eo(i,i,i),s=new Eo(t,t,i),l=new Eo(t,t+i,i);return e.newBuildCubeGroup(n,r,a,s,l)}static newBuildCubeGroup(o,t,i,n,r){let a=new Hn,{group:s,frontLeft:l,frontCenter:d,frontRight:c,middleLeft:u,middleCenter:m,middleRight:g,backLeft:b,backCenter:y,backRight:q}=e.buildCubeTopFace(o,i,n);a.add(s);let{group:D,frontLeftEdge:j,frontCenterFace:k,frontRightEdge:N,middleLeftFace:z,middleRightFace:H,backLeftEdge:G,backCenterFace:Y,backRightEdge:X}=e.buildCubeSides(t,r);return a.add(D),{group:a,top:{front:{left:l,center:d,right:c},middle:{left:u,center:m,right:g},back:{left:b,center:y,right:q}},sides:{front:{left:j,center:k,right:N},middle:{left:z,right:H},back:{left:G,center:Y,right:X}}}}static buildCubeTopFace(o,t,i){let n=new at(t,Zr()),r=new at(o,Ro()),a=new at(t,Zr()),s=new at(o,Ro()),l=new at(i,Jo()),d=new at(o,Jo()),c=new at(t,Zr()),u=new at(o,Ro()),m=new at(t,Zr()),g=i.parameters.height/2+t.parameters.height/2;n.position.x-=g,n.position.y-=g,r.position.y-=g,a.position.x+=g,a.position.y-=g,s.position.x-=g,s.rotation.z=Math.PI/2,d.position.x+=g,d.rotation.z=Math.PI/2,c.position.x-=g,c.position.y+=g,u.position.y+=g,m.position.x+=g,m.position.y+=g;let b=new Hn;return b.rotation.x=Math.PI/2,b.position.y+=g,b.add(n),b.add(r),b.add(a),b.add(s),b.add(l),b.add(d),b.add(c),b.add(u),b.add(m),{group:b,frontLeft:n,frontCenter:r,frontRight:a,middleLeft:s,middleCenter:l,middleRight:d,backLeft:c,backCenter:u,backRight:m}}static buildCubeSides(o,t){let i=new at(o,Ro()),n=new at(t,Jo()),r=new at(o,Ro()),a=new at(t,Jo()),s=new at(t,Jo()),l=new at(o,Ro()),d=new at(t,Jo()),c=new at(o,Ro()),u=t.parameters.width/2+o.parameters.width/2,m=o.parameters.width/2;i.position.x-=u,i.position.z+=u,n.position.z+=u,r.position.x+=u,r.position.z+=u,a.position.x-=u,a.rotation.y=Math.PI/2,s.position.x+=u,s.rotation.y=Math.PI/2,l.position.x-=u,l.position.z-=u,d.position.z-=u,c.position.x+=u,c.position.z-=u;let g=new Hn;return g.position.y-=m,g.add(i),g.add(n),g.add(r),g.add(a),g.add(s),g.add(l),g.add(d),g.add(c),{group:g,frontLeftEdge:i,frontCenterFace:n,frontRightEdge:r,middleLeftFace:a,middleRightFace:s,backLeftEdge:l,backCenterFace:d,backRightEdge:c}}};var e2=(()=>{class e{constructor(t,i){this.threeMapControlsService=t,this.cdr=i}ngOnInit(){this.maxZoom=this.threeMapControlsService.MAX_ZOOM,this.minZoom=this.threeMapControlsService.MIN_ZOOM,this.threeMapControlsService.zoomPercentage$.subscribe(t=>{this.zoomPercentage=t,this.cdr.detectChanges()})}onInput(t){let i=t.target,n=Number.parseFloat(i.value);this.threeMapControlsService.setZoomPercentage(n)}zoomIn(){this.threeMapControlsService.setZoomPercentage(Math.min(this.zoomPercentage+10,this.maxZoom))}zoomOut(){this.threeMapControlsService.setZoomPercentage(Math.max(this.zoomPercentage-10,this.minZoom))}static{this.\u0275fac=function(i){return new(i||e)(le(Et),le(Rn))}}static{this.\u0275cmp=A({type:e,selectors:[["cc-zoom-slider"]],decls:8,vars:4,consts:[[1,"absolute","right-[5px]","top-[10px]","m-2.5","flex","h-[150px]","flex-col","items-center","gap-2.5"],["data-testid","zoomIn",1,"m-0","cursor-pointer","border-none","bg-transparent","p-0","text-base","text-neutral-500",3,"click"],["type","range","id","zoomRange","data-testid","zoomRange","aria-label","Zoom level",1,"h-[100px]","w-[3px]","appearance-none","bg-neutral-500","text-neutral-500","opacity-70","outline-none","transition-opacity","duration-200","[-webkit-appearance:none]","[direction:rtl]","[writing-mode:vertical-lr]","[&::-moz-range-thumb]:h-[3px]","[&::-moz-range-thumb]:w-[10px]","[&::-moz-range-thumb]:cursor-pointer","[&::-moz-range-thumb]:bg-neutral-500","[&::-webkit-slider-thumb]:h-[3px]","[&::-webkit-slider-thumb]:w-[10px]","[&::-webkit-slider-thumb]:cursor-pointer","[&::-webkit-slider-thumb]:appearance-none","[&::-webkit-slider-thumb]:bg-neutral-500","[&::-webkit-slider-thumb]:[-webkit-appearance:none]",3,"input","min","max","value"],["data-testid","zoomOut",1,"m-0","cursor-pointer","border-none","bg-transparent","p-0","text-base","text-neutral-500",3,"click"],["id","zoomValue",1,"w-[30px]","text-center","text-[10px]","text-neutral-500"]],template:function(i,n){i&1&&(_(0,"div",0)(1,"button",1),re("click",function(){return n.zoomIn()}),x(2," + "),T(),_(3,"input",2),re("input",function(a){return n.onInput(a)}),T(),_(4,"button",3),re("click",function(){return n.zoomOut()}),x(5," - "),T(),_(6,"span",4),x(7),T()()),i&2&&(h(3),xe("min",n.minZoom)("max",n.maxZoom)("value",n.zoomPercentage),h(4),we("",n.zoomPercentage?.toFixed(0),"%"))},encapsulation:2})}}return e})();var Jr=(()=>{class e{constructor(t){this.threeMapControlsService=t,this.eventEmitter=new Qf,this.currentlyHovered=null,this.isDragging=!1}init(t,i,n){this.cubeGroup=t,this.camera=i,this.renderer=n,this.initOrbitalControl(i,n),this.initRendererEventListeners(n)}resetIsDragging(){this.isDragging=!1}initOrbitalControl(t,i){this.controls=new Xs(t,i.domElement),this.controls.maxPolarAngle=Math.PI/2,this.controls.enableZoom=!1,this.controls.enablePan=!1,this.controls.rotateSpeed=1}initRendererEventListeners(t){t.domElement.addEventListener("mousemove",i=>this.onDocumentMouseMove(i)),t.domElement.addEventListener("mouseup",i=>this.onDocumentMouseUp(i)),t.domElement.addEventListener("mousedown",i=>this.onDocumentMouseClick(i,"mousedown")),t.domElement.addEventListener("dblclick",i=>this.onDocumentMouseClick(i,"dblclick")),t.domElement.addEventListener("mouseleave",i=>this.onWindowMouseLeave(i)),t.domElement.addEventListener("mouseenter",()=>this.onDocumentMouseEnter())}onDocumentMouseClick(t,i){this.isDragging=!0,this.checkMouseIntersection(t,i)}onWindowMouseLeave(t){(t.relatedTarget==null||!(t.relatedTarget instanceof HTMLCanvasElement))&&this.enableRotation(!1)}onDocumentMouseEnter(){this.enableRotation(!0)}enableRotation(t){this.controls.enableRotate=t}checkMouseIntersection(t,i){this.getCubeIntersectedByMouse(t)||this.eventEmitter.emit("viewCubeEventPropagation",{type:i,event:t})}getCubeIntersectedByMouse(t){let i=this.transformIntoCanvasVector(t),n=new Ls;n.setFromCamera(i,this.camera);let r=[];for(let s of ao(this.cubeGroup))$t(s)&&r.push(s.data);let[a]=n.intersectObjects(r);return a?a.object:null}transformIntoCanvasVector(t){let{domElement:i}=this.renderer,n=this.renderer.getPixelRatio(),r=i.getBoundingClientRect(),a=(t.clientX-r.left)/i.width*n*2-1,s=-((t.clientY-r.top)/i.height*n)*2+1;return new Ke(a,s)}propagateMovement(){if(this.isDragging){let t=this.camera.position;this.threeMapControlsService.rotateCameraInVectorDirection(-t.x,-t.y,-t.z)}return this.isDragging}onDocumentMouseMove(t){if(this.propagateMovement())return;let i=this.getCubeIntersectedByMouse(t);i?this.currentlyHovered&&i.uuid!==this.currentlyHovered.uuid?this.triggerViewCubeUnhoverEvent():this.currentlyHovered||this.triggerViewCubeHoverEvent(i):(this.currentlyHovered&&this.triggerViewCubeUnhoverEvent(),this.eventEmitter.emit("viewCubeEventPropagation",{type:"mousemove",event:t}))}onDocumentMouseUp(t){this.isDragging=!1;let i=this.getCubeIntersectedByMouse(t);i?this.eventEmitter.emit("viewCubeClicked",{cube:i}):this.eventEmitter.emit("viewCubeEventPropagation",{type:"mouseup",event:t})}triggerViewCubeHoverEvent(t){this.currentlyHovered=t,Ni(Pi.Pointer),this.eventEmitter.emit("viewCubeHoveredEvent",{cube:t})}triggerViewCubeUnhoverEvent(){this.currentlyHovered=null,Ni(Pi.Default),this.eventEmitter.emit("viewCubeUnHoveredEvent")}subscribe(t,i){this.eventEmitter.on(t,n=>{i(n)})}static{this.\u0275fac=function(i){return new(i||e)(M(Et))}}static{this.\u0275prov=O({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var gh=(()=>{class e{constructor(t,i,n){this.elementReference=t,this.threeMapControlsService=i,this.viewCubeMouseEvents=n,this.WIDTH=200,this.HEIGHT=200,this.LENGTH_VIEWCUBE=1,this.hoverInfo={cube:null,originalMaterial:null},this.cubeDefinition={top:null,sides:null},this.onCameraChanged=r=>{let a=this.calculateCameraPosition(r.camera);this.setCameraPosition(a),this.renderer.render(this.scene,this.camera)},this.onCubeHovered=r=>{this.hoverInfo={cube:r.cube,originalMaterial:r.cube.material},this.hoverInfo.cube.material.emissive=new jn(16777215),this.renderer.render(this.scene,this.camera)},this.onCubeUnhovered=()=>{this.hoverInfo.cube.material.emissive=new jn(0),this.hoverInfo.cube=null,this.renderer.render(this.scene,this.camera)},this.onCubeClicked=r=>{switch(r.cube){case this.cubeDefinition.top.front.left:this.threeMapControlsService.rotateCameraInVectorDirection(1,-1,1);break;case this.cubeDefinition.top.front.center:this.threeMapControlsService.rotateCameraInVectorDirection(0,-1,1);break;case this.cubeDefinition.top.front.right:this.threeMapControlsService.rotateCameraInVectorDirection(-1,-1,1);break;case this.cubeDefinition.top.middle.left:this.threeMapControlsService.rotateCameraInVectorDirection(1,-1,0);break;case this.cubeDefinition.top.middle.center:this.threeMapControlsService.rotateCameraInVectorDirection(0,-1,0);break;case this.cubeDefinition.top.middle.right:this.threeMapControlsService.rotateCameraInVectorDirection(-1,-1,0);break;case this.cubeDefinition.top.back.left:this.threeMapControlsService.rotateCameraInVectorDirection(1,-1,-1);break;case this.cubeDefinition.top.back.center:this.threeMapControlsService.rotateCameraInVectorDirection(0,-1,-1);break;case this.cubeDefinition.top.back.right:this.threeMapControlsService.rotateCameraInVectorDirection(-1,-1,-1);break;case this.cubeDefinition.sides.front.left:this.threeMapControlsService.rotateCameraInVectorDirection(1,0,-1);break;case this.cubeDefinition.sides.front.center:this.threeMapControlsService.rotateCameraInVectorDirection(0,0,0);break;case this.cubeDefinition.sides.front.right:this.threeMapControlsService.rotateCameraInVectorDirection(-1,0,-1);break;case this.cubeDefinition.sides.middle.left:this.threeMapControlsService.rotateCameraInVectorDirection(1,0,0);break;case this.cubeDefinition.sides.middle.right:this.threeMapControlsService.rotateCameraInVectorDirection(-1,0,0);break;case this.cubeDefinition.sides.back.left:this.threeMapControlsService.rotateCameraInVectorDirection(1,0,1);break;case this.cubeDefinition.sides.back.center:this.threeMapControlsService.rotateCameraInVectorDirection(0,0,1);break;case this.cubeDefinition.sides.back.right:this.threeMapControlsService.rotateCameraInVectorDirection(-1,0,1);break}}}ngOnInit(){this.initScene(),this.initLights(),this.initRenderer(this.elementReference.nativeElement),this.initCube(),this.initAxesHelper(),this.initCamera(),this.viewCubeMouseEvents.init(this.cubeGroup,this.camera,this.renderer),this.threeMapControlsService.subscribe("onCameraChanged",this.onCameraChanged),this.viewCubeMouseEvents.subscribe("viewCubeHoveredEvent",this.onCubeHovered),this.viewCubeMouseEvents.subscribe("viewCubeUnHoveredEvent",this.onCubeUnhovered),this.viewCubeMouseEvents.subscribe("viewCubeClicked",this.onCubeClicked)}initAxesHelper(){let t=new _f(1.3),i=-(this.LENGTH_VIEWCUBE/2)+.01;t.position.x+=i,t.position.y+=i,t.position.z+=i,this.scene.add(t)}initCube(){let{group:t,top:i,sides:n}=kl.buildCube(1.9);this.cubeGroup=t,this.cubeDefinition.top=i,this.cubeDefinition.sides=n;let r=new Cf(this.cubeGroup,new jn(0));this.scene.add(this.cubeGroup),this.scene.add(r)}setCameraPosition(t){this.camera.position.set(t.x,t.y,t.z),this.camera.lookAt(0,0,0),this.camera.updateProjectionMatrix()}calculateCameraPosition(t){let i=this.threeMapControlsService.controls.target.clone();return t.position.clone().sub(i).normalize().multiplyScalar(3)}initScene(){this.scene=new Ts}initRenderer(t){this.renderer=new Ds({alpha:!0,antialias:!0}),this.renderer.setSize(this.WIDTH,this.HEIGHT),this.renderer.setPixelRatio(window.devicePixelRatio),t.appendChild(this.renderer.domElement)}initCamera(){this.camera=new qs(45,this.WIDTH/this.HEIGHT,.1,1e3),this.camera.position.z=4}initLights(){this.lights=new Hn;let t=new yf(7368816,2.8),i=new Nd(14737632,1.8);i.position.set(50,10,8).normalize();let n=new Nd(14737632,1.8);n.position.set(-50,10,-8).normalize(),this.lights.add(t),this.lights.add(i),this.lights.add(n),this.scene.add(this.lights)}static{this.\u0275fac=function(i){return new(i||e)(le(Gt),le(Et),le(Jr))}}static{this.\u0275cmp=A({type:e,selectors:[["cc-view-cube"]],hostAttrs:[1,"absolute","right-0","top-[10px]","z-[11]","[transition:right_0.3s_ease]","[&.sideBarVisible]:right-[var(--cc-inspector-width)]"],decls:1,vars:0,template:function(i,n){i&1&&W(0,"cc-zoom-slider")},dependencies:[e2],encapsulation:2})}}return e})();var ql=(function(e){return e[e.LeftClick=0]="LeftClick",e[e.RightClick=2]="RightClick",e})(ql||{}),br=(()=>{class e{constructor(t,i,n,r,a,s,l,d,c,u,m,g){this.threeCameraService=t,this.threeRendererService=i,this.threeSceneService=n,this.codeMapStore=r,this.fileStoreReadWindow=a,this.sharedViewReadWindow=s,this.threeMapVisibilityStore=l,this.labelSettingsFacade=d,this.tooltipService=c,this.viewCubeMouseEvents=u,this.threeViewerService=m,this.idToBuilding=g,this.THRESHOLD_FOR_MOUSE_MOVEMENT_TRACKING=3,this.mouse={x:0,y:0},this.oldMouse={x:0,y:0},this.mouseOnLastClick={x:0,y:0},this.isGrabbing=!1,this.isMoving=!1,this.raycaster=new Ls,this.subscriptions=[this.fileStoreReadWindow.visibleFileStates$.pipe(Le(()=>this.onFilesSelectionChanged())).subscribe(),this.sharedViewReadWindow.excludedNodes$.pipe(Le(b=>this.onExcludedNodesChanged(b))).subscribe(),this.sharedViewReadWindow.hoveredNodePath$.pipe(Le(b=>{b!==null?this.hoverNode(b):this.unhoverNode(!1)})).subscribe()],this.onViewCubeEventPropagation=b=>{switch(b.type){case"mousemove":this.onDocumentMouseMove(b.event);break;case"mouseup":this.onDocumentMouseUp(b.event);break;case"mousedown":this.onDocumentMouseDown(b.event);break;case"dblclick":this.onDocumentDoubleClick();break}},this.onDocumentMouseMove=b=>{this.mouse.x=b.clientX,this.mouse.y=b.clientY,this.updateHovering(),this.viewCubeMouseEvents.propagateMovement()}}ngOnDestroy(){for(let t of this.subscriptions)t.unsubscribe()}start(){this.registerEventListeners(),this.viewCubeMouseEvents.subscribe("viewCubeEventPropagation",this.onViewCubeEventPropagation)}registerEventListeners(){let t=this.threeRendererService.renderer.domElement;t.addEventListener("mousemove",this.onDocumentMouseMove),t.addEventListener("mouseup",i=>this.onDocumentMouseUp(i)),t.addEventListener("mousedown",i=>this.onDocumentMouseDown(i)),t.addEventListener("dblclick",()=>this.onDocumentDoubleClick()),t.addEventListener("mouseleave",i=>this.onDocumentMouseLeave(i)),t.addEventListener("mouseenter",()=>this.onDocumentMouseEnter()),t.addEventListener("wheel",Ui(()=>this.threeRendererService.render()))}hoverNode(t){if(this.isGrabbingOrMoving()||!this.threeMapVisibilityStore.isMapShown())return;let i=this.threeSceneService.getMapMesh();if(i){for(let n of i.getMeshDescription().buildings)if(n.node.path===t){this.hoverBuilding(n,!1);break}this.threeRendererService.render()}}unhoverNode(t=!0){this.threeMapVisibilityStore.isMapShown()&&(this.unhoverBuilding(t),this.threeRendererService.render())}onFilesSelectionChanged(){this.threeSceneService.clearSelection(),this.codeMapStore.clearKeptHighlight(),this.tooltipService.hide()}onExcludedNodesChanged(t){let i=this.sharedViewReadWindow.getSelectedNodePath();this.tooltipService.hide(),i!==null&&Ep(t).isExcludedLeaf(i)&&this.threeSceneService.clearSelection(),this.unhoverBuilding()}updateHovering(){if(this.hasMouseMoved(this.oldMouse)){if(this.isGrabbingOrMoving()){this.tooltipService.hide(),this.labelSettingsFacade.restoreSuppressedLabel(),this.threeRendererService.render();return}this.oldMouse.x=this.mouse.x,this.oldMouse.y=this.mouse.y;let t=this.threeSceneService.getMapMesh();if(t){this.threeCameraService.camera.updateMatrixWorld(!1);let i=this.transformHTMLToSceneCoordinates(),n=this.threeCameraService.camera;n.isPerspectiveCamera&&this.raycaster.setFromCamera(i,n),this.intersectedBuilding=t.checkMouseRayMeshIntersection(i,n),this.updateHighlight(this.threeSceneService.getHighlightedBuilding(),this.intersectedBuilding)}}}updateHighlight(t,i){t?.id!==i?.id?(this.tooltipService.hide(),this.labelSettingsFacade.restoreSuppressedLabel(),t&&i&&!this.isGrabbingOrMoving()?(this.threeSceneService.prepareHighlightTransition(),this.showTooltipForBuilding(i),this.hoverBuilding(i)):(this.unhoverBuilding(),i&&!this.isGrabbingOrMoving()&&(this.showTooltipForBuilding(i),this.hoverBuilding(i)))):!i&&this.sharedViewReadWindow.getHoveredNodePath()!==null?(this.tooltipService.hide(),this.labelSettingsFacade.restoreSuppressedLabel(),this.unhoverBuilding()):i&&this.tooltipService.isVisible()&&this.tooltipService.updatePosition(this.mouse.x,this.mouse.y)}drawLabelSelectedBuilding(t){this.tooltipService.hide(),this.labelSettingsFacade.restoreSuppressedLabel(),this.labelSettingsFacade.clearSelectionLabel(),!(!t?.node?.isLeaf||this.labelSettingsFacade.hasLabelForNode(t.node))&&this.labelSettingsFacade.addSelectionLabel(t.node)}showTooltipForBuilding(t){this.labelSettingsFacade.hasLabelForNode(t.node)&&this.labelSettingsFacade.suppressLabelForNode(t.node),this.tooltipService.show(t.node,this.mouse.x,this.mouse.y)}enableOrbitalsRotation(t){this.threeViewerService.enableRotation(t),this.viewCubeMouseEvents.enableRotation(t)}onDocumentMouseEnter(){this.enableOrbitalsRotation(!0)}onDocumentMouseLeave(t){this.labelSettingsFacade.setSuppressLayout(!1),this.tooltipService.hide(),this.labelSettingsFacade.restoreSuppressedLabel(),this.unhoverBuilding(),t.relatedTarget instanceof HTMLCanvasElement||this.enableOrbitalsRotation(!1)}onDocumentDoubleClick(){let t=this.threeSceneService.getHighlightedBuilding(),i=this.threeSceneService.getSelectedBuilding(),n=t?.node.link;if(n&&!this.hasMouseMoved(this.mouseOnLastClick)&&window.open(n,"_blank"),i?.node.isLeaf){let r=i.node.link;if(r){window.open(r,"_blank");return}}}onDocumentMouseDown(t){t.button===ql.RightClick&&(this.isMoving=!0,Ni(Pi.Moving)),t.button===ql.LeftClick&&(this.isGrabbing=!0,Ni(Pi.Grabbing)),this.labelSettingsFacade.setSuppressLayout(!0),this.tooltipService.hide(),this.mouseOnLastClick={x:t.clientX,y:t.clientY},document.activeElement.blur()}onDocumentMouseUp(t){this.labelSettingsFacade.setSuppressLayout(!1),this.viewCubeMouseEvents.resetIsDragging(),t.button===ql.LeftClick?this.onLeftClick():this.onRightClick(),this.intersectedBuilding!==void 0?Ni(Pi.Pointer):Ni(Pi.Default)}onRightClick(){this.isMoving=!1,this.intersectedBuilding&&!this.hasMouseMovedBeyondThreshold(this.mouseOnLastClick)&&this.codeMapStore.setRightClickedNodeData({nodeId:this.intersectedBuilding.node.path,xPositionOfRightClickEvent:this.mouse.x,yPositionOfRightClickEvent:this.mouse.y,origin:"codeMap"}),this.threeRendererService.render()}onLeftClick(){this.isGrabbing=!1,this.hasMouseMovedBeyondThreshold(this.mouseOnLastClick)||(this.intersectedBuilding?(this.threeSceneService.selectBuilding(this.intersectedBuilding),this.drawLabelSelectedBuilding(this.intersectedBuilding),this.showTooltipForBuilding(this.intersectedBuilding)):(this.threeSceneService.clearSelection(),this.labelSettingsFacade.clearSelectionLabel()),this.codeMapStore.clearKeptHighlight()),this.threeRendererService.render()}hasMouseMovedBeyondThreshold({x:t,y:i}){return Math.abs(this.mouse.x-t)>this.THRESHOLD_FOR_MOUSE_MOVEMENT_TRACKING||Math.abs(this.mouse.y-i)>this.THRESHOLD_FOR_MOUSE_MOVEMENT_TRACKING}hasMouseMoved({x:t,y:i}){return this.mouse.x!==t||this.mouse.y!==i}isGrabbingOrMoving(){return this.isGrabbing||this.isMoving}hoverBuilding(t,i=!0){Ni(Pi.Pointer);let r=this.codeMapStore.getIdToNode().get(t.node.id);for(let{data:a}of ao(r)){let s=this.idToBuilding.get(a.id);s&&this.threeSceneService.addBuildingsToHighlightingList(s)}this.threeSceneService.applyHighlights(),i&&this.codeMapStore.hoverNode(t.node.path)}transformHTMLToSceneCoordinates(){let{renderer:t,renderer:{domElement:i}}=this.threeRendererService,n=t.getPixelRatio(),r=i.getBoundingClientRect(),a=this.mouse.x/i.width*n*2-1,s=-((this.mouse.y-r.top)/i.height*n)*2+1;return{x:a,y:s}}unhoverBuilding(t=!0){this.isGrabbingOrMoving()||Ni(Pi.Default),this.threeSceneService.getConstantHighlight().size>0?this.threeSceneService.clearHoverHighlight():this.threeSceneService.clearHighlight(),t&&this.codeMapStore.hoverNode(null)}static{this.\u0275fac=function(i){return new(i||e)(M(or),M(Nt),M(bt),M(gr),M(Fe),M(_t),M(ir),M(El),M(Jn),M(Jr),M(ar),M(Us))}}static{this.\u0275prov=O({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var i2=(()=>{class e{constructor(t,i,n,r,a,s,l,d){this.codeMapStore=t,this.fileStoreReadWindow=i,this.threeSceneService=n,this.labelSettingsFacade=r,this.codeMapArrowService=a,this.threeStatsService=s,this.codeMapMouseEventService=l,this.colorCategoryCountsStore=d,this.nodesByColor={positive:[],neutral:[],negative:[]},this.subscription=this.fileStoreReadWindow.isLoadingFile$.pipe(Le(c=>c?this.onFileLoadingStarted():this.onFileLoadingFinished())).subscribe()}ngOnDestroy(){this.subscription.unsubscribe()}onFileLoadingStarted(){this.threeSceneService?.dispose()}onFileLoadingFinished(){this.threeStatsService?.resetPanels()}load(t,i=Zo){this.render(t,i),this.scaleMap(i)}render(t,i=Zo){i.geometry||this.visibleSortedNodes===void 0?this.rebuildBuildings(t):i.colors&&this.threeSceneService.recolorMapMesh(this.codeMapStore.getState()),i.colors&&this.getNodesMatchingColorSelector(this.unflattenedNodes),i.arrows&&this.setArrows(this.visibleSortedNodes)}rebuildBuildings(t){let i=this.getNodes(t),n=this.sortVisibleNodesByHeightDescending(i);this.visibleSortedNodes=n,this.unflattenedNodes=n.filter(({flat:a})=>!a);let r=this.codeMapStore.getState();if(this.threeSceneService.getMapMesh()?.canUpdateInPlace(n)){this.threeSceneService.updateMapMeshInPlace(i,n,r,Ei(r.files));return}this.setNewMapMesh(i,n)}setNewMapMesh(t,i){let n=this.codeMapStore.getState(),r=new Hf(i,n,Ei(n.files));this.threeSceneService.setMapMesh(t,r)}scaleMap(t=Zo){this.codeMapMouseEventService.unhoverNode(),this.codeMapArrowService.scale(),this.threeSceneService.scaleHeight(),t.labels&&(this.labelSettingsFacade.clearLabels(),this.setLabels(this.unflattenedNodes),this.codeMapMouseEventService.drawLabelSelectedBuilding(this.threeSceneService.getSelectedBuilding()))}getNodes(t){let i=this.codeMapStore.getState(),n=Gn(i),{mapState:{layoutAlgorithm:r},files:a}=i,s=Ei(a),l=Wf(i)??t;switch(r){case gt.StreetMap:case gt.TreeMapStreet:return zf.createStreetLayoutNodes(l,i,n,tf(i),s);case gt.SquarifiedTreeMap:return $f(l,i,n,s);default:return[]}}sortVisibleNodesByHeightDescending(t){return t.filter(i=>i.visible&&i.length>0&&i.width>0).sort((i,n)=>n.height-i.height)}getNodesMatchingColorSelector(t){let i=this.codeMapStore.getState(),n=i.mapState.colorRange;this.nodesByColor={positive:[],negative:[],neutral:[]};for(let r of t)if(r.isLeaf){let a=r.attributes[i.mapState.colorMetric];i.mapState.colorMetric==="unary"?this.nodesByColor.positive.push(r):a!==null&&(a<n.from?this.nodesByColor.positive.push(r):a<n.to?this.nodesByColor.neutral.push(r):this.nodesByColor.negative.push(r))}this.colorCategoryCountsStore.setColorCategoryCounts({positive:this.nodesByColor.positive.length,neutral:this.nodesByColor.neutral.length,negative:this.nodesByColor.negative.length}),this.uncheckEmptyColorLabels()}uncheckEmptyColorLabels(){let t=this.codeMapStore.getState().mapState.colorLabels,i={};for(let n of Ld)t[n]&&this.nodesByColor[n].length===0&&(i[n]=!1);Object.keys(i).length>0&&this.codeMapStore.setColorLabels(i)}setBuildingLabel(t,i){for(let n of t)this.labelSettingsFacade.addLeafLabel(n,i)}setLabels(t){if(this.labelSettingsFacade.clearLabels(),t===void 0||t.length===0)return;let i=this.codeMapStore.getState(),{showMetricLabelNodeName:n,showMetricLabelNameValue:r,colorLabels:a,amountOfTopLabels:s,labelMode:l}=i.mapState;if(n||r){let d=t[0].height,c=this.getTopNodeSelector(i,s);if(l===Hi.Color){let{colorMetric:u}=i.mapState,m=c(Ld.filter(g=>a[g]).flatMap(g=>this.nodesByColor[g]).filter(g=>Number.isFinite(g.attributes[u])),g=>g.attributes[u]);this.setBuildingLabel(m,d)}else{let u=c(t.filter(m=>m.isLeaf),m=>m.height??0);this.setBuildingLabel(u,d)}}}getTopNodeSelector(t,i){return $s(t)?(n,r)=>B1(n,a=>Ms(a.path),r,i):(n,r)=>dh(n,r,i)}setArrows(t){this.codeMapArrowService.clearArrows(),this.codeMapArrowService.addEdgeMapBasedOnNodes(t),this.codeMapArrowService.addEdgePreview();let i=this.threeSceneService.getSelectedBuilding();i&&this.codeMapArrowService.onBuildingSelected({building:i})}static{this.\u0275fac=function(i){return new(i||e)(M(gr),M(Fe),M(bt),M(El),M(J1),M(f0),M(br),M(er))}}static{this.\u0275prov=O({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Ay=1e3/60,Tl=(()=>{class e{constructor(t,i,n,r,a,s,l,d){this.store=t,this.actions$=i,this.threeRendererService=n,this.codeMapRenderService=r,this.threeViewerService=a,this.activeViewStore=s,this.viewReadinessStore=l,this.errorHandler=d,this.pendingInvalidation=null,this.lastRenderedMapNode=null,this.actionsRequiringRender$=this.actions$.pipe(ct(...L1),Le(c=>{let u=D1(c);this.pendingInvalidation=this.pendingInvalidation?N1([this.pendingInvalidation,u]):u})),this.mapDataChange$=ut([this.store.select(Dt),this.actionsRequiringRender$]).pipe(_e(([c])=>c)),this.isMetricsMapShown$=ut([this.activeViewStore.activeView$,this.threeViewerService.isMapCanvasMounted$]).pipe(_e(([c,u])=>c==="metrics"&&u)),this.dataChangedWhileMetricsMapIsShown$=this.mapDataChange$.pipe(yi(this.isMetricsMapShown$),Le(([,c])=>{c||this.viewReadinessStore.markStale("metrics")}),Ie(([,c])=>c),_e(([c])=>c)),this.switchedToStaleMetricsView$=this.activeViewStore.activeView$.pipe(Ie(c=>c==="metrics"&&this.viewReadinessStore.isStale("metrics")),Ut(()=>this.threeViewerService.isMapCanvasMounted$.pipe(Ie(Boolean),wt(1))),yi(this.store.select(Dt)),_e(([,c])=>c)),this.renderCodeMap$=De(()=>io(this.dataChangedWhileMetricsMapIsShown$,this.switchedToStaleMetricsView$).pipe(Ie(c=>!!c.unifiedMapNode),Wm(Ay,Fm,{leading:!1,trailing:!0}),yi(this.store.select(Kp)),Le(([c,u])=>this.renderMap(c,u)),_e(([c])=>c),_n()),{dispatch:!1})}renderMap(t,i){try{if(!i)return;this.codeMapRenderService.load(t.unifiedMapNode,this.consumeInvalidation(t.unifiedMapNode)),this.threeRendererService.render()}catch(n){this.errorHandler.handleError(n)}finally{nl()}}consumeInvalidation(t){let i=t===this.lastRenderedMapNode?this.pendingInvalidation:null;return this.pendingInvalidation=null,this.lastRenderedMapNode=t,i??Zo}static{this.\u0275fac=function(i){return new(i||e)(M(me),M(mt),M(Nt),M(i2),M(ar),M(tr),M(hr),M(Om))}}static{this.\u0275prov=O({token:e,factory:e.\u0275fac})}}return e})();var Fy=350,o2=(()=>{class e{constructor(t,i,n,r){this.store=t,this.actions$=i,this.renderCodeMapEffect=n,this.viewReadinessStore=r,this.hideLoadingFileOnCommit$=De(()=>this.actions$.pipe(ct(di),_e(()=>zp({value:!1})))),this.markViewsStaleOnDataChange$=De(()=>io(this.store.select(so).pipe(wi(1)),this.actions$.pipe(ct(di))).pipe(Le(()=>{this.viewReadinessStore.markAllStale()})),{dispatch:!1}),this.markMetricsReadyOnRender$=De(()=>this.renderCodeMapEffect.renderCodeMap$.pipe(Lt(Fy),Ie(()=>this.viewReadinessStore.isStale("metrics")),Le(()=>{this.viewReadinessStore.markReady("metrics")})),{dispatch:!1})}static{this.\u0275fac=function(i){return new(i||e)(M(me),M(mt),M(Tl),M(hr))}}static{this.\u0275prov=O({token:e,factory:e.\u0275fac})}}return e})();var n2=[Tl,F1,o2];var r2="ExtensionRuleAction",bh=(e,...o)=>({type:r2,action:{effect:e},extensions:o}),a2=(()=>{class e{constructor(t,i){this.actions$=t,this.store=i,this.extensionPatternToRules$=this.actions$.pipe(ct(r2),_e(n=>({effect:n.action.effect,rules:pg(n.extensions.join(","))})),_n()),this.ruleForExtensions$=De(()=>this.extensionPatternToRules$.pipe(Ie(({effect:n})=>n==="flatten"||n==="exclude"),Le(({effect:n,rules:r})=>{this.store.dispatch(n==="flatten"?On({items:r}):So({items:r}))})),{dispatch:!1})}static{this.\u0275fac=function(i){return new(i||e)(M(mt),M(me))}}static{this.\u0275prov=O({token:e,factory:e.\u0275fac})}}return e})();var s2=[a2];var l2=[];var c2=[fg];var d2=(()=>{class e{constructor(t){this.store=t,this.updateAmountOfEdgePreviews$=De(()=>ut([this.store.select(Os),this.store.select(cs)]).pipe(wi(1),Ie(([i,n])=>n>i),_e(([i])=>Ti({value:i}))))}static{this.\u0275fac=function(i){return new(i||e)(M(me))}}static{this.\u0275prov=O({token:e,factory:e.\u0275fac})}}return e})();var Ly=Xe(Up,t0,(e,o)=>({heightMetric:e,isLinked:o})),h2=(()=>{class e{constructor(t){this.store=t,this.linkHeightAndColorMetric$=De(()=>this.store.select(Ly).pipe(Ie(({isLinked:i})=>i),_e(({heightMetric:i})=>Mt({value:i}))))}static{this.\u0275fac=function(i){return new(i||e)(M(me))}}static{this.\u0275prov=O({token:e,factory:e.\u0275fac})}}return e})();var vr=e=>{let o=e.maxValue-e.minValue,t=Math.round(o/3),i=t+e.minValue,n=t*2+e.minValue;return{from:i,to:n}};var u2=(()=>{class e{constructor(t,i){this.actions$=t,this.store=i,this.resetColorRangeOnColorMetricChange$=De(()=>this.actions$.pipe(ct(Mt),Ut(()=>this.store.select(ko).pipe(wt(1))),_e(n=>Yt({value:vr(n)}))))}static{this.\u0275fac=function(i){return new(i||e)(M(mt),M(me))}}static{this.\u0275prov=O({token:e,factory:e.\u0275fac})}}return e})();var m2=(()=>{class e{constructor(t){this.store=t,this.resetIsEdgeMetricVisible$=De(()=>this.store.select(Fn).pipe(yi(this.store.select(Xp)),Ie(([,i])=>!i),_e(()=>Pn())))}static{this.\u0275fac=function(i){return new(i||e)(M(me))}}static{this.\u0275prov=O({token:e,factory:e.\u0275fac})}}return e})();var Sh=Am(b2(),1),mR=Sh.default.configure;var v2=Sh.default;var x2=(()=>{class e{constructor(t,i,n){this.store=t,this.mapStateReadWindow=i,this.metricsLensSourceReadWindow=n,this.updateMapColors$=De(()=>this.store.select(zr).pipe(_e(r=>{let a=this.metricsLensSourceReadWindow.getAttributeDescriptors(),s=this.mapStateReadWindow.getMapColors();if(a[r]?.direction===1){let l=JSON.parse(v2(s)),d=l.negative;return l.negative=l.positive,l.positive=d,hi({value:l})}return hi({value:s??Qt})})))}static{this.\u0275fac=function(i){return new(i||e)(M(me),M(Ee),M(Vs))}}static{this.\u0275prov=O({token:e,factory:e.\u0275fac})}}return e})();var w2=[u2,x2,h2,m2,d2];var Rl=0;function Al(e,o){let t=E(_i),i=E(al),n=()=>{t.navigateByUrl(Vi.metrics,{replaceUrl:!0})};return{isOnView:()=>Gf(t.url)===e,redirect:n,redirectForMissingData:()=>{n(),i.show(o)}}}var $y="This file has no dependency data \u2014 switched to the map view.",y2=(()=>{class e{constructor(){this.store=E(me),this.router=E(_i),this.metricsViewRedirect=Al("dependencies",$y),this.redirectAwayFromUnreachableDependencyView$=De(()=>ut([this.store.select(so),this.store.select(Tf),this.router.events.pipe(Ie(t=>t instanceof is),Vm(null))]).pipe(Lt(Rl),Ie(([t,i])=>t.length>0&&i&&this.metricsViewRedirect.isOnView()),Le(()=>this.metricsViewRedirect.redirectForMissingData())),{dispatch:!1})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=O({token:e,factory:e.\u0275fac})}}return e})();var xr=(()=>{class e{constructor(t){this.store=t}setStandard(t){this.store.dispatch(Ap({files:t}))}removeFiles(t){this.store.dispatch(Rp({fileNames:t}))}setDelta(t,i){this.store.dispatch(Dp({referenceFile:t,comparisonFile:i}))}setDeltaReference(t){this.store.dispatch(Lp({file:t}))}setDeltaComparison(t){this.store.dispatch(Fp({file:t}))}switchReferenceAndComparison(){this.store.dispatch(Ip())}setFiles(t){this.store.dispatch(Tp({value:t}))}static{this.\u0275fac=function(i){return new(i||e)(M(me))}}static{this.\u0275prov=O({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Il=(()=>{class e{constructor(t,i,n){this.fileStoreReadWindow=t,this.filesRepo=i,this.navBarWriteStore=n,this.lastSetFilesOfPreviousMode=[],this.subscription=this.fileStoreReadWindow.files$.pipe(Nm(),Ie(([r,a])=>Ei(r)!==Ei(a)||a.length===0),Le(([r,a])=>{this.lastSetFilesOfPreviousMode=a.length===0?a:r})).subscribe()}ngOnDestroy(){this.subscription.unsubscribe()}toggle(){let t=this.filesRepo.getFiles();if(!Ei(t)){this.lastSetFilesOfPreviousMode=this.filterNoneExisting(t,this.lastSetFilesOfPreviousMode);let n=this.lastSetFilesOfPreviousMode.find(a=>a.selectedAs===li.Reference)??t.find(a=>a.selectedAs===li.Partial);if(n===void 0)return;let r=this.lastSetFilesOfPreviousMode.find(a=>a.selectedAs===li.Comparison);this.navBarWriteStore.setDelta(n.file,r?.file);return}if(this.lastSetFilesOfPreviousMode.length>0){this.navBarWriteStore.setFiles(this.lastSetFilesOfPreviousMode);return}let i=t.find(n=>n.selectedAs===li.Reference)?.file;i!==void 0&&this.navBarWriteStore.setStandard([i])}filterNoneExisting(t,i){return i.filter(n=>t.find(r=>Np(r.file,n.file)))}static{this.\u0275fac=function(i){return new(i||e)(M(Fe),M(Bp),M(xr))}}static{this.\u0275prov=O({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Hy="This file has no domain-language data \u2014 switched to the map view.",Uy="Left compare mode \u2014 the domain view shows a single word cloud.",S2=(()=>{class e{constructor(){this.store=E(me),this.router=E(_i),this.toastService=E(al),this.fileSelectionModeService=E(Il),this.metricsViewRedirect=Al("domain",Hy),this.unreachableReason$=ut([this.store.select(vg),this.store.select(ls)]).pipe(_e(([t,i])=>({reason:this.toUnreachableReason(t,i),wasOnDomainRoute:this.metricsViewRedirect.isOnView()})),Lt(Rl),Ha({bufferSize:1,refCount:!0})),this.navigated$=this.router.events.pipe(Ie(t=>t instanceof is)),this.redirectAwayFromUnreachableDomainView$=De(()=>this.unreachableReason$.pipe(Ie(({reason:t,wasOnDomainRoute:i})=>t!==null&&i&&this.metricsViewRedirect.isOnView()),Le(({reason:t})=>this.redirectToMetricsView(t))),{dispatch:!1}),this.handleTheDomainViewBeingOpenedWhileUnreachable$=De(()=>this.navigated$.pipe(Ut(()=>this.unreachableReason$.pipe(wt(1))),Ie(({reason:t})=>t!==null&&this.metricsViewRedirect.isOnView()),Le(({reason:t})=>this.makeTheDomainViewReachable(t))),{dispatch:!1})}makeTheDomainViewReachable(t){if(t==="delta"){this.leaveCompareMode();return}this.redirectToMetricsView(t)}leaveCompareMode(){this.fileSelectionModeService.toggle(),this.toastService.show(Uy)}toUnreachableReason(t,i){return t?"missing-domain-data":i?"delta":null}redirectToMetricsView(t){if(t==="missing-domain-data"){this.metricsViewRedirect.redirectForMissingData();return}this.metricsViewRedirect.redirect()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=O({token:e,factory:e.\u0275fac})}}return e})();var C2=[S2,y2];var M2=(()=>{class e{constructor(t,i){this.guard=t,this.errorDialogService=i,this.showErrorDialogIfExcludedNodesResultInEmptyMap$=De(()=>this.guard.doExcludedNodesResultInEmptyMap$.pipe(Ie(n=>n.resultsInEmptyMap),Le(()=>{nl(),this.errorDialogService.open({title:"Exclude Error",message:"Excluding all buildings is not possible."})})),{dispatch:!1}),this.addExcludedNodes$=De(()=>this.guard.doExcludedNodesResultInEmptyMap$.pipe(Ie(n=>!n.resultsInEmptyMap),_e(n=>So({items:n.items}))))}static{this.\u0275fac=function(i){return new(i||e)(M(ag),M(ss))}}static{this.\u0275prov=O({token:e,factory:e.\u0275fac})}}return e})();var _2=[M2];var E2=e=>e.some(o=>o.name==="rloc")?"rloc":"unary";var Gy=["rloc","real_lines_of_code","loc","lines_of_code","lines","statements","functions"],k2=["complexity","mcc","cognitive_complexity","sonar_complexity","sonar_cognitive_complexity","max_nesting_level","indentation_level"];function q2(e){return e.some(o=>o.maxValue>0)}function T2(e,o){let t=[],i;for(let n of e)if(n.maxValue&&(t.push(n.name),i=n.name,--o===0))return t;if(!i)throw new Error("there are no metrics available");for(;o-- >0;)t.push(i);return t}function R2(e){let o=[],t={AreaMetric:Gy,HeightMetric:k2,ColorMetric:k2},i=new Set(e.map(n=>n.name));for(let n in t)for(let r of t[n])if(i.has(r)){o.push(r);break}return o}function A2(e,o,t,i,n,r=!1){let a=new Set(t.map(b=>b.name)),s=new Set(i.map(b=>b.name)),l=b=>!!b&&a.has(b),d=b=>!!b&&s.has(b),c=n?e:jr,u=r?{areaMetric:null,heightMetric:null,colorMetric:null,distributionMetric:null,edgeMetric:null}:o,m=Xy(c,u,t,l);if(m===null)return null;let g=u.edgeMetric;return d(c.edgeMetric)?g=c.edgeMetric:d(g)||(g=i[0]?.name),Te(ae({},m),{edgeMetric:g})}function Xy(e,o,t,i){let n=i(e.areaMetric)?e.areaMetric:o.areaMetric,r=i(e.heightMetric)?e.heightMetric:o.heightMetric,a=i(e.colorMetric)?e.colorMetric:o.colorMetric;if(i(n)&&i(r)&&i(a))return{areaMetric:n,heightMetric:r,colorMetric:a,distributionMetric:o.distributionMetric};if(!q2(t))return null;let[s,l,d]=Ky(t);return{areaMetric:i(e.areaMetric)?e.areaMetric:s,heightMetric:i(e.heightMetric)?e.heightMetric:l,colorMetric:i(e.colorMetric)?e.colorMetric:d,distributionMetric:E2(t)}}function Ky(e){let o=R2(e),[t,i,n]=o;return t&&i&&n?o:T2(e,3)}function I2(e){let o={};for(let t of e)for(let i of Object.keys(t))o[i]||(o[i]=t[i]);return o}function F2(e){let o={},t={};for(let i of e){for(let n of Object.keys(i.nodes))o[n]||(o[n]=i.nodes[n]);for(let n of Object.keys(i.edges))t[n]||(t[n]=i.edges[n])}return{nodes:o,edges:t}}var Fl=class{constructor(){this.wordsByTextPerPath=new Map}add(o,t,i){let n=this.wordsByTextOf(o);for(let r of t){let a=n.get(r.text);n.set(r.text,a?i(a,r):ae({},r))}}toDomainLensData(){let o={};for(let[t,i]of this.wordsByTextPerPath)o[t]=[...i.values()];return o}wordsByTextOf(o){let t=this.wordsByTextPerPath.get(o);return t||(t=new Map,this.wordsByTextPerPath.set(o,t)),t}};function L2(e,o){if(e.length===1)return e[0].settings.fileSettings.domainWords;let t=new Fl;for(let i of e)for(let[n,r]of Object.entries(i.settings.fileSettings.domainWords)){if(!o){t.add(n,r,jd);continue}t.add(df(i.fileMeta.fileName,n),r,jd),n===Or.rootPath&&t.add(Or.rootPath,r,gg)}return t.toDomainLensData()}function D2(e,o){if(e.length===1)return e[0].settings.fileSettings.markedPackages;let t=new Map;for(let i of e)if(i.settings.fileSettings.markedPackages)for(let n of i.settings.fileSettings.markedPackages){let r={path:o?Cs(i.fileMeta.fileName,n.path):n.path,color:n.color};t.set(`${r.path}|${r.color}`,r)}return[...t.values()]}function P2(e,o){let t=new Map;for(let r of e)for(let a of r.settings.fileSettings.blacklist??[]){let s=o&&e.length>1?Cs(r.fileMeta.fileName,a.path):a.path;t.set(`${s}|${a.type}`,{path:s,type:a.type})}let i=[],n=[];for(let{path:r,type:a}of t.values())(a==="flatten"?n:i).push({path:r});return{excludedNodes:i,flattenedNodes:n}}var N2=(()=>{class e{constructor(t,i,n,r,a,s,l){this.actions$=t,this.store=i,this.ccStateSnapshot=n,this.fileStoreReadWindow=r,this.mapStateReadWindow=a,this.queryParamsService=s,this.loadInitialFileStore=l,this.fileSetTriggers$=io(this.actions$.pipe(ct(di),_e(d=>({kind:"fileSet",provenance:d}))),this.store.select(so).pipe(wi(1),_e(()=>({kind:"fileSet",provenance:null})))).pipe(_n()),this.fileSetChanged$=this.fileSetTriggers$.pipe(Dm(this.fileSetTriggers$.pipe(Lt(0))),Ie(d=>d.length>0),_e(d=>({kind:"fileSet",provenance:d.find(c=>c.provenance)?.provenance??null}))),this.reconcileFileSet$=De(()=>this.fileSetChanged$.pipe(Le(d=>{this.reconcile(d)})),{dispatch:!1}),this.reconcileMetricData$=De(()=>ut([this.store.select(Gn),this.store.select(Ws)]).pipe(wi(1),Lt(0),Le(()=>{this.reconcile({kind:"metricData"})})),{dispatch:!1})}reconcile(t){t.kind==="fileSet"&&(this.mergeFileSettings(),this.updateFileRoot());let{nodeMetricData:i,edgeMetricData:n}=Xn(this.ccStateSnapshot.get());if(!i)return;let r=this.currentSelection(),a=A2(t.kind==="fileSet"?t.provenance?.urlMetrics??jr:jr,r,i,n,this.queryParamsService.hasFile(),t.kind==="fileSet"&&!!t.provenance?.forceDefaultMetrics);if(!a)return;this.applySelection(a,r);let s=a.colorMetric!==r.colorMetric;if(t.kind==="fileSet"||s){let l=Df(i,a.colorMetric);this.store.dispatch(Yt({value:vr(l)}))}t.kind==="fileSet"&&(this.store.dispatch(ui()),this.updateVisibleTopLabels(),this.applyRestoredSettings(t.provenance?.restoredSettings??null))}applyRestoredSettings(t){t&&(this.loadInitialFileStore.applyMetricsLensSource(t.metricsLensSource),this.loadInitialFileStore.applyDependencyLensSource(t.dependencyLensSource),this.loadInitialFileStore.applyDomainLensSource(t.domainLensSource),this.loadInitialFileStore.applySharedView(t.sharedView))}mergeFileSettings(){let t=this.fileStoreReadWindow.getFiles(),i=In(t),n=Pp(t),r=this.fileStoreReadWindow.getVisibleFileStates(),a=r.map(({file:d})=>d.settings.fileSettings.attributeTypes),s=r.map(({file:d})=>d.settings.fileSettings.attributeDescriptors),l=F2(a);this.store.dispatch(ei({value:{sharedView:Te(ae({},P2(i,n)),{markedPackages:D2(i,n)}),metricsLensSource:{attributeTypes:l.nodes,attributeDescriptors:I2(s)},dependencyLensSource:{attributeTypes:l.edges},domainLensSource:{words:L2(i,n)}}}))}updateFileRoot(){let t=this.fileStoreReadWindow.getReferenceFile();t&&Or.updateRoot(t.map.name)}currentSelection(){let{areaMetric:t,heightMetric:i,colorMetric:n,edgeMetric:r,distributionMetric:a}=this.mapStateReadWindow.getMapState();return{areaMetric:t,heightMetric:i,colorMetric:n,edgeMetric:r,distributionMetric:a}}applySelection(t,i){this.dispatchIfChanged(us,t.distributionMetric,i.distributionMetric),this.dispatchIfChanged(Ri,t.areaMetric,i.areaMetric),this.dispatchIfChanged(Fi,t.heightMetric,i.heightMetric),this.dispatchIfChanged(Mt,t.colorMetric,i.colorMetric),this.dispatchIfChanged(Zt,t.edgeMetric,i.edgeMetric)}dispatchIfChanged(t,i,n){i!==n&&this.store.dispatch(t({value:i}))}updateVisibleTopLabels(){let t=Kn(this.ccStateSnapshot.get()),i=this.mapStateReadWindow.getAmountOfTopLabels();this.store.dispatch(ki({value:Math.min(i,eg(t))}))}static{this.\u0275fac=function(i){return new(i||e)(M(mt),M(me),M(Pt),M(Fe),M(Ee),M(ll),M(lg))}}static{this.\u0275prov=O({token:e,factory:e.\u0275fac})}}return e})();var Yy=2e3;function V2(e){if(T0()||typeof requestIdleCallback!="function"){e();return}requestIdleCallback(()=>e(),{timeout:Yy})}var Zy=[Ai,yo,wo,hi,lo,co,Wn,vo,xo,Jp,Pn,Nn,Dn,Ln,fs,bo,ho,Ti,ki,fo,Vn,uo,po,mo,go,Ii,Zt,Yt,Bn,Fi,us,Mt,Ri],Jy=[ks,ys,ui,Ss,ui,vs,ws,So,On,xs,zn,$n,Co,Mo],eS=[If,Af],tS=[Ef],iS=[B0,W0,O0,H0,G0,z0,$0,V0,X0,Y0,N0,U0,K0,Q0,j0],B2=[[...eS],[...tS],[...iS],[...Zy],[...Jy],[...g0],[...as],ei].flat();var W2=500,oS=[...as,ei],O2=(()=>{class e{constructor(t,i){this.actions$=t,this.ccStateSnapshot=i,this.isHoldingTheSpinner=!1,this.saveCcState$=De(()=>this.actions$.pipe(Ie(n=>n.type!==cf.type),ct(...B2),Lt(W2),Le(()=>this.saveWhenIdle(()=>cg(this.ccStateSnapshot.get())))),{dispatch:!1}),this.saveCcFiles$=De(()=>this.actions$.pipe(ct(...oS),Le(()=>this.holdTheSpinnerIfTheFilesAreToBeWritten()),Lt(W2),Le(()=>this.saveWhenIdle(()=>hg(this.ccStateSnapshot.get().files).finally(()=>this.releaseTheSpinner())))),{dispatch:!1})}holdTheSpinnerIfTheFilesAreToBeWritten(){!this.isHoldingTheSpinner&&dg(this.ccStateSnapshot.get().files)&&(this.isHoldingTheSpinner=!0,k0())}releaseTheSpinner(){this.isHoldingTheSpinner&&(this.isHoldingTheSpinner=!1,q0())}saveWhenIdle(t){V2(()=>{t().catch(i=>console.error("Failed to persist the session:",i))})}static{this.\u0275fac=function(i){return new(i||e)(M(mt),M(Pt))}}static{this.\u0275prov=O({token:e,factory:e.\u0275fac})}}return e})();var z2=[Zt,Fi,Mt,Ri,qp];var $2=(()=>{class e{constructor(t,i,n,r,a){this.actions$=t,this.mapStateReadWindow=i,this.fileStoreReadWindow=n,this.queryParamsService=r,this.store=a,this.saveMetricsInQueryParameters$=De(()=>this.actions$.pipe(ct(...z2),yi(this.store.select(Ws)),_e(([,s])=>s&&s.length>0),Lt(100),Le(s=>{this.updateMetricQueryParameters(s)})),{dispatch:!1})}updateMetricQueryParameters(t){let{edgeMetric:i,heightMetric:n,colorMetric:r,areaMetric:a}=this.mapStateReadWindow.getMapState();this.queryParamsService.write({areaMetric:a,heightMetric:n,colorMetric:r,edgeMetric:i,isEdgeMetricDefined:t,currentFilesAreSampleFiles:this.fileStoreReadWindow.getCurrentFilesAreSampleFiles()})}static{this.\u0275fac=function(i){return new(i||e)(M(mt),M(Ee),M(Fe),M(ll),M(me))}}static{this.\u0275prov=O({token:e,factory:e.\u0275fac})}}return e})();var j2=[N2,O2,$2];var Ll=class{constructor(){this.detachedHandles=new Map}routeKey(o){return o.routeConfig?.path??null}shouldDetach(o){return this.routeKey(o)!==null}store(o,t){let i=this.routeKey(o);i!==null&&(t?this.detachedHandles.set(i,t):this.detachedHandles.delete(i))}shouldAttach(o){let t=this.routeKey(o);return t!==null&&this.detachedHandles.has(t)}retrieve(o){let t=this.routeKey(o);return t===null?null:this.detachedHandles.get(t)??null}shouldReuseRoute(o,t){return o.routeConfig===t.routeConfig}};var H2=(()=>{class e extends ap{constructor(){super(E(Fd),E(rp,{optional:!0})??void 0),this.platformLocation=E(Fd)}prepareExternalUrl(t){let i=new URL(this.platformLocation.href);return i.hash=super.prepareExternalUrl(t),i.toString()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=O({token:e,factory:e.\u0275fac})}}return e})();var Dl=e=>{let o=Uf(e.routeConfig?.path??"");return E(R0).announceSwitchTo(o)?nS():!0};function nS(){return new Promise(e=>requestAnimationFrame(()=>requestAnimationFrame(()=>e(!0))))}var U2={metricsLensSource:Ff,dependencyLensSource:kf,domainLensSource:P0,domainState:Z0,preferences:p0,mapState:ef,sharedView:mf,files:Op,isLoadingFile:$p,currentFilesAreSampleFiles:Wp},G2=e=>(o,t)=>{let i=D0(t)?J0(ae({},o),t.value):o;return e(i,t)};var X2=(()=>{class e{constructor(){this.store=E(me),this.domainSelectionStore=E(dl),this.letGoOfSelectionOutsideFocus$=De(()=>this.store.select(Li).pipe(Le(t=>{let i=this.domainSelectionStore.selectedNodePath();t&&i&&!xg(i,t)&&this.domainSelectionStore.clear()})),{dispatch:!1})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=O({token:e,factory:e.\u0275fac})}}return e})();var K2=(()=>{class e{constructor(){this.actions$=E(mt),this.domainSelectionStore=E(dl),this.resetDomainSelectionAfterLoad$=De(()=>this.actions$.pipe(ct(di),Le(()=>this.domainSelectionStore.clear())),{dispatch:!1})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=O({token:e,factory:e.\u0275fac})}}return e})();var Q2=[K2,X2];var Y2=(()=>{class e{constructor(){this.threeSceneService=E(bt),this.threeRendererService=E(Nt),this.codeMapMouseEventService=E(br),this.sharedViewReadWindow=E(_t),this.threeMapVisibilityStore=E(ir)}start(){this.subscription?.unsubscribe(),this.subscription=this.whileTheMapIsShown(this.sharedViewReadWindow.selectedNodePath$).subscribe(t=>this.showOnTheMap(t)),this.subscription.add(this.whileTheMapIsShown(this.sharedViewReadWindow.keptHighlightPaths$).subscribe(t=>this.threeSceneService.showKeptHighlight(t)))}ngOnDestroy(){this.subscription?.unsubscribe()}whileTheMapIsShown(t){return ut([t,this.threeMapVisibilityStore.isMapShown$]).pipe(Ie(([,i])=>i),_e(([i])=>i))}showOnTheMap(t){let i=this.threeSceneService.getSelectedBuilding();this.threeSceneService.showSelection(t);let n=this.threeSceneService.getSelectedBuilding();n!==i&&(this.codeMapMouseEventService.drawLabelSelectedBuilding(n),this.threeRendererService.render())}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=O({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function aS(e,o){e&1&&(f(0,"div",1)(1,"div",2)(2,"span"),x(3," The graphics card stopped rendering the map, usually because it ran out of memory. Reload the page, and try a smaller map or a smaller browser window. "),p()()())}var Ch=(()=>{class e{constructor(t,i,n,r,a,s){this.inspectorVisibilityService=t,this.fileStoreReadWindow=i,this.threeViewerService=n,this.codeMapMouseEventService=r,this.sceneSelectionSyncService=a,this.elementReference=s,this.isLoadingFile$=this.fileStoreReadWindow.isLoadingFile$,this.isContextLost$=this.threeViewerService.isContextLost$}ngAfterViewInit(){this.threeViewerService.init(this.elementReference.nativeElement.querySelector("#codeMap")),this.codeMapMouseEventService.start(),this.sceneSelectionSyncService.start()}ngOnDestroy(){this.threeViewerService.stopAnimate(),this.threeViewerService.destroy()}static{this.\u0275fac=function(i){return new(i||e)(le(yg),le(Fe),le(ar),le(br),le(Y2),le(Gt))}}static{this.\u0275cmp=A({type:e,selectors:[["cc-code-map"]],decls:5,vars:9,consts:[["id","codeMap",1,"fixed","left-0","top-[var(--cc-bars-height,49px)]","z-0","h-full","w-full"],[1,"pointer-events-none","fixed","inset-0","z-[1000]","flex","items-center","justify-center","p-4"],["role","alert",1,"alert","alert-error","pointer-events-auto","max-w-md"]],template:function(i,n){i&1&&(f(0,"div",0),Kt(1,"async"),W(2,"cc-view-cube"),p(),K(3,aS,4,0,"div",1),Kt(4,"async")),i&2&&(Be("hidden",Mi(1,5,n.isLoadingFile$)),h(2),Be("sideBarVisible",n.inspectorVisibilityService.isVisible()),h(),Q(Mi(4,7,n.isContextLost$)?3:-1))},dependencies:[gh,ts],encapsulation:2})}}return e})();var Pl=Xe(Dt,qi,(e,o)=>nr.getMetricDistribution(e.unifiedMapNode,o));var Nl=Xe(Yn,Zn,qi,Pl,(e,o,t,i)=>{let n=e||o;return!n||n.type===An.FILE?i:nr.getMetricDistribution(n,t)});var Vl=(()=>{class e{constructor(t){this.store=t,this.hoveredNodeMetricDistribution$=this.store.select(Nl),this.metricDistribution$=this.store.select(Pl)}static{this.\u0275fac=function(i){return new(i||e)(M(me))}}static{this.\u0275prov=O({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Z2=(()=>{class e{constructor(t){this.mapStateReadWindow=t,this.areaMetric$=this.mapStateReadWindow.areaMetric$,this.distributionMetric=jp}static{this.\u0275fac=function(i){return new(i||e)(le(Ee))}}static{this.\u0275cmp=A({type:e,selectors:[["cc-distribution-metric"]],hostAttrs:[1,"mx-[5px]","flex","min-w-max","items-center","gap-1.5","text-xs"],decls:3,vars:3,consts:[[1,"fa","fa-pie-chart"]],template:function(i,n){i&1&&(Se(0,"i",0),x(1),Kt(2,"async")),i&2&&(h(),we(" ",Mi(2,1,n.areaMetric$),`
3637
+ `))},dependencies:[ts],encapsulation:2})}}return e})();var J2=(()=>{class e{constructor(t){this.store=t,this.hoveredNodeMetricDistribution$=this.store.select(Nl),this.hoveredNode$=this.store.select(Yn),this.selectedNode$=this.store.select(Zn),this.flattenedItems$=this.store.select(of)}dispatchRuleChange(t,i){rl(this.store,t,i)}static{this.\u0275fac=function(i){return new(i||e)(M(me))}}static{this.\u0275prov=O({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function cS(e){return`*.${e}`}function dS(e,o){return e===$r?o.others.filter(t=>t.fileExtension!==Qs).map(t=>t.fileExtension):[e]}function Bl(e,o,t){return dS(e,o).map(n=>{let r=cS(n);return t?.type===An.FOLDER?`${t.path}/**/${r}`:r})}var eb=(()=>{class e{constructor(t){this.extensionRulesStore=t,this.operationContext$=ut([this.extensionRulesStore.hoveredNodeMetricDistribution$,this.extensionRulesStore.hoveredNode$,this.extensionRulesStore.selectedNode$,this.extensionRulesStore.flattenedItems$]).pipe(_e(([i,n,r,a])=>({distribution:i,node:n||r,flattenedItems:a})))}show(t){this.operationContext$.pipe(wt(1)).subscribe(i=>{let n=Bl(t,i.distribution,i.node),r=this.createFlattenedItemsMap(i.flattenedItems),a=n.map(s=>r.get(s));this.extensionRulesStore.dispatchRuleChange("flatten",zn({items:a}))})}exclude(t){this.operationContext$.pipe(wt(1)).subscribe(i=>{let n=Bl(t,i.distribution,i.node);this.extensionRulesStore.dispatchRuleChange("exclude",bh("exclude",...n))})}flatten(t){this.operationContext$.pipe(wt(1)).subscribe(i=>{let n=Bl(t,i.distribution,i.node);this.extensionRulesStore.dispatchRuleChange("flatten",bh("flatten",...n))})}getIsFlattenedByFileExtension(t){return this.operationContext$.pipe(_e(i=>Bl(t,i.distribution,i.node).every(r=>i.flattenedItems.some(a=>a.path===r))))}createFlattenedItemsMap(t){let i=new Map;for(let n of t)i.set(n.path,n);return i}static{this.\u0275fac=function(i){return new(i||e)(M(J2))}}static{this.\u0275prov=O({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var tb=(()=>{class e{constructor(t,i,n){this.threeSceneService=t,this.metricDistributionStore=i,this.nodeInteraction=n,this.metricDistribution$=this.metricDistributionStore.metricDistribution$,this.fileExtensionsOfOthers=new Set,this.fileExtensionsOfNone=new Set,this.metricDistribution$.pipe(Pm(),Ie(r=>!!r)).subscribe(r=>{this.fileExtensionsOfOthers.clear();for(let a of r.others)this.fileExtensionsOfOthers.add(a.fileExtension);this.fileExtensionsOfNone.clear();for(let a of r.none)this.fileExtensionsOfNone.add(a.fileExtension)})}highlightExtension(t){switch(this.nodeInteraction.hoverFileExtensions(this.extensionsIn(t)),t){case $r:this.threeSceneService.highlightBuildingsByExtension(this.fileExtensionsOfOthers);break;case Qs:this.threeSceneService.highlightBuildingsWithoutExtensions();break;default:this.threeSceneService.highlightBuildingsByExtension(new Set([t]));break}}clearHighlightingOnFileExtensions(){this.nodeInteraction.hoverFileExtensions([]),this.threeSceneService.applyClearHighlights()}extensionsIn(t){return t===$r?[...this.fileExtensionsOfOthers]:[t]}static{this.\u0275fac=function(i){return new(i||e)(M(bt),M(Vl),M(qo))}}static{this.\u0275prov=O({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var mS=["menu"];function pS(e,o){if(e&1){let t=ue();_(0,"button",10),re("click",function(){oe(t);let n=L(2);return ne(n.show(n.fileExtension()))}),Se(1,"i",11),_(2,"span",9),x(3,"Show"),T()()}}function fS(e,o){if(e&1){let t=ue();_(0,"button",12),re("click",function(){oe(t);let n=L(2);return ne(n.flatten(n.fileExtension()))}),Se(1,"i",13),_(2,"span",9),x(3,"Flatten"),T()()}}function gS(e,o){if(e&1){let t=ue();_(0,"div",4,0),re("contextmenu",function(n){return n.preventDefault()}),K(2,pS,4,0,"button",5)(3,fS,4,0,"button",6),_(4,"button",7),re("click",function(){oe(t);let n=L();return ne(n.exclude(n.fileExtension()))}),Se(5,"i",8),_(6,"span",9),x(7,"Exclude"),T()()()}if(e&2){let t=o,i=L();ze("left",t.left,"px")("bottom",t.bottom,"px"),h(2),Q(i.isFlattened()?2:3)}}var bS=192,Mh=4,ib=(()=>{class e{constructor(t,i){this.extensionRulesService=t,this.highlightBuildingsByFileExtensionService=i,this.item=J.required(),this.showAbsoluteValues=J.required(),this.toggleShowAbsoluteValues=fe(),this.isFlattened=ke(!1),this.menuPosition=ke(null),this.menuRef=Ue("menu"),this.fileExtension=te(()=>this.item().fileExtension),this.hasFileExtension=te(()=>this.fileExtension()!=="None"),this.formattedTitle=te(()=>this.formatTitle(this.showAbsoluteValues(),this.item(),this.fileExtension()))}ngOnInit(){this.flattenSubscription=this.extensionRulesService.getIsFlattenedByFileExtension(this.fileExtension()).subscribe(t=>this.isFlattened.set(t))}ngOnDestroy(){this.flattenSubscription?.unsubscribe()}openContextMenu(t){if(t.preventDefault(),!this.hasFileExtension())return;let i=Math.max(Mh,Math.min(t.clientX,window.innerWidth-bS-Mh)),n=Math.max(Mh,window.innerHeight-t.clientY);this.menuPosition.set({left:i,bottom:n})}closeContextMenu(){this.menuPosition.set(null)}onDocumentPointerDown(t){if(!this.menuPosition())return;let i=this.menuRef()?.nativeElement;i&&t.target instanceof Node&&i.contains(t.target)||this.closeContextMenu()}closeContextMenuOnViewportChange(){this.menuPosition()&&this.closeContextMenu()}flatten(t){this.extensionRulesService.flatten(t),this.closeContextMenu()}exclude(t){this.extensionRulesService.exclude(t),this.closeContextMenu()}show(t){this.extensionRulesService.show(t),this.closeContextMenu()}onHoverFileExtensionBar(t){this.highlightBuildingsByFileExtensionService.highlightExtension(t)}onUnhoverFileExtensionBar(){this.highlightBuildingsByFileExtensionService.clearHighlightingOnFileExtensions()}formatTitle(t,i,n){return t&&i.absoluteMetricValue||!t&&i.relativeMetricValue?t?`${n} ${i.absoluteMetricValue.toLocaleString()}`:`${n} ${i.relativeMetricValue.toFixed(2)}%`:"No data available"}get backgroundColor(){return this.item().color}get flexGrow(){return this.item().relativeMetricValue}get flexBasis(){return"0"}static{this.\u0275fac=function(i){return new(i||e)(le(eb),le(tb))}}static{this.\u0275cmp=A({type:e,selectors:[["cc-file-extension-bar-segment"]],viewQuery:function(i,n){i&1&&tt(n.menuRef,mS,5),i&2&&it()},hostAttrs:[1,"min-w-max","cursor-pointer","overflow-hidden","text-center","text-white"],hostVars:6,hostBindings:function(i,n){i&1&&V("pointerdown",function(a){return n.onDocumentPointerDown(a)},jo)("wheel",function(){return n.closeContextMenuOnViewportChange()},jo)("resize",function(){return n.closeContextMenuOnViewportChange()},jm),i&2&&ze("background-color",n.backgroundColor)("flex-grow",n.flexGrow)("flex-basis",n.flexBasis)},inputs:{item:[1,"item"],showAbsoluteValues:[1,"showAbsoluteValues"]},outputs:{toggleShowAbsoluteValues:"toggleShowAbsoluteValues"},decls:4,vars:3,consts:[["menu",""],[1,"cc-bar-section",3,"click","contextmenu"],["data-test-id","formattedTitle",1,"cc-bar-section-text","my-0.5","whitespace-nowrap","px-2.5","text-[10px]",3,"mouseover","mouseleave","title"],[1,"fixed","z-[100]","w-48","rounded-box","border","border-base-300","bg-base-100","py-1","text-base-content","shadow-lg",3,"left","bottom"],[1,"fixed","z-[100]","w-48","rounded-box","border","border-base-300","bg-base-100","py-1","text-base-content","shadow-lg",3,"contextmenu"],["type","button","data-test-id","showBuilding",1,"flex","w-full","items-center","gap-3","px-4","py-2.5","text-left","text-sm","font-medium","hover:bg-base-200"],["type","button","data-test-id","flattenBuilding",1,"flex","w-full","items-center","gap-3","px-4","py-2.5","text-left","text-sm","font-medium","hover:bg-base-200"],["type","button","data-test-id","excludeBuilding",1,"flex","w-full","items-center","gap-3","px-4","py-2.5","text-left","text-sm","font-medium","hover:bg-base-200",3,"click"],[1,"w-4","text-center","fa-solid","fa-ban"],[1,"truncate"],["type","button","data-test-id","showBuilding",1,"flex","w-full","items-center","gap-3","px-4","py-2.5","text-left","text-sm","font-medium","hover:bg-base-200",3,"click"],[1,"w-4","text-center","fa-solid","fa-eye"],["type","button","data-test-id","flattenBuilding",1,"flex","w-full","items-center","gap-3","px-4","py-2.5","text-left","text-sm","font-medium","hover:bg-base-200",3,"click"],[1,"w-4","text-center","fa-solid","fa-arrows-down-to-line"]],template:function(i,n){if(i&1&&(_(0,"span",1),re("click",function(){return n.toggleShowAbsoluteValues.emit()})("contextmenu",function(a){return n.openContextMenu(a)}),_(1,"div",2),re("mouseover",function(){return n.onHoverFileExtensionBar(n.fileExtension())})("mouseleave",function(){return n.onUnhoverFileExtensionBar()}),x(2),T()(),K(3,gS,8,5,"div",3)),i&2){let r;h(),xe("title",n.formattedTitle()),h(),we(" ",n.formattedTitle()," "),h(),Q((r=n.menuPosition())?3:-1,r)}},encapsulation:2})}}return e})();var vS=(e,o)=>o.fileExtension;function xS(e,o){if(e&1){let t=ue();f(0,"cc-file-extension-bar-segment",4),V("toggleShowAbsoluteValues",function(){oe(t);let n=L();return ne(n.toggleShowAbsoluteValues())}),p()}if(e&2){let t=o.$implicit,i=L();R("item",t)("showAbsoluteValues",i.showAbsoluteValues())}}var _h=(()=>{class e{constructor(){this.metricDistributionStore=E(Vl),this.showAbsoluteValues=ke(!1),this.metricDistribution=F(this.metricDistributionStore.hoveredNodeMetricDistribution$,{requireSync:!0})}toggleShowAbsoluteValues(){this.showAbsoluteValues.update(t=>!t)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=A({type:e,selectors:[["cc-file-extension-bar"]],hostAttrs:[1,"fixed","left-0","right-0","z-[70]","block","bg-base-100"],hostVars:2,hostBindings:function(i,n){i&2&&ze("bottom","var(--cc-bottom-bar-height, 32px)")},features:[Xt([{provide:ur,useValue:"--cc-file-extension-bar-height"}]),no([mr])],decls:5,vars:0,consts:[[1,"flex","h-[17px]","w-full"],["title","Distribution metric"],[1,"flex","w-full","gap-px"],[3,"item","showAbsoluteValues"],[3,"toggleShowAbsoluteValues","item","showAbsoluteValues"]],template:function(i,n){i&1&&(f(0,"div",0),W(1,"cc-distribution-metric",1),f(2,"div",2),Ne(3,xS,1,2,"cc-file-extension-bar-segment",3,vS),p()()),i&2&&(h(3),Ve(n.metricDistribution().visible))},dependencies:[Z2,ib],encapsulation:2})}}return e})();var Wl=(()=>{class e{constructor(t){this.store=t,this.defaultCenterMapZoom=Jf,this.centerMapZoom=F(this.store.select(e0),{requireSync:!0}),this.isFocused=F(this.store.select(Li).pipe(_e(Boolean)),{requireSync:!0})}static{this.\u0275fac=function(i){return new(i||e)(M(me))}}static{this.\u0275prov=O({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var wr=(()=>{class e{constructor(t){this.store=t}setPresentationMode(t){this.store.dispatch(c0({value:t}))}setCenterMapZoom(t){this.store.dispatch(Zf({value:t}))}unfocus(){this.store.dispatch(ui())}static{this.\u0275fac=function(i){return new(i||e)(M(me))}}static{this.\u0275prov=O({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var nb=(()=>{class e{constructor(){this.mapControls=E(Et),this.zoomMenuRequested=fe()}requestZoomMenu(t){t.preventDefault(),this.zoomMenuRequested.emit({x:t.clientX,y:t.clientY})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=A({type:e,selectors:[["cc-toolbox-center-map-button"]],outputs:{zoomMenuRequested:"zoomMenuRequested"},decls:1,vars:0,consts:[["label","Center map","icon","fa fa-compass","tooltip","Right-click to set the zoom level it centers at",3,"activated","contextmenu"]],template:function(i,n){i&1&&(f(0,"cc-bar-tool",0),V("activated",function(){return n.mapControls.autoFitTo()})("contextmenu",function(a){return n.requestZoomMenu(a)}),p())},dependencies:[Js],encapsulation:2})}}return e})();var rb=(()=>{class e{constructor(){this.mapControls=E(Et),this.readStore=E(Wl),this.writeStore=E(wr),this.anchor=J.required(),this.dismissed=fe(),this.centerMapZoom=this.readStore.centerMapZoom,this.minZoom=this.mapControls.MIN_ZOOM,this.maxZoom=this.mapControls.MAX_ZOOM}previewAndStore(t){this.writeStore.setCenterMapZoom(t),this.mapControls.setZoomPercentage(t)}useCurrentZoom(){this.writeStore.setCenterMapZoom(Math.round(this.mapControls.zoomPercentage$.value))}resetCenterMapZoom(){this.previewAndStore(this.readStore.defaultCenterMapZoom)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=A({type:e,selectors:[["cc-center-map-zoom-menu"]],hostAttrs:[1,"contents"],inputs:{anchor:[1,"anchor"]},outputs:{dismissed:"dismissed"},decls:10,vars:4,consts:[[3,"dismissed","anchor"],["data-testid","center-map-zoom-menu",1,"flex","w-64","flex-col","gap-2","px-3","py-2"],[1,"text-sm","font-semibold"],["ariaLabel","Center map zoom in percent",3,"valueChange","min","max","value"],[1,"flex","gap-2"],["type","button",1,"btn","btn-xs","flex-1",3,"click"],["type","button",1,"btn","btn-ghost","btn-xs",3,"click"]],template:function(i,n){i&1&&(f(0,"cc-floating-menu",0),V("dismissed",function(){return n.dismissed.emit()}),f(1,"div",1)(2,"span",2),x(3,"Center map zoom"),p(),f(4,"cc-slider-number-input",3),V("valueChange",function(a){return n.previewAndStore(a)}),p(),f(5,"div",4)(6,"button",5),V("click",function(){return n.useCurrentZoom()}),x(7,"Use current zoom"),p(),f(8,"button",6),V("click",function(){return n.resetCenterMapZoom()}),x(9,"Reset"),p()()()()),i&2&&(R("anchor",n.anchor()),h(4),R("min",n.minZoom)("max",n.maxZoom)("value",n.centerMapZoom()))},dependencies:[_0,ti],encapsulation:2})}}return e})();var ab=(()=>{class e{constructor(){this.preferencesReadWindow=E(mi),this.mapToolsWriteStore=E(wr),this.isPresentationMode=F(this.preferencesReadWindow.isPresentationMode$,{requireSync:!0}),this.tooltip=te(()=>this.isPresentationMode()?"Disable flashlight hover effect":"Enable flashlight hover effect")}handleToggle(){this.mapToolsWriteStore.setPresentationMode(!this.isPresentationMode())}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=A({type:e,selectors:[["cc-toolbox-presentation-mode-button"]],decls:1,vars:2,consts:[["label","Flashlight","icon","fa fa-lightbulb-o",3,"activated","pressed","tooltip"]],template:function(i,n){i&1&&(f(0,"cc-bar-tool",0),V("activated",function(){return n.handleToggle()}),p()),i&2&&R("pressed",n.isPresentationMode())("tooltip",n.tooltip())},dependencies:[Js],encapsulation:2})}}return e})();function wS(e,o){e&1&&W(0,"cc-bar-tools-divider")}function yS(e,o){if(e&1){let t=ue();f(0,"cc-center-map-zoom-menu",4),V("dismissed",function(){oe(t);let n=L();return ne(n.zoomMenuAnchor.set(null))}),p()}e&2&&R("anchor",o)}var Eh=(()=>{class e{constructor(){this.writeStore=E(wr),this.isFocused=E(Wl).isFocused,this.zoomMenuAnchor=ke(null)}unfocus(){this.writeStore.unfocus()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=A({type:e,selectors:[["cc-map-tools"]],hostAttrs:[1,"flex","items-center","gap-0.5"],features:[Xt([{provide:hl,useExisting:Kg}])],decls:6,vars:3,consts:[["testId","metrics-bar-unfocus",3,"unfocused","isFocused"],[3,"zoomMenuRequested"],["view","metrics"],[3,"anchor"],[3,"dismissed","anchor"]],template:function(i,n){if(i&1&&(f(0,"cc-unfocus-tool",0),V("unfocused",function(){return n.unfocus()}),p(),K(1,wS,1,0,"cc-bar-tools-divider"),f(2,"cc-toolbox-center-map-button",1),V("zoomMenuRequested",function(a){return n.zoomMenuAnchor.set(a)}),p(),W(3,"cc-toolbox-presentation-mode-button")(4,"cc-toolbox-screenshot-button",2),K(5,yS,1,1,"cc-center-map-zoom-menu",3)),i&2){let r;R("isFocused",n.isFocused()),h(),Q(n.isFocused()?1:-1),h(4),Q((r=n.zoomMenuAnchor())?5:-1,r)}},dependencies:[el,nb,rb,ab,ul,sl],encapsulation:2})}}return e})();var sb=(e,o)=>Xe(js,Lf,(t,i)=>{let n=t[o];return i[e][n]==="relative"?"x\u0342":"\u03A3"});var SS=e=>{if(!e)return[];let o=[];for(let{data:t}of ao(e))t.type===An.FOLDER&&!t.isExcluded&&o.push(t.path);return o.sort((t,i)=>t.localeCompare(i))},lb=Xe(Dt,e=>SS(e.unifiedMapNode));var CS=(e,o)=>{let t=new Map(e.map(i=>[i.path,0]));for(let i of o){if(!$t(i)||i.isExcluded)continue;let n=MS(t,i.path);n!==void 0&&t.set(n,t.get(n)+1)}return e.map(i=>Te(ae({},i),{fileCount:t.get(i.path)})).sort((i,n)=>i.path.localeCompare(n.path))};function MS(e,o){let t=o;for(;t;){if(e.has(t))return t;let i=t.lastIndexOf("/");t=i>0?t.slice(0,i):""}}var cb=Xe(gs,Kn,CS);var db=Xe(ps,e=>({leftColor:e.positive,middleColor:e.neutral,rightColor:e.negative}));var hb=Xe(ko,hs,(e,o)=>({values:e.values,min:e.minValue,max:e.maxValue,from:o.from,to:o.to}));var ub=Xe(Dt,Qn,Li,({unifiedMapNode:e},o,t)=>t&&o.get(t)||e);var dt=(()=>{class e{constructor(t){this.store=t,this.metricData$=this.store.select(Xn),this.primaryMetricNames$=this.store.select(js),this.amountOfBuildingsWithSelectedEdgeMetric$=this.store.select(Os),this.selectedColorMetricData$=this.store.select(ko),this.metricColorRangeColors$=this.store.select(db),this.metricColorRangeValues$=this.store.select(hb),this.markedPackagesWithCounts$=this.store.select(cb),this.markableFolderPaths$=this.store.select(lb),this.hoveredNode$=this.store.select(Yn),this.selectedNode$=this.store.select(Zn),this.topLevelNode$=this.store.select(ub)}attributeTypeLabel$(t,i){return this.store.select(sb(t,i))}static{this.\u0275fac=function(i){return new(i||e)(M(me))}}static{this.\u0275prov=O({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var je=(()=>{class e{constructor(t){this.store=t}setAreaMetric(t){this.store.dispatch(Ri({value:t}))}setHeightMetric(t){this.store.dispatch(Fi({value:t}))}setColorMetric(t){this.store.dispatch(Mt({value:t}))}setEdgeMetric(t){this.store.dispatch(Zt({value:t}))}setLayoutAlgorithm(t){this.store.dispatch(Vn({value:t}))}setMaxTreeMapFiles(t){this.store.dispatch(Zs({value:t}))}setRadialLevels(t){this.store.dispatch(m0({value:t}))}setRadialFolderValue(t){this.store.dispatch(u0({value:t}))}setRadialFolderStyle(t){this.store.dispatch(d0({value:t}))}setRadialFolderTint(t){this.store.dispatch(h0({value:t}))}setMargin(t){this.store.dispatch(Bn({value:t}))}setInvertArea(t){this.store.dispatch(Ln({value:t}))}setEnableFloorLabels(t){this.store.dispatch(uo({value:t}))}setScaling(t){this.store.dispatch(bo({value:t}))}setInvertHeight(t){this.store.dispatch(Dn({value:t}))}setColorRange(t){this.store.dispatch(Yt({value:t}))}setColorMode(t){this.store.dispatch(Ii({value:t}))}setMapColors(t){this.store.dispatch(hi({value:t}))}invertColorRange(){this.store.dispatch(lo())}invertDeltaColors(){this.store.dispatch(co())}setEdgeHeight(t){this.store.dispatch(ho({value:t}))}setAmountOfEdgePreviews(t){this.store.dispatch(Ti({value:t}))}toggleEdgeMetricVisible(){this.store.dispatch(Pn())}setShowIncomingEdges(t){this.store.dispatch(vo({value:t}))}setShowOutgoingEdges(t){this.store.dispatch(xo({value:t}))}setShowOnlyBuildingsWithEdges(t){this.store.dispatch(Wn({value:t}))}toggleIsHeightAndColorMetricLinked(){this.store.dispatch(l0())}unlinkColorMetricFromHeightMetric(){this.store.dispatch(s0({value:!1}))}markPackage(t){this.store.dispatch(Co({packages:[t]}))}unmarkPackage(t){this.store.dispatch(Mo({path:t}))}static{this.\u0275fac=function(i){return new(i||e)(M(me))}}static{this.\u0275prov=O({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var mb=(()=>{class e{constructor(){this.mapStateReadWindow=E(Ee),this.metricsBarWriteStore=E(je),this.popoverId=J.required(),this.anchorName=J.required(),this.margin=F(this.mapStateReadWindow.margin$,{initialValue:0}),this.enableFloorLabels=F(this.mapStateReadWindow.enableFloorLabels$,{initialValue:!1}),this.isInvertedArea=F(this.mapStateReadWindow.invertArea$,{initialValue:!1}),this.resetKeys=["mapState.margin","mapState.invertArea","mapState.enableFloorLabels"]}setMargin(t){this.metricsBarWriteStore.setMargin(t)}setEnableFloorLabel(t){let i=t.target.checked;this.metricsBarWriteStore.setEnableFloorLabels(i)}toggleInvertingArea(t){let i=t.target.checked;this.metricsBarWriteStore.setInvertArea(i)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=A({type:e,selectors:[["cc-area-settings-popover"]],hostAttrs:[1,"contents"],inputs:{popoverId:[1,"popoverId"],anchorName:[1,"anchorName"]},decls:14,vars:8,consts:[[3,"popoverId","anchorName"],["title","Amount of space between buildings in percent"],[1,"text-sm"],["ariaLabel","Margin",3,"valueChange","min","max","value"],[1,"flex","items-center","gap-2","cursor-pointer"],["type","checkbox",1,"checkbox","checkbox-sm","checkbox-primary",3,"change","checked"],["tooltip","Reset area metric settings to their defaults","label","Reset area metric settings",3,"settingsKeys"]],template:function(i,n){i&1&&(f(0,"cc-settings-popover-shell",0)(1,"div",1)(2,"span",2),x(3,"Margin"),p(),f(4,"cc-slider-number-input",3),V("valueChange",function(a){return n.setMargin(a)}),p()(),f(5,"label",4)(6,"input",5),V("change",function(a){return n.setEnableFloorLabel(a)}),p(),f(7,"span"),x(8,"Enable Floor Labels"),p()(),f(9,"label",4)(10,"input",5),V("change",function(a){return n.toggleInvertingArea(a)}),p(),f(11,"span"),x(12,"Invert Area"),p()(),W(13,"cc-reset-settings-button",6),p()),i&2&&(R("popoverId",n.popoverId())("anchorName",n.anchorName()),h(4),R("min",1)("max",100)("value",n.margin()),h(2),R("checked",n.enableFloorLabels()),h(4),R("checked",n.isInvertedArea()),h(3),R("settingsKeys",n.resetKeys))},dependencies:[Wi,kt,ti],encapsulation:2})}}return e})();var Sr=(()=>{class e{constructor(){this.metricsBarReadStore=E(dt),this.metricsLensFacade=E(Bs),this.popoverId=J.required(),this.anchorName=J.required(),this.placeholder=J("Search metric"),this.kind=J("node"),this.selected=J(null),this.metricSelected=fe(),this.metricData=F(this.metricsBarReadStore.metricData$,{initialValue:{nodeMetricData:[],edgeMetricData:[],nodeEdgeMetricsMap:new Map}}),this.descriptors=F(this.metricsLensFacade.descriptors$,{initialValue:{}}),this.options=te(()=>{let t=this.metricData();return this.kind()==="edge"?t.edgeMetricData:t.nodeMetricData})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=A({type:e,selectors:[["cc-metric-bar-select-popover"]],hostAttrs:[1,"contents"],inputs:{popoverId:[1,"popoverId"],anchorName:[1,"anchorName"],placeholder:[1,"placeholder"],kind:[1,"kind"],selected:[1,"selected"]},outputs:{metricSelected:"metricSelected"},decls:1,vars:6,consts:[[3,"metricSelected","popoverId","anchorName","placeholder","options","descriptors","selected"]],template:function(i,n){i&1&&(f(0,"cc-metric-select-popover",0),V("metricSelected",function(a){return n.metricSelected.emit(a)}),p()),i&2&&R("popoverId",n.popoverId())("anchorName",n.anchorName())("placeholder",n.placeholder())("options",n.options())("descriptors",n.descriptors())("selected",n.selected())},dependencies:[F0],encapsulation:2})}}return e})();var Cr=(()=>{class e{constructor(t){this.metricsBarReadStore=t,this.node$=ut([this.metricsBarReadStore.hoveredNode$,this.metricsBarReadStore.selectedNode$,this.metricsBarReadStore.topLevelNode$]).pipe(_e(([i,n,r])=>i??n??r),Ha({bufferSize:1,refCount:!0}))}createNodeObservable(){return this.node$}static{this.\u0275fac=function(i){return new(i||e)(M(dt))}}static{this.\u0275prov=O({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Ol=(()=>{class e{constructor(){this.nodeSelectionService=E(Cr),this.metricsBarReadStore=E(dt),this.metricFor=J.required(),this.attributeType=J("nodes"),this.node=F(this.nodeSelectionService.createNodeObservable()),this.isNodeALeaf=te(()=>{let t=this.node();return t?$t(t):!1}),this.selectorInputs=te(()=>({attributeType:this.attributeType(),metricFor:this.metricFor()})),this.attributeTypeLabel=F(gp(this.selectorInputs).pipe(Ut(({attributeType:t,metricFor:i})=>this.metricsBarReadStore.attributeTypeLabel$(t,i))))}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=A({type:e,selectors:[["cc-metric-chooser-type"]],inputs:{metricFor:[1,"metricFor"],attributeType:[1,"attributeType"]},decls:2,vars:2,consts:[[3,"hidden"]],template:function(i,n){i&1&&(_(0,"span",0),x(1),T()),i&2&&(xe("hidden",n.isNodeALeaf()),h(),we(" ",n.attributeTypeLabel(),`
3638
+ `))},encapsulation:2})}}return e})();function _S(e,o){if(e&1&&(f(0,"span",4),x(1),p()),e&2){let t=o;zt(t.styleClass),h(),we("\u0394",t.label)}}function ES(e,o){if(e&1&&(f(0,"span",2),W(1,"cc-metric-chooser-type",3),p(),f(2,"span",4),x(3),p(),K(4,_S,2,3,"span",5)),e&2){let t,i=o,n=L();h(),R("metricFor",n.metricFor()),h(2),Re(i.value),h(),Q((t=i.delta)?4:-1,t)}}function kS(e,o){e&1&&(f(0,"span",1),x(1,"\xA0"),p())}var zl=(()=>{class e{constructor(){this.nodeSelectionService=E(Cr),this.metricsBarReadStore=E(dt),this.metricFor=J.required(),this.node=F(this.nodeSelectionService.createNodeObservable()),this.primaryMetricNames=F(this.metricsBarReadStore.primaryMetricNames$),this.metricName=te(()=>this.primaryMetricNames()?.[this.metricFor()]??null),this.display=te(()=>qS(this.node(),this.metricName(),this.metricFor()))}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=A({type:e,selectors:[["cc-metric-meta-value"]],inputs:{metricFor:[1,"metricFor"]},decls:3,vars:1,consts:[[1,"flex","items-center","justify-center","gap-1","text-xs","leading-tight","min-h-4"],["aria-hidden","true"],[1,"opacity-60"],[3,"metricFor"],[1,"font-medium"],[1,"font-medium",3,"class"]],template:function(i,n){if(i&1&&(f(0,"div",0),K(1,ES,5,3)(2,kS,2,0,"span",1),p()),i&2){let r;h(),Q((r=n.display())?1:2,r)}},dependencies:[Ol],encapsulation:2})}}return e})();function qS(e,o,t){return!e||!o?null:{value:TS(e,o),delta:RS(e,o,t)}}function TS(e,o){let t=e.attributes?.[o];return typeof t=="number"?t.toLocaleString():"\u2014"}function RS(e,o,t){let i=e.deltas?.[o];return typeof i!="number"?null:{label:i.toLocaleString(),styleClass:AS(i,t)}}function AS(e,o){return o==="heightMetric"&&e>0?"text-success":e<0?"text-error":"text-base-content"}var IS=["*"],$l=(()=>{class e{constructor(){this.label=J.required(),this.metricName=J(""),this.metricFor=J.required(),this.placeholder=J(""),this.searchPopoverId=J.required(),this.searchAnchorName=J.required(),this.hasSettings=J(!0),this.settingsPopoverId=J.required(),this.settingsAnchorName=J.required(),this.testIdPrefix=J.required(),this.metricSelected=fe()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=A({type:e,selectors:[["cc-metric-segment"]],hostAttrs:[1,"contents"],inputs:{label:[1,"label"],metricName:[1,"metricName"],metricFor:[1,"metricFor"],placeholder:[1,"placeholder"],searchPopoverId:[1,"searchPopoverId"],searchAnchorName:[1,"searchAnchorName"],hasSettings:[1,"hasSettings"],settingsPopoverId:[1,"settingsPopoverId"],settingsAnchorName:[1,"settingsAnchorName"],testIdPrefix:[1,"testIdPrefix"]},outputs:{metricSelected:"metricSelected"},ngContentSelectors:IS,decls:5,vars:14,consts:[[3,"label","metricName","hasCog","cogPopoverId","cogAnchorName","searchPopoverId","searchAnchorName","testId","cogTestId"],["body","",1,"flex","flex-col","items-stretch","gap-1"],[3,"metricFor"],["kind","node",3,"metricSelected","popoverId","anchorName","placeholder","selected"]],template:function(i,n){i&1&&(Xa(),f(0,"cc-axis-card",0)(1,"div",1),W(2,"cc-metric-meta-value",2),p()(),f(3,"cc-metric-bar-select-popover",3),V("metricSelected",function(a){return n.metricSelected.emit(a)}),p(),Ka(4)),i&2&&(R("label",n.label())("metricName",n.metricName())("hasCog",n.hasSettings())("cogPopoverId",n.settingsPopoverId())("cogAnchorName",n.settingsAnchorName())("searchPopoverId",n.searchPopoverId())("searchAnchorName",n.searchAnchorName())("testId",n.testIdPrefix())("cogTestId",n.testIdPrefix()+"-cog"),h(2),R("metricFor",n.metricFor()),h(),R("popoverId",n.searchPopoverId())("anchorName",n.searchAnchorName())("placeholder",n.placeholder())("selected",n.metricName()))},dependencies:[Bi,zl,Sr],encapsulation:2})}}return e})();function FS(e,o){if(e&1&&W(0,"cc-area-settings-popover",1),e&2){let t=L();R("popoverId",t.settingsPopoverId)("anchorName",t.settingsAnchorName)}}var pb=(()=>{class e{constructor(){this.searchPopoverId="metric-select-popover-area",this.searchAnchorName="metric-segment-area",this.settingsPopoverId="metric-settings-popover-area",this.settingsAnchorName="metric-segment-area-cog",this.mapStateReadWindow=E(Ee),this.metricsBarWriteStore=E(je),this.isRadialLayout=Vt(),this.areaMetric=F(this.mapStateReadWindow.areaMetric$,{initialValue:""})}handleMetricSelected(t){this.metricsBarWriteStore.setAreaMetric(t)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=A({type:e,selectors:[["cc-area-segment"]],hostAttrs:[1,"contents"],decls:2,vars:7,consts:[["label","Area","metricFor","areaMetric","placeholder","Area Metric (highest value)","testIdPrefix","metric-segment-area",3,"metricSelected","metricName","searchPopoverId","searchAnchorName","settingsPopoverId","settingsAnchorName","hasSettings"],[3,"popoverId","anchorName"]],template:function(i,n){i&1&&(f(0,"cc-metric-segment",0),V("metricSelected",function(a){return n.handleMetricSelected(a)}),K(1,FS,1,2,"cc-area-settings-popover",1),p()),i&2&&(R("metricName",n.areaMetric())("searchPopoverId",n.searchPopoverId)("searchAnchorName",n.searchAnchorName)("settingsPopoverId",n.settingsPopoverId)("settingsAnchorName",n.settingsAnchorName)("hasSettings",!n.isRadialLayout()),h(),Q(n.isRadialLayout()?-1:1))},dependencies:[$l,mb],encapsulation:2})}}return e})();function LS(e,o){if(e&1&&(f(0,"span",3),x(1),p()),e&2){let t=L();h(),Re(t.count())}}var fb=(()=>{class e{constructor(t,i,n){this.mapStateReadWindow=t,this.metricsBarReadStore=i,this.metricsBarWriteStore=n,this.mapColorFor=J.required(),this.count=J(null),this.colorMetric=F(this.mapStateReadWindow.colorMetric$,{initialValue:""}),this.colorRange=F(this.mapStateReadWindow.colorRange$,{initialValue:{from:0,to:0}}),this.nodeMetricRange=F(this.metricsBarReadStore.selectedColorMetricData$,{initialValue:{values:[],minValue:0,maxValue:0}}),this.mapColors=F(this.mapStateReadWindow.mapColors$,{initialValue:Qt}),this.color=te(()=>this.mapColors()[this.mapColorFor()])}handleColorChange(t){this.metricsBarWriteStore.setMapColors({[this.mapColorFor()]:t})}static{this.\u0275fac=function(i){return new(i||e)(le(Ee),le(dt),le(je))}}static{this.\u0275cmp=A({type:e,selectors:[["cc-color-band-row"]],inputs:{mapColorFor:[1,"mapColorFor"],count:[1,"count"]},decls:6,vars:9,consts:[[1,"flex","items-center","gap-2"],[3,"colorChange","hexColor","ariaLabel"],[1,"min-w-0","flex-1","truncate","text-sm"],[1,"text-xs","opacity-60","tabular-nums"]],template:function(i,n){i&1&&(f(0,"div",0)(1,"cc-inline-color-picker",1),V("colorChange",function(a){return n.handleColorChange(a)}),p(),f(2,"span",2),x(3),Kt(4,"mapColorLabel"),p(),K(5,LS,2,1,"span",3),p()),i&2&&(h(),R("hexColor",n.color())("ariaLabel","Recolor "+n.mapColorFor()),h(2),we(" ",Jm(4,4,n.mapColorFor(),n.colorRange(),n.nodeMetricRange(),n.colorMetric())," "),h(2),Q(n.count()!==null?5:-1))},dependencies:[To,Cg],encapsulation:2})}}return e})();function DS(e,o){if(e&1&&W(0,"cc-color-band-row",3)(1,"cc-color-band-row",4)(2,"cc-color-band-row",5),e&2){let t=L();R("count",t.colorCategoryCounts().positive),h(),R("count",t.colorCategoryCounts().neutral),h(),R("count",t.colorCategoryCounts().negative)}}function PS(e,o){e&1&&W(0,"cc-color-band-row",6)(1,"cc-color-band-row",7)}var gb=(()=>{class e{constructor(t,i){this.fileStoreReadWindow=t,this.colorCategoryCountsStore=i,this.isDeltaState=F(this.fileStoreReadWindow.isDeltaState$,{initialValue:!1}),this.colorCategoryCounts=F(this.colorCategoryCountsStore.colorCategoryCounts$,{initialValue:{positive:0,neutral:0,negative:0}})}static{this.\u0275fac=function(i){return new(i||e)(le(Fe),le(er))}}static{this.\u0275cmp=A({type:e,selectors:[["cc-color-bands-section"]],hostAttrs:[1,"contents"],decls:6,vars:1,consts:[[1,"flex","flex-col","gap-1"],[1,"text-xs","uppercase","tracking-wider","opacity-60"],["mapColorFor","selected"],["mapColorFor","positive",3,"count"],["mapColorFor","neutral",3,"count"],["mapColorFor","negative",3,"count"],["mapColorFor","positiveDelta"],["mapColorFor","negativeDelta"]],template:function(i,n){i&1&&(f(0,"div",0)(1,"span",1),x(2,"Bands"),p(),K(3,DS,3,3)(4,PS,2,0),W(5,"cc-color-band-row",2),p()),i&2&&(h(3),Q(n.isDeltaState()?4:3))},dependencies:[fb],encapsulation:2})}}return e})();function nn(e,o){return e==null||o==null?NaN:e<o?-1:e>o?1:e>=o?0:NaN}function kh(e,o){return e==null||o==null?NaN:o<e?-1:o>e?1:o>=e?0:NaN}function jl(e){let o,t,i;e.length!==2?(o=nn,t=(s,l)=>nn(e(s),l),i=(s,l)=>e(s)-l):(o=e===nn||e===kh?e:NS,t=e,i=e);function n(s,l,d=0,c=s.length){if(d<c){if(o(l,l)!==0)return c;do{let u=d+c>>>1;t(s[u],l)<0?d=u+1:c=u}while(d<c)}return d}function r(s,l,d=0,c=s.length){if(d<c){if(o(l,l)!==0)return c;do{let u=d+c>>>1;t(s[u],l)<=0?d=u+1:c=u}while(d<c)}return d}function a(s,l,d=0,c=s.length){let u=n(s,l,d,c-1);return u>d&&i(s[u-1],l)>-i(s[u],l)?u-1:u}return{left:n,center:a,right:r}}function NS(){return 0}function qh(e){return e===null?NaN:+e}var bb=jl(nn),vb=bb.right,VS=bb.left,BS=jl(qh).center,Th=vb;function Hl(e,o){let t,i;if(o===void 0)for(let n of e)n!=null&&(t===void 0?n>=n&&(t=i=n):(t>n&&(t=n),i<n&&(i=n)));else{let n=-1;for(let r of e)(r=o(r,++n,e))!=null&&(t===void 0?r>=r&&(t=i=r):(t>r&&(t=r),i<r&&(i=r)))}return[t,i]}var WS=Math.sqrt(50),OS=Math.sqrt(10),zS=Math.sqrt(2);function Ul(e,o,t){let i=(o-e)/Math.max(0,t),n=Math.floor(Math.log10(i)),r=i/Math.pow(10,n),a=r>=WS?10:r>=OS?5:r>=zS?2:1,s,l,d;return n<0?(d=Math.pow(10,-n)/a,s=Math.round(e*d),l=Math.round(o*d),s/d<e&&++s,l/d>o&&--l,d=-d):(d=Math.pow(10,n)*a,s=Math.round(e/d),l=Math.round(o/d),s*d<e&&++s,l*d>o&&--l),l<s&&.5<=t&&t<2?Ul(e,o,t*2):[s,l,d]}function Gl(e,o,t){if(o=+o,e=+e,t=+t,!(t>0))return[];if(e===o)return[e];let i=o<e,[n,r,a]=i?Ul(o,e,t):Ul(e,o,t);if(!(r>=n))return[];let s=r-n+1,l=new Array(s);if(i)if(a<0)for(let d=0;d<s;++d)l[d]=(r-d)/-a;else for(let d=0;d<s;++d)l[d]=(r-d)*a;else if(a<0)for(let d=0;d<s;++d)l[d]=(n+d)/-a;else for(let d=0;d<s;++d)l[d]=(n+d)*a;return l}function ta(e,o,t){return o=+o,e=+e,t=+t,Ul(e,o,t)[2]}function Rh(e,o,t){o=+o,e=+e,t=+t;let i=o<e,n=i?ta(o,e,t):ta(e,o,t);return(i?-1:1)*(n<0?1/-n:n)}function ia(e,o){let t;if(o===void 0)for(let i of e)i!=null&&(t<i||t===void 0&&i>=i)&&(t=i);else{let i=-1;for(let n of e)(n=o(n,++i,e))!=null&&(t<n||t===void 0&&n>=n)&&(t=n)}return t}function xb(e){return e}var Ah=1,Ih=2,Fh=3,oa=4,wb=1e-6;function $S(e){return"translate("+e+",0)"}function jS(e){return"translate(0,"+e+")"}function HS(e){return o=>+e(o)}function US(e,o){return o=Math.max(0,e.bandwidth()-o*2)/2,e.round()&&(o=Math.round(o)),t=>+e(t)+o}function GS(){return!this.__axis}function yb(e,o){var t=[],i=null,n=null,r=6,a=6,s=3,l=typeof window<"u"&&window.devicePixelRatio>1?0:.5,d=e===Ah||e===oa?-1:1,c=e===oa||e===Ih?"x":"y",u=e===Ah||e===Fh?$S:jS;function m(g){var b=i??(o.ticks?o.ticks.apply(o,t):o.domain()),y=n??(o.tickFormat?o.tickFormat.apply(o,t):xb),q=Math.max(r,0)+s,D=o.range(),j=+D[0]+l,k=+D[D.length-1]+l,N=(o.bandwidth?US:HS)(o.copy(),l),z=g.selection?g.selection():g,H=z.selectAll(".domain").data([null]),G=z.selectAll(".tick").data(b,o).order(),Y=G.exit(),X=G.enter().append("g").attr("class","tick"),he=G.select("line"),Ae=G.select("text");H=H.merge(H.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),G=G.merge(X),he=he.merge(X.append("line").attr("stroke","currentColor").attr(c+"2",d*r)),Ae=Ae.merge(X.append("text").attr("fill","currentColor").attr(c,d*q).attr("dy",e===Ah?"0em":e===Fh?"0.71em":"0.32em")),g!==z&&(H=H.transition(g),G=G.transition(g),he=he.transition(g),Ae=Ae.transition(g),Y=Y.transition(g).attr("opacity",wb).attr("transform",function($){return isFinite($=N($))?u($+l):this.getAttribute("transform")}),X.attr("opacity",wb).attr("transform",function($){var qe=this.parentNode.__axis;return u((qe&&isFinite(qe=qe($))?qe:N($))+l)})),Y.remove(),H.attr("d",e===oa||e===Ih?a?"M"+d*a+","+j+"H"+l+"V"+k+"H"+d*a:"M"+l+","+j+"V"+k:a?"M"+j+","+d*a+"V"+l+"H"+k+"V"+d*a:"M"+j+","+l+"H"+k),G.attr("opacity",1).attr("transform",function($){return u(N($)+l)}),he.attr(c+"2",d*r),Ae.attr(c,d*q).text(y),z.filter(GS).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===Ih?"start":e===oa?"end":"middle"),z.each(function(){this.__axis=N})}return m.scale=function(g){return arguments.length?(o=g,m):o},m.ticks=function(){return t=Array.from(arguments),m},m.tickArguments=function(g){return arguments.length?(t=g==null?[]:Array.from(g),m):t.slice()},m.tickValues=function(g){return arguments.length?(i=g==null?null:Array.from(g),m):i&&i.slice()},m.tickFormat=function(g){return arguments.length?(n=g,m):n},m.tickSize=function(g){return arguments.length?(r=a=+g,m):r},m.tickSizeInner=function(g){return arguments.length?(r=+g,m):r},m.tickSizeOuter=function(g){return arguments.length?(a=+g,m):a},m.tickPadding=function(g){return arguments.length?(s=+g,m):s},m.offset=function(g){return arguments.length?(l=+g,m):l},m}function Lh(e){return yb(Fh,e)}function Dh(e){return yb(oa,e)}var XS={value:()=>{}};function Cb(){for(var e=0,o=arguments.length,t={},i;e<o;++e){if(!(i=arguments[e]+"")||i in t||/[\s.]/.test(i))throw new Error("illegal type: "+i);t[i]=[]}return new Xl(t)}function Xl(e){this._=e}function KS(e,o){return e.trim().split(/^|\s+/).map(function(t){var i="",n=t.indexOf(".");if(n>=0&&(i=t.slice(n+1),t=t.slice(0,n)),t&&!o.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:i}})}Xl.prototype=Cb.prototype={constructor:Xl,on:function(e,o){var t=this._,i=KS(e+"",t),n,r=-1,a=i.length;if(arguments.length<2){for(;++r<a;)if((n=(e=i[r]).type)&&(n=QS(t[n],e.name)))return n;return}if(o!=null&&typeof o!="function")throw new Error("invalid callback: "+o);for(;++r<a;)if(n=(e=i[r]).type)t[n]=Sb(t[n],e.name,o);else if(o==null)for(n in t)t[n]=Sb(t[n],e.name,null);return this},copy:function(){var e={},o=this._;for(var t in o)e[t]=o[t].slice();return new Xl(e)},call:function(e,o){if((n=arguments.length-2)>0)for(var t=new Array(n),i=0,n,r;i<n;++i)t[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(r=this._[e],i=0,n=r.length;i<n;++i)r[i].value.apply(o,t)},apply:function(e,o,t){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],n=0,r=i.length;n<r;++n)i[n].value.apply(o,t)}};function QS(e,o){for(var t=0,i=e.length,n;t<i;++t)if((n=e[t]).name===o)return n.value}function Sb(e,o,t){for(var i=0,n=e.length;i<n;++i)if(e[i].name===o){e[i]=XS,e=e.slice(0,i).concat(e.slice(i+1));break}return t!=null&&e.push({name:o,value:t}),e}var Ph=Cb;var Kl="http://www.w3.org/1999/xhtml",Nh={svg:"http://www.w3.org/2000/svg",xhtml:Kl,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Gi(e){var o=e+="",t=o.indexOf(":");return t>=0&&(o=e.slice(0,t))!=="xmlns"&&(e=e.slice(t+1)),Nh.hasOwnProperty(o)?{space:Nh[o],local:e}:e}function YS(e){return function(){var o=this.ownerDocument,t=this.namespaceURI;return t===Kl&&o.documentElement.namespaceURI===Kl?o.createElement(e):o.createElementNS(t,e)}}function ZS(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Ql(e){var o=Gi(e);return(o.local?ZS:YS)(o)}function JS(){}function rn(e){return e==null?JS:function(){return this.querySelector(e)}}function Mb(e){typeof e!="function"&&(e=rn(e));for(var o=this._groups,t=o.length,i=new Array(t),n=0;n<t;++n)for(var r=o[n],a=r.length,s=i[n]=new Array(a),l,d,c=0;c<a;++c)(l=r[c])&&(d=e.call(l,l.__data__,c,r))&&("__data__"in l&&(d.__data__=l.__data__),s[c]=d);return new ht(i,this._parents)}function Vh(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function e6(){return[]}function na(e){return e==null?e6:function(){return this.querySelectorAll(e)}}function t6(e){return function(){return Vh(e.apply(this,arguments))}}function _b(e){typeof e=="function"?e=t6(e):e=na(e);for(var o=this._groups,t=o.length,i=[],n=[],r=0;r<t;++r)for(var a=o[r],s=a.length,l,d=0;d<s;++d)(l=a[d])&&(i.push(e.call(l,l.__data__,d,a)),n.push(l));return new ht(i,n)}function ra(e){return function(){return this.matches(e)}}function Yl(e){return function(o){return o.matches(e)}}var i6=Array.prototype.find;function o6(e){return function(){return i6.call(this.children,e)}}function n6(){return this.firstElementChild}function Eb(e){return this.select(e==null?n6:o6(typeof e=="function"?e:Yl(e)))}var r6=Array.prototype.filter;function a6(){return Array.from(this.children)}function s6(e){return function(){return r6.call(this.children,e)}}function kb(e){return this.selectAll(e==null?a6:s6(typeof e=="function"?e:Yl(e)))}function qb(e){typeof e!="function"&&(e=ra(e));for(var o=this._groups,t=o.length,i=new Array(t),n=0;n<t;++n)for(var r=o[n],a=r.length,s=i[n]=[],l,d=0;d<a;++d)(l=r[d])&&e.call(l,l.__data__,d,r)&&s.push(l);return new ht(i,this._parents)}function Zl(e){return new Array(e.length)}function Tb(){return new ht(this._enter||this._groups.map(Zl),this._parents)}function aa(e,o){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=o}aa.prototype={constructor:aa,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,o){return this._parent.insertBefore(e,o)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function Rb(e){return function(){return e}}function l6(e,o,t,i,n,r){for(var a=0,s,l=o.length,d=r.length;a<d;++a)(s=o[a])?(s.__data__=r[a],i[a]=s):t[a]=new aa(e,r[a]);for(;a<l;++a)(s=o[a])&&(n[a]=s)}function c6(e,o,t,i,n,r,a){var s,l,d=new Map,c=o.length,u=r.length,m=new Array(c),g;for(s=0;s<c;++s)(l=o[s])&&(m[s]=g=a.call(l,l.__data__,s,o)+"",d.has(g)?n[s]=l:d.set(g,l));for(s=0;s<u;++s)g=a.call(e,r[s],s,r)+"",(l=d.get(g))?(i[s]=l,l.__data__=r[s],d.delete(g)):t[s]=new aa(e,r[s]);for(s=0;s<c;++s)(l=o[s])&&d.get(m[s])===l&&(n[s]=l)}function d6(e){return e.__data__}function Ab(e,o){if(!arguments.length)return Array.from(this,d6);var t=o?c6:l6,i=this._parents,n=this._groups;typeof e!="function"&&(e=Rb(e));for(var r=n.length,a=new Array(r),s=new Array(r),l=new Array(r),d=0;d<r;++d){var c=i[d],u=n[d],m=u.length,g=h6(e.call(c,c&&c.__data__,d,i)),b=g.length,y=s[d]=new Array(b),q=a[d]=new Array(b),D=l[d]=new Array(m);t(c,u,y,q,D,g,o);for(var j=0,k=0,N,z;j<b;++j)if(N=y[j]){for(j>=k&&(k=j+1);!(z=q[k])&&++k<b;);N._next=z||null}}return a=new ht(a,i),a._enter=s,a._exit=l,a}function h6(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Ib(){return new ht(this._exit||this._groups.map(Zl),this._parents)}function Fb(e,o,t){var i=this.enter(),n=this,r=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),o!=null&&(n=o(n),n&&(n=n.selection())),t==null?r.remove():t(r),i&&n?i.merge(n).order():n}function Lb(e){for(var o=e.selection?e.selection():e,t=this._groups,i=o._groups,n=t.length,r=i.length,a=Math.min(n,r),s=new Array(n),l=0;l<a;++l)for(var d=t[l],c=i[l],u=d.length,m=s[l]=new Array(u),g,b=0;b<u;++b)(g=d[b]||c[b])&&(m[b]=g);for(;l<n;++l)s[l]=t[l];return new ht(s,this._parents)}function Db(){for(var e=this._groups,o=-1,t=e.length;++o<t;)for(var i=e[o],n=i.length-1,r=i[n],a;--n>=0;)(a=i[n])&&(r&&a.compareDocumentPosition(r)^4&&r.parentNode.insertBefore(a,r),r=a);return this}function Pb(e){e||(e=u6);function o(u,m){return u&&m?e(u.__data__,m.__data__):!u-!m}for(var t=this._groups,i=t.length,n=new Array(i),r=0;r<i;++r){for(var a=t[r],s=a.length,l=n[r]=new Array(s),d,c=0;c<s;++c)(d=a[c])&&(l[c]=d);l.sort(o)}return new ht(n,this._parents).order()}function u6(e,o){return e<o?-1:e>o?1:e>=o?0:NaN}function Nb(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Vb(){return Array.from(this)}function Bb(){for(var e=this._groups,o=0,t=e.length;o<t;++o)for(var i=e[o],n=0,r=i.length;n<r;++n){var a=i[n];if(a)return a}return null}function Wb(){let e=0;for(let o of this)++e;return e}function Ob(){return!this.node()}function zb(e){for(var o=this._groups,t=0,i=o.length;t<i;++t)for(var n=o[t],r=0,a=n.length,s;r<a;++r)(s=n[r])&&e.call(s,s.__data__,r,n);return this}function m6(e){return function(){this.removeAttribute(e)}}function p6(e){return function(){this.removeAttributeNS(e.space,e.local)}}function f6(e,o){return function(){this.setAttribute(e,o)}}function g6(e,o){return function(){this.setAttributeNS(e.space,e.local,o)}}function b6(e,o){return function(){var t=o.apply(this,arguments);t==null?this.removeAttribute(e):this.setAttribute(e,t)}}function v6(e,o){return function(){var t=o.apply(this,arguments);t==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,t)}}function $b(e,o){var t=Gi(e);if(arguments.length<2){var i=this.node();return t.local?i.getAttributeNS(t.space,t.local):i.getAttribute(t)}return this.each((o==null?t.local?p6:m6:typeof o=="function"?t.local?v6:b6:t.local?g6:f6)(t,o))}function Jl(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function x6(e){return function(){this.style.removeProperty(e)}}function w6(e,o,t){return function(){this.style.setProperty(e,o,t)}}function y6(e,o,t){return function(){var i=o.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,t)}}function jb(e,o,t){return arguments.length>1?this.each((o==null?x6:typeof o=="function"?y6:w6)(e,o,t??"")):Io(this.node(),e)}function Io(e,o){return e.style.getPropertyValue(o)||Jl(e).getComputedStyle(e,null).getPropertyValue(o)}function S6(e){return function(){delete this[e]}}function C6(e,o){return function(){this[e]=o}}function M6(e,o){return function(){var t=o.apply(this,arguments);t==null?delete this[e]:this[e]=t}}function Hb(e,o){return arguments.length>1?this.each((o==null?S6:typeof o=="function"?M6:C6)(e,o)):this.node()[e]}function Ub(e){return e.trim().split(/^|\s+/)}function Bh(e){return e.classList||new Gb(e)}function Gb(e){this._node=e,this._names=Ub(e.getAttribute("class")||"")}Gb.prototype={add:function(e){var o=this._names.indexOf(e);o<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var o=this._names.indexOf(e);o>=0&&(this._names.splice(o,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function Xb(e,o){for(var t=Bh(e),i=-1,n=o.length;++i<n;)t.add(o[i])}function Kb(e,o){for(var t=Bh(e),i=-1,n=o.length;++i<n;)t.remove(o[i])}function _6(e){return function(){Xb(this,e)}}function E6(e){return function(){Kb(this,e)}}function k6(e,o){return function(){(o.apply(this,arguments)?Xb:Kb)(this,e)}}function Qb(e,o){var t=Ub(e+"");if(arguments.length<2){for(var i=Bh(this.node()),n=-1,r=t.length;++n<r;)if(!i.contains(t[n]))return!1;return!0}return this.each((typeof o=="function"?k6:o?_6:E6)(t,o))}function q6(){this.textContent=""}function T6(e){return function(){this.textContent=e}}function R6(e){return function(){var o=e.apply(this,arguments);this.textContent=o??""}}function Yb(e){return arguments.length?this.each(e==null?q6:(typeof e=="function"?R6:T6)(e)):this.node().textContent}function A6(){this.innerHTML=""}function I6(e){return function(){this.innerHTML=e}}function F6(e){return function(){var o=e.apply(this,arguments);this.innerHTML=o??""}}function Zb(e){return arguments.length?this.each(e==null?A6:(typeof e=="function"?F6:I6)(e)):this.node().innerHTML}function L6(){this.nextSibling&&this.parentNode.appendChild(this)}function Jb(){return this.each(L6)}function D6(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function e3(){return this.each(D6)}function t3(e){var o=typeof e=="function"?e:Ql(e);return this.select(function(){return this.appendChild(o.apply(this,arguments))})}function P6(){return null}function i3(e,o){var t=typeof e=="function"?e:Ql(e),i=o==null?P6:typeof o=="function"?o:rn(o);return this.select(function(){return this.insertBefore(t.apply(this,arguments),i.apply(this,arguments)||null)})}function N6(){var e=this.parentNode;e&&e.removeChild(this)}function o3(){return this.each(N6)}function V6(){var e=this.cloneNode(!1),o=this.parentNode;return o?o.insertBefore(e,this.nextSibling):e}function B6(){var e=this.cloneNode(!0),o=this.parentNode;return o?o.insertBefore(e,this.nextSibling):e}function n3(e){return this.select(e?B6:V6)}function r3(e){return arguments.length?this.property("__data__",e):this.node().__data__}function W6(e){return function(o){e.call(this,o,this.__data__)}}function O6(e){return e.trim().split(/^|\s+/).map(function(o){var t="",i=o.indexOf(".");return i>=0&&(t=o.slice(i+1),o=o.slice(0,i)),{type:o,name:t}})}function z6(e){return function(){var o=this.__on;if(o){for(var t=0,i=-1,n=o.length,r;t<n;++t)r=o[t],(!e.type||r.type===e.type)&&r.name===e.name?this.removeEventListener(r.type,r.listener,r.options):o[++i]=r;++i?o.length=i:delete this.__on}}}function $6(e,o,t){return function(){var i=this.__on,n,r=W6(o);if(i){for(var a=0,s=i.length;a<s;++a)if((n=i[a]).type===e.type&&n.name===e.name){this.removeEventListener(n.type,n.listener,n.options),this.addEventListener(n.type,n.listener=r,n.options=t),n.value=o;return}}this.addEventListener(e.type,r,t),n={type:e.type,name:e.name,value:o,listener:r,options:t},i?i.push(n):this.__on=[n]}}function a3(e,o,t){var i=O6(e+""),n,r=i.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var l=0,d=s.length,c;l<d;++l)for(n=0,c=s[l];n<r;++n)if((a=i[n]).type===c.type&&a.name===c.name)return c.value}return}for(s=o?$6:z6,n=0;n<r;++n)this.each(s(i[n],o,t));return this}function s3(e,o,t){var i=Jl(e),n=i.CustomEvent;typeof n=="function"?n=new n(o,t):(n=i.document.createEvent("Event"),t?(n.initEvent(o,t.bubbles,t.cancelable),n.detail=t.detail):n.initEvent(o,!1,!1)),e.dispatchEvent(n)}function j6(e,o){return function(){return s3(this,e,o)}}function H6(e,o){return function(){return s3(this,e,o.apply(this,arguments))}}function l3(e,o){return this.each((typeof o=="function"?H6:j6)(e,o))}function*c3(){for(var e=this._groups,o=0,t=e.length;o<t;++o)for(var i=e[o],n=0,r=i.length,a;n<r;++n)(a=i[n])&&(yield a)}var Wh=[null];function ht(e,o){this._groups=e,this._parents=o}function d3(){return new ht([[document.documentElement]],Wh)}function U6(){return this}ht.prototype=d3.prototype={constructor:ht,select:Mb,selectAll:_b,selectChild:Eb,selectChildren:kb,filter:qb,data:Ab,enter:Tb,exit:Ib,join:Fb,merge:Lb,selection:U6,order:Db,sort:Pb,call:Nb,nodes:Vb,node:Bb,size:Wb,empty:Ob,each:zb,attr:$b,style:jb,property:Hb,classed:Qb,text:Yb,html:Zb,raise:Jb,lower:e3,append:t3,insert:i3,remove:o3,clone:n3,datum:r3,on:a3,dispatch:l3,[Symbol.iterator]:c3};var Xi=d3;function Oh(e){return typeof e=="string"?new ht([[document.querySelector(e)]],[document.documentElement]):new ht([[e]],Wh)}function h3(e){let o;for(;o=e.sourceEvent;)e=o;return e}function zh(e,o){if(e=h3(e),o===void 0&&(o=e.currentTarget),o){var t=o.ownerSVGElement||o;if(t.createSVGPoint){var i=t.createSVGPoint();return i.x=e.clientX,i.y=e.clientY,i=i.matrixTransform(o.getScreenCTM().inverse()),[i.x,i.y]}if(o.getBoundingClientRect){var n=o.getBoundingClientRect();return[e.clientX-n.left-o.clientLeft,e.clientY-n.top-o.clientTop]}}return[e.pageX,e.pageY]}function ec(e,o,t){e.prototype=o.prototype=t,t.constructor=e}function $h(e,o){var t=Object.create(e.prototype);for(var i in o)t[i]=o[i];return t}function ca(){}var sa=.7,oc=1/sa,Mr="\\s*([+-]?\\d+)\\s*",la="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",zi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",G6=/^#([0-9a-f]{3,8})$/,X6=new RegExp(`^rgb\\(${Mr},${Mr},${Mr}\\)$`),K6=new RegExp(`^rgb\\(${zi},${zi},${zi}\\)$`),Q6=new RegExp(`^rgba\\(${Mr},${Mr},${Mr},${la}\\)$`),Y6=new RegExp(`^rgba\\(${zi},${zi},${zi},${la}\\)$`),Z6=new RegExp(`^hsl\\(${la},${zi},${zi}\\)$`),J6=new RegExp(`^hsla\\(${la},${zi},${zi},${la}\\)$`),u3={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};ec(ca,bi,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:m3,formatHex:m3,formatHex8:e8,formatHsl:t8,formatRgb:p3,toString:p3});function m3(){return this.rgb().formatHex()}function e8(){return this.rgb().formatHex8()}function t8(){return w3(this).formatHsl()}function p3(){return this.rgb().formatRgb()}function bi(e){var o,t;return e=(e+"").trim().toLowerCase(),(o=G6.exec(e))?(t=o[1].length,o=parseInt(o[1],16),t===6?f3(o):t===3?new Wt(o>>8&15|o>>4&240,o>>4&15|o&240,(o&15)<<4|o&15,1):t===8?tc(o>>24&255,o>>16&255,o>>8&255,(o&255)/255):t===4?tc(o>>12&15|o>>8&240,o>>8&15|o>>4&240,o>>4&15|o&240,((o&15)<<4|o&15)/255):null):(o=X6.exec(e))?new Wt(o[1],o[2],o[3],1):(o=K6.exec(e))?new Wt(o[1]*255/100,o[2]*255/100,o[3]*255/100,1):(o=Q6.exec(e))?tc(o[1],o[2],o[3],o[4]):(o=Y6.exec(e))?tc(o[1]*255/100,o[2]*255/100,o[3]*255/100,o[4]):(o=Z6.exec(e))?v3(o[1],o[2]/100,o[3]/100,1):(o=J6.exec(e))?v3(o[1],o[2]/100,o[3]/100,o[4]):u3.hasOwnProperty(e)?f3(u3[e]):e==="transparent"?new Wt(NaN,NaN,NaN,0):null}function f3(e){return new Wt(e>>16&255,e>>8&255,e&255,1)}function tc(e,o,t,i){return i<=0&&(e=o=t=NaN),new Wt(e,o,t,i)}function i8(e){return e instanceof ca||(e=bi(e)),e?(e=e.rgb(),new Wt(e.r,e.g,e.b,e.opacity)):new Wt}function _r(e,o,t,i){return arguments.length===1?i8(e):new Wt(e,o,t,i??1)}function Wt(e,o,t,i){this.r=+e,this.g=+o,this.b=+t,this.opacity=+i}ec(Wt,_r,$h(ca,{brighter(e){return e=e==null?oc:Math.pow(oc,e),new Wt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?sa:Math.pow(sa,e),new Wt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Wt(sn(this.r),sn(this.g),sn(this.b),nc(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:g3,formatHex:g3,formatHex8:o8,formatRgb:b3,toString:b3}));function g3(){return`#${an(this.r)}${an(this.g)}${an(this.b)}`}function o8(){return`#${an(this.r)}${an(this.g)}${an(this.b)}${an((isNaN(this.opacity)?1:this.opacity)*255)}`}function b3(){let e=nc(this.opacity);return`${e===1?"rgb(":"rgba("}${sn(this.r)}, ${sn(this.g)}, ${sn(this.b)}${e===1?")":`, ${e})`}`}function nc(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function sn(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function an(e){return e=sn(e),(e<16?"0":"")+e.toString(16)}function v3(e,o,t,i){return i<=0?e=o=t=NaN:t<=0||t>=1?e=o=NaN:o<=0&&(e=NaN),new gi(e,o,t,i)}function w3(e){if(e instanceof gi)return new gi(e.h,e.s,e.l,e.opacity);if(e instanceof ca||(e=bi(e)),!e)return new gi;if(e instanceof gi)return e;e=e.rgb();var o=e.r/255,t=e.g/255,i=e.b/255,n=Math.min(o,t,i),r=Math.max(o,t,i),a=NaN,s=r-n,l=(r+n)/2;return s?(o===r?a=(t-i)/s+(t<i)*6:t===r?a=(i-o)/s+2:a=(o-t)/s+4,s/=l<.5?r+n:2-r-n,a*=60):s=l>0&&l<1?0:a,new gi(a,s,l,e.opacity)}function y3(e,o,t,i){return arguments.length===1?w3(e):new gi(e,o,t,i??1)}function gi(e,o,t,i){this.h=+e,this.s=+o,this.l=+t,this.opacity=+i}ec(gi,y3,$h(ca,{brighter(e){return e=e==null?oc:Math.pow(oc,e),new gi(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?sa:Math.pow(sa,e),new gi(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,o=isNaN(e)||isNaN(this.s)?0:this.s,t=this.l,i=t+(t<.5?t:1-t)*o,n=2*t-i;return new Wt(jh(e>=240?e-240:e+120,n,i),jh(e,n,i),jh(e<120?e+240:e-120,n,i),this.opacity)},clamp(){return new gi(x3(this.h),ic(this.s),ic(this.l),nc(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=nc(this.opacity);return`${e===1?"hsl(":"hsla("}${x3(this.h)}, ${ic(this.s)*100}%, ${ic(this.l)*100}%${e===1?")":`, ${e})`}`}}));function x3(e){return e=(e||0)%360,e<0?e+360:e}function ic(e){return Math.max(0,Math.min(1,e||0))}function jh(e,o,t){return(e<60?o+(t-o)*e/60:e<180?t:e<240?o+(t-o)*(240-e)/60:o)*255}function Hh(e,o,t,i,n){var r=e*e,a=r*e;return((1-3*e+3*r-a)*o+(4-6*r+3*a)*t+(1+3*e+3*r-3*a)*i+a*n)/6}function S3(e){var o=e.length-1;return function(t){var i=t<=0?t=0:t>=1?(t=1,o-1):Math.floor(t*o),n=e[i],r=e[i+1],a=i>0?e[i-1]:2*n-r,s=i<o-1?e[i+2]:2*r-n;return Hh((t-i/o)*o,a,n,r,s)}}function C3(e){var o=e.length;return function(t){var i=Math.floor(((t%=1)<0?++t:t)*o),n=e[(i+o-1)%o],r=e[i%o],a=e[(i+1)%o],s=e[(i+2)%o];return Hh((t-i/o)*o,n,r,a,s)}}var da=e=>()=>e;function n8(e,o){return function(t){return e+t*o}}function r8(e,o,t){return e=Math.pow(e,t),o=Math.pow(o,t)-e,t=1/t,function(i){return Math.pow(e+i*o,t)}}function M3(e){return(e=+e)==1?rc:function(o,t){return t-o?r8(o,t,e):da(isNaN(o)?t:o)}}function rc(e,o){var t=o-e;return t?n8(e,t):da(isNaN(e)?o:e)}var ln=(function e(o){var t=M3(o);function i(n,r){var a=t((n=_r(n)).r,(r=_r(r)).r),s=t(n.g,r.g),l=t(n.b,r.b),d=rc(n.opacity,r.opacity);return function(c){return n.r=a(c),n.g=s(c),n.b=l(c),n.opacity=d(c),n+""}}return i.gamma=e,i})(1);function _3(e){return function(o){var t=o.length,i=new Array(t),n=new Array(t),r=new Array(t),a,s;for(a=0;a<t;++a)s=_r(o[a]),i[a]=s.r||0,n[a]=s.g||0,r[a]=s.b||0;return i=e(i),n=e(n),r=e(r),s.opacity=1,function(l){return s.r=i(l),s.g=n(l),s.b=r(l),s+""}}}var a8=_3(S3),s8=_3(C3);function E3(e,o){o||(o=[]);var t=e?Math.min(o.length,e.length):0,i=o.slice(),n;return function(r){for(n=0;n<t;++n)i[n]=e[n]*(1-r)+o[n]*r;return i}}function k3(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function q3(e,o){var t=o?o.length:0,i=e?Math.min(t,e.length):0,n=new Array(i),r=new Array(t),a;for(a=0;a<i;++a)n[a]=cn(e[a],o[a]);for(;a<t;++a)r[a]=o[a];return function(s){for(a=0;a<i;++a)r[a]=n[a](s);return r}}function T3(e,o){var t=new Date;return e=+e,o=+o,function(i){return t.setTime(e*(1-i)+o*i),t}}function yt(e,o){return e=+e,o=+o,function(t){return e*(1-t)+o*t}}function R3(e,o){var t={},i={},n;(e===null||typeof e!="object")&&(e={}),(o===null||typeof o!="object")&&(o={});for(n in o)n in e?t[n]=cn(e[n],o[n]):i[n]=o[n];return function(r){for(n in t)i[n]=t[n](r);return i}}var Gh=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Uh=new RegExp(Gh.source,"g");function l8(e){return function(){return e}}function c8(e){return function(o){return e(o)+""}}function ha(e,o){var t=Gh.lastIndex=Uh.lastIndex=0,i,n,r,a=-1,s=[],l=[];for(e=e+"",o=o+"";(i=Gh.exec(e))&&(n=Uh.exec(o));)(r=n.index)>t&&(r=o.slice(t,r),s[a]?s[a]+=r:s[++a]=r),(i=i[0])===(n=n[0])?s[a]?s[a]+=n:s[++a]=n:(s[++a]=null,l.push({i:a,x:yt(i,n)})),t=Uh.lastIndex;return t<o.length&&(r=o.slice(t),s[a]?s[a]+=r:s[++a]=r),s.length<2?l[0]?c8(l[0].x):l8(o):(o=l.length,function(d){for(var c=0,u;c<o;++c)s[(u=l[c]).i]=u.x(d);return s.join("")})}function cn(e,o){var t=typeof o,i;return o==null||t==="boolean"?da(o):(t==="number"?yt:t==="string"?(i=bi(o))?(o=i,ln):ha:o instanceof bi?ln:o instanceof Date?T3:k3(o)?E3:Array.isArray(o)?q3:typeof o.valueOf!="function"&&typeof o.toString!="function"||isNaN(o)?R3:yt)(e,o)}function Xh(e,o){return e=+e,o=+o,function(t){return Math.round(e*(1-t)+o*t)}}var A3=180/Math.PI,ac={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Kh(e,o,t,i,n,r){var a,s,l;return(a=Math.sqrt(e*e+o*o))&&(e/=a,o/=a),(l=e*t+o*i)&&(t-=e*l,i-=o*l),(s=Math.sqrt(t*t+i*i))&&(t/=s,i/=s,l/=s),e*i<o*t&&(e=-e,o=-o,l=-l,a=-a),{translateX:n,translateY:r,rotate:Math.atan2(o,e)*A3,skewX:Math.atan(l)*A3,scaleX:a,scaleY:s}}var sc;function I3(e){let o=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return o.isIdentity?ac:Kh(o.a,o.b,o.c,o.d,o.e,o.f)}function F3(e){return e==null?ac:(sc||(sc=document.createElementNS("http://www.w3.org/2000/svg","g")),sc.setAttribute("transform",e),(e=sc.transform.baseVal.consolidate())?(e=e.matrix,Kh(e.a,e.b,e.c,e.d,e.e,e.f)):ac)}function L3(e,o,t,i){function n(d){return d.length?d.pop()+" ":""}function r(d,c,u,m,g,b){if(d!==u||c!==m){var y=g.push("translate(",null,o,null,t);b.push({i:y-4,x:yt(d,u)},{i:y-2,x:yt(c,m)})}else(u||m)&&g.push("translate("+u+o+m+t)}function a(d,c,u,m){d!==c?(d-c>180?c+=360:c-d>180&&(d+=360),m.push({i:u.push(n(u)+"rotate(",null,i)-2,x:yt(d,c)})):c&&u.push(n(u)+"rotate("+c+i)}function s(d,c,u,m){d!==c?m.push({i:u.push(n(u)+"skewX(",null,i)-2,x:yt(d,c)}):c&&u.push(n(u)+"skewX("+c+i)}function l(d,c,u,m,g,b){if(d!==u||c!==m){var y=g.push(n(g)+"scale(",null,",",null,")");b.push({i:y-4,x:yt(d,u)},{i:y-2,x:yt(c,m)})}else(u!==1||m!==1)&&g.push(n(g)+"scale("+u+","+m+")")}return function(d,c){var u=[],m=[];return d=e(d),c=e(c),r(d.translateX,d.translateY,c.translateX,c.translateY,u,m),a(d.rotate,c.rotate,u,m),s(d.skewX,c.skewX,u,m),l(d.scaleX,d.scaleY,c.scaleX,c.scaleY,u,m),d=c=null,function(g){for(var b=-1,y=m.length,q;++b<y;)u[(q=m[b]).i]=q.x(g);return u.join("")}}}var Qh=L3(I3,"px, ","px)","deg)"),Yh=L3(F3,", ",")",")");var Er=0,ma=0,ua=0,P3=1e3,lc,pa,cc=0,dn=0,dc=0,fa=typeof performance=="object"&&performance.now?performance:Date,N3=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function ba(){return dn||(N3(d8),dn=fa.now()+dc)}function d8(){dn=0}function ga(){this._call=this._time=this._next=null}ga.prototype=hc.prototype={constructor:ga,restart:function(e,o,t){if(typeof e!="function")throw new TypeError("callback is not a function");t=(t==null?ba():+t)+(o==null?0:+o),!this._next&&pa!==this&&(pa?pa._next=this:lc=this,pa=this),this._call=e,this._time=t,Zh()},stop:function(){this._call&&(this._call=null,this._time=1/0,Zh())}};function hc(e,o,t){var i=new ga;return i.restart(e,o,t),i}function V3(){ba(),++Er;for(var e=lc,o;e;)(o=dn-e._time)>=0&&e._call.call(void 0,o),e=e._next;--Er}function D3(){dn=(cc=fa.now())+dc,Er=ma=0;try{V3()}finally{Er=0,u8(),dn=0}}function h8(){var e=fa.now(),o=e-cc;o>P3&&(dc-=o,cc=e)}function u8(){for(var e,o=lc,t,i=1/0;o;)o._call?(i>o._time&&(i=o._time),e=o,o=o._next):(t=o._next,o._next=null,o=e?e._next=t:lc=t);pa=e,Zh(i)}function Zh(e){if(!Er){ma&&(ma=clearTimeout(ma));var o=e-dn;o>24?(e<1/0&&(ma=setTimeout(D3,e-fa.now()-dc)),ua&&(ua=clearInterval(ua))):(ua||(cc=fa.now(),ua=setInterval(h8,P3)),Er=1,N3(D3))}}function uc(e,o,t){var i=new ga;return o=o==null?0:+o,i.restart(n=>{i.stop(),e(n+o)},o,t),i}var m8=Ph("start","end","cancel","interrupt"),p8=[],O3=0,B3=1,pc=2,mc=3,W3=4,fc=5,va=6;function Fo(e,o,t,i,n,r){var a=e.__transition;if(!a)e.__transition={};else if(t in a)return;f8(e,t,{name:o,index:i,group:n,on:m8,tween:p8,time:r.time,delay:r.delay,duration:r.duration,ease:r.ease,timer:null,state:O3})}function xa(e,o){var t=ft(e,o);if(t.state>O3)throw new Error("too late; already scheduled");return t}function St(e,o){var t=ft(e,o);if(t.state>mc)throw new Error("too late; already running");return t}function ft(e,o){var t=e.__transition;if(!t||!(t=t[o]))throw new Error("transition not found");return t}function f8(e,o,t){var i=e.__transition,n;i[o]=t,t.timer=hc(r,0,t.time);function r(d){t.state=B3,t.timer.restart(a,t.delay,t.time),t.delay<=d&&a(d-t.delay)}function a(d){var c,u,m,g;if(t.state!==B3)return l();for(c in i)if(g=i[c],g.name===t.name){if(g.state===mc)return uc(a);g.state===W3?(g.state=va,g.timer.stop(),g.on.call("interrupt",e,e.__data__,g.index,g.group),delete i[c]):+c<o&&(g.state=va,g.timer.stop(),g.on.call("cancel",e,e.__data__,g.index,g.group),delete i[c])}if(uc(function(){t.state===mc&&(t.state=W3,t.timer.restart(s,t.delay,t.time),s(d))}),t.state=pc,t.on.call("start",e,e.__data__,t.index,t.group),t.state===pc){for(t.state=mc,n=new Array(m=t.tween.length),c=0,u=-1;c<m;++c)(g=t.tween[c].value.call(e,e.__data__,t.index,t.group))&&(n[++u]=g);n.length=u+1}}function s(d){for(var c=d<t.duration?t.ease.call(null,d/t.duration):(t.timer.restart(l),t.state=fc,1),u=-1,m=n.length;++u<m;)n[u].call(e,c);t.state===fc&&(t.on.call("end",e,e.__data__,t.index,t.group),l())}function l(){t.state=va,t.timer.stop(),delete i[o];for(var d in i)return;delete e.__transition}}function gc(e,o){var t=e.__transition,i,n,r=!0,a;if(t){o=o==null?null:o+"";for(a in t){if((i=t[a]).name!==o){r=!1;continue}n=i.state>pc&&i.state<fc,i.state=va,i.timer.stop(),i.on.call(n?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete t[a]}r&&delete e.__transition}}function z3(e){return this.each(function(){gc(this,e)})}function g8(e,o){var t,i;return function(){var n=St(this,e),r=n.tween;if(r!==t){i=t=r;for(var a=0,s=i.length;a<s;++a)if(i[a].name===o){i=i.slice(),i.splice(a,1);break}}n.tween=i}}function b8(e,o,t){var i,n;if(typeof t!="function")throw new Error;return function(){var r=St(this,e),a=r.tween;if(a!==i){n=(i=a).slice();for(var s={name:o,value:t},l=0,d=n.length;l<d;++l)if(n[l].name===o){n[l]=s;break}l===d&&n.push(s)}r.tween=n}}function $3(e,o){var t=this._id;if(e+="",arguments.length<2){for(var i=ft(this.node(),t).tween,n=0,r=i.length,a;n<r;++n)if((a=i[n]).name===e)return a.value;return null}return this.each((o==null?g8:b8)(t,e,o))}function kr(e,o,t){var i=e._id;return e.each(function(){var n=St(this,i);(n.value||(n.value={}))[o]=t.apply(this,arguments)}),function(n){return ft(n,i).value[o]}}function bc(e,o){var t;return(typeof o=="number"?yt:o instanceof bi?ln:(t=bi(o))?(o=t,ln):ha)(e,o)}function v8(e){return function(){this.removeAttribute(e)}}function x8(e){return function(){this.removeAttributeNS(e.space,e.local)}}function w8(e,o,t){var i,n=t+"",r;return function(){var a=this.getAttribute(e);return a===n?null:a===i?r:r=o(i=a,t)}}function y8(e,o,t){var i,n=t+"",r;return function(){var a=this.getAttributeNS(e.space,e.local);return a===n?null:a===i?r:r=o(i=a,t)}}function S8(e,o,t){var i,n,r;return function(){var a,s=t(this),l;return s==null?void this.removeAttribute(e):(a=this.getAttribute(e),l=s+"",a===l?null:a===i&&l===n?r:(n=l,r=o(i=a,s)))}}function C8(e,o,t){var i,n,r;return function(){var a,s=t(this),l;return s==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),l=s+"",a===l?null:a===i&&l===n?r:(n=l,r=o(i=a,s)))}}function j3(e,o){var t=Gi(e),i=t==="transform"?Yh:bc;return this.attrTween(e,typeof o=="function"?(t.local?C8:S8)(t,i,kr(this,"attr."+e,o)):o==null?(t.local?x8:v8)(t):(t.local?y8:w8)(t,i,o))}function M8(e,o){return function(t){this.setAttribute(e,o.call(this,t))}}function _8(e,o){return function(t){this.setAttributeNS(e.space,e.local,o.call(this,t))}}function E8(e,o){var t,i;function n(){var r=o.apply(this,arguments);return r!==i&&(t=(i=r)&&_8(e,r)),t}return n._value=o,n}function k8(e,o){var t,i;function n(){var r=o.apply(this,arguments);return r!==i&&(t=(i=r)&&M8(e,r)),t}return n._value=o,n}function H3(e,o){var t="attr."+e;if(arguments.length<2)return(t=this.tween(t))&&t._value;if(o==null)return this.tween(t,null);if(typeof o!="function")throw new Error;var i=Gi(e);return this.tween(t,(i.local?E8:k8)(i,o))}function q8(e,o){return function(){xa(this,e).delay=+o.apply(this,arguments)}}function T8(e,o){return o=+o,function(){xa(this,e).delay=o}}function U3(e){var o=this._id;return arguments.length?this.each((typeof e=="function"?q8:T8)(o,e)):ft(this.node(),o).delay}function R8(e,o){return function(){St(this,e).duration=+o.apply(this,arguments)}}function A8(e,o){return o=+o,function(){St(this,e).duration=o}}function G3(e){var o=this._id;return arguments.length?this.each((typeof e=="function"?R8:A8)(o,e)):ft(this.node(),o).duration}function I8(e,o){if(typeof o!="function")throw new Error;return function(){St(this,e).ease=o}}function X3(e){var o=this._id;return arguments.length?this.each(I8(o,e)):ft(this.node(),o).ease}function F8(e,o){return function(){var t=o.apply(this,arguments);if(typeof t!="function")throw new Error;St(this,e).ease=t}}function K3(e){if(typeof e!="function")throw new Error;return this.each(F8(this._id,e))}function Q3(e){typeof e!="function"&&(e=ra(e));for(var o=this._groups,t=o.length,i=new Array(t),n=0;n<t;++n)for(var r=o[n],a=r.length,s=i[n]=[],l,d=0;d<a;++d)(l=r[d])&&e.call(l,l.__data__,d,r)&&s.push(l);return new Ft(i,this._parents,this._name,this._id)}function Y3(e){if(e._id!==this._id)throw new Error;for(var o=this._groups,t=e._groups,i=o.length,n=t.length,r=Math.min(i,n),a=new Array(i),s=0;s<r;++s)for(var l=o[s],d=t[s],c=l.length,u=a[s]=new Array(c),m,g=0;g<c;++g)(m=l[g]||d[g])&&(u[g]=m);for(;s<i;++s)a[s]=o[s];return new Ft(a,this._parents,this._name,this._id)}function L8(e){return(e+"").trim().split(/^|\s+/).every(function(o){var t=o.indexOf(".");return t>=0&&(o=o.slice(0,t)),!o||o==="start"})}function D8(e,o,t){var i,n,r=L8(o)?xa:St;return function(){var a=r(this,e),s=a.on;s!==i&&(n=(i=s).copy()).on(o,t),a.on=n}}function Z3(e,o){var t=this._id;return arguments.length<2?ft(this.node(),t).on.on(e):this.each(D8(t,e,o))}function P8(e){return function(){var o=this.parentNode;for(var t in this.__transition)if(+t!==e)return;o&&o.removeChild(this)}}function J3(){return this.on("end.remove",P8(this._id))}function ev(e){var o=this._name,t=this._id;typeof e!="function"&&(e=rn(e));for(var i=this._groups,n=i.length,r=new Array(n),a=0;a<n;++a)for(var s=i[a],l=s.length,d=r[a]=new Array(l),c,u,m=0;m<l;++m)(c=s[m])&&(u=e.call(c,c.__data__,m,s))&&("__data__"in c&&(u.__data__=c.__data__),d[m]=u,Fo(d[m],o,t,m,d,ft(c,t)));return new Ft(r,this._parents,o,t)}function tv(e){var o=this._name,t=this._id;typeof e!="function"&&(e=na(e));for(var i=this._groups,n=i.length,r=[],a=[],s=0;s<n;++s)for(var l=i[s],d=l.length,c,u=0;u<d;++u)if(c=l[u]){for(var m=e.call(c,c.__data__,u,l),g,b=ft(c,t),y=0,q=m.length;y<q;++y)(g=m[y])&&Fo(g,o,t,y,m,b);r.push(m),a.push(c)}return new Ft(r,a,o,t)}var N8=Xi.prototype.constructor;function iv(){return new N8(this._groups,this._parents)}function V8(e,o){var t,i,n;return function(){var r=Io(this,e),a=(this.style.removeProperty(e),Io(this,e));return r===a?null:r===t&&a===i?n:n=o(t=r,i=a)}}function ov(e){return function(){this.style.removeProperty(e)}}function B8(e,o,t){var i,n=t+"",r;return function(){var a=Io(this,e);return a===n?null:a===i?r:r=o(i=a,t)}}function W8(e,o,t){var i,n,r;return function(){var a=Io(this,e),s=t(this),l=s+"";return s==null&&(l=s=(this.style.removeProperty(e),Io(this,e))),a===l?null:a===i&&l===n?r:(n=l,r=o(i=a,s))}}function O8(e,o){var t,i,n,r="style."+o,a="end."+r,s;return function(){var l=St(this,e),d=l.on,c=l.value[r]==null?s||(s=ov(o)):void 0;(d!==t||n!==c)&&(i=(t=d).copy()).on(a,n=c),l.on=i}}function nv(e,o,t){var i=(e+="")=="transform"?Qh:bc;return o==null?this.styleTween(e,V8(e,i)).on("end.style."+e,ov(e)):typeof o=="function"?this.styleTween(e,W8(e,i,kr(this,"style."+e,o))).each(O8(this._id,e)):this.styleTween(e,B8(e,i,o),t).on("end.style."+e,null)}function z8(e,o,t){return function(i){this.style.setProperty(e,o.call(this,i),t)}}function $8(e,o,t){var i,n;function r(){var a=o.apply(this,arguments);return a!==n&&(i=(n=a)&&z8(e,a,t)),i}return r._value=o,r}function rv(e,o,t){var i="style."+(e+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(o==null)return this.tween(i,null);if(typeof o!="function")throw new Error;return this.tween(i,$8(e,o,t??""))}function j8(e){return function(){this.textContent=e}}function H8(e){return function(){var o=e(this);this.textContent=o??""}}function av(e){return this.tween("text",typeof e=="function"?H8(kr(this,"text",e)):j8(e==null?"":e+""))}function U8(e){return function(o){this.textContent=e.call(this,o)}}function G8(e){var o,t;function i(){var n=e.apply(this,arguments);return n!==t&&(o=(t=n)&&U8(n)),o}return i._value=e,i}function sv(e){var o="text";if(arguments.length<1)return(o=this.tween(o))&&o._value;if(e==null)return this.tween(o,null);if(typeof e!="function")throw new Error;return this.tween(o,G8(e))}function lv(){for(var e=this._name,o=this._id,t=vc(),i=this._groups,n=i.length,r=0;r<n;++r)for(var a=i[r],s=a.length,l,d=0;d<s;++d)if(l=a[d]){var c=ft(l,o);Fo(l,e,t,d,a,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Ft(i,this._parents,e,t)}function cv(){var e,o,t=this,i=t._id,n=t.size();return new Promise(function(r,a){var s={value:a},l={value:function(){--n===0&&r()}};t.each(function(){var d=St(this,i),c=d.on;c!==e&&(o=(e=c).copy(),o._.cancel.push(s),o._.interrupt.push(s),o._.end.push(l)),d.on=o}),n===0&&r()})}var X8=0;function Ft(e,o,t,i){this._groups=e,this._parents=o,this._name=t,this._id=i}function dv(e){return Xi().transition(e)}function vc(){return++X8}var Ki=Xi.prototype;Ft.prototype=dv.prototype={constructor:Ft,select:ev,selectAll:tv,selectChild:Ki.selectChild,selectChildren:Ki.selectChildren,filter:Q3,merge:Y3,selection:iv,transition:lv,call:Ki.call,nodes:Ki.nodes,node:Ki.node,size:Ki.size,empty:Ki.empty,each:Ki.each,on:Z3,attr:j3,attrTween:H3,style:nv,styleTween:rv,text:av,textTween:sv,remove:J3,tween:$3,delay:U3,duration:G3,ease:X3,easeVarying:K3,end:cv,[Symbol.iterator]:Ki[Symbol.iterator]};function xc(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var K8={time:null,delay:0,duration:250,ease:xc};function Q8(e,o){for(var t;!(t=e.__transition)||!(t=t[o]);)if(!(e=e.parentNode))throw new Error(`transition ${o} not found`);return t}function hv(e){var o,t;e instanceof Ft?(o=e._id,e=e._name):(o=vc(),(t=K8).time=ba(),e=e==null?null:e+"");for(var i=this._groups,n=i.length,r=0;r<n;++r)for(var a=i[r],s=a.length,l,d=0;d<s;++d)(l=a[d])&&Fo(l,e,o,d,a,t||Q8(l,o));return new Ft(i,this._parents,e,o)}Xi.prototype.interrupt=z3;Xi.prototype.transition=hv;var{abs:Xz,max:Kz,min:Qz}=Math;function uv(e){return[+e[0],+e[1]]}function Y8(e){return[uv(e[0]),uv(e[1])]}var Yz={name:"x",handles:["w","e"].map(Jh),input:function(e,o){return e==null?null:[[+e[0],o[0][1]],[+e[1],o[1][1]]]},output:function(e){return e&&[e[0][0],e[1][0]]}},Zz={name:"y",handles:["n","s"].map(Jh),input:function(e,o){return e==null?null:[[o[0][0],+e[0]],[o[1][0],+e[1]]]},output:function(e){return e&&[e[0][1],e[1][1]]}},Jz={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(Jh),input:function(e){return e==null?null:Y8(e)},output:function(e){return e}};function Jh(e){return{type:e}}var eu=Math.PI,tu=2*eu,hn=1e-6,Z8=tu-hn;function mv(e){this._+=e[0];for(let o=1,t=e.length;o<t;++o)this._+=arguments[o]+e[o]}function J8(e){let o=Math.floor(e);if(!(o>=0))throw new Error(`invalid digits: ${e}`);if(o>15)return mv;let t=10**o;return function(i){this._+=i[0];for(let n=1,r=i.length;n<r;++n)this._+=Math.round(arguments[n]*t)/t+i[n]}}var un=class{constructor(o){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=o==null?mv:J8(o)}moveTo(o,t){this._append`M${this._x0=this._x1=+o},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(o,t){this._append`L${this._x1=+o},${this._y1=+t}`}quadraticCurveTo(o,t,i,n){this._append`Q${+o},${+t},${this._x1=+i},${this._y1=+n}`}bezierCurveTo(o,t,i,n,r,a){this._append`C${+o},${+t},${+i},${+n},${this._x1=+r},${this._y1=+a}`}arcTo(o,t,i,n,r){if(o=+o,t=+t,i=+i,n=+n,r=+r,r<0)throw new Error(`negative radius: ${r}`);let a=this._x1,s=this._y1,l=i-o,d=n-t,c=a-o,u=s-t,m=c*c+u*u;if(this._x1===null)this._append`M${this._x1=o},${this._y1=t}`;else if(m>hn)if(!(Math.abs(u*l-d*c)>hn)||!r)this._append`L${this._x1=o},${this._y1=t}`;else{let g=i-a,b=n-s,y=l*l+d*d,q=g*g+b*b,D=Math.sqrt(y),j=Math.sqrt(m),k=r*Math.tan((eu-Math.acos((y+m-q)/(2*D*j)))/2),N=k/j,z=k/D;Math.abs(N-1)>hn&&this._append`L${o+N*c},${t+N*u}`,this._append`A${r},${r},0,0,${+(u*g>c*b)},${this._x1=o+z*l},${this._y1=t+z*d}`}}arc(o,t,i,n,r,a){if(o=+o,t=+t,i=+i,a=!!a,i<0)throw new Error(`negative radius: ${i}`);let s=i*Math.cos(n),l=i*Math.sin(n),d=o+s,c=t+l,u=1^a,m=a?n-r:r-n;this._x1===null?this._append`M${d},${c}`:(Math.abs(this._x1-d)>hn||Math.abs(this._y1-c)>hn)&&this._append`L${d},${c}`,i&&(m<0&&(m=m%tu+tu),m>Z8?this._append`A${i},${i},0,1,${u},${o-s},${t-l}A${i},${i},0,1,${u},${this._x1=d},${this._y1=c}`:m>hn&&this._append`A${i},${i},0,${+(m>=eu)},${u},${this._x1=o+i*Math.cos(r)},${this._y1=t+i*Math.sin(r)}`)}rect(o,t,i,n){this._append`M${this._x0=this._x1=+o},${this._y0=this._y1=+t}h${i=+i}v${+n}h${-i}Z`}toString(){return this._}};function pv(){return new un}pv.prototype=un.prototype;function fv(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function mn(e,o){if(!isFinite(e)||e===0)return null;var t=(e=o?e.toExponential(o-1):e.toExponential()).indexOf("e"),i=e.slice(0,t);return[i.length>1?i[0]+i.slice(2):i,+e.slice(t+1)]}function $i(e){return e=mn(Math.abs(e)),e?e[1]:NaN}function gv(e,o){return function(t,i){for(var n=t.length,r=[],a=0,s=e[0],l=0;n>0&&s>0&&(l+s+1>i&&(s=Math.max(1,i-l)),r.push(t.substring(n-=s,n+s)),!((l+=s+1)>i));)s=e[a=(a+1)%e.length];return r.reverse().join(o)}}function bv(e){return function(o){return o.replace(/[0-9]/g,function(t){return e[+t]})}}var e7=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Lo(e){if(!(o=e7.exec(e)))throw new Error("invalid format: "+e);var o;return new wc({fill:o[1],align:o[2],sign:o[3],symbol:o[4],zero:o[5],width:o[6],comma:o[7],precision:o[8]&&o[8].slice(1),trim:o[9],type:o[10]})}Lo.prototype=wc.prototype;function wc(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}wc.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function vv(e){e:for(var o=e.length,t=1,i=-1,n;t<o;++t)switch(e[t]){case".":i=n=t;break;case"0":i===0&&(i=t),n=t;break;default:if(!+e[t])break e;i>0&&(i=0);break}return i>0?e.slice(0,i)+e.slice(n+1):e}var wa;function xv(e,o){var t=mn(e,o);if(!t)return wa=void 0,e.toPrecision(o);var i=t[0],n=t[1],r=n-(wa=Math.max(-8,Math.min(8,Math.floor(n/3)))*3)+1,a=i.length;return r===a?i:r>a?i+new Array(r-a+1).join("0"):r>0?i.slice(0,r)+"."+i.slice(r):"0."+new Array(1-r).join("0")+mn(e,Math.max(0,o+r-1))[0]}function iu(e,o){var t=mn(e,o);if(!t)return e+"";var i=t[0],n=t[1];return n<0?"0."+new Array(-n).join("0")+i:i.length>n+1?i.slice(0,n+1)+"."+i.slice(n+1):i+new Array(n-i.length+2).join("0")}var ou={"%":(e,o)=>(e*100).toFixed(o),b:e=>Math.round(e).toString(2),c:e=>e+"",d:fv,e:(e,o)=>e.toExponential(o),f:(e,o)=>e.toFixed(o),g:(e,o)=>e.toPrecision(o),o:e=>Math.round(e).toString(8),p:(e,o)=>iu(e*100,o),r:iu,s:xv,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function nu(e){return e}var wv=Array.prototype.map,yv=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function Sv(e){var o=e.grouping===void 0||e.thousands===void 0?nu:gv(wv.call(e.grouping,Number),e.thousands+""),t=e.currency===void 0?"":e.currency[0]+"",i=e.currency===void 0?"":e.currency[1]+"",n=e.decimal===void 0?".":e.decimal+"",r=e.numerals===void 0?nu:bv(wv.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"\u2212":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function d(u,m){u=Lo(u);var g=u.fill,b=u.align,y=u.sign,q=u.symbol,D=u.zero,j=u.width,k=u.comma,N=u.precision,z=u.trim,H=u.type;H==="n"?(k=!0,H="g"):ou[H]||(N===void 0&&(N=12),z=!0,H="g"),(D||g==="0"&&b==="=")&&(D=!0,g="0",b="=");var G=(m&&m.prefix!==void 0?m.prefix:"")+(q==="$"?t:q==="#"&&/[boxX]/.test(H)?"0"+H.toLowerCase():""),Y=(q==="$"?i:/[%p]/.test(H)?a:"")+(m&&m.suffix!==void 0?m.suffix:""),X=ou[H],he=/[defgprs%]/.test(H);N=N===void 0?6:/[gprs]/.test(H)?Math.max(1,Math.min(21,N)):Math.max(0,Math.min(20,N));function Ae($){var qe=G,be=Y,Pe,Oe,ve;if(H==="c")be=X($)+be,$="";else{$=+$;var ie=$<0||1/$<0;if($=isNaN($)?l:X(Math.abs($),N),z&&($=vv($)),ie&&+$==0&&y!=="+"&&(ie=!1),qe=(ie?y==="("?y:s:y==="-"||y==="("?"":y)+qe,be=(H==="s"&&!isNaN($)&&wa!==void 0?yv[8+wa/3]:"")+be+(ie&&y==="("?")":""),he){for(Pe=-1,Oe=$.length;++Pe<Oe;)if(ve=$.charCodeAt(Pe),48>ve||ve>57){be=(ve===46?n+$.slice(Pe+1):$.slice(Pe))+be,$=$.slice(0,Pe);break}}}k&&!D&&($=o($,1/0));var Ge=qe.length+$.length+be.length,We=Ge<j?new Array(j-Ge+1).join(g):"";switch(k&&D&&($=o(We+$,We.length?j-be.length:1/0),We=""),b){case"<":$=qe+$+be+We;break;case"=":$=qe+We+$+be;break;case"^":$=We.slice(0,Ge=We.length>>1)+qe+$+be+We.slice(Ge);break;default:$=We+qe+$+be;break}return r($)}return Ae.toString=function(){return u+""},Ae}function c(u,m){var g=Math.max(-8,Math.min(8,Math.floor($i(m)/3)))*3,b=Math.pow(10,-g),y=d((u=Lo(u),u.type="f",u),{suffix:yv[8+g/3]});return function(q){return y(b*q)}}return{format:d,formatPrefix:c}}var yc,pn,Sc;ru({thousands:",",grouping:[3],currency:["$",""]});function ru(e){return yc=Sv(e),pn=yc.format,Sc=yc.formatPrefix,yc}function au(e){return Math.max(0,-$i(Math.abs(e)))}function su(e,o){return Math.max(0,Math.max(-8,Math.min(8,Math.floor($i(o)/3)))*3-$i(Math.abs(e)))}function lu(e,o){return e=Math.abs(e),o=Math.abs(o)-e,Math.max(0,$i(o)-$i(e))+1}function Cv(e,o){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(o).domain(e);break}return this}function cu(e){return function(){return e}}function du(e){return+e}var Mv=[0,1];function qr(e){return e}function hu(e,o){return(o-=e=+e)?function(t){return(t-e)/o}:cu(isNaN(o)?NaN:.5)}function t7(e,o){var t;return e>o&&(t=e,e=o,o=t),function(i){return Math.max(e,Math.min(o,i))}}function i7(e,o,t){var i=e[0],n=e[1],r=o[0],a=o[1];return n<i?(i=hu(n,i),r=t(a,r)):(i=hu(i,n),r=t(r,a)),function(s){return r(i(s))}}function o7(e,o,t){var i=Math.min(e.length,o.length)-1,n=new Array(i),r=new Array(i),a=-1;for(e[i]<e[0]&&(e=e.slice().reverse(),o=o.slice().reverse());++a<i;)n[a]=hu(e[a],e[a+1]),r[a]=t(o[a],o[a+1]);return function(s){var l=Th(e,s,1,i)-1;return r[l](n[l](s))}}function _v(e,o){return o.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function n7(){var e=Mv,o=Mv,t=cn,i,n,r,a=qr,s,l,d;function c(){var m=Math.min(e.length,o.length);return a!==qr&&(a=t7(e[0],e[m-1])),s=m>2?o7:i7,l=d=null,u}function u(m){return m==null||isNaN(m=+m)?r:(l||(l=s(e.map(i),o,t)))(i(a(m)))}return u.invert=function(m){return a(n((d||(d=s(o,e.map(i),yt)))(m)))},u.domain=function(m){return arguments.length?(e=Array.from(m,du),c()):e.slice()},u.range=function(m){return arguments.length?(o=Array.from(m),c()):o.slice()},u.rangeRound=function(m){return o=Array.from(m),t=Xh,c()},u.clamp=function(m){return arguments.length?(a=m?!0:qr,c()):a!==qr},u.interpolate=function(m){return arguments.length?(t=m,c()):t},u.unknown=function(m){return arguments.length?(r=m,u):r},function(m,g){return i=m,n=g,c()}}function uu(){return n7()(qr,qr)}function mu(e,o,t,i){var n=Rh(e,o,t),r;switch(i=Lo(i??",f"),i.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(o));return i.precision==null&&!isNaN(r=su(n,a))&&(i.precision=r),Sc(i,a)}case"":case"e":case"g":case"p":case"r":{i.precision==null&&!isNaN(r=lu(n,Math.max(Math.abs(e),Math.abs(o))))&&(i.precision=r-(i.type==="e"));break}case"f":case"%":{i.precision==null&&!isNaN(r=au(n))&&(i.precision=r-(i.type==="%")*2);break}}return pn(i)}function r7(e){var o=e.domain;return e.ticks=function(t){var i=o();return Gl(i[0],i[i.length-1],t??10)},e.tickFormat=function(t,i){var n=o();return mu(n[0],n[n.length-1],t??10,i)},e.nice=function(t){t==null&&(t=10);var i=o(),n=0,r=i.length-1,a=i[n],s=i[r],l,d,c=10;for(s<a&&(d=a,a=s,s=d,d=n,n=r,r=d);c-- >0;){if(d=ta(a,s,t),d===l)return i[n]=a,i[r]=s,o(i);if(d>0)a=Math.floor(a/d)*d,s=Math.ceil(s/d)*d;else if(d<0)a=Math.ceil(a*d)/d,s=Math.floor(s*d)/d;else break;l=d}return e},e}function Tr(){var e=uu();return e.copy=function(){return _v(e,Tr())},Cv.apply(e,arguments),r7(e)}function fn(e){return function(){return e}}function Ev(e){let o=3;return e.digits=function(t){if(!arguments.length)return o;if(t==null)o=null;else{let i=Math.floor(t);if(!(i>=0))throw new RangeError(`invalid digits: ${t}`);o=i}return e},()=>new un(o)}var bj=Array.prototype.slice;function kv(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function qv(e){this._context=e}qv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,o){switch(e=+e,o=+o,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,o):this._context.moveTo(e,o);break;case 1:this._point=2;default:this._context.lineTo(e,o);break}}};function Tv(e){return new qv(e)}function Rv(e){return e[0]}function Av(e){return e[1]}function pu(e,o){var t=fn(!0),i=null,n=Tv,r=null,a=Ev(s);e=typeof e=="function"?e:e===void 0?Rv:fn(e),o=typeof o=="function"?o:o===void 0?Av:fn(o);function s(l){var d,c=(l=kv(l)).length,u,m=!1,g;for(i==null&&(r=n(g=a())),d=0;d<=c;++d)!(d<c&&t(u=l[d],d,l))===m&&((m=!m)?r.lineStart():r.lineEnd()),m&&r.point(+e(u,d,l),+o(u,d,l));if(g)return r=null,g+""||null}return s.x=function(l){return arguments.length?(e=typeof l=="function"?l:fn(+l),s):e},s.y=function(l){return arguments.length?(o=typeof l=="function"?l:fn(+l),s):o},s.defined=function(l){return arguments.length?(t=typeof l=="function"?l:fn(!!l),s):t},s.curve=function(l){return arguments.length?(n=l,i!=null&&(r=n(i)),s):n},s.context=function(l){return arguments.length?(l==null?i=r=null:r=n(i=l),s):i},s}function Iv(e,o){this._context=e,this._t=o}Iv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,o){switch(e=+e,o=+o,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,o):this._context.moveTo(e,o);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,o),this._context.lineTo(e,o);else{var t=this._x*(1-this._t)+e*this._t;this._context.lineTo(t,this._y),this._context.lineTo(t,o)}break}}this._x=e,this._y=o}};function fu(e){return new Iv(e,0)}function Do(e,o,t){this.k=e,this.x=o,this.y=t}Do.prototype={constructor:Do,scale:function(e){return e===1?this:new Do(this.k*e,this.x,this.y)},translate:function(e,o){return e===0&o===0?this:new Do(this.k,this.x+this.k*e,this.y+this.k*o)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var gu=new Do(1,0,0);bu.prototype=Do.prototype;function bu(e){for(;!e.__zoom;)if(!(e=e.parentNode))return gu;return e.__zoom}var Fv=(()=>{class e{constructor(){this.elementRef=E(Gt),this.diagramWidth=550,this.diagramHeight=250,this.showAxisLabels=!0,this.ranksAreStale=!0,this.pendingRender=null,this.popoverAncestor=null,this.popoverToggleListener=t=>{t.newState==="open"&&this.pendingRender!==null&&this.render(this.pendingRender==="full")}}ngOnChanges(t){if(this.values.length===0)return;let i=!!(t.values||t.isAttributeDirectionInverted||t.colorMetric||t.diagramWidth||t.diagramHeight||t.showAxisLabels);if(i&&(this.ranksAreStale=!0),this.isHiddenInClosedPopover()){this.pendingRender=this.pendingRender==="full"||i?"full":"areas";return}this.render(i)}ngAfterViewInit(){this.popoverAncestor=this.elementRef.nativeElement.closest("[popover]"),this.popoverAncestor?.addEventListener("toggle",this.popoverToggleListener)}ngOnDestroy(){this.popoverAncestor?.removeEventListener("toggle",this.popoverToggleListener)}render(t){this.ranksAreStale&&(this.percentileRanks=this.isAttributeDirectionInverted?this.calculateReversedPercentileRanks(this.values):this.calculatePercentileRanks(this.values),this.updatePercentileToMetricValueMap(),this.ranksAreStale=!1),(t||!this.hasRenderedDiagram()||!this.updateAreas())&&this.renderDiagram(),this.pendingRender=null}isHiddenInClosedPopover(){let t=this.popoverAncestor??this.elementRef.nativeElement.closest("[popover]");if(!t)return!1;try{return!t.matches(":popover-open")}catch{return!1}}hasRenderedDiagram(){return!this.rangeDiagramContainer().select("svg").empty()}updateAreas(){let t=this.rangeDiagramContainer().select("g");if(t.empty()||t.select(".left-area").empty())return!1;let i=this.createXScale(),n=i(this.isAttributeDirectionInverted?this.calculateReversedPercentileFromMetricValue(this.currentRightValue):this.calculatePercentileFromMetricValue(this.currentLeftValue)),r=i(this.isAttributeDirectionInverted?this.calculateReversedPercentileFromMetricValue(this.currentLeftValue):this.calculatePercentileFromMetricValue(this.currentRightValue));return t.select(".left-area").attr("width",n).style("fill",this.isAttributeDirectionInverted?this.rightColor:this.leftColor),t.select(".middle-area").attr("x",n+this.framePadding).attr("width",r-n).style("fill",this.middleColor),t.select(".right-area").attr("x",r+this.framePadding).attr("width",this.frameWidth-2*this.framePadding-r).style("fill",this.isAttributeDirectionInverted?this.leftColor:this.rightColor),!0}updatePercentileToMetricValueMap(){this.percentileToMetricValueMap=new Map;let t=0;for(let i=0;i<=100;i++){for(;i>this.percentileRanks[t].x&&t<this.percentileRanks.length-1;)t++;this.percentileToMetricValueMap.set(i,this.percentileRanks[t].y)}}renderDiagram(){this.initializeDiagramDimesions(),this.clearDiagramContainer();let t=this.createSvg(),i=this.createGroup(t),n=this.createXScale(),r=this.createYScale();this.drawAxes(i,n,r),this.drawFrame(i),this.showAxisLabels&&this.drawLabels(i),this.drawAreas(i,n),this.drawLine(i),this.addCrossHair(i,n,r)}initializeDiagramDimesions(){this.svgWidth=this.diagramWidth,this.svgHeight=this.diagramHeight,this.frameMarginTop=10,this.frameMarginBottom=this.showAxisLabels?50:30,this.frameMarginLeft=this.showAxisLabels?50:40,this.frameMarginRight=10,this.framePadding=5,this.frameHeight=this.svgHeight-this.frameMarginTop-this.frameMarginBottom,this.frameWidth=this.svgWidth-this.frameMarginLeft-this.frameMarginRight,this.yLabelXOffset=80,this.xLabelYOffset=20}rangeDiagramContainer(){return Oh(this.elementRef.nativeElement.querySelector("#cc-range-diagram-container"))}clearDiagramContainer(){this.rangeDiagramContainer().selectAll("*").remove()}createSvg(){return this.rangeDiagramContainer().append("svg").attr("width",this.svgWidth).attr("height",this.svgHeight)}createGroup(t){return t.append("g").attr("transform",`translate(${this.frameMarginLeft}, ${this.frameMarginTop})`).attr("display","flex").attr("justify-content","center")}drawFrame(t){t.append("path").attr("d",`M 0 0
3608
3639
  h${this.frameWidth}
3609
3640
  v${this.frameHeight}
3610
3641
  h${-this.frameWidth}
3611
- v${-this.frameHeight}`).attr("fill","none").attr("stroke","#888").attr("stroke-width","1px")}drawAxes(e,i,n){e.append("g").attr("id","axis-x").attr("transform",`translate(${this.framePadding},${this.frameHeight})`).call(Dh(i).ticks(5)).attr("font-size","13px").attr("color","#888"),e.append("g").attr("id","axis-y").attr("transform",`translate(0,${this.framePadding})`).call(Ph(n).ticks(5).tickFormat(function(r){return r>=1e4?`${pn(".0f")(r/1e3)}k`:r>=1e3?`${pn(".1f")(r/1e3)}k`:r.toString()})).attr("font-size","13px").attr("color","#888")}createXScale(){return Rr().domain(Ul(this.percentileRanks,e=>e.x)).range([0,this.frameWidth-2*this.framePadding])}createYScale(){let e=[0,oa(this.percentileRanks,n=>n.y)],i=[oa(this.percentileRanks,n=>n.y),0];return Rr().domain(this.isAttributeDirectionInverted?i:e).range([this.frameHeight-2*this.framePadding,0])}drawLabels(e){e.append("text").attr("id","y-label").attr("class","y label").attr("text-anchor","middle").attr("transform","rotate(-90)").attr("x",-this.frameHeight/2-this.frameMarginTop).attr("y",this.frameMarginLeft-this.yLabelXOffset).attr("fill","#888").text(`${this.colorMetric}`),e.append("text").attr("id","x-label").attr("class","x label").attr("text-anchor","middle").attr("x",this.frameWidth/2).attr("y",this.frameHeight+this.frameMarginTop+this.xLabelYOffset).attr("fill","#888").text(`Quantiles (% of ${this.colorMetric})`)}drawAreas(e,i){let n=i(this.isAttributeDirectionInverted?this.calculateReversedPercentileFromMetricValue(this.currentRightValue):this.calculatePercentileFromMetricValue(this.currentLeftValue)),r=i(this.isAttributeDirectionInverted?this.calculateReversedPercentileFromMetricValue(this.currentLeftValue):this.calculatePercentileFromMetricValue(this.currentRightValue));e.append("rect").attr("class","left-area").attr("x",this.framePadding).attr("width",n).attr("height",this.frameHeight).style("fill",this.isAttributeDirectionInverted?this.rightColor:this.leftColor).style("fill-opacity","0.3"),e.append("rect").attr("class","middle-area").attr("x",n+this.framePadding).attr("width",r-n).attr("height",this.frameHeight).style("fill",this.middleColor).style("fill-opacity","0.3"),e.append("rect").attr("class","right-area").attr("x",r+this.framePadding).attr("width",this.frameWidth-2*this.framePadding-r).attr("height",this.frameHeight).style("fill",this.isAttributeDirectionInverted?this.leftColor:this.rightColor).style("fill-opacity","0.3")}drawLine(e){e.append("path").attr("id","diagram-path").datum(this.percentileRanks).attr("fill","none").attr("stroke","#888").attr("stroke-width",1).attr("d",fu().curve(gu).x(i=>this.createXScale()(i.x)).y(i=>this.createYScale()(i.y))).attr("transform",`translate(${this.framePadding}, ${this.framePadding})`)}calculatePercentileRanks(e){let i=[...e].sort((a,s)=>a-s),n=i.length,r=[{x:0,y:i[0]}];for(let a=0;a<n;a++)a+1<n&&i[a+1]===i[a]||r.push({x:(a+1)/n*100,y:i[a]});return r}calculateReversedPercentileRanks(e){let i=[...e].sort((a,s)=>s-a),n=i.length,r=[{x:0,y:i[0]}];for(let a=0;a<n;a++)a+1<n&&i[a+1]===i[a]||r.push({x:(a+1)/n*100,y:i[a]});return r.sort((a,s)=>a.x-s.x)}calculatePercentileFromMetricValue(e){if(e===this.minValue)return 0;if(e===this.maxValue)return 100;let i=null;for(let n of this.percentileRanks)if(n.y<e)i=n.x;else return i??0;return 100}calculateReversedPercentileFromMetricValue(e){if(e===this.maxValue)return 0;if(e===this.minValue)return 100;let i=null;for(let n of this.percentileRanks)if(n.y>e)i=n.x;else return i??0;return 100}addCrossHair(e,i,n){let r=e.append("text").attr("class","cross-tooltip").attr("fill","#000").attr("font-size","13px").style("display","none"),a=e.append("line").attr("class","dashed-vertical-line").attr("stroke","#000").attr("stroke-width","0.7px").attr("stroke-dasharray","4").style("display","none"),s=e.append("line").attr("class","straight-vertical-line").attr("stroke","#000").attr("stroke-width","0.7px").style("display","none"),l=e.append("line").attr("class","horizontal-line").attr("stroke","#000").attr("stroke-width","0.7px").style("display","none"),d=e.append("rect").attr("class","mouse-event-rect").attr("width",this.frameWidth).attr("height",this.frameHeight+this.frameMarginBottom/2).attr("fill","none").attr("pointer-events","all");this.addOnMouseMoveEvent(d,i,n,r,a,s,l),this.addOnMouseOutEvent(d,r,a,s,l)}addOnMouseMoveEvent(e,i,n,r,a,s,l){e.on("mousemove",d=>{let c=$h(d)[0],u=Math.round(i.invert(c-this.framePadding));u=Math.max(0,Math.min(u,100));let m=this.percentileToMetricValueMap.get(u),g=n(m)+this.framePadding,b=c<this.frameWidth/2?c+10:c-80,y=g<this.frameHeight/2?g+20:g-20;r.style("display","block").attr("x",b).attr("y",y).text(`Quantile: ${u}`).append("tspan").attr("x",b).attr("dy","1.2em").text(`Value: ${m}`),a.attr("x1",c).attr("x2",c).attr("y2",this.frameHeight).style("display","block"),s.attr("x1",c).attr("x2",c).attr("y1",g).attr("y2",this.frameHeight).style("display","block"),l.attr("x2",c).attr("y1",g).attr("y2",g).style("display","block")})}addOnMouseOutEvent(e,i,n,r,a){e.on("mouseout",()=>{i.style("display","none"),n.style("display","none"),r.style("display","none"),a.style("display","none")})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["cc-metric-color-range-diagram"]],hostAttrs:[1,"flex","justify-center"],inputs:{minValue:"minValue",maxValue:"maxValue",colorMetric:"colorMetric",values:"values",currentLeftValue:"currentLeftValue",currentRightValue:"currentRightValue",leftColor:"leftColor",middleColor:"middleColor",rightColor:"rightColor",isAttributeDirectionInverted:"isAttributeDirectionInverted",diagramWidth:"diagramWidth",diagramHeight:"diagramHeight",showAxisLabels:"showAxisLabels"},features:[Xa],decls:1,vars:0,consts:[["id","cc-range-diagram-container"]],template:function(i,n){i&1&&Ce(0,"div",0)},encapsulation:2})}}return t})();var h7=["minLabel"],u7=["maxLabel"],m7=["currentLeftLabel"],p7=["currentRightLabel"],f7=["combinedCurrentLeftRightLabel"],xu=4,Dv=(()=>{class t{constructor(e){this.changeDetector=e,this.hideMinLabel=!1,this.hideMaxLabel=!1,this.doLeftRightLabelOverlap=!1}ngAfterViewChecked(){this.updateLabelDisplays()}updateLabelDisplays(){let e=this.minLabel.nativeElement.getBoundingClientRect().width,i=this.currentLeftLabel.nativeElement.getBoundingClientRect().width;this.currentLeftLabelLeftPosition=this.sliderRangePosition.leftEnd-i/2;let n=this.currentRightLabel.nativeElement.getBoundingClientRect().width,r=this.sliderWidth-this.maxLabel.nativeElement.getBoundingClientRect().width;this.currentRightLabelLeftPosition=this.sliderRangePosition.rightStart-n/2,this.hideMinLabel=this.currentLeftLabelLeftPosition<=e+xu,this.hideMaxLabel=this.currentRightLabelLeftPosition+n+xu>=r;let a=this.currentLeftLabelLeftPosition+i;this.doLeftRightLabelOverlap=a+xu>=this.currentRightLabelLeftPosition;let s=(a+this.currentRightLabelLeftPosition)/2,l=this.combinedCurrentLeftRightLabel.nativeElement.getBoundingClientRect().width;this.combinedCurrentLeftRightLabelLeftPosition=s-l/2,this.changeDetector.detectChanges()}static{this.\u0275fac=function(i){return new(i||t)(le(Rn))}}static{this.\u0275cmp=A({type:t,selectors:[["cc-range-slider-labels"]],viewQuery:function(i,n){if(i&1&&Ya(h7,5)(u7,5)(m7,5)(p7,5)(f7,5),i&2){let r;Si(r=Ci())&&(n.minLabel=r.first),Si(r=Ci())&&(n.maxLabel=r.first),Si(r=Ci())&&(n.currentLeftLabel=r.first),Si(r=Ci())&&(n.currentRightLabel=r.first),Si(r=Ci())&&(n.combinedCurrentLeftRightLabel=r.first)}},inputs:{minValue:"minValue",maxValue:"maxValue",leftValueLabel:"leftValueLabel",rightValueLabel:"rightValueLabel",sliderRangePosition:"sliderRangePosition",sliderWidth:"sliderWidth"},decls:15,vars:26,consts:[["minLabel",""],["currentLeftLabel",""],["currentRightLabel",""],["combinedCurrentLeftRightLabel",""],["maxLabel",""],[1,"absolute","-top-6","leading-6","text-sm","text-base-content/60"]],template:function(i,n){i&1&&(_(0,"div",5,0),x(2),T(),_(3,"div",5,1),x(5),T(),_(6,"div",5,2),x(8),T(),_(9,"div",5,3),x(11),T(),_(12,"div",5,4),x(14),T()),i&2&&(ze("left",0,"px")("visibility",n.hideMinLabel?"hidden":"visible"),h(2),we(" ",n.minValue,`
3642
+ v${-this.frameHeight}`).attr("fill","none").attr("stroke","#888").attr("stroke-width","1px")}drawAxes(t,i,n){t.append("g").attr("id","axis-x").attr("transform",`translate(${this.framePadding},${this.frameHeight})`).call(Lh(i).ticks(5)).attr("font-size","13px").attr("color","#888"),t.append("g").attr("id","axis-y").attr("transform",`translate(0,${this.framePadding})`).call(Dh(n).ticks(5).tickFormat(function(r){return r>=1e4?`${pn(".0f")(r/1e3)}k`:r>=1e3?`${pn(".1f")(r/1e3)}k`:r.toString()})).attr("font-size","13px").attr("color","#888")}createXScale(){return Tr().domain(Hl(this.percentileRanks,t=>t.x)).range([0,this.frameWidth-2*this.framePadding])}createYScale(){let t=[0,ia(this.percentileRanks,n=>n.y)],i=[ia(this.percentileRanks,n=>n.y),0];return Tr().domain(this.isAttributeDirectionInverted?i:t).range([this.frameHeight-2*this.framePadding,0])}drawLabels(t){t.append("text").attr("id","y-label").attr("class","y label").attr("text-anchor","middle").attr("transform","rotate(-90)").attr("x",-this.frameHeight/2-this.frameMarginTop).attr("y",this.frameMarginLeft-this.yLabelXOffset).attr("fill","#888").text(`${this.colorMetric}`),t.append("text").attr("id","x-label").attr("class","x label").attr("text-anchor","middle").attr("x",this.frameWidth/2).attr("y",this.frameHeight+this.frameMarginTop+this.xLabelYOffset).attr("fill","#888").text(`Quantiles (% of ${this.colorMetric})`)}drawAreas(t,i){let n=i(this.isAttributeDirectionInverted?this.calculateReversedPercentileFromMetricValue(this.currentRightValue):this.calculatePercentileFromMetricValue(this.currentLeftValue)),r=i(this.isAttributeDirectionInverted?this.calculateReversedPercentileFromMetricValue(this.currentLeftValue):this.calculatePercentileFromMetricValue(this.currentRightValue));t.append("rect").attr("class","left-area").attr("x",this.framePadding).attr("width",n).attr("height",this.frameHeight).style("fill",this.isAttributeDirectionInverted?this.rightColor:this.leftColor).style("fill-opacity","0.3"),t.append("rect").attr("class","middle-area").attr("x",n+this.framePadding).attr("width",r-n).attr("height",this.frameHeight).style("fill",this.middleColor).style("fill-opacity","0.3"),t.append("rect").attr("class","right-area").attr("x",r+this.framePadding).attr("width",this.frameWidth-2*this.framePadding-r).attr("height",this.frameHeight).style("fill",this.isAttributeDirectionInverted?this.leftColor:this.rightColor).style("fill-opacity","0.3")}drawLine(t){t.append("path").attr("id","diagram-path").datum(this.percentileRanks).attr("fill","none").attr("stroke","#888").attr("stroke-width",1).attr("d",pu().curve(fu).x(i=>this.createXScale()(i.x)).y(i=>this.createYScale()(i.y))).attr("transform",`translate(${this.framePadding}, ${this.framePadding})`)}calculatePercentileRanks(t){let i=[...t].sort((a,s)=>a-s),n=i.length,r=[{x:0,y:i[0]}];for(let a=0;a<n;a++)a+1<n&&i[a+1]===i[a]||r.push({x:(a+1)/n*100,y:i[a]});return r}calculateReversedPercentileRanks(t){let i=[...t].sort((a,s)=>s-a),n=i.length,r=[{x:0,y:i[0]}];for(let a=0;a<n;a++)a+1<n&&i[a+1]===i[a]||r.push({x:(a+1)/n*100,y:i[a]});return r.sort((a,s)=>a.x-s.x)}calculatePercentileFromMetricValue(t){if(t===this.minValue)return 0;if(t===this.maxValue)return 100;let i=null;for(let n of this.percentileRanks)if(n.y<t)i=n.x;else return i??0;return 100}calculateReversedPercentileFromMetricValue(t){if(t===this.maxValue)return 0;if(t===this.minValue)return 100;let i=null;for(let n of this.percentileRanks)if(n.y>t)i=n.x;else return i??0;return 100}addCrossHair(t,i,n){let r=t.append("text").attr("class","cross-tooltip").attr("fill","#000").attr("font-size","13px").style("display","none"),a=t.append("line").attr("class","dashed-vertical-line").attr("stroke","#000").attr("stroke-width","0.7px").attr("stroke-dasharray","4").style("display","none"),s=t.append("line").attr("class","straight-vertical-line").attr("stroke","#000").attr("stroke-width","0.7px").style("display","none"),l=t.append("line").attr("class","horizontal-line").attr("stroke","#000").attr("stroke-width","0.7px").style("display","none"),d=t.append("rect").attr("class","mouse-event-rect").attr("width",this.frameWidth).attr("height",this.frameHeight+this.frameMarginBottom/2).attr("fill","none").attr("pointer-events","all");this.addOnMouseMoveEvent(d,i,n,r,a,s,l),this.addOnMouseOutEvent(d,r,a,s,l)}addOnMouseMoveEvent(t,i,n,r,a,s,l){t.on("mousemove",d=>{let c=zh(d)[0],u=Math.round(i.invert(c-this.framePadding));u=Math.max(0,Math.min(u,100));let m=this.percentileToMetricValueMap.get(u),g=n(m)+this.framePadding,b=c<this.frameWidth/2?c+10:c-80,y=g<this.frameHeight/2?g+20:g-20;r.style("display","block").attr("x",b).attr("y",y).text(`Quantile: ${u}`).append("tspan").attr("x",b).attr("dy","1.2em").text(`Value: ${m}`),a.attr("x1",c).attr("x2",c).attr("y2",this.frameHeight).style("display","block"),s.attr("x1",c).attr("x2",c).attr("y1",g).attr("y2",this.frameHeight).style("display","block"),l.attr("x2",c).attr("y1",g).attr("y2",g).style("display","block")})}addOnMouseOutEvent(t,i,n,r,a){t.on("mouseout",()=>{i.style("display","none"),n.style("display","none"),r.style("display","none"),a.style("display","none")})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=A({type:e,selectors:[["cc-metric-color-range-diagram"]],hostAttrs:[1,"flex","justify-center"],inputs:{minValue:"minValue",maxValue:"maxValue",colorMetric:"colorMetric",values:"values",currentLeftValue:"currentLeftValue",currentRightValue:"currentRightValue",leftColor:"leftColor",middleColor:"middleColor",rightColor:"rightColor",isAttributeDirectionInverted:"isAttributeDirectionInverted",diagramWidth:"diagramWidth",diagramHeight:"diagramHeight",showAxisLabels:"showAxisLabels"},features:[Ga],decls:1,vars:0,consts:[["id","cc-range-diagram-container"]],template:function(i,n){i&1&&Se(0,"div",0)},encapsulation:2})}}return e})();var s7=["minLabel"],l7=["maxLabel"],c7=["currentLeftLabel"],d7=["currentRightLabel"],h7=["combinedCurrentLeftRightLabel"],vu=4,Lv=(()=>{class e{constructor(t){this.changeDetector=t,this.hideMinLabel=!1,this.hideMaxLabel=!1,this.doLeftRightLabelOverlap=!1}ngAfterViewChecked(){this.updateLabelDisplays()}updateLabelDisplays(){let t=this.minLabel.nativeElement.getBoundingClientRect().width,i=this.currentLeftLabel.nativeElement.getBoundingClientRect().width;this.currentLeftLabelLeftPosition=this.sliderRangePosition.leftEnd-i/2;let n=this.currentRightLabel.nativeElement.getBoundingClientRect().width,r=this.sliderWidth-this.maxLabel.nativeElement.getBoundingClientRect().width;this.currentRightLabelLeftPosition=this.sliderRangePosition.rightStart-n/2,this.hideMinLabel=this.currentLeftLabelLeftPosition<=t+vu,this.hideMaxLabel=this.currentRightLabelLeftPosition+n+vu>=r;let a=this.currentLeftLabelLeftPosition+i;this.doLeftRightLabelOverlap=a+vu>=this.currentRightLabelLeftPosition;let s=(a+this.currentRightLabelLeftPosition)/2,l=this.combinedCurrentLeftRightLabel.nativeElement.getBoundingClientRect().width;this.combinedCurrentLeftRightLabelLeftPosition=s-l/2,this.changeDetector.detectChanges()}static{this.\u0275fac=function(i){return new(i||e)(le(Rn))}}static{this.\u0275cmp=A({type:e,selectors:[["cc-range-slider-labels"]],viewQuery:function(i,n){if(i&1&&Qa(s7,5)(l7,5)(c7,5)(d7,5)(h7,5),i&2){let r;Si(r=Ci())&&(n.minLabel=r.first),Si(r=Ci())&&(n.maxLabel=r.first),Si(r=Ci())&&(n.currentLeftLabel=r.first),Si(r=Ci())&&(n.currentRightLabel=r.first),Si(r=Ci())&&(n.combinedCurrentLeftRightLabel=r.first)}},inputs:{minValue:"minValue",maxValue:"maxValue",leftValueLabel:"leftValueLabel",rightValueLabel:"rightValueLabel",sliderRangePosition:"sliderRangePosition",sliderWidth:"sliderWidth"},decls:15,vars:26,consts:[["minLabel",""],["currentLeftLabel",""],["currentRightLabel",""],["combinedCurrentLeftRightLabel",""],["maxLabel",""],[1,"absolute","-top-6","leading-6","text-sm","text-base-content/60"]],template:function(i,n){i&1&&(_(0,"div",5,0),x(2),T(),_(3,"div",5,1),x(5),T(),_(6,"div",5,2),x(8),T(),_(9,"div",5,3),x(11),T(),_(12,"div",5,4),x(14),T()),i&2&&(ze("left",0,"px")("visibility",n.hideMinLabel?"hidden":"visible"),h(2),we(" ",n.minValue,`
3612
3643
  `),h(),ze("left",n.currentLeftLabelLeftPosition,"px")("visibility",n.doLeftRightLabelOverlap?"hidden":"visible"),h(2),we(" ",n.leftValueLabel,`
3613
3644
  `),h(),ze("left",n.currentRightLabelLeftPosition,"px")("visibility",n.doLeftRightLabelOverlap?"hidden":"visible"),h(2),we(" ",n.rightValueLabel,`
3614
3645
  `),h(),ze("left",n.combinedCurrentLeftRightLabelLeftPosition,"px")("visibility",n.doLeftRightLabelOverlap?"visible":"hidden"),h(2),qn(" ",n.leftValueLabel," - ",n.rightValueLabel,`
3615
3646
  `),h(),ze("right",0,"px")("visibility",n.hideMaxLabel?"hidden":"visible"),h(2),we(" ",n.maxValue,`
3616
- `))},encapsulation:2})}}return t})();var Ar=(t,o,e)=>Math.min(Math.max(t,o),e),Pv=({minValue:t,maxValue:o,currentLeftValue:e,currentRightValue:i,sliderWidth:n})=>{let r=o-t;if(r<=0)return{leftEnd:n,rightStart:n};let a=(e-t)/r,s=(i-t)/r,l=Ar(a*n,0,n),d=Ar(s*n,l,n);return{leftEnd:l,rightStart:d}},g7=({thumbX:t,minValue:o,maxValue:e,sliderWidth:i})=>{let n=(e-o)/i,r=o+t*n;return Math.round(r)},Nv=t=>Bv(t,{lowerBound:0,upperBound:t.otherThumbX}),Vv=t=>Bv(t,{lowerBound:t.otherThumbX,upperBound:t.sliderWidth}),Bv=({deltaX:t,thumbScreenX:o,thumbRadius:e,sliderBoundingClientRectX:i,sliderWidth:n,minValue:r,maxValue:a},{lowerBound:s,upperBound:l})=>{let d=o+t-i+e,c=Ar(d,s,l);return{updatedThumbX:c,upcomingValue:g7({thumbX:c,minValue:r,maxValue:a,sliderWidth:n})}};var b7=["rangeSliderContainer"],v7=["leftThumb"],x7=["rightThumb"],Wv=(()=>{class t{get segmentWidths(){let e=Ar(this.sliderRangePosition.leftEnd,0,this.actualSliderWidth),i=Ar(this.sliderRangePosition.rightStart,e,this.actualSliderWidth);return{left:e,middle:i-e,right:this.actualSliderWidth-i}}constructor(e){this.changeDetectorRef=e,this.sliderWidth=150,this.sliderRangePosition={leftEnd:0,rightStart:0},this.thumbRadius=7,this.actualSliderWidth=this.sliderWidth,this.currentlySliding=void 0,this.activeMouseMoveHandler=null,this.activeMouseUpHandler=null,this.handleLeftThumbMoved=i=>{if(this.abortSlidingWhenHidden())return;let n=Nv({deltaX:i.movementX,thumbScreenX:this.leftThumb.nativeElement.getBoundingClientRect().x,thumbRadius:this.thumbRadius,otherThumbX:this.sliderRangePosition.rightStart,sliderBoundingClientRectX:this.sliderContainer.nativeElement.getBoundingClientRect().x,sliderWidth:this.actualSliderWidth,minValue:this.minValue,maxValue:this.maxValue});this.sliderRangePosition={leftEnd:n.updatedThumbX,rightStart:this.sliderRangePosition.rightStart},this.upcomingLeftValue=n.upcomingValue,this.changeDetectorRef.markForCheck(),this.handleValueChange({newLeftValue:n.upcomingValue})},this.handleRightThumbMoved=i=>{if(this.abortSlidingWhenHidden())return;let n=Vv({deltaX:i.movementX,thumbScreenX:this.rightThumb.nativeElement.getBoundingClientRect().x,thumbRadius:this.thumbRadius,otherThumbX:this.sliderRangePosition.leftEnd,sliderBoundingClientRectX:this.sliderContainer.nativeElement.getBoundingClientRect().x,sliderWidth:this.actualSliderWidth,minValue:this.minValue,maxValue:this.maxValue});this.sliderRangePosition={leftEnd:this.sliderRangePosition.leftEnd,rightStart:n.updatedThumbX},this.upcomingRightValue=n.upcomingValue,this.changeDetectorRef.markForCheck(),this.handleValueChange({newRightValue:n.upcomingValue})}}ngOnChanges(e){e.sliderWidth&&(this.actualSliderWidth=this.sliderWidth),this.currentlySliding||(e.currentLeftValue&&(this.upcomingLeftValue=this.currentLeftValue),e.currentRightValue&&(this.upcomingRightValue=this.currentRightValue),this.updateSliderRangePosition())}ngAfterViewInit(){typeof ResizeObserver<"u"&&(this.resizeObserver=new ResizeObserver(e=>{let i=e.at(-1).contentRect.width;i>0&&i!==this.actualSliderWidth&&(this.actualSliderWidth=i,this.currentlySliding||this.updateSliderRangePosition(),this.changeDetectorRef.markForCheck())}),this.resizeObserver.observe(this.sliderContainer.nativeElement))}ngOnDestroy(){this.stopSliding(),this.resizeObserver?.disconnect()}setCurrentlySliding(e){switch(this.stopSliding(),this.currentlySliding=e,this.currentlySliding){case"leftThumb":this.activeMouseMoveHandler=this.handleLeftThumbMoved,this.rightThumb.nativeElement.style.zIndex="0",this.leftThumb.nativeElement.style.zIndex="1";break;case"rightThumb":this.activeMouseMoveHandler=this.handleRightThumbMoved,this.leftThumb.nativeElement.style.zIndex="0",this.rightThumb.nativeElement.style.zIndex="1";break;default:return}this.activeMouseUpHandler=()=>this.stopSliding(),document.addEventListener("mousemove",this.activeMouseMoveHandler),document.addEventListener("mouseup",this.activeMouseUpHandler)}stopSliding(){this.currentlySliding=void 0,this.activeMouseMoveHandler&&(document.removeEventListener("mousemove",this.activeMouseMoveHandler),this.activeMouseMoveHandler=null),this.activeMouseUpHandler&&(document.removeEventListener("mouseup",this.activeMouseUpHandler),this.activeMouseUpHandler=null)}handleLeftThumbKeydown(e){let i=this.calculateValueFromKeyboard(e,this.upcomingLeftValue,this.minValue,this.upcomingRightValue);i===void 0||i===this.upcomingLeftValue||(e.preventDefault(),this.upcomingLeftValue=i,this.updateSliderRangePosition(),this.handleValueChange({newLeftValue:i}))}handleRightThumbKeydown(e){let i=this.calculateValueFromKeyboard(e,this.upcomingRightValue,this.upcomingLeftValue,this.maxValue);i===void 0||i===this.upcomingRightValue||(e.preventDefault(),this.upcomingRightValue=i,this.updateSliderRangePosition(),this.handleValueChange({newRightValue:i}))}calculateValueFromKeyboard(e,i,n,r){let a;switch(e.key){case"ArrowLeft":case"ArrowDown":a=i-1;break;case"ArrowRight":case"ArrowUp":a=i+1;break;case"Home":a=n;break;case"End":a=r;break;default:return}return Math.max(n,Math.min(r,a))}handleCurrentLeftInputChanged(e){let i=jd(e,this.minValue,this.upcomingRightValue,this.upcomingLeftValue);i!==void 0&&(this.upcomingLeftValue=i,this.updateSliderRangePosition(),this.handleValueChange({newLeftValue:i}))}handleCurrentRightInputChanged(e){let i=jd(e,this.upcomingLeftValue,this.maxValue,this.upcomingRightValue);i!==void 0&&(this.upcomingRightValue=i,this.updateSliderRangePosition(),this.handleValueChange({newRightValue:i}))}updateSliderRangePosition(){this.sliderRangePosition=Pv({minValue:this.minValue,maxValue:this.maxValue,currentLeftValue:this.upcomingLeftValue??this.currentLeftValue,currentRightValue:this.upcomingRightValue??this.currentRightValue,sliderWidth:this.actualSliderWidth})}abortSlidingWhenHidden(){return this.sliderContainer.nativeElement.getBoundingClientRect().width===0?(this.stopSliding(),!0):!1}static{this.\u0275fac=function(i){return new(i||t)(le(Rn))}}static{this.\u0275cmp=A({type:t,selectors:[["cc-metric-color-range-slider"]],viewQuery:function(i,n){if(i&1&&Ya(b7,5)(v7,5)(x7,5),i&2){let r;Si(r=Ci())&&(n.sliderContainer=r.first),Si(r=Ci())&&(n.leftThumb=r.first),Si(r=Ci())&&(n.rightThumb=r.first)}},inputs:{minValue:"minValue",maxValue:"maxValue",currentLeftValue:"currentLeftValue",currentRightValue:"currentRightValue",leftColor:"leftColor",middleColor:"middleColor",rightColor:"rightColor",handleValueChange:"handleValueChange",sliderWidth:"sliderWidth"},features:[Xa],decls:15,vars:34,consts:[["rangeSliderContainer",""],["leftThumb",""],["rightThumb",""],[1,"flex","items-center","gap-2"],["type","number","aria-label","Lower color range value input",1,"input","input-sm","input-bordered","w-16","text-center",3,"input","value","min","max"],[1,"flex","flex-1","mx-2","relative","leading-[48px]"],[1,"inline-block","border-b-4","border-solid"],["aria-hidden","true",1,"cursor-pointer","absolute","-top-1","rounded-full","border-[7px]","border-primary",3,"mousedown"],["type","range","step","1","aria-label","Lower color range value",1,"absolute","inset-0","m-0","h-full","w-full","opacity-0","pointer-events-none",3,"keydown","min","max","value"],["type","range","step","1","aria-label","Upper color range value",1,"absolute","inset-0","m-0","h-full","w-full","opacity-0","pointer-events-none",3,"keydown","min","max","value"],[3,"minValue","maxValue","leftValueLabel","rightValueLabel","sliderRangePosition","sliderWidth"],["type","number","aria-label","Upper color range value input",1,"input","input-sm","input-bordered","w-16","text-center",3,"input","value","min","max"]],template:function(i,n){i&1&&(f(0,"div",3)(1,"input",4),V("input",function(a){return n.handleCurrentLeftInputChanged(a)}),p(),f(2,"div",5,0),W(4,"span",6)(5,"span",6)(6,"span",6),f(7,"div",7,1),V("mousedown",function(){return n.setCurrentlySliding("leftThumb")}),p(),f(9,"div",7,2),V("mousedown",function(){return n.setCurrentlySliding("rightThumb")}),p(),f(11,"input",8),V("keydown",function(a){return n.handleLeftThumbKeydown(a)}),p(),f(12,"input",9),V("keydown",function(a){return n.handleRightThumbKeydown(a)}),p(),W(13,"cc-range-slider-labels",10),p(),f(14,"input",11),V("input",function(a){return n.handleCurrentRightInputChanged(a)}),p()()),i&2&&(h(),R("value",n.currentLeftValue)("min",n.minValue)("max",n.upcomingRightValue),h(3),ze("width",n.segmentWidths.left,"px")("border-bottom-color",n.leftColor),h(),ze("width",n.segmentWidths.middle,"px")("border-bottom-color",n.middleColor),h(),ze("width",n.segmentWidths.right,"px")("border-bottom-color",n.rightColor),h(),ze("left",n.sliderRangePosition.leftEnd-n.thumbRadius,"px"),h(2),ze("left",n.sliderRangePosition.rightStart-n.thumbRadius,"px"),h(2),R("min",n.minValue)("max",n.currentRightValue)("value",n.currentLeftValue),h(),R("min",n.currentLeftValue)("max",n.maxValue)("value",n.currentRightValue),h(),R("minValue",n.minValue)("maxValue",n.maxValue)("leftValueLabel",n.upcomingLeftValue)("rightValueLabel",n.upcomingRightValue)("sliderRangePosition",n.sliderRangePosition)("sliderWidth",n.actualSliderWidth),h(),R("value",n.currentRightValue)("min",n.upcomingLeftValue)("max",n.maxValue))},dependencies:[Dv],encapsulation:2})}}return t})();var Ov=(()=>{class t{constructor(e,i,n,r){this.mapStateReadWindow=e,this.metricsBarReadStore=i,this.metricsBarWriteStore=n,this.metricsLensFacade=r,this.colorMetric=F(this.mapStateReadWindow.colorMetric$,{initialValue:""}),this.sliderValues=F(this.metricsBarReadStore.metricColorRangeValues$,{initialValue:{values:[],min:0,max:0,from:0,to:0}}),this.sliderColors=F(this.metricsBarReadStore.metricColorRangeColors$,{initialValue:{leftColor:"#000",middleColor:"#000",rightColor:"#000"}}),this.isAttributeDirectionInversed=F(ut([this.mapStateReadWindow.colorMetric$,this.metricsLensFacade.descriptors$]).pipe(Se(([a,s])=>s[a]?.direction===1)),{initialValue:!1}),this.pendingLeftValue=null,this.pendingRightValue=null,this.commitColorRange=Ui(()=>{let a={};this.pendingLeftValue!==null&&(a.from=this.pendingLeftValue),this.pendingRightValue!==null&&(a.to=this.pendingRightValue),this.pendingLeftValue=null,this.pendingRightValue=null,this.metricsBarWriteStore.setColorRange(a)},rg),this.handleValueChange=({newLeftValue:a,newRightValue:s})=>{this.pendingLeftValue=a??this.pendingLeftValue,this.pendingRightValue=s??this.pendingRightValue,this.commitColorRange()}}ngOnDestroy(){this.commitColorRange.flush()}static{this.\u0275fac=function(i){return new(i||t)(le(Ee),le(dt),le(je),le(Ws))}}static{this.\u0275cmp=A({type:t,selectors:[["cc-color-range-section"]],hostAttrs:[1,"contents"],decls:7,vars:23,consts:[[1,"block",3,"minValue","maxValue","currentLeftValue","currentRightValue","leftColor","middleColor","rightColor","handleValueChange","sliderWidth"],[1,"flex","items-center","justify-between","gap-2"],[1,"text-xs","uppercase","tracking-wider","opacity-60"],[1,"truncate","text-xs","opacity-60"],[3,"minValue","maxValue","currentLeftValue","currentRightValue","leftColor","middleColor","rightColor","colorMetric","values","isAttributeDirectionInverted","diagramWidth","diagramHeight","showAxisLabels"]],template:function(i,n){i&1&&(W(0,"cc-metric-color-range-slider",0),f(1,"div",1)(2,"span",2),x(3,"Distribution"),p(),f(4,"span",3),x(5),p()(),W(6,"cc-metric-color-range-diagram",4)),i&2&&(R("minValue",n.sliderValues().min)("maxValue",n.sliderValues().max)("currentLeftValue",n.sliderValues().from)("currentRightValue",n.sliderValues().to)("leftColor",n.sliderColors().leftColor)("middleColor",n.sliderColors().middleColor)("rightColor",n.sliderColors().rightColor)("handleValueChange",n.handleValueChange)("sliderWidth",220),h(5),we("",n.colorMetric()," \xD7 quantile %"),h(),R("minValue",n.sliderValues().min)("maxValue",n.sliderValues().max)("currentLeftValue",n.sliderValues().from)("currentRightValue",n.sliderValues().to)("leftColor",n.sliderColors().leftColor)("middleColor",n.sliderColors().middleColor)("rightColor",n.sliderColors().rightColor)("colorMetric",n.colorMetric())("values",n.sliderValues().values)("isAttributeDirectionInverted",n.isAttributeDirectionInversed())("diagramWidth",380)("diagramHeight",190)("showAxisLabels",!1))},dependencies:[Wv,Lv],encapsulation:2})}}return t})();function w7(t,o){if(t&1){let e=ue();_(0,"button",6),re("click",function(){oe(e);let n=L();return ne(n.resetThresholds())}),Ce(1,"i",7),T()}}var zv=(()=>{class t{constructor(e,i,n,r){this.mapStateReadWindow=e,this.fileStoreReadWindow=i,this.metricsBarReadStore=n,this.metricsBarWriteStore=r,this.colorMetric=F(this.mapStateReadWindow.colorMetric$,{initialValue:""}),this.isDeltaState=F(this.fileStoreReadWindow.isDeltaState$,{initialValue:!1}),this.mapColors=F(this.mapStateReadWindow.mapColors$,{initialValue:Qt}),this.selectedColorMetricData=F(this.metricsBarReadStore.selectedColorMetricData$,{initialValue:{values:[],minValue:0,maxValue:0}}),this.canResetThresholds=te(()=>!this.isDeltaState()&&this.colorMetric()!=="unary"),this.swatchGradient=te(()=>{let a=this.mapColors();return this.isDeltaState()?`linear-gradient(90deg, ${a.positiveDelta}, ${a.negativeDelta})`:`linear-gradient(90deg, ${a.positive}, ${a.neutral}, ${a.negative})`})}resetThresholds(){this.metricsBarWriteStore.setColorRange(xr(this.selectedColorMetricData()))}static{this.\u0275fac=function(i){return new(i||t)(le(Ee),le(Fe),le(dt),le(je))}}static{this.\u0275cmp=A({type:t,selectors:[["cc-color-settings-header"]],hostAttrs:[1,"contents"],decls:8,vars:4,consts:[[1,"flex","items-center","justify-between","gap-2"],[1,"flex","min-w-0","items-center","gap-2"],[1,"inline-block","h-3.5","w-3.5","shrink-0","rounded-full"],[1,"truncate","text-sm"],[1,"font-semibold","text-primary"],["title","Reset slider thresholds to default","aria-label","Reset thresholds",1,"btn","btn-ghost","btn-xs","btn-square"],["title","Reset slider thresholds to default","aria-label","Reset thresholds",1,"btn","btn-ghost","btn-xs","btn-square",3,"click"],[1,"fa","fa-undo"]],template:function(i,n){i&1&&(_(0,"div",0)(1,"div",1),Ce(2,"span",2),_(3,"span",3),x(4,"Color by "),_(5,"span",4),x(6),T()()(),K(7,w7,2,0,"button",5),T()),i&2&&(h(2),ze("background",n.swatchGradient()),h(4),Re(n.colorMetric()),h(),Q(n.canResetThresholds()?7:-1))},encapsulation:2})}}return t})();var $v=(()=>{class t{constructor(){this.override=J.required(),this.recolorOverride=fe(),this.unpinOverride=fe()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["cc-folder-override-row"]],hostAttrs:[1,"contents"],inputs:{override:[1,"override"]},outputs:{recolorOverride:"recolorOverride",unpinOverride:"unpinOverride"},decls:8,vars:7,consts:[[1,"flex","shrink-0","items-center","gap-2","rounded-md","border","border-base-300","px-2","py-1",3,"title"],[3,"colorChange","hexColor","ariaLabel"],[1,"min-w-0","flex-1","truncate","text-sm"],[1,"text-xs","opacity-60","tabular-nums",3,"title"],[1,"btn","btn-ghost","btn-xs","btn-square",3,"click","title"],[1,"fa","fa-times"]],template:function(i,n){i&1&&(f(0,"div",0)(1,"cc-inline-color-picker",1),V("colorChange",function(a){return n.recolorOverride.emit(a)}),p(),f(2,"span",2),x(3),p(),f(4,"span",3),x(5),p(),f(6,"button",4),V("click",function(){return n.unpinOverride.emit()}),W(7,"i",5),p()()),i&2&&(R("title",n.override().path),h(),R("hexColor",n.override().color)("ariaLabel","Recolor "+n.override().path),h(2),Re(n.override().path),h(),R("title",n.override().fileCount+" files"),h(),Re(n.override().fileCount),h(),R("title","Unpin "+n.override().path))},dependencies:[To],encapsulation:2})}}return t})();var y7=["pinInput"];function S7(t,o){if(t&1){let e=ue();_(0,"button",2),re("click",function(){oe(e);let n=L();return ne(n.startPinning())}),Ce(1,"i",3),_(2,"span"),x(3,"Pin a folder color\u2026"),T()()}}function C7(t,o){if(t&1){let e=ue();_(0,"li",8)(1,"button",10),re("mousedown",function(n){return n.preventDefault()})("click",function(){let n=oe(e).$implicit,r=L(2);return ne(r.handlePin(n))}),_(2,"span",11),x(3),T()()()}if(t&2){let e=o.$implicit;h(),xe("title",e),h(2),Re(e)}}function M7(t,o){t&1&&(_(0,"li",9),x(1,"No folders found"),T())}function _7(t,o){if(t&1){let e=ue();_(0,"div",4),Ce(1,"i",5),_(2,"input",6,0),re("input",function(n){oe(e);let r=L();return ne(r.handleSearchTermChange(n.target.value))})("keydown.escape",function(n){oe(e);let r=L();return ne(r.handleSearchEscape(n))})("blur",function(){oe(e);let n=L();return ne(n.handleSearchBlur())}),T()(),_(4,"ul",7),Ne(5,C7,4,2,"li",8,si,!1,M7,2,0,"li",9),T()}if(t&2){let e=L();h(2),xe("value",e.searchTerm()),h(3),Ve(e.folderSuggestions())}}var E7=8,jv=(()=>{class t{constructor(e){this.metricsBarReadStore=e,this.pinFolder=fe(),this.folderPaths=F(this.metricsBarReadStore.markableFolderPaths$,{initialValue:[]}),this.overrides=F(this.metricsBarReadStore.markedPackagesWithCounts$,{initialValue:[]}),this.isPinning=ke(!1),this.searchTerm=ke(""),this.pinInput=Ue("pinInput"),this.folderSuggestions=te(()=>{let i=this.searchTerm().toLowerCase(),n=new Set(this.overrides().map(a=>a.path)),r=[];for(let a of this.folderPaths())if(!(n.has(a)||!a.toLowerCase().includes(i))&&(r.push(a),r.length>=E7))break;return r})}startPinning(){this.isPinning.set(!0),setTimeout(()=>this.pinInput()?.nativeElement.focus())}stopPinning(){this.isPinning.set(!1),this.searchTerm.set("")}handleSearchTermChange(e){this.searchTerm.set(e)}handleSearchBlur(){this.searchTerm().trim()===""&&this.stopPinning()}handleSearchEscape(e){e.preventDefault(),this.stopPinning()}handlePin(e){this.pinFolder.emit(e),this.stopPinning()}static{this.\u0275fac=function(i){return new(i||t)(le(dt))}}static{this.\u0275cmp=A({type:t,selectors:[["cc-pin-folder-search"]],viewQuery:function(i,n){i&1&&tt(n.pinInput,y7,5),i&2&&it()},hostAttrs:[1,"contents"],outputs:{pinFolder:"pinFolder"},decls:2,vars:1,consts:[["pinInput",""],[1,"btn","btn-ghost","btn-sm","w-full","justify-start","gap-2","border","border-dashed","border-base-300","font-normal"],[1,"btn","btn-ghost","btn-sm","w-full","justify-start","gap-2","border","border-dashed","border-base-300","font-normal",3,"click"],[1,"fa","fa-plus"],[1,"input","input-sm","input-bordered","flex","items-center","gap-2"],[1,"fa","fa-search","opacity-60"],["type","text","placeholder","Search folders\u2026","aria-label","Search folders",1,"grow",3,"input","keydown.escape","blur","value"],[1,"m-0","flex","max-h-40","list-none","flex-col","overflow-y-auto","p-0"],[1,"flex"],[1,"px-2","py-1","text-xs","opacity-60"],[1,"btn","btn-ghost","btn-xs","w-full","flex-nowrap","justify-start","font-normal",3,"mousedown","click","title"],[1,"min-w-0","truncate"]],template:function(i,n){i&1&&K(0,S7,4,0,"button",1)(1,_7,8,2),i&2&&Q(n.isPinning()?1:0)},encapsulation:2})}}return t})();var k7=(t,o)=>o.path;function q7(t,o){if(t&1&&(f(0,"span",2),x(1),p()),t&2){let e=L();h(),we("",e.overrides().length," pinned")}}function T7(t,o){if(t&1){let e=ue();f(0,"cc-folder-override-row",7),V("recolorOverride",function(n){let r=oe(e).$implicit,a=L(2);return ne(a.handleRecolor(r.path,n))})("unpinOverride",function(){let n=oe(e).$implicit,r=L(2);return ne(r.handleUnpin(n.path))}),p()}if(t&2){let e=o.$implicit;R("override",e)}}function R7(t,o){if(t&1&&(f(0,"div",4),Ne(1,T7,1,1,"cc-folder-override-row",6,k7),p()),t&2){let e=L();h(),Ve(e.overrides())}}var Hv=(()=>{class t{constructor(e,i,n){this.mapStateReadWindow=e,this.metricsBarReadStore=i,this.metricsBarWriteStore=n,this.overrides=F(this.metricsBarReadStore.markedPackagesWithCounts$,{initialValue:[]}),this.mapColors=F(this.mapStateReadWindow.mapColors$,{initialValue:Qt})}handlePin(e){this.metricsBarWriteStore.markPackage({path:e,color:this.nextMarkingColor(e)})}handleRecolor(e,i){this.metricsBarWriteStore.markPackage({path:e,color:i})}handleUnpin(e){this.metricsBarWriteStore.unmarkPackage(e)}nextMarkingColor(e){let i=this.mapColors().markingColors,n=this.findMarkedParentColor(e),r=i.filter(s=>s!==n);if(r.length===0)return i[0];let a=new Set(this.overrides().map(s=>s.color));return r.find(s=>!a.has(s))??r[this.overrides().length%r.length]}findMarkedParentColor(e){let i,n=0;for(let r of this.overrides())e.startsWith(`${r.path}/`)&&r.path.length>n&&(i=r.color,n=r.path.length);return i}static{this.\u0275fac=function(i){return new(i||t)(le(Ee),le(dt),le(je))}}static{this.\u0275cmp=A({type:t,selectors:[["cc-folder-overrides"]],hostAttrs:[1,"contents"],decls:8,vars:2,consts:[[1,"flex","items-center","justify-between","gap-2"],[1,"text-xs","uppercase","tracking-wider","opacity-60"],[1,"text-xs","opacity-60"],[1,"m-0","text-xs","opacity-60"],[1,"flex","max-h-36","flex-col","gap-0.5","overflow-y-auto"],[3,"pinFolder"],[3,"override"],[3,"recolorOverride","unpinOverride","override"]],template:function(i,n){i&1&&(f(0,"div",0)(1,"span",1),x(2,"Folder Overrides"),p(),K(3,q7,2,1,"span",2),p(),f(4,"p",3),x(5,"These folders\u2019 floors are tinted with the pinned color."),p(),K(6,R7,3,0,"div",4),f(7,"cc-pin-folder-search",5),V("pinFolder",function(a){return n.handlePin(a)}),p()),i&2&&(h(3),Q(n.overrides().length>0?3:-1),h(3),Q(n.overrides().length>0?6:-1))},dependencies:[$v,jv],encapsulation:2})}}return t})();var Uv=(()=>{class t{constructor(e,i){this.mapStateReadWindow=e,this.metricsBarWriteStore=i,this.groupName=J.required(),this.colorMode=F(this.mapStateReadWindow.colorMode$,{initialValue:"absolute"})}handleColorModeChange(e){this.metricsBarWriteStore.setColorMode(e)}static{this.\u0275fac=function(i){return new(i||t)(le(Ee),le(je))}}static{this.\u0275cmp=A({type:t,selectors:[["cc-gradient-mode-picker"]],hostAttrs:[1,"contents"],inputs:{groupName:[1,"groupName"]},decls:8,vars:8,consts:[[1,"flex","flex-col","gap-1"],[1,"text-xs","uppercase","tracking-wider","opacity-60"],["role","radiogroup","aria-label","Gradient mode",1,"join","w-full"],["type","radio","aria-label","Absolute",1,"join-item","btn","btn-sm","flex-1",3,"change","name","checked"],["type","radio","aria-label","Focused",1,"join-item","btn","btn-sm","flex-1",3,"change","name","checked"],["type","radio","aria-label","Weighted",1,"join-item","btn","btn-sm","flex-1",3,"change","name","checked"],["type","radio","aria-label","Relative",1,"join-item","btn","btn-sm","flex-1",3,"change","name","checked"]],template:function(i,n){i&1&&(_(0,"div",0)(1,"span",1),x(2,"Gradient Mode"),T(),_(3,"div",2)(4,"input",3),re("change",function(){return n.handleColorModeChange("absolute")}),T(),_(5,"input",4),re("change",function(){return n.handleColorModeChange("focusedGradient")}),T(),_(6,"input",5),re("change",function(){return n.handleColorModeChange("weightedGradient")}),T(),_(7,"input",6),re("change",function(){return n.handleColorModeChange("trueGradient")}),T()()()),i&2&&(h(4),xe("name",n.groupName())("checked",n.colorMode()==="absolute"),h(),xe("name",n.groupName())("checked",n.colorMode()==="focusedGradient"),h(),xe("name",n.groupName())("checked",n.colorMode()==="weightedGradient"),h(),xe("name",n.groupName())("checked",n.colorMode()==="trueGradient"))},encapsulation:2})}}return t})();function A7(t,o){if(t&1){let e=ue();f(0,"label",1)(1,"input",3),V("change",function(){oe(e);let n=L();return ne(n.handleIsColorRangeInvertedChange())}),p(),f(2,"span",4),x(3,"Invert colors"),p()()}if(t&2){let e=L();h(),R("checked",e.isColorRangeInverted())}}function I7(t,o){if(t&1){let e=ue();f(0,"label",1)(1,"input",3),V("change",function(){oe(e);let n=L();return ne(n.handleAreDeltaColorsInvertedChange())}),p(),f(2,"span",4),x(3,"Invert colors"),p()()}if(t&2){let e=L();h(),R("checked",e.areDeltaColorsInverted())}}var Gv=(()=>{class t{constructor(e,i,n){this.fileStoreReadWindow=e,this.mapStateReadWindow=i,this.metricsBarWriteStore=n,this.isDeltaState=F(this.fileStoreReadWindow.isDeltaState$,{initialValue:!1}),this.mapColors=F(this.mapStateReadWindow.mapColors$,{initialValue:Qt}),this.isColorRangeInverted=te(()=>this.mapColors().isColorRangeInverted??!1),this.areDeltaColorsInverted=te(()=>this.mapColors().areDeltaColorsInverted??!1)}handleIsColorRangeInvertedChange(){this.metricsBarWriteStore.invertColorRange()}handleAreDeltaColorsInvertedChange(){this.metricsBarWriteStore.invertDeltaColors()}resetColorsKeys(){return this.isDeltaState()?["mapState.mapColors.positiveDelta","mapState.mapColors.negativeDelta","mapState.mapColors.selected","mapState.mapColors.areDeltaColorsInverted"]:["mapState.mapColors.positive","mapState.mapColors.negative","mapState.mapColors.neutral","mapState.mapColors.selected","mapState.mapColors.isColorRangeInverted","mapState.colorMode"]}static{this.\u0275fac=function(i){return new(i||t)(le(Fe),le(Ee),le(je))}}static{this.\u0275cmp=A({type:t,selectors:[["cc-invert-reset-row"]],hostAttrs:[1,"contents"],decls:4,vars:4,consts:[[1,"flex","items-center","justify-between","gap-2"],[1,"flex","cursor-pointer","items-center","gap-2"],["label","Reset colors",3,"settingsKeys","tooltip","small"],["type","checkbox",1,"toggle","toggle-sm","toggle-primary",3,"change","checked"],[1,"text-sm"]],template:function(i,n){i&1&&(f(0,"div",0),K(1,A7,4,1,"label",1)(2,I7,4,1,"label",1),W(3,"cc-reset-settings-button",2),p()),i&2&&(h(),Q(n.isDeltaState()?2:1),h(2),R("settingsKeys",n.resetColorsKeys())("tooltip",n.isDeltaState()?"Reset color values to default":"Reset color values and gradient mode to default")("small",!0))},dependencies:[Wi],encapsulation:2})}}return t})();function F7(t,o){if(t&1&&W(0,"cc-color-range-section")(1,"cc-gradient-mode-picker",1),t&2){let e=L();h(),R("groupName",e.popoverId()+"-gradient-mode")}}var Mc=(()=>{class t{constructor(e,i){this.mapStateReadWindow=e,this.fileStoreReadWindow=i,this.popoverId=J.required(),this.anchorName=J.required(),this.colorMetric=F(this.mapStateReadWindow.colorMetric$,{initialValue:""}),this.isDeltaState=F(this.fileStoreReadWindow.isDeltaState$,{initialValue:!1}),this.hasRangeSection=te(()=>!this.isDeltaState()&&this.colorMetric()!=="unary")}static{this.\u0275fac=function(i){return new(i||t)(le(Ee),le(Fe))}}static{this.\u0275cmp=A({type:t,selectors:[["cc-color-settings-popover"]],hostAttrs:[1,"contents"],inputs:{popoverId:[1,"popoverId"],anchorName:[1,"anchorName"]},decls:6,vars:4,consts:[[3,"popoverId","anchorName","widthClass"],[3,"groupName"]],template:function(i,n){i&1&&(f(0,"cc-settings-popover-shell",0),W(1,"cc-color-settings-header"),K(2,F7,2,1),W(3,"cc-color-bands-section")(4,"cc-invert-reset-row")(5,"cc-folder-overrides"),p()),i&2&&(R("popoverId",n.popoverId())("anchorName",n.anchorName())("widthClass","max-w-[95vw] "+(n.hasRangeSection()?"w-[420px]":"w-80")),h(2),Q(n.hasRangeSection()?2:-1))},dependencies:[kt,zv,Ov,Uv,bb,Gv,Hv],encapsulation:2})}}return t})();var Xv=(()=>{class t{constructor(e,i,n){this.mapStateReadWindow=e,this.preferencesReadWindow=i,this.metricsBarWriteStore=n,this.searchPopoverId="metric-select-popover-color",this.searchAnchorName="metric-segment-color",this.settingsPopoverId="metric-settings-popover-color",this.settingsAnchorName="metric-segment-color-cog",this.colorMetric=F(this.mapStateReadWindow.colorMetric$,{initialValue:""}),this.isLinkedToHeight=F(this.preferencesReadWindow.isColorMetricLinkedToHeightMetric$,{initialValue:!1}),this.isRadialLayout=Vt(),this.isSelectionLocked=te(()=>this.isLinkedToHeight()&&!this.isRadialLayout())}handleMetricSelected(e){this.isLinkedToHeight()&&this.metricsBarWriteStore.unlinkColorMetricFromHeightMetric(),this.metricsBarWriteStore.setColorMetric(e)}static{this.\u0275fac=function(i){return new(i||t)(le(Ee),le(mi),le(je))}}static{this.\u0275cmp=A({type:t,selectors:[["cc-color-segment"]],hostAttrs:[1,"contents"],decls:5,vars:14,consts:[["label","Color",3,"metricName","hasCog","cogPopoverId","cogAnchorName","searchPopoverId","searchAnchorName","disabled","testId","cogTestId"],["body","",1,"flex","flex-col","items-stretch","gap-1"],["metricFor","colorMetric"],["placeholder","Color Metric (highest value)","kind","node",3,"metricSelected","popoverId","anchorName","selected"],[3,"popoverId","anchorName"]],template:function(i,n){i&1&&(f(0,"cc-axis-card",0)(1,"div",1),W(2,"cc-metric-meta-value",2),p()(),f(3,"cc-metric-bar-select-popover",3),V("metricSelected",function(a){return n.handleMetricSelected(a)}),p(),W(4,"cc-color-settings-popover",4)),i&2&&(R("metricName",n.colorMetric())("hasCog",!0)("cogPopoverId",n.settingsPopoverId)("cogAnchorName",n.settingsAnchorName)("searchPopoverId",n.searchPopoverId)("searchAnchorName",n.searchAnchorName)("disabled",n.isSelectionLocked())("testId","metric-segment-color")("cogTestId","metric-segment-color-cog"),h(3),R("popoverId",n.searchPopoverId)("anchorName",n.searchAnchorName)("selected",n.colorMetric()),h(),R("popoverId",n.settingsPopoverId)("anchorName",n.settingsAnchorName))},dependencies:[Bi,Cr,$l,Mc],encapsulation:2})}}return t})();var Kv=(()=>{class t{constructor(){this.mapStateReadWindow=E(Ee),this.metricsBarWriteStore=E(je),this.isEdgeMetricVisible=F(this.mapStateReadWindow.isEdgeMetricVisible$,{initialValue:!0})}toggle(){this.metricsBarWriteStore.toggleEdgeMetricVisible()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["cc-edge-metric-toggle"]],decls:4,vars:1,consts:[[1,"flex","items-center","gap-2","cursor-pointer"],["type","checkbox",1,"checkbox","checkbox-sm","checkbox-primary",3,"change","checked"]],template:function(i,n){i&1&&(_(0,"label",0)(1,"input",1),re("change",function(){return n.toggle()}),T(),_(2,"span"),x(3,"Disable edge metric"),T()()),i&2&&(h(),xe("checked",!n.isEdgeMetricVisible()))},encapsulation:2})}}return t})();var Qv=(()=>{class t{constructor(){this.mapStateReadWindow=E(Ee),this.metricsBarReadStore=E(dt),this.metricsBarWriteStore=E(je),this.popoverId=J.required(),this.anchorName=J.required(),this.amountOfBuildingsWithSelectedEdgeMetric=F(this.metricsBarReadStore.amountOfBuildingsWithSelectedEdgeMetric$,{initialValue:0}),this.edgePreviewLabel=F(this.metricsBarReadStore.amountOfBuildingsWithSelectedEdgeMetric$.pipe(Se(e=>`Preview the edges of up to ${e} buildings with the highest amount of incoming and outgoing edges`)),{initialValue:""}),this.amountOfEdgePreviews=F(this.mapStateReadWindow.amountOfEdgePreviews$,{initialValue:0}),this.edgeHeight=F(this.mapStateReadWindow.edgeHeight$,{initialValue:1}),this.showOutgoingEdges=F(this.mapStateReadWindow.showOutgoingEdges$,{initialValue:!1}),this.showIncomingEdges=F(this.mapStateReadWindow.showIncomingEdges$,{initialValue:!1}),this.showOnlyBuildingsWithEdges=F(this.mapStateReadWindow.showOnlyBuildingsWithEdges$,{initialValue:!1}),this.mapColors=F(this.mapStateReadWindow.mapColors$,{initialValue:Qt}),this.outgoingEdgeColor=te(()=>this.mapColors().outgoingEdge),this.incomingEdgeColor=te(()=>this.mapColors().incomingEdge),this.resetKeys=["mapState.amountOfEdgePreviews","mapState.edgeHeight","mapState.mapColors.outgoingEdge","mapState.showOutgoingEdges","mapState.mapColors.incomingEdge","mapState.showIncomingEdges","mapState.showOnlyBuildingsWithEdges","mapState.isEdgeMetricVisible"]}setAmountOfEdgePreviews(e){this.metricsBarWriteStore.setAmountOfEdgePreviews(e)}setEdgeHeight(e){this.metricsBarWriteStore.setEdgeHeight(e)}setShowOutgoingEdges(e){let i=e.target.checked;this.metricsBarWriteStore.setShowOutgoingEdges(i)}setShowIncomingEdges(e){let i=e.target.checked;this.metricsBarWriteStore.setShowIncomingEdges(i)}setShowOnlyBuildingsWithEdges(e){let i=e.target.checked;this.metricsBarWriteStore.setShowOnlyBuildingsWithEdges(i)}setMapColor(e,i){this.metricsBarWriteStore.setMapColors({[e]:i})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["cc-edge-settings-popover"]],hostAttrs:[1,"contents"],inputs:{popoverId:[1,"popoverId"],anchorName:[1,"anchorName"]},decls:32,vars:18,consts:[["widthClass","w-80",3,"popoverId","anchorName"],[3,"title"],[1,"text-sm"],["ariaLabel","Edge preview amount",3,"valueChange","min","max","value","disabled"],["title","Adjust the curve height"],["ariaLabel","Edge height",3,"valueChange","min","max","value","disabled"],[1,"flex","flex-col","gap-2"],[1,"flex","items-center","gap-2"],["ariaLabel","Outgoing edge color",3,"colorChange","hexColor"],[1,"min-w-0","flex-1","truncate","text-sm"],[1,"flex","items-center","gap-2","cursor-pointer"],["type","checkbox",1,"checkbox","checkbox-sm","checkbox-primary",3,"change","checked"],["ariaLabel","Incoming edge color",3,"colorChange","hexColor"],["type","checkbox",1,"checkbox","checkbox-sm","checkbox-primary",3,"change","checked","disabled"],["tooltip","Reset edge metric settings to their defaults","label","Reset edge metric settings",3,"settingsKeys"]],template:function(i,n){i&1&&(f(0,"cc-settings-popover-shell",0)(1,"div",1)(2,"span",2),x(3,"Preview"),p(),f(4,"cc-slider-number-input",3),V("valueChange",function(a){return n.setAmountOfEdgePreviews(a)}),p()(),f(5,"div",4)(6,"span",2),x(7,"Height"),p(),f(8,"cc-slider-number-input",5),V("valueChange",function(a){return n.setEdgeHeight(a)}),p()(),f(9,"div",6)(10,"div",7)(11,"cc-inline-color-picker",8),V("colorChange",function(a){return n.setMapColor("outgoingEdge",a)}),p(),f(12,"span",9),x(13,"Outgoing Edge"),p(),f(14,"label",10)(15,"input",11),V("change",function(a){return n.setShowOutgoingEdges(a)}),p(),f(16,"span"),x(17,"Show"),p()()(),f(18,"div",7)(19,"cc-inline-color-picker",12),V("colorChange",function(a){return n.setMapColor("incomingEdge",a)}),p(),f(20,"span",9),x(21,"Incoming Edge"),p(),f(22,"label",10)(23,"input",11),V("change",function(a){return n.setShowIncomingEdges(a)}),p(),f(24,"span"),x(25,"Show"),p()()()(),f(26,"label",10)(27,"input",13),V("change",function(a){return n.setShowOnlyBuildingsWithEdges(a)}),p(),f(28,"span"),x(29,"Only show nodes with edges"),p()(),W(30,"cc-edge-metric-toggle")(31,"cc-reset-settings-button",14),p()),i&2&&(R("popoverId",n.popoverId())("anchorName",n.anchorName()),h(),R("title",n.edgePreviewLabel()),h(3),R("min",0)("max",n.amountOfBuildingsWithSelectedEdgeMetric())("value",n.amountOfEdgePreviews())("disabled",n.amountOfBuildingsWithSelectedEdgeMetric()===0),h(4),R("min",1)("max",9)("value",n.edgeHeight())("disabled",n.amountOfBuildingsWithSelectedEdgeMetric()===0),h(3),R("hexColor",n.outgoingEdgeColor()),h(4),R("checked",n.showOutgoingEdges()),h(4),R("hexColor",n.incomingEdgeColor()),h(4),R("checked",n.showIncomingEdges()),h(4),R("checked",n.showOnlyBuildingsWithEdges())("disabled",n.amountOfBuildingsWithSelectedEdgeMetric()===0),h(4),R("settingsKeys",n.resetKeys))},dependencies:[To,Wi,Kv,kt,ti],encapsulation:2})}}return t})();function L7(t,o){t&1&&(W(0,"cc-metric-chooser-type",5),f(1,"span"),x(2),p()),t&2&&(R("metricFor","edgeMetric"),h(2),Re(o))}function D7(t,o){t&1&&(f(0,"span",2),x(1,"\xA0"),p())}var Zv=(()=>{class t{constructor(){this.mapStateReadWindow=E(Ee),this.metricsBarWriteStore=E(je),this.nodeSelectionService=E(Mr),this.searchPopoverId="metric-select-popover-edge",this.searchAnchorName="metric-segment-edges",this.settingsPopoverId="metric-settings-popover-edge",this.settingsAnchorName="metric-segment-edges-cog",this.edgeMetric=F(this.mapStateReadWindow.edgeMetric$,{initialValue:""}),this.isEdgeMetricVisible=F(this.mapStateReadWindow.isEdgeMetricVisible$,{initialValue:!0}),this.hoveredNode=F(this.nodeSelectionService.createNodeObservable()),this.hoveredEdgeValue=te(()=>{let e=this.hoveredNode(),i=this.edgeMetric();if(!e||!i)return null;let n=e.edgeAttributes?.[i];return n?`${Yv(n.incoming)} / ${Yv(n.outgoing)}`:null})}handleMetricSelected(e){this.metricsBarWriteStore.setEdgeMetric(e)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["cc-edge-segment"]],hostAttrs:[1,"contents"],decls:6,vars:15,consts:[["label","Edges",3,"metricName","hasCog","cogPopoverId","cogAnchorName","searchPopoverId","searchAnchorName","dimmed","testId","cogTestId"],["body","",1,"flex","items-center","justify-center","gap-1","text-xs","opacity-60","leading-tight","min-h-4"],["aria-hidden","true"],["placeholder","Edge Metric (highest value)","kind","edge",3,"metricSelected","popoverId","anchorName","selected"],[3,"popoverId","anchorName"],["attributeType","edges",3,"metricFor"]],template:function(i,n){if(i&1&&(f(0,"cc-axis-card",0)(1,"div",1),K(2,L7,3,2)(3,D7,2,0,"span",2),p()(),f(4,"cc-metric-bar-select-popover",3),V("metricSelected",function(a){return n.handleMetricSelected(a)}),p(),W(5,"cc-edge-settings-popover",4)),i&2){let r;R("metricName",n.edgeMetric())("hasCog",!0)("cogPopoverId",n.settingsPopoverId)("cogAnchorName",n.settingsAnchorName)("searchPopoverId",n.searchPopoverId)("searchAnchorName",n.searchAnchorName)("dimmed",!n.isEdgeMetricVisible())("testId","metric-segment-edges")("cogTestId","metric-segment-edges-cog"),h(2),Q((r=n.hoveredEdgeValue())?2:3,r),h(2),R("popoverId",n.searchPopoverId)("anchorName",n.searchAnchorName)("selected",n.edgeMetric()),h(),R("popoverId",n.settingsPopoverId)("anchorName",n.settingsAnchorName)}},dependencies:[Bi,zl,Cr,Qv],encapsulation:2})}}return t})();function Yv(t){return typeof t=="number"?t.toLocaleString():"-"}var P7=(t,o)=>o.style;function N7(t,o){if(t&1){let e=ue();f(0,"label",9)(1,"input",10),V("click",function(){let n=oe(e).$implicit,r=L();return ne(r.styleSelected.emit(n.style))}),p(),W(2,"span",11),x(3),p()}if(t&2){let e=o.$implicit,i=L();Be("btn-active",e.style===i.selectedStyle()),rt("data-testid","folder-style-"+e.style),h(),R("name",i.popoverId()+"-style")("checked",e.style===i.selectedStyle()),h(),ze("background",e.swatch),h(),we(" ",e.label," ")}}var Jv=(()=>{class t{constructor(){this.popoverId=J.required(),this.anchorName=J.required(),this.isNeutral=J.required(),this.tintPercent=J.required(),this.tintedSwatch=J.required(),this.styleSelected=fe(),this.tintPercentChange=fe(),this.selectedStyle=te(()=>this.isNeutral()?ji.Neutral:ji.Tinted),this.options=te(()=>[{style:ji.Tinted,label:"Tinted by value",swatch:this.tintedSwatch()},{style:ji.Neutral,label:"Neutral",swatch:Js}]),this.minTintPercent=20,this.maxTintPercent=100,this.tintPercentStep=10,this.resetKeys=["preferences.radialFolderValue","preferences.radialFolderStyle","preferences.radialFolderTint"]}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["cc-folder-style-popover"]],hostAttrs:[1,"contents"],inputs:{popoverId:[1,"popoverId"],anchorName:[1,"anchorName"],isNeutral:[1,"isNeutral"],tintPercent:[1,"tintPercent"],tintedSwatch:[1,"tintedSwatch"]},outputs:{styleSelected:"styleSelected",tintPercentChange:"tintPercentChange"},decls:15,vars:12,consts:[["widthClass","w-80","ariaLabel","Folder style","testId","folder-style-popover",3,"popoverId","anchorName"],[1,"text-sm","font-semibold"],[1,"flex","flex-col","gap-1"],[1,"text-xs","uppercase","tracking-wider","opacity-60"],["role","radiogroup","aria-label","Folder style",1,"join","w-full"],[1,"join-item","btn","btn-sm","flex-1","flex-nowrap","gap-1.5","whitespace-nowrap","has-[:focus-visible]:outline-2",3,"btn-active"],["ariaLabel","Tint strength",3,"valueChange","min","max","step","value","disabled"],[1,"h-2","rounded-sm"],["tooltip","Reset folder value, style and tint strength to their defaults","label","Reset folder colors",3,"settingsKeys"],[1,"join-item","btn","btn-sm","flex-1","flex-nowrap","gap-1.5","whitespace-nowrap","has-[:focus-visible]:outline-2"],["type","radio",1,"sr-only",3,"click","name","checked"],[1,"inline-block","h-2","w-3.5","shrink-0","rounded-sm"]],template:function(i,n){i&1&&(f(0,"cc-settings-popover-shell",0)(1,"span",1),x(2,"Folder style"),p(),f(3,"div",2)(4,"span",3),x(5,"Folders"),p(),f(6,"div",4),Ne(7,N7,4,8,"label",5,P7),p()(),f(9,"div",2)(10,"span",3),x(11,"Tint strength"),p(),f(12,"cc-slider-number-input",6),V("valueChange",function(a){return n.tintPercentChange.emit(a)}),p(),W(13,"div",7),p(),W(14,"cc-reset-settings-button",8),p()),i&2&&(R("popoverId",n.popoverId())("anchorName",n.anchorName()),h(7),Ve(n.options()),h(2),Be("opacity-50",n.isNeutral()),h(3),R("min",n.minTintPercent)("max",n.maxTintPercent)("step",n.tintPercentStep)("value",n.tintPercent())("disabled",n.isNeutral()),h(),ze("background",n.tintedSwatch()),h(),R("settingsKeys",n.resetKeys))},dependencies:[Wi,kt,ti],encapsulation:2})}}return t})();var V7=(t,o)=>o.value;function B7(t,o){if(t&1){let e=ue();f(0,"label",8)(1,"input",9),V("click",function(){let n=oe(e).$implicit,r=L();return ne(r.valueSelected.emit(n.value))}),p(),f(2,"span",10)(3,"span",11),x(4),p(),f(5,"span",7),x(6),p()(),W(7,"i",12),p()}if(t&2){let e=o.$implicit,i=L();Be("bg-base-200",e.value===i.selected()),rt("data-testid","folder-value-"+e.value),h(),R("name",i.popoverId()+"-value")("checked",e.value===i.selected()),h(3),Re(e.label),h(2),Re(e.description),h(),Be("invisible",e.value!==i.selected())}}var ex=(()=>{class t{constructor(){this.popoverId=J.required(),this.anchorName=J.required(),this.selected=J.required(),this.isNeutral=J.required(),this.colorMetric=J.required(),this.valueSelected=fe(),this.options=n0,this.title=te(()=>this.isNeutral()?"neutral":rr(this.selected()).label),this.footnote=te(()=>this.isNeutral()?"Folders are one grey. Pick a value to tint them again.":"Files keep their colour. Folders are tinted by this value; the cog sets neutral or the tint strength.")}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["cc-folder-value-popover"]],hostAttrs:[1,"contents"],inputs:{popoverId:[1,"popoverId"],anchorName:[1,"anchorName"],selected:[1,"selected"],isNeutral:[1,"isNeutral"],colorMetric:[1,"colorMetric"]},outputs:{valueSelected:"valueSelected"},decls:13,vars:7,consts:[["widthClass","w-80","ariaLabel","Folder value","testId","folder-value-popover",3,"popoverId","anchorName"],[1,"flex","items-baseline","justify-between","gap-2"],[1,"text-sm","font-semibold","whitespace-nowrap"],["data-testid","folder-value-title",1,"text-primary"],[1,"min-w-0","truncate","text-xs","opacity-60"],["role","radiogroup","aria-label","Folder value",1,"flex","flex-col","gap-0.5"],[1,"flex","cursor-pointer","items-center","gap-2","rounded-md","px-2","py-1","text-left","hover:bg-base-200","has-[:focus-visible]:outline-2",3,"bg-base-200"],[1,"text-xs","opacity-70"],[1,"flex","cursor-pointer","items-center","gap-2","rounded-md","px-2","py-1","text-left","hover:bg-base-200","has-[:focus-visible]:outline-2"],["type","radio",1,"sr-only",3,"click","name","checked"],[1,"flex","min-w-0","flex-1","flex-col"],[1,"text-sm","font-medium"],["aria-hidden","true",1,"fa","fa-check","text-primary"]],template:function(i,n){i&1&&(f(0,"cc-settings-popover-shell",0)(1,"div",1)(2,"span",2),x(3," Folders by "),f(4,"span",3),x(5),p()(),f(6,"span",4),x(7),p()(),f(8,"div",5),Ne(9,B7,8,9,"label",6,V7),p(),f(11,"p",7),x(12),p()()),i&2&&(R("popoverId",n.popoverId())("anchorName",n.anchorName()),h(5),Re(n.title()),h(2),we("of ",n.colorMetric()),h(),Be("opacity-60",n.isNeutral()),h(),Ve(n.options),h(3),Re(n.footnote()))},dependencies:[kt],encapsulation:2})}}return t})();var tx=100,ix=(()=>{class t{constructor(){this.valuePopoverId="metric-select-popover-folders",this.valueAnchorName="metric-segment-folders",this.stylePopoverId="metric-settings-popover-folders",this.styleAnchorName="metric-segment-folders-cog",this.preferencesReadWindow=E(mi),this.mapStateReadWindow=E(Ee),this.metricsBarWriteStore=E(je),this.folderValue=F(this.preferencesReadWindow.radialFolderValue$,{requireSync:!0}),this.isNeutral=F(this.preferencesReadWindow.isRadialFolderNeutral$,{requireSync:!0}),this.tint=F(this.preferencesReadWindow.radialFolderTint$,{requireSync:!0}),this.colorMetric=F(this.mapStateReadWindow.colorMetric$,{requireSync:!0}),this.swatch=F(this.preferencesReadWindow.radialFolderSwatch$,{requireSync:!0}),this.tintedSwatch=F(this.preferencesReadWindow.radialTintedFolderSwatch$,{requireSync:!0}),this.tintPercent=te(()=>Math.round(this.tint()*tx)),this.valueLabel=te(()=>rr(this.folderValue()).label),this.styleLabel=te(()=>this.isNeutral()?"neutral":`tinted ${this.tintPercent()} %`)}selectValue(e){this.metricsBarWriteStore.setRadialFolderValue(e),this.isNeutral()&&this.metricsBarWriteStore.setRadialFolderStyle(ji.Tinted)}selectStyle(e){this.metricsBarWriteStore.setRadialFolderStyle(e)}setTintPercent(e){this.metricsBarWriteStore.setRadialFolderTint(e/tx)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["cc-folders-segment"]],hostAttrs:[1,"contents"],decls:7,vars:22,consts:[["label","Folders",3,"metricName","dimmed","hasCog","cogPopoverId","cogAnchorName","searchPopoverId","searchAnchorName","testId","cogTestId"],["body","",1,"flex","items-center","justify-center","gap-1","text-xs","leading-tight","min-h-4"],[1,"inline-block","h-2","w-3.5","shrink-0","rounded-sm","border","border-base-300"],["data-testid","metric-segment-folders-style",1,"font-medium"],[3,"valueSelected","popoverId","anchorName","selected","isNeutral","colorMetric"],[3,"styleSelected","tintPercentChange","popoverId","anchorName","isNeutral","tintPercent","tintedSwatch"]],template:function(i,n){i&1&&(f(0,"cc-axis-card",0)(1,"div",1),W(2,"span",2),f(3,"span",3),x(4),p()()(),f(5,"cc-folder-value-popover",4),V("valueSelected",function(a){return n.selectValue(a)}),p(),f(6,"cc-folder-style-popover",5),V("styleSelected",function(a){return n.selectStyle(a)})("tintPercentChange",function(a){return n.setTintPercent(a)}),p()),i&2&&(R("metricName",n.valueLabel())("dimmed",n.isNeutral())("hasCog",!0)("cogPopoverId",n.stylePopoverId)("cogAnchorName",n.styleAnchorName)("searchPopoverId",n.valuePopoverId)("searchAnchorName",n.valueAnchorName)("testId","metric-segment-folders")("cogTestId","metric-segment-folders-cog"),h(2),ze("background",n.swatch()),h(2),Re(n.styleLabel()),h(),R("popoverId",n.valuePopoverId)("anchorName",n.valueAnchorName)("selected",n.folderValue())("isNeutral",n.isNeutral())("colorMetric",n.colorMetric()),h(),R("popoverId",n.stylePopoverId)("anchorName",n.styleAnchorName)("isNeutral",n.isNeutral())("tintPercent",n.tintPercent())("tintedSwatch",n.tintedSwatch()))},dependencies:[Bi,Jv,ex],encapsulation:2})}}return t})();function W7(t,o){if(t&1){let e=ue();f(0,"label",4)(1,"input",6),V("change",function(n){oe(e);let r=L();return ne(r.toggleInvertHeight(n))}),p(),f(2,"span"),x(3,"Invert Height"),p()()}if(t&2){let e=L();h(),R("checked",e.invertHeight())}}var ox=(()=>{class t{constructor(){this.mapStateReadWindow=E(Ee),this.fileStoreReadWindow=E(Fe),this.metricsBarWriteStore=E(je),this.popoverId=J.required(),this.anchorName=J.required(),this.scalingY=F(this.mapStateReadWindow.scaling$,{initialValue:{x:1,y:1,z:1}}),this.invertHeight=F(this.mapStateReadWindow.invertHeight$,{initialValue:!1}),this.isDeltaState=F(this.fileStoreReadWindow.isDeltaState$,{initialValue:!1}),this.resetKeys=["mapState.scaling.y","mapState.invertHeight"]}setScalingY(e){this.metricsBarWriteStore.setScaling({y:e})}toggleInvertHeight(e){let i=e.target.checked;this.metricsBarWriteStore.setInvertHeight(i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["cc-height-settings-popover"]],hostAttrs:[1,"contents"],inputs:{popoverId:[1,"popoverId"],anchorName:[1,"anchorName"]},decls:7,vars:7,consts:[[3,"popoverId","anchorName"],["title","Height scaling"],[1,"text-sm"],["ariaLabel","Height",3,"valueChange","min","max","value"],[1,"flex","items-center","gap-2","cursor-pointer"],["tooltip","Reset height metric settings to their defaults","label","Reset height metric settings",3,"settingsKeys"],["type","checkbox",1,"checkbox","checkbox-sm","checkbox-primary",3,"change","checked"]],template:function(i,n){i&1&&(f(0,"cc-settings-popover-shell",0)(1,"div",1)(2,"span",2),x(3,"Height"),p(),f(4,"cc-slider-number-input",3),V("valueChange",function(a){return n.setScalingY(a)}),p()(),K(5,W7,4,1,"label",4),W(6,"cc-reset-settings-button",5),p()),i&2&&(R("popoverId",n.popoverId())("anchorName",n.anchorName()),h(4),R("min",1)("max",25)("value",n.scalingY().y),h(),Q(n.isDeltaState()?-1:5),h(),R("settingsKeys",n.resetKeys))},dependencies:[Wi,kt,ti],encapsulation:2})}}return t})();var nx=(()=>{class t{constructor(){this.searchPopoverId="metric-select-popover-height",this.searchAnchorName="metric-segment-height",this.settingsPopoverId="metric-settings-popover-height",this.settingsAnchorName="metric-segment-height-cog",this.mapStateReadWindow=E(Ee),this.metricsBarWriteStore=E(je),this.heightMetric=F(this.mapStateReadWindow.heightMetric$,{initialValue:""})}handleMetricSelected(e){this.metricsBarWriteStore.setHeightMetric(e)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["cc-height-segment"]],hostAttrs:[1,"contents"],decls:2,vars:7,consts:[["label","Height","metricFor","heightMetric","placeholder","Height Metric (highest value)","testIdPrefix","metric-segment-height",3,"metricSelected","metricName","searchPopoverId","searchAnchorName","settingsPopoverId","settingsAnchorName"],[3,"popoverId","anchorName"]],template:function(i,n){i&1&&(f(0,"cc-metric-segment",0),V("metricSelected",function(a){return n.handleMetricSelected(a)}),W(1,"cc-height-settings-popover",1),p()),i&2&&(R("metricName",n.heightMetric())("searchPopoverId",n.searchPopoverId)("searchAnchorName",n.searchAnchorName)("settingsPopoverId",n.settingsPopoverId)("settingsAnchorName",n.settingsAnchorName),h(),R("popoverId",n.settingsPopoverId)("anchorName",n.settingsAnchorName))},dependencies:[jl,ox],encapsulation:2})}}return t})();var Tt={areaMetric:{group:"area",label:"Area metric",isMetricSelection:!0,isAppliedFirst:!0,read:t=>t.state.mapState.areaMetric,patch:t=>({mapState:{areaMetric:t.areaMetric}})},margin:{group:"area",label:"Margin",read:t=>t.state.mapState.margin,patch:t=>({mapState:{margin:t.margin}})},invertArea:{group:"area",label:"Invert area",read:t=>t.state.mapState.invertArea,patch:t=>({mapState:{invertArea:t.invertArea}})},enableFloorLabels:{group:"area",label:"Floor labels",read:t=>t.state.mapState.enableFloorLabels,patch:t=>({mapState:{enableFloorLabels:t.enableFloorLabels}})},heightMetric:{group:"height",label:"Height metric",isMetricSelection:!0,isAppliedFirst:!0,read:t=>t.state.mapState.heightMetric,patch:t=>({mapState:{heightMetric:t.heightMetric}})},heightScaling:{group:"height",label:"Height scaling",read:t=>t.state.mapState.scaling.y,patch:t=>({mapState:{scaling:{y:t.heightScaling}}})},invertHeight:{group:"height",label:"Invert height",read:t=>t.state.mapState.invertHeight,patch:t=>({mapState:{invertHeight:t.invertHeight}})},colorMetric:{group:"color",label:"Color metric",isMetricSelection:!0,isAppliedFirst:!0,read:t=>t.state.mapState.colorMetric,patch:t=>({mapState:{colorMetric:t.colorMetric}})},isColorMetricLinkedToHeightMetric:{group:"color",label:"Color follows height metric",isAppliedFirst:!0,read:t=>t.state.preferences.isColorMetricLinkedToHeightMetric,patch:t=>({preferences:{isColorMetricLinkedToHeightMetric:t.isColorMetricLinkedToHeightMetric}})},colorRange:{group:"color",label:"Color range",read:t=>ae({},t.state.mapState.colorRange),patch:t=>({mapState:{colorRange:t.colorRange}})},colorMode:{group:"color",label:"Gradient mode",read:t=>t.state.mapState.colorMode,patch:t=>({mapState:{colorMode:t.colorMode}})},mapColors:{group:"color",label:"Colors",read:t=>O7(t.state.mapState.mapColors),patch:t=>({mapState:{mapColors:t.mapColors}})},markedPackages:{group:"color",label:"Folder color overrides",read:t=>[...t.state.sharedView.markedPackages],patch:t=>({sharedView:{markedPackages:[...t.markedPackages]}})},edgeMetric:{group:"edge",label:"Edge metric",isMetricSelection:!0,isAppliedFirst:!0,read:t=>t.state.mapState.edgeMetric,patch:t=>({mapState:{edgeMetric:t.edgeMetric}})},isEdgeMetricVisible:{group:"edge",label:"Edge metric enabled",read:t=>t.state.mapState.isEdgeMetricVisible,patch:t=>({mapState:{isEdgeMetricVisible:t.isEdgeMetricVisible}})},amountOfEdgePreviews:{group:"edge",label:"Edge previews",read:t=>t.state.mapState.amountOfEdgePreviews,patch:t=>({mapState:{amountOfEdgePreviews:t.amountOfEdgePreviews}})},edgeHeight:{group:"edge",label:"Edge curve height",read:t=>t.state.mapState.edgeHeight,patch:t=>({mapState:{edgeHeight:t.edgeHeight}})},showOutgoingEdges:{group:"edge",label:"Show outgoing edges",read:t=>t.state.mapState.showOutgoingEdges,patch:t=>({mapState:{showOutgoingEdges:t.showOutgoingEdges}})},showIncomingEdges:{group:"edge",label:"Show incoming edges",read:t=>t.state.mapState.showIncomingEdges,patch:t=>({mapState:{showIncomingEdges:t.showIncomingEdges}})},showOnlyBuildingsWithEdges:{group:"edge",label:"Only nodes with edges",read:t=>t.state.mapState.showOnlyBuildingsWithEdges,patch:t=>({mapState:{showOnlyBuildingsWithEdges:t.showOnlyBuildingsWithEdges}})},edgeColors:{group:"edge",label:"Edge colors",read:t=>({outgoingEdge:t.state.mapState.mapColors.outgoingEdge,incomingEdge:t.state.mapState.mapColors.incomingEdge}),patch:t=>({mapState:{mapColors:ae({},t.edgeColors)}})},amountOfTopLabels:{group:"labels",label:"Top labels",read:t=>t.state.mapState.amountOfTopLabels,patch:t=>({mapState:{amountOfTopLabels:t.amountOfTopLabels}})},labelsPerMap:{group:"labels",label:"Top labels scope",read:t=>t.state.mapState.labelsPerMap,patch:t=>({mapState:{labelsPerMap:t.labelsPerMap}})},labelSize:{group:"labels",label:"Label size",read:t=>t.state.mapState.labelSize,patch:t=>({mapState:{labelSize:t.labelSize}})},labelMode:{group:"labels",label:"Label mode",read:t=>t.state.mapState.labelMode,patch:t=>({mapState:{labelMode:t.labelMode}})},showMetricLabelNodeName:{group:"labels",label:"Show node names",read:t=>t.state.mapState.showMetricLabelNodeName,patch:t=>({mapState:{showMetricLabelNodeName:t.showMetricLabelNodeName}})},showMetricLabelNameValue:{group:"labels",label:"Show metric values",read:t=>t.state.mapState.showMetricLabelNameValue,patch:t=>({mapState:{showMetricLabelNameValue:t.showMetricLabelNameValue}})},groupLabelCollisions:{group:"labels",label:"Group overlapping labels",read:t=>t.state.mapState.groupLabelCollisions,patch:t=>({mapState:{groupLabelCollisions:t.groupLabelCollisions}})},colorLabels:{group:"labels",label:"Labels by color metric",read:t=>ae({},t.state.mapState.colorLabels),patch:t=>({mapState:{colorLabels:t.colorLabels}})},camera:{group:"camera",label:"Position and zoom",read:t=>({position:ae({},t.camera.position),target:ae({},t.camera.target)})},excludedNodes:{group:"filters",label:"Excluded nodes",read:t=>[...t.state.sharedView.excludedNodes],patch:t=>({sharedView:{excludedNodes:[...t.excludedNodes]}})},flattenedNodes:{group:"filters",label:"Flattened nodes",read:t=>[...t.state.sharedView.flattenedNodes],patch:t=>({sharedView:{flattenedNodes:[...t.flattenedNodes]}})},metricRules:{group:"filters",label:"Flattened and excluded by metric",read:t=>[...t.state.sharedView.metricRules],patch:t=>({sharedView:{metricRules:[...t.metricRules]}})},focusedNodePath:{group:"filters",label:"Focused folder",read:t=>[...t.state.sharedView.focusedNodePath],patch:t=>({sharedView:{focusedNodePath:[...t.focusedNodePath]}})}};function O7(t){let n=t,{outgoingEdge:o,incomingEdge:e}=n;return to(n,["outgoingEdge","incomingEdge"])}var gn=Object.keys(Tt),Sa={area:"Area",height:"Height",color:"Color",edge:"Edges",labels:"Labels",camera:"Camera",filters:"Filters"},_c=Object.keys(Sa),Ec={area:"fa-th-large",height:"fa-bar-chart",color:"fa-paint-brush",edge:"fa-share-alt",labels:"fa-tags",camera:"fa-video-camera",filters:"fa-filter"};function wu(t){return!!Tt[t].isMetricSelection}var wX=gn.filter(wu);function yu(t){return!!Tt[t].isAppliedFirst}function rx(t,o){return Object.fromEntries(Object.entries(t).filter(([e])=>o.has(e)))}function ax(t,o){let e={};for(let i of gn){if(!o.has(i))continue;let n=Tt[i].read(t);n!==void 0&&(e[i]=n)}return e}var kc=".ccscenario",qc=3;function Su(t){return gn.filter(o=>t.settings[o]!==void 0)}function sx(t){let o=new Set(Su(t).map(e=>Tt[e].group));return _c.filter(e=>o.has(e))}function lx(t){return Te(ae(ae({schemaVersion:qc,name:t.name},t.description?{description:t.description}:{}),t.mapFileNames?.length>0?{mapFileNames:t.mapFileNames}:{}),{settings:t.settings})}function cx(t){return{id:crypto.randomUUID(),name:t.name,description:t.description,mapFileNames:t.mapFileNames,createdAt:Date.now(),settings:t.settings}}var hx=(t,o)=>o.key;function z7(t,o){if(t&1){let e=ue();_(0,"label",8)(1,"input",12),re("change",function(n){let r=oe(e).$implicit,a=L(2);return ne(a.toggleSetting(r.key,n.target.checked))}),T(),_(2,"span",13),x(3),T()()}if(t&2){let e=o.$implicit;h(),xe("checked",e.selected),rt("data-testid","scenario-setting-"+e.key),h(2),Re(e.label)}}function $7(t,o){if(t&1){let e=ue();_(0,"div",7)(1,"label",8)(2,"input",9),re("change",function(n){let r=oe(e).$implicit,a=L();return ne(a.toggleGroup(r,n.target.checked))}),T(),Ce(3,"i"),_(4,"span",10),x(5),T()(),_(6,"div",11),Ne(7,z7,4,3,"label",8,hx),T()()}if(t&2){let e=o.$implicit;h(2),xe("checked",e.allSelected)("indeterminate",e.someSelected&&!e.allSelected),rt("data-testid","scenario-group-"+e.key),h(),zt(Tn("fa ",e.icon," w-4 text-center opacity-60")),h(2),Re(e.label),h(2),Ve(e.settings)}}var Tc=(()=>{class t{constructor(){this.availableKeys=J.required(),this.defaultKeys=J.required(),this.selectedKeys=np.required(),this.isDefaultSelection=te(()=>{let e=this.selectedKeys(),i=this.defaultKeys();return e.size===i.length&&i.every(n=>e.has(n))}),this.groups=te(()=>{let e=this.selectedKeys(),i=this.availableKeys();return _c.map(n=>this.toPickerGroup(n,i,e)).filter(n=>n.settings.length>0)})}selectAll(){this.selectedKeys.set(new Set(this.availableKeys()))}selectNone(){this.selectedKeys.set(new Set)}resetSelection(){this.selectedKeys.set(new Set(this.defaultKeys()))}toggleSetting(e,i){this.selectedKeys.update(n=>dx(n,[e],i))}toggleGroup(e,i){this.selectedKeys.update(n=>dx(n,e.settings.map(r=>r.key),i))}toPickerGroup(e,i,n){let r=i.filter(a=>Tt[a].group===e).map(a=>({key:a,label:Tt[a].label,selected:n.has(a)}));return{key:e,label:Sa[e],icon:Ec[e],settings:r,allSelected:r.length>0&&r.every(a=>a.selected),someSelected:r.some(a=>a.selected)}}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["cc-scenario-settings-picker"]],inputs:{availableKeys:[1,"availableKeys"],defaultKeys:[1,"defaultKeys"],selectedKeys:[1,"selectedKeys"]},outputs:{selectedKeys:"selectedKeysChange"},decls:13,vars:1,consts:[[1,"mb-1","flex","items-center","justify-between","gap-2"],[1,"text-xs","uppercase","tracking-wide","opacity-60"],[1,"join"],["type","button","data-testid","scenario-settings-select-all",1,"btn","btn-xs","join-item",3,"click"],["type","button","data-testid","scenario-settings-select-none",1,"btn","btn-xs","join-item",3,"click"],["type","button","data-testid","scenario-settings-reset",1,"btn","btn-xs","join-item",3,"click","disabled"],[1,"flex","flex-col","gap-2","max-h-64","overflow-y-auto","pr-1"],[1,"flex","flex-col","gap-1"],[1,"flex","items-center","gap-2","cursor-pointer"],["type","checkbox",1,"checkbox","checkbox-sm","checkbox-primary",3,"change","checked","indeterminate"],[1,"text-sm","font-semibold"],[1,"flex","flex-col","gap-0.5","pl-7"],["type","checkbox",1,"checkbox","checkbox-xs","checkbox-primary",3,"change","checked"],[1,"text-xs"]],template:function(i,n){i&1&&(_(0,"div",0)(1,"span",1),x(2,"Toggle all"),T(),_(3,"div",2)(4,"button",3),re("click",function(){return n.selectAll()}),x(5," On "),T(),_(6,"button",4),re("click",function(){return n.selectNone()}),x(7," Off "),T(),_(8,"button",5),re("click",function(){return n.resetSelection()}),x(9," Reset "),T()()(),_(10,"div",6),Ne(11,$7,9,7,"div",7,hx),T()),i&2&&(h(8),xe("disabled",n.isDefaultSelection()),h(3),Ve(n.groups()))},encapsulation:2})}}return t})();function dx(t,o,e){let i=new Set(t);for(let n of o)e?i.add(n):i.delete(n);return i}function Rc(t){return`${t} ${t===1?"setting":"settings"}`}var Ac=(()=>{class t{constructor(e,i){this.store=e,this.ccStateSnapshot=i}getValue(){return this.ccStateSnapshot.get()}setStatePatch(e){this.store.dispatch(ei({value:e}))}static{this.\u0275fac=function(i){return new(i||t)(M(me),M(Pt))}}static{this.\u0275prov=O({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var j7=["areaMetric","heightMetric","colorMetric"],Ic=(()=>{class t{constructor(e,i,n,r){this.scenariosStore=e,this.threeCameraService=i,this.threeMapControlsService=n,this.threeRendererService=r}getAvailableMetricNames(e){return{nodeMetrics:new Set(e.nodeMetricData.map(i=>i.name)),edgeMetrics:new Set(e.edgeMetricData.map(i=>i.name))}}getMissingMetrics(e,i){let n=this.getAvailableMetricNames(i),r=j7.map(a=>e[a]).filter(a=>!!a);return{nodeMetrics:[...new Set(r.filter(a=>!n.nodeMetrics.has(a)))],edgeMetrics:e.edgeMetric&&!n.edgeMetrics.has(e.edgeMetric)?[e.edgeMetric]:[]}}hasMissingMetrics(e){return e.nodeMetrics.length>0||e.edgeMetrics.length>0}buildOrderedStatePatches(e,i,n){let r=this.getApplicableKeys(e,i,n);return[this.mergePatchesOf(e,r.filter(yu)),this.mergePatchesOf(e,r.filter(a=>!yu(a)))].filter(a=>Object.keys(a).length>0)}getCameraVectors(e){if(!e.camera)return;let{position:i,target:n}=e.camera;return{position:new Ze(i.x,i.y,i.z),target:new Ze(n.x,n.y,n.z)}}async applyScenario(e,i,n){$d(!0);try{let r=i.has("camera")?this.getCameraVectors(e.settings):void 0,a=r!==void 0,s=this.buildOrderedStatePatches(e.settings,i,n),l=a&&s.length>0?this.scenariosStore.getValue().preferences.resetCameraIfNewFileIsLoaded:void 0;l&&s.length>0&&(s[0].preferences=Te(ae({},s[0].preferences),{resetCameraIfNewFileIsLoaded:!1}));for(let d of s)this.scenariosStore.setStatePatch(d),await new Promise(c=>setTimeout(c));if(a&&this.threeCameraService.camera){let{position:d,target:c}=r;this.threeCameraService.camera.position.set(d.x,d.y,d.z),this.threeMapControlsService.setControlTarget(c),this.threeCameraService.camera.lookAt(c),this.threeCameraService.camera.updateProjectionMatrix(),this.threeMapControlsService.updateControls()}l&&setTimeout(()=>{this.scenariosStore.setStatePatch({preferences:{resetCameraIfNewFileIsLoaded:!0}})}),this.threeRendererService.render()}finally{$d(!1)}}getApplicableKeys(e,i,n){let r=n?this.getAvailableMetricNames(n):void 0;return[...i].filter(a=>e[a]!==void 0&&Tt[a].patch!==void 0&&this.isMetricAvailable(a,e,r))}isMetricAvailable(e,i,n){if(!n||!wu(e))return!0;let r=i[e]??"";return e==="edgeMetric"?r===""||n.edgeMetrics.has(r):n.nodeMetrics.has(r)}mergePatchesOf(e,i){let n={};for(let r of i){let a=Tt[r].patch;a&&(n=px(n,a(e)))}return n}static{this.\u0275fac=function(i){return new(i||t)(M(Ac),M(or),M(Et),M(Nt))}}static{this.\u0275prov=O({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function px(t,o){let e=ae({},t);for(let[i,n]of Object.entries(o)){let r=e[i];e[i]=mx(n)&&mx(r)?px(ae({},r),n):n}return e}function mx(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}var H7=["dialog"];function U7(t,o){if(t&1&&(f(0,"div",4)(1,"span",13),W(2,"i",14),f(3,"span",15),x(4),p()()()),t&2){let e=L();h(),R("title",e.scenario().mapFileNames.join(", ")),h(3),Re(e.scenario().mapFileNames.join(", "))}}function G7(t,o){if(t&1&&(f(0,"li"),x(1),p()),t&2){let e=o.$implicit;h(),we("",e," (node metric)")}}function X7(t,o){if(t&1&&(f(0,"li"),x(1),p()),t&2){let e=o.$implicit;h(),we("",e," (edge metric)")}}function K7(t,o){if(t&1&&(f(0,"div",7),W(1,"i",16),f(2,"div")(3,"strong"),x(4,"Some metrics are not available in the current map and will not be applied:"),p(),f(5,"ul",17),Ne(6,G7,2,1,"li",null,si),Ne(8,X7,2,1,"li",null,si),p()()()),t&2){let e=L();h(6),Ve(e.missingMetrics().nodeMetrics),h(2),Ve(e.missingMetrics().edgeMetrics)}}var Cu=(()=>{class t{constructor(e){this.scenarioApplier=e,this.scenario=J.required(),this.metricData=J.required(),this.closed=fe(),this.dialogElement=Ue.required("dialog"),this.availableKeys=te(()=>Su(this.scenario())),this.defaultKeys=te(()=>this.availableKeys().filter(i=>Tt[i].group!=="camera")),this.selectedKeys=op(()=>new Set(this.defaultKeys())),this.missingMetrics=te(()=>this.scenarioApplier.getMissingMetrics(rx(this.scenario().settings,this.selectedKeys()),this.metricData())),this.hasMissing=te(()=>this.scenarioApplier.hasMissingMetrics(this.missingMetrics())),this.hasAnySelected=te(()=>this.selectedKeys().size>0),this.applySelectedLabel=te(()=>`Apply ${Rc(this.selectedKeys().size)}`),this.destroyRef=E(Ga)}ngAfterViewInit(){let e=this.dialogElement().nativeElement,i=()=>this.closed.emit();e.addEventListener("close",i),this.destroyRef.onDestroy(()=>e.removeEventListener("close",i)),e.showModal()}async apply(){await this.applyKeys(this.selectedKeys())}async applyAll(){await this.applyKeys(new Set(this.availableKeys()))}async applyKeys(e){this.dialogElement().nativeElement.close(),await this.scenarioApplier.applyScenario(this.scenario(),e,this.metricData())}close(){this.dialogElement().nativeElement.close()}static{this.\u0275fac=function(i){return new(i||t)(le(Ic))}}static{this.\u0275cmp=A({type:t,selectors:[["cc-apply-scenario-dialog"]],viewQuery:function(i,n){i&1&&tt(n.dialogElement,H7,5),i&2&&it()},inputs:{scenario:[1,"scenario"],metricData:[1,"metricData"]},outputs:{closed:"closed"},decls:20,vars:9,consts:[["dialog",""],["aria-labelledby","apply-scenario-title",1,"modal"],[1,"modal-box","max-w-md"],["id","apply-scenario-title",1,"text-xl","font-bold","mb-1","truncate",3,"title"],[1,"mb-3"],[1,"text-sm","text-base-content/60","mb-3"],[3,"selectedKeysChange","availableKeys","defaultKeys","selectedKeys"],[1,"alert","alert-warning","mt-4","text-sm"],[1,"modal-action"],[1,"btn",3,"click"],["title","Apply everything this scenario holds, the camera included","data-testid","apply-scenario-all",1,"btn","btn-outline",3,"click"],["data-testid","apply-scenario-selected",1,"btn","btn-primary",3,"click","disabled"],["method","dialog",1,"modal-backdrop"],[1,"badge","badge-sm","badge-outline","gap-1","max-w-full","overflow-hidden",3,"title"],[1,"fa","fa-map-pin","text-[9px]","shrink-0"],[1,"truncate"],[1,"fa","fa-exclamation-triangle"],[1,"list-disc","pl-5","mt-1"]],template:function(i,n){if(i&1){let r=ue();f(0,"dialog",1,0)(2,"div",2)(3,"h2",3),x(4),p(),K(5,U7,5,2,"div",4),f(6,"p",5),x(7,"Select which settings to apply:"),p(),f(8,"cc-scenario-settings-picker",6),ts("selectedKeysChange",function(s){return oe(r),es(n.selectedKeys,s)||(n.selectedKeys=s),ne(s)}),p(),K(9,K7,10,0,"div",7),f(10,"div",8)(11,"button",9),V("click",function(){return n.close()}),x(12,"Cancel"),p(),f(13,"button",10),V("click",function(){return n.applyAll()}),x(14," Apply all "),p(),f(15,"button",11),V("click",function(){return n.apply()}),x(16),p()()(),f(17,"form",12)(18,"button"),x(19,"close"),p()()()}i&2&&(h(3),R("title","Apply: "+n.scenario().name),h(),we("Apply: ",n.scenario().name),h(),Q(n.scenario().mapFileNames?.length?5:-1),h(3),R("availableKeys",n.availableKeys())("defaultKeys",n.defaultKeys()),Ja("selectedKeys",n.selectedKeys),h(),Q(n.hasMissing()?9:-1),h(6),R("disabled",!n.hasAnySelected()),h(),we(" ",n.applySelectedLabel()," "))},dependencies:[dr,cr,sr,lr,Tc],encapsulation:2})}}return t})();function bx(t){return t.settings?Q7(t.settings):Z7(t.sections??{})}function Q7(t){let o=t;if(!o.blacklist)return t;let n=o,{blacklist:e}=n,i=to(n,["blacklist"]);return wx(Te(ae({},i),{excludedNodes:e.filter(r=>r.type!=="flatten").map(({path:r})=>({path:r})),flattenedNodes:e.filter(r=>r.type==="flatten").map(({path:r})=>({path:r}))}))}function vx(t){let i=t,{sections:o}=i,e=to(i,["sections"]);return Te(ae({},e),{settings:bx(t)})}var Y7=new Set([1,2,qc]);function xx(t){let o=t;if(!(!o?.name||!Y7.has(o.schemaVersion))&&!(!o.sections&&!o.settings))return{schemaVersion:qc,name:o.name,description:o.description,mapFileNames:o.mapFileNames,settings:bx(o)}}function Z7(t){let{metrics:o,colors:e,camera:i,filters:n,labelsAndFolders:r}=t,c=e?.mapColors??{},{outgoingEdge:a,incomingEdge:s}=c,l=to(c,["outgoingEdge","incomingEdge"]),d=a!==void 0||s!==void 0;return wx({areaMetric:o?.areaMetric,enableFloorLabels:r?.enableFloorLabels,heightMetric:o?.heightMetric,colorMetric:o?.colorMetric,isColorMetricLinkedToHeightMetric:o?.isColorMetricLinkedToHeightMetric,colorRange:e?.colorRange,colorMode:e?.colorMode,mapColors:Object.keys(l).length>0?l:void 0,markedPackages:r?.markedPackages,edgeMetric:o?.edgeMetric,edgeColors:d?{outgoingEdge:a,incomingEdge:s}:void 0,amountOfTopLabels:r?.amountOfTopLabels,labelSize:r?.labelSize,labelMode:r?.labelMode,showMetricLabelNodeName:r?.showMetricLabelNodeName,showMetricLabelNameValue:r?.showMetricLabelNameValue,groupLabelCollisions:r?.groupLabelCollisions,colorLabels:r?.colorLabels,camera:i,excludedNodes:n?.blacklist?.filter(u=>u.type!=="flatten"),flattenedNodes:n?.blacklist?.filter(u=>u.type==="flatten"),focusedNodePath:n?.focusedNodePath})}function wx(t){return Object.fromEntries(Object.entries(t).filter(([,o])=>o!==void 0))}var Fc=(()=>{class t{async readAll(){return(await(await Gr()).getAll(Ur)).map(vx)}async add(e){let n=(await Gr()).transaction(Ur,"readwrite");await Promise.all([n.store.add(e),n.done])}async update(e){let n=(await Gr()).transaction(Ur,"readwrite");await Promise.all([n.store.put(e),n.done])}async delete(e){let n=(await Gr()).transaction(Ur,"readwrite");await Promise.all([n.store.delete(e),n.done])}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=O({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Sx={position:{x:0,y:300,z:1e3},target:{x:0,y:0,z:0}},Lc={positive:"#69AE40",neutral:"#ddcc00",negative:"#820E0E"},J7={positive:Lc.negative,neutral:Lc.neutral,negative:Lc.positive,isColorRangeInverted:!0},eC=[{id:"built-in-rloc",name:"Real Lines of Code",description:"Visualize code size using real lines of code",metric:"rloc",colorRange:{from:250,to:500}},{id:"built-in-complexity",name:"Complexity",description:"Visualize cyclomatic complexity",metric:"complexity",colorRange:{from:50,to:100}},{id:"built-in-comment-lines",name:"Comment Lines",description:"Visualize comment density",metric:"comment_lines",colorRange:{from:50,to:100}},{id:"built-in-code-smells",name:"Code Smells",description:"Visualize code smell density",metric:"sonar_code_smells",colorRange:{from:10,to:50}},{id:"built-in-logic-complexity",name:"Logic Complexity",description:"Visualize cognitive/logic complexity",metric:"logic_complexity",colorRange:{from:40,to:80}},{id:"built-in-max-complexity-per-function",name:"Max Complexity per Function",description:"Visualize maximum complexity per function",metric:"max_complexity_per_function",colorRange:{from:10,to:20}},{id:"built-in-authors",name:"Authors",description:"Visualize the number of authors per file",metric:"number_of_authors",colorRange:{from:2,to:3},colorMode:Ho.absolute,mapColors:J7}],Cx=eC.map(t=>({id:t.id,name:t.name,description:t.description,createdAt:0,isBuiltIn:!0,settings:{areaMetric:"rloc",heightMetric:t.metric,colorMetric:t.metric,isColorMetricLinkedToHeightMetric:!0,colorRange:t.colorRange,colorMode:t.colorMode??Ho.weightedGradient,mapColors:t.mapColors??Lc}})),Qi=(()=>{class t{constructor(e,i,n,r){this.scenariosStore=e,this.threeCameraService=i,this.threeMapControlsService=n,this.db=r,this.scenarios$=new Fm([])}async loadScenarios(){try{let e=await this.db.readAll();e.sort((i,n)=>n.createdAt-i.createdAt),this.scenarios$.next([...e,...Cx])}catch(e){console.error("Failed to load scenarios from IndexedDB:",e),this.scenarios$.next([...Cx])}}async saveScenario(e){let i=this.buildScenario(e,this.readCurrentSource());try{await this.db.add(i),await this.loadScenarios()}catch(n){console.error("Failed to save scenario:",n)}return i}async removeScenario(e){try{await this.db.delete(e),await this.loadScenarios()}catch(i){console.error("Failed to remove scenario:",i)}}buildScenario(e,i){return{id:crypto.randomUUID(),name:e.name,description:e.description,mapFileNames:e.mapFileNames,createdAt:Date.now(),settings:ax(i,e.selectedKeys)}}readCurrentSource(){return{state:this.scenariosStore.getValue(),camera:this.readCurrentCamera()}}readCurrentCamera(){let e=this.threeCameraService.camera?.position,i=this.threeMapControlsService.controls?.target;return{position:e?{x:e.x,y:e.y,z:e.z}:Sx.position,target:i?{x:i.x,y:i.y,z:i.z}:Sx.target}}static{this.\u0275fac=function(i){return new(i||t)(M(Ac),M(or),M(Et),M(Fc))}}static{this.\u0275prov=O({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var tC=["dialog"];function iC(t,o){t&1&&(f(0,"span",8),x(1,"A name is required."),p())}var _u=gn.filter(t=>Tt[t].group!=="camera"),Eu=(()=>{class t{constructor(e,i){this.scenariosService=e,this.fileStoreReadWindow=i,this.dialogElement=Ue.required("dialog"),this.name=ke(""),this.description=ke(""),this.bindToMap=ke(!1),this.nameValid=te(()=>this.name().trim().length>0),this.availableKeys=gn,this.defaultKeys=_u,this.selectedKeys=ke(new Set(_u)),this.selectionSummary=te(()=>`${this.selectedKeys().size} of ${this.availableKeys.length} settings`),this.saveLabel=te(()=>`Save ${Rc(this.selectedKeys().size)}`),this.visibleFileNames=F(this.fileStoreReadWindow.files$.pipe(Se(n=>In(n).map(r=>r.fileMeta.fileName))),{initialValue:[]}),this.hasFiles=te(()=>this.visibleFileNames().length>0)}open(){this.name.set(""),this.description.set(""),this.bindToMap.set(!1),this.selectedKeys.set(new Set(_u)),this.dialogElement().nativeElement.showModal()}close(){this.dialogElement().nativeElement.close()}async save(){if(!this.nameValid()||this.selectedKeys().size===0)return;let e=this.bindToMap()&&this.hasFiles()?this.visibleFileNames():void 0;await this.scenariosService.saveScenario({name:this.name(),description:this.description()||void 0,mapFileNames:e,selectedKeys:this.selectedKeys()}),this.close()}static{this.\u0275fac=function(i){return new(i||t)(le(Qi),le(Fe))}}static{this.\u0275cmp=A({type:t,selectors:[["cc-save-scenario-dialog"]],viewQuery:function(i,n){i&1&&tt(n.dialogElement,tC,5),i&2&&it()},decls:38,vars:13,consts:[["dialog",""],["aria-labelledby","save-scenario-title",1,"modal"],[1,"modal-box","max-w-md"],["id","save-scenario-title",1,"text-xl","font-bold","mb-4"],[1,"form-control","mb-4"],["for","scenario-name",1,"label"],[1,"label-text"],["id","scenario-name","placeholder","Enter scenario name",1,"input","input-bordered","w-full",3,"ngModelChange","ngModel"],[1,"label-text-alt","text-error"],["for","scenario-description",1,"label"],["id","scenario-description","rows","3","placeholder","Describe what this scenario captures",1,"textarea","textarea-bordered","w-full",3,"ngModelChange","ngModel"],[1,"label","cursor-pointer","justify-start","gap-3"],["type","checkbox",1,"checkbox","checkbox-sm",3,"ngModelChange","ngModel","disabled"],[1,"mb-4","rounded-md","border","border-base-300","p-2"],["data-testid","save-scenario-extended-settings",1,"cursor-pointer","text-sm"],[1,"text-xs","opacity-60"],[1,"m-0","mt-2","text-xs","opacity-60"],[1,"mt-2"],[3,"selectedKeysChange","availableKeys","defaultKeys","selectedKeys"],[1,"modal-action"],[1,"btn",3,"click"],["data-testid","save-scenario-submit",1,"btn","btn-primary",3,"click","disabled"],["method","dialog",1,"modal-backdrop"],[3,"click"]],template:function(i,n){if(i&1){let r=ue();f(0,"dialog",1,0)(2,"div",2)(3,"h2",3),x(4,"Save Scenario"),p(),f(5,"div",4)(6,"label",5)(7,"span",6),x(8,"Scenario Name"),p()(),f(9,"input",7),V("ngModelChange",function(s){return n.name.set(s)}),p(),En(),K(10,iC,2,0,"span",8),p(),f(11,"div",4)(12,"label",9)(13,"span",6),x(14,"Description (optional)"),p()(),f(15,"textarea",10),V("ngModelChange",function(s){return n.description.set(s)}),p(),En(),p(),f(16,"div",4)(17,"label",11)(18,"input",12),V("ngModelChange",function(s){return n.bindToMap.set(s)}),p(),En(),f(19,"span",6),x(20," Bind to current maps "),p()()(),f(21,"details",13)(22,"summary",14),x(23," Extended settings "),f(24,"span",15),x(25),p()(),f(26,"p",16),x(27,"Uncheck what this scenario should not carry."),p(),f(28,"div",17)(29,"cc-scenario-settings-picker",18),ts("selectedKeysChange",function(s){return oe(r),es(n.selectedKeys,s)||(n.selectedKeys=s),ne(s)}),p()()(),f(30,"div",19)(31,"button",20),V("click",function(){return n.close()}),x(32,"Cancel"),p(),f(33,"button",21),V("click",function(){return n.save()}),x(34),p()()(),f(35,"form",22)(36,"button",23),V("click",function(){return n.close()}),x(37,"close"),p()()()}i&2&&(h(9),R("ngModel",n.name()),kn(),h(),Q(!n.nameValid()&&n.name().length>0?10:-1),h(5),R("ngModel",n.description()),kn(),h(2),Be("opacity-40",!n.hasFiles()),h(),R("ngModel",n.bindToMap())("disabled",!n.hasFiles()),kn(),h(7),we("(",n.selectionSummary(),")"),h(4),R("availableKeys",n.availableKeys)("defaultKeys",n.defaultKeys),Ja("selectedKeys",n.selectedKeys),h(4),R("disabled",!n.nameValid()||n.selectedKeys().size===0),h(),we(" ",n.saveLabel()," "))},dependencies:[dr,cr,ol,k0,nl,sr,rl,lr,Tc],encapsulation:2})}}return t})();var oC=["dialog"],Dc=(()=>{class t{constructor(){this.scenarioName=J.required(),this.confirmed=fe(),this.cancelled=fe(),this.dialogElement=Ue.required("dialog")}open(){this.dialogElement().nativeElement.showModal()}close(){this.dialogElement().nativeElement.close()}confirm(){this.close(),this.confirmed.emit()}cancel(){this.close(),this.cancelled.emit()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["cc-delete-confirm-dialog"]],viewQuery:function(i,n){i&1&&tt(n.dialogElement,oC,5),i&2&&it()},inputs:{scenarioName:[1,"scenarioName"]},outputs:{confirmed:"confirmed",cancelled:"cancelled"},decls:15,vars:1,consts:[["dialog",""],["aria-labelledby","delete-confirm-title",1,"modal"],[1,"modal-box","max-w-sm"],["id","delete-confirm-title",1,"text-lg","font-bold","mb-2"],[1,"modal-action"],[1,"btn",3,"click"],[1,"btn","btn-error",3,"click"],["method","dialog",1,"modal-backdrop"],[3,"click"]],template:function(i,n){i&1&&(_(0,"dialog",1,0)(2,"div",2)(3,"h3",3),x(4,"Delete Scenario"),T(),_(5,"p"),x(6),T(),_(7,"div",4)(8,"button",5),re("click",function(){return n.cancel()}),x(9,"Cancel"),T(),_(10,"button",6),re("click",function(){return n.confirm()}),x(11,"Delete"),T()()(),_(12,"form",7)(13,"button",8),re("click",function(){return n.cancel()}),x(14,"close"),T()()()),i&2&&(h(6),we('Are you sure you want to delete "',n.scenarioName(),'"?'))},encapsulation:2})}}return t})();var nC=["dialog"];function rC(t,o){if(t&1&&(_(0,"li"),x(1),T()),t&2){let e=o.$implicit;h(),Re(e)}}function aC(t,o){if(t&1&&(_(0,"div",5)(1,"div"),Ce(2,"i",11),_(3,"strong"),x(4,"Already existing:"),T(),_(5,"ul",12),Ne(6,rC,2,1,"li",null,si),T()()()),t&2){let e=L();h(6),Ve(e.feedback().duplicates)}}function sC(t,o){if(t&1&&(_(0,"li"),x(1),T()),t&2){let e=o.$implicit;h(),Re(e)}}function lC(t,o){if(t&1&&(_(0,"div",6)(1,"div"),Ce(2,"i",13),_(3,"strong"),x(4,"Invalid scenario files:"),T(),_(5,"ul",12),Ne(6,sC,2,1,"li",null,si),T()()()),t&2){let e=L();h(6),Ve(e.feedback().invalid)}}function cC(t,o){if(t&1&&(_(0,"li"),x(1),T()),t&2){let e=o.$implicit;h(),Re(e)}}function dC(t,o){if(t&1&&(_(0,"div",6)(1,"div"),Ce(2,"i",13),_(3,"strong"),x(4,"Could not read (bad format):"),T(),_(5,"ul",12),Ne(6,cC,2,1,"li",null,si),T()()()),t&2){let e=L();h(6),Ve(e.feedback().parseErrors)}}var Pc=(()=>{class t{constructor(){this.closed=fe(),this.dialogElement=Ue.required("dialog"),this.feedback=ke({duplicates:[],invalid:[],parseErrors:[]})}open(e){let{duplicates:i,invalid:n,parseErrors:r}=e;(i.length>0||n.length>0||r.length>0)&&(this.feedback.set({duplicates:i,invalid:n,parseErrors:r}),this.dialogElement().nativeElement.showModal())}close(){this.dialogElement().nativeElement.close(),this.feedback.set({duplicates:[],invalid:[],parseErrors:[]}),this.closed.emit()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["cc-import-feedback-dialog"]],viewQuery:function(i,n){i&1&&tt(n.dialogElement,nC,5),i&2&&it()},outputs:{closed:"closed"},decls:15,vars:3,consts:[["dialog",""],["aria-labelledby","import-feedback-title",1,"modal"],[1,"modal-box","max-w-lg"],["id","import-feedback-title",1,"text-lg","font-bold","mb-2"],[1,"flex","flex-col","gap-2"],[1,"alert","alert-warning","text-sm"],[1,"alert","alert-error","text-sm"],[1,"modal-action"],[1,"btn",3,"click"],["method","dialog",1,"modal-backdrop"],[3,"click"],[1,"fa","fa-exclamation-triangle","mr-1"],[1,"list-disc","list-inside","ml-1"],[1,"fa","fa-exclamation-circle","mr-1"]],template:function(i,n){i&1&&(_(0,"dialog",1,0)(2,"div",2)(3,"h3",3),x(4,"Import Results"),T(),_(5,"div",4),K(6,aC,8,0,"div",5),K(7,lC,8,0,"div",6),K(8,dC,8,0,"div",6),T(),_(9,"div",7)(10,"button",8),re("click",function(){return n.close()}),x(11,"OK"),T()()(),_(12,"form",9)(13,"button",10),re("click",function(){return n.close()}),x(14,"close"),T()()()),i&2&&(h(6),Q(n.feedback().duplicates.length?6:-1),h(),Q(n.feedback().invalid.length?7:-1),h(),Q(n.feedback().parseErrors.length?8:-1))},encapsulation:2})}}return t})();function hC(t,o){if(t&1){let e=ue();_(0,"button",0),re("click",function(n){return oe(e),L().exportRequested.emit(),ne(n.stopPropagation())}),Ce(1,"i",1),T(),_(2,"button",2),re("click",function(n){return oe(e),L().deleteRequested.emit(),ne(n.stopPropagation())}),Ce(3,"i",3),T()}}var Mx=(()=>{class t{constructor(){this.isBuiltIn=J.required(),this.exportRequested=fe(),this.deleteRequested=fe()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["cc-scenario-item-actions"]],inputs:{isBuiltIn:[1,"isBuiltIn"]},outputs:{exportRequested:"exportRequested",deleteRequested:"deleteRequested"},decls:1,vars:1,consts:[["title","Export scenario",1,"btn","btn-ghost","btn-sm",3,"click"],[1,"fa","fa-download"],["title","Delete scenario",1,"btn","btn-ghost","btn-sm",3,"click"],[1,"fa","fa-trash"]],template:function(i,n){i&1&&K(0,hC,4,0),i&2&&Q(n.isBuiltIn()?-1:0)},encapsulation:2})}}return t})();function uC(t,o){t&1&&(_(0,"span",1),x(1,"Built-in"),T())}function mC(t,o){if(t&1&&(_(0,"span",2),x(1),T()),t&2){let e=L();h(),Re(e.view().formattedDate)}}function pC(t,o){if(t&1&&(_(0,"span",3),Ce(1,"i",6),_(2,"span",7),x(3),T()()),t&2){let e=L();xe("title","Bound to "+e.view().scenario.mapFileNames.join(", ")),h(3),Re(e.view().scenario.mapFileNames.join(", "))}}function fC(t,o){if(t&1&&Ce(0,"i",8),t&2){let e=o.$implicit,i=L();zt(Tn("fa ",i.groupIcons[e])),xe("title",i.groupLabels[e])}}var _x=(()=>{class t{constructor(){this.view=J.required(),this.groupLabels=Sa,this.groupIcons=Ec}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["cc-scenario-item-badges"]],hostAttrs:[1,"block","overflow-hidden"],inputs:{view:[1,"view"]},decls:7,vars:2,consts:[[1,"flex","items-center","gap-3","mt-1","min-w-0"],[1,"badge","badge-xs","badge-info"],[1,"text-[11px]","text-base-content/40"],[1,"badge","badge-xs","badge-outline","gap-1","max-w-full","overflow-hidden",3,"title"],[1,"flex","gap-1.5","text-[11px]","text-base-content/40"],[3,"class","title"],[1,"fa","fa-map-pin","text-[9px]","shrink-0"],[1,"truncate"],[3,"title"]],template:function(i,n){i&1&&(_(0,"div",0),K(1,uC,2,0,"span",1)(2,mC,2,1,"span",2),K(3,pC,4,2,"span",3),_(4,"span",4),Ne(5,fC,1,4,"i",5,si),T()()),i&2&&(h(),Q(n.view().scenario.isBuiltIn?1:2),h(2),Q(n.view().mapBound?3:-1),h(2),Ve(n.view().groupKeys))},encapsulation:2})}}return t})();function gC(t,o){t&1&&(f(0,"span",3),W(1,"i",7),p())}function bC(t,o){if(t&1&&(f(0,"div",4),x(1),p()),t&2){let e=L();h(),Re(e.view().scenario.description)}}var Ex=(()=>{class t{constructor(){this.view=J.required(),this.applyRequested=fe(),this.exportRequested=fe(),this.deleteRequested=fe()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["cc-scenario-item"]],inputs:{view:[1,"view"]},outputs:{applyRequested:"applyRequested",exportRequested:"exportRequested",deleteRequested:"deleteRequested"},decls:8,vars:8,consts:[["type","button",1,"flex","items-center","w-full","px-4","py-2","border-t","border-base-300","hover:bg-base-200","cursor-pointer","bg-transparent","text-left",3,"click"],[1,"flex-1","min-w-0"],[1,"font-medium","text-sm","truncate",3,"title"],["title","Some metrics in this scenario are not available",1,"text-warning","ml-1"],[1,"text-xs","text-base-content/50","truncate"],[3,"view"],[3,"exportRequested","deleteRequested","isBuiltIn"],[1,"fa","fa-exclamation-triangle","text-xs"]],template:function(i,n){i&1&&(f(0,"button",0),V("click",function(){return n.applyRequested.emit()}),f(1,"div",1)(2,"div",2),x(3),K(4,gC,2,0,"span",3),p(),K(5,bC,2,1,"div",4),W(6,"cc-scenario-item-badges",5),p(),f(7,"cc-scenario-item-actions",6),V("exportRequested",function(){return n.exportRequested.emit()})("deleteRequested",function(){return n.deleteRequested.emit()}),p()()),i&2&&(h(),Be("opacity-40",n.view().mapMismatch),h(),R("title",n.view().scenario.name),h(),we(" ",n.view().scenario.name," "),h(),Q(n.view().warning?4:-1),h(),Q(n.view().scenario.description?5:-1),h(),R("view",n.view()),h(),R("isBuiltIn",!!n.view().scenario.isBuiltIn))},dependencies:[_x,Mx],encapsulation:2})}}return t})();var Ir=class{static downloadData(o,e){let i=new Blob([o],{type:"text/json"}),n=document.createElement("a");n.download=e,n.href=window.URL.createObjectURL(i),n.dataset.downloadurl=["text/json",n.download,n.href].join(":"),n.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!1,view:window}))}};var kx=(()=>{class t{constructor(e,i){this.scenariosService=e,this.db=i}exportScenario(e){let i=lx(e),n=e.name.replaceAll(/[^\w-]/g,"_");Ir.downloadData(JSON.stringify(i,null,2),n+kc)}async importScenarioFiles(e){let i=this.scenariosService.scenarios$.getValue(),n={imported:0,duplicates:[],invalid:[],parseErrors:[]};for(let r of e){let a;try{let l=await r.text();a=xx(JSON.parse(l))}catch{n.parseErrors.push(r.name);continue}if(!a){n.invalid.push(r.name);continue}if(this.isDuplicate(a,i)){n.duplicates.push(a.name);continue}let s=cx(a);i.push(s),await this.db.add(s),n.imported++}return n.imported>0&&await this.scenariosService.loadScenarios(),n}isDuplicate(e,i){return i.some(n=>n.name===e.name&&Bp(n.settings,e.settings))}static{this.\u0275fac=function(i){return new(i||t)(M(Qi),M(Fc))}}static{this.\u0275prov=O({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var qx=(()=>{class t{constructor(e){this.store=e,this.metricData$=this.store.select(Xn)}static{this.\u0275fac=function(i){return new(i||t)(M(me))}}static{this.\u0275prov=O({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var wC=[{priority:0,label:"Current Map",icon:"fa-map-pin"},{priority:1,label:"Global",icon:"fa-globe"},{priority:2,label:"Built-in",icon:"fa-cube"},{priority:3,label:"Other Maps",icon:"fa-map-o"}],Tx=(()=>{class t{constructor(e){this.scenarioApplier=e}groupScenarios(e,i){let n=new Map;for(let r of e){let a=this.getScenarioPriority(r,i),s=n.get(a);s?s.push(r):n.set(a,[r])}return wC.filter(r=>n.has(r.priority)).map(r=>({label:r.label,icon:r.icon,scenarios:n.get(r.priority)??[]}))}toScenarioView(e,i,n){let r=(e.mapFileNames?.length??0)>0,a=r&&!e.mapFileNames.some(l=>i.has(l)),s=this.scenarioApplier.hasMissingMetrics(this.scenarioApplier.getMissingMetrics(e.settings,n));return{scenario:e,warning:s,mapMismatch:a,mapBound:r,groupKeys:sx(e),formattedDate:new Date(e.createdAt).toLocaleDateString()}}getScenarioPriority(e,i){let n=(e.mapFileNames?.length??0)>0;return n&&e.mapFileNames?.some(r=>i.has(r))?0:!n&&!e.isBuiltIn?1:e.isBuiltIn?2:3}static{this.\u0275fac=function(i){return new(i||t)(M(Ic))}}static{this.\u0275prov=O({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var SC=["dialog"],CC=["fileInput"],MC=(t,o)=>o.label,_C=(t,o)=>o.scenario.id;function EC(t,o){t&1&&(f(0,"p",13),x(1,"No scenarios found."),p())}function kC(t,o){if(t&1){let e=ue();f(0,"cc-scenario-item",25),V("applyRequested",function(){let n=oe(e).$implicit,r=L(2);return ne(r.applyScenario(n.scenario))})("exportRequested",function(){let n=oe(e).$implicit,r=L(2);return ne(r.exportScenario(n.scenario))})("deleteRequested",function(){let n=oe(e).$implicit,r=L(2);return ne(r.requestDelete(n.scenario))}),p()}if(t&2){let e=o.$implicit;R("view",e)}}function qC(t,o){if(t&1&&(f(0,"div",19),W(1,"input",20),f(2,"div",21),W(3,"i"),x(4),f(5,"span",22),x(6),p()(),f(7,"div",23),Ne(8,kC,1,1,"cc-scenario-item",24,_C),p()()),t&2){let e=o.$implicit,i=o.$index;Be("mt-1",i!==0),h(),R("checked",i===0),rt("aria-label",e.label),h(2),zt(Tn("fa ",e.icon," mr-2")),h(),we(" ",e.label," "),h(2),Re(e.scenarios.length),h(2),Ve(e.scenarios)}}var ku=(()=>{class t{constructor(e,i,n,r,a){this.scenariosService=e,this.importExportService=i,this.scenarioDialogStore=n,this.fileStoreReadWindow=r,this.helpers=a,this.dialogElement=Ue.required("dialog"),this.deleteConfirmDialogRef=Ue.required(Dc),this.importFeedbackDialogRef=Ue.required(Pc),this.fileInput=Ue.required("fileInput"),this.applyRequested=fe(),this.deleteTarget=ke(null),this.acceptExtensions=`${kc},.json`,this.scenarios=F(this.scenariosService.scenarios$,{initialValue:[]}),this.metricData=F(this.scenarioDialogStore.metricData$,{requireSync:!0}),this.searchTerm=ke(""),this.visibleFileNames=F(this.fileStoreReadWindow.files$.pipe(Se(s=>new Set(In(s).map(l=>l.fileMeta.fileName)))),{initialValue:new Set}),this.filteredScenarios=te(()=>{let s=this.searchTerm().toLowerCase(),l=this.scenarios(),d=this.visibleFileNames();return(s?l.filter(u=>u.name.toLowerCase().includes(s)||u.description?.toLowerCase().includes(s)):[...l]).sort((u,m)=>this.helpers.getScenarioPriority(u,d)-this.helpers.getScenarioPriority(m,d))}),this.groupedScenarios=te(()=>{let s=this.visibleFileNames(),l=this.metricData();return this.helpers.groupScenarios(this.filteredScenarios(),s).map(c=>Te(ae({},c),{scenarios:c.scenarios.map(u=>this.helpers.toScenarioView(u,s,l))}))})}async open(){await this.scenariosService.loadScenarios(),this.dialogElement().nativeElement.showModal()}close(){this.dialogElement().nativeElement.close()}applyScenario(e){this.close(),this.applyRequested.emit({scenario:e,metricData:this.metricData()})}exportScenario(e){this.importExportService.exportScenario(e)}openImportDialog(){this.fileInput().nativeElement.click()}async handleImportFiles(e){let i=e.target;if(!i.files||i.files.length===0)return;let n=await this.importExportService.importScenarioFiles(i.files);i.value="",this.importFeedbackDialogRef().open(n)}requestDelete(e){this.deleteTarget.set(e),this.deleteConfirmDialogRef().open()}cancelDelete(){this.deleteTarget.set(null)}async confirmDelete(){let e=this.deleteTarget();e&&(this.deleteTarget.set(null),await this.scenariosService.removeScenario(e.id))}static{this.\u0275fac=function(i){return new(i||t)(le(Qi),le(kx),le(qx),le(Fe),le(Tx))}}static{this.\u0275cmp=A({type:t,selectors:[["cc-scenario-list-dialog"]],viewQuery:function(i,n){i&1&&tt(n.dialogElement,SC,5)(n.deleteConfirmDialogRef,Dc,5)(n.importFeedbackDialogRef,Pc,5)(n.fileInput,CC,5),i&2&&it(4)},outputs:{applyRequested:"applyRequested"},decls:23,vars:4,consts:[["dialog",""],["fileInput",""],["aria-labelledby","scenario-list-title",1,"modal"],[1,"modal-box","max-w-xl"],[1,"flex","items-center","justify-between","mb-4"],["id","scenario-list-title",1,"text-xl","font-bold"],[1,"flex","items-center","gap-1"],["title","Import scenarios",1,"btn","btn-sm","btn-ghost",3,"click"],[1,"fa","fa-upload"],[1,"btn","btn-sm","btn-ghost",3,"click"],[1,"fa","fa-close"],["type","file","aria-label","Import scenarios","multiple","",1,"hidden",3,"change","accept"],["placeholder","Search scenarios...","aria-label","Search scenarios",1,"input","input-bordered","w-full","mb-4",3,"ngModelChange","ngModel"],[1,"text-center","py-8","text-base-content/50"],[1,"max-h-[60vh]","overflow-y-auto"],[1,"collapse","collapse-arrow","border","border-base-300",3,"mt-1"],["method","dialog",1,"modal-backdrop"],[3,"click"],[3,"confirmed","cancelled","scenarioName"],[1,"collapse","collapse-arrow","border","border-base-300"],["type","radio","name","scenario-accordion",3,"checked"],[1,"collapse-title","font-semibold","text-sm","bg-primary","text-primary-content"],[1,"badge","badge-sm","ml-2"],[1,"collapse-content","px-0"],[3,"view"],[3,"applyRequested","exportRequested","deleteRequested","view"]],template:function(i,n){i&1&&(f(0,"dialog",2,0)(2,"div",3)(3,"div",4)(4,"h2",5),x(5,"Scenarios"),p(),f(6,"div",6)(7,"button",7),V("click",function(){return n.openImportDialog()}),W(8,"i",8),p(),f(9,"button",9),V("click",function(){return n.close()}),W(10,"i",10),p()()(),f(11,"input",11,1),V("change",function(a){return n.handleImportFiles(a)}),p(),f(13,"input",12),V("ngModelChange",function(a){return n.searchTerm.set(a)}),p(),En(),K(14,EC,2,0,"p",13),f(15,"div",14),Ne(16,qC,10,9,"div",15,MC),p()(),f(18,"form",16)(19,"button",17),V("click",function(){return n.close()}),x(20,"close"),p()()(),f(21,"cc-delete-confirm-dialog",18),V("confirmed",function(){return n.confirmDelete()})("cancelled",function(){return n.cancelDelete()}),p(),W(22,"cc-import-feedback-dialog")),i&2&&(h(11),R("accept",n.acceptExtensions),h(2),R("ngModel",n.searchTerm()),kn(),h(),Q(n.filteredScenarios().length===0?14:-1),h(2),Ve(n.groupedScenarios()),h(5),R("scenarioName",n.deleteTarget()?.name??""))},dependencies:[dr,cr,ol,nl,sr,rl,lr,Dc,Pc,Ex],encapsulation:2})}}return t})();var TC=["listDialog"],RC=["saveDialog"];function AC(t,o){t&1&&(f(0,"div",12)(1,"div",4)(2,"span",5),x(3,"Labels"),p(),f(4,"button",13),W(5,"i",14),p()()(),W(6,"div",15))}function IC(t,o){t&1&&(f(0,"cc-settings-popover-shell",9),W(1,"cc-label-settings-panel"),p())}function FC(t,o){if(t&1){let e=ue();f(0,"cc-apply-scenario-dialog",16),V("closed",function(){oe(e);let n=L();return ne(n.handleApplyClosed())}),p()}if(t&2){let e=o;R("scenario",e.scenario)("metricData",e.metricData)}}var Rx=(()=>{class t{constructor(){this.scenariosService=E(Qi),this.isRadialLayout=Vt(),this.listDialog=Ue.required("listDialog"),this.saveDialog=Ue.required("saveDialog"),this.applyTarget=ke(null),this.scenarios=F(this.scenariosService.scenarios$,{initialValue:[]}),this.scenariosCountLabel=te(()=>{let e=this.scenarios().length;return`${e} ${e===1?"scenario":"scenarios"} available`})}async ngOnInit(){await this.scenariosService.loadScenarios()}openScenarioList(){this.listDialog().open()}openSaveDialog(){this.saveDialog().open()}handleApplyRequested(e){this.applyTarget.set(e)}handleApplyClosed(){this.applyTarget.set(null)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["cc-labels-scenarios-segment"]],viewQuery:function(i,n){i&1&&tt(n.listDialog,TC,5)(n.saveDialog,RC,5),i&2&&it(2)},hostAttrs:[1,"group","flex","flex-col","items-stretch","px-3","py-2","transition-colors","relative"],decls:16,vars:4,consts:[["listDialog",""],["saveDialog",""],[1,"flex","flex-col","items-stretch","gap-1.5","px-2","py-1","rounded-md","transition-colors","max-w-[220px]","min-w-[160px]"],["data-testid","metric-segment-scenario",1,"flex","flex-col","gap-1"],[1,"flex","items-center","justify-between","gap-1"],[1,"text-[10px]","uppercase","tracking-wide","opacity-70"],["type","button","title","Save current state as scenario","data-testid","metric-segment-scenario-save",1,"btn","btn-ghost","btn-xs","btn-square",3,"click"],[1,"fa","fa-plus","text-[10px]"],["type","button","title","Open saved scenarios",1,"text-sm","font-semibold","leading-tight","text-center","bg-transparent","border-0","p-0","rounded-sm","cursor-pointer","hover:bg-base-200","whitespace-nowrap","overflow-hidden","text-ellipsis",3,"click"],["popoverId","metric-settings-popover-labels","anchorName","metric-segment-labels","widthClass","w-80"],[3,"applyRequested"],[3,"scenario","metricData"],["data-testid","metric-segment-labels",1,"flex","flex-col","gap-1"],["type","button","popovertarget","metric-settings-popover-labels","data-anchor-name","metric-segment-labels","title","Label Settings",1,"btn","btn-ghost","btn-xs","btn-square",2,"anchor-name","--metric-segment-labels"],[1,"fa","fa-cog","text-[10px]"],[1,"border-t","border-base-300","-mx-1"],[3,"closed","scenario","metricData"]],template:function(i,n){if(i&1&&(f(0,"div",2),K(1,AC,7,0),f(2,"div",3)(3,"div",4)(4,"span",5),x(5,"Scenarios"),p(),f(6,"button",6),V("click",function(){return n.openSaveDialog()}),W(7,"i",7),p()(),f(8,"button",8),V("click",function(){return n.openScenarioList()}),x(9),p()()(),K(10,IC,2,0,"cc-settings-popover-shell",9),f(11,"cc-scenario-list-dialog",10,0),V("applyRequested",function(a){return n.handleApplyRequested(a)}),p(),W(13,"cc-save-scenario-dialog",null,1),K(15,FC,1,2,"cc-apply-scenario-dialog",11)),i&2){let r;h(),Q(n.isRadialLayout()?-1:1),h(8),we(" ",n.scenariosCountLabel()," "),h(),Q(n.isRadialLayout()?-1:10),h(5),Q((r=n.applyTarget())?15:-1,r)}},dependencies:[gh,ku,Eu,Cu,kt],encapsulation:2})}}return t})();function LC(t,o){t&1&&(ai(),_(0,"svg",0),Ce(1,"path",2),_(2,"g",3),Ce(3,"rect",4)(4,"rect",5)(5,"rect",6)(6,"rect",7)(7,"rect",8)(8,"rect",9)(9,"rect",10),T()())}function DC(t,o){t&1&&(ai(),_(0,"svg",1),Ce(1,"path",11)(2,"rect",12)(3,"path",13)(4,"rect",14)(5,"path",15)(6,"rect",16),T())}function PC(t,o){t&1&&(ai(),_(0,"svg",0),Ce(1,"circle",17)(2,"circle",18)(3,"path",19)(4,"path",20),T())}function NC(t,o){t&1&&(ai(),_(0,"svg",0),Ce(1,"circle",21)(2,"circle",22)(3,"path",23),_(4,"g",24),Ce(5,"circle",25)(6,"path",26)(7,"path",27),T()())}function VC(t,o){t&1&&(ai(),_(0,"svg",1),Ce(1,"rect",28)(2,"path",29),T())}var Ax=(()=>{class t{constructor(){this.layout=J.required(),this.LayoutAlgorithm=gt}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["cc-layout-glyph"]],hostAttrs:[1,"inline-block","shrink-0"],inputs:{layout:[1,"layout"]},decls:5,vars:1,consts:[["viewBox","0 0 20 20","fill","none","stroke","currentColor","stroke-width","1.4","aria-hidden","true",1,"w-full","h-full"],["viewBox","0 0 20 20","fill","none","stroke","currentColor","stroke-width","1.4","stroke-linejoin","round","aria-hidden","true",1,"w-full","h-full"],["d","M1.5 10h17M10 10v8","stroke-width","2"],["fill","currentColor","stroke","none"],["x","2.5","y","4.5","width","3","height","4","rx",".5"],["x","6.5","y","2.5","width","3","height","6","rx",".5"],["x","11","y","5","width","3","height","3.5","rx",".5"],["x","15","y","3.5","width","3","height","5","rx",".5"],["x","3","y","11.5","width","5.5","height","3.5","rx",".5"],["x","11.5","y","11.5","width","3","height","5.5","rx",".5"],["x","15.5","y","11.5","width","2.5","height","3","rx",".5"],["d","M1.5 10h17","stroke-width","2"],["x","2.5","y","2.5","width","15","height","6","rx","1"],["d","M9 2.5v6M13 2.5v6M13 5.5h4.5"],["x","2.5","y","11.5","width","7","height","6","rx","1"],["d","M6 11.5v6"],["x","11.5","y","11.5","width","6","height","4","rx","1"],["cx","10","cy","10","r","2.6"],["cx","10","cy","10","r","5.6"],["d","M10 7.4V4.4M12.3 11.3l2.6 1.5M7.7 11.3l-2.6 1.5"],["d","M10 1.4a8.6 8.6 0 0 1 8.3 10.8M16.4 15.8a8.6 8.6 0 0 1-9.6 2.2M3.9 16a8.6 8.6 0 0 1-1.6-9.6","stroke-width","1.8"],["cx","10","cy","10","r","3"],["cx","10","cy","10","r","8.5"],["d","M10 7V1.5M12.6 11.5l4.8 2.8M7.4 11.5l-4.8 2.8"],["stroke-width","0.9"],["cx","10","cy","10","r","4.6"],["d","M14 7.7l3.4-2M10 14.6v3.9M4.3 6.7l-1.6-1"],["d","M15.7 6.7a6.6 6.6 0 0 1 0 6.6M4.3 13.3a6.6 6.6 0 0 1 5.7-9.9"],["x","2.5","y","2.5","width","15","height","15","rx","1.2"],["d","M11 2.5v15M2.5 10h8.5M11 12.5h6.5M6.5 10v7.5M14.5 2.5v10"]],template:function(i,n){if(i&1&&K(0,LC,10,0,":svg:svg",0)(1,DC,7,0,":svg:svg",1)(2,PC,5,0,":svg:svg",0)(3,NC,8,0,":svg:svg",0)(4,VC,3,0,":svg:svg",1),i&2){let r;Q((r=n.layout())===n.LayoutAlgorithm.StreetMap?0:r===n.LayoutAlgorithm.TreeMapStreet?1:r===n.LayoutAlgorithm.Sunburst?2:r===n.LayoutAlgorithm.RadialTreeMap?3:4)}},encapsulation:2})}}return t})();var BC=(t,o)=>o.layout;function WC(t,o){if(t&1){let e=ue();f(0,"button",9),V("click",function(){let n=oe(e).$implicit,r=L();return ne(r.selectLayout(n.layout))}),f(1,"span",10),W(2,"cc-layout-glyph",11),p(),f(3,"span",12),x(4),p(),f(5,"span",13),x(6),p()()}if(t&2){let e=o.$implicit,i=L();zt(e.layout===i.layoutAlgorithm()?"border-primary bg-primary/5":"border-base-300 hover:border-primary/50"),rt("aria-pressed",e.layout===i.layoutAlgorithm())("data-layout",e.layout),h(),Be("bg-primary",e.layout===i.layoutAlgorithm())("text-primary-content",e.layout===i.layoutAlgorithm())("bg-base-200",e.layout!==i.layoutAlgorithm()),h(),R("layout",e.layout),h(2),Re(e.layout),h(2),Re(e.description)}}function OC(t,o){if(t&1){let e=ue();f(0,"div",8)(1,"span",14),x(2,"Maximum TreeMap Files"),p(),f(3,"cc-slider-number-input",15),V("valueChange",function(n){oe(e);let r=L();return ne(r.setMaxTreeMapFiles(n))}),p(),f(4,"span",16),x(5),p()()}if(t&2){let e=L();h(3),R("min",1)("max",1e3)("value",e.maxTreeMapFiles()),h(2),we("Folders with up to ",e.maxTreeMapFiles()," files are drawn as a treemap.")}}function zC(t,o){if(t&1){let e=ue();f(0,"div",8)(1,"span",14),x(2,"Visible levels"),p(),f(3,"cc-slider-number-input",17),V("valueChange",function(n){oe(e);let r=L();return ne(r.setRadialLevels(n))}),p(),f(4,"span",16),x(5),p()()}if(t&2){let e=L();h(3),R("min",e.minRadialLevels)("max",e.maxRadialLevels)("value",e.radialLevels()),h(2),we("Shows ",e.radialLevels()," folder levels around the centre.")}}var $C=1,jC=10,HC=new Set([gt.Sunburst,gt.RadialTreeMap]),UC={[gt.SquarifiedTreeMap]:"Folders nest inside each other and every bit of floor is used.",[gt.StreetMap]:"Folders become streets, files line up along them.",[gt.TreeMapStreet]:"Streets for the upper folders, treemaps near the files.",[gt.Sunburst]:"Folders as rings around the centre, drawn flat without heights.",[gt.RadialTreeMap]:"A band per folder level, each folder filled with a treemap of its contents."},Ix=(()=>{class t{constructor(){this.writeStore=E(je),this.popoverId="metrics-bar-layout-picker",this.anchorName="metrics-bar-layout-tab",this.layoutOptions=Object.values(gt).map(e=>({layout:e,description:UC[e]})),this.layoutAlgorithm=F(E(Ee).layoutAlgorithm$,{requireSync:!0}),this.maxTreeMapFiles=F(E(mi).maxTreeMapFiles$,{requireSync:!0}),this.showMaxTreeMapFiles=te(()=>this.layoutAlgorithm()===gt.TreeMapStreet),this.radialLevels=F(E(mi).radialLevels$,{requireSync:!0}),this.showRadialLevels=te(()=>HC.has(this.layoutAlgorithm())),this.minRadialLevels=$C,this.maxRadialLevels=jC}selectLayout(e){this.writeStore.setLayoutAlgorithm(e)}setMaxTreeMapFiles(e){this.writeStore.setMaxTreeMapFiles(e)}setRadialLevels(e){this.writeStore.setRadialLevels(e)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["cc-layout-tab"]],hostAttrs:[1,"absolute","bottom-full","left-4"],decls:15,vars:10,consts:[["type","button","data-testid","metrics-bar-layout-tab","title","Change the map layout",1,"flex","items-center","gap-1.5","h-7","px-3","bg-base-100","border","border-b-0","border-base-300","rounded-t-md","text-xs","font-semibold","cursor-pointer","hover:text-primary"],[1,"text-[10px]","font-normal","uppercase","tracking-wide","opacity-70"],[1,"w-3.5","h-3.5",3,"layout"],["aria-hidden","true",1,"fa","fa-caret-down","text-[10px]"],["widthClass","w-[34rem] max-w-[95vw]","contentClass","gap-2.5 p-3","ariaLabel","Map layout","testId","metrics-bar-layout-picker",3,"popoverId","anchorName"],[1,"text-xs","font-bold"],[1,"grid","grid-cols-2","gap-2"],["type","button",1,"grid","grid-cols-[auto_1fr]","items-start","gap-x-3","gap-y-0.5","p-2","rounded-md","border","text-left","cursor-pointer","transition-colors",3,"class"],[1,"flex","flex-col","gap-1"],["type","button",1,"grid","grid-cols-[auto_1fr]","items-start","gap-x-3","gap-y-0.5","p-2","rounded-md","border","text-left","cursor-pointer","transition-colors",3,"click"],[1,"row-span-2","grid","place-items-center","w-11","h-11","rounded-md"],[1,"w-7","h-7",3,"layout"],[1,"text-sm","font-semibold"],[1,"text-xs","opacity-70","leading-snug"],[1,"text-sm"],["ariaLabel","Maximum TreeMap Files",3,"valueChange","min","max","value"],[1,"text-xs","opacity-70"],["ariaLabel","Visible levels",3,"valueChange","min","max","value"]],template:function(i,n){i&1&&(f(0,"button",0)(1,"span",1),x(2,"Layout"),p(),W(3,"cc-layout-glyph",2),f(4,"span"),x(5),p(),W(6,"i",3),p(),f(7,"cc-settings-popover-shell",4)(8,"span",5),x(9,"Map layout"),p(),f(10,"div",6),Ne(11,WC,7,13,"button",7,BC),p(),K(13,OC,6,4,"div",8),K(14,zC,6,4,"div",8),p()),i&2&&(ze("anchor-name","--"+n.anchorName),rt("popovertarget",n.popoverId)("data-anchor-name",n.anchorName),h(3),R("layout",n.layoutAlgorithm()),h(2),Re(n.layoutAlgorithm()),h(2),R("popoverId",n.popoverId)("anchorName",n.anchorName),h(4),Ve(n.layoutOptions),h(2),Q(n.showMaxTreeMapFiles()?13:-1),h(),Q(n.showRadialLevels()?14:-1))},dependencies:[Ax,kt,ti],encapsulation:2})}}return t})();var Fx=(()=>{class t{constructor(){this.preferencesReadWindow=E(mi),this.metricsBarWriteStore=E(je),this.isLinked=F(this.preferencesReadWindow.isColorMetricLinkedToHeightMetric$,{initialValue:!1}),this.iconClass=te(()=>this.isLinked()?"fa fa-link":"fa fa-unlink"),this.title=te(()=>this.isLinked()?"Unlink Height and Color Metric":"Link Height and Color Metric"),this.buttonClass=te(()=>this.isLinked()?"btn btn-circle btn-sm ring-2 ring-primary text-primary bg-primary/10 border-0":"btn btn-circle btn-sm ring-1 ring-base-300 text-base-content/60 border-0 cc-link-button-dashed")}toggle(){this.metricsBarWriteStore.toggleIsHeightAndColorMetricLinked()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["cc-link-color-height-button"]],hostAttrs:[1,"self-center","px-1"],decls:2,vars:8,consts:[["type","button",3,"click","title"]],template:function(i,n){i&1&&(_(0,"button",0),re("click",function(){return n.toggle()}),Ce(1,"i"),T()),i&2&&(zt(n.buttonClass()),xe("title",n.title()),rt("aria-label",n.title())("data-testid","metric-link-button")("aria-pressed",n.isLinked()),h(),zt(n.iconClass()))},encapsulation:2})}}return t})();var GC=[[["","barTools",""]]],XC=["[barTools]"];function KC(t,o){t&1&&W(0,"cc-height-segment")}function QC(t,o){t&1&&W(0,"cc-link-color-height-button")}function YC(t,o){t&1&&W(0,"cc-folders-segment")}function ZC(t,o){if(t&1&&(K(0,QC,1,0,"cc-link-color-height-button"),W(1,"cc-color-segment"),K(2,YC,1,0,"cc-folders-segment")),t&2){let e=L();Q(e.isRadialLayout()?-1:0),h(2),Q(e.isRadialLayout()?2:-1)}}function JC(t,o){if(t&1&&W(0,"cc-axis-card",0)(1,"cc-color-settings-popover",1),t&2){let e=L();R("metricName","Settings")("hasCog",!0)("cogPopoverId",e.deltaColorSettingsPopoverId)("cogAnchorName",e.deltaColorSettingsAnchorName)("testId","metric-segment-color-settings")("cogTestId","metric-segment-color-settings-cog"),h(),R("popoverId",e.deltaColorSettingsPopoverId)("anchorName",e.deltaColorSettingsAnchorName)}}function eM(t,o){t&1&&W(0,"cc-edge-segment")}var qu=(()=>{class t{constructor(){this.barBottom=v0,this.fileStoreReadWindow=E(Fe),this.metricsBarReadStore=E(dt),this.isDeltaState=F(this.fileStoreReadWindow.isDeltaState$,{initialValue:!1}),this.hasEdgeMetric=F(this.metricsBarReadStore.metricData$.pipe(Se(e=>e.edgeMetricData.length>0)),{initialValue:!1}),this.isRadialLayout=Vt(),this.showColorMetricSegment=te(()=>!this.isDeltaState()),this.deltaColorSettingsPopoverId="metric-settings-popover-color-delta",this.deltaColorSettingsAnchorName="metric-segment-color-settings"}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["cc-metrics-bar"]],hostVars:2,hostBindings:function(i,n){i&2&&ze("bottom",n.barBottom)},features:[Xt([{provide:ur,useValue:Qs}]),no([x0,mr])],ngContentSelectors:XC,decls:9,vars:3,consts:[["label","Color",3,"metricName","hasCog","cogPopoverId","cogAnchorName","testId","cogTestId"],[3,"popoverId","anchorName"]],template:function(i,n){i&1&&(Ka(GC),W(0,"cc-layout-tab"),f(1,"cc-bar-tools-tab"),Qa(2),p(),W(3,"cc-area-segment"),K(4,KC,1,0,"cc-height-segment"),K(5,ZC,3,2)(6,JC,2,8),K(7,eM,1,0,"cc-edge-segment"),W(8,"cc-labels-scenarios-segment")),i&2&&(h(4),Q(n.isRadialLayout()?-1:4),h(),Q(n.showColorMetricSegment()?5:6),h(2),Q(n.hasEdgeMetric()&&!n.isRadialLayout()?7:-1))},dependencies:[fb,Bi,w0,Xv,Mc,Zv,ix,nx,Rx,Ix,Fx],encapsulation:2})}}return t})();function Tu(t,o,e){if($t(t))return null;let i=Lx(t,o,e);return i.area>0?i:null}function Lx(t,o,e){let i=t.children.filter(r=>!r.isExcluded).map(r=>$t(r)?tM(r,o,e):Lx(r,o,e)).filter(r=>r.area>0),n=i.reduce((r,a)=>r+a.area,0);return Te(ae({},Dx(t,o,e)),{isFile:!1,area:n,children:i})}function tM(t,o,e){return Te(ae({},Dx(t,o,e)),{isFile:!0,area:t.attributes?.[o.areaMetric]??0,children:[]})}function Dx(t,o,e){return{path:t.path,name:t.name,colorValue:t.attributes?.[o.colorMetric],isFlat:e(t)}}function Ca(t,o,e=()=>!0){return o===0?0:t.children.filter(e).reduce((i,n)=>Math.max(i,1+Ca(n,o-1,e)),0)}function Ru(t,o){let e=new Set,i=n=>{if(n.isFile){o(n)&&e.add(n.path);return}n.children.forEach(i)};return i(t),e}function Nc(t,o){let e=t.children.find(i=>!i.isFile&&Ma(o,i.path));return e?Nc(e,o):t}function Fr(t,o,e=Number.POSITIVE_INFINITY){let i=e>0?t.children.find(n=>Ma(o,n.path)):void 0;return i?Fr(i,o,e-1):t}function Ma(t,o){return t===o||t.startsWith(`${o}/`)}function _a(t,o){let e=t.children.find(i=>Ma(o,i.path));if(e)return e.path===o?t:_a(e,o)}i1([o1,a1,n1,r1]);var iM=120,Vc=class{constructor(o,e){this.chartRegistry=o,this.handlers=e,this.highlightedPath=null,this.pathUnderPointer=null,this.containerSizeObserver=new s1,this.containerSize=this.containerSizeObserver.size}attachTo(o){if(this.chart&&this.attachedContainer===o)return;this.dispose(),this.attachedContainer=o,this.chart=t1(o),this.chart.on("click",i=>this.reportClick(i)),this.chart.on("mouseover",i=>this.reportPointerEntered(i.data?.name??null)),this.chart.on("mouseout",()=>this.reportPointerLeftAfterGrace());let e=this.chart.getZr();e.on("mousemove",i=>{i.target||this.reportPointerOverNothing()}),e.on("globalout",()=>this.reportPointerOverNothing()),this.chart.on("contextmenu",i=>this.reportRightClick(i)),this.chart.on("finished",()=>o.setAttribute("aria-busy","false")),o.addEventListener("contextmenu",Kd),this.chartRegistry.register(this.chart),this.containerSizeObserver.observe(o)}render(o,{keepsSegments:e=!1}={}){this.chart&&(this.attachedContainer?.setAttribute("aria-busy","true"),this.chart.resize(),this.finishRunningAnimations(),this.chart.setOption(o),e||this.reportPointerLeft(),this.applyHighlight())}highlight(o){this.highlightedPath=o,!(o!==null&&o===this.pathUnderPointer)&&this.applyHighlight()}dispose(){this.cancelPointerLeave(),this.reportPointerLeft(),this.attachedContainer?.removeEventListener("contextmenu",Kd),this.containerSizeObserver.disconnect(),this.chart&&(this.chartRegistry.unregister(this.chart),this.chart.dispose()),this.chart=void 0,this.attachedContainer=void 0}reportClick({data:o}){o&&(o.isCentre?this.handlers.onCentreClicked():o.isFile?this.handlers.onFileClicked(o.name):this.handlers.onFolderClicked(o.name))}reportPointerEntered(o){this.cancelPointerLeave(),this.pathUnderPointer=o,this.handlers.onNodeHovered(o)}reportPointerLeftAfterGrace(){this.cancelPointerLeave(),this.pointerLeaveTimeout=setTimeout(()=>{this.pointerLeaveTimeout=void 0,this.reportPointerLeft()},iM)}reportPointerOverNothing(){this.pathUnderPointer!==null&&this.pointerLeaveTimeout===void 0&&this.reportPointerLeftAfterGrace()}reportPointerLeft(){this.pathUnderPointer!==null&&(this.pathUnderPointer=null,this.handlers.onNodeHovered(null))}cancelPointerLeave(){this.pointerLeaveTimeout!==void 0&&(clearTimeout(this.pointerLeaveTimeout),this.pointerLeaveTimeout=void 0)}reportRightClick({data:o,event:e}){let i=e?.event;o&&i&&this.handlers.onNodeRightClicked(o.name,i.clientX,i.clientY)}finishRunningAnimations(){for(let o of this.chart.getZr().storage.getDisplayList())o.stopAnimation(void 0,!0)}applyHighlight(){this.chart&&(this.chart.dispatchAction({type:"downplay",seriesIndex:0}),this.highlightedPath!==null&&this.chart.dispatchAction({type:"highlight",seriesIndex:0,name:this.highlightedPath}))}};var oM=["chartContainer"],Au=(()=>{class t{constructor(){this.shape=J.required(),this.tree=J.required(),this.centre=J.required(),this.hoveredPath=J(null),this.metrics=J.required(),this.coloring=J.required(),this.isFocused=J(!1),this.folderClicked=fe(),this.fileClicked=fe(),this.centreClicked=fe(),this.nodeHovered=fe(),this.nodeRightClicked=fe(),this.chartContainer=Ue.required("chartContainer"),this.chartHost=new Vc(E(Xg),{onFolderClicked:e=>this.folderClicked.emit(e),onFileClicked:e=>this.fileClicked.emit(e),onCentreClicked:()=>this.centreClicked.emit(),onNodeHovered:e=>this.nodeHovered.emit(e),onNodeRightClicked:(e,i,n)=>this.nodeRightClicked.emit({path:e,clientX:i,clientY:n})}),this.highlightedPath=te(()=>{let e=this.hoveredPath(),i=this.centre();if(e===null||!Ma(e,i.path))return null;let n=Fr(i,e,this.shape().visibleDepth);return n===i?null:n.path}),oo(()=>this.chartHost.attachTo(this.chartContainer().nativeElement)),oo(()=>this.renderOnceTheContainerIsMeasured()),oo(()=>this.chartHost.highlight(this.highlightedPath()))}ngOnDestroy(){this.chartHost.dispose()}renderOnceTheContainerIsMeasured(){let{width:e,height:i}=this.chartHost.containerSize();if(e===0||i===0)return;let n={centre:this.centre(),shape:this.shape()},r=n.centre===this.renderedView?.centre&&n.shape===this.renderedView?.shape;this.renderedView=n,this.chartHost.render(n.shape.buildOption({centre:n.centre,isMapRoot:n.centre===this.tree(),isFocused:this.isFocused(),metrics:this.metrics(),coloring:this.coloring()}),{keepsSegments:r})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["cc-radial-chart"]],viewQuery:function(i,n){i&1&&tt(n.chartContainer,oM,5),i&2&&it()},hostAttrs:[1,"block","h-full","w-full"],inputs:{shape:[1,"shape"],tree:[1,"tree"],centre:[1,"centre"],hoveredPath:[1,"hoveredPath"],metrics:[1,"metrics"],coloring:[1,"coloring"],isFocused:[1,"isFocused"]},outputs:{folderClicked:"folderClicked",fileClicked:"fileClicked",centreClicked:"centreClicked",nodeHovered:"nodeHovered",nodeRightClicked:"nodeRightClicked"},decls:2,vars:0,consts:[["chartContainer",""],["data-testid","radial-chart",1,"h-full","w-full"]],template:function(i,n){i&1&&Ce(0,"div",1,0)},encapsulation:2})}}return t})();var nM={[ro.Sum]:t=>t.sum,[ro.Max]:t=>t.max,[ro.Min]:t=>t.min,[ro.Median]:t=>sM(t.values),[ro.MeanPerFile]:t=>t.sum/t.files,[ro.AvgPerArea]:t=>t.areaWeightedSum/t.area};function Iu(t,o){let e=new Map;Px(t,o,e);let i=nM[o.folderValue],n=new Map;for(let[r,a]of e)a.files>0&&n.set(r,i(a));return n}function Px(t,o,e){if($t(t))return rM(t,o);let i=Nx();for(let n of t.children)!n.isExcluded&&!o.isFlat(n)&&aM(i,Px(n,o,e));return e.set(t.path,i),i}function rM(t,{areaMetric:o,colorMetric:e,folderValue:i}){let n=t.attributes?.[o]??0,r=t.attributes?.[e];return n<=0||r===void 0?Nx():{files:1,sum:r,max:r,min:r,area:n,areaWeightedSum:r*n,values:i===ro.Median?[r]:[]}}function Nx(){return{files:0,sum:0,max:Number.NEGATIVE_INFINITY,min:Number.POSITIVE_INFINITY,area:0,areaWeightedSum:0,values:[]}}function aM(t,o){t.files+=o.files,t.sum+=o.sum,t.max=Math.max(t.max,o.max),t.min=Math.min(t.min,o.min),t.area+=o.area,t.areaWeightedSum+=o.areaWeightedSum;for(let e of o.values)t.values.push(e)}function sM(t){let o=[...t].sort((i,n)=>i-n),e=Math.floor(o.length/2);return o.length%2===1?o[e]:(o[e-1]+o[e])/2}var Lr=Math.PI/2,Vx=2*Math.PI,Po="#ffffff",lM={duration:500,easing:"cubicOut"},cM=2e3,dM={animationDuration:0,animationDurationUpdate:0},hM=4,uM=1;function Bx(t){let o=t<=cM?{animationDurationUpdate:400}:dM;return ae({animationThreshold:Number.POSITIVE_INFINITY,stateAnimation:lM},o)}function Bc(t){return(.95-.2)/t}function Wx(t,o){return zx(t,o)?t:0}function Ox(t,o,e){return zx(o.widthPx,e)?o:{color:t,widthPx:uM}}function zx(t,o){return o>=t*hM}var mM="#1f2937",pM=.5,fM=.299,gM=.587,bM=.114,vM=255;function $x({path:t,isFile:o,colorValue:e,isFlat:i,isCentre:n=!1},r){let{mapColors:a}=r;return!n&&t===r.highlight.selectedPath?a.selected:!o&&!i?xM(t,e,r):e===void 0?a.base:i?a.flat:jx(e,r)}function xM(t,o,e){let{folders:i,mapColors:n}=e,r=_p({path:t},i.markedPackages);if(r)return r;let a=i.values.get(t);return o===void 0||a===void 0?n.base:i.style===ji.Neutral?Js:r0(jx(a,e),i.tint)}function jx(t,o){let{mapColors:e}=o;return o.isUnaryMetric?e.positive:zf(e,o.colorRange,o.colorMode,o.colorMetricRange,t)}function Hx(t){let[o,e,i]=Us.hex.rgb(t);return(fM*o+gM*e+bM*i)/vM>pM?mM:Po}var Wc=new Intl.NumberFormat("en",{maximumFractionDigits:2});function Ux(t,o){return{name:t.path,value:t.area,displayName:t.name,colorValue:t.colorValue,folderValueText:wM(t,o.folders),isFile:t.isFile}}function wM({path:t,isFile:o},e){let i=o?void 0:e.values.get(t);if(i!==void 0)return`${rr(e.value).label} ${Wc.format(i)}`}var Ea=-Math.PI/2,yM=1,SM=2,CM=3,Kx={style:{opacity:.45}},MM=/^#[\da-f]{6}$/i,Qx={x:0,y:0,rotation:0};function Oc(t,o,e,i){return Te(ae({type:t},Qx),{silent:!i,z2:i?yM:SM,shape:o,style:e,blur:Kx})}function Fu({x:t,y:o,rotation:e},i){return{type:"text",x:t,y:o,rotation:e,silent:!0,z2:CM,style:i,blur:Kx}}function Yx(t){return Te(ae({type:"group"},Qx),{children:t})}function Lu(t){if(t.type==="group")return Te(ae({},t),{children:t.children.map(Lu)});let{fill:o,stroke:e}=t.style,i={fill:Gx(o),stroke:Gx(e)};return Te(ae({},t),{style:ae(ae({},t.style),i),emphasis:{style:{fill:o,stroke:e}}})}function Gx(t){if(!t||!MM.test(t))return t;let[o,e,i]=Us.hex.rgb(t);return`rgba(${o}, ${e}, ${i}, ${.45})`}var Zx="\u2026";function Jx(t,o,e){let i=_M([...t],o.lengthPx,e),n=i.map(l=>e(l)),r=Math.sin(o.midAngle)<0,a=r?1:-1,s=-ew(n)/2;return i.map((l,d)=>{let c=o.midAngle+a*(s+n[d]/2)/o.radiusPx;return s+=n[d],{glyph:l,x:o.centreX+o.radiusPx*Math.cos(c),y:o.centreY+o.radiusPx*Math.sin(c),rotation:r?-(c+Lr):Lr-c}})}function _M(t,o,e){let i=t.map(s=>e(s));if(ew(i)<=o)return t;let n=o-e(Zx),r=0,a=0;for(;r<t.length&&a+i[r]<=n;)a+=i[r],r++;return r===0?[]:[...t.slice(0,r),Zx]}function ew(t){return t.reduce((o,e)=>o+e,0)}var EM="sans-serif";var tw=new Map,zc;function iw(t,o){let e=`${t} ${o}px ${EM}`;return i=>{let n=`${e}|${i}`,r=tw.get(n);if(r!==void 0)return r;let a=kM(i,e,o);return tw.set(n,a),a}}function kM(t,o,e){return zc??=document.createElement("canvas").getContext("2d"),zc?(zc.font=o,zc.measureText(t).width):t.length*e*.6}var ow=Math.PI,qM=11,rw=13,aw=4,sw=28;function lw(t,o,e){if(t.role==="outline")return null;if(t.role==="centre")return nw(AM(e),o);let i=TM(t,e);return i.arcLengthPx>=i.depthPx?RM(i,o,e):nw(IM(i,e),o)}function TM(t,o){let e=t.innerRadius*o.radiusPx,i=t.outerRadius*o.radiusPx,n=(e+i)/2,r=t.endAngle-t.startAngle;return{midAngle:Ea+(t.startAngle+t.endAngle)/2,innerRadiusPx:e,midRadiusPx:n,angularSpan:r,arcLengthPx:r*n,depthPx:i-e}}function nw(t,o){if(t.lengthPx<sw||t.heightPx<rw)return null;let e=Te(ae({},cw(o)),{text:o.displayName,width:t.lengthPx-aw,overflow:"truncate"});return Fu(t,e)}function RM(t,o,e){let i=t.arcLengthPx-aw;if(i<sw||t.depthPx<rw)return null;let n=cw(o),r={centreX:e.centreX,centreY:e.centreY,radiusPx:t.midRadiusPx,midAngle:t.midAngle,lengthPx:i},a=Jx(o.displayName,r,iw(n.fontWeight,n.fontSize));return a.length===0?null:Yx(a.map(d=>{var c=d,{glyph:s}=c,l=to(c,["glyph"]);return Fu(l,Te(ae({},n),{text:s}))}))}function cw(t){return{fill:Hx(t.color),fontSize:qM,fontWeight:t.isCentre||t.isFile?"bold":"normal",align:"center",verticalAlign:"middle"}}function AM(t){let o=2*.2*t.radiusPx;return{x:t.centreX,y:t.centreY,rotation:0,lengthPx:o,heightPx:o}}function IM(t,o){return{x:o.centreX+t.midRadiusPx*Math.cos(t.midAngle),y:o.centreY+t.midRadiusPx*Math.sin(t.midAngle),rotation:FM(-t.midAngle),lengthPx:t.depthPx,heightPx:t.angularSpan*t.innerRadiusPx}}function FM(t){let o=Math.atan2(Math.sin(t),Math.cos(t));return o>Lr?o-ow:o<-Lr?o+ow:o}var LM="Click to go up one folder",DM="Click to unfocus and go up one folder";function dw(t,o){let e=PM(o);return({data:i})=>{if(!i)return"";let n=[`<b>${Xr(i.name)}</b>`,`${Xr(t.areaMetric)}: ${Wc.format(i.value)}`,`${Xr(t.colorMetric)}: ${i.colorValue===void 0?"\u2013":Wc.format(i.colorValue)}`];return i.folderValueText&&n.push(Xr(i.folderValueText)),i.isCentre&&e&&n.push(`<i>${e}</i>`),n.join("<br/>")}}function PM({isMapRoot:t,isFocused:o}){return t?o?DM:null:LM}var hw={color:Po,widthPx:2.5},NM=0,VM=Number.POSITIVE_INFINITY;function $c(t,o,e){let i=o.map(r=>BM(r,t)),n=e.focus==="ancestors"?WM(o):()=>"self";return{aria:{enabled:!0},hoverLayerThreshold:VM,tooltip:{show:!0,confine:!0,formatter:dw(t.metrics,t)},series:[Te(ae({type:"custom",coordinateSystem:"none",data:i,renderItem:({dataIndex:r},a)=>zM(o[r],i[r],{frame:OM(a),border:e.border,focus:n(r)})},Bx(i.length)),{progressive:NM})]}}function BM({node:t,isCentre:o},{centre:e,coloring:i}){let{litPaths:n}=i.highlight;return Te(ae({},Ux(t,i)),{id:`${e.path}|${t.path}`,isCentre:o,color:$x(Te(ae({},t),{isCentre:o}),i),isFaded:n.size>0&&!n.has(t.path)})}function WM(t){let o=new Map(t.map(({node:e},i)=>[e.path,i]));return e=>{let i=[];for(let n=t[e].node.path;o.has(n);n=n.slice(0,n.lastIndexOf("/")))i.push(o.get(n));return i}}function OM(t){let o=t.getWidth(),e=t.getHeight();return{centreX:o/2,centreY:e/2,radiusPx:Math.min(o,e)/2}}function zM(t,o,e){let i=t.sectors.map(a=>$M(a,o.color,e)),n=t.sectors.map(a=>lw(a,o,e.frame)).filter(a=>a!==null),r=[...i,...n];return{type:"group",focus:e.focus,children:o.isFaded?r.map(Lu):r}}function $M(t,o,{frame:e,border:i}){if(t.role==="outline"){let r=Wx(hw.widthPx,uw(t,e));return Oc("sector",mw(t,e),{fill:"none",stroke:hw.color,lineWidth:r},!1)}if(t.role==="centre"){let r={cx:e.centreX,cy:e.centreY,r:t.outerRadius*e.radiusPx};return Oc("circle",r,{fill:o,stroke:i.color,lineWidth:i.widthPx},!0)}let n=Ox(o,i,uw(t,e));return Oc("sector",mw(t,e),{fill:o,stroke:n.color,lineWidth:n.widthPx},!0)}function uw(t,o){let e=(t.endAngle-t.startAngle)*t.innerRadius*o.radiusPx,i=(t.outerRadius-t.innerRadius)*o.radiusPx;return Math.min(e,i)}function mw(t,o){return{cx:o.centreX,cy:o.centreY,r0:t.innerRadius*o.radiusPx,r:t.outerRadius*o.radiusPx,startAngle:Ea+t.startAngle,endAngle:Ea+t.endAngle,clockwise:!0}}var ka={startAngle:0,endAngle:Vx},jc=Te(ae({role:"centre"},ka),{innerRadius:0,outerRadius:.2});function Hc(t){return[...t].sort(Du)}function Du(t,o){return o.area-t.area||t.path.localeCompare(o.path)}var jM=.15,HM=.04,UM=.012;function pw(t,o){let e={placements:new Map,bands:GM(t,o)};return e.placements.set(t,{node:t,isCentre:!0,sectors:[]}),qa(e,t,jc),fw(e,t,ka,1),[...e.placements.values()]}function GM(t,o){let e=Math.max(1,Ca(t,o)),i=Bc(e);return{count:e,width:i,headerThickness:Math.min(i*jM,HM)}}function fw(t,o,e,i){let n=(e.endAngle-e.startAngle)/o.area,r=e.startAngle;for(let a of XM(o)){let s=KM(t,{startAngle:r,endAngle:r+a.area*n},i);a.folder?QM(t,a.folder,s,i):gw(t,a.files,s),r=s.endAngle}}function XM(t){let o=Hc(t.children),e=o.filter(n=>!n.isFile).map(n=>({area:n.area,folder:n})),i=o.filter(n=>n.isFile);return i.length>0&&e.push({area:i.reduce((n,r)=>n+r.area,0),files:i}),e.sort((n,r)=>r.area-n.area)}function KM(t,o,e){let i=.2+(e-1)*t.bands.width;return{startAngle:o.startAngle,endAngle:o.endAngle,innerRadius:i,outerRadius:i+t.bands.width-UM}}function QM(t,o,e,i){if(qa(t,o,Te(ae({},e),{role:"outline"})),i<t.bands.count){qa(t,o,Te(ae({},e),{role:"header"})),fw(t,o,e,i+1);return}let n=Te(ae({},e),{innerRadius:e.innerRadius+t.bands.headerThickness});qa(t,o,Te(ae({},e),{outerRadius:n.innerRadius,role:"header"})),gw(t,o.children,n)}function gw(t,o,e){for(let i of YM(o,e))qa(t,i.node,Te(ae({},i.sector),{role:"cell"}))}function YM(t,o){let e=(o.endAngle-o.startAngle)*(o.innerRadius+o.outerRadius)/2,i=o.outerRadius-o.innerRadius,n={path:"",name:"",isFile:!1,area:0,colorValue:void 0,isFlat:!1,children:t},r=ao(n,s=>s===n?s.children:void 0).sum(s=>s===n?0:s.area).sort((s,l)=>Du(s.data,l.data));return Mp().tile(Cp).size([e,i])(r).children.map(s=>({node:s.data,sector:ZM(s,o,e,i)}))}function ZM(t,o,e,i){let n=o.endAngle-o.startAngle,r=a=>Math.sqrt(o.innerRadius**2+a/i*(o.outerRadius**2-o.innerRadius**2));return{startAngle:o.startAngle+t.x0/e*n,endAngle:o.startAngle+t.x1/e*n,innerRadius:r(t.y0),outerRadius:r(t.y1)}}function qa(t,o,e){let i=t.placements.get(o)??{node:o,isCentre:!1,sectors:[]};i.sectors.push(e),t.placements.set(o,i)}var JM={color:Po,widthPx:.5};function Pu(t){return{visibleDepth:t+1,buildOption:o=>e9(o,t)}}function e9(t,o){return $c(t,pw(t.centre,o),{border:JM,focus:"self"})}function bw(t,o){let e=Math.max(1,Ca(t,o)),i=[{node:t,isCentre:!0,sectors:[jc]}];return vw(i,{count:e,width:Bc(e)},t,ka,1),i}function vw(t,o,e,i,n){if(n>o.count)return;let r=(i.endAngle-i.startAngle)/e.area,a=.2+(n-1)*o.width,s=i.startAngle;for(let l of Hc(e.children)){let d={startAngle:s,endAngle:s+l.area*r};t.push({node:l,isCentre:!1,sectors:[Te(ae({role:"ring"},d),{innerRadius:a,outerRadius:a+o.width})]}),vw(t,o,l,d,n+1),s=d.endAngle}}var t9={color:Po,widthPx:1};function Nu(t){return{visibleDepth:t,buildOption:o=>i9(o,t)}}function i9(t,o){let e=bw(t.centre,o);return $c(t,e,{border:t9,focus:"ancestors"})}var Uc=Ge(qi,$r,(t,o)=>({areaMetric:t,colorMetric:o})),Vu=Ge(Dt,Qn,Li,Uc,Bd,({unifiedMapNode:t},o,e,i,n)=>{let r=e&&o.get(e)||t;return r?Tu(r,i,n):null}),o9=Ge(Dt,Uc,zd,Bd,({unifiedMapNode:t},o,e,i)=>t?Iu(t,Te(ae({},o),{folderValue:e,isFlat:i})):new Map),n9=Ge(o9,zd,o0,a0,bs,(t,o,e,i,n)=>({values:t,value:o,style:e,tint:i,markedPackages:n})),r9=Ge(vs,lf,af,Vu,(t,o,e,i)=>({selectedPath:t,litPaths:new Set([...o,...a9(i,e)])}));function a9(t,o){return!t||o.length===0?[]:Ru(t,e=>o.includes(nr.estimateFileExtension(e.name)))}var xw=Ge($r,us,hs,fs,ko,n9,r9,(t,o,e,i,n,r,a)=>({isUnaryMetric:t===Ep,colorRange:o,colorMode:e,mapColors:i,colorMetricRange:n,folders:r,highlight:a}));var Gc=(()=>{class t{constructor(e){this.store=e,this.tree$=this.store.select(Vu),this.layoutAlgorithm$=this.store.select(ps),this.radialLevels$=this.store.select(s0),this.metrics$=this.store.select(Uc),this.coloring$=this.store.select(xw),this.hoveredNodePath$=this.store.select(sf),this.selectedNodePath$=this.store.select(vs),this.isDeltaState$=this.store.select(cs),this.isFocused$=this.store.select(Li).pipe(Se(Boolean))}static{this.\u0275fac=function(i){return new(i||t)(M(me))}}static{this.\u0275prov=O({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Xc=(()=>{class t{constructor(e,i){this.store=e,this.nodeInteraction=i}selectNode(e){this.nodeInteraction.selectNode(e),this.nodeInteraction.clearKeptHighlight()}hoverNode(e){this.nodeInteraction.hoverNode(e)}openContextMenu(e,i,n){this.store.dispatch(ks({value:{nodeId:e,xPositionOfRightClickEvent:i,yPositionOfRightClickEvent:n,origin:"radialMap"}}))}unfocus(){this.store.dispatch(ui())}static{this.\u0275fac=function(i){return new(i||t)(M(me),M(qo))}}static{this.\u0275prov=O({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var d9=["unfocusConfirmation"];function h9(t,o){t&1&&(f(0,"div",1)(1,"output",4)(2,"span"),x(3,"This layout shows a single map. Switch to another map layout to compare two maps."),p()()())}function u9(t,o){if(t&1){let e=ue();f(0,"cc-radial-chart",5),V("folderClicked",function(n){oe(e);let r=L();return ne(r.selectNode(n))})("centreClicked",function(){oe(e);let n=L();return ne(n.goUp())})("fileClicked",function(n){oe(e);let r=L();return ne(r.selectNode(n))})("nodeHovered",function(n){oe(e);let r=L();return ne(r.hover(n))})("nodeRightClicked",function(n){oe(e);let r=L();return ne(r.openContextMenu(n))}),p()}if(t&2){let e=o,i=L();R("shape",i.shape())("tree",e.tree)("centre",e.centre)("hoveredPath",i.hoveredPath())("metrics",i.metrics())("coloring",i.coloring())("isFocused",i.isFocused())}}function m9(t,o){if(t&1){let e=ue();f(0,"button",7),V("click",function(){oe(e);let n=L(2);return ne(n.unfocus())}),x(1,"Unfocus"),p()}}function p9(t,o){if(t&1&&(f(0,"div",1)(1,"output",4)(2,"span"),x(3,"There are no files with an area to show."),p(),K(4,m9,2,0,"button",6),p()()),t&2){let e=L();h(4),Q(e.isFocused()?4:-1)}}var f9=`calc(${[`var(${Kf}, ${32}px)`,`var(${Qf}, ${17}px)`,`var(${Qs}, 0px)`,`${12}px`].join(" + ")})`,Bu=(()=>{class t{constructor(){this.bottomInset=f9,this.readStore=E(Gc),this.writeStore=E(Xc),this.tree=F(this.readStore.tree$,{requireSync:!0}),this.layoutAlgorithm=F(this.readStore.layoutAlgorithm$,{requireSync:!0}),this.radialLevels=F(this.readStore.radialLevels$,{requireSync:!0}),this.shape=te(()=>this.layoutAlgorithm()===gt.RadialTreeMap?Pu(this.radialLevels()):Nu(this.radialLevels())),this.metrics=F(this.readStore.metrics$,{requireSync:!0}),this.coloring=F(this.readStore.coloring$,{requireSync:!0}),this.hoveredPath=F(this.readStore.hoveredNodePath$,{requireSync:!0}),this.isDeltaState=F(this.readStore.isDeltaState$,{requireSync:!0}),this.isFocused=F(this.readStore.isFocused$,{requireSync:!0}),this.isLoadingFile=F(E(Fe).isLoadingFile$,{initialValue:!1}),this.selectedPath=F(this.readStore.selectedNodePath$,{requireSync:!0}),this.requestedCentrePath=ke(null),this.view=te(()=>{let e=this.tree();if(!e)return null;let i=this.requestedCentrePath();return{tree:e,centre:i===null?e:Nc(e,i)}}),this.unfocusConfirmation=Ue.required("unfocusConfirmation"),this.unfocusConfirmationMessage=te(()=>`You are focused on "${this.tree()?.name??""}", so there is no folder above it. Unfocus and go up one folder?`),oo(()=>this.centreOnTheSelection())}selectNode(e){this.writeStore.selectNode(e)}goUp(){let e=this.view(),i=e&&_a(e.tree,e.centre.path);i?this.selectNode(i.path):this.isFocused()&&this.unfocusConfirmation().open()}unfocusAndGoUp(){let e=this.tree()?.path;this.unfocus();let i=this.tree(),n=i&&e&&_a(i,e);n&&this.selectNode(n.path)}openContextMenu({path:e,clientX:i,clientY:n}){this.writeStore.openContextMenu(e,i,n)}unfocus(){this.writeStore.unfocus()}hover(e){this.writeStore.hoverNode(e)}centreOnTheSelection(){let e=this.selectedPath(),{visibleDepth:i}=this.shape();ip(()=>{e!==null&&!this.isFileShownAroundTheCentre(e,i)&&this.requestedCentrePath.set(e)})}isFileShownAroundTheCentre(e,i){let n=this.view();if(!n)return!1;let r=Fr(n.centre,e,i);return r.isFile&&r.path===e}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["cc-radial-map"]],viewQuery:function(i,n){i&1&&tt(n.unfocusConfirmation,d9,5),i&2&&it()},hostAttrs:[1,"fixed","inset-x-0","z-0","top-[var(--cc-bars-height,49px)]"],hostVars:4,hostBindings:function(i,n){i&2&&(ze("bottom",n.bottomInset),Be("hidden",n.isLoadingFile()))},decls:5,vars:2,consts:[["unfocusConfirmation",""],[1,"flex","h-full","items-center","justify-center","p-4"],[3,"shape","tree","centre","hoveredPath","metrics","coloring","isFocused"],["title","Unfocus to go up?","testId","radial-map-unfocus-confirmation",3,"confirmed","message"],[1,"alert","max-w-md"],[3,"folderClicked","centreClicked","fileClicked","nodeHovered","nodeRightClicked","shape","tree","centre","hoveredPath","metrics","coloring","isFocused"],["type","button",1,"btn","btn-sm"],["type","button",1,"btn","btn-sm",3,"click"]],template:function(i,n){if(i&1&&(K(0,h9,4,0,"div",1)(1,u9,1,7,"cc-radial-chart",2)(2,p9,5,1,"div",1),f(3,"cc-confirm-dialog",3,0),V("confirmed",function(){return n.unfocusAndGoUp()}),p()),i&2){let r;Q(n.isDeltaState()?0:(r=n.view())?1:2,r),h(3),R("message",n.unfocusConfirmationMessage())}},dependencies:[Au,M0],encapsulation:2})}}return t})();function g9(t,o){t&1&&W(0,"cc-bar-tools-divider")}var Wu=(()=>{class t{constructor(){this.writeStore=E(Xc),this.isFocused=F(E(Gc).isFocused$,{requireSync:!0})}unfocus(){this.writeStore.unfocus()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["cc-radial-map-tools"]],hostAttrs:[1,"flex","items-center","gap-0.5"],features:[Xt([{provide:ul,useExisting:Kg}])],decls:3,vars:2,consts:[["testId","metrics-bar-unfocus",3,"unfocused","isFocused"],["view","metrics"]],template:function(i,n){i&1&&(f(0,"cc-unfocus-tool",0),V("unfocused",function(){return n.unfocus()}),p(),K(1,g9,1,0,"cc-bar-tools-divider"),W(2,"cc-toolbox-screenshot-button",1)),i&2&&(R("isFocused",n.isFocused()),h(),Q(n.isFocused()?1:-1))},dependencies:[il,ml,ll],encapsulation:2})}}return t})();var Ou=(()=>{class t extends e1{constructor(){super(...arguments),this.areaMetric=F(E(Ee).areaMetric$,{requireSync:!0}),this.pathToNode=E(me).selectSignal(Qn)}isEnabledFor(e){let i=this.pathToNode().get(e);return i!==void 0&&as(i,this.areaMetric())}static{this.\u0275fac=(()=>{let e;return function(n){return(e||(e=$m(t)))(n||t)}})()}static{this.\u0275prov=O({token:t,factory:t.\u0275fac})}}return t})();var b9=(t,o,e,i)=>{let n=t.length>0?t.filter(d=>$t(d)):o,r=0,a=0,s=0,l=0;for(let d of n)i(d)&&r++,d.isExcluded&&a++,!i(d)&&!d.isExcluded&&(s++,as(d,e)||l++);return{shown:s,flattened:r,excluded:a,noArea:l}},ww=Ge(Wf,Kn,qi,$s,b9);var zu=(()=>{class t{constructor(){this.store=E(me),this.counts$=this.store.select(ww)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=O({token:t,factory:t.\u0275fac})}}return t})();var $u=(()=>{class t{constructor(){this.store=E(me),this.metricValues$=this.store.select(Gg),this.descriptors$=this.store.select(Af)}addRule(e){sl(this.store,e.type,Es({rule:Te(ae({},e),{id:v9()})}))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=O({token:t,factory:t.\u0275fac})}}return t})();function v9(){return`metric-rule-${crypto.randomUUID()}`}var ju=(()=>{class t{constructor(){this.mapStateReadWindow=E(Ee),this.sharedViewReadWindow=E(_t),this.store=E(me),this.idToBuildingService=E(Gs),this.areaMetric=F(this.mapStateReadWindow.areaMetric$,{requireSync:!0}),this.buildingIds=F(this.idToBuildingService.buildingIds$,{requireSync:!0}),this.rootUnary=F(this.store.select(Vf),{requireSync:!0}),this.markedPackages=F(this.sharedViewReadWindow.markedPackages$,{requireSync:!0}),this.isFlattened=F(this.store.select($s),{requireSync:!0})}project(e){return l1(e,{areaMetric:this.areaMetric(),buildingIds:this.buildingIds(),rootUnary:this.rootUnary(),isFlattened:this.isFlattened(),hidesExcludedNodes:!0,markedPackages:this.markedPackages()})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=O({token:t,factory:t.\u0275fac})}}return t})();var Hu=(()=>{class t{constructor(){this.nodeInteraction=E(qo),this.sharedViewReadWindow=E(_t),this.codeMapTooltipService=E(Jn),this.selectedNodePath=F(this.sharedViewReadWindow.selectedNodePath$,{requireSync:!0}),this.hoveredNodePath=F(this.sharedViewReadWindow.hoveredNodePath$,{requireSync:!0})}isSelected(e){return this.selectedNodePath()===e.path}isHovered(e){return this.hoveredNodePath()===e.path}select(e){this.nodeInteraction.selectNode(e.path),this.nodeInteraction.clearKeptHighlight()}deselect(){this.nodeInteraction.clearSelection()}hover(e,i){this.nodeInteraction.hoverNode(e.path),this.codeMapTooltipService.show(e,i.right,i.top)}hoverEnd(){this.nodeInteraction.hoverNode(null),this.codeMapTooltipService.hide()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=O({token:t,factory:t.\u0275fac})}}return t})();var x9=2e3,yw=(()=>{class t{constructor(){this.actions$=E(mt),this.sharedViewReadWindow=E(_t),this.revealService=E(Pg),this.actions$.pipe(ct(di),Ut(()=>this.sharedViewReadWindow.selectedNodePath$.pipe(Ae(Boolean),wt(1),Wm(Dm(x9)))),gp()).subscribe(e=>this.revealService.revealNode(e,{expand:!1}))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=Um({type:t,selectors:[["","ccRevealsSelectedNodeAfterLoad",""]]})}}return t})();var y9=()=>[Bu];function S9(t,o){t&1&&W(0,"cc-radial-map")}function C9(t,o){t&1&&(Km(0,S9,1,0),Qm(1,0,y9),Ym())}function M9(t,o){t&1&&W(0,"cc-radial-map-tools",2)}function _9(t,o){t&1&&W(0,"cc-map-tools",2)}var Sw=(()=>{class t{constructor(){this.isRadialLayout=Vt()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["cc-metrics-view"]],features:[Xt([ju,{provide:Lg,useExisting:ju},Hu,{provide:Dg,useExisting:Hu},Ou,{provide:Ng,useExisting:Ou},Xd,{provide:Fg,useExisting:Xd},zu,{provide:Ig,useExisting:zu},Gd,{provide:Tg,useExisting:Gd},$u,{provide:qg,useExisting:$u},{provide:Ag,useExisting:lg},Og(Ug),Wg(Hg),{provide:$g,useValue:"metrics"},Ud,{provide:zg,useExisting:Ud},{provide:Eg,useValue:kg},{provide:Zg,useValue:Yg},Bg("metrics"),D0()]),no([yw,jg])],decls:13,vars:4,consts:[["view","metrics"],["collapsedContent","",1,"flex-1","min-w-0"],["barTools",""]],template:function(i,n){i&1&&(W(0,"cc-loading-file-progress-spinner",0)(1,"cc-code-map"),K(2,C9,3,0),f(3,"cc-sidebar-explorer"),W(4,"cc-explorer-search-bar",1),p(),W(5,"cc-sidebar-inspector")(6,"cc-node-context-menu"),f(7,"cc-metrics-bar"),K(8,M9,1,0,"cc-radial-map-tools",2)(9,_9,1,0,"cc-map-tools",2),p(),W(10,"cc-legend-panel")(11,"cc-file-extension-bar")(12,"cc-bottom-bar")),i&2&&(h(),Be("hidden",n.isRadialLayout()),h(),Q(n.isRadialLayout()?2:-1),h(6),Q(n.isRadialLayout()?8:9))},dependencies:[Eh,qu,Jg,Vg,Rg,Cg,Mh,_g,yg,I0,kh,Wu],encapsulation:2})}}return t})();var E9=[{path:Xs.metrics,component:Sw,canActivate:[Pl]},{path:Xs.domain,canActivate:[Pl],loadComponent:()=>import("./chunk-OJZK6HWN.js").then(t=>t.DomainViewComponent)},{path:Xs.dependencies,canActivate:[Pl],loadComponent:()=>import("./chunk-DKYMZBLK.js").then(t=>t.DependencyViewComponent)}],k9={provide:rp,useClass:U2},q9=[fp(E9),k9],Uu={providers:[dp(up(),hp()),vp(G2,{metaReducers:[X2]}),...q9,{provide:pp,useClass:Dl},xp([...r2,...y2,...c2,...l2,...M2,...E2,...H2,...Y2,...d2]),{provide:Xm,useFactory:t=>()=>t.synchronizeVersion(),deps:[I1],multi:!0}]};var Kc=class{parse(o,e={}){e=Object.assign({binary:!1},e);let i=e.binary,n=[],r=0;o.traverse(function(D){if(D.isMesh){let j=D.geometry,k=j.index,N=j.getAttribute("position");r+=k!==null?k.count/3:N.count/3,n.push({object3d:D,geometry:j})}});let a,s=80;if(i===!0){let D=r*2+r*3*4*4+80+4,j=new ArrayBuffer(D);a=new DataView(j),a.setUint32(s,r,!0),s+=4}else a="",a+=`solid exported
3647
+ `))},encapsulation:2})}}return e})();var Rr=(e,o,t)=>Math.min(Math.max(e,o),t),Dv=({minValue:e,maxValue:o,currentLeftValue:t,currentRightValue:i,sliderWidth:n})=>{let r=o-e;if(r<=0)return{leftEnd:n,rightStart:n};let a=(t-e)/r,s=(i-e)/r,l=Rr(a*n,0,n),d=Rr(s*n,l,n);return{leftEnd:l,rightStart:d}},u7=({thumbX:e,minValue:o,maxValue:t,sliderWidth:i})=>{let n=(t-o)/i,r=o+e*n;return Math.round(r)},Pv=e=>Vv(e,{lowerBound:0,upperBound:e.otherThumbX}),Nv=e=>Vv(e,{lowerBound:e.otherThumbX,upperBound:e.sliderWidth}),Vv=({deltaX:e,thumbScreenX:o,thumbRadius:t,sliderBoundingClientRectX:i,sliderWidth:n,minValue:r,maxValue:a},{lowerBound:s,upperBound:l})=>{let d=o+e-i+t,c=Rr(d,s,l);return{updatedThumbX:c,upcomingValue:u7({thumbX:c,minValue:r,maxValue:a,sliderWidth:n})}};var m7=["rangeSliderContainer"],p7=["leftThumb"],f7=["rightThumb"],Bv=(()=>{class e{get segmentWidths(){let t=Rr(this.sliderRangePosition.leftEnd,0,this.actualSliderWidth),i=Rr(this.sliderRangePosition.rightStart,t,this.actualSliderWidth);return{left:t,middle:i-t,right:this.actualSliderWidth-i}}constructor(t){this.changeDetectorRef=t,this.sliderWidth=150,this.sliderRangePosition={leftEnd:0,rightStart:0},this.thumbRadius=7,this.actualSliderWidth=this.sliderWidth,this.currentlySliding=void 0,this.activeMouseMoveHandler=null,this.activeMouseUpHandler=null,this.handleLeftThumbMoved=i=>{if(this.abortSlidingWhenHidden())return;let n=Pv({deltaX:i.movementX,thumbScreenX:this.leftThumb.nativeElement.getBoundingClientRect().x,thumbRadius:this.thumbRadius,otherThumbX:this.sliderRangePosition.rightStart,sliderBoundingClientRectX:this.sliderContainer.nativeElement.getBoundingClientRect().x,sliderWidth:this.actualSliderWidth,minValue:this.minValue,maxValue:this.maxValue});this.sliderRangePosition={leftEnd:n.updatedThumbX,rightStart:this.sliderRangePosition.rightStart},this.upcomingLeftValue=n.upcomingValue,this.changeDetectorRef.markForCheck(),this.handleValueChange({newLeftValue:n.upcomingValue})},this.handleRightThumbMoved=i=>{if(this.abortSlidingWhenHidden())return;let n=Nv({deltaX:i.movementX,thumbScreenX:this.rightThumb.nativeElement.getBoundingClientRect().x,thumbRadius:this.thumbRadius,otherThumbX:this.sliderRangePosition.leftEnd,sliderBoundingClientRectX:this.sliderContainer.nativeElement.getBoundingClientRect().x,sliderWidth:this.actualSliderWidth,minValue:this.minValue,maxValue:this.maxValue});this.sliderRangePosition={leftEnd:this.sliderRangePosition.leftEnd,rightStart:n.updatedThumbX},this.upcomingRightValue=n.upcomingValue,this.changeDetectorRef.markForCheck(),this.handleValueChange({newRightValue:n.upcomingValue})}}ngOnChanges(t){t.sliderWidth&&(this.actualSliderWidth=this.sliderWidth),this.currentlySliding||(t.currentLeftValue&&(this.upcomingLeftValue=this.currentLeftValue),t.currentRightValue&&(this.upcomingRightValue=this.currentRightValue),this.updateSliderRangePosition())}ngAfterViewInit(){typeof ResizeObserver<"u"&&(this.resizeObserver=new ResizeObserver(t=>{let i=t.at(-1).contentRect.width;i>0&&i!==this.actualSliderWidth&&(this.actualSliderWidth=i,this.currentlySliding||this.updateSliderRangePosition(),this.changeDetectorRef.markForCheck())}),this.resizeObserver.observe(this.sliderContainer.nativeElement))}ngOnDestroy(){this.stopSliding(),this.resizeObserver?.disconnect()}setCurrentlySliding(t){switch(this.stopSliding(),this.currentlySliding=t,this.currentlySliding){case"leftThumb":this.activeMouseMoveHandler=this.handleLeftThumbMoved,this.rightThumb.nativeElement.style.zIndex="0",this.leftThumb.nativeElement.style.zIndex="1";break;case"rightThumb":this.activeMouseMoveHandler=this.handleRightThumbMoved,this.leftThumb.nativeElement.style.zIndex="0",this.rightThumb.nativeElement.style.zIndex="1";break;default:return}this.activeMouseUpHandler=()=>this.stopSliding(),document.addEventListener("mousemove",this.activeMouseMoveHandler),document.addEventListener("mouseup",this.activeMouseUpHandler)}stopSliding(){this.currentlySliding=void 0,this.activeMouseMoveHandler&&(document.removeEventListener("mousemove",this.activeMouseMoveHandler),this.activeMouseMoveHandler=null),this.activeMouseUpHandler&&(document.removeEventListener("mouseup",this.activeMouseUpHandler),this.activeMouseUpHandler=null)}handleLeftThumbKeydown(t){let i=this.calculateValueFromKeyboard(t,this.upcomingLeftValue,this.minValue,this.upcomingRightValue);i===void 0||i===this.upcomingLeftValue||(t.preventDefault(),this.upcomingLeftValue=i,this.updateSliderRangePosition(),this.handleValueChange({newLeftValue:i}))}handleRightThumbKeydown(t){let i=this.calculateValueFromKeyboard(t,this.upcomingRightValue,this.upcomingLeftValue,this.maxValue);i===void 0||i===this.upcomingRightValue||(t.preventDefault(),this.upcomingRightValue=i,this.updateSliderRangePosition(),this.handleValueChange({newRightValue:i}))}calculateValueFromKeyboard(t,i,n,r){let a;switch(t.key){case"ArrowLeft":case"ArrowDown":a=i-1;break;case"ArrowRight":case"ArrowUp":a=i+1;break;case"Home":a=n;break;case"End":a=r;break;default:return}return Math.max(n,Math.min(r,a))}handleCurrentLeftInputChanged(t){let i=$d(t,this.minValue,this.upcomingRightValue,this.upcomingLeftValue);i!==void 0&&(this.upcomingLeftValue=i,this.updateSliderRangePosition(),this.handleValueChange({newLeftValue:i}))}handleCurrentRightInputChanged(t){let i=$d(t,this.upcomingLeftValue,this.maxValue,this.upcomingRightValue);i!==void 0&&(this.upcomingRightValue=i,this.updateSliderRangePosition(),this.handleValueChange({newRightValue:i}))}updateSliderRangePosition(){this.sliderRangePosition=Dv({minValue:this.minValue,maxValue:this.maxValue,currentLeftValue:this.upcomingLeftValue??this.currentLeftValue,currentRightValue:this.upcomingRightValue??this.currentRightValue,sliderWidth:this.actualSliderWidth})}abortSlidingWhenHidden(){return this.sliderContainer.nativeElement.getBoundingClientRect().width===0?(this.stopSliding(),!0):!1}static{this.\u0275fac=function(i){return new(i||e)(le(Rn))}}static{this.\u0275cmp=A({type:e,selectors:[["cc-metric-color-range-slider"]],viewQuery:function(i,n){if(i&1&&Qa(m7,5)(p7,5)(f7,5),i&2){let r;Si(r=Ci())&&(n.sliderContainer=r.first),Si(r=Ci())&&(n.leftThumb=r.first),Si(r=Ci())&&(n.rightThumb=r.first)}},inputs:{minValue:"minValue",maxValue:"maxValue",currentLeftValue:"currentLeftValue",currentRightValue:"currentRightValue",leftColor:"leftColor",middleColor:"middleColor",rightColor:"rightColor",handleValueChange:"handleValueChange",sliderWidth:"sliderWidth"},features:[Ga],decls:15,vars:34,consts:[["rangeSliderContainer",""],["leftThumb",""],["rightThumb",""],[1,"flex","items-center","gap-2"],["type","number","aria-label","Lower color range value input",1,"input","input-sm","input-bordered","w-16","text-center",3,"input","value","min","max"],[1,"flex","flex-1","mx-2","relative","leading-[48px]"],[1,"inline-block","border-b-4","border-solid"],["aria-hidden","true",1,"cursor-pointer","absolute","-top-1","rounded-full","border-[7px]","border-primary",3,"mousedown"],["type","range","step","1","aria-label","Lower color range value",1,"absolute","inset-0","m-0","h-full","w-full","opacity-0","pointer-events-none",3,"keydown","min","max","value"],["type","range","step","1","aria-label","Upper color range value",1,"absolute","inset-0","m-0","h-full","w-full","opacity-0","pointer-events-none",3,"keydown","min","max","value"],[3,"minValue","maxValue","leftValueLabel","rightValueLabel","sliderRangePosition","sliderWidth"],["type","number","aria-label","Upper color range value input",1,"input","input-sm","input-bordered","w-16","text-center",3,"input","value","min","max"]],template:function(i,n){i&1&&(f(0,"div",3)(1,"input",4),V("input",function(a){return n.handleCurrentLeftInputChanged(a)}),p(),f(2,"div",5,0),W(4,"span",6)(5,"span",6)(6,"span",6),f(7,"div",7,1),V("mousedown",function(){return n.setCurrentlySliding("leftThumb")}),p(),f(9,"div",7,2),V("mousedown",function(){return n.setCurrentlySliding("rightThumb")}),p(),f(11,"input",8),V("keydown",function(a){return n.handleLeftThumbKeydown(a)}),p(),f(12,"input",9),V("keydown",function(a){return n.handleRightThumbKeydown(a)}),p(),W(13,"cc-range-slider-labels",10),p(),f(14,"input",11),V("input",function(a){return n.handleCurrentRightInputChanged(a)}),p()()),i&2&&(h(),R("value",n.currentLeftValue)("min",n.minValue)("max",n.upcomingRightValue),h(3),ze("width",n.segmentWidths.left,"px")("border-bottom-color",n.leftColor),h(),ze("width",n.segmentWidths.middle,"px")("border-bottom-color",n.middleColor),h(),ze("width",n.segmentWidths.right,"px")("border-bottom-color",n.rightColor),h(),ze("left",n.sliderRangePosition.leftEnd-n.thumbRadius,"px"),h(2),ze("left",n.sliderRangePosition.rightStart-n.thumbRadius,"px"),h(2),R("min",n.minValue)("max",n.currentRightValue)("value",n.currentLeftValue),h(),R("min",n.currentLeftValue)("max",n.maxValue)("value",n.currentRightValue),h(),R("minValue",n.minValue)("maxValue",n.maxValue)("leftValueLabel",n.upcomingLeftValue)("rightValueLabel",n.upcomingRightValue)("sliderRangePosition",n.sliderRangePosition)("sliderWidth",n.actualSliderWidth),h(),R("value",n.currentRightValue)("min",n.upcomingLeftValue)("max",n.maxValue))},dependencies:[Lv],encapsulation:2})}}return e})();var Wv=(()=>{class e{constructor(t,i,n,r){this.mapStateReadWindow=t,this.metricsBarReadStore=i,this.metricsBarWriteStore=n,this.metricsLensFacade=r,this.colorMetric=F(this.mapStateReadWindow.colorMetric$,{initialValue:""}),this.sliderValues=F(this.metricsBarReadStore.metricColorRangeValues$,{initialValue:{values:[],min:0,max:0,from:0,to:0}}),this.sliderColors=F(this.metricsBarReadStore.metricColorRangeColors$,{initialValue:{leftColor:"#000",middleColor:"#000",rightColor:"#000"}}),this.isAttributeDirectionInversed=F(ut([this.mapStateReadWindow.colorMetric$,this.metricsLensFacade.descriptors$]).pipe(_e(([a,s])=>s[a]?.direction===1)),{initialValue:!1}),this.pendingLeftValue=null,this.pendingRightValue=null,this.commitColorRange=Ui(()=>{let a={};this.pendingLeftValue!==null&&(a.from=this.pendingLeftValue),this.pendingRightValue!==null&&(a.to=this.pendingRightValue),this.pendingLeftValue=null,this.pendingRightValue=null,this.metricsBarWriteStore.setColorRange(a)},ng),this.handleValueChange=({newLeftValue:a,newRightValue:s})=>{this.pendingLeftValue=a??this.pendingLeftValue,this.pendingRightValue=s??this.pendingRightValue,this.commitColorRange()}}ngOnDestroy(){this.commitColorRange.flush()}static{this.\u0275fac=function(i){return new(i||e)(le(Ee),le(dt),le(je),le(Bs))}}static{this.\u0275cmp=A({type:e,selectors:[["cc-color-range-section"]],hostAttrs:[1,"contents"],decls:7,vars:23,consts:[[1,"block",3,"minValue","maxValue","currentLeftValue","currentRightValue","leftColor","middleColor","rightColor","handleValueChange","sliderWidth"],[1,"flex","items-center","justify-between","gap-2"],[1,"text-xs","uppercase","tracking-wider","opacity-60"],[1,"truncate","text-xs","opacity-60"],[3,"minValue","maxValue","currentLeftValue","currentRightValue","leftColor","middleColor","rightColor","colorMetric","values","isAttributeDirectionInverted","diagramWidth","diagramHeight","showAxisLabels"]],template:function(i,n){i&1&&(W(0,"cc-metric-color-range-slider",0),f(1,"div",1)(2,"span",2),x(3,"Distribution"),p(),f(4,"span",3),x(5),p()(),W(6,"cc-metric-color-range-diagram",4)),i&2&&(R("minValue",n.sliderValues().min)("maxValue",n.sliderValues().max)("currentLeftValue",n.sliderValues().from)("currentRightValue",n.sliderValues().to)("leftColor",n.sliderColors().leftColor)("middleColor",n.sliderColors().middleColor)("rightColor",n.sliderColors().rightColor)("handleValueChange",n.handleValueChange)("sliderWidth",220),h(5),we("",n.colorMetric()," \xD7 quantile %"),h(),R("minValue",n.sliderValues().min)("maxValue",n.sliderValues().max)("currentLeftValue",n.sliderValues().from)("currentRightValue",n.sliderValues().to)("leftColor",n.sliderColors().leftColor)("middleColor",n.sliderColors().middleColor)("rightColor",n.sliderColors().rightColor)("colorMetric",n.colorMetric())("values",n.sliderValues().values)("isAttributeDirectionInverted",n.isAttributeDirectionInversed())("diagramWidth",380)("diagramHeight",190)("showAxisLabels",!1))},dependencies:[Bv,Fv],encapsulation:2})}}return e})();function g7(e,o){if(e&1){let t=ue();_(0,"button",6),re("click",function(){oe(t);let n=L();return ne(n.resetThresholds())}),Se(1,"i",7),T()}}var Ov=(()=>{class e{constructor(t,i,n,r){this.mapStateReadWindow=t,this.fileStoreReadWindow=i,this.metricsBarReadStore=n,this.metricsBarWriteStore=r,this.colorMetric=F(this.mapStateReadWindow.colorMetric$,{initialValue:""}),this.isDeltaState=F(this.fileStoreReadWindow.isDeltaState$,{initialValue:!1}),this.mapColors=F(this.mapStateReadWindow.mapColors$,{initialValue:Qt}),this.selectedColorMetricData=F(this.metricsBarReadStore.selectedColorMetricData$,{initialValue:{values:[],minValue:0,maxValue:0}}),this.canResetThresholds=te(()=>!this.isDeltaState()&&this.colorMetric()!=="unary"),this.swatchGradient=te(()=>{let a=this.mapColors();return this.isDeltaState()?`linear-gradient(90deg, ${a.positiveDelta}, ${a.negativeDelta})`:`linear-gradient(90deg, ${a.positive}, ${a.neutral}, ${a.negative})`})}resetThresholds(){this.metricsBarWriteStore.setColorRange(vr(this.selectedColorMetricData()))}static{this.\u0275fac=function(i){return new(i||e)(le(Ee),le(Fe),le(dt),le(je))}}static{this.\u0275cmp=A({type:e,selectors:[["cc-color-settings-header"]],hostAttrs:[1,"contents"],decls:8,vars:4,consts:[[1,"flex","items-center","justify-between","gap-2"],[1,"flex","min-w-0","items-center","gap-2"],[1,"inline-block","h-3.5","w-3.5","shrink-0","rounded-full"],[1,"truncate","text-sm"],[1,"font-semibold","text-primary"],["title","Reset slider thresholds to default","aria-label","Reset thresholds",1,"btn","btn-ghost","btn-xs","btn-square"],["title","Reset slider thresholds to default","aria-label","Reset thresholds",1,"btn","btn-ghost","btn-xs","btn-square",3,"click"],[1,"fa","fa-undo"]],template:function(i,n){i&1&&(_(0,"div",0)(1,"div",1),Se(2,"span",2),_(3,"span",3),x(4,"Color by "),_(5,"span",4),x(6),T()()(),K(7,g7,2,0,"button",5),T()),i&2&&(h(2),ze("background",n.swatchGradient()),h(4),Re(n.colorMetric()),h(),Q(n.canResetThresholds()?7:-1))},encapsulation:2})}}return e})();var zv=(()=>{class e{constructor(){this.override=J.required(),this.recolorOverride=fe(),this.unpinOverride=fe()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=A({type:e,selectors:[["cc-folder-override-row"]],hostAttrs:[1,"contents"],inputs:{override:[1,"override"]},outputs:{recolorOverride:"recolorOverride",unpinOverride:"unpinOverride"},decls:8,vars:7,consts:[[1,"flex","shrink-0","items-center","gap-2","rounded-md","border","border-base-300","px-2","py-1",3,"title"],[3,"colorChange","hexColor","ariaLabel"],[1,"min-w-0","flex-1","truncate","text-sm"],[1,"text-xs","opacity-60","tabular-nums",3,"title"],[1,"btn","btn-ghost","btn-xs","btn-square",3,"click","title"],[1,"fa","fa-times"]],template:function(i,n){i&1&&(f(0,"div",0)(1,"cc-inline-color-picker",1),V("colorChange",function(a){return n.recolorOverride.emit(a)}),p(),f(2,"span",2),x(3),p(),f(4,"span",3),x(5),p(),f(6,"button",4),V("click",function(){return n.unpinOverride.emit()}),W(7,"i",5),p()()),i&2&&(R("title",n.override().path),h(),R("hexColor",n.override().color)("ariaLabel","Recolor "+n.override().path),h(2),Re(n.override().path),h(),R("title",n.override().fileCount+" files"),h(),Re(n.override().fileCount),h(),R("title","Unpin "+n.override().path))},dependencies:[To],encapsulation:2})}}return e})();var b7=["pinInput"];function v7(e,o){if(e&1){let t=ue();_(0,"button",2),re("click",function(){oe(t);let n=L();return ne(n.startPinning())}),Se(1,"i",3),_(2,"span"),x(3,"Pin a folder color\u2026"),T()()}}function x7(e,o){if(e&1){let t=ue();_(0,"li",8)(1,"button",10),re("mousedown",function(n){return n.preventDefault()})("click",function(){let n=oe(t).$implicit,r=L(2);return ne(r.handlePin(n))}),_(2,"span",11),x(3),T()()()}if(e&2){let t=o.$implicit;h(),xe("title",t),h(2),Re(t)}}function w7(e,o){e&1&&(_(0,"li",9),x(1,"No folders found"),T())}function y7(e,o){if(e&1){let t=ue();_(0,"div",4),Se(1,"i",5),_(2,"input",6,0),re("input",function(n){oe(t);let r=L();return ne(r.handleSearchTermChange(n.target.value))})("keydown.escape",function(n){oe(t);let r=L();return ne(r.handleSearchEscape(n))})("blur",function(){oe(t);let n=L();return ne(n.handleSearchBlur())}),T()(),_(4,"ul",7),Ne(5,x7,4,2,"li",8,si,!1,w7,2,0,"li",9),T()}if(e&2){let t=L();h(2),xe("value",t.searchTerm()),h(3),Ve(t.folderSuggestions())}}var S7=8,$v=(()=>{class e{constructor(t){this.metricsBarReadStore=t,this.pinFolder=fe(),this.folderPaths=F(this.metricsBarReadStore.markableFolderPaths$,{initialValue:[]}),this.overrides=F(this.metricsBarReadStore.markedPackagesWithCounts$,{initialValue:[]}),this.isPinning=ke(!1),this.searchTerm=ke(""),this.pinInput=Ue("pinInput"),this.folderSuggestions=te(()=>{let i=this.searchTerm().toLowerCase(),n=new Set(this.overrides().map(a=>a.path)),r=[];for(let a of this.folderPaths())if(!(n.has(a)||!a.toLowerCase().includes(i))&&(r.push(a),r.length>=S7))break;return r})}startPinning(){this.isPinning.set(!0),setTimeout(()=>this.pinInput()?.nativeElement.focus())}stopPinning(){this.isPinning.set(!1),this.searchTerm.set("")}handleSearchTermChange(t){this.searchTerm.set(t)}handleSearchBlur(){this.searchTerm().trim()===""&&this.stopPinning()}handleSearchEscape(t){t.preventDefault(),this.stopPinning()}handlePin(t){this.pinFolder.emit(t),this.stopPinning()}static{this.\u0275fac=function(i){return new(i||e)(le(dt))}}static{this.\u0275cmp=A({type:e,selectors:[["cc-pin-folder-search"]],viewQuery:function(i,n){i&1&&tt(n.pinInput,b7,5),i&2&&it()},hostAttrs:[1,"contents"],outputs:{pinFolder:"pinFolder"},decls:2,vars:1,consts:[["pinInput",""],[1,"btn","btn-ghost","btn-sm","w-full","justify-start","gap-2","border","border-dashed","border-base-300","font-normal"],[1,"btn","btn-ghost","btn-sm","w-full","justify-start","gap-2","border","border-dashed","border-base-300","font-normal",3,"click"],[1,"fa","fa-plus"],[1,"input","input-sm","input-bordered","flex","items-center","gap-2"],[1,"fa","fa-search","opacity-60"],["type","text","placeholder","Search folders\u2026","aria-label","Search folders",1,"grow",3,"input","keydown.escape","blur","value"],[1,"m-0","flex","max-h-40","list-none","flex-col","overflow-y-auto","p-0"],[1,"flex"],[1,"px-2","py-1","text-xs","opacity-60"],[1,"btn","btn-ghost","btn-xs","w-full","flex-nowrap","justify-start","font-normal",3,"mousedown","click","title"],[1,"min-w-0","truncate"]],template:function(i,n){i&1&&K(0,v7,4,0,"button",1)(1,y7,8,2),i&2&&Q(n.isPinning()?1:0)},encapsulation:2})}}return e})();var C7=(e,o)=>o.path;function M7(e,o){if(e&1&&(f(0,"span",2),x(1),p()),e&2){let t=L();h(),we("",t.overrides().length," pinned")}}function _7(e,o){if(e&1){let t=ue();f(0,"cc-folder-override-row",7),V("recolorOverride",function(n){let r=oe(t).$implicit,a=L(2);return ne(a.handleRecolor(r.path,n))})("unpinOverride",function(){let n=oe(t).$implicit,r=L(2);return ne(r.handleUnpin(n.path))}),p()}if(e&2){let t=o.$implicit;R("override",t)}}function E7(e,o){if(e&1&&(f(0,"div",4),Ne(1,_7,1,1,"cc-folder-override-row",6,C7),p()),e&2){let t=L();h(),Ve(t.overrides())}}var jv=(()=>{class e{constructor(t,i,n){this.mapStateReadWindow=t,this.metricsBarReadStore=i,this.metricsBarWriteStore=n,this.overrides=F(this.metricsBarReadStore.markedPackagesWithCounts$,{initialValue:[]}),this.mapColors=F(this.mapStateReadWindow.mapColors$,{initialValue:Qt})}handlePin(t){this.metricsBarWriteStore.markPackage({path:t,color:this.nextMarkingColor(t)})}handleRecolor(t,i){this.metricsBarWriteStore.markPackage({path:t,color:i})}handleUnpin(t){this.metricsBarWriteStore.unmarkPackage(t)}nextMarkingColor(t){let i=this.mapColors().markingColors,n=this.findMarkedParentColor(t),r=i.filter(s=>s!==n);if(r.length===0)return i[0];let a=new Set(this.overrides().map(s=>s.color));return r.find(s=>!a.has(s))??r[this.overrides().length%r.length]}findMarkedParentColor(t){let i,n=0;for(let r of this.overrides())t.startsWith(`${r.path}/`)&&r.path.length>n&&(i=r.color,n=r.path.length);return i}static{this.\u0275fac=function(i){return new(i||e)(le(Ee),le(dt),le(je))}}static{this.\u0275cmp=A({type:e,selectors:[["cc-folder-overrides"]],hostAttrs:[1,"contents"],decls:8,vars:2,consts:[[1,"flex","items-center","justify-between","gap-2"],[1,"text-xs","uppercase","tracking-wider","opacity-60"],[1,"text-xs","opacity-60"],[1,"m-0","text-xs","opacity-60"],[1,"flex","max-h-36","flex-col","gap-0.5","overflow-y-auto"],[3,"pinFolder"],[3,"override"],[3,"recolorOverride","unpinOverride","override"]],template:function(i,n){i&1&&(f(0,"div",0)(1,"span",1),x(2,"Folder Overrides"),p(),K(3,M7,2,1,"span",2),p(),f(4,"p",3),x(5,"These folders\u2019 floors are tinted with the pinned color."),p(),K(6,E7,3,0,"div",4),f(7,"cc-pin-folder-search",5),V("pinFolder",function(a){return n.handlePin(a)}),p()),i&2&&(h(3),Q(n.overrides().length>0?3:-1),h(3),Q(n.overrides().length>0?6:-1))},dependencies:[zv,$v],encapsulation:2})}}return e})();var Hv=(()=>{class e{constructor(t,i){this.mapStateReadWindow=t,this.metricsBarWriteStore=i,this.groupName=J.required(),this.colorMode=F(this.mapStateReadWindow.colorMode$,{initialValue:"absolute"})}handleColorModeChange(t){this.metricsBarWriteStore.setColorMode(t)}static{this.\u0275fac=function(i){return new(i||e)(le(Ee),le(je))}}static{this.\u0275cmp=A({type:e,selectors:[["cc-gradient-mode-picker"]],hostAttrs:[1,"contents"],inputs:{groupName:[1,"groupName"]},decls:8,vars:8,consts:[[1,"flex","flex-col","gap-1"],[1,"text-xs","uppercase","tracking-wider","opacity-60"],["role","radiogroup","aria-label","Gradient mode",1,"join","w-full"],["type","radio","aria-label","Absolute",1,"join-item","btn","btn-sm","flex-1",3,"change","name","checked"],["type","radio","aria-label","Focused",1,"join-item","btn","btn-sm","flex-1",3,"change","name","checked"],["type","radio","aria-label","Weighted",1,"join-item","btn","btn-sm","flex-1",3,"change","name","checked"],["type","radio","aria-label","Relative",1,"join-item","btn","btn-sm","flex-1",3,"change","name","checked"]],template:function(i,n){i&1&&(_(0,"div",0)(1,"span",1),x(2,"Gradient Mode"),T(),_(3,"div",2)(4,"input",3),re("change",function(){return n.handleColorModeChange("absolute")}),T(),_(5,"input",4),re("change",function(){return n.handleColorModeChange("focusedGradient")}),T(),_(6,"input",5),re("change",function(){return n.handleColorModeChange("weightedGradient")}),T(),_(7,"input",6),re("change",function(){return n.handleColorModeChange("trueGradient")}),T()()()),i&2&&(h(4),xe("name",n.groupName())("checked",n.colorMode()==="absolute"),h(),xe("name",n.groupName())("checked",n.colorMode()==="focusedGradient"),h(),xe("name",n.groupName())("checked",n.colorMode()==="weightedGradient"),h(),xe("name",n.groupName())("checked",n.colorMode()==="trueGradient"))},encapsulation:2})}}return e})();function k7(e,o){if(e&1){let t=ue();f(0,"label",1)(1,"input",3),V("change",function(){oe(t);let n=L();return ne(n.handleIsColorRangeInvertedChange())}),p(),f(2,"span",4),x(3,"Invert colors"),p()()}if(e&2){let t=L();h(),R("checked",t.isColorRangeInverted())}}function q7(e,o){if(e&1){let t=ue();f(0,"label",1)(1,"input",3),V("change",function(){oe(t);let n=L();return ne(n.handleAreDeltaColorsInvertedChange())}),p(),f(2,"span",4),x(3,"Invert colors"),p()()}if(e&2){let t=L();h(),R("checked",t.areDeltaColorsInverted())}}var Uv=(()=>{class e{constructor(t,i,n){this.fileStoreReadWindow=t,this.mapStateReadWindow=i,this.metricsBarWriteStore=n,this.isDeltaState=F(this.fileStoreReadWindow.isDeltaState$,{initialValue:!1}),this.mapColors=F(this.mapStateReadWindow.mapColors$,{initialValue:Qt}),this.isColorRangeInverted=te(()=>this.mapColors().isColorRangeInverted??!1),this.areDeltaColorsInverted=te(()=>this.mapColors().areDeltaColorsInverted??!1)}handleIsColorRangeInvertedChange(){this.metricsBarWriteStore.invertColorRange()}handleAreDeltaColorsInvertedChange(){this.metricsBarWriteStore.invertDeltaColors()}resetColorsKeys(){return this.isDeltaState()?["mapState.mapColors.positiveDelta","mapState.mapColors.negativeDelta","mapState.mapColors.selected","mapState.mapColors.areDeltaColorsInverted"]:["mapState.mapColors.positive","mapState.mapColors.negative","mapState.mapColors.neutral","mapState.mapColors.selected","mapState.mapColors.isColorRangeInverted","mapState.colorMode"]}static{this.\u0275fac=function(i){return new(i||e)(le(Fe),le(Ee),le(je))}}static{this.\u0275cmp=A({type:e,selectors:[["cc-invert-reset-row"]],hostAttrs:[1,"contents"],decls:4,vars:4,consts:[[1,"flex","items-center","justify-between","gap-2"],[1,"flex","cursor-pointer","items-center","gap-2"],["label","Reset colors",3,"settingsKeys","tooltip","small"],["type","checkbox",1,"toggle","toggle-sm","toggle-primary",3,"change","checked"],[1,"text-sm"]],template:function(i,n){i&1&&(f(0,"div",0),K(1,k7,4,1,"label",1)(2,q7,4,1,"label",1),W(3,"cc-reset-settings-button",2),p()),i&2&&(h(),Q(n.isDeltaState()?2:1),h(2),R("settingsKeys",n.resetColorsKeys())("tooltip",n.isDeltaState()?"Reset color values to default":"Reset color values and gradient mode to default")("small",!0))},dependencies:[Wi],encapsulation:2})}}return e})();function T7(e,o){if(e&1&&W(0,"cc-color-range-section")(1,"cc-gradient-mode-picker",1),e&2){let t=L();h(),R("groupName",t.popoverId()+"-gradient-mode")}}var Cc=(()=>{class e{constructor(t,i){this.mapStateReadWindow=t,this.fileStoreReadWindow=i,this.popoverId=J.required(),this.anchorName=J.required(),this.colorMetric=F(this.mapStateReadWindow.colorMetric$,{initialValue:""}),this.isDeltaState=F(this.fileStoreReadWindow.isDeltaState$,{initialValue:!1}),this.hasRangeSection=te(()=>!this.isDeltaState()&&this.colorMetric()!=="unary")}static{this.\u0275fac=function(i){return new(i||e)(le(Ee),le(Fe))}}static{this.\u0275cmp=A({type:e,selectors:[["cc-color-settings-popover"]],hostAttrs:[1,"contents"],inputs:{popoverId:[1,"popoverId"],anchorName:[1,"anchorName"]},decls:6,vars:4,consts:[[3,"popoverId","anchorName","widthClass"],[3,"groupName"]],template:function(i,n){i&1&&(f(0,"cc-settings-popover-shell",0),W(1,"cc-color-settings-header"),K(2,T7,2,1),W(3,"cc-color-bands-section")(4,"cc-invert-reset-row")(5,"cc-folder-overrides"),p()),i&2&&(R("popoverId",n.popoverId())("anchorName",n.anchorName())("widthClass","max-w-[95vw] "+(n.hasRangeSection()?"w-[420px]":"w-80")),h(2),Q(n.hasRangeSection()?2:-1))},dependencies:[kt,Ov,Wv,Hv,gb,Uv,jv],encapsulation:2})}}return e})();var Gv=(()=>{class e{constructor(t,i,n){this.mapStateReadWindow=t,this.preferencesReadWindow=i,this.metricsBarWriteStore=n,this.searchPopoverId="metric-select-popover-color",this.searchAnchorName="metric-segment-color",this.settingsPopoverId="metric-settings-popover-color",this.settingsAnchorName="metric-segment-color-cog",this.colorMetric=F(this.mapStateReadWindow.colorMetric$,{initialValue:""}),this.isLinkedToHeight=F(this.preferencesReadWindow.isColorMetricLinkedToHeightMetric$,{initialValue:!1}),this.isRadialLayout=Vt(),this.isSelectionLocked=te(()=>this.isLinkedToHeight()&&!this.isRadialLayout())}handleMetricSelected(t){this.isLinkedToHeight()&&this.metricsBarWriteStore.unlinkColorMetricFromHeightMetric(),this.metricsBarWriteStore.setColorMetric(t)}static{this.\u0275fac=function(i){return new(i||e)(le(Ee),le(mi),le(je))}}static{this.\u0275cmp=A({type:e,selectors:[["cc-color-segment"]],hostAttrs:[1,"contents"],decls:5,vars:14,consts:[["label","Color",3,"metricName","hasCog","cogPopoverId","cogAnchorName","searchPopoverId","searchAnchorName","disabled","testId","cogTestId"],["body","",1,"flex","flex-col","items-stretch","gap-1"],["metricFor","colorMetric"],["placeholder","Color Metric (highest value)","kind","node",3,"metricSelected","popoverId","anchorName","selected"],[3,"popoverId","anchorName"]],template:function(i,n){i&1&&(f(0,"cc-axis-card",0)(1,"div",1),W(2,"cc-metric-meta-value",2),p()(),f(3,"cc-metric-bar-select-popover",3),V("metricSelected",function(a){return n.handleMetricSelected(a)}),p(),W(4,"cc-color-settings-popover",4)),i&2&&(R("metricName",n.colorMetric())("hasCog",!0)("cogPopoverId",n.settingsPopoverId)("cogAnchorName",n.settingsAnchorName)("searchPopoverId",n.searchPopoverId)("searchAnchorName",n.searchAnchorName)("disabled",n.isSelectionLocked())("testId","metric-segment-color")("cogTestId","metric-segment-color-cog"),h(3),R("popoverId",n.searchPopoverId)("anchorName",n.searchAnchorName)("selected",n.colorMetric()),h(),R("popoverId",n.settingsPopoverId)("anchorName",n.settingsAnchorName))},dependencies:[Bi,Sr,zl,Cc],encapsulation:2})}}return e})();var Xv=(()=>{class e{constructor(){this.mapStateReadWindow=E(Ee),this.metricsBarWriteStore=E(je),this.isEdgeMetricVisible=F(this.mapStateReadWindow.isEdgeMetricVisible$,{initialValue:!0})}toggle(){this.metricsBarWriteStore.toggleEdgeMetricVisible()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=A({type:e,selectors:[["cc-edge-metric-toggle"]],decls:4,vars:1,consts:[[1,"flex","items-center","gap-2","cursor-pointer"],["type","checkbox",1,"checkbox","checkbox-sm","checkbox-primary",3,"change","checked"]],template:function(i,n){i&1&&(_(0,"label",0)(1,"input",1),re("change",function(){return n.toggle()}),T(),_(2,"span"),x(3,"Disable edge metric"),T()()),i&2&&(h(),xe("checked",!n.isEdgeMetricVisible()))},encapsulation:2})}}return e})();var Kv=(()=>{class e{constructor(){this.mapStateReadWindow=E(Ee),this.metricsBarReadStore=E(dt),this.metricsBarWriteStore=E(je),this.popoverId=J.required(),this.anchorName=J.required(),this.amountOfBuildingsWithSelectedEdgeMetric=F(this.metricsBarReadStore.amountOfBuildingsWithSelectedEdgeMetric$,{initialValue:0}),this.edgePreviewLabel=F(this.metricsBarReadStore.amountOfBuildingsWithSelectedEdgeMetric$.pipe(_e(t=>`Preview the edges of up to ${t} buildings with the highest amount of incoming and outgoing edges`)),{initialValue:""}),this.amountOfEdgePreviews=F(this.mapStateReadWindow.amountOfEdgePreviews$,{initialValue:0}),this.edgeHeight=F(this.mapStateReadWindow.edgeHeight$,{initialValue:1}),this.showOutgoingEdges=F(this.mapStateReadWindow.showOutgoingEdges$,{initialValue:!1}),this.showIncomingEdges=F(this.mapStateReadWindow.showIncomingEdges$,{initialValue:!1}),this.showOnlyBuildingsWithEdges=F(this.mapStateReadWindow.showOnlyBuildingsWithEdges$,{initialValue:!1}),this.mapColors=F(this.mapStateReadWindow.mapColors$,{initialValue:Qt}),this.outgoingEdgeColor=te(()=>this.mapColors().outgoingEdge),this.incomingEdgeColor=te(()=>this.mapColors().incomingEdge),this.resetKeys=["mapState.amountOfEdgePreviews","mapState.edgeHeight","mapState.mapColors.outgoingEdge","mapState.showOutgoingEdges","mapState.mapColors.incomingEdge","mapState.showIncomingEdges","mapState.showOnlyBuildingsWithEdges","mapState.isEdgeMetricVisible"]}setAmountOfEdgePreviews(t){this.metricsBarWriteStore.setAmountOfEdgePreviews(t)}setEdgeHeight(t){this.metricsBarWriteStore.setEdgeHeight(t)}setShowOutgoingEdges(t){let i=t.target.checked;this.metricsBarWriteStore.setShowOutgoingEdges(i)}setShowIncomingEdges(t){let i=t.target.checked;this.metricsBarWriteStore.setShowIncomingEdges(i)}setShowOnlyBuildingsWithEdges(t){let i=t.target.checked;this.metricsBarWriteStore.setShowOnlyBuildingsWithEdges(i)}setMapColor(t,i){this.metricsBarWriteStore.setMapColors({[t]:i})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=A({type:e,selectors:[["cc-edge-settings-popover"]],hostAttrs:[1,"contents"],inputs:{popoverId:[1,"popoverId"],anchorName:[1,"anchorName"]},decls:32,vars:18,consts:[["widthClass","w-80",3,"popoverId","anchorName"],[3,"title"],[1,"text-sm"],["ariaLabel","Edge preview amount",3,"valueChange","min","max","value","disabled"],["title","Adjust the curve height"],["ariaLabel","Edge height",3,"valueChange","min","max","value","disabled"],[1,"flex","flex-col","gap-2"],[1,"flex","items-center","gap-2"],["ariaLabel","Outgoing edge color",3,"colorChange","hexColor"],[1,"min-w-0","flex-1","truncate","text-sm"],[1,"flex","items-center","gap-2","cursor-pointer"],["type","checkbox",1,"checkbox","checkbox-sm","checkbox-primary",3,"change","checked"],["ariaLabel","Incoming edge color",3,"colorChange","hexColor"],["type","checkbox",1,"checkbox","checkbox-sm","checkbox-primary",3,"change","checked","disabled"],["tooltip","Reset edge metric settings to their defaults","label","Reset edge metric settings",3,"settingsKeys"]],template:function(i,n){i&1&&(f(0,"cc-settings-popover-shell",0)(1,"div",1)(2,"span",2),x(3,"Preview"),p(),f(4,"cc-slider-number-input",3),V("valueChange",function(a){return n.setAmountOfEdgePreviews(a)}),p()(),f(5,"div",4)(6,"span",2),x(7,"Height"),p(),f(8,"cc-slider-number-input",5),V("valueChange",function(a){return n.setEdgeHeight(a)}),p()(),f(9,"div",6)(10,"div",7)(11,"cc-inline-color-picker",8),V("colorChange",function(a){return n.setMapColor("outgoingEdge",a)}),p(),f(12,"span",9),x(13,"Outgoing Edge"),p(),f(14,"label",10)(15,"input",11),V("change",function(a){return n.setShowOutgoingEdges(a)}),p(),f(16,"span"),x(17,"Show"),p()()(),f(18,"div",7)(19,"cc-inline-color-picker",12),V("colorChange",function(a){return n.setMapColor("incomingEdge",a)}),p(),f(20,"span",9),x(21,"Incoming Edge"),p(),f(22,"label",10)(23,"input",11),V("change",function(a){return n.setShowIncomingEdges(a)}),p(),f(24,"span"),x(25,"Show"),p()()()(),f(26,"label",10)(27,"input",13),V("change",function(a){return n.setShowOnlyBuildingsWithEdges(a)}),p(),f(28,"span"),x(29,"Only show nodes with edges"),p()(),W(30,"cc-edge-metric-toggle")(31,"cc-reset-settings-button",14),p()),i&2&&(R("popoverId",n.popoverId())("anchorName",n.anchorName()),h(),R("title",n.edgePreviewLabel()),h(3),R("min",0)("max",n.amountOfBuildingsWithSelectedEdgeMetric())("value",n.amountOfEdgePreviews())("disabled",n.amountOfBuildingsWithSelectedEdgeMetric()===0),h(4),R("min",1)("max",9)("value",n.edgeHeight())("disabled",n.amountOfBuildingsWithSelectedEdgeMetric()===0),h(3),R("hexColor",n.outgoingEdgeColor()),h(4),R("checked",n.showOutgoingEdges()),h(4),R("hexColor",n.incomingEdgeColor()),h(4),R("checked",n.showIncomingEdges()),h(4),R("checked",n.showOnlyBuildingsWithEdges())("disabled",n.amountOfBuildingsWithSelectedEdgeMetric()===0),h(4),R("settingsKeys",n.resetKeys))},dependencies:[To,Wi,Xv,kt,ti],encapsulation:2})}}return e})();function R7(e,o){e&1&&(W(0,"cc-metric-chooser-type",5),f(1,"span"),x(2),p()),e&2&&(R("metricFor","edgeMetric"),h(2),Re(o))}function A7(e,o){e&1&&(f(0,"span",2),x(1,"\xA0"),p())}var Yv=(()=>{class e{constructor(){this.mapStateReadWindow=E(Ee),this.metricsBarWriteStore=E(je),this.nodeSelectionService=E(Cr),this.searchPopoverId="metric-select-popover-edge",this.searchAnchorName="metric-segment-edges",this.settingsPopoverId="metric-settings-popover-edge",this.settingsAnchorName="metric-segment-edges-cog",this.edgeMetric=F(this.mapStateReadWindow.edgeMetric$,{initialValue:""}),this.isEdgeMetricVisible=F(this.mapStateReadWindow.isEdgeMetricVisible$,{initialValue:!0}),this.hoveredNode=F(this.nodeSelectionService.createNodeObservable()),this.hoveredEdgeValue=te(()=>{let t=this.hoveredNode(),i=this.edgeMetric();if(!t||!i)return null;let n=t.edgeAttributes?.[i];return n?`${Qv(n.incoming)} / ${Qv(n.outgoing)}`:null})}handleMetricSelected(t){this.metricsBarWriteStore.setEdgeMetric(t)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=A({type:e,selectors:[["cc-edge-segment"]],hostAttrs:[1,"contents"],decls:6,vars:15,consts:[["label","Edges",3,"metricName","hasCog","cogPopoverId","cogAnchorName","searchPopoverId","searchAnchorName","dimmed","testId","cogTestId"],["body","",1,"flex","items-center","justify-center","gap-1","text-xs","opacity-60","leading-tight","min-h-4"],["aria-hidden","true"],["placeholder","Edge Metric (highest value)","kind","edge",3,"metricSelected","popoverId","anchorName","selected"],[3,"popoverId","anchorName"],["attributeType","edges",3,"metricFor"]],template:function(i,n){if(i&1&&(f(0,"cc-axis-card",0)(1,"div",1),K(2,R7,3,2)(3,A7,2,0,"span",2),p()(),f(4,"cc-metric-bar-select-popover",3),V("metricSelected",function(a){return n.handleMetricSelected(a)}),p(),W(5,"cc-edge-settings-popover",4)),i&2){let r;R("metricName",n.edgeMetric())("hasCog",!0)("cogPopoverId",n.settingsPopoverId)("cogAnchorName",n.settingsAnchorName)("searchPopoverId",n.searchPopoverId)("searchAnchorName",n.searchAnchorName)("dimmed",!n.isEdgeMetricVisible())("testId","metric-segment-edges")("cogTestId","metric-segment-edges-cog"),h(2),Q((r=n.hoveredEdgeValue())?2:3,r),h(2),R("popoverId",n.searchPopoverId)("anchorName",n.searchAnchorName)("selected",n.edgeMetric()),h(),R("popoverId",n.settingsPopoverId)("anchorName",n.settingsAnchorName)}},dependencies:[Bi,Ol,Sr,Kv],encapsulation:2})}}return e})();function Qv(e){return typeof e=="number"?e.toLocaleString():"-"}var I7=(e,o)=>o.style;function F7(e,o){if(e&1){let t=ue();f(0,"label",9)(1,"input",10),V("click",function(){let n=oe(t).$implicit,r=L();return ne(r.styleSelected.emit(n.style))}),p(),W(2,"span",11),x(3),p()}if(e&2){let t=o.$implicit,i=L();Be("btn-active",t.style===i.selectedStyle()),rt("data-testid","folder-style-"+t.style),h(),R("name",i.popoverId()+"-style")("checked",t.style===i.selectedStyle()),h(),ze("background",t.swatch),h(),we(" ",t.label," ")}}var Zv=(()=>{class e{constructor(){this.popoverId=J.required(),this.anchorName=J.required(),this.isNeutral=J.required(),this.tintPercent=J.required(),this.tintedSwatch=J.required(),this.styleSelected=fe(),this.tintPercentChange=fe(),this.selectedStyle=te(()=>this.isNeutral()?ji.Neutral:ji.Tinted),this.options=te(()=>[{style:ji.Tinted,label:"Tinted by value",swatch:this.tintedSwatch()},{style:ji.Neutral,label:"Neutral",swatch:Ys}]),this.minTintPercent=20,this.maxTintPercent=100,this.tintPercentStep=10,this.resetKeys=["preferences.radialFolderValue","preferences.radialFolderStyle","preferences.radialFolderTint"]}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=A({type:e,selectors:[["cc-folder-style-popover"]],hostAttrs:[1,"contents"],inputs:{popoverId:[1,"popoverId"],anchorName:[1,"anchorName"],isNeutral:[1,"isNeutral"],tintPercent:[1,"tintPercent"],tintedSwatch:[1,"tintedSwatch"]},outputs:{styleSelected:"styleSelected",tintPercentChange:"tintPercentChange"},decls:15,vars:12,consts:[["widthClass","w-80","ariaLabel","Folder style","testId","folder-style-popover",3,"popoverId","anchorName"],[1,"text-sm","font-semibold"],[1,"flex","flex-col","gap-1"],[1,"text-xs","uppercase","tracking-wider","opacity-60"],["role","radiogroup","aria-label","Folder style",1,"join","w-full"],[1,"join-item","btn","btn-sm","flex-1","flex-nowrap","gap-1.5","whitespace-nowrap","has-[:focus-visible]:outline-2",3,"btn-active"],["ariaLabel","Tint strength",3,"valueChange","min","max","step","value","disabled"],[1,"h-2","rounded-sm"],["tooltip","Reset folder value, style and tint strength to their defaults","label","Reset folder colors",3,"settingsKeys"],[1,"join-item","btn","btn-sm","flex-1","flex-nowrap","gap-1.5","whitespace-nowrap","has-[:focus-visible]:outline-2"],["type","radio",1,"sr-only",3,"click","name","checked"],[1,"inline-block","h-2","w-3.5","shrink-0","rounded-sm"]],template:function(i,n){i&1&&(f(0,"cc-settings-popover-shell",0)(1,"span",1),x(2,"Folder style"),p(),f(3,"div",2)(4,"span",3),x(5,"Folders"),p(),f(6,"div",4),Ne(7,F7,4,8,"label",5,I7),p()(),f(9,"div",2)(10,"span",3),x(11,"Tint strength"),p(),f(12,"cc-slider-number-input",6),V("valueChange",function(a){return n.tintPercentChange.emit(a)}),p(),W(13,"div",7),p(),W(14,"cc-reset-settings-button",8),p()),i&2&&(R("popoverId",n.popoverId())("anchorName",n.anchorName()),h(7),Ve(n.options()),h(2),Be("opacity-50",n.isNeutral()),h(3),R("min",n.minTintPercent)("max",n.maxTintPercent)("step",n.tintPercentStep)("value",n.tintPercent())("disabled",n.isNeutral()),h(),ze("background",n.tintedSwatch()),h(),R("settingsKeys",n.resetKeys))},dependencies:[Wi,kt,ti],encapsulation:2})}}return e})();var L7=(e,o)=>o.value;function D7(e,o){if(e&1){let t=ue();f(0,"label",8)(1,"input",9),V("click",function(){let n=oe(t).$implicit,r=L();return ne(r.valueSelected.emit(n.value))}),p(),f(2,"span",10)(3,"span",11),x(4),p(),f(5,"span",7),x(6),p()(),W(7,"i",12),p()}if(e&2){let t=o.$implicit,i=L();Be("bg-base-200",t.value===i.selected()),rt("data-testid","folder-value-"+t.value),h(),R("name",i.popoverId()+"-value")("checked",t.value===i.selected()),h(3),Re(t.label),h(2),Re(t.description),h(),Be("invisible",t.value!==i.selected())}}var Jv=(()=>{class e{constructor(){this.popoverId=J.required(),this.anchorName=J.required(),this.selected=J.required(),this.isNeutral=J.required(),this.colorMetric=J.required(),this.valueSelected=fe(),this.options=o0,this.title=te(()=>this.isNeutral()?"neutral":rr(this.selected()).label),this.footnote=te(()=>this.isNeutral()?"Folders are one grey. Pick a value to tint them again.":"Files keep their colour. Folders are tinted by this value; the cog sets neutral or the tint strength.")}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=A({type:e,selectors:[["cc-folder-value-popover"]],hostAttrs:[1,"contents"],inputs:{popoverId:[1,"popoverId"],anchorName:[1,"anchorName"],selected:[1,"selected"],isNeutral:[1,"isNeutral"],colorMetric:[1,"colorMetric"]},outputs:{valueSelected:"valueSelected"},decls:13,vars:7,consts:[["widthClass","w-80","ariaLabel","Folder value","testId","folder-value-popover",3,"popoverId","anchorName"],[1,"flex","items-baseline","justify-between","gap-2"],[1,"text-sm","font-semibold","whitespace-nowrap"],["data-testid","folder-value-title",1,"text-primary"],[1,"min-w-0","truncate","text-xs","opacity-60"],["role","radiogroup","aria-label","Folder value",1,"flex","flex-col","gap-0.5"],[1,"flex","cursor-pointer","items-center","gap-2","rounded-md","px-2","py-1","text-left","hover:bg-base-200","has-[:focus-visible]:outline-2",3,"bg-base-200"],[1,"text-xs","opacity-70"],[1,"flex","cursor-pointer","items-center","gap-2","rounded-md","px-2","py-1","text-left","hover:bg-base-200","has-[:focus-visible]:outline-2"],["type","radio",1,"sr-only",3,"click","name","checked"],[1,"flex","min-w-0","flex-1","flex-col"],[1,"text-sm","font-medium"],["aria-hidden","true",1,"fa","fa-check","text-primary"]],template:function(i,n){i&1&&(f(0,"cc-settings-popover-shell",0)(1,"div",1)(2,"span",2),x(3," Folders by "),f(4,"span",3),x(5),p()(),f(6,"span",4),x(7),p()(),f(8,"div",5),Ne(9,D7,8,9,"label",6,L7),p(),f(11,"p",7),x(12),p()()),i&2&&(R("popoverId",n.popoverId())("anchorName",n.anchorName()),h(5),Re(n.title()),h(2),we("of ",n.colorMetric()),h(),Be("opacity-60",n.isNeutral()),h(),Ve(n.options),h(3),Re(n.footnote()))},dependencies:[kt],encapsulation:2})}}return e})();var ex=100,tx=(()=>{class e{constructor(){this.valuePopoverId="metric-select-popover-folders",this.valueAnchorName="metric-segment-folders",this.stylePopoverId="metric-settings-popover-folders",this.styleAnchorName="metric-segment-folders-cog",this.preferencesReadWindow=E(mi),this.mapStateReadWindow=E(Ee),this.metricsBarWriteStore=E(je),this.folderValue=F(this.preferencesReadWindow.radialFolderValue$,{requireSync:!0}),this.isNeutral=F(this.preferencesReadWindow.isRadialFolderNeutral$,{requireSync:!0}),this.tint=F(this.preferencesReadWindow.radialFolderTint$,{requireSync:!0}),this.colorMetric=F(this.mapStateReadWindow.colorMetric$,{requireSync:!0}),this.swatch=F(this.preferencesReadWindow.radialFolderSwatch$,{requireSync:!0}),this.tintedSwatch=F(this.preferencesReadWindow.radialTintedFolderSwatch$,{requireSync:!0}),this.tintPercent=te(()=>Math.round(this.tint()*ex)),this.valueLabel=te(()=>rr(this.folderValue()).label),this.styleLabel=te(()=>this.isNeutral()?"neutral":`tinted ${this.tintPercent()} %`)}selectValue(t){this.metricsBarWriteStore.setRadialFolderValue(t),this.isNeutral()&&this.metricsBarWriteStore.setRadialFolderStyle(ji.Tinted)}selectStyle(t){this.metricsBarWriteStore.setRadialFolderStyle(t)}setTintPercent(t){this.metricsBarWriteStore.setRadialFolderTint(t/ex)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=A({type:e,selectors:[["cc-folders-segment"]],hostAttrs:[1,"contents"],decls:7,vars:22,consts:[["label","Folders",3,"metricName","dimmed","hasCog","cogPopoverId","cogAnchorName","searchPopoverId","searchAnchorName","testId","cogTestId"],["body","",1,"flex","items-center","justify-center","gap-1","text-xs","leading-tight","min-h-4"],[1,"inline-block","h-2","w-3.5","shrink-0","rounded-sm","border","border-base-300"],["data-testid","metric-segment-folders-style",1,"font-medium"],[3,"valueSelected","popoverId","anchorName","selected","isNeutral","colorMetric"],[3,"styleSelected","tintPercentChange","popoverId","anchorName","isNeutral","tintPercent","tintedSwatch"]],template:function(i,n){i&1&&(f(0,"cc-axis-card",0)(1,"div",1),W(2,"span",2),f(3,"span",3),x(4),p()()(),f(5,"cc-folder-value-popover",4),V("valueSelected",function(a){return n.selectValue(a)}),p(),f(6,"cc-folder-style-popover",5),V("styleSelected",function(a){return n.selectStyle(a)})("tintPercentChange",function(a){return n.setTintPercent(a)}),p()),i&2&&(R("metricName",n.valueLabel())("dimmed",n.isNeutral())("hasCog",!0)("cogPopoverId",n.stylePopoverId)("cogAnchorName",n.styleAnchorName)("searchPopoverId",n.valuePopoverId)("searchAnchorName",n.valueAnchorName)("testId","metric-segment-folders")("cogTestId","metric-segment-folders-cog"),h(2),ze("background",n.swatch()),h(2),Re(n.styleLabel()),h(),R("popoverId",n.valuePopoverId)("anchorName",n.valueAnchorName)("selected",n.folderValue())("isNeutral",n.isNeutral())("colorMetric",n.colorMetric()),h(),R("popoverId",n.stylePopoverId)("anchorName",n.styleAnchorName)("isNeutral",n.isNeutral())("tintPercent",n.tintPercent())("tintedSwatch",n.tintedSwatch()))},dependencies:[Bi,Zv,Jv],encapsulation:2})}}return e})();function P7(e,o){if(e&1){let t=ue();f(0,"label",4)(1,"input",6),V("change",function(n){oe(t);let r=L();return ne(r.toggleInvertHeight(n))}),p(),f(2,"span"),x(3,"Invert Height"),p()()}if(e&2){let t=L();h(),R("checked",t.invertHeight())}}var ix=(()=>{class e{constructor(){this.mapStateReadWindow=E(Ee),this.fileStoreReadWindow=E(Fe),this.metricsBarWriteStore=E(je),this.popoverId=J.required(),this.anchorName=J.required(),this.scalingY=F(this.mapStateReadWindow.scaling$,{initialValue:{x:1,y:1,z:1}}),this.invertHeight=F(this.mapStateReadWindow.invertHeight$,{initialValue:!1}),this.isDeltaState=F(this.fileStoreReadWindow.isDeltaState$,{initialValue:!1}),this.resetKeys=["mapState.scaling.y","mapState.invertHeight"]}setScalingY(t){this.metricsBarWriteStore.setScaling({y:t})}toggleInvertHeight(t){let i=t.target.checked;this.metricsBarWriteStore.setInvertHeight(i)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=A({type:e,selectors:[["cc-height-settings-popover"]],hostAttrs:[1,"contents"],inputs:{popoverId:[1,"popoverId"],anchorName:[1,"anchorName"]},decls:7,vars:7,consts:[[3,"popoverId","anchorName"],["title","Height scaling"],[1,"text-sm"],["ariaLabel","Height",3,"valueChange","min","max","value"],[1,"flex","items-center","gap-2","cursor-pointer"],["tooltip","Reset height metric settings to their defaults","label","Reset height metric settings",3,"settingsKeys"],["type","checkbox",1,"checkbox","checkbox-sm","checkbox-primary",3,"change","checked"]],template:function(i,n){i&1&&(f(0,"cc-settings-popover-shell",0)(1,"div",1)(2,"span",2),x(3,"Height"),p(),f(4,"cc-slider-number-input",3),V("valueChange",function(a){return n.setScalingY(a)}),p()(),K(5,P7,4,1,"label",4),W(6,"cc-reset-settings-button",5),p()),i&2&&(R("popoverId",n.popoverId())("anchorName",n.anchorName()),h(4),R("min",1)("max",25)("value",n.scalingY().y),h(),Q(n.isDeltaState()?-1:5),h(),R("settingsKeys",n.resetKeys))},dependencies:[Wi,kt,ti],encapsulation:2})}}return e})();var ox=(()=>{class e{constructor(){this.searchPopoverId="metric-select-popover-height",this.searchAnchorName="metric-segment-height",this.settingsPopoverId="metric-settings-popover-height",this.settingsAnchorName="metric-segment-height-cog",this.mapStateReadWindow=E(Ee),this.metricsBarWriteStore=E(je),this.heightMetric=F(this.mapStateReadWindow.heightMetric$,{initialValue:""})}handleMetricSelected(t){this.metricsBarWriteStore.setHeightMetric(t)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=A({type:e,selectors:[["cc-height-segment"]],hostAttrs:[1,"contents"],decls:2,vars:7,consts:[["label","Height","metricFor","heightMetric","placeholder","Height Metric (highest value)","testIdPrefix","metric-segment-height",3,"metricSelected","metricName","searchPopoverId","searchAnchorName","settingsPopoverId","settingsAnchorName"],[3,"popoverId","anchorName"]],template:function(i,n){i&1&&(f(0,"cc-metric-segment",0),V("metricSelected",function(a){return n.handleMetricSelected(a)}),W(1,"cc-height-settings-popover",1),p()),i&2&&(R("metricName",n.heightMetric())("searchPopoverId",n.searchPopoverId)("searchAnchorName",n.searchAnchorName)("settingsPopoverId",n.settingsPopoverId)("settingsAnchorName",n.settingsAnchorName),h(),R("popoverId",n.settingsPopoverId)("anchorName",n.settingsAnchorName))},dependencies:[$l,ix],encapsulation:2})}}return e})();var Tt={areaMetric:{group:"area",label:"Area metric",isMetricSelection:!0,isAppliedFirst:!0,read:e=>e.state.mapState.areaMetric,patch:e=>({mapState:{areaMetric:e.areaMetric}})},margin:{group:"area",label:"Margin",read:e=>e.state.mapState.margin,patch:e=>({mapState:{margin:e.margin}})},invertArea:{group:"area",label:"Invert area",read:e=>e.state.mapState.invertArea,patch:e=>({mapState:{invertArea:e.invertArea}})},enableFloorLabels:{group:"area",label:"Floor labels",read:e=>e.state.mapState.enableFloorLabels,patch:e=>({mapState:{enableFloorLabels:e.enableFloorLabels}})},heightMetric:{group:"height",label:"Height metric",isMetricSelection:!0,isAppliedFirst:!0,read:e=>e.state.mapState.heightMetric,patch:e=>({mapState:{heightMetric:e.heightMetric}})},heightScaling:{group:"height",label:"Height scaling",read:e=>e.state.mapState.scaling.y,patch:e=>({mapState:{scaling:{y:e.heightScaling}}})},invertHeight:{group:"height",label:"Invert height",read:e=>e.state.mapState.invertHeight,patch:e=>({mapState:{invertHeight:e.invertHeight}})},colorMetric:{group:"color",label:"Color metric",isMetricSelection:!0,isAppliedFirst:!0,read:e=>e.state.mapState.colorMetric,patch:e=>({mapState:{colorMetric:e.colorMetric}})},isColorMetricLinkedToHeightMetric:{group:"color",label:"Color follows height metric",isAppliedFirst:!0,read:e=>e.state.preferences.isColorMetricLinkedToHeightMetric,patch:e=>({preferences:{isColorMetricLinkedToHeightMetric:e.isColorMetricLinkedToHeightMetric}})},colorRange:{group:"color",label:"Color range",read:e=>ae({},e.state.mapState.colorRange),patch:e=>({mapState:{colorRange:e.colorRange}})},colorMode:{group:"color",label:"Gradient mode",read:e=>e.state.mapState.colorMode,patch:e=>({mapState:{colorMode:e.colorMode}})},mapColors:{group:"color",label:"Colors",read:e=>N7(e.state.mapState.mapColors),patch:e=>({mapState:{mapColors:e.mapColors}})},markedPackages:{group:"color",label:"Folder color overrides",read:e=>[...e.state.sharedView.markedPackages],patch:e=>({sharedView:{markedPackages:[...e.markedPackages]}})},edgeMetric:{group:"edge",label:"Edge metric",isMetricSelection:!0,isAppliedFirst:!0,read:e=>e.state.mapState.edgeMetric,patch:e=>({mapState:{edgeMetric:e.edgeMetric}})},isEdgeMetricVisible:{group:"edge",label:"Edge metric enabled",read:e=>e.state.mapState.isEdgeMetricVisible,patch:e=>({mapState:{isEdgeMetricVisible:e.isEdgeMetricVisible}})},amountOfEdgePreviews:{group:"edge",label:"Edge previews",read:e=>e.state.mapState.amountOfEdgePreviews,patch:e=>({mapState:{amountOfEdgePreviews:e.amountOfEdgePreviews}})},edgeHeight:{group:"edge",label:"Edge curve height",read:e=>e.state.mapState.edgeHeight,patch:e=>({mapState:{edgeHeight:e.edgeHeight}})},showOutgoingEdges:{group:"edge",label:"Show outgoing edges",read:e=>e.state.mapState.showOutgoingEdges,patch:e=>({mapState:{showOutgoingEdges:e.showOutgoingEdges}})},showIncomingEdges:{group:"edge",label:"Show incoming edges",read:e=>e.state.mapState.showIncomingEdges,patch:e=>({mapState:{showIncomingEdges:e.showIncomingEdges}})},showOnlyBuildingsWithEdges:{group:"edge",label:"Only nodes with edges",read:e=>e.state.mapState.showOnlyBuildingsWithEdges,patch:e=>({mapState:{showOnlyBuildingsWithEdges:e.showOnlyBuildingsWithEdges}})},edgeColors:{group:"edge",label:"Edge colors",read:e=>({outgoingEdge:e.state.mapState.mapColors.outgoingEdge,incomingEdge:e.state.mapState.mapColors.incomingEdge}),patch:e=>({mapState:{mapColors:ae({},e.edgeColors)}})},amountOfTopLabels:{group:"labels",label:"Top labels",read:e=>e.state.mapState.amountOfTopLabels,patch:e=>({mapState:{amountOfTopLabels:e.amountOfTopLabels}})},labelsPerMap:{group:"labels",label:"Top labels scope",read:e=>e.state.mapState.labelsPerMap,patch:e=>({mapState:{labelsPerMap:e.labelsPerMap}})},labelSize:{group:"labels",label:"Label size",read:e=>e.state.mapState.labelSize,patch:e=>({mapState:{labelSize:e.labelSize}})},labelMode:{group:"labels",label:"Label mode",read:e=>e.state.mapState.labelMode,patch:e=>({mapState:{labelMode:e.labelMode}})},showMetricLabelNodeName:{group:"labels",label:"Show node names",read:e=>e.state.mapState.showMetricLabelNodeName,patch:e=>({mapState:{showMetricLabelNodeName:e.showMetricLabelNodeName}})},showMetricLabelNameValue:{group:"labels",label:"Show metric values",read:e=>e.state.mapState.showMetricLabelNameValue,patch:e=>({mapState:{showMetricLabelNameValue:e.showMetricLabelNameValue}})},groupLabelCollisions:{group:"labels",label:"Group overlapping labels",read:e=>e.state.mapState.groupLabelCollisions,patch:e=>({mapState:{groupLabelCollisions:e.groupLabelCollisions}})},colorLabels:{group:"labels",label:"Labels by color metric",read:e=>ae({},e.state.mapState.colorLabels),patch:e=>({mapState:{colorLabels:e.colorLabels}})},camera:{group:"camera",label:"Position and zoom",read:e=>({position:ae({},e.camera.position),target:ae({},e.camera.target)})},excludedNodes:{group:"filters",label:"Excluded nodes",read:e=>[...e.state.sharedView.excludedNodes],patch:e=>({sharedView:{excludedNodes:[...e.excludedNodes]}})},flattenedNodes:{group:"filters",label:"Flattened nodes",read:e=>[...e.state.sharedView.flattenedNodes],patch:e=>({sharedView:{flattenedNodes:[...e.flattenedNodes]}})},metricRules:{group:"filters",label:"Flattened and excluded by metric",read:e=>[...e.state.sharedView.metricRules],patch:e=>({sharedView:{metricRules:[...e.metricRules]}})},focusedNodePath:{group:"filters",label:"Focused folder",read:e=>[...e.state.sharedView.focusedNodePath],patch:e=>({sharedView:{focusedNodePath:[...e.focusedNodePath]}})}};function N7(e){let n=e,{outgoingEdge:o,incomingEdge:t}=n;return to(n,["outgoingEdge","incomingEdge"])}var gn=Object.keys(Tt),ya={area:"Area",height:"Height",color:"Color",edge:"Edges",labels:"Labels",camera:"Camera",filters:"Filters"},Mc=Object.keys(ya),_c={area:"fa-th-large",height:"fa-bar-chart",color:"fa-paint-brush",edge:"fa-share-alt",labels:"fa-tags",camera:"fa-video-camera",filters:"fa-filter"};function xu(e){return!!Tt[e].isMetricSelection}var pX=gn.filter(xu);function wu(e){return!!Tt[e].isAppliedFirst}function nx(e,o){return Object.fromEntries(Object.entries(e).filter(([t])=>o.has(t)))}function rx(e,o){let t={};for(let i of gn){if(!o.has(i))continue;let n=Tt[i].read(e);n!==void 0&&(t[i]=n)}return t}var Ec=".ccscenario",kc=3;function yu(e){return gn.filter(o=>e.settings[o]!==void 0)}function ax(e){let o=new Set(yu(e).map(t=>Tt[t].group));return Mc.filter(t=>o.has(t))}function sx(e){return Te(ae(ae({schemaVersion:kc,name:e.name},e.description?{description:e.description}:{}),e.mapFileNames?.length>0?{mapFileNames:e.mapFileNames}:{}),{settings:e.settings})}function lx(e){return{id:crypto.randomUUID(),name:e.name,description:e.description,mapFileNames:e.mapFileNames,createdAt:Date.now(),settings:e.settings}}var dx=(e,o)=>o.key;function V7(e,o){if(e&1){let t=ue();_(0,"label",8)(1,"input",12),re("change",function(n){let r=oe(t).$implicit,a=L(2);return ne(a.toggleSetting(r.key,n.target.checked))}),T(),_(2,"span",13),x(3),T()()}if(e&2){let t=o.$implicit;h(),xe("checked",t.selected),rt("data-testid","scenario-setting-"+t.key),h(2),Re(t.label)}}function B7(e,o){if(e&1){let t=ue();_(0,"div",7)(1,"label",8)(2,"input",9),re("change",function(n){let r=oe(t).$implicit,a=L();return ne(a.toggleGroup(r,n.target.checked))}),T(),Se(3,"i"),_(4,"span",10),x(5),T()(),_(6,"div",11),Ne(7,V7,4,3,"label",8,dx),T()()}if(e&2){let t=o.$implicit;h(2),xe("checked",t.allSelected)("indeterminate",t.someSelected&&!t.allSelected),rt("data-testid","scenario-group-"+t.key),h(),zt(Tn("fa ",t.icon," w-4 text-center opacity-60")),h(2),Re(t.label),h(2),Ve(t.settings)}}var qc=(()=>{class e{constructor(){this.availableKeys=J.required(),this.defaultKeys=J.required(),this.selectedKeys=op.required(),this.isDefaultSelection=te(()=>{let t=this.selectedKeys(),i=this.defaultKeys();return t.size===i.length&&i.every(n=>t.has(n))}),this.groups=te(()=>{let t=this.selectedKeys(),i=this.availableKeys();return Mc.map(n=>this.toPickerGroup(n,i,t)).filter(n=>n.settings.length>0)})}selectAll(){this.selectedKeys.set(new Set(this.availableKeys()))}selectNone(){this.selectedKeys.set(new Set)}resetSelection(){this.selectedKeys.set(new Set(this.defaultKeys()))}toggleSetting(t,i){this.selectedKeys.update(n=>cx(n,[t],i))}toggleGroup(t,i){this.selectedKeys.update(n=>cx(n,t.settings.map(r=>r.key),i))}toPickerGroup(t,i,n){let r=i.filter(a=>Tt[a].group===t).map(a=>({key:a,label:Tt[a].label,selected:n.has(a)}));return{key:t,label:ya[t],icon:_c[t],settings:r,allSelected:r.length>0&&r.every(a=>a.selected),someSelected:r.some(a=>a.selected)}}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=A({type:e,selectors:[["cc-scenario-settings-picker"]],inputs:{availableKeys:[1,"availableKeys"],defaultKeys:[1,"defaultKeys"],selectedKeys:[1,"selectedKeys"]},outputs:{selectedKeys:"selectedKeysChange"},decls:13,vars:1,consts:[[1,"mb-1","flex","items-center","justify-between","gap-2"],[1,"text-xs","uppercase","tracking-wide","opacity-60"],[1,"join"],["type","button","data-testid","scenario-settings-select-all",1,"btn","btn-xs","join-item",3,"click"],["type","button","data-testid","scenario-settings-select-none",1,"btn","btn-xs","join-item",3,"click"],["type","button","data-testid","scenario-settings-reset",1,"btn","btn-xs","join-item",3,"click","disabled"],[1,"flex","flex-col","gap-2","max-h-64","overflow-y-auto","pr-1"],[1,"flex","flex-col","gap-1"],[1,"flex","items-center","gap-2","cursor-pointer"],["type","checkbox",1,"checkbox","checkbox-sm","checkbox-primary",3,"change","checked","indeterminate"],[1,"text-sm","font-semibold"],[1,"flex","flex-col","gap-0.5","pl-7"],["type","checkbox",1,"checkbox","checkbox-xs","checkbox-primary",3,"change","checked"],[1,"text-xs"]],template:function(i,n){i&1&&(_(0,"div",0)(1,"span",1),x(2,"Toggle all"),T(),_(3,"div",2)(4,"button",3),re("click",function(){return n.selectAll()}),x(5," On "),T(),_(6,"button",4),re("click",function(){return n.selectNone()}),x(7," Off "),T(),_(8,"button",5),re("click",function(){return n.resetSelection()}),x(9," Reset "),T()()(),_(10,"div",6),Ne(11,B7,9,7,"div",7,dx),T()),i&2&&(h(8),xe("disabled",n.isDefaultSelection()),h(3),Ve(n.groups()))},encapsulation:2})}}return e})();function cx(e,o,t){let i=new Set(e);for(let n of o)t?i.add(n):i.delete(n);return i}function Tc(e){return`${e} ${e===1?"setting":"settings"}`}var Rc=(()=>{class e{constructor(t,i){this.store=t,this.ccStateSnapshot=i}getValue(){return this.ccStateSnapshot.get()}setStatePatch(t){this.store.dispatch(ei({value:t}))}static{this.\u0275fac=function(i){return new(i||e)(M(me),M(Pt))}}static{this.\u0275prov=O({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var W7=["areaMetric","heightMetric","colorMetric"],Ac=(()=>{class e{constructor(t,i,n,r){this.scenariosStore=t,this.threeCameraService=i,this.threeMapControlsService=n,this.threeRendererService=r}getAvailableMetricNames(t){return{nodeMetrics:new Set(t.nodeMetricData.map(i=>i.name)),edgeMetrics:new Set(t.edgeMetricData.map(i=>i.name))}}getMissingMetrics(t,i){let n=this.getAvailableMetricNames(i),r=W7.map(a=>t[a]).filter(a=>!!a);return{nodeMetrics:[...new Set(r.filter(a=>!n.nodeMetrics.has(a)))],edgeMetrics:t.edgeMetric&&!n.edgeMetrics.has(t.edgeMetric)?[t.edgeMetric]:[]}}hasMissingMetrics(t){return t.nodeMetrics.length>0||t.edgeMetrics.length>0}buildOrderedStatePatches(t,i,n){let r=this.getApplicableKeys(t,i,n);return[this.mergePatchesOf(t,r.filter(wu)),this.mergePatchesOf(t,r.filter(a=>!wu(a)))].filter(a=>Object.keys(a).length>0)}getCameraVectors(t){if(!t.camera)return;let{position:i,target:n}=t.camera;return{position:new Ze(i.x,i.y,i.z),target:new Ze(n.x,n.y,n.z)}}async applyScenario(t,i,n){zd(!0);try{let r=i.has("camera")?this.getCameraVectors(t.settings):void 0,a=r!==void 0,s=this.buildOrderedStatePatches(t.settings,i,n),l=a&&s.length>0?this.scenariosStore.getValue().preferences.resetCameraIfNewFileIsLoaded:void 0;l&&s.length>0&&(s[0].preferences=Te(ae({},s[0].preferences),{resetCameraIfNewFileIsLoaded:!1}));for(let d of s)this.scenariosStore.setStatePatch(d),await new Promise(c=>setTimeout(c));if(a&&this.threeCameraService.camera){let{position:d,target:c}=r;this.threeCameraService.camera.position.set(d.x,d.y,d.z),this.threeMapControlsService.setControlTarget(c),this.threeCameraService.camera.lookAt(c),this.threeCameraService.camera.updateProjectionMatrix(),this.threeMapControlsService.updateControls()}l&&setTimeout(()=>{this.scenariosStore.setStatePatch({preferences:{resetCameraIfNewFileIsLoaded:!0}})}),this.threeRendererService.render()}finally{zd(!1)}}getApplicableKeys(t,i,n){let r=n?this.getAvailableMetricNames(n):void 0;return[...i].filter(a=>t[a]!==void 0&&Tt[a].patch!==void 0&&this.isMetricAvailable(a,t,r))}isMetricAvailable(t,i,n){if(!n||!xu(t))return!0;let r=i[t]??"";return t==="edgeMetric"?r===""||n.edgeMetrics.has(r):n.nodeMetrics.has(r)}mergePatchesOf(t,i){let n={};for(let r of i){let a=Tt[r].patch;a&&(n=mx(n,a(t)))}return n}static{this.\u0275fac=function(i){return new(i||e)(M(Rc),M(or),M(Et),M(Nt))}}static{this.\u0275prov=O({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function mx(e,o){let t=ae({},e);for(let[i,n]of Object.entries(o)){let r=t[i];t[i]=ux(n)&&ux(r)?mx(ae({},r),n):n}return t}function ux(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var O7=["dialog"];function z7(e,o){if(e&1&&(f(0,"div",4)(1,"span",13),W(2,"i",14),f(3,"span",15),x(4),p()()()),e&2){let t=L();h(),R("title",t.scenario().mapFileNames.join(", ")),h(3),Re(t.scenario().mapFileNames.join(", "))}}function $7(e,o){if(e&1&&(f(0,"li"),x(1),p()),e&2){let t=o.$implicit;h(),we("",t," (node metric)")}}function j7(e,o){if(e&1&&(f(0,"li"),x(1),p()),e&2){let t=o.$implicit;h(),we("",t," (edge metric)")}}function H7(e,o){if(e&1&&(f(0,"div",7),W(1,"i",16),f(2,"div")(3,"strong"),x(4,"Some metrics are not available in the current map and will not be applied:"),p(),f(5,"ul",17),Ne(6,$7,2,1,"li",null,si),Ne(8,j7,2,1,"li",null,si),p()()()),e&2){let t=L();h(6),Ve(t.missingMetrics().nodeMetrics),h(2),Ve(t.missingMetrics().edgeMetrics)}}var Su=(()=>{class e{constructor(t){this.scenarioApplier=t,this.scenario=J.required(),this.metricData=J.required(),this.closed=fe(),this.dialogElement=Ue.required("dialog"),this.availableKeys=te(()=>yu(this.scenario())),this.defaultKeys=te(()=>this.availableKeys().filter(i=>Tt[i].group!=="camera")),this.selectedKeys=ip(()=>new Set(this.defaultKeys())),this.missingMetrics=te(()=>this.scenarioApplier.getMissingMetrics(nx(this.scenario().settings,this.selectedKeys()),this.metricData())),this.hasMissing=te(()=>this.scenarioApplier.hasMissingMetrics(this.missingMetrics())),this.hasAnySelected=te(()=>this.selectedKeys().size>0),this.applySelectedLabel=te(()=>`Apply ${Tc(this.selectedKeys().size)}`),this.destroyRef=E(Ua)}ngAfterViewInit(){let t=this.dialogElement().nativeElement,i=()=>this.closed.emit();t.addEventListener("close",i),this.destroyRef.onDestroy(()=>t.removeEventListener("close",i)),t.showModal()}async apply(){await this.applyKeys(this.selectedKeys())}async applyAll(){await this.applyKeys(new Set(this.availableKeys()))}async applyKeys(t){this.dialogElement().nativeElement.close(),await this.scenarioApplier.applyScenario(this.scenario(),t,this.metricData())}close(){this.dialogElement().nativeElement.close()}static{this.\u0275fac=function(i){return new(i||e)(le(Ac))}}static{this.\u0275cmp=A({type:e,selectors:[["cc-apply-scenario-dialog"]],viewQuery:function(i,n){i&1&&tt(n.dialogElement,O7,5),i&2&&it()},inputs:{scenario:[1,"scenario"],metricData:[1,"metricData"]},outputs:{closed:"closed"},decls:20,vars:9,consts:[["dialog",""],["aria-labelledby","apply-scenario-title",1,"modal"],[1,"modal-box","max-w-md"],["id","apply-scenario-title",1,"text-xl","font-bold","mb-1","truncate",3,"title"],[1,"mb-3"],[1,"text-sm","text-base-content/60","mb-3"],[3,"selectedKeysChange","availableKeys","defaultKeys","selectedKeys"],[1,"alert","alert-warning","mt-4","text-sm"],[1,"modal-action"],[1,"btn",3,"click"],["title","Apply everything this scenario holds, the camera included","data-testid","apply-scenario-all",1,"btn","btn-outline",3,"click"],["data-testid","apply-scenario-selected",1,"btn","btn-primary",3,"click","disabled"],["method","dialog",1,"modal-backdrop"],[1,"badge","badge-sm","badge-outline","gap-1","max-w-full","overflow-hidden",3,"title"],[1,"fa","fa-map-pin","text-[9px]","shrink-0"],[1,"truncate"],[1,"fa","fa-exclamation-triangle"],[1,"list-disc","pl-5","mt-1"]],template:function(i,n){if(i&1){let r=ue();f(0,"dialog",1,0)(2,"div",2)(3,"h2",3),x(4),p(),K(5,z7,5,2,"div",4),f(6,"p",5),x(7,"Select which settings to apply:"),p(),f(8,"cc-scenario-settings-picker",6),es("selectedKeysChange",function(s){return oe(r),Ja(n.selectedKeys,s)||(n.selectedKeys=s),ne(s)}),p(),K(9,H7,10,0,"div",7),f(10,"div",8)(11,"button",9),V("click",function(){return n.close()}),x(12,"Cancel"),p(),f(13,"button",10),V("click",function(){return n.applyAll()}),x(14," Apply all "),p(),f(15,"button",11),V("click",function(){return n.apply()}),x(16),p()()(),f(17,"form",12)(18,"button"),x(19,"close"),p()()()}i&2&&(h(3),R("title","Apply: "+n.scenario().name),h(),we("Apply: ",n.scenario().name),h(),Q(n.scenario().mapFileNames?.length?5:-1),h(3),R("availableKeys",n.availableKeys())("defaultKeys",n.defaultKeys()),Za("selectedKeys",n.selectedKeys),h(),Q(n.hasMissing()?9:-1),h(6),R("disabled",!n.hasAnySelected()),h(),we(" ",n.applySelectedLabel()," "))},dependencies:[dr,cr,sr,lr,qc],encapsulation:2})}}return e})();function gx(e){return e.settings?U7(e.settings):X7(e.sections??{})}function U7(e){let o=e;if(!o.blacklist)return e;let n=o,{blacklist:t}=n,i=to(n,["blacklist"]);return xx(Te(ae({},i),{excludedNodes:t.filter(r=>r.type!=="flatten").map(({path:r})=>({path:r})),flattenedNodes:t.filter(r=>r.type==="flatten").map(({path:r})=>({path:r}))}))}function bx(e){let i=e,{sections:o}=i,t=to(i,["sections"]);return Te(ae({},t),{settings:gx(e)})}var G7=new Set([1,2,kc]);function vx(e){let o=e;if(!(!o?.name||!G7.has(o.schemaVersion))&&!(!o.sections&&!o.settings))return{schemaVersion:kc,name:o.name,description:o.description,mapFileNames:o.mapFileNames,settings:gx(o)}}function X7(e){let{metrics:o,colors:t,camera:i,filters:n,labelsAndFolders:r}=e,c=t?.mapColors??{},{outgoingEdge:a,incomingEdge:s}=c,l=to(c,["outgoingEdge","incomingEdge"]),d=a!==void 0||s!==void 0;return xx({areaMetric:o?.areaMetric,enableFloorLabels:r?.enableFloorLabels,heightMetric:o?.heightMetric,colorMetric:o?.colorMetric,isColorMetricLinkedToHeightMetric:o?.isColorMetricLinkedToHeightMetric,colorRange:t?.colorRange,colorMode:t?.colorMode,mapColors:Object.keys(l).length>0?l:void 0,markedPackages:r?.markedPackages,edgeMetric:o?.edgeMetric,edgeColors:d?{outgoingEdge:a,incomingEdge:s}:void 0,amountOfTopLabels:r?.amountOfTopLabels,labelSize:r?.labelSize,labelMode:r?.labelMode,showMetricLabelNodeName:r?.showMetricLabelNodeName,showMetricLabelNameValue:r?.showMetricLabelNameValue,groupLabelCollisions:r?.groupLabelCollisions,colorLabels:r?.colorLabels,camera:i,excludedNodes:n?.blacklist?.filter(u=>u.type!=="flatten"),flattenedNodes:n?.blacklist?.filter(u=>u.type==="flatten"),focusedNodePath:n?.focusedNodePath})}function xx(e){return Object.fromEntries(Object.entries(e).filter(([,o])=>o!==void 0))}var Ic=(()=>{class e{async readAll(){return(await(await Ur()).getAll(Hr)).map(bx)}async add(t){let n=(await Ur()).transaction(Hr,"readwrite");await Promise.all([n.store.add(t),n.done])}async update(t){let n=(await Ur()).transaction(Hr,"readwrite");await Promise.all([n.store.put(t),n.done])}async delete(t){let n=(await Ur()).transaction(Hr,"readwrite");await Promise.all([n.store.delete(t),n.done])}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=O({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var yx={position:{x:0,y:300,z:1e3},target:{x:0,y:0,z:0}},Fc={positive:"#69AE40",neutral:"#ddcc00",negative:"#820E0E"},K7={positive:Fc.negative,neutral:Fc.neutral,negative:Fc.positive,isColorRangeInverted:!0},Q7=[{id:"built-in-rloc",name:"Real Lines of Code",description:"Visualize code size using real lines of code",metric:"rloc",colorRange:{from:250,to:500}},{id:"built-in-complexity",name:"Complexity",description:"Visualize cyclomatic complexity",metric:"complexity",colorRange:{from:50,to:100}},{id:"built-in-comment-lines",name:"Comment Lines",description:"Visualize comment density",metric:"comment_lines",colorRange:{from:50,to:100}},{id:"built-in-code-smells",name:"Code Smells",description:"Visualize code smell density",metric:"sonar_code_smells",colorRange:{from:10,to:50}},{id:"built-in-logic-complexity",name:"Logic Complexity",description:"Visualize cognitive/logic complexity",metric:"logic_complexity",colorRange:{from:40,to:80}},{id:"built-in-max-complexity-per-function",name:"Max Complexity per Function",description:"Visualize maximum complexity per function",metric:"max_complexity_per_function",colorRange:{from:10,to:20}},{id:"built-in-authors",name:"Authors",description:"Visualize the number of authors per file",metric:"number_of_authors",colorRange:{from:2,to:3},colorMode:Ho.absolute,mapColors:K7}],Sx=Q7.map(e=>({id:e.id,name:e.name,description:e.description,createdAt:0,isBuiltIn:!0,settings:{areaMetric:"rloc",heightMetric:e.metric,colorMetric:e.metric,isColorMetricLinkedToHeightMetric:!0,colorRange:e.colorRange,colorMode:e.colorMode??Ho.weightedGradient,mapColors:e.mapColors??Fc}})),Qi=(()=>{class e{constructor(t,i,n,r){this.scenariosStore=t,this.threeCameraService=i,this.threeMapControlsService=n,this.db=r,this.scenarios$=new Im([])}async loadScenarios(){try{let t=await this.db.readAll();t.sort((i,n)=>n.createdAt-i.createdAt),this.scenarios$.next([...t,...Sx])}catch(t){console.error("Failed to load scenarios from IndexedDB:",t),this.scenarios$.next([...Sx])}}async saveScenario(t){let i=this.buildScenario(t,this.readCurrentSource());try{await this.db.add(i),await this.loadScenarios()}catch(n){console.error("Failed to save scenario:",n)}return i}async removeScenario(t){try{await this.db.delete(t),await this.loadScenarios()}catch(i){console.error("Failed to remove scenario:",i)}}buildScenario(t,i){return{id:crypto.randomUUID(),name:t.name,description:t.description,mapFileNames:t.mapFileNames,createdAt:Date.now(),settings:rx(i,t.selectedKeys)}}readCurrentSource(){return{state:this.scenariosStore.getValue(),camera:this.readCurrentCamera()}}readCurrentCamera(){let t=this.threeCameraService.camera?.position,i=this.threeMapControlsService.controls?.target;return{position:t?{x:t.x,y:t.y,z:t.z}:yx.position,target:i?{x:i.x,y:i.y,z:i.z}:yx.target}}static{this.\u0275fac=function(i){return new(i||e)(M(Rc),M(or),M(Et),M(Ic))}}static{this.\u0275prov=O({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Y7=["dialog"];function Z7(e,o){e&1&&(f(0,"span",8),x(1,"A name is required."),p())}var Mu=gn.filter(e=>Tt[e].group!=="camera"),_u=(()=>{class e{constructor(t,i){this.scenariosService=t,this.fileStoreReadWindow=i,this.dialogElement=Ue.required("dialog"),this.name=ke(""),this.description=ke(""),this.bindToMap=ke(!1),this.nameValid=te(()=>this.name().trim().length>0),this.availableKeys=gn,this.defaultKeys=Mu,this.selectedKeys=ke(new Set(Mu)),this.selectionSummary=te(()=>`${this.selectedKeys().size} of ${this.availableKeys.length} settings`),this.saveLabel=te(()=>`Save ${Tc(this.selectedKeys().size)}`),this.visibleFileNames=F(this.fileStoreReadWindow.files$.pipe(_e(n=>In(n).map(r=>r.fileMeta.fileName))),{initialValue:[]}),this.hasFiles=te(()=>this.visibleFileNames().length>0)}open(){this.name.set(""),this.description.set(""),this.bindToMap.set(!1),this.selectedKeys.set(new Set(Mu)),this.dialogElement().nativeElement.showModal()}close(){this.dialogElement().nativeElement.close()}async save(){if(!this.nameValid()||this.selectedKeys().size===0)return;let t=this.bindToMap()&&this.hasFiles()?this.visibleFileNames():void 0;await this.scenariosService.saveScenario({name:this.name(),description:this.description()||void 0,mapFileNames:t,selectedKeys:this.selectedKeys()}),this.close()}static{this.\u0275fac=function(i){return new(i||e)(le(Qi),le(Fe))}}static{this.\u0275cmp=A({type:e,selectors:[["cc-save-scenario-dialog"]],viewQuery:function(i,n){i&1&&tt(n.dialogElement,Y7,5),i&2&&it()},decls:38,vars:13,consts:[["dialog",""],["aria-labelledby","save-scenario-title",1,"modal"],[1,"modal-box","max-w-md"],["id","save-scenario-title",1,"text-xl","font-bold","mb-4"],[1,"form-control","mb-4"],["for","scenario-name",1,"label"],[1,"label-text"],["id","scenario-name","placeholder","Enter scenario name",1,"input","input-bordered","w-full",3,"ngModelChange","ngModel"],[1,"label-text-alt","text-error"],["for","scenario-description",1,"label"],["id","scenario-description","rows","3","placeholder","Describe what this scenario captures",1,"textarea","textarea-bordered","w-full",3,"ngModelChange","ngModel"],[1,"label","cursor-pointer","justify-start","gap-3"],["type","checkbox",1,"checkbox","checkbox-sm",3,"ngModelChange","ngModel","disabled"],[1,"mb-4","rounded-md","border","border-base-300","p-2"],["data-testid","save-scenario-extended-settings",1,"cursor-pointer","text-sm"],[1,"text-xs","opacity-60"],[1,"m-0","mt-2","text-xs","opacity-60"],[1,"mt-2"],[3,"selectedKeysChange","availableKeys","defaultKeys","selectedKeys"],[1,"modal-action"],[1,"btn",3,"click"],["data-testid","save-scenario-submit",1,"btn","btn-primary",3,"click","disabled"],["method","dialog",1,"modal-backdrop"],[3,"click"]],template:function(i,n){if(i&1){let r=ue();f(0,"dialog",1,0)(2,"div",2)(3,"h2",3),x(4,"Save Scenario"),p(),f(5,"div",4)(6,"label",5)(7,"span",6),x(8,"Scenario Name"),p()(),f(9,"input",7),V("ngModelChange",function(s){return n.name.set(s)}),p(),En(),K(10,Z7,2,0,"span",8),p(),f(11,"div",4)(12,"label",9)(13,"span",6),x(14,"Description (optional)"),p()(),f(15,"textarea",10),V("ngModelChange",function(s){return n.description.set(s)}),p(),En(),p(),f(16,"div",4)(17,"label",11)(18,"input",12),V("ngModelChange",function(s){return n.bindToMap.set(s)}),p(),En(),f(19,"span",6),x(20," Bind to current maps "),p()()(),f(21,"details",13)(22,"summary",14),x(23," Extended settings "),f(24,"span",15),x(25),p()(),f(26,"p",16),x(27,"Uncheck what this scenario should not carry."),p(),f(28,"div",17)(29,"cc-scenario-settings-picker",18),es("selectedKeysChange",function(s){return oe(r),Ja(n.selectedKeys,s)||(n.selectedKeys=s),ne(s)}),p()()(),f(30,"div",19)(31,"button",20),V("click",function(){return n.close()}),x(32,"Cancel"),p(),f(33,"button",21),V("click",function(){return n.save()}),x(34),p()()(),f(35,"form",22)(36,"button",23),V("click",function(){return n.close()}),x(37,"close"),p()()()}i&2&&(h(9),R("ngModel",n.name()),kn(),h(),Q(!n.nameValid()&&n.name().length>0?10:-1),h(5),R("ngModel",n.description()),kn(),h(2),Be("opacity-40",!n.hasFiles()),h(),R("ngModel",n.bindToMap())("disabled",!n.hasFiles()),kn(),h(7),we("(",n.selectionSummary(),")"),h(4),R("availableKeys",n.availableKeys)("defaultKeys",n.defaultKeys),Za("selectedKeys",n.selectedKeys),h(4),R("disabled",!n.nameValid()||n.selectedKeys().size===0),h(),we(" ",n.saveLabel()," "))},dependencies:[dr,cr,tl,E0,il,sr,ol,lr,qc],encapsulation:2})}}return e})();var J7=["dialog"],Lc=(()=>{class e{constructor(){this.scenarioName=J.required(),this.confirmed=fe(),this.cancelled=fe(),this.dialogElement=Ue.required("dialog")}open(){this.dialogElement().nativeElement.showModal()}close(){this.dialogElement().nativeElement.close()}confirm(){this.close(),this.confirmed.emit()}cancel(){this.close(),this.cancelled.emit()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=A({type:e,selectors:[["cc-delete-confirm-dialog"]],viewQuery:function(i,n){i&1&&tt(n.dialogElement,J7,5),i&2&&it()},inputs:{scenarioName:[1,"scenarioName"]},outputs:{confirmed:"confirmed",cancelled:"cancelled"},decls:15,vars:1,consts:[["dialog",""],["aria-labelledby","delete-confirm-title",1,"modal"],[1,"modal-box","max-w-sm"],["id","delete-confirm-title",1,"text-lg","font-bold","mb-2"],[1,"modal-action"],[1,"btn",3,"click"],[1,"btn","btn-error",3,"click"],["method","dialog",1,"modal-backdrop"],[3,"click"]],template:function(i,n){i&1&&(_(0,"dialog",1,0)(2,"div",2)(3,"h3",3),x(4,"Delete Scenario"),T(),_(5,"p"),x(6),T(),_(7,"div",4)(8,"button",5),re("click",function(){return n.cancel()}),x(9,"Cancel"),T(),_(10,"button",6),re("click",function(){return n.confirm()}),x(11,"Delete"),T()()(),_(12,"form",7)(13,"button",8),re("click",function(){return n.cancel()}),x(14,"close"),T()()()),i&2&&(h(6),we('Are you sure you want to delete "',n.scenarioName(),'"?'))},encapsulation:2})}}return e})();var eC=["dialog"];function tC(e,o){if(e&1&&(_(0,"li"),x(1),T()),e&2){let t=o.$implicit;h(),Re(t)}}function iC(e,o){if(e&1&&(_(0,"div",5)(1,"div"),Se(2,"i",11),_(3,"strong"),x(4,"Already existing:"),T(),_(5,"ul",12),Ne(6,tC,2,1,"li",null,si),T()()()),e&2){let t=L();h(6),Ve(t.feedback().duplicates)}}function oC(e,o){if(e&1&&(_(0,"li"),x(1),T()),e&2){let t=o.$implicit;h(),Re(t)}}function nC(e,o){if(e&1&&(_(0,"div",6)(1,"div"),Se(2,"i",13),_(3,"strong"),x(4,"Invalid scenario files:"),T(),_(5,"ul",12),Ne(6,oC,2,1,"li",null,si),T()()()),e&2){let t=L();h(6),Ve(t.feedback().invalid)}}function rC(e,o){if(e&1&&(_(0,"li"),x(1),T()),e&2){let t=o.$implicit;h(),Re(t)}}function aC(e,o){if(e&1&&(_(0,"div",6)(1,"div"),Se(2,"i",13),_(3,"strong"),x(4,"Could not read (bad format):"),T(),_(5,"ul",12),Ne(6,rC,2,1,"li",null,si),T()()()),e&2){let t=L();h(6),Ve(t.feedback().parseErrors)}}var Dc=(()=>{class e{constructor(){this.closed=fe(),this.dialogElement=Ue.required("dialog"),this.feedback=ke({duplicates:[],invalid:[],parseErrors:[]})}open(t){let{duplicates:i,invalid:n,parseErrors:r}=t;(i.length>0||n.length>0||r.length>0)&&(this.feedback.set({duplicates:i,invalid:n,parseErrors:r}),this.dialogElement().nativeElement.showModal())}close(){this.dialogElement().nativeElement.close(),this.feedback.set({duplicates:[],invalid:[],parseErrors:[]}),this.closed.emit()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=A({type:e,selectors:[["cc-import-feedback-dialog"]],viewQuery:function(i,n){i&1&&tt(n.dialogElement,eC,5),i&2&&it()},outputs:{closed:"closed"},decls:15,vars:3,consts:[["dialog",""],["aria-labelledby","import-feedback-title",1,"modal"],[1,"modal-box","max-w-lg"],["id","import-feedback-title",1,"text-lg","font-bold","mb-2"],[1,"flex","flex-col","gap-2"],[1,"alert","alert-warning","text-sm"],[1,"alert","alert-error","text-sm"],[1,"modal-action"],[1,"btn",3,"click"],["method","dialog",1,"modal-backdrop"],[3,"click"],[1,"fa","fa-exclamation-triangle","mr-1"],[1,"list-disc","list-inside","ml-1"],[1,"fa","fa-exclamation-circle","mr-1"]],template:function(i,n){i&1&&(_(0,"dialog",1,0)(2,"div",2)(3,"h3",3),x(4,"Import Results"),T(),_(5,"div",4),K(6,iC,8,0,"div",5),K(7,nC,8,0,"div",6),K(8,aC,8,0,"div",6),T(),_(9,"div",7)(10,"button",8),re("click",function(){return n.close()}),x(11,"OK"),T()()(),_(12,"form",9)(13,"button",10),re("click",function(){return n.close()}),x(14,"close"),T()()()),i&2&&(h(6),Q(n.feedback().duplicates.length?6:-1),h(),Q(n.feedback().invalid.length?7:-1),h(),Q(n.feedback().parseErrors.length?8:-1))},encapsulation:2})}}return e})();function sC(e,o){if(e&1){let t=ue();_(0,"button",0),re("click",function(n){return oe(t),L().exportRequested.emit(),ne(n.stopPropagation())}),Se(1,"i",1),T(),_(2,"button",2),re("click",function(n){return oe(t),L().deleteRequested.emit(),ne(n.stopPropagation())}),Se(3,"i",3),T()}}var Cx=(()=>{class e{constructor(){this.isBuiltIn=J.required(),this.exportRequested=fe(),this.deleteRequested=fe()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=A({type:e,selectors:[["cc-scenario-item-actions"]],inputs:{isBuiltIn:[1,"isBuiltIn"]},outputs:{exportRequested:"exportRequested",deleteRequested:"deleteRequested"},decls:1,vars:1,consts:[["title","Export scenario",1,"btn","btn-ghost","btn-sm",3,"click"],[1,"fa","fa-download"],["title","Delete scenario",1,"btn","btn-ghost","btn-sm",3,"click"],[1,"fa","fa-trash"]],template:function(i,n){i&1&&K(0,sC,4,0),i&2&&Q(n.isBuiltIn()?-1:0)},encapsulation:2})}}return e})();function lC(e,o){e&1&&(_(0,"span",1),x(1,"Built-in"),T())}function cC(e,o){if(e&1&&(_(0,"span",2),x(1),T()),e&2){let t=L();h(),Re(t.view().formattedDate)}}function dC(e,o){if(e&1&&(_(0,"span",3),Se(1,"i",6),_(2,"span",7),x(3),T()()),e&2){let t=L();xe("title","Bound to "+t.view().scenario.mapFileNames.join(", ")),h(3),Re(t.view().scenario.mapFileNames.join(", "))}}function hC(e,o){if(e&1&&Se(0,"i",8),e&2){let t=o.$implicit,i=L();zt(Tn("fa ",i.groupIcons[t])),xe("title",i.groupLabels[t])}}var Mx=(()=>{class e{constructor(){this.view=J.required(),this.groupLabels=ya,this.groupIcons=_c}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=A({type:e,selectors:[["cc-scenario-item-badges"]],hostAttrs:[1,"block","overflow-hidden"],inputs:{view:[1,"view"]},decls:7,vars:2,consts:[[1,"flex","items-center","gap-3","mt-1","min-w-0"],[1,"badge","badge-xs","badge-info"],[1,"text-[11px]","text-base-content/40"],[1,"badge","badge-xs","badge-outline","gap-1","max-w-full","overflow-hidden",3,"title"],[1,"flex","gap-1.5","text-[11px]","text-base-content/40"],[3,"class","title"],[1,"fa","fa-map-pin","text-[9px]","shrink-0"],[1,"truncate"],[3,"title"]],template:function(i,n){i&1&&(_(0,"div",0),K(1,lC,2,0,"span",1)(2,cC,2,1,"span",2),K(3,dC,4,2,"span",3),_(4,"span",4),Ne(5,hC,1,4,"i",5,si),T()()),i&2&&(h(),Q(n.view().scenario.isBuiltIn?1:2),h(2),Q(n.view().mapBound?3:-1),h(2),Ve(n.view().groupKeys))},encapsulation:2})}}return e})();function uC(e,o){e&1&&(f(0,"span",3),W(1,"i",7),p())}function mC(e,o){if(e&1&&(f(0,"div",4),x(1),p()),e&2){let t=L();h(),Re(t.view().scenario.description)}}var _x=(()=>{class e{constructor(){this.view=J.required(),this.applyRequested=fe(),this.exportRequested=fe(),this.deleteRequested=fe()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=A({type:e,selectors:[["cc-scenario-item"]],inputs:{view:[1,"view"]},outputs:{applyRequested:"applyRequested",exportRequested:"exportRequested",deleteRequested:"deleteRequested"},decls:8,vars:8,consts:[["type","button",1,"flex","items-center","w-full","px-4","py-2","border-t","border-base-300","hover:bg-base-200","cursor-pointer","bg-transparent","text-left",3,"click"],[1,"flex-1","min-w-0"],[1,"font-medium","text-sm","truncate",3,"title"],["title","Some metrics in this scenario are not available",1,"text-warning","ml-1"],[1,"text-xs","text-base-content/50","truncate"],[3,"view"],[3,"exportRequested","deleteRequested","isBuiltIn"],[1,"fa","fa-exclamation-triangle","text-xs"]],template:function(i,n){i&1&&(f(0,"button",0),V("click",function(){return n.applyRequested.emit()}),f(1,"div",1)(2,"div",2),x(3),K(4,uC,2,0,"span",3),p(),K(5,mC,2,1,"div",4),W(6,"cc-scenario-item-badges",5),p(),f(7,"cc-scenario-item-actions",6),V("exportRequested",function(){return n.exportRequested.emit()})("deleteRequested",function(){return n.deleteRequested.emit()}),p()()),i&2&&(h(),Be("opacity-40",n.view().mapMismatch),h(),R("title",n.view().scenario.name),h(),we(" ",n.view().scenario.name," "),h(),Q(n.view().warning?4:-1),h(),Q(n.view().scenario.description?5:-1),h(),R("view",n.view()),h(),R("isBuiltIn",!!n.view().scenario.isBuiltIn))},dependencies:[Mx,Cx],encapsulation:2})}}return e})();var Ar=class{static downloadData(o,t){let i=new Blob([o],{type:"text/json"}),n=document.createElement("a");n.download=t,n.href=window.URL.createObjectURL(i),n.dataset.downloadurl=["text/json",n.download,n.href].join(":"),n.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!1,view:window}))}};var Ex=(()=>{class e{constructor(t,i){this.scenariosService=t,this.db=i}exportScenario(t){let i=sx(t),n=t.name.replaceAll(/[^\w-]/g,"_");Ar.downloadData(JSON.stringify(i,null,2),n+Ec)}async importScenarioFiles(t){let i=this.scenariosService.scenarios$.getValue(),n={imported:0,duplicates:[],invalid:[],parseErrors:[]};for(let r of t){let a;try{let l=await r.text();a=vx(JSON.parse(l))}catch{n.parseErrors.push(r.name);continue}if(!a){n.invalid.push(r.name);continue}if(this.isDuplicate(a,i)){n.duplicates.push(a.name);continue}let s=lx(a);i.push(s),await this.db.add(s),n.imported++}return n.imported>0&&await this.scenariosService.loadScenarios(),n}isDuplicate(t,i){return i.some(n=>n.name===t.name&&Vp(n.settings,t.settings))}static{this.\u0275fac=function(i){return new(i||e)(M(Qi),M(Ic))}}static{this.\u0275prov=O({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var kx=(()=>{class e{constructor(t){this.store=t,this.metricData$=this.store.select(Xn)}static{this.\u0275fac=function(i){return new(i||e)(M(me))}}static{this.\u0275prov=O({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var gC=[{priority:0,label:"Current Map",icon:"fa-map-pin"},{priority:1,label:"Global",icon:"fa-globe"},{priority:2,label:"Built-in",icon:"fa-cube"},{priority:3,label:"Other Maps",icon:"fa-map-o"}],qx=(()=>{class e{constructor(t){this.scenarioApplier=t}groupScenarios(t,i){let n=new Map;for(let r of t){let a=this.getScenarioPriority(r,i),s=n.get(a);s?s.push(r):n.set(a,[r])}return gC.filter(r=>n.has(r.priority)).map(r=>({label:r.label,icon:r.icon,scenarios:n.get(r.priority)??[]}))}toScenarioView(t,i,n){let r=(t.mapFileNames?.length??0)>0,a=r&&!t.mapFileNames.some(l=>i.has(l)),s=this.scenarioApplier.hasMissingMetrics(this.scenarioApplier.getMissingMetrics(t.settings,n));return{scenario:t,warning:s,mapMismatch:a,mapBound:r,groupKeys:ax(t),formattedDate:new Date(t.createdAt).toLocaleDateString()}}getScenarioPriority(t,i){let n=(t.mapFileNames?.length??0)>0;return n&&t.mapFileNames?.some(r=>i.has(r))?0:!n&&!t.isBuiltIn?1:t.isBuiltIn?2:3}static{this.\u0275fac=function(i){return new(i||e)(M(Ac))}}static{this.\u0275prov=O({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var vC=["dialog"],xC=["fileInput"],wC=(e,o)=>o.label,yC=(e,o)=>o.scenario.id;function SC(e,o){e&1&&(f(0,"p",13),x(1,"No scenarios found."),p())}function CC(e,o){if(e&1){let t=ue();f(0,"cc-scenario-item",25),V("applyRequested",function(){let n=oe(t).$implicit,r=L(2);return ne(r.applyScenario(n.scenario))})("exportRequested",function(){let n=oe(t).$implicit,r=L(2);return ne(r.exportScenario(n.scenario))})("deleteRequested",function(){let n=oe(t).$implicit,r=L(2);return ne(r.requestDelete(n.scenario))}),p()}if(e&2){let t=o.$implicit;R("view",t)}}function MC(e,o){if(e&1&&(f(0,"div",19),W(1,"input",20),f(2,"div",21),W(3,"i"),x(4),f(5,"span",22),x(6),p()(),f(7,"div",23),Ne(8,CC,1,1,"cc-scenario-item",24,yC),p()()),e&2){let t=o.$implicit,i=o.$index;Be("mt-1",i!==0),h(),R("checked",i===0),rt("aria-label",t.label),h(2),zt(Tn("fa ",t.icon," mr-2")),h(),we(" ",t.label," "),h(2),Re(t.scenarios.length),h(2),Ve(t.scenarios)}}var Eu=(()=>{class e{constructor(t,i,n,r,a){this.scenariosService=t,this.importExportService=i,this.scenarioDialogStore=n,this.fileStoreReadWindow=r,this.helpers=a,this.dialogElement=Ue.required("dialog"),this.deleteConfirmDialogRef=Ue.required(Lc),this.importFeedbackDialogRef=Ue.required(Dc),this.fileInput=Ue.required("fileInput"),this.applyRequested=fe(),this.deleteTarget=ke(null),this.acceptExtensions=`${Ec},.json`,this.scenarios=F(this.scenariosService.scenarios$,{initialValue:[]}),this.metricData=F(this.scenarioDialogStore.metricData$,{requireSync:!0}),this.searchTerm=ke(""),this.visibleFileNames=F(this.fileStoreReadWindow.files$.pipe(_e(s=>new Set(In(s).map(l=>l.fileMeta.fileName)))),{initialValue:new Set}),this.filteredScenarios=te(()=>{let s=this.searchTerm().toLowerCase(),l=this.scenarios(),d=this.visibleFileNames();return(s?l.filter(u=>u.name.toLowerCase().includes(s)||u.description?.toLowerCase().includes(s)):[...l]).sort((u,m)=>this.helpers.getScenarioPriority(u,d)-this.helpers.getScenarioPriority(m,d))}),this.groupedScenarios=te(()=>{let s=this.visibleFileNames(),l=this.metricData();return this.helpers.groupScenarios(this.filteredScenarios(),s).map(c=>Te(ae({},c),{scenarios:c.scenarios.map(u=>this.helpers.toScenarioView(u,s,l))}))})}async open(){await this.scenariosService.loadScenarios(),this.dialogElement().nativeElement.showModal()}close(){this.dialogElement().nativeElement.close()}applyScenario(t){this.close(),this.applyRequested.emit({scenario:t,metricData:this.metricData()})}exportScenario(t){this.importExportService.exportScenario(t)}openImportDialog(){this.fileInput().nativeElement.click()}async handleImportFiles(t){let i=t.target;if(!i.files||i.files.length===0)return;let n=await this.importExportService.importScenarioFiles(i.files);i.value="",this.importFeedbackDialogRef().open(n)}requestDelete(t){this.deleteTarget.set(t),this.deleteConfirmDialogRef().open()}cancelDelete(){this.deleteTarget.set(null)}async confirmDelete(){let t=this.deleteTarget();t&&(this.deleteTarget.set(null),await this.scenariosService.removeScenario(t.id))}static{this.\u0275fac=function(i){return new(i||e)(le(Qi),le(Ex),le(kx),le(Fe),le(qx))}}static{this.\u0275cmp=A({type:e,selectors:[["cc-scenario-list-dialog"]],viewQuery:function(i,n){i&1&&tt(n.dialogElement,vC,5)(n.deleteConfirmDialogRef,Lc,5)(n.importFeedbackDialogRef,Dc,5)(n.fileInput,xC,5),i&2&&it(4)},outputs:{applyRequested:"applyRequested"},decls:23,vars:4,consts:[["dialog",""],["fileInput",""],["aria-labelledby","scenario-list-title",1,"modal"],[1,"modal-box","max-w-xl"],[1,"flex","items-center","justify-between","mb-4"],["id","scenario-list-title",1,"text-xl","font-bold"],[1,"flex","items-center","gap-1"],["title","Import scenarios",1,"btn","btn-sm","btn-ghost",3,"click"],[1,"fa","fa-upload"],[1,"btn","btn-sm","btn-ghost",3,"click"],[1,"fa","fa-close"],["type","file","aria-label","Import scenarios","multiple","",1,"hidden",3,"change","accept"],["placeholder","Search scenarios...","aria-label","Search scenarios",1,"input","input-bordered","w-full","mb-4",3,"ngModelChange","ngModel"],[1,"text-center","py-8","text-base-content/50"],[1,"max-h-[60vh]","overflow-y-auto"],[1,"collapse","collapse-arrow","border","border-base-300",3,"mt-1"],["method","dialog",1,"modal-backdrop"],[3,"click"],[3,"confirmed","cancelled","scenarioName"],[1,"collapse","collapse-arrow","border","border-base-300"],["type","radio","name","scenario-accordion",3,"checked"],[1,"collapse-title","font-semibold","text-sm","bg-primary","text-primary-content"],[1,"badge","badge-sm","ml-2"],[1,"collapse-content","px-0"],[3,"view"],[3,"applyRequested","exportRequested","deleteRequested","view"]],template:function(i,n){i&1&&(f(0,"dialog",2,0)(2,"div",3)(3,"div",4)(4,"h2",5),x(5,"Scenarios"),p(),f(6,"div",6)(7,"button",7),V("click",function(){return n.openImportDialog()}),W(8,"i",8),p(),f(9,"button",9),V("click",function(){return n.close()}),W(10,"i",10),p()()(),f(11,"input",11,1),V("change",function(a){return n.handleImportFiles(a)}),p(),f(13,"input",12),V("ngModelChange",function(a){return n.searchTerm.set(a)}),p(),En(),K(14,SC,2,0,"p",13),f(15,"div",14),Ne(16,MC,10,9,"div",15,wC),p()(),f(18,"form",16)(19,"button",17),V("click",function(){return n.close()}),x(20,"close"),p()()(),f(21,"cc-delete-confirm-dialog",18),V("confirmed",function(){return n.confirmDelete()})("cancelled",function(){return n.cancelDelete()}),p(),W(22,"cc-import-feedback-dialog")),i&2&&(h(11),R("accept",n.acceptExtensions),h(2),R("ngModel",n.searchTerm()),kn(),h(),Q(n.filteredScenarios().length===0?14:-1),h(2),Ve(n.groupedScenarios()),h(5),R("scenarioName",n.deleteTarget()?.name??""))},dependencies:[dr,cr,tl,il,sr,ol,lr,Lc,Dc,_x],encapsulation:2})}}return e})();var _C=["listDialog"],EC=["saveDialog"];function kC(e,o){e&1&&(f(0,"div",12)(1,"div",4)(2,"span",5),x(3,"Labels"),p(),f(4,"button",13),W(5,"i",14),p()()(),W(6,"div",15))}function qC(e,o){e&1&&(f(0,"cc-settings-popover-shell",9),W(1,"cc-label-settings-panel"),p())}function TC(e,o){if(e&1){let t=ue();f(0,"cc-apply-scenario-dialog",16),V("closed",function(){oe(t);let n=L();return ne(n.handleApplyClosed())}),p()}if(e&2){let t=o;R("scenario",t.scenario)("metricData",t.metricData)}}var Tx=(()=>{class e{constructor(){this.scenariosService=E(Qi),this.isRadialLayout=Vt(),this.listDialog=Ue.required("listDialog"),this.saveDialog=Ue.required("saveDialog"),this.applyTarget=ke(null),this.scenarios=F(this.scenariosService.scenarios$,{initialValue:[]}),this.scenariosCountLabel=te(()=>{let t=this.scenarios().length;return`${t} ${t===1?"scenario":"scenarios"} available`})}async ngOnInit(){await this.scenariosService.loadScenarios()}openScenarioList(){this.listDialog().open()}openSaveDialog(){this.saveDialog().open()}handleApplyRequested(t){this.applyTarget.set(t)}handleApplyClosed(){this.applyTarget.set(null)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=A({type:e,selectors:[["cc-labels-scenarios-segment"]],viewQuery:function(i,n){i&1&&tt(n.listDialog,_C,5)(n.saveDialog,EC,5),i&2&&it(2)},hostAttrs:[1,"group","flex","flex-col","items-stretch","px-3","py-2","transition-colors","relative"],decls:16,vars:4,consts:[["listDialog",""],["saveDialog",""],[1,"flex","flex-col","items-stretch","gap-1.5","px-2","py-1","rounded-md","transition-colors","max-w-[220px]","min-w-[160px]"],["data-testid","metric-segment-scenario",1,"flex","flex-col","gap-1"],[1,"flex","items-center","justify-between","gap-1"],[1,"text-[10px]","uppercase","tracking-wide","opacity-70"],["type","button","title","Save current state as scenario","data-testid","metric-segment-scenario-save",1,"btn","btn-ghost","btn-xs","btn-square",3,"click"],[1,"fa","fa-plus","text-[10px]"],["type","button","title","Open saved scenarios",1,"text-sm","font-semibold","leading-tight","text-center","bg-transparent","border-0","p-0","rounded-sm","cursor-pointer","hover:bg-base-200","whitespace-nowrap","overflow-hidden","text-ellipsis",3,"click"],["popoverId","metric-settings-popover-labels","anchorName","metric-segment-labels","widthClass","w-80"],[3,"applyRequested"],[3,"scenario","metricData"],["data-testid","metric-segment-labels",1,"flex","flex-col","gap-1"],["type","button","popovertarget","metric-settings-popover-labels","data-anchor-name","metric-segment-labels","title","Label Settings",1,"btn","btn-ghost","btn-xs","btn-square",2,"anchor-name","--metric-segment-labels"],[1,"fa","fa-cog","text-[10px]"],[1,"border-t","border-base-300","-mx-1"],[3,"closed","scenario","metricData"]],template:function(i,n){if(i&1&&(f(0,"div",2),K(1,kC,7,0),f(2,"div",3)(3,"div",4)(4,"span",5),x(5,"Scenarios"),p(),f(6,"button",6),V("click",function(){return n.openSaveDialog()}),W(7,"i",7),p()(),f(8,"button",8),V("click",function(){return n.openScenarioList()}),x(9),p()()(),K(10,qC,2,0,"cc-settings-popover-shell",9),f(11,"cc-scenario-list-dialog",10,0),V("applyRequested",function(a){return n.handleApplyRequested(a)}),p(),W(13,"cc-save-scenario-dialog",null,1),K(15,TC,1,2,"cc-apply-scenario-dialog",11)),i&2){let r;h(),Q(n.isRadialLayout()?-1:1),h(8),we(" ",n.scenariosCountLabel()," "),h(),Q(n.isRadialLayout()?-1:10),h(5),Q((r=n.applyTarget())?15:-1,r)}},dependencies:[fh,Eu,_u,Su,kt],encapsulation:2})}}return e})();function RC(e,o){e&1&&(ai(),_(0,"svg",0),Se(1,"path",2),_(2,"g",3),Se(3,"rect",4)(4,"rect",5)(5,"rect",6)(6,"rect",7)(7,"rect",8)(8,"rect",9)(9,"rect",10),T()())}function AC(e,o){e&1&&(ai(),_(0,"svg",1),Se(1,"path",11)(2,"rect",12)(3,"path",13)(4,"rect",14)(5,"path",15)(6,"rect",16),T())}function IC(e,o){e&1&&(ai(),_(0,"svg",0),Se(1,"circle",17)(2,"circle",18)(3,"path",19)(4,"path",20),T())}function FC(e,o){e&1&&(ai(),_(0,"svg",0),Se(1,"circle",21)(2,"circle",22)(3,"path",23),_(4,"g",24),Se(5,"circle",25)(6,"path",26)(7,"path",27),T()())}function LC(e,o){e&1&&(ai(),_(0,"svg",1),Se(1,"rect",28)(2,"path",29),T())}var Rx=(()=>{class e{constructor(){this.layout=J.required(),this.LayoutAlgorithm=gt}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=A({type:e,selectors:[["cc-layout-glyph"]],hostAttrs:[1,"inline-block","shrink-0"],inputs:{layout:[1,"layout"]},decls:5,vars:1,consts:[["viewBox","0 0 20 20","fill","none","stroke","currentColor","stroke-width","1.4","aria-hidden","true",1,"w-full","h-full"],["viewBox","0 0 20 20","fill","none","stroke","currentColor","stroke-width","1.4","stroke-linejoin","round","aria-hidden","true",1,"w-full","h-full"],["d","M1.5 10h17M10 10v8","stroke-width","2"],["fill","currentColor","stroke","none"],["x","2.5","y","4.5","width","3","height","4","rx",".5"],["x","6.5","y","2.5","width","3","height","6","rx",".5"],["x","11","y","5","width","3","height","3.5","rx",".5"],["x","15","y","3.5","width","3","height","5","rx",".5"],["x","3","y","11.5","width","5.5","height","3.5","rx",".5"],["x","11.5","y","11.5","width","3","height","5.5","rx",".5"],["x","15.5","y","11.5","width","2.5","height","3","rx",".5"],["d","M1.5 10h17","stroke-width","2"],["x","2.5","y","2.5","width","15","height","6","rx","1"],["d","M9 2.5v6M13 2.5v6M13 5.5h4.5"],["x","2.5","y","11.5","width","7","height","6","rx","1"],["d","M6 11.5v6"],["x","11.5","y","11.5","width","6","height","4","rx","1"],["cx","10","cy","10","r","2.6"],["cx","10","cy","10","r","5.6"],["d","M10 7.4V4.4M12.3 11.3l2.6 1.5M7.7 11.3l-2.6 1.5"],["d","M10 1.4a8.6 8.6 0 0 1 8.3 10.8M16.4 15.8a8.6 8.6 0 0 1-9.6 2.2M3.9 16a8.6 8.6 0 0 1-1.6-9.6","stroke-width","1.8"],["cx","10","cy","10","r","3"],["cx","10","cy","10","r","8.5"],["d","M10 7V1.5M12.6 11.5l4.8 2.8M7.4 11.5l-4.8 2.8"],["stroke-width","0.9"],["cx","10","cy","10","r","4.6"],["d","M14 7.7l3.4-2M10 14.6v3.9M4.3 6.7l-1.6-1"],["d","M15.7 6.7a6.6 6.6 0 0 1 0 6.6M4.3 13.3a6.6 6.6 0 0 1 5.7-9.9"],["x","2.5","y","2.5","width","15","height","15","rx","1.2"],["d","M11 2.5v15M2.5 10h8.5M11 12.5h6.5M6.5 10v7.5M14.5 2.5v10"]],template:function(i,n){if(i&1&&K(0,RC,10,0,":svg:svg",0)(1,AC,7,0,":svg:svg",1)(2,IC,5,0,":svg:svg",0)(3,FC,8,0,":svg:svg",0)(4,LC,3,0,":svg:svg",1),i&2){let r;Q((r=n.layout())===n.LayoutAlgorithm.StreetMap?0:r===n.LayoutAlgorithm.TreeMapStreet?1:r===n.LayoutAlgorithm.Sunburst?2:r===n.LayoutAlgorithm.RadialTreeMap?3:4)}},encapsulation:2})}}return e})();var DC=(e,o)=>o.layout;function PC(e,o){if(e&1){let t=ue();f(0,"button",9),V("click",function(){let n=oe(t).$implicit,r=L();return ne(r.selectLayout(n.layout))}),f(1,"span",10),W(2,"cc-layout-glyph",11),p(),f(3,"span",12),x(4),p(),f(5,"span",13),x(6),p()()}if(e&2){let t=o.$implicit,i=L();zt(t.layout===i.layoutAlgorithm()?"border-primary bg-primary/5":"border-base-300 hover:border-primary/50"),rt("aria-pressed",t.layout===i.layoutAlgorithm())("data-layout",t.layout),h(),Be("bg-primary",t.layout===i.layoutAlgorithm())("text-primary-content",t.layout===i.layoutAlgorithm())("bg-base-200",t.layout!==i.layoutAlgorithm()),h(),R("layout",t.layout),h(2),Re(t.layout),h(2),Re(t.description)}}function NC(e,o){if(e&1){let t=ue();f(0,"div",8)(1,"span",14),x(2,"Maximum TreeMap Files"),p(),f(3,"cc-slider-number-input",15),V("valueChange",function(n){oe(t);let r=L();return ne(r.setMaxTreeMapFiles(n))}),p(),f(4,"span",16),x(5),p()()}if(e&2){let t=L();h(3),R("min",1)("max",1e3)("value",t.maxTreeMapFiles()),h(2),we("Folders with up to ",t.maxTreeMapFiles()," files are drawn as a treemap.")}}function VC(e,o){if(e&1){let t=ue();f(0,"div",8)(1,"span",14),x(2,"Visible levels"),p(),f(3,"cc-slider-number-input",17),V("valueChange",function(n){oe(t);let r=L();return ne(r.setRadialLevels(n))}),p(),f(4,"span",16),x(5),p()()}if(e&2){let t=L();h(3),R("min",t.minRadialLevels)("max",t.maxRadialLevels)("value",t.radialLevels()),h(2),we("Shows ",t.radialLevels()," folder levels around the centre.")}}var BC=1,WC=10,OC=new Set([gt.Sunburst,gt.RadialTreeMap]),zC={[gt.SquarifiedTreeMap]:"Folders nest inside each other and every bit of floor is used.",[gt.StreetMap]:"Folders become streets, files line up along them.",[gt.TreeMapStreet]:"Streets for the upper folders, treemaps near the files.",[gt.Sunburst]:"Folders as rings around the centre, drawn flat without heights.",[gt.RadialTreeMap]:"A band per folder level, each folder filled with a treemap of its contents."},Ax=(()=>{class e{constructor(){this.writeStore=E(je),this.popoverId="metrics-bar-layout-picker",this.anchorName="metrics-bar-layout-tab",this.layoutOptions=Object.values(gt).map(t=>({layout:t,description:zC[t]})),this.layoutAlgorithm=F(E(Ee).layoutAlgorithm$,{requireSync:!0}),this.maxTreeMapFiles=F(E(mi).maxTreeMapFiles$,{requireSync:!0}),this.showMaxTreeMapFiles=te(()=>this.layoutAlgorithm()===gt.TreeMapStreet),this.radialLevels=F(E(mi).radialLevels$,{requireSync:!0}),this.showRadialLevels=te(()=>OC.has(this.layoutAlgorithm())),this.minRadialLevels=BC,this.maxRadialLevels=WC}selectLayout(t){this.writeStore.setLayoutAlgorithm(t)}setMaxTreeMapFiles(t){this.writeStore.setMaxTreeMapFiles(t)}setRadialLevels(t){this.writeStore.setRadialLevels(t)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=A({type:e,selectors:[["cc-layout-tab"]],hostAttrs:[1,"absolute","bottom-full","left-4"],decls:15,vars:10,consts:[["type","button","data-testid","metrics-bar-layout-tab","title","Change the map layout",1,"flex","items-center","gap-1.5","h-7","px-3","bg-base-100","border","border-b-0","border-base-300","rounded-t-md","text-xs","font-semibold","cursor-pointer","hover:text-primary"],[1,"text-[10px]","font-normal","uppercase","tracking-wide","opacity-70"],[1,"w-3.5","h-3.5",3,"layout"],["aria-hidden","true",1,"fa","fa-caret-down","text-[10px]"],["widthClass","w-[34rem] max-w-[95vw]","contentClass","gap-2.5 p-3","ariaLabel","Map layout","testId","metrics-bar-layout-picker",3,"popoverId","anchorName"],[1,"text-xs","font-bold"],[1,"grid","grid-cols-2","gap-2"],["type","button",1,"grid","grid-cols-[auto_1fr]","items-start","gap-x-3","gap-y-0.5","p-2","rounded-md","border","text-left","cursor-pointer","transition-colors",3,"class"],[1,"flex","flex-col","gap-1"],["type","button",1,"grid","grid-cols-[auto_1fr]","items-start","gap-x-3","gap-y-0.5","p-2","rounded-md","border","text-left","cursor-pointer","transition-colors",3,"click"],[1,"row-span-2","grid","place-items-center","w-11","h-11","rounded-md"],[1,"w-7","h-7",3,"layout"],[1,"text-sm","font-semibold"],[1,"text-xs","opacity-70","leading-snug"],[1,"text-sm"],["ariaLabel","Maximum TreeMap Files",3,"valueChange","min","max","value"],[1,"text-xs","opacity-70"],["ariaLabel","Visible levels",3,"valueChange","min","max","value"]],template:function(i,n){i&1&&(f(0,"button",0)(1,"span",1),x(2,"Layout"),p(),W(3,"cc-layout-glyph",2),f(4,"span"),x(5),p(),W(6,"i",3),p(),f(7,"cc-settings-popover-shell",4)(8,"span",5),x(9,"Map layout"),p(),f(10,"div",6),Ne(11,PC,7,13,"button",7,DC),p(),K(13,NC,6,4,"div",8),K(14,VC,6,4,"div",8),p()),i&2&&(ze("anchor-name","--"+n.anchorName),rt("popovertarget",n.popoverId)("data-anchor-name",n.anchorName),h(3),R("layout",n.layoutAlgorithm()),h(2),Re(n.layoutAlgorithm()),h(2),R("popoverId",n.popoverId)("anchorName",n.anchorName),h(4),Ve(n.layoutOptions),h(2),Q(n.showMaxTreeMapFiles()?13:-1),h(),Q(n.showRadialLevels()?14:-1))},dependencies:[Rx,kt,ti],encapsulation:2})}}return e})();var Ix=(()=>{class e{constructor(){this.preferencesReadWindow=E(mi),this.metricsBarWriteStore=E(je),this.isLinked=F(this.preferencesReadWindow.isColorMetricLinkedToHeightMetric$,{initialValue:!1}),this.iconClass=te(()=>this.isLinked()?"fa fa-link":"fa fa-unlink"),this.title=te(()=>this.isLinked()?"Unlink Height and Color Metric":"Link Height and Color Metric"),this.buttonClass=te(()=>this.isLinked()?"btn btn-circle btn-sm ring-2 ring-primary text-primary bg-primary/10 border-0":"btn btn-circle btn-sm ring-1 ring-base-300 text-base-content/60 border-0 cc-link-button-dashed")}toggle(){this.metricsBarWriteStore.toggleIsHeightAndColorMetricLinked()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=A({type:e,selectors:[["cc-link-color-height-button"]],hostAttrs:[1,"self-center","px-1"],decls:2,vars:8,consts:[["type","button",3,"click","title"]],template:function(i,n){i&1&&(_(0,"button",0),re("click",function(){return n.toggle()}),Se(1,"i"),T()),i&2&&(zt(n.buttonClass()),xe("title",n.title()),rt("aria-label",n.title())("data-testid","metric-link-button")("aria-pressed",n.isLinked()),h(),zt(n.iconClass()))},encapsulation:2})}}return e})();var $C=[[["","barTools",""]]],jC=["[barTools]"];function HC(e,o){e&1&&W(0,"cc-height-segment")}function UC(e,o){e&1&&W(0,"cc-link-color-height-button")}function GC(e,o){e&1&&W(0,"cc-folders-segment")}function XC(e,o){if(e&1&&(K(0,UC,1,0,"cc-link-color-height-button"),W(1,"cc-color-segment"),K(2,GC,1,0,"cc-folders-segment")),e&2){let t=L();Q(t.isRadialLayout()?-1:0),h(2),Q(t.isRadialLayout()?2:-1)}}function KC(e,o){if(e&1&&W(0,"cc-axis-card",0)(1,"cc-color-settings-popover",1),e&2){let t=L();R("metricName","Settings")("hasCog",!0)("cogPopoverId",t.deltaColorSettingsPopoverId)("cogAnchorName",t.deltaColorSettingsAnchorName)("testId","metric-segment-color-settings")("cogTestId","metric-segment-color-settings-cog"),h(),R("popoverId",t.deltaColorSettingsPopoverId)("anchorName",t.deltaColorSettingsAnchorName)}}function QC(e,o){e&1&&W(0,"cc-edge-segment")}var ku=(()=>{class e{constructor(){this.barBottom=b0,this.fileStoreReadWindow=E(Fe),this.metricsBarReadStore=E(dt),this.isDeltaState=F(this.fileStoreReadWindow.isDeltaState$,{initialValue:!1}),this.hasEdgeMetric=F(this.metricsBarReadStore.metricData$.pipe(_e(t=>t.edgeMetricData.length>0)),{initialValue:!1}),this.isRadialLayout=Vt(),this.showColorMetricSegment=te(()=>!this.isDeltaState()),this.deltaColorSettingsPopoverId="metric-settings-popover-color-delta",this.deltaColorSettingsAnchorName="metric-segment-color-settings"}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=A({type:e,selectors:[["cc-metrics-bar"]],hostVars:2,hostBindings:function(i,n){i&2&&ze("bottom",n.barBottom)},features:[Xt([{provide:ur,useValue:Ks}]),no([v0,mr])],ngContentSelectors:jC,decls:9,vars:3,consts:[["label","Color",3,"metricName","hasCog","cogPopoverId","cogAnchorName","testId","cogTestId"],[3,"popoverId","anchorName"]],template:function(i,n){i&1&&(Xa($C),W(0,"cc-layout-tab"),f(1,"cc-bar-tools-tab"),Ka(2),p(),W(3,"cc-area-segment"),K(4,HC,1,0,"cc-height-segment"),K(5,XC,3,2)(6,KC,2,8),K(7,QC,1,0,"cc-edge-segment"),W(8,"cc-labels-scenarios-segment")),i&2&&(h(4),Q(n.isRadialLayout()?-1:4),h(),Q(n.showColorMetricSegment()?5:6),h(2),Q(n.hasEdgeMetric()&&!n.isRadialLayout()?7:-1))},dependencies:[pb,Bi,x0,Gv,Cc,Yv,tx,ox,Tx,Ax,Ix],encapsulation:2})}}return e})();function qu(e,o,t){if($t(e))return null;let i=Fx(e,o,t);return i.area>0?i:null}function Fx(e,o,t){let i=e.children.filter(r=>!r.isExcluded).map(r=>$t(r)?YC(r,o,t):Fx(r,o,t)).filter(r=>r.area>0),n=i.reduce((r,a)=>r+a.area,0);return Te(ae({},Lx(e,o,t)),{isFile:!1,area:n,children:i})}function YC(e,o,t){return Te(ae({},Lx(e,o,t)),{isFile:!0,area:e.attributes?.[o.areaMetric]??0,children:[]})}function Lx(e,o,t){return{path:e.path,name:e.name,colorValue:e.attributes?.[o.colorMetric],isFlat:t(e)}}function Sa(e,o,t=()=>!0){return o===0?0:e.children.filter(t).reduce((i,n)=>Math.max(i,1+Sa(n,o-1,t)),0)}function Tu(e,o){let t=new Set,i=n=>{if(n.isFile){o(n)&&t.add(n.path);return}n.children.forEach(i)};return i(e),t}function Pc(e,o){let t=e.children.find(i=>!i.isFile&&Ca(o,i.path));return t?Pc(t,o):e}function Ir(e,o,t=Number.POSITIVE_INFINITY){let i=t>0?e.children.find(n=>Ca(o,n.path)):void 0;return i?Ir(i,o,t-1):e}function Ca(e,o){return e===o||e.startsWith(`${o}/`)}function Ma(e,o){let t=e.children.find(i=>Ca(o,i.path));if(t)return t.path===o?e:Ma(t,o)}t1([i1,r1,o1,n1]);var ZC=120,Nc=class{constructor(o,t){this.chartRegistry=o,this.handlers=t,this.highlightedPath=null,this.pathUnderPointer=null,this.containerSizeObserver=new a1,this.containerSize=this.containerSizeObserver.size}attachTo(o){if(this.chart&&this.attachedContainer===o)return;this.dispose(),this.attachedContainer=o,this.chart=e1(o),this.chart.on("click",i=>this.reportClick(i)),this.chart.on("mouseover",i=>this.reportPointerEntered(i.data?.name??null)),this.chart.on("mouseout",()=>this.reportPointerLeftAfterGrace());let t=this.chart.getZr();t.on("mousemove",i=>{i.target||this.reportPointerOverNothing()}),t.on("globalout",()=>this.reportPointerOverNothing()),this.chart.on("contextmenu",i=>this.reportRightClick(i)),this.chart.on("finished",()=>o.setAttribute("aria-busy","false")),o.addEventListener("contextmenu",Xd),this.chartRegistry.register(this.chart),this.containerSizeObserver.observe(o)}render(o,{keepsSegments:t=!1}={}){this.chart&&(this.attachedContainer?.setAttribute("aria-busy","true"),this.chart.resize(),this.finishRunningAnimations(),this.chart.setOption(o),t||this.reportPointerLeft(),this.applyHighlight())}highlight(o){this.highlightedPath=o,!(o!==null&&o===this.pathUnderPointer)&&this.applyHighlight()}dispose(){this.cancelPointerLeave(),this.reportPointerLeft(),this.attachedContainer?.removeEventListener("contextmenu",Xd),this.containerSizeObserver.disconnect(),this.chart&&(this.chartRegistry.unregister(this.chart),this.chart.dispose()),this.chart=void 0,this.attachedContainer=void 0}reportClick({data:o}){o&&(o.isCentre?this.handlers.onCentreClicked():o.isFile?this.handlers.onFileClicked(o.name):this.handlers.onFolderClicked(o.name))}reportPointerEntered(o){this.cancelPointerLeave(),this.pathUnderPointer=o,this.handlers.onNodeHovered(o)}reportPointerLeftAfterGrace(){this.cancelPointerLeave(),this.pointerLeaveTimeout=setTimeout(()=>{this.pointerLeaveTimeout=void 0,this.reportPointerLeft()},ZC)}reportPointerOverNothing(){this.pathUnderPointer!==null&&this.pointerLeaveTimeout===void 0&&this.reportPointerLeftAfterGrace()}reportPointerLeft(){this.pathUnderPointer!==null&&(this.pathUnderPointer=null,this.handlers.onNodeHovered(null))}cancelPointerLeave(){this.pointerLeaveTimeout!==void 0&&(clearTimeout(this.pointerLeaveTimeout),this.pointerLeaveTimeout=void 0)}reportRightClick({data:o,event:t}){let i=t?.event;o&&i&&this.handlers.onNodeRightClicked(o.name,i.clientX,i.clientY)}finishRunningAnimations(){for(let o of this.chart.getZr().storage.getDisplayList())o.stopAnimation(void 0,!0)}applyHighlight(){this.chart&&(this.chart.dispatchAction({type:"downplay",seriesIndex:0}),this.highlightedPath!==null&&this.chart.dispatchAction({type:"highlight",seriesIndex:0,name:this.highlightedPath}))}};var JC=["chartContainer"],Ru=(()=>{class e{constructor(){this.shape=J.required(),this.tree=J.required(),this.centre=J.required(),this.hoveredPath=J(null),this.metrics=J.required(),this.coloring=J.required(),this.isFocused=J(!1),this.folderClicked=fe(),this.fileClicked=fe(),this.centreClicked=fe(),this.nodeHovered=fe(),this.nodeRightClicked=fe(),this.chartContainer=Ue.required("chartContainer"),this.chartHost=new Nc(E(Gg),{onFolderClicked:t=>this.folderClicked.emit(t),onFileClicked:t=>this.fileClicked.emit(t),onCentreClicked:()=>this.centreClicked.emit(),onNodeHovered:t=>this.nodeHovered.emit(t),onNodeRightClicked:(t,i,n)=>this.nodeRightClicked.emit({path:t,clientX:i,clientY:n})}),this.highlightedPath=te(()=>{let t=this.hoveredPath(),i=this.centre();if(t===null||!Ca(t,i.path))return null;let n=Ir(i,t,this.shape().visibleDepth);return n===i?null:n.path}),oo(()=>this.chartHost.attachTo(this.chartContainer().nativeElement)),oo(()=>this.renderOnceTheContainerIsMeasured()),oo(()=>this.chartHost.highlight(this.highlightedPath()))}ngOnDestroy(){this.chartHost.dispose()}renderOnceTheContainerIsMeasured(){let{width:t,height:i}=this.chartHost.containerSize();if(t===0||i===0)return;let n={centre:this.centre(),shape:this.shape()},r=n.centre===this.renderedView?.centre&&n.shape===this.renderedView?.shape;this.renderedView=n,this.chartHost.render(n.shape.buildOption({centre:n.centre,isMapRoot:n.centre===this.tree(),isFocused:this.isFocused(),metrics:this.metrics(),coloring:this.coloring()}),{keepsSegments:r})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=A({type:e,selectors:[["cc-radial-chart"]],viewQuery:function(i,n){i&1&&tt(n.chartContainer,JC,5),i&2&&it()},hostAttrs:[1,"block","h-full","w-full"],inputs:{shape:[1,"shape"],tree:[1,"tree"],centre:[1,"centre"],hoveredPath:[1,"hoveredPath"],metrics:[1,"metrics"],coloring:[1,"coloring"],isFocused:[1,"isFocused"]},outputs:{folderClicked:"folderClicked",fileClicked:"fileClicked",centreClicked:"centreClicked",nodeHovered:"nodeHovered",nodeRightClicked:"nodeRightClicked"},decls:2,vars:0,consts:[["chartContainer",""],["data-testid","radial-chart",1,"h-full","w-full"]],template:function(i,n){i&1&&Se(0,"div",1,0)},encapsulation:2})}}return e})();var eM={[ro.Sum]:e=>e.sum,[ro.Max]:e=>e.max,[ro.Min]:e=>e.min,[ro.Median]:e=>oM(e.values),[ro.MeanPerFile]:e=>e.sum/e.files,[ro.AvgPerArea]:e=>e.areaWeightedSum/e.area};function Au(e,o){let t=new Map;Dx(e,o,t);let i=eM[o.folderValue],n=new Map;for(let[r,a]of t)a.files>0&&n.set(r,i(a));return n}function Dx(e,o,t){if($t(e))return tM(e,o);let i=Px();for(let n of e.children)!n.isExcluded&&!o.isFlat(n)&&iM(i,Dx(n,o,t));return t.set(e.path,i),i}function tM(e,{areaMetric:o,colorMetric:t,folderValue:i}){let n=e.attributes?.[o]??0,r=e.attributes?.[t];return n<=0||r===void 0?Px():{files:1,sum:r,max:r,min:r,area:n,areaWeightedSum:r*n,values:i===ro.Median?[r]:[]}}function Px(){return{files:0,sum:0,max:Number.NEGATIVE_INFINITY,min:Number.POSITIVE_INFINITY,area:0,areaWeightedSum:0,values:[]}}function iM(e,o){e.files+=o.files,e.sum+=o.sum,e.max=Math.max(e.max,o.max),e.min=Math.min(e.min,o.min),e.area+=o.area,e.areaWeightedSum+=o.areaWeightedSum;for(let t of o.values)e.values.push(t)}function oM(e){let o=[...e].sort((i,n)=>i-n),t=Math.floor(o.length/2);return o.length%2===1?o[t]:(o[t-1]+o[t])/2}var Fr=Math.PI/2,Nx=2*Math.PI,Po="#ffffff",nM={duration:500,easing:"cubicOut"},rM=2e3,aM={animationDuration:0,animationDurationUpdate:0},sM=4,lM=1;function Vx(e){let o=e<=rM?{animationDurationUpdate:400}:aM;return ae({animationThreshold:Number.POSITIVE_INFINITY,stateAnimation:nM},o)}function Vc(e){return(.95-.2)/e}function Bx(e,o){return Ox(e,o)?e:0}function Wx(e,o,t){return Ox(o.widthPx,t)?o:{color:e,widthPx:lM}}function Ox(e,o){return o>=e*sM}var cM="#1f2937",dM=.5,hM=.299,uM=.587,mM=.114,pM=255;function zx({path:e,isFile:o,colorValue:t,isFlat:i,isCentre:n=!1},r){let{mapColors:a}=r;return!n&&e===r.highlight.selectedPath?a.selected:!o&&!i?fM(e,t,r):t===void 0?a.base:i?a.flat:$x(t,r)}function fM(e,o,t){let{folders:i,mapColors:n}=t,r=Mp({path:e},i.markedPackages);if(r)return r;let a=i.values.get(e);return o===void 0||a===void 0?n.base:i.style===ji.Neutral?Ys:n0($x(a,t),i.tint)}function $x(e,o){let{mapColors:t}=o;return o.isUnaryMetric?t.positive:Of(t,o.colorRange,o.colorMode,o.colorMetricRange,e)}function jx(e){let[o,t,i]=Hs.hex.rgb(e);return(hM*o+uM*t+mM*i)/pM>dM?cM:Po}var Bc=new Intl.NumberFormat("en",{maximumFractionDigits:2});function Hx(e,o){return{name:e.path,value:e.area,displayName:e.name,colorValue:e.colorValue,folderValueText:gM(e,o.folders),isFile:e.isFile}}function gM({path:e,isFile:o},t){let i=o?void 0:t.values.get(e);if(i!==void 0)return`${rr(t.value).label} ${Bc.format(i)}`}var _a=-Math.PI/2,bM=1,vM=2,xM=3,Xx={style:{opacity:.45}},wM=/^#[\da-f]{6}$/i,Kx={x:0,y:0,rotation:0};function Wc(e,o,t,i){return Te(ae({type:e},Kx),{silent:!i,z2:i?bM:vM,shape:o,style:t,blur:Xx})}function Iu({x:e,y:o,rotation:t},i){return{type:"text",x:e,y:o,rotation:t,silent:!0,z2:xM,style:i,blur:Xx}}function Qx(e){return Te(ae({type:"group"},Kx),{children:e})}function Fu(e){if(e.type==="group")return Te(ae({},e),{children:e.children.map(Fu)});let{fill:o,stroke:t}=e.style,i={fill:Ux(o),stroke:Ux(t)};return Te(ae({},e),{style:ae(ae({},e.style),i),emphasis:{style:{fill:o,stroke:t}}})}function Ux(e){if(!e||!wM.test(e))return e;let[o,t,i]=Hs.hex.rgb(e);return`rgba(${o}, ${t}, ${i}, ${.45})`}var Yx="\u2026";function Zx(e,o,t){let i=yM([...e],o.lengthPx,t),n=i.map(l=>t(l)),r=Math.sin(o.midAngle)<0,a=r?1:-1,s=-Jx(n)/2;return i.map((l,d)=>{let c=o.midAngle+a*(s+n[d]/2)/o.radiusPx;return s+=n[d],{glyph:l,x:o.centreX+o.radiusPx*Math.cos(c),y:o.centreY+o.radiusPx*Math.sin(c),rotation:r?-(c+Fr):Fr-c}})}function yM(e,o,t){let i=e.map(s=>t(s));if(Jx(i)<=o)return e;let n=o-t(Yx),r=0,a=0;for(;r<e.length&&a+i[r]<=n;)a+=i[r],r++;return r===0?[]:[...e.slice(0,r),Yx]}function Jx(e){return e.reduce((o,t)=>o+t,0)}var SM="sans-serif";var ew=new Map,Oc;function tw(e,o){let t=`${e} ${o}px ${SM}`;return i=>{let n=`${t}|${i}`,r=ew.get(n);if(r!==void 0)return r;let a=CM(i,t,o);return ew.set(n,a),a}}function CM(e,o,t){return Oc??=document.createElement("canvas").getContext("2d"),Oc?(Oc.font=o,Oc.measureText(e).width):e.length*t*.6}var iw=Math.PI,MM=11,nw=13,rw=4,aw=28;function sw(e,o,t){if(e.role==="outline")return null;if(e.role==="centre")return ow(kM(t),o);let i=_M(e,t);return i.arcLengthPx>=i.depthPx?EM(i,o,t):ow(qM(i,t),o)}function _M(e,o){let t=e.innerRadius*o.radiusPx,i=e.outerRadius*o.radiusPx,n=(t+i)/2,r=e.endAngle-e.startAngle;return{midAngle:_a+(e.startAngle+e.endAngle)/2,innerRadiusPx:t,midRadiusPx:n,angularSpan:r,arcLengthPx:r*n,depthPx:i-t}}function ow(e,o){if(e.lengthPx<aw||e.heightPx<nw)return null;let t=Te(ae({},lw(o)),{text:o.displayName,width:e.lengthPx-rw,overflow:"truncate"});return Iu(e,t)}function EM(e,o,t){let i=e.arcLengthPx-rw;if(i<aw||e.depthPx<nw)return null;let n=lw(o),r={centreX:t.centreX,centreY:t.centreY,radiusPx:e.midRadiusPx,midAngle:e.midAngle,lengthPx:i},a=Zx(o.displayName,r,tw(n.fontWeight,n.fontSize));return a.length===0?null:Qx(a.map(d=>{var c=d,{glyph:s}=c,l=to(c,["glyph"]);return Iu(l,Te(ae({},n),{text:s}))}))}function lw(e){return{fill:jx(e.color),fontSize:MM,fontWeight:e.isCentre||e.isFile?"bold":"normal",align:"center",verticalAlign:"middle"}}function kM(e){let o=2*.2*e.radiusPx;return{x:e.centreX,y:e.centreY,rotation:0,lengthPx:o,heightPx:o}}function qM(e,o){return{x:o.centreX+e.midRadiusPx*Math.cos(e.midAngle),y:o.centreY+e.midRadiusPx*Math.sin(e.midAngle),rotation:TM(-e.midAngle),lengthPx:e.depthPx,heightPx:e.angularSpan*e.innerRadiusPx}}function TM(e){let o=Math.atan2(Math.sin(e),Math.cos(e));return o>Fr?o-iw:o<-Fr?o+iw:o}var RM="Click to go up one folder",AM="Click to unfocus and go up one folder";function cw(e,o){let t=IM(o);return({data:i})=>{if(!i)return"";let n=[`<b>${Gr(i.name)}</b>`,`${Gr(e.areaMetric)}: ${Bc.format(i.value)}`,`${Gr(e.colorMetric)}: ${i.colorValue===void 0?"\u2013":Bc.format(i.colorValue)}`];return i.folderValueText&&n.push(Gr(i.folderValueText)),i.isCentre&&t&&n.push(`<i>${t}</i>`),n.join("<br/>")}}function IM({isMapRoot:e,isFocused:o}){return e?o?AM:null:RM}var dw={color:Po,widthPx:2.5},FM=0,LM=Number.POSITIVE_INFINITY;function zc(e,o,t){let i=o.map(r=>DM(r,e)),n=t.focus==="ancestors"?PM(o):()=>"self";return{aria:{enabled:!0},hoverLayerThreshold:LM,tooltip:{show:!0,confine:!0,formatter:cw(e.metrics,e)},series:[Te(ae({type:"custom",coordinateSystem:"none",data:i,renderItem:({dataIndex:r},a)=>VM(o[r],i[r],{frame:NM(a),border:t.border,focus:n(r)})},Vx(i.length)),{progressive:FM})]}}function DM({node:e,isCentre:o},{centre:t,coloring:i}){let{litPaths:n}=i.highlight;return Te(ae({},Hx(e,i)),{id:`${t.path}|${e.path}`,isCentre:o,color:zx(Te(ae({},e),{isCentre:o}),i),isFaded:n.size>0&&!n.has(e.path)})}function PM(e){let o=new Map(e.map(({node:t},i)=>[t.path,i]));return t=>{let i=[];for(let n=e[t].node.path;o.has(n);n=n.slice(0,n.lastIndexOf("/")))i.push(o.get(n));return i}}function NM(e){let o=e.getWidth(),t=e.getHeight();return{centreX:o/2,centreY:t/2,radiusPx:Math.min(o,t)/2}}function VM(e,o,t){let i=e.sectors.map(a=>BM(a,o.color,t)),n=e.sectors.map(a=>sw(a,o,t.frame)).filter(a=>a!==null),r=[...i,...n];return{type:"group",focus:t.focus,children:o.isFaded?r.map(Fu):r}}function BM(e,o,{frame:t,border:i}){if(e.role==="outline"){let r=Bx(dw.widthPx,hw(e,t));return Wc("sector",uw(e,t),{fill:"none",stroke:dw.color,lineWidth:r},!1)}if(e.role==="centre"){let r={cx:t.centreX,cy:t.centreY,r:e.outerRadius*t.radiusPx};return Wc("circle",r,{fill:o,stroke:i.color,lineWidth:i.widthPx},!0)}let n=Wx(o,i,hw(e,t));return Wc("sector",uw(e,t),{fill:o,stroke:n.color,lineWidth:n.widthPx},!0)}function hw(e,o){let t=(e.endAngle-e.startAngle)*e.innerRadius*o.radiusPx,i=(e.outerRadius-e.innerRadius)*o.radiusPx;return Math.min(t,i)}function uw(e,o){return{cx:o.centreX,cy:o.centreY,r0:e.innerRadius*o.radiusPx,r:e.outerRadius*o.radiusPx,startAngle:_a+e.startAngle,endAngle:_a+e.endAngle,clockwise:!0}}var Ea={startAngle:0,endAngle:Nx},$c=Te(ae({role:"centre"},Ea),{innerRadius:0,outerRadius:.2});function jc(e){return[...e].sort(Lu)}function Lu(e,o){return o.area-e.area||e.path.localeCompare(o.path)}var WM=.15,OM=.04,zM=.012;function mw(e,o){let t={placements:new Map,bands:$M(e,o)};return t.placements.set(e,{node:e,isCentre:!0,sectors:[]}),ka(t,e,$c),pw(t,e,Ea,1),[...t.placements.values()]}function $M(e,o){let t=Math.max(1,Sa(e,o)),i=Vc(t);return{count:t,width:i,headerThickness:Math.min(i*WM,OM)}}function pw(e,o,t,i){let n=(t.endAngle-t.startAngle)/o.area,r=t.startAngle;for(let a of jM(o)){let s=HM(e,{startAngle:r,endAngle:r+a.area*n},i);a.folder?UM(e,a.folder,s,i):fw(e,a.files,s),r=s.endAngle}}function jM(e){let o=jc(e.children),t=o.filter(n=>!n.isFile).map(n=>({area:n.area,folder:n})),i=o.filter(n=>n.isFile);return i.length>0&&t.push({area:i.reduce((n,r)=>n+r.area,0),files:i}),t.sort((n,r)=>r.area-n.area)}function HM(e,o,t){let i=.2+(t-1)*e.bands.width;return{startAngle:o.startAngle,endAngle:o.endAngle,innerRadius:i,outerRadius:i+e.bands.width-zM}}function UM(e,o,t,i){if(ka(e,o,Te(ae({},t),{role:"outline"})),i<e.bands.count){ka(e,o,Te(ae({},t),{role:"header"})),pw(e,o,t,i+1);return}let n=Te(ae({},t),{innerRadius:t.innerRadius+e.bands.headerThickness});ka(e,o,Te(ae({},t),{outerRadius:n.innerRadius,role:"header"})),fw(e,o.children,n)}function fw(e,o,t){for(let i of GM(o,t))ka(e,i.node,Te(ae({},i.sector),{role:"cell"}))}function GM(e,o){let t=(o.endAngle-o.startAngle)*(o.innerRadius+o.outerRadius)/2,i=o.outerRadius-o.innerRadius,n={path:"",name:"",isFile:!1,area:0,colorValue:void 0,isFlat:!1,children:e},r=ao(n,s=>s===n?s.children:void 0).sum(s=>s===n?0:s.area).sort((s,l)=>Lu(s.data,l.data));return Cp().tile(Sp).size([t,i])(r).children.map(s=>({node:s.data,sector:XM(s,o,t,i)}))}function XM(e,o,t,i){let n=o.endAngle-o.startAngle,r=a=>Math.sqrt(o.innerRadius**2+a/i*(o.outerRadius**2-o.innerRadius**2));return{startAngle:o.startAngle+e.x0/t*n,endAngle:o.startAngle+e.x1/t*n,innerRadius:r(e.y0),outerRadius:r(e.y1)}}function ka(e,o,t){let i=e.placements.get(o)??{node:o,isCentre:!1,sectors:[]};i.sectors.push(t),e.placements.set(o,i)}var KM={color:Po,widthPx:.5};function Du(e){return{visibleDepth:e+1,buildOption:o=>QM(o,e)}}function QM(e,o){return zc(e,mw(e.centre,o),{border:KM,focus:"self"})}function gw(e,o){let t=Math.max(1,Sa(e,o)),i=[{node:e,isCentre:!0,sectors:[$c]}];return bw(i,{count:t,width:Vc(t)},e,Ea,1),i}function bw(e,o,t,i,n){if(n>o.count)return;let r=(i.endAngle-i.startAngle)/t.area,a=.2+(n-1)*o.width,s=i.startAngle;for(let l of jc(t.children)){let d={startAngle:s,endAngle:s+l.area*r};e.push({node:l,isCentre:!1,sectors:[Te(ae({role:"ring"},d),{innerRadius:a,outerRadius:a+o.width})]}),bw(e,o,l,d,n+1),s=d.endAngle}}var YM={color:Po,widthPx:1};function Pu(e){return{visibleDepth:e,buildOption:o=>ZM(o,e)}}function ZM(e,o){let t=gw(e.centre,o);return zc(e,t,{border:YM,focus:"ancestors"})}var Hc=Xe(qi,zr,(e,o)=>({areaMetric:e,colorMetric:o})),Nu=Xe(Dt,Qn,Li,Hc,Vd,({unifiedMapNode:e},o,t,i,n)=>{let r=t&&o.get(t)||e;return r?qu(r,i,n):null}),JM=Xe(Dt,Hc,Od,Vd,({unifiedMapNode:e},o,t,i)=>e?Au(e,Te(ae({},o),{folderValue:t,isFlat:i})):new Map),e9=Xe(JM,Od,i0,r0,gs,(e,o,t,i,n)=>({values:e,value:o,style:t,tint:i,markedPackages:n})),t9=Xe(bs,sf,rf,Nu,(e,o,t,i)=>({selectedPath:e,litPaths:new Set([...o,...i9(i,t)])}));function i9(e,o){return!e||o.length===0?[]:Tu(e,t=>o.includes(nr.estimateFileExtension(t.name)))}var vw=Xe(zr,hs,ds,ps,ko,e9,t9,(e,o,t,i,n,r,a)=>({isUnaryMetric:e===_p,colorRange:o,colorMode:t,mapColors:i,colorMetricRange:n,folders:r,highlight:a}));var Uc=(()=>{class e{constructor(t){this.store=t,this.tree$=this.store.select(Nu),this.layoutAlgorithm$=this.store.select(ms),this.radialLevels$=this.store.select(a0),this.metrics$=this.store.select(Hc),this.coloring$=this.store.select(vw),this.hoveredNodePath$=this.store.select(af),this.selectedNodePath$=this.store.select(bs),this.isDeltaState$=this.store.select(ls),this.isFocused$=this.store.select(Li).pipe(_e(Boolean))}static{this.\u0275fac=function(i){return new(i||e)(M(me))}}static{this.\u0275prov=O({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Gc=(()=>{class e{constructor(t,i){this.store=t,this.nodeInteraction=i}selectNode(t){this.nodeInteraction.selectNode(t),this.nodeInteraction.clearKeptHighlight()}hoverNode(t){this.nodeInteraction.hoverNode(t)}openContextMenu(t,i,n){this.store.dispatch(Es({value:{nodeId:t,xPositionOfRightClickEvent:i,yPositionOfRightClickEvent:n,origin:"radialMap"}}))}unfocus(){this.store.dispatch(ui())}static{this.\u0275fac=function(i){return new(i||e)(M(me),M(qo))}}static{this.\u0275prov=O({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var a9=["unfocusConfirmation"];function s9(e,o){e&1&&(f(0,"div",1)(1,"output",4)(2,"span"),x(3,"This layout shows a single map. Switch to another map layout to compare two maps."),p()()())}function l9(e,o){if(e&1){let t=ue();f(0,"cc-radial-chart",5),V("folderClicked",function(n){oe(t);let r=L();return ne(r.selectNode(n))})("centreClicked",function(){oe(t);let n=L();return ne(n.goUp())})("fileClicked",function(n){oe(t);let r=L();return ne(r.selectNode(n))})("nodeHovered",function(n){oe(t);let r=L();return ne(r.hover(n))})("nodeRightClicked",function(n){oe(t);let r=L();return ne(r.openContextMenu(n))}),p()}if(e&2){let t=o,i=L();R("shape",i.shape())("tree",t.tree)("centre",t.centre)("hoveredPath",i.hoveredPath())("metrics",i.metrics())("coloring",i.coloring())("isFocused",i.isFocused())}}function c9(e,o){if(e&1){let t=ue();f(0,"button",7),V("click",function(){oe(t);let n=L(2);return ne(n.unfocus())}),x(1,"Unfocus"),p()}}function d9(e,o){if(e&1&&(f(0,"div",1)(1,"output",4)(2,"span"),x(3,"There are no files with an area to show."),p(),K(4,c9,2,0,"button",6),p()()),e&2){let t=L();h(4),Q(t.isFocused()?4:-1)}}var h9=`calc(${[`var(${Xf}, ${32}px)`,`var(${Kf}, ${17}px)`,`var(${Ks}, 0px)`,`${12}px`].join(" + ")})`,Vu=(()=>{class e{constructor(){this.bottomInset=h9,this.readStore=E(Uc),this.writeStore=E(Gc),this.tree=F(this.readStore.tree$,{requireSync:!0}),this.layoutAlgorithm=F(this.readStore.layoutAlgorithm$,{requireSync:!0}),this.radialLevels=F(this.readStore.radialLevels$,{requireSync:!0}),this.shape=te(()=>this.layoutAlgorithm()===gt.RadialTreeMap?Du(this.radialLevels()):Pu(this.radialLevels())),this.metrics=F(this.readStore.metrics$,{requireSync:!0}),this.coloring=F(this.readStore.coloring$,{requireSync:!0}),this.hoveredPath=F(this.readStore.hoveredNodePath$,{requireSync:!0}),this.isDeltaState=F(this.readStore.isDeltaState$,{requireSync:!0}),this.isFocused=F(this.readStore.isFocused$,{requireSync:!0}),this.isLoadingFile=F(E(Fe).isLoadingFile$,{initialValue:!1}),this.selectedPath=F(this.readStore.selectedNodePath$,{requireSync:!0}),this.requestedCentrePath=ke(null),this.view=te(()=>{let t=this.tree();if(!t)return null;let i=this.requestedCentrePath();return{tree:t,centre:i===null?t:Pc(t,i)}}),this.unfocusConfirmation=Ue.required("unfocusConfirmation"),this.unfocusConfirmationMessage=te(()=>`You are focused on "${this.tree()?.name??""}", so there is no folder above it. Unfocus and go up one folder?`),oo(()=>this.centreOnTheSelection())}selectNode(t){this.writeStore.selectNode(t)}goUp(){let t=this.view(),i=t&&Ma(t.tree,t.centre.path);i?this.selectNode(i.path):this.isFocused()&&this.unfocusConfirmation().open()}unfocusAndGoUp(){let t=this.tree()?.path;this.unfocus();let i=this.tree(),n=i&&t&&Ma(i,t);n&&this.selectNode(n.path)}openContextMenu({path:t,clientX:i,clientY:n}){this.writeStore.openContextMenu(t,i,n)}unfocus(){this.writeStore.unfocus()}hover(t){this.writeStore.hoverNode(t)}centreOnTheSelection(){let t=this.selectedPath(),{visibleDepth:i}=this.shape();tp(()=>{t!==null&&!this.isFileShownAroundTheCentre(t,i)&&this.requestedCentrePath.set(t)})}isFileShownAroundTheCentre(t,i){let n=this.view();if(!n)return!1;let r=Ir(n.centre,t,i);return r.isFile&&r.path===t}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=A({type:e,selectors:[["cc-radial-map"]],viewQuery:function(i,n){i&1&&tt(n.unfocusConfirmation,a9,5),i&2&&it()},hostAttrs:[1,"fixed","inset-x-0","z-0","top-[var(--cc-bars-height,49px)]"],hostVars:4,hostBindings:function(i,n){i&2&&(ze("bottom",n.bottomInset),Be("hidden",n.isLoadingFile()))},decls:5,vars:2,consts:[["unfocusConfirmation",""],[1,"flex","h-full","items-center","justify-center","p-4"],[3,"shape","tree","centre","hoveredPath","metrics","coloring","isFocused"],["title","Unfocus to go up?","testId","radial-map-unfocus-confirmation",3,"confirmed","message"],[1,"alert","max-w-md"],[3,"folderClicked","centreClicked","fileClicked","nodeHovered","nodeRightClicked","shape","tree","centre","hoveredPath","metrics","coloring","isFocused"],["type","button",1,"btn","btn-sm"],["type","button",1,"btn","btn-sm",3,"click"]],template:function(i,n){if(i&1&&(K(0,s9,4,0,"div",1)(1,l9,1,7,"cc-radial-chart",2)(2,d9,5,1,"div",1),f(3,"cc-confirm-dialog",3,0),V("confirmed",function(){return n.unfocusAndGoUp()}),p()),i&2){let r;Q(n.isDeltaState()?0:(r=n.view())?1:2,r),h(3),R("message",n.unfocusConfirmationMessage())}},dependencies:[Ru,C0],encapsulation:2})}}return e})();function u9(e,o){e&1&&W(0,"cc-bar-tools-divider")}var Bu=(()=>{class e{constructor(){this.writeStore=E(Gc),this.isFocused=F(E(Uc).isFocused$,{requireSync:!0})}unfocus(){this.writeStore.unfocus()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=A({type:e,selectors:[["cc-radial-map-tools"]],hostAttrs:[1,"flex","items-center","gap-0.5"],features:[Xt([{provide:hl,useExisting:Xg}])],decls:3,vars:2,consts:[["testId","metrics-bar-unfocus",3,"unfocused","isFocused"],["view","metrics"]],template:function(i,n){i&1&&(f(0,"cc-unfocus-tool",0),V("unfocused",function(){return n.unfocus()}),p(),K(1,u9,1,0,"cc-bar-tools-divider"),W(2,"cc-toolbox-screenshot-button",1)),i&2&&(R("isFocused",n.isFocused()),h(),Q(n.isFocused()?1:-1))},dependencies:[el,ul,sl],encapsulation:2})}}return e})();var Wu=(()=>{class e extends Jg{constructor(){super(...arguments),this.areaMetric=F(E(Ee).areaMetric$,{requireSync:!0}),this.pathToNode=E(me).selectSignal(Qn)}isEnabledFor(t){let i=this.pathToNode().get(t);return i!==void 0&&rs(i,this.areaMetric())}static{this.\u0275fac=(()=>{let t;return function(n){return(t||(t=zm(e)))(n||e)}})()}static{this.\u0275prov=O({token:e,factory:e.\u0275fac})}}return e})();var m9=(e,o,t,i)=>{let n=e.length>0?e.filter(d=>$t(d)):o,r=0,a=0,s=0,l=0;for(let d of n)i(d)&&r++,d.isExcluded&&a++,!i(d)&&!d.isExcluded&&(s++,rs(d,t)||l++);return{shown:s,flattened:r,excluded:a,noArea:l}},xw=Xe(Bf,Kn,qi,zs,m9);var Ou=(()=>{class e{constructor(){this.store=E(me),this.counts$=this.store.select(xw)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=O({token:e,factory:e.\u0275fac})}}return e})();var zu=(()=>{class e{constructor(){this.store=E(me),this.metricValues$=this.store.select(Ug),this.descriptors$=this.store.select(Rf)}addRule(t){rl(this.store,t.type,_s({rule:Te(ae({},t),{id:p9()})}))}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=O({token:e,factory:e.\u0275fac})}}return e})();function p9(){return`metric-rule-${crypto.randomUUID()}`}var $u=(()=>{class e{constructor(){this.mapStateReadWindow=E(Ee),this.sharedViewReadWindow=E(_t),this.store=E(me),this.idToBuildingService=E(Us),this.areaMetric=F(this.mapStateReadWindow.areaMetric$,{requireSync:!0}),this.buildingIds=F(this.idToBuildingService.buildingIds$,{requireSync:!0}),this.rootUnary=F(this.store.select(Nf),{requireSync:!0}),this.markedPackages=F(this.sharedViewReadWindow.markedPackages$,{requireSync:!0}),this.isFlattened=F(this.store.select(zs),{requireSync:!0})}project(t){return s1(t,{areaMetric:this.areaMetric(),buildingIds:this.buildingIds(),rootUnary:this.rootUnary(),isFlattened:this.isFlattened(),hidesExcludedNodes:!0,markedPackages:this.markedPackages()})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=O({token:e,factory:e.\u0275fac})}}return e})();var ju=(()=>{class e{constructor(){this.nodeInteraction=E(qo),this.sharedViewReadWindow=E(_t),this.codeMapTooltipService=E(Jn),this.selectedNodePath=F(this.sharedViewReadWindow.selectedNodePath$,{requireSync:!0}),this.hoveredNodePath=F(this.sharedViewReadWindow.hoveredNodePath$,{requireSync:!0})}isSelected(t){return this.selectedNodePath()===t.path}isHovered(t){return this.hoveredNodePath()===t.path}select(t){this.nodeInteraction.selectNode(t.path),this.nodeInteraction.clearKeptHighlight()}deselect(){this.nodeInteraction.clearSelection()}hover(t,i){this.nodeInteraction.hoverNode(t.path),this.codeMapTooltipService.show(t,i.right,i.top)}hoverEnd(){this.nodeInteraction.hoverNode(null),this.codeMapTooltipService.hide()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=O({token:e,factory:e.\u0275fac})}}return e})();var f9=2e3,ww=(()=>{class e{constructor(){this.actions$=E(mt),this.sharedViewReadWindow=E(_t),this.revealService=E(Dg),this.actions$.pipe(ct(di),Ut(()=>this.sharedViewReadWindow.selectedNodePath$.pipe(Ie(Boolean),wt(1),Bm(Lm(f9)))),fp()).subscribe(t=>this.revealService.revealNode(t,{expand:!1}))}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275dir=Hm({type:e,selectors:[["","ccRevealsSelectedNodeAfterLoad",""]]})}}return e})();var b9=()=>[Vu];function v9(e,o){e&1&&W(0,"cc-radial-map")}function x9(e,o){e&1&&(Xm(0,v9,1,0),Km(1,0,b9),Qm())}function w9(e,o){e&1&&W(0,"cc-radial-map-tools",2)}function y9(e,o){e&1&&W(0,"cc-map-tools",2)}var yw=(()=>{class e{constructor(){this.isRadialLayout=Vt()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=A({type:e,selectors:[["cc-metrics-view"]],features:[Xt([$u,{provide:Fg,useExisting:$u},ju,{provide:Lg,useExisting:ju},Wu,{provide:Pg,useExisting:Wu},Gd,{provide:Ig,useExisting:Gd},Ou,{provide:Ag,useExisting:Ou},Ud,{provide:qg,useExisting:Ud},zu,{provide:kg,useExisting:zu},{provide:Rg,useExisting:sg},Wg(Hg),Bg(jg),{provide:zg,useValue:"metrics"},Hd,{provide:Og,useExisting:Hd},{provide:_g,useValue:Eg},{provide:Yg,useValue:Qg},Vg("metrics"),L0()]),no([ww,$g])],decls:13,vars:4,consts:[["view","metrics"],["collapsedContent","",1,"flex-1","min-w-0"],["barTools",""]],template:function(i,n){i&1&&(W(0,"cc-loading-file-progress-spinner",0)(1,"cc-code-map"),K(2,x9,3,0),f(3,"cc-sidebar-explorer"),W(4,"cc-explorer-search-bar",1),p(),W(5,"cc-sidebar-inspector")(6,"cc-node-context-menu"),f(7,"cc-metrics-bar"),K(8,w9,1,0,"cc-radial-map-tools",2)(9,y9,1,0,"cc-map-tools",2),p(),W(10,"cc-legend-panel")(11,"cc-file-extension-bar")(12,"cc-bottom-bar")),i&2&&(h(),Be("hidden",n.isRadialLayout()),h(),Q(n.isRadialLayout()?2:-1),h(6),Q(n.isRadialLayout()?8:9))},dependencies:[_h,ku,Zg,Ng,Tg,Sg,Ch,Mg,wg,A0,Eh,Bu],encapsulation:2})}}return e})();var S9=[{path:Gs.metrics,component:yw,canActivate:[Dl]},{path:Gs.domain,canActivate:[Dl],loadComponent:()=>import("./chunk-O645C7F2.js").then(e=>e.DomainViewComponent)},{path:Gs.dependencies,canActivate:[Dl],loadComponent:()=>import("./chunk-5YUHFIQZ.js").then(e=>e.DependencyViewComponent)}],C9={provide:np,useClass:H2},M9=[pp(S9),C9],Hu={providers:[cp(hp(),dp()),bp(U2,{metaReducers:[G2]}),...M9,{provide:mp,useClass:Ll},vp([...n2,...w2,...l2,...s2,...C2,..._2,...j2,...Q2,...c2]),{provide:Gm,useFactory:e=>()=>e.synchronizeVersion(),deps:[A1],multi:!0}]};var Xc=class{parse(o,t={}){t=Object.assign({binary:!1},t);let i=t.binary,n=[],r=0;o.traverse(function(D){if(D.isMesh){let j=D.geometry,k=j.index,N=j.getAttribute("position");r+=k!==null?k.count/3:N.count/3,n.push({object3d:D,geometry:j})}});let a,s=80;if(i===!0){let D=r*2+r*3*4*4+80+4,j=new ArrayBuffer(D);a=new DataView(j),a.setUint32(s,r,!0),s+=4}else a="",a+=`solid exported
3617
3648
  `;let l=new Ze,d=new Ze,c=new Ze,u=new Ze,m=new Ze,g=new Ze;for(let D=0,j=n.length;D<j;D++){let k=n[D].object3d,N=n[D].geometry,z=N.index,H=N.getAttribute("position");if(z!==null)for(let G=0;G<z.count;G+=3){let Y=z.getX(G+0),X=z.getX(G+1),he=z.getX(G+2);b(Y,X,he,H,k)}else for(let G=0;G<H.count;G+=3){let Y=G+0,X=G+1,he=G+2;b(Y,X,he,H,k)}}return i===!1&&(a+=`endsolid exported
3618
3649
  `),a;function b(D,j,k,N,z){l.fromBufferAttribute(N,D),d.fromBufferAttribute(N,j),c.fromBufferAttribute(N,k),z.isSkinnedMesh===!0&&(z.applyBoneTransform(D,l),z.applyBoneTransform(j,d),z.applyBoneTransform(k,c)),l.applyMatrix4(z.matrixWorld),d.applyMatrix4(z.matrixWorld),c.applyMatrix4(z.matrixWorld),y(l,d,c),q(l),q(d),q(c),i===!0?(a.setUint16(s,0,!0),s+=2):(a+=` endloop
3619
3650
  `,a+=` endfacet
3620
3651
  `)}function y(D,j,k){u.subVectors(k,j),m.subVectors(D,j),u.cross(m).normalize(),g.copy(u).normalize(),i===!0?(a.setFloat32(s,g.x,!0),s+=4,a.setFloat32(s,g.y,!0),s+=4,a.setFloat32(s,g.z,!0),s+=4):(a+=" facet normal "+g.x+" "+g.y+" "+g.z+`
3621
3652
  `,a+=` outer loop
3622
3653
  `)}function q(D){i===!0?(a.setFloat32(s,D.x,!0),s+=4,a.setFloat32(s,D.y,!0),s+=4,a.setFloat32(s,D.z,!0),s+=4):a+=" vertex "+D.x+" "+D.y+" "+D.z+`
3623
- `}}};var Ta=class{constructor(o){this.isFont=!0,this.type="Font",this.data=o}generateShapes(o,e=100,i="ltr"){let n=[],r=T9(o,e,this.data,i);for(let a=0,s=r.length;a<s;a++)n.push(...r[a].toShapes());return n}};function T9(t,o,e,i){let n=Array.from(t),r=o/e.resolution,a=(e.boundingBox.yMax-e.boundingBox.yMin+e.underlineThickness)*r,s=[],l=0,d=0;(i=="rtl"||i=="tb")&&n.reverse();for(let c=0;c<n.length;c++){let u=n[c];if(u===`
3624
- `)l=0,d-=a;else{let m=R9(u,r,l,d,e);i=="tb"?(l=0,d+=e.ascender*r):l+=m.offsetX,s.push(m.path)}}return s}function R9(t,o,e,i,n){let r=n.glyphs[t]||n.glyphs["?"];if(!r){console.error('THREE.Font: character "'+t+'" does not exists in font family '+n.familyName+".");return}let a=new Di,s,l,d,c,u,m,g,b;if(r.o){let y=r._cachedOutline||(r._cachedOutline=r.o.split(" "));for(let q=0,D=y.length;q<D;)switch(y[q++]){case"m":s=y[q++]*o+e,l=y[q++]*o+i,a.moveTo(s,l);break;case"l":s=y[q++]*o+e,l=y[q++]*o+i,a.lineTo(s,l);break;case"q":d=y[q++]*o+e,c=y[q++]*o+i,u=y[q++]*o+e,m=y[q++]*o+i,a.quadraticCurveTo(u,m,d,c);break;case"b":d=y[q++]*o+e,c=y[q++]*o+i,u=y[q++]*o+e,m=y[q++]*o+i,g=y[q++]*o+e,b=y[q++]*o+i,a.bezierCurveTo(u,m,g,b,d,c);break}}return{offsetX:r.ha*o,path:a}}var Gu={glyphs:{\u03BF:{x_min:0,x_max:712,ha:815,o:"m 356 -25 q 96 88 192 -25 q 0 368 0 201 q 92 642 0 533 q 356 761 192 761 q 617 644 517 761 q 712 368 712 533 q 619 91 712 201 q 356 -25 520 -25 m 356 85 q 527 175 465 85 q 583 369 583 255 q 528 562 583 484 q 356 651 466 651 q 189 560 250 651 q 135 369 135 481 q 187 177 135 257 q 356 85 250 85 "},S:{x_min:0,x_max:788,ha:890,o:"m 788 291 q 662 54 788 144 q 397 -26 550 -26 q 116 68 226 -26 q 0 337 0 168 l 131 337 q 200 152 131 220 q 384 85 269 85 q 557 129 479 85 q 650 270 650 183 q 490 429 650 379 q 194 513 341 470 q 33 739 33 584 q 142 964 33 881 q 388 1041 242 1041 q 644 957 543 1041 q 756 716 756 867 l 625 716 q 561 874 625 816 q 395 933 497 933 q 243 891 309 933 q 164 759 164 841 q 325 609 164 656 q 625 526 475 568 q 788 291 788 454 "},"\xA6":{x_min:343,x_max:449,ha:792,o:"m 449 462 l 343 462 l 343 986 l 449 986 l 449 462 m 449 -242 l 343 -242 l 343 280 l 449 280 l 449 -242 "},"/":{x_min:183.25,x_max:608.328125,ha:792,o:"m 608 1041 l 266 -129 l 183 -129 l 520 1041 l 608 1041 "},\u03A4:{x_min:-.4375,x_max:777.453125,ha:839,o:"m 777 893 l 458 893 l 458 0 l 319 0 l 319 892 l 0 892 l 0 1013 l 777 1013 l 777 893 "},y:{x_min:0,x_max:684.78125,ha:771,o:"m 684 738 l 388 -83 q 311 -216 356 -167 q 173 -279 252 -279 q 97 -266 133 -279 l 97 -149 q 132 -155 109 -151 q 168 -160 155 -160 q 240 -114 213 -160 q 274 -26 248 -98 l 0 738 l 137 737 l 341 139 l 548 737 l 684 738 "},\u03A0:{x_min:0,x_max:803,ha:917,o:"m 803 0 l 667 0 l 667 886 l 140 886 l 140 0 l 0 0 l 0 1012 l 803 1012 l 803 0 "},\u0390:{x_min:-111,x_max:339,ha:361,o:"m 339 800 l 229 800 l 229 925 l 339 925 l 339 800 m -1 800 l -111 800 l -111 925 l -1 925 l -1 800 m 284 3 q 233 -10 258 -5 q 182 -15 207 -15 q 85 26 119 -15 q 42 200 42 79 l 42 737 l 167 737 l 168 215 q 172 141 168 157 q 226 101 183 101 q 248 103 239 101 q 284 112 257 104 l 284 3 m 302 1040 l 113 819 l 30 819 l 165 1040 l 302 1040 "},g:{x_min:0,x_max:686,ha:838,o:"m 686 34 q 586 -213 686 -121 q 331 -306 487 -306 q 131 -252 216 -306 q 31 -84 31 -190 l 155 -84 q 228 -174 166 -138 q 345 -207 284 -207 q 514 -109 454 -207 q 564 89 564 -27 q 461 6 521 36 q 335 -23 401 -23 q 88 100 184 -23 q 0 370 0 215 q 87 634 0 522 q 330 758 183 758 q 457 728 398 758 q 564 644 515 699 l 564 737 l 686 737 l 686 34 m 582 367 q 529 560 582 481 q 358 652 468 652 q 189 561 250 652 q 135 369 135 482 q 189 176 135 255 q 361 85 251 85 q 529 176 468 85 q 582 367 582 255 "},"\xB2":{x_min:0,x_max:442,ha:539,o:"m 442 383 l 0 383 q 91 566 0 492 q 260 668 176 617 q 354 798 354 727 q 315 875 354 845 q 227 905 277 905 q 136 869 173 905 q 99 761 99 833 l 14 761 q 82 922 14 864 q 232 974 141 974 q 379 926 316 974 q 442 797 442 878 q 351 635 442 704 q 183 539 321 611 q 92 455 92 491 l 442 455 l 442 383 "},"\u2013":{x_min:0,x_max:705.5625,ha:803,o:"m 705 334 l 0 334 l 0 410 l 705 410 l 705 334 "},\u039A:{x_min:0,x_max:819.5625,ha:893,o:"m 819 0 l 650 0 l 294 509 l 139 356 l 139 0 l 0 0 l 0 1013 l 139 1013 l 139 526 l 626 1013 l 809 1013 l 395 600 l 819 0 "},\u0192:{x_min:-46.265625,x_max:392,ha:513,o:"m 392 651 l 259 651 l 79 -279 l -46 -278 l 134 651 l 14 651 l 14 751 l 135 751 q 151 948 135 900 q 304 1041 185 1041 q 334 1040 319 1041 q 392 1034 348 1039 l 392 922 q 337 931 360 931 q 271 883 287 931 q 260 793 260 853 l 260 751 l 392 751 l 392 651 "},e:{x_min:0,x_max:714,ha:813,o:"m 714 326 l 140 326 q 200 157 140 227 q 359 87 260 87 q 488 130 431 87 q 561 245 545 174 l 697 245 q 577 48 670 123 q 358 -26 484 -26 q 97 85 195 -26 q 0 363 0 197 q 94 642 0 529 q 358 765 195 765 q 626 627 529 765 q 714 326 714 503 m 576 429 q 507 583 564 522 q 355 650 445 650 q 206 583 266 650 q 140 429 152 522 l 576 429 "},\u03CC:{x_min:0,x_max:712,ha:815,o:"m 356 -25 q 94 91 194 -25 q 0 368 0 202 q 92 642 0 533 q 356 761 192 761 q 617 644 517 761 q 712 368 712 533 q 619 91 712 201 q 356 -25 520 -25 m 356 85 q 527 175 465 85 q 583 369 583 255 q 528 562 583 484 q 356 651 466 651 q 189 560 250 651 q 135 369 135 481 q 187 177 135 257 q 356 85 250 85 m 576 1040 l 387 819 l 303 819 l 438 1040 l 576 1040 "},J:{x_min:0,x_max:588,ha:699,o:"m 588 279 q 287 -26 588 -26 q 58 73 126 -26 q 0 327 0 158 l 133 327 q 160 172 133 227 q 288 96 198 96 q 426 171 391 96 q 449 336 449 219 l 449 1013 l 588 1013 l 588 279 "},"\xBB":{x_min:-1,x_max:503,ha:601,o:"m 503 302 l 280 136 l 281 256 l 429 373 l 281 486 l 280 608 l 503 440 l 503 302 m 221 302 l 0 136 l 0 255 l 145 372 l 0 486 l -1 608 l 221 440 l 221 302 "},"\xA9":{x_min:-3,x_max:1008,ha:1106,o:"m 502 -7 q 123 151 263 -7 q -3 501 -3 294 q 123 851 -3 706 q 502 1011 263 1011 q 881 851 739 1011 q 1008 501 1008 708 q 883 151 1008 292 q 502 -7 744 -7 m 502 60 q 830 197 709 60 q 940 501 940 322 q 831 805 940 681 q 502 944 709 944 q 174 805 296 944 q 65 501 65 680 q 173 197 65 320 q 502 60 294 60 m 741 394 q 661 246 731 302 q 496 190 591 190 q 294 285 369 190 q 228 497 228 370 q 295 714 228 625 q 499 813 370 813 q 656 762 588 813 q 733 625 724 711 l 634 625 q 589 704 629 673 q 498 735 550 735 q 377 666 421 735 q 334 504 334 597 q 374 340 334 408 q 490 272 415 272 q 589 304 549 272 q 638 394 628 337 l 741 394 "},\u03CE:{x_min:0,x_max:922,ha:1030,o:"m 687 1040 l 498 819 l 415 819 l 549 1040 l 687 1040 m 922 339 q 856 97 922 203 q 650 -26 780 -26 q 538 9 587 -26 q 461 103 489 44 q 387 12 436 46 q 277 -22 339 -22 q 69 97 147 -22 q 0 338 0 202 q 45 551 0 444 q 161 737 84 643 l 302 737 q 175 552 219 647 q 124 336 124 446 q 155 179 124 248 q 275 88 197 88 q 375 163 341 88 q 400 294 400 219 l 400 572 l 524 572 l 524 294 q 561 135 524 192 q 643 88 591 88 q 762 182 719 88 q 797 341 797 257 q 745 555 797 450 q 619 737 705 637 l 760 737 q 874 551 835 640 q 922 339 922 444 "},"^":{x_min:193.0625,x_max:598.609375,ha:792,o:"m 598 772 l 515 772 l 395 931 l 277 772 l 193 772 l 326 1013 l 462 1013 l 598 772 "},"\xAB":{x_min:0,x_max:507.203125,ha:604,o:"m 506 136 l 284 302 l 284 440 l 506 608 l 507 485 l 360 371 l 506 255 l 506 136 m 222 136 l 0 302 l 0 440 l 222 608 l 221 486 l 73 373 l 222 256 l 222 136 "},D:{x_min:0,x_max:828,ha:935,o:"m 389 1013 q 714 867 593 1013 q 828 521 828 729 q 712 161 828 309 q 382 0 587 0 l 0 0 l 0 1013 l 389 1013 m 376 124 q 607 247 523 124 q 681 510 681 355 q 607 771 681 662 q 376 896 522 896 l 139 896 l 139 124 l 376 124 "},"\u2219":{x_min:0,x_max:142,ha:239,o:"m 142 585 l 0 585 l 0 738 l 142 738 l 142 585 "},\u00FF:{x_min:0,x_max:47,ha:125,o:"m 47 3 q 37 -7 47 -7 q 28 0 30 -7 q 39 -4 32 -4 q 45 3 45 -1 l 37 0 q 28 9 28 0 q 39 19 28 19 l 47 16 l 47 19 l 47 3 m 37 1 q 44 8 44 1 q 37 16 44 16 q 30 8 30 16 q 37 1 30 1 m 26 1 l 23 22 l 14 0 l 3 22 l 3 3 l 0 25 l 13 1 l 22 25 l 26 1 "},w:{x_min:0,x_max:1009.71875,ha:1100,o:"m 1009 738 l 783 0 l 658 0 l 501 567 l 345 0 l 222 0 l 0 738 l 130 738 l 284 174 l 432 737 l 576 738 l 721 173 l 881 737 l 1009 738 "},$:{x_min:0,x_max:700,ha:793,o:"m 664 717 l 542 717 q 490 825 531 785 q 381 872 450 865 l 381 551 q 620 446 540 522 q 700 241 700 370 q 618 45 700 116 q 381 -25 536 -25 l 381 -152 l 307 -152 l 307 -25 q 81 62 162 -25 q 0 297 0 149 l 124 297 q 169 146 124 204 q 307 81 215 89 l 307 441 q 80 536 148 469 q 13 725 13 603 q 96 910 13 839 q 307 982 180 982 l 307 1077 l 381 1077 l 381 982 q 574 917 494 982 q 664 717 664 845 m 307 565 l 307 872 q 187 831 233 872 q 142 724 142 791 q 180 618 142 656 q 307 565 218 580 m 381 76 q 562 237 562 96 q 517 361 562 313 q 381 423 472 409 l 381 76 "},"\\":{x_min:-.015625,x_max:425.0625,ha:522,o:"m 425 -129 l 337 -129 l 0 1041 l 83 1041 l 425 -129 "},\u00B5:{x_min:0,x_max:697.21875,ha:747,o:"m 697 -4 q 629 -14 658 -14 q 498 97 513 -14 q 422 9 470 41 q 313 -23 374 -23 q 207 4 258 -23 q 119 81 156 32 l 119 -278 l 0 -278 l 0 738 l 124 738 l 124 343 q 165 173 124 246 q 308 83 216 83 q 452 178 402 83 q 493 359 493 255 l 493 738 l 617 738 l 617 214 q 623 136 617 160 q 673 92 637 92 q 697 96 684 92 l 697 -4 "},\u0399:{x_min:42,x_max:181,ha:297,o:"m 181 0 l 42 0 l 42 1013 l 181 1013 l 181 0 "},\u038E:{x_min:0,x_max:1144.5,ha:1214,o:"m 1144 1012 l 807 416 l 807 0 l 667 0 l 667 416 l 325 1012 l 465 1012 l 736 533 l 1004 1012 l 1144 1012 m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 "},"\u2019":{x_min:0,x_max:139,ha:236,o:"m 139 851 q 102 737 139 784 q 0 669 65 690 l 0 734 q 59 787 42 741 q 72 873 72 821 l 0 873 l 0 1013 l 139 1013 l 139 851 "},\u039D:{x_min:0,x_max:801,ha:915,o:"m 801 0 l 651 0 l 131 822 l 131 0 l 0 0 l 0 1013 l 151 1013 l 670 191 l 670 1013 l 801 1013 l 801 0 "},"-":{x_min:8.71875,x_max:350.390625,ha:478,o:"m 350 317 l 8 317 l 8 428 l 350 428 l 350 317 "},Q:{x_min:0,x_max:968,ha:1072,o:"m 954 5 l 887 -79 l 744 35 q 622 -11 687 2 q 483 -26 556 -26 q 127 130 262 -26 q 0 504 0 279 q 127 880 0 728 q 484 1041 262 1041 q 841 884 708 1041 q 968 507 968 735 q 933 293 968 398 q 832 104 899 188 l 954 5 m 723 191 q 802 330 777 248 q 828 499 828 412 q 744 790 828 673 q 483 922 650 922 q 228 791 322 922 q 142 505 142 673 q 227 221 142 337 q 487 91 323 91 q 632 123 566 91 l 520 215 l 587 301 l 723 191 "},\u03C2:{x_min:1,x_max:676.28125,ha:740,o:"m 676 460 l 551 460 q 498 595 542 546 q 365 651 448 651 q 199 578 263 651 q 136 401 136 505 q 266 178 136 241 q 508 106 387 142 q 640 -50 640 62 q 625 -158 640 -105 q 583 -278 611 -211 l 465 -278 q 498 -182 490 -211 q 515 -80 515 -126 q 381 12 515 -15 q 134 91 197 51 q 1 388 1 179 q 100 651 1 542 q 354 761 199 761 q 587 680 498 761 q 676 460 676 599 "},M:{x_min:0,x_max:954,ha:1067,o:"m 954 0 l 819 0 l 819 869 l 537 0 l 405 0 l 128 866 l 128 0 l 0 0 l 0 1013 l 200 1013 l 472 160 l 757 1013 l 954 1013 l 954 0 "},\u03A8:{x_min:0,x_max:1006,ha:1094,o:"m 1006 678 q 914 319 1006 429 q 571 200 814 200 l 571 0 l 433 0 l 433 200 q 92 319 194 200 q 0 678 0 429 l 0 1013 l 139 1013 l 139 679 q 191 417 139 492 q 433 326 255 326 l 433 1013 l 571 1013 l 571 326 l 580 326 q 813 423 747 326 q 868 679 868 502 l 868 1013 l 1006 1013 l 1006 678 "},C:{x_min:0,x_max:886,ha:944,o:"m 886 379 q 760 87 886 201 q 455 -26 634 -26 q 112 136 236 -26 q 0 509 0 283 q 118 882 0 737 q 469 1041 245 1041 q 748 955 630 1041 q 879 708 879 859 l 745 708 q 649 862 724 805 q 473 920 573 920 q 219 791 312 920 q 136 509 136 675 q 217 229 136 344 q 470 99 311 99 q 672 179 591 99 q 753 379 753 259 l 886 379 "},"!":{x_min:0,x_max:138,ha:236,o:"m 138 684 q 116 409 138 629 q 105 244 105 299 l 33 244 q 16 465 33 313 q 0 684 0 616 l 0 1013 l 138 1013 l 138 684 m 138 0 l 0 0 l 0 151 l 138 151 l 138 0 "},"{":{x_min:0,x_max:480.5625,ha:578,o:"m 480 -286 q 237 -213 303 -286 q 187 -45 187 -159 q 194 48 187 -15 q 201 141 201 112 q 164 264 201 225 q 0 314 118 314 l 0 417 q 164 471 119 417 q 201 605 201 514 q 199 665 201 644 q 193 772 193 769 q 241 941 193 887 q 480 1015 308 1015 l 480 915 q 336 866 375 915 q 306 742 306 828 q 310 662 306 717 q 314 577 314 606 q 288 452 314 500 q 176 365 256 391 q 289 275 257 337 q 314 143 314 226 q 313 84 314 107 q 310 -11 310 -5 q 339 -131 310 -94 q 480 -182 377 -182 l 480 -286 "},X:{x_min:-.015625,x_max:854.15625,ha:940,o:"m 854 0 l 683 0 l 423 409 l 166 0 l 0 0 l 347 519 l 18 1013 l 186 1013 l 428 637 l 675 1013 l 836 1013 l 504 520 l 854 0 "},"#":{x_min:0,x_max:963.890625,ha:1061,o:"m 963 690 l 927 590 l 719 590 l 655 410 l 876 410 l 840 310 l 618 310 l 508 -3 l 393 -2 l 506 309 l 329 310 l 215 -2 l 102 -3 l 212 310 l 0 310 l 36 410 l 248 409 l 312 590 l 86 590 l 120 690 l 347 690 l 459 1006 l 573 1006 l 462 690 l 640 690 l 751 1006 l 865 1006 l 754 690 l 963 690 m 606 590 l 425 590 l 362 410 l 543 410 l 606 590 "},\u03B9:{x_min:42,x_max:284,ha:361,o:"m 284 3 q 233 -10 258 -5 q 182 -15 207 -15 q 85 26 119 -15 q 42 200 42 79 l 42 738 l 167 738 l 168 215 q 172 141 168 157 q 226 101 183 101 q 248 103 239 101 q 284 112 257 104 l 284 3 "},\u0386:{x_min:0,x_max:906.953125,ha:982,o:"m 283 1040 l 88 799 l 5 799 l 145 1040 l 283 1040 m 906 0 l 756 0 l 650 303 l 251 303 l 143 0 l 0 0 l 376 1012 l 529 1012 l 906 0 m 609 421 l 452 866 l 293 421 l 609 421 "},")":{x_min:0,x_max:318,ha:415,o:"m 318 365 q 257 25 318 191 q 87 -290 197 -141 l 0 -290 q 140 21 93 -128 q 193 360 193 189 q 141 704 193 537 q 0 1024 97 850 l 87 1024 q 257 706 197 871 q 318 365 318 542 "},\u03B5:{x_min:0,x_max:634.71875,ha:714,o:"m 634 234 q 527 38 634 110 q 300 -25 433 -25 q 98 29 183 -25 q 0 204 0 93 q 37 314 0 265 q 128 390 67 353 q 56 460 82 419 q 26 555 26 505 q 114 712 26 654 q 295 763 191 763 q 499 700 416 763 q 589 515 589 631 l 478 515 q 419 618 464 580 q 307 657 374 657 q 207 630 253 657 q 151 547 151 598 q 238 445 151 469 q 389 434 280 434 l 389 331 l 349 331 q 206 315 255 331 q 125 210 125 287 q 183 107 125 145 q 302 76 233 76 q 436 117 379 76 q 509 234 493 159 l 634 234 "},\u0394:{x_min:0,x_max:952.78125,ha:1028,o:"m 952 0 l 0 0 l 400 1013 l 551 1013 l 952 0 m 762 124 l 476 867 l 187 124 l 762 124 "},"}":{x_min:0,x_max:481,ha:578,o:"m 481 314 q 318 262 364 314 q 282 136 282 222 q 284 65 282 97 q 293 -58 293 -48 q 241 -217 293 -166 q 0 -286 174 -286 l 0 -182 q 143 -130 105 -182 q 171 -2 171 -93 q 168 81 171 22 q 165 144 165 140 q 188 275 165 229 q 306 365 220 339 q 191 455 224 391 q 165 588 165 505 q 168 681 165 624 q 171 742 171 737 q 141 865 171 827 q 0 915 102 915 l 0 1015 q 243 942 176 1015 q 293 773 293 888 q 287 675 293 741 q 282 590 282 608 q 318 466 282 505 q 481 417 364 417 l 481 314 "},"\u2030":{x_min:-3,x_max:1672,ha:1821,o:"m 846 0 q 664 76 732 0 q 603 244 603 145 q 662 412 603 344 q 846 489 729 489 q 1027 412 959 489 q 1089 244 1089 343 q 1029 76 1089 144 q 846 0 962 0 m 845 103 q 945 143 910 103 q 981 243 981 184 q 947 340 981 301 q 845 385 910 385 q 745 342 782 385 q 709 243 709 300 q 742 147 709 186 q 845 103 781 103 m 888 986 l 284 -25 l 199 -25 l 803 986 l 888 986 m 241 468 q 58 545 126 468 q -3 715 -3 615 q 56 881 -3 813 q 238 958 124 958 q 421 881 353 958 q 483 712 483 813 q 423 544 483 612 q 241 468 356 468 m 241 855 q 137 811 175 855 q 100 710 100 768 q 136 612 100 653 q 240 572 172 572 q 344 614 306 572 q 382 713 382 656 q 347 810 382 771 q 241 855 308 855 m 1428 0 q 1246 76 1314 0 q 1185 244 1185 145 q 1244 412 1185 344 q 1428 489 1311 489 q 1610 412 1542 489 q 1672 244 1672 343 q 1612 76 1672 144 q 1428 0 1545 0 m 1427 103 q 1528 143 1492 103 q 1564 243 1564 184 q 1530 340 1564 301 q 1427 385 1492 385 q 1327 342 1364 385 q 1291 243 1291 300 q 1324 147 1291 186 q 1427 103 1363 103 "},a:{x_min:0,x_max:698.609375,ha:794,o:"m 698 0 q 661 -12 679 -7 q 615 -17 643 -17 q 536 12 564 -17 q 500 96 508 41 q 384 6 456 37 q 236 -25 312 -25 q 65 31 130 -25 q 0 194 0 88 q 118 390 0 334 q 328 435 180 420 q 488 483 476 451 q 495 523 495 504 q 442 619 495 584 q 325 654 389 654 q 209 617 257 654 q 152 513 161 580 l 33 513 q 123 705 33 633 q 332 772 207 772 q 528 712 448 772 q 617 531 617 645 l 617 163 q 624 108 617 126 q 664 90 632 90 l 698 94 l 698 0 m 491 262 l 491 372 q 272 329 350 347 q 128 201 128 294 q 166 113 128 144 q 264 83 205 83 q 414 130 346 83 q 491 262 491 183 "},"\u2014":{x_min:0,x_max:941.671875,ha:1039,o:"m 941 334 l 0 334 l 0 410 l 941 410 l 941 334 "},"=":{x_min:8.71875,x_max:780.953125,ha:792,o:"m 780 510 l 8 510 l 8 606 l 780 606 l 780 510 m 780 235 l 8 235 l 8 332 l 780 332 l 780 235 "},N:{x_min:0,x_max:801,ha:914,o:"m 801 0 l 651 0 l 131 823 l 131 0 l 0 0 l 0 1013 l 151 1013 l 670 193 l 670 1013 l 801 1013 l 801 0 "},\u03C1:{x_min:0,x_max:712,ha:797,o:"m 712 369 q 620 94 712 207 q 362 -26 521 -26 q 230 2 292 -26 q 119 83 167 30 l 119 -278 l 0 -278 l 0 362 q 91 643 0 531 q 355 764 190 764 q 617 647 517 764 q 712 369 712 536 m 583 366 q 530 559 583 480 q 359 651 469 651 q 190 562 252 651 q 135 370 135 483 q 189 176 135 257 q 359 85 250 85 q 528 175 466 85 q 583 366 583 254 "},"2":{x_min:59,x_max:731,ha:792,o:"m 731 0 l 59 0 q 197 314 59 188 q 457 487 199 315 q 598 691 598 580 q 543 819 598 772 q 411 867 488 867 q 272 811 328 867 q 209 630 209 747 l 81 630 q 182 901 81 805 q 408 986 271 986 q 629 909 536 986 q 731 694 731 826 q 613 449 731 541 q 378 316 495 383 q 201 122 235 234 l 731 122 l 731 0 "},"\xAF":{x_min:0,x_max:941.671875,ha:938,o:"m 941 1033 l 0 1033 l 0 1109 l 941 1109 l 941 1033 "},Z:{x_min:0,x_max:779,ha:849,o:"m 779 0 l 0 0 l 0 113 l 621 896 l 40 896 l 40 1013 l 779 1013 l 778 887 l 171 124 l 779 124 l 779 0 "},u:{x_min:0,x_max:617,ha:729,o:"m 617 0 l 499 0 l 499 110 q 391 10 460 45 q 246 -25 322 -25 q 61 58 127 -25 q 0 258 0 136 l 0 738 l 125 738 l 125 284 q 156 148 125 202 q 273 82 197 82 q 433 165 369 82 q 493 340 493 243 l 493 738 l 617 738 l 617 0 "},k:{x_min:0,x_max:612.484375,ha:697,o:"m 612 738 l 338 465 l 608 0 l 469 0 l 251 382 l 121 251 l 121 0 l 0 0 l 0 1013 l 121 1013 l 121 402 l 456 738 l 612 738 "},\u0397:{x_min:0,x_max:803,ha:917,o:"m 803 0 l 667 0 l 667 475 l 140 475 l 140 0 l 0 0 l 0 1013 l 140 1013 l 140 599 l 667 599 l 667 1013 l 803 1013 l 803 0 "},\u0391:{x_min:0,x_max:906.953125,ha:985,o:"m 906 0 l 756 0 l 650 303 l 251 303 l 143 0 l 0 0 l 376 1013 l 529 1013 l 906 0 m 609 421 l 452 866 l 293 421 l 609 421 "},s:{x_min:0,x_max:604,ha:697,o:"m 604 217 q 501 36 604 104 q 292 -23 411 -23 q 86 43 166 -23 q 0 238 0 114 l 121 237 q 175 122 121 164 q 300 85 223 85 q 415 112 363 85 q 479 207 479 147 q 361 309 479 276 q 140 372 141 370 q 21 544 21 426 q 111 708 21 647 q 298 761 190 761 q 492 705 413 761 q 583 531 583 643 l 462 531 q 412 625 462 594 q 298 657 363 657 q 199 636 242 657 q 143 558 143 608 q 262 454 143 486 q 484 394 479 397 q 604 217 604 341 "},B:{x_min:0,x_max:778,ha:876,o:"m 580 546 q 724 469 670 535 q 778 311 778 403 q 673 83 778 171 q 432 0 575 0 l 0 0 l 0 1013 l 411 1013 q 629 957 541 1013 q 732 768 732 892 q 691 633 732 693 q 580 546 650 572 m 393 899 l 139 899 l 139 588 l 379 588 q 521 624 462 588 q 592 744 592 667 q 531 859 592 819 q 393 899 471 899 m 419 124 q 566 169 504 124 q 635 303 635 219 q 559 436 635 389 q 402 477 494 477 l 139 477 l 139 124 l 419 124 "},"\u2026":{x_min:0,x_max:614,ha:708,o:"m 142 0 l 0 0 l 0 151 l 142 151 l 142 0 m 378 0 l 236 0 l 236 151 l 378 151 l 378 0 m 614 0 l 472 0 l 472 151 l 614 151 l 614 0 "},"?":{x_min:0,x_max:607,ha:704,o:"m 607 777 q 543 599 607 674 q 422 474 482 537 q 357 272 357 391 l 236 272 q 297 487 236 395 q 411 619 298 490 q 474 762 474 691 q 422 885 474 838 q 301 933 371 933 q 179 880 228 933 q 124 706 124 819 l 0 706 q 94 963 0 872 q 302 1044 177 1044 q 511 973 423 1044 q 607 777 607 895 m 370 0 l 230 0 l 230 151 l 370 151 l 370 0 "},H:{x_min:0,x_max:803,ha:915,o:"m 803 0 l 667 0 l 667 475 l 140 475 l 140 0 l 0 0 l 0 1013 l 140 1013 l 140 599 l 667 599 l 667 1013 l 803 1013 l 803 0 "},\u03BD:{x_min:0,x_max:675,ha:761,o:"m 675 738 l 404 0 l 272 0 l 0 738 l 133 738 l 340 147 l 541 738 l 675 738 "},c:{x_min:1,x_max:701.390625,ha:775,o:"m 701 264 q 584 53 681 133 q 353 -26 487 -26 q 91 91 188 -26 q 1 370 1 201 q 92 645 1 537 q 353 761 190 761 q 572 688 479 761 q 690 493 666 615 l 556 493 q 487 606 545 562 q 356 650 428 650 q 186 563 246 650 q 134 372 134 487 q 188 179 134 258 q 359 88 250 88 q 492 136 437 88 q 566 264 548 185 l 701 264 "},"\xB6":{x_min:0,x_max:566.671875,ha:678,o:"m 21 892 l 52 892 l 98 761 l 145 892 l 176 892 l 178 741 l 157 741 l 157 867 l 108 741 l 88 741 l 40 871 l 40 741 l 21 741 l 21 892 m 308 854 l 308 731 q 252 691 308 691 q 227 691 240 691 q 207 696 213 695 l 207 712 l 253 706 q 288 733 288 706 l 288 763 q 244 741 279 741 q 193 797 193 741 q 261 860 193 860 q 287 860 273 860 q 308 854 302 855 m 288 842 l 263 843 q 213 796 213 843 q 248 756 213 756 q 288 796 288 756 l 288 842 m 566 988 l 502 988 l 502 -1 l 439 -1 l 439 988 l 317 988 l 317 -1 l 252 -1 l 252 602 q 81 653 155 602 q 0 805 0 711 q 101 989 0 918 q 309 1053 194 1053 l 566 1053 l 566 988 "},\u03B2:{x_min:0,x_max:660,ha:745,o:"m 471 550 q 610 450 561 522 q 660 280 660 378 q 578 64 660 151 q 367 -22 497 -22 q 239 5 299 -22 q 126 82 178 32 l 126 -278 l 0 -278 l 0 593 q 54 903 0 801 q 318 1042 127 1042 q 519 964 436 1042 q 603 771 603 887 q 567 644 603 701 q 471 550 532 586 m 337 79 q 476 138 418 79 q 535 279 535 198 q 427 437 535 386 q 226 477 344 477 l 226 583 q 398 620 329 583 q 486 762 486 668 q 435 884 486 833 q 312 935 384 935 q 169 861 219 935 q 126 698 126 797 l 126 362 q 170 169 126 242 q 337 79 224 79 "},\u039C:{x_min:0,x_max:954,ha:1068,o:"m 954 0 l 819 0 l 819 868 l 537 0 l 405 0 l 128 865 l 128 0 l 0 0 l 0 1013 l 199 1013 l 472 158 l 758 1013 l 954 1013 l 954 0 "},\u038C:{x_min:.109375,x_max:1120,ha:1217,o:"m 1120 505 q 994 132 1120 282 q 642 -29 861 -29 q 290 130 422 -29 q 167 505 167 280 q 294 883 167 730 q 650 1046 430 1046 q 999 882 868 1046 q 1120 505 1120 730 m 977 504 q 896 784 977 669 q 644 915 804 915 q 391 785 484 915 q 307 504 307 669 q 391 224 307 339 q 644 95 486 95 q 894 224 803 95 q 977 504 977 339 m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 "},\u0389:{x_min:0,x_max:1158,ha:1275,o:"m 1158 0 l 1022 0 l 1022 475 l 496 475 l 496 0 l 356 0 l 356 1012 l 496 1012 l 496 599 l 1022 599 l 1022 1012 l 1158 1012 l 1158 0 m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 "},"\u2022":{x_min:0,x_max:663.890625,ha:775,o:"m 663 529 q 566 293 663 391 q 331 196 469 196 q 97 294 194 196 q 0 529 0 393 q 96 763 0 665 q 331 861 193 861 q 566 763 469 861 q 663 529 663 665 "},"\xA5":{x_min:.1875,x_max:819.546875,ha:886,o:"m 563 561 l 697 561 l 696 487 l 520 487 l 482 416 l 482 380 l 697 380 l 695 308 l 482 308 l 482 0 l 342 0 l 342 308 l 125 308 l 125 380 l 342 380 l 342 417 l 303 487 l 125 487 l 125 561 l 258 561 l 0 1013 l 140 1013 l 411 533 l 679 1013 l 819 1013 l 563 561 "},"(":{x_min:0,x_max:318.0625,ha:415,o:"m 318 -290 l 230 -290 q 61 23 122 -142 q 0 365 0 190 q 62 712 0 540 q 230 1024 119 869 l 318 1024 q 175 705 219 853 q 125 360 125 542 q 176 22 125 187 q 318 -290 223 -127 "},U:{x_min:0,x_max:796,ha:904,o:"m 796 393 q 681 93 796 212 q 386 -25 566 -25 q 101 95 208 -25 q 0 393 0 211 l 0 1013 l 138 1013 l 138 391 q 204 191 138 270 q 394 107 276 107 q 586 191 512 107 q 656 391 656 270 l 656 1013 l 796 1013 l 796 393 "},\u03B3:{x_min:.5,x_max:744.953125,ha:822,o:"m 744 737 l 463 54 l 463 -278 l 338 -278 l 338 54 l 154 495 q 104 597 124 569 q 13 651 67 651 l 0 651 l 0 751 l 39 753 q 168 711 121 753 q 242 594 207 676 l 403 208 l 617 737 l 744 737 "},\u03B1:{x_min:0,x_max:765.5625,ha:809,o:"m 765 -4 q 698 -14 726 -14 q 564 97 586 -14 q 466 7 525 40 q 337 -26 407 -26 q 88 98 186 -26 q 0 369 0 212 q 88 637 0 525 q 337 760 184 760 q 465 728 407 760 q 563 637 524 696 l 563 739 l 685 739 l 685 222 q 693 141 685 168 q 748 94 708 94 q 765 96 760 94 l 765 -4 m 584 371 q 531 562 584 485 q 360 653 470 653 q 192 566 254 653 q 135 379 135 489 q 186 181 135 261 q 358 84 247 84 q 528 176 465 84 q 584 371 584 260 "},F:{x_min:0,x_max:683.328125,ha:717,o:"m 683 888 l 140 888 l 140 583 l 613 583 l 613 458 l 140 458 l 140 0 l 0 0 l 0 1013 l 683 1013 l 683 888 "},"\xAD":{x_min:0,x_max:705.5625,ha:803,o:"m 705 334 l 0 334 l 0 410 l 705 410 l 705 334 "},":":{x_min:0,x_max:142,ha:239,o:"m 142 585 l 0 585 l 0 738 l 142 738 l 142 585 m 142 0 l 0 0 l 0 151 l 142 151 l 142 0 "},\u03A7:{x_min:0,x_max:854.171875,ha:935,o:"m 854 0 l 683 0 l 423 409 l 166 0 l 0 0 l 347 519 l 18 1013 l 186 1013 l 427 637 l 675 1013 l 836 1013 l 504 521 l 854 0 "},"*":{x_min:116,x_max:674,ha:792,o:"m 674 768 l 475 713 l 610 544 l 517 477 l 394 652 l 272 478 l 178 544 l 314 713 l 116 766 l 153 876 l 341 812 l 342 1013 l 446 1013 l 446 811 l 635 874 l 674 768 "},"\u2020":{x_min:0,x_max:777,ha:835,o:"m 458 804 l 777 804 l 777 683 l 458 683 l 458 0 l 319 0 l 319 681 l 0 683 l 0 804 l 319 804 l 319 1015 l 458 1013 l 458 804 "},"\xB0":{x_min:0,x_max:347,ha:444,o:"m 173 802 q 43 856 91 802 q 0 977 0 905 q 45 1101 0 1049 q 173 1153 90 1153 q 303 1098 255 1153 q 347 977 347 1049 q 303 856 347 905 q 173 802 256 802 m 173 884 q 238 910 214 884 q 262 973 262 937 q 239 1038 262 1012 q 173 1064 217 1064 q 108 1037 132 1064 q 85 973 85 1010 q 108 910 85 937 q 173 884 132 884 "},V:{x_min:0,x_max:862.71875,ha:940,o:"m 862 1013 l 505 0 l 361 0 l 0 1013 l 143 1013 l 434 165 l 718 1012 l 862 1013 "},\u039E:{x_min:0,x_max:734.71875,ha:763,o:"m 723 889 l 9 889 l 9 1013 l 723 1013 l 723 889 m 673 463 l 61 463 l 61 589 l 673 589 l 673 463 m 734 0 l 0 0 l 0 124 l 734 124 l 734 0 "},"\xA0":{x_min:0,x_max:0,ha:853},\u03AB:{x_min:.328125,x_max:819.515625,ha:889,o:"m 588 1046 l 460 1046 l 460 1189 l 588 1189 l 588 1046 m 360 1046 l 232 1046 l 232 1189 l 360 1189 l 360 1046 m 819 1012 l 482 416 l 482 0 l 342 0 l 342 416 l 0 1012 l 140 1012 l 411 533 l 679 1012 l 819 1012 "},"0":{x_min:73,x_max:715,ha:792,o:"m 394 -29 q 153 129 242 -29 q 73 479 73 272 q 152 829 73 687 q 394 989 241 989 q 634 829 545 989 q 715 479 715 684 q 635 129 715 270 q 394 -29 546 -29 m 394 89 q 546 211 489 89 q 598 479 598 322 q 548 748 598 640 q 394 871 491 871 q 241 748 298 871 q 190 479 190 637 q 239 211 190 319 q 394 89 296 89 "},"\u201D":{x_min:0,x_max:347,ha:454,o:"m 139 851 q 102 737 139 784 q 0 669 65 690 l 0 734 q 59 787 42 741 q 72 873 72 821 l 0 873 l 0 1013 l 139 1013 l 139 851 m 347 851 q 310 737 347 784 q 208 669 273 690 l 208 734 q 267 787 250 741 q 280 873 280 821 l 208 873 l 208 1013 l 347 1013 l 347 851 "},"@":{x_min:0,x_max:1260,ha:1357,o:"m 1098 -45 q 877 -160 1001 -117 q 633 -203 752 -203 q 155 -29 327 -203 q 0 360 0 127 q 176 802 0 616 q 687 1008 372 1008 q 1123 854 969 1008 q 1260 517 1260 718 q 1155 216 1260 341 q 868 82 1044 82 q 772 106 801 82 q 737 202 737 135 q 647 113 700 144 q 527 82 594 82 q 367 147 420 82 q 314 312 314 212 q 401 565 314 452 q 639 690 498 690 q 810 588 760 690 l 849 668 l 938 668 q 877 441 900 532 q 833 226 833 268 q 853 182 833 198 q 902 167 873 167 q 1088 272 1012 167 q 1159 512 1159 372 q 1051 793 1159 681 q 687 925 925 925 q 248 747 415 925 q 97 361 97 586 q 226 26 97 159 q 627 -122 370 -122 q 856 -87 737 -122 q 1061 8 976 -53 l 1098 -45 m 786 488 q 738 580 777 545 q 643 615 700 615 q 483 517 548 615 q 425 322 425 430 q 457 203 425 250 q 552 156 490 156 q 722 273 665 156 q 786 488 738 309 "},\u038A:{x_min:0,x_max:499,ha:613,o:"m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 m 499 0 l 360 0 l 360 1012 l 499 1012 l 499 0 "},i:{x_min:14,x_max:136,ha:275,o:"m 136 873 l 14 873 l 14 1013 l 136 1013 l 136 873 m 136 0 l 14 0 l 14 737 l 136 737 l 136 0 "},\u0392:{x_min:0,x_max:778,ha:877,o:"m 580 545 q 724 468 671 534 q 778 310 778 402 q 673 83 778 170 q 432 0 575 0 l 0 0 l 0 1013 l 411 1013 q 629 957 541 1013 q 732 768 732 891 q 691 632 732 692 q 580 545 650 571 m 393 899 l 139 899 l 139 587 l 379 587 q 521 623 462 587 q 592 744 592 666 q 531 859 592 819 q 393 899 471 899 m 419 124 q 566 169 504 124 q 635 302 635 219 q 559 435 635 388 q 402 476 494 476 l 139 476 l 139 124 l 419 124 "},\u03C5:{x_min:0,x_max:617,ha:725,o:"m 617 352 q 540 94 617 199 q 308 -24 455 -24 q 76 94 161 -24 q 0 352 0 199 l 0 739 l 126 739 l 126 355 q 169 185 126 257 q 312 98 220 98 q 451 185 402 98 q 492 355 492 257 l 492 739 l 617 739 l 617 352 "},"]":{x_min:0,x_max:275,ha:372,o:"m 275 -281 l 0 -281 l 0 -187 l 151 -187 l 151 920 l 0 920 l 0 1013 l 275 1013 l 275 -281 "},m:{x_min:0,x_max:1019,ha:1128,o:"m 1019 0 l 897 0 l 897 454 q 860 591 897 536 q 739 660 816 660 q 613 586 659 660 q 573 436 573 522 l 573 0 l 447 0 l 447 455 q 412 591 447 535 q 294 657 372 657 q 165 586 213 657 q 122 437 122 521 l 122 0 l 0 0 l 0 738 l 117 738 l 117 640 q 202 730 150 697 q 316 763 254 763 q 437 730 381 763 q 525 642 494 697 q 621 731 559 700 q 753 763 682 763 q 943 694 867 763 q 1019 512 1019 625 l 1019 0 "},\u03C7:{x_min:8.328125,x_max:780.5625,ha:815,o:"m 780 -278 q 715 -294 747 -294 q 616 -257 663 -294 q 548 -175 576 -227 l 379 133 l 143 -277 l 9 -277 l 313 254 l 163 522 q 127 586 131 580 q 36 640 91 640 q 8 637 27 640 l 8 752 l 52 757 q 162 719 113 757 q 236 627 200 690 l 383 372 l 594 737 l 726 737 l 448 250 l 625 -69 q 670 -153 647 -110 q 743 -188 695 -188 q 780 -184 759 -188 l 780 -278 "},"8":{x_min:55,x_max:736,ha:792,o:"m 571 527 q 694 424 652 491 q 736 280 736 358 q 648 71 736 158 q 395 -26 551 -26 q 142 69 238 -26 q 55 279 55 157 q 96 425 55 359 q 220 527 138 491 q 120 615 153 562 q 88 726 88 668 q 171 904 88 827 q 395 986 261 986 q 618 905 529 986 q 702 727 702 830 q 670 616 702 667 q 571 527 638 565 m 394 565 q 519 610 475 565 q 563 717 563 655 q 521 823 563 781 q 392 872 474 872 q 265 824 312 872 q 224 720 224 783 q 265 613 224 656 q 394 565 312 565 m 395 91 q 545 150 488 91 q 597 280 597 204 q 546 408 597 355 q 395 465 492 465 q 244 408 299 465 q 194 280 194 356 q 244 150 194 203 q 395 91 299 91 "},\u03AF:{x_min:42,x_max:326.71875,ha:361,o:"m 284 3 q 233 -10 258 -5 q 182 -15 207 -15 q 85 26 119 -15 q 42 200 42 79 l 42 737 l 167 737 l 168 215 q 172 141 168 157 q 226 101 183 101 q 248 102 239 101 q 284 112 257 104 l 284 3 m 326 1040 l 137 819 l 54 819 l 189 1040 l 326 1040 "},\u0396:{x_min:0,x_max:779.171875,ha:850,o:"m 779 0 l 0 0 l 0 113 l 620 896 l 40 896 l 40 1013 l 779 1013 l 779 887 l 170 124 l 779 124 l 779 0 "},R:{x_min:0,x_max:781.953125,ha:907,o:"m 781 0 l 623 0 q 587 242 590 52 q 407 433 585 433 l 138 433 l 138 0 l 0 0 l 0 1013 l 396 1013 q 636 946 539 1013 q 749 731 749 868 q 711 597 749 659 q 608 502 674 534 q 718 370 696 474 q 729 207 722 352 q 781 26 736 62 l 781 0 m 373 551 q 533 594 465 551 q 614 731 614 645 q 532 859 614 815 q 373 896 465 896 l 138 896 l 138 551 l 373 551 "},o:{x_min:0,x_max:713,ha:821,o:"m 357 -25 q 94 91 194 -25 q 0 368 0 202 q 93 642 0 533 q 357 761 193 761 q 618 644 518 761 q 713 368 713 533 q 619 91 713 201 q 357 -25 521 -25 m 357 85 q 528 175 465 85 q 584 369 584 255 q 529 562 584 484 q 357 651 467 651 q 189 560 250 651 q 135 369 135 481 q 187 177 135 257 q 357 85 250 85 "},"5":{x_min:54.171875,x_max:738,ha:792,o:"m 738 314 q 626 60 738 153 q 382 -23 526 -23 q 155 47 248 -23 q 54 256 54 125 l 183 256 q 259 132 204 174 q 382 91 314 91 q 533 149 471 91 q 602 314 602 213 q 538 469 602 411 q 386 528 475 528 q 284 506 332 528 q 197 439 237 484 l 81 439 l 159 958 l 684 958 l 684 840 l 254 840 l 214 579 q 306 627 258 612 q 407 643 354 643 q 636 552 540 643 q 738 314 738 457 "},"7":{x_min:58.71875,x_max:730.953125,ha:792,o:"m 730 839 q 469 448 560 641 q 335 0 378 255 l 192 0 q 328 441 235 252 q 593 830 421 630 l 58 830 l 58 958 l 730 958 l 730 839 "},K:{x_min:0,x_max:819.46875,ha:906,o:"m 819 0 l 649 0 l 294 509 l 139 355 l 139 0 l 0 0 l 0 1013 l 139 1013 l 139 526 l 626 1013 l 809 1013 l 395 600 l 819 0 "},",":{x_min:0,x_max:142,ha:239,o:"m 142 -12 q 105 -132 142 -82 q 0 -205 68 -182 l 0 -138 q 57 -82 40 -124 q 70 0 70 -51 l 0 0 l 0 151 l 142 151 l 142 -12 "},d:{x_min:0,x_max:683,ha:796,o:"m 683 0 l 564 0 l 564 93 q 456 6 516 38 q 327 -25 395 -25 q 87 100 181 -25 q 0 365 0 215 q 90 639 0 525 q 343 763 187 763 q 564 647 486 763 l 564 1013 l 683 1013 l 683 0 m 582 373 q 529 562 582 484 q 361 653 468 653 q 190 561 253 653 q 135 365 135 479 q 189 175 135 254 q 358 85 251 85 q 529 178 468 85 q 582 373 582 258 "},"\xA8":{x_min:-109,x_max:247,ha:232,o:"m 247 1046 l 119 1046 l 119 1189 l 247 1189 l 247 1046 m 19 1046 l -109 1046 l -109 1189 l 19 1189 l 19 1046 "},E:{x_min:0,x_max:736.109375,ha:789,o:"m 736 0 l 0 0 l 0 1013 l 725 1013 l 725 889 l 139 889 l 139 585 l 677 585 l 677 467 l 139 467 l 139 125 l 736 125 l 736 0 "},Y:{x_min:0,x_max:820,ha:886,o:"m 820 1013 l 482 416 l 482 0 l 342 0 l 342 416 l 0 1013 l 140 1013 l 411 534 l 679 1012 l 820 1013 "},'"':{x_min:0,x_max:299,ha:396,o:"m 299 606 l 203 606 l 203 988 l 299 988 l 299 606 m 96 606 l 0 606 l 0 988 l 96 988 l 96 606 "},"\u2039":{x_min:17.984375,x_max:773.609375,ha:792,o:"m 773 40 l 18 376 l 17 465 l 773 799 l 773 692 l 159 420 l 773 149 l 773 40 "},"\u201E":{x_min:0,x_max:364,ha:467,o:"m 141 -12 q 104 -132 141 -82 q 0 -205 67 -182 l 0 -138 q 56 -82 40 -124 q 69 0 69 -51 l 0 0 l 0 151 l 141 151 l 141 -12 m 364 -12 q 327 -132 364 -82 q 222 -205 290 -182 l 222 -138 q 279 -82 262 -124 q 292 0 292 -51 l 222 0 l 222 151 l 364 151 l 364 -12 "},\u03B4:{x_min:1,x_max:710,ha:810,o:"m 710 360 q 616 87 710 196 q 356 -28 518 -28 q 99 82 197 -28 q 1 356 1 192 q 100 606 1 509 q 355 703 199 703 q 180 829 288 754 q 70 903 124 866 l 70 1012 l 643 1012 l 643 901 l 258 901 q 462 763 422 794 q 636 592 577 677 q 710 360 710 485 m 584 365 q 552 501 584 447 q 451 602 521 555 q 372 611 411 611 q 197 541 258 611 q 136 355 136 472 q 190 171 136 245 q 358 85 252 85 q 528 173 465 85 q 584 365 584 252 "},\u03AD:{x_min:0,x_max:634.71875,ha:714,o:"m 634 234 q 527 38 634 110 q 300 -25 433 -25 q 98 29 183 -25 q 0 204 0 93 q 37 313 0 265 q 128 390 67 352 q 56 459 82 419 q 26 555 26 505 q 114 712 26 654 q 295 763 191 763 q 499 700 416 763 q 589 515 589 631 l 478 515 q 419 618 464 580 q 307 657 374 657 q 207 630 253 657 q 151 547 151 598 q 238 445 151 469 q 389 434 280 434 l 389 331 l 349 331 q 206 315 255 331 q 125 210 125 287 q 183 107 125 145 q 302 76 233 76 q 436 117 379 76 q 509 234 493 159 l 634 234 m 520 1040 l 331 819 l 248 819 l 383 1040 l 520 1040 "},\u03C9:{x_min:0,x_max:922,ha:1031,o:"m 922 339 q 856 97 922 203 q 650 -26 780 -26 q 538 9 587 -26 q 461 103 489 44 q 387 12 436 46 q 277 -22 339 -22 q 69 97 147 -22 q 0 339 0 203 q 45 551 0 444 q 161 738 84 643 l 302 738 q 175 553 219 647 q 124 336 124 446 q 155 179 124 249 q 275 88 197 88 q 375 163 341 88 q 400 294 400 219 l 400 572 l 524 572 l 524 294 q 561 135 524 192 q 643 88 591 88 q 762 182 719 88 q 797 342 797 257 q 745 556 797 450 q 619 738 705 638 l 760 738 q 874 551 835 640 q 922 339 922 444 "},"\xB4":{x_min:0,x_max:96,ha:251,o:"m 96 606 l 0 606 l 0 988 l 96 988 l 96 606 "},"\xB1":{x_min:11,x_max:781,ha:792,o:"m 781 490 l 446 490 l 446 255 l 349 255 l 349 490 l 11 490 l 11 586 l 349 586 l 349 819 l 446 819 l 446 586 l 781 586 l 781 490 m 781 21 l 11 21 l 11 115 l 781 115 l 781 21 "},"|":{x_min:343,x_max:449,ha:792,o:"m 449 462 l 343 462 l 343 986 l 449 986 l 449 462 m 449 -242 l 343 -242 l 343 280 l 449 280 l 449 -242 "},\u03CB:{x_min:0,x_max:617,ha:725,o:"m 482 800 l 372 800 l 372 925 l 482 925 l 482 800 m 239 800 l 129 800 l 129 925 l 239 925 l 239 800 m 617 352 q 540 93 617 199 q 308 -24 455 -24 q 76 93 161 -24 q 0 352 0 199 l 0 738 l 126 738 l 126 354 q 169 185 126 257 q 312 98 220 98 q 451 185 402 98 q 492 354 492 257 l 492 738 l 617 738 l 617 352 "},"\xA7":{x_min:0,x_max:593,ha:690,o:"m 593 425 q 554 312 593 369 q 467 233 516 254 q 537 83 537 172 q 459 -74 537 -12 q 288 -133 387 -133 q 115 -69 184 -133 q 47 96 47 -6 l 166 96 q 199 7 166 40 q 288 -26 232 -26 q 371 -5 332 -26 q 420 60 420 21 q 311 201 420 139 q 108 309 210 255 q 0 490 0 383 q 33 602 0 551 q 124 687 66 654 q 75 743 93 712 q 58 812 58 773 q 133 984 58 920 q 300 1043 201 1043 q 458 987 394 1043 q 529 814 529 925 l 411 814 q 370 908 404 877 q 289 939 336 939 q 213 911 246 939 q 180 841 180 883 q 286 720 180 779 q 484 612 480 615 q 593 425 593 534 m 467 409 q 355 544 467 473 q 196 630 228 612 q 146 587 162 609 q 124 525 124 558 q 239 387 124 462 q 398 298 369 315 q 448 345 429 316 q 467 409 467 375 "},b:{x_min:0,x_max:685,ha:783,o:"m 685 372 q 597 99 685 213 q 347 -25 501 -25 q 219 5 277 -25 q 121 93 161 36 l 121 0 l 0 0 l 0 1013 l 121 1013 l 121 634 q 214 723 157 692 q 341 754 272 754 q 591 637 493 754 q 685 372 685 526 m 554 356 q 499 550 554 470 q 328 644 437 644 q 162 556 223 644 q 108 369 108 478 q 160 176 108 256 q 330 83 221 83 q 498 169 435 83 q 554 356 554 245 "},q:{x_min:0,x_max:683,ha:876,o:"m 683 -278 l 564 -278 l 564 97 q 474 8 533 39 q 345 -23 415 -23 q 91 93 188 -23 q 0 364 0 203 q 87 635 0 522 q 337 760 184 760 q 466 727 408 760 q 564 637 523 695 l 564 737 l 683 737 l 683 -278 m 582 375 q 527 564 582 488 q 358 652 466 652 q 190 565 253 652 q 135 377 135 488 q 189 179 135 261 q 361 84 251 84 q 530 179 469 84 q 582 375 582 260 "},\u03A9:{x_min:-.171875,x_max:969.5625,ha:1068,o:"m 969 0 l 555 0 l 555 123 q 744 308 675 194 q 814 558 814 423 q 726 812 814 709 q 484 922 633 922 q 244 820 334 922 q 154 567 154 719 q 223 316 154 433 q 412 123 292 199 l 412 0 l 0 0 l 0 124 l 217 124 q 68 327 122 210 q 15 572 15 444 q 144 911 15 781 q 484 1041 274 1041 q 822 909 691 1041 q 953 569 953 777 q 899 326 953 443 q 750 124 846 210 l 969 124 l 969 0 "},\u03CD:{x_min:0,x_max:617,ha:725,o:"m 617 352 q 540 93 617 199 q 308 -24 455 -24 q 76 93 161 -24 q 0 352 0 199 l 0 738 l 126 738 l 126 354 q 169 185 126 257 q 312 98 220 98 q 451 185 402 98 q 492 354 492 257 l 492 738 l 617 738 l 617 352 m 535 1040 l 346 819 l 262 819 l 397 1040 l 535 1040 "},z:{x_min:-.015625,x_max:613.890625,ha:697,o:"m 613 0 l 0 0 l 0 100 l 433 630 l 20 630 l 20 738 l 594 738 l 593 636 l 163 110 l 613 110 l 613 0 "},"\u2122":{x_min:0,x_max:894,ha:1e3,o:"m 389 951 l 229 951 l 229 503 l 160 503 l 160 951 l 0 951 l 0 1011 l 389 1011 l 389 951 m 894 503 l 827 503 l 827 939 l 685 503 l 620 503 l 481 937 l 481 503 l 417 503 l 417 1011 l 517 1011 l 653 580 l 796 1010 l 894 1011 l 894 503 "},\u03AE:{x_min:.78125,x_max:697,ha:810,o:"m 697 -278 l 572 -278 l 572 454 q 540 587 572 536 q 425 650 501 650 q 271 579 337 650 q 206 420 206 509 l 206 0 l 81 0 l 81 489 q 73 588 81 562 q 0 644 56 644 l 0 741 q 68 755 38 755 q 158 721 124 755 q 200 630 193 687 q 297 726 234 692 q 434 761 359 761 q 620 692 544 761 q 697 516 697 624 l 697 -278 m 479 1040 l 290 819 l 207 819 l 341 1040 l 479 1040 "},\u0398:{x_min:0,x_max:960,ha:1056,o:"m 960 507 q 833 129 960 280 q 476 -32 698 -32 q 123 129 255 -32 q 0 507 0 280 q 123 883 0 732 q 476 1045 255 1045 q 832 883 696 1045 q 960 507 960 732 m 817 500 q 733 789 817 669 q 476 924 639 924 q 223 792 317 924 q 142 507 142 675 q 222 222 142 339 q 476 89 315 89 q 730 218 636 89 q 817 500 817 334 m 716 449 l 243 449 l 243 571 l 716 571 l 716 449 "},"\xAE":{x_min:-3,x_max:1008,ha:1106,o:"m 503 532 q 614 562 566 532 q 672 658 672 598 q 614 747 672 716 q 503 772 569 772 l 338 772 l 338 532 l 503 532 m 502 -7 q 123 151 263 -7 q -3 501 -3 294 q 123 851 -3 706 q 502 1011 263 1011 q 881 851 739 1011 q 1008 501 1008 708 q 883 151 1008 292 q 502 -7 744 -7 m 502 60 q 830 197 709 60 q 940 501 940 322 q 831 805 940 681 q 502 944 709 944 q 174 805 296 944 q 65 501 65 680 q 173 197 65 320 q 502 60 294 60 m 788 146 l 678 146 q 653 316 655 183 q 527 449 652 449 l 338 449 l 338 146 l 241 146 l 241 854 l 518 854 q 688 808 621 854 q 766 658 766 755 q 739 563 766 607 q 668 497 713 519 q 751 331 747 472 q 788 164 756 190 l 788 146 "},"~":{x_min:0,x_max:833,ha:931,o:"m 833 958 q 778 753 833 831 q 594 665 716 665 q 402 761 502 665 q 240 857 302 857 q 131 795 166 857 q 104 665 104 745 l 0 665 q 54 867 0 789 q 237 958 116 958 q 429 861 331 958 q 594 765 527 765 q 704 827 670 765 q 729 958 729 874 l 833 958 "},\u0395:{x_min:0,x_max:736.21875,ha:778,o:"m 736 0 l 0 0 l 0 1013 l 725 1013 l 725 889 l 139 889 l 139 585 l 677 585 l 677 467 l 139 467 l 139 125 l 736 125 l 736 0 "},"\xB3":{x_min:0,x_max:450,ha:547,o:"m 450 552 q 379 413 450 464 q 220 366 313 366 q 69 414 130 366 q 0 567 0 470 l 85 567 q 126 470 85 504 q 225 437 168 437 q 320 467 280 437 q 360 552 360 498 q 318 632 360 608 q 213 657 276 657 q 195 657 203 657 q 176 657 181 657 l 176 722 q 279 733 249 722 q 334 815 334 752 q 300 881 334 856 q 220 907 267 907 q 133 875 169 907 q 97 781 97 844 l 15 781 q 78 926 15 875 q 220 972 135 972 q 364 930 303 972 q 426 817 426 888 q 344 697 426 733 q 421 642 392 681 q 450 552 450 603 "},"[":{x_min:0,x_max:273.609375,ha:371,o:"m 273 -281 l 0 -281 l 0 1013 l 273 1013 l 273 920 l 124 920 l 124 -187 l 273 -187 l 273 -281 "},L:{x_min:0,x_max:645.828125,ha:696,o:"m 645 0 l 0 0 l 0 1013 l 140 1013 l 140 126 l 645 126 l 645 0 "},\u03C3:{x_min:0,x_max:803.390625,ha:894,o:"m 803 628 l 633 628 q 713 368 713 512 q 618 93 713 204 q 357 -25 518 -25 q 94 91 194 -25 q 0 368 0 201 q 94 644 0 533 q 356 761 194 761 q 481 750 398 761 q 608 739 564 739 l 803 739 l 803 628 m 360 85 q 529 180 467 85 q 584 374 584 262 q 527 566 584 490 q 352 651 463 651 q 187 559 247 651 q 135 368 135 478 q 189 175 135 254 q 360 85 251 85 "},\u03B6:{x_min:0,x_max:573,ha:642,o:"m 573 -40 q 553 -162 573 -97 q 510 -278 543 -193 l 400 -278 q 441 -187 428 -219 q 462 -90 462 -132 q 378 -14 462 -14 q 108 45 197 -14 q 0 290 0 117 q 108 631 0 462 q 353 901 194 767 l 55 901 l 55 1012 l 561 1012 l 561 924 q 261 669 382 831 q 128 301 128 489 q 243 117 128 149 q 458 98 350 108 q 573 -40 573 80 "},\u03B8:{x_min:0,x_max:674,ha:778,o:"m 674 496 q 601 160 674 304 q 336 -26 508 -26 q 73 153 165 -26 q 0 485 0 296 q 72 840 0 683 q 343 1045 166 1045 q 605 844 516 1045 q 674 496 674 692 m 546 579 q 498 798 546 691 q 336 935 437 935 q 178 798 237 935 q 126 579 137 701 l 546 579 m 546 475 l 126 475 q 170 233 126 348 q 338 80 230 80 q 504 233 447 80 q 546 475 546 346 "},\u039F:{x_min:0,x_max:958,ha:1054,o:"m 485 1042 q 834 883 703 1042 q 958 511 958 735 q 834 136 958 287 q 481 -26 701 -26 q 126 130 261 -26 q 0 504 0 279 q 127 880 0 729 q 485 1042 263 1042 m 480 98 q 731 225 638 98 q 815 504 815 340 q 733 783 815 670 q 480 913 640 913 q 226 785 321 913 q 142 504 142 671 q 226 224 142 339 q 480 98 319 98 "},\u0393:{x_min:0,x_max:705.28125,ha:749,o:"m 705 886 l 140 886 l 140 0 l 0 0 l 0 1012 l 705 1012 l 705 886 "}," ":{x_min:0,x_max:0,ha:375},"%":{x_min:-3,x_max:1089,ha:1186,o:"m 845 0 q 663 76 731 0 q 602 244 602 145 q 661 412 602 344 q 845 489 728 489 q 1027 412 959 489 q 1089 244 1089 343 q 1029 76 1089 144 q 845 0 962 0 m 844 103 q 945 143 909 103 q 981 243 981 184 q 947 340 981 301 q 844 385 909 385 q 744 342 781 385 q 708 243 708 300 q 741 147 708 186 q 844 103 780 103 m 888 986 l 284 -25 l 199 -25 l 803 986 l 888 986 m 241 468 q 58 545 126 468 q -3 715 -3 615 q 56 881 -3 813 q 238 958 124 958 q 421 881 353 958 q 483 712 483 813 q 423 544 483 612 q 241 468 356 468 m 241 855 q 137 811 175 855 q 100 710 100 768 q 136 612 100 653 q 240 572 172 572 q 344 614 306 572 q 382 713 382 656 q 347 810 382 771 q 241 855 308 855 "},P:{x_min:0,x_max:726,ha:806,o:"m 424 1013 q 640 931 555 1013 q 726 719 726 850 q 637 506 726 587 q 413 426 548 426 l 140 426 l 140 0 l 0 0 l 0 1013 l 424 1013 m 379 889 l 140 889 l 140 548 l 372 548 q 522 589 459 548 q 593 720 593 637 q 528 845 593 801 q 379 889 463 889 "},\u0388:{x_min:0,x_max:1078.21875,ha:1118,o:"m 1078 0 l 342 0 l 342 1013 l 1067 1013 l 1067 889 l 481 889 l 481 585 l 1019 585 l 1019 467 l 481 467 l 481 125 l 1078 125 l 1078 0 m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 "},\u038F:{x_min:.125,x_max:1136.546875,ha:1235,o:"m 1136 0 l 722 0 l 722 123 q 911 309 842 194 q 981 558 981 423 q 893 813 981 710 q 651 923 800 923 q 411 821 501 923 q 321 568 321 720 q 390 316 321 433 q 579 123 459 200 l 579 0 l 166 0 l 166 124 l 384 124 q 235 327 289 210 q 182 572 182 444 q 311 912 182 782 q 651 1042 441 1042 q 989 910 858 1042 q 1120 569 1120 778 q 1066 326 1120 443 q 917 124 1013 210 l 1136 124 l 1136 0 m 277 1040 l 83 800 l 0 800 l 140 1041 l 277 1040 "},_:{x_min:0,x_max:705.5625,ha:803,o:"m 705 -334 l 0 -334 l 0 -234 l 705 -234 l 705 -334 "},\u03AA:{x_min:-110,x_max:246,ha:275,o:"m 246 1046 l 118 1046 l 118 1189 l 246 1189 l 246 1046 m 18 1046 l -110 1046 l -110 1189 l 18 1189 l 18 1046 m 136 0 l 0 0 l 0 1012 l 136 1012 l 136 0 "},"+":{x_min:23,x_max:768,ha:792,o:"m 768 372 l 444 372 l 444 0 l 347 0 l 347 372 l 23 372 l 23 468 l 347 468 l 347 840 l 444 840 l 444 468 l 768 468 l 768 372 "},"\xBD":{x_min:0,x_max:1050,ha:1149,o:"m 1050 0 l 625 0 q 712 178 625 108 q 878 277 722 187 q 967 385 967 328 q 932 456 967 429 q 850 484 897 484 q 759 450 798 484 q 721 352 721 416 l 640 352 q 706 502 640 448 q 851 551 766 551 q 987 509 931 551 q 1050 385 1050 462 q 976 251 1050 301 q 829 179 902 215 q 717 68 740 133 l 1050 68 l 1050 0 m 834 985 l 215 -28 l 130 -28 l 750 984 l 834 985 m 224 422 l 142 422 l 142 811 l 0 811 l 0 867 q 104 889 62 867 q 164 973 157 916 l 224 973 l 224 422 "},\u03A1:{x_min:0,x_max:720,ha:783,o:"m 424 1013 q 637 933 554 1013 q 720 723 720 853 q 633 508 720 591 q 413 426 546 426 l 140 426 l 140 0 l 0 0 l 0 1013 l 424 1013 m 378 889 l 140 889 l 140 548 l 371 548 q 521 589 458 548 q 592 720 592 637 q 527 845 592 801 q 378 889 463 889 "},"'":{x_min:0,x_max:139,ha:236,o:"m 139 851 q 102 737 139 784 q 0 669 65 690 l 0 734 q 59 787 42 741 q 72 873 72 821 l 0 873 l 0 1013 l 139 1013 l 139 851 "},\u00AA:{x_min:0,x_max:350,ha:397,o:"m 350 625 q 307 616 328 616 q 266 631 281 616 q 247 673 251 645 q 190 628 225 644 q 116 613 156 613 q 32 641 64 613 q 0 722 0 669 q 72 826 0 800 q 247 866 159 846 l 247 887 q 220 934 247 916 q 162 953 194 953 q 104 934 129 953 q 76 882 80 915 l 16 882 q 60 976 16 941 q 166 1011 104 1011 q 266 979 224 1011 q 308 891 308 948 l 308 706 q 311 679 308 688 q 331 670 315 670 l 350 672 l 350 625 m 247 757 l 247 811 q 136 790 175 798 q 64 726 64 773 q 83 682 64 697 q 132 667 103 667 q 207 690 174 667 q 247 757 247 718 "},"\u0385":{x_min:0,x_max:450,ha:553,o:"m 450 800 l 340 800 l 340 925 l 450 925 l 450 800 m 406 1040 l 212 800 l 129 800 l 269 1040 l 406 1040 m 110 800 l 0 800 l 0 925 l 110 925 l 110 800 "},T:{x_min:0,x_max:777,ha:835,o:"m 777 894 l 458 894 l 458 0 l 319 0 l 319 894 l 0 894 l 0 1013 l 777 1013 l 777 894 "},\u03A6:{x_min:0,x_max:915,ha:997,o:"m 527 0 l 389 0 l 389 122 q 110 231 220 122 q 0 509 0 340 q 110 785 0 677 q 389 893 220 893 l 389 1013 l 527 1013 l 527 893 q 804 786 693 893 q 915 509 915 679 q 805 231 915 341 q 527 122 696 122 l 527 0 m 527 226 q 712 310 641 226 q 779 507 779 389 q 712 705 779 627 q 527 787 641 787 l 527 226 m 389 226 l 389 787 q 205 698 275 775 q 136 505 136 620 q 206 308 136 391 q 389 226 276 226 "},"\u204B":{x_min:0,x_max:0,ha:694},j:{x_min:-77.78125,x_max:167,ha:349,o:"m 167 871 l 42 871 l 42 1013 l 167 1013 l 167 871 m 167 -80 q 121 -231 167 -184 q -26 -278 76 -278 l -77 -278 l -77 -164 l -41 -164 q 26 -143 11 -164 q 42 -65 42 -122 l 42 737 l 167 737 l 167 -80 "},\u03A3:{x_min:0,x_max:756.953125,ha:819,o:"m 756 0 l 0 0 l 0 107 l 395 523 l 22 904 l 22 1013 l 745 1013 l 745 889 l 209 889 l 566 523 l 187 125 l 756 125 l 756 0 "},"1":{x_min:215.671875,x_max:574,ha:792,o:"m 574 0 l 442 0 l 442 697 l 215 697 l 215 796 q 386 833 330 796 q 475 986 447 875 l 574 986 l 574 0 "},"\u203A":{x_min:18.0625,x_max:774,ha:792,o:"m 774 376 l 18 40 l 18 149 l 631 421 l 18 692 l 18 799 l 774 465 l 774 376 "},"<":{x_min:17.984375,x_max:773.609375,ha:792,o:"m 773 40 l 18 376 l 17 465 l 773 799 l 773 692 l 159 420 l 773 149 l 773 40 "},"\xA3":{x_min:0,x_max:704.484375,ha:801,o:"m 704 41 q 623 -10 664 5 q 543 -26 583 -26 q 359 15 501 -26 q 243 36 288 36 q 158 23 197 36 q 73 -21 119 10 l 6 76 q 125 195 90 150 q 175 331 175 262 q 147 443 175 383 l 0 443 l 0 512 l 108 512 q 43 734 43 623 q 120 929 43 854 q 358 1010 204 1010 q 579 936 487 1010 q 678 729 678 857 l 678 684 l 552 684 q 504 838 552 780 q 362 896 457 896 q 216 852 263 896 q 176 747 176 815 q 199 627 176 697 q 248 512 217 574 l 468 512 l 468 443 l 279 443 q 297 356 297 398 q 230 194 297 279 q 153 107 211 170 q 227 133 190 125 q 293 142 264 142 q 410 119 339 142 q 516 96 482 96 q 579 105 550 96 q 648 142 608 115 l 704 41 "},t:{x_min:0,x_max:367,ha:458,o:"m 367 0 q 312 -5 339 -2 q 262 -8 284 -8 q 145 28 183 -8 q 108 143 108 64 l 108 638 l 0 638 l 0 738 l 108 738 l 108 944 l 232 944 l 232 738 l 367 738 l 367 638 l 232 638 l 232 185 q 248 121 232 140 q 307 102 264 102 q 345 104 330 102 q 367 107 360 107 l 367 0 "},"\xAC":{x_min:0,x_max:706,ha:803,o:"m 706 411 l 706 158 l 630 158 l 630 335 l 0 335 l 0 411 l 706 411 "},\u03BB:{x_min:0,x_max:750,ha:803,o:"m 750 -7 q 679 -15 716 -15 q 538 59 591 -15 q 466 214 512 97 l 336 551 l 126 0 l 0 0 l 270 705 q 223 837 247 770 q 116 899 190 899 q 90 898 100 899 l 90 1004 q 152 1011 125 1011 q 298 938 244 1011 q 373 783 326 901 l 605 192 q 649 115 629 136 q 716 95 669 95 l 736 95 q 750 97 745 97 l 750 -7 "},W:{x_min:0,x_max:1263.890625,ha:1351,o:"m 1263 1013 l 995 0 l 859 0 l 627 837 l 405 0 l 265 0 l 0 1013 l 136 1013 l 342 202 l 556 1013 l 701 1013 l 921 207 l 1133 1012 l 1263 1013 "},">":{x_min:18.0625,x_max:774,ha:792,o:"m 774 376 l 18 40 l 18 149 l 631 421 l 18 692 l 18 799 l 774 465 l 774 376 "},v:{x_min:0,x_max:675.15625,ha:761,o:"m 675 738 l 404 0 l 272 0 l 0 738 l 133 737 l 340 147 l 541 737 l 675 738 "},\u03C4:{x_min:.28125,x_max:644.5,ha:703,o:"m 644 628 l 382 628 l 382 179 q 388 120 382 137 q 436 91 401 91 q 474 94 447 91 q 504 97 501 97 l 504 0 q 454 -9 482 -5 q 401 -14 426 -14 q 278 67 308 -14 q 260 233 260 118 l 260 628 l 0 628 l 0 739 l 644 739 l 644 628 "},\u03BE:{x_min:0,x_max:624.9375,ha:699,o:"m 624 -37 q 608 -153 624 -96 q 563 -278 593 -211 l 454 -278 q 491 -183 486 -200 q 511 -83 511 -126 q 484 -23 511 -44 q 370 1 452 1 q 323 0 354 1 q 283 -1 293 -1 q 84 76 169 -1 q 0 266 0 154 q 56 431 0 358 q 197 538 108 498 q 94 613 134 562 q 54 730 54 665 q 77 823 54 780 q 143 901 101 867 l 27 901 l 27 1012 l 576 1012 l 576 901 l 380 901 q 244 863 303 901 q 178 745 178 820 q 312 600 178 636 q 532 582 380 582 l 532 479 q 276 455 361 479 q 118 281 118 410 q 165 173 118 217 q 274 120 208 133 q 494 101 384 110 q 624 -37 624 76 "},"&":{x_min:-3,x_max:894.25,ha:992,o:"m 894 0 l 725 0 l 624 123 q 471 0 553 40 q 306 -41 390 -41 q 168 -7 231 -41 q 62 92 105 26 q 14 187 31 139 q -3 276 -3 235 q 55 433 -3 358 q 248 581 114 508 q 170 689 196 640 q 137 817 137 751 q 214 985 137 922 q 384 1041 284 1041 q 548 988 483 1041 q 622 824 622 928 q 563 666 622 739 q 431 556 516 608 l 621 326 q 649 407 639 361 q 663 493 653 426 l 781 493 q 703 229 781 352 l 894 0 m 504 818 q 468 908 504 877 q 384 940 433 940 q 293 907 331 940 q 255 818 255 875 q 289 714 255 767 q 363 628 313 678 q 477 729 446 682 q 504 818 504 771 m 556 209 l 314 499 q 179 395 223 449 q 135 283 135 341 q 146 222 135 253 q 183 158 158 192 q 333 80 241 80 q 556 209 448 80 "},\u039B:{x_min:0,x_max:862.5,ha:942,o:"m 862 0 l 719 0 l 426 847 l 143 0 l 0 0 l 356 1013 l 501 1013 l 862 0 "},I:{x_min:41,x_max:180,ha:293,o:"m 180 0 l 41 0 l 41 1013 l 180 1013 l 180 0 "},G:{x_min:0,x_max:921,ha:1011,o:"m 921 0 l 832 0 l 801 136 q 655 15 741 58 q 470 -28 568 -28 q 126 133 259 -28 q 0 499 0 284 q 125 881 0 731 q 486 1043 259 1043 q 763 957 647 1043 q 905 709 890 864 l 772 709 q 668 866 747 807 q 486 926 589 926 q 228 795 322 926 q 142 507 142 677 q 228 224 142 342 q 483 94 323 94 q 712 195 625 94 q 796 435 796 291 l 477 435 l 477 549 l 921 549 l 921 0 "},\u03B0:{x_min:0,x_max:617,ha:725,o:"m 524 800 l 414 800 l 414 925 l 524 925 l 524 800 m 183 800 l 73 800 l 73 925 l 183 925 l 183 800 m 617 352 q 540 93 617 199 q 308 -24 455 -24 q 76 93 161 -24 q 0 352 0 199 l 0 738 l 126 738 l 126 354 q 169 185 126 257 q 312 98 220 98 q 451 185 402 98 q 492 354 492 257 l 492 738 l 617 738 l 617 352 m 489 1040 l 300 819 l 216 819 l 351 1040 l 489 1040 "},"`":{x_min:0,x_max:138.890625,ha:236,o:"m 138 699 l 0 699 l 0 861 q 36 974 0 929 q 138 1041 72 1020 l 138 977 q 82 931 95 969 q 69 839 69 893 l 138 839 l 138 699 "},"\xB7":{x_min:0,x_max:142,ha:239,o:"m 142 585 l 0 585 l 0 738 l 142 738 l 142 585 "},\u03A5:{x_min:.328125,x_max:819.515625,ha:889,o:"m 819 1013 l 482 416 l 482 0 l 342 0 l 342 416 l 0 1013 l 140 1013 l 411 533 l 679 1013 l 819 1013 "},r:{x_min:0,x_max:355.5625,ha:432,o:"m 355 621 l 343 621 q 179 569 236 621 q 122 411 122 518 l 122 0 l 0 0 l 0 737 l 117 737 l 117 604 q 204 719 146 686 q 355 753 262 753 l 355 621 "},x:{x_min:0,x_max:675,ha:764,o:"m 675 0 l 525 0 l 331 286 l 144 0 l 0 0 l 256 379 l 12 738 l 157 737 l 336 473 l 516 738 l 661 738 l 412 380 l 675 0 "},\u03BC:{x_min:0,x_max:696.609375,ha:747,o:"m 696 -4 q 628 -14 657 -14 q 498 97 513 -14 q 422 8 470 41 q 313 -24 374 -24 q 207 3 258 -24 q 120 80 157 31 l 120 -278 l 0 -278 l 0 738 l 124 738 l 124 343 q 165 172 124 246 q 308 82 216 82 q 451 177 402 82 q 492 358 492 254 l 492 738 l 616 738 l 616 214 q 623 136 616 160 q 673 92 636 92 q 696 95 684 92 l 696 -4 "},h:{x_min:0,x_max:615,ha:724,o:"m 615 472 l 615 0 l 490 0 l 490 454 q 456 590 490 535 q 338 654 416 654 q 186 588 251 654 q 122 436 122 522 l 122 0 l 0 0 l 0 1013 l 122 1013 l 122 633 q 218 727 149 694 q 362 760 287 760 q 552 676 484 760 q 615 472 615 600 "},".":{x_min:0,x_max:142,ha:239,o:"m 142 0 l 0 0 l 0 151 l 142 151 l 142 0 "},\u03C6:{x_min:-2,x_max:878,ha:974,o:"m 496 -279 l 378 -279 l 378 -17 q 101 88 204 -17 q -2 367 -2 194 q 68 626 -2 510 q 283 758 151 758 l 283 646 q 167 537 209 626 q 133 373 133 462 q 192 177 133 254 q 378 93 259 93 l 378 758 q 445 764 426 763 q 476 765 464 765 q 765 659 653 765 q 878 377 878 553 q 771 96 878 209 q 496 -17 665 -17 l 496 -279 m 496 93 l 514 93 q 687 183 623 93 q 746 380 746 265 q 691 569 746 491 q 522 658 629 658 l 496 656 l 496 93 "},";":{x_min:0,x_max:142,ha:239,o:"m 142 585 l 0 585 l 0 738 l 142 738 l 142 585 m 142 -12 q 105 -132 142 -82 q 0 -206 68 -182 l 0 -138 q 58 -82 43 -123 q 68 0 68 -56 l 0 0 l 0 151 l 142 151 l 142 -12 "},f:{x_min:0,x_max:378,ha:472,o:"m 378 638 l 246 638 l 246 0 l 121 0 l 121 638 l 0 638 l 0 738 l 121 738 q 137 935 121 887 q 290 1028 171 1028 q 320 1027 305 1028 q 378 1021 334 1026 l 378 908 q 323 918 346 918 q 257 870 273 918 q 246 780 246 840 l 246 738 l 378 738 l 378 638 "},"\u201C":{x_min:1,x_max:348.21875,ha:454,o:"m 140 670 l 1 670 l 1 830 q 37 943 1 897 q 140 1011 74 990 l 140 947 q 82 900 97 940 q 68 810 68 861 l 140 810 l 140 670 m 348 670 l 209 670 l 209 830 q 245 943 209 897 q 348 1011 282 990 l 348 947 q 290 900 305 940 q 276 810 276 861 l 348 810 l 348 670 "},A:{x_min:.03125,x_max:906.953125,ha:1008,o:"m 906 0 l 756 0 l 648 303 l 251 303 l 142 0 l 0 0 l 376 1013 l 529 1013 l 906 0 m 610 421 l 452 867 l 293 421 l 610 421 "},"6":{x_min:53,x_max:739,ha:792,o:"m 739 312 q 633 62 739 162 q 400 -31 534 -31 q 162 78 257 -31 q 53 439 53 206 q 178 859 53 712 q 441 986 284 986 q 643 912 559 986 q 732 713 732 833 l 601 713 q 544 830 594 786 q 426 875 494 875 q 268 793 331 875 q 193 517 193 697 q 301 597 240 570 q 427 624 362 624 q 643 540 552 624 q 739 312 739 451 m 603 298 q 540 461 603 400 q 404 516 484 516 q 268 461 323 516 q 207 300 207 401 q 269 137 207 198 q 405 83 325 83 q 541 137 486 83 q 603 298 603 197 "},"\u2018":{x_min:1,x_max:139.890625,ha:236,o:"m 139 670 l 1 670 l 1 830 q 37 943 1 897 q 139 1011 74 990 l 139 947 q 82 900 97 940 q 68 810 68 861 l 139 810 l 139 670 "},\u03CA:{x_min:-70,x_max:283,ha:361,o:"m 283 800 l 173 800 l 173 925 l 283 925 l 283 800 m 40 800 l -70 800 l -70 925 l 40 925 l 40 800 m 283 3 q 232 -10 257 -5 q 181 -15 206 -15 q 84 26 118 -15 q 41 200 41 79 l 41 737 l 166 737 l 167 215 q 171 141 167 157 q 225 101 182 101 q 247 103 238 101 q 283 112 256 104 l 283 3 "},\u03C0:{x_min:-.21875,x_max:773.21875,ha:857,o:"m 773 -7 l 707 -11 q 575 40 607 -11 q 552 174 552 77 l 552 226 l 552 626 l 222 626 l 222 0 l 97 0 l 97 626 l 0 626 l 0 737 l 773 737 l 773 626 l 676 626 l 676 171 q 695 103 676 117 q 773 90 714 90 l 773 -7 "},\u03AC:{x_min:0,x_max:765.5625,ha:809,o:"m 765 -4 q 698 -14 726 -14 q 564 97 586 -14 q 466 7 525 40 q 337 -26 407 -26 q 88 98 186 -26 q 0 369 0 212 q 88 637 0 525 q 337 760 184 760 q 465 727 407 760 q 563 637 524 695 l 563 738 l 685 738 l 685 222 q 693 141 685 168 q 748 94 708 94 q 765 95 760 94 l 765 -4 m 584 371 q 531 562 584 485 q 360 653 470 653 q 192 566 254 653 q 135 379 135 489 q 186 181 135 261 q 358 84 247 84 q 528 176 465 84 q 584 371 584 260 m 604 1040 l 415 819 l 332 819 l 466 1040 l 604 1040 "},O:{x_min:0,x_max:958,ha:1057,o:"m 485 1041 q 834 882 702 1041 q 958 512 958 734 q 834 136 958 287 q 481 -26 702 -26 q 126 130 261 -26 q 0 504 0 279 q 127 880 0 728 q 485 1041 263 1041 m 480 98 q 731 225 638 98 q 815 504 815 340 q 733 783 815 669 q 480 912 640 912 q 226 784 321 912 q 142 504 142 670 q 226 224 142 339 q 480 98 319 98 "},n:{x_min:0,x_max:615,ha:724,o:"m 615 463 l 615 0 l 490 0 l 490 454 q 453 592 490 537 q 331 656 410 656 q 178 585 240 656 q 117 421 117 514 l 117 0 l 0 0 l 0 738 l 117 738 l 117 630 q 218 728 150 693 q 359 764 286 764 q 552 675 484 764 q 615 463 615 593 "},"3":{x_min:54,x_max:737,ha:792,o:"m 737 284 q 635 55 737 141 q 399 -25 541 -25 q 156 52 248 -25 q 54 308 54 140 l 185 308 q 245 147 185 202 q 395 96 302 96 q 539 140 484 96 q 602 280 602 190 q 510 429 602 390 q 324 454 451 454 l 324 565 q 487 584 441 565 q 565 719 565 617 q 515 835 565 791 q 395 879 466 879 q 255 824 307 879 q 203 661 203 769 l 78 661 q 166 909 78 822 q 387 992 250 992 q 603 921 513 992 q 701 723 701 844 q 669 607 701 656 q 578 524 637 558 q 696 434 655 499 q 737 284 737 369 "},"9":{x_min:53,x_max:739,ha:792,o:"m 739 524 q 619 94 739 241 q 362 -32 516 -32 q 150 47 242 -32 q 59 244 59 126 l 191 244 q 246 129 191 176 q 373 82 301 82 q 526 161 466 82 q 597 440 597 255 q 363 334 501 334 q 130 432 216 334 q 53 650 53 521 q 134 880 53 786 q 383 986 226 986 q 659 841 566 986 q 739 524 739 719 m 388 449 q 535 514 480 449 q 585 658 585 573 q 535 805 585 744 q 388 873 480 873 q 242 809 294 873 q 191 658 191 745 q 239 514 191 572 q 388 449 292 449 "},l:{x_min:41,x_max:166,ha:279,o:"m 166 0 l 41 0 l 41 1013 l 166 1013 l 166 0 "},"\xA4":{x_min:40.09375,x_max:728.796875,ha:825,o:"m 728 304 l 649 224 l 512 363 q 383 331 458 331 q 256 363 310 331 l 119 224 l 40 304 l 177 441 q 150 553 150 493 q 184 673 150 621 l 40 818 l 119 898 l 267 749 q 321 766 291 759 q 384 773 351 773 q 447 766 417 773 q 501 749 477 759 l 649 898 l 728 818 l 585 675 q 612 618 604 648 q 621 553 621 587 q 591 441 621 491 l 728 304 m 384 682 q 280 643 318 682 q 243 551 243 604 q 279 461 243 499 q 383 423 316 423 q 487 461 449 423 q 525 553 525 500 q 490 641 525 605 q 384 682 451 682 "},\u03BA:{x_min:0,x_max:632.328125,ha:679,o:"m 632 0 l 482 0 l 225 384 l 124 288 l 124 0 l 0 0 l 0 738 l 124 738 l 124 446 l 433 738 l 596 738 l 312 466 l 632 0 "},"4":{x_min:48,x_max:742.453125,ha:792,o:"m 742 243 l 602 243 l 602 0 l 476 0 l 476 243 l 48 243 l 48 368 l 476 958 l 602 958 l 602 354 l 742 354 l 742 243 m 476 354 l 476 792 l 162 354 l 476 354 "},p:{x_min:0,x_max:685,ha:786,o:"m 685 364 q 598 96 685 205 q 350 -23 504 -23 q 121 89 205 -23 l 121 -278 l 0 -278 l 0 738 l 121 738 l 121 633 q 220 726 159 691 q 351 761 280 761 q 598 636 504 761 q 685 364 685 522 m 557 371 q 501 560 557 481 q 330 651 437 651 q 162 559 223 651 q 108 366 108 479 q 162 177 108 254 q 333 87 224 87 q 502 178 441 87 q 557 371 557 258 "},"\u2021":{x_min:0,x_max:777,ha:835,o:"m 458 238 l 458 0 l 319 0 l 319 238 l 0 238 l 0 360 l 319 360 l 319 681 l 0 683 l 0 804 l 319 804 l 319 1015 l 458 1013 l 458 804 l 777 804 l 777 683 l 458 683 l 458 360 l 777 360 l 777 238 l 458 238 "},\u03C8:{x_min:0,x_max:808,ha:907,o:"m 465 -278 l 341 -278 l 341 -15 q 87 102 180 -15 q 0 378 0 210 l 0 739 l 133 739 l 133 379 q 182 195 133 275 q 341 98 242 98 l 341 922 l 465 922 l 465 98 q 623 195 563 98 q 675 382 675 278 l 675 742 l 808 742 l 808 381 q 720 104 808 213 q 466 -13 627 -13 l 465 -278 "},\u03B7:{x_min:.78125,x_max:697,ha:810,o:"m 697 -278 l 572 -278 l 572 454 q 540 587 572 536 q 425 650 501 650 q 271 579 337 650 q 206 420 206 509 l 206 0 l 81 0 l 81 489 q 73 588 81 562 q 0 644 56 644 l 0 741 q 68 755 38 755 q 158 720 124 755 q 200 630 193 686 q 297 726 234 692 q 434 761 359 761 q 620 692 544 761 q 697 516 697 624 l 697 -278 "}},cssFontWeight:"normal",ascender:1189,underlinePosition:-100,cssFontStyle:"normal",boundingBox:{yMin:-334,xMin:-111,yMax:1189,xMax:1672},resolution:1e3,original_font_information:{postscript_name:"Helvetiker-Regular",version_string:"Version 1.00 2004 initial release",vendor_url:"http://www.magenta.gr/",full_font_name:"Helvetiker",font_family_name:"Helvetiker",copyright:"Copyright (c) \u039Cagenta ltd, 2004",description:"",trademark:"",designer:"",designer_url:"",unique_font_identifier:"\u039Cagenta ltd:Helvetiker:22-10-104",license_url:"http://www.ellak.gr/fonts/MgOpen/license.html",license_description:`Copyright (c) 2004 by MAGENTA Ltd. All Rights Reserved.\r
3654
+ `}}};var qa=class{constructor(o){this.isFont=!0,this.type="Font",this.data=o}generateShapes(o,t=100,i="ltr"){let n=[],r=_9(o,t,this.data,i);for(let a=0,s=r.length;a<s;a++)n.push(...r[a].toShapes());return n}};function _9(e,o,t,i){let n=Array.from(e),r=o/t.resolution,a=(t.boundingBox.yMax-t.boundingBox.yMin+t.underlineThickness)*r,s=[],l=0,d=0;(i=="rtl"||i=="tb")&&n.reverse();for(let c=0;c<n.length;c++){let u=n[c];if(u===`
3655
+ `)l=0,d-=a;else{let m=E9(u,r,l,d,t);i=="tb"?(l=0,d+=t.ascender*r):l+=m.offsetX,s.push(m.path)}}return s}function E9(e,o,t,i,n){let r=n.glyphs[e]||n.glyphs["?"];if(!r){console.error('THREE.Font: character "'+e+'" does not exists in font family '+n.familyName+".");return}let a=new Di,s,l,d,c,u,m,g,b;if(r.o){let y=r._cachedOutline||(r._cachedOutline=r.o.split(" "));for(let q=0,D=y.length;q<D;)switch(y[q++]){case"m":s=y[q++]*o+t,l=y[q++]*o+i,a.moveTo(s,l);break;case"l":s=y[q++]*o+t,l=y[q++]*o+i,a.lineTo(s,l);break;case"q":d=y[q++]*o+t,c=y[q++]*o+i,u=y[q++]*o+t,m=y[q++]*o+i,a.quadraticCurveTo(u,m,d,c);break;case"b":d=y[q++]*o+t,c=y[q++]*o+i,u=y[q++]*o+t,m=y[q++]*o+i,g=y[q++]*o+t,b=y[q++]*o+i,a.bezierCurveTo(u,m,g,b,d,c);break}}return{offsetX:r.ha*o,path:a}}var Uu={glyphs:{\u03BF:{x_min:0,x_max:712,ha:815,o:"m 356 -25 q 96 88 192 -25 q 0 368 0 201 q 92 642 0 533 q 356 761 192 761 q 617 644 517 761 q 712 368 712 533 q 619 91 712 201 q 356 -25 520 -25 m 356 85 q 527 175 465 85 q 583 369 583 255 q 528 562 583 484 q 356 651 466 651 q 189 560 250 651 q 135 369 135 481 q 187 177 135 257 q 356 85 250 85 "},S:{x_min:0,x_max:788,ha:890,o:"m 788 291 q 662 54 788 144 q 397 -26 550 -26 q 116 68 226 -26 q 0 337 0 168 l 131 337 q 200 152 131 220 q 384 85 269 85 q 557 129 479 85 q 650 270 650 183 q 490 429 650 379 q 194 513 341 470 q 33 739 33 584 q 142 964 33 881 q 388 1041 242 1041 q 644 957 543 1041 q 756 716 756 867 l 625 716 q 561 874 625 816 q 395 933 497 933 q 243 891 309 933 q 164 759 164 841 q 325 609 164 656 q 625 526 475 568 q 788 291 788 454 "},"\xA6":{x_min:343,x_max:449,ha:792,o:"m 449 462 l 343 462 l 343 986 l 449 986 l 449 462 m 449 -242 l 343 -242 l 343 280 l 449 280 l 449 -242 "},"/":{x_min:183.25,x_max:608.328125,ha:792,o:"m 608 1041 l 266 -129 l 183 -129 l 520 1041 l 608 1041 "},\u03A4:{x_min:-.4375,x_max:777.453125,ha:839,o:"m 777 893 l 458 893 l 458 0 l 319 0 l 319 892 l 0 892 l 0 1013 l 777 1013 l 777 893 "},y:{x_min:0,x_max:684.78125,ha:771,o:"m 684 738 l 388 -83 q 311 -216 356 -167 q 173 -279 252 -279 q 97 -266 133 -279 l 97 -149 q 132 -155 109 -151 q 168 -160 155 -160 q 240 -114 213 -160 q 274 -26 248 -98 l 0 738 l 137 737 l 341 139 l 548 737 l 684 738 "},\u03A0:{x_min:0,x_max:803,ha:917,o:"m 803 0 l 667 0 l 667 886 l 140 886 l 140 0 l 0 0 l 0 1012 l 803 1012 l 803 0 "},\u0390:{x_min:-111,x_max:339,ha:361,o:"m 339 800 l 229 800 l 229 925 l 339 925 l 339 800 m -1 800 l -111 800 l -111 925 l -1 925 l -1 800 m 284 3 q 233 -10 258 -5 q 182 -15 207 -15 q 85 26 119 -15 q 42 200 42 79 l 42 737 l 167 737 l 168 215 q 172 141 168 157 q 226 101 183 101 q 248 103 239 101 q 284 112 257 104 l 284 3 m 302 1040 l 113 819 l 30 819 l 165 1040 l 302 1040 "},g:{x_min:0,x_max:686,ha:838,o:"m 686 34 q 586 -213 686 -121 q 331 -306 487 -306 q 131 -252 216 -306 q 31 -84 31 -190 l 155 -84 q 228 -174 166 -138 q 345 -207 284 -207 q 514 -109 454 -207 q 564 89 564 -27 q 461 6 521 36 q 335 -23 401 -23 q 88 100 184 -23 q 0 370 0 215 q 87 634 0 522 q 330 758 183 758 q 457 728 398 758 q 564 644 515 699 l 564 737 l 686 737 l 686 34 m 582 367 q 529 560 582 481 q 358 652 468 652 q 189 561 250 652 q 135 369 135 482 q 189 176 135 255 q 361 85 251 85 q 529 176 468 85 q 582 367 582 255 "},"\xB2":{x_min:0,x_max:442,ha:539,o:"m 442 383 l 0 383 q 91 566 0 492 q 260 668 176 617 q 354 798 354 727 q 315 875 354 845 q 227 905 277 905 q 136 869 173 905 q 99 761 99 833 l 14 761 q 82 922 14 864 q 232 974 141 974 q 379 926 316 974 q 442 797 442 878 q 351 635 442 704 q 183 539 321 611 q 92 455 92 491 l 442 455 l 442 383 "},"\u2013":{x_min:0,x_max:705.5625,ha:803,o:"m 705 334 l 0 334 l 0 410 l 705 410 l 705 334 "},\u039A:{x_min:0,x_max:819.5625,ha:893,o:"m 819 0 l 650 0 l 294 509 l 139 356 l 139 0 l 0 0 l 0 1013 l 139 1013 l 139 526 l 626 1013 l 809 1013 l 395 600 l 819 0 "},\u0192:{x_min:-46.265625,x_max:392,ha:513,o:"m 392 651 l 259 651 l 79 -279 l -46 -278 l 134 651 l 14 651 l 14 751 l 135 751 q 151 948 135 900 q 304 1041 185 1041 q 334 1040 319 1041 q 392 1034 348 1039 l 392 922 q 337 931 360 931 q 271 883 287 931 q 260 793 260 853 l 260 751 l 392 751 l 392 651 "},e:{x_min:0,x_max:714,ha:813,o:"m 714 326 l 140 326 q 200 157 140 227 q 359 87 260 87 q 488 130 431 87 q 561 245 545 174 l 697 245 q 577 48 670 123 q 358 -26 484 -26 q 97 85 195 -26 q 0 363 0 197 q 94 642 0 529 q 358 765 195 765 q 626 627 529 765 q 714 326 714 503 m 576 429 q 507 583 564 522 q 355 650 445 650 q 206 583 266 650 q 140 429 152 522 l 576 429 "},\u03CC:{x_min:0,x_max:712,ha:815,o:"m 356 -25 q 94 91 194 -25 q 0 368 0 202 q 92 642 0 533 q 356 761 192 761 q 617 644 517 761 q 712 368 712 533 q 619 91 712 201 q 356 -25 520 -25 m 356 85 q 527 175 465 85 q 583 369 583 255 q 528 562 583 484 q 356 651 466 651 q 189 560 250 651 q 135 369 135 481 q 187 177 135 257 q 356 85 250 85 m 576 1040 l 387 819 l 303 819 l 438 1040 l 576 1040 "},J:{x_min:0,x_max:588,ha:699,o:"m 588 279 q 287 -26 588 -26 q 58 73 126 -26 q 0 327 0 158 l 133 327 q 160 172 133 227 q 288 96 198 96 q 426 171 391 96 q 449 336 449 219 l 449 1013 l 588 1013 l 588 279 "},"\xBB":{x_min:-1,x_max:503,ha:601,o:"m 503 302 l 280 136 l 281 256 l 429 373 l 281 486 l 280 608 l 503 440 l 503 302 m 221 302 l 0 136 l 0 255 l 145 372 l 0 486 l -1 608 l 221 440 l 221 302 "},"\xA9":{x_min:-3,x_max:1008,ha:1106,o:"m 502 -7 q 123 151 263 -7 q -3 501 -3 294 q 123 851 -3 706 q 502 1011 263 1011 q 881 851 739 1011 q 1008 501 1008 708 q 883 151 1008 292 q 502 -7 744 -7 m 502 60 q 830 197 709 60 q 940 501 940 322 q 831 805 940 681 q 502 944 709 944 q 174 805 296 944 q 65 501 65 680 q 173 197 65 320 q 502 60 294 60 m 741 394 q 661 246 731 302 q 496 190 591 190 q 294 285 369 190 q 228 497 228 370 q 295 714 228 625 q 499 813 370 813 q 656 762 588 813 q 733 625 724 711 l 634 625 q 589 704 629 673 q 498 735 550 735 q 377 666 421 735 q 334 504 334 597 q 374 340 334 408 q 490 272 415 272 q 589 304 549 272 q 638 394 628 337 l 741 394 "},\u03CE:{x_min:0,x_max:922,ha:1030,o:"m 687 1040 l 498 819 l 415 819 l 549 1040 l 687 1040 m 922 339 q 856 97 922 203 q 650 -26 780 -26 q 538 9 587 -26 q 461 103 489 44 q 387 12 436 46 q 277 -22 339 -22 q 69 97 147 -22 q 0 338 0 202 q 45 551 0 444 q 161 737 84 643 l 302 737 q 175 552 219 647 q 124 336 124 446 q 155 179 124 248 q 275 88 197 88 q 375 163 341 88 q 400 294 400 219 l 400 572 l 524 572 l 524 294 q 561 135 524 192 q 643 88 591 88 q 762 182 719 88 q 797 341 797 257 q 745 555 797 450 q 619 737 705 637 l 760 737 q 874 551 835 640 q 922 339 922 444 "},"^":{x_min:193.0625,x_max:598.609375,ha:792,o:"m 598 772 l 515 772 l 395 931 l 277 772 l 193 772 l 326 1013 l 462 1013 l 598 772 "},"\xAB":{x_min:0,x_max:507.203125,ha:604,o:"m 506 136 l 284 302 l 284 440 l 506 608 l 507 485 l 360 371 l 506 255 l 506 136 m 222 136 l 0 302 l 0 440 l 222 608 l 221 486 l 73 373 l 222 256 l 222 136 "},D:{x_min:0,x_max:828,ha:935,o:"m 389 1013 q 714 867 593 1013 q 828 521 828 729 q 712 161 828 309 q 382 0 587 0 l 0 0 l 0 1013 l 389 1013 m 376 124 q 607 247 523 124 q 681 510 681 355 q 607 771 681 662 q 376 896 522 896 l 139 896 l 139 124 l 376 124 "},"\u2219":{x_min:0,x_max:142,ha:239,o:"m 142 585 l 0 585 l 0 738 l 142 738 l 142 585 "},\u00FF:{x_min:0,x_max:47,ha:125,o:"m 47 3 q 37 -7 47 -7 q 28 0 30 -7 q 39 -4 32 -4 q 45 3 45 -1 l 37 0 q 28 9 28 0 q 39 19 28 19 l 47 16 l 47 19 l 47 3 m 37 1 q 44 8 44 1 q 37 16 44 16 q 30 8 30 16 q 37 1 30 1 m 26 1 l 23 22 l 14 0 l 3 22 l 3 3 l 0 25 l 13 1 l 22 25 l 26 1 "},w:{x_min:0,x_max:1009.71875,ha:1100,o:"m 1009 738 l 783 0 l 658 0 l 501 567 l 345 0 l 222 0 l 0 738 l 130 738 l 284 174 l 432 737 l 576 738 l 721 173 l 881 737 l 1009 738 "},$:{x_min:0,x_max:700,ha:793,o:"m 664 717 l 542 717 q 490 825 531 785 q 381 872 450 865 l 381 551 q 620 446 540 522 q 700 241 700 370 q 618 45 700 116 q 381 -25 536 -25 l 381 -152 l 307 -152 l 307 -25 q 81 62 162 -25 q 0 297 0 149 l 124 297 q 169 146 124 204 q 307 81 215 89 l 307 441 q 80 536 148 469 q 13 725 13 603 q 96 910 13 839 q 307 982 180 982 l 307 1077 l 381 1077 l 381 982 q 574 917 494 982 q 664 717 664 845 m 307 565 l 307 872 q 187 831 233 872 q 142 724 142 791 q 180 618 142 656 q 307 565 218 580 m 381 76 q 562 237 562 96 q 517 361 562 313 q 381 423 472 409 l 381 76 "},"\\":{x_min:-.015625,x_max:425.0625,ha:522,o:"m 425 -129 l 337 -129 l 0 1041 l 83 1041 l 425 -129 "},\u00B5:{x_min:0,x_max:697.21875,ha:747,o:"m 697 -4 q 629 -14 658 -14 q 498 97 513 -14 q 422 9 470 41 q 313 -23 374 -23 q 207 4 258 -23 q 119 81 156 32 l 119 -278 l 0 -278 l 0 738 l 124 738 l 124 343 q 165 173 124 246 q 308 83 216 83 q 452 178 402 83 q 493 359 493 255 l 493 738 l 617 738 l 617 214 q 623 136 617 160 q 673 92 637 92 q 697 96 684 92 l 697 -4 "},\u0399:{x_min:42,x_max:181,ha:297,o:"m 181 0 l 42 0 l 42 1013 l 181 1013 l 181 0 "},\u038E:{x_min:0,x_max:1144.5,ha:1214,o:"m 1144 1012 l 807 416 l 807 0 l 667 0 l 667 416 l 325 1012 l 465 1012 l 736 533 l 1004 1012 l 1144 1012 m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 "},"\u2019":{x_min:0,x_max:139,ha:236,o:"m 139 851 q 102 737 139 784 q 0 669 65 690 l 0 734 q 59 787 42 741 q 72 873 72 821 l 0 873 l 0 1013 l 139 1013 l 139 851 "},\u039D:{x_min:0,x_max:801,ha:915,o:"m 801 0 l 651 0 l 131 822 l 131 0 l 0 0 l 0 1013 l 151 1013 l 670 191 l 670 1013 l 801 1013 l 801 0 "},"-":{x_min:8.71875,x_max:350.390625,ha:478,o:"m 350 317 l 8 317 l 8 428 l 350 428 l 350 317 "},Q:{x_min:0,x_max:968,ha:1072,o:"m 954 5 l 887 -79 l 744 35 q 622 -11 687 2 q 483 -26 556 -26 q 127 130 262 -26 q 0 504 0 279 q 127 880 0 728 q 484 1041 262 1041 q 841 884 708 1041 q 968 507 968 735 q 933 293 968 398 q 832 104 899 188 l 954 5 m 723 191 q 802 330 777 248 q 828 499 828 412 q 744 790 828 673 q 483 922 650 922 q 228 791 322 922 q 142 505 142 673 q 227 221 142 337 q 487 91 323 91 q 632 123 566 91 l 520 215 l 587 301 l 723 191 "},\u03C2:{x_min:1,x_max:676.28125,ha:740,o:"m 676 460 l 551 460 q 498 595 542 546 q 365 651 448 651 q 199 578 263 651 q 136 401 136 505 q 266 178 136 241 q 508 106 387 142 q 640 -50 640 62 q 625 -158 640 -105 q 583 -278 611 -211 l 465 -278 q 498 -182 490 -211 q 515 -80 515 -126 q 381 12 515 -15 q 134 91 197 51 q 1 388 1 179 q 100 651 1 542 q 354 761 199 761 q 587 680 498 761 q 676 460 676 599 "},M:{x_min:0,x_max:954,ha:1067,o:"m 954 0 l 819 0 l 819 869 l 537 0 l 405 0 l 128 866 l 128 0 l 0 0 l 0 1013 l 200 1013 l 472 160 l 757 1013 l 954 1013 l 954 0 "},\u03A8:{x_min:0,x_max:1006,ha:1094,o:"m 1006 678 q 914 319 1006 429 q 571 200 814 200 l 571 0 l 433 0 l 433 200 q 92 319 194 200 q 0 678 0 429 l 0 1013 l 139 1013 l 139 679 q 191 417 139 492 q 433 326 255 326 l 433 1013 l 571 1013 l 571 326 l 580 326 q 813 423 747 326 q 868 679 868 502 l 868 1013 l 1006 1013 l 1006 678 "},C:{x_min:0,x_max:886,ha:944,o:"m 886 379 q 760 87 886 201 q 455 -26 634 -26 q 112 136 236 -26 q 0 509 0 283 q 118 882 0 737 q 469 1041 245 1041 q 748 955 630 1041 q 879 708 879 859 l 745 708 q 649 862 724 805 q 473 920 573 920 q 219 791 312 920 q 136 509 136 675 q 217 229 136 344 q 470 99 311 99 q 672 179 591 99 q 753 379 753 259 l 886 379 "},"!":{x_min:0,x_max:138,ha:236,o:"m 138 684 q 116 409 138 629 q 105 244 105 299 l 33 244 q 16 465 33 313 q 0 684 0 616 l 0 1013 l 138 1013 l 138 684 m 138 0 l 0 0 l 0 151 l 138 151 l 138 0 "},"{":{x_min:0,x_max:480.5625,ha:578,o:"m 480 -286 q 237 -213 303 -286 q 187 -45 187 -159 q 194 48 187 -15 q 201 141 201 112 q 164 264 201 225 q 0 314 118 314 l 0 417 q 164 471 119 417 q 201 605 201 514 q 199 665 201 644 q 193 772 193 769 q 241 941 193 887 q 480 1015 308 1015 l 480 915 q 336 866 375 915 q 306 742 306 828 q 310 662 306 717 q 314 577 314 606 q 288 452 314 500 q 176 365 256 391 q 289 275 257 337 q 314 143 314 226 q 313 84 314 107 q 310 -11 310 -5 q 339 -131 310 -94 q 480 -182 377 -182 l 480 -286 "},X:{x_min:-.015625,x_max:854.15625,ha:940,o:"m 854 0 l 683 0 l 423 409 l 166 0 l 0 0 l 347 519 l 18 1013 l 186 1013 l 428 637 l 675 1013 l 836 1013 l 504 520 l 854 0 "},"#":{x_min:0,x_max:963.890625,ha:1061,o:"m 963 690 l 927 590 l 719 590 l 655 410 l 876 410 l 840 310 l 618 310 l 508 -3 l 393 -2 l 506 309 l 329 310 l 215 -2 l 102 -3 l 212 310 l 0 310 l 36 410 l 248 409 l 312 590 l 86 590 l 120 690 l 347 690 l 459 1006 l 573 1006 l 462 690 l 640 690 l 751 1006 l 865 1006 l 754 690 l 963 690 m 606 590 l 425 590 l 362 410 l 543 410 l 606 590 "},\u03B9:{x_min:42,x_max:284,ha:361,o:"m 284 3 q 233 -10 258 -5 q 182 -15 207 -15 q 85 26 119 -15 q 42 200 42 79 l 42 738 l 167 738 l 168 215 q 172 141 168 157 q 226 101 183 101 q 248 103 239 101 q 284 112 257 104 l 284 3 "},\u0386:{x_min:0,x_max:906.953125,ha:982,o:"m 283 1040 l 88 799 l 5 799 l 145 1040 l 283 1040 m 906 0 l 756 0 l 650 303 l 251 303 l 143 0 l 0 0 l 376 1012 l 529 1012 l 906 0 m 609 421 l 452 866 l 293 421 l 609 421 "},")":{x_min:0,x_max:318,ha:415,o:"m 318 365 q 257 25 318 191 q 87 -290 197 -141 l 0 -290 q 140 21 93 -128 q 193 360 193 189 q 141 704 193 537 q 0 1024 97 850 l 87 1024 q 257 706 197 871 q 318 365 318 542 "},\u03B5:{x_min:0,x_max:634.71875,ha:714,o:"m 634 234 q 527 38 634 110 q 300 -25 433 -25 q 98 29 183 -25 q 0 204 0 93 q 37 314 0 265 q 128 390 67 353 q 56 460 82 419 q 26 555 26 505 q 114 712 26 654 q 295 763 191 763 q 499 700 416 763 q 589 515 589 631 l 478 515 q 419 618 464 580 q 307 657 374 657 q 207 630 253 657 q 151 547 151 598 q 238 445 151 469 q 389 434 280 434 l 389 331 l 349 331 q 206 315 255 331 q 125 210 125 287 q 183 107 125 145 q 302 76 233 76 q 436 117 379 76 q 509 234 493 159 l 634 234 "},\u0394:{x_min:0,x_max:952.78125,ha:1028,o:"m 952 0 l 0 0 l 400 1013 l 551 1013 l 952 0 m 762 124 l 476 867 l 187 124 l 762 124 "},"}":{x_min:0,x_max:481,ha:578,o:"m 481 314 q 318 262 364 314 q 282 136 282 222 q 284 65 282 97 q 293 -58 293 -48 q 241 -217 293 -166 q 0 -286 174 -286 l 0 -182 q 143 -130 105 -182 q 171 -2 171 -93 q 168 81 171 22 q 165 144 165 140 q 188 275 165 229 q 306 365 220 339 q 191 455 224 391 q 165 588 165 505 q 168 681 165 624 q 171 742 171 737 q 141 865 171 827 q 0 915 102 915 l 0 1015 q 243 942 176 1015 q 293 773 293 888 q 287 675 293 741 q 282 590 282 608 q 318 466 282 505 q 481 417 364 417 l 481 314 "},"\u2030":{x_min:-3,x_max:1672,ha:1821,o:"m 846 0 q 664 76 732 0 q 603 244 603 145 q 662 412 603 344 q 846 489 729 489 q 1027 412 959 489 q 1089 244 1089 343 q 1029 76 1089 144 q 846 0 962 0 m 845 103 q 945 143 910 103 q 981 243 981 184 q 947 340 981 301 q 845 385 910 385 q 745 342 782 385 q 709 243 709 300 q 742 147 709 186 q 845 103 781 103 m 888 986 l 284 -25 l 199 -25 l 803 986 l 888 986 m 241 468 q 58 545 126 468 q -3 715 -3 615 q 56 881 -3 813 q 238 958 124 958 q 421 881 353 958 q 483 712 483 813 q 423 544 483 612 q 241 468 356 468 m 241 855 q 137 811 175 855 q 100 710 100 768 q 136 612 100 653 q 240 572 172 572 q 344 614 306 572 q 382 713 382 656 q 347 810 382 771 q 241 855 308 855 m 1428 0 q 1246 76 1314 0 q 1185 244 1185 145 q 1244 412 1185 344 q 1428 489 1311 489 q 1610 412 1542 489 q 1672 244 1672 343 q 1612 76 1672 144 q 1428 0 1545 0 m 1427 103 q 1528 143 1492 103 q 1564 243 1564 184 q 1530 340 1564 301 q 1427 385 1492 385 q 1327 342 1364 385 q 1291 243 1291 300 q 1324 147 1291 186 q 1427 103 1363 103 "},a:{x_min:0,x_max:698.609375,ha:794,o:"m 698 0 q 661 -12 679 -7 q 615 -17 643 -17 q 536 12 564 -17 q 500 96 508 41 q 384 6 456 37 q 236 -25 312 -25 q 65 31 130 -25 q 0 194 0 88 q 118 390 0 334 q 328 435 180 420 q 488 483 476 451 q 495 523 495 504 q 442 619 495 584 q 325 654 389 654 q 209 617 257 654 q 152 513 161 580 l 33 513 q 123 705 33 633 q 332 772 207 772 q 528 712 448 772 q 617 531 617 645 l 617 163 q 624 108 617 126 q 664 90 632 90 l 698 94 l 698 0 m 491 262 l 491 372 q 272 329 350 347 q 128 201 128 294 q 166 113 128 144 q 264 83 205 83 q 414 130 346 83 q 491 262 491 183 "},"\u2014":{x_min:0,x_max:941.671875,ha:1039,o:"m 941 334 l 0 334 l 0 410 l 941 410 l 941 334 "},"=":{x_min:8.71875,x_max:780.953125,ha:792,o:"m 780 510 l 8 510 l 8 606 l 780 606 l 780 510 m 780 235 l 8 235 l 8 332 l 780 332 l 780 235 "},N:{x_min:0,x_max:801,ha:914,o:"m 801 0 l 651 0 l 131 823 l 131 0 l 0 0 l 0 1013 l 151 1013 l 670 193 l 670 1013 l 801 1013 l 801 0 "},\u03C1:{x_min:0,x_max:712,ha:797,o:"m 712 369 q 620 94 712 207 q 362 -26 521 -26 q 230 2 292 -26 q 119 83 167 30 l 119 -278 l 0 -278 l 0 362 q 91 643 0 531 q 355 764 190 764 q 617 647 517 764 q 712 369 712 536 m 583 366 q 530 559 583 480 q 359 651 469 651 q 190 562 252 651 q 135 370 135 483 q 189 176 135 257 q 359 85 250 85 q 528 175 466 85 q 583 366 583 254 "},"2":{x_min:59,x_max:731,ha:792,o:"m 731 0 l 59 0 q 197 314 59 188 q 457 487 199 315 q 598 691 598 580 q 543 819 598 772 q 411 867 488 867 q 272 811 328 867 q 209 630 209 747 l 81 630 q 182 901 81 805 q 408 986 271 986 q 629 909 536 986 q 731 694 731 826 q 613 449 731 541 q 378 316 495 383 q 201 122 235 234 l 731 122 l 731 0 "},"\xAF":{x_min:0,x_max:941.671875,ha:938,o:"m 941 1033 l 0 1033 l 0 1109 l 941 1109 l 941 1033 "},Z:{x_min:0,x_max:779,ha:849,o:"m 779 0 l 0 0 l 0 113 l 621 896 l 40 896 l 40 1013 l 779 1013 l 778 887 l 171 124 l 779 124 l 779 0 "},u:{x_min:0,x_max:617,ha:729,o:"m 617 0 l 499 0 l 499 110 q 391 10 460 45 q 246 -25 322 -25 q 61 58 127 -25 q 0 258 0 136 l 0 738 l 125 738 l 125 284 q 156 148 125 202 q 273 82 197 82 q 433 165 369 82 q 493 340 493 243 l 493 738 l 617 738 l 617 0 "},k:{x_min:0,x_max:612.484375,ha:697,o:"m 612 738 l 338 465 l 608 0 l 469 0 l 251 382 l 121 251 l 121 0 l 0 0 l 0 1013 l 121 1013 l 121 402 l 456 738 l 612 738 "},\u0397:{x_min:0,x_max:803,ha:917,o:"m 803 0 l 667 0 l 667 475 l 140 475 l 140 0 l 0 0 l 0 1013 l 140 1013 l 140 599 l 667 599 l 667 1013 l 803 1013 l 803 0 "},\u0391:{x_min:0,x_max:906.953125,ha:985,o:"m 906 0 l 756 0 l 650 303 l 251 303 l 143 0 l 0 0 l 376 1013 l 529 1013 l 906 0 m 609 421 l 452 866 l 293 421 l 609 421 "},s:{x_min:0,x_max:604,ha:697,o:"m 604 217 q 501 36 604 104 q 292 -23 411 -23 q 86 43 166 -23 q 0 238 0 114 l 121 237 q 175 122 121 164 q 300 85 223 85 q 415 112 363 85 q 479 207 479 147 q 361 309 479 276 q 140 372 141 370 q 21 544 21 426 q 111 708 21 647 q 298 761 190 761 q 492 705 413 761 q 583 531 583 643 l 462 531 q 412 625 462 594 q 298 657 363 657 q 199 636 242 657 q 143 558 143 608 q 262 454 143 486 q 484 394 479 397 q 604 217 604 341 "},B:{x_min:0,x_max:778,ha:876,o:"m 580 546 q 724 469 670 535 q 778 311 778 403 q 673 83 778 171 q 432 0 575 0 l 0 0 l 0 1013 l 411 1013 q 629 957 541 1013 q 732 768 732 892 q 691 633 732 693 q 580 546 650 572 m 393 899 l 139 899 l 139 588 l 379 588 q 521 624 462 588 q 592 744 592 667 q 531 859 592 819 q 393 899 471 899 m 419 124 q 566 169 504 124 q 635 303 635 219 q 559 436 635 389 q 402 477 494 477 l 139 477 l 139 124 l 419 124 "},"\u2026":{x_min:0,x_max:614,ha:708,o:"m 142 0 l 0 0 l 0 151 l 142 151 l 142 0 m 378 0 l 236 0 l 236 151 l 378 151 l 378 0 m 614 0 l 472 0 l 472 151 l 614 151 l 614 0 "},"?":{x_min:0,x_max:607,ha:704,o:"m 607 777 q 543 599 607 674 q 422 474 482 537 q 357 272 357 391 l 236 272 q 297 487 236 395 q 411 619 298 490 q 474 762 474 691 q 422 885 474 838 q 301 933 371 933 q 179 880 228 933 q 124 706 124 819 l 0 706 q 94 963 0 872 q 302 1044 177 1044 q 511 973 423 1044 q 607 777 607 895 m 370 0 l 230 0 l 230 151 l 370 151 l 370 0 "},H:{x_min:0,x_max:803,ha:915,o:"m 803 0 l 667 0 l 667 475 l 140 475 l 140 0 l 0 0 l 0 1013 l 140 1013 l 140 599 l 667 599 l 667 1013 l 803 1013 l 803 0 "},\u03BD:{x_min:0,x_max:675,ha:761,o:"m 675 738 l 404 0 l 272 0 l 0 738 l 133 738 l 340 147 l 541 738 l 675 738 "},c:{x_min:1,x_max:701.390625,ha:775,o:"m 701 264 q 584 53 681 133 q 353 -26 487 -26 q 91 91 188 -26 q 1 370 1 201 q 92 645 1 537 q 353 761 190 761 q 572 688 479 761 q 690 493 666 615 l 556 493 q 487 606 545 562 q 356 650 428 650 q 186 563 246 650 q 134 372 134 487 q 188 179 134 258 q 359 88 250 88 q 492 136 437 88 q 566 264 548 185 l 701 264 "},"\xB6":{x_min:0,x_max:566.671875,ha:678,o:"m 21 892 l 52 892 l 98 761 l 145 892 l 176 892 l 178 741 l 157 741 l 157 867 l 108 741 l 88 741 l 40 871 l 40 741 l 21 741 l 21 892 m 308 854 l 308 731 q 252 691 308 691 q 227 691 240 691 q 207 696 213 695 l 207 712 l 253 706 q 288 733 288 706 l 288 763 q 244 741 279 741 q 193 797 193 741 q 261 860 193 860 q 287 860 273 860 q 308 854 302 855 m 288 842 l 263 843 q 213 796 213 843 q 248 756 213 756 q 288 796 288 756 l 288 842 m 566 988 l 502 988 l 502 -1 l 439 -1 l 439 988 l 317 988 l 317 -1 l 252 -1 l 252 602 q 81 653 155 602 q 0 805 0 711 q 101 989 0 918 q 309 1053 194 1053 l 566 1053 l 566 988 "},\u03B2:{x_min:0,x_max:660,ha:745,o:"m 471 550 q 610 450 561 522 q 660 280 660 378 q 578 64 660 151 q 367 -22 497 -22 q 239 5 299 -22 q 126 82 178 32 l 126 -278 l 0 -278 l 0 593 q 54 903 0 801 q 318 1042 127 1042 q 519 964 436 1042 q 603 771 603 887 q 567 644 603 701 q 471 550 532 586 m 337 79 q 476 138 418 79 q 535 279 535 198 q 427 437 535 386 q 226 477 344 477 l 226 583 q 398 620 329 583 q 486 762 486 668 q 435 884 486 833 q 312 935 384 935 q 169 861 219 935 q 126 698 126 797 l 126 362 q 170 169 126 242 q 337 79 224 79 "},\u039C:{x_min:0,x_max:954,ha:1068,o:"m 954 0 l 819 0 l 819 868 l 537 0 l 405 0 l 128 865 l 128 0 l 0 0 l 0 1013 l 199 1013 l 472 158 l 758 1013 l 954 1013 l 954 0 "},\u038C:{x_min:.109375,x_max:1120,ha:1217,o:"m 1120 505 q 994 132 1120 282 q 642 -29 861 -29 q 290 130 422 -29 q 167 505 167 280 q 294 883 167 730 q 650 1046 430 1046 q 999 882 868 1046 q 1120 505 1120 730 m 977 504 q 896 784 977 669 q 644 915 804 915 q 391 785 484 915 q 307 504 307 669 q 391 224 307 339 q 644 95 486 95 q 894 224 803 95 q 977 504 977 339 m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 "},\u0389:{x_min:0,x_max:1158,ha:1275,o:"m 1158 0 l 1022 0 l 1022 475 l 496 475 l 496 0 l 356 0 l 356 1012 l 496 1012 l 496 599 l 1022 599 l 1022 1012 l 1158 1012 l 1158 0 m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 "},"\u2022":{x_min:0,x_max:663.890625,ha:775,o:"m 663 529 q 566 293 663 391 q 331 196 469 196 q 97 294 194 196 q 0 529 0 393 q 96 763 0 665 q 331 861 193 861 q 566 763 469 861 q 663 529 663 665 "},"\xA5":{x_min:.1875,x_max:819.546875,ha:886,o:"m 563 561 l 697 561 l 696 487 l 520 487 l 482 416 l 482 380 l 697 380 l 695 308 l 482 308 l 482 0 l 342 0 l 342 308 l 125 308 l 125 380 l 342 380 l 342 417 l 303 487 l 125 487 l 125 561 l 258 561 l 0 1013 l 140 1013 l 411 533 l 679 1013 l 819 1013 l 563 561 "},"(":{x_min:0,x_max:318.0625,ha:415,o:"m 318 -290 l 230 -290 q 61 23 122 -142 q 0 365 0 190 q 62 712 0 540 q 230 1024 119 869 l 318 1024 q 175 705 219 853 q 125 360 125 542 q 176 22 125 187 q 318 -290 223 -127 "},U:{x_min:0,x_max:796,ha:904,o:"m 796 393 q 681 93 796 212 q 386 -25 566 -25 q 101 95 208 -25 q 0 393 0 211 l 0 1013 l 138 1013 l 138 391 q 204 191 138 270 q 394 107 276 107 q 586 191 512 107 q 656 391 656 270 l 656 1013 l 796 1013 l 796 393 "},\u03B3:{x_min:.5,x_max:744.953125,ha:822,o:"m 744 737 l 463 54 l 463 -278 l 338 -278 l 338 54 l 154 495 q 104 597 124 569 q 13 651 67 651 l 0 651 l 0 751 l 39 753 q 168 711 121 753 q 242 594 207 676 l 403 208 l 617 737 l 744 737 "},\u03B1:{x_min:0,x_max:765.5625,ha:809,o:"m 765 -4 q 698 -14 726 -14 q 564 97 586 -14 q 466 7 525 40 q 337 -26 407 -26 q 88 98 186 -26 q 0 369 0 212 q 88 637 0 525 q 337 760 184 760 q 465 728 407 760 q 563 637 524 696 l 563 739 l 685 739 l 685 222 q 693 141 685 168 q 748 94 708 94 q 765 96 760 94 l 765 -4 m 584 371 q 531 562 584 485 q 360 653 470 653 q 192 566 254 653 q 135 379 135 489 q 186 181 135 261 q 358 84 247 84 q 528 176 465 84 q 584 371 584 260 "},F:{x_min:0,x_max:683.328125,ha:717,o:"m 683 888 l 140 888 l 140 583 l 613 583 l 613 458 l 140 458 l 140 0 l 0 0 l 0 1013 l 683 1013 l 683 888 "},"\xAD":{x_min:0,x_max:705.5625,ha:803,o:"m 705 334 l 0 334 l 0 410 l 705 410 l 705 334 "},":":{x_min:0,x_max:142,ha:239,o:"m 142 585 l 0 585 l 0 738 l 142 738 l 142 585 m 142 0 l 0 0 l 0 151 l 142 151 l 142 0 "},\u03A7:{x_min:0,x_max:854.171875,ha:935,o:"m 854 0 l 683 0 l 423 409 l 166 0 l 0 0 l 347 519 l 18 1013 l 186 1013 l 427 637 l 675 1013 l 836 1013 l 504 521 l 854 0 "},"*":{x_min:116,x_max:674,ha:792,o:"m 674 768 l 475 713 l 610 544 l 517 477 l 394 652 l 272 478 l 178 544 l 314 713 l 116 766 l 153 876 l 341 812 l 342 1013 l 446 1013 l 446 811 l 635 874 l 674 768 "},"\u2020":{x_min:0,x_max:777,ha:835,o:"m 458 804 l 777 804 l 777 683 l 458 683 l 458 0 l 319 0 l 319 681 l 0 683 l 0 804 l 319 804 l 319 1015 l 458 1013 l 458 804 "},"\xB0":{x_min:0,x_max:347,ha:444,o:"m 173 802 q 43 856 91 802 q 0 977 0 905 q 45 1101 0 1049 q 173 1153 90 1153 q 303 1098 255 1153 q 347 977 347 1049 q 303 856 347 905 q 173 802 256 802 m 173 884 q 238 910 214 884 q 262 973 262 937 q 239 1038 262 1012 q 173 1064 217 1064 q 108 1037 132 1064 q 85 973 85 1010 q 108 910 85 937 q 173 884 132 884 "},V:{x_min:0,x_max:862.71875,ha:940,o:"m 862 1013 l 505 0 l 361 0 l 0 1013 l 143 1013 l 434 165 l 718 1012 l 862 1013 "},\u039E:{x_min:0,x_max:734.71875,ha:763,o:"m 723 889 l 9 889 l 9 1013 l 723 1013 l 723 889 m 673 463 l 61 463 l 61 589 l 673 589 l 673 463 m 734 0 l 0 0 l 0 124 l 734 124 l 734 0 "},"\xA0":{x_min:0,x_max:0,ha:853},\u03AB:{x_min:.328125,x_max:819.515625,ha:889,o:"m 588 1046 l 460 1046 l 460 1189 l 588 1189 l 588 1046 m 360 1046 l 232 1046 l 232 1189 l 360 1189 l 360 1046 m 819 1012 l 482 416 l 482 0 l 342 0 l 342 416 l 0 1012 l 140 1012 l 411 533 l 679 1012 l 819 1012 "},"0":{x_min:73,x_max:715,ha:792,o:"m 394 -29 q 153 129 242 -29 q 73 479 73 272 q 152 829 73 687 q 394 989 241 989 q 634 829 545 989 q 715 479 715 684 q 635 129 715 270 q 394 -29 546 -29 m 394 89 q 546 211 489 89 q 598 479 598 322 q 548 748 598 640 q 394 871 491 871 q 241 748 298 871 q 190 479 190 637 q 239 211 190 319 q 394 89 296 89 "},"\u201D":{x_min:0,x_max:347,ha:454,o:"m 139 851 q 102 737 139 784 q 0 669 65 690 l 0 734 q 59 787 42 741 q 72 873 72 821 l 0 873 l 0 1013 l 139 1013 l 139 851 m 347 851 q 310 737 347 784 q 208 669 273 690 l 208 734 q 267 787 250 741 q 280 873 280 821 l 208 873 l 208 1013 l 347 1013 l 347 851 "},"@":{x_min:0,x_max:1260,ha:1357,o:"m 1098 -45 q 877 -160 1001 -117 q 633 -203 752 -203 q 155 -29 327 -203 q 0 360 0 127 q 176 802 0 616 q 687 1008 372 1008 q 1123 854 969 1008 q 1260 517 1260 718 q 1155 216 1260 341 q 868 82 1044 82 q 772 106 801 82 q 737 202 737 135 q 647 113 700 144 q 527 82 594 82 q 367 147 420 82 q 314 312 314 212 q 401 565 314 452 q 639 690 498 690 q 810 588 760 690 l 849 668 l 938 668 q 877 441 900 532 q 833 226 833 268 q 853 182 833 198 q 902 167 873 167 q 1088 272 1012 167 q 1159 512 1159 372 q 1051 793 1159 681 q 687 925 925 925 q 248 747 415 925 q 97 361 97 586 q 226 26 97 159 q 627 -122 370 -122 q 856 -87 737 -122 q 1061 8 976 -53 l 1098 -45 m 786 488 q 738 580 777 545 q 643 615 700 615 q 483 517 548 615 q 425 322 425 430 q 457 203 425 250 q 552 156 490 156 q 722 273 665 156 q 786 488 738 309 "},\u038A:{x_min:0,x_max:499,ha:613,o:"m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 m 499 0 l 360 0 l 360 1012 l 499 1012 l 499 0 "},i:{x_min:14,x_max:136,ha:275,o:"m 136 873 l 14 873 l 14 1013 l 136 1013 l 136 873 m 136 0 l 14 0 l 14 737 l 136 737 l 136 0 "},\u0392:{x_min:0,x_max:778,ha:877,o:"m 580 545 q 724 468 671 534 q 778 310 778 402 q 673 83 778 170 q 432 0 575 0 l 0 0 l 0 1013 l 411 1013 q 629 957 541 1013 q 732 768 732 891 q 691 632 732 692 q 580 545 650 571 m 393 899 l 139 899 l 139 587 l 379 587 q 521 623 462 587 q 592 744 592 666 q 531 859 592 819 q 393 899 471 899 m 419 124 q 566 169 504 124 q 635 302 635 219 q 559 435 635 388 q 402 476 494 476 l 139 476 l 139 124 l 419 124 "},\u03C5:{x_min:0,x_max:617,ha:725,o:"m 617 352 q 540 94 617 199 q 308 -24 455 -24 q 76 94 161 -24 q 0 352 0 199 l 0 739 l 126 739 l 126 355 q 169 185 126 257 q 312 98 220 98 q 451 185 402 98 q 492 355 492 257 l 492 739 l 617 739 l 617 352 "},"]":{x_min:0,x_max:275,ha:372,o:"m 275 -281 l 0 -281 l 0 -187 l 151 -187 l 151 920 l 0 920 l 0 1013 l 275 1013 l 275 -281 "},m:{x_min:0,x_max:1019,ha:1128,o:"m 1019 0 l 897 0 l 897 454 q 860 591 897 536 q 739 660 816 660 q 613 586 659 660 q 573 436 573 522 l 573 0 l 447 0 l 447 455 q 412 591 447 535 q 294 657 372 657 q 165 586 213 657 q 122 437 122 521 l 122 0 l 0 0 l 0 738 l 117 738 l 117 640 q 202 730 150 697 q 316 763 254 763 q 437 730 381 763 q 525 642 494 697 q 621 731 559 700 q 753 763 682 763 q 943 694 867 763 q 1019 512 1019 625 l 1019 0 "},\u03C7:{x_min:8.328125,x_max:780.5625,ha:815,o:"m 780 -278 q 715 -294 747 -294 q 616 -257 663 -294 q 548 -175 576 -227 l 379 133 l 143 -277 l 9 -277 l 313 254 l 163 522 q 127 586 131 580 q 36 640 91 640 q 8 637 27 640 l 8 752 l 52 757 q 162 719 113 757 q 236 627 200 690 l 383 372 l 594 737 l 726 737 l 448 250 l 625 -69 q 670 -153 647 -110 q 743 -188 695 -188 q 780 -184 759 -188 l 780 -278 "},"8":{x_min:55,x_max:736,ha:792,o:"m 571 527 q 694 424 652 491 q 736 280 736 358 q 648 71 736 158 q 395 -26 551 -26 q 142 69 238 -26 q 55 279 55 157 q 96 425 55 359 q 220 527 138 491 q 120 615 153 562 q 88 726 88 668 q 171 904 88 827 q 395 986 261 986 q 618 905 529 986 q 702 727 702 830 q 670 616 702 667 q 571 527 638 565 m 394 565 q 519 610 475 565 q 563 717 563 655 q 521 823 563 781 q 392 872 474 872 q 265 824 312 872 q 224 720 224 783 q 265 613 224 656 q 394 565 312 565 m 395 91 q 545 150 488 91 q 597 280 597 204 q 546 408 597 355 q 395 465 492 465 q 244 408 299 465 q 194 280 194 356 q 244 150 194 203 q 395 91 299 91 "},\u03AF:{x_min:42,x_max:326.71875,ha:361,o:"m 284 3 q 233 -10 258 -5 q 182 -15 207 -15 q 85 26 119 -15 q 42 200 42 79 l 42 737 l 167 737 l 168 215 q 172 141 168 157 q 226 101 183 101 q 248 102 239 101 q 284 112 257 104 l 284 3 m 326 1040 l 137 819 l 54 819 l 189 1040 l 326 1040 "},\u0396:{x_min:0,x_max:779.171875,ha:850,o:"m 779 0 l 0 0 l 0 113 l 620 896 l 40 896 l 40 1013 l 779 1013 l 779 887 l 170 124 l 779 124 l 779 0 "},R:{x_min:0,x_max:781.953125,ha:907,o:"m 781 0 l 623 0 q 587 242 590 52 q 407 433 585 433 l 138 433 l 138 0 l 0 0 l 0 1013 l 396 1013 q 636 946 539 1013 q 749 731 749 868 q 711 597 749 659 q 608 502 674 534 q 718 370 696 474 q 729 207 722 352 q 781 26 736 62 l 781 0 m 373 551 q 533 594 465 551 q 614 731 614 645 q 532 859 614 815 q 373 896 465 896 l 138 896 l 138 551 l 373 551 "},o:{x_min:0,x_max:713,ha:821,o:"m 357 -25 q 94 91 194 -25 q 0 368 0 202 q 93 642 0 533 q 357 761 193 761 q 618 644 518 761 q 713 368 713 533 q 619 91 713 201 q 357 -25 521 -25 m 357 85 q 528 175 465 85 q 584 369 584 255 q 529 562 584 484 q 357 651 467 651 q 189 560 250 651 q 135 369 135 481 q 187 177 135 257 q 357 85 250 85 "},"5":{x_min:54.171875,x_max:738,ha:792,o:"m 738 314 q 626 60 738 153 q 382 -23 526 -23 q 155 47 248 -23 q 54 256 54 125 l 183 256 q 259 132 204 174 q 382 91 314 91 q 533 149 471 91 q 602 314 602 213 q 538 469 602 411 q 386 528 475 528 q 284 506 332 528 q 197 439 237 484 l 81 439 l 159 958 l 684 958 l 684 840 l 254 840 l 214 579 q 306 627 258 612 q 407 643 354 643 q 636 552 540 643 q 738 314 738 457 "},"7":{x_min:58.71875,x_max:730.953125,ha:792,o:"m 730 839 q 469 448 560 641 q 335 0 378 255 l 192 0 q 328 441 235 252 q 593 830 421 630 l 58 830 l 58 958 l 730 958 l 730 839 "},K:{x_min:0,x_max:819.46875,ha:906,o:"m 819 0 l 649 0 l 294 509 l 139 355 l 139 0 l 0 0 l 0 1013 l 139 1013 l 139 526 l 626 1013 l 809 1013 l 395 600 l 819 0 "},",":{x_min:0,x_max:142,ha:239,o:"m 142 -12 q 105 -132 142 -82 q 0 -205 68 -182 l 0 -138 q 57 -82 40 -124 q 70 0 70 -51 l 0 0 l 0 151 l 142 151 l 142 -12 "},d:{x_min:0,x_max:683,ha:796,o:"m 683 0 l 564 0 l 564 93 q 456 6 516 38 q 327 -25 395 -25 q 87 100 181 -25 q 0 365 0 215 q 90 639 0 525 q 343 763 187 763 q 564 647 486 763 l 564 1013 l 683 1013 l 683 0 m 582 373 q 529 562 582 484 q 361 653 468 653 q 190 561 253 653 q 135 365 135 479 q 189 175 135 254 q 358 85 251 85 q 529 178 468 85 q 582 373 582 258 "},"\xA8":{x_min:-109,x_max:247,ha:232,o:"m 247 1046 l 119 1046 l 119 1189 l 247 1189 l 247 1046 m 19 1046 l -109 1046 l -109 1189 l 19 1189 l 19 1046 "},E:{x_min:0,x_max:736.109375,ha:789,o:"m 736 0 l 0 0 l 0 1013 l 725 1013 l 725 889 l 139 889 l 139 585 l 677 585 l 677 467 l 139 467 l 139 125 l 736 125 l 736 0 "},Y:{x_min:0,x_max:820,ha:886,o:"m 820 1013 l 482 416 l 482 0 l 342 0 l 342 416 l 0 1013 l 140 1013 l 411 534 l 679 1012 l 820 1013 "},'"':{x_min:0,x_max:299,ha:396,o:"m 299 606 l 203 606 l 203 988 l 299 988 l 299 606 m 96 606 l 0 606 l 0 988 l 96 988 l 96 606 "},"\u2039":{x_min:17.984375,x_max:773.609375,ha:792,o:"m 773 40 l 18 376 l 17 465 l 773 799 l 773 692 l 159 420 l 773 149 l 773 40 "},"\u201E":{x_min:0,x_max:364,ha:467,o:"m 141 -12 q 104 -132 141 -82 q 0 -205 67 -182 l 0 -138 q 56 -82 40 -124 q 69 0 69 -51 l 0 0 l 0 151 l 141 151 l 141 -12 m 364 -12 q 327 -132 364 -82 q 222 -205 290 -182 l 222 -138 q 279 -82 262 -124 q 292 0 292 -51 l 222 0 l 222 151 l 364 151 l 364 -12 "},\u03B4:{x_min:1,x_max:710,ha:810,o:"m 710 360 q 616 87 710 196 q 356 -28 518 -28 q 99 82 197 -28 q 1 356 1 192 q 100 606 1 509 q 355 703 199 703 q 180 829 288 754 q 70 903 124 866 l 70 1012 l 643 1012 l 643 901 l 258 901 q 462 763 422 794 q 636 592 577 677 q 710 360 710 485 m 584 365 q 552 501 584 447 q 451 602 521 555 q 372 611 411 611 q 197 541 258 611 q 136 355 136 472 q 190 171 136 245 q 358 85 252 85 q 528 173 465 85 q 584 365 584 252 "},\u03AD:{x_min:0,x_max:634.71875,ha:714,o:"m 634 234 q 527 38 634 110 q 300 -25 433 -25 q 98 29 183 -25 q 0 204 0 93 q 37 313 0 265 q 128 390 67 352 q 56 459 82 419 q 26 555 26 505 q 114 712 26 654 q 295 763 191 763 q 499 700 416 763 q 589 515 589 631 l 478 515 q 419 618 464 580 q 307 657 374 657 q 207 630 253 657 q 151 547 151 598 q 238 445 151 469 q 389 434 280 434 l 389 331 l 349 331 q 206 315 255 331 q 125 210 125 287 q 183 107 125 145 q 302 76 233 76 q 436 117 379 76 q 509 234 493 159 l 634 234 m 520 1040 l 331 819 l 248 819 l 383 1040 l 520 1040 "},\u03C9:{x_min:0,x_max:922,ha:1031,o:"m 922 339 q 856 97 922 203 q 650 -26 780 -26 q 538 9 587 -26 q 461 103 489 44 q 387 12 436 46 q 277 -22 339 -22 q 69 97 147 -22 q 0 339 0 203 q 45 551 0 444 q 161 738 84 643 l 302 738 q 175 553 219 647 q 124 336 124 446 q 155 179 124 249 q 275 88 197 88 q 375 163 341 88 q 400 294 400 219 l 400 572 l 524 572 l 524 294 q 561 135 524 192 q 643 88 591 88 q 762 182 719 88 q 797 342 797 257 q 745 556 797 450 q 619 738 705 638 l 760 738 q 874 551 835 640 q 922 339 922 444 "},"\xB4":{x_min:0,x_max:96,ha:251,o:"m 96 606 l 0 606 l 0 988 l 96 988 l 96 606 "},"\xB1":{x_min:11,x_max:781,ha:792,o:"m 781 490 l 446 490 l 446 255 l 349 255 l 349 490 l 11 490 l 11 586 l 349 586 l 349 819 l 446 819 l 446 586 l 781 586 l 781 490 m 781 21 l 11 21 l 11 115 l 781 115 l 781 21 "},"|":{x_min:343,x_max:449,ha:792,o:"m 449 462 l 343 462 l 343 986 l 449 986 l 449 462 m 449 -242 l 343 -242 l 343 280 l 449 280 l 449 -242 "},\u03CB:{x_min:0,x_max:617,ha:725,o:"m 482 800 l 372 800 l 372 925 l 482 925 l 482 800 m 239 800 l 129 800 l 129 925 l 239 925 l 239 800 m 617 352 q 540 93 617 199 q 308 -24 455 -24 q 76 93 161 -24 q 0 352 0 199 l 0 738 l 126 738 l 126 354 q 169 185 126 257 q 312 98 220 98 q 451 185 402 98 q 492 354 492 257 l 492 738 l 617 738 l 617 352 "},"\xA7":{x_min:0,x_max:593,ha:690,o:"m 593 425 q 554 312 593 369 q 467 233 516 254 q 537 83 537 172 q 459 -74 537 -12 q 288 -133 387 -133 q 115 -69 184 -133 q 47 96 47 -6 l 166 96 q 199 7 166 40 q 288 -26 232 -26 q 371 -5 332 -26 q 420 60 420 21 q 311 201 420 139 q 108 309 210 255 q 0 490 0 383 q 33 602 0 551 q 124 687 66 654 q 75 743 93 712 q 58 812 58 773 q 133 984 58 920 q 300 1043 201 1043 q 458 987 394 1043 q 529 814 529 925 l 411 814 q 370 908 404 877 q 289 939 336 939 q 213 911 246 939 q 180 841 180 883 q 286 720 180 779 q 484 612 480 615 q 593 425 593 534 m 467 409 q 355 544 467 473 q 196 630 228 612 q 146 587 162 609 q 124 525 124 558 q 239 387 124 462 q 398 298 369 315 q 448 345 429 316 q 467 409 467 375 "},b:{x_min:0,x_max:685,ha:783,o:"m 685 372 q 597 99 685 213 q 347 -25 501 -25 q 219 5 277 -25 q 121 93 161 36 l 121 0 l 0 0 l 0 1013 l 121 1013 l 121 634 q 214 723 157 692 q 341 754 272 754 q 591 637 493 754 q 685 372 685 526 m 554 356 q 499 550 554 470 q 328 644 437 644 q 162 556 223 644 q 108 369 108 478 q 160 176 108 256 q 330 83 221 83 q 498 169 435 83 q 554 356 554 245 "},q:{x_min:0,x_max:683,ha:876,o:"m 683 -278 l 564 -278 l 564 97 q 474 8 533 39 q 345 -23 415 -23 q 91 93 188 -23 q 0 364 0 203 q 87 635 0 522 q 337 760 184 760 q 466 727 408 760 q 564 637 523 695 l 564 737 l 683 737 l 683 -278 m 582 375 q 527 564 582 488 q 358 652 466 652 q 190 565 253 652 q 135 377 135 488 q 189 179 135 261 q 361 84 251 84 q 530 179 469 84 q 582 375 582 260 "},\u03A9:{x_min:-.171875,x_max:969.5625,ha:1068,o:"m 969 0 l 555 0 l 555 123 q 744 308 675 194 q 814 558 814 423 q 726 812 814 709 q 484 922 633 922 q 244 820 334 922 q 154 567 154 719 q 223 316 154 433 q 412 123 292 199 l 412 0 l 0 0 l 0 124 l 217 124 q 68 327 122 210 q 15 572 15 444 q 144 911 15 781 q 484 1041 274 1041 q 822 909 691 1041 q 953 569 953 777 q 899 326 953 443 q 750 124 846 210 l 969 124 l 969 0 "},\u03CD:{x_min:0,x_max:617,ha:725,o:"m 617 352 q 540 93 617 199 q 308 -24 455 -24 q 76 93 161 -24 q 0 352 0 199 l 0 738 l 126 738 l 126 354 q 169 185 126 257 q 312 98 220 98 q 451 185 402 98 q 492 354 492 257 l 492 738 l 617 738 l 617 352 m 535 1040 l 346 819 l 262 819 l 397 1040 l 535 1040 "},z:{x_min:-.015625,x_max:613.890625,ha:697,o:"m 613 0 l 0 0 l 0 100 l 433 630 l 20 630 l 20 738 l 594 738 l 593 636 l 163 110 l 613 110 l 613 0 "},"\u2122":{x_min:0,x_max:894,ha:1e3,o:"m 389 951 l 229 951 l 229 503 l 160 503 l 160 951 l 0 951 l 0 1011 l 389 1011 l 389 951 m 894 503 l 827 503 l 827 939 l 685 503 l 620 503 l 481 937 l 481 503 l 417 503 l 417 1011 l 517 1011 l 653 580 l 796 1010 l 894 1011 l 894 503 "},\u03AE:{x_min:.78125,x_max:697,ha:810,o:"m 697 -278 l 572 -278 l 572 454 q 540 587 572 536 q 425 650 501 650 q 271 579 337 650 q 206 420 206 509 l 206 0 l 81 0 l 81 489 q 73 588 81 562 q 0 644 56 644 l 0 741 q 68 755 38 755 q 158 721 124 755 q 200 630 193 687 q 297 726 234 692 q 434 761 359 761 q 620 692 544 761 q 697 516 697 624 l 697 -278 m 479 1040 l 290 819 l 207 819 l 341 1040 l 479 1040 "},\u0398:{x_min:0,x_max:960,ha:1056,o:"m 960 507 q 833 129 960 280 q 476 -32 698 -32 q 123 129 255 -32 q 0 507 0 280 q 123 883 0 732 q 476 1045 255 1045 q 832 883 696 1045 q 960 507 960 732 m 817 500 q 733 789 817 669 q 476 924 639 924 q 223 792 317 924 q 142 507 142 675 q 222 222 142 339 q 476 89 315 89 q 730 218 636 89 q 817 500 817 334 m 716 449 l 243 449 l 243 571 l 716 571 l 716 449 "},"\xAE":{x_min:-3,x_max:1008,ha:1106,o:"m 503 532 q 614 562 566 532 q 672 658 672 598 q 614 747 672 716 q 503 772 569 772 l 338 772 l 338 532 l 503 532 m 502 -7 q 123 151 263 -7 q -3 501 -3 294 q 123 851 -3 706 q 502 1011 263 1011 q 881 851 739 1011 q 1008 501 1008 708 q 883 151 1008 292 q 502 -7 744 -7 m 502 60 q 830 197 709 60 q 940 501 940 322 q 831 805 940 681 q 502 944 709 944 q 174 805 296 944 q 65 501 65 680 q 173 197 65 320 q 502 60 294 60 m 788 146 l 678 146 q 653 316 655 183 q 527 449 652 449 l 338 449 l 338 146 l 241 146 l 241 854 l 518 854 q 688 808 621 854 q 766 658 766 755 q 739 563 766 607 q 668 497 713 519 q 751 331 747 472 q 788 164 756 190 l 788 146 "},"~":{x_min:0,x_max:833,ha:931,o:"m 833 958 q 778 753 833 831 q 594 665 716 665 q 402 761 502 665 q 240 857 302 857 q 131 795 166 857 q 104 665 104 745 l 0 665 q 54 867 0 789 q 237 958 116 958 q 429 861 331 958 q 594 765 527 765 q 704 827 670 765 q 729 958 729 874 l 833 958 "},\u0395:{x_min:0,x_max:736.21875,ha:778,o:"m 736 0 l 0 0 l 0 1013 l 725 1013 l 725 889 l 139 889 l 139 585 l 677 585 l 677 467 l 139 467 l 139 125 l 736 125 l 736 0 "},"\xB3":{x_min:0,x_max:450,ha:547,o:"m 450 552 q 379 413 450 464 q 220 366 313 366 q 69 414 130 366 q 0 567 0 470 l 85 567 q 126 470 85 504 q 225 437 168 437 q 320 467 280 437 q 360 552 360 498 q 318 632 360 608 q 213 657 276 657 q 195 657 203 657 q 176 657 181 657 l 176 722 q 279 733 249 722 q 334 815 334 752 q 300 881 334 856 q 220 907 267 907 q 133 875 169 907 q 97 781 97 844 l 15 781 q 78 926 15 875 q 220 972 135 972 q 364 930 303 972 q 426 817 426 888 q 344 697 426 733 q 421 642 392 681 q 450 552 450 603 "},"[":{x_min:0,x_max:273.609375,ha:371,o:"m 273 -281 l 0 -281 l 0 1013 l 273 1013 l 273 920 l 124 920 l 124 -187 l 273 -187 l 273 -281 "},L:{x_min:0,x_max:645.828125,ha:696,o:"m 645 0 l 0 0 l 0 1013 l 140 1013 l 140 126 l 645 126 l 645 0 "},\u03C3:{x_min:0,x_max:803.390625,ha:894,o:"m 803 628 l 633 628 q 713 368 713 512 q 618 93 713 204 q 357 -25 518 -25 q 94 91 194 -25 q 0 368 0 201 q 94 644 0 533 q 356 761 194 761 q 481 750 398 761 q 608 739 564 739 l 803 739 l 803 628 m 360 85 q 529 180 467 85 q 584 374 584 262 q 527 566 584 490 q 352 651 463 651 q 187 559 247 651 q 135 368 135 478 q 189 175 135 254 q 360 85 251 85 "},\u03B6:{x_min:0,x_max:573,ha:642,o:"m 573 -40 q 553 -162 573 -97 q 510 -278 543 -193 l 400 -278 q 441 -187 428 -219 q 462 -90 462 -132 q 378 -14 462 -14 q 108 45 197 -14 q 0 290 0 117 q 108 631 0 462 q 353 901 194 767 l 55 901 l 55 1012 l 561 1012 l 561 924 q 261 669 382 831 q 128 301 128 489 q 243 117 128 149 q 458 98 350 108 q 573 -40 573 80 "},\u03B8:{x_min:0,x_max:674,ha:778,o:"m 674 496 q 601 160 674 304 q 336 -26 508 -26 q 73 153 165 -26 q 0 485 0 296 q 72 840 0 683 q 343 1045 166 1045 q 605 844 516 1045 q 674 496 674 692 m 546 579 q 498 798 546 691 q 336 935 437 935 q 178 798 237 935 q 126 579 137 701 l 546 579 m 546 475 l 126 475 q 170 233 126 348 q 338 80 230 80 q 504 233 447 80 q 546 475 546 346 "},\u039F:{x_min:0,x_max:958,ha:1054,o:"m 485 1042 q 834 883 703 1042 q 958 511 958 735 q 834 136 958 287 q 481 -26 701 -26 q 126 130 261 -26 q 0 504 0 279 q 127 880 0 729 q 485 1042 263 1042 m 480 98 q 731 225 638 98 q 815 504 815 340 q 733 783 815 670 q 480 913 640 913 q 226 785 321 913 q 142 504 142 671 q 226 224 142 339 q 480 98 319 98 "},\u0393:{x_min:0,x_max:705.28125,ha:749,o:"m 705 886 l 140 886 l 140 0 l 0 0 l 0 1012 l 705 1012 l 705 886 "}," ":{x_min:0,x_max:0,ha:375},"%":{x_min:-3,x_max:1089,ha:1186,o:"m 845 0 q 663 76 731 0 q 602 244 602 145 q 661 412 602 344 q 845 489 728 489 q 1027 412 959 489 q 1089 244 1089 343 q 1029 76 1089 144 q 845 0 962 0 m 844 103 q 945 143 909 103 q 981 243 981 184 q 947 340 981 301 q 844 385 909 385 q 744 342 781 385 q 708 243 708 300 q 741 147 708 186 q 844 103 780 103 m 888 986 l 284 -25 l 199 -25 l 803 986 l 888 986 m 241 468 q 58 545 126 468 q -3 715 -3 615 q 56 881 -3 813 q 238 958 124 958 q 421 881 353 958 q 483 712 483 813 q 423 544 483 612 q 241 468 356 468 m 241 855 q 137 811 175 855 q 100 710 100 768 q 136 612 100 653 q 240 572 172 572 q 344 614 306 572 q 382 713 382 656 q 347 810 382 771 q 241 855 308 855 "},P:{x_min:0,x_max:726,ha:806,o:"m 424 1013 q 640 931 555 1013 q 726 719 726 850 q 637 506 726 587 q 413 426 548 426 l 140 426 l 140 0 l 0 0 l 0 1013 l 424 1013 m 379 889 l 140 889 l 140 548 l 372 548 q 522 589 459 548 q 593 720 593 637 q 528 845 593 801 q 379 889 463 889 "},\u0388:{x_min:0,x_max:1078.21875,ha:1118,o:"m 1078 0 l 342 0 l 342 1013 l 1067 1013 l 1067 889 l 481 889 l 481 585 l 1019 585 l 1019 467 l 481 467 l 481 125 l 1078 125 l 1078 0 m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 "},\u038F:{x_min:.125,x_max:1136.546875,ha:1235,o:"m 1136 0 l 722 0 l 722 123 q 911 309 842 194 q 981 558 981 423 q 893 813 981 710 q 651 923 800 923 q 411 821 501 923 q 321 568 321 720 q 390 316 321 433 q 579 123 459 200 l 579 0 l 166 0 l 166 124 l 384 124 q 235 327 289 210 q 182 572 182 444 q 311 912 182 782 q 651 1042 441 1042 q 989 910 858 1042 q 1120 569 1120 778 q 1066 326 1120 443 q 917 124 1013 210 l 1136 124 l 1136 0 m 277 1040 l 83 800 l 0 800 l 140 1041 l 277 1040 "},_:{x_min:0,x_max:705.5625,ha:803,o:"m 705 -334 l 0 -334 l 0 -234 l 705 -234 l 705 -334 "},\u03AA:{x_min:-110,x_max:246,ha:275,o:"m 246 1046 l 118 1046 l 118 1189 l 246 1189 l 246 1046 m 18 1046 l -110 1046 l -110 1189 l 18 1189 l 18 1046 m 136 0 l 0 0 l 0 1012 l 136 1012 l 136 0 "},"+":{x_min:23,x_max:768,ha:792,o:"m 768 372 l 444 372 l 444 0 l 347 0 l 347 372 l 23 372 l 23 468 l 347 468 l 347 840 l 444 840 l 444 468 l 768 468 l 768 372 "},"\xBD":{x_min:0,x_max:1050,ha:1149,o:"m 1050 0 l 625 0 q 712 178 625 108 q 878 277 722 187 q 967 385 967 328 q 932 456 967 429 q 850 484 897 484 q 759 450 798 484 q 721 352 721 416 l 640 352 q 706 502 640 448 q 851 551 766 551 q 987 509 931 551 q 1050 385 1050 462 q 976 251 1050 301 q 829 179 902 215 q 717 68 740 133 l 1050 68 l 1050 0 m 834 985 l 215 -28 l 130 -28 l 750 984 l 834 985 m 224 422 l 142 422 l 142 811 l 0 811 l 0 867 q 104 889 62 867 q 164 973 157 916 l 224 973 l 224 422 "},\u03A1:{x_min:0,x_max:720,ha:783,o:"m 424 1013 q 637 933 554 1013 q 720 723 720 853 q 633 508 720 591 q 413 426 546 426 l 140 426 l 140 0 l 0 0 l 0 1013 l 424 1013 m 378 889 l 140 889 l 140 548 l 371 548 q 521 589 458 548 q 592 720 592 637 q 527 845 592 801 q 378 889 463 889 "},"'":{x_min:0,x_max:139,ha:236,o:"m 139 851 q 102 737 139 784 q 0 669 65 690 l 0 734 q 59 787 42 741 q 72 873 72 821 l 0 873 l 0 1013 l 139 1013 l 139 851 "},\u00AA:{x_min:0,x_max:350,ha:397,o:"m 350 625 q 307 616 328 616 q 266 631 281 616 q 247 673 251 645 q 190 628 225 644 q 116 613 156 613 q 32 641 64 613 q 0 722 0 669 q 72 826 0 800 q 247 866 159 846 l 247 887 q 220 934 247 916 q 162 953 194 953 q 104 934 129 953 q 76 882 80 915 l 16 882 q 60 976 16 941 q 166 1011 104 1011 q 266 979 224 1011 q 308 891 308 948 l 308 706 q 311 679 308 688 q 331 670 315 670 l 350 672 l 350 625 m 247 757 l 247 811 q 136 790 175 798 q 64 726 64 773 q 83 682 64 697 q 132 667 103 667 q 207 690 174 667 q 247 757 247 718 "},"\u0385":{x_min:0,x_max:450,ha:553,o:"m 450 800 l 340 800 l 340 925 l 450 925 l 450 800 m 406 1040 l 212 800 l 129 800 l 269 1040 l 406 1040 m 110 800 l 0 800 l 0 925 l 110 925 l 110 800 "},T:{x_min:0,x_max:777,ha:835,o:"m 777 894 l 458 894 l 458 0 l 319 0 l 319 894 l 0 894 l 0 1013 l 777 1013 l 777 894 "},\u03A6:{x_min:0,x_max:915,ha:997,o:"m 527 0 l 389 0 l 389 122 q 110 231 220 122 q 0 509 0 340 q 110 785 0 677 q 389 893 220 893 l 389 1013 l 527 1013 l 527 893 q 804 786 693 893 q 915 509 915 679 q 805 231 915 341 q 527 122 696 122 l 527 0 m 527 226 q 712 310 641 226 q 779 507 779 389 q 712 705 779 627 q 527 787 641 787 l 527 226 m 389 226 l 389 787 q 205 698 275 775 q 136 505 136 620 q 206 308 136 391 q 389 226 276 226 "},"\u204B":{x_min:0,x_max:0,ha:694},j:{x_min:-77.78125,x_max:167,ha:349,o:"m 167 871 l 42 871 l 42 1013 l 167 1013 l 167 871 m 167 -80 q 121 -231 167 -184 q -26 -278 76 -278 l -77 -278 l -77 -164 l -41 -164 q 26 -143 11 -164 q 42 -65 42 -122 l 42 737 l 167 737 l 167 -80 "},\u03A3:{x_min:0,x_max:756.953125,ha:819,o:"m 756 0 l 0 0 l 0 107 l 395 523 l 22 904 l 22 1013 l 745 1013 l 745 889 l 209 889 l 566 523 l 187 125 l 756 125 l 756 0 "},"1":{x_min:215.671875,x_max:574,ha:792,o:"m 574 0 l 442 0 l 442 697 l 215 697 l 215 796 q 386 833 330 796 q 475 986 447 875 l 574 986 l 574 0 "},"\u203A":{x_min:18.0625,x_max:774,ha:792,o:"m 774 376 l 18 40 l 18 149 l 631 421 l 18 692 l 18 799 l 774 465 l 774 376 "},"<":{x_min:17.984375,x_max:773.609375,ha:792,o:"m 773 40 l 18 376 l 17 465 l 773 799 l 773 692 l 159 420 l 773 149 l 773 40 "},"\xA3":{x_min:0,x_max:704.484375,ha:801,o:"m 704 41 q 623 -10 664 5 q 543 -26 583 -26 q 359 15 501 -26 q 243 36 288 36 q 158 23 197 36 q 73 -21 119 10 l 6 76 q 125 195 90 150 q 175 331 175 262 q 147 443 175 383 l 0 443 l 0 512 l 108 512 q 43 734 43 623 q 120 929 43 854 q 358 1010 204 1010 q 579 936 487 1010 q 678 729 678 857 l 678 684 l 552 684 q 504 838 552 780 q 362 896 457 896 q 216 852 263 896 q 176 747 176 815 q 199 627 176 697 q 248 512 217 574 l 468 512 l 468 443 l 279 443 q 297 356 297 398 q 230 194 297 279 q 153 107 211 170 q 227 133 190 125 q 293 142 264 142 q 410 119 339 142 q 516 96 482 96 q 579 105 550 96 q 648 142 608 115 l 704 41 "},t:{x_min:0,x_max:367,ha:458,o:"m 367 0 q 312 -5 339 -2 q 262 -8 284 -8 q 145 28 183 -8 q 108 143 108 64 l 108 638 l 0 638 l 0 738 l 108 738 l 108 944 l 232 944 l 232 738 l 367 738 l 367 638 l 232 638 l 232 185 q 248 121 232 140 q 307 102 264 102 q 345 104 330 102 q 367 107 360 107 l 367 0 "},"\xAC":{x_min:0,x_max:706,ha:803,o:"m 706 411 l 706 158 l 630 158 l 630 335 l 0 335 l 0 411 l 706 411 "},\u03BB:{x_min:0,x_max:750,ha:803,o:"m 750 -7 q 679 -15 716 -15 q 538 59 591 -15 q 466 214 512 97 l 336 551 l 126 0 l 0 0 l 270 705 q 223 837 247 770 q 116 899 190 899 q 90 898 100 899 l 90 1004 q 152 1011 125 1011 q 298 938 244 1011 q 373 783 326 901 l 605 192 q 649 115 629 136 q 716 95 669 95 l 736 95 q 750 97 745 97 l 750 -7 "},W:{x_min:0,x_max:1263.890625,ha:1351,o:"m 1263 1013 l 995 0 l 859 0 l 627 837 l 405 0 l 265 0 l 0 1013 l 136 1013 l 342 202 l 556 1013 l 701 1013 l 921 207 l 1133 1012 l 1263 1013 "},">":{x_min:18.0625,x_max:774,ha:792,o:"m 774 376 l 18 40 l 18 149 l 631 421 l 18 692 l 18 799 l 774 465 l 774 376 "},v:{x_min:0,x_max:675.15625,ha:761,o:"m 675 738 l 404 0 l 272 0 l 0 738 l 133 737 l 340 147 l 541 737 l 675 738 "},\u03C4:{x_min:.28125,x_max:644.5,ha:703,o:"m 644 628 l 382 628 l 382 179 q 388 120 382 137 q 436 91 401 91 q 474 94 447 91 q 504 97 501 97 l 504 0 q 454 -9 482 -5 q 401 -14 426 -14 q 278 67 308 -14 q 260 233 260 118 l 260 628 l 0 628 l 0 739 l 644 739 l 644 628 "},\u03BE:{x_min:0,x_max:624.9375,ha:699,o:"m 624 -37 q 608 -153 624 -96 q 563 -278 593 -211 l 454 -278 q 491 -183 486 -200 q 511 -83 511 -126 q 484 -23 511 -44 q 370 1 452 1 q 323 0 354 1 q 283 -1 293 -1 q 84 76 169 -1 q 0 266 0 154 q 56 431 0 358 q 197 538 108 498 q 94 613 134 562 q 54 730 54 665 q 77 823 54 780 q 143 901 101 867 l 27 901 l 27 1012 l 576 1012 l 576 901 l 380 901 q 244 863 303 901 q 178 745 178 820 q 312 600 178 636 q 532 582 380 582 l 532 479 q 276 455 361 479 q 118 281 118 410 q 165 173 118 217 q 274 120 208 133 q 494 101 384 110 q 624 -37 624 76 "},"&":{x_min:-3,x_max:894.25,ha:992,o:"m 894 0 l 725 0 l 624 123 q 471 0 553 40 q 306 -41 390 -41 q 168 -7 231 -41 q 62 92 105 26 q 14 187 31 139 q -3 276 -3 235 q 55 433 -3 358 q 248 581 114 508 q 170 689 196 640 q 137 817 137 751 q 214 985 137 922 q 384 1041 284 1041 q 548 988 483 1041 q 622 824 622 928 q 563 666 622 739 q 431 556 516 608 l 621 326 q 649 407 639 361 q 663 493 653 426 l 781 493 q 703 229 781 352 l 894 0 m 504 818 q 468 908 504 877 q 384 940 433 940 q 293 907 331 940 q 255 818 255 875 q 289 714 255 767 q 363 628 313 678 q 477 729 446 682 q 504 818 504 771 m 556 209 l 314 499 q 179 395 223 449 q 135 283 135 341 q 146 222 135 253 q 183 158 158 192 q 333 80 241 80 q 556 209 448 80 "},\u039B:{x_min:0,x_max:862.5,ha:942,o:"m 862 0 l 719 0 l 426 847 l 143 0 l 0 0 l 356 1013 l 501 1013 l 862 0 "},I:{x_min:41,x_max:180,ha:293,o:"m 180 0 l 41 0 l 41 1013 l 180 1013 l 180 0 "},G:{x_min:0,x_max:921,ha:1011,o:"m 921 0 l 832 0 l 801 136 q 655 15 741 58 q 470 -28 568 -28 q 126 133 259 -28 q 0 499 0 284 q 125 881 0 731 q 486 1043 259 1043 q 763 957 647 1043 q 905 709 890 864 l 772 709 q 668 866 747 807 q 486 926 589 926 q 228 795 322 926 q 142 507 142 677 q 228 224 142 342 q 483 94 323 94 q 712 195 625 94 q 796 435 796 291 l 477 435 l 477 549 l 921 549 l 921 0 "},\u03B0:{x_min:0,x_max:617,ha:725,o:"m 524 800 l 414 800 l 414 925 l 524 925 l 524 800 m 183 800 l 73 800 l 73 925 l 183 925 l 183 800 m 617 352 q 540 93 617 199 q 308 -24 455 -24 q 76 93 161 -24 q 0 352 0 199 l 0 738 l 126 738 l 126 354 q 169 185 126 257 q 312 98 220 98 q 451 185 402 98 q 492 354 492 257 l 492 738 l 617 738 l 617 352 m 489 1040 l 300 819 l 216 819 l 351 1040 l 489 1040 "},"`":{x_min:0,x_max:138.890625,ha:236,o:"m 138 699 l 0 699 l 0 861 q 36 974 0 929 q 138 1041 72 1020 l 138 977 q 82 931 95 969 q 69 839 69 893 l 138 839 l 138 699 "},"\xB7":{x_min:0,x_max:142,ha:239,o:"m 142 585 l 0 585 l 0 738 l 142 738 l 142 585 "},\u03A5:{x_min:.328125,x_max:819.515625,ha:889,o:"m 819 1013 l 482 416 l 482 0 l 342 0 l 342 416 l 0 1013 l 140 1013 l 411 533 l 679 1013 l 819 1013 "},r:{x_min:0,x_max:355.5625,ha:432,o:"m 355 621 l 343 621 q 179 569 236 621 q 122 411 122 518 l 122 0 l 0 0 l 0 737 l 117 737 l 117 604 q 204 719 146 686 q 355 753 262 753 l 355 621 "},x:{x_min:0,x_max:675,ha:764,o:"m 675 0 l 525 0 l 331 286 l 144 0 l 0 0 l 256 379 l 12 738 l 157 737 l 336 473 l 516 738 l 661 738 l 412 380 l 675 0 "},\u03BC:{x_min:0,x_max:696.609375,ha:747,o:"m 696 -4 q 628 -14 657 -14 q 498 97 513 -14 q 422 8 470 41 q 313 -24 374 -24 q 207 3 258 -24 q 120 80 157 31 l 120 -278 l 0 -278 l 0 738 l 124 738 l 124 343 q 165 172 124 246 q 308 82 216 82 q 451 177 402 82 q 492 358 492 254 l 492 738 l 616 738 l 616 214 q 623 136 616 160 q 673 92 636 92 q 696 95 684 92 l 696 -4 "},h:{x_min:0,x_max:615,ha:724,o:"m 615 472 l 615 0 l 490 0 l 490 454 q 456 590 490 535 q 338 654 416 654 q 186 588 251 654 q 122 436 122 522 l 122 0 l 0 0 l 0 1013 l 122 1013 l 122 633 q 218 727 149 694 q 362 760 287 760 q 552 676 484 760 q 615 472 615 600 "},".":{x_min:0,x_max:142,ha:239,o:"m 142 0 l 0 0 l 0 151 l 142 151 l 142 0 "},\u03C6:{x_min:-2,x_max:878,ha:974,o:"m 496 -279 l 378 -279 l 378 -17 q 101 88 204 -17 q -2 367 -2 194 q 68 626 -2 510 q 283 758 151 758 l 283 646 q 167 537 209 626 q 133 373 133 462 q 192 177 133 254 q 378 93 259 93 l 378 758 q 445 764 426 763 q 476 765 464 765 q 765 659 653 765 q 878 377 878 553 q 771 96 878 209 q 496 -17 665 -17 l 496 -279 m 496 93 l 514 93 q 687 183 623 93 q 746 380 746 265 q 691 569 746 491 q 522 658 629 658 l 496 656 l 496 93 "},";":{x_min:0,x_max:142,ha:239,o:"m 142 585 l 0 585 l 0 738 l 142 738 l 142 585 m 142 -12 q 105 -132 142 -82 q 0 -206 68 -182 l 0 -138 q 58 -82 43 -123 q 68 0 68 -56 l 0 0 l 0 151 l 142 151 l 142 -12 "},f:{x_min:0,x_max:378,ha:472,o:"m 378 638 l 246 638 l 246 0 l 121 0 l 121 638 l 0 638 l 0 738 l 121 738 q 137 935 121 887 q 290 1028 171 1028 q 320 1027 305 1028 q 378 1021 334 1026 l 378 908 q 323 918 346 918 q 257 870 273 918 q 246 780 246 840 l 246 738 l 378 738 l 378 638 "},"\u201C":{x_min:1,x_max:348.21875,ha:454,o:"m 140 670 l 1 670 l 1 830 q 37 943 1 897 q 140 1011 74 990 l 140 947 q 82 900 97 940 q 68 810 68 861 l 140 810 l 140 670 m 348 670 l 209 670 l 209 830 q 245 943 209 897 q 348 1011 282 990 l 348 947 q 290 900 305 940 q 276 810 276 861 l 348 810 l 348 670 "},A:{x_min:.03125,x_max:906.953125,ha:1008,o:"m 906 0 l 756 0 l 648 303 l 251 303 l 142 0 l 0 0 l 376 1013 l 529 1013 l 906 0 m 610 421 l 452 867 l 293 421 l 610 421 "},"6":{x_min:53,x_max:739,ha:792,o:"m 739 312 q 633 62 739 162 q 400 -31 534 -31 q 162 78 257 -31 q 53 439 53 206 q 178 859 53 712 q 441 986 284 986 q 643 912 559 986 q 732 713 732 833 l 601 713 q 544 830 594 786 q 426 875 494 875 q 268 793 331 875 q 193 517 193 697 q 301 597 240 570 q 427 624 362 624 q 643 540 552 624 q 739 312 739 451 m 603 298 q 540 461 603 400 q 404 516 484 516 q 268 461 323 516 q 207 300 207 401 q 269 137 207 198 q 405 83 325 83 q 541 137 486 83 q 603 298 603 197 "},"\u2018":{x_min:1,x_max:139.890625,ha:236,o:"m 139 670 l 1 670 l 1 830 q 37 943 1 897 q 139 1011 74 990 l 139 947 q 82 900 97 940 q 68 810 68 861 l 139 810 l 139 670 "},\u03CA:{x_min:-70,x_max:283,ha:361,o:"m 283 800 l 173 800 l 173 925 l 283 925 l 283 800 m 40 800 l -70 800 l -70 925 l 40 925 l 40 800 m 283 3 q 232 -10 257 -5 q 181 -15 206 -15 q 84 26 118 -15 q 41 200 41 79 l 41 737 l 166 737 l 167 215 q 171 141 167 157 q 225 101 182 101 q 247 103 238 101 q 283 112 256 104 l 283 3 "},\u03C0:{x_min:-.21875,x_max:773.21875,ha:857,o:"m 773 -7 l 707 -11 q 575 40 607 -11 q 552 174 552 77 l 552 226 l 552 626 l 222 626 l 222 0 l 97 0 l 97 626 l 0 626 l 0 737 l 773 737 l 773 626 l 676 626 l 676 171 q 695 103 676 117 q 773 90 714 90 l 773 -7 "},\u03AC:{x_min:0,x_max:765.5625,ha:809,o:"m 765 -4 q 698 -14 726 -14 q 564 97 586 -14 q 466 7 525 40 q 337 -26 407 -26 q 88 98 186 -26 q 0 369 0 212 q 88 637 0 525 q 337 760 184 760 q 465 727 407 760 q 563 637 524 695 l 563 738 l 685 738 l 685 222 q 693 141 685 168 q 748 94 708 94 q 765 95 760 94 l 765 -4 m 584 371 q 531 562 584 485 q 360 653 470 653 q 192 566 254 653 q 135 379 135 489 q 186 181 135 261 q 358 84 247 84 q 528 176 465 84 q 584 371 584 260 m 604 1040 l 415 819 l 332 819 l 466 1040 l 604 1040 "},O:{x_min:0,x_max:958,ha:1057,o:"m 485 1041 q 834 882 702 1041 q 958 512 958 734 q 834 136 958 287 q 481 -26 702 -26 q 126 130 261 -26 q 0 504 0 279 q 127 880 0 728 q 485 1041 263 1041 m 480 98 q 731 225 638 98 q 815 504 815 340 q 733 783 815 669 q 480 912 640 912 q 226 784 321 912 q 142 504 142 670 q 226 224 142 339 q 480 98 319 98 "},n:{x_min:0,x_max:615,ha:724,o:"m 615 463 l 615 0 l 490 0 l 490 454 q 453 592 490 537 q 331 656 410 656 q 178 585 240 656 q 117 421 117 514 l 117 0 l 0 0 l 0 738 l 117 738 l 117 630 q 218 728 150 693 q 359 764 286 764 q 552 675 484 764 q 615 463 615 593 "},"3":{x_min:54,x_max:737,ha:792,o:"m 737 284 q 635 55 737 141 q 399 -25 541 -25 q 156 52 248 -25 q 54 308 54 140 l 185 308 q 245 147 185 202 q 395 96 302 96 q 539 140 484 96 q 602 280 602 190 q 510 429 602 390 q 324 454 451 454 l 324 565 q 487 584 441 565 q 565 719 565 617 q 515 835 565 791 q 395 879 466 879 q 255 824 307 879 q 203 661 203 769 l 78 661 q 166 909 78 822 q 387 992 250 992 q 603 921 513 992 q 701 723 701 844 q 669 607 701 656 q 578 524 637 558 q 696 434 655 499 q 737 284 737 369 "},"9":{x_min:53,x_max:739,ha:792,o:"m 739 524 q 619 94 739 241 q 362 -32 516 -32 q 150 47 242 -32 q 59 244 59 126 l 191 244 q 246 129 191 176 q 373 82 301 82 q 526 161 466 82 q 597 440 597 255 q 363 334 501 334 q 130 432 216 334 q 53 650 53 521 q 134 880 53 786 q 383 986 226 986 q 659 841 566 986 q 739 524 739 719 m 388 449 q 535 514 480 449 q 585 658 585 573 q 535 805 585 744 q 388 873 480 873 q 242 809 294 873 q 191 658 191 745 q 239 514 191 572 q 388 449 292 449 "},l:{x_min:41,x_max:166,ha:279,o:"m 166 0 l 41 0 l 41 1013 l 166 1013 l 166 0 "},"\xA4":{x_min:40.09375,x_max:728.796875,ha:825,o:"m 728 304 l 649 224 l 512 363 q 383 331 458 331 q 256 363 310 331 l 119 224 l 40 304 l 177 441 q 150 553 150 493 q 184 673 150 621 l 40 818 l 119 898 l 267 749 q 321 766 291 759 q 384 773 351 773 q 447 766 417 773 q 501 749 477 759 l 649 898 l 728 818 l 585 675 q 612 618 604 648 q 621 553 621 587 q 591 441 621 491 l 728 304 m 384 682 q 280 643 318 682 q 243 551 243 604 q 279 461 243 499 q 383 423 316 423 q 487 461 449 423 q 525 553 525 500 q 490 641 525 605 q 384 682 451 682 "},\u03BA:{x_min:0,x_max:632.328125,ha:679,o:"m 632 0 l 482 0 l 225 384 l 124 288 l 124 0 l 0 0 l 0 738 l 124 738 l 124 446 l 433 738 l 596 738 l 312 466 l 632 0 "},"4":{x_min:48,x_max:742.453125,ha:792,o:"m 742 243 l 602 243 l 602 0 l 476 0 l 476 243 l 48 243 l 48 368 l 476 958 l 602 958 l 602 354 l 742 354 l 742 243 m 476 354 l 476 792 l 162 354 l 476 354 "},p:{x_min:0,x_max:685,ha:786,o:"m 685 364 q 598 96 685 205 q 350 -23 504 -23 q 121 89 205 -23 l 121 -278 l 0 -278 l 0 738 l 121 738 l 121 633 q 220 726 159 691 q 351 761 280 761 q 598 636 504 761 q 685 364 685 522 m 557 371 q 501 560 557 481 q 330 651 437 651 q 162 559 223 651 q 108 366 108 479 q 162 177 108 254 q 333 87 224 87 q 502 178 441 87 q 557 371 557 258 "},"\u2021":{x_min:0,x_max:777,ha:835,o:"m 458 238 l 458 0 l 319 0 l 319 238 l 0 238 l 0 360 l 319 360 l 319 681 l 0 683 l 0 804 l 319 804 l 319 1015 l 458 1013 l 458 804 l 777 804 l 777 683 l 458 683 l 458 360 l 777 360 l 777 238 l 458 238 "},\u03C8:{x_min:0,x_max:808,ha:907,o:"m 465 -278 l 341 -278 l 341 -15 q 87 102 180 -15 q 0 378 0 210 l 0 739 l 133 739 l 133 379 q 182 195 133 275 q 341 98 242 98 l 341 922 l 465 922 l 465 98 q 623 195 563 98 q 675 382 675 278 l 675 742 l 808 742 l 808 381 q 720 104 808 213 q 466 -13 627 -13 l 465 -278 "},\u03B7:{x_min:.78125,x_max:697,ha:810,o:"m 697 -278 l 572 -278 l 572 454 q 540 587 572 536 q 425 650 501 650 q 271 579 337 650 q 206 420 206 509 l 206 0 l 81 0 l 81 489 q 73 588 81 562 q 0 644 56 644 l 0 741 q 68 755 38 755 q 158 720 124 755 q 200 630 193 686 q 297 726 234 692 q 434 761 359 761 q 620 692 544 761 q 697 516 697 624 l 697 -278 "}},cssFontWeight:"normal",ascender:1189,underlinePosition:-100,cssFontStyle:"normal",boundingBox:{yMin:-334,xMin:-111,yMax:1189,xMax:1672},resolution:1e3,original_font_information:{postscript_name:"Helvetiker-Regular",version_string:"Version 1.00 2004 initial release",vendor_url:"http://www.magenta.gr/",full_font_name:"Helvetiker",font_family_name:"Helvetiker",copyright:"Copyright (c) \u039Cagenta ltd, 2004",description:"",trademark:"",designer:"",designer_url:"",unique_font_identifier:"\u039Cagenta ltd:Helvetiker:22-10-104",license_url:"http://www.ellak.gr/fonts/MgOpen/license.html",license_description:`Copyright (c) 2004 by MAGENTA Ltd. All Rights Reserved.\r
3625
3656
  \r
3626
3657
  Permission is hereby granted, free of charge, to any person obtaining a copy of the fonts accompanying this license ("Fonts") and associated documentation files (the "Font Software"), to reproduce and distribute the Font Software, including without limitation the rights to use, copy, merge, publish, distribute, and/or sell copies of the Font Software, and to permit persons to whom the Font Software is furnished to do so, subject to the following conditions: \r
3627
3658
  \r
@@ -3633,49 +3664,49 @@ This License becomes null and void to the extent applicable to Fonts or Font Sof
3633
3664
  \r
3634
3665
  The Font Software may be sold as part of a larger software package but no copy of one or more of the Font Software typefaces may be sold by itself. \r
3635
3666
  \r
3636
- THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL MAGENTA OR PERSONS OR BODIES IN CHARGE OF ADMINISTRATION AND MAINTENANCE OF THE FONT SOFTWARE BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.`,manufacturer_name:"\u039Cagenta ltd",font_sub_family_name:"Regular"},descender:-334,familyName:"Helvetiker",lineHeight:1522,underlineThickness:50};var ot=class{execute(o,e){if(o<=1)return!1;let i;return o<4?i=[1,1,1]:o===4?i=[1,1,0]:i=[1,1,1],e.material.color.setRGB(i[0],i[1],i[2]),!0}};var vt=class t extends at{constructor(o,e){super(),this.colorChangeStrategy=e,this.name=o,this.boundingBoxCalculated=!1,this.material=new gf}updateColor(o){this.colorChangeStrategy.execute(o,this);for(let e of this.children)e instanceof t&&e.updateColor(o)}getWidth(){return this.updateBoundingBox(),this.geometry.boundingBox.max.x-this.geometry.boundingBox.min.x}getHeight(){return this.updateBoundingBox(),this.geometry.boundingBox.max.z-this.geometry.boundingBox.min.z}getDepth(){return this.updateBoundingBox(),this.geometry.boundingBox.max.y-this.geometry.boundingBox.min.y}isGeneralSizeChangeMesh(){return"changeSize"in this}updateBoundingBox(){this.boundingBoxCalculated||(this.geometry.computeBoundingBox(),this.boundingBoxCalculated=!0)}};var Rt=class extends vt{constructor(o,e,i=1,n=!0){super(o,e),this.minWidth=i,this.manualVisibility=n}setManualVisibility(o){this.manualVisibility=o,this.updateVisibility()}setCurrentWidth(o){this.currentWidth=o,this.updateVisibility()}updateVisibility(){let o=this.currentWidth?this.currentWidth>=this.minWidth:!0;this.visible=this.manualVisibility&&this.visibleBecauseOfColor&&o}updateColor(o){this.visibleBecauseOfColor=this.colorChangeStrategy.execute(o,this);for(let e of this.children)e instanceof vt&&e.updateColor(o);this.updateVisibility()}};var Ra=class extends Un{constructor(o,e={}){let i=e.font;if(i===void 0)super();else{let n=i.generateShapes(o,e.size,e.direction);e.depth===void 0&&(e.depth=50),e.bevelThickness===void 0&&(e.bevelThickness=10),e.bevelSize===void 0&&(e.bevelSize=8),e.bevelEnabled===void 0&&(e.bevelEnabled=!1),super(n,e)}this.type="TextGeometry"}};function No(t,o=!1){let e=t[0].index!==null,i=new Set(Object.keys(t[0].attributes)),n=new Set(Object.keys(t[0].morphAttributes)),r={},a={},s=t[0].morphTargetsRelative,l=new Jt,d=0;for(let c=0;c<t.length;++c){let u=t[c],m=0;if(e!==(u.index!==null))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+c+". All geometries must have compatible attributes; make sure index attribute exists among all geometries, or in none of them."),null;for(let g in u.attributes){if(!i.has(g))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+c+'. All geometries must have compatible attributes; make sure "'+g+'" attribute exists among all geometries, or in none of them.'),null;r[g]===void 0&&(r[g]=[]),r[g].push(u.attributes[g]),m++}if(m!==i.size)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+c+". Make sure all geometries have the same number of attributes."),null;if(s!==u.morphTargetsRelative)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+c+". .morphTargetsRelative must be consistent throughout all geometries."),null;for(let g in u.morphAttributes){if(!n.has(g))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+c+". .morphAttributes must be consistent throughout all geometries."),null;a[g]===void 0&&(a[g]=[]),a[g].push(u.morphAttributes[g])}if(o){let g;if(e)g=u.index.count;else if(u.attributes.position!==void 0)g=u.attributes.position.count;else return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+c+". The geometry must have either an index or a position attribute"),null;l.addGroup(d,g,c),d+=g}}if(e){let c=0,u=[];for(let m=0;m<t.length;++m){let g=t[m].index;for(let b=0;b<g.count;++b)u.push(g.getX(b)+c);c+=t[m].attributes.position.count}l.setIndex(u)}for(let c in r){let u=Cw(r[c]);if(!u)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the "+c+" attribute."),null;l.setAttribute(c,u)}for(let c in a){let u=a[c][0].length;if(u===0)break;l.morphAttributes=l.morphAttributes||{},l.morphAttributes[c]=[];for(let m=0;m<u;++m){let g=[];for(let y=0;y<a[c].length;++y)g.push(a[c][y][m]);let b=Cw(g);if(!b)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the "+c+" morphAttribute."),null;l.morphAttributes[c].push(b)}}return l}function Cw(t){let o,e,i,n=-1,r=0;for(let d=0;d<t.length;++d){let c=t[d];if(o===void 0&&(o=c.array.constructor),o!==c.array.constructor)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.array must be of consistent array types across matching attributes."),null;if(e===void 0&&(e=c.itemSize),e!==c.itemSize)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.itemSize must be consistent across matching attributes."),null;if(i===void 0&&(i=c.normalized),i!==c.normalized)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.normalized must be consistent across matching attributes."),null;if(n===-1&&(n=c.gpuType),n!==c.gpuType)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.gpuType must be consistent across matching attributes."),null;r+=c.count*e}let a=new o(r),s=new _o(a,e,i),l=0;for(let d=0;d<t.length;++d){let c=t[d];if(c.isInterleavedBufferAttribute){let u=l/e;for(let m=0,g=c.count;m<g;m++)for(let b=0;b<e;b++){let y=c.getComponent(m,b);s.setComponent(m+u,b,y)}}else a.set(c.array,l);l+=c.count*e}return n!==void 0&&(s.gpuType=n),s}var Dr=class{async create(o,e){let{font:i,side:n,text:r,xPosition:a,yPosition:s,align:l}=e;if(!r)return new Jt;let{textSize:d}=e;d||(d=.025);let c=l==="center"&&r.includes(`
3637
- `)?this.createMultilineCenteredTextGeometry(r,i,d,o.printHeight):new Ra(r,{font:i,size:d,depth:o.printHeight});c.center(),n==="back"&&c.rotateY(Math.PI),c.computeBoundingBox();let u=c.boundingBox.max.x-c.boundingBox.min.x,m=l==="center"?0:u/2,g=n==="front"?1:-1;return c.translate(g*(m+a),s,n==="front"?o.printHeight/2:-o.baseplateHeight+o.printHeight/2),c}createMultilineCenteredTextGeometry(o,e,i,n){let r=o.split(`
3638
- `),a=[];for(let[s,l]of r.entries()){let d=new Ra(l,{font:e,size:i,depth:n});d.center(),d.translate(0,-s*i*1.5,0),a.push(d)}return No(a)}};var oi=class extends Rt{constructor(o,e,i,n,r,a=new Dr){super(o,e,i,n),this.createTextGeometryOptions=r,this.createTextGeometryStrategy=a}async init(o){return this.geometry=await this.createTextGeometryStrategy.create(o,this.createTextGeometryOptions),this.updateColor(o.numberOfColors),this}async updateText(o){this.geometry=await this.createTextGeometryStrategy.create(o,this.createTextGeometryOptions),this.boundingBoxCalculated=!1}updateTextGeometryOptions(o){this.createTextGeometryOptions.text=o}};var Yc=class extends oi{constructor(o,e){let i={font:e,text:`IT Stabilization & Modernization
3639
- maibornwolff.de/service/it-sanierung`,side:"back",xPosition:0,yPosition:.23,align:"center"};super(o,new ot,200,!0,i)}};var I9=ff,Zc=class t extends Pd{constructor(o){super(o),this.defaultDPI=90,this.defaultUnit="px"}load(o,e,i,n){let r=this,a=new Nd(r.manager);a.setPath(r.path),a.setRequestHeader(r.requestHeader),a.setWithCredentials(r.withCredentials),a.load(o,function(s){try{e(r.parse(s))}catch(l){n?n(l):console.error(l),r.manager.itemError(o)}},i,n)}parse(o){let e=this;function i(P,C){if(P.nodeType!==1)return;let w=N(P),v=!1,Z=null;switch(P.nodeName){case"svg":C=b(P,C);break;case"style":r(P);break;case"g":C=b(P,C);break;case"path":C=b(P,C),P.hasAttribute("d")&&(Z=n(P));break;case"rect":C=b(P,C),Z=l(P);break;case"polygon":C=b(P,C),Z=d(P);break;case"polyline":C=b(P,C),Z=c(P);break;case"circle":C=b(P,C),Z=u(P);break;case"ellipse":C=b(P,C),Z=m(P);break;case"line":C=b(P,C),Z=g(P);break;case"defs":v=!0;break;case"use":C=b(P,C);let ce=(P.getAttributeNS("http://www.w3.org/1999/xlink","href")||"").substring(1),pe=P.viewportElement.getElementById(ce);pe?i(pe,C):console.warn("SVGLoader: 'use node' references non-existent node id: "+ce);break;default:}Z&&(C.fill!==void 0&&C.fill!=="none"&&Z.color.setStyle(C.fill,I9),H(Z,lt),$.push(Z),Z.userData={node:P,style:C});let de=P.childNodes;for(let U=0;U<de.length;U++){let ce=de[U];v&&ce.nodeName!=="style"&&ce.nodeName!=="defs"||i(ce,C)}w&&(be.pop(),be.length>0?lt.copy(be[be.length-1]):lt.identity())}function n(P){let C=new Di,w=new Ke,v=new Ke,Z=new Ke,de=!0,U=!1,ce=P.getAttribute("d");if(ce===""||ce==="none")return null;let pe=ce.match(/[a-df-z][^a-df-z]*/ig);for(let ge=0,ee=pe.length;ge<ee;ge++){let se=pe[ge],ye=se.charAt(0),Me=se.slice(1).trim();de===!0&&(U=!0,de=!1);let I;switch(ye){case"M":I=q(Me);for(let S=0,_e=I.length;S<_e;S+=2)w.x=I[S+0],w.y=I[S+1],v.x=w.x,v.y=w.y,S===0?C.moveTo(w.x,w.y):C.lineTo(w.x,w.y),S===0&&Z.copy(w);break;case"H":I=q(Me);for(let S=0,_e=I.length;S<_e;S++)w.x=I[S],v.x=w.x,v.y=w.y,C.lineTo(w.x,w.y),S===0&&U===!0&&Z.copy(w);break;case"V":I=q(Me);for(let S=0,_e=I.length;S<_e;S++)w.y=I[S],v.x=w.x,v.y=w.y,C.lineTo(w.x,w.y),S===0&&U===!0&&Z.copy(w);break;case"L":I=q(Me);for(let S=0,_e=I.length;S<_e;S+=2)w.x=I[S+0],w.y=I[S+1],v.x=w.x,v.y=w.y,C.lineTo(w.x,w.y),S===0&&U===!0&&Z.copy(w);break;case"C":I=q(Me);for(let S=0,_e=I.length;S<_e;S+=6)C.bezierCurveTo(I[S+0],I[S+1],I[S+2],I[S+3],I[S+4],I[S+5]),v.x=I[S+2],v.y=I[S+3],w.x=I[S+4],w.y=I[S+5],S===0&&U===!0&&Z.copy(w);break;case"S":I=q(Me);for(let S=0,_e=I.length;S<_e;S+=4)C.bezierCurveTo(y(w.x,v.x),y(w.y,v.y),I[S+0],I[S+1],I[S+2],I[S+3]),v.x=I[S+0],v.y=I[S+1],w.x=I[S+2],w.y=I[S+3],S===0&&U===!0&&Z.copy(w);break;case"Q":I=q(Me);for(let S=0,_e=I.length;S<_e;S+=4)C.quadraticCurveTo(I[S+0],I[S+1],I[S+2],I[S+3]),v.x=I[S+0],v.y=I[S+1],w.x=I[S+2],w.y=I[S+3],S===0&&U===!0&&Z.copy(w);break;case"T":I=q(Me);for(let S=0,_e=I.length;S<_e;S+=2){let He=y(w.x,v.x),Ht=y(w.y,v.y);C.quadraticCurveTo(He,Ht,I[S+0],I[S+1]),v.x=He,v.y=Ht,w.x=I[S+0],w.y=I[S+1],S===0&&U===!0&&Z.copy(w)}break;case"A":I=q(Me,[3,4],7);for(let S=0,_e=I.length;S<_e;S+=7){if(I[S+5]==w.x&&I[S+6]==w.y)continue;let He=w.clone();w.x=I[S+5],w.y=I[S+6],v.x=w.x,v.y=w.y,a(C,I[S],I[S+1],I[S+2],I[S+3],I[S+4],He,w),S===0&&U===!0&&Z.copy(w)}break;case"m":I=q(Me);for(let S=0,_e=I.length;S<_e;S+=2)w.x+=I[S+0],w.y+=I[S+1],v.x=w.x,v.y=w.y,S===0?C.moveTo(w.x,w.y):C.lineTo(w.x,w.y),S===0&&Z.copy(w);break;case"h":I=q(Me);for(let S=0,_e=I.length;S<_e;S++)w.x+=I[S],v.x=w.x,v.y=w.y,C.lineTo(w.x,w.y),S===0&&U===!0&&Z.copy(w);break;case"v":I=q(Me);for(let S=0,_e=I.length;S<_e;S++)w.y+=I[S],v.x=w.x,v.y=w.y,C.lineTo(w.x,w.y),S===0&&U===!0&&Z.copy(w);break;case"l":I=q(Me);for(let S=0,_e=I.length;S<_e;S+=2)w.x+=I[S+0],w.y+=I[S+1],v.x=w.x,v.y=w.y,C.lineTo(w.x,w.y),S===0&&U===!0&&Z.copy(w);break;case"c":I=q(Me);for(let S=0,_e=I.length;S<_e;S+=6)C.bezierCurveTo(w.x+I[S+0],w.y+I[S+1],w.x+I[S+2],w.y+I[S+3],w.x+I[S+4],w.y+I[S+5]),v.x=w.x+I[S+2],v.y=w.y+I[S+3],w.x+=I[S+4],w.y+=I[S+5],S===0&&U===!0&&Z.copy(w);break;case"s":I=q(Me);for(let S=0,_e=I.length;S<_e;S+=4)C.bezierCurveTo(y(w.x,v.x),y(w.y,v.y),w.x+I[S+0],w.y+I[S+1],w.x+I[S+2],w.y+I[S+3]),v.x=w.x+I[S+0],v.y=w.y+I[S+1],w.x+=I[S+2],w.y+=I[S+3],S===0&&U===!0&&Z.copy(w);break;case"q":I=q(Me);for(let S=0,_e=I.length;S<_e;S+=4)C.quadraticCurveTo(w.x+I[S+0],w.y+I[S+1],w.x+I[S+2],w.y+I[S+3]),v.x=w.x+I[S+0],v.y=w.y+I[S+1],w.x+=I[S+2],w.y+=I[S+3],S===0&&U===!0&&Z.copy(w);break;case"t":I=q(Me);for(let S=0,_e=I.length;S<_e;S+=2){let He=y(w.x,v.x),Ht=y(w.y,v.y);C.quadraticCurveTo(He,Ht,w.x+I[S+0],w.y+I[S+1]),v.x=He,v.y=Ht,w.x=w.x+I[S+0],w.y=w.y+I[S+1],S===0&&U===!0&&Z.copy(w)}break;case"a":I=q(Me,[3,4],7);for(let S=0,_e=I.length;S<_e;S+=7){if(I[S+5]==0&&I[S+6]==0)continue;let He=w.clone();w.x+=I[S+5],w.y+=I[S+6],v.x=w.x,v.y=w.y,a(C,I[S],I[S+1],I[S+2],I[S+3],I[S+4],He,w),S===0&&U===!0&&Z.copy(w)}break;case"Z":case"z":C.currentPath.autoClose=!0,C.currentPath.curves.length>0&&(w.copy(Z),C.currentPath.currentPoint.copy(w),de=!0);break;default:console.warn(se)}U=!1}return C}function r(P){if(!(!P.sheet||!P.sheet.cssRules||!P.sheet.cssRules.length))for(let C=0;C<P.sheet.cssRules.length;C++){let w=P.sheet.cssRules[C];if(w.type!==1)continue;let v=w.selectorText.split(/,/gm).filter(Boolean).map(Z=>Z.trim());for(let Z=0;Z<v.length;Z++){let de=Object.fromEntries(Object.entries(w.style).filter(([,U])=>U!==""));qe[v[Z]]=Object.assign(qe[v[Z]]||{},de)}}}function a(P,C,w,v,Z,de,U,ce){if(C==0||w==0){P.lineTo(ce.x,ce.y);return}v=v*Math.PI/180,C=Math.abs(C),w=Math.abs(w);let pe=(U.x-ce.x)/2,ge=(U.y-ce.y)/2,ee=Math.cos(v)*pe+Math.sin(v)*ge,se=-Math.sin(v)*pe+Math.cos(v)*ge,ye=C*C,Me=w*w,I=ee*ee,S=se*se,_e=I/ye+S/Me;if(_e>1){let Ha=Math.sqrt(_e);C=Ha*C,w=Ha*w,ye=C*C,Me=w*w}let He=ye*S+Me*I,Ht=(ye*Me-He)/He,xi=Math.sqrt(Math.max(0,Ht));Z===de&&(xi=-xi);let xt=xi*C*se/w,eo=-xi*w*ee/C,$a=Math.cos(v)*xt-Math.sin(v)*eo+(U.x+ce.x)/2,Tm=Math.sin(v)*xt+Math.cos(v)*eo+(U.y+ce.y)/2,ja=s(1,0,(ee-xt)/C,(se-eo)/w),Id=s((ee-xt)/C,(se-eo)/w,(-ee-xt)/C,(-se-eo)/w)%(Math.PI*2);P.currentPath.absellipse($a,Tm,C,w,ja,ja+Id,de===0,v)}function s(P,C,w,v){let Z=P*w+C*v,de=Math.sqrt(P*P+C*C)*Math.sqrt(w*w+v*v),U=Math.acos(Math.max(-1,Math.min(1,Z/de)));return P*v-C*w<0&&(U=-U),U}function l(P){let C=k(P.getAttribute("x")||0),w=k(P.getAttribute("y")||0),v=k(P.getAttribute("rx")||P.getAttribute("ry")||0),Z=k(P.getAttribute("ry")||P.getAttribute("rx")||0),de=k(P.getAttribute("width")),U=k(P.getAttribute("height")),ce=1-.551915024494,pe=new Di;return pe.moveTo(C+v,w),pe.lineTo(C+de-v,w),(v!==0||Z!==0)&&pe.bezierCurveTo(C+de-v*ce,w,C+de,w+Z*ce,C+de,w+Z),pe.lineTo(C+de,w+U-Z),(v!==0||Z!==0)&&pe.bezierCurveTo(C+de,w+U-Z*ce,C+de-v*ce,w+U,C+de-v,w+U),pe.lineTo(C+v,w+U),(v!==0||Z!==0)&&pe.bezierCurveTo(C+v*ce,w+U,C,w+U-Z*ce,C,w+U-Z),pe.lineTo(C,w+Z),(v!==0||Z!==0)&&pe.bezierCurveTo(C,w+Z*ce,C+v*ce,w,C+v,w),pe}function d(P){function C(de,U,ce){let pe=k(U),ge=k(ce);Z===0?v.moveTo(pe,ge):v.lineTo(pe,ge),Z++}let w=/([+-]?\d*\.?\d+(?:e[+-]?\d+)?)(?:,|\s)([+-]?\d*\.?\d+(?:e[+-]?\d+)?)/g,v=new Di,Z=0;return P.getAttribute("points").replace(w,C),v.currentPath.autoClose=!0,v}function c(P){function C(de,U,ce){let pe=k(U),ge=k(ce);Z===0?v.moveTo(pe,ge):v.lineTo(pe,ge),Z++}let w=/([+-]?\d*\.?\d+(?:e[+-]?\d+)?)(?:,|\s)([+-]?\d*\.?\d+(?:e[+-]?\d+)?)/g,v=new Di,Z=0;return P.getAttribute("points").replace(w,C),v.currentPath.autoClose=!1,v}function u(P){let C=k(P.getAttribute("cx")||0),w=k(P.getAttribute("cy")||0),v=k(P.getAttribute("r")||0),Z=new Is;Z.absarc(C,w,v,0,Math.PI*2);let de=new Di;return de.subPaths.push(Z),de}function m(P){let C=k(P.getAttribute("cx")||0),w=k(P.getAttribute("cy")||0),v=k(P.getAttribute("rx")||0),Z=k(P.getAttribute("ry")||0),de=new Is;de.absellipse(C,w,v,Z,0,Math.PI*2);let U=new Di;return U.subPaths.push(de),U}function g(P){let C=k(P.getAttribute("x1")||0),w=k(P.getAttribute("y1")||0),v=k(P.getAttribute("x2")||0),Z=k(P.getAttribute("y2")||0),de=new Di;return de.moveTo(C,w),de.lineTo(v,Z),de.currentPath.autoClose=!1,de}function b(P,C){C=Object.assign({},C);let w={};if(P.hasAttribute("class")){let U=P.getAttribute("class").split(/\s/).filter(Boolean).map(ce=>ce.trim());for(let ce=0;ce<U.length;ce++)w=Object.assign(w,qe["."+U[ce]])}P.hasAttribute("id")&&(w=Object.assign(w,qe["#"+P.getAttribute("id")]));function v(U,ce,pe){pe===void 0&&(pe=function(ee){return ee.startsWith("url")&&console.warn("SVGLoader: url access in attributes is not implemented."),ee}),P.hasAttribute(U)&&(C[ce]=pe(P.getAttribute(U))),w[ce]&&(C[ce]=pe(w[ce])),P.style&&P.style[U]!==""&&(C[ce]=pe(P.style[U]))}function Z(U){return Math.max(0,Math.min(1,k(U)))}function de(U){return Math.max(0,k(U))}return v("fill","fill"),v("fill-opacity","fillOpacity",Z),v("fill-rule","fillRule"),v("opacity","opacity",Z),v("stroke","stroke"),v("stroke-opacity","strokeOpacity",Z),v("stroke-width","strokeWidth",de),v("stroke-linejoin","strokeLineJoin"),v("stroke-linecap","strokeLineCap"),v("stroke-miterlimit","strokeMiterLimit",de),v("visibility","visibility"),C}function y(P,C){return P-(C-P)}function q(P,C,w){if(typeof P!="string")throw new TypeError("Invalid input: "+typeof P);let v={SEPARATOR:/[ \t\r\n\,.\-+]/,WHITESPACE:/[ \t\r\n]/,DIGIT:/[\d]/,SIGN:/[-+]/,POINT:/\./,COMMA:/,/,EXP:/e/i,FLAGS:/[01]/},Z=0,de=1,U=2,ce=3,pe=Z,ge=!0,ee="",se="",ye=[];function Me(He,Ht,xi){let xt=new SyntaxError('Unexpected character "'+He+'" at index '+Ht+".");throw xt.partial=xi,xt}function I(){ee!==""&&(se===""?ye.push(Number(ee)):ye.push(Number(ee)*Math.pow(10,Number(se)))),ee="",se=""}let S,_e=P.length;for(let He=0;He<_e;He++){if(S=P[He],Array.isArray(C)&&C.includes(ye.length%w)&&v.FLAGS.test(S)){pe=de,ee=S,I();continue}if(pe===Z){if(v.WHITESPACE.test(S))continue;if(v.DIGIT.test(S)||v.SIGN.test(S)){pe=de,ee=S;continue}if(v.POINT.test(S)){pe=U,ee=S;continue}v.COMMA.test(S)&&(ge&&Me(S,He,ye),ge=!0)}if(pe===de){if(v.DIGIT.test(S)){ee+=S;continue}if(v.POINT.test(S)){ee+=S,pe=U;continue}if(v.EXP.test(S)){pe=ce;continue}v.SIGN.test(S)&&ee.length===1&&v.SIGN.test(ee[0])&&Me(S,He,ye)}if(pe===U){if(v.DIGIT.test(S)){ee+=S;continue}if(v.EXP.test(S)){pe=ce;continue}v.POINT.test(S)&&ee[ee.length-1]==="."&&Me(S,He,ye)}if(pe===ce){if(v.DIGIT.test(S)){se+=S;continue}if(v.SIGN.test(S)){if(se===""){se+=S;continue}se.length===1&&v.SIGN.test(se)&&Me(S,He,ye)}}v.WHITESPACE.test(S)?(I(),pe=Z,ge=!1):v.COMMA.test(S)?(I(),pe=Z,ge=!0):v.SIGN.test(S)?(I(),pe=de,ee=S):v.POINT.test(S)?(I(),pe=U,ee=S):Me(S,He,ye)}return I(),ye}let D=["mm","cm","in","pt","pc","px"],j={mm:{mm:1,cm:.1,in:1/25.4,pt:72/25.4,pc:6/25.4,px:-1},cm:{mm:10,cm:1,in:1/2.54,pt:72/2.54,pc:6/2.54,px:-1},in:{mm:25.4,cm:2.54,in:1,pt:72,pc:6,px:-1},pt:{mm:25.4/72,cm:2.54/72,in:1/72,pt:1,pc:6/72,px:-1},pc:{mm:25.4/6,cm:2.54/6,in:1/6,pt:72/6,pc:1,px:-1},px:{px:1}};function k(P){let C="px";if(typeof P=="string"||P instanceof String)for(let v=0,Z=D.length;v<Z;v++){let de=D[v];if(P.endsWith(de)){C=de,P=P.substring(0,P.length-de.length);break}}let w;return C==="px"&&e.defaultUnit!=="px"?w=j.in[e.defaultUnit]/e.defaultDPI:(w=j[C][e.defaultUnit],w<0&&(w=j[C].in*e.defaultDPI)),w*parseFloat(P)}function N(P){if(!(P.hasAttribute("transform")||P.nodeName==="use"&&(P.hasAttribute("x")||P.hasAttribute("y"))))return null;let C=z(P);return be.length>0&&C.premultiply(be[be.length-1]),lt.copy(C),be.push(C),C}function z(P){let C=new Uo,w=Pe;if(P.nodeName==="use"&&(P.hasAttribute("x")||P.hasAttribute("y"))){let v=k(P.getAttribute("x")||0),Z=k(P.getAttribute("y")||0);C.translate(v,Z)}if(P.hasAttribute("transform")){let v=P.getAttribute("transform").split(")");for(let Z=v.length-1;Z>=0;Z--){let de=v[Z].trim();if(de==="")continue;let U=de.indexOf("("),ce=de.length;if(U>0&&U<ce){let pe=de.slice(0,U),ge=q(de.slice(U+1));switch(w.identity(),pe){case"translate":if(ge.length>=1){let ee=ge[0],se=0;ge.length>=2&&(se=ge[1]),w.translate(ee,se)}break;case"rotate":if(ge.length>=1){let ee=0,se=0,ye=0;ee=ge[0]*Math.PI/180,ge.length>=3&&(se=ge[1],ye=ge[2]),Oe.makeTranslation(-se,-ye),ve.makeRotation(ee),ie.multiplyMatrices(ve,Oe),Oe.makeTranslation(se,ye),w.multiplyMatrices(Oe,ie)}break;case"scale":if(ge.length>=1){let ee=ge[0],se=ee;ge.length>=2&&(se=ge[1]),w.scale(ee,se)}break;case"skewX":ge.length===1&&w.set(1,Math.tan(ge[0]*Math.PI/180),0,0,1,0,0,0,1);break;case"skewY":ge.length===1&&w.set(1,0,0,Math.tan(ge[0]*Math.PI/180),1,0,0,0,1);break;case"matrix":ge.length===6&&w.set(ge[0],ge[2],ge[4],ge[1],ge[3],ge[5],0,0,1);break}}C.premultiply(w)}}return C}function H(P,C){function w(U){We.set(U.x,U.y,1).applyMatrix3(C),U.set(We.x,We.y)}function v(U){let ce=U.xRadius,pe=U.yRadius,ge=Math.cos(U.aRotation),ee=Math.sin(U.aRotation),se=new Ze(ce*ge,ce*ee,0),ye=new Ze(-pe*ee,pe*ge,0),Me=se.applyMatrix3(C),I=ye.applyMatrix3(C),S=Pe.set(Me.x,I.x,0,Me.y,I.y,0,0,0,1),_e=Oe.copy(S).invert(),xi=ve.copy(_e).transpose().multiply(_e).elements,xt=Ie(xi[0],xi[1],xi[4]),eo=Math.sqrt(xt.rt1),$a=Math.sqrt(xt.rt2);if(U.xRadius=1/eo,U.yRadius=1/$a,U.aRotation=Math.atan2(xt.sn,xt.cs),!((U.aEndAngle-U.aStartAngle)%(2*Math.PI)<Number.EPSILON)){let ja=Oe.set(eo,0,0,0,$a,0,0,0,1),Id=ve.set(xt.cs,xt.sn,0,-xt.sn,xt.cs,0,0,0,1),Ha=ja.multiply(Id).multiply(S),Rm=Am=>{let{x:v5,y:x5}=new Ze(Math.cos(Am),Math.sin(Am),0).applyMatrix3(Ha);return Math.atan2(x5,v5)};U.aStartAngle=Rm(U.aStartAngle),U.aEndAngle=Rm(U.aEndAngle),G(C)&&(U.aClockwise=!U.aClockwise)}}function Z(U){let ce=X(C),pe=he(C);U.xRadius*=ce,U.yRadius*=pe;let ge=ce>Number.EPSILON?Math.atan2(C.elements[1],C.elements[0]):Math.atan2(-C.elements[3],C.elements[4]);U.aRotation+=ge,G(C)&&(U.aStartAngle*=-1,U.aEndAngle*=-1,U.aClockwise=!U.aClockwise)}let de=P.subPaths;for(let U=0,ce=de.length;U<ce;U++){let ge=de[U].curves;for(let ee=0;ee<ge.length;ee++){let se=ge[ee];se.isLineCurve?(w(se.v1),w(se.v2)):se.isCubicBezierCurve?(w(se.v0),w(se.v1),w(se.v2),w(se.v3)):se.isQuadraticBezierCurve?(w(se.v0),w(se.v1),w(se.v2)):se.isEllipseCurve&&(Xe.set(se.aX,se.aY),w(Xe),se.aX=Xe.x,se.aY=Xe.y,Y(C)?v(se):Z(se))}}}function G(P){let C=P.elements;return C[0]*C[4]-C[1]*C[3]<0}function Y(P){let C=P.elements,w=C[0]*C[3]+C[1]*C[4];if(w===0)return!1;let v=X(P),Z=he(P);return Math.abs(w/(v*Z))>Number.EPSILON}function X(P){let C=P.elements;return Math.sqrt(C[0]*C[0]+C[1]*C[1])}function he(P){let C=P.elements;return Math.sqrt(C[3]*C[3]+C[4]*C[4])}function Ie(P,C,w){let v,Z,de,U,ce,pe=P+w,ge=P-w,ee=Math.sqrt(ge*ge+4*C*C);return pe>0?(v=.5*(pe+ee),ce=1/v,Z=P*ce*w-C*ce*C):pe<0?Z=.5*(pe-ee):(v=.5*ee,Z=-.5*ee),ge>0?de=ge+ee:de=ge-ee,Math.abs(de)>2*Math.abs(C)?(ce=-2*C/de,U=1/Math.sqrt(1+ce*ce),de=ce*U):Math.abs(C)===0?(de=1,U=0):(ce=-.5*de/C,de=1/Math.sqrt(1+ce*ce),U=ce*de),ge>0&&(ce=de,de=-U,U=ce),{rt1:v,rt2:Z,cs:de,sn:U}}let $=[],qe={},be=[],Pe=new Uo,Oe=new Uo,ve=new Uo,ie=new Uo,Xe=new Ke,We=new Ze,lt=new Uo,Ot=new DOMParser().parseFromString(o,"image/svg+xml");return i(Ot.documentElement,{fill:"#000",fillOpacity:1,strokeOpacity:1,strokeWidth:1,strokeLineJoin:"miter",strokeLineCap:"butt",strokeMiterLimit:4}),{paths:$,xml:Ot.documentElement}}static createShapes(o){let i={ORIGIN:0,DESTINATION:1,BETWEEN:2,LEFT:3,RIGHT:4,BEHIND:5,BEYOND:6},n={loc:i.ORIGIN,t:0};function r(y,q,D,j){let k=y.x,N=q.x,z=D.x,H=j.x,G=y.y,Y=q.y,X=D.y,he=j.y,Ie=(H-z)*(G-X)-(he-X)*(k-z),$=(N-k)*(G-X)-(Y-G)*(k-z),qe=(he-X)*(N-k)-(H-z)*(Y-G),be=Ie/qe,Pe=$/qe;if(qe===0&&Ie!==0||be<=0||be>=1||Pe<0||Pe>1)return null;if(Ie===0&&qe===0){for(let Oe=0;Oe<2;Oe++)if(a(Oe===0?D:j,y,q),n.loc==i.ORIGIN){let ve=Oe===0?D:j;return{x:ve.x,y:ve.y,t:n.t}}else if(n.loc==i.BETWEEN){let ve=+(k+n.t*(N-k)).toPrecision(10),ie=+(G+n.t*(Y-G)).toPrecision(10);return{x:ve,y:ie,t:n.t}}return null}else{for(let ie=0;ie<2;ie++)if(a(ie===0?D:j,y,q),n.loc==i.ORIGIN){let Xe=ie===0?D:j;return{x:Xe.x,y:Xe.y,t:n.t}}let Oe=+(k+be*(N-k)).toPrecision(10),ve=+(G+be*(Y-G)).toPrecision(10);return{x:Oe,y:ve,t:be}}}function a(y,q,D){let j=D.x-q.x,k=D.y-q.y,N=y.x-q.x,z=y.y-q.y,H=j*z-N*k;if(y.x===q.x&&y.y===q.y){n.loc=i.ORIGIN,n.t=0;return}if(y.x===D.x&&y.y===D.y){n.loc=i.DESTINATION,n.t=1;return}if(H<-Number.EPSILON){n.loc=i.LEFT;return}if(H>Number.EPSILON){n.loc=i.RIGHT;return}if(j*N<0||k*z<0){n.loc=i.BEHIND;return}if(Math.sqrt(j*j+k*k)<Math.sqrt(N*N+z*z)){n.loc=i.BEYOND;return}let G;j!==0?G=N/j:G=z/k,n.loc=i.BETWEEN,n.t=G}function s(y,q){let D=[],j=[];for(let k=1;k<y.length;k++){let N=y[k-1],z=y[k];for(let H=1;H<q.length;H++){let G=q[H-1],Y=q[H],X=r(N,z,G,Y);X!==null&&D.find(he=>he.t<=X.t+Number.EPSILON&&he.t>=X.t-Number.EPSILON)===void 0&&(D.push(X),j.push(new Ke(X.x,X.y)))}}return j}function l(y,q,D){let j=new Ke;q.getCenter(j);let k=[];return D.forEach(N=>{N.boundingBox.containsPoint(j)&&s(y,N.points).forEach(H=>{k.push({identifier:N.identifier,isCW:N.isCW,point:H})})}),k.sort((N,z)=>N.point.x-z.point.x),k}function d(y,q,D,j,k){(k==null||k==="")&&(k="nonzero");let N=new Ke;y.boundingBox.getCenter(N);let z=[new Ke(D,N.y),new Ke(j,N.y)],H=l(z,y.boundingBox,q);H.sort(($,qe)=>$.point.x-qe.point.x);let G=[],Y=[];H.forEach($=>{$.identifier===y.identifier?G.push($):Y.push($)});let X=G[0].point.x,he=[],Ie=0;for(;Ie<Y.length&&Y[Ie].point.x<X;)he.length>0&&he[he.length-1]===Y[Ie].identifier?he.pop():he.push(Y[Ie].identifier),Ie++;if(he.push(y.identifier),k==="evenodd"){let $=he.length%2===0,qe=he[he.length-2];return{identifier:y.identifier,isHole:$,for:qe}}else if(k==="nonzero"){let $=!0,qe=null,be=null;for(let Pe=0;Pe<he.length;Pe++){let Oe=he[Pe];$?(be=q[Oe].isCW,$=!1,qe=Oe):be!==q[Oe].isCW&&(be=q[Oe].isCW,$=!0)}return{identifier:y.identifier,isHole:$,for:qe}}else console.warn('fill-rule: "'+k+'" is currently not implemented.')}let c=999999999,u=-999999999,m=o.subPaths.map(y=>{let q=y.getPoints(),D=-999999999,j=999999999,k=-999999999,N=999999999;for(let z=0;z<q.length;z++){let H=q[z];H.y>D&&(D=H.y),H.y<j&&(j=H.y),H.x>k&&(k=H.x),H.x<N&&(N=H.x)}return u<=k&&(u=k+1),c>=N&&(c=N-1),{curves:y.curves,points:q,isCW:yf.isClockWise(q),identifier:-1,boundingBox:new Cf(new Ke(N,j),new Ke(k,D))}});m=m.filter(y=>y.points.length>1);for(let y=0;y<m.length;y++)m[y].identifier=y;let g=m.map(y=>d(y,m,c,u,o.userData?o.userData.style.fillRule:void 0)),b=[];return m.forEach(y=>{if(!g[y.identifier].isHole){let D=new Fs;D.curves=y.curves,g.filter(k=>k.isHole&&k.for===y.identifier).forEach(k=>{let N=m[k.identifier],z=new Is;z.curves=N.curves,D.holes.push(z)}),b.push(D)}}),b}static getStrokeStyle(o,e,i,n,r){return o=o!==void 0?o:1,e=e!==void 0?e:"#000",i=i!==void 0?i:"miter",n=n!==void 0?n:"butt",r=r!==void 0?r:4,{strokeColor:e,strokeWidth:o,strokeLineJoin:i,strokeLineCap:n,strokeMiterLimit:r}}static pointsToStroke(o,e,i,n){let r=[],a=[],s=[];if(t.pointsToStrokeWithBuffers(o,e,i,n,r,a,s)===0)return null;let l=new Jt;return l.setAttribute("position",new Go(r,3)),l.setAttribute("normal",new Go(a,3)),l.setAttribute("uv",new Go(s,2)),l}static pointsToStrokeWithBuffers(o,e,i,n,r,a,s,l){let d=new Ke,c=new Ke,u=new Ke,m=new Ke,g=new Ke,b=new Ke,y=new Ke,q=new Ke,D=new Ke,j=new Ke,k=new Ke,N=new Ke,z=new Ke,H=new Ke,G=new Ke,Y=new Ke,X=new Ke;i=i!==void 0?i:12,n=n!==void 0?n:.001,l=l!==void 0?l:0,o=ge(o);let he=o.length;if(he<2)return 0;let Ie=o[0].equals(o[he-1]),$,qe=o[0],be,Pe=e.strokeWidth/2,Oe=1/(he-1),ve=0,ie,Xe,We,lt,Ot=!1,vi=0,P=l*3,C=l*2;w(o[0],o[1],d).multiplyScalar(Pe),q.copy(o[0]).sub(d),D.copy(o[0]).add(d),j.copy(q),k.copy(D);for(let ee=1;ee<he;ee++){$=o[ee],ee===he-1?Ie?be=o[1]:be=void 0:be=o[ee+1];let se=d;if(w(qe,$,se),u.copy(se).multiplyScalar(Pe),N.copy($).sub(u),z.copy($).add(u),ie=ve+Oe,Xe=!1,be!==void 0){w($,be,c),u.copy(c).multiplyScalar(Pe),H.copy($).sub(u),G.copy($).add(u),We=!0,u.subVectors(be,qe),se.dot(u)<0&&(We=!1),ee===1&&(Ot=We),u.subVectors(be,$),u.normalize();let ye=Math.abs(se.dot(u));if(ye>Number.EPSILON){let Me=Pe/ye;u.multiplyScalar(-Me),m.subVectors($,qe),g.copy(m).setLength(Me).add(u),Y.copy(g).negate();let I=g.length(),S=m.length();m.divideScalar(S),b.subVectors(be,$);let _e=b.length();switch(b.divideScalar(_e),m.dot(Y)<S&&b.dot(Y)<_e&&(Xe=!0),X.copy(g).add($),Y.add($),lt=!1,Xe?We?(G.copy(Y),z.copy(Y)):(H.copy(Y),N.copy(Y)):de(),e.strokeLineJoin){case"bevel":U(We,Xe,ie);break;case"round":ce(We,Xe),We?Z($,N,H,ie,0):Z($,G,z,ie,1);break;default:let He=Pe*e.strokeMiterLimit/I;if(He<1)if(e.strokeLineJoin!=="miter-clip"){U(We,Xe,ie);break}else ce(We,Xe),We?(b.subVectors(X,N).multiplyScalar(He).add(N),y.subVectors(X,H).multiplyScalar(He).add(H),v(N,ie,0),v(b,ie,0),v($,ie,.5),v($,ie,.5),v(b,ie,0),v(y,ie,0),v($,ie,.5),v(y,ie,0),v(H,ie,0)):(b.subVectors(X,z).multiplyScalar(He).add(z),y.subVectors(X,G).multiplyScalar(He).add(G),v(z,ie,1),v(b,ie,1),v($,ie,.5),v($,ie,.5),v(b,ie,1),v(y,ie,1),v($,ie,.5),v(y,ie,1),v(G,ie,1));else Xe?(We?(v(D,ve,1),v(q,ve,0),v(X,ie,0),v(D,ve,1),v(X,ie,0),v(Y,ie,1)):(v(D,ve,1),v(q,ve,0),v(X,ie,1),v(q,ve,0),v(Y,ie,0),v(X,ie,1)),We?H.copy(X):G.copy(X)):We?(v(N,ie,0),v(X,ie,0),v($,ie,.5),v($,ie,.5),v(X,ie,0),v(H,ie,0)):(v(z,ie,1),v(X,ie,1),v($,ie,.5),v($,ie,.5),v(X,ie,1),v(G,ie,1)),lt=!0;break}}else de()}else de();!Ie&&ee===he-1&&pe(o[0],j,k,We,!0,ve),ve=ie,qe=$,q.copy(H),D.copy(G)}if(!Ie)pe($,N,z,We,!1,ie);else if(Xe&&r){let ee=X,se=Y;Ot!==We&&(ee=Y,se=X),We?(lt||Ot)&&(se.toArray(r,0),se.toArray(r,9),lt&&ee.toArray(r,3)):(lt||!Ot)&&(se.toArray(r,3),se.toArray(r,9),lt&&ee.toArray(r,0))}return vi;function w(ee,se,ye){return ye.subVectors(se,ee),ye.set(-ye.y,ye.x).normalize()}function v(ee,se,ye){r&&(r[P]=ee.x,r[P+1]=ee.y,r[P+2]=0,a&&(a[P]=0,a[P+1]=0,a[P+2]=1),P+=3,s&&(s[C]=se,s[C+1]=ye,C+=2)),vi+=3}function Z(ee,se,ye,Me,I){d.copy(se).sub(ee).normalize(),c.copy(ye).sub(ee).normalize();let S=Math.PI,_e=d.dot(c);Math.abs(_e)<1&&(S=Math.abs(Math.acos(_e))),S/=i,u.copy(se);for(let He=0,Ht=i-1;He<Ht;He++)m.copy(u).rotateAround(ee,S),v(u,Me,I),v(m,Me,I),v(ee,Me,.5),u.copy(m);v(m,Me,I),v(ye,Me,I),v(ee,Me,.5)}function de(){v(D,ve,1),v(q,ve,0),v(N,ie,0),v(D,ve,1),v(N,ie,0),v(z,ie,1)}function U(ee,se,ye){se?ee?(v(D,ve,1),v(q,ve,0),v(N,ie,0),v(D,ve,1),v(N,ie,0),v(Y,ie,1),v(N,ye,0),v(H,ye,0),v(Y,ye,.5)):(v(D,ve,1),v(q,ve,0),v(z,ie,1),v(q,ve,0),v(Y,ie,0),v(z,ie,1),v(z,ye,1),v(Y,ye,0),v(G,ye,1)):ee?(v(N,ye,0),v(H,ye,0),v($,ye,.5)):(v(z,ye,1),v(G,ye,0),v($,ye,.5))}function ce(ee,se){se&&(ee?(v(D,ve,1),v(q,ve,0),v(N,ie,0),v(D,ve,1),v(N,ie,0),v(Y,ie,1),v(N,ve,0),v($,ie,.5),v(Y,ie,1),v($,ie,.5),v(H,ve,0),v(Y,ie,1)):(v(D,ve,1),v(q,ve,0),v(z,ie,1),v(q,ve,0),v(Y,ie,0),v(z,ie,1),v(z,ve,1),v(Y,ie,0),v($,ie,.5),v($,ie,.5),v(Y,ie,0),v(G,ve,1)))}function pe(ee,se,ye,Me,I,S){switch(e.strokeLineCap){case"round":I?Z(ee,ye,se,S,.5):Z(ee,se,ye,S,.5);break;case"square":if(I)d.subVectors(se,ee),c.set(d.y,-d.x),u.addVectors(d,c).add(ee),m.subVectors(c,d).add(ee),Me?(u.toArray(r,3),m.toArray(r,0),m.toArray(r,9)):(u.toArray(r,3),s[7]===1?m.toArray(r,9):u.toArray(r,9),m.toArray(r,0));else{d.subVectors(ye,ee),c.set(d.y,-d.x),u.addVectors(d,c).add(ee),m.subVectors(c,d).add(ee);let _e=r.length;Me?(u.toArray(r,_e-3),m.toArray(r,_e-6),m.toArray(r,_e-12)):(m.toArray(r,_e-6),u.toArray(r,_e-3),m.toArray(r,_e-12))}break;default:break}}function ge(ee){let se=!1;for(let Me=1,I=ee.length-1;Me<I;Me++)if(ee[Me].distanceTo(ee[Me+1])<n){se=!0;break}if(!se)return ee;let ye=[];ye.push(ee[0]);for(let Me=1,I=ee.length-1;Me<I;Me++)ee[Me].distanceTo(ee[Me+1])>=n&&ye.push(ee[Me]);return ye.push(ee[ee.length-1]),ye}}};var ni=class{async create(o,e){let i=e.filePath,n=new Zc;return new Promise((r,a)=>{n.load(i,function(s){let l=s.paths,d=[];for(let b of l){let y=b.toShapes(!0);for(let q of y){let D=new Un(q,{depth:o.printHeight,bevelEnabled:!1});d.push(D)}}let c=No(d);c.computeBoundingBox();let u=c.boundingBox.max.x-c.boundingBox.min.x,m=c.boundingBox.max.y-c.boundingBox.min.y,g=e.size/Math.max(u,m);c.scale(g,g,1),c.center(),e.side==="back"?c.rotateZ(Math.PI):(c.rotateZ(Math.PI),c.rotateY(Math.PI)),r(c)},void 0,function(s){console.error(`Error loading ${i}`),a(s)})})}};var Jc=class extends Rt{constructor(o){super(o,new ot,120,!0),this.name="BackMWLogo"}async init(o){let e=new ni,i=.31;this.geometry=await e.create(o,{filePath:"./codeCharta/assets/mw_logo_text.svg",size:i,side:"back"});let n=0,r=.37,a=-o.baseplateHeight+o.printHeight/2;return this.position.set(n,r,a),this.updateColor(o.numberOfColors),this}};var ed=class extends Rt{constructor(o,e=new ni){super(o,new ot,180,!0),this.createSvgStrategy=e}async init(o){this.geometry=await this.createSvgStrategy.create(o,{filePath:"./codeCharta/assets/codecharta_logo.svg",size:.17,side:"back"});let i=0,n=.18-.17/2,r=-o.baseplateHeight+o.printHeight/2;return this.position.set(i,n,r),this.updateColor(o.numberOfColors),this}};var td=class extends oi{constructor(o,e){let i={font:e,text:"github.com/MaibornWolff/codecharta",side:"back",xPosition:0,yPosition:0,align:"center"};super(o,new ot,200,!0,i)}};var id=class{execute(o,e){if(o<4)return!1;let i=[1,0,0];return e.material.color.setRGB(i[0],i[1],i[2]),!0}};var od=class{execute(o,e){if(o<4)return!1;let i=[1,1,0];return e.material.color.setRGB(i[0],i[1],i[2]),!0}};var nd=class{execute(o,e){if(o<4)return!1;let i=[0,1,0];return e.material.color.setRGB(i[0],i[1],i[2]),!0}};var vn=class extends Rt{constructor(o,e,i){super(o.name,new ot,200,!0),this.metricDescriptionBlockOptions=o,this.font=e,this.yOffset=i,this.createSvgGeometryStrategy=new ni,this.createTextGeometryStrategy=new Dr}async init(o){let e=await this.createIconGeometry(this.createSvgGeometryStrategy,o),i=await this.createTextGeometry(this.createTextGeometryStrategy,this.getText(),o);return this.geometry=No([e,i]),this.position.y=-.15+this.yOffset,this.updateColor(o.numberOfColors),this}async createTextGeometry(o,e,i){return o.create(i,{font:this.font,text:e,side:"back",xPosition:.05,yPosition:0,align:"left"})}async createIconGeometry(o,e){let i=await o.create(e,{filePath:`./codeCharta/assets/${this.metricDescriptionBlockOptions.iconFilename}`,size:this.metricDescriptionBlockOptions.iconScale,side:"back"});return i.translate(0,0,-e.baseplateHeight+e.printHeight/2),i}getText(){return`${this.metricDescriptionBlockOptions.nodeMetricData.name}
3667
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL MAGENTA OR PERSONS OR BODIES IN CHARGE OF ADMINISTRATION AND MAINTENANCE OF THE FONT SOFTWARE BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.`,manufacturer_name:"\u039Cagenta ltd",font_sub_family_name:"Regular"},descender:-334,familyName:"Helvetiker",lineHeight:1522,underlineThickness:50};var ot=class{execute(o,t){if(o<=1)return!1;let i;return o<4?i=[1,1,1]:o===4?i=[1,1,0]:i=[1,1,1],t.material.color.setRGB(i[0],i[1],i[2]),!0}};var vt=class e extends at{constructor(o,t){super(),this.colorChangeStrategy=t,this.name=o,this.boundingBoxCalculated=!1,this.material=new ff}updateColor(o){this.colorChangeStrategy.execute(o,this);for(let t of this.children)t instanceof e&&t.updateColor(o)}getWidth(){return this.updateBoundingBox(),this.geometry.boundingBox.max.x-this.geometry.boundingBox.min.x}getHeight(){return this.updateBoundingBox(),this.geometry.boundingBox.max.z-this.geometry.boundingBox.min.z}getDepth(){return this.updateBoundingBox(),this.geometry.boundingBox.max.y-this.geometry.boundingBox.min.y}isGeneralSizeChangeMesh(){return"changeSize"in this}updateBoundingBox(){this.boundingBoxCalculated||(this.geometry.computeBoundingBox(),this.boundingBoxCalculated=!0)}};var Rt=class extends vt{constructor(o,t,i=1,n=!0){super(o,t),this.minWidth=i,this.manualVisibility=n}setManualVisibility(o){this.manualVisibility=o,this.updateVisibility()}setCurrentWidth(o){this.currentWidth=o,this.updateVisibility()}updateVisibility(){let o=this.currentWidth?this.currentWidth>=this.minWidth:!0;this.visible=this.manualVisibility&&this.visibleBecauseOfColor&&o}updateColor(o){this.visibleBecauseOfColor=this.colorChangeStrategy.execute(o,this);for(let t of this.children)t instanceof vt&&t.updateColor(o);this.updateVisibility()}};var Ta=class extends Un{constructor(o,t={}){let i=t.font;if(i===void 0)super();else{let n=i.generateShapes(o,t.size,t.direction);t.depth===void 0&&(t.depth=50),t.bevelThickness===void 0&&(t.bevelThickness=10),t.bevelSize===void 0&&(t.bevelSize=8),t.bevelEnabled===void 0&&(t.bevelEnabled=!1),super(n,t)}this.type="TextGeometry"}};function No(e,o=!1){let t=e[0].index!==null,i=new Set(Object.keys(e[0].attributes)),n=new Set(Object.keys(e[0].morphAttributes)),r={},a={},s=e[0].morphTargetsRelative,l=new Jt,d=0;for(let c=0;c<e.length;++c){let u=e[c],m=0;if(t!==(u.index!==null))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+c+". All geometries must have compatible attributes; make sure index attribute exists among all geometries, or in none of them."),null;for(let g in u.attributes){if(!i.has(g))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+c+'. All geometries must have compatible attributes; make sure "'+g+'" attribute exists among all geometries, or in none of them.'),null;r[g]===void 0&&(r[g]=[]),r[g].push(u.attributes[g]),m++}if(m!==i.size)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+c+". Make sure all geometries have the same number of attributes."),null;if(s!==u.morphTargetsRelative)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+c+". .morphTargetsRelative must be consistent throughout all geometries."),null;for(let g in u.morphAttributes){if(!n.has(g))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+c+". .morphAttributes must be consistent throughout all geometries."),null;a[g]===void 0&&(a[g]=[]),a[g].push(u.morphAttributes[g])}if(o){let g;if(t)g=u.index.count;else if(u.attributes.position!==void 0)g=u.attributes.position.count;else return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+c+". The geometry must have either an index or a position attribute"),null;l.addGroup(d,g,c),d+=g}}if(t){let c=0,u=[];for(let m=0;m<e.length;++m){let g=e[m].index;for(let b=0;b<g.count;++b)u.push(g.getX(b)+c);c+=e[m].attributes.position.count}l.setIndex(u)}for(let c in r){let u=Sw(r[c]);if(!u)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the "+c+" attribute."),null;l.setAttribute(c,u)}for(let c in a){let u=a[c][0].length;if(u===0)break;l.morphAttributes=l.morphAttributes||{},l.morphAttributes[c]=[];for(let m=0;m<u;++m){let g=[];for(let y=0;y<a[c].length;++y)g.push(a[c][y][m]);let b=Sw(g);if(!b)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the "+c+" morphAttribute."),null;l.morphAttributes[c].push(b)}}return l}function Sw(e){let o,t,i,n=-1,r=0;for(let d=0;d<e.length;++d){let c=e[d];if(o===void 0&&(o=c.array.constructor),o!==c.array.constructor)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.array must be of consistent array types across matching attributes."),null;if(t===void 0&&(t=c.itemSize),t!==c.itemSize)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.itemSize must be consistent across matching attributes."),null;if(i===void 0&&(i=c.normalized),i!==c.normalized)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.normalized must be consistent across matching attributes."),null;if(n===-1&&(n=c.gpuType),n!==c.gpuType)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.gpuType must be consistent across matching attributes."),null;r+=c.count*t}let a=new o(r),s=new _o(a,t,i),l=0;for(let d=0;d<e.length;++d){let c=e[d];if(c.isInterleavedBufferAttribute){let u=l/t;for(let m=0,g=c.count;m<g;m++)for(let b=0;b<t;b++){let y=c.getComponent(m,b);s.setComponent(m+u,b,y)}}else a.set(c.array,l);l+=c.count*t}return n!==void 0&&(s.gpuType=n),s}var Lr=class{async create(o,t){let{font:i,side:n,text:r,xPosition:a,yPosition:s,align:l}=t;if(!r)return new Jt;let{textSize:d}=t;d||(d=.025);let c=l==="center"&&r.includes(`
3668
+ `)?this.createMultilineCenteredTextGeometry(r,i,d,o.printHeight):new Ta(r,{font:i,size:d,depth:o.printHeight});c.center(),n==="back"&&c.rotateY(Math.PI),c.computeBoundingBox();let u=c.boundingBox.max.x-c.boundingBox.min.x,m=l==="center"?0:u/2,g=n==="front"?1:-1;return c.translate(g*(m+a),s,n==="front"?o.printHeight/2:-o.baseplateHeight+o.printHeight/2),c}createMultilineCenteredTextGeometry(o,t,i,n){let r=o.split(`
3669
+ `),a=[];for(let[s,l]of r.entries()){let d=new Ta(l,{font:t,size:i,depth:n});d.center(),d.translate(0,-s*i*1.5,0),a.push(d)}return No(a)}};var oi=class extends Rt{constructor(o,t,i,n,r,a=new Lr){super(o,t,i,n),this.createTextGeometryOptions=r,this.createTextGeometryStrategy=a}async init(o){return this.geometry=await this.createTextGeometryStrategy.create(o,this.createTextGeometryOptions),this.updateColor(o.numberOfColors),this}async updateText(o){this.geometry=await this.createTextGeometryStrategy.create(o,this.createTextGeometryOptions),this.boundingBoxCalculated=!1}updateTextGeometryOptions(o){this.createTextGeometryOptions.text=o}};var Qc=class extends oi{constructor(o,t){let i={font:t,text:`IT Stabilization & Modernization
3670
+ maibornwolff.de/service/it-sanierung`,side:"back",xPosition:0,yPosition:.23,align:"center"};super(o,new ot,200,!0,i)}};var q9=pf,Yc=class e extends Dd{constructor(o){super(o),this.defaultDPI=90,this.defaultUnit="px"}load(o,t,i,n){let r=this,a=new Pd(r.manager);a.setPath(r.path),a.setRequestHeader(r.requestHeader),a.setWithCredentials(r.withCredentials),a.load(o,function(s){try{t(r.parse(s))}catch(l){n?n(l):console.error(l),r.manager.itemError(o)}},i,n)}parse(o){let t=this;function i(P,C){if(P.nodeType!==1)return;let w=N(P),v=!1,Z=null;switch(P.nodeName){case"svg":C=b(P,C);break;case"style":r(P);break;case"g":C=b(P,C);break;case"path":C=b(P,C),P.hasAttribute("d")&&(Z=n(P));break;case"rect":C=b(P,C),Z=l(P);break;case"polygon":C=b(P,C),Z=d(P);break;case"polyline":C=b(P,C),Z=c(P);break;case"circle":C=b(P,C),Z=u(P);break;case"ellipse":C=b(P,C),Z=m(P);break;case"line":C=b(P,C),Z=g(P);break;case"defs":v=!0;break;case"use":C=b(P,C);let ce=(P.getAttributeNS("http://www.w3.org/1999/xlink","href")||"").substring(1),pe=P.viewportElement.getElementById(ce);pe?i(pe,C):console.warn("SVGLoader: 'use node' references non-existent node id: "+ce);break;default:}Z&&(C.fill!==void 0&&C.fill!=="none"&&Z.color.setStyle(C.fill,q9),H(Z,lt),$.push(Z),Z.userData={node:P,style:C});let de=P.childNodes;for(let U=0;U<de.length;U++){let ce=de[U];v&&ce.nodeName!=="style"&&ce.nodeName!=="defs"||i(ce,C)}w&&(be.pop(),be.length>0?lt.copy(be[be.length-1]):lt.identity())}function n(P){let C=new Di,w=new Ke,v=new Ke,Z=new Ke,de=!0,U=!1,ce=P.getAttribute("d");if(ce===""||ce==="none")return null;let pe=ce.match(/[a-df-z][^a-df-z]*/ig);for(let ge=0,ee=pe.length;ge<ee;ge++){let se=pe[ge],ye=se.charAt(0),Ce=se.slice(1).trim();de===!0&&(U=!0,de=!1);let I;switch(ye){case"M":I=q(Ce);for(let S=0,Me=I.length;S<Me;S+=2)w.x=I[S+0],w.y=I[S+1],v.x=w.x,v.y=w.y,S===0?C.moveTo(w.x,w.y):C.lineTo(w.x,w.y),S===0&&Z.copy(w);break;case"H":I=q(Ce);for(let S=0,Me=I.length;S<Me;S++)w.x=I[S],v.x=w.x,v.y=w.y,C.lineTo(w.x,w.y),S===0&&U===!0&&Z.copy(w);break;case"V":I=q(Ce);for(let S=0,Me=I.length;S<Me;S++)w.y=I[S],v.x=w.x,v.y=w.y,C.lineTo(w.x,w.y),S===0&&U===!0&&Z.copy(w);break;case"L":I=q(Ce);for(let S=0,Me=I.length;S<Me;S+=2)w.x=I[S+0],w.y=I[S+1],v.x=w.x,v.y=w.y,C.lineTo(w.x,w.y),S===0&&U===!0&&Z.copy(w);break;case"C":I=q(Ce);for(let S=0,Me=I.length;S<Me;S+=6)C.bezierCurveTo(I[S+0],I[S+1],I[S+2],I[S+3],I[S+4],I[S+5]),v.x=I[S+2],v.y=I[S+3],w.x=I[S+4],w.y=I[S+5],S===0&&U===!0&&Z.copy(w);break;case"S":I=q(Ce);for(let S=0,Me=I.length;S<Me;S+=4)C.bezierCurveTo(y(w.x,v.x),y(w.y,v.y),I[S+0],I[S+1],I[S+2],I[S+3]),v.x=I[S+0],v.y=I[S+1],w.x=I[S+2],w.y=I[S+3],S===0&&U===!0&&Z.copy(w);break;case"Q":I=q(Ce);for(let S=0,Me=I.length;S<Me;S+=4)C.quadraticCurveTo(I[S+0],I[S+1],I[S+2],I[S+3]),v.x=I[S+0],v.y=I[S+1],w.x=I[S+2],w.y=I[S+3],S===0&&U===!0&&Z.copy(w);break;case"T":I=q(Ce);for(let S=0,Me=I.length;S<Me;S+=2){let He=y(w.x,v.x),Ht=y(w.y,v.y);C.quadraticCurveTo(He,Ht,I[S+0],I[S+1]),v.x=He,v.y=Ht,w.x=I[S+0],w.y=I[S+1],S===0&&U===!0&&Z.copy(w)}break;case"A":I=q(Ce,[3,4],7);for(let S=0,Me=I.length;S<Me;S+=7){if(I[S+5]==w.x&&I[S+6]==w.y)continue;let He=w.clone();w.x=I[S+5],w.y=I[S+6],v.x=w.x,v.y=w.y,a(C,I[S],I[S+1],I[S+2],I[S+3],I[S+4],He,w),S===0&&U===!0&&Z.copy(w)}break;case"m":I=q(Ce);for(let S=0,Me=I.length;S<Me;S+=2)w.x+=I[S+0],w.y+=I[S+1],v.x=w.x,v.y=w.y,S===0?C.moveTo(w.x,w.y):C.lineTo(w.x,w.y),S===0&&Z.copy(w);break;case"h":I=q(Ce);for(let S=0,Me=I.length;S<Me;S++)w.x+=I[S],v.x=w.x,v.y=w.y,C.lineTo(w.x,w.y),S===0&&U===!0&&Z.copy(w);break;case"v":I=q(Ce);for(let S=0,Me=I.length;S<Me;S++)w.y+=I[S],v.x=w.x,v.y=w.y,C.lineTo(w.x,w.y),S===0&&U===!0&&Z.copy(w);break;case"l":I=q(Ce);for(let S=0,Me=I.length;S<Me;S+=2)w.x+=I[S+0],w.y+=I[S+1],v.x=w.x,v.y=w.y,C.lineTo(w.x,w.y),S===0&&U===!0&&Z.copy(w);break;case"c":I=q(Ce);for(let S=0,Me=I.length;S<Me;S+=6)C.bezierCurveTo(w.x+I[S+0],w.y+I[S+1],w.x+I[S+2],w.y+I[S+3],w.x+I[S+4],w.y+I[S+5]),v.x=w.x+I[S+2],v.y=w.y+I[S+3],w.x+=I[S+4],w.y+=I[S+5],S===0&&U===!0&&Z.copy(w);break;case"s":I=q(Ce);for(let S=0,Me=I.length;S<Me;S+=4)C.bezierCurveTo(y(w.x,v.x),y(w.y,v.y),w.x+I[S+0],w.y+I[S+1],w.x+I[S+2],w.y+I[S+3]),v.x=w.x+I[S+0],v.y=w.y+I[S+1],w.x+=I[S+2],w.y+=I[S+3],S===0&&U===!0&&Z.copy(w);break;case"q":I=q(Ce);for(let S=0,Me=I.length;S<Me;S+=4)C.quadraticCurveTo(w.x+I[S+0],w.y+I[S+1],w.x+I[S+2],w.y+I[S+3]),v.x=w.x+I[S+0],v.y=w.y+I[S+1],w.x+=I[S+2],w.y+=I[S+3],S===0&&U===!0&&Z.copy(w);break;case"t":I=q(Ce);for(let S=0,Me=I.length;S<Me;S+=2){let He=y(w.x,v.x),Ht=y(w.y,v.y);C.quadraticCurveTo(He,Ht,w.x+I[S+0],w.y+I[S+1]),v.x=He,v.y=Ht,w.x=w.x+I[S+0],w.y=w.y+I[S+1],S===0&&U===!0&&Z.copy(w)}break;case"a":I=q(Ce,[3,4],7);for(let S=0,Me=I.length;S<Me;S+=7){if(I[S+5]==0&&I[S+6]==0)continue;let He=w.clone();w.x+=I[S+5],w.y+=I[S+6],v.x=w.x,v.y=w.y,a(C,I[S],I[S+1],I[S+2],I[S+3],I[S+4],He,w),S===0&&U===!0&&Z.copy(w)}break;case"Z":case"z":C.currentPath.autoClose=!0,C.currentPath.curves.length>0&&(w.copy(Z),C.currentPath.currentPoint.copy(w),de=!0);break;default:console.warn(se)}U=!1}return C}function r(P){if(!(!P.sheet||!P.sheet.cssRules||!P.sheet.cssRules.length))for(let C=0;C<P.sheet.cssRules.length;C++){let w=P.sheet.cssRules[C];if(w.type!==1)continue;let v=w.selectorText.split(/,/gm).filter(Boolean).map(Z=>Z.trim());for(let Z=0;Z<v.length;Z++){let de=Object.fromEntries(Object.entries(w.style).filter(([,U])=>U!==""));qe[v[Z]]=Object.assign(qe[v[Z]]||{},de)}}}function a(P,C,w,v,Z,de,U,ce){if(C==0||w==0){P.lineTo(ce.x,ce.y);return}v=v*Math.PI/180,C=Math.abs(C),w=Math.abs(w);let pe=(U.x-ce.x)/2,ge=(U.y-ce.y)/2,ee=Math.cos(v)*pe+Math.sin(v)*ge,se=-Math.sin(v)*pe+Math.cos(v)*ge,ye=C*C,Ce=w*w,I=ee*ee,S=se*se,Me=I/ye+S/Ce;if(Me>1){let ja=Math.sqrt(Me);C=ja*C,w=ja*w,ye=C*C,Ce=w*w}let He=ye*S+Ce*I,Ht=(ye*Ce-He)/He,xi=Math.sqrt(Math.max(0,Ht));Z===de&&(xi=-xi);let xt=xi*C*se/w,eo=-xi*w*ee/C,za=Math.cos(v)*xt-Math.sin(v)*eo+(U.x+ce.x)/2,qm=Math.sin(v)*xt+Math.cos(v)*eo+(U.y+ce.y)/2,$a=s(1,0,(ee-xt)/C,(se-eo)/w),Ad=s((ee-xt)/C,(se-eo)/w,(-ee-xt)/C,(-se-eo)/w)%(Math.PI*2);P.currentPath.absellipse(za,qm,C,w,$a,$a+Ad,de===0,v)}function s(P,C,w,v){let Z=P*w+C*v,de=Math.sqrt(P*P+C*C)*Math.sqrt(w*w+v*v),U=Math.acos(Math.max(-1,Math.min(1,Z/de)));return P*v-C*w<0&&(U=-U),U}function l(P){let C=k(P.getAttribute("x")||0),w=k(P.getAttribute("y")||0),v=k(P.getAttribute("rx")||P.getAttribute("ry")||0),Z=k(P.getAttribute("ry")||P.getAttribute("rx")||0),de=k(P.getAttribute("width")),U=k(P.getAttribute("height")),ce=1-.551915024494,pe=new Di;return pe.moveTo(C+v,w),pe.lineTo(C+de-v,w),(v!==0||Z!==0)&&pe.bezierCurveTo(C+de-v*ce,w,C+de,w+Z*ce,C+de,w+Z),pe.lineTo(C+de,w+U-Z),(v!==0||Z!==0)&&pe.bezierCurveTo(C+de,w+U-Z*ce,C+de-v*ce,w+U,C+de-v,w+U),pe.lineTo(C+v,w+U),(v!==0||Z!==0)&&pe.bezierCurveTo(C+v*ce,w+U,C,w+U-Z*ce,C,w+U-Z),pe.lineTo(C,w+Z),(v!==0||Z!==0)&&pe.bezierCurveTo(C,w+Z*ce,C+v*ce,w,C+v,w),pe}function d(P){function C(de,U,ce){let pe=k(U),ge=k(ce);Z===0?v.moveTo(pe,ge):v.lineTo(pe,ge),Z++}let w=/([+-]?\d*\.?\d+(?:e[+-]?\d+)?)(?:,|\s)([+-]?\d*\.?\d+(?:e[+-]?\d+)?)/g,v=new Di,Z=0;return P.getAttribute("points").replace(w,C),v.currentPath.autoClose=!0,v}function c(P){function C(de,U,ce){let pe=k(U),ge=k(ce);Z===0?v.moveTo(pe,ge):v.lineTo(pe,ge),Z++}let w=/([+-]?\d*\.?\d+(?:e[+-]?\d+)?)(?:,|\s)([+-]?\d*\.?\d+(?:e[+-]?\d+)?)/g,v=new Di,Z=0;return P.getAttribute("points").replace(w,C),v.currentPath.autoClose=!1,v}function u(P){let C=k(P.getAttribute("cx")||0),w=k(P.getAttribute("cy")||0),v=k(P.getAttribute("r")||0),Z=new As;Z.absarc(C,w,v,0,Math.PI*2);let de=new Di;return de.subPaths.push(Z),de}function m(P){let C=k(P.getAttribute("cx")||0),w=k(P.getAttribute("cy")||0),v=k(P.getAttribute("rx")||0),Z=k(P.getAttribute("ry")||0),de=new As;de.absellipse(C,w,v,Z,0,Math.PI*2);let U=new Di;return U.subPaths.push(de),U}function g(P){let C=k(P.getAttribute("x1")||0),w=k(P.getAttribute("y1")||0),v=k(P.getAttribute("x2")||0),Z=k(P.getAttribute("y2")||0),de=new Di;return de.moveTo(C,w),de.lineTo(v,Z),de.currentPath.autoClose=!1,de}function b(P,C){C=Object.assign({},C);let w={};if(P.hasAttribute("class")){let U=P.getAttribute("class").split(/\s/).filter(Boolean).map(ce=>ce.trim());for(let ce=0;ce<U.length;ce++)w=Object.assign(w,qe["."+U[ce]])}P.hasAttribute("id")&&(w=Object.assign(w,qe["#"+P.getAttribute("id")]));function v(U,ce,pe){pe===void 0&&(pe=function(ee){return ee.startsWith("url")&&console.warn("SVGLoader: url access in attributes is not implemented."),ee}),P.hasAttribute(U)&&(C[ce]=pe(P.getAttribute(U))),w[ce]&&(C[ce]=pe(w[ce])),P.style&&P.style[U]!==""&&(C[ce]=pe(P.style[U]))}function Z(U){return Math.max(0,Math.min(1,k(U)))}function de(U){return Math.max(0,k(U))}return v("fill","fill"),v("fill-opacity","fillOpacity",Z),v("fill-rule","fillRule"),v("opacity","opacity",Z),v("stroke","stroke"),v("stroke-opacity","strokeOpacity",Z),v("stroke-width","strokeWidth",de),v("stroke-linejoin","strokeLineJoin"),v("stroke-linecap","strokeLineCap"),v("stroke-miterlimit","strokeMiterLimit",de),v("visibility","visibility"),C}function y(P,C){return P-(C-P)}function q(P,C,w){if(typeof P!="string")throw new TypeError("Invalid input: "+typeof P);let v={SEPARATOR:/[ \t\r\n\,.\-+]/,WHITESPACE:/[ \t\r\n]/,DIGIT:/[\d]/,SIGN:/[-+]/,POINT:/\./,COMMA:/,/,EXP:/e/i,FLAGS:/[01]/},Z=0,de=1,U=2,ce=3,pe=Z,ge=!0,ee="",se="",ye=[];function Ce(He,Ht,xi){let xt=new SyntaxError('Unexpected character "'+He+'" at index '+Ht+".");throw xt.partial=xi,xt}function I(){ee!==""&&(se===""?ye.push(Number(ee)):ye.push(Number(ee)*Math.pow(10,Number(se)))),ee="",se=""}let S,Me=P.length;for(let He=0;He<Me;He++){if(S=P[He],Array.isArray(C)&&C.includes(ye.length%w)&&v.FLAGS.test(S)){pe=de,ee=S,I();continue}if(pe===Z){if(v.WHITESPACE.test(S))continue;if(v.DIGIT.test(S)||v.SIGN.test(S)){pe=de,ee=S;continue}if(v.POINT.test(S)){pe=U,ee=S;continue}v.COMMA.test(S)&&(ge&&Ce(S,He,ye),ge=!0)}if(pe===de){if(v.DIGIT.test(S)){ee+=S;continue}if(v.POINT.test(S)){ee+=S,pe=U;continue}if(v.EXP.test(S)){pe=ce;continue}v.SIGN.test(S)&&ee.length===1&&v.SIGN.test(ee[0])&&Ce(S,He,ye)}if(pe===U){if(v.DIGIT.test(S)){ee+=S;continue}if(v.EXP.test(S)){pe=ce;continue}v.POINT.test(S)&&ee[ee.length-1]==="."&&Ce(S,He,ye)}if(pe===ce){if(v.DIGIT.test(S)){se+=S;continue}if(v.SIGN.test(S)){if(se===""){se+=S;continue}se.length===1&&v.SIGN.test(se)&&Ce(S,He,ye)}}v.WHITESPACE.test(S)?(I(),pe=Z,ge=!1):v.COMMA.test(S)?(I(),pe=Z,ge=!0):v.SIGN.test(S)?(I(),pe=de,ee=S):v.POINT.test(S)?(I(),pe=U,ee=S):Ce(S,He,ye)}return I(),ye}let D=["mm","cm","in","pt","pc","px"],j={mm:{mm:1,cm:.1,in:1/25.4,pt:72/25.4,pc:6/25.4,px:-1},cm:{mm:10,cm:1,in:1/2.54,pt:72/2.54,pc:6/2.54,px:-1},in:{mm:25.4,cm:2.54,in:1,pt:72,pc:6,px:-1},pt:{mm:25.4/72,cm:2.54/72,in:1/72,pt:1,pc:6/72,px:-1},pc:{mm:25.4/6,cm:2.54/6,in:1/6,pt:72/6,pc:1,px:-1},px:{px:1}};function k(P){let C="px";if(typeof P=="string"||P instanceof String)for(let v=0,Z=D.length;v<Z;v++){let de=D[v];if(P.endsWith(de)){C=de,P=P.substring(0,P.length-de.length);break}}let w;return C==="px"&&t.defaultUnit!=="px"?w=j.in[t.defaultUnit]/t.defaultDPI:(w=j[C][t.defaultUnit],w<0&&(w=j[C].in*t.defaultDPI)),w*parseFloat(P)}function N(P){if(!(P.hasAttribute("transform")||P.nodeName==="use"&&(P.hasAttribute("x")||P.hasAttribute("y"))))return null;let C=z(P);return be.length>0&&C.premultiply(be[be.length-1]),lt.copy(C),be.push(C),C}function z(P){let C=new Uo,w=Pe;if(P.nodeName==="use"&&(P.hasAttribute("x")||P.hasAttribute("y"))){let v=k(P.getAttribute("x")||0),Z=k(P.getAttribute("y")||0);C.translate(v,Z)}if(P.hasAttribute("transform")){let v=P.getAttribute("transform").split(")");for(let Z=v.length-1;Z>=0;Z--){let de=v[Z].trim();if(de==="")continue;let U=de.indexOf("("),ce=de.length;if(U>0&&U<ce){let pe=de.slice(0,U),ge=q(de.slice(U+1));switch(w.identity(),pe){case"translate":if(ge.length>=1){let ee=ge[0],se=0;ge.length>=2&&(se=ge[1]),w.translate(ee,se)}break;case"rotate":if(ge.length>=1){let ee=0,se=0,ye=0;ee=ge[0]*Math.PI/180,ge.length>=3&&(se=ge[1],ye=ge[2]),Oe.makeTranslation(-se,-ye),ve.makeRotation(ee),ie.multiplyMatrices(ve,Oe),Oe.makeTranslation(se,ye),w.multiplyMatrices(Oe,ie)}break;case"scale":if(ge.length>=1){let ee=ge[0],se=ee;ge.length>=2&&(se=ge[1]),w.scale(ee,se)}break;case"skewX":ge.length===1&&w.set(1,Math.tan(ge[0]*Math.PI/180),0,0,1,0,0,0,1);break;case"skewY":ge.length===1&&w.set(1,0,0,Math.tan(ge[0]*Math.PI/180),1,0,0,0,1);break;case"matrix":ge.length===6&&w.set(ge[0],ge[2],ge[4],ge[1],ge[3],ge[5],0,0,1);break}}C.premultiply(w)}}return C}function H(P,C){function w(U){We.set(U.x,U.y,1).applyMatrix3(C),U.set(We.x,We.y)}function v(U){let ce=U.xRadius,pe=U.yRadius,ge=Math.cos(U.aRotation),ee=Math.sin(U.aRotation),se=new Ze(ce*ge,ce*ee,0),ye=new Ze(-pe*ee,pe*ge,0),Ce=se.applyMatrix3(C),I=ye.applyMatrix3(C),S=Pe.set(Ce.x,I.x,0,Ce.y,I.y,0,0,0,1),Me=Oe.copy(S).invert(),xi=ve.copy(Me).transpose().multiply(Me).elements,xt=Ae(xi[0],xi[1],xi[4]),eo=Math.sqrt(xt.rt1),za=Math.sqrt(xt.rt2);if(U.xRadius=1/eo,U.yRadius=1/za,U.aRotation=Math.atan2(xt.sn,xt.cs),!((U.aEndAngle-U.aStartAngle)%(2*Math.PI)<Number.EPSILON)){let $a=Oe.set(eo,0,0,0,za,0,0,0,1),Ad=ve.set(xt.cs,xt.sn,0,-xt.sn,xt.cs,0,0,0,1),ja=$a.multiply(Ad).multiply(S),Tm=Rm=>{let{x:g5,y:b5}=new Ze(Math.cos(Rm),Math.sin(Rm),0).applyMatrix3(ja);return Math.atan2(b5,g5)};U.aStartAngle=Tm(U.aStartAngle),U.aEndAngle=Tm(U.aEndAngle),G(C)&&(U.aClockwise=!U.aClockwise)}}function Z(U){let ce=X(C),pe=he(C);U.xRadius*=ce,U.yRadius*=pe;let ge=ce>Number.EPSILON?Math.atan2(C.elements[1],C.elements[0]):Math.atan2(-C.elements[3],C.elements[4]);U.aRotation+=ge,G(C)&&(U.aStartAngle*=-1,U.aEndAngle*=-1,U.aClockwise=!U.aClockwise)}let de=P.subPaths;for(let U=0,ce=de.length;U<ce;U++){let ge=de[U].curves;for(let ee=0;ee<ge.length;ee++){let se=ge[ee];se.isLineCurve?(w(se.v1),w(se.v2)):se.isCubicBezierCurve?(w(se.v0),w(se.v1),w(se.v2),w(se.v3)):se.isQuadraticBezierCurve?(w(se.v0),w(se.v1),w(se.v2)):se.isEllipseCurve&&(Ge.set(se.aX,se.aY),w(Ge),se.aX=Ge.x,se.aY=Ge.y,Y(C)?v(se):Z(se))}}}function G(P){let C=P.elements;return C[0]*C[4]-C[1]*C[3]<0}function Y(P){let C=P.elements,w=C[0]*C[3]+C[1]*C[4];if(w===0)return!1;let v=X(P),Z=he(P);return Math.abs(w/(v*Z))>Number.EPSILON}function X(P){let C=P.elements;return Math.sqrt(C[0]*C[0]+C[1]*C[1])}function he(P){let C=P.elements;return Math.sqrt(C[3]*C[3]+C[4]*C[4])}function Ae(P,C,w){let v,Z,de,U,ce,pe=P+w,ge=P-w,ee=Math.sqrt(ge*ge+4*C*C);return pe>0?(v=.5*(pe+ee),ce=1/v,Z=P*ce*w-C*ce*C):pe<0?Z=.5*(pe-ee):(v=.5*ee,Z=-.5*ee),ge>0?de=ge+ee:de=ge-ee,Math.abs(de)>2*Math.abs(C)?(ce=-2*C/de,U=1/Math.sqrt(1+ce*ce),de=ce*U):Math.abs(C)===0?(de=1,U=0):(ce=-.5*de/C,de=1/Math.sqrt(1+ce*ce),U=ce*de),ge>0&&(ce=de,de=-U,U=ce),{rt1:v,rt2:Z,cs:de,sn:U}}let $=[],qe={},be=[],Pe=new Uo,Oe=new Uo,ve=new Uo,ie=new Uo,Ge=new Ke,We=new Ze,lt=new Uo,Ot=new DOMParser().parseFromString(o,"image/svg+xml");return i(Ot.documentElement,{fill:"#000",fillOpacity:1,strokeOpacity:1,strokeWidth:1,strokeLineJoin:"miter",strokeLineCap:"butt",strokeMiterLimit:4}),{paths:$,xml:Ot.documentElement}}static createShapes(o){let i={ORIGIN:0,DESTINATION:1,BETWEEN:2,LEFT:3,RIGHT:4,BEHIND:5,BEYOND:6},n={loc:i.ORIGIN,t:0};function r(y,q,D,j){let k=y.x,N=q.x,z=D.x,H=j.x,G=y.y,Y=q.y,X=D.y,he=j.y,Ae=(H-z)*(G-X)-(he-X)*(k-z),$=(N-k)*(G-X)-(Y-G)*(k-z),qe=(he-X)*(N-k)-(H-z)*(Y-G),be=Ae/qe,Pe=$/qe;if(qe===0&&Ae!==0||be<=0||be>=1||Pe<0||Pe>1)return null;if(Ae===0&&qe===0){for(let Oe=0;Oe<2;Oe++)if(a(Oe===0?D:j,y,q),n.loc==i.ORIGIN){let ve=Oe===0?D:j;return{x:ve.x,y:ve.y,t:n.t}}else if(n.loc==i.BETWEEN){let ve=+(k+n.t*(N-k)).toPrecision(10),ie=+(G+n.t*(Y-G)).toPrecision(10);return{x:ve,y:ie,t:n.t}}return null}else{for(let ie=0;ie<2;ie++)if(a(ie===0?D:j,y,q),n.loc==i.ORIGIN){let Ge=ie===0?D:j;return{x:Ge.x,y:Ge.y,t:n.t}}let Oe=+(k+be*(N-k)).toPrecision(10),ve=+(G+be*(Y-G)).toPrecision(10);return{x:Oe,y:ve,t:be}}}function a(y,q,D){let j=D.x-q.x,k=D.y-q.y,N=y.x-q.x,z=y.y-q.y,H=j*z-N*k;if(y.x===q.x&&y.y===q.y){n.loc=i.ORIGIN,n.t=0;return}if(y.x===D.x&&y.y===D.y){n.loc=i.DESTINATION,n.t=1;return}if(H<-Number.EPSILON){n.loc=i.LEFT;return}if(H>Number.EPSILON){n.loc=i.RIGHT;return}if(j*N<0||k*z<0){n.loc=i.BEHIND;return}if(Math.sqrt(j*j+k*k)<Math.sqrt(N*N+z*z)){n.loc=i.BEYOND;return}let G;j!==0?G=N/j:G=z/k,n.loc=i.BETWEEN,n.t=G}function s(y,q){let D=[],j=[];for(let k=1;k<y.length;k++){let N=y[k-1],z=y[k];for(let H=1;H<q.length;H++){let G=q[H-1],Y=q[H],X=r(N,z,G,Y);X!==null&&D.find(he=>he.t<=X.t+Number.EPSILON&&he.t>=X.t-Number.EPSILON)===void 0&&(D.push(X),j.push(new Ke(X.x,X.y)))}}return j}function l(y,q,D){let j=new Ke;q.getCenter(j);let k=[];return D.forEach(N=>{N.boundingBox.containsPoint(j)&&s(y,N.points).forEach(H=>{k.push({identifier:N.identifier,isCW:N.isCW,point:H})})}),k.sort((N,z)=>N.point.x-z.point.x),k}function d(y,q,D,j,k){(k==null||k==="")&&(k="nonzero");let N=new Ke;y.boundingBox.getCenter(N);let z=[new Ke(D,N.y),new Ke(j,N.y)],H=l(z,y.boundingBox,q);H.sort(($,qe)=>$.point.x-qe.point.x);let G=[],Y=[];H.forEach($=>{$.identifier===y.identifier?G.push($):Y.push($)});let X=G[0].point.x,he=[],Ae=0;for(;Ae<Y.length&&Y[Ae].point.x<X;)he.length>0&&he[he.length-1]===Y[Ae].identifier?he.pop():he.push(Y[Ae].identifier),Ae++;if(he.push(y.identifier),k==="evenodd"){let $=he.length%2===0,qe=he[he.length-2];return{identifier:y.identifier,isHole:$,for:qe}}else if(k==="nonzero"){let $=!0,qe=null,be=null;for(let Pe=0;Pe<he.length;Pe++){let Oe=he[Pe];$?(be=q[Oe].isCW,$=!1,qe=Oe):be!==q[Oe].isCW&&(be=q[Oe].isCW,$=!0)}return{identifier:y.identifier,isHole:$,for:qe}}else console.warn('fill-rule: "'+k+'" is currently not implemented.')}let c=999999999,u=-999999999,m=o.subPaths.map(y=>{let q=y.getPoints(),D=-999999999,j=999999999,k=-999999999,N=999999999;for(let z=0;z<q.length;z++){let H=q[z];H.y>D&&(D=H.y),H.y<j&&(j=H.y),H.x>k&&(k=H.x),H.x<N&&(N=H.x)}return u<=k&&(u=k+1),c>=N&&(c=N-1),{curves:y.curves,points:q,isCW:wf.isClockWise(q),identifier:-1,boundingBox:new Sf(new Ke(N,j),new Ke(k,D))}});m=m.filter(y=>y.points.length>1);for(let y=0;y<m.length;y++)m[y].identifier=y;let g=m.map(y=>d(y,m,c,u,o.userData?o.userData.style.fillRule:void 0)),b=[];return m.forEach(y=>{if(!g[y.identifier].isHole){let D=new Is;D.curves=y.curves,g.filter(k=>k.isHole&&k.for===y.identifier).forEach(k=>{let N=m[k.identifier],z=new As;z.curves=N.curves,D.holes.push(z)}),b.push(D)}}),b}static getStrokeStyle(o,t,i,n,r){return o=o!==void 0?o:1,t=t!==void 0?t:"#000",i=i!==void 0?i:"miter",n=n!==void 0?n:"butt",r=r!==void 0?r:4,{strokeColor:t,strokeWidth:o,strokeLineJoin:i,strokeLineCap:n,strokeMiterLimit:r}}static pointsToStroke(o,t,i,n){let r=[],a=[],s=[];if(e.pointsToStrokeWithBuffers(o,t,i,n,r,a,s)===0)return null;let l=new Jt;return l.setAttribute("position",new Go(r,3)),l.setAttribute("normal",new Go(a,3)),l.setAttribute("uv",new Go(s,2)),l}static pointsToStrokeWithBuffers(o,t,i,n,r,a,s,l){let d=new Ke,c=new Ke,u=new Ke,m=new Ke,g=new Ke,b=new Ke,y=new Ke,q=new Ke,D=new Ke,j=new Ke,k=new Ke,N=new Ke,z=new Ke,H=new Ke,G=new Ke,Y=new Ke,X=new Ke;i=i!==void 0?i:12,n=n!==void 0?n:.001,l=l!==void 0?l:0,o=ge(o);let he=o.length;if(he<2)return 0;let Ae=o[0].equals(o[he-1]),$,qe=o[0],be,Pe=t.strokeWidth/2,Oe=1/(he-1),ve=0,ie,Ge,We,lt,Ot=!1,vi=0,P=l*3,C=l*2;w(o[0],o[1],d).multiplyScalar(Pe),q.copy(o[0]).sub(d),D.copy(o[0]).add(d),j.copy(q),k.copy(D);for(let ee=1;ee<he;ee++){$=o[ee],ee===he-1?Ae?be=o[1]:be=void 0:be=o[ee+1];let se=d;if(w(qe,$,se),u.copy(se).multiplyScalar(Pe),N.copy($).sub(u),z.copy($).add(u),ie=ve+Oe,Ge=!1,be!==void 0){w($,be,c),u.copy(c).multiplyScalar(Pe),H.copy($).sub(u),G.copy($).add(u),We=!0,u.subVectors(be,qe),se.dot(u)<0&&(We=!1),ee===1&&(Ot=We),u.subVectors(be,$),u.normalize();let ye=Math.abs(se.dot(u));if(ye>Number.EPSILON){let Ce=Pe/ye;u.multiplyScalar(-Ce),m.subVectors($,qe),g.copy(m).setLength(Ce).add(u),Y.copy(g).negate();let I=g.length(),S=m.length();m.divideScalar(S),b.subVectors(be,$);let Me=b.length();switch(b.divideScalar(Me),m.dot(Y)<S&&b.dot(Y)<Me&&(Ge=!0),X.copy(g).add($),Y.add($),lt=!1,Ge?We?(G.copy(Y),z.copy(Y)):(H.copy(Y),N.copy(Y)):de(),t.strokeLineJoin){case"bevel":U(We,Ge,ie);break;case"round":ce(We,Ge),We?Z($,N,H,ie,0):Z($,G,z,ie,1);break;default:let He=Pe*t.strokeMiterLimit/I;if(He<1)if(t.strokeLineJoin!=="miter-clip"){U(We,Ge,ie);break}else ce(We,Ge),We?(b.subVectors(X,N).multiplyScalar(He).add(N),y.subVectors(X,H).multiplyScalar(He).add(H),v(N,ie,0),v(b,ie,0),v($,ie,.5),v($,ie,.5),v(b,ie,0),v(y,ie,0),v($,ie,.5),v(y,ie,0),v(H,ie,0)):(b.subVectors(X,z).multiplyScalar(He).add(z),y.subVectors(X,G).multiplyScalar(He).add(G),v(z,ie,1),v(b,ie,1),v($,ie,.5),v($,ie,.5),v(b,ie,1),v(y,ie,1),v($,ie,.5),v(y,ie,1),v(G,ie,1));else Ge?(We?(v(D,ve,1),v(q,ve,0),v(X,ie,0),v(D,ve,1),v(X,ie,0),v(Y,ie,1)):(v(D,ve,1),v(q,ve,0),v(X,ie,1),v(q,ve,0),v(Y,ie,0),v(X,ie,1)),We?H.copy(X):G.copy(X)):We?(v(N,ie,0),v(X,ie,0),v($,ie,.5),v($,ie,.5),v(X,ie,0),v(H,ie,0)):(v(z,ie,1),v(X,ie,1),v($,ie,.5),v($,ie,.5),v(X,ie,1),v(G,ie,1)),lt=!0;break}}else de()}else de();!Ae&&ee===he-1&&pe(o[0],j,k,We,!0,ve),ve=ie,qe=$,q.copy(H),D.copy(G)}if(!Ae)pe($,N,z,We,!1,ie);else if(Ge&&r){let ee=X,se=Y;Ot!==We&&(ee=Y,se=X),We?(lt||Ot)&&(se.toArray(r,0),se.toArray(r,9),lt&&ee.toArray(r,3)):(lt||!Ot)&&(se.toArray(r,3),se.toArray(r,9),lt&&ee.toArray(r,0))}return vi;function w(ee,se,ye){return ye.subVectors(se,ee),ye.set(-ye.y,ye.x).normalize()}function v(ee,se,ye){r&&(r[P]=ee.x,r[P+1]=ee.y,r[P+2]=0,a&&(a[P]=0,a[P+1]=0,a[P+2]=1),P+=3,s&&(s[C]=se,s[C+1]=ye,C+=2)),vi+=3}function Z(ee,se,ye,Ce,I){d.copy(se).sub(ee).normalize(),c.copy(ye).sub(ee).normalize();let S=Math.PI,Me=d.dot(c);Math.abs(Me)<1&&(S=Math.abs(Math.acos(Me))),S/=i,u.copy(se);for(let He=0,Ht=i-1;He<Ht;He++)m.copy(u).rotateAround(ee,S),v(u,Ce,I),v(m,Ce,I),v(ee,Ce,.5),u.copy(m);v(m,Ce,I),v(ye,Ce,I),v(ee,Ce,.5)}function de(){v(D,ve,1),v(q,ve,0),v(N,ie,0),v(D,ve,1),v(N,ie,0),v(z,ie,1)}function U(ee,se,ye){se?ee?(v(D,ve,1),v(q,ve,0),v(N,ie,0),v(D,ve,1),v(N,ie,0),v(Y,ie,1),v(N,ye,0),v(H,ye,0),v(Y,ye,.5)):(v(D,ve,1),v(q,ve,0),v(z,ie,1),v(q,ve,0),v(Y,ie,0),v(z,ie,1),v(z,ye,1),v(Y,ye,0),v(G,ye,1)):ee?(v(N,ye,0),v(H,ye,0),v($,ye,.5)):(v(z,ye,1),v(G,ye,0),v($,ye,.5))}function ce(ee,se){se&&(ee?(v(D,ve,1),v(q,ve,0),v(N,ie,0),v(D,ve,1),v(N,ie,0),v(Y,ie,1),v(N,ve,0),v($,ie,.5),v(Y,ie,1),v($,ie,.5),v(H,ve,0),v(Y,ie,1)):(v(D,ve,1),v(q,ve,0),v(z,ie,1),v(q,ve,0),v(Y,ie,0),v(z,ie,1),v(z,ve,1),v(Y,ie,0),v($,ie,.5),v($,ie,.5),v(Y,ie,0),v(G,ve,1)))}function pe(ee,se,ye,Ce,I,S){switch(t.strokeLineCap){case"round":I?Z(ee,ye,se,S,.5):Z(ee,se,ye,S,.5);break;case"square":if(I)d.subVectors(se,ee),c.set(d.y,-d.x),u.addVectors(d,c).add(ee),m.subVectors(c,d).add(ee),Ce?(u.toArray(r,3),m.toArray(r,0),m.toArray(r,9)):(u.toArray(r,3),s[7]===1?m.toArray(r,9):u.toArray(r,9),m.toArray(r,0));else{d.subVectors(ye,ee),c.set(d.y,-d.x),u.addVectors(d,c).add(ee),m.subVectors(c,d).add(ee);let Me=r.length;Ce?(u.toArray(r,Me-3),m.toArray(r,Me-6),m.toArray(r,Me-12)):(m.toArray(r,Me-6),u.toArray(r,Me-3),m.toArray(r,Me-12))}break;default:break}}function ge(ee){let se=!1;for(let Ce=1,I=ee.length-1;Ce<I;Ce++)if(ee[Ce].distanceTo(ee[Ce+1])<n){se=!0;break}if(!se)return ee;let ye=[];ye.push(ee[0]);for(let Ce=1,I=ee.length-1;Ce<I;Ce++)ee[Ce].distanceTo(ee[Ce+1])>=n&&ye.push(ee[Ce]);return ye.push(ee[ee.length-1]),ye}}};var ni=class{async create(o,t){let i=t.filePath,n=new Yc;return new Promise((r,a)=>{n.load(i,function(s){let l=s.paths,d=[];for(let b of l){let y=b.toShapes(!0);for(let q of y){let D=new Un(q,{depth:o.printHeight,bevelEnabled:!1});d.push(D)}}let c=No(d);c.computeBoundingBox();let u=c.boundingBox.max.x-c.boundingBox.min.x,m=c.boundingBox.max.y-c.boundingBox.min.y,g=t.size/Math.max(u,m);c.scale(g,g,1),c.center(),t.side==="back"?c.rotateZ(Math.PI):(c.rotateZ(Math.PI),c.rotateY(Math.PI)),r(c)},void 0,function(s){console.error(`Error loading ${i}`),a(s)})})}};var Zc=class extends Rt{constructor(o){super(o,new ot,120,!0),this.name="BackMWLogo"}async init(o){let t=new ni,i=.31;this.geometry=await t.create(o,{filePath:"./codeCharta/assets/mw_logo_text.svg",size:i,side:"back"});let n=0,r=.37,a=-o.baseplateHeight+o.printHeight/2;return this.position.set(n,r,a),this.updateColor(o.numberOfColors),this}};var Jc=class extends Rt{constructor(o,t=new ni){super(o,new ot,180,!0),this.createSvgStrategy=t}async init(o){this.geometry=await this.createSvgStrategy.create(o,{filePath:"./codeCharta/assets/codecharta_logo.svg",size:.17,side:"back"});let i=0,n=.18-.17/2,r=-o.baseplateHeight+o.printHeight/2;return this.position.set(i,n,r),this.updateColor(o.numberOfColors),this}};var ed=class extends oi{constructor(o,t){let i={font:t,text:"github.com/MaibornWolff/codecharta",side:"back",xPosition:0,yPosition:0,align:"center"};super(o,new ot,200,!0,i)}};var td=class{execute(o,t){if(o<4)return!1;let i=[1,0,0];return t.material.color.setRGB(i[0],i[1],i[2]),!0}};var id=class{execute(o,t){if(o<4)return!1;let i=[1,1,0];return t.material.color.setRGB(i[0],i[1],i[2]),!0}};var od=class{execute(o,t){if(o<4)return!1;let i=[0,1,0];return t.material.color.setRGB(i[0],i[1],i[2]),!0}};var vn=class extends Rt{constructor(o,t,i){super(o.name,new ot,200,!0),this.metricDescriptionBlockOptions=o,this.font=t,this.yOffset=i,this.createSvgGeometryStrategy=new ni,this.createTextGeometryStrategy=new Lr}async init(o){let t=await this.createIconGeometry(this.createSvgGeometryStrategy,o),i=await this.createTextGeometry(this.createTextGeometryStrategy,this.getText(),o);return this.geometry=No([t,i]),this.position.y=-.15+this.yOffset,this.updateColor(o.numberOfColors),this}async createTextGeometry(o,t,i){return o.create(i,{font:this.font,text:t,side:"back",xPosition:.05,yPosition:0,align:"left"})}async createIconGeometry(o,t){let i=await o.create(t,{filePath:`./codeCharta/assets/${this.metricDescriptionBlockOptions.iconFilename}`,size:this.metricDescriptionBlockOptions.iconScale,side:"back"});return i.translate(0,0,-t.baseplateHeight+t.printHeight/2),i}getText(){return`${this.metricDescriptionBlockOptions.nodeMetricData.name}
3640
3671
  ${this.metricDescriptionBlockOptions.title}
3641
- Value range: ${this.metricDescriptionBlockOptions.nodeMetricData.minValue} - ${this.metricDescriptionBlockOptions.nodeMetricData.maxValue}`}};var rd=class extends vn{constructor(o,e,i){super(o,e,i)}async init(o){let e=await this.createColoredBackTextChildren(o);for(let i of e)this.add(i);return super.init(o),this}async createTextGeometry(o,e,i){return o.create(i,{font:this.font,text:e,side:"back",xPosition:.05,yPosition:.015,align:"left"})}getText(){return`${this.metricDescriptionBlockOptions.nodeMetricData.name}
3672
+ Value range: ${this.metricDescriptionBlockOptions.nodeMetricData.minValue} - ${this.metricDescriptionBlockOptions.nodeMetricData.maxValue}`}};var nd=class extends vn{constructor(o,t,i){super(o,t,i)}async init(o){let t=await this.createColoredBackTextChildren(o);for(let i of t)this.add(i);return super.init(o),this}async createTextGeometry(o,t,i){return o.create(i,{font:this.font,text:t,side:"back",xPosition:.05,yPosition:.015,align:"left"})}getText(){return`${this.metricDescriptionBlockOptions.nodeMetricData.name}
3642
3673
  ${this.metricDescriptionBlockOptions.title}
3643
- `}async createColoredBackTextChildren(o){let e=this.metricDescriptionBlockOptions,i=[],n=["Value ranges:",`${e.nodeMetricData.minValue} - ${e.colorRange.from-1}`,"/",`${e.colorRange.from} - ${e.colorRange.to-1}`,"/",`${e.colorRange.to} - ${e.nodeMetricData.maxValue}`],r=[new ot,new nd,new ot,new od,new ot,new id],a=.05;for(let s=0;s<n.length;s+=1){let l=`ColorMetricLastLine${s}`,d={font:this.font,text:n[s],side:"back",xPosition:a,yPosition:-.045,align:"left"},c=await new oi(l,r[s],200,!0,d).init(o);this.updateColor(o.numberOfColors),i.push(c),s!==n.length-1&&(a+=c.getWidth()+.03)}return i}};var ad=class extends vt{constructor(o,e){super(o,new ot),this.font=e}async init(o){let{areaIcon:e,areaIconScale:i}=this.createAreaAttributes(),{heightIcon:n,heightIconScale:r}=this.createHeightAttributes(),{colorIcon:a,colorIconScale:s}=this.createColorAttributes(),l=await new vn({name:"HeigthMetricBlock",title:o.heightMetricTitle,iconFilename:n,iconScale:r,nodeMetricData:o.heightMetricData},this.font,.05).init(o);this.add(l);let d=await new vn({name:"AreaMetricBlock",title:o.areaMetricTitle,iconFilename:e,iconScale:i,nodeMetricData:o.areaMetricData},this.font,-.1).init(o);this.add(d);let c=await new rd({name:"ColorMetricBlock",title:o.colorMetricTitle,iconFilename:a,iconScale:s,nodeMetricData:o.colorMetricData,colorRange:o.colorRange},this.font,-.25).init(o);return this.add(c),this.centerMetricsMeshInXDirection(),this}centerMetricsMeshInXDirection(){let o={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};this.traverse(e=>{if(e instanceof at&&e.visible){e.geometry.computeBoundingBox();let{min:i,max:n}=e.geometry.boundingBox;o.min=Math.min(o.min,i.x),o.max=Math.max(o.max,n.x)}}),this.position.x=(o.max-o.min)/2}createColorAttributes(){return{colorIcon:"color_icon_for_3D_print.svg",colorIconScale:.075}}createHeightAttributes(){return{heightIcon:"height_icon_for_3D_print.svg",heightIconScale:.09}}createAreaAttributes(){return{areaIcon:"area_icon_for_3D_print.svg",areaIconScale:.075}}};var M4=Im(C4());var vd=class extends Rt{constructor(o){super(o,new ot,0,!1)}async init(o){this.geometry=await this.create(o);let e=.45,i=.45,n=-o.baseplateHeight+o.printHeight/2;return this.position.set(e,i,n),this.updateColor(o.numberOfColors),this}async changeText(o){this.geometry=await this.create(o)}async create(o){if(!o.qrCodeText||o.qrCodeText.length===0)return new Jt;let e=document.createElement("canvas");await M4.toCanvas(e,o.qrCodeText,{errorCorrectionLevel:"H"});let n=e.getContext("2d").getImageData(0,0,e.width,e.height),r=[],a=.6/n.width;for(let s=0;s<n.height;s+=4)for(let l=0;l<n.width;l+=4){let d=(s*n.width+l)*4;if(n.data[d]!==0){let c=new Eo(a,a,o.printHeight);c.translate(-l/4*a,-s/4*a,0),r.push(c)}}return this.updateMinWidth(a),No(r)}updateMinWidth(o){this.minWidth=.6/o}};var xd=class extends vt{constructor(o){let e=new ot;super("BackPrintContainer",e),this.font=o}async init(o){return this.childrenMeshes=new Map,this.childrenMeshes.set("BackMWLogo",new Jc("BackMWLogo")),this.childrenMeshes.set("BackBelowLogoText",new Yc("BackBelowLogoText",this.font)),this.childrenMeshes.set("QrCode",new vd("QrCode")),this.childrenMeshes.set("CodeChartaLogo",new ed("CodeChartaLogo")),this.childrenMeshes.set("CodeChartaText",new td("CodeChartaText",this.font)),this.childrenMeshes.set("MetricDescriptionsContainer",new ad("MetricDescriptionsContainer",this.font)),await Promise.all([...this.childrenMeshes.values()].map(async e=>{await e.init(o),this.add(e)})),this.changeSize(o,1),this}changeSize(o,e){let i=o.width/e;this.scale.set(this.scale.x*i,this.scale.y*i,this.scale.z),this.traverse(n=>{n instanceof Rt&&n.setCurrentWidth(o.width)})}isQRCodeVisible(){return this.childrenMeshes.get("QrCode").visible}async updateQrCodeText(o,e){e.qrCodeText=o,await this.childrenMeshes.get("QrCode").changeText(e)}updateQrCodeVisibility(o){this.childrenMeshes.get("QrCode").setManualVisibility(o)}getChildrenMeshes(){return this.childrenMeshes}};var wd=class{execute(o,e){let i=e.material;return i.defaultAttributeValues.color=o===1?[1,1,1]:[.5,.5,.5],!0}};var yd=class{async create(o){let{width:e,secondRowVisible:i,mapSideOffset:n,baseplateHeight:r,frontTextSize:a,secondRowTextSize:s}=o,l=5,d=Math.sqrt(2*Math.pow(n,2))/(Math.sqrt(2)-1)-1;d<l&&(l=d);let c=new Fs,u=i?s*1.5:0,m=e+a+u;c.absarc(e-l,l,l,Math.PI*1.5,Math.PI*2,!1),c.absarc(e-l,m-l,l,0,Math.PI*.5,!1),c.absarc(l,m-l,l,Math.PI*.5,Math.PI,!1),c.absarc(l,l,l,Math.PI,Math.PI*1.5,!1);let g=new Un(c,{depth:r,bevelEnabled:!1});return g.translate(-e/2,-e/2-a-u,-r),g}};var Sd=class extends vt{constructor(o=new yd){super("Baseplate",new wd),this.createBaseplateGeometryStrategy=o}async init(o){this.createBaseplateGeometryStrategy.create(o).then(i=>{this.geometry=i});let e=new bf;return e.copy(o.defaultMaterial),e.polygonOffset=!0,e.polygonOffsetUnits=1,e.polygonOffsetFactor=.1,this.material=e,this.updateColor(o.numberOfColors),this}changeSize(o){this.boundingBoxCalculated=!1,this.createBaseplateGeometryStrategy.create(o).then(e=>{this.geometry=e})}};var zo=class{execute(o,e){let i;return o<4?i=[1,1,1]:o===4?i=[1,1,0]:i=[1,1,1],e.material.color.setRGB(i[0],i[1],i[2]),!0}};var $o=class extends vt{constructor(o,e){super(o,new zo),this.alignment=e}changeRelativeSize(o){let e=this.getWidth();this.boundingBoxCalculated=!1;let i=o.secondRowVisible,n=i?(o.frontTextSize+o.secondRowTextSize)/o.frontTextSize:1;this.scale.x=n,this.scale.y=n;let r=i?-1:1,a=this.alignment==="left"?-1:1;this.translateY(r*o.secondRowTextSize);let s=i?e/this.getWidth():this.getWidth()/e;this.translateX(2*s*a*r)}};var Cd=class extends $o{constructor(o,e){super(o,"left"),this.filePath=e}async init(o){let e=new ni,i=o.frontTextSize*o.width/200;this.geometry=await e.create(o,{filePath:this.filePath,size:i,side:"front"});let n=-o.width/2+i/2+o.mapSideOffset/2,r=i/2,a=o.printHeight/2;return this.position.set(n,r,a),o.secondRowVisible&&this.changeRelativeSize(o),this.updateColor(o.numberOfColors),this}setColor(o){this.material.color.set(o)}rotate(){this.geometry.rotateZ(Math.PI/2)}flip(){this.geometry.rotateY(Math.PI)}changeSize(o,e){this.position.x-=(o.width-e)/2}};var Md=class extends $o{constructor(o){super(o,"right")}async init(o,e=new ni){let i=o.frontTextSize*o.width/250;this.geometry=await e.create(o,{filePath:"./codeCharta/assets/mw_logo.svg",size:i,side:"front"});let n=o.width/2-i/2-o.mapSideOffset/2,r=i/2,a=o.printHeight/2;return this.position.set(n,r,a),o.secondRowVisible&&this.changeRelativeSize(o),this.updateColor(o.numberOfColors),this}changeSize(o,e){this.position.x+=(o.width-e)/2}};var _d=class extends oi{constructor(o,e,i){let n=i.frontText;n||(n="FrontText");let r={font:e,side:"front",text:n,xPosition:0,yPosition:i.frontTextSize/2,textSize:i.frontTextSize,align:"center"};super(o,new zo,0,!0,r),this.name="Front Text"}};var Ed=class extends oi{constructor(o,e,i){let n={font:e,text:i.secondRowText,side:"front",xPosition:0,yPosition:-i.secondRowTextSize,textSize:i.secondRowTextSize,align:"center"};super(o,new zo,0,!1,n)}};var kd=class extends vt{constructor(o){let e=new ot;super("FrontPrintContainer",e),this.font=o}async init(o){return this.childrenMeshes=new Map,this.childrenMeshes.set("FrontText",new _d("FrontText",this.font,o)),this.childrenMeshes.set("SecondRowText",new Ed("SecondRowText",this.font,o)),this.childrenMeshes.set("FrontMWLogo",new Md("FrontMWLogo")),await Promise.all([...this.childrenMeshes.values()].map(async e=>{await e.init(o),this.add(e)})),this.position.y=-o.width/2-o.mapSideOffset/2,this}async addCustomLogo(o,e){this.childrenMeshes.has("CustomLogo")&&this.removeCustomLogo();let i=await new Cd("CustomLogo",o).init(e);this.add(i),this.childrenMeshes.set(i.name,i)}rotateCustomLogo(){this.childrenMeshes.get("CustomLogo").rotate()}flipCustomLogo(){this.childrenMeshes.get("CustomLogo").flip()}removeCustomLogo(){this.remove(this.childrenMeshes.get("CustomLogo")),this.childrenMeshes.delete("CustomLogo")}updateCustomLogoColor(o){this.childrenMeshes.get("CustomLogo").setColor(o)}async updateFrontText(o,e){let i=this.childrenMeshes.get("FrontText");i.updateTextGeometryOptions(o),await i.updateText(e)}changeSize(o,e){this.position.y-=(o.width-e)/2;for(let i of this.childrenMeshes.values())i instanceof $o&&i.isGeneralSizeChangeMesh()&&i.changeSize(o,e)}async updateSecondRowText(o,e){let i=this.childrenMeshes.get("SecondRowText");i.updateTextGeometryOptions(o),await i.updateText(e)}updateSecondRowVisibility(o){let e=this.childrenMeshes.get("FrontMWLogo"),i=this.childrenMeshes.get("SecondRowText"),n=this.childrenMeshes.get("CustomLogo");i.setManualVisibility(o.secondRowVisible),e.changeRelativeSize(o),n?.changeRelativeSize(o)}getChildrenMeshes(){return this.childrenMeshes}};function E_(t,o,e){return t===e&&t===o&&o===e}var qd=class extends Rt{constructor(){super("Map",new ot,1,!1)}async init(o){this.material=o.originalMapMesh.clone().material,this.originalColors=o.originalMapMesh.geometry.attributes.color;let e=o.originalMapMesh.geometry.clone();return this.addBottomFaces(e),e.computeBoundingBox(),e.rotateX(Math.PI/2),this.updateMapGeometry(o,e),e.computeBoundingBox(),e.rotateZ(-Math.PI/2),this.geometry=e,this}updateMapGeometry(o,e){let i=o.width-2*o.mapSideOffset,n=e.boundingBox.max.x,r=i/n;return e.scale(r,r,r),e.translate(-i/2,i/2,0),this.updateMapColors(this.originalColors,e,o.numberOfColors),e}updateMapColors(o,e,i){let n=[];for(let r=0;r<o.count;r++){let a=o.getX(r),s=o.getY(r),l=o.getZ(r);n.push(...this.getPrintColor(a,s,l,i))}e.setAttribute("color",new Go(n,3))}getPrintColor(o,e,i,n){return E_(o,e,i)?n===1?[1,1,1]:[.5,.5,.5]:o>.75&&e>.75?n<4?[1,1,1]:[1,1,0]:o>.45&&e<.1?n<4?[1,1,1]:[1,0,0]:o<5&&e>.6?n<4?[1,1,1]:[0,1,0]:(console.error("Unknown color"),[1,1,1])}addBottomFaces(o){let e=o.index;if(!e)return;let i=24,n=6,r=8,a=e.count/Hf,s=new Uint32Array(e.count+a*n);s.set(new Uint32Array(e.array.buffer,e.array.byteOffset,e.count));let l=e.count;for(let d=0;d<a;d++){let c=d*i+r;s[l++]=c,s[l++]=c+2,s[l++]=c+1,s[l++]=c,s[l++]=c+3,s[l++]=c+2}o.setIndex(new _o(s,1))}async changeSize(o,e){let i=(o.width-2*o.mapSideOffset)/(e-2*o.mapSideOffset);this.geometry.scale(i,i,i)}updateColor(o){this.updateMapColors(this.originalColors,this.geometry,o)}};var Td=class{constructor(o,e=new kd(new Ta(Gu)),i=new xd(new Ta(Gu)),n=new Sd,r=new qd){this.geometryOptions=o,this.frontPrintContainerMesh=e,this.backPrintContainerMesh=i,this.baseplateMesh=n,this.mapMesh=r,this.printMesh=new at,this.printMesh.name="PrintMesh"}async initialize(){this.baseplateMesh=await this.baseplateMesh.init(this.geometryOptions),this.printMesh.add(this.baseplateMesh),this.mapMesh=await this.mapMesh.init(this.geometryOptions),this.printMesh.add(this.mapMesh),this.frontPrintContainerMesh=await this.frontPrintContainerMesh.init(this.geometryOptions),this.printMesh.add(this.frontPrintContainerMesh),this.backPrintContainerMesh=await this.backPrintContainerMesh.init(this.geometryOptions),this.printMesh.add(this.backPrintContainerMesh),this.calculateCurrentSize()}getThreeMesh(){return this.printMesh}getMapMesh(){return this.mapMesh}getSize(){return this.currentSize}async updateSize(o){this.geometryOptions.width=o;let e=this.currentSize.x;return await Promise.all([...this.printMesh.children].map(async i=>{i instanceof vt&&i.isGeneralSizeChangeMesh()&&i.changeSize(this.geometryOptions,e)})),this.calculateCurrentSize(),this.backPrintContainerMesh.isQRCodeVisible()}updateNumberOfColors(o){this.geometryOptions.numberOfColors=o;for(let e of this.printMesh.children)e instanceof vt&&e.updateColor(o)}async addCustomLogo(o){this.frontPrintContainerMesh.addCustomLogo(o,this.geometryOptions)}rotateCustomLogo(){this.frontPrintContainerMesh.rotateCustomLogo()}flipCustomLogo(){this.frontPrintContainerMesh.flipCustomLogo()}removeCustomLogo(){this.frontPrintContainerMesh.removeCustomLogo()}updateCustomLogoColor(o){this.frontPrintContainerMesh.updateCustomLogoColor(o)}updateFrontText(o){this.frontPrintContainerMesh.updateFrontText(o,this.geometryOptions)}updateSecondRowVisibility(o){this.geometryOptions.secondRowVisible!==o&&(this.geometryOptions.secondRowVisible=o,this.frontPrintContainerMesh.updateSecondRowVisibility(this.geometryOptions),this.baseplateMesh.changeSize(this.geometryOptions))}async updateSecondRowText(o){await this.frontPrintContainerMesh.updateSecondRowText(o,this.geometryOptions)}calculateCurrentSize(){let o=this.baseplateMesh.getWidth(),e=this.baseplateMesh.getDepth(),i=this.baseplateMesh.getHeight()+this.mapMesh.getHeight();this.currentSize=new Ze(o,e,i)}async updateQrCodeText(o){await this.backPrintContainerMesh.updateQrCodeText(o,this.geometryOptions)}updateQrCodeVisibility(o){this.backPrintContainerMesh.updateQrCodeVisibility(o)}};function bm(t,o,e,i,n){let r=t.x,a=t.y,s=t.z,l=r,d=a-e;o.geometry.boundingBox||o.geometry.computeBoundingBox();let c=o.geometry.boundingBox.max.z-o.geometry.boundingBox.min.z,u=(s-i)*o.geometry.boundingBox.max.x/c+2*n;return Math.min(l,d,u)}var At=Uint8Array,jt=Uint16Array,Cm=Int32Array,Mm=new At([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]),_m=new At([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]),_4=new At([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),A4=function(t,o){for(var e=new jt(31),i=0;i<31;++i)e[i]=o+=1<<t[i-1];for(var n=new Cm(e[30]),i=1;i<30;++i)for(var r=e[i];r<e[i+1];++r)n[r]=r-e[i]<<5|i;return{b:e,r:n}},I4=A4(Mm,2),k_=I4.b,xm=I4.r;k_[28]=258,xm[258]=28;var F4=A4(_m,0),ane=F4.b,E4=F4.r,wm=new jt(32768);for(Ye=0;Ye<32768;++Ye)Zi=(Ye&43690)>>1|(Ye&21845)<<1,Zi=(Zi&52428)>>2|(Zi&13107)<<2,Zi=(Zi&61680)>>4|(Zi&3855)<<4,wm[Ye]=((Zi&65280)>>8|(Zi&255)<<8)>>1;var Zi,Ye,Oa=(function(t,o,e){for(var i=t.length,n=0,r=new jt(o);n<i;++n)t[n]&&++r[t[n]-1];var a=new jt(o);for(n=1;n<o;++n)a[n]=a[n-1]+r[n-1]<<1;var s;if(e){s=new jt(1<<o);var l=15-o;for(n=0;n<i;++n)if(t[n])for(var d=n<<4|t[n],c=o-t[n],u=a[t[n]-1]++<<c,m=u|(1<<c)-1;u<=m;++u)s[wm[u]>>l]=d}else for(s=new jt(i),n=0;n<i;++n)t[n]&&(s[n]=wm[a[t[n]-1]++]>>15-t[n]);return s}),Cn=new At(288);for(Ye=0;Ye<144;++Ye)Cn[Ye]=8;var Ye;for(Ye=144;Ye<256;++Ye)Cn[Ye]=9;var Ye;for(Ye=256;Ye<280;++Ye)Cn[Ye]=7;var Ye;for(Ye=280;Ye<288;++Ye)Cn[Ye]=8;var Ye,Rd=new At(32);for(Ye=0;Ye<32;++Ye)Rd[Ye]=5;var Ye,q_=Oa(Cn,9,0);var T_=Oa(Rd,5,0);var L4=function(t){return(t+7)/8|0},D4=function(t,o,e){return(o==null||o<0)&&(o=0),(e==null||e>t.length)&&(e=t.length),new At(t.subarray(o,e))};var R_=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],Ad=function(t,o,e){var i=new Error(o||R_[t]);if(i.code=t,Error.captureStackTrace&&Error.captureStackTrace(i,Ad),!e)throw i;return i};var Ji=function(t,o,e){e<<=o&7;var i=o/8|0;t[i]|=e,t[i+1]|=e>>8},Ba=function(t,o,e){e<<=o&7;var i=o/8|0;t[i]|=e,t[i+1]|=e>>8,t[i+2]|=e>>16},vm=function(t,o){for(var e=[],i=0;i<t.length;++i)t[i]&&e.push({s:i,f:t[i]});var n=e.length,r=e.slice();if(!n)return{t:N4,l:0};if(n==1){var a=new At(e[0].s+1);return a[e[0].s]=1,{t:a,l:1}}e.sort(function(z,H){return z.f-H.f}),e.push({s:-1,f:25001});var s=e[0],l=e[1],d=0,c=1,u=2;for(e[0]={s:-1,f:s.f+l.f,l:s,r:l};c!=n-1;)s=e[e[d].f<e[u].f?d++:u++],l=e[d!=c&&e[d].f<e[u].f?d++:u++],e[c++]={s:-1,f:s.f+l.f,l:s,r:l};for(var m=r[0].s,i=1;i<n;++i)r[i].s>m&&(m=r[i].s);var g=new jt(m+1),b=ym(e[c-1],g,0);if(b>o){var i=0,y=0,q=b-o,D=1<<q;for(r.sort(function(H,G){return g[G.s]-g[H.s]||H.f-G.f});i<n;++i){var j=r[i].s;if(g[j]>o)y+=D-(1<<b-g[j]),g[j]=o;else break}for(y>>=q;y>0;){var k=r[i].s;g[k]<o?y-=1<<o-g[k]++-1:++i}for(;i>=0&&y;--i){var N=r[i].s;g[N]==o&&(--g[N],++y)}b=o}return{t:new At(g),l:b}},ym=function(t,o,e){return t.s==-1?Math.max(ym(t.l,o,e+1),ym(t.r,o,e+1)):o[t.s]=e},k4=function(t){for(var o=t.length;o&&!t[--o];);for(var e=new jt(++o),i=0,n=t[0],r=1,a=function(l){e[i++]=l},s=1;s<=o;++s)if(t[s]==n&&s!=o)++r;else{if(!n&&r>2){for(;r>138;r-=138)a(32754);r>2&&(a(r>10?r-11<<5|28690:r-3<<5|12305),r=0)}else if(r>3){for(a(n),--r;r>6;r-=6)a(8304);r>2&&(a(r-3<<5|8208),r=0)}for(;r--;)a(n);r=1,n=t[s]}return{c:e.subarray(0,i),n:o}},Wa=function(t,o){for(var e=0,i=0;i<o.length;++i)e+=t[i]*o[i];return e},P4=function(t,o,e){var i=e.length,n=L4(o+2);t[n]=i&255,t[n+1]=i>>8,t[n+2]=t[n]^255,t[n+3]=t[n+1]^255;for(var r=0;r<i;++r)t[n+r+4]=e[r];return(n+4+i)*8},q4=function(t,o,e,i,n,r,a,s,l,d,c){Ji(o,c++,e),++n[256];for(var u=vm(n,15),m=u.t,g=u.l,b=vm(r,15),y=b.t,q=b.l,D=k4(m),j=D.c,k=D.n,N=k4(y),z=N.c,H=N.n,G=new jt(19),Y=0;Y<j.length;++Y)++G[j[Y]&31];for(var Y=0;Y<z.length;++Y)++G[z[Y]&31];for(var X=vm(G,7),he=X.t,Ie=X.l,$=19;$>4&&!he[_4[$-1]];--$);var qe=d+5<<3,be=Wa(n,Cn)+Wa(r,Rd)+a,Pe=Wa(n,m)+Wa(r,y)+a+14+3*$+Wa(G,he)+2*G[16]+3*G[17]+7*G[18];if(l>=0&&qe<=be&&qe<=Pe)return P4(o,c,t.subarray(l,l+d));var Oe,ve,ie,Xe;if(Ji(o,c,1+(Pe<be)),c+=2,Pe<be){Oe=Oa(m,g,0),ve=m,ie=Oa(y,q,0),Xe=y;var We=Oa(he,Ie,0);Ji(o,c,k-257),Ji(o,c+5,H-1),Ji(o,c+10,$-4),c+=14;for(var Y=0;Y<$;++Y)Ji(o,c+3*Y,he[_4[Y]]);c+=3*$;for(var lt=[j,z],Ot=0;Ot<2;++Ot)for(var vi=lt[Ot],Y=0;Y<vi.length;++Y){var P=vi[Y]&31;Ji(o,c,We[P]),c+=he[P],P>15&&(Ji(o,c,vi[Y]>>5&127),c+=vi[Y]>>12)}}else Oe=q_,ve=Cn,ie=T_,Xe=Rd;for(var Y=0;Y<s;++Y){var C=i[Y];if(C>255){var P=C>>18&31;Ba(o,c,Oe[P+257]),c+=ve[P+257],P>7&&(Ji(o,c,C>>23&31),c+=Mm[P]);var w=C&31;Ba(o,c,ie[w]),c+=Xe[w],w>3&&(Ba(o,c,C>>5&8191),c+=_m[w])}else Ba(o,c,Oe[C]),c+=ve[C]}return Ba(o,c,Oe[256]),c+ve[256]},A_=new Cm([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),N4=new At(0),I_=function(t,o,e,i,n,r){var a=r.z||t.length,s=new At(i+a+5*(1+Math.ceil(a/7e3))+n),l=s.subarray(i,s.length-n),d=r.l,c=(r.r||0)&7;if(o){c&&(l[0]=r.r>>3);for(var u=A_[o-1],m=u>>13,g=u&8191,b=(1<<e)-1,y=r.p||new jt(32768),q=r.h||new jt(b+1),D=Math.ceil(e/3),j=2*D,k=function(ee){return(t[ee]^t[ee+1]<<D^t[ee+2]<<j)&b},N=new Cm(25e3),z=new jt(288),H=new jt(32),G=0,Y=0,X=r.i||0,he=0,Ie=r.w||0,$=0;X+2<a;++X){var qe=k(X),be=X&32767,Pe=q[qe];if(y[be]=Pe,q[qe]=be,Ie<=X){var Oe=a-X;if((G>7e3||he>24576)&&(Oe>423||!d)){c=q4(t,l,0,N,z,H,Y,he,$,X-$,c),he=G=Y=0,$=X;for(var ve=0;ve<286;++ve)z[ve]=0;for(var ve=0;ve<30;++ve)H[ve]=0}var ie=2,Xe=0,We=g,lt=be-Pe&32767;if(Oe>2&&qe==k(X-lt))for(var Ot=Math.min(m,Oe)-1,vi=Math.min(32767,X),P=Math.min(258,Oe);lt<=vi&&--We&&be!=Pe;){if(t[X+ie]==t[X+ie-lt]){for(var C=0;C<P&&t[X+C]==t[X+C-lt];++C);if(C>ie){if(ie=C,Xe=lt,C>Ot)break;for(var w=Math.min(lt,C-2),v=0,ve=0;ve<w;++ve){var Z=X-lt+ve&32767,de=y[Z],U=Z-de&32767;U>v&&(v=U,Pe=Z)}}}be=Pe,Pe=y[be],lt+=be-Pe&32767}if(Xe){N[he++]=268435456|xm[ie]<<18|E4[Xe];var ce=xm[ie]&31,pe=E4[Xe]&31;Y+=Mm[ce]+_m[pe],++z[257+ce],++H[pe],Ie=X+ie,++G}else N[he++]=t[X],++z[t[X]]}}for(X=Math.max(X,Ie);X<a;++X)N[he++]=t[X],++z[t[X]];c=q4(t,l,d,N,z,H,Y,he,$,X-$,c),d||(r.r=c&7|l[c/8|0]<<3,c-=7,r.h=q,r.p=y,r.i=X,r.w=Ie)}else{for(var X=r.w||0;X<a+d;X+=65535){var ge=X+65535;ge>=a&&(l[c/8|0]=d,ge=a),c=P4(l,c+1,t.subarray(X,ge))}r.i=a}return D4(s,0,i+L4(c)+n)},F_=(function(){for(var t=new Int32Array(256),o=0;o<256;++o){for(var e=o,i=9;--i;)e=(e&1&&-306674912)^e>>>1;t[o]=e}return t})(),L_=function(){var t=-1;return{p:function(o){for(var e=t,i=0;i<o.length;++i)e=F_[e&255^o[i]]^e>>>8;t=e},d:function(){return~t}}};var D_=function(t,o,e,i,n){if(!n&&(n={l:1},o.dictionary)){var r=o.dictionary.subarray(-32768),a=new At(r.length+t.length);a.set(r),a.set(t,r.length),t=a,n.w=r.length}return I_(t,o.level==null?6:o.level,o.mem==null?n.l?Math.ceil(Math.max(8,Math.min(13,Math.log(t.length)))*1.5):20:12+o.mem,e,i,n)},V4=function(t,o){var e={};for(var i in t)e[i]=t[i];for(var i in o)e[i]=o[i];return e};var Ct=function(t,o,e){for(;e;++o)t[o]=e,e>>>=8};function P_(t,o){return D_(t,o||{},0,0)}var B4=function(t,o,e,i){for(var n in t){var r=t[n],a=o+n,s=i;Array.isArray(r)&&(s=V4(i,r[1]),r=r[0]),ArrayBuffer.isView(r)?e[a]=[r,s]:(e[a+="/"]=[new At(0),s],B4(r,a,e,i))}},T4=typeof TextEncoder<"u"&&new TextEncoder,N_=typeof TextDecoder<"u"&&new TextDecoder,V_=0;try{N_.decode(N4,{stream:!0}),V_=1}catch{}function Mn(t,o){if(o){for(var e=new At(t.length),i=0;i<t.length;++i)e[i]=t.charCodeAt(i);return e}if(T4)return T4.encode(t);for(var n=t.length,r=new At(t.length+(t.length>>1)),a=0,s=function(c){r[a++]=c},i=0;i<n;++i){if(a+5>r.length){var l=new At(a+8+(n-i<<1));l.set(r),r=l}var d=t.charCodeAt(i);d<128||o?s(d):d<2048?(s(192|d>>6),s(128|d&63)):d>55295&&d<57344?(d=65536+(d&1047552)|t.charCodeAt(++i)&1023,s(240|d>>18),s(128|d>>12&63),s(128|d>>6&63),s(128|d&63)):(s(224|d>>12),s(128|d>>6&63),s(128|d&63))}return D4(r,0,a)}var Sm=function(t){var o=0;if(t)for(var e in t){var i=t[e].length;i>65535&&Ad(9),o+=i+4}return o},R4=function(t,o,e,i,n,r,a,s){var l=i.length,d=e.extra,c=s&&s.length,u=Sm(d);Ct(t,o,a!=null?33639248:67324752),o+=4,a!=null&&(t[o++]=20,t[o++]=e.os),t[o]=20,o+=2,t[o++]=e.flag<<1|(r<0&&8),t[o++]=n&&8,t[o++]=e.compression&255,t[o++]=e.compression>>8;var m=new Date(e.mtime==null?Date.now():e.mtime),g=m.getFullYear()-1980;if((g<0||g>119)&&Ad(10),Ct(t,o,g<<25|m.getMonth()+1<<21|m.getDate()<<16|m.getHours()<<11|m.getMinutes()<<5|m.getSeconds()>>1),o+=4,r!=-1&&(Ct(t,o,e.crc),Ct(t,o+4,r<0?-r-2:r),Ct(t,o+8,e.size)),Ct(t,o+12,l),Ct(t,o+14,u),o+=16,a!=null&&(Ct(t,o,c),Ct(t,o+6,e.attrs),Ct(t,o+10,a),o+=14),t.set(i,o),o+=l,u)for(var b in d){var y=d[b],q=y.length;Ct(t,o,+b),Ct(t,o+2,q),t.set(y,o+4),o+=4+q}return c&&(t.set(s,o),o+=c),o},B_=function(t,o,e,i,n){Ct(t,o,101010256),Ct(t,o+8,e),Ct(t,o+10,e),Ct(t,o+12,i),Ct(t,o+16,n)};function W4(t,o){o||(o={});var e={},i=[];B4(t,"",e,o);var n=0,r=0;for(var a in e){var s=e[a],l=s[0],d=s[1],c=d.level==0?0:8,u=Mn(a),m=u.length,g=d.comment,b=g&&Mn(g),y=b&&b.length,q=Sm(d.extra);m>65535&&Ad(11);var D=c?P_(l,d):l,j=D.length,k=L_();k.p(l),i.push(V4(d,{size:l.length,crc:k.d(),c:D,f:u,m:b,u:m!=a.length||b&&g.length!=y,o:n,compression:c})),n+=30+m+q+j,r+=76+2*(m+q)+(y||0)+j}for(var N=new At(r+22),z=n,H=r-n,G=0;G<i.length;++G){var u=i[G];R4(N,u.o,u,u.f,u.u,u.c.length);var Y=30+u.f.length+Sm(u.extra);N.set(u.c,u.o+Y),R4(N,n,u,u.f,u.u,u.c.length,u.o,u.m),n+=16+Y+(u.m?u.m.length:0)}return B_(N,n,i.length,H,z),N}function O4(t,o){let e=W_(),i=O_(t),n=z_(o),r=$_();return e+i+n+r}function W_(){return`<?xml version="1.0" encoding="UTF-8"?>
3674
+ `}async createColoredBackTextChildren(o){let t=this.metricDescriptionBlockOptions,i=[],n=["Value ranges:",`${t.nodeMetricData.minValue} - ${t.colorRange.from-1}`,"/",`${t.colorRange.from} - ${t.colorRange.to-1}`,"/",`${t.colorRange.to} - ${t.nodeMetricData.maxValue}`],r=[new ot,new od,new ot,new id,new ot,new td],a=.05;for(let s=0;s<n.length;s+=1){let l=`ColorMetricLastLine${s}`,d={font:this.font,text:n[s],side:"back",xPosition:a,yPosition:-.045,align:"left"},c=await new oi(l,r[s],200,!0,d).init(o);this.updateColor(o.numberOfColors),i.push(c),s!==n.length-1&&(a+=c.getWidth()+.03)}return i}};var rd=class extends vt{constructor(o,t){super(o,new ot),this.font=t}async init(o){let{areaIcon:t,areaIconScale:i}=this.createAreaAttributes(),{heightIcon:n,heightIconScale:r}=this.createHeightAttributes(),{colorIcon:a,colorIconScale:s}=this.createColorAttributes(),l=await new vn({name:"HeigthMetricBlock",title:o.heightMetricTitle,iconFilename:n,iconScale:r,nodeMetricData:o.heightMetricData},this.font,.05).init(o);this.add(l);let d=await new vn({name:"AreaMetricBlock",title:o.areaMetricTitle,iconFilename:t,iconScale:i,nodeMetricData:o.areaMetricData},this.font,-.1).init(o);this.add(d);let c=await new nd({name:"ColorMetricBlock",title:o.colorMetricTitle,iconFilename:a,iconScale:s,nodeMetricData:o.colorMetricData,colorRange:o.colorRange},this.font,-.25).init(o);return this.add(c),this.centerMetricsMeshInXDirection(),this}centerMetricsMeshInXDirection(){let o={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};this.traverse(t=>{if(t instanceof at&&t.visible){t.geometry.computeBoundingBox();let{min:i,max:n}=t.geometry.boundingBox;o.min=Math.min(o.min,i.x),o.max=Math.max(o.max,n.x)}}),this.position.x=(o.max-o.min)/2}createColorAttributes(){return{colorIcon:"color_icon_for_3D_print.svg",colorIconScale:.075}}createHeightAttributes(){return{heightIcon:"height_icon_for_3D_print.svg",heightIconScale:.09}}createAreaAttributes(){return{areaIcon:"area_icon_for_3D_print.svg",areaIconScale:.075}}};var C4=Am(S4());var bd=class extends Rt{constructor(o){super(o,new ot,0,!1)}async init(o){this.geometry=await this.create(o);let t=.45,i=.45,n=-o.baseplateHeight+o.printHeight/2;return this.position.set(t,i,n),this.updateColor(o.numberOfColors),this}async changeText(o){this.geometry=await this.create(o)}async create(o){if(!o.qrCodeText||o.qrCodeText.length===0)return new Jt;let t=document.createElement("canvas");await C4.toCanvas(t,o.qrCodeText,{errorCorrectionLevel:"H"});let n=t.getContext("2d").getImageData(0,0,t.width,t.height),r=[],a=.6/n.width;for(let s=0;s<n.height;s+=4)for(let l=0;l<n.width;l+=4){let d=(s*n.width+l)*4;if(n.data[d]!==0){let c=new Eo(a,a,o.printHeight);c.translate(-l/4*a,-s/4*a,0),r.push(c)}}return this.updateMinWidth(a),No(r)}updateMinWidth(o){this.minWidth=.6/o}};var vd=class extends vt{constructor(o){let t=new ot;super("BackPrintContainer",t),this.font=o}async init(o){return this.childrenMeshes=new Map,this.childrenMeshes.set("BackMWLogo",new Zc("BackMWLogo")),this.childrenMeshes.set("BackBelowLogoText",new Qc("BackBelowLogoText",this.font)),this.childrenMeshes.set("QrCode",new bd("QrCode")),this.childrenMeshes.set("CodeChartaLogo",new Jc("CodeChartaLogo")),this.childrenMeshes.set("CodeChartaText",new ed("CodeChartaText",this.font)),this.childrenMeshes.set("MetricDescriptionsContainer",new rd("MetricDescriptionsContainer",this.font)),await Promise.all([...this.childrenMeshes.values()].map(async t=>{await t.init(o),this.add(t)})),this.changeSize(o,1),this}changeSize(o,t){let i=o.width/t;this.scale.set(this.scale.x*i,this.scale.y*i,this.scale.z),this.traverse(n=>{n instanceof Rt&&n.setCurrentWidth(o.width)})}isQRCodeVisible(){return this.childrenMeshes.get("QrCode").visible}async updateQrCodeText(o,t){t.qrCodeText=o,await this.childrenMeshes.get("QrCode").changeText(t)}updateQrCodeVisibility(o){this.childrenMeshes.get("QrCode").setManualVisibility(o)}getChildrenMeshes(){return this.childrenMeshes}};var xd=class{execute(o,t){let i=t.material;return i.defaultAttributeValues.color=o===1?[1,1,1]:[.5,.5,.5],!0}};var wd=class{async create(o){let{width:t,secondRowVisible:i,mapSideOffset:n,baseplateHeight:r,frontTextSize:a,secondRowTextSize:s}=o,l=5,d=Math.sqrt(2*Math.pow(n,2))/(Math.sqrt(2)-1)-1;d<l&&(l=d);let c=new Is,u=i?s*1.5:0,m=t+a+u;c.absarc(t-l,l,l,Math.PI*1.5,Math.PI*2,!1),c.absarc(t-l,m-l,l,0,Math.PI*.5,!1),c.absarc(l,m-l,l,Math.PI*.5,Math.PI,!1),c.absarc(l,l,l,Math.PI,Math.PI*1.5,!1);let g=new Un(c,{depth:r,bevelEnabled:!1});return g.translate(-t/2,-t/2-a-u,-r),g}};var yd=class extends vt{constructor(o=new wd){super("Baseplate",new xd),this.createBaseplateGeometryStrategy=o}async init(o){this.createBaseplateGeometryStrategy.create(o).then(i=>{this.geometry=i});let t=new gf;return t.copy(o.defaultMaterial),t.polygonOffset=!0,t.polygonOffsetUnits=1,t.polygonOffsetFactor=.1,this.material=t,this.updateColor(o.numberOfColors),this}changeSize(o){this.boundingBoxCalculated=!1,this.createBaseplateGeometryStrategy.create(o).then(t=>{this.geometry=t})}};var zo=class{execute(o,t){let i;return o<4?i=[1,1,1]:o===4?i=[1,1,0]:i=[1,1,1],t.material.color.setRGB(i[0],i[1],i[2]),!0}};var $o=class extends vt{constructor(o,t){super(o,new zo),this.alignment=t}changeRelativeSize(o){let t=this.getWidth();this.boundingBoxCalculated=!1;let i=o.secondRowVisible,n=i?(o.frontTextSize+o.secondRowTextSize)/o.frontTextSize:1;this.scale.x=n,this.scale.y=n;let r=i?-1:1,a=this.alignment==="left"?-1:1;this.translateY(r*o.secondRowTextSize);let s=i?t/this.getWidth():this.getWidth()/t;this.translateX(2*s*a*r)}};var Sd=class extends $o{constructor(o,t){super(o,"left"),this.filePath=t}async init(o){let t=new ni,i=o.frontTextSize*o.width/200;this.geometry=await t.create(o,{filePath:this.filePath,size:i,side:"front"});let n=-o.width/2+i/2+o.mapSideOffset/2,r=i/2,a=o.printHeight/2;return this.position.set(n,r,a),o.secondRowVisible&&this.changeRelativeSize(o),this.updateColor(o.numberOfColors),this}setColor(o){this.material.color.set(o)}rotate(){this.geometry.rotateZ(Math.PI/2)}flip(){this.geometry.rotateY(Math.PI)}changeSize(o,t){this.position.x-=(o.width-t)/2}};var Cd=class extends $o{constructor(o){super(o,"right")}async init(o,t=new ni){let i=o.frontTextSize*o.width/250;this.geometry=await t.create(o,{filePath:"./codeCharta/assets/mw_logo.svg",size:i,side:"front"});let n=o.width/2-i/2-o.mapSideOffset/2,r=i/2,a=o.printHeight/2;return this.position.set(n,r,a),o.secondRowVisible&&this.changeRelativeSize(o),this.updateColor(o.numberOfColors),this}changeSize(o,t){this.position.x+=(o.width-t)/2}};var Md=class extends oi{constructor(o,t,i){let n=i.frontText;n||(n="FrontText");let r={font:t,side:"front",text:n,xPosition:0,yPosition:i.frontTextSize/2,textSize:i.frontTextSize,align:"center"};super(o,new zo,0,!0,r),this.name="Front Text"}};var _d=class extends oi{constructor(o,t,i){let n={font:t,text:i.secondRowText,side:"front",xPosition:0,yPosition:-i.secondRowTextSize,textSize:i.secondRowTextSize,align:"center"};super(o,new zo,0,!1,n)}};var Ed=class extends vt{constructor(o){let t=new ot;super("FrontPrintContainer",t),this.font=o}async init(o){return this.childrenMeshes=new Map,this.childrenMeshes.set("FrontText",new Md("FrontText",this.font,o)),this.childrenMeshes.set("SecondRowText",new _d("SecondRowText",this.font,o)),this.childrenMeshes.set("FrontMWLogo",new Cd("FrontMWLogo")),await Promise.all([...this.childrenMeshes.values()].map(async t=>{await t.init(o),this.add(t)})),this.position.y=-o.width/2-o.mapSideOffset/2,this}async addCustomLogo(o,t){this.childrenMeshes.has("CustomLogo")&&this.removeCustomLogo();let i=await new Sd("CustomLogo",o).init(t);this.add(i),this.childrenMeshes.set(i.name,i)}rotateCustomLogo(){this.childrenMeshes.get("CustomLogo").rotate()}flipCustomLogo(){this.childrenMeshes.get("CustomLogo").flip()}removeCustomLogo(){this.remove(this.childrenMeshes.get("CustomLogo")),this.childrenMeshes.delete("CustomLogo")}updateCustomLogoColor(o){this.childrenMeshes.get("CustomLogo").setColor(o)}async updateFrontText(o,t){let i=this.childrenMeshes.get("FrontText");i.updateTextGeometryOptions(o),await i.updateText(t)}changeSize(o,t){this.position.y-=(o.width-t)/2;for(let i of this.childrenMeshes.values())i instanceof $o&&i.isGeneralSizeChangeMesh()&&i.changeSize(o,t)}async updateSecondRowText(o,t){let i=this.childrenMeshes.get("SecondRowText");i.updateTextGeometryOptions(o),await i.updateText(t)}updateSecondRowVisibility(o){let t=this.childrenMeshes.get("FrontMWLogo"),i=this.childrenMeshes.get("SecondRowText"),n=this.childrenMeshes.get("CustomLogo");i.setManualVisibility(o.secondRowVisible),t.changeRelativeSize(o),n?.changeRelativeSize(o)}getChildrenMeshes(){return this.childrenMeshes}};function S_(e,o,t){return e===t&&e===o&&o===t}var kd=class extends Rt{constructor(){super("Map",new ot,1,!1)}async init(o){this.material=o.originalMapMesh.clone().material,this.originalColors=o.originalMapMesh.geometry.attributes.color;let t=o.originalMapMesh.geometry.clone();return this.addBottomFaces(t),t.computeBoundingBox(),t.rotateX(Math.PI/2),this.updateMapGeometry(o,t),t.computeBoundingBox(),t.rotateZ(-Math.PI/2),this.geometry=t,this}updateMapGeometry(o,t){let i=o.width-2*o.mapSideOffset,n=t.boundingBox.max.x,r=i/n;return t.scale(r,r,r),t.translate(-i/2,i/2,0),this.updateMapColors(this.originalColors,t,o.numberOfColors),t}updateMapColors(o,t,i){let n=[];for(let r=0;r<o.count;r++){let a=o.getX(r),s=o.getY(r),l=o.getZ(r);n.push(...this.getPrintColor(a,s,l,i))}t.setAttribute("color",new Go(n,3))}getPrintColor(o,t,i,n){return S_(o,t,i)?n===1?[1,1,1]:[.5,.5,.5]:o>.75&&t>.75?n<4?[1,1,1]:[1,1,0]:o>.45&&t<.1?n<4?[1,1,1]:[1,0,0]:o<5&&t>.6?n<4?[1,1,1]:[0,1,0]:(console.error("Unknown color"),[1,1,1])}addBottomFaces(o){let t=o.index;if(!t)return;let i=24,n=6,r=8,a=t.count/jf,s=new Uint32Array(t.count+a*n);s.set(new Uint32Array(t.array.buffer,t.array.byteOffset,t.count));let l=t.count;for(let d=0;d<a;d++){let c=d*i+r;s[l++]=c,s[l++]=c+2,s[l++]=c+1,s[l++]=c,s[l++]=c+3,s[l++]=c+2}o.setIndex(new _o(s,1))}async changeSize(o,t){let i=(o.width-2*o.mapSideOffset)/(t-2*o.mapSideOffset);this.geometry.scale(i,i,i)}updateColor(o){this.updateMapColors(this.originalColors,this.geometry,o)}};var qd=class{constructor(o,t=new Ed(new qa(Uu)),i=new vd(new qa(Uu)),n=new yd,r=new kd){this.geometryOptions=o,this.frontPrintContainerMesh=t,this.backPrintContainerMesh=i,this.baseplateMesh=n,this.mapMesh=r,this.printMesh=new at,this.printMesh.name="PrintMesh"}async initialize(){this.baseplateMesh=await this.baseplateMesh.init(this.geometryOptions),this.printMesh.add(this.baseplateMesh),this.mapMesh=await this.mapMesh.init(this.geometryOptions),this.printMesh.add(this.mapMesh),this.frontPrintContainerMesh=await this.frontPrintContainerMesh.init(this.geometryOptions),this.printMesh.add(this.frontPrintContainerMesh),this.backPrintContainerMesh=await this.backPrintContainerMesh.init(this.geometryOptions),this.printMesh.add(this.backPrintContainerMesh),this.calculateCurrentSize()}getThreeMesh(){return this.printMesh}getMapMesh(){return this.mapMesh}getSize(){return this.currentSize}async updateSize(o){this.geometryOptions.width=o;let t=this.currentSize.x;return await Promise.all([...this.printMesh.children].map(async i=>{i instanceof vt&&i.isGeneralSizeChangeMesh()&&i.changeSize(this.geometryOptions,t)})),this.calculateCurrentSize(),this.backPrintContainerMesh.isQRCodeVisible()}updateNumberOfColors(o){this.geometryOptions.numberOfColors=o;for(let t of this.printMesh.children)t instanceof vt&&t.updateColor(o)}async addCustomLogo(o){this.frontPrintContainerMesh.addCustomLogo(o,this.geometryOptions)}rotateCustomLogo(){this.frontPrintContainerMesh.rotateCustomLogo()}flipCustomLogo(){this.frontPrintContainerMesh.flipCustomLogo()}removeCustomLogo(){this.frontPrintContainerMesh.removeCustomLogo()}updateCustomLogoColor(o){this.frontPrintContainerMesh.updateCustomLogoColor(o)}updateFrontText(o){this.frontPrintContainerMesh.updateFrontText(o,this.geometryOptions)}updateSecondRowVisibility(o){this.geometryOptions.secondRowVisible!==o&&(this.geometryOptions.secondRowVisible=o,this.frontPrintContainerMesh.updateSecondRowVisibility(this.geometryOptions),this.baseplateMesh.changeSize(this.geometryOptions))}async updateSecondRowText(o){await this.frontPrintContainerMesh.updateSecondRowText(o,this.geometryOptions)}calculateCurrentSize(){let o=this.baseplateMesh.getWidth(),t=this.baseplateMesh.getDepth(),i=this.baseplateMesh.getHeight()+this.mapMesh.getHeight();this.currentSize=new Ze(o,t,i)}async updateQrCodeText(o){await this.backPrintContainerMesh.updateQrCodeText(o,this.geometryOptions)}updateQrCodeVisibility(o){this.backPrintContainerMesh.updateQrCodeVisibility(o)}};function gm(e,o,t,i,n){let r=e.x,a=e.y,s=e.z,l=r,d=a-t;o.geometry.boundingBox||o.geometry.computeBoundingBox();let c=o.geometry.boundingBox.max.z-o.geometry.boundingBox.min.z,u=(s-i)*o.geometry.boundingBox.max.x/c+2*n;return Math.min(l,d,u)}var At=Uint8Array,jt=Uint16Array,Sm=Int32Array,Cm=new At([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]),Mm=new At([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]),M4=new At([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),R4=function(e,o){for(var t=new jt(31),i=0;i<31;++i)t[i]=o+=1<<e[i-1];for(var n=new Sm(t[30]),i=1;i<30;++i)for(var r=t[i];r<t[i+1];++r)n[r]=r-t[i]<<5|i;return{b:t,r:n}},A4=R4(Cm,2),C_=A4.b,vm=A4.r;C_[28]=258,vm[258]=28;var I4=R4(Mm,0),ene=I4.b,_4=I4.r,xm=new jt(32768);for(Ye=0;Ye<32768;++Ye)Zi=(Ye&43690)>>1|(Ye&21845)<<1,Zi=(Zi&52428)>>2|(Zi&13107)<<2,Zi=(Zi&61680)>>4|(Zi&3855)<<4,xm[Ye]=((Zi&65280)>>8|(Zi&255)<<8)>>1;var Zi,Ye,Wa=(function(e,o,t){for(var i=e.length,n=0,r=new jt(o);n<i;++n)e[n]&&++r[e[n]-1];var a=new jt(o);for(n=1;n<o;++n)a[n]=a[n-1]+r[n-1]<<1;var s;if(t){s=new jt(1<<o);var l=15-o;for(n=0;n<i;++n)if(e[n])for(var d=n<<4|e[n],c=o-e[n],u=a[e[n]-1]++<<c,m=u|(1<<c)-1;u<=m;++u)s[xm[u]>>l]=d}else for(s=new jt(i),n=0;n<i;++n)e[n]&&(s[n]=xm[a[e[n]-1]++]>>15-e[n]);return s}),Cn=new At(288);for(Ye=0;Ye<144;++Ye)Cn[Ye]=8;var Ye;for(Ye=144;Ye<256;++Ye)Cn[Ye]=9;var Ye;for(Ye=256;Ye<280;++Ye)Cn[Ye]=7;var Ye;for(Ye=280;Ye<288;++Ye)Cn[Ye]=8;var Ye,Td=new At(32);for(Ye=0;Ye<32;++Ye)Td[Ye]=5;var Ye,M_=Wa(Cn,9,0);var __=Wa(Td,5,0);var F4=function(e){return(e+7)/8|0},L4=function(e,o,t){return(o==null||o<0)&&(o=0),(t==null||t>e.length)&&(t=e.length),new At(e.subarray(o,t))};var E_=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],Rd=function(e,o,t){var i=new Error(o||E_[e]);if(i.code=e,Error.captureStackTrace&&Error.captureStackTrace(i,Rd),!t)throw i;return i};var Ji=function(e,o,t){t<<=o&7;var i=o/8|0;e[i]|=t,e[i+1]|=t>>8},Va=function(e,o,t){t<<=o&7;var i=o/8|0;e[i]|=t,e[i+1]|=t>>8,e[i+2]|=t>>16},bm=function(e,o){for(var t=[],i=0;i<e.length;++i)e[i]&&t.push({s:i,f:e[i]});var n=t.length,r=t.slice();if(!n)return{t:P4,l:0};if(n==1){var a=new At(t[0].s+1);return a[t[0].s]=1,{t:a,l:1}}t.sort(function(z,H){return z.f-H.f}),t.push({s:-1,f:25001});var s=t[0],l=t[1],d=0,c=1,u=2;for(t[0]={s:-1,f:s.f+l.f,l:s,r:l};c!=n-1;)s=t[t[d].f<t[u].f?d++:u++],l=t[d!=c&&t[d].f<t[u].f?d++:u++],t[c++]={s:-1,f:s.f+l.f,l:s,r:l};for(var m=r[0].s,i=1;i<n;++i)r[i].s>m&&(m=r[i].s);var g=new jt(m+1),b=wm(t[c-1],g,0);if(b>o){var i=0,y=0,q=b-o,D=1<<q;for(r.sort(function(H,G){return g[G.s]-g[H.s]||H.f-G.f});i<n;++i){var j=r[i].s;if(g[j]>o)y+=D-(1<<b-g[j]),g[j]=o;else break}for(y>>=q;y>0;){var k=r[i].s;g[k]<o?y-=1<<o-g[k]++-1:++i}for(;i>=0&&y;--i){var N=r[i].s;g[N]==o&&(--g[N],++y)}b=o}return{t:new At(g),l:b}},wm=function(e,o,t){return e.s==-1?Math.max(wm(e.l,o,t+1),wm(e.r,o,t+1)):o[e.s]=t},E4=function(e){for(var o=e.length;o&&!e[--o];);for(var t=new jt(++o),i=0,n=e[0],r=1,a=function(l){t[i++]=l},s=1;s<=o;++s)if(e[s]==n&&s!=o)++r;else{if(!n&&r>2){for(;r>138;r-=138)a(32754);r>2&&(a(r>10?r-11<<5|28690:r-3<<5|12305),r=0)}else if(r>3){for(a(n),--r;r>6;r-=6)a(8304);r>2&&(a(r-3<<5|8208),r=0)}for(;r--;)a(n);r=1,n=e[s]}return{c:t.subarray(0,i),n:o}},Ba=function(e,o){for(var t=0,i=0;i<o.length;++i)t+=e[i]*o[i];return t},D4=function(e,o,t){var i=t.length,n=F4(o+2);e[n]=i&255,e[n+1]=i>>8,e[n+2]=e[n]^255,e[n+3]=e[n+1]^255;for(var r=0;r<i;++r)e[n+r+4]=t[r];return(n+4+i)*8},k4=function(e,o,t,i,n,r,a,s,l,d,c){Ji(o,c++,t),++n[256];for(var u=bm(n,15),m=u.t,g=u.l,b=bm(r,15),y=b.t,q=b.l,D=E4(m),j=D.c,k=D.n,N=E4(y),z=N.c,H=N.n,G=new jt(19),Y=0;Y<j.length;++Y)++G[j[Y]&31];for(var Y=0;Y<z.length;++Y)++G[z[Y]&31];for(var X=bm(G,7),he=X.t,Ae=X.l,$=19;$>4&&!he[M4[$-1]];--$);var qe=d+5<<3,be=Ba(n,Cn)+Ba(r,Td)+a,Pe=Ba(n,m)+Ba(r,y)+a+14+3*$+Ba(G,he)+2*G[16]+3*G[17]+7*G[18];if(l>=0&&qe<=be&&qe<=Pe)return D4(o,c,e.subarray(l,l+d));var Oe,ve,ie,Ge;if(Ji(o,c,1+(Pe<be)),c+=2,Pe<be){Oe=Wa(m,g,0),ve=m,ie=Wa(y,q,0),Ge=y;var We=Wa(he,Ae,0);Ji(o,c,k-257),Ji(o,c+5,H-1),Ji(o,c+10,$-4),c+=14;for(var Y=0;Y<$;++Y)Ji(o,c+3*Y,he[M4[Y]]);c+=3*$;for(var lt=[j,z],Ot=0;Ot<2;++Ot)for(var vi=lt[Ot],Y=0;Y<vi.length;++Y){var P=vi[Y]&31;Ji(o,c,We[P]),c+=he[P],P>15&&(Ji(o,c,vi[Y]>>5&127),c+=vi[Y]>>12)}}else Oe=M_,ve=Cn,ie=__,Ge=Td;for(var Y=0;Y<s;++Y){var C=i[Y];if(C>255){var P=C>>18&31;Va(o,c,Oe[P+257]),c+=ve[P+257],P>7&&(Ji(o,c,C>>23&31),c+=Cm[P]);var w=C&31;Va(o,c,ie[w]),c+=Ge[w],w>3&&(Va(o,c,C>>5&8191),c+=Mm[w])}else Va(o,c,Oe[C]),c+=ve[C]}return Va(o,c,Oe[256]),c+ve[256]},k_=new Sm([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),P4=new At(0),q_=function(e,o,t,i,n,r){var a=r.z||e.length,s=new At(i+a+5*(1+Math.ceil(a/7e3))+n),l=s.subarray(i,s.length-n),d=r.l,c=(r.r||0)&7;if(o){c&&(l[0]=r.r>>3);for(var u=k_[o-1],m=u>>13,g=u&8191,b=(1<<t)-1,y=r.p||new jt(32768),q=r.h||new jt(b+1),D=Math.ceil(t/3),j=2*D,k=function(ee){return(e[ee]^e[ee+1]<<D^e[ee+2]<<j)&b},N=new Sm(25e3),z=new jt(288),H=new jt(32),G=0,Y=0,X=r.i||0,he=0,Ae=r.w||0,$=0;X+2<a;++X){var qe=k(X),be=X&32767,Pe=q[qe];if(y[be]=Pe,q[qe]=be,Ae<=X){var Oe=a-X;if((G>7e3||he>24576)&&(Oe>423||!d)){c=k4(e,l,0,N,z,H,Y,he,$,X-$,c),he=G=Y=0,$=X;for(var ve=0;ve<286;++ve)z[ve]=0;for(var ve=0;ve<30;++ve)H[ve]=0}var ie=2,Ge=0,We=g,lt=be-Pe&32767;if(Oe>2&&qe==k(X-lt))for(var Ot=Math.min(m,Oe)-1,vi=Math.min(32767,X),P=Math.min(258,Oe);lt<=vi&&--We&&be!=Pe;){if(e[X+ie]==e[X+ie-lt]){for(var C=0;C<P&&e[X+C]==e[X+C-lt];++C);if(C>ie){if(ie=C,Ge=lt,C>Ot)break;for(var w=Math.min(lt,C-2),v=0,ve=0;ve<w;++ve){var Z=X-lt+ve&32767,de=y[Z],U=Z-de&32767;U>v&&(v=U,Pe=Z)}}}be=Pe,Pe=y[be],lt+=be-Pe&32767}if(Ge){N[he++]=268435456|vm[ie]<<18|_4[Ge];var ce=vm[ie]&31,pe=_4[Ge]&31;Y+=Cm[ce]+Mm[pe],++z[257+ce],++H[pe],Ae=X+ie,++G}else N[he++]=e[X],++z[e[X]]}}for(X=Math.max(X,Ae);X<a;++X)N[he++]=e[X],++z[e[X]];c=k4(e,l,d,N,z,H,Y,he,$,X-$,c),d||(r.r=c&7|l[c/8|0]<<3,c-=7,r.h=q,r.p=y,r.i=X,r.w=Ae)}else{for(var X=r.w||0;X<a+d;X+=65535){var ge=X+65535;ge>=a&&(l[c/8|0]=d,ge=a),c=D4(l,c+1,e.subarray(X,ge))}r.i=a}return L4(s,0,i+F4(c)+n)},T_=(function(){for(var e=new Int32Array(256),o=0;o<256;++o){for(var t=o,i=9;--i;)t=(t&1&&-306674912)^t>>>1;e[o]=t}return e})(),R_=function(){var e=-1;return{p:function(o){for(var t=e,i=0;i<o.length;++i)t=T_[t&255^o[i]]^t>>>8;e=t},d:function(){return~e}}};var A_=function(e,o,t,i,n){if(!n&&(n={l:1},o.dictionary)){var r=o.dictionary.subarray(-32768),a=new At(r.length+e.length);a.set(r),a.set(e,r.length),e=a,n.w=r.length}return q_(e,o.level==null?6:o.level,o.mem==null?n.l?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):20:12+o.mem,t,i,n)},N4=function(e,o){var t={};for(var i in e)t[i]=e[i];for(var i in o)t[i]=o[i];return t};var Ct=function(e,o,t){for(;t;++o)e[o]=t,t>>>=8};function I_(e,o){return A_(e,o||{},0,0)}var V4=function(e,o,t,i){for(var n in e){var r=e[n],a=o+n,s=i;Array.isArray(r)&&(s=N4(i,r[1]),r=r[0]),ArrayBuffer.isView(r)?t[a]=[r,s]:(t[a+="/"]=[new At(0),s],V4(r,a,t,i))}},q4=typeof TextEncoder<"u"&&new TextEncoder,F_=typeof TextDecoder<"u"&&new TextDecoder,L_=0;try{F_.decode(P4,{stream:!0}),L_=1}catch{}function Mn(e,o){if(o){for(var t=new At(e.length),i=0;i<e.length;++i)t[i]=e.charCodeAt(i);return t}if(q4)return q4.encode(e);for(var n=e.length,r=new At(e.length+(e.length>>1)),a=0,s=function(c){r[a++]=c},i=0;i<n;++i){if(a+5>r.length){var l=new At(a+8+(n-i<<1));l.set(r),r=l}var d=e.charCodeAt(i);d<128||o?s(d):d<2048?(s(192|d>>6),s(128|d&63)):d>55295&&d<57344?(d=65536+(d&1047552)|e.charCodeAt(++i)&1023,s(240|d>>18),s(128|d>>12&63),s(128|d>>6&63),s(128|d&63)):(s(224|d>>12),s(128|d>>6&63),s(128|d&63))}return L4(r,0,a)}var ym=function(e){var o=0;if(e)for(var t in e){var i=e[t].length;i>65535&&Rd(9),o+=i+4}return o},T4=function(e,o,t,i,n,r,a,s){var l=i.length,d=t.extra,c=s&&s.length,u=ym(d);Ct(e,o,a!=null?33639248:67324752),o+=4,a!=null&&(e[o++]=20,e[o++]=t.os),e[o]=20,o+=2,e[o++]=t.flag<<1|(r<0&&8),e[o++]=n&&8,e[o++]=t.compression&255,e[o++]=t.compression>>8;var m=new Date(t.mtime==null?Date.now():t.mtime),g=m.getFullYear()-1980;if((g<0||g>119)&&Rd(10),Ct(e,o,g<<25|m.getMonth()+1<<21|m.getDate()<<16|m.getHours()<<11|m.getMinutes()<<5|m.getSeconds()>>1),o+=4,r!=-1&&(Ct(e,o,t.crc),Ct(e,o+4,r<0?-r-2:r),Ct(e,o+8,t.size)),Ct(e,o+12,l),Ct(e,o+14,u),o+=16,a!=null&&(Ct(e,o,c),Ct(e,o+6,t.attrs),Ct(e,o+10,a),o+=14),e.set(i,o),o+=l,u)for(var b in d){var y=d[b],q=y.length;Ct(e,o,+b),Ct(e,o+2,q),e.set(y,o+4),o+=4+q}return c&&(e.set(s,o),o+=c),o},D_=function(e,o,t,i,n){Ct(e,o,101010256),Ct(e,o+8,t),Ct(e,o+10,t),Ct(e,o+12,i),Ct(e,o+16,n)};function B4(e,o){o||(o={});var t={},i=[];V4(e,"",t,o);var n=0,r=0;for(var a in t){var s=t[a],l=s[0],d=s[1],c=d.level==0?0:8,u=Mn(a),m=u.length,g=d.comment,b=g&&Mn(g),y=b&&b.length,q=ym(d.extra);m>65535&&Rd(11);var D=c?I_(l,d):l,j=D.length,k=R_();k.p(l),i.push(N4(d,{size:l.length,crc:k.d(),c:D,f:u,m:b,u:m!=a.length||b&&g.length!=y,o:n,compression:c})),n+=30+m+q+j,r+=76+2*(m+q)+(y||0)+j}for(var N=new At(r+22),z=n,H=r-n,G=0;G<i.length;++G){var u=i[G];T4(N,u.o,u,u.f,u.u,u.c.length);var Y=30+u.f.length+ym(u.extra);N.set(u.c,u.o+Y),T4(N,n,u,u.f,u.u,u.c.length,u.o,u.m),n+=16+Y+(u.m?u.m.length:0)}return D_(N,n,i.length,H,z),N}function W4(e,o){let t=P_(),i=N_(e),n=V_(o),r=B_();return t+i+n+r}function P_(){return`<?xml version="1.0" encoding="UTF-8"?>
3644
3675
  <model unit="millimeter" xml:lang="en-US" xmlns="http://schemas.microsoft.com/3dmanufacturing/core/2015/02" xmlns:slic3rpe="http://schemas.slic3r.org/3mf/2017/06">
3645
3676
  <metadata name="Application">PrusaSlicer-2.7.2</metadata>
3646
3677
  <resources>
3647
3678
  <object id="1" type="model">
3648
3679
  <mesh>
3649
- `}function O_(t){let o=` <vertices>
3650
- `;for(let e of t)o+=` ${e}
3680
+ `}function N_(e){let o=` <vertices>
3681
+ `;for(let t of e)o+=` ${t}
3651
3682
  `;return o+=` </vertices>
3652
- `,o}function z_(t){let o=` <triangles>
3653
- `;for(let e of t)o+=` ${e}
3683
+ `,o}function V_(e){let o=` <triangles>
3684
+ `;for(let t of e)o+=` ${t}
3654
3685
  `;return o+=` </triangles>
3655
- `,o}function $_(){return` </mesh>
3686
+ `,o}function B_(){return` </mesh>
3656
3687
  </object>
3657
3688
  </resources>
3658
3689
  <build> <item objectid="1"/> </build>
3659
3690
  </model>
3660
- `}function z4(t){let o=j_();for(let e of t)o+=H_(e);return o+=U_(),o}function j_(){return`<?xml version="1.0" encoding="UTF-8"?>
3691
+ `}function O4(e){let o=W_();for(let t of e)o+=O_(t);return o+=z_(),o}function W_(){return`<?xml version="1.0" encoding="UTF-8"?>
3661
3692
  <config>
3662
3693
  <object id="1" instances_count="1">
3663
3694
  <metadata type="object" key="name" value="CodeCharta Map"/>
3664
- `}function H_(t){return` <volume firstid="${t.firstTriangleId}" lastid="${t.lastTriangleId}">
3665
- <metadata type="volume" key="name" value="${t.name}"/>
3666
- <metadata type="volume" key="extruder" value="${t.extruder}"/>
3695
+ `}function O_(e){return` <volume firstid="${e.firstTriangleId}" lastid="${e.lastTriangleId}">
3696
+ <metadata type="volume" key="name" value="${e.name}"/>
3697
+ <metadata type="volume" key="extruder" value="${e.extruder}"/>
3667
3698
  <metadata type="volume" key="source_object_id" value="1"/>
3668
- <metadata type="volume" key="source_volume_id" value="${t.id}"/>
3699
+ <metadata type="volume" key="source_volume_id" value="${e.id}"/>
3669
3700
  </volume>
3670
- `}function U_(){return` </object>
3701
+ `}function z_(){return` </object>
3671
3702
  </config>
3672
- `}function $4(){return`<?xml version="1.0" encoding="UTF-8"?>
3703
+ `}function z4(){return`<?xml version="1.0" encoding="UTF-8"?>
3673
3704
  <Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types">
3674
3705
  <Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/>
3675
3706
  <Default Extension="model" ContentType="application/vnd.ms-package.3dmanufacturing-3dmodel+xml"/>
3676
- </Types>`}function j4(){return`<?xml version="1.0" encoding="UTF-8"?>
3707
+ </Types>`}function $4(){return`<?xml version="1.0" encoding="UTF-8"?>
3677
3708
  <Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
3678
3709
  <Relationship Target="/3D/3dmodel.model" Id="rel-1" Type="http://schemas.microsoft.com/3dmanufacturing/2013/01/3dmodel"/>
3679
- </Relationships>`}async function U4(t){let{vertices:o,triangles:e,volumes:i}=G_(t),n=O4(o,e),r=z4(i),a=$4(),s=j4(),l=!0,d={"3D":{"3dmodel.model":Mn(n,l)},_rels:{".rels":Mn(s,l)},Metadata:{"Slic3r_PE_model.config":Mn(r,l)},"[Content_Types].xml":Mn(a,l)};return W4(d,{comment:"created by CodeCharta"}).buffer}function G_(t){let o=[],e=[],i=[],n=new Map,r=new Map;for(let a of t.children)G4(a,o,e,n,r,i);return{vertices:o,triangles:e,volumes:i}}function G4(t,o,e,i,n,r,a=void 0){if(!t.visible)return;for(let c of t.children){let u=t.matrix;a&&(u=a.clone().multiply(t.matrix)),G4(c,o,e,i,n,r,u)}let s=X_(t),l=new Map,d=1;for(let[c,u]of s.entries()){let m=e.length;K_(o,i,l,u,t,a),Q_(t.geometry,e,l,u),Y_(t,c,m,e.length-1,r,d,n),d++}}function X_(t){let o=new Map;if(t.geometry.attributes.color)for(let e=0;e<t.geometry.attributes.color.count;e++){let i=H4(t.geometry.attributes.color,e);o.has(i)?o.get(i).push(e):o.set(i,[e])}else if(t.geometry.attributes.position){let e=t.material,i;if(e.color)i=e.color.getHexString();else if(e.isShaderMaterial){let r=e.defaultAttributeValues.color;i=H4(r,0)}let n=Array.from({length:t.geometry.attributes.position.count},(r,a)=>a);o.set(i,n)}return o}function K_(t,o,e,i,n,r){let a=n.geometry.attributes.position;for(let s of i){let l=new Ze(a.getX(s),a.getY(s),a.getZ(s));l.applyMatrix4(n.matrix),r&&l.applyMatrix4(r);let d=`<vertex x="${l.x}" y="${l.y}" z="${l.z}"/>`;o.has(d)?e.set(s,o.get(d)):(t.push(d),o.set(d,t.length-1),e.set(s,t.length-1))}}function Q_(t,o,e,i){if(t.index){let n=t.index;for(let r=0;r<n.count;r+=3){let a=n.getX(r),s=n.getY(r),l=n.getZ(r);if(i.includes(a)&&i.includes(s)&&i.includes(l)){let d=`<triangle v1="${e.get(a)}" v2="${e.get(s)}" v3="${e.get(l)}" />`;o.push(d)}}}else for(let n=0;n<e.size;n+=3){let r=`<triangle v1="${e.get(n)}" v2="${e.get(n+1)}" v3="${e.get(n+2)}" />`;o.push(r)}}function Y_(t,o,e,i,n,r,a){a.has(o)||a.set(o,a.size+1);let s=a.get(o),l=t.name==="Map"?`${t.name} 0x${o}`:t.name,d={id:r,name:l,color:o,extruder:s,firstTriangleId:e,lastTriangleId:i};n.push(d)}function H4(t,o){return(t instanceof _o?[t.getX(o),t.getY(o),t.getZ(o)]:[t[o],t[o+1],t[o+2]]).map(i=>Math.round(i*255).toString(16).padStart(2,"0")).join("")}var X4=(()=>{class t{constructor(){this.isPrintMeshLoaded=J.required(),this.download3MF=fe(),this.downloadSTL=fe()}handleDownload3MF(){this.download3MF.emit()}handleDownloadSTL(){this.downloadSTL.emit()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["cc-export-actions"]],inputs:{isPrintMeshLoaded:[1,"isPrintMeshLoaded"]},outputs:{download3MF:"download3MF",downloadSTL:"downloadSTL"},decls:7,vars:2,consts:[[1,"flex","gap-2"],["title","Download 3MF Button",1,"btn","btn-primary",3,"click","disabled"],[1,"fa","fa-download"],["title","Download STL Button",1,"btn","btn-outline",3,"click","disabled"]],template:function(i,n){i&1&&(_(0,"div",0)(1,"button",1),re("click",function(){return n.handleDownload3MF()}),Ce(2,"i",2),x(3," Download 3MF "),T(),_(4,"button",3),re("click",function(){return n.handleDownloadSTL()}),Ce(5,"i",2),x(6," Download minimal STL "),T()()),i&2&&(h(),xe("disabled",!n.isPrintMeshLoaded()),h(3),xe("disabled",!n.isPrintMeshLoaded()))},encapsulation:2})}}return t})();var K4=(()=>{class t{constructor(){this.frontText=J(""),this.textChanged=fe()}handleInput(e){let i=e.target;this.textChanged.emit(i.value)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["cc-front-text-input"]],inputs:{frontText:[1,"frontText"]},outputs:{textChanged:"textChanged"},decls:5,vars:1,consts:[[1,"form-control","w-full"],[1,"label"],[1,"label-text","font-medium"],["type","text","placeholder","CodeCharta","data-testid","frontText",1,"input","input-bordered","w-full",3,"input","value"]],template:function(i,n){i&1&&(_(0,"label",0)(1,"div",1)(2,"span",2),x(3,"Bottom center label text"),T()(),_(4,"input",3),re("input",function(a){return n.handleInput(a)}),T()()),i&2&&(h(4),xe("value",n.frontText()))},encapsulation:2})}}return t})();var Z_=["fileInput"];function J_(t,o){if(t&1){let e=ue();f(0,"div",5)(1,"button",6),V("click",function(){oe(e);let n=L();return ne(n.handleRemoveLogo())}),W(2,"i",7),x(3," Remove "),p(),f(4,"button",8),V("click",function(){oe(e);let n=L();return ne(n.handleRotateLogo())}),W(5,"i",9),x(6," Rotate "),p(),f(7,"button",10),V("click",function(){oe(e);let n=L();return ne(n.handleFlipLogo())}),W(8,"i",11),x(9," Flip "),p()(),f(10,"div",12)(11,"cc-inline-color-picker",13),V("colorChange",function(n){oe(e);let r=L();return ne(r.handleColorChange(n))}),p(),f(12,"span",14),x(13,"Color"),p()()}if(t&2){let e=L();h(11),R("hexColor",e.logoColor())}}var Q4=(()=>{class t{constructor(){this.fileInput=Ue.required("fileInput"),this.isFileSelected=J.required(),this.logoColor=J("#ffffff"),this.fileSelected=fe(),this.logoRemoved=fe(),this.logoRotated=fe(),this.logoFlipped=fe(),this.colorChanged=fe()}handleFileSelected(e){let n=e.target.files?.[0];n&&this.fileSelected.emit(n)}handleRemoveLogo(){this.fileInput().nativeElement.value="",this.logoRemoved.emit()}handleRotateLogo(){this.logoRotated.emit()}handleFlipLogo(){this.logoFlipped.emit()}handleColorChange(e){this.colorChanged.emit(e)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["cc-logo-upload"]],viewQuery:function(i,n){i&1&&tt(n.fileInput,Z_,5),i&2&&it()},inputs:{isFileSelected:[1,"isFileSelected"],logoColor:[1,"logoColor"]},outputs:{fileSelected:"fileSelected",logoRemoved:"logoRemoved",logoRotated:"logoRotated",logoFlipped:"logoFlipped",colorChanged:"colorChanged"},decls:7,vars:1,consts:[["fileInput",""],[1,"card","bg-base-200"],[1,"card-body","p-4"],[1,"card-title","text-sm"],["type","file","aria-label","Bottom left logo (SVG)","accept",".svg",1,"file-input","file-input-bordered","file-input-sm","w-full",3,"change"],[1,"flex","flex-wrap","gap-2","mt-2"],["title","Remove Logo",1,"btn","btn-sm","btn-ghost",3,"click"],[1,"fa","fa-times"],["title","Rotate Logo",1,"btn","btn-sm","btn-ghost",3,"click"],[1,"fa","fa-rotate-right"],["title","Flip Logo",1,"btn","btn-sm","btn-ghost",3,"click"],[1,"fa","fa-arrows-h"],[1,"flex","items-center","gap-2","mt-2"],["ariaLabel","Logo color",3,"colorChange","hexColor"],[1,"text-sm"]],template:function(i,n){i&1&&(f(0,"div",1)(1,"div",2)(2,"h3",3),x(3,"Bottom left logo (SVG)"),p(),f(4,"input",4,0),V("change",function(a){return n.handleFileSelected(a)}),p(),K(6,J_,14,1),p()()),i&2&&(h(6),Q(n.isFileSelected()?6:-1))},dependencies:[To],encapsulation:2})}}return t})();var eE=(t,o)=>o.name;function tE(t,o){if(t&1&&(_(0,"option",4),x(1),T()),t&2){let e=o.$implicit,i=L();xe("selected",e.name===i.selectedPrinter().name),h(),Zm(" ",e.name," (",e.x/10,"\xD7",e.y/10,"\xD7",e.z/10,"cm, ",e.numberOfColors," colors) ")}}var Em=[{name:"Prusa MK3S (single color)",x:245,y:205,z:205,numberOfColors:1},{name:"BambuLab A1 + AMS Lite",x:251,y:251,z:251,numberOfColors:4},{name:"Prusa XL (5 colors)",x:355,y:335,z:355,numberOfColors:5}],Y4=(()=>{class t{constructor(){this.selectedPrinter=J.required(),this.printerChanged=fe(),this.printers=Em}handlePrinterChange(e){let i=e.target,n=this.printers[i.selectedIndex];this.printerChanged.emit(n)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["cc-printer-preset-selection"]],inputs:{selectedPrinter:[1,"selectedPrinter"]},outputs:{printerChanged:"printerChanged"},decls:7,vars:0,consts:[[1,"form-control","w-full"],[1,"label"],[1,"label-text","font-medium"],["data-testid","selectPrinter",1,"select","select-bordered","w-full",3,"change"],["data-testid","selectedPrinter",3,"selected"]],template:function(i,n){i&1&&(_(0,"label",0)(1,"div",1)(2,"span",2),x(3,"Printer preset"),T()(),_(4,"select",3),re("change",function(a){return n.handlePrinterChange(a)}),Ne(5,tE,2,6,"option",4,eE),T()()),i&2&&(h(5),Ve(n.printers))},encapsulation:2})}}return t})();function iE(t,o){if(t&1){let e=ue();_(0,"input",7),re("input",function(n){oe(e);let r=L();return ne(r.handleTextInput(n))}),T()}if(t&2){let e=L();xe("value",e.currentText())}}var Z4=(()=>{class t{constructor(){this.isVisible=J.required(),this.currentText=J(""),this.visibilityChanged=fe(),this.textChanged=fe()}handleToggleChange(e){let i=e.target;this.visibilityChanged.emit(i.checked)}handleTextInput(e){let i=e.target;this.textChanged.emit(i.value)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["cc-qr-code-settings"]],inputs:{isVisible:[1,"isVisible"],currentText:[1,"currentText"]},outputs:{visibilityChanged:"visibilityChanged",textChanged:"textChanged"},decls:9,vars:2,consts:[[1,"card","bg-base-200"],[1,"card-body","p-4"],[1,"card-title","text-sm"],[1,"label","cursor-pointer","justify-start","gap-4"],["type","checkbox","data-testid","qrCodeToggle",1,"toggle","toggle-primary","toggle-sm",3,"change","checked"],[1,"label-text"],["type","text","aria-label","URL for QR code","placeholder","URL for QR code","data-testid","qrCodeText",1,"input","input-bordered","input-sm","w-full",3,"value"],["type","text","aria-label","URL for QR code","placeholder","URL for QR code","data-testid","qrCodeText",1,"input","input-bordered","input-sm","w-full",3,"input","value"]],template:function(i,n){i&1&&(_(0,"div",0)(1,"div",1)(2,"h3",2),x(3,"QR-Code"),T(),_(4,"label",3)(5,"input",4),re("change",function(a){return n.handleToggleChange(a)}),T(),_(6,"span",5),x(7,"Show QR-Code"),T()(),K(8,iE,1,1,"input",6),T()()),i&2&&(h(5),xe("checked",n.isVisible()),h(3),Q(n.isVisible()?8:-1))},encapsulation:2})}}return t})();var J4=(()=>{class t{constructor(){this.currentSize=J.required(),this.wantedWidth=J.required(),this.maxWidth=J.required(),this.selectedPrinter=J.required(),this.widthChanged=fe()}handleSliderChange(e){let i=e.target;this.widthChanged.emit(Number(i.value))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["cc-scale-slider"]],inputs:{currentSize:[1,"currentSize"],wantedWidth:[1,"wantedWidth"],maxWidth:[1,"maxWidth"],selectedPrinter:[1,"selectedPrinter"]},outputs:{widthChanged:"widthChanged"},decls:12,vars:9,consts:[[1,"card","bg-base-200"],[1,"card-body","p-4"],[1,"card-title","text-sm"],["type","range","aria-label","Scale","data-testid","onScaleChange",1,"range","range-primary","range-sm",3,"change","min","max","value"],["data-testid","printSizeOverview",1,"text-sm","mt-2"]],template:function(i,n){i&1&&(_(0,"div",0)(1,"div",1)(2,"h3",2),x(3,"Scale"),T(),_(4,"input",3),re("change",function(a){return n.handleSliderChange(a)}),T(),_(5,"div",4)(6,"div"),x(7),T(),_(8,"div"),x(9),T(),_(10,"div"),x(11),T()()()()),i&2&&(h(4),xe("min",100)("max",n.maxWidth())("value",n.wantedWidth()),h(3),qn("Width: ",(n.currentSize().x/10).toFixed(1),"cm (max. ",(n.selectedPrinter().x/10).toFixed(1),")"),h(2),qn("Depth: ",(n.currentSize().y/10).toFixed(1),"cm (max. ",(n.selectedPrinter().y/10).toFixed(1),")"),h(2),qn("Height: ",(n.currentSize().z/10).toFixed(1),"cm (max. ",(n.selectedPrinter().z/10).toFixed(1),")"))},encapsulation:2})}}return t})();function oE(t,o){if(t&1){let e=ue();_(0,"input",7),re("input",function(n){oe(e);let r=L();return ne(r.handleTextInput(n))}),T()}if(t&2){let e=L();xe("value",e.currentText())}}var e5=(()=>{class t{constructor(){this.isVisible=J.required(),this.currentText=J(""),this.visibilityChanged=fe(),this.textChanged=fe()}handleToggleChange(e){let i=e.target;this.visibilityChanged.emit(i.checked)}handleTextInput(e){let i=e.target;this.textChanged.emit(i.value)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["cc-second-row-text-input"]],inputs:{isVisible:[1,"isVisible"],currentText:[1,"currentText"]},outputs:{visibilityChanged:"visibilityChanged",textChanged:"textChanged"},decls:9,vars:2,consts:[[1,"card","bg-base-200"],[1,"card-body","p-4"],[1,"card-title","text-sm"],[1,"label","cursor-pointer","justify-start","gap-4"],["type","checkbox","data-testid","secondRowToggle",1,"toggle","toggle-primary","toggle-sm",3,"change","checked"],[1,"label-text"],["type","text","aria-label","Second row center text","data-testid","secondRowText",1,"input","input-bordered","input-sm","w-full",3,"value"],["type","text","aria-label","Second row center text","data-testid","secondRowText",1,"input","input-bordered","input-sm","w-full",3,"input","value"]],template:function(i,n){i&1&&(_(0,"div",0)(1,"div",1)(2,"h3",2),x(3,"Second row center text"),T(),_(4,"label",3)(5,"input",4),re("change",function(a){return n.handleToggleChange(a)}),T(),_(6,"span",5),x(7,"Show second row text"),T()(),K(8,oE,1,1,"input",6),T()()),i&2&&(h(5),xe("checked",n.isVisible()),h(3),Q(n.isVisible()?8:-1))},encapsulation:2})}}return t})();var t5=(()=>{class t{constructor(e,i,n,r,a){this.mapStateReadWindow=e,this.metricsLensSourceReadWindow=i,this.sharedViewReadWindow=n,this.fileStoreReadWindow=r,this.ccStateSnapshot=a}getAreaMetric(){return this.mapStateReadWindow.getAreaMetric()}getHeightMetric(){return this.mapStateReadWindow.getHeightMetric()}getColorMetric(){return this.mapStateReadWindow.getColorMetric()}getColorRange(){return this.mapStateReadWindow.getColorRange()}getAttributeDescriptors(){return this.metricsLensSourceReadWindow.getAttributeDescriptors()}getNodeMetricData(){return Gn(this.ccStateSnapshot.get())}getExcludedNodes(){return this.sharedViewReadWindow.getExcludedNodes()}getFiles(){return this.fileStoreReadWindow.getFiles()}getAccumulatedFileName(){return Dt(this.ccStateSnapshot.get()).unifiedFileMeta?.fileName}static{this.\u0275fac=function(i){return new(i||t)(M(Ee),M(Bs),M(_t),M(Fe),M(Pt))}}static{this.\u0275prov=O({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var rE=["dialog"],aE=["rendererContainer"],km=(()=>{class t{constructor(e,i){this.stateAccessStore=e,this.threeSceneService=i,this.dialog=Ue.required("dialog"),this.rendererContainer=Ue.required("rendererContainer"),this.closed=fe(),this.currentSize=ke(new Ze),this.isPrintMeshLoaded=ke(!1),this.frontText=ke(""),this.logoColor=ke("#ffffff"),this.isFileSelected=ke(!1),this.secondRowVisible=ke(!1),this.secondRowText=ke(new Date().toLocaleDateString()),this.qrCodeVisible=ke(!1),this.qrCodeText=ke("maibornwolff.de/service/it-sanierung"),this.selectedPrinter=ke(Em[2]),this.maxWidth=ke(0),this.wantedWidth=ke(0),this.layerHeight=.2,this.frontTextSize=8,this.secondRowTextSize=6,this.frontPrintDepth=.6,this.mapSideOffset=10,this.baseplateHeight=1,this.logoSize=10,this.primaryShaderMaterialIndex=0,this.exportMesh=this.threeSceneService.getMapMesh().toExportMesh();let n=bm(new Ze(this.selectedPrinter().x,this.selectedPrinter().y,this.selectedPrinter().z),this.exportMesh,this.frontTextSize,this.baseplateHeight,this.mapSideOffset);this.maxWidth.set(n),this.wantedWidth.set(n),this.currentSize.update(a=>(a.x=n,a)),this.currentNumberOfColors=this.selectedPrinter().numberOfColors,this.areaMetric=this.stateAccessStore.getAreaMetric(),this.heightMetric=this.stateAccessStore.getHeightMetric(),this.colorMetric=this.stateAccessStore.getColorMetric();let r=this.stateAccessStore.getNodeMetricData();this.nodeMetricData=r.filter(a=>a.name===this.areaMetric||a.name===this.heightMetric||a.name===this.colorMetric)}async ngAfterViewInit(){let e=this.dialog().nativeElement;e.addEventListener("close",()=>this.closed.emit()),e.showModal(),await this.createScene(),this.isPrintMeshLoaded.set(!0)}close(){this.dialog().nativeElement.close()}handleScaleChange(e){this.wantedWidth.set(e),this.previewMesh.updateSize(e).then(i=>{this.qrCodeVisible.set(i)}),this.currentSize.set(this.previewMesh.getSize())}handleFrontTextChange(e){this.frontText.set(e),this.previewMesh.updateFrontText(e)}handleFileSelected(e){this.isFileSelected.set(!0);let i=new FileReader;i.readAsDataURL(e),i.onload=()=>{this.previewMesh.addCustomLogo(i.result)}}handleRotateLogo(){this.previewMesh.rotateCustomLogo()}handleFlipLogo(){this.previewMesh.flipCustomLogo()}handleRemoveLogo(){this.isFileSelected.set(!1),this.previewMesh.removeCustomLogo()}handlePrinterChange(e){this.selectedPrinter.set(e);let i=e.numberOfColors;this.currentNumberOfColors!==i&&(this.previewMesh.updateNumberOfColors(i),this.currentNumberOfColors=i),this.makeMapMaxSize(),this.updateCameraPosition(this.printPreviewScene.getObjectByName("camera"))}handleLogoColorChange(e){this.logoColor.set(e),this.previewMesh.updateCustomLogoColor(e)}handleQrCodeTextChange(e){this.qrCodeText.set(e),this.previewMesh.updateQrCodeText(e),this.previewMesh.updateQrCodeVisibility(this.qrCodeVisible())}handleQrCodeVisibilityChange(e){this.qrCodeVisible.set(e),this.previewMesh.updateQrCodeVisibility(e)}handleSecondRowTextChange(e){this.secondRowText.set(e),this.previewMesh.updateSecondRowText(e),this.previewMesh.updateSecondRowVisibility(this.secondRowVisible())}handleSecondRowVisibilityChange(e){this.secondRowVisible.set(e),this.previewMesh.updateSecondRowVisibility(e)}async createScene(){let e=new Rs;e.name="printPreviewScene",this.printPreviewScene=e,e.background=new jn(15527388);let i=this.threeSceneService.scene.clone().children[3];i.name="lights",e.add(i);let n=new Ts(45,1.15,50,2e5);n.name="camera",n.up=new Ze(0,0,1),e.add(n),this.initRenderer(e,n),this.previewMesh=new Td(this.initGeometryOptions()),await this.previewMesh.initialize(),this.currentSize.set(this.previewMesh.getSize()),e.add(this.previewMesh.getThreeMesh()),this.updateCameraPosition(n)}initRenderer(e,i){let n=this.getGL(),r=this.rendererContainer().nativeElement,a=r.offsetWidth||600,s=r.offsetHeight||450;n.setSize(a,s,!0),r.appendChild(n.domElement);let l=new Ks(i,n.domElement),d=function(){requestAnimationFrame(d),l.update(),n.render(e,i)};d()}getGL(){return new Ps}updateCameraPosition(e){let i=this.currentSize();e.position.set(-i.x*.2,-i.y*1.2,i.z*3)}async handleDownload3MF(){let e=await U4(this.printPreviewScene.getObjectByName("PrintMesh"));this.downloadFile(e,"3mf")}makeMapMaxSize(){let e=bm(new Ze(this.selectedPrinter().x,this.selectedPrinter().y,this.selectedPrinter().z),this.exportMesh,this.frontTextSize,this.baseplateHeight,this.mapSideOffset);this.wantedWidth.set(e),this.previewMesh.updateSize(e).then(i=>{this.qrCodeVisible.set(i)}),this.currentSize.set(this.previewMesh.getSize()),this.maxWidth.set(this.currentSize().x)}handleDownloadSTL(){let e=new Kc().parse(this.previewMesh.getMapMesh(),{binary:!0});this.downloadFile(e,"stl")}initGeometryOptions(){let e=this.stateAccessStore.getAttributeDescriptors(),i=F0,n=e[this.areaMetric]?.title||i.get(this.areaMetric),r=e[this.heightMetric]?.title||i.get(this.heightMetric),a=e[this.colorMetric]?.title||i.get(this.colorMetric);return{originalMapMesh:this.exportMesh,width:this.wantedWidth(),areaMetricTitle:n,areaMetricData:this.nodeMetricData.find(s=>s.name===this.areaMetric),heightMetricTitle:r,heightMetricData:this.nodeMetricData.find(s=>s.name===this.heightMetric),colorMetricTitle:a,colorMetricData:this.nodeMetricData.find(s=>s.name===this.colorMetric),colorRange:this.stateAccessStore.getColorRange(),frontText:this.frontText(),secondRowText:this.secondRowText(),secondRowVisible:this.secondRowVisible(),qrCodeText:this.qrCodeText(),defaultMaterial:this.exportMesh.material[this.primaryShaderMaterialIndex].clone(),numberOfColors:this.currentNumberOfColors,layerHeight:this.layerHeight,frontTextSize:this.frontTextSize,secondRowTextSize:this.secondRowTextSize,printHeight:this.frontPrintDepth,mapSideOffset:this.mapSideOffset,baseplateHeight:this.baseplateHeight,logoSize:this.logoSize}}downloadFile(e,i){let n=this.stateAccessStore.getFiles(),r=this.stateAccessStore.getAccumulatedFileName(),a=`${Ns.getNewFileName(r,Ei(n))}.${i}`;Ir.downloadData(e,a)}static{this.\u0275fac=function(i){return new(i||t)(le(t5),le(bt))}}static{this.\u0275cmp=A({type:t,selectors:[["cc-export-3D-map-dialog"]],viewQuery:function(i,n){i&1&&tt(n.dialog,rE,5)(n.rendererContainer,aE,5),i&2&&it(2)},outputs:{closed:"closed"},decls:27,vars:13,consts:[["dialog",""],["rendererContainer",""],[1,"modal"],[1,"modal-box","max-w-6xl","w-11/12"],[1,"text-2xl","font-bold","mb-6"],[1,"flex","gap-6"],[1,"flex","flex-col","gap-4","w-1/3","min-w-72"],[3,"printerChanged","selectedPrinter"],[3,"widthChanged","currentSize","wantedWidth","maxWidth","selectedPrinter"],[3,"textChanged","frontText"],[3,"visibilityChanged","textChanged","isVisible","currentText"],[3,"fileSelected","logoRemoved","logoRotated","logoFlipped","colorChanged","isFileSelected","logoColor"],[1,"flex-1"],[1,"card","bg-base-200","h-full"],[1,"card-body","p-4"],[1,"card-title","text-sm"],[1,"w-full","min-h-96"],[1,"modal-action"],[3,"download3MF","downloadSTL","isPrintMeshLoaded"],[1,"btn",3,"click"],["method","dialog",1,"modal-backdrop"]],template:function(i,n){i&1&&(f(0,"dialog",2,0)(2,"div",3)(3,"h2",4),x(4,"3D Print CodeCharta Map"),p(),f(5,"div",5)(6,"div",6)(7,"cc-printer-preset-selection",7),V("printerChanged",function(a){return n.handlePrinterChange(a)}),p(),f(8,"cc-scale-slider",8),V("widthChanged",function(a){return n.handleScaleChange(a)}),p(),f(9,"cc-front-text-input",9),V("textChanged",function(a){return n.handleFrontTextChange(a)}),p(),f(10,"cc-second-row-text-input",10),V("visibilityChanged",function(a){return n.handleSecondRowVisibilityChange(a)})("textChanged",function(a){return n.handleSecondRowTextChange(a)}),p(),f(11,"cc-qr-code-settings",10),V("visibilityChanged",function(a){return n.handleQrCodeVisibilityChange(a)})("textChanged",function(a){return n.handleQrCodeTextChange(a)}),p(),f(12,"cc-logo-upload",11),V("fileSelected",function(a){return n.handleFileSelected(a)})("logoRemoved",function(){return n.handleRemoveLogo()})("logoRotated",function(){return n.handleRotateLogo()})("logoFlipped",function(){return n.handleFlipLogo()})("colorChanged",function(a){return n.handleLogoColorChange(a)}),p()(),f(13,"div",12)(14,"div",13)(15,"div",14)(16,"h3",15),x(17,"Preview"),p(),W(18,"div",16,1),p()()()(),f(20,"div",17)(21,"cc-export-actions",18),V("download3MF",function(){return n.handleDownload3MF()})("downloadSTL",function(){return n.handleDownloadSTL()}),p(),f(22,"button",19),V("click",function(){return n.close()}),x(23,"Close"),p()()(),f(24,"form",20)(25,"button"),x(26,"close"),p()()()),i&2&&(h(7),R("selectedPrinter",n.selectedPrinter()),h(),R("currentSize",n.currentSize())("wantedWidth",n.wantedWidth())("maxWidth",n.maxWidth())("selectedPrinter",n.selectedPrinter()),h(),R("frontText",n.frontText()),h(),R("isVisible",n.secondRowVisible())("currentText",n.secondRowText()),h(),R("isVisible",n.qrCodeVisible())("currentText",n.qrCodeText()),h(),R("isFileSelected",n.isFileSelected())("logoColor",n.logoColor()),h(9),R("isPrintMeshLoaded",n.isPrintMeshLoaded()))},dependencies:[Y4,J4,K4,e5,Z4,Q4,X4],encapsulation:2})}}return t})();var i5=(()=>{class t{constructor(e,i){this.store=e,this.mapStateReadWindow=i,this.colorMode$=this.store.select(hs)}getColorMode(){return this.mapStateReadWindow.getColorMode()}setAbsoluteColorMode(){this.store.dispatch(Ii({value:Ho.absolute}))}static{this.\u0275fac=function(i){return new(i||t)(M(me),M(Ee))}}static{this.\u0275prov=O({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var za=(()=>{class t{constructor(){this.colorModeStore=E(i5),this.errorDialogService=E(ls),this.activeViewStore=E(tr),this.viewReadinessStore=E(hr),this.threeRendererService=E(Nt),this.router=E(_i),this.dialogOpen=ke(!1),this.isDialogOpen=this.dialogOpen.asReadonly()}requestExport(){if(this.activeViewStore.currentView()!=="metrics"){this.errorDialogService.open(this.buildSwitchToMetricsViewDialog());return}if(this.colorModeStore.getColorMode()===Ho.absolute){this.dialogOpen.set(!0);return}this.errorDialogService.open(this.buildWrongColorModeDialog())}closeDialog(){this.dialogOpen.set(!1)}buildSwitchToMetricsViewDialog(){return{title:"3D export needs the Metric view",message:'<p>The 3D export builds on the rendered map, so it only works in the <strong>Metric view</strong>.<br><i class="fa fa-info-circle"></i> Use "Switch and continue" to open the Metric view and go straight to the export.<p>',resolveErrorData:{buttonText:"Switch and continue",onResolveErrorClick:()=>{this.switchToMetricsViewAndExport()}},dismissButtonText:"Stay here"}}async switchToMetricsViewAndExport(){await this.router.navigateByUrl(Vi.metrics)&&this.viewReadinessStore.isStale$("metrics").pipe(Ae(i=>!i),wt(1)).subscribe(()=>this.requestExport())}buildWrongColorModeDialog(){return{title:"Map could not be exported",message:'<p>3D map can only be exported when <strong>color mode</strong> is set to <strong>absolute</strong>.<br><i class="fa fa-info-circle"></i> You can change this under Color Metric Options or use "Change and continue" to directly change the color mode and continue.<p>',resolveErrorData:{buttonText:"Change and continue",onResolveErrorClick:()=>this.recolorTheMapAndExportIt()}}}recolorTheMapAndExportIt(){this.threeRendererService.afterRender$.pipe(wt(1)).subscribe(()=>this.dialogOpen.set(!0)),this.colorModeStore.setAbsoluteColorMode()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=O({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Or=(()=>{class t{transform(e){return Ns.withoutCCExtension(e)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275pipe=Gm({name:"removeExtension",type:t,pure:!0})}}return t})();var o5=(t,o)=>o.fileMeta.fileName;function sE(t,o){if(t&1){let e=ue();_(0,"li",9)(1,"button",10),re("click",function(){let n=oe(e).$implicit,r=L(2);return ne(r.handleReferenceChange(n))}),_(2,"span",11),x(3),Kt(4,"removeExtension"),T()()()}if(t&2){let e=o.$implicit,i=L(2);h(),Be("bg-base-200",i.isReferenceSelected(e))("font-bold",i.isReferenceSelected(e)),h(2),Re(Mi(4,5,e.fileMeta.fileName))}}function lE(t,o){if(t&1&&(_(0,"div",5)(1,"ul",8),Ne(2,sE,5,7,"li",9,o5),T()()),t&2){let e=L();h(2),Ve(e.referenceOptions())}}function cE(t,o){if(t&1){let e=ue();_(0,"li",9)(1,"button",10),re("click",function(){let n=oe(e).$implicit,r=L(2);return ne(r.handleComparisonChange(n))}),_(2,"span",11),x(3),Kt(4,"removeExtension"),T()()()}if(t&2){let e=o.$implicit,i=L(2);h(),Be("bg-base-200",i.isComparisonSelected(e))("font-bold",i.isComparisonSelected(e)),h(2),Re(Mi(4,5,e.fileMeta.fileName))}}function dE(t,o){if(t&1&&(_(0,"div",5)(1,"ul",8),Ne(2,cE,5,7,"li",9,o5),T()()),t&2){let e=L();h(2),Ve(e.comparisonOptions())}}var n5=(()=>{class t{constructor(){this.fileStoreReadWindow=E(Fe),this.navBarWriteStore=E(wr),this.elementRef=E(Gt),this.fileStates=F(this.fileStoreReadWindow.files$,{requireSync:!0}),this.referenceFile=F(this.fileStoreReadWindow.referenceFile$,{requireSync:!0}),this.openDropdown=ke("none"),this.referenceLabel=te(()=>{let e=this.referenceFile();return e?this.withoutExtension(e.fileMeta.fileName):"select reference file"}),this.comparisonFile=te(()=>this.fileStates().find(e=>e.selectedAs===li.Comparison)?.file),this.comparisonLabel=te(()=>{let e=this.comparisonFile();return e?this.withoutExtension(e.fileMeta.fileName):"select comparison file"}),this.referenceOptions=te(()=>this.fileStates().map(e=>e.file)),this.comparisonOptions=te(()=>this.fileStates().filter(e=>e.selectedAs!==li.Reference).map(e=>e.file)),this.swapDisabled=te(()=>this.comparisonFile()===void 0)}handleDocumentClick(e){this.openDropdown()!=="none"&&e.target instanceof Node&&!this.elementRef.nativeElement.contains(e.target)&&this.openDropdown.set("none")}toggleDropdown(e){this.openDropdown.update(i=>i===e?"none":e)}handleReferenceChange(e){this.navBarWriteStore.setDeltaReference(e),this.openDropdown.set("none")}handleComparisonChange(e){this.navBarWriteStore.setDeltaComparison(e),this.openDropdown.set("none")}handleSwap(){this.swapDisabled()||this.navBarWriteStore.switchReferenceAndComparison()}isReferenceSelected(e){return this.referenceFile()?.fileMeta.fileName===e.fileMeta.fileName}isComparisonSelected(e){return this.comparisonFile()?.fileMeta.fileName===e.fileMeta.fileName}withoutExtension(e){return new Or().transform(e)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["cc-delta-selector"]],hostBindings:function(i,n){i&1&&V("click",function(a){return n.handleDocumentClick(a)},jo)},decls:15,vars:9,consts:[[1,"flex","items-center","gap-1"],[1,"dropdown"],["type","button",1,"btn","btn-ghost","btn-sm","justify-between","min-w-[12rem]",3,"click"],[1,"truncate"],[1,"fa","fa-caret-down","ml-2"],[1,"dropdown-content","bg-base-100","rounded-box","border","border-base-300","shadow-md","mt-1","min-w-[12rem]","w-max","max-w-[24rem]","z-[70]","p-1"],["type","button","title","Switch reference and comparison file",1,"btn","btn-ghost","btn-sm","btn-square",3,"click","disabled"],[1,"fa","fa-arrows-h"],[1,"flex","flex-col","gap-0.5","p-0","m-0","list-none","max-h-72","overflow-y-auto"],[1,"w-full"],["type","button",1,"flex","items-center","gap-2","w-full","text-left","rounded-md","px-2","py-1","hover:bg-base-200",3,"click"],[1,"flex-1","whitespace-nowrap"]],template:function(i,n){i&1&&(_(0,"div",0)(1,"div",1)(2,"button",2),re("click",function(){return n.toggleDropdown("reference")}),_(3,"span",3),x(4),T(),Ce(5,"i",4),T(),K(6,lE,4,0,"div",5),T(),_(7,"button",6),re("click",function(){return n.handleSwap()}),Ce(8,"i",7),T(),_(9,"div",1)(10,"button",2),re("click",function(){return n.toggleDropdown("comparison")}),_(11,"span",3),x(12),T(),Ce(13,"i",4),T(),K(14,dE,4,0,"div",5),T()()),i&2&&(h(),Be("dropdown-open",n.openDropdown()==="reference"),h(3),Re(n.referenceLabel()),h(2),Q(n.openDropdown()==="reference"?6:-1),h(),xe("disabled",n.swapDisabled()),h(2),Be("dropdown-open",n.openDropdown()==="comparison"),h(3),Re(n.comparisonLabel()),h(2),Q(n.openDropdown()==="comparison"?14:-1))},dependencies:[Or],encapsulation:2})}}return t})();var hE=(t,o)=>o.file.fileMeta.fileName;function uE(t,o){t&1&&W(0,"i",15)}function mE(t,o){t&1&&W(0,"i",16)}function pE(t,o){if(t&1){let e=ue();f(0,"li",7)(1,"label",11)(2,"input",12),V("change",function(n){let r=oe(e).$implicit,a=L(2);return ne(a.handleCheckboxChange(r.file,n.target.checked))}),p(),f(3,"span",13),x(4),Kt(5,"removeExtension"),p(),f(6,"button",14),V("click",function(n){let r=oe(e).$implicit,a=L(2);return ne(a.handleRemoveFileToggle(r.file,n))}),K(7,uE,1,0,"i",15)(8,mE,1,0,"i",16),p()()()}if(t&2){let e=o.$implicit,i=L(2);h(2),R("checked",i.isFileSelected(e.file))("disabled",e.isRemoved),h(),Be("line-through",e.isRemoved),h(),we(" ",Mi(5,7,e.file.fileMeta.fileName)," "),h(2),R("title",e.isRemoved?"Undo remove map":"Remove map"),h(),Q(e.isRemoved?7:8)}}function fE(t,o){if(t&1){let e=ue();f(0,"div",4)(1,"cc-selection-shortcuts",5),V("selectAll",function(){oe(e);let n=L();return ne(n.handleSelectAll())})("selectNone",function(){oe(e);let n=L();return ne(n.handleSelectNone())})("invert",function(){oe(e);let n=L();return ne(n.handleSelectInvert())}),p(),f(2,"ul",6),Ne(3,pE,9,9,"li",7,hE),p(),f(5,"div",8)(6,"span",9)(7,"button",10),V("click",function(){oe(e);let n=L();return ne(n.handleApply())}),x(8," Apply "),p()()()()}if(t&2){let e=L();h(3),Ve(e.filesInUI()),h(3),Be("tooltip-disabled",!e.applyButtonState().disabled),rt("data-tip",e.applyButtonState().tooltip||null),h(),R("disabled",e.applyButtonState().disabled)}}var r5=(()=>{class t{constructor(){this.fileStoreReadWindow=E(Fe),this.navBarWriteStore=E(wr),this.elementRef=E(Gt),this.filesInStore=F(this.fileStoreReadWindow.files$,{requireSync:!0}),this.isOpen=ke(!1),this.filesInUI=ke([]),this.selectedFilesInUI=ke([]),this.triggerLabel=te(()=>{let e=this.selectedFilesInStore();return e.length===0?"Select map":e.length===1?this.withoutExtension(e[0].fileMeta.fileName):`${this.withoutExtension(e[0].fileMeta.fileName)} +${e.length-1}`}),this.applyButtonState=te(()=>this.selectedFilesInUI().length===0?{disabled:!0,tooltip:"Select at least one map"}:this.uiSelectionDiffersFromStore()?{disabled:!1,tooltip:""}:{disabled:!0,tooltip:"No changes to apply"}),this.syncFromStore(this.filesInStore())}handleDocumentClick(e){if(!this.isOpen())return;let i=e.target;this.elementRef.nativeElement.contains(i)||this.closeWithoutApplying()}toggleOpen(){this.isOpen()?this.closeWithoutApplying():(this.syncFromStore(this.filesInStore()),this.isOpen.set(!0))}handleCheckboxChange(e,i){let n=this.selectedFilesInUI();i?(n.includes(e)||this.selectedFilesInUI.set([...n,e]),this.filesInUI.update(r=>r.map(a=>a.file===e?{file:a.file,isRemoved:!1}:a))):this.selectedFilesInUI.set(n.filter(r=>r!==e))}handleRemoveFileToggle(e,i){i.stopPropagation(),i.preventDefault(),this.filesInUI.update(n=>n.map(r=>r.file.fileMeta.fileName===e.fileMeta.fileName?{file:r.file,isRemoved:!r.isRemoved}:r)),this.selectedFilesInUI.update(n=>n.filter(r=>r.fileMeta.fileName!==e.fileMeta.fileName))}handleSelectAll(){this.selectedFilesInUI.set(this.filesInUI().filter(e=>!e.isRemoved).map(e=>e.file))}handleSelectNone(){this.selectedFilesInUI.set([])}handleSelectInvert(){let e=this.filesInUI().filter(n=>!n.isRemoved);if(e.length===0)return;let i=this.selectedFilesInUI();i.length===0?this.selectedFilesInUI.set(e.map(n=>n.file)):i.length===e.length?this.selectedFilesInUI.set([]):this.selectedFilesInUI.set(e.filter(n=>!i.includes(n.file)).map(n=>n.file))}handleApply(){let e=this.filesInUI().filter(i=>i.isRemoved).map(i=>i.file.fileMeta.fileName);this.navBarWriteStore.setStandard(this.selectedFilesInUI()),this.navBarWriteStore.removeFiles(e),this.isOpen.set(!1)}closeWithoutApplying(){this.syncFromStore(this.filesInStore()),this.isOpen.set(!1)}syncFromStore(e){this.filesInUI.set(e.map(i=>({file:i.file,isRemoved:!1}))),this.selectedFilesInUI.set(e.filter(i=>i.selectedAs===li.Partial).map(i=>i.file))}selectedFilesInStore(){return this.filesInStore().filter(e=>e.selectedAs===li.Partial).map(e=>e.file)}uiSelectionDiffersFromStore(){if(this.filesInUI().some(n=>n.isRemoved))return!0;let e=this.selectedFilesInStore(),i=this.selectedFilesInUI();return i.length!==e.length?!0:!i.every(n=>e.includes(n))}withoutExtension(e){return new Or().transform(e)}isFileSelected(e){return this.selectedFilesInUI().includes(e)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["cc-map-selector"]],hostBindings:function(i,n){i&1&&V("click",function(a){return n.handleDocumentClick(a)},jo)},decls:6,vars:4,consts:[[1,"dropdown"],["type","button",1,"btn","btn-ghost","btn-sm","justify-between","min-w-[14rem]",3,"click"],[1,"truncate"],[1,"fa","fa-caret-down","ml-2"],[1,"dropdown-content","bg-base-100","rounded-box","border","border-base-300","shadow-md","mt-1","min-w-[14rem]","w-max","max-w-[32rem]","z-[70]","p-2"],[3,"selectAll","selectNone","invert"],[1,"flex","flex-col","gap-0.5","p-0","m-0","list-none","max-h-72","overflow-y-auto"],[1,"w-full"],[1,"flex","justify-end","mt-2"],[1,"tooltip"],["type","button",1,"btn","btn-primary","btn-sm",3,"click","disabled"],[1,"flex","items-center","gap-2","w-full","cursor-pointer","rounded-md","px-2","py-1","hover:bg-base-200"],["type","checkbox",1,"checkbox","checkbox-xs","shrink-0",3,"change","checked","disabled"],[1,"flex-1","whitespace-nowrap"],["type","button",1,"btn","btn-ghost","btn-xs","btn-square","shrink-0",3,"click","title"],[1,"fa","fa-undo"],[1,"fa","fa-trash"]],template:function(i,n){i&1&&(f(0,"div",0)(1,"button",1),V("click",function(){return n.toggleOpen()}),f(2,"span",2),x(3),p(),W(4,"i",3),p(),K(5,fE,9,4,"div",4),p()),i&2&&(Be("dropdown-open",n.isOpen()),h(3),Re(n.triggerLabel()),h(2),Q(n.isOpen()?5:-1))},dependencies:[og,Or],encapsulation:2})}}return t})();var a5=()=>{let t=document.createElement("INPUT");return t.setAttribute("type","file"),t.setAttribute("accept",".json,.gz"),t.setAttribute("multiple",""),t.style.display="none",document.body.appendChild(t),t};var s5=(()=>{class t{constructor(e){this.loadFilesUseCase=e}uploadFiles(){let e=a5();e.addEventListener("change",()=>{this.uploadFilesOnEvent(e),e.remove()}),e.addEventListener("cancel",()=>e.remove()),e.click()}async uploadFilesOnEvent(e){if(!e.files||e.files.length===0)return;let i=e.files;await this.loadFilesUseCase.loadFromUpload(()=>this.readNameDataPairs(i))}async readNameDataPairs(e){let i=Array.from(e),n=[];for(let r=0;r<i.length;r++){let a=i[r];y0(S0(a.name,r+1,i.length)),n.push({fileName:a.name,fileSize:a.size,content:await qp(new Uint8Array(await a.arrayBuffer()))})}return n}static{this.\u0275fac=function(i){return new(i||t)(M(dl))}}static{this.\u0275prov=O({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var l5=(()=>{class t{constructor(){this.uploadFilesService=E(s5)}uploadFiles(){this.uploadFilesService.uploadFiles()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["cc-nav-bar-folder-button"]],decls:2,vars:0,consts:[["type","button","title","Load cc.json files",1,"btn","btn-ghost","btn-square",3,"click"],[1,"fa","fa-folder-open","text-lg"]],template:function(i,n){i&1&&(_(0,"button",0),re("click",function(){return n.uploadFiles()}),Ce(1,"i",1),T())},encapsulation:2})}}return t})();var c5=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["cc-nav-bar-logo"]],decls:2,vars:0,consts:[["href","https://codecharta.com/","target","_blank","rel","noopener noreferrer","title","CodeCharta website",1,"flex","items-center","px-2"],["src","codeCharta/assets/codecharta_logo.svg","alt","CodeCharta",1,"h-8","w-auto"]],template:function(i,n){i&1&&(_(0,"a",0),Ce(1,"img",1),T())},encapsulation:2})}}return t})();var bE=["configDialog"],d5=(()=>{class t{constructor(){this.dialog=Ue.required("configDialog")}showSettings(){this.dialog().open()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["cc-settings-button"]],viewQuery:function(i,n){i&1&&tt(n.dialog,bE,5),i&2&&it()},decls:4,vars:0,consts:[["configDialog",""],["type","button","title","Global Configuration",1,"btn","btn-ghost","btn-sm",3,"click"]],template:function(i,n){i&1&&(f(0,"button",1),V("click",function(){return n.showSettings()}),x(1,` Settings
3680
- `),p(),W(2,"cc-global-configuration-dialog",null,0))},dependencies:[mg],encapsulation:2})}}return t})();var h5=Ge(Zs,Tf,(t,o)=>t&&o);var u5=(()=>{class t{constructor(){this.store=E(me),this.isDomainViewAvailable=F(this.store.select(vg),{initialValue:!1}),this.isDependencyViewAvailable=F(this.store.select(h5),{initialValue:!1})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=O({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function vE(t,o){t&1&&Ce(0,"span",2)}function xE(t,o){t&1&&Ce(0,"span",2)}function wE(t,o){if(t&1){let e=ue();_(0,"button",1),re("click",function(){oe(e);let n=L();return ne(n.selectCompare())}),x(1," Compare "),K(2,xE,1,0,"span",2),T()}if(t&2){let e=L();Be("font-bold",e.isDeltaState()),rt("aria-selected",e.isDeltaState()),h(2),Q(e.isDeltaState()?2:-1)}}var m5=(()=>{class t{constructor(){this.fileStoreReadWindow=E(Fe),this.fileSelectionModeService=E(Fl),this.router=E(_i),this.isDeltaState=F(this.fileStoreReadWindow.isDeltaState$,{requireSync:!0}),this.isRadialLayout=Vt(),this.isCompareOffered=te(()=>!this.isRadialLayout()||this.isDeltaState())}selectExplore(){this.showMetricsView(),this.isDeltaState()&&this.fileSelectionModeService.toggle()}selectCompare(){this.showMetricsView(),this.isDeltaState()||this.fileSelectionModeService.toggle()}showMetricsView(){this.router.navigateByUrl(Vi.metrics)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["cc-mode-toggle"]],decls:5,vars:5,consts:[["role","tablist",1,"flex","items-center","gap-1"],["type","button","role","tab",1,"btn","btn-ghost","btn-sm","relative",3,"click"],[1,"cc-current-underline"],["type","button","role","tab",1,"btn","btn-ghost","btn-sm","relative",3,"font-bold"]],template:function(i,n){i&1&&(_(0,"div",0)(1,"button",1),re("click",function(){return n.selectExplore()}),x(2," Explore "),K(3,vE,1,0,"span",2),T(),K(4,wE,3,4,"button",3),T()),i&2&&(h(),Be("font-bold",!n.isDeltaState()),rt("aria-selected",!n.isDeltaState()),h(2),Q(n.isDeltaState()?-1:3),h(),Q(n.isCompareOffered()?4:-1))},encapsulation:2})}}return t})();var p5=(()=>{class t{constructor(){this.export3DMapDialogStore=E(za)}export3DMap(){this.export3DMapDialogStore.requestExport()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["cc-print-3d-button"]],decls:2,vars:0,consts:[["type","button","title","Download 3MF code file",1,"btn","btn-ghost","btn-sm",3,"click"]],template:function(i,n){i&1&&(_(0,"button",0),re("click",function(){return n.export3DMap()}),x(1,` 3D Print
3681
- `),T())},encapsulation:2})}}return t})();function yE(t,o){t&1&&W(0,"cc-print-3d-button")}function SE(t,o){if(t&1&&(W(0,"cc-mode-toggle"),K(1,yE,1,0,"cc-print-3d-button")),t&2){let e=L();h(),Q(e.isRadialLayout()?-1:1)}}function CE(t,o){t&1&&W(0,"span",3)}function ME(t,o){if(t&1&&(f(0,"a",2,0),x(2," Explore "),K(3,CE,1,0,"span",3),p()),t&2){let e=Za(1),i=L();R("routerLink",i.routeLinks[i.view()]),rt("data-testid","view-mode-"+i.view()+"-explore"),h(3),Q(e.isActive?3:-1)}}var _E={metrics:"Metric modes",domain:"Domain modes",dependencies:"Dependency modes"},f5=(()=>{class t{constructor(){this.view=J.required(),this.routeLinks=Vi,this.groupLabel=te(()=>_E[this.view()]),this.isRadialLayout=Vt()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["cc-view-mode-bar"]],hostAttrs:[1,"block"],inputs:{view:[1,"view"]},decls:3,vars:2,consts:[["viewExplore","routerLinkActive"],[1,"flex","items-center","justify-center","gap-1","py-0.5","border-0","m-0","px-0","min-w-0"],["routerLinkActive","font-bold",1,"btn","btn-ghost","btn-sm","relative",3,"routerLink"],[1,"cc-current-underline"]],template:function(i,n){i&1&&(f(0,"fieldset",1),K(1,SE,2,1)(2,ME,4,3,"a",2),p()),i&2&&(rt("aria-label",n.groupLabel()),h(),Q(n.view()==="metrics"?1:2))},dependencies:[m5,p5,ns,rs],encapsulation:2})}}return t})();var EE=t=>({exact:t}),kE=(t,o)=>o.view;function qE(t,o){t&1&&W(0,"span",7)}function TE(t,o){if(t&1){let e=ue();f(0,"a",6,0),V("mouseenter",function(){let n=oe(e).$implicit,r=L();return ne(r.openModeBar(n.view))})("focusin",function(){let n=oe(e).$implicit,r=L();return ne(r.openModeBar(n.view))}),x(2),K(3,qE,1,0,"span",7),p()}if(t&2){let e=o.$implicit,i=Za(1),n=L();Be("font-bold",i.isActive),R("routerLink",n.routeLinks[e.view])("routerLinkActiveOptions",Jm(8,EE,e.matchesExactly))("title",e.title),rt("data-testid","view-switcher-"+e.view),h(2),we(" ",e.label," "),h(),Q(i.isActive?3:-1)}}function RE(t,o){if(t&1){let e=ue();f(0,"div",8),V("mouseenter",function(){oe(e);let n=L();return ne(n.cancelPendingClose())})("mouseleave",function(){oe(e);let n=L();return ne(n.scheduleClosingModeBar())}),W(1,"cc-view-mode-bar",9),p()}t&2&&(h(),R("view",o))}function AE(t,o){if(t&1){let e=ue();f(0,"span",10),V("mouseenter",function(){oe(e);let n=L();return ne(n.openModeBar(n.activeView()))}),ai(),f(1,"svg",11),W(2,"path",12),p()()}}var IE=200,FE=[{view:"metrics",label:"Metric",title:"Show the 3D metrics map",matchesExactly:!0},{view:"domain",label:"Domain",title:"Show the domain-language word cloud",matchesExactly:!1},{view:"dependencies",label:"Dependencies",title:"Show the dependency graph, arranged by level",matchesExactly:!1}],g5=(()=>{class t{constructor(){this.readStore=E(u5),this.hostElement=E(Gt),this.isViewAvailable={metrics:ke(!0),domain:this.readStore.isDomainViewAvailable,dependencies:this.readStore.isDependencyViewAvailable},this.availableTabs=te(()=>FE.filter(e=>this.isViewAvailable[e.view]())),this.activeView=F(E(tr).activeView$,{requireSync:!0}),this.routeLinks=Vi,this.previewedView=ke(null),this.pendingClose=null,E(Ga).onDestroy(()=>this.cancelPendingClose())}openModeBar(e){this.cancelPendingClose(),this.previewedView.set(e)}cancelPendingClose(){this.pendingClose!==null&&(clearTimeout(this.pendingClose),this.pendingClose=null)}scheduleClosingModeBar(){this.cancelPendingClose(),this.pendingClose=setTimeout(()=>this.closeModeBar(),IE)}closeModeBarWhenFocusLeaves(e){let i=e.relatedTarget;(!(i instanceof Node)||!this.hostElement.nativeElement.contains(i))&&this.closeModeBar()}closeModeBar(){this.cancelPendingClose(),this.previewedView.set(null)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["cc-view-switcher"]],hostAttrs:[1,"contents"],decls:6,vars:1,consts:[["tabLink","routerLinkActive"],[1,"flex","items-center",3,"click","mouseleave","focusout"],["aria-label","View","data-testid","view-switcher",1,"flex","items-center","gap-1"],["routerLinkActive","","ariaCurrentWhenActive","page",1,"btn","btn-ghost","btn-sm","relative",3,"font-bold","routerLink","routerLinkActiveOptions","title"],["data-testid","view-mode-bar-overlay",1,"absolute","inset-x-0","top-full","z-[70]","border-b","border-base-300","bg-base-100","shadow-md"],["aria-hidden","true","data-testid","view-mode-bar-handle",1,"absolute","left-1/2","top-full","z-[70]","mt-px","flex","-translate-x-1/2","cursor-pointer","items-center","rounded-b-md","border","border-t-0","border-base-300","bg-base-100","px-2.5","pb-1","pt-0.5","text-base-content/40","shadow-sm","hover:text-base-content/70"],["routerLinkActive","","ariaCurrentWhenActive","page",1,"btn","btn-ghost","btn-sm","relative",3,"mouseenter","focusin","routerLink","routerLinkActiveOptions","title"],[1,"cc-current-underline"],["data-testid","view-mode-bar-overlay",1,"absolute","inset-x-0","top-full","z-[70]","border-b","border-base-300","bg-base-100","shadow-md",3,"mouseenter","mouseleave"],[3,"view"],["aria-hidden","true","data-testid","view-mode-bar-handle",1,"absolute","left-1/2","top-full","z-[70]","mt-px","flex","-translate-x-1/2","cursor-pointer","items-center","rounded-b-md","border","border-t-0","border-base-300","bg-base-100","px-2.5","pb-1","pt-0.5","text-base-content/40","shadow-sm","hover:text-base-content/70",3,"mouseenter"],["viewBox","0 0 10 6","fill","none","stroke","currentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round",1,"block","h-1.5","w-2.5"],["d","M1 1 5 5 9 1"]],template:function(i,n){if(i&1&&(f(0,"div",1),V("click",function(){return n.closeModeBar()})("mouseleave",function(){return n.scheduleClosingModeBar()})("focusout",function(a){return n.closeModeBarWhenFocusLeaves(a)}),f(1,"nav",2),Ne(2,TE,4,10,"a",3,kE),p(),K(4,RE,2,1,"div",4)(5,AE,3,0,"span",5),p()),i&2){let r;h(2),Ve(n.availableTabs()),h(2),Q((r=n.previewedView())?4:5,r)}},dependencies:[ns,rs,f5],encapsulation:2})}}return t})();function LE(t,o){t&1&&W(0,"cc-delta-selector")}function DE(t,o){t&1&&W(0,"cc-map-selector")}function PE(t,o){if(t&1){let e=ue();f(0,"cc-export-3D-map-dialog",5),V("closed",function(){oe(e);let n=L();return ne(n.closeExportDialog())}),p()}}var qm=(()=>{class t{constructor(){this.fileStoreReadWindow=E(Fe),this.export3DMapDialogStore=E(za),this.isDeltaState=F(this.fileStoreReadWindow.isDeltaState$,{requireSync:!0}),this.isExportDialogOpen=this.export3DMapDialogStore.isDialogOpen}closeExportDialog(){this.export3DMapDialogStore.closeDialog()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["cc-nav-bar"]],features:[Xt([{provide:ur,useValue:"--cc-bars-height"}]),no([mr])],decls:12,vars:2,consts:[[1,"navbar","relative","bg-base-100","border-b","border-base-300","min-h-12","px-2"],[1,"navbar-start","gap-1"],[1,"divider","divider-horizontal","mx-0"],[1,"navbar-center","self-stretch"],[1,"navbar-end"],[3,"closed"]],template:function(i,n){i&1&&(f(0,"div",0)(1,"div",1),W(2,"cc-nav-bar-logo")(3,"div",2)(4,"cc-nav-bar-folder-button"),K(5,LE,1,0,"cc-delta-selector")(6,DE,1,0,"cc-map-selector"),p(),f(7,"div",3),W(8,"cc-view-switcher"),p(),f(9,"div",4),W(10,"cc-settings-button"),p()(),K(11,PE,1,0,"cc-export-3D-map-dialog")),i&2&&(h(5),Q(n.isDeltaState()?5:6),h(6),Q(n.isExportDialogOpen()?11:-1))},dependencies:[km,c5,l5,r5,n5,d5,g5],encapsulation:2})}}return t})();function NE(t,o){t&1&&(f(0,"div"),W(1,"cc-nav-bar")(2,"router-outlet")(3,"cc-changelog-dialog"),p())}function VE(t,o){t&1&&W(0,"cc-boot-loading-indicator")}var b5=(()=>{class t{constructor(e){this.loadFilesUseCase=e,this.isInitialized=ke(!1)}ngOnInit(){this.loadFilesUseCase.loadOnBoot().catch(()=>{}).finally(()=>{this.isInitialized.set(!0)})}static{this.\u0275fac=function(i){return new(i||t)(le(dl))}}static{this.\u0275cmp=A({type:t,selectors:[["cc-code-charta"]],decls:4,vars:1,template:function(i,n){i&1&&(W(0,"cc-error-dialog")(1,"cc-toast"),K(2,NE,4,0,"div")(3,VE,1,0,"cc-boot-loading-indicator")),i&2&&(h(2),Q(n.isInitialized()?2:3))},dependencies:[qm,dh,_0,ag,mp,C0],encapsulation:2})}}return t})();cp(b5,Te(ae({},Uu),{providers:[tp(),...Uu.providers]}));
3710
+ </Relationships>`}async function H4(e){let{vertices:o,triangles:t,volumes:i}=$_(e),n=W4(o,t),r=O4(i),a=z4(),s=$4(),l=!0,d={"3D":{"3dmodel.model":Mn(n,l)},_rels:{".rels":Mn(s,l)},Metadata:{"Slic3r_PE_model.config":Mn(r,l)},"[Content_Types].xml":Mn(a,l)};return B4(d,{comment:"created by CodeCharta"}).buffer}function $_(e){let o=[],t=[],i=[],n=new Map,r=new Map;for(let a of e.children)U4(a,o,t,n,r,i);return{vertices:o,triangles:t,volumes:i}}function U4(e,o,t,i,n,r,a=void 0){if(!e.visible)return;for(let c of e.children){let u=e.matrix;a&&(u=a.clone().multiply(e.matrix)),U4(c,o,t,i,n,r,u)}let s=j_(e),l=new Map,d=1;for(let[c,u]of s.entries()){let m=t.length;H_(o,i,l,u,e,a),U_(e.geometry,t,l,u),G_(e,c,m,t.length-1,r,d,n),d++}}function j_(e){let o=new Map;if(e.geometry.attributes.color)for(let t=0;t<e.geometry.attributes.color.count;t++){let i=j4(e.geometry.attributes.color,t);o.has(i)?o.get(i).push(t):o.set(i,[t])}else if(e.geometry.attributes.position){let t=e.material,i;if(t.color)i=t.color.getHexString();else if(t.isShaderMaterial){let r=t.defaultAttributeValues.color;i=j4(r,0)}let n=Array.from({length:e.geometry.attributes.position.count},(r,a)=>a);o.set(i,n)}return o}function H_(e,o,t,i,n,r){let a=n.geometry.attributes.position;for(let s of i){let l=new Ze(a.getX(s),a.getY(s),a.getZ(s));l.applyMatrix4(n.matrix),r&&l.applyMatrix4(r);let d=`<vertex x="${l.x}" y="${l.y}" z="${l.z}"/>`;o.has(d)?t.set(s,o.get(d)):(e.push(d),o.set(d,e.length-1),t.set(s,e.length-1))}}function U_(e,o,t,i){if(e.index){let n=e.index;for(let r=0;r<n.count;r+=3){let a=n.getX(r),s=n.getY(r),l=n.getZ(r);if(i.includes(a)&&i.includes(s)&&i.includes(l)){let d=`<triangle v1="${t.get(a)}" v2="${t.get(s)}" v3="${t.get(l)}" />`;o.push(d)}}}else for(let n=0;n<t.size;n+=3){let r=`<triangle v1="${t.get(n)}" v2="${t.get(n+1)}" v3="${t.get(n+2)}" />`;o.push(r)}}function G_(e,o,t,i,n,r,a){a.has(o)||a.set(o,a.size+1);let s=a.get(o),l=e.name==="Map"?`${e.name} 0x${o}`:e.name,d={id:r,name:l,color:o,extruder:s,firstTriangleId:t,lastTriangleId:i};n.push(d)}function j4(e,o){return(e instanceof _o?[e.getX(o),e.getY(o),e.getZ(o)]:[e[o],e[o+1],e[o+2]]).map(i=>Math.round(i*255).toString(16).padStart(2,"0")).join("")}var G4=(()=>{class e{constructor(){this.isPrintMeshLoaded=J.required(),this.download3MF=fe(),this.downloadSTL=fe()}handleDownload3MF(){this.download3MF.emit()}handleDownloadSTL(){this.downloadSTL.emit()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=A({type:e,selectors:[["cc-export-actions"]],inputs:{isPrintMeshLoaded:[1,"isPrintMeshLoaded"]},outputs:{download3MF:"download3MF",downloadSTL:"downloadSTL"},decls:7,vars:2,consts:[[1,"flex","gap-2"],["title","Download 3MF Button",1,"btn","btn-primary",3,"click","disabled"],[1,"fa","fa-download"],["title","Download STL Button",1,"btn","btn-outline",3,"click","disabled"]],template:function(i,n){i&1&&(_(0,"div",0)(1,"button",1),re("click",function(){return n.handleDownload3MF()}),Se(2,"i",2),x(3," Download 3MF "),T(),_(4,"button",3),re("click",function(){return n.handleDownloadSTL()}),Se(5,"i",2),x(6," Download minimal STL "),T()()),i&2&&(h(),xe("disabled",!n.isPrintMeshLoaded()),h(3),xe("disabled",!n.isPrintMeshLoaded()))},encapsulation:2})}}return e})();var X4=(()=>{class e{constructor(){this.frontText=J(""),this.textChanged=fe()}handleInput(t){let i=t.target;this.textChanged.emit(i.value)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=A({type:e,selectors:[["cc-front-text-input"]],inputs:{frontText:[1,"frontText"]},outputs:{textChanged:"textChanged"},decls:5,vars:1,consts:[[1,"form-control","w-full"],[1,"label"],[1,"label-text","font-medium"],["type","text","placeholder","CodeCharta","data-testid","frontText",1,"input","input-bordered","w-full",3,"input","value"]],template:function(i,n){i&1&&(_(0,"label",0)(1,"div",1)(2,"span",2),x(3,"Bottom center label text"),T()(),_(4,"input",3),re("input",function(a){return n.handleInput(a)}),T()()),i&2&&(h(4),xe("value",n.frontText()))},encapsulation:2})}}return e})();var X_=["fileInput"];function K_(e,o){if(e&1){let t=ue();f(0,"div",5)(1,"button",6),V("click",function(){oe(t);let n=L();return ne(n.handleRemoveLogo())}),W(2,"i",7),x(3," Remove "),p(),f(4,"button",8),V("click",function(){oe(t);let n=L();return ne(n.handleRotateLogo())}),W(5,"i",9),x(6," Rotate "),p(),f(7,"button",10),V("click",function(){oe(t);let n=L();return ne(n.handleFlipLogo())}),W(8,"i",11),x(9," Flip "),p()(),f(10,"div",12)(11,"cc-inline-color-picker",13),V("colorChange",function(n){oe(t);let r=L();return ne(r.handleColorChange(n))}),p(),f(12,"span",14),x(13,"Color"),p()()}if(e&2){let t=L();h(11),R("hexColor",t.logoColor())}}var K4=(()=>{class e{constructor(){this.fileInput=Ue.required("fileInput"),this.isFileSelected=J.required(),this.logoColor=J("#ffffff"),this.fileSelected=fe(),this.logoRemoved=fe(),this.logoRotated=fe(),this.logoFlipped=fe(),this.colorChanged=fe()}handleFileSelected(t){let n=t.target.files?.[0];n&&this.fileSelected.emit(n)}handleRemoveLogo(){this.fileInput().nativeElement.value="",this.logoRemoved.emit()}handleRotateLogo(){this.logoRotated.emit()}handleFlipLogo(){this.logoFlipped.emit()}handleColorChange(t){this.colorChanged.emit(t)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=A({type:e,selectors:[["cc-logo-upload"]],viewQuery:function(i,n){i&1&&tt(n.fileInput,X_,5),i&2&&it()},inputs:{isFileSelected:[1,"isFileSelected"],logoColor:[1,"logoColor"]},outputs:{fileSelected:"fileSelected",logoRemoved:"logoRemoved",logoRotated:"logoRotated",logoFlipped:"logoFlipped",colorChanged:"colorChanged"},decls:7,vars:1,consts:[["fileInput",""],[1,"card","bg-base-200"],[1,"card-body","p-4"],[1,"card-title","text-sm"],["type","file","aria-label","Bottom left logo (SVG)","accept",".svg",1,"file-input","file-input-bordered","file-input-sm","w-full",3,"change"],[1,"flex","flex-wrap","gap-2","mt-2"],["title","Remove Logo",1,"btn","btn-sm","btn-ghost",3,"click"],[1,"fa","fa-times"],["title","Rotate Logo",1,"btn","btn-sm","btn-ghost",3,"click"],[1,"fa","fa-rotate-right"],["title","Flip Logo",1,"btn","btn-sm","btn-ghost",3,"click"],[1,"fa","fa-arrows-h"],[1,"flex","items-center","gap-2","mt-2"],["ariaLabel","Logo color",3,"colorChange","hexColor"],[1,"text-sm"]],template:function(i,n){i&1&&(f(0,"div",1)(1,"div",2)(2,"h3",3),x(3,"Bottom left logo (SVG)"),p(),f(4,"input",4,0),V("change",function(a){return n.handleFileSelected(a)}),p(),K(6,K_,14,1),p()()),i&2&&(h(6),Q(n.isFileSelected()?6:-1))},dependencies:[To],encapsulation:2})}}return e})();var Q_=(e,o)=>o.name;function Y_(e,o){if(e&1&&(_(0,"option",4),x(1),T()),e&2){let t=o.$implicit,i=L();xe("selected",t.name===i.selectedPrinter().name),h(),Ym(" ",t.name," (",t.x/10,"\xD7",t.y/10,"\xD7",t.z/10,"cm, ",t.numberOfColors," colors) ")}}var _m=[{name:"Prusa MK3S (single color)",x:245,y:205,z:205,numberOfColors:1},{name:"BambuLab A1 + AMS Lite",x:251,y:251,z:251,numberOfColors:4},{name:"Prusa XL (5 colors)",x:355,y:335,z:355,numberOfColors:5}],Q4=(()=>{class e{constructor(){this.selectedPrinter=J.required(),this.printerChanged=fe(),this.printers=_m}handlePrinterChange(t){let i=t.target,n=this.printers[i.selectedIndex];this.printerChanged.emit(n)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=A({type:e,selectors:[["cc-printer-preset-selection"]],inputs:{selectedPrinter:[1,"selectedPrinter"]},outputs:{printerChanged:"printerChanged"},decls:7,vars:0,consts:[[1,"form-control","w-full"],[1,"label"],[1,"label-text","font-medium"],["data-testid","selectPrinter",1,"select","select-bordered","w-full",3,"change"],["data-testid","selectedPrinter",3,"selected"]],template:function(i,n){i&1&&(_(0,"label",0)(1,"div",1)(2,"span",2),x(3,"Printer preset"),T()(),_(4,"select",3),re("change",function(a){return n.handlePrinterChange(a)}),Ne(5,Y_,2,6,"option",4,Q_),T()()),i&2&&(h(5),Ve(n.printers))},encapsulation:2})}}return e})();function Z_(e,o){if(e&1){let t=ue();_(0,"input",7),re("input",function(n){oe(t);let r=L();return ne(r.handleTextInput(n))}),T()}if(e&2){let t=L();xe("value",t.currentText())}}var Y4=(()=>{class e{constructor(){this.isVisible=J.required(),this.currentText=J(""),this.visibilityChanged=fe(),this.textChanged=fe()}handleToggleChange(t){let i=t.target;this.visibilityChanged.emit(i.checked)}handleTextInput(t){let i=t.target;this.textChanged.emit(i.value)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=A({type:e,selectors:[["cc-qr-code-settings"]],inputs:{isVisible:[1,"isVisible"],currentText:[1,"currentText"]},outputs:{visibilityChanged:"visibilityChanged",textChanged:"textChanged"},decls:9,vars:2,consts:[[1,"card","bg-base-200"],[1,"card-body","p-4"],[1,"card-title","text-sm"],[1,"label","cursor-pointer","justify-start","gap-4"],["type","checkbox","data-testid","qrCodeToggle",1,"toggle","toggle-primary","toggle-sm",3,"change","checked"],[1,"label-text"],["type","text","aria-label","URL for QR code","placeholder","URL for QR code","data-testid","qrCodeText",1,"input","input-bordered","input-sm","w-full",3,"value"],["type","text","aria-label","URL for QR code","placeholder","URL for QR code","data-testid","qrCodeText",1,"input","input-bordered","input-sm","w-full",3,"input","value"]],template:function(i,n){i&1&&(_(0,"div",0)(1,"div",1)(2,"h3",2),x(3,"QR-Code"),T(),_(4,"label",3)(5,"input",4),re("change",function(a){return n.handleToggleChange(a)}),T(),_(6,"span",5),x(7,"Show QR-Code"),T()(),K(8,Z_,1,1,"input",6),T()()),i&2&&(h(5),xe("checked",n.isVisible()),h(3),Q(n.isVisible()?8:-1))},encapsulation:2})}}return e})();var Z4=(()=>{class e{constructor(){this.currentSize=J.required(),this.wantedWidth=J.required(),this.maxWidth=J.required(),this.selectedPrinter=J.required(),this.widthChanged=fe()}handleSliderChange(t){let i=t.target;this.widthChanged.emit(Number(i.value))}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=A({type:e,selectors:[["cc-scale-slider"]],inputs:{currentSize:[1,"currentSize"],wantedWidth:[1,"wantedWidth"],maxWidth:[1,"maxWidth"],selectedPrinter:[1,"selectedPrinter"]},outputs:{widthChanged:"widthChanged"},decls:12,vars:9,consts:[[1,"card","bg-base-200"],[1,"card-body","p-4"],[1,"card-title","text-sm"],["type","range","aria-label","Scale","data-testid","onScaleChange",1,"range","range-primary","range-sm",3,"change","min","max","value"],["data-testid","printSizeOverview",1,"text-sm","mt-2"]],template:function(i,n){i&1&&(_(0,"div",0)(1,"div",1)(2,"h3",2),x(3,"Scale"),T(),_(4,"input",3),re("change",function(a){return n.handleSliderChange(a)}),T(),_(5,"div",4)(6,"div"),x(7),T(),_(8,"div"),x(9),T(),_(10,"div"),x(11),T()()()()),i&2&&(h(4),xe("min",100)("max",n.maxWidth())("value",n.wantedWidth()),h(3),qn("Width: ",(n.currentSize().x/10).toFixed(1),"cm (max. ",(n.selectedPrinter().x/10).toFixed(1),")"),h(2),qn("Depth: ",(n.currentSize().y/10).toFixed(1),"cm (max. ",(n.selectedPrinter().y/10).toFixed(1),")"),h(2),qn("Height: ",(n.currentSize().z/10).toFixed(1),"cm (max. ",(n.selectedPrinter().z/10).toFixed(1),")"))},encapsulation:2})}}return e})();function J_(e,o){if(e&1){let t=ue();_(0,"input",7),re("input",function(n){oe(t);let r=L();return ne(r.handleTextInput(n))}),T()}if(e&2){let t=L();xe("value",t.currentText())}}var J4=(()=>{class e{constructor(){this.isVisible=J.required(),this.currentText=J(""),this.visibilityChanged=fe(),this.textChanged=fe()}handleToggleChange(t){let i=t.target;this.visibilityChanged.emit(i.checked)}handleTextInput(t){let i=t.target;this.textChanged.emit(i.value)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=A({type:e,selectors:[["cc-second-row-text-input"]],inputs:{isVisible:[1,"isVisible"],currentText:[1,"currentText"]},outputs:{visibilityChanged:"visibilityChanged",textChanged:"textChanged"},decls:9,vars:2,consts:[[1,"card","bg-base-200"],[1,"card-body","p-4"],[1,"card-title","text-sm"],[1,"label","cursor-pointer","justify-start","gap-4"],["type","checkbox","data-testid","secondRowToggle",1,"toggle","toggle-primary","toggle-sm",3,"change","checked"],[1,"label-text"],["type","text","aria-label","Second row center text","data-testid","secondRowText",1,"input","input-bordered","input-sm","w-full",3,"value"],["type","text","aria-label","Second row center text","data-testid","secondRowText",1,"input","input-bordered","input-sm","w-full",3,"input","value"]],template:function(i,n){i&1&&(_(0,"div",0)(1,"div",1)(2,"h3",2),x(3,"Second row center text"),T(),_(4,"label",3)(5,"input",4),re("change",function(a){return n.handleToggleChange(a)}),T(),_(6,"span",5),x(7,"Show second row text"),T()(),K(8,J_,1,1,"input",6),T()()),i&2&&(h(5),xe("checked",n.isVisible()),h(3),Q(n.isVisible()?8:-1))},encapsulation:2})}}return e})();var e5=(()=>{class e{constructor(t,i,n,r,a){this.mapStateReadWindow=t,this.metricsLensSourceReadWindow=i,this.sharedViewReadWindow=n,this.fileStoreReadWindow=r,this.ccStateSnapshot=a}getAreaMetric(){return this.mapStateReadWindow.getAreaMetric()}getHeightMetric(){return this.mapStateReadWindow.getHeightMetric()}getColorMetric(){return this.mapStateReadWindow.getColorMetric()}getColorRange(){return this.mapStateReadWindow.getColorRange()}getAttributeDescriptors(){return this.metricsLensSourceReadWindow.getAttributeDescriptors()}getNodeMetricData(){return Gn(this.ccStateSnapshot.get())}getExcludedNodes(){return this.sharedViewReadWindow.getExcludedNodes()}getFiles(){return this.fileStoreReadWindow.getFiles()}getAccumulatedFileName(){return Dt(this.ccStateSnapshot.get()).unifiedFileMeta?.fileName}static{this.\u0275fac=function(i){return new(i||e)(M(Ee),M(Vs),M(_t),M(Fe),M(Pt))}}static{this.\u0275prov=O({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var tE=["dialog"],iE=["rendererContainer"],Em=(()=>{class e{constructor(t,i){this.stateAccessStore=t,this.threeSceneService=i,this.dialog=Ue.required("dialog"),this.rendererContainer=Ue.required("rendererContainer"),this.closed=fe(),this.currentSize=ke(new Ze),this.isPrintMeshLoaded=ke(!1),this.frontText=ke(""),this.logoColor=ke("#ffffff"),this.isFileSelected=ke(!1),this.secondRowVisible=ke(!1),this.secondRowText=ke(new Date().toLocaleDateString()),this.qrCodeVisible=ke(!1),this.qrCodeText=ke("maibornwolff.de/service/it-sanierung"),this.selectedPrinter=ke(_m[2]),this.maxWidth=ke(0),this.wantedWidth=ke(0),this.layerHeight=.2,this.frontTextSize=8,this.secondRowTextSize=6,this.frontPrintDepth=.6,this.mapSideOffset=10,this.baseplateHeight=1,this.logoSize=10,this.primaryShaderMaterialIndex=0,this.exportMesh=this.threeSceneService.getMapMesh().toExportMesh();let n=gm(new Ze(this.selectedPrinter().x,this.selectedPrinter().y,this.selectedPrinter().z),this.exportMesh,this.frontTextSize,this.baseplateHeight,this.mapSideOffset);this.maxWidth.set(n),this.wantedWidth.set(n),this.currentSize.update(a=>(a.x=n,a)),this.currentNumberOfColors=this.selectedPrinter().numberOfColors,this.areaMetric=this.stateAccessStore.getAreaMetric(),this.heightMetric=this.stateAccessStore.getHeightMetric(),this.colorMetric=this.stateAccessStore.getColorMetric();let r=this.stateAccessStore.getNodeMetricData();this.nodeMetricData=r.filter(a=>a.name===this.areaMetric||a.name===this.heightMetric||a.name===this.colorMetric)}async ngAfterViewInit(){let t=this.dialog().nativeElement;t.addEventListener("close",()=>this.closed.emit()),t.showModal(),await this.createScene(),this.isPrintMeshLoaded.set(!0)}close(){this.dialog().nativeElement.close()}handleScaleChange(t){this.wantedWidth.set(t),this.previewMesh.updateSize(t).then(i=>{this.qrCodeVisible.set(i)}),this.currentSize.set(this.previewMesh.getSize())}handleFrontTextChange(t){this.frontText.set(t),this.previewMesh.updateFrontText(t)}handleFileSelected(t){this.isFileSelected.set(!0);let i=new FileReader;i.readAsDataURL(t),i.onload=()=>{this.previewMesh.addCustomLogo(i.result)}}handleRotateLogo(){this.previewMesh.rotateCustomLogo()}handleFlipLogo(){this.previewMesh.flipCustomLogo()}handleRemoveLogo(){this.isFileSelected.set(!1),this.previewMesh.removeCustomLogo()}handlePrinterChange(t){this.selectedPrinter.set(t);let i=t.numberOfColors;this.currentNumberOfColors!==i&&(this.previewMesh.updateNumberOfColors(i),this.currentNumberOfColors=i),this.makeMapMaxSize(),this.updateCameraPosition(this.printPreviewScene.getObjectByName("camera"))}handleLogoColorChange(t){this.logoColor.set(t),this.previewMesh.updateCustomLogoColor(t)}handleQrCodeTextChange(t){this.qrCodeText.set(t),this.previewMesh.updateQrCodeText(t),this.previewMesh.updateQrCodeVisibility(this.qrCodeVisible())}handleQrCodeVisibilityChange(t){this.qrCodeVisible.set(t),this.previewMesh.updateQrCodeVisibility(t)}handleSecondRowTextChange(t){this.secondRowText.set(t),this.previewMesh.updateSecondRowText(t),this.previewMesh.updateSecondRowVisibility(this.secondRowVisible())}handleSecondRowVisibilityChange(t){this.secondRowVisible.set(t),this.previewMesh.updateSecondRowVisibility(t)}async createScene(){let t=new Ts;t.name="printPreviewScene",this.printPreviewScene=t,t.background=new jn(15527388);let i=this.threeSceneService.scene.clone().children[3];i.name="lights",t.add(i);let n=new qs(45,1.15,50,2e5);n.name="camera",n.up=new Ze(0,0,1),t.add(n),this.initRenderer(t,n),this.previewMesh=new qd(this.initGeometryOptions()),await this.previewMesh.initialize(),this.currentSize.set(this.previewMesh.getSize()),t.add(this.previewMesh.getThreeMesh()),this.updateCameraPosition(n)}initRenderer(t,i){let n=this.getGL(),r=this.rendererContainer().nativeElement,a=r.offsetWidth||600,s=r.offsetHeight||450;n.setSize(a,s,!0),r.appendChild(n.domElement);let l=new Xs(i,n.domElement),d=function(){requestAnimationFrame(d),l.update(),n.render(t,i)};d()}getGL(){return new Ds}updateCameraPosition(t){let i=this.currentSize();t.position.set(-i.x*.2,-i.y*1.2,i.z*3)}async handleDownload3MF(){let t=await H4(this.printPreviewScene.getObjectByName("PrintMesh"));this.downloadFile(t,"3mf")}makeMapMaxSize(){let t=gm(new Ze(this.selectedPrinter().x,this.selectedPrinter().y,this.selectedPrinter().z),this.exportMesh,this.frontTextSize,this.baseplateHeight,this.mapSideOffset);this.wantedWidth.set(t),this.previewMesh.updateSize(t).then(i=>{this.qrCodeVisible.set(i)}),this.currentSize.set(this.previewMesh.getSize()),this.maxWidth.set(this.currentSize().x)}handleDownloadSTL(){let t=new Xc().parse(this.previewMesh.getMapMesh(),{binary:!0});this.downloadFile(t,"stl")}initGeometryOptions(){let t=this.stateAccessStore.getAttributeDescriptors(),i=I0,n=t[this.areaMetric]?.title||i.get(this.areaMetric),r=t[this.heightMetric]?.title||i.get(this.heightMetric),a=t[this.colorMetric]?.title||i.get(this.colorMetric);return{originalMapMesh:this.exportMesh,width:this.wantedWidth(),areaMetricTitle:n,areaMetricData:this.nodeMetricData.find(s=>s.name===this.areaMetric),heightMetricTitle:r,heightMetricData:this.nodeMetricData.find(s=>s.name===this.heightMetric),colorMetricTitle:a,colorMetricData:this.nodeMetricData.find(s=>s.name===this.colorMetric),colorRange:this.stateAccessStore.getColorRange(),frontText:this.frontText(),secondRowText:this.secondRowText(),secondRowVisible:this.secondRowVisible(),qrCodeText:this.qrCodeText(),defaultMaterial:this.exportMesh.material[this.primaryShaderMaterialIndex].clone(),numberOfColors:this.currentNumberOfColors,layerHeight:this.layerHeight,frontTextSize:this.frontTextSize,secondRowTextSize:this.secondRowTextSize,printHeight:this.frontPrintDepth,mapSideOffset:this.mapSideOffset,baseplateHeight:this.baseplateHeight,logoSize:this.logoSize}}downloadFile(t,i){let n=this.stateAccessStore.getFiles(),r=this.stateAccessStore.getAccumulatedFileName(),a=`${Ps.getNewFileName(r,Ei(n))}.${i}`;Ar.downloadData(t,a)}static{this.\u0275fac=function(i){return new(i||e)(le(e5),le(bt))}}static{this.\u0275cmp=A({type:e,selectors:[["cc-export-3D-map-dialog"]],viewQuery:function(i,n){i&1&&tt(n.dialog,tE,5)(n.rendererContainer,iE,5),i&2&&it(2)},outputs:{closed:"closed"},decls:27,vars:13,consts:[["dialog",""],["rendererContainer",""],[1,"modal"],[1,"modal-box","max-w-6xl","w-11/12"],[1,"text-2xl","font-bold","mb-6"],[1,"flex","gap-6"],[1,"flex","flex-col","gap-4","w-1/3","min-w-72"],[3,"printerChanged","selectedPrinter"],[3,"widthChanged","currentSize","wantedWidth","maxWidth","selectedPrinter"],[3,"textChanged","frontText"],[3,"visibilityChanged","textChanged","isVisible","currentText"],[3,"fileSelected","logoRemoved","logoRotated","logoFlipped","colorChanged","isFileSelected","logoColor"],[1,"flex-1"],[1,"card","bg-base-200","h-full"],[1,"card-body","p-4"],[1,"card-title","text-sm"],[1,"w-full","min-h-96"],[1,"modal-action"],[3,"download3MF","downloadSTL","isPrintMeshLoaded"],[1,"btn",3,"click"],["method","dialog",1,"modal-backdrop"]],template:function(i,n){i&1&&(f(0,"dialog",2,0)(2,"div",3)(3,"h2",4),x(4,"3D Print CodeCharta Map"),p(),f(5,"div",5)(6,"div",6)(7,"cc-printer-preset-selection",7),V("printerChanged",function(a){return n.handlePrinterChange(a)}),p(),f(8,"cc-scale-slider",8),V("widthChanged",function(a){return n.handleScaleChange(a)}),p(),f(9,"cc-front-text-input",9),V("textChanged",function(a){return n.handleFrontTextChange(a)}),p(),f(10,"cc-second-row-text-input",10),V("visibilityChanged",function(a){return n.handleSecondRowVisibilityChange(a)})("textChanged",function(a){return n.handleSecondRowTextChange(a)}),p(),f(11,"cc-qr-code-settings",10),V("visibilityChanged",function(a){return n.handleQrCodeVisibilityChange(a)})("textChanged",function(a){return n.handleQrCodeTextChange(a)}),p(),f(12,"cc-logo-upload",11),V("fileSelected",function(a){return n.handleFileSelected(a)})("logoRemoved",function(){return n.handleRemoveLogo()})("logoRotated",function(){return n.handleRotateLogo()})("logoFlipped",function(){return n.handleFlipLogo()})("colorChanged",function(a){return n.handleLogoColorChange(a)}),p()(),f(13,"div",12)(14,"div",13)(15,"div",14)(16,"h3",15),x(17,"Preview"),p(),W(18,"div",16,1),p()()()(),f(20,"div",17)(21,"cc-export-actions",18),V("download3MF",function(){return n.handleDownload3MF()})("downloadSTL",function(){return n.handleDownloadSTL()}),p(),f(22,"button",19),V("click",function(){return n.close()}),x(23,"Close"),p()()(),f(24,"form",20)(25,"button"),x(26,"close"),p()()()),i&2&&(h(7),R("selectedPrinter",n.selectedPrinter()),h(),R("currentSize",n.currentSize())("wantedWidth",n.wantedWidth())("maxWidth",n.maxWidth())("selectedPrinter",n.selectedPrinter()),h(),R("frontText",n.frontText()),h(),R("isVisible",n.secondRowVisible())("currentText",n.secondRowText()),h(),R("isVisible",n.qrCodeVisible())("currentText",n.qrCodeText()),h(),R("isFileSelected",n.isFileSelected())("logoColor",n.logoColor()),h(9),R("isPrintMeshLoaded",n.isPrintMeshLoaded()))},dependencies:[Q4,Z4,X4,J4,Y4,K4,G4],encapsulation:2})}}return e})();var t5=(()=>{class e{constructor(t,i){this.store=t,this.mapStateReadWindow=i,this.colorMode$=this.store.select(ds)}getColorMode(){return this.mapStateReadWindow.getColorMode()}setAbsoluteColorMode(){this.store.dispatch(Ii({value:Ho.absolute}))}static{this.\u0275fac=function(i){return new(i||e)(M(me),M(Ee))}}static{this.\u0275prov=O({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Oa=(()=>{class e{constructor(){this.colorModeStore=E(t5),this.errorDialogService=E(ss),this.activeViewStore=E(tr),this.viewReadinessStore=E(hr),this.threeRendererService=E(Nt),this.router=E(_i),this.dialogOpen=ke(!1),this.isDialogOpen=this.dialogOpen.asReadonly()}requestExport(){if(this.activeViewStore.currentView()!=="metrics"){this.errorDialogService.open(this.buildSwitchToMetricsViewDialog());return}if(this.colorModeStore.getColorMode()===Ho.absolute){this.dialogOpen.set(!0);return}this.errorDialogService.open(this.buildWrongColorModeDialog())}closeDialog(){this.dialogOpen.set(!1)}buildSwitchToMetricsViewDialog(){return{title:"3D export needs the Metric view",message:'<p>The 3D export builds on the rendered map, so it only works in the <strong>Metric view</strong>.<br><i class="fa fa-info-circle"></i> Use "Switch and continue" to open the Metric view and go straight to the export.<p>',resolveErrorData:{buttonText:"Switch and continue",onResolveErrorClick:()=>{this.switchToMetricsViewAndExport()}},dismissButtonText:"Stay here"}}async switchToMetricsViewAndExport(){await this.router.navigateByUrl(Vi.metrics)&&this.viewReadinessStore.isStale$("metrics").pipe(Ie(i=>!i),wt(1)).subscribe(()=>this.requestExport())}buildWrongColorModeDialog(){return{title:"Map could not be exported",message:'<p>3D map can only be exported when <strong>color mode</strong> is set to <strong>absolute</strong>.<br><i class="fa fa-info-circle"></i> You can change this under Color Metric Options or use "Change and continue" to directly change the color mode and continue.<p>',resolveErrorData:{buttonText:"Change and continue",onResolveErrorClick:()=>this.recolorTheMapAndExportIt()}}}recolorTheMapAndExportIt(){this.threeRendererService.afterRender$.pipe(wt(1)).subscribe(()=>this.dialogOpen.set(!0)),this.colorModeStore.setAbsoluteColorMode()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=O({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Wr=(()=>{class e{transform(t){return Ps.withoutCCExtension(t)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275pipe=Um({name:"removeExtension",type:e,pure:!0})}}return e})();var i5=(e,o)=>o.fileMeta.fileName;function oE(e,o){if(e&1){let t=ue();_(0,"li",9)(1,"button",10),re("click",function(){let n=oe(t).$implicit,r=L(2);return ne(r.handleReferenceChange(n))}),_(2,"span",11),x(3),Kt(4,"removeExtension"),T()()()}if(e&2){let t=o.$implicit,i=L(2);h(),Be("bg-base-200",i.isReferenceSelected(t))("font-bold",i.isReferenceSelected(t)),h(2),Re(Mi(4,5,t.fileMeta.fileName))}}function nE(e,o){if(e&1&&(_(0,"div",5)(1,"ul",8),Ne(2,oE,5,7,"li",9,i5),T()()),e&2){let t=L();h(2),Ve(t.referenceOptions())}}function rE(e,o){if(e&1){let t=ue();_(0,"li",9)(1,"button",10),re("click",function(){let n=oe(t).$implicit,r=L(2);return ne(r.handleComparisonChange(n))}),_(2,"span",11),x(3),Kt(4,"removeExtension"),T()()()}if(e&2){let t=o.$implicit,i=L(2);h(),Be("bg-base-200",i.isComparisonSelected(t))("font-bold",i.isComparisonSelected(t)),h(2),Re(Mi(4,5,t.fileMeta.fileName))}}function aE(e,o){if(e&1&&(_(0,"div",5)(1,"ul",8),Ne(2,rE,5,7,"li",9,i5),T()()),e&2){let t=L();h(2),Ve(t.comparisonOptions())}}var o5=(()=>{class e{constructor(){this.fileStoreReadWindow=E(Fe),this.navBarWriteStore=E(xr),this.elementRef=E(Gt),this.fileStates=F(this.fileStoreReadWindow.files$,{requireSync:!0}),this.referenceFile=F(this.fileStoreReadWindow.referenceFile$,{requireSync:!0}),this.openDropdown=ke("none"),this.referenceLabel=te(()=>{let t=this.referenceFile();return t?this.withoutExtension(t.fileMeta.fileName):"select reference file"}),this.comparisonFile=te(()=>this.fileStates().find(t=>t.selectedAs===li.Comparison)?.file),this.comparisonLabel=te(()=>{let t=this.comparisonFile();return t?this.withoutExtension(t.fileMeta.fileName):"select comparison file"}),this.referenceOptions=te(()=>this.fileStates().map(t=>t.file)),this.comparisonOptions=te(()=>this.fileStates().filter(t=>t.selectedAs!==li.Reference).map(t=>t.file)),this.swapDisabled=te(()=>this.comparisonFile()===void 0)}handleDocumentClick(t){this.openDropdown()!=="none"&&t.target instanceof Node&&!this.elementRef.nativeElement.contains(t.target)&&this.openDropdown.set("none")}toggleDropdown(t){this.openDropdown.update(i=>i===t?"none":t)}handleReferenceChange(t){this.navBarWriteStore.setDeltaReference(t),this.openDropdown.set("none")}handleComparisonChange(t){this.navBarWriteStore.setDeltaComparison(t),this.openDropdown.set("none")}handleSwap(){this.swapDisabled()||this.navBarWriteStore.switchReferenceAndComparison()}isReferenceSelected(t){return this.referenceFile()?.fileMeta.fileName===t.fileMeta.fileName}isComparisonSelected(t){return this.comparisonFile()?.fileMeta.fileName===t.fileMeta.fileName}withoutExtension(t){return new Wr().transform(t)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=A({type:e,selectors:[["cc-delta-selector"]],hostBindings:function(i,n){i&1&&V("click",function(a){return n.handleDocumentClick(a)},jo)},decls:15,vars:9,consts:[[1,"flex","items-center","gap-1"],[1,"dropdown"],["type","button",1,"btn","btn-ghost","btn-sm","justify-between","min-w-[12rem]",3,"click"],[1,"truncate"],[1,"fa","fa-caret-down","ml-2"],[1,"dropdown-content","bg-base-100","rounded-box","border","border-base-300","shadow-md","mt-1","min-w-[12rem]","w-max","max-w-[24rem]","z-[70]","p-1"],["type","button","title","Switch reference and comparison file",1,"btn","btn-ghost","btn-sm","btn-square",3,"click","disabled"],[1,"fa","fa-arrows-h"],[1,"flex","flex-col","gap-0.5","p-0","m-0","list-none","max-h-72","overflow-y-auto"],[1,"w-full"],["type","button",1,"flex","items-center","gap-2","w-full","text-left","rounded-md","px-2","py-1","hover:bg-base-200",3,"click"],[1,"flex-1","whitespace-nowrap"]],template:function(i,n){i&1&&(_(0,"div",0)(1,"div",1)(2,"button",2),re("click",function(){return n.toggleDropdown("reference")}),_(3,"span",3),x(4),T(),Se(5,"i",4),T(),K(6,nE,4,0,"div",5),T(),_(7,"button",6),re("click",function(){return n.handleSwap()}),Se(8,"i",7),T(),_(9,"div",1)(10,"button",2),re("click",function(){return n.toggleDropdown("comparison")}),_(11,"span",3),x(12),T(),Se(13,"i",4),T(),K(14,aE,4,0,"div",5),T()()),i&2&&(h(),Be("dropdown-open",n.openDropdown()==="reference"),h(3),Re(n.referenceLabel()),h(2),Q(n.openDropdown()==="reference"?6:-1),h(),xe("disabled",n.swapDisabled()),h(2),Be("dropdown-open",n.openDropdown()==="comparison"),h(3),Re(n.comparisonLabel()),h(2),Q(n.openDropdown()==="comparison"?14:-1))},dependencies:[Wr],encapsulation:2})}}return e})();var sE=(e,o)=>o.file.fileMeta.fileName;function lE(e,o){e&1&&W(0,"i",15)}function cE(e,o){e&1&&W(0,"i",16)}function dE(e,o){if(e&1){let t=ue();f(0,"li",7)(1,"label",11)(2,"input",12),V("change",function(n){let r=oe(t).$implicit,a=L(2);return ne(a.handleCheckboxChange(r.file,n.target.checked))}),p(),f(3,"span",13),x(4),Kt(5,"removeExtension"),p(),f(6,"button",14),V("click",function(n){let r=oe(t).$implicit,a=L(2);return ne(a.handleRemoveFileToggle(r.file,n))}),K(7,lE,1,0,"i",15)(8,cE,1,0,"i",16),p()()()}if(e&2){let t=o.$implicit,i=L(2);h(2),R("checked",i.isFileSelected(t.file))("disabled",t.isRemoved),h(),Be("line-through",t.isRemoved),h(),we(" ",Mi(5,7,t.file.fileMeta.fileName)," "),h(2),R("title",t.isRemoved?"Undo remove map":"Remove map"),h(),Q(t.isRemoved?7:8)}}function hE(e,o){if(e&1){let t=ue();f(0,"div",4)(1,"cc-selection-shortcuts",5),V("selectAll",function(){oe(t);let n=L();return ne(n.handleSelectAll())})("selectNone",function(){oe(t);let n=L();return ne(n.handleSelectNone())})("invert",function(){oe(t);let n=L();return ne(n.handleSelectInvert())}),p(),f(2,"ul",6),Ne(3,dE,9,9,"li",7,sE),p(),f(5,"div",8)(6,"span",9)(7,"button",10),V("click",function(){oe(t);let n=L();return ne(n.handleApply())}),x(8," Apply "),p()()()()}if(e&2){let t=L();h(3),Ve(t.filesInUI()),h(3),Be("tooltip-disabled",!t.applyButtonState().disabled),rt("data-tip",t.applyButtonState().tooltip||null),h(),R("disabled",t.applyButtonState().disabled)}}var n5=(()=>{class e{constructor(){this.fileStoreReadWindow=E(Fe),this.navBarWriteStore=E(xr),this.elementRef=E(Gt),this.filesInStore=F(this.fileStoreReadWindow.files$,{requireSync:!0}),this.isOpen=ke(!1),this.filesInUI=ke([]),this.selectedFilesInUI=ke([]),this.triggerLabel=te(()=>{let t=this.selectedFilesInStore();return t.length===0?"Select map":t.length===1?this.withoutExtension(t[0].fileMeta.fileName):`${this.withoutExtension(t[0].fileMeta.fileName)} +${t.length-1}`}),this.applyButtonState=te(()=>this.selectedFilesInUI().length===0?{disabled:!0,tooltip:"Select at least one map"}:this.uiSelectionDiffersFromStore()?{disabled:!1,tooltip:""}:{disabled:!0,tooltip:"No changes to apply"}),this.syncFromStore(this.filesInStore())}handleDocumentClick(t){if(!this.isOpen())return;let i=t.target;this.elementRef.nativeElement.contains(i)||this.closeWithoutApplying()}toggleOpen(){this.isOpen()?this.closeWithoutApplying():(this.syncFromStore(this.filesInStore()),this.isOpen.set(!0))}handleCheckboxChange(t,i){let n=this.selectedFilesInUI();i?(n.includes(t)||this.selectedFilesInUI.set([...n,t]),this.filesInUI.update(r=>r.map(a=>a.file===t?{file:a.file,isRemoved:!1}:a))):this.selectedFilesInUI.set(n.filter(r=>r!==t))}handleRemoveFileToggle(t,i){i.stopPropagation(),i.preventDefault(),this.filesInUI.update(n=>n.map(r=>r.file.fileMeta.fileName===t.fileMeta.fileName?{file:r.file,isRemoved:!r.isRemoved}:r)),this.selectedFilesInUI.update(n=>n.filter(r=>r.fileMeta.fileName!==t.fileMeta.fileName))}handleSelectAll(){this.selectedFilesInUI.set(this.filesInUI().filter(t=>!t.isRemoved).map(t=>t.file))}handleSelectNone(){this.selectedFilesInUI.set([])}handleSelectInvert(){let t=this.filesInUI().filter(n=>!n.isRemoved);if(t.length===0)return;let i=this.selectedFilesInUI();i.length===0?this.selectedFilesInUI.set(t.map(n=>n.file)):i.length===t.length?this.selectedFilesInUI.set([]):this.selectedFilesInUI.set(t.filter(n=>!i.includes(n.file)).map(n=>n.file))}handleApply(){let t=this.filesInUI().filter(i=>i.isRemoved).map(i=>i.file.fileMeta.fileName);this.navBarWriteStore.setStandard(this.selectedFilesInUI()),this.navBarWriteStore.removeFiles(t),this.isOpen.set(!1)}closeWithoutApplying(){this.syncFromStore(this.filesInStore()),this.isOpen.set(!1)}syncFromStore(t){this.filesInUI.set(t.map(i=>({file:i.file,isRemoved:!1}))),this.selectedFilesInUI.set(t.filter(i=>i.selectedAs===li.Partial).map(i=>i.file))}selectedFilesInStore(){return this.filesInStore().filter(t=>t.selectedAs===li.Partial).map(t=>t.file)}uiSelectionDiffersFromStore(){if(this.filesInUI().some(n=>n.isRemoved))return!0;let t=this.selectedFilesInStore(),i=this.selectedFilesInUI();return i.length!==t.length?!0:!i.every(n=>t.includes(n))}withoutExtension(t){return new Wr().transform(t)}isFileSelected(t){return this.selectedFilesInUI().includes(t)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=A({type:e,selectors:[["cc-map-selector"]],hostBindings:function(i,n){i&1&&V("click",function(a){return n.handleDocumentClick(a)},jo)},decls:6,vars:4,consts:[[1,"dropdown"],["type","button",1,"btn","btn-ghost","btn-sm","justify-between","min-w-[14rem]",3,"click"],[1,"truncate"],[1,"fa","fa-caret-down","ml-2"],[1,"dropdown-content","bg-base-100","rounded-box","border","border-base-300","shadow-md","mt-1","min-w-[14rem]","w-max","max-w-[32rem]","z-[70]","p-2"],[3,"selectAll","selectNone","invert"],[1,"flex","flex-col","gap-0.5","p-0","m-0","list-none","max-h-72","overflow-y-auto"],[1,"w-full"],[1,"flex","justify-end","mt-2"],[1,"tooltip"],["type","button",1,"btn","btn-primary","btn-sm",3,"click","disabled"],[1,"flex","items-center","gap-2","w-full","cursor-pointer","rounded-md","px-2","py-1","hover:bg-base-200"],["type","checkbox",1,"checkbox","checkbox-xs","shrink-0",3,"change","checked","disabled"],[1,"flex-1","whitespace-nowrap"],["type","button",1,"btn","btn-ghost","btn-xs","btn-square","shrink-0",3,"click","title"],[1,"fa","fa-undo"],[1,"fa","fa-trash"]],template:function(i,n){i&1&&(f(0,"div",0)(1,"button",1),V("click",function(){return n.toggleOpen()}),f(2,"span",2),x(3),p(),W(4,"i",3),p(),K(5,hE,9,4,"div",4),p()),i&2&&(Be("dropdown-open",n.isOpen()),h(3),Re(n.triggerLabel()),h(2),Q(n.isOpen()?5:-1))},dependencies:[ig,Wr],encapsulation:2})}}return e})();var r5=()=>{let e=document.createElement("INPUT");return e.setAttribute("type","file"),e.setAttribute("accept",".json,.gz"),e.setAttribute("multiple",""),e.style.display="none",document.body.appendChild(e),e};var a5=(()=>{class e{constructor(t){this.loadFilesUseCase=t}uploadFiles(){let t=r5();t.addEventListener("change",()=>{this.uploadFilesOnEvent(t),t.remove()}),t.addEventListener("cancel",()=>t.remove()),t.click()}async uploadFilesOnEvent(t){if(!t.files||t.files.length===0)return;let i=t.files;await this.loadFilesUseCase.loadFromUpload(()=>this.readNameDataPairs(i))}async readNameDataPairs(t){let i=Array.from(t),n=[];for(let r=0;r<i.length;r++){let a=i[r];w0(y0(a.name,r+1,i.length)),n.push({fileName:a.name,fileSize:a.size,content:await kp(new Uint8Array(await a.arrayBuffer()))})}return n}static{this.\u0275fac=function(i){return new(i||e)(M(cl))}}static{this.\u0275prov=O({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var s5=(()=>{class e{constructor(){this.uploadFilesService=E(a5)}uploadFiles(){this.uploadFilesService.uploadFiles()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=A({type:e,selectors:[["cc-nav-bar-folder-button"]],decls:2,vars:0,consts:[["type","button","title","Load cc.json files",1,"btn","btn-ghost","btn-square",3,"click"],[1,"fa","fa-folder-open","text-lg"]],template:function(i,n){i&1&&(_(0,"button",0),re("click",function(){return n.uploadFiles()}),Se(1,"i",1),T())},encapsulation:2})}}return e})();var l5=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=A({type:e,selectors:[["cc-nav-bar-logo"]],decls:2,vars:0,consts:[["href","https://codecharta.com/","target","_blank","rel","noopener noreferrer","title","CodeCharta website",1,"flex","items-center","px-2"],["src","codeCharta/assets/codecharta_logo.svg","alt","CodeCharta",1,"h-8","w-auto"]],template:function(i,n){i&1&&(_(0,"a",0),Se(1,"img",1),T())},encapsulation:2})}}return e})();var mE=["configDialog"],c5=(()=>{class e{constructor(){this.dialog=Ue.required("configDialog")}showSettings(){this.dialog().open()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=A({type:e,selectors:[["cc-settings-button"]],viewQuery:function(i,n){i&1&&tt(n.dialog,mE,5),i&2&&it()},decls:4,vars:0,consts:[["configDialog",""],["type","button","title","Global Configuration",1,"btn","btn-ghost","btn-sm",3,"click"]],template:function(i,n){i&1&&(f(0,"button",1),V("click",function(){return n.showSettings()}),x(1,` Settings
3711
+ `),p(),W(2,"cc-global-configuration-dialog",null,0))},dependencies:[ug],encapsulation:2})}}return e})();var d5=(()=>{class e{constructor(){this.store=E(me),this.isDomainViewAvailable=F(this.store.select(bg),{initialValue:!1}),this.isDependencyViewAvailable=F(this.store.select(qf),{initialValue:!1})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=O({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function pE(e,o){e&1&&Se(0,"span",2)}function fE(e,o){e&1&&Se(0,"span",2)}function gE(e,o){if(e&1){let t=ue();_(0,"button",1),re("click",function(){oe(t);let n=L();return ne(n.selectCompare())}),x(1," Compare "),K(2,fE,1,0,"span",2),T()}if(e&2){let t=L();Be("font-bold",t.isDeltaState()),rt("aria-selected",t.isDeltaState()),h(2),Q(t.isDeltaState()?2:-1)}}var h5=(()=>{class e{constructor(){this.fileStoreReadWindow=E(Fe),this.fileSelectionModeService=E(Il),this.router=E(_i),this.isDeltaState=F(this.fileStoreReadWindow.isDeltaState$,{requireSync:!0}),this.isRadialLayout=Vt(),this.isCompareOffered=te(()=>!this.isRadialLayout()||this.isDeltaState())}selectExplore(){this.showMetricsView(),this.isDeltaState()&&this.fileSelectionModeService.toggle()}selectCompare(){this.showMetricsView(),this.isDeltaState()||this.fileSelectionModeService.toggle()}showMetricsView(){this.router.navigateByUrl(Vi.metrics)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=A({type:e,selectors:[["cc-mode-toggle"]],decls:5,vars:5,consts:[["role","tablist",1,"flex","items-center","gap-1"],["type","button","role","tab",1,"btn","btn-ghost","btn-sm","relative",3,"click"],[1,"cc-current-underline"],["type","button","role","tab",1,"btn","btn-ghost","btn-sm","relative",3,"font-bold"]],template:function(i,n){i&1&&(_(0,"div",0)(1,"button",1),re("click",function(){return n.selectExplore()}),x(2," Explore "),K(3,pE,1,0,"span",2),T(),K(4,gE,3,4,"button",3),T()),i&2&&(h(),Be("font-bold",!n.isDeltaState()),rt("aria-selected",!n.isDeltaState()),h(2),Q(n.isDeltaState()?-1:3),h(),Q(n.isCompareOffered()?4:-1))},encapsulation:2})}}return e})();var u5=(()=>{class e{constructor(){this.export3DMapDialogStore=E(Oa)}export3DMap(){this.export3DMapDialogStore.requestExport()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=A({type:e,selectors:[["cc-print-3d-button"]],decls:2,vars:0,consts:[["type","button","title","Download 3MF code file",1,"btn","btn-ghost","btn-sm",3,"click"]],template:function(i,n){i&1&&(_(0,"button",0),re("click",function(){return n.export3DMap()}),x(1,` 3D Print
3712
+ `),T())},encapsulation:2})}}return e})();function bE(e,o){e&1&&W(0,"cc-print-3d-button")}function vE(e,o){if(e&1&&(W(0,"cc-mode-toggle"),K(1,bE,1,0,"cc-print-3d-button")),e&2){let t=L();h(),Q(t.isRadialLayout()?-1:1)}}function xE(e,o){e&1&&W(0,"span",3)}function wE(e,o){if(e&1&&(f(0,"a",2,0),x(2," Explore "),K(3,xE,1,0,"span",3),p()),e&2){let t=Ya(1),i=L();R("routerLink",i.routeLinks[i.view()]),rt("data-testid","view-mode-"+i.view()+"-explore"),h(3),Q(t.isActive?3:-1)}}var yE={metrics:"Metric modes",domain:"Domain modes",dependencies:"Dependency modes"},m5=(()=>{class e{constructor(){this.view=J.required(),this.routeLinks=Vi,this.groupLabel=te(()=>yE[this.view()]),this.isRadialLayout=Vt()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=A({type:e,selectors:[["cc-view-mode-bar"]],hostAttrs:[1,"block"],inputs:{view:[1,"view"]},decls:3,vars:2,consts:[["viewExplore","routerLinkActive"],[1,"flex","items-center","justify-center","gap-1","py-0.5","border-0","m-0","px-0","min-w-0"],["routerLinkActive","font-bold",1,"btn","btn-ghost","btn-sm","relative",3,"routerLink"],[1,"cc-current-underline"]],template:function(i,n){i&1&&(f(0,"fieldset",1),K(1,vE,2,1)(2,wE,4,3,"a",2),p()),i&2&&(rt("aria-label",n.groupLabel()),h(),Q(n.view()==="metrics"?1:2))},dependencies:[h5,u5,os,ns],encapsulation:2})}}return e})();var SE=e=>({exact:e}),CE=(e,o)=>o.view;function ME(e,o){e&1&&W(0,"span",7)}function _E(e,o){if(e&1){let t=ue();f(0,"a",6,0),V("mouseenter",function(){let n=oe(t).$implicit,r=L();return ne(r.openModeBar(n.view))})("focusin",function(){let n=oe(t).$implicit,r=L();return ne(r.openModeBar(n.view))}),x(2),K(3,ME,1,0,"span",7),p()}if(e&2){let t=o.$implicit,i=Ya(1),n=L();Be("font-bold",i.isActive),R("routerLink",n.routeLinks[t.view])("routerLinkActiveOptions",Zm(8,SE,t.matchesExactly))("title",t.title),rt("data-testid","view-switcher-"+t.view),h(2),we(" ",t.label," "),h(),Q(i.isActive?3:-1)}}function EE(e,o){if(e&1){let t=ue();f(0,"div",8),V("mouseenter",function(){oe(t);let n=L();return ne(n.cancelPendingClose())})("mouseleave",function(){oe(t);let n=L();return ne(n.scheduleClosingModeBar())}),W(1,"cc-view-mode-bar",9),p()}e&2&&(h(),R("view",o))}function kE(e,o){if(e&1){let t=ue();f(0,"span",10),V("mouseenter",function(){oe(t);let n=L();return ne(n.openModeBar(n.activeView()))}),ai(),f(1,"svg",11),W(2,"path",12),p()()}}var qE=200,TE=[{view:"metrics",label:"Metric",title:"Show the 3D metrics map",matchesExactly:!0},{view:"domain",label:"Domain",title:"Show the domain-language word cloud",matchesExactly:!1},{view:"dependencies",label:"Dependencies",title:"Show the dependency graph, arranged by level",matchesExactly:!1}],p5=(()=>{class e{constructor(){this.readStore=E(d5),this.hostElement=E(Gt),this.isViewAvailable={metrics:ke(!0),domain:this.readStore.isDomainViewAvailable,dependencies:this.readStore.isDependencyViewAvailable},this.availableTabs=te(()=>TE.filter(t=>this.isViewAvailable[t.view]())),this.activeView=F(E(tr).activeView$,{requireSync:!0}),this.routeLinks=Vi,this.previewedView=ke(null),this.pendingClose=null,E(Ua).onDestroy(()=>this.cancelPendingClose())}openModeBar(t){this.cancelPendingClose(),this.previewedView.set(t)}cancelPendingClose(){this.pendingClose!==null&&(clearTimeout(this.pendingClose),this.pendingClose=null)}scheduleClosingModeBar(){this.cancelPendingClose(),this.pendingClose=setTimeout(()=>this.closeModeBar(),qE)}closeModeBarWhenFocusLeaves(t){let i=t.relatedTarget;(!(i instanceof Node)||!this.hostElement.nativeElement.contains(i))&&this.closeModeBar()}closeModeBar(){this.cancelPendingClose(),this.previewedView.set(null)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=A({type:e,selectors:[["cc-view-switcher"]],hostAttrs:[1,"contents"],decls:6,vars:1,consts:[["tabLink","routerLinkActive"],[1,"flex","items-center",3,"click","mouseleave","focusout"],["aria-label","View","data-testid","view-switcher",1,"flex","items-center","gap-1"],["routerLinkActive","","ariaCurrentWhenActive","page",1,"btn","btn-ghost","btn-sm","relative",3,"font-bold","routerLink","routerLinkActiveOptions","title"],["data-testid","view-mode-bar-overlay",1,"absolute","inset-x-0","top-full","z-[70]","border-b","border-base-300","bg-base-100","shadow-md"],["aria-hidden","true","data-testid","view-mode-bar-handle",1,"absolute","left-1/2","top-full","z-[70]","mt-px","flex","-translate-x-1/2","cursor-pointer","items-center","rounded-b-md","border","border-t-0","border-base-300","bg-base-100","px-2.5","pb-1","pt-0.5","text-base-content/40","shadow-sm","hover:text-base-content/70"],["routerLinkActive","","ariaCurrentWhenActive","page",1,"btn","btn-ghost","btn-sm","relative",3,"mouseenter","focusin","routerLink","routerLinkActiveOptions","title"],[1,"cc-current-underline"],["data-testid","view-mode-bar-overlay",1,"absolute","inset-x-0","top-full","z-[70]","border-b","border-base-300","bg-base-100","shadow-md",3,"mouseenter","mouseleave"],[3,"view"],["aria-hidden","true","data-testid","view-mode-bar-handle",1,"absolute","left-1/2","top-full","z-[70]","mt-px","flex","-translate-x-1/2","cursor-pointer","items-center","rounded-b-md","border","border-t-0","border-base-300","bg-base-100","px-2.5","pb-1","pt-0.5","text-base-content/40","shadow-sm","hover:text-base-content/70",3,"mouseenter"],["viewBox","0 0 10 6","fill","none","stroke","currentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round",1,"block","h-1.5","w-2.5"],["d","M1 1 5 5 9 1"]],template:function(i,n){if(i&1&&(f(0,"div",1),V("click",function(){return n.closeModeBar()})("mouseleave",function(){return n.scheduleClosingModeBar()})("focusout",function(a){return n.closeModeBarWhenFocusLeaves(a)}),f(1,"nav",2),Ne(2,_E,4,10,"a",3,CE),p(),K(4,EE,2,1,"div",4)(5,kE,3,0,"span",5),p()),i&2){let r;h(2),Ve(n.availableTabs()),h(2),Q((r=n.previewedView())?4:5,r)}},dependencies:[os,ns,m5],encapsulation:2})}}return e})();function RE(e,o){e&1&&W(0,"cc-delta-selector")}function AE(e,o){e&1&&W(0,"cc-map-selector")}function IE(e,o){if(e&1){let t=ue();f(0,"cc-export-3D-map-dialog",5),V("closed",function(){oe(t);let n=L();return ne(n.closeExportDialog())}),p()}}var km=(()=>{class e{constructor(){this.fileStoreReadWindow=E(Fe),this.export3DMapDialogStore=E(Oa),this.isDeltaState=F(this.fileStoreReadWindow.isDeltaState$,{requireSync:!0}),this.isExportDialogOpen=this.export3DMapDialogStore.isDialogOpen}closeExportDialog(){this.export3DMapDialogStore.closeDialog()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=A({type:e,selectors:[["cc-nav-bar"]],features:[Xt([{provide:ur,useValue:"--cc-bars-height"}]),no([mr])],decls:12,vars:2,consts:[[1,"navbar","relative","bg-base-100","border-b","border-base-300","min-h-12","px-2"],[1,"navbar-start","gap-1"],[1,"divider","divider-horizontal","mx-0"],[1,"navbar-center","self-stretch"],[1,"navbar-end"],[3,"closed"]],template:function(i,n){i&1&&(f(0,"div",0)(1,"div",1),W(2,"cc-nav-bar-logo")(3,"div",2)(4,"cc-nav-bar-folder-button"),K(5,RE,1,0,"cc-delta-selector")(6,AE,1,0,"cc-map-selector"),p(),f(7,"div",3),W(8,"cc-view-switcher"),p(),f(9,"div",4),W(10,"cc-settings-button"),p()(),K(11,IE,1,0,"cc-export-3D-map-dialog")),i&2&&(h(5),Q(n.isDeltaState()?5:6),h(6),Q(n.isExportDialogOpen()?11:-1))},dependencies:[Em,l5,s5,n5,o5,c5,p5],encapsulation:2})}}return e})();function FE(e,o){e&1&&(f(0,"div"),W(1,"cc-nav-bar")(2,"router-outlet")(3,"cc-changelog-dialog"),p())}function LE(e,o){e&1&&W(0,"cc-boot-loading-indicator")}var f5=(()=>{class e{constructor(t){this.loadFilesUseCase=t,this.isInitialized=ke(!1)}ngOnInit(){this.loadFilesUseCase.loadOnBoot().catch(()=>{}).finally(()=>{this.isInitialized.set(!0)})}static{this.\u0275fac=function(i){return new(i||e)(le(cl))}}static{this.\u0275cmp=A({type:e,selectors:[["cc-code-charta"]],decls:4,vars:1,template:function(i,n){i&1&&(W(0,"cc-error-dialog")(1,"cc-toast"),K(2,FE,4,0,"div")(3,LE,1,0,"cc-boot-loading-indicator")),i&2&&(h(2),Q(n.isInitialized()?2:3))},dependencies:[km,ch,M0,rg,up,S0],encapsulation:2})}}return e})();lp(f5,Te(ae({},Hu),{providers:[ep(),...Hu.providers]}));