import{s as k,n as _,d as f,b as s,i as v,k as E,c as g,h as y,e as w,o as S,m as T,r as x}from"./Cl1o3nVP.js";import{S as A,i as D}from"./nb9JOxVX.js";import{C as F}from"./C0VlNTRY.js";import{l as V}from"./De2JwdUD.js";function q(o){let t,e;return{c(){t=w("div"),e=w("canvas"),this.h()},l(a){t=g(a,"DIV",{style:!0});var n=y(t);e=g(n,"CANVAS",{style:!0}),y(e).forEach(f),n.forEach(f),this.h()},h(){s(e,"position","absolute"),s(e,"top","0"),s(e,"left","0"),s(e,"height","100%",1),s(e,"width","100%",1),s(t,"position","relative"),s(t,"width",o[1]),s(t,"height",o[0]),s(t,"min-width","60px")},m(a,n){v(a,t,n),E(t,e),o[4](e)},p(a,[n]){n&2&&s(t,"width",a[1]),n&1&&s(t,"height",a[0])},i:_,o:_,d(a){a&&f(t),o[4](null)}}}let I=1390;function L(o,t,e){let{height:a="50"}=t,{width:n="50"}=t,{color:r="#FF0000"}=t;console.log({color:r});let l="";const m=[0,0,-5,0,10,0,-10,0,5,0,0],p=[m.map(i=>i*1),m.map(i=>i*-1)];console.log({smoothies_3:p});let h=p;const b={type:"line",data:{labels:h[0],datasets:[{label:"Looping tension",data:h,fill:!1,borderColor:r,borderWidth:3,backgroundColor:"transparent",tension:.5,pointRadius:0}]},options:{animation:{duration:2e3},animations:{tension:{duration:400,easing:"linear",from:1.2,to:1.2,loop:!1}},scales:{x:{display:!1,grid:{display:!1},ticks:{display:!1}},y:{display:!1,grid:{display:!1},ticks:{display:!1}}},plugins:{legend:{display:!1},tooltip:{enabled:!1}}},__scales:{y:{min:0,max:100}}};let d=0;const u=V({wait:I,wait_for_response:"yes",action:async()=>{l instanceof Element&&(c.data.datasets[0].data=h[d],c.update(),d+=1,d===h.length&&(d=0))}});let c="";S(()=>{const i=l;c=new F(i,b),u.play()}),T(()=>{u.stop()});function C(i){x[i?"unshift":"push"](()=>{l=i,e(2,l)})}return o.$$set=i=>{"height"in i&&e(0,a=i.height),"width"in i&&e(1,n=i.width),"color"in i&&e(3,r=i.color)},[a,n,l,r,C]}class j extends A{constructor(t){super(),D(this,t,L,q,k,{height:0,width:1,color:3})}}export{j as T};
//# sourceMappingURL=DT479Mbo.js.map
