aptechka 0.81.0 → 0.82.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 (121) hide show
  1. package/lib/{Animation-C4tLEBGM.js → Animation-DxtCzFP3.js} +2 -2
  2. package/lib/{Composed-BB1MtFiT.js → Composed-DtS09lSU.js} +2 -2
  3. package/lib/{Damped-DVG5nrYV.js → Damped-DMnIOXpC.js} +2 -2
  4. package/lib/{DerivedArray-D3scYQdp.js → DerivedArray-DG9iR0mf.js} +1 -1
  5. package/lib/{DragControls-Cm_88cLt.js → DragControls-DCC8iEOR.js} +4 -4
  6. package/lib/LocalLinks-Bua7BGRF.cjs +1 -0
  7. package/lib/LocalLinks-TQkTpAMx.js +62 -0
  8. package/lib/PageAnnouncerElement-C4k2kDJ5.cjs +1 -0
  9. package/lib/PageAnnouncerElement-sfh0_4vl.js +24 -0
  10. package/lib/PageScroll-C7QBpx0G.cjs +1 -0
  11. package/lib/PageScroll-cQ3B5-6N.js +62 -0
  12. package/lib/SourceElement-BQ7g2KWK.js +260 -0
  13. package/lib/SourceElement-TzgPNQOd.cjs +5 -0
  14. package/lib/{Store-BtVtCGLk.js → Store-CgQ3ReoB.js} +1 -1
  15. package/lib/{Tweened-C1lnK6n9.js → Tweened-lT68VACv.js} +2 -2
  16. package/lib/{Viewport-DbN_JWBM.js → Viewport-DGnJ31b4.js} +2 -2
  17. package/lib/accordion/index.js +1 -1
  18. package/lib/animation/index.js +3 -3
  19. package/lib/attribute/index.js +3 -3
  20. package/lib/billboard/index.js +2 -2
  21. package/lib/cache/Cache.d.ts +8 -0
  22. package/lib/cache/index.cjs +1 -0
  23. package/lib/cache/index.d.ts +1 -0
  24. package/lib/cache/index.js +37 -0
  25. package/lib/canvas/index.js +2 -2
  26. package/lib/controls/index.js +1 -1
  27. package/lib/css-property/index.js +3 -3
  28. package/lib/css-value-parser/index.js +1 -1
  29. package/lib/dev/index.js +2 -2
  30. package/lib/device/index.js +1 -1
  31. package/lib/{dom-fgxIeFxm.js → dom-BIeVMHfK.js} +2 -2
  32. package/lib/element-linked-store/index.js +2 -2
  33. package/lib/element-resizer/index.js +2 -2
  34. package/lib/en3/index.js +2 -2
  35. package/lib/history/History.d.ts +10 -0
  36. package/lib/history/index.cjs +1 -0
  37. package/lib/history/index.d.ts +1 -0
  38. package/lib/history/index.js +34 -0
  39. package/lib/iframe/index.cjs +1 -1
  40. package/lib/iframe/index.js +3 -3
  41. package/lib/image/index.cjs +1 -1
  42. package/lib/image/index.js +4 -4
  43. package/lib/{index-JqYHGoo6.js → index-LReFyN6i.js} +1 -1
  44. package/lib/intersector/index.js +2 -2
  45. package/lib/jsx/index.js +6 -6
  46. package/lib/ladder/index.js +2 -2
  47. package/lib/layout-box/index.js +2 -2
  48. package/lib/loading/index.js +1 -1
  49. package/lib/local-links/LocalLinks.d.ts +17 -0
  50. package/lib/local-links/index.cjs +1 -0
  51. package/lib/local-links/index.d.ts +1 -0
  52. package/lib/local-links/index.js +4 -0
  53. package/lib/masonry-layout/index.js +2 -2
  54. package/lib/media/index.js +2 -2
  55. package/lib/metadata-BcYZ5w3T.cjs +1 -0
  56. package/lib/metadata-jfowcCyz.js +12 -0
  57. package/lib/morph/index.cjs +1 -1
  58. package/lib/morph/index.js +141 -140
  59. package/lib/morph-B6sGhLCi.cjs +1 -0
  60. package/lib/morph-BQErz7qP.js +242 -0
  61. package/lib/need_redo_tweaker/index.cjs +1 -1
  62. package/lib/need_redo_tweaker/index.js +4 -4
  63. package/lib/{object-D6MVWB4l.js → object-CcMK4y_r.js} +12 -10
  64. package/lib/object-baN9pgbU.cjs +1 -0
  65. package/lib/page-announcer/PageAnnouncerElement.d.ts +10 -0
  66. package/lib/page-announcer/index.cjs +1 -0
  67. package/lib/page-announcer/index.d.ts +1 -0
  68. package/lib/page-announcer/index.js +4 -0
  69. package/lib/page-scroll/PageScroll.d.ts +23 -0
  70. package/lib/page-scroll/index.cjs +1 -0
  71. package/lib/page-scroll/index.d.ts +1 -0
  72. package/lib/page-scroll/index.js +4 -0
  73. package/lib/pixel-perfect/index.js +3 -3
  74. package/lib/pointer/index.js +4 -4
  75. package/lib/popover/index.cjs +1 -1
  76. package/lib/popover/index.js +3 -3
  77. package/lib/radio/index.js +1 -1
  78. package/lib/{render-CMQbWthg.js → render-CiA0mn5V.js} +3 -3
  79. package/lib/router/Route.d.ts +1 -2
  80. package/lib/router/Router.d.ts +18 -23
  81. package/lib/router/index.cjs +1 -1
  82. package/lib/router/index.d.ts +1 -1
  83. package/lib/router/index.js +183 -249
  84. package/lib/scroll/index.js +8 -8
  85. package/lib/scroll-entries/index.js +1 -1
  86. package/lib/{scroll-7JSxRKFK.js → scroll-jcbHDexr.js} +2 -2
  87. package/lib/scroll-kit/index.js +4 -4
  88. package/lib/sequence/index.cjs +1 -1
  89. package/lib/sequence/index.js +3 -3
  90. package/lib/size-element/index.js +1 -1
  91. package/lib/slicer/index.js +1 -1
  92. package/lib/source/SourceElement.d.ts +1 -1
  93. package/lib/source/index.cjs +1 -1
  94. package/lib/source/index.js +1 -1
  95. package/lib/spa/SPA.d.ts +29 -0
  96. package/lib/spa/index.cjs +1 -0
  97. package/lib/spa/index.d.ts +1 -0
  98. package/lib/spa/index.js +130 -0
  99. package/lib/store/index.js +3 -3
  100. package/lib/{stylesheet-JlRFfJIc.js → stylesheet-DbHOxtjw.js} +1 -1
  101. package/lib/ticker/index.js +2 -2
  102. package/lib/url-CPgw9bd5.cjs +1 -0
  103. package/lib/url-DAl-mgbC.js +97 -0
  104. package/lib/utils/index.cjs +1 -1
  105. package/lib/utils/index.d.ts +2 -0
  106. package/lib/utils/index.js +141 -120
  107. package/lib/utils/morph.d.ts +49 -0
  108. package/lib/utils/object.d.ts +1 -1
  109. package/lib/utils/url.d.ts +6 -0
  110. package/lib/video/index.cjs +1 -1
  111. package/lib/video/index.js +3 -3
  112. package/lib/window-resizer/index.js +1 -1
  113. package/lib/youtube/index.cjs +1 -1
  114. package/lib/youtube/index.js +3 -3
  115. package/package.json +49 -1
  116. package/lib/SourceElement-BBfaAgwe.cjs +0 -5
  117. package/lib/SourceElement-BiNNtaz9.js +0 -265
  118. package/lib/object-CCiXnER2.cjs +0 -1
  119. package/lib/router/Link.d.ts +0 -8
  120. package/lib/url-CoUSEREU.cjs +0 -1
  121. package/lib/url-IGj2LgDW.js +0 -66
