@glycanage/web-components 1.145.0 → 1.147.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.
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{S as X,i as e2,s as t2,e as c,b as m,v as Z,m as Y,n as e,p as s,g as N,q as n,r as _,u as K,k as P,c as s2,f as q,a as a2,w as c2,x as d2,j as p2,t as u2,y as f2,o as h2}from"./index2.js";import{s as i2,l as r2,a as I}from"./helpers.js";function l2(i){let t,l,r;return{c(){t=c("div"),l=m(),r=c("div"),e(t,"position","absolute"),e(t,"right","10px"),e(t,"bottom","5px"),e(t,"height","3px"),e(t,"width","14px"),e(t,"background-color","#DD2222"),e(t,"border-radius","4px"),e(t,"transform","rotate(135deg)"),e(r,"position","absolute"),e(r,"right","10px"),e(r,"top","5px"),e(r,"height","3px"),e(r,"width","14px"),e(r,"background-color","#DD2222"),e(r,"border-radius","4px"),e(r,"transform","rotate(-135deg)")},m(o,p){N(o,t,p),N(o,l,p),N(o,r,p)},d(o){o&&(P(t),P(l),P(r))}}}function n2(i){let t,l,r;return{c(){t=c("div"),l=m(),r=c("div"),e(t,"position","absolute"),e(t,"left","11px"),e(t,"bottom","5px"),e(t,"height","3px"),e(t,"width","14px"),e(t,"background-color","#DD2222"),e(t,"border-radius","4px"),e(t,"transform","rotate(45deg)"),e(r,"position","absolute"),e(r,"left","11px"),e(r,"top","5px"),e(r,"height","3px"),e(r,"width","14px"),e(r,"background-color","#DD2222"),e(r,"border-radius","4px"),e(r,"transform","rotate(-45deg)")},m(o,p){N(o,t,p),N(o,l,p),N(o,r,p)},d(o){o&&(P(t),P(l),P(r))}}}function C2(i){let t,l,r,o,p,a,S,D,j,y,g,x,z,d,M,w,B,C,A,k,b,h,f,G,H,R,U=i2(i[0])+"",J,Q,W,L,T,O,V,$=i[1]==="left"&&l2(),E=i[1]==="right"&&n2();return{c(){t=c("div"),l=c("div"),$&&$.c(),r=m(),o=c("div"),p=m(),a=c("div"),S=m(),D=c("div"),j=m(),y=c("div"),g=m(),x=c("div"),z=m(),d=c("div"),M=m(),w=c("div"),E&&E.c(),B=m(),C=c("div"),A=Z("svg"),k=Z("rect"),h=m(),f=c("div"),G=c("b"),H=Y(i[0]),R=c("sup"),J=Y(U),Q=Y(" percentile"),W=m(),L=c("div"),T=Z("svg"),O=Z("path"),e(l,"position","relative"),e(l,"height","100%"),e(l,"flex","1"),e(l,"background-color",i[1]==="left"?"#DD2222":"#CADBD1"),e(l,"border-radius","4px"),e(o,"height","100%"),e(o,"flex","2"),e(o,"background-color",i[1]==="left"?"#DD2222":"#CADBD1"),e(o,"border-radius","4px"),e(a,"height","100%"),e(a,"flex","2"),e(a,"background-color",i[1]==="left"?"#EE6600":"#CADBD1"),e(a,"border-radius","4px"),e(D,"position","relative"),e(D,"height","100%"),e(D,"flex","2"),e(D,"background-color","#CADBD1"),e(D,"border-radius","4px"),e(y,"height","100%"),e(y,"flex","2"),e(y,"background-color","#CADBD1"),e(y,"border-radius","4px"),e(x,"height","100%"),e(x,"flex","2"),e(x,"background-color",i[1]==="left"?"#CADBD1":"#EE6600"),e(x,"border-radius","4px"),e(d,"height","100%"),e(d,"flex","2"),e(d,"background-color",i[1]==="left"?"#CADBD1":"#DD2222"),e(d,"border-radius","4px"),e(w,"position","relative"),e(w,"height","100%"),e(w,"flex","1"),e(w,"background-color",i[1]==="left"?"#CADBD1":"#DD2222"),e(w,"border-radius","4px"),s(k,"width","100"),s(k,"height","24"),s(k,"rx","4"),s(k,"fill",b=F(i[0],i[1])),s(A,"width","100"),s(A,"height","24"),s(A,"viewBox","0 0 100 24"),s(A,"fill","none"),s(A,"xmlns","http://www.w3.org/2000/svg"),e(C,"left",i[2](i[0])+"%"),e(C,"position","absolute"),e(C,"transform","translate(-50%, -100%)"),e(C,"display","flex"),e(C,"align-items","center"),e(C,"flex-direction","column"),e(C,"width","100px"),e(C,"height","38px"),e(R,"font-size","0.5rem"),e(f,"left",i[2](i[0])+"%"),e(f,"position","absolute"),e(f,"transform","translate(-50%, -90%)"),e(f,"display","flex"),e(f,"align-items","center"),e(f,"flex-direction","column"),e(f,"width","100px"),e(f,"height","38px"),e(f,"color","white"),e(f,"font-size","0.75rem"),s(O,"d","M6.8 6.93333C6.4 7.46667 5.6 7.46667 5.2 6.93333L0 8.07577e-07L12 0L6.8 6.93333Z"),s(O,"fill",V=F(i[0],i[1])),s(T,"width","12"),s(T,"height","8"),s(T,"viewBox","0 0 12 8"),s(T,"fill","none"),s(T,"xmlns","http://www.w3.org/2000/svg"),e(L,"left",i[2](i[0])+"%"),e(L,"position","absolute"),e(L,"transform","translate(-50%, -40%)"),e(L,"display","flex"),e(L,"align-items","center"),e(L,"flex-direction","column"),e(L,"width","100px"),e(L,"height","38px"),e(L,"color","white"),e(L,"font-size","0.75rem"),e(t,"position","relative"),e(t,"width","92%"),e(t,"height","4px"),e(t,"display","flex"),e(t,"justify-content","space-between"),e(t,"gap","4px")},m(u,v){N(u,t,v),n(t,l),$&&$.m(l,null),n(t,r),n(t,o),n(t,p),n(t,a),n(t,S),n(t,D),n(t,j),n(t,y),n(t,g),n(t,x),n(t,z),n(t,d),n(t,M),n(t,w),E&&E.m(w,null),n(t,B),n(t,C),n(C,A),n(A,k),n(t,h),n(t,f),n(f,G),n(G,H),n(G,R),n(R,J),n(G,Q),n(t,W),n(t,L),n(L,T),n(T,O)},p(u,[v]){u[1]==="left"?$||($=l2(),$.c(),$.m(l,null)):$&&($.d(1),$=null),v&2&&e(l,"background-color",u[1]==="left"?"#DD2222":"#CADBD1"),v&2&&e(o,"background-color",u[1]==="left"?"#DD2222":"#CADBD1"),v&2&&e(a,"background-color",u[1]==="left"?"#EE6600":"#CADBD1"),v&2&&e(x,"background-color",u[1]==="left"?"#CADBD1":"#EE6600"),v&2&&e(d,"background-color",u[1]==="left"?"#CADBD1":"#DD2222"),u[1]==="right"?E||(E=n2(),E.c(),E.m(w,null)):E&&(E.d(1),E=null),v&2&&e(w,"background-color",u[1]==="left"?"#CADBD1":"#DD2222"),v&3&&b!==(b=F(u[0],u[1]))&&s(k,"fill",b),v&1&&e(C,"left",u[2](u[0])+"%"),v&1&&_(H,u[0]),v&1&&U!==(U=i2(u[0])+"")&&_(J,U),v&1&&e(f,"left",u[2](u[0])+"%"),v&3&&V!==(V=F(u[0],u[1]))&&s(O,"fill",V),v&1&&e(L,"left",u[2](u[0])+"%")},i:K,o:K,d(u){u&&P(t),$&&$.d(),E&&E.d()}}}function F(i,t){return t==="left"?i>=34?"#119999":i>18&&i<34?"#EE6600":"#DD2222":i<=66?"#119999":i>66&&i<82?"#EE6600":"#DD2222"}function g2(i,t,l){let{percentile:r=0}=t,{direction:o=""}=t;function p(a){if(a===50)return 50;if(a<2)return 9;if(a>98)return 91;if(a>=2&&a<50)return r2(a,9.2,50,13,50);if(a>50&&a<=98)return r2(a,50,90.8,50,86.8)}return i.$$set=a=>{"percentile"in a&&l(0,r=a.percentile),"direction"in a&&l(1,o=a.direction)},[r,o,p]}class m2 extends X{constructor(t){super(),e2(this,t,g2,C2,t2,{percentile:0,direction:1})}}function x2(i){a2(i,"svelte-9bcij0",".main.svelte-9bcij0{height:100%;width:100%;display:flex}.label.svelte-9bcij0{width:25%;display:flex;align-items:center}")}function b2(i){let t,l,r;return{c(){t=Z("svg"),l=Z("path"),s(l,"d","M10.8656 29.0002L8.93229 25.7335L5.26563 24.9335C4.93229 24.8668 4.66563 24.6946 4.46563 24.4168C4.26563 24.139 4.18785 23.8335 4.23229 23.5002L4.59896 19.7335L2.09896 16.8668C1.87674 16.6224 1.76562 16.3335 1.76562 16.0002C1.76562 15.6668 1.87674 15.3779 2.09896 15.1335L4.59896 12.2668L4.23229 8.50016C4.18785 8.16682 4.26563 7.86127 4.46563 7.58349C4.66563 7.30571 4.93229 7.13349 5.26563 7.06682L8.93229 6.26682L10.8656 3.00016C11.0434 2.71127 11.2878 2.51682 11.599 2.41682C11.9101 2.31682 12.2212 2.33349 12.5323 2.46682L15.999 3.93349L19.4656 2.46682C19.7767 2.33349 20.0878 2.31682 20.399 2.41682C20.7101 2.51682 20.9545 2.71127 21.1323 3.00016L23.0656 6.26682L26.7323 7.06682C27.0656 7.13349 27.3323 7.30571 27.5323 7.58349C27.7323 7.86127 27.8101 8.16682 27.7656 8.50016L27.399 12.2668L29.899 15.1335C30.1212 15.3779 30.2323 15.6668 30.2323 16.0002C30.2323 16.3335 30.1212 16.6224 29.899 16.8668L27.399 19.7335L27.7656 23.5002C27.8101 23.8335 27.7323 24.139 27.5323 24.4168C27.3323 24.6946 27.0656 24.8668 26.7323 24.9335L23.0656 25.7335L21.1323 29.0002C20.9545 29.289 20.7101 29.4835 20.399 29.5835C20.0878 29.6835 19.7767 29.6668 19.4656 29.5335L15.999 28.0668L12.5323 29.5335C12.2212 29.6668 11.9101 29.6835 11.599 29.5835C11.2878 29.4835 11.0434 29.289 10.8656 29.0002ZM15.999 22.6668C16.3767 22.6668 16.6934 22.539 16.949 22.2835C17.2045 22.0279 17.3323 21.7113 17.3323 21.3335C17.3323 20.9557 17.2045 20.639 16.949 20.3835C16.6934 20.1279 16.3767 20.0002 15.999 20.0002C15.6212 20.0002 15.3045 20.1279 15.049 20.3835C14.7934 20.639 14.6656 20.9557 14.6656 21.3335C14.6656 21.7113 14.7934 22.0279 15.049 22.2835C15.3045 22.539 15.6212 22.6668 15.999 22.6668ZM15.999 17.3335C16.3767 17.3335 16.6934 17.2057 16.949 16.9502C17.2045 16.6946 17.3323 16.3779 17.3323 16.0002V10.6668C17.3323 10.289 17.2045 9.97238 16.949 9.71682C16.6934 9.46127 16.3767 9.33349 15.999 9.33349C15.6212 9.33349 15.3045 9.46127 15.049 9.71682C14.7934 9.97238 14.6656 10.289 14.6656 10.6668V16.0002C14.6656 16.3779 14.7934 16.6946 15.049 16.9502C15.3045 17.2057 15.6212 17.3335 15.999 17.3335Z"),s(l,"fill",r=i[3]==="#EE6600"?"#EE6600":"#DD2222"),s(t,"width","32"),s(t,"height","32"),s(t,"viewBox","0 0 32 32"),s(t,"fill","none"),s(t,"xmlns","http://www.w3.org/2000/svg")},m(o,p){N(o,t,p),n(t,l)},p(o,p){p&8&&r!==(r=o[3]==="#EE6600"?"#EE6600":"#DD2222")&&s(l,"fill",r)},d(o){o&&P(t)}}}function v2(i){let t,l;return{c(){t=Z("svg"),l=Z("path"),s(l,"d","M13.599 14.9335L11.6656 13.0335C11.4212 12.789 11.1156 12.6668 10.749 12.6668C10.3823 12.6668 10.0656 12.8002 9.79896 13.0668C9.55451 13.3113 9.43229 13.6224 9.43229 14.0002C9.43229 14.3779 9.55451 14.689 9.79896 14.9335L12.6656 17.8002C12.9323 18.0668 13.2434 18.2002 13.599 18.2002C13.9545 18.2002 14.2656 18.0668 14.5323 17.8002L20.199 12.1335C20.4656 11.8668 20.5934 11.5557 20.5823 11.2002C20.5712 10.8446 20.4434 10.5335 20.199 10.2668C19.9323 10.0002 19.6156 9.86127 19.249 9.85016C18.8823 9.83905 18.5656 9.96683 18.299 10.2335L13.599 14.9335ZM9.86563 27.0002L7.93229 23.7335L4.26563 22.9335C3.93229 22.8668 3.66563 22.6946 3.46563 22.4168C3.26563 22.1391 3.18785 21.8335 3.23229 21.5002L3.59896 17.7335L1.09896 14.8668C0.876736 14.6224 0.765625 14.3335 0.765625 14.0002C0.765625 13.6668 0.876736 13.3779 1.09896 13.1335L3.59896 10.2668L3.23229 6.50016C3.18785 6.16683 3.26563 5.86127 3.46563 5.58349C3.66563 5.30571 3.93229 5.13349 4.26563 5.06683L7.93229 4.26683L9.86563 1.00016C10.0434 0.711269 10.2878 0.516825 10.599 0.416825C10.9101 0.316825 11.2212 0.333491 11.5323 0.466825L14.999 1.93349L18.4656 0.466825C18.7767 0.333491 19.0878 0.316825 19.399 0.416825C19.7101 0.516825 19.9545 0.711269 20.1323 1.00016L22.0656 4.26683L25.7323 5.06683C26.0656 5.13349 26.3323 5.30571 26.5323 5.58349C26.7323 5.86127 26.8101 6.16683 26.7656 6.50016L26.399 10.2668L28.899 13.1335C29.1212 13.3779 29.2323 13.6668 29.2323 14.0002C29.2323 14.3335 29.1212 14.6224 28.899 14.8668L26.399 17.7335L26.7656 21.5002C26.8101 21.8335 26.7323 22.1391 26.5323 22.4168C26.3323 22.6946 26.0656 22.8668 25.7323 22.9335L22.0656 23.7335L20.1323 27.0002C19.9545 27.2891 19.7101 27.4835 19.399 27.5835C19.0878 27.6835 18.7767 27.6668 18.4656 27.5335L14.999 26.0668L11.5323 27.5335C11.2212 27.6668 10.9101 27.6835 10.599 27.5835C10.2878 27.4835 10.0434 27.2891 9.86563 27.0002Z"),s(l,"fill","#119999"),s(t,"width","30"),s(t,"height","28"),s(t,"viewBox","0 0 30 28"),s(t,"fill","none"),s(t,"xmlns","http://www.w3.org/2000/svg")},m(r,o){N(r,t,o),n(t,l)},p:K,d(r){r&&P(t)}}}function L2(i){let t,l,r,o,p,a=I(i[0],"GLYCAN")+"",S,D,j,y,g,x,z,d,M,w,B,C;M=new m2({props:{direction:i[1],percentile:i[4]}});function A(h,f){return h[3]==="#119999"?v2:b2}let k=A(i),b=k(i);return{c(){t=c("div"),l=c("div"),r=c("div"),o=c("div"),p=c("b"),S=Y(a),D=m(),j=c("b"),j.textContent=`${i[5].label}`,y=m(),g=c("div"),x=Y(i[2]),z=m(),d=c("div"),c2(M.$$.fragment),w=m(),B=c("div"),b.c(),e(o,"font-size","0.9rem"),e(r,"display","flex"),e(r,"flex-direction","column"),e(r,"padding-left","0.3rem"),s(l,"class","label svelte-9bcij0"),e(l,"font-size","0.8rem"),e(d,"width","70%"),e(d,"display","flex"),e(d,"align-items","center"),e(d,"justify-content","center"),e(B,"width","5%"),e(B,"height","100%"),e(B,"display","flex"),e(B,"align-items","center"),s(t,"class","main svelte-9bcij0")},m(h,f){N(h,t,f),n(t,l),n(l,r),n(r,o),n(o,p),n(p,S),n(o,D),n(o,j),n(r,y),n(r,g),n(g,x),n(t,z),n(t,d),d2(M,d,null),n(t,w),n(t,B),b.m(B,null),C=!0},p(h,[f]){(!C||f&1)&&a!==(a=I(h[0],"GLYCAN")+"")&&_(S,a),(!C||f&4)&&_(x,h[2]);const G={};f&2&&(G.direction=h[1]),f&16&&(G.percentile=h[4]),M.$set(G),k===(k=A(h))&&b?b.p(h,f):(b.d(1),b=k(h),b&&(b.c(),b.m(B,null)))},i(h){C||(p2(M.$$.fragment,h),C=!0)},o(h){u2(M.$$.fragment,h),C=!1},d(h){h&&P(t),f2(M),b.d()}}}function D2(i,t){return t==="left"?i>=34?"#119999":i>18&&i<34?"#EE6600":"#DD2222":i<=66?"#119999":i>66&&i<82?"#EE6600":"#DD2222"}function w2(i,t,l){let{lang:r}=t,{subtype:o}=t,{direction:p}=t,{service:a=window.GaReportService}=t,S=[{name:"mature",label:"Mature",csvName:"G0percentile"},{name:"youth",label:"Youth",csvName:"G2percentile"},{name:"shield",label:"Shield",csvName:"Spercentile"},{name:"lifestyle",label:"Lifestyle",csvName:"Bpercentile"},{name:"median",label:"Median",csvName:"G1percentile"},{name:"peak18",label:"18",csvName:"P18percentile"},{name:"peak22",label:"22",csvName:"P22percentile"},{name:"peak23",label:"23",csvName:"P23percentile"},{name:"peak26",label:"26",csvName:"P26percentile"}],D,j="",y="",g=0;const x=S.find(d=>d.name===o);function z(){return p==="right"?g<=66?I(r,"OPTIMAL"):I(r,"SUBOPTIMAL"):g>=34?I(r,"OPTIMAL"):I(r,"SUBOPTIMAL")}return h2(async()=>{D=await a.getReport(),x&&(l(4,g=Number(D[x.csvName])),l(2,j=z())),(g===100||g===0)&&l(4,g=g===100?99:1),l(3,y=D2(g,p))}),i.$$set=d=>{"lang"in d&&l(0,r=d.lang),"subtype"in d&&l(6,o=d.subtype),"direction"in d&&l(1,p=d.direction),"service"in d&&l(7,a=d.service)},[r,p,j,y,g,x,o,a]}class o2 extends X{constructor(t){super(),e2(this,t,w2,L2,t2,{lang:0,subtype:6,direction:1,service:7},x2)}get lang(){return this.$$.ctx[0]}set lang(t){this.$$set({lang:t}),q()}get subtype(){return this.$$.ctx[6]}set subtype(t){this.$$set({subtype:t}),q()}get direction(){return this.$$.ctx[1]}set direction(t){this.$$set({direction:t}),q()}get service(){return this.$$.ctx[7]}set service(t){this.$$set({service:t}),q()}}customElements.define("ga-arrow-graph-three",s2(o2,{lang:{},subtype:{},direction:{},service:{}},[],[],!0));export{o2 as default};
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const t=()=>{import("./arthritis.wc.js"),import("./colitis.wc.js"),import("./crohn.wc.js"),import("./lupus.wc.js"),import("./diabetes.wc.js"),import("./myocardial.wc.js"),import("./menopause.wc.js"),import("./hypertension.wc.js"),import("./chronic.wc.js"),import("./dyslipidemia.wc.js"),import("./atherosclerosis.wc.js"),import("./coronary.wc.js"),import("./copd.wc.js"),import("./hypertension-risk.wc.js"),import("./pre-hypertension.wc.js"),import("./language.interface.js"),import("./colorectal.wc.js"),import("./endometrial.wc.js"),import("./ovarian.wc.js"),import("./age-graph.wc.js"),import("./index-graph.wc.js"),import("./median-graph.wc.js"),import("./median-graph-japanese.wc.js"),import("./index-graph-japanese.wc.js"),import("./results-overview.wc.js"),import("./single-overview.wc.js"),import("./main-result.wc.js"),import("./main-result-three.wc.js"),import("./results-overview-three.wc.js"),import("./insights-overview.wc.js"),import("./insights-overview-three.wc.js"),import("./insights-overview-latest.wc.js"),import("./action-steps-three.wc.js"),import("./arrow-graph.wc.js"),import("./overlap-title.wc.js"),import("./scatter-plot.wc.js"),import("./results-overview-clp.wc.js"),import("./insights-overview-clp.wc.js"),import("./main-result-clp.wc.js"),import("./single-overview-clp.wc.js"),import("./single-overview-three.wc.js"),import("./arrow-graph-clp.wc.js"),import("./overlap-title-clp.wc.js"),import("./scatter-plot-clp.wc.js"),import("./over-time.wc.js")};export{t as default};
|
|
1
|
+
const t=()=>{import("./arthritis.wc.js"),import("./colitis.wc.js"),import("./crohn.wc.js"),import("./lupus.wc.js"),import("./diabetes.wc.js"),import("./myocardial.wc.js"),import("./menopause.wc.js"),import("./hypertension.wc.js"),import("./chronic.wc.js"),import("./dyslipidemia.wc.js"),import("./atherosclerosis.wc.js"),import("./coronary.wc.js"),import("./copd.wc.js"),import("./hypertension-risk.wc.js"),import("./pre-hypertension.wc.js"),import("./language.interface.js"),import("./colorectal.wc.js"),import("./endometrial.wc.js"),import("./ovarian.wc.js"),import("./age-graph.wc.js"),import("./index-graph.wc.js"),import("./median-graph.wc.js"),import("./median-graph-japanese.wc.js"),import("./index-graph-japanese.wc.js"),import("./results-overview.wc.js"),import("./single-overview.wc.js"),import("./main-result.wc.js"),import("./main-result-three.wc.js"),import("./results-overview-three.wc.js"),import("./insights-overview.wc.js"),import("./insights-overview-three.wc.js"),import("./insights-overview-latest.wc.js"),import("./action-steps-three.wc.js"),import("./arrow-graph.wc.js"),import("./arrow-graph-three.wc.js"),import("./overlap-title.wc.js"),import("./overlap-title-three.wc.js"),import("./scatter-plot.wc.js"),import("./results-overview-clp.wc.js"),import("./insights-overview-clp.wc.js"),import("./main-result-clp.wc.js"),import("./single-overview-clp.wc.js"),import("./single-overview-three.wc.js"),import("./arrow-graph-clp.wc.js"),import("./overlap-title-clp.wc.js"),import("./scatter-plot-clp.wc.js"),import("./over-time.wc.js")};export{t as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as X,S as Y,i as e0,f as Q,s as t0,a as r0,d as n0,g as F,u as V,k as q,o as a0,e as D,m as M,b as s0,n as Z,p as a,q as p,r as i0,v as G}from"./index2.js";function o0(s){r0(s,"svelte-11vqnst",".main.svelte-11vqnst{height:100%;width:100%;display:flex;align-items:center;justify-content:center;font-size:1rem;border-radius:.75rem}.container.svelte-11vqnst{width:90%;height:80%;display:flex;align-items:center;justify-content:space-between}")}function U(s){let t,e,r,n,m,i,x,c,v,d;function C(o,u){return o[0]==="no significant overlap"?C0:c0}let L=C(s),l=L(s);return{c(){t=D("div"),e=D("div"),r=D("p"),n=M("There is "),m=D("b"),i=M(s[0]),x=M(" of glycan metrics "),c=D("br"),v=M(" between current results and this condition."),d=s0(),l.c(),Z(m,"color",s[1]),a(e,"class","container svelte-11vqnst"),a(t,"class","main svelte-11vqnst"),Z(t,"background-color",s[2])},m(o,u){F(o,t,u),p(t,e),p(e,r),p(r,n),p(r,m),p(m,i),p(r,x),p(r,c),p(r,v),p(e,d),l.m(e,null)},p(o,u){u[0]&1&&i0(i,o[0]),u[0]&2&&Z(m,"color",o[1]),L===(L=C(o))&&l?l.p(o,u):(l.d(1),l=L(o),l&&(l.c(),l.m(e,null))),u[0]&4&&Z(t,"background-color",o[2])},d(o){o&&q(t),l.d()}}}function c0(s){let t,e,r;return{c(){t=G("svg"),e=G("path"),a(e,"d","M14.2984 40.5002L11.3984 35.6002L5.89844 34.4002C5.39844 34.3002 4.99844 34.0419 4.69844 33.6252C4.39844 33.2086 4.28177 32.7502 4.34844 32.2502L4.89844 26.6002L1.14844 22.3002C0.815104 21.9336 0.648438 21.5002 0.648438 21.0002C0.648438 20.5002 0.815104 20.0669 1.14844 19.7002L4.89844 15.4002L4.34844 9.75024C4.28177 9.25024 4.39844 8.7919 4.69844 8.37524C4.99844 7.95857 5.39844 7.70024 5.89844 7.60024L11.3984 6.40024L14.2984 1.50024C14.5651 1.0669 14.9318 0.775237 15.3984 0.625237C15.8651 0.475237 16.3318 0.500237 16.7984 0.700237L21.9984 2.90024L27.1984 0.700237C27.6651 0.500237 28.1318 0.475237 28.5984 0.625237C29.0651 0.775237 29.4318 1.0669 29.6984 1.50024L32.5984 6.40024L38.0984 7.60024C38.5984 7.70024 38.9984 7.95857 39.2984 8.37524C39.5984 8.7919 39.7151 9.25024 39.6484 9.75024L39.0984 15.4002L42.8484 19.7002C43.1818 20.0669 43.3484 20.5002 43.3484 21.0002C43.3484 21.5002 43.1818 21.9336 42.8484 22.3002L39.0984 26.6002L39.6484 32.2502C39.7151 32.7502 39.5984 33.2086 39.2984 33.6252C38.9984 34.0419 38.5984 34.3002 38.0984 34.4002L32.5984 35.6002L29.6984 40.5002C29.4318 40.9336 29.0651 41.2252 28.5984 41.3752C28.1318 41.5252 27.6651 41.5002 27.1984 41.3002L21.9984 39.1002L16.7984 41.3002C16.3318 41.5002 15.8651 41.5252 15.3984 41.3752C14.9318 41.2252 14.5651 40.9336 14.2984 40.5002ZM21.9984 31.0002C22.5651 31.0002 23.0401 30.8086 23.4234 30.4252C23.8068 30.0419 23.9984 29.5669 23.9984 29.0002C23.9984 28.4336 23.8068 27.9586 23.4234 27.5752C23.0401 27.1919 22.5651 27.0002 21.9984 27.0002C21.4318 27.0002 20.9568 27.1919 20.5734 27.5752C20.1901 27.9586 19.9984 28.4336 19.9984 29.0002C19.9984 29.5669 20.1901 30.0419 20.5734 30.4252C20.9568 30.8086 21.4318 31.0002 21.9984 31.0002ZM21.9984 23.0002C22.5651 23.0002 23.0401 22.8086 23.4234 22.4252C23.8068 22.0419 23.9984 21.5669 23.9984 21.0002V13.0002C23.9984 12.4336 23.8068 11.9586 23.4234 11.5752C23.0401 11.1919 22.5651 11.0002 21.9984 11.0002C21.4318 11.0002 20.9568 11.1919 20.5734 11.5752C20.1901 11.9586 19.9984 12.4336 19.9984 13.0002V21.0002C19.9984 21.5669 20.1901 22.0419 20.5734 22.4252C20.9568 22.8086 21.4318 23.0002 21.9984 23.0002Z"),a(e,"fill",r=s[0]==="some overlap"?"#EE6600":"#DD2222"),a(t,"width","44"),a(t,"height","42"),a(t,"viewBox","0 0 44 42"),a(t,"fill","none"),a(t,"xmlns","http://www.w3.org/2000/svg")},m(n,m){F(n,t,m),p(t,e)},p(n,m){m[0]&1&&r!==(r=n[0]==="some overlap"?"#EE6600":"#DD2222")&&a(e,"fill",r)},d(n){n&&q(t)}}}function C0(s){let t,e;return{c(){t=G("svg"),e=G("path"),a(e,"d","M19.8984 22.4002L16.9984 19.5502C16.6318 19.1836 16.1734 19.0002 15.6234 19.0002C15.0734 19.0002 14.5984 19.2002 14.1984 19.6002C13.8318 19.9669 13.6484 20.4336 13.6484 21.0002C13.6484 21.5669 13.8318 22.0336 14.1984 22.4002L18.4984 26.7002C18.8984 27.1002 19.3651 27.3002 19.8984 27.3002C20.4318 27.3002 20.8984 27.1002 21.2984 26.7002L29.7984 18.2002C30.1984 17.8002 30.3901 17.3336 30.3734 16.8002C30.3568 16.2669 30.1651 15.8002 29.7984 15.4002C29.3984 15.0002 28.9234 14.7919 28.3734 14.7752C27.8234 14.7586 27.3484 14.9502 26.9484 15.3502L19.8984 22.4002ZM14.2984 40.5002L11.3984 35.6002L5.89844 34.4002C5.39844 34.3002 4.99844 34.0419 4.69844 33.6252C4.39844 33.2086 4.28177 32.7502 4.34844 32.2502L4.89844 26.6002L1.14844 22.3002C0.815104 21.9336 0.648438 21.5002 0.648438 21.0002C0.648438 20.5002 0.815104 20.0669 1.14844 19.7002L4.89844 15.4002L4.34844 9.75024C4.28177 9.25024 4.39844 8.7919 4.69844 8.37524C4.99844 7.95857 5.39844 7.70024 5.89844 7.60024L11.3984 6.40024L14.2984 1.50024C14.5651 1.0669 14.9318 0.775237 15.3984 0.625237C15.8651 0.475237 16.3318 0.500237 16.7984 0.700237L21.9984 2.90024L27.1984 0.700237C27.6651 0.500237 28.1318 0.475237 28.5984 0.625237C29.0651 0.775237 29.4318 1.0669 29.6984 1.50024L32.5984 6.40024L38.0984 7.60024C38.5984 7.70024 38.9984 7.95857 39.2984 8.37524C39.5984 8.7919 39.7151 9.25024 39.6484 9.75024L39.0984 15.4002L42.8484 19.7002C43.1818 20.0669 43.3484 20.5002 43.3484 21.0002C43.3484 21.5002 43.1818 21.9336 42.8484 22.3002L39.0984 26.6002L39.6484 32.2502C39.7151 32.7502 39.5984 33.2086 39.2984 33.6252C38.9984 34.0419 38.5984 34.3002 38.0984 34.4002L32.5984 35.6002L29.6984 40.5002C29.4318 40.9336 29.0651 41.2252 28.5984 41.3752C28.1318 41.5252 27.6651 41.5002 27.1984 41.3002L21.9984 39.1002L16.7984 41.3002C16.3318 41.5002 15.8651 41.5252 15.3984 41.3752C14.9318 41.2252 14.5651 40.9336 14.2984 40.5002Z"),a(e,"fill","#119999"),a(t,"width","44"),a(t,"height","42"),a(t,"viewBox","0 0 44 42"),a(t,"fill","none"),a(t,"xmlns","http://www.w3.org/2000/svg")},m(r,n){F(r,t,n),p(t,e)},p:V,d(r){r&&q(t)}}}function l0(s){let t,e=s[3]&&U(s);return{c(){e&&e.c(),t=n0()},m(r,n){e&&e.m(r,n),F(r,t,n)},p(r,n){r[3]?e?e.p(r,n):(e=U(r),e.c(),e.m(t.parentNode,t)):e&&(e.d(1),e=null)},i:V,o:V,d(r){r&&q(t),e&&e.d(r)}}}function u0(s,t,e){let{disease:r}=t,{service:n=window.GaReportService}=t,m=[{name:"risk",counter:"riskCounter",max:1},{name:"pre",counter:"preCounter",max:1},{name:"hyper",counter:"hyperCounter",max:3},{name:"cva",counter:"cvaCounter",max:4},{name:"femalecva",counter:"cvaFCounter",max:1},{name:"atherosclerosis",counter:"atheroCounter",max:5},{name:"coronary",counter:"coronaryCounter",max:2},{name:"diabetes",counter:"diabetesCounter",max:5},{name:"dyslipidemia",counter:"dyslipidemiaCounter",max:4},{name:"arthritis",counter:"arthritisCounter",max:4},{name:"colitis",counter:"colitisCounter",max:4},{name:"crohn",counter:"crohnCounter",max:5},{name:"sle",counter:"sleCounter",max:4},{name:"copd",counter:"copdCounter",max:2},{name:"peri",counter:"periCounter",max:4}],i,x="",c="no significant overlap",v="",d="",C=0,L=0,l=0,o=0,u=0,w=0,z=0,h=0,P=0,f=0,y=0,k=0,E=0,g=0,N=0,B=0,$=0,S=0,A=0,T=0,_=0,H=0,j=0,I=0,J=0,K=0,O=!1;const R=m.find(b=>b.name===r);return a0(async()=>{switch(i=await n.getReport(),x=i.sex,S=Number(i.Bpercentile),A=Number(i.Spercentile),T=Number(i.G0percentile),_=Number(i.G1percentile),H=Number(i.G2percentile),I=Number(i.P18percentile),j=Number(i.P22percentile),J=Number(i.P23percentile),K=Number(i.P26percentile),S>=67&&(l++,w++,h++,f++,y++,g++,B++,$++),S<=33&&E++,A<=33&&(w++,h++,P++,f++,y++,k++,g++,$++),T>=67&&(u++,w++,h++,P++,f++,y++,E++,g++,$++,k++),_<=33&&(u++,h++,f++,E++,g++,B++,k++),H<=33&&(o++,u++,w++,h++,f++,y++,E++,g++,$++,k++),I>=67&&N++,j<=33&&N++,J>=67&&N++,K<=33&&N++,j<=33&&x==="F"&&z++,R&&(C={riskCounter:l,preCounter:o,hyperCounter:u,cvaCounter:w,cvaFCounter:z,atheroCounter:h,coronaryCounter:P,diabetesCounter:f,dyslipidemiaCounter:y,arthritisCounter:k,colitisCounter:E,crohnCounter:g,sleCounter:N,copdCounter:B,periCounter:$}[R.counter],L=R.max),L){case 1:C===1&&e(0,c="significant overlap");break;case 2:C===1&&e(0,c="some overlap"),C===2&&e(0,c="significant overlap");break;case 3:C===2&&e(0,c="some overlap"),C===3&&e(0,c="significant overlap");break;case 4:C===3&&e(0,c="some overlap"),C===4&&e(0,c="significant overlap");break;case 5:(C===3||C===4)&&e(0,c="some overlap"),C===5&&e(0,c="significant overlap");break}switch(c){case"no significant overlap":e(1,v="#119999"),e(2,d="#E7F5F5");break;case"some overlap":e(1,v="#EE6600"),e(2,d="#FCEFE4");break;case"significant overlap":e(1,v="#DD2222"),e(2,d="#DD22221A");break}e(3,O=!0)}),s.$$set=b=>{"disease"in b&&e(4,r=b.disease),"service"in b&&e(5,n=b.service)},[c,v,d,O,r,n]}class W extends Y{constructor(t){super(),e0(this,t,u0,l0,t0,{disease:4,service:5},o0,[-1,-1])}get disease(){return this.$$.ctx[4]}set disease(t){this.$$set({disease:t}),Q()}get service(){return this.$$.ctx[5]}set service(t){this.$$set({service:t}),Q()}}customElements.define("ga-overlap-title-three",X(W,{disease:{},service:{}},[],[],!0));export{W as default};
|