aptechka 0.13.1 → 0.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. package/lib/{Animation-De9aUv3b.cjs → Animation-DI864E0i.cjs} +1 -1
  2. package/lib/{Animation-NAGXiFv5.js → Animation-w6BLTCum.js} +1 -1
  3. package/lib/{Damped-DbJKrUIf.js → Damped-DEHDEq-b.js} +1 -1
  4. package/lib/{Damped-DYJ6Z0xo.cjs → Damped-ipnDc0iX.cjs} +1 -1
  5. package/lib/Store-CDb6RMce.cjs +1 -0
  6. package/lib/Store-OTdcl6SX.js +134 -0
  7. package/lib/{Tweened-BkkD9s4n.cjs → Tweened-B1TfANfR.cjs} +1 -1
  8. package/lib/{Tweened-DOSHLCZa.js → Tweened-C52xXDLY.js} +1 -1
  9. package/lib/{Viewport-Cv4TRGiv.cjs → Viewport-BDPsnAF4.cjs} +1 -1
  10. package/lib/{Viewport-B55BvLsV.js → Viewport-taEXS8Uv.js} +1 -1
  11. package/lib/animation/index.cjs +1 -1
  12. package/lib/animation/index.js +3 -3
  13. package/lib/attribute/index.cjs +1 -1
  14. package/lib/attribute/index.js +13 -13
  15. package/lib/canvas/index.cjs +1 -1
  16. package/lib/canvas/index.js +36 -39
  17. package/lib/class-linked-status/index.cjs +1 -1
  18. package/lib/class-linked-status/index.js +1 -1
  19. package/lib/controls/index.cjs +1 -1
  20. package/lib/controls/index.js +3 -3
  21. package/lib/css-property/index.cjs +1 -1
  22. package/lib/css-property/index.js +4 -4
  23. package/lib/dev/index.cjs +1 -1
  24. package/lib/dev/index.js +1 -1
  25. package/lib/device/index.cjs +1 -1
  26. package/lib/device/index.js +1 -1
  27. package/lib/{dom-P5QbAASX.js → dom-0S_WDL4g.js} +2 -2
  28. package/lib/element-constructor/index.cjs +1 -1
  29. package/lib/element-constructor/index.js +848 -122
  30. package/lib/element-resizer/index.js +8 -8
  31. package/lib/en3/index.cjs +8 -1
  32. package/lib/en3/index.js +372 -4
  33. package/lib/file-BEr-o55N.js +31 -0
  34. package/lib/file-C9BbxzVU.cjs +1 -0
  35. package/lib/image/index.cjs +1 -1
  36. package/lib/image/index.js +1 -1
  37. package/lib/intersector/index.js +7 -7
  38. package/lib/jss-CjccJC-K.js +21 -0
  39. package/lib/jss-GJLvaNfT.cjs +1 -0
  40. package/lib/ladder/index.cjs +1 -1
  41. package/lib/ladder/index.js +1 -1
  42. package/lib/layout-box/index.js +14 -14
  43. package/lib/media/index.cjs +1 -1
  44. package/lib/media/index.js +1 -1
  45. package/lib/need_redo_tweaker/index.cjs +18 -0
  46. package/lib/need_redo_tweaker/index.js +1337 -0
  47. package/lib/pointer/index.cjs +1 -1
  48. package/lib/pointer/index.js +3 -3
  49. package/lib/popover/index.cjs +1 -1
  50. package/lib/popover/index.js +68 -76
  51. package/lib/scroll/index.cjs +1 -1
  52. package/lib/scroll/index.js +577 -610
  53. package/lib/scroll-entries/index.js +15 -15
  54. package/lib/sequence/index.cjs +1 -1
  55. package/lib/sequence/index.js +1 -1
  56. package/lib/slicer/index.cjs +5 -5
  57. package/lib/slicer/index.js +55 -86
  58. package/lib/source/index.cjs +2 -2
  59. package/lib/source/index.js +154 -62
  60. package/lib/store/index.cjs +1 -1
  61. package/lib/store/index.js +71 -37
  62. package/lib/ticker/index.js +1 -1
  63. package/lib/utils/index.cjs +1 -1
  64. package/lib/utils/index.js +67 -65
  65. package/lib/video/index.cjs +1 -1
  66. package/lib/video/index.js +1 -1
  67. package/package.json +7 -72
  68. package/lib/Composed-C_4slJQ6.cjs +0 -1
  69. package/lib/Composed-CfWa-69I.js +0 -31
  70. package/lib/Derived-BIBU-y7Z.cjs +0 -1
  71. package/lib/Derived-Vo_RsJfi.js +0 -23
  72. package/lib/SourceManager-B6wZpXUZ.js +0 -104
  73. package/lib/SourceManager-CfHcGLUa.cjs +0 -1
  74. package/lib/Store-C46i0nvr.js +0 -137
  75. package/lib/Store-npaZHvX4.cjs +0 -1
  76. package/lib/accordion/index.cjs +0 -1
  77. package/lib/accordion/index.js +0 -167
  78. package/lib/checkbox/index.cjs +0 -1
  79. package/lib/checkbox/index.js +0 -112
  80. package/lib/createStylesheet-COAZH1Mw.js +0 -8
  81. package/lib/createStylesheet-Csfmh-MH.cjs +0 -1
  82. package/lib/createTheme-CHnsCgAr.js +0 -15
  83. package/lib/createTheme-Cfaw9UmV.cjs +0 -1
  84. package/lib/en3/helpers/index.cjs +0 -1
  85. package/lib/en3/helpers/index.js +0 -1870
  86. package/lib/en3/libs/index.cjs +0 -1
  87. package/lib/en3/libs/index.js +0 -200
  88. package/lib/en3/loaders/index.cjs +0 -1
  89. package/lib/en3/loaders/index.js +0 -1742
  90. package/lib/en3/misc/index.cjs +0 -10
  91. package/lib/en3/misc/index.js +0 -110
  92. package/lib/en3/utils/index.cjs +0 -1
  93. package/lib/en3/utils/index.js +0 -20
  94. package/lib/en3-C1fLmsjs.cjs +0 -8
  95. package/lib/en3-x-Ki30MY.js +0 -344
  96. package/lib/events-BGwqaxVW.cjs +0 -1
  97. package/lib/events-CJTUMSLU.js +0 -20
  98. package/lib/file-EevnUtRj.cjs +0 -1
  99. package/lib/file-lxi_oXJf.js +0 -13
  100. package/lib/index-BuAuBz2_.cjs +0 -9
  101. package/lib/index-CenF0JbH.js +0 -261
  102. package/lib/modal/index.cjs +0 -1
  103. package/lib/modal/index.js +0 -133
  104. package/lib/select/index.cjs +0 -1
  105. package/lib/select/index.js +0 -7
  106. package/lib/tags-6_ETuR75.cjs +0 -1
  107. package/lib/tags-BL3kQp9o.js +0 -833
  108. package/lib/theme/index.cjs +0 -1
  109. package/lib/theme/index.js +0 -25
  110. package/lib/traverseMaterials-CD_3_56D.cjs +0 -1
  111. package/lib/traverseMaterials-mGC2_FkG.js +0 -29
  112. package/lib/tweaker/index.cjs +0 -10
  113. package/lib/tweaker/index.js +0 -989