@@ -3,12 +3,12 @@ var q = (r) => {
3
3
  };
4
4
  var S = (r, h, t) => h.has(r) || q("Cannot " + t);
5
5
  var e = (r, h, t) => (S(r, h, "read from private field"), t ? t.call(r) : h.get(r)), a = (r, h, t) => h.has(r) ? q("Cannot add the same private member more than once") : h instanceof WeakSet ? h.add(r) : h.set(r, t), i = (r, h, t, u) => (S(r, h, "write to private field"), u ? u.call(r, t) : h.set(r, t), t), z = (r, h, t) => (S(r, h, "access private method"), t);
6
- import { S as I } from "./Store-BtVtCGLk.js";
6
+ import { S as I } from "./Store-CgQ3ReoB.js";
7
7
  import { c as R } from "./math-BOBiC4TN.js";
8
8
  import { p as P } from "./number-CumqY64S.js";
9
9
  import { n as A } from "./polyfills-DJrTJQky.js";
10
10
  import "construct-style-sheets-polyfill";
11
- import "./index-JqYHGoo6.js";
11
+ import "./index-LReFyN6i.js";
12
12
  import { ticker as y } from "./ticker/index.js";
13
13
  import { TICK_ORDER as N } from "./order/index.js";
14
14
  var g, d, b, l, F, s, n, c, m, f, M, O, x;
@@ -3,10 +3,10 @@ var m = (e) => {
3
3
  };
4
4
  var p = (e, r, s) => r.has(e) || m("Cannot " + s);
