aptechka 0.43.4 → 0.44.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. package/lib/Animation-D1lL_XhF.cjs +1 -0
  2. package/lib/Animation-Je56LXXj.js +106 -0
  3. package/lib/{Damped-DxylD27S.js → Damped-BMmEn7PH.js} +4 -3
  4. package/lib/Damped-BbJjFOLH.cjs +1 -0
  5. package/lib/{Store-Cm3LPXlx.js → Store-D2xCXENW.js} +1 -1
  6. package/lib/Store-DRp_K37w.cjs +1 -0
  7. package/lib/{Tweened-p5hYr6lL.js → Tweened-BNCj14Jz.js} +4 -3
  8. package/lib/Tweened-Dk1UNPSH.cjs +1 -0
  9. package/lib/accordion/index.cjs +1 -1
  10. package/lib/accordion/index.js +45 -45
  11. package/lib/animation/index.cjs +1 -1
  12. package/lib/animation/index.js +3 -3
  13. package/lib/attribute/index.cjs +1 -1
  14. package/lib/attribute/index.js +2 -2
  15. package/lib/canvas/index.cjs +1 -1
  16. package/lib/canvas/index.js +11 -11
  17. package/lib/class-linked-status/index.cjs +1 -1
  18. package/lib/class-linked-status/index.js +12 -11
  19. package/lib/controls/index.cjs +1 -1
  20. package/lib/controls/index.js +3 -3
  21. package/lib/css-property/index.cjs +1 -1
  22. package/lib/css-property/index.js +7 -6
  23. package/lib/custom-scrollbar/index.cjs +1 -1
  24. package/lib/custom-scrollbar/index.js +13 -12
  25. package/lib/dev/index.cjs +1 -1
  26. package/lib/dev/index.js +7 -6
  27. package/lib/device/index.cjs +1 -1
  28. package/lib/device/index.js +2 -2
  29. package/lib/element-resizer/index.cjs +1 -1
  30. package/lib/element-resizer/index.js +1 -1
  31. package/lib/en3/index.cjs +1 -1
  32. package/lib/en3/index.js +9 -8
  33. package/lib/iframe/index.cjs +1 -1
  34. package/lib/iframe/index.js +6 -5
  35. package/lib/image/index.cjs +1 -1
  36. package/lib/image/index.js +5 -4
  37. package/lib/index-Cqw2NKev.cjs +1 -0
  38. package/lib/index-euf5anj6.js +64 -0
  39. package/lib/intersector/index.cjs +1 -1
  40. package/lib/intersector/index.js +4 -61
  41. package/lib/{jss-CjccJC-K.js → jss-BQSxj7Ls.js} +1 -1
  42. package/lib/jss-B_mh4mIw.cjs +1 -0
  43. package/lib/ladder/index.cjs +1 -1
  44. package/lib/ladder/index.js +35 -34
  45. package/lib/layout-box/index.cjs +1 -1
  46. package/lib/layout-box/index.js +1 -1
  47. package/lib/loading/index.cjs +1 -1
  48. package/lib/loading/index.js +10 -9
  49. package/lib/masonry-layout/index.cjs +1 -1
  50. package/lib/masonry-layout/index.js +17 -16
  51. package/lib/media/index.cjs +1 -1
  52. package/lib/media/index.js +7 -6
  53. package/lib/morph/Morph.d.ts +11 -2
  54. package/lib/morph/MorphAnnouncer.d.ts +0 -1
  55. package/lib/morph/index.cjs +1 -1
  56. package/lib/morph/index.js +263 -211
  57. package/lib/need_redo_tweaker/index.cjs +3 -3
  58. package/lib/need_redo_tweaker/index.js +260 -260
  59. package/lib/pointer/index.cjs +1 -1
  60. package/lib/pointer/index.js +34 -33
  61. package/lib/popover/index.cjs +1 -1
  62. package/lib/popover/index.js +25 -25
  63. package/lib/router/index.cjs +1 -1
  64. package/lib/router/index.js +6 -5
  65. package/lib/scroll/index.cjs +1 -1
  66. package/lib/scroll/index.js +278 -278
  67. package/lib/scroll-segment/index.cjs +1 -1
  68. package/lib/scroll-segment/index.js +57 -56
  69. package/lib/sequence/index.cjs +1 -1
  70. package/lib/sequence/index.js +6 -6
  71. package/lib/size-element/index.cjs +1 -1
  72. package/lib/size-element/index.js +12 -11
  73. package/lib/slicer/SlicerElement.d.ts +2 -2
  74. package/lib/slicer/index.cjs +2 -2
  75. package/lib/slicer/index.js +10 -9
  76. package/lib/source/index.cjs +2 -2
  77. package/lib/source/index.js +2 -2
  78. package/lib/store/index.cjs +1 -1
  79. package/lib/store/index.js +13 -12
  80. package/lib/ticker/index.cjs +1 -1
  81. package/lib/ticker/index.js +1 -1
  82. package/lib/url-CLvdjbII.cjs +1 -0
  83. package/lib/url-CfcHdBT6.js +49 -0
  84. package/lib/utils/index.cjs +1 -1
  85. package/lib/utils/index.d.ts +1 -0
  86. package/lib/utils/index.js +163 -148
  87. package/lib/utils/timeouts.d.ts +5 -0
  88. package/lib/utils/url.d.ts +15 -2
  89. package/lib/video/index.cjs +1 -1
  90. package/lib/video/index.js +7 -6
  91. package/lib/window-resizer/index.cjs +1 -1
  92. package/lib/window-resizer/index.js +1 -1
  93. package/lib/youtube/index.cjs +1 -1
  94. package/lib/youtube/index.js +13 -12
  95. package/package.json +1 -1
  96. package/lib/Animation-CMiBKrwE.cjs +0 -1
  97. package/lib/Animation-DPRlQfW2.js +0 -105
  98. package/lib/Damped-CHZ314Rn.cjs +0 -1
  99. package/lib/Store-C2J4Q87x.cjs +0 -1
  100. package/lib/Tweened-Dn6CMA-p.cjs +0 -1
  101. package/lib/browser-0zX67oeU.js +0 -4
  102. package/lib/browser-CpzFX2xg.cjs +0 -1
  103. package/lib/jss-GJLvaNfT.cjs +0 -1
  104. package/lib/url-CHQeS8b5.cjs +0 -1
  105. package/lib/url-DqQuzXwT.js +0 -37
