aptechka 0.8.1 → 0.8.3

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 (92) hide show
  1. package/lib/{Animation-DBfrekcV.cjs → Animation-BInSRYNr.cjs} +1 -1
  2. package/lib/Animation-uimN7sdT.js +110 -0
  3. package/lib/{Composed-CgnR5oah.js → Composed-Fa7owymK.js} +1 -1
  4. package/lib/{Composed-CIXY_HwN.cjs → Composed-Iihn8fT4.cjs} +1 -1
  5. package/lib/{Damped-DmcKRSST.cjs → Damped-Da3EnNN4.cjs} +1 -1
  6. package/lib/{Damped-vepIw9Ku.js → Damped-yrNXlkDE.js} +2 -2
  7. package/lib/{Derived-Xb4EzLLO.cjs → Derived-D9VrDuf9.cjs} +1 -1
  8. package/lib/{Derived-B4CxuebG.js → Derived-DIWinC7Y.js} +1 -1
  9. package/lib/{SourceManager-U3KHUnNl.js → SourceManager--L_rA28b.js} +1 -1
  10. package/lib/{SourceManager-Ce49-NQe.cjs → SourceManager-D6D2LVKf.cjs} +1 -1
  11. package/lib/{Store-CIs_NjhF.cjs → Store-Cr3VaD9G.cjs} +1 -1
  12. package/lib/{Store-Dqcu1DnE.js → Store-Qr3SNOSf.js} +8 -8
  13. package/lib/{Tweened-DPi9pZ8Q.js → Tweened-CjgvoOwL.js} +1 -1
  14. package/lib/{Tweened-5Bj7ht3x.cjs → Tweened-DksN-Rz6.cjs} +1 -1
  15. package/lib/{Viewport-CIBlSU2t.cjs → Viewport-BBYt1Ivy.cjs} +1 -1
  16. package/lib/{Viewport-4ZTWxLo_.js → Viewport-Cgtq2I_K.js} +1 -1
  17. package/lib/accordion/index.js +3 -3
  18. package/lib/animation/index.cjs +1 -1
  19. package/lib/animation/index.js +3 -3
  20. package/lib/attribute/index.cjs +1 -1
  21. package/lib/attribute/index.js +12 -12
  22. package/lib/canvas/index.cjs +1 -1
  23. package/lib/canvas/index.js +3 -3
  24. package/lib/checkbox/index.cjs +1 -1
  25. package/lib/checkbox/index.js +3 -3
  26. package/lib/class-linked-status/index.cjs +1 -1
  27. package/lib/class-linked-status/index.js +1 -1
  28. package/lib/controls/index.cjs +1 -1
  29. package/lib/controls/index.js +3 -3
  30. package/lib/{createStylesheet-BX1RVTfW.cjs → createStylesheet-BsMSWX0q.cjs} +1 -1
  31. package/lib/{createStylesheet-CgWN4UhW.js → createStylesheet-BxKITIVV.js} +1 -1
  32. package/lib/css-property/index.cjs +1 -1
  33. package/lib/css-property/index.js +3 -3
  34. package/lib/dev/index.cjs +1 -1
  35. package/lib/dev/index.js +1 -1
  36. package/lib/device/index.cjs +1 -1
  37. package/lib/device/index.js +1 -1
  38. package/lib/{dom-0S_WDL4g.js → dom-P5QbAASX.js} +2 -2
  39. package/lib/element-constructor/index.cjs +1 -1
  40. package/lib/element-constructor/index.js +2 -2
  41. package/lib/element-resizer/index.js +5 -5
  42. package/lib/en3/helpers/index.cjs +1 -1
  43. package/lib/en3/helpers/index.js +4 -4
  44. package/lib/en3/index.js +1 -1
  45. package/lib/en3/loaders/index.js +1 -1
  46. package/lib/en3/misc/index.cjs +1 -1
  47. package/lib/en3/misc/index.js +2 -2
  48. package/lib/en3/utils/index.js +2 -2
  49. package/lib/{en3-sDqjL5Mg.js → en3-THFHEReu.js} +1 -1
  50. package/lib/{events-C_coq1Mk.js → events-CJTUMSLU.js} +2 -2
  51. package/lib/image/index.cjs +1 -1
  52. package/lib/image/index.js +1 -1
  53. package/lib/{index-DfSyc2GT.cjs → index-CzpP1Tg6.cjs} +1 -1
  54. package/lib/{index-C2xWAQFq.js → index-Dwd_62sm.js} +5 -5
  55. package/lib/intersector/index.js +5 -5
  56. package/lib/ladder/index.cjs +1 -1
  57. package/lib/ladder/index.js +1 -1
  58. package/lib/layout-box/index.js +18 -18
  59. package/lib/media/index.cjs +1 -1
  60. package/lib/media/index.js +1 -1
  61. package/lib/modal/index.cjs +1 -1
  62. package/lib/modal/index.js +3 -3
  63. package/lib/pointer/index.cjs +1 -1
  64. package/lib/pointer/index.js +12 -12
  65. package/lib/popover/index.cjs +1 -1
  66. package/lib/popover/index.js +3 -3
  67. package/lib/scroll/index.cjs +1 -1
  68. package/lib/scroll/index.js +8 -8
  69. package/lib/scroll-entries/index.js +13 -13
  70. package/lib/select/index.cjs +1 -1
  71. package/lib/select/index.js +1 -1
  72. package/lib/sequence/index.cjs +1 -1
  73. package/lib/sequence/index.js +1 -1
  74. package/lib/source/index.cjs +1 -1
  75. package/lib/source/index.js +2 -2
  76. package/lib/store/Store.d.ts +2 -2
  77. package/lib/store/index.cjs +1 -1
  78. package/lib/store/index.js +4 -4
  79. package/lib/{style-CklEF62D.js → style-j2TwriJ_.js} +2 -2
  80. package/lib/{tags-yvEoM921.cjs → tags-CAfasCGV.cjs} +1 -1
  81. package/lib/{tags-C-6uXIAT.js → tags-D9lNDPX8.js} +1 -1
  82. package/lib/theme/index.cjs +1 -1
  83. package/lib/theme/index.js +2 -2
  84. package/lib/ticker/index.js +1 -1
  85. package/lib/{traverseMaterials-M-N1989i.js → traverseMaterials-BKSwwNmo.js} +1 -1
  86. package/lib/tweaker/index.cjs +1 -1
  87. package/lib/tweaker/index.js +38 -30
  88. package/lib/utils/index.js +3 -3
  89. package/lib/video/index.cjs +1 -1
  90. package/lib/video/index.js +1 -1
  91. package/package.json +1 -1
  92. package/lib/Animation-CwgyQH5y.js +0 -110
