PageSourceSearch

https://www.commondreams.org/static/dist/social-ux/4640.0c7b5829af87fd3849a2.bundle.js

js commondreams.org collected 2026-09-24 08:31:34 UTC 12,709 bytes, 3 lines download raw bytes

1/*! For license information please see 4640.0c7b5829af87fd3849a2.bundle.js.LICENSE.txt */
2"use strict";(self.webpackChunksocialUX=self.webpackChunksocialUX||[]).push([[4640],{4640:function(e,t,r){function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}r.r(t),r.d(t,{ScrollSmoother:function(){return T},default:function(){return T}});var o,i,s,a,l,c,u,f,h,d,p,g,v,m,y,b=function(){return"undefined"!=typeof window},w=function(){return o||b()&&(o=window.gsap)&&o.registerPlugin&&o},S=function(e){return h.maxScroll(e||s)},T=function(){function e(t){var r=this;i||e.register(o)||console.warn("Please gsap.registerPlugin(ScrollSmoother)"),t=this.vars=t||{},d&&d.kill(),d=this,m(this);var n,b,w,T,C,_,k,x,E,P,R,A,N,M,z,F,H=t,I=H.smoothTouch,L=H.onUpdate,U=H.onStop,B=H.smooth,O=H.onFocusIn,q=H.normalizeScroll,V=H.wholePixels,D=this,X=t.effectsPrefix||"",Y=h.getScrollFunc(s),j=1===h.isTouch?!0===I?.8:parseFloat(I)||0:0===B||!1===B?0:parseFloat(B)||.8,K=j&&+t.speed||1,W=0,G=0,J=1,Q=g(0),Z=function(){return Q.update(-W)},$={y:0},ee=function(){return n.style.overflow="visible"},te=function(e){e.update();var t=e.getTween();t&&(t.pause(),t._time=t._dur,t._tTime=t._tDur),z=!1,e.animation.progress(e.progress,!0)},re=function(t,r){(t!==W&&!P||r)&&(V&&(t=Math.round(t)),j&&(n.style.transform="matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, "+t+", 0, 1)",n._gsap.y=t+"px"),G=t-W,W=t,h.isUpdating||e.isRefreshing||h.update())},ne=function(e){return arguments.length?(e<0&&(e=0),$.y=-e,z=!0,P?W=-e:re(-e),h.isRefreshing?T.update():Y(e/K),this):-W},oe="undefined"!=typeof ResizeObserver&&!1!==t.autoResize&&new ResizeObserver((function(){if(!h.isRefreshing){var e=S(b)*K;e<-W&&ne(e),y.restart(!0)}})),ie=function(e){b.scrollTop=0,e.target.contains&&e.target.contains(b)||O&&!1===O(r,e)||(h.isInViewport(e.target)||e.target===F||r.scrollTo(e.target,!1,"center center"),F=e.target)},se=function(e,t){if(e<t.start)return e;var r=isNaN(t.ratio)?1:t.ratio,n=t.end-t.start,o=e-t.start,i=t.offset||0,s=t.pins||[],a=s.offset||0,l=t._startClamp&&t.start<=0||t.pins&&t.pins.offset?0:t._endClamp&&t.end===S()?1:.5;return s.forEach((function(t){n-=t.distance,t.nativeStart<=e&&(o-=t.distance)})),a&&(o*=(n-a/r)/n),e+(o-i*l)/r-o},ae=function e(t,r,n){n||(t.pins.length=t.pins.offset=0);var i,s,a,l,c,u,f,h,d=t.pins,p=t.markers;for(f=0;f<r.length;f++)if(h=r[f],t.trigger&&h.trigger&&t!==h&&(h.trigger===t.trigger||h.pinnedContainer===t.trigger||t.trigger.contains(h.trigger))&&(c=h._startNative||h._startClamp||h.start,u=h._endNative||h._endClamp||h.end,a=se(c,t),l=h.pin&&u>0?a+(u-c):se(u,t),h.setPositions(a,l,!0,(h._startClamp?Math.max(0,a):a)-c),h.markerStart&&p.push(o.quickSetter([h.markerStart,h.markerEnd],"y","px")),h.pin&&h.end>
20&&!n)){if(i=h.end-h.start,s=t._startClamp&&h.start<0){if(t.start>0)return t.setPositions(0,t.end+(t._startNative-t.start),!0),void e(t,r);i+=h.start,d.offset=-h.start}d.push({start:h.start,nativeStart:c,end:h.end,distance:i,trig:h}),t.setPositions(t.start,t.end+(s?-h.start:i),!0)}},le=function(e,t){C.forEach((function(r){return ae(r,e,t)}))},ce=function(){l=a.documentElement,c=a.body,ee(),requestAnimationFrame(ee),C&&(h.getAll().forEach((function(e){e._startNative=e.start,e._endNative=e.end})),C.forEach((function(e){var t=e._startClamp||e.start,r=e.autoSpeed?Math.min(S(),e.end):t+Math.abs((e.end-t)/e.ratio),n=r-e.end;if((t-=n/2)>(r-=n/2)){var o=t;t=r,r=o}e._startClamp&&t<0?(n=(r=e.ratio<0?S():e.end/e.ratio)-e.end,t=0):(e.ratio<0||e._endClamp&&r>=S())&&(n=((r=S())-(t=e.ratio<0||e.ratio>1?0:r-(r-e.start)/e.ratio))*e.ratio-(e.end-e.start)),e.offset=n||1e-4,e.pins.length=e.pins.offset=0,e.setPositions(t,r,!0)})),le(h.sort())),Q.reset()},ue=function(){return h.addEventListener("refresh",ce)},fe=function(){return C&&C.forEach((function(e){return e.vars.onRefresh(e)}))},he=function(){return C&&C.forEach((function(e){return e.vars.onRefreshInit(e)})),fe},de=function(e,t,r,n){return function(){var o="function"==typeof t?t(r,n):t;o||0===o||(o=n.getAttribute("data-"+X+e)||("speed"===e?1:0)),n.setAttribute("data-"+X+e,o);var i="clamp("===(o+"").substr(0,6);return{clamp:i,value:i?o.substr(6,o.length-7):o}}}
2,pe=function(e,t,r,n,i){i=("function"==typeof i?i(n,e):i)||0;var a,c,u,d,g,v,m=de("speed",t,n,e),y=de("lag",r,n,e),w=o.getProperty(e,"y"),T=e._gsap,_=[],k=function(){t=m(),r=parseFloat(y().value),a=parseFloat(t.value)||1,u="auto"===t.value,g=u||c&&c._startClamp&&c.start<=0||_.offset?0:c&&c._endClamp&&c.end===S()?1:.5,d&&d.kill(),d=r&&o.to(e,{ease:p,overwrite:!1,y:"+=0",duration:r}),c&&(c.ratio=a,c.autoSpeed=u)},x=function(){T.y=w+"px",T.renderTransform(1),k()},E=[],P=0,R=function(t){if(u){x();var r=function(e,t){var r,n,o=e.parentNode||l,i=e.getBoundingClientRect(),a=o.getBoundingClientRect(),c=a.top-i.top,u=a.bottom-i.bottom,f=(Math.abs(c)>Math.abs(u)?c:u)/(1-t),h=-f*t;return f>0&&(n=.5==(r=a.height/(s.innerHeight+a.height))?2*a.height:2*Math.min(a.height,Math.abs(-f*r/(2*r-1)))*(t||1),h+=t?-n*t:-n/2,f+=n),{change:f,offset:h}}(e,f(0,1,-t.start/(t.end-t.start)));P=r.change,v=r.offset}else v=_.offset||0,P=(t.end-t.start-v)*(1-a);_.forEach((function(e){return P-=e.distance*(1-a)})),t.offset=P||.001,t.vars.onUpdate(t),d&&d.progress(1)};return k(),(1!==a||u||d)&&(c=h.create({trigger:u?e.parentNode:e,start:function(){return t.clamp?"clamp(top bottom+="+i+")":"top bottom+="+i},end:function(){return t.value<0?"max":t.clamp?"clamp(bottom top-="+i+")":"bottom top-="+i},scroller:b,scrub:!0,refreshPriority:-999,onRefreshInit:x,onRefresh:R,onKill:function(e){var t=C.indexOf(e);t>=0&&C.splice(t,1),x()},onUpdate:function(e){var t,r,n,i,s=w+P*(e.progress-g),a=_.length,l=0;if(e.offset){if(a){for(r=-W,n=e.end;a--;){if((t=_[a]).trig.isActive||r>=t.start&&r<=t.end)return void(d&&(t.trig.progress+=t.trig.direction<0?.001:-.001,t.trig.update(0,0,1),d.resetTo("y",parseFloat(T.y),-G,!0),J&&d.progress(1)));r>t.end&&(l+=t.distance),n-=t.distance}s=w+l+P*((o.utils.clamp(e.start,e.end,r)-e.start-l)/(n-e.start)-g)}E.length&&!u&&E.forEach((function(e){return e(s-l)})),i=s+v,s=Math.round(1e5*i)/1e5||0,d?(d.resetTo("y",s,-G,!0),J&&d.progress(1)):(T.y=s+"px",T.renderTransform(1))}}}),R(c),o.core.getCache(c.trigger).stRevert=he,c.startY=w,c.pins=_,c.markers=E,c.ratio=a,c.autoSpeed=u,e.style.willChange="transform"),c};function ge(){return w=n.clientHeight,n.style.overflow="visible",c.style.height=s.innerHeight+(w-s.innerHeight)/K+"px",w-s.innerHeight}ue(),h.addEventListener("killAll",ue),o.delayedCall(.5,(function(){return J=0})),this.scrollTop=ne,this.scrollTo=function(e,t,n){var i=o.utils.clamp(0,S(),isNaN(e)?r.offset(e,n,!!t&&!P):+e);t?P?o.to(r,{duration:j,scrollTop:i,overwrite:"auto",ease:p}):Y(i):ne(i)},this.offset=function(e,t,r){var n,i=(e=u(e)[0]).style.cssText,s=h.create({trigger:e,start:t||"top top"});return C&&(J?h.refresh():le([s],!0)),n=s.start/(r?K:1),s.kill(!1),e.style.cssText=i,o.core.getCache(e).uncache=1,n},this.content=function(e){if(arguments.length){var t=u(e||"#smooth-content")[0]||console.warn("ScrollSmoother needs a valid content element.")||c.children[0];return t!==n&&(E=(n=t).getAttribute("style")||"",oe&&oe.observe(n),o.set(n,{overflow:"visible",width:"100%",boxSizing:"border-box",y:"+=0"}),j||o.set(n,{clearProps:"transform"})),this}return n},this.wrapper=function(e){return arguments.length?(b=u(e||"#smooth-wrapper")[0]||function(e){var t=a.querySelector(".ScrollSmoother-wrapper");return t||((t=a.createElement("div")).classList.add("ScrollSmoother-wrapper"),e.parentNode.insertBefore(t,e),t.appendChild(e)),t}(n),x=b.getAttribute("style")||"",ge(),o.set(b,j?{overflow:"hidden",position:"fixed",height:"100%",width:"100%",top:0,left:0,right:0,bottom:0}:{overflow:"visible",position:"relative",width:"100%",height:"auto",top:"auto",bottom:"auto",left:"auto",right:"auto"}),this):b},this.effects=function(e,t){var r;if(C||(C=[]),!e)return C.slice(0);(e=u(e)).forEach((function(e){for(var t=C.length;t--;)C[t].trigger===e&&C[t].kill()}));var n,o,i=t=t||{},s=i.speed,a=i.lag,l=i.effectsPadding,c=[];for(n=0;n<e.length;n++)(o=pe(e[n],s,a,n,l))&&c.push(o);return(r=C).push.apply(r,c),!1!==t.refresh&&h.refresh(),c},this.sections=function(e,t){var r;if(_||(_=[]),!e)return _.slice(0);var n=u(e).map((function(e){return h.create({trigger:e,start:"top 120%",end:"bottom -20%",onToggle:function(t){e.style.opacity=t.isActive?"1":"0",e.style.pointerEvents=t.isActive?"all":"none"}})}
vendor: 4,242 bytes, lines 2-3
2));return t&&t.add?(r=_).push.apply(r,n):_=n.slice(0),n},this.content(t.content),this.wrapper(t.wrapper),this.render=function(e){return re(e||0===e?e:W)},this.getVelocity=function(){return Q.getVelocity(-W)},h.scrollerProxy(b,{scrollTop:ne,scrollHeight:function(){return ge()&&c.scrollHeight},fixedMarkers:!1!==t.fixedMarkers&&!!j,content:n,getBoundingClientRect:function(){return{top:0,left:0,width:s.innerWidth,height:s.innerHeight}}}),h.defaults({scroller:b});var ve=h.getAll().filter((function(e){return e.scroller===s||e.scroller===b}));ve.forEach((function(e){return e.revert(!0,!0)})),T=h.create({animation:o.fromTo($,{y:function(){return M=0,0}},{y:function(){return M=1,-ge()},immediateRender:!1,ease:"none",data:"ScrollSmoother",duration:100,onUpdate:function(){if(M){var e=z;e&&(te(T),$.y=W),re($.y,e),Z(),L&&!P&&L(D)}}}),onRefreshInit:function(t){if(!e.isRefreshing){if(e.isRefreshing=!0,C){var r=h.getAll().filter((function(e){return!!e.pin}));C.forEach((function(e){e.vars.pinnedContainer||r.forEach((function(t){if(t.pin.contains(e.trigger)){var r=e.vars;r.pinnedContainer=t.pin,e.vars=null,e.init(r,e.animation)}}))}))}var n=t.getTween();N=n&&n._end>n._dp._time,A=W,$.y=0,j&&(1===h.isTouch&&(b.style.position="absolute"),b.scrollTop=0,1===h.isTouch&&(b.style.position="fixed"))}},onRefresh:function(t){t.animation.invalidate(),$.y=0,t.setPositions(t.start,ge()/K),N||te(t),$.y=-Y()*K,re($.y),J||(N&&(z=!1),t.animation.progress(o.utils.clamp(0,1,A/K/-t.end))),N&&(t.progress-=.001,t.update()),e.isRefreshing=!1},id:"ScrollSmoother",scroller:s,invalidateOnRefresh:!0,start:0,refreshPriority:-9999,end:function(){return ge()/K},onScrubComplete:function(){Q.reset(),U&&U(r)},scrub:j||!0}),this.smooth=function(e){return arguments.length&&(K=(j=e||0)&&+t.speed||1,T.scrubDuration(e)),T.getTween()?T.getTween().duration():0},T.getTween()&&(T.getTween().vars.ease=t.ease||p),this.scrollTrigger=T,t.effects&&this.effects(!0===t.effects?"[data-"+X+"speed], [data-"+X+"lag]":t.effects,{effectsPadding:t.effectsPadding,refresh:!1}),t.sections&&this.sections(!0===t.sections?"[data-section]":t.sections),ve.forEach((function(e){e.vars.scroller=b,e.revert(!1,!0),e.init(e.vars,e.animation)})),this.paused=function(e,t){return arguments.length?(!!P!==e&&(e?(T.getTween()&&T.getTween().pause(),Y(-W/K),Q.reset(),(R=h.normalizeScroll())&&R.disable(),(P=h.observe({preventDefault:!0,type:"wheel,touch,scroll",debounce:!1,allowClicks:!0,onChangeY:function(){return ne(-W)}})).nested=v(l,"wheel,touch,scroll",!0,!1!==t)):(P.nested.kill(),P.kill(),P=0,R&&R.enable(),T.progress=(-W/K-T.start)/(T.end-T.start),te(T))),this):!!P},this.kill=this.revert=function(){r.paused(!1),te(T),T.kill();for(var e=(C||[]).concat(_||[]),t=e.length;t--;)e[t].kill();h.scrollerProxy(b),h.removeEventListener("killAll",ue),h.removeEventListener("refresh",ce),b.style.cssText=x,n.style.cssText=E;var o=h.defaults({});o&&o.scroller===b&&h.defaults({scroller:s}),r.normalizer&&h.normalizeScroll(!1),clearInterval(k),d=null,oe&&oe.disconnect(),c.style.removeProperty("height"),s.removeEventListener("focusin",ie)},this.refresh=function(e,t){return T.refresh(e,t)},q&&(this.normalizer=h.normalizeScroll(!0===q?{debounce:!0,content:!j&&n}:q)),h.config(t),"scrollBehavior"in s.getComputedStyle(c)&&o.set([c,l],{scrollBehavior:"auto"}),s.addEventListener("focusin",ie),k=setInterval(Z,250),"loading"===a.readyState||requestAnimationFrame((function(){return h.refresh()}))}var t,r;return e.register=function(t){return i||(o=t||w(),b()&&window.document&&(s=window,a=document,l=a.documentElement,c=a.body),o&&(u=o.utils.toArray,f=o.utils.clamp,p=o.parseEase("expo"),m=o.core.context||function(){},h=o.core.globals().ScrollTrigger,o.core.globals("ScrollSmoother",e),c&&h&&(y=o.delayedCall(.2,(function(){return h.isRefreshing||d&&d.refresh()})).pause(),g=h.core._getVelocityProp,v=h.core._inputObserver,e.refresh=h.refresh,i=1))),i},t=e,(r=[{key:"progress",get:function(){return this.scrollTrigger?this.scrollTrigger.animation._time/100:0}}])&&n(t.prototype,r),e}();T.version="3.15.0",T.create=function(e){return d&&e&&d.content()===u(e.content)[0]?d:new T(e)},T.get=function(){return d},w()&&o.registerPlugin(T)}}]);
3//# sourceMappingURL=4640.0c7b5829af87fd3849a2.bundle.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.