designix-uis 0.5.15 → 0.5.17

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.
Files changed (41) hide show
  1. package/dist/designix-uis.js +5 -5
  2. package/dist/public/_app/immutable/chunks/{entry.Bg9yHmlo.js → entry.DbZ64lxC.js} +1 -1
  3. package/dist/public/_app/immutable/chunks/{index.BLMsg5xO.js → index.25h7ziiG.js} +1 -1
  4. package/dist/public/_app/immutable/chunks/makeList.Zd15bGSd.js +120 -0
  5. package/dist/public/_app/immutable/chunks/paths.C4SMaBnQ.js +1 -0
  6. package/dist/public/_app/immutable/chunks/{stores.DvwYasMc.js → stores.8Mp7Yi8p.js} +1 -1
  7. package/dist/public/_app/immutable/entry/{app.Dy2SZ7Tt.js → app.BTmLyfq6.js} +2 -7
  8. package/dist/public/_app/immutable/entry/start.CQxwxLM8.js +1 -0
  9. package/dist/public/_app/immutable/nodes/{0.D8SenX5S.js → 0.ropgFOjk.js} +1 -1
  10. package/dist/public/_app/immutable/nodes/{1.DzCMV2Ix.js → 1.CJcHnz_W.js} +1 -1
  11. package/dist/public/_app/immutable/nodes/{2.DL3ZkOfz.js → 2.DsVPKLGV.js} +1 -1
  12. package/dist/public/_app/immutable/nodes/3.D8rSmrcJ.js +18 -0
  13. package/dist/public/_app/version.json +1 -1
  14. package/dist/public/gear/gear_wheel_wheel.html +14 -14
  15. package/dist/public/gear/simplified_gear_wheel.html +14 -14
  16. package/dist/public/heliostat/base.html +14 -14
  17. package/dist/public/heliostat/haxis_guidance.html +14 -14
  18. package/dist/public/heliostat/heliostat.html +16 -16
  19. package/dist/public/heliostat/heliostat_2.html +16 -16
  20. package/dist/public/heliostat/pole_static.html +14 -14
  21. package/dist/public/heliostat/rake.html +14 -14
  22. package/dist/public/heliostat/rake_stopper.html +14 -14
  23. package/dist/public/heliostat/ring.html +14 -14
  24. package/dist/public/heliostat/ring_guidance.html +14 -14
  25. package/dist/public/heliostat/rod.html +14 -14
  26. package/dist/public/heliostat/spider.html +14 -14
  27. package/dist/public/heliostat/surface.html +14 -14
  28. package/dist/public/heliostat/swing.html +14 -14
  29. package/dist/public/heliostat/trapeze.html +14 -14
  30. package/dist/public/heliostat/vaxis.html +14 -14
  31. package/dist/public/heliostat/vaxis_guidance.html +14 -14
  32. package/dist/public/heliostat/vaxis_holder.html +14 -14
  33. package/dist/public/index.html +12 -12
  34. package/dist/public/pgdsvg/swing.svg +1 -1
  35. package/dist/public/pgdsvg/swing_buttress.svg +1 -1
  36. package/dist/public/pgdsvg/swing_side.svg +1 -1
  37. package/package.json +5 -5
  38. package/dist/public/_app/immutable/chunks/makeList.CKvlspzX.js +0 -120
  39. package/dist/public/_app/immutable/chunks/paths.ZRM143hx.js +0 -1
  40. package/dist/public/_app/immutable/entry/start.-baw-mET.js +0 -1
  41. package/dist/public/_app/immutable/nodes/3.B5IcEDJ0.js +0 -18