@@ -1 +1 @@
1
- "use strict";var w=(s,r,e)=>{if(!r.has(s))throw TypeError("Cannot "+e)};var t=(s,r,e)=>(w(s,r,"read from private field"),e?e.call(s):r.get(s)),c=(s,r,e)=>{if(r.has(s))throw TypeError("Cannot add the same private member more than once");r instanceof WeakSet?r.add(s):r.set(s,e)},i=(s,r,e,n)=>(w(s,r,"write to private field"),n?n.call(s,e):r.set(s,e),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const R=require("../css-value-parser/index.cjs"),V=require("../order/index.cjs"),g=require("../Store-CIs_NjhF.cjs"),p=require("../dom-JBOkFLTh.cjs"),f=require("../window-resizer/index.cjs");var a,b,u,o,h,l;class v extends g.Store{constructor(e,n,d,S){super(d,S);c(this,a,void 0);c(this,b,void 0);c(this,u,void 0);c(this,o,void 0);c(this,h,!1);c(this,l,()=>{this.check()});i(this,a,p.getElement(e)),i(this,b,n),i(this,u,d.toString()),i(this,o,(S==null?void 0:S.rawValueCheck)!==!1)}get currentRawValue(){return t(this,u)}observe(){t(this,h)||(i(this,h,!0),f.windowResizer.subscribe(t(this,l),V.RESIZE_ORDER.CSS_VARIABLE))}unobserve(){t(this,h)&&(i(this,h,!1),f.windowResizer.unsubscribe(t(this,l)))}subscribe(e){return this.subscribers.size||this.observe(),super.subscribe(e)}unsubscribe(e){super.unsubscribe(e),this.subscribers.size||this.unobserve()}close(){this.unobserve(),super.close()}check(){const e=getComputedStyle(t(this,a)).getPropertyValue(t(this,b));if(!(t(this,o)&&t(this,u)===e))if(i(this,u,e),e){const n=R.cssValueParser.parse(t(this,u));this.current=n}else this.current=this.initial}}a=new WeakMap,b=new WeakMap,u=new WeakMap,o=new WeakMap,h=new WeakMap,l=new WeakMap;exports.CSSProperty=v;
1
+ "use strict";var w=(s,r,e)=>{if(!r.has(s))throw TypeError("Cannot "+e)};var t=(s,r,e)=>(w(s,r,"read from private field"),e?e.call(s):r.get(s)),c=(s,r,e)=>{if(r.has(s))throw TypeError("Cannot add the same private member more than once");r instanceof WeakSet?r.add(s):r.set(s,e)},i=(s,r,e,n)=>(w(s,r,"write to private field"),n?n.call(s,e):r.set(s,e),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const R=require("../css-value-parser/index.cjs"),V=require("../order/index.cjs"),g=require("../Store-Cr3VaD9G.cjs"),p=require("../dom-JBOkFLTh.cjs"),f=require("../window-resizer/index.cjs");var a,b,u,o,h,l;class v extends g.Store{constructor(e,n,d,S){super(d,S);c(this,a,void 0);c(this,b,void 0);c(this,u,void 0);c(this,o,void 0);c(this,h,!1);c(this,l,()=>{this.check()});i(this,a,p.getElement(e)),i(this,b,n),i(this,u,d.toString()),i(this,o,(S==null?void 0:S.rawValueCheck)!==!1)}get currentRawValue(){return t(this,u)}observe(){t(this,h)||(i(this,h,!0),f.windowResizer.subscribe(t(this,l),V.RESIZE_ORDER.CSS_VARIABLE))}unobserve(){t(this,h)&&(i(this,h,!1),f.windowResizer.unsubscribe(t(this,l)))}subscribe(e){return this.subscribers.size||this.observe(),super.subscribe(e)}unsubscribe(e){super.unsubscribe(e),this.subscribers.size||this.unobserve()}close(){this.unobserve(),super.close()}check(){const e=getComputedStyle(t(this,a)).getPropertyValue(t(this,b));if(!(t(this,o)&&t(this,u)===e))if(i(this,u,e),e){const n=R.cssValueParser.parse(t(this,u));this.current=n}else this.current=this.initial}}a=new WeakMap,b=new WeakMap,u=new WeakMap,o=new WeakMap,h=new WeakMap,l=new WeakMap;exports.CSSProperty=v;
@@ -9,8 +9,8 @@ var t = (s, r, e) => (p(s, r, "read from private field"), e ? e.call(s) : r.get(
9
9
  }, i = (s, r, e, a) => (p(s, r, "write to private field"), a ? a.call(s, e) : r.set(s, e), e);
10
10
  import { cssValueParser as w } from "../css-value-parser/index.js";
11
11
  import { RESIZE_ORDER as R } from "../order/index.js";
12
- import { S as V } from "../Store-Dqcu1DnE.js";
13
- import { g } from "../dom-0S_WDL4g.js";
12
+ import { S as V } from "../Store-Qr3SNOSf.js";
13
+ import { a as v } from "../dom-P5QbAASX.js";
14
14
  import { windowResizer as S } from "../window-resizer/index.js";
15
15
  var b, o, u, l, c, n;
16
16
  class P extends V {
@@ -24,7 +24,7 @@ class P extends V {
24
24
  h(this, n, () => {
25
25
  this.check();
26
26
  });
27
- i(this, b, g(e)), i(this, o, a), i(this, u, m.toString()), i(this, l, (f == null ? void 0 : f.rawValueCheck) !== !1);
27
+ i(this, b, v(e)), i(this, o, a), i(this, u, m.toString()), i(this, l, (f == null ? void 0 : f.rawValueCheck) !== !1);
28
28
  }
29
29
  get currentRawValue() {
30
30
  return t(this, u);
package/lib/dev/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../css-property/index.cjs"),t=require("../Store-CIs_NjhF.cjs"),c=require("../ticker/index.cjs");function i(){c.ticker.subscribe(()=>{for(let e=0;e<t.activeStores.current.length;e++){const r=t.activeStores.current[e];r instanceof o.CSSProperty&&r.check()}})}exports.devMode=i;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../css-property/index.cjs"),t=require("../Store-Cr3VaD9G.cjs"),c=require("../ticker/index.cjs");function i(){c.ticker.subscribe(()=>{for(let e=0;e<t.activeStores.current.length;e++){const r=t.activeStores.current[e];r instanceof o.CSSProperty&&r.check()}})}exports.devMode=i;
package/lib/dev/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { CSSProperty as o } from "../css-property/index.js";
2
- import { a as t } from "../Store-Dqcu1DnE.js";
2
+ import { a as t } from "../Store-Qr3SNOSf.js";
3
3
  import { ticker as c } from "../ticker/index.js";
4
4
  function s() {
5
5
  c.subscribe(() => {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../Viewport-CIBlSU2t.cjs");exports.ViewportBreakpoints=e.ViewportBreakpoints;exports.ViewportMediaRules=e.ViewportMediaRules;exports.device=e.device;exports.viewport=e.viewport;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../Viewport-BBYt1Ivy.cjs");exports.ViewportBreakpoints=e.ViewportBreakpoints;exports.ViewportMediaRules=e.ViewportMediaRules;exports.device=e.device;exports.viewport=e.viewport;
@@ -1,4 +1,4 @@
1
- import { V as i, a as o, d as r, v as s } from "../Viewport-4ZTWxLo_.js";
1
+ import { V as i, a as o, d as r, v as s } from "../Viewport-Cgtq2I_K.js";
2
2
  export {
3
3
  i as ViewportBreakpoints,
4
4
  o as ViewportMediaRules,
@@ -35,8 +35,8 @@ function c(e) {
35
35
  ), t;
36
36
  }
37
37
  export {
38
- c as a,
38
+ a,
39
39
  l as b,
40
40
  u as f,
41
- a as g
41
+ c as g
42
42
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../tags-yvEoM921.cjs"),t=require("../createStylesheet-BX1RVTfW.cjs"),a=require("../createTheme-Cfaw9UmV.cjs");exports.ElementConstructor=e.ElementConstructor;exports.a=e.a;exports.abbr=e.abbr;exports.address=e.address;exports.area=e.area;exports.article=e.article;exports.aside=e.aside;exports.audio=e.audio;exports.b=e.b;exports.base=e.base;exports.bdi=e.bdi;exports.bdo=e.bdo;exports.blockquote=e.blockquote;exports.body=e.body;exports.br=e.br;exports.button=e.button;exports.canvas=e.canvas;exports.caption=e.caption;exports.cite=e.cite;exports.code=e.code;exports.col=e.col;exports.colgroup=e.colgroup;exports.contents=e.contents;exports.data=e.data;exports.datalist=e.datalist;exports.dd=e.dd;exports.del=e.del;exports.details=e.details;exports.dfn=e.dfn;exports.dialog=e.dialog;exports.div=e.div;exports.dl=e.dl;exports.dt=e.dt;exports.element=e.element;exports.em=e.em;exports.embed=e.embed;exports.empty=e.empty;exports.fieldset=e.fieldset;exports.figcaption=e.figcaption;exports.figure=e.figure;exports.footer=e.footer;exports.form=e.form;exports.fragment=e.fragment;exports.h1=e.h1;exports.h2=e.h2;exports.h3=e.h3;exports.h4=e.h4;exports.h5=e.h5;exports.h6=e.h6;exports.head=e.head;exports.header=e.header;exports.hgroup=e.hgroup;exports.hr=e.hr;exports.html=e.html;exports.htmlVar=e.htmlVar;exports.i=e.i;exports.iframe=e.iframe;exports.img=e.img;exports.input=e.input;exports.ins=e.ins;exports.kbd=e.kbd;exports.label=e.label;exports.legend=e.legend;exports.li=e.li;exports.link=e.link;exports.main=e.main;exports.map=e.map;exports.mark=e.mark;exports.menu=e.menu;exports.meta=e.meta;exports.meter=e.meter;exports.nav=e.nav;exports.noscript=e.noscript;exports.object=e.object;exports.ol=e.ol;exports.optgroup=e.optgroup;exports.option=e.option;exports.output=e.output;exports.p=e.p;exports.picture=e.picture;exports.pre=e.pre;exports.progress=e.progress;exports.q=e.q;exports.rp=e.rp;exports.rt=e.rt;exports.ruby=e.ruby;exports.s=e.s;exports.samp=e.samp;exports.script=e.script;exports.search=e.search;exports.section=e.section;exports.select=e.select;exports.slot=e.slot;exports.small=e.small;exports.source=e.source;exports.span=e.span;exports.strong=e.strong;exports.style=e.style;exports.sub=e.sub;exports.summary=e.summary;exports.sup=e.sup;exports.table=e.table;exports.tbody=e.tbody;exports.td=e.td;exports.template=e.template;exports.textarea=e.textarea;exports.tfoot=e.tfoot;exports.th=e.th;exports.thead=e.thead;exports.time=e.time;exports.title=e.title;exports.tr=e.tr;exports.track=e.track;exports.u=e.u;exports.ul=e.ul;exports.video=e.video;exports.wbr=e.wbr;exports.createStylesheet=t.createStylesheet;exports.createTheme=a.createTheme;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../tags-CAfasCGV.cjs"),t=require("../createStylesheet-BsMSWX0q.cjs"),a=require("../createTheme-Cfaw9UmV.cjs");exports.ElementConstructor=e.ElementConstructor;exports.a=e.a;exports.abbr=e.abbr;exports.address=e.address;exports.area=e.area;exports.article=e.article;exports.aside=e.aside;exports.audio=e.audio;exports.b=e.b;exports.base=e.base;exports.bdi=e.bdi;exports.bdo=e.bdo;exports.blockquote=e.blockquote;exports.body=e.body;exports.br=e.br;exports.button=e.button;exports.canvas=e.canvas;exports.caption=e.caption;exports.cite=e.cite;exports.code=e.code;exports.col=e.col;exports.colgroup=e.colgroup;exports.contents=e.contents;exports.data=e.data;exports.datalist=e.datalist;exports.dd=e.dd;exports.del=e.del;exports.details=e.details;exports.dfn=e.dfn;exports.dialog=e.dialog;exports.div=e.div;exports.dl=e.dl;exports.dt=e.dt;exports.element=e.element;exports.em=e.em;exports.embed=e.embed;exports.empty=e.empty;exports.fieldset=e.fieldset;exports.figcaption=e.figcaption;exports.figure=e.figure;exports.footer=e.footer;exports.form=e.form;exports.fragment=e.fragment;exports.h1=e.h1;exports.h2=e.h2;exports.h3=e.h3;exports.h4=e.h4;exports.h5=e.h5;exports.h6=e.h6;exports.head=e.head;exports.header=e.header;exports.hgroup=e.hgroup;exports.hr=e.hr;exports.html=e.html;exports.htmlVar=e.htmlVar;exports.i=e.i;exports.iframe=e.iframe;exports.img=e.img;exports.input=e.input;exports.ins=e.ins;exports.kbd=e.kbd;exports.label=e.label;exports.legend=e.legend;exports.li=e.li;exports.link=e.link;exports.main=e.main;exports.map=e.map;exports.mark=e.mark;exports.menu=e.menu;exports.meta=e.meta;exports.meter=e.meter;exports.nav=e.nav;exports.noscript=e.noscript;exports.object=e.object;exports.ol=e.ol;exports.optgroup=e.optgroup;exports.option=e.option;exports.output=e.output;exports.p=e.p;exports.picture=e.picture;exports.pre=e.pre;exports.progress=e.progress;exports.q=e.q;exports.rp=e.rp;exports.rt=e.rt;exports.ruby=e.ruby;exports.s=e.s;exports.samp=e.samp;exports.script=e.script;exports.search=e.search;exports.section=e.section;exports.select=e.select;exports.slot=e.slot;exports.small=e.small;exports.source=e.source;exports.span=e.span;exports.strong=e.strong;exports.style=e.style;exports.sub=e.sub;exports.summary=e.summary;exports.sup=e.sup;exports.table=e.table;exports.tbody=e.tbody;exports.td=e.td;exports.template=e.template;exports.textarea=e.textarea;exports.tfoot=e.tfoot;exports.th=e.th;exports.thead=e.thead;exports.time=e.time;exports.title=e.title;exports.tr=e.tr;exports.track=e.track;exports.u=e.u;exports.ul=e.ul;exports.video=e.video;exports.wbr=e.wbr;exports.createStylesheet=t.createStylesheet;exports.createTheme=a.createTheme;
@@ -1,5 +1,5 @@
1
- import { E as e, a as t, b as r, c as o, d as i, f as l, g as d, h as m, i as p, j as c, k as n, l as u, m as b, n as h, o as f, p as g, q as y, r as k, s as v, t as x, u as q, v as j, a_ as w, w as C, x as E, y as S, z as T, A as V, B as z, C as A, D as B, F as D, G as F, e as G, H, I, aZ as J, J as K, K as L, L as M, M as N, N as O, aY as P, O as Q, P as R, Q as U, R as W, S as X, T as Y, U as Z, V as _, W as $, X as aa, Y as sa, aV as ea, Z as ta, _ as ra, $ as oa, a0 as ia, a1 as la, a2 as da, a3 as ma, a4 as pa, a5 as ca, a6 as na, a7 as ua, a8 as ba, a9 as ha, aa as fa, ab as ga, ac as ya, ad as ka, ae as va, af as xa, ag as qa, ah as ja, ai as wa, aj as Ca, ak as Ea, al as Sa, am as Ta, an as Va, ao as za, ap as Aa, aq as Ba, ar as Da, as as Fa, at as Ga, au as Ha, av as Ia, aw as Ja, ax as Ka, ay as La, az as Ma, aA as Na, aB as Oa, aC as Pa, aD as Qa, aE as Ra, aF as Ua, aG as Wa, aH as Xa, aI as Ya, aJ as Za, aK as _a, aL as $a, aM as as, aN as ss, aO as es, aP as ts, aQ as rs, aR as os, aS as is, aT as ls, aU as ds, aW as ms, aX as ps } from "../tags-C-6uXIAT.js";
2
- import { c as ns } from "../createStylesheet-CgWN4UhW.js";
1
+ import { E as e, a as t, b as r, c as o, d as i, f as l, g as d, h as m, i as p, j as c, k as n, l as u, m as b, n as h, o as f, p as g, q as y, r as k, s as v, t as x, u as q, v as j, a_ as w, w as C, x as E, y as S, z as T, A as V, B as z, C as A, D as B, F as D, G as F, e as G, H, I, aZ as J, J as K, K as L, L as M, M as N, N as O, aY as P, O as Q, P as R, Q as U, R as W, S as X, T as Y, U as Z, V as _, W as $, X as aa, Y as sa, aV as ea, Z as ta, _ as ra, $ as oa, a0 as ia, a1 as la, a2 as da, a3 as ma, a4 as pa, a5 as ca, a6 as na, a7 as ua, a8 as ba, a9 as ha, aa as fa, ab as ga, ac as ya, ad as ka, ae as va, af as xa, ag as qa, ah as ja, ai as wa, aj as Ca, ak as Ea, al as Sa, am as Ta, an as Va, ao as za, ap as Aa, aq as Ba, ar as Da, as as Fa, at as Ga, au as Ha, av as Ia, aw as Ja, ax as Ka, ay as La, az as Ma, aA as Na, aB as Oa, aC as Pa, aD as Qa, aE as Ra, aF as Ua, aG as Wa, aH as Xa, aI as Ya, aJ as Za, aK as _a, aL as $a, aM as as, aN as ss, aO as es, aP as ts, aQ as rs, aR as os, aS as is, aT as ls, aU as ds, aW as ms, aX as ps } from "../tags-D9lNDPX8.js";
2
+ import { c as ns } from "../createStylesheet-BxKITIVV.js";
3
3
  import { c as bs } from "../createTheme-CHnsCgAr.js";
4
4
  export {
5
5
  e as ElementConstructor,
@@ -8,9 +8,9 @@ var r = (n, t, s) => (h(n, t, "read from private field"), s ? s.call(n) : t.get(
8
8
  t instanceof WeakSet ? t.add(n) : t.set(n, s);
9
9
  }, u = (n, t, s, e) => (h(n, t, "write to private field"), e ? e.call(n, s) : t.set(n, s), s);
10
10
  import { i as y } from "../browser-0zX67oeU.js";
11
- import { g as p } from "../dom-0S_WDL4g.js";
11
+ import { a } from "../dom-P5QbAASX.js";
12
12
  var i, o, f;
13
- class w {
13
+ class p {
14
14
  constructor() {
15
15
  b(this, i, []);
16
16
  b(this, o, null);
@@ -25,7 +25,7 @@ class w {
25
25
  y && window.ResizeObserver && u(this, o, new ResizeObserver(r(this, f)));
26
26
  }
27
27
  subscribe(t, s) {
28
- const e = p(t);
28
+ const e = a(t);
29
29
  if (!e)
30
30
  return () => {
31
31
  };
@@ -58,8 +58,8 @@ class w {
58
58
  }
59
59
  }
60
60
  i = new WeakMap(), o = new WeakMap(), f = new WeakMap();
61
- const d = new w();
61
+ const d = new p();
62
62
  export {
63
- w as ElementResizer,
63
+ p as ElementResizer,
64
64
  d as elementResizer
65
65
  };
@@ -1 +1 @@
1
- "use strict";var zn=Object.defineProperty;var nn=Object.getOwnPropertySymbols;var Nn=Object.prototype.hasOwnProperty,Xn=Object.prototype.propertyIsEnumerable;var on=(m,n,a)=>n in m?zn(m,n,{enumerable:!0,configurable:!0,writable:!0,value:a}):m[n]=a,ae=(m,n)=>{for(var a in n||(n={}))Nn.call(n,a)&&on(m,a,n[a]);if(nn)for(var a of nn(n))Xn.call(n,a)&&on(m,a,n[a]);return m};var Ot=(m,n,a)=>{if(!n.has(m))throw TypeError("Cannot "+a)};var s=(m,n,a)=>(Ot(m,n,"read from private field"),a?a.call(m):n.get(m)),u=(m,n,a)=>{if(n.has(m))throw TypeError("Cannot add the same private member more than once");n instanceof WeakSet?n.add(m):n.set(m,a)},P=(m,n,a,e)=>(Ot(m,n,"write to private field"),e?e.call(m,a):n.set(m,a),a);var M=(m,n,a)=>(Ot(m,n,"access private method"),a);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("../../en3-CBBYE8rb.cjs"),N=require("../../Store-CIs_NjhF.cjs"),t=require("three"),Zn=require("../../object-CCiXnER2.cjs"),sn=require("../../ticker/index.cjs"),Gn=require("../../Composed-CIXY_HwN.cjs"),Fn=require("../../traverseMaterials-BtBXV88O.cjs");function Vn(m){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(m){for(const a in m)if(a!=="default"){const e=Object.getOwnPropertyDescriptor(m,a);Object.defineProperty(n,a,e.get?e:{enumerable:!0,get:()=>m[a]})}}return n.default=m,Object.freeze(n)}const fe=Vn(t),Qn=["AddEquation","SubtractEquation","ReverseSubtractEquation","MinEquation","MaxEquation"],yn=["ZeroFactor","OneFactor","SrcColorFactor","OneMinusSrcColorFactor","SrcAlphaFactor","OneMinusSrcAlphaFactor","DstAlphaFactor","OneMinusDstAlphaFactor","DstColorFactor","OneMinusDstColorFactor","SrcAlphaSaturateFactor","ConstantColorFactor","OneMinusConstantColorFactor","ConstantAlphaFactor","OneMinusConstantAlphaFactor"],qn=[...yn,"SrcAlphaSaturateFactor"],Un=["NoBlending","NormalBlending","AdditiveBlending","SubtractiveBlending","MultiplyBlending","CustomBlending"],Bn=["NeverDepth","AlwaysDepth","EqualDepth","LessDepth","LessEqualDepth ","GreaterEqualDepth ","GreaterDepth","NotEqualDepth"],Wn=["NeverStencilFunc","LessStencilFunc","EqualStencilFunc","LessEqualStencilFunc ","GreaterStencilFunc","NotEqualStencilFunc ","GreaterEqualStencilFunc","AlwaysStencilFunc"],Dt=["ZeroStencilOp","KeepStencilOp","ReplaceStencilOp","IncrementStencilOp","DecrementStencilOp","IncrementWrapStencilOp","DecrementWrapStencilOp","InvertStencilOp"],Kn=["FrontSide","BackSide","DoubleSide"],$n=["TangentSpaceNormalMap","ObjectSpaceNormalMap"],Jn=["round","bevel","miter"],eo=["NoToneMapping","LinearToneMapping","ReinhardToneMapping","CineonToneMapping","ACESFilmicToneMapping","AgXToneMapping","NeutralToneMapping","CustomToneMapping"],to={intensity:{type:"number",min:0,max:20,step:1e-4},renderOrder:{type:"number",step:1},alphaTest:{type:"number",min:0,max:1,step:.001},blendAlpha:{type:"number",min:0,max:1,step:.001},blendDst:{type:"select",variants:qn},blendDstAlpha:{type:"number",min:0,max:1,step:.001},blendEquation:{type:"select",variants:Qn},blendEquationAlpha:{type:"number",min:0,max:1,step:.001},blending:{type:"select",variants:Un},blendSrc:{type:"select",variants:yn},blendSrcAlpha:{type:"number",min:0,max:1,step:.001},depthFunc:{type:"select",variants:Bn},stencilFunc:{type:"select",variants:Wn},stencilRef:{type:"number",min:0,step:1},stencilFail:{type:"select",variants:Dt},stencilZFail:{type:"select",variants:Dt},stencilZPass:{type:"select",variants:Dt},opacity:{type:"number",min:0,max:1,step:1e-4},side:{type:"select",variants:Kn},roughness:{type:"number",min:0,max:1,step:1e-4},metalness:{type:"number",min:0,max:1,step:1e-4},lightMapIntensity:{type:"number",min:0,max:20,step:1e-4},aoMapIntensity:{type:"number",min:0,max:20,step:1e-4},bumpScale:{type:"number",min:0,step:1e-4},normalMapType:{type:"select",variants:$n},wireframeLinejoin:{type:"select",variants:Jn},envMapIntensity:{type:"number",min:0,max:20,step:1e-4},emissiveIntensity:{type:"number",min:0,max:20,step:1e-4},fov:{type:"number",min:0,max:180,step:1},zoom:{type:"number",min:0,step:1e-4},near:{type:"number",min:0,step:1e-4},far:{type:"number",min:0,step:1},filmGauge:{type:"number",min:0,step:1e-4},filmOffset:{type:"number",min:0,step:1e-4},distance:{type:"number",min:0,step:.1},decay:{type:"number",min:0,step:1e-5,ease:.001},focus:{type:"number",min:0,max:1,step:1e-5},bias:{type:"number",min:0,max:.01,step:1e-6,ease:.01},blurSamples:{type:"number",min:0,step:1},normalBias:{type:"number",min:0,step:.001,ease:.01},radius:{type:"number",min:0,step:.001,ease:.01},penumbra:{type:"number",min:0,max:1,step:1e-6},power:{type:"number",min:0,step:.001,ease:.01},angle:{type:"number",min:0,step:1e-6,ease:.001},toneMapping:{type:"select",variants:eo},toneMappingExposure:{type:"number",min:0,step:.001,ease:.1},mapSize:{type:"number",min:0,step:1},damp:{type:"number",min:0,max:1,step:1e-6},strength:{type:"number",min:0,step:.01},threshold:{type:"number",min:0,max:1,step:1e-4}},no=new Set(["stencilFuncMask","needsUpdate","version","wireframeLinewidth","position","scale","rotation","coordinateSystem","aspect","autoUpdate","up"]);var Le,te,St,bn,Pt,wn,xt,gn,vt,Mn,Tt,En,qe,Rt,Ue,Ht,ne,be,oe,we;class pe{constructor(n,a){u(this,St);u(this,Pt);u(this,xt);u(this,vt);u(this,Tt);u(this,qe);u(this,Ue);u(this,ne);u(this,oe);u(this,Le,void 0);u(this,te,[]);P(this,Le,n);const e=ae(ae({},to),a==null?void 0:a.optionsCatalog),r=new Set([...no,...(a==null?void 0:a.skipKeys)||[]]),c=(a==null?void 0:a.folderName)||s(this,Le).name,i=a==null?void 0:a.afterChange;M(this,St,bn).call(this,{subject:s(this,Le),skipKeys:r,optionsCatalog:e,folderKey:c,afterChange:i})}destroy(){s(this,te).forEach(n=>{n.close()})}}Le=new WeakMap,te=new WeakMap,St=new WeakSet,bn=function(n){const{subject:a,folderKey:e,optionsCatalog:r,afterChange:c,skipKeys:i}=n;for(const l in a){if(l.startsWith("_")||i.has(l))continue;const d=a[l],p=M(this,ne,be).call(this,d),f=`${e}.${l}`,w=r[l];typeof p=="number"?(w==null?void 0:w.type)==="select"?M(this,qe,Rt).call(this,{name:f,value:d,subject:a,key:l,managerOptions:w,afterChange:c}):M(this,Pt,wn).call(this,{name:f,value:d,subject:a,key:l,managerOptions:w,afterChange:c}):p instanceof fe.Vector2||p instanceof fe.Vector3?M(this,xt,gn).call(this,{name:f,value:d,subject:a,key:l,managerOptions:w,afterChange:c}):typeof p=="boolean"&&!l.startsWith("is")&&!l.startsWith("matrix")?M(this,vt,Mn).call(this,{name:f,value:d,subject:a,key:l,managerOptions:w,afterChange:c}):p instanceof fe.Color?M(this,Tt,En).call(this,{name:f,value:d,subject:a,key:l,managerOptions:w,afterChange:c}):w&&(w==null?void 0:w.type)==="select"&&M(this,qe,Rt).call(this,{name:f,value:d,subject:a,key:l,managerOptions:w,afterChange:c})}},Pt=new WeakSet,wn=function({name:n,value:a,subject:e,key:r,managerOptions:c,afterChange:i}){const l=new N.Store(M(this,ne,be).call(this,a),{passport:{name:n,manager:ae({type:"number"},c)}});l.subscribe(d=>{M(this,oe,we).call(this,e,r,(p,f)=>p[f]=d.current),i==null||i()}),s(this,te).push(l)},xt=new WeakSet,gn=function({name:n,value:a,subject:e,key:r,managerOptions:c,afterChange:i}){const l=p=>{const f=[p.x,p.y];return p instanceof fe.Vector3&&f.push(p.z),f},d=new N.Store(l(M(this,ne,be).call(this,a)),{passport:{name:n,manager:ae({type:"number"},c)}});d.subscribe(p=>{M(this,oe,we).call(this,e,r,(f,w)=>f[w].set(...p.current)),i==null||i()}),s(this,te).push(d)},vt=new WeakSet,Mn=function({name:n,value:a,subject:e,key:r,managerOptions:c,afterChange:i}){const l=new N.Store(M(this,ne,be).call(this,a),{passport:{name:n,manager:ae({type:"boolean"},c)}});l.subscribe(d=>{M(this,oe,we).call(this,e,r,(p,f)=>p[f]=d.current),i==null||i()}),s(this,te).push(l)},Tt=new WeakSet,En=function({name:n,value:a,subject:e,key:r,managerOptions:c,afterChange:i}){const l=new N.Store(`#${M(this,ne,be).call(this,a).getHexString()}`,{passport:{name:n,manager:ae({type:"color"},c)}});l.subscribe(d=>{M(this,oe,we).call(this,e,r,(p,f)=>p[f]=new fe.Color(d.current)),i==null||i()}),s(this,te).push(l)},qe=new WeakSet,Rt=function({name:n,value:a,subject:e,key:r,managerOptions:c,afterChange:i}){const l=c==null?void 0:c.variants;if(l){let d=null;for(const f of l)a===fe[f]&&(d=f);const p=new N.Store(d||M(this,ne,be).call(this,a),{passport:{name:n,manager:ae({},c)}});p.subscribe(f=>{typeof f.current=="string"&&(f.current[0]===f.current[0].toUpperCase()?M(this,oe,we).call(this,e,r,(w,A)=>w[A]=fe[f.current]):M(this,oe,we).call(this,e,r,(w,A)=>w[A]=f.current)),i==null||i()}),s(this,te).push(p)}},Ue=new WeakSet,Ht=function(n){return Zn.isObject(n)&&"value"in n},ne=new WeakSet,be=function(n){return M(this,Ue,Ht).call(this,n)?n.value:n},oe=new WeakSet,we=function(n,a,e){M(this,Ue,Ht).call(this,n[a])?e(n[a],"value"):e(n,a)};var g,ce,Me,Ee,Se,Be,q,Oe,Mt,We;class Nt{constructor(n,a){u(this,Oe);u(this,g,void 0);u(this,ce,[]);u(this,Me,void 0);u(this,Ee,void 0);u(this,Se,void 0);u(this,Be,!0);u(this,q,[]);u(this,We,()=>{s(this,q).forEach(n=>{"update"in n&&n.update()})});var l,d;P(this,g,n);let e=!1;n.name.startsWith("T.")&&(n.name=n.name.slice(2)),n.name.includes("P.")&&(e=!0,n.name=n.name.replace("P.",""));const r=n.name;s(this,g).userData.controlled=!0;const c=(a==null?void 0:a.step)||1e-4,i=((l=n.userData)==null?void 0:l.box)||n;if(s(this,g)instanceof t.Light){let p;s(this,g)instanceof t.PointLight?p=new t.PointLightHelper(s(this,g),100):s(this,g)instanceof t.DirectionalLight?(s(this,g).scale.setScalar(100),p=new t.DirectionalLightHelper(s(this,g),1)):s(this,g)instanceof t.SpotLight?p=new t.SpotLightHelper(s(this,g)):s(this,g)instanceof t.HemisphereLight&&(p=new t.HemisphereLightHelper(s(this,g),100)),s(this,q).push(p);const f=(d=s(this,g).shadow)==null?void 0:d.camera;if(f instanceof t.Camera){const w=new t.CameraHelper(f);s(this,q).push(w)}}if(s(this,q).forEach(p=>{y.en3.view.add(p)}),P(this,Me,new N.Store([i.position.x,i.position.y,i.position.z],{passport:{name:`${r}.Transformation.Position`,manager:{type:"number",step:c}}})),P(this,Ee,new N.Store([i.rotation.x,i.rotation.y,i.rotation.z],{passport:{name:`${r}.Transformation.Rotation`,manager:{type:"number",step:c,ease:.01}}})),P(this,Se,new N.Store([i.scale.x,i.scale.y,i.scale.z],{passport:{name:`${r}.Transformation.Scale`,manager:{type:"number",step:c}}})),this.save(),P(this,Be,!1),s(this,Me).subscribe(p=>{M(this,Oe,Mt).call(this,"position",p.current)}),s(this,Ee).subscribe(p=>{M(this,Oe,Mt).call(this,"rotation",p.current)}),s(this,Se).subscribe(p=>{M(this,Oe,Mt).call(this,"scale",p.current)}),e){if(s(this,ce).push(new pe(s(this,g),{folderName:`${s(this,g).name}.Parameters`,afterChange:s(this,g)instanceof t.Camera?()=>{y.en3.view.resize()}:void 0})),s(this,g)instanceof t.Mesh){const p=s(this,g).material;p instanceof t.Material&&s(this,ce).push(new pe(p,{folderName:`${s(this,g).name}.Parameters.Material`,afterChange:()=>{p.needsUpdate=!0}}))}else if(s(this,g)instanceof t.Light){const p=s(this,g).shadow;p&&s(this,ce).push(new pe(p,{folderName:`${s(this,g).name}.Parameters.Shadow`,afterChange:()=>{p.needsUpdate=!0}})),p.camera&&s(this,ce).push(new pe(p,{folderName:`${s(this,g).name}.Parameters.Shadow.Camera`,afterChange:()=>{p.camera.updateProjectionMatrix()}}))}}s(this,q).length&&sn.ticker.subscribe(s(this,We))}get object3d(){return s(this,g)}get helpers(){return s(this,q)}get raycasterTarget(){return s(this,q)[0]||s(this,g)}destroy(){s(this,ce).forEach(n=>n.destroy()),s(this,Me).close(),s(this,Ee).close(),s(this,Se).close(),s(this,g).userData.controlled=!1,s(this,q).forEach(n=>{n&&"dispose"in n&&(n.dispose(),y.en3.view.remove(n))}),sn.ticker.unsubscribe(s(this,We))}save(){const n=(a,e)=>{(!s(this,Be)||a.initial===a.current)&&(a.current=[e.x,e.y,e.z])};n(s(this,Me),s(this,g).position),n(s(this,Ee),s(this,g).rotation),n(s(this,Se),s(this,g).scale)}}g=new WeakMap,ce=new WeakMap,Me=new WeakMap,Ee=new WeakMap,Se=new WeakMap,Be=new WeakMap,q=new WeakMap,Oe=new WeakSet,Mt=function(n,a){const e=s(this,g).userData.box;if(e){const r=c=>({x:a[0]-c.x,y:a[1]-c.y,z:a[2]-c.z});n==="position"?e.setPositionStep("_manager","+",r(e.getIncludedPositionSteps("_manager"))):n==="rotation"?e.setRotationStep("_manager","+",r(e.getIncludedRotationSteps("_manager"))):n==="scale"&&e.setScaleStep("_manager","+",r(e.getIncludedScaleSteps("_manager")))}else s(this,g)[n].set(...a)},We=new WeakMap;const an={type:"change"},Ct={type:"start"},rn={type:"end"},yt=new t.Ray,cn=new t.Plane,oo=Math.cos(70*t.MathUtils.DEG2RAD);class io extends t.EventDispatcher{constructor(n,a){super(),this.object=n,this.domElement=a,this.domElement.style.touchAction="none",this.enabled=!0,this.target=new t.Vector3,this.cursor=new t.Vector3,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minTargetRadius=0,this.maxTargetRadius=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!0,this.keyPanSpeed=7,this.zoomToCursor=!1,this.autoRotate=!1,this.autoRotateSpeed=2,this.keys={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"},this.mouseButtons={LEFT:t.MOUSE.ROTATE,MIDDLE:t.MOUSE.DOLLY,RIGHT:t.MOUSE.PAN},this.touches={ONE:t.TOUCH.ROTATE,TWO:t.TOUCH.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this.getPolarAngle=function(){return l.phi},this.getAzimuthalAngle=function(){return l.theta},this.getDistance=function(){return this.object.position.distanceTo(this.target)},this.listenToKeyEvents=function(o){o.addEventListener("keydown",Lt),this._domElementKeyEvents=o},this.stopListenToKeyEvents=function(){this._domElementKeyEvents.removeEventListener("keydown",Lt),this._domElementKeyEvents=null},this.saveState=function(){e.target0.copy(e.target),e.position0.copy(e.object.position),e.zoom0=e.object.zoom},this.reset=function(){e.target.copy(e.target0),e.object.position.copy(e.position0),e.object.zoom=e.zoom0,e.object.updateProjectionMatrix(),e.dispatchEvent(an),e.update(),c=r.NONE},this.update=function(){const o=new t.Vector3,h=new t.Quaternion().setFromUnitVectors(n.up,new t.Vector3(0,1,0)),b=h.clone().invert(),S=new t.Vector3,z=new t.Quaternion,se=new t.Vector3,G=2*Math.PI;return function(Yn=null){const en=e.object.position;o.copy(en).sub(e.target),o.applyQuaternion(h),l.setFromVector3(o),e.autoRotate&&c===r.NONE&&ue(It(Yn)),e.enableDamping?(l.theta+=d.theta*e.dampingFactor,l.phi+=d.phi*e.dampingFactor):(l.theta+=d.theta,l.phi+=d.phi);let $=e.minAzimuthAngle,J=e.maxAzimuthAngle;isFinite($)&&isFinite(J)&&($<-Math.PI?$+=G:$>Math.PI&&($-=G),J<-Math.PI?J+=G:J>Math.PI&&(J-=G),$<=J?l.theta=Math.max($,Math.min(J,l.theta)):l.theta=l.theta>($+J)/2?Math.max($,l.theta):Math.min(J,l.theta)),l.phi=Math.max(e.minPolarAngle,Math.min(e.maxPolarAngle,l.phi)),l.makeSafe(),e.enableDamping===!0?e.target.addScaledVector(f,e.dampingFactor):e.target.add(f),e.target.sub(e.cursor),e.target.clampLength(e.minTargetRadius,e.maxTargetRadius),e.target.add(e.cursor);let Xe=!1;if(e.zoomToCursor&&ve||e.object.isOrthographicCamera)l.radius=ie(l.radius);else{const ee=l.radius;l.radius=ie(l.radius*p),Xe=ee!=l.radius}if(o.setFromSpherical(l),o.applyQuaternion(b),en.copy(e.target).add(o),e.object.lookAt(e.target),e.enableDamping===!0?(d.theta*=1-e.dampingFactor,d.phi*=1-e.dampingFactor,f.multiplyScalar(1-e.dampingFactor)):(d.set(0,0,0),f.set(0,0,0)),e.zoomToCursor&&ve){let ee=null;if(e.object.isPerspectiveCamera){const Ze=o.length();ee=ie(Ze*p);const ft=Ze-ee;e.object.position.addScaledVector(W,ft),e.object.updateMatrixWorld(),Xe=!!ft}else if(e.object.isOrthographicCamera){const Ze=new t.Vector3(j.x,j.y,0);Ze.unproject(e.object);const ft=e.object.zoom;e.object.zoom=Math.max(e.minZoom,Math.min(e.maxZoom,e.object.zoom/p)),e.object.updateProjectionMatrix(),Xe=ft!==e.object.zoom;const tn=new t.Vector3(j.x,j.y,0);tn.unproject(e.object),e.object.position.sub(tn).add(Ze),e.object.updateMatrixWorld(),ee=o.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),e.zoomToCursor=!1;ee!==null&&(this.screenSpacePanning?e.target.set(0,0,-1).transformDirection(e.object.matrix).multiplyScalar(ee).add(e.object.position):(yt.origin.copy(e.object.position),yt.direction.set(0,0,-1).transformDirection(e.object.matrix),Math.abs(e.object.up.dot(yt.direction))<oo?n.lookAt(e.target):(cn.setFromNormalAndCoplanarPoint(e.object.up,e.target),yt.intersectPlane(cn,e.target))))}else if(e.object.isOrthographicCamera){const ee=e.object.zoom;e.object.zoom=Math.max(e.minZoom,Math.min(e.maxZoom,e.object.zoom/p)),ee!==e.object.zoom&&(e.object.updateProjectionMatrix(),Xe=!0)}return p=1,ve=!1,Xe||S.distanceToSquared(e.object.position)>i||8*(1-z.dot(e.object.quaternion))>i||se.distanceToSquared(e.target)>i?(e.dispatchEvent(an),S.copy(e.object.position),z.copy(e.object.quaternion),se.copy(e.target),!0):!1}}(),this.dispose=function(){e.domElement.removeEventListener("contextmenu",$t),e.domElement.removeEventListener("pointerdown",qt),e.domElement.removeEventListener("pointercancel",Ne),e.domElement.removeEventListener("wheel",Ut),e.domElement.removeEventListener("pointermove",At),e.domElement.removeEventListener("pointerup",Ne),e.domElement.getRootNode().removeEventListener("keydown",Bt,{capture:!0}),e._domElementKeyEvents!==null&&(e._domElementKeyEvents.removeEventListener("keydown",Lt),e._domElementKeyEvents=null)};const e=this,r={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let c=r.NONE;const i=1e-6,l=new t.Spherical,d=new t.Spherical;let p=1;const f=new t.Vector3,w=new t.Vector2,A=new t.Vector2,B=new t.Vector2,X=new t.Vector2,L=new t.Vector2,C=new t.Vector2,O=new t.Vector2,v=new t.Vector2,T=new t.Vector2,W=new t.Vector3,j=new t.Vector2;let ve=!1;const _=[],me={};let ze=!1;function It(o){return o!==null?2*Math.PI/60*e.autoRotateSpeed*o:2*Math.PI/60/60*e.autoRotateSpeed}function Te(o){const h=Math.abs(o*.01);return Math.pow(.95,e.zoomSpeed*h)}function ue(o){d.theta-=o}function _e(o){d.phi-=o}const Z=function(){const o=new t.Vector3;return function(b,S){o.setFromMatrixColumn(S,0),o.multiplyScalar(-b),f.add(o)}}(),H=function(){const o=new t.Vector3;return function(b,S){e.screenSpacePanning===!0?o.setFromMatrixColumn(S,1):(o.setFromMatrixColumn(S,0),o.crossVectors(e.object.up,o)),o.multiplyScalar(b),f.add(o)}}(),Q=function(){const o=new t.Vector3;return function(b,S){const z=e.domElement;if(e.object.isPerspectiveCamera){const se=e.object.position;o.copy(se).sub(e.target);let G=o.length();G*=Math.tan(e.object.fov/2*Math.PI/180),Z(2*b*G/z.clientHeight,e.object.matrix),H(2*S*G/z.clientHeight,e.object.matrix)}else e.object.isOrthographicCamera?(Z(b*(e.object.right-e.object.left)/e.object.zoom/z.clientWidth,e.object.matrix),H(S*(e.object.top-e.object.bottom)/e.object.zoom/z.clientHeight,e.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),e.enablePan=!1)}}();function Y(o){e.object.isPerspectiveCamera||e.object.isOrthographicCamera?p/=o:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),e.enableZoom=!1)}function K(o){e.object.isPerspectiveCamera||e.object.isOrthographicCamera?p*=o:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),e.enableZoom=!1)}function I(o,h){if(!e.zoomToCursor)return;ve=!0;const b=e.domElement.getBoundingClientRect(),S=o-b.left,z=h-b.top,se=b.width,G=b.height;j.x=S/se*2-1,j.y=-(z/G)*2+1,W.set(j.x,j.y,1).unproject(e.object).sub(e.object.position).normalize()}function ie(o){return Math.max(e.minDistance,Math.min(e.maxDistance,o))}function de(o){w.set(o.clientX,o.clientY)}function Ie(o){I(o.clientX,o.clientX),O.set(o.clientX,o.clientY)}function ut(o){X.set(o.clientX,o.clientY)}function dt(o){A.set(o.clientX,o.clientY),B.subVectors(A,w).multiplyScalar(e.rotateSpeed);const h=e.domElement;ue(2*Math.PI*B.x/h.clientHeight),_e(2*Math.PI*B.y/h.clientHeight),w.copy(A),e.update()}function Pn(o){v.set(o.clientX,o.clientY),T.subVectors(v,O),T.y>0?Y(Te(T.y)):T.y<0&&K(Te(T.y)),O.copy(v),e.update()}function xn(o){L.set(o.clientX,o.clientY),C.subVectors(L,X).multiplyScalar(e.panSpeed),Q(C.x,C.y),X.copy(L),e.update()}function vn(o){I(o.clientX,o.clientY),o.deltaY<0?K(Te(o.deltaY)):o.deltaY>0&&Y(Te(o.deltaY)),e.update()}function Tn(o){let h=!1;switch(o.code){case e.keys.UP:o.ctrlKey||o.metaKey||o.shiftKey?_e(2*Math.PI*e.rotateSpeed/e.domElement.clientHeight):Q(0,e.keyPanSpeed),h=!0;break;case e.keys.BOTTOM:o.ctrlKey||o.metaKey||o.shiftKey?_e(-2*Math.PI*e.rotateSpeed/e.domElement.clientHeight):Q(0,-e.keyPanSpeed),h=!0;break;case e.keys.LEFT:o.ctrlKey||o.metaKey||o.shiftKey?ue(2*Math.PI*e.rotateSpeed/e.domElement.clientHeight):Q(e.keyPanSpeed,0),h=!0;break;case e.keys.RIGHT:o.ctrlKey||o.metaKey||o.shiftKey?ue(-2*Math.PI*e.rotateSpeed/e.domElement.clientHeight):Q(-e.keyPanSpeed,0),h=!0;break}h&&(o.preventDefault(),e.update())}function Xt(o){if(_.length===1)w.set(o.pageX,o.pageY);else{const h=Ae(o),b=.5*(o.pageX+h.x),S=.5*(o.pageY+h.y);w.set(b,S)}}function Zt(o){if(_.length===1)X.set(o.pageX,o.pageY);else{const h=Ae(o),b=.5*(o.pageX+h.x),S=.5*(o.pageY+h.y);X.set(b,S)}}function Gt(o){const h=Ae(o),b=o.pageX-h.x,S=o.pageY-h.y,z=Math.sqrt(b*b+S*S);O.set(0,z)}function _n(o){e.enableZoom&&Gt(o),e.enablePan&&Zt(o)}function In(o){e.enableZoom&&Gt(o),e.enableRotate&&Xt(o)}function Ft(o){if(_.length==1)A.set(o.pageX,o.pageY);else{const b=Ae(o),S=.5*(o.pageX+b.x),z=.5*(o.pageY+b.y);A.set(S,z)}B.subVectors(A,w).multiplyScalar(e.rotateSpeed);const h=e.domElement;ue(2*Math.PI*B.x/h.clientHeight),_e(2*Math.PI*B.y/h.clientHeight),w.copy(A)}function Vt(o){if(_.length===1)L.set(o.pageX,o.pageY);else{const h=Ae(o),b=.5*(o.pageX+h.x),S=.5*(o.pageY+h.y);L.set(b,S)}C.subVectors(L,X).multiplyScalar(e.panSpeed),Q(C.x,C.y),X.copy(L)}function Qt(o){const h=Ae(o),b=o.pageX-h.x,S=o.pageY-h.y,z=Math.sqrt(b*b+S*S);v.set(0,z),T.set(0,Math.pow(v.y/O.y,e.zoomSpeed)),Y(T.y),O.copy(v);const se=(o.pageX+h.x)*.5,G=(o.pageY+h.y)*.5;I(se,G)}function An(o){e.enableZoom&&Qt(o),e.enablePan&&Vt(o)}function Ln(o){e.enableZoom&&Qt(o),e.enableRotate&&Ft(o)}function qt(o){e.enabled!==!1&&(_.length===0&&(e.domElement.setPointerCapture(o.pointerId),e.domElement.addEventListener("pointermove",At),e.domElement.addEventListener("pointerup",Ne)),!Hn(o)&&(kn(o),o.pointerType==="touch"?Kt(o):On(o)))}function At(o){e.enabled!==!1&&(o.pointerType==="touch"?jn(o):Dn(o))}function Ne(o){switch(Rn(o),_.length){case 0:e.domElement.releasePointerCapture(o.pointerId),e.domElement.removeEventListener("pointermove",At),e.domElement.removeEventListener("pointerup",Ne),e.dispatchEvent(rn),c=r.NONE;break;case 1:const h=_[0],b=me[h];Kt({pointerId:h,pageX:b.x,pageY:b.y});break}}function On(o){let h;switch(o.button){case 0:h=e.mouseButtons.LEFT;break;case 1:h=e.mouseButtons.MIDDLE;break;case 2:h=e.mouseButtons.RIGHT;break;default:h=-1}switch(h){case t.MOUSE.DOLLY:if(e.enableZoom===!1)return;Ie(o),c=r.DOLLY;break;case t.MOUSE.ROTATE:if(o.ctrlKey||o.metaKey||o.shiftKey){if(e.enablePan===!1)return;ut(o),c=r.PAN}else{if(e.enableRotate===!1)return;de(o),c=r.ROTATE}break;case t.MOUSE.PAN:if(o.ctrlKey||o.metaKey||o.shiftKey){if(e.enableRotate===!1)return;de(o),c=r.ROTATE}else{if(e.enablePan===!1)return;ut(o),c=r.PAN}break;default:c=r.NONE}c!==r.NONE&&e.dispatchEvent(Ct)}function Dn(o){switch(c){case r.ROTATE:if(e.enableRotate===!1)return;dt(o);break;case r.DOLLY:if(e.enableZoom===!1)return;Pn(o);break;case r.PAN:if(e.enablePan===!1)return;xn(o);break}}function Ut(o){e.enabled===!1||e.enableZoom===!1||c!==r.NONE||(o.preventDefault(),e.dispatchEvent(Ct),vn(Cn(o)),e.dispatchEvent(rn))}function Cn(o){const h=o.deltaMode,b={clientX:o.clientX,clientY:o.clientY,deltaY:o.deltaY};switch(h){case 1:b.deltaY*=16;break;case 2:b.deltaY*=100;break}return o.ctrlKey&&!ze&&(b.deltaY*=10),b}function Bt(o){o.key==="Control"&&(ze=!0,e.domElement.getRootNode().addEventListener("keyup",Wt,{passive:!0,capture:!0}))}function Wt(o){o.key==="Control"&&(ze=!1,e.domElement.getRootNode().removeEventListener("keyup",Wt,{passive:!0,capture:!0}))}function Lt(o){e.enabled===!1||e.enablePan===!1||Tn(o)}function Kt(o){switch(Jt(o),_.length){case 1:switch(e.touches.ONE){case t.TOUCH.ROTATE:if(e.enableRotate===!1)return;Xt(o),c=r.TOUCH_ROTATE;break;case t.TOUCH.PAN:if(e.enablePan===!1)return;Zt(o),c=r.TOUCH_PAN;break;default:c=r.NONE}break;case 2:switch(e.touches.TWO){case t.TOUCH.DOLLY_PAN:if(e.enableZoom===!1&&e.enablePan===!1)return;_n(o),c=r.TOUCH_DOLLY_PAN;break;case t.TOUCH.DOLLY_ROTATE:if(e.enableZoom===!1&&e.enableRotate===!1)return;In(o),c=r.TOUCH_DOLLY_ROTATE;break;default:c=r.NONE}break;default:c=r.NONE}c!==r.NONE&&e.dispatchEvent(Ct)}function jn(o){switch(Jt(o),c){case r.TOUCH_ROTATE:if(e.enableRotate===!1)return;Ft(o),e.update();break;case r.TOUCH_PAN:if(e.enablePan===!1)return;Vt(o),e.update();break;case r.TOUCH_DOLLY_PAN:if(e.enableZoom===!1&&e.enablePan===!1)return;An(o),e.update();break;case r.TOUCH_DOLLY_ROTATE:if(e.enableZoom===!1&&e.enableRotate===!1)return;Ln(o),e.update();break;default:c=r.NONE}}function $t(o){e.enabled!==!1&&o.preventDefault()}function kn(o){_.push(o.pointerId)}function Rn(o){delete me[o.pointerId];for(let h=0;h<_.length;h++)if(_[h]==o.pointerId){_.splice(h,1);return}}function Hn(o){for(let h=0;h<_.length;h++)if(_[h]==o.pointerId)return!0;return!1}function Jt(o){let h=me[o.pointerId];h===void 0&&(h=new t.Vector2,me[o.pointerId]=h),h.set(o.pageX,o.pageY)}function Ae(o){const h=o.pointerId===_[0]?_[1]:_[0];return me[h]}e.domElement.addEventListener("contextmenu",$t),e.domElement.addEventListener("pointerdown",qt),e.domElement.addEventListener("pointercancel",Ne),e.domElement.addEventListener("wheel",Ut,{passive:!1}),e.domElement.getRootNode().addEventListener("keydown",Bt,{passive:!0,capture:!0}),this.update()}}const ye=new t.Raycaster,R=new t.Vector3,re=new t.Vector3,x=new t.Quaternion,ln={X:new t.Vector3(1,0,0),Y:new t.Vector3(0,1,0),Z:new t.Vector3(0,0,1)},jt={type:"change"},hn={type:"mouseDown",mode:null},pn={type:"mouseUp",mode:null},mn={type:"objectChange"};class so extends t.Object3D{constructor(n,a){super(),a===void 0&&(console.warn('THREE.TransformControls: The second parameter "domElement" is now mandatory.'),a=document),this.isTransformControls=!0,this.visible=!1,this.domElement=a,this.domElement.style.touchAction="none";const e=new po;this._gizmo=e,this.add(e);const r=new mo;this._plane=r,this.add(r);const c=this;function i(v,T){let W=T;Object.defineProperty(c,v,{get:function(){return W!==void 0?W:T},set:function(j){W!==j&&(W=j,r[v]=j,e[v]=j,c.dispatchEvent({type:v+"-changed",value:j}),c.dispatchEvent(jt))}}),c[v]=T,r[v]=T,e[v]=T}i("camera",n),i("object",void 0),i("enabled",!0),i("axis",null),i("mode","translate"),i("translationSnap",null),i("rotationSnap",null),i("scaleSnap",null),i("space","world"),i("size",1),i("dragging",!1),i("showX",!0),i("showY",!0),i("showZ",!0);const l=new t.Vector3,d=new t.Vector3,p=new t.Quaternion,f=new t.Quaternion,w=new t.Vector3,A=new t.Quaternion,B=new t.Vector3,X=new t.Vector3,L=new t.Vector3,C=0,O=new t.Vector3;i("worldPosition",l),i("worldPositionStart",d),i("worldQuaternion",p),i("worldQuaternionStart",f),i("cameraPosition",w),i("cameraQuaternion",A),i("pointStart",B),i("pointEnd",X),i("rotationAxis",L),i("rotationAngle",C),i("eye",O),this._offset=new t.Vector3,this._startNorm=new t.Vector3,this._endNorm=new t.Vector3,this._cameraScale=new t.Vector3,this._parentPosition=new t.Vector3,this._parentQuaternion=new t.Quaternion,this._parentQuaternionInv=new t.Quaternion,this._parentScale=new t.Vector3,this._worldScaleStart=new t.Vector3,this._worldQuaternionInv=new t.Quaternion,this._worldScale=new t.Vector3,this._positionStart=new t.Vector3,this._quaternionStart=new t.Quaternion,this._scaleStart=new t.Vector3,this._getPointer=ao.bind(this),this._onPointerDown=co.bind(this),this._onPointerHover=ro.bind(this),this._onPointerMove=lo.bind(this),this._onPointerUp=ho.bind(this),this.domElement.addEventListener("pointerdown",this._onPointerDown),this.domElement.addEventListener("pointermove",this._onPointerHover),this.domElement.addEventListener("pointerup",this._onPointerUp)}updateMatrixWorld(n){this.object!==void 0&&(this.object.updateMatrixWorld(),this.object.parent===null?console.error("TransformControls: The attached 3D object must be a part of the scene graph."):this.object.parent.matrixWorld.decompose(this._parentPosition,this._parentQuaternion,this._parentScale),this.object.matrixWorld.decompose(this.worldPosition,this.worldQuaternion,this._worldScale),this._parentQuaternionInv.copy(this._parentQuaternion).invert(),this._worldQuaternionInv.copy(this.worldQuaternion).invert()),this.camera.updateMatrixWorld(),this.camera.matrixWorld.decompose(this.cameraPosition,this.cameraQuaternion,this._cameraScale),this.camera.isOrthographicCamera?this.camera.getWorldDirection(this.eye).negate():this.eye.copy(this.cameraPosition).sub(this.worldPosition).normalize(),super.updateMatrixWorld(n)}pointerHover(n){if(this.object===void 0||this.dragging===!0)return;n!==null&&ye.setFromCamera(n,this.camera);const a=kt(this._gizmo.picker[this.mode],ye);a?this.axis=a.object.name:this.axis=null}pointerDown(n){if(!(this.object===void 0||this.dragging===!0||n!=null&&n.button!==0)&&this.axis!==null){n!==null&&ye.setFromCamera(n,this.camera);const a=kt(this._plane,ye,!0);a&&(this.object.updateMatrixWorld(),this.object.parent.updateMatrixWorld(),this._positionStart.copy(this.object.position),this._quaternionStart.copy(this.object.quaternion),this._scaleStart.copy(this.object.scale),this.object.matrixWorld.decompose(this.worldPositionStart,this.worldQuaternionStart,this._worldScaleStart),this.pointStart.copy(a.point).sub(this.worldPositionStart)),this.dragging=!0,hn.mode=this.mode,this.dispatchEvent(hn)}}pointerMove(n){const a=this.axis,e=this.mode,r=this.object;let c=this.space;if(e==="scale"?c="local":(a==="E"||a==="XYZE"||a==="XYZ")&&(c="world"),r===void 0||a===null||this.dragging===!1||n!==null&&n.button!==-1)return;n!==null&&ye.setFromCamera(n,this.camera);const i=kt(this._plane,ye,!0);if(i){if(this.pointEnd.copy(i.point).sub(this.worldPositionStart),e==="translate")this._offset.copy(this.pointEnd).sub(this.pointStart),c==="local"&&a!=="XYZ"&&this._offset.applyQuaternion(this._worldQuaternionInv),a.indexOf("X")===-1&&(this._offset.x=0),a.indexOf("Y")===-1&&(this._offset.y=0),a.indexOf("Z")===-1&&(this._offset.z=0),c==="local"&&a!=="XYZ"?this._offset.applyQuaternion(this._quaternionStart).divide(this._parentScale):this._offset.applyQuaternion(this._parentQuaternionInv).divide(this._parentScale),r.position.copy(this._offset).add(this._positionStart),this.translationSnap&&(c==="local"&&(r.position.applyQuaternion(x.copy(this._quaternionStart).invert()),a.search("X")!==-1&&(r.position.x=Math.round(r.position.x/this.translationSnap)*this.translationSnap),a.search("Y")!==-1&&(r.position.y=Math.round(r.position.y/this.translationSnap)*this.translationSnap),a.search("Z")!==-1&&(r.position.z=Math.round(r.position.z/this.translationSnap)*this.translationSnap),r.position.applyQuaternion(this._quaternionStart)),c==="world"&&(r.parent&&r.position.add(R.setFromMatrixPosition(r.parent.matrixWorld)),a.search("X")!==-1&&(r.position.x=Math.round(r.position.x/this.translationSnap)*this.translationSnap),a.search("Y")!==-1&&(r.position.y=Math.round(r.position.y/this.translationSnap)*this.translationSnap),a.search("Z")!==-1&&(r.position.z=Math.round(r.position.z/this.translationSnap)*this.translationSnap),r.parent&&r.position.sub(R.setFromMatrixPosition(r.parent.matrixWorld))));else if(e==="scale"){if(a.search("XYZ")!==-1){let l=this.pointEnd.length()/this.pointStart.length();this.pointEnd.dot(this.pointStart)<0&&(l*=-1),re.set(l,l,l)}else R.copy(this.pointStart),re.copy(this.pointEnd),R.applyQuaternion(this._worldQuaternionInv),re.applyQuaternion(this._worldQuaternionInv),re.divide(R),a.search("X")===-1&&(re.x=1),a.search("Y")===-1&&(re.y=1),a.search("Z")===-1&&(re.z=1);r.scale.copy(this._scaleStart).multiply(re),this.scaleSnap&&(a.search("X")!==-1&&(r.scale.x=Math.round(r.scale.x/this.scaleSnap)*this.scaleSnap||this.scaleSnap),a.search("Y")!==-1&&(r.scale.y=Math.round(r.scale.y/this.scaleSnap)*this.scaleSnap||this.scaleSnap),a.search("Z")!==-1&&(r.scale.z=Math.round(r.scale.z/this.scaleSnap)*this.scaleSnap||this.scaleSnap))}else if(e==="rotate"){this._offset.copy(this.pointEnd).sub(this.pointStart);const l=20/this.worldPosition.distanceTo(R.setFromMatrixPosition(this.camera.matrixWorld));let d=!1;a==="XYZE"?(this.rotationAxis.copy(this._offset).cross(this.eye).normalize(),this.rotationAngle=this._offset.dot(R.copy(this.rotationAxis).cross(this.eye))*l):(a==="X"||a==="Y"||a==="Z")&&(this.rotationAxis.copy(ln[a]),R.copy(ln[a]),c==="local"&&R.applyQuaternion(this.worldQuaternion),R.cross(this.eye),R.length()===0?d=!0:this.rotationAngle=this._offset.dot(R.normalize())*l),(a==="E"||d)&&(this.rotationAxis.copy(this.eye),this.rotationAngle=this.pointEnd.angleTo(this.pointStart),this._startNorm.copy(this.pointStart).normalize(),this._endNorm.copy(this.pointEnd).normalize(),this.rotationAngle*=this._endNorm.cross(this._startNorm).dot(this.eye)<0?1:-1),this.rotationSnap&&(this.rotationAngle=Math.round(this.rotationAngle/this.rotationSnap)*this.rotationSnap),c==="local"&&a!=="E"&&a!=="XYZE"?(r.quaternion.copy(this._quaternionStart),r.quaternion.multiply(x.setFromAxisAngle(this.rotationAxis,this.rotationAngle)).normalize()):(this.rotationAxis.applyQuaternion(this._parentQuaternionInv),r.quaternion.copy(x.setFromAxisAngle(this.rotationAxis,this.rotationAngle)),r.quaternion.multiply(this._quaternionStart).normalize())}this.dispatchEvent(jt),this.dispatchEvent(mn)}}pointerUp(n){n!==null&&n.button!==0||(this.dragging&&this.axis!==null&&(pn.mode=this.mode,this.dispatchEvent(pn)),this.dragging=!1,this.axis=null)}dispose(){this.domElement.removeEventListener("pointerdown",this._onPointerDown),this.domElement.removeEventListener("pointermove",this._onPointerHover),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.traverse(function(n){n.geometry&&n.geometry.dispose(),n.material&&n.material.dispose()})}attach(n){return this.object=n,this.visible=!0,this}detach(){return this.object=void 0,this.visible=!1,this.axis=null,this}reset(){this.enabled&&this.dragging&&(this.object.position.copy(this._positionStart),this.object.quaternion.copy(this._quaternionStart),this.object.scale.copy(this._scaleStart),this.dispatchEvent(jt),this.dispatchEvent(mn),this.pointStart.copy(this.pointEnd))}getRaycaster(){return ye}getMode(){return this.mode}setMode(n){this.mode=n}setTranslationSnap(n){this.translationSnap=n}setRotationSnap(n){this.rotationSnap=n}setScaleSnap(n){this.scaleSnap=n}setSize(n){this.size=n}setSpace(n){this.space=n}}function ao(m){if(this.domElement.ownerDocument.pointerLockElement)return{x:0,y:0,button:m.button};{const n=this.domElement.getBoundingClientRect();return{x:(m.clientX-n.left)/n.width*2-1,y:-(m.clientY-n.top)/n.height*2+1,button:m.button}}}function ro(m){if(this.enabled)switch(m.pointerType){case"mouse":case"pen":this.pointerHover(this._getPointer(m));break}}function co(m){this.enabled&&(document.pointerLockElement||this.domElement.setPointerCapture(m.pointerId),this.domElement.addEventListener("pointermove",this._onPointerMove),this.pointerHover(this._getPointer(m)),this.pointerDown(this._getPointer(m)))}function lo(m){this.enabled&&this.pointerMove(this._getPointer(m))}function ho(m){this.enabled&&(this.domElement.releasePointerCapture(m.pointerId),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.pointerUp(this._getPointer(m)))}function kt(m,n,a){const e=n.intersectObject(m,!0);for(let r=0;r<e.length;r++)if(e[r].object.visible||a)return e[r];return!1}const bt=new t.Euler,E=new t.Vector3(0,1,0),un=new t.Vector3(0,0,0),dn=new t.Matrix4,wt=new t.Quaternion,Et=new t.Quaternion,U=new t.Vector3,fn=new t.Matrix4,Ve=new t.Vector3(1,0,0),ge=new t.Vector3(0,1,0),Qe=new t.Vector3(0,0,1),gt=new t.Vector3,Ge=new t.Vector3,Fe=new t.Vector3;class po extends t.Object3D{constructor(){super(),this.isTransformControlsGizmo=!0,this.type="TransformControlsGizmo";const n=new t.MeshBasicMaterial({depthTest:!1,depthWrite:!1,fog:!1,toneMapped:!1,transparent:!0}),a=new t.LineBasicMaterial({depthTest:!1,depthWrite:!1,fog:!1,toneMapped:!1,transparent:!0}),e=n.clone();e.opacity=.15;const r=a.clone();r.opacity=.5;const c=n.clone();c.color.setHex(16711680);const i=n.clone();i.color.setHex(65280);const l=n.clone();l.color.setHex(255);const d=n.clone();d.color.setHex(16711680),d.opacity=.5;const p=n.clone();p.color.setHex(65280),p.opacity=.5;const f=n.clone();f.color.setHex(255),f.opacity=.5;const w=n.clone();w.opacity=.25;const A=n.clone();A.color.setHex(16776960),A.opacity=.25,n.clone().color.setHex(16776960);const X=n.clone();X.color.setHex(7895160);const L=new t.CylinderGeometry(0,.04,.1,12);L.translate(0,.05,0);const C=new t.BoxGeometry(.08,.08,.08);C.translate(0,.04,0);const O=new t.BufferGeometry;O.setAttribute("position",new t.Float32BufferAttribute([0,0,0,1,0,0],3));const v=new t.CylinderGeometry(.0075,.0075,.5,3);v.translate(0,.25,0);function T(H,Q){const Y=new t.TorusGeometry(H,.0075,3,64,Q*Math.PI*2);return Y.rotateY(Math.PI/2),Y.rotateX(Math.PI/2),Y}function W(){const H=new t.BufferGeometry;return H.setAttribute("position",new t.Float32BufferAttribute([0,0,0,1,1,1],3)),H}const j={X:[[new t.Mesh(L,c),[.5,0,0],[0,0,-Math.PI/2]],[new t.Mesh(L,c),[-.5,0,0],[0,0,Math.PI/2]],[new t.Mesh(v,c),[0,0,0],[0,0,-Math.PI/2]]],Y:[[new t.Mesh(L,i),[0,.5,0]],[new t.Mesh(L,i),[0,-.5,0],[Math.PI,0,0]],[new t.Mesh(v,i)]],Z:[[new t.Mesh(L,l),[0,0,.5],[Math.PI/2,0,0]],[new t.Mesh(L,l),[0,0,-.5],[-Math.PI/2,0,0]],[new t.Mesh(v,l),null,[Math.PI/2,0,0]]],XYZ:[[new t.Mesh(new t.OctahedronGeometry(.1,0),w.clone()),[0,0,0]]],XY:[[new t.Mesh(new t.BoxGeometry(.15,.15,.01),f.clone()),[.15,.15,0]]],YZ:[[new t.Mesh(new t.BoxGeometry(.15,.15,.01),d.clone()),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new t.Mesh(new t.BoxGeometry(.15,.15,.01),p.clone()),[.15,0,.15],[-Math.PI/2,0,0]]]},ve={X:[[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[.3,0,0],[0,0,-Math.PI/2]],[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[-.3,0,0],[0,0,Math.PI/2]]],Y:[[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[0,.3,0]],[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[0,-.3,0],[0,0,Math.PI]]],Z:[[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[0,0,.3],[Math.PI/2,0,0]],[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[0,0,-.3],[-Math.PI/2,0,0]]],XYZ:[[new t.Mesh(new t.OctahedronGeometry(.2,0),e)]],XY:[[new t.Mesh(new t.BoxGeometry(.2,.2,.01),e),[.15,.15,0]]],YZ:[[new t.Mesh(new t.BoxGeometry(.2,.2,.01),e),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new t.Mesh(new t.BoxGeometry(.2,.2,.01),e),[.15,0,.15],[-Math.PI/2,0,0]]]},_={START:[[new t.Mesh(new t.OctahedronGeometry(.01,2),r),null,null,null,"helper"]],END:[[new t.Mesh(new t.OctahedronGeometry(.01,2),r),null,null,null,"helper"]],DELTA:[[new t.Line(W(),r),null,null,null,"helper"]],X:[[new t.Line(O,r.clone()),[-1e3,0,0],null,[1e6,1,1],"helper"]],Y:[[new t.Line(O,r.clone()),[0,-1e3,0],[0,0,Math.PI/2],[1e6,1,1],"helper"]],Z:[[new t.Line(O,r.clone()),[0,0,-1e3],[0,-Math.PI/2,0],[1e6,1,1],"helper"]]},me={XYZE:[[new t.Mesh(T(.5,1),X),null,[0,Math.PI/2,0]]],X:[[new t.Mesh(T(.5,.5),c)]],Y:[[new t.Mesh(T(.5,.5),i),null,[0,0,-Math.PI/2]]],Z:[[new t.Mesh(T(.5,.5),l),null,[0,Math.PI/2,0]]],E:[[new t.Mesh(T(.75,1),A),null,[0,Math.PI/2,0]]]},ze={AXIS:[[new t.Line(O,r.clone()),[-1e3,0,0],null,[1e6,1,1],"helper"]]},It={XYZE:[[new t.Mesh(new t.SphereGeometry(.25,10,8),e)]],X:[[new t.Mesh(new t.TorusGeometry(.5,.1,4,24),e),[0,0,0],[0,-Math.PI/2,-Math.PI/2]]],Y:[[new t.Mesh(new t.TorusGeometry(.5,.1,4,24),e),[0,0,0],[Math.PI/2,0,0]]],Z:[[new t.Mesh(new t.TorusGeometry(.5,.1,4,24),e),[0,0,0],[0,0,-Math.PI/2]]],E:[[new t.Mesh(new t.TorusGeometry(.75,.1,2,24),e)]]},Te={X:[[new t.Mesh(C,c),[.5,0,0],[0,0,-Math.PI/2]],[new t.Mesh(v,c),[0,0,0],[0,0,-Math.PI/2]],[new t.Mesh(C,c),[-.5,0,0],[0,0,Math.PI/2]]],Y:[[new t.Mesh(C,i),[0,.5,0]],[new t.Mesh(v,i)],[new t.Mesh(C,i),[0,-.5,0],[0,0,Math.PI]]],Z:[[new t.Mesh(C,l),[0,0,.5],[Math.PI/2,0,0]],[new t.Mesh(v,l),[0,0,0],[Math.PI/2,0,0]],[new t.Mesh(C,l),[0,0,-.5],[-Math.PI/2,0,0]]],XY:[[new t.Mesh(new t.BoxGeometry(.15,.15,.01),f),[.15,.15,0]]],YZ:[[new t.Mesh(new t.BoxGeometry(.15,.15,.01),d),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new t.Mesh(new t.BoxGeometry(.15,.15,.01),p),[.15,0,.15],[-Math.PI/2,0,0]]],XYZ:[[new t.Mesh(new t.BoxGeometry(.1,.1,.1),w.clone())]]},ue={X:[[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[.3,0,0],[0,0,-Math.PI/2]],[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[-.3,0,0],[0,0,Math.PI/2]]],Y:[[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[0,.3,0]],[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[0,-.3,0],[0,0,Math.PI]]],Z:[[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[0,0,.3],[Math.PI/2,0,0]],[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[0,0,-.3],[-Math.PI/2,0,0]]],XY:[[new t.Mesh(new t.BoxGeometry(.2,.2,.01),e),[.15,.15,0]]],YZ:[[new t.Mesh(new t.BoxGeometry(.2,.2,.01),e),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new t.Mesh(new t.BoxGeometry(.2,.2,.01),e),[.15,0,.15],[-Math.PI/2,0,0]]],XYZ:[[new t.Mesh(new t.BoxGeometry(.2,.2,.2),e),[0,0,0]]]},_e={X:[[new t.Line(O,r.clone()),[-1e3,0,0],null,[1e6,1,1],"helper"]],Y:[[new t.Line(O,r.clone()),[0,-1e3,0],[0,0,Math.PI/2],[1e6,1,1],"helper"]],Z:[[new t.Line(O,r.clone()),[0,0,-1e3],[0,-Math.PI/2,0],[1e6,1,1],"helper"]]};function Z(H){const Q=new t.Object3D;for(const Y in H)for(let K=H[Y].length;K--;){const I=H[Y][K][0].clone(),ie=H[Y][K][1],de=H[Y][K][2],Ie=H[Y][K][3],ut=H[Y][K][4];I.name=Y,I.tag=ut,ie&&I.position.set(ie[0],ie[1],ie[2]),de&&I.rotation.set(de[0],de[1],de[2]),Ie&&I.scale.set(Ie[0],Ie[1],Ie[2]),I.updateMatrix();const dt=I.geometry.clone();dt.applyMatrix4(I.matrix),I.geometry=dt,I.renderOrder=1/0,I.position.set(0,0,0),I.rotation.set(0,0,0),I.scale.set(1,1,1),Q.add(I)}return Q}this.gizmo={},this.picker={},this.helper={},this.add(this.gizmo.translate=Z(j)),this.add(this.gizmo.rotate=Z(me)),this.add(this.gizmo.scale=Z(Te)),this.add(this.picker.translate=Z(ve)),this.add(this.picker.rotate=Z(It)),this.add(this.picker.scale=Z(ue)),this.add(this.helper.translate=Z(_)),this.add(this.helper.rotate=Z(ze)),this.add(this.helper.scale=Z(_e)),this.picker.translate.visible=!1,this.picker.rotate.visible=!1,this.picker.scale.visible=!1}updateMatrixWorld(n){const e=(this.mode==="scale"?"local":this.space)==="local"?this.worldQuaternion:Et;this.gizmo.translate.visible=this.mode==="translate",this.gizmo.rotate.visible=this.mode==="rotate",this.gizmo.scale.visible=this.mode==="scale",this.helper.translate.visible=this.mode==="translate",this.helper.rotate.visible=this.mode==="rotate",this.helper.scale.visible=this.mode==="scale";let r=[];r=r.concat(this.picker[this.mode].children),r=r.concat(this.gizmo[this.mode].children),r=r.concat(this.helper[this.mode].children);for(let c=0;c<r.length;c++){const i=r[c];i.visible=!0,i.rotation.set(0,0,0),i.position.copy(this.worldPosition);let l;if(this.camera.isOrthographicCamera?l=(this.camera.top-this.camera.bottom)/this.camera.zoom:l=this.worldPosition.distanceTo(this.cameraPosition)*Math.min(1.9*Math.tan(Math.PI*this.camera.fov/360)/this.camera.zoom,7),i.scale.set(1,1,1).multiplyScalar(l*this.size/4),i.tag==="helper"){i.visible=!1,i.name==="AXIS"?(i.visible=!!this.axis,this.axis==="X"&&(x.setFromEuler(bt.set(0,0,0)),i.quaternion.copy(e).multiply(x),Math.abs(E.copy(Ve).applyQuaternion(e).dot(this.eye))>.9&&(i.visible=!1)),this.axis==="Y"&&(x.setFromEuler(bt.set(0,0,Math.PI/2)),i.quaternion.copy(e).multiply(x),Math.abs(E.copy(ge).applyQuaternion(e).dot(this.eye))>.9&&(i.visible=!1)),this.axis==="Z"&&(x.setFromEuler(bt.set(0,Math.PI/2,0)),i.quaternion.copy(e).multiply(x),Math.abs(E.copy(Qe).applyQuaternion(e).dot(this.eye))>.9&&(i.visible=!1)),this.axis==="XYZE"&&(x.setFromEuler(bt.set(0,Math.PI/2,0)),E.copy(this.rotationAxis),i.quaternion.setFromRotationMatrix(dn.lookAt(un,E,ge)),i.quaternion.multiply(x),i.visible=this.dragging),this.axis==="E"&&(i.visible=!1)):i.name==="START"?(i.position.copy(this.worldPositionStart),i.visible=this.dragging):i.name==="END"?(i.position.copy(this.worldPosition),i.visible=this.dragging):i.name==="DELTA"?(i.position.copy(this.worldPositionStart),i.quaternion.copy(this.worldQuaternionStart),R.set(1e-10,1e-10,1e-10).add(this.worldPositionStart).sub(this.worldPosition).multiplyScalar(-1),R.applyQuaternion(this.worldQuaternionStart.clone().invert()),i.scale.copy(R),i.visible=this.dragging):(i.quaternion.copy(e),this.dragging?i.position.copy(this.worldPositionStart):i.position.copy(this.worldPosition),this.axis&&(i.visible=this.axis.search(i.name)!==-1));continue}i.quaternion.copy(e),this.mode==="translate"||this.mode==="scale"?(i.name==="X"&&Math.abs(E.copy(Ve).applyQuaternion(e).dot(this.eye))>.99&&(i.scale.set(1e-10,1e-10,1e-10),i.visible=!1),i.name==="Y"&&Math.abs(E.copy(ge).applyQuaternion(e).dot(this.eye))>.99&&(i.scale.set(1e-10,1e-10,1e-10),i.visible=!1),i.name==="Z"&&Math.abs(E.copy(Qe).applyQuaternion(e).dot(this.eye))>.99&&(i.scale.set(1e-10,1e-10,1e-10),i.visible=!1),i.name==="XY"&&Math.abs(E.copy(Qe).applyQuaternion(e).dot(this.eye))<.2&&(i.scale.set(1e-10,1e-10,1e-10),i.visible=!1),i.name==="YZ"&&Math.abs(E.copy(Ve).applyQuaternion(e).dot(this.eye))<.2&&(i.scale.set(1e-10,1e-10,1e-10),i.visible=!1),i.name==="XZ"&&Math.abs(E.copy(ge).applyQuaternion(e).dot(this.eye))<.2&&(i.scale.set(1e-10,1e-10,1e-10),i.visible=!1)):this.mode==="rotate"&&(wt.copy(e),E.copy(this.eye).applyQuaternion(x.copy(e).invert()),i.name.search("E")!==-1&&i.quaternion.setFromRotationMatrix(dn.lookAt(this.eye,un,ge)),i.name==="X"&&(x.setFromAxisAngle(Ve,Math.atan2(-E.y,E.z)),x.multiplyQuaternions(wt,x),i.quaternion.copy(x)),i.name==="Y"&&(x.setFromAxisAngle(ge,Math.atan2(E.x,E.z)),x.multiplyQuaternions(wt,x),i.quaternion.copy(x)),i.name==="Z"&&(x.setFromAxisAngle(Qe,Math.atan2(E.y,E.x)),x.multiplyQuaternions(wt,x),i.quaternion.copy(x))),i.visible=i.visible&&(i.name.indexOf("X")===-1||this.showX),i.visible=i.visible&&(i.name.indexOf("Y")===-1||this.showY),i.visible=i.visible&&(i.name.indexOf("Z")===-1||this.showZ),i.visible=i.visible&&(i.name.indexOf("E")===-1||this.showX&&this.showY&&this.showZ),i.material._color=i.material._color||i.material.color.clone(),i.material._opacity=i.material._opacity||i.material.opacity,i.material.color.copy(i.material._color),i.material.opacity=i.material._opacity,this.enabled&&this.axis&&(i.name===this.axis||this.axis.split("").some(function(d){return i.name===d}))&&(i.material.color.setHex(16776960),i.material.opacity=1)}super.updateMatrixWorld(n)}}class mo extends t.Mesh{constructor(){super(new t.PlaneGeometry(1e5,1e5,2,2),new t.MeshBasicMaterial({visible:!1,wireframe:!0,side:t.DoubleSide,transparent:!0,opacity:.1,toneMapped:!1})),this.isTransformControlsPlane=!0,this.type="TransformControlsPlane"}updateMatrixWorld(n){let a=this.space;switch(this.position.copy(this.worldPosition),this.mode==="scale"&&(a="local"),gt.copy(Ve).applyQuaternion(a==="local"?this.worldQuaternion:Et),Ge.copy(ge).applyQuaternion(a==="local"?this.worldQuaternion:Et),Fe.copy(Qe).applyQuaternion(a==="local"?this.worldQuaternion:Et),E.copy(Ge),this.mode){case"translate":case"scale":switch(this.axis){case"X":E.copy(this.eye).cross(gt),U.copy(gt).cross(E);break;case"Y":E.copy(this.eye).cross(Ge),U.copy(Ge).cross(E);break;case"Z":E.copy(this.eye).cross(Fe),U.copy(Fe).cross(E);break;case"XY":U.copy(Fe);break;case"YZ":U.copy(gt);break;case"XZ":E.copy(Fe),U.copy(Ge);break;case"XYZ":case"E":U.set(0,0,0);break}break;case"rotate":default:U.set(0,0,0)}U.length()===0?this.quaternion.copy(this.cameraQuaternion):(fn.lookAt(R.set(0,0,0),U,E),this.quaternion.setFromRotationMatrix(fn)),super.updateMatrixWorld(n)}}var F,Pe;class uo{constructor(){u(this,F,void 0);u(this,Pe,void 0);P(this,F,new io(y.en3.camera,y.en3.webglRenderer.domElement)),P(this,Pe,new N.Store([0,0,0],{passport:{name:"Controls.OrbitControls.Target",manager:{type:"number",invisible:!0}}}));let n=!0;s(this,Pe).subscribe(a=>{s(this,F).target.set(...a.current),n&&s(this,F).update()}),s(this,F).addEventListener("change",()=>{n=!1,s(this,Pe).current=[s(this,F).target.x,s(this,F).target.y,s(this,F).target.z],n=!0})}get controls(){return s(this,F)}destroy(){s(this,F).dispose(),s(this,Pe).close()}}F=new WeakMap,Pe=new WeakMap;var k,Ke,$e,Je,et,tt,nt,ot,it;class fo{constructor(){u(this,k,null);u(this,Ke,new N.Store(y.en3.camera.far,{passport:{name:"Helpers.Grid.Size",manager:{type:"number",step:1}}}));u(this,$e,new N.Store(100,{passport:{name:"Helpers.Grid.Divisions",manager:{type:"number"}}}));u(this,Je,new N.Store("#0000ff",{passport:{name:"Helpers.Grid.Color 1",manager:{type:"color"}}}));u(this,et,new N.Store("#808080",{passport:{name:"Helpers.Grid.Color 2",manager:{type:"color"}}}));u(this,tt,new N.Store(!1,{passport:{name:"Helpers.Grid.Vertical",manager:{type:"boolean"}}}));u(this,nt,new N.Store(!0,{passport:{name:"Helpers.Grid.Visible",manager:{type:"boolean"}}}));u(this,ot,void 0);u(this,it,n=>{n.key==="g"&&(s(this,k).visible=!s(this,k).visible)});P(this,ot,new Gn.Composed([s(this,Ke),s(this,$e),s(this,Je),s(this,et),s(this,tt),s(this,nt)],()=>{s(this,k)&&(y.en3.view.remove(s(this,k)),s(this,k).dispose()),P(this,k,new t.GridHelper(s(this,Ke).current,s(this,$e).current,s(this,Je).current,s(this,et).current)),s(this,k).rotation.x=s(this,tt).current?Math.PI/2:0,s(this,k).visible=s(this,nt).current,y.en3.view.add(s(this,k))})),addEventListener("keydown",s(this,it))}get helper(){return s(this,k)}destroy(){s(this,ot).close(),s(this,k)&&(y.en3.view.remove(s(this,k)),s(this,k).dispose()),removeEventListener("keydown",s(this,it))}}k=new WeakMap,Ke=new WeakMap,$e=new WeakMap,Je=new WeakMap,et=new WeakMap,tt=new WeakMap,nt=new WeakMap,ot=new WeakMap,it=new WeakMap;var D,V,le,he,st,De,at,rt,Yt;class yo{constructor(){u(this,rt);u(this,D,void 0);u(this,V,[]);u(this,le,null);u(this,he,n=>{if(n.child.name.startsWith("T.")&&!s(this,V).find(a=>a.object3d===n.child)){const a=new Nt(n.child);s(this,V).push(a),y.en3.raycaster.add(a.raycasterTarget,{eventDispatcher:a.raycasterTarget}),a.raycasterTarget.addEventListener("pointerDown",s(this,De)),a.object3d.addEventListener("childadded",s(this,he))}});u(this,st,n=>{const a=M(this,rt,Yt).call(this,n.child);a&&(y.en3.raycaster.remove(a.raycasterTarget),a.destroy(),a.raycasterTarget.removeEventListener("pointerDown",s(this,De)),a.object3d.removeEventListener("childadded",s(this,he)),P(this,V,s(this,V).filter(e=>e!==a)))});u(this,De,n=>{const a=M(this,rt,Yt).call(this,n.target);a&&(P(this,le,s(this,V).find(e=>e.object3d===(a==null?void 0:a.object3d))||null),s(this,le)&&s(this,D).attach(s(this,le).object3d))});u(this,at,n=>{n.key==="t"?s(this,D).setMode("translate"):n.key==="r"?s(this,D).setMode("rotate"):n.key==="s"?s(this,D).setMode("scale"):n.key==="Escape"?s(this,D).detach():n.key==="+"||n.key==="="?s(this,D).setSize(s(this,D).size+.1):n.key==="-"||n.key==="_"?s(this,D).setSize(s(this,D).size-.1):n.key==="h"&&s(this,V).forEach(a=>{a.helpers.forEach(e=>{e.visible=!e.visible})})});P(this,D,new so(y.en3.camera,y.en3.webglRenderer.domElement)),s(this,D).addEventListener("objectChange",n=>{s(this,le)&&s(this,le).save()}),y.en3.view.add(s(this,D)),y.en3.scene.addEventListener("childadded",s(this,he)),y.en3.scene.addEventListener("childremoved",s(this,st)),window.addEventListener("keydown",s(this,at))}get controls(){return s(this,D)}destroy(){y.en3.scene.removeEventListener("childadded",s(this,he)),y.en3.scene.removeEventListener("childremoved",s(this,st)),window.removeEventListener("keydown",s(this,at)),s(this,D).dispose(),s(this,V).forEach(n=>{n.raycasterTarget.removeEventListener("pointerDown",s(this,De)),n.object3d.removeEventListener("childadded",s(this,he)),n.destroy()}),P(this,V,[])}}D=new WeakMap,V=new WeakMap,le=new WeakMap,he=new WeakMap,st=new WeakMap,De=new WeakMap,at=new WeakMap,rt=new WeakSet,Yt=function(n){return s(this,V).find(e=>e.object3d===n||e.raycasterTarget===n)};var Ce,je,ke,Re,ct,zt,_t,Sn;class bo{constructor(){u(this,ct);u(this,_t);u(this,Ce,void 0);u(this,je,void 0);u(this,ke,void 0);u(this,Re,[]);P(this,Ce,y.en3.composer.addPass=y.en3.composer.addPass.bind(y.en3.composer)),y.en3.composer.addPass=(...n)=>{M(this,ct,zt).call(this,n[0]),s(this,Ce).call(this,...n)},P(this,je,y.en3.composer.removePass=y.en3.composer.removePass.bind(y.en3.composer)),y.en3.composer.removePass=(...n)=>{M(this,_t,Sn).call(this,n[0]),s(this,je).call(this,...n)},P(this,ke,y.en3.composer.insertPass=y.en3.composer.insertPass.bind(y.en3.composer)),y.en3.composer.insertPass=(...n)=>{M(this,ct,zt).call(this,n[0]),s(this,ke).call(this,...n)}}destroy(){y.en3.composer.addPass=s(this,Ce),y.en3.composer.removePass=s(this,je),y.en3.composer.insertPass=s(this,ke),s(this,Re).forEach(n=>{n.destroy()})}}Ce=new WeakMap,je=new WeakMap,ke=new WeakMap,Re=new WeakMap,ct=new WeakSet,zt=function(n){s(this,Re).push(new pe(n,{folderName:`EffectComposer.${n.constructor.name}`,skipKeys:["renderToScreen","needsSwap","nMips","oldClearAlpha","clearColor","resolution"]})),"uniforms"in n&&s(this,Re).push(new pe(n.uniforms,{folderName:`EffectComposer.${n.constructor.name}.Uniforms`,optionsCatalog:{maxblur:{type:"number",min:0,max:1,step:1e-5,ease:.1},aperture:{type:"number",min:0,max:.01,step:1e-6},focus:{type:"number",min:0,step:.01}},skipKeys:["time","resolution"]}))},_t=new WeakSet,Sn=function(n){};var lt,ht,pt,mt,He,xe,Ye;class wo{constructor(){u(this,lt,void 0);u(this,ht,void 0);u(this,pt,null);u(this,mt,void 0);u(this,He,void 0);u(this,xe,void 0);u(this,Ye,void 0);P(this,lt,new pe(y.en3.webglRenderer,{folderName:"Renderer"})),P(this,ht,new pe(y.en3.webglRenderer.shadowMap,{folderName:"Renderer.shadowMap",optionsCatalog:{type:{type:"select",variants:["BasicShadowMap","PCFShadowMap","PCFSoftShadowMap","VSMShadowMap"]}},afterChange:()=>{y.en3.webglRenderer.shadowMap.needsUpdate=!0,Fn.traverseMaterials(y.en3.scene,n=>{n.needsUpdate=!0})}})),y.en3.composer&&P(this,pt,new bo),P(this,mt,new fo),P(this,He,new Nt(y.en3.camera)),P(this,xe,new uo),s(this,xe).controls.addEventListener("change",()=>{s(this,He).save()}),P(this,Ye,new yo),s(this,Ye).controls.addEventListener("dragging-changed",n=>{s(this,xe).controls.enabled=!n.value})}destroy(){var n;s(this,lt).destroy(),s(this,ht).destroy(),(n=s(this,pt))==null||n.destroy(),s(this,mt).destroy(),s(this,He).destroy(),s(this,xe).destroy(),s(this,Ye).destroy()}}lt=new WeakMap,ht=new WeakMap,pt=new WeakMap,mt=new WeakMap,He=new WeakMap,xe=new WeakMap,Ye=new WeakMap;exports.En3Helpers=wo;exports.En3Object3dManager=Nt;
1
+ "use strict";var zn=Object.defineProperty;var nn=Object.getOwnPropertySymbols;var Nn=Object.prototype.hasOwnProperty,Xn=Object.prototype.propertyIsEnumerable;var on=(m,n,a)=>n in m?zn(m,n,{enumerable:!0,configurable:!0,writable:!0,value:a}):m[n]=a,ae=(m,n)=>{for(var a in n||(n={}))Nn.call(n,a)&&on(m,a,n[a]);if(nn)for(var a of nn(n))Xn.call(n,a)&&on(m,a,n[a]);return m};var Ot=(m,n,a)=>{if(!n.has(m))throw TypeError("Cannot "+a)};var s=(m,n,a)=>(Ot(m,n,"read from private field"),a?a.call(m):n.get(m)),u=(m,n,a)=>{if(n.has(m))throw TypeError("Cannot add the same private member more than once");n instanceof WeakSet?n.add(m):n.set(m,a)},P=(m,n,a,e)=>(Ot(m,n,"write to private field"),e?e.call(m,a):n.set(m,a),a);var M=(m,n,a)=>(Ot(m,n,"access private method"),a);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("../../en3-CBBYE8rb.cjs"),N=require("../../Store-Cr3VaD9G.cjs"),t=require("three"),Zn=require("../../object-CCiXnER2.cjs"),sn=require("../../ticker/index.cjs"),Gn=require("../../Composed-Iihn8fT4.cjs"),Fn=require("../../traverseMaterials-BtBXV88O.cjs");function Vn(m){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(m){for(const a in m)if(a!=="default"){const e=Object.getOwnPropertyDescriptor(m,a);Object.defineProperty(n,a,e.get?e:{enumerable:!0,get:()=>m[a]})}}return n.default=m,Object.freeze(n)}const fe=Vn(t),Qn=["AddEquation","SubtractEquation","ReverseSubtractEquation","MinEquation","MaxEquation"],yn=["ZeroFactor","OneFactor","SrcColorFactor","OneMinusSrcColorFactor","SrcAlphaFactor","OneMinusSrcAlphaFactor","DstAlphaFactor","OneMinusDstAlphaFactor","DstColorFactor","OneMinusDstColorFactor","SrcAlphaSaturateFactor","ConstantColorFactor","OneMinusConstantColorFactor","ConstantAlphaFactor","OneMinusConstantAlphaFactor"],qn=[...yn,"SrcAlphaSaturateFactor"],Un=["NoBlending","NormalBlending","AdditiveBlending","SubtractiveBlending","MultiplyBlending","CustomBlending"],Bn=["NeverDepth","AlwaysDepth","EqualDepth","LessDepth","LessEqualDepth ","GreaterEqualDepth ","GreaterDepth","NotEqualDepth"],Wn=["NeverStencilFunc","LessStencilFunc","EqualStencilFunc","LessEqualStencilFunc ","GreaterStencilFunc","NotEqualStencilFunc ","GreaterEqualStencilFunc","AlwaysStencilFunc"],Dt=["ZeroStencilOp","KeepStencilOp","ReplaceStencilOp","IncrementStencilOp","DecrementStencilOp","IncrementWrapStencilOp","DecrementWrapStencilOp","InvertStencilOp"],Kn=["FrontSide","BackSide","DoubleSide"],$n=["TangentSpaceNormalMap","ObjectSpaceNormalMap"],Jn=["round","bevel","miter"],eo=["NoToneMapping","LinearToneMapping","ReinhardToneMapping","CineonToneMapping","ACESFilmicToneMapping","AgXToneMapping","NeutralToneMapping","CustomToneMapping"],to={intensity:{type:"number",min:0,max:20,step:1e-4},renderOrder:{type:"number",step:1},alphaTest:{type:"number",min:0,max:1,step:.001},blendAlpha:{type:"number",min:0,max:1,step:.001},blendDst:{type:"select",variants:qn},blendDstAlpha:{type:"number",min:0,max:1,step:.001},blendEquation:{type:"select",variants:Qn},blendEquationAlpha:{type:"number",min:0,max:1,step:.001},blending:{type:"select",variants:Un},blendSrc:{type:"select",variants:yn},blendSrcAlpha:{type:"number",min:0,max:1,step:.001},depthFunc:{type:"select",variants:Bn},stencilFunc:{type:"select",variants:Wn},stencilRef:{type:"number",min:0,step:1},stencilFail:{type:"select",variants:Dt},stencilZFail:{type:"select",variants:Dt},stencilZPass:{type:"select",variants:Dt},opacity:{type:"number",min:0,max:1,step:1e-4},side:{type:"select",variants:Kn},roughness:{type:"number",min:0,max:1,step:1e-4},metalness:{type:"number",min:0,max:1,step:1e-4},lightMapIntensity:{type:"number",min:0,max:20,step:1e-4},aoMapIntensity:{type:"number",min:0,max:20,step:1e-4},bumpScale:{type:"number",min:0,step:1e-4},normalMapType:{type:"select",variants:$n},wireframeLinejoin:{type:"select",variants:Jn},envMapIntensity:{type:"number",min:0,max:20,step:1e-4},emissiveIntensity:{type:"number",min:0,max:20,step:1e-4},fov:{type:"number",min:0,max:180,step:1},zoom:{type:"number",min:0,step:1e-4},near:{type:"number",min:0,step:1e-4},far:{type:"number",min:0,step:1},filmGauge:{type:"number",min:0,step:1e-4},filmOffset:{type:"number",min:0,step:1e-4},distance:{type:"number",min:0,step:.1},decay:{type:"number",min:0,step:1e-5,ease:.001},focus:{type:"number",min:0,max:1,step:1e-5},bias:{type:"number",min:0,max:.01,step:1e-6,ease:.01},blurSamples:{type:"number",min:0,step:1},normalBias:{type:"number",min:0,step:.001,ease:.01},radius:{type:"number",min:0,step:.001,ease:.01},penumbra:{type:"number",min:0,max:1,step:1e-6},power:{type:"number",min:0,step:.001,ease:.01},angle:{type:"number",min:0,step:1e-6,ease:.001},toneMapping:{type:"select",variants:eo},toneMappingExposure:{type:"number",min:0,step:.001,ease:.1},mapSize:{type:"number",min:0,step:1},damp:{type:"number",min:0,max:1,step:1e-6},strength:{type:"number",min:0,step:.01},threshold:{type:"number",min:0,max:1,step:1e-4}},no=new Set(["stencilFuncMask","needsUpdate","version","wireframeLinewidth","position","scale","rotation","coordinateSystem","aspect","autoUpdate","up"]);var Le,te,St,bn,Pt,wn,xt,gn,vt,Mn,Tt,En,qe,Rt,Ue,Ht,ne,be,oe,we;class pe{constructor(n,a){u(this,St);u(this,Pt);u(this,xt);u(this,vt);u(this,Tt);u(this,qe);u(this,Ue);u(this,ne);u(this,oe);u(this,Le,void 0);u(this,te,[]);P(this,Le,n);const e=ae(ae({},to),a==null?void 0:a.optionsCatalog),r=new Set([...no,...(a==null?void 0:a.skipKeys)||[]]),c=(a==null?void 0:a.folderName)||s(this,Le).name,i=a==null?void 0:a.afterChange;M(this,St,bn).call(this,{subject:s(this,Le),skipKeys:r,optionsCatalog:e,folderKey:c,afterChange:i})}destroy(){s(this,te).forEach(n=>{n.close()})}}Le=new WeakMap,te=new WeakMap,St=new WeakSet,bn=function(n){const{subject:a,folderKey:e,optionsCatalog:r,afterChange:c,skipKeys:i}=n;for(const l in a){if(l.startsWith("_")||i.has(l))continue;const d=a[l],p=M(this,ne,be).call(this,d),f=`${e}.${l}`,w=r[l];typeof p=="number"?(w==null?void 0:w.type)==="select"?M(this,qe,Rt).call(this,{name:f,value:d,subject:a,key:l,managerOptions:w,afterChange:c}):M(this,Pt,wn).call(this,{name:f,value:d,subject:a,key:l,managerOptions:w,afterChange:c}):p instanceof fe.Vector2||p instanceof fe.Vector3?M(this,xt,gn).call(this,{name:f,value:d,subject:a,key:l,managerOptions:w,afterChange:c}):typeof p=="boolean"&&!l.startsWith("is")&&!l.startsWith("matrix")?M(this,vt,Mn).call(this,{name:f,value:d,subject:a,key:l,managerOptions:w,afterChange:c}):p instanceof fe.Color?M(this,Tt,En).call(this,{name:f,value:d,subject:a,key:l,managerOptions:w,afterChange:c}):w&&(w==null?void 0:w.type)==="select"&&M(this,qe,Rt).call(this,{name:f,value:d,subject:a,key:l,managerOptions:w,afterChange:c})}},Pt=new WeakSet,wn=function({name:n,value:a,subject:e,key:r,managerOptions:c,afterChange:i}){const l=new N.Store(M(this,ne,be).call(this,a),{passport:{name:n,manager:ae({type:"number"},c)}});l.subscribe(d=>{M(this,oe,we).call(this,e,r,(p,f)=>p[f]=d.current),i==null||i()}),s(this,te).push(l)},xt=new WeakSet,gn=function({name:n,value:a,subject:e,key:r,managerOptions:c,afterChange:i}){const l=p=>{const f=[p.x,p.y];return p instanceof fe.Vector3&&f.push(p.z),f},d=new N.Store(l(M(this,ne,be).call(this,a)),{passport:{name:n,manager:ae({type:"number"},c)}});d.subscribe(p=>{M(this,oe,we).call(this,e,r,(f,w)=>f[w].set(...p.current)),i==null||i()}),s(this,te).push(d)},vt=new WeakSet,Mn=function({name:n,value:a,subject:e,key:r,managerOptions:c,afterChange:i}){const l=new N.Store(M(this,ne,be).call(this,a),{passport:{name:n,manager:ae({type:"boolean"},c)}});l.subscribe(d=>{M(this,oe,we).call(this,e,r,(p,f)=>p[f]=d.current),i==null||i()}),s(this,te).push(l)},Tt=new WeakSet,En=function({name:n,value:a,subject:e,key:r,managerOptions:c,afterChange:i}){const l=new N.Store(`#${M(this,ne,be).call(this,a).getHexString()}`,{passport:{name:n,manager:ae({type:"color"},c)}});l.subscribe(d=>{M(this,oe,we).call(this,e,r,(p,f)=>p[f]=new fe.Color(d.current)),i==null||i()}),s(this,te).push(l)},qe=new WeakSet,Rt=function({name:n,value:a,subject:e,key:r,managerOptions:c,afterChange:i}){const l=c==null?void 0:c.variants;if(l){let d=null;for(const f of l)a===fe[f]&&(d=f);const p=new N.Store(d||M(this,ne,be).call(this,a),{passport:{name:n,manager:ae({},c)}});p.subscribe(f=>{typeof f.current=="string"&&(f.current[0]===f.current[0].toUpperCase()?M(this,oe,we).call(this,e,r,(w,A)=>w[A]=fe[f.current]):M(this,oe,we).call(this,e,r,(w,A)=>w[A]=f.current)),i==null||i()}),s(this,te).push(p)}},Ue=new WeakSet,Ht=function(n){return Zn.isObject(n)&&"value"in n},ne=new WeakSet,be=function(n){return M(this,Ue,Ht).call(this,n)?n.value:n},oe=new WeakSet,we=function(n,a,e){M(this,Ue,Ht).call(this,n[a])?e(n[a],"value"):e(n,a)};var g,ce,Me,Ee,Se,Be,q,Oe,Mt,We;class Nt{constructor(n,a){u(this,Oe);u(this,g,void 0);u(this,ce,[]);u(this,Me,void 0);u(this,Ee,void 0);u(this,Se,void 0);u(this,Be,!0);u(this,q,[]);u(this,We,()=>{s(this,q).forEach(n=>{"update"in n&&n.update()})});var l,d;P(this,g,n);let e=!1;n.name.startsWith("T.")&&(n.name=n.name.slice(2)),n.name.includes("P.")&&(e=!0,n.name=n.name.replace("P.",""));const r=n.name;s(this,g).userData.controlled=!0;const c=(a==null?void 0:a.step)||1e-4,i=((l=n.userData)==null?void 0:l.box)||n;if(s(this,g)instanceof t.Light){let p;s(this,g)instanceof t.PointLight?p=new t.PointLightHelper(s(this,g),100):s(this,g)instanceof t.DirectionalLight?(s(this,g).scale.setScalar(100),p=new t.DirectionalLightHelper(s(this,g),1)):s(this,g)instanceof t.SpotLight?p=new t.SpotLightHelper(s(this,g)):s(this,g)instanceof t.HemisphereLight&&(p=new t.HemisphereLightHelper(s(this,g),100)),s(this,q).push(p);const f=(d=s(this,g).shadow)==null?void 0:d.camera;if(f instanceof t.Camera){const w=new t.CameraHelper(f);s(this,q).push(w)}}if(s(this,q).forEach(p=>{y.en3.view.add(p)}),P(this,Me,new N.Store([i.position.x,i.position.y,i.position.z],{passport:{name:`${r}.Transformation.Position`,manager:{type:"number",step:c}}})),P(this,Ee,new N.Store([i.rotation.x,i.rotation.y,i.rotation.z],{passport:{name:`${r}.Transformation.Rotation`,manager:{type:"number",step:c,ease:.01}}})),P(this,Se,new N.Store([i.scale.x,i.scale.y,i.scale.z],{passport:{name:`${r}.Transformation.Scale`,manager:{type:"number",step:c}}})),this.save(),P(this,Be,!1),s(this,Me).subscribe(p=>{M(this,Oe,Mt).call(this,"position",p.current)}),s(this,Ee).subscribe(p=>{M(this,Oe,Mt).call(this,"rotation",p.current)}),s(this,Se).subscribe(p=>{M(this,Oe,Mt).call(this,"scale",p.current)}),e){if(s(this,ce).push(new pe(s(this,g),{folderName:`${s(this,g).name}.Parameters`,afterChange:s(this,g)instanceof t.Camera?()=>{y.en3.view.resize()}:void 0})),s(this,g)instanceof t.Mesh){const p=s(this,g).material;p instanceof t.Material&&s(this,ce).push(new pe(p,{folderName:`${s(this,g).name}.Parameters.Material`,afterChange:()=>{p.needsUpdate=!0}}))}else if(s(this,g)instanceof t.Light){const p=s(this,g).shadow;p&&s(this,ce).push(new pe(p,{folderName:`${s(this,g).name}.Parameters.Shadow`,afterChange:()=>{p.needsUpdate=!0}})),p.camera&&s(this,ce).push(new pe(p,{folderName:`${s(this,g).name}.Parameters.Shadow.Camera`,afterChange:()=>{p.camera.updateProjectionMatrix()}}))}}s(this,q).length&&sn.ticker.subscribe(s(this,We))}get object3d(){return s(this,g)}get helpers(){return s(this,q)}get raycasterTarget(){return s(this,q)[0]||s(this,g)}destroy(){s(this,ce).forEach(n=>n.destroy()),s(this,Me).close(),s(this,Ee).close(),s(this,Se).close(),s(this,g).userData.controlled=!1,s(this,q).forEach(n=>{n&&"dispose"in n&&(n.dispose(),y.en3.view.remove(n))}),sn.ticker.unsubscribe(s(this,We))}save(){const n=(a,e)=>{(!s(this,Be)||a.initial===a.current)&&(a.current=[e.x,e.y,e.z])};n(s(this,Me),s(this,g).position),n(s(this,Ee),s(this,g).rotation),n(s(this,Se),s(this,g).scale)}}g=new WeakMap,ce=new WeakMap,Me=new WeakMap,Ee=new WeakMap,Se=new WeakMap,Be=new WeakMap,q=new WeakMap,Oe=new WeakSet,Mt=function(n,a){const e=s(this,g).userData.box;if(e){const r=c=>({x:a[0]-c.x,y:a[1]-c.y,z:a[2]-c.z});n==="position"?e.setPositionStep("_manager","+",r(e.getIncludedPositionSteps("_manager"))):n==="rotation"?e.setRotationStep("_manager","+",r(e.getIncludedRotationSteps("_manager"))):n==="scale"&&e.setScaleStep("_manager","+",r(e.getIncludedScaleSteps("_manager")))}else s(this,g)[n].set(...a)},We=new WeakMap;const an={type:"change"},Ct={type:"start"},rn={type:"end"},yt=new t.Ray,cn=new t.Plane,oo=Math.cos(70*t.MathUtils.DEG2RAD);class io extends t.EventDispatcher{constructor(n,a){super(),this.object=n,this.domElement=a,this.domElement.style.touchAction="none",this.enabled=!0,this.target=new t.Vector3,this.cursor=new t.Vector3,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minTargetRadius=0,this.maxTargetRadius=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!0,this.keyPanSpeed=7,this.zoomToCursor=!1,this.autoRotate=!1,this.autoRotateSpeed=2,this.keys={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"},this.mouseButtons={LEFT:t.MOUSE.ROTATE,MIDDLE:t.MOUSE.DOLLY,RIGHT:t.MOUSE.PAN},this.touches={ONE:t.TOUCH.ROTATE,TWO:t.TOUCH.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this.getPolarAngle=function(){return l.phi},this.getAzimuthalAngle=function(){return l.theta},this.getDistance=function(){return this.object.position.distanceTo(this.target)},this.listenToKeyEvents=function(o){o.addEventListener("keydown",Lt),this._domElementKeyEvents=o},this.stopListenToKeyEvents=function(){this._domElementKeyEvents.removeEventListener("keydown",Lt),this._domElementKeyEvents=null},this.saveState=function(){e.target0.copy(e.target),e.position0.copy(e.object.position),e.zoom0=e.object.zoom},this.reset=function(){e.target.copy(e.target0),e.object.position.copy(e.position0),e.object.zoom=e.zoom0,e.object.updateProjectionMatrix(),e.dispatchEvent(an),e.update(),c=r.NONE},this.update=function(){const o=new t.Vector3,h=new t.Quaternion().setFromUnitVectors(n.up,new t.Vector3(0,1,0)),b=h.clone().invert(),S=new t.Vector3,z=new t.Quaternion,se=new t.Vector3,G=2*Math.PI;return function(Yn=null){const en=e.object.position;o.copy(en).sub(e.target),o.applyQuaternion(h),l.setFromVector3(o),e.autoRotate&&c===r.NONE&&ue(It(Yn)),e.enableDamping?(l.theta+=d.theta*e.dampingFactor,l.phi+=d.phi*e.dampingFactor):(l.theta+=d.theta,l.phi+=d.phi);let $=e.minAzimuthAngle,J=e.maxAzimuthAngle;isFinite($)&&isFinite(J)&&($<-Math.PI?$+=G:$>Math.PI&&($-=G),J<-Math.PI?J+=G:J>Math.PI&&(J-=G),$<=J?l.theta=Math.max($,Math.min(J,l.theta)):l.theta=l.theta>($+J)/2?Math.max($,l.theta):Math.min(J,l.theta)),l.phi=Math.max(e.minPolarAngle,Math.min(e.maxPolarAngle,l.phi)),l.makeSafe(),e.enableDamping===!0?e.target.addScaledVector(f,e.dampingFactor):e.target.add(f),e.target.sub(e.cursor),e.target.clampLength(e.minTargetRadius,e.maxTargetRadius),e.target.add(e.cursor);let Xe=!1;if(e.zoomToCursor&&ve||e.object.isOrthographicCamera)l.radius=ie(l.radius);else{const ee=l.radius;l.radius=ie(l.radius*p),Xe=ee!=l.radius}if(o.setFromSpherical(l),o.applyQuaternion(b),en.copy(e.target).add(o),e.object.lookAt(e.target),e.enableDamping===!0?(d.theta*=1-e.dampingFactor,d.phi*=1-e.dampingFactor,f.multiplyScalar(1-e.dampingFactor)):(d.set(0,0,0),f.set(0,0,0)),e.zoomToCursor&&ve){let ee=null;if(e.object.isPerspectiveCamera){const Ze=o.length();ee=ie(Ze*p);const ft=Ze-ee;e.object.position.addScaledVector(W,ft),e.object.updateMatrixWorld(),Xe=!!ft}else if(e.object.isOrthographicCamera){const Ze=new t.Vector3(j.x,j.y,0);Ze.unproject(e.object);const ft=e.object.zoom;e.object.zoom=Math.max(e.minZoom,Math.min(e.maxZoom,e.object.zoom/p)),e.object.updateProjectionMatrix(),Xe=ft!==e.object.zoom;const tn=new t.Vector3(j.x,j.y,0);tn.unproject(e.object),e.object.position.sub(tn).add(Ze),e.object.updateMatrixWorld(),ee=o.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),e.zoomToCursor=!1;ee!==null&&(this.screenSpacePanning?e.target.set(0,0,-1).transformDirection(e.object.matrix).multiplyScalar(ee).add(e.object.position):(yt.origin.copy(e.object.position),yt.direction.set(0,0,-1).transformDirection(e.object.matrix),Math.abs(e.object.up.dot(yt.direction))<oo?n.lookAt(e.target):(cn.setFromNormalAndCoplanarPoint(e.object.up,e.target),yt.intersectPlane(cn,e.target))))}else if(e.object.isOrthographicCamera){const ee=e.object.zoom;e.object.zoom=Math.max(e.minZoom,Math.min(e.maxZoom,e.object.zoom/p)),ee!==e.object.zoom&&(e.object.updateProjectionMatrix(),Xe=!0)}return p=1,ve=!1,Xe||S.distanceToSquared(e.object.position)>i||8*(1-z.dot(e.object.quaternion))>i||se.distanceToSquared(e.target)>i?(e.dispatchEvent(an),S.copy(e.object.position),z.copy(e.object.quaternion),se.copy(e.target),!0):!1}}(),this.dispose=function(){e.domElement.removeEventListener("contextmenu",$t),e.domElement.removeEventListener("pointerdown",qt),e.domElement.removeEventListener("pointercancel",Ne),e.domElement.removeEventListener("wheel",Ut),e.domElement.removeEventListener("pointermove",At),e.domElement.removeEventListener("pointerup",Ne),e.domElement.getRootNode().removeEventListener("keydown",Bt,{capture:!0}),e._domElementKeyEvents!==null&&(e._domElementKeyEvents.removeEventListener("keydown",Lt),e._domElementKeyEvents=null)};const e=this,r={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let c=r.NONE;const i=1e-6,l=new t.Spherical,d=new t.Spherical;let p=1;const f=new t.Vector3,w=new t.Vector2,A=new t.Vector2,B=new t.Vector2,X=new t.Vector2,L=new t.Vector2,C=new t.Vector2,O=new t.Vector2,v=new t.Vector2,T=new t.Vector2,W=new t.Vector3,j=new t.Vector2;let ve=!1;const _=[],me={};let ze=!1;function It(o){return o!==null?2*Math.PI/60*e.autoRotateSpeed*o:2*Math.PI/60/60*e.autoRotateSpeed}function Te(o){const h=Math.abs(o*.01);return Math.pow(.95,e.zoomSpeed*h)}function ue(o){d.theta-=o}function _e(o){d.phi-=o}const Z=function(){const o=new t.Vector3;return function(b,S){o.setFromMatrixColumn(S,0),o.multiplyScalar(-b),f.add(o)}}(),H=function(){const o=new t.Vector3;return function(b,S){e.screenSpacePanning===!0?o.setFromMatrixColumn(S,1):(o.setFromMatrixColumn(S,0),o.crossVectors(e.object.up,o)),o.multiplyScalar(b),f.add(o)}}(),Q=function(){const o=new t.Vector3;return function(b,S){const z=e.domElement;if(e.object.isPerspectiveCamera){const se=e.object.position;o.copy(se).sub(e.target);let G=o.length();G*=Math.tan(e.object.fov/2*Math.PI/180),Z(2*b*G/z.clientHeight,e.object.matrix),H(2*S*G/z.clientHeight,e.object.matrix)}else e.object.isOrthographicCamera?(Z(b*(e.object.right-e.object.left)/e.object.zoom/z.clientWidth,e.object.matrix),H(S*(e.object.top-e.object.bottom)/e.object.zoom/z.clientHeight,e.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),e.enablePan=!1)}}();function Y(o){e.object.isPerspectiveCamera||e.object.isOrthographicCamera?p/=o:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),e.enableZoom=!1)}function K(o){e.object.isPerspectiveCamera||e.object.isOrthographicCamera?p*=o:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),e.enableZoom=!1)}function I(o,h){if(!e.zoomToCursor)return;ve=!0;const b=e.domElement.getBoundingClientRect(),S=o-b.left,z=h-b.top,se=b.width,G=b.height;j.x=S/se*2-1,j.y=-(z/G)*2+1,W.set(j.x,j.y,1).unproject(e.object).sub(e.object.position).normalize()}function ie(o){return Math.max(e.minDistance,Math.min(e.maxDistance,o))}function de(o){w.set(o.clientX,o.clientY)}function Ie(o){I(o.clientX,o.clientX),O.set(o.clientX,o.clientY)}function ut(o){X.set(o.clientX,o.clientY)}function dt(o){A.set(o.clientX,o.clientY),B.subVectors(A,w).multiplyScalar(e.rotateSpeed);const h=e.domElement;ue(2*Math.PI*B.x/h.clientHeight),_e(2*Math.PI*B.y/h.clientHeight),w.copy(A),e.update()}function Pn(o){v.set(o.clientX,o.clientY),T.subVectors(v,O),T.y>0?Y(Te(T.y)):T.y<0&&K(Te(T.y)),O.copy(v),e.update()}function xn(o){L.set(o.clientX,o.clientY),C.subVectors(L,X).multiplyScalar(e.panSpeed),Q(C.x,C.y),X.copy(L),e.update()}function vn(o){I(o.clientX,o.clientY),o.deltaY<0?K(Te(o.deltaY)):o.deltaY>0&&Y(Te(o.deltaY)),e.update()}function Tn(o){let h=!1;switch(o.code){case e.keys.UP:o.ctrlKey||o.metaKey||o.shiftKey?_e(2*Math.PI*e.rotateSpeed/e.domElement.clientHeight):Q(0,e.keyPanSpeed),h=!0;break;case e.keys.BOTTOM:o.ctrlKey||o.metaKey||o.shiftKey?_e(-2*Math.PI*e.rotateSpeed/e.domElement.clientHeight):Q(0,-e.keyPanSpeed),h=!0;break;case e.keys.LEFT:o.ctrlKey||o.metaKey||o.shiftKey?ue(2*Math.PI*e.rotateSpeed/e.domElement.clientHeight):Q(e.keyPanSpeed,0),h=!0;break;case e.keys.RIGHT:o.ctrlKey||o.metaKey||o.shiftKey?ue(-2*Math.PI*e.rotateSpeed/e.domElement.clientHeight):Q(-e.keyPanSpeed,0),h=!0;break}h&&(o.preventDefault(),e.update())}function Xt(o){if(_.length===1)w.set(o.pageX,o.pageY);else{const h=Ae(o),b=.5*(o.pageX+h.x),S=.5*(o.pageY+h.y);w.set(b,S)}}function Zt(o){if(_.length===1)X.set(o.pageX,o.pageY);else{const h=Ae(o),b=.5*(o.pageX+h.x),S=.5*(o.pageY+h.y);X.set(b,S)}}function Gt(o){const h=Ae(o),b=o.pageX-h.x,S=o.pageY-h.y,z=Math.sqrt(b*b+S*S);O.set(0,z)}function _n(o){e.enableZoom&&Gt(o),e.enablePan&&Zt(o)}function In(o){e.enableZoom&&Gt(o),e.enableRotate&&Xt(o)}function Ft(o){if(_.length==1)A.set(o.pageX,o.pageY);else{const b=Ae(o),S=.5*(o.pageX+b.x),z=.5*(o.pageY+b.y);A.set(S,z)}B.subVectors(A,w).multiplyScalar(e.rotateSpeed);const h=e.domElement;ue(2*Math.PI*B.x/h.clientHeight),_e(2*Math.PI*B.y/h.clientHeight),w.copy(A)}function Vt(o){if(_.length===1)L.set(o.pageX,o.pageY);else{const h=Ae(o),b=.5*(o.pageX+h.x),S=.5*(o.pageY+h.y);L.set(b,S)}C.subVectors(L,X).multiplyScalar(e.panSpeed),Q(C.x,C.y),X.copy(L)}function Qt(o){const h=Ae(o),b=o.pageX-h.x,S=o.pageY-h.y,z=Math.sqrt(b*b+S*S);v.set(0,z),T.set(0,Math.pow(v.y/O.y,e.zoomSpeed)),Y(T.y),O.copy(v);const se=(o.pageX+h.x)*.5,G=(o.pageY+h.y)*.5;I(se,G)}function An(o){e.enableZoom&&Qt(o),e.enablePan&&Vt(o)}function Ln(o){e.enableZoom&&Qt(o),e.enableRotate&&Ft(o)}function qt(o){e.enabled!==!1&&(_.length===0&&(e.domElement.setPointerCapture(o.pointerId),e.domElement.addEventListener("pointermove",At),e.domElement.addEventListener("pointerup",Ne)),!Hn(o)&&(kn(o),o.pointerType==="touch"?Kt(o):On(o)))}function At(o){e.enabled!==!1&&(o.pointerType==="touch"?jn(o):Dn(o))}function Ne(o){switch(Rn(o),_.length){case 0:e.domElement.releasePointerCapture(o.pointerId),e.domElement.removeEventListener("pointermove",At),e.domElement.removeEventListener("pointerup",Ne),e.dispatchEvent(rn),c=r.NONE;break;case 1:const h=_[0],b=me[h];Kt({pointerId:h,pageX:b.x,pageY:b.y});break}}function On(o){let h;switch(o.button){case 0:h=e.mouseButtons.LEFT;break;case 1:h=e.mouseButtons.MIDDLE;break;case 2:h=e.mouseButtons.RIGHT;break;default:h=-1}switch(h){case t.MOUSE.DOLLY:if(e.enableZoom===!1)return;Ie(o),c=r.DOLLY;break;case t.MOUSE.ROTATE:if(o.ctrlKey||o.metaKey||o.shiftKey){if(e.enablePan===!1)return;ut(o),c=r.PAN}else{if(e.enableRotate===!1)return;de(o),c=r.ROTATE}break;case t.MOUSE.PAN:if(o.ctrlKey||o.metaKey||o.shiftKey){if(e.enableRotate===!1)return;de(o),c=r.ROTATE}else{if(e.enablePan===!1)return;ut(o),c=r.PAN}break;default:c=r.NONE}c!==r.NONE&&e.dispatchEvent(Ct)}function Dn(o){switch(c){case r.ROTATE:if(e.enableRotate===!1)return;dt(o);break;case r.DOLLY:if(e.enableZoom===!1)return;Pn(o);break;case r.PAN:if(e.enablePan===!1)return;xn(o);break}}function Ut(o){e.enabled===!1||e.enableZoom===!1||c!==r.NONE||(o.preventDefault(),e.dispatchEvent(Ct),vn(Cn(o)),e.dispatchEvent(rn))}function Cn(o){const h=o.deltaMode,b={clientX:o.clientX,clientY:o.clientY,deltaY:o.deltaY};switch(h){case 1:b.deltaY*=16;break;case 2:b.deltaY*=100;break}return o.ctrlKey&&!ze&&(b.deltaY*=10),b}function Bt(o){o.key==="Control"&&(ze=!0,e.domElement.getRootNode().addEventListener("keyup",Wt,{passive:!0,capture:!0}))}function Wt(o){o.key==="Control"&&(ze=!1,e.domElement.getRootNode().removeEventListener("keyup",Wt,{passive:!0,capture:!0}))}function Lt(o){e.enabled===!1||e.enablePan===!1||Tn(o)}function Kt(o){switch(Jt(o),_.length){case 1:switch(e.touches.ONE){case t.TOUCH.ROTATE:if(e.enableRotate===!1)return;Xt(o),c=r.TOUCH_ROTATE;break;case t.TOUCH.PAN:if(e.enablePan===!1)return;Zt(o),c=r.TOUCH_PAN;break;default:c=r.NONE}break;case 2:switch(e.touches.TWO){case t.TOUCH.DOLLY_PAN:if(e.enableZoom===!1&&e.enablePan===!1)return;_n(o),c=r.TOUCH_DOLLY_PAN;break;case t.TOUCH.DOLLY_ROTATE:if(e.enableZoom===!1&&e.enableRotate===!1)return;In(o),c=r.TOUCH_DOLLY_ROTATE;break;default:c=r.NONE}break;default:c=r.NONE}c!==r.NONE&&e.dispatchEvent(Ct)}function jn(o){switch(Jt(o),c){case r.TOUCH_ROTATE:if(e.enableRotate===!1)return;Ft(o),e.update();break;case r.TOUCH_PAN:if(e.enablePan===!1)return;Vt(o),e.update();break;case r.TOUCH_DOLLY_PAN:if(e.enableZoom===!1&&e.enablePan===!1)return;An(o),e.update();break;case r.TOUCH_DOLLY_ROTATE:if(e.enableZoom===!1&&e.enableRotate===!1)return;Ln(o),e.update();break;default:c=r.NONE}}function $t(o){e.enabled!==!1&&o.preventDefault()}function kn(o){_.push(o.pointerId)}function Rn(o){delete me[o.pointerId];for(let h=0;h<_.length;h++)if(_[h]==o.pointerId){_.splice(h,1);return}}function Hn(o){for(let h=0;h<_.length;h++)if(_[h]==o.pointerId)return!0;return!1}function Jt(o){let h=me[o.pointerId];h===void 0&&(h=new t.Vector2,me[o.pointerId]=h),h.set(o.pageX,o.pageY)}function Ae(o){const h=o.pointerId===_[0]?_[1]:_[0];return me[h]}e.domElement.addEventListener("contextmenu",$t),e.domElement.addEventListener("pointerdown",qt),e.domElement.addEventListener("pointercancel",Ne),e.domElement.addEventListener("wheel",Ut,{passive:!1}),e.domElement.getRootNode().addEventListener("keydown",Bt,{passive:!0,capture:!0}),this.update()}}const ye=new t.Raycaster,R=new t.Vector3,re=new t.Vector3,x=new t.Quaternion,ln={X:new t.Vector3(1,0,0),Y:new t.Vector3(0,1,0),Z:new t.Vector3(0,0,1)},jt={type:"change"},hn={type:"mouseDown",mode:null},pn={type:"mouseUp",mode:null},mn={type:"objectChange"};class so extends t.Object3D{constructor(n,a){super(),a===void 0&&(console.warn('THREE.TransformControls: The second parameter "domElement" is now mandatory.'),a=document),this.isTransformControls=!0,this.visible=!1,this.domElement=a,this.domElement.style.touchAction="none";const e=new po;this._gizmo=e,this.add(e);const r=new mo;this._plane=r,this.add(r);const c=this;function i(v,T){let W=T;Object.defineProperty(c,v,{get:function(){return W!==void 0?W:T},set:function(j){W!==j&&(W=j,r[v]=j,e[v]=j,c.dispatchEvent({type:v+"-changed",value:j}),c.dispatchEvent(jt))}}),c[v]=T,r[v]=T,e[v]=T}i("camera",n),i("object",void 0),i("enabled",!0),i("axis",null),i("mode","translate"),i("translationSnap",null),i("rotationSnap",null),i("scaleSnap",null),i("space","world"),i("size",1),i("dragging",!1),i("showX",!0),i("showY",!0),i("showZ",!0);const l=new t.Vector3,d=new t.Vector3,p=new t.Quaternion,f=new t.Quaternion,w=new t.Vector3,A=new t.Quaternion,B=new t.Vector3,X=new t.Vector3,L=new t.Vector3,C=0,O=new t.Vector3;i("worldPosition",l),i("worldPositionStart",d),i("worldQuaternion",p),i("worldQuaternionStart",f),i("cameraPosition",w),i("cameraQuaternion",A),i("pointStart",B),i("pointEnd",X),i("rotationAxis",L),i("rotationAngle",C),i("eye",O),this._offset=new t.Vector3,this._startNorm=new t.Vector3,this._endNorm=new t.Vector3,this._cameraScale=new t.Vector3,this._parentPosition=new t.Vector3,this._parentQuaternion=new t.Quaternion,this._parentQuaternionInv=new t.Quaternion,this._parentScale=new t.Vector3,this._worldScaleStart=new t.Vector3,this._worldQuaternionInv=new t.Quaternion,this._worldScale=new t.Vector3,this._positionStart=new t.Vector3,this._quaternionStart=new t.Quaternion,this._scaleStart=new t.Vector3,this._getPointer=ao.bind(this),this._onPointerDown=co.bind(this),this._onPointerHover=ro.bind(this),this._onPointerMove=lo.bind(this),this._onPointerUp=ho.bind(this),this.domElement.addEventListener("pointerdown",this._onPointerDown),this.domElement.addEventListener("pointermove",this._onPointerHover),this.domElement.addEventListener("pointerup",this._onPointerUp)}updateMatrixWorld(n){this.object!==void 0&&(this.object.updateMatrixWorld(),this.object.parent===null?console.error("TransformControls: The attached 3D object must be a part of the scene graph."):this.object.parent.matrixWorld.decompose(this._parentPosition,this._parentQuaternion,this._parentScale),this.object.matrixWorld.decompose(this.worldPosition,this.worldQuaternion,this._worldScale),this._parentQuaternionInv.copy(this._parentQuaternion).invert(),this._worldQuaternionInv.copy(this.worldQuaternion).invert()),this.camera.updateMatrixWorld(),this.camera.matrixWorld.decompose(this.cameraPosition,this.cameraQuaternion,this._cameraScale),this.camera.isOrthographicCamera?this.camera.getWorldDirection(this.eye).negate():this.eye.copy(this.cameraPosition).sub(this.worldPosition).normalize(),super.updateMatrixWorld(n)}pointerHover(n){if(this.object===void 0||this.dragging===!0)return;n!==null&&ye.setFromCamera(n,this.camera);const a=kt(this._gizmo.picker[this.mode],ye);a?this.axis=a.object.name:this.axis=null}pointerDown(n){if(!(this.object===void 0||this.dragging===!0||n!=null&&n.button!==0)&&this.axis!==null){n!==null&&ye.setFromCamera(n,this.camera);const a=kt(this._plane,ye,!0);a&&(this.object.updateMatrixWorld(),this.object.parent.updateMatrixWorld(),this._positionStart.copy(this.object.position),this._quaternionStart.copy(this.object.quaternion),this._scaleStart.copy(this.object.scale),this.object.matrixWorld.decompose(this.worldPositionStart,this.worldQuaternionStart,this._worldScaleStart),this.pointStart.copy(a.point).sub(this.worldPositionStart)),this.dragging=!0,hn.mode=this.mode,this.dispatchEvent(hn)}}pointerMove(n){const a=this.axis,e=this.mode,r=this.object;let c=this.space;if(e==="scale"?c="local":(a==="E"||a==="XYZE"||a==="XYZ")&&(c="world"),r===void 0||a===null||this.dragging===!1||n!==null&&n.button!==-1)return;n!==null&&ye.setFromCamera(n,this.camera);const i=kt(this._plane,ye,!0);if(i){if(this.pointEnd.copy(i.point).sub(this.worldPositionStart),e==="translate")this._offset.copy(this.pointEnd).sub(this.pointStart),c==="local"&&a!=="XYZ"&&this._offset.applyQuaternion(this._worldQuaternionInv),a.indexOf("X")===-1&&(this._offset.x=0),a.indexOf("Y")===-1&&(this._offset.y=0),a.indexOf("Z")===-1&&(this._offset.z=0),c==="local"&&a!=="XYZ"?this._offset.applyQuaternion(this._quaternionStart).divide(this._parentScale):this._offset.applyQuaternion(this._parentQuaternionInv).divide(this._parentScale),r.position.copy(this._offset).add(this._positionStart),this.translationSnap&&(c==="local"&&(r.position.applyQuaternion(x.copy(this._quaternionStart).invert()),a.search("X")!==-1&&(r.position.x=Math.round(r.position.x/this.translationSnap)*this.translationSnap),a.search("Y")!==-1&&(r.position.y=Math.round(r.position.y/this.translationSnap)*this.translationSnap),a.search("Z")!==-1&&(r.position.z=Math.round(r.position.z/this.translationSnap)*this.translationSnap),r.position.applyQuaternion(this._quaternionStart)),c==="world"&&(r.parent&&r.position.add(R.setFromMatrixPosition(r.parent.matrixWorld)),a.search("X")!==-1&&(r.position.x=Math.round(r.position.x/this.translationSnap)*this.translationSnap),a.search("Y")!==-1&&(r.position.y=Math.round(r.position.y/this.translationSnap)*this.translationSnap),a.search("Z")!==-1&&(r.position.z=Math.round(r.position.z/this.translationSnap)*this.translationSnap),r.parent&&r.position.sub(R.setFromMatrixPosition(r.parent.matrixWorld))));else if(e==="scale"){if(a.search("XYZ")!==-1){let l=this.pointEnd.length()/this.pointStart.length();this.pointEnd.dot(this.pointStart)<0&&(l*=-1),re.set(l,l,l)}else R.copy(this.pointStart),re.copy(this.pointEnd),R.applyQuaternion(this._worldQuaternionInv),re.applyQuaternion(this._worldQuaternionInv),re.divide(R),a.search("X")===-1&&(re.x=1),a.search("Y")===-1&&(re.y=1),a.search("Z")===-1&&(re.z=1);r.scale.copy(this._scaleStart).multiply(re),this.scaleSnap&&(a.search("X")!==-1&&(r.scale.x=Math.round(r.scale.x/this.scaleSnap)*this.scaleSnap||this.scaleSnap),a.search("Y")!==-1&&(r.scale.y=Math.round(r.scale.y/this.scaleSnap)*this.scaleSnap||this.scaleSnap),a.search("Z")!==-1&&(r.scale.z=Math.round(r.scale.z/this.scaleSnap)*this.scaleSnap||this.scaleSnap))}else if(e==="rotate"){this._offset.copy(this.pointEnd).sub(this.pointStart);const l=20/this.worldPosition.distanceTo(R.setFromMatrixPosition(this.camera.matrixWorld));let d=!1;a==="XYZE"?(this.rotationAxis.copy(this._offset).cross(this.eye).normalize(),this.rotationAngle=this._offset.dot(R.copy(this.rotationAxis).cross(this.eye))*l):(a==="X"||a==="Y"||a==="Z")&&(this.rotationAxis.copy(ln[a]),R.copy(ln[a]),c==="local"&&R.applyQuaternion(this.worldQuaternion),R.cross(this.eye),R.length()===0?d=!0:this.rotationAngle=this._offset.dot(R.normalize())*l),(a==="E"||d)&&(this.rotationAxis.copy(this.eye),this.rotationAngle=this.pointEnd.angleTo(this.pointStart),this._startNorm.copy(this.pointStart).normalize(),this._endNorm.copy(this.pointEnd).normalize(),this.rotationAngle*=this._endNorm.cross(this._startNorm).dot(this.eye)<0?1:-1),this.rotationSnap&&(this.rotationAngle=Math.round(this.rotationAngle/this.rotationSnap)*this.rotationSnap),c==="local"&&a!=="E"&&a!=="XYZE"?(r.quaternion.copy(this._quaternionStart),r.quaternion.multiply(x.setFromAxisAngle(this.rotationAxis,this.rotationAngle)).normalize()):(this.rotationAxis.applyQuaternion(this._parentQuaternionInv),r.quaternion.copy(x.setFromAxisAngle(this.rotationAxis,this.rotationAngle)),r.quaternion.multiply(this._quaternionStart).normalize())}this.dispatchEvent(jt),this.dispatchEvent(mn)}}pointerUp(n){n!==null&&n.button!==0||(this.dragging&&this.axis!==null&&(pn.mode=this.mode,this.dispatchEvent(pn)),this.dragging=!1,this.axis=null)}dispose(){this.domElement.removeEventListener("pointerdown",this._onPointerDown),this.domElement.removeEventListener("pointermove",this._onPointerHover),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.traverse(function(n){n.geometry&&n.geometry.dispose(),n.material&&n.material.dispose()})}attach(n){return this.object=n,this.visible=!0,this}detach(){return this.object=void 0,this.visible=!1,this.axis=null,this}reset(){this.enabled&&this.dragging&&(this.object.position.copy(this._positionStart),this.object.quaternion.copy(this._quaternionStart),this.object.scale.copy(this._scaleStart),this.dispatchEvent(jt),this.dispatchEvent(mn),this.pointStart.copy(this.pointEnd))}getRaycaster(){return ye}getMode(){return this.mode}setMode(n){this.mode=n}setTranslationSnap(n){this.translationSnap=n}setRotationSnap(n){this.rotationSnap=n}setScaleSnap(n){this.scaleSnap=n}setSize(n){this.size=n}setSpace(n){this.space=n}}function ao(m){if(this.domElement.ownerDocument.pointerLockElement)return{x:0,y:0,button:m.button};{const n=this.domElement.getBoundingClientRect();return{x:(m.clientX-n.left)/n.width*2-1,y:-(m.clientY-n.top)/n.height*2+1,button:m.button}}}function ro(m){if(this.enabled)switch(m.pointerType){case"mouse":case"pen":this.pointerHover(this._getPointer(m));break}}function co(m){this.enabled&&(document.pointerLockElement||this.domElement.setPointerCapture(m.pointerId),this.domElement.addEventListener("pointermove",this._onPointerMove),this.pointerHover(this._getPointer(m)),this.pointerDown(this._getPointer(m)))}function lo(m){this.enabled&&this.pointerMove(this._getPointer(m))}function ho(m){this.enabled&&(this.domElement.releasePointerCapture(m.pointerId),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.pointerUp(this._getPointer(m)))}function kt(m,n,a){const e=n.intersectObject(m,!0);for(let r=0;r<e.length;r++)if(e[r].object.visible||a)return e[r];return!1}const bt=new t.Euler,E=new t.Vector3(0,1,0),un=new t.Vector3(0,0,0),dn=new t.Matrix4,wt=new t.Quaternion,Et=new t.Quaternion,U=new t.Vector3,fn=new t.Matrix4,Ve=new t.Vector3(1,0,0),ge=new t.Vector3(0,1,0),Qe=new t.Vector3(0,0,1),gt=new t.Vector3,Ge=new t.Vector3,Fe=new t.Vector3;class po extends t.Object3D{constructor(){super(),this.isTransformControlsGizmo=!0,this.type="TransformControlsGizmo";const n=new t.MeshBasicMaterial({depthTest:!1,depthWrite:!1,fog:!1,toneMapped:!1,transparent:!0}),a=new t.LineBasicMaterial({depthTest:!1,depthWrite:!1,fog:!1,toneMapped:!1,transparent:!0}),e=n.clone();e.opacity=.15;const r=a.clone();r.opacity=.5;const c=n.clone();c.color.setHex(16711680);const i=n.clone();i.color.setHex(65280);const l=n.clone();l.color.setHex(255);const d=n.clone();d.color.setHex(16711680),d.opacity=.5;const p=n.clone();p.color.setHex(65280),p.opacity=.5;const f=n.clone();f.color.setHex(255),f.opacity=.5;const w=n.clone();w.opacity=.25;const A=n.clone();A.color.setHex(16776960),A.opacity=.25,n.clone().color.setHex(16776960);const X=n.clone();X.color.setHex(7895160);const L=new t.CylinderGeometry(0,.04,.1,12);L.translate(0,.05,0);const C=new t.BoxGeometry(.08,.08,.08);C.translate(0,.04,0);const O=new t.BufferGeometry;O.setAttribute("position",new t.Float32BufferAttribute([0,0,0,1,0,0],3));const v=new t.CylinderGeometry(.0075,.0075,.5,3);v.translate(0,.25,0);function T(H,Q){const Y=new t.TorusGeometry(H,.0075,3,64,Q*Math.PI*2);return Y.rotateY(Math.PI/2),Y.rotateX(Math.PI/2),Y}function W(){const H=new t.BufferGeometry;return H.setAttribute("position",new t.Float32BufferAttribute([0,0,0,1,1,1],3)),H}const j={X:[[new t.Mesh(L,c),[.5,0,0],[0,0,-Math.PI/2]],[new t.Mesh(L,c),[-.5,0,0],[0,0,Math.PI/2]],[new t.Mesh(v,c),[0,0,0],[0,0,-Math.PI/2]]],Y:[[new t.Mesh(L,i),[0,.5,0]],[new t.Mesh(L,i),[0,-.5,0],[Math.PI,0,0]],[new t.Mesh(v,i)]],Z:[[new t.Mesh(L,l),[0,0,.5],[Math.PI/2,0,0]],[new t.Mesh(L,l),[0,0,-.5],[-Math.PI/2,0,0]],[new t.Mesh(v,l),null,[Math.PI/2,0,0]]],XYZ:[[new t.Mesh(new t.OctahedronGeometry(.1,0),w.clone()),[0,0,0]]],XY:[[new t.Mesh(new t.BoxGeometry(.15,.15,.01),f.clone()),[.15,.15,0]]],YZ:[[new t.Mesh(new t.BoxGeometry(.15,.15,.01),d.clone()),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new t.Mesh(new t.BoxGeometry(.15,.15,.01),p.clone()),[.15,0,.15],[-Math.PI/2,0,0]]]},ve={X:[[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[.3,0,0],[0,0,-Math.PI/2]],[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[-.3,0,0],[0,0,Math.PI/2]]],Y:[[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[0,.3,0]],[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[0,-.3,0],[0,0,Math.PI]]],Z:[[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[0,0,.3],[Math.PI/2,0,0]],[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[0,0,-.3],[-Math.PI/2,0,0]]],XYZ:[[new t.Mesh(new t.OctahedronGeometry(.2,0),e)]],XY:[[new t.Mesh(new t.BoxGeometry(.2,.2,.01),e),[.15,.15,0]]],YZ:[[new t.Mesh(new t.BoxGeometry(.2,.2,.01),e),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new t.Mesh(new t.BoxGeometry(.2,.2,.01),e),[.15,0,.15],[-Math.PI/2,0,0]]]},_={START:[[new t.Mesh(new t.OctahedronGeometry(.01,2),r),null,null,null,"helper"]],END:[[new t.Mesh(new t.OctahedronGeometry(.01,2),r),null,null,null,"helper"]],DELTA:[[new t.Line(W(),r),null,null,null,"helper"]],X:[[new t.Line(O,r.clone()),[-1e3,0,0],null,[1e6,1,1],"helper"]],Y:[[new t.Line(O,r.clone()),[0,-1e3,0],[0,0,Math.PI/2],[1e6,1,1],"helper"]],Z:[[new t.Line(O,r.clone()),[0,0,-1e3],[0,-Math.PI/2,0],[1e6,1,1],"helper"]]},me={XYZE:[[new t.Mesh(T(.5,1),X),null,[0,Math.PI/2,0]]],X:[[new t.Mesh(T(.5,.5),c)]],Y:[[new t.Mesh(T(.5,.5),i),null,[0,0,-Math.PI/2]]],Z:[[new t.Mesh(T(.5,.5),l),null,[0,Math.PI/2,0]]],E:[[new t.Mesh(T(.75,1),A),null,[0,Math.PI/2,0]]]},ze={AXIS:[[new t.Line(O,r.clone()),[-1e3,0,0],null,[1e6,1,1],"helper"]]},It={XYZE:[[new t.Mesh(new t.SphereGeometry(.25,10,8),e)]],X:[[new t.Mesh(new t.TorusGeometry(.5,.1,4,24),e),[0,0,0],[0,-Math.PI/2,-Math.PI/2]]],Y:[[new t.Mesh(new t.TorusGeometry(.5,.1,4,24),e),[0,0,0],[Math.PI/2,0,0]]],Z:[[new t.Mesh(new t.TorusGeometry(.5,.1,4,24),e),[0,0,0],[0,0,-Math.PI/2]]],E:[[new t.Mesh(new t.TorusGeometry(.75,.1,2,24),e)]]},Te={X:[[new t.Mesh(C,c),[.5,0,0],[0,0,-Math.PI/2]],[new t.Mesh(v,c),[0,0,0],[0,0,-Math.PI/2]],[new t.Mesh(C,c),[-.5,0,0],[0,0,Math.PI/2]]],Y:[[new t.Mesh(C,i),[0,.5,0]],[new t.Mesh(v,i)],[new t.Mesh(C,i),[0,-.5,0],[0,0,Math.PI]]],Z:[[new t.Mesh(C,l),[0,0,.5],[Math.PI/2,0,0]],[new t.Mesh(v,l),[0,0,0],[Math.PI/2,0,0]],[new t.Mesh(C,l),[0,0,-.5],[-Math.PI/2,0,0]]],XY:[[new t.Mesh(new t.BoxGeometry(.15,.15,.01),f),[.15,.15,0]]],YZ:[[new t.Mesh(new t.BoxGeometry(.15,.15,.01),d),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new t.Mesh(new t.BoxGeometry(.15,.15,.01),p),[.15,0,.15],[-Math.PI/2,0,0]]],XYZ:[[new t.Mesh(new t.BoxGeometry(.1,.1,.1),w.clone())]]},ue={X:[[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[.3,0,0],[0,0,-Math.PI/2]],[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[-.3,0,0],[0,0,Math.PI/2]]],Y:[[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[0,.3,0]],[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[0,-.3,0],[0,0,Math.PI]]],Z:[[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[0,0,.3],[Math.PI/2,0,0]],[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[0,0,-.3],[-Math.PI/2,0,0]]],XY:[[new t.Mesh(new t.BoxGeometry(.2,.2,.01),e),[.15,.15,0]]],YZ:[[new t.Mesh(new t.BoxGeometry(.2,.2,.01),e),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new t.Mesh(new t.BoxGeometry(.2,.2,.01),e),[.15,0,.15],[-Math.PI/2,0,0]]],XYZ:[[new t.Mesh(new t.BoxGeometry(.2,.2,.2),e),[0,0,0]]]},_e={X:[[new t.Line(O,r.clone()),[-1e3,0,0],null,[1e6,1,1],"helper"]],Y:[[new t.Line(O,r.clone()),[0,-1e3,0],[0,0,Math.PI/2],[1e6,1,1],"helper"]],Z:[[new t.Line(O,r.clone()),[0,0,-1e3],[0,-Math.PI/2,0],[1e6,1,1],"helper"]]};function Z(H){const Q=new t.Object3D;for(const Y in H)for(let K=H[Y].length;K--;){const I=H[Y][K][0].clone(),ie=H[Y][K][1],de=H[Y][K][2],Ie=H[Y][K][3],ut=H[Y][K][4];I.name=Y,I.tag=ut,ie&&I.position.set(ie[0],ie[1],ie[2]),de&&I.rotation.set(de[0],de[1],de[2]),Ie&&I.scale.set(Ie[0],Ie[1],Ie[2]),I.updateMatrix();const dt=I.geometry.clone();dt.applyMatrix4(I.matrix),I.geometry=dt,I.renderOrder=1/0,I.position.set(0,0,0),I.rotation.set(0,0,0),I.scale.set(1,1,1),Q.add(I)}return Q}this.gizmo={},this.picker={},this.helper={},this.add(this.gizmo.translate=Z(j)),this.add(this.gizmo.rotate=Z(me)),this.add(this.gizmo.scale=Z(Te)),this.add(this.picker.translate=Z(ve)),this.add(this.picker.rotate=Z(It)),this.add(this.picker.scale=Z(ue)),this.add(this.helper.translate=Z(_)),this.add(this.helper.rotate=Z(ze)),this.add(this.helper.scale=Z(_e)),this.picker.translate.visible=!1,this.picker.rotate.visible=!1,this.picker.scale.visible=!1}updateMatrixWorld(n){const e=(this.mode==="scale"?"local":this.space)==="local"?this.worldQuaternion:Et;this.gizmo.translate.visible=this.mode==="translate",this.gizmo.rotate.visible=this.mode==="rotate",this.gizmo.scale.visible=this.mode==="scale",this.helper.translate.visible=this.mode==="translate",this.helper.rotate.visible=this.mode==="rotate",this.helper.scale.visible=this.mode==="scale";let r=[];r=r.concat(this.picker[this.mode].children),r=r.concat(this.gizmo[this.mode].children),r=r.concat(this.helper[this.mode].children);for(let c=0;c<r.length;c++){const i=r[c];i.visible=!0,i.rotation.set(0,0,0),i.position.copy(this.worldPosition);let l;if(this.camera.isOrthographicCamera?l=(this.camera.top-this.camera.bottom)/this.camera.zoom:l=this.worldPosition.distanceTo(this.cameraPosition)*Math.min(1.9*Math.tan(Math.PI*this.camera.fov/360)/this.camera.zoom,7),i.scale.set(1,1,1).multiplyScalar(l*this.size/4),i.tag==="helper"){i.visible=!1,i.name==="AXIS"?(i.visible=!!this.axis,this.axis==="X"&&(x.setFromEuler(bt.set(0,0,0)),i.quaternion.copy(e).multiply(x),Math.abs(E.copy(Ve).applyQuaternion(e).dot(this.eye))>.9&&(i.visible=!1)),this.axis==="Y"&&(x.setFromEuler(bt.set(0,0,Math.PI/2)),i.quaternion.copy(e).multiply(x),Math.abs(E.copy(ge).applyQuaternion(e).dot(this.eye))>.9&&(i.visible=!1)),this.axis==="Z"&&(x.setFromEuler(bt.set(0,Math.PI/2,0)),i.quaternion.copy(e).multiply(x),Math.abs(E.copy(Qe).applyQuaternion(e).dot(this.eye))>.9&&(i.visible=!1)),this.axis==="XYZE"&&(x.setFromEuler(bt.set(0,Math.PI/2,0)),E.copy(this.rotationAxis),i.quaternion.setFromRotationMatrix(dn.lookAt(un,E,ge)),i.quaternion.multiply(x),i.visible=this.dragging),this.axis==="E"&&(i.visible=!1)):i.name==="START"?(i.position.copy(this.worldPositionStart),i.visible=this.dragging):i.name==="END"?(i.position.copy(this.worldPosition),i.visible=this.dragging):i.name==="DELTA"?(i.position.copy(this.worldPositionStart),i.quaternion.copy(this.worldQuaternionStart),R.set(1e-10,1e-10,1e-10).add(this.worldPositionStart).sub(this.worldPosition).multiplyScalar(-1),R.applyQuaternion(this.worldQuaternionStart.clone().invert()),i.scale.copy(R),i.visible=this.dragging):(i.quaternion.copy(e),this.dragging?i.position.copy(this.worldPositionStart):i.position.copy(this.worldPosition),this.axis&&(i.visible=this.axis.search(i.name)!==-1));continue}i.quaternion.copy(e),this.mode==="translate"||this.mode==="scale"?(i.name==="X"&&Math.abs(E.copy(Ve).applyQuaternion(e).dot(this.eye))>.99&&(i.scale.set(1e-10,1e-10,1e-10),i.visible=!1),i.name==="Y"&&Math.abs(E.copy(ge).applyQuaternion(e).dot(this.eye))>.99&&(i.scale.set(1e-10,1e-10,1e-10),i.visible=!1),i.name==="Z"&&Math.abs(E.copy(Qe).applyQuaternion(e).dot(this.eye))>.99&&(i.scale.set(1e-10,1e-10,1e-10),i.visible=!1),i.name==="XY"&&Math.abs(E.copy(Qe).applyQuaternion(e).dot(this.eye))<.2&&(i.scale.set(1e-10,1e-10,1e-10),i.visible=!1),i.name==="YZ"&&Math.abs(E.copy(Ve).applyQuaternion(e).dot(this.eye))<.2&&(i.scale.set(1e-10,1e-10,1e-10),i.visible=!1),i.name==="XZ"&&Math.abs(E.copy(ge).applyQuaternion(e).dot(this.eye))<.2&&(i.scale.set(1e-10,1e-10,1e-10),i.visible=!1)):this.mode==="rotate"&&(wt.copy(e),E.copy(this.eye).applyQuaternion(x.copy(e).invert()),i.name.search("E")!==-1&&i.quaternion.setFromRotationMatrix(dn.lookAt(this.eye,un,ge)),i.name==="X"&&(x.setFromAxisAngle(Ve,Math.atan2(-E.y,E.z)),x.multiplyQuaternions(wt,x),i.quaternion.copy(x)),i.name==="Y"&&(x.setFromAxisAngle(ge,Math.atan2(E.x,E.z)),x.multiplyQuaternions(wt,x),i.quaternion.copy(x)),i.name==="Z"&&(x.setFromAxisAngle(Qe,Math.atan2(E.y,E.x)),x.multiplyQuaternions(wt,x),i.quaternion.copy(x))),i.visible=i.visible&&(i.name.indexOf("X")===-1||this.showX),i.visible=i.visible&&(i.name.indexOf("Y")===-1||this.showY),i.visible=i.visible&&(i.name.indexOf("Z")===-1||this.showZ),i.visible=i.visible&&(i.name.indexOf("E")===-1||this.showX&&this.showY&&this.showZ),i.material._color=i.material._color||i.material.color.clone(),i.material._opacity=i.material._opacity||i.material.opacity,i.material.color.copy(i.material._color),i.material.opacity=i.material._opacity,this.enabled&&this.axis&&(i.name===this.axis||this.axis.split("").some(function(d){return i.name===d}))&&(i.material.color.setHex(16776960),i.material.opacity=1)}super.updateMatrixWorld(n)}}class mo extends t.Mesh{constructor(){super(new t.PlaneGeometry(1e5,1e5,2,2),new t.MeshBasicMaterial({visible:!1,wireframe:!0,side:t.DoubleSide,transparent:!0,opacity:.1,toneMapped:!1})),this.isTransformControlsPlane=!0,this.type="TransformControlsPlane"}updateMatrixWorld(n){let a=this.space;switch(this.position.copy(this.worldPosition),this.mode==="scale"&&(a="local"),gt.copy(Ve).applyQuaternion(a==="local"?this.worldQuaternion:Et),Ge.copy(ge).applyQuaternion(a==="local"?this.worldQuaternion:Et),Fe.copy(Qe).applyQuaternion(a==="local"?this.worldQuaternion:Et),E.copy(Ge),this.mode){case"translate":case"scale":switch(this.axis){case"X":E.copy(this.eye).cross(gt),U.copy(gt).cross(E);break;case"Y":E.copy(this.eye).cross(Ge),U.copy(Ge).cross(E);break;case"Z":E.copy(this.eye).cross(Fe),U.copy(Fe).cross(E);break;case"XY":U.copy(Fe);break;case"YZ":U.copy(gt);break;case"XZ":E.copy(Fe),U.copy(Ge);break;case"XYZ":case"E":U.set(0,0,0);break}break;case"rotate":default:U.set(0,0,0)}U.length()===0?this.quaternion.copy(this.cameraQuaternion):(fn.lookAt(R.set(0,0,0),U,E),this.quaternion.setFromRotationMatrix(fn)),super.updateMatrixWorld(n)}}var F,Pe;class uo{constructor(){u(this,F,void 0);u(this,Pe,void 0);P(this,F,new io(y.en3.camera,y.en3.webglRenderer.domElement)),P(this,Pe,new N.Store([0,0,0],{passport:{name:"Controls.OrbitControls.Target",manager:{type:"number",invisible:!0}}}));let n=!0;s(this,Pe).subscribe(a=>{s(this,F).target.set(...a.current),n&&s(this,F).update()}),s(this,F).addEventListener("change",()=>{n=!1,s(this,Pe).current=[s(this,F).target.x,s(this,F).target.y,s(this,F).target.z],n=!0})}get controls(){return s(this,F)}destroy(){s(this,F).dispose(),s(this,Pe).close()}}F=new WeakMap,Pe=new WeakMap;var k,Ke,$e,Je,et,tt,nt,ot,it;class fo{constructor(){u(this,k,null);u(this,Ke,new N.Store(y.en3.camera.far,{passport:{name:"Helpers.Grid.Size",manager:{type:"number",step:1}}}));u(this,$e,new N.Store(100,{passport:{name:"Helpers.Grid.Divisions",manager:{type:"number"}}}));u(this,Je,new N.Store("#0000ff",{passport:{name:"Helpers.Grid.Color 1",manager:{type:"color"}}}));u(this,et,new N.Store("#808080",{passport:{name:"Helpers.Grid.Color 2",manager:{type:"color"}}}));u(this,tt,new N.Store(!1,{passport:{name:"Helpers.Grid.Vertical",manager:{type:"boolean"}}}));u(this,nt,new N.Store(!0,{passport:{name:"Helpers.Grid.Visible",manager:{type:"boolean"}}}));u(this,ot,void 0);u(this,it,n=>{n.key==="g"&&(s(this,k).visible=!s(this,k).visible)});P(this,ot,new Gn.Composed([s(this,Ke),s(this,$e),s(this,Je),s(this,et),s(this,tt),s(this,nt)],()=>{s(this,k)&&(y.en3.view.remove(s(this,k)),s(this,k).dispose()),P(this,k,new t.GridHelper(s(this,Ke).current,s(this,$e).current,s(this,Je).current,s(this,et).current)),s(this,k).rotation.x=s(this,tt).current?Math.PI/2:0,s(this,k).visible=s(this,nt).current,y.en3.view.add(s(this,k))})),addEventListener("keydown",s(this,it))}get helper(){return s(this,k)}destroy(){s(this,ot).close(),s(this,k)&&(y.en3.view.remove(s(this,k)),s(this,k).dispose()),removeEventListener("keydown",s(this,it))}}k=new WeakMap,Ke=new WeakMap,$e=new WeakMap,Je=new WeakMap,et=new WeakMap,tt=new WeakMap,nt=new WeakMap,ot=new WeakMap,it=new WeakMap;var D,V,le,he,st,De,at,rt,Yt;class yo{constructor(){u(this,rt);u(this,D,void 0);u(this,V,[]);u(this,le,null);u(this,he,n=>{if(n.child.name.startsWith("T.")&&!s(this,V).find(a=>a.object3d===n.child)){const a=new Nt(n.child);s(this,V).push(a),y.en3.raycaster.add(a.raycasterTarget,{eventDispatcher:a.raycasterTarget}),a.raycasterTarget.addEventListener("pointerDown",s(this,De)),a.object3d.addEventListener("childadded",s(this,he))}});u(this,st,n=>{const a=M(this,rt,Yt).call(this,n.child);a&&(y.en3.raycaster.remove(a.raycasterTarget),a.destroy(),a.raycasterTarget.removeEventListener("pointerDown",s(this,De)),a.object3d.removeEventListener("childadded",s(this,he)),P(this,V,s(this,V).filter(e=>e!==a)))});u(this,De,n=>{const a=M(this,rt,Yt).call(this,n.target);a&&(P(this,le,s(this,V).find(e=>e.object3d===(a==null?void 0:a.object3d))||null),s(this,le)&&s(this,D).attach(s(this,le).object3d))});u(this,at,n=>{n.key==="t"?s(this,D).setMode("translate"):n.key==="r"?s(this,D).setMode("rotate"):n.key==="s"?s(this,D).setMode("scale"):n.key==="Escape"?s(this,D).detach():n.key==="+"||n.key==="="?s(this,D).setSize(s(this,D).size+.1):n.key==="-"||n.key==="_"?s(this,D).setSize(s(this,D).size-.1):n.key==="h"&&s(this,V).forEach(a=>{a.helpers.forEach(e=>{e.visible=!e.visible})})});P(this,D,new so(y.en3.camera,y.en3.webglRenderer.domElement)),s(this,D).addEventListener("objectChange",n=>{s(this,le)&&s(this,le).save()}),y.en3.view.add(s(this,D)),y.en3.scene.addEventListener("childadded",s(this,he)),y.en3.scene.addEventListener("childremoved",s(this,st)),window.addEventListener("keydown",s(this,at))}get controls(){return s(this,D)}destroy(){y.en3.scene.removeEventListener("childadded",s(this,he)),y.en3.scene.removeEventListener("childremoved",s(this,st)),window.removeEventListener("keydown",s(this,at)),s(this,D).dispose(),s(this,V).forEach(n=>{n.raycasterTarget.removeEventListener("pointerDown",s(this,De)),n.object3d.removeEventListener("childadded",s(this,he)),n.destroy()}),P(this,V,[])}}D=new WeakMap,V=new WeakMap,le=new WeakMap,he=new WeakMap,st=new WeakMap,De=new WeakMap,at=new WeakMap,rt=new WeakSet,Yt=function(n){return s(this,V).find(e=>e.object3d===n||e.raycasterTarget===n)};var Ce,je,ke,Re,ct,zt,_t,Sn;class bo{constructor(){u(this,ct);u(this,_t);u(this,Ce,void 0);u(this,je,void 0);u(this,ke,void 0);u(this,Re,[]);P(this,Ce,y.en3.composer.addPass=y.en3.composer.addPass.bind(y.en3.composer)),y.en3.composer.addPass=(...n)=>{M(this,ct,zt).call(this,n[0]),s(this,Ce).call(this,...n)},P(this,je,y.en3.composer.removePass=y.en3.composer.removePass.bind(y.en3.composer)),y.en3.composer.removePass=(...n)=>{M(this,_t,Sn).call(this,n[0]),s(this,je).call(this,...n)},P(this,ke,y.en3.composer.insertPass=y.en3.composer.insertPass.bind(y.en3.composer)),y.en3.composer.insertPass=(...n)=>{M(this,ct,zt).call(this,n[0]),s(this,ke).call(this,...n)}}destroy(){y.en3.composer.addPass=s(this,Ce),y.en3.composer.removePass=s(this,je),y.en3.composer.insertPass=s(this,ke),s(this,Re).forEach(n=>{n.destroy()})}}Ce=new WeakMap,je=new WeakMap,ke=new WeakMap,Re=new WeakMap,ct=new WeakSet,zt=function(n){s(this,Re).push(new pe(n,{folderName:`EffectComposer.${n.constructor.name}`,skipKeys:["renderToScreen","needsSwap","nMips","oldClearAlpha","clearColor","resolution"]})),"uniforms"in n&&s(this,Re).push(new pe(n.uniforms,{folderName:`EffectComposer.${n.constructor.name}.Uniforms`,optionsCatalog:{maxblur:{type:"number",min:0,max:1,step:1e-5,ease:.1},aperture:{type:"number",min:0,max:.01,step:1e-6},focus:{type:"number",min:0,step:.01}},skipKeys:["time","resolution"]}))},_t=new WeakSet,Sn=function(n){};var lt,ht,pt,mt,He,xe,Ye;class wo{constructor(){u(this,lt,void 0);u(this,ht,void 0);u(this,pt,null);u(this,mt,void 0);u(this,He,void 0);u(this,xe,void 0);u(this,Ye,void 0);P(this,lt,new pe(y.en3.webglRenderer,{folderName:"Renderer"})),P(this,ht,new pe(y.en3.webglRenderer.shadowMap,{folderName:"Renderer.shadowMap",optionsCatalog:{type:{type:"select",variants:["BasicShadowMap","PCFShadowMap","PCFSoftShadowMap","VSMShadowMap"]}},afterChange:()=>{y.en3.webglRenderer.shadowMap.needsUpdate=!0,Fn.traverseMaterials(y.en3.scene,n=>{n.needsUpdate=!0})}})),y.en3.composer&&P(this,pt,new bo),P(this,mt,new fo),P(this,He,new Nt(y.en3.camera)),P(this,xe,new uo),s(this,xe).controls.addEventListener("change",()=>{s(this,He).save()}),P(this,Ye,new yo),s(this,Ye).controls.addEventListener("dragging-changed",n=>{s(this,xe).controls.enabled=!n.value})}destroy(){var n;s(this,lt).destroy(),s(this,ht).destroy(),(n=s(this,pt))==null||n.destroy(),s(this,mt).destroy(),s(this,He).destroy(),s(this,xe).destroy(),s(this,Ye).destroy()}}lt=new WeakMap,ht=new WeakMap,pt=new WeakMap,mt=new WeakMap,He=new WeakMap,xe=new WeakMap,Ye=new WeakMap;exports.En3Helpers=wo;exports.En3Object3dManager=Nt;
@@ -19,14 +19,14 @@ var s = (m, t, o) => (Xt(m, t, "read from private field"), o ? o.call(m) : t.get
19
19
  t instanceof WeakSet ? t.add(m) : t.set(m, o);
20
20
  }, x = (m, t, o, e) => (Xt(m, t, "write to private field"), e ? e.call(m, o) : t.set(m, o), o);
21
21
  var P = (m, t, o) => (Xt(m, t, "access private method"), o);
22
- import { e as b } from "../../en3-sDqjL5Mg.js";
23
- import { S as Z } from "../../Store-Dqcu1DnE.js";
22
+ import { e as b } from "../../en3-THFHEReu.js";
23
+ import { S as Z } from "../../Store-Qr3SNOSf.js";
24
24
  import * as Pe from "three";
25
25
  import { Light as fn, PointLight as ai, PointLightHelper as ri, DirectionalLight as li, DirectionalLightHelper as ci, SpotLight as hi, SpotLightHelper as pi, HemisphereLight as mi, HemisphereLightHelper as di, Camera as yn, CameraHelper as ui, Mesh as p, Material as fi, Ray as yi, Plane as bi, MathUtils as wi, EventDispatcher as gi, Vector3 as y, MOUSE as Re, TOUCH as Ye, Quaternion as K, Spherical as bn, Vector2 as V, Raycaster as Ei, Object3D as Gt, Euler as Pi, Matrix4 as Dn, MeshBasicMaterial as On, LineBasicMaterial as Mi, CylinderGeometry as F, BoxGeometry as X, BufferGeometry as wn, Float32BufferAttribute as gn, OctahedronGeometry as vt, Line as me, SphereGeometry as Si, TorusGeometry as Ve, PlaneGeometry as xi, DoubleSide as vi, GridHelper as _i } from "three";
26
26
  import { a as Ti } from "../../object-D6MVWB4l.js";
27
27
  import { ticker as En } from "../../ticker/index.js";
28
- import { C as Ii } from "../../Composed-CgnR5oah.js";
29
- import { t as Ai } from "../../traverseMaterials-M-N1989i.js";
28
+ import { C as Ii } from "../../Composed-Fa7owymK.js";
29
+ import { t as Ai } from "../../traverseMaterials-BKSwwNmo.js";
30
30
  const Li = [
31
31
  "AddEquation",
32
32
  "SubtractEquation",
package/lib/en3/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { E as n, e as s, a as o } from "../en3-sDqjL5Mg.js";
1
+ import { E as n, e as s, a as o } from "../en3-THFHEReu.js";
2
2
  export {
3
3
  n as En3View,
4
4
  s as en3,
@@ -24,7 +24,7 @@ var ue = (d, t, e) => new Promise((r, n) => {
24
24
  a((e = e.apply(d, t)).next());
25
25
  });
26
26
  import { TrianglesDrawMode as De, TriangleFanDrawMode as re, TriangleStripDrawMode as Ee, Loader as Fe, LoaderUtils as X, FileLoader as Le, Color as G, LinearSRGBColorSpace as I, SpotLight as Pe, PointLight as ke, DirectionalLight as He, MeshBasicMaterial as V, SRGBColorSpace as z, MeshPhysicalMaterial as y, Vector2 as _e, Matrix4 as Y, Vector3 as B, Quaternion as Se, InstancedMesh as Ge, InstancedBufferAttribute as Be, Object3D as Me, TextureLoader as ye, ImageBitmapLoader as Ue, BufferAttribute as J, InterleavedBuffer as ve, InterleavedBufferAttribute as je, LinearFilter as we, LinearMipmapLinearFilter as be, RepeatWrapping as ie, PointsMaterial as Ke, Material as $, LineBasicMaterial as Ve, MeshStandardMaterial as Ne, DoubleSide as Xe, PropertyBinding as ze, BufferGeometry as qe, SkinnedMesh as We, Mesh as Ye, LineSegments as Qe, Line as Ze, LineLoop as Je, Points as $e, Group as ee, PerspectiveCamera as et, MathUtils as tt, OrthographicCamera as nt, Skeleton as st, AnimationClip as rt, Bone as it, InterpolateLinear as Ie, ColorManagement as le, NearestFilter as ot, NearestMipmapNearestFilter as at, LinearMipmapNearestFilter as ct, NearestMipmapLinearFilter as ut, ClampToEdgeWrapping as lt, MirroredRepeatWrapping as dt, InterpolateDiscrete as ft, FrontSide as ht, Texture as de, VectorKeyframeTrack as fe, NumberKeyframeTrack as he, QuaternionKeyframeTrack as pe, Box3 as pt, Sphere as mt, Interpolant as At } from "three";
27
- import { e as N, a as b, d as me } from "../../en3-sDqjL5Mg.js";
27
+ import { e as N, a as b, d as me } from "../../en3-THFHEReu.js";
28
28
  function Ae(d, t) {
29
29
  if (t === De)
30
30
  return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."), d;
@@ -1,4 +1,4 @@
1
- "use strict";var D=(o,e,t)=>{if(!e.has(o))throw TypeError("Cannot "+t)};var i=(o,e,t)=>(D(o,e,"read from private field"),t?t.call(o):e.get(o)),s=(o,e,t)=>{if(e.has(o))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(o):e.set(o,t)},c=(o,e,t,r)=>(D(o,e,"write to private field"),r?r.call(o,t):e.set(o,t),t);var L=(o,e,t)=>(D(o,e,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const $=require("../../loading/index.cjs"),y=require("../../SourceManager-Ce49-NQe.cjs"),b=require("../../Store-CIs_NjhF.cjs");var u,l,v,k;class z{constructor(e){s(this,v);s(this,u,void 0);s(this,l,void 0);c(this,u,e.material),c(this,l,e.uniforms||{}),i(this,u).userData.uniforms=i(this,l);let t;const r=()=>{t==null||t()};i(this,u).addEventListener("dispose",r),i(this,u).onBeforeCompile=n=>{var d;t==null||t();for(const R in i(this,l))n.uniforms[R]=i(this,l)[R];e.vertextDeclarations&&(n.vertexShader=`
1
+ "use strict";var D=(o,e,t)=>{if(!e.has(o))throw TypeError("Cannot "+t)};var i=(o,e,t)=>(D(o,e,"read from private field"),t?t.call(o):e.get(o)),s=(o,e,t)=>{if(e.has(o))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(o):e.set(o,t)},c=(o,e,t,r)=>(D(o,e,"write to private field"),r?r.call(o,t):e.set(o,t),t);var L=(o,e,t)=>(D(o,e,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const $=require("../../loading/index.cjs"),y=require("../../SourceManager-D6D2LVKf.cjs"),b=require("../../Store-Cr3VaD9G.cjs");var u,l,v,k;class z{constructor(e){s(this,v);s(this,u,void 0);s(this,l,void 0);c(this,u,e.material),c(this,l,e.uniforms||{}),i(this,u).userData.uniforms=i(this,l);let t;const r=()=>{t==null||t()};i(this,u).addEventListener("dispose",r),i(this,u).onBeforeCompile=n=>{var d;t==null||t();for(const R in i(this,l))n.uniforms[R]=i(this,l)[R];e.vertextDeclarations&&(n.vertexShader=`
2
2
  ${e.vertextDeclarations}
3
3
  ${n.vertexShader}
4
4
  `),e.fragmentDeclarations&&(n.fragmentShader=`
@@ -9,8 +9,8 @@ var e = (o, i, t) => (m(o, i, "read from private field"), t ? t.call(o) : i.get(
9
9
  }, c = (o, i, t, s) => (m(o, i, "write to private field"), s ? s.call(o, t) : i.set(o, t), t);
10
10
  var L = (o, i, t) => (m(o, i, "access private method"), t);
11
11
  import { loading as $ } from "../../loading/index.js";
12
- import { S as z } from "../../SourceManager-U3KHUnNl.js";
13
- import { S as R } from "../../Store-Dqcu1DnE.js";
12
+ import { S as z } from "../../SourceManager--L_rA28b.js";
13
+ import { S as R } from "../../Store-Qr3SNOSf.js";
14
14
  var h, u, S, k;
15
15
  class b {
16
16
  constructor(i) {
@@ -1,5 +1,5 @@
1
- import { d as w } from "../../en3-sDqjL5Mg.js";
2
- import { g as T, t as C } from "../../traverseMaterials-M-N1989i.js";
1
+ import { d as w } from "../../en3-THFHEReu.js";
2
+ import { g as T, t as C } from "../../traverseMaterials-BKSwwNmo.js";
3
3
  import { Mesh as g } from "three";
4
4
  function y(t, e, s) {
5
5
  const o = e.x, r = e.y, i = s || t.image.width / t.image.height;
@@ -22,7 +22,7 @@ var e = (h, t, i) => (q(h, t, "read from private field"), i ? i.call(h) : t.get(
22
22
  import { RESIZE_ORDER as oe, TICK_ORDER as ue } from "./order/index.js";
23
23
  import { windowResizer as J } from "./window-resizer/index.js";
24
24
  import { ticker as Q } from "./ticker/index.js";
25
- import { g as he } from "./dom-0S_WDL4g.js";
25
+ import { a as he } from "./dom-P5QbAASX.js";
26
26
  import { Mesh as me, OrthographicCamera as ee, PerspectiveCamera as te, Scene as fe, Vector2 as ge, Raycaster as Ee, REVISION as be, WebGLRenderer as xe } from "three";
27
27
  import { LayoutBox as ie } from "./layout-box/index.js";
28
28
  function ye(h) {
@@ -15,6 +15,6 @@ function n(e) {
15
15
  );
16
16
  }
17
17
  export {
18
- n as a,
19
- t as d
18
+ t as a,
19
+ n as d
20
20
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../custom-element/index.cjs");require("../window-resizer/index.cjs");require("../Store-CIs_NjhF.cjs");const o=require("../source/index.cjs");var l=Object.defineProperty,i=Object.getOwnPropertyDescriptor,a=(n,r,m,t)=>{for(var e=t>1?void 0:t?i(r,m):r,s=n.length-1,u;s>=0;s--)(u=n[s])&&(e=(t?u(r,m,e):u(e))||e);return t&&e&&l(r,m,e),e};exports.ImageElement=class extends o.SourceElement{createConsumer(){return document.createElement("img")}consumeSource(r){this.consumerElement.src=r||""}};exports.ImageElement=a([c.define("e-image")],exports.ImageElement);
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../custom-element/index.cjs");require("../window-resizer/index.cjs");require("../Store-Cr3VaD9G.cjs");const o=require("../source/index.cjs");var l=Object.defineProperty,i=Object.getOwnPropertyDescriptor,a=(n,r,m,t)=>{for(var e=t>1?void 0:t?i(r,m):r,s=n.length-1,u;s>=0;s--)(u=n[s])&&(e=(t?u(r,m,e):u(e))||e);return t&&e&&l(r,m,e),e};exports.ImageElement=class extends o.SourceElement{createConsumer(){return document.createElement("img")}consumeSource(r){this.consumerElement.src=r||""}};exports.ImageElement=a([c.define("e-image")],exports.ImageElement);
@@ -1,6 +1,6 @@
1
1
  import { define as p } from "../custom-element/index.js";
2
2
  import "../window-resizer/index.js";
3
- import "../Store-Dqcu1DnE.js";
3
+ import "../Store-Qr3SNOSf.js";
4
4
  import { SourceElement as l } from "../source/index.js";
5
5
  var u = Object.defineProperty, f = Object.getOwnPropertyDescriptor, i = (r, t, o, m) => {
6
6
  for (var e = m > 1 ? void 0 : m ? f(t, o) : t, n = r.length - 1, s; n >= 0; n--)
@@ -1,4 +1,4 @@
1
- "use strict";var z=(t,e,s)=>{if(!e.has(t))throw TypeError("Cannot "+s)};var D=(t,e,s)=>(z(t,e,"read from private field"),s?s.call(t):e.get(t)),A=(t,e,s)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,s)},H=(t,e,s,n)=>(z(t,e,"write to private field"),n?n.call(t,s):e.set(t,s),s);const y=require("./custom-element/index.cjs");require("./Store-CIs_NjhF.cjs");const M=require("./browser-CpzFX2xg.cjs"),R=require("./events-BGwqaxVW.cjs"),N=require("./style-At6aDoqG.cjs"),a=require("./tags-yvEoM921.cjs"),W=require("./createStylesheet-BX1RVTfW.cjs"),V=require("./theme/index.cjs");var Y=Object.defineProperty,Z=Object.getOwnPropertyDescriptor,J=(t,e,s,n)=>{for(var i=n>1?void 0:n?Z(e,s):e,l=t.length-1,o;l>=0;l--)(o=t[l])&&(i=(n?o(e,s,i):o(i))||i);return n&&i&&Y(e,s,i),i},P=(t,e,s)=>{if(!e.has(t))throw TypeError("Cannot "+s)},r=(t,e,s)=>(P(t,e,"read from private field"),s?s.call(t):e.get(t)),c=(t,e,s)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,s)},d=(t,e,s,n)=>(P(t,e,"write to private field"),e.set(t,s),s),I=(t,e,s)=>(P(t,e,"access private method"),s),u,f,h,v,g,m,$,S,b;const Q=W.createStylesheet({":host":{position:"relative"},".head":{width:"100%",cursor:"default",background:"none",border:"none",color:"inherit",fontFamily:"inherit",fontSize:"inherit",fontWeight:"inherit",textAlign:"start",padding:"0",margin:"0"},".body":{boxSizing:"border-box",position:"var(--position, unset)",top:"100%",left:"0",width:"100%",overflow:"hidden",transitionDuration:"var(--duration, var(--duration-short))",transitionProperty:"height",cursor:"default"},".body-inner":{display:"grid",gap:"var(--gap, 0px)",width:"100%",paddingTop:"var(--gap, 0px)"}});exports.SelectElement=class extends y.CustomElement{constructor(){super(),c(this,S),c(this,u,null),c(this,f,""),c(this,h,null),c(this,v,!1),c(this,g,void 0),c(this,m,null),c(this,$,()=>{R.dispatchSizeChangeEvent(this)}),M.isBrowser&&(this.openShadow(Q),d(this,u,this.attachInternals()),d(this,m,new ResizeObserver(r(this,$))),a.element(this,{children:[a.button({class:"head",children:a.slot({name:"head"}),onClick:()=>{this.opened?this.close():this.open()}}),a.div({class:"body",style:{height:"0px"},children:a.div({class:"body-inner",children:a.slot()}),ref:e=>{d(this,h,e)}})]}))}get value(){return r(this,f)}set value(e){d(this,f,e),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),r(this,u).setFormValue(r(this,f))}get internals(){return r(this,u)}get opened(){return r(this,v)}open(){clearTimeout(r(this,g)),d(this,v,!0),r(this,h).style.display="grid",this.classList.add("triggered"),setTimeout(()=>{this.classList.add("opened"),r(this,h).style.height=r(this,h).scrollHeight+"px",I(this,S,b).call(this)},0)}close(){d(this,v,!1),r(this,h).style.height="0px",this.classList.remove("opened"),I(this,S,b).call(this),d(this,g,setTimeout(()=>{this.classList.remove("triggered"),r(this,h).style.display="none"},N.getElementTransitionDurationMS(r(this,h))))}connectedCallback(){r(this,m).observe(r(this,h))}disconnectedCallback(){clearTimeout(r(this,g)),r(this,m).disconnect()}};u=new WeakMap;f=new WeakMap;h=new WeakMap;v=new WeakMap;g=new WeakMap;m=new WeakMap;$=new WeakMap;S=new WeakSet;b=function(){R.dispatchBeforeSizeChangeEvent(this),this.dispatchEvent(new CustomEvent("selectToggle",{bubbles:!0,composed:!0,detail:{opened:r(this,v)}}))};exports.SelectElement.formAssociated=!0;exports.SelectElement=J([y.define("e-select")],exports.SelectElement);var E;class q extends y.CustomElement{constructor(){super(...arguments);A(this,E,null)}get selectElement(){return D(this,E)}connectedCallback(){var n,i;const s=(i=(n=this.assignedSlot)==null?void 0:n.getRootNode())==null?void 0:i.host;s?H(this,E,s):console.log(this,"e-select not found")}}E=new WeakMap;var X=Object.defineProperty,j=Object.getOwnPropertyDescriptor,ee=(t,e,s,n)=>{for(var i=n>1?void 0:n?j(e,s):e,l=t.length-1,o;l>=0;l--)(o=t[l])&&(i=(n?o(e,s,i):o(i))||i);return n&&i&&X(e,s,i),i},F=(t,e,s)=>{if(!e.has(t))throw TypeError("Cannot "+s)},k=(t,e,s)=>(F(t,e,"read from private field"),s?s.call(t):e.get(t)),B=(t,e,s)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,s)},G=(t,e,s)=>(F(t,e,"access private method"),s),w,C,L;const te=W.createStylesheet({":host":{width:"100%",height:"40px",display:"inline-flex",alignItems:"center"}});exports.SelectOptionElement=class extends q{constructor(){super(),B(this,C),B(this,w,()=>{this.selectElement.value===this.value?this.style.display="none":this.style.display=""}),M.isBrowser&&(this.openShadow(te),a.element(this,{tabindex:0,onClick:()=>{G(this,C,L).call(this)},onKeydown:e=>{e.code==="Space"&&G(this,C,L).call(this)},children:a.slot()}))}get value(){return(this.hasAttribute("value")?this.getAttribute("value"):this.innerText)||""}connectedCallback(){super.connectedCallback(),this.hasAttribute("default")&&(this.selectElement.value||(this.selectElement.value=this.value)),this.selectElement.addEventListener("change",k(this,w)),setTimeout(()=>{k(this,w).call(this)})}disconnectedCallback(){this.selectElement.removeEventListener("change",k(this,w))}};w=new WeakMap;C=new WeakSet;L=function(){this.selectElement.value=this.value,this.selectElement.close()};exports.SelectOptionElement=ee([y.define("e-select-option")],exports.SelectOptionElement);const U=`<svg
1
+ "use strict";var z=(t,e,s)=>{if(!e.has(t))throw TypeError("Cannot "+s)};var D=(t,e,s)=>(z(t,e,"read from private field"),s?s.call(t):e.get(t)),A=(t,e,s)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,s)},H=(t,e,s,n)=>(z(t,e,"write to private field"),n?n.call(t,s):e.set(t,s),s);const y=require("./custom-element/index.cjs");require("./Store-Cr3VaD9G.cjs");const M=require("./browser-CpzFX2xg.cjs"),R=require("./events-BGwqaxVW.cjs"),N=require("./style-At6aDoqG.cjs"),a=require("./tags-CAfasCGV.cjs"),W=require("./createStylesheet-BsMSWX0q.cjs"),V=require("./theme/index.cjs");var Y=Object.defineProperty,Z=Object.getOwnPropertyDescriptor,J=(t,e,s,n)=>{for(var i=n>1?void 0:n?Z(e,s):e,l=t.length-1,o;l>=0;l--)(o=t[l])&&(i=(n?o(e,s,i):o(i))||i);return n&&i&&Y(e,s,i),i},P=(t,e,s)=>{if(!e.has(t))throw TypeError("Cannot "+s)},r=(t,e,s)=>(P(t,e,"read from private field"),s?s.call(t):e.get(t)),c=(t,e,s)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,s)},d=(t,e,s,n)=>(P(t,e,"write to private field"),e.set(t,s),s),I=(t,e,s)=>(P(t,e,"access private method"),s),u,f,h,v,g,m,$,S,b;const Q=W.createStylesheet({":host":{position:"relative"},".head":{width:"100%",cursor:"default",background:"none",border:"none",color:"inherit",fontFamily:"inherit",fontSize:"inherit",fontWeight:"inherit",textAlign:"start",padding:"0",margin:"0"},".body":{boxSizing:"border-box",position:"var(--position, unset)",top:"100%",left:"0",width:"100%",overflow:"hidden",transitionDuration:"var(--duration, var(--duration-short))",transitionProperty:"height",cursor:"default"},".body-inner":{display:"grid",gap:"var(--gap, 0px)",width:"100%",paddingTop:"var(--gap, 0px)"}});exports.SelectElement=class extends y.CustomElement{constructor(){super(),c(this,S),c(this,u,null),c(this,f,""),c(this,h,null),c(this,v,!1),c(this,g,void 0),c(this,m,null),c(this,$,()=>{R.dispatchSizeChangeEvent(this)}),M.isBrowser&&(this.openShadow(Q),d(this,u,this.attachInternals()),d(this,m,new ResizeObserver(r(this,$))),a.element(this,{children:[a.button({class:"head",children:a.slot({name:"head"}),onClick:()=>{this.opened?this.close():this.open()}}),a.div({class:"body",style:{height:"0px"},children:a.div({class:"body-inner",children:a.slot()}),ref:e=>{d(this,h,e)}})]}))}get value(){return r(this,f)}set value(e){d(this,f,e),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),r(this,u).setFormValue(r(this,f))}get internals(){return r(this,u)}get opened(){return r(this,v)}open(){clearTimeout(r(this,g)),d(this,v,!0),r(this,h).style.display="grid",this.classList.add("triggered"),setTimeout(()=>{this.classList.add("opened"),r(this,h).style.height=r(this,h).scrollHeight+"px",I(this,S,b).call(this)},0)}close(){d(this,v,!1),r(this,h).style.height="0px",this.classList.remove("opened"),I(this,S,b).call(this),d(this,g,setTimeout(()=>{this.classList.remove("triggered"),r(this,h).style.display="none"},N.getElementTransitionDurationMS(r(this,h))))}connectedCallback(){r(this,m).observe(r(this,h))}disconnectedCallback(){clearTimeout(r(this,g)),r(this,m).disconnect()}};u=new WeakMap;f=new WeakMap;h=new WeakMap;v=new WeakMap;g=new WeakMap;m=new WeakMap;$=new WeakMap;S=new WeakSet;b=function(){R.dispatchBeforeSizeChangeEvent(this),this.dispatchEvent(new CustomEvent("selectToggle",{bubbles:!0,composed:!0,detail:{opened:r(this,v)}}))};exports.SelectElement.formAssociated=!0;exports.SelectElement=J([y.define("e-select")],exports.SelectElement);var E;class q extends y.CustomElement{constructor(){super(...arguments);A(this,E,null)}get selectElement(){return D(this,E)}connectedCallback(){var n,i;const s=(i=(n=this.assignedSlot)==null?void 0:n.getRootNode())==null?void 0:i.host;s?H(this,E,s):console.log(this,"e-select not found")}}E=new WeakMap;var X=Object.defineProperty,j=Object.getOwnPropertyDescriptor,ee=(t,e,s,n)=>{for(var i=n>1?void 0:n?j(e,s):e,l=t.length-1,o;l>=0;l--)(o=t[l])&&(i=(n?o(e,s,i):o(i))||i);return n&&i&&X(e,s,i),i},F=(t,e,s)=>{if(!e.has(t))throw TypeError("Cannot "+s)},k=(t,e,s)=>(F(t,e,"read from private field"),s?s.call(t):e.get(t)),B=(t,e,s)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,s)},G=(t,e,s)=>(F(t,e,"access private method"),s),w,C,L;const te=W.createStylesheet({":host":{width:"100%",height:"40px",display:"inline-flex",alignItems:"center"}});exports.SelectOptionElement=class extends q{constructor(){super(),B(this,C),B(this,w,()=>{this.selectElement.value===this.value?this.style.display="none":this.style.display=""}),M.isBrowser&&(this.openShadow(te),a.element(this,{tabindex:0,onClick:()=>{G(this,C,L).call(this)},onKeydown:e=>{e.code==="Space"&&G(this,C,L).call(this)},children:a.slot()}))}get value(){return(this.hasAttribute("value")?this.getAttribute("value"):this.innerText)||""}connectedCallback(){super.connectedCallback(),this.hasAttribute("default")&&(this.selectElement.value||(this.selectElement.value=this.value)),this.selectElement.addEventListener("change",k(this,w)),setTimeout(()=>{k(this,w).call(this)})}disconnectedCallback(){this.selectElement.removeEventListener("change",k(this,w))}};w=new WeakMap;C=new WeakSet;L=function(){this.selectElement.value=this.value,this.selectElement.close()};exports.SelectOptionElement=ee([y.define("e-select-option")],exports.SelectOptionElement);const U=`<svg
2
2
  xmlns="http://www.w3.org/2000/svg"
3
3
  width="32"
4
4
  height="32"
@@ -8,12 +8,12 @@ var H = (t, e, s) => (A(t, e, "read from private field"), s ? s.call(t) : e.get(
8
8
  e instanceof WeakSet ? e.add(t) : e.set(t, s);
9
9
  }, B = (t, e, s, a) => (A(t, e, "write to private field"), a ? a.call(t, s) : e.set(t, s), s);
10
10
  import { CustomElement as U, define as W } from "./custom-element/index.js";
11
- import "./Store-Dqcu1DnE.js";
11
+ import "./Store-Qr3SNOSf.js";
12
12
  import { i as P } from "./browser-0zX67oeU.js";
13
- import { d as J, a as Q } from "./events-C_coq1Mk.js";
14
- import { a as X } from "./style-CklEF62D.js";
15
- import { e as T, p as j, ay as w, D as G } from "./tags-C-6uXIAT.js";
16
- import { c as D } from "./createStylesheet-CgWN4UhW.js";
13
+ import { a as J, d as Q } from "./events-CJTUMSLU.js";
14
+ import { g as X } from "./style-j2TwriJ_.js";
15
+ import { e as T, p as j, ay as w, D as G } from "./tags-D9lNDPX8.js";
16
+ import { c as D } from "./createStylesheet-BxKITIVV.js";
17
17
  import { aptechkaTheme as ee } from "./theme/index.js";
18
18
  var te = Object.defineProperty, se = Object.getOwnPropertyDescriptor, ie = (t, e, s, a) => {
19
19
  for (var i = a > 1 ? void 0 : a ? se(e, s) : e, r = t.length - 1, l; r >= 0; r--)