@@ -1,10 +0,0 @@
1
- "use strict";var b=o=>{throw TypeError(o)};var D=(o,e,t)=>e.has(o)||b("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)=>e.has(o)?b("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),L=(o,e,t)=>(D(o,e,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const $=require("../../loading/index.cjs"),z=require("../../SourceManager-CfHcGLUa.cjs"),y=require("../../Store-npaZHvX4.cjs");var u,l,v,k;class T{constructor(e){s(this,v);s(this,u);s(this,l);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
- ${e.vertextDeclarations}
3
- ${n.vertexShader}
4
- `),e.fragmentDeclarations&&(n.fragmentShader=`
5
- ${e.fragmentDeclarations}
6
- ${n.fragmentShader}
7
- `),L(this,v,k).call(this,n,"vertex",e),L(this,v,k).call(this,n,"fragment",e),t=(d=e.onReady)==null?void 0:d.call(e,this),e.log&&(console.log("VERTEX SHADER: ",n.vertexShader),console.log("FRAGMENT SHADER: ",n.fragmentShader))}}get material(){return i(this,u)}get uniforms(){return i(this,l)}}u=new WeakMap,l=new WeakMap,v=new WeakSet,k=function(e,t,r){const n=t==="vertex"?"vertexChunk":"fragmentChunk",d=t==="vertex"?"vertexShader":"fragmentShader";r[n]&&(r[n].replace?e[d]=e[d].replace(`#include <${r[n].replace}>`,r[n].content):r[n].update&&(e[d]=e[d].replace(`#include <${r[n].update}>`,`
8
- #include <${r[n].update}>
9
- ${r[n].content}
10
- `)))};var f,a,g,x,E,h,S,M;class m extends z.SourceManager{constructor(t){super(t);s(this,f,new y.Store(null));s(this,a,new y.Store(void 0));s(this,g);s(this,x);s(this,E);s(this,h);s(this,S,!1);s(this,M,()=>{if(!(i(this,h)&&!i(this,S))&&(this.current!==this.previous&&(i(this,f).current=null),this.current)){const t=i(this,E)?this.current.url:this.current.name+this.current.extension;i(this,h)||$.loading.setTotal(t,1),i(this,a).current="start",i(this,x).load(t,r=>{var n;i(this,f).current=((n=this.processData)==null?void 0:n.call(this,r))||r,i(this,a).current="complete",i(this,h)||$.loading.setLoaded(t,1)},void 0,()=>{i(this,h)||(i(this,a).current="error",$.loading.setError(t,t))})}});c(this,g,t.consumer),c(this,x,t.loader),c(this,E,t.keepSourceParameters||!1),c(this,h,t.lazy||!1),this.subscribe(i(this,M)),i(this,g).addEventListener("added",()=>{this.connect()}),i(this,g).addEventListener("removed",()=>{this.disconnect()})}get data(){return i(this,f)}get loading(){return i(this,a)}lazyLoad(){i(this,S)||(c(this,S,!0),i(this,M).call(this))}}f=new WeakMap,a=new WeakMap,g=new WeakMap,x=new WeakMap,E=new WeakMap,h=new WeakMap,S=new WeakMap,M=new WeakMap;exports.En3ModifiedMaterial=T;exports.En3SourceManager=m;
@@ -1,110 +0,0 @@
1
- var R = (o) => {
2
- throw TypeError(o);
3
- };
4
- var m = (o, i, t) => i.has(o) || R("Cannot " + t);
5
- var e = (o, i, t) => (m(o, i, "read from private field"), t ? t.call(o) : i.get(o)), r = (o, i, t) => i.has(o) ? R("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(o) : i.set(o, t), c = (o, i, t, s) => (m(o, i, "write to private field"), s ? s.call(o, t) : i.set(o, t), t), L = (o, i, t) => (m(o, i, "access private method"), t);
6
- import { loading as $ } from "../../loading/index.js";
7
- import { S as A } from "../../SourceManager-B6wZpXUZ.js";
8
- import { S as z } from "../../Store-C46i0nvr.js";
9
- var h, u, S, k;
10
- class w {
11
- constructor(i) {
12
- r(this, S);
13
- r(this, h);
14
- r(this, u);
15
- c(this, h, i.material), c(this, u, i.uniforms || {}), e(this, h).userData.uniforms = e(this, u);
16
- let t;
17
- const s = () => {
18
- t == null || t();
19
- };
20
- e(this, h).addEventListener("dispose", s), e(this, h).onBeforeCompile = (n) => {
21
- var f;
22
- t == null || t();
23
- for (const M in e(this, u))
24
- n.uniforms[M] = e(this, u)[M];
25
- i.vertextDeclarations && (n.vertexShader = `
26
- ${i.vertextDeclarations}
27
- ${n.vertexShader}
28
- `), i.fragmentDeclarations && (n.fragmentShader = `
29
- ${i.fragmentDeclarations}
30
- ${n.fragmentShader}
31
- `), L(this, S, k).call(this, n, "vertex", i), L(this, S, k).call(this, n, "fragment", i), t = (f = i.onReady) == null ? void 0 : f.call(i, this), i.log && (console.log("VERTEX SHADER: ", n.vertexShader), console.log("FRAGMENT SHADER: ", n.fragmentShader));
32
- };
33
- }
34
- get material() {
35
- return e(this, h);
36
- }
37
- get uniforms() {
38
- return e(this, u);
39
- }
40
- }
41
- h = new WeakMap(), u = new WeakMap(), S = new WeakSet(), k = function(i, t, s) {
42
- const n = t === "vertex" ? "vertexChunk" : "fragmentChunk", f = t === "vertex" ? "vertexShader" : "fragmentShader";
43
- s[n] && (s[n].replace ? i[f] = i[f].replace(
44
- `#include <${s[n].replace}>`,
45
- s[n].content
46
- ) : s[n].update && (i[f] = i[f].replace(
47
- `#include <${s[n].update}>`,
48
- `
49
- #include <${s[n].update}>
50
- ${s[n].content}
51
- `
52
- )));
53
- };
54
- var a, d, g, x, E, l, v, D;
55
- class y extends A {
56
- constructor(t) {
57
- super(t);
58
- r(this, a, new z(null));
59
- r(this, d, new z(void 0));
60
- r(this, g);
61
- r(this, x);
62
- r(this, E);
63
- r(this, l);
64
- r(this, v, !1);
65
- r(this, D, () => {
66
- if (!(e(this, l) && !e(this, v)) && (this.current !== this.previous && (e(this, a).current = null), this.current)) {
67
- const t = e(this, E) ? this.current.url : this.current.name + this.current.extension;
68
- e(this, l) || $.setTotal(t, 1), e(this, d).current = "start", e(this, x).load(
69
- t,
70
- (s) => {
71
- var n;
72
- e(this, a).current = ((n = this.processData) == null ? void 0 : n.call(this, s)) || s, e(this, d).current = "complete", e(this, l) || $.setLoaded(t, 1);
73
- },
74
- void 0,
75
- () => {
76
- e(this, l) || (e(this, d).current = "error", $.setError(t, t));
77
- }
78
- );
79
- }
80
- });
81
- c(this, g, t.consumer), c(this, x, t.loader), c(this, E, t.keepSourceParameters || !1), c(this, l, t.lazy || !1), this.subscribe(e(this, D)), e(this, g).addEventListener("added", () => {
82
- this.connect();
83
- }), e(this, g).addEventListener("removed", () => {
84
- this.disconnect();
85
- });
86
- }
87
- /**
88
- * Resource store.
89
- */
90
- get data() {
91
- return e(this, a);
92
- }
93
- /**
94
- * Loading store.
95
- */
96
- get loading() {
97
- return e(this, d);
98
- }
99
- /**
100
- * Calling this method will start loading the resource.
101
- */
102
- lazyLoad() {
103
- e(this, v) || (c(this, v, !0), e(this, D).call(this));
104
- }
105
- }
106
- a = new WeakMap(), d = new WeakMap(), g = new WeakMap(), x = new WeakMap(), E = new WeakMap(), l = new WeakMap(), v = new WeakMap(), D = new WeakMap();
107
- export {
108
- w as En3ModifiedMaterial,
109
- y as En3SourceManager
110
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("../../en3-C1fLmsjs.cjs"),c=require("../../traverseMaterials-CD_3_56D.cjs"),M=require("three");function d(e,t,r){const s=t.x,i=t.y,o=r||e.image.width/e.image.height;let a=0,n=0,l=e.offset.x,f=e.offset.y,v=e.rotation,h=e.center.x,g=e.center.y;s/i>o?(a=1,n=i/s*o):(n=1,a=s/i/o),e.matrix.setUvTransform(l,f,a,n,v,h,g)}function m(e,t){e.traverse(r=>{r instanceof M.Mesh&&t(r)})}exports.dispose=y.dispose;exports.getCurrentViewport=c.getCurrentViewport;exports.traverseMaterials=c.traverseMaterials;exports.coverTexture=d;exports.traverseMeshes=m;
@@ -1,20 +0,0 @@
1
- import { d as w } from "../../en3-x-Ki30MY.js";
2
- import { g as T, t as C } from "../../traverseMaterials-mGC2_FkG.js";
3
- import { Mesh as g } from "three";
4
- function y(t, e, s) {
5
- const o = e.x, r = e.y, i = s || t.image.width / t.image.height;
6
- let a = 0, f = 0, c = t.offset.x, n = t.offset.y, h = t.rotation, l = t.center.x, m = t.center.y;
7
- o / r > i ? (a = 1, f = r / o * i) : (f = 1, a = o / r / i), t.matrix.setUvTransform(c, n, a, f, h, l, m);
8
- }
9
- function v(t, e) {
10
- t.traverse((s) => {
11
- s instanceof g && e(s);
12
- });
13
- }
14
- export {
15
- y as coverTexture,
16
- w as dispose,
17
- T as getCurrentViewport,
18
- C as traverseMaterials,
19
- v as traverseMeshes
20
- };
@@ -1,8 +0,0 @@
1
- "use strict";var ce=Object.defineProperty,le=Object.defineProperties;var de=Object.getOwnPropertyDescriptors;var Z=Object.getOwnPropertySymbols;var ue=Object.prototype.hasOwnProperty,oe=Object.prototype.propertyIsEnumerable;var Q=h=>{throw TypeError(h)};var J=(h,t,i)=>t in h?ce(h,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):h[t]=i,O=(h,t)=>{for(var i in t||(t={}))ue.call(t,i)&&J(h,i,t[i]);if(Z)for(var i of Z(t))oe.call(t,i)&&J(h,i,t[i]);return h},ee=(h,t)=>le(h,de(t));var te=(h,t,i)=>t.has(h)||Q("Cannot "+i);var e=(h,t,i)=>(te(h,t,"read from private field"),i?i.call(h):t.get(h)),s=(h,t,i)=>t.has(h)?Q("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(h):t.set(h,i),r=(h,t,i,a)=>(te(h,t,"write to private field"),a?a.call(h,i):t.set(h,i),i);const ie=require("./order/index.cjs"),se=require("./window-resizer/index.cjs"),re=require("./ticker/index.cjs"),ne=require("./dom-JBOkFLTh.cjs"),x=require("three"),he=require("./layout-box/index.cjs");function ae(h){const t=i=>{i.dispose();for(const a of Object.keys(i)){const l=i[a];l&&typeof l=="object"&&"minFilter"in l&&l.dispose()}};h.traverse(i=>{if(i instanceof x.Mesh){if(i.geometry.dispose(),!Array.isArray(i.material)&&i.material.isMaterial)t(i.material);else if(Array.isArray(i.material))for(const a of i.material)t(a)}})}var V,c,p,w,y,M,R,D;class W{constructor(t,i){s(this,V);s(this,c);s(this,p);s(this,w);s(this,y);s(this,M);s(this,R);s(this,D);r(this,V,t),r(this,c,(i==null?void 0:i.cameraType)==="orthographic"?new x.OrthographicCamera:new x.PerspectiveCamera),r(this,p,new x.Scene),r(this,w,[]),r(this,y,(i==null?void 0:i.cameraDistance)||1e3),e(this,c).near=(i==null?void 0:i.cameraNear)||1,e(this,c).far=(i==null?void 0:i.cameraFar)||11e3,r(this,M,(i==null?void 0:i.cameraFov)||"auto"),e(this,c).position.z=e(this,y),e(this,c).name=`Cameras.${e(this,V)}`,r(this,R,ne.getElement(i==null?void 0:i.sizeElement)||document.documentElement),this.beforeRenderCallback=i==null?void 0:i.beforeRender,r(this,D,new he.LayoutBox(e(this,R))),e(this,D).onResize(()=>{this.resize()})}get name(){return e(this,V)}get camera(){return e(this,c)}get scene(){return e(this,p)}get box(){return e(this,D)}get cameraDistance(){return e(this,y)}set cameraDistance(t){r(this,y,t),this.resize()}get sizeElement(){return e(this,R)}get isClipped(){return e(this,R)!==m.containerElement}resize(){const{width:t,height:i}=e(this,D);e(this,c).userData.controlled||(e(this,c).position.z=e(this,y)),e(this,c)instanceof x.PerspectiveCamera?(e(this,c).aspect=t/i,e(this,c).fov=e(this,M)==="auto"?2*Math.atan(i/2/e(this,y))*(180/Math.PI):e(this,c).userData.controlled?e(this,c).fov:e(this,M)):e(this,c)instanceof x.OrthographicCamera&&(e(this,c).left=t/-2,e(this,c).right=t/2,e(this,c).top=i/2,e(this,c).bottom=i/-2),e(this,c).updateProjectionMatrix()}destroy(){e(this,w).forEach(t=>{t.userData.box.destroy()}),e(this,p).clear(),ae(e(this,p)),m.destroyView(this.name),e(this,D).destroy()}attachToHTMLElement(t,i,a){const l=new he.LayoutBox(t,ee(O({},a),{containerElement:e(this,R),cartesian:!0,scrollStep:!this.isClipped}));return l.bindObject(i),i.userData.box=l,e(this,w).push(i),i}detachFromHTMLElement(t){r(this,w,e(this,w).filter(i=>i===t?(t.userData.box.destroy(),!1):!0))}add(...t){const i=t[0],a=t[1],l=t[2];return a&&this.attachToHTMLElement(a,i,l),this.scene.add(i),i}remove(t,i){this.scene.remove(t),i&&this.detachFromHTMLElement(t)}}V=new WeakMap,c=new WeakMap,p=new WeakMap,w=new WeakMap,y=new WeakMap,M=new WeakMap,R=new WeakMap,D=new WeakMap;const K=new Map;var S,k,j,z,A;class me{constructor(t){s(this,S);s(this,k);s(this,j);s(this,z);s(this,A);r(this,S,t.targetName||void 0),r(this,k,t.eventDispatcher||t.object3D),r(this,j,t.propagation||!1),r(this,z,t.object3D),r(this,A,e(this,S)?()=>e(this,z).getObjectByName(e(this,S))||e(this,z):()=>e(this,z))}get object3D(){return e(this,z)}get eventDispatcher(){return e(this,k)}get propagation(){return e(this,j)}get target(){return e(this,A).call(this)}dispatch(t,i){this.eventDispatcher.dispatchEvent(O({originalEvent:i,type:t},this.intersection))}}S=new WeakMap,k=new WeakMap,j=new WeakMap,z=new WeakMap,A=new WeakMap;var g,u,H,F,N,q,I;class fe{constructor(){s(this,g,[]);s(this,u,[]);s(this,H,new x.Vector2);s(this,F,new x.Raycaster);s(this,N,t=>{for(let i=0;i<e(this,u).length;i++)e(this,u)[i].dispatch("pointerDown",t)});s(this,q,t=>{for(let i=0;i<e(this,u).length;i++)e(this,u)[i].dispatch("pointerUp",t)});s(this,I,t=>{if(!e(this,g).length)return;e(this,H).x=t.clientX/m.width*2-1,e(this,H).y=-(t.clientY/m.height)*2+1,m.camera&&e(this,F).setFromCamera(e(this,H),m.camera);const i=[];for(const n of e(this,g)){const b=e(this,F).intersectObject(n.target);b.length&&(n.intersection=b[0],i.push(n))}let a=!1;const l=e(this,u).filter(n=>!i.find(b=>b.object3D.uuid===n.object3D.uuid)),U=i.sort((n,b)=>b.object3D.position.z-n.object3D.position.z).filter((n,b)=>a?(l.push(n),!1):(a=!n.propagation,!0)),X=U.filter(n=>!e(this,u).find(b=>b.object3D.uuid===n.object3D.uuid));for(let n=0;n<l.length;n++)l[n].dispatch("pointerLeave",t);for(let n=0;n<X.length;n++)X[n].dispatch("pointerEnter",t);r(this,u,U);for(let n=0;n<e(this,u).length;n++)e(this,u)[n].dispatch("pointerMove",t)});m.containerElement.addEventListener("pointerdown",e(this,N)),m.containerElement.addEventListener("pointerup",e(this,q)),m.containerElement.addEventListener("pointermove",e(this,I))}destroy(){m.containerElement.removeEventListener("pointerdown",e(this,N)),m.containerElement.removeEventListener("pointerup",e(this,q)),m.containerElement.removeEventListener("pointermove",e(this,I)),r(this,g,[]),r(this,u,[])}add(t,i){if(e(this,g).find(l=>l.object3D.uuid===t.uuid))return;const a=new me(O({object3D:t},i));e(this,g).push(a)}remove(t){r(this,g,e(this,g).filter(i=>i.object3D.uuid!==t.uuid)),r(this,u,e(this,u).filter(i=>i.object3D.uuid!==t.uuid))}}g=new WeakMap,u=new WeakMap,H=new WeakMap,F=new WeakMap,N=new WeakMap,q=new WeakMap,I=new WeakMap;var G,E,d,P,o,L,C,v,_,T,B,f,Y,$;class ge{constructor(){s(this,G,`https://unpkg.com/three@0.${x.REVISION}.x`);s(this,E,null);s(this,d,null);s(this,P,null);s(this,o,new Map);s(this,L,0);s(this,C,0);s(this,v,0);s(this,_,2);s(this,T,!1);s(this,B,!1);s(this,f,null);s(this,Y,()=>{r(this,L,e(this,E).clientWidth),r(this,C,e(this,E).clientHeight),r(this,v,Math.min(e(this,_),devicePixelRatio||1)),e(this,d).setPixelRatio(e(this,v)),e(this,d).setSize(e(this,L),e(this,C)),e(this,f)&&(e(this,f).setPixelRatio(e(this,v)),e(this,f).setSize(e(this,L),e(this,C)))});s(this,$,()=>{e(this,d).setRenderTarget(null),e(this,o).forEach(t=>{this.render(t)})})}get CDNVersion(){return e(this,G)}get containerElement(){return e(this,E)}get webglRenderer(){return e(this,d)}get raycaster(){return e(this,P)}get views(){return e(this,o)}get view(){return this.getView("default")}get camera(){return this.getView("default").camera}get scene(){return this.getView("default").scene}get width(){return e(this,L)}get height(){return e(this,C)}get pixelRatio(){return e(this,v)}get cacheAssets(){return e(this,B)}get composer(){return e(this,f)}setup(t){if(e(this,T)){console.warn("[en3.setup]: You are trying to setup en3 again.");return}r(this,E,ne.getElement(t==null?void 0:t.containerElement)||document.body),r(this,_,(t==null?void 0:t.maxPixelRatio)||2),r(this,d,new x.WebGLRenderer(t==null?void 0:t.webGLRendererParameters)),e(this,d).domElement.style.cssText=`
2
- position: fixed;
3
- left: 0;
4
- top: 0;
5
- width: 100%;
6
- height: 100%;
7
- z-index: ${(t==null?void 0:t.zIndex)||0};
8
- `,(e(this,E).shadowRoot||e(this,E)).append(e(this,d).domElement),e(this,o).set("default",new W("default",O({sizeElement:e(this,E)},t==null?void 0:t.view))),r(this,P,new fe),t!=null&&t.composer&&(r(this,f,new t.composer(e(this,d))),this.render=()=>{e(this,f).render()}),r(this,B,(t==null?void 0:t.cacheAssets)||!1),r(this,T,!0),se.windowResizer.subscribe(e(this,Y),ie.RESIZE_ORDER.EN3),re.ticker.subscribe(e(this,$),{order:ie.TICK_ORDER.EN3})}destroy(){if(!e(this,T)){console.warn("[en3.setup]: You are trying to destory en3 but it has not been initialized.");return}se.windowResizer.unsubscribe(e(this,Y)),re.ticker.unsubscribe(e(this,$)),e(this,P).destroy(),e(this,o).forEach(t=>{t.destroy()}),e(this,d).dispose(),e(this,d).domElement.remove(),r(this,d,null),e(this,f).dispose(),r(this,f,null),r(this,T,!1),K.forEach(t=>{t.dispose()}),K.clear()}createView(t,i){const a=e(this,o).size,l=new W(t,i);return e(this,o).set(t,l),a===1&&e(this,d).setScissorTest(!0),l}getView(t){return e(this,o).get(t)}destroyView(t){const i=e(this,o).get(t);i&&(e(this,o).delete(t),i.destroy(),e(this,o).size<=1&&e(this,d).setScissorTest(!1))}render(t){var i;if(e(this,o).size>1||this.view.isClipped){const a=t.box.left+t.box.CSSTranslation.x+t.box.scrollValue.x,l=m.height-t.box.height-t.box.top+t.box.CSSTranslation.y+t.box.scrollValue.y*-1;e(this,d).setScissor(a,l,t.box.width,t.box.height),e(this,d).setViewport(a,l,t.box.width,t.box.height)}(i=t.beforeRenderCallback)==null||i.call(t),e(this,d).render(t.scene,t.camera)}}G=new WeakMap,E=new WeakMap,d=new WeakMap,P=new WeakMap,o=new WeakMap,L=new WeakMap,C=new WeakMap,v=new WeakMap,_=new WeakMap,T=new WeakMap,B=new WeakMap,f=new WeakMap,Y=new WeakMap,$=new WeakMap;const m=new ge;exports.En3View=W;exports.dispose=ae;exports.en3=m;exports.en3Cache=K;
@@ -1,344 +0,0 @@
1
- var ne = Object.defineProperty, ce = Object.defineProperties;
2
- var le = Object.getOwnPropertyDescriptors;
3
- var U = Object.getOwnPropertySymbols;
4
- var de = Object.prototype.hasOwnProperty, oe = Object.prototype.propertyIsEnumerable;
5
- var Z = (h) => {
6
- throw TypeError(h);
7
- };
8
- var X = (h, t, i) => t in h ? ne(h, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : h[t] = i, P = (h, t) => {
9
- for (var i in t || (t = {}))
10
- de.call(t, i) && X(h, i, t[i]);
11
- if (U)
12
- for (var i of U(t))
13
- oe.call(t, i) && X(h, i, t[i]);
14
- return h;
15
- }, q = (h, t) => ce(h, le(t));
16
- var J = (h, t, i) => t.has(h) || Z("Cannot " + i);
17
- var e = (h, t, i) => (J(h, t, "read from private field"), i ? i.call(h) : t.get(h)), s = (h, t, i) => t.has(h) ? Z("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(h) : t.set(h, i), r = (h, t, i, n) => (J(h, t, "write to private field"), n ? n.call(h, i) : t.set(h, i), i);
18
- import { RESIZE_ORDER as ue, TICK_ORDER as me } from "./order/index.js";
19
- import { windowResizer as Q } from "./window-resizer/index.js";
20
- import { ticker as ee } from "./ticker/index.js";
21
- import { a as ae } from "./dom-P5QbAASX.js";
22
- import { Mesh as fe, OrthographicCamera as te, PerspectiveCamera as ie, Scene as ge, Vector2 as Ee, Raycaster as be, REVISION as xe, WebGLRenderer as ye } from "three";
23
- import { LayoutBox as se } from "./layout-box/index.js";
24
- function we(h) {
25
- const t = (i) => {
26
- i.dispose();
27
- for (const n of Object.keys(i)) {
28
- const l = i[n];
29
- l && typeof l == "object" && "minFilter" in l && l.dispose();
30
- }
31
- };
32
- h.traverse((i) => {
33
- if (i instanceof fe) {
34
- if (i.geometry.dispose(), !Array.isArray(i.material) && i.material.isMaterial)
35
- t(i.material);
36
- else if (Array.isArray(i.material))
37
- for (const n of i.material) t(n);
38
- }
39
- });
40
- }
41
- var T, c, R, y, x, V, w, D;
42
- class re {
43
- constructor(t, i) {
44
- s(this, T);
45
- s(this, c);
46
- s(this, R);
47
- s(this, y);
48
- s(this, x);
49
- s(this, V);
50
- s(this, w);
51
- s(this, D);
52
- r(this, T, t), r(this, c, (i == null ? void 0 : i.cameraType) === "orthographic" ? new te() : new ie()), r(this, R, new ge()), r(this, y, []), r(this, x, (i == null ? void 0 : i.cameraDistance) || 1e3), e(this, c).near = (i == null ? void 0 : i.cameraNear) || 1, e(this, c).far = (i == null ? void 0 : i.cameraFar) || 11e3, r(this, V, (i == null ? void 0 : i.cameraFov) || "auto"), e(this, c).position.z = e(this, x), e(this, c).name = `Cameras.${e(this, T)}`, r(this, w, ae(i == null ? void 0 : i.sizeElement) || document.documentElement), this.beforeRenderCallback = i == null ? void 0 : i.beforeRender, r(this, D, new se(e(this, w))), e(this, D).onResize(() => {
53
- this.resize();
54
- });
55
- }
56
- get name() {
57
- return e(this, T);
58
- }
59
- get camera() {
60
- return e(this, c);
61
- }
62
- get scene() {
63
- return e(this, R);
64
- }
65
- get box() {
66
- return e(this, D);
67
- }
68
- get cameraDistance() {
69
- return e(this, x);
70
- }
71
- set cameraDistance(t) {
72
- r(this, x, t), this.resize();
73
- }
74
- get sizeElement() {
75
- return e(this, w);
76
- }
77
- get isClipped() {
78
- return e(this, w) !== m.containerElement;
79
- }
80
- resize() {
81
- const { width: t, height: i } = e(this, D);
82
- e(this, c).userData.controlled || (e(this, c).position.z = e(this, x)), e(this, c) instanceof ie ? (e(this, c).aspect = t / i, e(this, c).fov = e(this, V) === "auto" ? 2 * Math.atan(i / 2 / e(this, x)) * (180 / Math.PI) : e(this, c).userData.controlled ? e(this, c).fov : e(this, V)) : e(this, c) instanceof te && (e(this, c).left = t / -2, e(this, c).right = t / 2, e(this, c).top = i / 2, e(this, c).bottom = i / -2), e(this, c).updateProjectionMatrix();
83
- }
84
- destroy() {
85
- e(this, y).forEach((t) => {
86
- t.userData.box.destroy();
87
- }), e(this, R).clear(), we(e(this, R)), m.destroyView(this.name), e(this, D).destroy();
88
- }
89
- attachToHTMLElement(t, i, n) {
90
- const l = new se(t, q(P({}, n), {
91
- containerElement: e(this, w),
92
- cartesian: !0,
93
- scrollStep: !this.isClipped
94
- }));
95
- return l.bindObject(i), i.userData.box = l, e(this, y).push(i), i;
96
- }
97
- detachFromHTMLElement(t) {
98
- r(this, y, e(this, y).filter((i) => i === t ? (t.userData.box.destroy(), !1) : !0));
99
- }
100
- add(...t) {
101
- const i = t[0], n = t[1], l = t[2];
102
- return n && this.attachToHTMLElement(n, i, l), this.scene.add(i), i;
103
- }
104
- remove(t, i) {
105
- this.scene.remove(t), i && this.detachFromHTMLElement(t);
106
- }
107
- }
108
- T = new WeakMap(), c = new WeakMap(), R = new WeakMap(), y = new WeakMap(), x = new WeakMap(), V = new WeakMap(), w = new WeakMap(), D = new WeakMap();
109
- const he = /* @__PURE__ */ new Map();
110
- var M, O, j, p, k;
111
- class De {
112
- constructor(t) {
113
- s(this, M);
114
- s(this, O);
115
- s(this, j);
116
- s(this, p);
117
- s(this, k);
118
- r(this, M, t.targetName || void 0), r(this, O, t.eventDispatcher || t.object3D), r(this, j, t.propagation || !1), r(this, p, t.object3D), r(this, k, e(this, M) ? () => e(this, p).getObjectByName(e(this, M)) || e(this, p) : () => e(this, p));
119
- }
120
- get object3D() {
121
- return e(this, p);
122
- }
123
- get eventDispatcher() {
124
- return e(this, O);
125
- }
126
- get propagation() {
127
- return e(this, j);
128
- }
129
- get target() {
130
- return e(this, k).call(this);
131
- }
132
- dispatch(t, i) {
133
- this.eventDispatcher.dispatchEvent(P({
134
- originalEvent: i,
135
- type: t
136
- }, this.intersection));
137
- }
138
- }
139
- M = new WeakMap(), O = new WeakMap(), j = new WeakMap(), p = new WeakMap(), k = new WeakMap();
140
- var g, o, S, A, F, N, I;
141
- class pe {
142
- constructor() {
143
- s(this, g, []);
144
- s(this, o, []);
145
- s(this, S, new Ee());
146
- s(this, A, new be());
147
- s(this, F, (t) => {
148
- for (let i = 0; i < e(this, o).length; i++)
149
- e(this, o)[i].dispatch("pointerDown", t);
150
- });
151
- s(this, N, (t) => {
152
- for (let i = 0; i < e(this, o).length; i++)
153
- e(this, o)[i].dispatch("pointerUp", t);
154
- });
155
- s(this, I, (t) => {
156
- if (!e(this, g).length)
157
- return;
158
- e(this, S).x = t.clientX / m.width * 2 - 1, e(this, S).y = -(t.clientY / m.height) * 2 + 1, m.camera && e(this, A).setFromCamera(e(this, S), m.camera);
159
- const i = [];
160
- for (const a of e(this, g)) {
161
- const b = e(this, A).intersectObject(a.target);
162
- b.length && (a.intersection = b[0], i.push(a));
163
- }
164
- let n = !1;
165
- const l = e(this, o).filter(
166
- (a) => !i.find((b) => b.object3D.uuid === a.object3D.uuid)
167
- ), _ = i.sort(
168
- (a, b) => b.object3D.position.z - a.object3D.position.z
169
- ).filter((a, b) => n ? (l.push(a), !1) : (n = !a.propagation, !0)), K = _.filter(
170
- (a) => !e(this, o).find((b) => b.object3D.uuid === a.object3D.uuid)
171
- );
172
- for (let a = 0; a < l.length; a++)
173
- l[a].dispatch("pointerLeave", t);
174
- for (let a = 0; a < K.length; a++)
175
- K[a].dispatch("pointerEnter", t);
176
- r(this, o, _);
177
- for (let a = 0; a < e(this, o).length; a++)
178
- e(this, o)[a].dispatch("pointerMove", t);
179
- });
180
- m.containerElement.addEventListener(
181
- "pointerdown",
182
- e(this, F)
183
- ), m.containerElement.addEventListener("pointerup", e(this, N)), m.containerElement.addEventListener(
184
- "pointermove",
185
- e(this, I)
186
- );
187
- }
188
- destroy() {
189
- m.containerElement.removeEventListener(
190
- "pointerdown",
191
- e(this, F)
192
- ), m.containerElement.removeEventListener(
193
- "pointerup",
194
- e(this, N)
195
- ), m.containerElement.removeEventListener(
196
- "pointermove",
197
- e(this, I)
198
- ), r(this, g, []), r(this, o, []);
199
- }
200
- add(t, i) {
201
- if (e(this, g).find((l) => l.object3D.uuid === t.uuid))
202
- return;
203
- const n = new De(P({
204
- object3D: t
205
- }, i));
206
- e(this, g).push(n);
207
- }
208
- remove(t) {
209
- r(this, g, e(this, g).filter(
210
- (i) => i.object3D.uuid !== t.uuid
211
- )), r(this, o, e(this, o).filter((i) => i.object3D.uuid !== t.uuid));
212
- }
213
- }
214
- g = new WeakMap(), o = new WeakMap(), S = new WeakMap(), A = new WeakMap(), F = new WeakMap(), N = new WeakMap(), I = new WeakMap();
215
- var W, E, d, H, u, z, L, v, Y, C, $, f, B, G;
216
- class Re {
217
- constructor() {
218
- s(this, W, `https://unpkg.com/three@0.${xe}.x`);
219
- s(this, E, null);
220
- s(this, d, null);
221
- s(this, H, null);
222
- s(this, u, /* @__PURE__ */ new Map());
223
- s(this, z, 0);
224
- s(this, L, 0);
225
- s(this, v, 0);
226
- s(this, Y, 2);
227
- s(this, C, !1);
228
- s(this, $, !1);
229
- s(this, f, null);
230
- s(this, B, () => {
231
- r(this, z, e(this, E).clientWidth), r(this, L, e(this, E).clientHeight), r(this, v, Math.min(e(this, Y), devicePixelRatio || 1)), e(this, d).setPixelRatio(e(this, v)), e(this, d).setSize(e(this, z), e(this, L)), e(this, f) && (e(this, f).setPixelRatio(e(this, v)), e(this, f).setSize(e(this, z), e(this, L)));
232
- });
233
- s(this, G, () => {
234
- e(this, d).setRenderTarget(null), e(this, u).forEach((t) => {
235
- this.render(t);
236
- });
237
- });
238
- }
239
- get CDNVersion() {
240
- return e(this, W);
241
- }
242
- get containerElement() {
243
- return e(this, E);
244
- }
245
- get webglRenderer() {
246
- return e(this, d);
247
- }
248
- get raycaster() {
249
- return e(this, H);
250
- }
251
- get views() {
252
- return e(this, u);
253
- }
254
- get view() {
255
- return this.getView("default");
256
- }
257
- get camera() {
258
- return this.getView("default").camera;
259
- }
260
- get scene() {
261
- return this.getView("default").scene;
262
- }
263
- get width() {
264
- return e(this, z);
265
- }
266
- get height() {
267
- return e(this, L);
268
- }
269
- get pixelRatio() {
270
- return e(this, v);
271
- }
272
- get cacheAssets() {
273
- return e(this, $);
274
- }
275
- get composer() {
276
- return e(this, f);
277
- }
278
- setup(t) {
279
- if (e(this, C)) {
280
- console.warn("[en3.setup]: You are trying to setup en3 again.");
281
- return;
282
- }
283
- r(this, E, ae(t == null ? void 0 : t.containerElement) || document.body), r(this, Y, (t == null ? void 0 : t.maxPixelRatio) || 2), r(this, d, new ye(t == null ? void 0 : t.webGLRendererParameters)), e(this, d).domElement.style.cssText = `
284
- position: fixed;
285
- left: 0;
286
- top: 0;
287
- width: 100%;
288
- height: 100%;
289
- z-index: ${(t == null ? void 0 : t.zIndex) || 0};
290
- `, (e(this, E).shadowRoot || e(this, E)).append(e(this, d).domElement), e(this, u).set(
291
- "default",
292
- new re("default", P({
293
- sizeElement: e(this, E)
294
- }, t == null ? void 0 : t.view))
295
- ), r(this, H, new pe()), t != null && t.composer && (r(this, f, new t.composer(e(this, d))), this.render = () => {
296
- e(this, f).render();
297
- }), r(this, $, (t == null ? void 0 : t.cacheAssets) || !1), r(this, C, !0), Q.subscribe(e(this, B), ue.EN3), ee.subscribe(e(this, G), { order: me.EN3 });
298
- }
299
- destroy() {
300
- if (!e(this, C)) {
301
- console.warn(
302
- "[en3.setup]: You are trying to destory en3 but it has not been initialized."
303
- );
304
- return;
305
- }
306
- Q.unsubscribe(e(this, B)), ee.unsubscribe(e(this, G)), e(this, H).destroy(), e(this, u).forEach((t) => {
307
- t.destroy();
308
- }), e(this, d).dispose(), e(this, d).domElement.remove(), r(this, d, null), e(this, f).dispose(), r(this, f, null), r(this, C, !1), he.forEach((t) => {
309
- t.dispose();
310
- }), he.clear();
311
- }
312
- createView(t, i) {
313
- const n = e(this, u).size, l = new re(t, i);
314
- return e(this, u).set(t, l), n === 1 && e(this, d).setScissorTest(!0), l;
315
- }
316
- getView(t) {
317
- return e(this, u).get(t);
318
- }
319
- destroyView(t) {
320
- const i = e(this, u).get(t);
321
- i && (e(this, u).delete(t), i.destroy(), e(this, u).size <= 1 && e(this, d).setScissorTest(!1));
322
- }
323
- render(t) {
324
- var i;
325
- if (e(this, u).size > 1 || this.view.isClipped) {
326
- const n = t.box.left + t.box.CSSTranslation.x + t.box.scrollValue.x, l = m.height - t.box.height - t.box.top + t.box.CSSTranslation.y + t.box.scrollValue.y * -1;
327
- e(this, d).setScissor(n, l, t.box.width, t.box.height), e(this, d).setViewport(
328
- n,
329
- l,
330
- t.box.width,
331
- t.box.height
332
- );
333
- }
334
- (i = t.beforeRenderCallback) == null || i.call(t), e(this, d).render(t.scene, t.camera);
335
- }
336
- }
337
- W = new WeakMap(), E = new WeakMap(), d = new WeakMap(), H = new WeakMap(), u = new WeakMap(), z = new WeakMap(), L = new WeakMap(), v = new WeakMap(), Y = new WeakMap(), C = new WeakMap(), $ = new WeakMap(), f = new WeakMap(), B = new WeakMap(), G = new WeakMap();
338
- const m = new Re();
339
- export {
340
- re as E,
341
- he as a,
342
- we as d,
343
- m as e
344
- };
@@ -1 +0,0 @@
1
- "use strict";function t(e){e.dispatchEvent(new CustomEvent("sizeChange",{bubbles:!0,composed:!0}))}function n(e){e.dispatchEvent(new CustomEvent("beforeSizeChange",{bubbles:!0,composed:!0}))}exports.dispatchBeforeSizeChangeEvent=n;exports.dispatchSizeChangeEvent=t;
@@ -1,20 +0,0 @@
1
- function t(e) {
2
- e.dispatchEvent(
3
- new CustomEvent("sizeChange", {
4
- bubbles: !0,
5
- composed: !0
6
- })
7
- );
8
- }
9
- function n(e) {
10
- e.dispatchEvent(
11
- new CustomEvent("beforeSizeChange", {
12
- bubbles: !0,
13
- composed: !0
14
- })
15
- );
16
- }
17
- export {
18
- t as a,
19
- n as d
20
- };
@@ -1 +0,0 @@
1
- "use strict";function c(n,t){const o=new Blob([JSON.stringify(t)],{type:"application/json"}),e=document.createElement("a");e.download=n+".json",e.href=window.URL.createObjectURL(o),e.dataset.downloadurl=["application/json",e.download,e.href].join(":");const a=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!0});e.dispatchEvent(a),e.remove()}exports.createJSONAndSave=c;
@@ -1,13 +0,0 @@
1
- function c(n, o) {
2
- const t = new Blob([JSON.stringify(o)], { type: "application/json" }), e = document.createElement("a");
3
- e.download = n + ".json", e.href = window.URL.createObjectURL(t), e.dataset.downloadurl = ["application/json", e.download, e.href].join(":");
4
- const a = new MouseEvent("click", {
5
- view: window,
6
- bubbles: !0,
7
- cancelable: !0
8
- });
9
- e.dispatchEvent(a), e.remove();
10
- }
11
- export {
12
- c
13
- };
@@ -1,9 +0,0 @@
1
- "use strict";var M=s=>{throw TypeError(s)};var T=(s,i,t)=>i.has(s)||M("Cannot "+t);var e=(s,i,t)=>(T(s,i,"read from private field"),t?t.call(s):i.get(s)),n=(s,i,t)=>i.has(s)?M("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(s):i.set(s,t),h=(s,i,t,l)=>(T(s,i,"write to private field"),l?l.call(s,t):i.set(s,t),t),v=(s,i,t)=>(T(s,i,"access private method"),t);require("./Store-npaZHvX4.cjs");const q=require("./browser-CpzFX2xg.cjs"),O=require("./events-BGwqaxVW.cjs"),D=require("./style-At6aDoqG.cjs");require("./ticker/index.cjs");const o=require("./tags-6_ETuR75.cjs"),z=require("./createStylesheet-Csfmh-MH.cjs"),R=require("./theme/index.cjs"),F=z.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)"}});var c,d,r,a,u,m,L,E,C;const I=class I extends HTMLElement{constructor(){super();n(this,E);n(this,c,null);n(this,d,"");n(this,r,null);n(this,a,!1);n(this,u);n(this,m,null);n(this,L,()=>{O.dispatchSizeChangeEvent(this)});q.isBrowser&&(this.attachShadow({mode:"open"}).adoptedStyleSheets.push(F),h(this,c,this.attachInternals()),h(this,m,new ResizeObserver(e(this,L))),o.element(this,{children:[o.button({class:"head",children:o.slot({name:"head"}),onClick:()=>{this.opened?this.close():this.open()}}),o.div({class:"body",style:{height:"0px"},children:o.div({class:"body-inner",children:o.slot()}),ref:l=>{h(this,r,l)}})]}))}get value(){return e(this,d)}set value(t){h(this,d,t),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),e(this,c).setFormValue(e(this,d))}get internals(){return e(this,c)}get opened(){return e(this,a)}open(){clearTimeout(e(this,u)),h(this,a,!0),e(this,r).style.display="grid",this.classList.add("triggered"),setTimeout(()=>{this.classList.add("opened"),e(this,r).style.height=e(this,r).scrollHeight+"px",v(this,E,C).call(this)},0)}close(){h(this,a,!1),e(this,r).style.height="0px",this.classList.remove("opened"),v(this,E,C).call(this),h(this,u,setTimeout(()=>{this.classList.remove("triggered"),e(this,r).style.display="none"},D.getElementTransitionDurationMS(e(this,r))))}connectedCallback(){e(this,m).observe(e(this,r))}disconnectedCallback(){clearTimeout(e(this,u)),e(this,m).disconnect()}};c=new WeakMap,d=new WeakMap,r=new WeakMap,a=new WeakMap,u=new WeakMap,m=new WeakMap,L=new WeakMap,E=new WeakSet,C=function(){O.dispatchBeforeSizeChangeEvent(this),this.dispatchEvent(new CustomEvent("selectToggle",{bubbles:!0,composed:!0,detail:{opened:e(this,a)}}))},I.formAssociated=!0;let x=I;customElements.get("e-select")||customElements.define("e-select",x);var f;class H extends HTMLElement{constructor(){super(...arguments);n(this,f,null)}get selectElement(){return e(this,f)}connectedCallback(){var l,S;const t=(S=(l=this.assignedSlot)==null?void 0:l.getRootNode())==null?void 0:S.host;t?h(this,f,t):console.log(this,"e-select not found")}}f=new WeakMap;const P=z.createStylesheet({":host":{width:"100%",height:"40px",display:"inline-flex",alignItems:"center"}});var p,w,k;class A extends H{constructor(){super();n(this,w);n(this,p,()=>{this.selectElement.value===this.value?this.style.display="none":this.style.display=""});q.isBrowser&&(this.attachShadow({mode:"open"}).adoptedStyleSheets.push(P),o.element(this,{tabindex:0,onClick:()=>{v(this,w,k).call(this)},onKeydown:l=>{l.code==="Space"&&v(this,w,k).call(this)},children:o.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",e(this,p)),setTimeout(()=>{e(this,p).call(this)})}disconnectedCallback(){this.selectElement.removeEventListener("change",e(this,p))}}p=new WeakMap,w=new WeakSet,k=function(){this.selectElement.value=this.value,this.selectElement.close()};customElements.get("e-select-option")||customElements.define("e-select-option",A);const B=`<svg
2
- xmlns="http://www.w3.org/2000/svg"
3
- width="32"
4
- height="32"
5
- viewBox="0 0 24 24"
6
- >
7
- <path d="m12.37 15.835l6.43-6.63C19.201 8.79 18.958 8 18.43 8H5.57c-.528 0-.771.79-.37 1.205l6.43 6.63c.213.22.527.22.74 0Z" />
8
- </svg>
9
- `,U=z.createStylesheet({":host":{width:"100%",height:"40px",display:"inline-flex",alignItems:"center",justifyContent:"space-between"},".default-arrow":{flexShrink:"0",width:"var(--arrow-size, 1em)",height:"var(--arrow-size, 1em)",fill:`var(--arrow-color, ${R.aptechkaTheme.colorMain.var})`,transitionProperty:"transform",transitionDuration:"var(--duration, var(--duration-short))"},":host(.opened) .default-arrow":{transform:"scaleY(-1)"}});var y,g,b;class $ extends H{constructor(){super();n(this,y,null);n(this,g,()=>{const l=this.selectElement.shadowRoot.querySelector(".body slot").assignedElements().find(S=>S.value===this.selectElement.value);l&&(e(this,y).innerHTML=l.innerHTML)});n(this,b,()=>{this.classList.toggle("opened",this.selectElement.opened)});q.isBrowser&&(this.attachShadow({mode:"open"}).adoptedStyleSheets.push(U),o.element(this,{children:[o.slot(),o.slot({name:"arrow",children:o.element(B,{class:"default-arrow"})})]}),this.slot="head")}connectedCallback(){super.connectedCallback(),h(this,y,this.querySelector("[data-value-holder]")||this),this.selectElement.addEventListener("change",e(this,g)),e(this,g).call(this),this.selectElement.addEventListener("selectToggle",e(this,b))}disconnectedCallback(){this.selectElement.removeEventListener("change",e(this,g)),this.selectElement.removeEventListener("selectToggle",e(this,b))}}y=new WeakMap,g=new WeakMap,b=new WeakMap;customElements.get("e-select-head")||customElements.define("e-select-head",$);exports.SelectElement=x;exports.SelectHeadElement=$;exports.SelectOptionElement=A;exports.SelectUserElement=H;exports.arrowIcon=B;