5
5
  var t = (e, r, s) => (p(e, r, "read from private field"), s ? s.call(e) : r.get(e)), h = (e, r, s) => r.has(e) ? m("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(e) : r.set(e, s), o = (e, r, s, c) => (p(e, r, "write to private field"), c ? c.call(e, s) : r.set(e, s), s);
6
- import { S as d } from "./Store-BtVtCGLk.js";
6
+ import { S as d } from "./Store-CgQ3ReoB.js";
7
7
  import { d as g } from "./function-C10DGppn.js";
8
8
  import "construct-style-sheets-polyfill";
9
- import "./index-JqYHGoo6.js";
9
+ import "./index-LReFyN6i.js";
10
10
  var a;
11
11
  class R extends d {
12
12
  constructor(s, c, u) {
@@ -19,8 +19,8 @@ import { d as D } from "./math-BOBiC4TN.js";
19
19
  import { p as F } from "./number-CumqY64S.js";
20
20
  import { n as u } from "./polyfills-DJrTJQky.js";
21
21
  import "construct-style-sheets-polyfill";
22
- import "./index-JqYHGoo6.js";
23
- import { A as q } from "./Animation-C4tLEBGM.js";
22
+ import "./index-LReFyN6i.js";
23
+ import { A as q } from "./Animation-DxtCzFP3.js";
24
24
  var i, h;
25
25
  class G extends q {
26
26
  constructor(t, r) {
@@ -3,7 +3,7 @@ var p = (e) => {
3
3
  };
4
4
  var S = (e, r, s) => r.has(e) || p("Cannot " + s);
5
5
  var f = (e, r, s) => (S(e, r, "read from private field"), s ? s.call(e) : r.get(e)), y = (e, r, s) => r.has(e) ? p("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(e) : r.set(e, s), d = (e, r, s, c) => (S(e, r, "write to private field"), c ? c.call(e, s) : r.set(e, s), s);
6
- import { S as m } from "./Store-BtVtCGLk.js";
6
+ import { S as m } from "./Store-CgQ3ReoB.js";
7
7
  var b, v;
8
8
  class j extends m {
9
9
  constructor(s, c, t) {
@@ -3,13 +3,13 @@ var _ = (n) => {
3
3
  };
4
4
  var G = (n, r, e) => r.has(n) || _("Cannot " + e);
5
5
  var t = (n, r, e) => (G(n, r, "read from private field"), e ? e.call(n) : r.get(n)), s = (n, r, e) => r.has(n) ? _("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(n) : r.set(n, e), i = (n, r, e, h) => (G(n, r, "write to private field"), h ? h.call(n, e) : r.set(n, e), e), A = (n, r, e) => (G(n, r, "access private method"), e);
6
- import { i as b } from "./index-JqYHGoo6.js";
7
- import { g as Z } from "./dom-fgxIeFxm.js";
6
+ import { i as b } from "./index-LReFyN6i.js";
7
+ import { g as Z } from "./dom-BIeVMHfK.js";
8
8
  import "construct-style-sheets-polyfill";
9
9
  import { ticker as D } from "./ticker/index.js";
10
- import "./Store-BtVtCGLk.js";
10
+ import "./Store-CgQ3ReoB.js";
11
11
  import { a as ee } from "./easings-BEmRlrDd.js";
12
- import { T as te } from "./Tweened-C1lnK6n9.js";
12
+ import { T as te } from "./Tweened-lT68VACv.js";
13
13
  import { s as ie } from "./gestures-CcXV6fCp.js";
14
14
  import { p as se } from "./number-CumqY64S.js";
15
15
  import { TICK_ORDER as he } from "./order/index.js";
@@ -0,0 +1 @@
1
+ "use strict";var f=i=>{throw TypeError(i)};var h=(i,e,t)=>e.has(i)||f("Cannot "+t);var n=(i,e,t)=>(h(i,e,"read from private field"),t?t.call(i):e.get(i)),u=(i,e,t)=>e.has(i)?f("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),m=(i,e,t,r)=>(h(i,e,"write to private field"),r?r.call(i,t):e.set(i,t),t),d=(i,e,t)=>(h(i,e,"access private method"),t);const v=require("./morph-B6sGhLCi.cjs");require("construct-style-sheets-polyfill");require("./index-CKTweR3M.cjs");const L=require("./url-CPgw9bd5.cjs");var s,o,E,k,a;class S{constructor(e){u(this,o);u(this,s);u(this,a,e=>{var c,l,p;e.preventDefault();const{url:t,options:r={}}=(c=d(this,o,k).call(this,e))!=null?c:{};t&&(e.preventDefault(),(p=(l=n(this,s)).onClick)==null||p.call(l,t,r))});m(this,s,e),window.addEventListener("click",n(this,a))}destroy(){window.removeEventListener("click",n(this,a))}update(){document.querySelectorAll("a").forEach(e=>{L.normalizeURL(e.getAttribute("href"),{base:n(this,s).base,trailingSlash:n(this,s).trailingSlash}).pathname===location.pathname?e.classList.add("current"):e.classList.remove("current")})}}s=new WeakMap,o=new WeakSet,E=function(e){return(e==null?void 0:e.nodeType)===v.NODE_TYPE_ELEMENT},k=function(e){const t=e.composedPath()[0];if(!d(this,o,E).call(this,t))return;const r=t.closest("a");if(!r||typeof n(this,s).includeAnchor=="function"&&!n(this,s).includeAnchor(r)||r.closest("[data-router-ignore]"))return;const{href:c}=r;if(!L.isLocalUrl(c))return;const l={keepScrollPosition:"keepScrollPosition"in r.dataset,cache:"cache"in r.dataset,revalidate:"revalidate"in r.dataset};return{url:L.normalizeURL(new URL(c),{base:n(this,s).base,trailingSlash:n(this,s).trailingSlash}),options:l}},a=new WeakMap;exports.LocalLinks=S;
@@ -0,0 +1,62 @@
1
+ var f = (i) => {
2
+ throw TypeError(i);
3
+ };
4
+ var u = (i, t, e) => t.has(i) || f("Cannot " + e);
5
+ var n = (i, t, e) => (u(i, t, "read from private field"), e ? e.call(i) : t.get(i)), h = (i, t, e) => t.has(i) ? f("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(i) : t.set(i, e), m = (i, t, e, s) => (u(i, t, "write to private field"), s ? s.call(i, e) : t.set(i, e), e), d = (i, t, e) => (u(i, t, "access private method"), e);
6
+ import { N as v } from "./morph-BQErz7qP.js";
7
+ import "construct-style-sheets-polyfill";
8
+ import "./index-LReFyN6i.js";
9
+ import { n as L, i as S } from "./url-DAl-mgbC.js";
10
+ var r, o, E, k, c;
11
+ class P {
12
+ constructor(t) {
13
+ h(this, o);
14
+ h(this, r);
15
+ h(this, c, (t) => {
16
+ var a, l, p;
17
+ t.preventDefault();
18
+ const { url: e, options: s = {} } = (a = d(this, o, k).call(this, t)) != null ? a : {};
19
+ e && (t.preventDefault(), (p = (l = n(this, r)).onClick) == null || p.call(l, e, s));
20
+ });
21
+ m(this, r, t), window.addEventListener("click", n(this, c));
22
+ }
23
+ destroy() {
24
+ window.removeEventListener("click", n(this, c));
25
+ }
26
+ update() {
27
+ document.querySelectorAll("a").forEach((t) => {
28
+ L(t.getAttribute("href"), {
29
+ base: n(this, r).base,
30
+ trailingSlash: n(this, r).trailingSlash
31
+ }).pathname === location.pathname ? t.classList.add("current") : t.classList.remove("current");
32
+ });
33
+ }
34
+ }
35
+ r = new WeakMap(), o = new WeakSet(), E = function(t) {
36
+ return (t == null ? void 0 : t.nodeType) === v;
37
+ }, k = function(t) {
38
+ const e = t.composedPath()[0];
39
+ if (!d(this, o, E).call(this, e))
40
+ return;
41
+ const s = e.closest("a");
42
+ if (!s || typeof n(this, r).includeAnchor == "function" && !n(this, r).includeAnchor(s) || s.closest("[data-router-ignore]"))
43
+ return;
44
+ const { href: a } = s;
45
+ if (!S(a))
46
+ return;
47
+ const l = {
48
+ keepScrollPosition: "keepScrollPosition" in s.dataset,
49
+ cache: "cache" in s.dataset,
50
+ revalidate: "revalidate" in s.dataset
51
+ };
52
+ return {
53
+ url: L(new URL(a), {
54
+ base: n(this, r).base,
55
+ trailingSlash: n(this, r).trailingSlash
56
+ }),
57
+ options: l
58
+ };
59
+ }, c = new WeakMap();
60
+ export {
61
+ P as L
62
+ };
@@ -0,0 +1 @@
1
+ "use strict";const i=require("./index-CKTweR3M.cjs");require("construct-style-sheets-polyfill");class s extends HTMLElement{create(e,t){this.textContent!==t&&(this.textContent=t),this.dataset.persist="",e.body.appendChild(this)}done(){var e;(e=document.activeElement)!=null&&e.closest("[data-persist]")||document.body.focus(),delete this.dataset.persist}connectedCallback(){const e={"aria-live":"assertive","aria-atomic":"true",style:"position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"};for(const[t,n]of Object.entries(e))this.setAttribute(t,n)}}i.isBrowser&&!customElements.get("e-page-announcer")&&customElements.define("e-page-announcer",s);exports.PageAnnouncerElement=s;
@@ -0,0 +1,24 @@
1
+ import { i } from "./index-LReFyN6i.js";
2
+ import "construct-style-sheets-polyfill";
3
+ class n extends HTMLElement {
4
+ create(e, t) {
5
+ this.textContent !== t && (this.textContent = t), this.dataset.persist = "", e.body.appendChild(this);
6
+ }
7
+ done() {
8
+ var e;
9
+ (e = document.activeElement) != null && e.closest("[data-persist]") || document.body.focus(), delete this.dataset.persist;
10
+ }
11
+ connectedCallback() {
12
+ const e = {
13
+ "aria-live": "assertive",
14
+ "aria-atomic": "true",
15
+ style: "position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"
16
+ };
17
+ for (const [t, s] of Object.entries(e))
18
+ this.setAttribute(t, s);
19
+ }
20
+ }
21
+ i && !customElements.get("e-page-announcer") && customElements.define("e-page-announcer", n);
22
+ export {
23
+ n as P
24
+ };
@@ -0,0 +1 @@
1
+ "use strict";var g=l=>{throw TypeError(l)};var w=(l,e,t)=>e.has(l)||g("Cannot "+t);var s=(l,e,t)=>(w(l,e,"read from private field"),t?t.call(l):e.get(l)),r=(l,e,t)=>e.has(l)?g("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(l):e.set(l,t),c=(l,e,t,u)=>(w(l,e,"write to private field"),u?u.call(l,t):e.set(l,t),t);const v=require("./events-KVanG9sR.cjs");require("construct-style-sheets-polyfill");require("./index-CKTweR3M.cjs");var o,n,i,a,m,d;class E{constructor(e){r(this,o,null);r(this,n,0);r(this,i,0);r(this,a,!1);r(this,m);r(this,d,()=>{const{left:e,top:t}=this.value,u=t-s(this,i),h=e-s(this,n);c(this,i,t),c(this,n,e),document.documentElement.classList.toggle("scroll-y",t>0),document.documentElement.classList.toggle("scroll-x",e>0),document.documentElement.classList.toggle("scroll-y-forward",u>0),document.documentElement.classList.toggle("scroll-y-backward",u<0),document.documentElement.classList.toggle("scroll-x-forward",h>0),document.documentElement.classList.toggle("scroll-x-backward",h<0),v.dispatchEvent(document,"pageScrollEvent",{detail:this.value})});c(this,m,e)}get element(){return s(this,o)}get x(){return s(this,n)}get y(){return s(this,i)}get value(){let e=0,t=0;return s(this,a)?(e=window.scrollY,t=window.scrollX):(e=s(this,o).scrollTop,t=s(this,o).scrollLeft),{top:e,left:t}}destroy(){var e;(e=s(this,o))==null||e.removeEventListener("scroll",s(this,d)),document.documentElement.classList.remove("scroll-y"),document.documentElement.classList.remove("scroll-x"),document.documentElement.classList.remove("scroll-y-forward"),document.documentElement.classList.remove("scroll-y-backward"),document.documentElement.classList.remove("scroll-x-forward"),document.documentElement.classList.remove("scroll-x-backward")}update(){var e,t;(e=s(this,o))==null||e.removeEventListener("scroll",s(this,d)),c(this,i,0),c(this,n,0),c(this,o,s(this,m)&&document.querySelector(s(this,m))||window),c(this,a,s(this,o)===window),(t=s(this,o))==null||t.addEventListener("scroll",s(this,d)),s(this,d).call(this)}}o=new WeakMap,n=new WeakMap,i=new WeakMap,a=new WeakMap,m=new WeakMap,d=new WeakMap;exports.PageScroll=E;
@@ -0,0 +1,62 @@
1
+ var w = (l) => {
2
+ throw TypeError(l);
3
+ };
4
+ var g = (l, t, e) => t.has(l) || w("Cannot " + e);
5
+ var s = (l, t, e) => (g(l, t, "read from private field"), e ? e.call(l) : t.get(l)), r = (l, t, e) => t.has(l) ? w("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(l) : t.set(l, e), c = (l, t, e, a) => (g(l, t, "write to private field"), a ? a.call(l, e) : t.set(l, e), e);
6
+ import { d as E } from "./events-CsVF98U6.js";
7
+ import "construct-style-sheets-polyfill";
8
+ import "./index-LReFyN6i.js";
9
+ var o, n, i, u, d, m;
10
+ class y {
11
+ constructor(t) {
12
+ r(this, o, null);
13
+ r(this, n, 0);
14
+ r(this, i, 0);
15
+ r(this, u, !1);
16
+ r(this, d);
17
+ r(this, m, () => {
18
+ const { left: t, top: e } = this.value, a = e - s(this, i), h = t - s(this, n);
19
+ c(this, i, e), c(this, n, t), document.documentElement.classList.toggle("scroll-y", e > 0), document.documentElement.classList.toggle("scroll-x", t > 0), document.documentElement.classList.toggle(
20
+ "scroll-y-forward",
21
+ a > 0
22
+ ), document.documentElement.classList.toggle(
23
+ "scroll-y-backward",
24
+ a < 0
25
+ ), document.documentElement.classList.toggle(
26
+ "scroll-x-forward",
27
+ h > 0
28
+ ), document.documentElement.classList.toggle(
29
+ "scroll-x-backward",
30
+ h < 0
31
+ ), E(document, "pageScrollEvent", {
32
+ detail: this.value
33
+ });
34
+ });
35
+ c(this, d, t);
36
+ }
37
+ get element() {
38
+ return s(this, o);
39
+ }
40
+ get x() {
41
+ return s(this, n);
42
+ }
43
+ get y() {
44
+ return s(this, i);
45
+ }
46
+ get value() {
47
+ let t = 0, e = 0;
48
+ return s(this, u) ? (t = window.scrollY, e = window.scrollX) : (t = s(this, o).scrollTop, e = s(this, o).scrollLeft), { top: t, left: e };
49
+ }
50
+ destroy() {
51
+ var t;
52
+ (t = s(this, o)) == null || t.removeEventListener("scroll", s(this, m)), document.documentElement.classList.remove("scroll-y"), document.documentElement.classList.remove("scroll-x"), document.documentElement.classList.remove("scroll-y-forward"), document.documentElement.classList.remove("scroll-y-backward"), document.documentElement.classList.remove("scroll-x-forward"), document.documentElement.classList.remove("scroll-x-backward");
53
+ }
54
+ update() {
55
+ var t, e;
56
+ (t = s(this, o)) == null || t.removeEventListener("scroll", s(this, m)), c(this, i, 0), c(this, n, 0), c(this, o, s(this, d) && document.querySelector(s(this, d)) || window), c(this, u, s(this, o) === window), (e = s(this, o)) == null || e.addEventListener("scroll", s(this, m)), s(this, m).call(this);
57
+ }
58
+ }
59
+ o = new WeakMap(), n = new WeakMap(), i = new WeakMap(), u = new WeakMap(), d = new WeakMap(), m = new WeakMap();
60
+ export {
61
+ y as P
62
+ };
@@ -0,0 +1,260 @@
1
+ var X = (u) => {
2
+ throw TypeError(u);
3
+ };
4
+ var Z = (u, h, e) => h.has(u) || X("Cannot " + e);
5
+ var t = (u, h, e) => (Z(u, h, "read from private field"), e ? e.call(u) : h.get(u)), i = (u, h, e) => h.has(u) ? X("Cannot add the same private member more than once") : h instanceof WeakSet ? h.add(u) : h.set(u, e), s = (u, h, e, l) => (Z(u, h, "write to private field"), l ? l.call(u, e) : h.set(u, e), e), j = (u, h, e) => (Z(u, h, "access private method"), e);
6
+ import { ElementLinkedStore as st } from "./element-linked-store/index.js";
7
+ import { loading as J } from "./loading/index.js";
8
+ import { i as it } from "./index-LReFyN6i.js";
9
+ import { d as q } from "./events-CsVF98U6.js";
10
+ import { k as Y } from "./string-BlMQbe8b.js";
11
+ import { f as rt } from "./metadata-jfowcCyz.js";
12
+ import "construct-style-sheets-polyfill";
13
+ import { RESIZE_ORDER as at } from "./order/index.js";
14
+ import { windowResizer as tt } from "./window-resizer/index.js";
15
+ import { S as nt } from "./Store-CgQ3ReoB.js";
16
+ var V, S, z, x, m, p, A;
17
+ class ht {
18
+ constructor(h) {
19
+ i(this, V);
20
+ i(this, S);
21
+ i(this, z);
22
+ i(this, x);
23
+ i(this, m);
24
+ i(this, p);
25
+ i(this, A);
26
+ s(this, V, h);
27
+ let e = h.split(".");
28
+ const l = /\b\d{1,2}x\b/g, a = e.find((y) => y.match(l) && parseInt(y));
29
+ s(this, z, a ? parseInt(a) : 1), a && (e = e.slice(0, -1)), s(this, S, e.length > 1 ? e.slice(0, -1).join(".") : e.join("."));
30
+ const c = /\d+max/g, d = /\d+min/g, F = /\d+mar/g, N = /\d+mir/g, W = e.find((y) => y.match(c)), o = e.find((y) => y.match(d)), L = e.find((y) => y.match(F)), Q = e.find((y) => y.match(N));
31
+ L ? (s(this, m, parseInt(L)), s(this, p, "max"), s(this, x, `(max-aspect-ratio: ${t(this, m)})`)) : Q ? (s(this, m, parseInt(Q)), s(this, p, "max"), s(this, x, `(min-aspect-ratio: ${t(this, m)})`)) : W ? (s(this, m, parseInt(W)), s(this, p, "max"), s(this, x, `(max-width: ${t(this, m)}px)`)) : o ? (s(this, m, parseInt(o)), s(this, x, `(min-width: ${t(this, m)}px)`), s(this, p, "min")) : (s(this, m, 0), s(this, x, `(min-width: ${t(this, m)}px)`), s(this, p, "min")), s(this, S, t(this, S).replace(
32
+ `.${t(this, m)}${t(this, p)}`,
33
+ ""
34
+ )), s(this, A, e[e.length - 1] === t(this, S) ? "" : "." + e[e.length - 1]), s(this, A, t(this, A).replace(
35
+ `.${t(this, m)}${t(this, p)}`,
36
+ ""
37
+ ));
38
+ }
39
+ get url() {
40
+ return t(this, V);
41
+ }
42
+ get name() {
43
+ return t(this, S);
44
+ }
45
+ get density() {
46
+ return t(this, z);
47
+ }
48
+ get query() {
49
+ return t(this, x);
50
+ }
51
+ get extension() {
52
+ return t(this, A);
53
+ }
54
+ get queryType() {
55
+ return t(this, p);
56
+ }
57
+ get queryValue() {
58
+ return t(this, m);
59
+ }
60
+ }
61
+ V = new WeakMap(), S = new WeakMap(), z = new WeakMap(), x = new WeakMap(), m = new WeakMap(), p = new WeakMap(), A = new WeakMap();
62
+ var v;
63
+ class et {
64
+ constructor(h, e) {
65
+ i(this, v);
66
+ s(this, v, /* @__PURE__ */ new Map());
67
+ const l = (e == null ? void 0 : e.mediaBuckets) !== !1, a = typeof h == "string" ? l ? h.trim().split(",").map((o) => o.trim()).filter((o) => !!o) : [h] : h, c = [];
68
+ a.forEach((o) => {
69
+ const L = new ht(o);
70
+ c.push([L.query, L]);
71
+ });
72
+ const d = c.filter((o) => o[1].queryType.includes("max")).sort((o, L) => L[1].queryValue - o[1].queryValue), F = c.filter((o) => o[1].queryType.includes("min") && o[1].queryValue !== 0).sort((o, L) => o[1].queryValue - L[1].queryValue), N = c.filter((o) => o[0] === "(min-width: 0px)");
73
+ (N ? [...N, ...d, ...F] : [...d, ...F]).forEach((o) => {
74
+ t(this, v).has(o[0]) || t(this, v).set(o[0], []), t(this, v).get(o[0]).push(o[1]);
75
+ });
76
+ }
77
+ get mediaBuckets() {
78
+ return t(this, v);
79
+ }
80
+ }
81
+ v = new WeakMap();
82
+ var M, k;
83
+ class ot extends nt {
84
+ constructor(e) {
85
+ super(void 0);
86
+ i(this, M);
87
+ i(this, k, () => {
88
+ let e;
89
+ t(this, M).mediaBuckets.forEach((c, d) => {
90
+ matchMedia(d).matches && (e = c);
91
+ });
92
+ let l, a = 0;
93
+ e == null || e.forEach((c) => {
94
+ c.density > a && c.density <= Math.max(devicePixelRatio, 1) && (a = c.density, l = c);
95
+ }), e != null && e.length && !l && (l = e[0]), this.current = l;
96
+ });
97
+ s(this, M, new et(e.srcset, e.sourceSetOptions));
98
+ }
99
+ updateSource(e) {
100
+ s(this, M, new et(e.srcset, e.sourceSetOptions)), t(this, k).call(this);
101
+ }
102
+ close() {
103
+ super.close(), this.disconnect();
104
+ }
105
+ connect() {
106
+ tt.subscribe(t(this, k), at.SOURCE_MANAGER), t(this, k).call(this);
107
+ }
108
+ disconnect() {
109
+ tt.unsubscribe(t(this, k));
110
+ }
111
+ }
112
+ M = new WeakMap(), k = new WeakMap();
113
+ let lt = 0;
114
+ var f, r, O, E, b, g, B, I, n, R, $, w, P, T, _, G, D, K, H, U, C;
115
+ class bt extends HTMLElement {
116
+ constructor(e) {
117
+ super();
118
+ i(this, T);
119
+ i(this, f, null);
120
+ i(this, r, null);
121
+ i(this, O, this);
122
+ i(this, E, !1);
123
+ i(this, b, !1);
124
+ i(this, g, !1);
125
+ i(this, B, "");
126
+ i(this, I, "");
127
+ i(this, n, new st(this, {
128
+ loading: !1,
129
+ loaded: !1,
130
+ error: !1,
131
+ clear: !1,
132
+ playing: !1,
133
+ metadata: !1
134
+ }));
135
+ i(this, R, null);
136
+ i(this, $);
137
+ i(this, w, null);
138
+ i(this, P);
139
+ i(this, G, (e) => {
140
+ const l = e[0];
141
+ t(this, g) && (!t(this, b) || this.hasAttribute("reload-source")) && l.isIntersecting && this.triggerLazyLoad(), l.isIntersecting ? q(this, "sourceCapture", { custom: !0 }) : (this.hasAttribute("reload-source") && (j(this, T, _).call(this, void 0), s(this, b, !1)), q(this, "sourceRelease", { custom: !0 }));
142
+ });
143
+ i(this, D, () => {
144
+ t(this, n).set("loaded", !0), t(this, n).set("error", !1), t(this, n).set("loading", !1), !t(this, g) && !t(this, E) && J.complete(t(this, I)), q(this, "sourceLoaded", { custom: !0 });
145
+ const e = getComputedStyle(this).getPropertyValue("--clear-duration");
146
+ e ? s(this, $, setTimeout(
147
+ () => {
148
+ t(this, n).set("clear", !0);
149
+ },
150
+ parseFloat(e) * 1e3
151
+ )) : t(this, n).set("clear", !0), s(this, E, !0);
152
+ });
153
+ i(this, K, (e) => {
154
+ t(this, n).set("loaded", !1), t(this, n).set("error", !0), t(this, n).set("loading", !1), !t(this, g) && !t(this, E) && J.error(t(this, I)), q(this, "sourceError", { custom: !0 }), s(this, E, !0);
155
+ });
156
+ i(this, H, () => {
157
+ t(this, n).set("playing", !0), q(this, "sourcePlay", { custom: !0 });
158
+ });
159
+ i(this, U, () => {
160
+ t(this, n).set("playing", !1), q(this, "sourcePause", { custom: !0 });
161
+ });
162
+ i(this, C, () => {
163
+ const e = t(this, r);
164
+ (e.tagName === "VIDEO" || e.tagName === "AUDIO") && e.readyState >= 1 && (t(this, n).set("metadata", !0), q(this, "sourceMetadataLoaded", { custom: !0 }), this.querySelectorAll("[data-source-duration]").forEach((l) => {
165
+ l.textContent = rt(e.duration);
166
+ }));
167
+ });
168
+ s(this, P, e == null ? void 0 : e.sourceSetOptions), it && window.IntersectionObserver && s(this, R, new IntersectionObserver(
169
+ t(this, G)
170
+ )), t(this, n).subscribe((l) => {
171
+ var c;
172
+ const a = (c = this.getAttribute("data-global-play-class")) == null ? void 0 : c.split(
173
+ ","
174
+ );
175
+ a != null && a.length && (l.current.playing ? a.forEach((d) => {
176
+ document.documentElement.classList.add(d.trim());
177
+ }) : a.forEach((d) => {
178
+ document.documentElement.classList.remove(d.trim());
179
+ }));
180
+ });
181
+ }
182
+ get consumerElement() {
183
+ return t(this, r);
184
+ }
185
+ get consumerHolderElement() {
186
+ return t(this, O);
187
+ }
188
+ get sourceManager() {
189
+ return t(this, f);
190
+ }
191
+ get status() {
192
+ return t(this, n);
193
+ }
194
+ get isLazy() {
195
+ return t(this, g);
196
+ }
197
+ get currentURL() {
198
+ return t(this, w);
199
+ }
200
+ get isFirstLoadHappened() {
201
+ return t(this, E);
202
+ }
203
+ triggerLazyLoad() {
204
+ !t(this, b) && t(this, f).current && t(this, f).current !== t(this, f).previous && (s(this, b, !0), j(this, T, _).call(this, t(this, f).current));
205
+ }
206
+ connectedCallback() {
207
+ s(this, B, `source-consumer-${++lt}`);
208
+ const e = this.getAttribute("srcset") || "", l = this.hasAttribute("notify") ? this.closest(this.getAttribute("notify")) : null;
209
+ l && t(this, n).addElement(l), s(this, O, this.querySelector("[data-consumer-holder]") || this), this.querySelectorAll(".source-consumer").forEach((a) => a == null ? void 0 : a.remove()), s(this, r, this.createConsumer()), t(this, r).style.cssText = `
210
+ display: block;
211
+ width: 100%;
212
+ height: 100%;
213
+ `, t(this, r).classList.add("source-consumer"), t(this, r).addEventListener("play", t(this, H)), t(this, r).addEventListener("pause", t(this, U)), t(this, r).addEventListener(
214
+ "loadedmetadata",
215
+ t(this, C)
216
+ ), t(this, C).call(this), Array.from(this.attributes).forEach((a) => {
217
+ if (a.name !== "srcset") {
218
+ const c = a.nodeValue || "", d = Y(a.name);
219
+ d in t(this, r) && (t(this, r)[d] = c || !0);
220
+ }
221
+ });
222
+ for (const a in this.dataset) {
223
+ const c = this.dataset[a], d = Y(a);
224
+ d in t(this, r) && (t(this, r)[d] = c ? c === "false" ? !1 : c : !0);
225
+ }
226
+ t(this, O).appendChild(t(this, r)), s(this, f, new ot({
227
+ srcset: e,
228
+ sourceSetOptions: t(this, P)
229
+ })), s(this, g, this.hasAttribute("lazy")), t(this, f).subscribe((a) => {
230
+ (!t(this, g) || t(this, g) && t(this, b)) && j(this, T, _).call(this, a.current);
231
+ }), t(this, f).connect(), t(this, R).observe(this);
232
+ }
233
+ disconnectedCallback() {
234
+ var e;
235
+ clearTimeout(t(this, $)), t(this, R).disconnect(), (e = t(this, f)) == null || e.close(), t(this, r) && (this.consumeSource(null), t(this, r).removeEventListener("play", t(this, H)), t(this, r).removeEventListener("pause", t(this, U)), t(this, r).removeEventListener(
236
+ "loadedmetadata",
237
+ t(this, C)
238
+ ), t(this, r).onloadeddata = null, t(this, r).onload = null, t(this, r).onerror = null, t(this, r).onerror = null, t(this, r).remove()), s(this, E, !1), s(this, b, !1), t(this, n).reset();
239
+ }
240
+ }
241
+ f = new WeakMap(), r = new WeakMap(), O = new WeakMap(), E = new WeakMap(), b = new WeakMap(), g = new WeakMap(), B = new WeakMap(), I = new WeakMap(), n = new WeakMap(), R = new WeakMap(), $ = new WeakMap(), w = new WeakMap(), P = new WeakMap(), T = new WeakSet(), _ = function(e) {
242
+ if (clearTimeout(t(this, $)), t(this, r).onloadeddata = null, t(this, r).onload = null, t(this, r).onerror = null, t(this, n).set("loaded", !1), t(this, n).set("error", !1), t(this, n).set("loading", !1), t(this, n).set("clear", !1), t(this, n).set("playing", !1), t(this, n).set("metadata", !1), e) {
243
+ s(this, I, `${t(this, B)}-${e.url}`);
244
+ const l = this.hasAttribute("keep-source-parameters");
245
+ t(this, n).set("loading", !0), s(this, w, l ? e.url : e.name + e.extension), this.consumeSource(t(this, w)), !t(this, g) && !t(this, E) && J.add(t(this, I)), t(this, r).onloadeddata = () => {
246
+ t(this, D).call(this);
247
+ }, t(this, r).onload = () => {
248
+ t(this, D).call(this);
249
+ }, t(this, r).onerror = () => {
250
+ t(this, K).call(this, t(this, w));
251
+ };
252
+ } else
253
+ s(this, w, null), this.consumeSource(null);
254
+ }, G = new WeakMap(), D = new WeakMap(), K = new WeakMap(), H = new WeakMap(), U = new WeakMap(), C = new WeakMap();
255
+ export {
256
+ ht as S,
257
+ bt as a,
258
+ et as b,
259
+ ot as c
260
+ };
@@ -0,0 +1,5 @@
1
+ "use strict";var Y=u=>{throw TypeError(u)};var Z=(u,h,e)=>h.has(u)||Y("Cannot "+e);var t=(u,h,e)=>(Z(u,h,"read from private field"),e?e.call(u):h.get(u)),i=(u,h,e)=>h.has(u)?Y("Cannot add the same private member more than once"):h instanceof WeakSet?h.add(u):h.set(u,e),s=(u,h,e,c)=>(Z(u,h,"write to private field"),c?c.call(u,e):h.set(u,e),e),N=(u,h,e)=>(Z(u,h,"access private method"),e);const rt=require("./element-linked-store/index.cjs"),J=require("./loading/index.cjs"),nt=require("./index-CKTweR3M.cjs"),w=require("./events-KVanG9sR.cjs"),tt=require("./string-DUXXtU8v.cjs"),at=require("./metadata-BcYZ5w3T.cjs");require("construct-style-sheets-polyfill");const ht=require("./order/index.cjs"),et=require("./window-resizer/index.cjs"),ot=require("./Store-1JrMCgdX.cjs");var z,q,V,L,m,p,A;class st{constructor(h){i(this,z);i(this,q);i(this,V);i(this,L);i(this,m);i(this,p);i(this,A);s(this,z,h);let e=h.split(".");const c=/\b\d{1,2}x\b/g,n=e.find(y=>y.match(c)&&parseInt(y));s(this,V,n?parseInt(n):1),n&&(e=e.slice(0,-1)),s(this,q,e.length>1?e.slice(0,-1).join("."):e.join("."));const l=/\d+max/g,d=/\d+min/g,U=/\d+mar/g,F=/\d+mir/g,W=e.find(y=>y.match(l)),o=e.find(y=>y.match(d)),x=e.find(y=>y.match(U)),X=e.find(y=>y.match(F));x?(s(this,m,parseInt(x)),s(this,p,"max"),s(this,L,`(max-aspect-ratio: ${t(this,m)})`)):X?(s(this,m,parseInt(X)),s(this,p,"max"),s(this,L,`(min-aspect-ratio: ${t(this,m)})`)):W?(s(this,m,parseInt(W)),s(this,p,"max"),s(this,L,`(max-width: ${t(this,m)}px)`)):o?(s(this,m,parseInt(o)),s(this,L,`(min-width: ${t(this,m)}px)`),s(this,p,"min")):(s(this,m,0),s(this,L,`(min-width: ${t(this,m)}px)`),s(this,p,"min")),s(this,q,t(this,q).replace(`.${t(this,m)}${t(this,p)}`,"")),s(this,A,e[e.length-1]===t(this,q)?"":"."+e[e.length-1]),s(this,A,t(this,A).replace(`.${t(this,m)}${t(this,p)}`,""))}get url(){return t(this,z)}get name(){return t(this,q)}get density(){return t(this,V)}get query(){return t(this,L)}get extension(){return t(this,A)}get queryType(){return t(this,p)}get queryValue(){return t(this,m)}}z=new WeakMap,q=new WeakMap,V=new WeakMap,L=new WeakMap,m=new WeakMap,p=new WeakMap,A=new WeakMap;var S;class Q{constructor(h,e){i(this,S);s(this,S,new Map);const c=(e==null?void 0:e.mediaBuckets)!==!1,n=typeof h=="string"?c?h.trim().split(",").map(o=>o.trim()).filter(o=>!!o):[h]:h,l=[];n.forEach(o=>{const x=new st(o);l.push([x.query,x])});const d=l.filter(o=>o[1].queryType.includes("max")).sort((o,x)=>x[1].queryValue-o[1].queryValue),U=l.filter(o=>o[1].queryType.includes("min")&&o[1].queryValue!==0).sort((o,x)=>o[1].queryValue-x[1].queryValue),F=l.filter(o=>o[0]==="(min-width: 0px)");(F?[...F,...d,...U]:[...d,...U]).forEach(o=>{t(this,S).has(o[0])||t(this,S).set(o[0],[]),t(this,S).get(o[0]).push(o[1])})}get mediaBuckets(){return t(this,S)}}S=new WeakMap;var I,k;class it extends ot.Store{constructor(e){super(void 0);i(this,I);i(this,k,()=>{let e;t(this,I).mediaBuckets.forEach((l,d)=>{matchMedia(d).matches&&(e=l)});let c,n=0;e==null||e.forEach(l=>{l.density>n&&l.density<=Math.max(devicePixelRatio,1)&&(n=l.density,c=l)}),e!=null&&e.length&&!c&&(c=e[0]),this.current=c});s(this,I,new Q(e.srcset,e.sourceSetOptions))}updateSource(e){s(this,I,new Q(e.srcset,e.sourceSetOptions)),t(this,k).call(this)}close(){super.close(),this.disconnect()}connect(){et.windowResizer.subscribe(t(this,k),ht.RESIZE_ORDER.SOURCE_MANAGER),t(this,k).call(this)}disconnect(){et.windowResizer.unsubscribe(t(this,k))}}I=new WeakMap,k=new WeakMap;let ct=0;var f,r,R,E,b,g,B,M,a,O,T,v,P,$,j,G,_,K,D,H,C;class lt extends HTMLElement{constructor(e){super();i(this,$);i(this,f,null);i(this,r,null);i(this,R,this);i(this,E,!1);i(this,b,!1);i(this,g,!1);i(this,B,"");i(this,M,"");i(this,a,new rt.ElementLinkedStore(this,{loading:!1,loaded:!1,error:!1,clear:!1,playing:!1,metadata:!1}));i(this,O,null);i(this,T);i(this,v,null);i(this,P);i(this,G,e=>{const c=e[0];t(this,g)&&(!t(this,b)||this.hasAttribute("reload-source"))&&c.isIntersecting&&this.triggerLazyLoad(),c.isIntersecting?w.dispatchEvent(this,"sourceCapture",{custom:!0}):(this.hasAttribute("reload-source")&&(N(this,$,j).call(this,void 0),s(this,b,!1)),w.dispatchEvent(this,"sourceRelease",{custom:!0}))});i(this,_,()=>{t(this,a).set("loaded",!0),t(this,a).set("error",!1),t(this,a).set("loading",!1),!t(this,g)&&!t(this,E)&&J.loading.complete(t(this,M)),w.dispatchEvent(this,"sourceLoaded",{custom:!0});const e=getComputedStyle(this).getPropertyValue("--clear-duration");e?s(this,T,setTimeout(()=>{t(this,a).set("clear",!0)},parseFloat(e)*1e3)):t(this,a).set("clear",!0),s(this,E,!0)});i(this,K,e=>{t(this,a).set("loaded",!1),t(this,a).set("error",!0),t(this,a).set("loading",!1),!t(this,g)&&!t(this,E)&&J.loading.error(t(this,M)),w.dispatchEvent(this,"sourceError",{custom:!0}),s(this,E,!0)});i(this,D,()=>{t(this,a).set("playing",!0),w.dispatchEvent(this,"sourcePlay",{custom:!0})});i(this,H,()=>{t(this,a).set("playing",!1),w.dispatchEvent(this,"sourcePause",{custom:!0})});i(this,C,()=>{const e=t(this,r);(e.tagName==="VIDEO"||e.tagName==="AUDIO")&&e.readyState>=1&&(t(this,a).set("metadata",!0),w.dispatchEvent(this,"sourceMetadataLoaded",{custom:!0}),this.querySelectorAll("[data-source-duration]").forEach(c=>{c.textContent=at.formatMediaDuration(e.duration)}))});s(this,P,e==null?void 0:e.sourceSetOptions),nt.isBrowser&&window.IntersectionObserver&&s(this,O,new IntersectionObserver(t(this,G))),t(this,a).subscribe(c=>{var l;const n=(l=this.getAttribute("data-global-play-class"))==null?void 0:l.split(",");n!=null&&n.length&&(c.current.playing?n.forEach(d=>{document.documentElement.classList.add(d.trim())}):n.forEach(d=>{document.documentElement.classList.remove(d.trim())}))})}get consumerElement(){return t(this,r)}get consumerHolderElement(){return t(this,R)}get sourceManager(){return t(this,f)}get status(){return t(this,a)}get isLazy(){return t(this,g)}get currentURL(){return t(this,v)}get isFirstLoadHappened(){return t(this,E)}triggerLazyLoad(){!t(this,b)&&t(this,f).current&&t(this,f).current!==t(this,f).previous&&(s(this,b,!0),N(this,$,j).call(this,t(this,f).current))}connectedCallback(){s(this,B,`source-consumer-${++ct}`);const e=this.getAttribute("srcset")||"",c=this.hasAttribute("notify")?this.closest(this.getAttribute("notify")):null;c&&t(this,a).addElement(c),s(this,R,this.querySelector("[data-consumer-holder]")||this),this.querySelectorAll(".source-consumer").forEach(n=>n==null?void 0:n.remove()),s(this,r,this.createConsumer()),t(this,r).style.cssText=`
2
+ display: block;
3
+ width: 100%;
4
+ height: 100%;
5
+ `,t(this,r).classList.add("source-consumer"),t(this,r).addEventListener("play",t(this,D)),t(this,r).addEventListener("pause",t(this,H)),t(this,r).addEventListener("loadedmetadata",t(this,C)),t(this,C).call(this),Array.from(this.attributes).forEach(n=>{if(n.name!=="srcset"){const l=n.nodeValue||"",d=tt.kebabToCamel(n.name);d in t(this,r)&&(t(this,r)[d]=l||!0)}});for(const n in this.dataset){const l=this.dataset[n],d=tt.kebabToCamel(n);d in t(this,r)&&(t(this,r)[d]=l?l==="false"?!1:l:!0)}t(this,R).appendChild(t(this,r)),s(this,f,new it({srcset:e,sourceSetOptions:t(this,P)})),s(this,g,this.hasAttribute("lazy")),t(this,f).subscribe(n=>{(!t(this,g)||t(this,g)&&t(this,b))&&N(this,$,j).call(this,n.current)}),t(this,f).connect(),t(this,O).observe(this)}disconnectedCallback(){var e;clearTimeout(t(this,T)),t(this,O).disconnect(),(e=t(this,f))==null||e.close(),t(this,r)&&(this.consumeSource(null),t(this,r).removeEventListener("play",t(this,D)),t(this,r).removeEventListener("pause",t(this,H)),t(this,r).removeEventListener("loadedmetadata",t(this,C)),t(this,r).onloadeddata=null,t(this,r).onload=null,t(this,r).onerror=null,t(this,r).onerror=null,t(this,r).remove()),s(this,E,!1),s(this,b,!1),t(this,a).reset()}}f=new WeakMap,r=new WeakMap,R=new WeakMap,E=new WeakMap,b=new WeakMap,g=new WeakMap,B=new WeakMap,M=new WeakMap,a=new WeakMap,O=new WeakMap,T=new WeakMap,v=new WeakMap,P=new WeakMap,$=new WeakSet,j=function(e){if(clearTimeout(t(this,T)),t(this,r).onloadeddata=null,t(this,r).onload=null,t(this,r).onerror=null,t(this,a).set("loaded",!1),t(this,a).set("error",!1),t(this,a).set("loading",!1),t(this,a).set("clear",!1),t(this,a).set("playing",!1),t(this,a).set("metadata",!1),e){s(this,M,`${t(this,B)}-${e.url}`);const c=this.hasAttribute("keep-source-parameters");t(this,a).set("loading",!0),s(this,v,c?e.url:e.name+e.extension),this.consumeSource(t(this,v)),!t(this,g)&&!t(this,E)&&J.loading.add(t(this,M)),t(this,r).onloadeddata=()=>{t(this,_).call(this)},t(this,r).onload=()=>{t(this,_).call(this)},t(this,r).onerror=()=>{t(this,K).call(this,t(this,v))}}else s(this,v,null),this.consumeSource(null)},G=new WeakMap,_=new WeakMap,K=new WeakMap,D=new WeakMap,H=new WeakMap,C=new WeakMap;exports.Source=st;exports.SourceElement=lt;exports.SourceManager=it;exports.SourceSet=Q;
@@ -6,7 +6,7 @@ var i = (r, t, e) => (A(r, t, "read from private field"), e ? e.call(r) : t.get(
6
6
  import { Notifier as _ } from "./notifier/index.js";
7
7
  import { g as z } from "./string-BlMQbe8b.js";
8
8
  import "construct-style-sheets-polyfill";
9
- import { i as E } from "./index-JqYHGoo6.js";
9
+ import { i as E } from "./index-LReFyN6i.js";
10
10
  var f;
11
11
  class I {
12
12
  constructor() {
@@ -20,8 +20,8 @@ import { c as q } from "./math-BOBiC4TN.js";
20
20
  import { p as w } from "./number-CumqY64S.js";
21
21
  import { n as z } from "./polyfills-DJrTJQky.js";
22
22
  import "construct-style-sheets-polyfill";
23
- import "./index-JqYHGoo6.js";
24
- import { A as C } from "./Animation-C4tLEBGM.js";
23
+ import "./index-LReFyN6i.js";
24
+ import { A as C } from "./Animation-DxtCzFP3.js";
25
25
  var m, t;
26
26
  class G extends C {
27
27
  constructor(e, i) {
@@ -5,9 +5,9 @@ var E = (t, e, n) => e.has(t) || v("Cannot " + n);
5
5
  var s = (t, e, n) => (E(t, e, "read from private field"), n ? n.call(t) : e.get(t)), o = (t, e, n) => e.has(t) ? v("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, n), i = (t, e, n, p) => (E(t, e, "write to private field"), p ? p.call(t, n) : e.set(t, n), n);
6
6
  import { RESIZE_ORDER as P } from "./order/index.js";
7
7
  import { windowResizer as W } from "./window-resizer/index.js";
8
- import { i as A } from "./index-JqYHGoo6.js";
8
+ import { i as A } from "./index-LReFyN6i.js";
9
9
  import "construct-style-sheets-polyfill";
10
- import { S as z } from "./Store-BtVtCGLk.js";
10
+ import { S as z } from "./Store-CgQ3ReoB.js";
11
11
  var a, m, r, d, l, c;
12
12
  class O {
13
13
  constructor() {
@@ -4,7 +4,7 @@ var M = (s) => {
4
4
  var x = (s, i, t) => i.has(s) || M("Cannot " + t);
5
5
  var e = (s, i, t) => (x(s, i, "read from private field"), t ? t.call(s) : i.get(s)), o = (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), a = (s, i, t, r) => (x(s, i, "write to private field"), r ? r.call(s, t) : i.set(s, t), t), d = (s, i, t) => (x(s, i, "access private method"), t);
6
6
  import { Attribute as H } from "../attribute/index.js";
7
- import { i as S } from "../index-JqYHGoo6.js";
7
+ import { i as S } from "../index-LReFyN6i.js";
8
8
  import { d as k } from "../events-CsVF98U6.js";
9
9
  import { g as D } from "../style-j2TwriJ_.js";
10
10
  import "construct-style-sheets-polyfill";
@@ -1,6 +1,6 @@
1
- import { A as r } from "../Animation-C4tLEBGM.js";
2
- import { D as m } from "../Damped-DVG5nrYV.js";
3
- import { T as t } from "../Tweened-C1lnK6n9.js";
1
+ import { A as r } from "../Animation-DxtCzFP3.js";
2
+ import { D as m } from "../Damped-DMnIOXpC.js";
3
+ import { T as t } from "../Tweened-lT68VACv.js";
4
4
  export {
5
5
  r as Animation,
6
6
  m as Damped,
@@ -3,10 +3,10 @@ var d = (e) => {
3
3
  };
4
4
  var m = (e, s, t) => s.has(e) || d("Cannot " + t);
5
5
  var r = (e, s, t) => (m(e, s, "read from private field"), t ? t.call(e) : s.get(e)), c = (e, s, t) => s.has(e) ? d("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(e) : s.set(e, t), a = (e, s, t, h) => (m(e, s, "write to private field"), h ? h.call(e, t) : s.set(e, t), t), v = (e, s, t) => (m(e, s, "access private method"), t);
6
- import { S as y } from "../Store-BtVtCGLk.js";
6
+ import { S as y } from "../Store-CgQ3ReoB.js";
7
7
  import { p as S } from "../attributes-69we3byR.js";
8
- import { i as w } from "../index-JqYHGoo6.js";
9
- import { g as x } from "../dom-fgxIeFxm.js";
8
+ import { i as w } from "../index-LReFyN6i.js";
9
+ import { g as x } from "../dom-BIeVMHfK.js";
10
10
  import "construct-style-sheets-polyfill";
11
11
  var i, u, n, b, o, p;
12
12
  class V extends y {
@@ -19,9 +19,9 @@ var F = (h, n, e) => new Promise((i, r) => {
19
19
  }, tt = (I) => I.done ? i(I.value) : Promise.resolve(I.value).then(a, y);
20
20
  tt((e = e.apply(h, n)).next());
21
21
  });
22
- import { a as it, i as Z } from "../index-JqYHGoo6.js";
22
+ import { a as it, i as Z } from "../index-LReFyN6i.js";
23
23
  import { w as ht } from "../custom-elements-DBnCK7Zx.js";
24
- import { b as _ } from "../dom-fgxIeFxm.js";
24
+ import { b as _ } from "../dom-BIeVMHfK.js";
25
25
  import "construct-style-sheets-polyfill";
26
26
  import { CSSProperty as S } from "../css-property/index.js";
27
27
  import { d as bt } from "../events-CsVF98U6.js";
@@ -0,0 +1,8 @@
1
+ export declare class Cache {
2
+ #private;
3
+ get(key: string): any;
4
+ set(key: string, value: any, ttl?: number): void;
5
+ delete(key: string): void;
6
+ cleanup(): void;
7
+ clear(): void;
8
+ }
@@ -0,0 +1 @@
1
+ "use strict";var l=s=>{throw TypeError(s)};var c=(s,e,t)=>e.has(s)||l("Cannot "+t);var n=(s,e,t)=>(c(s,e,"read from private field"),t?t.call(s):e.get(s)),a=(s,e,t)=>e.has(s)?l("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(s):e.set(s,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var i;class o{constructor(){a(this,i,new Map)}get(e){const t=n(this,i).get(e);return t?(Date.now()-t.timestamp>=t.ttl&&this.delete(e),t.result):null}set(e,t,r){n(this,i).set(e,{timestamp:Date.now(),result:t,ttl:r?r*60*1e3:1/0})}delete(e){n(this,i).delete(e)}cleanup(){const e=Date.now();for(const[t,r]of n(this,i).entries())e-r.timestamp>=r.ttl&&n(this,i).delete(t)}clear(){n(this,i).clear()}}i=new WeakMap;exports.Cache=o;
@@ -0,0 +1 @@
1
+ export { Cache } from './Cache';