aptechka 0.39.6 → 0.39.7

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.
@@ -1,4 +1,4 @@
1
- "use strict";var he=a=>{throw TypeError(a)};var ie=(a,n,t)=>n.has(a)||he("Cannot "+t);var e=(a,n,t)=>(ie(a,n,"read from private field"),t?t.call(a):n.get(a)),s=(a,n,t)=>n.has(a)?he("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(a):n.set(a,t),r=(a,n,t,i)=>(ie(a,n,"write to private field"),i?i.call(a,t):n.set(a,t),t),T=(a,n,t)=>(ie(a,n,"access private method"),t);var ce=(a,n,t)=>new Promise((i,o)=>{var y=m=>{try{g(t.next(m))}catch(l){o(l)}},R=m=>{try{g(t.throw(m))}catch(l){o(l)}},g=m=>m.done?i(m.value):Promise.resolve(m.value).then(y,R);g((t=t.apply(a,n)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ge=require("../device/index.cjs"),Ee=require("../source/index.cjs"),ve=require("../class-linked-status/index.cjs"),de=require("../browser-CpzFX2xg.cjs"),G=require("../events-KVanG9sR.cjs"),me=require("../string-DhgS_iFl.cjs"),re=require("../loading/index.cjs"),K=require("../css-property/index.cjs"),ue=require("../element-resizer/vanilla/index.cjs"),le=require("../canvas-CU5Xjahf.cjs"),Se=require("../canvas/index.cjs"),ne=require("../ticker/vanilla/index.cjs");let we=0;var d,h,E,q,f,H,I,c,V,z,v,U,X,Q,O,Z;class j extends HTMLElement{constructor(){super();s(this,U);s(this,d,null);s(this,h,null);s(this,E,!1);s(this,q,!1);s(this,f,!1);s(this,H,"");s(this,I,"");s(this,c,new ve.ClassLinkedStatus(this,{loading:!1,loaded:!1,error:!1,clear:!1}));s(this,V,null);s(this,z);s(this,v,null);s(this,Q,t=>{const i=t[0];e(this,f)&&(!e(this,q)||this.hasAttribute("reload-source"))&&i.isIntersecting&&this.triggerLazyLoad(),i.isIntersecting?G.dispatchEvent(this,"sourceCapture",{custom:!0}):(this.hasAttribute("reload-source")&&T(this,U,X).call(this,void 0),G.dispatchEvent(this,"sourceRelease",{custom:!0}))});s(this,O,()=>{e(this,c).set("loaded",!0),e(this,c).set("error",!1),e(this,c).set("loading",!1),!e(this,f)&&!e(this,E)&&re.loading.complete(e(this,I));const t=getComputedStyle(this).getPropertyValue("--clear-duration");t?r(this,z,setTimeout(()=>{e(this,c).set("clear",!0)},parseFloat(t)*1e3)):e(this,c).set("clear",!0),r(this,E,!0)});s(this,Z,t=>{e(this,c).set("loaded",!1),e(this,c).set("error",!0),e(this,c).set("loading",!1),!e(this,f)&&!e(this,E)&&re.loading.error(e(this,I)),r(this,E,!0)});de.isBrowser&&window.IntersectionObserver&&(r(this,H,`source-consumer-${++we}`),r(this,V,new IntersectionObserver(e(this,Q))))}get consumerElement(){return e(this,h)}get sourceManager(){return e(this,d)}get status(){return e(this,c)}get isLazy(){return e(this,f)}get currentURL(){return e(this,v)}triggerLazyLoad(){e(this,d).current&&e(this,d).current!==e(this,d).previous&&T(this,U,X).call(this,e(this,d).current),r(this,q,!0)}connectedCallback(){const t=this.getAttribute("srcset");if(!t)return;const i=this.hasAttribute("notify")?this.querySelector(this.getAttribute("notify")):null;i&&e(this,c).addElement(i),r(this,h,this.createConsumer()),e(this,h).style.cssText=`
1
+ "use strict";var he=a=>{throw TypeError(a)};var ie=(a,n,t)=>n.has(a)||he("Cannot "+t);var e=(a,n,t)=>(ie(a,n,"read from private field"),t?t.call(a):n.get(a)),s=(a,n,t)=>n.has(a)?he("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(a):n.set(a,t),r=(a,n,t,i)=>(ie(a,n,"write to private field"),i?i.call(a,t):n.set(a,t),t),T=(a,n,t)=>(ie(a,n,"access private method"),t);var ce=(a,n,t)=>new Promise((i,o)=>{var y=m=>{try{g(t.next(m))}catch(l){o(l)}},R=m=>{try{g(t.throw(m))}catch(l){o(l)}},g=m=>m.done?i(m.value):Promise.resolve(m.value).then(y,R);g((t=t.apply(a,n)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ge=require("../device/index.cjs"),Ee=require("../source/index.cjs"),ve=require("../class-linked-status/index.cjs"),de=require("../browser-CpzFX2xg.cjs"),G=require("../events-KVanG9sR.cjs"),me=require("../string-DhgS_iFl.cjs"),re=require("../loading/index.cjs"),K=require("../css-property/index.cjs"),ue=require("../element-resizer/vanilla/index.cjs"),le=require("../canvas-CU5Xjahf.cjs"),Se=require("../canvas/index.cjs"),ne=require("../ticker/vanilla/index.cjs");let we=0;var d,h,E,q,f,H,I,c,V,z,v,U,X,Q,O,Z;class j extends HTMLElement{constructor(){super();s(this,U);s(this,d,null);s(this,h,null);s(this,E,!1);s(this,q,!1);s(this,f,!1);s(this,H,"");s(this,I,"");s(this,c,new ve.ClassLinkedStatus(this,{loading:!1,loaded:!1,error:!1,clear:!1}));s(this,V,null);s(this,z);s(this,v,null);s(this,Q,t=>{const i=t[0];e(this,f)&&(!e(this,q)||this.hasAttribute("reload-source"))&&i.isIntersecting&&this.triggerLazyLoad(),i.isIntersecting?G.dispatchEvent(this,"sourceCapture",{custom:!0}):(this.hasAttribute("reload-source")&&T(this,U,X).call(this,void 0),G.dispatchEvent(this,"sourceRelease",{custom:!0}))});s(this,O,()=>{e(this,c).set("loaded",!0),e(this,c).set("error",!1),e(this,c).set("loading",!1),!e(this,f)&&!e(this,E)&&re.loading.complete(e(this,I));const t=getComputedStyle(this).getPropertyValue("--clear-duration");t?r(this,z,setTimeout(()=>{e(this,c).set("clear",!0)},parseFloat(t)*1e3)):e(this,c).set("clear",!0),r(this,E,!0)});s(this,Z,t=>{e(this,c).set("loaded",!1),e(this,c).set("error",!0),e(this,c).set("loading",!1),!e(this,f)&&!e(this,E)&&re.loading.error(e(this,I)),r(this,E,!0)});de.isBrowser&&window.IntersectionObserver&&(r(this,H,`source-consumer-${++we}`),r(this,V,new IntersectionObserver(e(this,Q))))}get consumerElement(){return e(this,h)}get sourceManager(){return e(this,d)}get status(){return e(this,c)}get isLazy(){return e(this,f)}get currentURL(){return e(this,v)}triggerLazyLoad(){e(this,d).current&&e(this,d).current!==e(this,d).previous&&T(this,U,X).call(this,e(this,d).current),r(this,q,!0)}connectedCallback(){const t=this.getAttribute("srcset");if(!t)return;const i=this.hasAttribute("notify")?this.closest(this.getAttribute("notify")):null;i&&e(this,c).addElement(i),r(this,h,this.createConsumer()),e(this,h).style.cssText=`
2
2
  display: block;
3
3
  width: 100%;
4
4
  height: 100%;
@@ -32,7 +32,7 @@ import { c as ge, a as Ee } from "../canvas-DeZ0SLUJ.js";
32
32
  import { CanvasElement as ve } from "../canvas/index.js";
33
33
  import { ticker as re } from "../ticker/vanilla/index.js";
34
34
  let we = 0;
35
- var d, h, E, U, f, H, I, c, z, _, v, B, K, G, F, J;
35
+ var d, h, E, U, f, q, I, c, z, _, v, B, K, G, F, J;
36
36
  class te extends HTMLElement {
37
37
  constructor() {
38
38
  super();
@@ -42,7 +42,7 @@ class te extends HTMLElement {
42
42
  s(this, E, !1);
43
43
  s(this, U, !1);
44
44
  s(this, f, !1);
45
- s(this, H, "");
45
+ s(this, q, "");
46
46
  s(this, I, "");
47
47
  s(this, c, new pe(this, {
48
48
  loading: !1,
@@ -67,7 +67,7 @@ class te extends HTMLElement {
67
67
  s(this, J, (t) => {
68
68
  e(this, c).set("loaded", !1), e(this, c).set("error", !0), e(this, c).set("loading", !1), !e(this, f) && !e(this, E) && ie.error(e(this, I)), r(this, E, !0);
69
69
  });
70
- le && window.IntersectionObserver && (r(this, H, `source-consumer-${++we}`), r(this, z, new IntersectionObserver(
70
+ le && window.IntersectionObserver && (r(this, q, `source-consumer-${++we}`), r(this, z, new IntersectionObserver(
71
71
  e(this, G)
72
72
  )));
73
73
  }
@@ -92,7 +92,7 @@ class te extends HTMLElement {
92
92
  connectedCallback() {
93
93
  const t = this.getAttribute("srcset");
94
94
  if (!t) return;
95
- const i = this.hasAttribute("notify") ? this.querySelector(this.getAttribute("notify")) : null;
95
+ const i = this.hasAttribute("notify") ? this.closest(this.getAttribute("notify")) : null;
96
96
  i && e(this, c).addElement(i), r(this, h, this.createConsumer()), e(this, h).style.cssText = `
97
97
  display: block;
98
98
  width: 100%;
@@ -112,9 +112,9 @@ class te extends HTMLElement {
112
112
  e(this, z).disconnect(), e(this, d).close(), e(this, h).onloadeddata = null, e(this, h).onload = null, e(this, h).onerror = null, e(this, h).remove(), e(this, c).reset(), clearTimeout(e(this, _));
113
113
  }
114
114
  }
115
- d = new WeakMap(), h = new WeakMap(), E = new WeakMap(), U = new WeakMap(), f = new WeakMap(), H = new WeakMap(), I = new WeakMap(), c = new WeakMap(), z = new WeakMap(), _ = new WeakMap(), v = new WeakMap(), B = new WeakSet(), K = function(t) {
115
+ d = new WeakMap(), h = new WeakMap(), E = new WeakMap(), U = new WeakMap(), f = new WeakMap(), q = new WeakMap(), I = new WeakMap(), c = new WeakMap(), z = new WeakMap(), _ = new WeakMap(), v = new WeakMap(), B = new WeakSet(), K = function(t) {
116
116
  if (clearTimeout(e(this, _)), e(this, h).onloadeddata = null, e(this, h).onload = null, e(this, h).onerror = null, e(this, c).set("loaded", !1), e(this, c).set("error", !1), e(this, c).set("loading", !1), e(this, c).set("clear", !1), t) {
117
- r(this, I, `${e(this, H)}-${t.url}`);
117
+ r(this, I, `${e(this, q)}-${t.url}`);
118
118
  const i = this.hasAttribute("keep-source-parameters");
119
119
  e(this, c).set("loading", !0), r(this, v, i ? t.url : t.name + t.extension), this.consumeSource(e(this, v)), !e(this, f) && !e(this, E) && ie.add(e(this, I)), e(this, h).onloadeddata = () => {
120
120
  e(this, F).call(this);
@@ -306,7 +306,7 @@ class Re extends te {
306
306
  }
307
307
  T = new WeakMap(), W = new WeakMap();
308
308
  customElements.get("e-video") || customElements.define("e-video", Re);
309
- var u, $, S, O, q, Q, Z, ee, Y, ae;
309
+ var u, $, S, O, H, Q, Z, ee, Y, ae;
310
310
  const V = class V extends te {
311
311
  constructor() {
312
312
  super();
@@ -315,7 +315,7 @@ const V = class V extends te {
315
315
  s(this, $);
316
316
  s(this, S, !1);
317
317
  s(this, O, !1);
318
- s(this, q, () => {
318
+ s(this, H, () => {
319
319
  r(this, S, e(this, S) || this.hasAttribute("autoplay") && !this.hasAttribute("capture-autoplay")), r(this, u, new window.YT.Player(e(this, $), {
320
320
  playerVars: {
321
321
  mute: this.hasAttribute("muted") ? 1 : 0,
@@ -361,14 +361,14 @@ const V = class V extends te {
361
361
  const y = document.getElementsByTagName("script")[0];
362
362
  (i = y.parentNode) == null || i.insertBefore(o, y);
363
363
  }
364
- e(this, u) ? x(this, Y, ae).call(this) : V.__apiReady ? e(this, q).call(this) : addEventListener("youTubeIframeAPIReady", e(this, q));
364
+ e(this, u) ? x(this, Y, ae).call(this) : V.__apiReady ? e(this, H).call(this) : addEventListener("youTubeIframeAPIReady", e(this, H));
365
365
  } else e(this, u) && e(this, u).stopVideo();
366
366
  }
367
367
  disconnectedCallback() {
368
- super.disconnectedCallback(), e(this, u) && e(this, u).destroy(), removeEventListener("youTubeIframeAPIReady", e(this, q));
368
+ super.disconnectedCallback(), e(this, u) && e(this, u).destroy(), removeEventListener("youTubeIframeAPIReady", e(this, H));
369
369
  }
370
370
  };
371
- u = new WeakMap(), $ = new WeakMap(), S = new WeakMap(), O = new WeakMap(), q = new WeakMap(), Q = new WeakMap(), Z = new WeakMap(), ee = new WeakMap(), Y = new WeakSet(), ae = function() {
371
+ u = new WeakMap(), $ = new WeakMap(), S = new WeakMap(), O = new WeakMap(), H = new WeakMap(), Q = new WeakMap(), Z = new WeakMap(), ee = new WeakMap(), Y = new WeakSet(), ae = function() {
372
372
  var t, i;
373
373
  this.currentURL && (this.currentURL.startsWith("http") ? e(this, u).loadVideoByUrl(this.currentURL) : e(this, u).loadVideoById(this.currentURL)), e(this, S) ? e(this, u).playVideo() : e(this, u).stopVideo(), r(this, S, !1), (i = (t = this.consumerElement).onload) == null || i.call(t, new Event("load"));
374
374
  }, V.__apiReady = !1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aptechka",
3
- "version": "0.39.6",
3
+ "version": "0.39.7",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/denisavitski/aptechka.git"