aptechka 0.1.6 → 0.1.8

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 (68) hide show
  1. package/lib/Animated-Bf-gPIQM.cjs +1 -0
  2. package/lib/{Animated-CJcYqJzq.js → Animated-Br_4OSth.js} +36 -35
  3. package/lib/{Damped-AHRBHNEQ.cjs → Damped-BwpMU9Gi.cjs} +1 -1
  4. package/lib/{Damped-Csj-9_gH.js → Damped-urvryQLo.js} +1 -1
  5. package/lib/abstract-elements/index.cjs +1 -1
  6. package/lib/abstract-elements/index.js +11 -14
  7. package/lib/accordion/AccordionElement.d.ts +1 -1
  8. package/lib/accordion/index.cjs +1 -1
  9. package/lib/accordion/index.js +25 -26
  10. package/lib/animation/index.cjs +1 -1
  11. package/lib/animation/index.js +2 -2
  12. package/lib/canvas/index.cjs +1 -1
  13. package/lib/canvas/index.js +18 -18
  14. package/lib/connector/index.cjs +1 -1
  15. package/lib/connector/index.d.ts +1 -2
  16. package/lib/connector/index.js +31 -31
  17. package/lib/createStylesheet-BsVHqHhr.cjs +1 -0
  18. package/lib/createStylesheet-ITfBHk7A.js +8 -0
  19. package/lib/element-constructor/ElementConstructor.d.ts +27 -41
  20. package/lib/element-constructor/index.cjs +1 -1
  21. package/lib/element-constructor/index.d.ts +1 -2
  22. package/lib/element-constructor/index.js +122 -639
  23. package/lib/element-constructor/knownSvgTags.d.ts +1 -0
  24. package/lib/element-constructor/tags.d.ts +119 -0
  25. package/lib/events-Crwi8fz6.cjs +1 -0
  26. package/lib/{events-CoqmkUxo.js → events-_C2CztxR.js} +1 -1
  27. package/lib/index-Bt91QUTY.cjs +9 -0
  28. package/lib/{index-DgtdcBEI.js → index-COirQu7j.js} +83 -92
  29. package/lib/modal/index.cjs +1 -1
  30. package/lib/modal/index.js +33 -39
  31. package/lib/scroll/index.cjs +1 -1
  32. package/lib/scroll/index.js +82 -85
  33. package/lib/select/SelectElement.d.ts +1 -1
  34. package/lib/select/index.cjs +1 -1
  35. package/lib/select/index.d.ts +1 -1
  36. package/lib/select/index.js +1 -1
  37. package/lib/store/Derived.d.ts +1 -1
  38. package/lib/studio/index.cjs +6 -6
  39. package/lib/studio/index.js +322 -369
  40. package/lib/tags-8Y7LSTwg.js +779 -0
  41. package/lib/tags-pcim-Cws.cjs +1 -0
  42. package/lib/theme/index.cjs +1 -1
  43. package/lib/theme/index.js +6 -6
  44. package/lib/utils/events.d.ts +1 -1
  45. package/lib/utils/index.cjs +1 -1
  46. package/lib/utils/index.d.ts +1 -1
  47. package/lib/utils/index.js +1 -1
  48. package/lib/utils/ts-utility.d.ts +2 -2
  49. package/package.json +1 -9
  50. package/lib/Animated-DyZuTEQE.cjs +0 -1
  51. package/lib/ElementConstructor-9f-12v7T.cjs +0 -1
  52. package/lib/ElementConstructor-CoKM2CTK.js +0 -228
  53. package/lib/createStylesheet-BON7aJYs.js +0 -10
  54. package/lib/createStylesheet-uicRVW05.cjs +0 -1
  55. package/lib/element-constructor/htmlTags.d.ts +0 -115
  56. package/lib/element-constructor/svgTags.d.ts +0 -64
  57. package/lib/events-D68xg4dy.cjs +0 -1
  58. package/lib/htmlTags-BCNUG7oK.js +0 -683
  59. package/lib/htmlTags-BSQys9wH.cjs +0 -1
  60. package/lib/index-i_Ki9M-w.cjs +0 -9
  61. package/lib/jsx/ComponentElement.d.ts +0 -17
  62. package/lib/jsx/h.d.ts +0 -8
  63. package/lib/jsx/hooks.d.ts +0 -25
  64. package/lib/jsx/index.cjs +0 -1
  65. package/lib/jsx/index.d.ts +0 -4
  66. package/lib/jsx/index.js +0 -116
  67. package/lib/jsx/render.d.ts +0 -2
  68. package/lib/jsx/type.d.ts +0 -186