@@ -1,18 +0,0 @@
1
- import{a as St,b as gl}from"../chunks/makeList.CKvlspzX.js";import{H as vl,w as rl,g as bl}from"../chunks/entry.Bg9yHmlo.js";import{Q as kl,s as ye,p as lt,i as x,n as Ue,f as b,e as g,c as v,b as S,R as ut,m as f,h as r,S as Y,v as Le,a as P,g as j,T as Pe,o as Ve,y as Nl,t as q,l as ie,d as G,U as Be,z as Tl,A as wl,B as Ol,j as _e,C as We,V as pe,k as nt,r as Ot,W as il,X as mt,Y as kt,Z as Cl,H as pt,_ as st,$ as El,a0 as Dl}from"../chunks/scheduler.pWaib8rK.js";import{S as Me,i as Ae,f as je,b as Te,d as we,m as Oe,a as ge,t as ve,e as Ce,g as Ll,c as Sl}from"../chunks/index.DzDRugVt.js";import{e as ke,D as Il,F as cl,G as Pl,H as fl,P as bt,I as jl,J as gt,K as at,L as Ul,M as yl,N as Tt,O as Ml,Q as It,f as ft,r as wt,R as $e,T as Al,U as Fl,V as zl,W as Bl,X as Rl}from"../chunks/index.BLMsg5xO.js";import{b as _t}from"../chunks/paths.ZRM143hx.js";import{p as Hl}from"../chunks/stores.DvwYasMc.js";function Vl(t,e){throw new vl(t,e)}new TextEncoder;function Wl({params:t}){const e=t.design;if(Object.keys(St).includes(e))return{pageDef:St[e],allLink:gl};Vl(404,"Design undefined!")}const ds=Object.freeze(Object.defineProperty({__proto__:null,load:Wl},Symbol.toStringTag,{value:"Module"})),qe=rl({});function ul(t,e,l){const n=kl(qe);if(Object.keys(n).includes(t)){const s=n[t],a=Object.keys(s);for(const c of Object.keys(e))a.includes(c)?l&&(s[c]=e[c]):s[c]=e[c];n[t]=s}else n[t]=e;qe.set(n)}function Xl(t){const e=t.pDef.partName,l={};for(const n of t.pDef.params)l[n.name]=n.init;ul(e,l,!1)}function Pt(t){let e,l,n,o,s,a,c;return{c(){e=g("aside"),l=g("div"),n=g("button"),o=g("img"),this.h()},l(u){e=v(u,"ASIDE",{class:!0});var i=S(e);l=v(i,"DIV",{class:!0});var h=S(l);n=v(h,"BUTTON",{class:!0});var _=S(n);o=v(_,"IMG",{src:!0,alt:!0}),_.forEach(b),h.forEach(b),i.forEach(b),this.h()},h(){ut(o.src,s=t[1])||f(o,"src",s),f(o,"alt",t[1]),f(n,"class","svelte-sjxf1e"),f(l,"class","dialog svelte-sjxf1e"),f(e,"class","backdrop svelte-sjxf1e")},m(u,i){x(u,e,i),r(e,l),r(l,n),r(n,o),a||(c=Y(n,"click",t[2]),a=!0)},p(u,i){i&2&&!ut(o.src,s=u[1])&&f(o,"src",s),i&2&&f(o,"alt",u[1])},d(u){u&&b(e),a=!1,c()}}}function Kl(t){let e,l=t[0]&&Pt(t);return{c(){l&&l.c(),e=lt()},l(n){l&&l.l(n),e=lt()},m(n,o){l&&l.m(n,o),x(n,e,o)},p(n,[o]){n[0]?l?l.p(n,o):(l=Pt(n),l.c(),l.m(e.parentNode,e)):l&&(l.d(1),l=null)},i:Ue,o:Ue,d(n){n&&b(e),l&&l.d(n)}}}function Yl(t,e,l){let{svgPath:n}=e,{modalOpen:o}=e;function s(){l(0,o=!1)}return t.$$set=a=>{"svgPath"in a&&l(1,n=a.svgPath),"modalOpen"in a&&l(0,o=a.modalOpen)},[o,n,s]}class ml extends Me{constructor(e){super(),Ae(this,e,Yl,Kl,ye,{svgPath:1,modalOpen:0})}}function jt(t,e,l){const n=t.slice();return n[8]=e[l],n}function Ut(t){let e,l,n,o,s,a,c;function u(){return t[6](t[8])}return{c(){e=g("button"),l=g("img"),s=P(),this.h()},l(i){e=v(i,"BUTTON",{class:!0});var h=S(e);l=v(h,"IMG",{src:!0,alt:!0,class:!0}),s=j(h),h.forEach(b),this.h()},h(){ut(l.src,n=t[8])||f(l,"src",n),f(l,"alt",o=t[8]),f(l,"class","svelte-fxmnfh"),f(e,"class","svelte-fxmnfh")},m(i,h){x(i,e,h),r(e,l),r(e,s),a||(c=Y(e,"click",u),a=!0)},p(i,h){t=i,h&1&&!ut(l.src,n=t[8])&&f(l,"src",n),h&1&&o!==(o=t[8])&&f(l,"alt",o)},d(i){i&&b(e),a=!1,c()}}}function ql(t){let e,l,n,o,s;function a(h){t[5](h)}let c={svgPath:t[2]};t[1]!==void 0&&(c.modalOpen=t[1]),l=new ml({props:c}),Le.push(()=>je(l,"modalOpen",a));let u=ke(t[0]),i=[];for(let h=0;h<u.length;h+=1)i[h]=Ut(jt(t,u,h));return{c(){e=g("section"),Te(l.$$.fragment),o=P();for(let h=0;h<i.length;h+=1)i[h].c();this.h()},l(h){e=v(h,"SECTION",{class:!0});var _=S(e);we(l.$$.fragment,_),o=j(_);for(let N=0;N<i.length;N+=1)i[N].l(_);_.forEach(b),this.h()},h(){f(e,"class","svelte-fxmnfh")},m(h,_){x(h,e,_),Oe(l,e,null),r(e,o);for(let N=0;N<i.length;N+=1)i[N]&&i[N].m(e,null);s=!0},p(h,[_]){const N={};if(_&4&&(N.svgPath=h[2]),!n&&_&2&&(n=!0,N.modalOpen=h[1],Pe(()=>n=!1)),l.$set(N),_&9){u=ke(h[0]);let d;for(d=0;d<u.length;d+=1){const m=jt(h,u,d);i[d]?i[d].p(m,_):(i[d]=Ut(m),i[d].c(),i[d].m(e,null))}for(;d<i.length;d+=1)i[d].d(1);i.length=u.length}},i(h){s||(ge(l.$$.fragment,h),s=!0)},o(h){ve(l.$$.fragment,h),s=!1},d(h){h&&b(e),Ce(l),Ve(i,h)}}}function Gl(t){const e=[];for(const l of Object.values(t.paramSvg))e.includes(l)||e.push(l);return e}function Zl(t,e,l){let{pDef:n}=e;function o(_){const N=Gl(n),d=[];for(const m of N)d.push(`${_t}/pgdsvg/${m}`);return d}let s=[],a=!1,c;function u(_){l(2,c=_),l(1,a=!0)}function i(_){a=_,l(1,a)}const h=_=>u(_);return t.$$set=_=>{"pDef"in _&&l(4,n=_.pDef)},t.$$.update=()=>{t.$$.dirty&16&&l(0,s=o(n.partName))},[s,a,c,u,n,i,h]}class Jl extends Me{constructor(e){super(),Ae(this,e,Zl,ql,ye,{pDef:4})}}function yt(t){let e,l,n,o,s,a,c="Cancel",u,i,h,_,N,d;const m=t[7].default,p=Nl(m,t,t[6],null);return{c(){e=g("aside"),l=g("div"),n=g("article"),p&&p.c(),o=P(),s=g("footer"),a=g("button"),a.textContent=c,u=P(),i=g("button"),h=q(t[1]),this.h()},l(D){e=v(D,"ASIDE",{class:!0});var k=S(e);l=v(k,"DIV",{class:!0});var C=S(l);n=v(C,"ARTICLE",{class:!0});var I=S(n);p&&p.l(I),I.forEach(b),o=j(C),s=v(C,"FOOTER",{class:!0});var T=S(s);a=v(T,"BUTTON",{class:!0,"data-svelte-h":!0}),ie(a)!=="svelte-hcvk9s"&&(a.textContent=c),u=j(T),i=v(T,"BUTTON",{class:!0});var F=S(i);h=G(F,t[1]),F.forEach(b),T.forEach(b),C.forEach(b),k.forEach(b),this.h()},h(){f(n,"class","question svelte-weruk7"),f(a,"class","cancel svelte-weruk7"),f(i,"class","ok svelte-weruk7"),f(s,"class","svelte-weruk7"),f(l,"class","dialog svelte-weruk7"),Be(l,"sizeLarge",t[2]),f(e,"class","backdrop svelte-weruk7")},m(D,k){x(D,e,k),r(e,l),r(l,n),p&&p.m(n,null),r(l,o),r(l,s),r(s,a),r(s,u),r(s,i),r(i,h),_=!0,N||(d=[Y(a,"click",t[3]),Y(i,"click",t[4])],N=!0)},p(D,k){p&&p.p&&(!_||k&64)&&Tl(p,m,D,D[6],_?Ol(m,D[6],k,null):wl(D[6]),null),(!_||k&2)&&_e(h,D[1]),(!_||k&4)&&Be(l,"sizeLarge",D[2])},i(D){_||(ge(p,D),_=!0)},o(D){ve(p,D),_=!1},d(D){D&&b(e),p&&p.d(D),N=!1,We(d)}}}function Ql(t){let e,l,n=t[0]&&yt(t);return{c(){n&&n.c(),e=lt()},l(o){n&&n.l(o),e=lt()},m(o,s){n&&n.m(o,s),x(o,e,s),l=!0},p(o,[s]){o[0]?n?(n.p(o,s),s&1&&ge(n,1)):(n=yt(o),n.c(),ge(n,1),n.m(e.parentNode,e)):n&&(Ll(),ve(n,1,1,()=>{n=null}),Sl())},i(o){l||(ge(n),l=!0)},o(o){ve(n),l=!1},d(o){o&&b(e),n&&n.d(o)}}}function $l(t,e,l){let{$$slots:n={},$$scope:o}=e,{okName:s="Ok"}=e,{okFunc:a}=e,{modalOpen:c}=e,{sizeLarge:u=!1}=e;function i(){l(0,c=!1)}function h(){a(),l(0,c=!1)}return t.$$set=_=>{"okName"in _&&l(1,s=_.okName),"okFunc"in _&&l(5,a=_.okFunc),"modalOpen"in _&&l(0,c=_.modalOpen),"sizeLarge"in _&&l(2,u=_.sizeLarge),"$$scope"in _&&l(6,o=_.$$scope)},[c,s,u,i,h,a,o,n]}class ht extends Me{constructor(e){super(),Ae(this,e,$l,Ql,ye,{okName:1,okFunc:5,modalOpen:0,sizeLarge:2})}}function Mt(t,e,l){const n=t.slice();return n[17]=e[l],n[18]=e,n[19]=l,n}function At(t,e,l){const n=t.slice();return n[17]=e[l],n}function Ft(t){let e,l=t[17]+"",n;return{c(){e=g("p"),n=q(l),this.h()},l(o){e=v(o,"P",{class:!0});var s=S(e);n=G(s,l),s.forEach(b),this.h()},h(){f(e,"class","diagItem svelte-12dj9tj")},m(o,s){x(o,e,s),r(e,n)},p(o,s){s&1&&l!==(l=o[17]+"")&&_e(n,l)},d(o){o&&b(e)}}}function zt(t){let e,l=t[3][t[17]]&&Ft(t);return{c(){l&&l.c(),e=lt()},l(n){l&&l.l(n),e=lt()},m(n,o){l&&l.m(n,o),x(n,e,o)},p(n,o){n[3][n[17]]?l?l.p(n,o):(l=Ft(n),l.c(),l.m(e.parentNode,e)):l&&(l.d(1),l=null)},d(n){n&&b(e),l&&l.d(n)}}}function xl(t){let e,l="Do you really want to delete the following localStorage keys?",n,o,s=ke(t[0]),a=[];for(let c=0;c<s.length;c+=1)a[c]=zt(At(t,s,c));return{c(){e=g("p"),e.textContent=l,n=P();for(let c=0;c<a.length;c+=1)a[c].c();o=lt(),this.h()},l(c){e=v(c,"P",{class:!0,"data-svelte-h":!0}),ie(e)!=="svelte-12r0p0q"&&(e.textContent=l),n=j(c);for(let u=0;u<a.length;u+=1)a[u].l(c);o=lt(),this.h()},h(){f(e,"class","diagTitle svelte-12dj9tj")},m(c,u){x(c,e,u),x(c,n,u);for(let i=0;i<a.length;i+=1)a[i]&&a[i].m(c,u);x(c,o,u)},p(c,u){if(u&9){s=ke(c[0]);let i;for(i=0;i<s.length;i+=1){const h=At(c,s,i);a[i]?a[i].p(h,u):(a[i]=zt(h),a[i].c(),a[i].m(o.parentNode,o))}for(;i<a.length;i+=1)a[i].d(1);a.length=s.length}},d(c){c&&(b(e),b(n),b(o)),Ve(a,c)}}}function Bt(t){let e,l,n,o,s,a,c=t[17]+"",u,i,h,_=t[2][t[17]]+"",N,d,m,p;function D(){t[12].call(n,t[17])}function k(){return t[13](t[17])}return{c(){e=g("tr"),l=g("td"),n=g("input"),o=P(),s=g("td"),a=g("button"),u=q(c),i=P(),h=g("td"),N=q(_),d=P(),this.h()},l(C){e=v(C,"TR",{class:!0});var I=S(e);l=v(I,"TD",{});var T=S(l);n=v(T,"INPUT",{type:!0}),T.forEach(b),o=j(I),s=v(I,"TD",{class:!0});var F=S(s);a=v(F,"BUTTON",{class:!0});var E=S(a);u=G(E,c),E.forEach(b),F.forEach(b),i=j(I),h=v(I,"TD",{});var M=S(h);N=G(M,_),M.forEach(b),d=j(I),I.forEach(b),this.h()},h(){f(n,"type","checkbox"),f(a,"class","svelte-12dj9tj"),f(s,"class","svelte-12dj9tj"),f(e,"class","svelte-12dj9tj")},m(C,I){x(C,e,I),r(e,l),r(l,n),n.checked=t[3][t[17]],r(e,o),r(e,s),r(s,a),r(a,u),r(e,i),r(e,h),r(h,N),r(e,d),m||(p=[Y(n,"change",D),Y(a,"click",k)],m=!0)},p(C,I){t=C,I&9&&(n.checked=t[3][t[17]]),I&1&&c!==(c=t[17]+"")&&_e(u,c),I&5&&_!==(_=t[2][t[17]]+"")&&_e(N,_)},d(C){C&&b(e),m=!1,We(p)}}}function en(t){let e,l,n="Delete",o,s,a,c,u,i,h,_="<td>Delete</td> <td>Key name</td> <td>Last modification</td>",N,d,m,p,D,k,C="delete all",I,T,F,E,M,w,O;function L(A){t[10](A)}let H={okName:"Confirm",okFunc:t[6],$$slots:{default:[xl]},$$scope:{ctx:t}};t[4]!==void 0&&(H.modalOpen=t[4]),s=new ht({props:H}),Le.push(()=>je(s,"modalOpen",L));let V=ke(t[0]),W=[];for(let A=0;A<V.length;A+=1)W[A]=Bt(Mt(t,V,A));return{c(){e=g("div"),l=g("button"),l.textContent=n,o=P(),Te(s.$$.fragment),c=P(),u=g("table"),i=g("thead"),h=g("tr"),h.innerHTML=_,N=P(),d=g("tr"),m=g("td"),p=g("input"),D=P(),k=g("td"),k.textContent=C,I=P(),T=g("td"),F=P(),E=g("tbody");for(let A=0;A<W.length;A+=1)W[A].c();this.h()},l(A){e=v(A,"DIV",{class:!0});var X=S(e);l=v(X,"BUTTON",{class:!0,"data-svelte-h":!0}),ie(l)!=="svelte-1tbm4xl"&&(l.textContent=n),o=j(X),we(s.$$.fragment,X),c=j(X),u=v(X,"TABLE",{class:!0});var ae=S(u);i=v(ae,"THEAD",{class:!0});var ne=S(i);h=v(ne,"TR",{"data-svelte-h":!0}),ie(h)!=="svelte-xt53kn"&&(h.innerHTML=_),N=j(ne),d=v(ne,"TR",{});var Q=S(d);m=v(Q,"TD",{});var fe=S(m);p=v(fe,"INPUT",{type:!0}),fe.forEach(b),D=j(Q),k=v(Q,"TD",{class:!0,"data-svelte-h":!0}),ie(k)!=="svelte-1s4wssd"&&(k.textContent=C),I=j(Q),T=v(Q,"TD",{}),S(T).forEach(b),Q.forEach(b),ne.forEach(b),F=j(ae),E=v(ae,"TBODY",{class:!0});var me=S(E);for(let he=0;he<W.length;he+=1)W[he].l(me);me.forEach(b),ae.forEach(b),X.forEach(b),this.h()},h(){f(l,"class","svelte-12dj9tj"),f(p,"type","checkbox"),f(k,"class","instruction"),f(i,"class","svelte-12dj9tj"),f(E,"class","svelte-12dj9tj"),f(u,"class","svelte-12dj9tj"),f(e,"class","deleteKeys svelte-12dj9tj")},m(A,X){x(A,e,X),r(e,l),r(e,o),Oe(s,e,null),r(e,c),r(e,u),r(u,i),r(i,h),r(i,N),r(i,d),r(d,m),r(m,p),p.checked=t[1],r(d,D),r(d,k),r(d,I),r(d,T),r(u,F),r(u,E);for(let ae=0;ae<W.length;ae+=1)W[ae]&&W[ae].m(E,null);M=!0,w||(O=[Y(l,"click",t[9]),Y(p,"change",t[11])],w=!0)},p(A,[X]){const ae={};if(X&4194313&&(ae.$$scope={dirty:X,ctx:A}),!a&&X&16&&(a=!0,ae.modalOpen=A[4],Pe(()=>a=!1)),s.$set(ae),X&2&&(p.checked=A[1]),X&45){V=ke(A[0]);let ne;for(ne=0;ne<V.length;ne+=1){const Q=Mt(A,V,ne);W[ne]?W[ne].p(Q,X):(W[ne]=Bt(Q),W[ne].c(),W[ne].m(E,null))}for(;ne<W.length;ne+=1)W[ne].d(1);W.length=V.length}},i(A){M||(ge(s.$$.fragment,A),M=!0)},o(A){ve(s.$$.fragment,A),M=!1},d(A){A&&b(e),Ce(s),Ve(W,A),w=!1,We(O)}}}function tn(t){let e={};for(const l of t)e[l]=!1;return e}function ln(t,e,l){let{pageName:n}=e,{storeName:o}=e,{localKeys:s}=e;function a(){let T=[];const F=new RegExp(`^${n}_`);return T=Object.keys(window.localStorage).filter(M=>F.test(M)).map(M=>M.replace(F,"")),T}s=a();function c(T){l(7,o=T)}let u={};function i(T){let F={};for(const E of T){let M="";const w=`${n}_${E}`,O=window.localStorage.getItem(w);O!==null&&(M=JSON.parse(O).lastModif),F[E]=M}return F}u=i(s);let h={};h=tn(s);let _=!1;function N(T){for(const F of s)l(3,h[F]=T,h)}function d(){for(const T of s)if(h[T]){const F=`${n}_${T}`;window.localStorage.removeItem(F)}l(0,s=a())}let m=!1;const p=()=>{l(4,m=!0)};function D(T){m=T,l(4,m)}function k(){_=this.checked,l(1,_)}function C(T){h[T]=this.checked,l(3,h)}const I=T=>c(T);return t.$$set=T=>{"pageName"in T&&l(8,n=T.pageName),"storeName"in T&&l(7,o=T.storeName),"localKeys"in T&&l(0,s=T.localKeys)},t.$$.update=()=>{t.$$.dirty&2&&N(_)},[s,_,u,h,m,c,d,o,n,p,D,k,C,I]}class dl extends Me{constructor(e){super(),Ae(this,e,ln,en,ye,{pageName:8,storeName:7,localKeys:0})}}function Rt(t){let e,l,n,o;return{c(){e=g("p"),l=q("Warning: name "),n=q(t[0]),o=q(" already used"),this.h()},l(s){e=v(s,"P",{class:!0});var a=S(e);l=G(a,"Warning: name "),n=G(a,t[0]),o=G(a," already used"),a.forEach(b),this.h()},h(){f(e,"class","warnMsg svelte-1rkdwo")},m(s,a){x(s,e,a),r(e,l),r(e,n),r(e,o)},p(s,a){a&1&&_e(n,s[0])},d(s){s&&b(e)}}}function nn(t){let e,l,n,o,s,a,c="Give a name to your parameter-set:",u,i,h,_,N,d;function m(C){t[5](C)}function p(C){t[6](C)}let D={pageName:t[1]};t[0]!==void 0&&(D.storeName=t[0]),t[2]!==void 0&&(D.localKeys=t[2]),e=new dl({props:D}),Le.push(()=>je(e,"storeName",m)),Le.push(()=>je(e,"localKeys",p));let k=t[3]&&Rt(t);return{c(){Te(e.$$.fragment),o=P(),s=g("div"),a=g("label"),a.textContent=c,u=P(),i=g("input"),h=P(),k&&k.c(),this.h()},l(C){we(e.$$.fragment,C),o=j(C),s=v(C,"DIV",{class:!0});var I=S(s);a=v(I,"LABEL",{for:!0,class:!0,"data-svelte-h":!0}),ie(a)!=="svelte-1vdq35w"&&(a.textContent=c),u=j(I),i=v(I,"INPUT",{type:!0,id:!0,minlength:!0,maxlength:!0,size:!0,class:!0}),h=j(I),k&&k.l(I),I.forEach(b),this.h()},h(){f(a,"for","storName"),f(a,"class","svelte-1rkdwo"),f(i,"type","text"),f(i,"id","storName"),i.required=!0,f(i,"minlength","4"),f(i,"maxlength","30"),f(i,"size","32"),f(i,"class","svelte-1rkdwo"),f(s,"class","svelte-1rkdwo")},m(C,I){Oe(e,C,I),x(C,o,I),x(C,s,I),r(s,a),r(s,u),r(s,i),pe(i,t[0]),r(s,h),k&&k.m(s,null),_=!0,N||(d=[Y(i,"input",t[7]),Y(i,"input",t[4])],N=!0)},p(C,[I]){const T={};I&2&&(T.pageName=C[1]),!l&&I&1&&(l=!0,T.storeName=C[0],Pe(()=>l=!1)),!n&&I&4&&(n=!0,T.localKeys=C[2],Pe(()=>n=!1)),e.$set(T),I&1&&i.value!==C[0]&&pe(i,C[0]),C[3]?k?k.p(C,I):(k=Rt(C),k.c(),k.m(s,null)):k&&(k.d(1),k=null)},i(C){_||(ge(e.$$.fragment,C),_=!0)},o(C){ve(e.$$.fragment,C),_=!1},d(C){C&&(b(o),b(s)),Ce(e,C),k&&k.d(),N=!1,We(d)}}}function sn(t){const e=/[-:]/g,l=/\..*$/;return`${t}_${new Date().toISOString().replace(e,"").replace(l,"").replace("T","_")}`}function an(t,e,l){let{pageName:n}=e,{storeName:o}=e,s=[];o=sn(n);let a=!1;function c(N){l(3,a=s.includes(N))}function u(N){const d=N.target.value;c(d)}function i(N){o=N,l(0,o)}function h(N){s=N,l(2,s)}function _(){o=this.value,l(0,o)}return t.$$set=N=>{"pageName"in N&&l(1,n=N.pageName),"storeName"in N&&l(0,o=N.storeName)},t.$$.update=()=>{t.$$.dirty&1&&c(o)},[o,n,s,a,u,i,h,_]}class on extends Me{constructor(e){super(),Ae(this,e,an,nn,ye,{pageName:1,storeName:0})}}function rn(t){let e,l,n,o,s,a,c="Select a parameter-set:",u,i,h;function _(m){t[3](m)}function N(m){t[4](m)}let d={pageName:t[1]};return t[0]!==void 0&&(d.storeName=t[0]),t[2]!==void 0&&(d.localKeys=t[2]),e=new dl({props:d}),Le.push(()=>je(e,"storeName",_)),Le.push(()=>je(e,"localKeys",N)),{c(){Te(e.$$.fragment),o=P(),s=g("div"),a=g("label"),a.textContent=c,u=P(),i=g("input"),this.h()},l(m){we(e.$$.fragment,m),o=j(m),s=v(m,"DIV",{class:!0});var p=S(s);a=v(p,"LABEL",{for:!0,class:!0,"data-svelte-h":!0}),ie(a)!=="svelte-rajgc0"&&(a.textContent=c),u=j(p),i=v(p,"INPUT",{type:!0,id:!0,minlength:!0,maxlength:!0,size:!0,class:!0}),p.forEach(b),this.h()},h(){f(a,"for","storName"),f(a,"class","svelte-1ozd0ey"),f(i,"type","text"),f(i,"id","storName"),i.value=t[0],i.readOnly=!0,f(i,"minlength","4"),f(i,"maxlength","30"),f(i,"size","32"),f(i,"class","svelte-1ozd0ey"),f(s,"class","svelte-1ozd0ey")},m(m,p){Oe(e,m,p),x(m,o,p),x(m,s,p),r(s,a),r(s,u),r(s,i),h=!0},p(m,[p]){const D={};p&2&&(D.pageName=m[1]),!l&&p&1&&(l=!0,D.storeName=m[0],Pe(()=>l=!1)),!n&&p&4&&(n=!0,D.localKeys=m[2],Pe(()=>n=!1)),e.$set(D),(!h||p&1&&i.value!==m[0])&&(i.value=m[0])},i(m){h||(ge(e.$$.fragment,m),h=!0)},o(m){ve(e.$$.fragment,m),h=!1},d(m){m&&(b(o),b(s)),Ce(e,m)}}}function cn(t,e,l){let{pageName:n}=e,{storeName:o}=e,s=[];function a(i){let h=o;return!i.includes(h)&&(i.length>0?h=i[0]:h=""),h}function c(i){o=i,l(0,o),l(2,s)}function u(i){s=i,l(2,s)}return t.$$set=i=>{"pageName"in i&&l(1,n=i.pageName),"storeName"in i&&l(0,o=i.storeName)},t.$$.update=()=>{t.$$.dirty&4&&l(0,o=a(s))},[o,n,s,c,u]}class fn extends Me{constructor(e){super(),Ae(this,e,cn,rn,ye,{pageName:1,storeName:0})}}const Re=rl(Il());function un(t){let e;return{c(){e=g("canvas"),this.h()},l(l){e=v(l,"CANVAS",{class:!0,width:!0,height:!0}),S(e).forEach(b),this.h()},h(){f(e,"class","mini svelte-z8e4tz"),f(e,"width",Ht),f(e,"height",Ht)},m(l,n){x(l,e,n),t[8](e)},p:Ue,i:Ue,o:Ue,d(l){l&&b(e),t[8](null)}}}const Ht=200;function mn(t,e,l){let n,o;nt(t,Re,p=>l(6,n=p)),nt(t,qe,p=>l(7,o=p));let{pageName:s}=e,{fgeom:a}=e,{selFace:c}=e,{simTime:u=0}=e,i,h;function _(p,D){const k=Pl(D);k.ruler=!1;const C=i.getContext("2d");C.clearRect(0,0,C.canvas.width,C.canvas.height);try{h=p.getAdjustFull(C.canvas.width,C.canvas.height),p.draw(C,h,k)}catch(I){console.log(I)}}let N=0;function d(p,D,k,C){const I=a(p,D).fig;if(Object.keys(I).includes(k)){const T=I[k];_(T,C)}else{const T=cl(I);_(T,C)}}Ot(()=>{d(u,o[s],c,n),l(5,N=1)});function m(p){Le[p?"unshift":"push"](()=>{i=p,l(0,i)})}return t.$$set=p=>{"pageName"in p&&l(1,s=p.pageName),"fgeom"in p&&l(2,a=p.fgeom),"selFace"in p&&l(3,c=p.selFace),"simTime"in p&&l(4,u=p.simTime)},t.$$.update=()=>{t.$$.dirty&250&&N===1&&d(u,o[s],c,n)},[i,s,a,c,u,N,n,o,m]}class dn extends Me{constructor(e){super(),Ae(this,e,mn,un,ye,{pageName:1,fgeom:2,selFace:3,simTime:4})}}function hn(t,e){const l=document.createElement("a");l.setAttribute("href","data:text/plain;charset=utf-8,"+encodeURIComponent(e)),l.setAttribute("download",t),l.click(),l.remove()}function hl(t,e,l){const n=/[-:]/g,o=/\..*$/,s=new Date().toISOString().replace(n,"").replace(o,"").replace("T","_"),a=`px_${t}_${s}.json`,c=fl(s,t,e,l);hn(a,c)}function _n(t,e,l){const n=new URL(t),o=2e3;let s=n.toString().length;for(const a of Object.keys(e)){const c=e[a].toString(),u=2+a.length+c.length;(!l||s+u<o)&&n.searchParams.append(encodeURIComponent(a),encodeURIComponent(c)),s+=u}return s>=o&&console.log(`warn547: generateUrl: strLength ${s} larger than strLengthLimit ${o}`),n.toString()}function Vt(t,e,l){const n=t.slice();return n[56]=e[l],n[57]=e,n[58]=l,n}function Wt(t,e,l){const n=t.slice();return n[59]=e[l],n[60]=e,n[61]=l,n}function Xt(t,e,l){const n=t.slice();return n[62]=e[l],n[64]=l,n}function pn(t,e,l){const n=t.slice();return n[62]=e[l],n[64]=l,n}function gn(t){let e;return{c(){e=q("Load the default parameters ?")},l(l){e=G(l,"Load the default parameters ?")},m(l,n){x(l,e,n)},d(l){l&&b(e)}}}function vn(t){let e,l,n;function o(a){t[32](a)}let s={pageName:t[0].partName};return t[12]!==void 0&&(s.storeName=t[12]),e=new fn({props:s}),Le.push(()=>je(e,"storeName",o)),{c(){Te(e.$$.fragment)},l(a){we(e.$$.fragment,a)},m(a,c){Oe(e,a,c),n=!0},p(a,c){const u={};c[0]&1&&(u.pageName=a[0].partName),!l&&c[0]&4096&&(l=!0,u.storeName=a[12],Pe(()=>l=!1)),e.$set(u)},i(a){n||(ge(e.$$.fragment,a),n=!0)},o(a){ve(e.$$.fragment,a),n=!1},d(a){Ce(e,a)}}}function bn(t){let e;return{c(){e=q("unknown")},l(l){e=G(l,"unknown")},m(l,n){x(l,e,n)},p:Ue,d(l){l&&b(e)}}}function kn(t){let e,l,n,o=ke(t[59].dropdown),s=[];for(let c=0;c<o.length;c+=1)s[c]=Kt(Xt(t,o,c));function a(){t[39].call(e,t[59])}return{c(){e=g("select");for(let c=0;c<s.length;c+=1)s[c].c();this.h()},l(c){e=v(c,"SELECT",{});var u=S(e);for(let i=0;i<s.length;i+=1)s[i].l(u);u.forEach(b),this.h()},h(){t[18][t[0].partName][t[59].name]===void 0&&pt(a)},m(c,u){x(c,e,u);for(let i=0;i<s.length;i+=1)s[i]&&s[i].m(e,null);st(e,t[18][t[0].partName][t[59].name],!0),l||(n=Y(e,"change",a),l=!0)},p(c,u){if(t=c,u[0]&16){o=ke(t[59].dropdown);let i;for(i=0;i<o.length;i+=1){const h=Xt(t,o,i);s[i]?s[i].p(h,u):(s[i]=Kt(h),s[i].c(),s[i].m(e,null))}for(;i<s.length;i+=1)s[i].d(1);s.length=o.length}u[0]&262161&&st(e,t[18][t[0].partName][t[59].name])},d(c){c&&b(e),Ve(s,c),l=!1,n()}}}function Nn(t){let e,l,n,o=ke(["Off","On"]),s=[];for(let c=0;c<2;c+=1)s[c]=wn(pn(t,o,c));function a(){t[38].call(e,t[59])}return{c(){e=g("select");for(let c=0;c<2;c+=1)s[c].c();this.h()},l(c){e=v(c,"SELECT",{});var u=S(e);for(let i=0;i<2;i+=1)s[i].l(u);u.forEach(b),this.h()},h(){t[18][t[0].partName][t[59].name]===void 0&&pt(a)},m(c,u){x(c,e,u);for(let i=0;i<2;i+=1)s[i]&&s[i].m(e,null);st(e,t[18][t[0].partName][t[59].name],!0),l||(n=Y(e,"change",a),l=!0)},p(c,u){t=c,u[0]&262161&&st(e,t[18][t[0].partName][t[59].name])},d(c){c&&b(e),Ve(s,c),l=!1,n()}}}function Tn(t){let e,l,n,o,s,a,c,u,i,h,_;function N(){t[36].call(e,t[59])}function d(){t[37].call(a,t[59])}return{c(){e=g("input"),s=P(),a=g("input"),this.h()},l(m){e=v(m,"INPUT",{type:!0,min:!0,max:!0,step:!0,class:!0}),s=j(m),a=v(m,"INPUT",{type:!0,min:!0,max:!0,step:!0,class:!0}),this.h()},h(){f(e,"type","number"),f(e,"min",l=t[59].min),f(e,"max",n=t[59].max),f(e,"step",o=t[59].step),f(e,"class","input-number svelte-1g5tt44"),f(a,"type","range"),f(a,"min",c=t[59].min),f(a,"max",u=t[59].max),f(a,"step",i=t[59].step),f(a,"class","svelte-1g5tt44")},m(m,p){x(m,e,p),pe(e,t[18][t[0].partName][t[59].name]),x(m,s,p),x(m,a,p),pe(a,t[18][t[0].partName][t[59].name]),h||(_=[Y(e,"input",N),Y(e,"change",t[19]),Y(a,"change",d),Y(a,"input",d),Y(a,"change",t[19])],h=!0)},p(m,p){t=m,p[0]&16&&l!==(l=t[59].min)&&f(e,"min",l),p[0]&16&&n!==(n=t[59].max)&&f(e,"max",n),p[0]&16&&o!==(o=t[59].step)&&f(e,"step",o),p[0]&262161&&mt(e.value)!==t[18][t[0].partName][t[59].name]&&pe(e,t[18][t[0].partName][t[59].name]),p[0]&16&&c!==(c=t[59].min)&&f(a,"min",c),p[0]&16&&u!==(u=t[59].max)&&f(a,"max",u),p[0]&16&&i!==(i=t[59].step)&&f(a,"step",i),p[0]&262161&&pe(a,t[18][t[0].partName][t[59].name])},d(m){m&&(b(e),b(s),b(a)),h=!1,We(_)}}}function Kt(t){let e,l=t[62]+"",n;return{c(){e=g("option"),n=q(l),this.h()},l(o){e=v(o,"OPTION",{});var s=S(e);n=G(s,l),s.forEach(b),this.h()},h(){e.__value=t[64],pe(e,e.__value)},m(o,s){x(o,e,s),r(e,n)},p(o,s){s[0]&16&&l!==(l=o[62]+"")&&_e(n,l)},d(o){o&&b(e)}}}function wn(t){let e,l;return{c(){e=g("option"),l=q(t[62]),this.h()},l(n){e=v(n,"OPTION",{});var o=S(e);l=G(o,t[62]),o.forEach(b),this.h()},h(){e.__value=t[64],pe(e,e.__value)},m(n,o){x(n,e,o),r(e,l)},p:Ue,d(n){n&&b(e)}}}function Yt(t){let e,l,n=t[58]+1+"",o,s,a=t[61]+1+"",c,u,i,h,_=t[59].name+"",N,d,m,p,D,k=t[59].unit+"",C,I,T,F=t[59].init+"",E,M,w,O=t[59].min+"",L,H,V,W=t[59].max+"",A,X,ae,ne=t[59].step+"",Q,fe,me;function he(){return t[35](t[59])}function be(ee,B){return ee[59].pType===bt.eNumber?Tn:ee[59].pType===bt.eCheckbox?Nn:ee[59].pType===bt.eDropdown?kn:bn}let U=be(t),z=U(t);return{c(){e=g("tr"),l=g("td"),o=q(n),s=q("."),c=q(a),u=P(),i=g("td"),h=g("button"),N=q(_),d=P(),m=g("td"),z.c(),p=P(),D=g("td"),C=q(k),I=P(),T=g("td"),E=q(F),M=P(),w=g("td"),L=q(O),H=P(),V=g("td"),A=q(W),X=P(),ae=g("td"),Q=q(ne),this.h()},l(ee){e=v(ee,"TR",{class:!0});var B=S(e);l=v(B,"TD",{class:!0});var oe=S(l);o=G(oe,n),s=G(oe,"."),c=G(oe,a),oe.forEach(b),u=j(B),i=v(B,"TD",{class:!0});var K=S(i);h=v(K,"BUTTON",{class:!0});var y=S(h);N=G(y,_),y.forEach(b),K.forEach(b),d=j(B),m=v(B,"TD",{class:!0});var te=S(m);z.l(te),te.forEach(b),p=j(B),D=v(B,"TD",{class:!0});var $=S(D);C=G($,k),$.forEach(b),I=j(B),T=v(B,"TD",{class:!0});var le=S(T);E=G(le,F),le.forEach(b),M=j(B),w=v(B,"TD",{class:!0});var se=S(w);L=G(se,O),se.forEach(b),H=j(B),V=v(B,"TD",{class:!0});var J=S(V);A=G(J,W),J.forEach(b),X=j(B),ae=v(B,"TD",{class:!0});var de=S(ae);Q=G(de,ne),de.forEach(b),B.forEach(b),this.h()},h(){f(l,"class","svelte-1g5tt44"),f(h,"class","svelte-1g5tt44"),f(i,"class","svelte-1g5tt44"),f(m,"class","svelte-1g5tt44"),f(D,"class","svelte-1g5tt44"),f(T,"class","svelte-1g5tt44"),f(w,"class","svelte-1g5tt44"),f(V,"class","svelte-1g5tt44"),f(ae,"class","svelte-1g5tt44"),f(e,"class","svelte-1g5tt44"),Be(e,"changed",t[18][t[0].partName][t[59].name]!==t[59].init)},m(ee,B){x(ee,e,B),r(e,l),r(l,o),r(l,s),r(l,c),r(e,u),r(e,i),r(i,h),r(h,N),r(e,d),r(e,m),z.m(m,null),r(e,p),r(e,D),r(D,C),r(e,I),r(e,T),r(T,E),r(e,M),r(e,w),r(w,L),r(e,H),r(e,V),r(V,A),r(e,X),r(e,ae),r(ae,Q),fe||(me=Y(h,"click",he),fe=!0)},p(ee,B){t=ee,B[0]&16&&_!==(_=t[59].name+"")&&_e(N,_),U===(U=be(t))&&z?z.p(t,B):(z.d(1),z=U(t),z&&(z.c(),z.m(m,null))),B[0]&16&&k!==(k=t[59].unit+"")&&_e(C,k),B[0]&16&&F!==(F=t[59].init+"")&&_e(E,F),B[0]&16&&O!==(O=t[59].min+"")&&_e(L,O),B[0]&16&&W!==(W=t[59].max+"")&&_e(A,W),B[0]&16&&ne!==(ne=t[59].step+"")&&_e(Q,ne),B[0]&262161&&Be(e,"changed",t[18][t[0].partName][t[59].name]!==t[59].init)},d(ee){ee&&b(e),z.d(),fe=!1,me()}}}function qt(t){let e,l,n=t[58]+1+"",o,s,a,c=t[56].sectionName+"",u,i,h,_,N,d,m,p="",D,k,C,I,T;function F(){t[34].call(N,t[56])}let E=ke(t[56].params),M=[];for(let w=0;w<E.length;w+=1)M[w]=Yt(Wt(t,E,w));return{c(){e=g("tr"),l=g("td"),o=q(n),s=P(),a=g("td"),u=q(c),i=P(),h=g("td"),_=g("label"),N=g("input"),d=P(),m=g("span"),m.innerHTML=p,D=P(),k=g("tbody");for(let w=0;w<M.length;w+=1)M[w].c();C=P(),this.h()},l(w){e=v(w,"TR",{class:!0});var O=S(e);l=v(O,"TD",{class:!0});var L=S(l);o=G(L,n),L.forEach(b),s=j(O),a=v(O,"TD",{colspan:!0,class:!0});var H=S(a);u=G(H,c),H.forEach(b),i=j(O),h=v(O,"TD",{colspan:!0,class:!0});var V=S(h);_=v(V,"LABEL",{class:!0});var W=S(_);N=v(W,"INPUT",{type:!0,class:!0}),d=j(W),m=v(W,"SPAN",{class:!0,"data-svelte-h":!0}),ie(m)!=="svelte-1qufua2"&&(m.innerHTML=p),W.forEach(b),V.forEach(b),O.forEach(b),D=j(w),k=v(w,"TBODY",{class:!0});var A=S(k);for(let X=0;X<M.length;X+=1)M[X].l(A);C=j(A),A.forEach(b),this.h()},h(){f(l,"class","svelte-1g5tt44"),f(a,"colspan","4"),f(a,"class","svelte-1g5tt44"),f(N,"type","checkbox"),f(N,"class","svelte-1g5tt44"),f(m,"class","svelte-1g5tt44"),f(_,"class","svelte-1g5tt44"),f(h,"colspan","3"),f(h,"class","svelte-1g5tt44"),f(e,"class","separator svelte-1g5tt44"),f(k,"class","svelte-1g5tt44"),Be(k,"collaps",t[17][t[56].sectionID])},m(w,O){x(w,e,O),r(e,l),r(l,o),r(e,s),r(e,a),r(a,u),r(e,i),r(e,h),r(h,_),r(_,N),N.checked=t[17][t[56].sectionID],r(_,d),r(_,m),x(w,D,O),x(w,k,O);for(let L=0;L<M.length;L+=1)M[L]&&M[L].m(k,null);r(k,C),I||(T=Y(N,"change",F),I=!0)},p(w,O){if(t=w,O[0]&16&&c!==(c=t[56].sectionName+"")&&_e(u,c),O[0]&131088&&(N.checked=t[17][t[56].sectionID]),O[0]&67895313){E=ke(t[56].params);let L;for(L=0;L<E.length;L+=1){const H=Wt(t,E,L);M[L]?M[L].p(H,O):(M[L]=Yt(H),M[L].c(),M[L].m(k,C))}for(;L<M.length;L+=1)M[L].d(1);M.length=E.length}O[0]&131088&&Be(k,"collaps",t[17][t[56].sectionID])},d(w){w&&(b(e),b(D),b(k)),Ve(M,w),I=!1,T()}}}function On(t){let e,l="Copy this URL and send it to your friends!",n,o,s;return{c(){e=g("p"),e.textContent=l,n=P(),o=g("p"),s=q(t[14]),this.h()},l(a){e=v(a,"P",{"data-svelte-h":!0}),ie(e)!=="svelte-1kscrpk"&&(e.textContent=l),n=j(a),o=v(a,"P",{class:!0});var c=S(o);s=G(c,t[14]),c.forEach(b),this.h()},h(){f(o,"class","cUrl svelte-1g5tt44")},m(a,c){x(a,e,c),x(a,n,c),x(a,o,c),r(o,s)},p(a,c){c[0]&16384&&_e(s,a[14])},d(a){a&&(b(e),b(n),b(o))}}}function Cn(t){let e,l,n;function o(a){t[43](a)}let s={pageName:t[0].partName};return t[13]!==void 0&&(s.storeName=t[13]),e=new on({props:s}),Le.push(()=>je(e,"storeName",o)),{c(){Te(e.$$.fragment)},l(a){we(e.$$.fragment,a)},m(a,c){Oe(e,a,c),n=!0},p(a,c){const u={};c[0]&1&&(u.pageName=a[0].partName),!l&&c[0]&8192&&(l=!0,u.storeName=a[13],Pe(()=>l=!1)),e.$set(u)},i(a){n||(ge(e.$$.fragment,a),n=!0)},o(a){ve(e.$$.fragment,a),n=!1},d(a){Ce(e,a)}}}function En(t){let e,l,n="Parameters",o,s,a,c="Load Params from File",u,i,h,_,N="Set Params Default",d,m,p="Load Params from localStorage",D,k,C,I,T,F,E,M,w,O,L,H='<tr class="svelte-1g5tt44"><td class="svelte-1g5tt44">#</td> <td class="svelte-1g5tt44">Parameter name</td> <td class="svelte-1g5tt44">Value</td> <td class="svelte-1g5tt44">Unit</td> <td class="svelte-1g5tt44">Default</td> <td class="svelte-1g5tt44">Min</td> <td class="svelte-1g5tt44">Max</td> <td class="svelte-1g5tt44">Step</td></tr>',V,W,A,X,ae="Comment:",ne,Q,fe,me,he="Save Parameters to File",be,U,z="Save Parameters as URL",ee,B,oe="Save Parameters to localStorage",K,y,te,$,le,se,J,de,Fe,Ee,Ie,Se,Ze,Je,xe,R,re,Ne,ze;function Xe(Z){t[31](Z)}let Ge={okName:"Overwrite Parameters",okFunc:t[22],$$slots:{default:[gn]},$$scope:{ctx:t}};t[8]!==void 0&&(Ge.modalOpen=t[8]),k=new ht({props:Ge}),Le.push(()=>je(k,"modalOpen",Xe));function rt(Z){t[33](Z)}let dt={okName:"Load Parameters",okFunc:t[23],$$slots:{default:[vn]},$$scope:{ctx:t}};t[9]!==void 0&&(dt.modalOpen=t[9]),T=new ht({props:dt}),Le.push(()=>je(T,"modalOpen",rt));let Ke=ke(t[4]),De=[];for(let Z=0;Z<Ke.length;Z+=1)De[Z]=qt(Vt(t,Ke,Z));function Ct(Z){t[42](Z)}let Nt={okName:"Done",okFunc:Dn,sizeLarge:!0,$$slots:{default:[On]},$$scope:{ctx:t}};t[10]!==void 0&&(Nt.modalOpen=t[10]),y=new ht({props:Nt}),Le.push(()=>je(y,"modalOpen",Ct));function Ye(Z){t[44](Z)}let Et={okName:"Save into localStorage",okFunc:t[24],$$slots:{default:[Cn]},$$scope:{ctx:t}};t[11]!==void 0&&(Et.modalOpen=t[11]),le=new ht({props:Et}),Le.push(()=>je(le,"modalOpen",Ye));function pl(Z){t[45](Z)}let Dt={svgPath:t[15]};return t[16]!==void 0&&(Dt.modalOpen=t[16]),de=new ml({props:Dt}),Le.push(()=>je(de,"modalOpen",pl)),R=new dn({props:{pageName:t[0].partName,fgeom:t[1],selFace:t[2],simTime:t[3]}}),{c(){e=g("section"),l=g("h2"),l.textContent=n,o=P(),s=g("main"),a=g("label"),a.textContent=c,u=P(),i=g("input"),h=P(),_=g("button"),_.textContent=N,d=P(),m=g("button"),m.textContent=p,D=P(),Te(k.$$.fragment),I=P(),Te(T.$$.fragment),E=P(),M=g("textarea"),w=P(),O=g("table"),L=g("thead"),L.innerHTML=H,V=P();for(let Z=0;Z<De.length;Z+=1)De[Z].c();W=P(),A=g("div"),X=g("label"),X.textContent=ae,ne=P(),Q=g("input"),fe=P(),me=g("button"),me.textContent=he,be=P(),U=g("button"),U.textContent=z,ee=P(),B=g("button"),B.textContent=oe,K=P(),Te(y.$$.fragment),$=P(),Te(le.$$.fragment),J=P(),Te(de.$$.fragment),Ee=P(),Ie=g("button"),Se=g("img"),Je=P(),xe=g("div"),Te(R.$$.fragment),this.h()},l(Z){e=v(Z,"SECTION",{class:!0});var ce=S(e);l=v(ce,"H2",{class:!0,"data-svelte-h":!0}),ie(l)!=="svelte-1mc497a"&&(l.textContent=n),o=j(ce),s=v(ce,"MAIN",{class:!0});var ue=S(s);a=v(ue,"LABEL",{for:!0,class:!0,"data-svelte-h":!0}),ie(a)!=="svelte-zt7rok"&&(a.textContent=c),u=j(ue),i=v(ue,"INPUT",{id:!0,type:!0,accept:!0,class:!0}),h=j(ue),_=v(ue,"BUTTON",{class:!0,"data-svelte-h":!0}),ie(_)!=="svelte-1typ5"&&(_.textContent=N),d=j(ue),m=v(ue,"BUTTON",{class:!0,"data-svelte-h":!0}),ie(m)!=="svelte-187bpo6"&&(m.textContent=p),D=j(ue),we(k.$$.fragment,ue),I=j(ue),we(T.$$.fragment,ue),E=j(ue),M=v(ue,"TEXTAREA",{rows:!0,cols:!0,wrap:!0,class:!0}),S(M).forEach(b),w=j(ue),O=v(ue,"TABLE",{class:!0});var et=S(O);L=v(et,"THEAD",{class:!0,"data-svelte-h":!0}),ie(L)!=="svelte-1szl7uo"&&(L.innerHTML=H),V=j(et);for(let Qe=0;Qe<De.length;Qe+=1)De[Qe].l(et);et.forEach(b),W=j(ue),A=v(ue,"DIV",{class:!0});var tt=S(A);X=v(tt,"LABEL",{for:!0,"data-svelte-h":!0}),ie(X)!=="svelte-gqskth"&&(X.textContent=ae),ne=j(tt),Q=v(tt,"INPUT",{type:!0,id:!0,maxlength:!0,size:!0}),tt.forEach(b),fe=j(ue),me=v(ue,"BUTTON",{class:!0,"data-svelte-h":!0}),ie(me)!=="svelte-1ny58g0"&&(me.textContent=he),be=j(ue),U=v(ue,"BUTTON",{class:!0,"data-svelte-h":!0}),ie(U)!=="svelte-11or0m2"&&(U.textContent=z),ee=j(ue),B=v(ue,"BUTTON",{class:!0,"data-svelte-h":!0}),ie(B)!=="svelte-5zdtrl"&&(B.textContent=oe),K=j(ue),we(y.$$.fragment,ue),$=j(ue),we(le.$$.fragment,ue),ue.forEach(b),J=j(ce),we(de.$$.fragment,ce),Ee=j(ce),Ie=v(ce,"BUTTON",{class:!0});var it=S(Ie);Se=v(it,"IMG",{src:!0,alt:!0,class:!0}),it.forEach(b),Je=j(ce),xe=v(ce,"DIV",{class:!0});var ct=S(xe);we(R.$$.fragment,ct),ct.forEach(b),ce.forEach(b),this.h()},h(){f(l,"class","svelte-1g5tt44"),f(a,"for","loadFParams"),f(a,"class","fileUpload svelte-1g5tt44"),f(i,"id","loadFParams"),f(i,"type","file"),f(i,"accept","text/plain, application/json"),f(i,"class","svelte-1g5tt44"),f(_,"class","svelte-1g5tt44"),f(m,"class","svelte-1g5tt44"),f(M,"rows","3"),f(M,"cols","80"),M.readOnly=!0,f(M,"wrap","off"),M.value=t[6],f(M,"class","svelte-1g5tt44"),Be(M,"colorWarn",t[7]),f(L,"class","svelte-1g5tt44"),f(O,"class","svelte-1g5tt44"),f(X,"for","inComment"),f(Q,"type","text"),f(Q,"id","inComment"),f(Q,"maxlength","150"),f(Q,"size","70"),f(A,"class","comment svelte-1g5tt44"),f(me,"class","svelte-1g5tt44"),f(U,"class","svelte-1g5tt44"),f(B,"class","svelte-1g5tt44"),f(s,"class","svelte-1g5tt44"),ut(Se.src,Ze=t[15])||f(Se,"src",Ze),f(Se,"alt",t[15]),f(Se,"class","svelte-1g5tt44"),f(Ie,"class","side-img svelte-1g5tt44"),f(xe,"class","mini-canvas svelte-1g5tt44"),f(e,"class","svelte-1g5tt44")},m(Z,ce){x(Z,e,ce),r(e,l),r(e,o),r(e,s),r(s,a),r(s,u),r(s,i),r(s,h),r(s,_),r(s,d),r(s,m),r(s,D),Oe(k,s,null),r(s,I),Oe(T,s,null),r(s,E),r(s,M),r(s,w),r(s,O),r(O,L),r(O,V);for(let ue=0;ue<De.length;ue+=1)De[ue]&&De[ue].m(O,null);r(s,W),r(s,A),r(A,X),r(A,ne),r(A,Q),pe(Q,t[5]),r(s,fe),r(s,me),r(s,be),r(s,U),r(s,ee),r(s,B),r(s,K),Oe(y,s,null),r(s,$),Oe(le,s,null),r(e,J),Oe(de,e,null),r(e,Ee),r(e,Ie),r(Ie,Se),r(e,Je),r(e,xe),Oe(R,xe,null),re=!0,Ne||(ze=[Y(i,"change",t[20]),Y(_,"click",t[29]),Y(m,"click",t[30]),Y(Q,"input",t[40]),Y(me,"click",t[21]),Y(U,"click",t[25]),Y(B,"click",t[41]),Y(Ie,"click",t[27])],Ne=!0)},p(Z,ce){const ue={};ce[2]&16&&(ue.$$scope={dirty:ce,ctx:Z}),!C&&ce[0]&256&&(C=!0,ue.modalOpen=Z[8],Pe(()=>C=!1)),k.$set(ue);const et={};if(ce[0]&4097|ce[2]&16&&(et.$$scope={dirty:ce,ctx:Z}),!F&&ce[0]&512&&(F=!0,et.modalOpen=Z[9],Pe(()=>F=!1)),T.$set(et),(!re||ce[0]&64)&&(M.value=Z[6]),(!re||ce[0]&128)&&Be(M,"colorWarn",Z[7]),ce[0]&68026385){Ke=ke(Z[4]);let He;for(He=0;He<Ke.length;He+=1){const Lt=Vt(Z,Ke,He);De[He]?De[He].p(Lt,ce):(De[He]=qt(Lt),De[He].c(),De[He].m(O,null))}for(;He<De.length;He+=1)De[He].d(1);De.length=Ke.length}ce[0]&32&&Q.value!==Z[5]&&pe(Q,Z[5]);const tt={};ce[0]&16384|ce[2]&16&&(tt.$$scope={dirty:ce,ctx:Z}),!te&&ce[0]&1024&&(te=!0,tt.modalOpen=Z[10],Pe(()=>te=!1)),y.$set(tt);const it={};ce[0]&8193|ce[2]&16&&(it.$$scope={dirty:ce,ctx:Z}),!se&&ce[0]&2048&&(se=!0,it.modalOpen=Z[11],Pe(()=>se=!1)),le.$set(it);const ct={};ce[0]&32768&&(ct.svgPath=Z[15]),!Fe&&ce[0]&65536&&(Fe=!0,ct.modalOpen=Z[16],Pe(()=>Fe=!1)),de.$set(ct),(!re||ce[0]&32768&&!ut(Se.src,Ze=Z[15]))&&f(Se,"src",Ze),(!re||ce[0]&32768)&&f(Se,"alt",Z[15]);const Qe={};ce[0]&1&&(Qe.pageName=Z[0].partName),ce[0]&2&&(Qe.fgeom=Z[1]),ce[0]&4&&(Qe.selFace=Z[2]),ce[0]&8&&(Qe.simTime=Z[3]),R.$set(Qe)},i(Z){re||(ge(k.$$.fragment,Z),ge(T.$$.fragment,Z),ge(y.$$.fragment,Z),ge(le.$$.fragment,Z),ge(de.$$.fragment,Z),ge(R.$$.fragment,Z),re=!0)},o(Z){ve(k.$$.fragment,Z),ve(T.$$.fragment,Z),ve(y.$$.fragment,Z),ve(le.$$.fragment,Z),ve(de.$$.fragment,Z),ve(R.$$.fragment,Z),re=!1},d(Z){Z&&b(e),Ce(k),Ce(T),Ve(De,Z),Ce(y),Ce(le),Ce(de),Ce(R),Ne=!1,We(ze)}}}function Dn(){}function Ln(t){const e={};for(const l of t)e[l.sectionID]=l.sectionVisible;return e}function Sn(t,e,l){let n,o;nt(t,qe,R=>l(18,n=R)),nt(t,Hl,R=>l(46,o=R));const s=il();let{pDef:a}=e,{fgeom:c}=e,{selFace:u}=e,{simTime:i=0}=e,h="";function _(){s("paramChg",{foo:"bla"})}function N(R,re){let Ne="",ze=!1;R!==a.partName&&(Ne+=`warn361: read partName: '${R}' expected partName: '${a.partName}'
2
- `,ze=!0);let Xe=0,Ge=0,rt=0;const dt=[];for(const Ye of a.params)dt.push(Ye.name),Object.hasOwn(re,Ye.name)?(Xe+=1,n[a.partName][Ye.name]===re[Ye.name]?rt+=1:Cl(qe,n[a.partName][Ye.name]=re[Ye.name],n)):Ge+=1;let Ke=0;for(const Ye of Object.keys(re))dt.includes(Ye)||(Ke+=1,Ne+=`warn363: parameter ${Ye} not in the scope of the design (${Ke})
3
- `);const De=Ke>0;return Ne+=`Params loaded at ${new Date().toLocaleTimeString()} :`,Ne+=` def-nb: ${Object.keys(a.params).length}`,Ne+=`, cover-nb: ${Xe}, uncover-nb: ${Ge}
4
- `,Ne+=` load-nb: ${Object.keys(re).length}`,Ne+=`, equal-nb: ${rt}, changed-nb: ${Xe-rt}`,Ne+=`, out-of-scope: ${Ke}`,[Ne,ze||De]}let d="",m=!1;function p(){{const R=new URLSearchParams(o.url.search),re={};for(const[Ne,ze]of R){const Xe=Number(ze);isNaN(Xe)||(re[Ne]=Xe)}Object.keys(re).length>0&&l(6,[d,m]=N(a.partName,re),d,l(7,m))}}function D(){p(),_()}Ot(()=>{D()});function k(R){try{const[re]=jl(R);l(6,[d,m]=N(re.partName,re.pVal),d,l(7,m)),l(5,h=re.comment),_()}catch(re){let Ne=`err723: error by parsing parameter file
5
- `;Ne+=re,l(6,d=Ne),l(7,m=!0)}}async function C(R){const re=await R.text();k(re)}function I(R){if(R.target){const re=R.target.files;re&&C(re[0])}}function T(){hl(a.partName,n[a.partName],h)}let F=!1,E=!1,M=!1,w=!1;function O(){const R={};for(const re of a.params)R[re.name]=re.init;l(6,[d,m]=N(a.partName,R),d,l(7,m))}let L;function H(){if(L!==void 0&&L!==""){const R=`${a.partName}_${L}`;{const re=window.localStorage.getItem(R);re===null?(l(6,d=`Warn157: localStorage key ${R} is null`),l(7,m=!0)):k(re)}}else l(6,d="Warn239: No valid name for loading from localStorage!"),l(7,m=!0)}let V;function W(){if(V!==void 0&&V!==""){const R=`${a.partName}_${V}`,re=/\..*$/,ze=fl(new Date().toISOString().replace(re,""),a.partName,n[a.partName],h);window.localStorage.setItem(R,ze)}else console.log("Warn639: No valid name for writing to localStorage!")}let A="";function X(){return _n(o.url.href,n[a.partName],!1).toString()}function ae(){l(14,A=X()),l(10,M=!0)}let ne=`${_t}/pgdsvg/default_param_blank.svg`;function Q(R){l(15,ne=`${_t}/pgdsvg/default_param_blank.svg`),Object.keys(a.paramSvg).includes(R)&&l(15,ne=`${_t}/pgdsvg/${a.paramSvg[R]}`)}let fe="";function me(R,re){if(fe!==a.partName){const Ne=Object.keys(n[re]).length;R<Ne&&Q(Object.keys(n[re])[R])}}let he=!1;function be(){l(16,he=!0)}function U(R){const re=[];let ze={sectionName:"main",sectionID:"g0main",sectionVisible:!1,params:[]},Xe=0;for(const Ge of R)Ge.pType===bt.eSectionSeparator?(re.push(ze),Xe+=1,ze={sectionName:Ge.name,sectionID:`g${Xe}${Ge.name}`,sectionVisible:!0,params:[]}):ze.params.push(Ge);return re.push(ze),re}let z,ee;const B=()=>{l(8,F=!0)},oe=()=>{l(9,E=!0)};function K(R){F=R,l(8,F)}function y(R){L=R,l(12,L)}function te(R){E=R,l(9,E)}function $(R){ee[R.sectionID]=this.checked,l(17,ee),l(0,a),l(28,fe),l(4,z)}const le=R=>Q(R.name);function se(R){n[a.partName][R.name]=mt(this.value),qe.set(n)}function J(R){n[a.partName][R.name]=mt(this.value),qe.set(n)}function de(R){n[a.partName][R.name]=kt(this),qe.set(n)}function Fe(R){n[a.partName][R.name]=kt(this),qe.set(n)}function Ee(){h=this.value,l(5,h)}const Ie=()=>{l(11,w=!0)};function Se(R){M=R,l(10,M)}function Ze(R){V=R,l(13,V)}function Je(R){w=R,l(11,w)}function xe(R){he=R,l(16,he)}return t.$$set=R=>{"pDef"in R&&l(0,a=R.pDef),"fgeom"in R&&l(1,c=R.fgeom),"selFace"in R&&l(2,u=R.selFace),"simTime"in R&&l(3,i=R.simTime)},t.$$.update=()=>{t.$$.dirty[0]&1&&me(0,a.partName),t.$$.dirty[0]&268435473&&(l(4,z=U(a.params)),fe!==a.partName&&(l(28,fe=a.partName),l(17,ee=Ln(z))))},[a,c,u,i,z,h,d,m,F,E,M,w,L,V,A,ne,he,ee,n,_,I,T,O,H,W,ae,Q,be,fe,B,oe,K,y,te,$,le,se,J,de,Fe,Ee,Ie,Se,Ze,Je,xe]}class In extends Me{constructor(e){super(),Ae(this,e,Sn,En,ye,{pDef:0,fgeom:1,selFace:2,simTime:3},null,[-1,-1,-1])}}function Pn(t){let e,l,n="0",o,s,a="<-",c,u,i="|<",h,_,N="||",d,m,p=">|",D,k,C="->",I,T,F,E,M,w;return{c(){e=g("nav"),l=g("button"),l.textContent=n,o=P(),s=g("button"),s.textContent=a,c=P(),u=g("button"),u.textContent=i,h=P(),_=g("button"),_.textContent=N,d=P(),m=g("button"),m.textContent=p,D=P(),k=g("button"),k.textContent=C,I=P(),T=g("input"),F=P(),E=g("input"),this.h()},l(O){e=v(O,"NAV",{class:!0});var L=S(e);l=v(L,"BUTTON",{class:!0,"data-svelte-h":!0}),ie(l)!=="svelte-sw7vi1"&&(l.textContent=n),o=j(L),s=v(L,"BUTTON",{class:!0,"data-svelte-h":!0}),ie(s)!=="svelte-gbiqvp"&&(s.textContent=a),c=j(L),u=v(L,"BUTTON",{class:!0,"data-svelte-h":!0}),ie(u)!=="svelte-10nqggx"&&(u.textContent=i),h=j(L),_=v(L,"BUTTON",{class:!0,"data-svelte-h":!0}),ie(_)!=="svelte-1xmh6xn"&&(_.textContent=N),d=j(L),m=v(L,"BUTTON",{class:!0,"data-svelte-h":!0}),ie(m)!=="svelte-1wuqlom"&&(m.textContent=p),D=j(L),k=v(L,"BUTTON",{class:!0,"data-svelte-h":!0}),ie(k)!=="svelte-1vey426"&&(k.textContent=C),I=j(L),T=v(L,"INPUT",{type:!0,min:!0,max:!0,step:!0,class:!0}),F=j(L),E=v(L,"INPUT",{type:!0,min:!0,max:!0,step:!0,class:!0}),L.forEach(b),this.h()},h(){f(l,"class","svelte-uw6ahn"),f(s,"class","svelte-uw6ahn"),f(u,"class","svelte-uw6ahn"),f(_,"class","svelte-uw6ahn"),f(m,"class","svelte-uw6ahn"),f(k,"class","svelte-uw6ahn"),f(T,"type","range"),f(T,"min","0"),f(T,"max",t[1]),f(T,"step",t[2]),f(T,"class","svelte-uw6ahn"),f(E,"type","number"),f(E,"min","0"),f(E,"max",t[1]),f(E,"step",t[2]),f(E,"class","svelte-uw6ahn"),f(e,"class","svelte-uw6ahn")},m(O,L){x(O,e,L),r(e,l),r(e,o),r(e,s),r(e,c),r(e,u),r(e,h),r(e,_),r(e,d),r(e,m),r(e,D),r(e,k),r(e,I),r(e,T),pe(T,t[0]),r(e,F),r(e,E),pe(E,t[0]),M||(w=[Y(l,"click",t[3]),Y(s,"click",t[6]),Y(u,"click",t[4]),Y(_,"click",t[8]),Y(m,"click",t[5]),Y(k,"click",t[7]),Y(T,"change",t[10]),Y(T,"input",t[10]),Y(E,"input",t[11])],M=!0)},p(O,[L]){L&2&&f(T,"max",O[1]),L&4&&f(T,"step",O[2]),L&1&&pe(T,O[0]),L&2&&f(E,"max",O[1]),L&4&&f(E,"step",O[2]),L&1&&mt(E.value)!==O[0]&&pe(E,O[0])},i:Ue,o:Ue,d(O){O&&b(e),M=!1,We(w)}}}const Gt=4;function jn(t,e,l){let{tMax:n=10}=e,{tStep:o=.1}=e,{tUpdate:s=500}=e,{simTime:a=0}=e,c=null,u=0,i;function h(){c!==null&&(clearInterval(c),c=null)}function _(){i<0&&a<=0?l(0,a=n):i>0&&a>=n?l(0,a=0):l(0,a+=i)}function N(){const F=s/2**(Math.abs(u)-1);i=u<0?-o:o,c=setInterval(_,F)}function d(){h(),l(0,a=0),u=0}function m(){h(),u=0,i=-o,_()}function p(){h(),u=0,i=o,_()}function D(){h(),u=Math.max(u-1,-Gt),N()}function k(){h(),u=Math.min(u+1,Gt),N()}function C(){h(),u=0}El(()=>{});function I(){a=mt(this.value),l(0,a)}function T(){a=mt(this.value),l(0,a)}return t.$$set=F=>{"tMax"in F&&l(1,n=F.tMax),"tStep"in F&&l(2,o=F.tStep),"tUpdate"in F&&l(9,s=F.tUpdate),"simTime"in F&&l(0,a=F.simTime)},[a,n,o,d,m,p,D,k,C,s,I,T]}class Un extends Me{constructor(e){super(),Ae(this,e,jn,Pn,ye,{tMax:1,tStep:2,tUpdate:9,simTime:0})}}function yn(t){let e,l,n='<div class="zero svelte-c549k7"></div>',o,s,a='<div class="zoomin svelte-c549k7"></div>',c,u,i='<div class="zoomout svelte-c549k7"></div>',h,_,N='<div class="arrowleft svelte-c549k7"></div>',d,m,p='<div class="arrowright svelte-c549k7"></div>',D,k,C='<div class="arrowup svelte-c549k7"></div>',I,T,F='<div class="arrowdown svelte-c549k7"></div>',E,M;return{c(){e=g("nav"),l=g("button"),l.innerHTML=n,o=P(),s=g("button"),s.innerHTML=a,c=P(),u=g("button"),u.innerHTML=i,h=P(),_=g("button"),_.innerHTML=N,d=P(),m=g("button"),m.innerHTML=p,D=P(),k=g("button"),k.innerHTML=C,I=P(),T=g("button"),T.innerHTML=F,this.h()},l(w){e=v(w,"NAV",{class:!0});var O=S(e);l=v(O,"BUTTON",{class:!0,"data-svelte-h":!0}),ie(l)!=="svelte-nkdg6y"&&(l.innerHTML=n),o=j(O),s=v(O,"BUTTON",{class:!0,"data-svelte-h":!0}),ie(s)!=="svelte-nbpwn1"&&(s.innerHTML=a),c=j(O),u=v(O,"BUTTON",{class:!0,"data-svelte-h":!0}),ie(u)!=="svelte-toyuqt"&&(u.innerHTML=i),h=j(O),_=v(O,"BUTTON",{class:!0,"data-svelte-h":!0}),ie(_)!=="svelte-vbdqb3"&&(_.innerHTML=N),d=j(O),m=v(O,"BUTTON",{class:!0,"data-svelte-h":!0}),ie(m)!=="svelte-a55vyt"&&(m.innerHTML=p),D=j(O),k=v(O,"BUTTON",{class:!0,"data-svelte-h":!0}),ie(k)!=="svelte-ky9277"&&(k.innerHTML=C),I=j(O),T=v(O,"BUTTON",{class:!0,"data-svelte-h":!0}),ie(T)!=="svelte-1obyap9"&&(T.innerHTML=F),O.forEach(b),this.h()},h(){f(l,"class","svelte-c549k7"),f(s,"class","svelte-c549k7"),f(u,"class","svelte-c549k7"),f(_,"class","svelte-c549k7"),f(m,"class","svelte-c549k7"),f(k,"class","svelte-c549k7"),f(T,"class","svelte-c549k7"),f(e,"class","svelte-c549k7")},m(w,O){x(w,e,O),r(e,l),r(e,o),r(e,s),r(e,c),r(e,u),r(e,h),r(e,_),r(e,d),r(e,m),r(e,D),r(e,k),r(e,I),r(e,T),E||(M=[Y(l,"click",t[1]),Y(s,"click",t[2]),Y(u,"click",t[3]),Y(_,"click",t[4]),Y(m,"click",t[5]),Y(k,"click",t[6]),Y(T,"click",t[7])],E=!0)},p:Ue,i:Ue,o:Ue,d(w){w&&b(e),E=!1,We(M)}}}function Mn(t){const e=il();function l(h){e("myevent",{action:h})}return[l,()=>l("zoomInit"),()=>l("zoomIn"),()=>l("zoomOut"),()=>l("moveLeft"),()=>l("moveRight"),()=>l("moveUp"),()=>l("moveDown")]}class An extends Me{constructor(e){super(),Ae(this,e,Mn,yn,ye,{})}}function Fn(t){let e,l,n,o,s,a,c,u,i,h,_,N,d,m,p,D,k,C,I,T,F,E,M,w,O,L,H,V,W,A,X,ae,ne,Q,fe,me,he,be,U,z,ee,B;return{c(){e=g("div"),l=g("label"),n=g("input"),o=q("main part"),s=P(),a=g("label"),c=g("input"),u=q("main skeleton"),i=P(),h=g("label"),_=g("input"),N=q("second parts"),d=P(),m=g("label"),p=g("input"),D=q("second skeletons"),k=P(),C=g("label"),I=g("input"),T=q("dynamics"),F=P(),E=g("label"),M=g("input"),w=q("ruler"),O=P(),L=g("label"),H=g("input"),V=q("frame of reference"),W=P(),A=g("label"),X=g("input"),ae=q("points"),ne=P(),Q=g("label"),fe=g("input"),me=q("lines"),he=P(),be=g("label"),U=g("input"),z=q("vectors"),this.h()},l(oe){e=v(oe,"DIV",{class:!0});var K=S(e);l=v(K,"LABEL",{class:!0});var y=S(l);n=v(y,"INPUT",{type:!0,class:!0}),o=G(y,"main part"),y.forEach(b),s=j(K),a=v(K,"LABEL",{class:!0});var te=S(a);c=v(te,"INPUT",{type:!0,class:!0}),u=G(te,"main skeleton"),te.forEach(b),i=j(K),h=v(K,"LABEL",{class:!0});var $=S(h);_=v($,"INPUT",{type:!0,class:!0}),N=G($,"second parts"),$.forEach(b),d=j(K),m=v(K,"LABEL",{class:!0});var le=S(m);p=v(le,"INPUT",{type:!0,class:!0}),D=G(le,"second skeletons"),le.forEach(b),k=j(K),C=v(K,"LABEL",{class:!0});var se=S(C);I=v(se,"INPUT",{type:!0,class:!0}),T=G(se,"dynamics"),se.forEach(b),F=j(K),E=v(K,"LABEL",{class:!0});var J=S(E);M=v(J,"INPUT",{type:!0,class:!0}),w=G(J,"ruler"),J.forEach(b),O=j(K),L=v(K,"LABEL",{class:!0});var de=S(L);H=v(de,"INPUT",{type:!0,class:!0}),V=G(de,"frame of reference"),de.forEach(b),W=j(K),A=v(K,"LABEL",{class:!0});var Fe=S(A);X=v(Fe,"INPUT",{type:!0,class:!0}),ae=G(Fe,"points"),Fe.forEach(b),ne=j(K),Q=v(K,"LABEL",{class:!0});var Ee=S(Q);fe=v(Ee,"INPUT",{type:!0,class:!0}),me=G(Ee,"lines"),Ee.forEach(b),he=j(K),be=v(K,"LABEL",{class:!0});var Ie=S(be);U=v(Ie,"INPUT",{type:!0,class:!0}),z=G(Ie,"vectors"),Ie.forEach(b),K.forEach(b),this.h()},h(){f(n,"type","checkbox"),f(n,"class","svelte-1rsbkj"),f(l,"class","svelte-1rsbkj"),f(c,"type","checkbox"),f(c,"class","svelte-1rsbkj"),f(a,"class","svelte-1rsbkj"),f(_,"type","checkbox"),f(_,"class","svelte-1rsbkj"),f(h,"class","svelte-1rsbkj"),f(p,"type","checkbox"),f(p,"class","svelte-1rsbkj"),f(m,"class","svelte-1rsbkj"),f(I,"type","checkbox"),f(I,"class","svelte-1rsbkj"),f(C,"class","svelte-1rsbkj"),f(M,"type","checkbox"),f(M,"class","svelte-1rsbkj"),f(E,"class","svelte-1rsbkj"),f(H,"type","checkbox"),f(H,"class","svelte-1rsbkj"),f(L,"class","svelte-1rsbkj"),f(X,"type","checkbox"),f(X,"class","svelte-1rsbkj"),f(A,"class","svelte-1rsbkj"),f(fe,"type","checkbox"),f(fe,"class","svelte-1rsbkj"),f(Q,"class","svelte-1rsbkj"),f(U,"type","checkbox"),f(U,"class","svelte-1rsbkj"),f(be,"class","svelte-1rsbkj"),f(e,"class","svelte-1rsbkj")},m(oe,K){x(oe,e,K),r(e,l),r(l,n),n.checked=t[0].main,r(l,o),r(e,s),r(e,a),r(a,c),c.checked=t[0].mainB,r(a,u),r(e,i),r(e,h),r(h,_),_.checked=t[0].second,r(h,N),r(e,d),r(e,m),r(m,p),p.checked=t[0].secondB,r(m,D),r(e,k),r(e,C),r(C,I),I.checked=t[0].dynamics,r(C,T),r(e,F),r(e,E),r(E,M),M.checked=t[0].ruler,r(E,w),r(e,O),r(e,L),r(L,H),H.checked=t[0].refframe,r(L,V),r(e,W),r(e,A),r(A,X),X.checked=t[0].points,r(A,ae),r(e,ne),r(e,Q),r(Q,fe),fe.checked=t[0].lines,r(Q,me),r(e,he),r(e,be),r(be,U),U.checked=t[0].vectors,r(be,z),ee||(B=[Y(n,"change",t[1]),Y(c,"change",t[2]),Y(_,"change",t[3]),Y(p,"change",t[4]),Y(I,"change",t[5]),Y(M,"change",t[6]),Y(H,"change",t[7]),Y(X,"change",t[8]),Y(fe,"change",t[9]),Y(U,"change",t[10])],ee=!0)},p(oe,[K]){K&1&&(n.checked=oe[0].main),K&1&&(c.checked=oe[0].mainB),K&1&&(_.checked=oe[0].second),K&1&&(p.checked=oe[0].secondB),K&1&&(I.checked=oe[0].dynamics),K&1&&(M.checked=oe[0].ruler),K&1&&(H.checked=oe[0].refframe),K&1&&(X.checked=oe[0].points),K&1&&(fe.checked=oe[0].lines),K&1&&(U.checked=oe[0].vectors)},i:Ue,o:Ue,d(oe){oe&&b(e),ee=!1,We(B)}}}function zn(t,e,l){let n;nt(t,Re,m=>l(0,n=m));function o(){n.main=this.checked,Re.set(n)}function s(){n.mainB=this.checked,Re.set(n)}function a(){n.second=this.checked,Re.set(n)}function c(){n.secondB=this.checked,Re.set(n)}function u(){n.dynamics=this.checked,Re.set(n)}function i(){n.ruler=this.checked,Re.set(n)}function h(){n.refframe=this.checked,Re.set(n)}function _(){n.points=this.checked,Re.set(n)}function N(){n.lines=this.checked,Re.set(n)}function d(){n.vectors=this.checked,Re.set(n)}return[n,o,s,a,c,u,i,h,_,N,d]}class Bn extends Me{constructor(e){super(),Ae(this,e,zn,Fn,ye,{})}}function Zt(t,e,l){const n=t.slice();return n[36]=e[l],n}function Jt(t){let e,l=t[36]+"",n,o;return{c(){e=g("option"),n=q(l),this.h()},l(s){e=v(s,"OPTION",{});var a=S(e);n=G(a,l),a.forEach(b),this.h()},h(){e.__value=o=t[36],pe(e,e.__value)},m(s,a){x(s,e,a),r(e,n)},p(s,a){a[0]&8&&l!==(l=s[36]+"")&&_e(n,l),a[0]&8&&o!==(o=s[36])&&(e.__value=o,pe(e,e.__value))},d(s){s&&b(e)}}}function Rn(t){let e,l,n,o,s,a,c,u,i,h,_,N,d,m,p,D,k,C,I,T,F,E;pt(t[19]);let M=ke(t[3]),w=[];for(let H=0;H<M.length;H+=1)w[H]=Jt(Zt(t,M,H));u=new Bn({});function O(H){t[22](H)}let L={tMax:t[2].sim.tMax,tStep:t[2].sim.tStep,tUpdate:t[2].sim.tUpdate};return t[1]!==void 0&&(L.simTime=t[1]),d=new Un({props:L}),Le.push(()=>je(d,"simTime",O)),I=new An({}),I.$on("myevent",t[8]),{c(){e=g("section"),l=g("h2"),n=q(`Drawing
6
- `),o=g("select");for(let H=0;H<w.length;H+=1)w[H].c();s=g("option"),a=q("All faces merged"),c=P(),Te(u.$$.fragment),i=P(),h=g("div"),_=g("canvas"),N=P(),Te(d.$$.fragment),p=P(),D=g("div"),k=g("canvas"),C=P(),Te(I.$$.fragment),this.h()},l(H){e=v(H,"SECTION",{class:!0});var V=S(e);l=v(V,"H2",{class:!0});var W=S(l);n=G(W,`Drawing
7
- `),o=v(W,"SELECT",{class:!0});var A=S(o);for(let Q=0;Q<w.length;Q+=1)w[Q].l(A);s=v(A,"OPTION",{});var X=S(s);a=G(X,"All faces merged"),X.forEach(b),A.forEach(b),W.forEach(b),c=j(V),we(u.$$.fragment,V),i=j(V),h=v(V,"DIV",{class:!0});var ae=S(h);_=v(ae,"CANVAS",{class:!0,width:!0,height:!0}),S(_).forEach(b),N=j(ae),we(d.$$.fragment,ae),ae.forEach(b),p=j(V),D=v(V,"DIV",{class:!0});var ne=S(D);k=v(ne,"CANVAS",{class:!0,width:!0,height:!0}),S(k).forEach(b),C=j(ne),we(I.$$.fragment,ne),ne.forEach(b),V.forEach(b),this.h()},h(){s.__value=_l,pe(s,s.__value),f(o,"class","svelte-s85el8"),t[0]===void 0&&pt(()=>t[20].call(o)),f(l,"class","svelte-s85el8"),f(_,"class","full svelte-s85el8"),f(_,"width",ot),f(_,"height",ot),f(h,"class","rack svelte-s85el8"),f(k,"class","zoom svelte-s85el8"),f(k,"width",ot),f(k,"height",ot),f(D,"class","rack svelte-s85el8"),f(e,"class","svelte-s85el8")},m(H,V){x(H,e,V),r(e,l),r(l,n),r(l,o);for(let W=0;W<w.length;W+=1)w[W]&&w[W].m(o,null);r(o,s),r(s,a),st(o,t[0],!0),r(e,c),Oe(u,e,null),r(e,i),r(e,h),r(h,_),t[21](_),r(h,N),Oe(d,h,null),r(e,p),r(e,D),r(D,k),t[23](k),r(D,C),Oe(I,D,null),T=!0,F||(E=[Y(window,"resize",t[7]),Y(window,"resize",t[19]),Y(o,"change",t[20]),Y(_,"mousedown",t[9]),Y(_,"mouseup",t[10]),Y(_,"mousemove",t[11]),Y(k,"mousedown",t[12]),Y(k,"mousemove",t[13]),Y(k,"wheel",Dl(t[14]))],F=!0)},p(H,V){if(V[0]&8){M=ke(H[3]);let A;for(A=0;A<M.length;A+=1){const X=Zt(H,M,A);w[A]?w[A].p(X,V):(w[A]=Jt(X),w[A].c(),w[A].m(o,s))}for(;A<w.length;A+=1)w[A].d(1);w.length=M.length}V[0]&9&&st(o,H[0]);const W={};V[0]&4&&(W.tMax=H[2].sim.tMax),V[0]&4&&(W.tStep=H[2].sim.tStep),V[0]&4&&(W.tUpdate=H[2].sim.tUpdate),!m&&V[0]&2&&(m=!0,W.simTime=H[1],Pe(()=>m=!1)),d.$set(W)},i(H){T||(ge(u.$$.fragment,H),ge(d.$$.fragment,H),ge(I.$$.fragment,H),T=!0)},o(H){ve(u.$$.fragment,H),ve(d.$$.fragment,H),ve(I.$$.fragment,H),T=!1},d(H){H&&b(e),Ve(w,H),Ce(u),t[21](null),Ce(d),t[23](null),Ce(I),F=!1,We(E)}}}const _l="ParametrixAll",ot=400,Hn=3e3,vt=10,Qt=3;function Vn(t,e){let l=e;if(t.length===0)console.log("warn404: Drawing has an empty face list");else{const n=t.slice();n.push(_l),n.includes(l)||(l=t[0])}return l}function Wn(t,e,l){let n,o;nt(t,Re,U=>l(17,n=U)),nt(t,qe,U=>l(18,o=U));let{pDef:s}=e,{fgeom:a}=e,{optFaces:c}=e,{selFace:u}=e,{simTime:i=0}=e,h,_,N,d,m,p;function D(U){const z=_.getContext("2d");z.clearRect(0,0,z.canvas.width,z.canvas.height);try{m=d.getAdjustFull(z.canvas.width,z.canvas.height),d.draw(z,m,U)}catch(ee){console.log(ee)}}function k(U){const z=N.getContext("2d");z.clearRect(0,0,z.canvas.width,z.canvas.height);try{(p===void 0||p.init===0)&&(p=d.getAdjustZoom(z.canvas.width,z.canvas.height)),d.draw(z,p,U)}catch(ee){console.log(ee)}}function C(){const U=_.getContext("2d"),z=Math.max(.4*h,ot);U.canvas.width=z,U.canvas.height=z}function I(){C(),D(n),k(n)}let T=0;function F(U,z,ee,B){const oe=a(U,z).fig,K=Object.keys(oe),y=Vn(K,ee);l(0,u=y),K.includes(y)?d=oe[y]:d=cl(oe),D(B),k(B)}function E(U,z){F(U,o[s.partName],z,n)}Ot(()=>{C(),E(i,u),l(16,T=1)});function M(U){switch(U.detail.action){case"zoomInit":p.init=0;break;case"zoomIn":p=gt(.7,p);break;case"zoomOut":p=gt(1.3,p);break;case"moveLeft":p.xMin+=-.2*p.xyDiff;break;case"moveRight":p.xMin+=.2*p.xyDiff;break;case"moveUp":p.yMin+=.2*p.xyDiff;break;case"moveDown":p.yMin+=-.2*p.xyDiff;break;default:console.log(`ERR423: ${U.detail.action} has no case!`)}k(n)}let w={timestamp:0,offsetX:0,offsetY:0};function O(U){U.button===0&&(w.timestamp=Date.now(),w.offsetX=U.offsetX,w.offsetY=U.offsetY)}function L(U){if(U.button===0)if(Date.now()-w.timestamp<Hn){const z=Math.abs(w.offsetX-U.offsetX),ee=Math.abs(w.offsetY-U.offsetY);if(z<vt&&ee<vt){const[B,oe]=at(U.offsetX,U.offsetY,m);p=Ul(B,oe,p),E(i,u)}if(z>vt&&ee>vt){const B=z/ee,oe=1/B;if(B<Qt&&oe<Qt){const[K,y]=at(U.offsetX,U.offsetY,m),[te,$]=at(w.offsetX,w.offsetY,m);p=yl(K,y,te,$,ot,ot),E(i,u)}}}else console.log(`Warn205: ignore ${U.offsetX} ${U.offsetY} because too slow`)}function H(U){const z=_.getContext("2d");if(U.buttons===1){const ee=U.offsetX-w.offsetX,B=U.offsetY-w.offsetY;D(n),z.beginPath(),z.rect(w.offsetX,w.offsetY,ee,B),z.strokeStyle=Tt.mouse,z.stroke()}if(n.ruler){const[ee,B]=at(U.offsetX,U.offsetY,m);z.clearRect(5,5,200,25),z.font="15px Arial",z.fillStyle=Tt.ruler,z.fillText(`x: ${ee.toFixed(4)} y: ${B.toFixed(4)}`,5,20)}}let V,W,A;function X(U){if(U.button===0){const[z,ee]=at(U.offsetX,U.offsetY,p);V=z,W=ee,A=structuredClone(p)}}function ae(U){if(U.buttons===1){const[z,ee]=at(U.offsetX,U.offsetY,A);p=Ml(V,W,z,ee,A),k(n)}else if(n.ruler){const z=N.getContext("2d"),[ee,B]=at(U.offsetX,U.offsetY,p);z.clearRect(5,5,200,25),z.font="15px Arial",z.fillStyle=Tt.ruler,z.fillText(`x: ${ee.toFixed(4)} y: ${B.toFixed(4)}`,5,20)}}function ne(U){U.deltaY>0?p=gt(.7,p):p=gt(1.3,p),k(n)}function Q(){l(4,h=window.innerWidth)}function fe(){u=kt(this),l(0,u),l(3,c)}function me(U){Le[U?"unshift":"push"](()=>{_=U,l(5,_)})}function he(U){i=U,l(1,i)}function be(U){Le[U?"unshift":"push"](()=>{N=U,l(6,N)})}return t.$$set=U=>{"pDef"in U&&l(2,s=U.pDef),"fgeom"in U&&l(15,a=U.fgeom),"optFaces"in U&&l(3,c=U.optFaces),"selFace"in U&&l(0,u=U.selFace),"simTime"in U&&l(1,i=U.simTime)},t.$$.update=()=>{t.$$.dirty[0]&458759&&T===1&&F(i,o[s.partName],u,n)},[u,i,s,c,h,_,N,I,M,O,L,H,X,ae,ne,a,T,n,o,Q,fe,me,he,be]}class Xn extends Me{constructor(e){super(),Ae(this,e,Wn,Rn,ye,{pDef:2,fgeom:15,optFaces:3,selFace:0,simTime:1},null,[-1,-1])}}function $t(t,e,l){const n=t.slice();return n[10]=e[l],n}function xt(t,e,l){const n=t.slice();return n[13]=e[l],n[15]=l,n}function el(t){let e,l,n=t[15]+1+"",o,s,a,c=t[13]+"",u,i,h,_=t[0][t[10]].dparam[t[13]].val+"",N,d,m,p,D=t[0][t[10]].dparam[t[13]].init+"",k,C,I,T,F=ll(t[0][t[10]].dparam[t[13]].chg)+"",E,M;return{c(){e=g("tr"),l=g("td"),o=q(n),s=P(),a=g("td"),u=q(c),i=P(),h=g("td"),N=q(_),d=P(),m=g("td"),p=g("i"),k=q(D),C=P(),I=g("td"),T=g("i"),E=q(F),M=P(),this.h()},l(w){e=v(w,"TR",{class:!0});var O=S(e);l=v(O,"TD",{});var L=S(l);o=G(L,n),L.forEach(b),s=j(O),a=v(O,"TD",{});var H=S(a);u=G(H,c),H.forEach(b),i=j(O),h=v(O,"TD",{});var V=S(h);N=G(V,_),V.forEach(b),d=j(O),m=v(O,"TD",{});var W=S(m);p=v(W,"I",{});var A=S(p);k=G(A,D),A.forEach(b),W.forEach(b),C=j(O),I=v(O,"TD",{});var X=S(I);T=v(X,"I",{});var ae=S(T);E=G(ae,F),ae.forEach(b),X.forEach(b),M=j(O),O.forEach(b),this.h()},h(){f(e,"class","svelte-lzdpo0"),Be(e,"changed",t[0][t[10]].dparam[t[13]].chg)},m(w,O){x(w,e,O),r(e,l),r(l,o),r(e,s),r(e,a),r(a,u),r(e,i),r(e,h),r(h,N),r(e,d),r(e,m),r(m,p),r(p,k),r(e,C),r(e,I),r(I,T),r(T,E),r(e,M)},p(w,O){O&5&&c!==(c=w[13]+"")&&_e(u,c),O&5&&_!==(_=w[0][w[10]].dparam[w[13]].val+"")&&_e(N,_),O&5&&D!==(D=w[0][w[10]].dparam[w[13]].init+"")&&_e(k,D),O&5&&F!==(F=ll(w[0][w[10]].dparam[w[13]].chg)+"")&&_e(E,F),O&5&&Be(e,"changed",w[0][w[10]].dparam[w[13]].chg)},d(w){w&&b(e)}}}function tl(t){let e,l,n,o,s,a,c,u=t[10]+"",i,h,_,N,d,m=t[1][t[0][t[10]].partName]+"",p,D,k,C="Export parameters",I,T,F,E=Object.keys(t[0][t[10]].dparam).length+"",M,w,O,L=t[0][t[10]].partName+"",H,V,W=t[5](t[0][t[10]].orientation)+"",A,X,ae=t[6](t[0][t[10]].position)+"",ne,Q,fe,me,he,be="<tr><td>Num</td> <td>Name</td> <td>Value</td> <td>Init</td> <td>Set?</td></tr>",U,z,ee,B,oe;function K(){return t[8](t[10])}function y(){return t[9](t[10])}let te=ke(Object.keys(t[0][t[10]].dparam)),$=[];for(let le=0;le<te.length;le+=1)$[le]=el(xt(t,te,le));return{c(){e=g("li"),l=g("input"),o=P(),s=g("label"),a=g("div"),c=P(),i=q(u),_=P(),N=g("button"),d=q("Go to "),p=q(m),D=P(),k=g("button"),k.textContent=C,I=P(),T=g("div"),F=g("article"),M=q(E),w=q(` parameters of
8
- `),O=g("strong"),H=q(L),V=q(`
9
- with orientation `),A=q(W),X=q(` (degree) at position
10
- `),ne=q(ae),Q=q(" (mm)"),fe=P(),me=g("table"),he=g("thead"),he.innerHTML=be,U=P(),z=g("tbody");for(let le=0;le<$.length;le+=1)$[le].c();ee=P(),this.h()},l(le){e=v(le,"LI",{class:!0});var se=S(e);l=v(se,"INPUT",{type:!0,id:!0,class:!0}),o=j(se),s=v(se,"LABEL",{for:!0,class:!0});var J=S(s);a=v(J,"DIV",{class:!0}),S(a).forEach(b),c=j(J),i=G(J,u),J.forEach(b),_=j(se),N=v(se,"BUTTON",{class:!0});var de=S(N);d=G(de,"Go to "),p=G(de,m),de.forEach(b),D=j(se),k=v(se,"BUTTON",{class:!0,"data-svelte-h":!0}),ie(k)!=="svelte-circu6"&&(k.textContent=C),I=j(se),T=v(se,"DIV",{class:!0});var Fe=S(T);F=v(Fe,"ARTICLE",{class:!0});var Ee=S(F);M=G(Ee,E),w=G(Ee,` parameters of
11
- `),O=v(Ee,"STRONG",{});var Ie=S(O);H=G(Ie,L),Ie.forEach(b),V=G(Ee,`
12
- with orientation `),A=G(Ee,W),X=G(Ee,` (degree) at position
13
- `),ne=G(Ee,ae),Q=G(Ee," (mm)"),Ee.forEach(b),fe=j(Fe),me=v(Fe,"TABLE",{class:!0});var Se=S(me);he=v(Se,"THEAD",{class:!0,"data-svelte-h":!0}),ie(he)!=="svelte-nhorjb"&&(he.innerHTML=be),U=j(Se),z=v(Se,"TBODY",{class:!0});var Ze=S(z);for(let Je=0;Je<$.length;Je+=1)$[Je].l(Ze);Ze.forEach(b),Se.forEach(b),Fe.forEach(b),ee=j(se),se.forEach(b),this.h()},h(){f(l,"type","checkbox"),f(l,"id",n="cb_"+t[10]),f(l,"class","toggle svelte-lzdpo0"),l.checked=!1,f(a,"class","arrow svelte-lzdpo0"),f(s,"for",h="cb_"+t[10]),f(s,"class","label svelte-lzdpo0"),f(N,"class","svelte-lzdpo0"),f(k,"class","svelte-lzdpo0"),f(F,"class","svelte-lzdpo0"),f(he,"class","svelte-lzdpo0"),f(z,"class","svelte-lzdpo0"),f(me,"class","svelte-lzdpo0"),f(T,"class","nested svelte-lzdpo0"),f(e,"class","svelte-lzdpo0")},m(le,se){x(le,e,se),r(e,l),r(e,o),r(e,s),r(s,a),r(s,c),r(s,i),r(e,_),r(e,N),r(N,d),r(N,p),r(e,D),r(e,k),r(e,I),r(e,T),r(T,F),r(F,M),r(F,w),r(F,O),r(O,H),r(F,V),r(F,A),r(F,X),r(F,ne),r(F,Q),r(T,fe),r(T,me),r(me,he),r(me,U),r(me,z);for(let J=0;J<$.length;J+=1)$[J]&&$[J].m(z,null);r(e,ee),B||(oe=[Y(N,"click",K),Y(k,"click",y)],B=!0)},p(le,se){if(t=le,se&4&&n!==(n="cb_"+t[10])&&f(l,"id",n),se&4&&u!==(u=t[10]+"")&&_e(i,u),se&4&&h!==(h="cb_"+t[10])&&f(s,"for",h),se&7&&m!==(m=t[1][t[0][t[10]].partName]+"")&&_e(p,m),se&5&&E!==(E=Object.keys(t[0][t[10]].dparam).length+"")&&_e(M,E),se&5&&L!==(L=t[0][t[10]].partName+"")&&_e(H,L),se&5&&W!==(W=t[5](t[0][t[10]].orientation)+"")&&_e(A,W),se&5&&ae!==(ae=t[6](t[0][t[10]].position)+"")&&_e(ne,ae),se&5){te=ke(Object.keys(t[0][t[10]].dparam));let J;for(J=0;J<te.length;J+=1){const de=xt(t,te,J);$[J]?$[J].p(de,se):($[J]=el(de),$[J].c(),$[J].m(z,null))}for(;J<$.length;J+=1)$[J].d(1);$.length=te.length}},d(le){le&&b(e),Ve($,le),B=!1,We(oe)}}}function Kn(t){let e,l,n,o,s,a=t[2].length+"",c,u,i,h,_=ke(t[2]),N=[];for(let d=0;d<_.length;d+=1)N[d]=tl($t(t,_,d));return{c(){e=g("section"),l=g("h2"),n=q(`Sub-designs
14
- `),o=g("span"),s=q("(Number of sub-instances: "),c=q(a),u=q(")"),i=P(),h=g("ol");for(let d=0;d<N.length;d+=1)N[d].c();this.h()},l(d){e=v(d,"SECTION",{class:!0});var m=S(e);l=v(m,"H2",{class:!0});var p=S(l);n=G(p,`Sub-designs
15
- `),o=v(p,"SPAN",{class:!0});var D=S(o);s=G(D,"(Number of sub-instances: "),c=G(D,a),u=G(D,")"),D.forEach(b),p.forEach(b),i=j(m),h=v(m,"OL",{class:!0});var k=S(h);for(let C=0;C<N.length;C+=1)N[C].l(k);k.forEach(b),m.forEach(b),this.h()},h(){f(o,"class","svelte-lzdpo0"),f(l,"class","svelte-lzdpo0"),f(h,"class","svelte-lzdpo0"),f(e,"class","svelte-lzdpo0")},m(d,m){x(d,e,m),r(e,l),r(l,n),r(l,o),r(o,s),r(o,c),r(o,u),r(e,i),r(e,h);for(let p=0;p<N.length;p+=1)N[p]&&N[p].m(h,null)},p(d,[m]){if(m&4&&a!==(a=d[2].length+"")&&_e(c,a),m&127){_=ke(d[2]);let p;for(p=0;p<_.length;p+=1){const D=$t(d,_,p);N[p]?N[p].p(D,m):(N[p]=tl(D),N[p].c(),N[p].m(h,null))}for(;p<N.length;p+=1)N[p].d(1);N.length=_.length}},i:Ue,o:Ue,d(d){d&&b(e),Ve(N,d)}}}function ll(t){return t?"Yes":""}function Yn(t,e,l){let{subD:n={}}=e,{origPartName:o=""}=e,{pLink:s}=e,a=[];async function c(d){const m=n[d];ul(m.partName,It(m.dparam),!0);const p=`${_t}${s[m.partName]}`;bl(p)}function u(d){const m=n[d].partName,p=n[d].dparam,D=`sub-design parameters of ${m} from ${o}`;hl(m,It(p),D)}function i(d){let m="[ ";return m+=`${ft(wt(d[0]))}, `,m+=`${ft(wt(d[1]))}, `,m+=`${ft(wt(d[2]))} ]`,m}function h(d){let m="[ ";return m+=`${ft(d[0])}, `,m+=`${ft(d[1])}, `,m+=`${ft(d[2])} ]`,m}const _=d=>c(d),N=d=>u(d);return t.$$set=d=>{"subD"in d&&l(0,n=d.subD),"origPartName"in d&&l(7,o=d.origPartName),"pLink"in d&&l(1,s=d.pLink)},t.$$.update=()=>{t.$$.dirty&1&&l(2,a=Object.keys(n))},[n,s,a,c,u,i,h,o,_,N]}class qn extends Me{constructor(e){super(),Ae(this,e,Yn,Kn,ye,{subD:0,origPartName:7,pLink:1})}}function nl(t,e,l){const n=t.slice();return n[19]=e[l],n}function sl(t,e,l){const n=t.slice();return n[19]=e[l],n}function al(t){let e,l,n=t[19]+"",o,s,a;return{c(){e=g("option"),l=q("face "),o=q(n),s=q(" as svg"),this.h()},l(c){e=v(c,"OPTION",{});var u=S(e);l=G(u,"face "),o=G(u,n),s=G(u," as svg"),u.forEach(b),this.h()},h(){e.__value=a="svg_"+t[19],pe(e,e.__value)},m(c,u){x(c,e,u),r(e,l),r(e,o),r(e,s)},p(c,u){u&8&&n!==(n=c[19]+"")&&_e(o,n),u&8&&a!==(a="svg_"+c[19])&&(e.__value=a,pe(e,e.__value))},d(c){c&&b(e)}}}function ol(t){let e,l,n=t[19]+"",o,s,a;return{c(){e=g("option"),l=q("face "),o=q(n),s=q(" as dxf"),this.h()},l(c){e=v(c,"OPTION",{});var u=S(e);l=G(u,"face "),o=G(u,n),s=G(u," as dxf"),u.forEach(b),this.h()},h(){e.__value=a="dxf_"+t[19],pe(e,e.__value)},m(c,u){x(c,e,u),r(e,l),r(e,o),r(e,s)},p(c,u){u&8&&n!==(n=c[19]+"")&&_e(o,n),u&8&&a!==(a="dxf_"+c[19])&&(e.__value=a,pe(e,e.__value))},d(c){c&&b(e)}}}function Gn(t){let e,l,n,o,s="Log",a,c,u,i,h,_,N,d,m,p="Export",D,k,C,I="all faces merged as svg",T,F="all faces merged as dxf",E,M="all faces as pax.json",w,O="all faces as openscad.scad",L,H="all faces as OpenJScad.js",V,W="all faces and more as zip",A,X,ae="Save to File",ne,Q,fe,me,he;e=new In({props:{pDef:t[0],fgeom:t[1],selFace:t[5],simTime:t[6]}}),e.$on("paramChg",t[11]);function be(y){t[13](y)}function U(y){t[14](y)}let z={pDef:t[0],fgeom:t[1],optFaces:t[3]};t[5]!==void 0&&(z.selFace=t[5]),t[6]!==void 0&&(z.simTime=t[6]),i=new Xn({props:z}),Le.push(()=>je(i,"selFace",be)),Le.push(()=>je(i,"simTime",U));let ee=ke(t[3]),B=[];for(let y=0;y<ee.length;y+=1)B[y]=al(sl(t,ee,y));let oe=ke(t[3]),K=[];for(let y=0;y<oe.length;y+=1)K[y]=ol(nl(t,oe,y));return Q=new qn({props:{subD:t[10],origPartName:t[0].partName,pLink:t[2]}}),{c(){Te(e.$$.fragment),l=P(),n=g("section"),o=g("h2"),o.textContent=s,a=P(),c=g("textarea"),u=P(),Te(i.$$.fragment),N=P(),d=g("section"),m=g("h2"),m.textContent=p,D=P(),k=g("select");for(let y=0;y<B.length;y+=1)B[y].c();C=g("option"),C.textContent=I;for(let y=0;y<K.length;y+=1)K[y].c();T=g("option"),T.textContent=F,E=g("option"),E.textContent=M,w=g("option"),w.textContent=O,L=g("option"),L.textContent=H,V=g("option"),V.textContent=W,A=P(),X=g("button"),X.textContent=ae,ne=P(),Te(Q.$$.fragment),this.h()},l(y){we(e.$$.fragment,y),l=j(y),n=v(y,"SECTION",{class:!0});var te=S(n);o=v(te,"H2",{class:!0,"data-svelte-h":!0}),ie(o)!=="svelte-4ty0ys"&&(o.textContent=s),a=j(te),c=v(te,"TEXTAREA",{rows:!0,cols:!0,wrap:!0,class:!0}),S(c).forEach(b),te.forEach(b),u=j(y),we(i.$$.fragment,y),N=j(y),d=v(y,"SECTION",{class:!0});var $=S(d);m=v($,"H2",{class:!0,"data-svelte-h":!0}),ie(m)!=="svelte-1kkpb88"&&(m.textContent=p),D=j($),k=v($,"SELECT",{class:!0});var le=S(k);for(let se=0;se<B.length;se+=1)B[se].l(le);C=v(le,"OPTION",{"data-svelte-h":!0}),ie(C)!=="svelte-22of2y"&&(C.textContent=I);for(let se=0;se<K.length;se+=1)K[se].l(le);T=v(le,"OPTION",{"data-svelte-h":!0}),ie(T)!=="svelte-1utjrni"&&(T.textContent=F),E=v(le,"OPTION",{"data-svelte-h":!0}),ie(E)!=="svelte-3g91m5"&&(E.textContent=M),w=v(le,"OPTION",{"data-svelte-h":!0}),ie(w)!=="svelte-1tpsyal"&&(w.textContent=O),L=v(le,"OPTION",{"data-svelte-h":!0}),ie(L)!=="svelte-1n2n9j5"&&(L.textContent=H),V=v(le,"OPTION",{"data-svelte-h":!0}),ie(V)!=="svelte-168w9vd"&&(V.textContent=W),le.forEach(b),A=j($),X=v($,"BUTTON",{class:!0,"data-svelte-h":!0}),ie(X)!=="svelte-kuqug6"&&(X.textContent=ae),ne=j($),we(Q.$$.fragment,$),$.forEach(b),this.h()},h(){f(o,"class","svelte-19nn0vk"),f(c,"rows","5"),f(c,"cols","94"),c.readOnly=!0,f(c,"wrap","off"),c.value=t[7],f(c,"class","svelte-19nn0vk"),Be(c,"colorErr",t[8]),Be(c,"colorWarn",t[9]),f(n,"class","svelte-19nn0vk"),f(m,"class","svelte-19nn0vk"),C.__value="allsvg",pe(C,C.__value),T.__value="alldxf",pe(T,T.__value),E.__value="pax",pe(E,E.__value),w.__value="oscad",pe(w,w.__value),L.__value="ojscad",pe(L,L.__value),V.__value="zip",pe(V,V.__value),f(k,"class","svelte-19nn0vk"),t[4]===void 0&&pt(()=>t[15].call(k)),f(X,"class","svelte-19nn0vk"),f(d,"class","svelte-19nn0vk")},m(y,te){Oe(e,y,te),x(y,l,te),x(y,n,te),r(n,o),r(n,a),r(n,c),x(y,u,te),Oe(i,y,te),x(y,N,te),x(y,d,te),r(d,m),r(d,D),r(d,k);for(let $=0;$<B.length;$+=1)B[$]&&B[$].m(k,null);r(k,C);for(let $=0;$<K.length;$+=1)K[$]&&K[$].m(k,null);r(k,T),r(k,E),r(k,w),r(k,L),r(k,V),st(k,t[4],!0),r(d,A),r(d,X),r(d,ne),Oe(Q,d,null),fe=!0,me||(he=[Y(k,"change",t[15]),Y(X,"click",t[12])],me=!0)},p(y,[te]){const $={};te&1&&($.pDef=y[0]),te&2&&($.fgeom=y[1]),te&32&&($.selFace=y[5]),te&64&&($.simTime=y[6]),e.$set($),(!fe||te&128)&&(c.value=y[7]),(!fe||te&256)&&Be(c,"colorErr",y[8]),(!fe||te&512)&&Be(c,"colorWarn",y[9]);const le={};if(te&1&&(le.pDef=y[0]),te&2&&(le.fgeom=y[1]),te&8&&(le.optFaces=y[3]),!h&&te&32&&(h=!0,le.selFace=y[5],Pe(()=>h=!1)),!_&&te&64&&(_=!0,le.simTime=y[6],Pe(()=>_=!1)),i.$set(le),te&8){ee=ke(y[3]);let J;for(J=0;J<ee.length;J+=1){const de=sl(y,ee,J);B[J]?B[J].p(de,te):(B[J]=al(de),B[J].c(),B[J].m(k,C))}for(;J<B.length;J+=1)B[J].d(1);B.length=ee.length}if(te&8){oe=ke(y[3]);let J;for(J=0;J<oe.length;J+=1){const de=nl(y,oe,J);K[J]?K[J].p(de,te):(K[J]=ol(de),K[J].c(),K[J].m(k,T))}for(;J<K.length;J+=1)K[J].d(1);K.length=oe.length}te&24&&st(k,y[4]);const se={};te&1024&&(se.subD=y[10]),te&1&&(se.origPartName=y[0].partName),te&4&&(se.pLink=y[2]),Q.$set(se)},i(y){fe||(ge(e.$$.fragment,y),ge(i.$$.fragment,y),ge(Q.$$.fragment,y),fe=!0)},o(y){ve(e.$$.fragment,y),ve(i.$$.fragment,y),ve(Q.$$.fragment,y),fe=!1},d(y){y&&(b(l),b(n),b(u),b(N),b(d)),Ce(e,y),Ce(i,y),Ve(B,y),Ve(K,y),Ce(Q),me=!1,We(he)}}}function Zn(t){let e=!0;const l=/warn/i;return t.search(l)<0&&(e=!1),e}function Jn(t,e){const l=document.createElement("a"),n=URL.createObjectURL(e);l.setAttribute("href",n),l.setAttribute("download",t),l.click(),l.remove(),URL.revokeObjectURL(n)}function Qn(t,e,l){const n=document.createElement("a"),o="data:"+l+";utf-8,"+encodeURIComponent(e);n.setAttribute("href",o),n.setAttribute("download",t),n.click(),n.remove()}function $n(){const t=/[-:]/g,e=/\..*$/;return new Date().toISOString().replace(t,"").replace(e,"").replace("T","_")}function xn(t,e,l){let n;nt(t,qe,E=>l(16,n=E));let{pDef:o}=e,{fgeom:s}=e,{pLink:a}=e,c=[],u,i,h=0,_=`Dummy initial
16
- Will be replaced during onMount
17
- `,N=!1,d=!1,m={};function p(E){l(7,_=`Geometry ${E} computed at ${new Date().toLocaleTimeString()}
18
- `);const w=s(h,n[o.partName]);l(7,_+=w.logstr),l(8,N=w.calcErr),l(9,d=Zn(w.logstr)),l(3,c=Object.keys(w.fig)),l(4,u="zip"),l(10,m=w.sub)}function D(){p(o.partName)}async function k(E){const M=/^svg_/,w=/^dxf_/;let O=$e.eSVG,L="all";E.match(M)?(O=$e.eSVG,L=E.replace(M,"")):E.match(w)?(O=$e.eDXF,L=E.replace(w,"")):E==="allsvg"?O=$e.eSVGALL:E==="alldxf"?O=$e.eDXFALL:E==="pax"?O=$e.ePAX:E==="oscad"?O=$e.eOPENSCAD:E==="ojscad"?O=$e.eJSCAD:E==="zip"?O=$e.eZIP:console.log(`err883: downloadExport iExportFace ${E} invalid`);const H=zl(O),V=Rl(O),W=Bl(O),A=o.partName+"_"+L+"_"+$n()+H;if(W){const X=await Al(s,h,n[o.partName],o,O);Jn(A,X)}else{const X=Fl(s,n[o.partName],o,L,O);Qn(A,X,V)}}async function C(){await k(u)}function I(E){i=E,l(5,i)}function T(E){h=E,l(6,h)}function F(){u=kt(this),l(4,u),l(3,c)}return t.$$set=E=>{"pDef"in E&&l(0,o=E.pDef),"fgeom"in E&&l(1,s=E.fgeom),"pLink"in E&&l(2,a=E.pLink)},t.$$.update=()=>{t.$$.dirty&1&&p(o.partName)},[o,s,a,c,u,i,h,_,N,d,m,D,C,I,T,F]}class es extends Me{constructor(e){super(),Ae(this,e,xn,Gn,ye,{pDef:0,fgeom:1,pLink:2})}}function ts(t){let e,l=t[0].pTitle+"",n,o,s,a=t[0].pDescription+"",c,u,i,h,_,N;return i=new Jl({props:{pDef:t[0].pDef}}),_=new es({props:{pDef:t[0].pDef,fgeom:t[0].pGeom,pLink:t[1]}}),{c(){e=g("h1"),n=q(l),o=P(),s=g("article"),c=q(a),u=P(),Te(i.$$.fragment),h=P(),Te(_.$$.fragment),this.h()},l(d){e=v(d,"H1",{class:!0});var m=S(e);n=G(m,l),m.forEach(b),o=j(d),s=v(d,"ARTICLE",{class:!0});var p=S(s);c=G(p,a),p.forEach(b),u=j(d),we(i.$$.fragment,d),h=j(d),we(_.$$.fragment,d),this.h()},h(){f(e,"class","svelte-1aya6oa"),f(s,"class","svelte-1aya6oa")},m(d,m){x(d,e,m),r(e,n),x(d,o,m),x(d,s,m),r(s,c),x(d,u,m),Oe(i,d,m),x(d,h,m),Oe(_,d,m),N=!0},p(d,[m]){(!N||m&1)&&l!==(l=d[0].pTitle+"")&&_e(n,l),(!N||m&1)&&a!==(a=d[0].pDescription+"")&&_e(c,a);const p={};m&1&&(p.pDef=d[0].pDef),i.$set(p);const D={};m&1&&(D.pDef=d[0].pDef),m&1&&(D.fgeom=d[0].pGeom),m&2&&(D.pLink=d[1]),_.$set(D)},i(d){N||(ge(i.$$.fragment,d),ge(_.$$.fragment,d),N=!0)},o(d){ve(i.$$.fragment,d),ve(_.$$.fragment,d),N=!1},d(d){d&&(b(e),b(o),b(s),b(u),b(h)),Ce(i,d),Ce(_,d)}}}function ls(t,e,l){let{pageDef:n}=e,{pLink:o}=e;return t.$$set=s=>{"pageDef"in s&&l(0,n=s.pageDef),"pLink"in s&&l(1,o=s.pLink)},t.$$.update=()=>{t.$$.dirty&1&&Xl(n)},[n,o]}class ns extends Me{constructor(e){super(),Ae(this,e,ls,ts,ye,{pageDef:0,pLink:1})}}function ss(t){let e,l;return e=new ns({props:{pageDef:t[0].pageDef,pLink:t[0].allLink}}),{c(){Te(e.$$.fragment)},l(n){we(e.$$.fragment,n)},m(n,o){Oe(e,n,o),l=!0},p(n,[o]){const s={};o&1&&(s.pageDef=n[0].pageDef),o&1&&(s.pLink=n[0].allLink),e.$set(s)},i(n){l||(ge(e.$$.fragment,n),l=!0)},o(n){ve(e.$$.fragment,n),l=!1},d(n){Ce(e,n)}}}function as(t,e,l){let{data:n}=e;return t.$$set=o=>{"data"in o&&l(0,n=o.data)},[n]}class hs extends Me{constructor(e){super(),Ae(this,e,as,ss,ye,{data:0})}}export{hs as component,ds as universal};