"use strict";(globalThis.webpackChunk_websiteComponents=globalThis.webpackChunk_websiteComponents||[]).push([[7943],{3745(e,t,n){n.d(t,{A:()=>P});var o=n(78677);const i=!!("ontouchstart"in window||window.navigator.maxTouchPoints>0||window.navigator.msMaxTouchPoints>0||window.DocumentTouch&&document instanceof DocumentTouch),r="mouse",s="scroll";var a=n(39551),u=n(42363),c=function(){return(0,u.A)(function e(t){var n=t.shiftUniform,o=t.props,i=t.node;(0,a.A)(this,e),this.shiftUniform=n,this.props=o,this.node=i},[{key:"setProps",value:function(e){this.props=e}},{key:"setImmediate",value:function(){}},{key:"setIsIntersecting",value:function(){}},{key:"setScrollProgress",value:function(){}},{key:"update",value:function(){return this.shiftUniform[0]=0,this.shiftUniform[1]=0,!1}},{key:"destroy",value:function(){}}])}(),f=(n(87241),n(59596)),h=n(84264),l=n(83279);function d(e,t,n){return t=(0,h.A)(t),(0,f.A)(e,p()?Reflect.construct(t,n||[],(0,h.A)(e).constructor):t.apply(e,n))}function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(p=function(){return!!e})()}n(79506);var m=function(e){function t(){var e;(0,a.A)(this,t);for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];return e=d(this,t,[].concat(i)),(0,o.A)(e,"shiftTarget",[0,0]),(0,o.A)(e,"shiftResetTID",-1),(0,o.A)(e,"onPointerMove",function(t){var n=e.node.getBoundingClientRect(),o=(t.clientX-n.left)/n.width,i=(t.clientY-n.top)/n.height;e.shiftTarget[0]=-2*o+1,e.shiftTarget[1]=2*i-1,e.onPointerLeave()}),(0,o.A)(e,"onPointerLeave",function(){clearTimeout(e.shiftResetTID),e.shiftResetTID=setTimeout(e.resetShift,2e3)}),(0,o.A)(e,"resetShift",function(){e.shiftTarget=[0,0]}),e}return(0,l.A)(t,e),(0,u.A)(t,[{key:"setIsIntersecting",value:function(e){e?this.enable():this.disable()}},{key:"enable",value:function(){this.node.addEventListener("mousemove",this.onPointerMove),this.node.addEventListener("mouseleave",this.onPointerLeave)}},{key:"disable",value:function(){this.node.removeEventListener("mousemove",this.onPointerMove),this.node.removeEventListener("mouseleave",this.onPointerLeave)}},{key:"update",value:function(){var e=this.props,t=e.shiftSpeed,n=e.mouseX,o=e.mouseY,i=this.shiftUniform,r=this.shiftTarget;-1!==n&&-1!==o&&(r=[.01*n*-2+1,.01*o*2-1]);var s=r[0]-i[0],a=r[1]-i[1];return(0!==s||0!==a)&&(i[0]+=s*(.002*t),i[1]+=a*(.002*t),!0)}},{key:"destroy",value:function(){this.disable(),clearTimeout(this.shiftResetTID)}}])}(c);function v(e,t,n){return t=(0,h.A)(t),(0,f.A)(e,g()?Reflect.construct(t,n||[],(0,h.A)(e).constructor):t.apply(e,n))}function g(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(g=function(){return!!e})()}var y=function(e){function t(){var e;(0,a.A)(this,t);for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];return e=v(this,t,[].concat(i)),(0,o.A)(e,"targetProgress",0),(0,o.A)(e,"isImmediate",!0),e}return(0,l.A)(t,e),(0,u.A)(t,[{key:"setIsIntersecting",value:function(e){e&&this.setImmediate()}},{key:"setImmediate",value:function(){this.isImmediate=!0}},{key:"setScrollProgress",value:function(e){this.isImmediate&&(this.shiftUniform[1]=e,this.isImmediate=!1),this.targetProgress=e}},{key:"update",value:function(){var e=this.props,t=e.shiftSpeed,n=e.scrollProgress,o=this.shiftUniform[1],i=this.targetProgress;if(n>=0&&(i=.01*n),o===i)return!1;var r=i-o;return this.shiftUniform[1]=r<.01?i:o+r*(.01*t),this.shiftUniform[0]=0,!0}}])}(c),A=(0,o.A)((0,o.A)((0,o.A)({},"none",c),s,y),r,m);const P=function(e){return e===r&&i?A[s]:A[e]}},86338(e,t,n){n.d(t,{t:()=>a});var o=n(78677),i=n(33814),r=n(80401);const s=e=>!(!e.complete||!e.src);class a{constructor(e){let{imageNode:t,containerNode:n,effectProps:a,WebGLComponent:u}=e;(0,o.A)(this,"currentImageSrc",""),(0,o.A)(this,"onPrefersReducedMotionChange",e=>{e?this.destroyComponent():this.prepareImage()}),(0,o.A)(this,"onContainerResize",()=>{var e;null===(e=this.componentManager)||void 0===e||e.refresh()}),(0,o.A)(this,"onImageLoaded",()=>{var e;this.currentImageSrc=this.imageNode.src,this.componentManager?this.componentManager.setProps({image:this.imageNode,imageNeedsUpdate:!0}):this.componentManager=new i.A(this.WebGLComponent,this.containerNode,{image:this.imageNode,pixelRatio:(null===(e=window)||void 0===e?void 0:e.devicePixelRatio)||1,...this.effectProps,focalPoint:this.getFocalPoint()},{scrollWindowRef:window,normalizeScroll:!1})}),(0,o.A)(this,"updateImage",e=>{this.componentManager&&(this.imageNode===e&&this.currentImageSrc===e.src||(this.imageNode.removeEventListener("load",this.onImageLoaded),this.imageNode=e,this.imageNode.addEventListener("load",this.onImageLoaded),s(this.imageNode)&&this.componentManager.setProps({image:this.imageNode,imageNeedsUpdate:!0})))}),(0,o.A)(this,"updateProps",e=>{this.componentManager&&this.componentManager.setProps(e)}),(0,o.A)(this,"getType",()=>{var e;return null===(e=this.componentManager)||void 0===e||null===(e=e.props)||void 0===e?void 0:e.type}),(0,o.A)(this,"destroy",()=>{this.destroyComponent(),this.removeListeners()}),this.imageNode=t,this.containerNode=n,this.effectProps=a,this.WebGLComponent=u,r.A&&(this.prefersReducedMotionHandler=((e,t)=>{const n=window.matchMedia("(prefers-reduced-motion: reduce)"),o={},i=((e,t)=>(e.addEventListener?e.addEventListener("change",t):e.addListener(t),t))(n,e=>{o.matches=e.matches,null==t||t(o.matches)});return o.matches=n.matches,o.destroy=()=>{((e,t)=>{e.removeEventListener?e.removeEventListener("change",t):e.removeListener(t)})(n,i)},o})(0,this.onPrefersReducedMotionChange),this.prefersReducedMotionHandler.matches||this.prepareImage())}prepareImage(){this.imageNode.addEventListener("load",this.onImageLoaded),this.imageNode.style.visibility="hidden",s(this.imageNode)&&this.onImageLoaded()}getFocalPoint(){if(this.effectProps.focalPoint)return this.effectProps.focalPoint;const[e,t]=window.getComputedStyle(this.imageNode).objectPosition.split(" ");return{x:parseFloat(e)/100,y:parseFloat(t)/100}}destroyComponent(){var e;null===(e=this.componentManager)||void 0===e||e.destroy(),this.componentManager=void 0,this.imageNode&&(this.imageNode.style.visibility="",this.imageNode.removeEventListener("load",this.onImageLoaded))}removeListeners(){var e,t;null===(e=this.prefersReducedMotionHandler)||void 0===e||null===(t=e.destroy)||void 0===t||t.call(e)}}},33438(e,t,n){n.r(t),n.d(t,{default:()=>A}),n(41427),n(64648),n(36027),n(78382),n(88792),n(49347),n(87241),n(90620);var o=n(39551),i=n(42363),r=n(59596),s=n(84264),a=n(31747),u=n(83279),c=n(78677),f=n(17699),h=n(3745);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach(function(t){(0,c.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function p(e,t,n){return t=(0,s.A)(t),(0,r.A)(e,m()?Reflect.construct(t,n||[],(0,s.A)(e).constructor):t.apply(e,n))}function m(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(m=function(){return!!e})()}function v(e,t,n,o){var i=(0,a.A)((0,s.A)(1&o?e.prototype:e),t,n);return 2&o&&"function"==typeof i?function(e){return i.apply(n,e)}:i}var g=function(e){function t(e,n){var i;return(0,o.A)(this,t),i=p(this,t,[e,d({programKey:"refracted-lines-program",frag:"\nfloat ease(float t) {\n  float f = t - 1.0;\n  return f * f * f + 1.0;\n}\n\nuniform sampler2D uImage;\nuniform float uBulge;\nuniform float uLineCount;\nuniform float uLineRegionSize;\nuniform float uLineSize;\nuniform float uRotation;\nuniform float uScale;\nuniform float uShiftIntensity;\nuniform vec2 uOffsetScale;\nuniform vec2 uResolution;\nuniform vec2 uShift;\n\nvarying vec2 vUv;\n\nvec2 rotate(vec2 uv, float amount) {\n  vec2 prime = vec2(uv.x * cos(amount) + uv.y * sin(amount),\n    -uv.x * sin(amount) + uv.y * cos(amount));\n  return prime;\n}\n\nfloat getStep (vec2 uv) {\n  return (1.0 + floor(distance(uv.x, 0.0) / uLineRegionSize * uLineCount));\n}\n\nvoid main () {\n  vec2 uv = rotate((vUv - 0.5) * uResolution, uRotation);\n  float step = getStep(uv);\n  float multiplier = sign(uv.x);\n\n  uv = rotate(uv, -uRotation);\n\n  float aspect = uResolution.x / uResolution.y;\n\n  float interpStep = multiplier * step;\n  float strength = step / (uLineCount * 0.5);\n  vec2 rotated = vec2(cos(uRotation), sin(uRotation));\n\n  interpStep -= multiplier * 0.5;\n\n  vec2 centered = interpStep * uLineSize * vec2(aspect, 1.0) * uOffsetScale * rotated;\n\n  uv += uShift * uResolution * uShiftIntensity * ease((step + 1.0) / uLineCount);\n  uv = (uv - centered) * (2.0 - uScale + strength * uBulge) + centered;\n  uv /= uResolution;\n  uv += 0.5;\n  uv = mod(uv * -sign(mod(uv, 2.0) - 1.0), 1.0);\n\n  vec4 tx = texture2D(uImage, uv);\n  tx.xyz *= tx.a;\n\n  gl_FragColor = tx;\n}\n",uniforms:{uResolution:[1,1],uShift:[0,0]}},n)]),(0,c.A)(i,"isIntersecting",!1),(0,c.A)(i,"onIntersection",function(e){i.isIntersecting=e,i.interaction.setIsIntersecting(e)}),(0,c.A)(i,"onScrollProgress",function(e){i.interaction.setScrollProgress(e)}),i.autoUpdate=!1,i.updateInteraction(),i.setSize(),i}return(0,u.A)(t,e),(0,i.A)(t,[{key:"updateInteraction",value:function(){this.interaction&&this.interaction.destroy();var e=(0,h.A)(this.props.interactionType);this.interaction=new e({shiftUniform:this.uniforms.uShift,props:this.props,node:this.node.closest("section")||this.node}),this.interaction.setIsIntersecting(this.isIntersecting)}},{key:"onUpdateProps",value:function(e){v(t,"onUpdateProps",this,3)([e]),this.props.interactionType!==e.interactionType?this.updateInteraction():this.interaction.setProps(this.props)}},{key:"getUniformsFromProps",value:function(){var e=this.props,t=e.rotation,n=e.intensity,o=e.offsetScaleX,i=e.offsetScaleY,r=e.scale,s=e.shiftIntensity;return{uRotation:t*Math.PI/180,uBulge:.01*n,uOffsetScale:[.01*o,.01*i],uScale:.01*r,uShiftIntensity:.01*s}}},{key:"update",value:function(){this.interaction.update()&&(this.isDirty=!0)}},{key:"onRefresh",value:function(){v(t,"onRefresh",this,3)([]),this.setSize()}},{key:"setSize",value:function(){var e=this.canvas,t=e.width,n=e.height,o=this.props,i=o.size,r=o.contextScale,s=Math.sqrt(t*t+n*n),a=Math.ceil(s/(i*r)),u=a*(i*r);this.uniforms.uLineSize=i*r,this.uniforms.uLineCount=a,this.uniforms.uLineRegionSize=u,this.uniforms.uResolution[0]=t,this.uniforms.uResolution[1]=n,this.interaction.setImmediate()}},{key:"onDestroy",value:function(){v(t,"onDestroy",this,3)([]),this.interaction.destroy()}}])}(f.A);(0,c.A)(g,"defaultProps",{intensity:0,size:0,offsetScaleX:0,offsetScaleY:0,rotation:0,scale:0,interactionType:"none",shiftIntensity:0,shiftSpeed:0,contextScale:1,scrollProgress:-1,mouseX:-1,mouseY:-1});var y=n(86338);class A extends y.t{constructor(e){super({...e,WebGLComponent:g})}}},79506(e,t,n){var o=n(45286),i=n(70383),r=n(48600),s=n(70930),a=n(50437),u=n(39942),c=n(24213),f=n(43648),h=n(75919),l=n(26445),d=n(35125),p=n(56547),m=n(54863),v=p("isConcatSpreadable"),g=m>=51||!i(function(){var e=[];return e[v]=!1,e.concat()[0]!==e}),y=function(e){if(!s(e))return!1;var t=e[v];return void 0!==t?!!t:r(e)};o({target:"Array",proto:!0,arity:1,forced:!g||!d("concat")},{concat:function(e){var t,n,o,i,r,s=a(this),d=l(s,0),p=0;for(t=-1,o=arguments.length;t<o;t++)if(y(r=-1===t?s:arguments[t]))for(i=u(r),c(p+i),n=0;n<i;n++,p++)n in r&&f(d,p,r[n]);else c(p+1),f(d,p++,r);return h(d,p),d}})},31747(e,t,n){n.d(t,{A:()=>i});var o=n(81160);function i(){return i="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var i=(0,o.A)(e,t);if(i){var r=Object.getOwnPropertyDescriptor(i,t);return r.get?r.get.call(arguments.length<3?e:n):r.value}},i.apply(null,arguments)}},81160(e,t,n){n.d(t,{A:()=>i});var o=n(84264);function i(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=(0,o.A)(e)););return e}}}]);