aptechka 0.37.2 → 0.38.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.
@@ -1,5 +1,5 @@
1
- "use strict";var X=r=>{throw TypeError(r)};var F=(r,s,t)=>s.has(r)||X("Cannot "+t);var e=(r,s,t)=>(F(r,s,"read from private field"),t?t.call(r):s.get(r)),i=(r,s,t)=>s.has(r)?X("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(r):s.set(r,t),a=(r,s,t,n)=>(F(r,s,"write to private field"),n?n.call(r,t):s.set(r,t),t),B=(r,s,t)=>(F(r,s,"access private method"),t);var Y=(r,s,t)=>new Promise((n,l)=>{var y=d=>{try{g(t.next(d))}catch(c){l(c)}},T=d=>{try{g(t.throw(d))}catch(c){l(c)}},g=d=>d.done?n(d.value):Promise.resolve(d.value).then(y,T);g((t=t.apply(r,s)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ie=require("../device/index.cjs"),re=require("../source/index.cjs"),ne=require("../class-linked-status/index.cjs"),Q=require("../browser-CpzFX2xg.cjs"),K=require("../events-KVanG9sR.cjs"),oe=require("../string-DhgS_iFl.cjs"),U=require("../loading/index.cjs"),H=require("../css-property/index.cjs"),G=require("../element-resizer/vanilla/index.cjs"),J=require("../canvas-CU5Xjahf.cjs"),ae=require("../canvas/index.cjs"),D=require("../ticker/vanilla/index.cjs");let ce=0;var u,o,p,q,m,z,C,h,I,P,O,W,_,V;class j extends HTMLElement{constructor(){super();i(this,P);i(this,u,null);i(this,o,null);i(this,p,!1);i(this,q,!1);i(this,m,!1);i(this,z,"");i(this,C,"");i(this,h,new ne.ClassLinkedStatus(this,{loading:!1,loaded:!1,error:!1}));i(this,I,null);i(this,W,t=>{const n=t[0];e(this,m)&&(!e(this,q)||this.hasAttribute("reload-source"))&&n.isIntersecting&&this.triggerLazyLoad(),n.isIntersecting?K.dispatchEvent(this,"sourceCapture",{custom:!0}):(this.hasAttribute("reload-source")&&B(this,P,O).call(this,void 0),K.dispatchEvent(this,"sourceRelease",{custom:!0}))});i(this,_,()=>{e(this,h).set("loaded",!0),e(this,h).set("error",!1),e(this,h).set("loading",!1),!e(this,m)&&!e(this,p)&&U.loading.complete(e(this,C)),a(this,p,!0)});i(this,V,t=>{e(this,h).set("loaded",!1),e(this,h).set("error",!0),e(this,h).set("loading",!1),!e(this,m)&&!e(this,p)&&U.loading.error(e(this,C)),a(this,p,!0)});Q.isBrowser&&window.IntersectionObserver&&(a(this,z,`source-consumer-${++ce}`),a(this,I,new IntersectionObserver(e(this,W))))}get consumerElement(){return e(this,o)}get sourceManager(){return e(this,u)}get status(){return e(this,h)}get isLazy(){return e(this,m)}triggerLazyLoad(){e(this,u).current&&e(this,u).current!==e(this,u).previous&&B(this,P,O).call(this,e(this,u).current),a(this,q,!0)}connectedCallback(){const t=this.getAttribute("srcset");t&&(a(this,o,this.createConsumer()),e(this,o).style.cssText=`
1
+ "use strict";var oe=a=>{throw TypeError(a)};var se=(a,r,t)=>r.has(a)||oe("Cannot "+t);var e=(a,r,t)=>(se(a,r,"read from private field"),t?t.call(a):r.get(a)),s=(a,r,t)=>r.has(a)?oe("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(a):r.set(a,t),n=(a,r,t,i)=>(se(a,r,"write to private field"),i?i.call(a,t):r.set(a,t),t),x=(a,r,t)=>(se(a,r,"access private method"),t);var he=(a,r,t)=>new Promise((i,c)=>{var b=m=>{try{g(t.next(m))}catch(l){c(l)}},N=m=>{try{g(t.throw(m))}catch(l){c(l)}},g=m=>m.done?i(m.value):Promise.resolve(m.value).then(b,N);g((t=t.apply(a,r)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ye=require("../device/index.cjs"),ge=require("../source/index.cjs"),Ee=require("../class-linked-status/index.cjs"),le=require("../browser-CpzFX2xg.cjs"),X=require("../events-KVanG9sR.cjs"),de=require("../string-DhgS_iFl.cjs"),ie=require("../loading/index.cjs"),D=require("../css-property/index.cjs"),ce=require("../element-resizer/vanilla/index.cjs"),ue=require("../canvas-CU5Xjahf.cjs"),ve=require("../canvas/index.cjs"),re=require("../ticker/vanilla/index.cjs");let Se=0;var d,o,E,_,f,$,C,u,q,V,v,z,K,J,H,Q;class F extends HTMLElement{constructor(){super();s(this,z);s(this,d,null);s(this,o,null);s(this,E,!1);s(this,_,!1);s(this,f,!1);s(this,$,"");s(this,C,"");s(this,u,new Ee.ClassLinkedStatus(this,{loading:!1,loaded:!1,error:!1,clear:!1}));s(this,q,null);s(this,V);s(this,v,null);s(this,J,t=>{const i=t[0];e(this,f)&&(!e(this,_)||this.hasAttribute("reload-source"))&&i.isIntersecting&&this.triggerLazyLoad(),i.isIntersecting?X.dispatchEvent(this,"sourceCapture",{custom:!0}):(this.hasAttribute("reload-source")&&x(this,z,K).call(this,void 0),X.dispatchEvent(this,"sourceRelease",{custom:!0}))});s(this,H,()=>{e(this,u).set("loaded",!0),e(this,u).set("error",!1),e(this,u).set("loading",!1),!e(this,f)&&!e(this,E)&&ie.loading.complete(e(this,C));const t=getComputedStyle(this).getPropertyValue("--clear-duration");t&&n(this,V,setTimeout(()=>{e(this,u).set("clear",!0)},parseFloat(t)*1e3)),n(this,E,!0)});s(this,Q,t=>{e(this,u).set("loaded",!1),e(this,u).set("error",!0),e(this,u).set("loading",!1),!e(this,f)&&!e(this,E)&&ie.loading.error(e(this,C)),n(this,E,!0)});le.isBrowser&&window.IntersectionObserver&&(n(this,$,`source-consumer-${++Se}`),n(this,q,new IntersectionObserver(e(this,J))))}get consumerElement(){return e(this,o)}get sourceManager(){return e(this,d)}get status(){return e(this,u)}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&&x(this,z,K).call(this,e(this,d).current),n(this,_,!0)}connectedCallback(){const t=this.getAttribute("srcset");t&&(n(this,o,this.createConsumer()),e(this,o).style.cssText=`
2
2
  display: block;
3
3
  width: 100%;
4
4
  height: 100%;
5
- `,e(this,o).classList.add("source-consumer"),Array.from(this.attributes).forEach(n=>{if(n.name!=="srcset"){const l=n.nodeValue||"",y=oe.kebabToCamel(n.name);y in e(this,o)&&(e(this,o)[y]=l||!0)}}),this.appendChild(e(this,o)),a(this,u,new re.SourceManager({srcset:t})),a(this,m,this.hasAttribute("lazy")),e(this,u).subscribe(n=>{(!e(this,m)||e(this,m)&&e(this,q))&&B(this,P,O).call(this,n.current)}),e(this,I).observe(this),e(this,u).connect())}disconnectedCallback(){e(this,I).disconnect(),e(this,u).close(),e(this,o).onloadeddata=null,e(this,o).onload=null,e(this,o).onerror=null,e(this,o).remove(),e(this,h).reset()}}u=new WeakMap,o=new WeakMap,p=new WeakMap,q=new WeakMap,m=new WeakMap,z=new WeakMap,C=new WeakMap,h=new WeakMap,I=new WeakMap,P=new WeakSet,O=function(t){if(e(this,o).onloadeddata=null,e(this,o).onload=null,e(this,o).onerror=null,e(this,h).set("loaded",!1),e(this,h).set("error",!1),e(this,h).set("loading",!1),t){a(this,C,`${e(this,z)}-${t.url}`);const n=this.hasAttribute("keep-source-parameters");e(this,h).set("loading",!0);const l=n?t.url:t.name+t.extension;this.consumeSource(l),!e(this,m)&&!e(this,p)&&U.loading.add(e(this,C)),e(this,o).onloadeddata=()=>{e(this,_).call(this)},e(this,o).onload=()=>{e(this,_).call(this)},e(this,o).onerror=()=>{e(this,V).call(this,l)}}else this.consumeSource(null)},W=new WeakMap,_=new WeakMap,V=new WeakMap;class Z extends j{createConsumer(){return document.createElement("img")}consumeSource(s){if(s&&this.hasAttribute("webp")&&ie.device.isWebp){const t=s.split(".").slice(0,-1).join(".")+".webp";this.consumerElement.src=t}else this.consumerElement.src=s||""}}customElements.get("e-image")||customElements.define("e-image",Z);function he(r){const s=r.match(/\{([\d-]+)\}/);if(s){const t=s[1].split("-");if(t.length===2){const n=parseInt(t[0],10),l=parseInt(t[1],10);return{start:n,end:l}}}return null}var f,w,R,E,v,L,k,M,b,S;class ee extends j{constructor(t){super();i(this,f,[]);i(this,w,new H.CSSProperty(this,"--fit","contain"));i(this,R,new H.CSSProperty(this,"--autoplay",!1));i(this,E,new H.CSSProperty(this,"--offset-x",.5));i(this,v,new H.CSSProperty(this,"--offset-y",.5));i(this,L,null);i(this,k,0);i(this,M,1);i(this,b,()=>{if(e(this,f).length){const t=e(this,f)[0];e(this,w).current==="cover"?a(this,L,J.cover(t.naturalWidth,t.naturalHeight,this.consumerElement.width,this.consumerElement.height,e(this,E).current,e(this,v).current)):a(this,L,J.contain(t.naturalWidth,t.naturalHeight,this.consumerElement.width,this.consumerElement.height,e(this,E).current,e(this,v).current))}});i(this,S,t=>{if(this.status.isFalse("loaded")||!e(this,L))return;t.detail.context.clearRect(0,0,t.detail.width,t.detail.height);const n=e(this,f)[e(this,k)];n&&t.detail.context.drawImage(n,...e(this,L)),e(this,R).current&&a(this,k,(e(this,k)+1)%e(this,f).length)});Q.isBrowser&&(a(this,M,parseInt(((t==null?void 0:t.pad)||this.getAttribute("pad")||"1").toString())),e(this,w).subscribe(e(this,b)),e(this,E).subscribe(e(this,b)),e(this,v).subscribe(e(this,b)),this.addEventListener("sourceCapture",n=>{this.consumerElement.addEventListener("canvasRender",e(this,S))}),this.addEventListener("sourceRelease",n=>{this.consumerElement.removeEventListener("canvasRender",e(this,S))}))}setProgress(t){e(this,f).length&&a(this,k,Math.floor((e(this,f).length-1)*t))}connectedCallback(){super.connectedCallback(),e(this,R).observe(),e(this,w).observe(),e(this,E).observe(),e(this,v).observe(),G.elementResizer.subscribe(this,e(this,b))}disconnectedCallback(){super.disconnectedCallback(),e(this,R).unobserve(),e(this,w).unobserve(),e(this,E).unobserve(),e(this,v).unobserve(),a(this,f,[]),G.elementResizer.unsubscribe(e(this,b)),this.consumerElement.removeEventListener("canvasRender",e(this,S))}createConsumer(){return new ae.CanvasElement}consumeSource(t){return Y(this,null,function*(){var n,l,y,T;if(t){this.consumerElement.removeEventListener("canvasRender",e(this,S));const g=[],d=he(t);if(d)for(let c=d.start;c<=d.end;c++){const N=t.replace(/\{([^}]+)\}/,c.toString().padStart(e(this,M),"0")),$=new Image;$.src=N,g.push($)}else{const c=new Image;c.src=t,g.push(c)}try{yield Promise.all(g.map((c,N)=>new Promise(($,se)=>{c.onload=()=>{$()},c.onerror=le=>{se(`${c.src} Image not found`)}}))),a(this,f,g),e(this,b).call(this),(l=(n=this.consumerElement).onload)==null||l.call(n,new Event("load")),this.isLazy||this.consumerElement.addEventListener("canvasRender",e(this,S))}catch(c){console.error(c),(T=(y=this.consumerElement).onerror)==null||T.call(y,new Event("error"))}}})}}f=new WeakMap,w=new WeakMap,R=new WeakMap,E=new WeakMap,v=new WeakMap,L=new WeakMap,k=new WeakMap,M=new WeakMap,b=new WeakMap,S=new WeakMap;customElements.get("e-sequence")||customElements.define("e-sequence",ee);var x,A;class te extends j{constructor(){super(...arguments);i(this,x,0);i(this,A,()=>{this.classList.add(`state-${this.consumerElement.readyState}`);const t=this.consumerElement.readyState/4;t>e(this,x)&&a(this,x,t),K.dispatchEvent(this,"videoReadyStateChange",{detail:{readyState:this.consumerElement.readyState,progress:e(this,x)}}),this.consumerElement.readyState===4&&D.ticker.unsubscribe(e(this,A))})}connectedCallback(){super.connectedCallback(),this.addEventListener("sourceCapture",()=>{D.ticker.subscribe(e(this,A)),this.hasAttribute("capture-autoplay")&&this.consumerElement.play()}),this.addEventListener("sourceRelease",()=>{this.hasAttribute("capture-autoplay")&&(this.consumerElement.pause(),this.hasAttribute("replay")&&(this.consumerElement.currentTime=0)),this.hasAttribute("reload-source")&&this.classList.remove("state-0","state-1","state-2","state-3","state-4")})}disconnectedCallback(){super.disconnectedCallback(),D.ticker.unsubscribe(e(this,A)),a(this,x,0)}createConsumer(){return document.createElement("video")}consumeSource(t){this.consumerElement.src=t||"",this.consumerElement.autoplay=!0}}x=new WeakMap,A=new WeakMap;customElements.get("e-video")||customElements.define("e-video",te);exports.ImageElement=Z;exports.SequenceElement=ee;exports.SourceElement=j;exports.VideoElement=te;
5
+ `,e(this,o).classList.add("source-consumer"),Array.from(this.attributes).forEach(i=>{if(i.name!=="srcset"){const c=i.nodeValue||"",b=de.kebabToCamel(i.name);b in e(this,o)&&(e(this,o)[b]=c||!0)}}),this.appendChild(e(this,o)),n(this,d,new ge.SourceManager({srcset:t})),n(this,f,this.hasAttribute("lazy")),e(this,d).subscribe(i=>{(!e(this,f)||e(this,f)&&e(this,_))&&x(this,z,K).call(this,i.current)}),e(this,q).observe(this),e(this,d).connect())}disconnectedCallback(){e(this,q).disconnect(),e(this,d).close(),e(this,o).onloadeddata=null,e(this,o).onload=null,e(this,o).onerror=null,e(this,o).remove(),e(this,u).reset(),clearTimeout(e(this,V))}}d=new WeakMap,o=new WeakMap,E=new WeakMap,_=new WeakMap,f=new WeakMap,$=new WeakMap,C=new WeakMap,u=new WeakMap,q=new WeakMap,V=new WeakMap,v=new WeakMap,z=new WeakSet,K=function(t){if(clearTimeout(e(this,V)),e(this,o).onloadeddata=null,e(this,o).onload=null,e(this,o).onerror=null,e(this,u).set("loaded",!1),e(this,u).set("error",!1),e(this,u).set("loading",!1),e(this,u).set("clear",!1),t){n(this,C,`${e(this,$)}-${t.url}`);const i=this.hasAttribute("keep-source-parameters");e(this,u).set("loading",!0),n(this,v,i?t.url:t.name+t.extension),this.consumeSource(e(this,v)),!e(this,f)&&!e(this,E)&&ie.loading.add(e(this,C)),e(this,o).onloadeddata=()=>{e(this,H).call(this)},e(this,o).onload=()=>{e(this,H).call(this)},e(this,o).onerror=()=>{e(this,Q).call(this,e(this,v))}}else n(this,v,null),this.consumeSource(null)},J=new WeakMap,H=new WeakMap,Q=new WeakMap;class me extends F{createConsumer(){return document.createElement("img")}consumeSource(r){if(r&&this.hasAttribute("webp")&&ye.device.isWebp){const t=r.split(".").slice(0,-1).join(".")+".webp";this.consumerElement.src=t}else this.consumerElement.src=r||""}}customElements.get("e-image")||customElements.define("e-image",me);function we(a){const r=a.match(/\{([\d-]+)\}/);if(r){const t=r[1].split("-");if(t.length===2){const i=parseInt(t[0],10),c=parseInt(t[1],10);return{start:i,end:c}}}return null}var p,R,U,S,w,I,A,O,y,L;class fe extends F{constructor(t){super();s(this,p,[]);s(this,R,new D.CSSProperty(this,"--fit","contain"));s(this,U,new D.CSSProperty(this,"--autoplay",!1));s(this,S,new D.CSSProperty(this,"--offset-x",.5));s(this,w,new D.CSSProperty(this,"--offset-y",.5));s(this,I,null);s(this,A,0);s(this,O,1);s(this,y,()=>{if(e(this,p).length){const t=e(this,p)[0];e(this,R).current==="cover"?n(this,I,ue.cover(t.naturalWidth,t.naturalHeight,this.consumerElement.width,this.consumerElement.height,e(this,S).current,e(this,w).current)):n(this,I,ue.contain(t.naturalWidth,t.naturalHeight,this.consumerElement.width,this.consumerElement.height,e(this,S).current,e(this,w).current))}});s(this,L,t=>{if(this.status.isFalse("loaded")||!e(this,I))return;t.detail.context.clearRect(0,0,t.detail.width,t.detail.height);const i=e(this,p)[e(this,A)];i&&t.detail.context.drawImage(i,...e(this,I)),e(this,U).current&&n(this,A,(e(this,A)+1)%e(this,p).length)});le.isBrowser&&(n(this,O,parseInt(((t==null?void 0:t.pad)||this.getAttribute("pad")||"1").toString())),e(this,R).subscribe(e(this,y)),e(this,S).subscribe(e(this,y)),e(this,w).subscribe(e(this,y)),this.addEventListener("sourceCapture",i=>{this.consumerElement.addEventListener("canvasRender",e(this,L))}),this.addEventListener("sourceRelease",i=>{this.consumerElement.removeEventListener("canvasRender",e(this,L))}))}setProgress(t){e(this,p).length&&n(this,A,Math.floor((e(this,p).length-1)*t))}connectedCallback(){super.connectedCallback(),e(this,U).observe(),e(this,R).observe(),e(this,S).observe(),e(this,w).observe(),ce.elementResizer.subscribe(this,e(this,y))}disconnectedCallback(){super.disconnectedCallback(),e(this,U).unobserve(),e(this,R).unobserve(),e(this,S).unobserve(),e(this,w).unobserve(),n(this,p,[]),ce.elementResizer.unsubscribe(e(this,y)),this.consumerElement.removeEventListener("canvasRender",e(this,L))}createConsumer(){return new ve.CanvasElement}consumeSource(t){return he(this,null,function*(){var i,c,b,N;if(t){this.consumerElement.removeEventListener("canvasRender",e(this,L));const g=[],m=we(t);if(m)for(let l=m.start;l<=m.end;l++){const ae=t.replace(/\{([^}]+)\}/,l.toString().padStart(e(this,O),"0")),j=new Image;j.src=ae,g.push(j)}else{const l=new Image;l.src=t,g.push(l)}try{yield Promise.all(g.map((l,ae)=>new Promise((j,be)=>{l.onload=()=>{j()},l.onerror=Le=>{be(`${l.src} Image not found`)}}))),n(this,p,g),e(this,y).call(this),(c=(i=this.consumerElement).onload)==null||c.call(i,new Event("load")),this.isLazy||this.consumerElement.addEventListener("canvasRender",e(this,L))}catch(l){console.error(l),(N=(b=this.consumerElement).onerror)==null||N.call(b,new Event("error"))}}})}}p=new WeakMap,R=new WeakMap,U=new WeakMap,S=new WeakMap,w=new WeakMap,I=new WeakMap,A=new WeakMap,O=new WeakMap,y=new WeakMap,L=new WeakMap;customElements.get("e-sequence")||customElements.define("e-sequence",fe);var P,B;class pe extends F{constructor(){super(...arguments);s(this,P,0);s(this,B,()=>{this.classList.add(`state-${this.consumerElement.readyState}`);const t=this.consumerElement.readyState/4;t>e(this,P)&&n(this,P,t),X.dispatchEvent(this,"videoReadyStateChange",{detail:{readyState:this.consumerElement.readyState,progress:e(this,P)}}),this.consumerElement.readyState===4&&re.ticker.unsubscribe(e(this,B))})}connectedCallback(){super.connectedCallback(),this.addEventListener("sourceCapture",()=>{re.ticker.subscribe(e(this,B)),this.hasAttribute("capture-autoplay")&&this.consumerElement.play()}),this.addEventListener("sourceRelease",()=>{this.hasAttribute("capture-autoplay")&&(this.consumerElement.pause(),this.hasAttribute("replay")&&(this.consumerElement.currentTime=0)),this.hasAttribute("reload-source")&&this.classList.remove("state-0","state-1","state-2","state-3","state-4")})}disconnectedCallback(){super.disconnectedCallback(),re.ticker.unsubscribe(e(this,B)),n(this,P,0)}createConsumer(){return document.createElement("video")}consumeSource(t){this.consumerElement.src=t||"",this.consumerElement.autoplay=!0}}P=new WeakMap,B=new WeakMap;customElements.get("e-video")||customElements.define("e-video",pe);var h,M,k,W,Z,ee,te,Y,ne;const T=class T extends F{constructor(){super();s(this,Y);s(this,h);s(this,M);s(this,k,!1);s(this,W,()=>{n(this,k,this.hasAttribute("autoplay")&&!this.hasAttribute("capture-autoplay")),n(this,h,new window.YT.Player(e(this,M),{playerVars:{mute:this.hasAttribute("muted")?1:0,controls:this.hasAttribute("controls")?1:0},events:{onReady:e(this,Z),onError:e(this,ee),onStateChange:e(this,te)}}))});s(this,Z,()=>{x(this,Y,ne).call(this)});s(this,ee,t=>{var i,c;console.error("YouTube: Ошибка при загрузке видео:",this.currentURL,t),(c=(i=this.consumerElement).onerror)==null||c.call(i,new Event("error"))});s(this,te,()=>{});n(this,M,"yt-"+de.generateId(10)),T.__apiReady||(window.onYouTubeIframeAPIReady=()=>{T.__apiReady=!0,X.dispatchEvent(window,"youTubeIframeAPIReady")}),this.addEventListener("sourceCapture",()=>{this.hasAttribute("capture-autoplay")&&(e(this,h)?e(this,h).playVideo():n(this,k,!0))}),this.addEventListener("sourceRelease",()=>{e(this,h)&&this.hasAttribute("capture-autoplay")&&(e(this,h).pauseVideo(),this.hasAttribute("replay")&&e(this,h).seekTo(0))})}static __onYouTubeIframeAPIReady(){this.__apiReady=!0}createConsumer(){const t=document.createElement("div");return t.id=e(this,M),t}consumeSource(t){var i;if(t){if(!document.getElementById("youtube-script")){const c=document.createElement("script");c.id,c.src="https://www.youtube.com/iframe_api";const b=document.getElementsByTagName("script")[0];(i=b.parentNode)==null||i.insertBefore(c,b)}e(this,h)?x(this,Y,ne).call(this):T.__apiReady?e(this,W).call(this):addEventListener("youTubeIframeAPIReady",e(this,W))}else e(this,h)&&e(this,h).stopVideo()}disconnectedCallback(){super.disconnectedCallback(),e(this,h)&&e(this,h).destroy(),removeEventListener("youTubeIframeAPIReady",e(this,W))}};h=new WeakMap,M=new WeakMap,k=new WeakMap,W=new WeakMap,Z=new WeakMap,ee=new WeakMap,te=new WeakMap,Y=new WeakSet,ne=function(){var t,i;this.currentURL&&(this.currentURL.startsWith("http")?e(this,h).loadVideoByUrl(this.currentURL):e(this,h).loadVideoById(this.currentURL)),e(this,k)?e(this,h).playVideo():e(this,h).stopVideo(),n(this,k,!1),(i=(t=this.consumerElement).onload)==null||i.call(t,new Event("load"))},T.__apiReady=!1;let G=T;customElements.get("e-youtube")||customElements.define("e-youtube",G);exports.ImageElement=me;exports.SequenceElement=fe;exports.SourceElement=F;exports.VideoElement=pe;exports.YouTubeElement=G;
@@ -2,3 +2,4 @@ export { ImageElement } from './image';
2
2
  export { SequenceElement, type SequenceElementParameters } from './sequence';