@@ -1 +1 @@
1
- "use strict";var ot=a=>{throw TypeError(a)};var rt=(a,f,r)=>f.has(a)||ot("Cannot "+r);var t=(a,f,r)=>(rt(a,f,"read from private field"),r?r.call(a):f.get(a)),i=(a,f,r)=>f.has(a)?ot("Cannot add the same private member more than once"):f instanceof WeakSet?f.add(a):f.set(a,r),e=(a,f,r,s)=>(rt(a,f,"write to private field"),s?s.call(a,r):f.set(a,r),r),c=(a,f,r)=>(rt(a,f,"access private method"),r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../css-property/index.cjs"),ut=require("../order/index.cjs"),at=require("../window-resizer/index.cjs"),U=require("../events-KVanG9sR.cjs"),wt=require("../function-MthRj-GJ.cjs"),lt=require("../layout-Ctc2p3uz.cjs"),Ft=require("../math-GDWEqu7y.cjs"),X=require("../Store-C2J4Q87x.cjs"),Vt=require("../scroll-entries/index.cjs");require("../ticker/index.cjs");const Et=require("../Damped-CHZ314Rn.cjs");var S,j,G,K,N,T,D,_,M,d,y,g,v,A,p,R,O,B,k,z,q,l,P,w,E,L,F,Y,n,$,W,tt,m,H,C,b,V,J,I,u,h,ft,it,ht,dt,mt,bt,Ct,yt,gt,st,Q,Z,vt,Pt,nt,St;let pt=(St=class extends HTMLElement{constructor(){super();i(this,h);i(this,S);i(this,j);i(this,G);i(this,K);i(this,N);i(this,T);i(this,D);i(this,_);i(this,M);i(this,d);i(this,y);i(this,g);i(this,v);i(this,A);i(this,p);i(this,R);i(this,O);i(this,B);i(this,k);i(this,z);i(this,q);i(this,l);i(this,P);i(this,w);i(this,E);i(this,L);i(this,F);i(this,Y);i(this,n);i(this,$);i(this,W);i(this,tt);i(this,m);i(this,H);i(this,C);i(this,b);i(this,V);i(this,J);i(this,I);i(this,u);i(this,st);i(this,Q);e(this,S,null),e(this,j,new o.CSSProperty(this,"--damping",20)),e(this,G,new o.CSSProperty(this,"--mass",0)),e(this,K,new o.CSSProperty(this,"--stiffness",0)),e(this,N,new o.CSSProperty(this,"--target","")),e(this,T,new o.CSSProperty(this,"--disabled",!1)),e(this,D,new o.CSSProperty(this,"--distance-offset",0,{rawValueCheck:!1})),e(this,_,new o.CSSProperty(this,"--start-offset",0,{rawValueCheck:!1})),e(this,M,new o.CSSProperty(this,"--capture-once",!1)),e(this,d,new o.CSSProperty(this,"--captured","")),e(this,y,new o.CSSProperty(this,"--released","")),e(this,g,new o.CSSProperty(this,"--captured-from-start","")),e(this,v,new o.CSSProperty(this,"--captured-from-finish","")),e(this,A,new o.CSSProperty(this,"--released-from-start","")),e(this,p,new o.CSSProperty(this,"--released-from-finish","")),e(this,R,new o.CSSProperty(this,"--passed-var","")),e(this,O,new o.CSSProperty(this,"--progress-var","")),e(this,B,new o.CSSProperty(this,"--animation-var-type","current")),e(this,k,new o.CSSProperty(this,"--distance-var","")),e(this,z,new o.CSSProperty(this,"--start-var","")),e(this,q,new o.CSSProperty(this,"--finish-var","")),e(this,l,new X.Store(!1)),e(this,P,new X.Store(!1)),e(this,w,new X.Store(!1)),e(this,E,new X.Store(!1)),e(this,L,new X.Store(!1)),e(this,F,new X.Store(!1)),e(this,Y,[]),e(this,n,this),e(this,$,0),e(this,W,0),e(this,tt,0),e(this,m,new Et.Damped(0,{order:ut.TICK_ORDER.SEGMENT,min:0,max:1})),e(this,H,0),e(this,C,0),e(this,b,0),e(this,V,0),e(this,J,!1),e(this,I,!1),e(this,u,!0),this.findAnotherScrollEntries=wt.debounce(()=>{const r=Vt.scrollEntries.getAll(this).reverse();let s=0;r.forEach((x,et)=>{x.element===t(this,S)&&(s=et)}),e(this,Y,r.slice(s+1))},0),e(this,st,()=>{t(this,u)||(this.resize(),t(this,Q).call(this))}),e(this,Q,()=>{!t(this,u)&&t(this,J)&&this.tick()})}get scrollContainer(){return t(this,S)}set scrollContainer(r){c(this,h,ht).call(this),e(this,S,r),c(this,h,it).call(this)}get distanceOffsetCSSProperty(){return t(this,D)}get startOffsetCSSProperty(){return t(this,_)}get captureOnceCSSProperty(){return t(this,M)}get capturedCSSProperty(){return t(this,d)}get releasedCSSProperty(){return t(this,y)}get capturedFromStartCSSProperty(){return t(this,g)}get capturedFromFinishCSSProperty(){return t(this,v)}get releasedFromStartCSSProperty(){return t(this,A)}get releasedFromFinishCSSProperty(){return t(this,p)}get passedVarCSSProperty(){return t(this,R)}get progressVarCSSProperty(){return t(this,O)}get animationVarTypeCSSProperty(){return t(this,B)}get distanceVarCSSProperty(){return t(this,k)}get startVarCSSProperty(){return t(this,z)}get finishVarCSSProperty(){return t(this,q)}get disabledCSSProperty(){return t(this,T)}get dampingCSSProperty(){return t(this,j)}get massCSSProperty(){return t(this,G)}get stiffnessCSSProperty(){return t(this,K)}get targetCSSProperty(){return t(this,N)}get isCaptured(){return t(this,l)}get isReleased(){return t(this,P)}get isCapturedFromStart(){return t(this,w)}get isReleasedFromStart(){return t(this,E)}get isCapturedFromFinish(){return t(this,L)}get isReleasedFromFinish(){return t(this,F)}get directionPosition(){return t(this,$)}get directionSize(){return t(this,W)}get passed(){return t(this,m)}get progress(){return t(this,H)}get start(){return t(this,C)}get finish(){return t(this,V)}get distance(){return t(this,b)}get isCapturedOnce(){return t(this,I)}get isDisabled(){return t(this,u)}resize(){e(this,W,t(this,S).vertical?this.offsetHeight:this.offsetWidth);const r=t(this,S)instanceof HTMLElement?t(this,S):t(this,S).element;e(this,$,t(this,S).vertical?lt.getCumulativeOffsetTop(this,r):lt.getCumulativeOffsetLeft(this,r));const x=c(this,h,ft).call(this).reduce((et,ct)=>et+(t(this,S).vertical?ct.offsetTop:ct.offsetLeft),0);e(this,$,t(this,$)-x),e(this,C,this.getStart()),e(this,b,this.getDistance()),e(this,C,t(this,C)+t(this,_).current),e(this,b,t(this,b)+t(this,D).current),e(this,V,t(this,C)+t(this,b)),t(this,S).currentScrollValue>t(this,V)&&!t(this,l).current&&!t(this,P).current&&(t(this,l).current=!0),this.setVar(t(this,z).current,t(this,C)),this.setVar(t(this,q).current,t(this,V)),this.setVar(t(this,k).current,t(this,b)),t(this,m).max=t(this,b),e(this,J,!0)}tick(){let r=t(this,S).currentScrollValue;t(this,Y).forEach(x=>{r+=x.value}),t(this,m).set(r-t(this,C));const s=Math.round(r);t(this,l).current&&(s>=t(this,C)?t(this,w).current||c(this,h,bt).call(this):t(this,w).current&&!t(this,E).current&&c(this,h,yt).call(this),s<t(this,V)?t(this,F).current&&!t(this,L).current&&c(this,h,Ct).call(this):t(this,w).current&&!t(this,F).current&&c(this,h,gt).call(this)),s>=t(this,C)&&s<t(this,V)?t(this,l).current||c(this,h,dt).call(this):t(this,l).current&&(t(this,m).set(Ft.step(t(this,b)/2,t(this,m).target,0,t(this,b))),c(this,h,mt).call(this)),t(this,I)&&t(this,M).current&&(t(this,d).current&&t(this,n).classList.add(t(this,d).current),e(this,u,!0))}disable(){this.style.cssText="",e(this,$,0),e(this,W,0),t(this,m).reset(),e(this,H,0),e(this,C,0),e(this,b,0),e(this,V,0),e(this,J,!1),t(this,l).current=!1,t(this,P).current=!1,t(this,w).current=!1,t(this,E).current=!1,t(this,L).current=!1,t(this,F).current=!1,e(this,I,!1),e(this,u,!0),c(this,h,nt).call(this)}enable(){e(this,u,!1)}connectedCallback(){c(this,h,it).call(this)}disconnectedCallback(){c(this,h,ht).call(this)}removeVar(r){r&&t(this,n).style.removeProperty(`--${r}`)}setVar(r,s){r&&t(this,n).style.setProperty(`--${r}`,s.toString())}getDistance(){return t(this,W)+t(this,tt)}getStart(){return t(this,$)-t(this,tt)}},S=new WeakMap,j=new WeakMap,G=new WeakMap,K=new WeakMap,N=new WeakMap,T=new WeakMap,D=new WeakMap,_=new WeakMap,M=new WeakMap,d=new WeakMap,y=new WeakMap,g=new WeakMap,v=new WeakMap,A=new WeakMap,p=new WeakMap,R=new WeakMap,O=new WeakMap,B=new WeakMap,k=new WeakMap,z=new WeakMap,q=new WeakMap,l=new WeakMap,P=new WeakMap,w=new WeakMap,E=new WeakMap,L=new WeakMap,F=new WeakMap,Y=new WeakMap,n=new WeakMap,$=new WeakMap,W=new WeakMap,tt=new WeakMap,m=new WeakMap,H=new WeakMap,C=new WeakMap,b=new WeakMap,V=new WeakMap,J=new WeakMap,I=new WeakMap,u=new WeakMap,h=new WeakSet,ft=function(){const r=[];let s=this.parentElement;for(;s;)window.getComputedStyle(s).position==="sticky"&&r.push(s),s=s.parentElement;return r},it=function(){if(!t(this,S))return;t(this,l).subscribe(s=>{s.current&&U.dispatchEvent(this,"scrollSegmentCapture",{composed:!0,custom:!0})}),t(this,w).subscribe(s=>{s.current&&U.dispatchEvent(this,"scrollSegmentCaptureFromStart",{composed:!0,custom:!0})}),t(this,L).subscribe(s=>{s.current&&U.dispatchEvent(this,"scrollSegmentCaptureFromFinish",{composed:!0,custom:!0})}),t(this,P).subscribe(s=>{s.current&&U.dispatchEvent(this,"scrollSegmentRelease",{composed:!0,custom:!0})}),t(this,E).subscribe(s=>{s.current&&U.dispatchEvent(this,"scrollSegmentReleaseFromStart",{composed:!0,custom:!0})}),t(this,F).subscribe(s=>{s.current&&U.dispatchEvent(this,"scrollSegmentReleaseFromFinish",{composed:!0,custom:!0})}),t(this,j).observe(),t(this,G).observe(),t(this,K).observe(),t(this,N).observe(),t(this,T).observe(),t(this,D).observe(),t(this,_).observe(),t(this,M).observe(),t(this,d).observe(),t(this,y).observe(),t(this,g).observe(),t(this,v).observe(),t(this,A).observe(),t(this,p).observe(),t(this,R).observe(),t(this,O).observe(),t(this,B).observe(),t(this,k).observe(),t(this,z).observe(),t(this,q).observe();let r=!1;this.findAnotherScrollEntries(),t(this,T).current||this.enable(),t(this,j).subscribe(s=>{t(this,m).damping=s.current}),t(this,G).subscribe(s=>{t(this,m).mass=s.current}),t(this,K).subscribe(s=>{t(this,m).stiffness=s.current}),t(this,N).subscribe(s=>{s.previous&&c(this,h,nt).call(this),s.current?s.current==="parent"?e(this,n,this.parentElement||this):e(this,n,document.querySelector(s.current)||this):e(this,n,this)}),t(this,T).subscribe(s=>{s.current&&!s.previous?this.disable():!s.current&&s.previous&&(this.resize(),this.enable())}),t(this,_).subscribe(()=>{r&&!t(this,u)&&this.resize()}),t(this,D).subscribe(()=>{r&&!t(this,u)&&this.resize()}),t(this,d).subscribe(s=>{c(this,h,Z).call(this,s)}),t(this,g).subscribe(s=>{c(this,h,Z).call(this,s)}),t(this,v).subscribe(s=>{c(this,h,Z).call(this,s)}),t(this,y).subscribe(s=>{c(this,h,Z).call(this,s)}),t(this,A).subscribe(s=>{c(this,h,Z).call(this,s)}),t(this,p).subscribe(s=>{c(this,h,Z).call(this,s)}),t(this,M).subscribe(s=>{t(this,u)||!s.current&&s.previous&&(this.resize(),this.enable())}),t(this,R).subscribe(s=>{t(this,u)||(this.removeVar(s.previous),this.setVar(s.current,this.passed.current))}),t(this,O).subscribe(s=>{t(this,u)||(this.removeVar(s.previous),this.setVar(s.current,t(this,H)))}),t(this,z).subscribe(s=>{t(this,u)||(this.removeVar(s.previous),this.setVar(s.current,t(this,C)))}),t(this,q).subscribe(s=>{t(this,u)||(this.removeVar(s.previous),this.setVar(s.current,t(this,V)))}),t(this,k).subscribe(s=>{t(this,u)||(this.removeVar(s.previous),this.setVar(s.current,t(this,b)))}),t(this,m).subscribe(s=>{const x=t(this,m)[t(this,B).current];e(this,H,x/t(this,b)||0),this.setVar(t(this,R).current,x.toFixed(6)),this.setVar(t(this,O).current,t(this,H).toFixed(6))}),at.windowResizer.subscribe(t(this,st),ut.RESIZE_ORDER.SCROLL),this.scrollContainer.onScroll(t(this,Q)),r=!0},ht=function(){t(this,S)&&(at.windowResizer.unsubscribe(t(this,st)),this.scrollContainer.offScroll(t(this,Q)),t(this,j).close(),t(this,G).close(),t(this,K).close(),t(this,N).close(),t(this,T).close(),t(this,D).close(),t(this,_).close(),t(this,M).close(),t(this,d).close(),t(this,y).close(),t(this,g).close(),t(this,v).close(),t(this,A).close(),t(this,p).close(),t(this,R).close(),t(this,O).close(),t(this,k).close(),t(this,z).close(),t(this,q).close(),t(this,l).close(),t(this,P).close(),t(this,w).close(),t(this,E).close(),t(this,L).close(),t(this,F).close(),this.disable())},dt=function(){t(this,l).current=!0,t(this,P).current=!1,e(this,I,!0),t(this,y).current&&t(this,n).classList.remove(t(this,y).current),t(this,p).current&&t(this,n).classList.remove(t(this,p).current),t(this,p).current&&t(this,n).classList.remove(t(this,p).current),t(this,d).current&&t(this,n).classList.add(t(this,d).current)},mt=function(){t(this,P).current=!0,t(this,l).current=!1,e(this,I,!0),t(this,d).current&&t(this,n).classList.remove(t(this,d).current),t(this,g).current&&t(this,n).classList.remove(t(this,g).current),t(this,v).current&&t(this,n).classList.remove(t(this,v).current),t(this,y).current&&t(this,n).classList.add(t(this,y).current)},bt=function(){t(this,l).current=!0,t(this,w).current=!0,t(this,E).current=!1,t(this,g).current&&t(this,n).classList.add(t(this,g).current)},Ct=function(){t(this,l).current=!0,t(this,L).current=!0,t(this,F).current=!1,t(this,v).current&&t(this,n).classList.add(t(this,v).current)},yt=function(){t(this,P).current=!0,t(this,E).current=!0,t(this,w).current=!1,t(this,p).current&&t(this,n).classList.add(t(this,p).current)},gt=function(){t(this,P).current=!0,t(this,F).current=!0,t(this,L).current=!1,t(this,p).current&&t(this,n).classList.add(t(this,p).current)},st=new WeakMap,Q=new WeakMap,Z=function(r){if(t(this,u)){r.previous&&t(this,n).classList.remove(r.previous),r.current&&t(this,n).classList.remove(r.current);return}r.current&&t(this,l).current?(r.previous&&t(this,n).classList.remove(r.previous),t(this,n).classList.add(r.current)):!r.current&&r.previous&&t(this,n).classList.remove(r.previous)},vt=function(...r){r.forEach(s=>{s&&t(this,n).classList.remove(s)})},Pt=function(...r){r.forEach(s=>{s&&t(this,n).style.removeProperty(`--${s}`)})},nt=function(){c(this,h,vt).call(this,t(this,d).current,t(this,g).current,t(this,v).current,t(this,y).current,t(this,A).current,t(this,p).current),c(this,h,Pt).call(this,t(this,R).current,t(this,O).current,t(this,k).current,t(this,z).current,t(this,q).current)},St);customElements.get("scroll-segment")||customElements.define("scroll-segment",pt);exports.ScrollSegmentElement=pt;
1
+ "use strict";var ot=a=>{throw TypeError(a)};var rt=(a,f,r)=>f.has(a)||ot("Cannot "+r);var t=(a,f,r)=>(rt(a,f,"read from private field"),r?r.call(a):f.get(a)),i=(a,f,r)=>f.has(a)?ot("Cannot add the same private member more than once"):f instanceof WeakSet?f.add(a):f.set(a,r),e=(a,f,r,s)=>(rt(a,f,"write to private field"),s?s.call(a,r):f.set(a,r),r),c=(a,f,r)=>(rt(a,f,"access private method"),r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../css-property/index.cjs"),ut=require("../order/index.cjs"),at=require("../window-resizer/index.cjs"),wt=require("../index-Cqw2NKev.cjs"),U=require("../events-KVanG9sR.cjs"),Ft=require("../function-MthRj-GJ.cjs"),lt=require("../layout-Ctc2p3uz.cjs"),Vt=require("../math-GDWEqu7y.cjs"),X=require("../Store-DRp_K37w.cjs"),Et=require("../scroll-entries/index.cjs");require("../ticker/index.cjs");const Lt=require("../Damped-BbJjFOLH.cjs");var S,j,B,G,K,T,D,_,M,d,y,g,v,A,p,R,O,Z,k,z,q,l,P,w,E,L,F,Y,n,$,N,tt,m,H,C,b,V,J,I,u,h,ft,it,ht,dt,mt,bt,Ct,yt,gt,st,Q,W,vt,Pt,nt,St;let pt=(St=class extends HTMLElement{constructor(){super();i(this,h);i(this,S);i(this,j);i(this,B);i(this,G);i(this,K);i(this,T);i(this,D);i(this,_);i(this,M);i(this,d);i(this,y);i(this,g);i(this,v);i(this,A);i(this,p);i(this,R);i(this,O);i(this,Z);i(this,k);i(this,z);i(this,q);i(this,l);i(this,P);i(this,w);i(this,E);i(this,L);i(this,F);i(this,Y);i(this,n);i(this,$);i(this,N);i(this,tt);i(this,m);i(this,H);i(this,C);i(this,b);i(this,V);i(this,J);i(this,I);i(this,u);i(this,st);i(this,Q);e(this,S,null),e(this,j,new o.CSSProperty(this,"--damping",20)),e(this,B,new o.CSSProperty(this,"--mass",0)),e(this,G,new o.CSSProperty(this,"--stiffness",0)),e(this,K,new o.CSSProperty(this,"--target","")),e(this,T,new o.CSSProperty(this,"--disabled",!1)),e(this,D,new o.CSSProperty(this,"--distance-offset",0,{rawValueCheck:!1})),e(this,_,new o.CSSProperty(this,"--start-offset",0,{rawValueCheck:!1})),e(this,M,new o.CSSProperty(this,"--capture-once",!1)),e(this,d,new o.CSSProperty(this,"--captured","")),e(this,y,new o.CSSProperty(this,"--released","")),e(this,g,new o.CSSProperty(this,"--captured-from-start","")),e(this,v,new o.CSSProperty(this,"--captured-from-finish","")),e(this,A,new o.CSSProperty(this,"--released-from-start","")),e(this,p,new o.CSSProperty(this,"--released-from-finish","")),e(this,R,new o.CSSProperty(this,"--passed-var","")),e(this,O,new o.CSSProperty(this,"--progress-var","")),e(this,Z,new o.CSSProperty(this,"--animation-var-type","current")),e(this,k,new o.CSSProperty(this,"--distance-var","")),e(this,z,new o.CSSProperty(this,"--start-var","")),e(this,q,new o.CSSProperty(this,"--finish-var","")),e(this,l,new X.Store(!1)),e(this,P,new X.Store(!1)),e(this,w,new X.Store(!1)),e(this,E,new X.Store(!1)),e(this,L,new X.Store(!1)),e(this,F,new X.Store(!1)),e(this,Y,[]),e(this,n,this),e(this,$,0),e(this,N,0),e(this,tt,0),e(this,m,new Lt.Damped(0,{order:ut.TICK_ORDER.SEGMENT,min:0,max:1})),e(this,H,0),e(this,C,0),e(this,b,0),e(this,V,0),e(this,J,!1),e(this,I,!1),e(this,u,!0),this.findAnotherScrollEntries=Ft.debounce(()=>{const r=Et.scrollEntries.getAll(this).reverse();let s=0;r.forEach((x,et)=>{x.element===t(this,S)&&(s=et)}),e(this,Y,r.slice(s+1))},0),e(this,st,()=>{t(this,u)||(this.resize(),t(this,Q).call(this))}),e(this,Q,()=>{!t(this,u)&&t(this,J)&&this.tick()})}get scrollContainer(){return t(this,S)}set scrollContainer(r){c(this,h,ht).call(this),e(this,S,r),c(this,h,it).call(this)}get distanceOffsetCSSProperty(){return t(this,D)}get startOffsetCSSProperty(){return t(this,_)}get captureOnceCSSProperty(){return t(this,M)}get capturedCSSProperty(){return t(this,d)}get releasedCSSProperty(){return t(this,y)}get capturedFromStartCSSProperty(){return t(this,g)}get capturedFromFinishCSSProperty(){return t(this,v)}get releasedFromStartCSSProperty(){return t(this,A)}get releasedFromFinishCSSProperty(){return t(this,p)}get passedVarCSSProperty(){return t(this,R)}get progressVarCSSProperty(){return t(this,O)}get animationVarTypeCSSProperty(){return t(this,Z)}get distanceVarCSSProperty(){return t(this,k)}get startVarCSSProperty(){return t(this,z)}get finishVarCSSProperty(){return t(this,q)}get disabledCSSProperty(){return t(this,T)}get dampingCSSProperty(){return t(this,j)}get massCSSProperty(){return t(this,B)}get stiffnessCSSProperty(){return t(this,G)}get targetCSSProperty(){return t(this,K)}get isCaptured(){return t(this,l)}get isReleased(){return t(this,P)}get isCapturedFromStart(){return t(this,w)}get isReleasedFromStart(){return t(this,E)}get isCapturedFromFinish(){return t(this,L)}get isReleasedFromFinish(){return t(this,F)}get directionPosition(){return t(this,$)}get directionSize(){return t(this,N)}get passed(){return t(this,m)}get progress(){return t(this,H)}get start(){return t(this,C)}get finish(){return t(this,V)}get distance(){return t(this,b)}get isCapturedOnce(){return t(this,I)}get isDisabled(){return t(this,u)}resize(){e(this,N,t(this,S).vertical?this.offsetHeight:this.offsetWidth);const r=t(this,S)instanceof HTMLElement?t(this,S):t(this,S).element;e(this,$,t(this,S).vertical?lt.getCumulativeOffsetTop(this,r):lt.getCumulativeOffsetLeft(this,r));const x=c(this,h,ft).call(this).reduce((et,ct)=>et+(t(this,S).vertical?ct.offsetTop:ct.offsetLeft),0);e(this,$,t(this,$)-x),e(this,C,this.getStart()),e(this,b,this.getDistance()),e(this,C,t(this,C)+t(this,_).current),e(this,b,t(this,b)+t(this,D).current),e(this,V,t(this,C)+t(this,b)),t(this,S).currentScrollValue>t(this,V)&&!t(this,l).current&&!t(this,P).current&&(t(this,l).current=!0),this.setVar(t(this,z).current,t(this,C)),this.setVar(t(this,q).current,t(this,V)),this.setVar(t(this,k).current,t(this,b)),t(this,m).max=t(this,b),e(this,J,!0)}tick(){let r=t(this,S).currentScrollValue;t(this,Y).forEach(x=>{r+=x.value}),t(this,m).set(r-t(this,C));const s=Math.round(r);t(this,l).current&&(s>=t(this,C)?t(this,w).current||c(this,h,bt).call(this):t(this,w).current&&!t(this,E).current&&c(this,h,yt).call(this),s<t(this,V)?t(this,F).current&&!t(this,L).current&&c(this,h,Ct).call(this):t(this,w).current&&!t(this,F).current&&c(this,h,gt).call(this)),s>=t(this,C)&&s<t(this,V)?t(this,l).current||c(this,h,dt).call(this):t(this,l).current&&(t(this,m).set(Vt.step(t(this,b)/2,t(this,m).target,0,t(this,b))),c(this,h,mt).call(this)),t(this,I)&&t(this,M).current&&(t(this,d).current&&t(this,n).classList.add(t(this,d).current),e(this,u,!0))}disable(){this.style.cssText="",e(this,$,0),e(this,N,0),t(this,m).reset(),e(this,H,0),e(this,C,0),e(this,b,0),e(this,V,0),e(this,J,!1),t(this,l).current=!1,t(this,P).current=!1,t(this,w).current=!1,t(this,E).current=!1,t(this,L).current=!1,t(this,F).current=!1,e(this,I,!1),e(this,u,!0),c(this,h,nt).call(this)}enable(){e(this,u,!1)}connectedCallback(){c(this,h,it).call(this)}disconnectedCallback(){c(this,h,ht).call(this)}removeVar(r){r&&t(this,n).style.removeProperty(`--${r}`)}setVar(r,s){r&&t(this,n).style.setProperty(`--${r}`,s.toString())}getDistance(){return t(this,N)+t(this,tt)}getStart(){return t(this,$)-t(this,tt)}},S=new WeakMap,j=new WeakMap,B=new WeakMap,G=new WeakMap,K=new WeakMap,T=new WeakMap,D=new WeakMap,_=new WeakMap,M=new WeakMap,d=new WeakMap,y=new WeakMap,g=new WeakMap,v=new WeakMap,A=new WeakMap,p=new WeakMap,R=new WeakMap,O=new WeakMap,Z=new WeakMap,k=new WeakMap,z=new WeakMap,q=new WeakMap,l=new WeakMap,P=new WeakMap,w=new WeakMap,E=new WeakMap,L=new WeakMap,F=new WeakMap,Y=new WeakMap,n=new WeakMap,$=new WeakMap,N=new WeakMap,tt=new WeakMap,m=new WeakMap,H=new WeakMap,C=new WeakMap,b=new WeakMap,V=new WeakMap,J=new WeakMap,I=new WeakMap,u=new WeakMap,h=new WeakSet,ft=function(){const r=[];let s=this.parentElement;for(;s;)window.getComputedStyle(s).position==="sticky"&&r.push(s),s=s.parentElement;return r},it=function(){if(!t(this,S))return;t(this,l).subscribe(s=>{s.current&&U.dispatchEvent(this,"scrollSegmentCapture",{composed:!0,custom:!0})}),t(this,w).subscribe(s=>{s.current&&U.dispatchEvent(this,"scrollSegmentCaptureFromStart",{composed:!0,custom:!0})}),t(this,L).subscribe(s=>{s.current&&U.dispatchEvent(this,"scrollSegmentCaptureFromFinish",{composed:!0,custom:!0})}),t(this,P).subscribe(s=>{s.current&&U.dispatchEvent(this,"scrollSegmentRelease",{composed:!0,custom:!0})}),t(this,E).subscribe(s=>{s.current&&U.dispatchEvent(this,"scrollSegmentReleaseFromStart",{composed:!0,custom:!0})}),t(this,F).subscribe(s=>{s.current&&U.dispatchEvent(this,"scrollSegmentReleaseFromFinish",{composed:!0,custom:!0})}),t(this,j).observe(),t(this,B).observe(),t(this,G).observe(),t(this,K).observe(),t(this,T).observe(),t(this,D).observe(),t(this,_).observe(),t(this,M).observe(),t(this,d).observe(),t(this,y).observe(),t(this,g).observe(),t(this,v).observe(),t(this,A).observe(),t(this,p).observe(),t(this,R).observe(),t(this,O).observe(),t(this,Z).observe(),t(this,k).observe(),t(this,z).observe(),t(this,q).observe();let r=!1;this.findAnotherScrollEntries(),t(this,T).current||this.enable(),t(this,j).subscribe(s=>{t(this,m).damping=s.current}),t(this,B).subscribe(s=>{t(this,m).mass=s.current}),t(this,G).subscribe(s=>{t(this,m).stiffness=s.current}),t(this,K).subscribe(s=>{s.previous&&c(this,h,nt).call(this),s.current?s.current==="parent"?e(this,n,this.parentElement||this):e(this,n,document.querySelector(s.current)||this):e(this,n,this)}),t(this,T).subscribe(s=>{s.current&&!s.previous?this.disable():!s.current&&s.previous&&(this.resize(),this.enable())}),t(this,_).subscribe(()=>{r&&!t(this,u)&&this.resize()}),t(this,D).subscribe(()=>{r&&!t(this,u)&&this.resize()}),t(this,d).subscribe(s=>{c(this,h,W).call(this,s)}),t(this,g).subscribe(s=>{c(this,h,W).call(this,s)}),t(this,v).subscribe(s=>{c(this,h,W).call(this,s)}),t(this,y).subscribe(s=>{c(this,h,W).call(this,s)}),t(this,A).subscribe(s=>{c(this,h,W).call(this,s)}),t(this,p).subscribe(s=>{c(this,h,W).call(this,s)}),t(this,M).subscribe(s=>{t(this,u)||!s.current&&s.previous&&(this.resize(),this.enable())}),t(this,R).subscribe(s=>{t(this,u)||(this.removeVar(s.previous),this.setVar(s.current,this.passed.current))}),t(this,O).subscribe(s=>{t(this,u)||(this.removeVar(s.previous),this.setVar(s.current,t(this,H)))}),t(this,z).subscribe(s=>{t(this,u)||(this.removeVar(s.previous),this.setVar(s.current,t(this,C)))}),t(this,q).subscribe(s=>{t(this,u)||(this.removeVar(s.previous),this.setVar(s.current,t(this,V)))}),t(this,k).subscribe(s=>{t(this,u)||(this.removeVar(s.previous),this.setVar(s.current,t(this,b)))}),t(this,m).subscribe(s=>{const x=t(this,m)[t(this,Z).current];e(this,H,x/t(this,b)||0),this.setVar(t(this,R).current,x.toFixed(6)),this.setVar(t(this,O).current,t(this,H).toFixed(6))}),at.windowResizer.subscribe(t(this,st),ut.RESIZE_ORDER.SCROLL),this.scrollContainer.onScroll(t(this,Q)),r=!0},ht=function(){t(this,S)&&(at.windowResizer.unsubscribe(t(this,st)),this.scrollContainer.offScroll(t(this,Q)),t(this,j).close(),t(this,B).close(),t(this,G).close(),t(this,K).close(),t(this,T).close(),t(this,D).close(),t(this,_).close(),t(this,M).close(),t(this,d).close(),t(this,y).close(),t(this,g).close(),t(this,v).close(),t(this,A).close(),t(this,p).close(),t(this,R).close(),t(this,O).close(),t(this,k).close(),t(this,z).close(),t(this,q).close(),t(this,l).close(),t(this,P).close(),t(this,w).close(),t(this,E).close(),t(this,L).close(),t(this,F).close(),this.disable())},dt=function(){t(this,l).current=!0,t(this,P).current=!1,e(this,I,!0),t(this,y).current&&t(this,n).classList.remove(t(this,y).current),t(this,p).current&&t(this,n).classList.remove(t(this,p).current),t(this,p).current&&t(this,n).classList.remove(t(this,p).current),t(this,d).current&&t(this,n).classList.add(t(this,d).current)},mt=function(){t(this,P).current=!0,t(this,l).current=!1,e(this,I,!0),t(this,d).current&&t(this,n).classList.remove(t(this,d).current),t(this,g).current&&t(this,n).classList.remove(t(this,g).current),t(this,v).current&&t(this,n).classList.remove(t(this,v).current),t(this,y).current&&t(this,n).classList.add(t(this,y).current)},bt=function(){t(this,l).current=!0,t(this,w).current=!0,t(this,E).current=!1,t(this,g).current&&t(this,n).classList.add(t(this,g).current)},Ct=function(){t(this,l).current=!0,t(this,L).current=!0,t(this,F).current=!1,t(this,v).current&&t(this,n).classList.add(t(this,v).current)},yt=function(){t(this,P).current=!0,t(this,E).current=!0,t(this,w).current=!1,t(this,p).current&&t(this,n).classList.add(t(this,p).current)},gt=function(){t(this,P).current=!0,t(this,F).current=!0,t(this,L).current=!1,t(this,p).current&&t(this,n).classList.add(t(this,p).current)},st=new WeakMap,Q=new WeakMap,W=function(r){if(t(this,u)){r.previous&&t(this,n).classList.remove(r.previous),r.current&&t(this,n).classList.remove(r.current);return}r.current&&t(this,l).current?(r.previous&&t(this,n).classList.remove(r.previous),t(this,n).classList.add(r.current)):!r.current&&r.previous&&t(this,n).classList.remove(r.previous)},vt=function(...r){r.forEach(s=>{s&&t(this,n).classList.remove(s)})},Pt=function(...r){r.forEach(s=>{s&&t(this,n).style.removeProperty(`--${s}`)})},nt=function(){c(this,h,vt).call(this,t(this,d).current,t(this,g).current,t(this,v).current,t(this,y).current,t(this,A).current,t(this,p).current),c(this,h,Pt).call(this,t(this,R).current,t(this,O).current,t(this,k).current,t(this,z).current,t(this,q).current)},St);wt.isBrowser&&!customElements.get("scroll-segment")&&customElements.define("scroll-segment",pt);exports.ScrollSegmentElement=pt;
@@ -1,34 +1,35 @@
1
1
  var ot = (a) => {
2
2
  throw TypeError(a);
3
3
  };
4
- var rt = (a, S, r) => S.has(a) || ot("Cannot " + r);
5
- var t = (a, S, r) => (rt(a, S, "read from private field"), r ? r.call(a) : S.get(a)), i = (a, S, r) => S.has(a) ? ot("Cannot add the same private member more than once") : S instanceof WeakSet ? S.add(a) : S.set(a, r), e = (a, S, r, s) => (rt(a, S, "write to private field"), s ? s.call(a, r) : S.set(a, r), r), c = (a, S, r) => (rt(a, S, "access private method"), r);
4
+ var rt = (a, m, r) => m.has(a) || ot("Cannot " + r);
5
+ var t = (a, m, r) => (rt(a, m, "read from private field"), r ? r.call(a) : m.get(a)), i = (a, m, r) => m.has(a) ? ot("Cannot add the same private member more than once") : m instanceof WeakSet ? m.add(a) : m.set(a, r), e = (a, m, r, s) => (rt(a, m, "write to private field"), s ? s.call(a, r) : m.set(a, r), r), c = (a, m, r) => (rt(a, m, "access private method"), r);
6
6
  import { CSSProperty as o } from "../css-property/index.js";
7
7
  import { TICK_ORDER as vt, RESIZE_ORDER as yt } from "../order/index.js";
8
8
  import { windowResizer as ut } from "../window-resizer/index.js";
9
+ import { i as Pt } from "../index-euf5anj6.js";
9
10
  import { d as U } from "../events-CsVF98U6.js";
10
- import { d as Pt } from "../function-C10DGppn.js";
11
- import { a as Ft, g as Vt } from "../layout-DpZo-I0y.js";
12
- import { s as wt } from "../math-BOBiC4TN.js";
13
- import { S as X } from "../Store-Cm3LPXlx.js";
14
- import { scrollEntries as Lt } from "../scroll-entries/index.js";
11
+ import { d as Ft } from "../function-C10DGppn.js";
12
+ import { a as Vt, g as wt } from "../layout-DpZo-I0y.js";
13
+ import { s as Lt } from "../math-BOBiC4TN.js";
14
+ import { S as X } from "../Store-D2xCXENW.js";
15
+ import { scrollEntries as Et } from "../scroll-entries/index.js";
15
16
  import "../ticker/index.js";
16
- import { D as Et } from "../Damped-DxylD27S.js";
17
- var f, G, K, N, W, x, M, A, $, m, C, v, y, H, p, R, k, B, O, z, D, l, P, F, L, E, V, Y, n, I, Z, tt, d, _, g, b, w, J, q, u, h, lt, it, ht, ft, pt, St, mt, dt, bt, st, Q, j, gt, Ct, nt, at;
18
- let Rt = (at = class extends HTMLElement {
17
+ import { D as Rt } from "../Damped-BMmEn7PH.js";
18
+ var f, B, G, K, N, x, M, A, $, S, C, v, y, H, p, R, k, j, O, z, D, l, P, F, L, E, V, Y, n, I, W, tt, d, _, g, b, w, J, q, u, h, lt, it, ht, ft, pt, mt, St, dt, bt, st, Q, Z, gt, Ct, nt, at;
19
+ let kt = (at = class extends HTMLElement {
19
20
  constructor() {
20
21
  super();
21
22
  i(this, h);
22
23
  i(this, f);
24
+ i(this, B);
23
25
  i(this, G);
24
26
  i(this, K);
25
27
  i(this, N);
26
- i(this, W);
27
28
  i(this, x);
28
29
  i(this, M);
29
30
  i(this, A);
30
31
  i(this, $);
31
- i(this, m);
32
+ i(this, S);
32
33
  i(this, C);
33
34
  i(this, v);
34
35
  i(this, y);
@@ -36,7 +37,7 @@ let Rt = (at = class extends HTMLElement {
36
37
  i(this, p);
37
38
  i(this, R);
38
39
  i(this, k);
39
- i(this, B);
40
+ i(this, j);
40
41
  i(this, O);
41
42
  i(this, z);
42
43
  i(this, D);
@@ -49,7 +50,7 @@ let Rt = (at = class extends HTMLElement {
49
50
  i(this, Y);
50
51
  i(this, n);
51
52
  i(this, I);
52
- i(this, Z);
53
+ i(this, W);
53
54
  i(this, tt);
54
55
  i(this, d);
55
56
  i(this, _);
@@ -61,7 +62,7 @@ let Rt = (at = class extends HTMLElement {
61
62
  i(this, u);
62
63
  i(this, st);
63
64
  i(this, Q);
64
- e(this, f, null), e(this, G, new o(this, "--damping", 20)), e(this, K, new o(this, "--mass", 0)), e(this, N, new o(this, "--stiffness", 0)), e(this, W, new o(this, "--target", "")), e(this, x, new o(this, "--disabled", !1)), e(this, M, new o(
65
+ e(this, f, null), e(this, B, new o(this, "--damping", 20)), e(this, G, new o(this, "--mass", 0)), e(this, K, new o(this, "--stiffness", 0)), e(this, N, new o(this, "--target", "")), e(this, x, new o(this, "--disabled", !1)), e(this, M, new o(
65
66
  this,
66
67
  "--distance-offset",
67
68
  0,
@@ -72,7 +73,7 @@ let Rt = (at = class extends HTMLElement {
72
73
  this,
73
74
  "--capture-once",
74
75
  !1
75
- )), e(this, m, new o(this, "--captured", "")), e(this, C, new o(this, "--released", "")), e(this, v, new o(
76
+ )), e(this, S, new o(this, "--captured", "")), e(this, C, new o(this, "--released", "")), e(this, v, new o(
76
77
  this,
77
78
  "--captured-from-start",
78
79
  ""
@@ -88,12 +89,12 @@ let Rt = (at = class extends HTMLElement {
88
89
  this,
89
90
  "--released-from-finish",
90
91
  ""
91
- )), e(this, R, new o(this, "--passed-var", "")), e(this, k, new o(this, "--progress-var", "")), e(this, B, new o(
92
+ )), e(this, R, new o(this, "--passed-var", "")), e(this, k, new o(this, "--progress-var", "")), e(this, j, new o(
92
93
  this,
93
94
  "--animation-var-type",
94
95
  "current"
95
- )), e(this, O, new o(this, "--distance-var", "")), e(this, z, new o(this, "--start-var", "")), e(this, D, new o(this, "--finish-var", "")), e(this, l, new X(!1)), e(this, P, new X(!1)), e(this, F, new X(!1)), e(this, L, new X(!1)), e(this, E, new X(!1)), e(this, V, new X(!1)), e(this, Y, []), e(this, n, this), e(this, I, 0), e(this, Z, 0), e(this, tt, 0), e(this, d, new Et(0, { order: vt.SEGMENT, min: 0, max: 1 })), e(this, _, 0), e(this, g, 0), e(this, b, 0), e(this, w, 0), e(this, J, !1), e(this, q, !1), e(this, u, !0), this.findAnotherScrollEntries = Pt(() => {
96
- const r = Lt.getAll(this).reverse();
96
+ )), e(this, O, new o(this, "--distance-var", "")), e(this, z, new o(this, "--start-var", "")), e(this, D, new o(this, "--finish-var", "")), e(this, l, new X(!1)), e(this, P, new X(!1)), e(this, F, new X(!1)), e(this, L, new X(!1)), e(this, E, new X(!1)), e(this, V, new X(!1)), e(this, Y, []), e(this, n, this), e(this, I, 0), e(this, W, 0), e(this, tt, 0), e(this, d, new Rt(0, { order: vt.SEGMENT, min: 0, max: 1 })), e(this, _, 0), e(this, g, 0), e(this, b, 0), e(this, w, 0), e(this, J, !1), e(this, q, !1), e(this, u, !0), this.findAnotherScrollEntries = Ft(() => {
97
+ const r = Et.getAll(this).reverse();
97
98
  let s = 0;
98
99
  r.forEach((T, et) => {
99
100
  T.element === t(this, f) && (s = et);
@@ -120,7 +121,7 @@ let Rt = (at = class extends HTMLElement {
120
121
  return t(this, $);
121
122
  }
122
123
  get capturedCSSProperty() {
123
- return t(this, m);
124
+ return t(this, S);
124
125
  }
125
126
  get releasedCSSProperty() {
126
127
  return t(this, C);
@@ -144,7 +145,7 @@ let Rt = (at = class extends HTMLElement {
144
145
  return t(this, k);
145
146
  }
146
147
  get animationVarTypeCSSProperty() {
147
- return t(this, B);
148
+ return t(this, j);
148
149
  }
149
150
  get distanceVarCSSProperty() {
150
151
  return t(this, O);
@@ -159,16 +160,16 @@ let Rt = (at = class extends HTMLElement {
159
160
  return t(this, x);
160
161
  }
161
162
  get dampingCSSProperty() {
162
- return t(this, G);
163
+ return t(this, B);
163
164
  }
164
165
  get massCSSProperty() {
165
- return t(this, K);
166
+ return t(this, G);
166
167
  }
167
168
  get stiffnessCSSProperty() {
168
- return t(this, N);
169
+ return t(this, K);
169
170
  }
170
171
  get targetCSSProperty() {
171
- return t(this, W);
172
+ return t(this, N);
172
173
  }
173
174
  get isCaptured() {
174
175
  return t(this, l);
@@ -192,7 +193,7 @@ let Rt = (at = class extends HTMLElement {
192
193
  return t(this, I);
193
194
  }
194
195
  get directionSize() {
195
- return t(this, Z);
196
+ return t(this, W);
196
197
  }
197
198
  get passed() {
198
199
  return t(this, d);
@@ -216,9 +217,9 @@ let Rt = (at = class extends HTMLElement {
216
217
  return t(this, u);
217
218
  }
218
219
  resize() {
219
- e(this, Z, t(this, f).vertical ? this.offsetHeight : this.offsetWidth);
220
+ e(this, W, t(this, f).vertical ? this.offsetHeight : this.offsetWidth);
220
221
  const r = t(this, f) instanceof HTMLElement ? t(this, f) : t(this, f).element;
221
- e(this, I, t(this, f).vertical ? Ft(this, r) : Vt(this, r));
222
+ e(this, I, t(this, f).vertical ? Vt(this, r) : wt(this, r));
222
223
  const T = c(this, h, lt).call(this).reduce(
223
224
  (et, ct) => et + (t(this, f).vertical ? ct.offsetTop : ct.offsetLeft),
224
225
  0
@@ -231,12 +232,12 @@ let Rt = (at = class extends HTMLElement {
231
232
  r += T.value;
232
233
  }), t(this, d).set(r - t(this, g));
233
234
  const s = Math.round(r);
234
- t(this, l).current && (s >= t(this, g) ? t(this, F).current || c(this, h, St).call(this) : t(this, F).current && !t(this, L).current && c(this, h, dt).call(this), s < t(this, w) ? t(this, V).current && !t(this, E).current && c(this, h, mt).call(this) : t(this, F).current && !t(this, V).current && c(this, h, bt).call(this)), s >= t(this, g) && s < t(this, w) ? t(this, l).current || c(this, h, ft).call(this) : t(this, l).current && (t(this, d).set(
235
- wt(t(this, b) / 2, t(this, d).target, 0, t(this, b))
236
- ), c(this, h, pt).call(this)), t(this, q) && t(this, $).current && (t(this, m).current && t(this, n).classList.add(t(this, m).current), e(this, u, !0));
235
+ t(this, l).current && (s >= t(this, g) ? t(this, F).current || c(this, h, mt).call(this) : t(this, F).current && !t(this, L).current && c(this, h, dt).call(this), s < t(this, w) ? t(this, V).current && !t(this, E).current && c(this, h, St).call(this) : t(this, F).current && !t(this, V).current && c(this, h, bt).call(this)), s >= t(this, g) && s < t(this, w) ? t(this, l).current || c(this, h, ft).call(this) : t(this, l).current && (t(this, d).set(
236
+ Lt(t(this, b) / 2, t(this, d).target, 0, t(this, b))
237
+ ), c(this, h, pt).call(this)), t(this, q) && t(this, $).current && (t(this, S).current && t(this, n).classList.add(t(this, S).current), e(this, u, !0));
237
238
  }
238
239
  disable() {
239
- this.style.cssText = "", e(this, I, 0), e(this, Z, 0), t(this, d).reset(), e(this, _, 0), e(this, g, 0), e(this, b, 0), e(this, w, 0), e(this, J, !1), t(this, l).current = !1, t(this, P).current = !1, t(this, F).current = !1, t(this, L).current = !1, t(this, E).current = !1, t(this, V).current = !1, e(this, q, !1), e(this, u, !0), c(this, h, nt).call(this);
240
+ this.style.cssText = "", e(this, I, 0), e(this, W, 0), t(this, d).reset(), e(this, _, 0), e(this, g, 0), e(this, b, 0), e(this, w, 0), e(this, J, !1), t(this, l).current = !1, t(this, P).current = !1, t(this, F).current = !1, t(this, L).current = !1, t(this, E).current = !1, t(this, V).current = !1, e(this, q, !1), e(this, u, !0), c(this, h, nt).call(this);
240
241
  }
241
242
  enable() {
242
243
  e(this, u, !1);
@@ -254,12 +255,12 @@ let Rt = (at = class extends HTMLElement {
254
255
  r && t(this, n).style.setProperty(`--${r}`, s.toString());
255
256
  }
256
257
  getDistance() {
257
- return t(this, Z) + t(this, tt);
258
+ return t(this, W) + t(this, tt);
258
259
  }
259
260
  getStart() {
260
261
  return t(this, I) - t(this, tt);
261
262
  }
262
- }, f = new WeakMap(), G = new WeakMap(), K = new WeakMap(), N = new WeakMap(), W = new WeakMap(), x = new WeakMap(), M = new WeakMap(), A = new WeakMap(), $ = new WeakMap(), m = new WeakMap(), C = new WeakMap(), v = new WeakMap(), y = new WeakMap(), H = new WeakMap(), p = new WeakMap(), R = new WeakMap(), k = new WeakMap(), B = new WeakMap(), O = new WeakMap(), z = new WeakMap(), D = new WeakMap(), l = new WeakMap(), P = new WeakMap(), F = new WeakMap(), L = new WeakMap(), E = new WeakMap(), V = new WeakMap(), Y = new WeakMap(), n = new WeakMap(), I = new WeakMap(), Z = new WeakMap(), tt = new WeakMap(), d = new WeakMap(), _ = new WeakMap(), g = new WeakMap(), b = new WeakMap(), w = new WeakMap(), J = new WeakMap(), q = new WeakMap(), u = new WeakMap(), h = new WeakSet(), lt = function() {
263
+ }, f = new WeakMap(), B = new WeakMap(), G = new WeakMap(), K = new WeakMap(), N = new WeakMap(), x = new WeakMap(), M = new WeakMap(), A = new WeakMap(), $ = new WeakMap(), S = new WeakMap(), C = new WeakMap(), v = new WeakMap(), y = new WeakMap(), H = new WeakMap(), p = new WeakMap(), R = new WeakMap(), k = new WeakMap(), j = new WeakMap(), O = new WeakMap(), z = new WeakMap(), D = new WeakMap(), l = new WeakMap(), P = new WeakMap(), F = new WeakMap(), L = new WeakMap(), E = new WeakMap(), V = new WeakMap(), Y = new WeakMap(), n = new WeakMap(), I = new WeakMap(), W = new WeakMap(), tt = new WeakMap(), d = new WeakMap(), _ = new WeakMap(), g = new WeakMap(), b = new WeakMap(), w = new WeakMap(), J = new WeakMap(), q = new WeakMap(), u = new WeakMap(), h = new WeakSet(), lt = function() {
263
264
  const r = [];
264
265
  let s = this.parentElement;
265
266
  for (; s; )
@@ -298,15 +299,15 @@ let Rt = (at = class extends HTMLElement {
298
299
  composed: !0,
299
300
  custom: !0
300
301
  });
301
- }), t(this, G).observe(), t(this, K).observe(), t(this, N).observe(), t(this, W).observe(), t(this, x).observe(), t(this, M).observe(), t(this, A).observe(), t(this, $).observe(), t(this, m).observe(), t(this, C).observe(), t(this, v).observe(), t(this, y).observe(), t(this, H).observe(), t(this, p).observe(), t(this, R).observe(), t(this, k).observe(), t(this, B).observe(), t(this, O).observe(), t(this, z).observe(), t(this, D).observe();
302
+ }), t(this, B).observe(), t(this, G).observe(), t(this, K).observe(), t(this, N).observe(), t(this, x).observe(), t(this, M).observe(), t(this, A).observe(), t(this, $).observe(), t(this, S).observe(), t(this, C).observe(), t(this, v).observe(), t(this, y).observe(), t(this, H).observe(), t(this, p).observe(), t(this, R).observe(), t(this, k).observe(), t(this, j).observe(), t(this, O).observe(), t(this, z).observe(), t(this, D).observe();
302
303
  let r = !1;
303
- this.findAnotherScrollEntries(), t(this, x).current || this.enable(), t(this, G).subscribe((s) => {
304
+ this.findAnotherScrollEntries(), t(this, x).current || this.enable(), t(this, B).subscribe((s) => {
304
305
  t(this, d).damping = s.current;
305
- }), t(this, K).subscribe((s) => {
306
+ }), t(this, G).subscribe((s) => {
306
307
  t(this, d).mass = s.current;
307
- }), t(this, N).subscribe((s) => {
308
+ }), t(this, K).subscribe((s) => {
308
309
  t(this, d).stiffness = s.current;
309
- }), t(this, W).subscribe((s) => {
310
+ }), t(this, N).subscribe((s) => {
310
311
  s.previous && c(this, h, nt).call(this), s.current ? s.current === "parent" ? e(this, n, this.parentElement || this) : e(this, n, document.querySelector(s.current) || this) : e(this, n, this);
311
312
  }), t(this, x).subscribe((s) => {
312
313
  s.current && !s.previous ? this.disable() : !s.current && s.previous && (this.resize(), this.enable());
@@ -314,18 +315,18 @@ let Rt = (at = class extends HTMLElement {
314
315
  r && !t(this, u) && this.resize();
315
316
  }), t(this, M).subscribe(() => {
316
317
  r && !t(this, u) && this.resize();
317
- }), t(this, m).subscribe((s) => {
318
- c(this, h, j).call(this, s);
318
+ }), t(this, S).subscribe((s) => {
319
+ c(this, h, Z).call(this, s);
319
320
  }), t(this, v).subscribe((s) => {
320
- c(this, h, j).call(this, s);
321
+ c(this, h, Z).call(this, s);
321
322
  }), t(this, y).subscribe((s) => {
322
- c(this, h, j).call(this, s);
323
+ c(this, h, Z).call(this, s);
323
324
  }), t(this, C).subscribe((s) => {
324
- c(this, h, j).call(this, s);
325
+ c(this, h, Z).call(this, s);
325
326
  }), t(this, H).subscribe((s) => {
326
- c(this, h, j).call(this, s);
327
+ c(this, h, Z).call(this, s);
327
328
  }), t(this, p).subscribe((s) => {
328
- c(this, h, j).call(this, s);
329
+ c(this, h, Z).call(this, s);
329
330
  }), t(this, $).subscribe((s) => {
330
331
  t(this, u) || !s.current && s.previous && (this.resize(), this.enable());
331
332
  }), t(this, R).subscribe((s) => {
@@ -339,31 +340,31 @@ let Rt = (at = class extends HTMLElement {
339
340
  }), t(this, O).subscribe((s) => {
340
341
  t(this, u) || (this.removeVar(s.previous), this.setVar(s.current, t(this, b)));
341
342
  }), t(this, d).subscribe((s) => {
342
- const T = t(this, d)[t(this, B).current];
343
+ const T = t(this, d)[t(this, j).current];
343
344
  e(this, _, T / t(this, b) || 0), this.setVar(t(this, R).current, T.toFixed(6)), this.setVar(
344
345
  t(this, k).current,
345
346
  t(this, _).toFixed(6)
346
347
  );
347
348
  }), ut.subscribe(t(this, st), yt.SCROLL), this.scrollContainer.onScroll(t(this, Q)), r = !0;
348
349
  }, ht = function() {
349
- t(this, f) && (ut.unsubscribe(t(this, st)), this.scrollContainer.offScroll(t(this, Q)), t(this, G).close(), t(this, K).close(), t(this, N).close(), t(this, W).close(), t(this, x).close(), t(this, M).close(), t(this, A).close(), t(this, $).close(), t(this, m).close(), t(this, C).close(), t(this, v).close(), t(this, y).close(), t(this, H).close(), t(this, p).close(), t(this, R).close(), t(this, k).close(), t(this, O).close(), t(this, z).close(), t(this, D).close(), t(this, l).close(), t(this, P).close(), t(this, F).close(), t(this, L).close(), t(this, E).close(), t(this, V).close(), this.disable());
350
+ t(this, f) && (ut.unsubscribe(t(this, st)), this.scrollContainer.offScroll(t(this, Q)), t(this, B).close(), t(this, G).close(), t(this, K).close(), t(this, N).close(), t(this, x).close(), t(this, M).close(), t(this, A).close(), t(this, $).close(), t(this, S).close(), t(this, C).close(), t(this, v).close(), t(this, y).close(), t(this, H).close(), t(this, p).close(), t(this, R).close(), t(this, k).close(), t(this, O).close(), t(this, z).close(), t(this, D).close(), t(this, l).close(), t(this, P).close(), t(this, F).close(), t(this, L).close(), t(this, E).close(), t(this, V).close(), this.disable());
350
351
  }, ft = function() {
351
352
  t(this, l).current = !0, t(this, P).current = !1, e(this, q, !0), t(this, C).current && t(this, n).classList.remove(t(this, C).current), t(this, p).current && t(this, n).classList.remove(
352
353
  t(this, p).current
353
354
  ), t(this, p).current && t(this, n).classList.remove(
354
355
  t(this, p).current
355
- ), t(this, m).current && t(this, n).classList.add(t(this, m).current);
356
+ ), t(this, S).current && t(this, n).classList.add(t(this, S).current);
356
357
  }, pt = function() {
357
- t(this, P).current = !0, t(this, l).current = !1, e(this, q, !0), t(this, m).current && t(this, n).classList.remove(t(this, m).current), t(this, v).current && t(this, n).classList.remove(
358
+ t(this, P).current = !0, t(this, l).current = !1, e(this, q, !0), t(this, S).current && t(this, n).classList.remove(t(this, S).current), t(this, v).current && t(this, n).classList.remove(
358
359
  t(this, v).current
359
360
  ), t(this, y).current && t(this, n).classList.remove(
360
361
  t(this, y).current
361
362
  ), t(this, C).current && t(this, n).classList.add(t(this, C).current);
362
- }, St = function() {
363
+ }, mt = function() {
363
364
  t(this, l).current = !0, t(this, F).current = !0, t(this, L).current = !1, t(this, v).current && t(this, n).classList.add(
364
365
  t(this, v).current
365
366
  );
366
- }, mt = function() {
367
+ }, St = function() {
367
368
  t(this, l).current = !0, t(this, E).current = !0, t(this, V).current = !1, t(this, y).current && t(this, n).classList.add(
368
369
  t(this, y).current
369
370
  );
@@ -375,7 +376,7 @@ let Rt = (at = class extends HTMLElement {
375
376
  t(this, P).current = !0, t(this, V).current = !0, t(this, E).current = !1, t(this, p).current && t(this, n).classList.add(
376
377
  t(this, p).current
377
378
  );
378
- }, st = new WeakMap(), Q = new WeakMap(), j = function(r) {
379
+ }, st = new WeakMap(), Q = new WeakMap(), Z = function(r) {
379
380
  if (t(this, u)) {
380
381
  r.previous && t(this, n).classList.remove(r.previous), r.current && t(this, n).classList.remove(r.current);
381
382
  return;
@@ -390,9 +391,9 @@ let Rt = (at = class extends HTMLElement {
390
391
  s && t(this, n).style.removeProperty(`--${s}`);
391
392
  });
392
393
  }, nt = function() {
393
- c(this, h, gt).call(this, t(this, m).current, t(this, v).current, t(this, y).current, t(this, C).current, t(this, H).current, t(this, p).current), c(this, h, Ct).call(this, t(this, R).current, t(this, k).current, t(this, O).current, t(this, z).current, t(this, D).current);
394
+ c(this, h, gt).call(this, t(this, S).current, t(this, v).current, t(this, y).current, t(this, C).current, t(this, H).current, t(this, p).current), c(this, h, Ct).call(this, t(this, R).current, t(this, k).current, t(this, O).current, t(this, z).current, t(this, D).current);
394
395
  }, at);
395
- customElements.get("scroll-segment") || customElements.define("scroll-segment", Rt);
396
+ Pt && !customElements.get("scroll-segment") && customElements.define("scroll-segment", kt);
396
397
  export {
397
- Rt as ScrollSegmentElement
398
+ kt as ScrollSegmentElement
398
399
  };
@@ -1 +1 @@
1
- "use strict";var x=s=>{throw TypeError(s)};var I=(s,n,e)=>n.has(s)||x("Cannot "+e);var t=(s,n,e)=>(I(s,n,"read from private field"),e?e.call(s):n.get(s)),c=(s,n,e)=>n.has(s)?x("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(s):n.set(s,e),l=(s,n,e,i)=>(I(s,n,"write to private field"),i?i.call(s,e):n.set(s,e),e);var L=(s,n,e)=>new Promise((i,f)=>{var w=o=>{try{u(e.next(o))}catch(r){f(r)}},y=o=>{try{u(e.throw(o))}catch(r){f(r)}},u=o=>o.done?i(o.value):Promise.resolve(o.value).then(w,y);u((e=e.apply(s,n)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("../css-property/index.cjs"),R=require("../element-resizer/index.cjs"),B=require("../browser-CpzFX2xg.cjs"),z=require("../canvas-CU5Xjahf.cjs"),H=require("../source/index.cjs");require("../window-resizer/index.cjs");require("../Store-C2J4Q87x.cjs");const M=require("../canvas/index.cjs");function W(s){const n=s.match(/\{([\d-]+)\}/);if(n){const e=n[1].split("-");if(e.length===2){const i=parseInt(e[0],10),f=parseInt(e[1],10);return{start:i,end:f}}}return null}var h,b,S,m,d,g,E,p,a,v;class k extends H.SourceElement{constructor(e){super();c(this,h,[]);c(this,b,new P.CSSProperty(this,"--fit","contain"));c(this,S,new P.CSSProperty(this,"--autoplay",!1));c(this,m,new P.CSSProperty(this,"--offset-x",.5));c(this,d,new P.CSSProperty(this,"--offset-y",.5));c(this,g,null);c(this,E,0);c(this,p,1);c(this,a,()=>{if(t(this,h).length){const e=t(this,h)[0];t(this,b).current==="cover"?l(this,g,z.cover(e.naturalWidth,e.naturalHeight,this.consumerElement.width,this.consumerElement.height,t(this,m).current,t(this,d).current)):l(this,g,z.contain(e.naturalWidth,e.naturalHeight,this.consumerElement.width,this.consumerElement.height,t(this,m).current,t(this,d).current))}});c(this,v,e=>{if(this.status.isFalse("loaded")||!t(this,g))return;e.detail.context.clearRect(0,0,e.detail.width,e.detail.height);const i=t(this,h)[t(this,E)];i&&e.detail.context.drawImage(i,...t(this,g)),t(this,S).current&&l(this,E,(t(this,E)+1)%t(this,h).length)});B.isBrowser&&(l(this,p,parseInt(((e==null?void 0:e.pad)||this.getAttribute("pad")||"1").toString())),t(this,b).subscribe(t(this,a)),t(this,m).subscribe(t(this,a)),t(this,d).subscribe(t(this,a)),this.addEventListener("sourceCapture",i=>{this.consumerElement.addEventListener("canvasRender",t(this,v))}),this.addEventListener("sourceRelease",i=>{this.consumerElement.removeEventListener("canvasRender",t(this,v))}))}setProgress(e){t(this,h).length&&l(this,E,Math.floor((t(this,h).length-1)*e))}connectedCallback(){super.connectedCallback(),t(this,S).observe(),t(this,b).observe(),t(this,m).observe(),t(this,d).observe(),R.elementResizer.subscribe(this,t(this,a))}disconnectedCallback(){super.disconnectedCallback(),t(this,S).unobserve(),t(this,b).unobserve(),t(this,m).unobserve(),t(this,d).unobserve(),l(this,h,[]),R.elementResizer.unsubscribe(t(this,a)),this.consumerElement.removeEventListener("canvasRender",t(this,v))}createConsumer(){return new M.CanvasElement}consumeSource(e){return L(this,null,function*(){var i,f,w,y;if(e){this.consumerElement.removeEventListener("canvasRender",t(this,v));const u=[],o=W(e);if(o)for(let r=o.start;r<=o.end;r++){const q=e.replace(/\{([^}]+)\}/,r.toString().padStart(t(this,p),"0")),C=new Image;C.src=q,u.push(C)}else{const r=new Image;r.src=e,u.push(r)}try{yield Promise.all(u.map((r,q)=>new Promise((C,_)=>{r.onload=()=>{C()},r.onerror=j=>{_(`${r.src} Image not found`)}}))),l(this,h,u),t(this,a).call(this),(f=(i=this.consumerElement).onload)==null||f.call(i,new Event("load")),this.isLazy||this.consumerElement.addEventListener("canvasRender",t(this,v))}catch(r){console.error(r),(y=(w=this.consumerElement).onerror)==null||y.call(w,new Event("error"))}}})}}h=new WeakMap,b=new WeakMap,S=new WeakMap,m=new WeakMap,d=new WeakMap,g=new WeakMap,E=new WeakMap,p=new WeakMap,a=new WeakMap,v=new WeakMap;customElements.get("e-sequence")||customElements.define("e-sequence",k);exports.SequenceElement=k;
1
+ "use strict";var x=s=>{throw TypeError(s)};var I=(s,n,e)=>n.has(s)||x("Cannot "+e);var t=(s,n,e)=>(I(s,n,"read from private field"),e?e.call(s):n.get(s)),c=(s,n,e)=>n.has(s)?x("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(s):n.set(s,e),l=(s,n,e,i)=>(I(s,n,"write to private field"),i?i.call(s,e):n.set(s,e),e);var L=(s,n,e)=>new Promise((i,f)=>{var w=o=>{try{u(e.next(o))}catch(r){f(r)}},y=o=>{try{u(e.throw(o))}catch(r){f(r)}},u=o=>o.done?i(o.value):Promise.resolve(o.value).then(w,y);u((e=e.apply(s,n)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("../css-property/index.cjs"),R=require("../element-resizer/index.cjs"),_=require("../index-Cqw2NKev.cjs"),z=require("../canvas-CU5Xjahf.cjs"),H=require("../source/index.cjs");require("../window-resizer/index.cjs");require("../Store-DRp_K37w.cjs");const M=require("../canvas/index.cjs");function W(s){const n=s.match(/\{([\d-]+)\}/);if(n){const e=n[1].split("-");if(e.length===2){const i=parseInt(e[0],10),f=parseInt(e[1],10);return{start:i,end:f}}}return null}var h,b,S,d,m,g,E,p,a,v;class k extends H.SourceElement{constructor(e){super();c(this,h,[]);c(this,b,new P.CSSProperty(this,"--fit","contain"));c(this,S,new P.CSSProperty(this,"--autoplay",!1));c(this,d,new P.CSSProperty(this,"--offset-x",.5));c(this,m,new P.CSSProperty(this,"--offset-y",.5));c(this,g,null);c(this,E,0);c(this,p,1);c(this,a,()=>{if(t(this,h).length){const e=t(this,h)[0];t(this,b).current==="cover"?l(this,g,z.cover(e.naturalWidth,e.naturalHeight,this.consumerElement.width,this.consumerElement.height,t(this,d).current,t(this,m).current)):l(this,g,z.contain(e.naturalWidth,e.naturalHeight,this.consumerElement.width,this.consumerElement.height,t(this,d).current,t(this,m).current))}});c(this,v,e=>{if(this.status.isFalse("loaded")||!t(this,g))return;e.detail.context.clearRect(0,0,e.detail.width,e.detail.height);const i=t(this,h)[t(this,E)];i&&e.detail.context.drawImage(i,...t(this,g)),t(this,S).current&&l(this,E,(t(this,E)+1)%t(this,h).length)});_.isBrowser&&(l(this,p,parseInt(((e==null?void 0:e.pad)||this.getAttribute("pad")||"1").toString())),t(this,b).subscribe(t(this,a)),t(this,d).subscribe(t(this,a)),t(this,m).subscribe(t(this,a)),this.addEventListener("sourceCapture",i=>{this.consumerElement.addEventListener("canvasRender",t(this,v))}),this.addEventListener("sourceRelease",i=>{this.consumerElement.removeEventListener("canvasRender",t(this,v))}))}setProgress(e){t(this,h).length&&l(this,E,Math.floor((t(this,h).length-1)*e))}connectedCallback(){super.connectedCallback(),t(this,S).observe(),t(this,b).observe(),t(this,d).observe(),t(this,m).observe(),R.elementResizer.subscribe(this,t(this,a))}disconnectedCallback(){super.disconnectedCallback(),t(this,S).unobserve(),t(this,b).unobserve(),t(this,d).unobserve(),t(this,m).unobserve(),l(this,h,[]),R.elementResizer.unsubscribe(t(this,a)),this.consumerElement.removeEventListener("canvasRender",t(this,v))}createConsumer(){return new M.CanvasElement}consumeSource(e){return L(this,null,function*(){var i,f,w,y;if(e){this.consumerElement.removeEventListener("canvasRender",t(this,v));const u=[],o=W(e);if(o)for(let r=o.start;r<=o.end;r++){const q=e.replace(/\{([^}]+)\}/,r.toString().padStart(t(this,p),"0")),C=new Image;C.src=q,u.push(C)}else{const r=new Image;r.src=e,u.push(r)}try{yield Promise.all(u.map((r,q)=>new Promise((C,B)=>{r.onload=()=>{C()},r.onerror=j=>{B(`${r.src} Image not found`)}}))),l(this,h,u),t(this,a).call(this),(f=(i=this.consumerElement).onload)==null||f.call(i,new Event("load")),this.isLazy||this.consumerElement.addEventListener("canvasRender",t(this,v))}catch(r){console.error(r),(y=(w=this.consumerElement).onerror)==null||y.call(w,new Event("error"))}}})}}h=new WeakMap,b=new WeakMap,S=new WeakMap,d=new WeakMap,m=new WeakMap,g=new WeakMap,E=new WeakMap,p=new WeakMap,a=new WeakMap,v=new WeakMap;_.isBrowser&&!customElements.get("e-sequence")&&customElements.define("e-sequence",k);exports.SequenceElement=k;
@@ -21,11 +21,11 @@ var R = (s, n, e) => new Promise((i, p) => {
21
21
  });
22
22
  import { CSSProperty as I } from "../css-property/index.js";
23
23
  import { elementResizer as k } from "../element-resizer/index.js";
24
- import { i as z } from "../browser-0zX67oeU.js";
24
+ import { i as q } from "../index-euf5anj6.js";
25
25
  import { c as B, a as H } from "../canvas-DeZ0SLUJ.js";
26
26
  import { SourceElement as W } from "../source/index.js";
27
27
  import "../window-resizer/index.js";
28
- import "../Store-Cm3LPXlx.js";
28
+ import "../Store-D2xCXENW.js";
29
29
  import { CanvasElement as A } from "../canvas/index.js";
30
30
  function D(s) {
31
31
  const n = s.match(/\{([\d-]+)\}/);
@@ -81,7 +81,7 @@ class F extends W {
81
81
  const i = t(this, c)[t(this, b)];
82
82
  i && e.detail.context.drawImage(i, ...t(this, E)), t(this, g).current && u(this, b, (t(this, b) + 1) % t(this, c).length);
83
83
  });
84
- z && (u(this, w, parseInt(
84
+ q && (u(this, w, parseInt(
85
85
  ((e == null ? void 0 : e.pad) || this.getAttribute("pad") || "1").toString()
86
86
  )), t(this, v).subscribe(t(this, a)), t(this, l).subscribe(t(this, a)), t(this, d).subscribe(t(this, a)), this.addEventListener("sourceCapture", (i) => {
87
87
  this.consumerElement.addEventListener(
@@ -133,11 +133,11 @@ class F extends W {
133
133
  }
134
134
  try {
135
135
  yield Promise.all(
136
- m.map((r, L) => new Promise((y, q) => {
136
+ m.map((r, L) => new Promise((y, z) => {
137
137
  r.onload = () => {
138
138
  y();
139
139
  }, r.onerror = (M) => {
140
- q(`${r.src} Image not found`);
140
+ z(`${r.src} Image not found`);
141
141
  };
142
142
  }))
143
143
  ), u(this, c, m), t(this, a).call(this), (p = (i = this.consumerElement).onload) == null || p.call(i, new Event("load")), this.isLazy || this.consumerElement.addEventListener(
@@ -152,7 +152,7 @@ class F extends W {
152
152
  }
153
153
  }
154
154
  c = new WeakMap(), v = new WeakMap(), g = new WeakMap(), l = new WeakMap(), d = new WeakMap(), E = new WeakMap(), b = new WeakMap(), w = new WeakMap(), a = new WeakMap(), f = new WeakMap();
155
- customElements.get("e-sequence") || customElements.define("e-sequence", F);
155
+ q && !customElements.get("e-sequence") && customElements.define("e-sequence", F);
156
156
  export {
157
157
  F as SequenceElement
158
158
  };
@@ -1 +1 @@
1
- "use strict";var m=e=>{throw TypeError(e)};var c=(e,s,t)=>s.has(e)||m("Cannot "+t);var r=(e,s,t)=>(c(e,s,"read from private field"),t?t.call(e):s.get(e)),l=(e,s,t)=>s.has(e)?m("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(e):s.set(e,t),o=(e,s,t,h)=>(c(e,s,"write to private field"),h?h.call(e,t):s.set(e,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("../element-resizer/index.cjs");var i,n;class d extends HTMLElement{constructor(){super(...arguments);l(this,i,this);l(this,n,()=>{r(this,i).style.removeProperty("--width"),r(this,i).style.removeProperty("--height"),setTimeout(()=>{const t=this.offsetWidth,h=this.offsetHeight;r(this,i).style.setProperty("--width",t+"px"),r(this,i).style.setProperty("--height",h+"px")},0)})}connectedCallback(){var h;const t=(h=this.getAttribute("target"))==null?void 0:h.trim();t&&(t==="parent"?o(this,i,this.parentElement||this):o(this,i,document.querySelector(t)||this)),y.elementResizer.subscribe(this,r(this,n))}disconnectedCallback(){y.elementResizer.unsubscribe(r(this,n)),r(this,i).style.removeProperty("--width"),r(this,i).style.removeProperty("--height")}}i=new WeakMap,n=new WeakMap;customElements.get("e-size-element")||customElements.define("e-size-element",d);exports.SizeElement=d;
1
+ "use strict";var m=e=>{throw TypeError(e)};var c=(e,s,t)=>s.has(e)||m("Cannot "+t);var r=(e,s,t)=>(c(e,s,"read from private field"),t?t.call(e):s.get(e)),o=(e,s,t)=>s.has(e)?m("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(e):s.set(e,t),l=(e,s,t,n)=>(c(e,s,"write to private field"),n?n.call(e,t):s.set(e,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("../element-resizer/index.cjs"),u=require("../index-Cqw2NKev.cjs");var i,h;class y extends HTMLElement{constructor(){super(...arguments);o(this,i,this);o(this,h,()=>{r(this,i).style.removeProperty("--width"),r(this,i).style.removeProperty("--height"),setTimeout(()=>{const t=this.offsetWidth,n=this.offsetHeight;r(this,i).style.setProperty("--width",t+"px"),r(this,i).style.setProperty("--height",n+"px")},0)})}connectedCallback(){var n;const t=(n=this.getAttribute("target"))==null?void 0:n.trim();t&&(t==="parent"?l(this,i,this.parentElement||this):l(this,i,document.querySelector(t)||this)),d.elementResizer.subscribe(this,r(this,h))}disconnectedCallback(){d.elementResizer.unsubscribe(r(this,h)),r(this,i).style.removeProperty("--width"),r(this,i).style.removeProperty("--height")}}i=new WeakMap,h=new WeakMap;u.isBrowser&&!customElements.get("e-size-element")&&customElements.define("e-size-element",y);exports.SizeElement=y;
@@ -1,15 +1,16 @@
1
- var m = (e) => {
1
+ var l = (e) => {
2
2
  throw TypeError(e);
3
3
  };
4
- var c = (e, s, t) => s.has(e) || m("Cannot " + t);
5
- var r = (e, s, t) => (c(e, s, "read from private field"), t ? t.call(e) : s.get(e)), n = (e, s, t) => s.has(e) ? m("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(e) : s.set(e, t), l = (e, s, t, h) => (c(e, s, "write to private field"), h ? h.call(e, t) : s.set(e, t), t);
6
- import { elementResizer as y } from "../element-resizer/index.js";
4
+ var c = (e, s, t) => s.has(e) || l("Cannot " + t);
5
+ var r = (e, s, t) => (c(e, s, "read from private field"), t ? t.call(e) : s.get(e)), m = (e, s, t) => s.has(e) ? l("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(e) : s.set(e, t), n = (e, s, t, h) => (c(e, s, "write to private field"), h ? h.call(e, t) : s.set(e, t), t);
6
+ import { elementResizer as p } from "../element-resizer/index.js";
7
+ import { i as y } from "../index-euf5anj6.js";
7
8
  var i, o;
8
- class p extends HTMLElement {
9
+ class a extends HTMLElement {
9
10
  constructor() {
10
11
  super(...arguments);
11
- n(this, i, this);
12
- n(this, o, () => {
12
+ m(this, i, this);
13
+ m(this, o, () => {
13
14
  r(this, i).style.removeProperty("--width"), r(this, i).style.removeProperty("--height"), setTimeout(() => {
14
15
  const t = this.offsetWidth, h = this.offsetHeight;
15
16
  r(this, i).style.setProperty("--width", t + "px"), r(this, i).style.setProperty("--height", h + "px");
@@ -19,14 +20,14 @@ class p extends HTMLElement {
19
20
  connectedCallback() {
20
21
  var h;
21
22
  const t = (h = this.getAttribute("target")) == null ? void 0 : h.trim();
22
- t && (t === "parent" ? l(this, i, this.parentElement || this) : l(this, i, document.querySelector(t) || this)), y.subscribe(this, r(this, o));
23
+ t && (t === "parent" ? n(this, i, this.parentElement || this) : n(this, i, document.querySelector(t) || this)), p.subscribe(this, r(this, o));
23
24
  }
24
25
  disconnectedCallback() {
25
- y.unsubscribe(r(this, o)), r(this, i).style.removeProperty("--width"), r(this, i).style.removeProperty("--height");
26
+ p.unsubscribe(r(this, o)), r(this, i).style.removeProperty("--width"), r(this, i).style.removeProperty("--height");
26
27
  }
27
28
  }
28
29
  i = new WeakMap(), o = new WeakMap();
29
- customElements.get("e-size-element") || customElements.define("e-size-element", p);
30
+ y && !customElements.get("e-size-element") && customElements.define("e-size-element", a);
30
31
  export {
31
- p as SizeElement
32
+ a as SizeElement
32
33
  };
@@ -1,5 +1,5 @@
1
- import { Word } from './Word.js';
2
- import { Letter } from './Letter.js';
1
+ import { Word } from './Word';
2
+ import { Letter } from './Letter';
3
3
  export declare class SlicerElement extends HTMLElement {
4
4
  #private;
5
5
  get wordsArray(): Word[];
@@ -1,4 +1,4 @@
1
- "use strict";var T=i=>{throw TypeError(i)};var M=(i,t,s)=>t.has(i)||T("Cannot "+s);var e=(i,t,s)=>(M(i,t,"read from private field"),s?s.call(i):t.get(i)),l=(i,t,s)=>t.has(i)?T("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(i):t.set(i,s),r=(i,t,s,a)=>(M(i,t,"write to private field"),a?a.call(i,s):t.set(i,s),s),m=(i,t,s)=>(M(i,t,"access private method"),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const $=require("../media/index.cjs");var y,o;class H{constructor(t){l(this,y);l(this,o);r(this,y,t.index),r(this,o,document.createElement("span")),e(this,o).classList.add("letter"),t.clone?e(this,o).innerHTML=`
1
+ "use strict";var T=i=>{throw TypeError(i)};var M=(i,t,s)=>t.has(i)||T("Cannot "+s);var e=(i,t,s)=>(M(i,t,"read from private field"),s?s.call(i):t.get(i)),l=(i,t,s)=>t.has(i)?T("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(i):t.set(i,s),r=(i,t,s,a)=>(M(i,t,"write to private field"),a?a.call(i,s):t.set(i,s),s),m=(i,t,s)=>(M(i,t,"access private method"),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const $=require("../media/index.cjs"),C=require("../index-Cqw2NKev.cjs");var y,o;class H{constructor(t){l(this,y);l(this,o);r(this,y,t.index),r(this,o,document.createElement("span")),e(this,o).classList.add("letter"),t.clone?e(this,o).innerHTML=`
2
2
  <span class="original">${t.text}</span>
3
3
  <span class="clone" aria-hidden>${t.text}</span>
4
4
  `:e(this,o).innerHTML=`
@@ -8,4 +8,4 @@
8
8
  <span class="clone" aria-hidden>${t.text}</span>
9
9
  `:e(this,h).innerHTML=`
10
10
  <span class="value">${t.text}</span>
11
- `,e(this,h).classList.add("word")}get index(){return e(this,L)}get element(){return e(this,h)}get letters(){return e(this,u)}get hasNewLine(){return e(this,g)}}L=new WeakMap,h=new WeakMap,u=new WeakMap,g=new WeakMap;var p,c,x,f,d,b,A;class v extends HTMLElement{constructor(){super(...arguments);l(this,d);l(this,p,"");l(this,c,[]);l(this,x,[]);l(this,f,null)}get wordsArray(){return e(this,c)}get lettersArray(){return e(this,x)}get originalHTML(){return e(this,p)}connectedCallback(){r(this,p,this.innerHTML.trim()),this.hasAttribute("media")?(r(this,f,new $.Media(this.getAttribute("media"))),e(this,f).subscribe(s=>{s.current?m(this,d,b).call(this):!s.current&&s.previous&&m(this,d,A).call(this)})):m(this,d,b).call(this)}disconnectedCallback(){var s;m(this,d,A).call(this),(s=e(this,f))==null||s.close()}}p=new WeakMap,c=new WeakMap,x=new WeakMap,f=new WeakMap,d=new WeakSet,b=function(){const s=[];r(this,c,[]);let a=0,E=0;this.childNodes.forEach(n=>{n.nodeName==="#text"&&n.textContent?n.textContent.trim().replace(/ +/g," ").split(" ").map(P=>{const w=new S({index:a,text:P+" ",letters:this.hasAttribute("letters"),lettersAcc:E,clone:this.hasAttribute("clone")});E+=w.letters.length,a+=1,e(this,x).push(...w.letters),e(this,c).push(w),s.push(w.element)}):s.push(n)}),this.hasAttribute("index")&&(e(this,c).forEach(n=>{n.element.style.setProperty("--word-index",n.index.toString())}),e(this,x).forEach(n=>{n.element.style.setProperty("--letter-index",n.index.toString())})),this.innerHTML="",s.forEach(n=>{this.appendChild(n)}),this.style.setProperty("--words-length",e(this,c).length.toString()),this.style.setProperty("--letters-length",e(this,x).length.toString())},A=function(){r(this,c,[]),this.innerHTML=e(this,p),this.style.removeProperty("--words-length"),this.style.removeProperty("--letters-length")};customElements.get("e-slicer")||customElements.define("e-slicer",v);exports.Letter=H;exports.SlicerElement=v;exports.Word=S;
11
+ `,e(this,h).classList.add("word")}get index(){return e(this,L)}get element(){return e(this,h)}get letters(){return e(this,u)}get hasNewLine(){return e(this,g)}}L=new WeakMap,h=new WeakMap,u=new WeakMap,g=new WeakMap;var p,c,x,f,d,b,A;class v extends HTMLElement{constructor(){super(...arguments);l(this,d);l(this,p,"");l(this,c,[]);l(this,x,[]);l(this,f,null)}get wordsArray(){return e(this,c)}get lettersArray(){return e(this,x)}get originalHTML(){return e(this,p)}connectedCallback(){r(this,p,this.innerHTML.trim()),this.hasAttribute("media")?(r(this,f,new $.Media(this.getAttribute("media"))),e(this,f).subscribe(s=>{s.current?m(this,d,b).call(this):!s.current&&s.previous&&m(this,d,A).call(this)})):m(this,d,b).call(this)}disconnectedCallback(){var s;m(this,d,A).call(this),(s=e(this,f))==null||s.close()}}p=new WeakMap,c=new WeakMap,x=new WeakMap,f=new WeakMap,d=new WeakSet,b=function(){const s=[];r(this,c,[]);let a=0,E=0;this.childNodes.forEach(n=>{n.nodeName==="#text"&&n.textContent?n.textContent.trim().replace(/ +/g," ").split(" ").map(P=>{const w=new S({index:a,text:P+" ",letters:this.hasAttribute("letters"),lettersAcc:E,clone:this.hasAttribute("clone")});E+=w.letters.length,a+=1,e(this,x).push(...w.letters),e(this,c).push(w),s.push(w.element)}):s.push(n)}),this.hasAttribute("index")&&(e(this,c).forEach(n=>{n.element.style.setProperty("--word-index",n.index.toString())}),e(this,x).forEach(n=>{n.element.style.setProperty("--letter-index",n.index.toString())})),this.innerHTML="",s.forEach(n=>{this.appendChild(n)}),this.style.setProperty("--words-length",e(this,c).length.toString()),this.style.setProperty("--letters-length",e(this,x).length.toString())},A=function(){r(this,c,[]),this.innerHTML=e(this,p),this.style.removeProperty("--words-length"),this.style.removeProperty("--letters-length")};C.isBrowser&&!customElements.get("e-slicer")&&customElements.define("e-slicer",v);exports.Letter=H;exports.SlicerElement=v;exports.Word=S;
@@ -4,8 +4,9 @@ var T = (i) => {
4
4
  var A = (i, t, s) => t.has(i) || T("Cannot " + s);
5
5
  var e = (i, t, s) => (A(i, t, "read from private field"), s ? s.call(i) : t.get(i)), l = (i, t, s) => t.has(i) ? T("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(i) : t.set(i, s), h = (i, t, s, a) => (A(i, t, "write to private field"), a ? a.call(i, s) : t.set(i, s), s), m = (i, t, s) => (A(i, t, "access private method"), s);
6
6
  import { Media as v } from "../media/index.js";
7
+ import { i as P } from "../index-euf5anj6.js";
7
8
  var L, o;
8
- class P {
9
+ class $ {
9
10
  constructor(t) {
10
11
  l(this, L);
11
12
  l(this, o);
@@ -25,13 +26,13 @@ class P {
25
26
  }
26
27
  L = new WeakMap(), o = new WeakMap();
27
28
  var y, r, u, g;
28
- class $ {
29
+ class C {
29
30
  constructor(t) {
30
31
  l(this, y);
31
32
  l(this, r);
32
33
  l(this, u);
33
34
  l(this, g);
34
- h(this, y, t.index), h(this, r, document.createElement("span")), h(this, u, []), h(this, g, t.text.endsWith("\\n")), e(this, g) && (t.text = t.text.replace("\\n", "")), t.letters && t.lettersAcc !== void 0 ? (h(this, u, t.text.split("").map((s, a) => new P({
35
+ h(this, y, t.index), h(this, r, document.createElement("span")), h(this, u, []), h(this, g, t.text.endsWith("\\n")), e(this, g) && (t.text = t.text.replace("\\n", "")), t.letters && t.lettersAcc !== void 0 ? (h(this, u, t.text.split("").map((s, a) => new $({
35
36
  index: t.lettersAcc + a,
36
37
  text: s,
37
38
  clone: t.clone
@@ -57,7 +58,7 @@ class $ {
57
58
  }
58
59
  y = new WeakMap(), r = new WeakMap(), u = new WeakMap(), g = new WeakMap();
59
60
  var p, c, x, f, d, M, E;
60
- class C extends HTMLElement {
61
+ class S extends HTMLElement {
61
62
  constructor() {
62
63
  super(...arguments);
63
64
  l(this, d);
@@ -91,7 +92,7 @@ p = new WeakMap(), c = new WeakMap(), x = new WeakMap(), f = new WeakMap(), d =
91
92
  let a = 0, H = 0;
92
93
  this.childNodes.forEach((n) => {
93
94
  n.nodeName === "#text" && n.textContent ? n.textContent.trim().replace(/ +/g, " ").split(" ").map((b) => {
94
- const w = new $({
95
+ const w = new C({
95
96
  index: a,
96
97
  text: b + " ",
97
98
  letters: this.hasAttribute("letters"),
@@ -113,9 +114,9 @@ p = new WeakMap(), c = new WeakMap(), x = new WeakMap(), f = new WeakMap(), d =
113
114
  }, E = function() {
114
115
  h(this, c, []), this.innerHTML = e(this, p), this.style.removeProperty("--words-length"), this.style.removeProperty("--letters-length");
115
116
  };
116
- customElements.get("e-slicer") || customElements.define("e-slicer", C);
117
+ P && !customElements.get("e-slicer") && customElements.define("e-slicer", S);
117
118
  export {
118
- P as Letter,
119
- C as SlicerElement,
120
- $ as Word
119
+ $ as Letter,
120
+ S as SlicerElement,
121
+ C as Word
121
122
  };