aptechka 0.5.15 → 0.5.16

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.
@@ -0,0 +1 @@
1
+ "use strict";var b=(c,e,t)=>{if(!e.has(c))throw TypeError("Cannot "+t)};var r=(c,e,t)=>(b(c,e,"read from private field"),t?t.call(c):e.get(c)),o=(c,e,t)=>{if(e.has(c))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(c):e.set(c,t)},i=(c,e,t,n)=>(b(c,e,"write to private field"),n?n.call(c,t):e.set(c,t),t);const B=require("./order/index.cjs"),k=require("./window-resizer/index.cjs"),T=require("./Store-BQGNOHlY.cjs");require("./path-data-polyfill-CXsOR7Oc.cjs");var y,g,q,m,a,d,w;class z{constructor(e){o(this,y,void 0);o(this,g,void 0);o(this,q,void 0);o(this,m,void 0);o(this,a,void 0);o(this,d,void 0);o(this,w,void 0);i(this,y,e);const t=e.indexOf("?");t>=0&&(e=e.slice(0,t));const n=e.split(".");i(this,g,n[0]);const x=/\d+x/g,h=n.find(u=>u.match(x));i(this,q,h?parseInt(h):1);const f=/\d+max/g,M=/\d+min/g,s=/\d+mar/g,l=/\d+mir/g,S=n.find(u=>u.match(f)),I=n.find(u=>u.match(M)),V=n.find(u=>u.match(s)),$=n.find(u=>u.match(l));V?(i(this,a,parseInt(V)),i(this,d,"max"),i(this,m,`(max-aspect-ratio: ${r(this,a)})`)):$?(i(this,a,parseInt($)),i(this,d,"max"),i(this,m,`(min-aspect-ratio: ${r(this,a)})`)):S?(i(this,a,parseInt(S)),i(this,d,"max"),i(this,m,`(max-width: ${r(this,a)}px)`)):I?(i(this,a,parseInt(I)),i(this,m,`(min-width: ${r(this,a)}px)`),i(this,d,"min")):(i(this,a,0),i(this,m,`(min-width: ${r(this,a)}px)`),i(this,d,"min")),i(this,w,"."+n[n.length-1])}get url(){return r(this,y)}get name(){return r(this,g)}get density(){return r(this,q)}get query(){return r(this,m)}get extension(){return r(this,w)}get queryType(){return r(this,d)}get queryValue(){return r(this,a)}}y=new WeakMap,g=new WeakMap,q=new WeakMap,m=new WeakMap,a=new WeakMap,d=new WeakMap,w=new WeakMap;var p;class A{constructor(e){o(this,p,void 0);i(this,p,new Map);const t=typeof e=="string"?e.trim().split(",").map(s=>s.trim()).filter(s=>!!s):e,n=[];t.forEach(s=>{const l=new z(s);n.push([l.query,l])});const x=n.filter(s=>s[1].queryType.includes("max")).sort((s,l)=>l[1].queryValue-s[1].queryValue),h=n.filter(s=>s[1].queryType.includes("min")&&s[1].queryValue!==0).sort((s,l)=>s[1].queryValue-l[1].queryValue),f=n.filter(s=>s[0]==="(min-width: 0px)");(f?[...f,...x,...h]:[...x,...h]).forEach(s=>{r(this,p).has(s[0])||r(this,p).set(s[0],[]),r(this,p).get(s[0]).push(s[1])})}get mediaBuckets(){return r(this,p)}}p=new WeakMap;var R,E;class _ extends T.Store{constructor(t){super(void 0);o(this,R,void 0);o(this,E,()=>{let t;r(this,R).mediaBuckets.forEach((h,f)=>{matchMedia(f).matches&&(t=h)});let n,x=0;t==null||t.forEach(h=>{h.density>x&&h.density<=Math.max(devicePixelRatio,1)&&(x=h.density,n=h)}),t!=null&&t.length&&!n&&(n=t[0]),this.current=n});i(this,R,new A(t.srcset))}close(){super.close(),this.disconnect()}connect(){k.windowResizer.subscribe(r(this,E),B.RESIZE_ORDER.SOURCE_MANAGER)}disconnect(){k.windowResizer.unsubscribe(r(this,E))}}R=new WeakMap,E=new WeakMap;exports.Source=z;exports.SourceManager=_;exports.SourceSet=A;
@@ -0,0 +1,109 @@
1
+ var $ = (a, e, t) => {
2
+ if (!e.has(a))
3
+ throw TypeError("Cannot " + t);
4
+ };
5
+ var r = (a, e, t) => ($(a, e, "read from private field"), t ? t.call(a) : e.get(a)), o = (a, e, t) => {
6
+ if (e.has(a))
7
+ throw TypeError("Cannot add the same private member more than once");
8
+ e instanceof WeakSet ? e.add(a) : e.set(a, t);
9
+ }, i = (a, e, t, n) => ($(a, e, "write to private field"), n ? n.call(a, t) : e.set(a, t), t);
10
+ import { RESIZE_ORDER as A } from "./order/index.js";
11
+ import { windowResizer as k } from "./window-resizer/index.js";
12
+ import { S as B } from "./Store-Cd-E5W1z.js";
13
+ import "./path-data-polyfill-DgeDWYeI.js";
14
+ var y, g, q, u, c, d, w;
15
+ class T {
16
+ constructor(e) {
17
+ o(this, y, void 0);
18
+ o(this, g, void 0);
19
+ o(this, q, void 0);
20
+ o(this, u, void 0);
21
+ o(this, c, void 0);
22
+ o(this, d, void 0);
23
+ o(this, w, void 0);
24
+ i(this, y, e);
25
+ const t = e.indexOf("?");
26
+ t >= 0 && (e = e.slice(0, t));
27
+ const n = e.split(".");
28
+ i(this, g, n[0]);
29
+ const f = /\d+x/g, h = n.find((m) => m.match(f));
30
+ i(this, q, h ? parseInt(h) : 1);
31
+ const x = /\d+max/g, M = /\d+min/g, s = /\d+mar/g, p = /\d+mir/g, I = n.find((m) => m.match(x)), V = n.find((m) => m.match(M)), b = n.find((m) => m.match(s)), S = n.find((m) => m.match(p));
32
+ b ? (i(this, c, parseInt(b)), i(this, d, "max"), i(this, u, `(max-aspect-ratio: ${r(this, c)})`)) : S ? (i(this, c, parseInt(S)), i(this, d, "max"), i(this, u, `(min-aspect-ratio: ${r(this, c)})`)) : I ? (i(this, c, parseInt(I)), i(this, d, "max"), i(this, u, `(max-width: ${r(this, c)}px)`)) : V ? (i(this, c, parseInt(V)), i(this, u, `(min-width: ${r(this, c)}px)`), i(this, d, "min")) : (i(this, c, 0), i(this, u, `(min-width: ${r(this, c)}px)`), i(this, d, "min")), i(this, w, "." + n[n.length - 1]);
33
+ }
34
+ get url() {
35
+ return r(this, y);
36
+ }
37
+ get name() {
38
+ return r(this, g);
39
+ }
40
+ get density() {
41
+ return r(this, q);
42
+ }
43
+ get query() {
44
+ return r(this, u);
45
+ }
46
+ get extension() {
47
+ return r(this, w);
48
+ }
49
+ get queryType() {
50
+ return r(this, d);
51
+ }
52
+ get queryValue() {
53
+ return r(this, c);
54
+ }
55
+ }
56
+ y = new WeakMap(), g = new WeakMap(), q = new WeakMap(), u = new WeakMap(), c = new WeakMap(), d = new WeakMap(), w = new WeakMap();
57
+ var l;
58
+ class O {
59
+ constructor(e) {
60
+ o(this, l, void 0);
61
+ i(this, l, /* @__PURE__ */ new Map());
62
+ const t = typeof e == "string" ? e.trim().split(",").map((s) => s.trim()).filter((s) => !!s) : e, n = [];
63
+ t.forEach((s) => {
64
+ const p = new T(s);
65
+ n.push([p.query, p]);
66
+ });
67
+ const f = n.filter((s) => s[1].queryType.includes("max")).sort((s, p) => p[1].queryValue - s[1].queryValue), h = n.filter((s) => s[1].queryType.includes("min") && s[1].queryValue !== 0).sort((s, p) => s[1].queryValue - p[1].queryValue), x = n.filter((s) => s[0] === "(min-width: 0px)");
68
+ (x ? [...x, ...f, ...h] : [...f, ...h]).forEach((s) => {
69
+ r(this, l).has(s[0]) || r(this, l).set(s[0], []), r(this, l).get(s[0]).push(s[1]);
70
+ });
71
+ }
72
+ get mediaBuckets() {
73
+ return r(this, l);
74
+ }
75
+ }
76
+ l = new WeakMap();
77
+ var E, R;
78
+ class G extends B {
79
+ constructor(t) {
80
+ super(void 0);
81
+ o(this, E, void 0);
82
+ o(this, R, () => {
83
+ let t;
84
+ r(this, E).mediaBuckets.forEach((h, x) => {
85
+ matchMedia(x).matches && (t = h);
86
+ });
87
+ let n, f = 0;
88
+ t == null || t.forEach((h) => {
89
+ h.density > f && h.density <= Math.max(devicePixelRatio, 1) && (f = h.density, n = h);
90
+ }), t != null && t.length && !n && (n = t[0]), this.current = n;
91
+ });
92
+ i(this, E, new O(t.srcset));
93
+ }
94
+ close() {
95
+ super.close(), this.disconnect();
96
+ }
97
+ connect() {
98
+ k.subscribe(r(this, R), A.SOURCE_MANAGER);
99
+ }
100
+ disconnect() {
101
+ k.unsubscribe(r(this, R));
102
+ }
103
+ }
104
+ E = new WeakMap(), R = new WeakMap();
105
+ export {
106
+ G as S,
107
+ T as a,
108
+ O as b
109
+ };
package/lib/en3/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";var ht=Object.defineProperty,lt=Object.defineProperties;var dt=Object.getOwnPropertyDescriptors;var xe=Object.getOwnPropertySymbols;var ut=Object.prototype.hasOwnProperty,ft=Object.prototype.propertyIsEnumerable;var Ne=(C,A,e)=>A in C?ht(C,A,{enumerable:!0,configurable:!0,writable:!0,value:e}):C[A]=e,AA=(C,A)=>{for(var e in A||(A={}))ut.call(A,e)&&Ne(C,e,A[e]);if(xe)for(var e of xe(A))ft.call(A,e)&&Ne(C,e,A[e]);return C},oe=(C,A)=>lt(C,dt(A));var Ie=(C,A,e)=>{if(!A.has(C))throw TypeError("Cannot "+e)};var E=(C,A,e)=>(Ie(C,A,"read from private field"),e?e.call(C):A.get(C)),G=(C,A,e)=>{if(A.has(C))throw TypeError("Cannot add the same private member more than once");A instanceof WeakSet?A.add(C):A.set(C,e)},R=(C,A,e,s)=>(Ie(C,A,"write to private field"),s?s.call(C,e):A.set(C,e),e);var re=(C,A,e)=>(Ie(C,A,"access private method"),e);var uA=(C,A,e)=>new Promise((s,t)=>{var n=o=>{try{r(e.next(o))}catch(a){t(a)}},i=o=>{try{r(e.throw(o))}catch(a){t(a)}},r=o=>o.done?s(o.value):Promise.resolve(o.value).then(n,i);r((e=e.apply(C,A)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const NA=require("../order/index.cjs"),yA=require("../window-resizer/index.cjs"),LA=require("../ticker/index.cjs"),je=require("../dom-JBOkFLTh.cjs");require("../path-data-polyfill-CXsOR7Oc.cjs");const B=require("three"),pe=require("../layout-box/index.cjs"),ge=require("../loading/index.cjs"),Dt=require("../SourceManager-Bl_uduSS.cjs"),ke=require("../Store-BQGNOHlY.cjs");function kA(C){const A=e=>{e.dispose();for(const s of Object.keys(e)){const t=e[s];t&&typeof t=="object"&&"minFilter"in t&&t.dispose()}};C.traverse(e=>{if(e instanceof B.Mesh){if(e.geometry.dispose(),!Array.isArray(e.material)&&e.material.isMaterial)A(e.material);else if(Array.isArray(e.material))for(const s of e.material)A(s)}})}var bA,T,EA,sA,nA,DA,iA,oA;class me{constructor(A,e){G(this,bA,void 0);G(this,T,void 0);G(this,EA,void 0);G(this,sA,void 0);G(this,nA,void 0);G(this,DA,void 0);G(this,iA,void 0);G(this,oA,void 0);R(this,bA,A),R(this,T,(e==null?void 0:e.cameraType)==="orthographic"?new B.OrthographicCamera:new B.PerspectiveCamera),R(this,EA,new B.Scene),R(this,sA,[]),R(this,nA,(e==null?void 0:e.cameraDistance)||1e3),E(this,T).near=(e==null?void 0:e.cameraNear)||1,E(this,T).far=(e==null?void 0:e.cameraFar)||11e3,R(this,DA,(e==null?void 0:e.cameraFov)||"auto"),R(this,iA,je.getElement(e==null?void 0:e.sizeElement)||document.documentElement),this.beforeRenderCallback=e==null?void 0:e.beforeRender,R(this,oA,new pe.LayoutBox(E(this,iA))),E(this,oA).onScale(()=>{this.resize()})}get name(){return E(this,bA)}get camera(){return E(this,T)}get scene(){return E(this,EA)}get box(){return E(this,oA)}get cameraDistance(){return E(this,nA)}set cameraDistance(A){R(this,nA,A),this.resize()}get sizeElement(){return E(this,iA)}get isClipped(){return E(this,iA)!==w.containerElement}resize(){const{width:A,height:e}=E(this,oA);E(this,T).position.z=E(this,nA),E(this,T)instanceof B.PerspectiveCamera?(E(this,T).aspect=A/e,E(this,T).fov=E(this,DA)==="auto"?2*Math.atan(e/2/E(this,nA))*(180/Math.PI):E(this,DA)):E(this,T)instanceof B.OrthographicCamera&&(E(this,T).left=A/-2,E(this,T).right=A/2,E(this,T).top=e/2,E(this,T).bottom=e/-2),E(this,T).updateProjectionMatrix()}destroy(){E(this,sA).forEach(A=>{A.userData.box.destroy()}),E(this,EA).clear(),kA(E(this,EA)),w.destroyView(this.name),E(this,oA).destroy()}attachToHTMLElement(A,e,s){const t=new pe.LayoutBox(A,oe(AA({},s),{containerElement:E(this,iA),cartesian:!0,scrollStep:!this.isClipped}));return t.bindObject(e),e.userData.box=t,E(this,sA).push(e),e}detachFromHTMLElement(A){R(this,sA,E(this,sA).filter(e=>e===A?(A.userData.box.destroy(),!1):!0))}add(...A){const e=A[0],s=A[1],t=A[2];return this.scene.add(e),s?this.attachToHTMLElement(s,e,t):e}remove(A,e){this.scene.remove(A),e&&this.detachFromHTMLElement(A)}}bA=new WeakMap,T=new WeakMap,EA=new WeakMap,sA=new WeakMap,nA=new WeakMap,DA=new WeakMap,iA=new WeakMap,oA=new WeakMap;const O=new Map;var ae,W,y,x,FA,GA,RA,KA,cA,OA,_A,PA;class Ft{constructor(){G(this,ae,`https://unpkg.com/three@0.${B.REVISION}.x`);G(this,W,null);G(this,y,null);G(this,x,new Map);G(this,FA,0);G(this,GA,0);G(this,RA,0);G(this,KA,2);G(this,cA,!1);G(this,OA,!1);G(this,_A,()=>{var A;R(this,FA,E(this,W).clientWidth),R(this,GA,E(this,W).clientHeight),R(this,RA,Math.min(E(this,KA),devicePixelRatio||1)),E(this,y).setPixelRatio(E(this,RA)),E(this,y).setSize(E(this,FA),E(this,GA)),(A=this.onResize)==null||A.call(this)});G(this,PA,()=>{E(this,y).setRenderTarget(null),E(this,x).forEach(A=>{this.render(A)})})}get CDNVersion(){return E(this,ae)}get containerElement(){return E(this,W)}get webglRenderer(){return E(this,y)}get views(){return E(this,x)}get view(){return this.getView("default")}get width(){return E(this,FA)}get height(){return E(this,GA)}get pixelRatio(){return E(this,RA)}get cacheAssets(){return E(this,OA)}setup(A){if(E(this,cA)){console.warn("[en3.setup]: You are trying to setup en3 again.");return}R(this,W,je.getElement(A==null?void 0:A.containerElement)||document.body),R(this,KA,(A==null?void 0:A.maxPixelRatio)||2),R(this,y,new B.WebGLRenderer(A==null?void 0:A.webGLRendererParameters)),E(this,y).domElement.style.cssText=`
1
+ "use strict";var ht=Object.defineProperty,lt=Object.defineProperties;var dt=Object.getOwnPropertyDescriptors;var xe=Object.getOwnPropertySymbols;var ut=Object.prototype.hasOwnProperty,ft=Object.prototype.propertyIsEnumerable;var Ne=(C,A,e)=>A in C?ht(C,A,{enumerable:!0,configurable:!0,writable:!0,value:e}):C[A]=e,AA=(C,A)=>{for(var e in A||(A={}))ut.call(A,e)&&Ne(C,e,A[e]);if(xe)for(var e of xe(A))ft.call(A,e)&&Ne(C,e,A[e]);return C},oe=(C,A)=>lt(C,dt(A));var Ie=(C,A,e)=>{if(!A.has(C))throw TypeError("Cannot "+e)};var E=(C,A,e)=>(Ie(C,A,"read from private field"),e?e.call(C):A.get(C)),G=(C,A,e)=>{if(A.has(C))throw TypeError("Cannot add the same private member more than once");A instanceof WeakSet?A.add(C):A.set(C,e)},R=(C,A,e,s)=>(Ie(C,A,"write to private field"),s?s.call(C,e):A.set(C,e),e);var re=(C,A,e)=>(Ie(C,A,"access private method"),e);var uA=(C,A,e)=>new Promise((s,t)=>{var n=o=>{try{r(e.next(o))}catch(a){t(a)}},i=o=>{try{r(e.throw(o))}catch(a){t(a)}},r=o=>o.done?s(o.value):Promise.resolve(o.value).then(n,i);r((e=e.apply(C,A)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const NA=require("../order/index.cjs"),yA=require("../window-resizer/index.cjs"),LA=require("../ticker/index.cjs"),je=require("../dom-JBOkFLTh.cjs");require("../path-data-polyfill-CXsOR7Oc.cjs");const B=require("three"),pe=require("../layout-box/index.cjs"),ge=require("../loading/index.cjs"),Dt=require("../SourceManager-BFSCX4Q8.cjs"),ke=require("../Store-BQGNOHlY.cjs");function kA(C){const A=e=>{e.dispose();for(const s of Object.keys(e)){const t=e[s];t&&typeof t=="object"&&"minFilter"in t&&t.dispose()}};C.traverse(e=>{if(e instanceof B.Mesh){if(e.geometry.dispose(),!Array.isArray(e.material)&&e.material.isMaterial)A(e.material);else if(Array.isArray(e.material))for(const s of e.material)A(s)}})}var bA,T,EA,sA,nA,DA,iA,oA;class me{constructor(A,e){G(this,bA,void 0);G(this,T,void 0);G(this,EA,void 0);G(this,sA,void 0);G(this,nA,void 0);G(this,DA,void 0);G(this,iA,void 0);G(this,oA,void 0);R(this,bA,A),R(this,T,(e==null?void 0:e.cameraType)==="orthographic"?new B.OrthographicCamera:new B.PerspectiveCamera),R(this,EA,new B.Scene),R(this,sA,[]),R(this,nA,(e==null?void 0:e.cameraDistance)||1e3),E(this,T).near=(e==null?void 0:e.cameraNear)||1,E(this,T).far=(e==null?void 0:e.cameraFar)||11e3,R(this,DA,(e==null?void 0:e.cameraFov)||"auto"),R(this,iA,je.getElement(e==null?void 0:e.sizeElement)||document.documentElement),this.beforeRenderCallback=e==null?void 0:e.beforeRender,R(this,oA,new pe.LayoutBox(E(this,iA))),E(this,oA).onScale(()=>{this.resize()})}get name(){return E(this,bA)}get camera(){return E(this,T)}get scene(){return E(this,EA)}get box(){return E(this,oA)}get cameraDistance(){return E(this,nA)}set cameraDistance(A){R(this,nA,A),this.resize()}get sizeElement(){return E(this,iA)}get isClipped(){return E(this,iA)!==w.containerElement}resize(){const{width:A,height:e}=E(this,oA);E(this,T).position.z=E(this,nA),E(this,T)instanceof B.PerspectiveCamera?(E(this,T).aspect=A/e,E(this,T).fov=E(this,DA)==="auto"?2*Math.atan(e/2/E(this,nA))*(180/Math.PI):E(this,DA)):E(this,T)instanceof B.OrthographicCamera&&(E(this,T).left=A/-2,E(this,T).right=A/2,E(this,T).top=e/2,E(this,T).bottom=e/-2),E(this,T).updateProjectionMatrix()}destroy(){E(this,sA).forEach(A=>{A.userData.box.destroy()}),E(this,EA).clear(),kA(E(this,EA)),w.destroyView(this.name),E(this,oA).destroy()}attachToHTMLElement(A,e,s){const t=new pe.LayoutBox(A,oe(AA({},s),{containerElement:E(this,iA),cartesian:!0,scrollStep:!this.isClipped}));return t.bindObject(e),e.userData.box=t,E(this,sA).push(e),e}detachFromHTMLElement(A){R(this,sA,E(this,sA).filter(e=>e===A?(A.userData.box.destroy(),!1):!0))}add(...A){const e=A[0],s=A[1],t=A[2];return this.scene.add(e),s?this.attachToHTMLElement(s,e,t):e}remove(A,e){this.scene.remove(A),e&&this.detachFromHTMLElement(A)}}bA=new WeakMap,T=new WeakMap,EA=new WeakMap,sA=new WeakMap,nA=new WeakMap,DA=new WeakMap,iA=new WeakMap,oA=new WeakMap;const O=new Map;var ae,W,y,x,FA,GA,RA,KA,cA,OA,_A,PA;class Ft{constructor(){G(this,ae,`https://unpkg.com/three@0.${B.REVISION}.x`);G(this,W,null);G(this,y,null);G(this,x,new Map);G(this,FA,0);G(this,GA,0);G(this,RA,0);G(this,KA,2);G(this,cA,!1);G(this,OA,!1);G(this,_A,()=>{var A;R(this,FA,E(this,W).clientWidth),R(this,GA,E(this,W).clientHeight),R(this,RA,Math.min(E(this,KA),devicePixelRatio||1)),E(this,y).setPixelRatio(E(this,RA)),E(this,y).setSize(E(this,FA),E(this,GA)),(A=this.onResize)==null||A.call(this)});G(this,PA,()=>{E(this,y).setRenderTarget(null),E(this,x).forEach(A=>{this.render(A)})})}get CDNVersion(){return E(this,ae)}get containerElement(){return E(this,W)}get webglRenderer(){return E(this,y)}get views(){return E(this,x)}get view(){return this.getView("default")}get width(){return E(this,FA)}get height(){return E(this,GA)}get pixelRatio(){return E(this,RA)}get cacheAssets(){return E(this,OA)}setup(A){if(E(this,cA)){console.warn("[en3.setup]: You are trying to setup en3 again.");return}R(this,W,je.getElement(A==null?void 0:A.containerElement)||document.body),R(this,KA,(A==null?void 0:A.maxPixelRatio)||2),R(this,y,new B.WebGLRenderer(A==null?void 0:A.webGLRendererParameters)),E(this,y).domElement.style.cssText=`
2
2
  position: fixed;
3
3
  left: 0;
4
4
  top: 0;
package/lib/en3/index.js CHANGED
@@ -44,7 +44,7 @@ import "../path-data-polyfill-DgeDWYeI.js";
44
44
  import { Mesh as Qe, OrthographicCamera as me, PerspectiveCamera as Xe, Scene as as, REVISION as Is, WebGLRenderer as gs, TextureLoader as Lt, TrianglesDrawMode as Es, TriangleFanDrawMode as ve, TriangleStripDrawMode as Jt, Loader as et, LoaderUtils as WA, FileLoader as FA, Color as cA, LinearSRGBColorSpace as P, SpotLight as cs, PointLight as Qs, DirectionalLight as hs, MeshBasicMaterial as qA, SRGBColorSpace as eA, MeshPhysicalMaterial as tA, Vector2 as Ht, Matrix4 as bA, Vector3 as y, Quaternion as tt, InstancedMesh as ls, InstancedBufferAttribute as ds, Object3D as st, ImageBitmapLoader as us, BufferAttribute as VA, InterleavedBuffer as fs, InterleavedBufferAttribute as Ds, LinearFilter as Me, LinearMipmapLinearFilter as nt, RepeatWrapping as We, PointsMaterial as Fs, Material as Je, LineBasicMaterial as Gs, MeshStandardMaterial as Tt, DoubleSide as Rs, PropertyBinding as ps, BufferGeometry as Ut, SkinnedMesh as ms, LineSegments as Ms, Line as ws, LineLoop as ys, Points as Ss, Group as jA, MathUtils as Ls, Skeleton as Js, AnimationClip as Hs, Bone as Ts, InterpolateLinear as xt, ColorManagement as rt, NearestFilter as Us, NearestMipmapNearestFilter as xs, LinearMipmapNearestFilter as Ns, NearestMipmapLinearFilter as ks, ClampToEdgeWrapping as bs, MirroredRepeatWrapping as Ks, InterpolateDiscrete as Os, FrontSide as _s, Texture as Ct, VectorKeyframeTrack as at, NumberKeyframeTrack as It, QuaternionKeyframeTrack as gt, Box3 as Ps, Sphere as Ys, Interpolant as qs, CompressedCubeTexture as Xs, UnsignedByteType as O, CompressedArrayTexture as vs, CompressedTexture as Nt, RGBAFormat as mA, RGBA_ASTC_4x4_Format as Ws, RGBA_BPTC_Format as Vs, RGBA_ETC2_EAC_Format as js, RGBA_PVRTC_4BPPV1_Format as Zs, RGBA_S3TC_DXT5_Format as zs, RGB_ETC1_Format as $s, RGB_ETC2_Format as An, RGB_PVRTC_4BPPV1_Format as en, RGB_S3TC_DXT1_Format as tn, FloatType as Re, HalfFloatType as pe, DataTexture as sn, Data3DTexture as nn, DisplayP3ColorSpace as on, LinearDisplayP3ColorSpace as Bn, NoColorSpace as Et, RGFormat as XA, RedFormat as vA, RGBA_ASTC_6x6_Format as ct, Plane as De, PlaneHelper as Fe, BoxGeometry as rn, VideoTexture as Cn } from "three";
45
45
  import { LayoutBox as Ve } from "../layout-box/index.js";
46
46
  import { loading as He } from "../loading/index.js";
47
- import { S as an } from "../SourceManager-D_8MZ3bR.js";
47
+ import { S as an } from "../SourceManager-DmXmmA6z.js";
48
48
  import { S as Qt } from "../Store-Cd-E5W1z.js";
49
49
  function we(C) {
50
50
  const A = (e) => {
@@ -6,6 +6,6 @@ export declare class Source {
6
6
  get density(): number;
7
7
  get query(): string;
8
8
  get extension(): string;
9
- get queryType(): "min" | "max";
10
- get queryPx(): number;
9
+ get queryType(): "min" | "max" | "max-ratio" | "min-ratio";
10
+ get queryValue(): number;
11
11
  }
@@ -1,4 +1,4 @@
1
- "use strict";var L=(i,r,t)=>{if(!r.has(i))throw TypeError("Cannot "+t)};var e=(i,r,t)=>(L(i,r,"read from private field"),t?t.call(i):r.get(i)),a=(i,r,t)=>{if(r.has(i))throw TypeError("Cannot add the same private member more than once");r instanceof WeakSet?r.add(i):r.set(i,t)},u=(i,r,t,n)=>(L(i,r,"write to private field"),n?n.call(i,t):r.set(i,t),t);var y=(i,r,t)=>(L(i,r,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("../SourceManager-Bl_uduSS.cjs"),k=require("../custom-element/index.cjs"),C=require("../loading/index.cjs"),q=require("../class-linked-status/index.cjs"),x=require("../browser-CpzFX2xg.cjs");require("../path-data-polyfill-CXsOR7Oc.cjs");let M=0;var h,s,c,f,l,d,o,m,S,w,b,p,E;class A extends k.CustomElement{constructor(){super();a(this,S);a(this,h,null);a(this,s,null);a(this,c,!1);a(this,f,!1);a(this,l,!1);a(this,d,"");a(this,o,new q.ClassLinkedStatus(this,{loading:!1,loaded:!1,error:!1}));a(this,m,null);a(this,b,t=>{const n=t[0];e(this,l)&&!e(this,f)&&n.isIntersecting&&(e(this,h).current&&e(this,h).current!==e(this,h).previous&&y(this,S,w).call(this,e(this,h).current),u(this,f,!0)),n.isIntersecting?this.dispatchEvent(new CustomEvent("sourceCapture")):this.dispatchEvent(new CustomEvent("sourceRelease"))});a(this,p,()=>{e(this,o).set("loaded",!0),e(this,o).set("error",!1),e(this,o).set("loading",!1),!e(this,l)&&!e(this,c)&&C.loading.setLoaded(e(this,d),1),u(this,c,!0)});a(this,E,t=>{e(this,o).set("loaded",!1),e(this,o).set("error",!0),e(this,o).set("loading",!1),!e(this,l)&&!e(this,c)&&C.loading.setError(e(this,d),t),u(this,c,!0)});x.isBrowser&&(u(this,d,`source-consumer-${++M}`),u(this,m,new IntersectionObserver(e(this,b))))}get consumerElement(){return e(this,s)}get status(){return e(this,o)}get isLazy(){return e(this,l)}connectedCallback(){const t=this.getAttribute("srcset");t&&(u(this,s,this.createConsumer()),e(this,s).style.cssText=`
1
+ "use strict";var L=(i,r,t)=>{if(!r.has(i))throw TypeError("Cannot "+t)};var e=(i,r,t)=>(L(i,r,"read from private field"),t?t.call(i):r.get(i)),a=(i,r,t)=>{if(r.has(i))throw TypeError("Cannot add the same private member more than once");r instanceof WeakSet?r.add(i):r.set(i,t)},u=(i,r,t,n)=>(L(i,r,"write to private field"),n?n.call(i,t):r.set(i,t),t);var y=(i,r,t)=>(L(i,r,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("../SourceManager-BFSCX4Q8.cjs"),k=require("../custom-element/index.cjs"),C=require("../loading/index.cjs"),q=require("../class-linked-status/index.cjs"),x=require("../browser-CpzFX2xg.cjs");require("../path-data-polyfill-CXsOR7Oc.cjs");let M=0;var h,s,c,f,l,d,o,m,S,w,b,p,E;class A extends k.CustomElement{constructor(){super();a(this,S);a(this,h,null);a(this,s,null);a(this,c,!1);a(this,f,!1);a(this,l,!1);a(this,d,"");a(this,o,new q.ClassLinkedStatus(this,{loading:!1,loaded:!1,error:!1}));a(this,m,null);a(this,b,t=>{const n=t[0];e(this,l)&&!e(this,f)&&n.isIntersecting&&(e(this,h).current&&e(this,h).current!==e(this,h).previous&&y(this,S,w).call(this,e(this,h).current),u(this,f,!0)),n.isIntersecting?this.dispatchEvent(new CustomEvent("sourceCapture")):this.dispatchEvent(new CustomEvent("sourceRelease"))});a(this,p,()=>{e(this,o).set("loaded",!0),e(this,o).set("error",!1),e(this,o).set("loading",!1),!e(this,l)&&!e(this,c)&&C.loading.setLoaded(e(this,d),1),u(this,c,!0)});a(this,E,t=>{e(this,o).set("loaded",!1),e(this,o).set("error",!0),e(this,o).set("loading",!1),!e(this,l)&&!e(this,c)&&C.loading.setError(e(this,d),t),u(this,c,!0)});x.isBrowser&&(u(this,d,`source-consumer-${++M}`),u(this,m,new IntersectionObserver(e(this,b))))}get consumerElement(){return e(this,s)}get status(){return e(this,o)}get isLazy(){return e(this,l)}connectedCallback(){const t=this.getAttribute("srcset");t&&(u(this,s,this.createConsumer()),e(this,s).style.cssText=`
2
2
  display: block;
3
3
  width: 100%;
4
4
  height: 100%;
@@ -8,8 +8,8 @@ var t = (i, r, s) => (E(i, r, "read from private field"), s ? s.call(i) : r.get(
8
8
  r instanceof WeakSet ? r.add(i) : r.set(i, s);
9
9
  }, u = (i, r, s, o) => (E(i, r, "write to private field"), o ? o.call(i, s) : r.set(i, s), s);
10
10
  var C = (i, r, s) => (E(i, r, "access private method"), s);
11
- import { S as y } from "../SourceManager-D_8MZ3bR.js";
12
- import { a as V, b as $ } from "../SourceManager-D_8MZ3bR.js";
11
+ import { S as y } from "../SourceManager-DmXmmA6z.js";
12
+ import { a as V, b as $ } from "../SourceManager-DmXmmA6z.js";
13
13
  import { CustomElement as k } from "../custom-element/index.js";
14
14
  import { loading as L } from "../loading/index.js";
15
15
  import { ClassLinkedStatus as x } from "../class-linked-status/index.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aptechka",
3
- "version": "0.5.15",
3
+ "version": "0.5.16",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/denisavitski/aptechka.git"
@@ -1 +0,0 @@
1
- "use strict";var S=(r,s,t)=>{if(!s.has(r))throw TypeError("Cannot "+t)};var n=(r,s,t)=>(S(r,s,"read from private field"),t?t.call(r):s.get(r)),o=(r,s,t)=>{if(s.has(r))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(r):s.set(r,t)},c=(r,s,t,i)=>(S(r,s,"write to private field"),i?i.call(r,t):s.set(r,t),t);const k=require("./order/index.cjs"),M=require("./window-resizer/index.cjs"),z=require("./Store-BQGNOHlY.cjs");require("./path-data-polyfill-CXsOR7Oc.cjs");var l,q,g,x,a,p,w;class I{constructor(s){o(this,l,void 0);o(this,q,void 0);o(this,g,void 0);o(this,x,void 0);o(this,a,void 0);o(this,p,void 0);o(this,w,void 0);c(this,l,s);const t=s.indexOf("?");t>=0&&(s=s.slice(0,t));const i=s.split(".");c(this,q,i[0]);const m=/\d+x/g,h=i.find(f=>f.match(m));c(this,g,h?parseInt(h):1);const y=/\d+max/g,P=/\d+min/g,e=i.find(f=>f.match(y)),u=i.find(f=>f.match(P));e?(c(this,a,parseInt(e)),c(this,p,"max"),c(this,x,`(max-width: ${n(this,a)}px)`)):u?(c(this,a,parseInt(u)),c(this,x,`(min-width: ${n(this,a)}px)`),c(this,p,"min")):(c(this,a,0),c(this,x,`(min-width: ${n(this,a)}px)`),c(this,p,"min")),c(this,w,"."+i[i.length-1])}get url(){return n(this,l)}get name(){return n(this,q)}get density(){return n(this,g)}get query(){return n(this,x)}get extension(){return n(this,w)}get queryType(){return n(this,p)}get queryPx(){return n(this,a)}}l=new WeakMap,q=new WeakMap,g=new WeakMap,x=new WeakMap,a=new WeakMap,p=new WeakMap,w=new WeakMap;var d;class b{constructor(s){o(this,d,void 0);c(this,d,new Map);const t=typeof s=="string"?s.trim().split(",").map(e=>e.trim()).filter(e=>!!e):s,i=[];t.forEach(e=>{const u=new I(e);i.push([u.query,u])});const m=i.filter(e=>e[1].queryType==="max").sort((e,u)=>u[1].queryPx-e[1].queryPx),h=i.filter(e=>e[1].queryType==="min"&&e[1].queryPx!==0).sort((e,u)=>e[1].queryPx-u[1].queryPx),y=i.filter(e=>e[0]==="(min-width: 0px)");(y?[...y,...m,...h]:[...m,...h]).forEach(e=>{n(this,d).has(e[0])||n(this,d).set(e[0],[]),n(this,d).get(e[0]).push(e[1])})}get mediaBuckets(){return n(this,d)}}d=new WeakMap;var E,R;class B extends z.Store{constructor(t){super(void 0);o(this,E,void 0);o(this,R,()=>{let t;n(this,E).mediaBuckets.forEach((h,y)=>{matchMedia(y).matches&&(t=h)});let i,m=0;t==null||t.forEach(h=>{h.density>m&&h.density<=Math.max(devicePixelRatio,1)&&(m=h.density,i=h)}),t!=null&&t.length&&!i&&(i=t[0]),this.current=i});c(this,E,new b(t.srcset))}close(){super.close(),this.disconnect()}connect(){M.windowResizer.subscribe(n(this,R),k.RESIZE_ORDER.SOURCE_MANAGER)}disconnect(){M.windowResizer.unsubscribe(n(this,R))}}E=new WeakMap,R=new WeakMap;exports.Source=I;exports.SourceManager=B;exports.SourceSet=b;
@@ -1,109 +0,0 @@
1
- var M = (r, s, t) => {
2
- if (!s.has(r))
3
- throw TypeError("Cannot " + t);
4
- };
5
- var n = (r, s, t) => (M(r, s, "read from private field"), t ? t.call(r) : s.get(r)), o = (r, s, t) => {
6
- if (s.has(r))
7
- throw TypeError("Cannot add the same private member more than once");
8
- s instanceof WeakSet ? s.add(r) : s.set(r, t);
9
- }, h = (r, s, t, i) => (M(r, s, "write to private field"), i ? i.call(r, t) : s.set(r, t), t);
10
- import { RESIZE_ORDER as I } from "./order/index.js";
11
- import { windowResizer as b } from "./window-resizer/index.js";
12
- import { S } from "./Store-Cd-E5W1z.js";
13
- import "./path-data-polyfill-DgeDWYeI.js";
14
- var l, g, q, p, a, x, w;
15
- class k {
16
- constructor(s) {
17
- o(this, l, void 0);
18
- o(this, g, void 0);
19
- o(this, q, void 0);
20
- o(this, p, void 0);
21
- o(this, a, void 0);
22
- o(this, x, void 0);
23
- o(this, w, void 0);
24
- h(this, l, s);
25
- const t = s.indexOf("?");
26
- t >= 0 && (s = s.slice(0, t));
27
- const i = s.split(".");
28
- h(this, g, i[0]);
29
- const d = /\d+x/g, c = i.find((y) => y.match(d));
30
- h(this, q, c ? parseInt(c) : 1);
31
- const f = /\d+max/g, R = /\d+min/g, e = i.find((y) => y.match(f)), m = i.find((y) => y.match(R));
32
- e ? (h(this, a, parseInt(e)), h(this, x, "max"), h(this, p, `(max-width: ${n(this, a)}px)`)) : m ? (h(this, a, parseInt(m)), h(this, p, `(min-width: ${n(this, a)}px)`), h(this, x, "min")) : (h(this, a, 0), h(this, p, `(min-width: ${n(this, a)}px)`), h(this, x, "min")), h(this, w, "." + i[i.length - 1]);
33
- }
34
- get url() {
35
- return n(this, l);
36
- }
37
- get name() {
38
- return n(this, g);
39
- }
40
- get density() {
41
- return n(this, q);
42
- }
43
- get query() {
44
- return n(this, p);
45
- }
46
- get extension() {
47
- return n(this, w);
48
- }
49
- get queryType() {
50
- return n(this, x);
51
- }
52
- get queryPx() {
53
- return n(this, a);
54
- }
55
- }
56
- l = new WeakMap(), g = new WeakMap(), q = new WeakMap(), p = new WeakMap(), a = new WeakMap(), x = new WeakMap(), w = new WeakMap();
57
- var u;
58
- class B {
59
- constructor(s) {
60
- o(this, u, void 0);
61
- h(this, u, /* @__PURE__ */ new Map());
62
- const t = typeof s == "string" ? s.trim().split(",").map((e) => e.trim()).filter((e) => !!e) : s, i = [];
63
- t.forEach((e) => {
64
- const m = new k(e);
65
- i.push([m.query, m]);
66
- });
67
- const d = i.filter((e) => e[1].queryType === "max").sort((e, m) => m[1].queryPx - e[1].queryPx), c = i.filter((e) => e[1].queryType === "min" && e[1].queryPx !== 0).sort((e, m) => e[1].queryPx - m[1].queryPx), f = i.filter((e) => e[0] === "(min-width: 0px)");
68
- (f ? [...f, ...d, ...c] : [...d, ...c]).forEach((e) => {
69
- n(this, u).has(e[0]) || n(this, u).set(e[0], []), n(this, u).get(e[0]).push(e[1]);
70
- });
71
- }
72
- get mediaBuckets() {
73
- return n(this, u);
74
- }
75
- }
76
- u = new WeakMap();
77
- var E, P;
78
- class D extends S {
79
- constructor(t) {
80
- super(void 0);
81
- o(this, E, void 0);
82
- o(this, P, () => {
83
- let t;
84
- n(this, E).mediaBuckets.forEach((c, f) => {
85
- matchMedia(f).matches && (t = c);
86
- });
87
- let i, d = 0;
88
- t == null || t.forEach((c) => {
89
- c.density > d && c.density <= Math.max(devicePixelRatio, 1) && (d = c.density, i = c);
90
- }), t != null && t.length && !i && (i = t[0]), this.current = i;
91
- });
92
- h(this, E, new B(t.srcset));
93
- }
94
- close() {
95
- super.close(), this.disconnect();
96
- }
97
- connect() {
98
- b.subscribe(n(this, P), I.SOURCE_MANAGER);
99
- }
100
- disconnect() {
101
- b.unsubscribe(n(this, P));
102
- }
103
- }
104
- E = new WeakMap(), P = new WeakMap();
105
- export {
106
- D as S,
107
- k as a,
108
- B as b
109
- };