3
3
  export { SourceElement, type SourceEvents } from './source';
4
4
  export { VideoElement, type VideoEvents } from './video';
5
+ export { YouTubeElement } from './youtube';
@@ -1,279 +1,287 @@
1
- var Y = (r) => {
2
- throw TypeError(r);
1
+ var oe = (a) => {
2
+ throw TypeError(a);
3
3
  };
4
- var V = (r, s, t) => s.has(r) || Y("Cannot " + t);
5
- var e = (r, s, t) => (V(r, s, "read from private field"), t ? t.call(r) : s.get(r)), i = (r, s, t) => s.has(r) ? Y("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(r) : s.set(r, t), a = (r, s, t, n) => (V(r, s, "write to private field"), n ? n.call(r, t) : s.set(r, t), t), q = (r, s, t) => (V(r, s, "access private method"), t);
6
- var G = (r, s, t) => new Promise((n, l) => {
7
- var S = (m) => {
4
+ var te = (a, r, t) => r.has(a) || oe("Cannot " + t);
5
+ var e = (a, r, t) => (te(a, r, "read from private field"), t ? t.call(a) : r.get(a)), s = (a, r, t) => r.has(a) ? oe("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(a) : r.set(a, t), n = (a, r, t, i) => (te(a, r, "write to private field"), i ? i.call(a, t) : r.set(a, t), t), T = (a, r, t) => (te(a, r, "access private method"), t);
6
+ var he = (a, r, t) => new Promise((i, c) => {
7
+ var b = (m) => {
8
8
  try {
9
- b(t.next(m));
10
- } catch (h) {
11
- l(h);
9
+ g(t.next(m));
10
+ } catch (l) {
11
+ c(l);
12
12
  }
13
- }, T = (m) => {
13
+ }, O = (m) => {
14
14
  try {
15
- b(t.throw(m));
16
- } catch (h) {
17
- l(h);
15
+ g(t.throw(m));
16
+ } catch (l) {
17
+ c(l);
18
18
  }
19
- }, b = (m) => m.done ? n(m.value) : Promise.resolve(m.value).then(S, T);
20
- b((t = t.apply(r, s)).next());
19
+ }, g = (m) => m.done ? i(m.value) : Promise.resolve(m.value).then(b, O);
20
+ g((t = t.apply(a, r)).next());
21
21
  });
22
- import { device as _ } from "../device/index.js";
23
- import { SourceManager as ee } from "../source/index.js";
24
- import { ClassLinkedStatus as te } from "../class-linked-status/index.js";
25
- import { i as Q } from "../browser-0zX67oeU.js";
22
+ import { device as de } from "../device/index.js";
23
+ import { SourceManager as me } from "../source/index.js";
24
+ import { ClassLinkedStatus as fe } from "../class-linked-status/index.js";
25
+ import { i as ue } from "../browser-0zX67oeU.js";
26
26
  import { d as K } from "../events-CsVF98U6.js";
27
- import { k as se } from "../string-f0Dnk0L1.js";
28
- import { loading as j } from "../loading/index.js";
29
- import { CSSProperty as B } from "../css-property/index.js";
30
- import { elementResizer as J } from "../element-resizer/vanilla/index.js";
31
- import { c as ie, a as re } from "../canvas-DeZ0SLUJ.js";
32
- import { CanvasElement as ne } from "../canvas/index.js";
33
- import { ticker as D } from "../ticker/vanilla/index.js";
34
- let oe = 0;
35
- var u, o, g, x, d, M, C, c, A, R, O, F, $, U;
36
- class N extends HTMLElement {
27
+ import { k as pe, g as be } from "../string-f0Dnk0L1.js";
28
+ import { loading as se } from "../loading/index.js";
29
+ import { CSSProperty as D } from "../css-property/index.js";
30
+ import { elementResizer as ce } from "../element-resizer/vanilla/index.js";
31
+ import { c as ye, a as ge } from "../canvas-DeZ0SLUJ.js";
32
+ import { CanvasElement as Ee } from "../canvas/index.js";
33
+ import { ticker as ie } from "../ticker/vanilla/index.js";
34
+ let ve = 0;
35
+ var d, o, E, V, f, H, S, u, U, z, v, _, j, X, q, G;
36
+ class ee extends HTMLElement {
37
37
  constructor() {
38
38
  super();
39
- i(this, R);
40
- i(this, u, null);
41
- i(this, o, null);
42
- i(this, g, !1);
43
- i(this, x, !1);
44
- i(this, d, !1);
45
- i(this, M, "");
46
- i(this, C, "");
47
- i(this, c, new te(this, {
39
+ s(this, _);
40
+ s(this, d, null);
41
+ s(this, o, null);
42
+ s(this, E, !1);
43
+ s(this, V, !1);
44
+ s(this, f, !1);
45
+ s(this, H, "");
46
+ s(this, S, "");
47
+ s(this, u, new fe(this, {
48
48
  loading: !1,
49
49
  loaded: !1,
50
- error: !1
50
+ error: !1,
51
+ clear: !1
51
52
  }));
52
- i(this, A, null);
53
- i(this, F, (t) => {
54
- const n = t[0];
55
- e(this, d) && (!e(this, x) || this.hasAttribute("reload-source")) && n.isIntersecting && this.triggerLazyLoad(), n.isIntersecting ? K(this, "sourceCapture", { custom: !0 }) : (this.hasAttribute("reload-source") && q(this, R, O).call(this, void 0), K(this, "sourceRelease", { custom: !0 }));
53
+ s(this, U, null);
54
+ s(this, z);
55
+ s(this, v, null);
56
+ s(this, X, (t) => {
57
+ const i = t[0];
58
+ e(this, f) && (!e(this, V) || this.hasAttribute("reload-source")) && i.isIntersecting && this.triggerLazyLoad(), i.isIntersecting ? K(this, "sourceCapture", { custom: !0 }) : (this.hasAttribute("reload-source") && T(this, _, j).call(this, void 0), K(this, "sourceRelease", { custom: !0 }));
56
59
  });
57
- i(this, $, () => {
58
- e(this, c).set("loaded", !0), e(this, c).set("error", !1), e(this, c).set("loading", !1), !e(this, d) && !e(this, g) && j.complete(e(this, C)), a(this, g, !0);
60
+ s(this, q, () => {
61
+ e(this, u).set("loaded", !0), e(this, u).set("error", !1), e(this, u).set("loading", !1), !e(this, f) && !e(this, E) && se.complete(e(this, S));
62
+ const t = getComputedStyle(this).getPropertyValue("--clear-duration");
63
+ t && n(this, z, setTimeout(() => {
64
+ e(this, u).set("clear", !0);
65
+ }, parseFloat(t) * 1e3)), n(this, E, !0);
59
66
  });
60
- i(this, U, (t) => {
61
- e(this, c).set("loaded", !1), e(this, c).set("error", !0), e(this, c).set("loading", !1), !e(this, d) && !e(this, g) && j.error(e(this, C)), a(this, g, !0);
67
+ s(this, G, (t) => {
68
+ e(this, u).set("loaded", !1), e(this, u).set("error", !0), e(this, u).set("loading", !1), !e(this, f) && !e(this, E) && se.error(e(this, S)), n(this, E, !0);
62
69
  });
63
- Q && window.IntersectionObserver && (a(this, M, `source-consumer-${++oe}`), a(this, A, new IntersectionObserver(
64
- e(this, F)
70
+ ue && window.IntersectionObserver && (n(this, H, `source-consumer-${++ve}`), n(this, U, new IntersectionObserver(
71
+ e(this, X)
65
72
  )));
66
73
  }
67
74
  get consumerElement() {
68
75
  return e(this, o);
69
76
  }
70
77
  get sourceManager() {
71
- return e(this, u);
78
+ return e(this, d);
72
79
  }
73
80
  get status() {
74
- return e(this, c);
81
+ return e(this, u);
75
82
  }
76
83
  get isLazy() {
77
- return e(this, d);
84
+ return e(this, f);
85
+ }
86
+ get currentURL() {
87
+ return e(this, v);
78
88
  }
79
89
  triggerLazyLoad() {
80
- e(this, u).current && e(this, u).current !== e(this, u).previous && q(this, R, O).call(this, e(this, u).current), a(this, x, !0);
90
+ e(this, d).current && e(this, d).current !== e(this, d).previous && T(this, _, j).call(this, e(this, d).current), n(this, V, !0);
81
91
  }
82
92
  connectedCallback() {
83
93
  const t = this.getAttribute("srcset");
84
- t && (a(this, o, this.createConsumer()), e(this, o).style.cssText = `
94
+ t && (n(this, o, this.createConsumer()), e(this, o).style.cssText = `
85
95
  display: block;
86
96
  width: 100%;
87
97
  height: 100%;
88
- `, e(this, o).classList.add("source-consumer"), Array.from(this.attributes).forEach((n) => {
89
- if (n.name !== "srcset") {
90
- const l = n.nodeValue || "", S = se(n.name);
91
- S in e(this, o) && (e(this, o)[S] = l || !0);
98
+ `, e(this, o).classList.add("source-consumer"), Array.from(this.attributes).forEach((i) => {
99
+ if (i.name !== "srcset") {
100
+ const c = i.nodeValue || "", b = pe(i.name);
101
+ b in e(this, o) && (e(this, o)[b] = c || !0);
92
102
  }
93
- }), this.appendChild(e(this, o)), a(this, u, new ee({
103
+ }), this.appendChild(e(this, o)), n(this, d, new me({
94
104
  srcset: t
95
- })), a(this, d, this.hasAttribute("lazy")), e(this, u).subscribe((n) => {
96
- (!e(this, d) || e(this, d) && e(this, x)) && q(this, R, O).call(this, n.current);
97
- }), e(this, A).observe(this), e(this, u).connect());
105
+ })), n(this, f, this.hasAttribute("lazy")), e(this, d).subscribe((i) => {
106
+ (!e(this, f) || e(this, f) && e(this, V)) && T(this, _, j).call(this, i.current);
107
+ }), e(this, U).observe(this), e(this, d).connect());
98
108
  }
99
109
  disconnectedCallback() {
100
- e(this, A).disconnect(), e(this, u).close(), e(this, o).onloadeddata = null, e(this, o).onload = null, e(this, o).onerror = null, e(this, o).remove(), e(this, c).reset();
110
+ e(this, U).disconnect(), e(this, d).close(), e(this, o).onloadeddata = null, e(this, o).onload = null, e(this, o).onerror = null, e(this, o).remove(), e(this, u).reset(), clearTimeout(e(this, z));
101
111
  }
102
112
  }
103
- u = new WeakMap(), o = new WeakMap(), g = new WeakMap(), x = new WeakMap(), d = new WeakMap(), M = new WeakMap(), C = new WeakMap(), c = new WeakMap(), A = new WeakMap(), R = new WeakSet(), O = function(t) {
104
- if (e(this, o).onloadeddata = null, e(this, o).onload = null, e(this, o).onerror = null, e(this, c).set("loaded", !1), e(this, c).set("error", !1), e(this, c).set("loading", !1), t) {
105
- a(this, C, `${e(this, M)}-${t.url}`);
106
- const n = this.hasAttribute("keep-source-parameters");
107
- e(this, c).set("loading", !0);
108
- const l = n ? t.url : t.name + t.extension;
109
- this.consumeSource(l), !e(this, d) && !e(this, g) && j.add(e(this, C)), e(this, o).onloadeddata = () => {
110
- e(this, $).call(this);
113
+ d = new WeakMap(), o = new WeakMap(), E = new WeakMap(), V = new WeakMap(), f = new WeakMap(), H = new WeakMap(), S = new WeakMap(), u = new WeakMap(), U = new WeakMap(), z = new WeakMap(), v = new WeakMap(), _ = new WeakSet(), j = function(t) {
114
+ if (clearTimeout(e(this, z)), e(this, o).onloadeddata = null, e(this, o).onload = null, e(this, o).onerror = null, e(this, u).set("loaded", !1), e(this, u).set("error", !1), e(this, u).set("loading", !1), e(this, u).set("clear", !1), t) {
115
+ n(this, S, `${e(this, H)}-${t.url}`);
116
+ const i = this.hasAttribute("keep-source-parameters");
117
+ e(this, u).set("loading", !0), n(this, v, i ? t.url : t.name + t.extension), this.consumeSource(e(this, v)), !e(this, f) && !e(this, E) && se.add(e(this, S)), e(this, o).onloadeddata = () => {
118
+ e(this, q).call(this);
111
119
  }, e(this, o).onload = () => {
112
- e(this, $).call(this);
120
+ e(this, q).call(this);
113
121
  }, e(this, o).onerror = () => {
114
- e(this, U).call(this, l);
122
+ e(this, G).call(this, e(this, v));
115
123
  };
116
124
  } else
117
- this.consumeSource(null);
118
- }, F = new WeakMap(), $ = new WeakMap(), U = new WeakMap();
119
- class ae extends N {
125
+ n(this, v, null), this.consumeSource(null);
126
+ }, X = new WeakMap(), q = new WeakMap(), G = new WeakMap();
127
+ class we extends ee {
120
128
  createConsumer() {
121
129
  return document.createElement("img");
122
130
  }
123
- consumeSource(s) {
124
- if (s && this.hasAttribute("webp") && _.isWebp) {
125
- const t = s.split(".").slice(0, -1).join(".") + ".webp";
131
+ consumeSource(r) {
132
+ if (r && this.hasAttribute("webp") && de.isWebp) {
133
+ const t = r.split(".").slice(0, -1).join(".") + ".webp";
126
134
  this.consumerElement.src = t;
127
135
  } else
128
- this.consumerElement.src = s || "";
136
+ this.consumerElement.src = r || "";
129
137
  }
130
138
  }
131
- customElements.get("e-image") || customElements.define("e-image", ae);
132
- function he(r) {
133
- const s = r.match(/\{([\d-]+)\}/);
134
- if (s) {
135
- const t = s[1].split("-");
139
+ customElements.get("e-image") || customElements.define("e-image", we);
140
+ function Le(a) {
141
+ const r = a.match(/\{([\d-]+)\}/);
142
+ if (r) {
143
+ const t = r[1].split("-");
136
144
  if (t.length === 2) {
137
- const n = parseInt(t[0], 10), l = parseInt(t[1], 10);
138
- return { start: n, end: l };
145
+ const i = parseInt(t[0], 10), c = parseInt(t[1], 10);
146
+ return { start: i, end: c };
139
147
  }
140
148
  }
141
149
  return null;
142
150
  }
143
- var f, w, P, E, v, L, k, H, p, y;
144
- class ce extends N {
151
+ var p, R, B, w, L, I, A, F, y, C;
152
+ class Ce extends ee {
145
153
  constructor(t) {
146
154
  super();
147
- i(this, f, []);
148
- i(this, w, new B(
155
+ s(this, p, []);
156
+ s(this, R, new D(
149
157
  this,
150
158
  "--fit",
151
159
  "contain"
152
160
  ));
153
- i(this, P, new B(this, "--autoplay", !1));
154
- i(this, E, new B(this, "--offset-x", 0.5));
155
- i(this, v, new B(this, "--offset-y", 0.5));
156
- i(this, L, null);
157
- i(this, k, 0);
158
- i(this, H, 1);
159
- i(this, p, () => {
160
- if (e(this, f).length) {
161
- const t = e(this, f)[0];
162
- e(this, w).current === "cover" ? a(this, L, ie(
161
+ s(this, B, new D(this, "--autoplay", !1));
162
+ s(this, w, new D(this, "--offset-x", 0.5));
163
+ s(this, L, new D(this, "--offset-y", 0.5));
164
+ s(this, I, null);
165
+ s(this, A, 0);
166
+ s(this, F, 1);
167
+ s(this, y, () => {
168
+ if (e(this, p).length) {
169
+ const t = e(this, p)[0];
170
+ e(this, R).current === "cover" ? n(this, I, ye(
163
171
  t.naturalWidth,
164
172
  t.naturalHeight,
165
173
  this.consumerElement.width,
166
174
  this.consumerElement.height,
167
- e(this, E).current,
168
- e(this, v).current
169
- )) : a(this, L, re(
175
+ e(this, w).current,
176
+ e(this, L).current
177
+ )) : n(this, I, ge(
170
178
  t.naturalWidth,
171
179
  t.naturalHeight,
172
180
  this.consumerElement.width,
173
181
  this.consumerElement.height,
174
- e(this, E).current,
175
- e(this, v).current
182
+ e(this, w).current,
183
+ e(this, L).current
176
184
  ));
177
185
  }
178
186
  });
179
- i(this, y, (t) => {
180
- if (this.status.isFalse("loaded") || !e(this, L))
187
+ s(this, C, (t) => {
188
+ if (this.status.isFalse("loaded") || !e(this, I))
181
189
  return;
182
190
  t.detail.context.clearRect(0, 0, t.detail.width, t.detail.height);
183
- const n = e(this, f)[e(this, k)];
184
- n && t.detail.context.drawImage(n, ...e(this, L)), e(this, P).current && a(this, k, (e(this, k) + 1) % e(this, f).length);
191
+ const i = e(this, p)[e(this, A)];
192
+ i && t.detail.context.drawImage(i, ...e(this, I)), e(this, B).current && n(this, A, (e(this, A) + 1) % e(this, p).length);
185
193
  });
186
- Q && (a(this, H, parseInt(
194
+ ue && (n(this, F, parseInt(
187
195
  ((t == null ? void 0 : t.pad) || this.getAttribute("pad") || "1").toString()
188
- )), e(this, w).subscribe(e(this, p)), e(this, E).subscribe(e(this, p)), e(this, v).subscribe(e(this, p)), this.addEventListener("sourceCapture", (n) => {
196
+ )), e(this, R).subscribe(e(this, y)), e(this, w).subscribe(e(this, y)), e(this, L).subscribe(e(this, y)), this.addEventListener("sourceCapture", (i) => {
189
197
  this.consumerElement.addEventListener(
190
198
  "canvasRender",
191
- e(this, y)
199
+ e(this, C)
192
200
  );
193
- }), this.addEventListener("sourceRelease", (n) => {
201
+ }), this.addEventListener("sourceRelease", (i) => {
194
202
  this.consumerElement.removeEventListener(
195
203
  "canvasRender",
196
- e(this, y)
204
+ e(this, C)
197
205
  );
198
206
  }));
199
207
  }
200
208
  setProgress(t) {
201
- e(this, f).length && a(this, k, Math.floor((e(this, f).length - 1) * t));
209
+ e(this, p).length && n(this, A, Math.floor((e(this, p).length - 1) * t));
202
210
  }
203
211
  connectedCallback() {
204
- super.connectedCallback(), e(this, P).observe(), e(this, w).observe(), e(this, E).observe(), e(this, v).observe(), J.subscribe(this, e(this, p));
212
+ super.connectedCallback(), e(this, B).observe(), e(this, R).observe(), e(this, w).observe(), e(this, L).observe(), ce.subscribe(this, e(this, y));
205
213
  }
206
214
  disconnectedCallback() {
207
- super.disconnectedCallback(), e(this, P).unobserve(), e(this, w).unobserve(), e(this, E).unobserve(), e(this, v).unobserve(), a(this, f, []), J.unsubscribe(e(this, p)), this.consumerElement.removeEventListener(
215
+ super.disconnectedCallback(), e(this, B).unobserve(), e(this, R).unobserve(), e(this, w).unobserve(), e(this, L).unobserve(), n(this, p, []), ce.unsubscribe(e(this, y)), this.consumerElement.removeEventListener(
208
216
  "canvasRender",
209
- e(this, y)
217
+ e(this, C)
210
218
  );
211
219
  }
212
220
  createConsumer() {
213
- return new ne();
221
+ return new Ee();
214
222
  }
215
223
  consumeSource(t) {
216
- return G(this, null, function* () {
217
- var n, l, S, T;
224
+ return he(this, null, function* () {
225
+ var i, c, b, O;
218
226
  if (t) {
219
227
  this.consumerElement.removeEventListener(
220
228
  "canvasRender",
221
- e(this, y)
229
+ e(this, C)
222
230
  );
223
- const b = [], m = he(t);
231
+ const g = [], m = Le(t);
224
232
  if (m)
225
- for (let h = m.start; h <= m.end; h++) {
226
- const X = t.replace(
233
+ for (let l = m.start; l <= m.end; l++) {
234
+ const ae = t.replace(
227
235
  /\{([^}]+)\}/,
228
- h.toString().padStart(e(this, H), "0")
229
- ), W = new Image();
230
- W.src = X, b.push(W);
236
+ l.toString().padStart(e(this, F), "0")
237
+ ), Y = new Image();
238
+ Y.src = ae, g.push(Y);
231
239
  }
232
240
  else {
233
- const h = new Image();
234
- h.src = t, b.push(h);
241
+ const l = new Image();
242
+ l.src = t, g.push(l);
235
243
  }
236
244
  try {
237
245
  yield Promise.all(
238
- b.map((h, X) => new Promise((W, Z) => {
239
- h.onload = () => {
240
- W();
241
- }, h.onerror = (ue) => {
242
- Z(`${h.src} Image not found`);
246
+ g.map((l, ae) => new Promise((Y, le) => {
247
+ l.onload = () => {
248
+ Y();
249
+ }, l.onerror = (Re) => {
250
+ le(`${l.src} Image not found`);
243
251
  };
244
252
  }))
245
- ), a(this, f, b), e(this, p).call(this), (l = (n = this.consumerElement).onload) == null || l.call(n, new Event("load")), this.isLazy || this.consumerElement.addEventListener(
253
+ ), n(this, p, g), e(this, y).call(this), (c = (i = this.consumerElement).onload) == null || c.call(i, new Event("load")), this.isLazy || this.consumerElement.addEventListener(
246
254
  "canvasRender",
247
- e(this, y)
255
+ e(this, C)
248
256
  );
249
- } catch (h) {
250
- console.error(h), (T = (S = this.consumerElement).onerror) == null || T.call(S, new Event("error"));
257
+ } catch (l) {
258
+ console.error(l), (O = (b = this.consumerElement).onerror) == null || O.call(b, new Event("error"));
251
259
  }
252
260
  }
253
261
  });
254
262
  }
255
263
  }
256
- f = new WeakMap(), w = new WeakMap(), P = new WeakMap(), E = new WeakMap(), v = new WeakMap(), L = new WeakMap(), k = new WeakMap(), H = new WeakMap(), p = new WeakMap(), y = new WeakMap();
257
- customElements.get("e-sequence") || customElements.define("e-sequence", ce);
258
- var I, z;
259
- class le extends N {
264
+ p = new WeakMap(), R = new WeakMap(), B = new WeakMap(), w = new WeakMap(), L = new WeakMap(), I = new WeakMap(), A = new WeakMap(), F = new WeakMap(), y = new WeakMap(), C = new WeakMap();
265
+ customElements.get("e-sequence") || customElements.define("e-sequence", Ce);
266
+ var k, M;
267
+ class Se extends ee {
260
268
  constructor() {
261
269
  super(...arguments);
262
- i(this, I, 0);
263
- i(this, z, () => {
270
+ s(this, k, 0);
271
+ s(this, M, () => {
264
272
  this.classList.add(`state-${this.consumerElement.readyState}`);
265
273
  const t = this.consumerElement.readyState / 4;
266
- t > e(this, I) && a(this, I, t), K(this, "videoReadyStateChange", {
274
+ t > e(this, k) && n(this, k, t), K(this, "videoReadyStateChange", {
267
275
  detail: {
268
276
  readyState: this.consumerElement.readyState,
269
- progress: e(this, I)
277
+ progress: e(this, k)
270
278
  }
271
- }), this.consumerElement.readyState === 4 && D.unsubscribe(e(this, z));
279
+ }), this.consumerElement.readyState === 4 && ie.unsubscribe(e(this, M));
272
280
  });
273
281
  }
274
282
  connectedCallback() {
275
283
  super.connectedCallback(), this.addEventListener("sourceCapture", () => {
276
- D.subscribe(e(this, z)), this.hasAttribute("capture-autoplay") && this.consumerElement.play();
284
+ ie.subscribe(e(this, M)), this.hasAttribute("capture-autoplay") && this.consumerElement.play();
277
285
  }), this.addEventListener("sourceRelease", () => {
278
286
  this.hasAttribute("capture-autoplay") && (this.consumerElement.pause(), this.hasAttribute("replay") && (this.consumerElement.currentTime = 0)), this.hasAttribute("reload-source") && this.classList.remove(
279
287
  "state-0",
@@ -285,7 +293,7 @@ class le extends N {
285
293
  });
286
294
  }
287
295
  disconnectedCallback() {
288
- super.disconnectedCallback(), D.unsubscribe(e(this, z)), a(this, I, 0);
296
+ super.disconnectedCallback(), ie.unsubscribe(e(this, M)), n(this, k, 0);
289
297
  }
290
298
  createConsumer() {
291
299
  return document.createElement("video");
@@ -294,11 +302,79 @@ class le extends N {
294
302
  this.consumerElement.src = t || "", this.consumerElement.autoplay = !0;
295
303
  }
296
304
  }
297
- I = new WeakMap(), z = new WeakMap();
298
- customElements.get("e-video") || customElements.define("e-video", le);
305
+ k = new WeakMap(), M = new WeakMap();
306
+ customElements.get("e-video") || customElements.define("e-video", Se);
307
+ var h, W, P, $, J, Q, Z, N, ne;
308
+ const x = class x extends ee {
309
+ constructor() {
310
+ super();
311
+ s(this, N);
312
+ s(this, h);
313
+ s(this, W);
314
+ s(this, P, !1);
315
+ s(this, $, () => {
316
+ n(this, P, this.hasAttribute("autoplay") && !this.hasAttribute("capture-autoplay")), n(this, h, new window.YT.Player(e(this, W), {
317
+ playerVars: {
318
+ mute: this.hasAttribute("muted") ? 1 : 0,
319
+ controls: this.hasAttribute("controls") ? 1 : 0
320
+ },
321
+ events: {
322
+ onReady: e(this, J),
323
+ onError: e(this, Q),
324
+ onStateChange: e(this, Z)
325
+ }
326
+ }));
327
+ });
328
+ s(this, J, () => {
329
+ T(this, N, ne).call(this);
330
+ });
331
+ s(this, Q, (t) => {
332
+ var i, c;
333
+ console.error("YouTube: Ошибка при загрузке видео:", this.currentURL, t), (c = (i = this.consumerElement).onerror) == null || c.call(i, new Event("error"));
334
+ });
335
+ s(this, Z, () => {
336
+ });
337
+ n(this, W, "yt-" + be(10)), x.__apiReady || (window.onYouTubeIframeAPIReady = () => {
338
+ x.__apiReady = !0, K(window, "youTubeIframeAPIReady");
339
+ }), this.addEventListener("sourceCapture", () => {
340
+ this.hasAttribute("capture-autoplay") && (e(this, h) ? e(this, h).playVideo() : n(this, P, !0));
341
+ }), this.addEventListener("sourceRelease", () => {
342
+ e(this, h) && this.hasAttribute("capture-autoplay") && (e(this, h).pauseVideo(), this.hasAttribute("replay") && e(this, h).seekTo(0));
343
+ });
344
+ }
345
+ static __onYouTubeIframeAPIReady() {
346
+ this.__apiReady = !0;
347
+ }
348
+ createConsumer() {
349
+ const t = document.createElement("div");
350
+ return t.id = e(this, W), t;
351
+ }
352
+ consumeSource(t) {
353
+ var i;
354
+ if (t) {
355
+ if (!document.getElementById("youtube-script")) {
356
+ const c = document.createElement("script");
357
+ c.id, c.src = "https://www.youtube.com/iframe_api";
358
+ const b = document.getElementsByTagName("script")[0];
359
+ (i = b.parentNode) == null || i.insertBefore(c, b);
360
+ }
361
+ e(this, h) ? T(this, N, ne).call(this) : x.__apiReady ? e(this, $).call(this) : addEventListener("youTubeIframeAPIReady", e(this, $));
362
+ } else e(this, h) && e(this, h).stopVideo();
363
+ }
364
+ disconnectedCallback() {
365
+ super.disconnectedCallback(), e(this, h) && e(this, h).destroy(), removeEventListener("youTubeIframeAPIReady", e(this, $));
366
+ }
367
+ };
368
+ h = new WeakMap(), W = new WeakMap(), P = new WeakMap(), $ = new WeakMap(), J = new WeakMap(), Q = new WeakMap(), Z = new WeakMap(), N = new WeakSet(), ne = function() {
369
+ var t, i;
370
+ this.currentURL && (this.currentURL.startsWith("http") ? e(this, h).loadVideoByUrl(this.currentURL) : e(this, h).loadVideoById(this.currentURL)), e(this, P) ? e(this, h).playVideo() : e(this, h).stopVideo(), n(this, P, !1), (i = (t = this.consumerElement).onload) == null || i.call(t, new Event("load"));
371
+ }, x.__apiReady = !1;
372
+ let re = x;
373
+ customElements.get("e-youtube") || customElements.define("e-youtube", re);
299
374
  export {
300
- ae as ImageElement,
301
- ce as SequenceElement,
302
- N as SourceElement,
303
- le as VideoElement
375
+ we as ImageElement,
376
+ Ce as SequenceElement,
377
+ ee as SourceElement,
378
+ Se as VideoElement,
379
+ re as YouTubeElement
304
380
  };
@@ -14,8 +14,10 @@ export declare abstract class SourceElement<T extends HTMLElement> extends HTMLE
14
14
  loading: false;
15
15
  loaded: false;
16
16
  error: false;
17
+ clear: false;
17
18
  }>;
18
19
  get isLazy(): boolean;
20
+ get currentURL(): string | null;
19
21
  triggerLazyLoad(): void;
20
22
  protected abstract createConsumer(): T;
21
23
  protected abstract consumeSource(url: string | null): void;
@@ -0,0 +1,23 @@
1
+ import { SourceElement } from '../source';
2
+
3
+ export declare class YouTubeElement extends SourceElement<HTMLDivElement> {
4
+ #private;
5
+ static __apiReady: boolean;
6
+ static __onYouTubeIframeAPIReady(): void;
7
+ constructor();
8
+ protected createConsumer(): HTMLDivElement;
9
+ protected consumeSource(id: string | null): void;
10
+ protected disconnectedCallback(): void;
11
+ }
12
+ declare global {
13
+ interface Window {
14
+ onYouTubeIframeAPIReady: () => void;
15
+ YT: any;
16
+ }
17
+ interface WindowEventMap {
18
+ youTubeIframeAPIReady: CustomEvent;
19
+ }
20
+ interface HTMLElementTagNameMap {
21
+ 'e-youtube': YouTubeElement;
22
+ }
23
+ }
@@ -1 +1 @@
1
- "use strict";var b=a=>{throw TypeError(a)};var T=(a,e,t)=>e.has(a)||b("Cannot "+t);var s=(a,e,t)=>(T(a,e,"read from private field"),t?t.call(a):e.get(a)),o=(a,e,t)=>e.has(a)?b("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(a):e.set(a,t),n=(a,e,t,r)=>(T(a,e,"write to private field"),r?r.call(a,t):e.set(a,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("../order/index.cjs"),_=require("../window-resizer/vanilla/index.cjs"),B=require("../Store-CDb6RMce.cjs");var g,f,q,d,c,u,w;class k{constructor(e){o(this,g);o(this,f);o(this,q);o(this,d);o(this,c);o(this,u);o(this,w);n(this,g,e);const t=e.indexOf("?");t>=0&&(e=e.slice(0,t));const r=e.split(".");n(this,f,r.slice(0,-1).join("."));const x=/\d+x/g,h=r.find(m=>m.match(x));n(this,q,h?parseInt(h):1);const y=/\d+max/g,S=/\d+min/g,i=/\d+mar/g,l=/\d+mir/g,E=r.find(m=>m.match(y)),I=r.find(m=>m.match(S)),V=r.find(m=>m.match(i)),$=r.find(m=>m.match(l));V?(n(this,c,parseInt(V)),n(this,u,"max"),n(this,d,`(max-aspect-ratio: ${s(this,c)})`)):$?(n(this,c,parseInt($)),n(this,u,"max"),n(this,d,`(min-aspect-ratio: ${s(this,c)})`)):E?(n(this,c,parseInt(E)),n(this,u,"max"),n(this,d,`(max-width: ${s(this,c)}px)`)):I?(n(this,c,parseInt(I)),n(this,d,`(min-width: ${s(this,c)}px)`),n(this,u,"min")):(n(this,c,0),n(this,d,`(min-width: ${s(this,c)}px)`),n(this,u,"min")),n(this,f,s(this,f).replace(`.${s(this,c)}${s(this,u)}`,"")),n(this,w,"."+r[r.length-1])}get url(){return s(this,g)}get name(){return s(this,f)}get density(){return s(this,q)}get query(){return s(this,d)}get extension(){return s(this,w)}get queryType(){return s(this,u)}get queryValue(){return s(this,c)}}g=new WeakMap,f=new WeakMap,q=new WeakMap,d=new WeakMap,c=new WeakMap,u=new WeakMap,w=new WeakMap;var p;class z{constructor(e){o(this,p);n(this,p,new Map);const t=typeof e=="string"?e.trim().split(",").map(i=>i.trim()).filter(i=>!!i):e,r=[];t.forEach(i=>{const l=new k(i);r.push([l.query,l])});const x=r.filter(i=>i[1].queryType.includes("max")).sort((i,l)=>l[1].queryValue-i[1].queryValue),h=r.filter(i=>i[1].queryType.includes("min")&&i[1].queryValue!==0).sort((i,l)=>i[1].queryValue-l[1].queryValue),y=r.filter(i=>i[0]==="(min-width: 0px)");(y?[...y,...x,...h]:[...x,...h]).forEach(i=>{s(this,p).has(i[0])||s(this,p).set(i[0],[]),s(this,p).get(i[0]).push(i[1])})}get mediaBuckets(){return s(this,p)}}p=new WeakMap;var R,M;class O extends B.Store{constructor(t){super(void 0);o(this,R);o(this,M,()=>{let t;s(this,R).mediaBuckets.forEach((h,y)=>{matchMedia(y).matches&&(t=h)});let r,x=0;t==null||t.forEach(h=>{h.density>x&&h.density<=Math.max(devicePixelRatio,1)&&(x=h.density,r=h)}),t!=null&&t.length&&!r&&(r=t[0]),this.current=r});n(this,R,new z(t.srcset))}close(){super.close(),this.disconnect()}connect(){_.windowResizer.subscribe(s(this,M),A.RESIZE_ORDER.SOURCE_MANAGER)}disconnect(){_.windowResizer.unsubscribe(s(this,M))}}R=new WeakMap,M=new WeakMap;exports.Source=k;exports.SourceManager=O;exports.SourceSet=z;
1
+ "use strict";var b=r=>{throw TypeError(r)};var I=(r,n,t)=>n.has(r)||b("Cannot "+t);var e=(r,n,t)=>(I(r,n,"read from private field"),t?t.call(r):n.get(r)),o=(r,n,t)=>n.has(r)?b("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(r):n.set(r,t),i=(r,n,t,h)=>(I(r,n,"write to private field"),h?h.call(r,t):n.set(r,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const z=require("../order/index.cjs"),T=require("../window-resizer/vanilla/index.cjs"),A=require("../Store-CDb6RMce.cjs");var q,x,w,d,a,u,f;class _{constructor(n){o(this,q);o(this,x);o(this,w);o(this,d);o(this,a);o(this,u);o(this,f);i(this,q,n);const t=n.split(".");i(this,x,t.length>1?t.slice(0,-1).join("."):t.join("."));const h=/\d+x/g,p=t.find(l=>l.match(h));i(this,w,p?parseInt(p):1);const c=/\d+max/g,g=/\d+min/g,S=/\d+mar/g,s=/\d+mir/g,m=t.find(l=>l.match(c)),E=t.find(l=>l.match(g)),$=t.find(l=>l.match(S)),V=t.find(l=>l.match(s));$?(i(this,a,parseInt($)),i(this,u,"max"),i(this,d,`(max-aspect-ratio: ${e(this,a)})`)):V?(i(this,a,parseInt(V)),i(this,u,"max"),i(this,d,`(min-aspect-ratio: ${e(this,a)})`)):m?(i(this,a,parseInt(m)),i(this,u,"max"),i(this,d,`(max-width: ${e(this,a)}px)`)):E?(i(this,a,parseInt(E)),i(this,d,`(min-width: ${e(this,a)}px)`),i(this,u,"min")):(i(this,a,0),i(this,d,`(min-width: ${e(this,a)}px)`),i(this,u,"min")),i(this,x,e(this,x).replace(`.${e(this,a)}${e(this,u)}`,"")),i(this,f,t[t.length-1]===e(this,x)?"":"."+t[t.length-1]),i(this,f,e(this,f).replace(`.${e(this,a)}${e(this,u)}`,""))}get url(){return e(this,q)}get name(){return e(this,x)}get density(){return e(this,w)}get query(){return e(this,d)}get extension(){return e(this,f)}get queryType(){return e(this,u)}get queryValue(){return e(this,a)}}q=new WeakMap,x=new WeakMap,w=new WeakMap,d=new WeakMap,a=new WeakMap,u=new WeakMap,f=new WeakMap;var y;class k{constructor(n){o(this,y);i(this,y,new Map);const t=typeof n=="string"?n.trim().split(",").map(s=>s.trim()).filter(s=>!!s):n,h=[];t.forEach(s=>{const m=new _(s);h.push([m.query,m])});const p=h.filter(s=>s[1].queryType.includes("max")).sort((s,m)=>m[1].queryValue-s[1].queryValue),c=h.filter(s=>s[1].queryType.includes("min")&&s[1].queryValue!==0).sort((s,m)=>s[1].queryValue-m[1].queryValue),g=h.filter(s=>s[0]==="(min-width: 0px)");(g?[...g,...p,...c]:[...p,...c]).forEach(s=>{e(this,y).has(s[0])||e(this,y).set(s[0],[]),e(this,y).get(s[0]).push(s[1])})}get mediaBuckets(){return e(this,y)}}y=new WeakMap;var R,M;class B extends A.Store{constructor(t){super(void 0);o(this,R);o(this,M,()=>{let t;e(this,R).mediaBuckets.forEach((c,g)=>{matchMedia(g).matches&&(t=c)});let h,p=0;t==null||t.forEach(c=>{c.density>p&&c.density<=Math.max(devicePixelRatio,1)&&(p=c.density,h=c)}),t!=null&&t.length&&!h&&(h=t[0]),this.current=h});i(this,R,new k(t.srcset))}close(){super.close(),this.disconnect()}connect(){T.windowResizer.subscribe(e(this,M),z.RESIZE_ORDER.SOURCE_MANAGER)}disconnect(){T.windowResizer.unsubscribe(e(this,M))}}R=new WeakMap,M=new WeakMap;exports.Source=_;exports.SourceManager=B;exports.SourceSet=k;
@@ -1,107 +1,108 @@
1
- var k = (a) => {
2
- throw TypeError(a);
1
+ var b = (r) => {
2
+ throw TypeError(r);
3
3
  };
4
- var A = (a, e, t) => e.has(a) || k("Cannot " + t);
5
- var i = (a, e, t) => (A(a, e, "read from private field"), t ? t.call(a) : e.get(a)), o = (a, e, t) => e.has(a) ? k("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(a) : e.set(a, t), n = (a, e, t, r) => (A(a, e, "write to private field"), r ? r.call(a, t) : e.set(a, t), t);
6
- import { RESIZE_ORDER as S } from "../order/index.js";
7
- import { windowResizer as B } from "../window-resizer/vanilla/index.js";
8
- import { S as T } from "../Store-OTdcl6SX.js";
9
- var g, x, q, d, h, m, w;
10
- class O {
11
- constructor(e) {
12
- o(this, g);
13
- o(this, x);
4
+ var k = (r, n, t) => n.has(r) || b("Cannot " + t);
5
+ var e = (r, n, t) => (k(r, n, "read from private field"), t ? t.call(r) : n.get(r)), o = (r, n, t) => n.has(r) ? b("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(r) : n.set(r, t), s = (r, n, t, a) => (k(r, n, "write to private field"), a ? a.call(r, t) : n.set(r, t), t);
6
+ import { RESIZE_ORDER as B } from "../order/index.js";
7
+ import { windowResizer as A } from "../window-resizer/vanilla/index.js";
8
+ import { S } from "../Store-OTdcl6SX.js";
9
+ var q, f, w, p, h, m, y;
10
+ class T {
11
+ constructor(n) {
14
12
  o(this, q);
15
- o(this, d);
13
+ o(this, f);
14
+ o(this, w);
15
+ o(this, p);
16
16
  o(this, h);
17
17
  o(this, m);
18
- o(this, w);
19
- n(this, g, e);
20
- const t = e.indexOf("?");
21
- t >= 0 && (e = e.slice(0, t));
22
- const r = e.split(".");
23
- n(this, x, r.slice(0, -1).join("."));
24
- const f = /\d+x/g, c = r.find((u) => u.match(f));
25
- n(this, q, c ? parseInt(c) : 1);
26
- const y = /\d+max/g, M = /\d+min/g, s = /\d+mar/g, p = /\d+mir/g, I = r.find((u) => u.match(y)), V = r.find((u) => u.match(M)), $ = r.find((u) => u.match(s)), b = r.find((u) => u.match(p));
27
- $ ? (n(this, h, parseInt($)), n(this, m, "max"), n(this, d, `(max-aspect-ratio: ${i(this, h)})`)) : b ? (n(this, h, parseInt(b)), n(this, m, "max"), n(this, d, `(min-aspect-ratio: ${i(this, h)})`)) : I ? (n(this, h, parseInt(I)), n(this, m, "max"), n(this, d, `(max-width: ${i(this, h)}px)`)) : V ? (n(this, h, parseInt(V)), n(this, d, `(min-width: ${i(this, h)}px)`), n(this, m, "min")) : (n(this, h, 0), n(this, d, `(min-width: ${i(this, h)}px)`), n(this, m, "min")), n(this, x, i(this, x).replace(
28
- `.${i(this, h)}${i(this, m)}`,
18
+ o(this, y);
19
+ s(this, q, n);
20
+ const t = n.split(".");
21
+ s(this, f, t.length > 1 ? t.slice(0, -1).join(".") : t.join("."));
22
+ const a = /\d+x/g, d = t.find((l) => l.match(a));
23
+ s(this, w, d ? parseInt(d) : 1);
24
+ const c = /\d+max/g, g = /\d+min/g, $ = /\d+mar/g, i = /\d+mir/g, u = t.find((l) => l.match(c)), M = t.find((l) => l.match(g)), V = t.find((l) => l.match($)), I = t.find((l) => l.match(i));
25
+ V ? (s(this, h, parseInt(V)), s(this, m, "max"), s(this, p, `(max-aspect-ratio: ${e(this, h)})`)) : I ? (s(this, h, parseInt(I)), s(this, m, "max"), s(this, p, `(min-aspect-ratio: ${e(this, h)})`)) : u ? (s(this, h, parseInt(u)), s(this, m, "max"), s(this, p, `(max-width: ${e(this, h)}px)`)) : M ? (s(this, h, parseInt(M)), s(this, p, `(min-width: ${e(this, h)}px)`), s(this, m, "min")) : (s(this, h, 0), s(this, p, `(min-width: ${e(this, h)}px)`), s(this, m, "min")), s(this, f, e(this, f).replace(
26
+ `.${e(this, h)}${e(this, m)}`,
29
27
  ""
30
- )), n(this, w, "." + r[r.length - 1]);
28
+ )), s(this, y, t[t.length - 1] === e(this, f) ? "" : "." + t[t.length - 1]), s(this, y, e(this, y).replace(
29
+ `.${e(this, h)}${e(this, m)}`,
30
+ ""
31
+ ));
31
32
  }
32
33
  get url() {
33
- return i(this, g);
34
+ return e(this, q);
34
35
  }
35
36
  get name() {
36
- return i(this, x);
37
+ return e(this, f);
37
38
  }
38
39
  get density() {
39
- return i(this, q);
40
+ return e(this, w);
40
41
  }
41
42
  get query() {
42
- return i(this, d);
43
+ return e(this, p);
43
44
  }
44
45
  get extension() {
45
- return i(this, w);
46
+ return e(this, y);
46
47
  }
47
48
  get queryType() {
48
- return i(this, m);
49
+ return e(this, m);
49
50
  }
50
51
  get queryValue() {
51
- return i(this, h);
52
+ return e(this, h);
52
53
  }
53
54
  }
54
- g = new WeakMap(), x = new WeakMap(), q = new WeakMap(), d = new WeakMap(), h = new WeakMap(), m = new WeakMap(), w = new WeakMap();
55
- var l;
55
+ q = new WeakMap(), f = new WeakMap(), w = new WeakMap(), p = new WeakMap(), h = new WeakMap(), m = new WeakMap(), y = new WeakMap();
56
+ var x;
56
57
  class P {
57
- constructor(e) {
58
- o(this, l);
59
- n(this, l, /* @__PURE__ */ new Map());
60
- const t = typeof e == "string" ? e.trim().split(",").map((s) => s.trim()).filter((s) => !!s) : e, r = [];
61
- t.forEach((s) => {
62
- const p = new O(s);
63
- r.push([p.query, p]);
58
+ constructor(n) {
59
+ o(this, x);
60
+ s(this, x, /* @__PURE__ */ new Map());
61
+ const t = typeof n == "string" ? n.trim().split(",").map((i) => i.trim()).filter((i) => !!i) : n, a = [];
62
+ t.forEach((i) => {
63
+ const u = new T(i);
64
+ a.push([u.query, u]);
64
65
  });
65
- const f = r.filter((s) => s[1].queryType.includes("max")).sort((s, p) => p[1].queryValue - s[1].queryValue), c = r.filter((s) => s[1].queryType.includes("min") && s[1].queryValue !== 0).sort((s, p) => s[1].queryValue - p[1].queryValue), y = r.filter((s) => s[0] === "(min-width: 0px)");
66
- (y ? [...y, ...f, ...c] : [...f, ...c]).forEach((s) => {
67
- i(this, l).has(s[0]) || i(this, l).set(s[0], []), i(this, l).get(s[0]).push(s[1]);
66
+ const d = a.filter((i) => i[1].queryType.includes("max")).sort((i, u) => u[1].queryValue - i[1].queryValue), c = a.filter((i) => i[1].queryType.includes("min") && i[1].queryValue !== 0).sort((i, u) => i[1].queryValue - u[1].queryValue), g = a.filter((i) => i[0] === "(min-width: 0px)");
67
+ (g ? [...g, ...d, ...c] : [...d, ...c]).forEach((i) => {
68
+ e(this, x).has(i[0]) || e(this, x).set(i[0], []), e(this, x).get(i[0]).push(i[1]);
68
69
  });
69
70
  }
70
71
  get mediaBuckets() {
71
- return i(this, l);
72
+ return e(this, x);
72
73
  }
73
74
  }
74
- l = new WeakMap();
75
+ x = new WeakMap();
75
76
  var E, R;
76
- class C extends T {
77
+ class _ extends S {
77
78
  constructor(t) {
78
79
  super(void 0);
79
80
  o(this, E);
80
81
  o(this, R, () => {
81
82
  let t;
82
- i(this, E).mediaBuckets.forEach((c, y) => {
83
- matchMedia(y).matches && (t = c);
83
+ e(this, E).mediaBuckets.forEach((c, g) => {
84
+ matchMedia(g).matches && (t = c);
84
85
  });
85
- let r, f = 0;
86
+ let a, d = 0;
86
87
  t == null || t.forEach((c) => {
87
- c.density > f && c.density <= Math.max(devicePixelRatio, 1) && (f = c.density, r = c);
88
- }), t != null && t.length && !r && (r = t[0]), this.current = r;
88
+ c.density > d && c.density <= Math.max(devicePixelRatio, 1) && (d = c.density, a = c);
89
+ }), t != null && t.length && !a && (a = t[0]), this.current = a;
89
90
  });
90
- n(this, E, new P(t.srcset));
91
+ s(this, E, new P(t.srcset));
91
92
  }
92
93
  close() {
93
94
  super.close(), this.disconnect();
94
95
  }
95
96
  connect() {
96
- B.subscribe(i(this, R), S.SOURCE_MANAGER);
97
+ A.subscribe(e(this, R), B.SOURCE_MANAGER);
97
98
  }
98
99
  disconnect() {
99
- B.unsubscribe(i(this, R));
100
+ A.unsubscribe(e(this, R));
100
101
  }
101
102
  }
102
103
  E = new WeakMap(), R = new WeakMap();
103
104
  export {
104
- O as Source,
105
- C as SourceManager,
105
+ T as Source,
106
+ _ as SourceManager,
106
107
  P as SourceSet
107
108
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aptechka",
3
- "version": "0.37.2",
3
+ "version": "0.38.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/denisavitski/aptechka.git"