@glycanage/web-components 1.55.0 → 1.57.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.
- package/dist/chronic.wc.js +1 -1
- package/package.json +1 -1
package/dist/chronic.wc.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as O,S as B,i as E,f as
|
|
1
|
+
import{c as O,S as B,i as E,f as m,s as N,a as R,d as S,g as b,w,k as j,o as _,n as q,e as $,p as L,b as y,x as C,q as h,r as c,u as l,v as G}from"./helpers.js";function k(n){R(n,"svelte-jc5bq8",".main.svelte-jc5bq8{height:5rem;width:25rem;display:flex;justify-content:center}.movable.svelte-jc5bq8{display:flex;flex-direction:column;align-items:center;max-width:7rem;height:100%}.age-font.svelte-jc5bq8{font-size:1.5rem}.rotate.svelte-jc5bq8{transform:rotate(180deg)}")}function A(n){let s,t,r,a=q(n[0],"BIOLOGICAL_AGE")+"",p,o,i,u,g,x,e,d;return{c(){s=$("div"),t=$("div"),r=$("div"),p=L(a),o=y(),i=$("div"),u=$("b"),g=L(n[1]),x=y(),e=C("svg"),d=C("path"),h(r,"text-align","center"),h(r,"white-space","nowrap"),c(i,"class","age-font svelte-jc5bq8"),c(d,"d","M14.0718 4C17.151 -1.33334 24.849 -1.33333 27.9282 4.00001L40.0525 25C43.1317 30.3333 39.2827 37 33.1243 37L8.87563 37C2.71722 37 -1.13177 30.3333 1.94743 25L14.0718 4Z"),c(d,"fill","#09371F"),c(e,"class","rotate svelte-jc5bq8"),c(e,"width","18%"),c(e,"height","18%"),c(e,"viewBox","0 0 42 37"),c(e,"fill","none"),c(e,"xmlns","http://www.w3.org/2000/svg"),c(t,"class","movable svelte-jc5bq8"),h(t,"margin",n[3]()),c(s,"class","main svelte-jc5bq8")},m(v,f){b(v,s,f),l(s,t),l(t,r),l(r,p),l(t,o),l(t,i),l(i,u),l(u,g),l(t,x),l(t,e),l(e,d)},p(v,f){f&1&&a!==(a=q(v[0],"BIOLOGICAL_AGE")+"")&&G(p,a),f&2&&G(g,v[1])},d(v){v&&j(s)}}}function z(n){let s,t=n[2]&&A(n);return{c(){t&&t.c(),s=S()},m(r,a){t&&t.m(r,a),b(r,s,a)},p(r,[a]){r[2]?t?t.p(r,a):(t=A(r),t.c(),t.m(s.parentNode,s)):t&&(t.d(1),t=null)},i:w,o:w,d(r){r&&j(s),t&&t.d(r)}}}function M(n,s,t){let{lang:r}=s,{report:a}=s,{service:p=window.GaReportService}=s,o=0,i=0,u,g=!1;function x(){if(o>i){const e=o-i;switch(!0){case e>40:return`0 0 0 ${e*5.5}px`;case e>30:return`0 0 0 ${e*7}px`;case e>20:return`0 0 0 ${e*9}px`;case e>10:return`0 0 0 ${e*11}px`;case(e>0&&e<=10):return`0 0 0 ${e*15}px`}}else if(o<i){const e=i-o;switch(!0){case e>40:return`0 ${e*5.5}px 0 0`;case e>30:return`0 ${e*7}px 0 0`;case e>20:return`0 ${e*9}px 0 0`;case e>10:return`0 ${e*11}px 0 0`;case(e>0&&e<=10):return`0 ${e*15}px 0 0`}}return"0"}return _(async()=>{u=await p.getReport(a),t(1,o=Number(u.glycanage)),i=Number(u.chronologicalage),t(2,g=!0)}),n.$$set=e=>{"lang"in e&&t(0,r=e.lang),"report"in e&&t(4,a=e.report),"service"in e&&t(5,p=e.service)},[r,o,g,x,a,p]}class I extends B{constructor(s){super(),E(this,s,M,z,N,{lang:0,report:4,service:5},k)}get lang(){return this.$$.ctx[0]}set lang(s){this.$$set({lang:s}),m()}get report(){return this.$$.ctx[4]}set report(s){this.$$set({report:s}),m()}get service(){return this.$$.ctx[5]}set service(s){this.$$set({service:s}),m()}}customElements.define("ga-chronic",O(I,{lang:{},report:{},service:{}},[],[],!0));export{I as default};
|