@@ -0,0 +1 @@
1
+ "use strict";var j=Object.defineProperty,z=Object.defineProperties;var B=Object.getOwnPropertyDescriptors;var R=Object.getOwnPropertySymbols;var D=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable;var $=(s,r,e)=>r in s?j(s,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[r]=e,v=(s,r)=>{for(var e in r||(r={}))D.call(r,e)&&$(s,e,r[e]);if(R)for(var e of R(r))E.call(r,e)&&$(s,e,r[e]);return s},C=(s,r)=>z(s,B(r));var N=(s,r,e)=>{if(!r.has(s))throw TypeError("Cannot "+e)};var t=(s,r,e)=>(N(s,r,"read from private field"),e?e.call(s):r.get(s)),i=(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)},u=(s,r,e,a)=>(N(s,r,"write to private field"),a?a.call(s,e):r.set(s,e),e);const m=require("./Store-D0_rDIsE.cjs"),G=require("./math-GDWEqu7y.cjs"),H=require("./number-yVpzMdbQ.cjs"),_=require("./ticker/index.cjs");var g,S,f,h,n,c,b,x,F,l,A,P,q;class I extends m.Store{constructor(e){var w,k;super((e==null?void 0:e.default)||0,e);i(this,g,void 0);i(this,S,void 0);i(this,f,void 0);i(this,h,void 0);i(this,n,void 0);i(this,c,void 0);i(this,b,new m.Store(null));i(this,x,new m.Store(!1));i(this,F,0);i(this,l,0);i(this,A,e=>{this.set(e.current)});i(this,P,e=>{const a=this.current;this.handleAnimationFrame(e);const d=Math.abs(a-this.target);u(this,l,d/e.elapsed)});i(this,q,()=>{this.set(t(this,h)),this.current=t(this,h)});u(this,S,e==null?void 0:e.order),u(this,g,e==null?void 0:e.maxFPS),u(this,f,e==null?void 0:e.culling),u(this,h,this.current);let a,d;e!=null&&e.passport&&(a={name:`${e.passport.name+"-min"}`},d={name:`${e.passport.name+"-max"}`}),u(this,n,(e==null?void 0:e.min)instanceof m.Store?e.min:new m.Store((w=e==null?void 0:e.min)!=null?w:0,{passport:a})),u(this,c,(e==null?void 0:e.max)instanceof m.Store?e.max:new m.Store((k=e==null?void 0:e.max)!=null?k:1,{passport:d})),t(this,n).subscribe(t(this,q)),t(this,c).subscribe(t(this,q)),t(this,b).subscribe(L=>{var y,M;(y=L.previous)==null||y.unsubscribe(t(this,A)),(M=L.current)==null||M.subscribe(t(this,A))})}get target(){return t(this,h)}get isRunning(){return t(this,x)}get direction(){return t(this,F)}get maxFPS(){return t(this,g)}get speed(){return t(this,l)}get min(){return t(this,n)}get max(){return t(this,c)}get delta(){return t(this,c).current-t(this,n).current}get progress(){return this.delta?H.preciseNumber((this.current-this.min.current)/this.delta,6):0}get entry(){return C(v({},super.entry),{min:t(this,n).current,max:t(this,c).current,delta:this.delta,direction:this.direction,progress:this.progress,speed:this.speed})}get updater(){return t(this,b)}set(e,a=!1){const d=t(this,h);u(this,h,G.clamp(e,t(this,n).current,t(this,c).current)),a&&(this.current=t(this,h)),t(this,h)!==d&&(u(this,l,0),u(this,F,Math.sign(e-t(this,h))||1),this.update())}shift(e,a=!1){this.set(t(this,h)+e,a)}close(){super.close(),this.unlistenAnimationFrame(),t(this,b).current=null}reset(){this.set(this.initial,!0),super.reset(),this.unlistenAnimationFrame()}listenAnimationFrame(){t(this,x).current=!0,_.ticker.subscribe(t(this,P),{maxFPS:t(this,g),order:t(this,S),culling:t(this,f)})}unlistenAnimationFrame(){u(this,l,0),t(this,x).current=!1,_.ticker.unsubscribe(t(this,P))}}g=new WeakMap,S=new WeakMap,f=new WeakMap,h=new WeakMap,n=new WeakMap,c=new WeakMap,b=new WeakMap,x=new WeakMap,F=new WeakMap,l=new WeakMap,A=new WeakMap,P=new WeakMap,q=new WeakMap;exports.Animated=I;
@@ -1,40 +1,41 @@
1
- var j = Object.defineProperty, q = Object.defineProperties;
2
- var z = Object.getOwnPropertyDescriptors;
3
- var R = Object.getOwnPropertySymbols;
4
- var B = Object.prototype.hasOwnProperty, D = Object.prototype.propertyIsEnumerable;
5
- var $ = (s, r, e) => r in s ? j(s, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[r] = e, k = (s, r) => {
1
+ var z = Object.defineProperty, B = Object.defineProperties;
2
+ var D = Object.getOwnPropertyDescriptors;
3
+ var k = Object.getOwnPropertySymbols;
4
+ var E = Object.prototype.hasOwnProperty, G = Object.prototype.propertyIsEnumerable;
5
+ var v = (s, r, e) => r in s ? z(s, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[r] = e, C = (s, r) => {
6
6
  for (var e in r || (r = {}))
7
- B.call(r, e) && $(s, e, r[e]);
8
- if (R)
9
- for (var e of R(r))
10
- D.call(r, e) && $(s, e, r[e]);
7
+ E.call(r, e) && v(s, e, r[e]);
8
+ if (k)
9
+ for (var e of k(r))
10
+ G.call(r, e) && v(s, e, r[e]);
11
11
  return s;
12
- }, v = (s, r) => q(s, z(r));
13
- var C = (s, r, e) => {
12
+ }, N = (s, r) => B(s, D(r));
13
+ var j = (s, r, e) => {
14
14
  if (!r.has(s))
15
15
  throw TypeError("Cannot " + e);
16
16
  };
17
- var t = (s, r, e) => (C(s, r, "read from private field"), e ? e.call(s) : r.get(s)), i = (s, r, e) => {
17
+ var t = (s, r, e) => (j(s, r, "read from private field"), e ? e.call(s) : r.get(s)), i = (s, r, e) => {
18
18
  if (r.has(s))
19
19
  throw TypeError("Cannot add the same private member more than once");
20
20
  r instanceof WeakSet ? r.add(s) : r.set(s, e);
21
- }, a = (s, r, e, u) => (C(s, r, "write to private field"), u ? u.call(s, e) : r.set(s, e), e);
22
- import { S as m } from "./Store-JOKrNVEr.js";
23
- import { c as E } from "./math-BOBiC4TN.js";
24
- import { p as G } from "./number-Bo5RdrA1.js";
25
- import { ticker as N } from "./ticker/index.js";
26
- var g, x, F, h, n, c, b, f, A, l, P, S, w;
27
- class Q extends m {
21
+ }, a = (s, r, e, u) => (j(s, r, "write to private field"), u ? u.call(s, e) : r.set(s, e), e);
22
+ import { S as c } from "./Store-JOKrNVEr.js";
23
+ import { c as H } from "./math-BOBiC4TN.js";
24
+ import { p as I } from "./number-Bo5RdrA1.js";
25
+ import { ticker as q } from "./ticker/index.js";
26
+ var g, x, F, h, n, m, b, f, A, l, P, S, w;
27
+ class U extends c {
28
28
  constructor(e) {
29
+ var L, y;
29
30
  super((e == null ? void 0 : e.default) || 0, e);
30
31
  i(this, g, void 0);
31
32
  i(this, x, void 0);
32
33
  i(this, F, void 0);
33
34
  i(this, h, void 0);
34
35
  i(this, n, void 0);
35
- i(this, c, void 0);
36
- i(this, b, new m(null));
37
- i(this, f, new m(!1));
36
+ i(this, m, void 0);
37
+ i(this, b, new c(null));
38
+ i(this, f, new c(!1));
38
39
  i(this, A, 0);
39
40
  i(this, l, 0);
40
41
  i(this, P, (e) => {
@@ -55,9 +56,9 @@ class Q extends m {
55
56
  name: `${e.passport.name + "-min"}`
56
57
  }, d = {
57
58
  name: `${e.passport.name + "-max"}`
58
- }), a(this, n, (e == null ? void 0 : e.min) instanceof m ? e.min : new m(0, { passport: u })), a(this, c, (e == null ? void 0 : e.max) instanceof m ? e.max : new m(0, { passport: d })), t(this, n).subscribe(t(this, w)), t(this, c).subscribe(t(this, w)), t(this, b).subscribe((L) => {
59
- var y, M;
60
- (y = L.previous) == null || y.unsubscribe(t(this, P)), (M = L.current) == null || M.subscribe(t(this, P));
59
+ }), a(this, n, (e == null ? void 0 : e.min) instanceof c ? e.min : new c((L = e == null ? void 0 : e.min) != null ? L : 0, { passport: u })), a(this, m, (e == null ? void 0 : e.max) instanceof c ? e.max : new c((y = e == null ? void 0 : e.max) != null ? y : 1, { passport: d })), t(this, n).subscribe(t(this, w)), t(this, m).subscribe(t(this, w)), t(this, b).subscribe((M) => {
60
+ var R, $;
61
+ (R = M.previous) == null || R.unsubscribe(t(this, P)), ($ = M.current) == null || $.subscribe(t(this, P));
61
62
  });
62
63
  }
63
64
  get target() {
@@ -79,18 +80,18 @@ class Q extends m {
79
80
  return t(this, n);
80
81
  }
81
82
  get max() {
82
- return t(this, c);
83
+ return t(this, m);
83
84
  }
84
85
  get delta() {
85
- return t(this, c).current - t(this, n).current;
86
+ return t(this, m).current - t(this, n).current;
86
87
  }
87
88
  get progress() {
88
- return this.delta ? G((this.current - this.min.current) / this.delta, 6) : 0;
89
+ return this.delta ? I((this.current - this.min.current) / this.delta, 6) : 0;
89
90
  }
90
91
  get entry() {
91
- return v(k({}, super.entry), {
92
+ return N(C({}, super.entry), {
92
93
  min: t(this, n).current,
93
- max: t(this, c).current,
94
+ max: t(this, m).current,
94
95
  delta: this.delta,
95
96
  direction: this.direction,
96
97
  progress: this.progress,
@@ -102,7 +103,7 @@ class Q extends m {
102
103
  }
103
104
  set(e, u = !1) {
104
105
  const d = t(this, h);
105
- a(this, h, E(e, t(this, n).current, t(this, c).current)), u && (this.current = t(this, h)), t(this, h) !== d && (a(this, l, 0), a(this, A, Math.sign(e - t(this, h)) || 1), this.update());
106
+ a(this, h, H(e, t(this, n).current, t(this, m).current)), u && (this.current = t(this, h)), t(this, h) !== d && (a(this, l, 0), a(this, A, Math.sign(e - t(this, h)) || 1), this.update());
106
107
  }
107
108
  shift(e, u = !1) {
108
109
  this.set(t(this, h) + e, u);
@@ -114,17 +115,17 @@ class Q extends m {
114
115
  this.set(this.initial, !0), super.reset(), this.unlistenAnimationFrame();
115
116
  }
116
117
  listenAnimationFrame() {
117
- t(this, f).current = !0, N.subscribe(t(this, S), {
118
+ t(this, f).current = !0, q.subscribe(t(this, S), {
118
119
  maxFPS: t(this, g),
119
120
  order: t(this, x),
120
121
  culling: t(this, F)
121
122
  });
122
123
  }
123
124
  unlistenAnimationFrame() {
124
- a(this, l, 0), t(this, f).current = !1, N.unsubscribe(t(this, S));
125
+ a(this, l, 0), t(this, f).current = !1, q.unsubscribe(t(this, S));
125
126
  }
126
127
  }
127
- g = new WeakMap(), x = new WeakMap(), F = new WeakMap(), h = new WeakMap(), n = new WeakMap(), c = new WeakMap(), b = new WeakMap(), f = new WeakMap(), A = new WeakMap(), l = new WeakMap(), P = new WeakMap(), S = new WeakMap(), w = new WeakMap();
128
+ g = new WeakMap(), x = new WeakMap(), F = new WeakMap(), h = new WeakMap(), n = new WeakMap(), m = new WeakMap(), b = new WeakMap(), f = new WeakMap(), A = new WeakMap(), l = new WeakMap(), P = new WeakMap(), S = new WeakMap(), w = new WeakMap();
128
129
  export {
129
- Q as A
130
+ U as A
130
131
  };
@@ -1 +1 @@
1
- "use strict";var d=Object.defineProperty,g=Object.defineProperties;var l=Object.getOwnPropertyDescriptors;var n=Object.getOwnPropertySymbols;var A=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable;var i=(r,t,e)=>t in r?d(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,h=(r,t)=>{for(var e in t||(t={}))A.call(t,e)&&i(r,e,t[e]);if(n)for(var e of n(t))f.call(t,e)&&i(r,e,t[e]);return r},s=(r,t)=>g(r,l(t));var u=(r,t,e)=>(i(r,typeof t!="symbol"?t+"":t,e),e);const F=require("./math-GDWEqu7y.cjs"),c=require("./number-yVpzMdbQ.cjs"),b=require("./Animated-DyZuTEQE.cjs");class q extends b.Animated{constructor(e){var a,m;super(s(h({},e),{min:(a=e==null?void 0:e.min)!=null?a:-1/0,max:(m=e==null?void 0:e.max)!=null?m:1/0}));u(this,"damping");this.damping=(e==null?void 0:e.damping)||0}update(){this.damping?this.listenAnimationFrame():(this.current=this.target,this.unlistenAnimationFrame())}handleAnimationFrame(e){c.preciseNumber(this.current,4)===c.preciseNumber(this.target,4)&&(this.unlistenAnimationFrame(),this.current=this.target),this.current=F.damp(this.current,this.target,this.damping,e.elapsed)}}exports.Damped=q;
1
+ "use strict";var d=Object.defineProperty,g=Object.defineProperties;var l=Object.getOwnPropertyDescriptors;var n=Object.getOwnPropertySymbols;var A=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable;var i=(r,t,e)=>t in r?d(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,h=(r,t)=>{for(var e in t||(t={}))A.call(t,e)&&i(r,e,t[e]);if(n)for(var e of n(t))f.call(t,e)&&i(r,e,t[e]);return r},s=(r,t)=>g(r,l(t));var u=(r,t,e)=>(i(r,typeof t!="symbol"?t+"":t,e),e);const F=require("./math-GDWEqu7y.cjs"),c=require("./number-yVpzMdbQ.cjs"),b=require("./Animated-Bf-gPIQM.cjs");class q extends b.Animated{constructor(e){var a,m;super(s(h({},e),{min:(a=e==null?void 0:e.min)!=null?a:-1/0,max:(m=e==null?void 0:e.max)!=null?m:1/0}));u(this,"damping");this.damping=(e==null?void 0:e.damping)||0}update(){this.damping?this.listenAnimationFrame():(this.current=this.target,this.unlistenAnimationFrame())}handleAnimationFrame(e){c.preciseNumber(this.current,4)===c.preciseNumber(this.target,4)&&(this.unlistenAnimationFrame(),this.current=this.target),this.current=F.damp(this.current,this.target,this.damping,e.elapsed)}}exports.Damped=q;
@@ -13,7 +13,7 @@ var r = (a, t, e) => t in a ? c(a, t, { enumerable: !0, configurable: !0, writab
13
13
  var d = (a, t, e) => (r(a, typeof t != "symbol" ? t + "" : t, e), e);
14
14
  import { d as x } from "./math-BOBiC4TN.js";
15
15
  import { p as u } from "./number-Bo5RdrA1.js";
16
- import { A as F } from "./Animated-CJcYqJzq.js";
16
+ import { A as F } from "./Animated-Br_4OSth.js";
17
17
  class p extends F {
18
18
  constructor(e) {
19
19
  var i, m;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../custom-element/index.cjs"),r=require("../ElementConstructor-9f-12v7T.cjs"),s=require("../browser-CpzFX2xg.cjs");class n extends e.CustomElement{constructor(){super(),s.isBrowser&&r.element(this,{attributes:{tabIndex:this.getAttribute("tabindex")||"0",role:"button"},style:{cursor:"default"},events:{keydown:t=>{t.code==="Space"&&this.click()},click:()=>{this.click()}}})}}exports.AbstractButtonElement=n;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../custom-element/index.cjs");require("../Store-D0_rDIsE.cjs");const r=require("../browser-CpzFX2xg.cjs"),s=require("../tags-pcim-Cws.cjs");class o extends t.CustomElement{constructor(){super(),r.isBrowser&&s.element(this,{style:{cursor:"default"},tabIndex:this.getAttribute("tabindex")||"0",role:"button",onKeydown:e=>{e.code==="Space"&&this.click()},onClick:()=>{this.click()}})}}exports.AbstractButtonElement=o;
@@ -1,23 +1,20 @@
1
1
  import { CustomElement as e } from "../custom-element/index.js";
2
- import { e as s } from "../ElementConstructor-CoKM2CTK.js";
3
- import { i as r } from "../browser-0zX67oeU.js";
2
+ import "../Store-JOKrNVEr.js";
3
+ import { i as o } from "../browser-0zX67oeU.js";
4
+ import { e as r } from "../tags-8Y7LSTwg.js";
4
5
  class l extends e {
5
6
  constructor() {
6
- super(), r && s(this, {
7
- attributes: {
8
- tabIndex: this.getAttribute("tabindex") || "0",
9
- role: "button"
10
- },
7
+ super(), o && r(this, {
11
8
  style: {
12
9
  cursor: "default"
13
10
  },
14
- events: {
15
- keydown: (t) => {
16
- t.code === "Space" && this.click();
17
- },
18
- click: () => {
19
- this.click();
20
- }
11
+ tabIndex: this.getAttribute("tabindex") || "0",
12
+ role: "button",
13
+ onKeydown: (t) => {
14
+ t.code === "Space" && this.click();
15
+ },
16
+ onClick: () => {
17
+ this.click();
21
18
  }
22
19
  });
23
20
  }
@@ -25,6 +25,6 @@ declare global {
25
25
  'e-accordion': AccordionElement;
26
26
  }
27
27
  interface HTMLElementEventMap {
28
- 'e-accordion-item-toggle': CustomEvent<AccordionItemToggleEventDetail>;
28
+ accordionItemToggle: CustomEvent<AccordionItemToggleEventDetail>;
29
29
  }
30
30
  }
@@ -1 +1 @@
1
- "use strict";var I=(s,e,i)=>{if(!e.has(s))throw TypeError("Cannot "+i)};var t=(s,e,i)=>(I(s,e,"read from private field"),i?i.call(s):e.get(s)),h=(s,e,i)=>{if(e.has(s))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(s):e.set(s,i)},d=(s,e,i,l)=>(I(s,e,"write to private field"),l?l.call(s,i):e.set(s,i),i);var a=(s,e,i)=>(I(s,e,"access private method"),i);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const G=require("../custom-element/index.cjs"),N=require("../attribute/index.cjs"),J=require("../browser-CpzFX2xg.cjs"),K=require("../events-D68xg4dy.cjs"),Q=require("../style-At6aDoqG.cjs");var U=Object.defineProperty,V=Object.getOwnPropertyDescriptor,X=(s,e,i,l)=>{for(var g=l>1?void 0:l?V(e,i):e,O=s.length-1,S;O>=0;O--)(S=s[O])&&(g=(l?S(e,i,g):S(g))||g);return l&&g&&U(e,i,g),g},$=(s,e,i)=>{if(!e.has(s))throw TypeError("Cannot "+i)},o=(s,e,i)=>($(s,e,"read from private field"),i?i.call(s):e.get(s)),L=(s,e,i)=>{if(e.has(s))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(s):e.set(s,i)},R=(s,e,i,l)=>($(s,e,"write to private field"),l?l.call(s,i):e.set(s,i),i),W,q,u,y,z,P,E,r,f,n,p,k,w,v,x,F,T,b,H,A,c,m,_,M,C,D;class B{constructor(e,i){h(this,x);h(this,c);h(this,_);h(this,C);h(this,E,null);h(this,r,null);h(this,f,null);h(this,n,null);h(this,p,null);h(this,k,!1);h(this,w,void 0);h(this,v,!1);h(this,T,()=>{t(this,v)?this.close():this.open()});h(this,b,()=>{t(this,v)&&(a(this,c,m).call(this,0,!0),a(this,c,m).call(this,t(this,n).scrollHeight))});h(this,H,()=>{a(this,_,M).call(this,"size-change")});h(this,A,()=>{t(this,v)&&(a(this,c,m).call(this,0,!0),a(this,c,m).call(this,t(this,n).scrollHeight))});i.firstElementChild instanceof HTMLElement&&i.lastElementChild instanceof HTMLElement?(d(this,E,e),d(this,r,i),d(this,f,i.firstElementChild),d(this,n,i.lastElementChild),t(this,f).style.cursor="default",t(this,n).style.height="0px",t(this,n).style.overflow="hidden",d(this,p,new ResizeObserver(t(this,H))),addEventListener("resize",t(this,b)),t(this,f).addEventListener("click",t(this,T)),t(this,r).addEventListener("e-size-change",t(this,A)),t(this,r).hasAttribute("data-opened")&&this.open({skipTransition:!0})):e.removeItem(t(this,r))}get element(){return t(this,r)}destroy(){t(this,f)&&(t(this,r).classList.remove("opened","triggered"),t(this,f).style.cursor="",a(this,c,m).call(this,void 0),t(this,p).disconnect(),removeEventListener("resize",t(this,b)),t(this,f).removeEventListener("click",t(this,T)),t(this,r).removeEventListener("e-size-change",t(this,A)),clearTimeout(t(this,w)))}open(e){e!=null&&e.skipTransition&&a(this,C,D).call(this),t(this,E).multipleAttribute.current||t(this,E).closeAll({exclude:t(this,r)}),t(this,k)||t(this,p).observe(t(this,n)),d(this,v,!0),clearTimeout(t(this,w)),t(this,r).classList.add("triggered"),a(this,c,m).call(this,t(this,n).scrollHeight),setTimeout(()=>{t(this,r).classList.add("opened")},0),a(this,_,M).call(this,"toggle")}close(e){e!=null&&e.skipTransition&&a(this,C,D).call(this),d(this,v,!1),t(this,r).classList.remove("opened"),a(this,c,m).call(this,0),d(this,w,setTimeout(()=>{t(this,r).classList.remove("triggered")},Q.getElementTransitionDurationMS(t(this,n)))),a(this,_,M).call(this,"toggle")}}E=new WeakMap,r=new WeakMap,f=new WeakMap,n=new WeakMap,p=new WeakMap,k=new WeakMap,w=new WeakMap,v=new WeakMap,x=new WeakSet,F=function(){return t(this,r).parentElement||t(this,r).getRootNode()},T=new WeakMap,b=new WeakMap,H=new WeakMap,A=new WeakMap,c=new WeakSet,m=function(e,i=!1){i&&(t(this,n).style.transition="all 0s",setTimeout(()=>{t(this,n).style.transition=""})),e!=null?t(this,n).style.height=`${e}px`:t(this,n).style.height=""},_=new WeakSet,M=function(e){e==="toggle"?t(this,r).dispatchEvent(new CustomEvent("e-accordion-item-toggle",{bubbles:!0,composed:!0,detail:{opened:t(this,v)}})):e==="size-change"&&K.dispatchSizeChangeEvent(t(this,x,F))},C=new WeakSet,D=function(){t(this,n).style.transition="all 0s",setTimeout(()=>{t(this,n).style.transition=""},50)};exports.AccordionElement=class extends G.CustomElement{constructor(){super(),L(this,z),L(this,W,new N.Attribute(this,"axis","y")),L(this,q,new N.Attribute(this,"multiple",!1)),L(this,u,[]),L(this,y,null),J.isBrowser&&R(this,y,new MutationObserver(e=>{e.forEach(i=>{i.removedNodes.forEach(l=>{l instanceof HTMLElement&&this.removeItem(l)}),i.addedNodes.forEach(l=>{l instanceof HTMLElement&&this.createItem(l)})})}))}get axisAttribute(){return o(this,W)}get multipleAttribute(){return o(this,q)}createItem(e){o(this,u).find(i=>i.element===e)||o(this,u).push(new B(this,e))}removeItem(e){R(this,u,o(this,u).filter(i=>{if(i.element!==e)return!0;i.destroy()}))}closeAll(e){o(this,u).forEach(i=>{(e==null?void 0:e.exclude)!==i.element&&i.close(e)})}openAll(e){o(this,u).forEach(i=>{(e==null?void 0:e.exclude)!==i.element&&i.open(e)})}connectedCallback(){o(this,y).observe(o(this,z,P),{childList:!0}),R(this,u,[...o(this,z,P).children].map(e=>{if(e instanceof HTMLElement)return new B(this,e)}).filter(e=>!!e))}disconnectedCallback(){o(this,y).disconnect()}};W=new WeakMap;q=new WeakMap;u=new WeakMap;y=new WeakMap;z=new WeakSet;P=function(){return this.shadowRoot?this.shadowRoot:this};exports.AccordionElement=X([G.define("e-accordion")],exports.AccordionElement);
1
+ "use strict";var I=(s,e,i)=>{if(!e.has(s))throw TypeError("Cannot "+i)};var t=(s,e,i)=>(I(s,e,"read from private field"),i?i.call(s):e.get(s)),h=(s,e,i)=>{if(e.has(s))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(s):e.set(s,i)},d=(s,e,i,l)=>(I(s,e,"write to private field"),l?l.call(s,i):e.set(s,i),i);var a=(s,e,i)=>(I(s,e,"access private method"),i);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const G=require("../custom-element/index.cjs"),N=require("../attribute/index.cjs"),J=require("../browser-CpzFX2xg.cjs"),K=require("../events-Crwi8fz6.cjs"),Q=require("../style-At6aDoqG.cjs");var U=Object.defineProperty,V=Object.getOwnPropertyDescriptor,X=(s,e,i,l)=>{for(var E=l>1?void 0:l?V(e,i):e,O=s.length-1,S;O>=0;O--)(S=s[O])&&(E=(l?S(e,i,E):S(E))||E);return l&&E&&U(e,i,E),E},$=(s,e,i)=>{if(!e.has(s))throw TypeError("Cannot "+i)},o=(s,e,i)=>($(s,e,"read from private field"),i?i.call(s):e.get(s)),_=(s,e,i)=>{if(e.has(s))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(s):e.set(s,i)},R=(s,e,i,l)=>($(s,e,"write to private field"),l?l.call(s,i):e.set(s,i),i),W,q,u,T,k,P,g,r,f,n,p,M,w,v,x,F,y,b,H,A,c,m,L,z,C,D;class B{constructor(e,i){h(this,x);h(this,c);h(this,L);h(this,C);h(this,g,null);h(this,r,null);h(this,f,null);h(this,n,null);h(this,p,null);h(this,M,!1);h(this,w,void 0);h(this,v,!1);h(this,y,()=>{t(this,v)?this.close():this.open()});h(this,b,()=>{t(this,v)&&(a(this,c,m).call(this,0,!0),a(this,c,m).call(this,t(this,n).scrollHeight))});h(this,H,()=>{a(this,L,z).call(this,"size-change")});h(this,A,()=>{t(this,v)&&(a(this,c,m).call(this,0,!0),a(this,c,m).call(this,t(this,n).scrollHeight))});i.firstElementChild instanceof HTMLElement&&i.lastElementChild instanceof HTMLElement?(d(this,g,e),d(this,r,i),d(this,f,i.firstElementChild),d(this,n,i.lastElementChild),t(this,f).style.cursor="default",t(this,n).style.height="0px",t(this,n).style.overflow="hidden",d(this,p,new ResizeObserver(t(this,H))),addEventListener("resize",t(this,b)),t(this,f).addEventListener("click",t(this,y)),t(this,r).addEventListener("sizeChange",t(this,A)),t(this,r).hasAttribute("data-opened")&&this.open({skipTransition:!0})):e.removeItem(t(this,r))}get element(){return t(this,r)}destroy(){t(this,f)&&(t(this,r).classList.remove("opened","triggered"),t(this,f).style.cursor="",a(this,c,m).call(this,void 0),t(this,p).disconnect(),removeEventListener("resize",t(this,b)),t(this,f).removeEventListener("click",t(this,y)),t(this,r).removeEventListener("sizeChange",t(this,A)),clearTimeout(t(this,w)))}open(e){e!=null&&e.skipTransition&&a(this,C,D).call(this),t(this,g).multipleAttribute.current||t(this,g).closeAll({exclude:t(this,r)}),t(this,M)||t(this,p).observe(t(this,n)),d(this,v,!0),clearTimeout(t(this,w)),t(this,r).classList.add("triggered"),a(this,c,m).call(this,t(this,n).scrollHeight),setTimeout(()=>{t(this,r).classList.add("opened")},0),a(this,L,z).call(this,"toggle")}close(e){e!=null&&e.skipTransition&&a(this,C,D).call(this),d(this,v,!1),t(this,r).classList.remove("opened"),a(this,c,m).call(this,0),d(this,w,setTimeout(()=>{t(this,r).classList.remove("triggered")},Q.getElementTransitionDurationMS(t(this,n)))),a(this,L,z).call(this,"toggle")}}g=new WeakMap,r=new WeakMap,f=new WeakMap,n=new WeakMap,p=new WeakMap,M=new WeakMap,w=new WeakMap,v=new WeakMap,x=new WeakSet,F=function(){return t(this,r).parentElement||t(this,r).getRootNode()},y=new WeakMap,b=new WeakMap,H=new WeakMap,A=new WeakMap,c=new WeakSet,m=function(e,i=!1){i&&(t(this,n).style.transition="all 0s",setTimeout(()=>{t(this,n).style.transition=""})),e!=null?t(this,n).style.height=`${e}px`:t(this,n).style.height=""},L=new WeakSet,z=function(e){e==="toggle"?t(this,r).dispatchEvent(new CustomEvent("accordionItemToggle",{bubbles:!0,composed:!0,detail:{opened:t(this,v)}})):e==="size-change"&&K.dispatchSizeChangeEvent(t(this,x,F))},C=new WeakSet,D=function(){t(this,n).style.transition="all 0s",setTimeout(()=>{t(this,n).style.transition=""},50)};exports.AccordionElement=class extends G.CustomElement{constructor(){super(),_(this,k),_(this,W,new N.Attribute(this,"axis","y")),_(this,q,new N.Attribute(this,"multiple",!1)),_(this,u,[]),_(this,T,null),J.isBrowser&&R(this,T,new MutationObserver(e=>{e.forEach(i=>{i.removedNodes.forEach(l=>{l instanceof HTMLElement&&this.removeItem(l)}),i.addedNodes.forEach(l=>{l instanceof HTMLElement&&this.createItem(l)})})}))}get axisAttribute(){return o(this,W)}get multipleAttribute(){return o(this,q)}createItem(e){o(this,u).find(i=>i.element===e)||o(this,u).push(new B(this,e))}removeItem(e){R(this,u,o(this,u).filter(i=>{if(i.element!==e)return!0;i.destroy()}))}closeAll(e){o(this,u).forEach(i=>{(e==null?void 0:e.exclude)!==i.element&&i.close(e)})}openAll(e){o(this,u).forEach(i=>{(e==null?void 0:e.exclude)!==i.element&&i.open(e)})}connectedCallback(){o(this,T).observe(o(this,k,P),{childList:!0}),R(this,u,[...o(this,k,P).children].map(e=>{if(e instanceof HTMLElement)return new B(this,e)}).filter(e=>!!e))}disconnectedCallback(){o(this,T).disconnect()}};W=new WeakMap;q=new WeakMap;u=new WeakMap;T=new WeakMap;k=new WeakSet;P=function(){return this.shadowRoot?this.shadowRoot:this};exports.AccordionElement=X([G.define("e-accordion")],exports.AccordionElement);addEventListener("click",s=>{});
@@ -11,20 +11,20 @@ var l = (t, e, s) => (S(t, e, "access private method"), s);
11
11
  import { CustomElement as J, define as K } from "../custom-element/index.js";
12
12
  import { Attribute as B } from "../attribute/index.js";
13
13
  import { i as Q } from "../browser-0zX67oeU.js";
14
- import { d as U } from "../events-CoqmkUxo.js";
14
+ import { d as U } from "../events-_C2CztxR.js";
15
15
  import { g as V } from "../style-j2TwriJ_.js";
16
16
  var X = Object.defineProperty, Y = Object.getOwnPropertyDescriptor, Z = (t, e, s, o) => {
17
- for (var g = o > 1 ? void 0 : o ? Y(e, s) : e, O = t.length - 1, I; O >= 0; O--)
18
- (I = t[O]) && (g = (o ? I(e, s, g) : I(g)) || g);
17
+ for (var g = o > 1 ? void 0 : o ? Y(e, s) : e, I = t.length - 1, O; I >= 0; I--)
18
+ (O = t[I]) && (g = (o ? O(e, s, g) : O(g)) || g);
19
19
  return o && g && X(e, s, g), g;
20
20
  }, q = (t, e, s) => {
21
21
  if (!e.has(t))
22
22
  throw TypeError("Cannot " + s);
23
- }, a = (t, e, s) => (q(t, e, "read from private field"), s ? s.call(t) : e.get(t)), _ = (t, e, s) => {
23
+ }, a = (t, e, s) => (q(t, e, "read from private field"), s ? s.call(t) : e.get(t)), T = (t, e, s) => {
24
24
  if (e.has(t))
25
25
  throw TypeError("Cannot add the same private member more than once");
26
26
  e instanceof WeakSet ? e.add(t) : e.set(t, s);
27
- }, R = (t, e, s, o) => (q(t, e, "write to private field"), o ? o.call(t, s) : e.set(t, s), s), W, P, f, T, z, D, p, r, u, n, E, M, w, m, x, F, y, C, H, b, c, v, L, k, A, N;
27
+ }, R = (t, e, s, o) => (q(t, e, "write to private field"), o ? o.call(t, s) : e.set(t, s), s), W, P, f, _, k, D, p, r, u, n, E, M, w, m, x, F, y, C, H, b, c, v, L, z, A, N;
28
28
  class G {
29
29
  constructor(e, s) {
30
30
  h(this, x);
@@ -46,13 +46,13 @@ class G {
46
46
  i(this, m) && (l(this, c, v).call(this, 0, !0), l(this, c, v).call(this, i(this, n).scrollHeight));
47
47
  });
48
48
  h(this, H, () => {
49
- l(this, L, k).call(this, "size-change");
49
+ l(this, L, z).call(this, "size-change");
50
50
  });
51
51
  h(this, b, () => {
52
52
  i(this, m) && (l(this, c, v).call(this, 0, !0), l(this, c, v).call(this, i(this, n).scrollHeight));
53
53
  });
54
54
  s.firstElementChild instanceof HTMLElement && s.lastElementChild instanceof HTMLElement ? (d(this, p, e), d(this, r, s), d(this, u, s.firstElementChild), d(this, n, s.lastElementChild), i(this, u).style.cursor = "default", i(this, n).style.height = "0px", i(this, n).style.overflow = "hidden", d(this, E, new ResizeObserver(i(this, H))), addEventListener("resize", i(this, C)), i(this, u).addEventListener("click", i(this, y)), i(this, r).addEventListener(
55
- "e-size-change",
55
+ "sizeChange",
56
56
  i(this, b)
57
57
  ), i(this, r).hasAttribute("data-opened") && this.open({ skipTransition: !0 })) : e.removeItem(i(this, r));
58
58
  }
@@ -61,19 +61,19 @@ class G {
61
61
  }
62
62
  destroy() {
63
63
  i(this, u) && (i(this, r).classList.remove("opened", "triggered"), i(this, u).style.cursor = "", l(this, c, v).call(this, void 0), i(this, E).disconnect(), removeEventListener("resize", i(this, C)), i(this, u).removeEventListener("click", i(this, y)), i(this, r).removeEventListener(
64
- "e-size-change",
64
+ "sizeChange",
65
65
  i(this, b)
66
66
  ), clearTimeout(i(this, w)));
67
67
  }
68
68
  open(e) {
69
69
  e != null && e.skipTransition && l(this, A, N).call(this), i(this, p).multipleAttribute.current || i(this, p).closeAll({ exclude: i(this, r) }), i(this, M) || i(this, E).observe(i(this, n)), d(this, m, !0), clearTimeout(i(this, w)), i(this, r).classList.add("triggered"), l(this, c, v).call(this, i(this, n).scrollHeight), setTimeout(() => {
70
70
  i(this, r).classList.add("opened");
71
- }, 0), l(this, L, k).call(this, "toggle");
71
+ }, 0), l(this, L, z).call(this, "toggle");
72
72
  }
73
73
  close(e) {
74
74
  e != null && e.skipTransition && l(this, A, N).call(this), d(this, m, !1), i(this, r).classList.remove("opened"), l(this, c, v).call(this, 0), d(this, w, setTimeout(() => {
75
75
  i(this, r).classList.remove("triggered");
76
- }, V(i(this, n)))), l(this, L, k).call(this, "toggle");
76
+ }, V(i(this, n)))), l(this, L, z).call(this, "toggle");
77
77
  }
78
78
  }
79
79
  p = new WeakMap(), r = new WeakMap(), u = new WeakMap(), n = new WeakMap(), E = new WeakMap(), M = new WeakMap(), w = new WeakMap(), m = new WeakMap(), x = new WeakSet(), F = function() {
@@ -82,18 +82,15 @@ p = new WeakMap(), r = new WeakMap(), u = new WeakMap(), n = new WeakMap(), E =
82
82
  s && (i(this, n).style.transition = "all 0s", setTimeout(() => {
83
83
  i(this, n).style.transition = "";
84
84
  })), e != null ? i(this, n).style.height = `${e}px` : i(this, n).style.height = "";
85
- }, L = new WeakSet(), k = function(e) {
85
+ }, L = new WeakSet(), z = function(e) {
86
86
  e === "toggle" ? i(this, r).dispatchEvent(
87
- new CustomEvent(
88
- "e-accordion-item-toggle",
89
- {
90
- bubbles: !0,
91
- composed: !0,
92
- detail: {
93
- opened: i(this, m)
94
- }
87
+ new CustomEvent("accordionItemToggle", {
88
+ bubbles: !0,
89
+ composed: !0,
90
+ detail: {
91
+ opened: i(this, m)
95
92
  }
96
- )
93
+ })
97
94
  ) : e === "size-change" && U(i(this, x, F));
98
95
  }, A = new WeakSet(), N = function() {
99
96
  i(this, n).style.transition = "all 0s", setTimeout(() => {
@@ -102,7 +99,7 @@ p = new WeakMap(), r = new WeakMap(), u = new WeakMap(), n = new WeakMap(), E =
102
99
  };
103
100
  let $ = class extends J {
104
101
  constructor() {
105
- super(), _(this, z), _(this, W, new B(this, "axis", "y")), _(this, P, new B(this, "multiple", !1)), _(this, f, []), _(this, T, null), Q && R(this, T, new MutationObserver((t) => {
102
+ super(), T(this, k), T(this, W, new B(this, "axis", "y")), T(this, P, new B(this, "multiple", !1)), T(this, f, []), T(this, _, null), Q && R(this, _, new MutationObserver((t) => {
106
103
  t.forEach((e) => {
107
104
  e.removedNodes.forEach((s) => {
108
105
  s instanceof HTMLElement && this.removeItem(s);
@@ -139,28 +136,30 @@ let $ = class extends J {
139
136
  });
140
137
  }
141
138
  connectedCallback() {
142
- a(this, T).observe(a(this, z, D), {
139
+ a(this, _).observe(a(this, k, D), {
143
140
  childList: !0
144
- }), R(this, f, [...a(this, z, D).children].map((t) => {
141
+ }), R(this, f, [...a(this, k, D).children].map((t) => {
145
142
  if (t instanceof HTMLElement)
146
143
  return new G(this, t);
147
144
  }).filter((t) => !!t));
148
145
  }
149
146
  disconnectedCallback() {
150
- a(this, T).disconnect();
147
+ a(this, _).disconnect();
151
148
  }
152
149
  };
153
150
  W = /* @__PURE__ */ new WeakMap();
154
151
  P = /* @__PURE__ */ new WeakMap();
155
152
  f = /* @__PURE__ */ new WeakMap();
156
- T = /* @__PURE__ */ new WeakMap();
157
- z = /* @__PURE__ */ new WeakSet();
153
+ _ = /* @__PURE__ */ new WeakMap();
154
+ k = /* @__PURE__ */ new WeakSet();
158
155
  D = function() {
159
156
  return this.shadowRoot ? this.shadowRoot : this;
160
157
  };
161
158
  $ = Z([
162
159
  K("e-accordion")
163
160
  ], $);
161
+ addEventListener("click", (t) => {
162
+ });
164
163
  export {
165
164
  $ as AccordionElement
166
165
  };
@@ -1 +1 @@
1
- "use strict";var h=Object.defineProperty,c=Object.defineProperties;var l=Object.getOwnPropertyDescriptors;var r=Object.getOwnPropertySymbols;var g=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable;var i=(a,t,e)=>t in a?h(a,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[t]=e,n=(a,t)=>{for(var e in t||(t={}))g.call(t,e)&&i(a,e,t[e]);if(r)for(var e of r(t))A.call(t,e)&&i(a,e,t[e]);return a},s=(a,t)=>c(a,l(t));var m=(a,t,e)=>(i(a,typeof t!="symbol"?t+"":t,e),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("../Animated-DyZuTEQE.cjs"),x=require("../easings-DsS5-Kqc.cjs"),F=require("../Damped-AHRBHNEQ.cjs");class f extends d.Animated{constructor(e){super(s(n({},e),{min:(e==null?void 0:e.min)||0,max:(e==null?void 0:e.max)||1e3}));m(this,"easing");this.easing=(e==null?void 0:e.easing)||x.linear}start(){this.listenAnimationFrame()}pause(){this.unlistenAnimationFrame()}stop(){this.reset()}get max(){return super.max}update(){const e=(this.target-this.min.current)/(this.delta||1),u=this.easing(e);this.current=this.min.current+u*this.delta}handleAnimationFrame(e){this.shift(e.elapsed),(e.elapsed&&this.current===0||this.current===this.delta)&&this.unlistenAnimationFrame()}}exports.Animated=d.Animated;exports.Damped=F.Damped;exports.Tweened=f;
1
+ "use strict";var h=Object.defineProperty,c=Object.defineProperties;var l=Object.getOwnPropertyDescriptors;var r=Object.getOwnPropertySymbols;var g=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable;var i=(a,t,e)=>t in a?h(a,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[t]=e,n=(a,t)=>{for(var e in t||(t={}))g.call(t,e)&&i(a,e,t[e]);if(r)for(var e of r(t))A.call(t,e)&&i(a,e,t[e]);return a},s=(a,t)=>c(a,l(t));var m=(a,t,e)=>(i(a,typeof t!="symbol"?t+"":t,e),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("../Animated-Bf-gPIQM.cjs"),x=require("../easings-DsS5-Kqc.cjs"),F=require("../Damped-BwpMU9Gi.cjs");class f extends d.Animated{constructor(e){super(s(n({},e),{min:(e==null?void 0:e.min)||0,max:(e==null?void 0:e.max)||1e3}));m(this,"easing");this.easing=(e==null?void 0:e.easing)||x.linear}start(){this.listenAnimationFrame()}pause(){this.unlistenAnimationFrame()}stop(){this.reset()}get max(){return super.max}update(){const e=(this.target-this.min.current)/(this.delta||1),u=this.easing(e);this.current=this.min.current+u*this.delta}handleAnimationFrame(e){this.shift(e.elapsed),(e.elapsed&&this.current===0||this.current===this.delta)&&this.unlistenAnimationFrame()}}exports.Animated=d.Animated;exports.Damped=F.Damped;exports.Tweened=f;
@@ -11,9 +11,9 @@ var r = (a, t, e) => t in a ? d(a, t, { enumerable: !0, configurable: !0, writab
11
11
  return a;
12
12
  }, m = (a, t) => l(a, u(t));
13
13
  var n = (a, t, e) => (r(a, typeof t != "symbol" ? t + "" : t, e), e);
14
- import { A as g } from "../Animated-CJcYqJzq.js";
14
+ import { A as g } from "../Animated-Br_4OSth.js";
15
15
  import { l as A } from "../easings-BKi40vHz.js";
16
- import { D as b } from "../Damped-Csj-9_gH.js";
16
+ import { D as b } from "../Damped-urvryQLo.js";
17
17
  class w extends g {
18
18
  constructor(e) {
19
19
  super(m(s({}, e), {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const k=require("../custom-element/index.cjs"),R=require("../ElementConstructor-9f-12v7T.cjs"),M=require("../htmlTags-BSQys9wH.cjs"),W=require("../createStylesheet-uicRVW05.cjs"),y=require("../math-GDWEqu7y.cjs"),b=require("../notifier/index.cjs"),x=require("../element-resizer/index.cjs"),E=require("../ticker/index.cjs");var q=Object.defineProperty,S=Object.getOwnPropertyDescriptor,P=(i,e,s,r)=>{for(var h=r>1?void 0:r?S(e,s):e,f=i.length-1,g;f>=0;f--)(g=i[f])&&(h=(r?g(e,s,h):g(h))||h);return r&&h&&q(e,s,h),h},C=(i,e,s)=>{if(!e.has(i))throw TypeError("Cannot "+s)},t=(i,e,s)=>(C(i,e,"read from private field"),s?s.call(i):e.get(i)),n=(i,e,s)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,s)},c=(i,e,s,r)=>(C(i,e,"write to private field"),r?r.call(i,s):e.set(i,s),s),p,a,d,l,o,u,v,_,m,w;const O=W.createStylesheet({":host, canvas":{display:"block",width:"100%",height:"100%"}});exports.CanvasElement=class extends k.CustomElement{constructor(){super(),n(this,p,new b.Notifier),n(this,a,null),n(this,d,null),n(this,l,0),n(this,o,0),n(this,u,1),n(this,v,0),n(this,_,1),n(this,m,e=>{c(this,u,y.clamp(devicePixelRatio,1,2)),c(this,l,e.contentRect.width),c(this,o,e.contentRect.height),t(this,a).width=t(this,l)*this.pixelRatio,t(this,a).height=t(this,o)*this.pixelRatio,this.context.scale(this.pixelRatio,this.pixelRatio),this.renderEvent.notify(this.detail)}),n(this,w,e=>{c(this,v,e.timestamp),c(this,_,e.elapsed),t(this,p).notify(this.detail)}),this.openShadow(O),R.element(this,{shadowChildren:M.canvas({ref:e=>{c(this,a,e),c(this,d,e.getContext("2d"))}})})}get renderEvent(){return t(this,p)}get canvasElement(){return t(this,a)}get context(){return t(this,d)}get pixelRatio(){return t(this,u)}get width(){return t(this,l)}get height(){return t(this,o)}get detail(){return{width:t(this,l),height:t(this,o),element:this,canvasElement:t(this,a),pixelRatio:t(this,u),context:t(this,d),timestamp:t(this,v),elapsed:t(this,_)}}connectedCallback(){x.elementResizer.subscribe(this,t(this,m)),this.hasAttribute("static")||E.ticker.subscribe(t(this,w),{culling:this,maxFPS:this.hasAttribute("fps")?parseInt(this.getAttribute("fps")):void 0})}disconnectedCallback(){x.elementResizer.unsubscribe(t(this,m)),E.ticker.unsubscribe(t(this,w)),t(this,p).close(),t(this,a).remove()}};p=new WeakMap;a=new WeakMap;d=new WeakMap;l=new WeakMap;o=new WeakMap;u=new WeakMap;v=new WeakMap;_=new WeakMap;m=new WeakMap;w=new WeakMap;exports.CanvasElement=P([k.define("e-canvas")],exports.CanvasElement);
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const R=require("../custom-element/index.cjs");require("../Store-D0_rDIsE.cjs");const M=require("../math-GDWEqu7y.cjs"),x=require("../tags-pcim-Cws.cjs"),W=require("../createStylesheet-BsVHqHhr.cjs"),y=require("../notifier/index.cjs"),k=require("../element-resizer/index.cjs"),E=require("../ticker/index.cjs");var b=Object.defineProperty,q=Object.getOwnPropertyDescriptor,S=(i,e,s,r)=>{for(var h=r>1?void 0:r?q(e,s):e,f=i.length-1,g;f>=0;f--)(g=i[f])&&(h=(r?g(e,s,h):g(h))||h);return r&&h&&b(e,s,h),h},C=(i,e,s)=>{if(!e.has(i))throw TypeError("Cannot "+s)},t=(i,e,s)=>(C(i,e,"read from private field"),s?s.call(i):e.get(i)),n=(i,e,s)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,s)},c=(i,e,s,r)=>(C(i,e,"write to private field"),r?r.call(i,s):e.set(i,s),s),p,a,d,l,o,u,v,_,w,m;const P=W.createStylesheet({":host, canvas":{display:"block",width:"100%",height:"100%"}});exports.CanvasElement=class extends R.CustomElement{constructor(){super(),n(this,p,new y.Notifier),n(this,a,null),n(this,d,null),n(this,l,0),n(this,o,0),n(this,u,1),n(this,v,0),n(this,_,1),n(this,w,e=>{c(this,u,M.clamp(devicePixelRatio,1,2)),c(this,l,e.contentRect.width),c(this,o,e.contentRect.height),t(this,a).width=t(this,l)*this.pixelRatio,t(this,a).height=t(this,o)*this.pixelRatio,this.context.scale(this.pixelRatio,this.pixelRatio),this.renderEvent.notify(this.detail)}),n(this,m,e=>{c(this,v,e.timestamp),c(this,_,e.elapsed),t(this,p).notify(this.detail)}),this.openShadow(P),x.element(this,{children:x.canvas({ref:e=>{c(this,a,e),c(this,d,e.getContext("2d"))}})})}get renderEvent(){return t(this,p)}get canvasElement(){return t(this,a)}get context(){return t(this,d)}get pixelRatio(){return t(this,u)}get width(){return t(this,l)}get height(){return t(this,o)}get detail(){return{width:t(this,l),height:t(this,o),element:this,canvasElement:t(this,a),pixelRatio:t(this,u),context:t(this,d),timestamp:t(this,v),elapsed:t(this,_)}}connectedCallback(){k.elementResizer.subscribe(this,t(this,w)),this.hasAttribute("static")||E.ticker.subscribe(t(this,m),{culling:this,maxFPS:this.hasAttribute("fps")?parseInt(this.getAttribute("fps")):void 0})}disconnectedCallback(){k.elementResizer.unsubscribe(t(this,w)),E.ticker.unsubscribe(t(this,m)),t(this,p).close(),t(this,a).remove()}};p=new WeakMap;a=new WeakMap;d=new WeakMap;l=new WeakMap;o=new WeakMap;u=new WeakMap;v=new WeakMap;_=new WeakMap;w=new WeakMap;m=new WeakMap;exports.CanvasElement=S([R.define("e-canvas")],exports.CanvasElement);
@@ -1,14 +1,14 @@
1
- import { CustomElement as C, define as E } from "../custom-element/index.js";
2
- import { e as M } from "../ElementConstructor-CoKM2CTK.js";
3
- import { c as y } from "../htmlTags-BCNUG7oK.js";
4
- import { c as b } from "../createStylesheet-BON7aJYs.js";
5
- import { c as P } from "../math-BOBiC4TN.js";
1
+ import { CustomElement as E, define as M } from "../custom-element/index.js";
2
+ import "../Store-JOKrNVEr.js";
3
+ import { c as C } from "../math-BOBiC4TN.js";
4
+ import { e as y, q as b } from "../tags-8Y7LSTwg.js";
5
+ import { c as P } from "../createStylesheet-ITfBHk7A.js";
6
6
  import { Notifier as S } from "../notifier/index.js";
7
7
  import { elementResizer as x } from "../element-resizer/index.js";
8
8
  import { ticker as k } from "../ticker/index.js";
9
9
  var A = Object.defineProperty, O = Object.getOwnPropertyDescriptor, z = (t, i, s, r) => {
10
- for (var n = r > 1 ? void 0 : r ? O(i, s) : i, _ = t.length - 1, g; _ >= 0; _--)
11
- (g = t[_]) && (n = (r ? g(i, s, n) : g(n)) || n);
10
+ for (var n = r > 1 ? void 0 : r ? O(i, s) : i, w = t.length - 1, g; w >= 0; w--)
11
+ (g = t[w]) && (n = (r ? g(i, s, n) : g(n)) || n);
12
12
  return r && n && A(i, s, n), n;
13
13
  }, W = (t, i, s) => {
14
14
  if (!i.has(t))
@@ -17,22 +17,22 @@ var A = Object.defineProperty, O = Object.getOwnPropertyDescriptor, z = (t, i, s
17
17
  if (i.has(t))
18
18
  throw TypeError("Cannot add the same private member more than once");
19
19
  i instanceof WeakSet ? i.add(t) : i.set(t, s);
20
- }, o = (t, i, s, r) => (W(t, i, "write to private field"), r ? r.call(t, s) : i.set(t, s), s), l, h, d, p, c, m, v, f, u, w;
21
- const D = b({
20
+ }, o = (t, i, s, r) => (W(t, i, "write to private field"), r ? r.call(t, s) : i.set(t, s), s), l, h, d, p, c, m, v, f, u, _;
21
+ const D = P({
22
22
  ":host, canvas": {
23
23
  display: "block",
24
24
  width: "100%",
25
25
  height: "100%"
26
26
  }
27
27
  });
28
- let R = class extends C {
28
+ let R = class extends E {
29
29
  constructor() {
30
30
  super(), a(this, l, new S()), a(this, h, null), a(this, d, null), a(this, p, 0), a(this, c, 0), a(this, m, 1), a(this, v, 0), a(this, f, 1), a(this, u, (t) => {
31
- o(this, m, P(devicePixelRatio, 1, 2)), o(this, p, t.contentRect.width), o(this, c, t.contentRect.height), e(this, h).width = e(this, p) * this.pixelRatio, e(this, h).height = e(this, c) * this.pixelRatio, this.context.scale(this.pixelRatio, this.pixelRatio), this.renderEvent.notify(this.detail);
32
- }), a(this, w, (t) => {
31
+ o(this, m, C(devicePixelRatio, 1, 2)), o(this, p, t.contentRect.width), o(this, c, t.contentRect.height), e(this, h).width = e(this, p) * this.pixelRatio, e(this, h).height = e(this, c) * this.pixelRatio, this.context.scale(this.pixelRatio, this.pixelRatio), this.renderEvent.notify(this.detail);
32
+ }), a(this, _, (t) => {
33
33
  o(this, v, t.timestamp), o(this, f, t.elapsed), e(this, l).notify(this.detail);
34
- }), this.openShadow(D), M(this, {
35
- shadowChildren: y({
34
+ }), this.openShadow(D), y(this, {
35
+ children: b({
36
36
  ref: (t) => {
37
37
  o(this, h, t), o(this, d, t.getContext("2d"));
38
38
  }
@@ -70,13 +70,13 @@ let R = class extends C {
70
70
  };
71
71
  }
72
72
  connectedCallback() {
73
- x.subscribe(this, e(this, u)), this.hasAttribute("static") || k.subscribe(e(this, w), {
73
+ x.subscribe(this, e(this, u)), this.hasAttribute("static") || k.subscribe(e(this, _), {
74
74
  culling: this,
75
75
  maxFPS: this.hasAttribute("fps") ? parseInt(this.getAttribute("fps")) : void 0
76
76
  });
77
77
  }
78
78
  disconnectedCallback() {
79
- x.unsubscribe(e(this, u)), k.unsubscribe(e(this, w)), e(this, l).close(), e(this, h).remove();
79
+ x.unsubscribe(e(this, u)), k.unsubscribe(e(this, _)), e(this, l).close(), e(this, h).remove();
80
80
  }
81
81
  };
82
82
  l = /* @__PURE__ */ new WeakMap();
@@ -88,9 +88,9 @@ m = /* @__PURE__ */ new WeakMap();
88
88
  v = /* @__PURE__ */ new WeakMap();
89
89
  f = /* @__PURE__ */ new WeakMap();
90
90
  u = /* @__PURE__ */ new WeakMap();
91
- w = /* @__PURE__ */ new WeakMap();
91
+ _ = /* @__PURE__ */ new WeakMap();
92
92
  R = z([
93
- E("e-canvas")
93
+ M("e-canvas")
94
94
  ], R);
95
95
  export {
96
96
  R as CanvasElement
@@ -1 +1 @@
1
- "use strict";var C=(t,n,e)=>{if(!n.has(t))throw TypeError("Cannot "+e)};var s=(t,n,e)=>(C(t,n,"read from private field"),e?e.call(t):n.get(t)),o=(t,n,e)=>{if(n.has(t))throw TypeError("Cannot add the same private member more than once");n instanceof WeakSet?n.add(t):n.set(t,e)},r=(t,n,e,a)=>(C(t,n,"write to private field"),a?a.call(t,e):n.set(t,e),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("../browser-CpzFX2xg.cjs");var i,l,d;class b{constructor(){o(this,i,[]);o(this,l,void 0);o(this,d,()=>{var n,e;for(let a=0;a<s(this,i).length;a++){const c=s(this,i)[a];c.node.isConnected&&!c.isConnected?((n=c.connectCallback)==null||n.call(c),c.isConnected=!0):!c.node.isConnected&&c.isConnected&&((e=c.disconnectCallback)==null||e.call(c),c.isConnected=!1,c.unsubscribeAfterDisconnect&&this.unsubscribe(c)),c.timer+=100,!c.isConnected&&c.timer>c.maxWaitSec*1e3&&this.unsubscribe(c)}});f.isBrowser&&r(this,l,setInterval(s(this,d),100))}subscribe(n,e){return s(this,i).push({node:n,connectCallback:e.connectCallback,disconnectCallback:e.disconnectCallback,isConnected:!1,maxWaitSec:e.maxWaitSec||1/0,timer:0,unsubscribeAfterDisconnect:e.unsubscribeAfterDisconnect||!1}),()=>{this.unsubscribe(e)}}unsubscribe(n){s(this,i).forEach(e=>{e.connectCallback===n.connectCallback&&(e.connectCallback=void 0),e.disconnectCallback===n.disconnectCallback&&(e.disconnectCallback=void 0)}),r(this,i,s(this,i).filter(e=>e.connectCallback&&e.disconnectCallback))}destroy(){clearInterval(s(this,l)),r(this,i,[])}}i=new WeakMap,l=new WeakMap,d=new WeakMap;const u=new b;exports.Connector=b;exports.connector=u;
1
+ "use strict";var f=(i,t,e)=>{if(!t.has(i))throw TypeError("Cannot "+e)};var c=(i,t,e)=>(f(i,t,"read from private field"),e?e.call(i):t.get(i)),o=(i,t,e)=>{if(t.has(i))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(i):t.set(i,e)},d=(i,t,e,l)=>(f(i,t,"write to private field"),l?l.call(i,e):t.set(i,e),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var a,s,h,r;class b{constructor(){o(this,a,[]);o(this,s,void 0);o(this,h,100);o(this,r,()=>{var t,e,l;for(let C=c(this,a).length-1;C>=0;C--){const n=c(this,a)[c(this,a).length-1-C];n.node.isConnected&&!n.isConnected?((t=n.connectCallback)==null||t.call(n),n.isConnected=!0):!n.node.isConnected&&n.isConnected&&((e=n.disconnectCallback)==null||e.call(n),n.isConnected=!1,n.unsubscribeAfterDisconnect&&this.unsubscribe(n)),n.timer+=c(this,h),!n.isConnected&&n.timer>n.maxWaitSec*1e3&&((l=n.disconnectCallback)==null||l.call(n,!0),this.unsubscribe(n))}})}subscribe(t,e){const l=c(this,a).length;return c(this,a).push({node:t,connectCallback:e.connectCallback,disconnectCallback:e.disconnectCallback,isConnected:!1,maxWaitSec:typeof e.maxWaitSec=="number"?e.maxWaitSec===0?c(this,h)/1e3:e.maxWaitSec:1/0,timer:0,unsubscribeAfterDisconnect:e.unsubscribeAfterDisconnect||!1}),l||(d(this,s,setInterval(c(this,r),100)),c(this,r).call(this)),()=>{this.unsubscribe(e)}}unsubscribe(t){c(this,a).forEach(e=>{e.connectCallback===t.connectCallback&&(e.connectCallback=void 0),e.disconnectCallback===t.disconnectCallback&&(e.disconnectCallback=void 0)}),d(this,a,c(this,a).filter(e=>e.connectCallback||e.disconnectCallback)),c(this,a).length||clearInterval(c(this,s))}destroy(){clearInterval(c(this,s)),d(this,a,[])}}a=new WeakMap,s=new WeakMap,h=new WeakMap,r=new WeakMap;const k=new b;exports.Connector=b;exports.connector=k;
@@ -1,4 +1,4 @@
1
- export type ConnectorCallback = () => void;
1
+ export type ConnectorCallback = (expired?: boolean) => void;
2
2
  export interface ConnectorOptions {
3
3
  connectCallback?: ConnectorCallback;
4
4
  disconnectCallback?: ConnectorCallback;
@@ -7,7 +7,6 @@ export interface ConnectorOptions {
7
7
  }
8
8
  export declare class Connector {
9
9
  #private;
10
- constructor();
11
10
  subscribe(node: Node, options: ConnectorOptions): () => void;
12
11
  unsubscribe(options: ConnectorOptions): void;
13
12
  destroy(): void;
@@ -1,54 +1,54 @@
1
- var d = (t, c, e) => {
2
- if (!c.has(t))
1
+ var f = (i, t, e) => {
2
+ if (!t.has(i))
3
3
  throw TypeError("Cannot " + e);
4
4
  };
5
- var s = (t, c, e) => (d(t, c, "read from private field"), e ? e.call(t) : c.get(t)), o = (t, c, e) => {
6
- if (c.has(t))
5
+ var c = (i, t, e) => (f(i, t, "read from private field"), e ? e.call(i) : t.get(i)), o = (i, t, e) => {
6
+ if (t.has(i))
7
7
  throw TypeError("Cannot add the same private member more than once");
8
- c instanceof WeakSet ? c.add(t) : c.set(t, e);
9
- }, r = (t, c, e, a) => (d(t, c, "write to private field"), a ? a.call(t, e) : c.set(t, e), e);
10
- import { i as b } from "../browser-0zX67oeU.js";
11
- var i, l, C;
12
- class f {
8
+ t instanceof WeakSet ? t.add(i) : t.set(i, e);
9
+ }, d = (i, t, e, l) => (f(i, t, "write to private field"), l ? l.call(i, e) : t.set(i, e), e);
10
+ var a, s, h, C;
11
+ class b {
13
12
  constructor() {
14
- o(this, i, []);
15
- o(this, l, void 0);
13
+ o(this, a, []);
14
+ o(this, s, void 0);
15
+ o(this, h, 100);
16
16
  o(this, C, () => {
17
- var c, e;
18
- for (let a = 0; a < s(this, i).length; a++) {
19
- const n = s(this, i)[a];
20
- n.node.isConnected && !n.isConnected ? ((c = n.connectCallback) == null || c.call(n), n.isConnected = !0) : !n.node.isConnected && n.isConnected && ((e = n.disconnectCallback) == null || e.call(n), n.isConnected = !1, n.unsubscribeAfterDisconnect && this.unsubscribe(n)), n.timer += 100, !n.isConnected && n.timer > n.maxWaitSec * 1e3 && this.unsubscribe(n);
17
+ var t, e, l;
18
+ for (let r = c(this, a).length - 1; r >= 0; r--) {
19
+ const n = c(this, a)[c(this, a).length - 1 - r];
20
+ n.node.isConnected && !n.isConnected ? ((t = n.connectCallback) == null || t.call(n), n.isConnected = !0) : !n.node.isConnected && n.isConnected && ((e = n.disconnectCallback) == null || e.call(n), n.isConnected = !1, n.unsubscribeAfterDisconnect && this.unsubscribe(n)), n.timer += c(this, h), !n.isConnected && n.timer > n.maxWaitSec * 1e3 && ((l = n.disconnectCallback) == null || l.call(n, !0), this.unsubscribe(n));
21
21
  }
22
22
  });
23
- b && r(this, l, setInterval(s(this, C), 100));
24
23
  }
25
- subscribe(c, e) {
26
- return s(this, i).push({
27
- node: c,
24
+ subscribe(t, e) {
25
+ const l = c(this, a).length;
26
+ return c(this, a).push({
27
+ node: t,
28
28
  connectCallback: e.connectCallback,
29
29
  disconnectCallback: e.disconnectCallback,
30
30
  isConnected: !1,
31
- maxWaitSec: e.maxWaitSec || 1 / 0,
31
+ maxWaitSec: typeof e.maxWaitSec == "number" ? e.maxWaitSec === 0 ? c(this, h) / 1e3 : e.maxWaitSec : 1 / 0,
32
32
  timer: 0,
33
33
  unsubscribeAfterDisconnect: e.unsubscribeAfterDisconnect || !1
34
- }), () => {
34
+ }), l || (d(this, s, setInterval(c(this, C), 100)), c(this, C).call(this)), () => {
35
35
  this.unsubscribe(e);
36
36
  };
37
37
  }
38
- unsubscribe(c) {
39
- s(this, i).forEach((e) => {
40
- e.connectCallback === c.connectCallback && (e.connectCallback = void 0), e.disconnectCallback === c.disconnectCallback && (e.disconnectCallback = void 0);
41
- }), r(this, i, s(this, i).filter(
42
- (e) => e.connectCallback && e.disconnectCallback
43
- ));
38
+ unsubscribe(t) {
39
+ c(this, a).forEach((e) => {
40
+ e.connectCallback === t.connectCallback && (e.connectCallback = void 0), e.disconnectCallback === t.disconnectCallback && (e.disconnectCallback = void 0);
41
+ }), d(this, a, c(this, a).filter(
42
+ (e) => e.connectCallback || e.disconnectCallback
43
+ )), c(this, a).length || clearInterval(c(this, s));
44
44
  }
45
45
  destroy() {
46
- clearInterval(s(this, l)), r(this, i, []);
46
+ clearInterval(c(this, s)), d(this, a, []);
47
47
  }
48
48
  }
49
- i = new WeakMap(), l = new WeakMap(), C = new WeakMap();
50
- const u = new f();
49
+ a = new WeakMap(), s = new WeakMap(), h = new WeakMap(), C = new WeakMap();
50
+ const u = new b();
51
51
  export {
52
- f as Connector,
52
+ b as Connector,
53
53
  u as connector
54
54
  };
@@ -0,0 +1 @@
1
+ "use strict";const n=require("./tags-pcim-Cws.cjs");function r(t){const e=new CSSStyleSheet;return e.replaceSync(n.style(t).node.innerHTML),e}exports.createStylesheet=r;